a?"0"+a:a}function q(a){r.lastIndex=0;return r.test(a)?'"'+a.replace(r,function(a){var c=t[a];return"string"===typeof c?c:"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+a+'"'}function n(a,k){var c,d,h,p,g=e,f,b=k[a];b&&("object"===typeof b&&"function"===typeof b.toJSON)&&(b=b.toJSON(a));"function"===typeof j&&(b=j.call(k,a,b));switch(typeof b){case "string":return q(b);case "number":return isFinite(b)?String(b):"null";case "boolean":case "null":return String(b);
- case "object":if(!b)return"null";e+=m;f=[];if("[object Array]"===Object.prototype.toString.apply(b)){p=b.length;for(c=0;c68?1900:2e3);break;case"YYYY":case"YYYYY":s[0]=~~t;break;case"a":case"A":n._isPm=(t+"").toLowerCase()==="pm";break;case"H":case"HH":case"h":case"hh":s[3]=~~t;break;case"m":case"mm":s[4]=~~t;break;case"s":case"ss":s[5]=~~t;break;case"S":case"SS":case"SSS":s[6]=~~(("0."+t)*1e3);break;case"X":n._d=new Date(parseFloat(t)*1e3);break;case"Z":case"ZZ":n._useUTC=!0,r=(t+"").match(x),r&&r[1]&&(n._tzh=~~r[1]),r&&r[2]&&(n._tzm=~~r[2]),r&&r[0]==="+"&&(n._tzh=-n._tzh,n._tzm=-n._tzm)}t==null&&(n._isValid=!1)}function J(e){var t,n,r=[];if(e._d)return;for(t=0;t<7;t++)e._a[t]=r[t]=e._a[t]==null?t===2?1:0:e._a[t];r[3]+=e._tzh||0,r[4]+=e._tzm||0,n=new Date(0),e._useUTC?(n.setUTCFullYear(r[0],r[1],r[2]),n.setUTCHours(r[3],r[4],r[5],r[6])):(n.setFullYear(r[0],r[1],r[2]),n.setHours(r[3],r[4],r[5],r[6])),e._d=n}function K(e){var t=e._f.match(a),n=e._i,r,i;e._a=[];for(r=0;r0,f[4]=n,Z.apply({},f)}function tt(e,n,r){var i=r-n,s=r-e.day();return s>i&&(s-=7),s11?n?"pm":"PM":n?"am":"AM"},_calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[last] dddd [at] LT",sameElse:"L"},calendar:function(e,t){var n=this._calendar[e];return typeof n=="function"?n.apply(t):n},_relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},relativeTime:function(e,t,n,r){var i=this._relativeTime[n];return typeof i=="function"?i(e,t,n,r):i.replace(/%d/i,e)},pastFuture:function(e,t){var n=this._relativeTime[e>0?"future":"past"];return typeof n=="function"?n(t):n.replace(/%s/i,t)},ordinal:function(e){return this._ordinal.replace("%d",e)},_ordinal:"%d",preparse:function(e){return e},postformat:function(e){return e},week:function(e){return tt(e,this._week.dow,this._week.doy)},_week:{dow:0,doy:6}},t=function(e,t,n){return nt({_i:e,_f:t,_l:n,_isUTC:!1})},t.utc=function(e,t,n){return nt({_useUTC:!0,_isUTC:!0,_l:n,_i:e,_f:t})},t.unix=function(e){return t(e*1e3)},t.duration=function(e,n){var r=t.isDuration(e),i=typeof e=="number",s=r?e._data:i?{}:e,o;return i&&(n?s[n]=e:s.milliseconds=e),o=new P(s),r&&e.hasOwnProperty("_lang")&&(o._lang=e._lang),o},t.version=n,t.defaultFormat=E,t.lang=function(e,n){var r;if(!e)return t.fn._lang._abbr;n?R(e,n):s[e]||U(e),t.duration.fn._lang=t.fn._lang=U(e)},t.langData=function(e){return e&&e._lang&&e._lang._abbr&&(e=e._lang._abbr),U(e)},t.isMoment=function(e){return e instanceof D},t.isDuration=function(e){return e instanceof P},t.fn=D.prototype={clone:function(){return t(this)},valueOf:function(){return+this._d},unix:function(){return Math.floor(+this._d/1e3)},toString:function(){return this.format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},toDate:function(){return this._d},toJSON:function(){return t.utc(this).format("YYYY-MM-DD[T]HH:mm:ss.SSS[Z]")},toArray:function(){var e=this;return[e.year(),e.month(),e.date(),e.hours(),e.minutes(),e.seconds(),e.milliseconds()]},isValid:function(){return this._isValid==null&&(this._a?this._isValid=!q(this._a,(this._isUTC?t.utc(this._a):t(this._a)).toArray()):this._isValid=!isNaN(this._d.getTime())),!!this._isValid},utc:function(){return this._isUTC=!0,this},local:function(){return this._isUTC=!1,this},format:function(e){var n=X(this,e||t.defaultFormat);return this.lang().postformat(n)},add:function(e,n){var r;return typeof e=="string"?r=t.duration(+n,e):r=t.duration(e,n),F(this,r,1),this},subtract:function(e,n){var r;return typeof e=="string"?r=t.duration(+n,e):r=t.duration(e,n),F(this,r,-1),this},diff:function(e,n,r){var i=this._isUTC?t(e).utc():t(e).local(),s=(this.zone()-i.zone())*6e4,o,u;return n&&(n=n.replace(/s$/,"")),n==="year"||n==="month"?(o=(this.daysInMonth()+i.daysInMonth())*432e5,u=(this.year()-i.year())*12+(this.month()-i.month()),u+=(this-t(this).startOf("month")-(i-t(i).startOf("month")))/o,n==="year"&&(u/=12)):(o=this-i-s,u=n==="second"?o/1e3:n==="minute"?o/6e4:n==="hour"?o/36e5:n==="day"?o/864e5:n==="week"?o/6048e5:o),r?u:B(u)},from:function(e,n){return t.duration(this.diff(e)).lang(this.lang()._abbr).humanize(!n)},fromNow:function(e){return this.from(t(),e)},calendar:function(){var e=this.diff(t().startOf("day"),"days",!0),n=e<-6?"sameElse":e<-1?"lastWeek":e<0?"lastDay":e<1?"sameDay":e<2?"nextDay":e<7?"nextWeek":"sameElse";return this.format(this.lang().calendar(n,this))},isLeapYear:function(){var e=this.year();return e%4===0&&e%100!==0||e%400===0},isDST:function(){return this.zone()+t(e).startOf(n)},isBefore:function(e,n){return n=typeof n!="undefined"?n:"millisecond",+this.clone().startOf(n)<+t(e).startOf(n)},isSame:function(e,n){return n=typeof n!="undefined"?n:"millisecond",+this.clone().startOf(n)===+t(e).startOf(n)},zone:function(){return this._isUTC?0:this._d.getTimezoneOffset()},daysInMonth:function(){return t.utc([this.year(),this.month()+1,0]).date()},dayOfYear:function(e){var n=r((t(this).startOf("day")-t(this).startOf("year"))/864e5)+1;return e==null?n:this.add("d",e-n)},isoWeek:function(e){var t=tt(this,1,4);return e==null?t:this.add("d",(e-t)*7)},week:function(e){var t=this.lang().week(this);return e==null?t:this.add("d",(e-t)*7)},lang:function(t){return t===e?this._lang:(this._lang=U(t),this)}};for(i=0;i -1; i -= 1) {
- if (ary[i] && func(ary[i], i, ary)) {
- break;
- }
- }
- }
- }
-
- function hasProp(obj, prop) {
- return obj.hasOwnProperty(prop);
- }
-
- /**
- * Cycles over properties in an object and calls a function for each
- * property value. If the function returns a truthy value, then the
- * iteration is stopped.
- */
- function eachProp(obj, func) {
- var prop;
- for (prop in obj) {
- if (obj.hasOwnProperty(prop)) {
- if (func(obj[prop], prop)) {
- break;
- }
- }
- }
- }
-
- /**
- * Simple function to mix in properties from source into target,
- * but only if target does not already have a property of the same name.
- * This is not robust in IE for transferring methods that match
- * Object.prototype names, but the uses of mixin here seem unlikely to
- * trigger a problem related to that.
- */
- function mixin(target, source, force, deepStringMixin) {
- if (source) {
- eachProp(source, function (value, prop) {
- if (force || !hasProp(target, prop)) {
- if (deepStringMixin && typeof value !== 'string') {
- if (!target[prop]) {
- target[prop] = {};
- }
- mixin(target[prop], value, force, deepStringMixin);
- } else {
- target[prop] = value;
- }
- }
- });
- }
- return target;
- }
-
- //Similar to Function.prototype.bind, but the 'this' object is specified
- //first, since it is easier to read/figure out what 'this' will be.
- function bind(obj, fn) {
- return function () {
- return fn.apply(obj, arguments);
- };
- }
-
- function scripts() {
- return document.getElementsByTagName('script');
- }
-
- //Allow getting a global that expressed in
- //dot notation, like 'a.b.c'.
- function getGlobal(value) {
- if (!value) {
- return value;
- }
- var g = global;
- each(value.split('.'), function (part) {
- g = g[part];
- });
- return g;
- }
-
- function makeContextModuleFunc(func, relMap, enableBuildCallback) {
- return function () {
- //A version of a require function that passes a moduleName
- //value for items that may need to
- //look up paths relative to the moduleName
- var args = aps.call(arguments, 0), lastArg;
- if (enableBuildCallback &&
- isFunction((lastArg = args[args.length - 1]))) {
- lastArg.__requireJsBuild = true;
- }
- args.push(relMap);
- return func.apply(null, args);
- };
- }
-
- function addRequireMethods(req, context, relMap) {
- each([
- ['toUrl'],
- ['undef'],
- ['defined', 'requireDefined'],
- ['specified', 'requireSpecified']
- ], function (item) {
- var prop = item[1] || item[0];
- req[item[0]] = context ? makeContextModuleFunc(context[prop], relMap) :
- //If no context, then use default context. Reference from
- //contexts instead of early binding to default context, so
- //that during builds, the latest instance of the default
- //context with its config gets used.
- function () {
- var ctx = contexts[defContextName];
- return ctx[prop].apply(ctx, arguments);
- };
- });
- }
-
- /**
- * Constructs an error with a pointer to an URL with more information.
- * @param {String} id the error ID that maps to an ID on a web page.
- * @param {String} message human readable error.
- * @param {Error} [err] the original error, if there is one.
- *
- * @returns {Error}
- */
- function makeError(id, msg, err, requireModules) {
- var e = new Error(msg + '\nhttp://requirejs.org/docs/errors.html#' + id);
- e.requireType = id;
- e.requireModules = requireModules;
- if (err) {
- e.originalError = err;
- }
- return e;
- }
-
- if (typeof define !== 'undefined') {
- //If a define is already in play via another AMD loader,
- //do not overwrite.
- return;
- }
-
- if (typeof requirejs !== 'undefined') {
- if (isFunction(requirejs)) {
- //Do not overwrite and existing requirejs instance.
- return;
- }
- cfg = requirejs;
- requirejs = undefined;
- }
-
- //Allow for a require config object
- if (typeof require !== 'undefined' && !isFunction(require)) {
- //assume it is a config object.
- cfg = require;
- require = undefined;
- }
-
- function newContext(contextName) {
- var config = {
- waitSeconds: 7,
- baseUrl: './',
- paths: {},
- pkgs: {},
- shim: {}
- },
- registry = {},
- undefEvents = {},
- defQueue = [],
- defined = {},
- urlFetched = {},
- requireCounter = 1,
- unnormalizedCounter = 1,
- //Used to track the order in which modules
- //should be executed, by the order they
- //load. Important for consistent cycle resolution
- //behavior.
- waitAry = [],
- inCheckLoaded, Module, context, handlers,
- checkLoadedTimeoutId;
-
- /**
- * Trims the . and .. from an array of path segments.
- * It will keep a leading path segment if a .. will become
- * the first path segment, to help with module name lookups,
- * which act like paths, but can be remapped. But the end result,
- * all paths that use this function should look normalized.
- * NOTE: this method MODIFIES the input array.
- * @param {Array} ary the array of path segments.
- */
- function trimDots(ary) {
- var i, part;
- for (i = 0; ary[i]; i+= 1) {
- part = ary[i];
- if (part === '.') {
- ary.splice(i, 1);
- i -= 1;
- } else if (part === '..') {
- if (i === 1 && (ary[2] === '..' || ary[0] === '..')) {
- //End of the line. Keep at least one non-dot
- //path segment at the front so it can be mapped
- //correctly to disk. Otherwise, there is likely
- //no path mapping for a path starting with '..'.
- //This can still fail, but catches the most reasonable
- //uses of ..
- break;
- } else if (i > 0) {
- ary.splice(i - 1, 2);
- i -= 2;
- }
- }
- }
- }
-
- /**
- * Given a relative module name, like ./something, normalize it to
- * a real name that can be mapped to a path.
- * @param {String} name the relative name
- * @param {String} baseName a real name that the name arg is relative
- * to.
- * @param {Boolean} applyMap apply the map config to the value. Should
- * only be done if this normalization is for a dependency ID.
- * @returns {String} normalized name
- */
- function normalize(name, baseName, applyMap) {
- var baseParts = baseName && baseName.split('/'),
- map = config.map,
- starMap = map && map['*'],
- pkgName, pkgConfig, mapValue, nameParts, i, j, nameSegment,
- foundMap;
-
- //Adjust any relative paths.
- if (name && name.charAt(0) === '.') {
- //If have a base name, try to normalize against it,
- //otherwise, assume it is a top-level require that will
- //be relative to baseUrl in the end.
- if (baseName) {
- if (config.pkgs[baseName]) {
- //If the baseName is a package name, then just treat it as one
- //name to concat the name with.
- baseParts = [baseName];
- } else {
- //Convert baseName to array, and lop off the last part,
- //so that . matches that 'directory' and not name of the baseName's
- //module. For instance, baseName of 'one/two/three', maps to
- //'one/two/three.js', but we want the directory, 'one/two' for
- //this normalization.
- baseParts = baseParts.slice(0, baseParts.length - 1);
- }
-
- name = baseParts.concat(name.split('/'));
- trimDots(name);
-
- //Some use of packages may use a . path to reference the
- //'main' module name, so normalize for that.
- pkgConfig = config.pkgs[(pkgName = name[0])];
- name = name.join('/');
- if (pkgConfig && name === pkgName + '/' + pkgConfig.main) {
- name = pkgName;
- }
- } else if (name.indexOf('./') === 0) {
- // No baseName, so this is ID is resolved relative
- // to baseUrl, pull off the leading dot.
- name = name.substring(2);
- }
- }
-
- //Apply map config if available.
- if (applyMap && (baseParts || starMap) && map) {
- nameParts = name.split('/');
-
- for (i = nameParts.length; i > 0; i -= 1) {
- nameSegment = nameParts.slice(0, i).join('/');
-
- if (baseParts) {
- //Find the longest baseName segment match in the config.
- //So, do joins on the biggest to smallest lengths of baseParts.
- for (j = baseParts.length; j > 0; j -= 1) {
- mapValue = map[baseParts.slice(0, j).join('/')];
-
- //baseName segment has config, find if it has one for
- //this name.
- if (mapValue) {
- mapValue = mapValue[nameSegment];
- if (mapValue) {
- //Match, update name to the new value.
- foundMap = mapValue;
- break;
- }
- }
- }
- }
-
- if (!foundMap && starMap && starMap[nameSegment]) {
- foundMap = starMap[nameSegment];
- }
-
- if (foundMap) {
- nameParts.splice(0, i, foundMap);
- name = nameParts.join('/');
- break;
- }
- }
- }
-
- return name;
- }
-
- function removeScript(name) {
- if (isBrowser) {
- each(scripts(), function (scriptNode) {
- if (scriptNode.getAttribute('data-requiremodule') === name &&
- scriptNode.getAttribute('data-requirecontext') === context.contextName) {
- scriptNode.parentNode.removeChild(scriptNode);
- return true;
- }
- });
- }
- }
-
- function hasPathFallback(id) {
- var pathConfig = config.paths[id];
- if (pathConfig && isArray(pathConfig) && pathConfig.length > 1) {
- removeScript(id);
- //Pop off the first array value, since it failed, and
- //retry
- pathConfig.shift();
- context.undef(id);
- context.require([id]);
- return true;
- }
- }
-
- /**
- * Creates a module mapping that includes plugin prefix, module
- * name, and path. If parentModuleMap is provided it will
- * also normalize the name via require.normalize()
- *
- * @param {String} name the module name
- * @param {String} [parentModuleMap] parent module map
- * for the module name, used to resolve relative names.
- * @param {Boolean} isNormalized: is the ID already normalized.
- * This is true if this call is done for a define() module ID.
- * @param {Boolean} applyMap: apply the map config to the ID.
- * Should only be true if this map is for a dependency.
- *
- * @returns {Object}
- */
- function makeModuleMap(name, parentModuleMap, isNormalized, applyMap) {
- var index = name ? name.indexOf('!') : -1,
- prefix = null,
- parentName = parentModuleMap ? parentModuleMap.name : null,
- originalName = name,
- isDefine = true,
- normalizedName = '',
- url, pluginModule, suffix;
-
- //If no name, then it means it is a require call, generate an
- //internal name.
- if (!name) {
- isDefine = false;
- name = '_@r' + (requireCounter += 1);
- }
-
- if (index !== -1) {
- prefix = name.substring(0, index);
- name = name.substring(index + 1, name.length);
- }
-
- if (prefix) {
- prefix = normalize(prefix, parentName, applyMap);
- pluginModule = defined[prefix];
- }
-
- //Account for relative paths if there is a base name.
- if (name) {
- if (prefix) {
- if (pluginModule && pluginModule.normalize) {
- //Plugin is loaded, use its normalize method.
- normalizedName = pluginModule.normalize(name, function (name) {
- return normalize(name, parentName, applyMap);
- });
- } else {
- normalizedName = normalize(name, parentName, applyMap);
- }
- } else {
- //A regular module.
- normalizedName = normalize(name, parentName, applyMap);
-
- //Calculate url for the module, if it has a name.
- //Use name here since nameToUrl also calls normalize,
- //and for relative names that are outside the baseUrl
- //this causes havoc. Was thinking of just removing
- //parentModuleMap to avoid extra normalization, but
- //normalize() still does a dot removal because of
- //issue #142, so just pass in name here and redo
- //the normalization. Paths outside baseUrl are just
- //messy to support.
- url = context.nameToUrl(name, null, parentModuleMap);
- }
- }
-
- //If the id is a plugin id that cannot be determined if it needs
- //normalization, stamp it with a unique ID so two matching relative
- //ids that may conflict can be separate.
- suffix = prefix && !pluginModule && !isNormalized ?
- '_unnormalized' + (unnormalizedCounter += 1) :
- '';
-
- return {
- prefix: prefix,
- name: normalizedName,
- parentMap: parentModuleMap,
- unnormalized: !!suffix,
- url: url,
- originalName: originalName,
- isDefine: isDefine,
- id: (prefix ?
- prefix + '!' + normalizedName :
- normalizedName) + suffix
- };
- }
-
- function getModule(depMap) {
- var id = depMap.id,
- mod = registry[id];
-
- if (!mod) {
- mod = registry[id] = new context.Module(depMap);
- }
-
- return mod;
- }
-
- function on(depMap, name, fn) {
- var id = depMap.id,
- mod = registry[id];
-
- if (hasProp(defined, id) &&
- (!mod || mod.defineEmitComplete)) {
- if (name === 'defined') {
- fn(defined[id]);
- }
- } else {
- getModule(depMap).on(name, fn);
- }
- }
-
- function onError(err, errback) {
- var ids = err.requireModules,
- notified = false;
-
- if (errback) {
- errback(err);
- } else {
- each(ids, function (id) {
- var mod = registry[id];
- if (mod) {
- //Set error on module, so it skips timeout checks.
- mod.error = err;
- if (mod.events.error) {
- notified = true;
- mod.emit('error', err);
- }
- }
- });
-
- if (!notified) {
- req.onError(err);
- }
- }
- }
-
- /**
- * Internal method to transfer globalQueue items to this context's
- * defQueue.
- */
- function takeGlobalQueue() {
- //Push all the globalDefQueue items into the context's defQueue
- if (globalDefQueue.length) {
- //Array splice in the values since the context code has a
- //local var ref to defQueue, so cannot just reassign the one
- //on context.
- apsp.apply(defQueue,
- [defQueue.length - 1, 0].concat(globalDefQueue));
- globalDefQueue = [];
- }
- }
-
- /**
- * Helper function that creates a require function object to give to
- * modules that ask for it as a dependency. It needs to be specific
- * per module because of the implication of path mappings that may
- * need to be relative to the module name.
- */
- function makeRequire(mod, enableBuildCallback, altRequire) {
- var relMap = mod && mod.map,
- modRequire = makeContextModuleFunc(altRequire || context.require,
- relMap,
- enableBuildCallback);
-
- addRequireMethods(modRequire, context, relMap);
- modRequire.isBrowser = isBrowser;
-
- return modRequire;
- }
-
- handlers = {
- 'require': function (mod) {
- return makeRequire(mod);
- },
- 'exports': function (mod) {
- mod.usingExports = true;
- if (mod.map.isDefine) {
- return (mod.exports = defined[mod.map.id] = {});
- }
- },
- 'module': function (mod) {
- return (mod.module = {
- id: mod.map.id,
- uri: mod.map.url,
- config: function () {
- return (config.config && config.config[mod.map.id]) || {};
- },
- exports: defined[mod.map.id]
- });
- }
- };
-
- function removeWaiting(id) {
- //Clean up machinery used for waiting modules.
- delete registry[id];
-
- each(waitAry, function (mod, i) {
- if (mod.map.id === id) {
- waitAry.splice(i, 1);
- if (!mod.defined) {
- context.waitCount -= 1;
- }
- return true;
- }
- });
- }
-
- function findCycle(mod, traced) {
- var id = mod.map.id,
- depArray = mod.depMaps,
- foundModule;
-
- //Do not bother with unitialized modules or not yet enabled
- //modules.
- if (!mod.inited) {
- return;
- }
-
- //Found the cycle.
- if (traced[id]) {
- return mod;
- }
-
- traced[id] = true;
-
- //Trace through the dependencies.
- each(depArray, function (depMap) {
- var depId = depMap.id,
- depMod = registry[depId];
-
- if (!depMod) {
- return;
- }
-
- if (!depMod.inited || !depMod.enabled) {
- //Dependency is not inited, so this cannot
- //be used to determine a cycle.
- foundModule = null;
- delete traced[id];
- return true;
- }
-
- //mixin traced to a new object for each dependency, so that
- //sibling dependencies in this object to not generate a
- //false positive match on a cycle. Ideally an Object.create
- //type of prototype delegation would be used here, but
- //optimizing for file size vs. execution speed since hopefully
- //the trees are small for circular dependency scans relative
- //to the full app perf.
- return (foundModule = findCycle(depMod, mixin({}, traced)));
- });
-
- return foundModule;
- }
-
- function forceExec(mod, traced, uninited) {
- var id = mod.map.id,
- depArray = mod.depMaps;
-
- if (!mod.inited || !mod.map.isDefine) {
- return;
- }
-
- if (traced[id]) {
- return defined[id];
- }
-
- traced[id] = mod;
-
- each(depArray, function(depMap) {
- var depId = depMap.id,
- depMod = registry[depId],
- value;
-
- if (handlers[depId]) {
- return;
- }
-
- if (depMod) {
- if (!depMod.inited || !depMod.enabled) {
- //Dependency is not inited,
- //so this module cannot be
- //given a forced value yet.
- uninited[id] = true;
- return;
- }
-
- //Get the value for the current dependency
- value = forceExec(depMod, traced, uninited);
-
- //Even with forcing it may not be done,
- //in particular if the module is waiting
- //on a plugin resource.
- if (!uninited[depId]) {
- mod.defineDepById(depId, value);
- }
- }
- });
-
- mod.check(true);
-
- return defined[id];
- }
-
- function modCheck(mod) {
- mod.check();
- }
-
- function checkLoaded() {
- var waitInterval = config.waitSeconds * 1000,
- //It is possible to disable the wait interval by using waitSeconds of 0.
- expired = waitInterval && (context.startTime + waitInterval) < new Date().getTime(),
- noLoads = [],
- stillLoading = false,
- needCycleCheck = true,
- map, modId, err, usingPathFallback;
-
- //Do not bother if this call was a result of a cycle break.
- if (inCheckLoaded) {
- return;
- }
-
- inCheckLoaded = true;
-
- //Figure out the state of all the modules.
- eachProp(registry, function (mod) {
- map = mod.map;
- modId = map.id;
-
- //Skip things that are not enabled or in error state.
- if (!mod.enabled) {
- return;
- }
-
- if (!mod.error) {
- //If the module should be executed, and it has not
- //been inited and time is up, remember it.
- if (!mod.inited && expired) {
- if (hasPathFallback(modId)) {
- usingPathFallback = true;
- stillLoading = true;
- } else {
- noLoads.push(modId);
- removeScript(modId);
- }
- } else if (!mod.inited && mod.fetched && map.isDefine) {
- stillLoading = true;
- if (!map.prefix) {
- //No reason to keep looking for unfinished
- //loading. If the only stillLoading is a
- //plugin resource though, keep going,
- //because it may be that a plugin resource
- //is waiting on a non-plugin cycle.
- return (needCycleCheck = false);
- }
- }
- }
- });
-
- if (expired && noLoads.length) {
- //If wait time expired, throw error of unloaded modules.
- err = makeError('timeout', 'Load timeout for modules: ' + noLoads, null, noLoads);
- err.contextName = context.contextName;
- return onError(err);
- }
-
- //Not expired, check for a cycle.
- if (needCycleCheck) {
-
- each(waitAry, function (mod) {
- if (mod.defined) {
- return;
- }
-
- var cycleMod = findCycle(mod, {}),
- traced = {};
-
- if (cycleMod) {
- forceExec(cycleMod, traced, {});
-
- //traced modules may have been
- //removed from the registry, but
- //their listeners still need to
- //be called.
- eachProp(traced, modCheck);
- }
- });
-
- //Now that dependencies have
- //been satisfied, trigger the
- //completion check that then
- //notifies listeners.
- eachProp(registry, modCheck);
- }
-
- //If still waiting on loads, and the waiting load is something
- //other than a plugin resource, or there are still outstanding
- //scripts, then just try back later.
- if ((!expired || usingPathFallback) && stillLoading) {
- //Something is still waiting to load. Wait for it, but only
- //if a timeout is not already in effect.
- if ((isBrowser || isWebWorker) && !checkLoadedTimeoutId) {
- checkLoadedTimeoutId = setTimeout(function () {
- checkLoadedTimeoutId = 0;
- checkLoaded();
- }, 50);
- }
- }
-
- inCheckLoaded = false;
- }
-
- Module = function (map) {
- this.events = undefEvents[map.id] || {};
- this.map = map;
- this.shim = config.shim[map.id];
- this.depExports = [];
- this.depMaps = [];
- this.depMatched = [];
- this.pluginMaps = {};
- this.depCount = 0;
-
- /* this.exports this.factory
- this.depMaps = [],
- this.enabled, this.fetched
- */
- };
-
- Module.prototype = {
- init: function(depMaps, factory, errback, options) {
- options = options || {};
-
- //Do not do more inits if already done. Can happen if there
- //are multiple define calls for the same module. That is not
- //a normal, common case, but it is also not unexpected.
- if (this.inited) {
- return;
- }
-
- this.factory = factory;
-
- if (errback) {
- //Register for errors on this module.
- this.on('error', errback);
- } else if (this.events.error) {
- //If no errback already, but there are error listeners
- //on this module, set up an errback to pass to the deps.
- errback = bind(this, function (err) {
- this.emit('error', err);
- });
- }
-
- //Do a copy of the dependency array, so that
- //source inputs are not modified. For example
- //"shim" deps are passed in here directly, and
- //doing a direct modification of the depMaps array
- //would affect that config.
- this.depMaps = depMaps && depMaps.slice(0);
- this.depMaps.rjsSkipMap = depMaps.rjsSkipMap;
-
- this.errback = errback;
-
- //Indicate this module has be initialized
- this.inited = true;
-
- this.ignore = options.ignore;
-
- //Could have option to init this module in enabled mode,
- //or could have been previously marked as enabled. However,
- //the dependencies are not known until init is called. So
- //if enabled previously, now trigger dependencies as enabled.
- if (options.enabled || this.enabled) {
- //Enable this module and dependencies.
- //Will call this.check()
- this.enable();
- } else {
- this.check();
- }
- },
-
- defineDepById: function (id, depExports) {
- var i;
-
- //Find the index for this dependency.
- each(this.depMaps, function (map, index) {
- if (map.id === id) {
- i = index;
- return true;
- }
- });
-
- return this.defineDep(i, depExports);
- },
-
- defineDep: function (i, depExports) {
- //Because of cycles, defined callback for a given
- //export can be called more than once.
- if (!this.depMatched[i]) {
- this.depMatched[i] = true;
- this.depCount -= 1;
- this.depExports[i] = depExports;
- }
- },
-
- fetch: function () {
- if (this.fetched) {
- return;
- }
- this.fetched = true;
-
- context.startTime = (new Date()).getTime();
-
- var map = this.map;
-
- //If the manager is for a plugin managed resource,
- //ask the plugin to load it now.
- if (this.shim) {
- makeRequire(this, true)(this.shim.deps || [], bind(this, function () {
- return map.prefix ? this.callPlugin() : this.load();
- }));
- } else {
- //Regular dependency.
- return map.prefix ? this.callPlugin() : this.load();
- }
- },
-
- load: function() {
- var url = this.map.url;
-
- //Regular dependency.
- if (!urlFetched[url]) {
- urlFetched[url] = true;
- context.load(this.map.id, url);
- }
- },
-
- /**
- * Checks is the module is ready to define itself, and if so,
- * define it. If the silent argument is true, then it will just
- * define, but not notify listeners, and not ask for a context-wide
- * check of all loaded modules. That is useful for cycle breaking.
- */
- check: function (silent) {
- if (!this.enabled || this.enabling) {
- return;
- }
-
- var id = this.map.id,
- depExports = this.depExports,
- exports = this.exports,
- factory = this.factory,
- err, cjsModule;
-
- if (!this.inited) {
- this.fetch();
- } else if (this.error) {
- this.emit('error', this.error);
- } else if (!this.defining) {
- //The factory could trigger another require call
- //that would result in checking this module to
- //define itself again. If already in the process
- //of doing that, skip this work.
- this.defining = true;
-
- if (this.depCount < 1 && !this.defined) {
- if (isFunction(factory)) {
- //If there is an error listener, favor passing
- //to that instead of throwing an error.
- if (this.events.error) {
- try {
- exports = context.execCb(id, factory, depExports, exports);
- } catch (e) {
- err = e;
- }
- } else {
- exports = context.execCb(id, factory, depExports, exports);
- }
-
- if (this.map.isDefine) {
- //If setting exports via 'module' is in play,
- //favor that over return value and exports. After that,
- //favor a non-undefined return value over exports use.
- cjsModule = this.module;
- if (cjsModule &&
- cjsModule.exports !== undefined &&
- //Make sure it is not already the exports value
- cjsModule.exports !== this.exports) {
- exports = cjsModule.exports;
- } else if (exports === undefined && this.usingExports) {
- //exports already set the defined value.
- exports = this.exports;
- }
- }
-
- if (err) {
- err.requireMap = this.map;
- err.requireModules = [this.map.id];
- err.requireType = 'define';
- return onError((this.error = err));
- }
-
- } else {
- //Just a literal value
- exports = factory;
- }
-
- this.exports = exports;
-
- if (this.map.isDefine && !this.ignore) {
- defined[id] = exports;
-
- if (req.onResourceLoad) {
- req.onResourceLoad(context, this.map, this.depMaps);
- }
- }
-
- //Clean up
- delete registry[id];
-
- this.defined = true;
- context.waitCount -= 1;
- if (context.waitCount === 0) {
- //Clear the wait array used for cycles.
- waitAry = [];
- }
- }
-
- //Finished the define stage. Allow calling check again
- //to allow define notifications below in the case of a
- //cycle.
- this.defining = false;
-
- if (!silent) {
- if (this.defined && !this.defineEmitted) {
- this.defineEmitted = true;
- this.emit('defined', this.exports);
- this.defineEmitComplete = true;
- }
- }
- }
- },
-
- callPlugin: function() {
- var map = this.map,
- id = map.id,
- pluginMap = makeModuleMap(map.prefix, null, false, true);
-
- on(pluginMap, 'defined', bind(this, function (plugin) {
- var name = this.map.name,
- parentName = this.map.parentMap ? this.map.parentMap.name : null,
- load, normalizedMap, normalizedMod;
-
- //If current map is not normalized, wait for that
- //normalized name to load instead of continuing.
- if (this.map.unnormalized) {
- //Normalize the ID if the plugin allows it.
- if (plugin.normalize) {
- name = plugin.normalize(name, function (name) {
- return normalize(name, parentName, true);
- }) || '';
- }
-
- normalizedMap = makeModuleMap(map.prefix + '!' + name,
- this.map.parentMap,
- false,
- true);
- on(normalizedMap,
- 'defined', bind(this, function (value) {
- this.init([], function () { return value; }, null, {
- enabled: true,
- ignore: true
- });
- }));
- normalizedMod = registry[normalizedMap.id];
- if (normalizedMod) {
- if (this.events.error) {
- normalizedMod.on('error', bind(this, function (err) {
- this.emit('error', err);
- }));
- }
- normalizedMod.enable();
- }
-
- return;
- }
-
- load = bind(this, function (value) {
- this.init([], function () { return value; }, null, {
- enabled: true
- });
- });
-
- load.error = bind(this, function (err) {
- this.inited = true;
- this.error = err;
- err.requireModules = [id];
-
- //Remove temp unnormalized modules for this module,
- //since they will never be resolved otherwise now.
- eachProp(registry, function (mod) {
- if (mod.map.id.indexOf(id + '_unnormalized') === 0) {
- removeWaiting(mod.map.id);
- }
- });
-
- onError(err);
- });
-
- //Allow plugins to load other code without having to know the
- //context or how to 'complete' the load.
- load.fromText = function (moduleName, text) {
- /*jslint evil: true */
- var hasInteractive = useInteractive;
-
- //Turn off interactive script matching for IE for any define
- //calls in the text, then turn it back on at the end.
- if (hasInteractive) {
- useInteractive = false;
- }
-
- //Prime the system by creating a module instance for
- //it.
- getModule(makeModuleMap(moduleName));
-
- req.exec(text);
-
- if (hasInteractive) {
- useInteractive = true;
- }
-
- //Support anonymous modules.
- context.completeLoad(moduleName);
- };
-
- //Use parentName here since the plugin's name is not reliable,
- //could be some weird string with no path that actually wants to
- //reference the parentName's path.
- plugin.load(map.name, makeRequire(map.parentMap, true, function (deps, cb) {
- deps.rjsSkipMap = true;
- return context.require(deps, cb);
- }), load, config);
- }));
-
- context.enable(pluginMap, this);
- this.pluginMaps[pluginMap.id] = pluginMap;
- },
-
- enable: function () {
- this.enabled = true;
-
- if (!this.waitPushed) {
- waitAry.push(this);
- context.waitCount += 1;
- this.waitPushed = true;
- }
-
- //Set flag mentioning that the module is enabling,
- //so that immediate calls to the defined callbacks
- //for dependencies do not trigger inadvertent load
- //with the depCount still being zero.
- this.enabling = true;
-
- //Enable each dependency
- each(this.depMaps, bind(this, function (depMap, i) {
- var id, mod, handler;
-
- if (typeof depMap === 'string') {
- //Dependency needs to be converted to a depMap
- //and wired up to this module.
- depMap = makeModuleMap(depMap,
- (this.map.isDefine ? this.map : this.map.parentMap),
- false,
- !this.depMaps.rjsSkipMap);
- this.depMaps[i] = depMap;
-
- handler = handlers[depMap.id];
-
- if (handler) {
- this.depExports[i] = handler(this);
- return;
- }
-
- this.depCount += 1;
-
- on(depMap, 'defined', bind(this, function (depExports) {
- this.defineDep(i, depExports);
- this.check();
- }));
-
- if (this.errback) {
- on(depMap, 'error', this.errback);
- }
- }
-
- id = depMap.id;
- mod = registry[id];
-
- //Skip special modules like 'require', 'exports', 'module'
- //Also, don't call enable if it is already enabled,
- //important in circular dependency cases.
- if (!handlers[id] && mod && !mod.enabled) {
- context.enable(depMap, this);
- }
- }));
-
- //Enable each plugin that is used in
- //a dependency
- eachProp(this.pluginMaps, bind(this, function (pluginMap) {
- var mod = registry[pluginMap.id];
- if (mod && !mod.enabled) {
- context.enable(pluginMap, this);
- }
- }));
-
- this.enabling = false;
-
- this.check();
- },
-
- on: function(name, cb) {
- var cbs = this.events[name];
- if (!cbs) {
- cbs = this.events[name] = [];
- }
- cbs.push(cb);
- },
-
- emit: function (name, evt) {
- each(this.events[name], function (cb) {
- cb(evt);
- });
- if (name === 'error') {
- //Now that the error handler was triggered, remove
- //the listeners, since this broken Module instance
- //can stay around for a while in the registry/waitAry.
- delete this.events[name];
- }
- }
- };
-
- function callGetModule(args) {
- getModule(makeModuleMap(args[0], null, true)).init(args[1], args[2]);
- }
-
- function removeListener(node, func, name, ieName) {
- //Favor detachEvent because of IE9
- //issue, see attachEvent/addEventListener comment elsewhere
- //in this file.
- if (node.detachEvent && !isOpera) {
- //Probably IE. If not it will throw an error, which will be
- //useful to know.
- if (ieName) {
- node.detachEvent(ieName, func);
- }
- } else {
- node.removeEventListener(name, func, false);
- }
- }
-
- /**
- * Given an event from a script node, get the requirejs info from it,
- * and then removes the event listeners on the node.
- * @param {Event} evt
- * @returns {Object}
- */
- function getScriptData(evt) {
- //Using currentTarget instead of target for Firefox 2.0's sake. Not
- //all old browsers will be supported, but this one was easy enough
- //to support and still makes sense.
- var node = evt.currentTarget || evt.srcElement;
-
- //Remove the listeners once here.
- removeListener(node, context.onScriptLoad, 'load', 'onreadystatechange');
- removeListener(node, context.onScriptError, 'error');
-
- return {
- node: node,
- id: node && node.getAttribute('data-requiremodule')
- };
- }
-
- return (context = {
- config: config,
- contextName: contextName,
- registry: registry,
- defined: defined,
- urlFetched: urlFetched,
- waitCount: 0,
- defQueue: defQueue,
- Module: Module,
- makeModuleMap: makeModuleMap,
-
- /**
- * Set a configuration for the context.
- * @param {Object} cfg config object to integrate.
- */
- configure: function (cfg) {
- //Make sure the baseUrl ends in a slash.
- if (cfg.baseUrl) {
- if (cfg.baseUrl.charAt(cfg.baseUrl.length - 1) !== '/') {
- cfg.baseUrl += '/';
- }
- }
-
- //Save off the paths and packages since they require special processing,
- //they are additive.
- var pkgs = config.pkgs,
- shim = config.shim,
- paths = config.paths,
- map = config.map;
-
- //Mix in the config values, favoring the new values over
- //existing ones in context.config.
- mixin(config, cfg, true);
-
- //Merge paths.
- config.paths = mixin(paths, cfg.paths, true);
-
- //Merge map
- if (cfg.map) {
- config.map = mixin(map || {}, cfg.map, true, true);
- }
-
- //Merge shim
- if (cfg.shim) {
- eachProp(cfg.shim, function (value, id) {
- //Normalize the structure
- if (isArray(value)) {
- value = {
- deps: value
- };
- }
- if (value.exports && !value.exports.__buildReady) {
- value.exports = context.makeShimExports(value.exports);
- }
- shim[id] = value;
- });
- config.shim = shim;
- }
-
- //Adjust packages if necessary.
- if (cfg.packages) {
- each(cfg.packages, function (pkgObj) {
- var location;
-
- pkgObj = typeof pkgObj === 'string' ? { name: pkgObj } : pkgObj;
- location = pkgObj.location;
-
- //Create a brand new object on pkgs, since currentPackages can
- //be passed in again, and config.pkgs is the internal transformed
- //state for all package configs.
- pkgs[pkgObj.name] = {
- name: pkgObj.name,
- location: location || pkgObj.name,
- //Remove leading dot in main, so main paths are normalized,
- //and remove any trailing .js, since different package
- //envs have different conventions: some use a module name,
- //some use a file name.
- main: (pkgObj.main || 'main')
- .replace(currDirRegExp, '')
- .replace(jsSuffixRegExp, '')
- };
- });
-
- //Done with modifications, assing packages back to context config
- config.pkgs = pkgs;
- }
-
- //If there are any "waiting to execute" modules in the registry,
- //update the maps for them, since their info, like URLs to load,
- //may have changed.
- eachProp(registry, function (mod, id) {
- mod.map = makeModuleMap(id);
- });
-
- //If a deps array or a config callback is specified, then call
- //require with those args. This is useful when require is defined as a
- //config object before require.js is loaded.
- if (cfg.deps || cfg.callback) {
- context.require(cfg.deps || [], cfg.callback);
- }
- },
-
- makeShimExports: function (exports) {
- var func;
- if (typeof exports === 'string') {
- func = function () {
- return getGlobal(exports);
- };
- //Save the exports for use in nodefine checking.
- func.exports = exports;
- return func;
- } else {
- return function () {
- return exports.apply(global, arguments);
- };
- }
- },
-
- requireDefined: function (id, relMap) {
- return hasProp(defined, makeModuleMap(id, relMap, false, true).id);
- },
-
- requireSpecified: function (id, relMap) {
- id = makeModuleMap(id, relMap, false, true).id;
- return hasProp(defined, id) || hasProp(registry, id);
- },
-
- require: function (deps, callback, errback, relMap) {
- var moduleName, id, map, requireMod, args;
- if (typeof deps === 'string') {
- if (isFunction(callback)) {
- //Invalid call
- return onError(makeError('requireargs', 'Invalid require call'), errback);
- }
-
- //Synchronous access to one module. If require.get is
- //available (as in the Node adapter), prefer that.
- //In this case deps is the moduleName and callback is
- //the relMap
- if (req.get) {
- return req.get(context, deps, callback);
- }
-
- //Just return the module wanted. In this scenario, the
- //second arg (if passed) is just the relMap.
- moduleName = deps;
- relMap = callback;
-
- //Normalize module name, if it contains . or ..
- map = makeModuleMap(moduleName, relMap, false, true);
- id = map.id;
-
- if (!hasProp(defined, id)) {
- return onError(makeError('notloaded', 'Module name "' +
- id +
- '" has not been loaded yet for context: ' +
- contextName));
- }
- return defined[id];
- }
-
- //Callback require. Normalize args. if callback or errback is
- //not a function, it means it is a relMap. Test errback first.
- if (errback && !isFunction(errback)) {
- relMap = errback;
- errback = undefined;
- }
- if (callback && !isFunction(callback)) {
- relMap = callback;
- callback = undefined;
- }
-
- //Any defined modules in the global queue, intake them now.
- takeGlobalQueue();
-
- //Make sure any remaining defQueue items get properly processed.
- while (defQueue.length) {
- args = defQueue.shift();
- if (args[0] === null) {
- return onError(makeError('mismatch', 'Mismatched anonymous define() module: ' + args[args.length - 1]));
- } else {
- //args are id, deps, factory. Should be normalized by the
- //define() function.
- callGetModule(args);
- }
- }
-
- //Mark all the dependencies as needing to be loaded.
- requireMod = getModule(makeModuleMap(null, relMap));
-
- requireMod.init(deps, callback, errback, {
- enabled: true
- });
-
- checkLoaded();
-
- return context.require;
- },
-
- undef: function (id) {
- var map = makeModuleMap(id, null, true),
- mod = registry[id];
-
- delete defined[id];
- delete urlFetched[map.url];
- delete undefEvents[id];
-
- if (mod) {
- //Hold on to listeners in case the
- //module will be attempted to be reloaded
- //using a different config.
- if (mod.events.defined) {
- undefEvents[id] = mod.events;
- }
-
- removeWaiting(id);
- }
- },
-
- /**
- * Called to enable a module if it is still in the registry
- * awaiting enablement. parent module is passed in for context,
- * used by the optimizer.
- */
- enable: function (depMap, parent) {
- var mod = registry[depMap.id];
- if (mod) {
- getModule(depMap).enable();
- }
- },
-
- /**
- * Internal method used by environment adapters to complete a load event.
- * A load event could be a script load or just a load pass from a synchronous
- * load call.
- * @param {String} moduleName the name of the module to potentially complete.
- */
- completeLoad: function (moduleName) {
- var shim = config.shim[moduleName] || {},
- shExports = shim.exports && shim.exports.exports,
- found, args, mod;
-
- takeGlobalQueue();
-
- while (defQueue.length) {
- args = defQueue.shift();
- if (args[0] === null) {
- args[0] = moduleName;
- //If already found an anonymous module and bound it
- //to this name, then this is some other anon module
- //waiting for its completeLoad to fire.
- if (found) {
- break;
- }
- found = true;
- } else if (args[0] === moduleName) {
- //Found matching define call for this script!
- found = true;
- }
-
- callGetModule(args);
- }
-
- //Do this after the cycle of callGetModule in case the result
- //of those calls/init calls changes the registry.
- mod = registry[moduleName];
-
- if (!found &&
- !defined[moduleName] &&
- mod && !mod.inited) {
- if (config.enforceDefine && (!shExports || !getGlobal(shExports))) {
- if (hasPathFallback(moduleName)) {
- return;
- } else {
- return onError(makeError('nodefine',
- 'No define call for ' + moduleName,
- null,
- [moduleName]));
- }
- } else {
- //A script that does not call define(), so just simulate
- //the call for it.
- callGetModule([moduleName, (shim.deps || []), shim.exports]);
- }
- }
-
- checkLoaded();
- },
-
- /**
- * Converts a module name + .extension into an URL path.
- * *Requires* the use of a module name. It does not support using
- * plain URLs like nameToUrl.
- */
- toUrl: function (moduleNamePlusExt, relModuleMap) {
- var index = moduleNamePlusExt.lastIndexOf('.'),
- ext = null;
-
- if (index !== -1) {
- ext = moduleNamePlusExt.substring(index, moduleNamePlusExt.length);
- moduleNamePlusExt = moduleNamePlusExt.substring(0, index);
- }
-
- return context.nameToUrl(moduleNamePlusExt, ext, relModuleMap);
- },
-
- /**
- * Converts a module name to a file path. Supports cases where
- * moduleName may actually be just an URL.
- */
- nameToUrl: function (moduleName, ext, relModuleMap) {
- var paths, pkgs, pkg, pkgPath, syms, i, parentModule, url,
- parentPath;
-
- //Normalize module name if have a base relative module name to work from.
- moduleName = normalize(moduleName, relModuleMap && relModuleMap.id, true);
-
- //If a colon is in the URL, it indicates a protocol is used and it is just
- //an URL to a file, or if it starts with a slash, contains a query arg (i.e. ?)
- //or ends with .js, then assume the user meant to use an url and not a module id.
- //The slash is important for protocol-less URLs as well as full paths.
- if (req.jsExtRegExp.test(moduleName)) {
- //Just a plain path, not module name lookup, so just return it.
- //Add extension if it is included. This is a bit wonky, only non-.js things pass
- //an extension, this method probably needs to be reworked.
- url = moduleName + (ext || '');
- } else {
- //A module that needs to be converted to a path.
- paths = config.paths;
- pkgs = config.pkgs;
-
- syms = moduleName.split('/');
- //For each module name segment, see if there is a path
- //registered for it. Start with most specific name
- //and work up from it.
- for (i = syms.length; i > 0; i -= 1) {
- parentModule = syms.slice(0, i).join('/');
- pkg = pkgs[parentModule];
- parentPath = paths[parentModule];
- if (parentPath) {
- //If an array, it means there are a few choices,
- //Choose the one that is desired
- if (isArray(parentPath)) {
- parentPath = parentPath[0];
- }
- syms.splice(0, i, parentPath);
- break;
- } else if (pkg) {
- //If module name is just the package name, then looking
- //for the main module.
- if (moduleName === pkg.name) {
- pkgPath = pkg.location + '/' + pkg.main;
- } else {
- pkgPath = pkg.location;
- }
- syms.splice(0, i, pkgPath);
- break;
- }
- }
-
- //Join the path parts together, then figure out if baseUrl is needed.
- url = syms.join('/') + (ext || '.js');
- url = (url.charAt(0) === '/' || url.match(/^[\w\+\.\-]+:/) ? '' : config.baseUrl) + url;
- }
-
- return config.urlArgs ? url +
- ((url.indexOf('?') === -1 ? '?' : '&') +
- config.urlArgs) : url;
- },
-
- //Delegates to req.load. Broken out as a separate function to
- //allow overriding in the optimizer.
- load: function (id, url) {
- req.load(context, id, url);
- },
-
- /**
- * Executes a module callack function. Broken out as a separate function
- * solely to allow the build system to sequence the files in the built
- * layer in the right sequence.
- *
- * @private
- */
- execCb: function (name, callback, args, exports) {
- return callback.apply(exports, args);
- },
-
- /**
- * callback for script loads, used to check status of loading.
- *
- * @param {Event} evt the event from the browser for the script
- * that was loaded.
- */
- onScriptLoad: function (evt) {
- //Using currentTarget instead of target for Firefox 2.0's sake. Not
- //all old browsers will be supported, but this one was easy enough
- //to support and still makes sense.
- if (evt.type === 'load' ||
- (readyRegExp.test((evt.currentTarget || evt.srcElement).readyState))) {
- //Reset interactive script so a script node is not held onto for
- //to long.
- interactiveScript = null;
-
- //Pull out the name of the module and the context.
- var data = getScriptData(evt);
- context.completeLoad(data.id);
- }
- },
-
- /**
- * Callback for script errors.
- */
- onScriptError: function (evt) {
- var data = getScriptData(evt);
- if (!hasPathFallback(data.id)) {
- return onError(makeError('scripterror', 'Script error', evt, [data.id]));
- }
- }
- });
- }
-
- /**
- * Main entry point.
- *
- * If the only argument to require is a string, then the module that
- * is represented by that string is fetched for the appropriate context.
- *
- * If the first argument is an array, then it will be treated as an array
- * of dependency string names to fetch. An optional function callback can
- * be specified to execute when all of those dependencies are available.
- *
- * Make a local req variable to help Caja compliance (it assumes things
- * on a require that are not standardized), and to give a short
- * name for minification/local scope use.
- */
- req = requirejs = function (deps, callback, errback, optional) {
-
- //Find the right context, use default
- var contextName = defContextName,
- context, config;
-
- // Determine if have config object in the call.
- if (!isArray(deps) && typeof deps !== 'string') {
- // deps is a config object
- config = deps;
- if (isArray(callback)) {
- // Adjust args if there are dependencies
- deps = callback;
- callback = errback;
- errback = optional;
- } else {
- deps = [];
- }
- }
-
- if (config && config.context) {
- contextName = config.context;
- }
-
- context = contexts[contextName];
- if (!context) {
- context = contexts[contextName] = req.s.newContext(contextName);
- }
-
- if (config) {
- context.configure(config);
- }
-
- return context.require(deps, callback, errback);
- };
-
- /**
- * Support require.config() to make it easier to cooperate with other
- * AMD loaders on globally agreed names.
- */
- req.config = function (config) {
- return req(config);
- };
-
- /**
- * Export require as a global, but only if it does not already exist.
- */
- if (!require) {
- require = req;
- }
-
- req.version = version;
-
- //Used to filter out dependencies that are already paths.
- req.jsExtRegExp = /^\/|:|\?|\.js$/;
- req.isBrowser = isBrowser;
- s = req.s = {
- contexts: contexts,
- newContext: newContext
- };
-
- //Create default context.
- req({});
-
- //Exports some context-sensitive methods on global require, using
- //default context if no context specified.
- addRequireMethods(req);
-
- if (isBrowser) {
- head = s.head = document.getElementsByTagName('head')[0];
- //If BASE tag is in play, using appendChild is a problem for IE6.
- //When that browser dies, this can be removed. Details in this jQuery bug:
- //http://dev.jquery.com/ticket/2709
- baseElement = document.getElementsByTagName('base')[0];
- if (baseElement) {
- head = s.head = baseElement.parentNode;
- }
- }
-
- /**
- * Any errors that require explicitly generates will be passed to this
- * function. Intercept/override it if you want custom error handling.
- * @param {Error} err the error object.
- */
- req.onError = function (err) {
- throw err;
- };
-
- /**
- * Does the request to load a module for the browser case.
- * Make this a separate function to allow other environments
- * to override it.
- *
- * @param {Object} context the require context to find state.
- * @param {String} moduleName the name of the module.
- * @param {Object} url the URL to the module.
- */
- req.load = function (context, moduleName, url) {
- var config = (context && context.config) || {},
- node;
- if (isBrowser) {
- //In the browser so use a script tag
- node = config.xhtml ?
- document.createElementNS('http://www.w3.org/1999/xhtml', 'html:script') :
- document.createElement('script');
- node.type = config.scriptType || 'text/javascript';
- node.charset = 'utf-8';
-
- node.setAttribute('data-requirecontext', context.contextName);
- node.setAttribute('data-requiremodule', moduleName);
-
- //Set up load listener. Test attachEvent first because IE9 has
- //a subtle issue in its addEventListener and script onload firings
- //that do not match the behavior of all other browsers with
- //addEventListener support, which fire the onload event for a
- //script right after the script execution. See:
- //https://connect.microsoft.com/IE/feedback/details/648057/script-onload-event-is-not-fired-immediately-after-script-execution
- //UNFORTUNATELY Opera implements attachEvent but does not follow the script
- //script execution mode.
- if (node.attachEvent &&
- //Check if node.attachEvent is artificially added by custom script or
- //natively supported by browser
- //read https://github.com/jrburke/requirejs/issues/187
- //if we can NOT find [native code] then it must NOT natively supported.
- //in IE8, node.attachEvent does not have toString()
- //Note the test for "[native code" with no closing brace, see:
- //https://github.com/jrburke/requirejs/issues/273
- !(node.attachEvent.toString && node.attachEvent.toString().indexOf('[native code') < 0) &&
- !isOpera) {
- //Probably IE. IE (at least 6-8) do not fire
- //script onload right after executing the script, so
- //we cannot tie the anonymous define call to a name.
- //However, IE reports the script as being in 'interactive'
- //readyState at the time of the define call.
- useInteractive = true;
-
- node.attachEvent('onreadystatechange', context.onScriptLoad);
- //It would be great to add an error handler here to catch
- //404s in IE9+. However, onreadystatechange will fire before
- //the error handler, so that does not help. If addEvenListener
- //is used, then IE will fire error before load, but we cannot
- //use that pathway given the connect.microsoft.com issue
- //mentioned above about not doing the 'script execute,
- //then fire the script load event listener before execute
- //next script' that other browsers do.
- //Best hope: IE10 fixes the issues,
- //and then destroys all installs of IE 6-9.
- //node.attachEvent('onerror', context.onScriptError);
- } else {
- node.addEventListener('load', context.onScriptLoad, false);
- node.addEventListener('error', context.onScriptError, false);
- }
- node.src = url;
-
- //For some cache cases in IE 6-8, the script executes before the end
- //of the appendChild execution, so to tie an anonymous define
- //call to the module name (which is stored on the node), hold on
- //to a reference to this node, but clear after the DOM insertion.
- currentlyAddingScript = node;
- if (baseElement) {
- head.insertBefore(node, baseElement);
- } else {
- head.appendChild(node);
- }
- currentlyAddingScript = null;
-
- return node;
- } else if (isWebWorker) {
- //In a web worker, use importScripts. This is not a very
- //efficient use of importScripts, importScripts will block until
- //its script is downloaded and evaluated. However, if web workers
- //are in play, the expectation that a build has been done so that
- //only one script needs to be loaded anyway. This may need to be
- //reevaluated if other use cases become common.
- importScripts(url);
-
- //Account for anonymous modules
- context.completeLoad(moduleName);
- }
- };
-
- function getInteractiveScript() {
- if (interactiveScript && interactiveScript.readyState === 'interactive') {
- return interactiveScript;
- }
-
- eachReverse(scripts(), function (script) {
- if (script.readyState === 'interactive') {
- return (interactiveScript = script);
- }
- });
- return interactiveScript;
- }
-
- //Look for a data-main script attribute, which could also adjust the baseUrl.
- if (isBrowser) {
- //Figure out baseUrl. Get it from the script tag with require.js in it.
- eachReverse(scripts(), function (script) {
- //Set the 'head' where we can append children by
- //using the script's parent.
- if (!head) {
- head = script.parentNode;
- }
-
- //Look for a data-main attribute to set main script for the page
- //to load. If it is there, the path to data main becomes the
- //baseUrl, if it is not already set.
- dataMain = script.getAttribute('data-main');
- if (dataMain) {
-
- //Pull off the directory of data-main for use as the
- //baseUrl.
- src = dataMain.split('/');
- mainScript = src.pop();
- subPath = src.length ? src.join('/') + '/' : './';
-
- //Set final baseUrl if there is not already an explicit one.
- if (!cfg.baseUrl) {
- cfg.baseUrl = subPath;
- }
-
- //Strip off any trailing .js since dataMain is now
- //like a module name.
- dataMain = mainScript.replace(jsSuffixRegExp, '');
-
- //Put the data-main script in the files to load.
- cfg.deps = cfg.deps ? cfg.deps.concat(dataMain) : [dataMain];
-
- return true;
- }
- });
- }
-
- /**
- * The function that handles definitions of modules. Differs from
- * require() in that a string for the module should be the first argument,
- * and the function to execute after dependencies are loaded should
- * return a value to define the module corresponding to the first argument's
- * name.
- */
- define = function (name, deps, callback) {
- var node, context;
-
- //Allow for anonymous functions
- if (typeof name !== 'string') {
- //Adjust args appropriately
- callback = deps;
- deps = name;
- name = null;
- }
-
- //This module may not have dependencies
- if (!isArray(deps)) {
- callback = deps;
- deps = [];
- }
-
- //If no name, and callback is a function, then figure out if it a
- //CommonJS thing with dependencies.
- if (!deps.length && isFunction(callback)) {
- //Remove comments from the callback string,
- //look for require calls, and pull them into the dependencies,
- //but only if there are function args.
- if (callback.length) {
- callback
- .toString()
- .replace(commentRegExp, '')
- .replace(cjsRequireRegExp, function (match, dep) {
- deps.push(dep);
- });
-
- //May be a CommonJS thing even without require calls, but still
- //could use exports, and module. Avoid doing exports and module
- //work though if it just needs require.
- //REQUIRES the function to expect the CommonJS variables in the
- //order listed below.
- deps = (callback.length === 1 ? ['require'] : ['require', 'exports', 'module']).concat(deps);
- }
- }
-
- //If in IE 6-8 and hit an anonymous define() call, do the interactive
- //work.
- if (useInteractive) {
- node = currentlyAddingScript || getInteractiveScript();
- if (node) {
- if (!name) {
- name = node.getAttribute('data-requiremodule');
- }
- context = contexts[node.getAttribute('data-requirecontext')];
- }
- }
-
- //Always save off evaluating the def call until the script onload handler.
- //This allows multiple modules to be in a file without prematurely
- //tracing dependencies, and allows for anonymous module support,
- //where the module name is not known until the script onload event
- //occurs. If no context, use the global queue, and get it processed
- //in the onscript load callback.
- (context ? context.defQueue : globalDefQueue).push([name, deps, callback]);
- };
-
- define.amd = {
- jQuery: true
- };
-
-
- /**
- * Executes the text. Normally just uses eval, but can be modified
- * to use a better, environment-specific call. Only used for transpiling
- * loader plugins, not for plain JS modules.
- * @param {String} text the text to execute/evaluate.
- */
- req.exec = function (text) {
- /*jslint evil: true */
- return eval(text);
- };
-
- //Set up with config info.
- req(cfg);
-}(this));
diff --git a/src/common/lib/vendor/2amigos/yiiwheels/assets/js/spin.js b/src/common/lib/vendor/2amigos/yiiwheels/assets/js/spin.js
deleted file mode 100644
index 9cf3b7e..0000000
--- a/src/common/lib/vendor/2amigos/yiiwheels/assets/js/spin.js
+++ /dev/null
@@ -1,369 +0,0 @@
-// fgnass.github.com/spin.js#v1.2.6
-// usage: new Spinner({color:'#fff', lines: 12}).spin(target);
-!function(window, document, undefined) {
-
- /**
- * Copyright (c) 2011 Felix Gnass [fgnass at neteye dot de]
- * Licensed under the MIT license
- */
-
- var prefixes = ['webkit', 'Moz', 'ms', 'O'] /* Vendor prefixes */
- , animations = {} /* Animation rules keyed by their name */
- , useCssAnimations
-
- /**
- * Utility function to create elements. If no tag name is given,
- * a DIV is created. Optionally properties can be passed.
- */
- function createEl(tag, prop) {
- var el = document.createElement(tag || 'div')
- , n
-
- for(n in prop) el[n] = prop[n]
- return el
- }
-
- /**
- * Appends children and returns the parent.
- */
- function ins(parent /* child1, child2, ...*/) {
- for (var i=1, n=arguments.length; i> 1) : parseInt(o.left, 10) + mid) + 'px',
- top: (o.top == 'auto' ? tp.y-ep.y + (target.offsetHeight >> 1) : parseInt(o.top, 10) + mid) + 'px'
- })
- }
-
- el.setAttribute('aria-role', 'progressbar')
- self.lines(el, self.opts)
-
- if (!useCssAnimations) {
- // No CSS animation support, use setTimeout() instead
- var i = 0
- , fps = o.fps
- , f = fps/o.speed
- , ostep = (1-o.opacity) / (f*o.trail / 100)
- , astep = f/o.lines
-
- ;(function anim() {
- i++;
- for (var s=o.lines; s; s--) {
- var alpha = Math.max(1-(i+s*astep)%f * ostep, o.opacity)
- self.opacity(el, o.lines-s, alpha, o)
- }
- self.timeout = self.el && setTimeout(anim, ~~(1000/fps))
- })()
- }
- return self
- },
-
- stop: function() {
- var el = this.el
- if (el) {
- clearTimeout(this.timeout)
- if (el.parentNode) el.parentNode.removeChild(el)
- this.el = undefined
- }
- return this
- },
-
- lines: function(el, o) {
- var i = 0
- , seg
-
- function fill(color, shadow) {
- return css(createEl(), {
- position: 'absolute',
- width: (o.length+o.width) + 'px',
- height: o.width + 'px',
- background: color,
- boxShadow: shadow,
- transformOrigin: 'left',
- transform: 'rotate(' + ~~(360/o.lines*i+o.rotate) + 'deg) translate(' + o.radius+'px' +',0)',
- borderRadius: (o.corners * o.width>>1) + 'px'
- })
- }
-
- for (; i < o.lines; i++) {
- seg = css(createEl(), {
- position: 'absolute',
- top: 1+~(o.width/2) + 'px',
- transform: o.hwaccel ? 'translate3d(0,0,0)' : '',
- opacity: o.opacity,
- animation: useCssAnimations && addAnimation(o.opacity, o.trail, i, o.lines) + ' ' + 1/o.speed + 's linear infinite'
- })
-
- if (o.shadow) ins(seg, css(fill('#000', '0 0 4px ' + '#000'), {top: 2+'px'}))
-
- ins(el, ins(seg, fill(o.color, '0 0 1px rgba(0,0,0,.1)')))
- }
- return el
- },
-
- opacity: function(el, i, val) {
- if (i < el.childNodes.length) el.childNodes[i].style.opacity = val
- }
-
- })
-
- /////////////////////////////////////////////////////////////////////////
- // VML rendering for IE
- /////////////////////////////////////////////////////////////////////////
-
- /**
- * Check and init VML support
- */
- ;(function() {
-
- function vml(tag, attr) {
- return createEl('<' + tag + ' xmlns="urn:schemas-microsoft.com:vml" class="spin-vml">', attr)
- }
-
- var s = css(createEl('group'), {behavior: 'url(#default#VML)'})
-
- if (!vendor(s, 'transform') && s.adj) {
-
- // VML support detected. Insert CSS rule ...
- sheet.addRule('.spin-vml', 'behavior:url(#default#VML)')
-
- Spinner.prototype.lines = function(el, o) {
- var r = o.length+o.width
- , s = 2*r
-
- function grp() {
- return css(
- vml('group', {
- coordsize: s + ' ' + s,
- coordorigin: -r + ' ' + -r
- }),
- { width: s, height: s }
- )
- }
-
- var margin = -(o.width+o.length)*2 + 'px'
- , g = css(grp(), {position: 'absolute', top: margin, left: margin})
- , i
-
- function seg(i, dx, filter) {
- ins(g,
- ins(css(grp(), {rotation: 360 / o.lines * i + 'deg', left: ~~dx}),
- ins(css(vml('roundrect', {arcsize: o.corners}), {
- width: r,
- height: o.width,
- left: o.radius,
- top: -o.width>>1,
- filter: filter
- }),
- vml('fill', {color: o.color, opacity: o.opacity}),
- vml('stroke', {opacity: 0}) // transparent stroke to fix color bleeding upon opacity change
- )
- )
- )
- }
-
- if (o.shadow)
- for (i = 1; i <= o.lines; i++)
- seg(i, -2, 'progid:DXImageTransform.Microsoft.Blur(pixelradius=2,makeshadow=1,shadowopacity=.3)')
-
- for (i = 1; i <= o.lines; i++) seg(i)
- return ins(el, g)
- }
-
- Spinner.prototype.opacity = function(el, i, val, o) {
- var c = el.firstChild
- o = o.shadow && o.lines || 0
- if (c && i+o < c.childNodes.length) {
- c = c.childNodes[i+o]; c = c && c.firstChild; c = c && c.firstChild
- if (c) c.opacity = val
- }
- }
- }
- else
- useCssAnimations = vendor(s, 'animation')
- })()
-
- if (typeof define == 'function' && define.amd)
- define(function() { return Spinner })
- else
- window.Spinner = Spinner
-
-}(window, document);
-
-// include jquery plugin
-/*
-
- You can now create a spinner using any of the variants below:
-
- $("#el").spin(); // Produces default Spinner using the text color of #el.
- $("#el").spin("small"); // Produces a 'small' Spinner using the text color of #el.
- $("#el").spin("large", "white"); // Produces a 'large' Spinner in white (or any valid CSS color).
- $("#el").spin({ ... }); // Produces a Spinner using your custom settings.
-
- $("#el").spin(false); // Kills the spinner.
-
- */
-(function($) {
- $.fn.spin = function(opts, color) {
- var presets = {
- "tiny": { lines: 8, length: 2, width: 2, radius: 3 },
- "small": { lines: 8, length: 4, width: 3, radius: 5 },
- "large": { lines: 10, length: 8, width: 4, radius: 8 }
- };
- if (Spinner) {
- return this.each(function() {
- var $this = $(this),
- data = $this.data();
-
- if (data.spinner) {
- data.spinner.stop();
- delete data.spinner;
- }
- if (opts !== false) {
- if (typeof opts === "string") {
- if (opts in presets) {
- opts = presets[opts];
- } else {
- opts = {};
- }
- if (color) {
- opts.color = color;
- }
- }
- data.spinner = new Spinner($.extend({color: $this.css('color')}, opts)).spin(this);
- }
- });
- } else {
- throw "Spinner class not available.";
- }
- };
-})(jQuery);
\ No newline at end of file
diff --git a/src/common/lib/vendor/2amigos/yiiwheels/assets/js/underscore.min.js b/src/common/lib/vendor/2amigos/yiiwheels/assets/js/underscore.min.js
deleted file mode 100644
index c1d9d3a..0000000
--- a/src/common/lib/vendor/2amigos/yiiwheels/assets/js/underscore.min.js
+++ /dev/null
@@ -1 +0,0 @@
-(function(){var n=this,t=n._,r={},e=Array.prototype,u=Object.prototype,i=Function.prototype,a=e.push,o=e.slice,c=e.concat,l=u.toString,f=u.hasOwnProperty,s=e.forEach,p=e.map,h=e.reduce,v=e.reduceRight,d=e.filter,g=e.every,m=e.some,y=e.indexOf,b=e.lastIndexOf,x=Array.isArray,_=Object.keys,j=i.bind,w=function(n){return n instanceof w?n:this instanceof w?(this._wrapped=n,void 0):new w(n)};"undefined"!=typeof exports?("undefined"!=typeof module&&module.exports&&(exports=module.exports=w),exports._=w):n._=w,w.VERSION="1.4.4";var A=w.each=w.forEach=function(n,t,e){if(null!=n)if(s&&n.forEach===s)n.forEach(t,e);else if(n.length===+n.length){for(var u=0,i=n.length;i>u;u++)if(t.call(e,n[u],u,n)===r)return}else for(var a in n)if(w.has(n,a)&&t.call(e,n[a],a,n)===r)return};w.map=w.collect=function(n,t,r){var e=[];return null==n?e:p&&n.map===p?n.map(t,r):(A(n,function(n,u,i){e[e.length]=t.call(r,n,u,i)}),e)};var O="Reduce of empty array with no initial value";w.reduce=w.foldl=w.inject=function(n,t,r,e){var u=arguments.length>2;if(null==n&&(n=[]),h&&n.reduce===h)return e&&(t=w.bind(t,e)),u?n.reduce(t,r):n.reduce(t);if(A(n,function(n,i,a){u?r=t.call(e,r,n,i,a):(r=n,u=!0)}),!u)throw new TypeError(O);return r},w.reduceRight=w.foldr=function(n,t,r,e){var u=arguments.length>2;if(null==n&&(n=[]),v&&n.reduceRight===v)return e&&(t=w.bind(t,e)),u?n.reduceRight(t,r):n.reduceRight(t);var i=n.length;if(i!==+i){var a=w.keys(n);i=a.length}if(A(n,function(o,c,l){c=a?a[--i]:--i,u?r=t.call(e,r,n[c],c,l):(r=n[c],u=!0)}),!u)throw new TypeError(O);return r},w.find=w.detect=function(n,t,r){var e;return E(n,function(n,u,i){return t.call(r,n,u,i)?(e=n,!0):void 0}),e},w.filter=w.select=function(n,t,r){var e=[];return null==n?e:d&&n.filter===d?n.filter(t,r):(A(n,function(n,u,i){t.call(r,n,u,i)&&(e[e.length]=n)}),e)},w.reject=function(n,t,r){return w.filter(n,function(n,e,u){return!t.call(r,n,e,u)},r)},w.every=w.all=function(n,t,e){t||(t=w.identity);var u=!0;return null==n?u:g&&n.every===g?n.every(t,e):(A(n,function(n,i,a){return(u=u&&t.call(e,n,i,a))?void 0:r}),!!u)};var E=w.some=w.any=function(n,t,e){t||(t=w.identity);var u=!1;return null==n?u:m&&n.some===m?n.some(t,e):(A(n,function(n,i,a){return u||(u=t.call(e,n,i,a))?r:void 0}),!!u)};w.contains=w.include=function(n,t){return null==n?!1:y&&n.indexOf===y?n.indexOf(t)!=-1:E(n,function(n){return n===t})},w.invoke=function(n,t){var r=o.call(arguments,2),e=w.isFunction(t);return w.map(n,function(n){return(e?t:n[t]).apply(n,r)})},w.pluck=function(n,t){return w.map(n,function(n){return n[t]})},w.where=function(n,t,r){return w.isEmpty(t)?r?null:[]:w[r?"find":"filter"](n,function(n){for(var r in t)if(t[r]!==n[r])return!1;return!0})},w.findWhere=function(n,t){return w.where(n,t,!0)},w.max=function(n,t,r){if(!t&&w.isArray(n)&&n[0]===+n[0]&&65535>n.length)return Math.max.apply(Math,n);if(!t&&w.isEmpty(n))return-1/0;var e={computed:-1/0,value:-1/0};return A(n,function(n,u,i){var a=t?t.call(r,n,u,i):n;a>=e.computed&&(e={value:n,computed:a})}),e.value},w.min=function(n,t,r){if(!t&&w.isArray(n)&&n[0]===+n[0]&&65535>n.length)return Math.min.apply(Math,n);if(!t&&w.isEmpty(n))return 1/0;var e={computed:1/0,value:1/0};return A(n,function(n,u,i){var a=t?t.call(r,n,u,i):n;e.computed>a&&(e={value:n,computed:a})}),e.value},w.shuffle=function(n){var t,r=0,e=[];return A(n,function(n){t=w.random(r++),e[r-1]=e[t],e[t]=n}),e};var k=function(n){return w.isFunction(n)?n:function(t){return t[n]}};w.sortBy=function(n,t,r){var e=k(t);return w.pluck(w.map(n,function(n,t,u){return{value:n,index:t,criteria:e.call(r,n,t,u)}}).sort(function(n,t){var r=n.criteria,e=t.criteria;if(r!==e){if(r>e||r===void 0)return 1;if(e>r||e===void 0)return-1}return n.indexi;){var o=i+a>>>1;u>r.call(e,n[o])?i=o+1:a=o}return i},w.toArray=function(n){return n?w.isArray(n)?o.call(n):n.length===+n.length?w.map(n,w.identity):w.values(n):[]},w.size=function(n){return null==n?0:n.length===+n.length?n.length:w.keys(n).length},w.first=w.head=w.take=function(n,t,r){return null==n?void 0:null==t||r?n[0]:o.call(n,0,t)},w.initial=function(n,t,r){return o.call(n,0,n.length-(null==t||r?1:t))},w.last=function(n,t,r){return null==n?void 0:null==t||r?n[n.length-1]:o.call(n,Math.max(n.length-t,0))},w.rest=w.tail=w.drop=function(n,t,r){return o.call(n,null==t||r?1:t)},w.compact=function(n){return w.filter(n,w.identity)};var R=function(n,t,r){return A(n,function(n){w.isArray(n)?t?a.apply(r,n):R(n,t,r):r.push(n)}),r};w.flatten=function(n,t){return R(n,t,[])},w.without=function(n){return w.difference(n,o.call(arguments,1))},w.uniq=w.unique=function(n,t,r,e){w.isFunction(t)&&(e=r,r=t,t=!1);var u=r?w.map(n,r,e):n,i=[],a=[];return A(u,function(r,e){(t?e&&a[a.length-1]===r:w.contains(a,r))||(a.push(r),i.push(n[e]))}),i},w.union=function(){return w.uniq(c.apply(e,arguments))},w.intersection=function(n){var t=o.call(arguments,1);return w.filter(w.uniq(n),function(n){return w.every(t,function(t){return w.indexOf(t,n)>=0})})},w.difference=function(n){var t=c.apply(e,o.call(arguments,1));return w.filter(n,function(n){return!w.contains(t,n)})},w.zip=function(){for(var n=o.call(arguments),t=w.max(w.pluck(n,"length")),r=Array(t),e=0;t>e;e++)r[e]=w.pluck(n,""+e);return r},w.object=function(n,t){if(null==n)return{};for(var r={},e=0,u=n.length;u>e;e++)t?r[n[e]]=t[e]:r[n[e][0]]=n[e][1];return r},w.indexOf=function(n,t,r){if(null==n)return-1;var e=0,u=n.length;if(r){if("number"!=typeof r)return e=w.sortedIndex(n,t),n[e]===t?e:-1;e=0>r?Math.max(0,u+r):r}if(y&&n.indexOf===y)return n.indexOf(t,r);for(;u>e;e++)if(n[e]===t)return e;return-1},w.lastIndexOf=function(n,t,r){if(null==n)return-1;var e=null!=r;if(b&&n.lastIndexOf===b)return e?n.lastIndexOf(t,r):n.lastIndexOf(t);for(var u=e?r:n.length;u--;)if(n[u]===t)return u;return-1},w.range=function(n,t,r){1>=arguments.length&&(t=n||0,n=0),r=arguments[2]||1;for(var e=Math.max(Math.ceil((t-n)/r),0),u=0,i=Array(e);e>u;)i[u++]=n,n+=r;return i},w.bind=function(n,t){if(n.bind===j&&j)return j.apply(n,o.call(arguments,1));var r=o.call(arguments,2);return function(){return n.apply(t,r.concat(o.call(arguments)))}},w.partial=function(n){var t=o.call(arguments,1);return function(){return n.apply(this,t.concat(o.call(arguments)))}},w.bindAll=function(n){var t=o.call(arguments,1);return 0===t.length&&(t=w.functions(n)),A(t,function(t){n[t]=w.bind(n[t],n)}),n},w.memoize=function(n,t){var r={};return t||(t=w.identity),function(){var e=t.apply(this,arguments);return w.has(r,e)?r[e]:r[e]=n.apply(this,arguments)}},w.delay=function(n,t){var r=o.call(arguments,2);return setTimeout(function(){return n.apply(null,r)},t)},w.defer=function(n){return w.delay.apply(w,[n,1].concat(o.call(arguments,1)))},w.throttle=function(n,t){var r,e,u,i,a=0,o=function(){a=new Date,u=null,i=n.apply(r,e)};return function(){var c=new Date,l=t-(c-a);return r=this,e=arguments,0>=l?(clearTimeout(u),u=null,a=c,i=n.apply(r,e)):u||(u=setTimeout(o,l)),i}},w.debounce=function(n,t,r){var e,u;return function(){var i=this,a=arguments,o=function(){e=null,r||(u=n.apply(i,a))},c=r&&!e;return clearTimeout(e),e=setTimeout(o,t),c&&(u=n.apply(i,a)),u}},w.once=function(n){var t,r=!1;return function(){return r?t:(r=!0,t=n.apply(this,arguments),n=null,t)}},w.wrap=function(n,t){return function(){var r=[n];return a.apply(r,arguments),t.apply(this,r)}},w.compose=function(){var n=arguments;return function(){for(var t=arguments,r=n.length-1;r>=0;r--)t=[n[r].apply(this,t)];return t[0]}},w.after=function(n,t){return 0>=n?t():function(){return 1>--n?t.apply(this,arguments):void 0}},w.keys=_||function(n){if(n!==Object(n))throw new TypeError("Invalid object");var t=[];for(var r in n)w.has(n,r)&&(t[t.length]=r);return t},w.values=function(n){var t=[];for(var r in n)w.has(n,r)&&t.push(n[r]);return t},w.pairs=function(n){var t=[];for(var r in n)w.has(n,r)&&t.push([r,n[r]]);return t},w.invert=function(n){var t={};for(var r in n)w.has(n,r)&&(t[n[r]]=r);return t},w.functions=w.methods=function(n){var t=[];for(var r in n)w.isFunction(n[r])&&t.push(r);return t.sort()},w.extend=function(n){return A(o.call(arguments,1),function(t){if(t)for(var r in t)n[r]=t[r]}),n},w.pick=function(n){var t={},r=c.apply(e,o.call(arguments,1));return A(r,function(r){r in n&&(t[r]=n[r])}),t},w.omit=function(n){var t={},r=c.apply(e,o.call(arguments,1));for(var u in n)w.contains(r,u)||(t[u]=n[u]);return t},w.defaults=function(n){return A(o.call(arguments,1),function(t){if(t)for(var r in t)null==n[r]&&(n[r]=t[r])}),n},w.clone=function(n){return w.isObject(n)?w.isArray(n)?n.slice():w.extend({},n):n},w.tap=function(n,t){return t(n),n};var I=function(n,t,r,e){if(n===t)return 0!==n||1/n==1/t;if(null==n||null==t)return n===t;n instanceof w&&(n=n._wrapped),t instanceof w&&(t=t._wrapped);var u=l.call(n);if(u!=l.call(t))return!1;switch(u){case"[object String]":return n==t+"";case"[object Number]":return n!=+n?t!=+t:0==n?1/n==1/t:n==+t;case"[object Date]":case"[object Boolean]":return+n==+t;case"[object RegExp]":return n.source==t.source&&n.global==t.global&&n.multiline==t.multiline&&n.ignoreCase==t.ignoreCase}if("object"!=typeof n||"object"!=typeof t)return!1;for(var i=r.length;i--;)if(r[i]==n)return e[i]==t;r.push(n),e.push(t);var a=0,o=!0;if("[object Array]"==u){if(a=n.length,o=a==t.length)for(;a--&&(o=I(n[a],t[a],r,e)););}else{var c=n.constructor,f=t.constructor;if(c!==f&&!(w.isFunction(c)&&c instanceof c&&w.isFunction(f)&&f instanceof f))return!1;for(var s in n)if(w.has(n,s)&&(a++,!(o=w.has(t,s)&&I(n[s],t[s],r,e))))break;if(o){for(s in t)if(w.has(t,s)&&!a--)break;o=!a}}return r.pop(),e.pop(),o};w.isEqual=function(n,t){return I(n,t,[],[])},w.isEmpty=function(n){if(null==n)return!0;if(w.isArray(n)||w.isString(n))return 0===n.length;for(var t in n)if(w.has(n,t))return!1;return!0},w.isElement=function(n){return!(!n||1!==n.nodeType)},w.isArray=x||function(n){return"[object Array]"==l.call(n)},w.isObject=function(n){return n===Object(n)},A(["Arguments","Function","String","Number","Date","RegExp"],function(n){w["is"+n]=function(t){return l.call(t)=="[object "+n+"]"}}),w.isArguments(arguments)||(w.isArguments=function(n){return!(!n||!w.has(n,"callee"))}),"function"!=typeof/./&&(w.isFunction=function(n){return"function"==typeof n}),w.isFinite=function(n){return isFinite(n)&&!isNaN(parseFloat(n))},w.isNaN=function(n){return w.isNumber(n)&&n!=+n},w.isBoolean=function(n){return n===!0||n===!1||"[object Boolean]"==l.call(n)},w.isNull=function(n){return null===n},w.isUndefined=function(n){return n===void 0},w.has=function(n,t){return f.call(n,t)},w.noConflict=function(){return n._=t,this},w.identity=function(n){return n},w.times=function(n,t,r){for(var e=Array(n),u=0;n>u;u++)e[u]=t.call(r,u);return e},w.random=function(n,t){return null==t&&(t=n,n=0),n+Math.floor(Math.random()*(t-n+1))};var M={escape:{"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"}};M.unescape=w.invert(M.escape);var S={escape:RegExp("["+w.keys(M.escape).join("")+"]","g"),unescape:RegExp("("+w.keys(M.unescape).join("|")+")","g")};w.each(["escape","unescape"],function(n){w[n]=function(t){return null==t?"":(""+t).replace(S[n],function(t){return M[n][t]})}}),w.result=function(n,t){if(null==n)return null;var r=n[t];return w.isFunction(r)?r.call(n):r},w.mixin=function(n){A(w.functions(n),function(t){var r=w[t]=n[t];w.prototype[t]=function(){var n=[this._wrapped];return a.apply(n,arguments),D.call(this,r.apply(w,n))}})};var N=0;w.uniqueId=function(n){var t=++N+"";return n?n+t:t},w.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var T=/(.)^/,q={"'":"'","\\":"\\","\r":"r","\n":"n"," ":"t","\u2028":"u2028","\u2029":"u2029"},B=/\\|'|\r|\n|\t|\u2028|\u2029/g;w.template=function(n,t,r){var e;r=w.defaults({},r,w.templateSettings);var u=RegExp([(r.escape||T).source,(r.interpolate||T).source,(r.evaluate||T).source].join("|")+"|$","g"),i=0,a="__p+='";n.replace(u,function(t,r,e,u,o){return a+=n.slice(i,o).replace(B,function(n){return"\\"+q[n]}),r&&(a+="'+\n((__t=("+r+"))==null?'':_.escape(__t))+\n'"),e&&(a+="'+\n((__t=("+e+"))==null?'':__t)+\n'"),u&&(a+="';\n"+u+"\n__p+='"),i=o+t.length,t}),a+="';\n",r.variable||(a="with(obj||{}){\n"+a+"}\n"),a="var __t,__p='',__j=Array.prototype.join,"+"print=function(){__p+=__j.call(arguments,'');};\n"+a+"return __p;\n";try{e=Function(r.variable||"obj","_",a)}catch(o){throw o.source=a,o}if(t)return e(t,w);var c=function(n){return e.call(this,n,w)};return c.source="function("+(r.variable||"obj")+"){\n"+a+"}",c},w.chain=function(n){return w(n).chain()};var D=function(n){return this._chain?w(n).chain():n};w.mixin(w),A(["pop","push","reverse","shift","sort","splice","unshift"],function(n){var t=e[n];w.prototype[n]=function(){var r=this._wrapped;return t.apply(r,arguments),"shift"!=n&&"splice"!=n||0!==r.length||delete r[0],D.call(this,r)}}),A(["concat","join","slice"],function(n){var t=e[n];w.prototype[n]=function(){return D.call(this,t.apply(this._wrapped,arguments))}}),w.extend(w.prototype,{chain:function(){return this._chain=!0,this},value:function(){return this._wrapped}})}).call(this);
\ No newline at end of file
diff --git a/src/common/lib/vendor/2amigos/yiiwheels/behaviors/WhPlugin.php b/src/common/lib/vendor/2amigos/yiiwheels/behaviors/WhPlugin.php
deleted file mode 100644
index 569cd11..0000000
--- a/src/common/lib/vendor/2amigos/yiiwheels/behaviors/WhPlugin.php
+++ /dev/null
@@ -1,59 +0,0 @@
-
- * @copyright Copyright © Antonio Ramirez 2013-
- * @license http://www.opensource.org/licenses/bsd-license.php New BSD License
- * @package yiiwheels.behaviors
- */
-class WhPlugin extends CBehavior
-{
- protected $_assetsUrl;
-
- protected static $_api;
-
- protected static $_wheels;
-
- /**
- * Returns
- * @param $path
- * @return mixed
- */
- public function getAssetsUrl($path)
- {
- if (isset($this->_assetsUrl)) {
- return $this->_assetsUrl;
- } else {
- $forceCopyAssets = $this->getApi()->forceCopyAssets;
-
- $assetsUrl = Yii::app()->assetManager->publish($path, false, -1, $forceCopyAssets);
-
- return $this->_assetsUrl = $assetsUrl;
- }
- }
-
- /**
- * @return TbApi
- */
- public function getApi()
- {
- if (self::$_api === null) {
- self::$_api = self::getYiiWheels()->getApi();
- }
- return self::$_api;
- }
-
- /**
- * Returns the main component
- * @return YiiWheels
- */
- public function getYiiWheels()
- {
- if (self::$_wheels === null) {
- self::$_wheels = Yii::app()->getComponent('yiiwheels');
- }
- return self::$_wheels;
- }
-}
\ No newline at end of file
diff --git a/src/common/lib/vendor/2amigos/yiiwheels/composer.json b/src/common/lib/vendor/2amigos/yiiwheels/composer.json
deleted file mode 100644
index d12f00b..0000000
--- a/src/common/lib/vendor/2amigos/yiiwheels/composer.json
+++ /dev/null
@@ -1,23 +0,0 @@
-{
- "name": "2amigos/yiiwheels",
- "description": "Extension library for Yiistrap, Yii Twitter's Bootstrap.",
- "keywords": ["bootstrap"],
- "type": "yii-extension",
- "license": "BSD-3-Clause",
- "authors": [
- {
- "name": "Antonio Ramirez",
- "email": "ramirez.cobos@gmail.com",
- "homepage": "http://www.ramirezcobos.com/"
- }
- ],
- "repositories": [
- {
- "type": "composer",
- "url": "http://packages.phundament.com"
- }
- ],
- "require": {
- "2amigos/yiistrap": "dev-master"
- }
-}
diff --git a/src/common/lib/vendor/2amigos/yiiwheels/helpers/WhHtml.php b/src/common/lib/vendor/2amigos/yiiwheels/helpers/WhHtml.php
deleted file mode 100644
index 7acf716..0000000
--- a/src/common/lib/vendor/2amigos/yiiwheels/helpers/WhHtml.php
+++ /dev/null
@@ -1,327 +0,0 @@
-
- * @copyright Copyright © Antonio Ramirez 2013-
- * @license http://www.opensource.org/licenses/bsd-license.php New BSD License
- * @package yiiwheels.helpers
- */
-class WhHtml extends TbHtml
-{
- const INPUT_DATEPICKER = 'datePickerRow';
- const INPUT_TIMEPICKER = 'timePickerRow';
- const INPUT_SELECT2 = 'select2Row';
- const INPUT_TYPEAHEAD = 'typeAheadRow';
- const INPUT_MULTISELECT = 'multiSelectRow';
- const INPUT_MASKMONEY = 'maskMoneyRow';
- const INPUT_REDACTOR = 'redactorRow';
-
- static $validInputs = array(
- self::INPUT_TYPEAHEAD => 'bootstrap.widgets.TbTypeAhead',
- self::INPUT_DATEPICKER => 'yiiwheels.widgets.datepicker.WhDatePicker',
- self::INPUT_TIMEPICKER => 'yiiwheels.widgets.timepicker.WhTimePicker',
- self::INPUT_SELECT2 => 'yiiwheels.widgets.select2.WhSelect2',
- self::INPUT_MULTISELECT => 'yiiwheels.widgets.multiselect.WhMultiSelect',
- self::INPUT_MASKMONEY => 'yiiwheels.widgets.maskmoney.WhMaskMoney',
- self::INPUT_REDACTOR => 'yiiwheels.widgets.redactor.WhRedactor'
- );
-
- static $configurationOptions = array(
- self::INPUT_DATEPICKER => array('pluginOptions', 'events'),
- self::INPUT_TIMEPICKER => array('pluginOptions', 'events'),
- self::INPUT_TYPEAHEAD => array('source', 'items', 'matcher', 'sorter', 'updater', 'minLength', 'highlighter'),
- self::INPUT_SELECT2 => array('pluginOptions', 'events', 'asDropDownList', 'language', 'data'),
- self::INPUT_MULTISELECT => array('pluginOptions', 'events', 'data'),
- self::INPUT_MASKMONEY => array('pluginOptions'),
- self::INPUT_REDACTOR => array('pluginOptions', 'debugMode')
- );
-
- /**
- * @return mixed
- */
- public static function validInputs()
- {
- return array_merge(parent::$inputs, array_keys(self::$validInputs));
- }
-
- /**
- * Renders a datepicker field
- * @param $name
- * @param string $value
- * @param array $htmlOptions
- * @return string
- */
- public static function datePickerRow($name, $value = '', $htmlOptions = array())
- {
- $defaultOptions = array('name' => $name, 'value' => $value);
-
- $widgetOptions = self::getWidgetConfigurationOptions(self::INPUT_DATEPICKER, $htmlOptions, $defaultOptions);
-
- return self::widget(self::getWidgetPath(self::INPUT_DATEPICKER), $widgetOptions);
- }
-
- /**
- * Renders a timepicker field
- * @param $name
- * @param string $value
- * @param array $htmlOptions
- * @return string
- */
- public static function timePickerRow($name, $value = '', $htmlOptions = array())
- {
- $defaultOptions = array('name' => $name, 'value' => $value);
-
- $htmlOptions = self::addClassName('bootstrap-timepicker', $htmlOptions);
-
- $widgetOptions = self::getWidgetConfigurationOptions(self::INPUT_TIMEPICKER, $htmlOptions, $defaultOptions);
-
- return self::widget(self::getWidgetPath(self::INPUT_TIMEPICKER), $widgetOptions);
- }
-
- /**
- * Renders a typeahead field
- * @param string $name
- * @param string $value
- * @param array $htmlOptions additional attributes of the HTML element. Special attributes are supported.
- * @see YiiStrap.TbTypeAhead for information about the special attributes.
- * @return string
- */
- public static function typeAheadRow($name, $value = '', $htmlOptions = array())
- {
- $defaultOptions = array('name' => $name, 'value' => $value);
-
- $widgetOptions = self::getWidgetConfigurationOptions(self::INPUT_TYPEAHEAD, $htmlOptions, $defaultOptions);
-
- return self::widget(self::getWidgetPath(self::INPUT_TYPEAHEAD), $widgetOptions);
- }
-
- /**
- * Renders a select2 field
- * @param $name
- * @param string $value
- * @param array $htmlOptions
- * @return string
- */
- public static function select2Row($name, $value = '', $htmlOptions = array())
- {
- $defaultOptions = array('name' => $name, 'value' => $value);
-
- $widgetOptions = self::getWidgetConfigurationOptions(self::INPUT_SELECT2, $htmlOptions, $defaultOptions);
-
- return self::widget(self::getWidgetPath(self::INPUT_SELECT2), $widgetOptions);
- }
-
- /**
- * Renders a multiselect field
- * @param $name
- * @param string $value
- * @param array $htmlOptions
- * @return string
- */
- public static function multiSelectRow($name, $value = '', $htmlOptions = array())
- {
- $defaultOptions = array('name' => $name, 'value' => $value);
-
- $widgetOptions = self::getWidgetConfigurationOptions(self::INPUT_MULTISELECT, $htmlOptions, $defaultOptions);
-
- return self::widget(self::getWidgetPath(self::INPUT_MULTISELECT), $widgetOptions);
- }
-
- /**
- * Renders a maskmoney field
- * @param $name
- * @param string $value
- * @param array $htmlOptions
- * @return string
- */
- public static function maskMoneyRow($name, $value = '', $htmlOptions = array())
- {
- $defaultOptions = array('name' => $name, 'value' => $value);
-
- $widgetOptions = self::getWidgetConfigurationOptions(self::INPUT_MASKMONEY, $htmlOptions, $defaultOptions);
-
- return self::widget(self::getWidgetPath(self::INPUT_MASKMONEY), $widgetOptions);
- }
-
- /**
- * Renders a redactor field
- * @param $name
- * @param string $value
- * @param array $htmlOptions
- * @return string
- */
- public static function redactorRow($name, $value = '', $htmlOptions = array())
- {
- $defaultOptions = array('name' => $name, 'value' => $value);
-
- $widgetOptions = self::getWidgetConfigurationOptions(self::INPUT_REDACTOR, $htmlOptions, $defaultOptions);
-
- return self::widget(self::getWidgetPath(self::INPUT_REDACTOR), $widgetOptions);
- }
-
- // Active Fields
- /**
- * Renders an active datepicker field
- * @param $model
- * @param $attribute
- * @param array $htmlOptions
- * @return string
- */
- public static function activeDatePickerRow($model, $attribute, $htmlOptions = array())
- {
- $defaultOptions = array('model' => $model, 'attribute' => $attribute);
-
- $widgetOptions = self::getWidgetConfigurationOptions(self::INPUT_DATEPICKER, $htmlOptions, $defaultOptions);
-
- return self::widget(self::getWidgetPath(self::INPUT_DATEPICKER), $widgetOptions);
- }
-
- /**
- * Renders an activeTimePickerRow
- * @param $model
- * @param $attribute
- * @param array $htmlOptions
- * @return string
- */
- public static function activeTimePickerRow($model, $attribute, $htmlOptions = array())
- {
- $defaultOptions = array('model' => $model, 'attribute' => $attribute);
-
- $htmlOptions = self::addClassName('bootstrap-timepicker', $htmlOptions);
-
- $widgetOptions = self::getWidgetConfigurationOptions(self::INPUT_TIMEPICKER, $htmlOptions, $defaultOptions);
-
- return self::widget(self::getWidgetPath(self::INPUT_TIMEPICKER), $widgetOptions);
- }
-
- /**
- * Renders and active typeahead field
- * @param CActiveRecord $model
- * @param string $attribute
- * @param array $htmlOptions additional attributes of the HTML element. Special attributes are supported.
- * @see YiiStrap.TbTypeAhead for information about the special attributes.
- * @return string
- */
- public static function activeTypeAheadRow($model, $attribute, $htmlOptions = array())
- {
- $defaultOptions = array('model' => $model, 'attribute' => $attribute);
-
- $widgetOptions = self::getWidgetConfigurationOptions(self::INPUT_TYPEAHEAD, $htmlOptions, $defaultOptions);
-
- return self::widget(self::getWidgetPath(self::INPUT_TYPEAHEAD), $widgetOptions);
- }
-
- /**
- * Renders an active select2
- * @param CActiveRecord $model
- * @param string $attribute
- * @param array $htmlOptions additional attributes of the HTML element. Special attributes are supported.
- * @see YiiStrap.TbTypeAhead for information about the special attributes.
- * @return string
- */
- public static function activeSelect2Row($model, $attribute, $htmlOptions = array())
- {
- $defaultOptions = array('model' => $model, 'attribute' => $attribute);
-
- $widgetOptions = self::getWidgetConfigurationOptions(self::INPUT_SELECT2, $htmlOptions, $defaultOptions);
-
- return self::widget(self::getWidgetPath(self::INPUT_SELECT2), $widgetOptions);
- }
-
- /**
- * Renders an active multi select field
- * @param CActiveRecord $model
- * @param string $attribute
- * @param array $htmlOptions additional attributes of the HTML element. Special attributes are supported.
- * @see YiiStrap.TbTypeAhead for information about the special attributes.
- * @return string
- */
- public static function activeMultiSelectRow($model, $attribute, $htmlOptions = array())
- {
- $defaultOptions = array('model' => $model, 'attribute' => $attribute);
-
- $widgetOptions = self::getWidgetConfigurationOptions(self::INPUT_MULTISELECT, $htmlOptions, $defaultOptions);
-
- return self::widget(self::getWidgetPath(self::INPUT_MULTISELECT), $widgetOptions);
- }
-
- /**
- * Renders an active mask money field
- * @param CActiveRecord $model
- * @param string $attribute
- * @param array $htmlOptions additional attributes of the HTML element. Special attributes are supported.
- * @see YiiStrap.TbTypeAhead for information about the special attributes.
- * @return string
- */
- public static function activeMaskMoneyRow($model, $attribute, $htmlOptions = array())
- {
- $defaultOptions = array('model' => $model, 'attribute' => $attribute);
-
- $widgetOptions = self::getWidgetConfigurationOptions(self::INPUT_MASKMONEY, $htmlOptions, $defaultOptions);
-
- return self::widget(self::getWidgetPath(self::INPUT_MASKMONEY), $widgetOptions);
- }
-
- /**
- * Renders an active redactor field
- * @param CActiveRecord $model
- * @param string $attribute
- * @param array $htmlOptions additional attributes of the HTML element. Special attributes are supported.
- * @see YiiStrap.TbTypeAhead for information about the special attributes.
- * @return string
- */
- public static function activeRedactorRow($model, $attribute, $htmlOptions = array())
- {
- $defaultOptions = array('model' => $model, 'attribute' => $attribute);
-
- $widgetOptions = self::getWidgetConfigurationOptions(self::INPUT_REDACTOR, $htmlOptions, $defaultOptions);
-
- return self::widget(self::getWidgetPath(self::INPUT_REDACTOR), $widgetOptions);
- }
-
- // Utility methods
- /**
- * Gets a specific widget path
- * @param $widget
- * @return null
- */
- public static function getWidgetPath($widget)
- {
- return array_key_exists($widget, self::$validInputs) ? self::$validInputs[$widget] : null;
- }
-
- /**
- * Renders a widget
- * @param $widget
- * @param array $widgetOptions
- * @return string
- */
- public static function widget($widget, $widgetOptions = array())
- {
- ob_start();
- Yii::app()->getController()->widget($widget, $widgetOptions);
- return ob_get_clean();
- }
-
- /**
- * Extracts widget configuration options from array of htmlOptions
- * @param string $widget the widget name
- * @param array $htmlOptions additional HTML options
- * @param array $options the default widget options
- * @return array
- */
- protected static function getWidgetConfigurationOptions($widget, $htmlOptions, $options = array())
- {
- $configurationOptions = self::$configurationOptions[$widget];
-
- $options = self::moveOptions(
- $configurationOptions,
- $htmlOptions,
- $options);
-
- $options['htmlOptions'] = self::removeOptions($htmlOptions, $configurationOptions);
-
- return $options;
- }
-}
\ No newline at end of file
diff --git a/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/WhAceEditor.php b/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/WhAceEditor.php
deleted file mode 100644
index 5a419c5..0000000
--- a/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/WhAceEditor.php
+++ /dev/null
@@ -1,135 +0,0 @@
-
- * @author Matt Tabin
- * @copyright Copyright © 2amigos.us 2013-
- * @license http://www.opensource.org/licenses/bsd-license.php New BSD License
- * @package YiiWheels.widgets.ace
- * @uses YiiWheels.helpers.WhHtml
- */
-Yii::import('yiiwheels.helpers.WhHtml');
-
-class WhAceEditor extends CInputWidget
-{
- /**
- * @var string the theme
- */
- public $theme = 'clouds';
-
- /**
- * @var string the editor mode
- */
- public $mode = 'html';
-
- /**
- * @var array the options for the ace editor
- */
- public $pluginOptions = array();
-
- /**
- * @var string[] the JavaScript event handlers.
- */
- public $events = array();
-
- /**
- * Initializes the widget.
- */
- public function init()
- {
- if (empty($this->theme)) {
- throw new CException(Yii::t(
- 'zii',
- '"{attribute}" cannot be empty.',
- array('{attribute}' => 'theme')
- ));
- }
-
- if (empty($this->mode)) {
- throw new CException(Yii::t(
- 'zii',
- '"{attribute}" cannot be empty.',
- array('{attribute}' => 'mode')
- ));
- }
-
- $this->attachBehavior('ywplugin', array('class' => 'yiiwheels.behaviors.WhPlugin'));
- }
-
- /**
- * Runs the widget.
- */
- public function run()
- {
- $this->renderField();
- $this->registerClientScript();
- }
-
- /**
- * Renders field
- */
- public function renderField()
- {
- list($name, $id) = $this->resolveNameID();
-
- $this->htmlOptions = WhHtml::defaultOption('id', $id, $this->htmlOptions);
- $this->htmlOptions = WhHtml::defaultOption('name', $name, $this->htmlOptions);
-
- $tagOptions = $this->htmlOptions;
-
- $tagOptions['id'] = 'aceEditor_' . $tagOptions['id'];
-
- echo WhHtml::tag('div', $tagOptions);
-
- $this->htmlOptions['style'] = 'display:none';
-
- if ($this->hasModel()) {
- echo WhHtml::activeTextArea($this->model, $this->attribute, $this->htmlOptions);
- } else {
- echo WhHtml::textArea($name, $this->value, $this->htmlOptions);
- }
-
- $this->htmlOptions = $tagOptions;
- }
-
- /**
- * Registers required client script for bootstrap ace editor.
- */
- public function registerClientScript()
- {
- /* publish assets dir */
- $path = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'assets';
- $assetsUrl = $this->getAssetsUrl($path);
-
- /* @var $cs CClientScript */
- $cs = Yii::app()->getClientScript();
-
- $cs->registerScriptFile($assetsUrl . '/js/ace.js');
-
- $id = WhHtml::getOption('id', $this->htmlOptions, $this->getId());
-
- /* Global value that will hold the editor */
- $cs->registerScript(uniqid(__CLASS__ . '#' . $id, true), 'var ' . $id . ';', CClientScript::POS_HEAD);
-
- ob_start();
- /* initialize plugin */
- $selector = WhHtml::getOption('id', $this->htmlOptions, $this->getId());
-
- echo $selector . '= ace.edit("' . $id . '");' . PHP_EOL;
- echo $selector . '.setTheme("ace/theme/' . $this->theme . '");' . PHP_EOL;
- echo $selector . '.getSession().setMode("ace/mode/' . $this->mode . '");' . PHP_EOL;
-
- if (!empty($this->events) && is_array($this->events)) {
- foreach ($this->events as $name => $handler) {
- $handler = ($handler instanceof CJavaScriptExpression)
- ? $handler
- : new CJavaScriptExpression($handler);
-
- echo $id . ".getSession().on('{$name}', {$handler});" . PHP_EOL;
- }
- }
-
- $cs->registerScript(uniqid(__CLASS__ . '#ReadyJS' . $id, true), ob_get_clean());
- }
-}
\ No newline at end of file
diff --git a/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/ace.js b/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/ace.js
deleted file mode 100644
index 4a1df99..0000000
--- a/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/ace.js
+++ /dev/null
@@ -1,5608 +0,0 @@
-(function () {
- function o(e) {
- var i = function (e, t) {
- return r("", e, t)
- }, s = t;
- e && (t[e] || (t[e] = {}), s = t[e]);
- if (!s.define || !s.define.packaged)n.original = s.define, s.define = n, s.define.packaged = !0;
- if (!s.require || !s.require.packaged)r.original = s.require, s.require = i, s.require.packaged = !0
- }
-
- var e = "ace", t = function () {
- return this
- }();
- if (!e && typeof requirejs != "undefined")return;
- var n = function (e, t, r) {
- if (typeof e != "string") {
- n.original ? n.original.apply(window, arguments) : (console.error("dropping module because define wasn't a string."), console.trace());
- return
- }
- arguments.length == 2 && (r = t), n.modules || (n.modules = {}), n.modules[e] = r
- }, r = function (e, t, n) {
- if (Object.prototype.toString.call(t) === "[object Array]") {
- var i = [];
- for (var o = 0, u = t.length; o < u; ++o) {
- var a = s(e, t[o]);
- if (!a && r.original)return r.original.apply(window, arguments);
- i.push(a)
- }
- n && n.apply(null, i)
- } else {
- if (typeof t == "string") {
- var f = s(e, t);
- return!f && r.original ? r.original.apply(window, arguments) : (n && n(), f)
- }
- if (r.original)return r.original.apply(window, arguments)
- }
- }, i = function (e, t) {
- if (t.indexOf("!") !== -1) {
- var n = t.split("!");
- return i(e, n[0]) + "!" + i(e, n[1])
- }
- if (t.charAt(0) == ".") {
- var r = e.split("/").slice(0, -1).join("/");
- t = r + "/" + t;
- while (t.indexOf(".") !== -1 && s != t) {
- var s = t;
- t = t.replace(/\/\.\//, "/").replace(/[^\/]+\/\.\.\//, "")
- }
- }
- return t
- }, s = function (e, t) {
- t = i(e, t);
- var s = n.modules[t];
- if (!s)return null;
- if (typeof s == "function") {
- var o = {}, u = {id: t, uri: "", exports: o, packaged: !0}, a = function (e, n) {
- return r(t, e, n)
- }, f = s(a, o, u);
- return o = f || u.exports, n.modules[t] = o, o
- }
- return s
- };
- o(e)
-})(), ace.define("ace/ace", ["require", "exports", "module", "ace/lib/fixoldbrowsers", "ace/lib/dom", "ace/lib/event", "ace/editor", "ace/edit_session", "ace/undomanager", "ace/virtual_renderer", "ace/multi_select", "ace/worker/worker_client", "ace/keyboard/hash_handler", "ace/placeholder", "ace/mode/folding/fold_mode", "ace/config"], function (e, t, n) {
- e("./lib/fixoldbrowsers");
- var r = e("./lib/dom"), i = e("./lib/event"), s = e("./editor").Editor, o = e("./edit_session").EditSession, u = e("./undomanager").UndoManager, a = e("./virtual_renderer").VirtualRenderer, f = e("./multi_select").MultiSelect;
- e("./worker/worker_client"), e("./keyboard/hash_handler"), e("./placeholder"), e("./mode/folding/fold_mode"), t.config = e("./config"), t.require = e, t.edit = function (e) {
- if (typeof e == "string") {
- var n = e, e = document.getElementById(n);
- if (!e)throw"ace.edit can't find div #" + n
- }
- if (e.env && e.env.editor instanceof s)return e.env.editor;
- var o = t.createEditSession(r.getInnerText(e));
- e.innerHTML = "";
- var u = new s(new a(e));
- new f(u), u.setSession(o);
- var l = {document: o, editor: u, onResize: u.resize.bind(u)};
- return i.addListener(window, "resize", l.onResize), e.env = u.env = l, u
- }, t.createEditSession = function (e, t) {
- var n = new o(e, n);
- return n.setUndoManager(new u), n
- }, t.EditSession = o, t.UndoManager = u
-}), ace.define("ace/lib/fixoldbrowsers", ["require", "exports", "module", "ace/lib/regexp", "ace/lib/es5-shim"], function (e, t, n) {
- e("./regexp"), e("./es5-shim")
-}), ace.define("ace/lib/regexp", ["require", "exports", "module"], function (e, t, n) {
- function o(e) {
- return(e.global ? "g" : "") + (e.ignoreCase ? "i" : "") + (e.multiline ? "m" : "") + (e.extended ? "x" : "") + (e.sticky ? "y" : "")
- }
-
- function u(e, t, n) {
- if (Array.prototype.indexOf)return e.indexOf(t, n);
- for (var r = n || 0; r < e.length; r++)if (e[r] === t)return r;
- return-1
- }
-
- var r = {exec: RegExp.prototype.exec, test: RegExp.prototype.test, match: String.prototype.match, replace: String.prototype.replace, split: String.prototype.split}, i = r.exec.call(/()??/, "")[1] === undefined, s = function () {
- var e = /^/g;
- return r.test.call(e, ""), !e.lastIndex
- }();
- if (s && i)return;
- RegExp.prototype.exec = function (e) {
- var t = r.exec.apply(this, arguments), n, a;
- if (typeof e == "string" && t) {
- !i && t.length > 1 && u(t, "") > -1 && (a = RegExp(this.source, r.replace.call(o(this), "g", "")), r.replace.call(e.slice(t.index), a, function () {
- for (var e = 1; e < arguments.length - 2; e++)arguments[e] === undefined && (t[e] = undefined)
- }));
- if (this._xregexp && this._xregexp.captureNames)for (var f = 1; f < t.length; f++)n = this._xregexp.captureNames[f - 1], n && (t[n] = t[f]);
- !s && this.global && !t[0].length && this.lastIndex > t.index && this.lastIndex--
- }
- return t
- }, s || (RegExp.prototype.test = function (e) {
- var t = r.exec.call(this, e);
- return t && this.global && !t[0].length && this.lastIndex > t.index && this.lastIndex--, !!t
- })
-}), ace.define("ace/lib/es5-shim", ["require", "exports", "module"], function (e, t, n) {
- function r() {
- }
-
- function w(e) {
- try {
- return Object.defineProperty(e, "sentinel", {}), "sentinel"in e
- } catch (t) {
- }
- }
-
- function j(e) {
- return e = +e, e !== e ? e = 0 : e !== 0 && e !== 1 / 0 && e !== -1 / 0 && (e = (e > 0 || -1) * Math.floor(Math.abs(e))), e
- }
-
- function F(e) {
- var t = typeof e;
- return e === null || t === "undefined" || t === "boolean" || t === "number" || t === "string"
- }
-
- function I(e) {
- var t, n, r;
- if (F(e))return e;
- n = e.valueOf;
- if (typeof n == "function") {
- t = n.call(e);
- if (F(t))return t
- }
- r = e.toString;
- if (typeof r == "function") {
- t = r.call(e);
- if (F(t))return t
- }
- throw new TypeError
- }
-
- Function.prototype.bind || (Function.prototype.bind = function (t) {
- var n = this;
- if (typeof n != "function")throw new TypeError("Function.prototype.bind called on incompatible " + n);
- var i = u.call(arguments, 1), s = function () {
- if (this instanceof s) {
- var e = n.apply(this, i.concat(u.call(arguments)));
- return Object(e) === e ? e : this
- }
- return n.apply(t, i.concat(u.call(arguments)))
- };
- return n.prototype && (r.prototype = n.prototype, s.prototype = new r, r.prototype = null), s
- });
- var i = Function.prototype.call, s = Array.prototype, o = Object.prototype, u = s.slice, a = i.bind(o.toString), f = i.bind(o.hasOwnProperty), l, c, h, p, d;
- if (d = f(o, "__defineGetter__"))l = i.bind(o.__defineGetter__), c = i.bind(o.__defineSetter__), h = i.bind(o.__lookupGetter__), p = i.bind(o.__lookupSetter__);
- if ([1, 2].splice(0).length != 2)if (!function () {
- function e(e) {
- var t = new Array(e + 2);
- return t[0] = t[1] = 0, t
- }
-
- var t = [], n;
- t.splice.apply(t, e(20)), t.splice.apply(t, e(26)), n = t.length, t.splice(5, 0, "XXX"), n + 1 == t.length;
- if (n + 1 == t.length)return!0
- }())Array.prototype.splice = function (e, t) {
- var n = this.length;
- e > 0 ? e > n && (e = n) : e == void 0 ? e = 0 : e < 0 && (e = Math.max(n + e, 0)), e + t < n || (t = n - e);
- var r = this.slice(e, e + t), i = u.call(arguments, 2), s = i.length;
- if (e === n)s && this.push.apply(this, i); else {
- var o = Math.min(t, n - e), a = e + o, f = a + s - o, l = n - a, c = n - o;
- if (f < a)for (var h = 0; h < l; ++h)this[f + h] = this[a + h]; else if (f > a)for (h = l; h--;)this[f + h] = this[a + h];
- if (s && e === c)this.length = c, this.push.apply(this, i); else {
- this.length = c + s;
- for (h = 0; h < s; ++h)this[e + h] = i[h]
- }
- }
- return r
- }; else {
- var v = Array.prototype.splice;
- Array.prototype.splice = function (e, t) {
- return arguments.length ? v.apply(this, [e === void 0 ? 0 : e, t === void 0 ? this.length - e : t].concat(u.call(arguments, 2))) : []
- }
- }
- Array.isArray || (Array.isArray = function (t) {
- return a(t) == "[object Array]"
- });
- var m = Object("a"), g = m[0] != "a" || !(0 in m);
- Array.prototype.forEach || (Array.prototype.forEach = function (t) {
- var n = q(this), r = g && a(this) == "[object String]" ? this.split("") : n, i = arguments[1], s = -1, o = r.length >>> 0;
- if (a(t) != "[object Function]")throw new TypeError;
- while (++s < o)s in r && t.call(i, r[s], s, n)
- }), Array.prototype.map || (Array.prototype.map = function (t) {
- var n = q(this), r = g && a(this) == "[object String]" ? this.split("") : n, i = r.length >>> 0, s = Array(i), o = arguments[1];
- if (a(t) != "[object Function]")throw new TypeError(t + " is not a function");
- for (var u = 0; u < i; u++)u in r && (s[u] = t.call(o, r[u], u, n));
- return s
- }), Array.prototype.filter || (Array.prototype.filter = function (t) {
- var n = q(this), r = g && a(this) == "[object String]" ? this.split("") : n, i = r.length >>> 0, s = [], o, u = arguments[1];
- if (a(t) != "[object Function]")throw new TypeError(t + " is not a function");
- for (var f = 0; f < i; f++)f in r && (o = r[f], t.call(u, o, f, n) && s.push(o));
- return s
- }), Array.prototype.every || (Array.prototype.every = function (t) {
- var n = q(this), r = g && a(this) == "[object String]" ? this.split("") : n, i = r.length >>> 0, s = arguments[1];
- if (a(t) != "[object Function]")throw new TypeError(t + " is not a function");
- for (var o = 0; o < i; o++)if (o in r && !t.call(s, r[o], o, n))return!1;
- return!0
- }), Array.prototype.some || (Array.prototype.some = function (t) {
- var n = q(this), r = g && a(this) == "[object String]" ? this.split("") : n, i = r.length >>> 0, s = arguments[1];
- if (a(t) != "[object Function]")throw new TypeError(t + " is not a function");
- for (var o = 0; o < i; o++)if (o in r && t.call(s, r[o], o, n))return!0;
- return!1
- }), Array.prototype.reduce || (Array.prototype.reduce = function (t) {
- var n = q(this), r = g && a(this) == "[object String]" ? this.split("") : n, i = r.length >>> 0;
- if (a(t) != "[object Function]")throw new TypeError(t + " is not a function");
- if (!i && arguments.length == 1)throw new TypeError("reduce of empty array with no initial value");
- var s = 0, o;
- if (arguments.length >= 2)o = arguments[1]; else do {
- if (s in r) {
- o = r[s++];
- break
- }
- if (++s >= i)throw new TypeError("reduce of empty array with no initial value")
- } while (!0);
- for (; s < i; s++)s in r && (o = t.call(void 0, o, r[s], s, n));
- return o
- }), Array.prototype.reduceRight || (Array.prototype.reduceRight = function (t) {
- var n = q(this), r = g && a(this) == "[object String]" ? this.split("") : n, i = r.length >>> 0;
- if (a(t) != "[object Function]")throw new TypeError(t + " is not a function");
- if (!i && arguments.length == 1)throw new TypeError("reduceRight of empty array with no initial value");
- var s, o = i - 1;
- if (arguments.length >= 2)s = arguments[1]; else do {
- if (o in r) {
- s = r[o--];
- break
- }
- if (--o < 0)throw new TypeError("reduceRight of empty array with no initial value")
- } while (!0);
- do o in this && (s = t.call(void 0, s, r[o], o, n)); while (o--);
- return s
- });
- if (!Array.prototype.indexOf || [0, 1].indexOf(1, 2) != -1)Array.prototype.indexOf = function (t) {
- var n = g && a(this) == "[object String]" ? this.split("") : q(this), r = n.length >>> 0;
- if (!r)return-1;
- var i = 0;
- arguments.length > 1 && (i = j(arguments[1])), i = i >= 0 ? i : Math.max(0, r + i);
- for (; i < r; i++)if (i in n && n[i] === t)return i;
- return-1
- };
- if (!Array.prototype.lastIndexOf || [0, 1].lastIndexOf(0, -3) != -1)Array.prototype.lastIndexOf = function (t) {
- var n = g && a(this) == "[object String]" ? this.split("") : q(this), r = n.length >>> 0;
- if (!r)return-1;
- var i = r - 1;
- arguments.length > 1 && (i = Math.min(i, j(arguments[1]))), i = i >= 0 ? i : r - Math.abs(i);
- for (; i >= 0; i--)if (i in n && t === n[i])return i;
- return-1
- };
- Object.getPrototypeOf || (Object.getPrototypeOf = function (t) {
- return t.__proto__ || (t.constructor ? t.constructor.prototype : o)
- });
- if (!Object.getOwnPropertyDescriptor) {
- var y = "Object.getOwnPropertyDescriptor called on a non-object: ";
- Object.getOwnPropertyDescriptor = function (t, n) {
- if (typeof t != "object" && typeof t != "function" || t === null)throw new TypeError(y + t);
- if (!f(t, n))return;
- var r, i, s;
- r = {enumerable: !0, configurable: !0};
- if (d) {
- var u = t.__proto__;
- t.__proto__ = o;
- var i = h(t, n), s = p(t, n);
- t.__proto__ = u;
- if (i || s)return i && (r.get = i), s && (r.set = s), r
- }
- return r.value = t[n], r
- }
- }
- Object.getOwnPropertyNames || (Object.getOwnPropertyNames = function (t) {
- return Object.keys(t)
- });
- if (!Object.create) {
- var b;
- Object.prototype.__proto__ === null ? b = function () {
- return{__proto__: null}
- } : b = function () {
- var e = {};
- for (var t in e)e[t] = null;
- return e.constructor = e.hasOwnProperty = e.propertyIsEnumerable = e.isPrototypeOf = e.toLocaleString = e.toString = e.valueOf = e.__proto__ = null, e
- }, Object.create = function (t, n) {
- var r;
- if (t === null)r = b(); else {
- if (typeof t != "object")throw new TypeError("typeof prototype[" + typeof t + "] != 'object'");
- var i = function () {
- };
- i.prototype = t, r = new i, r.__proto__ = t
- }
- return n !== void 0 && Object.defineProperties(r, n), r
- }
- }
- if (Object.defineProperty) {
- var E = w({}), S = typeof document == "undefined" || w(document.createElement("div"));
- if (!E || !S)var x = Object.defineProperty
- }
- if (!Object.defineProperty || x) {
- var T = "Property description must be an object: ", N = "Object.defineProperty called on non-object: ", C = "getters & setters can not be defined on this javascript engine";
- Object.defineProperty = function (t, n, r) {
- if (typeof t != "object" && typeof t != "function" || t === null)throw new TypeError(N + t);
- if (typeof r != "object" && typeof r != "function" || r === null)throw new TypeError(T + r);
- if (x)try {
- return x.call(Object, t, n, r)
- } catch (i) {
- }
- if (f(r, "value"))if (d && (h(t, n) || p(t, n))) {
- var s = t.__proto__;
- t.__proto__ = o, delete t[n], t[n] = r.value, t.__proto__ = s
- } else t[n] = r.value; else {
- if (!d)throw new TypeError(C);
- f(r, "get") && l(t, n, r.get), f(r, "set") && c(t, n, r.set)
- }
- return t
- }
- }
- Object.defineProperties || (Object.defineProperties = function (t, n) {
- for (var r in n)f(n, r) && Object.defineProperty(t, r, n[r]);
- return t
- }), Object.seal || (Object.seal = function (t) {
- return t
- }), Object.freeze || (Object.freeze = function (t) {
- return t
- });
- try {
- Object.freeze(function () {
- })
- } catch (k) {
- Object.freeze = function (t) {
- return function (n) {
- return typeof n == "function" ? n : t(n)
- }
- }(Object.freeze)
- }
- Object.preventExtensions || (Object.preventExtensions = function (t) {
- return t
- }), Object.isSealed || (Object.isSealed = function (t) {
- return!1
- }), Object.isFrozen || (Object.isFrozen = function (t) {
- return!1
- }), Object.isExtensible || (Object.isExtensible = function (t) {
- if (Object(t) === t)throw new TypeError;
- var n = "";
- while (f(t, n))n += "?";
- t[n] = !0;
- var r = f(t, n);
- return delete t[n], r
- });
- if (!Object.keys) {
- var L = !0, A = ["toString", "toLocaleString", "valueOf", "hasOwnProperty", "isPrototypeOf", "propertyIsEnumerable", "constructor"], O = A.length;
- for (var M in{toString: null})L = !1;
- Object.keys = function R(e) {
- if (typeof e != "object" && typeof e != "function" || e === null)throw new TypeError("Object.keys called on a non-object");
- var R = [];
- for (var t in e)f(e, t) && R.push(t);
- if (L)for (var n = 0, r = O; n < r; n++) {
- var i = A[n];
- f(e, i) && R.push(i)
- }
- return R
- }
- }
- Date.now || (Date.now = function () {
- return(new Date).getTime()
- });
- if ("0".split(void 0, 0).length) {
- var _ = String.prototype.split;
- String.prototype.split = function (e, t) {
- return e === void 0 && t === 0 ? [] : _.apply(this, arguments)
- }
- }
- if ("".substr && "0b".substr(-1) !== "b") {
- var D = String.prototype.substr;
- String.prototype.substr = function (e, t) {
- return D.call(this, e < 0 ? (e = this.length + e) < 0 ? 0 : e : e, t)
- }
- }
- var P = " \n\f\r Â áš€á Žâ€€â€â€‚         âŸã€€\u2028\u2029";
- if (!String.prototype.trim || P.trim()) {
- P = "[" + P + "]";
- var H = new RegExp("^" + P + P + "*"), B = new RegExp(P + P + "*$");
- String.prototype.trim = function () {
- if (this === undefined || this === null)throw new TypeError("can't convert " + this + " to object");
- return String(this).replace(H, "").replace(B, "")
- }
- }
- var q = function (e) {
- if (e == null)throw new TypeError("can't convert " + e + " to object");
- return Object(e)
- }
-}), ace.define("ace/lib/dom", ["require", "exports", "module"], function (e, t, n) {
- var r = "http://www.w3.org/1999/xhtml";
- t.createElement = function (e, t) {
- return document.createElementNS ? document.createElementNS(t || r, e) : document.createElement(e)
- }, t.setText = function (e, t) {
- e.innerText !== undefined && (e.innerText = t), e.textContent !== undefined && (e.textContent = t)
- }, t.hasCssClass = function (e, t) {
- var n = e.className.split(/\s+/g);
- return n.indexOf(t) !== -1
- }, t.addCssClass = function (e, n) {
- t.hasCssClass(e, n) || (e.className += " " + n)
- }, t.removeCssClass = function (e, t) {
- var n = e.className.split(/\s+/g);
- for (; ;) {
- var r = n.indexOf(t);
- if (r == -1)break;
- n.splice(r, 1)
- }
- e.className = n.join(" ")
- }, t.toggleCssClass = function (e, t) {
- var n = e.className.split(/\s+/g), r = !0;
- for (; ;) {
- var i = n.indexOf(t);
- if (i == -1)break;
- r = !1, n.splice(i, 1)
- }
- return r && n.push(t), e.className = n.join(" "), r
- }, t.setCssClass = function (e, n, r) {
- r ? t.addCssClass(e, n) : t.removeCssClass(e, n)
- }, t.hasCssString = function (e, t) {
- var n = 0, r;
- t = t || document;
- if (t.createStyleSheet && (r = t.styleSheets)) {
- while (n < r.length)if (r[n++].owningElement.id === e)return!0
- } else if (r = t.getElementsByTagName("style"))while (n < r.length)if (r[n++].id === e)return!0;
- return!1
- }, t.importCssString = function (n, i, s) {
- s = s || document;
- if (i && t.hasCssString(i, s))return null;
- var o;
- if (s.createStyleSheet)o = s.createStyleSheet(), o.cssText = n, i && (o.owningElement.id = i); else {
- o = s.createElementNS ? s.createElementNS(r, "style") : s.createElement("style"), o.appendChild(s.createTextNode(n)), i && (o.id = i);
- var u = s.getElementsByTagName("head")[0] || s.documentElement;
- u.appendChild(o)
- }
- }, t.importCssStylsheet = function (e, n) {
- if (n.createStyleSheet)n.createStyleSheet(e); else {
- var r = t.createElement("link");
- r.rel = "stylesheet", r.href = e;
- var i = n.getElementsByTagName("head")[0] || n.documentElement;
- i.appendChild(r)
- }
- }, t.getInnerWidth = function (e) {
- return parseInt(t.computedStyle(e, "paddingLeft"), 10) + parseInt(t.computedStyle(e, "paddingRight"), 10) + e.clientWidth
- }, t.getInnerHeight = function (e) {
- return parseInt(t.computedStyle(e, "paddingTop"), 10) + parseInt(t.computedStyle(e, "paddingBottom"), 10) + e.clientHeight
- }, window.pageYOffset !== undefined ? (t.getPageScrollTop = function () {
- return window.pageYOffset
- }, t.getPageScrollLeft = function () {
- return window.pageXOffset
- }) : (t.getPageScrollTop = function () {
- return document.body.scrollTop
- }, t.getPageScrollLeft = function () {
- return document.body.scrollLeft
- }), window.getComputedStyle ? t.computedStyle = function (e, t) {
- return t ? (window.getComputedStyle(e, "") || {})[t] || "" : window.getComputedStyle(e, "") || {}
- } : t.computedStyle = function (e, t) {
- return t ? e.currentStyle[t] : e.currentStyle
- }, t.scrollbarWidth = function (e) {
- var n = t.createElement("ace_inner");
- n.style.width = "100%", n.style.minWidth = "0px", n.style.height = "200px", n.style.display = "block";
- var r = t.createElement("ace_outer"), i = r.style;
- i.position = "absolute", i.left = "-10000px", i.overflow = "hidden", i.width = "200px", i.minWidth = "0px", i.height = "150px", i.display = "block", r.appendChild(n);
- var s = e.documentElement;
- s.appendChild(r);
- var o = n.offsetWidth;
- i.overflow = "scroll";
- var u = n.offsetWidth;
- return o == u && (u = r.clientWidth), s.removeChild(r), o - u
- }, t.setInnerHtml = function (e, t) {
- var n = e.cloneNode(!1);
- return n.innerHTML = t, e.parentNode.replaceChild(n, e), n
- }, t.setInnerText = function (e, t) {
- var n = e.ownerDocument;
- n.body && "textContent"in n.body ? e.textContent = t : e.innerText = t
- }, t.getInnerText = function (e) {
- var t = e.ownerDocument;
- return t.body && "textContent"in t.body ? e.textContent : e.innerText || e.textContent || ""
- }, t.getParentWindow = function (e) {
- return e.defaultView || e.parentWindow
- }
-}), ace.define("ace/lib/event", ["require", "exports", "module", "ace/lib/keys", "ace/lib/useragent", "ace/lib/dom"], function (e, t, n) {
- function o(e, t, n) {
- var s = 0;
- !i.isOpera || "KeyboardEvent"in window || !i.isMac ? s = 0 | (t.ctrlKey ? 1 : 0) | (t.altKey ? 2 : 0) | (t.shiftKey ? 4 : 0) | (t.metaKey ? 8 : 0) : s = 0 | (t.metaKey ? 1 : 0) | (t.altKey ? 2 : 0) | (t.shiftKey ? 4 : 0) | (t.ctrlKey ? 8 : 0);
- if (n in r.MODIFIER_KEYS) {
- switch (r.MODIFIER_KEYS[n]) {
- case"Alt":
- s = 2;
- break;
- case"Shift":
- s = 4;
- break;
- case"Ctrl":
- s = 1;
- break;
- default:
- s = 8
- }
- n = 0
- }
- return s & 8 && (n == 91 || n == 93) && (n = 0), !!s || n in r.FUNCTION_KEYS || n in r.PRINTABLE_KEYS ? e(t, s, n) : !1
- }
-
- var r = e("./keys"), i = e("./useragent"), s = e("./dom");
- t.addListener = function (e, t, n) {
- if (e.addEventListener)return e.addEventListener(t, n, !1);
- if (e.attachEvent) {
- var r = function () {
- n(window.event)
- };
- n._wrapper = r, e.attachEvent("on" + t, r)
- }
- }, t.removeListener = function (e, t, n) {
- if (e.removeEventListener)return e.removeEventListener(t, n, !1);
- e.detachEvent && e.detachEvent("on" + t, n._wrapper || n)
- }, t.stopEvent = function (e) {
- return t.stopPropagation(e), t.preventDefault(e), !1
- }, t.stopPropagation = function (e) {
- e.stopPropagation ? e.stopPropagation() : e.cancelBubble = !0
- }, t.preventDefault = function (e) {
- e.preventDefault ? e.preventDefault() : e.returnValue = !1
- }, t.getButton = function (e) {
- return e.type == "dblclick" ? 0 : e.type == "contextmenu" || e.ctrlKey && i.isMac ? 2 : e.preventDefault ? e.button : {1: 0, 2: 2, 4: 1}[e.button]
- }, document.documentElement.setCapture ? t.capture = function (e, n, r) {
- function s(o) {
- n(o), i || (i = !0, r(o)), t.removeListener(e, "mousemove", n), t.removeListener(e, "mouseup", s), t.removeListener(e, "losecapture", s), e.releaseCapture()
- }
-
- var i = !1;
- t.addListener(e, "mousemove", n), t.addListener(e, "mouseup", s), t.addListener(e, "losecapture", s), e.setCapture()
- } : t.capture = function (e, t, n) {
- function r(e) {
- t && t(e), n && n(e), document.removeEventListener("mousemove", t, !0), document.removeEventListener("mouseup", r, !0), e.stopPropagation()
- }
-
- document.addEventListener("mousemove", t, !0), document.addEventListener("mouseup", r, !0)
- }, t.addMouseWheelListener = function (e, n) {
- var r = 8, i = function (e) {
- e.wheelDelta !== undefined ? e.wheelDeltaX !== undefined ? (e.wheelX = -e.wheelDeltaX / r, e.wheelY = -e.wheelDeltaY / r) : (e.wheelX = 0, e.wheelY = -e.wheelDelta / r) : e.axis && e.axis == e.HORIZONTAL_AXIS ? (e.wheelX = (e.detail || 0) * 5, e.wheelY = 0) : (e.wheelX = 0, e.wheelY = (e.detail || 0) * 5), n(e)
- };
- t.addListener(e, "DOMMouseScroll", i), t.addListener(e, "mousewheel", i)
- }, t.addMultiMouseDownListener = function (e, n, r, s) {
- var o = 0, u, a, f, l = {2: "dblclick", 3: "tripleclick", 4: "quadclick"};
- t.addListener(e, "mousedown", function (e) {
- if (t.getButton(e) != 0)o = 0; else {
- var i = Math.abs(e.clientX - u) > 5 || Math.abs(e.clientY - a) > 5;
- if (!f || i)o = 0;
- o += 1, f && clearTimeout(f), f = setTimeout(function () {
- f = null
- }, n[o - 1] || 600)
- }
- o == 1 && (u = e.clientX, a = e.clientY), r[s]("mousedown", e);
- if (o > 4)o = 0; else if (o > 1)return r[s](l[o], e)
- }), i.isOldIE && t.addListener(e, "dblclick", function (e) {
- o = 2, f && clearTimeout(f), f = setTimeout(function () {
- f = null
- }, n[o - 1] || 600), r[s]("mousedown", e), r[s](l[o], e)
- })
- }, t.addCommandKeyListener = function (e, n) {
- var r = t.addListener;
- if (i.isOldGecko || i.isOpera && !("KeyboardEvent"in window)) {
- var s = null;
- r(e, "keydown", function (e) {
- s = e.keyCode
- }), r(e, "keypress", function (e) {
- return o(n, e, s)
- })
- } else {
- var u = null;
- r(e, "keydown", function (e) {
- return u = e.keyIdentifier || e.keyCode, o(n, e, e.keyCode)
- })
- }
- };
- if (window.postMessage && !i.isOldIE) {
- var u = 1;
- t.nextTick = function (e, n) {
- n = n || window;
- var r = "zero-timeout-message-" + u;
- t.addListener(n, "message", function i(s) {
- s.data == r && (t.stopPropagation(s), t.removeListener(n, "message", i), e())
- }), n.postMessage(r, "*")
- }
- }
- t.nextFrame = window.requestAnimationFrame || window.oRequestAnimationFrame || window.msRequestAnimationFrame || window.mozRequestAnimationFrame || window.webkitRequestAnimationFrame, t.nextFrame ? t.nextFrame = t.nextFrame.bind(window) : t.nextFrame = function (e) {
- setTimeout(e, 17)
- }
-}), ace.define("ace/lib/keys", ["require", "exports", "module", "ace/lib/oop"], function (e, t, n) {
- var r = e("./oop"), i = function () {
- var e = {MODIFIER_KEYS: {16: "Shift", 17: "Ctrl", 18: "Alt", 224: "Meta"}, KEY_MODS: {ctrl: 1, alt: 2, option: 2, shift: 4, meta: 8, command: 8}, FUNCTION_KEYS: {8: "Backspace", 9: "Tab", 13: "Return", 19: "Pause", 27: "Esc", 32: "Space", 33: "PageUp", 34: "PageDown", 35: "End", 36: "Home", 37: "Left", 38: "Up", 39: "Right", 40: "Down", 44: "Print", 45: "Insert", 46: "Delete", 96: "Numpad0", 97: "Numpad1", 98: "Numpad2", 99: "Numpad3", 100: "Numpad4", 101: "Numpad5", 102: "Numpad6", 103: "Numpad7", 104: "Numpad8", 105: "Numpad9", 112: "F1", 113: "F2", 114: "F3", 115: "F4", 116: "F5", 117: "F6", 118: "F7", 119: "F8", 120: "F9", 121: "F10", 122: "F11", 123: "F12", 144: "Numlock", 145: "Scrolllock"}, PRINTABLE_KEYS: {32: " ", 48: "0", 49: "1", 50: "2", 51: "3", 52: "4", 53: "5", 54: "6", 55: "7", 56: "8", 57: "9", 59: ";", 61: "=", 65: "a", 66: "b", 67: "c", 68: "d", 69: "e", 70: "f", 71: "g", 72: "h", 73: "i", 74: "j", 75: "k", 76: "l", 77: "m", 78: "n", 79: "o", 80: "p", 81: "q", 82: "r", 83: "s", 84: "t", 85: "u", 86: "v", 87: "w", 88: "x", 89: "y", 90: "z", 107: "+", 109: "-", 110: ".", 188: ",", 190: ".", 191: "/", 192: "`", 219: "[", 220: "\\", 221: "]", 222: "'"}};
- for (var t in e.FUNCTION_KEYS) {
- var n = e.FUNCTION_KEYS[t].toLowerCase();
- e[n] = parseInt(t, 10)
- }
- return r.mixin(e, e.MODIFIER_KEYS), r.mixin(e, e.PRINTABLE_KEYS), r.mixin(e, e.FUNCTION_KEYS), e.enter = e["return"], e.escape = e.esc, e.del = e["delete"], e[173] = "-", e
- }();
- r.mixin(t, i), t.keyCodeToString = function (e) {
- return(i[e] || String.fromCharCode(e)).toLowerCase()
- }
-}), ace.define("ace/lib/oop", ["require", "exports", "module"], function (e, t, n) {
- t.inherits = function () {
- var e = function () {
- };
- return function (t, n) {
- e.prototype = n.prototype, t.super_ = n.prototype, t.prototype = new e, t.prototype.constructor = t
- }
- }(), t.mixin = function (e, t) {
- for (var n in t)e[n] = t[n]
- }, t.implement = function (e, n) {
- t.mixin(e, n)
- }
-}), ace.define("ace/lib/useragent", ["require", "exports", "module"], function (e, t, n) {
- t.OS = {LINUX: "LINUX", MAC: "MAC", WINDOWS: "WINDOWS"}, t.getOS = function () {
- return t.isMac ? t.OS.MAC : t.isLinux ? t.OS.LINUX : t.OS.WINDOWS
- };
- if (typeof navigator != "object")return;
- var r = (navigator.platform.match(/mac|win|linux/i) || ["other"])[0].toLowerCase(), i = navigator.userAgent;
- t.isWin = r == "win", t.isMac = r == "mac", t.isLinux = r == "linux", t.isIE = (navigator.appName == "Microsoft Internet Explorer" || navigator.appName.indexOf("MSAppHost") >= 0) && parseFloat(navigator.userAgent.match(/MSIE ([0-9]+[\.0-9]+)/)[1]), t.isOldIE = t.isIE && t.isIE < 9, t.isGecko = t.isMozilla = window.controllers && window.navigator.product === "Gecko", t.isOldGecko = t.isGecko && parseInt((navigator.userAgent.match(/rv\:(\d+)/) || [])[1], 10) < 4, t.isOpera = window.opera && Object.prototype.toString.call(window.opera) == "[object Opera]", t.isWebKit = parseFloat(i.split("WebKit/")[1]) || undefined, t.isChrome = parseFloat(i.split(" Chrome/")[1]) || undefined, t.isAIR = i.indexOf("AdobeAIR") >= 0, t.isIPad = i.indexOf("iPad") >= 0, t.isTouchPad = i.indexOf("TouchPad") >= 0
-}), ace.define("ace/editor", ["require", "exports", "module", "ace/lib/fixoldbrowsers", "ace/lib/oop", "ace/lib/lang", "ace/lib/useragent", "ace/keyboard/textinput", "ace/mouse/mouse_handler", "ace/mouse/fold_handler", "ace/keyboard/keybinding", "ace/edit_session", "ace/search", "ace/range", "ace/lib/event_emitter", "ace/commands/command_manager", "ace/commands/default_commands", "ace/config"], function (e, t, n) {
- e("./lib/fixoldbrowsers");
- var r = e("./lib/oop"), i = e("./lib/lang"), s = e("./lib/useragent"), o = e("./keyboard/textinput").TextInput, u = e("./mouse/mouse_handler").MouseHandler, a = e("./mouse/fold_handler").FoldHandler, f = e("./keyboard/keybinding").KeyBinding, l = e("./edit_session").EditSession, c = e("./search").Search, h = e("./range").Range, p = e("./lib/event_emitter").EventEmitter, d = e("./commands/command_manager").CommandManager, v = e("./commands/default_commands").commands, m = e("./config"), g = function (e, t) {
- var n = e.getContainerElement();
- this.container = n, this.renderer = e, this.commands = new d(s.isMac ? "mac" : "win", v), this.textInput = new o(e.getTextAreaContainer(), this), this.renderer.textarea = this.textInput.getElement(), this.keyBinding = new f(this), this.$mouseHandler = new u(this), new a(this), this.$blockScrolling = 0, this.$search = (new c).set({wrap: !0}), this.setSession(t || new l(""))
- };
- (function () {
- r.implement(this, p), this.setKeyboardHandler = function (e) {
- if (typeof e == "string" && e) {
- this.$keybindingId = e;
- var t = this;
- m.loadModule(["keybinding", e], function (n) {
- t.$keybindingId == e && t.keyBinding.setKeyboardHandler(n && n.handler)
- })
- } else delete this.$keybindingId, this.keyBinding.setKeyboardHandler(e)
- }, this.getKeyboardHandler = function () {
- return this.keyBinding.getKeyboardHandler()
- }, this.setSession = function (e) {
- if (this.session == e)return;
- if (this.session) {
- var t = this.session;
- this.session.removeEventListener("change", this.$onDocumentChange), this.session.removeEventListener("changeMode", this.$onChangeMode), this.session.removeEventListener("tokenizerUpdate", this.$onTokenizerUpdate), this.session.removeEventListener("changeTabSize", this.$onChangeTabSize), this.session.removeEventListener("changeWrapLimit", this.$onChangeWrapLimit), this.session.removeEventListener("changeWrapMode", this.$onChangeWrapMode), this.session.removeEventListener("onChangeFold", this.$onChangeFold), this.session.removeEventListener("changeFrontMarker", this.$onChangeFrontMarker), this.session.removeEventListener("changeBackMarker", this.$onChangeBackMarker), this.session.removeEventListener("changeBreakpoint", this.$onChangeBreakpoint), this.session.removeEventListener("changeAnnotation", this.$onChangeAnnotation), this.session.removeEventListener("changeOverwrite", this.$onCursorChange), this.session.removeEventListener("changeScrollTop", this.$onScrollTopChange), this.session.removeEventListener("changeLeftTop", this.$onScrollLeftChange);
- var n = this.session.getSelection();
- n.removeEventListener("changeCursor", this.$onCursorChange), n.removeEventListener("changeSelection", this.$onSelectionChange)
- }
- this.session = e, this.$onDocumentChange = this.onDocumentChange.bind(this), e.addEventListener("change", this.$onDocumentChange), this.renderer.setSession(e), this.$onChangeMode = this.onChangeMode.bind(this), e.addEventListener("changeMode", this.$onChangeMode), this.$onTokenizerUpdate = this.onTokenizerUpdate.bind(this), e.addEventListener("tokenizerUpdate", this.$onTokenizerUpdate), this.$onChangeTabSize = this.renderer.onChangeTabSize.bind(this.renderer), e.addEventListener("changeTabSize", this.$onChangeTabSize), this.$onChangeWrapLimit = this.onChangeWrapLimit.bind(this), e.addEventListener("changeWrapLimit", this.$onChangeWrapLimit), this.$onChangeWrapMode = this.onChangeWrapMode.bind(this), e.addEventListener("changeWrapMode", this.$onChangeWrapMode), this.$onChangeFold = this.onChangeFold.bind(this), e.addEventListener("changeFold", this.$onChangeFold), this.$onChangeFrontMarker = this.onChangeFrontMarker.bind(this), this.session.addEventListener("changeFrontMarker", this.$onChangeFrontMarker), this.$onChangeBackMarker = this.onChangeBackMarker.bind(this), this.session.addEventListener("changeBackMarker", this.$onChangeBackMarker), this.$onChangeBreakpoint = this.onChangeBreakpoint.bind(this), this.session.addEventListener("changeBreakpoint", this.$onChangeBreakpoint), this.$onChangeAnnotation = this.onChangeAnnotation.bind(this), this.session.addEventListener("changeAnnotation", this.$onChangeAnnotation), this.$onCursorChange = this.onCursorChange.bind(this), this.session.addEventListener("changeOverwrite", this.$onCursorChange), this.$onScrollTopChange = this.onScrollTopChange.bind(this), this.session.addEventListener("changeScrollTop", this.$onScrollTopChange), this.$onScrollLeftChange = this.onScrollLeftChange.bind(this), this.session.addEventListener("changeScrollLeft", this.$onScrollLeftChange), this.selection = e.getSelection(), this.selection.addEventListener("changeCursor", this.$onCursorChange), this.$onSelectionChange = this.onSelectionChange.bind(this), this.selection.addEventListener("changeSelection", this.$onSelectionChange), this.onChangeMode(), this.$blockScrolling += 1, this.onCursorChange(), this.$blockScrolling -= 1, this.onScrollTopChange(), this.onScrollLeftChange(), this.onSelectionChange(), this.onChangeFrontMarker(), this.onChangeBackMarker(), this.onChangeBreakpoint(), this.onChangeAnnotation(), this.session.getUseWrapMode() && this.renderer.adjustWrapLimit(), this.renderer.updateFull(), this._emit("changeSession", {session: e, oldSession: t})
- }, this.getSession = function () {
- return this.session
- }, this.setValue = function (e, t) {
- return this.session.doc.setValue(e), t ? t == 1 ? this.navigateFileEnd() : t == -1 && this.navigateFileStart() : this.selectAll(), e
- }, this.getValue = function () {
- return this.session.getValue()
- }, this.getSelection = function () {
- return this.selection
- }, this.resize = function (e) {
- this.renderer.onResize(e)
- }, this.setTheme = function (e) {
- this.renderer.setTheme(e)
- }, this.getTheme = function () {
- return this.renderer.getTheme()
- }, this.setStyle = function (e) {
- this.renderer.setStyle(e)
- }, this.unsetStyle = function (e) {
- this.renderer.unsetStyle(e)
- }, this.setFontSize = function (e) {
- typeof e == "number" && (e += "px"), this.container.style.fontSize = e, this.renderer.updateFontSize()
- }, this.$highlightBrackets = function () {
- this.session.$bracketHighlight && (this.session.removeMarker(this.session.$bracketHighlight), this.session.$bracketHighlight = null);
- if (this.$highlightPending)return;
- var e = this;
- this.$highlightPending = !0, setTimeout(function () {
- e.$highlightPending = !1;
- var t = e.session.findMatchingBracket(e.getCursorPosition());
- if (t) {
- var n = new h(t.row, t.column, t.row, t.column + 1);
- e.session.$bracketHighlight = e.session.addMarker(n, "ace_bracket", "text")
- }
- }, 50)
- }, this.focus = function () {
- var e = this;
- setTimeout(function () {
- e.textInput.focus()
- }), this.textInput.focus()
- }, this.isFocused = function () {
- return this.textInput.isFocused()
- }, this.blur = function () {
- this.textInput.blur()
- }, this.onFocus = function () {
- if (this.$isFocused)return;
- this.$isFocused = !0, this.renderer.showCursor(), this.renderer.visualizeFocus(), this._emit("focus")
- }, this.onBlur = function () {
- if (!this.$isFocused)return;
- this.$isFocused = !1, this.renderer.hideCursor(), this.renderer.visualizeBlur(), this._emit("blur")
- }, this.$cursorChange = function () {
- this.renderer.updateCursor()
- }, this.onDocumentChange = function (e) {
- var t = e.data, n = t.range, r;
- n.start.row == n.end.row && t.action != "insertLines" && t.action != "removeLines" ? r = n.end.row : r = Infinity, this.renderer.updateLines(n.start.row, r), this._emit("change", e), this.$cursorChange()
- }, this.onTokenizerUpdate = function (e) {
- var t = e.data;
- this.renderer.updateLines(t.first, t.last)
- }, this.onScrollTopChange = function () {
- this.renderer.scrollToY(this.session.getScrollTop())
- }, this.onScrollLeftChange = function () {
- this.renderer.scrollToX(this.session.getScrollLeft())
- }, this.onCursorChange = function () {
- this.$cursorChange(), this.$blockScrolling || this.renderer.scrollCursorIntoView(), this.$highlightBrackets(), this.$updateHighlightActiveLine(), this._emit("changeSelection")
- }, this.$updateHighlightActiveLine = function () {
- var e = this.getSession(), t;
- this.$highlightActiveLine && (this.$selectionStyle != "line" || !this.selection.isMultiLine()) && (t = this.getCursorPosition()), e.$highlightLineMarker && !t ? (e.removeMarker(e.$highlightLineMarker.id), e.$highlightLineMarker = null) : !e.$highlightLineMarker && t ? e.$highlightLineMarker = e.highlightLines(t.row, t.row, "ace_active-line") : t && (e.$highlightLineMarker.start.row = t.row, e.$highlightLineMarker.end.row = t.row, e._emit("changeBackMarker"))
- }, this.onSelectionChange = function (e) {
- var t = this.session;
- t.$selectionMarker && t.removeMarker(t.$selectionMarker), t.$selectionMarker = null;
- if (!this.selection.isEmpty()) {
- var n = this.selection.getRange(), r = this.getSelectionStyle();
- t.$selectionMarker = t.addMarker(n, "ace_selection", r)
- } else this.$updateHighlightActiveLine();
- var i = this.$highlightSelectedWord && this.$getSelectionHighLightRegexp();
- this.session.highlight(i), this._emit("changeSelection")
- }, this.$getSelectionHighLightRegexp = function () {
- var e = this.session, t = this.getSelectionRange();
- if (t.isEmpty() || t.isMultiLine())return;
- var n = t.start.column - 1, r = t.end.column + 1, i = e.getLine(t.start.row), s = i.length, o = i.substring(Math.max(n, 0), Math.min(r, s));
- if (n >= 0 && /^[\w\d]/.test(o) || r <= s && /[\w\d]$/.test(o))return;
- o = i.substring(t.start.column, t.end.column);
- if (!/^[\w\d]+$/.test(o))return;
- var u = this.$search.$assembleRegExp({wholeWord: !0, caseSensitive: !0, needle: o});
- return u
- }, this.onChangeFrontMarker = function () {
- this.renderer.updateFrontMarkers()
- }, this.onChangeBackMarker = function () {
- this.renderer.updateBackMarkers()
- }, this.onChangeBreakpoint = function () {
- this.renderer.updateBreakpoints()
- }, this.onChangeAnnotation = function () {
- this.renderer.setAnnotations(this.session.getAnnotations())
- }, this.onChangeMode = function () {
- this.renderer.updateText()
- }, this.onChangeWrapLimit = function () {
- this.renderer.updateFull()
- }, this.onChangeWrapMode = function () {
- this.renderer.onResize(!0)
- }, this.onChangeFold = function () {
- this.$updateHighlightActiveLine(), this.renderer.updateFull()
- }, this.getCopyText = function () {
- var e = "";
- return this.selection.isEmpty() || (e = this.session.getTextRange(this.getSelectionRange())), this._emit("copy", e), e
- }, this.onCopy = function () {
- this.commands.exec("copy", this)
- }, this.onCut = function () {
- this.commands.exec("cut", this)
- }, this.onPaste = function (e) {
- if (this.$readOnly)return;
- this._emit("paste", e), this.insert(e)
- }, this.execCommand = function (e, t) {
- this.commands.exec(e, this, t)
- }, this.insert = function (e) {
- var t = this.session, n = t.getMode(), r = this.getCursorPosition();
- if (this.getBehavioursEnabled()) {
- var i = n.transformAction(t.getState(r.row), "insertion", this, t, e);
- i && (e = i.text)
- }
- e = e.replace(" ", this.session.getTabString());
- if (!this.selection.isEmpty())r = this.session.remove(this.getSelectionRange()), this.clearSelection(); else if (this.session.getOverwrite()) {
- var s = new h.fromPoints(r, r);
- s.end.column += e.length, this.session.remove(s)
- }
- this.clearSelection();
- var o = r.column, u = t.getState(r.row), a = t.getLine(r.row), f = n.checkOutdent(u, a, e), l = t.insert(r, e);
- i && i.selection && (i.selection.length == 2 ? this.selection.setSelectionRange(new h(r.row, o + i.selection[0], r.row, o + i.selection[1])) : this.selection.setSelectionRange(new h(r.row + i.selection[0], i.selection[1], r.row + i.selection[2], i.selection[3])));
- if (t.getDocument().isNewLine(e)) {
- var c = n.getNextLineIndent(u, a.slice(0, r.column), t.getTabString());
- this.moveCursorTo(r.row + 1, 0);
- var p = t.getTabSize(), d = Number.MAX_VALUE;
- for (var v = r.row + 1; v <= l.row; ++v) {
- var m = 0;
- a = t.getLine(v);
- for (var g = 0; g < a.length; ++g)if (a.charAt(g) == " ")m += p; else {
- if (a.charAt(g) != " ")break;
- m += 1
- }
- /[^\s]/.test(a) && (d = Math.min(m, d))
- }
- for (var v = r.row + 1; v <= l.row; ++v) {
- var y = d;
- a = t.getLine(v);
- for (var g = 0; g < a.length && y > 0; ++g)a.charAt(g) == " " ? y -= p : a.charAt(g) == " " && (y -= 1);
- t.remove(new h(v, 0, v, g))
- }
- t.indentRows(r.row + 1, l.row, c)
- }
- f && n.autoOutdent(u, t, r.row)
- }, this.onTextInput = function (e) {
- this.keyBinding.onTextInput(e)
- }, this.onCommandKey = function (e, t, n) {
- this.keyBinding.onCommandKey(e, t, n)
- }, this.setOverwrite = function (e) {
- this.session.setOverwrite(e)
- }, this.getOverwrite = function () {
- return this.session.getOverwrite()
- }, this.toggleOverwrite = function () {
- this.session.toggleOverwrite()
- }, this.setScrollSpeed = function (e) {
- this.$mouseHandler.setScrollSpeed(e)
- }, this.getScrollSpeed = function () {
- return this.$mouseHandler.getScrollSpeed()
- }, this.setDragDelay = function (e) {
- this.$mouseHandler.setDragDelay(e)
- }, this.getDragDelay = function () {
- return this.$mouseHandler.getDragDelay()
- }, this.$selectionStyle = "line", this.setSelectionStyle = function (e) {
- if (this.$selectionStyle == e)return;
- this.$selectionStyle = e, this.onSelectionChange(), this._emit("changeSelectionStyle", {data: e})
- }, this.getSelectionStyle = function () {
- return this.$selectionStyle
- }, this.$highlightActiveLine = !0, this.setHighlightActiveLine = function (e) {
- if (this.$highlightActiveLine == e)return;
- this.$highlightActiveLine = e, this.$updateHighlightActiveLine()
- }, this.getHighlightActiveLine = function () {
- return this.$highlightActiveLine
- }, this.$highlightGutterLine = !0, this.setHighlightGutterLine = function (e) {
- if (this.$highlightGutterLine == e)return;
- this.renderer.setHighlightGutterLine(e), this.$highlightGutterLine = e
- }, this.getHighlightGutterLine = function () {
- return this.$highlightGutterLine
- }, this.$highlightSelectedWord = !0, this.setHighlightSelectedWord = function (e) {
- if (this.$highlightSelectedWord == e)return;
- this.$highlightSelectedWord = e, this.$onSelectionChange()
- }, this.getHighlightSelectedWord = function () {
- return this.$highlightSelectedWord
- }, this.setAnimatedScroll = function (e) {
- this.renderer.setAnimatedScroll(e)
- }, this.getAnimatedScroll = function () {
- return this.renderer.getAnimatedScroll()
- }, this.setShowInvisibles = function (e) {
- this.renderer.setShowInvisibles(e)
- }, this.getShowInvisibles = function () {
- return this.renderer.getShowInvisibles()
- }, this.setDisplayIndentGuides = function (e) {
- this.renderer.setDisplayIndentGuides(e)
- }, this.getDisplayIndentGuides = function () {
- return this.renderer.getDisplayIndentGuides()
- }, this.setShowPrintMargin = function (e) {
- this.renderer.setShowPrintMargin(e)
- }, this.getShowPrintMargin = function () {
- return this.renderer.getShowPrintMargin()
- }, this.setPrintMarginColumn = function (e) {
- this.renderer.setPrintMarginColumn(e)
- }, this.getPrintMarginColumn = function () {
- return this.renderer.getPrintMarginColumn()
- }, this.$readOnly = !1, this.setReadOnly = function (e) {
- this.$readOnly = e, this.textInput.setReadOnly(e), this.renderer.$cursorLayer.setBlinking(!e)
- }, this.getReadOnly = function () {
- return this.$readOnly
- }, this.$modeBehaviours = !0, this.setBehavioursEnabled = function (e) {
- this.$modeBehaviours = e
- }, this.getBehavioursEnabled = function () {
- return this.$modeBehaviours
- }, this.$modeWrapBehaviours = !0, this.setWrapBehavioursEnabled = function (e) {
- this.$modeWrapBehaviours = e
- }, this.getWrapBehavioursEnabled = function () {
- return this.$modeWrapBehaviours
- }, this.setShowFoldWidgets = function (e) {
- var t = this.renderer.$gutterLayer;
- if (t.getShowFoldWidgets() == e)return;
- this.renderer.$gutterLayer.setShowFoldWidgets(e), this.$showFoldWidgets = e, this.renderer.updateFull()
- }, this.getShowFoldWidgets = function () {
- return this.renderer.$gutterLayer.getShowFoldWidgets()
- }, this.setFadeFoldWidgets = function (e) {
- this.renderer.setFadeFoldWidgets(e)
- }, this.getFadeFoldWidgets = function () {
- return this.renderer.getFadeFoldWidgets()
- }, this.remove = function (e) {
- this.selection.isEmpty() && (e == "left" ? this.selection.selectLeft() : this.selection.selectRight());
- var t = this.getSelectionRange();
- if (this.getBehavioursEnabled()) {
- var n = this.session, r = n.getState(t.start.row), i = n.getMode().transformAction(r, "deletion", this, n, t);
- i && (t = i)
- }
- this.session.remove(t), this.clearSelection()
- }, this.removeWordRight = function () {
- this.selection.isEmpty() && this.selection.selectWordRight(), this.session.remove(this.getSelectionRange()), this.clearSelection()
- }, this.removeWordLeft = function () {
- this.selection.isEmpty() && this.selection.selectWordLeft(), this.session.remove(this.getSelectionRange()), this.clearSelection()
- }, this.removeToLineStart = function () {
- this.selection.isEmpty() && this.selection.selectLineStart(), this.session.remove(this.getSelectionRange()), this.clearSelection()
- }, this.removeToLineEnd = function () {
- this.selection.isEmpty() && this.selection.selectLineEnd();
- var e = this.getSelectionRange();
- e.start.column == e.end.column && e.start.row == e.end.row && (e.end.column = 0, e.end.row++), this.session.remove(e), this.clearSelection()
- }, this.splitLine = function () {
- this.selection.isEmpty() || (this.session.remove(this.getSelectionRange()), this.clearSelection());
- var e = this.getCursorPosition();
- this.insert("\n"), this.moveCursorToPosition(e)
- }, this.transposeLetters = function () {
- if (!this.selection.isEmpty())return;
- var e = this.getCursorPosition(), t = e.column;
- if (t === 0)return;
- var n = this.session.getLine(e.row), r, i;
- t < n.length ? (r = n.charAt(t) + n.charAt(t - 1), i = new h(e.row, t - 1, e.row, t + 1)) : (r = n.charAt(t - 1) + n.charAt(t - 2), i = new h(e.row, t - 2, e.row, t)), this.session.replace(i, r)
- }, this.toLowerCase = function () {
- var e = this.getSelectionRange();
- this.selection.isEmpty() && this.selection.selectWord();
- var t = this.getSelectionRange(), n = this.session.getTextRange(t);
- this.session.replace(t, n.toLowerCase()), this.selection.setSelectionRange(e)
- }, this.toUpperCase = function () {
- var e = this.getSelectionRange();
- this.selection.isEmpty() && this.selection.selectWord();
- var t = this.getSelectionRange(), n = this.session.getTextRange(t);
- this.session.replace(t, n.toUpperCase()), this.selection.setSelectionRange(e)
- }, this.indent = function () {
- var e = this.session, t = this.getSelectionRange();
- if (!(t.start.row < t.end.row || t.start.column < t.end.column)) {
- var r;
- if (this.session.getUseSoftTabs()) {
- var s = e.getTabSize(), o = this.getCursorPosition(), u = e.documentToScreenColumn(o.row, o.column), a = s - u % s;
- r = i.stringRepeat(" ", a)
- } else r = " ";
- return this.insert(r)
- }
- var n = this.$getSelectedRows();
- e.indentRows(n.first, n.last, " ")
- }, this.blockIndent = function () {
- var e = this.$getSelectedRows();
- this.session.indentRows(e.first, e.last, " ")
- }, this.blockOutdent = function () {
- var e = this.session.getSelection();
- this.session.outdentRows(e.getRange())
- }, this.sortLines = function () {
- var e = this.$getSelectedRows(), t = this.session, n = [];
- for (i = e.first; i <= e.last; i++)n.push(t.getLine(i));
- n.sort(function (e, t) {
- return e.toLowerCase() < t.toLowerCase() ? -1 : e.toLowerCase() > t.toLowerCase() ? 1 : 0
- });
- var r = new h(0, 0, 0, 0);
- for (var i = e.first; i <= e.last; i++) {
- var s = t.getLine(i);
- r.start.row = i, r.end.row = i, r.end.column = s.length, t.replace(r, n[i - e.first])
- }
- }, this.toggleCommentLines = function () {
- var e = this.session.getState(this.getCursorPosition().row), t = this.$getSelectedRows();
- this.session.getMode().toggleCommentLines(e, this.session, t.first, t.last)
- }, this.getNumberAt = function (e, t) {
- var n = /[\-]?[0-9]+(?:\.[0-9]+)?/g;
- n.lastIndex = 0;
- var r = this.session.getLine(e);
- while (n.lastIndex < t - 1) {
- var i = n.exec(r);
- if (i.index <= t && i.index + i[0].length >= t) {
- var s = {value: i[0], start: i.index, end: i.index + i[0].length};
- return s
- }
- }
- return null
- }, this.modifyNumber = function (e) {
- var t = this.selection.getCursor().row, n = this.selection.getCursor().column, r = new h(t, n - 1, t, n), i = this.session.getTextRange(r);
- if (!isNaN(parseFloat(i)) && isFinite(i)) {
- var s = this.getNumberAt(t, n);
- if (s) {
- var o = s.value.indexOf(".") >= 0 ? s.start + s.value.indexOf(".") + 1 : s.end, u = s.start + s.value.length - o, a = parseFloat(s.value);
- a *= Math.pow(10, u), o !== s.end && n < o ? e *= Math.pow(10, s.end - n - 1) : e *= Math.pow(10, s.end - n), a += e, a /= Math.pow(10, u);
- var f = a.toFixed(u), l = new h(t, s.start, t, s.end);
- this.session.replace(l, f), this.moveCursorTo(t, Math.max(s.start + 1, n + f.length - s.value.length))
- }
- }
- }, this.removeLines = function () {
- var e = this.$getSelectedRows(), t;
- e.first === 0 || e.last + 1 < this.session.getLength() ? t = new h(e.first, 0, e.last + 1, 0) : t = new h(e.first - 1, this.session.getLine(e.first - 1).length, e.last, this.session.getLine(e.last).length), this.session.remove(t), this.clearSelection()
- }, this.duplicateSelection = function () {
- var e = this.selection, t = this.session, n = e.getRange();
- if (n.isEmpty()) {
- var r = n.start.row;
- t.duplicateLines(r, r)
- } else {
- var i = e.isBackwards(), s = e.isBackwards() ? n.start : n.end, o = t.insert(s, t.getTextRange(n), !1);
- n.start = s, n.end = o, e.setSelectionRange(n, i)
- }
- }, this.moveLinesDown = function () {
- this.$moveLines(function (e, t) {
- return this.session.moveLinesDown(e, t)
- })
- }, this.moveLinesUp = function () {
- this.$moveLines(function (e, t) {
- return this.session.moveLinesUp(e, t)
- })
- }, this.moveText = function (e, t) {
- return this.$readOnly ? null : this.session.moveText(e, t)
- }, this.copyLinesUp = function () {
- this.$moveLines(function (e, t) {
- return this.session.duplicateLines(e, t), 0
- })
- }, this.copyLinesDown = function () {
- this.$moveLines(function (e, t) {
- return this.session.duplicateLines(e, t)
- })
- }, this.$moveLines = function (e) {
- var t = this.$getSelectedRows(), n = this.selection;
- if (!n.isMultiLine())var r = n.getRange(), i = n.isBackwards();
- var s = e.call(this, t.first, t.last);
- r ? (r.start.row += s, r.end.row += s, n.setSelectionRange(r, i)) : (n.setSelectionAnchor(t.last + s + 1, 0), n.$moveSelection(function () {
- n.moveCursorTo(t.first + s, 0)
- }))
- }, this.$getSelectedRows = function () {
- var e = this.getSelectionRange().collapseRows();
- return{first: e.start.row, last: e.end.row}
- }, this.onCompositionStart = function (e) {
- this.renderer.showComposition(this.getCursorPosition())
- }, this.onCompositionUpdate = function (e) {
- this.renderer.setCompositionText(e)
- }, this.onCompositionEnd = function () {
- this.renderer.hideComposition()
- }, this.getFirstVisibleRow = function () {
- return this.renderer.getFirstVisibleRow()
- }, this.getLastVisibleRow = function () {
- return this.renderer.getLastVisibleRow()
- }, this.isRowVisible = function (e) {
- return e >= this.getFirstVisibleRow() && e <= this.getLastVisibleRow()
- }, this.isRowFullyVisible = function (e) {
- return e >= this.renderer.getFirstFullyVisibleRow() && e <= this.renderer.getLastFullyVisibleRow()
- }, this.$getVisibleRowCount = function () {
- return this.renderer.getScrollBottomRow() - this.renderer.getScrollTopRow() + 1
- }, this.$moveByPage = function (e, t) {
- var n = this.renderer, r = this.renderer.layerConfig, i = e * Math.floor(r.height / r.lineHeight);
- this.$blockScrolling++, t == 1 ? this.selection.$moveSelection(function () {
- this.moveCursorBy(i, 0)
- }) : t == 0 && (this.selection.moveCursorBy(i, 0), this.selection.clearSelection()), this.$blockScrolling--;
- var s = n.scrollTop;
- n.scrollBy(0, i * r.lineHeight), t != null && n.scrollCursorIntoView(null, .5), n.animateScrolling(s)
- }, this.selectPageDown = function () {
- this.$moveByPage(1, !0)
- }, this.selectPageUp = function () {
- this.$moveByPage(-1, !0)
- }, this.gotoPageDown = function () {
- this.$moveByPage(1, !1)
- }, this.gotoPageUp = function () {
- this.$moveByPage(-1, !1)
- }, this.scrollPageDown = function () {
- this.$moveByPage(1)
- }, this.scrollPageUp = function () {
- this.$moveByPage(-1)
- }, this.scrollToRow = function (e) {
- this.renderer.scrollToRow(e)
- }, this.scrollToLine = function (e, t, n, r) {
- this.renderer.scrollToLine(e, t, n, r)
- }, this.centerSelection = function () {
- var e = this.getSelectionRange(), t = {row: Math.floor(e.start.row + (e.end.row - e.start.row) / 2), column: Math.floor(e.start.column + (e.end.column - e.start.column) / 2)};
- this.renderer.alignCursor(t, .5)
- }, this.getCursorPosition = function () {
- return this.selection.getCursor()
- }, this.getCursorPositionScreen = function () {
- return this.session.documentToScreenPosition(this.getCursorPosition())
- }, this.getSelectionRange = function () {
- return this.selection.getRange()
- }, this.selectAll = function () {
- this.$blockScrolling += 1, this.selection.selectAll(), this.$blockScrolling -= 1
- }, this.clearSelection = function () {
- this.selection.clearSelection()
- }, this.moveCursorTo = function (e, t) {
- this.selection.moveCursorTo(e, t)
- }, this.moveCursorToPosition = function (e) {
- this.selection.moveCursorToPosition(e)
- }, this.jumpToMatching = function (e) {
- var t = this.getCursorPosition(), n = this.session.getBracketRange(t);
- if (!n) {
- n = this.find({needle: /[{}()\[\]]/g, preventScroll: !0, start: {row: t.row, column: t.column - 1}});
- if (!n)return;
- var r = n.start;
- r.row == t.row && Math.abs(r.column - t.column) < 2 && (n = this.session.getBracketRange(r))
- }
- r = n && n.cursor || r, r && (e ? n && n.isEqual(this.getSelectionRange()) ? this.clearSelection() : this.selection.selectTo(r.row, r.column) : (this.clearSelection(), this.moveCursorTo(r.row, r.column)))
- }, this.gotoLine = function (e, t, n) {
- this.selection.clearSelection(), this.session.unfold({row: e - 1, column: t || 0}), this.$blockScrolling += 1, this.moveCursorTo(e - 1, t || 0), this.$blockScrolling -= 1, this.isRowFullyVisible(e - 1) || this.scrollToLine(e - 1, !0, n)
- }, this.navigateTo = function (e, t) {
- this.clearSelection(), this.moveCursorTo(e, t)
- }, this.navigateUp = function (e) {
- this.selection.clearSelection(), e = e || 1, this.selection.moveCursorBy(-e, 0)
- }, this.navigateDown = function (e) {
- this.selection.clearSelection(), e = e || 1, this.selection.moveCursorBy(e, 0)
- }, this.navigateLeft = function (e) {
- if (!this.selection.isEmpty()) {
- var t = this.getSelectionRange().start;
- this.moveCursorToPosition(t)
- } else {
- e = e || 1;
- while (e--)this.selection.moveCursorLeft()
- }
- this.clearSelection()
- }, this.navigateRight = function (e) {
- if (!this.selection.isEmpty()) {
- var t = this.getSelectionRange().end;
- this.moveCursorToPosition(t)
- } else {
- e = e || 1;
- while (e--)this.selection.moveCursorRight()
- }
- this.clearSelection()
- }, this.navigateLineStart = function () {
- this.selection.moveCursorLineStart(), this.clearSelection()
- }, this.navigateLineEnd = function () {
- this.selection.moveCursorLineEnd(), this.clearSelection()
- }, this.navigateFileEnd = function () {
- var e = this.renderer.scrollTop;
- this.selection.moveCursorFileEnd(), this.clearSelection(), this.renderer.animateScrolling(e)
- }, this.navigateFileStart = function () {
- var e = this.renderer.scrollTop;
- this.selection.moveCursorFileStart(), this.clearSelection(), this.renderer.animateScrolling(e)
- }, this.navigateWordRight = function () {
- this.selection.moveCursorWordRight(), this.clearSelection()
- }, this.navigateWordLeft = function () {
- this.selection.moveCursorWordLeft(), this.clearSelection()
- }, this.replace = function (e, t) {
- t && this.$search.set(t);
- var n = this.$search.find(this.session), r = 0;
- return n ? (this.$tryReplace(n, e) && (r = 1), n !== null && (this.selection.setSelectionRange(n), this.renderer.scrollSelectionIntoView(n.start, n.end)), r) : r
- }, this.replaceAll = function (e, t) {
- t && this.$search.set(t);
- var n = this.$search.findAll(this.session), r = 0;
- if (!n.length)return r;
- this.$blockScrolling += 1;
- var i = this.getSelectionRange();
- this.clearSelection(), this.selection.moveCursorTo(0, 0);
- for (var s = n.length - 1; s >= 0; --s)this.$tryReplace(n[s], e) && r++;
- return this.selection.setSelectionRange(i), this.$blockScrolling -= 1, r
- }, this.$tryReplace = function (e, t) {
- var n = this.session.getTextRange(e);
- return t = this.$search.replace(n, t), t !== null ? (e.end = this.session.replace(e, t), e) : null
- }, this.getLastSearchOptions = function () {
- return this.$search.getOptions()
- }, this.find = function (e, t, n) {
- t || (t = {}), typeof e == "string" || e instanceof RegExp ? t.needle = e : typeof e == "object" && r.mixin(t, e);
- var i = this.selection.getRange();
- t.needle == null && (e = this.session.getTextRange(i) || this.$search.$options.needle, e || (i = this.session.getWordRange(i.start.row, i.start.column), e = this.session.getTextRange(i)), this.$search.set({needle: e})), this.$search.set(t), t.start || this.$search.set({start: i});
- var s = this.$search.find(this.session);
- if (t.preventScroll)return s;
- if (s)return this.revealRange(s, n), s;
- t.backwards ? i.start = i.end : i.end = i.start, this.selection.setRange(i)
- }, this.findNext = function (e, t) {
- this.find({skipCurrent: !0, backwards: !1}, e, t)
- }, this.findPrevious = function (e, t) {
- this.find(e, {skipCurrent: !0, backwards: !0}, t)
- }, this.revealRange = function (e, t) {
- this.$blockScrolling += 1, this.session.unfold(e), this.selection.setSelectionRange(e), this.$blockScrolling -= 1;
- var n = this.renderer.scrollTop;
- this.renderer.scrollSelectionIntoView(e.start, e.end, .5), t != 0 && this.renderer.animateScrolling(n)
- }, this.undo = function () {
- this.$blockScrolling++, this.session.getUndoManager().undo(), this.$blockScrolling--, this.renderer.scrollCursorIntoView(null, .5)
- }, this.redo = function () {
- this.$blockScrolling++, this.session.getUndoManager().redo(), this.$blockScrolling--, this.renderer.scrollCursorIntoView(null, .5)
- }, this.destroy = function () {
- this.renderer.destroy()
- }
- }).call(g.prototype), t.Editor = g
-}), ace.define("ace/lib/lang", ["require", "exports", "module"], function (e, t, n) {
- t.stringReverse = function (e) {
- return e.split("").reverse().join("")
- }, t.stringRepeat = function (e, t) {
- var n = "";
- while (t > 0) {
- t & 1 && (n += e);
- if (t >>= 1)e += e
- }
- return n
- };
- var r = /^\s\s*/, i = /\s\s*$/;
- t.stringTrimLeft = function (e) {
- return e.replace(r, "")
- }, t.stringTrimRight = function (e) {
- return e.replace(i, "")
- }, t.copyObject = function (e) {
- var t = {};
- for (var n in e)t[n] = e[n];
- return t
- }, t.copyArray = function (e) {
- var t = [];
- for (var n = 0, r = e.length; n < r; n++)e[n] && typeof e[n] == "object" ? t[n] = this.copyObject(e[n]) : t[n] = e[n];
- return t
- }, t.deepCopy = function (e) {
- if (typeof e != "object")return e;
- var t = e.constructor();
- for (var n in e)typeof e[n] == "object" ? t[n] = this.deepCopy(e[n]) : t[n] = e[n];
- return t
- }, t.arrayToMap = function (e) {
- var t = {};
- for (var n = 0; n < e.length; n++)t[e[n]] = 1;
- return t
- }, t.createMap = function (e) {
- var t = Object.create(null);
- for (var n in e)t[n] = e[n];
- return t
- }, t.arrayRemove = function (e, t) {
- for (var n = 0; n <= e.length; n++)t === e[n] && e.splice(n, 1)
- }, t.escapeRegExp = function (e) {
- return e.replace(/([.*+?^${}()|[\]\/\\])/g, "\\$1")
- }, t.escapeHTML = function (e) {
- return e.replace(/&/g, "&").replace(/"/g, """).replace(/'/g, "'").replace(/= 0) {
- t = this.$clickSelection.start;
- if (i.start.row != r.row || i.start.column != r.column)r = i.end
- } else if (s == -1 && o == 1)r = i.end, t = i.start; else {
- var u = a(this.$clickSelection, r);
- r = u.cursor, t = u.anchor
- }
- n.selection.setSelectionAnchor(t.row, t.column)
- }
- n.selection.selectToPosition(r), n.renderer.scrollCursorIntoView()
- }, this.startDrag = function () {
- var e = this.editor;
- this.setState("drag"), this.dragRange = e.getSelectionRange();
- var t = e.getSelectionStyle();
- this.dragSelectionMarker = e.session.addMarker(this.dragRange, "ace_selection", t), e.clearSelection(), r.addCssClass(e.container, "ace_dragging"), this.$dragKeybinding || (this.$dragKeybinding = {handleKeyboard: function (e, t, n, r) {
- if (n == "esc")return{command: this.command}
- }, command: {exec: function (e) {
- var t = e.$mouseHandler;
- t.dragCursor = null, t.dragEnd(), t.startSelect()
- }}}), e.keyBinding.addKeyboardHandler(this.$dragKeybinding)
- }, this.focusWait = function () {
- var e = u(this.mousedownEvent.x, this.mousedownEvent.y, this.x, this.y), t = (new Date).getTime();
- (e > s || t - this.mousedownEvent.time > this.$focusWaitTimout) && this.startSelect()
- }, this.dragWait = function (e) {
- var t = u(this.mousedownEvent.x, this.mousedownEvent.y, this.x, this.y), n = (new Date).getTime(), r = this.editor;
- t > s ? this.startSelect(this.mousedownEvent.getDocumentPosition()) : n - this.mousedownEvent.time > r.getDragDelay() && this.startDrag()
- }, this.dragWaitEnd = function (e) {
- this.mousedownEvent.domEvent = e, this.startSelect()
- }, this.drag = function () {
- var e = this.editor;
- this.dragCursor = e.renderer.screenToTextCoordinates(this.x, this.y), e.moveCursorToPosition(this.dragCursor), e.renderer.scrollCursorIntoView()
- }, this.dragEnd = function (e) {
- var t = this.editor, n = this.dragCursor, i = this.dragRange;
- r.removeCssClass(t.container, "ace_dragging"), t.session.removeMarker(this.dragSelectionMarker), t.keyBinding.removeKeyboardHandler(this.$dragKeybinding);
- if (!n)return;
- t.clearSelection();
- if (e && (e.ctrlKey || e.altKey)) {
- var s = t.session, o = i;
- o.end = s.insert(n, s.getTextRange(i)), o.start = n
- } else {
- if (i.contains(n.row, n.column))return;
- var o = t.moveText(i, n)
- }
- if (!o)return;
- t.selection.setSelectionRange(o)
- }, this.onDoubleClick = function (e) {
- var t = e.getDocumentPosition(), n = this.editor, r = n.session, i = r.getBracketRange(t);
- if (i) {
- i.isEmpty() && (i.start.column--, i.end.column++), this.$clickSelection = i, this.setState("select");
- return
- }
- this.$clickSelection = n.selection.getWordRange(t.row, t.column), this.setState("selectByWords")
- }, this.onTripleClick = function (e) {
- var t = e.getDocumentPosition(), n = this.editor;
- this.setState("selectByLines"), this.$clickSelection = n.selection.getLineRange(t.row)
- }, this.onQuadClick = function (e) {
- var t = this.editor;
- t.selectAll(), this.$clickSelection = t.getSelectionRange(), this.setState("null")
- }, this.onMouseWheel = function (e) {
- if (e.getShiftKey() || e.getAccelKey())return;
- var t = this.editor, n = t.renderer.isScrollableBy(e.wheelX * e.speed, e.wheelY * e.speed);
- if (n)this.$passScrollEvent = !1; else {
- if (this.$passScrollEvent)return;
- if (!this.$scrollStopTimeout) {
- var r = this;
- this.$scrollStopTimeout = setTimeout(function () {
- r.$passScrollEvent = !0, r.$scrollStopTimeout = null
- }, 200)
- }
- }
- return t.renderer.scrollBy(e.wheelX * e.speed, e.wheelY * e.speed), e.preventDefault()
- }
- }).call(o.prototype), t.DefaultHandlers = o
-}), ace.define("ace/mouse/default_gutter_handler", ["require", "exports", "module", "ace/lib/dom", "ace/lib/event"], function (e, t, n) {
- function s(e) {
- function f() {
- u = r.createElement("div"), u.className = "ace_gutter-tooltip", u.style.display = "none", t.container.appendChild(u)
- }
-
- function l() {
- u || f();
- var e = o.getDocumentPosition().row, r = n.$annotations[e];
- if (!r)return c();
- var i = t.session.getLength();
- if (e == i) {
- var s = t.renderer.pixelToScreenCoordinates(0, o.y).row, l = o.$pos;
- if (s > t.session.documentToScreenRow(l.row, l.column))return c()
- }
- if (a == r)return;
- a = r.text.join(" "), u.style.display = "block", u.innerHTML = a, t.on("mousewheel", c), h(o)
- }
-
- function c() {
- s && (s = clearTimeout(s)), a && (u.style.display = "none", a = null, t.removeEventListener("mousewheel", c))
- }
-
- function h(e) {
- var n = t.renderer.$gutter.getBoundingClientRect();
- u.style.left = e.x + 15 + "px", e.y + 3 * t.renderer.lineHeight + 15 < n.bottom ? (u.style.bottom = "", u.style.top = e.y + 15 + "px") : (u.style.top = "", u.style.bottom = n.bottom - e.y + 5 + "px")
- }
-
- var t = e.editor, n = t.renderer.$gutterLayer;
- e.editor.setDefaultHandler("guttermousedown", function (r) {
- if (!t.isFocused())return;
- var i = n.getRegion(r);
- if (i == "foldWidgets")return;
- var s = r.getDocumentPosition().row, o = t.session.selection;
- if (r.getShiftKey())o.selectTo(s, 0); else {
- if (r.domEvent.detail == 2)return t.selectAll(), r.preventDefault();
- e.$clickSelection = t.selection.getLineRange(s)
- }
- return e.captureMouse(r, "selectByLines"), r.preventDefault()
- });
- var s, o, u, a;
- e.editor.setDefaultHandler("guttermousemove", function (t) {
- var n = t.domEvent.target || t.domEvent.srcElement;
- if (r.hasCssClass(n, "ace_fold-widget"))return c();
- a && h(t), o = t;
- if (s)return;
- s = setTimeout(function () {
- s = null, o && !e.isMousePressed ? l() : c()
- }, 50)
- }), i.addListener(t.renderer.$gutter, "mouseout", function (e) {
- o = null;
- if (!a || s)return;
- s = setTimeout(function () {
- s = null, c()
- }, 50)
- })
- }
-
- var r = e("../lib/dom"), i = e("../lib/event");
- t.GutterHandler = s
-}), ace.define("ace/mouse/mouse_event", ["require", "exports", "module", "ace/lib/event", "ace/lib/useragent"], function (e, t, n) {
- var r = e("../lib/event"), i = e("../lib/useragent"), s = t.MouseEvent = function (e, t) {
- this.domEvent = e, this.editor = t, this.x = this.clientX = e.clientX, this.y = this.clientY = e.clientY, this.$pos = null, this.$inSelection = null, this.propagationStopped = !1, this.defaultPrevented = !1
- };
- (function () {
- this.stopPropagation = function () {
- r.stopPropagation(this.domEvent), this.propagationStopped = !0
- }, this.preventDefault = function () {
- r.preventDefault(this.domEvent), this.defaultPrevented = !0
- }, this.stop = function () {
- this.stopPropagation(), this.preventDefault()
- }, this.getDocumentPosition = function () {
- return this.$pos ? this.$pos : (this.$pos = this.editor.renderer.screenToTextCoordinates(this.clientX, this.clientY), this.$pos)
- }, this.inSelection = function () {
- if (this.$inSelection !== null)return this.$inSelection;
- var e = this.editor;
- if (e.getReadOnly())this.$inSelection = !1; else {
- var t = e.getSelectionRange();
- if (t.isEmpty())this.$inSelection = !1; else {
- var n = this.getDocumentPosition();
- this.$inSelection = t.contains(n.row, n.column)
- }
- }
- return this.$inSelection
- }, this.getButton = function () {
- return r.getButton(this.domEvent)
- }, this.getShiftKey = function () {
- return this.domEvent.shiftKey
- }, this.getAccelKey = i.isMac ? function () {
- return this.domEvent.metaKey
- } : function () {
- return this.domEvent.ctrlKey
- }
- }).call(s.prototype)
-}), ace.define("ace/mouse/dragdrop", ["require", "exports", "module", "ace/lib/event"], function (e, t, n) {
- var r = e("../lib/event"), i = function (e) {
- var t = e.editor, n, i, s, o, u, a, f, l = 0, c = t.container;
- r.addListener(c, "dragenter", function (e) {
- if (t.getReadOnly())return;
- l++;
- if (!n) {
- u = t.getSelectionRange(), a = t.selection.isBackwards();
- var i = t.getSelectionStyle();
- n = t.session.addMarker(u, "ace_selection", i), t.clearSelection(), clearInterval(o), o = setInterval(h, 20)
- }
- return r.preventDefault(e)
- }), r.addListener(c, "dragover", function (e) {
- if (t.getReadOnly())return;
- return i = e.clientX, s = e.clientY, r.preventDefault(e)
- });
- var h = function () {
- f = t.renderer.screenToTextCoordinates(i, s), t.moveCursorToPosition(f), t.renderer.scrollCursorIntoView()
- };
- r.addListener(c, "dragleave", function (e) {
- if (t.getReadOnly())return;
- l--;
- if (l > 0)return;
- return clearInterval(o), t.session.removeMarker(n), n = null, t.selection.setSelectionRange(u, a), r.preventDefault(e)
- }), r.addListener(c, "drop", function (e) {
- if (t.getReadOnly())return;
- return l = 0, clearInterval(o), t.session.removeMarker(n), n = null, u.end = t.session.insert(f, e.dataTransfer.getData("Text")), u.start = f, t.focus(), t.selection.setSelectionRange(u), r.preventDefault(e)
- })
- };
- t.DragdropHandler = i
-}), ace.define("ace/mouse/fold_handler", ["require", "exports", "module"], function (e, t, n) {
- function r(e) {
- e.on("click", function (t) {
- var n = t.getDocumentPosition(), r = e.session, i = r.getFoldAt(n.row, n.column, 1);
- i && (t.getAccelKey() ? r.removeFold(i) : r.expandFold(i), t.stop())
- }), e.on("guttermousedown", function (t) {
- if (!e.isFocused())return;
- var n = e.renderer.$gutterLayer.getRegion(t);
- if (n == "foldWidgets") {
- var r = t.getDocumentPosition().row, i = e.session;
- i.foldWidgets && i.foldWidgets[r] && e.session.onFoldWidgetClick(r, t), t.stop()
- }
- }), e.on("gutterdblclick", function (t) {
- var n = e.renderer.$gutterLayer.getRegion(t);
- if (n == "foldWidgets") {
- var r = t.getDocumentPosition().row, i = e.session, s = i.foldWidgets;
- if (!s || s[r])return;
- var o = r - 1, u;
- while (o >= 0) {
- var a = s[o];
- a == null && (a = s[o] = i.getFoldWidget());
- if (a == "start") {
- var f = i.getFoldWidgetRange(o);
- u || (u = f);
- if (f && f.end.row >= r)break
- }
- o--
- }
- o == -1 && (f = u);
- if (f) {
- var r = f.start.row, l = i.getFoldAt(r, i.getLine(r).length, 1);
- l ? i.removeFold(l) : (i.addFold("...", f), e.renderer.scrollCursorIntoView({row: f.start.row, column: 0}))
- }
- t.stop()
- }
- })
- }
-
- t.FoldHandler = r
-}), ace.define("ace/keyboard/keybinding", ["require", "exports", "module", "ace/lib/keys", "ace/lib/event"], function (e, t, n) {
- var r = e("../lib/keys"), i = e("../lib/event"), s = function (e) {
- this.$editor = e, this.$data = {}, this.$handlers = [], this.setDefaultHandler(e.commands)
- };
- (function () {
- this.setDefaultHandler = function (e) {
- this.removeKeyboardHandler(this.$defaultHandler), this.$defaultHandler = e, this.addKeyboardHandler(e, 0), this.$data = {editor: this.$editor}
- }, this.setKeyboardHandler = function (e) {
- if (this.$handlers[this.$handlers.length - 1] == e)return;
- while (this.$handlers[1])this.removeKeyboardHandler(this.$handlers[1]);
- this.addKeyboardHandler(e, 1)
- }, this.addKeyboardHandler = function (e, t) {
- if (!e)return;
- var n = this.$handlers.indexOf(e);
- n != -1 && this.$handlers.splice(n, 1), t == undefined ? this.$handlers.push(e) : this.$handlers.splice(t, 0, e), n == -1 && e.attach && e.attach(this.$editor)
- }, this.removeKeyboardHandler = function (e) {
- var t = this.$handlers.indexOf(e);
- return t == -1 ? !1 : (this.$handlers.splice(t, 1), e.detach && e.detach(this.$editor), !0)
- }, this.getKeyboardHandler = function () {
- return this.$handlers[this.$handlers.length - 1]
- }, this.$callKeyboardHandlers = function (e, t, n, r) {
- var s, o = !1, u = this.$editor.commands;
- for (var a = this.$handlers.length; a--;) {
- s = this.$handlers[a].handleKeyboard(this.$data, e, t, n, r);
- if (!s || !s.command)continue;
- s.command == "null" ? o = s.passEvent != 1 : o = u.exec(s.command, this.$editor, s.args, r), o && r && e != -1 && i.stopEvent(r);
- if (o)break
- }
- return o
- }, this.onCommandKey = function (e, t, n) {
- var i = r.keyCodeToString(n);
- this.$callKeyboardHandlers(t, i, n, e)
- }, this.onTextInput = function (e) {
- var t = this.$callKeyboardHandlers(-1, e);
- t || this.$editor.commands.exec("insertstring", this.$editor, e)
- }
- }).call(s.prototype), t.KeyBinding = s
-}), ace.define("ace/edit_session", ["require", "exports", "module", "ace/config", "ace/lib/oop", "ace/lib/lang", "ace/lib/net", "ace/lib/event_emitter", "ace/selection", "ace/mode/text", "ace/range", "ace/document", "ace/background_tokenizer", "ace/search_highlight", "ace/edit_session/folding", "ace/edit_session/bracket_match"], function (e, t, n) {
- var r = e("./config"), i = e("./lib/oop"), s = e("./lib/lang"), o = e("./lib/net"), u = e("./lib/event_emitter").EventEmitter, a = e("./selection").Selection, f = e("./mode/text").Mode, l = e("./range").Range, c = e("./document").Document, h = e("./background_tokenizer").BackgroundTokenizer, p = e("./search_highlight").SearchHighlight, d = function (e, t) {
- this.$breakpoints = [], this.$decorations = [], this.$frontMarkers = {}, this.$backMarkers = {}, this.$markerId = 1, this.$undoSelect = !0, this.$foldData = [], this.$foldData.toString = function () {
- var e = "";
- return this.forEach(function (t) {
- e += "\n" + t.toString()
- }), e
- }, this.on("changeFold", this.onChangeFold.bind(this)), this.$onChange = this.onChange.bind(this);
- if (typeof e != "object" || !e.getLine)e = new c(e);
- this.setDocument(e), this.selection = new a(this), this.setMode(t)
- };
- (function () {
- function g(e) {
- return e < 4352 ? !1 : e >= 4352 && e <= 4447 || e >= 4515 && e <= 4519 || e >= 4602 && e <= 4607 || e >= 9001 && e <= 9002 || e >= 11904 && e <= 11929 || e >= 11931 && e <= 12019 || e >= 12032 && e <= 12245 || e >= 12272 && e <= 12283 || e >= 12288 && e <= 12350 || e >= 12353 && e <= 12438 || e >= 12441 && e <= 12543 || e >= 12549 && e <= 12589 || e >= 12593 && e <= 12686 || e >= 12688 && e <= 12730 || e >= 12736 && e <= 12771 || e >= 12784 && e <= 12830 || e >= 12832 && e <= 12871 || e >= 12880 && e <= 13054 || e >= 13056 && e <= 19903 || e >= 19968 && e <= 42124 || e >= 42128 && e <= 42182 || e >= 43360 && e <= 43388 || e >= 44032 && e <= 55203 || e >= 55216 && e <= 55238 || e >= 55243 && e <= 55291 || e >= 63744 && e <= 64255 || e >= 65040 && e <= 65049 || e >= 65072 && e <= 65106 || e >= 65108 && e <= 65126 || e >= 65128 && e <= 65131 || e >= 65281 && e <= 65376 || e >= 65504 && e <= 65510
- }
-
- i.implement(this, u), this.setDocument = function (e) {
- this.doc && this.doc.removeListener("change", this.$onChange), this.doc = e, e.on("change", this.$onChange), this.bgTokenizer && this.bgTokenizer.setDocument(this.getDocument()), this.resetCaches()
- }, this.getDocument = function () {
- return this.doc
- }, this.$resetRowCache = function (e) {
- if (!e) {
- this.$docRowCache = [], this.$screenRowCache = [];
- return
- }
- var t = this.$getRowCacheIndex(this.$docRowCache, e) + 1, n = this.$docRowCache.length;
- this.$docRowCache.splice(t, n), this.$screenRowCache.splice(t, n)
- }, this.$getRowCacheIndex = function (e, t) {
- var n = 0, r = e.length - 1;
- while (n <= r) {
- var i = n + r >> 1, s = e[i];
- if (t > s)n = i + 1; else {
- if (!(t < s))return i;
- r = i - 1
- }
- }
- return n - 1
- }, this.resetCaches = function () {
- this.$modified = !0, this.$wrapData = [], this.$rowLengthCache = [], this.$resetRowCache(0), this.bgTokenizer && this.bgTokenizer.start(0)
- }, this.onChangeFold = function (e) {
- var t = e.data;
- this.$resetRowCache(t.start.row)
- }, this.onChange = function (e) {
- var t = e.data;
- this.$modified = !0, this.$resetRowCache(t.range.start.row);
- var n = this.$updateInternalDataOnChange(e);
- !this.$fromUndo && this.$undoManager && !t.ignore && (this.$deltasDoc.push(t), n && n.length != 0 && this.$deltasFold.push({action: "removeFolds", folds: n}), this.$informUndoManager.schedule()), this.bgTokenizer.$updateOnChange(t), this._emit("change", e)
- }, this.setValue = function (e) {
- this.doc.setValue(e), this.selection.moveCursorTo(0, 0), this.selection.clearSelection(), this.$resetRowCache(0), this.$deltas = [], this.$deltasDoc = [], this.$deltasFold = [], this.getUndoManager().reset()
- }, this.getValue = this.toString = function () {
- return this.doc.getValue()
- }, this.getSelection = function () {
- return this.selection
- }, this.getState = function (e) {
- return this.bgTokenizer.getState(e)
- }, this.getTokens = function (e) {
- return this.bgTokenizer.getTokens(e)
- }, this.getTokenAt = function (e, t) {
- var n = this.bgTokenizer.getTokens(e), r, i = 0;
- if (t == null)s = n.length - 1, i = this.getLine(e).length; else for (var s = 0; s < n.length; s++) {
- i += n[s].value.length;
- if (i >= t)break
- }
- return r = n[s], r ? (r.index = s, r.start = i - r.value.length, r) : null
- }, this.setUndoManager = function (e) {
- this.$undoManager = e, this.$deltas = [], this.$deltasDoc = [], this.$deltasFold = [], this.$informUndoManager && this.$informUndoManager.cancel();
- if (e) {
- var t = this;
- this.$syncInformUndoManager = function () {
- t.$informUndoManager.cancel(), t.$deltasFold.length && (t.$deltas.push({group: "fold", deltas: t.$deltasFold}), t.$deltasFold = []), t.$deltasDoc.length && (t.$deltas.push({group: "doc", deltas: t.$deltasDoc}), t.$deltasDoc = []), t.$deltas.length > 0 && e.execute({action: "aceupdate", args: [t.$deltas, t]}), t.$deltas = []
- }, this.$informUndoManager = s.deferredCall(this.$syncInformUndoManager)
- }
- }, this.$defaultUndoManager = {undo: function () {
- }, redo: function () {
- }, reset: function () {
- }}, this.getUndoManager = function () {
- return this.$undoManager || this.$defaultUndoManager
- }, this.getTabString = function () {
- return this.getUseSoftTabs() ? s.stringRepeat(" ", this.getTabSize()) : " "
- }, this.$useSoftTabs = !0, this.setUseSoftTabs = function (e) {
- if (this.$useSoftTabs === e)return;
- this.$useSoftTabs = e
- }, this.getUseSoftTabs = function () {
- return this.$useSoftTabs
- }, this.$tabSize = 4, this.setTabSize = function (e) {
- if (isNaN(e) || this.$tabSize === e)return;
- this.$modified = !0, this.$rowLengthCache = [], this.$tabSize = e, this._emit("changeTabSize")
- }, this.getTabSize = function () {
- return this.$tabSize
- }, this.isTabStop = function (e) {
- return this.$useSoftTabs && e.column % this.$tabSize == 0
- }, this.$overwrite = !1, this.setOverwrite = function (e) {
- if (this.$overwrite == e)return;
- this.$overwrite = e, this._emit("changeOverwrite")
- }, this.getOverwrite = function () {
- return this.$overwrite
- }, this.toggleOverwrite = function () {
- this.setOverwrite(!this.$overwrite)
- }, this.addGutterDecoration = function (e, t) {
- this.$decorations[e] || (this.$decorations[e] = ""), this.$decorations[e] += " " + t, this._emit("changeBreakpoint", {})
- }, this.removeGutterDecoration = function (e, t) {
- this.$decorations[e] = (this.$decorations[e] || "").replace(" " + t, ""), this._emit("changeBreakpoint", {})
- }, this.getBreakpoints = function () {
- return this.$breakpoints
- }, this.setBreakpoints = function (e) {
- this.$breakpoints = [];
- for (var t = 0; t < e.length; t++)this.$breakpoints[e[t]] = "ace_breakpoint";
- this._emit("changeBreakpoint", {})
- }, this.clearBreakpoints = function () {
- this.$breakpoints = [], this._emit("changeBreakpoint", {})
- }, this.setBreakpoint = function (e, t) {
- t === undefined && (t = "ace_breakpoint"), t ? this.$breakpoints[e] = t : delete this.$breakpoints[e], this._emit("changeBreakpoint", {})
- }, this.clearBreakpoint = function (e) {
- delete this.$breakpoints[e], this._emit("changeBreakpoint", {})
- }, this.addMarker = function (e, t, n, r) {
- var i = this.$markerId++, s = {range: e, type: n || "line", renderer: typeof n == "function" ? n : null, clazz: t, inFront: !!r, id: i};
- return r ? (this.$frontMarkers[i] = s, this._emit("changeFrontMarker")) : (this.$backMarkers[i] = s, this._emit("changeBackMarker")), i
- }, this.addDynamicMarker = function (e, t) {
- if (!e.update)return;
- var n = this.$markerId++;
- return e.id = n, e.inFront = !!t, t ? (this.$frontMarkers[n] = e, this._emit("changeFrontMarker")) : (this.$backMarkers[n] = e, this._emit("changeBackMarker")), e
- }, this.removeMarker = function (e) {
- var t = this.$frontMarkers[e] || this.$backMarkers[e];
- if (!t)return;
- var n = t.inFront ? this.$frontMarkers : this.$backMarkers;
- t && (delete n[e], this._emit(t.inFront ? "changeFrontMarker" : "changeBackMarker"))
- }, this.getMarkers = function (e) {
- return e ? this.$frontMarkers : this.$backMarkers
- }, this.highlight = function (e) {
- if (!this.$searchHighlight) {
- var t = new p(null, "ace_selected-word", "text");
- this.$searchHighlight = this.addDynamicMarker(t)
- }
- this.$searchHighlight.setRegexp(e)
- }, this.highlightLines = function (e, t, n, r) {
- typeof t != "number" && (n = t, t = e), n || (n = "ace_step");
- var i = new l(e, 0, t, Infinity), s = this.addMarker(i, n, "fullLine", r);
- return i.id = s, i
- }, this.setAnnotations = function (e) {
- this.$annotations = e, this._emit("changeAnnotation", {})
- }, this.getAnnotations = function () {
- return this.$annotations || []
- }, this.clearAnnotations = function () {
- this.$annotations = {}, this._emit("changeAnnotation", {})
- }, this.$detectNewLine = function (e) {
- var t = e.match(/^.*?(\r?\n)/m);
- t ? this.$autoNewLine = t[1] : this.$autoNewLine = "\n"
- }, this.getWordRange = function (e, t) {
- var n = this.getLine(e), r = !1;
- t > 0 && (r = !!n.charAt(t - 1).match(this.tokenRe)), r || (r = !!n.charAt(t).match(this.tokenRe));
- if (r)var i = this.tokenRe; else if (/^\s+$/.test(n.slice(t - 1, t + 1)))var i = /\s/; else var i = this.nonTokenRe;
- var s = t;
- if (s > 0) {
- do s--; while (s >= 0 && n.charAt(s).match(i));
- s++
- }
- var o = t;
- while (o < n.length && n.charAt(o).match(i))o++;
- return new l(e, s, e, o)
- }, this.getAWordRange = function (e, t) {
- var n = this.getWordRange(e, t), r = this.getLine(n.end.row);
- while (r.charAt(n.end.column).match(/[ \t]/))n.end.column += 1;
- return n
- }, this.setNewLineMode = function (e) {
- this.doc.setNewLineMode(e)
- }, this.getNewLineMode = function () {
- return this.doc.getNewLineMode()
- }, this.$useWorker = !0, this.setUseWorker = function (e) {
- if (this.$useWorker == e)return;
- this.$useWorker = e, this.$stopWorker(), e && this.$startWorker()
- }, this.getUseWorker = function () {
- return this.$useWorker
- }, this.onReloadTokenizer = function (e) {
- var t = e.data;
- this.bgTokenizer.start(t.first), this._emit("tokenizerUpdate", e)
- }, this.$modes = {}, this.$mode = null, this.$modeId = null, this.setMode = function (e) {
- if (e && typeof e == "object") {
- if (e.getTokenizer)return this.$onChangeMode(e);
- var t = e, n = t.path
- } else n = e || "ace/mode/text";
- this.$modes["ace/mode/text"] || (this.$modes["ace/mode/text"] = new f);
- if (this.$modes[n] && !t)return this.$onChangeMode(this.$modes[n]);
- this.$modeId = n, r.loadModule(["mode", n], function (e) {
- if (this.$modeId !== n)return;
- if (this.$modes[n] && !t)return this.$onChangeMode(this.$modes[n]);
- e && e.Mode && (e = new e.Mode(t), t || (this.$modes[n] = e, e.$id = n), this.$onChangeMode(e))
- }.bind(this)), this.$mode || this.$onChangeMode(this.$modes["ace/mode/text"], !0)
- }, this.$onChangeMode = function (e, t) {
- if (this.$mode === e)return;
- this.$mode = e, this.$stopWorker(), this.$useWorker && this.$startWorker();
- var n = e.getTokenizer();
- if (n.addEventListener !== undefined) {
- var r = this.onReloadTokenizer.bind(this);
- n.addEventListener("update", r)
- }
- if (!this.bgTokenizer) {
- this.bgTokenizer = new h(n);
- var i = this;
- this.bgTokenizer.addEventListener("update", function (e) {
- i._emit("tokenizerUpdate", e)
- })
- } else this.bgTokenizer.setTokenizer(n);
- this.bgTokenizer.setDocument(this.getDocument()), this.tokenRe = e.tokenRe, this.nonTokenRe = e.nonTokenRe, t || (this.$modeId = e.$id, this.$setFolding(e.foldingRules), this._emit("changeMode"), this.bgTokenizer.start(0))
- }, this.$stopWorker = function () {
- this.$worker && this.$worker.terminate(), this.$worker = null
- }, this.$startWorker = function () {
- if (typeof Worker != "undefined" && !e.noWorker)try {
- this.$worker = this.$mode.createWorker(this)
- } catch (t) {
- console.log("Could not load worker"), console.log(t), this.$worker = null
- } else this.$worker = null
- }, this.getMode = function () {
- return this.$mode
- }, this.$scrollTop = 0, this.setScrollTop = function (e) {
- e = Math.round(Math.max(0, e));
- if (this.$scrollTop === e)return;
- this.$scrollTop = e, this._emit("changeScrollTop", e)
- }, this.getScrollTop = function () {
- return this.$scrollTop
- }, this.$scrollLeft = 0, this.setScrollLeft = function (e) {
- e = Math.round(Math.max(0, e));
- if (this.$scrollLeft === e)return;
- this.$scrollLeft = e, this._emit("changeScrollLeft", e)
- }, this.getScrollLeft = function () {
- return this.$scrollLeft
- }, this.getScreenWidth = function () {
- return this.$computeWidth(), this.screenWidth
- }, this.$computeWidth = function (e) {
- if (this.$modified || e) {
- this.$modified = !1;
- if (this.$useWrapMode)return this.screenWidth = this.$wrapLimit;
- var t = this.doc.getAllLines(), n = this.$rowLengthCache, r = 0, i = 0, s = this.$foldData[i], o = s ? s.start.row : Infinity, u = t.length;
- for (var a = 0; a < u; a++) {
- if (a > o) {
- a = s.end.row + 1;
- if (a >= u)break;
- s = this.$foldData[i++], o = s ? s.start.row : Infinity
- }
- n[a] == null && (n[a] = this.$getStringScreenWidth(t[a])[0]), n[a] > r && (r = n[a])
- }
- this.screenWidth = r
- }
- }, this.getLine = function (e) {
- return this.doc.getLine(e)
- }, this.getLines = function (e, t) {
- return this.doc.getLines(e, t)
- }, this.getLength = function () {
- return this.doc.getLength()
- }, this.getTextRange = function (e) {
- return this.doc.getTextRange(e || this.selection.getRange())
- }, this.insert = function (e, t) {
- return this.doc.insert(e, t)
- }, this.remove = function (e) {
- return this.doc.remove(e)
- }, this.undoChanges = function (e, t) {
- if (!e.length)return;
- this.$fromUndo = !0;
- var n = null;
- for (var r = e.length - 1; r != -1; r--) {
- var i = e[r];
- i.group == "doc" ? (this.doc.revertDeltas(i.deltas), n = this.$getUndoSelection(i.deltas, !0, n)) : i.deltas.forEach(function (e) {
- this.addFolds(e.folds)
- }, this)
- }
- return this.$fromUndo = !1, n && this.$undoSelect && !t && this.selection.setSelectionRange(n), n
- }, this.redoChanges = function (e, t) {
- if (!e.length)return;
- this.$fromUndo = !0;
- var n = null;
- for (var r = 0; r < e.length; r++) {
- var i = e[r];
- i.group == "doc" && (this.doc.applyDeltas(i.deltas), n = this.$getUndoSelection(i.deltas, !1, n))
- }
- return this.$fromUndo = !1, n && this.$undoSelect && !t && this.selection.setSelectionRange(n), n
- }, this.setUndoSelect = function (e) {
- this.$undoSelect = e
- }, this.$getUndoSelection = function (e, t, n) {
- function r(e) {
- var n = e.action == "insertText" || e.action == "insertLines";
- return t ? !n : n
- }
-
- var i = e[0], s, o, u = !1;
- r(i) ? (s = i.range.clone(), u = !0) : (s = l.fromPoints(i.range.start, i.range.start), u = !1);
- for (var a = 1; a < e.length; a++)i = e[a], r(i) ? (o = i.range.start, s.compare(o.row, o.column) == -1 && s.setStart(i.range.start), o = i.range.end, s.compare(o.row, o.column) == 1 && s.setEnd(i.range.end), u = !0) : (o = i.range.start, s.compare(o.row, o.column) == -1 && (s = l.fromPoints(i.range.start, i.range.start)), u = !1);
- if (n != null) {
- var f = n.compareRange(s);
- f == 1 ? s.setStart(n.start) : f == -1 && s.setEnd(n.end)
- }
- return s
- }, this.replace = function (e, t) {
- return this.doc.replace(e, t)
- }, this.moveText = function (e, t) {
- var n = this.getTextRange(e);
- this.remove(e);
- var r = t.row, i = t.column;
- !e.isMultiLine() && e.start.row == r && e.end.column < i && (i -= n.length);
- if (e.isMultiLine() && e.end.row < r) {
- var s = this.doc.$split(n);
- r -= s.length - 1
- }
- var o = r + e.end.row - e.start.row, u = e.isMultiLine() ? e.end.column : i + e.end.column - e.start.column, a = new l(r, i, o, u);
- return this.insert(a.start, n), a
- }, this.indentRows = function (e, t, n) {
- n = n.replace(/\t/g, this.getTabString());
- for (var r = e; r <= t; r++)this.insert({row: r, column: 0}, n)
- }, this.outdentRows = function (e) {
- var t = e.collapseRows(), n = new l(0, 0, 0, 0), r = this.getTabSize();
- for (var i = t.start.row; i <= t.end.row; ++i) {
- var s = this.getLine(i);
- n.start.row = i, n.end.row = i;
- for (var o = 0; o < r; ++o)if (s.charAt(o) != " ")break;
- o < r && s.charAt(o) == " " ? (n.start.column = o, n.end.column = o + 1) : (n.start.column = 0, n.end.column = o), this.remove(n)
- }
- }, this.moveLinesUp = function (e, t) {
- if (e <= 0)return 0;
- var n = this.doc.removeLines(e, t);
- return this.doc.insertLines(e - 1, n), -1
- }, this.moveLinesDown = function (e, t) {
- if (t >= this.doc.getLength() - 1)return 0;
- var n = this.doc.removeLines(e, t);
- return this.doc.insertLines(e + 1, n), 1
- }, this.duplicateLines = function (e, t) {
- var e = this.$clipRowToDocument(e), t = this.$clipRowToDocument(t), n = this.getLines(e, t);
- this.doc.insertLines(e, n);
- var r = t - e + 1;
- return r
- }, this.$clipRowToDocument = function (e) {
- return Math.max(0, Math.min(e, this.doc.getLength() - 1))
- }, this.$clipColumnToRow = function (e, t) {
- return t < 0 ? 0 : Math.min(this.doc.getLine(e).length, t)
- }, this.$clipPositionToDocument = function (e, t) {
- t = Math.max(0, t);
- if (e < 0)e = 0, t = 0; else {
- var n = this.doc.getLength();
- e >= n ? (e = n - 1, t = this.doc.getLine(n - 1).length) : t = Math.min(this.doc.getLine(e).length, t)
- }
- return{row: e, column: t}
- }, this.$clipRangeToDocument = function (e) {
- e.start.row < 0 ? (e.start.row = 0, e.start.column = 0) : e.start.column = this.$clipColumnToRow(e.start.row, e.start.column);
- var t = this.doc.getLength() - 1;
- return e.end.row > t ? (e.end.row = t, e.end.column = this.doc.getLine(t).length) : e.end.column = this.$clipColumnToRow(e.end.row, e.end.column), e
- }, this.$wrapLimit = 80, this.$useWrapMode = !1, this.$wrapLimitRange = {min: null, max: null}, this.setUseWrapMode = function (e) {
- if (e != this.$useWrapMode) {
- this.$useWrapMode = e, this.$modified = !0, this.$resetRowCache(0);
- if (e) {
- var t = this.getLength();
- this.$wrapData = [];
- for (var n = 0; n < t; n++)this.$wrapData.push([]);
- this.$updateWrapData(0, t - 1)
- }
- this._emit("changeWrapMode")
- }
- }, this.getUseWrapMode = function () {
- return this.$useWrapMode
- }, this.setWrapLimitRange = function (e, t) {
- if (this.$wrapLimitRange.min !== e || this.$wrapLimitRange.max !== t)this.$wrapLimitRange.min = e, this.$wrapLimitRange.max = t, this.$modified = !0, this._emit("changeWrapMode")
- }, this.adjustWrapLimit = function (e) {
- var t = this.$constrainWrapLimit(e);
- return t != this.$wrapLimit && t > 0 ? (this.$wrapLimit = t, this.$modified = !0, this.$useWrapMode && (this.$updateWrapData(0, this.getLength() - 1), this.$resetRowCache(0), this._emit("changeWrapLimit")), !0) : !1
- }, this.$constrainWrapLimit = function (e) {
- var t = this.$wrapLimitRange.min;
- t && (e = Math.max(t, e));
- var n = this.$wrapLimitRange.max;
- return n && (e = Math.min(n, e)), Math.max(1, e)
- }, this.getWrapLimit = function () {
- return this.$wrapLimit
- }, this.getWrapLimitRange = function () {
- return{min: this.$wrapLimitRange.min, max: this.$wrapLimitRange.max}
- }, this.$updateInternalDataOnChange = function (e) {
- var t = this.$useWrapMode, n, r = e.data.action, i = e.data.range.start.row, s = e.data.range.end.row, o = e.data.range.start, u = e.data.range.end, a = null;
- r.indexOf("Lines") != -1 ? (r == "insertLines" ? s = i + e.data.lines.length : s = i, n = e.data.lines ? e.data.lines.length : s - i) : n = s - i;
- if (n != 0)if (r.indexOf("remove") != -1) {
- this[t ? "$wrapData" : "$rowLengthCache"].splice(i, n);
- var f = this.$foldData;
- a = this.getFoldsInRange(e.data.range), this.removeFolds(a);
- var l = this.getFoldLine(u.row), c = 0;
- if (l) {
- l.addRemoveChars(u.row, u.column, o.column - u.column), l.shiftRow(-n);
- var h = this.getFoldLine(i);
- h && h !== l && (h.merge(l), l = h), c = f.indexOf(l) + 1
- }
- for (c; c < f.length; c++) {
- var l = f[c];
- l.start.row >= u.row && l.shiftRow(-n)
- }
- s = i
- } else {
- var p;
- if (t) {
- p = [i, 0];
- for (var d = 0; d < n; d++)p.push([]);
- this.$wrapData.splice.apply(this.$wrapData, p)
- } else p = Array(n), p.unshift(i, 0), this.$rowLengthCache.splice.apply(this.$rowLengthCache, p);
- var f = this.$foldData, l = this.getFoldLine(i), c = 0;
- if (l) {
- var v = l.range.compareInside(o.row, o.column);
- v == 0 ? (l = l.split(o.row, o.column), l.shiftRow(n), l.addRemoveChars(s, 0, u.column - o.column)) : v == -1 && (l.addRemoveChars(i, 0, u.column - o.column), l.shiftRow(n)), c = f.indexOf(l) + 1
- }
- for (c; c < f.length; c++) {
- var l = f[c];
- l.start.row >= i && l.shiftRow(n)
- }
- } else {
- n = Math.abs(e.data.range.start.column - e.data.range.end.column), r.indexOf("remove") != -1 && (a = this.getFoldsInRange(e.data.range), this.removeFolds(a), n = -n);
- var l = this.getFoldLine(i);
- l && l.addRemoveChars(i, o.column, n)
- }
- return t && this.$wrapData.length != this.doc.getLength() && console.error("doc.getLength() and $wrapData.length have to be the same!"), t ? this.$updateWrapData(i, s) : this.$updateRowLengthCache(i, s), a
- }, this.$updateRowLengthCache = function (e, t, n) {
- this.$rowLengthCache[e] = null, this.$rowLengthCache[t] = null
- }, this.$updateWrapData = function (e, t) {
- var n = this.doc.getAllLines(), r = this.getTabSize(), i = this.$wrapData, u = this.$wrapLimit, f, l, c = e;
- t = Math.min(t, n.length - 1);
- while (c <= t) {
- l = this.getFoldLine(c, l);
- if (!l)f = this.$getDisplayTokens(s.stringTrimRight(n[c])), i[c] = this.$computeWrapSplits(f, u, r), c++; else {
- f = [], l.walk(function (e, t, r, i) {
- var s;
- if (e != null) {
- s = this.$getDisplayTokens(e, f.length), s[0] = o;
- for (var u = 1; u < s.length; u++)s[u] = a
- } else s = this.$getDisplayTokens(n[t].substring(i, r), f.length);
- f = f.concat(s)
- }.bind(this), l.end.row, n[l.end.row].length + 1);
- while (f.length != 0 && f[f.length - 1] >= d)f.pop();
- i[l.start.row] = this.$computeWrapSplits(f, u, r), c = l.end.row + 1
- }
- }
- };
- var t = 1, n = 2, o = 3, a = 4, c = 9, d = 10, v = 11, m = 12;
- this.$computeWrapSplits = function (e, t) {
- function u(t) {
- var r = e.slice(i, t), o = r.length;
- r.join("").replace(/12/g,function () {
- o -= 1
- }).replace(/2/g, function () {
- o -= 1
- }), s += o, n.push(s), i = t
- }
-
- if (e.length == 0)return[];
- var n = [], r = e.length, i = 0, s = 0;
- while (r - i > t) {
- var f = i + t;
- if (e[f] >= d) {
- while (e[f] >= d)f++;
- u(f);
- continue
- }
- if (e[f] == o || e[f] == a) {
- for (f; f != i - 1; f--)if (e[f] == o)break;
- if (f > i) {
- u(f);
- continue
- }
- f = i + t;
- for (f; f < e.length; f++)if (e[f] != a)break;
- if (f == e.length)break;
- u(f);
- continue
- }
- var l = Math.max(f - 10, i - 1);
- while (f > l && e[f] < o)f--;
- while (f > l && e[f] == c)f--;
- if (f > l) {
- u(++f);
- continue
- }
- f = i + t, u(f)
- }
- return n
- }, this.$getDisplayTokens = function (e, r) {
- var i = [], s;
- r = r || 0;
- for (var o = 0; o < e.length; o++) {
- var u = e.charCodeAt(o);
- if (u == 9) {
- s = this.getScreenTabSize(i.length + r), i.push(v);
- for (var a = 1; a < s; a++)i.push(m)
- } else u == 32 ? i.push(d) : u > 39 && u < 48 || u > 57 && u < 64 ? i.push(c) : u >= 4352 && g(u) ? i.push(t, n) : i.push(t)
- }
- return i
- }, this.$getStringScreenWidth = function (e, t, n) {
- if (t == 0)return[0, 0];
- t == null && (t = Infinity), n = n || 0;
- var r, i;
- for (i = 0; i < e.length; i++) {
- r = e.charCodeAt(i), r == 9 ? n += this.getScreenTabSize(n) : r >= 4352 && g(r) ? n += 2 : n += 1;
- if (n > t)break
- }
- return[n, i]
- }, this.getRowLength = function (e) {
- return!this.$useWrapMode || !this.$wrapData[e] ? 1 : this.$wrapData[e].length + 1
- }, this.getScreenLastRowColumn = function (e) {
- var t = this.screenToDocumentPosition(e, Number.MAX_VALUE);
- return this.documentToScreenColumn(t.row, t.column)
- }, this.getDocumentLastRowColumn = function (e, t) {
- var n = this.documentToScreenRow(e, t);
- return this.getScreenLastRowColumn(n)
- }, this.getDocumentLastRowColumnPosition = function (e, t) {
- var n = this.documentToScreenRow(e, t);
- return this.screenToDocumentPosition(n, Number.MAX_VALUE / 10)
- }, this.getRowSplitData = function (e) {
- return this.$useWrapMode ? this.$wrapData[e] : undefined
- }, this.getScreenTabSize = function (e) {
- return this.$tabSize - e % this.$tabSize
- }, this.screenToDocumentRow = function (e, t) {
- return this.screenToDocumentPosition(e, t).row
- }, this.screenToDocumentColumn = function (e, t) {
- return this.screenToDocumentPosition(e, t).column
- }, this.screenToDocumentPosition = function (e, t) {
- if (e < 0)return{row: 0, column: 0};
- var n, r = 0, i = 0, s, o = 0, u = 0, a = this.$screenRowCache, f = this.$getRowCacheIndex(a, e), l = a.length;
- if (l && f >= 0)var o = a[f], r = this.$docRowCache[f], c = e > a[l - 1]; else var c = !l;
- var h = this.getLength() - 1, p = this.getNextFoldLine(r), d = p ? p.start.row : Infinity;
- while (o <= e) {
- u = this.getRowLength(r);
- if (o + u - 1 >= e || r >= h)break;
- o += u, r++, r > d && (r = p.end.row + 1, p = this.getNextFoldLine(r, p), d = p ? p.start.row : Infinity), c && (this.$docRowCache.push(r), this.$screenRowCache.push(o))
- }
- if (p && p.start.row <= r)n = this.getFoldDisplayLine(p), r = p.start.row; else {
- if (o + u <= e || r > h)return{row: h, column: this.getLine(h).length};
- n = this.getLine(r), p = null
- }
- if (this.$useWrapMode) {
- var v = this.$wrapData[r];
- v && (s = v[e - o], e > o && v.length && (i = v[e - o - 1] || v[v.length - 1], n = n.substring(i)))
- }
- return i += this.$getStringScreenWidth(n, t)[1], this.$useWrapMode && i >= s && (i = s - 1), p ? p.idxToPosition(i) : {row: r, column: i}
- }, this.documentToScreenPosition = function (e, t) {
- if (typeof t == "undefined")var n = this.$clipPositionToDocument(e.row, e.column); else n = this.$clipPositionToDocument(e, t);
- e = n.row, t = n.column;
- var r = 0, i = null, s = null;
- s = this.getFoldAt(e, t, 1), s && (e = s.start.row, t = s.start.column);
- var o, u = 0, a = this.$docRowCache, f = this.$getRowCacheIndex(a, e), l = a.length;
- if (l && f >= 0)var u = a[f], r = this.$screenRowCache[f], c = e > a[l - 1]; else var c = !l;
- var h = this.getNextFoldLine(u), p = h ? h.start.row : Infinity;
- while (u < e) {
- if (u >= p) {
- o = h.end.row + 1;
- if (o > e)break;
- h = this.getNextFoldLine(o, h), p = h ? h.start.row : Infinity
- } else o = u + 1;
- r += this.getRowLength(u), u = o, c && (this.$docRowCache.push(u), this.$screenRowCache.push(r))
- }
- var d = "";
- h && u >= p ? (d = this.getFoldDisplayLine(h, e, t), i = h.start.row) : (d = this.getLine(e).substring(0, t), i = e);
- if (this.$useWrapMode) {
- var v = this.$wrapData[i], m = 0;
- while (d.length >= v[m])r++, m++;
- d = d.substring(v[m - 1] || 0, d.length)
- }
- return{row: r, column: this.$getStringScreenWidth(d)[0]}
- }, this.documentToScreenColumn = function (e, t) {
- return this.documentToScreenPosition(e, t).column
- }, this.documentToScreenRow = function (e, t) {
- return this.documentToScreenPosition(e, t).row
- }, this.getScreenLength = function () {
- var e = 0, t = null;
- if (!this.$useWrapMode) {
- e = this.getLength();
- var n = this.$foldData;
- for (var r = 0; r < n.length; r++)t = n[r], e -= t.end.row - t.start.row
- } else {
- var i = this.$wrapData.length, s = 0, r = 0, t = this.$foldData[r++], o = t ? t.start.row : Infinity;
- while (s < i)e += this.$wrapData[s].length + 1, s++, s > o && (s = t.end.row + 1, t = this.$foldData[r++], o = t ? t.start.row : Infinity)
- }
- return e
- }
- }).call(d.prototype), e("./edit_session/folding").Folding.call(d.prototype), e("./edit_session/bracket_match").BracketMatch.call(d.prototype), t.EditSession = d
-}), ace.define("ace/config", ["require", "exports", "module", "ace/lib/lang", "ace/lib/oop", "ace/lib/net", "ace/lib/event_emitter"], function (e, t, n) {
- "no use strict";
- function f(e) {
- return e.replace(/-(.)/g, function (e, t) {
- return t.toUpperCase()
- })
- }
-
- var r = e("./lib/lang"), i = e("./lib/oop"), s = e("./lib/net"), o = e("./lib/event_emitter").EventEmitter, u = function () {
- return this
- }(), a = {packaged: !1, workerPath: null, modePath: null, themePath: null, basePath: "", suffix: ".js", $moduleUrls: {}};
- t.get = function (e) {
- if (!a.hasOwnProperty(e))throw new Error("Unknown config key: " + e);
- return a[e]
- }, t.set = function (e, t) {
- if (!a.hasOwnProperty(e))throw new Error("Unknown config key: " + e);
- a[e] = t
- }, t.all = function () {
- return r.copyObject(a)
- }, i.implement(t, o), t.moduleUrl = function (e, t) {
- if (a.$moduleUrls[e])return a.$moduleUrls[e];
- var n = e.split("/");
- t = t || n[n.length - 2] || "";
- var r = n[n.length - 1].replace(t, "").replace(/(^[\-_])|([\-_]$)/, "");
- !r && n.length > 1 && (r = n[n.length - 2]);
- var i = a[t + "Path"];
- return i == null && (i = a.basePath), i && i.slice(-1) != "/" && (i += "/"), i + t + "-" + r + this.get("suffix")
- }, t.setModuleUrl = function (e, t) {
- return a.$moduleUrls[e] = t
- }, t.loadModule = function (n, r) {
- var i, o;
- Array.isArray(n) && (o = n[0], n = n[1]);
- try {
- i = e(n)
- } catch (u) {
- }
- if (i)return r(i);
- var a = function () {
- e([n], function (e) {
- t._emit("load.module", {name: n, module: e}), r(e)
- })
- };
- if (!t.get("packaged"))return a();
- s.loadScript(t.moduleUrl(n, o), a)
- }, t.init = function () {
- a.packaged = e.packaged || n.packaged || u.define && define.packaged;
- if (!u.document)return"";
- var r = {}, i = "", s = document.getElementsByTagName("script");
- for (var o = 0; o < s.length; o++) {
- var l = s[o], c = l.src || l.getAttribute("src");
- if (!c)continue;
- var h = l.attributes;
- for (var p = 0, d = h.length; p < d; p++) {
- var v = h[p];
- v.name.indexOf("data-ace-") === 0 && (r[f(v.name.replace(/^data-ace-/, ""))] = v.value)
- }
- var m = c.match(/^(.*)\/ace(\-\w+)?\.js(\?|$)/);
- m && (i = m[1])
- }
- i && (r.base = r.base || i, r.packaged = !0), r.basePath = r.base, r.workerPath = r.workerPath || r.base, r.modePath = r.modePath || r.base, r.themePath = r.themePath || r.base, delete r.base;
- for (var g in r)typeof r[g] != "undefined" && t.set(g, r[g])
- }
-}), ace.define("ace/lib/net", ["require", "exports", "module", "ace/lib/useragent"], function (e, t, n) {
- var r = e("./useragent");
- t.get = function (e, n) {
- var r = t.createXhr();
- r.open("GET", e, !0), r.onreadystatechange = function (e) {
- r.readyState === 4 && n(r.responseText)
- }, r.send(null)
- };
- var i = ["Msxml2.XMLHTTP", "Microsoft.XMLHTTP", "Msxml2.XMLHTTP.4.0"];
- t.createXhr = function () {
- var e, t, n;
- if (typeof XMLHttpRequest != "undefined")return new XMLHttpRequest;
- for (t = 0; t < 3; t++) {
- n = i[t];
- try {
- e = new ActiveXObject(n)
- } catch (r) {
- }
- if (e) {
- i = [n];
- break
- }
- }
- if (!e)throw new Error("createXhr(): XMLHttpRequest not available");
- return e
- }, t.loadScript = function (e, t) {
- var n = document.getElementsByTagName("head")[0], i = document.createElement("script");
- i.src = e, n.appendChild(i), r.isOldIE ? i.onreadystatechange = function () {
- this.readyState == "loaded" && t()
- } : i.onload = t
- }
-}), ace.define("ace/lib/event_emitter", ["require", "exports", "module"], function (e, t, n) {
- var r = {};
- r._emit = r._dispatchEvent = function (e, t) {
- this._eventRegistry = this._eventRegistry || {}, this._defaultHandlers = this._defaultHandlers || {};
- var n = this._eventRegistry[e] || [], r = this._defaultHandlers[e];
- if (!n.length && !r)return;
- if (typeof t != "object" || !t)t = {};
- t.type || (t.type = e), t.stopPropagation || (t.stopPropagation = function () {
- this.propagationStopped = !0
- }), t.preventDefault || (t.preventDefault = function () {
- this.defaultPrevented = !0
- });
- for (var i = 0; i < n.length; i++) {
- n[i](t);
- if (t.propagationStopped)break
- }
- if (r && !t.defaultPrevented)return r(t)
- }, r.setDefaultHandler = function (e, t) {
- this._defaultHandlers = this._defaultHandlers || {};
- if (this._defaultHandlers[e])throw new Error("The default handler for '" + e + "' is already set");
- this._defaultHandlers[e] = t
- }, r.on = r.addEventListener = function (e, t) {
- this._eventRegistry = this._eventRegistry || {};
- var n = this._eventRegistry[e];
- n || (n = this._eventRegistry[e] = []), n.indexOf(t) == -1 && n.push(t)
- }, r.removeListener = r.removeEventListener = function (e, t) {
- this._eventRegistry = this._eventRegistry || {};
- var n = this._eventRegistry[e];
- if (!n)return;
- var r = n.indexOf(t);
- r !== -1 && n.splice(r, 1)
- }, r.removeAllListeners = function (e) {
- this._eventRegistry && (this._eventRegistry[e] = [])
- }, t.EventEmitter = r
-}), ace.define("ace/selection", ["require", "exports", "module", "ace/lib/oop", "ace/lib/lang", "ace/lib/event_emitter", "ace/range"], function (e, t, n) {
- var r = e("./lib/oop"), i = e("./lib/lang"), s = e("./lib/event_emitter").EventEmitter, o = e("./range").Range, u = function (e) {
- this.session = e, this.doc = e.getDocument(), this.clearSelection(), this.lead = this.selectionLead = this.doc.createAnchor(0, 0), this.anchor = this.selectionAnchor = this.doc.createAnchor(0, 0);
- var t = this;
- this.lead.on("change", function (e) {
- t._emit("changeCursor"), t.$isEmpty || t._emit("changeSelection"), !t.$keepDesiredColumnOnChange && e.old.column != e.value.column && (t.$desiredColumn = null)
- }), this.selectionAnchor.on("change", function () {
- t.$isEmpty || t._emit("changeSelection")
- })
- };
- (function () {
- r.implement(this, s), this.isEmpty = function () {
- return this.$isEmpty || this.anchor.row == this.lead.row && this.anchor.column == this.lead.column
- }, this.isMultiLine = function () {
- return this.isEmpty() ? !1 : this.getRange().isMultiLine()
- }, this.getCursor = function () {
- return this.lead.getPosition()
- }, this.setSelectionAnchor = function (e, t) {
- this.anchor.setPosition(e, t), this.$isEmpty && (this.$isEmpty = !1, this._emit("changeSelection"))
- }, this.getSelectionAnchor = function () {
- return this.$isEmpty ? this.getSelectionLead() : this.anchor.getPosition()
- }, this.getSelectionLead = function () {
- return this.lead.getPosition()
- }, this.shiftSelection = function (e) {
- if (this.$isEmpty) {
- this.moveCursorTo(this.lead.row, this.lead.column + e);
- return
- }
- var t = this.getSelectionAnchor(), n = this.getSelectionLead(), r = this.isBackwards();
- (!r || t.column !== 0) && this.setSelectionAnchor(t.row, t.column + e), (r || n.column !== 0) && this.$moveSelection(function () {
- this.moveCursorTo(n.row, n.column + e)
- })
- }, this.isBackwards = function () {
- var e = this.anchor, t = this.lead;
- return e.row > t.row || e.row == t.row && e.column > t.column
- }, this.getRange = function () {
- var e = this.anchor, t = this.lead;
- return this.isEmpty() ? o.fromPoints(t, t) : this.isBackwards() ? o.fromPoints(t, e) : o.fromPoints(e, t)
- }, this.clearSelection = function () {
- this.$isEmpty || (this.$isEmpty = !0, this._emit("changeSelection"))
- }, this.selectAll = function () {
- var e = this.doc.getLength() - 1;
- this.setSelectionAnchor(0, 0), this.moveCursorTo(e, this.doc.getLine(e).length)
- }, this.setRange = this.setSelectionRange = function (e, t) {
- t ? (this.setSelectionAnchor(e.end.row, e.end.column), this.selectTo(e.start.row, e.start.column)) : (this.setSelectionAnchor(e.start.row, e.start.column), this.selectTo(e.end.row, e.end.column)), this.$desiredColumn = null
- }, this.$moveSelection = function (e) {
- var t = this.lead;
- this.$isEmpty && this.setSelectionAnchor(t.row, t.column), e.call(this)
- }, this.selectTo = function (e, t) {
- this.$moveSelection(function () {
- this.moveCursorTo(e, t)
- })
- }, this.selectToPosition = function (e) {
- this.$moveSelection(function () {
- this.moveCursorToPosition(e)
- })
- }, this.selectUp = function () {
- this.$moveSelection(this.moveCursorUp)
- }, this.selectDown = function () {
- this.$moveSelection(this.moveCursorDown)
- }, this.selectRight = function () {
- this.$moveSelection(this.moveCursorRight)
- }, this.selectLeft = function () {
- this.$moveSelection(this.moveCursorLeft)
- }, this.selectLineStart = function () {
- this.$moveSelection(this.moveCursorLineStart)
- }, this.selectLineEnd = function () {
- this.$moveSelection(this.moveCursorLineEnd)
- }, this.selectFileEnd = function () {
- this.$moveSelection(this.moveCursorFileEnd)
- }, this.selectFileStart = function () {
- this.$moveSelection(this.moveCursorFileStart)
- }, this.selectWordRight = function () {
- this.$moveSelection(this.moveCursorWordRight)
- }, this.selectWordLeft = function () {
- this.$moveSelection(this.moveCursorWordLeft)
- }, this.getWordRange = function (e, t) {
- if (typeof t == "undefined") {
- var n = e || this.lead;
- e = n.row, t = n.column
- }
- return this.session.getWordRange(e, t)
- }, this.selectWord = function () {
- this.setSelectionRange(this.getWordRange())
- }, this.selectAWord = function () {
- var e = this.getCursor(), t = this.session.getAWordRange(e.row, e.column);
- this.setSelectionRange(t)
- }, this.getLineRange = function (e, t) {
- var n = typeof e == "number" ? e : this.lead.row, r, i = this.session.getFoldLine(n);
- return i ? (n = i.start.row, r = i.end.row) : r = n, t ? new o(n, 0, r, this.session.getLine(r).length) : new o(n, 0, r + 1, 0)
- }, this.selectLine = function () {
- this.setSelectionRange(this.getLineRange())
- }, this.moveCursorUp = function () {
- this.moveCursorBy(-1, 0)
- }, this.moveCursorDown = function () {
- this.moveCursorBy(1, 0)
- }, this.moveCursorLeft = function () {
- var e = this.lead.getPosition(), t;
- if (t = this.session.getFoldAt(e.row, e.column, -1))this.moveCursorTo(t.start.row, t.start.column); else if (e.column == 0)e.row > 0 && this.moveCursorTo(e.row - 1, this.doc.getLine(e.row - 1).length); else {
- var n = this.session.getTabSize();
- this.session.isTabStop(e) && this.doc.getLine(e.row).slice(e.column - n, e.column).split(" ").length - 1 == n ? this.moveCursorBy(0, -n) : this.moveCursorBy(0, -1)
- }
- }, this.moveCursorRight = function () {
- var e = this.lead.getPosition(), t;
- if (t = this.session.getFoldAt(e.row, e.column, 1))this.moveCursorTo(t.end.row, t.end.column); else if (this.lead.column == this.doc.getLine(this.lead.row).length)this.lead.row < this.doc.getLength() - 1 && this.moveCursorTo(this.lead.row + 1, 0); else {
- var n = this.session.getTabSize(), e = this.lead;
- this.session.isTabStop(e) && this.doc.getLine(e.row).slice(e.column, e.column + n).split(" ").length - 1 == n ? this.moveCursorBy(0, n) : this.moveCursorBy(0, 1)
- }
- }, this.moveCursorLineStart = function () {
- var e = this.lead.row, t = this.lead.column, n = this.session.documentToScreenRow(e, t), r = this.session.screenToDocumentPosition(n, 0), i = this.session.getDisplayLine(e, null, r.row, r.column), s = i.match(/^\s*/);
- s[0].length != t && !this.session.$useEmacsStyleLineStart && (r.column += s[0].length), this.moveCursorToPosition(r)
- }, this.moveCursorLineEnd = function () {
- var e = this.lead, t = this.session.getDocumentLastRowColumnPosition(e.row, e.column);
- if (this.lead.column == t.column) {
- var n = this.session.getLine(t.row);
- if (t.column == n.length) {
- var r = n.search(/\s+$/);
- r > 0 && (t.column = r)
- }
- }
- this.moveCursorTo(t.row, t.column)
- }, this.moveCursorFileEnd = function () {
- var e = this.doc.getLength() - 1, t = this.doc.getLine(e).length;
- this.moveCursorTo(e, t)
- }, this.moveCursorFileStart = function () {
- this.moveCursorTo(0, 0)
- }, this.moveCursorLongWordRight = function () {
- var e = this.lead.row, t = this.lead.column, n = this.doc.getLine(e), r = n.substring(t), i;
- this.session.nonTokenRe.lastIndex = 0, this.session.tokenRe.lastIndex = 0;
- var s = this.session.getFoldAt(e, t, 1);
- if (s) {
- this.moveCursorTo(s.end.row, s.end.column);
- return
- }
- if (i = this.session.nonTokenRe.exec(r))t += this.session.nonTokenRe.lastIndex, this.session.nonTokenRe.lastIndex = 0, r = n.substring(t);
- if (t >= n.length) {
- this.moveCursorTo(e, n.length), this.moveCursorRight(), e < this.doc.getLength() - 1 && this.moveCursorWordRight();
- return
- }
- if (i = this.session.tokenRe.exec(r))t += this.session.tokenRe.lastIndex, this.session.tokenRe.lastIndex = 0;
- this.moveCursorTo(e, t)
- }, this.moveCursorLongWordLeft = function () {
- var e = this.lead.row, t = this.lead.column, n;
- if (n = this.session.getFoldAt(e, t, -1)) {
- this.moveCursorTo(n.start.row, n.start.column);
- return
- }
- var r = this.session.getFoldStringAt(e, t, -1);
- r == null && (r = this.doc.getLine(e).substring(0, t));
- var s = i.stringReverse(r), o;
- this.session.nonTokenRe.lastIndex = 0, this.session.tokenRe.lastIndex = 0;
- if (o = this.session.nonTokenRe.exec(s))t -= this.session.nonTokenRe.lastIndex, s = s.slice(this.session.nonTokenRe.lastIndex), this.session.nonTokenRe.lastIndex = 0;
- if (t <= 0) {
- this.moveCursorTo(e, 0), this.moveCursorLeft(), e > 0 && this.moveCursorWordLeft();
- return
- }
- if (o = this.session.tokenRe.exec(s))t -= this.session.tokenRe.lastIndex, this.session.tokenRe.lastIndex = 0;
- this.moveCursorTo(e, t)
- }, this.$shortWordEndIndex = function (e) {
- var t, n = 0, r, i = /\s/, s = this.session.tokenRe;
- s.lastIndex = 0;
- if (t = this.session.tokenRe.exec(e))n = this.session.tokenRe.lastIndex; else {
- while ((r = e[n]) && i.test(r))n++;
- if (n <= 1) {
- s.lastIndex = 0;
- while ((r = e[n]) && !s.test(r)) {
- s.lastIndex = 0, n++;
- if (i.test(r)) {
- if (n > 2) {
- n--;
- break
- }
- while ((r = e[n]) && i.test(r))n++;
- if (n > 2)break
- }
- }
- }
- }
- return s.lastIndex = 0, n
- }, this.moveCursorShortWordRight = function () {
- var e = this.lead.row, t = this.lead.column, n = this.doc.getLine(e), r = n.substring(t), i = this.session.getFoldAt(e, t, 1);
- if (i)return this.moveCursorTo(i.end.row, i.end.column);
- if (t == n.length) {
- var s = this.doc.getLength();
- do e++, r = this.doc.getLine(e); while (e < s && /^\s*$/.test(r));
- /^\s+/.test(r) || (r = ""), t = 0
- }
- var o = this.$shortWordEndIndex(r);
- this.moveCursorTo(e, t + o)
- }, this.moveCursorShortWordLeft = function () {
- var e = this.lead.row, t = this.lead.column, n;
- if (n = this.session.getFoldAt(e, t, -1))return this.moveCursorTo(n.start.row, n.start.column);
- var r = this.session.getLine(e).substring(0, t);
- if (t == 0) {
- do e--, r = this.doc.getLine(e); while (e > 0 && /^\s*$/.test(r));
- t = r.length, /\s+$/.test(r) || (r = "")
- }
- var s = i.stringReverse(r), o = this.$shortWordEndIndex(s);
- return this.moveCursorTo(e, t - o)
- }, this.moveCursorWordRight = function () {
- this.session.$selectLongWords ? this.moveCursorLongWordRight() : this.moveCursorShortWordRight()
- }, this.moveCursorWordLeft = function () {
- this.session.$selectLongWords ? this.moveCursorLongWordLeft() : this.moveCursorShortWordLeft()
- }, this.moveCursorBy = function (e, t) {
- var n = this.session.documentToScreenPosition(this.lead.row, this.lead.column);
- t === 0 && (this.$desiredColumn ? n.column = this.$desiredColumn : this.$desiredColumn = n.column);
- var r = this.session.screenToDocumentPosition(n.row + e, n.column);
- this.moveCursorTo(r.row, r.column + t, t === 0)
- }, this.moveCursorToPosition = function (e) {
- this.moveCursorTo(e.row, e.column)
- }, this.moveCursorTo = function (e, t, n) {
- var r = this.session.getFoldAt(e, t, 1);
- r && (e = r.start.row, t = r.start.column), this.$keepDesiredColumnOnChange = !0, this.lead.setPosition(e, t), this.$keepDesiredColumnOnChange = !1, n || (this.$desiredColumn = null)
- }, this.moveCursorToScreen = function (e, t, n) {
- var r = this.session.screenToDocumentPosition(e, t);
- this.moveCursorTo(r.row, r.column, n)
- }, this.detach = function () {
- this.lead.detach(), this.anchor.detach(), this.session = this.doc = null
- }, this.fromOrientedRange = function (e) {
- this.setSelectionRange(e, e.cursor == e.start), this.$desiredColumn = e.desiredColumn || this.$desiredColumn
- }, this.toOrientedRange = function (e) {
- var t = this.getRange();
- return e ? (e.start.column = t.start.column, e.start.row = t.start.row, e.end.column = t.end.column, e.end.row = t.end.row) : e = t, e.cursor = this.isBackwards() ? e.start : e.end, e.desiredColumn = this.$desiredColumn, e
- }
- }).call(u.prototype), t.Selection = u
-}), ace.define("ace/range", ["require", "exports", "module"], function (e, t, n) {
- var r = function (e, t, n, r) {
- this.start = {row: e, column: t}, this.end = {row: n, column: r}
- };
- (function () {
- this.isEqual = function (e) {
- return this.start.row == e.start.row && this.end.row == e.end.row && this.start.column == e.start.column && this.end.column == e.end.column
- }, this.toString = function () {
- return"Range: [" + this.start.row + "/" + this.start.column + "] -> [" + this.end.row + "/" + this.end.column + "]"
- }, this.contains = function (e, t) {
- return this.compare(e, t) == 0
- }, this.compareRange = function (e) {
- var t, n = e.end, r = e.start;
- return t = this.compare(n.row, n.column), t == 1 ? (t = this.compare(r.row, r.column), t == 1 ? 2 : t == 0 ? 1 : 0) : t == -1 ? -2 : (t = this.compare(r.row, r.column), t == -1 ? -1 : t == 1 ? 42 : 0)
- }, this.comparePoint = function (e) {
- return this.compare(e.row, e.column)
- }, this.containsRange = function (e) {
- return this.comparePoint(e.start) == 0 && this.comparePoint(e.end) == 0
- }, this.intersects = function (e) {
- var t = this.compareRange(e);
- return t == -1 || t == 0 || t == 1
- }, this.isEnd = function (e, t) {
- return this.end.row == e && this.end.column == t
- }, this.isStart = function (e, t) {
- return this.start.row == e && this.start.column == t
- }, this.setStart = function (e, t) {
- typeof e == "object" ? (this.start.column = e.column, this.start.row = e.row) : (this.start.row = e, this.start.column = t)
- }, this.setEnd = function (e, t) {
- typeof e == "object" ? (this.end.column = e.column, this.end.row = e.row) : (this.end.row = e, this.end.column = t)
- }, this.inside = function (e, t) {
- return this.compare(e, t) == 0 ? this.isEnd(e, t) || this.isStart(e, t) ? !1 : !0 : !1
- }, this.insideStart = function (e, t) {
- return this.compare(e, t) == 0 ? this.isEnd(e, t) ? !1 : !0 : !1
- }, this.insideEnd = function (e, t) {
- return this.compare(e, t) == 0 ? this.isStart(e, t) ? !1 : !0 : !1
- }, this.compare = function (e, t) {
- return!this.isMultiLine() && e === this.start.row ? t < this.start.column ? -1 : t > this.end.column ? 1 : 0 : e < this.start.row ? -1 : e > this.end.row ? 1 : this.start.row === e ? t >= this.start.column ? 0 : -1 : this.end.row === e ? t <= this.end.column ? 0 : 1 : 0
- }, this.compareStart = function (e, t) {
- return this.start.row == e && this.start.column == t ? -1 : this.compare(e, t)
- }, this.compareEnd = function (e, t) {
- return this.end.row == e && this.end.column == t ? 1 : this.compare(e, t)
- }, this.compareInside = function (e, t) {
- return this.end.row == e && this.end.column == t ? 1 : this.start.row == e && this.start.column == t ? -1 : this.compare(e, t)
- }, this.clipRows = function (e, t) {
- if (this.end.row > t)var n = {row: t + 1, column: 0};
- if (this.start.row > t)var i = {row: t + 1, column: 0};
- if (this.start.row < e)var i = {row: e, column: 0};
- if (this.end.row < e)var n = {row: e, column: 0};
- return r.fromPoints(i || this.start, n || this.end)
- }, this.extend = function (e, t) {
- var n = this.compare(e, t);
- if (n == 0)return this;
- if (n == -1)var i = {row: e, column: t}; else var s = {row: e, column: t};
- return r.fromPoints(i || this.start, s || this.end)
- }, this.isEmpty = function () {
- return this.start.row == this.end.row && this.start.column == this.end.column
- }, this.isMultiLine = function () {
- return this.start.row !== this.end.row
- }, this.clone = function () {
- return r.fromPoints(this.start, this.end)
- }, this.collapseRows = function () {
- return this.end.column == 0 ? new r(this.start.row, 0, Math.max(this.start.row, this.end.row - 1), 0) : new r(this.start.row, 0, this.end.row, 0)
- }, this.toScreenRange = function (e) {
- var t = e.documentToScreenPosition(this.start), n = e.documentToScreenPosition(this.end);
- return new r(t.row, t.column, n.row, n.column)
- }
- }).call(r.prototype), r.fromPoints = function (e, t) {
- return new r(e.row, e.column, t.row, t.column)
- }, t.Range = r
-}), ace.define("ace/mode/text", ["require", "exports", "module", "ace/tokenizer", "ace/mode/text_highlight_rules", "ace/mode/behaviour", "ace/unicode"], function (e, t, n) {
- var r = e("../tokenizer").Tokenizer, i = e("./text_highlight_rules").TextHighlightRules, s = e("./behaviour").Behaviour, o = e("../unicode"), u = function () {
- this.$tokenizer = new r((new i).getRules()), this.$behaviour = new s
- };
- (function () {
- this.tokenRe = new RegExp("^[" + o.packages.L + o.packages.Mn + o.packages.Mc + o.packages.Nd + o.packages.Pc + "\\$_]+", "g"), this.nonTokenRe = new RegExp("^(?:[^" + o.packages.L + o.packages.Mn + o.packages.Mc + o.packages.Nd + o.packages.Pc + "\\$_]|s])+", "g"), this.getTokenizer = function () {
- return this.$tokenizer
- }, this.toggleCommentLines = function (e, t, n, r) {
- }, this.getNextLineIndent = function (e, t, n) {
- return""
- }, this.checkOutdent = function (e, t, n) {
- return!1
- }, this.autoOutdent = function (e, t, n) {
- }, this.$getIndent = function (e) {
- var t = e.match(/^(\s+)/);
- return t ? t[1] : ""
- }, this.createWorker = function (e) {
- return null
- }, this.createModeDelegates = function (e) {
- if (!this.$embeds)return;
- this.$modes = {};
- for (var t = 0; t < this.$embeds.length; t++)e[this.$embeds[t]] && (this.$modes[this.$embeds[t]] = new e[this.$embeds[t]]);
- var n = ["toggleCommentLines", "getNextLineIndent", "checkOutdent", "autoOutdent", "transformAction"];
- for (var t = 0; t < n.length; t++)(function (e) {
- var r = n[t], i = e[r];
- e[n[t]] = function () {
- return this.$delegator(r, arguments, i)
- }
- })(this)
- }, this.$delegator = function (e, t, n) {
- var r = t[0];
- for (var i = 0; i < this.$embeds.length; i++) {
- if (!this.$modes[this.$embeds[i]])continue;
- var s = r.split(this.$embeds[i]);
- if (!s[0] && s[1]) {
- t[0] = s[1];
- var o = this.$modes[this.$embeds[i]];
- return o[e].apply(o, t)
- }
- }
- var u = n.apply(this, t);
- return n ? u : undefined
- }, this.transformAction = function (e, t, n, r, i) {
- if (this.$behaviour) {
- var s = this.$behaviour.getBehaviours();
- for (var o in s)if (s[o][t]) {
- var u = s[o][t].apply(this, arguments);
- if (u)return u
- }
- }
- }
- }).call(u.prototype), t.Mode = u
-}), ace.define("ace/tokenizer", ["require", "exports", "module"], function (e, t, n) {
- var r = function (e, t) {
- t = t ? "g" + t : "g", this.states = e, this.regExps = {}, this.matchMappings = {};
- for (var n in this.states) {
- var r = this.states[n], i = [], s = 0, o = this.matchMappings[n] = {defaultToken: "text"};
- for (var u = 0; u < r.length; u++) {
- var a = r[u];
- if (a.defaultToken) {
- o.defaultToken = a.defaultToken;
- continue
- }
- a.regex instanceof RegExp && (a.regex = a.regex.toString().slice(1, -1));
- var f = a.regex, l = (new RegExp("(?:(" + f + ")|(.))")).exec("a").length - 2;
- Array.isArray(a.token) && (a.token.length == 1 ? a.token = a.token[0] : (a.tokenArray = a.token, a.token = this.$arrayTokens)), l > 1 && (/\\\d/.test(a.regex) ? f = a.regex.replace(/\\([0-9]+)/g, function (e, t) {
- return"\\" + (parseInt(t, 10) + s + 1)
- }) : (l = 1, f = this.removeCapturingGroups(a.regex)), a.splitRegex || (a.splitRegex = this.createSplitterRegexp(a.regex, t))), o[s] = u, s += l, i.push(f)
- }
- this.regExps[n] = new RegExp("(" + i.join(")|(") + ")|($)", t)
- }
- };
- (function () {
- this.$arrayTokens = function (e) {
- if (!e)return[];
- var t = e.split(this.splitRegex), n = [], r = this.tokenArray;
- if (r.length != t.length - 2)return window.console && console.error(r.length, t.length - 2, e, this.splitRegex), [
- {type: "error.invalid", value: e}
- ];
- for (var i = 0; i < r.length; i++)t[i + 1] && (n[n.length] = {type: r[i], value: t[i + 1]});
- return n
- }, this.removeCapturingGroups = function (e) {
- var t = e.replace(/\[(?:\\.|[^\]])*?\]|\\.|\(\?[:=!]|(\()/g, function (e, t) {
- return t ? "(?:" : e
- });
- return t
- }, this.createSplitterRegexp = function (e, t) {
- return e = e.replace(/\(\?=([^()]|\\.)*?\)$/, ""), new RegExp(e, t)
- }, this.getLineTokens = function (e, t) {
- if (t && typeof t != "string") {
- var n = t.slice(0);
- t = n[0]
- } else var n = [];
- var r = t || "start", i = this.states[r], s = this.matchMappings[r], o = this.regExps[r];
- o.lastIndex = 0;
- var u, a = [], f = 0, l = {type: null, value: ""};
- while (u = o.exec(e)) {
- var c = s.defaultToken, h = null, p = u[0], d = o.lastIndex;
- if (d - p.length > f) {
- var v = e.substring(f, d - p.length);
- l.type == c ? l.value += v : (l.type && a.push(l), l = {type: c, value: v})
- }
- for (var m = 0; m < u.length - 2; m++) {
- if (u[m + 1] === undefined)continue;
- h = i[s[m]], c = typeof h.token == "function" ? h.token(p, r, n) : h.token, h.next && (r = h.next, i = this.states[r], i || (window.console && console.error && console.error(r, "doesn't exist"), r = "start", i = this.states[r]), s = this.matchMappings[r], f = d, o = this.regExps[r], o.lastIndex = d);
- break
- }
- if (p)if (typeof c == "string")!!h && h.merge === !1 || l.type !== c ? (l.type && a.push(l), l = {type: c, value: p}) : l.value += p; else {
- l.type && a.push(l), l = {type: null, value: ""};
- for (var m = 0; m < c.length; m++)a.push(c[m])
- }
- if (f == e.length)break;
- f = d
- }
- return l.type && a.push(l), {tokens: a, state: n.length ? n : r}
- }
- }).call(r.prototype), t.Tokenizer = r
-}), ace.define("ace/mode/text_highlight_rules", ["require", "exports", "module", "ace/lib/lang"], function (e, t, n) {
- var r = e("../lib/lang"), i = function () {
- this.$rules = {start: [
- {token: "empty_line", regex: "^$"},
- {token: "text", regex: ".+"}
- ]}
- };
- (function () {
- this.addRules = function (e, t) {
- for (var n in e) {
- var r = e[n];
- for (var i = 0; i < r.length; i++) {
- var s = r[i];
- s.next && (s.next = t + s.next)
- }
- this.$rules[t + n] = r
- }
- }, this.getRules = function () {
- return this.$rules
- }, this.embedRules = function (e, t, n, i, s) {
- var o = (new e).getRules();
- if (i)for (var u = 0; u < i.length; u++)i[u] = t + i[u]; else {
- i = [];
- for (var a in o)i.push(t + a)
- }
- this.addRules(o, t);
- if (n) {
- var f = Array.prototype[s ? "push" : "unshift"];
- for (var u = 0; u < i.length; u++)f.apply(this.$rules[i[u]], r.deepCopy(n))
- }
- this.$embeds || (this.$embeds = []), this.$embeds.push(t)
- }, this.getEmbeds = function () {
- return this.$embeds
- }, this.normalizeRules = function () {
- var e = 0;
- for (var t in this.$rules) {
- var n = this.$rules[t];
- for (var r = 0; r < n.length; r++) {
- var i = n[r];
- if (i.next && Array.isArray(i.next)) {
- var s = i.stateName || "state" + e++;
- this.$rules[s] = i.next, i.next = s
- }
- if (i.rules)for (var o in i.rules)this.$rules[o] ? this.$rules[o].push && this.$rules[o].push.apply(this.$rules[o], i.rules[o]) : this.$rules[o] = i.rules[o];
- if (i.include || typeof i == "string") {
- var u = [r, 1].concat(this.$rules[i.include || i]);
- i.noEscape && (u = u.filter(function (e) {
- return!e.next
- })), n.splice.apply(n, u)
- }
- }
- }
- }, this.createKeywordMapper = function (e, t, n, r) {
- var i = Object.create(null);
- return Object.keys(e).forEach(function (t) {
- var s = e[t];
- n && (s = s.toLowerCase());
- var o = s.split(r || "|");
- for (var u = o.length; u--;)i[o[u]] = t
- }), e = null, n ? function (e) {
- return i[e.toLowerCase()] || t
- } : function (e) {
- return i[e] || t
- }
- }, this.getKeywords = function () {
- return this.$keywords
- }
- }).call(i.prototype), t.TextHighlightRules = i
-}), ace.define("ace/mode/behaviour", ["require", "exports", "module"], function (e, t, n) {
- var r = function () {
- this.$behaviours = {}
- };
- (function () {
- this.add = function (e, t, n) {
- switch (undefined) {
- case this.$behaviours:
- this.$behaviours = {};
- case this.$behaviours[e]:
- this.$behaviours[e] = {}
- }
- this.$behaviours[e][t] = n
- }, this.addBehaviours = function (e) {
- for (var t in e)for (var n in e[t])this.add(t, n, e[t][n])
- }, this.remove = function (e) {
- this.$behaviours && this.$behaviours[e] && delete this.$behaviours[e]
- }, this.inherit = function (e, t) {
- if (typeof e == "function")var n = (new e).getBehaviours(t); else var n = e.getBehaviours(t);
- this.addBehaviours(n)
- }, this.getBehaviours = function (e) {
- if (!e)return this.$behaviours;
- var t = {};
- for (var n = 0; n < e.length; n++)this.$behaviours[e[n]] && (t[e[n]] = this.$behaviours[e[n]]);
- return t
- }
- }).call(r.prototype), t.Behaviour = r
-}), ace.define("ace/unicode", ["require", "exports", "module"], function (e, t, n) {
- function r(e) {
- var n = /\w{4}/g;
- for (var r in e)t.packages[r] = e[r].replace(n, "\\u$&")
- }
-
- t.packages = {}, r({L: "0041-005A0061-007A00AA00B500BA00C0-00D600D8-00F600F8-02C102C6-02D102E0-02E402EC02EE0370-037403760377037A-037D03860388-038A038C038E-03A103A3-03F503F7-0481048A-05250531-055605590561-058705D0-05EA05F0-05F20621-064A066E066F0671-06D306D506E506E606EE06EF06FA-06FC06FF07100712-072F074D-07A507B107CA-07EA07F407F507FA0800-0815081A082408280904-0939093D09500958-0961097109720979-097F0985-098C098F09900993-09A809AA-09B009B209B6-09B909BD09CE09DC09DD09DF-09E109F009F10A05-0A0A0A0F0A100A13-0A280A2A-0A300A320A330A350A360A380A390A59-0A5C0A5E0A72-0A740A85-0A8D0A8F-0A910A93-0AA80AAA-0AB00AB20AB30AB5-0AB90ABD0AD00AE00AE10B05-0B0C0B0F0B100B13-0B280B2A-0B300B320B330B35-0B390B3D0B5C0B5D0B5F-0B610B710B830B85-0B8A0B8E-0B900B92-0B950B990B9A0B9C0B9E0B9F0BA30BA40BA8-0BAA0BAE-0BB90BD00C05-0C0C0C0E-0C100C12-0C280C2A-0C330C35-0C390C3D0C580C590C600C610C85-0C8C0C8E-0C900C92-0CA80CAA-0CB30CB5-0CB90CBD0CDE0CE00CE10D05-0D0C0D0E-0D100D12-0D280D2A-0D390D3D0D600D610D7A-0D7F0D85-0D960D9A-0DB10DB3-0DBB0DBD0DC0-0DC60E01-0E300E320E330E40-0E460E810E820E840E870E880E8A0E8D0E94-0E970E99-0E9F0EA1-0EA30EA50EA70EAA0EAB0EAD-0EB00EB20EB30EBD0EC0-0EC40EC60EDC0EDD0F000F40-0F470F49-0F6C0F88-0F8B1000-102A103F1050-1055105A-105D106110651066106E-10701075-1081108E10A0-10C510D0-10FA10FC1100-1248124A-124D1250-12561258125A-125D1260-1288128A-128D1290-12B012B2-12B512B8-12BE12C012C2-12C512C8-12D612D8-13101312-13151318-135A1380-138F13A0-13F41401-166C166F-167F1681-169A16A0-16EA1700-170C170E-17111720-17311740-17511760-176C176E-17701780-17B317D717DC1820-18771880-18A818AA18B0-18F51900-191C1950-196D1970-19741980-19AB19C1-19C71A00-1A161A20-1A541AA71B05-1B331B45-1B4B1B83-1BA01BAE1BAF1C00-1C231C4D-1C4F1C5A-1C7D1CE9-1CEC1CEE-1CF11D00-1DBF1E00-1F151F18-1F1D1F20-1F451F48-1F4D1F50-1F571F591F5B1F5D1F5F-1F7D1F80-1FB41FB6-1FBC1FBE1FC2-1FC41FC6-1FCC1FD0-1FD31FD6-1FDB1FE0-1FEC1FF2-1FF41FF6-1FFC2071207F2090-209421022107210A-211321152119-211D212421262128212A-212D212F-2139213C-213F2145-2149214E218321842C00-2C2E2C30-2C5E2C60-2CE42CEB-2CEE2D00-2D252D30-2D652D6F2D80-2D962DA0-2DA62DA8-2DAE2DB0-2DB62DB8-2DBE2DC0-2DC62DC8-2DCE2DD0-2DD62DD8-2DDE2E2F300530063031-3035303B303C3041-3096309D-309F30A1-30FA30FC-30FF3105-312D3131-318E31A0-31B731F0-31FF3400-4DB54E00-9FCBA000-A48CA4D0-A4FDA500-A60CA610-A61FA62AA62BA640-A65FA662-A66EA67F-A697A6A0-A6E5A717-A71FA722-A788A78BA78CA7FB-A801A803-A805A807-A80AA80C-A822A840-A873A882-A8B3A8F2-A8F7A8FBA90A-A925A930-A946A960-A97CA984-A9B2A9CFAA00-AA28AA40-AA42AA44-AA4BAA60-AA76AA7AAA80-AAAFAAB1AAB5AAB6AAB9-AABDAAC0AAC2AADB-AADDABC0-ABE2AC00-D7A3D7B0-D7C6D7CB-D7FBF900-FA2DFA30-FA6DFA70-FAD9FB00-FB06FB13-FB17FB1DFB1F-FB28FB2A-FB36FB38-FB3CFB3EFB40FB41FB43FB44FB46-FBB1FBD3-FD3DFD50-FD8FFD92-FDC7FDF0-FDFBFE70-FE74FE76-FEFCFF21-FF3AFF41-FF5AFF66-FFBEFFC2-FFC7FFCA-FFCFFFD2-FFD7FFDA-FFDC", Ll: "0061-007A00AA00B500BA00DF-00F600F8-00FF01010103010501070109010B010D010F01110113011501170119011B011D011F01210123012501270129012B012D012F01310133013501370138013A013C013E014001420144014601480149014B014D014F01510153015501570159015B015D015F01610163016501670169016B016D016F0171017301750177017A017C017E-0180018301850188018C018D019201950199-019B019E01A101A301A501A801AA01AB01AD01B001B401B601B901BA01BD-01BF01C601C901CC01CE01D001D201D401D601D801DA01DC01DD01DF01E101E301E501E701E901EB01ED01EF01F001F301F501F901FB01FD01FF02010203020502070209020B020D020F02110213021502170219021B021D021F02210223022502270229022B022D022F02310233-0239023C023F0240024202470249024B024D024F-02930295-02AF037103730377037B-037D039003AC-03CE03D003D103D5-03D703D903DB03DD03DF03E103E303E503E703E903EB03ED03EF-03F303F503F803FB03FC0430-045F04610463046504670469046B046D046F04710473047504770479047B047D047F0481048B048D048F04910493049504970499049B049D049F04A104A304A504A704A904AB04AD04AF04B104B304B504B704B904BB04BD04BF04C204C404C604C804CA04CC04CE04CF04D104D304D504D704D904DB04DD04DF04E104E304E504E704E904EB04ED04EF04F104F304F504F704F904FB04FD04FF05010503050505070509050B050D050F05110513051505170519051B051D051F0521052305250561-05871D00-1D2B1D62-1D771D79-1D9A1E011E031E051E071E091E0B1E0D1E0F1E111E131E151E171E191E1B1E1D1E1F1E211E231E251E271E291E2B1E2D1E2F1E311E331E351E371E391E3B1E3D1E3F1E411E431E451E471E491E4B1E4D1E4F1E511E531E551E571E591E5B1E5D1E5F1E611E631E651E671E691E6B1E6D1E6F1E711E731E751E771E791E7B1E7D1E7F1E811E831E851E871E891E8B1E8D1E8F1E911E931E95-1E9D1E9F1EA11EA31EA51EA71EA91EAB1EAD1EAF1EB11EB31EB51EB71EB91EBB1EBD1EBF1EC11EC31EC51EC71EC91ECB1ECD1ECF1ED11ED31ED51ED71ED91EDB1EDD1EDF1EE11EE31EE51EE71EE91EEB1EED1EEF1EF11EF31EF51EF71EF91EFB1EFD1EFF-1F071F10-1F151F20-1F271F30-1F371F40-1F451F50-1F571F60-1F671F70-1F7D1F80-1F871F90-1F971FA0-1FA71FB0-1FB41FB61FB71FBE1FC2-1FC41FC61FC71FD0-1FD31FD61FD71FE0-1FE71FF2-1FF41FF61FF7210A210E210F2113212F21342139213C213D2146-2149214E21842C30-2C5E2C612C652C662C682C6A2C6C2C712C732C742C76-2C7C2C812C832C852C872C892C8B2C8D2C8F2C912C932C952C972C992C9B2C9D2C9F2CA12CA32CA52CA72CA92CAB2CAD2CAF2CB12CB32CB52CB72CB92CBB2CBD2CBF2CC12CC32CC52CC72CC92CCB2CCD2CCF2CD12CD32CD52CD72CD92CDB2CDD2CDF2CE12CE32CE42CEC2CEE2D00-2D25A641A643A645A647A649A64BA64DA64FA651A653A655A657A659A65BA65DA65FA663A665A667A669A66BA66DA681A683A685A687A689A68BA68DA68FA691A693A695A697A723A725A727A729A72BA72DA72F-A731A733A735A737A739A73BA73DA73FA741A743A745A747A749A74BA74DA74FA751A753A755A757A759A75BA75DA75FA761A763A765A767A769A76BA76DA76FA771-A778A77AA77CA77FA781A783A785A787A78CFB00-FB06FB13-FB17FF41-FF5A", Lu: "0041-005A00C0-00D600D8-00DE01000102010401060108010A010C010E01100112011401160118011A011C011E01200122012401260128012A012C012E01300132013401360139013B013D013F0141014301450147014A014C014E01500152015401560158015A015C015E01600162016401660168016A016C016E017001720174017601780179017B017D018101820184018601870189-018B018E-0191019301940196-0198019C019D019F01A001A201A401A601A701A901AC01AE01AF01B1-01B301B501B701B801BC01C401C701CA01CD01CF01D101D301D501D701D901DB01DE01E001E201E401E601E801EA01EC01EE01F101F401F6-01F801FA01FC01FE02000202020402060208020A020C020E02100212021402160218021A021C021E02200222022402260228022A022C022E02300232023A023B023D023E02410243-02460248024A024C024E03700372037603860388-038A038C038E038F0391-03A103A3-03AB03CF03D2-03D403D803DA03DC03DE03E003E203E403E603E803EA03EC03EE03F403F703F903FA03FD-042F04600462046404660468046A046C046E04700472047404760478047A047C047E0480048A048C048E04900492049404960498049A049C049E04A004A204A404A604A804AA04AC04AE04B004B204B404B604B804BA04BC04BE04C004C104C304C504C704C904CB04CD04D004D204D404D604D804DA04DC04DE04E004E204E404E604E804EA04EC04EE04F004F204F404F604F804FA04FC04FE05000502050405060508050A050C050E05100512051405160518051A051C051E0520052205240531-055610A0-10C51E001E021E041E061E081E0A1E0C1E0E1E101E121E141E161E181E1A1E1C1E1E1E201E221E241E261E281E2A1E2C1E2E1E301E321E341E361E381E3A1E3C1E3E1E401E421E441E461E481E4A1E4C1E4E1E501E521E541E561E581E5A1E5C1E5E1E601E621E641E661E681E6A1E6C1E6E1E701E721E741E761E781E7A1E7C1E7E1E801E821E841E861E881E8A1E8C1E8E1E901E921E941E9E1EA01EA21EA41EA61EA81EAA1EAC1EAE1EB01EB21EB41EB61EB81EBA1EBC1EBE1EC01EC21EC41EC61EC81ECA1ECC1ECE1ED01ED21ED41ED61ED81EDA1EDC1EDE1EE01EE21EE41EE61EE81EEA1EEC1EEE1EF01EF21EF41EF61EF81EFA1EFC1EFE1F08-1F0F1F18-1F1D1F28-1F2F1F38-1F3F1F48-1F4D1F591F5B1F5D1F5F1F68-1F6F1FB8-1FBB1FC8-1FCB1FD8-1FDB1FE8-1FEC1FF8-1FFB21022107210B-210D2110-211221152119-211D212421262128212A-212D2130-2133213E213F214521832C00-2C2E2C602C62-2C642C672C692C6B2C6D-2C702C722C752C7E-2C802C822C842C862C882C8A2C8C2C8E2C902C922C942C962C982C9A2C9C2C9E2CA02CA22CA42CA62CA82CAA2CAC2CAE2CB02CB22CB42CB62CB82CBA2CBC2CBE2CC02CC22CC42CC62CC82CCA2CCC2CCE2CD02CD22CD42CD62CD82CDA2CDC2CDE2CE02CE22CEB2CEDA640A642A644A646A648A64AA64CA64EA650A652A654A656A658A65AA65CA65EA662A664A666A668A66AA66CA680A682A684A686A688A68AA68CA68EA690A692A694A696A722A724A726A728A72AA72CA72EA732A734A736A738A73AA73CA73EA740A742A744A746A748A74AA74CA74EA750A752A754A756A758A75AA75CA75EA760A762A764A766A768A76AA76CA76EA779A77BA77DA77EA780A782A784A786A78BFF21-FF3A", Lt: "01C501C801CB01F21F88-1F8F1F98-1F9F1FA8-1FAF1FBC1FCC1FFC", Lm: "02B0-02C102C6-02D102E0-02E402EC02EE0374037A0559064006E506E607F407F507FA081A0824082809710E460EC610FC17D718431AA71C78-1C7D1D2C-1D611D781D9B-1DBF2071207F2090-20942C7D2D6F2E2F30053031-3035303B309D309E30FC-30FEA015A4F8-A4FDA60CA67FA717-A71FA770A788A9CFAA70AADDFF70FF9EFF9F", Lo: "01BB01C0-01C3029405D0-05EA05F0-05F20621-063F0641-064A066E066F0671-06D306D506EE06EF06FA-06FC06FF07100712-072F074D-07A507B107CA-07EA0800-08150904-0939093D09500958-096109720979-097F0985-098C098F09900993-09A809AA-09B009B209B6-09B909BD09CE09DC09DD09DF-09E109F009F10A05-0A0A0A0F0A100A13-0A280A2A-0A300A320A330A350A360A380A390A59-0A5C0A5E0A72-0A740A85-0A8D0A8F-0A910A93-0AA80AAA-0AB00AB20AB30AB5-0AB90ABD0AD00AE00AE10B05-0B0C0B0F0B100B13-0B280B2A-0B300B320B330B35-0B390B3D0B5C0B5D0B5F-0B610B710B830B85-0B8A0B8E-0B900B92-0B950B990B9A0B9C0B9E0B9F0BA30BA40BA8-0BAA0BAE-0BB90BD00C05-0C0C0C0E-0C100C12-0C280C2A-0C330C35-0C390C3D0C580C590C600C610C85-0C8C0C8E-0C900C92-0CA80CAA-0CB30CB5-0CB90CBD0CDE0CE00CE10D05-0D0C0D0E-0D100D12-0D280D2A-0D390D3D0D600D610D7A-0D7F0D85-0D960D9A-0DB10DB3-0DBB0DBD0DC0-0DC60E01-0E300E320E330E40-0E450E810E820E840E870E880E8A0E8D0E94-0E970E99-0E9F0EA1-0EA30EA50EA70EAA0EAB0EAD-0EB00EB20EB30EBD0EC0-0EC40EDC0EDD0F000F40-0F470F49-0F6C0F88-0F8B1000-102A103F1050-1055105A-105D106110651066106E-10701075-1081108E10D0-10FA1100-1248124A-124D1250-12561258125A-125D1260-1288128A-128D1290-12B012B2-12B512B8-12BE12C012C2-12C512C8-12D612D8-13101312-13151318-135A1380-138F13A0-13F41401-166C166F-167F1681-169A16A0-16EA1700-170C170E-17111720-17311740-17511760-176C176E-17701780-17B317DC1820-18421844-18771880-18A818AA18B0-18F51900-191C1950-196D1970-19741980-19AB19C1-19C71A00-1A161A20-1A541B05-1B331B45-1B4B1B83-1BA01BAE1BAF1C00-1C231C4D-1C4F1C5A-1C771CE9-1CEC1CEE-1CF12135-21382D30-2D652D80-2D962DA0-2DA62DA8-2DAE2DB0-2DB62DB8-2DBE2DC0-2DC62DC8-2DCE2DD0-2DD62DD8-2DDE3006303C3041-3096309F30A1-30FA30FF3105-312D3131-318E31A0-31B731F0-31FF3400-4DB54E00-9FCBA000-A014A016-A48CA4D0-A4F7A500-A60BA610-A61FA62AA62BA66EA6A0-A6E5A7FB-A801A803-A805A807-A80AA80C-A822A840-A873A882-A8B3A8F2-A8F7A8FBA90A-A925A930-A946A960-A97CA984-A9B2AA00-AA28AA40-AA42AA44-AA4BAA60-AA6FAA71-AA76AA7AAA80-AAAFAAB1AAB5AAB6AAB9-AABDAAC0AAC2AADBAADCABC0-ABE2AC00-D7A3D7B0-D7C6D7CB-D7FBF900-FA2DFA30-FA6DFA70-FAD9FB1DFB1F-FB28FB2A-FB36FB38-FB3CFB3EFB40FB41FB43FB44FB46-FBB1FBD3-FD3DFD50-FD8FFD92-FDC7FDF0-FDFBFE70-FE74FE76-FEFCFF66-FF6FFF71-FF9DFFA0-FFBEFFC2-FFC7FFCA-FFCFFFD2-FFD7FFDA-FFDC", M: "0300-036F0483-04890591-05BD05BF05C105C205C405C505C70610-061A064B-065E067006D6-06DC06DE-06E406E706E806EA-06ED07110730-074A07A6-07B007EB-07F30816-0819081B-08230825-08270829-082D0900-0903093C093E-094E0951-0955096209630981-098309BC09BE-09C409C709C809CB-09CD09D709E209E30A01-0A030A3C0A3E-0A420A470A480A4B-0A4D0A510A700A710A750A81-0A830ABC0ABE-0AC50AC7-0AC90ACB-0ACD0AE20AE30B01-0B030B3C0B3E-0B440B470B480B4B-0B4D0B560B570B620B630B820BBE-0BC20BC6-0BC80BCA-0BCD0BD70C01-0C030C3E-0C440C46-0C480C4A-0C4D0C550C560C620C630C820C830CBC0CBE-0CC40CC6-0CC80CCA-0CCD0CD50CD60CE20CE30D020D030D3E-0D440D46-0D480D4A-0D4D0D570D620D630D820D830DCA0DCF-0DD40DD60DD8-0DDF0DF20DF30E310E34-0E3A0E47-0E4E0EB10EB4-0EB90EBB0EBC0EC8-0ECD0F180F190F350F370F390F3E0F3F0F71-0F840F860F870F90-0F970F99-0FBC0FC6102B-103E1056-1059105E-10601062-10641067-106D1071-10741082-108D108F109A-109D135F1712-17141732-1734175217531772177317B6-17D317DD180B-180D18A91920-192B1930-193B19B0-19C019C819C91A17-1A1B1A55-1A5E1A60-1A7C1A7F1B00-1B041B34-1B441B6B-1B731B80-1B821BA1-1BAA1C24-1C371CD0-1CD21CD4-1CE81CED1CF21DC0-1DE61DFD-1DFF20D0-20F02CEF-2CF12DE0-2DFF302A-302F3099309AA66F-A672A67CA67DA6F0A6F1A802A806A80BA823-A827A880A881A8B4-A8C4A8E0-A8F1A926-A92DA947-A953A980-A983A9B3-A9C0AA29-AA36AA43AA4CAA4DAA7BAAB0AAB2-AAB4AAB7AAB8AABEAABFAAC1ABE3-ABEAABECABEDFB1EFE00-FE0FFE20-FE26", Mn: "0300-036F0483-04870591-05BD05BF05C105C205C405C505C70610-061A064B-065E067006D6-06DC06DF-06E406E706E806EA-06ED07110730-074A07A6-07B007EB-07F30816-0819081B-08230825-08270829-082D0900-0902093C0941-0948094D0951-095509620963098109BC09C1-09C409CD09E209E30A010A020A3C0A410A420A470A480A4B-0A4D0A510A700A710A750A810A820ABC0AC1-0AC50AC70AC80ACD0AE20AE30B010B3C0B3F0B41-0B440B4D0B560B620B630B820BC00BCD0C3E-0C400C46-0C480C4A-0C4D0C550C560C620C630CBC0CBF0CC60CCC0CCD0CE20CE30D41-0D440D4D0D620D630DCA0DD2-0DD40DD60E310E34-0E3A0E47-0E4E0EB10EB4-0EB90EBB0EBC0EC8-0ECD0F180F190F350F370F390F71-0F7E0F80-0F840F860F870F90-0F970F99-0FBC0FC6102D-10301032-10371039103A103D103E10581059105E-10601071-1074108210851086108D109D135F1712-17141732-1734175217531772177317B7-17BD17C617C9-17D317DD180B-180D18A91920-19221927192819321939-193B1A171A181A561A58-1A5E1A601A621A65-1A6C1A73-1A7C1A7F1B00-1B031B341B36-1B3A1B3C1B421B6B-1B731B801B811BA2-1BA51BA81BA91C2C-1C331C361C371CD0-1CD21CD4-1CE01CE2-1CE81CED1DC0-1DE61DFD-1DFF20D0-20DC20E120E5-20F02CEF-2CF12DE0-2DFF302A-302F3099309AA66FA67CA67DA6F0A6F1A802A806A80BA825A826A8C4A8E0-A8F1A926-A92DA947-A951A980-A982A9B3A9B6-A9B9A9BCAA29-AA2EAA31AA32AA35AA36AA43AA4CAAB0AAB2-AAB4AAB7AAB8AABEAABFAAC1ABE5ABE8ABEDFB1EFE00-FE0FFE20-FE26", Mc: "0903093E-09400949-094C094E0982098309BE-09C009C709C809CB09CC09D70A030A3E-0A400A830ABE-0AC00AC90ACB0ACC0B020B030B3E0B400B470B480B4B0B4C0B570BBE0BBF0BC10BC20BC6-0BC80BCA-0BCC0BD70C01-0C030C41-0C440C820C830CBE0CC0-0CC40CC70CC80CCA0CCB0CD50CD60D020D030D3E-0D400D46-0D480D4A-0D4C0D570D820D830DCF-0DD10DD8-0DDF0DF20DF30F3E0F3F0F7F102B102C10311038103B103C105610571062-10641067-106D108310841087-108C108F109A-109C17B617BE-17C517C717C81923-19261929-192B193019311933-193819B0-19C019C819C91A19-1A1B1A551A571A611A631A641A6D-1A721B041B351B3B1B3D-1B411B431B441B821BA11BA61BA71BAA1C24-1C2B1C341C351CE11CF2A823A824A827A880A881A8B4-A8C3A952A953A983A9B4A9B5A9BAA9BBA9BD-A9C0AA2FAA30AA33AA34AA4DAA7BABE3ABE4ABE6ABE7ABE9ABEAABEC", Me: "0488048906DE20DD-20E020E2-20E4A670-A672", N: "0030-003900B200B300B900BC-00BE0660-066906F0-06F907C0-07C90966-096F09E6-09EF09F4-09F90A66-0A6F0AE6-0AEF0B66-0B6F0BE6-0BF20C66-0C6F0C78-0C7E0CE6-0CEF0D66-0D750E50-0E590ED0-0ED90F20-0F331040-10491090-10991369-137C16EE-16F017E0-17E917F0-17F91810-18191946-194F19D0-19DA1A80-1A891A90-1A991B50-1B591BB0-1BB91C40-1C491C50-1C5920702074-20792080-20892150-21822185-21892460-249B24EA-24FF2776-27932CFD30073021-30293038-303A3192-31953220-32293251-325F3280-328932B1-32BFA620-A629A6E6-A6EFA830-A835A8D0-A8D9A900-A909A9D0-A9D9AA50-AA59ABF0-ABF9FF10-FF19", Nd: "0030-00390660-066906F0-06F907C0-07C90966-096F09E6-09EF0A66-0A6F0AE6-0AEF0B66-0B6F0BE6-0BEF0C66-0C6F0CE6-0CEF0D66-0D6F0E50-0E590ED0-0ED90F20-0F291040-10491090-109917E0-17E91810-18191946-194F19D0-19DA1A80-1A891A90-1A991B50-1B591BB0-1BB91C40-1C491C50-1C59A620-A629A8D0-A8D9A900-A909A9D0-A9D9AA50-AA59ABF0-ABF9FF10-FF19", Nl: "16EE-16F02160-21822185-218830073021-30293038-303AA6E6-A6EF", No: "00B200B300B900BC-00BE09F4-09F90BF0-0BF20C78-0C7E0D70-0D750F2A-0F331369-137C17F0-17F920702074-20792080-20892150-215F21892460-249B24EA-24FF2776-27932CFD3192-31953220-32293251-325F3280-328932B1-32BFA830-A835", P: "0021-00230025-002A002C-002F003A003B003F0040005B-005D005F007B007D00A100AB00B700BB00BF037E0387055A-055F0589058A05BE05C005C305C605F305F40609060A060C060D061B061E061F066A-066D06D40700-070D07F7-07F90830-083E0964096509700DF40E4F0E5A0E5B0F04-0F120F3A-0F3D0F850FD0-0FD4104A-104F10FB1361-13681400166D166E169B169C16EB-16ED1735173617D4-17D617D8-17DA1800-180A1944194519DE19DF1A1E1A1F1AA0-1AA61AA8-1AAD1B5A-1B601C3B-1C3F1C7E1C7F1CD32010-20272030-20432045-20512053-205E207D207E208D208E2329232A2768-277527C527C627E6-27EF2983-299829D8-29DB29FC29FD2CF9-2CFC2CFE2CFF2E00-2E2E2E302E313001-30033008-30113014-301F3030303D30A030FBA4FEA4FFA60D-A60FA673A67EA6F2-A6F7A874-A877A8CEA8CFA8F8-A8FAA92EA92FA95FA9C1-A9CDA9DEA9DFAA5C-AA5FAADEAADFABEBFD3EFD3FFE10-FE19FE30-FE52FE54-FE61FE63FE68FE6AFE6BFF01-FF03FF05-FF0AFF0C-FF0FFF1AFF1BFF1FFF20FF3B-FF3DFF3FFF5BFF5DFF5F-FF65", Pd: "002D058A05BE140018062010-20152E172E1A301C303030A0FE31FE32FE58FE63FF0D", Ps: "0028005B007B0F3A0F3C169B201A201E2045207D208D23292768276A276C276E27702772277427C527E627E827EA27EC27EE2983298529872989298B298D298F299129932995299729D829DA29FC2E222E242E262E283008300A300C300E3010301430163018301A301DFD3EFE17FE35FE37FE39FE3BFE3DFE3FFE41FE43FE47FE59FE5BFE5DFF08FF3BFF5BFF5FFF62", Pe: "0029005D007D0F3B0F3D169C2046207E208E232A2769276B276D276F27712773277527C627E727E927EB27ED27EF298429862988298A298C298E2990299229942996299829D929DB29FD2E232E252E272E293009300B300D300F3011301530173019301B301E301FFD3FFE18FE36FE38FE3AFE3CFE3EFE40FE42FE44FE48FE5AFE5CFE5EFF09FF3DFF5DFF60FF63", Pi: "00AB2018201B201C201F20392E022E042E092E0C2E1C2E20", Pf: "00BB2019201D203A2E032E052E0A2E0D2E1D2E21", Pc: "005F203F20402054FE33FE34FE4D-FE4FFF3F", Po: "0021-00230025-0027002A002C002E002F003A003B003F0040005C00A100B700BF037E0387055A-055F058905C005C305C605F305F40609060A060C060D061B061E061F066A-066D06D40700-070D07F7-07F90830-083E0964096509700DF40E4F0E5A0E5B0F04-0F120F850FD0-0FD4104A-104F10FB1361-1368166D166E16EB-16ED1735173617D4-17D617D8-17DA1800-18051807-180A1944194519DE19DF1A1E1A1F1AA0-1AA61AA8-1AAD1B5A-1B601C3B-1C3F1C7E1C7F1CD3201620172020-20272030-2038203B-203E2041-20432047-205120532055-205E2CF9-2CFC2CFE2CFF2E002E012E06-2E082E0B2E0E-2E162E182E192E1B2E1E2E1F2E2A-2E2E2E302E313001-3003303D30FBA4FEA4FFA60D-A60FA673A67EA6F2-A6F7A874-A877A8CEA8CFA8F8-A8FAA92EA92FA95FA9C1-A9CDA9DEA9DFAA5C-AA5FAADEAADFABEBFE10-FE16FE19FE30FE45FE46FE49-FE4CFE50-FE52FE54-FE57FE5F-FE61FE68FE6AFE6BFF01-FF03FF05-FF07FF0AFF0CFF0EFF0FFF1AFF1BFF1FFF20FF3CFF61FF64FF65", S: "0024002B003C-003E005E0060007C007E00A2-00A900AC00AE-00B100B400B600B800D700F702C2-02C502D2-02DF02E5-02EB02ED02EF-02FF03750384038503F604820606-0608060B060E060F06E906FD06FE07F609F209F309FA09FB0AF10B700BF3-0BFA0C7F0CF10CF20D790E3F0F01-0F030F13-0F170F1A-0F1F0F340F360F380FBE-0FC50FC7-0FCC0FCE0FCF0FD5-0FD8109E109F13601390-139917DB194019E0-19FF1B61-1B6A1B74-1B7C1FBD1FBF-1FC11FCD-1FCF1FDD-1FDF1FED-1FEF1FFD1FFE20442052207A-207C208A-208C20A0-20B8210021012103-21062108210921142116-2118211E-2123212521272129212E213A213B2140-2144214A-214D214F2190-2328232B-23E82400-24262440-244A249C-24E92500-26CD26CF-26E126E326E8-26FF2701-27042706-2709270C-27272729-274B274D274F-27522756-275E2761-276727942798-27AF27B1-27BE27C0-27C427C7-27CA27CC27D0-27E527F0-29822999-29D729DC-29FB29FE-2B4C2B50-2B592CE5-2CEA2E80-2E992E9B-2EF32F00-2FD52FF0-2FFB300430123013302030363037303E303F309B309C319031913196-319F31C0-31E33200-321E322A-32503260-327F328A-32B032C0-32FE3300-33FF4DC0-4DFFA490-A4C6A700-A716A720A721A789A78AA828-A82BA836-A839AA77-AA79FB29FDFCFDFDFE62FE64-FE66FE69FF04FF0BFF1C-FF1EFF3EFF40FF5CFF5EFFE0-FFE6FFE8-FFEEFFFCFFFD", Sm: "002B003C-003E007C007E00AC00B100D700F703F60606-060820442052207A-207C208A-208C2140-2144214B2190-2194219A219B21A021A321A621AE21CE21CF21D221D421F4-22FF2308-230B23202321237C239B-23B323DC-23E125B725C125F8-25FF266F27C0-27C427C7-27CA27CC27D0-27E527F0-27FF2900-29822999-29D729DC-29FB29FE-2AFF2B30-2B442B47-2B4CFB29FE62FE64-FE66FF0BFF1C-FF1EFF5CFF5EFFE2FFE9-FFEC", Sc: "002400A2-00A5060B09F209F309FB0AF10BF90E3F17DB20A0-20B8A838FDFCFE69FF04FFE0FFE1FFE5FFE6", Sk: "005E006000A800AF00B400B802C2-02C502D2-02DF02E5-02EB02ED02EF-02FF0375038403851FBD1FBF-1FC11FCD-1FCF1FDD-1FDF1FED-1FEF1FFD1FFE309B309CA700-A716A720A721A789A78AFF3EFF40FFE3", So: "00A600A700A900AE00B000B60482060E060F06E906FD06FE07F609FA0B700BF3-0BF80BFA0C7F0CF10CF20D790F01-0F030F13-0F170F1A-0F1F0F340F360F380FBE-0FC50FC7-0FCC0FCE0FCF0FD5-0FD8109E109F13601390-1399194019E0-19FF1B61-1B6A1B74-1B7C210021012103-21062108210921142116-2118211E-2123212521272129212E213A213B214A214C214D214F2195-2199219C-219F21A121A221A421A521A7-21AD21AF-21CD21D021D121D321D5-21F32300-2307230C-231F2322-2328232B-237B237D-239A23B4-23DB23E2-23E82400-24262440-244A249C-24E92500-25B625B8-25C025C2-25F72600-266E2670-26CD26CF-26E126E326E8-26FF2701-27042706-2709270C-27272729-274B274D274F-27522756-275E2761-276727942798-27AF27B1-27BE2800-28FF2B00-2B2F2B452B462B50-2B592CE5-2CEA2E80-2E992E9B-2EF32F00-2FD52FF0-2FFB300430123013302030363037303E303F319031913196-319F31C0-31E33200-321E322A-32503260-327F328A-32B032C0-32FE3300-33FF4DC0-4DFFA490-A4C6A828-A82BA836A837A839AA77-AA79FDFDFFE4FFE8FFEDFFEEFFFCFFFD", Z: "002000A01680180E2000-200A20282029202F205F3000", Zs: "002000A01680180E2000-200A202F205F3000", Zl: "2028", Zp: "2029", C: "0000-001F007F-009F00AD03780379037F-0383038B038D03A20526-05300557055805600588058B-059005C8-05CF05EB-05EF05F5-0605061C061D0620065F06DD070E070F074B074C07B2-07BF07FB-07FF082E082F083F-08FF093A093B094F095609570973-097809800984098D098E0991099209A909B109B3-09B509BA09BB09C509C609C909CA09CF-09D609D8-09DB09DE09E409E509FC-0A000A040A0B-0A0E0A110A120A290A310A340A370A3A0A3B0A3D0A43-0A460A490A4A0A4E-0A500A52-0A580A5D0A5F-0A650A76-0A800A840A8E0A920AA90AB10AB40ABA0ABB0AC60ACA0ACE0ACF0AD1-0ADF0AE40AE50AF00AF2-0B000B040B0D0B0E0B110B120B290B310B340B3A0B3B0B450B460B490B4A0B4E-0B550B58-0B5B0B5E0B640B650B72-0B810B840B8B-0B8D0B910B96-0B980B9B0B9D0BA0-0BA20BA5-0BA70BAB-0BAD0BBA-0BBD0BC3-0BC50BC90BCE0BCF0BD1-0BD60BD8-0BE50BFB-0C000C040C0D0C110C290C340C3A-0C3C0C450C490C4E-0C540C570C5A-0C5F0C640C650C70-0C770C800C810C840C8D0C910CA90CB40CBA0CBB0CC50CC90CCE-0CD40CD7-0CDD0CDF0CE40CE50CF00CF3-0D010D040D0D0D110D290D3A-0D3C0D450D490D4E-0D560D58-0D5F0D640D650D76-0D780D800D810D840D97-0D990DB20DBC0DBE0DBF0DC7-0DC90DCB-0DCE0DD50DD70DE0-0DF10DF5-0E000E3B-0E3E0E5C-0E800E830E850E860E890E8B0E8C0E8E-0E930E980EA00EA40EA60EA80EA90EAC0EBA0EBE0EBF0EC50EC70ECE0ECF0EDA0EDB0EDE-0EFF0F480F6D-0F700F8C-0F8F0F980FBD0FCD0FD9-0FFF10C6-10CF10FD-10FF1249124E124F12571259125E125F1289128E128F12B112B612B712BF12C112C612C712D7131113161317135B-135E137D-137F139A-139F13F5-13FF169D-169F16F1-16FF170D1715-171F1737-173F1754-175F176D17711774-177F17B417B517DE17DF17EA-17EF17FA-17FF180F181A-181F1878-187F18AB-18AF18F6-18FF191D-191F192C-192F193C-193F1941-1943196E196F1975-197F19AC-19AF19CA-19CF19DB-19DD1A1C1A1D1A5F1A7D1A7E1A8A-1A8F1A9A-1A9F1AAE-1AFF1B4C-1B4F1B7D-1B7F1BAB-1BAD1BBA-1BFF1C38-1C3A1C4A-1C4C1C80-1CCF1CF3-1CFF1DE7-1DFC1F161F171F1E1F1F1F461F471F4E1F4F1F581F5A1F5C1F5E1F7E1F7F1FB51FC51FD41FD51FDC1FF01FF11FF51FFF200B-200F202A-202E2060-206F20722073208F2095-209F20B9-20CF20F1-20FF218A-218F23E9-23FF2427-243F244B-245F26CE26E226E4-26E727002705270A270B2728274C274E2753-2755275F27602795-279727B027BF27CB27CD-27CF2B4D-2B4F2B5A-2BFF2C2F2C5F2CF2-2CF82D26-2D2F2D66-2D6E2D70-2D7F2D97-2D9F2DA72DAF2DB72DBF2DC72DCF2DD72DDF2E32-2E7F2E9A2EF4-2EFF2FD6-2FEF2FFC-2FFF3040309730983100-3104312E-3130318F31B8-31BF31E4-31EF321F32FF4DB6-4DBF9FCC-9FFFA48D-A48FA4C7-A4CFA62C-A63FA660A661A674-A67BA698-A69FA6F8-A6FFA78D-A7FAA82C-A82FA83A-A83FA878-A87FA8C5-A8CDA8DA-A8DFA8FC-A8FFA954-A95EA97D-A97FA9CEA9DA-A9DDA9E0-A9FFAA37-AA3FAA4EAA4FAA5AAA5BAA7C-AA7FAAC3-AADAAAE0-ABBFABEEABEFABFA-ABFFD7A4-D7AFD7C7-D7CAD7FC-F8FFFA2EFA2FFA6EFA6FFADA-FAFFFB07-FB12FB18-FB1CFB37FB3DFB3FFB42FB45FBB2-FBD2FD40-FD4FFD90FD91FDC8-FDEFFDFEFDFFFE1A-FE1FFE27-FE2FFE53FE67FE6C-FE6FFE75FEFD-FF00FFBF-FFC1FFC8FFC9FFD0FFD1FFD8FFD9FFDD-FFDFFFE7FFEF-FFFBFFFEFFFF", Cc: "0000-001F007F-009F", Cf: "00AD0600-060306DD070F17B417B5200B-200F202A-202E2060-2064206A-206FFEFFFFF9-FFFB", Co: "E000-F8FF", Cs: "D800-DFFF", Cn: "03780379037F-0383038B038D03A20526-05300557055805600588058B-059005C8-05CF05EB-05EF05F5-05FF06040605061C061D0620065F070E074B074C07B2-07BF07FB-07FF082E082F083F-08FF093A093B094F095609570973-097809800984098D098E0991099209A909B109B3-09B509BA09BB09C509C609C909CA09CF-09D609D8-09DB09DE09E409E509FC-0A000A040A0B-0A0E0A110A120A290A310A340A370A3A0A3B0A3D0A43-0A460A490A4A0A4E-0A500A52-0A580A5D0A5F-0A650A76-0A800A840A8E0A920AA90AB10AB40ABA0ABB0AC60ACA0ACE0ACF0AD1-0ADF0AE40AE50AF00AF2-0B000B040B0D0B0E0B110B120B290B310B340B3A0B3B0B450B460B490B4A0B4E-0B550B58-0B5B0B5E0B640B650B72-0B810B840B8B-0B8D0B910B96-0B980B9B0B9D0BA0-0BA20BA5-0BA70BAB-0BAD0BBA-0BBD0BC3-0BC50BC90BCE0BCF0BD1-0BD60BD8-0BE50BFB-0C000C040C0D0C110C290C340C3A-0C3C0C450C490C4E-0C540C570C5A-0C5F0C640C650C70-0C770C800C810C840C8D0C910CA90CB40CBA0CBB0CC50CC90CCE-0CD40CD7-0CDD0CDF0CE40CE50CF00CF3-0D010D040D0D0D110D290D3A-0D3C0D450D490D4E-0D560D58-0D5F0D640D650D76-0D780D800D810D840D97-0D990DB20DBC0DBE0DBF0DC7-0DC90DCB-0DCE0DD50DD70DE0-0DF10DF5-0E000E3B-0E3E0E5C-0E800E830E850E860E890E8B0E8C0E8E-0E930E980EA00EA40EA60EA80EA90EAC0EBA0EBE0EBF0EC50EC70ECE0ECF0EDA0EDB0EDE-0EFF0F480F6D-0F700F8C-0F8F0F980FBD0FCD0FD9-0FFF10C6-10CF10FD-10FF1249124E124F12571259125E125F1289128E128F12B112B612B712BF12C112C612C712D7131113161317135B-135E137D-137F139A-139F13F5-13FF169D-169F16F1-16FF170D1715-171F1737-173F1754-175F176D17711774-177F17DE17DF17EA-17EF17FA-17FF180F181A-181F1878-187F18AB-18AF18F6-18FF191D-191F192C-192F193C-193F1941-1943196E196F1975-197F19AC-19AF19CA-19CF19DB-19DD1A1C1A1D1A5F1A7D1A7E1A8A-1A8F1A9A-1A9F1AAE-1AFF1B4C-1B4F1B7D-1B7F1BAB-1BAD1BBA-1BFF1C38-1C3A1C4A-1C4C1C80-1CCF1CF3-1CFF1DE7-1DFC1F161F171F1E1F1F1F461F471F4E1F4F1F581F5A1F5C1F5E1F7E1F7F1FB51FC51FD41FD51FDC1FF01FF11FF51FFF2065-206920722073208F2095-209F20B9-20CF20F1-20FF218A-218F23E9-23FF2427-243F244B-245F26CE26E226E4-26E727002705270A270B2728274C274E2753-2755275F27602795-279727B027BF27CB27CD-27CF2B4D-2B4F2B5A-2BFF2C2F2C5F2CF2-2CF82D26-2D2F2D66-2D6E2D70-2D7F2D97-2D9F2DA72DAF2DB72DBF2DC72DCF2DD72DDF2E32-2E7F2E9A2EF4-2EFF2FD6-2FEF2FFC-2FFF3040309730983100-3104312E-3130318F31B8-31BF31E4-31EF321F32FF4DB6-4DBF9FCC-9FFFA48D-A48FA4C7-A4CFA62C-A63FA660A661A674-A67BA698-A69FA6F8-A6FFA78D-A7FAA82C-A82FA83A-A83FA878-A87FA8C5-A8CDA8DA-A8DFA8FC-A8FFA954-A95EA97D-A97FA9CEA9DA-A9DDA9E0-A9FFAA37-AA3FAA4EAA4FAA5AAA5BAA7C-AA7FAAC3-AADAAAE0-ABBFABEEABEFABFA-ABFFD7A4-D7AFD7C7-D7CAD7FC-D7FFFA2EFA2FFA6EFA6FFADA-FAFFFB07-FB12FB18-FB1CFB37FB3DFB3FFB42FB45FBB2-FBD2FD40-FD4FFD90FD91FDC8-FDEFFDFEFDFFFE1A-FE1FFE27-FE2FFE53FE67FE6C-FE6FFE75FEFDFEFEFF00FFBF-FFC1FFC8FFC9FFD0FFD1FFD8FFD9FFDD-FFDFFFE7FFEF-FFF8FFFEFFFF"})
-}), ace.define("ace/document", ["require", "exports", "module", "ace/lib/oop", "ace/lib/event_emitter", "ace/range", "ace/anchor"], function (e, t, n) {
- var r = e("./lib/oop"), i = e("./lib/event_emitter").EventEmitter, s = e("./range").Range, o = e("./anchor").Anchor, u = function (e) {
- this.$lines = [], e.length == 0 ? this.$lines = [""] : Array.isArray(e) ? this.insertLines(0, e) : this.insert({row: 0, column: 0}, e)
- };
- (function () {
- r.implement(this, i), this.setValue = function (e) {
- var t = this.getLength();
- this.remove(new s(0, 0, t, this.getLine(t - 1).length)), this.insert({row: 0, column: 0}, e)
- }, this.getValue = function () {
- return this.getAllLines().join(this.getNewLineCharacter())
- }, this.createAnchor = function (e, t) {
- return new o(this, e, t)
- }, "aaa".split(/a/).length == 0 ? this.$split = function (e) {
- return e.replace(/\r\n|\r/g, "\n").split("\n")
- } : this.$split = function (e) {
- return e.split(/\r\n|\r|\n/)
- }, this.$detectNewLine = function (e) {
- var t = e.match(/^.*?(\r\n|\r|\n)/m);
- t ? this.$autoNewLine = t[1] : this.$autoNewLine = "\n"
- }, this.getNewLineCharacter = function () {
- switch (this.$newLineMode) {
- case"windows":
- return"\r\n";
- case"unix":
- return"\n";
- default:
- return this.$autoNewLine
- }
- }, this.$autoNewLine = "\n", this.$newLineMode = "auto", this.setNewLineMode = function (e) {
- if (this.$newLineMode === e)return;
- this.$newLineMode = e
- }, this.getNewLineMode = function () {
- return this.$newLineMode
- }, this.isNewLine = function (e) {
- return e == "\r\n" || e == "\r" || e == "\n"
- }, this.getLine = function (e) {
- return this.$lines[e] || ""
- }, this.getLines = function (e, t) {
- return this.$lines.slice(e, t + 1)
- }, this.getAllLines = function () {
- return this.getLines(0, this.getLength())
- }, this.getLength = function () {
- return this.$lines.length
- }, this.getTextRange = function (e) {
- if (e.start.row == e.end.row)return this.$lines[e.start.row].substring(e.start.column, e.end.column);
- var t = this.getLines(e.start.row + 1, e.end.row - 1);
- return t.unshift((this.$lines[e.start.row] || "").substring(e.start.column)), t.push((this.$lines[e.end.row] || "").substring(0, e.end.column)), t.join(this.getNewLineCharacter())
- }, this.$clipPosition = function (e) {
- var t = this.getLength();
- return e.row >= t && (e.row = Math.max(0, t - 1), e.column = this.getLine(t - 1).length), e
- }, this.insert = function (e, t) {
- if (!t || t.length === 0)return e;
- e = this.$clipPosition(e), this.getLength() <= 1 && this.$detectNewLine(t);
- var n = this.$split(t), r = n.splice(0, 1)[0], i = n.length == 0 ? null : n.splice(n.length - 1, 1)[0];
- return e = this.insertInLine(e, r), i !== null && (e = this.insertNewLine(e), e = this.insertLines(e.row, n), e = this.insertInLine(e, i || "")), e
- }, this.insertLines = function (e, t) {
- if (t.length == 0)return{row: e, column: 0};
- if (t.length > 65535) {
- var n = this.insertLines(e, t.slice(65535));
- t = t.slice(0, 65535)
- }
- var r = [e, 0];
- r.push.apply(r, t), this.$lines.splice.apply(this.$lines, r);
- var i = new s(e, 0, e + t.length, 0), o = {action: "insertLines", range: i, lines: t};
- return this._emit("change", {data: o}), n || i.end
- }, this.insertNewLine = function (e) {
- e = this.$clipPosition(e);
- var t = this.$lines[e.row] || "";
- this.$lines[e.row] = t.substring(0, e.column), this.$lines.splice(e.row + 1, 0, t.substring(e.column, t.length));
- var n = {row: e.row + 1, column: 0}, r = {action: "insertText", range: s.fromPoints(e, n), text: this.getNewLineCharacter()};
- return this._emit("change", {data: r}), n
- }, this.insertInLine = function (e, t) {
- if (t.length == 0)return e;
- var n = this.$lines[e.row] || "";
- this.$lines[e.row] = n.substring(0, e.column) + t + n.substring(e.column);
- var r = {row: e.row, column: e.column + t.length}, i = {action: "insertText", range: s.fromPoints(e, r), text: t};
- return this._emit("change", {data: i}), r
- }, this.remove = function (e) {
- e.start = this.$clipPosition(e.start), e.end = this.$clipPosition(e.end);
- if (e.isEmpty())return e.start;
- var t = e.start.row, n = e.end.row;
- if (e.isMultiLine()) {
- var r = e.start.column == 0 ? t : t + 1, i = n - 1;
- e.end.column > 0 && this.removeInLine(n, 0, e.end.column), i >= r && this.removeLines(r, i), r != t && (this.removeInLine(t, e.start.column, this.getLine(t).length), this.removeNewLine(e.start.row))
- } else this.removeInLine(t, e.start.column, e.end.column);
- return e.start
- }, this.removeInLine = function (e, t, n) {
- if (t == n)return;
- var r = new s(e, t, e, n), i = this.getLine(e), o = i.substring(t, n), u = i.substring(0, t) + i.substring(n, i.length);
- this.$lines.splice(e, 1, u);
- var a = {action: "removeText", range: r, text: o};
- return this._emit("change", {data: a}), r.start
- }, this.removeLines = function (e, t) {
- var n = new s(e, 0, t + 1, 0), r = this.$lines.splice(e, t - e + 1), i = {action: "removeLines", range: n, nl: this.getNewLineCharacter(), lines: r};
- return this._emit("change", {data: i}), r
- }, this.removeNewLine = function (e) {
- var t = this.getLine(e), n = this.getLine(e + 1), r = new s(e, t.length, e + 1, 0), i = t + n;
- this.$lines.splice(e, 2, i);
- var o = {action: "removeText", range: r, text: this.getNewLineCharacter()};
- this._emit("change", {data: o})
- }, this.replace = function (e, t) {
- if (t.length == 0 && e.isEmpty())return e.start;
- if (t == this.getTextRange(e))return e.end;
- this.remove(e);
- if (t)var n = this.insert(e.start, t); else n = e.start;
- return n
- }, this.applyDeltas = function (e) {
- for (var t = 0; t < e.length; t++) {
- var n = e[t], r = s.fromPoints(n.range.start, n.range.end);
- n.action == "insertLines" ? this.insertLines(r.start.row, n.lines) : n.action == "insertText" ? this.insert(r.start, n.text) : n.action == "removeLines" ? this.removeLines(r.start.row, r.end.row - 1) : n.action == "removeText" && this.remove(r)
- }
- }, this.revertDeltas = function (e) {
- for (var t = e.length - 1; t >= 0; t--) {
- var n = e[t], r = s.fromPoints(n.range.start, n.range.end);
- n.action == "insertLines" ? this.removeLines(r.start.row, r.end.row - 1) : n.action == "insertText" ? this.remove(r) : n.action == "removeLines" ? this.insertLines(r.start.row, n.lines) : n.action == "removeText" && this.insert(r.start, n.text)
- }
- }, this.indexToPosition = function (e, t) {
- var n = this.$lines || this.getAllLines(), r = this.getNewLineCharacter().length;
- for (var i = t || 0, s = n.length; i < s; i++) {
- e -= n[i].length + r;
- if (e < 0)return{row: i, column: e + n[i].length + r}
- }
- return{row: s - 1, column: n[s - 1].length}
- }, this.positionToIndex = function (e, t) {
- var n = this.$lines || this.getAllLines(), r = this.getNewLineCharacter().length, i = 0, s = Math.min(e.row, n.length);
- for (var o = t || 0; o < s; ++o)i += n[o].length;
- return i + r * o + e.column
- }
- }).call(u.prototype), t.Document = u
-}), ace.define("ace/anchor", ["require", "exports", "module", "ace/lib/oop", "ace/lib/event_emitter"], function (e, t, n) {
- var r = e("./lib/oop"), i = e("./lib/event_emitter").EventEmitter, s = t.Anchor = function (e, t, n) {
- this.document = e, typeof n == "undefined" ? this.setPosition(t.row, t.column) : this.setPosition(t, n), this.$onChange = this.onChange.bind(this), e.on("change", this.$onChange)
- };
- (function () {
- r.implement(this, i), this.getPosition = function () {
- return this.$clipPositionToDocument(this.row, this.column)
- }, this.getDocument = function () {
- return this.document
- }, this.onChange = function (e) {
- var t = e.data, n = t.range;
- if (n.start.row == n.end.row && n.start.row != this.row)return;
- if (n.start.row > this.row)return;
- if (n.start.row == this.row && n.start.column > this.column)return;
- var r = this.row, i = this.column;
- t.action === "insertText" ? n.start.row === r && n.start.column <= i ? n.start.row === n.end.row ? i += n.end.column - n.start.column : (i -= n.start.column, r += n.end.row - n.start.row) : n.start.row !== n.end.row && n.start.row < r && (r += n.end.row - n.start.row) : t.action === "insertLines" ? n.start.row <= r && (r += n.end.row - n.start.row) : t.action == "removeText" ? n.start.row == r && n.start.column < i ? n.end.column >= i ? i = n.start.column : i = Math.max(0, i - (n.end.column - n.start.column)) : n.start.row !== n.end.row && n.start.row < r ? (n.end.row == r && (i = Math.max(0, i - n.end.column) + n.start.column), r -= n.end.row - n.start.row) : n.end.row == r && (r -= n.end.row - n.start.row, i = Math.max(0, i - n.end.column) + n.start.column) : t.action == "removeLines" && n.start.row <= r && (n.end.row <= r ? r -= n.end.row - n.start.row : (r = n.start.row, i = 0)), this.setPosition(r, i, !0)
- }, this.setPosition = function (e, t, n) {
- var r;
- n ? r = {row: e, column: t} : r = this.$clipPositionToDocument(e, t);
- if (this.row == r.row && this.column == r.column)return;
- var i = {row: this.row, column: this.column};
- this.row = r.row, this.column = r.column, this._emit("change", {old: i, value: r})
- }, this.detach = function () {
- this.document.removeEventListener("change", this.$onChange)
- }, this.$clipPositionToDocument = function (e, t) {
- var n = {};
- return e >= this.document.getLength() ? (n.row = Math.max(0, this.document.getLength() - 1), n.column = this.document.getLine(n.row).length) : e < 0 ? (n.row = 0, n.column = 0) : (n.row = e, n.column = Math.min(this.document.getLine(n.row).length, Math.max(0, t))), t < 0 && (n.column = 0), n
- }
- }).call(s.prototype)
-}), ace.define("ace/background_tokenizer", ["require", "exports", "module", "ace/lib/oop", "ace/lib/event_emitter"], function (e, t, n) {
- var r = e("./lib/oop"), i = e("./lib/event_emitter").EventEmitter, s = 5e3, o = function (e, t) {
- this.running = !1, this.lines = [], this.states = [], this.currentLine = 0, this.tokenizer = e;
- var n = this;
- this.$worker = function () {
- if (!n.running)return;
- var e = new Date, t = n.currentLine, r = n.doc, i = 0, s = r.getLength();
- while (n.currentLine < s) {
- n.$tokenizeRow(n.currentLine);
- while (n.lines[n.currentLine])n.currentLine++;
- i++;
- if (i % 5 == 0 && new Date - e > 20) {
- n.fireUpdateEvent(t, n.currentLine - 1), n.running = setTimeout(n.$worker, 20);
- return
- }
- }
- n.running = !1, n.fireUpdateEvent(t, s - 1)
- }
- };
- (function () {
- r.implement(this, i), this.setTokenizer = function (e) {
- this.tokenizer = e, this.lines = [], this.states = [], this.start(0)
- }, this.setDocument = function (e) {
- this.doc = e, this.lines = [], this.states = [], this.stop()
- }, this.fireUpdateEvent = function (e, t) {
- var n = {first: e, last: t};
- this._emit("update", {data: n})
- }, this.start = function (e) {
- this.currentLine = Math.min(e || 0, this.currentLine, this.doc.getLength()), this.lines.splice(this.currentLine, this.lines.length), this.states.splice(this.currentLine, this.states.length), this.stop(), this.running = setTimeout(this.$worker, 700)
- }, this.$updateOnChange = function (e) {
- var t = e.range, n = t.start.row, r = t.end.row - n;
- if (r === 0)this.lines[n] = null; else if (e.action == "removeText" || e.action == "removeLines")this.lines.splice(n, r + 1, null), this.states.splice(n, r + 1, null); else {
- var i = Array(r + 1);
- i.unshift(n, 1), this.lines.splice.apply(this.lines, i), this.states.splice.apply(this.states, i)
- }
- this.currentLine = Math.min(n, this.currentLine, this.doc.getLength()), this.stop(), this.running = setTimeout(this.$worker, 700)
- }, this.stop = function () {
- this.running && clearTimeout(this.running), this.running = !1
- }, this.getTokens = function (e) {
- return this.lines[e] || this.$tokenizeRow(e)
- }, this.getState = function (e) {
- return this.currentLine == e && this.$tokenizeRow(e), this.states[e] || "start"
- }, this.$tokenizeRow = function (e) {
- var t = this.doc.getLine(e), n = this.states[e - 1];
- if (t.length > s) {
- var r = {value: t.substr(s), type: "text"};
- t = t.slice(0, s)
- }
- var i = this.tokenizer.getLineTokens(t, n);
- return r && (i.tokens.push(r), i.state = "start"), this.states[e] + "" != i.state + "" ? (this.states[e] = i.state, this.lines[e + 1] = null, this.currentLine > e + 1 && (this.currentLine = e + 1)) : this.currentLine == e && (this.currentLine = e + 1), this.lines[e] = i.tokens
- }
- }).call(o.prototype), t.BackgroundTokenizer = o
-}), ace.define("ace/search_highlight", ["require", "exports", "module", "ace/lib/lang", "ace/lib/oop", "ace/range"], function (e, t, n) {
- var r = e("./lib/lang"), i = e("./lib/oop"), s = e("./range").Range, o = function (e, t, n) {
- this.setRegexp(e), this.clazz = t, this.type = n || "text"
- };
- (function () {
- this.MAX_RANGES = 500, this.setRegexp = function (e) {
- if (this.regExp + "" == e + "")return;
- this.regExp = e, this.cache = []
- }, this.update = function (e, t, n, i) {
- if (!this.regExp)return;
- var o = i.firstRow, u = i.lastRow;
- for (var a = o; a <= u; a++) {
- var f = this.cache[a];
- f == null && (f = r.getMatchOffsets(n.getLine(a), this.regExp), f.length > this.MAX_RANGES && (f = f.slice(0, this.MAX_RANGES)), f = f.map(function (e) {
- return new s(a, e.offset, a, e.offset + e.length)
- }), this.cache[a] = f.length ? f : "");
- for (var l = f.length; l--;)t.drawSingleLineMarker(e, f[l].toScreenRange(n), this.clazz, i, null, this.type)
- }
- }
- }).call(o.prototype), t.SearchHighlight = o
-}), ace.define("ace/edit_session/folding", ["require", "exports", "module", "ace/range", "ace/edit_session/fold_line", "ace/edit_session/fold", "ace/token_iterator"], function (e, t, n) {
- function u() {
- this.getFoldAt = function (e, t, n) {
- var r = this.getFoldLine(e);
- if (!r)return null;
- var i = r.folds;
- for (var s = 0; s < i.length; s++) {
- var o = i[s];
- if (o.range.contains(e, t)) {
- if (n == 1 && o.range.isEnd(e, t))continue;
- if (n == -1 && o.range.isStart(e, t))continue;
- return o
- }
- }
- }, this.getFoldsInRange = function (e) {
- e = e.clone();
- var t = e.start, n = e.end, r = this.$foldData, i = [];
- t.column += 1, n.column -= 1;
- for (var s = 0; s < r.length; s++) {
- var o = r[s].range.compareRange(e);
- if (o == 2)continue;
- if (o == -2)break;
- var u = r[s].folds;
- for (var a = 0; a < u.length; a++) {
- var f = u[a];
- o = f.range.compareRange(e);
- if (o == -2)break;
- if (o == 2)continue;
- if (o == 42)break;
- i.push(f)
- }
- }
- return i
- }, this.getAllFolds = function () {
- function n(t) {
- e.push(t);
- if (!t.subFolds)return;
- for (var r = 0; r < t.subFolds.length; r++)n(t.subFolds[r])
- }
-
- var e = [], t = this.$foldData;
- for (var r = 0; r < t.length; r++)for (var i = 0; i < t[r].folds.length; i++)n(t[r].folds[i]);
- return e
- }, this.getFoldStringAt = function (e, t, n, r) {
- r = r || this.getFoldLine(e);
- if (!r)return null;
- var i = {end: {column: 0}}, s, o;
- for (var u = 0; u < r.folds.length; u++) {
- o = r.folds[u];
- var a = o.range.compareEnd(e, t);
- if (a == -1) {
- s = this.getLine(o.start.row).substring(i.end.column, o.start.column);
- break
- }
- if (a === 0)return null;
- i = o
- }
- return s || (s = this.getLine(o.start.row).substring(i.end.column)), n == -1 ? s.substring(0, t - i.end.column) : n == 1 ? s.substring(t - i.end.column) : s
- }, this.getFoldLine = function (e, t) {
- var n = this.$foldData, r = 0;
- t && (r = n.indexOf(t)), r == -1 && (r = 0);
- for (r; r < n.length; r++) {
- var i = n[r];
- if (i.start.row <= e && i.end.row >= e)return i;
- if (i.end.row > e)return null
- }
- return null
- }, this.getNextFoldLine = function (e, t) {
- var n = this.$foldData, r = 0;
- t && (r = n.indexOf(t)), r == -1 && (r = 0);
- for (r; r < n.length; r++) {
- var i = n[r];
- if (i.end.row >= e)return i
- }
- return null
- }, this.getFoldedRowCount = function (e, t) {
- var n = this.$foldData, r = t - e + 1;
- for (var i = 0; i < n.length; i++) {
- var s = n[i], o = s.end.row, u = s.start.row;
- if (o >= t) {
- u < t && (u >= e ? r -= t - u : r = 0);
- break
- }
- o >= e && (u >= e ? r -= o - u : r -= o - e + 1)
- }
- return r
- }, this.$addFoldLine = function (e) {
- return this.$foldData.push(e), this.$foldData.sort(function (e, t) {
- return e.start.row - t.start.row
- }), e
- }, this.addFold = function (e, t) {
- var n = this.$foldData, r = !1, o;
- e instanceof s ? o = e : o = new s(t, e), this.$clipRangeToDocument(o.range);
- var u = o.start.row, a = o.start.column, f = o.end.row, l = o.end.column;
- if (u == f && l - a < 2)throw"The range has to be at least 2 characters width";
- var c = this.getFoldAt(u, a, 1), h = this.getFoldAt(f, l, -1);
- if (c && h == c)return c.addSubFold(o);
- if (c && !c.range.isStart(u, a) || h && !h.range.isEnd(f, l))throw"A fold can't intersect already existing fold" + o.range + c.range;
- var p = this.getFoldsInRange(o.range);
- p.length > 0 && (this.removeFolds(p), o.subFolds = p);
- for (var d = 0; d < n.length; d++) {
- var v = n[d];
- if (f == v.start.row) {
- v.addFold(o), r = !0;
- break
- }
- if (u == v.end.row) {
- v.addFold(o), r = !0;
- if (!o.sameRow) {
- var m = n[d + 1];
- if (m && m.start.row == f) {
- v.merge(m);
- break
- }
- }
- break
- }
- if (f <= v.start.row)break
- }
- return r || (v = this.$addFoldLine(new i(this.$foldData, o))), this.$useWrapMode ? this.$updateWrapData(v.start.row, v.start.row) : this.$updateRowLengthCache(v.start.row, v.start.row), this.$modified = !0, this._emit("changeFold", {data: o}), o
- }, this.addFolds = function (e) {
- e.forEach(function (e) {
- this.addFold(e)
- }, this)
- }, this.removeFold = function (e) {
- var t = e.foldLine, n = t.start.row, r = t.end.row, i = this.$foldData, s = t.folds;
- if (s.length == 1)i.splice(i.indexOf(t), 1); else if (t.range.isEnd(e.end.row, e.end.column))s.pop(), t.end.row = s[s.length - 1].end.row, t.end.column = s[s.length - 1].end.column; else if (t.range.isStart(e.start.row, e.start.column))s.shift(), t.start.row = s[0].start.row, t.start.column = s[0].start.column; else if (e.sameRow)s.splice(s.indexOf(e), 1); else {
- var o = t.split(e.start.row, e.start.column);
- s = o.folds, s.shift(), o.start.row = s[0].start.row, o.start.column = s[0].start.column
- }
- this.$useWrapMode ? this.$updateWrapData(n, r) : this.$updateRowLengthCache(n, r), this.$modified = !0, this._emit("changeFold", {data: e})
- }, this.removeFolds = function (e) {
- var t = [];
- for (var n = 0; n < e.length; n++)t.push(e[n]);
- t.forEach(function (e) {
- this.removeFold(e)
- }, this), this.$modified = !0
- }, this.expandFold = function (e) {
- this.removeFold(e), e.subFolds.forEach(function (e) {
- this.addFold(e)
- }, this), e.subFolds = []
- }, this.expandFolds = function (e) {
- e.forEach(function (e) {
- this.expandFold(e)
- }, this)
- }, this.unfold = function (e, t) {
- var n, i;
- e == null ? n = new r(0, 0, this.getLength(), 0) : typeof e == "number" ? n = new r(e, 0, e, this.getLine(e).length) : "row"in e ? n = r.fromPoints(e, e) : n = e, i = this.getFoldsInRange(n);
- if (t)this.removeFolds(i); else while (i.length)this.expandFolds(i), i = this.getFoldsInRange(n)
- }, this.isRowFolded = function (e, t) {
- return!!this.getFoldLine(e, t)
- }, this.getRowFoldEnd = function (e, t) {
- var n = this.getFoldLine(e, t);
- return n ? n.end.row : e
- }, this.getFoldDisplayLine = function (e, t, n, r, i) {
- r == null && (r = e.start.row, i = 0), t == null && (t = e.end.row, n = this.getLine(t).length);
- var s = this.doc, o = "";
- return e.walk(function (e, t, n, u) {
- if (t < r)return;
- if (t == r) {
- if (n < i)return;
- u = Math.max(i, u)
- }
- e != null ? o += e : o += s.getLine(t).substring(u, n)
- }.bind(this), t, n), o
- }, this.getDisplayLine = function (e, t, n, r) {
- var i = this.getFoldLine(e);
- if (!i) {
- var s;
- return s = this.doc.getLine(e), s.substring(r || 0, t || s.length)
- }
- return this.getFoldDisplayLine(i, e, t, n, r)
- }, this.$cloneFoldData = function () {
- var e = [];
- return e = this.$foldData.map(function (t) {
- var n = t.folds.map(function (e) {
- return e.clone()
- });
- return new i(e, n)
- }), e
- }, this.toggleFold = function (e) {
- var t = this.selection, n = t.getRange(), r, i;
- if (n.isEmpty()) {
- var s = n.start;
- r = this.getFoldAt(s.row, s.column);
- if (r) {
- this.expandFold(r);
- return
- }
- (i = this.findMatchingBracket(s)) ? n.comparePoint(i) == 1 ? n.end = i : (n.start = i, n.start.column++, n.end.column--) : (i = this.findMatchingBracket({row: s.row, column: s.column + 1})) ? (n.comparePoint(i) == 1 ? n.end = i : n.start = i, n.start.column++) : n = this.getCommentFoldRange(s.row, s.column) || n
- } else {
- var o = this.getFoldsInRange(n);
- if (e && o.length) {
- this.expandFolds(o);
- return
- }
- o.length == 1 && (r = o[0])
- }
- r || (r = this.getFoldAt(n.start.row, n.start.column));
- if (r && r.range.toString() == n.toString()) {
- this.expandFold(r);
- return
- }
- var u = "...";
- if (!n.isMultiLine()) {
- u = this.getTextRange(n);
- if (u.length < 4)return;
- u = u.trim().substring(0, 2) + ".."
- }
- this.addFold(u, n)
- }, this.getCommentFoldRange = function (e, t, n) {
- var i = new o(this, e, t), s = i.getCurrentToken();
- if (s && /^comment|string/.test(s.type)) {
- var u = new r, a = new RegExp(s.type.replace(/\..*/, "\\."));
- if (n != 1) {
- do s = i.stepBackward(); while (s && a.test(s.type));
- i.stepForward()
- }
- u.start.row = i.getCurrentTokenRow(), u.start.column = i.getCurrentTokenColumn() + 2, i = new o(this, e, t);
- if (n != -1) {
- do s = i.stepForward(); while (s && a.test(s.type));
- s = i.stepBackward()
- } else s = i.getCurrentToken();
- return u.end.row = i.getCurrentTokenRow(), u.end.column = i.getCurrentTokenColumn() + s.value.length - 2, u
- }
- }, this.foldAll = function (e, t) {
- var n = this.foldWidgets;
- t = t || this.getLength();
- for (var r = e || 0; r < t; r++) {
- n[r] == null && (n[r] = this.getFoldWidget(r));
- if (n[r] != "start")continue;
- var i = this.getFoldWidgetRange(r);
- if (i && i.end.row <= t)try {
- this.addFold("...", i)
- } catch (s) {
- }
- }
- }, this.$foldStyles = {manual: 1, markbegin: 1, markbeginend: 1}, this.$foldStyle = "markbegin", this.setFoldStyle = function (e) {
- if (!this.$foldStyles[e])throw new Error("invalid fold style: " + e + "[" + Object.keys(this.$foldStyles).join(", ") + "]");
- if (this.$foldStyle == e)return;
- this.$foldStyle = e, e == "manual" && this.unfold();
- var t = this.$foldMode;
- this.$setFolding(null), this.$setFolding(t)
- }, this.$setFolding = function (e) {
- if (this.$foldMode == e)return;
- this.$foldMode = e, this.removeListener("change", this.$updateFoldWidgets), this._emit("changeAnnotation");
- if (!e || this.$foldStyle == "manual") {
- this.foldWidgets = null;
- return
- }
- this.foldWidgets = [], this.getFoldWidget = e.getFoldWidget.bind(e, this, this.$foldStyle), this.getFoldWidgetRange = e.getFoldWidgetRange.bind(e, this, this.$foldStyle), this.$updateFoldWidgets = this.updateFoldWidgets.bind(this), this.on("change", this.$updateFoldWidgets)
- }, this.onFoldWidgetClick = function (e, t) {
- t = t.domEvent;
- var n = this.getFoldWidget(e), r = this.getLine(e), i = t.shiftKey, s = i || t.ctrlKey || t.altKey || t.metaKey, o;
- n == "end" ? o = this.getFoldAt(e, 0, -1) : o = this.getFoldAt(e, r.length, 1);
- if (o) {
- s ? this.removeFold(o) : this.expandFold(o);
- return
- }
- var u = this.getFoldWidgetRange(e);
- if (u) {
- if (!u.isMultiLine()) {
- o = this.getFoldAt(u.start.row, u.start.column, 1);
- if (o && u.isEqual(o.range)) {
- this.removeFold(o);
- return
- }
- }
- i || this.addFold("...", u), s && this.foldAll(u.start.row + 1, u.end.row)
- } else s && this.foldAll(e + 1, this.getLength()), (t.target || t.srcElement).className += " ace_invalid"
- }, this.updateFoldWidgets = function (e) {
- var t = e.data, n = t.range, r = n.start.row, i = n.end.row - r;
- if (i === 0)this.foldWidgets[r] = null; else if (t.action == "removeText" || t.action == "removeLines")this.foldWidgets.splice(r, i + 1, null); else {
- var s = Array(i + 1);
- s.unshift(r, 1), this.foldWidgets.splice.apply(this.foldWidgets, s)
- }
- }
- }
-
- var r = e("../range").Range, i = e("./fold_line").FoldLine, s = e("./fold").Fold, o = e("../token_iterator").TokenIterator;
- t.Folding = u
-}), ace.define("ace/edit_session/fold_line", ["require", "exports", "module", "ace/range"], function (e, t, n) {
- function i(e, t) {
- this.foldData = e, Array.isArray(t) ? this.folds = t : t = this.folds = [t];
- var n = t[t.length - 1];
- this.range = new r(t[0].start.row, t[0].start.column, n.end.row, n.end.column), this.start = this.range.start, this.end = this.range.end, this.folds.forEach(function (e) {
- e.setFoldLine(this)
- }, this)
- }
-
- var r = e("../range").Range;
- (function () {
- this.shiftRow = function (e) {
- this.start.row += e, this.end.row += e, this.folds.forEach(function (t) {
- t.start.row += e, t.end.row += e
- })
- }, this.addFold = function (e) {
- if (e.sameRow) {
- if (e.start.row < this.startRow || e.endRow > this.endRow)throw"Can't add a fold to this FoldLine as it has no connection";
- this.folds.push(e), this.folds.sort(function (e, t) {
- return-e.range.compareEnd(t.start.row, t.start.column)
- }), this.range.compareEnd(e.start.row, e.start.column) > 0 ? (this.end.row = e.end.row, this.end.column = e.end.column) : this.range.compareStart(e.end.row, e.end.column) < 0 && (this.start.row = e.start.row, this.start.column = e.start.column)
- } else if (e.start.row == this.end.row)this.folds.push(e), this.end.row = e.end.row, this.end.column = e.end.column; else {
- if (e.end.row != this.start.row)throw"Trying to add fold to FoldRow that doesn't have a matching row";
- this.folds.unshift(e), this.start.row = e.start.row, this.start.column = e.start.column
- }
- e.foldLine = this
- }, this.containsRow = function (e) {
- return e >= this.start.row && e <= this.end.row
- }, this.walk = function (e, t, n) {
- var r = 0, i = this.folds, s, o, u, a = !0;
- t == null && (t = this.end.row, n = this.end.column);
- for (var f = 0; f < i.length; f++) {
- s = i[f], o = s.range.compareStart(t, n);
- if (o == -1) {
- e(null, t, n, r, a);
- return
- }
- u = e(null, s.start.row, s.start.column, r, a), u = !u && e(s.placeholder, s.start.row, s.start.column, r);
- if (u || o == 0)return;
- a = !s.sameRow, r = s.end.column
- }
- e(null, t, n, r, a)
- }, this.getNextFoldTo = function (e, t) {
- var n, r;
- for (var i = 0; i < this.folds.length; i++) {
- n = this.folds[i], r = n.range.compareEnd(e, t);
- if (r == -1)return{fold: n, kind: "after"};
- if (r == 0)return{fold: n, kind: "inside"}
- }
- return null
- }, this.addRemoveChars = function (e, t, n) {
- var r = this.getNextFoldTo(e, t), i, s;
- if (r) {
- i = r.fold;
- if (r.kind == "inside" && i.start.column != t && i.start.row != e)window.console && window.console.log(e, t, i); else if (i.start.row == e) {
- s = this.folds;
- var o = s.indexOf(i);
- o == 0 && (this.start.column += n);
- for (o; o < s.length; o++) {
- i = s[o], i.start.column += n;
- if (!i.sameRow)return;
- i.end.column += n
- }
- this.end.column += n
- }
- }
- }, this.split = function (e, t) {
- var n = this.getNextFoldTo(e, t).fold, r = this.folds, s = this.foldData;
- if (!n)return null;
- var o = r.indexOf(n), u = r[o - 1];
- this.end.row = u.end.row, this.end.column = u.end.column, r = r.splice(o, r.length - o);
- var a = new i(s, r);
- return s.splice(s.indexOf(this) + 1, 0, a), a
- }, this.merge = function (e) {
- var t = e.folds;
- for (var n = 0; n < t.length; n++)this.addFold(t[n]);
- var r = this.foldData;
- r.splice(r.indexOf(e), 1)
- }, this.toString = function () {
- var e = [this.range.toString() + ": ["];
- return this.folds.forEach(function (t) {
- e.push(" " + t.toString())
- }), e.push("]"), e.join("\n")
- }, this.idxToPosition = function (e) {
- var t = 0, n;
- for (var r = 0; r < this.folds.length; r++) {
- var n = this.folds[r];
- e -= n.start.column - t;
- if (e < 0)return{row: n.start.row, column: n.start.column + e};
- e -= n.placeholder.length;
- if (e < 0)return n.start;
- t = n.end.column
- }
- return{row: this.end.row, column: this.end.column + e}
- }
- }).call(i.prototype), t.FoldLine = i
-}), ace.define("ace/edit_session/fold", ["require", "exports", "module"], function (e, t, n) {
- var r = t.Fold = function (e, t) {
- this.foldLine = null, this.placeholder = t, this.range = e, this.start = e.start, this.end = e.end, this.sameRow = e.start.row == e.end.row, this.subFolds = []
- };
- (function () {
- this.toString = function () {
- return'"' + this.placeholder + '" ' + this.range.toString()
- }, this.setFoldLine = function (e) {
- this.foldLine = e, this.subFolds.forEach(function (t) {
- t.setFoldLine(e)
- })
- }, this.clone = function () {
- var e = this.range.clone(), t = new r(e, this.placeholder);
- return this.subFolds.forEach(function (e) {
- t.subFolds.push(e.clone())
- }), t
- }, this.addSubFold = function (e) {
- if (this.range.isEqual(e))return this;
- if (!this.range.containsRange(e))throw"A fold can't intersect already existing fold" + e.range + this.range;
- var t = e.range.start.row, n = e.range.start.column;
- for (var r = 0, i = -1; r < this.subFolds.length; r++) {
- i = this.subFolds[r].range.compare(t, n);
- if (i != 1)break
- }
- var s = this.subFolds[r];
- if (i == 0)return s.addSubFold(e);
- var t = e.range.end.row, n = e.range.end.column;
- for (var o = r, i = -1; o < this.subFolds.length; o++) {
- i = this.subFolds[o].range.compare(t, n);
- if (i != 1)break
- }
- var u = this.subFolds[o];
- if (i == 0)throw"A fold can't intersect already existing fold" + e.range + this.range;
- var a = this.subFolds.splice(r, o - r, e);
- return e.setFoldLine(this.foldLine), e
- }
- }).call(r.prototype)
-}), ace.define("ace/token_iterator", ["require", "exports", "module"], function (e, t, n) {
- var r = function (e, t, n) {
- this.$session = e, this.$row = t, this.$rowTokens = e.getTokens(t);
- var r = e.getTokenAt(t, n);
- this.$tokenIndex = r ? r.index : -1
- };
- (function () {
- this.stepBackward = function () {
- this.$tokenIndex -= 1;
- while (this.$tokenIndex < 0) {
- this.$row -= 1;
- if (this.$row < 0)return this.$row = 0, null;
- this.$rowTokens = this.$session.getTokens(this.$row), this.$tokenIndex = this.$rowTokens.length - 1
- }
- return this.$rowTokens[this.$tokenIndex]
- }, this.stepForward = function () {
- var e = this.$session.getLength();
- this.$tokenIndex += 1;
- while (this.$tokenIndex >= this.$rowTokens.length) {
- this.$row += 1;
- if (this.$row >= e)return this.$row = e - 1, null;
- this.$rowTokens = this.$session.getTokens(this.$row), this.$tokenIndex = 0
- }
- return this.$rowTokens[this.$tokenIndex]
- }, this.getCurrentToken = function () {
- return this.$rowTokens[this.$tokenIndex]
- }, this.getCurrentTokenRow = function () {
- return this.$row
- }, this.getCurrentTokenColumn = function () {
- var e = this.$rowTokens, t = this.$tokenIndex, n = e[t].start;
- if (n !== undefined)return n;
- n = 0;
- while (t > 0)t -= 1, n += e[t].value.length;
- return n
- }
- }).call(r.prototype), t.TokenIterator = r
-}), ace.define("ace/edit_session/bracket_match", ["require", "exports", "module", "ace/token_iterator", "ace/range"], function (e, t, n) {
- function s() {
- this.findMatchingBracket = function (e, t) {
- if (e.column == 0)return null;
- var n = t || this.getLine(e.row).charAt(e.column - 1);
- if (n == "")return null;
- var r = n.match(/([\(\[\{])|([\)\]\}])/);
- return r ? r[1] ? this.$findClosingBracket(r[1], e) : this.$findOpeningBracket(r[2], e) : null
- }, this.getBracketRange = function (e) {
- var t = this.getLine(e.row), n = !0, r, s = t.charAt(e.column - 1), o = s && s.match(/([\(\[\{])|([\)\]\}])/);
- o || (s = t.charAt(e.column), e = {row: e.row, column: e.column + 1}, o = s && s.match(/([\(\[\{])|([\)\]\}])/), n = !1);
- if (!o)return null;
- if (o[1]) {
- var u = this.$findClosingBracket(o[1], e);
- if (!u)return null;
- r = i.fromPoints(e, u), n || (r.end.column++, r.start.column--), r.cursor = r.end
- } else {
- var u = this.$findOpeningBracket(o[2], e);
- if (!u)return null;
- r = i.fromPoints(u, e), n || (r.start.column++, r.end.column--), r.cursor = r.start
- }
- return r
- }, this.$brackets = {")": "(", "(": ")", "]": "[", "[": "]", "{": "}", "}": "{"}, this.$findOpeningBracket = function (e, t, n) {
- var i = this.$brackets[e], s = 1, o = new r(this, t.row, t.column), u = o.getCurrentToken();
- u || (u = o.stepForward());
- if (!u)return;
- n || (n = new RegExp("(\\.?" + u.type.replace(".", "\\.").replace("rparen", ".paren") + ")+"));
- var a = t.column - o.getCurrentTokenColumn() - 2, f = u.value;
- for (; ;) {
- while (a >= 0) {
- var l = f.charAt(a);
- if (l == i) {
- s -= 1;
- if (s == 0)return{row: o.getCurrentTokenRow(), column: a + o.getCurrentTokenColumn()}
- } else l == e && (s += 1);
- a -= 1
- }
- do u = o.stepBackward(); while (u && !n.test(u.type));
- if (u == null)break;
- f = u.value, a = f.length - 1
- }
- return null
- }, this.$findClosingBracket = function (e, t, n) {
- var i = this.$brackets[e], s = 1, o = new r(this, t.row, t.column), u = o.getCurrentToken();
- u || (u = o.stepForward());
- if (!u)return;
- n || (n = new RegExp("(\\.?" + u.type.replace(".", "\\.").replace("lparen", ".paren") + ")+"));
- var a = t.column - o.getCurrentTokenColumn();
- for (; ;) {
- var f = u.value, l = f.length;
- while (a < l) {
- var c = f.charAt(a);
- if (c == i) {
- s -= 1;
- if (s == 0)return{row: o.getCurrentTokenRow(), column: a + o.getCurrentTokenColumn()}
- } else c == e && (s += 1);
- a += 1
- }
- do u = o.stepForward(); while (u && !n.test(u.type));
- if (u == null)break;
- a = 0
- }
- return null
- }
- }
-
- var r = e("../token_iterator").TokenIterator, i = e("../range").Range;
- t.BracketMatch = s
-}), ace.define("ace/search", ["require", "exports", "module", "ace/lib/lang", "ace/lib/oop", "ace/range"], function (e, t, n) {
- var r = e("./lib/lang"), i = e("./lib/oop"), s = e("./range").Range, o = function () {
- this.$options = {}
- };
- (function () {
- this.set = function (e) {
- return i.mixin(this.$options, e), this
- }, this.getOptions = function () {
- return r.copyObject(this.$options)
- }, this.setOptions = function (e) {
- this.$options = e
- }, this.find = function (e) {
- var t = this.$matchIterator(e, this.$options);
- if (!t)return!1;
- var n = null;
- return t.forEach(function (e, t, r) {
- if (!e.start) {
- var i = e.offset + (r || 0);
- n = new s(t, i, t, i + e.length)
- } else n = e;
- return!0
- }), n
- }, this.findAll = function (e) {
- var t = this.$options;
- if (!t.needle)return[];
- this.$assembleRegExp(t);
- var n = t.range, i = n ? e.getLines(n.start.row, n.end.row) : e.doc.getAllLines(), o = [], u = t.re;
- if (t.$isMultiLine) {
- var a = u.length, f = i.length - a;
- for (var l = u.offset || 0; l <= f; l++) {
- for (var c = 0; c < a; c++)if (i[l + c].search(u[c]) == -1)break;
- var h = i[l], p = i[l + a - 1], d = h.match(u[0])[0].length, v = p.match(u[a - 1])[0].length;
- o.push(new s(l, h.length - d, l + a - 1, v))
- }
- } else for (var m = 0; m < i.length; m++) {
- var g = r.getMatchOffsets(i[m], u);
- for (var c = 0; c < g.length; c++) {
- var y = g[c];
- o.push(new s(m, y.offset, m, y.offset + y.length))
- }
- }
- if (n) {
- var b = n.start.column, w = n.start.column, m = 0, c = o.length - 1;
- while (m < c && o[m].start.column < b && o[m].start.row == n.start.row)m++;
- while (m < c && o[c].end.column > w && o[c].end.row == n.end.row)c--;
- return o.slice(m, c + 1)
- }
- return o
- }, this.replace = function (e, t) {
- var n = this.$options, r = this.$assembleRegExp(n);
- if (n.$isMultiLine)return t;
- if (!r)return;
- var i = r.exec(e);
- if (!i || i[0].length != e.length)return null;
- t = e.replace(r, t);
- if (n.preserveCase) {
- t = t.split("");
- for (var s = Math.min(e.length, e.length); s--;) {
- var o = e[s];
- o && o.toLowerCase() != o ? t[s] = t[s].toUpperCase() : t[s] = t[s].toLowerCase()
- }
- t = t.join("")
- }
- return t
- }, this.$matchIterator = function (e, t) {
- var n = this.$assembleRegExp(t);
- if (!n)return!1;
- var i = this, o, u = t.backwards;
- if (t.$isMultiLine)var a = n.length, f = function (t, r, i) {
- var u = t.search(n[0]);
- if (u == -1)return;
- for (var f = 1; f < a; f++) {
- t = e.getLine(r + f);
- if (t.search(n[f]) == -1)return
- }
- var l = t.match(n[a - 1])[0].length, c = new s(r, u, r + a - 1, l);
- n.offset == 1 ? (c.start.row--, c.start.column = Number.MAX_VALUE) : i && (c.start.column += i);
- if (o(c))return!0
- }; else if (u)var f = function (e, t, i) {
- var s = r.getMatchOffsets(e, n);
- for (var u = s.length - 1; u >= 0; u--)if (o(s[u], t, i))return!0
- }; else var f = function (e, t, i) {
- var s = r.getMatchOffsets(e, n);
- for (var u = 0; u < s.length; u++)if (o(s[u], t, i))return!0
- };
- return{forEach: function (n) {
- o = n, i.$lineIterator(e, t).forEach(f)
- }}
- }, this.$assembleRegExp = function (e) {
- if (e.needle instanceof RegExp)return e.re = e.needle;
- var t = e.needle;
- if (!e.needle)return e.re = !1;
- e.regExp || (t = r.escapeRegExp(t)), e.wholeWord && (t = "\\b" + t + "\\b");
- var n = e.caseSensitive ? "g" : "gi";
- e.$isMultiLine = /[\n\r]/.test(t);
- if (e.$isMultiLine)return e.re = this.$assembleMultilineRegExp(t, n);
- try {
- var i = new RegExp(t, n)
- } catch (s) {
- i = !1
- }
- return e.re = i
- }, this.$assembleMultilineRegExp = function (e, t) {
- var n = e.replace(/\r\n|\r|\n/g, "$\n^").split("\n"), r = [];
- for (var i = 0; i < n.length; i++)try {
- r.push(new RegExp(n[i], t))
- } catch (s) {
- return!1
- }
- return n[0] == "" ? (r.shift(), r.offset = 1) : r.offset = 0, r
- }, this.$lineIterator = function (e, t) {
- var n = t.backwards == 1, r = t.skipCurrent != 0, i = t.range, s = t.start;
- s || (s = i ? i[n ? "end" : "start"] : e.selection.getRange()), s.start && (s = s[r != n ? "end" : "start"]);
- var o = i ? i.start.row : 0, u = i ? i.end.row : e.getLength() - 1, a = n ? function (n) {
- var r = s.row, i = e.getLine(r).substring(0, s.column);
- if (n(i, r))return;
- for (r--; r >= o; r--)if (n(e.getLine(r), r))return;
- if (t.wrap == 0)return;
- for (r = u, o = s.row; r >= o; r--)if (n(e.getLine(r), r))return
- } : function (n) {
- var r = s.row, i = e.getLine(r).substr(s.column);
- if (n(i, r, s.column))return;
- for (r += 1; r <= u; r++)if (n(e.getLine(r), r))return;
- if (t.wrap == 0)return;
- for (r = o, u = s.row; r <= u; r++)if (n(e.getLine(r), r))return
- };
- return{forEach: a}
- }
- }).call(o.prototype), t.Search = o
-}), ace.define("ace/commands/command_manager", ["require", "exports", "module", "ace/lib/oop", "ace/keyboard/hash_handler", "ace/lib/event_emitter"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("../keyboard/hash_handler").HashHandler, s = e("../lib/event_emitter").EventEmitter, o = function (e, t) {
- this.platform = e, this.commands = this.byName = {}, this.commmandKeyBinding = {}, this.addCommands(t), this.setDefaultHandler("exec", function (e) {
- return e.command.exec(e.editor, e.args || {})
- })
- };
- r.inherits(o, i), function () {
- r.implement(this, s), this.exec = function (e, t, n) {
- typeof e == "string" && (e = this.commands[e]);
- if (!e)return!1;
- if (t && t.$readOnly && !e.readOnly)return!1;
- var r = this._emit("exec", {editor: t, command: e, args: n});
- return r === !1 ? !1 : !0
- }, this.toggleRecording = function (e) {
- if (this.$inReplay)return;
- return e && e._emit("changeStatus"), this.recording ? (this.macro.pop(), this.removeEventListener("exec", this.$addCommandToMacro), this.macro.length || (this.macro = this.oldMacro), this.recording = !1) : (this.$addCommandToMacro || (this.$addCommandToMacro = function (e) {
- this.macro.push([e.command, e.args])
- }.bind(this)), this.oldMacro = this.macro, this.macro = [], this.on("exec", this.$addCommandToMacro), this.recording = !0)
- }, this.replay = function (e) {
- if (this.$inReplay || !this.macro)return;
- if (this.recording)return this.toggleRecording(e);
- try {
- this.$inReplay = !0, this.macro.forEach(function (t) {
- typeof t == "string" ? this.exec(t, e) : this.exec(t[0], e, t[1])
- }, this)
- } finally {
- this.$inReplay = !1
- }
- }, this.trimMacro = function (e) {
- return e.map(function (e) {
- return typeof e[0] != "string" && (e[0] = e[0].name), e[1] || (e = e[0]), e
- })
- }
- }.call(o.prototype), t.CommandManager = o
-}), ace.define("ace/keyboard/hash_handler", ["require", "exports", "module", "ace/lib/keys"], function (e, t, n) {
- function i(e, t) {
- this.platform = t, this.commands = {}, this.commmandKeyBinding = {}, this.addCommands(e)
- }
-
- var r = e("../lib/keys");
- (function () {
- this.addCommand = function (e) {
- this.commands[e.name] && this.removeCommand(e), this.commands[e.name] = e, e.bindKey && this._buildKeyHash(e)
- }, this.removeCommand = function (e) {
- var t = typeof e == "string" ? e : e.name;
- e = this.commands[t], delete this.commands[t];
- var n = this.commmandKeyBinding;
- for (var r in n)for (var i in n[r])n[r][i] == e && delete n[r][i]
- }, this.bindKey = function (e, t) {
- if (!e)return;
- if (typeof t == "function") {
- this.addCommand({exec: t, bindKey: e, name: e});
- return
- }
- var n = this.commmandKeyBinding;
- e.split("|").forEach(function (e) {
- var r = this.parseKeys(e, t), i = r.hashId;
- (n[i] || (n[i] = {}))[r.key] = t
- }, this)
- }, this.addCommands = function (e) {
- e && Object.keys(e).forEach(function (t) {
- var n = e[t];
- if (typeof n == "string")return this.bindKey(n, t);
- typeof n == "function" && (n = {exec: n}), n.name || (n.name = t), this.addCommand(n)
- }, this)
- }, this.removeCommands = function (e) {
- Object.keys(e).forEach(function (t) {
- this.removeCommand(e[t])
- }, this)
- }, this.bindKeys = function (e) {
- Object.keys(e).forEach(function (t) {
- this.bindKey(t, e[t])
- }, this)
- }, this._buildKeyHash = function (e) {
- var t = e.bindKey;
- if (!t)return;
- var n = typeof t == "string" ? t : t[this.platform];
- this.bindKey(n, e)
- }, this.parseKeys = function (e) {
- var t = e.toLowerCase().split(/[\-\+]([\-\+])?/).filter(function (e) {
- return e
- }), n = t.pop(), i = r[n];
- if (r.FUNCTION_KEYS[i])n = r.FUNCTION_KEYS[i].toLowerCase(); else {
- if (!t.length)return{key: n, hashId: -1};
- if (t.length == 1 && t[0] == "shift")return{key: n.toUpperCase(), hashId: -1}
- }
- var s = 0;
- for (var o = t.length; o--;) {
- var u = r.KEY_MODS[t[o]];
- if (u == null)throw"invalid modifier " + t[o] + " in " + e;
- s |= u
- }
- return{key: n, hashId: s}
- }, this.findKeyCommand = function (t, n) {
- var r = this.commmandKeyBinding;
- return r[t] && r[t][n]
- }, this.handleKeyboard = function (e, t, n, r) {
- return{command: this.findKeyCommand(t, n)}
- }
- }).call(i.prototype), t.HashHandler = i
-}), ace.define("ace/commands/default_commands", ["require", "exports", "module", "ace/lib/lang", "ace/config"], function (e, t, n) {
- function s(e, t) {
- return{win: e, mac: t}
- }
-
- var r = e("../lib/lang"), i = e("../config");
- t.commands = [
- {name: "selectall", bindKey: s("Ctrl-A", "Command-A"), exec: function (e) {
- e.selectAll()
- }, readOnly: !0},
- {name: "centerselection", bindKey: s(null, "Ctrl-L"), exec: function (e) {
- e.centerSelection()
- }, readOnly: !0},
- {name: "gotoline", bindKey: s("Ctrl-L", "Command-L"), exec: function (e) {
- var t = parseInt(prompt("Enter line number:"), 10);
- isNaN(t) || e.gotoLine(t)
- }, readOnly: !0},
- {name: "fold", bindKey: s("Alt-L|Ctrl-F1", "Command-Alt-L|Command-F1"), exec: function (e) {
- e.session.toggleFold(!1)
- }, readOnly: !0},
- {name: "unfold", bindKey: s("Alt-Shift-L|Ctrl-Shift-F1", "Command-Alt-Shift-L|Command-Shift-F1"), exec: function (e) {
- e.session.toggleFold(!0)
- }, readOnly: !0},
- {name: "foldall", bindKey: s("Alt-0", "Command-Option-0"), exec: function (e) {
- e.session.foldAll()
- }, readOnly: !0},
- {name: "unfoldall", bindKey: s("Alt-Shift-0", "Command-Option-Shift-0"), exec: function (e) {
- e.session.unfold()
- }, readOnly: !0},
- {name: "findnext", bindKey: s("Ctrl-K", "Command-G"), exec: function (e) {
- e.findNext()
- }, readOnly: !0},
- {name: "findprevious", bindKey: s("Ctrl-Shift-K", "Command-Shift-G"), exec: function (e) {
- e.findPrevious()
- }, readOnly: !0},
- {name: "find", bindKey: s("Ctrl-F", "Command-F"), exec: function (e) {
- i.loadModule("ace/ext/searchbox", function (t) {
- t.Search(e)
- })
- }, readOnly: !0},
- {name: "overwrite", bindKey: "Insert", exec: function (e) {
- e.toggleOverwrite()
- }, readOnly: !0},
- {name: "selecttostart", bindKey: s("Ctrl-Shift-Home", "Command-Shift-Up"), exec: function (e) {
- e.getSelection().selectFileStart()
- }, multiSelectAction: "forEach", readOnly: !0},
- {name: "gotostart", bindKey: s("Ctrl-Home", "Command-Home|Command-Up"), exec: function (e) {
- e.navigateFileStart()
- }, multiSelectAction: "forEach", readOnly: !0},
- {name: "selectup", bindKey: s("Shift-Up", "Shift-Up"), exec: function (e) {
- e.getSelection().selectUp()
- }, multiSelectAction: "forEach", readOnly: !0},
- {name: "golineup", bindKey: s("Up", "Up|Ctrl-P"), exec: function (e, t) {
- e.navigateUp(t.times)
- }, multiSelectAction: "forEach", readOnly: !0},
- {name: "selecttoend", bindKey: s("Ctrl-Shift-End", "Command-Shift-Down"), exec: function (e) {
- e.getSelection().selectFileEnd()
- }, multiSelectAction: "forEach", readOnly: !0},
- {name: "gotoend", bindKey: s("Ctrl-End", "Command-End|Command-Down"), exec: function (e) {
- e.navigateFileEnd()
- }, multiSelectAction: "forEach", readOnly: !0},
- {name: "selectdown", bindKey: s("Shift-Down", "Shift-Down"), exec: function (e) {
- e.getSelection().selectDown()
- }, multiSelectAction: "forEach", readOnly: !0},
- {name: "golinedown", bindKey: s("Down", "Down|Ctrl-N"), exec: function (e, t) {
- e.navigateDown(t.times)
- }, multiSelectAction: "forEach", readOnly: !0},
- {name: "selectwordleft", bindKey: s("Ctrl-Shift-Left", "Option-Shift-Left"), exec: function (e) {
- e.getSelection().selectWordLeft()
- }, multiSelectAction: "forEach", readOnly: !0},
- {name: "gotowordleft", bindKey: s("Ctrl-Left", "Option-Left"), exec: function (e) {
- e.navigateWordLeft()
- }, multiSelectAction: "forEach", readOnly: !0},
- {name: "selecttolinestart", bindKey: s("Alt-Shift-Left", "Command-Shift-Left"), exec: function (e) {
- e.getSelection().selectLineStart()
- }, multiSelectAction: "forEach", readOnly: !0},
- {name: "gotolinestart", bindKey: s("Alt-Left|Home", "Command-Left|Home|Ctrl-A"), exec: function (e) {
- e.navigateLineStart()
- }, multiSelectAction: "forEach", readOnly: !0},
- {name: "selectleft", bindKey: s("Shift-Left", "Shift-Left"), exec: function (e) {
- e.getSelection().selectLeft()
- }, multiSelectAction: "forEach", readOnly: !0},
- {name: "gotoleft", bindKey: s("Left", "Left|Ctrl-B"), exec: function (e, t) {
- e.navigateLeft(t.times)
- }, multiSelectAction: "forEach", readOnly: !0},
- {name: "selectwordright", bindKey: s("Ctrl-Shift-Right", "Option-Shift-Right"), exec: function (e) {
- e.getSelection().selectWordRight()
- }, multiSelectAction: "forEach", readOnly: !0},
- {name: "gotowordright", bindKey: s("Ctrl-Right", "Option-Right"), exec: function (e) {
- e.navigateWordRight()
- }, multiSelectAction: "forEach", readOnly: !0},
- {name: "selecttolineend", bindKey: s("Alt-Shift-Right", "Command-Shift-Right"), exec: function (e) {
- e.getSelection().selectLineEnd()
- }, multiSelectAction: "forEach", readOnly: !0},
- {name: "gotolineend", bindKey: s("Alt-Right|End", "Command-Right|End|Ctrl-E"), exec: function (e) {
- e.navigateLineEnd()
- }, multiSelectAction: "forEach", readOnly: !0},
- {name: "selectright", bindKey: s("Shift-Right", "Shift-Right"), exec: function (e) {
- e.getSelection().selectRight()
- }, multiSelectAction: "forEach", readOnly: !0},
- {name: "gotoright", bindKey: s("Right", "Right|Ctrl-F"), exec: function (e, t) {
- e.navigateRight(t.times)
- }, multiSelectAction: "forEach", readOnly: !0},
- {name: "selectpagedown", bindKey: "Shift-PageDown", exec: function (e) {
- e.selectPageDown()
- }, readOnly: !0},
- {name: "pagedown", bindKey: s(null, "Option-PageDown"), exec: function (e) {
- e.scrollPageDown()
- }, readOnly: !0},
- {name: "gotopagedown", bindKey: s("PageDown", "PageDown|Ctrl-V"), exec: function (e) {
- e.gotoPageDown()
- }, readOnly: !0},
- {name: "selectpageup", bindKey: "Shift-PageUp", exec: function (e) {
- e.selectPageUp()
- }, readOnly: !0},
- {name: "pageup", bindKey: s(null, "Option-PageUp"), exec: function (e) {
- e.scrollPageUp()
- }, readOnly: !0},
- {name: "gotopageup", bindKey: "PageUp", exec: function (e) {
- e.gotoPageUp()
- }, readOnly: !0},
- {name: "scrollup", bindKey: s("Ctrl-Up", null), exec: function (e) {
- e.renderer.scrollBy(0, -2 * e.renderer.layerConfig.lineHeight)
- }, readOnly: !0},
- {name: "scrolldown", bindKey: s("Ctrl-Down", null), exec: function (e) {
- e.renderer.scrollBy(0, 2 * e.renderer.layerConfig.lineHeight)
- }, readOnly: !0},
- {name: "selectlinestart", bindKey: "Shift-Home", exec: function (e) {
- e.getSelection().selectLineStart()
- }, multiSelectAction: "forEach", readOnly: !0},
- {name: "selectlineend", bindKey: "Shift-End", exec: function (e) {
- e.getSelection().selectLineEnd()
- }, multiSelectAction: "forEach", readOnly: !0},
- {name: "togglerecording", bindKey: s("Ctrl-Alt-E", "Command-Option-E"), exec: function (e) {
- e.commands.toggleRecording(e)
- }, readOnly: !0},
- {name: "replaymacro", bindKey: s("Ctrl-Shift-E", "Command-Shift-E"), exec: function (e) {
- e.commands.replay(e)
- }, readOnly: !0},
- {name: "jumptomatching", bindKey: s("Ctrl-P", "Ctrl-Shift-P"), exec: function (e) {
- e.jumpToMatching()
- }, multiSelectAction: "forEach", readOnly: !0},
- {name: "selecttomatching", bindKey: s("Ctrl-Shift-P", null), exec: function (e) {
- e.jumpToMatching(!0)
- }, readOnly: !0},
- {name: "cut", exec: function (e) {
- var t = e.getSelectionRange();
- e._emit("cut", t), e.selection.isEmpty() || (e.session.remove(t), e.clearSelection())
- }, multiSelectAction: "forEach"},
- {name: "removeline", bindKey: s("Ctrl-D", "Command-D"), exec: function (e) {
- e.removeLines()
- }, multiSelectAction: "forEach"},
- {name: "duplicateSelection", bindKey: s("Ctrl-Shift-D", "Command-Shift-D"), exec: function (e) {
- e.duplicateSelection()
- }, multiSelectAction: "forEach"},
- {name: "sortlines", bindKey: s("Ctrl-Alt-S", "Command-Alt-S"), exec: function (e) {
- e.sortLines()
- }, multiSelectAction: "forEach"},
- {name: "togglecomment", bindKey: s("Ctrl-/", "Command-/"), exec: function (e) {
- e.toggleCommentLines()
- }, multiSelectAction: "forEach"},
- {name: "modifyNumberUp", bindKey: s("Ctrl-Shift-Up", "Alt-Shift-Up"), exec: function (e) {
- e.modifyNumber(1)
- }, multiSelectAction: "forEach"},
- {name: "modifyNumberDown", bindKey: s("Ctrl-Shift-Down", "Alt-Shift-Down"), exec: function (e) {
- e.modifyNumber(-1)
- }, multiSelectAction: "forEach"},
- {name: "replace", bindKey: s("Ctrl-H", "Command-Option-F"), exec: function (e) {
- i.loadModule("ace/ext/searchbox", function (t) {
- t.Search(e, !0)
- })
- }},
- {name: "undo", bindKey: s("Ctrl-Z", "Command-Z"), exec: function (e) {
- e.undo()
- }},
- {name: "redo", bindKey: s("Ctrl-Shift-Z|Ctrl-Y", "Command-Shift-Z|Command-Y"), exec: function (e) {
- e.redo()
- }},
- {name: "copylinesup", bindKey: s("Alt-Shift-Up", "Command-Option-Up"), exec: function (e) {
- e.copyLinesUp()
- }},
- {name: "movelinesup", bindKey: s("Alt-Up", "Option-Up"), exec: function (e) {
- e.moveLinesUp()
- }},
- {name: "copylinesdown", bindKey: s("Alt-Shift-Down", "Command-Option-Down"), exec: function (e) {
- e.copyLinesDown()
- }},
- {name: "movelinesdown", bindKey: s("Alt-Down", "Option-Down"), exec: function (e) {
- e.moveLinesDown()
- }},
- {name: "del", bindKey: s("Delete", "Delete|Ctrl-D"), exec: function (e) {
- e.remove("right")
- }, multiSelectAction: "forEach"},
- {name: "backspace", bindKey: s("Command-Backspace|Option-Backspace|Shift-Backspace|Backspace", "Ctrl-Backspace|Command-Backspace|Shift-Backspace|Backspace|Ctrl-H"), exec: function (e) {
- e.remove("left")
- }, multiSelectAction: "forEach"},
- {name: "removetolinestart", bindKey: s("Alt-Backspace", "Command-Backspace"), exec: function (e) {
- e.removeToLineStart()
- }, multiSelectAction: "forEach"},
- {name: "removetolineend", bindKey: s("Alt-Delete", "Ctrl-K"), exec: function (e) {
- e.removeToLineEnd()
- }, multiSelectAction: "forEach"},
- {name: "removewordleft", bindKey: s("Ctrl-Backspace", "Alt-Backspace|Ctrl-Alt-Backspace"), exec: function (e) {
- e.removeWordLeft()
- }, multiSelectAction: "forEach"},
- {name: "removewordright", bindKey: s("Ctrl-Delete", "Alt-Delete"), exec: function (e) {
- e.removeWordRight()
- }, multiSelectAction: "forEach"},
- {name: "outdent", bindKey: s("Shift-Tab", "Shift-Tab"), exec: function (e) {
- e.blockOutdent()
- }, multiSelectAction: "forEach"},
- {name: "indent", bindKey: s("Tab", "Tab"), exec: function (e) {
- e.indent()
- }, multiSelectAction: "forEach"},
- {name: "blockoutdent", bindKey: s("Ctrl-[", "Ctrl-["), exec: function (e) {
- e.blockOutdent()
- }, multiSelectAction: "forEach"},
- {name: "blockindent", bindKey: s("Ctrl-]", "Ctrl-]"), exec: function (e) {
- e.blockIndent()
- }, multiSelectAction: "forEach"},
- {name: "insertstring", exec: function (e, t) {
- e.insert(t)
- }, multiSelectAction: "forEach"},
- {name: "inserttext", exec: function (e, t) {
- e.insert(r.stringRepeat(t.text || "", t.times || 1))
- }, multiSelectAction: "forEach"},
- {name: "splitline", bindKey: s(null, "Ctrl-O"), exec: function (e) {
- e.splitLine()
- }, multiSelectAction: "forEach"},
- {name: "transposeletters", bindKey: s("Ctrl-T", "Ctrl-T"), exec: function (e) {
- e.transposeLetters()
- }, multiSelectAction: function (e) {
- e.transposeSelections(1)
- }},
- {name: "touppercase", bindKey: s("Ctrl-U", "Ctrl-U"), exec: function (e) {
- e.toUpperCase()
- }, multiSelectAction: "forEach"},
- {name: "tolowercase", bindKey: s("Ctrl-Shift-U", "Ctrl-Shift-U"), exec: function (e) {
- e.toLowerCase()
- }, multiSelectAction: "forEach"}
- ]
-}), ace.define("ace/undomanager", ["require", "exports", "module"], function (e, t, n) {
- var r = function () {
- this.reset()
- };
- (function () {
- this.execute = function (e) {
- var t = e.args[0];
- this.$doc = e.args[1], this.$undoStack.push(t), this.$redoStack = []
- }, this.undo = function (e) {
- var t = this.$undoStack.pop(), n = null;
- return t && (n = this.$doc.undoChanges(t, e), this.$redoStack.push(t)), n
- }, this.redo = function (e) {
- var t = this.$redoStack.pop(), n = null;
- return t && (n = this.$doc.redoChanges(t, e), this.$undoStack.push(t)), n
- }, this.reset = function () {
- this.$undoStack = [], this.$redoStack = []
- }, this.hasUndo = function () {
- return this.$undoStack.length > 0
- }, this.hasRedo = function () {
- return this.$redoStack.length > 0
- }
- }).call(r.prototype), t.UndoManager = r
-}), ace.define("ace/virtual_renderer", ["require", "exports", "module", "ace/lib/oop", "ace/lib/dom", "ace/lib/event", "ace/lib/useragent", "ace/config", "ace/lib/net", "ace/layer/gutter", "ace/layer/marker", "ace/layer/text", "ace/layer/cursor", "ace/scrollbar", "ace/renderloop", "ace/lib/event_emitter"], function (e, t, n) {
- var r = e("./lib/oop"), i = e("./lib/dom"), s = e("./lib/event"), o = e("./lib/useragent"), u = e("./config"), a = e("./lib/net"), f = e("./layer/gutter").Gutter, l = e("./layer/marker").Marker, c = e("./layer/text").Text, h = e("./layer/cursor").Cursor, p = e("./scrollbar").ScrollBar, d = e("./renderloop").RenderLoop, v = e("./lib/event_emitter").EventEmitter, m = ".ace_editor {position: relative;overflow: hidden;font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'source-code-pro', monospace;font-size: 12px;line-height: normal;}.ace_scroller {position: absolute;overflow: hidden;top: 0;bottom: 0;}.ace_content {position: absolute;-moz-box-sizing: border-box;-webkit-box-sizing: border-box;box-sizing: border-box;cursor: text;}.ace_gutter {position: absolute;overflow : hidden;width: auto;top: 0;bottom: 0;left: 0;cursor: default;z-index: 4;}.ace_gutter-active-line {position: absolute;left: 0;right: 0;}.ace_scroller.ace_scroll-left {box-shadow: 17px 0 16px -16px rgba(0, 0, 0, 0.4) inset;}.ace_gutter-cell {padding-left: 19px;padding-right: 6px;background-repeat: no-repeat;}.ace_gutter-cell.ace_error {background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6QUM2OEZDQTQ4RTU0MTFFMUEzM0VFRTM2RUY1M0RBMjYiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6QUM2OEZDQTU4RTU0MTFFMUEzM0VFRTM2RUY1M0RBMjYiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDpBQzY4RkNBMjhFNTQxMUUxQTMzRUVFMzZFRjUzREEyNiIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpBQzY4RkNBMzhFNTQxMUUxQTMzRUVFMzZFRjUzREEyNiIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PkgXxbAAAAJbSURBVHjapFNNaBNBFH4zs5vdZLP5sQmNpT82QY209heh1ioWisaDRcSKF0WKJ0GQnrzrxasHsR6EnlrwD0TagxJabaVEpFYxLWlLSS822tr87m66ccfd2GKyVhA6MMybgfe97/vmPUQphd0sZjto9XIn9OOsvlu2nkqRzVU+6vvlzPf8W6bk8dxQ0NPbxAALgCgg2JkaQuhzQau/El0zbmUA7U0Es8v2CiYmKQJHGO1QICCLoqilMhkmurDAyapKgqItezi/USRdJqEYY4D5jCy03ht2yMkkvL91jTTX10qzyyu2hruPRN7jgbH+EOsXcMLgYiThEgAMhABW85oqy1DXdRIdvP1AHJ2acQXvDIrVHcdQNrEKNYSVMSZGMjEzIIAwDXIo+6G/FxcGnzkC3T2oMhLjre49sBB+RRcHLqdafK6sYdE/GGBwU1VpFNj0aN8pJbe+BkZyevUrvLl6Xmm0W9IuTc0DxrDNAJd5oEvI/KRsNC3bQyNjPO9yQ1YHcfj2QvfQc/5TUhJTBc2iM0U7AWDQtc1nJHvD/cfO2s7jaGkiTEfa/Ep8coLu7zmNmh8+dc5lZDuUeFAGUNA/OY6JVaypQ0vjr7XYjUvJM37vt+j1vuTK5DgVfVUoTjVe+y3/LxMxY2GgU+CSLy4cpfsYorRXuXIOi0Vt40h67uZFTdIo6nLaZcwUJWAzwNS0tBnqqKzQDnjdG/iPyZxo46HaKUpbvYkj8qYRTZsBhge+JHhZyh0x9b95JqjVJkT084kZIPwu/mPWqPgfQ5jXh2+92Ay7HedfAgwA6KDWafb4w3cAAAAASUVORK5CYII=\");background-repeat: no-repeat;background-position: 2px center;}.ace_gutter-cell.ace_warning {background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6QUM2OEZDQTg4RTU0MTFFMUEzM0VFRTM2RUY1M0RBMjYiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6QUM2OEZDQTk4RTU0MTFFMUEzM0VFRTM2RUY1M0RBMjYiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDpBQzY4RkNBNjhFNTQxMUUxQTMzRUVFMzZFRjUzREEyNiIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpBQzY4RkNBNzhFNTQxMUUxQTMzRUVFMzZFRjUzREEyNiIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Pgd7PfIAAAGmSURBVHjaYvr//z8DJZiJgUIANoCRkREb9gLiSVAaQx4OQM7AAkwd7XU2/v++/rOttdYGEB9dASEvOMydGKfH8Gv/p4XTkvRBfLxeQAP+1cUhXopyvzhP7P/IoSj7g7Mw09cNKO6J1QQ0L4gICPIv/veg/8W+JdFvQNLHVsW9/nmn9zk7B+cCkDwhL7gt6knSZnx9/LuCEOcvkIAMP+cvto9nfqyZmmUAksfnBUtbM60gX/3/kgyv3/xSFOL5DZT+L8vP+Yfh5cvfPvp/xUHyQHXGyAYwgpwBjZYFT3Y1OEl/OfCH4ffv3wzc4iwMvNIsDJ+f/mH4+vIPAxsb631WW0Yln6ZpQLXdMK/DXGDflh+sIv37EivD5x//Gb7+YWT4y86sl7BCCkSD+Z++/1dkvsFRl+HnD1Rvje4F8whjMXmGj58YGf5zsDMwcnAwfPvKcml62DsQDeaDxN+/Y0qwlpEHqrdB94IRNIDUgfgfKJChGK4OikEW3gTiXUB950ASLFAF54AC94A0G9QAfOnmF9DCDzABFqS08IHYDIScdijOjQABBgC+/9awBH96jwAAAABJRU5ErkJggg==\");background-position: 2px center;}.ace_gutter-cell.ace_info {background-image: url(\"data:image/gif;base64,R0lGODlhEAAQAMQAAAAAAEFBQVJSUl5eXmRkZGtra39/f4WFhYmJiZGRkaampry8vMPDw8zMzNXV1dzc3OTk5Orq6vDw8P///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAkAABQALAAAAAAQABAAAAUuICWOZGmeaBml5XGwFCQSBGyXRSAwtqQIiRuiwIM5BoYVbEFIyGCQoeJGrVptIQA7\");background-position: 2px center;}.ace_dark .ace_gutter-cell.ace_info {background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyRpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNiAoTWFjaW50b3NoKSIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDpGRTk5MTVGREIxNDkxMUUxOTc5Q0FFREQyMTNGMjBFQyIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDpGRTk5MTVGRUIxNDkxMUUxOTc5Q0FFREQyMTNGMjBFQyI+IDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlEPSJ4bXAuaWlkOkZFOTkxNUZCQjE0OTExRTE5NzlDQUVERDIxM0YyMEVDIiBzdFJlZjpkb2N1bWVudElEPSJ4bXAuZGlkOkZFOTkxNUZDQjE0OTExRTE5NzlDQUVERDIxM0YyMEVDIi8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+SIDkjAAAAJ1JREFUeNpi/P//PwMlgImBQkB7A6qrq/+DMC55FkIGKCoq4pVnpFkgTp069f/+/fv/r1u37r+tre1/kg0A+ptn9uzZYLaRkRHpLvjw4cNXWVlZhufPnzOcO3eOdAO0tbVPAjHDmzdvGA4fPsxIsgGSkpJmv379Ynj37h2DjIyMCMkG3LhxQ/T27dsMampqDHZ2dq/pH41DxwCAAAMAFdc68dUsFZgAAAAASUVORK5CYII=\");}.ace_scrollbar {position: absolute;overflow-x: hidden;overflow-y: scroll;right: 0;top: 0;bottom: 0;}.ace_scrollbar-inner {position: absolute;width: 1px;left: 0;}.ace_print-margin {position: absolute;height: 100%;}.ace_text-input {position: absolute;z-index: 0;width: 0.5em;height: 1em;opacity: 0;background: transparent;-moz-appearance: none;appearance: none;border: none;resize: none;outline: none;overflow: hidden;font: inherit;}.ace_text-input.ace_composition {background: #f8f8f8;color: #111;z-index: 1000;opacity: 1;border: solid lightgray 1px;margin: -1px;padding: 0 1px;}.ace_layer {z-index: 1;position: absolute;overflow: hidden;white-space: nowrap;height: 100%;width: 100%;-moz-box-sizing: border-box;-webkit-box-sizing: border-box;box-sizing: border-box;/* setting pointer-events: auto; on node under the mouse, which changesduring scroll, will break mouse wheel scrolling in Safari */pointer-events: none;}.ace_gutter-layer {position: relative;width: auto;text-align: right;pointer-events: auto;}.ace_text-layer {color: black;font: inherit !important;}.ace_cjk {display: inline-block;text-align: center;}.ace_cursor-layer {z-index: 4;}.ace_cursor {z-index: 4;position: absolute;-moz-box-sizing: border-box;-webkit-box-sizing: border-box;box-sizing: border-box;}.ace_hidden-cursors .ace_cursor {opacity: 0.2;}.ace_smooth-blinking .ace_cursor {-moz-transition: opacity 0.18s;-webkit-transition: opacity 0.18s;-o-transition: opacity 0.18s;-ms-transition: opacity 0.18s;transition: opacity 0.18s;}.ace_cursor[style*=\"opacity: 0\"]{-ms-filter: \"progid:DXImageTransform.Microsoft.Alpha(Opacity=0)\";}.ace_editor.ace_multiselect .ace_cursor {border-left-width: 1px;}.ace_line {white-space: nowrap;}.ace_marker-layer .ace_step {position: absolute;z-index: 3;}.ace_marker-layer .ace_selection {position: absolute;z-index: 5;}.ace_marker-layer .ace_bracket {position: absolute;z-index: 6;}.ace_marker-layer .ace_active-line {position: absolute;z-index: 2;}.ace_marker-layer .ace_selected-word {position: absolute;z-index: 4;-moz-box-sizing: border-box;-webkit-box-sizing: border-box;box-sizing: border-box;}.ace_line .ace_fold {-moz-box-sizing: border-box;-webkit-box-sizing: border-box;box-sizing: border-box;display: inline-block;height: 11px;margin-top: -2px;vertical-align: middle;background-image:url(\"data:image/png,%89PNG%0D%0A%1A%0A%00%00%00%0DIHDR%00%00%00%11%00%00%00%09%08%06%00%00%00%D4%E8%C7%0C%00%00%03%1EiCCPICC%20Profile%00%00x%01%85T%DFk%D3P%14%FE%DAe%9D%B0%E1%8B%3Ag%11%09%3Eh%91ndStC%9C%B6kW%BA%CDZ%EA6%B7!H%9B%A6m%5C%9A%C6%24%ED~%B0%07%D9%8Bo%3A%C5w%F1%07%3E%F9%07%0C%D9%83o%7B%92%0D%C6%14a%F8%AC%88%22L%F6%22%B3%9E%9B4M'S%03%B9%F7%BB%DF%F9%EE9'%E7%E4%5E%A0%F9qZ%D3%14%2F%0F%14USO%C5%C2%FC%C4%E4%14%DF%F2%01%5E%1CC%2B%FChM%8B%86%16J%26G%40%0F%D3%B2y%EF%B3%F3%0E%1E%C6lt%EEo%DF%AB%FEc%D5%9A%95%0C%11%F0%1C%20%BE%945%C4%22%E1Y%A0i%5C%D4t%13%E0%D6%89%EF%9D15%C2%CDLsX%A7%04%09%1Fg8oc%81%E1%8C%8D%23%96f45%40%9A%09%C2%07%C5B%3AK%B8%408%98i%E0%F3%0D%D8%CE%81%14%E4'%26%A9%92.%8B%3C%ABER%2F%E5dE%B2%0C%F6%F0%1Fs%83%F2_%B0%A8%94%E9%9B%AD%E7%10%8Dm%9A%19N%D1%7C%8A%DE%1F9%7Dp%8C%E6%00%D5%C1%3F_%18%BDA%B8%9DpX6%E3%A35~B%CD%24%AE%11%26%BD%E7%EEti%98%EDe%9A%97Y)%12%25%1C%24%BCbT%AE3li%E6%0B%03%89%9A%E6%D3%ED%F4P%92%B0%9F4%BF43Y%F3%E3%EDP%95%04%EB1%C5%F5%F6KF%F4%BA%BD%D7%DB%91%93%07%E35%3E%A7)%D6%7F%40%FE%BD%F7%F5r%8A%E5y%92%F0%EB%B4%1E%8D%D5%F4%5B%92%3AV%DB%DB%E4%CD%A6%23%C3%C4wQ%3F%03HB%82%8E%1Cd(%E0%91B%0Ca%9Ac%C4%AA%F8L%16%19%22J%A4%D2itTy%B28%D6%3B(%93%96%ED%1CGx%C9_%0E%B8%5E%16%F5%5B%B2%B8%F6%E0%FB%9E%DD%25%D7%8E%BC%15%85%C5%B7%A3%D8Q%ED%B5%81%E9%BA%B2%13%9A%1B%7Fua%A5%A3n%E17%B9%E5%9B%1Bm%AB%0B%08Q%FE%8A%E5%B1H%5Ee%CAO%82Q%D7u6%E6%90S%97%FCu%0B%CF2%94%EE%25v%12X%0C%BA%AC%F0%5E%F8*l%0AO%85%17%C2%97%BF%D4%C8%CE%DE%AD%11%CB%80q%2C%3E%AB%9ES%CD%C6%EC%25%D2L%D2%EBd%B8%BF%8A%F5B%C6%18%F9%901CZ%9D%BE%24M%9C%8A9%F2%DAP%0B'%06w%82%EB%E6%E2%5C%2F%D7%07%9E%BB%CC%5D%E1%FA%B9%08%AD.r%23%8E%C2%17%F5E%7C!%F0%BE3%BE%3E_%B7o%88a%A7%DB%BE%D3d%EB%A31Z%EB%BB%D3%91%BA%A2%B1z%94%8F%DB'%F6%3D%8E%AA%13%19%B2%B1%BE%B1~V%08%2B%B4%A2cjJ%B3tO%00%03%25mN%97%F3%05%93%EF%11%84%0B%7C%88%AE-%89%8F%ABbW%90O%2B%0Ao%99%0C%5E%97%0CI%AFH%D9.%B0%3B%8F%ED%03%B6S%D6%5D%E6i_s9%F3*p%E9%1B%FD%C3%EB.7U%06%5E%19%C0%D1s.%17%A03u%E4%09%B0%7C%5E%2C%EB%15%DB%1F%3C%9E%B7%80%91%3B%DBc%AD%3Dma%BA%8B%3EV%AB%DBt.%5B%1E%01%BB%0F%AB%D5%9F%CF%AA%D5%DD%E7%E4%7F%0Bx%A3%FC%06%A9%23%0A%D6%C2%A1_2%00%00%00%09pHYs%00%00%0B%13%00%00%0B%13%01%00%9A%9C%18%00%00%00%B5IDAT(%15%A5%91%3D%0E%02!%10%85ac%E1%05%D6%CE%D6%C6%CE%D2%E8%ED%CD%DE%C0%C6%D6N.%E0V%F8%3D%9Ca%891XH%C2%BE%D9y%3F%90!%E6%9C%C3%BFk%E5%011%C6-%F5%C8N%04%DF%BD%FF%89%DFt%83DN%60%3E%F3%AB%A0%DE%1A%5Dg%BE%10Q%97%1B%40%9C%A8o%10%8F%5E%828%B4%1B%60%87%F6%02%26%85%1Ch%1E%C1%2B%5Bk%FF%86%EE%B7j%09%9A%DA%9B%ACe%A3%F9%EC%DA!9%B4%D5%A6%81%86%86%98%CC%3C%5B%40%FA%81%B3%E9%CB%23%94%C16Azo%05%D4%E1%C1%95a%3B%8A'%A0%E8%CC%17%22%85%1D%BA%00%A2%FA%DC%0A%94%D1%D1%8D%8B%3A%84%17B%C7%60%1A%25Z%FC%8D%00%00%00%00IEND%AEB%60%82\"),url(\"data:image/png,%89PNG%0D%0A%1A%0A%00%00%00%0DIHDR%00%00%00%05%00%00%007%08%06%00%00%00%C4%DD%80C%00%00%03%1EiCCPICC%20Profile%00%00x%01%85T%DFk%D3P%14%FE%DAe%9D%B0%E1%8B%3Ag%11%09%3Eh%91ndStC%9C%B6kW%BA%CDZ%EA6%B7!H%9B%A6m%5C%9A%C6%24%ED~%B0%07%D9%8Bo%3A%C5w%F1%07%3E%F9%07%0C%D9%83o%7B%92%0D%C6%14a%F8%AC%88%22L%F6%22%B3%9E%9B4M'S%03%B9%F7%BB%DF%F9%EE9'%E7%E4%5E%A0%F9qZ%D3%14%2F%0F%14USO%C5%C2%FC%C4%E4%14%DF%F2%01%5E%1CC%2B%FChM%8B%86%16J%26G%40%0F%D3%B2y%EF%B3%F3%0E%1E%C6lt%EEo%DF%AB%FEc%D5%9A%95%0C%11%F0%1C%20%BE%945%C4%22%E1Y%A0i%5C%D4t%13%E0%D6%89%EF%9D15%C2%CDLsX%A7%04%09%1Fg8oc%81%E1%8C%8D%23%96f45%40%9A%09%C2%07%C5B%3AK%B8%408%98i%E0%F3%0D%D8%CE%81%14%E4'%26%A9%92.%8B%3C%ABER%2F%E5dE%B2%0C%F6%F0%1Fs%83%F2_%B0%A8%94%E9%9B%AD%E7%10%8Dm%9A%19N%D1%7C%8A%DE%1F9%7Dp%8C%E6%00%D5%C1%3F_%18%BDA%B8%9DpX6%E3%A35~B%CD%24%AE%11%26%BD%E7%EEti%98%EDe%9A%97Y)%12%25%1C%24%BCbT%AE3li%E6%0B%03%89%9A%E6%D3%ED%F4P%92%B0%9F4%BF43Y%F3%E3%EDP%95%04%EB1%C5%F5%F6KF%F4%BA%BD%D7%DB%91%93%07%E35%3E%A7)%D6%7F%40%FE%BD%F7%F5r%8A%E5y%92%F0%EB%B4%1E%8D%D5%F4%5B%92%3AV%DB%DB%E4%CD%A6%23%C3%C4wQ%3F%03HB%82%8E%1Cd(%E0%91B%0Ca%9Ac%C4%AA%F8L%16%19%22J%A4%D2itTy%B28%D6%3B(%93%96%ED%1CGx%C9_%0E%B8%5E%16%F5%5B%B2%B8%F6%E0%FB%9E%DD%25%D7%8E%BC%15%85%C5%B7%A3%D8Q%ED%B5%81%E9%BA%B2%13%9A%1B%7Fua%A5%A3n%E17%B9%E5%9B%1Bm%AB%0B%08Q%FE%8A%E5%B1H%5Ee%CAO%82Q%D7u6%E6%90S%97%FCu%0B%CF2%94%EE%25v%12X%0C%BA%AC%F0%5E%F8*l%0AO%85%17%C2%97%BF%D4%C8%CE%DE%AD%11%CB%80q%2C%3E%AB%9ES%CD%C6%EC%25%D2L%D2%EBd%B8%BF%8A%F5B%C6%18%F9%901CZ%9D%BE%24M%9C%8A9%F2%DAP%0B'%06w%82%EB%E6%E2%5C%2F%D7%07%9E%BB%CC%5D%E1%FA%B9%08%AD.r%23%8E%C2%17%F5E%7C!%F0%BE3%BE%3E_%B7o%88a%A7%DB%BE%D3d%EB%A31Z%EB%BB%D3%91%BA%A2%B1z%94%8F%DB'%F6%3D%8E%AA%13%19%B2%B1%BE%B1~V%08%2B%B4%A2cjJ%B3tO%00%03%25mN%97%F3%05%93%EF%11%84%0B%7C%88%AE-%89%8F%ABbW%90O%2B%0Ao%99%0C%5E%97%0CI%AFH%D9.%B0%3B%8F%ED%03%B6S%D6%5D%E6i_s9%F3*p%E9%1B%FD%C3%EB.7U%06%5E%19%C0%D1s.%17%A03u%E4%09%B0%7C%5E%2C%EB%15%DB%1F%3C%9E%B7%80%91%3B%DBc%AD%3Dma%BA%8B%3EV%AB%DBt.%5B%1E%01%BB%0F%AB%D5%9F%CF%AA%D5%DD%E7%E4%7F%0Bx%A3%FC%06%A9%23%0A%D6%C2%A1_2%00%00%00%09pHYs%00%00%0B%13%00%00%0B%13%01%00%9A%9C%18%00%00%00%3AIDAT8%11c%FC%FF%FF%7F%18%03%1A%60%01%F2%3F%A0%891%80%04%FF%11-%F8%17%9BJ%E2%05%B1ZD%81v%26t%E7%80%F8%A3%82h%A12%1A%20%A3%01%02%0F%01%BA%25%06%00%19%C0%0D%AEF%D5%3ES%00%00%00%00IEND%AEB%60%82\");background-repeat: no-repeat, repeat-x;background-position: center center, top left;color: transparent;border: 1px solid black;-moz-border-radius: 2px;-webkit-border-radius: 2px;border-radius: 2px;cursor: pointer;pointer-events: auto;}.ace_dark .ace_fold {}.ace_fold:hover{background-image:url(\"data:image/png,%89PNG%0D%0A%1A%0A%00%00%00%0DIHDR%00%00%00%11%00%00%00%09%08%06%00%00%00%D4%E8%C7%0C%00%00%03%1EiCCPICC%20Profile%00%00x%01%85T%DFk%D3P%14%FE%DAe%9D%B0%E1%8B%3Ag%11%09%3Eh%91ndStC%9C%B6kW%BA%CDZ%EA6%B7!H%9B%A6m%5C%9A%C6%24%ED~%B0%07%D9%8Bo%3A%C5w%F1%07%3E%F9%07%0C%D9%83o%7B%92%0D%C6%14a%F8%AC%88%22L%F6%22%B3%9E%9B4M'S%03%B9%F7%BB%DF%F9%EE9'%E7%E4%5E%A0%F9qZ%D3%14%2F%0F%14USO%C5%C2%FC%C4%E4%14%DF%F2%01%5E%1CC%2B%FChM%8B%86%16J%26G%40%0F%D3%B2y%EF%B3%F3%0E%1E%C6lt%EEo%DF%AB%FEc%D5%9A%95%0C%11%F0%1C%20%BE%945%C4%22%E1Y%A0i%5C%D4t%13%E0%D6%89%EF%9D15%C2%CDLsX%A7%04%09%1Fg8oc%81%E1%8C%8D%23%96f45%40%9A%09%C2%07%C5B%3AK%B8%408%98i%E0%F3%0D%D8%CE%81%14%E4'%26%A9%92.%8B%3C%ABER%2F%E5dE%B2%0C%F6%F0%1Fs%83%F2_%B0%A8%94%E9%9B%AD%E7%10%8Dm%9A%19N%D1%7C%8A%DE%1F9%7Dp%8C%E6%00%D5%C1%3F_%18%BDA%B8%9DpX6%E3%A35~B%CD%24%AE%11%26%BD%E7%EEti%98%EDe%9A%97Y)%12%25%1C%24%BCbT%AE3li%E6%0B%03%89%9A%E6%D3%ED%F4P%92%B0%9F4%BF43Y%F3%E3%EDP%95%04%EB1%C5%F5%F6KF%F4%BA%BD%D7%DB%91%93%07%E35%3E%A7)%D6%7F%40%FE%BD%F7%F5r%8A%E5y%92%F0%EB%B4%1E%8D%D5%F4%5B%92%3AV%DB%DB%E4%CD%A6%23%C3%C4wQ%3F%03HB%82%8E%1Cd(%E0%91B%0Ca%9Ac%C4%AA%F8L%16%19%22J%A4%D2itTy%B28%D6%3B(%93%96%ED%1CGx%C9_%0E%B8%5E%16%F5%5B%B2%B8%F6%E0%FB%9E%DD%25%D7%8E%BC%15%85%C5%B7%A3%D8Q%ED%B5%81%E9%BA%B2%13%9A%1B%7Fua%A5%A3n%E17%B9%E5%9B%1Bm%AB%0B%08Q%FE%8A%E5%B1H%5Ee%CAO%82Q%D7u6%E6%90S%97%FCu%0B%CF2%94%EE%25v%12X%0C%BA%AC%F0%5E%F8*l%0AO%85%17%C2%97%BF%D4%C8%CE%DE%AD%11%CB%80q%2C%3E%AB%9ES%CD%C6%EC%25%D2L%D2%EBd%B8%BF%8A%F5B%C6%18%F9%901CZ%9D%BE%24M%9C%8A9%F2%DAP%0B'%06w%82%EB%E6%E2%5C%2F%D7%07%9E%BB%CC%5D%E1%FA%B9%08%AD.r%23%8E%C2%17%F5E%7C!%F0%BE3%BE%3E_%B7o%88a%A7%DB%BE%D3d%EB%A31Z%EB%BB%D3%91%BA%A2%B1z%94%8F%DB'%F6%3D%8E%AA%13%19%B2%B1%BE%B1~V%08%2B%B4%A2cjJ%B3tO%00%03%25mN%97%F3%05%93%EF%11%84%0B%7C%88%AE-%89%8F%ABbW%90O%2B%0Ao%99%0C%5E%97%0CI%AFH%D9.%B0%3B%8F%ED%03%B6S%D6%5D%E6i_s9%F3*p%E9%1B%FD%C3%EB.7U%06%5E%19%C0%D1s.%17%A03u%E4%09%B0%7C%5E%2C%EB%15%DB%1F%3C%9E%B7%80%91%3B%DBc%AD%3Dma%BA%8B%3EV%AB%DBt.%5B%1E%01%BB%0F%AB%D5%9F%CF%AA%D5%DD%E7%E4%7F%0Bx%A3%FC%06%A9%23%0A%D6%C2%A1_2%00%00%00%09pHYs%00%00%0B%13%00%00%0B%13%01%00%9A%9C%18%00%00%00%B5IDAT(%15%A5%91%3D%0E%02!%10%85ac%E1%05%D6%CE%D6%C6%CE%D2%E8%ED%CD%DE%C0%C6%D6N.%E0V%F8%3D%9Ca%891XH%C2%BE%D9y%3F%90!%E6%9C%C3%BFk%E5%011%C6-%F5%C8N%04%DF%BD%FF%89%DFt%83DN%60%3E%F3%AB%A0%DE%1A%5Dg%BE%10Q%97%1B%40%9C%A8o%10%8F%5E%828%B4%1B%60%87%F6%02%26%85%1Ch%1E%C1%2B%5Bk%FF%86%EE%B7j%09%9A%DA%9B%ACe%A3%F9%EC%DA!9%B4%D5%A6%81%86%86%98%CC%3C%5B%40%FA%81%B3%E9%CB%23%94%C16Azo%05%D4%E1%C1%95a%3B%8A'%A0%E8%CC%17%22%85%1D%BA%00%A2%FA%DC%0A%94%D1%D1%8D%8B%3A%84%17B%C7%60%1A%25Z%FC%8D%00%00%00%00IEND%AEB%60%82\"),url(\"data:image/png,%89PNG%0D%0A%1A%0A%00%00%00%0DIHDR%00%00%00%05%00%00%007%08%06%00%00%00%C4%DD%80C%00%00%03%1EiCCPICC%20Profile%00%00x%01%85T%DFk%D3P%14%FE%DAe%9D%B0%E1%8B%3Ag%11%09%3Eh%91ndStC%9C%B6kW%BA%CDZ%EA6%B7!H%9B%A6m%5C%9A%C6%24%ED~%B0%07%D9%8Bo%3A%C5w%F1%07%3E%F9%07%0C%D9%83o%7B%92%0D%C6%14a%F8%AC%88%22L%F6%22%B3%9E%9B4M'S%03%B9%F7%BB%DF%F9%EE9'%E7%E4%5E%A0%F9qZ%D3%14%2F%0F%14USO%C5%C2%FC%C4%E4%14%DF%F2%01%5E%1CC%2B%FChM%8B%86%16J%26G%40%0F%D3%B2y%EF%B3%F3%0E%1E%C6lt%EEo%DF%AB%FEc%D5%9A%95%0C%11%F0%1C%20%BE%945%C4%22%E1Y%A0i%5C%D4t%13%E0%D6%89%EF%9D15%C2%CDLsX%A7%04%09%1Fg8oc%81%E1%8C%8D%23%96f45%40%9A%09%C2%07%C5B%3AK%B8%408%98i%E0%F3%0D%D8%CE%81%14%E4'%26%A9%92.%8B%3C%ABER%2F%E5dE%B2%0C%F6%F0%1Fs%83%F2_%B0%A8%94%E9%9B%AD%E7%10%8Dm%9A%19N%D1%7C%8A%DE%1F9%7Dp%8C%E6%00%D5%C1%3F_%18%BDA%B8%9DpX6%E3%A35~B%CD%24%AE%11%26%BD%E7%EEti%98%EDe%9A%97Y)%12%25%1C%24%BCbT%AE3li%E6%0B%03%89%9A%E6%D3%ED%F4P%92%B0%9F4%BF43Y%F3%E3%EDP%95%04%EB1%C5%F5%F6KF%F4%BA%BD%D7%DB%91%93%07%E35%3E%A7)%D6%7F%40%FE%BD%F7%F5r%8A%E5y%92%F0%EB%B4%1E%8D%D5%F4%5B%92%3AV%DB%DB%E4%CD%A6%23%C3%C4wQ%3F%03HB%82%8E%1Cd(%E0%91B%0Ca%9Ac%C4%AA%F8L%16%19%22J%A4%D2itTy%B28%D6%3B(%93%96%ED%1CGx%C9_%0E%B8%5E%16%F5%5B%B2%B8%F6%E0%FB%9E%DD%25%D7%8E%BC%15%85%C5%B7%A3%D8Q%ED%B5%81%E9%BA%B2%13%9A%1B%7Fua%A5%A3n%E17%B9%E5%9B%1Bm%AB%0B%08Q%FE%8A%E5%B1H%5Ee%CAO%82Q%D7u6%E6%90S%97%FCu%0B%CF2%94%EE%25v%12X%0C%BA%AC%F0%5E%F8*l%0AO%85%17%C2%97%BF%D4%C8%CE%DE%AD%11%CB%80q%2C%3E%AB%9ES%CD%C6%EC%25%D2L%D2%EBd%B8%BF%8A%F5B%C6%18%F9%901CZ%9D%BE%24M%9C%8A9%F2%DAP%0B'%06w%82%EB%E6%E2%5C%2F%D7%07%9E%BB%CC%5D%E1%FA%B9%08%AD.r%23%8E%C2%17%F5E%7C!%F0%BE3%BE%3E_%B7o%88a%A7%DB%BE%D3d%EB%A31Z%EB%BB%D3%91%BA%A2%B1z%94%8F%DB'%F6%3D%8E%AA%13%19%B2%B1%BE%B1~V%08%2B%B4%A2cjJ%B3tO%00%03%25mN%97%F3%05%93%EF%11%84%0B%7C%88%AE-%89%8F%ABbW%90O%2B%0Ao%99%0C%5E%97%0CI%AFH%D9.%B0%3B%8F%ED%03%B6S%D6%5D%E6i_s9%F3*p%E9%1B%FD%C3%EB.7U%06%5E%19%C0%D1s.%17%A03u%E4%09%B0%7C%5E%2C%EB%15%DB%1F%3C%9E%B7%80%91%3B%DBc%AD%3Dma%BA%8B%3EV%AB%DBt.%5B%1E%01%BB%0F%AB%D5%9F%CF%AA%D5%DD%E7%E4%7F%0Bx%A3%FC%06%A9%23%0A%D6%C2%A1_2%00%00%00%09pHYs%00%00%0B%13%00%00%0B%13%01%00%9A%9C%18%00%00%003IDAT8%11c%FC%FF%FF%7F%3E%03%1A%60%01%F2%3F%A3%891%80%04%FFQ%26%F8w%C0%B43%A1%DB%0C%E2%8F%0A%A2%85%CAh%80%8C%06%08%3C%04%E8%96%18%00%A3S%0D%CD%CF%D8%C1%9D%00%00%00%00IEND%AEB%60%82\");background-repeat: no-repeat, repeat-x;background-position: center center, top left;}.ace_editor.ace_dragging .ace_content {cursor: move;}.ace_gutter-tooltip {background-color: #FFF;background-image: -webkit-linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.1));background-image: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.1));border: 1px solid gray;border-radius: 1px;box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);color: black;display: inline-block;max-width: 500px;padding: 4px;position: fixed;z-index: 300;-moz-box-sizing: border-box;-webkit-box-sizing: border-box;box-sizing: border-box;cursor: default;white-space: pre-line;word-wrap: break-word;line-height: normal;font-style: normal;font-weight: normal;letter-spacing: normal;}.ace_folding-enabled > .ace_gutter-cell {padding-right: 13px;}.ace_fold-widget {-moz-box-sizing: border-box;-webkit-box-sizing: border-box;box-sizing: border-box;margin: 0 -12px 0 1px;display: inline-block;width: 11px;vertical-align: top;background-image: url(\"data:image/png,%89PNG%0D%0A%1A%0A%00%00%00%0DIHDR%00%00%00%05%00%00%00%05%08%06%00%00%00%8Do%26%E5%00%00%004IDATx%DAe%8A%B1%0D%000%0C%C2%F2%2CK%96%BC%D0%8F9%81%88H%E9%D0%0E%96%C0%10%92%3E%02%80%5E%82%E4%A9*-%EEsw%C8%CC%11%EE%96w%D8%DC%E9*Eh%0C%151(%00%00%00%00IEND%AEB%60%82\");background-repeat: no-repeat;background-position: center;border-radius: 3px;border: 1px solid transparent;}.ace_fold-widget.ace_end {background-image: url(\"data:image/png,%89PNG%0D%0A%1A%0A%00%00%00%0DIHDR%00%00%00%05%00%00%00%05%08%06%00%00%00%8Do%26%E5%00%00%004IDATx%DAm%C7%C1%09%000%08C%D1%8C%ECE%C8E(%8E%EC%02)%1EZJ%F1%C1'%04%07I%E1%E5%EE%CAL%F5%A2%99%99%22%E2%D6%1FU%B5%FE0%D9x%A7%26Wz5%0E%D5%00%00%00%00IEND%AEB%60%82\");}.ace_fold-widget.ace_closed {background-image: url(\"data:image/png,%89PNG%0D%0A%1A%0A%00%00%00%0DIHDR%00%00%00%03%00%00%00%06%08%06%00%00%00%06%E5%24%0C%00%00%009IDATx%DA5%CA%C1%09%000%08%03%C0%AC*(%3E%04%C1%0D%BA%B1%23%A4Uh%E0%20%81%C0%CC%F8%82%81%AA%A2%AArGfr%88%08%11%11%1C%DD%7D%E0%EE%5B%F6%F6%CB%B8%05Q%2F%E9tai%D9%00%00%00%00IEND%AEB%60%82\");}.ace_fold-widget:hover {border: 1px solid rgba(0, 0, 0, 0.3);background-color: rgba(255, 255, 255, 0.2);-moz-box-shadow: 0 1px 1px rgba(255, 255, 255, 0.7);-webkit-box-shadow: 0 1px 1px rgba(255, 255, 255, 0.7);box-shadow: 0 1px 1px rgba(255, 255, 255, 0.7);}.ace_fold-widget:active {border: 1px solid rgba(0, 0, 0, 0.4);background-color: rgba(0, 0, 0, 0.05);-moz-box-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);-webkit-box-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);box-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);}/*** Dark version for fold widgets*/.ace_dark .ace_fold-widget {background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHklEQVQIW2P4//8/AzoGEQ7oGCaLLAhWiSwB146BAQCSTPYocqT0AAAAAElFTkSuQmCC\");}.ace_dark .ace_fold-widget.ace_end {background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAH0lEQVQIW2P4//8/AxQ7wNjIAjDMgC4AxjCVKBirIAAF0kz2rlhxpAAAAABJRU5ErkJggg==\");}.ace_dark .ace_fold-widget.ace_closed {background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAFCAYAAACAcVaiAAAAHElEQVQIW2P4//+/AxAzgDADlOOAznHAKgPWAwARji8UIDTfQQAAAABJRU5ErkJggg==\");}.ace_dark .ace_fold-widget:hover {box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);background-color: rgba(255, 255, 255, 0.1);}.ace_dark .ace_fold-widget:active {-moz-box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);-webkit-box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);}.ace_fold-widget.ace_invalid {background-color: #FFB4B4;border-color: #DE5555;}.ace_fade-fold-widgets .ace_fold-widget {-moz-transition: opacity 0.4s ease 0.05s;-webkit-transition: opacity 0.4s ease 0.05s;-o-transition: opacity 0.4s ease 0.05s;-ms-transition: opacity 0.4s ease 0.05s;transition: opacity 0.4s ease 0.05s;opacity: 0;}.ace_fade-fold-widgets:hover .ace_fold-widget {-moz-transition: opacity 0.05s ease 0.05s;-webkit-transition: opacity 0.05s ease 0.05s;-o-transition: opacity 0.05s ease 0.05s;-ms-transition: opacity 0.05s ease 0.05s;transition: opacity 0.05s ease 0.05s;opacity:1;}.ace_underline {text-decoration: underline;}.ace_bold {font-weight: bold;}.ace_nobold .ace_bold {font-weight: normal;}.ace_italic {font-style: italic;}";
- i.importCssString(m, "ace_editor");
- var g = function (e, t) {
- var n = this;
- this.container = e || i.createElement("div"), this.$keepTextAreaAtCursor = !o.isIE, i.addCssClass(this.container, "ace_editor"), this.setTheme(t), this.$gutter = i.createElement("div"), this.$gutter.className = "ace_gutter", this.container.appendChild(this.$gutter), this.scroller = i.createElement("div"), this.scroller.className = "ace_scroller", this.container.appendChild(this.scroller), this.content = i.createElement("div"), this.content.className = "ace_content", this.scroller.appendChild(this.content), this.setHighlightGutterLine(!0), this.$gutterLayer = new f(this.$gutter), this.$gutterLayer.on("changeGutterWidth", this.onGutterResize.bind(this)), this.$markerBack = new l(this.content);
- var r = this.$textLayer = new c(this.content);
- this.canvas = r.element, this.$markerFront = new l(this.content), this.$cursorLayer = new h(this.content), this.$horizScroll = !1, this.$horizScrollAlwaysVisible = !1, this.$animatedScroll = !1, this.scrollBar = new p(this.container), this.scrollBar.addEventListener("scroll", function (e) {
- n.$inScrollAnimation || n.session.setScrollTop(e.data)
- }), this.scrollTop = 0, this.scrollLeft = 0, s.addListener(this.scroller, "scroll", function () {
- var e = n.scroller.scrollLeft;
- n.scrollLeft = e, n.session.setScrollLeft(e)
- }), this.cursorPos = {row: 0, column: 0}, this.$textLayer.addEventListener("changeCharacterSize", function () {
- n.updateCharacterSize(), n.onResize(!0)
- }), this.$size = {width: 0, height: 0, scrollerHeight: 0, scrollerWidth: 0}, this.layerConfig = {width: 1, padding: 0, firstRow: 0, firstRowScreen: 0, lastRow: 0, lineHeight: 1, characterWidth: 1, minHeight: 1, maxHeight: 1, offset: 0, height: 1}, this.$loop = new d(this.$renderChanges.bind(this), this.container.ownerDocument.defaultView), this.$loop.schedule(this.CHANGE_FULL), this.updateCharacterSize(), this.setPadding(4)
- };
- (function () {
- this.showGutter = !0, this.CHANGE_CURSOR = 1, this.CHANGE_MARKER = 2, this.CHANGE_GUTTER = 4, this.CHANGE_SCROLL = 8, this.CHANGE_LINES = 16, this.CHANGE_TEXT = 32, this.CHANGE_SIZE = 64, this.CHANGE_MARKER_BACK = 128, this.CHANGE_MARKER_FRONT = 256, this.CHANGE_FULL = 512, this.CHANGE_H_SCROLL = 1024, r.implement(this, v), this.updateCharacterSize = function () {
- this.$textLayer.allowBoldFonts != this.$allowBoldFonts && (this.$allowBoldFonts = this.$textLayer.allowBoldFonts, this.setStyle("ace_nobold", !this.$allowBoldFonts)), this.characterWidth = this.$textLayer.getCharacterWidth(), this.lineHeight = this.$textLayer.getLineHeight(), this.$updatePrintMargin()
- }, this.setSession = function (e) {
- this.session = e, this.scroller.className = "ace_scroller", this.$cursorLayer.setSession(e), this.$markerBack.setSession(e), this.$markerFront.setSession(e), this.$gutterLayer.setSession(e), this.$textLayer.setSession(e), this.$loop.schedule(this.CHANGE_FULL)
- }, this.updateLines = function (e, t) {
- t === undefined && (t = Infinity), this.$changedLines ? (this.$changedLines.firstRow > e && (this.$changedLines.firstRow = e), this.$changedLines.lastRow < t && (this.$changedLines.lastRow = t)) : this.$changedLines = {firstRow: e, lastRow: t};
- if (this.$changedLines.firstRow > this.layerConfig.lastRow || this.$changedLines.lastRow < this.layerConfig.firstRow)return;
- this.$loop.schedule(this.CHANGE_LINES)
- }, this.onChangeTabSize = function () {
- this.$loop.schedule(this.CHANGE_TEXT | this.CHANGE_MARKER), this.$textLayer.onChangeTabSize()
- }, this.updateText = function () {
- this.$loop.schedule(this.CHANGE_TEXT)
- }, this.updateFull = function (e) {
- e ? this.$renderChanges(this.CHANGE_FULL, !0) : this.$loop.schedule(this.CHANGE_FULL)
- }, this.updateFontSize = function () {
- this.$textLayer.checkForSizeChanges()
- }, this.onResize = function (e, t, n, r) {
- var s = this.CHANGE_SIZE, o = this.$size;
- if (this.resizing > 2)return;
- this.resizing > 1 ? this.resizing++ : this.resizing = e ? 1 : 0, r || (r = i.getInnerHeight(this.container)), r && (e || o.height != r) && (o.height = r, o.scrollerHeight = this.scroller.clientHeight, this.scrollBar.setHeight(o.scrollerHeight), this.session && (this.session.setScrollTop(this.getScrollTop()), s |= this.CHANGE_FULL)), n || (n = i.getInnerWidth(this.container));
- if (n && (e || this.resizing > 1 || o.width != n)) {
- o.width = n;
- var t = this.showGutter ? this.$gutter.offsetWidth : 0;
- this.scroller.style.left = t + "px", o.scrollerWidth = Math.max(0, n - t - this.scrollBar.getWidth()), this.scroller.style.right = this.scrollBar.getWidth() + "px";
- if (this.session.getUseWrapMode() && this.adjustWrapLimit() || e)s |= this.CHANGE_FULL
- }
- e ? this.$renderChanges(s, !0) : this.$loop.schedule(s), e && delete this.resizing
- }, this.onGutterResize = function () {
- var e = this.$size.width, t = this.showGutter ? this.$gutter.offsetWidth : 0;
- this.scroller.style.left = t + "px", this.$size.scrollerWidth = Math.max(0, e - t - this.scrollBar.getWidth()), this.session.getUseWrapMode() && this.adjustWrapLimit() && this.$loop.schedule(this.CHANGE_FULL)
- }, this.adjustWrapLimit = function () {
- var e = this.$size.scrollerWidth - this.$padding * 2, t = Math.floor(e / this.characterWidth);
- return this.session.adjustWrapLimit(t)
- }, this.setAnimatedScroll = function (e) {
- this.$animatedScroll = e
- }, this.getAnimatedScroll = function () {
- return this.$animatedScroll
- }, this.setShowInvisibles = function (e) {
- this.$textLayer.setShowInvisibles(e) && this.$loop.schedule(this.CHANGE_TEXT)
- }, this.getShowInvisibles = function () {
- return this.$textLayer.showInvisibles
- }, this.getDisplayIndentGuides = function () {
- return this.$textLayer.displayIndentGuides
- }, this.setDisplayIndentGuides = function (e) {
- this.$textLayer.setDisplayIndentGuides(e) && this.$loop.schedule(this.CHANGE_TEXT)
- }, this.$showPrintMargin = !0, this.setShowPrintMargin = function (e) {
- this.$showPrintMargin = e, this.$updatePrintMargin()
- }, this.getShowPrintMargin = function () {
- return this.$showPrintMargin
- }, this.$printMarginColumn = 80, this.setPrintMarginColumn = function (e) {
- this.$printMarginColumn = e, this.$updatePrintMargin()
- }, this.getPrintMarginColumn = function () {
- return this.$printMarginColumn
- }, this.getShowGutter = function () {
- return this.showGutter
- }, this.setShowGutter = function (e) {
- if (this.showGutter === e)return;
- this.$gutter.style.display = e ? "block" : "none", this.showGutter = e, this.onResize(!0)
- }, this.getFadeFoldWidgets = function () {
- return i.hasCssClass(this.$gutter, "ace_fade-fold-widgets")
- }, this.setFadeFoldWidgets = function (e) {
- e ? i.addCssClass(this.$gutter, "ace_fade-fold-widgets") : i.removeCssClass(this.$gutter, "ace_fade-fold-widgets")
- }, this.$highlightGutterLine = !1, this.setHighlightGutterLine = function (e) {
- if (this.$highlightGutterLine == e)return;
- this.$highlightGutterLine = e;
- if (!this.$gutterLineHighlight) {
- this.$gutterLineHighlight = i.createElement("div"), this.$gutterLineHighlight.className = "ace_gutter-active-line", this.$gutter.appendChild(this.$gutterLineHighlight);
- return
- }
- this.$gutterLineHighlight.style.display = e ? "" : "none", this.$cursorLayer.$pixelPos && this.$updateGutterLineHighlight()
- }, this.getHighlightGutterLine = function () {
- return this.$highlightGutterLine
- }, this.$updateGutterLineHighlight = function () {
- this.$gutterLineHighlight.style.top = this.$cursorLayer.$pixelPos.top - this.layerConfig.offset + "px", this.$gutterLineHighlight.style.height = this.layerConfig.lineHeight + "px"
- }, this.$updatePrintMargin = function () {
- if (!this.$showPrintMargin && !this.$printMarginEl)return;
- if (!this.$printMarginEl) {
- var e = i.createElement("div");
- e.className = "ace_layer ace_print-margin-layer", this.$printMarginEl = i.createElement("div"), this.$printMarginEl.className = "ace_print-margin", e.appendChild(this.$printMarginEl), this.content.insertBefore(e, this.content.firstChild)
- }
- var t = this.$printMarginEl.style;
- t.left = this.characterWidth * this.$printMarginColumn + this.$padding + "px", t.visibility = this.$showPrintMargin ? "visible" : "hidden"
- }, this.getContainerElement = function () {
- return this.container
- }, this.getMouseEventTarget = function () {
- return this.content
- }, this.getTextAreaContainer = function () {
- return this.container
- }, this.$moveTextAreaToCursor = function () {
- if (!this.$keepTextAreaAtCursor)return;
- var e = this.layerConfig, t = this.$cursorLayer.$pixelPos.top, n = this.$cursorLayer.$pixelPos.left;
- t -= e.offset;
- if (t < 0 || t > e.height - this.lineHeight)return;
- var r = this.characterWidth;
- if (this.$composition) {
- var i = this.textarea.value.replace(/^\x01+/, "");
- r *= this.session.$getStringScreenWidth(i)[0]
- }
- n -= this.scrollLeft, n > this.$size.scrollerWidth - r && (n = this.$size.scrollerWidth - r), n -= this.scrollBar.width, this.textarea.style.height = this.lineHeight + "px", this.textarea.style.width = r + "px", this.textarea.style.right = this.$size.scrollerWidth - n - r + "px", this.textarea.style.bottom = this.$size.height - t - this.lineHeight + "px"
- }, this.getFirstVisibleRow = function () {
- return this.layerConfig.firstRow
- }, this.getFirstFullyVisibleRow = function () {
- return this.layerConfig.firstRow + (this.layerConfig.offset === 0 ? 0 : 1)
- }, this.getLastFullyVisibleRow = function () {
- var e = Math.floor((this.layerConfig.height + this.layerConfig.offset) / this.layerConfig.lineHeight);
- return this.layerConfig.firstRow - 1 + e
- }, this.getLastVisibleRow = function () {
- return this.layerConfig.lastRow
- }, this.$padding = null, this.setPadding = function (e) {
- this.$padding = e, this.$textLayer.setPadding(e), this.$cursorLayer.setPadding(e), this.$markerFront.setPadding(e), this.$markerBack.setPadding(e), this.$loop.schedule(this.CHANGE_FULL), this.$updatePrintMargin()
- }, this.getHScrollBarAlwaysVisible = function () {
- return this.$horizScrollAlwaysVisible
- }, this.setHScrollBarAlwaysVisible = function (e) {
- this.$horizScrollAlwaysVisible != e && (this.$horizScrollAlwaysVisible = e, (!this.$horizScrollAlwaysVisible || !this.$horizScroll) && this.$loop.schedule(this.CHANGE_SCROLL))
- }, this.$updateScrollBar = function () {
- this.scrollBar.setInnerHeight(this.layerConfig.maxHeight), this.scrollBar.setScrollTop(this.scrollTop)
- }, this.$renderChanges = function (e, t) {
- if (!t && (!e || !this.session || !this.container.offsetWidth))return;
- (e & this.CHANGE_FULL || e & this.CHANGE_SIZE || e & this.CHANGE_TEXT || e & this.CHANGE_LINES || e & this.CHANGE_SCROLL) && this.$computeLayerConfig();
- if (e & this.CHANGE_H_SCROLL) {
- this.scroller.scrollLeft = this.scrollLeft;
- var n = this.scroller.scrollLeft;
- this.scrollLeft = n, this.session.setScrollLeft(n), this.scroller.className = this.scrollLeft == 0 ? "ace_scroller" : "ace_scroller ace_scroll-left"
- }
- if (e & this.CHANGE_FULL) {
- this.$textLayer.checkForSizeChanges(), this.$updateScrollBar(), this.$textLayer.update(this.layerConfig), this.showGutter && this.$gutterLayer.update(this.layerConfig), this.$markerBack.update(this.layerConfig), this.$markerFront.update(this.layerConfig), this.$cursorLayer.update(this.layerConfig), this.$moveTextAreaToCursor(), this.$highlightGutterLine && this.$updateGutterLineHighlight();
- return
- }
- if (e & this.CHANGE_SCROLL) {
- this.$updateScrollBar(), e & this.CHANGE_TEXT || e & this.CHANGE_LINES ? this.$textLayer.update(this.layerConfig) : this.$textLayer.scrollLines(this.layerConfig), this.showGutter && this.$gutterLayer.update(this.layerConfig), this.$markerBack.update(this.layerConfig), this.$markerFront.update(this.layerConfig), this.$cursorLayer.update(this.layerConfig), this.$moveTextAreaToCursor(), this.$highlightGutterLine && this.$updateGutterLineHighlight();
- return
- }
- e & this.CHANGE_TEXT ? (this.$textLayer.update(this.layerConfig), this.showGutter && this.$gutterLayer.update(this.layerConfig)) : e & this.CHANGE_LINES ? (this.$updateLines() || e & this.CHANGE_GUTTER && this.showGutter) && this.$gutterLayer.update(this.layerConfig) : (e & this.CHANGE_TEXT || e & this.CHANGE_GUTTER) && this.showGutter && this.$gutterLayer.update(this.layerConfig), e & this.CHANGE_CURSOR && (this.$cursorLayer.update(this.layerConfig), this.$moveTextAreaToCursor(), this.$highlightGutterLine && this.$updateGutterLineHighlight()), e & (this.CHANGE_MARKER | this.CHANGE_MARKER_FRONT) && this.$markerFront.update(this.layerConfig), e & (this.CHANGE_MARKER | this.CHANGE_MARKER_BACK) && this.$markerBack.update(this.layerConfig), e & this.CHANGE_SIZE && this.$updateScrollBar()
- }, this.$computeLayerConfig = function () {
- var e = this.session, t = this.scrollTop % this.lineHeight, n = this.$size.scrollerHeight + this.lineHeight, r = this.$getLongestLine(), i = this.$horizScrollAlwaysVisible || this.$size.scrollerWidth - r < 0, s = this.$horizScroll !== i;
- this.$horizScroll = i, s && (this.scroller.style.overflowX = i ? "scroll" : "hidden", i || this.session.setScrollLeft(0));
- var o = this.session.getScreenLength() * this.lineHeight;
- this.session.setScrollTop(Math.max(0, Math.min(this.scrollTop, o - this.$size.scrollerHeight)));
- var u = Math.ceil(n / this.lineHeight) - 1, a = Math.max(0, Math.round((this.scrollTop - t) / this.lineHeight)), f = a + u, l, c, h = this.lineHeight;
- a = e.screenToDocumentRow(a, 0);
- var p = e.getFoldLine(a);
- p && (a = p.start.row), l = e.documentToScreenRow(a, 0), c = e.getRowLength(a) * h, f = Math.min(e.screenToDocumentRow(f, 0), e.getLength() - 1), n = this.$size.scrollerHeight + e.getRowLength(f) * h + c, t = this.scrollTop - l * h, this.layerConfig = {width: r, padding: this.$padding, firstRow: a, firstRowScreen: l, lastRow: f, lineHeight: h, characterWidth: this.characterWidth, minHeight: n, maxHeight: o, offset: t, height: this.$size.scrollerHeight}, this.$gutterLayer.element.style.marginTop = -t + "px", this.content.style.marginTop = -t + "px", this.content.style.width = r + 2 * this.$padding + "px", this.content.style.height = n + "px", s && this.onResize(!0)
- }, this.$updateLines = function () {
- var e = this.$changedLines.firstRow, t = this.$changedLines.lastRow;
- this.$changedLines = null;
- var n = this.layerConfig;
- if (e > n.lastRow + 1)return;
- if (t < n.firstRow)return;
- if (t === Infinity) {
- this.showGutter && this.$gutterLayer.update(n), this.$textLayer.update(n);
- return
- }
- return this.$textLayer.updateLines(n, e, t), !0
- }, this.$getLongestLine = function () {
- var e = this.session.getScreenWidth();
- return this.$textLayer.showInvisibles && (e += 1), Math.max(this.$size.scrollerWidth - 2 * this.$padding, Math.round(e * this.characterWidth))
- }, this.updateFrontMarkers = function () {
- this.$markerFront.setMarkers(this.session.getMarkers(!0)), this.$loop.schedule(this.CHANGE_MARKER_FRONT)
- }, this.updateBackMarkers = function () {
- this.$markerBack.setMarkers(this.session.getMarkers()), this.$loop.schedule(this.CHANGE_MARKER_BACK)
- }, this.addGutterDecoration = function (e, t) {
- this.$gutterLayer.addGutterDecoration(e, t)
- }, this.removeGutterDecoration = function (e, t) {
- this.$gutterLayer.removeGutterDecoration(e, t)
- }, this.updateBreakpoints = function (e) {
- this.$loop.schedule(this.CHANGE_GUTTER)
- }, this.setAnnotations = function (e) {
- this.$gutterLayer.setAnnotations(e), this.$loop.schedule(this.CHANGE_GUTTER)
- }, this.updateCursor = function () {
- this.$loop.schedule(this.CHANGE_CURSOR)
- }, this.hideCursor = function () {
- this.$cursorLayer.hideCursor()
- }, this.showCursor = function () {
- this.$cursorLayer.showCursor()
- }, this.scrollSelectionIntoView = function (e, t, n) {
- this.scrollCursorIntoView(e, n), this.scrollCursorIntoView(t, n)
- }, this.scrollCursorIntoView = function (e, t) {
- if (this.$size.scrollerHeight === 0)return;
- var n = this.$cursorLayer.getPixelPosition(e), r = n.left, i = n.top;
- this.scrollTop > i ? (t && (i -= t * this.$size.scrollerHeight), this.session.setScrollTop(i)) : this.scrollTop + this.$size.scrollerHeight < i + this.lineHeight && (t && (i += t * this.$size.scrollerHeight), this.session.setScrollTop(i + this.lineHeight - this.$size.scrollerHeight));
- var s = this.scrollLeft;
- s > r ? (r < this.$padding + 2 * this.layerConfig.characterWidth && (r = 0), this.session.setScrollLeft(r)) : s + this.$size.scrollerWidth < r + this.characterWidth && this.session.setScrollLeft(Math.round(r + this.characterWidth - this.$size.scrollerWidth))
- }, this.getScrollTop = function () {
- return this.session.getScrollTop()
- }, this.getScrollLeft = function () {
- return this.session.getScrollLeft()
- }, this.getScrollTopRow = function () {
- return this.scrollTop / this.lineHeight
- }, this.getScrollBottomRow = function () {
- return Math.max(0, Math.floor((this.scrollTop + this.$size.scrollerHeight) / this.lineHeight) - 1)
- }, this.scrollToRow = function (e) {
- this.session.setScrollTop(e * this.lineHeight)
- }, this.alignCursor = function (e, t) {
- typeof e == "number" && (e = {row: e, column: 0});
- var n = this.$cursorLayer.getPixelPosition(e), r = this.$size.scrollerHeight - this.lineHeight, i = n.top - r * (t || 0);
- return this.session.setScrollTop(i), i
- }, this.STEPS = 8, this.$calcSteps = function (e, t) {
- var n = 0, r = this.STEPS, i = [], s = function (e, t, n) {
- return n * (Math.pow(e - 1, 3) + 1) + t
- };
- for (n = 0; n < r; ++n)i.push(s(n / this.STEPS, e, t - e));
- return i
- }, this.scrollToLine = function (e, t, n, r) {
- var i = this.$cursorLayer.getPixelPosition({row: e, column: 0}), s = i.top;
- t && (s -= this.$size.scrollerHeight / 2);
- var o = this.scrollTop;
- this.session.setScrollTop(s), n !== !1 && this.animateScrolling(o, r)
- }, this.animateScrolling = function (e, t) {
- var n = this.scrollTop;
- if (this.$animatedScroll && Math.abs(e - n) < 1e5) {
- var r = this, i = r.$calcSteps(e, n);
- this.$inScrollAnimation = !0, clearInterval(this.$timer), r.session.setScrollTop(i.shift()), this.$timer = setInterval(function () {
- i.length ? (r.session.setScrollTop(i.shift()), r.session.$scrollTop = n) : n != null ? (r.session.$scrollTop = -1, r.session.setScrollTop(n), n = null) : (r.$timer = clearInterval(r.$timer), r.$inScrollAnimation = !1, t && t())
- }, 10)
- }
- }, this.scrollToY = function (e) {
- this.scrollTop !== e && (this.$loop.schedule(this.CHANGE_SCROLL), this.scrollTop = e)
- }, this.scrollToX = function (e) {
- e < 0 && (e = 0), this.scrollLeft !== e && (this.scrollLeft = e), this.$loop.schedule(this.CHANGE_H_SCROLL)
- }, this.scrollBy = function (e, t) {
- t && this.session.setScrollTop(this.session.getScrollTop() + t), e && this.session.setScrollLeft(this.session.getScrollLeft() + e)
- }, this.isScrollableBy = function (e, t) {
- if (t < 0 && this.session.getScrollTop() > 0)return!0;
- if (t > 0 && this.session.getScrollTop() + this.$size.scrollerHeight < this.layerConfig.maxHeight)return!0
- }, this.pixelToScreenCoordinates = function (e, t) {
- var n = this.scroller.getBoundingClientRect(), r = (e + this.scrollLeft - n.left - this.$padding) / this.characterWidth, i = Math.floor((t + this.scrollTop - n.top) / this.lineHeight), s = Math.round(r);
- return{row: i, column: s, side: r - s > 0 ? 1 : -1}
- }, this.screenToTextCoordinates = function (e, t) {
- var n = this.scroller.getBoundingClientRect(), r = Math.round((e + this.scrollLeft - n.left - this.$padding) / this.characterWidth), i = Math.floor((t + this.scrollTop - n.top) / this.lineHeight);
- return this.session.screenToDocumentPosition(i, Math.max(r, 0))
- }, this.textToScreenCoordinates = function (e, t) {
- var n = this.scroller.getBoundingClientRect(), r = this.session.documentToScreenPosition(e, t), i = this.$padding + Math.round(r.column * this.characterWidth), s = r.row * this.lineHeight;
- return{pageX: n.left + i - this.scrollLeft, pageY: n.top + s - this.scrollTop}
- }, this.visualizeFocus = function () {
- i.addCssClass(this.container, "ace_focus")
- }, this.visualizeBlur = function () {
- i.removeCssClass(this.container, "ace_focus")
- }, this.showComposition = function (e) {
- this.$composition || (this.$composition = {keepTextAreaAtCursor: this.$keepTextAreaAtCursor, cssText: this.textarea.style.cssText}), this.$keepTextAreaAtCursor = !0, i.addCssClass(this.textarea, "ace_composition"), this.textarea.style.cssText = "", this.$moveTextAreaToCursor()
- }, this.setCompositionText = function (e) {
- this.$moveTextAreaToCursor()
- }, this.hideComposition = function () {
- if (!this.$composition)return;
- i.removeCssClass(this.textarea, "ace_composition"), this.$keepTextAreaAtCursor = this.$composition.keepTextAreaAtCursor, this.textarea.style.cssText = this.$composition.cssText, this.$composition = null
- }, this._loadTheme = function (e, t) {
- }, this.setTheme = function (e) {
- function r(e) {
- i.importCssString(e.cssText, e.cssClass, t.container.ownerDocument), t.theme && i.removeCssClass(t.container, t.theme.cssClass), t.$theme = e.cssClass, t.theme = e, i.addCssClass(t.container, e.cssClass), i.setCssClass(t.container, "ace_dark", e.isDark);
- var n = e.padding || 4;
- t.$padding && n != t.$padding && t.setPadding(n), t.$size && (t.$size.width = 0, t.onResize()), t._dispatchEvent("themeLoaded", {theme: e})
- }
-
- var t = this;
- this.$themeValue = e, t._dispatchEvent("themeChange", {theme: e});
- if (!e || typeof e == "string") {
- var n = e || "ace/theme/textmate";
- u.loadModule(["theme", n], r)
- } else r(e)
- }, this.getTheme = function () {
- return this.$themeValue
- }, this.setStyle = function (t, n) {
- i.setCssClass(this.container, t, n != 0)
- }, this.unsetStyle = function (t) {
- i.removeCssClass(this.container, t)
- }, this.destroy = function () {
- this.$textLayer.destroy(), this.$cursorLayer.destroy()
- }
- }).call(g.prototype), t.VirtualRenderer = g
-}), ace.define("ace/layer/gutter", ["require", "exports", "module", "ace/lib/dom", "ace/lib/oop", "ace/lib/lang", "ace/lib/event_emitter"], function (e, t, n) {
- var r = e("../lib/dom"), i = e("../lib/oop"), s = e("../lib/lang"), o = e("../lib/event_emitter").EventEmitter, u = function (e) {
- this.element = r.createElement("div"), this.element.className = "ace_layer ace_gutter-layer", e.appendChild(this.element), this.setShowFoldWidgets(this.$showFoldWidgets), this.gutterWidth = 0, this.$annotations = [], this.$updateAnnotations = this.$updateAnnotations.bind(this)
- };
- (function () {
- i.implement(this, o), this.setSession = function (e) {
- this.session && this.session.removeEventListener("change", this.$updateAnnotations), this.session = e, e.on("change", this.$updateAnnotations)
- }, this.addGutterDecoration = function (e, t) {
- window.console && console.warn && console.warn("deprecated use session.addGutterDecoration"), this.session.addGutterDecoration(e, t)
- }, this.removeGutterDecoration = function (e, t) {
- window.console && console.warn && console.warn("deprecated use session.removeGutterDecoration"), this.session.removeGutterDecoration(e, t)
- }, this.setAnnotations = function (e) {
- this.$annotations = [];
- var t, n;
- for (var r = 0; r < e.length; r++) {
- var i = e[r], n = i.row, t = this.$annotations[n];
- t || (t = this.$annotations[n] = {text: []});
- var o = i.text;
- o = o ? s.escapeHTML(o) : i.html || "", t.text.indexOf(o) === -1 && t.text.push(o);
- var u = i.type;
- u == "error" ? t.className = " ace_error" : u == "warning" && t.className != " ace_error" ? t.className = " ace_warning" : u == "info" && !t.className && (t.className = " ace_info")
- }
- }, this.$updateAnnotations = function (e) {
- if (!this.$annotations.length)return;
- var t = e.data, n = t.range, r = n.start.row, i = n.end.row - r;
- if (i !== 0)if (t.action == "removeText" || t.action == "removeLines")this.$annotations.splice(r, i + 1, null); else {
- var s = Array(i + 1);
- s.unshift(r, 1), this.$annotations.splice.apply(this.$annotations, s)
- }
- }, this.update = function (e) {
- var t = {className: ""}, n = [], i = e.firstRow, s = e.lastRow, o = this.session.getNextFoldLine(i), u = o ? o.start.row : Infinity, a = this.$showFoldWidgets && this.session.foldWidgets, f = this.session.$breakpoints, l = this.session.$decorations, c = 0;
- for (; ;) {
- i > u && (i = o.end.row + 1, o = this.session.getNextFoldLine(i, o), u = o ? o.start.row : Infinity);
- if (i > s)break;
- var h = this.$annotations[i] || t;
- n.push("", c = i + 1);
- if (a) {
- var p = a[i];
- p == null && (p = a[i] = this.session.getFoldWidget(i)), p && n.push(" ")
- }
- n.push("
"), i++
- }
- this.element = r.setInnerHtml(this.element, n.join("")), this.element.style.height = e.minHeight + "px", this.session.$useWrapMode && (c = this.session.getLength());
- var d = ("" + c).length * e.characterWidth, v = this.$padding || this.$computePadding();
- d += v.left + v.right, d !== this.gutterWidth && (this.gutterWidth = d, this.element.style.width = Math.ceil(this.gutterWidth) + "px", this._emit("changeGutterWidth", d))
- }, this.$showFoldWidgets = !0, this.setShowFoldWidgets = function (e) {
- e ? r.addCssClass(this.element, "ace_folding-enabled") : r.removeCssClass(this.element, "ace_folding-enabled"), this.$showFoldWidgets = e, this.$padding = null
- }, this.getShowFoldWidgets = function () {
- return this.$showFoldWidgets
- }, this.$computePadding = function () {
- if (!this.element.firstChild)return{left: 0, right: 0};
- var e = r.computedStyle(this.element.firstChild);
- return this.$padding = {}, this.$padding.left = parseInt(e.paddingLeft) + 1, this.$padding.right = parseInt(e.paddingRight), this.$padding
- }, this.getRegion = function (e) {
- var t = this.$padding || this.$computePadding(), n = this.element.getBoundingClientRect();
- if (e.x < t.left + n.left)return"markers";
- if (this.$showFoldWidgets && e.x > n.right - t.right)return"foldWidgets"
- }
- }).call(u.prototype), t.Gutter = u
-}), ace.define("ace/layer/marker", ["require", "exports", "module", "ace/range", "ace/lib/dom"], function (e, t, n) {
- var r = e("../range").Range, i = e("../lib/dom"), s = function (e) {
- this.element = i.createElement("div"), this.element.className = "ace_layer ace_marker-layer", e.appendChild(this.element)
- };
- (function () {
- this.$padding = 0, this.setPadding = function (e) {
- this.$padding = e
- }, this.setSession = function (e) {
- this.session = e
- }, this.setMarkers = function (e) {
- this.markers = e
- }, this.update = function (e) {
- var e = e || this.config;
- if (!e)return;
- this.config = e;
- var t = [];
- for (var n in this.markers) {
- var r = this.markers[n];
- if (!r.range) {
- r.update(t, this, this.session, e);
- continue
- }
- var s = r.range.clipRows(e.firstRow, e.lastRow);
- if (s.isEmpty())continue;
- s = s.toScreenRange(this.session);
- if (r.renderer) {
- var o = this.$getTop(s.start.row, e), u = this.$padding + s.start.column * e.characterWidth;
- r.renderer(t, s, u, o, e)
- } else r.type == "fullLine" ? this.drawFullLineMarker(t, s, r.clazz, e) : s.isMultiLine() ? r.type == "text" ? this.drawTextMarker(t, s, r.clazz, e) : this.drawMultiLineMarker(t, s, r.clazz, e) : this.drawSingleLineMarker(t, s, r.clazz + " ace_start", e)
- }
- this.element = i.setInnerHtml(this.element, t.join(""))
- }, this.$getTop = function (e, t) {
- return(e - t.firstRowScreen) * t.lineHeight
- }, this.drawTextMarker = function (e, t, n, i) {
- var s = t.start.row, o = new r(s, t.start.column, s, this.session.getScreenLastRowColumn(s));
- this.drawSingleLineMarker(e, o, n + " ace_start", i, 1, "text"), s = t.end.row, o = new r(s, 0, s, t.end.column), this.drawSingleLineMarker(e, o, n, i, 0, "text");
- for (s = t.start.row + 1; s < t.end.row; s++)o.start.row = s, o.end.row = s, o.end.column = this.session.getScreenLastRowColumn(s), this.drawSingleLineMarker(e, o, n, i, 1, "text")
- }, this.drawMultiLineMarker = function (e, t, n, r, i) {
- var s = this.$padding, o = r.lineHeight, u = this.$getTop(t.start.row, r), a = s + t.start.column * r.characterWidth;
- e.push("
"), u = this.$getTop(t.end.row, r);
- var f = t.end.column * r.characterWidth;
- e.push("
"), o = (t.end.row - t.start.row - 1) * r.lineHeight;
- if (o < 0)return;
- u = this.$getTop(t.start.row + 1, r), e.push("
")
- }, this.drawSingleLineMarker = function (e, t, n, r, i) {
- var s = r.lineHeight, o = (t.end.column + (i || 0) - t.start.column) * r.characterWidth, u = this.$getTop(t.start.row, r), a = this.$padding + t.start.column * r.characterWidth;
- e.push("
")
- }, this.drawFullLineMarker = function (e, t, n, r) {
- var i = this.$getTop(t.start.row, r), s = r.lineHeight;
- t.start.row != t.end.row && (s += this.$getTop(t.end.row, r) - i), e.push("
")
- }
- }).call(s.prototype), t.Marker = s
-}), ace.define("ace/layer/text", ["require", "exports", "module", "ace/lib/oop", "ace/lib/dom", "ace/lib/lang", "ace/lib/useragent", "ace/lib/event_emitter"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("../lib/dom"), s = e("../lib/lang"), o = e("../lib/useragent"), u = e("../lib/event_emitter").EventEmitter, a = function (e) {
- this.element = i.createElement("div"), this.element.className = "ace_layer ace_text-layer", e.appendChild(this.element), this.$characterSize = {width: 0, height: 0}, this.checkForSizeChanges(), this.$pollSizeChanges()
- };
- (function () {
- r.implement(this, u), this.EOF_CHAR = "¶", this.EOL_CHAR = "¬", this.TAB_CHAR = "→", this.SPACE_CHAR = "·", this.$padding = 0, this.setPadding = function (e) {
- this.$padding = e, this.element.style.padding = "0 " + e + "px"
- }, this.getLineHeight = function () {
- return this.$characterSize.height || 1
- }, this.getCharacterWidth = function () {
- return this.$characterSize.width || 1
- }, this.checkForSizeChanges = function () {
- var e = this.$measureSizes();
- if (e && (this.$characterSize.width !== e.width || this.$characterSize.height !== e.height)) {
- this.$measureNode.style.fontWeight = "bold";
- var t = this.$measureSizes();
- this.$measureNode.style.fontWeight = "", this.$characterSize = e, this.allowBoldFonts = t && t.width === e.width && t.height === e.height, this._emit("changeCharacterSize", {data: e})
- }
- }, this.$pollSizeChanges = function () {
- var e = this;
- this.$pollSizeChangesTimer = setInterval(function () {
- e.checkForSizeChanges()
- }, 500)
- }, this.$fontStyles = {fontFamily: 1, fontSize: 1, fontWeight: 1, fontStyle: 1, lineHeight: 1}, this.$measureSizes = o.isIE || o.isOldGecko ? function () {
- var e = 1e3;
- if (!this.$measureNode) {
- var t = this.$measureNode = i.createElement("div"), n = t.style;
- n.width = n.height = "auto", n.left = n.top = -e * 40 + "px", n.visibility = "hidden", n.position = "fixed", n.overflow = "visible", n.whiteSpace = "nowrap", t.innerHTML = s.stringRepeat("Xy", e);
- if (this.element.ownerDocument.body)this.element.ownerDocument.body.appendChild(t); else {
- var r = this.element.parentNode;
- while (!i.hasCssClass(r, "ace_editor"))r = r.parentNode;
- r.appendChild(t)
- }
- }
- if (!this.element.offsetWidth)return null;
- var n = this.$measureNode.style, o = i.computedStyle(this.element);
- for (var u in this.$fontStyles)n[u] = o[u];
- var a = {height: this.$measureNode.offsetHeight, width: this.$measureNode.offsetWidth / (e * 2)};
- return a.width == 0 || a.height == 0 ? null : a
- } : function () {
- if (!this.$measureNode) {
- var e = this.$measureNode = i.createElement("div"), t = e.style;
- t.width = t.height = "auto", t.left = t.top = "-100px", t.visibility = "hidden", t.position = "fixed", t.overflow = "visible", t.whiteSpace = "nowrap", e.innerHTML = "X";
- var n = this.element.parentNode;
- while (n && !i.hasCssClass(n, "ace_editor"))n = n.parentNode;
- if (!n)return this.$measureNode = null;
- n.appendChild(e)
- }
- var r = this.$measureNode.getBoundingClientRect(), s = {height: r.height, width: r.width};
- return s.width == 0 || s.height == 0 ? null : s
- }, this.setSession = function (e) {
- this.session = e, this.$computeTabString()
- }, this.showInvisibles = !1, this.setShowInvisibles = function (e) {
- return this.showInvisibles == e ? !1 : (this.showInvisibles = e, this.$computeTabString(), !0)
- }, this.displayIndentGuides = !0, this.setDisplayIndentGuides = function (e) {
- return this.displayIndentGuides == e ? !1 : (this.displayIndentGuides = e, this.$computeTabString(), !0)
- }, this.$tabStrings = [], this.onChangeTabSize = this.$computeTabString = function () {
- var e = this.session.getTabSize();
- this.tabSize = e;
- var t = this.$tabStrings = [0];
- for (var n = 1; n < e + 1; n++)this.showInvisibles ? t.push("" + this.TAB_CHAR + s.stringRepeat("Â ", n - 1) + " ") : t.push(s.stringRepeat("Â ", n));
- if (this.displayIndentGuides) {
- this.$indentGuideRe = /\s\S| \t|\t |\s$/;
- var r = "ace_indent-guide";
- if (this.showInvisibles) {
- r += " ace_invisible";
- var i = s.stringRepeat(this.SPACE_CHAR, this.tabSize), o = this.TAB_CHAR + s.stringRepeat("Â ", this.tabSize - 1)
- } else var i = s.stringRepeat("Â ", this.tabSize), o = i;
- this.$tabStrings[" "] = "" + i + " ", this.$tabStrings[" "] = "" + o + " "
- }
- }, this.updateLines = function (e, t, n) {
- (this.config.lastRow != e.lastRow || this.config.firstRow != e.firstRow) && this.scrollLines(e), this.config = e;
- var r = Math.max(t, e.firstRow), s = Math.min(n, e.lastRow), o = this.element.childNodes, u = 0;
- for (var a = e.firstRow; a < r; a++) {
- var f = this.session.getFoldLine(a);
- if (f) {
- if (f.containsRow(r)) {
- r = f.start.row;
- break
- }
- a = f.end.row
- }
- u++
- }
- var a = r, f = this.session.getNextFoldLine(a), l = f ? f.start.row : Infinity;
- for (; ;) {
- a > l && (a = f.end.row + 1, f = this.session.getNextFoldLine(a, f), l = f ? f.start.row : Infinity);
- if (a > s)break;
- var c = o[u++];
- if (c) {
- var h = [];
- this.$renderLine(h, a, !this.$useLineGroups(), a == l ? f : !1), i.setInnerHtml(c, h.join(""))
- }
- a++
- }
- }, this.scrollLines = function (e) {
- var t = this.config;
- this.config = e;
- if (!t || t.lastRow < e.firstRow)return this.update(e);
- if (e.lastRow < t.firstRow)return this.update(e);
- var n = this.element;
- if (t.firstRow < e.firstRow)for (var r = this.session.getFoldedRowCount(t.firstRow, e.firstRow - 1); r > 0; r--)n.removeChild(n.firstChild);
- if (t.lastRow > e.lastRow)for (var r = this.session.getFoldedRowCount(e.lastRow + 1, t.lastRow); r > 0; r--)n.removeChild(n.lastChild);
- if (e.firstRow < t.firstRow) {
- var i = this.$renderLinesFragment(e, e.firstRow, t.firstRow - 1);
- n.firstChild ? n.insertBefore(i, n.firstChild) : n.appendChild(i)
- }
- if (e.lastRow > t.lastRow) {
- var i = this.$renderLinesFragment(e, t.lastRow + 1, e.lastRow);
- n.appendChild(i)
- }
- }, this.$renderLinesFragment = function (e, t, n) {
- var r = this.element.ownerDocument.createDocumentFragment(), s = t, o = this.session.getNextFoldLine(s), u = o ? o.start.row : Infinity;
- for (; ;) {
- s > u && (s = o.end.row + 1, o = this.session.getNextFoldLine(s, o), u = o ? o.start.row : Infinity);
- if (s > n)break;
- var a = i.createElement("div"), f = [];
- this.$renderLine(f, s, !1, s == u ? o : !1), a.innerHTML = f.join("");
- if (this.$useLineGroups())a.className = "ace_line_group", r.appendChild(a); else {
- var l = a.childNodes;
- while (l.length)r.appendChild(l[0])
- }
- s++
- }
- return r
- }, this.update = function (e) {
- this.config = e;
- var t = [], n = e.firstRow, r = e.lastRow, s = n, o = this.session.getNextFoldLine(s), u = o ? o.start.row : Infinity;
- for (; ;) {
- s > u && (s = o.end.row + 1, o = this.session.getNextFoldLine(s, o), u = o ? o.start.row : Infinity);
- if (s > r)break;
- this.$useLineGroups() && t.push(""), this.$renderLine(t, s, !1, s == u ? o : !1), this.$useLineGroups() && t.push("
"), s++
- }
- this.element = i.setInnerHtml(this.element, t.join(""))
- }, this.$textToken = {text: !0, rparen: !0, lparen: !0}, this.$renderToken = function (e, t, n, r) {
- var i = this, o = /\t|&|<|( +)|([\x00-\x1f\x80-\xa0\u1680\u180E\u2000-\u200f\u2028\u2029\u202F\u205F\u3000\uFEFF])|[\u1100-\u115F\u11A3-\u11A7\u11FA-\u11FF\u2329-\u232A\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFB\u3000-\u303E\u3041-\u3096\u3099-\u30FF\u3105-\u312D\u3131-\u318E\u3190-\u31BA\u31C0-\u31E3\u31F0-\u321E\u3220-\u3247\u3250-\u32FE\u3300-\u4DBF\u4E00-\uA48C\uA490-\uA4C6\uA960-\uA97C\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFAFF\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE66\uFE68-\uFE6B\uFF01-\uFF60\uFFE0-\uFFE6]/g, u = function (e, n, r, o, u) {
- if (n)return i.showInvisibles ? "" + s.stringRepeat(i.SPACE_CHAR, e.length) + " " : s.stringRepeat("Â ", e.length);
- if (e == "&")return"&";
- if (e == "<")return"<";
- if (e == " ") {
- var a = i.session.getScreenTabSize(t + o);
- return t += a - 1, i.$tabStrings[a]
- }
- if (e == " ") {
- var f = i.showInvisibles ? "ace_cjk ace_invisible" : "ace_cjk", l = i.showInvisibles ? i.SPACE_CHAR : "";
- return t += 1, "" + l + " "
- }
- return r ? "" + i.SPACE_CHAR + " " : (t += 1, "" + e + " ")
- }, a = r.replace(o, u);
- if (!this.$textToken[n.type]) {
- var f = "ace_" + n.type.replace(/\./g, " ace_"), l = "";
- n.type == "fold" && (l = " style='width:" + n.value.length * this.config.characterWidth + "px;' "), e.push("", a, " ")
- } else e.push(a);
- return t + r.length
- }, this.renderIndentGuide = function (e, t) {
- var n = t.search(this.$indentGuideRe);
- return n <= 0 ? t : t[0] == " " ? (n -= n % this.tabSize, e.push(s.stringRepeat(this.$tabStrings[" "], n / this.tabSize)), t.substr(n)) : t[0] == " " ? (e.push(s.stringRepeat(this.$tabStrings[" "], n)), t.substr(n)) : t
- }, this.$renderWrappedLine = function (e, t, n, r) {
- var i = 0, s = 0, o = n[0], u = 0;
- for (var a = 0; a < t.length; a++) {
- var f = t[a], l = f.value;
- if (a == 0 && this.displayIndentGuides) {
- i = l.length, l = this.renderIndentGuide(e, l);
- if (!l)continue;
- i -= l.length
- }
- if (i + l.length < o)u = this.$renderToken(e, u, f, l), i += l.length; else {
- while (i + l.length >= o)u = this.$renderToken(e, u, f, l.substring(0, o - i)), l = l.substring(o - i), i = o, r || e.push("", ""), s++, u = 0, o = n[s] || Number.MAX_VALUE;
- l.length != 0 && (i += l.length, u = this.$renderToken(e, u, f, l))
- }
- }
- }, this.$renderSimpleLine = function (e, t) {
- var n = 0, r = t[0], i = r.value;
- this.displayIndentGuides && (i = this.renderIndentGuide(e, i)), i && (n = this.$renderToken(e, n, r, i));
- for (var s = 1; s < t.length; s++)r = t[s], i = r.value, n = this.$renderToken(e, n, r, i)
- }, this.$renderLine = function (e, t, n, r) {
- !r && r != 0 && (r = this.session.getFoldLine(t));
- if (r)var i = this.$getFoldLineTokens(t, r); else var i = this.session.getTokens(t);
- n || e.push("
");
- if (i.length) {
- var s = this.session.getRowSplitData(t);
- s && s.length ? this.$renderWrappedLine(e, i, s, n) : this.$renderSimpleLine(e, i)
- }
- this.showInvisibles && (r && (t = r.end.row), e.push("", t == this.session.getLength() - 1 ? this.EOF_CHAR : this.EOL_CHAR, " ")), n || e.push("
")
- }, this.$getFoldLineTokens = function (e, t) {
- function i(e, t, n) {
- var i = 0, s = 0;
- while (s + e[i].value.length < t) {
- s += e[i].value.length, i++;
- if (i == e.length)return
- }
- if (s != t) {
- var o = e[i].value.substring(t - s);
- o.length > n - t && (o = o.substring(0, n - t)), r.push({type: e[i].type, value: o}), s = t + o.length, i += 1
- }
- while (s < n && i < e.length) {
- var o = e[i].value;
- o.length + s > n ? r.push({type: e[i].type, value: o.substring(0, n - s)}) : r.push(e[i]), s += o.length, i += 1
- }
- }
-
- var n = this.session, r = [], s = n.getTokens(e);
- return t.walk(function (e, t, o, u, a) {
- e != null ? r.push({type: "fold", value: e}) : (a && (s = n.getTokens(t)), s.length && i(s, u, o))
- }, t.end.row, this.session.getLine(t.end.row).length), r
- }, this.$useLineGroups = function () {
- return this.session.getUseWrapMode()
- }, this.destroy = function () {
- clearInterval(this.$pollSizeChangesTimer), this.$measureNode && this.$measureNode.parentNode.removeChild(this.$measureNode), delete this.$measureNode
- }
- }).call(a.prototype), t.Text = a
-}), ace.define("ace/layer/cursor", ["require", "exports", "module", "ace/lib/dom"], function (e, t, n) {
- var r = e("../lib/dom"), i = function (e) {
- this.element = r.createElement("div"), this.element.className = "ace_layer ace_cursor-layer", e.appendChild(this.element), this.isVisible = !1, this.isBlinking = !0, this.blinkInterval = 1e3, this.smoothBlinking = !1, this.cursors = [], this.cursor = this.addCursor(), r.addCssClass(this.element, "ace_hidden-cursors")
- };
- (function () {
- this.$padding = 0, this.setPadding = function (e) {
- this.$padding = e
- }, this.setSession = function (e) {
- this.session = e
- }, this.setBlinking = function (e) {
- e != this.isBlinking && (this.isBlinking = e, this.restartTimer())
- }, this.setBlinkInterval = function (e) {
- e != this.blinkInterval && (this.blinkInterval = e, this.restartTimer())
- }, this.setSmoothBlinking = function (e) {
- e != this.smoothBlinking && (this.smoothBlinking = e, e ? r.addCssClass(this.element, "ace_smooth-blinking") : r.removeCssClass(this.element, "ace_smooth-blinking"), this.restartTimer())
- }, this.addCursor = function () {
- var e = r.createElement("div");
- return e.className = "ace_cursor", this.element.appendChild(e), this.cursors.push(e), e
- }, this.removeCursor = function () {
- if (this.cursors.length > 1) {
- var e = this.cursors.pop();
- return e.parentNode.removeChild(e), e
- }
- }, this.hideCursor = function () {
- this.isVisible = !1, r.addCssClass(this.element, "ace_hidden-cursors"), this.restartTimer()
- }, this.showCursor = function () {
- this.isVisible = !0, r.removeCssClass(this.element, "ace_hidden-cursors"), this.restartTimer()
- }, this.restartTimer = function () {
- clearInterval(this.intervalId), clearTimeout(this.timeoutId), this.smoothBlinking && r.removeCssClass(this.element, "ace_smooth-blinking");
- for (var e = this.cursors.length; e--;)this.cursors[e].style.opacity = "";
- if (!this.isBlinking || !this.blinkInterval || !this.isVisible)return;
- this.smoothBlinking && setTimeout(function () {
- r.addCssClass(this.element, "ace_smooth-blinking")
- }.bind(this));
- var t = function () {
- this.timeoutId = setTimeout(function () {
- for (var e = this.cursors.length; e--;)this.cursors[e].style.opacity = 0
- }.bind(this), .6 * this.blinkInterval)
- }.bind(this);
- this.intervalId = setInterval(function () {
- for (var e = this.cursors.length; e--;)this.cursors[e].style.opacity = "";
- t()
- }.bind(this), this.blinkInterval), t()
- }, this.getPixelPosition = function (e, t) {
- if (!this.config || !this.session)return{left: 0, top: 0};
- e || (e = this.session.selection.getCursor());
- var n = this.session.documentToScreenPosition(e), r = this.$padding + n.column * this.config.characterWidth, i = (n.row - (t ? this.config.firstRowScreen : 0)) * this.config.lineHeight;
- return{left: r, top: i}
- }, this.update = function (e) {
- this.config = e;
- var t = this.session.$selectionMarkers, n = 0, r = 0;
- if (t === undefined || t.length === 0)t = [
- {cursor: null}
- ];
- for (var n = t.length; n--;) {
- var i = this.getPixelPosition(t[n].cursor, !0);
- if ((i.top > e.height + e.offset || i.top < -e.offset) && n > 1)continue;
- var s = (this.cursors[r++] || this.addCursor()).style;
- s.left = i.left + "px", s.top = i.top + "px", s.width = e.characterWidth + "px", s.height = e.lineHeight + "px"
- }
- while (this.cursors.length > r)this.removeCursor();
- var o = this.session.getOverwrite();
- this.$setOverwrite(o), this.$pixelPos = i, this.restartTimer()
- }, this.$setOverwrite = function (e) {
- e != this.overwrite && (this.overwrite = e, e ? r.addCssClass(this.element, "ace_overwrite-cursors") : r.removeCssClass(this.element, "ace_overwrite-cursors"))
- }, this.destroy = function () {
- clearInterval(this.intervalId), clearTimeout(this.timeoutId)
- }
- }).call(i.prototype), t.Cursor = i
-}), ace.define("ace/scrollbar", ["require", "exports", "module", "ace/lib/oop", "ace/lib/dom", "ace/lib/event", "ace/lib/event_emitter"], function (e, t, n) {
- var r = e("./lib/oop"), i = e("./lib/dom"), s = e("./lib/event"), o = e("./lib/event_emitter").EventEmitter, u = function (e) {
- this.element = i.createElement("div"), this.element.className = "ace_scrollbar", this.inner = i.createElement("div"), this.inner.className = "ace_scrollbar-inner", this.element.appendChild(this.inner), e.appendChild(this.element), this.width = i.scrollbarWidth(e.ownerDocument), this.element.style.width = (this.width || 15) + 5 + "px", s.addListener(this.element, "scroll", this.onScroll.bind(this))
- };
- (function () {
- r.implement(this, o), this.onScroll = function () {
- this.skipEvent || (this.scrollTop = this.element.scrollTop, this._emit("scroll", {data: this.scrollTop})), this.skipEvent = !1
- }, this.getWidth = function () {
- return this.width
- }, this.setHeight = function (e) {
- this.element.style.height = e + "px"
- }, this.setInnerHeight = function (e) {
- this.inner.style.height = e + "px"
- }, this.setScrollTop = function (e) {
- this.scrollTop != e && (this.skipEvent = !0, this.scrollTop = this.element.scrollTop = e)
- }
- }).call(u.prototype), t.ScrollBar = u
-}), ace.define("ace/renderloop", ["require", "exports", "module", "ace/lib/event"], function (e, t, n) {
- var r = e("./lib/event"), i = function (e, t) {
- this.onRender = e, this.pending = !1, this.changes = 0, this.window = t || window
- };
- (function () {
- this.schedule = function (e) {
- this.changes = this.changes | e;
- if (!this.pending) {
- this.pending = !0;
- var t = this;
- r.nextFrame(function () {
- t.pending = !1;
- var e;
- while (e = t.changes)t.changes = 0, t.onRender(e)
- }, this.window)
- }
- }
- }).call(i.prototype), t.RenderLoop = i
-}), ace.define("ace/multi_select", ["require", "exports", "module", "ace/range_list", "ace/range", "ace/selection", "ace/mouse/multi_select_handler", "ace/lib/event", "ace/lib/lang", "ace/commands/multi_select_commands", "ace/search", "ace/edit_session", "ace/editor"], function (e, t, n) {
- function h(e, t, n) {
- return c.$options.wrap = !0, c.$options.needle = t, c.$options.backwards = n == -1, c.find(e)
- }
-
- function v(e, t) {
- return e.row == t.row && e.column == t.column
- }
-
- function m(e) {
- e.$onAddRange = e.$onAddRange.bind(e), e.$onRemoveRange = e.$onRemoveRange.bind(e), e.$onMultiSelect = e.$onMultiSelect.bind(e), e.$onSingleSelect = e.$onSingleSelect.bind(e), t.onSessionChange.call(e, e), e.on("changeSession", t.onSessionChange.bind(e)), e.on("mousedown", o), e.commands.addCommands(f.defaultCommands), g(e)
- }
-
- function g(e) {
- function i() {
- n && (r.style.cursor = "", n = !1)
- }
-
- var t = e.textInput.getElement(), n = !1, r = e.renderer.content;
- u.addListener(t, "keydown", function (e) {
- e.keyCode == 18 && !(e.ctrlKey || e.shiftKey || e.metaKey) ? n || (r.style.cursor = "crosshair", n = !0) : n && (r.style.cursor = "")
- }), u.addListener(t, "keyup", i), u.addListener(t, "blur", i)
- }
-
- var r = e("./range_list").RangeList, i = e("./range").Range, s = e("./selection").Selection, o = e("./mouse/multi_select_handler").onMouseDown, u = e("./lib/event"), a = e("./lib/lang"), f = e("./commands/multi_select_commands");
- t.commands = f.defaultCommands.concat(f.multiSelectCommands);
- var l = e("./search").Search, c = new l, p = e("./edit_session").EditSession;
- (function () {
- this.getSelectionMarkers = function () {
- return this.$selectionMarkers
- }
- }).call(p.prototype), function () {
- this.ranges = null, this.rangeList = null, this.addRange = function (e, t) {
- if (!e)return;
- if (!this.inMultiSelectMode && this.rangeCount == 0) {
- var n = this.toOrientedRange();
- if (e.intersects(n))return t || this.fromOrientedRange(e);
- this.rangeList.add(n), this.$onAddRange(n)
- }
- e.cursor || (e.cursor = e.end);
- var r = this.rangeList.add(e);
- return this.$onAddRange(e), r.length && this.$onRemoveRange(r), this.rangeCount > 1 && !this.inMultiSelectMode && (this._emit("multiSelect"), this.inMultiSelectMode = !0, this.session.$undoSelect = !1, this.rangeList.attach(this.session)), t || this.fromOrientedRange(e)
- }, this.toSingleRange = function (e) {
- e = e || this.ranges[0];
- var t = this.rangeList.removeAll();
- t.length && this.$onRemoveRange(t), e && this.fromOrientedRange(e)
- }, this.substractPoint = function (e) {
- var t = this.rangeList.substractPoint(e);
- if (t)return this.$onRemoveRange(t), t[0]
- }, this.mergeOverlappingRanges = function () {
- var e = this.rangeList.merge();
- e.length ? this.$onRemoveRange(e) : this.ranges[0] && this.fromOrientedRange(this.ranges[0])
- }, this.$onAddRange = function (e) {
- this.rangeCount = this.rangeList.ranges.length, this.ranges.unshift(e), this._emit("addRange", {range: e})
- }, this.$onRemoveRange = function (e) {
- this.rangeCount = this.rangeList.ranges.length;
- if (this.rangeCount == 1 && this.inMultiSelectMode) {
- var t = this.rangeList.ranges.pop();
- e.push(t), this.rangeCount = 0
- }
- for (var n = e.length; n--;) {
- var r = this.ranges.indexOf(e[n]);
- this.ranges.splice(r, 1)
- }
- this._emit("removeRange", {ranges: e}), this.rangeCount == 0 && this.inMultiSelectMode && (this.inMultiSelectMode = !1, this._emit("singleSelect"), this.session.$undoSelect = !0, this.rangeList.detach(this.session)), t = t || this.ranges[0], t && !t.isEqual(this.getRange()) && this.fromOrientedRange(t)
- }, this.$initRangeList = function () {
- if (this.rangeList)return;
- this.rangeList = new r, this.ranges = [], this.rangeCount = 0
- }, this.getAllRanges = function () {
- return this.rangeList.ranges.concat()
- }, this.splitIntoLines = function () {
- if (this.rangeCount > 1) {
- var e = this.rangeList.ranges, t = e[e.length - 1], n = i.fromPoints(e[0].start, t.end);
- this.toSingleRange(), this.setSelectionRange(n, t.cursor == t.start)
- } else {
- var n = this.getRange(), r = this.isBackwards(), s = n.start.row, o = n.end.row;
- if (s == o) {
- if (r)var u = n.end, a = n.start; else var u = n.start, a = n.end;
- this.addRange(i.fromPoints(a, a)), this.addRange(i.fromPoints(u, u));
- return
- }
- var f = [], l = this.getLineRange(s, !0);
- l.start.column = n.start.column, f.push(l);
- for (var c = s + 1; c < o; c++)f.push(this.getLineRange(c, !0));
- l = this.getLineRange(o, !0), l.end.column = n.end.column, f.push(l), f.forEach(this.addRange, this)
- }
- }, this.toggleBlockSelection = function () {
- if (this.rangeCount > 1) {
- var e = this.rangeList.ranges, t = e[e.length - 1], n = i.fromPoints(e[0].start, t.end);
- this.toSingleRange(), this.setSelectionRange(n, t.cursor == t.start)
- } else {
- var r = this.session.documentToScreenPosition(this.selectionLead), s = this.session.documentToScreenPosition(this.selectionAnchor), o = this.rectangularRangeBlock(r, s);
- o.forEach(this.addRange, this)
- }
- }, this.rectangularRangeBlock = function (e, t, n) {
- var r = [], s = e.column < t.column;
- if (s)var o = e.column, u = t.column; else var o = t.column, u = e.column;
- var a = e.row < t.row;
- if (a)var f = e.row, l = t.row; else var f = t.row, l = e.row;
- o < 0 && (o = 0), f < 0 && (f = 0), f == l && (n = !0);
- for (var c = f; c <= l; c++) {
- var h = i.fromPoints(this.session.screenToDocumentPosition(c, o), this.session.screenToDocumentPosition(c, u));
- if (h.isEmpty()) {
- if (p && v(h.end, p))break;
- var p = h.end
- }
- h.cursor = s ? h.start : h.end, r.push(h)
- }
- a && r.reverse();
- if (!n) {
- var d = r.length - 1;
- while (r[d].isEmpty() && d > 0)d--;
- if (d > 0) {
- var m = 0;
- while (r[m].isEmpty())m++
- }
- for (var g = d; g >= m; g--)r[g].isEmpty() && r.splice(g, 1)
- }
- return r
- }
- }.call(s.prototype);
- var d = e("./editor").Editor;
- (function () {
- this.updateSelectionMarkers = function () {
- this.renderer.updateCursor(), this.renderer.updateBackMarkers()
- }, this.addSelectionMarker = function (e) {
- e.cursor || (e.cursor = e.end);
- var t = this.getSelectionStyle();
- return e.marker = this.session.addMarker(e, "ace_selection", t), this.session.$selectionMarkers.push(e), this.session.selectionMarkerCount = this.session.$selectionMarkers.length, e
- }, this.removeSelectionMarker = function (e) {
- if (!e.marker)return;
- this.session.removeMarker(e.marker);
- var t = this.session.$selectionMarkers.indexOf(e);
- t != -1 && this.session.$selectionMarkers.splice(t, 1), this.session.selectionMarkerCount = this.session.$selectionMarkers.length
- }, this.removeSelectionMarkers = function (e) {
- var t = this.session.$selectionMarkers;
- for (var n = e.length; n--;) {
- var r = e[n];
- if (!r.marker)continue;
- this.session.removeMarker(r.marker);
- var i = t.indexOf(r);
- i != -1 && t.splice(i, 1)
- }
- this.session.selectionMarkerCount = t.length
- }, this.$onAddRange = function (e) {
- this.addSelectionMarker(e.range), this.renderer.updateCursor(), this.renderer.updateBackMarkers()
- }, this.$onRemoveRange = function (e) {
- this.removeSelectionMarkers(e.ranges), this.renderer.updateCursor(), this.renderer.updateBackMarkers()
- }, this.$onMultiSelect = function (e) {
- if (this.inMultiSelectMode)return;
- this.inMultiSelectMode = !0, this.setStyle("ace_multiselect"), this.keyBinding.addKeyboardHandler(f.keyboardHandler), this.commands.on("exec", this.$onMultiSelectExec), this.renderer.updateCursor(), this.renderer.updateBackMarkers()
- }, this.$onSingleSelect = function (e) {
- if (this.session.multiSelect.inVirtualMode)return;
- this.inMultiSelectMode = !1, this.unsetStyle("ace_multiselect"), this.keyBinding.removeKeyboardHandler(f.keyboardHandler), this.commands.removeEventListener("exec", this.$onMultiSelectExec), this.renderer.updateCursor(), this.renderer.updateBackMarkers()
- }, this.$onMultiSelectExec = function (e) {
- var t = e.command, n = e.editor;
- if (!n.multiSelect)return;
- t.multiSelectAction ? t.multiSelectAction == "forEach" ? n.forEachSelection(t, e.args) : t.multiSelectAction == "single" ? (n.exitMultiSelectMode(), t.exec(n, e.args || {})) : t.multiSelectAction(n, e.args || {}) : (t.exec(n, e.args || {}), n.multiSelect.addRange(n.multiSelect.toOrientedRange()), n.multiSelect.mergeOverlappingRanges()), e.preventDefault()
- }, this.forEachSelection = function (e, t) {
- if (this.inVirtualSelectionMode)return;
- var n = this.session, r = this.selection, i = r.rangeList, o = r._eventRegistry;
- r._eventRegistry = {};
- var u = new s(n);
- this.inVirtualSelectionMode = !0;
- for (var a = i.ranges.length; a--;)u.fromOrientedRange(i.ranges[a]), this.selection = n.selection = u, e.exec(this, t || {}), u.toOrientedRange(i.ranges[a]);
- u.detach(), this.selection = n.selection = r, this.inVirtualSelectionMode = !1, r._eventRegistry = o, r.mergeOverlappingRanges(), this.onCursorChange(), this.onSelectionChange()
- }, this.exitMultiSelectMode = function () {
- if (this.inVirtualSelectionMode)return;
- this.multiSelect.toSingleRange()
- }, this.getCopyText = function () {
- var e = "";
- if (this.inMultiSelectMode) {
- var t = this.multiSelect.rangeList.ranges;
- e = [];
- for (var n = 0; n < t.length; n++)e.push(this.session.getTextRange(t[n]));
- e = e.join(this.session.getDocument().getNewLineCharacter())
- } else this.selection.isEmpty() || (e = this.session.getTextRange(this.getSelectionRange()));
- return e
- }, this.onPaste = function (e) {
- if (this.$readOnly)return;
- this._emit("paste", e);
- if (!this.inMultiSelectMode)return this.insert(e);
- var t = e.split(/\r\n|\r|\n/), n = this.selection.rangeList.ranges;
- if (t.length > n.length || t.length <= 2 || !t[1])return this.commands.exec("insertstring", this, e);
- for (var r = n.length; r--;) {
- var i = n[r];
- i.isEmpty() || this.session.remove(i), this.session.insert(i.start, t[r])
- }
- }, this.findAll = function (e, t, n) {
- t = t || {}, t.needle = e || t.needle, this.$search.set(t);
- var r = this.$search.findAll(this.session);
- if (!r.length)return 0;
- this.$blockScrolling += 1;
- var i = this.multiSelect;
- n || i.toSingleRange(r[0]);
- for (var s = r.length; s--;)i.addRange(r[s], !0);
- return this.$blockScrolling -= 1, r.length
- }, this.selectMoreLines = function (e, t) {
- var n = this.selection.toOrientedRange(), r = n.cursor == n.end, s = this.session.documentToScreenPosition(n.cursor);
- this.selection.$desiredColumn && (s.column = this.selection.$desiredColumn);
- var o = this.session.screenToDocumentPosition(s.row + e, s.column);
- if (!n.isEmpty())var u = this.session.documentToScreenPosition(r ? n.end : n.start), a = this.session.screenToDocumentPosition(u.row + e, u.column); else var a = o;
- if (r) {
- var f = i.fromPoints(o, a);
- f.cursor = f.start
- } else {
- var f = i.fromPoints(a, o);
- f.cursor = f.end
- }
- f.desiredColumn = s.column;
- if (!this.selection.inMultiSelectMode)this.selection.addRange(n); else if (t)var l = n.cursor;
- this.selection.addRange(f), l && this.selection.substractPoint(l)
- }, this.transposeSelections = function (e) {
- var t = this.session, n = t.multiSelect, r = n.ranges;
- for (var i = r.length; i--;) {
- var s = r[i];
- if (s.isEmpty()) {
- var o = t.getWordRange(s.start.row, s.start.column);
- s.start.row = o.start.row, s.start.column = o.start.column, s.end.row = o.end.row, s.end.column = o.end.column
- }
- }
- n.mergeOverlappingRanges();
- var u = [];
- for (var i = r.length; i--;) {
- var s = r[i];
- u.unshift(t.getTextRange(s))
- }
- e < 0 ? u.unshift(u.pop()) : u.push(u.shift());
- for (var i = r.length; i--;) {
- var s = r[i], o = s.clone();
- t.replace(s, u[i]), s.start.row = o.start.row, s.start.column = o.start.column
- }
- }, this.selectMore = function (e, t) {
- var n = this.session, r = n.multiSelect, i = r.toOrientedRange();
- if (i.isEmpty()) {
- var i = n.getWordRange(i.start.row, i.start.column);
- i.cursor = i.end, this.multiSelect.addRange(i)
- }
- var s = n.getTextRange(i), o = h(n, s, e);
- o && (o.cursor = e == -1 ? o.start : o.end, this.multiSelect.addRange(o)), t && this.multiSelect.substractPoint(i.cursor)
- }, this.alignCursors = function () {
- var e = this.session, t = e.multiSelect, n = t.ranges;
- if (!n.length) {
- var r = this.selection.getRange(), s = r.start.row, o = r.end.row, u = this.session.doc.removeLines(s, o);
- u = this.$reAlignText(u), this.session.doc.insertLines(s, u), r.start.column = 0, r.end.column = u[u.length - 1].length, this.selection.setRange(r)
- } else {
- var f = -1, l = n.filter(function (e) {
- if (e.cursor.row == f)return!0;
- f = e.cursor.row
- });
- t.$onRemoveRange(l);
- var c = 0, h = Infinity, p = n.map(function (t) {
- var n = t.cursor, r = e.getLine(n.row), i = r.substr(n.column).search(/\S/g);
- return i == -1 && (i = 0), n.column > c && (c = n.column), i < h && (h = i), i
- });
- n.forEach(function (t, n) {
- var r = t.cursor, s = c - r.column, o = p[n] - h;
- s > o ? e.insert(r, a.stringRepeat(" ", s - o)) : e.remove(new i(r.row, r.column, r.row, r.column - s + o)), t.start.column = t.end.column = c, t.start.row = t.end.row = r.row, t.cursor = t.end
- }), t.fromOrientedRange(n[0]), this.renderer.updateCursor(), this.renderer.updateBackMarkers()
- }
- }, this.$reAlignText = function (e) {
- function o(e) {
- return a.stringRepeat(" ", e)
- }
-
- function u(e) {
- return e[2] ? o(r) + e[2] + o(i - e[2].length + s) + e[4].replace(/^([=:])\s+/, "$1 ") : e[0]
- }
-
- function f(e) {
- return e[2] ? o(r + i - e[2].length) + e[2] + o(s, " ") + e[4].replace(/^([=:])\s+/, "$1 ") : e[0]
- }
-
- function l(e) {
- return e[2] ? o(r) + e[2] + o(s) + e[4].replace(/^([=:])\s+/, "$1 ") : e[0]
- }
-
- var t = !0, n = !0, r, i, s;
- return e.map(function (e) {
- var o = e.match(/(\s*)(.*?)(\s*)([=:].*)/);
- return o ? r == null ? (r = o[1].length, i = o[2].length, s = o[3].length, o) : (r + i + s != o[1].length + o[2].length + o[3].length && (n = !1), r != o[1].length && (t = !1), r > o[1].length && (r = o[1].length), i < o[2].length && (i = o[2].length), s > o[3].length && (s = o[3].length), o) : [e]
- }).map(t ? n ? f : u : l)
- }
- }).call(d.prototype), t.onSessionChange = function (e) {
- var t = e.session;
- t.multiSelect || (t.$selectionMarkers = [], t.selection.$initRangeList(), t.multiSelect = t.selection), this.multiSelect = t.multiSelect;
- var n = e.oldSession;
- n && (n.multiSelect && n.multiSelect.editor == this && (n.multiSelect.editor = null), t.multiSelect.removeEventListener("addRange", this.$onAddRange), t.multiSelect.removeEventListener("removeRange", this.$onRemoveRange), t.multiSelect.removeEventListener("multiSelect", this.$onMultiSelect), t.multiSelect.removeEventListener("singleSelect", this.$onSingleSelect)), t.multiSelect.on("addRange", this.$onAddRange), t.multiSelect.on("removeRange", this.$onRemoveRange), t.multiSelect.on("multiSelect", this.$onMultiSelect), t.multiSelect.on("singleSelect", this.$onSingleSelect), this.inMultiSelectMode != t.selection.inMultiSelectMode && (t.selection.inMultiSelectMode ? this.$onMultiSelect() : this.$onSingleSelect())
- }, t.MultiSelect = m
-}), ace.define("ace/range_list", ["require", "exports", "module"], function (e, t, n) {
- var r = function () {
- this.ranges = []
- };
- (function () {
- this.comparePoints = function (e, t) {
- return e.row - t.row || e.column - t.column
- }, this.pointIndex = function (e, t) {
- var n = this.ranges;
- for (var r = t || 0; r < n.length; r++) {
- var i = n[r], s = this.comparePoints(e, i.end);
- if (s > 0)continue;
- return s == 0 ? r : (s = this.comparePoints(e, i.start), s >= 0 ? r : -r - 1)
- }
- return-r - 1
- }, this.add = function (e) {
- var t = this.pointIndex(e.start);
- t < 0 && (t = -t - 1);
- var n = this.pointIndex(e.end, t);
- return n < 0 ? n = -n - 1 : n++, this.ranges.splice(t, n - t, e)
- }, this.addList = function (e) {
- var t = [];
- for (var n = e.length; n--;)t.push.call(t, this.add(e[n]));
- return t
- }, this.substractPoint = function (e) {
- var t = this.pointIndex(e);
- if (t >= 0)return this.ranges.splice(t, 1)
- }, this.merge = function () {
- var e = [], t = this.ranges, n = t[0], r;
- for (var i = 1; i < t.length; i++) {
- r = n, n = t[i];
- var s = this.comparePoints(r.end, n.start);
- if (s < 0)continue;
- if (s == 0 && !r.isEmpty() && !n.isEmpty())continue;
- this.comparePoints(r.end, n.end) < 0 && (r.end.row = n.end.row, r.end.column = n.end.column), t.splice(i, 1), e.push(n), n = r, i--
- }
- return e
- }, this.contains = function (e, t) {
- return this.pointIndex({row: e, column: t}) >= 0
- }, this.containsPoint = function (e) {
- return this.pointIndex(e) >= 0
- }, this.rangeAtPoint = function (e) {
- var t = this.pointIndex(e);
- if (t >= 0)return this.ranges[t]
- }, this.clipRows = function (e, t) {
- var n = this.ranges;
- if (n[0].start.row > t || n[n.length - 1].start.row < e)return[];
- var r = this.pointIndex({row: e, column: 0});
- r < 0 && (r = -r - 1);
- var i = this.pointIndex({row: t, column: 0}, r);
- i < 0 && (i = -i - 1);
- var s = [];
- for (var o = r; o < i; o++)s.push(n[o]);
- return s
- }, this.removeAll = function () {
- return this.ranges.splice(0, this.ranges.length)
- }, this.attach = function (e) {
- this.session && this.detach(), this.session = e, this.onChange = this.$onChange.bind(this), this.session.on("change", this.onChange)
- }, this.detach = function () {
- if (!this.session)return;
- this.session.removeListener("change", this.onChange), this.session = null
- }, this.$onChange = function (e) {
- var t = e.data.range;
- if (e.data.action[0] == "i")var n = t.start, r = t.end; else var r = t.start, n = t.end;
- var i = n.row, s = r.row, o = s - i, u = -n.column + r.column, a = this.ranges;
- for (var f = 0, l = a.length; f < l; f++) {
- var c = a[f];
- if (c.end.row < i)continue;
- if (c.start.row > i)break;
- c.start.row == i && c.start.column >= n.column && (c.start.column += u, c.start.row += o), c.end.row == i && c.end.column >= n.column && (c.end.column += u, c.end.row += o)
- }
- if (o != 0 && f < l)for (; f < l; f++) {
- var c = a[f];
- c.start.row += o, c.end.row += o
- }
- }
- }).call(r.prototype), t.RangeList = r
-}), ace.define("ace/mouse/multi_select_handler", ["require", "exports", "module", "ace/lib/event"], function (e, t, n) {
- function i(e, t) {
- return e.row == t.row && e.column == t.column
- }
-
- function s(e) {
- var t = e.domEvent, n = t.altKey, s = t.shiftKey, o = e.getAccelKey(), u = e.getButton();
- if (e.editor.inMultiSelectMode && u == 2) {
- e.editor.textInput.onContextMenu(e.domEvent);
- return
- }
- if (!o && !n) {
- u == 0 && e.editor.inMultiSelectMode && e.editor.exitMultiSelectMode();
- return
- }
- var a = e.editor, f = a.selection, l = a.inMultiSelectMode, c = e.getDocumentPosition(), h = f.getCursor(), p = e.inSelection() || f.isEmpty() && i(c, h), d = e.x, v = e.y, m = function (e) {
- d = e.clientX, v = e.clientY
- }, g = function () {
- var e = a.renderer.pixelToScreenCoordinates(d, v), t = y.screenToDocumentPosition(e.row, e.column);
- if (i(w, e) && i(t, f.selectionLead))return;
- w = e, a.selection.moveCursorToPosition(t), a.selection.clearSelection(), a.renderer.scrollCursorIntoView(), a.removeSelectionMarkers(x), x = f.rectangularRangeBlock(w, b), x.forEach(a.addSelectionMarker, a), a.updateSelectionMarkers()
- }, y = a.session, b = a.renderer.pixelToScreenCoordinates(d, v), w = b;
- if (o && !s && !n && u == 0) {
- if (!l && p)return;
- if (!l) {
- var E = f.toOrientedRange();
- a.addSelectionMarker(E)
- }
- var S = f.rangeList.rangeAtPoint(c);
- r.capture(a.container, function () {
- }, function () {
- var e = f.toOrientedRange();
- S && e.isEmpty() && i(S.cursor, e.cursor) ? f.substractPoint(e.cursor) : (E && (a.removeSelectionMarker(E), f.addRange(E)), f.addRange(e))
- })
- } else if (!s && n && u == 0) {
- e.stop(), l && !o ? f.toSingleRange() : !l && o && f.addRange(), f.moveCursorToPosition(c), f.clearSelection();
- var x = [], T = function (e) {
- clearInterval(C), a.removeSelectionMarkers(x);
- for (var t = 0; t < x.length; t++)f.addRange(x[t])
- }, N = g;
- r.capture(a.container, m, T);
- var C = setInterval(function () {
- N()
- }, 20);
- return e.preventDefault()
- }
- }
-
- var r = e("../lib/event");
- t.onMouseDown = s
-}), ace.define("ace/commands/multi_select_commands", ["require", "exports", "module", "ace/keyboard/hash_handler"], function (e, t, n) {
- t.defaultCommands = [
- {name: "addCursorAbove", exec: function (e) {
- e.selectMoreLines(-1)
- }, bindKey: {win: "Ctrl-Alt-Up", mac: "Ctrl-Alt-Up"}, readonly: !0},
- {name: "addCursorBelow", exec: function (e) {
- e.selectMoreLines(1)
- }, bindKey: {win: "Ctrl-Alt-Down", mac: "Ctrl-Alt-Down"}, readonly: !0},
- {name: "addCursorAboveSkipCurrent", exec: function (e) {
- e.selectMoreLines(-1, !0)
- }, bindKey: {win: "Ctrl-Alt-Shift-Up", mac: "Ctrl-Alt-Shift-Up"}, readonly: !0},
- {name: "addCursorBelowSkipCurrent", exec: function (e) {
- e.selectMoreLines(1, !0)
- }, bindKey: {win: "Ctrl-Alt-Shift-Down", mac: "Ctrl-Alt-Shift-Down"}, readonly: !0},
- {name: "selectMoreBefore", exec: function (e) {
- e.selectMore(-1)
- }, bindKey: {win: "Ctrl-Alt-Left", mac: "Ctrl-Alt-Left"}, readonly: !0},
- {name: "selectMoreAfter", exec: function (e) {
- e.selectMore(1)
- }, bindKey: {win: "Ctrl-Alt-Right", mac: "Ctrl-Alt-Right"}, readonly: !0},
- {name: "selectNextBefore", exec: function (e) {
- e.selectMore(-1, !0)
- }, bindKey: {win: "Ctrl-Alt-Shift-Left", mac: "Ctrl-Alt-Shift-Left"}, readonly: !0},
- {name: "selectNextAfter", exec: function (e) {
- e.selectMore(1, !0)
- }, bindKey: {win: "Ctrl-Alt-Shift-Right", mac: "Ctrl-Alt-Shift-Right"}, readonly: !0},
- {name: "splitIntoLines", exec: function (e) {
- e.multiSelect.splitIntoLines()
- }, bindKey: {win: "Ctrl-Alt-L", mac: "Ctrl-Alt-L"}, readonly: !0},
- {name: "alignCursors", exec: function (e) {
- e.alignCursors()
- }, bindKey: {win: "Ctrl-Alt-A", mac: "Ctrl-Alt-A"}}
- ], t.multiSelectCommands = [
- {name: "singleSelection", bindKey: "esc", exec: function (e) {
- e.exitMultiSelectMode()
- }, readonly: !0, isAvailable: function (e) {
- return e && e.inMultiSelectMode
- }}
- ];
- var r = e("../keyboard/hash_handler").HashHandler;
- t.keyboardHandler = new r(t.multiSelectCommands)
-}), ace.define("ace/worker/worker_client", ["require", "exports", "module", "ace/lib/oop", "ace/lib/event_emitter", "ace/config"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("../lib/event_emitter").EventEmitter, s = e("../config"), o = function (t, n, r) {
- this.changeListener = this.changeListener.bind(this), this.onMessage = this.onMessage.bind(this), this.onError = this.onError.bind(this);
- var i;
- if (s.get("packaged"))i = s.moduleUrl(n, "worker"); else {
- var o = this.$normalizePath;
- typeof e.supports != "undefined" && e.supports.indexOf("ucjs2-pinf-0") >= 0 ? i = e.nameToUrl("ace/worker/worker_sourcemint") : (e.nameToUrl && !e.toUrl && (e.toUrl = e.nameToUrl), i = o(e.toUrl("ace/worker/worker", null, "_")));
- var u = {};
- t.forEach(function (t) {
- u[t] = o(e.toUrl(t, null, "_").replace(/.js(\?.*)?$/, ""))
- })
- }
- this.$worker = new Worker(i), this.$worker.postMessage({init: !0, tlns: u, module: n, classname: r}), this.callbackId = 1, this.callbacks = {}, this.$worker.onerror = this.onError, this.$worker.onmessage = this.onMessage
- };
- (function () {
- r.implement(this, i), this.onError = function (e) {
- throw window.console && console.log && console.log(e), e
- }, this.onMessage = function (e) {
- var t = e.data;
- switch (t.type) {
- case"log":
- window.console && console.log && console.log.apply(console, t.data);
- break;
- case"event":
- this._emit(t.name, {data: t.data});
- break;
- case"call":
- var n = this.callbacks[t.id];
- n && (n(t.data), delete this.callbacks[t.id])
- }
- }, this.$normalizePath = function (e) {
- return location.host ? (e = e.replace(/^[a-z]+:\/\/[^\/]+/, ""), e = location.protocol + "//" + location.host + (e.charAt(0) == "/" ? "" : location.pathname.replace(/\/[^\/]*$/, "")) + "/" + e.replace(/^[\/]+/, ""), e) : e
- }, this.terminate = function () {
- this._emit("terminate", {}), this.$worker.terminate(), this.$worker = null, this.$doc.removeEventListener("change", this.changeListener), this.$doc = null
- }, this.send = function (e, t) {
- this.$worker.postMessage({command: e, args: t})
- }, this.call = function (e, t, n) {
- if (n) {
- var r = this.callbackId++;
- this.callbacks[r] = n, t.push(r)
- }
- this.send(e, t)
- }, this.emit = function (e, t) {
- try {
- this.$worker.postMessage({event: e, data: {data: t.data}})
- } catch (n) {
- }
- }, this.attachToDocument = function (e) {
- this.$doc && this.terminate(), this.$doc = e, this.call("setValue", [e.getValue()]), e.on("change", this.changeListener)
- }, this.changeListener = function (e) {
- e.range = {start: e.data.range.start, end: e.data.range.end}, this.emit("change", e)
- }
- }).call(o.prototype);
- var u = function (t, n, r) {
- this.changeListener = this.changeListener.bind(this), this.callbackId = 1, this.callbacks = {}, this.messageBuffer = [];
- var s = null, o = Object.create(i), u = this;
- this.$worker = {}, this.$worker.postMessage = function (e) {
- u.messageBuffer.push(e), s && setTimeout(a)
- };
- var a = function () {
- var e = u.messageBuffer.shift();
- e.command ? s[e.command].apply(s, e.args) : e.event && o._emit(e.event, e.data)
- };
- o.postMessage = function (e) {
- u.onMessage({data: e})
- }, o.callback = function (e, t) {
- this.postMessage({type: "call", id: t, data: e})
- }, o.emit = function (e, t) {
- this.postMessage({type: "event", name: e, data: t})
- }, e([n], function (e) {
- s = new e[r](o);
- while (u.messageBuffer.length)a()
- })
- };
- u.prototype = o.prototype, t.UIWorkerClient = u, t.WorkerClient = o
-}), ace.define("ace/placeholder", ["require", "exports", "module", "ace/range", "ace/lib/event_emitter", "ace/lib/oop"], function (e, t, n) {
- var r = e("./range").Range, i = e("./lib/event_emitter").EventEmitter, s = e("./lib/oop"), o = function (e, t, n, r, i, s) {
- var o = this;
- this.length = t, this.session = e, this.doc = e.getDocument(), this.mainClass = i, this.othersClass = s, this.$onUpdate = this.onUpdate.bind(this), this.doc.on("change", this.$onUpdate), this.$others = r, this.$onCursorChange = function () {
- setTimeout(function () {
- o.onCursorChange()
- })
- }, this.$pos = n;
- var u = e.getUndoManager().$undoStack || e.getUndoManager().$undostack || {length: -1};
- this.$undoStackDepth = u.length, this.setup(), e.selection.on("changeCursor", this.$onCursorChange)
- };
- (function () {
- s.implement(this, i), this.setup = function () {
- var e = this, t = this.doc, n = this.session, i = this.$pos;
- this.pos = t.createAnchor(i.row, i.column), this.markerId = n.addMarker(new r(i.row, i.column, i.row, i.column + this.length), this.mainClass, null, !1), this.pos.on("change", function (t) {
- n.removeMarker(e.markerId), e.markerId = n.addMarker(new r(t.value.row, t.value.column, t.value.row, t.value.column + e.length), e.mainClass, null, !1)
- }), this.others = [], this.$others.forEach(function (n) {
- var r = t.createAnchor(n.row, n.column);
- e.others.push(r)
- }), n.setUndoSelect(!1)
- }, this.showOtherMarkers = function () {
- if (this.othersActive)return;
- var e = this.session, t = this;
- this.othersActive = !0, this.others.forEach(function (n) {
- n.markerId = e.addMarker(new r(n.row, n.column, n.row, n.column + t.length), t.othersClass, null, !1), n.on("change", function (i) {
- e.removeMarker(n.markerId), n.markerId = e.addMarker(new r(i.value.row, i.value.column, i.value.row, i.value.column + t.length), t.othersClass, null, !1)
- })
- })
- }, this.hideOtherMarkers = function () {
- if (!this.othersActive)return;
- this.othersActive = !1;
- for (var e = 0; e < this.others.length; e++)this.session.removeMarker(this.others[e].markerId)
- }, this.onUpdate = function (e) {
- var t = e.data, n = t.range;
- if (n.start.row !== n.end.row)return;
- if (n.start.row !== this.pos.row)return;
- if (this.$updating)return;
- this.$updating = !0;
- var i = t.action === "insertText" ? n.end.column - n.start.column : n.start.column - n.end.column;
- if (n.start.column >= this.pos.column && n.start.column <= this.pos.column + this.length + 1) {
- var s = n.start.column - this.pos.column;
- this.length += i;
- if (!this.session.$fromUndo) {
- if (t.action === "insertText")for (var o = this.others.length - 1; o >= 0; o--) {
- var u = this.others[o], a = {row: u.row, column: u.column + s};
- u.row === n.start.row && n.start.column < u.column && (a.column += i), this.doc.insert(a, t.text)
- } else if (t.action === "removeText")for (var o = this.others.length - 1; o >= 0; o--) {
- var u = this.others[o], a = {row: u.row, column: u.column + s};
- u.row === n.start.row && n.start.column < u.column && (a.column += i), this.doc.remove(new r(a.row, a.column, a.row, a.column - i))
- }
- n.start.column === this.pos.column && t.action === "insertText" ? setTimeout(function () {
- this.pos.setPosition(this.pos.row, this.pos.column - i);
- for (var e = 0; e < this.others.length; e++) {
- var t = this.others[e], r = {row: t.row, column: t.column - i};
- t.row === n.start.row && n.start.column < t.column && (r.column += i), t.setPosition(r.row, r.column)
- }
- }.bind(this), 0) : n.start.column === this.pos.column && t.action === "removeText" && setTimeout(function () {
- for (var e = 0; e < this.others.length; e++) {
- var t = this.others[e];
- t.row === n.start.row && n.start.column < t.column && t.setPosition(t.row, t.column - i)
- }
- }.bind(this), 0)
- }
- this.pos._emit("change", {value: this.pos});
- for (var o = 0; o < this.others.length; o++)this.others[o]._emit("change", {value: this.others[o]})
- }
- this.$updating = !1
- }, this.onCursorChange = function (e) {
- if (this.$updating)return;
- var t = this.session.selection.getCursor();
- t.row === this.pos.row && t.column >= this.pos.column && t.column <= this.pos.column + this.length ? (this.showOtherMarkers(), this._emit("cursorEnter", e)) : (this.hideOtherMarkers(), this._emit("cursorLeave", e))
- }, this.detach = function () {
- this.session.removeMarker(this.markerId), this.hideOtherMarkers(), this.doc.removeEventListener("change", this.$onUpdate), this.session.selection.removeEventListener("changeCursor", this.$onCursorChange), this.pos.detach();
- for (var e = 0; e < this.others.length; e++)this.others[e].detach();
- this.session.setUndoSelect(!0)
- }, this.cancel = function () {
- if (this.$undoStackDepth === -1)throw Error("Canceling placeholders only supported with undo manager attached to session.");
- var e = this.session.getUndoManager(), t = (e.$undoStack || e.$undostack).length - this.$undoStackDepth;
- for (var n = 0; n < t; n++)e.undo(!0)
- }
- }).call(o.prototype), t.PlaceHolder = o
-}), ace.define("ace/mode/folding/fold_mode", ["require", "exports", "module", "ace/range"], function (e, t, n) {
- var r = e("../../range").Range, i = t.FoldMode = function () {
- };
- (function () {
- this.foldingStartMarker = null, this.foldingStopMarker = null, this.getFoldWidget = function (e, t, n) {
- var r = e.getLine(n);
- return this.foldingStartMarker.test(r) ? "start" : t == "markbeginend" && this.foldingStopMarker && this.foldingStopMarker.test(r) ? "end" : ""
- }, this.getFoldWidgetRange = function (e, t, n) {
- return null
- }, this.indentationBlock = function (e, t, n) {
- var i = /\S/, s = e.getLine(t), o = s.search(i);
- if (o == -1)return;
- var u = n || s.length, a = e.getLength(), f = t, l = t;
- while (++t < a) {
- var c = e.getLine(t).search(i);
- if (c == -1)continue;
- if (c <= o)break;
- l = t
- }
- if (l > f) {
- var h = e.getLine(l).length;
- return new r(f, u, l, h)
- }
- }, this.openingBracketBlock = function (e, t, n, i, s) {
- var o = {row: n, column: i + 1}, u = e.$findClosingBracket(t, o, s);
- if (!u)return;
- var a = e.foldWidgets[u.row];
- return a == null && (a = this.getFoldWidget(e, u.row)), a == "start" && u.row > o.row && (u.row--, u.column = e.getLine(u.row).length), r.fromPoints(o, u)
- }, this.closingBracketBlock = function (e, t, n, i, s) {
- var o = {row: n, column: i}, u = e.$findOpeningBracket(t, o);
- if (!u)return;
- return u.column++, o.column--, r.fromPoints(u, o)
- }
- }).call(i.prototype)
-});
-(function () {
- ace.require(["ace/ace"], function (a) {
- a && a.config.init();
- if (!window.ace)
- window.ace = {};
- for (var key in a) if (a.hasOwnProperty(key))
- ace[key] = a[key];
- });
-})();
-
\ No newline at end of file
diff --git a/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/ext-searchbox.js b/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/ext-searchbox.js
deleted file mode 100644
index b5910e0..0000000
--- a/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/ext-searchbox.js
+++ /dev/null
@@ -1,86 +0,0 @@
-ace.define("ace/ext/searchbox", ["require", "exports", "module", "ace/lib/dom", "ace/lib/lang", "ace/lib/event", "ace/keyboard/hash_handler", "ace/lib/keys"], function (e, t, n) {
- var r = e("../lib/dom"), i = e("../lib/lang"), s = e("../lib/event"), o = "/* ------------------------------------------------------------------------------------------* Editor Search Form* --------------------------------------------------------------------------------------- */.ace_search {background-color: #ddd;border: 1px solid #cbcbcb;border-top: 0 none;max-width: 297px;overflow: hidden;margin: 0;padding: 4px;padding-right: 6px;padding-bottom: 0;position: absolute;top: 0px;z-index: 99;}.ace_search.left {border-left: 0 none;border-radius: 0px 0px 5px 0px;left: 0;}.ace_search.right {border-radius: 0px 0px 0px 5px;border-right: 0 none;right: 0;}.ace_search_form, .ace_replace_form {border-radius: 3px;border: 1px solid #cbcbcb;float: left;margin-bottom: 4px;overflow: hidden;}.ace_search_field {background-color: white;border-right: 1px solid #cbcbcb;border: 0 none;-webkit-box-sizing: border-box;-moz-box-sizing: border-box;box-sizing: border-box;display: block;float: left;height: 22px;outline: 0;padding: 0 7px;width: 214px;margin: 0;}.ace_searchbtn,.ace_replacebtn {background: #fff;border: 0 none;border-left: 1px solid #dcdcdc;cursor: pointer;display: block;float: left;height: 22px;margin: 0;padding: 0;position: relative;}.ace_searchbtn:last-child,.ace_replacebtn:last-child {border-top-right-radius: 3px;border-bottom-right-radius: 3px;}.ace_searchbtn:disabled {background: none;cursor: default;}.ace_searchbtn {background-position: 50% 50%;background-repeat: no-repeat;width: 27px;}.ace_searchbtn.prev {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAFCAYAAAB4ka1VAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAADFJREFUeNpiSU1NZUAC/6E0I0yACYskCpsJiySKIiY0SUZk40FyTEgCjGgKwTRAgAEAQJUIPCE+qfkAAAAASUVORK5CYII=); }.ace_searchbtn.next {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAFCAYAAAB4ka1VAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAADRJREFUeNpiTE1NZQCC/0DMyIAKwGJMUAYDEo3M/s+EpvM/mkKwCQxYjIeLMaELoLMBAgwAU7UJObTKsvAAAAAASUVORK5CYII=); }.ace_searchbtn_close {background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAcCAYAAABRVo5BAAAAZ0lEQVR42u2SUQrAMAhDvazn8OjZBilCkYVVxiis8H4CT0VrAJb4WHT3C5xU2a2IQZXJjiQIRMdkEoJ5Q2yMqpfDIo+XY4k6h+YXOyKqTIj5REaxloNAd0xiKmAtsTHqW8sR2W5f7gCu5nWFUpVjZwAAAABJRU5ErkJggg==) no-repeat 50% 0;border-radius: 50%;border: 0 none;color: #656565;cursor: pointer;display: block;float: right;font-family: Arial;font-size: 16px;height: 14px;line-height: 16px;margin: 5px 1px 9px 5px;padding: 0;text-align: center;width: 14px;}.ace_searchbtn_close:hover {background-color: #656565;background-position: 50% 100%;color: white;}.ace_replacebtn.prev {width: 54px}.ace_replacebtn.next {width: 27px}", u = e("../keyboard/hash_handler").HashHandler, a = e("../lib/keys");
- r.importCssString(o, "ace_searchbox");
- var f = '
'.replace(/>\s+/g, ">"), l = function (e, t, n) {
- var i = r.createElement("div");
- i.innerHTML = f, this.element = i.firstChild, this.$init(), this.setEditor(e)
- };
- (function () {
- this.setEditor = function (e) {
- e.searchBox = this, e.container.appendChild(this.element), this.editor = e
- }, this.$init = function () {
- var e = this.element;
- this.searchBox = e.querySelector(".ace_search_form"), this.replaceBox = e.querySelector(".ace_replace_form"), this.searchInput = this.searchBox.querySelector(".ace_search_field"), this.replaceInput = this.replaceBox.querySelector(".ace_search_field");
- var t = this;
- s.addListener(e, "mousedown", function (e) {
- setTimeout(function () {
- t.activeInput.focus()
- }, 0), s.stopPropagation(e)
- }), s.addListener(e, "click", function (e) {
- var n = e.target, r = n.getAttribute("action");
- r && t[r] && t[r](), s.stopPropagation(e)
- }), s.addCommandKeyListener(e, function (e, n, r) {
- var i = a.keyCodeToString(r), o = t.$searchBarKb.findKeyCommand(n, i);
- o && o.exec && (o.exec(t), s.stopEvent(e))
- }), this.$onChange = i.delayedCall(function () {
- t.find(!1, !1)
- }), s.addListener(this.searchInput, "input", function () {
- t.$onChange.schedule(20)
- }), s.addListener(this.searchInput, "focus", function () {
- t.activeInput = t.searchInput
- }), s.addListener(this.replaceInput, "focus", function () {
- t.activeInput = t.replaceInput
- })
- }, this.$closeSearchBarKb = new u([
- {bindKey: "Esc", name: "closeSearchBar", exec: function (e) {
- e.searchBox.hide()
- }}
- ]), this.$searchBarKb = new u, this.$searchBarKb.bindKeys({"Ctrl-f|Command-f|Ctrl-H|Command-Option-F": function (e) {
- var t = e.isReplace = !e.isReplace;
- e.replaceBox.style.display = t ? "" : "none", e[t ? "replaceInput" : "searchInput"].focus()
- }, esc: function (e) {
- setTimeout(function () {
- e.hide()
- })
- }, Return: function (e) {
- e.activeInput == e.replaceInput && e.replace(), e.findNext()
- }, "Shift-Return": function (e) {
- e.activeInput == e.replaceInput && e.replace(), e.findPrev()
- }, Tab: function (e) {
- (e.activeInput == e.replaceInput ? e.searchInput : e.replaceInput).focus()
- }}), this.find = function (e, t) {
- this.editor.find(this.searchInput.value, {skipCurrent: e, backwards: t, wrap: !0}), this.editor.session.highlight(this.editor.$search.$options.re)
- }, this.findNext = function () {
- this.find(!0, !1)
- }, this.findPrev = function () {
- this.find(!0, !0)
- }, this.replace = function () {
- this.editor.replace(this.replaceInput.value), this.findNext()
- }, this.replaceAll = function () {
- this.editor.replaceAll(this.replaceInput.value)
- }, this.hide = function () {
- this.element.style.display = "none", this.editor.keyBinding.removeKeyboardHandler(this.$searchKeybingin), this.editor.focus()
- }, this.show = function (e, t) {
- this.element.style.display = "", this.replaceBox.style.display = t ? "" : "none", this.isReplace = t, e && (this.searchInput.value = e), this.searchInput.focus(), this.searchInput.select(), this.editor.keyBinding.addKeyboardHandler(this.$closeSearchBarKb)
- }
- }).call(l.prototype), t.SearchBox = l, t.Search = function (e, t) {
- var n = e.searchBox || new l(e);
- n.show(e.session.getTextRange(), t)
- }, t.ISearch = function (e, t) {
- this.$changeListener = this.$changeListener.bind(this), this.startRange = e.selection.toOrientedRange(), this.options = t || {}
- }, function () {
- this.setSession = function (e) {
- this.session && this.session.removeListener(this.$changeListener), this.session = e, this.session.addListener(this.$changeListener)
- }, this.setSearchString = function () {
- }, this.getValue = function () {
- return this.value == null && (this.value = this.session.getValue()), this.value
- }, this.$changeListener = function () {
- this.value = null
- }, this.find = function () {
- }, this.$edgeBefore = function () {
- this.cursor = this.startRange[this.options.backwards ? "start" : "end"]
- }, this.$edgeAfter = function () {
- }, this.next = function (e) {
- }
- }.call(t.ISearch.prototype)
-})
\ No newline at end of file
diff --git a/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/ext-spellcheck.js b/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/ext-spellcheck.js
deleted file mode 100644
index 9ce5a09..0000000
--- a/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/ext-spellcheck.js
+++ /dev/null
@@ -1,19 +0,0 @@
-ace.define("ace/ext/spellcheck", ["require", "exports", "module"], function (e, t, n) {
- text.spellcheck = !0, host.on("nativecontextmenu", function (e) {
- if (!host.selection.isEmpty())return;
- var t = host.getCursorPosition(), n = host.session.getWordRange(t.row, t.column), r = host.session.getTextRange(n);
- host.session.tokenRe.lastIndex = 0;
- if (!host.session.tokenRe.test(r))return;
- var e = r + " " + PLACEHOLDER;
- text.value = e, text.setSelectionRange(r.length + 1, r.length + 1), text.setSelectionRange(0, 0), inputHandler = function (t) {
- if (t == e)return"";
- if (t.lastIndexOf(e) == t.length - e.length)return t.slice(0, -e.length);
- if (t.indexOf(e) == 0)return t.slice(e.length);
- if (t.slice(-2) == PLACEHOLDER) {
- var r = t.slice(0, -2);
- if (r.slice(-1) == " ")return r = r.slice(0, -1), host.session.replace(n, r), r
- }
- return t
- }
- })
-})
\ No newline at end of file
diff --git a/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/ext-static_highlight.js b/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/ext-static_highlight.js
deleted file mode 100644
index c92a7e3..0000000
--- a/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/ext-static_highlight.js
+++ /dev/null
@@ -1,14 +0,0 @@
-ace.define("ace/ext/static_highlight", ["require", "exports", "module", "ace/edit_session", "ace/layer/text"], function (e, t, n) {
- var r = e("../edit_session").EditSession, i = e("../layer/text").Text, s = ".ace_editor {font-family: 'Monaco', 'Menlo', 'Droid Sans Mono', 'Courier New', monospace;font-size: 12px;}.ace_editor .ace_gutter { width: 25px !important;display: block;float: left;text-align: right; padding: 0 3px 0 0; margin-right: 3px;}.ace_line { clear: both; }*.ace_gutter-cell {-moz-user-select: -moz-none;-khtml-user-select: none;-webkit-user-select: none;user-select: none;}";
- t.render = function (e, t, n, o, u) {
- o = parseInt(o || 1, 10);
- var a = new r("");
- a.setMode(t), a.setUseWorker(!1);
- var f = new i(document.createElement("div"));
- f.setSession(a), f.config = {characterWidth: 10, lineHeight: 20}, a.setValue(e);
- var l = [], c = a.getLength();
- for (var h = 0; h < c; h++)l.push("
"), u || l.push("" + (h + o) + " "), f.$renderLine(l, h, !0, !1), l.push("
");
- var p = "
".replace(/:cssClass/, n.cssClass).replace(/:code/, l.join(""));
- return f.destroy(), {css: s + n.cssText, html: p}
- }
-})
\ No newline at end of file
diff --git a/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/ext-textarea.js b/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/ext-textarea.js
deleted file mode 100644
index 75f9803..0000000
--- a/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/ext-textarea.js
+++ /dev/null
@@ -1,185 +0,0 @@
-ace.define("ace/ext/textarea", ["require", "exports", "module", "ace/lib/event", "ace/lib/useragent", "ace/lib/net", "ace/ace", "ace/theme/textmate", "ace/mode/text"], function (e, t, n) {
- function a(e, t) {
- for (var n in t)e.style[n] = t[n]
- }
-
- function f(e, t) {
- if (e.type != "textarea")throw"Textarea required!";
- var n = e.parentNode, i = document.createElement("div"), s = function () {
- var t = "position:relative;";
- ["margin-top", "margin-left", "margin-right", "margin-bottom"].forEach(function (n) {
- t += n + ":" + u(e, i, n) + ";"
- });
- var n = u(e, i, "width") || e.clientWidth + "px", r = u(e, i, "height") || e.clientHeight + "px";
- t += "height:" + r + ";width:" + n + ";", t += "display:inline-block;", i.setAttribute("style", t)
- };
- r.addListener(window, "resize", s), s(), n.insertBefore(i, e.nextSibling);
- while (n !== document) {
- if (n.tagName.toUpperCase() === "FORM") {
- var o = n.onsubmit;
- n.onsubmit = function (n) {
- e.value = t(), o && o.call(this, n)
- };
- break
- }
- n = n.parentNode
- }
- return i
- }
-
- function l(t, n, r) {
- s.loadScript(t, function () {
- e([n], r)
- })
- }
-
- function c(n, r, i, s, o, u) {
- function c(e) {
- return e === "true" || e == 1
- }
-
- var a = n.getSession(), f = n.renderer;
- u = u || l, n.setDisplaySettings = function (e) {
- e == null && (e = i.style.display == "none"), e ? (i.style.display = "block", i.hideButton.focus(), n.on("focus", function t() {
- n.removeListener("focus", t), i.style.display = "none"
- })) : n.focus()
- }, n.setOption = function (t, i) {
- if (o[t] == i)return;
- switch (t) {
- case"gutter":
- f.setShowGutter(c(i));
- break;
- case"mode":
- i != "text" ? u("mode-" + i + ".js", "ace/mode/" + i, function () {
- var t = e("../mode/" + i).Mode;
- a.setMode(new t)
- }) : a.setMode(new (e("../mode/text").Mode));
- break;
- case"theme":
- i != "textmate" ? u("theme-" + i + ".js", "ace/theme/" + i, function () {
- n.setTheme("ace/theme/" + i)
- }) : n.setTheme("ace/theme/textmate");
- break;
- case"fontSize":
- r.style.fontSize = i;
- break;
- case"keybindings":
- switch (i) {
- case"vim":
- n.setKeyboardHandler("ace/keyboard/vim");
- break;
- case"emacs":
- n.setKeyboardHandler("ace/keyboard/emacs");
- break;
- default:
- n.setKeyboardHandler(null)
- }
- break;
- case"softWrap":
- switch (i) {
- case"off":
- a.setUseWrapMode(!1), f.setPrintMarginColumn(80);
- break;
- case"40":
- a.setUseWrapMode(!0), a.setWrapLimitRange(40, 40), f.setPrintMarginColumn(40);
- break;
- case"80":
- a.setUseWrapMode(!0), a.setWrapLimitRange(80, 80), f.setPrintMarginColumn(80);
- break;
- case"free":
- a.setUseWrapMode(!0), a.setWrapLimitRange(null, null), f.setPrintMarginColumn(80)
- }
- break;
- case"useSoftTabs":
- a.setUseSoftTabs(c(i));
- break;
- case"showPrintMargin":
- f.setShowPrintMargin(c(i));
- break;
- case"showInvisibles":
- n.setShowInvisibles(c(i))
- }
- o[t] = i
- }, n.getOption = function (e) {
- return o[e]
- }, n.getOptions = function () {
- return o
- };
- for (var h in t.options)n.setOption(h, t.options[h]);
- return n
- }
-
- function h(e, t, n, i) {
- function f(e, t, n, r) {
- if (!n) {
- e.push("
");
- return
- }
- e.push("
");
- for (var i in n)e.push("", n[i], " ");
- e.push(" ")
- }
-
- var s = null, o = {mode: "Mode:", gutter: "Display Gutter:", theme: "Theme:", fontSize: "Font Size:", softWrap: "Soft Wrap:", keybindings: "Keyboard", showPrintMargin: "Show Print Margin:", useSoftTabs: "Use Soft Tabs:", showInvisibles: "Show Invisibles"}, u = {mode: {text: "Plain", javascript: "JavaScript", xml: "XML", html: "HTML", css: "CSS", scss: "SCSS", python: "Python", php: "PHP", java: "Java", ruby: "Ruby", c_cpp: "C/C++", coffee: "CoffeeScript", json: "json", perl: "Perl", clojure: "Clojure", ocaml: "OCaml", csharp: "C#", haxe: "haXe", svg: "SVG", textile: "Textile", groovy: "Groovy", liquid: "Liquid", Scala: "Scala"}, theme: {clouds: "Clouds", clouds_midnight: "Clouds Midnight", cobalt: "Cobalt", crimson_editor: "Crimson Editor", dawn: "Dawn", eclipse: "Eclipse", idle_fingers: "Idle Fingers", kr_theme: "Kr Theme", merbivore: "Merbivore", merbivore_soft: "Merbivore Soft", mono_industrial: "Mono Industrial", monokai: "Monokai", pastel_on_dark: "Pastel On Dark", solarized_dark: "Solarized Dark", solarized_light: "Solarized Light", textmate: "Textmate", twilight: "Twilight", vibrant_ink: "Vibrant Ink"}, gutter: s, fontSize: {"10px": "10px", "11px": "11px", "12px": "12px", "14px": "14px", "16px": "16px"}, softWrap: {off: "Off", 40: "40", 80: "80", free: "Free"}, keybindings: {ace: "ace", vim: "vim", emacs: "emacs"}, showPrintMargin: s, useSoftTabs: s, showInvisibles: s}, a = [];
- a.push("
Setting Value ");
- for (var l in i)a.push("", o[l], " "), a.push(""), f(a, l, u[l], i[l]), a.push(" ");
- a.push("
"), e.innerHTML = a.join("");
- var c = function (e) {
- var t = e.currentTarget;
- n.setOption(t.title, t.value)
- }, h = function (e) {
- var t = e.currentTarget;
- n.setOption(t.title, t.checked)
- }, p = e.getElementsByTagName("select");
- for (var d = 0; d < p.length; d++)p[d].onchange = c;
- var v = e.getElementsByTagName("input");
- for (var d = 0; d < v.length; d++)v[d].onclick = h;
- var m = document.createElement("input");
- m.type = "button", m.value = "Hide", r.addListener(m, "click", function () {
- n.setDisplaySettings(!1)
- }), e.appendChild(m), e.hideButton = m
- }
-
- var r = e("../lib/event"), i = e("../lib/useragent"), s = e("../lib/net"), o = e("../ace");
- e("../theme/textmate"), n.exports = t = o;
- var u = function (e, t, n) {
- var r = e.style[n];
- r || (window.getComputedStyle ? r = window.getComputedStyle(e, "").getPropertyValue(n) : r = e.currentStyle[n]);
- if (!r || r == "auto" || r == "intrinsic")r = t.style[n];
- return r
- };
- t.transformTextarea = function (e, t) {
- var n, s = f(e, function () {
- return n.getValue()
- });
- e.style.display = "none", s.style.background = "white";
- var u = document.createElement("div");
- a(u, {top: "0px", left: "0px", right: "0px", bottom: "0px", border: "1px solid gray", position: "absolute"}), s.appendChild(u);
- var l = document.createElement("div");
- a(l, {position: "absolute", right: "0px", bottom: "0px", background: "red", cursor: "nw-resize", borderStyle: "solid", borderWidth: "9px 8px 10px 9px", width: "2px", borderColor: "lightblue gray gray lightblue", zIndex: 101});
- var p = document.createElement("div"), d = {top: "0px", left: "20%", right: "0px", bottom: "0px", position: "absolute", padding: "5px", zIndex: 100, color: "white", display: "none", overflow: "auto", fontSize: "14px", boxShadow: "-5px 2px 3px gray"};
- i.isOldIE ? d.backgroundColor = "#333" : d.backgroundColor = "rgba(0, 0, 0, 0.6)", a(p, d), s.appendChild(p);
- var v = {}, m = o.edit(u);
- n = m.getSession(), n.setValue(e.value || e.innerHTML), m.focus(), s.appendChild(l), c(m, u, p, o, v, t), h(p, l, m, v);
- var g = "";
- return r.addListener(l, "mousemove", function (e) {
- var t = this.getBoundingClientRect(), n = e.clientX - t.left, r = e.clientY - t.top;
- n + r < (t.width + t.height) / 2 ? (this.style.cursor = "pointer", g = "toggle") : (g = "resize", this.style.cursor = "nw-resize")
- }), r.addListener(l, "mousedown", function (e) {
- if (g == "toggle") {
- m.setDisplaySettings();
- return
- }
- s.style.zIndex = 1e5;
- var t = s.getBoundingClientRect(), n = t.width + t.left - e.clientX, i = t.height + t.top - e.clientY;
- r.capture(l, function (e) {
- s.style.width = e.clientX - t.left + n + "px", s.style.height = e.clientY - t.top + i + "px", m.resize()
- }, function () {
- })
- }), m
- }, t.options = {mode: "text", theme: "textmate", gutter: "false", fontSize: "12px", softWrap: "off", keybindings: "ace", showPrintMargin: "false", useSoftTabs: "true", showInvisibles: "false"}
-}), ace.define("ace/theme/textmate", ["require", "exports", "module", "ace/lib/dom"], function (e, t, n) {
- t.isDark = !1, t.cssClass = "ace-tm", t.cssText = '.ace-tm .ace_gutter {background: #f0f0f0;color: #333;}.ace-tm .ace_print-margin {width: 1px;background: #e8e8e8;}.ace-tm .ace_fold {background-color: #6B72E6;}.ace-tm .ace_scroller {background-color: #FFFFFF;}.ace-tm .ace_cursor {border-left: 2px solid black;}.ace-tm .ace_overwrite-cursors .ace_cursor {border-left: 0px;border-bottom: 1px solid black;}.ace-tm .ace_invisible {color: rgb(191, 191, 191);}.ace-tm .ace_storage,.ace-tm .ace_keyword {color: blue;}.ace-tm .ace_constant {color: rgb(197, 6, 11);}.ace-tm .ace_constant.ace_buildin {color: rgb(88, 72, 246);}.ace-tm .ace_constant.ace_language {color: rgb(88, 92, 246);}.ace-tm .ace_constant.ace_library {color: rgb(6, 150, 14);}.ace-tm .ace_invalid {background-color: rgba(255, 0, 0, 0.1);color: red;}.ace-tm .ace_support.ace_function {color: rgb(60, 76, 114);}.ace-tm .ace_support.ace_constant {color: rgb(6, 150, 14);}.ace-tm .ace_support.ace_type,.ace-tm .ace_support.ace_class {color: rgb(109, 121, 222);}.ace-tm .ace_keyword.ace_operator {color: rgb(104, 118, 135);}.ace-tm .ace_string {color: rgb(3, 106, 7);}.ace-tm .ace_comment {color: rgb(76, 136, 107);}.ace-tm .ace_comment.ace_doc {color: rgb(0, 102, 255);}.ace-tm .ace_comment.ace_doc.ace_tag {color: rgb(128, 159, 191);}.ace-tm .ace_constant.ace_numeric {color: rgb(0, 0, 205);}.ace-tm .ace_variable {color: rgb(49, 132, 149);}.ace-tm .ace_xml-pe {color: rgb(104, 104, 91);}.ace-tm .ace_entity.ace_name.ace_function {color: #0000A2;}.ace-tm .ace_markup.ace_heading {color: rgb(12, 7, 255);}.ace-tm .ace_markup.ace_list {color:rgb(185, 6, 144);}.ace-tm .ace_meta.ace_tag {color:rgb(0, 22, 142);}.ace-tm .ace_string.ace_regex {color: rgb(255, 0, 0)}.ace-tm .ace_marker-layer .ace_selection {background: rgb(181, 213, 255);}.ace-tm.ace_multiselect .ace_selection.ace_start {box-shadow: 0 0 3px 0px white;border-radius: 2px;}.ace-tm .ace_marker-layer .ace_step {background: rgb(252, 255, 0);}.ace-tm .ace_marker-layer .ace_stack {background: rgb(164, 229, 101);}.ace-tm .ace_marker-layer .ace_bracket {margin: -1px 0 0 -1px;border: 1px solid rgb(192, 192, 192);}.ace-tm .ace_marker-layer .ace_active-line {background: rgba(0, 0, 0, 0.07);}.ace-tm .ace_gutter-active-line {background-color : #dcdcdc;}.ace-tm .ace_marker-layer .ace_selected-word {background: rgb(250, 250, 255);border: 1px solid rgb(200, 200, 250);}.ace-tm .ace_indent-guide {background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==") right repeat-y;}';
- var r = e("../lib/dom");
- r.importCssString(t.cssText, t.cssClass)
-})
\ No newline at end of file
diff --git a/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/keybinding-emacs.js b/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/keybinding-emacs.js
deleted file mode 100644
index 20073a8..0000000
--- a/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/keybinding-emacs.js
+++ /dev/null
@@ -1,113 +0,0 @@
-ace.define("ace/keyboard/emacs", ["require", "exports", "module", "ace/lib/dom", "ace/keyboard/hash_handler", "ace/lib/keys"], function (e, t, n) {
- var r = e("../lib/dom"), i = function (e, t) {
- var n = this.scroller.getBoundingClientRect(), r = Math.floor((e + this.scrollLeft - n.left - this.$padding) / this.characterWidth), i = Math.floor((t + this.scrollTop - n.top) / this.lineHeight);
- return this.session.screenToDocumentPosition(i, r)
- }, s = e("./hash_handler").HashHandler;
- t.handler = new s;
- var o = !1, u, a;
- t.handler.attach = function (e) {
- o || (o = !0, r.importCssString(" .emacs-mode .ace_cursor{ border: 2px rgba(50,250,50,0.8) solid!important; -moz-box-sizing: border-box!important; -webkit-box-sizing: border-box!important; box-sizing: border-box!important; background-color: rgba(0,250,0,0.9); opacity: 0.5; } .emacs-mode .ace_cursor.ace_hidden{ opacity: 1; background-color: transparent; } .emacs-mode .ace_overwrite-cursors .ace_cursor { opacity: 1; background-color: transparent; border-width: 0 0 2px 2px !important; } .emacs-mode .ace_text-layer { z-index: 4 } .emacs-mode .ace_cursor-layer { z-index: 2 }", "emacsMode")), u = e.session.$selectLongWords, e.session.$selectLongWords = !0, a = e.session.$useEmacsStyleLineStart, e.session.$useEmacsStyleLineStart = !0, e.session.$emacsMark = null, t.markMode = function () {
- return e.session.$emacsMark
- }, t.setMarkMode = function (t) {
- e.session.$emacsMark = t
- }, e.on("click", l), e.on("changeSession", f), e.renderer.screenToTextCoordinates = i, e.setStyle("emacs-mode")
- }, t.handler.detach = function (e) {
- delete e.renderer.screenToTextCoordinates, e.session.$selectLongWords = u, e.session.$useEmacsStyleLineStart = a, e.removeEventListener("click", l), e.removeEventListener("changeSession", f), e.unsetStyle("emacs-mode")
- };
- var f = function (e) {
- e.oldSession && (e.oldSession.$selectLongWords = u, e.oldSession.$useEmacsStyleLineStart = a), u = e.session.$selectLongWords, e.session.$selectLongWords = !0, a = e.session.$useEmacsStyleLineStart, e.session.$useEmacsStyleLineStart = !0, e.session.hasOwnProperty("$emacsMark") || (e.session.$emacsMark = null)
- }, l = function (e) {
- e.editor.session.$emacsMark = null
- }, c = e("../lib/keys").KEY_MODS, h = {C: "ctrl", S: "shift", M: "alt"};
- ["S-C-M", "S-C", "S-M", "C-M", "S", "C", "M"].forEach(function (e) {
- var t = 0;
- e.split("-").forEach(function (e) {
- t |= c[h[e]]
- }), h[t] = e.toLowerCase() + "-"
- }), t.handler.bindKey = function (e, t) {
- if (!e)return;
- var n = this.commmandKeyBinding;
- e.split("|").forEach(function (e) {
- e = e.toLowerCase(), n[e] = t, e = e.split(" ")[0], n[e] || (n[e] = "null")
- }, this)
- }, t.handler.handleKeyboard = function (e, n, r, i) {
- if (n == -1) {
- t.setMarkMode(null);
- if (e.count) {
- var s = Array(e.count + 1).join(r);
- return e.count = null, {command: "insertstring", args: s}
- }
- }
- if (r == "\0")return;
- var o = h[n];
- if (o == "c-" || e.universalArgument) {
- var u = parseInt(r[r.length - 1]);
- if (u)return e.count = u, {command: "null"}
- }
- e.universalArgument = !1, o && (r = o + r), e.keyChain && (r = e.keyChain += " " + r);
- var a = this.commmandKeyBinding[r];
- e.keyChain = a == "null" ? r : "";
- if (!a)return;
- if (a == "null")return{command: "null"};
- if (a == "universalArgument")return e.universalArgument = !0, {command: "null"};
- if (typeof a != "string") {
- var f = a.args;
- a = a.command, a == "goorselect" && (a = f[0], t.markMode() && (a = f[1]), f = null)
- }
- typeof a == "string" && ((a == "insertstring" || a == "splitline" || a == "togglecomment") && t.setMarkMode(null), a = this.commands[a] || e.editor.commands.commands[a]), !a.readonly && !a.isYank && (e.lastCommand = null);
- if (e.count) {
- var u = e.count;
- return e.count = 0, {args: f, command: {exec: function (e, t) {
- for (var n = 0; n < u; n++)a.exec(e, t)
- }}}
- }
- return{command: a, args: f}
- }, t.emacsKeys = {"Up|C-p": {command: "goorselect", args: ["golineup", "selectup"]}, "Down|C-n": {command: "goorselect", args: ["golinedown", "selectdown"]}, "Left|C-b": {command: "goorselect", args: ["gotoleft", "selectleft"]}, "Right|C-f": {command: "goorselect", args: ["gotoright", "selectright"]}, "C-Left|M-b": {command: "goorselect", args: ["gotowordleft", "selectwordleft"]}, "C-Right|M-f": {command: "goorselect", args: ["gotowordright", "selectwordright"]}, "Home|C-a": {command: "goorselect", args: ["gotolinestart", "selecttolinestart"]}, "End|C-e": {command: "goorselect", args: ["gotolineend", "selecttolineend"]}, "C-Home|S-M-,": {command: "goorselect", args: ["gotostart", "selecttostart"]}, "C-End|S-M-.": {command: "goorselect", args: ["gotoend", "selecttoend"]}, "S-Up|S-C-p": "selectup", "S-Down|S-C-n": "selectdown", "S-Left|S-C-b": "selectleft", "S-Right|S-C-f": "selectright", "S-C-Left|S-M-b": "selectwordleft", "S-C-Right|S-M-f": "selectwordright", "S-Home|S-C-a": "selecttolinestart", "S-End|S-C-e": "selecttolineend", "S-C-Home": "selecttostart", "S-C-End": "selecttoend", "C-l": "recenterTopBottom", "M-s": "centerselection", "M-g": "gotoline", "C-x C-p": "selectall", "C-Down": {command: "goorselect", args: ["gotopagedown", "selectpagedown"]}, "C-Up": {command: "goorselect", args: ["gotopageup", "selectpageup"]}, "PageDown|C-v": {command: "goorselect", args: ["gotopagedown", "selectpagedown"]}, "PageUp|M-v": {command: "goorselect", args: ["gotopageup", "selectpageup"]}, "S-C-Down": "selectpagedown", "S-C-Up": "selectpageup", "C-s": "findnext", "C-r": "findprevious", "M-C-s": "findnext", "M-C-r": "findprevious", "S-M-5": "replace", Backspace: "backspace", "Delete|C-d": "del", "Return|C-m": {command: "insertstring", args: "\n"}, "C-o": "splitline", "M-d|C-Delete": {command: "killWord", args: "right"}, "C-Backspace|M-Backspace|M-Delete": {command: "killWord", args: "left"}, "C-k": "killLine", "C-y|S-Delete": "yank", "M-y": "yankRotate", "C-g": "keyboardQuit", "C-w": "killRegion", "M-w": "killRingSave", "C-Space": "setMark", "C-x C-x": "exchangePointAndMark", "C-t": "transposeletters", "M-u": "touppercase", "M-l": "tolowercase", "M-/": "autocomplete", "C-u": "universalArgument", "M-;": "togglecomment", "C-/|C-x u|S-C--|C-z": "undo", "S-C-/|S-C-x u|C--|S-C-z": "redo", "C-x r": "selectRectangularRegion"}, t.handler.bindKeys(t.emacsKeys), t.handler.addCommands({recenterTopBottom: function (e) {
- var t = e.renderer, n = t.$cursorLayer.getPixelPosition(), r = t.$size.scrollerHeight - t.lineHeight, i = t.scrollTop;
- Math.abs(n.top - i) < 2 ? i = n.top - r : Math.abs(n.top - i - r * .5) < 2 ? i = n.top : i = n.top - r * .5, e.session.setScrollTop(i)
- }, selectRectangularRegion: function (e) {
- e.multiSelect.toggleBlockSelection()
- }, setMark: function (e) {
- var n = t.markMode();
- if (n) {
- cp = e.getCursorPosition();
- if (e.selection.isEmpty() && n.row == cp.row && n.column == cp.column) {
- t.setMarkMode(null);
- return
- }
- }
- n = e.getCursorPosition(), t.setMarkMode(n), e.selection.setSelectionAnchor(n.row, n.column)
- }, exchangePointAndMark: {exec: function (e) {
- var t = e.selection.getRange();
- e.selection.setSelectionRange(t, !e.selection.isBackwards())
- }, readonly: !0, multiselectAction: "forEach"}, killWord: {exec: function (e, n) {
- e.clearSelection(), n == "left" ? e.selection.selectWordLeft() : e.selection.selectWordRight();
- var r = e.getSelectionRange(), i = e.session.getTextRange(r);
- t.killRing.add(i), e.session.remove(r), e.clearSelection()
- }, multiselectAction: "forEach"}, killLine: function (e) {
- t.setMarkMode(null);
- var n = e.getCursorPosition();
- n.column == 0 && e.session.doc.getLine(n.row).length == 0 ? e.selection.selectLine() : (e.clearSelection(), e.selection.selectLineEnd());
- var r = e.getSelectionRange(), i = e.session.getTextRange(r);
- t.killRing.add(i), e.session.remove(r), e.clearSelection()
- }, yank: function (e) {
- e.onPaste(t.killRing.get()), e.keyBinding.$data.lastCommand = "yank"
- }, yankRotate: function (e) {
- if (e.keyBinding.$data.lastCommand != "yank")return;
- e.undo(), e.onPaste(t.killRing.rotate()), e.keyBinding.$data.lastCommand = "yank"
- }, killRegion: function (e) {
- t.killRing.add(e.getCopyText()), e.commands.byName.cut.exec(e)
- }, killRingSave: function (e) {
- t.killRing.add(e.getCopyText())
- }});
- var p = t.handler.commands;
- p.yank.isYank = !0, p.yankRotate.isYank = !0, t.killRing = {$data: [], add: function (e) {
- e && this.$data.push(e), this.$data.length > 30 && this.$data.shift()
- }, get: function () {
- return this.$data[this.$data.length - 1] || ""
- }, pop: function () {
- return this.$data.length > 1 && this.$data.pop(), this.get()
- }, rotate: function () {
- return this.$data.unshift(this.$data.pop()), this.get()
- }}
-})
\ No newline at end of file
diff --git a/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/keybinding-vim.js b/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/keybinding-vim.js
deleted file mode 100644
index 5abe69b..0000000
--- a/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/keybinding-vim.js
+++ /dev/null
@@ -1,592 +0,0 @@
-ace.define("ace/keyboard/vim", ["require", "exports", "module", "ace/keyboard/vim/commands", "ace/keyboard/vim/maps/util", "ace/lib/useragent"], function (e, t, n) {
- var r = e("./vim/commands"), i = r.coreCommands, s = e("./vim/maps/util"), o = e("../lib/useragent"), u = {i: {command: i.start}, I: {command: i.startBeginning}, a: {command: i.append}, A: {command: i.appendEnd}, "ctrl-f": {command: "gotopagedown"}, "ctrl-b": {command: "gotopageup"}};
- t.handler = {handleMacRepeat: function (e, t, n) {
- if (t == -1)e.inputChar = n, e.lastEvent = "input"; else if (e.inputChar && e.$lastHash == t && e.$lastKey == n) {
- if (e.lastEvent == "input")e.lastEvent = "input1"; else if (e.lastEvent == "input1")return!0
- } else e.$lastHash = t, e.$lastKey = n, e.lastEvent = "keypress"
- }, handleKeyboard: function (e, t, n, s, a) {
- if (t != 0 && (n == "" || n == "\0"))return null;
- t == 1 && (n = "ctrl-" + n);
- if (n == "esc" && t == 0 || n == "ctrl-[")return{command: i.stop};
- if (e.state == "start") {
- o.isMac && this.handleMacRepeat(e, t, n) && (t = -1, n = e.inputChar);
- if (t == -1 || t == 1 || t == 0 && n.length > 1)return r.inputBuffer.idle && u[n] ? u[n] : {command: {exec: function (e) {
- return r.inputBuffer.push(e, n)
- }}};
- if (n.length == 1 && (t == 0 || t == 4))return{command: "null", passEvent: !0};
- if (n == "esc" && t == 0)return{command: i.stop}
- } else if (n == "ctrl-w")return{command: "removewordleft"}
- }, attach: function (e) {
- e.on("click", t.onCursorMove), s.currentMode !== "insert" && r.coreCommands.stop.exec(e), e.$vimModeHandler = this
- }, detach: function (e) {
- e.removeListener("click", t.onCursorMove), s.noMode(e), s.currentMode = "normal"
- }, actions: r.actions, getStatusText: function () {
- return s.currentMode == "insert" ? "INSERT" : s.onVisualMode ? (s.onVisualLineMode ? "VISUAL LINE " : "VISUAL ") + r.inputBuffer.status : r.inputBuffer.status
- }}, t.onCursorMove = function (e) {
- r.onCursorMove(e.editor, e), t.onCursorMove.scheduled = !1
- }
-}), ace.define("ace/keyboard/vim/commands", ["require", "exports", "module", "ace/keyboard/vim/maps/util", "ace/keyboard/vim/maps/motions", "ace/keyboard/vim/maps/operators", "ace/keyboard/vim/maps/aliases", "ace/keyboard/vim/registers"], function (e, t, n) {
- "never use strict";
- function g(e) {
- m.previous = {action: {action: {fn: e}}}
- }
-
- var r = e("./maps/util"), i = e("./maps/motions"), s = e("./maps/operators"), o = e("./maps/aliases"), u = e("./registers"), a = 1, f = 2, l = 3, c = 4, h = 8, p = function (t, n, r) {
- while (0 < n--)t.apply(this, r)
- }, d = function (e) {
- var t = e.renderer, n = t.$cursorLayer.getPixelPosition(), r = n.top, i = h * t.layerConfig.lineHeight;
- 2 * i > t.$size.scrollerHeight && (i = t.$size.scrollerHeight / 2), t.scrollTop > r - i && t.session.setScrollTop(r - i), t.scrollTop + t.$size.scrollerHeight < r + i + t.lineHeight && t.session.setScrollTop(r + i + t.lineHeight - t.$size.scrollerHeight)
- }, v = t.actions = {z: {param: !0, fn: function (e, t, n, r) {
- switch (r) {
- case"z":
- e.renderer.alignCursor(null, .5);
- break;
- case"t":
- e.renderer.alignCursor(null, 0);
- break;
- case"b":
- e.renderer.alignCursor(null, 1)
- }
- }}, r: {param: !0, fn: function (e, t, n, r) {
- r && r.length && (p(function () {
- e.insert(r)
- }, n || 1), e.navigateLeft())
- }}, R: {fn: function (e, t, n, i) {
- r.insertMode(e), e.setOverwrite(!0)
- }}, "~": {fn: function (e, t, n) {
- p(function () {
- var t = e.selection.getRange();
- t.isEmpty() && t.end.column++;
- var n = e.session.getTextRange(t), r = n.toUpperCase();
- r == n ? e.navigateRight() : e.session.replace(t, r)
- }, n || 1)
- }}, "*": {fn: function (e, t, n, r) {
- e.selection.selectWord(), e.findNext(), d(e);
- var i = e.selection.getRange();
- e.selection.setSelectionRange(i, !0)
- }}, "#": {fn: function (e, t, n, r) {
- e.selection.selectWord(), e.findPrevious(), d(e);
- var i = e.selection.getRange();
- e.selection.setSelectionRange(i, !0)
- }}, m: {param: !0, fn: function (e, t, n, r) {
- var i = e.session, s = i.vimMarkers || (i.vimMarkers = {}), o = e.getCursorPosition();
- s[r] || (s[r] = e.session.doc.createAnchor(o)), s[r].setPosition(o.row, o.column, !0)
- }}, n: {fn: function (e, t, n, r) {
- var i = e.getLastSearchOptions();
- i.backwards = !1, e.selection.moveCursorRight(), e.selection.clearSelection(), e.findNext(i), d(e);
- var s = e.selection.getRange();
- s.end.row = s.start.row, s.end.column = s.start.column, e.selection.setSelectionRange(s, !0)
- }}, N: {fn: function (e, t, n, r) {
- var i = e.getLastSearchOptions();
- i.backwards = !0, e.findPrevious(i), d(e);
- var s = e.selection.getRange();
- s.end.row = s.start.row, s.end.column = s.start.column, e.selection.setSelectionRange(s, !0)
- }}, v: {fn: function (e, t, n, i) {
- e.selection.selectRight(), r.visualMode(e, !1)
- }, acceptsMotion: !0}, V: {fn: function (e, t, n, i) {
- var s = e.getCursorPosition().row;
- e.selection.clearSelection(), e.selection.moveCursorTo(s, 0), e.selection.selectLineEnd(), e.selection.visualLineStart = s, r.visualMode(e, !0)
- }, acceptsMotion: !0}, Y: {fn: function (e, t, n, i) {
- r.copyLine(e)
- }}, p: {fn: function (e, t, n, r) {
- var i = u._default;
- e.setOverwrite(!1);
- if (i.isLine) {
- var s = e.getCursorPosition(), o = i.text.split("\n");
- e.session.getDocument().insertLines(s.row + 1, o), e.moveCursorTo(s.row + 1, 0)
- } else e.navigateRight(), e.insert(i.text), e.navigateLeft();
- e.setOverwrite(!0), e.selection.clearSelection()
- }}, P: {fn: function (e, t, n, r) {
- var i = u._default;
- e.setOverwrite(!1);
- if (i.isLine) {
- var s = e.getCursorPosition(), o = i.text.split("\n");
- e.session.getDocument().insertLines(s.row, o), e.moveCursorTo(s.row, 0)
- } else e.insert(i.text);
- e.setOverwrite(!0), e.selection.clearSelection()
- }}, J: {fn: function (e, t, n, r) {
- var i = e.session;
- t = e.getSelectionRange();
- var s = {row: t.start.row, column: t.start.column};
- n = n || t.end.row - t.start.row;
- var o = Math.min(s.row + (n || 1), i.getLength() - 1);
- t.start.column = i.getLine(s.row).length, t.end.column = i.getLine(o).length, t.end.row = o;
- var u = "";
- for (var a = s.row; a < o; a++) {
- var f = i.getLine(a + 1);
- u += " " + /^\s*(.*)$/.exec(f)[1] || ""
- }
- i.replace(t, u), e.moveCursorTo(s.row, s.column)
- }}, u: {fn: function (e, t, n, r) {
- n = parseInt(n || 1, 10);
- for (var i = 0; i < n; i++)e.undo();
- e.selection.clearSelection()
- }}, "ctrl-r": {fn: function (e, t, n, r) {
- n = parseInt(n || 1, 10);
- for (var i = 0; i < n; i++)e.redo();
- e.selection.clearSelection()
- }}, ":": {fn: function (e, t, n, r) {
- }}, "/": {fn: function (e, t, n, r) {
- }}, "?": {fn: function (e, t, n, r) {
- }}, ".": {fn: function (e, t, n, i) {
- r.onInsertReplaySequence = m.lastInsertCommands;
- var s = m.previous;
- s && m.exec(e, s.action, s.param)
- }}, "ctrl-x": {fn: function (e, t, n, r) {
- e.modifyNumber(-(n || 1))
- }}, "ctrl-a": {fn: function (e, t, n, r) {
- e.modifyNumber(n || 1)
- }}}, m = t.inputBuffer = {accepting: [a, f, l, c], currentCmd: null, currentCount: "", status: "", operator: null, motion: null, lastInsertCommands: [], push: function (e, t, n) {
- var r = !0;
- this.idle = !1;
- var u = this.waitingForParam;
- if (u)this.exec(e, u, t); else if (t === "0" && !this.currentCount.length || !t.match(/^\d+$/) || !this.isAccepting(a))if (!this.operator && this.isAccepting(f) && s[t])this.operator = {ch: t, count: this.getCount()}, this.currentCmd = f, this.accepting = [a, l, c], this.exec(e, {operator: this.operator}); else if (i[t] && this.isAccepting(l)) {
- this.currentCmd = l;
- var h = {operator: this.operator, motion: {ch: t, count: this.getCount()}};
- i[t].param ? this.waitForParam(h) : this.exec(e, h)
- } else if (o[t] && this.isAccepting(l))o[t].operator.count = this.getCount(), this.exec(e, o[t]); else if (v[t] && this.isAccepting(c)) {
- var p = {action: {fn: v[t].fn, count: this.getCount()}};
- v[t].param ? this.waitForParam(p) : this.exec(e, p), v[t].acceptsMotion && (this.idle = !1)
- } else this.operator ? this.exec(e, {operator: this.operator}, t) : (r = t.length == 1, this.reset()); else this.currentCount += t, this.currentCmd = a, this.accepting = [a, f, l, c];
- if (this.waitingForParam || this.motion || this.operator)this.status += t; else if (this.currentCount)this.status = this.currentCount; else {
- if (!this.status)return r;
- this.status = ""
- }
- return e._emit("changeStatus"), r
- }, waitForParam: function (e) {
- this.waitingForParam = e
- }, getCount: function () {
- var e = this.currentCount;
- return this.currentCount = "", e && parseInt(e, 10)
- }, exec: function (e, t, n) {
- var o = t.motion, u = t.operator, a = t.action;
- n || (n = t.param), u && (this.previous = {action: t, param: n});
- if (u && !e.selection.isEmpty()) {
- s[u.ch].selFn && (s[u.ch].selFn(e, e.getSelectionRange(), u.count, n), this.reset());
- return
- }
- if (!o && !a && u && n)s[u.ch].fn(e, null, u.count, n), this.reset(); else if (o) {
- var f = function (t) {
- t && typeof t == "function" && (o.count && !l.handlesCount ? p(t, o.count, [e, null, o.count, n]) : t(e, null, o.count, n))
- }, l = i[o.ch], c = l.sel;
- u ? c && p(function () {
- f(l.sel), s[u.ch].fn(e, e.getSelectionRange(), u.count, n)
- }, u.count || 1) : (r.onVisualMode || r.onVisualLineMode) && c ? f(l.sel) : f(l.nav), this.reset()
- } else a && (a.fn(e, e.getSelectionRange(), a.count, n), this.reset());
- y(e)
- }, isAccepting: function (e) {
- return this.accepting.indexOf(e) !== -1
- }, reset: function () {
- this.operator = null, this.motion = null, this.currentCount = "", this.status = "", this.accepting = [a, f, l, c], this.idle = !0, this.waitingForParam = null
- }};
- t.coreCommands = {start: {exec: function b(e) {
- r.insertMode(e), g(b)
- }}, startBeginning: {exec: function w(e) {
- e.navigateLineStart(), r.insertMode(e), g(w)
- }}, stop: {exec: function (t) {
- m.reset(), r.onVisualMode = !1, r.onVisualLineMode = !1, m.lastInsertCommands = r.normalMode(t)
- }}, append: {exec: function E(e) {
- var t = e.getCursorPosition(), n = e.session.getLine(t.row).length;
- n && e.navigateRight(), r.insertMode(e), g(E)
- }}, appendEnd: {exec: function S(e) {
- e.navigateLineEnd(), r.insertMode(e), g(S)
- }}};
- var y = t.onCursorMove = function (e, t) {
- if (r.currentMode === "insert" || y.running)return;
- if (!e.selection.isEmpty()) {
- y.running = !0;
- if (r.onVisualLineMode) {
- var n = e.selection.visualLineStart, i = e.getCursorPosition().row;
- if (n <= i) {
- var s = e.session.getLine(i);
- e.selection.clearSelection(), e.selection.moveCursorTo(n, 0), e.selection.selectTo(i, s.length)
- } else {
- var s = e.session.getLine(n);
- e.selection.clearSelection(), e.selection.moveCursorTo(n, s.length), e.selection.selectTo(i, 0)
- }
- }
- y.running = !1;
- return
- }
- t && (r.onVisualLineMode || r.onVisualMode) && (e.selection.clearSelection(), r.normalMode(e)), y.running = !0;
- var o = e.getCursorPosition(), u = e.session.getLine(o.row).length;
- u && o.column === u && e.navigateLeft(), y.running = !1
- }
-}), ace.define("ace/keyboard/vim/maps/util", ["require", "exports", "module", "ace/keyboard/vim/registers", "ace/lib/dom"], function (e, t, n) {
- var r = e("../registers"), i = e("../../../lib/dom");
- i.importCssString(".insert-mode .ace_cursor{ border-left: 2px solid #333333;}.ace_dark.insert-mode .ace_cursor{ border-left: 2px solid #eeeeee;}.normal-mode .ace_cursor{ border: 0!important; background-color: red; opacity: 0.5;}", "vimMode"), n.exports = {onVisualMode: !1, onVisualLineMode: !1, currentMode: "normal", noMode: function (e) {
- e.unsetStyle("insert-mode"), e.unsetStyle("normal-mode"), e.commands.recording && e.commands.toggleRecording(e), e.setOverwrite(!1)
- }, insertMode: function (e) {
- this.currentMode = "insert", e.setStyle("insert-mode"), e.unsetStyle("normal-mode"), e.setOverwrite(!1), e.keyBinding.$data.buffer = "", e.keyBinding.$data.state = "insertMode", this.onVisualMode = !1, this.onVisualLineMode = !1, this.onInsertReplaySequence ? (e.commands.macro = this.onInsertReplaySequence, e.commands.replay(e), this.onInsertReplaySequence = null, this.normalMode(e)) : (e._emit("changeStatus"), e.commands.recording || e.commands.toggleRecording(e))
- }, normalMode: function (e) {
- this.currentMode = "normal", e.unsetStyle("insert-mode"), e.setStyle("normal-mode"), e.clearSelection();
- var t;
- return e.getOverwrite() || (t = e.getCursorPosition(), t.column > 0 && e.navigateLeft()), e.setOverwrite(!0), e.keyBinding.$data.buffer = "", e.keyBinding.$data.state = "start", this.onVisualMode = !1, this.onVisualLineMode = !1, e._emit("changeStatus"), e.commands.recording ? (e.commands.toggleRecording(e), e.commands.macro) : []
- }, visualMode: function (e, t) {
- if (this.onVisualLineMode && t || this.onVisualMode && !t) {
- this.normalMode(e);
- return
- }
- e.setStyle("insert-mode"), e.unsetStyle("normal-mode"), e._emit("changeStatus"), t ? this.onVisualLineMode = !0 : (this.onVisualMode = !0, this.onVisualLineMode = !1)
- }, getRightNthChar: function (e, t, n, r) {
- var i = e.getSession().getLine(t.row), s = i.substr(t.column + 1).split(n);
- return r < s.length ? s.slice(0, r).join(n).length : null
- }, getLeftNthChar: function (e, t, n, r) {
- var i = e.getSession().getLine(t.row), s = i.substr(0, t.column).split(n);
- return r < s.length ? s.slice(-1 * r).join(n).length : null
- }, toRealChar: function (e) {
- return e.length === 1 ? e : /^shift-./.test(e) ? e[e.length - 1].toUpperCase() : ""
- }, copyLine: function (e) {
- var t = e.getCursorPosition();
- e.selection.clearSelection(), e.moveCursorTo(t.row, t.column), e.selection.selectLine(), r._default.isLine = !0, r._default.text = e.getCopyText().replace(/\n$/, ""), e.selection.clearSelection(), e.moveCursorTo(t.row, t.column)
- }}
-}), ace.define("ace/keyboard/vim/registers", ["require", "exports", "module"], function (e, t, n) {
- "never use strict";
- n.exports = {_default: {text: "", isLine: !1}}
-}), ace.define("ace/keyboard/vim/maps/motions", ["require", "exports", "module", "ace/keyboard/vim/maps/util", "ace/search", "ace/range"], function (e, t, n) {
- function s(e) {
- if (typeof e == "function") {
- var t = e;
- e = this
- } else var t = e.getPos;
- return e.nav = function (e, n, r, i) {
- var s = t(e, n, r, i, !1);
- if (!s)return;
- e.clearSelection(), e.moveCursorTo(s.row, s.column)
- }, e.sel = function (e, n, r, i) {
- var s = t(e, n, r, i, !0);
- if (!s)return;
- e.selection.selectTo(s.row, s.column)
- }, e
- }
-
- function h(e, t, n) {
- return c.$options.needle = t, c.$options.backwards = n == -1, c.find(e.session)
- }
-
- var r = e("./util"), i = function (e, t) {
- var n = e.renderer.getScrollTopRow(), r = e.getCursorPosition().row, i = r - n;
- t && t.call(e), e.renderer.scrollToRow(e.getCursorPosition().row - i)
- }, o = /[\s.\/\\()\"'-:,.;<>~!@#$%^&*|+=\[\]{}`~?]/, u = /[.\/\\()\"'-:,.;<>~!@#$%^&*|+=\[\]{}`~?]/, a = /\s/, f = function (e, t) {
- var n = e.selection;
- this.range = n.getRange(), t = t || n.selectionLead, this.row = t.row, this.col = t.column;
- var r = e.session.getLine(this.row), i = e.session.getLength();
- this.ch = r[this.col] || "\n", this.skippedLines = 0, this.next = function () {
- return this.ch = r[++this.col] || this.handleNewLine(1), this.ch
- }, this.prev = function () {
- return this.ch = r[--this.col] || this.handleNewLine(-1), this.ch
- }, this.peek = function (t) {
- var n = r[this.col + t];
- return n ? n : t == -1 ? "\n" : this.col == r.length - 1 ? "\n" : e.session.getLine(this.row + 1)[0] || "\n"
- }, this.handleNewLine = function (t) {
- if (t == 1)return this.col == r.length ? "\n" : this.row == i - 1 ? "" : (this.col = 0, this.row++, r = e.session.getLine(this.row), this.skippedLines++, r[0] || "\n");
- if (t == -1)return this.row === 0 ? "" : (this.row--, r = e.session.getLine(this.row), this.col = r.length, this.skippedLines--, "\n")
- }, this.debug = function () {
- console.log(r.substring(0, this.col) + "|" + this.ch + "'" + this.col + "'" + r.substr(this.col + 1))
- }
- }, l = e("../../../search").Search, c = new l, p = e("../../../range").Range;
- n.exports = {w: new s(function (e) {
- var t = new f(e);
- if (t.ch && u.test(t.ch))while (t.ch && u.test(t.ch))t.next(); else while (t.ch && !o.test(t.ch))t.next();
- while (t.ch && a.test(t.ch) && t.skippedLines < 2)t.next();
- return t.skippedLines == 2 && t.prev(), {column: t.col, row: t.row}
- }), W: new s(function (e) {
- var t = new f(e);
- while (t.ch && (!a.test(t.ch) || !!a.test(t.peek(1))) && t.skippedLines < 2)t.next();
- return t.skippedLines == 2 ? t.prev() : t.next(), {column: t.col, row: t.row}
- }), b: new s(function (e) {
- var t = new f(e);
- t.prev();
- while (t.ch && a.test(t.ch) && t.skippedLines > -2)t.prev();
- if (t.ch && u.test(t.ch))while (t.ch && u.test(t.ch))t.prev(); else while (t.ch && !o.test(t.ch))t.prev();
- return t.ch && t.next(), {column: t.col, row: t.row}
- }), B: new s(function (e) {
- var t = new f(e);
- t.prev();
- while (t.ch && (!!a.test(t.ch) || !a.test(t.peek(-1))) && t.skippedLines > -2)t.prev();
- return t.skippedLines == -2 && t.next(), {column: t.col, row: t.row}
- }), e: new s(function (e) {
- var t = new f(e);
- t.next();
- while (t.ch && a.test(t.ch))t.next();
- if (t.ch && u.test(t.ch))while (t.ch && u.test(t.ch))t.next(); else while (t.ch && !o.test(t.ch))t.next();
- return t.ch && t.prev(), {column: t.col, row: t.row}
- }), E: new s(function (e) {
- var t = new f(e);
- t.next();
- while (t.ch && (!!a.test(t.ch) || !a.test(t.peek(1))))t.next();
- return{column: t.col, row: t.row}
- }), l: {nav: function (e) {
- var t = e.getCursorPosition(), n = t.column, r = e.session.getLine(t.row).length;
- r && n !== r && e.navigateRight()
- }, sel: function (e) {
- var t = e.getCursorPosition(), n = t.column, r = e.session.getLine(t.row).length;
- r && n !== r && e.selection.selectRight()
- }}, h: {nav: function (e) {
- var t = e.getCursorPosition();
- t.column > 0 && e.navigateLeft()
- }, sel: function (e) {
- var t = e.getCursorPosition();
- t.column > 0 && e.selection.selectLeft()
- }}, H: {nav: function (e) {
- var t = e.renderer.getScrollTopRow();
- e.moveCursorTo(t)
- }, sel: function (e) {
- var t = e.renderer.getScrollTopRow();
- e.selection.selectTo(t)
- }}, M: {nav: function (e) {
- var t = e.renderer.getScrollTopRow(), n = e.renderer.getScrollBottomRow(), r = t + (n - t) / 2;
- e.moveCursorTo(r)
- }, sel: function (e) {
- var t = e.renderer.getScrollTopRow(), n = e.renderer.getScrollBottomRow(), r = t + (n - t) / 2;
- e.selection.selectTo(r)
- }}, L: {nav: function (e) {
- var t = e.renderer.getScrollBottomRow();
- e.moveCursorTo(t)
- }, sel: function (e) {
- var t = e.renderer.getScrollBottomRow();
- e.selection.selectTo(t)
- }}, k: {nav: function (e) {
- e.navigateUp()
- }, sel: function (e) {
- e.selection.selectUp()
- }}, j: {nav: function (e) {
- e.navigateDown()
- }, sel: function (e) {
- e.selection.selectDown()
- }}, i: {param: !0, sel: function (e, t, n, r) {
- switch (r) {
- case"w":
- e.selection.selectWord();
- break;
- case"W":
- e.selection.selectAWord();
- break;
- case"(":
- case"{":
- case"[":
- var i = e.getCursorPosition(), s = e.session.$findClosingBracket(r, i, /paren/);
- if (!s)return;
- var o = e.session.$findOpeningBracket(e.session.$brackets[r], i, /paren/);
- if (!o)return;
- o.column++, e.selection.setSelectionRange(p.fromPoints(o, s));
- break;
- case"'":
- case'"':
- case"/":
- var s = h(e, r, 1);
- if (!s)return;
- var o = h(e, r, -1);
- if (!o)return;
- e.selection.setSelectionRange(p.fromPoints(o.end, s.start))
- }
- }}, a: {param: !0, sel: function (e, t, n, r) {
- switch (r) {
- case"w":
- e.selection.selectAWord();
- break;
- case"W":
- e.selection.selectAWord();
- break;
- case"(":
- case"{":
- case"[":
- var i = e.getCursorPosition(), s = e.session.$findClosingBracket(r, i, /paren/);
- if (!s)return;
- var o = e.session.$findOpeningBracket(e.session.$brackets[r], i, /paren/);
- if (!o)return;
- s.column++, e.selection.setSelectionRange(p.fromPoints(o, s));
- break;
- case"'":
- case'"':
- case"/":
- var s = h(e, r, 1);
- if (!s)return;
- var o = h(e, r, -1);
- if (!o)return;
- s.column++, e.selection.setSelectionRange(p.fromPoints(o.start, s.end))
- }
- }}, f: new s({param: !0, handlesCount: !0, getPos: function (e, t, n, i, s) {
- var o = e.getCursorPosition(), u = r.getRightNthChar(e, o, i, n || 1);
- if (typeof u == "number")return o.column += u + (s ? 2 : 1), o
- }}), F: new s({param: !0, handlesCount: !0, getPos: function (e, t, n, i, s) {
- var o = e.getCursorPosition(), u = r.getLeftNthChar(e, o, i, n || 1);
- if (typeof u == "number")return o.column -= u + 1, o
- }}), t: new s({param: !0, handlesCount: !0, getPos: function (e, t, n, i, s) {
- var o = e.getCursorPosition(), u = r.getRightNthChar(e, o, i, n || 1);
- if (typeof u == "number")return o.column += u + (s ? 1 : 0), o
- }}), T: new s({param: !0, handlesCount: !0, getPos: function (e, t, n, i, s) {
- var o = e.getCursorPosition(), u = r.getLeftNthChar(e, o, i, n || 1);
- if (typeof u == "number")return o.column -= u, o
- }}), "^": {nav: function (e) {
- e.navigateLineStart()
- }, sel: function (e) {
- e.selection.selectLineStart()
- }}, $: {nav: function (e) {
- e.navigateLineEnd()
- }, sel: function (e) {
- e.selection.selectLineEnd()
- }}, 0: new s(function (e) {
- return{row: e.selection.lead.row, column: 0}
- }), G: {nav: function (e, t, n, r) {
- !n && n !== 0 && (n = e.session.getLength()), e.gotoLine(n)
- }, sel: function (e, t, n, r) {
- !n && n !== 0 && (n = e.session.getLength()), e.selection.selectTo(n, 0)
- }}, g: {param: !0, nav: function (e, t, n, r) {
- switch (r) {
- case"m":
- console.log("Middle line");
- break;
- case"e":
- console.log("End of prev word");
- break;
- case"g":
- e.gotoLine(n || 0);
- case"u":
- e.gotoLine(n || 0);
- case"U":
- e.gotoLine(n || 0)
- }
- }, sel: function (e, t, n, r) {
- switch (r) {
- case"m":
- console.log("Middle line");
- break;
- case"e":
- console.log("End of prev word");
- break;
- case"g":
- e.selection.selectTo(n || 0, 0)
- }
- }}, o: {nav: function (e, t, n, i) {
- n = n || 1;
- var s = "";
- while (0 < n--)s += "\n";
- s.length && (e.navigateLineEnd(), e.insert(s), r.insertMode(e))
- }}, O: {nav: function (e, t, n, i) {
- var s = e.getCursorPosition().row;
- n = n || 1;
- var o = "";
- while (0 < n--)o += "\n";
- o.length && (s > 0 ? (e.navigateUp(), e.navigateLineEnd(), e.insert(o)) : (e.session.insert({row: 0, column: 0}, o), e.navigateUp()), r.insertMode(e))
- }}, "%": new s(function (e) {
- var t = /[\[\]{}()]/g, n = e.getCursorPosition(), r = e.session.getLine(n.row)[n.column];
- if (!t.test(r)) {
- var i = h(e, t);
- if (!i)return;
- n = i.start
- }
- var s = e.session.findMatchingBracket({row: n.row, column: n.column + 1});
- return s
- }), "{": new s(function (e) {
- var t = e.session, n = t.selection.lead.row;
- while (n > 0 && !/\S/.test(t.getLine(n)))n--;
- while (/\S/.test(t.getLine(n)))n--;
- return{column: 0, row: n}
- }), "}": new s(function (e) {
- var t = e.session, n = t.getLength(), r = t.selection.lead.row;
- while (r < n && !/\S/.test(t.getLine(r)))r++;
- while (/\S/.test(t.getLine(r)))r++;
- return{column: 0, row: r}
- }), "ctrl-d": {nav: function (e, t, n, r) {
- e.selection.clearSelection(), i(e, e.gotoPageDown)
- }, sel: function (e, t, n, r) {
- i(e, e.selectPageDown)
- }}, "ctrl-u": {nav: function (e, t, n, r) {
- e.selection.clearSelection(), i(e, e.gotoPageUp)
- }, sel: function (e, t, n, r) {
- i(e, e.selectPageUp)
- }}, "`": new s({param: !0, handlesCount: !0, getPos: function (e, t, n, r, i) {
- var s = e.session, o = s.vimMarkers && s.vimMarkers[r];
- if (o)return o.getPosition()
- }}), "'": new s({param: !0, handlesCount: !0, getPos: function (e, t, n, r, i) {
- var s = e.session, o = s.vimMarkers && s.vimMarkers[r];
- if (o) {
- var u = o.getPosition(), a = e.session.getLine(u.row);
- return u.column = a.search(/\S/), u.column == -1 && (u.column = a.length), u
- }
- }})}, n.exports.backspace = n.exports.left = n.exports.h, n.exports.right = n.exports.l, n.exports.up = n.exports.k, n.exports.down = n.exports.j, n.exports.pagedown = n.exports["ctrl-d"], n.exports.pageup = n.exports["ctrl-u"]
-}), ace.define("ace/keyboard/vim/maps/operators", ["require", "exports", "module", "ace/keyboard/vim/maps/util", "ace/keyboard/vim/registers"], function (e, t, n) {
- "never use strict";
- var r = e("./util"), i = e("../registers");
- n.exports = {d: {selFn: function (e, t, n, s) {
- i._default.text = e.getCopyText(), i._default.isLine = r.onVisualLineMode, r.onVisualLineMode ? e.removeLines() : e.session.remove(t), r.normalMode(e)
- }, fn: function (e, t, n, r) {
- n = n || 1;
- switch (r) {
- case"d":
- i._default.text = "", i._default.isLine = !0;
- for (var s = 0; s < n; s++) {
- e.selection.selectLine(), i._default.text += e.getCopyText();
- var o = e.getSelectionRange();
- if (!o.isMultiLine()) {
- lastLineReached = !0;
- var u = o.start.row - 1, a = e.session.getLine(u).length;
- o.setStart(u, a), e.session.remove(o), e.selection.clearSelection();
- break
- }
- e.session.remove(o), e.selection.clearSelection()
- }
- i._default.text = i._default.text.replace(/\n$/, "");
- break;
- default:
- t && (e.selection.setSelectionRange(t), i._default.text = e.getCopyText(), i._default.isLine = !1, e.session.remove(t), e.selection.clearSelection())
- }
- }}, c: {selFn: function (e, t, n, i) {
- e.session.remove(t), r.insertMode(e)
- }, fn: function (e, t, n, i) {
- n = n || 1;
- switch (i) {
- case"c":
- for (var s = 0; s < n; s++)e.removeLines(), r.insertMode(e);
- break;
- default:
- t && (e.session.remove(t), r.insertMode(e))
- }
- }}, y: {selFn: function (e, t, n, s) {
- i._default.text = e.getCopyText(), i._default.isLine = r.onVisualLineMode, e.selection.clearSelection(), r.normalMode(e)
- }, fn: function (e, t, n, r) {
- n = n || 1;
- switch (r) {
- case"y":
- var s = e.getCursorPosition();
- e.selection.selectLine();
- for (var o = 0; o < n - 1; o++)e.selection.moveCursorDown();
- i._default.text = e.getCopyText().replace(/\n$/, ""), e.selection.clearSelection(), i._default.isLine = !0, e.moveCursorToPosition(s);
- break;
- default:
- if (t) {
- var s = e.getCursorPosition();
- e.selection.setSelectionRange(t), i._default.text = e.getCopyText(), i._default.isLine = !1, e.selection.clearSelection(), e.moveCursorTo(s.row, s.column)
- }
- }
- }}, ">": {selFn: function (e, t, n, i) {
- n = n || 1;
- for (var s = 0; s < n; s++)e.indent();
- r.normalMode(e)
- }, fn: function (e, t, n, r) {
- n = parseInt(n || 1, 10);
- switch (r) {
- case">":
- var i = e.getCursorPosition();
- e.selection.selectLine();
- for (var s = 0; s < n - 1; s++)e.selection.moveCursorDown();
- e.indent(), e.selection.clearSelection(), e.moveCursorToPosition(i), e.navigateLineEnd(), e.navigateLineStart()
- }
- }}, "<": {selFn: function (e, t, n, i) {
- n = n || 1;
- for (var s = 0; s < n; s++)e.blockOutdent();
- r.normalMode(e)
- }, fn: function (e, t, n, r) {
- n = n || 1;
- switch (r) {
- case"<":
- var i = e.getCursorPosition();
- e.selection.selectLine();
- for (var s = 0; s < n - 1; s++)e.selection.moveCursorDown();
- e.blockOutdent(), e.selection.clearSelection(), e.moveCursorToPosition(i), e.navigateLineEnd(), e.navigateLineStart()
- }
- }}}
-}), "use strict", ace.define("ace/keyboard/vim/maps/aliases", ["require", "exports", "module"], function (e, t, n) {
- n.exports = {x: {operator: {ch: "d", count: 1}, motion: {ch: "l", count: 1}}, X: {operator: {ch: "d", count: 1}, motion: {ch: "h", count: 1}}, D: {operator: {ch: "d", count: 1}, motion: {ch: "$", count: 1}}, C: {operator: {ch: "c", count: 1}, motion: {ch: "$", count: 1}}, s: {operator: {ch: "c", count: 1}, motion: {ch: "l", count: 1}}, S: {operator: {ch: "c", count: 1}, param: "c"}}
-})
\ No newline at end of file
diff --git a/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/mode-abap.js b/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/mode-abap.js
deleted file mode 100644
index ce1748a..0000000
--- a/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/mode-abap.js
+++ /dev/null
@@ -1,78 +0,0 @@
-ace.define("ace/mode/abap", ["require", "exports", "module", "ace/tokenizer", "ace/mode/abap_highlight_rules", "ace/mode/folding/coffee", "ace/range", "ace/mode/text", "ace/lib/oop"], function (e, t, n) {
- function f() {
- this.$tokenizer = new r((new i).getRules(), "i"), this.foldingRules = new s
- }
-
- var r = e("../tokenizer").Tokenizer, i = e("./abap_highlight_rules").AbapHighlightRules, s = e("./folding/coffee").FoldMode, o = e("../range").Range, u = e("./text").Mode, a = e("../lib/oop");
- a.inherits(f, u), function () {
- this.getNextLineIndent = function (e, t, n) {
- var r = this.$getIndent(t);
- return r
- }, this.toggleCommentLines = function (e, t, n, r) {
- var i = new o(0, 0, 0, 0);
- for (var s = n; s <= r; ++s) {
- var u = t.getLine(s);
- if (hereComment.test(u))continue;
- commentLine.test(u) ? u = u.replace(commentLine, "$1") : u = u.replace(indentation, "$"), i.end.row = i.start.row = s, i.end.column = u.length + 1, t.replace(i, u)
- }
- }
- }.call(f.prototype), t.Mode = f
-}), ace.define("ace/mode/abap_highlight_rules", ["require", "exports", "module", "ace/lib/oop", "ace/mode/text_highlight_rules"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("./text_highlight_rules").TextHighlightRules, s = function () {
- var e = this.createKeywordMapper({"variable.language": "this", keyword: "ADD ALIAS ALIASES ASSERT ASSIGN ASSIGNING AT BACK CALL CASE CATCH CHECK CLASS CLEAR CLOSE CNT COLLECT COMMIT COMMUNICATION COMPUTE CONCATENATE CONDENSE CONSTANTS CONTINUE CONTROLS CONVERT CREATE CURRENCY DATA DEFINE DEFINITION DEFERRED DELETE DESCRIBE DETAIL DIVIDE DO ELSE ELSEIF ENDAT ENDCASE ENDCLASS ENDDO ENDEXEC ENDFORM ENDFUNCTION ENDIF ENDIFEND ENDINTERFACE ENDLOOP ENDMETHOD ENDMODULE ENDON ENDPROVIDE ENDSELECT ENDTRY ENDWHILE EVENT EVENTS EXEC EXIT EXPORT EXPORTING EXTRACT FETCH FIELDS FORM FORMAT FREE FROM FUNCTION GENERATE GET HIDE IF IMPORT IMPORTING INDEX INFOTYPES INITIALIZATION INTERFACE INTERFACES INPUT INSERT IMPLEMENTATION LEAVE LIKE LINE LOAD LOCAL LOOP MESSAGE METHOD METHODS MODIFY MODULE MOVE MULTIPLY ON OVERLAY OPTIONAL OTHERS PACK PARAMETERS PERFORM POSITION PROGRAM PROVIDE PUT RAISE RANGES READ RECEIVE RECEIVING REDEFINITION REFERENCE REFRESH REJECT REPLACE REPORT RESERVE RESTORE RETURNING ROLLBACK SCAN SCROLL SEARCH SELECT SET SHIFT SKIP SORT SORTED SPLIT STANDARD STATICS STEP STOP SUBMIT SUBTRACT SUM SUMMARY SUPPRESS TABLES TIMES TRANSFER TRANSLATE TRY TYPE TYPES UNASSIGN ULINE UNPACK UPDATE WHEN WHILE WINDOW WRITE OCCURS STRUCTURE OBJECT PROPERTY CASTING APPEND RAISING VALUE COLOR CHANGING EXCEPTION EXCEPTIONS DEFAULT CHECKBOX COMMENT ID NUMBER FOR TITLE OUTPUT WITH EXIT USING INTO WHERE GROUP BY HAVING ORDER BY SINGLE APPENDING CORRESPONDING FIELDS OF TABLE LEFT RIGHT OUTER INNER JOIN AS CLIENT SPECIFIED BYPASSING BUFFER UP TO ROWS CONNECTING EQ NE LT LE GT GE NOT AND OR XOR IN LIKE BETWEEN", "constant.language": "TRUE FALSE NULL SPACE", "support.type": "c n i p f d t x string xstring decfloat16 decfloat34", "keyword.operator": "abs sign ceil floor trunc frac acos asin atan cos sin tan abapOperator cosh sinh tanh exp log log10 sqrt strlen xstrlen charlen numofchar dbmaxlen lines"}, "text", !0, " "), t = "WITH\\W+(?:HEADER\\W+LINE|FRAME|KEY)|NO\\W+STANDARD\\W+PAGE\\W+HEADING|EXIT\\W+FROM\\W+STEP\\W+LOOP|BEGIN\\W+OF\\W+(?:BLOCK|LINE)|BEGIN\\W+OF|END\\W+OF\\W+(?:BLOCK|LINE)|END\\W+OF|NO\\W+INTERVALS|RESPECTING\\W+BLANKS|SEPARATED\\W+BY|USING\\W+(?:EDIT\\W+MASK)|WHERE\\W+(?:LINE)|RADIOBUTTON\\W+GROUP|REF\\W+TO|(?:PUBLIC|PRIVATE|PROTECTED)(?:\\W+SECTION)?|DELETING\\W+(?:TRAILING|LEADING)(?:ALL\\W+OCCURRENCES)|(?:FIRST|LAST)\\W+OCCURRENCE|INHERITING\\W+FROM|LINE-COUNT|ADD-CORRESPONDING|AUTHORITY-CHECK|BREAK-POINT|CLASS-DATA|CLASS-METHODS|CLASS-METHOD|DIVIDE-CORRESPONDING|EDITOR-CALL|END-OF-DEFINITION|END-OF-PAGE|END-OF-SELECTION|FIELD-GROUPS|FIELD-SYMBOLS|FUNCTION-POOL|MOVE-CORRESPONDING|MULTIPLY-CORRESPONDING|NEW-LINE|NEW-PAGE|NEW-SECTION|PRINT-CONTROL|RP-PROVIDE-FROM-LAST|SELECT-OPTIONS|SELECTION-SCREEN|START-OF-SELECTION|SUBTRACT-CORRESPONDING|SYNTAX-CHECK|SYNTAX-TRACE|TOP-OF-PAGE|TYPE-POOL|TYPE-POOLS|LINE-SIZE|LINE-COUNT|MESSAGE-ID|DISPLAY-MODE|READ(?:-ONLY)?|IS\\W+(?:NOT\\W+)?(?:ASSIGNED|BOUND|INITIAL|SUPPLIED)";
- this.$rules = {start: [
- {token: "string", regex: "`", next: "string"},
- {token: "string", regex: "'", next: "qstring"},
- {token: "doc.comment", regex: /^\*.+/},
- {token: "comment", regex: /".+$/},
- {token: "invalid", regex: "\\.{2,}"},
- {token: "keyword.operator", regex: /\W[\-+\%=<>*]\W|\*\*|[~:,\.&$]|->*?|=>/},
- {token: "paren.lparen", regex: "[\\[({]"},
- {token: "paren.rparen", regex: "[\\])}]"},
- {token: "constant.numeric", regex: "[+-]?\\d+\\b"},
- {token: "variable.parameter", regex: /sy|pa?\d\d\d\d\|t\d\d\d\.|innnn/},
- {token: "keyword", regex: t},
- {token: "variable.parameter", regex: /\w+-\w+(?:-\w+)*/},
- {token: e, regex: "\\b\\w+\\b"}
- ], qstring: [
- {token: "constant.language.escape", regex: "''"},
- {token: "string", regex: "'", next: "start"},
- {token: "string", regex: ".|w+"}
- ], string: [
- {token: "constant.language.escape", regex: "``"},
- {token: "string", regex: "`", next: "start"},
- {token: "string", regex: ".|w+"}
- ]}
- };
- r.inherits(s, i), t.AbapHighlightRules = s
-}), ace.define("ace/mode/folding/coffee", ["require", "exports", "module", "ace/lib/oop", "ace/mode/folding/fold_mode", "ace/range"], function (e, t, n) {
- var r = e("../../lib/oop"), i = e("./fold_mode").FoldMode, s = e("../../range").Range, o = t.FoldMode = function () {
- };
- r.inherits(o, i), function () {
- this.getFoldWidgetRange = function (e, t, n) {
- var r = this.indentationBlock(e, n);
- if (r)return r;
- var i = /\S/, o = e.getLine(n), u = o.search(i);
- if (u == -1 || o[u] != "#")return;
- var a = o.length, f = e.getLength(), l = n, c = n;
- while (++n < f) {
- o = e.getLine(n);
- var h = o.search(i);
- if (h == -1)continue;
- if (o[h] != "#")break;
- c = n
- }
- if (c > l) {
- var p = e.getLine(c).length;
- return new s(l, a, c, p)
- }
- }, this.getFoldWidget = function (e, t, n) {
- var r = e.getLine(n), i = r.search(/\S/), s = e.getLine(n + 1), o = e.getLine(n - 1), u = o.search(/\S/), a = s.search(/\S/);
- if (i == -1)return e.foldWidgets[n - 1] = u != -1 && u < a ? "start" : "", "";
- if (u == -1) {
- if (i == a && r[i] == "#" && s[i] == "#")return e.foldWidgets[n - 1] = "", e.foldWidgets[n + 1] = "", "start"
- } else if (u == i && r[i] == "#" && o[i] == "#" && e.getLine(n - 2).search(/\S/) == -1)return e.foldWidgets[n - 1] = "start", e.foldWidgets[n + 1] = "", "";
- return u != -1 && u < i ? e.foldWidgets[n - 1] = "start" : e.foldWidgets[n - 1] = "", i < a ? "start" : ""
- }
- }.call(o.prototype)
-})
\ No newline at end of file
diff --git a/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/mode-asciidoc.js b/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/mode-asciidoc.js
deleted file mode 100644
index 2dc161d..0000000
--- a/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/mode-asciidoc.js
+++ /dev/null
@@ -1,202 +0,0 @@
-ace.define("ace/mode/asciidoc", ["require", "exports", "module", "ace/lib/oop", "ace/mode/text", "ace/tokenizer", "ace/mode/asciidoc_highlight_rules", "ace/mode/folding/asciidoc"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("./text").Mode, s = e("../tokenizer").Tokenizer, o = e("./asciidoc_highlight_rules").AsciidocHighlightRules, u = e("./folding/asciidoc").FoldMode, a = function () {
- var e = new o;
- this.$tokenizer = new s(e.getRules()), this.foldingRules = new u
- };
- r.inherits(a, i), function () {
- this.getNextLineIndent = function (e, t, n) {
- if (e == "listblock") {
- var r = /^((?:.+)?)([-+*][ ]+)/.exec(t);
- return r ? (new Array(r[1].length + 1)).join(" ") + r[2] : ""
- }
- return this.$getIndent(t)
- }
- }.call(a.prototype), t.Mode = a
-}), ace.define("ace/mode/asciidoc_highlight_rules", ["require", "exports", "module", "ace/lib/oop", "ace/mode/text_highlight_rules"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("./text_highlight_rules").TextHighlightRules, s = function () {
- function t(e) {
- var t = /\w/.test(e) ? "\\b" : "(?:\\B|^)";
- return t + e + "[^" + e + "].*?" + e + "(?![\\w*])"
- }
-
- var e = "[a-zA-Z¡-￿]+\\b";
- this.$rules = {start: [
- {token: "empty", regex: /$/},
- {token: "literal", regex: /^\.{4,}\s*$/, next: "listingBlock"},
- {token: "literal", regex: /^-{4,}\s*$/, next: "literalBlock"},
- {token: "string", regex: /^\+{4,}\s*$/, next: "passthroughBlock"},
- {token: "keyword", regex: /^={4,}\s*$/},
- {token: "text", regex: /^\s*$/},
- {token: "empty", regex: "", next: "dissallowDelimitedBlock"}
- ], dissallowDelimitedBlock: [
- {include: "paragraphEnd"},
- {token: "comment", regex: "^//.+$"},
- {token: "keyword", regex: "^(?:NOTE|TIP|IMPORTANT|WARNING|CAUTION):"},
- {include: "listStart"},
- {token: "literal", regex: /^\s+.+$/, next: "indentedBlock"},
- {token: "empty", regex: "", next: "text"}
- ], paragraphEnd: [
- {token: "doc.comment", regex: /^\/{4,}\s*$/, next: "commentBlock"},
- {token: "tableBlock", regex: /^\s*[|!]=+\s*$/, next: "tableBlock"},
- {token: "keyword", regex: /^(?:--|''')\s*$/, next: "start"},
- {token: "option", regex: /^\[.*\]\s*$/, next: "start"},
- {token: "pageBreak", regex: /^>{3,}$/, next: "start"},
- {token: "literal", regex: /^\.{4,}\s*$/, next: "listingBlock"},
- {token: "titleUnderline", regex: /^(?:={2,}|-{2,}|~{2,}|\^{2,}|\+{2,})\s*$/, next: "start"},
- {token: "singleLineTitle", regex: /^={1,5}\s+\S.*$/, next: "start"},
- {token: "otherBlock", regex: /^(?:\*{2,}|_{2,})\s*$/, next: "start"},
- {token: "optionalTitle", regex: /^\.[^.\s].+$/, next: "start"}
- ], listStart: [
- {token: "keyword", regex: /^\s*(?:\d+\.|[a-zA-Z]\.|[ixvmIXVM]+\)|\*{1,5}|-|\.{1,5})\s/, next: "listText"},
- {token: "meta.tag", regex: /^.+(?::{2,4}|;;)(?: |$)/, next: "listText"},
- {token: "support.function.list.callout", regex: /^(?:<\d+>|\d+>|>) /, next: "text"},
- {token: "keyword", regex: /^\+\s*$/, next: "start"}
- ], text: [
- {token: ["link", "variable.language"], regex: /((?:https?:\/\/|ftp:\/\/|file:\/\/|mailto:|callto:)[^\s\[]+)(\[.*?\])/},
- {token: "link", regex: /(?:https?:\/\/|ftp:\/\/|file:\/\/|mailto:|callto:)[^\s\[]+/},
- {token: "link", regex: /\b[\w\.\/\-]+@[\w\.\/\-]+\b/},
- {include: "macros"},
- {include: "paragraphEnd"},
- {token: "literal", regex: /\+{3,}/, next: "smallPassthrough"},
- {token: "escape", regex: /\((?:C|TM|R)\)|\.{3}|->|<-|=>|<=|(?:\d+|x[a-fA-F\d]+);|(?: |^)--(?=\s+\S)/},
- {token: "escape", regex: /\\[_*'`+#]|\\{2}[_*'`+#]{2}/},
- {token: "keyword", regex: /\s\+$/},
- {token: "text", regex: e},
- {token: ["keyword", "string", "keyword"], regex: /(<<[\w\d\-$]+,)(.*?)(>>|$)/},
- {token: "keyword", regex: /<<[\w\d\-$]+,?|>>/},
- {token: "constant.character", regex: /\({2,3}.*?\){2,3}/},
- {token: "keyword", regex: /\[\[.+?\]\]/},
- {token: "support", regex: /^\[{3}[\w\d =\-]+\]{3}/},
- {include: "quotes"},
- {token: "empty", regex: /^\s*$/, next: "start"}
- ], listText: [
- {include: "listStart"},
- {include: "text"}
- ], indentedBlock: [
- {token: "literal", regex: /^[\s\w].+$/, next: "indentedBlock"},
- {token: "literal", regex: "", next: "start"}
- ], listingBlock: [
- {token: "literal", regex: /^\.{4,}\s*$/, next: "dissallowDelimitedBlock"},
- {token: "constant.numeric", regex: "<\\d+>"},
- {token: "literal", regex: "[^<]+"},
- {token: "literal", regex: "<"}
- ], literalBlock: [
- {token: "literal", regex: /^-{4,}\s*$/, next: "dissallowDelimitedBlock"},
- {token: "constant.numeric", regex: "<\\d+>"},
- {token: "literal", regex: "[^<]+"},
- {token: "literal", regex: "<"}
- ], passthroughBlock: [
- {token: "literal", regex: /^\+{4,}\s*$/, next: "dissallowDelimitedBlock"},
- {token: "literal", regex: e + "|\\d+"},
- {include: "macros"},
- {token: "literal", regex: "."}
- ], smallPassthrough: [
- {token: "literal", regex: /[+]{3,}/, next: "dissallowDelimitedBlock"},
- {token: "literal", regex: /^\s*$/, next: "dissallowDelimitedBlock"},
- {token: "literal", regex: e + "|\\d+"},
- {include: "macros"}
- ], commentBlock: [
- {token: "doc.comment", regex: /^\/{4,}\s*$/, next: "dissallowDelimitedBlock"},
- {token: "doc.comment", regex: "^.*$"}
- ], tableBlock: [
- {token: "tableBlock", regex: /^\s*\|={3,}\s*$/, next: "dissallowDelimitedBlock"},
- {token: "tableBlock", regex: /^\s*!={3,}\s*$/, next: "innerTableBlock"},
- {token: "tableBlock", regex: /\|/},
- {include: "text", noEscape: !0}
- ], innerTableBlock: [
- {token: "tableBlock", regex: /^\s*!={3,}\s*$/, next: "tableBlock"},
- {token: "tableBlock", regex: /^\s*|={3,}\s*$/, next: "dissallowDelimitedBlock"},
- {token: "tableBlock", regex: /\!/}
- ], macros: [
- {token: "macro", regex: /{[\w\-$]+}/},
- {token: ["text", "string", "text", "constant.character", "text"], regex: /({)([\w\-$]+)(:)?(.+)?(})/},
- {token: ["text", "markup.list.macro", "keyword", "string"], regex: /(\w+)(footnote(?:ref)?::?)([^\s\[]+)?(\[.*?\])?/},
- {token: ["markup.list.macro", "keyword", "string"], regex: /([a-zA-Z\-][\w\.\/\-]*::?)([^\s\[]+)(\[.*?\])?/},
- {token: ["markup.list.macro", "keyword"], regex: /([a-zA-Z\-][\w\.\/\-]+::?)(\[.*?\])/},
- {token: "keyword", regex: /^:.+?:(?= |$)/}
- ], quotes: [
- {token: "string.italic", regex: /__[^_\s].*?__/},
- {token: "string.italic", regex: t("_")},
- {token: "keyword.bold", regex: /\*\*[^*\s].*?\*\*/},
- {token: "keyword.bold", regex: t("\\*")},
- {token: "literal", regex: t("\\+")},
- {token: "literal", regex: /\+\+[^+\s].*?\+\+/},
- {token: "literal", regex: /\$\$.+?\$\$/},
- {token: "literal", regex: t("`")},
- {token: "keyword", regex: t("^")},
- {token: "keyword", regex: t("~")},
- {token: "keyword", regex: /##?/},
- {token: "keyword", regex: /(?:\B|^)``|\b''/}
- ]};
- var n = {macro: "constant.character", tableBlock: "doc.comment", titleUnderline: "markup.heading", singleLineTitle: "markup.heading", pageBreak: "string", option: "string.regexp", otherBlock: "markup.list", literal: "support.function", optionalTitle: "constant.numeric", escape: "constant.language.escape", link: "markup.underline.list"};
- for (var r in this.$rules) {
- var i = this.$rules[r];
- for (var s = i.length; s--;) {
- var o = i[s];
- if (o.include || typeof o == "string") {
- var u = [s, 1].concat(this.$rules[o.include || o]);
- o.noEscape && (u = u.filter(function (e) {
- return!e.next
- })), i.splice.apply(i, u)
- } else o.token in n && (o.token = n[o.token])
- }
- }
- };
- r.inherits(s, i), t.AsciidocHighlightRules = s
-}), ace.define("ace/mode/folding/asciidoc", ["require", "exports", "module", "ace/lib/oop", "ace/mode/folding/fold_mode", "ace/range"], function (e, t, n) {
- var r = e("../../lib/oop"), i = e("./fold_mode").FoldMode, s = e("../../range").Range, o = t.FoldMode = function () {
- };
- r.inherits(o, i), function () {
- this.foldingStartMarker = /^(?:\|={10,}|[\.\/=\-~^+]{4,}\s*$|={1,5} )/, this.singleLineHeadingRe = /^={1,5}(?=\s+\S)/, this.getFoldWidget = function (e, t, n) {
- var r = e.getLine(n);
- return this.foldingStartMarker.test(r) ? r[0] == "=" ? this.singleLineHeadingRe.test(r) ? "start" : e.getLine(n - 1).length != e.getLine(n).length ? "" : "start" : e.bgTokenizer.getState(n) == "dissallowDelimitedBlock" ? "end" : "start" : ""
- }, this.getFoldWidgetRange = function (e, t, n) {
- function l(t) {
- return f = e.getTokens(t)[0], f && f.type
- }
-
- function d() {
- var t = f.value.match(p);
- if (t)return t[0].length;
- var r = c.indexOf(f.value[0]) + 1;
- return r == 1 && e.getLine(n - 1).length != e.getLine(n).length ? Infinity : r
- }
-
- var r = e.getLine(n), i = r.length, o = e.getLength(), u = n, a = n;
- if (!r.match(this.foldingStartMarker))return;
- var f, c = ["=", "-", "~", "^", "+"], h = "markup.heading", p = this.singleLineHeadingRe;
- if (l(n) == h) {
- var v = d();
- while (++n < o) {
- if (l(n) != h)continue;
- var m = d();
- if (m <= v)break
- }
- var g = f && f.value.match(this.singleLineHeadingRe);
- a = g ? n - 1 : n - 2;
- if (a > u)while (a > u && (!l(a) || f.value[0] == "["))a--;
- if (a > u) {
- var y = e.getLine(a).length;
- return new s(u, i, a, y)
- }
- } else {
- var b = e.bgTokenizer.getState(n);
- if (b == "dissallowDelimitedBlock") {
- while (n-- > 0)if (e.bgTokenizer.getState(n).lastIndexOf("Block") == -1)break;
- a = n + 1;
- if (a < u) {
- var y = e.getLine(n).length;
- return new s(a, 5, u, i - 5)
- }
- } else {
- while (++n < o)if (e.bgTokenizer.getState(n) == "dissallowDelimitedBlock")break;
- a = n;
- if (a > u) {
- var y = e.getLine(n).length;
- return new s(u, 5, a, y - 5)
- }
- }
- }
- }
- }.call(o.prototype)
-})
\ No newline at end of file
diff --git a/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/mode-c9search.js b/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/mode-c9search.js
deleted file mode 100644
index e919066..0000000
--- a/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/mode-c9search.js
+++ /dev/null
@@ -1,60 +0,0 @@
-ace.define("ace/mode/c9search", ["require", "exports", "module", "ace/lib/oop", "ace/mode/text", "ace/tokenizer", "ace/mode/c9search_highlight_rules", "ace/mode/matching_brace_outdent", "ace/mode/folding/c9search"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("./text").Mode, s = e("../tokenizer").Tokenizer, o = e("./c9search_highlight_rules").C9SearchHighlightRules, u = e("./matching_brace_outdent").MatchingBraceOutdent, a = e("./folding/c9search").FoldMode, f = function () {
- this.$tokenizer = new s((new o).getRules(), "i"), this.$outdent = new u, this.foldingRules = new a
- };
- r.inherits(f, i), function () {
- this.getNextLineIndent = function (e, t, n) {
- var r = this.$getIndent(t);
- return r
- }, this.checkOutdent = function (e, t, n) {
- return this.$outdent.checkOutdent(t, n)
- }, this.autoOutdent = function (e, t, n) {
- this.$outdent.autoOutdent(t, n)
- }
- }.call(f.prototype), t.Mode = f
-}), ace.define("ace/mode/c9search_highlight_rules", ["require", "exports", "module", "ace/lib/oop", "ace/mode/text_highlight_rules"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("./text_highlight_rules").TextHighlightRules, s = function () {
- this.$rules = {start: [
- {token: ["c9searchresults.constant.numeric", "c9searchresults.text", "c9searchresults.text"], regex: "(^\\s+[0-9]+)(:\\s*)(.+)"},
- {token: ["string", "text"], regex: "(.+)(:$)"}
- ]}
- };
- r.inherits(s, i), t.C9SearchHighlightRules = s
-}), ace.define("ace/mode/matching_brace_outdent", ["require", "exports", "module", "ace/range"], function (e, t, n) {
- var r = e("../range").Range, i = function () {
- };
- (function () {
- this.checkOutdent = function (e, t) {
- return/^\s+$/.test(e) ? /^\s*\}/.test(t) : !1
- }, this.autoOutdent = function (e, t) {
- var n = e.getLine(t), i = n.match(/^(\s*\})/);
- if (!i)return 0;
- var s = i[1].length, o = e.findMatchingBracket({row: t, column: s});
- if (!o || o.row == t)return 0;
- var u = this.$getIndent(e.getLine(o.row));
- e.replace(new r(t, 0, t, s - 1), u)
- }, this.$getIndent = function (e) {
- var t = e.match(/^(\s+)/);
- return t ? t[1] : ""
- }
- }).call(i.prototype), t.MatchingBraceOutdent = i
-}), ace.define("ace/mode/folding/c9search", ["require", "exports", "module", "ace/lib/oop", "ace/range", "ace/mode/folding/fold_mode"], function (e, t, n) {
- var r = e("../../lib/oop"), i = e("../../range").Range, s = e("./fold_mode").FoldMode, o = t.FoldMode = function () {
- };
- r.inherits(o, s), function () {
- this.foldingStartMarker = /^(\S.*\:|Searching for.*)$/, this.foldingStopMarker = /^(\s+|Found.*)$/, this.getFoldWidgetRange = function (e, t, n) {
- var r = e.doc.getAllLines(n), s = r[n], o = /^(Found.*|Searching for.*)$/, u = /^(\S.*\:|\s*)$/, a = o.test(s) ? o : u;
- if (this.foldingStartMarker.test(s)) {
- for (var f = n + 1, l = e.getLength(); f < l; f++)if (a.test(r[f]))break;
- return new i(n, s.length, f, 0)
- }
- if (this.foldingStopMarker.test(s)) {
- for (var f = n - 1; f >= 0; f--) {
- s = r[f];
- if (a.test(s))break
- }
- return new i(f, s.length, n, 0)
- }
- }
- }.call(o.prototype)
-})
\ No newline at end of file
diff --git a/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/mode-c_cpp.js b/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/mode-c_cpp.js
deleted file mode 100644
index 7f84bcf..0000000
--- a/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/mode-c_cpp.js
+++ /dev/null
@@ -1,248 +0,0 @@
-ace.define("ace/mode/c_cpp", ["require", "exports", "module", "ace/lib/oop", "ace/mode/text", "ace/tokenizer", "ace/mode/c_cpp_highlight_rules", "ace/mode/matching_brace_outdent", "ace/range", "ace/mode/behaviour/cstyle", "ace/mode/folding/cstyle"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("./text").Mode, s = e("../tokenizer").Tokenizer, o = e("./c_cpp_highlight_rules").c_cppHighlightRules, u = e("./matching_brace_outdent").MatchingBraceOutdent, a = e("../range").Range, f = e("./behaviour/cstyle").CstyleBehaviour, l = e("./folding/cstyle").FoldMode, c = function () {
- this.$tokenizer = new s((new o).getRules()), this.$outdent = new u, this.$behaviour = new f, this.foldingRules = new l
- };
- r.inherits(c, i), function () {
- this.toggleCommentLines = function (e, t, n, r) {
- var i = !0, s = /^(\s*)\/\//;
- for (var o = n; o <= r; o++)if (!s.test(t.getLine(o))) {
- i = !1;
- break
- }
- if (i) {
- var u = new a(0, 0, 0, 0);
- for (var o = n; o <= r; o++) {
- var f = t.getLine(o), l = f.match(s);
- u.start.row = o, u.end.row = o, u.end.column = l[0].length, t.replace(u, l[1])
- }
- } else t.indentRows(n, r, "//")
- }, this.getNextLineIndent = function (e, t, n) {
- var r = this.$getIndent(t), i = this.$tokenizer.getLineTokens(t, e), s = i.tokens, o = i.state;
- if (s.length && s[s.length - 1].type == "comment")return r;
- if (e == "start") {
- var u = t.match(/^.*[\{\(\[]\s*$/);
- u && (r += n)
- } else if (e == "doc-start") {
- if (o == "start")return"";
- var u = t.match(/^\s*(\/?)\*/);
- u && (u[1] && (r += " "), r += "* ")
- }
- return r
- }, this.checkOutdent = function (e, t, n) {
- return this.$outdent.checkOutdent(t, n)
- }, this.autoOutdent = function (e, t, n) {
- this.$outdent.autoOutdent(t, n)
- }
- }.call(c.prototype), t.Mode = c
-}), ace.define("ace/mode/c_cpp_highlight_rules", ["require", "exports", "module", "ace/lib/oop", "ace/mode/doc_comment_highlight_rules", "ace/mode/text_highlight_rules"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("./doc_comment_highlight_rules").DocCommentHighlightRules, s = e("./text_highlight_rules").TextHighlightRules, o = t.cFunctions = "\\s*\\bhypot(?:f|l)?|s(?:scanf|ystem|nprintf|ca(?:nf|lb(?:n(?:f|l)?|ln(?:f|l)?))|i(?:n(?:h(?:f|l)?|f|l)?|gn(?:al|bit))|tr(?:s(?:tr|pn)|nc(?:py|at|mp)|c(?:spn|hr|oll|py|at|mp)|to(?:imax|d|u(?:l(?:l)?|max)|k|f|l(?:d|l)?)|error|pbrk|ftime|len|rchr|xfrm)|printf|et(?:jmp|vbuf|locale|buf)|qrt(?:f|l)?|w(?:scanf|printf)|rand)|n(?:e(?:arbyint(?:f|l)?|xt(?:toward(?:f|l)?|after(?:f|l)?))|an(?:f|l)?)|c(?:s(?:in(?:h(?:f|l)?|f|l)?|qrt(?:f|l)?)|cos(?:h(?:f)?|f|l)?|imag(?:f|l)?|t(?:ime|an(?:h(?:f|l)?|f|l)?)|o(?:s(?:h(?:f|l)?|f|l)?|nj(?:f|l)?|pysign(?:f|l)?)|p(?:ow(?:f|l)?|roj(?:f|l)?)|e(?:il(?:f|l)?|xp(?:f|l)?)|l(?:o(?:ck|g(?:f|l)?)|earerr)|a(?:sin(?:h(?:f|l)?|f|l)?|cos(?:h(?:f|l)?|f|l)?|tan(?:h(?:f|l)?|f|l)?|lloc|rg(?:f|l)?|bs(?:f|l)?)|real(?:f|l)?|brt(?:f|l)?)|t(?:ime|o(?:upper|lower)|an(?:h(?:f|l)?|f|l)?|runc(?:f|l)?|gamma(?:f|l)?|mp(?:nam|file))|i(?:s(?:space|n(?:ormal|an)|cntrl|inf|digit|u(?:nordered|pper)|p(?:unct|rint)|finite|w(?:space|c(?:ntrl|type)|digit|upper|p(?:unct|rint)|lower|al(?:num|pha)|graph|xdigit|blank)|l(?:ower|ess(?:equal|greater)?)|al(?:num|pha)|gr(?:eater(?:equal)?|aph)|xdigit|blank)|logb(?:f|l)?|max(?:div|abs))|di(?:v|fftime)|_Exit|unget(?:c|wc)|p(?:ow(?:f|l)?|ut(?:s|c(?:har)?|wc(?:har)?)|error|rintf)|e(?:rf(?:c(?:f|l)?|f|l)?|x(?:it|p(?:2(?:f|l)?|f|l|m1(?:f|l)?)?))|v(?:s(?:scanf|nprintf|canf|printf|w(?:scanf|printf))|printf|f(?:scanf|printf|w(?:scanf|printf))|w(?:scanf|printf)|a_(?:start|copy|end|arg))|qsort|f(?:s(?:canf|e(?:tpos|ek))|close|tell|open|dim(?:f|l)?|p(?:classify|ut(?:s|c|w(?:s|c))|rintf)|e(?:holdexcept|set(?:e(?:nv|xceptflag)|round)|clearexcept|testexcept|of|updateenv|r(?:aiseexcept|ror)|get(?:e(?:nv|xceptflag)|round))|flush|w(?:scanf|ide|printf|rite)|loor(?:f|l)?|abs(?:f|l)?|get(?:s|c|pos|w(?:s|c))|re(?:open|e|ad|xp(?:f|l)?)|m(?:in(?:f|l)?|od(?:f|l)?|a(?:f|l|x(?:f|l)?)?))|l(?:d(?:iv|exp(?:f|l)?)|o(?:ngjmp|cal(?:time|econv)|g(?:1(?:p(?:f|l)?|0(?:f|l)?)|2(?:f|l)?|f|l|b(?:f|l)?)?)|abs|l(?:div|abs|r(?:int(?:f|l)?|ound(?:f|l)?))|r(?:int(?:f|l)?|ound(?:f|l)?)|gamma(?:f|l)?)|w(?:scanf|c(?:s(?:s(?:tr|pn)|nc(?:py|at|mp)|c(?:spn|hr|oll|py|at|mp)|to(?:imax|d|u(?:l(?:l)?|max)|k|f|l(?:d|l)?|mbs)|pbrk|ftime|len|r(?:chr|tombs)|xfrm)|to(?:b|mb)|rtomb)|printf|mem(?:set|c(?:hr|py|mp)|move))|a(?:s(?:sert|ctime|in(?:h(?:f|l)?|f|l)?)|cos(?:h(?:f|l)?|f|l)?|t(?:o(?:i|f|l(?:l)?)|exit|an(?:h(?:f|l)?|2(?:f|l)?|f|l)?)|b(?:s|ort))|g(?:et(?:s|c(?:har)?|env|wc(?:har)?)|mtime)|r(?:int(?:f|l)?|ound(?:f|l)?|e(?:name|alloc|wind|m(?:ove|quo(?:f|l)?|ainder(?:f|l)?))|a(?:nd|ise))|b(?:search|towc)|m(?:odf(?:f|l)?|em(?:set|c(?:hr|py|mp)|move)|ktime|alloc|b(?:s(?:init|towcs|rtowcs)|towc|len|r(?:towc|len)))\\b", u = function () {
- var e = "break|case|continue|default|do|else|for|goto|if|_Pragma|return|switch|while|catch|operator|try|throw|using", t = "asm|__asm__|auto|bool|_Bool|char|_Complex|double|enum|float|_Imaginary|int|long|short|signed|struct|typedef|union|unsigned|void|class|wchar_t|template", n = "const|extern|register|restrict|static|volatile|inline|private:|protected:|public:|friend|explicit|virtual|export|mutable|typename", r = "and|and_eq|bitand|bitor|compl|not|not_eq|or|or_eq|typeid|xor|xor_eqconst_cast|dynamic_cast|reinterpret_cast|static_cast|sizeof|namespace", s = "NULL|true|false|TRUE|FALSE", u = this.$keywords = this.createKeywordMapper({"keyword.control": e, "storage.type": t, "storage.modifier": n, "keyword.operator": r, "variable.language": "this", "constant.language": s}, "identifier"), a = "[a-zA-Z\\$_¡-￿][a-zA-Zd\\$_¡-￿]*\\b";
- this.$rules = {start: [
- {token: "comment", regex: "\\/\\/.*$"},
- i.getStartRule("doc-start"),
- {token: "comment", regex: "\\/\\*", next: "comment"},
- {token: "string", regex: '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},
- {token: "string", regex: '["].*\\\\$', next: "qqstring"},
- {token: "string", regex: "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},
- {token: "string", regex: "['].*\\\\$", next: "qstring"},
- {token: "constant.numeric", regex: "0[xX][0-9a-fA-F]+\\b"},
- {token: "constant.numeric", regex: "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},
- {token: "keyword", regex: "(?:#include|#import|#pragma|#line|#define|#undef|#if|#ifdef|#else|#elif|#ifndef)\\b", next: "directive"},
- {token: "keyword", regex: "(?:#endif)\\b"},
- {token: "support.function.C99.c", regex: o},
- {token: u, regex: "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},
- {token: "keyword.operator", regex: "!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|==|=|!=|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|new|delete|typeof|void)"},
- {token: "punctuation.operator", regex: "\\?|\\:|\\,|\\;|\\."},
- {token: "paren.lparen", regex: "[[({]"},
- {token: "paren.rparen", regex: "[\\])}]"},
- {token: "text", regex: "\\s+"}
- ], comment: [
- {token: "comment", regex: ".*?\\*\\/", next: "start"},
- {token: "comment", regex: ".+"}
- ], qqstring: [
- {token: "string", regex: '(?:(?:\\\\.)|(?:[^"\\\\]))*?"', next: "start"},
- {token: "string", regex: ".+"}
- ], qstring: [
- {token: "string", regex: "(?:(?:\\\\.)|(?:[^'\\\\]))*?'", next: "start"},
- {token: "string", regex: ".+"}
- ], directive: [
- {token: "constant.other.multiline", regex: /\\/},
- {token: "constant.other.multiline", regex: /.*\\/},
- {token: "constant.other", regex: "\\s*<.+?>", next: "start"},
- {token: "constant.other", regex: '\\s*["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]', next: "start"},
- {token: "constant.other", regex: "\\s*['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']", next: "start"},
- {token: "constant.other", regex: /[^\\\/]+/, next: "start"}
- ]}, this.embedRules(i, "doc-", [i.getEndRule("start")])
- };
- r.inherits(u, s), t.c_cppHighlightRules = u
-}), ace.define("ace/mode/doc_comment_highlight_rules", ["require", "exports", "module", "ace/lib/oop", "ace/mode/text_highlight_rules"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("./text_highlight_rules").TextHighlightRules, s = function () {
- this.$rules = {start: [
- {token: "comment.doc.tag", regex: "@[\\w\\d_]+"},
- {token: "comment.doc.tag", regex: "\\bTODO\\b"},
- {defaultToken: "comment.doc"}
- ]}
- };
- r.inherits(s, i), s.getStartRule = function (e) {
- return{token: "comment.doc", regex: "\\/\\*(?=\\*)", next: e}
- }, s.getEndRule = function (e) {
- return{token: "comment.doc", regex: "\\*\\/", next: e}
- }, t.DocCommentHighlightRules = s
-}), ace.define("ace/mode/matching_brace_outdent", ["require", "exports", "module", "ace/range"], function (e, t, n) {
- var r = e("../range").Range, i = function () {
- };
- (function () {
- this.checkOutdent = function (e, t) {
- return/^\s+$/.test(e) ? /^\s*\}/.test(t) : !1
- }, this.autoOutdent = function (e, t) {
- var n = e.getLine(t), i = n.match(/^(\s*\})/);
- if (!i)return 0;
- var s = i[1].length, o = e.findMatchingBracket({row: t, column: s});
- if (!o || o.row == t)return 0;
- var u = this.$getIndent(e.getLine(o.row));
- e.replace(new r(t, 0, t, s - 1), u)
- }, this.$getIndent = function (e) {
- var t = e.match(/^(\s+)/);
- return t ? t[1] : ""
- }
- }).call(i.prototype), t.MatchingBraceOutdent = i
-}), ace.define("ace/mode/behaviour/cstyle", ["require", "exports", "module", "ace/lib/oop", "ace/mode/behaviour", "ace/token_iterator", "ace/lib/lang"], function (e, t, n) {
- var r = e("../../lib/oop"), i = e("../behaviour").Behaviour, s = e("../../token_iterator").TokenIterator, o = e("../../lib/lang"), u = ["text", "paren.rparen", "punctuation.operator"], a = ["text", "paren.rparen", "punctuation.operator", "comment"], f = 0, l = -1, c = "", h = 0, p = -1, d = "", v = "", m = function () {
- m.isSaneInsertion = function (e, t) {
- var n = e.getCursorPosition(), r = new s(t, n.row, n.column);
- if (!this.$matchTokenType(r.getCurrentToken() || "text", u)) {
- var i = new s(t, n.row, n.column + 1);
- if (!this.$matchTokenType(i.getCurrentToken() || "text", u))return!1
- }
- return r.stepForward(), r.getCurrentTokenRow() !== n.row || this.$matchTokenType(r.getCurrentToken() || "text", a)
- }, m.$matchTokenType = function (e, t) {
- return t.indexOf(e.type || e) > -1
- }, m.recordAutoInsert = function (e, t, n) {
- var r = e.getCursorPosition(), i = t.doc.getLine(r.row);
- this.isAutoInsertedClosing(r, i, c[0]) || (f = 0), l = r.row, c = n + i.substr(r.column), f++
- }, m.recordMaybeInsert = function (e, t, n) {
- var r = e.getCursorPosition(), i = t.doc.getLine(r.row);
- this.isMaybeInsertedClosing(r, i) || (h = 0), p = r.row, d = i.substr(0, r.column) + n, v = i.substr(r.column), h++
- }, m.isAutoInsertedClosing = function (e, t, n) {
- return f > 0 && e.row === l && n === c[0] && t.substr(e.column) === c
- }, m.isMaybeInsertedClosing = function (e, t) {
- return h > 0 && e.row === p && t.substr(e.column) === v && t.substr(0, e.column) == d
- }, m.popAutoInsertedClosing = function () {
- c = c.substr(1), f--
- }, m.clearMaybeInsertedClosing = function () {
- h = 0, p = -1
- }, this.add("braces", "insertion", function (e, t, n, r, i) {
- var s = n.getCursorPosition(), u = r.doc.getLine(s.row);
- if (i == "{") {
- var a = n.getSelectionRange(), f = r.doc.getTextRange(a);
- if (f !== "" && f !== "{" && n.getWrapBehavioursEnabled())return{text: "{" + f + "}", selection: !1};
- if (m.isSaneInsertion(n, r))return/[\]\}\)]/.test(u[s.column]) ? (m.recordAutoInsert(n, r, "}"), {text: "{}", selection: [1, 1]}) : (m.recordMaybeInsert(n, r, "{"), {text: "{", selection: [1, 1]})
- } else if (i == "}") {
- var l = u.substring(s.column, s.column + 1);
- if (l == "}") {
- var c = r.$findOpeningBracket("}", {column: s.column + 1, row: s.row});
- if (c !== null && m.isAutoInsertedClosing(s, u, i))return m.popAutoInsertedClosing(), {text: "", selection: [1, 1]}
- }
- } else if (i == "\n" || i == "\r\n") {
- var p = "";
- m.isMaybeInsertedClosing(s, u) && (p = o.stringRepeat("}", h), m.clearMaybeInsertedClosing());
- var l = u.substring(s.column, s.column + 1);
- if (l == "}" || p !== "") {
- var d = r.findMatchingBracket({row: s.row, column: s.column}, "}");
- if (!d)return null;
- var v = this.getNextLineIndent(e, u.substring(0, s.column), r.getTabString()), g = this.$getIndent(u);
- return{text: "\n" + v + "\n" + g + p, selection: [1, v.length, 1, v.length]}
- }
- }
- }), this.add("braces", "deletion", function (e, t, n, r, i) {
- var s = r.doc.getTextRange(i);
- if (!i.isMultiLine() && s == "{") {
- var o = r.doc.getLine(i.start.row), u = o.substring(i.end.column, i.end.column + 1);
- if (u == "}")return i.end.column++, i;
- h--
- }
- }), this.add("parens", "insertion", function (e, t, n, r, i) {
- if (i == "(") {
- var s = n.getSelectionRange(), o = r.doc.getTextRange(s);
- if (o !== "" && n.getWrapBehavioursEnabled())return{text: "(" + o + ")", selection: !1};
- if (m.isSaneInsertion(n, r))return m.recordAutoInsert(n, r, ")"), {text: "()", selection: [1, 1]}
- } else if (i == ")") {
- var u = n.getCursorPosition(), a = r.doc.getLine(u.row), f = a.substring(u.column, u.column + 1);
- if (f == ")") {
- var l = r.$findOpeningBracket(")", {column: u.column + 1, row: u.row});
- if (l !== null && m.isAutoInsertedClosing(u, a, i))return m.popAutoInsertedClosing(), {text: "", selection: [1, 1]}
- }
- }
- }), this.add("parens", "deletion", function (e, t, n, r, i) {
- var s = r.doc.getTextRange(i);
- if (!i.isMultiLine() && s == "(") {
- var o = r.doc.getLine(i.start.row), u = o.substring(i.start.column + 1, i.start.column + 2);
- if (u == ")")return i.end.column++, i
- }
- }), this.add("brackets", "insertion", function (e, t, n, r, i) {
- if (i == "[") {
- var s = n.getSelectionRange(), o = r.doc.getTextRange(s);
- if (o !== "" && n.getWrapBehavioursEnabled())return{text: "[" + o + "]", selection: !1};
- if (m.isSaneInsertion(n, r))return m.recordAutoInsert(n, r, "]"), {text: "[]", selection: [1, 1]}
- } else if (i == "]") {
- var u = n.getCursorPosition(), a = r.doc.getLine(u.row), f = a.substring(u.column, u.column + 1);
- if (f == "]") {
- var l = r.$findOpeningBracket("]", {column: u.column + 1, row: u.row});
- if (l !== null && m.isAutoInsertedClosing(u, a, i))return m.popAutoInsertedClosing(), {text: "", selection: [1, 1]}
- }
- }
- }), this.add("brackets", "deletion", function (e, t, n, r, i) {
- var s = r.doc.getTextRange(i);
- if (!i.isMultiLine() && s == "[") {
- var o = r.doc.getLine(i.start.row), u = o.substring(i.start.column + 1, i.start.column + 2);
- if (u == "]")return i.end.column++, i
- }
- }), this.add("string_dquotes", "insertion", function (e, t, n, r, i) {
- if (i == '"' || i == "'") {
- var s = i, o = n.getSelectionRange(), u = r.doc.getTextRange(o);
- if (u !== "" && u !== "'" && u != '"' && n.getWrapBehavioursEnabled())return{text: s + u + s, selection: !1};
- var a = n.getCursorPosition(), f = r.doc.getLine(a.row), l = f.substring(a.column - 1, a.column);
- if (l == "\\")return null;
- var c = r.getTokens(o.start.row), h = 0, p, d = -1;
- for (var v = 0; v < c.length; v++) {
- p = c[v], p.type == "string" ? d = -1 : d < 0 && (d = p.value.indexOf(s));
- if (p.value.length + h > o.start.column)break;
- h += c[v].value.length
- }
- if (!p || d < 0 && p.type !== "comment" && (p.type !== "string" || o.start.column !== p.value.length + h - 1 && p.value.lastIndexOf(s) === p.value.length - 1)) {
- if (!m.isSaneInsertion(n, r))return;
- return{text: s + s, selection: [1, 1]}
- }
- if (p && p.type === "string") {
- var g = f.substring(a.column, a.column + 1);
- if (g == s)return{text: "", selection: [1, 1]}
- }
- }
- }), this.add("string_dquotes", "deletion", function (e, t, n, r, i) {
- var s = r.doc.getTextRange(i);
- if (!i.isMultiLine() && (s == '"' || s == "'")) {
- var o = r.doc.getLine(i.start.row), u = o.substring(i.start.column + 1, i.start.column + 2);
- if (u == s)return i.end.column++, i
- }
- })
- };
- r.inherits(m, i), t.CstyleBehaviour = m
-}), ace.define("ace/mode/folding/cstyle", ["require", "exports", "module", "ace/lib/oop", "ace/range", "ace/mode/folding/fold_mode"], function (e, t, n) {
- var r = e("../../lib/oop"), i = e("../../range").Range, s = e("./fold_mode").FoldMode, o = t.FoldMode = function () {
- };
- r.inherits(o, s), function () {
- this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/, this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/, this.getFoldWidgetRange = function (e, t, n) {
- var r = e.getLine(n), i = r.match(this.foldingStartMarker);
- if (i) {
- var s = i.index;
- return i[1] ? this.openingBracketBlock(e, i[1], n, s) : e.getCommentFoldRange(n, s + i[0].length, 1)
- }
- if (t !== "markbeginend")return;
- var i = r.match(this.foldingStopMarker);
- if (i) {
- var s = i.index + i[0].length;
- return i[1] ? this.closingBracketBlock(e, i[1], n, s) : e.getCommentFoldRange(n, s, -1)
- }
- }
- }.call(o.prototype)
-})
\ No newline at end of file
diff --git a/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/mode-clojure.js b/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/mode-clojure.js
deleted file mode 100644
index 218a2ad..0000000
--- a/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/mode-clojure.js
+++ /dev/null
@@ -1,78 +0,0 @@
-ace.define("ace/mode/clojure", ["require", "exports", "module", "ace/lib/oop", "ace/mode/text", "ace/tokenizer", "ace/mode/clojure_highlight_rules", "ace/mode/matching_parens_outdent", "ace/range"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("./text").Mode, s = e("../tokenizer").Tokenizer, o = e("./clojure_highlight_rules").ClojureHighlightRules, u = e("./matching_parens_outdent").MatchingParensOutdent, a = e("../range").Range, f = function () {
- this.$tokenizer = new s((new o).getRules()), this.$outdent = new u
- };
- r.inherits(f, i), function () {
- this.toggleCommentLines = function (e, t, n, r) {
- var i = !0, s = /^(\s*)#/;
- for (var o = n; o <= r; o++)if (!s.test(t.getLine(o))) {
- i = !1;
- break
- }
- if (i) {
- var u = new a(0, 0, 0, 0);
- for (var o = n; o <= r; o++) {
- var f = t.getLine(o), l = f.match(s);
- u.start.row = o, u.end.row = o, u.end.column = l[0].length, t.replace(u, l[1])
- }
- } else t.indentRows(n, r, ";")
- }, this.getNextLineIndent = function (e, t, n) {
- var r = this.$getIndent(t), i = this.$tokenizer.getLineTokens(t, e), s = i.tokens;
- if (s.length && s[s.length - 1].type == "comment")return r;
- if (e == "start") {
- var o = t.match(/[\(\[]/);
- o && (r += " "), o = t.match(/[\)]/), o && (r = "")
- }
- return r
- }, this.checkOutdent = function (e, t, n) {
- return this.$outdent.checkOutdent(t, n)
- }, this.autoOutdent = function (e, t, n) {
- this.$outdent.autoOutdent(t, n)
- }
- }.call(f.prototype), t.Mode = f
-}), ace.define("ace/mode/clojure_highlight_rules", ["require", "exports", "module", "ace/lib/oop", "ace/mode/text_highlight_rules"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("./text_highlight_rules").TextHighlightRules, s = function () {
- var e = "* *1 *2 *3 *agent* *allow-unresolved-vars* *assert* *clojure-version* *command-line-args* *compile-files* *compile-path* *e *err* *file* *flush-on-newline* *in* *macro-meta* *math-context* *ns* *out* *print-dup* *print-length* *print-level* *print-meta* *print-readably* *read-eval* *source-path* *use-context-classloader* *warn-on-reflection* + - -> ->> .. / < <= = == > > >= >= accessor aclone add-classpath add-watch agent agent-errors aget alength alias all-ns alter alter-meta! alter-var-root amap ancestors and apply areduce array-map aset aset-boolean aset-byte aset-char aset-double aset-float aset-int aset-long aset-short assert assoc assoc! assoc-in associative? atom await await-for await1 bases bean bigdec bigint binding bit-and bit-and-not bit-clear bit-flip bit-not bit-or bit-set bit-shift-left bit-shift-right bit-test bit-xor boolean boolean-array booleans bound-fn bound-fn* butlast byte byte-array bytes cast char char-array char-escape-string char-name-string char? chars chunk chunk-append chunk-buffer chunk-cons chunk-first chunk-next chunk-rest chunked-seq? class class? clear-agent-errors clojure-version coll? comment commute comp comparator compare compare-and-set! compile complement concat cond condp conj conj! cons constantly construct-proxy contains? count counted? create-ns create-struct cycle dec decimal? declare definline defmacro defmethod defmulti defn defn- defonce defstruct delay delay? deliver deref derive descendants destructure disj disj! dissoc dissoc! distinct distinct? doall doc dorun doseq dosync dotimes doto double double-array doubles drop drop-last drop-while empty empty? ensure enumeration-seq eval even? every? false? ffirst file-seq filter find find-doc find-ns find-var first float float-array float? floats flush fn fn? fnext for force format future future-call future-cancel future-cancelled? future-done? future? gen-class gen-interface gensym get get-in get-method get-proxy-class get-thread-bindings get-validator hash hash-map hash-set identical? identity if-let if-not ifn? import in-ns inc init-proxy instance? int int-array integer? interleave intern interpose into into-array ints io! isa? iterate iterator-seq juxt key keys keyword keyword? last lazy-cat lazy-seq let letfn line-seq list list* list? load load-file load-reader load-string loaded-libs locking long long-array longs loop macroexpand macroexpand-1 make-array make-hierarchy map map? mapcat max max-key memfn memoize merge merge-with meta method-sig methods min min-key mod name namespace neg? newline next nfirst nil? nnext not not-any? not-empty not-every? not= ns ns-aliases ns-imports ns-interns ns-map ns-name ns-publics ns-refers ns-resolve ns-unalias ns-unmap nth nthnext num number? odd? or parents partial partition pcalls peek persistent! pmap pop pop! pop-thread-bindings pos? pr pr-str prefer-method prefers primitives-classnames print print-ctor print-doc print-dup print-method print-namespace-doc print-simple print-special-doc print-str printf println println-str prn prn-str promise proxy proxy-call-with-super proxy-mappings proxy-name proxy-super push-thread-bindings pvalues quot rand rand-int range ratio? rational? rationalize re-find re-groups re-matcher re-matches re-pattern re-seq read read-line read-string reduce ref ref-history-count ref-max-history ref-min-history ref-set refer refer-clojure release-pending-sends rem remove remove-method remove-ns remove-watch repeat repeatedly replace replicate require reset! reset-meta! resolve rest resultset-seq reverse reversible? rseq rsubseq second select-keys send send-off seq seq? seque sequence sequential? set set-validator! set? short short-array shorts shutdown-agents slurp some sort sort-by sorted-map sorted-map-by sorted-set sorted-set-by sorted? special-form-anchor special-symbol? split-at split-with str stream? string? struct struct-map subs subseq subvec supers swap! symbol symbol? sync syntax-symbol-anchor take take-last take-nth take-while test the-ns time to-array to-array-2d trampoline transient tree-seq true? type unchecked-add unchecked-dec unchecked-divide unchecked-inc unchecked-multiply unchecked-negate unchecked-remainder unchecked-subtract underive unquote unquote-splicing update-in update-proxy use val vals var-get var-set var? vary-meta vec vector vector? when when-first when-let when-not while with-bindings with-bindings* with-in-str with-loading-context with-local-vars with-meta with-open with-out-str with-precision xml-seq zero? zipmap", t = "throw try var def do fn if let loop monitor-enter monitor-exit new quote recur set!", n = "true false nil", r = this.createKeywordMapper({keyword: t, "constant.language": n, "support.function": e}, "identifier", !1, " ");
- this.$rules = {start: [
- {token: "comment", regex: ";.*$"},
- {token: "keyword", regex: "[\\(|\\)]"},
- {token: "keyword", regex: "[\\'\\(]"},
- {token: "keyword", regex: "[\\[|\\]]"},
- {token: "keyword", regex: "[\\{|\\}|\\#\\{|\\#\\}]"},
- {token: "keyword", regex: "[\\&]"},
- {token: "keyword", regex: "[\\#\\^\\{]"},
- {token: "keyword", regex: "[\\%]"},
- {token: "keyword", regex: "[@]"},
- {token: "constant.numeric", regex: "0[xX][0-9a-fA-F]+\\b"},
- {token: "constant.numeric", regex: "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},
- {token: "constant.language", regex: "[!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+||=|!=|<=|>=|<>|<|>|!|&&]"},
- {token: r, regex: "[a-zA-Z_$][a-zA-Z0-9_$\\-]*\\b"},
- {token: "string", regex: '"', next: "string"},
- {token: "string", regex: /:[\w*+!\-_?:\/]+/},
- {token: "string.regexp", regex: '/#"(?:\\.|(?:\\")|[^""\n])*"/g'}
- ], string: [
- {token: "constant.language.escape", regex: "\\\\.|\\\\$"},
- {token: "string", regex: '[^"\\\\]+'},
- {token: "string", regex: '"', next: "start"}
- ]}
- };
- r.inherits(s, i), t.ClojureHighlightRules = s
-}), ace.define("ace/mode/matching_parens_outdent", ["require", "exports", "module", "ace/range"], function (e, t, n) {
- var r = e("../range").Range, i = function () {
- };
- (function () {
- this.checkOutdent = function (e, t) {
- return/^\s+$/.test(e) ? /^\s*\)/.test(t) : !1
- }, this.autoOutdent = function (e, t) {
- var n = e.getLine(t), i = n.match(/^(\s*\))/);
- if (!i)return 0;
- var s = i[1].length, o = e.findMatchingBracket({row: t, column: s});
- if (!o || o.row == t)return 0;
- var u = this.$getIndent(e.getLine(o.row));
- e.replace(new r(t, 0, t, s - 1), u)
- }, this.$getIndent = function (e) {
- var t = e.match(/^(\s+)/);
- return t ? t[1] : ""
- }
- }).call(i.prototype), t.MatchingParensOutdent = i
-})
\ No newline at end of file
diff --git a/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/mode-coffee.js b/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/mode-coffee.js
deleted file mode 100644
index f85d48d..0000000
--- a/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/mode-coffee.js
+++ /dev/null
@@ -1,140 +0,0 @@
-ace.define("ace/mode/coffee", ["require", "exports", "module", "ace/tokenizer", "ace/mode/coffee_highlight_rules", "ace/mode/matching_brace_outdent", "ace/mode/folding/coffee", "ace/range", "ace/mode/text", "ace/worker/worker_client", "ace/lib/oop"], function (e, t, n) {
- function c() {
- this.$tokenizer = new r((new i).getRules()), this.$outdent = new s, this.foldingRules = new o
- }
-
- var r = e("../tokenizer").Tokenizer, i = e("./coffee_highlight_rules").CoffeeHighlightRules, s = e("./matching_brace_outdent").MatchingBraceOutdent, o = e("./folding/coffee").FoldMode, u = e("../range").Range, a = e("./text").Mode, f = e("../worker/worker_client").WorkerClient, l = e("../lib/oop");
- l.inherits(c, a), function () {
- var e = /(?:[({[=:]|[-=]>|\b(?:else|switch|try|catch(?:\s*[$A-Za-z_\x7f-\uffff][$\w\x7f-\uffff]*)?|finally))\s*$/, t = /^(\s*)#/, n = /^\s*###(?!#)/, r = /^\s*/;
- this.getNextLineIndent = function (t, n, r) {
- var i = this.$getIndent(n), s = this.$tokenizer.getLineTokens(n, t).tokens;
- return(!s.length || s[s.length - 1].type !== "comment") && t === "start" && e.test(n) && (i += r), i
- }, this.toggleCommentLines = function (e, i, s, o) {
- console.log("toggle");
- var a = new u(0, 0, 0, 0);
- for (var f = s; f <= o; ++f) {
- var l = i.getLine(f);
- if (n.test(l))continue;
- t.test(l) ? l = l.replace(t, "$1") : l = l.replace(r, "$"), a.end.row = a.start.row = f, a.end.column = l.length + 1, i.replace(a, l)
- }
- }, this.checkOutdent = function (e, t, n) {
- return this.$outdent.checkOutdent(t, n)
- }, this.autoOutdent = function (e, t, n) {
- this.$outdent.autoOutdent(t, n)
- }, this.createWorker = function (e) {
- var t = new f(["ace"], "ace/mode/coffee_worker", "Worker");
- return t.attachToDocument(e.getDocument()), t.on("error", function (t) {
- e.setAnnotations([t.data])
- }), t.on("ok", function (t) {
- e.clearAnnotations()
- }), t
- }
- }.call(c.prototype), t.Mode = c
-}), ace.define("ace/mode/coffee_highlight_rules", ["require", "exports", "module", "ace/lib/oop", "ace/mode/text_highlight_rules"], function (e, t, n) {
- function s() {
- var e = "[$A-Za-z_\\x7f-\\uffff][$\\w\\x7f-\\uffff]*", t = "this|throw|then|try|typeof|super|switch|return|break|by|continue|catch|class|in|instanceof|is|isnt|if|else|extends|for|forown|finally|function|while|when|new|no|not|delete|debugger|do|loop|of|off|or|on|unless|until|and|yes", n = "true|false|null|undefined|NaN|Infinity", r = "case|const|default|function|var|void|with|enum|export|implements|interface|let|package|private|protected|public|static|yield|__hasProp|slice|bind|indexOf", i = "Array|Boolean|Date|Function|Number|Object|RegExp|ReferenceError|String|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray", s = "Math|JSON|isNaN|isFinite|parseInt|parseFloat|encodeURI|encodeURIComponent|decodeURI|decodeURIComponent|String|", o = "window|arguments|prototype|document", u = this.createKeywordMapper({keyword: t, "constant.language": n, "invalid.illegal": r, "language.support.class": i, "language.support.function": s, "variable.language": o}, "identifier"), a = {token: ["paren.lparen", "variable.parameter", "paren.rparen", "text", "storage.type"], regex: /(?:(\()((?:"[^")]*?"|'[^')]*?'|\/[^\/)]*?\/|[^()\"'\/])*?)(\))(\s*))?([\-=]>)/.source}, f = /\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|[0-2][0-7]{0,2}|3[0-6][0-7]?|37[0-7]?|[4-7][0-7]?|.)/;
- this.$rules = {start: [
- {token: "constant.numeric", regex: "(?:0x[\\da-fA-F]+|(?:\\d+(?:\\.\\d+)?|\\.\\d+)(?:[eE][+-]?\\d+)?)"},
- {stateName: "qdoc", token: "string", regex: "'''", next: [
- {token: "string", regex: "'''", next: "start"},
- {token: "constant.language.escape", regex: f},
- {defaultToken: "string"}
- ]},
- {stateName: "qqdoc", token: "string", regex: '"""', next: [
- {token: "string", regex: '"""', next: "start"},
- {token: "constant.language.escape", regex: f},
- {defaultToken: "string"}
- ]},
- {stateName: "qstring", token: "string", regex: "'", next: [
- {token: "string", regex: "'", next: "start"},
- {token: "constant.language.escape", regex: f},
- {defaultToken: "string"}
- ]},
- {stateName: "qqstring", token: "string.start", regex: '"', next: [
- {token: "string.end", regex: '"', next: "start"},
- {token: "constant.language.escape", regex: f},
- {defaultToken: "string"}
- ]},
- {stateName: "js", token: "string", regex: "`", next: [
- {token: "string", regex: "`", next: "start"},
- {token: "constant.language.escape", regex: f},
- {defaultToken: "string"}
- ]},
- {token: "string.regex", regex: "///", next: "heregex"},
- {token: "string.regex", regex: /(?:\/(?![\s=])[^[\/\n\\]*(?:(?:\\[\s\S]|\[[^\]\n\\]*(?:\\[\s\S][^\]\n\\]*)*])[^[\/\n\\]*)*\/)(?:[imgy]{0,4})(?!\w)/},
- {token: "comment", regex: "###(?!#)", next: "comment"},
- {token: "comment", regex: "#.*"},
- {token: ["punctuation.operator", "text", "identifier"], regex: "(\\.)(\\s*)(" + r + ")"},
- {token: "punctuation.operator", regex: "\\."},
- {token: ["keyword", "text", "language.support.class", "text", "keyword", "text", "language.support.class"], regex: "(class)(\\s+)(" + e + ")(?:(\\s+)(extends)(\\s+)(" + e + "))?"},
- {token: ["entity.name.function", "text", "keyword.operator", "text"].concat(a.token), regex: "(" + e + ")(\\s*)([=:])(\\s*)" + a.regex},
- a,
- {token: "variable", regex: "@(?:" + e + ")?"},
- {token: u, regex: e},
- {token: "punctuation.operator", regex: "\\,|\\."},
- {token: "storage.type", regex: "[\\-=]>"},
- {token: "keyword.operator", regex: "(?:[-+*/%<>&|^!?=]=|>>>=?|\\-\\-|\\+\\+|::|&&=|\\|\\|=|<<=|>>=|\\?\\.|\\.{2,3}|[!*+-=><])"},
- {token: "paren.lparen", regex: "[({[]"},
- {token: "paren.rparen", regex: "[\\]})]"},
- {token: "text", regex: "\\s+"}
- ], heregex: [
- {token: "string.regex", regex: ".*?///[imgy]{0,4}", next: "start"},
- {token: "comment.regex", regex: "\\s+(?:#.*)?"},
- {token: "string.regex", regex: "\\S+"}
- ], comment: [
- {token: "comment", regex: "###", next: "start"},
- {defaultToken: "comment"}
- ]}, this.normalizeRules()
- }
-
- var r = e("../lib/oop"), i = e("./text_highlight_rules").TextHighlightRules;
- r.inherits(s, i), t.CoffeeHighlightRules = s
-}), ace.define("ace/mode/matching_brace_outdent", ["require", "exports", "module", "ace/range"], function (e, t, n) {
- var r = e("../range").Range, i = function () {
- };
- (function () {
- this.checkOutdent = function (e, t) {
- return/^\s+$/.test(e) ? /^\s*\}/.test(t) : !1
- }, this.autoOutdent = function (e, t) {
- var n = e.getLine(t), i = n.match(/^(\s*\})/);
- if (!i)return 0;
- var s = i[1].length, o = e.findMatchingBracket({row: t, column: s});
- if (!o || o.row == t)return 0;
- var u = this.$getIndent(e.getLine(o.row));
- e.replace(new r(t, 0, t, s - 1), u)
- }, this.$getIndent = function (e) {
- var t = e.match(/^(\s+)/);
- return t ? t[1] : ""
- }
- }).call(i.prototype), t.MatchingBraceOutdent = i
-}), ace.define("ace/mode/folding/coffee", ["require", "exports", "module", "ace/lib/oop", "ace/mode/folding/fold_mode", "ace/range"], function (e, t, n) {
- var r = e("../../lib/oop"), i = e("./fold_mode").FoldMode, s = e("../../range").Range, o = t.FoldMode = function () {
- };
- r.inherits(o, i), function () {
- this.getFoldWidgetRange = function (e, t, n) {
- var r = this.indentationBlock(e, n);
- if (r)return r;
- var i = /\S/, o = e.getLine(n), u = o.search(i);
- if (u == -1 || o[u] != "#")return;
- var a = o.length, f = e.getLength(), l = n, c = n;
- while (++n < f) {
- o = e.getLine(n);
- var h = o.search(i);
- if (h == -1)continue;
- if (o[h] != "#")break;
- c = n
- }
- if (c > l) {
- var p = e.getLine(c).length;
- return new s(l, a, c, p)
- }
- }, this.getFoldWidget = function (e, t, n) {
- var r = e.getLine(n), i = r.search(/\S/), s = e.getLine(n + 1), o = e.getLine(n - 1), u = o.search(/\S/), a = s.search(/\S/);
- if (i == -1)return e.foldWidgets[n - 1] = u != -1 && u < a ? "start" : "", "";
- if (u == -1) {
- if (i == a && r[i] == "#" && s[i] == "#")return e.foldWidgets[n - 1] = "", e.foldWidgets[n + 1] = "", "start"
- } else if (u == i && r[i] == "#" && o[i] == "#" && e.getLine(n - 2).search(/\S/) == -1)return e.foldWidgets[n - 1] = "start", e.foldWidgets[n + 1] = "", "";
- return u != -1 && u < i ? e.foldWidgets[n - 1] = "start" : e.foldWidgets[n - 1] = "", i < a ? "start" : ""
- }
- }.call(o.prototype)
-})
\ No newline at end of file
diff --git a/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/mode-coldfusion.js b/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/mode-coldfusion.js
deleted file mode 100644
index a7e292d..0000000
--- a/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/mode-coldfusion.js
+++ /dev/null
@@ -1,584 +0,0 @@
-ace.define("ace/mode/coldfusion", ["require", "exports", "module", "ace/lib/oop", "ace/mode/xml", "ace/mode/javascript", "ace/mode/css", "ace/tokenizer", "ace/mode/coldfusion_highlight_rules"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("./xml").Mode, s = e("./javascript").Mode, o = e("./css").Mode, u = e("../tokenizer").Tokenizer, a = e("./coldfusion_highlight_rules").ColdfusionHighlightRules, f = function () {
- i.call(this);
- var e = new a;
- this.$tokenizer = new u(e.getRules()), this.$embeds = e.getEmbeds(), this.createModeDelegates({"js-": s, "css-": o})
- };
- r.inherits(f, i), function () {
- this.getNextLineIndent = function (e, t, n) {
- return this.$getIndent(t)
- }
- }.call(f.prototype), t.Mode = f
-}), ace.define("ace/mode/xml", ["require", "exports", "module", "ace/lib/oop", "ace/mode/text", "ace/tokenizer", "ace/mode/xml_highlight_rules", "ace/mode/behaviour/xml", "ace/mode/folding/xml"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("./text").Mode, s = e("../tokenizer").Tokenizer, o = e("./xml_highlight_rules").XmlHighlightRules, u = e("./behaviour/xml").XmlBehaviour, a = e("./folding/xml").FoldMode, f = function () {
- this.$tokenizer = new s((new o).getRules()), this.$behaviour = new u, this.foldingRules = new a
- };
- r.inherits(f, i), function () {
- this.getNextLineIndent = function (e, t, n) {
- return this.$getIndent(t)
- }
- }.call(f.prototype), t.Mode = f
-}), ace.define("ace/mode/xml_highlight_rules", ["require", "exports", "module", "ace/lib/oop", "ace/mode/xml_util", "ace/mode/text_highlight_rules"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("./xml_util"), s = e("./text_highlight_rules").TextHighlightRules, o = function () {
- this.$rules = {start: [
- {token: "text", regex: "<\\!\\[CDATA\\[", next: "cdata"},
- {token: "xml-pe", regex: "<\\?.*?\\?>"},
- {token: "comment", regex: "<\\!--", next: "comment"},
- {token: "xml-pe", regex: "<\\!.*?>"},
- {token: "meta.tag", regex: "<\\/?", next: "tag"},
- {token: "text", regex: "\\s+"},
- {token: "constant.character.entity", regex: "(?:[0-9]+;)|(?:[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}
- ], cdata: [
- {token: "text", regex: "\\]\\]>", next: "start"},
- {token: "text", regex: "\\s+"},
- {token: "text", regex: "(?:[^\\]]|\\](?!\\]>))+"}
- ], comment: [
- {token: "comment", regex: ".*?-->", next: "start"},
- {token: "comment", regex: ".+"}
- ]}, i.tag(this.$rules, "tag", "start")
- };
- r.inherits(o, s), t.XmlHighlightRules = o
-}), ace.define("ace/mode/xml_util", ["require", "exports", "module"], function (e, t, n) {
- function r(e) {
- return[
- {token: "string", regex: '"', next: e + "_qqstring"},
- {token: "string", regex: "'", next: e + "_qstring"}
- ]
- }
-
- function i(e, t) {
- return[
- {token: "string", regex: e, next: t},
- {token: "constant.language.escape", regex: "(?:[0-9]+;)|(?:[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"},
- {defaultToken: "string"}
- ]
- }
-
- t.tag = function (e, t, n, s) {
- e[t] = [
- {token: "text", regex: "\\s+"},
- {token: s ? function (e) {
- return s[e] ? "meta.tag.tag-name." + s[e] : "meta.tag.tag-name"
- } : "meta.tag.tag-name", regex: "[-_a-zA-Z0-9:]+", next: t + "_embed_attribute_list"},
- {token: "empty", regex: "", next: t + "_embed_attribute_list"}
- ], e[t + "_qstring"] = i("'", t + "_embed_attribute_list"), e[t + "_qqstring"] = i('"', t + "_embed_attribute_list"), e[t + "_embed_attribute_list"] = [
- {token: "meta.tag.r", regex: "/?>", next: n},
- {token: "keyword.operator", regex: "="},
- {token: "entity.other.attribute-name", regex: "[-_a-zA-Z0-9:]+"},
- {token: "constant.numeric", regex: "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},
- {token: "text", regex: "\\s+"}
- ].concat(r(t))
- }
-}), ace.define("ace/mode/behaviour/xml", ["require", "exports", "module", "ace/lib/oop", "ace/mode/behaviour", "ace/mode/behaviour/cstyle", "ace/token_iterator"], function (e, t, n) {
- function u(e, t) {
- var n = !0, r = e.type.split("."), i = t.split(".");
- return i.forEach(function (e) {
- if (r.indexOf(e) == -1)return n = !1, !1
- }), n
- }
-
- var r = e("../../lib/oop"), i = e("../behaviour").Behaviour, s = e("./cstyle").CstyleBehaviour, o = e("../../token_iterator").TokenIterator, a = function () {
- this.inherit(s, ["string_dquotes"]), this.add("autoclosing", "insertion", function (e, t, n, r, i) {
- if (i == ">") {
- var s = n.getCursorPosition(), a = new o(r, s.row, s.column), f = a.getCurrentToken(), l = !1;
- if (!f || !u(f, "meta.tag") && (!u(f, "text") || !f.value.match("/"))) {
- do f = a.stepBackward(); while (f && (u(f, "string") || u(f, "keyword.operator") || u(f, "entity.attribute-name") || u(f, "text")))
- } else l = !0;
- if (!f || !u(f, "meta.tag-name") || a.stepBackward().value.match("/"))return;
- var c = f.value;
- if (l)var c = c.substring(0, s.column - f.start);
- return{text: ">" + c + ">", selection: [1, 1]}
- }
- }), this.add("autoindent", "insertion", function (e, t, n, r, i) {
- if (i == "\n") {
- var s = n.getCursorPosition(), o = r.doc.getLine(s.row), u = o.substring(s.column, s.column + 2);
- if (u == "") {
- var a = this.$getIndent(r.doc.getLine(s.row)) + r.getTabString(), f = this.$getIndent(r.doc.getLine(s.row));
- return{text: "\n" + a + "\n" + f, selection: [1, a.length, 1, a.length]}
- }
- }
- })
- };
- r.inherits(a, i), t.XmlBehaviour = a
-}), ace.define("ace/mode/behaviour/cstyle", ["require", "exports", "module", "ace/lib/oop", "ace/mode/behaviour", "ace/token_iterator", "ace/lib/lang"], function (e, t, n) {
- var r = e("../../lib/oop"), i = e("../behaviour").Behaviour, s = e("../../token_iterator").TokenIterator, o = e("../../lib/lang"), u = ["text", "paren.rparen", "punctuation.operator"], a = ["text", "paren.rparen", "punctuation.operator", "comment"], f = 0, l = -1, c = "", h = 0, p = -1, d = "", v = "", m = function () {
- m.isSaneInsertion = function (e, t) {
- var n = e.getCursorPosition(), r = new s(t, n.row, n.column);
- if (!this.$matchTokenType(r.getCurrentToken() || "text", u)) {
- var i = new s(t, n.row, n.column + 1);
- if (!this.$matchTokenType(i.getCurrentToken() || "text", u))return!1
- }
- return r.stepForward(), r.getCurrentTokenRow() !== n.row || this.$matchTokenType(r.getCurrentToken() || "text", a)
- }, m.$matchTokenType = function (e, t) {
- return t.indexOf(e.type || e) > -1
- }, m.recordAutoInsert = function (e, t, n) {
- var r = e.getCursorPosition(), i = t.doc.getLine(r.row);
- this.isAutoInsertedClosing(r, i, c[0]) || (f = 0), l = r.row, c = n + i.substr(r.column), f++
- }, m.recordMaybeInsert = function (e, t, n) {
- var r = e.getCursorPosition(), i = t.doc.getLine(r.row);
- this.isMaybeInsertedClosing(r, i) || (h = 0), p = r.row, d = i.substr(0, r.column) + n, v = i.substr(r.column), h++
- }, m.isAutoInsertedClosing = function (e, t, n) {
- return f > 0 && e.row === l && n === c[0] && t.substr(e.column) === c
- }, m.isMaybeInsertedClosing = function (e, t) {
- return h > 0 && e.row === p && t.substr(e.column) === v && t.substr(0, e.column) == d
- }, m.popAutoInsertedClosing = function () {
- c = c.substr(1), f--
- }, m.clearMaybeInsertedClosing = function () {
- h = 0, p = -1
- }, this.add("braces", "insertion", function (e, t, n, r, i) {
- var s = n.getCursorPosition(), u = r.doc.getLine(s.row);
- if (i == "{") {
- var a = n.getSelectionRange(), f = r.doc.getTextRange(a);
- if (f !== "" && f !== "{" && n.getWrapBehavioursEnabled())return{text: "{" + f + "}", selection: !1};
- if (m.isSaneInsertion(n, r))return/[\]\}\)]/.test(u[s.column]) ? (m.recordAutoInsert(n, r, "}"), {text: "{}", selection: [1, 1]}) : (m.recordMaybeInsert(n, r, "{"), {text: "{", selection: [1, 1]})
- } else if (i == "}") {
- var l = u.substring(s.column, s.column + 1);
- if (l == "}") {
- var c = r.$findOpeningBracket("}", {column: s.column + 1, row: s.row});
- if (c !== null && m.isAutoInsertedClosing(s, u, i))return m.popAutoInsertedClosing(), {text: "", selection: [1, 1]}
- }
- } else if (i == "\n" || i == "\r\n") {
- var p = "";
- m.isMaybeInsertedClosing(s, u) && (p = o.stringRepeat("}", h), m.clearMaybeInsertedClosing());
- var l = u.substring(s.column, s.column + 1);
- if (l == "}" || p !== "") {
- var d = r.findMatchingBracket({row: s.row, column: s.column}, "}");
- if (!d)return null;
- var v = this.getNextLineIndent(e, u.substring(0, s.column), r.getTabString()), g = this.$getIndent(u);
- return{text: "\n" + v + "\n" + g + p, selection: [1, v.length, 1, v.length]}
- }
- }
- }), this.add("braces", "deletion", function (e, t, n, r, i) {
- var s = r.doc.getTextRange(i);
- if (!i.isMultiLine() && s == "{") {
- var o = r.doc.getLine(i.start.row), u = o.substring(i.end.column, i.end.column + 1);
- if (u == "}")return i.end.column++, i;
- h--
- }
- }), this.add("parens", "insertion", function (e, t, n, r, i) {
- if (i == "(") {
- var s = n.getSelectionRange(), o = r.doc.getTextRange(s);
- if (o !== "" && n.getWrapBehavioursEnabled())return{text: "(" + o + ")", selection: !1};
- if (m.isSaneInsertion(n, r))return m.recordAutoInsert(n, r, ")"), {text: "()", selection: [1, 1]}
- } else if (i == ")") {
- var u = n.getCursorPosition(), a = r.doc.getLine(u.row), f = a.substring(u.column, u.column + 1);
- if (f == ")") {
- var l = r.$findOpeningBracket(")", {column: u.column + 1, row: u.row});
- if (l !== null && m.isAutoInsertedClosing(u, a, i))return m.popAutoInsertedClosing(), {text: "", selection: [1, 1]}
- }
- }
- }), this.add("parens", "deletion", function (e, t, n, r, i) {
- var s = r.doc.getTextRange(i);
- if (!i.isMultiLine() && s == "(") {
- var o = r.doc.getLine(i.start.row), u = o.substring(i.start.column + 1, i.start.column + 2);
- if (u == ")")return i.end.column++, i
- }
- }), this.add("brackets", "insertion", function (e, t, n, r, i) {
- if (i == "[") {
- var s = n.getSelectionRange(), o = r.doc.getTextRange(s);
- if (o !== "" && n.getWrapBehavioursEnabled())return{text: "[" + o + "]", selection: !1};
- if (m.isSaneInsertion(n, r))return m.recordAutoInsert(n, r, "]"), {text: "[]", selection: [1, 1]}
- } else if (i == "]") {
- var u = n.getCursorPosition(), a = r.doc.getLine(u.row), f = a.substring(u.column, u.column + 1);
- if (f == "]") {
- var l = r.$findOpeningBracket("]", {column: u.column + 1, row: u.row});
- if (l !== null && m.isAutoInsertedClosing(u, a, i))return m.popAutoInsertedClosing(), {text: "", selection: [1, 1]}
- }
- }
- }), this.add("brackets", "deletion", function (e, t, n, r, i) {
- var s = r.doc.getTextRange(i);
- if (!i.isMultiLine() && s == "[") {
- var o = r.doc.getLine(i.start.row), u = o.substring(i.start.column + 1, i.start.column + 2);
- if (u == "]")return i.end.column++, i
- }
- }), this.add("string_dquotes", "insertion", function (e, t, n, r, i) {
- if (i == '"' || i == "'") {
- var s = i, o = n.getSelectionRange(), u = r.doc.getTextRange(o);
- if (u !== "" && u !== "'" && u != '"' && n.getWrapBehavioursEnabled())return{text: s + u + s, selection: !1};
- var a = n.getCursorPosition(), f = r.doc.getLine(a.row), l = f.substring(a.column - 1, a.column);
- if (l == "\\")return null;
- var c = r.getTokens(o.start.row), h = 0, p, d = -1;
- for (var v = 0; v < c.length; v++) {
- p = c[v], p.type == "string" ? d = -1 : d < 0 && (d = p.value.indexOf(s));
- if (p.value.length + h > o.start.column)break;
- h += c[v].value.length
- }
- if (!p || d < 0 && p.type !== "comment" && (p.type !== "string" || o.start.column !== p.value.length + h - 1 && p.value.lastIndexOf(s) === p.value.length - 1)) {
- if (!m.isSaneInsertion(n, r))return;
- return{text: s + s, selection: [1, 1]}
- }
- if (p && p.type === "string") {
- var g = f.substring(a.column, a.column + 1);
- if (g == s)return{text: "", selection: [1, 1]}
- }
- }
- }), this.add("string_dquotes", "deletion", function (e, t, n, r, i) {
- var s = r.doc.getTextRange(i);
- if (!i.isMultiLine() && (s == '"' || s == "'")) {
- var o = r.doc.getLine(i.start.row), u = o.substring(i.start.column + 1, i.start.column + 2);
- if (u == s)return i.end.column++, i
- }
- })
- };
- r.inherits(m, i), t.CstyleBehaviour = m
-}), ace.define("ace/mode/folding/xml", ["require", "exports", "module", "ace/lib/oop", "ace/lib/lang", "ace/range", "ace/mode/folding/fold_mode", "ace/token_iterator"], function (e, t, n) {
- var r = e("../../lib/oop"), i = e("../../lib/lang"), s = e("../../range").Range, o = e("./fold_mode").FoldMode, u = e("../../token_iterator").TokenIterator, a = t.FoldMode = function (e) {
- o.call(this), this.voidElements = e || {}
- };
- r.inherits(a, o), function () {
- this.getFoldWidget = function (e, t, n) {
- var r = this._getFirstTagInLine(e, n);
- return r.closing ? t == "markbeginend" ? "end" : "" : !r.tagName || this.voidElements[r.tagName.toLowerCase()] ? "" : r.selfClosing ? "" : r.value.indexOf("/" + r.tagName) !== -1 ? "" : "start"
- }, this._getFirstTagInLine = function (e, t) {
- var n = e.getTokens(t), r = "";
- for (var s = 0; s < n.length; s++) {
- var o = n[s];
- o.type.indexOf("meta.tag") === 0 ? r += o.value : r += i.stringRepeat(" ", o.value.length)
- }
- return this._parseTag(r)
- }, this.tagRe = /^(\s*)((\/?)([-_a-zA-Z0-9:!]*)\s*(\/?)>?)/, this._parseTag = function (e) {
- var t = this.tagRe.exec(e), n = this.tagRe.lastIndex || 0;
- return this.tagRe.lastIndex = 0, {value: e, match: t ? t[2] : "", closing: t ? !!t[3] : !1, selfClosing: t ? !!t[5] || t[2] == "/>" : !1, tagName: t ? t[4] : "", column: t[1] ? n + t[1].length : n}
- }, this._readTagForward = function (e) {
- var t = e.getCurrentToken();
- if (!t)return null;
- var n = "", r;
- do if (t.type.indexOf("meta.tag") === 0) {
- if (!r)var r = {row: e.getCurrentTokenRow(), column: e.getCurrentTokenColumn()};
- n += t.value;
- if (n.indexOf(">") !== -1) {
- var i = this._parseTag(n);
- return i.start = r, i.end = {row: e.getCurrentTokenRow(), column: e.getCurrentTokenColumn() + t.value.length}, e.stepForward(), i
- }
- } while (t = e.stepForward());
- return null
- }, this._readTagBackward = function (e) {
- var t = e.getCurrentToken();
- if (!t)return null;
- var n = "", r;
- do if (t.type.indexOf("meta.tag") === 0) {
- r || (r = {row: e.getCurrentTokenRow(), column: e.getCurrentTokenColumn() + t.value.length}), n = t.value + n;
- if (n.indexOf("<") !== -1) {
- var i = this._parseTag(n);
- return i.end = r, i.start = {row: e.getCurrentTokenRow(), column: e.getCurrentTokenColumn()}, e.stepBackward(), i
- }
- } while (t = e.stepBackward());
- return null
- }, this._pop = function (e, t) {
- while (e.length) {
- var n = e[e.length - 1];
- if (!t || n.tagName == t.tagName)return e.pop();
- if (this.voidElements[t.tagName])return;
- if (this.voidElements[n.tagName]) {
- e.pop();
- continue
- }
- return null
- }
- }, this.getFoldWidgetRange = function (e, t, n) {
- var r = this._getFirstTagInLine(e, n);
- if (!r.match)return null;
- var i = r.closing || r.selfClosing, o = [], a;
- if (!i) {
- var f = new u(e, n, r.column), l = {row: n, column: r.column + r.tagName.length + 2};
- while (a = this._readTagForward(f)) {
- if (a.selfClosing) {
- if (!o.length)return a.start.column += a.tagName.length + 2, a.end.column -= 2, s.fromPoints(a.start, a.end);
- continue
- }
- if (a.closing) {
- this._pop(o, a);
- if (o.length == 0)return s.fromPoints(l, a.start)
- } else o.push(a)
- }
- } else {
- var f = new u(e, n, r.column + r.match.length), c = {row: n, column: r.column};
- while (a = this._readTagBackward(f)) {
- if (a.selfClosing) {
- if (!o.length)return a.start.column += a.tagName.length + 2, a.end.column -= 2, s.fromPoints(a.start, a.end);
- continue
- }
- if (!a.closing) {
- this._pop(o, a);
- if (o.length == 0)return a.start.column += a.tagName.length + 2, s.fromPoints(a.start, c)
- } else o.push(a)
- }
- }
- }
- }.call(a.prototype)
-}), ace.define("ace/mode/javascript", ["require", "exports", "module", "ace/lib/oop", "ace/mode/text", "ace/tokenizer", "ace/mode/javascript_highlight_rules", "ace/mode/matching_brace_outdent", "ace/range", "ace/worker/worker_client", "ace/mode/behaviour/cstyle", "ace/mode/folding/cstyle"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("./text").Mode, s = e("../tokenizer").Tokenizer, o = e("./javascript_highlight_rules").JavaScriptHighlightRules, u = e("./matching_brace_outdent").MatchingBraceOutdent, a = e("../range").Range, f = e("../worker/worker_client").WorkerClient, l = e("./behaviour/cstyle").CstyleBehaviour, c = e("./folding/cstyle").FoldMode, h = function () {
- this.$tokenizer = new s((new o).getRules()), this.$outdent = new u, this.$behaviour = new l, this.foldingRules = new c
- };
- r.inherits(h, i), function () {
- this.toggleCommentLines = function (e, t, n, r) {
- var i = !0, s = /^(\s*)\/\//;
- for (var o = n; o <= r; o++)if (!s.test(t.getLine(o))) {
- i = !1;
- break
- }
- if (i) {
- var u = new a(0, 0, 0, 0);
- for (var o = n; o <= r; o++) {
- var f = t.getLine(o), l = f.match(s);
- u.start.row = o, u.end.row = o, u.end.column = l[0].length, t.replace(u, l[1])
- }
- } else t.indentRows(n, r, "//")
- }, this.getNextLineIndent = function (e, t, n) {
- var r = this.$getIndent(t), i = this.$tokenizer.getLineTokens(t, e), s = i.tokens, o = i.state;
- if (s.length && s[s.length - 1].type == "comment")return r;
- if (e == "start" || e == "regex_allowed") {
- var u = t.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/);
- u && (r += n)
- } else if (e == "doc-start") {
- if (o == "start" || e == "regex_allowed")return"";
- var u = t.match(/^\s*(\/?)\*/);
- u && (u[1] && (r += " "), r += "* ")
- }
- return r
- }, this.checkOutdent = function (e, t, n) {
- return this.$outdent.checkOutdent(t, n)
- }, this.autoOutdent = function (e, t, n) {
- this.$outdent.autoOutdent(t, n)
- }, this.createWorker = function (e) {
- var t = new f(["ace"], "ace/mode/javascript_worker", "JavaScriptWorker");
- return t.attachToDocument(e.getDocument()), t.on("jslint", function (t) {
- e.setAnnotations(t.data)
- }), t.on("terminate", function () {
- e.clearAnnotations()
- }), t
- }
- }.call(h.prototype), t.Mode = h
-}), ace.define("ace/mode/javascript_highlight_rules", ["require", "exports", "module", "ace/lib/oop", "ace/mode/doc_comment_highlight_rules", "ace/mode/text_highlight_rules"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("./doc_comment_highlight_rules").DocCommentHighlightRules, s = e("./text_highlight_rules").TextHighlightRules, o = function () {
- var e = this.createKeywordMapper({"variable.language": "Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document", keyword: "const|yield|import|get|set|break|case|catch|continue|default|delete|do|else|finally|for|function|if|in|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|__parent__|__count__|escape|unescape|with|__proto__|class|enum|extends|super|export|implements|private|public|interface|package|protected|static", "storage.type": "const|let|var|function", "constant.language": "null|Infinity|NaN|undefined", "support.function": "alert", "constant.language.boolean": "true|false"}, "identifier"), t = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void", n = "[a-zA-Z\\$_¡-￿][a-zA-Z\\d\\$_¡-￿]*\\b", r = "\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|[0-2][0-7]{0,2}|3[0-6][0-7]?|37[0-7]?|[4-7][0-7]?|.)";
- this.$rules = {start: [
- {token: "comment", regex: /\/\/.*$/},
- i.getStartRule("doc-start"),
- {token: "comment", regex: /\/\*/, next: "comment"},
- {token: "string", regex: "'(?=.)", next: "qstring"},
- {token: "string", regex: '"(?=.)', next: "qqstring"},
- {token: "constant.numeric", regex: /0[xX][0-9a-fA-F]+\b/},
- {token: "constant.numeric", regex: /[+-]?\d+(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?\b/},
- {token: ["storage.type", "punctuation.operator", "support.function", "punctuation.operator", "entity.name.function", "text", "keyword.operator"], regex: "(" + n + ")(\\.)(prototype)(\\.)(" + n + ")(\\s*)(=)", next: "function_arguments"},
- {token: ["storage.type", "punctuation.operator", "entity.name.function", "text", "keyword.operator", "text", "storage.type", "text", "paren.lparen"], regex: "(" + n + ")(\\.)(" + n + ")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", next: "function_arguments"},
- {token: ["entity.name.function", "text", "keyword.operator", "text", "storage.type", "text", "paren.lparen"], regex: "(" + n + ")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", next: "function_arguments"},
- {token: ["storage.type", "punctuation.operator", "entity.name.function", "text", "keyword.operator", "text", "storage.type", "text", "entity.name.function", "text", "paren.lparen"], regex: "(" + n + ")(\\.)(" + n + ")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()", next: "function_arguments"},
- {token: ["storage.type", "text", "entity.name.function", "text", "paren.lparen"], regex: "(function)(\\s+)(" + n + ")(\\s*)(\\()", next: "function_arguments"},
- {token: ["entity.name.function", "text", "punctuation.operator", "text", "storage.type", "text", "paren.lparen"], regex: "(" + n + ")(\\s*)(:)(\\s*)(function)(\\s*)(\\()", next: "function_arguments"},
- {token: ["text", "text", "storage.type", "text", "paren.lparen"], regex: "(:)(\\s*)(function)(\\s*)(\\()", next: "function_arguments"},
- {token: "keyword", regex: "(?:" + t + ")\\b", next: "regex_allowed"},
- {token: ["punctuation.operator", "support.function"], regex: /(\.)(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:opzzzz|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/},
- {token: ["punctuation.operator", "support.function.dom"], regex: /(\.)(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/},
- {token: ["punctuation.operator", "support.constant"], regex: /(\.)(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/},
- {token: ["storage.type", "punctuation.operator", "support.function.firebug"], regex: /(console)(\.)(warn|info|log|error|time|timeEnd|assert)\b/},
- {token: e, regex: n},
- {token: "keyword.operator", regex: /--|\+\+|[!$%&*+\-~]|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|\*=|%=|\+=|\-=|&=|\^=/, next: "regex_allowed"},
- {token: "punctuation.operator", regex: /\?|\:|\,|\;|\./, next: "regex_allowed"},
- {token: "paren.lparen", regex: /[\[({]/, next: "regex_allowed"},
- {token: "paren.rparen", regex: /[\])}]/},
- {token: "keyword.operator", regex: /\/=?/, next: "regex_allowed"},
- {token: "comment", regex: /^#!.*$/}
- ], regex_allowed: [i.getStartRule("doc-start"), {token: "comment", regex: "\\/\\*", next: "comment_regex_allowed"}, {token: "comment", regex: "\\/\\/.*$"}, {token: "string.regexp", regex: "\\/", next: "regex"}, {token: "text", regex: "\\s+"}, {token: "empty", regex: "", next: "start"}], regex: [
- {token: "regexp.keyword.operator", regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},
- {token: "string.regexp", regex: "/\\w*", next: "start"},
- {token: "invalid", regex: /\{\d+,?(?:\d+)?}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/},
- {token: "constant.language.escape", regex: /\(\?[:=!]|\)|{\d+,?(?:\d+)?}|{,\d+}|[+*]\?|[()$^+*?]/},
- {token: "constant.language.delimiter", regex: /\|/},
- {token: "constant.language.escape", regex: /\[\^?/, next: "regex_character_class"},
- {token: "empty", regex: "$", next: "start"},
- {defaultToken: "string.regexp"}
- ], regex_character_class: [
- {token: "regexp.keyword.operator", regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},
- {token: "constant.language.escape", regex: "]", next: "regex"},
- {token: "constant.language.escape", regex: "-"},
- {token: "empty", regex: "$", next: "start"},
- {defaultToken: "string.regexp.charachterclass"}
- ], function_arguments: [
- {token: "variable.parameter", regex: n},
- {token: "punctuation.operator", regex: "[, ]+"},
- {token: "punctuation.operator", regex: "$"},
- {token: "empty", regex: "", next: "start"}
- ], comment_regex_allowed: [
- {token: "comment", regex: "\\*\\/", next: "regex_allowed"},
- {defaultToken: "comment"}
- ], comment: [
- {token: "comment", regex: "\\*\\/", next: "start"},
- {defaultToken: "comment"}
- ], qqstring: [
- {token: "constant.language.escape", regex: r},
- {token: "string", regex: "\\\\$", next: "qqstring"},
- {token: "string", regex: '"|$', next: "start"},
- {defaultToken: "string"}
- ], qstring: [
- {token: "constant.language.escape", regex: r},
- {token: "string", regex: "\\\\$", next: "qstring"},
- {token: "string", regex: "'|$", next: "start"},
- {defaultToken: "string"}
- ]}, this.embedRules(i, "doc-", [i.getEndRule("start")])
- };
- r.inherits(o, s), t.JavaScriptHighlightRules = o
-}), ace.define("ace/mode/doc_comment_highlight_rules", ["require", "exports", "module", "ace/lib/oop", "ace/mode/text_highlight_rules"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("./text_highlight_rules").TextHighlightRules, s = function () {
- this.$rules = {start: [
- {token: "comment.doc.tag", regex: "@[\\w\\d_]+"},
- {token: "comment.doc.tag", regex: "\\bTODO\\b"},
- {defaultToken: "comment.doc"}
- ]}
- };
- r.inherits(s, i), s.getStartRule = function (e) {
- return{token: "comment.doc", regex: "\\/\\*(?=\\*)", next: e}
- }, s.getEndRule = function (e) {
- return{token: "comment.doc", regex: "\\*\\/", next: e}
- }, t.DocCommentHighlightRules = s
-}), ace.define("ace/mode/matching_brace_outdent", ["require", "exports", "module", "ace/range"], function (e, t, n) {
- var r = e("../range").Range, i = function () {
- };
- (function () {
- this.checkOutdent = function (e, t) {
- return/^\s+$/.test(e) ? /^\s*\}/.test(t) : !1
- }, this.autoOutdent = function (e, t) {
- var n = e.getLine(t), i = n.match(/^(\s*\})/);
- if (!i)return 0;
- var s = i[1].length, o = e.findMatchingBracket({row: t, column: s});
- if (!o || o.row == t)return 0;
- var u = this.$getIndent(e.getLine(o.row));
- e.replace(new r(t, 0, t, s - 1), u)
- }, this.$getIndent = function (e) {
- var t = e.match(/^(\s+)/);
- return t ? t[1] : ""
- }
- }).call(i.prototype), t.MatchingBraceOutdent = i
-}), ace.define("ace/mode/folding/cstyle", ["require", "exports", "module", "ace/lib/oop", "ace/range", "ace/mode/folding/fold_mode"], function (e, t, n) {
- var r = e("../../lib/oop"), i = e("../../range").Range, s = e("./fold_mode").FoldMode, o = t.FoldMode = function () {
- };
- r.inherits(o, s), function () {
- this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/, this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/, this.getFoldWidgetRange = function (e, t, n) {
- var r = e.getLine(n), i = r.match(this.foldingStartMarker);
- if (i) {
- var s = i.index;
- return i[1] ? this.openingBracketBlock(e, i[1], n, s) : e.getCommentFoldRange(n, s + i[0].length, 1)
- }
- if (t !== "markbeginend")return;
- var i = r.match(this.foldingStopMarker);
- if (i) {
- var s = i.index + i[0].length;
- return i[1] ? this.closingBracketBlock(e, i[1], n, s) : e.getCommentFoldRange(n, s, -1)
- }
- }
- }.call(o.prototype)
-}), ace.define("ace/mode/css", ["require", "exports", "module", "ace/lib/oop", "ace/mode/text", "ace/tokenizer", "ace/mode/css_highlight_rules", "ace/mode/matching_brace_outdent", "ace/worker/worker_client", "ace/mode/behaviour/css", "ace/mode/folding/cstyle"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("./text").Mode, s = e("../tokenizer").Tokenizer, o = e("./css_highlight_rules").CssHighlightRules, u = e("./matching_brace_outdent").MatchingBraceOutdent, a = e("../worker/worker_client").WorkerClient, f = e("./behaviour/css").CssBehaviour, l = e("./folding/cstyle").FoldMode, c = function () {
- this.$tokenizer = new s((new o).getRules(), "i"), this.$outdent = new u, this.$behaviour = new f, this.foldingRules = new l
- };
- r.inherits(c, i), function () {
- this.foldingRules = "cStyle", this.getNextLineIndent = function (e, t, n) {
- var r = this.$getIndent(t), i = this.$tokenizer.getLineTokens(t, e).tokens;
- if (i.length && i[i.length - 1].type == "comment")return r;
- var s = t.match(/^.*\{\s*$/);
- return s && (r += n), r
- }, this.checkOutdent = function (e, t, n) {
- return this.$outdent.checkOutdent(t, n)
- }, this.autoOutdent = function (e, t, n) {
- this.$outdent.autoOutdent(t, n)
- }, this.createWorker = function (e) {
- var t = new a(["ace"], "ace/mode/css_worker", "Worker");
- return t.attachToDocument(e.getDocument()), t.on("csslint", function (t) {
- e.setAnnotations(t.data)
- }), t.on("terminate", function () {
- e.clearAnnotations()
- }), t
- }
- }.call(c.prototype), t.Mode = c
-}), ace.define("ace/mode/css_highlight_rules", ["require", "exports", "module", "ace/lib/oop", "ace/lib/lang", "ace/mode/text_highlight_rules"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("../lib/lang"), s = e("./text_highlight_rules").TextHighlightRules, o = t.supportType = "animation-fill-mode|alignment-adjust|alignment-baseline|animation-delay|animation-direction|animation-duration|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|animation|appearance|azimuth|backface-visibility|background-attachment|background-break|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|background|baseline-shift|binding|bleed|bookmark-label|bookmark-level|bookmark-state|bookmark-target|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|border|bottom|box-align|box-decoration-break|box-direction|box-flex-group|box-flex|box-lines|box-ordinal-group|box-orient|box-pack|box-shadow|box-sizing|break-after|break-before|break-inside|caption-side|clear|clip|color-profile|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|crop|cue-after|cue-before|cue|cursor|direction|display|dominant-baseline|drop-initial-after-adjust|drop-initial-after-align|drop-initial-before-adjust|drop-initial-before-align|drop-initial-size|drop-initial-value|elevation|empty-cells|fit|fit-position|float-offset|float|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|font|grid-columns|grid-rows|hanging-punctuation|height|hyphenate-after|hyphenate-before|hyphenate-character|hyphenate-lines|hyphenate-resource|hyphens|icon|image-orientation|image-rendering|image-resolution|inline-box-align|left|letter-spacing|line-height|line-stacking-ruby|line-stacking-shift|line-stacking-strategy|line-stacking|list-style-image|list-style-position|list-style-type|list-style|margin-bottom|margin-left|margin-right|margin-top|margin|mark-after|mark-before|mark|marks|marquee-direction|marquee-play-count|marquee-speed|marquee-style|max-height|max-width|min-height|min-width|move-to|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|orphans|outline-color|outline-offset|outline-style|outline-width|outline|overflow-style|overflow-x|overflow-y|overflow|padding-bottom|padding-left|padding-right|padding-top|padding|page-break-after|page-break-before|page-break-inside|page-policy|page|pause-after|pause-before|pause|perspective-origin|perspective|phonemes|pitch-range|pitch|play-during|position|presentation-level|punctuation-trim|quotes|rendering-intent|resize|rest-after|rest-before|rest|richness|right|rotation-point|rotation|ruby-align|ruby-overhang|ruby-position|ruby-span|size|speak-header|speak-numeral|speak-punctuation|speak|speech-rate|stress|string-set|table-layout|target-name|target-new|target-position|target|text-align-last|text-align|text-decoration|text-emphasis|text-height|text-indent|text-justify|text-outline|text-shadow|text-transform|text-wrap|top|transform-origin|transform-style|transform|transition-delay|transition-duration|transition-property|transition-timing-function|transition|unicode-bidi|vertical-align|visibility|voice-balance|voice-duration|voice-family|voice-pitch-range|voice-pitch|voice-rate|voice-stress|voice-volume|volume|white-space-collapse|white-space|widows|width|word-break|word-spacing|word-wrap|z-index", u = t.supportFunction = "rgb|rgba|url|attr|counter|counters", a = t.supportConstant = "absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero", f = t.supportConstantColor = "aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow", l = t.supportConstantFonts = "arial|century|comic|courier|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace", c = t.numRe = "\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))", h = t.pseudoElements = "(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b", p = t.pseudoClasses = "(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b", d = function () {
- var e = this.createKeywordMapper({"support.function": u, "support.constant": a, "support.type": o, "support.constant.color": f, "support.constant.fonts": l}, "text", !0), t = [
- {token: "comment", regex: "\\/\\*", next: "ruleset_comment"},
- {token: "string", regex: '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},
- {token: "string", regex: "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},
- {token: ["constant.numeric", "keyword"], regex: "(" + c + ")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vm|vw|%)"},
- {token: "constant.numeric", regex: c},
- {token: "constant.numeric", regex: "#[a-f0-9]{6}"},
- {token: "constant.numeric", regex: "#[a-f0-9]{3}"},
- {token: ["punctuation", "entity.other.attribute-name.pseudo-element.css"], regex: h},
- {token: ["punctuation", "entity.other.attribute-name.pseudo-class.css"], regex: p},
- {token: e, regex: "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"}
- ], n = i.copyArray(t);
- n.unshift({token: "paren.rparen", regex: "\\}", next: "start"});
- var r = i.copyArray(t);
- r.unshift({token: "paren.rparen", regex: "\\}", next: "media"});
- var s = [
- {token: "comment", regex: ".+"}
- ], d = i.copyArray(s);
- d.unshift({token: "comment", regex: ".*?\\*\\/", next: "start"});
- var v = i.copyArray(s);
- v.unshift({token: "comment", regex: ".*?\\*\\/", next: "media"});
- var m = i.copyArray(s);
- m.unshift({token: "comment", regex: ".*?\\*\\/", next: "ruleset"}), this.$rules = {start: [
- {token: "comment", regex: "\\/\\*", next: "comment"},
- {token: "paren.lparen", regex: "\\{", next: "ruleset"},
- {token: "string", regex: "@.*?{", next: "media"},
- {token: "keyword", regex: "#[a-z0-9-_]+"},
- {token: "variable", regex: "\\.[a-z0-9-_]+"},
- {token: "string", regex: ":[a-z0-9-_]+"},
- {token: "constant", regex: "[a-z0-9-_]+"}
- ], media: [
- {token: "comment", regex: "\\/\\*", next: "media_comment"},
- {token: "paren.lparen", regex: "\\{", next: "media_ruleset"},
- {token: "string", regex: "\\}", next: "start"},
- {token: "keyword", regex: "#[a-z0-9-_]+"},
- {token: "variable", regex: "\\.[a-z0-9-_]+"},
- {token: "string", regex: ":[a-z0-9-_]+"},
- {token: "constant", regex: "[a-z0-9-_]+"}
- ], comment: d, ruleset: n, ruleset_comment: m, media_ruleset: r, media_comment: v}
- };
- r.inherits(d, s), t.CssHighlightRules = d
-}), ace.define("ace/mode/behaviour/css", ["require", "exports", "module", "ace/lib/oop", "ace/mode/behaviour", "ace/mode/behaviour/cstyle", "ace/token_iterator"], function (e, t, n) {
- var r = e("../../lib/oop"), i = e("../behaviour").Behaviour, s = e("./cstyle").CstyleBehaviour, o = e("../../token_iterator").TokenIterator, u = function () {
- this.inherit(s), this.add("colon", "insertion", function (e, t, n, r, i) {
- if (i === ":") {
- var s = n.getCursorPosition(), u = new o(r, s.row, s.column), a = u.getCurrentToken();
- a && a.value.match(/\s+/) && (a = u.stepBackward());
- if (a && a.type === "support.type") {
- var f = r.doc.getLine(s.row), l = f.substring(s.column, s.column + 1);
- if (l === ":")return{text: "", selection: [1, 1]};
- if (!f.substring(s.column).match(/^\s*;/))return{text: ":;", selection: [1, 1]}
- }
- }
- }), this.add("colon", "deletion", function (e, t, n, r, i) {
- var s = r.doc.getTextRange(i);
- if (!i.isMultiLine() && s === ":") {
- var o = r.doc.getLine(i.start.row), u = o.substring(i.end.column, i.end.column + 1);
- if (u === ";")return i.end.column++, i
- }
- }), this.add("semicolon", "insertion", function (e, t, n, r, i) {
- if (i === ";") {
- var s = n.getCursorPosition(), o = r.doc.getLine(s.row), u = o.substring(s.column, s.column + 1);
- if (u === ";")return{text: "", selection: [1, 1]}
- }
- })
- };
- r.inherits(u, s), t.CssBehaviour = u
-}), ace.define("ace/mode/coldfusion_highlight_rules", ["require", "exports", "module", "ace/lib/oop", "ace/mode/css_highlight_rules", "ace/mode/javascript_highlight_rules", "ace/mode/text_highlight_rules", "ace/mode/xml_util"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("./css_highlight_rules").CssHighlightRules, s = e("./javascript_highlight_rules").JavaScriptHighlightRules, o = e("./text_highlight_rules").TextHighlightRules, u = e("./xml_util"), a = function () {
- this.$rules = {start: [
- {token: "text", regex: "<\\!\\[CDATA\\[", next: "cdata"},
- {token: "xml-pe", regex: "<\\?.*?\\?>"},
- {token: "comment", regex: "<\\!--", next: "comment"},
- {token: "meta.tag", regex: "<(?=script)", next: "script"},
- {token: "meta.tag", regex: "<(?=style)", next: "style"},
- {token: "meta.tag", regex: "<\\/?", next: "tag"}
- ], cdata: [
- {token: "text", regex: "\\]\\]>", next: "start"}
- ], comment: [
- {token: "comment", regex: ".*?-->", next: "start"},
- {defaultToken: "comment"}
- ]}, u.tag(this.$rules, "tag", "start"), u.tag(this.$rules, "style", "css-start"), u.tag(this.$rules, "script", "js-start"), this.embedRules(s, "js-", [
- {token: "comment", regex: "\\/\\/.*(?=<\\/script>)", next: "tag"},
- {token: "meta.tag", regex: "<\\/(?=script)", next: "tag"}
- ]), this.embedRules(i, "css-", [
- {token: "meta.tag", regex: "<\\/(?=style)", next: "tag"}
- ])
- };
- r.inherits(a, o), t.ColdfusionHighlightRules = a
-})
\ No newline at end of file
diff --git a/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/mode-csharp.js b/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/mode-csharp.js
deleted file mode 100644
index b4099c7..0000000
--- a/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/mode-csharp.js
+++ /dev/null
@@ -1,217 +0,0 @@
-ace.define("ace/mode/csharp", ["require", "exports", "module", "ace/lib/oop", "ace/mode/text", "ace/tokenizer", "ace/mode/csharp_highlight_rules", "ace/mode/matching_brace_outdent", "ace/mode/behaviour/cstyle", "ace/mode/folding/cstyle"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("./text").Mode, s = e("../tokenizer").Tokenizer, o = e("./csharp_highlight_rules").CSharpHighlightRules, u = e("./matching_brace_outdent").MatchingBraceOutdent, a = e("./behaviour/cstyle").CstyleBehaviour, f = e("./folding/cstyle").FoldMode, l = function () {
- this.$tokenizer = new s((new o).getRules()), this.$outdent = new u, this.$behaviour = new a, this.foldingRules = new f
- };
- r.inherits(l, i), function () {
- this.getNextLineIndent = function (e, t, n) {
- var r = this.$getIndent(t), i = this.$tokenizer.getLineTokens(t, e), s = i.tokens;
- if (s.length && s[s.length - 1].type == "comment")return r;
- if (e == "start") {
- var o = t.match(/^.*[\{\(\[]\s*$/);
- o && (r += n)
- }
- return r
- }, this.checkOutdent = function (e, t, n) {
- return this.$outdent.checkOutdent(t, n)
- }, this.autoOutdent = function (e, t, n) {
- this.$outdent.autoOutdent(t, n)
- }, this.createWorker = function (e) {
- return null
- }
- }.call(l.prototype), t.Mode = l
-}), ace.define("ace/mode/csharp_highlight_rules", ["require", "exports", "module", "ace/lib/oop", "ace/mode/doc_comment_highlight_rules", "ace/mode/text_highlight_rules"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("./doc_comment_highlight_rules").DocCommentHighlightRules, s = e("./text_highlight_rules").TextHighlightRules, o = function () {
- var e = this.createKeywordMapper({"variable.language": "this", keyword: "abstract|event|new|struct|as|explicit|null|switch|base|extern|object|this|bool|false|operator|throw|break|finally|out|true|byte|fixed|override|try|case|float|params|typeof|catch|for|private|uint|char|foreach|protected|ulong|checked|goto|public|unchecked|class|if|readonly|unsafe|const|implicit|ref|ushort|continue|in|return|using|decimal|int|sbyte|virtual|default|interface|sealed|volatile|delegate|internal|short|void|do|is|sizeof|while|double|lock|stackalloc|else|long|static|enum|namespace|string|var|dynamic", "constant.language": "null|true|false"}, "identifier");
- this.$rules = {start: [
- {token: "comment", regex: "\\/\\/.*$"},
- i.getStartRule("doc-start"),
- {token: "comment", regex: "\\/\\*", next: "comment"},
- {token: "string.regexp", regex: "[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/]\\w*\\s*(?=[).,;]|$)"},
- {token: "string", regex: '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},
- {token: "string", regex: "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},
- {token: "constant.numeric", regex: "0[xX][0-9a-fA-F]+\\b"},
- {token: "constant.numeric", regex: "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},
- {token: "constant.language.boolean", regex: "(?:true|false)\\b"},
- {token: e, regex: "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},
- {token: "keyword.operator", regex: "!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)"},
- {token: "punctuation.operator", regex: "\\?|\\:|\\,|\\;|\\."},
- {token: "paren.lparen", regex: "[[({]"},
- {token: "paren.rparen", regex: "[\\])}]"},
- {token: "text", regex: "\\s+"}
- ], comment: [
- {token: "comment", regex: ".*?\\*\\/", next: "start"},
- {token: "comment", regex: ".+"}
- ]}, this.embedRules(i, "doc-", [i.getEndRule("start")])
- };
- r.inherits(o, s), t.CSharpHighlightRules = o
-}), ace.define("ace/mode/doc_comment_highlight_rules", ["require", "exports", "module", "ace/lib/oop", "ace/mode/text_highlight_rules"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("./text_highlight_rules").TextHighlightRules, s = function () {
- this.$rules = {start: [
- {token: "comment.doc.tag", regex: "@[\\w\\d_]+"},
- {token: "comment.doc.tag", regex: "\\bTODO\\b"},
- {defaultToken: "comment.doc"}
- ]}
- };
- r.inherits(s, i), s.getStartRule = function (e) {
- return{token: "comment.doc", regex: "\\/\\*(?=\\*)", next: e}
- }, s.getEndRule = function (e) {
- return{token: "comment.doc", regex: "\\*\\/", next: e}
- }, t.DocCommentHighlightRules = s
-}), ace.define("ace/mode/matching_brace_outdent", ["require", "exports", "module", "ace/range"], function (e, t, n) {
- var r = e("../range").Range, i = function () {
- };
- (function () {
- this.checkOutdent = function (e, t) {
- return/^\s+$/.test(e) ? /^\s*\}/.test(t) : !1
- }, this.autoOutdent = function (e, t) {
- var n = e.getLine(t), i = n.match(/^(\s*\})/);
- if (!i)return 0;
- var s = i[1].length, o = e.findMatchingBracket({row: t, column: s});
- if (!o || o.row == t)return 0;
- var u = this.$getIndent(e.getLine(o.row));
- e.replace(new r(t, 0, t, s - 1), u)
- }, this.$getIndent = function (e) {
- var t = e.match(/^(\s+)/);
- return t ? t[1] : ""
- }
- }).call(i.prototype), t.MatchingBraceOutdent = i
-}), ace.define("ace/mode/behaviour/cstyle", ["require", "exports", "module", "ace/lib/oop", "ace/mode/behaviour", "ace/token_iterator", "ace/lib/lang"], function (e, t, n) {
- var r = e("../../lib/oop"), i = e("../behaviour").Behaviour, s = e("../../token_iterator").TokenIterator, o = e("../../lib/lang"), u = ["text", "paren.rparen", "punctuation.operator"], a = ["text", "paren.rparen", "punctuation.operator", "comment"], f = 0, l = -1, c = "", h = 0, p = -1, d = "", v = "", m = function () {
- m.isSaneInsertion = function (e, t) {
- var n = e.getCursorPosition(), r = new s(t, n.row, n.column);
- if (!this.$matchTokenType(r.getCurrentToken() || "text", u)) {
- var i = new s(t, n.row, n.column + 1);
- if (!this.$matchTokenType(i.getCurrentToken() || "text", u))return!1
- }
- return r.stepForward(), r.getCurrentTokenRow() !== n.row || this.$matchTokenType(r.getCurrentToken() || "text", a)
- }, m.$matchTokenType = function (e, t) {
- return t.indexOf(e.type || e) > -1
- }, m.recordAutoInsert = function (e, t, n) {
- var r = e.getCursorPosition(), i = t.doc.getLine(r.row);
- this.isAutoInsertedClosing(r, i, c[0]) || (f = 0), l = r.row, c = n + i.substr(r.column), f++
- }, m.recordMaybeInsert = function (e, t, n) {
- var r = e.getCursorPosition(), i = t.doc.getLine(r.row);
- this.isMaybeInsertedClosing(r, i) || (h = 0), p = r.row, d = i.substr(0, r.column) + n, v = i.substr(r.column), h++
- }, m.isAutoInsertedClosing = function (e, t, n) {
- return f > 0 && e.row === l && n === c[0] && t.substr(e.column) === c
- }, m.isMaybeInsertedClosing = function (e, t) {
- return h > 0 && e.row === p && t.substr(e.column) === v && t.substr(0, e.column) == d
- }, m.popAutoInsertedClosing = function () {
- c = c.substr(1), f--
- }, m.clearMaybeInsertedClosing = function () {
- h = 0, p = -1
- }, this.add("braces", "insertion", function (e, t, n, r, i) {
- var s = n.getCursorPosition(), u = r.doc.getLine(s.row);
- if (i == "{") {
- var a = n.getSelectionRange(), f = r.doc.getTextRange(a);
- if (f !== "" && f !== "{" && n.getWrapBehavioursEnabled())return{text: "{" + f + "}", selection: !1};
- if (m.isSaneInsertion(n, r))return/[\]\}\)]/.test(u[s.column]) ? (m.recordAutoInsert(n, r, "}"), {text: "{}", selection: [1, 1]}) : (m.recordMaybeInsert(n, r, "{"), {text: "{", selection: [1, 1]})
- } else if (i == "}") {
- var l = u.substring(s.column, s.column + 1);
- if (l == "}") {
- var c = r.$findOpeningBracket("}", {column: s.column + 1, row: s.row});
- if (c !== null && m.isAutoInsertedClosing(s, u, i))return m.popAutoInsertedClosing(), {text: "", selection: [1, 1]}
- }
- } else if (i == "\n" || i == "\r\n") {
- var p = "";
- m.isMaybeInsertedClosing(s, u) && (p = o.stringRepeat("}", h), m.clearMaybeInsertedClosing());
- var l = u.substring(s.column, s.column + 1);
- if (l == "}" || p !== "") {
- var d = r.findMatchingBracket({row: s.row, column: s.column}, "}");
- if (!d)return null;
- var v = this.getNextLineIndent(e, u.substring(0, s.column), r.getTabString()), g = this.$getIndent(u);
- return{text: "\n" + v + "\n" + g + p, selection: [1, v.length, 1, v.length]}
- }
- }
- }), this.add("braces", "deletion", function (e, t, n, r, i) {
- var s = r.doc.getTextRange(i);
- if (!i.isMultiLine() && s == "{") {
- var o = r.doc.getLine(i.start.row), u = o.substring(i.end.column, i.end.column + 1);
- if (u == "}")return i.end.column++, i;
- h--
- }
- }), this.add("parens", "insertion", function (e, t, n, r, i) {
- if (i == "(") {
- var s = n.getSelectionRange(), o = r.doc.getTextRange(s);
- if (o !== "" && n.getWrapBehavioursEnabled())return{text: "(" + o + ")", selection: !1};
- if (m.isSaneInsertion(n, r))return m.recordAutoInsert(n, r, ")"), {text: "()", selection: [1, 1]}
- } else if (i == ")") {
- var u = n.getCursorPosition(), a = r.doc.getLine(u.row), f = a.substring(u.column, u.column + 1);
- if (f == ")") {
- var l = r.$findOpeningBracket(")", {column: u.column + 1, row: u.row});
- if (l !== null && m.isAutoInsertedClosing(u, a, i))return m.popAutoInsertedClosing(), {text: "", selection: [1, 1]}
- }
- }
- }), this.add("parens", "deletion", function (e, t, n, r, i) {
- var s = r.doc.getTextRange(i);
- if (!i.isMultiLine() && s == "(") {
- var o = r.doc.getLine(i.start.row), u = o.substring(i.start.column + 1, i.start.column + 2);
- if (u == ")")return i.end.column++, i
- }
- }), this.add("brackets", "insertion", function (e, t, n, r, i) {
- if (i == "[") {
- var s = n.getSelectionRange(), o = r.doc.getTextRange(s);
- if (o !== "" && n.getWrapBehavioursEnabled())return{text: "[" + o + "]", selection: !1};
- if (m.isSaneInsertion(n, r))return m.recordAutoInsert(n, r, "]"), {text: "[]", selection: [1, 1]}
- } else if (i == "]") {
- var u = n.getCursorPosition(), a = r.doc.getLine(u.row), f = a.substring(u.column, u.column + 1);
- if (f == "]") {
- var l = r.$findOpeningBracket("]", {column: u.column + 1, row: u.row});
- if (l !== null && m.isAutoInsertedClosing(u, a, i))return m.popAutoInsertedClosing(), {text: "", selection: [1, 1]}
- }
- }
- }), this.add("brackets", "deletion", function (e, t, n, r, i) {
- var s = r.doc.getTextRange(i);
- if (!i.isMultiLine() && s == "[") {
- var o = r.doc.getLine(i.start.row), u = o.substring(i.start.column + 1, i.start.column + 2);
- if (u == "]")return i.end.column++, i
- }
- }), this.add("string_dquotes", "insertion", function (e, t, n, r, i) {
- if (i == '"' || i == "'") {
- var s = i, o = n.getSelectionRange(), u = r.doc.getTextRange(o);
- if (u !== "" && u !== "'" && u != '"' && n.getWrapBehavioursEnabled())return{text: s + u + s, selection: !1};
- var a = n.getCursorPosition(), f = r.doc.getLine(a.row), l = f.substring(a.column - 1, a.column);
- if (l == "\\")return null;
- var c = r.getTokens(o.start.row), h = 0, p, d = -1;
- for (var v = 0; v < c.length; v++) {
- p = c[v], p.type == "string" ? d = -1 : d < 0 && (d = p.value.indexOf(s));
- if (p.value.length + h > o.start.column)break;
- h += c[v].value.length
- }
- if (!p || d < 0 && p.type !== "comment" && (p.type !== "string" || o.start.column !== p.value.length + h - 1 && p.value.lastIndexOf(s) === p.value.length - 1)) {
- if (!m.isSaneInsertion(n, r))return;
- return{text: s + s, selection: [1, 1]}
- }
- if (p && p.type === "string") {
- var g = f.substring(a.column, a.column + 1);
- if (g == s)return{text: "", selection: [1, 1]}
- }
- }
- }), this.add("string_dquotes", "deletion", function (e, t, n, r, i) {
- var s = r.doc.getTextRange(i);
- if (!i.isMultiLine() && (s == '"' || s == "'")) {
- var o = r.doc.getLine(i.start.row), u = o.substring(i.start.column + 1, i.start.column + 2);
- if (u == s)return i.end.column++, i
- }
- })
- };
- r.inherits(m, i), t.CstyleBehaviour = m
-}), ace.define("ace/mode/folding/cstyle", ["require", "exports", "module", "ace/lib/oop", "ace/range", "ace/mode/folding/fold_mode"], function (e, t, n) {
- var r = e("../../lib/oop"), i = e("../../range").Range, s = e("./fold_mode").FoldMode, o = t.FoldMode = function () {
- };
- r.inherits(o, s), function () {
- this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/, this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/, this.getFoldWidgetRange = function (e, t, n) {
- var r = e.getLine(n), i = r.match(this.foldingStartMarker);
- if (i) {
- var s = i.index;
- return i[1] ? this.openingBracketBlock(e, i[1], n, s) : e.getCommentFoldRange(n, s + i[0].length, 1)
- }
- if (t !== "markbeginend")return;
- var i = r.match(this.foldingStopMarker);
- if (i) {
- var s = i.index + i[0].length;
- return i[1] ? this.closingBracketBlock(e, i[1], n, s) : e.getCommentFoldRange(n, s, -1)
- }
- }
- }.call(o.prototype)
-})
\ No newline at end of file
diff --git a/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/mode-css.js b/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/mode-css.js
deleted file mode 100644
index 3c4c64f..0000000
--- a/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/mode-css.js
+++ /dev/null
@@ -1,250 +0,0 @@
-ace.define("ace/mode/css", ["require", "exports", "module", "ace/lib/oop", "ace/mode/text", "ace/tokenizer", "ace/mode/css_highlight_rules", "ace/mode/matching_brace_outdent", "ace/worker/worker_client", "ace/mode/behaviour/css", "ace/mode/folding/cstyle"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("./text").Mode, s = e("../tokenizer").Tokenizer, o = e("./css_highlight_rules").CssHighlightRules, u = e("./matching_brace_outdent").MatchingBraceOutdent, a = e("../worker/worker_client").WorkerClient, f = e("./behaviour/css").CssBehaviour, l = e("./folding/cstyle").FoldMode, c = function () {
- this.$tokenizer = new s((new o).getRules(), "i"), this.$outdent = new u, this.$behaviour = new f, this.foldingRules = new l
- };
- r.inherits(c, i), function () {
- this.foldingRules = "cStyle", this.getNextLineIndent = function (e, t, n) {
- var r = this.$getIndent(t), i = this.$tokenizer.getLineTokens(t, e).tokens;
- if (i.length && i[i.length - 1].type == "comment")return r;
- var s = t.match(/^.*\{\s*$/);
- return s && (r += n), r
- }, this.checkOutdent = function (e, t, n) {
- return this.$outdent.checkOutdent(t, n)
- }, this.autoOutdent = function (e, t, n) {
- this.$outdent.autoOutdent(t, n)
- }, this.createWorker = function (e) {
- var t = new a(["ace"], "ace/mode/css_worker", "Worker");
- return t.attachToDocument(e.getDocument()), t.on("csslint", function (t) {
- e.setAnnotations(t.data)
- }), t.on("terminate", function () {
- e.clearAnnotations()
- }), t
- }
- }.call(c.prototype), t.Mode = c
-}), ace.define("ace/mode/css_highlight_rules", ["require", "exports", "module", "ace/lib/oop", "ace/lib/lang", "ace/mode/text_highlight_rules"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("../lib/lang"), s = e("./text_highlight_rules").TextHighlightRules, o = t.supportType = "animation-fill-mode|alignment-adjust|alignment-baseline|animation-delay|animation-direction|animation-duration|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|animation|appearance|azimuth|backface-visibility|background-attachment|background-break|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|background|baseline-shift|binding|bleed|bookmark-label|bookmark-level|bookmark-state|bookmark-target|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|border|bottom|box-align|box-decoration-break|box-direction|box-flex-group|box-flex|box-lines|box-ordinal-group|box-orient|box-pack|box-shadow|box-sizing|break-after|break-before|break-inside|caption-side|clear|clip|color-profile|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|crop|cue-after|cue-before|cue|cursor|direction|display|dominant-baseline|drop-initial-after-adjust|drop-initial-after-align|drop-initial-before-adjust|drop-initial-before-align|drop-initial-size|drop-initial-value|elevation|empty-cells|fit|fit-position|float-offset|float|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|font|grid-columns|grid-rows|hanging-punctuation|height|hyphenate-after|hyphenate-before|hyphenate-character|hyphenate-lines|hyphenate-resource|hyphens|icon|image-orientation|image-rendering|image-resolution|inline-box-align|left|letter-spacing|line-height|line-stacking-ruby|line-stacking-shift|line-stacking-strategy|line-stacking|list-style-image|list-style-position|list-style-type|list-style|margin-bottom|margin-left|margin-right|margin-top|margin|mark-after|mark-before|mark|marks|marquee-direction|marquee-play-count|marquee-speed|marquee-style|max-height|max-width|min-height|min-width|move-to|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|orphans|outline-color|outline-offset|outline-style|outline-width|outline|overflow-style|overflow-x|overflow-y|overflow|padding-bottom|padding-left|padding-right|padding-top|padding|page-break-after|page-break-before|page-break-inside|page-policy|page|pause-after|pause-before|pause|perspective-origin|perspective|phonemes|pitch-range|pitch|play-during|position|presentation-level|punctuation-trim|quotes|rendering-intent|resize|rest-after|rest-before|rest|richness|right|rotation-point|rotation|ruby-align|ruby-overhang|ruby-position|ruby-span|size|speak-header|speak-numeral|speak-punctuation|speak|speech-rate|stress|string-set|table-layout|target-name|target-new|target-position|target|text-align-last|text-align|text-decoration|text-emphasis|text-height|text-indent|text-justify|text-outline|text-shadow|text-transform|text-wrap|top|transform-origin|transform-style|transform|transition-delay|transition-duration|transition-property|transition-timing-function|transition|unicode-bidi|vertical-align|visibility|voice-balance|voice-duration|voice-family|voice-pitch-range|voice-pitch|voice-rate|voice-stress|voice-volume|volume|white-space-collapse|white-space|widows|width|word-break|word-spacing|word-wrap|z-index", u = t.supportFunction = "rgb|rgba|url|attr|counter|counters", a = t.supportConstant = "absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero", f = t.supportConstantColor = "aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow", l = t.supportConstantFonts = "arial|century|comic|courier|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace", c = t.numRe = "\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))", h = t.pseudoElements = "(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b", p = t.pseudoClasses = "(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b", d = function () {
- var e = this.createKeywordMapper({"support.function": u, "support.constant": a, "support.type": o, "support.constant.color": f, "support.constant.fonts": l}, "text", !0), t = [
- {token: "comment", regex: "\\/\\*", next: "ruleset_comment"},
- {token: "string", regex: '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},
- {token: "string", regex: "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},
- {token: ["constant.numeric", "keyword"], regex: "(" + c + ")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vm|vw|%)"},
- {token: "constant.numeric", regex: c},
- {token: "constant.numeric", regex: "#[a-f0-9]{6}"},
- {token: "constant.numeric", regex: "#[a-f0-9]{3}"},
- {token: ["punctuation", "entity.other.attribute-name.pseudo-element.css"], regex: h},
- {token: ["punctuation", "entity.other.attribute-name.pseudo-class.css"], regex: p},
- {token: e, regex: "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"}
- ], n = i.copyArray(t);
- n.unshift({token: "paren.rparen", regex: "\\}", next: "start"});
- var r = i.copyArray(t);
- r.unshift({token: "paren.rparen", regex: "\\}", next: "media"});
- var s = [
- {token: "comment", regex: ".+"}
- ], d = i.copyArray(s);
- d.unshift({token: "comment", regex: ".*?\\*\\/", next: "start"});
- var v = i.copyArray(s);
- v.unshift({token: "comment", regex: ".*?\\*\\/", next: "media"});
- var m = i.copyArray(s);
- m.unshift({token: "comment", regex: ".*?\\*\\/", next: "ruleset"}), this.$rules = {start: [
- {token: "comment", regex: "\\/\\*", next: "comment"},
- {token: "paren.lparen", regex: "\\{", next: "ruleset"},
- {token: "string", regex: "@.*?{", next: "media"},
- {token: "keyword", regex: "#[a-z0-9-_]+"},
- {token: "variable", regex: "\\.[a-z0-9-_]+"},
- {token: "string", regex: ":[a-z0-9-_]+"},
- {token: "constant", regex: "[a-z0-9-_]+"}
- ], media: [
- {token: "comment", regex: "\\/\\*", next: "media_comment"},
- {token: "paren.lparen", regex: "\\{", next: "media_ruleset"},
- {token: "string", regex: "\\}", next: "start"},
- {token: "keyword", regex: "#[a-z0-9-_]+"},
- {token: "variable", regex: "\\.[a-z0-9-_]+"},
- {token: "string", regex: ":[a-z0-9-_]+"},
- {token: "constant", regex: "[a-z0-9-_]+"}
- ], comment: d, ruleset: n, ruleset_comment: m, media_ruleset: r, media_comment: v}
- };
- r.inherits(d, s), t.CssHighlightRules = d
-}), ace.define("ace/mode/matching_brace_outdent", ["require", "exports", "module", "ace/range"], function (e, t, n) {
- var r = e("../range").Range, i = function () {
- };
- (function () {
- this.checkOutdent = function (e, t) {
- return/^\s+$/.test(e) ? /^\s*\}/.test(t) : !1
- }, this.autoOutdent = function (e, t) {
- var n = e.getLine(t), i = n.match(/^(\s*\})/);
- if (!i)return 0;
- var s = i[1].length, o = e.findMatchingBracket({row: t, column: s});
- if (!o || o.row == t)return 0;
- var u = this.$getIndent(e.getLine(o.row));
- e.replace(new r(t, 0, t, s - 1), u)
- }, this.$getIndent = function (e) {
- var t = e.match(/^(\s+)/);
- return t ? t[1] : ""
- }
- }).call(i.prototype), t.MatchingBraceOutdent = i
-}), ace.define("ace/mode/behaviour/css", ["require", "exports", "module", "ace/lib/oop", "ace/mode/behaviour", "ace/mode/behaviour/cstyle", "ace/token_iterator"], function (e, t, n) {
- var r = e("../../lib/oop"), i = e("../behaviour").Behaviour, s = e("./cstyle").CstyleBehaviour, o = e("../../token_iterator").TokenIterator, u = function () {
- this.inherit(s), this.add("colon", "insertion", function (e, t, n, r, i) {
- if (i === ":") {
- var s = n.getCursorPosition(), u = new o(r, s.row, s.column), a = u.getCurrentToken();
- a && a.value.match(/\s+/) && (a = u.stepBackward());
- if (a && a.type === "support.type") {
- var f = r.doc.getLine(s.row), l = f.substring(s.column, s.column + 1);
- if (l === ":")return{text: "", selection: [1, 1]};
- if (!f.substring(s.column).match(/^\s*;/))return{text: ":;", selection: [1, 1]}
- }
- }
- }), this.add("colon", "deletion", function (e, t, n, r, i) {
- var s = r.doc.getTextRange(i);
- if (!i.isMultiLine() && s === ":") {
- var o = r.doc.getLine(i.start.row), u = o.substring(i.end.column, i.end.column + 1);
- if (u === ";")return i.end.column++, i
- }
- }), this.add("semicolon", "insertion", function (e, t, n, r, i) {
- if (i === ";") {
- var s = n.getCursorPosition(), o = r.doc.getLine(s.row), u = o.substring(s.column, s.column + 1);
- if (u === ";")return{text: "", selection: [1, 1]}
- }
- })
- };
- r.inherits(u, s), t.CssBehaviour = u
-}), ace.define("ace/mode/behaviour/cstyle", ["require", "exports", "module", "ace/lib/oop", "ace/mode/behaviour", "ace/token_iterator", "ace/lib/lang"], function (e, t, n) {
- var r = e("../../lib/oop"), i = e("../behaviour").Behaviour, s = e("../../token_iterator").TokenIterator, o = e("../../lib/lang"), u = ["text", "paren.rparen", "punctuation.operator"], a = ["text", "paren.rparen", "punctuation.operator", "comment"], f = 0, l = -1, c = "", h = 0, p = -1, d = "", v = "", m = function () {
- m.isSaneInsertion = function (e, t) {
- var n = e.getCursorPosition(), r = new s(t, n.row, n.column);
- if (!this.$matchTokenType(r.getCurrentToken() || "text", u)) {
- var i = new s(t, n.row, n.column + 1);
- if (!this.$matchTokenType(i.getCurrentToken() || "text", u))return!1
- }
- return r.stepForward(), r.getCurrentTokenRow() !== n.row || this.$matchTokenType(r.getCurrentToken() || "text", a)
- }, m.$matchTokenType = function (e, t) {
- return t.indexOf(e.type || e) > -1
- }, m.recordAutoInsert = function (e, t, n) {
- var r = e.getCursorPosition(), i = t.doc.getLine(r.row);
- this.isAutoInsertedClosing(r, i, c[0]) || (f = 0), l = r.row, c = n + i.substr(r.column), f++
- }, m.recordMaybeInsert = function (e, t, n) {
- var r = e.getCursorPosition(), i = t.doc.getLine(r.row);
- this.isMaybeInsertedClosing(r, i) || (h = 0), p = r.row, d = i.substr(0, r.column) + n, v = i.substr(r.column), h++
- }, m.isAutoInsertedClosing = function (e, t, n) {
- return f > 0 && e.row === l && n === c[0] && t.substr(e.column) === c
- }, m.isMaybeInsertedClosing = function (e, t) {
- return h > 0 && e.row === p && t.substr(e.column) === v && t.substr(0, e.column) == d
- }, m.popAutoInsertedClosing = function () {
- c = c.substr(1), f--
- }, m.clearMaybeInsertedClosing = function () {
- h = 0, p = -1
- }, this.add("braces", "insertion", function (e, t, n, r, i) {
- var s = n.getCursorPosition(), u = r.doc.getLine(s.row);
- if (i == "{") {
- var a = n.getSelectionRange(), f = r.doc.getTextRange(a);
- if (f !== "" && f !== "{" && n.getWrapBehavioursEnabled())return{text: "{" + f + "}", selection: !1};
- if (m.isSaneInsertion(n, r))return/[\]\}\)]/.test(u[s.column]) ? (m.recordAutoInsert(n, r, "}"), {text: "{}", selection: [1, 1]}) : (m.recordMaybeInsert(n, r, "{"), {text: "{", selection: [1, 1]})
- } else if (i == "}") {
- var l = u.substring(s.column, s.column + 1);
- if (l == "}") {
- var c = r.$findOpeningBracket("}", {column: s.column + 1, row: s.row});
- if (c !== null && m.isAutoInsertedClosing(s, u, i))return m.popAutoInsertedClosing(), {text: "", selection: [1, 1]}
- }
- } else if (i == "\n" || i == "\r\n") {
- var p = "";
- m.isMaybeInsertedClosing(s, u) && (p = o.stringRepeat("}", h), m.clearMaybeInsertedClosing());
- var l = u.substring(s.column, s.column + 1);
- if (l == "}" || p !== "") {
- var d = r.findMatchingBracket({row: s.row, column: s.column}, "}");
- if (!d)return null;
- var v = this.getNextLineIndent(e, u.substring(0, s.column), r.getTabString()), g = this.$getIndent(u);
- return{text: "\n" + v + "\n" + g + p, selection: [1, v.length, 1, v.length]}
- }
- }
- }), this.add("braces", "deletion", function (e, t, n, r, i) {
- var s = r.doc.getTextRange(i);
- if (!i.isMultiLine() && s == "{") {
- var o = r.doc.getLine(i.start.row), u = o.substring(i.end.column, i.end.column + 1);
- if (u == "}")return i.end.column++, i;
- h--
- }
- }), this.add("parens", "insertion", function (e, t, n, r, i) {
- if (i == "(") {
- var s = n.getSelectionRange(), o = r.doc.getTextRange(s);
- if (o !== "" && n.getWrapBehavioursEnabled())return{text: "(" + o + ")", selection: !1};
- if (m.isSaneInsertion(n, r))return m.recordAutoInsert(n, r, ")"), {text: "()", selection: [1, 1]}
- } else if (i == ")") {
- var u = n.getCursorPosition(), a = r.doc.getLine(u.row), f = a.substring(u.column, u.column + 1);
- if (f == ")") {
- var l = r.$findOpeningBracket(")", {column: u.column + 1, row: u.row});
- if (l !== null && m.isAutoInsertedClosing(u, a, i))return m.popAutoInsertedClosing(), {text: "", selection: [1, 1]}
- }
- }
- }), this.add("parens", "deletion", function (e, t, n, r, i) {
- var s = r.doc.getTextRange(i);
- if (!i.isMultiLine() && s == "(") {
- var o = r.doc.getLine(i.start.row), u = o.substring(i.start.column + 1, i.start.column + 2);
- if (u == ")")return i.end.column++, i
- }
- }), this.add("brackets", "insertion", function (e, t, n, r, i) {
- if (i == "[") {
- var s = n.getSelectionRange(), o = r.doc.getTextRange(s);
- if (o !== "" && n.getWrapBehavioursEnabled())return{text: "[" + o + "]", selection: !1};
- if (m.isSaneInsertion(n, r))return m.recordAutoInsert(n, r, "]"), {text: "[]", selection: [1, 1]}
- } else if (i == "]") {
- var u = n.getCursorPosition(), a = r.doc.getLine(u.row), f = a.substring(u.column, u.column + 1);
- if (f == "]") {
- var l = r.$findOpeningBracket("]", {column: u.column + 1, row: u.row});
- if (l !== null && m.isAutoInsertedClosing(u, a, i))return m.popAutoInsertedClosing(), {text: "", selection: [1, 1]}
- }
- }
- }), this.add("brackets", "deletion", function (e, t, n, r, i) {
- var s = r.doc.getTextRange(i);
- if (!i.isMultiLine() && s == "[") {
- var o = r.doc.getLine(i.start.row), u = o.substring(i.start.column + 1, i.start.column + 2);
- if (u == "]")return i.end.column++, i
- }
- }), this.add("string_dquotes", "insertion", function (e, t, n, r, i) {
- if (i == '"' || i == "'") {
- var s = i, o = n.getSelectionRange(), u = r.doc.getTextRange(o);
- if (u !== "" && u !== "'" && u != '"' && n.getWrapBehavioursEnabled())return{text: s + u + s, selection: !1};
- var a = n.getCursorPosition(), f = r.doc.getLine(a.row), l = f.substring(a.column - 1, a.column);
- if (l == "\\")return null;
- var c = r.getTokens(o.start.row), h = 0, p, d = -1;
- for (var v = 0; v < c.length; v++) {
- p = c[v], p.type == "string" ? d = -1 : d < 0 && (d = p.value.indexOf(s));
- if (p.value.length + h > o.start.column)break;
- h += c[v].value.length
- }
- if (!p || d < 0 && p.type !== "comment" && (p.type !== "string" || o.start.column !== p.value.length + h - 1 && p.value.lastIndexOf(s) === p.value.length - 1)) {
- if (!m.isSaneInsertion(n, r))return;
- return{text: s + s, selection: [1, 1]}
- }
- if (p && p.type === "string") {
- var g = f.substring(a.column, a.column + 1);
- if (g == s)return{text: "", selection: [1, 1]}
- }
- }
- }), this.add("string_dquotes", "deletion", function (e, t, n, r, i) {
- var s = r.doc.getTextRange(i);
- if (!i.isMultiLine() && (s == '"' || s == "'")) {
- var o = r.doc.getLine(i.start.row), u = o.substring(i.start.column + 1, i.start.column + 2);
- if (u == s)return i.end.column++, i
- }
- })
- };
- r.inherits(m, i), t.CstyleBehaviour = m
-}), ace.define("ace/mode/folding/cstyle", ["require", "exports", "module", "ace/lib/oop", "ace/range", "ace/mode/folding/fold_mode"], function (e, t, n) {
- var r = e("../../lib/oop"), i = e("../../range").Range, s = e("./fold_mode").FoldMode, o = t.FoldMode = function () {
- };
- r.inherits(o, s), function () {
- this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/, this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/, this.getFoldWidgetRange = function (e, t, n) {
- var r = e.getLine(n), i = r.match(this.foldingStartMarker);
- if (i) {
- var s = i.index;
- return i[1] ? this.openingBracketBlock(e, i[1], n, s) : e.getCommentFoldRange(n, s + i[0].length, 1)
- }
- if (t !== "markbeginend")return;
- var i = r.match(this.foldingStopMarker);
- if (i) {
- var s = i.index + i[0].length;
- return i[1] ? this.closingBracketBlock(e, i[1], n, s) : e.getCommentFoldRange(n, s, -1)
- }
- }
- }.call(o.prototype)
-})
\ No newline at end of file
diff --git a/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/mode-curly.js b/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/mode-curly.js
deleted file mode 100644
index b4fb10c..0000000
--- a/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/mode-curly.js
+++ /dev/null
@@ -1,627 +0,0 @@
-ace.define("ace/mode/curly", ["require", "exports", "module", "ace/lib/oop", "ace/mode/html", "ace/tokenizer", "ace/mode/matching_brace_outdent", "ace/mode/html_highlight_rules", "ace/mode/folding/html", "ace/mode/curly_highlight_rules"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("./html").Mode, s = e("../tokenizer").Tokenizer, o = e("./matching_brace_outdent").MatchingBraceOutdent, u = e("./html_highlight_rules").HtmlHighlightRules, a = e("./folding/html").FoldMode, f = e("./curly_highlight_rules").CurlyHighlightRules, l = function () {
- var e = new f;
- this.$outdent = new o, this.foldingRules = new a, this.$tokenizer = new s(e.getRules())
- };
- r.inherits(l, i), function () {
- }.call(l.prototype), t.Mode = l
-}), ace.define("ace/mode/html", ["require", "exports", "module", "ace/lib/oop", "ace/mode/text", "ace/mode/javascript", "ace/mode/css", "ace/tokenizer", "ace/mode/html_highlight_rules", "ace/mode/behaviour/html", "ace/mode/folding/html"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("./text").Mode, s = e("./javascript").Mode, o = e("./css").Mode, u = e("../tokenizer").Tokenizer, a = e("./html_highlight_rules").HtmlHighlightRules, f = e("./behaviour/html").HtmlBehaviour, l = e("./folding/html").FoldMode, c = function () {
- var e = new a;
- this.$tokenizer = new u(e.getRules()), this.$behaviour = new f, this.$embeds = e.getEmbeds(), this.createModeDelegates({"js-": s, "css-": o}), this.foldingRules = new l
- };
- r.inherits(c, i), function () {
- this.toggleCommentLines = function (e, t, n, r) {
- return 0
- }, this.getNextLineIndent = function (e, t, n) {
- return this.$getIndent(t)
- }, this.checkOutdent = function (e, t, n) {
- return!1
- }
- }.call(c.prototype), t.Mode = c
-}), ace.define("ace/mode/javascript", ["require", "exports", "module", "ace/lib/oop", "ace/mode/text", "ace/tokenizer", "ace/mode/javascript_highlight_rules", "ace/mode/matching_brace_outdent", "ace/range", "ace/worker/worker_client", "ace/mode/behaviour/cstyle", "ace/mode/folding/cstyle"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("./text").Mode, s = e("../tokenizer").Tokenizer, o = e("./javascript_highlight_rules").JavaScriptHighlightRules, u = e("./matching_brace_outdent").MatchingBraceOutdent, a = e("../range").Range, f = e("../worker/worker_client").WorkerClient, l = e("./behaviour/cstyle").CstyleBehaviour, c = e("./folding/cstyle").FoldMode, h = function () {
- this.$tokenizer = new s((new o).getRules()), this.$outdent = new u, this.$behaviour = new l, this.foldingRules = new c
- };
- r.inherits(h, i), function () {
- this.toggleCommentLines = function (e, t, n, r) {
- var i = !0, s = /^(\s*)\/\//;
- for (var o = n; o <= r; o++)if (!s.test(t.getLine(o))) {
- i = !1;
- break
- }
- if (i) {
- var u = new a(0, 0, 0, 0);
- for (var o = n; o <= r; o++) {
- var f = t.getLine(o), l = f.match(s);
- u.start.row = o, u.end.row = o, u.end.column = l[0].length, t.replace(u, l[1])
- }
- } else t.indentRows(n, r, "//")
- }, this.getNextLineIndent = function (e, t, n) {
- var r = this.$getIndent(t), i = this.$tokenizer.getLineTokens(t, e), s = i.tokens, o = i.state;
- if (s.length && s[s.length - 1].type == "comment")return r;
- if (e == "start" || e == "regex_allowed") {
- var u = t.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/);
- u && (r += n)
- } else if (e == "doc-start") {
- if (o == "start" || e == "regex_allowed")return"";
- var u = t.match(/^\s*(\/?)\*/);
- u && (u[1] && (r += " "), r += "* ")
- }
- return r
- }, this.checkOutdent = function (e, t, n) {
- return this.$outdent.checkOutdent(t, n)
- }, this.autoOutdent = function (e, t, n) {
- this.$outdent.autoOutdent(t, n)
- }, this.createWorker = function (e) {
- var t = new f(["ace"], "ace/mode/javascript_worker", "JavaScriptWorker");
- return t.attachToDocument(e.getDocument()), t.on("jslint", function (t) {
- e.setAnnotations(t.data)
- }), t.on("terminate", function () {
- e.clearAnnotations()
- }), t
- }
- }.call(h.prototype), t.Mode = h
-}), ace.define("ace/mode/javascript_highlight_rules", ["require", "exports", "module", "ace/lib/oop", "ace/mode/doc_comment_highlight_rules", "ace/mode/text_highlight_rules"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("./doc_comment_highlight_rules").DocCommentHighlightRules, s = e("./text_highlight_rules").TextHighlightRules, o = function () {
- var e = this.createKeywordMapper({"variable.language": "Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document", keyword: "const|yield|import|get|set|break|case|catch|continue|default|delete|do|else|finally|for|function|if|in|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|__parent__|__count__|escape|unescape|with|__proto__|class|enum|extends|super|export|implements|private|public|interface|package|protected|static", "storage.type": "const|let|var|function", "constant.language": "null|Infinity|NaN|undefined", "support.function": "alert", "constant.language.boolean": "true|false"}, "identifier"), t = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void", n = "[a-zA-Z\\$_¡-￿][a-zA-Z\\d\\$_¡-￿]*\\b", r = "\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|[0-2][0-7]{0,2}|3[0-6][0-7]?|37[0-7]?|[4-7][0-7]?|.)";
- this.$rules = {start: [
- {token: "comment", regex: /\/\/.*$/},
- i.getStartRule("doc-start"),
- {token: "comment", regex: /\/\*/, next: "comment"},
- {token: "string", regex: "'(?=.)", next: "qstring"},
- {token: "string", regex: '"(?=.)', next: "qqstring"},
- {token: "constant.numeric", regex: /0[xX][0-9a-fA-F]+\b/},
- {token: "constant.numeric", regex: /[+-]?\d+(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?\b/},
- {token: ["storage.type", "punctuation.operator", "support.function", "punctuation.operator", "entity.name.function", "text", "keyword.operator"], regex: "(" + n + ")(\\.)(prototype)(\\.)(" + n + ")(\\s*)(=)", next: "function_arguments"},
- {token: ["storage.type", "punctuation.operator", "entity.name.function", "text", "keyword.operator", "text", "storage.type", "text", "paren.lparen"], regex: "(" + n + ")(\\.)(" + n + ")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", next: "function_arguments"},
- {token: ["entity.name.function", "text", "keyword.operator", "text", "storage.type", "text", "paren.lparen"], regex: "(" + n + ")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", next: "function_arguments"},
- {token: ["storage.type", "punctuation.operator", "entity.name.function", "text", "keyword.operator", "text", "storage.type", "text", "entity.name.function", "text", "paren.lparen"], regex: "(" + n + ")(\\.)(" + n + ")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()", next: "function_arguments"},
- {token: ["storage.type", "text", "entity.name.function", "text", "paren.lparen"], regex: "(function)(\\s+)(" + n + ")(\\s*)(\\()", next: "function_arguments"},
- {token: ["entity.name.function", "text", "punctuation.operator", "text", "storage.type", "text", "paren.lparen"], regex: "(" + n + ")(\\s*)(:)(\\s*)(function)(\\s*)(\\()", next: "function_arguments"},
- {token: ["text", "text", "storage.type", "text", "paren.lparen"], regex: "(:)(\\s*)(function)(\\s*)(\\()", next: "function_arguments"},
- {token: "keyword", regex: "(?:" + t + ")\\b", next: "regex_allowed"},
- {token: ["punctuation.operator", "support.function"], regex: /(\.)(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:opzzzz|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/},
- {token: ["punctuation.operator", "support.function.dom"], regex: /(\.)(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/},
- {token: ["punctuation.operator", "support.constant"], regex: /(\.)(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/},
- {token: ["storage.type", "punctuation.operator", "support.function.firebug"], regex: /(console)(\.)(warn|info|log|error|time|timeEnd|assert)\b/},
- {token: e, regex: n},
- {token: "keyword.operator", regex: /--|\+\+|[!$%&*+\-~]|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|\*=|%=|\+=|\-=|&=|\^=/, next: "regex_allowed"},
- {token: "punctuation.operator", regex: /\?|\:|\,|\;|\./, next: "regex_allowed"},
- {token: "paren.lparen", regex: /[\[({]/, next: "regex_allowed"},
- {token: "paren.rparen", regex: /[\])}]/},
- {token: "keyword.operator", regex: /\/=?/, next: "regex_allowed"},
- {token: "comment", regex: /^#!.*$/}
- ], regex_allowed: [i.getStartRule("doc-start"), {token: "comment", regex: "\\/\\*", next: "comment_regex_allowed"}, {token: "comment", regex: "\\/\\/.*$"}, {token: "string.regexp", regex: "\\/", next: "regex"}, {token: "text", regex: "\\s+"}, {token: "empty", regex: "", next: "start"}], regex: [
- {token: "regexp.keyword.operator", regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},
- {token: "string.regexp", regex: "/\\w*", next: "start"},
- {token: "invalid", regex: /\{\d+,?(?:\d+)?}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/},
- {token: "constant.language.escape", regex: /\(\?[:=!]|\)|{\d+,?(?:\d+)?}|{,\d+}|[+*]\?|[()$^+*?]/},
- {token: "constant.language.delimiter", regex: /\|/},
- {token: "constant.language.escape", regex: /\[\^?/, next: "regex_character_class"},
- {token: "empty", regex: "$", next: "start"},
- {defaultToken: "string.regexp"}
- ], regex_character_class: [
- {token: "regexp.keyword.operator", regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},
- {token: "constant.language.escape", regex: "]", next: "regex"},
- {token: "constant.language.escape", regex: "-"},
- {token: "empty", regex: "$", next: "start"},
- {defaultToken: "string.regexp.charachterclass"}
- ], function_arguments: [
- {token: "variable.parameter", regex: n},
- {token: "punctuation.operator", regex: "[, ]+"},
- {token: "punctuation.operator", regex: "$"},
- {token: "empty", regex: "", next: "start"}
- ], comment_regex_allowed: [
- {token: "comment", regex: "\\*\\/", next: "regex_allowed"},
- {defaultToken: "comment"}
- ], comment: [
- {token: "comment", regex: "\\*\\/", next: "start"},
- {defaultToken: "comment"}
- ], qqstring: [
- {token: "constant.language.escape", regex: r},
- {token: "string", regex: "\\\\$", next: "qqstring"},
- {token: "string", regex: '"|$', next: "start"},
- {defaultToken: "string"}
- ], qstring: [
- {token: "constant.language.escape", regex: r},
- {token: "string", regex: "\\\\$", next: "qstring"},
- {token: "string", regex: "'|$", next: "start"},
- {defaultToken: "string"}
- ]}, this.embedRules(i, "doc-", [i.getEndRule("start")])
- };
- r.inherits(o, s), t.JavaScriptHighlightRules = o
-}), ace.define("ace/mode/doc_comment_highlight_rules", ["require", "exports", "module", "ace/lib/oop", "ace/mode/text_highlight_rules"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("./text_highlight_rules").TextHighlightRules, s = function () {
- this.$rules = {start: [
- {token: "comment.doc.tag", regex: "@[\\w\\d_]+"},
- {token: "comment.doc.tag", regex: "\\bTODO\\b"},
- {defaultToken: "comment.doc"}
- ]}
- };
- r.inherits(s, i), s.getStartRule = function (e) {
- return{token: "comment.doc", regex: "\\/\\*(?=\\*)", next: e}
- }, s.getEndRule = function (e) {
- return{token: "comment.doc", regex: "\\*\\/", next: e}
- }, t.DocCommentHighlightRules = s
-}), ace.define("ace/mode/matching_brace_outdent", ["require", "exports", "module", "ace/range"], function (e, t, n) {
- var r = e("../range").Range, i = function () {
- };
- (function () {
- this.checkOutdent = function (e, t) {
- return/^\s+$/.test(e) ? /^\s*\}/.test(t) : !1
- }, this.autoOutdent = function (e, t) {
- var n = e.getLine(t), i = n.match(/^(\s*\})/);
- if (!i)return 0;
- var s = i[1].length, o = e.findMatchingBracket({row: t, column: s});
- if (!o || o.row == t)return 0;
- var u = this.$getIndent(e.getLine(o.row));
- e.replace(new r(t, 0, t, s - 1), u)
- }, this.$getIndent = function (e) {
- var t = e.match(/^(\s+)/);
- return t ? t[1] : ""
- }
- }).call(i.prototype), t.MatchingBraceOutdent = i
-}), ace.define("ace/mode/behaviour/cstyle", ["require", "exports", "module", "ace/lib/oop", "ace/mode/behaviour", "ace/token_iterator", "ace/lib/lang"], function (e, t, n) {
- var r = e("../../lib/oop"), i = e("../behaviour").Behaviour, s = e("../../token_iterator").TokenIterator, o = e("../../lib/lang"), u = ["text", "paren.rparen", "punctuation.operator"], a = ["text", "paren.rparen", "punctuation.operator", "comment"], f = 0, l = -1, c = "", h = 0, p = -1, d = "", v = "", m = function () {
- m.isSaneInsertion = function (e, t) {
- var n = e.getCursorPosition(), r = new s(t, n.row, n.column);
- if (!this.$matchTokenType(r.getCurrentToken() || "text", u)) {
- var i = new s(t, n.row, n.column + 1);
- if (!this.$matchTokenType(i.getCurrentToken() || "text", u))return!1
- }
- return r.stepForward(), r.getCurrentTokenRow() !== n.row || this.$matchTokenType(r.getCurrentToken() || "text", a)
- }, m.$matchTokenType = function (e, t) {
- return t.indexOf(e.type || e) > -1
- }, m.recordAutoInsert = function (e, t, n) {
- var r = e.getCursorPosition(), i = t.doc.getLine(r.row);
- this.isAutoInsertedClosing(r, i, c[0]) || (f = 0), l = r.row, c = n + i.substr(r.column), f++
- }, m.recordMaybeInsert = function (e, t, n) {
- var r = e.getCursorPosition(), i = t.doc.getLine(r.row);
- this.isMaybeInsertedClosing(r, i) || (h = 0), p = r.row, d = i.substr(0, r.column) + n, v = i.substr(r.column), h++
- }, m.isAutoInsertedClosing = function (e, t, n) {
- return f > 0 && e.row === l && n === c[0] && t.substr(e.column) === c
- }, m.isMaybeInsertedClosing = function (e, t) {
- return h > 0 && e.row === p && t.substr(e.column) === v && t.substr(0, e.column) == d
- }, m.popAutoInsertedClosing = function () {
- c = c.substr(1), f--
- }, m.clearMaybeInsertedClosing = function () {
- h = 0, p = -1
- }, this.add("braces", "insertion", function (e, t, n, r, i) {
- var s = n.getCursorPosition(), u = r.doc.getLine(s.row);
- if (i == "{") {
- var a = n.getSelectionRange(), f = r.doc.getTextRange(a);
- if (f !== "" && f !== "{" && n.getWrapBehavioursEnabled())return{text: "{" + f + "}", selection: !1};
- if (m.isSaneInsertion(n, r))return/[\]\}\)]/.test(u[s.column]) ? (m.recordAutoInsert(n, r, "}"), {text: "{}", selection: [1, 1]}) : (m.recordMaybeInsert(n, r, "{"), {text: "{", selection: [1, 1]})
- } else if (i == "}") {
- var l = u.substring(s.column, s.column + 1);
- if (l == "}") {
- var c = r.$findOpeningBracket("}", {column: s.column + 1, row: s.row});
- if (c !== null && m.isAutoInsertedClosing(s, u, i))return m.popAutoInsertedClosing(), {text: "", selection: [1, 1]}
- }
- } else if (i == "\n" || i == "\r\n") {
- var p = "";
- m.isMaybeInsertedClosing(s, u) && (p = o.stringRepeat("}", h), m.clearMaybeInsertedClosing());
- var l = u.substring(s.column, s.column + 1);
- if (l == "}" || p !== "") {
- var d = r.findMatchingBracket({row: s.row, column: s.column}, "}");
- if (!d)return null;
- var v = this.getNextLineIndent(e, u.substring(0, s.column), r.getTabString()), g = this.$getIndent(u);
- return{text: "\n" + v + "\n" + g + p, selection: [1, v.length, 1, v.length]}
- }
- }
- }), this.add("braces", "deletion", function (e, t, n, r, i) {
- var s = r.doc.getTextRange(i);
- if (!i.isMultiLine() && s == "{") {
- var o = r.doc.getLine(i.start.row), u = o.substring(i.end.column, i.end.column + 1);
- if (u == "}")return i.end.column++, i;
- h--
- }
- }), this.add("parens", "insertion", function (e, t, n, r, i) {
- if (i == "(") {
- var s = n.getSelectionRange(), o = r.doc.getTextRange(s);
- if (o !== "" && n.getWrapBehavioursEnabled())return{text: "(" + o + ")", selection: !1};
- if (m.isSaneInsertion(n, r))return m.recordAutoInsert(n, r, ")"), {text: "()", selection: [1, 1]}
- } else if (i == ")") {
- var u = n.getCursorPosition(), a = r.doc.getLine(u.row), f = a.substring(u.column, u.column + 1);
- if (f == ")") {
- var l = r.$findOpeningBracket(")", {column: u.column + 1, row: u.row});
- if (l !== null && m.isAutoInsertedClosing(u, a, i))return m.popAutoInsertedClosing(), {text: "", selection: [1, 1]}
- }
- }
- }), this.add("parens", "deletion", function (e, t, n, r, i) {
- var s = r.doc.getTextRange(i);
- if (!i.isMultiLine() && s == "(") {
- var o = r.doc.getLine(i.start.row), u = o.substring(i.start.column + 1, i.start.column + 2);
- if (u == ")")return i.end.column++, i
- }
- }), this.add("brackets", "insertion", function (e, t, n, r, i) {
- if (i == "[") {
- var s = n.getSelectionRange(), o = r.doc.getTextRange(s);
- if (o !== "" && n.getWrapBehavioursEnabled())return{text: "[" + o + "]", selection: !1};
- if (m.isSaneInsertion(n, r))return m.recordAutoInsert(n, r, "]"), {text: "[]", selection: [1, 1]}
- } else if (i == "]") {
- var u = n.getCursorPosition(), a = r.doc.getLine(u.row), f = a.substring(u.column, u.column + 1);
- if (f == "]") {
- var l = r.$findOpeningBracket("]", {column: u.column + 1, row: u.row});
- if (l !== null && m.isAutoInsertedClosing(u, a, i))return m.popAutoInsertedClosing(), {text: "", selection: [1, 1]}
- }
- }
- }), this.add("brackets", "deletion", function (e, t, n, r, i) {
- var s = r.doc.getTextRange(i);
- if (!i.isMultiLine() && s == "[") {
- var o = r.doc.getLine(i.start.row), u = o.substring(i.start.column + 1, i.start.column + 2);
- if (u == "]")return i.end.column++, i
- }
- }), this.add("string_dquotes", "insertion", function (e, t, n, r, i) {
- if (i == '"' || i == "'") {
- var s = i, o = n.getSelectionRange(), u = r.doc.getTextRange(o);
- if (u !== "" && u !== "'" && u != '"' && n.getWrapBehavioursEnabled())return{text: s + u + s, selection: !1};
- var a = n.getCursorPosition(), f = r.doc.getLine(a.row), l = f.substring(a.column - 1, a.column);
- if (l == "\\")return null;
- var c = r.getTokens(o.start.row), h = 0, p, d = -1;
- for (var v = 0; v < c.length; v++) {
- p = c[v], p.type == "string" ? d = -1 : d < 0 && (d = p.value.indexOf(s));
- if (p.value.length + h > o.start.column)break;
- h += c[v].value.length
- }
- if (!p || d < 0 && p.type !== "comment" && (p.type !== "string" || o.start.column !== p.value.length + h - 1 && p.value.lastIndexOf(s) === p.value.length - 1)) {
- if (!m.isSaneInsertion(n, r))return;
- return{text: s + s, selection: [1, 1]}
- }
- if (p && p.type === "string") {
- var g = f.substring(a.column, a.column + 1);
- if (g == s)return{text: "", selection: [1, 1]}
- }
- }
- }), this.add("string_dquotes", "deletion", function (e, t, n, r, i) {
- var s = r.doc.getTextRange(i);
- if (!i.isMultiLine() && (s == '"' || s == "'")) {
- var o = r.doc.getLine(i.start.row), u = o.substring(i.start.column + 1, i.start.column + 2);
- if (u == s)return i.end.column++, i
- }
- })
- };
- r.inherits(m, i), t.CstyleBehaviour = m
-}), ace.define("ace/mode/folding/cstyle", ["require", "exports", "module", "ace/lib/oop", "ace/range", "ace/mode/folding/fold_mode"], function (e, t, n) {
- var r = e("../../lib/oop"), i = e("../../range").Range, s = e("./fold_mode").FoldMode, o = t.FoldMode = function () {
- };
- r.inherits(o, s), function () {
- this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/, this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/, this.getFoldWidgetRange = function (e, t, n) {
- var r = e.getLine(n), i = r.match(this.foldingStartMarker);
- if (i) {
- var s = i.index;
- return i[1] ? this.openingBracketBlock(e, i[1], n, s) : e.getCommentFoldRange(n, s + i[0].length, 1)
- }
- if (t !== "markbeginend")return;
- var i = r.match(this.foldingStopMarker);
- if (i) {
- var s = i.index + i[0].length;
- return i[1] ? this.closingBracketBlock(e, i[1], n, s) : e.getCommentFoldRange(n, s, -1)
- }
- }
- }.call(o.prototype)
-}), ace.define("ace/mode/css", ["require", "exports", "module", "ace/lib/oop", "ace/mode/text", "ace/tokenizer", "ace/mode/css_highlight_rules", "ace/mode/matching_brace_outdent", "ace/worker/worker_client", "ace/mode/behaviour/css", "ace/mode/folding/cstyle"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("./text").Mode, s = e("../tokenizer").Tokenizer, o = e("./css_highlight_rules").CssHighlightRules, u = e("./matching_brace_outdent").MatchingBraceOutdent, a = e("../worker/worker_client").WorkerClient, f = e("./behaviour/css").CssBehaviour, l = e("./folding/cstyle").FoldMode, c = function () {
- this.$tokenizer = new s((new o).getRules(), "i"), this.$outdent = new u, this.$behaviour = new f, this.foldingRules = new l
- };
- r.inherits(c, i), function () {
- this.foldingRules = "cStyle", this.getNextLineIndent = function (e, t, n) {
- var r = this.$getIndent(t), i = this.$tokenizer.getLineTokens(t, e).tokens;
- if (i.length && i[i.length - 1].type == "comment")return r;
- var s = t.match(/^.*\{\s*$/);
- return s && (r += n), r
- }, this.checkOutdent = function (e, t, n) {
- return this.$outdent.checkOutdent(t, n)
- }, this.autoOutdent = function (e, t, n) {
- this.$outdent.autoOutdent(t, n)
- }, this.createWorker = function (e) {
- var t = new a(["ace"], "ace/mode/css_worker", "Worker");
- return t.attachToDocument(e.getDocument()), t.on("csslint", function (t) {
- e.setAnnotations(t.data)
- }), t.on("terminate", function () {
- e.clearAnnotations()
- }), t
- }
- }.call(c.prototype), t.Mode = c
-}), ace.define("ace/mode/css_highlight_rules", ["require", "exports", "module", "ace/lib/oop", "ace/lib/lang", "ace/mode/text_highlight_rules"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("../lib/lang"), s = e("./text_highlight_rules").TextHighlightRules, o = t.supportType = "animation-fill-mode|alignment-adjust|alignment-baseline|animation-delay|animation-direction|animation-duration|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|animation|appearance|azimuth|backface-visibility|background-attachment|background-break|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|background|baseline-shift|binding|bleed|bookmark-label|bookmark-level|bookmark-state|bookmark-target|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|border|bottom|box-align|box-decoration-break|box-direction|box-flex-group|box-flex|box-lines|box-ordinal-group|box-orient|box-pack|box-shadow|box-sizing|break-after|break-before|break-inside|caption-side|clear|clip|color-profile|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|crop|cue-after|cue-before|cue|cursor|direction|display|dominant-baseline|drop-initial-after-adjust|drop-initial-after-align|drop-initial-before-adjust|drop-initial-before-align|drop-initial-size|drop-initial-value|elevation|empty-cells|fit|fit-position|float-offset|float|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|font|grid-columns|grid-rows|hanging-punctuation|height|hyphenate-after|hyphenate-before|hyphenate-character|hyphenate-lines|hyphenate-resource|hyphens|icon|image-orientation|image-rendering|image-resolution|inline-box-align|left|letter-spacing|line-height|line-stacking-ruby|line-stacking-shift|line-stacking-strategy|line-stacking|list-style-image|list-style-position|list-style-type|list-style|margin-bottom|margin-left|margin-right|margin-top|margin|mark-after|mark-before|mark|marks|marquee-direction|marquee-play-count|marquee-speed|marquee-style|max-height|max-width|min-height|min-width|move-to|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|orphans|outline-color|outline-offset|outline-style|outline-width|outline|overflow-style|overflow-x|overflow-y|overflow|padding-bottom|padding-left|padding-right|padding-top|padding|page-break-after|page-break-before|page-break-inside|page-policy|page|pause-after|pause-before|pause|perspective-origin|perspective|phonemes|pitch-range|pitch|play-during|position|presentation-level|punctuation-trim|quotes|rendering-intent|resize|rest-after|rest-before|rest|richness|right|rotation-point|rotation|ruby-align|ruby-overhang|ruby-position|ruby-span|size|speak-header|speak-numeral|speak-punctuation|speak|speech-rate|stress|string-set|table-layout|target-name|target-new|target-position|target|text-align-last|text-align|text-decoration|text-emphasis|text-height|text-indent|text-justify|text-outline|text-shadow|text-transform|text-wrap|top|transform-origin|transform-style|transform|transition-delay|transition-duration|transition-property|transition-timing-function|transition|unicode-bidi|vertical-align|visibility|voice-balance|voice-duration|voice-family|voice-pitch-range|voice-pitch|voice-rate|voice-stress|voice-volume|volume|white-space-collapse|white-space|widows|width|word-break|word-spacing|word-wrap|z-index", u = t.supportFunction = "rgb|rgba|url|attr|counter|counters", a = t.supportConstant = "absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero", f = t.supportConstantColor = "aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow", l = t.supportConstantFonts = "arial|century|comic|courier|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace", c = t.numRe = "\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))", h = t.pseudoElements = "(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b", p = t.pseudoClasses = "(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b", d = function () {
- var e = this.createKeywordMapper({"support.function": u, "support.constant": a, "support.type": o, "support.constant.color": f, "support.constant.fonts": l}, "text", !0), t = [
- {token: "comment", regex: "\\/\\*", next: "ruleset_comment"},
- {token: "string", regex: '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},
- {token: "string", regex: "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},
- {token: ["constant.numeric", "keyword"], regex: "(" + c + ")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vm|vw|%)"},
- {token: "constant.numeric", regex: c},
- {token: "constant.numeric", regex: "#[a-f0-9]{6}"},
- {token: "constant.numeric", regex: "#[a-f0-9]{3}"},
- {token: ["punctuation", "entity.other.attribute-name.pseudo-element.css"], regex: h},
- {token: ["punctuation", "entity.other.attribute-name.pseudo-class.css"], regex: p},
- {token: e, regex: "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"}
- ], n = i.copyArray(t);
- n.unshift({token: "paren.rparen", regex: "\\}", next: "start"});
- var r = i.copyArray(t);
- r.unshift({token: "paren.rparen", regex: "\\}", next: "media"});
- var s = [
- {token: "comment", regex: ".+"}
- ], d = i.copyArray(s);
- d.unshift({token: "comment", regex: ".*?\\*\\/", next: "start"});
- var v = i.copyArray(s);
- v.unshift({token: "comment", regex: ".*?\\*\\/", next: "media"});
- var m = i.copyArray(s);
- m.unshift({token: "comment", regex: ".*?\\*\\/", next: "ruleset"}), this.$rules = {start: [
- {token: "comment", regex: "\\/\\*", next: "comment"},
- {token: "paren.lparen", regex: "\\{", next: "ruleset"},
- {token: "string", regex: "@.*?{", next: "media"},
- {token: "keyword", regex: "#[a-z0-9-_]+"},
- {token: "variable", regex: "\\.[a-z0-9-_]+"},
- {token: "string", regex: ":[a-z0-9-_]+"},
- {token: "constant", regex: "[a-z0-9-_]+"}
- ], media: [
- {token: "comment", regex: "\\/\\*", next: "media_comment"},
- {token: "paren.lparen", regex: "\\{", next: "media_ruleset"},
- {token: "string", regex: "\\}", next: "start"},
- {token: "keyword", regex: "#[a-z0-9-_]+"},
- {token: "variable", regex: "\\.[a-z0-9-_]+"},
- {token: "string", regex: ":[a-z0-9-_]+"},
- {token: "constant", regex: "[a-z0-9-_]+"}
- ], comment: d, ruleset: n, ruleset_comment: m, media_ruleset: r, media_comment: v}
- };
- r.inherits(d, s), t.CssHighlightRules = d
-}), ace.define("ace/mode/behaviour/css", ["require", "exports", "module", "ace/lib/oop", "ace/mode/behaviour", "ace/mode/behaviour/cstyle", "ace/token_iterator"], function (e, t, n) {
- var r = e("../../lib/oop"), i = e("../behaviour").Behaviour, s = e("./cstyle").CstyleBehaviour, o = e("../../token_iterator").TokenIterator, u = function () {
- this.inherit(s), this.add("colon", "insertion", function (e, t, n, r, i) {
- if (i === ":") {
- var s = n.getCursorPosition(), u = new o(r, s.row, s.column), a = u.getCurrentToken();
- a && a.value.match(/\s+/) && (a = u.stepBackward());
- if (a && a.type === "support.type") {
- var f = r.doc.getLine(s.row), l = f.substring(s.column, s.column + 1);
- if (l === ":")return{text: "", selection: [1, 1]};
- if (!f.substring(s.column).match(/^\s*;/))return{text: ":;", selection: [1, 1]}
- }
- }
- }), this.add("colon", "deletion", function (e, t, n, r, i) {
- var s = r.doc.getTextRange(i);
- if (!i.isMultiLine() && s === ":") {
- var o = r.doc.getLine(i.start.row), u = o.substring(i.end.column, i.end.column + 1);
- if (u === ";")return i.end.column++, i
- }
- }), this.add("semicolon", "insertion", function (e, t, n, r, i) {
- if (i === ";") {
- var s = n.getCursorPosition(), o = r.doc.getLine(s.row), u = o.substring(s.column, s.column + 1);
- if (u === ";")return{text: "", selection: [1, 1]}
- }
- })
- };
- r.inherits(u, s), t.CssBehaviour = u
-}), ace.define("ace/mode/html_highlight_rules", ["require", "exports", "module", "ace/lib/oop", "ace/lib/lang", "ace/mode/css_highlight_rules", "ace/mode/javascript_highlight_rules", "ace/mode/xml_util", "ace/mode/text_highlight_rules"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("../lib/lang"), s = e("./css_highlight_rules").CssHighlightRules, o = e("./javascript_highlight_rules").JavaScriptHighlightRules, u = e("./xml_util"), a = e("./text_highlight_rules").TextHighlightRules, f = i.createMap({a: "anchor", button: "form", form: "form", img: "image", input: "form", label: "form", script: "script", select: "form", textarea: "form", style: "style", table: "table", tbody: "table", td: "table", tfoot: "table", th: "table", tr: "table"}), l = function () {
- this.$rules = {start: [
- {token: "text", regex: "<\\!\\[CDATA\\[", next: "cdata"},
- {token: "xml-pe", regex: "<\\?.*?\\?>"},
- {token: "comment", regex: "<\\!--", next: "comment"},
- {token: "xml-pe", regex: "<\\!.*?>"},
- {token: "meta.tag", regex: "<(?=script\\b)", next: "script"},
- {token: "meta.tag", regex: "<(?=style\\b)", next: "style"},
- {token: "meta.tag", regex: "<\\/?", next: "tag"},
- {token: "text", regex: "\\s+"},
- {token: "constant.character.entity", regex: "(?:[0-9]+;)|(?:[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}
- ], cdata: [
- {token: "text", regex: "\\]\\]>", next: "start"}
- ], comment: [
- {token: "comment", regex: ".*?-->", next: "start"},
- {defaultToken: "comment"}
- ]}, u.tag(this.$rules, "tag", "start", f), u.tag(this.$rules, "style", "css-start", f), u.tag(this.$rules, "script", "js-start", f), this.embedRules(o, "js-", [
- {token: "comment", regex: "\\/\\/.*(?=<\\/script>)", next: "tag"},
- {token: "meta.tag", regex: "<\\/(?=script)", next: "tag"}
- ]), this.embedRules(s, "css-", [
- {token: "meta.tag", regex: "<\\/(?=style)", next: "tag"}
- ])
- };
- r.inherits(l, a), t.HtmlHighlightRules = l
-}), ace.define("ace/mode/xml_util", ["require", "exports", "module"], function (e, t, n) {
- function r(e) {
- return[
- {token: "string", regex: '"', next: e + "_qqstring"},
- {token: "string", regex: "'", next: e + "_qstring"}
- ]
- }
-
- function i(e, t) {
- return[
- {token: "string", regex: e, next: t},
- {token: "constant.language.escape", regex: "(?:[0-9]+;)|(?:[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"},
- {defaultToken: "string"}
- ]
- }
-
- t.tag = function (e, t, n, s) {
- e[t] = [
- {token: "text", regex: "\\s+"},
- {token: s ? function (e) {
- return s[e] ? "meta.tag.tag-name." + s[e] : "meta.tag.tag-name"
- } : "meta.tag.tag-name", regex: "[-_a-zA-Z0-9:]+", next: t + "_embed_attribute_list"},
- {token: "empty", regex: "", next: t + "_embed_attribute_list"}
- ], e[t + "_qstring"] = i("'", t + "_embed_attribute_list"), e[t + "_qqstring"] = i('"', t + "_embed_attribute_list"), e[t + "_embed_attribute_list"] = [
- {token: "meta.tag.r", regex: "/?>", next: n},
- {token: "keyword.operator", regex: "="},
- {token: "entity.other.attribute-name", regex: "[-_a-zA-Z0-9:]+"},
- {token: "constant.numeric", regex: "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},
- {token: "text", regex: "\\s+"}
- ].concat(r(t))
- }
-}), ace.define("ace/mode/behaviour/html", ["require", "exports", "module", "ace/lib/oop", "ace/mode/behaviour/xml", "ace/mode/behaviour/cstyle", "ace/token_iterator"], function (e, t, n) {
- function a(e, t) {
- var n = !0, r = e.type.split("."), i = t.split(".");
- return i.forEach(function (e) {
- if (r.indexOf(e) == -1)return n = !1, !1
- }), n
- }
-
- var r = e("../../lib/oop"), i = e("../behaviour/xml").XmlBehaviour, s = e("./cstyle").CstyleBehaviour, o = e("../../token_iterator").TokenIterator, u = ["area", "base", "br", "col", "command", "embed", "hr", "img", "input", "keygen", "link", "meta", "param", "source", "track", "wbr"], f = function () {
- this.inherit(i), this.add("autoclosing", "insertion", function (e, t, n, r, i) {
- if (i == ">") {
- var s = n.getCursorPosition(), f = new o(r, s.row, s.column), l = f.getCurrentToken(), c = !1;
- if (!l || !a(l, "meta.tag") && (!a(l, "text") || !l.value.match("/"))) {
- do l = f.stepBackward(); while (l && (a(l, "string") || a(l, "keyword.operator") || a(l, "entity.attribute-name") || a(l, "text")))
- } else c = !0;
- if (!l || !a(l, "meta.tag-name") || f.stepBackward().value.match("/"))return;
- var h = l.value;
- if (c)var h = h.substring(0, s.column - l.start);
- if (u.indexOf(h) !== -1)return;
- return{text: ">" + h + ">", selection: [1, 1]}
- }
- })
- };
- r.inherits(f, i), t.HtmlBehaviour = f
-}), ace.define("ace/mode/behaviour/xml", ["require", "exports", "module", "ace/lib/oop", "ace/mode/behaviour", "ace/mode/behaviour/cstyle", "ace/token_iterator"], function (e, t, n) {
- function u(e, t) {
- var n = !0, r = e.type.split("."), i = t.split(".");
- return i.forEach(function (e) {
- if (r.indexOf(e) == -1)return n = !1, !1
- }), n
- }
-
- var r = e("../../lib/oop"), i = e("../behaviour").Behaviour, s = e("./cstyle").CstyleBehaviour, o = e("../../token_iterator").TokenIterator, a = function () {
- this.inherit(s, ["string_dquotes"]), this.add("autoclosing", "insertion", function (e, t, n, r, i) {
- if (i == ">") {
- var s = n.getCursorPosition(), a = new o(r, s.row, s.column), f = a.getCurrentToken(), l = !1;
- if (!f || !u(f, "meta.tag") && (!u(f, "text") || !f.value.match("/"))) {
- do f = a.stepBackward(); while (f && (u(f, "string") || u(f, "keyword.operator") || u(f, "entity.attribute-name") || u(f, "text")))
- } else l = !0;
- if (!f || !u(f, "meta.tag-name") || a.stepBackward().value.match("/"))return;
- var c = f.value;
- if (l)var c = c.substring(0, s.column - f.start);
- return{text: ">" + c + ">", selection: [1, 1]}
- }
- }), this.add("autoindent", "insertion", function (e, t, n, r, i) {
- if (i == "\n") {
- var s = n.getCursorPosition(), o = r.doc.getLine(s.row), u = o.substring(s.column, s.column + 2);
- if (u == "") {
- var a = this.$getIndent(r.doc.getLine(s.row)) + r.getTabString(), f = this.$getIndent(r.doc.getLine(s.row));
- return{text: "\n" + a + "\n" + f, selection: [1, a.length, 1, a.length]}
- }
- }
- })
- };
- r.inherits(a, i), t.XmlBehaviour = a
-}), ace.define("ace/mode/folding/html", ["require", "exports", "module", "ace/lib/oop", "ace/mode/folding/mixed", "ace/mode/folding/xml", "ace/mode/folding/cstyle"], function (e, t, n) {
- var r = e("../../lib/oop"), i = e("./mixed").FoldMode, s = e("./xml").FoldMode, o = e("./cstyle").FoldMode, u = t.FoldMode = function () {
- i.call(this, new s({area: 1, base: 1, br: 1, col: 1, command: 1, embed: 1, hr: 1, img: 1, input: 1, keygen: 1, link: 1, meta: 1, param: 1, source: 1, track: 1, wbr: 1, li: 1, dt: 1, dd: 1, p: 1, rt: 1, rp: 1, optgroup: 1, option: 1, colgroup: 1, td: 1, th: 1}), {"js-": new o, "css-": new o})
- };
- r.inherits(u, i)
-}), ace.define("ace/mode/folding/mixed", ["require", "exports", "module", "ace/lib/oop", "ace/mode/folding/fold_mode"], function (e, t, n) {
- var r = e("../../lib/oop"), i = e("./fold_mode").FoldMode, s = t.FoldMode = function (e, t) {
- this.defaultMode = e, this.subModes = t
- };
- r.inherits(s, i), function () {
- this.$getMode = function (e) {
- for (var t in this.subModes)if (e.indexOf(t) === 0)return this.subModes[t];
- return null
- }, this.$tryMode = function (e, t, n, r) {
- var i = this.$getMode(e);
- return i ? i.getFoldWidget(t, n, r) : ""
- }, this.getFoldWidget = function (e, t, n) {
- return this.$tryMode(e.getState(n - 1), e, t, n) || this.$tryMode(e.getState(n), e, t, n) || this.defaultMode.getFoldWidget(e, t, n)
- }, this.getFoldWidgetRange = function (e, t, n) {
- var r = this.$getMode(e.getState(n - 1));
- if (!r || !r.getFoldWidget(e, t, n))r = this.$getMode(e.getState(n));
- if (!r || !r.getFoldWidget(e, t, n))r = this.defaultMode;
- return r.getFoldWidgetRange(e, t, n)
- }
- }.call(s.prototype)
-}), ace.define("ace/mode/folding/xml", ["require", "exports", "module", "ace/lib/oop", "ace/lib/lang", "ace/range", "ace/mode/folding/fold_mode", "ace/token_iterator"], function (e, t, n) {
- var r = e("../../lib/oop"), i = e("../../lib/lang"), s = e("../../range").Range, o = e("./fold_mode").FoldMode, u = e("../../token_iterator").TokenIterator, a = t.FoldMode = function (e) {
- o.call(this), this.voidElements = e || {}
- };
- r.inherits(a, o), function () {
- this.getFoldWidget = function (e, t, n) {
- var r = this._getFirstTagInLine(e, n);
- return r.closing ? t == "markbeginend" ? "end" : "" : !r.tagName || this.voidElements[r.tagName.toLowerCase()] ? "" : r.selfClosing ? "" : r.value.indexOf("/" + r.tagName) !== -1 ? "" : "start"
- }, this._getFirstTagInLine = function (e, t) {
- var n = e.getTokens(t), r = "";
- for (var s = 0; s < n.length; s++) {
- var o = n[s];
- o.type.indexOf("meta.tag") === 0 ? r += o.value : r += i.stringRepeat(" ", o.value.length)
- }
- return this._parseTag(r)
- }, this.tagRe = /^(\s*)((\/?)([-_a-zA-Z0-9:!]*)\s*(\/?)>?)/, this._parseTag = function (e) {
- var t = this.tagRe.exec(e), n = this.tagRe.lastIndex || 0;
- return this.tagRe.lastIndex = 0, {value: e, match: t ? t[2] : "", closing: t ? !!t[3] : !1, selfClosing: t ? !!t[5] || t[2] == "/>" : !1, tagName: t ? t[4] : "", column: t[1] ? n + t[1].length : n}
- }, this._readTagForward = function (e) {
- var t = e.getCurrentToken();
- if (!t)return null;
- var n = "", r;
- do if (t.type.indexOf("meta.tag") === 0) {
- if (!r)var r = {row: e.getCurrentTokenRow(), column: e.getCurrentTokenColumn()};
- n += t.value;
- if (n.indexOf(">") !== -1) {
- var i = this._parseTag(n);
- return i.start = r, i.end = {row: e.getCurrentTokenRow(), column: e.getCurrentTokenColumn() + t.value.length}, e.stepForward(), i
- }
- } while (t = e.stepForward());
- return null
- }, this._readTagBackward = function (e) {
- var t = e.getCurrentToken();
- if (!t)return null;
- var n = "", r;
- do if (t.type.indexOf("meta.tag") === 0) {
- r || (r = {row: e.getCurrentTokenRow(), column: e.getCurrentTokenColumn() + t.value.length}), n = t.value + n;
- if (n.indexOf("<") !== -1) {
- var i = this._parseTag(n);
- return i.end = r, i.start = {row: e.getCurrentTokenRow(), column: e.getCurrentTokenColumn()}, e.stepBackward(), i
- }
- } while (t = e.stepBackward());
- return null
- }, this._pop = function (e, t) {
- while (e.length) {
- var n = e[e.length - 1];
- if (!t || n.tagName == t.tagName)return e.pop();
- if (this.voidElements[t.tagName])return;
- if (this.voidElements[n.tagName]) {
- e.pop();
- continue
- }
- return null
- }
- }, this.getFoldWidgetRange = function (e, t, n) {
- var r = this._getFirstTagInLine(e, n);
- if (!r.match)return null;
- var i = r.closing || r.selfClosing, o = [], a;
- if (!i) {
- var f = new u(e, n, r.column), l = {row: n, column: r.column + r.tagName.length + 2};
- while (a = this._readTagForward(f)) {
- if (a.selfClosing) {
- if (!o.length)return a.start.column += a.tagName.length + 2, a.end.column -= 2, s.fromPoints(a.start, a.end);
- continue
- }
- if (a.closing) {
- this._pop(o, a);
- if (o.length == 0)return s.fromPoints(l, a.start)
- } else o.push(a)
- }
- } else {
- var f = new u(e, n, r.column + r.match.length), c = {row: n, column: r.column};
- while (a = this._readTagBackward(f)) {
- if (a.selfClosing) {
- if (!o.length)return a.start.column += a.tagName.length + 2, a.end.column -= 2, s.fromPoints(a.start, a.end);
- continue
- }
- if (!a.closing) {
- this._pop(o, a);
- if (o.length == 0)return a.start.column += a.tagName.length + 2, s.fromPoints(a.start, c)
- } else o.push(a)
- }
- }
- }
- }.call(a.prototype)
-}), ace.define("ace/mode/curly_highlight_rules", ["require", "exports", "module", "ace/lib/oop", "ace/mode/html_highlight_rules"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("./html_highlight_rules").HtmlHighlightRules, s = function () {
- var e = {start: [
- {token: "variable", regex: "{{", next: "curly_mode"}
- ], curly_mode: [
- {token: "variable", regex: "}}", next: "start"}
- ]}, t = (new i).getRules();
- t.start = e.start.concat(t.start), t.curly_mode = e.curly_mode, this.$rules = t
- };
- r.inherits(s, i), t.CurlyHighlightRules = s
-})
\ No newline at end of file
diff --git a/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/mode-dart.js b/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/mode-dart.js
deleted file mode 100644
index 4c2c36d..0000000
--- a/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/mode-dart.js
+++ /dev/null
@@ -1,71 +0,0 @@
-ace.define("ace/mode/dart", ["require", "exports", "module", "ace/lib/oop", "ace/mode/text", "ace/tokenizer", "ace/mode/dart_highlight_rules", "ace/mode/folding/cstyle"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("./text").Mode, s = e("../tokenizer").Tokenizer, o = e("./dart_highlight_rules").DartHighlightRules, u = e("./folding/cstyle").FoldMode, a = function () {
- var e = new o;
- this.foldingRules = new u, this.$tokenizer = new s(e.getRules())
- };
- r.inherits(a, i), function () {
- }.call(a.prototype), t.Mode = a
-}), ace.define("ace/mode/dart_highlight_rules", ["require", "exports", "module", "ace/lib/oop", "ace/mode/text_highlight_rules"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("./text_highlight_rules").TextHighlightRules, s = function () {
- var e = "true|false|null", t = "this|super", n = "try|catch|finally|throw|break|case|continue|default|do|else|for|if|in|return|switch|while|new", r = "abstract|class|extends|external|factory|implements|interface|get|native|operator|set|typedef", i = "static|final|const", s = "void|bool|num|int|double|Dynamic|var|String", o = this.createKeywordMapper({"constant.language.dart": e, "variable.language.dart": t, "keyword.control.dart": n, "keyword.declaration.dart": r, "storage.modifier.dart": i, "storage.type.primitive.dart": s}, "identifier"), u = {token: "string", regex: ".+"};
- this.$rules = {start: [
- {token: "comment", regex: /\/\/.*$/},
- {token: "comment", regex: /\/\*/, next: "comment"},
- {token: ["meta.preprocessor.script.dart"], regex: "^(#!.*)$"},
- {token: "keyword.other.import.dart", regex: "#(?:\\b)(?:library|import|source|resource)(?:\\b)"},
- {token: ["keyword.other.import.dart", "text"], regex: "(?:\\b)(prefix)(\\s*:)"},
- {regex: "\\bas\\b", token: "keyword.cast.dart"},
- {regex: "\\?|:", token: "keyword.control.ternary.dart"},
- {regex: "(?:\\b)(is\\!?)(?:\\b)", token: ["keyword.operator.dart"]},
- {regex: "(<<|>>>?|~|\\^|\\||&)", token: ["keyword.operator.bitwise.dart"]},
- {regex: "((?:&|\\^|\\||<<|>>>?)=)", token: ["keyword.operator.assignment.bitwise.dart"]},
- {regex: "(===?|!==?|<=?|>=?)", token: ["keyword.operator.comparison.dart"]},
- {regex: "((?:[+*/%-]|\\~)=)", token: ["keyword.operator.assignment.arithmetic.dart"]},
- {regex: "=", token: "keyword.operator.assignment.dart"},
- {token: "string", regex: "'''", next: "qdoc"},
- {token: "string", regex: '"""', next: "qqdoc"},
- {token: "string", regex: "'", next: "qstring"},
- {token: "string", regex: '"', next: "qqstring"},
- {regex: "(\\-\\-|\\+\\+)", token: ["keyword.operator.increment-decrement.dart"]},
- {regex: "(\\-|\\+|\\*|\\/|\\~\\/|%)", token: ["keyword.operator.arithmetic.dart"]},
- {regex: "(!|&&|\\|\\|)", token: ["keyword.operator.logical.dart"]},
- {token: "constant.numeric", regex: "0[xX][0-9a-fA-F]+\\b"},
- {token: "constant.numeric", regex: "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},
- {token: o, regex: "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"}
- ], comment: [
- {token: "comment", regex: ".*?\\*\\/", next: "start"},
- {token: "comment", regex: ".+"}
- ], qdoc: [
- {token: "string", regex: ".*?'''", next: "start"},
- u
- ], qqdoc: [
- {token: "string", regex: '.*?"""', next: "start"},
- u
- ], qstring: [
- {token: "string", regex: "[^\\\\']*(?:\\\\.[^\\\\']*)*'", next: "start"},
- u
- ], qqstring: [
- {token: "string", regex: '[^\\\\"]*(?:\\\\.[^\\\\"]*)*"', next: "start"},
- u
- ]}
- };
- r.inherits(s, i), t.DartHighlightRules = s
-}), ace.define("ace/mode/folding/cstyle", ["require", "exports", "module", "ace/lib/oop", "ace/range", "ace/mode/folding/fold_mode"], function (e, t, n) {
- var r = e("../../lib/oop"), i = e("../../range").Range, s = e("./fold_mode").FoldMode, o = t.FoldMode = function () {
- };
- r.inherits(o, s), function () {
- this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/, this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/, this.getFoldWidgetRange = function (e, t, n) {
- var r = e.getLine(n), i = r.match(this.foldingStartMarker);
- if (i) {
- var s = i.index;
- return i[1] ? this.openingBracketBlock(e, i[1], n, s) : e.getCommentFoldRange(n, s + i[0].length, 1)
- }
- if (t !== "markbeginend")return;
- var i = r.match(this.foldingStopMarker);
- if (i) {
- var s = i.index + i[0].length;
- return i[1] ? this.closingBracketBlock(e, i[1], n, s) : e.getCommentFoldRange(n, s, -1)
- }
- }
- }.call(o.prototype)
-})
\ No newline at end of file
diff --git a/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/mode-diff.js b/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/mode-diff.js
deleted file mode 100644
index 4d364ee..0000000
--- a/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/mode-diff.js
+++ /dev/null
@@ -1,42 +0,0 @@
-ace.define("ace/mode/diff", ["require", "exports", "module", "ace/lib/oop", "ace/mode/text", "ace/tokenizer", "ace/mode/diff_highlight_rules", "ace/mode/folding/diff"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("./text").Mode, s = e("../tokenizer").Tokenizer, o = e("./diff_highlight_rules").DiffHighlightRules, u = e("./folding/diff").FoldMode, a = function () {
- this.$tokenizer = new s((new o).getRules(), "i"), this.foldingRules = new u(["diff", "index", "\\+{3}", "@@|\\*{5}"], "i")
- };
- r.inherits(a, i), function () {
- }.call(a.prototype), t.Mode = a
-}), ace.define("ace/mode/diff_highlight_rules", ["require", "exports", "module", "ace/lib/oop", "ace/mode/text_highlight_rules"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("./text_highlight_rules").TextHighlightRules, s = function () {
- this.$rules = {start: [
- {regex: "^(?:\\*{15}|={67}|-{3}|\\+{3})$", token: "punctuation.definition.separator.diff", name: "keyword"},
- {regex: "^(@@)(\\s*.+?\\s*)(@@)(.*)$", token: ["constant", "constant.numeric", "constant", "comment.doc.tag"]},
- {regex: "^(\\d+)([,\\d]+)(a|d|c)(\\d+)([,\\d]+)(.*)$", token: ["constant.numeric", "punctuation.definition.range.diff", "constant.function", "constant.numeric", "punctuation.definition.range.diff", "invalid"], name: "meta."},
- {regex: "^(\\-{3}|\\+{3}|\\*{3})( .+)$", token: ["constant.numeric", "meta.tag"]},
- {regex: "^([!+>])(.*?)(\\s*)$", token: ["support.constant", "text", "invalid"]},
- {regex: "^([<\\-])(.*?)(\\s*)$", token: ["support.function", "string", "invalid"]},
- {regex: "^(diff)(\\s+--\\w+)?(.+?)( .+)?$", token: ["variable", "variable", "keyword", "variable"]},
- {regex: "^Index.+$", token: "variable"},
- {regex: "\\s*$", token: "invalid"},
- {defaultToken: "invisible"}
- ]}
- };
- r.inherits(s, i), t.DiffHighlightRules = s
-}), ace.define("ace/mode/folding/diff", ["require", "exports", "module", "ace/lib/oop", "ace/mode/folding/fold_mode", "ace/range"], function (e, t, n) {
- var r = e("../../lib/oop"), i = e("./fold_mode").FoldMode, s = e("../../range").Range, o = t.FoldMode = function (e, t) {
- this.regExpList = e, this.flag = t, this.foldingStartMarker = RegExp("^(" + e.join("|") + ")", this.flag)
- };
- r.inherits(o, i), function () {
- this.getFoldWidgetRange = function (e, t, n) {
- var r = e.getLine(n), i = {row: n, column: r.length}, o = this.regExpList;
- for (var u = 1; u <= o.length; u++) {
- var a = RegExp("^(" + o.slice(0, u).join("|") + ")", this.flag);
- if (a.test(r))break
- }
- for (var f = e.getLength(); ++n < f;) {
- r = e.getLine(n);
- if (a.test(r))break
- }
- if (n == i.row + 1)return;
- return s.fromPoints(i, {row: n - 1, column: r.length})
- }
- }.call(o.prototype)
-})
\ No newline at end of file
diff --git a/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/mode-django.js b/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/mode-django.js
deleted file mode 100644
index eedd2a0..0000000
--- a/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/mode-django.js
+++ /dev/null
@@ -1,638 +0,0 @@
-ace.define("ace/mode/django", ["require", "exports", "module", "ace/lib/oop", "ace/mode/html", "ace/mode/text_highlight_rules", "ace/tokenizer", "ace/mode/html_highlight_rules"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("./html").Mode, s = e("../tokenizer").Tokenizer, o = e("./html_highlight_rules").HtmlHighlightRules, u = e("./text_highlight_rules").TextHighlightRules, a = function () {
- this.$rules = {start: [
- {token: "string", regex: '".*?"'},
- {token: "string", regex: "'.*?'"},
- {token: "constant", regex: "[0-9]+"},
- {token: "variable", regex: "[-_a-zA-Z0-9:]+"}
- ], comment: [
- {token: "comment.block", merge: !0, regex: ".+?"}
- ], tag: [
- {token: "entity.name.function", regex: "[a-zA-Z][_a-zA-Z0-9]*", next: "start"}
- ]}
- };
- r.inherits(a, u);
- var f = function () {
- this.$rules = (new o).getRules();
- for (var e in this.$rules)this.$rules[e].unshift({token: "comment.line", regex: "\\{#.*?#\\}"}, {token: "comment.block", regex: "\\{\\%\\s*comment\\s*\\%\\}", merge: !0, next: "django-comment"}, {token: "constant.language", regex: "\\{\\{", next: "django-start"}, {token: "constant.language", regex: "\\{\\%", next: "django-tag"}), this.embedRules(a, "django-", [
- {token: "comment.block", regex: "\\{\\%\\s*endcomment\\s*\\%\\}", merge: !0, next: "start"},
- {token: "constant.language", regex: "\\%\\}", next: "start"},
- {token: "constant.language", regex: "\\}\\}", next: "start"}
- ])
- };
- r.inherits(f, o);
- var l = function () {
- var e = new f;
- this.$tokenizer = new s(e.getRules()), this.$embeds = e.getEmbeds()
- };
- r.inherits(l, i), t.Mode = l
-}), ace.define("ace/mode/html", ["require", "exports", "module", "ace/lib/oop", "ace/mode/text", "ace/mode/javascript", "ace/mode/css", "ace/tokenizer", "ace/mode/html_highlight_rules", "ace/mode/behaviour/html", "ace/mode/folding/html"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("./text").Mode, s = e("./javascript").Mode, o = e("./css").Mode, u = e("../tokenizer").Tokenizer, a = e("./html_highlight_rules").HtmlHighlightRules, f = e("./behaviour/html").HtmlBehaviour, l = e("./folding/html").FoldMode, c = function () {
- var e = new a;
- this.$tokenizer = new u(e.getRules()), this.$behaviour = new f, this.$embeds = e.getEmbeds(), this.createModeDelegates({"js-": s, "css-": o}), this.foldingRules = new l
- };
- r.inherits(c, i), function () {
- this.toggleCommentLines = function (e, t, n, r) {
- return 0
- }, this.getNextLineIndent = function (e, t, n) {
- return this.$getIndent(t)
- }, this.checkOutdent = function (e, t, n) {
- return!1
- }
- }.call(c.prototype), t.Mode = c
-}), ace.define("ace/mode/javascript", ["require", "exports", "module", "ace/lib/oop", "ace/mode/text", "ace/tokenizer", "ace/mode/javascript_highlight_rules", "ace/mode/matching_brace_outdent", "ace/range", "ace/worker/worker_client", "ace/mode/behaviour/cstyle", "ace/mode/folding/cstyle"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("./text").Mode, s = e("../tokenizer").Tokenizer, o = e("./javascript_highlight_rules").JavaScriptHighlightRules, u = e("./matching_brace_outdent").MatchingBraceOutdent, a = e("../range").Range, f = e("../worker/worker_client").WorkerClient, l = e("./behaviour/cstyle").CstyleBehaviour, c = e("./folding/cstyle").FoldMode, h = function () {
- this.$tokenizer = new s((new o).getRules()), this.$outdent = new u, this.$behaviour = new l, this.foldingRules = new c
- };
- r.inherits(h, i), function () {
- this.toggleCommentLines = function (e, t, n, r) {
- var i = !0, s = /^(\s*)\/\//;
- for (var o = n; o <= r; o++)if (!s.test(t.getLine(o))) {
- i = !1;
- break
- }
- if (i) {
- var u = new a(0, 0, 0, 0);
- for (var o = n; o <= r; o++) {
- var f = t.getLine(o), l = f.match(s);
- u.start.row = o, u.end.row = o, u.end.column = l[0].length, t.replace(u, l[1])
- }
- } else t.indentRows(n, r, "//")
- }, this.getNextLineIndent = function (e, t, n) {
- var r = this.$getIndent(t), i = this.$tokenizer.getLineTokens(t, e), s = i.tokens, o = i.state;
- if (s.length && s[s.length - 1].type == "comment")return r;
- if (e == "start" || e == "regex_allowed") {
- var u = t.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/);
- u && (r += n)
- } else if (e == "doc-start") {
- if (o == "start" || e == "regex_allowed")return"";
- var u = t.match(/^\s*(\/?)\*/);
- u && (u[1] && (r += " "), r += "* ")
- }
- return r
- }, this.checkOutdent = function (e, t, n) {
- return this.$outdent.checkOutdent(t, n)
- }, this.autoOutdent = function (e, t, n) {
- this.$outdent.autoOutdent(t, n)
- }, this.createWorker = function (e) {
- var t = new f(["ace"], "ace/mode/javascript_worker", "JavaScriptWorker");
- return t.attachToDocument(e.getDocument()), t.on("jslint", function (t) {
- e.setAnnotations(t.data)
- }), t.on("terminate", function () {
- e.clearAnnotations()
- }), t
- }
- }.call(h.prototype), t.Mode = h
-}), ace.define("ace/mode/javascript_highlight_rules", ["require", "exports", "module", "ace/lib/oop", "ace/mode/doc_comment_highlight_rules", "ace/mode/text_highlight_rules"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("./doc_comment_highlight_rules").DocCommentHighlightRules, s = e("./text_highlight_rules").TextHighlightRules, o = function () {
- var e = this.createKeywordMapper({"variable.language": "Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document", keyword: "const|yield|import|get|set|break|case|catch|continue|default|delete|do|else|finally|for|function|if|in|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|__parent__|__count__|escape|unescape|with|__proto__|class|enum|extends|super|export|implements|private|public|interface|package|protected|static", "storage.type": "const|let|var|function", "constant.language": "null|Infinity|NaN|undefined", "support.function": "alert", "constant.language.boolean": "true|false"}, "identifier"), t = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void", n = "[a-zA-Z\\$_¡-￿][a-zA-Z\\d\\$_¡-￿]*\\b", r = "\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|[0-2][0-7]{0,2}|3[0-6][0-7]?|37[0-7]?|[4-7][0-7]?|.)";
- this.$rules = {start: [
- {token: "comment", regex: /\/\/.*$/},
- i.getStartRule("doc-start"),
- {token: "comment", regex: /\/\*/, next: "comment"},
- {token: "string", regex: "'(?=.)", next: "qstring"},
- {token: "string", regex: '"(?=.)', next: "qqstring"},
- {token: "constant.numeric", regex: /0[xX][0-9a-fA-F]+\b/},
- {token: "constant.numeric", regex: /[+-]?\d+(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?\b/},
- {token: ["storage.type", "punctuation.operator", "support.function", "punctuation.operator", "entity.name.function", "text", "keyword.operator"], regex: "(" + n + ")(\\.)(prototype)(\\.)(" + n + ")(\\s*)(=)", next: "function_arguments"},
- {token: ["storage.type", "punctuation.operator", "entity.name.function", "text", "keyword.operator", "text", "storage.type", "text", "paren.lparen"], regex: "(" + n + ")(\\.)(" + n + ")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", next: "function_arguments"},
- {token: ["entity.name.function", "text", "keyword.operator", "text", "storage.type", "text", "paren.lparen"], regex: "(" + n + ")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", next: "function_arguments"},
- {token: ["storage.type", "punctuation.operator", "entity.name.function", "text", "keyword.operator", "text", "storage.type", "text", "entity.name.function", "text", "paren.lparen"], regex: "(" + n + ")(\\.)(" + n + ")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()", next: "function_arguments"},
- {token: ["storage.type", "text", "entity.name.function", "text", "paren.lparen"], regex: "(function)(\\s+)(" + n + ")(\\s*)(\\()", next: "function_arguments"},
- {token: ["entity.name.function", "text", "punctuation.operator", "text", "storage.type", "text", "paren.lparen"], regex: "(" + n + ")(\\s*)(:)(\\s*)(function)(\\s*)(\\()", next: "function_arguments"},
- {token: ["text", "text", "storage.type", "text", "paren.lparen"], regex: "(:)(\\s*)(function)(\\s*)(\\()", next: "function_arguments"},
- {token: "keyword", regex: "(?:" + t + ")\\b", next: "regex_allowed"},
- {token: ["punctuation.operator", "support.function"], regex: /(\.)(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:opzzzz|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/},
- {token: ["punctuation.operator", "support.function.dom"], regex: /(\.)(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/},
- {token: ["punctuation.operator", "support.constant"], regex: /(\.)(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/},
- {token: ["storage.type", "punctuation.operator", "support.function.firebug"], regex: /(console)(\.)(warn|info|log|error|time|timeEnd|assert)\b/},
- {token: e, regex: n},
- {token: "keyword.operator", regex: /--|\+\+|[!$%&*+\-~]|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|\*=|%=|\+=|\-=|&=|\^=/, next: "regex_allowed"},
- {token: "punctuation.operator", regex: /\?|\:|\,|\;|\./, next: "regex_allowed"},
- {token: "paren.lparen", regex: /[\[({]/, next: "regex_allowed"},
- {token: "paren.rparen", regex: /[\])}]/},
- {token: "keyword.operator", regex: /\/=?/, next: "regex_allowed"},
- {token: "comment", regex: /^#!.*$/}
- ], regex_allowed: [i.getStartRule("doc-start"), {token: "comment", regex: "\\/\\*", next: "comment_regex_allowed"}, {token: "comment", regex: "\\/\\/.*$"}, {token: "string.regexp", regex: "\\/", next: "regex"}, {token: "text", regex: "\\s+"}, {token: "empty", regex: "", next: "start"}], regex: [
- {token: "regexp.keyword.operator", regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},
- {token: "string.regexp", regex: "/\\w*", next: "start"},
- {token: "invalid", regex: /\{\d+,?(?:\d+)?}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/},
- {token: "constant.language.escape", regex: /\(\?[:=!]|\)|{\d+,?(?:\d+)?}|{,\d+}|[+*]\?|[()$^+*?]/},
- {token: "constant.language.delimiter", regex: /\|/},
- {token: "constant.language.escape", regex: /\[\^?/, next: "regex_character_class"},
- {token: "empty", regex: "$", next: "start"},
- {defaultToken: "string.regexp"}
- ], regex_character_class: [
- {token: "regexp.keyword.operator", regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},
- {token: "constant.language.escape", regex: "]", next: "regex"},
- {token: "constant.language.escape", regex: "-"},
- {token: "empty", regex: "$", next: "start"},
- {defaultToken: "string.regexp.charachterclass"}
- ], function_arguments: [
- {token: "variable.parameter", regex: n},
- {token: "punctuation.operator", regex: "[, ]+"},
- {token: "punctuation.operator", regex: "$"},
- {token: "empty", regex: "", next: "start"}
- ], comment_regex_allowed: [
- {token: "comment", regex: "\\*\\/", next: "regex_allowed"},
- {defaultToken: "comment"}
- ], comment: [
- {token: "comment", regex: "\\*\\/", next: "start"},
- {defaultToken: "comment"}
- ], qqstring: [
- {token: "constant.language.escape", regex: r},
- {token: "string", regex: "\\\\$", next: "qqstring"},
- {token: "string", regex: '"|$', next: "start"},
- {defaultToken: "string"}
- ], qstring: [
- {token: "constant.language.escape", regex: r},
- {token: "string", regex: "\\\\$", next: "qstring"},
- {token: "string", regex: "'|$", next: "start"},
- {defaultToken: "string"}
- ]}, this.embedRules(i, "doc-", [i.getEndRule("start")])
- };
- r.inherits(o, s), t.JavaScriptHighlightRules = o
-}), ace.define("ace/mode/doc_comment_highlight_rules", ["require", "exports", "module", "ace/lib/oop", "ace/mode/text_highlight_rules"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("./text_highlight_rules").TextHighlightRules, s = function () {
- this.$rules = {start: [
- {token: "comment.doc.tag", regex: "@[\\w\\d_]+"},
- {token: "comment.doc.tag", regex: "\\bTODO\\b"},
- {defaultToken: "comment.doc"}
- ]}
- };
- r.inherits(s, i), s.getStartRule = function (e) {
- return{token: "comment.doc", regex: "\\/\\*(?=\\*)", next: e}
- }, s.getEndRule = function (e) {
- return{token: "comment.doc", regex: "\\*\\/", next: e}
- }, t.DocCommentHighlightRules = s
-}), ace.define("ace/mode/matching_brace_outdent", ["require", "exports", "module", "ace/range"], function (e, t, n) {
- var r = e("../range").Range, i = function () {
- };
- (function () {
- this.checkOutdent = function (e, t) {
- return/^\s+$/.test(e) ? /^\s*\}/.test(t) : !1
- }, this.autoOutdent = function (e, t) {
- var n = e.getLine(t), i = n.match(/^(\s*\})/);
- if (!i)return 0;
- var s = i[1].length, o = e.findMatchingBracket({row: t, column: s});
- if (!o || o.row == t)return 0;
- var u = this.$getIndent(e.getLine(o.row));
- e.replace(new r(t, 0, t, s - 1), u)
- }, this.$getIndent = function (e) {
- var t = e.match(/^(\s+)/);
- return t ? t[1] : ""
- }
- }).call(i.prototype), t.MatchingBraceOutdent = i
-}), ace.define("ace/mode/behaviour/cstyle", ["require", "exports", "module", "ace/lib/oop", "ace/mode/behaviour", "ace/token_iterator", "ace/lib/lang"], function (e, t, n) {
- var r = e("../../lib/oop"), i = e("../behaviour").Behaviour, s = e("../../token_iterator").TokenIterator, o = e("../../lib/lang"), u = ["text", "paren.rparen", "punctuation.operator"], a = ["text", "paren.rparen", "punctuation.operator", "comment"], f = 0, l = -1, c = "", h = 0, p = -1, d = "", v = "", m = function () {
- m.isSaneInsertion = function (e, t) {
- var n = e.getCursorPosition(), r = new s(t, n.row, n.column);
- if (!this.$matchTokenType(r.getCurrentToken() || "text", u)) {
- var i = new s(t, n.row, n.column + 1);
- if (!this.$matchTokenType(i.getCurrentToken() || "text", u))return!1
- }
- return r.stepForward(), r.getCurrentTokenRow() !== n.row || this.$matchTokenType(r.getCurrentToken() || "text", a)
- }, m.$matchTokenType = function (e, t) {
- return t.indexOf(e.type || e) > -1
- }, m.recordAutoInsert = function (e, t, n) {
- var r = e.getCursorPosition(), i = t.doc.getLine(r.row);
- this.isAutoInsertedClosing(r, i, c[0]) || (f = 0), l = r.row, c = n + i.substr(r.column), f++
- }, m.recordMaybeInsert = function (e, t, n) {
- var r = e.getCursorPosition(), i = t.doc.getLine(r.row);
- this.isMaybeInsertedClosing(r, i) || (h = 0), p = r.row, d = i.substr(0, r.column) + n, v = i.substr(r.column), h++
- }, m.isAutoInsertedClosing = function (e, t, n) {
- return f > 0 && e.row === l && n === c[0] && t.substr(e.column) === c
- }, m.isMaybeInsertedClosing = function (e, t) {
- return h > 0 && e.row === p && t.substr(e.column) === v && t.substr(0, e.column) == d
- }, m.popAutoInsertedClosing = function () {
- c = c.substr(1), f--
- }, m.clearMaybeInsertedClosing = function () {
- h = 0, p = -1
- }, this.add("braces", "insertion", function (e, t, n, r, i) {
- var s = n.getCursorPosition(), u = r.doc.getLine(s.row);
- if (i == "{") {
- var a = n.getSelectionRange(), f = r.doc.getTextRange(a);
- if (f !== "" && f !== "{" && n.getWrapBehavioursEnabled())return{text: "{" + f + "}", selection: !1};
- if (m.isSaneInsertion(n, r))return/[\]\}\)]/.test(u[s.column]) ? (m.recordAutoInsert(n, r, "}"), {text: "{}", selection: [1, 1]}) : (m.recordMaybeInsert(n, r, "{"), {text: "{", selection: [1, 1]})
- } else if (i == "}") {
- var l = u.substring(s.column, s.column + 1);
- if (l == "}") {
- var c = r.$findOpeningBracket("}", {column: s.column + 1, row: s.row});
- if (c !== null && m.isAutoInsertedClosing(s, u, i))return m.popAutoInsertedClosing(), {text: "", selection: [1, 1]}
- }
- } else if (i == "\n" || i == "\r\n") {
- var p = "";
- m.isMaybeInsertedClosing(s, u) && (p = o.stringRepeat("}", h), m.clearMaybeInsertedClosing());
- var l = u.substring(s.column, s.column + 1);
- if (l == "}" || p !== "") {
- var d = r.findMatchingBracket({row: s.row, column: s.column}, "}");
- if (!d)return null;
- var v = this.getNextLineIndent(e, u.substring(0, s.column), r.getTabString()), g = this.$getIndent(u);
- return{text: "\n" + v + "\n" + g + p, selection: [1, v.length, 1, v.length]}
- }
- }
- }), this.add("braces", "deletion", function (e, t, n, r, i) {
- var s = r.doc.getTextRange(i);
- if (!i.isMultiLine() && s == "{") {
- var o = r.doc.getLine(i.start.row), u = o.substring(i.end.column, i.end.column + 1);
- if (u == "}")return i.end.column++, i;
- h--
- }
- }), this.add("parens", "insertion", function (e, t, n, r, i) {
- if (i == "(") {
- var s = n.getSelectionRange(), o = r.doc.getTextRange(s);
- if (o !== "" && n.getWrapBehavioursEnabled())return{text: "(" + o + ")", selection: !1};
- if (m.isSaneInsertion(n, r))return m.recordAutoInsert(n, r, ")"), {text: "()", selection: [1, 1]}
- } else if (i == ")") {
- var u = n.getCursorPosition(), a = r.doc.getLine(u.row), f = a.substring(u.column, u.column + 1);
- if (f == ")") {
- var l = r.$findOpeningBracket(")", {column: u.column + 1, row: u.row});
- if (l !== null && m.isAutoInsertedClosing(u, a, i))return m.popAutoInsertedClosing(), {text: "", selection: [1, 1]}
- }
- }
- }), this.add("parens", "deletion", function (e, t, n, r, i) {
- var s = r.doc.getTextRange(i);
- if (!i.isMultiLine() && s == "(") {
- var o = r.doc.getLine(i.start.row), u = o.substring(i.start.column + 1, i.start.column + 2);
- if (u == ")")return i.end.column++, i
- }
- }), this.add("brackets", "insertion", function (e, t, n, r, i) {
- if (i == "[") {
- var s = n.getSelectionRange(), o = r.doc.getTextRange(s);
- if (o !== "" && n.getWrapBehavioursEnabled())return{text: "[" + o + "]", selection: !1};
- if (m.isSaneInsertion(n, r))return m.recordAutoInsert(n, r, "]"), {text: "[]", selection: [1, 1]}
- } else if (i == "]") {
- var u = n.getCursorPosition(), a = r.doc.getLine(u.row), f = a.substring(u.column, u.column + 1);
- if (f == "]") {
- var l = r.$findOpeningBracket("]", {column: u.column + 1, row: u.row});
- if (l !== null && m.isAutoInsertedClosing(u, a, i))return m.popAutoInsertedClosing(), {text: "", selection: [1, 1]}
- }
- }
- }), this.add("brackets", "deletion", function (e, t, n, r, i) {
- var s = r.doc.getTextRange(i);
- if (!i.isMultiLine() && s == "[") {
- var o = r.doc.getLine(i.start.row), u = o.substring(i.start.column + 1, i.start.column + 2);
- if (u == "]")return i.end.column++, i
- }
- }), this.add("string_dquotes", "insertion", function (e, t, n, r, i) {
- if (i == '"' || i == "'") {
- var s = i, o = n.getSelectionRange(), u = r.doc.getTextRange(o);
- if (u !== "" && u !== "'" && u != '"' && n.getWrapBehavioursEnabled())return{text: s + u + s, selection: !1};
- var a = n.getCursorPosition(), f = r.doc.getLine(a.row), l = f.substring(a.column - 1, a.column);
- if (l == "\\")return null;
- var c = r.getTokens(o.start.row), h = 0, p, d = -1;
- for (var v = 0; v < c.length; v++) {
- p = c[v], p.type == "string" ? d = -1 : d < 0 && (d = p.value.indexOf(s));
- if (p.value.length + h > o.start.column)break;
- h += c[v].value.length
- }
- if (!p || d < 0 && p.type !== "comment" && (p.type !== "string" || o.start.column !== p.value.length + h - 1 && p.value.lastIndexOf(s) === p.value.length - 1)) {
- if (!m.isSaneInsertion(n, r))return;
- return{text: s + s, selection: [1, 1]}
- }
- if (p && p.type === "string") {
- var g = f.substring(a.column, a.column + 1);
- if (g == s)return{text: "", selection: [1, 1]}
- }
- }
- }), this.add("string_dquotes", "deletion", function (e, t, n, r, i) {
- var s = r.doc.getTextRange(i);
- if (!i.isMultiLine() && (s == '"' || s == "'")) {
- var o = r.doc.getLine(i.start.row), u = o.substring(i.start.column + 1, i.start.column + 2);
- if (u == s)return i.end.column++, i
- }
- })
- };
- r.inherits(m, i), t.CstyleBehaviour = m
-}), ace.define("ace/mode/folding/cstyle", ["require", "exports", "module", "ace/lib/oop", "ace/range", "ace/mode/folding/fold_mode"], function (e, t, n) {
- var r = e("../../lib/oop"), i = e("../../range").Range, s = e("./fold_mode").FoldMode, o = t.FoldMode = function () {
- };
- r.inherits(o, s), function () {
- this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/, this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/, this.getFoldWidgetRange = function (e, t, n) {
- var r = e.getLine(n), i = r.match(this.foldingStartMarker);
- if (i) {
- var s = i.index;
- return i[1] ? this.openingBracketBlock(e, i[1], n, s) : e.getCommentFoldRange(n, s + i[0].length, 1)
- }
- if (t !== "markbeginend")return;
- var i = r.match(this.foldingStopMarker);
- if (i) {
- var s = i.index + i[0].length;
- return i[1] ? this.closingBracketBlock(e, i[1], n, s) : e.getCommentFoldRange(n, s, -1)
- }
- }
- }.call(o.prototype)
-}), ace.define("ace/mode/css", ["require", "exports", "module", "ace/lib/oop", "ace/mode/text", "ace/tokenizer", "ace/mode/css_highlight_rules", "ace/mode/matching_brace_outdent", "ace/worker/worker_client", "ace/mode/behaviour/css", "ace/mode/folding/cstyle"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("./text").Mode, s = e("../tokenizer").Tokenizer, o = e("./css_highlight_rules").CssHighlightRules, u = e("./matching_brace_outdent").MatchingBraceOutdent, a = e("../worker/worker_client").WorkerClient, f = e("./behaviour/css").CssBehaviour, l = e("./folding/cstyle").FoldMode, c = function () {
- this.$tokenizer = new s((new o).getRules(), "i"), this.$outdent = new u, this.$behaviour = new f, this.foldingRules = new l
- };
- r.inherits(c, i), function () {
- this.foldingRules = "cStyle", this.getNextLineIndent = function (e, t, n) {
- var r = this.$getIndent(t), i = this.$tokenizer.getLineTokens(t, e).tokens;
- if (i.length && i[i.length - 1].type == "comment")return r;
- var s = t.match(/^.*\{\s*$/);
- return s && (r += n), r
- }, this.checkOutdent = function (e, t, n) {
- return this.$outdent.checkOutdent(t, n)
- }, this.autoOutdent = function (e, t, n) {
- this.$outdent.autoOutdent(t, n)
- }, this.createWorker = function (e) {
- var t = new a(["ace"], "ace/mode/css_worker", "Worker");
- return t.attachToDocument(e.getDocument()), t.on("csslint", function (t) {
- e.setAnnotations(t.data)
- }), t.on("terminate", function () {
- e.clearAnnotations()
- }), t
- }
- }.call(c.prototype), t.Mode = c
-}), ace.define("ace/mode/css_highlight_rules", ["require", "exports", "module", "ace/lib/oop", "ace/lib/lang", "ace/mode/text_highlight_rules"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("../lib/lang"), s = e("./text_highlight_rules").TextHighlightRules, o = t.supportType = "animation-fill-mode|alignment-adjust|alignment-baseline|animation-delay|animation-direction|animation-duration|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|animation|appearance|azimuth|backface-visibility|background-attachment|background-break|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|background|baseline-shift|binding|bleed|bookmark-label|bookmark-level|bookmark-state|bookmark-target|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|border|bottom|box-align|box-decoration-break|box-direction|box-flex-group|box-flex|box-lines|box-ordinal-group|box-orient|box-pack|box-shadow|box-sizing|break-after|break-before|break-inside|caption-side|clear|clip|color-profile|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|crop|cue-after|cue-before|cue|cursor|direction|display|dominant-baseline|drop-initial-after-adjust|drop-initial-after-align|drop-initial-before-adjust|drop-initial-before-align|drop-initial-size|drop-initial-value|elevation|empty-cells|fit|fit-position|float-offset|float|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|font|grid-columns|grid-rows|hanging-punctuation|height|hyphenate-after|hyphenate-before|hyphenate-character|hyphenate-lines|hyphenate-resource|hyphens|icon|image-orientation|image-rendering|image-resolution|inline-box-align|left|letter-spacing|line-height|line-stacking-ruby|line-stacking-shift|line-stacking-strategy|line-stacking|list-style-image|list-style-position|list-style-type|list-style|margin-bottom|margin-left|margin-right|margin-top|margin|mark-after|mark-before|mark|marks|marquee-direction|marquee-play-count|marquee-speed|marquee-style|max-height|max-width|min-height|min-width|move-to|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|orphans|outline-color|outline-offset|outline-style|outline-width|outline|overflow-style|overflow-x|overflow-y|overflow|padding-bottom|padding-left|padding-right|padding-top|padding|page-break-after|page-break-before|page-break-inside|page-policy|page|pause-after|pause-before|pause|perspective-origin|perspective|phonemes|pitch-range|pitch|play-during|position|presentation-level|punctuation-trim|quotes|rendering-intent|resize|rest-after|rest-before|rest|richness|right|rotation-point|rotation|ruby-align|ruby-overhang|ruby-position|ruby-span|size|speak-header|speak-numeral|speak-punctuation|speak|speech-rate|stress|string-set|table-layout|target-name|target-new|target-position|target|text-align-last|text-align|text-decoration|text-emphasis|text-height|text-indent|text-justify|text-outline|text-shadow|text-transform|text-wrap|top|transform-origin|transform-style|transform|transition-delay|transition-duration|transition-property|transition-timing-function|transition|unicode-bidi|vertical-align|visibility|voice-balance|voice-duration|voice-family|voice-pitch-range|voice-pitch|voice-rate|voice-stress|voice-volume|volume|white-space-collapse|white-space|widows|width|word-break|word-spacing|word-wrap|z-index", u = t.supportFunction = "rgb|rgba|url|attr|counter|counters", a = t.supportConstant = "absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero", f = t.supportConstantColor = "aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow", l = t.supportConstantFonts = "arial|century|comic|courier|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace", c = t.numRe = "\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))", h = t.pseudoElements = "(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b", p = t.pseudoClasses = "(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b", d = function () {
- var e = this.createKeywordMapper({"support.function": u, "support.constant": a, "support.type": o, "support.constant.color": f, "support.constant.fonts": l}, "text", !0), t = [
- {token: "comment", regex: "\\/\\*", next: "ruleset_comment"},
- {token: "string", regex: '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},
- {token: "string", regex: "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},
- {token: ["constant.numeric", "keyword"], regex: "(" + c + ")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vm|vw|%)"},
- {token: "constant.numeric", regex: c},
- {token: "constant.numeric", regex: "#[a-f0-9]{6}"},
- {token: "constant.numeric", regex: "#[a-f0-9]{3}"},
- {token: ["punctuation", "entity.other.attribute-name.pseudo-element.css"], regex: h},
- {token: ["punctuation", "entity.other.attribute-name.pseudo-class.css"], regex: p},
- {token: e, regex: "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"}
- ], n = i.copyArray(t);
- n.unshift({token: "paren.rparen", regex: "\\}", next: "start"});
- var r = i.copyArray(t);
- r.unshift({token: "paren.rparen", regex: "\\}", next: "media"});
- var s = [
- {token: "comment", regex: ".+"}
- ], d = i.copyArray(s);
- d.unshift({token: "comment", regex: ".*?\\*\\/", next: "start"});
- var v = i.copyArray(s);
- v.unshift({token: "comment", regex: ".*?\\*\\/", next: "media"});
- var m = i.copyArray(s);
- m.unshift({token: "comment", regex: ".*?\\*\\/", next: "ruleset"}), this.$rules = {start: [
- {token: "comment", regex: "\\/\\*", next: "comment"},
- {token: "paren.lparen", regex: "\\{", next: "ruleset"},
- {token: "string", regex: "@.*?{", next: "media"},
- {token: "keyword", regex: "#[a-z0-9-_]+"},
- {token: "variable", regex: "\\.[a-z0-9-_]+"},
- {token: "string", regex: ":[a-z0-9-_]+"},
- {token: "constant", regex: "[a-z0-9-_]+"}
- ], media: [
- {token: "comment", regex: "\\/\\*", next: "media_comment"},
- {token: "paren.lparen", regex: "\\{", next: "media_ruleset"},
- {token: "string", regex: "\\}", next: "start"},
- {token: "keyword", regex: "#[a-z0-9-_]+"},
- {token: "variable", regex: "\\.[a-z0-9-_]+"},
- {token: "string", regex: ":[a-z0-9-_]+"},
- {token: "constant", regex: "[a-z0-9-_]+"}
- ], comment: d, ruleset: n, ruleset_comment: m, media_ruleset: r, media_comment: v}
- };
- r.inherits(d, s), t.CssHighlightRules = d
-}), ace.define("ace/mode/behaviour/css", ["require", "exports", "module", "ace/lib/oop", "ace/mode/behaviour", "ace/mode/behaviour/cstyle", "ace/token_iterator"], function (e, t, n) {
- var r = e("../../lib/oop"), i = e("../behaviour").Behaviour, s = e("./cstyle").CstyleBehaviour, o = e("../../token_iterator").TokenIterator, u = function () {
- this.inherit(s), this.add("colon", "insertion", function (e, t, n, r, i) {
- if (i === ":") {
- var s = n.getCursorPosition(), u = new o(r, s.row, s.column), a = u.getCurrentToken();
- a && a.value.match(/\s+/) && (a = u.stepBackward());
- if (a && a.type === "support.type") {
- var f = r.doc.getLine(s.row), l = f.substring(s.column, s.column + 1);
- if (l === ":")return{text: "", selection: [1, 1]};
- if (!f.substring(s.column).match(/^\s*;/))return{text: ":;", selection: [1, 1]}
- }
- }
- }), this.add("colon", "deletion", function (e, t, n, r, i) {
- var s = r.doc.getTextRange(i);
- if (!i.isMultiLine() && s === ":") {
- var o = r.doc.getLine(i.start.row), u = o.substring(i.end.column, i.end.column + 1);
- if (u === ";")return i.end.column++, i
- }
- }), this.add("semicolon", "insertion", function (e, t, n, r, i) {
- if (i === ";") {
- var s = n.getCursorPosition(), o = r.doc.getLine(s.row), u = o.substring(s.column, s.column + 1);
- if (u === ";")return{text: "", selection: [1, 1]}
- }
- })
- };
- r.inherits(u, s), t.CssBehaviour = u
-}), ace.define("ace/mode/html_highlight_rules", ["require", "exports", "module", "ace/lib/oop", "ace/lib/lang", "ace/mode/css_highlight_rules", "ace/mode/javascript_highlight_rules", "ace/mode/xml_util", "ace/mode/text_highlight_rules"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("../lib/lang"), s = e("./css_highlight_rules").CssHighlightRules, o = e("./javascript_highlight_rules").JavaScriptHighlightRules, u = e("./xml_util"), a = e("./text_highlight_rules").TextHighlightRules, f = i.createMap({a: "anchor", button: "form", form: "form", img: "image", input: "form", label: "form", script: "script", select: "form", textarea: "form", style: "style", table: "table", tbody: "table", td: "table", tfoot: "table", th: "table", tr: "table"}), l = function () {
- this.$rules = {start: [
- {token: "text", regex: "<\\!\\[CDATA\\[", next: "cdata"},
- {token: "xml-pe", regex: "<\\?.*?\\?>"},
- {token: "comment", regex: "<\\!--", next: "comment"},
- {token: "xml-pe", regex: "<\\!.*?>"},
- {token: "meta.tag", regex: "<(?=script\\b)", next: "script"},
- {token: "meta.tag", regex: "<(?=style\\b)", next: "style"},
- {token: "meta.tag", regex: "<\\/?", next: "tag"},
- {token: "text", regex: "\\s+"},
- {token: "constant.character.entity", regex: "(?:[0-9]+;)|(?:[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}
- ], cdata: [
- {token: "text", regex: "\\]\\]>", next: "start"}
- ], comment: [
- {token: "comment", regex: ".*?-->", next: "start"},
- {defaultToken: "comment"}
- ]}, u.tag(this.$rules, "tag", "start", f), u.tag(this.$rules, "style", "css-start", f), u.tag(this.$rules, "script", "js-start", f), this.embedRules(o, "js-", [
- {token: "comment", regex: "\\/\\/.*(?=<\\/script>)", next: "tag"},
- {token: "meta.tag", regex: "<\\/(?=script)", next: "tag"}
- ]), this.embedRules(s, "css-", [
- {token: "meta.tag", regex: "<\\/(?=style)", next: "tag"}
- ])
- };
- r.inherits(l, a), t.HtmlHighlightRules = l
-}), ace.define("ace/mode/xml_util", ["require", "exports", "module"], function (e, t, n) {
- function r(e) {
- return[
- {token: "string", regex: '"', next: e + "_qqstring"},
- {token: "string", regex: "'", next: e + "_qstring"}
- ]
- }
-
- function i(e, t) {
- return[
- {token: "string", regex: e, next: t},
- {token: "constant.language.escape", regex: "(?:[0-9]+;)|(?:[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"},
- {defaultToken: "string"}
- ]
- }
-
- t.tag = function (e, t, n, s) {
- e[t] = [
- {token: "text", regex: "\\s+"},
- {token: s ? function (e) {
- return s[e] ? "meta.tag.tag-name." + s[e] : "meta.tag.tag-name"
- } : "meta.tag.tag-name", regex: "[-_a-zA-Z0-9:]+", next: t + "_embed_attribute_list"},
- {token: "empty", regex: "", next: t + "_embed_attribute_list"}
- ], e[t + "_qstring"] = i("'", t + "_embed_attribute_list"), e[t + "_qqstring"] = i('"', t + "_embed_attribute_list"), e[t + "_embed_attribute_list"] = [
- {token: "meta.tag.r", regex: "/?>", next: n},
- {token: "keyword.operator", regex: "="},
- {token: "entity.other.attribute-name", regex: "[-_a-zA-Z0-9:]+"},
- {token: "constant.numeric", regex: "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},
- {token: "text", regex: "\\s+"}
- ].concat(r(t))
- }
-}), ace.define("ace/mode/behaviour/html", ["require", "exports", "module", "ace/lib/oop", "ace/mode/behaviour/xml", "ace/mode/behaviour/cstyle", "ace/token_iterator"], function (e, t, n) {
- function a(e, t) {
- var n = !0, r = e.type.split("."), i = t.split(".");
- return i.forEach(function (e) {
- if (r.indexOf(e) == -1)return n = !1, !1
- }), n
- }
-
- var r = e("../../lib/oop"), i = e("../behaviour/xml").XmlBehaviour, s = e("./cstyle").CstyleBehaviour, o = e("../../token_iterator").TokenIterator, u = ["area", "base", "br", "col", "command", "embed", "hr", "img", "input", "keygen", "link", "meta", "param", "source", "track", "wbr"], f = function () {
- this.inherit(i), this.add("autoclosing", "insertion", function (e, t, n, r, i) {
- if (i == ">") {
- var s = n.getCursorPosition(), f = new o(r, s.row, s.column), l = f.getCurrentToken(), c = !1;
- if (!l || !a(l, "meta.tag") && (!a(l, "text") || !l.value.match("/"))) {
- do l = f.stepBackward(); while (l && (a(l, "string") || a(l, "keyword.operator") || a(l, "entity.attribute-name") || a(l, "text")))
- } else c = !0;
- if (!l || !a(l, "meta.tag-name") || f.stepBackward().value.match("/"))return;
- var h = l.value;
- if (c)var h = h.substring(0, s.column - l.start);
- if (u.indexOf(h) !== -1)return;
- return{text: ">" + h + ">", selection: [1, 1]}
- }
- })
- };
- r.inherits(f, i), t.HtmlBehaviour = f
-}), ace.define("ace/mode/behaviour/xml", ["require", "exports", "module", "ace/lib/oop", "ace/mode/behaviour", "ace/mode/behaviour/cstyle", "ace/token_iterator"], function (e, t, n) {
- function u(e, t) {
- var n = !0, r = e.type.split("."), i = t.split(".");
- return i.forEach(function (e) {
- if (r.indexOf(e) == -1)return n = !1, !1
- }), n
- }
-
- var r = e("../../lib/oop"), i = e("../behaviour").Behaviour, s = e("./cstyle").CstyleBehaviour, o = e("../../token_iterator").TokenIterator, a = function () {
- this.inherit(s, ["string_dquotes"]), this.add("autoclosing", "insertion", function (e, t, n, r, i) {
- if (i == ">") {
- var s = n.getCursorPosition(), a = new o(r, s.row, s.column), f = a.getCurrentToken(), l = !1;
- if (!f || !u(f, "meta.tag") && (!u(f, "text") || !f.value.match("/"))) {
- do f = a.stepBackward(); while (f && (u(f, "string") || u(f, "keyword.operator") || u(f, "entity.attribute-name") || u(f, "text")))
- } else l = !0;
- if (!f || !u(f, "meta.tag-name") || a.stepBackward().value.match("/"))return;
- var c = f.value;
- if (l)var c = c.substring(0, s.column - f.start);
- return{text: ">" + c + ">", selection: [1, 1]}
- }
- }), this.add("autoindent", "insertion", function (e, t, n, r, i) {
- if (i == "\n") {
- var s = n.getCursorPosition(), o = r.doc.getLine(s.row), u = o.substring(s.column, s.column + 2);
- if (u == "") {
- var a = this.$getIndent(r.doc.getLine(s.row)) + r.getTabString(), f = this.$getIndent(r.doc.getLine(s.row));
- return{text: "\n" + a + "\n" + f, selection: [1, a.length, 1, a.length]}
- }
- }
- })
- };
- r.inherits(a, i), t.XmlBehaviour = a
-}), ace.define("ace/mode/folding/html", ["require", "exports", "module", "ace/lib/oop", "ace/mode/folding/mixed", "ace/mode/folding/xml", "ace/mode/folding/cstyle"], function (e, t, n) {
- var r = e("../../lib/oop"), i = e("./mixed").FoldMode, s = e("./xml").FoldMode, o = e("./cstyle").FoldMode, u = t.FoldMode = function () {
- i.call(this, new s({area: 1, base: 1, br: 1, col: 1, command: 1, embed: 1, hr: 1, img: 1, input: 1, keygen: 1, link: 1, meta: 1, param: 1, source: 1, track: 1, wbr: 1, li: 1, dt: 1, dd: 1, p: 1, rt: 1, rp: 1, optgroup: 1, option: 1, colgroup: 1, td: 1, th: 1}), {"js-": new o, "css-": new o})
- };
- r.inherits(u, i)
-}), ace.define("ace/mode/folding/mixed", ["require", "exports", "module", "ace/lib/oop", "ace/mode/folding/fold_mode"], function (e, t, n) {
- var r = e("../../lib/oop"), i = e("./fold_mode").FoldMode, s = t.FoldMode = function (e, t) {
- this.defaultMode = e, this.subModes = t
- };
- r.inherits(s, i), function () {
- this.$getMode = function (e) {
- for (var t in this.subModes)if (e.indexOf(t) === 0)return this.subModes[t];
- return null
- }, this.$tryMode = function (e, t, n, r) {
- var i = this.$getMode(e);
- return i ? i.getFoldWidget(t, n, r) : ""
- }, this.getFoldWidget = function (e, t, n) {
- return this.$tryMode(e.getState(n - 1), e, t, n) || this.$tryMode(e.getState(n), e, t, n) || this.defaultMode.getFoldWidget(e, t, n)
- }, this.getFoldWidgetRange = function (e, t, n) {
- var r = this.$getMode(e.getState(n - 1));
- if (!r || !r.getFoldWidget(e, t, n))r = this.$getMode(e.getState(n));
- if (!r || !r.getFoldWidget(e, t, n))r = this.defaultMode;
- return r.getFoldWidgetRange(e, t, n)
- }
- }.call(s.prototype)
-}), ace.define("ace/mode/folding/xml", ["require", "exports", "module", "ace/lib/oop", "ace/lib/lang", "ace/range", "ace/mode/folding/fold_mode", "ace/token_iterator"], function (e, t, n) {
- var r = e("../../lib/oop"), i = e("../../lib/lang"), s = e("../../range").Range, o = e("./fold_mode").FoldMode, u = e("../../token_iterator").TokenIterator, a = t.FoldMode = function (e) {
- o.call(this), this.voidElements = e || {}
- };
- r.inherits(a, o), function () {
- this.getFoldWidget = function (e, t, n) {
- var r = this._getFirstTagInLine(e, n);
- return r.closing ? t == "markbeginend" ? "end" : "" : !r.tagName || this.voidElements[r.tagName.toLowerCase()] ? "" : r.selfClosing ? "" : r.value.indexOf("/" + r.tagName) !== -1 ? "" : "start"
- }, this._getFirstTagInLine = function (e, t) {
- var n = e.getTokens(t), r = "";
- for (var s = 0; s < n.length; s++) {
- var o = n[s];
- o.type.indexOf("meta.tag") === 0 ? r += o.value : r += i.stringRepeat(" ", o.value.length)
- }
- return this._parseTag(r)
- }, this.tagRe = /^(\s*)((\/?)([-_a-zA-Z0-9:!]*)\s*(\/?)>?)/, this._parseTag = function (e) {
- var t = this.tagRe.exec(e), n = this.tagRe.lastIndex || 0;
- return this.tagRe.lastIndex = 0, {value: e, match: t ? t[2] : "", closing: t ? !!t[3] : !1, selfClosing: t ? !!t[5] || t[2] == "/>" : !1, tagName: t ? t[4] : "", column: t[1] ? n + t[1].length : n}
- }, this._readTagForward = function (e) {
- var t = e.getCurrentToken();
- if (!t)return null;
- var n = "", r;
- do if (t.type.indexOf("meta.tag") === 0) {
- if (!r)var r = {row: e.getCurrentTokenRow(), column: e.getCurrentTokenColumn()};
- n += t.value;
- if (n.indexOf(">") !== -1) {
- var i = this._parseTag(n);
- return i.start = r, i.end = {row: e.getCurrentTokenRow(), column: e.getCurrentTokenColumn() + t.value.length}, e.stepForward(), i
- }
- } while (t = e.stepForward());
- return null
- }, this._readTagBackward = function (e) {
- var t = e.getCurrentToken();
- if (!t)return null;
- var n = "", r;
- do if (t.type.indexOf("meta.tag") === 0) {
- r || (r = {row: e.getCurrentTokenRow(), column: e.getCurrentTokenColumn() + t.value.length}), n = t.value + n;
- if (n.indexOf("<") !== -1) {
- var i = this._parseTag(n);
- return i.end = r, i.start = {row: e.getCurrentTokenRow(), column: e.getCurrentTokenColumn()}, e.stepBackward(), i
- }
- } while (t = e.stepBackward());
- return null
- }, this._pop = function (e, t) {
- while (e.length) {
- var n = e[e.length - 1];
- if (!t || n.tagName == t.tagName)return e.pop();
- if (this.voidElements[t.tagName])return;
- if (this.voidElements[n.tagName]) {
- e.pop();
- continue
- }
- return null
- }
- }, this.getFoldWidgetRange = function (e, t, n) {
- var r = this._getFirstTagInLine(e, n);
- if (!r.match)return null;
- var i = r.closing || r.selfClosing, o = [], a;
- if (!i) {
- var f = new u(e, n, r.column), l = {row: n, column: r.column + r.tagName.length + 2};
- while (a = this._readTagForward(f)) {
- if (a.selfClosing) {
- if (!o.length)return a.start.column += a.tagName.length + 2, a.end.column -= 2, s.fromPoints(a.start, a.end);
- continue
- }
- if (a.closing) {
- this._pop(o, a);
- if (o.length == 0)return s.fromPoints(l, a.start)
- } else o.push(a)
- }
- } else {
- var f = new u(e, n, r.column + r.match.length), c = {row: n, column: r.column};
- while (a = this._readTagBackward(f)) {
- if (a.selfClosing) {
- if (!o.length)return a.start.column += a.tagName.length + 2, a.end.column -= 2, s.fromPoints(a.start, a.end);
- continue
- }
- if (!a.closing) {
- this._pop(o, a);
- if (o.length == 0)return a.start.column += a.tagName.length + 2, s.fromPoints(a.start, c)
- } else o.push(a)
- }
- }
- }
- }.call(a.prototype)
-})
\ No newline at end of file
diff --git a/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/mode-dot.js b/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/mode-dot.js
deleted file mode 100644
index 48517dd..0000000
--- a/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/mode-dot.js
+++ /dev/null
@@ -1,115 +0,0 @@
-ace.define("ace/mode/dot", ["require", "exports", "module", "ace/lib/oop", "ace/mode/text", "ace/tokenizer", "ace/mode/matching_brace_outdent", "ace/mode/dot_highlight_rules", "ace/mode/folding/cstyle"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("./text").Mode, s = e("../tokenizer").Tokenizer, o = e("./matching_brace_outdent").MatchingBraceOutdent, u = e("./dot_highlight_rules").DotHighlightRules, a = e("./folding/cstyle").FoldMode, f = function () {
- var e = new u;
- this.$outdent = new o, this.foldingRules = new a, this.$tokenizer = new s(e.getRules())
- };
- r.inherits(f, i), function () {
- this.toggleCommentLines = function (e, t, n, r) {
- var i = !0, s = /^(\s*)\/\//;
- for (var o = n; o <= r; o++)if (!s.test(t.getLine(o))) {
- i = !1;
- break
- }
- if (i) {
- var u = new Range(0, 0, 0, 0);
- for (var o = n; o <= r; o++) {
- var a = t.getLine(o), f = a.match(s);
- u.start.row = o, u.end.row = o, u.end.column = f[0].length, t.replace(u, f[1])
- }
- } else t.indentRows(n, r, "//")
- }, this.getNextLineIndent = function (e, t, n) {
- var r = this.$getIndent(t), i = this.$tokenizer.getLineTokens(t, e), s = i.tokens, o = i.state;
- if (s.length && s[s.length - 1].type == "comment")return r;
- if (e == "start") {
- var u = t.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/);
- u && (r += n)
- }
- return r
- }, this.checkOutdent = function (e, t, n) {
- return this.$outdent.checkOutdent(t, n)
- }, this.autoOutdent = function (e, t, n) {
- this.$outdent.autoOutdent(t, n)
- }
- }.call(f.prototype), t.Mode = f
-}), ace.define("ace/mode/matching_brace_outdent", ["require", "exports", "module", "ace/range"], function (e, t, n) {
- var r = e("../range").Range, i = function () {
- };
- (function () {
- this.checkOutdent = function (e, t) {
- return/^\s+$/.test(e) ? /^\s*\}/.test(t) : !1
- }, this.autoOutdent = function (e, t) {
- var n = e.getLine(t), i = n.match(/^(\s*\})/);
- if (!i)return 0;
- var s = i[1].length, o = e.findMatchingBracket({row: t, column: s});
- if (!o || o.row == t)return 0;
- var u = this.$getIndent(e.getLine(o.row));
- e.replace(new r(t, 0, t, s - 1), u)
- }, this.$getIndent = function (e) {
- var t = e.match(/^(\s+)/);
- return t ? t[1] : ""
- }
- }).call(i.prototype), t.MatchingBraceOutdent = i
-}), ace.define("ace/mode/dot_highlight_rules", ["require", "exports", "module", "ace/lib/oop", "ace/lib/lang", "ace/mode/text_highlight_rules", "ace/mode/doc_comment_highlight_rules"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("../lib/lang"), s = e("./text_highlight_rules").TextHighlightRules, o = e("./doc_comment_highlight_rules").DocCommentHighlightRules, u = function () {
- var e = i.arrayToMap("strict|node|edge|graph|digraph|subgraph".split("|")), t = i.arrayToMap("damping|k|url|area|arrowhead|arrowsize|arrowtail|aspect|bb|bgcolor|center|charset|clusterrank|color|colorscheme|comment|compound|concentrate|constraint|decorate|defaultdist|dim|dimen|dir|diredgeconstraints|distortion|dpi|edgeurl|edgehref|edgetarget|edgetooltip|epsilon|esep|fillcolor|fixedsize|fontcolor|fontname|fontnames|fontpath|fontsize|forcelabels|gradientangle|group|headurl|head_lp|headclip|headhref|headlabel|headport|headtarget|headtooltip|height|href|id|image|imagepath|imagescale|label|labelurl|label_scheme|labelangle|labeldistance|labelfloat|labelfontcolor|labelfontname|labelfontsize|labelhref|labeljust|labelloc|labeltarget|labeltooltip|landscape|layer|layerlistsep|layers|layerselect|layersep|layout|len|levels|levelsgap|lhead|lheight|lp|ltail|lwidth|margin|maxiter|mclimit|mindist|minlen|mode|model|mosek|nodesep|nojustify|normalize|nslimit|nslimit1|ordering|orientation|outputorder|overlap|overlap_scaling|pack|packmode|pad|page|pagedir|pencolor|penwidth|peripheries|pin|pos|quadtree|quantum|rank|rankdir|ranksep|ratio|rects|regular|remincross|repulsiveforce|resolution|root|rotate|rotation|samehead|sametail|samplepoints|scale|searchsize|sep|shape|shapefile|showboxes|sides|size|skew|smoothing|sortv|splines|start|style|stylesheet|tailurl|tail_lp|tailclip|tailhref|taillabel|tailport|tailtarget|tailtooltip|target|tooltip|truecolor|vertices|viewport|voro_margin|weight|width|xlabel|xlp|z".split("|"));
- this.$rules = {start: [
- {token: "comment", regex: /\/\/.*$/},
- {token: "comment", regex: /#.*$/},
- {token: "comment", merge: !0, regex: /\/\*/, next: "comment"},
- {token: "string", regex: "'(?=.)", next: "qstring"},
- {token: "string", regex: '"(?=.)', next: "qqstring"},
- {token: "constant.numeric", regex: /[+\-]?\d+(?:(?:\.\d*)?(?:[eE][+\-]?\d+)?)?\b/},
- {token: "keyword.operator", regex: /\+|=|\->/},
- {token: "punctuation.operator", regex: /,|;/},
- {token: "paren.lparen", regex: /[\[{]/},
- {token: "paren.rparen", regex: /[\]}]/},
- {token: "comment", regex: /^#!.*$/},
- {token: function (n) {
- return e.hasOwnProperty(n.toLowerCase()) ? "keyword" : t.hasOwnProperty(n.toLowerCase()) ? "variable" : "text"
- }, regex: "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"}
- ], comment: [
- {token: "comment", regex: ".*?\\*\\/", merge: !0, next: "start"},
- {token: "comment", merge: !0, regex: ".+"}
- ], qqstring: [
- {token: "string", regex: '[^"\\\\]+', merge: !0},
- {token: "string", regex: "\\\\$", next: "qqstring", merge: !0},
- {token: "string", regex: '"|$', next: "start", merge: !0}
- ], qstring: [
- {token: "string", regex: "[^'\\\\]+", merge: !0},
- {token: "string", regex: "\\\\$", next: "qstring", merge: !0},
- {token: "string", regex: "'|$", next: "start", merge: !0}
- ]}
- };
- r.inherits(u, s), t.DotHighlightRules = u
-}), ace.define("ace/mode/doc_comment_highlight_rules", ["require", "exports", "module", "ace/lib/oop", "ace/mode/text_highlight_rules"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("./text_highlight_rules").TextHighlightRules, s = function () {
- this.$rules = {start: [
- {token: "comment.doc.tag", regex: "@[\\w\\d_]+"},
- {token: "comment.doc.tag", regex: "\\bTODO\\b"},
- {defaultToken: "comment.doc"}
- ]}
- };
- r.inherits(s, i), s.getStartRule = function (e) {
- return{token: "comment.doc", regex: "\\/\\*(?=\\*)", next: e}
- }, s.getEndRule = function (e) {
- return{token: "comment.doc", regex: "\\*\\/", next: e}
- }, t.DocCommentHighlightRules = s
-}), ace.define("ace/mode/folding/cstyle", ["require", "exports", "module", "ace/lib/oop", "ace/range", "ace/mode/folding/fold_mode"], function (e, t, n) {
- var r = e("../../lib/oop"), i = e("../../range").Range, s = e("./fold_mode").FoldMode, o = t.FoldMode = function () {
- };
- r.inherits(o, s), function () {
- this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/, this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/, this.getFoldWidgetRange = function (e, t, n) {
- var r = e.getLine(n), i = r.match(this.foldingStartMarker);
- if (i) {
- var s = i.index;
- return i[1] ? this.openingBracketBlock(e, i[1], n, s) : e.getCommentFoldRange(n, s + i[0].length, 1)
- }
- if (t !== "markbeginend")return;
- var i = r.match(this.foldingStopMarker);
- if (i) {
- var s = i.index + i[0].length;
- return i[1] ? this.closingBracketBlock(e, i[1], n, s) : e.getCommentFoldRange(n, s, -1)
- }
- }
- }.call(o.prototype)
-})
\ No newline at end of file
diff --git a/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/mode-glsl.js b/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/mode-glsl.js
deleted file mode 100644
index 7b3749b..0000000
--- a/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/mode-glsl.js
+++ /dev/null
@@ -1,261 +0,0 @@
-ace.define("ace/mode/glsl", ["require", "exports", "module", "ace/lib/oop", "ace/mode/c_cpp", "ace/tokenizer", "ace/mode/glsl_highlight_rules", "ace/mode/matching_brace_outdent", "ace/range", "ace/mode/behaviour/cstyle", "ace/mode/folding/cstyle"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("./c_cpp").Mode, s = e("../tokenizer").Tokenizer, o = e("./glsl_highlight_rules").glslHighlightRules, u = e("./matching_brace_outdent").MatchingBraceOutdent, a = e("../range").Range, f = e("./behaviour/cstyle").CstyleBehaviour, l = e("./folding/cstyle").FoldMode, c = function () {
- this.$tokenizer = new s((new o).getRules()), this.$outdent = new u, this.$behaviour = new f, this.foldingRules = new l
- };
- r.inherits(c, i), t.Mode = c
-}), ace.define("ace/mode/c_cpp", ["require", "exports", "module", "ace/lib/oop", "ace/mode/text", "ace/tokenizer", "ace/mode/c_cpp_highlight_rules", "ace/mode/matching_brace_outdent", "ace/range", "ace/mode/behaviour/cstyle", "ace/mode/folding/cstyle"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("./text").Mode, s = e("../tokenizer").Tokenizer, o = e("./c_cpp_highlight_rules").c_cppHighlightRules, u = e("./matching_brace_outdent").MatchingBraceOutdent, a = e("../range").Range, f = e("./behaviour/cstyle").CstyleBehaviour, l = e("./folding/cstyle").FoldMode, c = function () {
- this.$tokenizer = new s((new o).getRules()), this.$outdent = new u, this.$behaviour = new f, this.foldingRules = new l
- };
- r.inherits(c, i), function () {
- this.toggleCommentLines = function (e, t, n, r) {
- var i = !0, s = /^(\s*)\/\//;
- for (var o = n; o <= r; o++)if (!s.test(t.getLine(o))) {
- i = !1;
- break
- }
- if (i) {
- var u = new a(0, 0, 0, 0);
- for (var o = n; o <= r; o++) {
- var f = t.getLine(o), l = f.match(s);
- u.start.row = o, u.end.row = o, u.end.column = l[0].length, t.replace(u, l[1])
- }
- } else t.indentRows(n, r, "//")
- }, this.getNextLineIndent = function (e, t, n) {
- var r = this.$getIndent(t), i = this.$tokenizer.getLineTokens(t, e), s = i.tokens, o = i.state;
- if (s.length && s[s.length - 1].type == "comment")return r;
- if (e == "start") {
- var u = t.match(/^.*[\{\(\[]\s*$/);
- u && (r += n)
- } else if (e == "doc-start") {
- if (o == "start")return"";
- var u = t.match(/^\s*(\/?)\*/);
- u && (u[1] && (r += " "), r += "* ")
- }
- return r
- }, this.checkOutdent = function (e, t, n) {
- return this.$outdent.checkOutdent(t, n)
- }, this.autoOutdent = function (e, t, n) {
- this.$outdent.autoOutdent(t, n)
- }
- }.call(c.prototype), t.Mode = c
-}), ace.define("ace/mode/c_cpp_highlight_rules", ["require", "exports", "module", "ace/lib/oop", "ace/mode/doc_comment_highlight_rules", "ace/mode/text_highlight_rules"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("./doc_comment_highlight_rules").DocCommentHighlightRules, s = e("./text_highlight_rules").TextHighlightRules, o = t.cFunctions = "\\s*\\bhypot(?:f|l)?|s(?:scanf|ystem|nprintf|ca(?:nf|lb(?:n(?:f|l)?|ln(?:f|l)?))|i(?:n(?:h(?:f|l)?|f|l)?|gn(?:al|bit))|tr(?:s(?:tr|pn)|nc(?:py|at|mp)|c(?:spn|hr|oll|py|at|mp)|to(?:imax|d|u(?:l(?:l)?|max)|k|f|l(?:d|l)?)|error|pbrk|ftime|len|rchr|xfrm)|printf|et(?:jmp|vbuf|locale|buf)|qrt(?:f|l)?|w(?:scanf|printf)|rand)|n(?:e(?:arbyint(?:f|l)?|xt(?:toward(?:f|l)?|after(?:f|l)?))|an(?:f|l)?)|c(?:s(?:in(?:h(?:f|l)?|f|l)?|qrt(?:f|l)?)|cos(?:h(?:f)?|f|l)?|imag(?:f|l)?|t(?:ime|an(?:h(?:f|l)?|f|l)?)|o(?:s(?:h(?:f|l)?|f|l)?|nj(?:f|l)?|pysign(?:f|l)?)|p(?:ow(?:f|l)?|roj(?:f|l)?)|e(?:il(?:f|l)?|xp(?:f|l)?)|l(?:o(?:ck|g(?:f|l)?)|earerr)|a(?:sin(?:h(?:f|l)?|f|l)?|cos(?:h(?:f|l)?|f|l)?|tan(?:h(?:f|l)?|f|l)?|lloc|rg(?:f|l)?|bs(?:f|l)?)|real(?:f|l)?|brt(?:f|l)?)|t(?:ime|o(?:upper|lower)|an(?:h(?:f|l)?|f|l)?|runc(?:f|l)?|gamma(?:f|l)?|mp(?:nam|file))|i(?:s(?:space|n(?:ormal|an)|cntrl|inf|digit|u(?:nordered|pper)|p(?:unct|rint)|finite|w(?:space|c(?:ntrl|type)|digit|upper|p(?:unct|rint)|lower|al(?:num|pha)|graph|xdigit|blank)|l(?:ower|ess(?:equal|greater)?)|al(?:num|pha)|gr(?:eater(?:equal)?|aph)|xdigit|blank)|logb(?:f|l)?|max(?:div|abs))|di(?:v|fftime)|_Exit|unget(?:c|wc)|p(?:ow(?:f|l)?|ut(?:s|c(?:har)?|wc(?:har)?)|error|rintf)|e(?:rf(?:c(?:f|l)?|f|l)?|x(?:it|p(?:2(?:f|l)?|f|l|m1(?:f|l)?)?))|v(?:s(?:scanf|nprintf|canf|printf|w(?:scanf|printf))|printf|f(?:scanf|printf|w(?:scanf|printf))|w(?:scanf|printf)|a_(?:start|copy|end|arg))|qsort|f(?:s(?:canf|e(?:tpos|ek))|close|tell|open|dim(?:f|l)?|p(?:classify|ut(?:s|c|w(?:s|c))|rintf)|e(?:holdexcept|set(?:e(?:nv|xceptflag)|round)|clearexcept|testexcept|of|updateenv|r(?:aiseexcept|ror)|get(?:e(?:nv|xceptflag)|round))|flush|w(?:scanf|ide|printf|rite)|loor(?:f|l)?|abs(?:f|l)?|get(?:s|c|pos|w(?:s|c))|re(?:open|e|ad|xp(?:f|l)?)|m(?:in(?:f|l)?|od(?:f|l)?|a(?:f|l|x(?:f|l)?)?))|l(?:d(?:iv|exp(?:f|l)?)|o(?:ngjmp|cal(?:time|econv)|g(?:1(?:p(?:f|l)?|0(?:f|l)?)|2(?:f|l)?|f|l|b(?:f|l)?)?)|abs|l(?:div|abs|r(?:int(?:f|l)?|ound(?:f|l)?))|r(?:int(?:f|l)?|ound(?:f|l)?)|gamma(?:f|l)?)|w(?:scanf|c(?:s(?:s(?:tr|pn)|nc(?:py|at|mp)|c(?:spn|hr|oll|py|at|mp)|to(?:imax|d|u(?:l(?:l)?|max)|k|f|l(?:d|l)?|mbs)|pbrk|ftime|len|r(?:chr|tombs)|xfrm)|to(?:b|mb)|rtomb)|printf|mem(?:set|c(?:hr|py|mp)|move))|a(?:s(?:sert|ctime|in(?:h(?:f|l)?|f|l)?)|cos(?:h(?:f|l)?|f|l)?|t(?:o(?:i|f|l(?:l)?)|exit|an(?:h(?:f|l)?|2(?:f|l)?|f|l)?)|b(?:s|ort))|g(?:et(?:s|c(?:har)?|env|wc(?:har)?)|mtime)|r(?:int(?:f|l)?|ound(?:f|l)?|e(?:name|alloc|wind|m(?:ove|quo(?:f|l)?|ainder(?:f|l)?))|a(?:nd|ise))|b(?:search|towc)|m(?:odf(?:f|l)?|em(?:set|c(?:hr|py|mp)|move)|ktime|alloc|b(?:s(?:init|towcs|rtowcs)|towc|len|r(?:towc|len)))\\b", u = function () {
- var e = "break|case|continue|default|do|else|for|goto|if|_Pragma|return|switch|while|catch|operator|try|throw|using", t = "asm|__asm__|auto|bool|_Bool|char|_Complex|double|enum|float|_Imaginary|int|long|short|signed|struct|typedef|union|unsigned|void|class|wchar_t|template", n = "const|extern|register|restrict|static|volatile|inline|private:|protected:|public:|friend|explicit|virtual|export|mutable|typename", r = "and|and_eq|bitand|bitor|compl|not|not_eq|or|or_eq|typeid|xor|xor_eqconst_cast|dynamic_cast|reinterpret_cast|static_cast|sizeof|namespace", s = "NULL|true|false|TRUE|FALSE", u = this.$keywords = this.createKeywordMapper({"keyword.control": e, "storage.type": t, "storage.modifier": n, "keyword.operator": r, "variable.language": "this", "constant.language": s}, "identifier"), a = "[a-zA-Z\\$_¡-￿][a-zA-Zd\\$_¡-￿]*\\b";
- this.$rules = {start: [
- {token: "comment", regex: "\\/\\/.*$"},
- i.getStartRule("doc-start"),
- {token: "comment", regex: "\\/\\*", next: "comment"},
- {token: "string", regex: '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},
- {token: "string", regex: '["].*\\\\$', next: "qqstring"},
- {token: "string", regex: "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},
- {token: "string", regex: "['].*\\\\$", next: "qstring"},
- {token: "constant.numeric", regex: "0[xX][0-9a-fA-F]+\\b"},
- {token: "constant.numeric", regex: "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},
- {token: "keyword", regex: "(?:#include|#import|#pragma|#line|#define|#undef|#if|#ifdef|#else|#elif|#ifndef)\\b", next: "directive"},
- {token: "keyword", regex: "(?:#endif)\\b"},
- {token: "support.function.C99.c", regex: o},
- {token: u, regex: "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},
- {token: "keyword.operator", regex: "!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|==|=|!=|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|new|delete|typeof|void)"},
- {token: "punctuation.operator", regex: "\\?|\\:|\\,|\\;|\\."},
- {token: "paren.lparen", regex: "[[({]"},
- {token: "paren.rparen", regex: "[\\])}]"},
- {token: "text", regex: "\\s+"}
- ], comment: [
- {token: "comment", regex: ".*?\\*\\/", next: "start"},
- {token: "comment", regex: ".+"}
- ], qqstring: [
- {token: "string", regex: '(?:(?:\\\\.)|(?:[^"\\\\]))*?"', next: "start"},
- {token: "string", regex: ".+"}
- ], qstring: [
- {token: "string", regex: "(?:(?:\\\\.)|(?:[^'\\\\]))*?'", next: "start"},
- {token: "string", regex: ".+"}
- ], directive: [
- {token: "constant.other.multiline", regex: /\\/},
- {token: "constant.other.multiline", regex: /.*\\/},
- {token: "constant.other", regex: "\\s*<.+?>", next: "start"},
- {token: "constant.other", regex: '\\s*["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]', next: "start"},
- {token: "constant.other", regex: "\\s*['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']", next: "start"},
- {token: "constant.other", regex: /[^\\\/]+/, next: "start"}
- ]}, this.embedRules(i, "doc-", [i.getEndRule("start")])
- };
- r.inherits(u, s), t.c_cppHighlightRules = u
-}), ace.define("ace/mode/doc_comment_highlight_rules", ["require", "exports", "module", "ace/lib/oop", "ace/mode/text_highlight_rules"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("./text_highlight_rules").TextHighlightRules, s = function () {
- this.$rules = {start: [
- {token: "comment.doc.tag", regex: "@[\\w\\d_]+"},
- {token: "comment.doc.tag", regex: "\\bTODO\\b"},
- {defaultToken: "comment.doc"}
- ]}
- };
- r.inherits(s, i), s.getStartRule = function (e) {
- return{token: "comment.doc", regex: "\\/\\*(?=\\*)", next: e}
- }, s.getEndRule = function (e) {
- return{token: "comment.doc", regex: "\\*\\/", next: e}
- }, t.DocCommentHighlightRules = s
-}), ace.define("ace/mode/matching_brace_outdent", ["require", "exports", "module", "ace/range"], function (e, t, n) {
- var r = e("../range").Range, i = function () {
- };
- (function () {
- this.checkOutdent = function (e, t) {
- return/^\s+$/.test(e) ? /^\s*\}/.test(t) : !1
- }, this.autoOutdent = function (e, t) {
- var n = e.getLine(t), i = n.match(/^(\s*\})/);
- if (!i)return 0;
- var s = i[1].length, o = e.findMatchingBracket({row: t, column: s});
- if (!o || o.row == t)return 0;
- var u = this.$getIndent(e.getLine(o.row));
- e.replace(new r(t, 0, t, s - 1), u)
- }, this.$getIndent = function (e) {
- var t = e.match(/^(\s+)/);
- return t ? t[1] : ""
- }
- }).call(i.prototype), t.MatchingBraceOutdent = i
-}), ace.define("ace/mode/behaviour/cstyle", ["require", "exports", "module", "ace/lib/oop", "ace/mode/behaviour", "ace/token_iterator", "ace/lib/lang"], function (e, t, n) {
- var r = e("../../lib/oop"), i = e("../behaviour").Behaviour, s = e("../../token_iterator").TokenIterator, o = e("../../lib/lang"), u = ["text", "paren.rparen", "punctuation.operator"], a = ["text", "paren.rparen", "punctuation.operator", "comment"], f = 0, l = -1, c = "", h = 0, p = -1, d = "", v = "", m = function () {
- m.isSaneInsertion = function (e, t) {
- var n = e.getCursorPosition(), r = new s(t, n.row, n.column);
- if (!this.$matchTokenType(r.getCurrentToken() || "text", u)) {
- var i = new s(t, n.row, n.column + 1);
- if (!this.$matchTokenType(i.getCurrentToken() || "text", u))return!1
- }
- return r.stepForward(), r.getCurrentTokenRow() !== n.row || this.$matchTokenType(r.getCurrentToken() || "text", a)
- }, m.$matchTokenType = function (e, t) {
- return t.indexOf(e.type || e) > -1
- }, m.recordAutoInsert = function (e, t, n) {
- var r = e.getCursorPosition(), i = t.doc.getLine(r.row);
- this.isAutoInsertedClosing(r, i, c[0]) || (f = 0), l = r.row, c = n + i.substr(r.column), f++
- }, m.recordMaybeInsert = function (e, t, n) {
- var r = e.getCursorPosition(), i = t.doc.getLine(r.row);
- this.isMaybeInsertedClosing(r, i) || (h = 0), p = r.row, d = i.substr(0, r.column) + n, v = i.substr(r.column), h++
- }, m.isAutoInsertedClosing = function (e, t, n) {
- return f > 0 && e.row === l && n === c[0] && t.substr(e.column) === c
- }, m.isMaybeInsertedClosing = function (e, t) {
- return h > 0 && e.row === p && t.substr(e.column) === v && t.substr(0, e.column) == d
- }, m.popAutoInsertedClosing = function () {
- c = c.substr(1), f--
- }, m.clearMaybeInsertedClosing = function () {
- h = 0, p = -1
- }, this.add("braces", "insertion", function (e, t, n, r, i) {
- var s = n.getCursorPosition(), u = r.doc.getLine(s.row);
- if (i == "{") {
- var a = n.getSelectionRange(), f = r.doc.getTextRange(a);
- if (f !== "" && f !== "{" && n.getWrapBehavioursEnabled())return{text: "{" + f + "}", selection: !1};
- if (m.isSaneInsertion(n, r))return/[\]\}\)]/.test(u[s.column]) ? (m.recordAutoInsert(n, r, "}"), {text: "{}", selection: [1, 1]}) : (m.recordMaybeInsert(n, r, "{"), {text: "{", selection: [1, 1]})
- } else if (i == "}") {
- var l = u.substring(s.column, s.column + 1);
- if (l == "}") {
- var c = r.$findOpeningBracket("}", {column: s.column + 1, row: s.row});
- if (c !== null && m.isAutoInsertedClosing(s, u, i))return m.popAutoInsertedClosing(), {text: "", selection: [1, 1]}
- }
- } else if (i == "\n" || i == "\r\n") {
- var p = "";
- m.isMaybeInsertedClosing(s, u) && (p = o.stringRepeat("}", h), m.clearMaybeInsertedClosing());
- var l = u.substring(s.column, s.column + 1);
- if (l == "}" || p !== "") {
- var d = r.findMatchingBracket({row: s.row, column: s.column}, "}");
- if (!d)return null;
- var v = this.getNextLineIndent(e, u.substring(0, s.column), r.getTabString()), g = this.$getIndent(u);
- return{text: "\n" + v + "\n" + g + p, selection: [1, v.length, 1, v.length]}
- }
- }
- }), this.add("braces", "deletion", function (e, t, n, r, i) {
- var s = r.doc.getTextRange(i);
- if (!i.isMultiLine() && s == "{") {
- var o = r.doc.getLine(i.start.row), u = o.substring(i.end.column, i.end.column + 1);
- if (u == "}")return i.end.column++, i;
- h--
- }
- }), this.add("parens", "insertion", function (e, t, n, r, i) {
- if (i == "(") {
- var s = n.getSelectionRange(), o = r.doc.getTextRange(s);
- if (o !== "" && n.getWrapBehavioursEnabled())return{text: "(" + o + ")", selection: !1};
- if (m.isSaneInsertion(n, r))return m.recordAutoInsert(n, r, ")"), {text: "()", selection: [1, 1]}
- } else if (i == ")") {
- var u = n.getCursorPosition(), a = r.doc.getLine(u.row), f = a.substring(u.column, u.column + 1);
- if (f == ")") {
- var l = r.$findOpeningBracket(")", {column: u.column + 1, row: u.row});
- if (l !== null && m.isAutoInsertedClosing(u, a, i))return m.popAutoInsertedClosing(), {text: "", selection: [1, 1]}
- }
- }
- }), this.add("parens", "deletion", function (e, t, n, r, i) {
- var s = r.doc.getTextRange(i);
- if (!i.isMultiLine() && s == "(") {
- var o = r.doc.getLine(i.start.row), u = o.substring(i.start.column + 1, i.start.column + 2);
- if (u == ")")return i.end.column++, i
- }
- }), this.add("brackets", "insertion", function (e, t, n, r, i) {
- if (i == "[") {
- var s = n.getSelectionRange(), o = r.doc.getTextRange(s);
- if (o !== "" && n.getWrapBehavioursEnabled())return{text: "[" + o + "]", selection: !1};
- if (m.isSaneInsertion(n, r))return m.recordAutoInsert(n, r, "]"), {text: "[]", selection: [1, 1]}
- } else if (i == "]") {
- var u = n.getCursorPosition(), a = r.doc.getLine(u.row), f = a.substring(u.column, u.column + 1);
- if (f == "]") {
- var l = r.$findOpeningBracket("]", {column: u.column + 1, row: u.row});
- if (l !== null && m.isAutoInsertedClosing(u, a, i))return m.popAutoInsertedClosing(), {text: "", selection: [1, 1]}
- }
- }
- }), this.add("brackets", "deletion", function (e, t, n, r, i) {
- var s = r.doc.getTextRange(i);
- if (!i.isMultiLine() && s == "[") {
- var o = r.doc.getLine(i.start.row), u = o.substring(i.start.column + 1, i.start.column + 2);
- if (u == "]")return i.end.column++, i
- }
- }), this.add("string_dquotes", "insertion", function (e, t, n, r, i) {
- if (i == '"' || i == "'") {
- var s = i, o = n.getSelectionRange(), u = r.doc.getTextRange(o);
- if (u !== "" && u !== "'" && u != '"' && n.getWrapBehavioursEnabled())return{text: s + u + s, selection: !1};
- var a = n.getCursorPosition(), f = r.doc.getLine(a.row), l = f.substring(a.column - 1, a.column);
- if (l == "\\")return null;
- var c = r.getTokens(o.start.row), h = 0, p, d = -1;
- for (var v = 0; v < c.length; v++) {
- p = c[v], p.type == "string" ? d = -1 : d < 0 && (d = p.value.indexOf(s));
- if (p.value.length + h > o.start.column)break;
- h += c[v].value.length
- }
- if (!p || d < 0 && p.type !== "comment" && (p.type !== "string" || o.start.column !== p.value.length + h - 1 && p.value.lastIndexOf(s) === p.value.length - 1)) {
- if (!m.isSaneInsertion(n, r))return;
- return{text: s + s, selection: [1, 1]}
- }
- if (p && p.type === "string") {
- var g = f.substring(a.column, a.column + 1);
- if (g == s)return{text: "", selection: [1, 1]}
- }
- }
- }), this.add("string_dquotes", "deletion", function (e, t, n, r, i) {
- var s = r.doc.getTextRange(i);
- if (!i.isMultiLine() && (s == '"' || s == "'")) {
- var o = r.doc.getLine(i.start.row), u = o.substring(i.start.column + 1, i.start.column + 2);
- if (u == s)return i.end.column++, i
- }
- })
- };
- r.inherits(m, i), t.CstyleBehaviour = m
-}), ace.define("ace/mode/folding/cstyle", ["require", "exports", "module", "ace/lib/oop", "ace/range", "ace/mode/folding/fold_mode"], function (e, t, n) {
- var r = e("../../lib/oop"), i = e("../../range").Range, s = e("./fold_mode").FoldMode, o = t.FoldMode = function () {
- };
- r.inherits(o, s), function () {
- this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/, this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/, this.getFoldWidgetRange = function (e, t, n) {
- var r = e.getLine(n), i = r.match(this.foldingStartMarker);
- if (i) {
- var s = i.index;
- return i[1] ? this.openingBracketBlock(e, i[1], n, s) : e.getCommentFoldRange(n, s + i[0].length, 1)
- }
- if (t !== "markbeginend")return;
- var i = r.match(this.foldingStopMarker);
- if (i) {
- var s = i.index + i[0].length;
- return i[1] ? this.closingBracketBlock(e, i[1], n, s) : e.getCommentFoldRange(n, s, -1)
- }
- }
- }.call(o.prototype)
-}), ace.define("ace/mode/glsl_highlight_rules", ["require", "exports", "module", "ace/lib/oop", "ace/mode/c_cpp_highlight_rules"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("./c_cpp_highlight_rules").c_cppHighlightRules, s = function () {
- var e = "attribute|const|uniform|varying|break|continue|do|for|while|if|else|in|out|inout|float|int|void|bool|true|false|lowp|mediump|highp|precision|invariant|discard|return|mat2|mat3|mat4|vec2|vec3|vec4|ivec2|ivec3|ivec4|bvec2|bvec3|bvec4|sampler2D|samplerCube|struct", t = "radians|degrees|sin|cos|tan|asin|acos|atan|pow|exp|log|exp2|log2|sqrt|inversesqrt|abs|sign|floor|ceil|fract|mod|min|max|clamp|mix|step|smoothstep|length|distance|dot|cross|normalize|faceforward|reflect|refract|matrixCompMult|lessThan|lessThanEqual|greaterThan|greaterThanEqual|equal|notEqual|any|all|not|dFdx|dFdy|fwidth|texture2D|texture2DProj|texture2DLod|texture2DProjLod|textureCube|textureCubeLod|gl_MaxVertexAttribs|gl_MaxVertexUniformVectors|gl_MaxVaryingVectors|gl_MaxVertexTextureImageUnits|gl_MaxCombinedTextureImageUnits|gl_MaxTextureImageUnits|gl_MaxFragmentUniformVectors|gl_MaxDrawBuffers|gl_DepthRangeParameters|gl_DepthRange|gl_Position|gl_PointSize|gl_FragCoord|gl_FrontFacing|gl_PointCoord|gl_FragColor|gl_FragData", n = this.createKeywordMapper({"variable.language": "this", keyword: e, "constant.language": t}, "identifier");
- this.$rules = (new i).$rules, this.$rules.start.forEach(function (e) {
- typeof e.token == "function" && (e.token = n)
- })
- };
- r.inherits(s, i), t.glslHighlightRules = s
-})
\ No newline at end of file
diff --git a/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/mode-golang.js b/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/mode-golang.js
deleted file mode 100644
index 2b13b9a..0000000
--- a/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/mode-golang.js
+++ /dev/null
@@ -1,236 +0,0 @@
-ace.define("ace/mode/golang", ["require", "exports", "module", "ace/lib/oop", "ace/mode/text", "ace/tokenizer", "ace/mode/golang_highlight_rules", "ace/mode/matching_brace_outdent", "ace/mode/behaviour/cstyle", "ace/mode/folding/cstyle"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("./text").Mode, s = e("../tokenizer").Tokenizer, o = e("./golang_highlight_rules").GolangHighlightRules, u = e("./matching_brace_outdent").MatchingBraceOutdent, a = e("./behaviour/cstyle").CstyleBehaviour, f = e("./folding/cstyle").FoldMode, l = function () {
- this.$tokenizer = new s((new o).getRules()), this.$outdent = new u, this.foldingRules = new f
- };
- r.inherits(l, i), function () {
- this.toggleCommentLines = function (e, t, n, r) {
- var i = !0, s = /^(\s*)\/\//;
- for (var o = n; o <= r; o++)if (!s.test(t.getLine(o))) {
- i = !1;
- break
- }
- if (i) {
- var u = new Range(0, 0, 0, 0);
- for (var o = n; o <= r; o++) {
- var a = t.getLine(o), f = a.match(s);
- u.start.row = o, u.end.row = o, u.end.column = f[0].length, t.replace(u, f[1])
- }
- } else t.indentRows(n, r, "//")
- }, this.getNextLineIndent = function (e, t, n) {
- var r = this.$getIndent(t), i = this.$tokenizer.getLineTokens(t, e), s = i.tokens, o = i.state;
- if (s.length && s[s.length - 1].type == "comment")return r;
- if (e == "start") {
- var u = t.match(/^.*[\{\(\[]\s*$/);
- u && (r += n)
- }
- return r
- }, this.checkOutdent = function (e, t, n) {
- return this.$outdent.checkOutdent(t, n)
- }, this.autoOutdent = function (e, t, n) {
- this.$outdent.autoOutdent(t, n)
- }
- }.call(l.prototype), t.Mode = l
-}), ace.define("ace/mode/golang_highlight_rules", ["require", "exports", "module", "ace/lib/oop", "ace/mode/doc_comment_highlight_rules", "ace/mode/text_highlight_rules"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("./doc_comment_highlight_rules").DocCommentHighlightRules, s = e("./text_highlight_rules").TextHighlightRules, o = function () {
- var e = "true|else|false|break|case|return|goto|if|const|continue|struct|default|switch|for|func|import|package|chan|defer|fallthrough|go|interface|map|rangeselect|type|var", t = "nil|true|false|iota", n = this.createKeywordMapper({"variable.language": "this", keyword: e, "constant.language": t}, "identifier");
- this.$rules = {start: [
- {token: "comment", regex: "\\/\\/.*$"},
- i.getStartRule("doc-start"),
- {token: "comment", regex: "\\/\\*", next: "comment"},
- {token: "string", regex: '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},
- {token: "string", regex: '["].*\\\\$', next: "qqstring"},
- {token: "string", regex: "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},
- {token: "string", regex: "['].*\\\\$", next: "qstring"},
- {token: "constant.numeric", regex: "0[xX][0-9a-fA-F]+\\b"},
- {token: "constant.numeric", regex: "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},
- {token: "constant", regex: "<[a-zA-Z0-9.]+>"},
- {token: "keyword", regex: "(?:#include|#pragma|#line|#define|#undef|#ifdef|#else|#elif|#endif|#ifndef)"},
- {token: n, regex: "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},
- {token: "keyword.operator", regex: "!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|==|=|!=|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|new|delete|typeof|void)"},
- {token: "punctuation.operator", regex: "\\?|\\:|\\,|\\;|\\."},
- {token: "paren.lparen", regex: "[[({]"},
- {token: "paren.rparen", regex: "[\\])}]"},
- {token: "text", regex: "\\s+"}
- ], comment: [
- {token: "comment", regex: ".*?\\*\\/", next: "start"},
- {token: "comment", regex: ".+"}
- ], qqstring: [
- {token: "string", regex: '(?:(?:\\\\.)|(?:[^"\\\\]))*?"', next: "start"},
- {token: "string", regex: ".+"}
- ], qstring: [
- {token: "string", regex: "(?:(?:\\\\.)|(?:[^'\\\\]))*?'", next: "start"},
- {token: "string", regex: ".+"}
- ]}, this.embedRules(i, "doc-", [i.getEndRule("start")])
- };
- r.inherits(o, s), t.GolangHighlightRules = o
-}), ace.define("ace/mode/doc_comment_highlight_rules", ["require", "exports", "module", "ace/lib/oop", "ace/mode/text_highlight_rules"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("./text_highlight_rules").TextHighlightRules, s = function () {
- this.$rules = {start: [
- {token: "comment.doc.tag", regex: "@[\\w\\d_]+"},
- {token: "comment.doc.tag", regex: "\\bTODO\\b"},
- {defaultToken: "comment.doc"}
- ]}
- };
- r.inherits(s, i), s.getStartRule = function (e) {
- return{token: "comment.doc", regex: "\\/\\*(?=\\*)", next: e}
- }, s.getEndRule = function (e) {
- return{token: "comment.doc", regex: "\\*\\/", next: e}
- }, t.DocCommentHighlightRules = s
-}), ace.define("ace/mode/matching_brace_outdent", ["require", "exports", "module", "ace/range"], function (e, t, n) {
- var r = e("../range").Range, i = function () {
- };
- (function () {
- this.checkOutdent = function (e, t) {
- return/^\s+$/.test(e) ? /^\s*\}/.test(t) : !1
- }, this.autoOutdent = function (e, t) {
- var n = e.getLine(t), i = n.match(/^(\s*\})/);
- if (!i)return 0;
- var s = i[1].length, o = e.findMatchingBracket({row: t, column: s});
- if (!o || o.row == t)return 0;
- var u = this.$getIndent(e.getLine(o.row));
- e.replace(new r(t, 0, t, s - 1), u)
- }, this.$getIndent = function (e) {
- var t = e.match(/^(\s+)/);
- return t ? t[1] : ""
- }
- }).call(i.prototype), t.MatchingBraceOutdent = i
-}), ace.define("ace/mode/behaviour/cstyle", ["require", "exports", "module", "ace/lib/oop", "ace/mode/behaviour", "ace/token_iterator", "ace/lib/lang"], function (e, t, n) {
- var r = e("../../lib/oop"), i = e("../behaviour").Behaviour, s = e("../../token_iterator").TokenIterator, o = e("../../lib/lang"), u = ["text", "paren.rparen", "punctuation.operator"], a = ["text", "paren.rparen", "punctuation.operator", "comment"], f = 0, l = -1, c = "", h = 0, p = -1, d = "", v = "", m = function () {
- m.isSaneInsertion = function (e, t) {
- var n = e.getCursorPosition(), r = new s(t, n.row, n.column);
- if (!this.$matchTokenType(r.getCurrentToken() || "text", u)) {
- var i = new s(t, n.row, n.column + 1);
- if (!this.$matchTokenType(i.getCurrentToken() || "text", u))return!1
- }
- return r.stepForward(), r.getCurrentTokenRow() !== n.row || this.$matchTokenType(r.getCurrentToken() || "text", a)
- }, m.$matchTokenType = function (e, t) {
- return t.indexOf(e.type || e) > -1
- }, m.recordAutoInsert = function (e, t, n) {
- var r = e.getCursorPosition(), i = t.doc.getLine(r.row);
- this.isAutoInsertedClosing(r, i, c[0]) || (f = 0), l = r.row, c = n + i.substr(r.column), f++
- }, m.recordMaybeInsert = function (e, t, n) {
- var r = e.getCursorPosition(), i = t.doc.getLine(r.row);
- this.isMaybeInsertedClosing(r, i) || (h = 0), p = r.row, d = i.substr(0, r.column) + n, v = i.substr(r.column), h++
- }, m.isAutoInsertedClosing = function (e, t, n) {
- return f > 0 && e.row === l && n === c[0] && t.substr(e.column) === c
- }, m.isMaybeInsertedClosing = function (e, t) {
- return h > 0 && e.row === p && t.substr(e.column) === v && t.substr(0, e.column) == d
- }, m.popAutoInsertedClosing = function () {
- c = c.substr(1), f--
- }, m.clearMaybeInsertedClosing = function () {
- h = 0, p = -1
- }, this.add("braces", "insertion", function (e, t, n, r, i) {
- var s = n.getCursorPosition(), u = r.doc.getLine(s.row);
- if (i == "{") {
- var a = n.getSelectionRange(), f = r.doc.getTextRange(a);
- if (f !== "" && f !== "{" && n.getWrapBehavioursEnabled())return{text: "{" + f + "}", selection: !1};
- if (m.isSaneInsertion(n, r))return/[\]\}\)]/.test(u[s.column]) ? (m.recordAutoInsert(n, r, "}"), {text: "{}", selection: [1, 1]}) : (m.recordMaybeInsert(n, r, "{"), {text: "{", selection: [1, 1]})
- } else if (i == "}") {
- var l = u.substring(s.column, s.column + 1);
- if (l == "}") {
- var c = r.$findOpeningBracket("}", {column: s.column + 1, row: s.row});
- if (c !== null && m.isAutoInsertedClosing(s, u, i))return m.popAutoInsertedClosing(), {text: "", selection: [1, 1]}
- }
- } else if (i == "\n" || i == "\r\n") {
- var p = "";
- m.isMaybeInsertedClosing(s, u) && (p = o.stringRepeat("}", h), m.clearMaybeInsertedClosing());
- var l = u.substring(s.column, s.column + 1);
- if (l == "}" || p !== "") {
- var d = r.findMatchingBracket({row: s.row, column: s.column}, "}");
- if (!d)return null;
- var v = this.getNextLineIndent(e, u.substring(0, s.column), r.getTabString()), g = this.$getIndent(u);
- return{text: "\n" + v + "\n" + g + p, selection: [1, v.length, 1, v.length]}
- }
- }
- }), this.add("braces", "deletion", function (e, t, n, r, i) {
- var s = r.doc.getTextRange(i);
- if (!i.isMultiLine() && s == "{") {
- var o = r.doc.getLine(i.start.row), u = o.substring(i.end.column, i.end.column + 1);
- if (u == "}")return i.end.column++, i;
- h--
- }
- }), this.add("parens", "insertion", function (e, t, n, r, i) {
- if (i == "(") {
- var s = n.getSelectionRange(), o = r.doc.getTextRange(s);
- if (o !== "" && n.getWrapBehavioursEnabled())return{text: "(" + o + ")", selection: !1};
- if (m.isSaneInsertion(n, r))return m.recordAutoInsert(n, r, ")"), {text: "()", selection: [1, 1]}
- } else if (i == ")") {
- var u = n.getCursorPosition(), a = r.doc.getLine(u.row), f = a.substring(u.column, u.column + 1);
- if (f == ")") {
- var l = r.$findOpeningBracket(")", {column: u.column + 1, row: u.row});
- if (l !== null && m.isAutoInsertedClosing(u, a, i))return m.popAutoInsertedClosing(), {text: "", selection: [1, 1]}
- }
- }
- }), this.add("parens", "deletion", function (e, t, n, r, i) {
- var s = r.doc.getTextRange(i);
- if (!i.isMultiLine() && s == "(") {
- var o = r.doc.getLine(i.start.row), u = o.substring(i.start.column + 1, i.start.column + 2);
- if (u == ")")return i.end.column++, i
- }
- }), this.add("brackets", "insertion", function (e, t, n, r, i) {
- if (i == "[") {
- var s = n.getSelectionRange(), o = r.doc.getTextRange(s);
- if (o !== "" && n.getWrapBehavioursEnabled())return{text: "[" + o + "]", selection: !1};
- if (m.isSaneInsertion(n, r))return m.recordAutoInsert(n, r, "]"), {text: "[]", selection: [1, 1]}
- } else if (i == "]") {
- var u = n.getCursorPosition(), a = r.doc.getLine(u.row), f = a.substring(u.column, u.column + 1);
- if (f == "]") {
- var l = r.$findOpeningBracket("]", {column: u.column + 1, row: u.row});
- if (l !== null && m.isAutoInsertedClosing(u, a, i))return m.popAutoInsertedClosing(), {text: "", selection: [1, 1]}
- }
- }
- }), this.add("brackets", "deletion", function (e, t, n, r, i) {
- var s = r.doc.getTextRange(i);
- if (!i.isMultiLine() && s == "[") {
- var o = r.doc.getLine(i.start.row), u = o.substring(i.start.column + 1, i.start.column + 2);
- if (u == "]")return i.end.column++, i
- }
- }), this.add("string_dquotes", "insertion", function (e, t, n, r, i) {
- if (i == '"' || i == "'") {
- var s = i, o = n.getSelectionRange(), u = r.doc.getTextRange(o);
- if (u !== "" && u !== "'" && u != '"' && n.getWrapBehavioursEnabled())return{text: s + u + s, selection: !1};
- var a = n.getCursorPosition(), f = r.doc.getLine(a.row), l = f.substring(a.column - 1, a.column);
- if (l == "\\")return null;
- var c = r.getTokens(o.start.row), h = 0, p, d = -1;
- for (var v = 0; v < c.length; v++) {
- p = c[v], p.type == "string" ? d = -1 : d < 0 && (d = p.value.indexOf(s));
- if (p.value.length + h > o.start.column)break;
- h += c[v].value.length
- }
- if (!p || d < 0 && p.type !== "comment" && (p.type !== "string" || o.start.column !== p.value.length + h - 1 && p.value.lastIndexOf(s) === p.value.length - 1)) {
- if (!m.isSaneInsertion(n, r))return;
- return{text: s + s, selection: [1, 1]}
- }
- if (p && p.type === "string") {
- var g = f.substring(a.column, a.column + 1);
- if (g == s)return{text: "", selection: [1, 1]}
- }
- }
- }), this.add("string_dquotes", "deletion", function (e, t, n, r, i) {
- var s = r.doc.getTextRange(i);
- if (!i.isMultiLine() && (s == '"' || s == "'")) {
- var o = r.doc.getLine(i.start.row), u = o.substring(i.start.column + 1, i.start.column + 2);
- if (u == s)return i.end.column++, i
- }
- })
- };
- r.inherits(m, i), t.CstyleBehaviour = m
-}), ace.define("ace/mode/folding/cstyle", ["require", "exports", "module", "ace/lib/oop", "ace/range", "ace/mode/folding/fold_mode"], function (e, t, n) {
- var r = e("../../lib/oop"), i = e("../../range").Range, s = e("./fold_mode").FoldMode, o = t.FoldMode = function () {
- };
- r.inherits(o, s), function () {
- this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/, this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/, this.getFoldWidgetRange = function (e, t, n) {
- var r = e.getLine(n), i = r.match(this.foldingStartMarker);
- if (i) {
- var s = i.index;
- return i[1] ? this.openingBracketBlock(e, i[1], n, s) : e.getCommentFoldRange(n, s + i[0].length, 1)
- }
- if (t !== "markbeginend")return;
- var i = r.match(this.foldingStopMarker);
- if (i) {
- var s = i.index + i[0].length;
- return i[1] ? this.closingBracketBlock(e, i[1], n, s) : e.getCommentFoldRange(n, s, -1)
- }
- }
- }.call(o.prototype)
-})
\ No newline at end of file
diff --git a/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/mode-groovy.js b/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/mode-groovy.js
deleted file mode 100644
index 63563f7..0000000
--- a/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/mode-groovy.js
+++ /dev/null
@@ -1,328 +0,0 @@
-ace.define("ace/mode/groovy", ["require", "exports", "module", "ace/lib/oop", "ace/mode/javascript", "ace/tokenizer", "ace/mode/groovy_highlight_rules"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("./javascript").Mode, s = e("../tokenizer").Tokenizer, o = e("./groovy_highlight_rules").GroovyHighlightRules, u = function () {
- i.call(this), this.$tokenizer = new s((new o).getRules())
- };
- r.inherits(u, i), function () {
- this.createWorker = function (e) {
- return null
- }
- }.call(u.prototype), t.Mode = u
-}), ace.define("ace/mode/javascript", ["require", "exports", "module", "ace/lib/oop", "ace/mode/text", "ace/tokenizer", "ace/mode/javascript_highlight_rules", "ace/mode/matching_brace_outdent", "ace/range", "ace/worker/worker_client", "ace/mode/behaviour/cstyle", "ace/mode/folding/cstyle"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("./text").Mode, s = e("../tokenizer").Tokenizer, o = e("./javascript_highlight_rules").JavaScriptHighlightRules, u = e("./matching_brace_outdent").MatchingBraceOutdent, a = e("../range").Range, f = e("../worker/worker_client").WorkerClient, l = e("./behaviour/cstyle").CstyleBehaviour, c = e("./folding/cstyle").FoldMode, h = function () {
- this.$tokenizer = new s((new o).getRules()), this.$outdent = new u, this.$behaviour = new l, this.foldingRules = new c
- };
- r.inherits(h, i), function () {
- this.toggleCommentLines = function (e, t, n, r) {
- var i = !0, s = /^(\s*)\/\//;
- for (var o = n; o <= r; o++)if (!s.test(t.getLine(o))) {
- i = !1;
- break
- }
- if (i) {
- var u = new a(0, 0, 0, 0);
- for (var o = n; o <= r; o++) {
- var f = t.getLine(o), l = f.match(s);
- u.start.row = o, u.end.row = o, u.end.column = l[0].length, t.replace(u, l[1])
- }
- } else t.indentRows(n, r, "//")
- }, this.getNextLineIndent = function (e, t, n) {
- var r = this.$getIndent(t), i = this.$tokenizer.getLineTokens(t, e), s = i.tokens, o = i.state;
- if (s.length && s[s.length - 1].type == "comment")return r;
- if (e == "start" || e == "regex_allowed") {
- var u = t.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/);
- u && (r += n)
- } else if (e == "doc-start") {
- if (o == "start" || e == "regex_allowed")return"";
- var u = t.match(/^\s*(\/?)\*/);
- u && (u[1] && (r += " "), r += "* ")
- }
- return r
- }, this.checkOutdent = function (e, t, n) {
- return this.$outdent.checkOutdent(t, n)
- }, this.autoOutdent = function (e, t, n) {
- this.$outdent.autoOutdent(t, n)
- }, this.createWorker = function (e) {
- var t = new f(["ace"], "ace/mode/javascript_worker", "JavaScriptWorker");
- return t.attachToDocument(e.getDocument()), t.on("jslint", function (t) {
- e.setAnnotations(t.data)
- }), t.on("terminate", function () {
- e.clearAnnotations()
- }), t
- }
- }.call(h.prototype), t.Mode = h
-}), ace.define("ace/mode/javascript_highlight_rules", ["require", "exports", "module", "ace/lib/oop", "ace/mode/doc_comment_highlight_rules", "ace/mode/text_highlight_rules"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("./doc_comment_highlight_rules").DocCommentHighlightRules, s = e("./text_highlight_rules").TextHighlightRules, o = function () {
- var e = this.createKeywordMapper({"variable.language": "Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document", keyword: "const|yield|import|get|set|break|case|catch|continue|default|delete|do|else|finally|for|function|if|in|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|__parent__|__count__|escape|unescape|with|__proto__|class|enum|extends|super|export|implements|private|public|interface|package|protected|static", "storage.type": "const|let|var|function", "constant.language": "null|Infinity|NaN|undefined", "support.function": "alert", "constant.language.boolean": "true|false"}, "identifier"), t = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void", n = "[a-zA-Z\\$_¡-￿][a-zA-Z\\d\\$_¡-￿]*\\b", r = "\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|[0-2][0-7]{0,2}|3[0-6][0-7]?|37[0-7]?|[4-7][0-7]?|.)";
- this.$rules = {start: [
- {token: "comment", regex: /\/\/.*$/},
- i.getStartRule("doc-start"),
- {token: "comment", regex: /\/\*/, next: "comment"},
- {token: "string", regex: "'(?=.)", next: "qstring"},
- {token: "string", regex: '"(?=.)', next: "qqstring"},
- {token: "constant.numeric", regex: /0[xX][0-9a-fA-F]+\b/},
- {token: "constant.numeric", regex: /[+-]?\d+(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?\b/},
- {token: ["storage.type", "punctuation.operator", "support.function", "punctuation.operator", "entity.name.function", "text", "keyword.operator"], regex: "(" + n + ")(\\.)(prototype)(\\.)(" + n + ")(\\s*)(=)", next: "function_arguments"},
- {token: ["storage.type", "punctuation.operator", "entity.name.function", "text", "keyword.operator", "text", "storage.type", "text", "paren.lparen"], regex: "(" + n + ")(\\.)(" + n + ")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", next: "function_arguments"},
- {token: ["entity.name.function", "text", "keyword.operator", "text", "storage.type", "text", "paren.lparen"], regex: "(" + n + ")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", next: "function_arguments"},
- {token: ["storage.type", "punctuation.operator", "entity.name.function", "text", "keyword.operator", "text", "storage.type", "text", "entity.name.function", "text", "paren.lparen"], regex: "(" + n + ")(\\.)(" + n + ")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()", next: "function_arguments"},
- {token: ["storage.type", "text", "entity.name.function", "text", "paren.lparen"], regex: "(function)(\\s+)(" + n + ")(\\s*)(\\()", next: "function_arguments"},
- {token: ["entity.name.function", "text", "punctuation.operator", "text", "storage.type", "text", "paren.lparen"], regex: "(" + n + ")(\\s*)(:)(\\s*)(function)(\\s*)(\\()", next: "function_arguments"},
- {token: ["text", "text", "storage.type", "text", "paren.lparen"], regex: "(:)(\\s*)(function)(\\s*)(\\()", next: "function_arguments"},
- {token: "keyword", regex: "(?:" + t + ")\\b", next: "regex_allowed"},
- {token: ["punctuation.operator", "support.function"], regex: /(\.)(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:opzzzz|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/},
- {token: ["punctuation.operator", "support.function.dom"], regex: /(\.)(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/},
- {token: ["punctuation.operator", "support.constant"], regex: /(\.)(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/},
- {token: ["storage.type", "punctuation.operator", "support.function.firebug"], regex: /(console)(\.)(warn|info|log|error|time|timeEnd|assert)\b/},
- {token: e, regex: n},
- {token: "keyword.operator", regex: /--|\+\+|[!$%&*+\-~]|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|\*=|%=|\+=|\-=|&=|\^=/, next: "regex_allowed"},
- {token: "punctuation.operator", regex: /\?|\:|\,|\;|\./, next: "regex_allowed"},
- {token: "paren.lparen", regex: /[\[({]/, next: "regex_allowed"},
- {token: "paren.rparen", regex: /[\])}]/},
- {token: "keyword.operator", regex: /\/=?/, next: "regex_allowed"},
- {token: "comment", regex: /^#!.*$/}
- ], regex_allowed: [i.getStartRule("doc-start"), {token: "comment", regex: "\\/\\*", next: "comment_regex_allowed"}, {token: "comment", regex: "\\/\\/.*$"}, {token: "string.regexp", regex: "\\/", next: "regex"}, {token: "text", regex: "\\s+"}, {token: "empty", regex: "", next: "start"}], regex: [
- {token: "regexp.keyword.operator", regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},
- {token: "string.regexp", regex: "/\\w*", next: "start"},
- {token: "invalid", regex: /\{\d+,?(?:\d+)?}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/},
- {token: "constant.language.escape", regex: /\(\?[:=!]|\)|{\d+,?(?:\d+)?}|{,\d+}|[+*]\?|[()$^+*?]/},
- {token: "constant.language.delimiter", regex: /\|/},
- {token: "constant.language.escape", regex: /\[\^?/, next: "regex_character_class"},
- {token: "empty", regex: "$", next: "start"},
- {defaultToken: "string.regexp"}
- ], regex_character_class: [
- {token: "regexp.keyword.operator", regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},
- {token: "constant.language.escape", regex: "]", next: "regex"},
- {token: "constant.language.escape", regex: "-"},
- {token: "empty", regex: "$", next: "start"},
- {defaultToken: "string.regexp.charachterclass"}
- ], function_arguments: [
- {token: "variable.parameter", regex: n},
- {token: "punctuation.operator", regex: "[, ]+"},
- {token: "punctuation.operator", regex: "$"},
- {token: "empty", regex: "", next: "start"}
- ], comment_regex_allowed: [
- {token: "comment", regex: "\\*\\/", next: "regex_allowed"},
- {defaultToken: "comment"}
- ], comment: [
- {token: "comment", regex: "\\*\\/", next: "start"},
- {defaultToken: "comment"}
- ], qqstring: [
- {token: "constant.language.escape", regex: r},
- {token: "string", regex: "\\\\$", next: "qqstring"},
- {token: "string", regex: '"|$', next: "start"},
- {defaultToken: "string"}
- ], qstring: [
- {token: "constant.language.escape", regex: r},
- {token: "string", regex: "\\\\$", next: "qstring"},
- {token: "string", regex: "'|$", next: "start"},
- {defaultToken: "string"}
- ]}, this.embedRules(i, "doc-", [i.getEndRule("start")])
- };
- r.inherits(o, s), t.JavaScriptHighlightRules = o
-}), ace.define("ace/mode/doc_comment_highlight_rules", ["require", "exports", "module", "ace/lib/oop", "ace/mode/text_highlight_rules"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("./text_highlight_rules").TextHighlightRules, s = function () {
- this.$rules = {start: [
- {token: "comment.doc.tag", regex: "@[\\w\\d_]+"},
- {token: "comment.doc.tag", regex: "\\bTODO\\b"},
- {defaultToken: "comment.doc"}
- ]}
- };
- r.inherits(s, i), s.getStartRule = function (e) {
- return{token: "comment.doc", regex: "\\/\\*(?=\\*)", next: e}
- }, s.getEndRule = function (e) {
- return{token: "comment.doc", regex: "\\*\\/", next: e}
- }, t.DocCommentHighlightRules = s
-}), ace.define("ace/mode/matching_brace_outdent", ["require", "exports", "module", "ace/range"], function (e, t, n) {
- var r = e("../range").Range, i = function () {
- };
- (function () {
- this.checkOutdent = function (e, t) {
- return/^\s+$/.test(e) ? /^\s*\}/.test(t) : !1
- }, this.autoOutdent = function (e, t) {
- var n = e.getLine(t), i = n.match(/^(\s*\})/);
- if (!i)return 0;
- var s = i[1].length, o = e.findMatchingBracket({row: t, column: s});
- if (!o || o.row == t)return 0;
- var u = this.$getIndent(e.getLine(o.row));
- e.replace(new r(t, 0, t, s - 1), u)
- }, this.$getIndent = function (e) {
- var t = e.match(/^(\s+)/);
- return t ? t[1] : ""
- }
- }).call(i.prototype), t.MatchingBraceOutdent = i
-}), ace.define("ace/mode/behaviour/cstyle", ["require", "exports", "module", "ace/lib/oop", "ace/mode/behaviour", "ace/token_iterator", "ace/lib/lang"], function (e, t, n) {
- var r = e("../../lib/oop"), i = e("../behaviour").Behaviour, s = e("../../token_iterator").TokenIterator, o = e("../../lib/lang"), u = ["text", "paren.rparen", "punctuation.operator"], a = ["text", "paren.rparen", "punctuation.operator", "comment"], f = 0, l = -1, c = "", h = 0, p = -1, d = "", v = "", m = function () {
- m.isSaneInsertion = function (e, t) {
- var n = e.getCursorPosition(), r = new s(t, n.row, n.column);
- if (!this.$matchTokenType(r.getCurrentToken() || "text", u)) {
- var i = new s(t, n.row, n.column + 1);
- if (!this.$matchTokenType(i.getCurrentToken() || "text", u))return!1
- }
- return r.stepForward(), r.getCurrentTokenRow() !== n.row || this.$matchTokenType(r.getCurrentToken() || "text", a)
- }, m.$matchTokenType = function (e, t) {
- return t.indexOf(e.type || e) > -1
- }, m.recordAutoInsert = function (e, t, n) {
- var r = e.getCursorPosition(), i = t.doc.getLine(r.row);
- this.isAutoInsertedClosing(r, i, c[0]) || (f = 0), l = r.row, c = n + i.substr(r.column), f++
- }, m.recordMaybeInsert = function (e, t, n) {
- var r = e.getCursorPosition(), i = t.doc.getLine(r.row);
- this.isMaybeInsertedClosing(r, i) || (h = 0), p = r.row, d = i.substr(0, r.column) + n, v = i.substr(r.column), h++
- }, m.isAutoInsertedClosing = function (e, t, n) {
- return f > 0 && e.row === l && n === c[0] && t.substr(e.column) === c
- }, m.isMaybeInsertedClosing = function (e, t) {
- return h > 0 && e.row === p && t.substr(e.column) === v && t.substr(0, e.column) == d
- }, m.popAutoInsertedClosing = function () {
- c = c.substr(1), f--
- }, m.clearMaybeInsertedClosing = function () {
- h = 0, p = -1
- }, this.add("braces", "insertion", function (e, t, n, r, i) {
- var s = n.getCursorPosition(), u = r.doc.getLine(s.row);
- if (i == "{") {
- var a = n.getSelectionRange(), f = r.doc.getTextRange(a);
- if (f !== "" && f !== "{" && n.getWrapBehavioursEnabled())return{text: "{" + f + "}", selection: !1};
- if (m.isSaneInsertion(n, r))return/[\]\}\)]/.test(u[s.column]) ? (m.recordAutoInsert(n, r, "}"), {text: "{}", selection: [1, 1]}) : (m.recordMaybeInsert(n, r, "{"), {text: "{", selection: [1, 1]})
- } else if (i == "}") {
- var l = u.substring(s.column, s.column + 1);
- if (l == "}") {
- var c = r.$findOpeningBracket("}", {column: s.column + 1, row: s.row});
- if (c !== null && m.isAutoInsertedClosing(s, u, i))return m.popAutoInsertedClosing(), {text: "", selection: [1, 1]}
- }
- } else if (i == "\n" || i == "\r\n") {
- var p = "";
- m.isMaybeInsertedClosing(s, u) && (p = o.stringRepeat("}", h), m.clearMaybeInsertedClosing());
- var l = u.substring(s.column, s.column + 1);
- if (l == "}" || p !== "") {
- var d = r.findMatchingBracket({row: s.row, column: s.column}, "}");
- if (!d)return null;
- var v = this.getNextLineIndent(e, u.substring(0, s.column), r.getTabString()), g = this.$getIndent(u);
- return{text: "\n" + v + "\n" + g + p, selection: [1, v.length, 1, v.length]}
- }
- }
- }), this.add("braces", "deletion", function (e, t, n, r, i) {
- var s = r.doc.getTextRange(i);
- if (!i.isMultiLine() && s == "{") {
- var o = r.doc.getLine(i.start.row), u = o.substring(i.end.column, i.end.column + 1);
- if (u == "}")return i.end.column++, i;
- h--
- }
- }), this.add("parens", "insertion", function (e, t, n, r, i) {
- if (i == "(") {
- var s = n.getSelectionRange(), o = r.doc.getTextRange(s);
- if (o !== "" && n.getWrapBehavioursEnabled())return{text: "(" + o + ")", selection: !1};
- if (m.isSaneInsertion(n, r))return m.recordAutoInsert(n, r, ")"), {text: "()", selection: [1, 1]}
- } else if (i == ")") {
- var u = n.getCursorPosition(), a = r.doc.getLine(u.row), f = a.substring(u.column, u.column + 1);
- if (f == ")") {
- var l = r.$findOpeningBracket(")", {column: u.column + 1, row: u.row});
- if (l !== null && m.isAutoInsertedClosing(u, a, i))return m.popAutoInsertedClosing(), {text: "", selection: [1, 1]}
- }
- }
- }), this.add("parens", "deletion", function (e, t, n, r, i) {
- var s = r.doc.getTextRange(i);
- if (!i.isMultiLine() && s == "(") {
- var o = r.doc.getLine(i.start.row), u = o.substring(i.start.column + 1, i.start.column + 2);
- if (u == ")")return i.end.column++, i
- }
- }), this.add("brackets", "insertion", function (e, t, n, r, i) {
- if (i == "[") {
- var s = n.getSelectionRange(), o = r.doc.getTextRange(s);
- if (o !== "" && n.getWrapBehavioursEnabled())return{text: "[" + o + "]", selection: !1};
- if (m.isSaneInsertion(n, r))return m.recordAutoInsert(n, r, "]"), {text: "[]", selection: [1, 1]}
- } else if (i == "]") {
- var u = n.getCursorPosition(), a = r.doc.getLine(u.row), f = a.substring(u.column, u.column + 1);
- if (f == "]") {
- var l = r.$findOpeningBracket("]", {column: u.column + 1, row: u.row});
- if (l !== null && m.isAutoInsertedClosing(u, a, i))return m.popAutoInsertedClosing(), {text: "", selection: [1, 1]}
- }
- }
- }), this.add("brackets", "deletion", function (e, t, n, r, i) {
- var s = r.doc.getTextRange(i);
- if (!i.isMultiLine() && s == "[") {
- var o = r.doc.getLine(i.start.row), u = o.substring(i.start.column + 1, i.start.column + 2);
- if (u == "]")return i.end.column++, i
- }
- }), this.add("string_dquotes", "insertion", function (e, t, n, r, i) {
- if (i == '"' || i == "'") {
- var s = i, o = n.getSelectionRange(), u = r.doc.getTextRange(o);
- if (u !== "" && u !== "'" && u != '"' && n.getWrapBehavioursEnabled())return{text: s + u + s, selection: !1};
- var a = n.getCursorPosition(), f = r.doc.getLine(a.row), l = f.substring(a.column - 1, a.column);
- if (l == "\\")return null;
- var c = r.getTokens(o.start.row), h = 0, p, d = -1;
- for (var v = 0; v < c.length; v++) {
- p = c[v], p.type == "string" ? d = -1 : d < 0 && (d = p.value.indexOf(s));
- if (p.value.length + h > o.start.column)break;
- h += c[v].value.length
- }
- if (!p || d < 0 && p.type !== "comment" && (p.type !== "string" || o.start.column !== p.value.length + h - 1 && p.value.lastIndexOf(s) === p.value.length - 1)) {
- if (!m.isSaneInsertion(n, r))return;
- return{text: s + s, selection: [1, 1]}
- }
- if (p && p.type === "string") {
- var g = f.substring(a.column, a.column + 1);
- if (g == s)return{text: "", selection: [1, 1]}
- }
- }
- }), this.add("string_dquotes", "deletion", function (e, t, n, r, i) {
- var s = r.doc.getTextRange(i);
- if (!i.isMultiLine() && (s == '"' || s == "'")) {
- var o = r.doc.getLine(i.start.row), u = o.substring(i.start.column + 1, i.start.column + 2);
- if (u == s)return i.end.column++, i
- }
- })
- };
- r.inherits(m, i), t.CstyleBehaviour = m
-}), ace.define("ace/mode/folding/cstyle", ["require", "exports", "module", "ace/lib/oop", "ace/range", "ace/mode/folding/fold_mode"], function (e, t, n) {
- var r = e("../../lib/oop"), i = e("../../range").Range, s = e("./fold_mode").FoldMode, o = t.FoldMode = function () {
- };
- r.inherits(o, s), function () {
- this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/, this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/, this.getFoldWidgetRange = function (e, t, n) {
- var r = e.getLine(n), i = r.match(this.foldingStartMarker);
- if (i) {
- var s = i.index;
- return i[1] ? this.openingBracketBlock(e, i[1], n, s) : e.getCommentFoldRange(n, s + i[0].length, 1)
- }
- if (t !== "markbeginend")return;
- var i = r.match(this.foldingStopMarker);
- if (i) {
- var s = i.index + i[0].length;
- return i[1] ? this.closingBracketBlock(e, i[1], n, s) : e.getCommentFoldRange(n, s, -1)
- }
- }
- }.call(o.prototype)
-}), ace.define("ace/mode/groovy_highlight_rules", ["require", "exports", "module", "ace/lib/oop", "ace/mode/doc_comment_highlight_rules", "ace/mode/text_highlight_rules"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("./doc_comment_highlight_rules").DocCommentHighlightRules, s = e("./text_highlight_rules").TextHighlightRules, o = function () {
- var e = "assert|with|abstract|continue|for|new|switch|assert|default|goto|package|synchronized|boolean|do|if|private|this|break|double|implements|protected|throw|byte|else|import|public|throws|case|enum|instanceof|return|transient|catch|extends|int|short|try|char|final|interface|static|void|class|finally|long|strictfp|volatile|def|float|native|super|while", t = "null|Infinity|NaN|undefined", n = "AbstractMethodError|AssertionError|ClassCircularityError|ClassFormatError|Deprecated|EnumConstantNotPresentException|ExceptionInInitializerError|IllegalAccessError|IllegalThreadStateException|InstantiationError|InternalError|NegativeArraySizeException|NoSuchFieldError|Override|Process|ProcessBuilder|SecurityManager|StringIndexOutOfBoundsException|SuppressWarnings|TypeNotPresentException|UnknownError|UnsatisfiedLinkError|UnsupportedClassVersionError|VerifyError|InstantiationException|IndexOutOfBoundsException|ArrayIndexOutOfBoundsException|CloneNotSupportedException|NoSuchFieldException|IllegalArgumentException|NumberFormatException|SecurityException|Void|InheritableThreadLocal|IllegalStateException|InterruptedException|NoSuchMethodException|IllegalAccessException|UnsupportedOperationException|Enum|StrictMath|Package|Compiler|Readable|Runtime|StringBuilder|Math|IncompatibleClassChangeError|NoSuchMethodError|ThreadLocal|RuntimePermission|ArithmeticException|NullPointerException|Long|Integer|Short|Byte|Double|Number|Float|Character|Boolean|StackTraceElement|Appendable|StringBuffer|Iterable|ThreadGroup|Runnable|Thread|IllegalMonitorStateException|StackOverflowError|OutOfMemoryError|VirtualMachineError|ArrayStoreException|ClassCastException|LinkageError|NoClassDefFoundError|ClassNotFoundException|RuntimeException|Exception|ThreadDeath|Error|Throwable|System|ClassLoader|Cloneable|Class|CharSequence|Comparable|String|Object", r = this.createKeywordMapper({"variable.language": "this", keyword: e, "support.function": n, "constant.language": t}, "identifier");
- this.$rules = {start: [
- {token: "comment", regex: "\\/\\/.*$"},
- i.getStartRule("doc-start"),
- {token: "comment", regex: "\\/\\*", next: "comment"},
- {token: "string.regexp", regex: "[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/]\\w*\\s*(?=[).,;]|$)"},
- {token: "string", regex: '"""', next: "qqstring"},
- {token: "string", regex: "'''", next: "qstring"},
- {token: "string", regex: '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},
- {token: "string", regex: "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},
- {token: "constant.numeric", regex: "0[xX][0-9a-fA-F]+\\b"},
- {token: "constant.numeric", regex: "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},
- {token: "constant.language.boolean", regex: "(?:true|false)\\b"},
- {token: r, regex: "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},
- {token: "keyword.operator", regex: "\\?:|\\?\\.|\\*\\.|<=>|=~|==~|\\.@|\\*\\.@|\\.&|as|in|is|!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)"},
- {token: "lparen", regex: "[[({]"},
- {token: "rparen", regex: "[\\])}]"},
- {token: "text", regex: "\\s+"}
- ], comment: [
- {token: "comment", regex: ".*?\\*\\/", next: "start"},
- {token: "comment", regex: ".+"}
- ], qqstring: [
- {token: "constant.language.escape", regex: /\\(?:u[0-9A-Fa-f]{4}|.|$)/},
- {token: "constant.language.escape", regex: /\$[\w\d]+/},
- {token: "constant.language.escape", regex: /\$\{[^"\}]+\}?/},
- {token: "string", regex: '"{3,5}', next: "start"},
- {token: "string", regex: ".+?"}
- ], qstring: [
- {token: "constant.language.escape", regex: /\\(?:u[0-9A-Fa-f]{4}|.|$)/},
- {token: "string", regex: "'{3,5}", next: "start"},
- {token: "string", regex: ".+?"}
- ]}, this.embedRules(i, "doc-", [i.getEndRule("start")])
- };
- r.inherits(o, s), t.GroovyHighlightRules = o
-})
\ No newline at end of file
diff --git a/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/mode-haml.js b/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/mode-haml.js
deleted file mode 100644
index 157e586..0000000
--- a/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/mode-haml.js
+++ /dev/null
@@ -1,111 +0,0 @@
-ace.define("ace/mode/haml", ["require", "exports", "module", "ace/lib/oop", "ace/mode/text", "ace/tokenizer", "ace/mode/haml_highlight_rules", "ace/mode/folding/coffee"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("./text").Mode, s = e("../tokenizer").Tokenizer, o = e("./haml_highlight_rules").HamlHighlightRules, u = e("./folding/coffee").FoldMode, a = function () {
- var e = new o;
- this.foldingRules = new u, this.$tokenizer = new s(e.getRules())
- };
- r.inherits(a, i), function () {
- }.call(a.prototype), t.Mode = a
-}), ace.define("ace/mode/haml_highlight_rules", ["require", "exports", "module", "ace/lib/oop", "ace/mode/text_highlight_rules", "ace/mode/ruby_highlight_rules"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("./text_highlight_rules").TextHighlightRules, s = e("./ruby_highlight_rules"), o = s.RubyHighlightRules, u = function () {
- this.$rules = {start: [
- {token: "punctuation.section.comment", regex: /^\s*\/.*/},
- {token: "punctuation.section.comment", regex: /^\s*#.*/},
- {token: "string.quoted.double", regex: "==.+?=="},
- {token: "keyword.other.doctype", regex: "^!!!\\s*(?:[a-zA-Z0-9-_]+)?"},
- s.qString,
- s.qqString,
- s.tString,
- {token: ["entity.name.tag.haml"], regex: /^\s*%[\w:]+/, next: "tag_single"},
- {token: ["meta.escape.haml"], regex: "^\\s*\\\\."},
- s.constantNumericHex,
- s.constantNumericFloat,
- s.constantOtherSymbol,
- {token: "text", regex: "=|-|~", next: "embedded_ruby"}
- ], tag_single: [
- {token: "entity.other.attribute-name.class.haml", regex: "\\.[\\w-]+"},
- {token: "entity.other.attribute-name.id.haml", regex: "#[\\w-]+"},
- {token: "punctuation.section", regex: "\\{", next: "section"},
- s.constantOtherSymbol,
- {token: "text", regex: /\s/, next: "start"},
- {token: "empty", regex: "$|(?!\\.|#|\\{|\\[|=|-|~|\\/)", next: "start"}
- ], section: [s.constantOtherSymbol, s.qString, s.qqString, s.tString, s.constantNumericHex, s.constantNumericFloat, {token: "punctuation.section", regex: "\\}", next: "start"}], embedded_ruby: [s.constantNumericHex, s.constantNumericFloat, {token: "support.class", regex: "[A-Z][a-zA-Z_\\d]+"}, {token: (new o).getKeywords(), regex: "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"}, {token: ["keyword", "text", "text"], regex: "(?:do|\\{)(?: \\|[^|]+\\|)?$", next: "start"}, {token: ["text"], regex: "^$", next: "start"}, {token: ["text"], regex: "^(?!.*\\|\\s*$)", next: "start"}]}
- };
- r.inherits(u, i), t.HamlHighlightRules = u
-}), ace.define("ace/mode/ruby_highlight_rules", ["require", "exports", "module", "ace/lib/oop", "ace/mode/text_highlight_rules"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("./text_highlight_rules").TextHighlightRules, s = t.constantOtherSymbol = {token: "constant.other.symbol.ruby", regex: "[:](?:[A-Za-z_]|[@$](?=[a-zA-Z0-9_]))[a-zA-Z0-9_]*[!=?]?"}, o = t.qString = {token: "string", regex: "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"}, u = t.qqString = {token: "string", regex: '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'}, a = t.tString = {token: "string", regex: "[`](?:(?:\\\\.)|(?:[^'\\\\]))*?[`]"}, f = t.constantNumericHex = {token: "constant.numeric", regex: "0[xX][0-9a-fA-F](?:[0-9a-fA-F]|_(?=[0-9a-fA-F]))*\\b"}, l = t.constantNumericFloat = {token: "constant.numeric", regex: "[+-]?\\d(?:\\d|_(?=\\d))*(?:(?:\\.\\d(?:\\d|_(?=\\d))*)?(?:[eE][+-]?\\d+)?)?\\b"}, c = function () {
- var e = "abort|Array|assert|assert_equal|assert_not_equal|assert_same|assert_not_same|assert_nil|assert_not_nil|assert_match|assert_no_match|assert_in_delta|assert_throws|assert_raise|assert_nothing_raised|assert_instance_of|assert_kind_of|assert_respond_to|assert_operator|assert_send|assert_difference|assert_no_difference|assert_recognizes|assert_generates|assert_response|assert_redirected_to|assert_template|assert_select|assert_select_email|assert_select_rjs|assert_select_encoded|css_select|at_exit|attr|attr_writer|attr_reader|attr_accessor|attr_accessible|autoload|binding|block_given?|callcc|caller|catch|chomp|chomp!|chop|chop!|defined?|delete_via_redirect|eval|exec|exit|exit!|fail|Float|flunk|follow_redirect!|fork|form_for|form_tag|format|gets|global_variables|gsub|gsub!|get_via_redirect|h|host!|https?|https!|include|Integer|lambda|link_to|link_to_unless_current|link_to_function|link_to_remote|load|local_variables|loop|open|open_session|p|print|printf|proc|putc|puts|post_via_redirect|put_via_redirect|raise|rand|raw|readline|readlines|redirect?|request_via_redirect|require|scan|select|set_trace_func|sleep|split|sprintf|srand|String|stylesheet_link_tag|syscall|system|sub|sub!|test|throw|trace_var|trap|untrace_var|atan2|cos|exp|frexp|ldexp|log|log10|sin|sqrt|tan|render|javascript_include_tag|csrf_meta_tag|label_tag|text_field_tag|submit_tag|check_box_tag|content_tag|radio_button_tag|text_area_tag|password_field_tag|hidden_field_tag|fields_for|select_tag|options_for_select|options_from_collection_for_select|collection_select|time_zone_select|select_date|select_time|select_datetime|date_select|time_select|datetime_select|select_year|select_month|select_day|select_hour|select_minute|select_second|file_field_tag|file_field|respond_to|skip_before_filter|around_filter|after_filter|verify|protect_from_forgery|rescue_from|helper_method|redirect_to|before_filter|send_data|send_file|validates_presence_of|validates_uniqueness_of|validates_length_of|validates_format_of|validates_acceptance_of|validates_associated|validates_exclusion_of|validates_inclusion_of|validates_numericality_of|validates_with|validates_each|authenticate_or_request_with_http_basic|authenticate_or_request_with_http_digest|filter_parameter_logging|match|get|post|resources|redirect|scope|assert_routing|translate|localize|extract_locale_from_tld|t|l|caches_page|expire_page|caches_action|expire_action|cache|expire_fragment|expire_cache_for|observe|cache_sweeper|has_many|has_one|belongs_to|has_and_belongs_to_many", t = "alias|and|BEGIN|begin|break|case|class|def|defined|do|else|elsif|END|end|ensure|__FILE__|finally|for|gem|if|in|__LINE__|module|next|not|or|private|protected|public|redo|rescue|retry|return|super|then|undef|unless|until|when|while|yield", n = "true|TRUE|false|FALSE|nil|NIL|ARGF|ARGV|DATA|ENV|RUBY_PLATFORM|RUBY_RELEASE_DATE|RUBY_VERSION|STDERR|STDIN|STDOUT|TOPLEVEL_BINDING", r = "$DEBUG|$defout|$FILENAME|$LOAD_PATH|$SAFE|$stdin|$stdout|$stderr|$VERBOSE|$!|root_url|flash|session|cookies|params|request|response|logger|self", i = this.$keywords = this.createKeywordMapper({keyword: t, "constant.language": n, "variable.language": r, "support.function": e, "invalid.deprecated": "debugger"}, "identifier");
- this.$rules = {start: [
- {token: "comment", regex: "#.*$"},
- {token: "comment", regex: "^=begin\\s", next: "comment"},
- {token: "string.regexp", regex: "[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/]\\w*\\s*(?=[).,;]|$)"},
- o,
- u,
- a,
- {token: "text", regex: "::"},
- {token: "variable.instance", regex: "@{1,2}[a-zA-Z_\\d]+"},
- {token: "support.class", regex: "[A-Z][a-zA-Z_\\d]+"},
- s,
- f,
- l,
- {token: "constant.language.boolean", regex: "(?:true|false)\\b"},
- {token: i, regex: "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},
- {token: "punctuation.separator.key-value", regex: "=>"},
- {stateName: "heredoc", token: function (e, t, n) {
- var r = e[3] == "-" ? "heredoc" : "indentedHeredoc", i = e.split(this.splitRegex);
- return n.push(r, i[3]), [
- {type: "constant", value: "<<"},
- {type: "string", value: i[2]},
- {type: "support.class", value: i[3]},
- {type: "string", value: i[4]}
- ]
- }, regex: "(<<-?)(['\"`]?)([\\w]+)(['\"`]?)", rules: {heredoc: [
- {token: function (e, t, n) {
- return e == n[1] ? (n.shift(), n.shift(), "support.class") : "string"
- }, regex: ".*$", next: "start"}
- ], indentedHeredoc: [
- {token: "string", regex: "^ +"},
- {token: function (e, t, n) {
- return e == n[1] ? (n.shift(), n.shift(), "support.class") : "string"
- }, regex: ".*$", next: "start"}
- ]}},
- {token: "keyword.operator", regex: "!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)"},
- {token: "paren.lparen", regex: "[[({]"},
- {token: "paren.rparen", regex: "[\\])}]"},
- {token: "text", regex: "\\s+"}
- ], comment: [
- {token: "comment", regex: "^=end\\s.*$", next: "start"},
- {token: "comment", regex: ".+"}
- ]}, this.normalizeRules()
- };
- r.inherits(c, i), t.RubyHighlightRules = c
-}), ace.define("ace/mode/folding/coffee", ["require", "exports", "module", "ace/lib/oop", "ace/mode/folding/fold_mode", "ace/range"], function (e, t, n) {
- var r = e("../../lib/oop"), i = e("./fold_mode").FoldMode, s = e("../../range").Range, o = t.FoldMode = function () {
- };
- r.inherits(o, i), function () {
- this.getFoldWidgetRange = function (e, t, n) {
- var r = this.indentationBlock(e, n);
- if (r)return r;
- var i = /\S/, o = e.getLine(n), u = o.search(i);
- if (u == -1 || o[u] != "#")return;
- var a = o.length, f = e.getLength(), l = n, c = n;
- while (++n < f) {
- o = e.getLine(n);
- var h = o.search(i);
- if (h == -1)continue;
- if (o[h] != "#")break;
- c = n
- }
- if (c > l) {
- var p = e.getLine(c).length;
- return new s(l, a, c, p)
- }
- }, this.getFoldWidget = function (e, t, n) {
- var r = e.getLine(n), i = r.search(/\S/), s = e.getLine(n + 1), o = e.getLine(n - 1), u = o.search(/\S/), a = s.search(/\S/);
- if (i == -1)return e.foldWidgets[n - 1] = u != -1 && u < a ? "start" : "", "";
- if (u == -1) {
- if (i == a && r[i] == "#" && s[i] == "#")return e.foldWidgets[n - 1] = "", e.foldWidgets[n + 1] = "", "start"
- } else if (u == i && r[i] == "#" && o[i] == "#" && e.getLine(n - 2).search(/\S/) == -1)return e.foldWidgets[n - 1] = "start", e.foldWidgets[n + 1] = "", "";
- return u != -1 && u < i ? e.foldWidgets[n - 1] = "start" : e.foldWidgets[n - 1] = "", i < a ? "start" : ""
- }
- }.call(o.prototype)
-})
\ No newline at end of file
diff --git a/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/mode-haxe.js b/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/mode-haxe.js
deleted file mode 100644
index 040f1b3..0000000
--- a/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/mode-haxe.js
+++ /dev/null
@@ -1,215 +0,0 @@
-ace.define("ace/mode/haxe", ["require", "exports", "module", "ace/lib/oop", "ace/mode/text", "ace/tokenizer", "ace/mode/haxe_highlight_rules", "ace/mode/matching_brace_outdent", "ace/mode/behaviour/cstyle", "ace/mode/folding/cstyle"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("./text").Mode, s = e("../tokenizer").Tokenizer, o = e("./haxe_highlight_rules").HaxeHighlightRules, u = e("./matching_brace_outdent").MatchingBraceOutdent, a = e("./behaviour/cstyle").CstyleBehaviour, f = e("./folding/cstyle").FoldMode, l = function () {
- this.$tokenizer = new s((new o).getRules()), this.$outdent = new u, this.$behaviour = new a, this.foldingRules = new f
- };
- r.inherits(l, i), function () {
- this.getNextLineIndent = function (e, t, n) {
- var r = this.$getIndent(t), i = this.$tokenizer.getLineTokens(t, e), s = i.tokens;
- if (s.length && s[s.length - 1].type == "comment")return r;
- if (e == "start") {
- var o = t.match(/^.*[\{\(\[]\s*$/);
- o && (r += n)
- }
- return r
- }, this.checkOutdent = function (e, t, n) {
- return this.$outdent.checkOutdent(t, n)
- }, this.autoOutdent = function (e, t, n) {
- this.$outdent.autoOutdent(t, n)
- }
- }.call(l.prototype), t.Mode = l
-}), ace.define("ace/mode/haxe_highlight_rules", ["require", "exports", "module", "ace/lib/oop", "ace/mode/doc_comment_highlight_rules", "ace/mode/text_highlight_rules"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("./doc_comment_highlight_rules").DocCommentHighlightRules, s = e("./text_highlight_rules").TextHighlightRules, o = function () {
- var e = "break|case|cast|catch|class|continue|default|else|enum|extends|for|function|if|implements|import|in|inline|interface|new|override|package|private|public|return|static|super|switch|this|throw|trace|try|typedef|untyped|var|while|Array|Void|Bool|Int|UInt|Float|Dynamic|String|List|Hash|IntHash|Error|Unknown|Type|Std", t = "null|true|false", n = this.createKeywordMapper({"variable.language": "this", keyword: e, "constant.language": t}, "identifier");
- this.$rules = {start: [
- {token: "comment", regex: "\\/\\/.*$"},
- i.getStartRule("doc-start"),
- {token: "comment", regex: "\\/\\*", next: "comment"},
- {token: "string.regexp", regex: "[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/]\\w*\\s*(?=[).,;]|$)"},
- {token: "string", regex: '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},
- {token: "string", regex: "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},
- {token: "constant.numeric", regex: "0[xX][0-9a-fA-F]+\\b"},
- {token: "constant.numeric", regex: "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},
- {token: "constant.language.boolean", regex: "(?:true|false)\\b"},
- {token: n, regex: "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},
- {token: "keyword.operator", regex: "!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)"},
- {token: "punctuation.operator", regex: "\\?|\\:|\\,|\\;|\\."},
- {token: "paren.lparen", regex: "[[({<]"},
- {token: "paren.rparen", regex: "[\\])}>]"},
- {token: "text", regex: "\\s+"}
- ], comment: [
- {token: "comment", regex: ".*?\\*\\/", next: "start"},
- {token: "comment", regex: ".+"}
- ]}, this.embedRules(i, "doc-", [i.getEndRule("start")])
- };
- r.inherits(o, s), t.HaxeHighlightRules = o
-}), ace.define("ace/mode/doc_comment_highlight_rules", ["require", "exports", "module", "ace/lib/oop", "ace/mode/text_highlight_rules"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("./text_highlight_rules").TextHighlightRules, s = function () {
- this.$rules = {start: [
- {token: "comment.doc.tag", regex: "@[\\w\\d_]+"},
- {token: "comment.doc.tag", regex: "\\bTODO\\b"},
- {defaultToken: "comment.doc"}
- ]}
- };
- r.inherits(s, i), s.getStartRule = function (e) {
- return{token: "comment.doc", regex: "\\/\\*(?=\\*)", next: e}
- }, s.getEndRule = function (e) {
- return{token: "comment.doc", regex: "\\*\\/", next: e}
- }, t.DocCommentHighlightRules = s
-}), ace.define("ace/mode/matching_brace_outdent", ["require", "exports", "module", "ace/range"], function (e, t, n) {
- var r = e("../range").Range, i = function () {
- };
- (function () {
- this.checkOutdent = function (e, t) {
- return/^\s+$/.test(e) ? /^\s*\}/.test(t) : !1
- }, this.autoOutdent = function (e, t) {
- var n = e.getLine(t), i = n.match(/^(\s*\})/);
- if (!i)return 0;
- var s = i[1].length, o = e.findMatchingBracket({row: t, column: s});
- if (!o || o.row == t)return 0;
- var u = this.$getIndent(e.getLine(o.row));
- e.replace(new r(t, 0, t, s - 1), u)
- }, this.$getIndent = function (e) {
- var t = e.match(/^(\s+)/);
- return t ? t[1] : ""
- }
- }).call(i.prototype), t.MatchingBraceOutdent = i
-}), ace.define("ace/mode/behaviour/cstyle", ["require", "exports", "module", "ace/lib/oop", "ace/mode/behaviour", "ace/token_iterator", "ace/lib/lang"], function (e, t, n) {
- var r = e("../../lib/oop"), i = e("../behaviour").Behaviour, s = e("../../token_iterator").TokenIterator, o = e("../../lib/lang"), u = ["text", "paren.rparen", "punctuation.operator"], a = ["text", "paren.rparen", "punctuation.operator", "comment"], f = 0, l = -1, c = "", h = 0, p = -1, d = "", v = "", m = function () {
- m.isSaneInsertion = function (e, t) {
- var n = e.getCursorPosition(), r = new s(t, n.row, n.column);
- if (!this.$matchTokenType(r.getCurrentToken() || "text", u)) {
- var i = new s(t, n.row, n.column + 1);
- if (!this.$matchTokenType(i.getCurrentToken() || "text", u))return!1
- }
- return r.stepForward(), r.getCurrentTokenRow() !== n.row || this.$matchTokenType(r.getCurrentToken() || "text", a)
- }, m.$matchTokenType = function (e, t) {
- return t.indexOf(e.type || e) > -1
- }, m.recordAutoInsert = function (e, t, n) {
- var r = e.getCursorPosition(), i = t.doc.getLine(r.row);
- this.isAutoInsertedClosing(r, i, c[0]) || (f = 0), l = r.row, c = n + i.substr(r.column), f++
- }, m.recordMaybeInsert = function (e, t, n) {
- var r = e.getCursorPosition(), i = t.doc.getLine(r.row);
- this.isMaybeInsertedClosing(r, i) || (h = 0), p = r.row, d = i.substr(0, r.column) + n, v = i.substr(r.column), h++
- }, m.isAutoInsertedClosing = function (e, t, n) {
- return f > 0 && e.row === l && n === c[0] && t.substr(e.column) === c
- }, m.isMaybeInsertedClosing = function (e, t) {
- return h > 0 && e.row === p && t.substr(e.column) === v && t.substr(0, e.column) == d
- }, m.popAutoInsertedClosing = function () {
- c = c.substr(1), f--
- }, m.clearMaybeInsertedClosing = function () {
- h = 0, p = -1
- }, this.add("braces", "insertion", function (e, t, n, r, i) {
- var s = n.getCursorPosition(), u = r.doc.getLine(s.row);
- if (i == "{") {
- var a = n.getSelectionRange(), f = r.doc.getTextRange(a);
- if (f !== "" && f !== "{" && n.getWrapBehavioursEnabled())return{text: "{" + f + "}", selection: !1};
- if (m.isSaneInsertion(n, r))return/[\]\}\)]/.test(u[s.column]) ? (m.recordAutoInsert(n, r, "}"), {text: "{}", selection: [1, 1]}) : (m.recordMaybeInsert(n, r, "{"), {text: "{", selection: [1, 1]})
- } else if (i == "}") {
- var l = u.substring(s.column, s.column + 1);
- if (l == "}") {
- var c = r.$findOpeningBracket("}", {column: s.column + 1, row: s.row});
- if (c !== null && m.isAutoInsertedClosing(s, u, i))return m.popAutoInsertedClosing(), {text: "", selection: [1, 1]}
- }
- } else if (i == "\n" || i == "\r\n") {
- var p = "";
- m.isMaybeInsertedClosing(s, u) && (p = o.stringRepeat("}", h), m.clearMaybeInsertedClosing());
- var l = u.substring(s.column, s.column + 1);
- if (l == "}" || p !== "") {
- var d = r.findMatchingBracket({row: s.row, column: s.column}, "}");
- if (!d)return null;
- var v = this.getNextLineIndent(e, u.substring(0, s.column), r.getTabString()), g = this.$getIndent(u);
- return{text: "\n" + v + "\n" + g + p, selection: [1, v.length, 1, v.length]}
- }
- }
- }), this.add("braces", "deletion", function (e, t, n, r, i) {
- var s = r.doc.getTextRange(i);
- if (!i.isMultiLine() && s == "{") {
- var o = r.doc.getLine(i.start.row), u = o.substring(i.end.column, i.end.column + 1);
- if (u == "}")return i.end.column++, i;
- h--
- }
- }), this.add("parens", "insertion", function (e, t, n, r, i) {
- if (i == "(") {
- var s = n.getSelectionRange(), o = r.doc.getTextRange(s);
- if (o !== "" && n.getWrapBehavioursEnabled())return{text: "(" + o + ")", selection: !1};
- if (m.isSaneInsertion(n, r))return m.recordAutoInsert(n, r, ")"), {text: "()", selection: [1, 1]}
- } else if (i == ")") {
- var u = n.getCursorPosition(), a = r.doc.getLine(u.row), f = a.substring(u.column, u.column + 1);
- if (f == ")") {
- var l = r.$findOpeningBracket(")", {column: u.column + 1, row: u.row});
- if (l !== null && m.isAutoInsertedClosing(u, a, i))return m.popAutoInsertedClosing(), {text: "", selection: [1, 1]}
- }
- }
- }), this.add("parens", "deletion", function (e, t, n, r, i) {
- var s = r.doc.getTextRange(i);
- if (!i.isMultiLine() && s == "(") {
- var o = r.doc.getLine(i.start.row), u = o.substring(i.start.column + 1, i.start.column + 2);
- if (u == ")")return i.end.column++, i
- }
- }), this.add("brackets", "insertion", function (e, t, n, r, i) {
- if (i == "[") {
- var s = n.getSelectionRange(), o = r.doc.getTextRange(s);
- if (o !== "" && n.getWrapBehavioursEnabled())return{text: "[" + o + "]", selection: !1};
- if (m.isSaneInsertion(n, r))return m.recordAutoInsert(n, r, "]"), {text: "[]", selection: [1, 1]}
- } else if (i == "]") {
- var u = n.getCursorPosition(), a = r.doc.getLine(u.row), f = a.substring(u.column, u.column + 1);
- if (f == "]") {
- var l = r.$findOpeningBracket("]", {column: u.column + 1, row: u.row});
- if (l !== null && m.isAutoInsertedClosing(u, a, i))return m.popAutoInsertedClosing(), {text: "", selection: [1, 1]}
- }
- }
- }), this.add("brackets", "deletion", function (e, t, n, r, i) {
- var s = r.doc.getTextRange(i);
- if (!i.isMultiLine() && s == "[") {
- var o = r.doc.getLine(i.start.row), u = o.substring(i.start.column + 1, i.start.column + 2);
- if (u == "]")return i.end.column++, i
- }
- }), this.add("string_dquotes", "insertion", function (e, t, n, r, i) {
- if (i == '"' || i == "'") {
- var s = i, o = n.getSelectionRange(), u = r.doc.getTextRange(o);
- if (u !== "" && u !== "'" && u != '"' && n.getWrapBehavioursEnabled())return{text: s + u + s, selection: !1};
- var a = n.getCursorPosition(), f = r.doc.getLine(a.row), l = f.substring(a.column - 1, a.column);
- if (l == "\\")return null;
- var c = r.getTokens(o.start.row), h = 0, p, d = -1;
- for (var v = 0; v < c.length; v++) {
- p = c[v], p.type == "string" ? d = -1 : d < 0 && (d = p.value.indexOf(s));
- if (p.value.length + h > o.start.column)break;
- h += c[v].value.length
- }
- if (!p || d < 0 && p.type !== "comment" && (p.type !== "string" || o.start.column !== p.value.length + h - 1 && p.value.lastIndexOf(s) === p.value.length - 1)) {
- if (!m.isSaneInsertion(n, r))return;
- return{text: s + s, selection: [1, 1]}
- }
- if (p && p.type === "string") {
- var g = f.substring(a.column, a.column + 1);
- if (g == s)return{text: "", selection: [1, 1]}
- }
- }
- }), this.add("string_dquotes", "deletion", function (e, t, n, r, i) {
- var s = r.doc.getTextRange(i);
- if (!i.isMultiLine() && (s == '"' || s == "'")) {
- var o = r.doc.getLine(i.start.row), u = o.substring(i.start.column + 1, i.start.column + 2);
- if (u == s)return i.end.column++, i
- }
- })
- };
- r.inherits(m, i), t.CstyleBehaviour = m
-}), ace.define("ace/mode/folding/cstyle", ["require", "exports", "module", "ace/lib/oop", "ace/range", "ace/mode/folding/fold_mode"], function (e, t, n) {
- var r = e("../../lib/oop"), i = e("../../range").Range, s = e("./fold_mode").FoldMode, o = t.FoldMode = function () {
- };
- r.inherits(o, s), function () {
- this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/, this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/, this.getFoldWidgetRange = function (e, t, n) {
- var r = e.getLine(n), i = r.match(this.foldingStartMarker);
- if (i) {
- var s = i.index;
- return i[1] ? this.openingBracketBlock(e, i[1], n, s) : e.getCommentFoldRange(n, s + i[0].length, 1)
- }
- if (t !== "markbeginend")return;
- var i = r.match(this.foldingStopMarker);
- if (i) {
- var s = i.index + i[0].length;
- return i[1] ? this.closingBracketBlock(e, i[1], n, s) : e.getCommentFoldRange(n, s, -1)
- }
- }
- }.call(o.prototype)
-})
\ No newline at end of file
diff --git a/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/mode-html.js b/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/mode-html.js
deleted file mode 100644
index a0ab8f9..0000000
--- a/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/mode-html.js
+++ /dev/null
@@ -1,610 +0,0 @@
-ace.define("ace/mode/html", ["require", "exports", "module", "ace/lib/oop", "ace/mode/text", "ace/mode/javascript", "ace/mode/css", "ace/tokenizer", "ace/mode/html_highlight_rules", "ace/mode/behaviour/html", "ace/mode/folding/html"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("./text").Mode, s = e("./javascript").Mode, o = e("./css").Mode, u = e("../tokenizer").Tokenizer, a = e("./html_highlight_rules").HtmlHighlightRules, f = e("./behaviour/html").HtmlBehaviour, l = e("./folding/html").FoldMode, c = function () {
- var e = new a;
- this.$tokenizer = new u(e.getRules()), this.$behaviour = new f, this.$embeds = e.getEmbeds(), this.createModeDelegates({"js-": s, "css-": o}), this.foldingRules = new l
- };
- r.inherits(c, i), function () {
- this.toggleCommentLines = function (e, t, n, r) {
- return 0
- }, this.getNextLineIndent = function (e, t, n) {
- return this.$getIndent(t)
- }, this.checkOutdent = function (e, t, n) {
- return!1
- }
- }.call(c.prototype), t.Mode = c
-}), ace.define("ace/mode/javascript", ["require", "exports", "module", "ace/lib/oop", "ace/mode/text", "ace/tokenizer", "ace/mode/javascript_highlight_rules", "ace/mode/matching_brace_outdent", "ace/range", "ace/worker/worker_client", "ace/mode/behaviour/cstyle", "ace/mode/folding/cstyle"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("./text").Mode, s = e("../tokenizer").Tokenizer, o = e("./javascript_highlight_rules").JavaScriptHighlightRules, u = e("./matching_brace_outdent").MatchingBraceOutdent, a = e("../range").Range, f = e("../worker/worker_client").WorkerClient, l = e("./behaviour/cstyle").CstyleBehaviour, c = e("./folding/cstyle").FoldMode, h = function () {
- this.$tokenizer = new s((new o).getRules()), this.$outdent = new u, this.$behaviour = new l, this.foldingRules = new c
- };
- r.inherits(h, i), function () {
- this.toggleCommentLines = function (e, t, n, r) {
- var i = !0, s = /^(\s*)\/\//;
- for (var o = n; o <= r; o++)if (!s.test(t.getLine(o))) {
- i = !1;
- break
- }
- if (i) {
- var u = new a(0, 0, 0, 0);
- for (var o = n; o <= r; o++) {
- var f = t.getLine(o), l = f.match(s);
- u.start.row = o, u.end.row = o, u.end.column = l[0].length, t.replace(u, l[1])
- }
- } else t.indentRows(n, r, "//")
- }, this.getNextLineIndent = function (e, t, n) {
- var r = this.$getIndent(t), i = this.$tokenizer.getLineTokens(t, e), s = i.tokens, o = i.state;
- if (s.length && s[s.length - 1].type == "comment")return r;
- if (e == "start" || e == "regex_allowed") {
- var u = t.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/);
- u && (r += n)
- } else if (e == "doc-start") {
- if (o == "start" || e == "regex_allowed")return"";
- var u = t.match(/^\s*(\/?)\*/);
- u && (u[1] && (r += " "), r += "* ")
- }
- return r
- }, this.checkOutdent = function (e, t, n) {
- return this.$outdent.checkOutdent(t, n)
- }, this.autoOutdent = function (e, t, n) {
- this.$outdent.autoOutdent(t, n)
- }, this.createWorker = function (e) {
- var t = new f(["ace"], "ace/mode/javascript_worker", "JavaScriptWorker");
- return t.attachToDocument(e.getDocument()), t.on("jslint", function (t) {
- e.setAnnotations(t.data)
- }), t.on("terminate", function () {
- e.clearAnnotations()
- }), t
- }
- }.call(h.prototype), t.Mode = h
-}), ace.define("ace/mode/javascript_highlight_rules", ["require", "exports", "module", "ace/lib/oop", "ace/mode/doc_comment_highlight_rules", "ace/mode/text_highlight_rules"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("./doc_comment_highlight_rules").DocCommentHighlightRules, s = e("./text_highlight_rules").TextHighlightRules, o = function () {
- var e = this.createKeywordMapper({"variable.language": "Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document", keyword: "const|yield|import|get|set|break|case|catch|continue|default|delete|do|else|finally|for|function|if|in|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|__parent__|__count__|escape|unescape|with|__proto__|class|enum|extends|super|export|implements|private|public|interface|package|protected|static", "storage.type": "const|let|var|function", "constant.language": "null|Infinity|NaN|undefined", "support.function": "alert", "constant.language.boolean": "true|false"}, "identifier"), t = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void", n = "[a-zA-Z\\$_¡-￿][a-zA-Z\\d\\$_¡-￿]*\\b", r = "\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|[0-2][0-7]{0,2}|3[0-6][0-7]?|37[0-7]?|[4-7][0-7]?|.)";
- this.$rules = {start: [
- {token: "comment", regex: /\/\/.*$/},
- i.getStartRule("doc-start"),
- {token: "comment", regex: /\/\*/, next: "comment"},
- {token: "string", regex: "'(?=.)", next: "qstring"},
- {token: "string", regex: '"(?=.)', next: "qqstring"},
- {token: "constant.numeric", regex: /0[xX][0-9a-fA-F]+\b/},
- {token: "constant.numeric", regex: /[+-]?\d+(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?\b/},
- {token: ["storage.type", "punctuation.operator", "support.function", "punctuation.operator", "entity.name.function", "text", "keyword.operator"], regex: "(" + n + ")(\\.)(prototype)(\\.)(" + n + ")(\\s*)(=)", next: "function_arguments"},
- {token: ["storage.type", "punctuation.operator", "entity.name.function", "text", "keyword.operator", "text", "storage.type", "text", "paren.lparen"], regex: "(" + n + ")(\\.)(" + n + ")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", next: "function_arguments"},
- {token: ["entity.name.function", "text", "keyword.operator", "text", "storage.type", "text", "paren.lparen"], regex: "(" + n + ")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", next: "function_arguments"},
- {token: ["storage.type", "punctuation.operator", "entity.name.function", "text", "keyword.operator", "text", "storage.type", "text", "entity.name.function", "text", "paren.lparen"], regex: "(" + n + ")(\\.)(" + n + ")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()", next: "function_arguments"},
- {token: ["storage.type", "text", "entity.name.function", "text", "paren.lparen"], regex: "(function)(\\s+)(" + n + ")(\\s*)(\\()", next: "function_arguments"},
- {token: ["entity.name.function", "text", "punctuation.operator", "text", "storage.type", "text", "paren.lparen"], regex: "(" + n + ")(\\s*)(:)(\\s*)(function)(\\s*)(\\()", next: "function_arguments"},
- {token: ["text", "text", "storage.type", "text", "paren.lparen"], regex: "(:)(\\s*)(function)(\\s*)(\\()", next: "function_arguments"},
- {token: "keyword", regex: "(?:" + t + ")\\b", next: "regex_allowed"},
- {token: ["punctuation.operator", "support.function"], regex: /(\.)(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:opzzzz|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/},
- {token: ["punctuation.operator", "support.function.dom"], regex: /(\.)(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/},
- {token: ["punctuation.operator", "support.constant"], regex: /(\.)(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/},
- {token: ["storage.type", "punctuation.operator", "support.function.firebug"], regex: /(console)(\.)(warn|info|log|error|time|timeEnd|assert)\b/},
- {token: e, regex: n},
- {token: "keyword.operator", regex: /--|\+\+|[!$%&*+\-~]|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|\*=|%=|\+=|\-=|&=|\^=/, next: "regex_allowed"},
- {token: "punctuation.operator", regex: /\?|\:|\,|\;|\./, next: "regex_allowed"},
- {token: "paren.lparen", regex: /[\[({]/, next: "regex_allowed"},
- {token: "paren.rparen", regex: /[\])}]/},
- {token: "keyword.operator", regex: /\/=?/, next: "regex_allowed"},
- {token: "comment", regex: /^#!.*$/}
- ], regex_allowed: [i.getStartRule("doc-start"), {token: "comment", regex: "\\/\\*", next: "comment_regex_allowed"}, {token: "comment", regex: "\\/\\/.*$"}, {token: "string.regexp", regex: "\\/", next: "regex"}, {token: "text", regex: "\\s+"}, {token: "empty", regex: "", next: "start"}], regex: [
- {token: "regexp.keyword.operator", regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},
- {token: "string.regexp", regex: "/\\w*", next: "start"},
- {token: "invalid", regex: /\{\d+,?(?:\d+)?}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/},
- {token: "constant.language.escape", regex: /\(\?[:=!]|\)|{\d+,?(?:\d+)?}|{,\d+}|[+*]\?|[()$^+*?]/},
- {token: "constant.language.delimiter", regex: /\|/},
- {token: "constant.language.escape", regex: /\[\^?/, next: "regex_character_class"},
- {token: "empty", regex: "$", next: "start"},
- {defaultToken: "string.regexp"}
- ], regex_character_class: [
- {token: "regexp.keyword.operator", regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},
- {token: "constant.language.escape", regex: "]", next: "regex"},
- {token: "constant.language.escape", regex: "-"},
- {token: "empty", regex: "$", next: "start"},
- {defaultToken: "string.regexp.charachterclass"}
- ], function_arguments: [
- {token: "variable.parameter", regex: n},
- {token: "punctuation.operator", regex: "[, ]+"},
- {token: "punctuation.operator", regex: "$"},
- {token: "empty", regex: "", next: "start"}
- ], comment_regex_allowed: [
- {token: "comment", regex: "\\*\\/", next: "regex_allowed"},
- {defaultToken: "comment"}
- ], comment: [
- {token: "comment", regex: "\\*\\/", next: "start"},
- {defaultToken: "comment"}
- ], qqstring: [
- {token: "constant.language.escape", regex: r},
- {token: "string", regex: "\\\\$", next: "qqstring"},
- {token: "string", regex: '"|$', next: "start"},
- {defaultToken: "string"}
- ], qstring: [
- {token: "constant.language.escape", regex: r},
- {token: "string", regex: "\\\\$", next: "qstring"},
- {token: "string", regex: "'|$", next: "start"},
- {defaultToken: "string"}
- ]}, this.embedRules(i, "doc-", [i.getEndRule("start")])
- };
- r.inherits(o, s), t.JavaScriptHighlightRules = o
-}), ace.define("ace/mode/doc_comment_highlight_rules", ["require", "exports", "module", "ace/lib/oop", "ace/mode/text_highlight_rules"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("./text_highlight_rules").TextHighlightRules, s = function () {
- this.$rules = {start: [
- {token: "comment.doc.tag", regex: "@[\\w\\d_]+"},
- {token: "comment.doc.tag", regex: "\\bTODO\\b"},
- {defaultToken: "comment.doc"}
- ]}
- };
- r.inherits(s, i), s.getStartRule = function (e) {
- return{token: "comment.doc", regex: "\\/\\*(?=\\*)", next: e}
- }, s.getEndRule = function (e) {
- return{token: "comment.doc", regex: "\\*\\/", next: e}
- }, t.DocCommentHighlightRules = s
-}), ace.define("ace/mode/matching_brace_outdent", ["require", "exports", "module", "ace/range"], function (e, t, n) {
- var r = e("../range").Range, i = function () {
- };
- (function () {
- this.checkOutdent = function (e, t) {
- return/^\s+$/.test(e) ? /^\s*\}/.test(t) : !1
- }, this.autoOutdent = function (e, t) {
- var n = e.getLine(t), i = n.match(/^(\s*\})/);
- if (!i)return 0;
- var s = i[1].length, o = e.findMatchingBracket({row: t, column: s});
- if (!o || o.row == t)return 0;
- var u = this.$getIndent(e.getLine(o.row));
- e.replace(new r(t, 0, t, s - 1), u)
- }, this.$getIndent = function (e) {
- var t = e.match(/^(\s+)/);
- return t ? t[1] : ""
- }
- }).call(i.prototype), t.MatchingBraceOutdent = i
-}), ace.define("ace/mode/behaviour/cstyle", ["require", "exports", "module", "ace/lib/oop", "ace/mode/behaviour", "ace/token_iterator", "ace/lib/lang"], function (e, t, n) {
- var r = e("../../lib/oop"), i = e("../behaviour").Behaviour, s = e("../../token_iterator").TokenIterator, o = e("../../lib/lang"), u = ["text", "paren.rparen", "punctuation.operator"], a = ["text", "paren.rparen", "punctuation.operator", "comment"], f = 0, l = -1, c = "", h = 0, p = -1, d = "", v = "", m = function () {
- m.isSaneInsertion = function (e, t) {
- var n = e.getCursorPosition(), r = new s(t, n.row, n.column);
- if (!this.$matchTokenType(r.getCurrentToken() || "text", u)) {
- var i = new s(t, n.row, n.column + 1);
- if (!this.$matchTokenType(i.getCurrentToken() || "text", u))return!1
- }
- return r.stepForward(), r.getCurrentTokenRow() !== n.row || this.$matchTokenType(r.getCurrentToken() || "text", a)
- }, m.$matchTokenType = function (e, t) {
- return t.indexOf(e.type || e) > -1
- }, m.recordAutoInsert = function (e, t, n) {
- var r = e.getCursorPosition(), i = t.doc.getLine(r.row);
- this.isAutoInsertedClosing(r, i, c[0]) || (f = 0), l = r.row, c = n + i.substr(r.column), f++
- }, m.recordMaybeInsert = function (e, t, n) {
- var r = e.getCursorPosition(), i = t.doc.getLine(r.row);
- this.isMaybeInsertedClosing(r, i) || (h = 0), p = r.row, d = i.substr(0, r.column) + n, v = i.substr(r.column), h++
- }, m.isAutoInsertedClosing = function (e, t, n) {
- return f > 0 && e.row === l && n === c[0] && t.substr(e.column) === c
- }, m.isMaybeInsertedClosing = function (e, t) {
- return h > 0 && e.row === p && t.substr(e.column) === v && t.substr(0, e.column) == d
- }, m.popAutoInsertedClosing = function () {
- c = c.substr(1), f--
- }, m.clearMaybeInsertedClosing = function () {
- h = 0, p = -1
- }, this.add("braces", "insertion", function (e, t, n, r, i) {
- var s = n.getCursorPosition(), u = r.doc.getLine(s.row);
- if (i == "{") {
- var a = n.getSelectionRange(), f = r.doc.getTextRange(a);
- if (f !== "" && f !== "{" && n.getWrapBehavioursEnabled())return{text: "{" + f + "}", selection: !1};
- if (m.isSaneInsertion(n, r))return/[\]\}\)]/.test(u[s.column]) ? (m.recordAutoInsert(n, r, "}"), {text: "{}", selection: [1, 1]}) : (m.recordMaybeInsert(n, r, "{"), {text: "{", selection: [1, 1]})
- } else if (i == "}") {
- var l = u.substring(s.column, s.column + 1);
- if (l == "}") {
- var c = r.$findOpeningBracket("}", {column: s.column + 1, row: s.row});
- if (c !== null && m.isAutoInsertedClosing(s, u, i))return m.popAutoInsertedClosing(), {text: "", selection: [1, 1]}
- }
- } else if (i == "\n" || i == "\r\n") {
- var p = "";
- m.isMaybeInsertedClosing(s, u) && (p = o.stringRepeat("}", h), m.clearMaybeInsertedClosing());
- var l = u.substring(s.column, s.column + 1);
- if (l == "}" || p !== "") {
- var d = r.findMatchingBracket({row: s.row, column: s.column}, "}");
- if (!d)return null;
- var v = this.getNextLineIndent(e, u.substring(0, s.column), r.getTabString()), g = this.$getIndent(u);
- return{text: "\n" + v + "\n" + g + p, selection: [1, v.length, 1, v.length]}
- }
- }
- }), this.add("braces", "deletion", function (e, t, n, r, i) {
- var s = r.doc.getTextRange(i);
- if (!i.isMultiLine() && s == "{") {
- var o = r.doc.getLine(i.start.row), u = o.substring(i.end.column, i.end.column + 1);
- if (u == "}")return i.end.column++, i;
- h--
- }
- }), this.add("parens", "insertion", function (e, t, n, r, i) {
- if (i == "(") {
- var s = n.getSelectionRange(), o = r.doc.getTextRange(s);
- if (o !== "" && n.getWrapBehavioursEnabled())return{text: "(" + o + ")", selection: !1};
- if (m.isSaneInsertion(n, r))return m.recordAutoInsert(n, r, ")"), {text: "()", selection: [1, 1]}
- } else if (i == ")") {
- var u = n.getCursorPosition(), a = r.doc.getLine(u.row), f = a.substring(u.column, u.column + 1);
- if (f == ")") {
- var l = r.$findOpeningBracket(")", {column: u.column + 1, row: u.row});
- if (l !== null && m.isAutoInsertedClosing(u, a, i))return m.popAutoInsertedClosing(), {text: "", selection: [1, 1]}
- }
- }
- }), this.add("parens", "deletion", function (e, t, n, r, i) {
- var s = r.doc.getTextRange(i);
- if (!i.isMultiLine() && s == "(") {
- var o = r.doc.getLine(i.start.row), u = o.substring(i.start.column + 1, i.start.column + 2);
- if (u == ")")return i.end.column++, i
- }
- }), this.add("brackets", "insertion", function (e, t, n, r, i) {
- if (i == "[") {
- var s = n.getSelectionRange(), o = r.doc.getTextRange(s);
- if (o !== "" && n.getWrapBehavioursEnabled())return{text: "[" + o + "]", selection: !1};
- if (m.isSaneInsertion(n, r))return m.recordAutoInsert(n, r, "]"), {text: "[]", selection: [1, 1]}
- } else if (i == "]") {
- var u = n.getCursorPosition(), a = r.doc.getLine(u.row), f = a.substring(u.column, u.column + 1);
- if (f == "]") {
- var l = r.$findOpeningBracket("]", {column: u.column + 1, row: u.row});
- if (l !== null && m.isAutoInsertedClosing(u, a, i))return m.popAutoInsertedClosing(), {text: "", selection: [1, 1]}
- }
- }
- }), this.add("brackets", "deletion", function (e, t, n, r, i) {
- var s = r.doc.getTextRange(i);
- if (!i.isMultiLine() && s == "[") {
- var o = r.doc.getLine(i.start.row), u = o.substring(i.start.column + 1, i.start.column + 2);
- if (u == "]")return i.end.column++, i
- }
- }), this.add("string_dquotes", "insertion", function (e, t, n, r, i) {
- if (i == '"' || i == "'") {
- var s = i, o = n.getSelectionRange(), u = r.doc.getTextRange(o);
- if (u !== "" && u !== "'" && u != '"' && n.getWrapBehavioursEnabled())return{text: s + u + s, selection: !1};
- var a = n.getCursorPosition(), f = r.doc.getLine(a.row), l = f.substring(a.column - 1, a.column);
- if (l == "\\")return null;
- var c = r.getTokens(o.start.row), h = 0, p, d = -1;
- for (var v = 0; v < c.length; v++) {
- p = c[v], p.type == "string" ? d = -1 : d < 0 && (d = p.value.indexOf(s));
- if (p.value.length + h > o.start.column)break;
- h += c[v].value.length
- }
- if (!p || d < 0 && p.type !== "comment" && (p.type !== "string" || o.start.column !== p.value.length + h - 1 && p.value.lastIndexOf(s) === p.value.length - 1)) {
- if (!m.isSaneInsertion(n, r))return;
- return{text: s + s, selection: [1, 1]}
- }
- if (p && p.type === "string") {
- var g = f.substring(a.column, a.column + 1);
- if (g == s)return{text: "", selection: [1, 1]}
- }
- }
- }), this.add("string_dquotes", "deletion", function (e, t, n, r, i) {
- var s = r.doc.getTextRange(i);
- if (!i.isMultiLine() && (s == '"' || s == "'")) {
- var o = r.doc.getLine(i.start.row), u = o.substring(i.start.column + 1, i.start.column + 2);
- if (u == s)return i.end.column++, i
- }
- })
- };
- r.inherits(m, i), t.CstyleBehaviour = m
-}), ace.define("ace/mode/folding/cstyle", ["require", "exports", "module", "ace/lib/oop", "ace/range", "ace/mode/folding/fold_mode"], function (e, t, n) {
- var r = e("../../lib/oop"), i = e("../../range").Range, s = e("./fold_mode").FoldMode, o = t.FoldMode = function () {
- };
- r.inherits(o, s), function () {
- this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/, this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/, this.getFoldWidgetRange = function (e, t, n) {
- var r = e.getLine(n), i = r.match(this.foldingStartMarker);
- if (i) {
- var s = i.index;
- return i[1] ? this.openingBracketBlock(e, i[1], n, s) : e.getCommentFoldRange(n, s + i[0].length, 1)
- }
- if (t !== "markbeginend")return;
- var i = r.match(this.foldingStopMarker);
- if (i) {
- var s = i.index + i[0].length;
- return i[1] ? this.closingBracketBlock(e, i[1], n, s) : e.getCommentFoldRange(n, s, -1)
- }
- }
- }.call(o.prototype)
-}), ace.define("ace/mode/css", ["require", "exports", "module", "ace/lib/oop", "ace/mode/text", "ace/tokenizer", "ace/mode/css_highlight_rules", "ace/mode/matching_brace_outdent", "ace/worker/worker_client", "ace/mode/behaviour/css", "ace/mode/folding/cstyle"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("./text").Mode, s = e("../tokenizer").Tokenizer, o = e("./css_highlight_rules").CssHighlightRules, u = e("./matching_brace_outdent").MatchingBraceOutdent, a = e("../worker/worker_client").WorkerClient, f = e("./behaviour/css").CssBehaviour, l = e("./folding/cstyle").FoldMode, c = function () {
- this.$tokenizer = new s((new o).getRules(), "i"), this.$outdent = new u, this.$behaviour = new f, this.foldingRules = new l
- };
- r.inherits(c, i), function () {
- this.foldingRules = "cStyle", this.getNextLineIndent = function (e, t, n) {
- var r = this.$getIndent(t), i = this.$tokenizer.getLineTokens(t, e).tokens;
- if (i.length && i[i.length - 1].type == "comment")return r;
- var s = t.match(/^.*\{\s*$/);
- return s && (r += n), r
- }, this.checkOutdent = function (e, t, n) {
- return this.$outdent.checkOutdent(t, n)
- }, this.autoOutdent = function (e, t, n) {
- this.$outdent.autoOutdent(t, n)
- }, this.createWorker = function (e) {
- var t = new a(["ace"], "ace/mode/css_worker", "Worker");
- return t.attachToDocument(e.getDocument()), t.on("csslint", function (t) {
- e.setAnnotations(t.data)
- }), t.on("terminate", function () {
- e.clearAnnotations()
- }), t
- }
- }.call(c.prototype), t.Mode = c
-}), ace.define("ace/mode/css_highlight_rules", ["require", "exports", "module", "ace/lib/oop", "ace/lib/lang", "ace/mode/text_highlight_rules"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("../lib/lang"), s = e("./text_highlight_rules").TextHighlightRules, o = t.supportType = "animation-fill-mode|alignment-adjust|alignment-baseline|animation-delay|animation-direction|animation-duration|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|animation|appearance|azimuth|backface-visibility|background-attachment|background-break|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|background|baseline-shift|binding|bleed|bookmark-label|bookmark-level|bookmark-state|bookmark-target|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|border|bottom|box-align|box-decoration-break|box-direction|box-flex-group|box-flex|box-lines|box-ordinal-group|box-orient|box-pack|box-shadow|box-sizing|break-after|break-before|break-inside|caption-side|clear|clip|color-profile|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|crop|cue-after|cue-before|cue|cursor|direction|display|dominant-baseline|drop-initial-after-adjust|drop-initial-after-align|drop-initial-before-adjust|drop-initial-before-align|drop-initial-size|drop-initial-value|elevation|empty-cells|fit|fit-position|float-offset|float|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|font|grid-columns|grid-rows|hanging-punctuation|height|hyphenate-after|hyphenate-before|hyphenate-character|hyphenate-lines|hyphenate-resource|hyphens|icon|image-orientation|image-rendering|image-resolution|inline-box-align|left|letter-spacing|line-height|line-stacking-ruby|line-stacking-shift|line-stacking-strategy|line-stacking|list-style-image|list-style-position|list-style-type|list-style|margin-bottom|margin-left|margin-right|margin-top|margin|mark-after|mark-before|mark|marks|marquee-direction|marquee-play-count|marquee-speed|marquee-style|max-height|max-width|min-height|min-width|move-to|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|orphans|outline-color|outline-offset|outline-style|outline-width|outline|overflow-style|overflow-x|overflow-y|overflow|padding-bottom|padding-left|padding-right|padding-top|padding|page-break-after|page-break-before|page-break-inside|page-policy|page|pause-after|pause-before|pause|perspective-origin|perspective|phonemes|pitch-range|pitch|play-during|position|presentation-level|punctuation-trim|quotes|rendering-intent|resize|rest-after|rest-before|rest|richness|right|rotation-point|rotation|ruby-align|ruby-overhang|ruby-position|ruby-span|size|speak-header|speak-numeral|speak-punctuation|speak|speech-rate|stress|string-set|table-layout|target-name|target-new|target-position|target|text-align-last|text-align|text-decoration|text-emphasis|text-height|text-indent|text-justify|text-outline|text-shadow|text-transform|text-wrap|top|transform-origin|transform-style|transform|transition-delay|transition-duration|transition-property|transition-timing-function|transition|unicode-bidi|vertical-align|visibility|voice-balance|voice-duration|voice-family|voice-pitch-range|voice-pitch|voice-rate|voice-stress|voice-volume|volume|white-space-collapse|white-space|widows|width|word-break|word-spacing|word-wrap|z-index", u = t.supportFunction = "rgb|rgba|url|attr|counter|counters", a = t.supportConstant = "absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero", f = t.supportConstantColor = "aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow", l = t.supportConstantFonts = "arial|century|comic|courier|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace", c = t.numRe = "\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))", h = t.pseudoElements = "(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b", p = t.pseudoClasses = "(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b", d = function () {
- var e = this.createKeywordMapper({"support.function": u, "support.constant": a, "support.type": o, "support.constant.color": f, "support.constant.fonts": l}, "text", !0), t = [
- {token: "comment", regex: "\\/\\*", next: "ruleset_comment"},
- {token: "string", regex: '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},
- {token: "string", regex: "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},
- {token: ["constant.numeric", "keyword"], regex: "(" + c + ")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vm|vw|%)"},
- {token: "constant.numeric", regex: c},
- {token: "constant.numeric", regex: "#[a-f0-9]{6}"},
- {token: "constant.numeric", regex: "#[a-f0-9]{3}"},
- {token: ["punctuation", "entity.other.attribute-name.pseudo-element.css"], regex: h},
- {token: ["punctuation", "entity.other.attribute-name.pseudo-class.css"], regex: p},
- {token: e, regex: "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"}
- ], n = i.copyArray(t);
- n.unshift({token: "paren.rparen", regex: "\\}", next: "start"});
- var r = i.copyArray(t);
- r.unshift({token: "paren.rparen", regex: "\\}", next: "media"});
- var s = [
- {token: "comment", regex: ".+"}
- ], d = i.copyArray(s);
- d.unshift({token: "comment", regex: ".*?\\*\\/", next: "start"});
- var v = i.copyArray(s);
- v.unshift({token: "comment", regex: ".*?\\*\\/", next: "media"});
- var m = i.copyArray(s);
- m.unshift({token: "comment", regex: ".*?\\*\\/", next: "ruleset"}), this.$rules = {start: [
- {token: "comment", regex: "\\/\\*", next: "comment"},
- {token: "paren.lparen", regex: "\\{", next: "ruleset"},
- {token: "string", regex: "@.*?{", next: "media"},
- {token: "keyword", regex: "#[a-z0-9-_]+"},
- {token: "variable", regex: "\\.[a-z0-9-_]+"},
- {token: "string", regex: ":[a-z0-9-_]+"},
- {token: "constant", regex: "[a-z0-9-_]+"}
- ], media: [
- {token: "comment", regex: "\\/\\*", next: "media_comment"},
- {token: "paren.lparen", regex: "\\{", next: "media_ruleset"},
- {token: "string", regex: "\\}", next: "start"},
- {token: "keyword", regex: "#[a-z0-9-_]+"},
- {token: "variable", regex: "\\.[a-z0-9-_]+"},
- {token: "string", regex: ":[a-z0-9-_]+"},
- {token: "constant", regex: "[a-z0-9-_]+"}
- ], comment: d, ruleset: n, ruleset_comment: m, media_ruleset: r, media_comment: v}
- };
- r.inherits(d, s), t.CssHighlightRules = d
-}), ace.define("ace/mode/behaviour/css", ["require", "exports", "module", "ace/lib/oop", "ace/mode/behaviour", "ace/mode/behaviour/cstyle", "ace/token_iterator"], function (e, t, n) {
- var r = e("../../lib/oop"), i = e("../behaviour").Behaviour, s = e("./cstyle").CstyleBehaviour, o = e("../../token_iterator").TokenIterator, u = function () {
- this.inherit(s), this.add("colon", "insertion", function (e, t, n, r, i) {
- if (i === ":") {
- var s = n.getCursorPosition(), u = new o(r, s.row, s.column), a = u.getCurrentToken();
- a && a.value.match(/\s+/) && (a = u.stepBackward());
- if (a && a.type === "support.type") {
- var f = r.doc.getLine(s.row), l = f.substring(s.column, s.column + 1);
- if (l === ":")return{text: "", selection: [1, 1]};
- if (!f.substring(s.column).match(/^\s*;/))return{text: ":;", selection: [1, 1]}
- }
- }
- }), this.add("colon", "deletion", function (e, t, n, r, i) {
- var s = r.doc.getTextRange(i);
- if (!i.isMultiLine() && s === ":") {
- var o = r.doc.getLine(i.start.row), u = o.substring(i.end.column, i.end.column + 1);
- if (u === ";")return i.end.column++, i
- }
- }), this.add("semicolon", "insertion", function (e, t, n, r, i) {
- if (i === ";") {
- var s = n.getCursorPosition(), o = r.doc.getLine(s.row), u = o.substring(s.column, s.column + 1);
- if (u === ";")return{text: "", selection: [1, 1]}
- }
- })
- };
- r.inherits(u, s), t.CssBehaviour = u
-}), ace.define("ace/mode/html_highlight_rules", ["require", "exports", "module", "ace/lib/oop", "ace/lib/lang", "ace/mode/css_highlight_rules", "ace/mode/javascript_highlight_rules", "ace/mode/xml_util", "ace/mode/text_highlight_rules"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("../lib/lang"), s = e("./css_highlight_rules").CssHighlightRules, o = e("./javascript_highlight_rules").JavaScriptHighlightRules, u = e("./xml_util"), a = e("./text_highlight_rules").TextHighlightRules, f = i.createMap({a: "anchor", button: "form", form: "form", img: "image", input: "form", label: "form", script: "script", select: "form", textarea: "form", style: "style", table: "table", tbody: "table", td: "table", tfoot: "table", th: "table", tr: "table"}), l = function () {
- this.$rules = {start: [
- {token: "text", regex: "<\\!\\[CDATA\\[", next: "cdata"},
- {token: "xml-pe", regex: "<\\?.*?\\?>"},
- {token: "comment", regex: "<\\!--", next: "comment"},
- {token: "xml-pe", regex: "<\\!.*?>"},
- {token: "meta.tag", regex: "<(?=script\\b)", next: "script"},
- {token: "meta.tag", regex: "<(?=style\\b)", next: "style"},
- {token: "meta.tag", regex: "<\\/?", next: "tag"},
- {token: "text", regex: "\\s+"},
- {token: "constant.character.entity", regex: "(?:[0-9]+;)|(?:[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}
- ], cdata: [
- {token: "text", regex: "\\]\\]>", next: "start"}
- ], comment: [
- {token: "comment", regex: ".*?-->", next: "start"},
- {defaultToken: "comment"}
- ]}, u.tag(this.$rules, "tag", "start", f), u.tag(this.$rules, "style", "css-start", f), u.tag(this.$rules, "script", "js-start", f), this.embedRules(o, "js-", [
- {token: "comment", regex: "\\/\\/.*(?=<\\/script>)", next: "tag"},
- {token: "meta.tag", regex: "<\\/(?=script)", next: "tag"}
- ]), this.embedRules(s, "css-", [
- {token: "meta.tag", regex: "<\\/(?=style)", next: "tag"}
- ])
- };
- r.inherits(l, a), t.HtmlHighlightRules = l
-}), ace.define("ace/mode/xml_util", ["require", "exports", "module"], function (e, t, n) {
- function r(e) {
- return[
- {token: "string", regex: '"', next: e + "_qqstring"},
- {token: "string", regex: "'", next: e + "_qstring"}
- ]
- }
-
- function i(e, t) {
- return[
- {token: "string", regex: e, next: t},
- {token: "constant.language.escape", regex: "(?:[0-9]+;)|(?:[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"},
- {defaultToken: "string"}
- ]
- }
-
- t.tag = function (e, t, n, s) {
- e[t] = [
- {token: "text", regex: "\\s+"},
- {token: s ? function (e) {
- return s[e] ? "meta.tag.tag-name." + s[e] : "meta.tag.tag-name"
- } : "meta.tag.tag-name", regex: "[-_a-zA-Z0-9:]+", next: t + "_embed_attribute_list"},
- {token: "empty", regex: "", next: t + "_embed_attribute_list"}
- ], e[t + "_qstring"] = i("'", t + "_embed_attribute_list"), e[t + "_qqstring"] = i('"', t + "_embed_attribute_list"), e[t + "_embed_attribute_list"] = [
- {token: "meta.tag.r", regex: "/?>", next: n},
- {token: "keyword.operator", regex: "="},
- {token: "entity.other.attribute-name", regex: "[-_a-zA-Z0-9:]+"},
- {token: "constant.numeric", regex: "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},
- {token: "text", regex: "\\s+"}
- ].concat(r(t))
- }
-}), ace.define("ace/mode/behaviour/html", ["require", "exports", "module", "ace/lib/oop", "ace/mode/behaviour/xml", "ace/mode/behaviour/cstyle", "ace/token_iterator"], function (e, t, n) {
- function a(e, t) {
- var n = !0, r = e.type.split("."), i = t.split(".");
- return i.forEach(function (e) {
- if (r.indexOf(e) == -1)return n = !1, !1
- }), n
- }
-
- var r = e("../../lib/oop"), i = e("../behaviour/xml").XmlBehaviour, s = e("./cstyle").CstyleBehaviour, o = e("../../token_iterator").TokenIterator, u = ["area", "base", "br", "col", "command", "embed", "hr", "img", "input", "keygen", "link", "meta", "param", "source", "track", "wbr"], f = function () {
- this.inherit(i), this.add("autoclosing", "insertion", function (e, t, n, r, i) {
- if (i == ">") {
- var s = n.getCursorPosition(), f = new o(r, s.row, s.column), l = f.getCurrentToken(), c = !1;
- if (!l || !a(l, "meta.tag") && (!a(l, "text") || !l.value.match("/"))) {
- do l = f.stepBackward(); while (l && (a(l, "string") || a(l, "keyword.operator") || a(l, "entity.attribute-name") || a(l, "text")))
- } else c = !0;
- if (!l || !a(l, "meta.tag-name") || f.stepBackward().value.match("/"))return;
- var h = l.value;
- if (c)var h = h.substring(0, s.column - l.start);
- if (u.indexOf(h) !== -1)return;
- return{text: ">" + h + ">", selection: [1, 1]}
- }
- })
- };
- r.inherits(f, i), t.HtmlBehaviour = f
-}), ace.define("ace/mode/behaviour/xml", ["require", "exports", "module", "ace/lib/oop", "ace/mode/behaviour", "ace/mode/behaviour/cstyle", "ace/token_iterator"], function (e, t, n) {
- function u(e, t) {
- var n = !0, r = e.type.split("."), i = t.split(".");
- return i.forEach(function (e) {
- if (r.indexOf(e) == -1)return n = !1, !1
- }), n
- }
-
- var r = e("../../lib/oop"), i = e("../behaviour").Behaviour, s = e("./cstyle").CstyleBehaviour, o = e("../../token_iterator").TokenIterator, a = function () {
- this.inherit(s, ["string_dquotes"]), this.add("autoclosing", "insertion", function (e, t, n, r, i) {
- if (i == ">") {
- var s = n.getCursorPosition(), a = new o(r, s.row, s.column), f = a.getCurrentToken(), l = !1;
- if (!f || !u(f, "meta.tag") && (!u(f, "text") || !f.value.match("/"))) {
- do f = a.stepBackward(); while (f && (u(f, "string") || u(f, "keyword.operator") || u(f, "entity.attribute-name") || u(f, "text")))
- } else l = !0;
- if (!f || !u(f, "meta.tag-name") || a.stepBackward().value.match("/"))return;
- var c = f.value;
- if (l)var c = c.substring(0, s.column - f.start);
- return{text: ">" + c + ">", selection: [1, 1]}
- }
- }), this.add("autoindent", "insertion", function (e, t, n, r, i) {
- if (i == "\n") {
- var s = n.getCursorPosition(), o = r.doc.getLine(s.row), u = o.substring(s.column, s.column + 2);
- if (u == "") {
- var a = this.$getIndent(r.doc.getLine(s.row)) + r.getTabString(), f = this.$getIndent(r.doc.getLine(s.row));
- return{text: "\n" + a + "\n" + f, selection: [1, a.length, 1, a.length]}
- }
- }
- })
- };
- r.inherits(a, i), t.XmlBehaviour = a
-}), ace.define("ace/mode/folding/html", ["require", "exports", "module", "ace/lib/oop", "ace/mode/folding/mixed", "ace/mode/folding/xml", "ace/mode/folding/cstyle"], function (e, t, n) {
- var r = e("../../lib/oop"), i = e("./mixed").FoldMode, s = e("./xml").FoldMode, o = e("./cstyle").FoldMode, u = t.FoldMode = function () {
- i.call(this, new s({area: 1, base: 1, br: 1, col: 1, command: 1, embed: 1, hr: 1, img: 1, input: 1, keygen: 1, link: 1, meta: 1, param: 1, source: 1, track: 1, wbr: 1, li: 1, dt: 1, dd: 1, p: 1, rt: 1, rp: 1, optgroup: 1, option: 1, colgroup: 1, td: 1, th: 1}), {"js-": new o, "css-": new o})
- };
- r.inherits(u, i)
-}), ace.define("ace/mode/folding/mixed", ["require", "exports", "module", "ace/lib/oop", "ace/mode/folding/fold_mode"], function (e, t, n) {
- var r = e("../../lib/oop"), i = e("./fold_mode").FoldMode, s = t.FoldMode = function (e, t) {
- this.defaultMode = e, this.subModes = t
- };
- r.inherits(s, i), function () {
- this.$getMode = function (e) {
- for (var t in this.subModes)if (e.indexOf(t) === 0)return this.subModes[t];
- return null
- }, this.$tryMode = function (e, t, n, r) {
- var i = this.$getMode(e);
- return i ? i.getFoldWidget(t, n, r) : ""
- }, this.getFoldWidget = function (e, t, n) {
- return this.$tryMode(e.getState(n - 1), e, t, n) || this.$tryMode(e.getState(n), e, t, n) || this.defaultMode.getFoldWidget(e, t, n)
- }, this.getFoldWidgetRange = function (e, t, n) {
- var r = this.$getMode(e.getState(n - 1));
- if (!r || !r.getFoldWidget(e, t, n))r = this.$getMode(e.getState(n));
- if (!r || !r.getFoldWidget(e, t, n))r = this.defaultMode;
- return r.getFoldWidgetRange(e, t, n)
- }
- }.call(s.prototype)
-}), ace.define("ace/mode/folding/xml", ["require", "exports", "module", "ace/lib/oop", "ace/lib/lang", "ace/range", "ace/mode/folding/fold_mode", "ace/token_iterator"], function (e, t, n) {
- var r = e("../../lib/oop"), i = e("../../lib/lang"), s = e("../../range").Range, o = e("./fold_mode").FoldMode, u = e("../../token_iterator").TokenIterator, a = t.FoldMode = function (e) {
- o.call(this), this.voidElements = e || {}
- };
- r.inherits(a, o), function () {
- this.getFoldWidget = function (e, t, n) {
- var r = this._getFirstTagInLine(e, n);
- return r.closing ? t == "markbeginend" ? "end" : "" : !r.tagName || this.voidElements[r.tagName.toLowerCase()] ? "" : r.selfClosing ? "" : r.value.indexOf("/" + r.tagName) !== -1 ? "" : "start"
- }, this._getFirstTagInLine = function (e, t) {
- var n = e.getTokens(t), r = "";
- for (var s = 0; s < n.length; s++) {
- var o = n[s];
- o.type.indexOf("meta.tag") === 0 ? r += o.value : r += i.stringRepeat(" ", o.value.length)
- }
- return this._parseTag(r)
- }, this.tagRe = /^(\s*)((\/?)([-_a-zA-Z0-9:!]*)\s*(\/?)>?)/, this._parseTag = function (e) {
- var t = this.tagRe.exec(e), n = this.tagRe.lastIndex || 0;
- return this.tagRe.lastIndex = 0, {value: e, match: t ? t[2] : "", closing: t ? !!t[3] : !1, selfClosing: t ? !!t[5] || t[2] == "/>" : !1, tagName: t ? t[4] : "", column: t[1] ? n + t[1].length : n}
- }, this._readTagForward = function (e) {
- var t = e.getCurrentToken();
- if (!t)return null;
- var n = "", r;
- do if (t.type.indexOf("meta.tag") === 0) {
- if (!r)var r = {row: e.getCurrentTokenRow(), column: e.getCurrentTokenColumn()};
- n += t.value;
- if (n.indexOf(">") !== -1) {
- var i = this._parseTag(n);
- return i.start = r, i.end = {row: e.getCurrentTokenRow(), column: e.getCurrentTokenColumn() + t.value.length}, e.stepForward(), i
- }
- } while (t = e.stepForward());
- return null
- }, this._readTagBackward = function (e) {
- var t = e.getCurrentToken();
- if (!t)return null;
- var n = "", r;
- do if (t.type.indexOf("meta.tag") === 0) {
- r || (r = {row: e.getCurrentTokenRow(), column: e.getCurrentTokenColumn() + t.value.length}), n = t.value + n;
- if (n.indexOf("<") !== -1) {
- var i = this._parseTag(n);
- return i.end = r, i.start = {row: e.getCurrentTokenRow(), column: e.getCurrentTokenColumn()}, e.stepBackward(), i
- }
- } while (t = e.stepBackward());
- return null
- }, this._pop = function (e, t) {
- while (e.length) {
- var n = e[e.length - 1];
- if (!t || n.tagName == t.tagName)return e.pop();
- if (this.voidElements[t.tagName])return;
- if (this.voidElements[n.tagName]) {
- e.pop();
- continue
- }
- return null
- }
- }, this.getFoldWidgetRange = function (e, t, n) {
- var r = this._getFirstTagInLine(e, n);
- if (!r.match)return null;
- var i = r.closing || r.selfClosing, o = [], a;
- if (!i) {
- var f = new u(e, n, r.column), l = {row: n, column: r.column + r.tagName.length + 2};
- while (a = this._readTagForward(f)) {
- if (a.selfClosing) {
- if (!o.length)return a.start.column += a.tagName.length + 2, a.end.column -= 2, s.fromPoints(a.start, a.end);
- continue
- }
- if (a.closing) {
- this._pop(o, a);
- if (o.length == 0)return s.fromPoints(l, a.start)
- } else o.push(a)
- }
- } else {
- var f = new u(e, n, r.column + r.match.length), c = {row: n, column: r.column};
- while (a = this._readTagBackward(f)) {
- if (a.selfClosing) {
- if (!o.length)return a.start.column += a.tagName.length + 2, a.end.column -= 2, s.fromPoints(a.start, a.end);
- continue
- }
- if (!a.closing) {
- this._pop(o, a);
- if (o.length == 0)return a.start.column += a.tagName.length + 2, s.fromPoints(a.start, c)
- } else o.push(a)
- }
- }
- }
- }.call(a.prototype)
-})
\ No newline at end of file
diff --git a/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/mode-jade.js b/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/mode-jade.js
deleted file mode 100644
index d503624..0000000
--- a/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/mode-jade.js
+++ /dev/null
@@ -1,495 +0,0 @@
-ace.define("ace/mode/jade", ["require", "exports", "module", "ace/lib/oop", "ace/mode/text", "ace/tokenizer", "ace/mode/jade_highlight_rules", "ace/mode/folding/coffee"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("./text").Mode, s = e("../tokenizer").Tokenizer, o = e("./jade_highlight_rules").JadeHighlightRules, u = e("./folding/coffee").FoldMode, a = function () {
- var e = new o;
- this.$tokenizer = new s(e.getRules()), this.foldingRules = new u
- };
- r.inherits(a, i), function () {
- }.call(a.prototype), t.Mode = a
-}), ace.define("ace/mode/jade_highlight_rules", ["require", "exports", "module", "ace/lib/oop", "ace/mode/text_highlight_rules", "ace/mode/markdown_highlight_rules", "ace/mode/scss_highlight_rules", "ace/mode/less_highlight_rules", "ace/mode/coffee_highlight_rules", "ace/mode/javascript_highlight_rules"], function (e, t, n) {
- function l(e, t) {
- return{token: "entity.name.function.jade", regex: "^\\s*\\:" + e, next: t + "start"}
- }
-
- var r = e("../lib/oop"), i = e("./text_highlight_rules").TextHighlightRules, s = e("./markdown_highlight_rules").MarkdownHighlightRules, o = e("./scss_highlight_rules").ScssHighlightRules, u = e("./less_highlight_rules").LessHighlightRules, a = e("./coffee_highlight_rules").CoffeeHighlightRules, f = e("./javascript_highlight_rules").JavaScriptHighlightRules, c = function () {
- var e = "\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|[0-2][0-7]{0,2}|3[0-6][0-7]?|37[0-7]?|[4-7][0-7]?|.)";
- this.$rules = {start: [
- {token: "keyword.control.import.include.jade", regex: "\\s*\\binclude\\b"},
- {token: "keyword.other.doctype.jade", regex: "^!!!\\s*(?:[a-zA-Z0-9-_]+)?"},
- {token: "punctuation.section.comment", regex: "^\\s*//(?:\\s*[^-\\s]|\\s+\\S)(?:.*$)"},
- {token: function (e, t) {
- return"punctuation.section.comment"
- }, regex: "^((\\s*)//)(?:\\s*$)", next: "comment_block"},
- l("markdown", "markdown-"),
- l("sass", "sass-"),
- l("less", "less-"),
- l("coffee", "coffee-"),
- {token: ["storage.type.function.jade", "entity.name.function.jade", "punctuation.definition.parameters.begin.jade", "variable.parameter.function.jade", "punctuation.definition.parameters.end.jade"], regex: "^(\\s*mixin)( [\\w\\-]+)(\\s*\\()(.*?)(\\))"},
- {token: ["storage.type.function.jade", "entity.name.function.jade"], regex: "^(\\s*mixin)( [\\w\\-]+)"},
- {token: "source.js.embedded.jade", regex: "^\\s*(?:-|=|!=)", next: "js-start"},
- {token: "string.interpolated.jade", regex: "[#!]\\{[^\\}]+\\}"},
- {token: "meta.tag.any.jade", regex: /^\s*(?!\w+\:)(?:[\w]+|(?=\.|#)])/, next: "tag_single"},
- {token: "suport.type.attribute.id.jade", regex: "#\\w+"},
- {token: "suport.type.attribute.class.jade", regex: "\\.\\w+"},
- {token: "punctuation", regex: "\\s*(?:\\()", next: "tag_attributes"}
- ], comment_block: [
- {token: function (e) {
- return"text"
- }, regex: "^(\\1\\S|$)", captures: "1", next: "start"},
- {token: "comment.block.jade", regex: ".+"}
- ], tag_single: [
- {token: "entity.other.attribute-name.class.jade", regex: "\\.[\\w-]+"},
- {token: "entity.other.attribute-name.id.jade", regex: "#[\\w-]+"},
- {token: ["text", "punctuation"], regex: "($)|((?!\\.|#|=|-))", next: "start"}
- ], tag_attributes: [
- {token: "string", regex: "'(?=.)", next: "qstring"},
- {token: "string", regex: '"(?=.)', next: "qqstring"},
- {token: "entity.other.attribute-name.jade", regex: "\\b[a-zA-Z\\-:]+"},
- {token: ["entity.other.attribute-name.jade", "punctuation"], regex: "\\b([a-zA-Z:\\.-]+)(=)", next: "attribute_strings"},
- {token: "punctuation", regex: "\\)", next: "start"}
- ], attribute_strings: [
- {token: "string", regex: "'(?=.)", next: "qstring"},
- {token: "string", regex: '"(?=.)', next: "qqstring"}
- ], qqstring: [
- {token: "constant.language.escape", regex: e},
- {token: "string", regex: '[^"\\\\]+'},
- {token: "string", regex: "\\\\$", next: "qqstring"},
- {token: "string", regex: '"|$', next: "tag_attributes"}
- ], qstring: [
- {token: "constant.language.escape", regex: e},
- {token: "string", regex: "[^'\\\\]+"},
- {token: "string", regex: "\\\\$", next: "qstring"},
- {token: "string", regex: "'|$", next: "tag_attributes"}
- ]}, this.embedRules(f, "js-", [
- {token: "text", regex: ".$", next: "start"}
- ])
- };
- r.inherits(c, i), t.JadeHighlightRules = c
-}), ace.define("ace/mode/markdown_highlight_rules", ["require", "exports", "module", "ace/lib/oop", "ace/mode/text_highlight_rules", "ace/mode/javascript_highlight_rules", "ace/mode/xml_highlight_rules", "ace/mode/html_highlight_rules", "ace/mode/css_highlight_rules"], function (e, t, n) {
- function f(e, t) {
- return{token: "support.function", regex: "^```" + e + "\\s*$", next: t + "start"}
- }
-
- var r = e("../lib/oop"), i = e("./text_highlight_rules").TextHighlightRules, s = e("./javascript_highlight_rules").JavaScriptHighlightRules, o = e("./xml_highlight_rules").XmlHighlightRules, u = e("./html_highlight_rules").HtmlHighlightRules, a = e("./css_highlight_rules").CssHighlightRules, l = function () {
- this.$rules = {basic: [
- {token: "support.function", regex: "(`+)(.*?[^`])(\\1)"},
- {token: ["text", "constant", "text", "url", "string", "text"], regex: '^([ ]{0,3}\\[)([^\\]]+)(\\]:\\s*)([^ ]+)(\\s*(?:["][^"]+["])?(\\s*))$'},
- {token: ["text", "string", "text", "constant", "text"], regex: "(\\[)((?:[[^\\]]*\\]|[^\\[\\]])*)(\\][ ]?(?:\\n[ ]*)?\\[)(.*?)(\\])"},
- {token: ["text", "string", "text", "markup.underline", "string", "text"], regex: '(\\[)(\\[[^\\]]*\\]|[^\\[\\]]*)(\\]\\([ \\t]*)((?:(?:[^\\(]*?\\([^\\)]*?\\)\\S*?)|(?:.*?))>?)((?:[ ]*"(?:.*?)"[ \\t]*)?)(\\))'},
- {token: "string", regex: "([*]{2}|[_]{2}(?=\\S))(.*?\\S[*_]*)(\\1)"},
- {token: "string", regex: "([*]|[_](?=\\S))(.*?\\S[*_]*)(\\1)"},
- {token: ["text", "url", "text"], regex: "(<)((?:https?|ftp|dict):[^'\">\\s]+|(?:mailto:)?[-.\\w]+\\@[-a-z0-9]+(?:\\.[-a-z0-9]+)*\\.[a-z]+)(>)"}
- ], allowBlock: [
- {token: "support.function", regex: "^ {4}.+", next: "allowBlock"},
- {token: "empty", regex: "", next: "start"}
- ], start: [
- {token: "empty_line", regex: "^$", next: "allowBlock"},
- {token: "markup.heading.1", regex: "^=+(?=\\s*$)"},
- {token: "markup.heading.2", regex: "^\\-+(?=\\s*$)"},
- {token: function (e) {
- return"markup.heading." + e.search(/[^#]/)
- }, regex: "^#{1,6}(?:[^ #].*| +.*(?:[^ #].*|[^ ]+.* +#+ *))$"},
- f("(?:javascript|js)", "js-"),
- f("xml", "xml-"),
- f("html", "html-"),
- f("css", "css-"),
- {token: "support.function", regex: "^```\\s*[a-zA-Z]*(?:{.*?\\})?\\s*$", next: "githubblock"},
- {token: "string", regex: "^>[ ].+$", next: "blockquote"},
- {token: "constant", regex: "^ {0,2}(?:(?: ?\\* ?){3,}|(?: ?\\- ?){3,}|(?: ?\\_ ?){3,})\\s*$", next: "allowBlock"},
- {token: "markup.list", regex: "^\\s{0,3}(?:[*+-]|\\d+\\.)\\s+", next: "listblock-start"},
- {include: "basic"}
- ], "listblock-start": [
- {token: "support.variable", regex: /(?:\[[ x]\])?/, next: "listblock"}
- ], listblock: [
- {token: "empty_line", regex: "^$", next: "start"},
- {include: "basic", noEscape: !0},
- {token: "markup.list", regex: "^\\s{0,3}(?:[*+-]|\\d+\\.)\\s+", next: "listblock-start"},
- {defaultToken: "markup.list"}
- ], blockquote: [
- {token: "empty_line", regex: "^\\s*$", next: "start"},
- {token: "string", regex: ".+"}
- ], githubblock: [
- {token: "support.function", regex: "^```", next: "start"},
- {token: "support.function", regex: ".+"}
- ]}, this.embedRules(s, "js-", [
- {token: "support.function", regex: "^```", next: "start"}
- ]), this.embedRules(u, "html-", [
- {token: "support.function", regex: "^```", next: "start"}
- ]), this.embedRules(a, "css-", [
- {token: "support.function", regex: "^```", next: "start"}
- ]), this.embedRules(o, "xml-", [
- {token: "support.function", regex: "^```", next: "start"}
- ]);
- var e = (new u).getRules();
- for (var t in e)this.$rules[t] ? this.$rules[t] = this.$rules[t].concat(e[t]) : this.$rules[t] = e[t];
- this.normalizeRules()
- };
- r.inherits(l, i), t.MarkdownHighlightRules = l
-}), ace.define("ace/mode/javascript_highlight_rules", ["require", "exports", "module", "ace/lib/oop", "ace/mode/doc_comment_highlight_rules", "ace/mode/text_highlight_rules"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("./doc_comment_highlight_rules").DocCommentHighlightRules, s = e("./text_highlight_rules").TextHighlightRules, o = function () {
- var e = this.createKeywordMapper({"variable.language": "Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document", keyword: "const|yield|import|get|set|break|case|catch|continue|default|delete|do|else|finally|for|function|if|in|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|__parent__|__count__|escape|unescape|with|__proto__|class|enum|extends|super|export|implements|private|public|interface|package|protected|static", "storage.type": "const|let|var|function", "constant.language": "null|Infinity|NaN|undefined", "support.function": "alert", "constant.language.boolean": "true|false"}, "identifier"), t = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void", n = "[a-zA-Z\\$_¡-￿][a-zA-Z\\d\\$_¡-￿]*\\b", r = "\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|[0-2][0-7]{0,2}|3[0-6][0-7]?|37[0-7]?|[4-7][0-7]?|.)";
- this.$rules = {start: [
- {token: "comment", regex: /\/\/.*$/},
- i.getStartRule("doc-start"),
- {token: "comment", regex: /\/\*/, next: "comment"},
- {token: "string", regex: "'(?=.)", next: "qstring"},
- {token: "string", regex: '"(?=.)', next: "qqstring"},
- {token: "constant.numeric", regex: /0[xX][0-9a-fA-F]+\b/},
- {token: "constant.numeric", regex: /[+-]?\d+(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?\b/},
- {token: ["storage.type", "punctuation.operator", "support.function", "punctuation.operator", "entity.name.function", "text", "keyword.operator"], regex: "(" + n + ")(\\.)(prototype)(\\.)(" + n + ")(\\s*)(=)", next: "function_arguments"},
- {token: ["storage.type", "punctuation.operator", "entity.name.function", "text", "keyword.operator", "text", "storage.type", "text", "paren.lparen"], regex: "(" + n + ")(\\.)(" + n + ")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", next: "function_arguments"},
- {token: ["entity.name.function", "text", "keyword.operator", "text", "storage.type", "text", "paren.lparen"], regex: "(" + n + ")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", next: "function_arguments"},
- {token: ["storage.type", "punctuation.operator", "entity.name.function", "text", "keyword.operator", "text", "storage.type", "text", "entity.name.function", "text", "paren.lparen"], regex: "(" + n + ")(\\.)(" + n + ")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()", next: "function_arguments"},
- {token: ["storage.type", "text", "entity.name.function", "text", "paren.lparen"], regex: "(function)(\\s+)(" + n + ")(\\s*)(\\()", next: "function_arguments"},
- {token: ["entity.name.function", "text", "punctuation.operator", "text", "storage.type", "text", "paren.lparen"], regex: "(" + n + ")(\\s*)(:)(\\s*)(function)(\\s*)(\\()", next: "function_arguments"},
- {token: ["text", "text", "storage.type", "text", "paren.lparen"], regex: "(:)(\\s*)(function)(\\s*)(\\()", next: "function_arguments"},
- {token: "keyword", regex: "(?:" + t + ")\\b", next: "regex_allowed"},
- {token: ["punctuation.operator", "support.function"], regex: /(\.)(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:opzzzz|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/},
- {token: ["punctuation.operator", "support.function.dom"], regex: /(\.)(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/},
- {token: ["punctuation.operator", "support.constant"], regex: /(\.)(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/},
- {token: ["storage.type", "punctuation.operator", "support.function.firebug"], regex: /(console)(\.)(warn|info|log|error|time|timeEnd|assert)\b/},
- {token: e, regex: n},
- {token: "keyword.operator", regex: /--|\+\+|[!$%&*+\-~]|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|\*=|%=|\+=|\-=|&=|\^=/, next: "regex_allowed"},
- {token: "punctuation.operator", regex: /\?|\:|\,|\;|\./, next: "regex_allowed"},
- {token: "paren.lparen", regex: /[\[({]/, next: "regex_allowed"},
- {token: "paren.rparen", regex: /[\])}]/},
- {token: "keyword.operator", regex: /\/=?/, next: "regex_allowed"},
- {token: "comment", regex: /^#!.*$/}
- ], regex_allowed: [i.getStartRule("doc-start"), {token: "comment", regex: "\\/\\*", next: "comment_regex_allowed"}, {token: "comment", regex: "\\/\\/.*$"}, {token: "string.regexp", regex: "\\/", next: "regex"}, {token: "text", regex: "\\s+"}, {token: "empty", regex: "", next: "start"}], regex: [
- {token: "regexp.keyword.operator", regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},
- {token: "string.regexp", regex: "/\\w*", next: "start"},
- {token: "invalid", regex: /\{\d+,?(?:\d+)?}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/},
- {token: "constant.language.escape", regex: /\(\?[:=!]|\)|{\d+,?(?:\d+)?}|{,\d+}|[+*]\?|[()$^+*?]/},
- {token: "constant.language.delimiter", regex: /\|/},
- {token: "constant.language.escape", regex: /\[\^?/, next: "regex_character_class"},
- {token: "empty", regex: "$", next: "start"},
- {defaultToken: "string.regexp"}
- ], regex_character_class: [
- {token: "regexp.keyword.operator", regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},
- {token: "constant.language.escape", regex: "]", next: "regex"},
- {token: "constant.language.escape", regex: "-"},
- {token: "empty", regex: "$", next: "start"},
- {defaultToken: "string.regexp.charachterclass"}
- ], function_arguments: [
- {token: "variable.parameter", regex: n},
- {token: "punctuation.operator", regex: "[, ]+"},
- {token: "punctuation.operator", regex: "$"},
- {token: "empty", regex: "", next: "start"}
- ], comment_regex_allowed: [
- {token: "comment", regex: "\\*\\/", next: "regex_allowed"},
- {defaultToken: "comment"}
- ], comment: [
- {token: "comment", regex: "\\*\\/", next: "start"},
- {defaultToken: "comment"}
- ], qqstring: [
- {token: "constant.language.escape", regex: r},
- {token: "string", regex: "\\\\$", next: "qqstring"},
- {token: "string", regex: '"|$', next: "start"},
- {defaultToken: "string"}
- ], qstring: [
- {token: "constant.language.escape", regex: r},
- {token: "string", regex: "\\\\$", next: "qstring"},
- {token: "string", regex: "'|$", next: "start"},
- {defaultToken: "string"}
- ]}, this.embedRules(i, "doc-", [i.getEndRule("start")])
- };
- r.inherits(o, s), t.JavaScriptHighlightRules = o
-}), ace.define("ace/mode/doc_comment_highlight_rules", ["require", "exports", "module", "ace/lib/oop", "ace/mode/text_highlight_rules"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("./text_highlight_rules").TextHighlightRules, s = function () {
- this.$rules = {start: [
- {token: "comment.doc.tag", regex: "@[\\w\\d_]+"},
- {token: "comment.doc.tag", regex: "\\bTODO\\b"},
- {defaultToken: "comment.doc"}
- ]}
- };
- r.inherits(s, i), s.getStartRule = function (e) {
- return{token: "comment.doc", regex: "\\/\\*(?=\\*)", next: e}
- }, s.getEndRule = function (e) {
- return{token: "comment.doc", regex: "\\*\\/", next: e}
- }, t.DocCommentHighlightRules = s
-}), ace.define("ace/mode/xml_highlight_rules", ["require", "exports", "module", "ace/lib/oop", "ace/mode/xml_util", "ace/mode/text_highlight_rules"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("./xml_util"), s = e("./text_highlight_rules").TextHighlightRules, o = function () {
- this.$rules = {start: [
- {token: "text", regex: "<\\!\\[CDATA\\[", next: "cdata"},
- {token: "xml-pe", regex: "<\\?.*?\\?>"},
- {token: "comment", regex: "<\\!--", next: "comment"},
- {token: "xml-pe", regex: "<\\!.*?>"},
- {token: "meta.tag", regex: "<\\/?", next: "tag"},
- {token: "text", regex: "\\s+"},
- {token: "constant.character.entity", regex: "(?:[0-9]+;)|(?:[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}
- ], cdata: [
- {token: "text", regex: "\\]\\]>", next: "start"},
- {token: "text", regex: "\\s+"},
- {token: "text", regex: "(?:[^\\]]|\\](?!\\]>))+"}
- ], comment: [
- {token: "comment", regex: ".*?-->", next: "start"},
- {token: "comment", regex: ".+"}
- ]}, i.tag(this.$rules, "tag", "start")
- };
- r.inherits(o, s), t.XmlHighlightRules = o
-}), ace.define("ace/mode/xml_util", ["require", "exports", "module"], function (e, t, n) {
- function r(e) {
- return[
- {token: "string", regex: '"', next: e + "_qqstring"},
- {token: "string", regex: "'", next: e + "_qstring"}
- ]
- }
-
- function i(e, t) {
- return[
- {token: "string", regex: e, next: t},
- {token: "constant.language.escape", regex: "(?:[0-9]+;)|(?:[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"},
- {defaultToken: "string"}
- ]
- }
-
- t.tag = function (e, t, n, s) {
- e[t] = [
- {token: "text", regex: "\\s+"},
- {token: s ? function (e) {
- return s[e] ? "meta.tag.tag-name." + s[e] : "meta.tag.tag-name"
- } : "meta.tag.tag-name", regex: "[-_a-zA-Z0-9:]+", next: t + "_embed_attribute_list"},
- {token: "empty", regex: "", next: t + "_embed_attribute_list"}
- ], e[t + "_qstring"] = i("'", t + "_embed_attribute_list"), e[t + "_qqstring"] = i('"', t + "_embed_attribute_list"), e[t + "_embed_attribute_list"] = [
- {token: "meta.tag.r", regex: "/?>", next: n},
- {token: "keyword.operator", regex: "="},
- {token: "entity.other.attribute-name", regex: "[-_a-zA-Z0-9:]+"},
- {token: "constant.numeric", regex: "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},
- {token: "text", regex: "\\s+"}
- ].concat(r(t))
- }
-}), ace.define("ace/mode/html_highlight_rules", ["require", "exports", "module", "ace/lib/oop", "ace/lib/lang", "ace/mode/css_highlight_rules", "ace/mode/javascript_highlight_rules", "ace/mode/xml_util", "ace/mode/text_highlight_rules"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("../lib/lang"), s = e("./css_highlight_rules").CssHighlightRules, o = e("./javascript_highlight_rules").JavaScriptHighlightRules, u = e("./xml_util"), a = e("./text_highlight_rules").TextHighlightRules, f = i.createMap({a: "anchor", button: "form", form: "form", img: "image", input: "form", label: "form", script: "script", select: "form", textarea: "form", style: "style", table: "table", tbody: "table", td: "table", tfoot: "table", th: "table", tr: "table"}), l = function () {
- this.$rules = {start: [
- {token: "text", regex: "<\\!\\[CDATA\\[", next: "cdata"},
- {token: "xml-pe", regex: "<\\?.*?\\?>"},
- {token: "comment", regex: "<\\!--", next: "comment"},
- {token: "xml-pe", regex: "<\\!.*?>"},
- {token: "meta.tag", regex: "<(?=script\\b)", next: "script"},
- {token: "meta.tag", regex: "<(?=style\\b)", next: "style"},
- {token: "meta.tag", regex: "<\\/?", next: "tag"},
- {token: "text", regex: "\\s+"},
- {token: "constant.character.entity", regex: "(?:[0-9]+;)|(?:[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}
- ], cdata: [
- {token: "text", regex: "\\]\\]>", next: "start"}
- ], comment: [
- {token: "comment", regex: ".*?-->", next: "start"},
- {defaultToken: "comment"}
- ]}, u.tag(this.$rules, "tag", "start", f), u.tag(this.$rules, "style", "css-start", f), u.tag(this.$rules, "script", "js-start", f), this.embedRules(o, "js-", [
- {token: "comment", regex: "\\/\\/.*(?=<\\/script>)", next: "tag"},
- {token: "meta.tag", regex: "<\\/(?=script)", next: "tag"}
- ]), this.embedRules(s, "css-", [
- {token: "meta.tag", regex: "<\\/(?=style)", next: "tag"}
- ])
- };
- r.inherits(l, a), t.HtmlHighlightRules = l
-}), ace.define("ace/mode/css_highlight_rules", ["require", "exports", "module", "ace/lib/oop", "ace/lib/lang", "ace/mode/text_highlight_rules"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("../lib/lang"), s = e("./text_highlight_rules").TextHighlightRules, o = t.supportType = "animation-fill-mode|alignment-adjust|alignment-baseline|animation-delay|animation-direction|animation-duration|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|animation|appearance|azimuth|backface-visibility|background-attachment|background-break|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|background|baseline-shift|binding|bleed|bookmark-label|bookmark-level|bookmark-state|bookmark-target|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|border|bottom|box-align|box-decoration-break|box-direction|box-flex-group|box-flex|box-lines|box-ordinal-group|box-orient|box-pack|box-shadow|box-sizing|break-after|break-before|break-inside|caption-side|clear|clip|color-profile|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|crop|cue-after|cue-before|cue|cursor|direction|display|dominant-baseline|drop-initial-after-adjust|drop-initial-after-align|drop-initial-before-adjust|drop-initial-before-align|drop-initial-size|drop-initial-value|elevation|empty-cells|fit|fit-position|float-offset|float|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|font|grid-columns|grid-rows|hanging-punctuation|height|hyphenate-after|hyphenate-before|hyphenate-character|hyphenate-lines|hyphenate-resource|hyphens|icon|image-orientation|image-rendering|image-resolution|inline-box-align|left|letter-spacing|line-height|line-stacking-ruby|line-stacking-shift|line-stacking-strategy|line-stacking|list-style-image|list-style-position|list-style-type|list-style|margin-bottom|margin-left|margin-right|margin-top|margin|mark-after|mark-before|mark|marks|marquee-direction|marquee-play-count|marquee-speed|marquee-style|max-height|max-width|min-height|min-width|move-to|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|orphans|outline-color|outline-offset|outline-style|outline-width|outline|overflow-style|overflow-x|overflow-y|overflow|padding-bottom|padding-left|padding-right|padding-top|padding|page-break-after|page-break-before|page-break-inside|page-policy|page|pause-after|pause-before|pause|perspective-origin|perspective|phonemes|pitch-range|pitch|play-during|position|presentation-level|punctuation-trim|quotes|rendering-intent|resize|rest-after|rest-before|rest|richness|right|rotation-point|rotation|ruby-align|ruby-overhang|ruby-position|ruby-span|size|speak-header|speak-numeral|speak-punctuation|speak|speech-rate|stress|string-set|table-layout|target-name|target-new|target-position|target|text-align-last|text-align|text-decoration|text-emphasis|text-height|text-indent|text-justify|text-outline|text-shadow|text-transform|text-wrap|top|transform-origin|transform-style|transform|transition-delay|transition-duration|transition-property|transition-timing-function|transition|unicode-bidi|vertical-align|visibility|voice-balance|voice-duration|voice-family|voice-pitch-range|voice-pitch|voice-rate|voice-stress|voice-volume|volume|white-space-collapse|white-space|widows|width|word-break|word-spacing|word-wrap|z-index", u = t.supportFunction = "rgb|rgba|url|attr|counter|counters", a = t.supportConstant = "absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero", f = t.supportConstantColor = "aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow", l = t.supportConstantFonts = "arial|century|comic|courier|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace", c = t.numRe = "\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))", h = t.pseudoElements = "(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b", p = t.pseudoClasses = "(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b", d = function () {
- var e = this.createKeywordMapper({"support.function": u, "support.constant": a, "support.type": o, "support.constant.color": f, "support.constant.fonts": l}, "text", !0), t = [
- {token: "comment", regex: "\\/\\*", next: "ruleset_comment"},
- {token: "string", regex: '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},
- {token: "string", regex: "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},
- {token: ["constant.numeric", "keyword"], regex: "(" + c + ")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vm|vw|%)"},
- {token: "constant.numeric", regex: c},
- {token: "constant.numeric", regex: "#[a-f0-9]{6}"},
- {token: "constant.numeric", regex: "#[a-f0-9]{3}"},
- {token: ["punctuation", "entity.other.attribute-name.pseudo-element.css"], regex: h},
- {token: ["punctuation", "entity.other.attribute-name.pseudo-class.css"], regex: p},
- {token: e, regex: "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"}
- ], n = i.copyArray(t);
- n.unshift({token: "paren.rparen", regex: "\\}", next: "start"});
- var r = i.copyArray(t);
- r.unshift({token: "paren.rparen", regex: "\\}", next: "media"});
- var s = [
- {token: "comment", regex: ".+"}
- ], d = i.copyArray(s);
- d.unshift({token: "comment", regex: ".*?\\*\\/", next: "start"});
- var v = i.copyArray(s);
- v.unshift({token: "comment", regex: ".*?\\*\\/", next: "media"});
- var m = i.copyArray(s);
- m.unshift({token: "comment", regex: ".*?\\*\\/", next: "ruleset"}), this.$rules = {start: [
- {token: "comment", regex: "\\/\\*", next: "comment"},
- {token: "paren.lparen", regex: "\\{", next: "ruleset"},
- {token: "string", regex: "@.*?{", next: "media"},
- {token: "keyword", regex: "#[a-z0-9-_]+"},
- {token: "variable", regex: "\\.[a-z0-9-_]+"},
- {token: "string", regex: ":[a-z0-9-_]+"},
- {token: "constant", regex: "[a-z0-9-_]+"}
- ], media: [
- {token: "comment", regex: "\\/\\*", next: "media_comment"},
- {token: "paren.lparen", regex: "\\{", next: "media_ruleset"},
- {token: "string", regex: "\\}", next: "start"},
- {token: "keyword", regex: "#[a-z0-9-_]+"},
- {token: "variable", regex: "\\.[a-z0-9-_]+"},
- {token: "string", regex: ":[a-z0-9-_]+"},
- {token: "constant", regex: "[a-z0-9-_]+"}
- ], comment: d, ruleset: n, ruleset_comment: m, media_ruleset: r, media_comment: v}
- };
- r.inherits(d, s), t.CssHighlightRules = d
-}), ace.define("ace/mode/scss_highlight_rules", ["require", "exports", "module", "ace/lib/oop", "ace/lib/lang", "ace/mode/text_highlight_rules"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("../lib/lang"), s = e("./text_highlight_rules").TextHighlightRules, o = function () {
- var e = i.arrayToMap(function () {
- var e = "-webkit-|-moz-|-o-|-ms-|-svg-|-pie-|-khtml-".split("|"), t = "appearance|background-clip|background-inline-policy|background-origin|background-size|binding|border-bottom-colors|border-left-colors|border-right-colors|border-top-colors|border-end|border-end-color|border-end-style|border-end-width|border-image|border-start|border-start-color|border-start-style|border-start-width|box-align|box-direction|box-flex|box-flexgroup|box-ordinal-group|box-orient|box-pack|box-sizing|column-count|column-gap|column-width|column-rule|column-rule-width|column-rule-style|column-rule-color|float-edge|font-feature-settings|font-language-override|force-broken-image-icon|image-region|margin-end|margin-start|opacity|outline|outline-color|outline-offset|outline-radius|outline-radius-bottomleft|outline-radius-bottomright|outline-radius-topleft|outline-radius-topright|outline-style|outline-width|padding-end|padding-start|stack-sizing|tab-size|text-blink|text-decoration-color|text-decoration-line|text-decoration-style|transform|transform-origin|transition|transition-delay|transition-duration|transition-property|transition-timing-function|user-focus|user-input|user-modify|user-select|window-shadow|border-radius".split("|"), n = "azimuth|background-attachment|background-color|background-image|background-position|background-repeat|background|border-bottom-color|border-bottom-style|border-bottom-width|border-bottom|border-collapse|border-color|border-left-color|border-left-style|border-left-width|border-left|border-right-color|border-right-style|border-right-width|border-right|border-spacing|border-style|border-top-color|border-top-style|border-top-width|border-top|border-width|border|bottom|box-sizing|caption-side|clear|clip|color|content|counter-increment|counter-reset|cue-after|cue-before|cue|cursor|direction|display|elevation|empty-cells|float|font-family|font-size-adjust|font-size|font-stretch|font-style|font-variant|font-weight|font|height|left|letter-spacing|line-height|list-style-image|list-style-position|list-style-type|list-style|margin-bottom|margin-left|margin-right|margin-top|marker-offset|margin|marks|max-height|max-width|min-height|min-width|opacity|orphans|outline-color|outline-style|outline-width|outline|overflow|overflow-x|overflow-y|padding-bottom|padding-left|padding-right|padding-top|padding|page-break-after|page-break-before|page-break-inside|page|pause-after|pause-before|pause|pitch-range|pitch|play-during|position|quotes|richness|right|size|speak-header|speak-numeral|speak-punctuation|speech-rate|speak|stress|table-layout|text-align|text-decoration|text-indent|text-shadow|text-transform|top|unicode-bidi|vertical-align|visibility|voice-family|volume|white-space|widows|width|word-spacing|z-index".split("|"), r = [];
- for (var i = 0, s = e.length; i < s; i++)Array.prototype.push.apply(r, (e[i] + t.join("|" + e[i])).split("|"));
- return Array.prototype.push.apply(r, t), Array.prototype.push.apply(r, n), r
- }()), t = i.arrayToMap("hsl|hsla|rgb|rgba|url|attr|counter|counters|abs|adjust_color|adjust_hue|alpha|join|blue|ceil|change_color|comparable|complement|darken|desaturate|floor|grayscale|green|hue|if|invert|join|length|lighten|lightness|mix|nth|opacify|opacity|percentage|quote|red|round|saturate|saturation|scale_color|transparentize|type_of|unit|unitless|unqoute".split("|")), n = i.arrayToMap("absolute|all-scroll|always|armenian|auto|baseline|below|bidi-override|block|bold|bolder|border-box|both|bottom|break-all|break-word|capitalize|center|char|circle|cjk-ideographic|col-resize|collapse|content-box|crosshair|dashed|decimal-leading-zero|decimal|default|disabled|disc|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ellipsis|fixed|georgian|groove|hand|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|inactive|inherit|inline-block|inline|inset|inside|inter-ideograph|inter-word|italic|justify|katakana-iroha|katakana|keep-all|left|lighter|line-edge|line-through|line|list-item|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|medium|middle|move|n-resize|ne-resize|newspaper|no-drop|no-repeat|nw-resize|none|normal|not-allowed|nowrap|oblique|outset|outside|overline|pointer|progress|relative|repeat-x|repeat-y|repeat|right|ridge|row-resize|rtl|s-resize|scroll|se-resize|separate|small-caps|solid|square|static|strict|super|sw-resize|table-footer-group|table-header-group|tb-rl|text-bottom|text-top|text|thick|thin|top|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|zero".split("|")), r = i.arrayToMap("aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow".split("|")), s = i.arrayToMap("@mixin|@extend|@include|@import|@media|@debug|@warn|@if|@for|@each|@while|@else|@font-face|@-webkit-keyframes|if|and|!default|module|def|end|declare".split("|")), o = i.arrayToMap("a|abbr|acronym|address|applet|area|article|aside|audio|b|base|basefont|bdo|big|blockquote|body|br|button|canvas|caption|center|cite|code|col|colgroup|command|datalist|dd|del|details|dfn|dir|div|dl|dt|em|embed|fieldset|figcaption|figure|font|footer|form|frame|frameset|h1|h2|h3|h4|h5|h6|head|header|hgroup|hr|html|i|iframe|img|input|ins|keygen|kbd|label|legend|li|link|map|mark|menu|meta|meter|nav|noframes|noscript|object|ol|optgroup|option|output|p|param|pre|progress|q|rp|rt|ruby|s|samp|script|section|select|small|source|span|strike|strong|style|sub|summary|sup|table|tbody|td|textarea|tfoot|th|thead|time|title|tr|tt|u|ul|var|video|wbr|xmp".split("|")), u = "\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))";
- this.$rules = {start: [
- {token: "comment", regex: "\\/\\/.*$"},
- {token: "comment", regex: "\\/\\*", next: "comment"},
- {token: "string", regex: '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},
- {token: "string", regex: '["].*\\\\$', next: "qqstring"},
- {token: "string", regex: "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},
- {token: "string", regex: "['].*\\\\$", next: "qstring"},
- {token: "constant.numeric", regex: u + "(?:em|ex|px|cm|mm|in|pt|pc|deg|rad|grad|ms|s|hz|khz|%)"},
- {token: "constant.numeric", regex: "#[a-f0-9]{6}"},
- {token: "constant.numeric", regex: "#[a-f0-9]{3}"},
- {token: "constant.numeric", regex: u},
- {token: function (i) {
- return e.hasOwnProperty(i.toLowerCase()) ? "support.type" : s.hasOwnProperty(i) ? "keyword" : n.hasOwnProperty(i) ? "constant.language" : t.hasOwnProperty(i) ? "support.function" : r.hasOwnProperty(i.toLowerCase()) ? "support.constant.color" : o.hasOwnProperty(i.toLowerCase()) ? "variable.language" : "text"
- }, regex: "\\-?[@a-z_][@a-z0-9_\\-]*"},
- {token: "variable", regex: "[a-z_\\-$][a-z0-9_\\-$]*\\b"},
- {token: "variable.language", regex: "#[a-z0-9-_]+"},
- {token: "variable.language", regex: "\\.[a-z0-9-_]+"},
- {token: "variable.language", regex: ":[a-z0-9-_]+"},
- {token: "constant", regex: "[a-z0-9-_]+"},
- {token: "keyword.operator", regex: "<|>|<=|>=|==|!=|-|%|#|\\+|\\$|\\+|\\*"},
- {token: "paren.lparen", regex: "[[({]"},
- {token: "paren.rparen", regex: "[\\])}]"},
- {token: "text", regex: "\\s+"}
- ], comment: [
- {token: "comment", regex: ".*?\\*\\/", next: "start"},
- {token: "comment", regex: ".+"}
- ], qqstring: [
- {token: "string", regex: '(?:(?:\\\\.)|(?:[^"\\\\]))*?"', next: "start"},
- {token: "string", regex: ".+"}
- ], qstring: [
- {token: "string", regex: "(?:(?:\\\\.)|(?:[^'\\\\]))*?'", next: "start"},
- {token: "string", regex: ".+"}
- ]}
- };
- r.inherits(o, s), t.ScssHighlightRules = o
-}), ace.define("ace/mode/less_highlight_rules", ["require", "exports", "module", "ace/lib/oop", "ace/lib/lang", "ace/mode/text_highlight_rules"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("../lib/lang"), s = e("./text_highlight_rules").TextHighlightRules, o = function () {
- var e = i.arrayToMap(function () {
- var e = "-webkit-|-moz-|-o-|-ms-|-svg-|-pie-|-khtml-".split("|"), t = "appearance|background-clip|background-inline-policy|background-origin|background-size|binding|border-bottom-colors|border-left-colors|border-right-colors|border-top-colors|border-end|border-end-color|border-end-style|border-end-width|border-image|border-start|border-start-color|border-start-style|border-start-width|box-align|box-direction|box-flex|box-flexgroup|box-ordinal-group|box-orient|box-pack|box-sizing|column-count|column-gap|column-width|column-rule|column-rule-width|column-rule-style|column-rule-color|float-edge|font-feature-settings|font-language-override|force-broken-image-icon|image-region|margin-end|margin-start|opacity|outline|outline-color|outline-offset|outline-radius|outline-radius-bottomleft|outline-radius-bottomright|outline-radius-topleft|outline-radius-topright|outline-style|outline-width|padding-end|padding-start|stack-sizing|tab-size|text-blink|text-decoration-color|text-decoration-line|text-decoration-style|transform|transform-origin|transition|transition-delay|transition-duration|transition-property|transition-timing-function|user-focus|user-input|user-modify|user-select|window-shadow|border-radius".split("|"), n = "azimuth|background-attachment|background-color|background-image|background-position|background-repeat|background|border-bottom-color|border-bottom-style|border-bottom-width|border-bottom|border-collapse|border-color|border-left-color|border-left-style|border-left-width|border-left|border-right-color|border-right-style|border-right-width|border-right|border-spacing|border-style|border-top-color|border-top-style|border-top-width|border-top|border-width|border|bottom|box-sizing|caption-side|clear|clip|color|content|counter-increment|counter-reset|cue-after|cue-before|cue|cursor|direction|display|elevation|empty-cells|float|font-family|font-size-adjust|font-size|font-stretch|font-style|font-variant|font-weight|font|height|left|letter-spacing|line-height|list-style-image|list-style-position|list-style-type|list-style|margin-bottom|margin-left|margin-right|margin-top|marker-offset|margin|marks|max-height|max-width|min-height|min-width|opacity|orphans|outline-color|outline-style|outline-width|outline|overflow|overflow-x|overflow-y|padding-bottom|padding-left|padding-right|padding-top|padding|page-break-after|page-break-before|page-break-inside|page|pause-after|pause-before|pause|pitch-range|pitch|play-during|position|quotes|richness|right|size|speak-header|speak-numeral|speak-punctuation|speech-rate|speak|stress|table-layout|text-align|text-decoration|text-indent|text-shadow|text-transform|top|unicode-bidi|vertical-align|visibility|voice-family|volume|white-space|widows|width|word-spacing|z-index".split("|"), r = [];
- for (var i = 0, s = e.length; i < s; i++)Array.prototype.push.apply(r, (e[i] + t.join("|" + e[i])).split("|"));
- return Array.prototype.push.apply(r, t), Array.prototype.push.apply(r, n), r
- }()), t = i.arrayToMap("hsl|hsla|rgb|rgba|url|attr|counter|counters|lighten|darken|saturate|desaturate|fadein|fadeout|fade|spin|mix|hue|saturation|lightness|alpha|round|ceil|floor|percentage|color|iscolor|isnumber|isstring|iskeyword|isurl|ispixel|ispercentage|isem".split("|")), n = i.arrayToMap("absolute|all-scroll|always|armenian|auto|baseline|below|bidi-override|block|bold|bolder|border-box|both|bottom|break-all|break-word|capitalize|center|char|circle|cjk-ideographic|col-resize|collapse|content-box|crosshair|dashed|decimal-leading-zero|decimal|default|disabled|disc|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ellipsis|fixed|georgian|groove|hand|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|inactive|inherit|inline-block|inline|inset|inside|inter-ideograph|inter-word|italic|justify|katakana-iroha|katakana|keep-all|left|lighter|line-edge|line-through|line|list-item|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|medium|middle|move|n-resize|ne-resize|newspaper|no-drop|no-repeat|nw-resize|none|normal|not-allowed|nowrap|oblique|outset|outside|overline|pointer|progress|relative|repeat-x|repeat-y|repeat|right|ridge|row-resize|rtl|s-resize|scroll|se-resize|separate|small-caps|solid|square|static|strict|super|sw-resize|table-footer-group|table-header-group|tb-rl|text-bottom|text-top|text|thick|thin|top|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|zero".split("|")), r = i.arrayToMap("aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow".split("|")), s = i.arrayToMap("@mixin|@extend|@include|@import|@media|@debug|@warn|@if|@for|@each|@while|@else|@font-face|@-webkit-keyframes|if|and|!default|module|def|end|declare|when|not|and".split("|")), o = i.arrayToMap("a|abbr|acronym|address|applet|area|article|aside|audio|b|base|basefont|bdo|big|blockquote|body|br|button|canvas|caption|center|cite|code|col|colgroup|command|datalist|dd|del|details|dfn|dir|div|dl|dt|em|embed|fieldset|figcaption|figure|font|footer|form|frame|frameset|h1|h2|h3|h4|h5|h6|head|header|hgroup|hr|html|i|iframe|img|input|ins|keygen|kbd|label|legend|li|link|map|mark|menu|meta|meter|nav|noframes|noscript|object|ol|optgroup|option|output|p|param|pre|progress|q|rp|rt|ruby|s|samp|script|section|select|small|source|span|strike|strong|style|sub|summary|sup|table|tbody|td|textarea|tfoot|th|thead|time|title|tr|tt|u|ul|var|video|wbr|xmp".split("|")), u = "\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))";
- this.$rules = {start: [
- {token: "comment", regex: "\\/\\/.*$"},
- {token: "comment", regex: "\\/\\*", next: "comment"},
- {token: "string", regex: '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},
- {token: "string", regex: "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},
- {token: "constant.numeric", regex: u + "(?:em|ex|px|cm|mm|in|pt|pc|deg|rad|grad|ms|s|hz|khz|%)"},
- {token: "constant.numeric", regex: "#[a-f0-9]{6}"},
- {token: "constant.numeric", regex: "#[a-f0-9]{3}"},
- {token: "constant.numeric", regex: u},
- {token: function (e) {
- return s.hasOwnProperty(e) ? "keyword" : "variable"
- }, regex: "@[a-z0-9_\\-@]*\\b"},
- {token: function (i) {
- return e.hasOwnProperty(i.toLowerCase()) ? "support.type" : s.hasOwnProperty(i) ? "keyword" : n.hasOwnProperty(i) ? "constant.language" : t.hasOwnProperty(i) ? "support.function" : r.hasOwnProperty(i.toLowerCase()) ? "support.constant.color" : o.hasOwnProperty(i.toLowerCase()) ? "variable.language" : "text"
- }, regex: "\\-?[@a-z_][@a-z0-9_\\-]*"},
- {token: "variable.language", regex: "#[a-z0-9-_]+"},
- {token: "variable.language", regex: "\\.[a-z0-9-_]+"},
- {token: "variable.language", regex: ":[a-z0-9-_]+"},
- {token: "constant", regex: "[a-z0-9-_]+"},
- {token: "keyword.operator", regex: "<|>|<=|>=|==|!=|-|%|#|\\+|\\$|\\+|\\*"},
- {token: "paren.lparen", regex: "[[({]"},
- {token: "paren.rparen", regex: "[\\])}]"},
- {token: "text", regex: "\\s+"}
- ], comment: [
- {token: "comment", regex: ".*?\\*\\/", next: "start"},
- {token: "comment", regex: ".+"}
- ]}
- };
- r.inherits(o, s), t.LessHighlightRules = o
-}), ace.define("ace/mode/coffee_highlight_rules", ["require", "exports", "module", "ace/lib/oop", "ace/mode/text_highlight_rules"], function (e, t, n) {
- function s() {
- var e = "[$A-Za-z_\\x7f-\\uffff][$\\w\\x7f-\\uffff]*", t = "this|throw|then|try|typeof|super|switch|return|break|by|continue|catch|class|in|instanceof|is|isnt|if|else|extends|for|forown|finally|function|while|when|new|no|not|delete|debugger|do|loop|of|off|or|on|unless|until|and|yes", n = "true|false|null|undefined|NaN|Infinity", r = "case|const|default|function|var|void|with|enum|export|implements|interface|let|package|private|protected|public|static|yield|__hasProp|slice|bind|indexOf", i = "Array|Boolean|Date|Function|Number|Object|RegExp|ReferenceError|String|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray", s = "Math|JSON|isNaN|isFinite|parseInt|parseFloat|encodeURI|encodeURIComponent|decodeURI|decodeURIComponent|String|", o = "window|arguments|prototype|document", u = this.createKeywordMapper({keyword: t, "constant.language": n, "invalid.illegal": r, "language.support.class": i, "language.support.function": s, "variable.language": o}, "identifier"), a = {token: ["paren.lparen", "variable.parameter", "paren.rparen", "text", "storage.type"], regex: /(?:(\()((?:"[^")]*?"|'[^')]*?'|\/[^\/)]*?\/|[^()\"'\/])*?)(\))(\s*))?([\-=]>)/.source}, f = /\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|[0-2][0-7]{0,2}|3[0-6][0-7]?|37[0-7]?|[4-7][0-7]?|.)/;
- this.$rules = {start: [
- {token: "constant.numeric", regex: "(?:0x[\\da-fA-F]+|(?:\\d+(?:\\.\\d+)?|\\.\\d+)(?:[eE][+-]?\\d+)?)"},
- {stateName: "qdoc", token: "string", regex: "'''", next: [
- {token: "string", regex: "'''", next: "start"},
- {token: "constant.language.escape", regex: f},
- {defaultToken: "string"}
- ]},
- {stateName: "qqdoc", token: "string", regex: '"""', next: [
- {token: "string", regex: '"""', next: "start"},
- {token: "constant.language.escape", regex: f},
- {defaultToken: "string"}
- ]},
- {stateName: "qstring", token: "string", regex: "'", next: [
- {token: "string", regex: "'", next: "start"},
- {token: "constant.language.escape", regex: f},
- {defaultToken: "string"}
- ]},
- {stateName: "qqstring", token: "string.start", regex: '"', next: [
- {token: "string.end", regex: '"', next: "start"},
- {token: "constant.language.escape", regex: f},
- {defaultToken: "string"}
- ]},
- {stateName: "js", token: "string", regex: "`", next: [
- {token: "string", regex: "`", next: "start"},
- {token: "constant.language.escape", regex: f},
- {defaultToken: "string"}
- ]},
- {token: "string.regex", regex: "///", next: "heregex"},
- {token: "string.regex", regex: /(?:\/(?![\s=])[^[\/\n\\]*(?:(?:\\[\s\S]|\[[^\]\n\\]*(?:\\[\s\S][^\]\n\\]*)*])[^[\/\n\\]*)*\/)(?:[imgy]{0,4})(?!\w)/},
- {token: "comment", regex: "###(?!#)", next: "comment"},
- {token: "comment", regex: "#.*"},
- {token: ["punctuation.operator", "text", "identifier"], regex: "(\\.)(\\s*)(" + r + ")"},
- {token: "punctuation.operator", regex: "\\."},
- {token: ["keyword", "text", "language.support.class", "text", "keyword", "text", "language.support.class"], regex: "(class)(\\s+)(" + e + ")(?:(\\s+)(extends)(\\s+)(" + e + "))?"},
- {token: ["entity.name.function", "text", "keyword.operator", "text"].concat(a.token), regex: "(" + e + ")(\\s*)([=:])(\\s*)" + a.regex},
- a,
- {token: "variable", regex: "@(?:" + e + ")?"},
- {token: u, regex: e},
- {token: "punctuation.operator", regex: "\\,|\\."},
- {token: "storage.type", regex: "[\\-=]>"},
- {token: "keyword.operator", regex: "(?:[-+*/%<>&|^!?=]=|>>>=?|\\-\\-|\\+\\+|::|&&=|\\|\\|=|<<=|>>=|\\?\\.|\\.{2,3}|[!*+-=><])"},
- {token: "paren.lparen", regex: "[({[]"},
- {token: "paren.rparen", regex: "[\\]})]"},
- {token: "text", regex: "\\s+"}
- ], heregex: [
- {token: "string.regex", regex: ".*?///[imgy]{0,4}", next: "start"},
- {token: "comment.regex", regex: "\\s+(?:#.*)?"},
- {token: "string.regex", regex: "\\S+"}
- ], comment: [
- {token: "comment", regex: "###", next: "start"},
- {defaultToken: "comment"}
- ]}, this.normalizeRules()
- }
-
- var r = e("../lib/oop"), i = e("./text_highlight_rules").TextHighlightRules;
- r.inherits(s, i), t.CoffeeHighlightRules = s
-}), ace.define("ace/mode/folding/coffee", ["require", "exports", "module", "ace/lib/oop", "ace/mode/folding/fold_mode", "ace/range"], function (e, t, n) {
- var r = e("../../lib/oop"), i = e("./fold_mode").FoldMode, s = e("../../range").Range, o = t.FoldMode = function () {
- };
- r.inherits(o, i), function () {
- this.getFoldWidgetRange = function (e, t, n) {
- var r = this.indentationBlock(e, n);
- if (r)return r;
- var i = /\S/, o = e.getLine(n), u = o.search(i);
- if (u == -1 || o[u] != "#")return;
- var a = o.length, f = e.getLength(), l = n, c = n;
- while (++n < f) {
- o = e.getLine(n);
- var h = o.search(i);
- if (h == -1)continue;
- if (o[h] != "#")break;
- c = n
- }
- if (c > l) {
- var p = e.getLine(c).length;
- return new s(l, a, c, p)
- }
- }, this.getFoldWidget = function (e, t, n) {
- var r = e.getLine(n), i = r.search(/\S/), s = e.getLine(n + 1), o = e.getLine(n - 1), u = o.search(/\S/), a = s.search(/\S/);
- if (i == -1)return e.foldWidgets[n - 1] = u != -1 && u < a ? "start" : "", "";
- if (u == -1) {
- if (i == a && r[i] == "#" && s[i] == "#")return e.foldWidgets[n - 1] = "", e.foldWidgets[n + 1] = "", "start"
- } else if (u == i && r[i] == "#" && o[i] == "#" && e.getLine(n - 2).search(/\S/) == -1)return e.foldWidgets[n - 1] = "start", e.foldWidgets[n + 1] = "", "";
- return u != -1 && u < i ? e.foldWidgets[n - 1] = "start" : e.foldWidgets[n - 1] = "", i < a ? "start" : ""
- }
- }.call(o.prototype)
-})
\ No newline at end of file
diff --git a/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/mode-java.js b/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/mode-java.js
deleted file mode 100644
index 50cbe8c..0000000
--- a/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/mode-java.js
+++ /dev/null
@@ -1,316 +0,0 @@
-ace.define("ace/mode/java", ["require", "exports", "module", "ace/lib/oop", "ace/mode/javascript", "ace/tokenizer", "ace/mode/java_highlight_rules"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("./javascript").Mode, s = e("../tokenizer").Tokenizer, o = e("./java_highlight_rules").JavaHighlightRules, u = function () {
- i.call(this), this.$tokenizer = new s((new o).getRules())
- };
- r.inherits(u, i), function () {
- this.createWorker = function (e) {
- return null
- }
- }.call(u.prototype), t.Mode = u
-}), ace.define("ace/mode/javascript", ["require", "exports", "module", "ace/lib/oop", "ace/mode/text", "ace/tokenizer", "ace/mode/javascript_highlight_rules", "ace/mode/matching_brace_outdent", "ace/range", "ace/worker/worker_client", "ace/mode/behaviour/cstyle", "ace/mode/folding/cstyle"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("./text").Mode, s = e("../tokenizer").Tokenizer, o = e("./javascript_highlight_rules").JavaScriptHighlightRules, u = e("./matching_brace_outdent").MatchingBraceOutdent, a = e("../range").Range, f = e("../worker/worker_client").WorkerClient, l = e("./behaviour/cstyle").CstyleBehaviour, c = e("./folding/cstyle").FoldMode, h = function () {
- this.$tokenizer = new s((new o).getRules()), this.$outdent = new u, this.$behaviour = new l, this.foldingRules = new c
- };
- r.inherits(h, i), function () {
- this.toggleCommentLines = function (e, t, n, r) {
- var i = !0, s = /^(\s*)\/\//;
- for (var o = n; o <= r; o++)if (!s.test(t.getLine(o))) {
- i = !1;
- break
- }
- if (i) {
- var u = new a(0, 0, 0, 0);
- for (var o = n; o <= r; o++) {
- var f = t.getLine(o), l = f.match(s);
- u.start.row = o, u.end.row = o, u.end.column = l[0].length, t.replace(u, l[1])
- }
- } else t.indentRows(n, r, "//")
- }, this.getNextLineIndent = function (e, t, n) {
- var r = this.$getIndent(t), i = this.$tokenizer.getLineTokens(t, e), s = i.tokens, o = i.state;
- if (s.length && s[s.length - 1].type == "comment")return r;
- if (e == "start" || e == "regex_allowed") {
- var u = t.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/);
- u && (r += n)
- } else if (e == "doc-start") {
- if (o == "start" || e == "regex_allowed")return"";
- var u = t.match(/^\s*(\/?)\*/);
- u && (u[1] && (r += " "), r += "* ")
- }
- return r
- }, this.checkOutdent = function (e, t, n) {
- return this.$outdent.checkOutdent(t, n)
- }, this.autoOutdent = function (e, t, n) {
- this.$outdent.autoOutdent(t, n)
- }, this.createWorker = function (e) {
- var t = new f(["ace"], "ace/mode/javascript_worker", "JavaScriptWorker");
- return t.attachToDocument(e.getDocument()), t.on("jslint", function (t) {
- e.setAnnotations(t.data)
- }), t.on("terminate", function () {
- e.clearAnnotations()
- }), t
- }
- }.call(h.prototype), t.Mode = h
-}), ace.define("ace/mode/javascript_highlight_rules", ["require", "exports", "module", "ace/lib/oop", "ace/mode/doc_comment_highlight_rules", "ace/mode/text_highlight_rules"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("./doc_comment_highlight_rules").DocCommentHighlightRules, s = e("./text_highlight_rules").TextHighlightRules, o = function () {
- var e = this.createKeywordMapper({"variable.language": "Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document", keyword: "const|yield|import|get|set|break|case|catch|continue|default|delete|do|else|finally|for|function|if|in|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|__parent__|__count__|escape|unescape|with|__proto__|class|enum|extends|super|export|implements|private|public|interface|package|protected|static", "storage.type": "const|let|var|function", "constant.language": "null|Infinity|NaN|undefined", "support.function": "alert", "constant.language.boolean": "true|false"}, "identifier"), t = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void", n = "[a-zA-Z\\$_¡-￿][a-zA-Z\\d\\$_¡-￿]*\\b", r = "\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|[0-2][0-7]{0,2}|3[0-6][0-7]?|37[0-7]?|[4-7][0-7]?|.)";
- this.$rules = {start: [
- {token: "comment", regex: /\/\/.*$/},
- i.getStartRule("doc-start"),
- {token: "comment", regex: /\/\*/, next: "comment"},
- {token: "string", regex: "'(?=.)", next: "qstring"},
- {token: "string", regex: '"(?=.)', next: "qqstring"},
- {token: "constant.numeric", regex: /0[xX][0-9a-fA-F]+\b/},
- {token: "constant.numeric", regex: /[+-]?\d+(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?\b/},
- {token: ["storage.type", "punctuation.operator", "support.function", "punctuation.operator", "entity.name.function", "text", "keyword.operator"], regex: "(" + n + ")(\\.)(prototype)(\\.)(" + n + ")(\\s*)(=)", next: "function_arguments"},
- {token: ["storage.type", "punctuation.operator", "entity.name.function", "text", "keyword.operator", "text", "storage.type", "text", "paren.lparen"], regex: "(" + n + ")(\\.)(" + n + ")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", next: "function_arguments"},
- {token: ["entity.name.function", "text", "keyword.operator", "text", "storage.type", "text", "paren.lparen"], regex: "(" + n + ")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", next: "function_arguments"},
- {token: ["storage.type", "punctuation.operator", "entity.name.function", "text", "keyword.operator", "text", "storage.type", "text", "entity.name.function", "text", "paren.lparen"], regex: "(" + n + ")(\\.)(" + n + ")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()", next: "function_arguments"},
- {token: ["storage.type", "text", "entity.name.function", "text", "paren.lparen"], regex: "(function)(\\s+)(" + n + ")(\\s*)(\\()", next: "function_arguments"},
- {token: ["entity.name.function", "text", "punctuation.operator", "text", "storage.type", "text", "paren.lparen"], regex: "(" + n + ")(\\s*)(:)(\\s*)(function)(\\s*)(\\()", next: "function_arguments"},
- {token: ["text", "text", "storage.type", "text", "paren.lparen"], regex: "(:)(\\s*)(function)(\\s*)(\\()", next: "function_arguments"},
- {token: "keyword", regex: "(?:" + t + ")\\b", next: "regex_allowed"},
- {token: ["punctuation.operator", "support.function"], regex: /(\.)(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:opzzzz|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/},
- {token: ["punctuation.operator", "support.function.dom"], regex: /(\.)(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/},
- {token: ["punctuation.operator", "support.constant"], regex: /(\.)(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/},
- {token: ["storage.type", "punctuation.operator", "support.function.firebug"], regex: /(console)(\.)(warn|info|log|error|time|timeEnd|assert)\b/},
- {token: e, regex: n},
- {token: "keyword.operator", regex: /--|\+\+|[!$%&*+\-~]|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|\*=|%=|\+=|\-=|&=|\^=/, next: "regex_allowed"},
- {token: "punctuation.operator", regex: /\?|\:|\,|\;|\./, next: "regex_allowed"},
- {token: "paren.lparen", regex: /[\[({]/, next: "regex_allowed"},
- {token: "paren.rparen", regex: /[\])}]/},
- {token: "keyword.operator", regex: /\/=?/, next: "regex_allowed"},
- {token: "comment", regex: /^#!.*$/}
- ], regex_allowed: [i.getStartRule("doc-start"), {token: "comment", regex: "\\/\\*", next: "comment_regex_allowed"}, {token: "comment", regex: "\\/\\/.*$"}, {token: "string.regexp", regex: "\\/", next: "regex"}, {token: "text", regex: "\\s+"}, {token: "empty", regex: "", next: "start"}], regex: [
- {token: "regexp.keyword.operator", regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},
- {token: "string.regexp", regex: "/\\w*", next: "start"},
- {token: "invalid", regex: /\{\d+,?(?:\d+)?}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/},
- {token: "constant.language.escape", regex: /\(\?[:=!]|\)|{\d+,?(?:\d+)?}|{,\d+}|[+*]\?|[()$^+*?]/},
- {token: "constant.language.delimiter", regex: /\|/},
- {token: "constant.language.escape", regex: /\[\^?/, next: "regex_character_class"},
- {token: "empty", regex: "$", next: "start"},
- {defaultToken: "string.regexp"}
- ], regex_character_class: [
- {token: "regexp.keyword.operator", regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},
- {token: "constant.language.escape", regex: "]", next: "regex"},
- {token: "constant.language.escape", regex: "-"},
- {token: "empty", regex: "$", next: "start"},
- {defaultToken: "string.regexp.charachterclass"}
- ], function_arguments: [
- {token: "variable.parameter", regex: n},
- {token: "punctuation.operator", regex: "[, ]+"},
- {token: "punctuation.operator", regex: "$"},
- {token: "empty", regex: "", next: "start"}
- ], comment_regex_allowed: [
- {token: "comment", regex: "\\*\\/", next: "regex_allowed"},
- {defaultToken: "comment"}
- ], comment: [
- {token: "comment", regex: "\\*\\/", next: "start"},
- {defaultToken: "comment"}
- ], qqstring: [
- {token: "constant.language.escape", regex: r},
- {token: "string", regex: "\\\\$", next: "qqstring"},
- {token: "string", regex: '"|$', next: "start"},
- {defaultToken: "string"}
- ], qstring: [
- {token: "constant.language.escape", regex: r},
- {token: "string", regex: "\\\\$", next: "qstring"},
- {token: "string", regex: "'|$", next: "start"},
- {defaultToken: "string"}
- ]}, this.embedRules(i, "doc-", [i.getEndRule("start")])
- };
- r.inherits(o, s), t.JavaScriptHighlightRules = o
-}), ace.define("ace/mode/doc_comment_highlight_rules", ["require", "exports", "module", "ace/lib/oop", "ace/mode/text_highlight_rules"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("./text_highlight_rules").TextHighlightRules, s = function () {
- this.$rules = {start: [
- {token: "comment.doc.tag", regex: "@[\\w\\d_]+"},
- {token: "comment.doc.tag", regex: "\\bTODO\\b"},
- {defaultToken: "comment.doc"}
- ]}
- };
- r.inherits(s, i), s.getStartRule = function (e) {
- return{token: "comment.doc", regex: "\\/\\*(?=\\*)", next: e}
- }, s.getEndRule = function (e) {
- return{token: "comment.doc", regex: "\\*\\/", next: e}
- }, t.DocCommentHighlightRules = s
-}), ace.define("ace/mode/matching_brace_outdent", ["require", "exports", "module", "ace/range"], function (e, t, n) {
- var r = e("../range").Range, i = function () {
- };
- (function () {
- this.checkOutdent = function (e, t) {
- return/^\s+$/.test(e) ? /^\s*\}/.test(t) : !1
- }, this.autoOutdent = function (e, t) {
- var n = e.getLine(t), i = n.match(/^(\s*\})/);
- if (!i)return 0;
- var s = i[1].length, o = e.findMatchingBracket({row: t, column: s});
- if (!o || o.row == t)return 0;
- var u = this.$getIndent(e.getLine(o.row));
- e.replace(new r(t, 0, t, s - 1), u)
- }, this.$getIndent = function (e) {
- var t = e.match(/^(\s+)/);
- return t ? t[1] : ""
- }
- }).call(i.prototype), t.MatchingBraceOutdent = i
-}), ace.define("ace/mode/behaviour/cstyle", ["require", "exports", "module", "ace/lib/oop", "ace/mode/behaviour", "ace/token_iterator", "ace/lib/lang"], function (e, t, n) {
- var r = e("../../lib/oop"), i = e("../behaviour").Behaviour, s = e("../../token_iterator").TokenIterator, o = e("../../lib/lang"), u = ["text", "paren.rparen", "punctuation.operator"], a = ["text", "paren.rparen", "punctuation.operator", "comment"], f = 0, l = -1, c = "", h = 0, p = -1, d = "", v = "", m = function () {
- m.isSaneInsertion = function (e, t) {
- var n = e.getCursorPosition(), r = new s(t, n.row, n.column);
- if (!this.$matchTokenType(r.getCurrentToken() || "text", u)) {
- var i = new s(t, n.row, n.column + 1);
- if (!this.$matchTokenType(i.getCurrentToken() || "text", u))return!1
- }
- return r.stepForward(), r.getCurrentTokenRow() !== n.row || this.$matchTokenType(r.getCurrentToken() || "text", a)
- }, m.$matchTokenType = function (e, t) {
- return t.indexOf(e.type || e) > -1
- }, m.recordAutoInsert = function (e, t, n) {
- var r = e.getCursorPosition(), i = t.doc.getLine(r.row);
- this.isAutoInsertedClosing(r, i, c[0]) || (f = 0), l = r.row, c = n + i.substr(r.column), f++
- }, m.recordMaybeInsert = function (e, t, n) {
- var r = e.getCursorPosition(), i = t.doc.getLine(r.row);
- this.isMaybeInsertedClosing(r, i) || (h = 0), p = r.row, d = i.substr(0, r.column) + n, v = i.substr(r.column), h++
- }, m.isAutoInsertedClosing = function (e, t, n) {
- return f > 0 && e.row === l && n === c[0] && t.substr(e.column) === c
- }, m.isMaybeInsertedClosing = function (e, t) {
- return h > 0 && e.row === p && t.substr(e.column) === v && t.substr(0, e.column) == d
- }, m.popAutoInsertedClosing = function () {
- c = c.substr(1), f--
- }, m.clearMaybeInsertedClosing = function () {
- h = 0, p = -1
- }, this.add("braces", "insertion", function (e, t, n, r, i) {
- var s = n.getCursorPosition(), u = r.doc.getLine(s.row);
- if (i == "{") {
- var a = n.getSelectionRange(), f = r.doc.getTextRange(a);
- if (f !== "" && f !== "{" && n.getWrapBehavioursEnabled())return{text: "{" + f + "}", selection: !1};
- if (m.isSaneInsertion(n, r))return/[\]\}\)]/.test(u[s.column]) ? (m.recordAutoInsert(n, r, "}"), {text: "{}", selection: [1, 1]}) : (m.recordMaybeInsert(n, r, "{"), {text: "{", selection: [1, 1]})
- } else if (i == "}") {
- var l = u.substring(s.column, s.column + 1);
- if (l == "}") {
- var c = r.$findOpeningBracket("}", {column: s.column + 1, row: s.row});
- if (c !== null && m.isAutoInsertedClosing(s, u, i))return m.popAutoInsertedClosing(), {text: "", selection: [1, 1]}
- }
- } else if (i == "\n" || i == "\r\n") {
- var p = "";
- m.isMaybeInsertedClosing(s, u) && (p = o.stringRepeat("}", h), m.clearMaybeInsertedClosing());
- var l = u.substring(s.column, s.column + 1);
- if (l == "}" || p !== "") {
- var d = r.findMatchingBracket({row: s.row, column: s.column}, "}");
- if (!d)return null;
- var v = this.getNextLineIndent(e, u.substring(0, s.column), r.getTabString()), g = this.$getIndent(u);
- return{text: "\n" + v + "\n" + g + p, selection: [1, v.length, 1, v.length]}
- }
- }
- }), this.add("braces", "deletion", function (e, t, n, r, i) {
- var s = r.doc.getTextRange(i);
- if (!i.isMultiLine() && s == "{") {
- var o = r.doc.getLine(i.start.row), u = o.substring(i.end.column, i.end.column + 1);
- if (u == "}")return i.end.column++, i;
- h--
- }
- }), this.add("parens", "insertion", function (e, t, n, r, i) {
- if (i == "(") {
- var s = n.getSelectionRange(), o = r.doc.getTextRange(s);
- if (o !== "" && n.getWrapBehavioursEnabled())return{text: "(" + o + ")", selection: !1};
- if (m.isSaneInsertion(n, r))return m.recordAutoInsert(n, r, ")"), {text: "()", selection: [1, 1]}
- } else if (i == ")") {
- var u = n.getCursorPosition(), a = r.doc.getLine(u.row), f = a.substring(u.column, u.column + 1);
- if (f == ")") {
- var l = r.$findOpeningBracket(")", {column: u.column + 1, row: u.row});
- if (l !== null && m.isAutoInsertedClosing(u, a, i))return m.popAutoInsertedClosing(), {text: "", selection: [1, 1]}
- }
- }
- }), this.add("parens", "deletion", function (e, t, n, r, i) {
- var s = r.doc.getTextRange(i);
- if (!i.isMultiLine() && s == "(") {
- var o = r.doc.getLine(i.start.row), u = o.substring(i.start.column + 1, i.start.column + 2);
- if (u == ")")return i.end.column++, i
- }
- }), this.add("brackets", "insertion", function (e, t, n, r, i) {
- if (i == "[") {
- var s = n.getSelectionRange(), o = r.doc.getTextRange(s);
- if (o !== "" && n.getWrapBehavioursEnabled())return{text: "[" + o + "]", selection: !1};
- if (m.isSaneInsertion(n, r))return m.recordAutoInsert(n, r, "]"), {text: "[]", selection: [1, 1]}
- } else if (i == "]") {
- var u = n.getCursorPosition(), a = r.doc.getLine(u.row), f = a.substring(u.column, u.column + 1);
- if (f == "]") {
- var l = r.$findOpeningBracket("]", {column: u.column + 1, row: u.row});
- if (l !== null && m.isAutoInsertedClosing(u, a, i))return m.popAutoInsertedClosing(), {text: "", selection: [1, 1]}
- }
- }
- }), this.add("brackets", "deletion", function (e, t, n, r, i) {
- var s = r.doc.getTextRange(i);
- if (!i.isMultiLine() && s == "[") {
- var o = r.doc.getLine(i.start.row), u = o.substring(i.start.column + 1, i.start.column + 2);
- if (u == "]")return i.end.column++, i
- }
- }), this.add("string_dquotes", "insertion", function (e, t, n, r, i) {
- if (i == '"' || i == "'") {
- var s = i, o = n.getSelectionRange(), u = r.doc.getTextRange(o);
- if (u !== "" && u !== "'" && u != '"' && n.getWrapBehavioursEnabled())return{text: s + u + s, selection: !1};
- var a = n.getCursorPosition(), f = r.doc.getLine(a.row), l = f.substring(a.column - 1, a.column);
- if (l == "\\")return null;
- var c = r.getTokens(o.start.row), h = 0, p, d = -1;
- for (var v = 0; v < c.length; v++) {
- p = c[v], p.type == "string" ? d = -1 : d < 0 && (d = p.value.indexOf(s));
- if (p.value.length + h > o.start.column)break;
- h += c[v].value.length
- }
- if (!p || d < 0 && p.type !== "comment" && (p.type !== "string" || o.start.column !== p.value.length + h - 1 && p.value.lastIndexOf(s) === p.value.length - 1)) {
- if (!m.isSaneInsertion(n, r))return;
- return{text: s + s, selection: [1, 1]}
- }
- if (p && p.type === "string") {
- var g = f.substring(a.column, a.column + 1);
- if (g == s)return{text: "", selection: [1, 1]}
- }
- }
- }), this.add("string_dquotes", "deletion", function (e, t, n, r, i) {
- var s = r.doc.getTextRange(i);
- if (!i.isMultiLine() && (s == '"' || s == "'")) {
- var o = r.doc.getLine(i.start.row), u = o.substring(i.start.column + 1, i.start.column + 2);
- if (u == s)return i.end.column++, i
- }
- })
- };
- r.inherits(m, i), t.CstyleBehaviour = m
-}), ace.define("ace/mode/folding/cstyle", ["require", "exports", "module", "ace/lib/oop", "ace/range", "ace/mode/folding/fold_mode"], function (e, t, n) {
- var r = e("../../lib/oop"), i = e("../../range").Range, s = e("./fold_mode").FoldMode, o = t.FoldMode = function () {
- };
- r.inherits(o, s), function () {
- this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/, this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/, this.getFoldWidgetRange = function (e, t, n) {
- var r = e.getLine(n), i = r.match(this.foldingStartMarker);
- if (i) {
- var s = i.index;
- return i[1] ? this.openingBracketBlock(e, i[1], n, s) : e.getCommentFoldRange(n, s + i[0].length, 1)
- }
- if (t !== "markbeginend")return;
- var i = r.match(this.foldingStopMarker);
- if (i) {
- var s = i.index + i[0].length;
- return i[1] ? this.closingBracketBlock(e, i[1], n, s) : e.getCommentFoldRange(n, s, -1)
- }
- }
- }.call(o.prototype)
-}), ace.define("ace/mode/java_highlight_rules", ["require", "exports", "module", "ace/lib/oop", "ace/mode/doc_comment_highlight_rules", "ace/mode/text_highlight_rules"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("./doc_comment_highlight_rules").DocCommentHighlightRules, s = e("./text_highlight_rules").TextHighlightRules, o = function () {
- var e = "abstract|continue|for|new|switch|assert|default|goto|package|synchronized|boolean|do|if|private|this|break|double|implements|protected|throw|byte|else|import|public|throws|case|enum|instanceof|return|transient|catch|extends|int|short|try|char|final|interface|static|void|class|finally|long|strictfp|volatile|const|float|native|super|while", t = "null|Infinity|NaN|undefined", n = "AbstractMethodError|AssertionError|ClassCircularityError|ClassFormatError|Deprecated|EnumConstantNotPresentException|ExceptionInInitializerError|IllegalAccessError|IllegalThreadStateException|InstantiationError|InternalError|NegativeArraySizeException|NoSuchFieldError|Override|Process|ProcessBuilder|SecurityManager|StringIndexOutOfBoundsException|SuppressWarnings|TypeNotPresentException|UnknownError|UnsatisfiedLinkError|UnsupportedClassVersionError|VerifyError|InstantiationException|IndexOutOfBoundsException|ArrayIndexOutOfBoundsException|CloneNotSupportedException|NoSuchFieldException|IllegalArgumentException|NumberFormatException|SecurityException|Void|InheritableThreadLocal|IllegalStateException|InterruptedException|NoSuchMethodException|IllegalAccessException|UnsupportedOperationException|Enum|StrictMath|Package|Compiler|Readable|Runtime|StringBuilder|Math|IncompatibleClassChangeError|NoSuchMethodError|ThreadLocal|RuntimePermission|ArithmeticException|NullPointerException|Long|Integer|Short|Byte|Double|Number|Float|Character|Boolean|StackTraceElement|Appendable|StringBuffer|Iterable|ThreadGroup|Runnable|Thread|IllegalMonitorStateException|StackOverflowError|OutOfMemoryError|VirtualMachineError|ArrayStoreException|ClassCastException|LinkageError|NoClassDefFoundError|ClassNotFoundException|RuntimeException|Exception|ThreadDeath|Error|Throwable|System|ClassLoader|Cloneable|Class|CharSequence|Comparable|String|Object", r = this.createKeywordMapper({"variable.language": "this", keyword: e, "constant.language": t, "support.function": n}, "identifier");
- this.$rules = {start: [
- {token: "comment", regex: "\\/\\/.*$"},
- i.getStartRule("doc-start"),
- {token: "comment", regex: "\\/\\*", next: "comment"},
- {token: "string.regexp", regex: "[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/]\\w*\\s*(?=[).,;]|$)"},
- {token: "string", regex: '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},
- {token: "string", regex: "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},
- {token: "constant.numeric", regex: "0[xX][0-9a-fA-F]+\\b"},
- {token: "constant.numeric", regex: "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},
- {token: "constant.language.boolean", regex: "(?:true|false)\\b"},
- {token: r, regex: "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},
- {token: "keyword.operator", regex: "!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)"},
- {token: "lparen", regex: "[[({]"},
- {token: "rparen", regex: "[\\])}]"},
- {token: "text", regex: "\\s+"}
- ], comment: [
- {token: "comment", regex: ".*?\\*\\/", next: "start"},
- {token: "comment", regex: ".+"}
- ]}, this.embedRules(i, "doc-", [i.getEndRule("start")])
- };
- r.inherits(o, s), t.JavaHighlightRules = o
-})
\ No newline at end of file
diff --git a/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/mode-javascript.js b/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/mode-javascript.js
deleted file mode 100644
index 5de4a1c..0000000
--- a/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/mode-javascript.js
+++ /dev/null
@@ -1,283 +0,0 @@
-ace.define("ace/mode/javascript", ["require", "exports", "module", "ace/lib/oop", "ace/mode/text", "ace/tokenizer", "ace/mode/javascript_highlight_rules", "ace/mode/matching_brace_outdent", "ace/range", "ace/worker/worker_client", "ace/mode/behaviour/cstyle", "ace/mode/folding/cstyle"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("./text").Mode, s = e("../tokenizer").Tokenizer, o = e("./javascript_highlight_rules").JavaScriptHighlightRules, u = e("./matching_brace_outdent").MatchingBraceOutdent, a = e("../range").Range, f = e("../worker/worker_client").WorkerClient, l = e("./behaviour/cstyle").CstyleBehaviour, c = e("./folding/cstyle").FoldMode, h = function () {
- this.$tokenizer = new s((new o).getRules()), this.$outdent = new u, this.$behaviour = new l, this.foldingRules = new c
- };
- r.inherits(h, i), function () {
- this.toggleCommentLines = function (e, t, n, r) {
- var i = !0, s = /^(\s*)\/\//;
- for (var o = n; o <= r; o++)if (!s.test(t.getLine(o))) {
- i = !1;
- break
- }
- if (i) {
- var u = new a(0, 0, 0, 0);
- for (var o = n; o <= r; o++) {
- var f = t.getLine(o), l = f.match(s);
- u.start.row = o, u.end.row = o, u.end.column = l[0].length, t.replace(u, l[1])
- }
- } else t.indentRows(n, r, "//")
- }, this.getNextLineIndent = function (e, t, n) {
- var r = this.$getIndent(t), i = this.$tokenizer.getLineTokens(t, e), s = i.tokens, o = i.state;
- if (s.length && s[s.length - 1].type == "comment")return r;
- if (e == "start" || e == "regex_allowed") {
- var u = t.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/);
- u && (r += n)
- } else if (e == "doc-start") {
- if (o == "start" || e == "regex_allowed")return"";
- var u = t.match(/^\s*(\/?)\*/);
- u && (u[1] && (r += " "), r += "* ")
- }
- return r
- }, this.checkOutdent = function (e, t, n) {
- return this.$outdent.checkOutdent(t, n)
- }, this.autoOutdent = function (e, t, n) {
- this.$outdent.autoOutdent(t, n)
- }, this.createWorker = function (e) {
- var t = new f(["ace"], "ace/mode/javascript_worker", "JavaScriptWorker");
- return t.attachToDocument(e.getDocument()), t.on("jslint", function (t) {
- e.setAnnotations(t.data)
- }), t.on("terminate", function () {
- e.clearAnnotations()
- }), t
- }
- }.call(h.prototype), t.Mode = h
-}), ace.define("ace/mode/javascript_highlight_rules", ["require", "exports", "module", "ace/lib/oop", "ace/mode/doc_comment_highlight_rules", "ace/mode/text_highlight_rules"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("./doc_comment_highlight_rules").DocCommentHighlightRules, s = e("./text_highlight_rules").TextHighlightRules, o = function () {
- var e = this.createKeywordMapper({"variable.language": "Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document", keyword: "const|yield|import|get|set|break|case|catch|continue|default|delete|do|else|finally|for|function|if|in|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|__parent__|__count__|escape|unescape|with|__proto__|class|enum|extends|super|export|implements|private|public|interface|package|protected|static", "storage.type": "const|let|var|function", "constant.language": "null|Infinity|NaN|undefined", "support.function": "alert", "constant.language.boolean": "true|false"}, "identifier"), t = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void", n = "[a-zA-Z\\$_¡-￿][a-zA-Z\\d\\$_¡-￿]*\\b", r = "\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|[0-2][0-7]{0,2}|3[0-6][0-7]?|37[0-7]?|[4-7][0-7]?|.)";
- this.$rules = {start: [
- {token: "comment", regex: /\/\/.*$/},
- i.getStartRule("doc-start"),
- {token: "comment", regex: /\/\*/, next: "comment"},
- {token: "string", regex: "'(?=.)", next: "qstring"},
- {token: "string", regex: '"(?=.)', next: "qqstring"},
- {token: "constant.numeric", regex: /0[xX][0-9a-fA-F]+\b/},
- {token: "constant.numeric", regex: /[+-]?\d+(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?\b/},
- {token: ["storage.type", "punctuation.operator", "support.function", "punctuation.operator", "entity.name.function", "text", "keyword.operator"], regex: "(" + n + ")(\\.)(prototype)(\\.)(" + n + ")(\\s*)(=)", next: "function_arguments"},
- {token: ["storage.type", "punctuation.operator", "entity.name.function", "text", "keyword.operator", "text", "storage.type", "text", "paren.lparen"], regex: "(" + n + ")(\\.)(" + n + ")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", next: "function_arguments"},
- {token: ["entity.name.function", "text", "keyword.operator", "text", "storage.type", "text", "paren.lparen"], regex: "(" + n + ")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", next: "function_arguments"},
- {token: ["storage.type", "punctuation.operator", "entity.name.function", "text", "keyword.operator", "text", "storage.type", "text", "entity.name.function", "text", "paren.lparen"], regex: "(" + n + ")(\\.)(" + n + ")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()", next: "function_arguments"},
- {token: ["storage.type", "text", "entity.name.function", "text", "paren.lparen"], regex: "(function)(\\s+)(" + n + ")(\\s*)(\\()", next: "function_arguments"},
- {token: ["entity.name.function", "text", "punctuation.operator", "text", "storage.type", "text", "paren.lparen"], regex: "(" + n + ")(\\s*)(:)(\\s*)(function)(\\s*)(\\()", next: "function_arguments"},
- {token: ["text", "text", "storage.type", "text", "paren.lparen"], regex: "(:)(\\s*)(function)(\\s*)(\\()", next: "function_arguments"},
- {token: "keyword", regex: "(?:" + t + ")\\b", next: "regex_allowed"},
- {token: ["punctuation.operator", "support.function"], regex: /(\.)(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:opzzzz|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/},
- {token: ["punctuation.operator", "support.function.dom"], regex: /(\.)(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/},
- {token: ["punctuation.operator", "support.constant"], regex: /(\.)(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/},
- {token: ["storage.type", "punctuation.operator", "support.function.firebug"], regex: /(console)(\.)(warn|info|log|error|time|timeEnd|assert)\b/},
- {token: e, regex: n},
- {token: "keyword.operator", regex: /--|\+\+|[!$%&*+\-~]|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|\*=|%=|\+=|\-=|&=|\^=/, next: "regex_allowed"},
- {token: "punctuation.operator", regex: /\?|\:|\,|\;|\./, next: "regex_allowed"},
- {token: "paren.lparen", regex: /[\[({]/, next: "regex_allowed"},
- {token: "paren.rparen", regex: /[\])}]/},
- {token: "keyword.operator", regex: /\/=?/, next: "regex_allowed"},
- {token: "comment", regex: /^#!.*$/}
- ], regex_allowed: [i.getStartRule("doc-start"), {token: "comment", regex: "\\/\\*", next: "comment_regex_allowed"}, {token: "comment", regex: "\\/\\/.*$"}, {token: "string.regexp", regex: "\\/", next: "regex"}, {token: "text", regex: "\\s+"}, {token: "empty", regex: "", next: "start"}], regex: [
- {token: "regexp.keyword.operator", regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},
- {token: "string.regexp", regex: "/\\w*", next: "start"},
- {token: "invalid", regex: /\{\d+,?(?:\d+)?}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/},
- {token: "constant.language.escape", regex: /\(\?[:=!]|\)|{\d+,?(?:\d+)?}|{,\d+}|[+*]\?|[()$^+*?]/},
- {token: "constant.language.delimiter", regex: /\|/},
- {token: "constant.language.escape", regex: /\[\^?/, next: "regex_character_class"},
- {token: "empty", regex: "$", next: "start"},
- {defaultToken: "string.regexp"}
- ], regex_character_class: [
- {token: "regexp.keyword.operator", regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},
- {token: "constant.language.escape", regex: "]", next: "regex"},
- {token: "constant.language.escape", regex: "-"},
- {token: "empty", regex: "$", next: "start"},
- {defaultToken: "string.regexp.charachterclass"}
- ], function_arguments: [
- {token: "variable.parameter", regex: n},
- {token: "punctuation.operator", regex: "[, ]+"},
- {token: "punctuation.operator", regex: "$"},
- {token: "empty", regex: "", next: "start"}
- ], comment_regex_allowed: [
- {token: "comment", regex: "\\*\\/", next: "regex_allowed"},
- {defaultToken: "comment"}
- ], comment: [
- {token: "comment", regex: "\\*\\/", next: "start"},
- {defaultToken: "comment"}
- ], qqstring: [
- {token: "constant.language.escape", regex: r},
- {token: "string", regex: "\\\\$", next: "qqstring"},
- {token: "string", regex: '"|$', next: "start"},
- {defaultToken: "string"}
- ], qstring: [
- {token: "constant.language.escape", regex: r},
- {token: "string", regex: "\\\\$", next: "qstring"},
- {token: "string", regex: "'|$", next: "start"},
- {defaultToken: "string"}
- ]}, this.embedRules(i, "doc-", [i.getEndRule("start")])
- };
- r.inherits(o, s), t.JavaScriptHighlightRules = o
-}), ace.define("ace/mode/doc_comment_highlight_rules", ["require", "exports", "module", "ace/lib/oop", "ace/mode/text_highlight_rules"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("./text_highlight_rules").TextHighlightRules, s = function () {
- this.$rules = {start: [
- {token: "comment.doc.tag", regex: "@[\\w\\d_]+"},
- {token: "comment.doc.tag", regex: "\\bTODO\\b"},
- {defaultToken: "comment.doc"}
- ]}
- };
- r.inherits(s, i), s.getStartRule = function (e) {
- return{token: "comment.doc", regex: "\\/\\*(?=\\*)", next: e}
- }, s.getEndRule = function (e) {
- return{token: "comment.doc", regex: "\\*\\/", next: e}
- }, t.DocCommentHighlightRules = s
-}), ace.define("ace/mode/matching_brace_outdent", ["require", "exports", "module", "ace/range"], function (e, t, n) {
- var r = e("../range").Range, i = function () {
- };
- (function () {
- this.checkOutdent = function (e, t) {
- return/^\s+$/.test(e) ? /^\s*\}/.test(t) : !1
- }, this.autoOutdent = function (e, t) {
- var n = e.getLine(t), i = n.match(/^(\s*\})/);
- if (!i)return 0;
- var s = i[1].length, o = e.findMatchingBracket({row: t, column: s});
- if (!o || o.row == t)return 0;
- var u = this.$getIndent(e.getLine(o.row));
- e.replace(new r(t, 0, t, s - 1), u)
- }, this.$getIndent = function (e) {
- var t = e.match(/^(\s+)/);
- return t ? t[1] : ""
- }
- }).call(i.prototype), t.MatchingBraceOutdent = i
-}), ace.define("ace/mode/behaviour/cstyle", ["require", "exports", "module", "ace/lib/oop", "ace/mode/behaviour", "ace/token_iterator", "ace/lib/lang"], function (e, t, n) {
- var r = e("../../lib/oop"), i = e("../behaviour").Behaviour, s = e("../../token_iterator").TokenIterator, o = e("../../lib/lang"), u = ["text", "paren.rparen", "punctuation.operator"], a = ["text", "paren.rparen", "punctuation.operator", "comment"], f = 0, l = -1, c = "", h = 0, p = -1, d = "", v = "", m = function () {
- m.isSaneInsertion = function (e, t) {
- var n = e.getCursorPosition(), r = new s(t, n.row, n.column);
- if (!this.$matchTokenType(r.getCurrentToken() || "text", u)) {
- var i = new s(t, n.row, n.column + 1);
- if (!this.$matchTokenType(i.getCurrentToken() || "text", u))return!1
- }
- return r.stepForward(), r.getCurrentTokenRow() !== n.row || this.$matchTokenType(r.getCurrentToken() || "text", a)
- }, m.$matchTokenType = function (e, t) {
- return t.indexOf(e.type || e) > -1
- }, m.recordAutoInsert = function (e, t, n) {
- var r = e.getCursorPosition(), i = t.doc.getLine(r.row);
- this.isAutoInsertedClosing(r, i, c[0]) || (f = 0), l = r.row, c = n + i.substr(r.column), f++
- }, m.recordMaybeInsert = function (e, t, n) {
- var r = e.getCursorPosition(), i = t.doc.getLine(r.row);
- this.isMaybeInsertedClosing(r, i) || (h = 0), p = r.row, d = i.substr(0, r.column) + n, v = i.substr(r.column), h++
- }, m.isAutoInsertedClosing = function (e, t, n) {
- return f > 0 && e.row === l && n === c[0] && t.substr(e.column) === c
- }, m.isMaybeInsertedClosing = function (e, t) {
- return h > 0 && e.row === p && t.substr(e.column) === v && t.substr(0, e.column) == d
- }, m.popAutoInsertedClosing = function () {
- c = c.substr(1), f--
- }, m.clearMaybeInsertedClosing = function () {
- h = 0, p = -1
- }, this.add("braces", "insertion", function (e, t, n, r, i) {
- var s = n.getCursorPosition(), u = r.doc.getLine(s.row);
- if (i == "{") {
- var a = n.getSelectionRange(), f = r.doc.getTextRange(a);
- if (f !== "" && f !== "{" && n.getWrapBehavioursEnabled())return{text: "{" + f + "}", selection: !1};
- if (m.isSaneInsertion(n, r))return/[\]\}\)]/.test(u[s.column]) ? (m.recordAutoInsert(n, r, "}"), {text: "{}", selection: [1, 1]}) : (m.recordMaybeInsert(n, r, "{"), {text: "{", selection: [1, 1]})
- } else if (i == "}") {
- var l = u.substring(s.column, s.column + 1);
- if (l == "}") {
- var c = r.$findOpeningBracket("}", {column: s.column + 1, row: s.row});
- if (c !== null && m.isAutoInsertedClosing(s, u, i))return m.popAutoInsertedClosing(), {text: "", selection: [1, 1]}
- }
- } else if (i == "\n" || i == "\r\n") {
- var p = "";
- m.isMaybeInsertedClosing(s, u) && (p = o.stringRepeat("}", h), m.clearMaybeInsertedClosing());
- var l = u.substring(s.column, s.column + 1);
- if (l == "}" || p !== "") {
- var d = r.findMatchingBracket({row: s.row, column: s.column}, "}");
- if (!d)return null;
- var v = this.getNextLineIndent(e, u.substring(0, s.column), r.getTabString()), g = this.$getIndent(u);
- return{text: "\n" + v + "\n" + g + p, selection: [1, v.length, 1, v.length]}
- }
- }
- }), this.add("braces", "deletion", function (e, t, n, r, i) {
- var s = r.doc.getTextRange(i);
- if (!i.isMultiLine() && s == "{") {
- var o = r.doc.getLine(i.start.row), u = o.substring(i.end.column, i.end.column + 1);
- if (u == "}")return i.end.column++, i;
- h--
- }
- }), this.add("parens", "insertion", function (e, t, n, r, i) {
- if (i == "(") {
- var s = n.getSelectionRange(), o = r.doc.getTextRange(s);
- if (o !== "" && n.getWrapBehavioursEnabled())return{text: "(" + o + ")", selection: !1};
- if (m.isSaneInsertion(n, r))return m.recordAutoInsert(n, r, ")"), {text: "()", selection: [1, 1]}
- } else if (i == ")") {
- var u = n.getCursorPosition(), a = r.doc.getLine(u.row), f = a.substring(u.column, u.column + 1);
- if (f == ")") {
- var l = r.$findOpeningBracket(")", {column: u.column + 1, row: u.row});
- if (l !== null && m.isAutoInsertedClosing(u, a, i))return m.popAutoInsertedClosing(), {text: "", selection: [1, 1]}
- }
- }
- }), this.add("parens", "deletion", function (e, t, n, r, i) {
- var s = r.doc.getTextRange(i);
- if (!i.isMultiLine() && s == "(") {
- var o = r.doc.getLine(i.start.row), u = o.substring(i.start.column + 1, i.start.column + 2);
- if (u == ")")return i.end.column++, i
- }
- }), this.add("brackets", "insertion", function (e, t, n, r, i) {
- if (i == "[") {
- var s = n.getSelectionRange(), o = r.doc.getTextRange(s);
- if (o !== "" && n.getWrapBehavioursEnabled())return{text: "[" + o + "]", selection: !1};
- if (m.isSaneInsertion(n, r))return m.recordAutoInsert(n, r, "]"), {text: "[]", selection: [1, 1]}
- } else if (i == "]") {
- var u = n.getCursorPosition(), a = r.doc.getLine(u.row), f = a.substring(u.column, u.column + 1);
- if (f == "]") {
- var l = r.$findOpeningBracket("]", {column: u.column + 1, row: u.row});
- if (l !== null && m.isAutoInsertedClosing(u, a, i))return m.popAutoInsertedClosing(), {text: "", selection: [1, 1]}
- }
- }
- }), this.add("brackets", "deletion", function (e, t, n, r, i) {
- var s = r.doc.getTextRange(i);
- if (!i.isMultiLine() && s == "[") {
- var o = r.doc.getLine(i.start.row), u = o.substring(i.start.column + 1, i.start.column + 2);
- if (u == "]")return i.end.column++, i
- }
- }), this.add("string_dquotes", "insertion", function (e, t, n, r, i) {
- if (i == '"' || i == "'") {
- var s = i, o = n.getSelectionRange(), u = r.doc.getTextRange(o);
- if (u !== "" && u !== "'" && u != '"' && n.getWrapBehavioursEnabled())return{text: s + u + s, selection: !1};
- var a = n.getCursorPosition(), f = r.doc.getLine(a.row), l = f.substring(a.column - 1, a.column);
- if (l == "\\")return null;
- var c = r.getTokens(o.start.row), h = 0, p, d = -1;
- for (var v = 0; v < c.length; v++) {
- p = c[v], p.type == "string" ? d = -1 : d < 0 && (d = p.value.indexOf(s));
- if (p.value.length + h > o.start.column)break;
- h += c[v].value.length
- }
- if (!p || d < 0 && p.type !== "comment" && (p.type !== "string" || o.start.column !== p.value.length + h - 1 && p.value.lastIndexOf(s) === p.value.length - 1)) {
- if (!m.isSaneInsertion(n, r))return;
- return{text: s + s, selection: [1, 1]}
- }
- if (p && p.type === "string") {
- var g = f.substring(a.column, a.column + 1);
- if (g == s)return{text: "", selection: [1, 1]}
- }
- }
- }), this.add("string_dquotes", "deletion", function (e, t, n, r, i) {
- var s = r.doc.getTextRange(i);
- if (!i.isMultiLine() && (s == '"' || s == "'")) {
- var o = r.doc.getLine(i.start.row), u = o.substring(i.start.column + 1, i.start.column + 2);
- if (u == s)return i.end.column++, i
- }
- })
- };
- r.inherits(m, i), t.CstyleBehaviour = m
-}), ace.define("ace/mode/folding/cstyle", ["require", "exports", "module", "ace/lib/oop", "ace/range", "ace/mode/folding/fold_mode"], function (e, t, n) {
- var r = e("../../lib/oop"), i = e("../../range").Range, s = e("./fold_mode").FoldMode, o = t.FoldMode = function () {
- };
- r.inherits(o, s), function () {
- this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/, this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/, this.getFoldWidgetRange = function (e, t, n) {
- var r = e.getLine(n), i = r.match(this.foldingStartMarker);
- if (i) {
- var s = i.index;
- return i[1] ? this.openingBracketBlock(e, i[1], n, s) : e.getCommentFoldRange(n, s + i[0].length, 1)
- }
- if (t !== "markbeginend")return;
- var i = r.match(this.foldingStopMarker);
- if (i) {
- var s = i.index + i[0].length;
- return i[1] ? this.closingBracketBlock(e, i[1], n, s) : e.getCommentFoldRange(n, s, -1)
- }
- }
- }.call(o.prototype)
-})
\ No newline at end of file
diff --git a/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/mode-json.js b/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/mode-json.js
deleted file mode 100644
index d8b6bd4..0000000
--- a/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/mode-json.js
+++ /dev/null
@@ -1,204 +0,0 @@
-ace.define("ace/mode/json", ["require", "exports", "module", "ace/lib/oop", "ace/mode/text", "ace/tokenizer", "ace/mode/json_highlight_rules", "ace/mode/matching_brace_outdent", "ace/mode/behaviour/cstyle", "ace/mode/folding/cstyle", "ace/worker/worker_client"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("./text").Mode, s = e("../tokenizer").Tokenizer, o = e("./json_highlight_rules").JsonHighlightRules, u = e("./matching_brace_outdent").MatchingBraceOutdent, a = e("./behaviour/cstyle").CstyleBehaviour, f = e("./folding/cstyle").FoldMode, l = e("../worker/worker_client").WorkerClient, c = function () {
- this.$tokenizer = new s((new o).getRules()), this.$outdent = new u, this.$behaviour = new a, this.foldingRules = new f
- };
- r.inherits(c, i), function () {
- this.getNextLineIndent = function (e, t, n) {
- var r = this.$getIndent(t);
- if (e == "start") {
- var i = t.match(/^.*[\{\(\[]\s*$/);
- i && (r += n)
- }
- return r
- }, this.checkOutdent = function (e, t, n) {
- return this.$outdent.checkOutdent(t, n)
- }, this.autoOutdent = function (e, t, n) {
- this.$outdent.autoOutdent(t, n)
- }, this.createWorker = function (e) {
- var t = new l(["ace"], "ace/mode/json_worker", "JsonWorker");
- return t.attachToDocument(e.getDocument()), t.on("error", function (t) {
- e.setAnnotations([t.data])
- }), t.on("ok", function () {
- e.clearAnnotations()
- }), t
- }
- }.call(c.prototype), t.Mode = c
-}), ace.define("ace/mode/json_highlight_rules", ["require", "exports", "module", "ace/lib/oop", "ace/mode/text_highlight_rules"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("./text_highlight_rules").TextHighlightRules, s = function () {
- this.$rules = {start: [
- {token: "variable", regex: '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]\\s*(?=:)'},
- {token: "string", regex: '"', next: "string"},
- {token: "constant.numeric", regex: "0[xX][0-9a-fA-F]+\\b"},
- {token: "constant.numeric", regex: "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},
- {token: "constant.language.boolean", regex: "(?:true|false)\\b"},
- {token: "invalid.illegal", regex: "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},
- {token: "invalid.illegal", regex: "\\/\\/.*$"},
- {token: "paren.lparen", regex: "[[({]"},
- {token: "paren.rparen", regex: "[\\])}]"},
- {token: "text", regex: "\\s+"}
- ], string: [
- {token: "constant.language.escape", regex: /\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|["\\\/bfnrt])/},
- {token: "string", regex: '[^"\\\\]+'},
- {token: "string", regex: '"', next: "start"},
- {token: "string", regex: "", next: "start"}
- ]}
- };
- r.inherits(s, i), t.JsonHighlightRules = s
-}), ace.define("ace/mode/matching_brace_outdent", ["require", "exports", "module", "ace/range"], function (e, t, n) {
- var r = e("../range").Range, i = function () {
- };
- (function () {
- this.checkOutdent = function (e, t) {
- return/^\s+$/.test(e) ? /^\s*\}/.test(t) : !1
- }, this.autoOutdent = function (e, t) {
- var n = e.getLine(t), i = n.match(/^(\s*\})/);
- if (!i)return 0;
- var s = i[1].length, o = e.findMatchingBracket({row: t, column: s});
- if (!o || o.row == t)return 0;
- var u = this.$getIndent(e.getLine(o.row));
- e.replace(new r(t, 0, t, s - 1), u)
- }, this.$getIndent = function (e) {
- var t = e.match(/^(\s+)/);
- return t ? t[1] : ""
- }
- }).call(i.prototype), t.MatchingBraceOutdent = i
-}), ace.define("ace/mode/behaviour/cstyle", ["require", "exports", "module", "ace/lib/oop", "ace/mode/behaviour", "ace/token_iterator", "ace/lib/lang"], function (e, t, n) {
- var r = e("../../lib/oop"), i = e("../behaviour").Behaviour, s = e("../../token_iterator").TokenIterator, o = e("../../lib/lang"), u = ["text", "paren.rparen", "punctuation.operator"], a = ["text", "paren.rparen", "punctuation.operator", "comment"], f = 0, l = -1, c = "", h = 0, p = -1, d = "", v = "", m = function () {
- m.isSaneInsertion = function (e, t) {
- var n = e.getCursorPosition(), r = new s(t, n.row, n.column);
- if (!this.$matchTokenType(r.getCurrentToken() || "text", u)) {
- var i = new s(t, n.row, n.column + 1);
- if (!this.$matchTokenType(i.getCurrentToken() || "text", u))return!1
- }
- return r.stepForward(), r.getCurrentTokenRow() !== n.row || this.$matchTokenType(r.getCurrentToken() || "text", a)
- }, m.$matchTokenType = function (e, t) {
- return t.indexOf(e.type || e) > -1
- }, m.recordAutoInsert = function (e, t, n) {
- var r = e.getCursorPosition(), i = t.doc.getLine(r.row);
- this.isAutoInsertedClosing(r, i, c[0]) || (f = 0), l = r.row, c = n + i.substr(r.column), f++
- }, m.recordMaybeInsert = function (e, t, n) {
- var r = e.getCursorPosition(), i = t.doc.getLine(r.row);
- this.isMaybeInsertedClosing(r, i) || (h = 0), p = r.row, d = i.substr(0, r.column) + n, v = i.substr(r.column), h++
- }, m.isAutoInsertedClosing = function (e, t, n) {
- return f > 0 && e.row === l && n === c[0] && t.substr(e.column) === c
- }, m.isMaybeInsertedClosing = function (e, t) {
- return h > 0 && e.row === p && t.substr(e.column) === v && t.substr(0, e.column) == d
- }, m.popAutoInsertedClosing = function () {
- c = c.substr(1), f--
- }, m.clearMaybeInsertedClosing = function () {
- h = 0, p = -1
- }, this.add("braces", "insertion", function (e, t, n, r, i) {
- var s = n.getCursorPosition(), u = r.doc.getLine(s.row);
- if (i == "{") {
- var a = n.getSelectionRange(), f = r.doc.getTextRange(a);
- if (f !== "" && f !== "{" && n.getWrapBehavioursEnabled())return{text: "{" + f + "}", selection: !1};
- if (m.isSaneInsertion(n, r))return/[\]\}\)]/.test(u[s.column]) ? (m.recordAutoInsert(n, r, "}"), {text: "{}", selection: [1, 1]}) : (m.recordMaybeInsert(n, r, "{"), {text: "{", selection: [1, 1]})
- } else if (i == "}") {
- var l = u.substring(s.column, s.column + 1);
- if (l == "}") {
- var c = r.$findOpeningBracket("}", {column: s.column + 1, row: s.row});
- if (c !== null && m.isAutoInsertedClosing(s, u, i))return m.popAutoInsertedClosing(), {text: "", selection: [1, 1]}
- }
- } else if (i == "\n" || i == "\r\n") {
- var p = "";
- m.isMaybeInsertedClosing(s, u) && (p = o.stringRepeat("}", h), m.clearMaybeInsertedClosing());
- var l = u.substring(s.column, s.column + 1);
- if (l == "}" || p !== "") {
- var d = r.findMatchingBracket({row: s.row, column: s.column}, "}");
- if (!d)return null;
- var v = this.getNextLineIndent(e, u.substring(0, s.column), r.getTabString()), g = this.$getIndent(u);
- return{text: "\n" + v + "\n" + g + p, selection: [1, v.length, 1, v.length]}
- }
- }
- }), this.add("braces", "deletion", function (e, t, n, r, i) {
- var s = r.doc.getTextRange(i);
- if (!i.isMultiLine() && s == "{") {
- var o = r.doc.getLine(i.start.row), u = o.substring(i.end.column, i.end.column + 1);
- if (u == "}")return i.end.column++, i;
- h--
- }
- }), this.add("parens", "insertion", function (e, t, n, r, i) {
- if (i == "(") {
- var s = n.getSelectionRange(), o = r.doc.getTextRange(s);
- if (o !== "" && n.getWrapBehavioursEnabled())return{text: "(" + o + ")", selection: !1};
- if (m.isSaneInsertion(n, r))return m.recordAutoInsert(n, r, ")"), {text: "()", selection: [1, 1]}
- } else if (i == ")") {
- var u = n.getCursorPosition(), a = r.doc.getLine(u.row), f = a.substring(u.column, u.column + 1);
- if (f == ")") {
- var l = r.$findOpeningBracket(")", {column: u.column + 1, row: u.row});
- if (l !== null && m.isAutoInsertedClosing(u, a, i))return m.popAutoInsertedClosing(), {text: "", selection: [1, 1]}
- }
- }
- }), this.add("parens", "deletion", function (e, t, n, r, i) {
- var s = r.doc.getTextRange(i);
- if (!i.isMultiLine() && s == "(") {
- var o = r.doc.getLine(i.start.row), u = o.substring(i.start.column + 1, i.start.column + 2);
- if (u == ")")return i.end.column++, i
- }
- }), this.add("brackets", "insertion", function (e, t, n, r, i) {
- if (i == "[") {
- var s = n.getSelectionRange(), o = r.doc.getTextRange(s);
- if (o !== "" && n.getWrapBehavioursEnabled())return{text: "[" + o + "]", selection: !1};
- if (m.isSaneInsertion(n, r))return m.recordAutoInsert(n, r, "]"), {text: "[]", selection: [1, 1]}
- } else if (i == "]") {
- var u = n.getCursorPosition(), a = r.doc.getLine(u.row), f = a.substring(u.column, u.column + 1);
- if (f == "]") {
- var l = r.$findOpeningBracket("]", {column: u.column + 1, row: u.row});
- if (l !== null && m.isAutoInsertedClosing(u, a, i))return m.popAutoInsertedClosing(), {text: "", selection: [1, 1]}
- }
- }
- }), this.add("brackets", "deletion", function (e, t, n, r, i) {
- var s = r.doc.getTextRange(i);
- if (!i.isMultiLine() && s == "[") {
- var o = r.doc.getLine(i.start.row), u = o.substring(i.start.column + 1, i.start.column + 2);
- if (u == "]")return i.end.column++, i
- }
- }), this.add("string_dquotes", "insertion", function (e, t, n, r, i) {
- if (i == '"' || i == "'") {
- var s = i, o = n.getSelectionRange(), u = r.doc.getTextRange(o);
- if (u !== "" && u !== "'" && u != '"' && n.getWrapBehavioursEnabled())return{text: s + u + s, selection: !1};
- var a = n.getCursorPosition(), f = r.doc.getLine(a.row), l = f.substring(a.column - 1, a.column);
- if (l == "\\")return null;
- var c = r.getTokens(o.start.row), h = 0, p, d = -1;
- for (var v = 0; v < c.length; v++) {
- p = c[v], p.type == "string" ? d = -1 : d < 0 && (d = p.value.indexOf(s));
- if (p.value.length + h > o.start.column)break;
- h += c[v].value.length
- }
- if (!p || d < 0 && p.type !== "comment" && (p.type !== "string" || o.start.column !== p.value.length + h - 1 && p.value.lastIndexOf(s) === p.value.length - 1)) {
- if (!m.isSaneInsertion(n, r))return;
- return{text: s + s, selection: [1, 1]}
- }
- if (p && p.type === "string") {
- var g = f.substring(a.column, a.column + 1);
- if (g == s)return{text: "", selection: [1, 1]}
- }
- }
- }), this.add("string_dquotes", "deletion", function (e, t, n, r, i) {
- var s = r.doc.getTextRange(i);
- if (!i.isMultiLine() && (s == '"' || s == "'")) {
- var o = r.doc.getLine(i.start.row), u = o.substring(i.start.column + 1, i.start.column + 2);
- if (u == s)return i.end.column++, i
- }
- })
- };
- r.inherits(m, i), t.CstyleBehaviour = m
-}), ace.define("ace/mode/folding/cstyle", ["require", "exports", "module", "ace/lib/oop", "ace/range", "ace/mode/folding/fold_mode"], function (e, t, n) {
- var r = e("../../lib/oop"), i = e("../../range").Range, s = e("./fold_mode").FoldMode, o = t.FoldMode = function () {
- };
- r.inherits(o, s), function () {
- this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/, this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/, this.getFoldWidgetRange = function (e, t, n) {
- var r = e.getLine(n), i = r.match(this.foldingStartMarker);
- if (i) {
- var s = i.index;
- return i[1] ? this.openingBracketBlock(e, i[1], n, s) : e.getCommentFoldRange(n, s + i[0].length, 1)
- }
- if (t !== "markbeginend")return;
- var i = r.match(this.foldingStopMarker);
- if (i) {
- var s = i.index + i[0].length;
- return i[1] ? this.closingBracketBlock(e, i[1], n, s) : e.getCommentFoldRange(n, s, -1)
- }
- }
- }.call(o.prototype)
-})
\ No newline at end of file
diff --git a/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/mode-jsp.js b/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/mode-jsp.js
deleted file mode 100644
index c0e3c98..0000000
--- a/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/mode-jsp.js
+++ /dev/null
@@ -1,378 +0,0 @@
-ace.define("ace/mode/jsp", ["require", "exports", "module", "ace/lib/oop", "ace/mode/text", "ace/tokenizer", "ace/mode/jsp_highlight_rules", "ace/mode/matching_brace_outdent", "ace/mode/behaviour/cstyle", "ace/mode/folding/cstyle"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("./text").Mode, s = e("../tokenizer").Tokenizer, o = e("./jsp_highlight_rules").JspHighlightRules, u = e("./matching_brace_outdent").MatchingBraceOutdent, a = e("./behaviour/cstyle").CstyleBehaviour, f = e("./folding/cstyle").FoldMode, l = function () {
- var e = new o;
- this.$tokenizer = new s(e.getRules()), this.$outdent = new u, this.$behaviour = new a, this.foldingRules = new f
- };
- r.inherits(l, i), function () {
- }.call(l.prototype), t.Mode = l
-}), ace.define("ace/mode/jsp_highlight_rules", ["require", "exports", "module", "ace/lib/oop", "ace/mode/html_highlight_rules", "ace/mode/java_highlight_rules"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("./html_highlight_rules").HtmlHighlightRules, s = e("./java_highlight_rules").JavaHighlightRules, o = function () {
- i.call(this);
- for (var e in this.$rules)this.$rules[e].unshift({token: "meta.tag", regex: "<%@?|<%=?|
]+>", next: "jsp-start"});
- var t = "request|response|out|session|application|config|pageContext|page|Exception", n = "page|include|taglib";
- this.embedRules(s, "jsp-"), this.$rules.start.unshift({token: "comment", regex: "<%--", next: "comment"}), this.$rules["jsp-start"].unshift({token: "meta.tag", regex: "%>|<\\/jsp:[^>]+>", next: "start"}, {token: "variable.language", regex: t}, {token: "keyword", regex: n}), this.$rules.comment.unshift({token: "comment", regex: ".*?--%>", next: "start"})
- };
- r.inherits(o, i), t.JspHighlightRules = o
-}), ace.define("ace/mode/html_highlight_rules", ["require", "exports", "module", "ace/lib/oop", "ace/lib/lang", "ace/mode/css_highlight_rules", "ace/mode/javascript_highlight_rules", "ace/mode/xml_util", "ace/mode/text_highlight_rules"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("../lib/lang"), s = e("./css_highlight_rules").CssHighlightRules, o = e("./javascript_highlight_rules").JavaScriptHighlightRules, u = e("./xml_util"), a = e("./text_highlight_rules").TextHighlightRules, f = i.createMap({a: "anchor", button: "form", form: "form", img: "image", input: "form", label: "form", script: "script", select: "form", textarea: "form", style: "style", table: "table", tbody: "table", td: "table", tfoot: "table", th: "table", tr: "table"}), l = function () {
- this.$rules = {start: [
- {token: "text", regex: "<\\!\\[CDATA\\[", next: "cdata"},
- {token: "xml-pe", regex: "<\\?.*?\\?>"},
- {token: "comment", regex: "<\\!--", next: "comment"},
- {token: "xml-pe", regex: "<\\!.*?>"},
- {token: "meta.tag", regex: "<(?=script\\b)", next: "script"},
- {token: "meta.tag", regex: "<(?=style\\b)", next: "style"},
- {token: "meta.tag", regex: "<\\/?", next: "tag"},
- {token: "text", regex: "\\s+"},
- {token: "constant.character.entity", regex: "(?:[0-9]+;)|(?:[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}
- ], cdata: [
- {token: "text", regex: "\\]\\]>", next: "start"}
- ], comment: [
- {token: "comment", regex: ".*?-->", next: "start"},
- {defaultToken: "comment"}
- ]}, u.tag(this.$rules, "tag", "start", f), u.tag(this.$rules, "style", "css-start", f), u.tag(this.$rules, "script", "js-start", f), this.embedRules(o, "js-", [
- {token: "comment", regex: "\\/\\/.*(?=<\\/script>)", next: "tag"},
- {token: "meta.tag", regex: "<\\/(?=script)", next: "tag"}
- ]), this.embedRules(s, "css-", [
- {token: "meta.tag", regex: "<\\/(?=style)", next: "tag"}
- ])
- };
- r.inherits(l, a), t.HtmlHighlightRules = l
-}), ace.define("ace/mode/css_highlight_rules", ["require", "exports", "module", "ace/lib/oop", "ace/lib/lang", "ace/mode/text_highlight_rules"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("../lib/lang"), s = e("./text_highlight_rules").TextHighlightRules, o = t.supportType = "animation-fill-mode|alignment-adjust|alignment-baseline|animation-delay|animation-direction|animation-duration|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|animation|appearance|azimuth|backface-visibility|background-attachment|background-break|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|background|baseline-shift|binding|bleed|bookmark-label|bookmark-level|bookmark-state|bookmark-target|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|border|bottom|box-align|box-decoration-break|box-direction|box-flex-group|box-flex|box-lines|box-ordinal-group|box-orient|box-pack|box-shadow|box-sizing|break-after|break-before|break-inside|caption-side|clear|clip|color-profile|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|crop|cue-after|cue-before|cue|cursor|direction|display|dominant-baseline|drop-initial-after-adjust|drop-initial-after-align|drop-initial-before-adjust|drop-initial-before-align|drop-initial-size|drop-initial-value|elevation|empty-cells|fit|fit-position|float-offset|float|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|font|grid-columns|grid-rows|hanging-punctuation|height|hyphenate-after|hyphenate-before|hyphenate-character|hyphenate-lines|hyphenate-resource|hyphens|icon|image-orientation|image-rendering|image-resolution|inline-box-align|left|letter-spacing|line-height|line-stacking-ruby|line-stacking-shift|line-stacking-strategy|line-stacking|list-style-image|list-style-position|list-style-type|list-style|margin-bottom|margin-left|margin-right|margin-top|margin|mark-after|mark-before|mark|marks|marquee-direction|marquee-play-count|marquee-speed|marquee-style|max-height|max-width|min-height|min-width|move-to|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|orphans|outline-color|outline-offset|outline-style|outline-width|outline|overflow-style|overflow-x|overflow-y|overflow|padding-bottom|padding-left|padding-right|padding-top|padding|page-break-after|page-break-before|page-break-inside|page-policy|page|pause-after|pause-before|pause|perspective-origin|perspective|phonemes|pitch-range|pitch|play-during|position|presentation-level|punctuation-trim|quotes|rendering-intent|resize|rest-after|rest-before|rest|richness|right|rotation-point|rotation|ruby-align|ruby-overhang|ruby-position|ruby-span|size|speak-header|speak-numeral|speak-punctuation|speak|speech-rate|stress|string-set|table-layout|target-name|target-new|target-position|target|text-align-last|text-align|text-decoration|text-emphasis|text-height|text-indent|text-justify|text-outline|text-shadow|text-transform|text-wrap|top|transform-origin|transform-style|transform|transition-delay|transition-duration|transition-property|transition-timing-function|transition|unicode-bidi|vertical-align|visibility|voice-balance|voice-duration|voice-family|voice-pitch-range|voice-pitch|voice-rate|voice-stress|voice-volume|volume|white-space-collapse|white-space|widows|width|word-break|word-spacing|word-wrap|z-index", u = t.supportFunction = "rgb|rgba|url|attr|counter|counters", a = t.supportConstant = "absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero", f = t.supportConstantColor = "aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow", l = t.supportConstantFonts = "arial|century|comic|courier|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace", c = t.numRe = "\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))", h = t.pseudoElements = "(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b", p = t.pseudoClasses = "(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b", d = function () {
- var e = this.createKeywordMapper({"support.function": u, "support.constant": a, "support.type": o, "support.constant.color": f, "support.constant.fonts": l}, "text", !0), t = [
- {token: "comment", regex: "\\/\\*", next: "ruleset_comment"},
- {token: "string", regex: '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},
- {token: "string", regex: "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},
- {token: ["constant.numeric", "keyword"], regex: "(" + c + ")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vm|vw|%)"},
- {token: "constant.numeric", regex: c},
- {token: "constant.numeric", regex: "#[a-f0-9]{6}"},
- {token: "constant.numeric", regex: "#[a-f0-9]{3}"},
- {token: ["punctuation", "entity.other.attribute-name.pseudo-element.css"], regex: h},
- {token: ["punctuation", "entity.other.attribute-name.pseudo-class.css"], regex: p},
- {token: e, regex: "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"}
- ], n = i.copyArray(t);
- n.unshift({token: "paren.rparen", regex: "\\}", next: "start"});
- var r = i.copyArray(t);
- r.unshift({token: "paren.rparen", regex: "\\}", next: "media"});
- var s = [
- {token: "comment", regex: ".+"}
- ], d = i.copyArray(s);
- d.unshift({token: "comment", regex: ".*?\\*\\/", next: "start"});
- var v = i.copyArray(s);
- v.unshift({token: "comment", regex: ".*?\\*\\/", next: "media"});
- var m = i.copyArray(s);
- m.unshift({token: "comment", regex: ".*?\\*\\/", next: "ruleset"}), this.$rules = {start: [
- {token: "comment", regex: "\\/\\*", next: "comment"},
- {token: "paren.lparen", regex: "\\{", next: "ruleset"},
- {token: "string", regex: "@.*?{", next: "media"},
- {token: "keyword", regex: "#[a-z0-9-_]+"},
- {token: "variable", regex: "\\.[a-z0-9-_]+"},
- {token: "string", regex: ":[a-z0-9-_]+"},
- {token: "constant", regex: "[a-z0-9-_]+"}
- ], media: [
- {token: "comment", regex: "\\/\\*", next: "media_comment"},
- {token: "paren.lparen", regex: "\\{", next: "media_ruleset"},
- {token: "string", regex: "\\}", next: "start"},
- {token: "keyword", regex: "#[a-z0-9-_]+"},
- {token: "variable", regex: "\\.[a-z0-9-_]+"},
- {token: "string", regex: ":[a-z0-9-_]+"},
- {token: "constant", regex: "[a-z0-9-_]+"}
- ], comment: d, ruleset: n, ruleset_comment: m, media_ruleset: r, media_comment: v}
- };
- r.inherits(d, s), t.CssHighlightRules = d
-}), ace.define("ace/mode/javascript_highlight_rules", ["require", "exports", "module", "ace/lib/oop", "ace/mode/doc_comment_highlight_rules", "ace/mode/text_highlight_rules"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("./doc_comment_highlight_rules").DocCommentHighlightRules, s = e("./text_highlight_rules").TextHighlightRules, o = function () {
- var e = this.createKeywordMapper({"variable.language": "Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document", keyword: "const|yield|import|get|set|break|case|catch|continue|default|delete|do|else|finally|for|function|if|in|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|__parent__|__count__|escape|unescape|with|__proto__|class|enum|extends|super|export|implements|private|public|interface|package|protected|static", "storage.type": "const|let|var|function", "constant.language": "null|Infinity|NaN|undefined", "support.function": "alert", "constant.language.boolean": "true|false"}, "identifier"), t = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void", n = "[a-zA-Z\\$_¡-￿][a-zA-Z\\d\\$_¡-￿]*\\b", r = "\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|[0-2][0-7]{0,2}|3[0-6][0-7]?|37[0-7]?|[4-7][0-7]?|.)";
- this.$rules = {start: [
- {token: "comment", regex: /\/\/.*$/},
- i.getStartRule("doc-start"),
- {token: "comment", regex: /\/\*/, next: "comment"},
- {token: "string", regex: "'(?=.)", next: "qstring"},
- {token: "string", regex: '"(?=.)', next: "qqstring"},
- {token: "constant.numeric", regex: /0[xX][0-9a-fA-F]+\b/},
- {token: "constant.numeric", regex: /[+-]?\d+(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?\b/},
- {token: ["storage.type", "punctuation.operator", "support.function", "punctuation.operator", "entity.name.function", "text", "keyword.operator"], regex: "(" + n + ")(\\.)(prototype)(\\.)(" + n + ")(\\s*)(=)", next: "function_arguments"},
- {token: ["storage.type", "punctuation.operator", "entity.name.function", "text", "keyword.operator", "text", "storage.type", "text", "paren.lparen"], regex: "(" + n + ")(\\.)(" + n + ")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", next: "function_arguments"},
- {token: ["entity.name.function", "text", "keyword.operator", "text", "storage.type", "text", "paren.lparen"], regex: "(" + n + ")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", next: "function_arguments"},
- {token: ["storage.type", "punctuation.operator", "entity.name.function", "text", "keyword.operator", "text", "storage.type", "text", "entity.name.function", "text", "paren.lparen"], regex: "(" + n + ")(\\.)(" + n + ")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()", next: "function_arguments"},
- {token: ["storage.type", "text", "entity.name.function", "text", "paren.lparen"], regex: "(function)(\\s+)(" + n + ")(\\s*)(\\()", next: "function_arguments"},
- {token: ["entity.name.function", "text", "punctuation.operator", "text", "storage.type", "text", "paren.lparen"], regex: "(" + n + ")(\\s*)(:)(\\s*)(function)(\\s*)(\\()", next: "function_arguments"},
- {token: ["text", "text", "storage.type", "text", "paren.lparen"], regex: "(:)(\\s*)(function)(\\s*)(\\()", next: "function_arguments"},
- {token: "keyword", regex: "(?:" + t + ")\\b", next: "regex_allowed"},
- {token: ["punctuation.operator", "support.function"], regex: /(\.)(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:opzzzz|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/},
- {token: ["punctuation.operator", "support.function.dom"], regex: /(\.)(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/},
- {token: ["punctuation.operator", "support.constant"], regex: /(\.)(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/},
- {token: ["storage.type", "punctuation.operator", "support.function.firebug"], regex: /(console)(\.)(warn|info|log|error|time|timeEnd|assert)\b/},
- {token: e, regex: n},
- {token: "keyword.operator", regex: /--|\+\+|[!$%&*+\-~]|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|\*=|%=|\+=|\-=|&=|\^=/, next: "regex_allowed"},
- {token: "punctuation.operator", regex: /\?|\:|\,|\;|\./, next: "regex_allowed"},
- {token: "paren.lparen", regex: /[\[({]/, next: "regex_allowed"},
- {token: "paren.rparen", regex: /[\])}]/},
- {token: "keyword.operator", regex: /\/=?/, next: "regex_allowed"},
- {token: "comment", regex: /^#!.*$/}
- ], regex_allowed: [i.getStartRule("doc-start"), {token: "comment", regex: "\\/\\*", next: "comment_regex_allowed"}, {token: "comment", regex: "\\/\\/.*$"}, {token: "string.regexp", regex: "\\/", next: "regex"}, {token: "text", regex: "\\s+"}, {token: "empty", regex: "", next: "start"}], regex: [
- {token: "regexp.keyword.operator", regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},
- {token: "string.regexp", regex: "/\\w*", next: "start"},
- {token: "invalid", regex: /\{\d+,?(?:\d+)?}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/},
- {token: "constant.language.escape", regex: /\(\?[:=!]|\)|{\d+,?(?:\d+)?}|{,\d+}|[+*]\?|[()$^+*?]/},
- {token: "constant.language.delimiter", regex: /\|/},
- {token: "constant.language.escape", regex: /\[\^?/, next: "regex_character_class"},
- {token: "empty", regex: "$", next: "start"},
- {defaultToken: "string.regexp"}
- ], regex_character_class: [
- {token: "regexp.keyword.operator", regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},
- {token: "constant.language.escape", regex: "]", next: "regex"},
- {token: "constant.language.escape", regex: "-"},
- {token: "empty", regex: "$", next: "start"},
- {defaultToken: "string.regexp.charachterclass"}
- ], function_arguments: [
- {token: "variable.parameter", regex: n},
- {token: "punctuation.operator", regex: "[, ]+"},
- {token: "punctuation.operator", regex: "$"},
- {token: "empty", regex: "", next: "start"}
- ], comment_regex_allowed: [
- {token: "comment", regex: "\\*\\/", next: "regex_allowed"},
- {defaultToken: "comment"}
- ], comment: [
- {token: "comment", regex: "\\*\\/", next: "start"},
- {defaultToken: "comment"}
- ], qqstring: [
- {token: "constant.language.escape", regex: r},
- {token: "string", regex: "\\\\$", next: "qqstring"},
- {token: "string", regex: '"|$', next: "start"},
- {defaultToken: "string"}
- ], qstring: [
- {token: "constant.language.escape", regex: r},
- {token: "string", regex: "\\\\$", next: "qstring"},
- {token: "string", regex: "'|$", next: "start"},
- {defaultToken: "string"}
- ]}, this.embedRules(i, "doc-", [i.getEndRule("start")])
- };
- r.inherits(o, s), t.JavaScriptHighlightRules = o
-}), ace.define("ace/mode/doc_comment_highlight_rules", ["require", "exports", "module", "ace/lib/oop", "ace/mode/text_highlight_rules"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("./text_highlight_rules").TextHighlightRules, s = function () {
- this.$rules = {start: [
- {token: "comment.doc.tag", regex: "@[\\w\\d_]+"},
- {token: "comment.doc.tag", regex: "\\bTODO\\b"},
- {defaultToken: "comment.doc"}
- ]}
- };
- r.inherits(s, i), s.getStartRule = function (e) {
- return{token: "comment.doc", regex: "\\/\\*(?=\\*)", next: e}
- }, s.getEndRule = function (e) {
- return{token: "comment.doc", regex: "\\*\\/", next: e}
- }, t.DocCommentHighlightRules = s
-}), ace.define("ace/mode/xml_util", ["require", "exports", "module"], function (e, t, n) {
- function r(e) {
- return[
- {token: "string", regex: '"', next: e + "_qqstring"},
- {token: "string", regex: "'", next: e + "_qstring"}
- ]
- }
-
- function i(e, t) {
- return[
- {token: "string", regex: e, next: t},
- {token: "constant.language.escape", regex: "(?:[0-9]+;)|(?:[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"},
- {defaultToken: "string"}
- ]
- }
-
- t.tag = function (e, t, n, s) {
- e[t] = [
- {token: "text", regex: "\\s+"},
- {token: s ? function (e) {
- return s[e] ? "meta.tag.tag-name." + s[e] : "meta.tag.tag-name"
- } : "meta.tag.tag-name", regex: "[-_a-zA-Z0-9:]+", next: t + "_embed_attribute_list"},
- {token: "empty", regex: "", next: t + "_embed_attribute_list"}
- ], e[t + "_qstring"] = i("'", t + "_embed_attribute_list"), e[t + "_qqstring"] = i('"', t + "_embed_attribute_list"), e[t + "_embed_attribute_list"] = [
- {token: "meta.tag.r", regex: "/?>", next: n},
- {token: "keyword.operator", regex: "="},
- {token: "entity.other.attribute-name", regex: "[-_a-zA-Z0-9:]+"},
- {token: "constant.numeric", regex: "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},
- {token: "text", regex: "\\s+"}
- ].concat(r(t))
- }
-}), ace.define("ace/mode/java_highlight_rules", ["require", "exports", "module", "ace/lib/oop", "ace/mode/doc_comment_highlight_rules", "ace/mode/text_highlight_rules"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("./doc_comment_highlight_rules").DocCommentHighlightRules, s = e("./text_highlight_rules").TextHighlightRules, o = function () {
- var e = "abstract|continue|for|new|switch|assert|default|goto|package|synchronized|boolean|do|if|private|this|break|double|implements|protected|throw|byte|else|import|public|throws|case|enum|instanceof|return|transient|catch|extends|int|short|try|char|final|interface|static|void|class|finally|long|strictfp|volatile|const|float|native|super|while", t = "null|Infinity|NaN|undefined", n = "AbstractMethodError|AssertionError|ClassCircularityError|ClassFormatError|Deprecated|EnumConstantNotPresentException|ExceptionInInitializerError|IllegalAccessError|IllegalThreadStateException|InstantiationError|InternalError|NegativeArraySizeException|NoSuchFieldError|Override|Process|ProcessBuilder|SecurityManager|StringIndexOutOfBoundsException|SuppressWarnings|TypeNotPresentException|UnknownError|UnsatisfiedLinkError|UnsupportedClassVersionError|VerifyError|InstantiationException|IndexOutOfBoundsException|ArrayIndexOutOfBoundsException|CloneNotSupportedException|NoSuchFieldException|IllegalArgumentException|NumberFormatException|SecurityException|Void|InheritableThreadLocal|IllegalStateException|InterruptedException|NoSuchMethodException|IllegalAccessException|UnsupportedOperationException|Enum|StrictMath|Package|Compiler|Readable|Runtime|StringBuilder|Math|IncompatibleClassChangeError|NoSuchMethodError|ThreadLocal|RuntimePermission|ArithmeticException|NullPointerException|Long|Integer|Short|Byte|Double|Number|Float|Character|Boolean|StackTraceElement|Appendable|StringBuffer|Iterable|ThreadGroup|Runnable|Thread|IllegalMonitorStateException|StackOverflowError|OutOfMemoryError|VirtualMachineError|ArrayStoreException|ClassCastException|LinkageError|NoClassDefFoundError|ClassNotFoundException|RuntimeException|Exception|ThreadDeath|Error|Throwable|System|ClassLoader|Cloneable|Class|CharSequence|Comparable|String|Object", r = this.createKeywordMapper({"variable.language": "this", keyword: e, "constant.language": t, "support.function": n}, "identifier");
- this.$rules = {start: [
- {token: "comment", regex: "\\/\\/.*$"},
- i.getStartRule("doc-start"),
- {token: "comment", regex: "\\/\\*", next: "comment"},
- {token: "string.regexp", regex: "[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/]\\w*\\s*(?=[).,;]|$)"},
- {token: "string", regex: '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},
- {token: "string", regex: "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},
- {token: "constant.numeric", regex: "0[xX][0-9a-fA-F]+\\b"},
- {token: "constant.numeric", regex: "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},
- {token: "constant.language.boolean", regex: "(?:true|false)\\b"},
- {token: r, regex: "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},
- {token: "keyword.operator", regex: "!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)"},
- {token: "lparen", regex: "[[({]"},
- {token: "rparen", regex: "[\\])}]"},
- {token: "text", regex: "\\s+"}
- ], comment: [
- {token: "comment", regex: ".*?\\*\\/", next: "start"},
- {token: "comment", regex: ".+"}
- ]}, this.embedRules(i, "doc-", [i.getEndRule("start")])
- };
- r.inherits(o, s), t.JavaHighlightRules = o
-}), ace.define("ace/mode/matching_brace_outdent", ["require", "exports", "module", "ace/range"], function (e, t, n) {
- var r = e("../range").Range, i = function () {
- };
- (function () {
- this.checkOutdent = function (e, t) {
- return/^\s+$/.test(e) ? /^\s*\}/.test(t) : !1
- }, this.autoOutdent = function (e, t) {
- var n = e.getLine(t), i = n.match(/^(\s*\})/);
- if (!i)return 0;
- var s = i[1].length, o = e.findMatchingBracket({row: t, column: s});
- if (!o || o.row == t)return 0;
- var u = this.$getIndent(e.getLine(o.row));
- e.replace(new r(t, 0, t, s - 1), u)
- }, this.$getIndent = function (e) {
- var t = e.match(/^(\s+)/);
- return t ? t[1] : ""
- }
- }).call(i.prototype), t.MatchingBraceOutdent = i
-}), ace.define("ace/mode/behaviour/cstyle", ["require", "exports", "module", "ace/lib/oop", "ace/mode/behaviour", "ace/token_iterator", "ace/lib/lang"], function (e, t, n) {
- var r = e("../../lib/oop"), i = e("../behaviour").Behaviour, s = e("../../token_iterator").TokenIterator, o = e("../../lib/lang"), u = ["text", "paren.rparen", "punctuation.operator"], a = ["text", "paren.rparen", "punctuation.operator", "comment"], f = 0, l = -1, c = "", h = 0, p = -1, d = "", v = "", m = function () {
- m.isSaneInsertion = function (e, t) {
- var n = e.getCursorPosition(), r = new s(t, n.row, n.column);
- if (!this.$matchTokenType(r.getCurrentToken() || "text", u)) {
- var i = new s(t, n.row, n.column + 1);
- if (!this.$matchTokenType(i.getCurrentToken() || "text", u))return!1
- }
- return r.stepForward(), r.getCurrentTokenRow() !== n.row || this.$matchTokenType(r.getCurrentToken() || "text", a)
- }, m.$matchTokenType = function (e, t) {
- return t.indexOf(e.type || e) > -1
- }, m.recordAutoInsert = function (e, t, n) {
- var r = e.getCursorPosition(), i = t.doc.getLine(r.row);
- this.isAutoInsertedClosing(r, i, c[0]) || (f = 0), l = r.row, c = n + i.substr(r.column), f++
- }, m.recordMaybeInsert = function (e, t, n) {
- var r = e.getCursorPosition(), i = t.doc.getLine(r.row);
- this.isMaybeInsertedClosing(r, i) || (h = 0), p = r.row, d = i.substr(0, r.column) + n, v = i.substr(r.column), h++
- }, m.isAutoInsertedClosing = function (e, t, n) {
- return f > 0 && e.row === l && n === c[0] && t.substr(e.column) === c
- }, m.isMaybeInsertedClosing = function (e, t) {
- return h > 0 && e.row === p && t.substr(e.column) === v && t.substr(0, e.column) == d
- }, m.popAutoInsertedClosing = function () {
- c = c.substr(1), f--
- }, m.clearMaybeInsertedClosing = function () {
- h = 0, p = -1
- }, this.add("braces", "insertion", function (e, t, n, r, i) {
- var s = n.getCursorPosition(), u = r.doc.getLine(s.row);
- if (i == "{") {
- var a = n.getSelectionRange(), f = r.doc.getTextRange(a);
- if (f !== "" && f !== "{" && n.getWrapBehavioursEnabled())return{text: "{" + f + "}", selection: !1};
- if (m.isSaneInsertion(n, r))return/[\]\}\)]/.test(u[s.column]) ? (m.recordAutoInsert(n, r, "}"), {text: "{}", selection: [1, 1]}) : (m.recordMaybeInsert(n, r, "{"), {text: "{", selection: [1, 1]})
- } else if (i == "}") {
- var l = u.substring(s.column, s.column + 1);
- if (l == "}") {
- var c = r.$findOpeningBracket("}", {column: s.column + 1, row: s.row});
- if (c !== null && m.isAutoInsertedClosing(s, u, i))return m.popAutoInsertedClosing(), {text: "", selection: [1, 1]}
- }
- } else if (i == "\n" || i == "\r\n") {
- var p = "";
- m.isMaybeInsertedClosing(s, u) && (p = o.stringRepeat("}", h), m.clearMaybeInsertedClosing());
- var l = u.substring(s.column, s.column + 1);
- if (l == "}" || p !== "") {
- var d = r.findMatchingBracket({row: s.row, column: s.column}, "}");
- if (!d)return null;
- var v = this.getNextLineIndent(e, u.substring(0, s.column), r.getTabString()), g = this.$getIndent(u);
- return{text: "\n" + v + "\n" + g + p, selection: [1, v.length, 1, v.length]}
- }
- }
- }), this.add("braces", "deletion", function (e, t, n, r, i) {
- var s = r.doc.getTextRange(i);
- if (!i.isMultiLine() && s == "{") {
- var o = r.doc.getLine(i.start.row), u = o.substring(i.end.column, i.end.column + 1);
- if (u == "}")return i.end.column++, i;
- h--
- }
- }), this.add("parens", "insertion", function (e, t, n, r, i) {
- if (i == "(") {
- var s = n.getSelectionRange(), o = r.doc.getTextRange(s);
- if (o !== "" && n.getWrapBehavioursEnabled())return{text: "(" + o + ")", selection: !1};
- if (m.isSaneInsertion(n, r))return m.recordAutoInsert(n, r, ")"), {text: "()", selection: [1, 1]}
- } else if (i == ")") {
- var u = n.getCursorPosition(), a = r.doc.getLine(u.row), f = a.substring(u.column, u.column + 1);
- if (f == ")") {
- var l = r.$findOpeningBracket(")", {column: u.column + 1, row: u.row});
- if (l !== null && m.isAutoInsertedClosing(u, a, i))return m.popAutoInsertedClosing(), {text: "", selection: [1, 1]}
- }
- }
- }), this.add("parens", "deletion", function (e, t, n, r, i) {
- var s = r.doc.getTextRange(i);
- if (!i.isMultiLine() && s == "(") {
- var o = r.doc.getLine(i.start.row), u = o.substring(i.start.column + 1, i.start.column + 2);
- if (u == ")")return i.end.column++, i
- }
- }), this.add("brackets", "insertion", function (e, t, n, r, i) {
- if (i == "[") {
- var s = n.getSelectionRange(), o = r.doc.getTextRange(s);
- if (o !== "" && n.getWrapBehavioursEnabled())return{text: "[" + o + "]", selection: !1};
- if (m.isSaneInsertion(n, r))return m.recordAutoInsert(n, r, "]"), {text: "[]", selection: [1, 1]}
- } else if (i == "]") {
- var u = n.getCursorPosition(), a = r.doc.getLine(u.row), f = a.substring(u.column, u.column + 1);
- if (f == "]") {
- var l = r.$findOpeningBracket("]", {column: u.column + 1, row: u.row});
- if (l !== null && m.isAutoInsertedClosing(u, a, i))return m.popAutoInsertedClosing(), {text: "", selection: [1, 1]}
- }
- }
- }), this.add("brackets", "deletion", function (e, t, n, r, i) {
- var s = r.doc.getTextRange(i);
- if (!i.isMultiLine() && s == "[") {
- var o = r.doc.getLine(i.start.row), u = o.substring(i.start.column + 1, i.start.column + 2);
- if (u == "]")return i.end.column++, i
- }
- }), this.add("string_dquotes", "insertion", function (e, t, n, r, i) {
- if (i == '"' || i == "'") {
- var s = i, o = n.getSelectionRange(), u = r.doc.getTextRange(o);
- if (u !== "" && u !== "'" && u != '"' && n.getWrapBehavioursEnabled())return{text: s + u + s, selection: !1};
- var a = n.getCursorPosition(), f = r.doc.getLine(a.row), l = f.substring(a.column - 1, a.column);
- if (l == "\\")return null;
- var c = r.getTokens(o.start.row), h = 0, p, d = -1;
- for (var v = 0; v < c.length; v++) {
- p = c[v], p.type == "string" ? d = -1 : d < 0 && (d = p.value.indexOf(s));
- if (p.value.length + h > o.start.column)break;
- h += c[v].value.length
- }
- if (!p || d < 0 && p.type !== "comment" && (p.type !== "string" || o.start.column !== p.value.length + h - 1 && p.value.lastIndexOf(s) === p.value.length - 1)) {
- if (!m.isSaneInsertion(n, r))return;
- return{text: s + s, selection: [1, 1]}
- }
- if (p && p.type === "string") {
- var g = f.substring(a.column, a.column + 1);
- if (g == s)return{text: "", selection: [1, 1]}
- }
- }
- }), this.add("string_dquotes", "deletion", function (e, t, n, r, i) {
- var s = r.doc.getTextRange(i);
- if (!i.isMultiLine() && (s == '"' || s == "'")) {
- var o = r.doc.getLine(i.start.row), u = o.substring(i.start.column + 1, i.start.column + 2);
- if (u == s)return i.end.column++, i
- }
- })
- };
- r.inherits(m, i), t.CstyleBehaviour = m
-}), ace.define("ace/mode/folding/cstyle", ["require", "exports", "module", "ace/lib/oop", "ace/range", "ace/mode/folding/fold_mode"], function (e, t, n) {
- var r = e("../../lib/oop"), i = e("../../range").Range, s = e("./fold_mode").FoldMode, o = t.FoldMode = function () {
- };
- r.inherits(o, s), function () {
- this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/, this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/, this.getFoldWidgetRange = function (e, t, n) {
- var r = e.getLine(n), i = r.match(this.foldingStartMarker);
- if (i) {
- var s = i.index;
- return i[1] ? this.openingBracketBlock(e, i[1], n, s) : e.getCommentFoldRange(n, s + i[0].length, 1)
- }
- if (t !== "markbeginend")return;
- var i = r.match(this.foldingStopMarker);
- if (i) {
- var s = i.index + i[0].length;
- return i[1] ? this.closingBracketBlock(e, i[1], n, s) : e.getCommentFoldRange(n, s, -1)
- }
- }
- }.call(o.prototype)
-})
\ No newline at end of file
diff --git a/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/mode-jsx.js b/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/mode-jsx.js
deleted file mode 100644
index 0772c44..0000000
--- a/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/mode-jsx.js
+++ /dev/null
@@ -1,220 +0,0 @@
-ace.define("ace/mode/jsx", ["require", "exports", "module", "ace/lib/oop", "ace/mode/text", "ace/tokenizer", "ace/mode/jsx_highlight_rules", "ace/mode/matching_brace_outdent", "ace/mode/behaviour/cstyle", "ace/mode/folding/cstyle"], function (e, t, n) {
- function l() {
- this.$tokenizer = new s((new o).getRules()), this.$outdent = new u, this.$behaviour = new a, this.foldingRules = new f
- }
-
- var r = e("../lib/oop"), i = e("./text").Mode, s = e("../tokenizer").Tokenizer, o = e("./jsx_highlight_rules").JsxHighlightRules, u = e("./matching_brace_outdent").MatchingBraceOutdent, a = e("./behaviour/cstyle").CstyleBehaviour, f = e("./folding/cstyle").FoldMode;
- r.inherits(l, i), function () {
- this.getNextLineIndent = function (e, t, n) {
- var r = this.$getIndent(t), i = this.$tokenizer.getLineTokens(t, e), s = i.tokens;
- if (s.length && s[s.length - 1].type == "comment")return r;
- if (e == "start") {
- var o = t.match(/^.*[\{\(\[]\s*$/);
- o && (r += n)
- }
- return r
- }, this.checkOutdent = function (e, t, n) {
- return this.$outdent.checkOutdent(t, n)
- }, this.autoOutdent = function (e, t, n) {
- this.$outdent.autoOutdent(t, n)
- }
- }.call(l.prototype), t.Mode = l
-}), ace.define("ace/mode/jsx_highlight_rules", ["require", "exports", "module", "ace/lib/oop", "ace/lib/lang", "ace/mode/doc_comment_highlight_rules", "ace/mode/text_highlight_rules"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("../lib/lang"), s = e("./doc_comment_highlight_rules").DocCommentHighlightRules, o = e("./text_highlight_rules").TextHighlightRules, u = function () {
- var e = i.arrayToMap("break|do|instanceof|typeof|case|else|new|var|catch|finally|return|void|continue|for|switch|default|while|function|this|if|throw|delete|in|try|class|extends|super|import|from|into|implements|interface|static|mixin|override|abstract|final|number|int|string|boolean|variant|log|assert".split("|")), t = i.arrayToMap("null|true|false|NaN|Infinity|__FILE__|__LINE__|undefined".split("|")), n = i.arrayToMap("debugger|with|const|export|let|private|public|yield|protected|extern|native|as|operator|__fake__|__readonly__".split("|")), r = "[a-zA-Z_][a-zA-Z0-9_]*\\b";
- this.$rules = {start: [
- {token: "comment", regex: "\\/\\/.*$"},
- s.getStartRule("doc-start"),
- {token: "comment", regex: "\\/\\*", next: "comment"},
- {token: "string.regexp", regex: "[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/]\\w*\\s*(?=[).,;]|$)"},
- {token: "string", regex: '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},
- {token: "string", regex: "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},
- {token: "constant.numeric", regex: "0[xX][0-9a-fA-F]+\\b"},
- {token: "constant.numeric", regex: "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},
- {token: "constant.language.boolean", regex: "(?:true|false)\\b"},
- {token: ["storage.type", "text", "entity.name.function"], regex: "(function)(\\s+)(" + r + ")"},
- {token: function (r) {
- return r == "this" ? "variable.language" : r == "function" ? "storage.type" : e.hasOwnProperty(r) || n.hasOwnProperty(r) ? "keyword" : t.hasOwnProperty(r) ? "constant.language" : /^_?[A-Z][a-zA-Z0-9_]*$/.test(r) ? "language.support.class" : "identifier"
- }, regex: r},
- {token: "keyword.operator", regex: "!|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|==|=|!=|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)"},
- {token: "punctuation.operator", regex: "\\?|\\:|\\,|\\;|\\."},
- {token: "paren.lparen", regex: "[[({<]"},
- {token: "paren.rparen", regex: "[\\])}>]"},
- {token: "text", regex: "\\s+"}
- ], comment: [
- {token: "comment", regex: ".*?\\*\\/", next: "start"},
- {token: "comment", regex: ".+"}
- ]}, this.embedRules(s, "doc-", [s.getEndRule("start")])
- };
- r.inherits(u, o), t.JsxHighlightRules = u
-}), ace.define("ace/mode/doc_comment_highlight_rules", ["require", "exports", "module", "ace/lib/oop", "ace/mode/text_highlight_rules"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("./text_highlight_rules").TextHighlightRules, s = function () {
- this.$rules = {start: [
- {token: "comment.doc.tag", regex: "@[\\w\\d_]+"},
- {token: "comment.doc.tag", regex: "\\bTODO\\b"},
- {defaultToken: "comment.doc"}
- ]}
- };
- r.inherits(s, i), s.getStartRule = function (e) {
- return{token: "comment.doc", regex: "\\/\\*(?=\\*)", next: e}
- }, s.getEndRule = function (e) {
- return{token: "comment.doc", regex: "\\*\\/", next: e}
- }, t.DocCommentHighlightRules = s
-}), ace.define("ace/mode/matching_brace_outdent", ["require", "exports", "module", "ace/range"], function (e, t, n) {
- var r = e("../range").Range, i = function () {
- };
- (function () {
- this.checkOutdent = function (e, t) {
- return/^\s+$/.test(e) ? /^\s*\}/.test(t) : !1
- }, this.autoOutdent = function (e, t) {
- var n = e.getLine(t), i = n.match(/^(\s*\})/);
- if (!i)return 0;
- var s = i[1].length, o = e.findMatchingBracket({row: t, column: s});
- if (!o || o.row == t)return 0;
- var u = this.$getIndent(e.getLine(o.row));
- e.replace(new r(t, 0, t, s - 1), u)
- }, this.$getIndent = function (e) {
- var t = e.match(/^(\s+)/);
- return t ? t[1] : ""
- }
- }).call(i.prototype), t.MatchingBraceOutdent = i
-}), ace.define("ace/mode/behaviour/cstyle", ["require", "exports", "module", "ace/lib/oop", "ace/mode/behaviour", "ace/token_iterator", "ace/lib/lang"], function (e, t, n) {
- var r = e("../../lib/oop"), i = e("../behaviour").Behaviour, s = e("../../token_iterator").TokenIterator, o = e("../../lib/lang"), u = ["text", "paren.rparen", "punctuation.operator"], a = ["text", "paren.rparen", "punctuation.operator", "comment"], f = 0, l = -1, c = "", h = 0, p = -1, d = "", v = "", m = function () {
- m.isSaneInsertion = function (e, t) {
- var n = e.getCursorPosition(), r = new s(t, n.row, n.column);
- if (!this.$matchTokenType(r.getCurrentToken() || "text", u)) {
- var i = new s(t, n.row, n.column + 1);
- if (!this.$matchTokenType(i.getCurrentToken() || "text", u))return!1
- }
- return r.stepForward(), r.getCurrentTokenRow() !== n.row || this.$matchTokenType(r.getCurrentToken() || "text", a)
- }, m.$matchTokenType = function (e, t) {
- return t.indexOf(e.type || e) > -1
- }, m.recordAutoInsert = function (e, t, n) {
- var r = e.getCursorPosition(), i = t.doc.getLine(r.row);
- this.isAutoInsertedClosing(r, i, c[0]) || (f = 0), l = r.row, c = n + i.substr(r.column), f++
- }, m.recordMaybeInsert = function (e, t, n) {
- var r = e.getCursorPosition(), i = t.doc.getLine(r.row);
- this.isMaybeInsertedClosing(r, i) || (h = 0), p = r.row, d = i.substr(0, r.column) + n, v = i.substr(r.column), h++
- }, m.isAutoInsertedClosing = function (e, t, n) {
- return f > 0 && e.row === l && n === c[0] && t.substr(e.column) === c
- }, m.isMaybeInsertedClosing = function (e, t) {
- return h > 0 && e.row === p && t.substr(e.column) === v && t.substr(0, e.column) == d
- }, m.popAutoInsertedClosing = function () {
- c = c.substr(1), f--
- }, m.clearMaybeInsertedClosing = function () {
- h = 0, p = -1
- }, this.add("braces", "insertion", function (e, t, n, r, i) {
- var s = n.getCursorPosition(), u = r.doc.getLine(s.row);
- if (i == "{") {
- var a = n.getSelectionRange(), f = r.doc.getTextRange(a);
- if (f !== "" && f !== "{" && n.getWrapBehavioursEnabled())return{text: "{" + f + "}", selection: !1};
- if (m.isSaneInsertion(n, r))return/[\]\}\)]/.test(u[s.column]) ? (m.recordAutoInsert(n, r, "}"), {text: "{}", selection: [1, 1]}) : (m.recordMaybeInsert(n, r, "{"), {text: "{", selection: [1, 1]})
- } else if (i == "}") {
- var l = u.substring(s.column, s.column + 1);
- if (l == "}") {
- var c = r.$findOpeningBracket("}", {column: s.column + 1, row: s.row});
- if (c !== null && m.isAutoInsertedClosing(s, u, i))return m.popAutoInsertedClosing(), {text: "", selection: [1, 1]}
- }
- } else if (i == "\n" || i == "\r\n") {
- var p = "";
- m.isMaybeInsertedClosing(s, u) && (p = o.stringRepeat("}", h), m.clearMaybeInsertedClosing());
- var l = u.substring(s.column, s.column + 1);
- if (l == "}" || p !== "") {
- var d = r.findMatchingBracket({row: s.row, column: s.column}, "}");
- if (!d)return null;
- var v = this.getNextLineIndent(e, u.substring(0, s.column), r.getTabString()), g = this.$getIndent(u);
- return{text: "\n" + v + "\n" + g + p, selection: [1, v.length, 1, v.length]}
- }
- }
- }), this.add("braces", "deletion", function (e, t, n, r, i) {
- var s = r.doc.getTextRange(i);
- if (!i.isMultiLine() && s == "{") {
- var o = r.doc.getLine(i.start.row), u = o.substring(i.end.column, i.end.column + 1);
- if (u == "}")return i.end.column++, i;
- h--
- }
- }), this.add("parens", "insertion", function (e, t, n, r, i) {
- if (i == "(") {
- var s = n.getSelectionRange(), o = r.doc.getTextRange(s);
- if (o !== "" && n.getWrapBehavioursEnabled())return{text: "(" + o + ")", selection: !1};
- if (m.isSaneInsertion(n, r))return m.recordAutoInsert(n, r, ")"), {text: "()", selection: [1, 1]}
- } else if (i == ")") {
- var u = n.getCursorPosition(), a = r.doc.getLine(u.row), f = a.substring(u.column, u.column + 1);
- if (f == ")") {
- var l = r.$findOpeningBracket(")", {column: u.column + 1, row: u.row});
- if (l !== null && m.isAutoInsertedClosing(u, a, i))return m.popAutoInsertedClosing(), {text: "", selection: [1, 1]}
- }
- }
- }), this.add("parens", "deletion", function (e, t, n, r, i) {
- var s = r.doc.getTextRange(i);
- if (!i.isMultiLine() && s == "(") {
- var o = r.doc.getLine(i.start.row), u = o.substring(i.start.column + 1, i.start.column + 2);
- if (u == ")")return i.end.column++, i
- }
- }), this.add("brackets", "insertion", function (e, t, n, r, i) {
- if (i == "[") {
- var s = n.getSelectionRange(), o = r.doc.getTextRange(s);
- if (o !== "" && n.getWrapBehavioursEnabled())return{text: "[" + o + "]", selection: !1};
- if (m.isSaneInsertion(n, r))return m.recordAutoInsert(n, r, "]"), {text: "[]", selection: [1, 1]}
- } else if (i == "]") {
- var u = n.getCursorPosition(), a = r.doc.getLine(u.row), f = a.substring(u.column, u.column + 1);
- if (f == "]") {
- var l = r.$findOpeningBracket("]", {column: u.column + 1, row: u.row});
- if (l !== null && m.isAutoInsertedClosing(u, a, i))return m.popAutoInsertedClosing(), {text: "", selection: [1, 1]}
- }
- }
- }), this.add("brackets", "deletion", function (e, t, n, r, i) {
- var s = r.doc.getTextRange(i);
- if (!i.isMultiLine() && s == "[") {
- var o = r.doc.getLine(i.start.row), u = o.substring(i.start.column + 1, i.start.column + 2);
- if (u == "]")return i.end.column++, i
- }
- }), this.add("string_dquotes", "insertion", function (e, t, n, r, i) {
- if (i == '"' || i == "'") {
- var s = i, o = n.getSelectionRange(), u = r.doc.getTextRange(o);
- if (u !== "" && u !== "'" && u != '"' && n.getWrapBehavioursEnabled())return{text: s + u + s, selection: !1};
- var a = n.getCursorPosition(), f = r.doc.getLine(a.row), l = f.substring(a.column - 1, a.column);
- if (l == "\\")return null;
- var c = r.getTokens(o.start.row), h = 0, p, d = -1;
- for (var v = 0; v < c.length; v++) {
- p = c[v], p.type == "string" ? d = -1 : d < 0 && (d = p.value.indexOf(s));
- if (p.value.length + h > o.start.column)break;
- h += c[v].value.length
- }
- if (!p || d < 0 && p.type !== "comment" && (p.type !== "string" || o.start.column !== p.value.length + h - 1 && p.value.lastIndexOf(s) === p.value.length - 1)) {
- if (!m.isSaneInsertion(n, r))return;
- return{text: s + s, selection: [1, 1]}
- }
- if (p && p.type === "string") {
- var g = f.substring(a.column, a.column + 1);
- if (g == s)return{text: "", selection: [1, 1]}
- }
- }
- }), this.add("string_dquotes", "deletion", function (e, t, n, r, i) {
- var s = r.doc.getTextRange(i);
- if (!i.isMultiLine() && (s == '"' || s == "'")) {
- var o = r.doc.getLine(i.start.row), u = o.substring(i.start.column + 1, i.start.column + 2);
- if (u == s)return i.end.column++, i
- }
- })
- };
- r.inherits(m, i), t.CstyleBehaviour = m
-}), ace.define("ace/mode/folding/cstyle", ["require", "exports", "module", "ace/lib/oop", "ace/range", "ace/mode/folding/fold_mode"], function (e, t, n) {
- var r = e("../../lib/oop"), i = e("../../range").Range, s = e("./fold_mode").FoldMode, o = t.FoldMode = function () {
- };
- r.inherits(o, s), function () {
- this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/, this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/, this.getFoldWidgetRange = function (e, t, n) {
- var r = e.getLine(n), i = r.match(this.foldingStartMarker);
- if (i) {
- var s = i.index;
- return i[1] ? this.openingBracketBlock(e, i[1], n, s) : e.getCommentFoldRange(n, s + i[0].length, 1)
- }
- if (t !== "markbeginend")return;
- var i = r.match(this.foldingStopMarker);
- if (i) {
- var s = i.index + i[0].length;
- return i[1] ? this.closingBracketBlock(e, i[1], n, s) : e.getCommentFoldRange(n, s, -1)
- }
- }
- }.call(o.prototype)
-})
\ No newline at end of file
diff --git a/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/mode-latex.js b/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/mode-latex.js
deleted file mode 100644
index 14e386f..0000000
--- a/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/mode-latex.js
+++ /dev/null
@@ -1,78 +0,0 @@
-ace.define("ace/mode/latex", ["require", "exports", "module", "ace/lib/oop", "ace/mode/text", "ace/tokenizer", "ace/mode/latex_highlight_rules", "ace/mode/folding/latex", "ace/range"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("./text").Mode, s = e("../tokenizer").Tokenizer, o = e("./latex_highlight_rules").LatexHighlightRules, u = e("./folding/latex").FoldMode, a = e("../range").Range, f = function () {
- this.$tokenizer = new s((new o).getRules()), this.foldingRules = new u
- };
- r.inherits(f, i), function () {
- this.toggleCommentLines = function (e, t, n, r) {
- var i = !0, s = /^(\s*)\%/;
- for (var o = n; o <= r; o++)if (!s.test(t.getLine(o))) {
- i = !1;
- break
- }
- if (i) {
- var u = new a(0, 0, 0, 0);
- for (var o = n; o <= r; o++) {
- var f = t.getLine(o), l = f.match(s);
- u.start.row = o, u.end.row = o, u.end.column = l[0].length, t.replace(u, l[1])
- }
- } else t.indentRows(n, r, "%")
- }, this.getNextLineIndent = function (e, t, n) {
- return this.$getIndent(t)
- }
- }.call(f.prototype), t.Mode = f
-}), ace.define("ace/mode/latex_highlight_rules", ["require", "exports", "module", "ace/lib/oop", "ace/mode/text_highlight_rules"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("./text_highlight_rules").TextHighlightRules, s = function () {
- this.$rules = {start: [
- {token: "keyword", regex: "\\\\(?:[^a-zA-Z]|[a-zA-Z]+)"},
- {token: "lparen", regex: "[[({]"},
- {token: "rparen", regex: "[\\])}]"},
- {token: "string", regex: "\\$(?:(?:\\\\.)|(?:[^\\$\\\\]))*?\\$"},
- {token: "comment", regex: "%.*$"}
- ]}
- };
- r.inherits(s, i), t.LatexHighlightRules = s
-}), ace.define("ace/mode/folding/latex", ["require", "exports", "module", "ace/lib/oop", "ace/mode/folding/fold_mode", "ace/range", "ace/token_iterator"], function (e, t, n) {
- var r = e("../../lib/oop"), i = e("./fold_mode").FoldMode, s = e("../../range").Range, o = e("../../token_iterator").TokenIterator, u = t.FoldMode = function () {
- };
- r.inherits(u, i), function () {
- this.foldingStartMarker = /^\s*\\(begin)|(section|subsection)\b|{\s*$/, this.foldingStopMarker = /^\s*\\(end)\b|^\s*}/, this.getFoldWidgetRange = function (e, t, n) {
- var r = e.doc.getLine(n), i = this.foldingStartMarker.exec(r);
- if (i)return i[1] ? this.latexBlock(e, n, i[0].length - 1) : i[2] ? this.latexSection(e, n, i[0].length - 1) : this.openingBracketBlock(e, "{", n, i.index);
- var i = this.foldingStopMarker.exec(r);
- if (i)return i[1] ? this.latexBlock(e, n, i[0].length - 1) : this.closingBracketBlock(e, "}", n, i.index + i[0].length)
- }, this.latexBlock = function (e, t, n) {
- var r = {"\\begin": 1, "\\end": -1}, i = new o(e, t, n), u = i.getCurrentToken();
- if (!u || u.type !== "keyword")return;
- var a = u.value, f = r[a], l = function () {
- var e = i.stepForward(), t = e.type == "lparen" ? i.stepForward().value : "";
- return f === -1 && (i.stepBackward(), t && i.stepBackward()), t
- }, c = [l()], h = f === -1 ? i.getCurrentTokenColumn() : e.getLine(t).length, p = t;
- i.step = f === -1 ? i.stepBackward : i.stepForward;
- while (u = i.step()) {
- if (u.type !== "keyword")continue;
- var d = r[u.value];
- if (!d)continue;
- var v = l();
- if (d === f)c.unshift(v); else if (c.shift() !== v || !c.length)break
- }
- if (c.length)return;
- var t = i.getCurrentTokenRow();
- return f === -1 ? new s(t, e.getLine(t).length, p, h) : new s(p, h, t, i.getCurrentTokenColumn())
- }, this.latexSection = function (e, t, n) {
- var r = ["\\subsection", "\\section", "\\begin", "\\end"], i = new o(e, t, n), u = i.getCurrentToken();
- if (!u || u.type != "keyword")return;
- var a = r.indexOf(u.value), f = 0, l = t;
- while (u = i.stepForward()) {
- if (u.type !== "keyword")continue;
- var c = r.indexOf(u.value);
- if (c >= 2) {
- f || (l = i.getCurrentTokenRow() - 1), f += c == 2 ? 1 : -1;
- if (f < 0)break
- } else if (c >= a)break
- }
- f || (l = i.getCurrentTokenRow() - 1);
- while (l > t && !/\S/.test(e.getLine(l)))l--;
- return new s(t, e.getLine(t).length, l, e.getLine(l).length)
- }
- }.call(u.prototype)
-})
\ No newline at end of file
diff --git a/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/mode-less.js b/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/mode-less.js
deleted file mode 100644
index d7b877f..0000000
--- a/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/mode-less.js
+++ /dev/null
@@ -1,236 +0,0 @@
-ace.define("ace/mode/less", ["require", "exports", "module", "ace/lib/oop", "ace/mode/text", "ace/tokenizer", "ace/mode/less_highlight_rules", "ace/mode/matching_brace_outdent", "ace/mode/behaviour/css", "ace/mode/folding/cstyle"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("./text").Mode, s = e("../tokenizer").Tokenizer, o = e("./less_highlight_rules").LessHighlightRules, u = e("./matching_brace_outdent").MatchingBraceOutdent, a = e("./behaviour/css").CssBehaviour, f = e("./folding/cstyle").FoldMode, l = function () {
- this.$tokenizer = new s((new o).getRules(), "i"), this.$outdent = new u, this.$behaviour = new a, this.foldingRules = new f
- };
- r.inherits(l, i), function () {
- this.getNextLineIndent = function (e, t, n) {
- var r = this.$getIndent(t), i = this.$tokenizer.getLineTokens(t, e).tokens;
- if (i.length && i[i.length - 1].type == "comment")return r;
- var s = t.match(/^.*\{\s*$/);
- return s && (r += n), r
- }, this.checkOutdent = function (e, t, n) {
- return this.$outdent.checkOutdent(t, n)
- }, this.autoOutdent = function (e, t, n) {
- this.$outdent.autoOutdent(t, n)
- }
- }.call(l.prototype), t.Mode = l
-}), ace.define("ace/mode/less_highlight_rules", ["require", "exports", "module", "ace/lib/oop", "ace/lib/lang", "ace/mode/text_highlight_rules"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("../lib/lang"), s = e("./text_highlight_rules").TextHighlightRules, o = function () {
- var e = i.arrayToMap(function () {
- var e = "-webkit-|-moz-|-o-|-ms-|-svg-|-pie-|-khtml-".split("|"), t = "appearance|background-clip|background-inline-policy|background-origin|background-size|binding|border-bottom-colors|border-left-colors|border-right-colors|border-top-colors|border-end|border-end-color|border-end-style|border-end-width|border-image|border-start|border-start-color|border-start-style|border-start-width|box-align|box-direction|box-flex|box-flexgroup|box-ordinal-group|box-orient|box-pack|box-sizing|column-count|column-gap|column-width|column-rule|column-rule-width|column-rule-style|column-rule-color|float-edge|font-feature-settings|font-language-override|force-broken-image-icon|image-region|margin-end|margin-start|opacity|outline|outline-color|outline-offset|outline-radius|outline-radius-bottomleft|outline-radius-bottomright|outline-radius-topleft|outline-radius-topright|outline-style|outline-width|padding-end|padding-start|stack-sizing|tab-size|text-blink|text-decoration-color|text-decoration-line|text-decoration-style|transform|transform-origin|transition|transition-delay|transition-duration|transition-property|transition-timing-function|user-focus|user-input|user-modify|user-select|window-shadow|border-radius".split("|"), n = "azimuth|background-attachment|background-color|background-image|background-position|background-repeat|background|border-bottom-color|border-bottom-style|border-bottom-width|border-bottom|border-collapse|border-color|border-left-color|border-left-style|border-left-width|border-left|border-right-color|border-right-style|border-right-width|border-right|border-spacing|border-style|border-top-color|border-top-style|border-top-width|border-top|border-width|border|bottom|box-sizing|caption-side|clear|clip|color|content|counter-increment|counter-reset|cue-after|cue-before|cue|cursor|direction|display|elevation|empty-cells|float|font-family|font-size-adjust|font-size|font-stretch|font-style|font-variant|font-weight|font|height|left|letter-spacing|line-height|list-style-image|list-style-position|list-style-type|list-style|margin-bottom|margin-left|margin-right|margin-top|marker-offset|margin|marks|max-height|max-width|min-height|min-width|opacity|orphans|outline-color|outline-style|outline-width|outline|overflow|overflow-x|overflow-y|padding-bottom|padding-left|padding-right|padding-top|padding|page-break-after|page-break-before|page-break-inside|page|pause-after|pause-before|pause|pitch-range|pitch|play-during|position|quotes|richness|right|size|speak-header|speak-numeral|speak-punctuation|speech-rate|speak|stress|table-layout|text-align|text-decoration|text-indent|text-shadow|text-transform|top|unicode-bidi|vertical-align|visibility|voice-family|volume|white-space|widows|width|word-spacing|z-index".split("|"), r = [];
- for (var i = 0, s = e.length; i < s; i++)Array.prototype.push.apply(r, (e[i] + t.join("|" + e[i])).split("|"));
- return Array.prototype.push.apply(r, t), Array.prototype.push.apply(r, n), r
- }()), t = i.arrayToMap("hsl|hsla|rgb|rgba|url|attr|counter|counters|lighten|darken|saturate|desaturate|fadein|fadeout|fade|spin|mix|hue|saturation|lightness|alpha|round|ceil|floor|percentage|color|iscolor|isnumber|isstring|iskeyword|isurl|ispixel|ispercentage|isem".split("|")), n = i.arrayToMap("absolute|all-scroll|always|armenian|auto|baseline|below|bidi-override|block|bold|bolder|border-box|both|bottom|break-all|break-word|capitalize|center|char|circle|cjk-ideographic|col-resize|collapse|content-box|crosshair|dashed|decimal-leading-zero|decimal|default|disabled|disc|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ellipsis|fixed|georgian|groove|hand|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|inactive|inherit|inline-block|inline|inset|inside|inter-ideograph|inter-word|italic|justify|katakana-iroha|katakana|keep-all|left|lighter|line-edge|line-through|line|list-item|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|medium|middle|move|n-resize|ne-resize|newspaper|no-drop|no-repeat|nw-resize|none|normal|not-allowed|nowrap|oblique|outset|outside|overline|pointer|progress|relative|repeat-x|repeat-y|repeat|right|ridge|row-resize|rtl|s-resize|scroll|se-resize|separate|small-caps|solid|square|static|strict|super|sw-resize|table-footer-group|table-header-group|tb-rl|text-bottom|text-top|text|thick|thin|top|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|zero".split("|")), r = i.arrayToMap("aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow".split("|")), s = i.arrayToMap("@mixin|@extend|@include|@import|@media|@debug|@warn|@if|@for|@each|@while|@else|@font-face|@-webkit-keyframes|if|and|!default|module|def|end|declare|when|not|and".split("|")), o = i.arrayToMap("a|abbr|acronym|address|applet|area|article|aside|audio|b|base|basefont|bdo|big|blockquote|body|br|button|canvas|caption|center|cite|code|col|colgroup|command|datalist|dd|del|details|dfn|dir|div|dl|dt|em|embed|fieldset|figcaption|figure|font|footer|form|frame|frameset|h1|h2|h3|h4|h5|h6|head|header|hgroup|hr|html|i|iframe|img|input|ins|keygen|kbd|label|legend|li|link|map|mark|menu|meta|meter|nav|noframes|noscript|object|ol|optgroup|option|output|p|param|pre|progress|q|rp|rt|ruby|s|samp|script|section|select|small|source|span|strike|strong|style|sub|summary|sup|table|tbody|td|textarea|tfoot|th|thead|time|title|tr|tt|u|ul|var|video|wbr|xmp".split("|")), u = "\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))";
- this.$rules = {start: [
- {token: "comment", regex: "\\/\\/.*$"},
- {token: "comment", regex: "\\/\\*", next: "comment"},
- {token: "string", regex: '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},
- {token: "string", regex: "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},
- {token: "constant.numeric", regex: u + "(?:em|ex|px|cm|mm|in|pt|pc|deg|rad|grad|ms|s|hz|khz|%)"},
- {token: "constant.numeric", regex: "#[a-f0-9]{6}"},
- {token: "constant.numeric", regex: "#[a-f0-9]{3}"},
- {token: "constant.numeric", regex: u},
- {token: function (e) {
- return s.hasOwnProperty(e) ? "keyword" : "variable"
- }, regex: "@[a-z0-9_\\-@]*\\b"},
- {token: function (i) {
- return e.hasOwnProperty(i.toLowerCase()) ? "support.type" : s.hasOwnProperty(i) ? "keyword" : n.hasOwnProperty(i) ? "constant.language" : t.hasOwnProperty(i) ? "support.function" : r.hasOwnProperty(i.toLowerCase()) ? "support.constant.color" : o.hasOwnProperty(i.toLowerCase()) ? "variable.language" : "text"
- }, regex: "\\-?[@a-z_][@a-z0-9_\\-]*"},
- {token: "variable.language", regex: "#[a-z0-9-_]+"},
- {token: "variable.language", regex: "\\.[a-z0-9-_]+"},
- {token: "variable.language", regex: ":[a-z0-9-_]+"},
- {token: "constant", regex: "[a-z0-9-_]+"},
- {token: "keyword.operator", regex: "<|>|<=|>=|==|!=|-|%|#|\\+|\\$|\\+|\\*"},
- {token: "paren.lparen", regex: "[[({]"},
- {token: "paren.rparen", regex: "[\\])}]"},
- {token: "text", regex: "\\s+"}
- ], comment: [
- {token: "comment", regex: ".*?\\*\\/", next: "start"},
- {token: "comment", regex: ".+"}
- ]}
- };
- r.inherits(o, s), t.LessHighlightRules = o
-}), ace.define("ace/mode/matching_brace_outdent", ["require", "exports", "module", "ace/range"], function (e, t, n) {
- var r = e("../range").Range, i = function () {
- };
- (function () {
- this.checkOutdent = function (e, t) {
- return/^\s+$/.test(e) ? /^\s*\}/.test(t) : !1
- }, this.autoOutdent = function (e, t) {
- var n = e.getLine(t), i = n.match(/^(\s*\})/);
- if (!i)return 0;
- var s = i[1].length, o = e.findMatchingBracket({row: t, column: s});
- if (!o || o.row == t)return 0;
- var u = this.$getIndent(e.getLine(o.row));
- e.replace(new r(t, 0, t, s - 1), u)
- }, this.$getIndent = function (e) {
- var t = e.match(/^(\s+)/);
- return t ? t[1] : ""
- }
- }).call(i.prototype), t.MatchingBraceOutdent = i
-}), ace.define("ace/mode/behaviour/css", ["require", "exports", "module", "ace/lib/oop", "ace/mode/behaviour", "ace/mode/behaviour/cstyle", "ace/token_iterator"], function (e, t, n) {
- var r = e("../../lib/oop"), i = e("../behaviour").Behaviour, s = e("./cstyle").CstyleBehaviour, o = e("../../token_iterator").TokenIterator, u = function () {
- this.inherit(s), this.add("colon", "insertion", function (e, t, n, r, i) {
- if (i === ":") {
- var s = n.getCursorPosition(), u = new o(r, s.row, s.column), a = u.getCurrentToken();
- a && a.value.match(/\s+/) && (a = u.stepBackward());
- if (a && a.type === "support.type") {
- var f = r.doc.getLine(s.row), l = f.substring(s.column, s.column + 1);
- if (l === ":")return{text: "", selection: [1, 1]};
- if (!f.substring(s.column).match(/^\s*;/))return{text: ":;", selection: [1, 1]}
- }
- }
- }), this.add("colon", "deletion", function (e, t, n, r, i) {
- var s = r.doc.getTextRange(i);
- if (!i.isMultiLine() && s === ":") {
- var o = r.doc.getLine(i.start.row), u = o.substring(i.end.column, i.end.column + 1);
- if (u === ";")return i.end.column++, i
- }
- }), this.add("semicolon", "insertion", function (e, t, n, r, i) {
- if (i === ";") {
- var s = n.getCursorPosition(), o = r.doc.getLine(s.row), u = o.substring(s.column, s.column + 1);
- if (u === ";")return{text: "", selection: [1, 1]}
- }
- })
- };
- r.inherits(u, s), t.CssBehaviour = u
-}), ace.define("ace/mode/behaviour/cstyle", ["require", "exports", "module", "ace/lib/oop", "ace/mode/behaviour", "ace/token_iterator", "ace/lib/lang"], function (e, t, n) {
- var r = e("../../lib/oop"), i = e("../behaviour").Behaviour, s = e("../../token_iterator").TokenIterator, o = e("../../lib/lang"), u = ["text", "paren.rparen", "punctuation.operator"], a = ["text", "paren.rparen", "punctuation.operator", "comment"], f = 0, l = -1, c = "", h = 0, p = -1, d = "", v = "", m = function () {
- m.isSaneInsertion = function (e, t) {
- var n = e.getCursorPosition(), r = new s(t, n.row, n.column);
- if (!this.$matchTokenType(r.getCurrentToken() || "text", u)) {
- var i = new s(t, n.row, n.column + 1);
- if (!this.$matchTokenType(i.getCurrentToken() || "text", u))return!1
- }
- return r.stepForward(), r.getCurrentTokenRow() !== n.row || this.$matchTokenType(r.getCurrentToken() || "text", a)
- }, m.$matchTokenType = function (e, t) {
- return t.indexOf(e.type || e) > -1
- }, m.recordAutoInsert = function (e, t, n) {
- var r = e.getCursorPosition(), i = t.doc.getLine(r.row);
- this.isAutoInsertedClosing(r, i, c[0]) || (f = 0), l = r.row, c = n + i.substr(r.column), f++
- }, m.recordMaybeInsert = function (e, t, n) {
- var r = e.getCursorPosition(), i = t.doc.getLine(r.row);
- this.isMaybeInsertedClosing(r, i) || (h = 0), p = r.row, d = i.substr(0, r.column) + n, v = i.substr(r.column), h++
- }, m.isAutoInsertedClosing = function (e, t, n) {
- return f > 0 && e.row === l && n === c[0] && t.substr(e.column) === c
- }, m.isMaybeInsertedClosing = function (e, t) {
- return h > 0 && e.row === p && t.substr(e.column) === v && t.substr(0, e.column) == d
- }, m.popAutoInsertedClosing = function () {
- c = c.substr(1), f--
- }, m.clearMaybeInsertedClosing = function () {
- h = 0, p = -1
- }, this.add("braces", "insertion", function (e, t, n, r, i) {
- var s = n.getCursorPosition(), u = r.doc.getLine(s.row);
- if (i == "{") {
- var a = n.getSelectionRange(), f = r.doc.getTextRange(a);
- if (f !== "" && f !== "{" && n.getWrapBehavioursEnabled())return{text: "{" + f + "}", selection: !1};
- if (m.isSaneInsertion(n, r))return/[\]\}\)]/.test(u[s.column]) ? (m.recordAutoInsert(n, r, "}"), {text: "{}", selection: [1, 1]}) : (m.recordMaybeInsert(n, r, "{"), {text: "{", selection: [1, 1]})
- } else if (i == "}") {
- var l = u.substring(s.column, s.column + 1);
- if (l == "}") {
- var c = r.$findOpeningBracket("}", {column: s.column + 1, row: s.row});
- if (c !== null && m.isAutoInsertedClosing(s, u, i))return m.popAutoInsertedClosing(), {text: "", selection: [1, 1]}
- }
- } else if (i == "\n" || i == "\r\n") {
- var p = "";
- m.isMaybeInsertedClosing(s, u) && (p = o.stringRepeat("}", h), m.clearMaybeInsertedClosing());
- var l = u.substring(s.column, s.column + 1);
- if (l == "}" || p !== "") {
- var d = r.findMatchingBracket({row: s.row, column: s.column}, "}");
- if (!d)return null;
- var v = this.getNextLineIndent(e, u.substring(0, s.column), r.getTabString()), g = this.$getIndent(u);
- return{text: "\n" + v + "\n" + g + p, selection: [1, v.length, 1, v.length]}
- }
- }
- }), this.add("braces", "deletion", function (e, t, n, r, i) {
- var s = r.doc.getTextRange(i);
- if (!i.isMultiLine() && s == "{") {
- var o = r.doc.getLine(i.start.row), u = o.substring(i.end.column, i.end.column + 1);
- if (u == "}")return i.end.column++, i;
- h--
- }
- }), this.add("parens", "insertion", function (e, t, n, r, i) {
- if (i == "(") {
- var s = n.getSelectionRange(), o = r.doc.getTextRange(s);
- if (o !== "" && n.getWrapBehavioursEnabled())return{text: "(" + o + ")", selection: !1};
- if (m.isSaneInsertion(n, r))return m.recordAutoInsert(n, r, ")"), {text: "()", selection: [1, 1]}
- } else if (i == ")") {
- var u = n.getCursorPosition(), a = r.doc.getLine(u.row), f = a.substring(u.column, u.column + 1);
- if (f == ")") {
- var l = r.$findOpeningBracket(")", {column: u.column + 1, row: u.row});
- if (l !== null && m.isAutoInsertedClosing(u, a, i))return m.popAutoInsertedClosing(), {text: "", selection: [1, 1]}
- }
- }
- }), this.add("parens", "deletion", function (e, t, n, r, i) {
- var s = r.doc.getTextRange(i);
- if (!i.isMultiLine() && s == "(") {
- var o = r.doc.getLine(i.start.row), u = o.substring(i.start.column + 1, i.start.column + 2);
- if (u == ")")return i.end.column++, i
- }
- }), this.add("brackets", "insertion", function (e, t, n, r, i) {
- if (i == "[") {
- var s = n.getSelectionRange(), o = r.doc.getTextRange(s);
- if (o !== "" && n.getWrapBehavioursEnabled())return{text: "[" + o + "]", selection: !1};
- if (m.isSaneInsertion(n, r))return m.recordAutoInsert(n, r, "]"), {text: "[]", selection: [1, 1]}
- } else if (i == "]") {
- var u = n.getCursorPosition(), a = r.doc.getLine(u.row), f = a.substring(u.column, u.column + 1);
- if (f == "]") {
- var l = r.$findOpeningBracket("]", {column: u.column + 1, row: u.row});
- if (l !== null && m.isAutoInsertedClosing(u, a, i))return m.popAutoInsertedClosing(), {text: "", selection: [1, 1]}
- }
- }
- }), this.add("brackets", "deletion", function (e, t, n, r, i) {
- var s = r.doc.getTextRange(i);
- if (!i.isMultiLine() && s == "[") {
- var o = r.doc.getLine(i.start.row), u = o.substring(i.start.column + 1, i.start.column + 2);
- if (u == "]")return i.end.column++, i
- }
- }), this.add("string_dquotes", "insertion", function (e, t, n, r, i) {
- if (i == '"' || i == "'") {
- var s = i, o = n.getSelectionRange(), u = r.doc.getTextRange(o);
- if (u !== "" && u !== "'" && u != '"' && n.getWrapBehavioursEnabled())return{text: s + u + s, selection: !1};
- var a = n.getCursorPosition(), f = r.doc.getLine(a.row), l = f.substring(a.column - 1, a.column);
- if (l == "\\")return null;
- var c = r.getTokens(o.start.row), h = 0, p, d = -1;
- for (var v = 0; v < c.length; v++) {
- p = c[v], p.type == "string" ? d = -1 : d < 0 && (d = p.value.indexOf(s));
- if (p.value.length + h > o.start.column)break;
- h += c[v].value.length
- }
- if (!p || d < 0 && p.type !== "comment" && (p.type !== "string" || o.start.column !== p.value.length + h - 1 && p.value.lastIndexOf(s) === p.value.length - 1)) {
- if (!m.isSaneInsertion(n, r))return;
- return{text: s + s, selection: [1, 1]}
- }
- if (p && p.type === "string") {
- var g = f.substring(a.column, a.column + 1);
- if (g == s)return{text: "", selection: [1, 1]}
- }
- }
- }), this.add("string_dquotes", "deletion", function (e, t, n, r, i) {
- var s = r.doc.getTextRange(i);
- if (!i.isMultiLine() && (s == '"' || s == "'")) {
- var o = r.doc.getLine(i.start.row), u = o.substring(i.start.column + 1, i.start.column + 2);
- if (u == s)return i.end.column++, i
- }
- })
- };
- r.inherits(m, i), t.CstyleBehaviour = m
-}), ace.define("ace/mode/folding/cstyle", ["require", "exports", "module", "ace/lib/oop", "ace/range", "ace/mode/folding/fold_mode"], function (e, t, n) {
- var r = e("../../lib/oop"), i = e("../../range").Range, s = e("./fold_mode").FoldMode, o = t.FoldMode = function () {
- };
- r.inherits(o, s), function () {
- this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/, this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/, this.getFoldWidgetRange = function (e, t, n) {
- var r = e.getLine(n), i = r.match(this.foldingStartMarker);
- if (i) {
- var s = i.index;
- return i[1] ? this.openingBracketBlock(e, i[1], n, s) : e.getCommentFoldRange(n, s + i[0].length, 1)
- }
- if (t !== "markbeginend")return;
- var i = r.match(this.foldingStopMarker);
- if (i) {
- var s = i.index + i[0].length;
- return i[1] ? this.closingBracketBlock(e, i[1], n, s) : e.getCommentFoldRange(n, s, -1)
- }
- }
- }.call(o.prototype)
-})
\ No newline at end of file
diff --git a/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/mode-liquid.js b/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/mode-liquid.js
deleted file mode 100644
index 1ed7124..0000000
--- a/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/mode-liquid.js
+++ /dev/null
@@ -1,245 +0,0 @@
-ace.define("ace/mode/liquid", ["require", "exports", "module", "ace/lib/oop", "ace/mode/text", "ace/tokenizer", "ace/mode/liquid_highlight_rules", "ace/mode/matching_brace_outdent", "ace/range"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("./text").Mode, s = e("../tokenizer").Tokenizer, o = e("./liquid_highlight_rules").LiquidHighlightRules, u = e("./matching_brace_outdent").MatchingBraceOutdent, a = e("../range").Range, f = function () {
- this.$tokenizer = new s((new o).getRules()), this.$outdent = new u
- };
- r.inherits(f, i), function () {
- this.toggleCommentLines = function (e, t, n, r) {
- var i = !0, s = [], o = /^(\s*)#/;
- for (var u = n; u <= r; u++)if (!o.test(t.getLine(u))) {
- i = !1;
- break
- }
- if (i) {
- var f = new a(0, 0, 0, 0);
- for (var u = n; u <= r; u++) {
- var l = t.getLine(u), c = l.match(o);
- f.start.row = u, f.end.row = u, f.end.column = c[0].length, t.replace(f, c[1])
- }
- } else t.indentRows(n, r, "#")
- }, this.getNextLineIndent = function (e, t, n) {
- var r = this.$getIndent(t), i = this.$tokenizer.getLineTokens(t, e), s = i.tokens, o = i.state;
- if (s.length && s[s.length - 1].type == "comment")return r;
- if (e == "start") {
- var u = t.match(/^.*[\{\(\[]\s*$/);
- u && (r += n)
- }
- return r
- }, this.checkOutdent = function (e, t, n) {
- return this.$outdent.checkOutdent(t, n)
- }, this.autoOutdent = function (e, t, n) {
- this.$outdent.autoOutdent(t, n)
- }
- }.call(f.prototype), t.Mode = f
-}), ace.define("ace/mode/liquid_highlight_rules", ["require", "exports", "module", "ace/lib/oop", "ace/mode/css_highlight_rules", "ace/mode/javascript_highlight_rules", "ace/mode/xml_util", "ace/mode/text_highlight_rules"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("./css_highlight_rules").CssHighlightRules, s = e("./javascript_highlight_rules").JavaScriptHighlightRules, o = e("./xml_util"), u = e("./text_highlight_rules").TextHighlightRules, a = function () {
- var e = "date|capitalize|downcase|upcase|first|last|join|sort|map|size|escape|escape_once|strip_html|strip_newlines|newline_to_br|replace|replace_first|truncate|truncatewords|prepend|append|minus|plus|times|divided_by|split", t = "capture|endcapture|case|endcase|when|comment|endcomment|cycle|for|endfor|in|reversed|if|endif|else|elsif|include|endinclude|unless|endunless|style|text|image|widget|plugin|marker|endmarker|tablerow|endtablerow", n = "forloop|tablerowloop", r = "assign", u = this.createKeywordMapper({"variable.language": n, keyword: t, "support.function": e, "keyword.definition": r}, "identifier");
- this.$rules = {start: [
- {token: "variable", regex: "{%", next: "liquid_start"},
- {token: "variable", regex: "{{", next: "liquid_start"},
- {token: "meta.tag", regex: "<\\!\\[CDATA\\[", next: "cdata"},
- {token: "xml-pe", regex: "<\\?.*?\\?>"},
- {token: "comment", regex: "<\\!--", next: "comment"},
- {token: "meta.tag", regex: "<(?=\\s*script\\b)", next: "script"},
- {token: "meta.tag", regex: "<(?=\\s*style\\b)", next: "style"},
- {token: "meta.tag", regex: "<\\/?", next: "tag"}
- ], cdata: [
- {token: "text", regex: "\\]\\]>", next: "start"}
- ], comment: [
- {token: "comment", regex: ".*?-->", next: "start"},
- {defaultToken: "comment"}
- ], liquid_start: [
- {token: "variable", regex: "}}", next: "start"},
- {token: "variable", regex: "%}", next: "start"},
- {token: "string", regex: '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},
- {token: "string", regex: "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},
- {token: "constant.numeric", regex: "0[xX][0-9a-fA-F]+\\b"},
- {token: "constant.numeric", regex: "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},
- {token: "constant.language.boolean", regex: "(?:true|false)\\b"},
- {token: u, regex: "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},
- {token: "keyword.operator", regex: "/|\\*|\\-|\\+|=|!=|\\?\\:"},
- {token: "paren.lparen", regex: /[\[\({]/},
- {token: "paren.rparen", regex: /[\])}]/},
- {token: "text", regex: "\\s+"}
- ]}, o.tag(this.$rules, "tag", "start"), o.tag(this.$rules, "style", "css-start"), o.tag(this.$rules, "script", "js-start"), this.embedRules(s, "js-", [
- {token: "comment", regex: "\\/\\/.*(?=<\\/script>)", next: "tag"},
- {token: "meta.tag", regex: "<\\/(?=script)", next: "tag"}
- ]), this.embedRules(i, "css-", [
- {token: "meta.tag", regex: "<\\/(?=style)", next: "tag"}
- ])
- };
- r.inherits(a, u), t.LiquidHighlightRules = a
-}), ace.define("ace/mode/css_highlight_rules", ["require", "exports", "module", "ace/lib/oop", "ace/lib/lang", "ace/mode/text_highlight_rules"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("../lib/lang"), s = e("./text_highlight_rules").TextHighlightRules, o = t.supportType = "animation-fill-mode|alignment-adjust|alignment-baseline|animation-delay|animation-direction|animation-duration|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|animation|appearance|azimuth|backface-visibility|background-attachment|background-break|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|background|baseline-shift|binding|bleed|bookmark-label|bookmark-level|bookmark-state|bookmark-target|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|border|bottom|box-align|box-decoration-break|box-direction|box-flex-group|box-flex|box-lines|box-ordinal-group|box-orient|box-pack|box-shadow|box-sizing|break-after|break-before|break-inside|caption-side|clear|clip|color-profile|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|crop|cue-after|cue-before|cue|cursor|direction|display|dominant-baseline|drop-initial-after-adjust|drop-initial-after-align|drop-initial-before-adjust|drop-initial-before-align|drop-initial-size|drop-initial-value|elevation|empty-cells|fit|fit-position|float-offset|float|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|font|grid-columns|grid-rows|hanging-punctuation|height|hyphenate-after|hyphenate-before|hyphenate-character|hyphenate-lines|hyphenate-resource|hyphens|icon|image-orientation|image-rendering|image-resolution|inline-box-align|left|letter-spacing|line-height|line-stacking-ruby|line-stacking-shift|line-stacking-strategy|line-stacking|list-style-image|list-style-position|list-style-type|list-style|margin-bottom|margin-left|margin-right|margin-top|margin|mark-after|mark-before|mark|marks|marquee-direction|marquee-play-count|marquee-speed|marquee-style|max-height|max-width|min-height|min-width|move-to|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|orphans|outline-color|outline-offset|outline-style|outline-width|outline|overflow-style|overflow-x|overflow-y|overflow|padding-bottom|padding-left|padding-right|padding-top|padding|page-break-after|page-break-before|page-break-inside|page-policy|page|pause-after|pause-before|pause|perspective-origin|perspective|phonemes|pitch-range|pitch|play-during|position|presentation-level|punctuation-trim|quotes|rendering-intent|resize|rest-after|rest-before|rest|richness|right|rotation-point|rotation|ruby-align|ruby-overhang|ruby-position|ruby-span|size|speak-header|speak-numeral|speak-punctuation|speak|speech-rate|stress|string-set|table-layout|target-name|target-new|target-position|target|text-align-last|text-align|text-decoration|text-emphasis|text-height|text-indent|text-justify|text-outline|text-shadow|text-transform|text-wrap|top|transform-origin|transform-style|transform|transition-delay|transition-duration|transition-property|transition-timing-function|transition|unicode-bidi|vertical-align|visibility|voice-balance|voice-duration|voice-family|voice-pitch-range|voice-pitch|voice-rate|voice-stress|voice-volume|volume|white-space-collapse|white-space|widows|width|word-break|word-spacing|word-wrap|z-index", u = t.supportFunction = "rgb|rgba|url|attr|counter|counters", a = t.supportConstant = "absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero", f = t.supportConstantColor = "aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow", l = t.supportConstantFonts = "arial|century|comic|courier|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace", c = t.numRe = "\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))", h = t.pseudoElements = "(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b", p = t.pseudoClasses = "(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b", d = function () {
- var e = this.createKeywordMapper({"support.function": u, "support.constant": a, "support.type": o, "support.constant.color": f, "support.constant.fonts": l}, "text", !0), t = [
- {token: "comment", regex: "\\/\\*", next: "ruleset_comment"},
- {token: "string", regex: '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},
- {token: "string", regex: "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},
- {token: ["constant.numeric", "keyword"], regex: "(" + c + ")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vm|vw|%)"},
- {token: "constant.numeric", regex: c},
- {token: "constant.numeric", regex: "#[a-f0-9]{6}"},
- {token: "constant.numeric", regex: "#[a-f0-9]{3}"},
- {token: ["punctuation", "entity.other.attribute-name.pseudo-element.css"], regex: h},
- {token: ["punctuation", "entity.other.attribute-name.pseudo-class.css"], regex: p},
- {token: e, regex: "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"}
- ], n = i.copyArray(t);
- n.unshift({token: "paren.rparen", regex: "\\}", next: "start"});
- var r = i.copyArray(t);
- r.unshift({token: "paren.rparen", regex: "\\}", next: "media"});
- var s = [
- {token: "comment", regex: ".+"}
- ], d = i.copyArray(s);
- d.unshift({token: "comment", regex: ".*?\\*\\/", next: "start"});
- var v = i.copyArray(s);
- v.unshift({token: "comment", regex: ".*?\\*\\/", next: "media"});
- var m = i.copyArray(s);
- m.unshift({token: "comment", regex: ".*?\\*\\/", next: "ruleset"}), this.$rules = {start: [
- {token: "comment", regex: "\\/\\*", next: "comment"},
- {token: "paren.lparen", regex: "\\{", next: "ruleset"},
- {token: "string", regex: "@.*?{", next: "media"},
- {token: "keyword", regex: "#[a-z0-9-_]+"},
- {token: "variable", regex: "\\.[a-z0-9-_]+"},
- {token: "string", regex: ":[a-z0-9-_]+"},
- {token: "constant", regex: "[a-z0-9-_]+"}
- ], media: [
- {token: "comment", regex: "\\/\\*", next: "media_comment"},
- {token: "paren.lparen", regex: "\\{", next: "media_ruleset"},
- {token: "string", regex: "\\}", next: "start"},
- {token: "keyword", regex: "#[a-z0-9-_]+"},
- {token: "variable", regex: "\\.[a-z0-9-_]+"},
- {token: "string", regex: ":[a-z0-9-_]+"},
- {token: "constant", regex: "[a-z0-9-_]+"}
- ], comment: d, ruleset: n, ruleset_comment: m, media_ruleset: r, media_comment: v}
- };
- r.inherits(d, s), t.CssHighlightRules = d
-}), ace.define("ace/mode/javascript_highlight_rules", ["require", "exports", "module", "ace/lib/oop", "ace/mode/doc_comment_highlight_rules", "ace/mode/text_highlight_rules"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("./doc_comment_highlight_rules").DocCommentHighlightRules, s = e("./text_highlight_rules").TextHighlightRules, o = function () {
- var e = this.createKeywordMapper({"variable.language": "Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document", keyword: "const|yield|import|get|set|break|case|catch|continue|default|delete|do|else|finally|for|function|if|in|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|__parent__|__count__|escape|unescape|with|__proto__|class|enum|extends|super|export|implements|private|public|interface|package|protected|static", "storage.type": "const|let|var|function", "constant.language": "null|Infinity|NaN|undefined", "support.function": "alert", "constant.language.boolean": "true|false"}, "identifier"), t = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void", n = "[a-zA-Z\\$_¡-￿][a-zA-Z\\d\\$_¡-￿]*\\b", r = "\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|[0-2][0-7]{0,2}|3[0-6][0-7]?|37[0-7]?|[4-7][0-7]?|.)";
- this.$rules = {start: [
- {token: "comment", regex: /\/\/.*$/},
- i.getStartRule("doc-start"),
- {token: "comment", regex: /\/\*/, next: "comment"},
- {token: "string", regex: "'(?=.)", next: "qstring"},
- {token: "string", regex: '"(?=.)', next: "qqstring"},
- {token: "constant.numeric", regex: /0[xX][0-9a-fA-F]+\b/},
- {token: "constant.numeric", regex: /[+-]?\d+(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?\b/},
- {token: ["storage.type", "punctuation.operator", "support.function", "punctuation.operator", "entity.name.function", "text", "keyword.operator"], regex: "(" + n + ")(\\.)(prototype)(\\.)(" + n + ")(\\s*)(=)", next: "function_arguments"},
- {token: ["storage.type", "punctuation.operator", "entity.name.function", "text", "keyword.operator", "text", "storage.type", "text", "paren.lparen"], regex: "(" + n + ")(\\.)(" + n + ")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", next: "function_arguments"},
- {token: ["entity.name.function", "text", "keyword.operator", "text", "storage.type", "text", "paren.lparen"], regex: "(" + n + ")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", next: "function_arguments"},
- {token: ["storage.type", "punctuation.operator", "entity.name.function", "text", "keyword.operator", "text", "storage.type", "text", "entity.name.function", "text", "paren.lparen"], regex: "(" + n + ")(\\.)(" + n + ")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()", next: "function_arguments"},
- {token: ["storage.type", "text", "entity.name.function", "text", "paren.lparen"], regex: "(function)(\\s+)(" + n + ")(\\s*)(\\()", next: "function_arguments"},
- {token: ["entity.name.function", "text", "punctuation.operator", "text", "storage.type", "text", "paren.lparen"], regex: "(" + n + ")(\\s*)(:)(\\s*)(function)(\\s*)(\\()", next: "function_arguments"},
- {token: ["text", "text", "storage.type", "text", "paren.lparen"], regex: "(:)(\\s*)(function)(\\s*)(\\()", next: "function_arguments"},
- {token: "keyword", regex: "(?:" + t + ")\\b", next: "regex_allowed"},
- {token: ["punctuation.operator", "support.function"], regex: /(\.)(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:opzzzz|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/},
- {token: ["punctuation.operator", "support.function.dom"], regex: /(\.)(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/},
- {token: ["punctuation.operator", "support.constant"], regex: /(\.)(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/},
- {token: ["storage.type", "punctuation.operator", "support.function.firebug"], regex: /(console)(\.)(warn|info|log|error|time|timeEnd|assert)\b/},
- {token: e, regex: n},
- {token: "keyword.operator", regex: /--|\+\+|[!$%&*+\-~]|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|\*=|%=|\+=|\-=|&=|\^=/, next: "regex_allowed"},
- {token: "punctuation.operator", regex: /\?|\:|\,|\;|\./, next: "regex_allowed"},
- {token: "paren.lparen", regex: /[\[({]/, next: "regex_allowed"},
- {token: "paren.rparen", regex: /[\])}]/},
- {token: "keyword.operator", regex: /\/=?/, next: "regex_allowed"},
- {token: "comment", regex: /^#!.*$/}
- ], regex_allowed: [i.getStartRule("doc-start"), {token: "comment", regex: "\\/\\*", next: "comment_regex_allowed"}, {token: "comment", regex: "\\/\\/.*$"}, {token: "string.regexp", regex: "\\/", next: "regex"}, {token: "text", regex: "\\s+"}, {token: "empty", regex: "", next: "start"}], regex: [
- {token: "regexp.keyword.operator", regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},
- {token: "string.regexp", regex: "/\\w*", next: "start"},
- {token: "invalid", regex: /\{\d+,?(?:\d+)?}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/},
- {token: "constant.language.escape", regex: /\(\?[:=!]|\)|{\d+,?(?:\d+)?}|{,\d+}|[+*]\?|[()$^+*?]/},
- {token: "constant.language.delimiter", regex: /\|/},
- {token: "constant.language.escape", regex: /\[\^?/, next: "regex_character_class"},
- {token: "empty", regex: "$", next: "start"},
- {defaultToken: "string.regexp"}
- ], regex_character_class: [
- {token: "regexp.keyword.operator", regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},
- {token: "constant.language.escape", regex: "]", next: "regex"},
- {token: "constant.language.escape", regex: "-"},
- {token: "empty", regex: "$", next: "start"},
- {defaultToken: "string.regexp.charachterclass"}
- ], function_arguments: [
- {token: "variable.parameter", regex: n},
- {token: "punctuation.operator", regex: "[, ]+"},
- {token: "punctuation.operator", regex: "$"},
- {token: "empty", regex: "", next: "start"}
- ], comment_regex_allowed: [
- {token: "comment", regex: "\\*\\/", next: "regex_allowed"},
- {defaultToken: "comment"}
- ], comment: [
- {token: "comment", regex: "\\*\\/", next: "start"},
- {defaultToken: "comment"}
- ], qqstring: [
- {token: "constant.language.escape", regex: r},
- {token: "string", regex: "\\\\$", next: "qqstring"},
- {token: "string", regex: '"|$', next: "start"},
- {defaultToken: "string"}
- ], qstring: [
- {token: "constant.language.escape", regex: r},
- {token: "string", regex: "\\\\$", next: "qstring"},
- {token: "string", regex: "'|$", next: "start"},
- {defaultToken: "string"}
- ]}, this.embedRules(i, "doc-", [i.getEndRule("start")])
- };
- r.inherits(o, s), t.JavaScriptHighlightRules = o
-}), ace.define("ace/mode/doc_comment_highlight_rules", ["require", "exports", "module", "ace/lib/oop", "ace/mode/text_highlight_rules"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("./text_highlight_rules").TextHighlightRules, s = function () {
- this.$rules = {start: [
- {token: "comment.doc.tag", regex: "@[\\w\\d_]+"},
- {token: "comment.doc.tag", regex: "\\bTODO\\b"},
- {defaultToken: "comment.doc"}
- ]}
- };
- r.inherits(s, i), s.getStartRule = function (e) {
- return{token: "comment.doc", regex: "\\/\\*(?=\\*)", next: e}
- }, s.getEndRule = function (e) {
- return{token: "comment.doc", regex: "\\*\\/", next: e}
- }, t.DocCommentHighlightRules = s
-}), ace.define("ace/mode/xml_util", ["require", "exports", "module"], function (e, t, n) {
- function r(e) {
- return[
- {token: "string", regex: '"', next: e + "_qqstring"},
- {token: "string", regex: "'", next: e + "_qstring"}
- ]
- }
-
- function i(e, t) {
- return[
- {token: "string", regex: e, next: t},
- {token: "constant.language.escape", regex: "(?:[0-9]+;)|(?:[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"},
- {defaultToken: "string"}
- ]
- }
-
- t.tag = function (e, t, n, s) {
- e[t] = [
- {token: "text", regex: "\\s+"},
- {token: s ? function (e) {
- return s[e] ? "meta.tag.tag-name." + s[e] : "meta.tag.tag-name"
- } : "meta.tag.tag-name", regex: "[-_a-zA-Z0-9:]+", next: t + "_embed_attribute_list"},
- {token: "empty", regex: "", next: t + "_embed_attribute_list"}
- ], e[t + "_qstring"] = i("'", t + "_embed_attribute_list"), e[t + "_qqstring"] = i('"', t + "_embed_attribute_list"), e[t + "_embed_attribute_list"] = [
- {token: "meta.tag.r", regex: "/?>", next: n},
- {token: "keyword.operator", regex: "="},
- {token: "entity.other.attribute-name", regex: "[-_a-zA-Z0-9:]+"},
- {token: "constant.numeric", regex: "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},
- {token: "text", regex: "\\s+"}
- ].concat(r(t))
- }
-}), ace.define("ace/mode/matching_brace_outdent", ["require", "exports", "module", "ace/range"], function (e, t, n) {
- var r = e("../range").Range, i = function () {
- };
- (function () {
- this.checkOutdent = function (e, t) {
- return/^\s+$/.test(e) ? /^\s*\}/.test(t) : !1
- }, this.autoOutdent = function (e, t) {
- var n = e.getLine(t), i = n.match(/^(\s*\})/);
- if (!i)return 0;
- var s = i[1].length, o = e.findMatchingBracket({row: t, column: s});
- if (!o || o.row == t)return 0;
- var u = this.$getIndent(e.getLine(o.row));
- e.replace(new r(t, 0, t, s - 1), u)
- }, this.$getIndent = function (e) {
- var t = e.match(/^(\s+)/);
- return t ? t[1] : ""
- }
- }).call(i.prototype), t.MatchingBraceOutdent = i
-})
\ No newline at end of file
diff --git a/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/mode-lisp.js b/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/mode-lisp.js
deleted file mode 100644
index b60e747..0000000
--- a/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/mode-lisp.js
+++ /dev/null
@@ -1,28 +0,0 @@
-ace.define("ace/mode/lisp", ["require", "exports", "module", "ace/lib/oop", "ace/mode/text", "ace/tokenizer", "ace/mode/lisp_highlight_rules"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("./text").Mode, s = e("../tokenizer").Tokenizer, o = e("./lisp_highlight_rules").LispHighlightRules, u = function () {
- var e = new o;
- this.$tokenizer = new s(e.getRules())
- };
- r.inherits(u, i), function () {
- }.call(u.prototype), t.Mode = u
-}), ace.define("ace/mode/lisp_highlight_rules", ["require", "exports", "module", "ace/lib/oop", "ace/mode/text_highlight_rules"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("./text_highlight_rules").TextHighlightRules, s = function () {
- var e = "case|do|let|loop|if|else|when", t = "eq|neq|and|or", n = "null|nil", r = "cons|car|cdr|cond|lambda|format|setq|setf|quote|eval|append|list|listp|memberp|t|load|progn", i = this.createKeywordMapper({"keyword.control": e, "keyword.operator": t, "constant.language": n, "support.function": r}, "identifier", !0);
- this.$rules = {start: [
- {token: "comment", regex: ";.*$"},
- {token: ["storage.type.function-type.lisp", "text", "entity.name.function.lisp"], regex: "(?:\\b(?:(defun|defmethod|defmacro))\\b)(\\s+)((?:\\w|\\-|\\!|\\?)*)"},
- {token: ["punctuation.definition.constant.character.lisp", "constant.character.lisp"], regex: "(#)((?:\\w|[\\\\+-=<>'\"])+)"},
- {token: ["punctuation.definition.variable.lisp", "variable.other.global.lisp", "punctuation.definition.variable.lisp"], regex: "(\\*)(\\S*)(\\*)"},
- {token: "constant.numeric", regex: "0[xX][0-9a-fA-F]+(?:L|l|UL|ul|u|U|F|f|ll|LL|ull|ULL)?\\b"},
- {token: "constant.numeric", regex: "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?(?:L|l|UL|ul|u|U|F|f|ll|LL|ull|ULL)?\\b"},
- {token: i, regex: "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},
- {token: "string", regex: '"(?=.)', next: "qqstring"}
- ], qqstring: [
- {token: "constant.character.escape.lisp", regex: "\\\\."},
- {token: "string", regex: '[^"\\\\]+'},
- {token: "string", regex: "\\\\$", next: "qqstring"},
- {token: "string", regex: '"|$', next: "start"}
- ]}
- };
- r.inherits(s, i), t.LispHighlightRules = s
-})
\ No newline at end of file
diff --git a/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/mode-livescript.js b/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/mode-livescript.js
deleted file mode 100644
index a98579a..0000000
--- a/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/mode-livescript.js
+++ /dev/null
@@ -1,113 +0,0 @@
-ace.define("ace/mode/ls", function (e, t, n) {
- function u(e, t) {
- function n() {
- }
-
- return n.prototype = (e.superclass = t).prototype, (e.prototype = new n).constructor = e, typeof t.extended == "function" && t.extended(e), e
- }
-
- function a(e, t) {
- var n = {}.hasOwnProperty;
- for (var r in t)n.call(t, r) && (e[r] = t[r]);
- return e
- }
-
- var r, i, s, o;
- r = "(?![\\d\\s])[$\\w\\xAA-\\uFFDC](?:(?!\\s)[$\\w\\xAA-\\uFFDC]|-[A-Za-z])*", t.Mode = i = function (t) {
- function o() {
- var t;
- this.$tokenizer = new (e("ace/tokenizer").Tokenizer)(o.Rules);
- if (t = e("ace/mode/matching_brace_outdent"))this.$outdent = new t.MatchingBraceOutdent
- }
-
- var n, i = u((a(o, t).displayName = "LiveScriptMode", o), t).prototype, s = o;
- return n = RegExp("(?:[({[=:]|[-~]>|\\b(?:e(?:lse|xport)|d(?:o|efault)|t(?:ry|hen)|finally|import(?:\\s*all)?|const|var|let|new|catch(?:\\s*" + r + ")?))\\s*$"), i.getNextLineIndent = function (e, t, r) {
- var i, s;
- return i = this.$getIndent(t), s = this.$tokenizer.getLineTokens(t, e).tokens, (!s.length || s[s.length - 1].type !== "comment") && e === "start" && n.test(t) && (i += r), i
- }, i.toggleCommentLines = function (t, n, r, i) {
- var s, o, u, a, f, l;
- s = /^(\s*)#/, o = new (e("ace/range").Range)(0, 0, 0, 0);
- for (u = r; u <= i; ++u)a = u, (f = s.test(l = n.getLine(a))) ? l = l.replace(s, "$1") : l = l.replace(/^\s*/, "$"), o.end.row = o.start.row = a, o.end.column = l.length + 1, n.replace(o, l);
- return 1 - f * 2
- }, i.checkOutdent = function (e, t, n) {
- var r;
- return(r = this.$outdent) != null ? r.checkOutdent(t, n) : void 8
- }, i.autoOutdent = function (e, t, n) {
- var r;
- return(r = this.$outdent) != null ? r.autoOutdent(t, n) : void 8
- }, o
- }(e("ace/mode/text").Mode), s = "(?![$\\w]|-[A-Za-z]|\\s*:(?![:=]))", o = {token: "string", regex: ".+"}, i.Rules = {start: [
- {token: "keyword", regex: "(?:t(?:h(?:is|row|en)|ry|ypeof!?)|c(?:on(?:tinue|st)|a(?:se|tch)|lass)|i(?:n(?:stanceof)?|mp(?:ort(?:\\s+all)?|lements)|[fs])|d(?:e(?:fault|lete|bugger)|o)|f(?:or(?:\\s+own)?|inally|unction)|s(?:uper|witch)|e(?:lse|x(?:tends|port)|val)|a(?:nd|rguments)|n(?:ew|ot)|un(?:less|til)|w(?:hile|ith)|o[fr]|return|break|let|var|loop)" + s},
- {token: "constant.language", regex: "(?:true|false|yes|no|on|off|null|void|undefined)" + s},
- {token: "invalid.illegal", regex: "(?:p(?:ackage|r(?:ivate|otected)|ublic)|i(?:mplements|nterface)|enum|static|yield)" + s},
- {token: "language.support.class", regex: "(?:R(?:e(?:gExp|ferenceError)|angeError)|S(?:tring|yntaxError)|E(?:rror|valError)|Array|Boolean|Date|Function|Number|Object|TypeError|URIError)" + s},
- {token: "language.support.function", regex: "(?:is(?:NaN|Finite)|parse(?:Int|Float)|Math|JSON|(?:en|de)codeURI(?:Component)?)" + s},
- {token: "variable.language", regex: "(?:t(?:hat|il|o)|f(?:rom|allthrough)|it|by|e)" + s},
- {token: "identifier", regex: r + "\\s*:(?![:=])"},
- {token: "variable", regex: r},
- {token: "keyword.operator", regex: "(?:\\.{3}|\\s+\\?)"},
- {token: "keyword.variable", regex: "(?:@+|::|\\.\\.)", next: "key"},
- {token: "keyword.operator", regex: "\\.\\s*", next: "key"},
- {token: "string", regex: "\\\\\\S[^\\s,;)}\\]]*"},
- {token: "string.doc", regex: "'''", next: "qdoc"},
- {token: "string.doc", regex: '"""', next: "qqdoc"},
- {token: "string", regex: "'", next: "qstring"},
- {token: "string", regex: '"', next: "qqstring"},
- {token: "string", regex: "`", next: "js"},
- {token: "string", regex: "<\\[", next: "words"},
- {token: "string.regex", regex: "//", next: "heregex"},
- {token: "comment.doc", regex: "/\\*", next: "comment"},
- {token: "comment", regex: "#.*"},
- {token: "string.regex", regex: "\\/(?:[^[\\/\\n\\\\]*(?:(?:\\\\.|\\[[^\\]\\n\\\\]*(?:\\\\.[^\\]\\n\\\\]*)*\\])[^[\\/\\n\\\\]*)*)\\/[gimy$]{0,4}", next: "key"},
- {token: "constant.numeric", regex: "(?:0x[\\da-fA-F][\\da-fA-F_]*|(?:[2-9]|[12]\\d|3[0-6])r[\\da-zA-Z][\\da-zA-Z_]*|(?:\\d[\\d_]*(?:\\.\\d[\\d_]*)?|\\.\\d[\\d_]*)(?:e[+-]?\\d[\\d_]*)?[\\w$]*)"},
- {token: "lparen", regex: "[({[]"},
- {token: "rparen", regex: "[)}\\]]", next: "key"},
- {token: "keyword.operator", regex: "\\S+"},
- {token: "text", regex: "\\s+"}
- ], heregex: [
- {token: "string.regex", regex: ".*?//[gimy$?]{0,4}", next: "start"},
- {token: "string.regex", regex: "\\s*#{"},{token:"comment.regex",regex:"\\s+(?:#.*)?"},{token:"string.regex",regex:"\\S+"}],key:[{token:"keyword.operator",regex:"[.?@!]+"},{token:"identifier",regex:r,next:"start"},{token:"text",regex:".",next:"start"}],comment:[{token:"comment.doc",regex:".*?\\*/",next:"start"},{token:"comment.doc",regex:".+"}],qdoc:[{token:"string",regex:".*?'''",next:"key"},o],qqdoc:[{token:"string",regex:'.*?"""',next:"key"},o],qstring:[{token:"string",regex:"[ ^\\\\']*(?:\\\\.[^\\\\'
- ]*)*
- '",next:"key"},o],qqstring:[{token:"string",regex:'[ ^\\\\"]*(?:\\\\.[^\\\\"
- ]*)*
- "',next:"
- key
- "},o],js:[{token:"
- string
- ",regex:"[ ^\\\\`]*
- (? :\\\\.
- [ ^\\\\`]*)*`",next:"
- key
- "},o],words:[{token:"
- string
- ",regex:".* ?\\]>
- ",next:"
- key
- "},o]}}),ace.define("
- ace / mode / matching_brace_outdent
- ",["
- require
- ","
- exports
- ","
- module
- ","
- ace / range
- "],function(e,t,n){var r=e("..
- /range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/ ^\s + $ /
- .
- test(e) ? /^\s*\}/.test(t) : !1
-}, this.autoOutdent = function (e, t) {
- var n = e.getLine(t), i = n.match(/^(\s*\})/);
- if (!i)return 0;
- var s = i[1].length, o = e.findMatchingBracket({row: t, column: s});
- if (!o || o.row == t)return 0;
- var u = this.$getIndent(e.getLine(o.row));
- e.replace(new r(t, 0, t, s - 1), u)
-}, this.$getIndent = function (e) {
- var t = e.match(/^(\s+)/);
- return t ? t[1] : ""
-}
-}).
-call(i.prototype), t.MatchingBraceOutdent = i
-})
\ No newline at end of file
diff --git a/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/mode-lua.js b/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/mode-lua.js
deleted file mode 100644
index ebf4599..0000000
--- a/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/mode-lua.js
+++ /dev/null
@@ -1,114 +0,0 @@
-ace.define("ace/mode/lua", ["require", "exports", "module", "ace/lib/oop", "ace/mode/text", "ace/tokenizer", "ace/mode/lua_highlight_rules", "ace/mode/folding/lua", "ace/range"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("./text").Mode, s = e("../tokenizer").Tokenizer, o = e("./lua_highlight_rules").LuaHighlightRules, u = e("./folding/lua").FoldMode, a = e("../range").Range, f = function () {
- this.$tokenizer = new s((new o).getRules()), this.foldingRules = new u
- };
- r.inherits(f, i), function () {
- function n(t) {
- var n = 0;
- for (var r = 0; r < t.length; r++) {
- var i = t[r];
- i.type == "keyword" ? i.value in e && (n += e[i.value]) : i.type == "paren.lparen" ? n++ : i.type == "paren.rparen" && n--
- }
- return n < 0 ? -1 : n > 0 ? 1 : 0
- }
-
- var e = {"function": 1, then: 1, "do": 1, "else": 1, elseif: 1, repeat: 1, end: -1, until: -1}, t = ["else", "elseif", "end", "until"];
- this.getNextLineIndent = function (e, t, r) {
- var i = this.$getIndent(t), s = 0, o = this.$tokenizer.getLineTokens(t, e), u = o.tokens;
- return e == "start" && (s = n(u)), s > 0 ? i + r : s < 0 && i.substr(i.length - r.length) == r && !this.checkOutdent(e, t, "\n") ? i.substr(0, i.length - r.length) : i
- }, this.checkOutdent = function (e, n, r) {
- if (r != "\n" && r != "\r" && r != "\r\n")return!1;
- if (n.match(/^\s*[\)\}\]]$/))return!0;
- var i = this.$tokenizer.getLineTokens(n.trim(), e).tokens;
- return!i || !i.length ? !1 : i[0].type == "keyword" && t.indexOf(i[0].value) != -1
- }, this.autoOutdent = function (e, t, r) {
- var i = t.getLine(r - 1), s = this.$getIndent(i).length, o = this.$tokenizer.getLineTokens(i, "start").tokens, u = t.getTabString().length, f = s + u * n(o), l = this.$getIndent(t.getLine(r)).length;
- if (l < f)return;
- t.outdentRows(new a(r, 0, r + 2, 0))
- }
- }.call(f.prototype), t.Mode = f
-}), ace.define("ace/mode/lua_highlight_rules", ["require", "exports", "module", "ace/lib/oop", "ace/mode/text_highlight_rules"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("./text_highlight_rules").TextHighlightRules, s = function () {
- var e = "break|do|else|elseif|end|for|function|if|in|local|repeat|return|then|until|while|or|and|not", t = "true|false|nil|_G|_VERSION", n = "string|xpcall|package|tostring|print|os|unpack|require|getfenv|setmetatable|next|assert|tonumber|io|rawequal|collectgarbage|getmetatable|module|rawset|math|debug|pcall|table|newproxy|type|coroutine|_G|select|gcinfo|pairs|rawget|loadstring|ipairs|_VERSION|dofile|setfenv|load|error|loadfile|sub|upper|len|gfind|rep|find|match|char|dump|gmatch|reverse|byte|format|gsub|lower|preload|loadlib|loaded|loaders|cpath|config|path|seeall|exit|setlocale|date|getenv|difftime|remove|time|clock|tmpname|rename|execute|lines|write|close|flush|open|output|type|read|stderr|stdin|input|stdout|popen|tmpfile|log|max|acos|huge|ldexp|pi|cos|tanh|pow|deg|tan|cosh|sinh|random|randomseed|frexp|ceil|floor|rad|abs|sqrt|modf|asin|min|mod|fmod|log10|atan2|exp|sin|atan|getupvalue|debug|sethook|getmetatable|gethook|setmetatable|setlocal|traceback|setfenv|getinfo|setupvalue|getlocal|getregistry|getfenv|setn|insert|getn|foreachi|maxn|foreach|concat|sort|remove|resume|yield|status|wrap|create|running|__add|__sub|__mod|__unm|__concat|__lt|__index|__call|__gc|__metatable|__mul|__div|__pow|__len|__eq|__le|__newindex|__tostring|__mode|__tonumber", r = "string|package|os|io|math|debug|table|coroutine", i = "", s = "setn|foreach|foreachi|gcinfo|log10|maxn", o = this.createKeywordMapper({keyword: e, "support.function": n, "invalid.deprecated": s, "constant.library": r, "constant.language": t, "invalid.illegal": i, "variable.language": "this"}, "identifier"), u = "(?:(?:[1-9]\\d*)|(?:0))", a = "(?:0[xX][\\dA-Fa-f]+)", f = "(?:" + u + "|" + a + ")", l = "(?:\\.\\d+)", c = "(?:\\d+)", h = "(?:(?:" + c + "?" + l + ")|(?:" + c + "\\.))", p = "(?:" + h + ")";
- this.$rules = {start: [
- {stateName: "bracketedComment", token: function (e, t, n) {
- return n.unshift(this.next, e.length, t), "comment"
- }, regex: /\-\-\[=*\[/, next: [
- {token: function (e, t, n) {
- return e.length == n[1] ? (n.shift(), n.shift(), this.next = n.shift()) : this.next = "", "comment"
- }, regex: /(?:[^\\]|\\.)*?\]=*\]/, next: "start"},
- {defaultToken: "comment"}
- ]},
- {token: "comment", regex: "\\-\\-.*$"},
- {stateName: "bracketedString", token: function (e, t, n) {
- return n.unshift(this.next, e.length, t), "comment"
- }, regex: /\[=*\[/, next: [
- {token: function (e, t, n) {
- return e.length == n[1] ? (n.shift(), n.shift(), this.next = n.shift()) : this.next = "", "comment"
- }, regex: /(?:[^\\]|\\.)*?\]=*\]/, next: "start"},
- {defaultToken: "comment"}
- ]},
- {token: "string", regex: '"(?:[^\\\\]|\\\\.)*?"'},
- {token: "string", regex: "'(?:[^\\\\]|\\\\.)*?'"},
- {token: "constant.numeric", regex: p},
- {token: "constant.numeric", regex: f + "\\b"},
- {token: o, regex: "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},
- {token: "keyword.operator", regex: "\\+|\\-|\\*|\\/|%|\\#|\\^|~|<|>|<=|=>|==|~=|=|\\:|\\.\\.\\.|\\.\\."},
- {token: "paren.lparen", regex: "[\\[\\(\\{]"},
- {token: "paren.rparen", regex: "[\\]\\)\\}]"},
- {token: "text", regex: "\\s+|\\w+"}
- ]}, this.normalizeRules()
- };
- r.inherits(s, i), t.LuaHighlightRules = s
-}), ace.define("ace/mode/folding/lua", ["require", "exports", "module", "ace/lib/oop", "ace/mode/folding/fold_mode", "ace/range", "ace/token_iterator"], function (e, t, n) {
- var r = e("../../lib/oop"), i = e("./fold_mode").FoldMode, s = e("../../range").Range, o = e("../../token_iterator").TokenIterator, u = t.FoldMode = function () {
- };
- r.inherits(u, i), function () {
- this.foldingStartMarker = /\b(function|then|do|repeat)\b|{\s*$|(\[=*\[)/, this.foldingStopMarker = /\bend\b|^\s*}|\]=*\]/, this.getFoldWidget = function (e, t, n) {
- var r = e.getLine(n), i = this.foldingStartMarker.test(r), s = this.foldingStopMarker.test(r);
- if (i && !s) {
- var o = r.match(this.foldingStartMarker);
- if (o[1] == "then" && /\belseif\b/.test(r))return;
- if (o[1]) {
- if (e.getTokenAt(n, o.index + 1).type === "keyword")return"start"
- } else {
- if (!o[2])return"start";
- var u = e.bgTokenizer.getState(n) || "";
- if (u.indexOf("comment") != -1 || u.indexOf("string") != -1)return"start"
- }
- }
- if (t != "markbeginend" || !s || i && s)return"";
- var o = r.match(this.foldingStopMarker);
- if (o[0] === "end") {
- if (e.getTokenAt(n, o.index + 1).type === "keyword")return"end"
- } else {
- if (o[0][0] !== "]")return"end";
- var u = e.bgTokenizer.getState(n - 1) || "";
- if (u.indexOf("comment") != -1 || u.indexOf("string") != -1)return"end"
- }
- }, this.getFoldWidgetRange = function (e, t, n) {
- var r = e.doc.getLine(n), i = this.foldingStartMarker.exec(r);
- if (i)return i[1] ? this.luaBlock(e, n, i.index + 1) : i[2] ? e.getCommentFoldRange(n, i.index + 1) : this.openingBracketBlock(e, "{", n, i.index);
- var i = this.foldingStopMarker.exec(r);
- if (i)return i[0] === "end" && e.getTokenAt(n, i.index + 1).type === "keyword" ? this.luaBlock(e, n, i.index + 1) : i[0][0] === "]" ? e.getCommentFoldRange(n, i.index + 1) : this.closingBracketBlock(e, "}", n, i.index + i[0].length)
- }, this.luaBlock = function (e, t, n) {
- var r = new o(e, t, n), i = {"function": 1, "do": 1, then: 1, elseif: -1, end: -1, repeat: 1, until: -1}, u = r.getCurrentToken();
- if (!u || u.type != "keyword")return;
- var a = u.value, f = [a], l = i[a];
- if (!l)return;
- var c = l === -1 ? r.getCurrentTokenColumn() : e.getLine(t).length, h = t;
- r.step = l === -1 ? r.stepBackward : r.stepForward;
- while (u = r.step()) {
- if (u.type !== "keyword")continue;
- var p = l * i[u.value];
- if (p > 0)f.unshift(u.value); else if (p <= 0) {
- f.shift();
- if (!f.length && u.value != "elseif")break;
- p === 0 && f.unshift(u.value)
- }
- }
- var t = r.getCurrentTokenRow();
- return l === -1 ? new s(t, e.getLine(t).length, h, c) : new s(h, c, t, r.getCurrentTokenColumn())
- }
- }.call(u.prototype)
-})
\ No newline at end of file
diff --git a/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/mode-luapage.js b/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/mode-luapage.js
deleted file mode 100644
index 29e5409..0000000
--- a/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/mode-luapage.js
+++ /dev/null
@@ -1,739 +0,0 @@
-ace.define("ace/mode/luapage", ["require", "exports", "module", "ace/lib/oop", "ace/mode/html", "ace/mode/lua", "ace/tokenizer", "ace/mode/luapage_highlight_rules"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("./html").Mode, s = e("./lua").Mode, o = e("../tokenizer").Tokenizer, u = e("./luapage_highlight_rules").LuaPageHighlightRules, a = function () {
- var e = new u;
- this.$tokenizer = new o((new u).getRules()), this.$embeds = e.getEmbeds(), this.createModeDelegates({"lua-": s})
- };
- r.inherits(a, i), t.Mode = a
-}), ace.define("ace/mode/html", ["require", "exports", "module", "ace/lib/oop", "ace/mode/text", "ace/mode/javascript", "ace/mode/css", "ace/tokenizer", "ace/mode/html_highlight_rules", "ace/mode/behaviour/html", "ace/mode/folding/html"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("./text").Mode, s = e("./javascript").Mode, o = e("./css").Mode, u = e("../tokenizer").Tokenizer, a = e("./html_highlight_rules").HtmlHighlightRules, f = e("./behaviour/html").HtmlBehaviour, l = e("./folding/html").FoldMode, c = function () {
- var e = new a;
- this.$tokenizer = new u(e.getRules()), this.$behaviour = new f, this.$embeds = e.getEmbeds(), this.createModeDelegates({"js-": s, "css-": o}), this.foldingRules = new l
- };
- r.inherits(c, i), function () {
- this.toggleCommentLines = function (e, t, n, r) {
- return 0
- }, this.getNextLineIndent = function (e, t, n) {
- return this.$getIndent(t)
- }, this.checkOutdent = function (e, t, n) {
- return!1
- }
- }.call(c.prototype), t.Mode = c
-}), ace.define("ace/mode/javascript", ["require", "exports", "module", "ace/lib/oop", "ace/mode/text", "ace/tokenizer", "ace/mode/javascript_highlight_rules", "ace/mode/matching_brace_outdent", "ace/range", "ace/worker/worker_client", "ace/mode/behaviour/cstyle", "ace/mode/folding/cstyle"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("./text").Mode, s = e("../tokenizer").Tokenizer, o = e("./javascript_highlight_rules").JavaScriptHighlightRules, u = e("./matching_brace_outdent").MatchingBraceOutdent, a = e("../range").Range, f = e("../worker/worker_client").WorkerClient, l = e("./behaviour/cstyle").CstyleBehaviour, c = e("./folding/cstyle").FoldMode, h = function () {
- this.$tokenizer = new s((new o).getRules()), this.$outdent = new u, this.$behaviour = new l, this.foldingRules = new c
- };
- r.inherits(h, i), function () {
- this.toggleCommentLines = function (e, t, n, r) {
- var i = !0, s = /^(\s*)\/\//;
- for (var o = n; o <= r; o++)if (!s.test(t.getLine(o))) {
- i = !1;
- break
- }
- if (i) {
- var u = new a(0, 0, 0, 0);
- for (var o = n; o <= r; o++) {
- var f = t.getLine(o), l = f.match(s);
- u.start.row = o, u.end.row = o, u.end.column = l[0].length, t.replace(u, l[1])
- }
- } else t.indentRows(n, r, "//")
- }, this.getNextLineIndent = function (e, t, n) {
- var r = this.$getIndent(t), i = this.$tokenizer.getLineTokens(t, e), s = i.tokens, o = i.state;
- if (s.length && s[s.length - 1].type == "comment")return r;
- if (e == "start" || e == "regex_allowed") {
- var u = t.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/);
- u && (r += n)
- } else if (e == "doc-start") {
- if (o == "start" || e == "regex_allowed")return"";
- var u = t.match(/^\s*(\/?)\*/);
- u && (u[1] && (r += " "), r += "* ")
- }
- return r
- }, this.checkOutdent = function (e, t, n) {
- return this.$outdent.checkOutdent(t, n)
- }, this.autoOutdent = function (e, t, n) {
- this.$outdent.autoOutdent(t, n)
- }, this.createWorker = function (e) {
- var t = new f(["ace"], "ace/mode/javascript_worker", "JavaScriptWorker");
- return t.attachToDocument(e.getDocument()), t.on("jslint", function (t) {
- e.setAnnotations(t.data)
- }), t.on("terminate", function () {
- e.clearAnnotations()
- }), t
- }
- }.call(h.prototype), t.Mode = h
-}), ace.define("ace/mode/javascript_highlight_rules", ["require", "exports", "module", "ace/lib/oop", "ace/mode/doc_comment_highlight_rules", "ace/mode/text_highlight_rules"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("./doc_comment_highlight_rules").DocCommentHighlightRules, s = e("./text_highlight_rules").TextHighlightRules, o = function () {
- var e = this.createKeywordMapper({"variable.language": "Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document", keyword: "const|yield|import|get|set|break|case|catch|continue|default|delete|do|else|finally|for|function|if|in|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|__parent__|__count__|escape|unescape|with|__proto__|class|enum|extends|super|export|implements|private|public|interface|package|protected|static", "storage.type": "const|let|var|function", "constant.language": "null|Infinity|NaN|undefined", "support.function": "alert", "constant.language.boolean": "true|false"}, "identifier"), t = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void", n = "[a-zA-Z\\$_¡-￿][a-zA-Z\\d\\$_¡-￿]*\\b", r = "\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|[0-2][0-7]{0,2}|3[0-6][0-7]?|37[0-7]?|[4-7][0-7]?|.)";
- this.$rules = {start: [
- {token: "comment", regex: /\/\/.*$/},
- i.getStartRule("doc-start"),
- {token: "comment", regex: /\/\*/, next: "comment"},
- {token: "string", regex: "'(?=.)", next: "qstring"},
- {token: "string", regex: '"(?=.)', next: "qqstring"},
- {token: "constant.numeric", regex: /0[xX][0-9a-fA-F]+\b/},
- {token: "constant.numeric", regex: /[+-]?\d+(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?\b/},
- {token: ["storage.type", "punctuation.operator", "support.function", "punctuation.operator", "entity.name.function", "text", "keyword.operator"], regex: "(" + n + ")(\\.)(prototype)(\\.)(" + n + ")(\\s*)(=)", next: "function_arguments"},
- {token: ["storage.type", "punctuation.operator", "entity.name.function", "text", "keyword.operator", "text", "storage.type", "text", "paren.lparen"], regex: "(" + n + ")(\\.)(" + n + ")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", next: "function_arguments"},
- {token: ["entity.name.function", "text", "keyword.operator", "text", "storage.type", "text", "paren.lparen"], regex: "(" + n + ")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", next: "function_arguments"},
- {token: ["storage.type", "punctuation.operator", "entity.name.function", "text", "keyword.operator", "text", "storage.type", "text", "entity.name.function", "text", "paren.lparen"], regex: "(" + n + ")(\\.)(" + n + ")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()", next: "function_arguments"},
- {token: ["storage.type", "text", "entity.name.function", "text", "paren.lparen"], regex: "(function)(\\s+)(" + n + ")(\\s*)(\\()", next: "function_arguments"},
- {token: ["entity.name.function", "text", "punctuation.operator", "text", "storage.type", "text", "paren.lparen"], regex: "(" + n + ")(\\s*)(:)(\\s*)(function)(\\s*)(\\()", next: "function_arguments"},
- {token: ["text", "text", "storage.type", "text", "paren.lparen"], regex: "(:)(\\s*)(function)(\\s*)(\\()", next: "function_arguments"},
- {token: "keyword", regex: "(?:" + t + ")\\b", next: "regex_allowed"},
- {token: ["punctuation.operator", "support.function"], regex: /(\.)(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:opzzzz|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/},
- {token: ["punctuation.operator", "support.function.dom"], regex: /(\.)(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/},
- {token: ["punctuation.operator", "support.constant"], regex: /(\.)(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/},
- {token: ["storage.type", "punctuation.operator", "support.function.firebug"], regex: /(console)(\.)(warn|info|log|error|time|timeEnd|assert)\b/},
- {token: e, regex: n},
- {token: "keyword.operator", regex: /--|\+\+|[!$%&*+\-~]|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|\*=|%=|\+=|\-=|&=|\^=/, next: "regex_allowed"},
- {token: "punctuation.operator", regex: /\?|\:|\,|\;|\./, next: "regex_allowed"},
- {token: "paren.lparen", regex: /[\[({]/, next: "regex_allowed"},
- {token: "paren.rparen", regex: /[\])}]/},
- {token: "keyword.operator", regex: /\/=?/, next: "regex_allowed"},
- {token: "comment", regex: /^#!.*$/}
- ], regex_allowed: [i.getStartRule("doc-start"), {token: "comment", regex: "\\/\\*", next: "comment_regex_allowed"}, {token: "comment", regex: "\\/\\/.*$"}, {token: "string.regexp", regex: "\\/", next: "regex"}, {token: "text", regex: "\\s+"}, {token: "empty", regex: "", next: "start"}], regex: [
- {token: "regexp.keyword.operator", regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},
- {token: "string.regexp", regex: "/\\w*", next: "start"},
- {token: "invalid", regex: /\{\d+,?(?:\d+)?}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/},
- {token: "constant.language.escape", regex: /\(\?[:=!]|\)|{\d+,?(?:\d+)?}|{,\d+}|[+*]\?|[()$^+*?]/},
- {token: "constant.language.delimiter", regex: /\|/},
- {token: "constant.language.escape", regex: /\[\^?/, next: "regex_character_class"},
- {token: "empty", regex: "$", next: "start"},
- {defaultToken: "string.regexp"}
- ], regex_character_class: [
- {token: "regexp.keyword.operator", regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},
- {token: "constant.language.escape", regex: "]", next: "regex"},
- {token: "constant.language.escape", regex: "-"},
- {token: "empty", regex: "$", next: "start"},
- {defaultToken: "string.regexp.charachterclass"}
- ], function_arguments: [
- {token: "variable.parameter", regex: n},
- {token: "punctuation.operator", regex: "[, ]+"},
- {token: "punctuation.operator", regex: "$"},
- {token: "empty", regex: "", next: "start"}
- ], comment_regex_allowed: [
- {token: "comment", regex: "\\*\\/", next: "regex_allowed"},
- {defaultToken: "comment"}
- ], comment: [
- {token: "comment", regex: "\\*\\/", next: "start"},
- {defaultToken: "comment"}
- ], qqstring: [
- {token: "constant.language.escape", regex: r},
- {token: "string", regex: "\\\\$", next: "qqstring"},
- {token: "string", regex: '"|$', next: "start"},
- {defaultToken: "string"}
- ], qstring: [
- {token: "constant.language.escape", regex: r},
- {token: "string", regex: "\\\\$", next: "qstring"},
- {token: "string", regex: "'|$", next: "start"},
- {defaultToken: "string"}
- ]}, this.embedRules(i, "doc-", [i.getEndRule("start")])
- };
- r.inherits(o, s), t.JavaScriptHighlightRules = o
-}), ace.define("ace/mode/doc_comment_highlight_rules", ["require", "exports", "module", "ace/lib/oop", "ace/mode/text_highlight_rules"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("./text_highlight_rules").TextHighlightRules, s = function () {
- this.$rules = {start: [
- {token: "comment.doc.tag", regex: "@[\\w\\d_]+"},
- {token: "comment.doc.tag", regex: "\\bTODO\\b"},
- {defaultToken: "comment.doc"}
- ]}
- };
- r.inherits(s, i), s.getStartRule = function (e) {
- return{token: "comment.doc", regex: "\\/\\*(?=\\*)", next: e}
- }, s.getEndRule = function (e) {
- return{token: "comment.doc", regex: "\\*\\/", next: e}
- }, t.DocCommentHighlightRules = s
-}), ace.define("ace/mode/matching_brace_outdent", ["require", "exports", "module", "ace/range"], function (e, t, n) {
- var r = e("../range").Range, i = function () {
- };
- (function () {
- this.checkOutdent = function (e, t) {
- return/^\s+$/.test(e) ? /^\s*\}/.test(t) : !1
- }, this.autoOutdent = function (e, t) {
- var n = e.getLine(t), i = n.match(/^(\s*\})/);
- if (!i)return 0;
- var s = i[1].length, o = e.findMatchingBracket({row: t, column: s});
- if (!o || o.row == t)return 0;
- var u = this.$getIndent(e.getLine(o.row));
- e.replace(new r(t, 0, t, s - 1), u)
- }, this.$getIndent = function (e) {
- var t = e.match(/^(\s+)/);
- return t ? t[1] : ""
- }
- }).call(i.prototype), t.MatchingBraceOutdent = i
-}), ace.define("ace/mode/behaviour/cstyle", ["require", "exports", "module", "ace/lib/oop", "ace/mode/behaviour", "ace/token_iterator", "ace/lib/lang"], function (e, t, n) {
- var r = e("../../lib/oop"), i = e("../behaviour").Behaviour, s = e("../../token_iterator").TokenIterator, o = e("../../lib/lang"), u = ["text", "paren.rparen", "punctuation.operator"], a = ["text", "paren.rparen", "punctuation.operator", "comment"], f = 0, l = -1, c = "", h = 0, p = -1, d = "", v = "", m = function () {
- m.isSaneInsertion = function (e, t) {
- var n = e.getCursorPosition(), r = new s(t, n.row, n.column);
- if (!this.$matchTokenType(r.getCurrentToken() || "text", u)) {
- var i = new s(t, n.row, n.column + 1);
- if (!this.$matchTokenType(i.getCurrentToken() || "text", u))return!1
- }
- return r.stepForward(), r.getCurrentTokenRow() !== n.row || this.$matchTokenType(r.getCurrentToken() || "text", a)
- }, m.$matchTokenType = function (e, t) {
- return t.indexOf(e.type || e) > -1
- }, m.recordAutoInsert = function (e, t, n) {
- var r = e.getCursorPosition(), i = t.doc.getLine(r.row);
- this.isAutoInsertedClosing(r, i, c[0]) || (f = 0), l = r.row, c = n + i.substr(r.column), f++
- }, m.recordMaybeInsert = function (e, t, n) {
- var r = e.getCursorPosition(), i = t.doc.getLine(r.row);
- this.isMaybeInsertedClosing(r, i) || (h = 0), p = r.row, d = i.substr(0, r.column) + n, v = i.substr(r.column), h++
- }, m.isAutoInsertedClosing = function (e, t, n) {
- return f > 0 && e.row === l && n === c[0] && t.substr(e.column) === c
- }, m.isMaybeInsertedClosing = function (e, t) {
- return h > 0 && e.row === p && t.substr(e.column) === v && t.substr(0, e.column) == d
- }, m.popAutoInsertedClosing = function () {
- c = c.substr(1), f--
- }, m.clearMaybeInsertedClosing = function () {
- h = 0, p = -1
- }, this.add("braces", "insertion", function (e, t, n, r, i) {
- var s = n.getCursorPosition(), u = r.doc.getLine(s.row);
- if (i == "{") {
- var a = n.getSelectionRange(), f = r.doc.getTextRange(a);
- if (f !== "" && f !== "{" && n.getWrapBehavioursEnabled())return{text: "{" + f + "}", selection: !1};
- if (m.isSaneInsertion(n, r))return/[\]\}\)]/.test(u[s.column]) ? (m.recordAutoInsert(n, r, "}"), {text: "{}", selection: [1, 1]}) : (m.recordMaybeInsert(n, r, "{"), {text: "{", selection: [1, 1]})
- } else if (i == "}") {
- var l = u.substring(s.column, s.column + 1);
- if (l == "}") {
- var c = r.$findOpeningBracket("}", {column: s.column + 1, row: s.row});
- if (c !== null && m.isAutoInsertedClosing(s, u, i))return m.popAutoInsertedClosing(), {text: "", selection: [1, 1]}
- }
- } else if (i == "\n" || i == "\r\n") {
- var p = "";
- m.isMaybeInsertedClosing(s, u) && (p = o.stringRepeat("}", h), m.clearMaybeInsertedClosing());
- var l = u.substring(s.column, s.column + 1);
- if (l == "}" || p !== "") {
- var d = r.findMatchingBracket({row: s.row, column: s.column}, "}");
- if (!d)return null;
- var v = this.getNextLineIndent(e, u.substring(0, s.column), r.getTabString()), g = this.$getIndent(u);
- return{text: "\n" + v + "\n" + g + p, selection: [1, v.length, 1, v.length]}
- }
- }
- }), this.add("braces", "deletion", function (e, t, n, r, i) {
- var s = r.doc.getTextRange(i);
- if (!i.isMultiLine() && s == "{") {
- var o = r.doc.getLine(i.start.row), u = o.substring(i.end.column, i.end.column + 1);
- if (u == "}")return i.end.column++, i;
- h--
- }
- }), this.add("parens", "insertion", function (e, t, n, r, i) {
- if (i == "(") {
- var s = n.getSelectionRange(), o = r.doc.getTextRange(s);
- if (o !== "" && n.getWrapBehavioursEnabled())return{text: "(" + o + ")", selection: !1};
- if (m.isSaneInsertion(n, r))return m.recordAutoInsert(n, r, ")"), {text: "()", selection: [1, 1]}
- } else if (i == ")") {
- var u = n.getCursorPosition(), a = r.doc.getLine(u.row), f = a.substring(u.column, u.column + 1);
- if (f == ")") {
- var l = r.$findOpeningBracket(")", {column: u.column + 1, row: u.row});
- if (l !== null && m.isAutoInsertedClosing(u, a, i))return m.popAutoInsertedClosing(), {text: "", selection: [1, 1]}
- }
- }
- }), this.add("parens", "deletion", function (e, t, n, r, i) {
- var s = r.doc.getTextRange(i);
- if (!i.isMultiLine() && s == "(") {
- var o = r.doc.getLine(i.start.row), u = o.substring(i.start.column + 1, i.start.column + 2);
- if (u == ")")return i.end.column++, i
- }
- }), this.add("brackets", "insertion", function (e, t, n, r, i) {
- if (i == "[") {
- var s = n.getSelectionRange(), o = r.doc.getTextRange(s);
- if (o !== "" && n.getWrapBehavioursEnabled())return{text: "[" + o + "]", selection: !1};
- if (m.isSaneInsertion(n, r))return m.recordAutoInsert(n, r, "]"), {text: "[]", selection: [1, 1]}
- } else if (i == "]") {
- var u = n.getCursorPosition(), a = r.doc.getLine(u.row), f = a.substring(u.column, u.column + 1);
- if (f == "]") {
- var l = r.$findOpeningBracket("]", {column: u.column + 1, row: u.row});
- if (l !== null && m.isAutoInsertedClosing(u, a, i))return m.popAutoInsertedClosing(), {text: "", selection: [1, 1]}
- }
- }
- }), this.add("brackets", "deletion", function (e, t, n, r, i) {
- var s = r.doc.getTextRange(i);
- if (!i.isMultiLine() && s == "[") {
- var o = r.doc.getLine(i.start.row), u = o.substring(i.start.column + 1, i.start.column + 2);
- if (u == "]")return i.end.column++, i
- }
- }), this.add("string_dquotes", "insertion", function (e, t, n, r, i) {
- if (i == '"' || i == "'") {
- var s = i, o = n.getSelectionRange(), u = r.doc.getTextRange(o);
- if (u !== "" && u !== "'" && u != '"' && n.getWrapBehavioursEnabled())return{text: s + u + s, selection: !1};
- var a = n.getCursorPosition(), f = r.doc.getLine(a.row), l = f.substring(a.column - 1, a.column);
- if (l == "\\")return null;
- var c = r.getTokens(o.start.row), h = 0, p, d = -1;
- for (var v = 0; v < c.length; v++) {
- p = c[v], p.type == "string" ? d = -1 : d < 0 && (d = p.value.indexOf(s));
- if (p.value.length + h > o.start.column)break;
- h += c[v].value.length
- }
- if (!p || d < 0 && p.type !== "comment" && (p.type !== "string" || o.start.column !== p.value.length + h - 1 && p.value.lastIndexOf(s) === p.value.length - 1)) {
- if (!m.isSaneInsertion(n, r))return;
- return{text: s + s, selection: [1, 1]}
- }
- if (p && p.type === "string") {
- var g = f.substring(a.column, a.column + 1);
- if (g == s)return{text: "", selection: [1, 1]}
- }
- }
- }), this.add("string_dquotes", "deletion", function (e, t, n, r, i) {
- var s = r.doc.getTextRange(i);
- if (!i.isMultiLine() && (s == '"' || s == "'")) {
- var o = r.doc.getLine(i.start.row), u = o.substring(i.start.column + 1, i.start.column + 2);
- if (u == s)return i.end.column++, i
- }
- })
- };
- r.inherits(m, i), t.CstyleBehaviour = m
-}), ace.define("ace/mode/folding/cstyle", ["require", "exports", "module", "ace/lib/oop", "ace/range", "ace/mode/folding/fold_mode"], function (e, t, n) {
- var r = e("../../lib/oop"), i = e("../../range").Range, s = e("./fold_mode").FoldMode, o = t.FoldMode = function () {
- };
- r.inherits(o, s), function () {
- this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/, this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/, this.getFoldWidgetRange = function (e, t, n) {
- var r = e.getLine(n), i = r.match(this.foldingStartMarker);
- if (i) {
- var s = i.index;
- return i[1] ? this.openingBracketBlock(e, i[1], n, s) : e.getCommentFoldRange(n, s + i[0].length, 1)
- }
- if (t !== "markbeginend")return;
- var i = r.match(this.foldingStopMarker);
- if (i) {
- var s = i.index + i[0].length;
- return i[1] ? this.closingBracketBlock(e, i[1], n, s) : e.getCommentFoldRange(n, s, -1)
- }
- }
- }.call(o.prototype)
-}), ace.define("ace/mode/css", ["require", "exports", "module", "ace/lib/oop", "ace/mode/text", "ace/tokenizer", "ace/mode/css_highlight_rules", "ace/mode/matching_brace_outdent", "ace/worker/worker_client", "ace/mode/behaviour/css", "ace/mode/folding/cstyle"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("./text").Mode, s = e("../tokenizer").Tokenizer, o = e("./css_highlight_rules").CssHighlightRules, u = e("./matching_brace_outdent").MatchingBraceOutdent, a = e("../worker/worker_client").WorkerClient, f = e("./behaviour/css").CssBehaviour, l = e("./folding/cstyle").FoldMode, c = function () {
- this.$tokenizer = new s((new o).getRules(), "i"), this.$outdent = new u, this.$behaviour = new f, this.foldingRules = new l
- };
- r.inherits(c, i), function () {
- this.foldingRules = "cStyle", this.getNextLineIndent = function (e, t, n) {
- var r = this.$getIndent(t), i = this.$tokenizer.getLineTokens(t, e).tokens;
- if (i.length && i[i.length - 1].type == "comment")return r;
- var s = t.match(/^.*\{\s*$/);
- return s && (r += n), r
- }, this.checkOutdent = function (e, t, n) {
- return this.$outdent.checkOutdent(t, n)
- }, this.autoOutdent = function (e, t, n) {
- this.$outdent.autoOutdent(t, n)
- }, this.createWorker = function (e) {
- var t = new a(["ace"], "ace/mode/css_worker", "Worker");
- return t.attachToDocument(e.getDocument()), t.on("csslint", function (t) {
- e.setAnnotations(t.data)
- }), t.on("terminate", function () {
- e.clearAnnotations()
- }), t
- }
- }.call(c.prototype), t.Mode = c
-}), ace.define("ace/mode/css_highlight_rules", ["require", "exports", "module", "ace/lib/oop", "ace/lib/lang", "ace/mode/text_highlight_rules"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("../lib/lang"), s = e("./text_highlight_rules").TextHighlightRules, o = t.supportType = "animation-fill-mode|alignment-adjust|alignment-baseline|animation-delay|animation-direction|animation-duration|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|animation|appearance|azimuth|backface-visibility|background-attachment|background-break|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|background|baseline-shift|binding|bleed|bookmark-label|bookmark-level|bookmark-state|bookmark-target|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|border|bottom|box-align|box-decoration-break|box-direction|box-flex-group|box-flex|box-lines|box-ordinal-group|box-orient|box-pack|box-shadow|box-sizing|break-after|break-before|break-inside|caption-side|clear|clip|color-profile|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|crop|cue-after|cue-before|cue|cursor|direction|display|dominant-baseline|drop-initial-after-adjust|drop-initial-after-align|drop-initial-before-adjust|drop-initial-before-align|drop-initial-size|drop-initial-value|elevation|empty-cells|fit|fit-position|float-offset|float|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|font|grid-columns|grid-rows|hanging-punctuation|height|hyphenate-after|hyphenate-before|hyphenate-character|hyphenate-lines|hyphenate-resource|hyphens|icon|image-orientation|image-rendering|image-resolution|inline-box-align|left|letter-spacing|line-height|line-stacking-ruby|line-stacking-shift|line-stacking-strategy|line-stacking|list-style-image|list-style-position|list-style-type|list-style|margin-bottom|margin-left|margin-right|margin-top|margin|mark-after|mark-before|mark|marks|marquee-direction|marquee-play-count|marquee-speed|marquee-style|max-height|max-width|min-height|min-width|move-to|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|orphans|outline-color|outline-offset|outline-style|outline-width|outline|overflow-style|overflow-x|overflow-y|overflow|padding-bottom|padding-left|padding-right|padding-top|padding|page-break-after|page-break-before|page-break-inside|page-policy|page|pause-after|pause-before|pause|perspective-origin|perspective|phonemes|pitch-range|pitch|play-during|position|presentation-level|punctuation-trim|quotes|rendering-intent|resize|rest-after|rest-before|rest|richness|right|rotation-point|rotation|ruby-align|ruby-overhang|ruby-position|ruby-span|size|speak-header|speak-numeral|speak-punctuation|speak|speech-rate|stress|string-set|table-layout|target-name|target-new|target-position|target|text-align-last|text-align|text-decoration|text-emphasis|text-height|text-indent|text-justify|text-outline|text-shadow|text-transform|text-wrap|top|transform-origin|transform-style|transform|transition-delay|transition-duration|transition-property|transition-timing-function|transition|unicode-bidi|vertical-align|visibility|voice-balance|voice-duration|voice-family|voice-pitch-range|voice-pitch|voice-rate|voice-stress|voice-volume|volume|white-space-collapse|white-space|widows|width|word-break|word-spacing|word-wrap|z-index", u = t.supportFunction = "rgb|rgba|url|attr|counter|counters", a = t.supportConstant = "absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero", f = t.supportConstantColor = "aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow", l = t.supportConstantFonts = "arial|century|comic|courier|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace", c = t.numRe = "\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))", h = t.pseudoElements = "(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b", p = t.pseudoClasses = "(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b", d = function () {
- var e = this.createKeywordMapper({"support.function": u, "support.constant": a, "support.type": o, "support.constant.color": f, "support.constant.fonts": l}, "text", !0), t = [
- {token: "comment", regex: "\\/\\*", next: "ruleset_comment"},
- {token: "string", regex: '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},
- {token: "string", regex: "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},
- {token: ["constant.numeric", "keyword"], regex: "(" + c + ")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vm|vw|%)"},
- {token: "constant.numeric", regex: c},
- {token: "constant.numeric", regex: "#[a-f0-9]{6}"},
- {token: "constant.numeric", regex: "#[a-f0-9]{3}"},
- {token: ["punctuation", "entity.other.attribute-name.pseudo-element.css"], regex: h},
- {token: ["punctuation", "entity.other.attribute-name.pseudo-class.css"], regex: p},
- {token: e, regex: "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"}
- ], n = i.copyArray(t);
- n.unshift({token: "paren.rparen", regex: "\\}", next: "start"});
- var r = i.copyArray(t);
- r.unshift({token: "paren.rparen", regex: "\\}", next: "media"});
- var s = [
- {token: "comment", regex: ".+"}
- ], d = i.copyArray(s);
- d.unshift({token: "comment", regex: ".*?\\*\\/", next: "start"});
- var v = i.copyArray(s);
- v.unshift({token: "comment", regex: ".*?\\*\\/", next: "media"});
- var m = i.copyArray(s);
- m.unshift({token: "comment", regex: ".*?\\*\\/", next: "ruleset"}), this.$rules = {start: [
- {token: "comment", regex: "\\/\\*", next: "comment"},
- {token: "paren.lparen", regex: "\\{", next: "ruleset"},
- {token: "string", regex: "@.*?{", next: "media"},
- {token: "keyword", regex: "#[a-z0-9-_]+"},
- {token: "variable", regex: "\\.[a-z0-9-_]+"},
- {token: "string", regex: ":[a-z0-9-_]+"},
- {token: "constant", regex: "[a-z0-9-_]+"}
- ], media: [
- {token: "comment", regex: "\\/\\*", next: "media_comment"},
- {token: "paren.lparen", regex: "\\{", next: "media_ruleset"},
- {token: "string", regex: "\\}", next: "start"},
- {token: "keyword", regex: "#[a-z0-9-_]+"},
- {token: "variable", regex: "\\.[a-z0-9-_]+"},
- {token: "string", regex: ":[a-z0-9-_]+"},
- {token: "constant", regex: "[a-z0-9-_]+"}
- ], comment: d, ruleset: n, ruleset_comment: m, media_ruleset: r, media_comment: v}
- };
- r.inherits(d, s), t.CssHighlightRules = d
-}), ace.define("ace/mode/behaviour/css", ["require", "exports", "module", "ace/lib/oop", "ace/mode/behaviour", "ace/mode/behaviour/cstyle", "ace/token_iterator"], function (e, t, n) {
- var r = e("../../lib/oop"), i = e("../behaviour").Behaviour, s = e("./cstyle").CstyleBehaviour, o = e("../../token_iterator").TokenIterator, u = function () {
- this.inherit(s), this.add("colon", "insertion", function (e, t, n, r, i) {
- if (i === ":") {
- var s = n.getCursorPosition(), u = new o(r, s.row, s.column), a = u.getCurrentToken();
- a && a.value.match(/\s+/) && (a = u.stepBackward());
- if (a && a.type === "support.type") {
- var f = r.doc.getLine(s.row), l = f.substring(s.column, s.column + 1);
- if (l === ":")return{text: "", selection: [1, 1]};
- if (!f.substring(s.column).match(/^\s*;/))return{text: ":;", selection: [1, 1]}
- }
- }
- }), this.add("colon", "deletion", function (e, t, n, r, i) {
- var s = r.doc.getTextRange(i);
- if (!i.isMultiLine() && s === ":") {
- var o = r.doc.getLine(i.start.row), u = o.substring(i.end.column, i.end.column + 1);
- if (u === ";")return i.end.column++, i
- }
- }), this.add("semicolon", "insertion", function (e, t, n, r, i) {
- if (i === ";") {
- var s = n.getCursorPosition(), o = r.doc.getLine(s.row), u = o.substring(s.column, s.column + 1);
- if (u === ";")return{text: "", selection: [1, 1]}
- }
- })
- };
- r.inherits(u, s), t.CssBehaviour = u
-}), ace.define("ace/mode/html_highlight_rules", ["require", "exports", "module", "ace/lib/oop", "ace/lib/lang", "ace/mode/css_highlight_rules", "ace/mode/javascript_highlight_rules", "ace/mode/xml_util", "ace/mode/text_highlight_rules"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("../lib/lang"), s = e("./css_highlight_rules").CssHighlightRules, o = e("./javascript_highlight_rules").JavaScriptHighlightRules, u = e("./xml_util"), a = e("./text_highlight_rules").TextHighlightRules, f = i.createMap({a: "anchor", button: "form", form: "form", img: "image", input: "form", label: "form", script: "script", select: "form", textarea: "form", style: "style", table: "table", tbody: "table", td: "table", tfoot: "table", th: "table", tr: "table"}), l = function () {
- this.$rules = {start: [
- {token: "text", regex: "<\\!\\[CDATA\\[", next: "cdata"},
- {token: "xml-pe", regex: "<\\?.*?\\?>"},
- {token: "comment", regex: "<\\!--", next: "comment"},
- {token: "xml-pe", regex: "<\\!.*?>"},
- {token: "meta.tag", regex: "<(?=script\\b)", next: "script"},
- {token: "meta.tag", regex: "<(?=style\\b)", next: "style"},
- {token: "meta.tag", regex: "<\\/?", next: "tag"},
- {token: "text", regex: "\\s+"},
- {token: "constant.character.entity", regex: "(?:[0-9]+;)|(?:[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}
- ], cdata: [
- {token: "text", regex: "\\]\\]>", next: "start"}
- ], comment: [
- {token: "comment", regex: ".*?-->", next: "start"},
- {defaultToken: "comment"}
- ]}, u.tag(this.$rules, "tag", "start", f), u.tag(this.$rules, "style", "css-start", f), u.tag(this.$rules, "script", "js-start", f), this.embedRules(o, "js-", [
- {token: "comment", regex: "\\/\\/.*(?=<\\/script>)", next: "tag"},
- {token: "meta.tag", regex: "<\\/(?=script)", next: "tag"}
- ]), this.embedRules(s, "css-", [
- {token: "meta.tag", regex: "<\\/(?=style)", next: "tag"}
- ])
- };
- r.inherits(l, a), t.HtmlHighlightRules = l
-}), ace.define("ace/mode/xml_util", ["require", "exports", "module"], function (e, t, n) {
- function r(e) {
- return[
- {token: "string", regex: '"', next: e + "_qqstring"},
- {token: "string", regex: "'", next: e + "_qstring"}
- ]
- }
-
- function i(e, t) {
- return[
- {token: "string", regex: e, next: t},
- {token: "constant.language.escape", regex: "(?:[0-9]+;)|(?:[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"},
- {defaultToken: "string"}
- ]
- }
-
- t.tag = function (e, t, n, s) {
- e[t] = [
- {token: "text", regex: "\\s+"},
- {token: s ? function (e) {
- return s[e] ? "meta.tag.tag-name." + s[e] : "meta.tag.tag-name"
- } : "meta.tag.tag-name", regex: "[-_a-zA-Z0-9:]+", next: t + "_embed_attribute_list"},
- {token: "empty", regex: "", next: t + "_embed_attribute_list"}
- ], e[t + "_qstring"] = i("'", t + "_embed_attribute_list"), e[t + "_qqstring"] = i('"', t + "_embed_attribute_list"), e[t + "_embed_attribute_list"] = [
- {token: "meta.tag.r", regex: "/?>", next: n},
- {token: "keyword.operator", regex: "="},
- {token: "entity.other.attribute-name", regex: "[-_a-zA-Z0-9:]+"},
- {token: "constant.numeric", regex: "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},
- {token: "text", regex: "\\s+"}
- ].concat(r(t))
- }
-}), ace.define("ace/mode/behaviour/html", ["require", "exports", "module", "ace/lib/oop", "ace/mode/behaviour/xml", "ace/mode/behaviour/cstyle", "ace/token_iterator"], function (e, t, n) {
- function a(e, t) {
- var n = !0, r = e.type.split("."), i = t.split(".");
- return i.forEach(function (e) {
- if (r.indexOf(e) == -1)return n = !1, !1
- }), n
- }
-
- var r = e("../../lib/oop"), i = e("../behaviour/xml").XmlBehaviour, s = e("./cstyle").CstyleBehaviour, o = e("../../token_iterator").TokenIterator, u = ["area", "base", "br", "col", "command", "embed", "hr", "img", "input", "keygen", "link", "meta", "param", "source", "track", "wbr"], f = function () {
- this.inherit(i), this.add("autoclosing", "insertion", function (e, t, n, r, i) {
- if (i == ">") {
- var s = n.getCursorPosition(), f = new o(r, s.row, s.column), l = f.getCurrentToken(), c = !1;
- if (!l || !a(l, "meta.tag") && (!a(l, "text") || !l.value.match("/"))) {
- do l = f.stepBackward(); while (l && (a(l, "string") || a(l, "keyword.operator") || a(l, "entity.attribute-name") || a(l, "text")))
- } else c = !0;
- if (!l || !a(l, "meta.tag-name") || f.stepBackward().value.match("/"))return;
- var h = l.value;
- if (c)var h = h.substring(0, s.column - l.start);
- if (u.indexOf(h) !== -1)return;
- return{text: ">" + h + ">", selection: [1, 1]}
- }
- })
- };
- r.inherits(f, i), t.HtmlBehaviour = f
-}), ace.define("ace/mode/behaviour/xml", ["require", "exports", "module", "ace/lib/oop", "ace/mode/behaviour", "ace/mode/behaviour/cstyle", "ace/token_iterator"], function (e, t, n) {
- function u(e, t) {
- var n = !0, r = e.type.split("."), i = t.split(".");
- return i.forEach(function (e) {
- if (r.indexOf(e) == -1)return n = !1, !1
- }), n
- }
-
- var r = e("../../lib/oop"), i = e("../behaviour").Behaviour, s = e("./cstyle").CstyleBehaviour, o = e("../../token_iterator").TokenIterator, a = function () {
- this.inherit(s, ["string_dquotes"]), this.add("autoclosing", "insertion", function (e, t, n, r, i) {
- if (i == ">") {
- var s = n.getCursorPosition(), a = new o(r, s.row, s.column), f = a.getCurrentToken(), l = !1;
- if (!f || !u(f, "meta.tag") && (!u(f, "text") || !f.value.match("/"))) {
- do f = a.stepBackward(); while (f && (u(f, "string") || u(f, "keyword.operator") || u(f, "entity.attribute-name") || u(f, "text")))
- } else l = !0;
- if (!f || !u(f, "meta.tag-name") || a.stepBackward().value.match("/"))return;
- var c = f.value;
- if (l)var c = c.substring(0, s.column - f.start);
- return{text: ">" + c + ">", selection: [1, 1]}
- }
- }), this.add("autoindent", "insertion", function (e, t, n, r, i) {
- if (i == "\n") {
- var s = n.getCursorPosition(), o = r.doc.getLine(s.row), u = o.substring(s.column, s.column + 2);
- if (u == "") {
- var a = this.$getIndent(r.doc.getLine(s.row)) + r.getTabString(), f = this.$getIndent(r.doc.getLine(s.row));
- return{text: "\n" + a + "\n" + f, selection: [1, a.length, 1, a.length]}
- }
- }
- })
- };
- r.inherits(a, i), t.XmlBehaviour = a
-}), ace.define("ace/mode/folding/html", ["require", "exports", "module", "ace/lib/oop", "ace/mode/folding/mixed", "ace/mode/folding/xml", "ace/mode/folding/cstyle"], function (e, t, n) {
- var r = e("../../lib/oop"), i = e("./mixed").FoldMode, s = e("./xml").FoldMode, o = e("./cstyle").FoldMode, u = t.FoldMode = function () {
- i.call(this, new s({area: 1, base: 1, br: 1, col: 1, command: 1, embed: 1, hr: 1, img: 1, input: 1, keygen: 1, link: 1, meta: 1, param: 1, source: 1, track: 1, wbr: 1, li: 1, dt: 1, dd: 1, p: 1, rt: 1, rp: 1, optgroup: 1, option: 1, colgroup: 1, td: 1, th: 1}), {"js-": new o, "css-": new o})
- };
- r.inherits(u, i)
-}), ace.define("ace/mode/folding/mixed", ["require", "exports", "module", "ace/lib/oop", "ace/mode/folding/fold_mode"], function (e, t, n) {
- var r = e("../../lib/oop"), i = e("./fold_mode").FoldMode, s = t.FoldMode = function (e, t) {
- this.defaultMode = e, this.subModes = t
- };
- r.inherits(s, i), function () {
- this.$getMode = function (e) {
- for (var t in this.subModes)if (e.indexOf(t) === 0)return this.subModes[t];
- return null
- }, this.$tryMode = function (e, t, n, r) {
- var i = this.$getMode(e);
- return i ? i.getFoldWidget(t, n, r) : ""
- }, this.getFoldWidget = function (e, t, n) {
- return this.$tryMode(e.getState(n - 1), e, t, n) || this.$tryMode(e.getState(n), e, t, n) || this.defaultMode.getFoldWidget(e, t, n)
- }, this.getFoldWidgetRange = function (e, t, n) {
- var r = this.$getMode(e.getState(n - 1));
- if (!r || !r.getFoldWidget(e, t, n))r = this.$getMode(e.getState(n));
- if (!r || !r.getFoldWidget(e, t, n))r = this.defaultMode;
- return r.getFoldWidgetRange(e, t, n)
- }
- }.call(s.prototype)
-}), ace.define("ace/mode/folding/xml", ["require", "exports", "module", "ace/lib/oop", "ace/lib/lang", "ace/range", "ace/mode/folding/fold_mode", "ace/token_iterator"], function (e, t, n) {
- var r = e("../../lib/oop"), i = e("../../lib/lang"), s = e("../../range").Range, o = e("./fold_mode").FoldMode, u = e("../../token_iterator").TokenIterator, a = t.FoldMode = function (e) {
- o.call(this), this.voidElements = e || {}
- };
- r.inherits(a, o), function () {
- this.getFoldWidget = function (e, t, n) {
- var r = this._getFirstTagInLine(e, n);
- return r.closing ? t == "markbeginend" ? "end" : "" : !r.tagName || this.voidElements[r.tagName.toLowerCase()] ? "" : r.selfClosing ? "" : r.value.indexOf("/" + r.tagName) !== -1 ? "" : "start"
- }, this._getFirstTagInLine = function (e, t) {
- var n = e.getTokens(t), r = "";
- for (var s = 0; s < n.length; s++) {
- var o = n[s];
- o.type.indexOf("meta.tag") === 0 ? r += o.value : r += i.stringRepeat(" ", o.value.length)
- }
- return this._parseTag(r)
- }, this.tagRe = /^(\s*)((\/?)([-_a-zA-Z0-9:!]*)\s*(\/?)>?)/, this._parseTag = function (e) {
- var t = this.tagRe.exec(e), n = this.tagRe.lastIndex || 0;
- return this.tagRe.lastIndex = 0, {value: e, match: t ? t[2] : "", closing: t ? !!t[3] : !1, selfClosing: t ? !!t[5] || t[2] == "/>" : !1, tagName: t ? t[4] : "", column: t[1] ? n + t[1].length : n}
- }, this._readTagForward = function (e) {
- var t = e.getCurrentToken();
- if (!t)return null;
- var n = "", r;
- do if (t.type.indexOf("meta.tag") === 0) {
- if (!r)var r = {row: e.getCurrentTokenRow(), column: e.getCurrentTokenColumn()};
- n += t.value;
- if (n.indexOf(">") !== -1) {
- var i = this._parseTag(n);
- return i.start = r, i.end = {row: e.getCurrentTokenRow(), column: e.getCurrentTokenColumn() + t.value.length}, e.stepForward(), i
- }
- } while (t = e.stepForward());
- return null
- }, this._readTagBackward = function (e) {
- var t = e.getCurrentToken();
- if (!t)return null;
- var n = "", r;
- do if (t.type.indexOf("meta.tag") === 0) {
- r || (r = {row: e.getCurrentTokenRow(), column: e.getCurrentTokenColumn() + t.value.length}), n = t.value + n;
- if (n.indexOf("<") !== -1) {
- var i = this._parseTag(n);
- return i.end = r, i.start = {row: e.getCurrentTokenRow(), column: e.getCurrentTokenColumn()}, e.stepBackward(), i
- }
- } while (t = e.stepBackward());
- return null
- }, this._pop = function (e, t) {
- while (e.length) {
- var n = e[e.length - 1];
- if (!t || n.tagName == t.tagName)return e.pop();
- if (this.voidElements[t.tagName])return;
- if (this.voidElements[n.tagName]) {
- e.pop();
- continue
- }
- return null
- }
- }, this.getFoldWidgetRange = function (e, t, n) {
- var r = this._getFirstTagInLine(e, n);
- if (!r.match)return null;
- var i = r.closing || r.selfClosing, o = [], a;
- if (!i) {
- var f = new u(e, n, r.column), l = {row: n, column: r.column + r.tagName.length + 2};
- while (a = this._readTagForward(f)) {
- if (a.selfClosing) {
- if (!o.length)return a.start.column += a.tagName.length + 2, a.end.column -= 2, s.fromPoints(a.start, a.end);
- continue
- }
- if (a.closing) {
- this._pop(o, a);
- if (o.length == 0)return s.fromPoints(l, a.start)
- } else o.push(a)
- }
- } else {
- var f = new u(e, n, r.column + r.match.length), c = {row: n, column: r.column};
- while (a = this._readTagBackward(f)) {
- if (a.selfClosing) {
- if (!o.length)return a.start.column += a.tagName.length + 2, a.end.column -= 2, s.fromPoints(a.start, a.end);
- continue
- }
- if (!a.closing) {
- this._pop(o, a);
- if (o.length == 0)return a.start.column += a.tagName.length + 2, s.fromPoints(a.start, c)
- } else o.push(a)
- }
- }
- }
- }.call(a.prototype)
-}), ace.define("ace/mode/lua", ["require", "exports", "module", "ace/lib/oop", "ace/mode/text", "ace/tokenizer", "ace/mode/lua_highlight_rules", "ace/mode/folding/lua", "ace/range"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("./text").Mode, s = e("../tokenizer").Tokenizer, o = e("./lua_highlight_rules").LuaHighlightRules, u = e("./folding/lua").FoldMode, a = e("../range").Range, f = function () {
- this.$tokenizer = new s((new o).getRules()), this.foldingRules = new u
- };
- r.inherits(f, i), function () {
- function n(t) {
- var n = 0;
- for (var r = 0; r < t.length; r++) {
- var i = t[r];
- i.type == "keyword" ? i.value in e && (n += e[i.value]) : i.type == "paren.lparen" ? n++ : i.type == "paren.rparen" && n--
- }
- return n < 0 ? -1 : n > 0 ? 1 : 0
- }
-
- var e = {"function": 1, then: 1, "do": 1, "else": 1, elseif: 1, repeat: 1, end: -1, until: -1}, t = ["else", "elseif", "end", "until"];
- this.getNextLineIndent = function (e, t, r) {
- var i = this.$getIndent(t), s = 0, o = this.$tokenizer.getLineTokens(t, e), u = o.tokens;
- return e == "start" && (s = n(u)), s > 0 ? i + r : s < 0 && i.substr(i.length - r.length) == r && !this.checkOutdent(e, t, "\n") ? i.substr(0, i.length - r.length) : i
- }, this.checkOutdent = function (e, n, r) {
- if (r != "\n" && r != "\r" && r != "\r\n")return!1;
- if (n.match(/^\s*[\)\}\]]$/))return!0;
- var i = this.$tokenizer.getLineTokens(n.trim(), e).tokens;
- return!i || !i.length ? !1 : i[0].type == "keyword" && t.indexOf(i[0].value) != -1
- }, this.autoOutdent = function (e, t, r) {
- var i = t.getLine(r - 1), s = this.$getIndent(i).length, o = this.$tokenizer.getLineTokens(i, "start").tokens, u = t.getTabString().length, f = s + u * n(o), l = this.$getIndent(t.getLine(r)).length;
- if (l < f)return;
- t.outdentRows(new a(r, 0, r + 2, 0))
- }
- }.call(f.prototype), t.Mode = f
-}), ace.define("ace/mode/lua_highlight_rules", ["require", "exports", "module", "ace/lib/oop", "ace/mode/text_highlight_rules"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("./text_highlight_rules").TextHighlightRules, s = function () {
- var e = "break|do|else|elseif|end|for|function|if|in|local|repeat|return|then|until|while|or|and|not", t = "true|false|nil|_G|_VERSION", n = "string|xpcall|package|tostring|print|os|unpack|require|getfenv|setmetatable|next|assert|tonumber|io|rawequal|collectgarbage|getmetatable|module|rawset|math|debug|pcall|table|newproxy|type|coroutine|_G|select|gcinfo|pairs|rawget|loadstring|ipairs|_VERSION|dofile|setfenv|load|error|loadfile|sub|upper|len|gfind|rep|find|match|char|dump|gmatch|reverse|byte|format|gsub|lower|preload|loadlib|loaded|loaders|cpath|config|path|seeall|exit|setlocale|date|getenv|difftime|remove|time|clock|tmpname|rename|execute|lines|write|close|flush|open|output|type|read|stderr|stdin|input|stdout|popen|tmpfile|log|max|acos|huge|ldexp|pi|cos|tanh|pow|deg|tan|cosh|sinh|random|randomseed|frexp|ceil|floor|rad|abs|sqrt|modf|asin|min|mod|fmod|log10|atan2|exp|sin|atan|getupvalue|debug|sethook|getmetatable|gethook|setmetatable|setlocal|traceback|setfenv|getinfo|setupvalue|getlocal|getregistry|getfenv|setn|insert|getn|foreachi|maxn|foreach|concat|sort|remove|resume|yield|status|wrap|create|running|__add|__sub|__mod|__unm|__concat|__lt|__index|__call|__gc|__metatable|__mul|__div|__pow|__len|__eq|__le|__newindex|__tostring|__mode|__tonumber", r = "string|package|os|io|math|debug|table|coroutine", i = "", s = "setn|foreach|foreachi|gcinfo|log10|maxn", o = this.createKeywordMapper({keyword: e, "support.function": n, "invalid.deprecated": s, "constant.library": r, "constant.language": t, "invalid.illegal": i, "variable.language": "this"}, "identifier"), u = "(?:(?:[1-9]\\d*)|(?:0))", a = "(?:0[xX][\\dA-Fa-f]+)", f = "(?:" + u + "|" + a + ")", l = "(?:\\.\\d+)", c = "(?:\\d+)", h = "(?:(?:" + c + "?" + l + ")|(?:" + c + "\\.))", p = "(?:" + h + ")";
- this.$rules = {start: [
- {stateName: "bracketedComment", token: function (e, t, n) {
- return n.unshift(this.next, e.length, t), "comment"
- }, regex: /\-\-\[=*\[/, next: [
- {token: function (e, t, n) {
- return e.length == n[1] ? (n.shift(), n.shift(), this.next = n.shift()) : this.next = "", "comment"
- }, regex: /(?:[^\\]|\\.)*?\]=*\]/, next: "start"},
- {defaultToken: "comment"}
- ]},
- {token: "comment", regex: "\\-\\-.*$"},
- {stateName: "bracketedString", token: function (e, t, n) {
- return n.unshift(this.next, e.length, t), "comment"
- }, regex: /\[=*\[/, next: [
- {token: function (e, t, n) {
- return e.length == n[1] ? (n.shift(), n.shift(), this.next = n.shift()) : this.next = "", "comment"
- }, regex: /(?:[^\\]|\\.)*?\]=*\]/, next: "start"},
- {defaultToken: "comment"}
- ]},
- {token: "string", regex: '"(?:[^\\\\]|\\\\.)*?"'},
- {token: "string", regex: "'(?:[^\\\\]|\\\\.)*?'"},
- {token: "constant.numeric", regex: p},
- {token: "constant.numeric", regex: f + "\\b"},
- {token: o, regex: "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},
- {token: "keyword.operator", regex: "\\+|\\-|\\*|\\/|%|\\#|\\^|~|<|>|<=|=>|==|~=|=|\\:|\\.\\.\\.|\\.\\."},
- {token: "paren.lparen", regex: "[\\[\\(\\{]"},
- {token: "paren.rparen", regex: "[\\]\\)\\}]"},
- {token: "text", regex: "\\s+|\\w+"}
- ]}, this.normalizeRules()
- };
- r.inherits(s, i), t.LuaHighlightRules = s
-}), ace.define("ace/mode/folding/lua", ["require", "exports", "module", "ace/lib/oop", "ace/mode/folding/fold_mode", "ace/range", "ace/token_iterator"], function (e, t, n) {
- var r = e("../../lib/oop"), i = e("./fold_mode").FoldMode, s = e("../../range").Range, o = e("../../token_iterator").TokenIterator, u = t.FoldMode = function () {
- };
- r.inherits(u, i), function () {
- this.foldingStartMarker = /\b(function|then|do|repeat)\b|{\s*$|(\[=*\[)/, this.foldingStopMarker = /\bend\b|^\s*}|\]=*\]/, this.getFoldWidget = function (e, t, n) {
- var r = e.getLine(n), i = this.foldingStartMarker.test(r), s = this.foldingStopMarker.test(r);
- if (i && !s) {
- var o = r.match(this.foldingStartMarker);
- if (o[1] == "then" && /\belseif\b/.test(r))return;
- if (o[1]) {
- if (e.getTokenAt(n, o.index + 1).type === "keyword")return"start"
- } else {
- if (!o[2])return"start";
- var u = e.bgTokenizer.getState(n) || "";
- if (u.indexOf("comment") != -1 || u.indexOf("string") != -1)return"start"
- }
- }
- if (t != "markbeginend" || !s || i && s)return"";
- var o = r.match(this.foldingStopMarker);
- if (o[0] === "end") {
- if (e.getTokenAt(n, o.index + 1).type === "keyword")return"end"
- } else {
- if (o[0][0] !== "]")return"end";
- var u = e.bgTokenizer.getState(n - 1) || "";
- if (u.indexOf("comment") != -1 || u.indexOf("string") != -1)return"end"
- }
- }, this.getFoldWidgetRange = function (e, t, n) {
- var r = e.doc.getLine(n), i = this.foldingStartMarker.exec(r);
- if (i)return i[1] ? this.luaBlock(e, n, i.index + 1) : i[2] ? e.getCommentFoldRange(n, i.index + 1) : this.openingBracketBlock(e, "{", n, i.index);
- var i = this.foldingStopMarker.exec(r);
- if (i)return i[0] === "end" && e.getTokenAt(n, i.index + 1).type === "keyword" ? this.luaBlock(e, n, i.index + 1) : i[0][0] === "]" ? e.getCommentFoldRange(n, i.index + 1) : this.closingBracketBlock(e, "}", n, i.index + i[0].length)
- }, this.luaBlock = function (e, t, n) {
- var r = new o(e, t, n), i = {"function": 1, "do": 1, then: 1, elseif: -1, end: -1, repeat: 1, until: -1}, u = r.getCurrentToken();
- if (!u || u.type != "keyword")return;
- var a = u.value, f = [a], l = i[a];
- if (!l)return;
- var c = l === -1 ? r.getCurrentTokenColumn() : e.getLine(t).length, h = t;
- r.step = l === -1 ? r.stepBackward : r.stepForward;
- while (u = r.step()) {
- if (u.type !== "keyword")continue;
- var p = l * i[u.value];
- if (p > 0)f.unshift(u.value); else if (p <= 0) {
- f.shift();
- if (!f.length && u.value != "elseif")break;
- p === 0 && f.unshift(u.value)
- }
- }
- var t = r.getCurrentTokenRow();
- return l === -1 ? new s(t, e.getLine(t).length, h, c) : new s(h, c, t, r.getCurrentTokenColumn())
- }
- }.call(u.prototype)
-}), ace.define("ace/mode/luapage_highlight_rules", ["require", "exports", "module", "ace/lib/oop", "ace/mode/html_highlight_rules", "ace/mode/lua_highlight_rules"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("./html_highlight_rules").HtmlHighlightRules, s = e("./lua_highlight_rules").LuaHighlightRules, o = function () {
- this.$rules = (new i).getRules();
- for (var e in this.$rules)this.$rules[e].unshift({token: "keyword", regex: "<\\%\\=?", next: "lua-start"}, {token: "keyword", regex: "<\\?lua\\=?", next: "lua-start"});
- this.embedRules(s, "lua-", [
- {token: "keyword", regex: "\\%>", next: "start"},
- {token: "keyword", regex: "\\?>", next: "start"}
- ])
- };
- r.inherits(o, i), t.LuaPageHighlightRules = o
-})
\ No newline at end of file
diff --git a/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/mode-lucene.js b/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/mode-lucene.js
deleted file mode 100644
index 9ca5e8e..0000000
--- a/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/mode-lucene.js
+++ /dev/null
@@ -1,22 +0,0 @@
-ace.define("ace/mode/lucene", ["require", "exports", "module", "ace/lib/oop", "ace/mode/text", "ace/tokenizer", "ace/mode/lucene_highlight_rules"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("./text").Mode, s = e("../tokenizer").Tokenizer, o = e("./lucene_highlight_rules").LuceneHighlightRules, u = function () {
- this.$tokenizer = new s((new o).getRules())
- };
- r.inherits(u, i), t.Mode = u
-}), ace.define("ace/mode/lucene_highlight_rules", ["require", "exports", "module", "ace/lib/oop", "ace/lib/lang", "ace/mode/text_highlight_rules"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("../lib/lang"), s = e("./text_highlight_rules").TextHighlightRules, o = function () {
- this.$rules = {start: [
- {token: "constant.character.negation", regex: "[\\-]"},
- {token: "constant.character.interro", regex: "[\\?]"},
- {token: "constant.character.asterisk", regex: "[\\*]"},
- {token: "constant.character.proximity", regex: "~[0-9]+\\b"},
- {token: "keyword.operator", regex: "(?:AND|OR|NOT)\\b"},
- {token: "paren.lparen", regex: "[\\(]"},
- {token: "paren.rparen", regex: "[\\)]"},
- {token: "keyword", regex: "[\\S]+:"},
- {token: "string", regex: '".*?"'},
- {token: "text", regex: "\\s+"}
- ]}
- };
- r.inherits(o, s), t.LuceneHighlightRules = o
-})
\ No newline at end of file
diff --git a/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/mode-makefile.js b/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/mode-makefile.js
deleted file mode 100644
index 1dd04a3..0000000
--- a/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/mode-makefile.js
+++ /dev/null
@@ -1,76 +0,0 @@
-ace.define("ace/mode/makefile", ["require", "exports", "module", "ace/lib/oop", "ace/mode/text", "ace/tokenizer", "ace/mode/makefile_highlight_rules", "ace/mode/folding/coffee"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("./text").Mode, s = e("../tokenizer").Tokenizer, o = e("./makefile_highlight_rules").MakefileHighlightRules, u = e("./folding/coffee").FoldMode, a = function () {
- var e = new o;
- this.foldingRules = new u, this.$tokenizer = new s(e.getRules())
- };
- r.inherits(a, i), function () {
- }.call(a.prototype), t.Mode = a
-}), ace.define("ace/mode/makefile_highlight_rules", ["require", "exports", "module", "ace/lib/oop", "ace/mode/text_highlight_rules", "ace/mode/sh_highlight_rules"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("./text_highlight_rules").TextHighlightRules, s = e("./sh_highlight_rules"), o = function () {
- var e = this.createKeywordMapper({keyword: s.reservedKeywords, "support.function.builtin": s.languageConstructs, "invalid.deprecated": "debugger"}, "string");
- this.$rules = {start: [
- {token: "string.interpolated.backtick.makefile", regex: "`", next: "shell-start"},
- {token: "punctuation.definition.comment.makefile", regex: /#(?=.)/, next: "comment"},
- {token: ["keyword.control.makefile"], regex: "^(?:\\s*\\b)(\\-??include|ifeq|ifneq|ifdef|ifndef|else|endif|vpath|export|unexport|define|endef|override)(?:\\b)"},
- {token: ["entity.name.function.makefile", "text"], regex: "^([^\\t ]+(?:\\s[^\\t ]+)*:)(\\s*.*)"}
- ], comment: [
- {token: "punctuation.definition.comment.makefile", regex: /.+\\/},
- {token: "punctuation.definition.comment.makefile", regex: ".+", next: "start"}
- ], "shell-start": [
- {token: e, regex: "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},
- {token: "string", regex: "\\w+"},
- {token: "string.interpolated.backtick.makefile", regex: "`", next: "start"}
- ]}
- };
- r.inherits(o, i), t.MakefileHighlightRules = o
-}), ace.define("ace/mode/sh_highlight_rules", ["require", "exports", "module", "ace/lib/oop", "ace/mode/text_highlight_rules"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("./text_highlight_rules").TextHighlightRules, s = t.reservedKeywords = "!|{|}|case|do|done|elif|else|esac|fi|for|if|in|then|until|while|&|;|export|local|read|typeset|unset|elif|select|set", o = t.languageConstructs = "[|]|alias|bg|bind|break|builtin|cd|command|compgen|complete|continue|dirs|disown|echo|enable|eval|exec|exit|fc|fg|getopts|hash|help|history|jobs|kill|let|logout|popd|printf|pushd|pwd|return|set|shift|shopt|source|suspend|test|times|trap|type|ulimit|umask|unalias|wait", u = function () {
- var e = this.createKeywordMapper({keyword: s, "support.function.builtin": o, "invalid.deprecated": "debugger"}, "identifier"), t = "(?:(?:[1-9]\\d*)|(?:0))", n = "(?:\\.\\d+)", r = "(?:\\d+)", i = "(?:(?:" + r + "?" + n + ")|(?:" + r + "\\.))", u = "(?:(?:" + i + "|" + r + ")" + ")", a = "(?:" + u + "|" + i + ")", f = "(?:&" + r + ")", l = "[a-zA-Z][a-zA-Z0-9_]*", c = "(?:(?:\\$" + l + ")|(?:" + l + "=))", h = "(?:\\$(?:SHLVL|\\$|\\!|\\?))", p = "(?:" + l + "\\s*\\(\\))";
- this.$rules = {start: [
- {token: ["text", "comment"], regex: /(^|\s)(#.*)$/},
- {token: "string", regex: '"(?:[^\\\\]|\\\\.)*?"'},
- {token: "variable.language", regex: h},
- {token: "variable", regex: c},
- {token: "support.function", regex: p},
- {token: "support.function", regex: f},
- {token: "string", regex: "'(?:[^\\\\]|\\\\.)*?'"},
- {token: "constant.numeric", regex: a},
- {token: "constant.numeric", regex: t + "\\b"},
- {token: e, regex: "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},
- {token: "keyword.operator", regex: "\\+|\\-|\\*|\\*\\*|\\/|\\/\\/|~|<|>|<=|=>|=|!="},
- {token: "paren.lparen", regex: "[\\[\\(\\{]"},
- {token: "paren.rparen", regex: "[\\]\\)\\}]"}
- ]}
- };
- r.inherits(u, i), t.ShHighlightRules = u
-}), ace.define("ace/mode/folding/coffee", ["require", "exports", "module", "ace/lib/oop", "ace/mode/folding/fold_mode", "ace/range"], function (e, t, n) {
- var r = e("../../lib/oop"), i = e("./fold_mode").FoldMode, s = e("../../range").Range, o = t.FoldMode = function () {
- };
- r.inherits(o, i), function () {
- this.getFoldWidgetRange = function (e, t, n) {
- var r = this.indentationBlock(e, n);
- if (r)return r;
- var i = /\S/, o = e.getLine(n), u = o.search(i);
- if (u == -1 || o[u] != "#")return;
- var a = o.length, f = e.getLength(), l = n, c = n;
- while (++n < f) {
- o = e.getLine(n);
- var h = o.search(i);
- if (h == -1)continue;
- if (o[h] != "#")break;
- c = n
- }
- if (c > l) {
- var p = e.getLine(c).length;
- return new s(l, a, c, p)
- }
- }, this.getFoldWidget = function (e, t, n) {
- var r = e.getLine(n), i = r.search(/\S/), s = e.getLine(n + 1), o = e.getLine(n - 1), u = o.search(/\S/), a = s.search(/\S/);
- if (i == -1)return e.foldWidgets[n - 1] = u != -1 && u < a ? "start" : "", "";
- if (u == -1) {
- if (i == a && r[i] == "#" && s[i] == "#")return e.foldWidgets[n - 1] = "", e.foldWidgets[n + 1] = "", "start"
- } else if (u == i && r[i] == "#" && o[i] == "#" && e.getLine(n - 2).search(/\S/) == -1)return e.foldWidgets[n - 1] = "start", e.foldWidgets[n + 1] = "", "";
- return u != -1 && u < i ? e.foldWidgets[n - 1] = "start" : e.foldWidgets[n - 1] = "", i < a ? "start" : ""
- }
- }.call(o.prototype)
-})
\ No newline at end of file
diff --git a/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/mode-markdown.js b/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/mode-markdown.js
deleted file mode 100644
index 42a7dce..0000000
--- a/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/mode-markdown.js
+++ /dev/null
@@ -1,765 +0,0 @@
-ace.define("ace/mode/markdown", ["require", "exports", "module", "ace/lib/oop", "ace/mode/text", "ace/mode/javascript", "ace/mode/xml", "ace/mode/html", "ace/tokenizer", "ace/mode/markdown_highlight_rules", "ace/mode/folding/markdown"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("./text").Mode, s = e("./javascript").Mode, o = e("./xml").Mode, u = e("./html").Mode, a = e("../tokenizer").Tokenizer, f = e("./markdown_highlight_rules").MarkdownHighlightRules, l = e("./folding/markdown").FoldMode, c = function () {
- var e = new f;
- this.$tokenizer = new a(e.getRules()), this.$embeds = e.getEmbeds(), this.createModeDelegates({"js-": s, "xml-": o, "html-": u}), this.foldingRules = new l
- };
- r.inherits(c, i), function () {
- this.getNextLineIndent = function (e, t, n) {
- if (e == "listblock") {
- var r = /^(\s*)(?:([-+*])|(\d+)\.)(\s+)/.exec(t);
- if (!r)return"";
- var i = r[2];
- return i || (i = parseInt(r[3], 10) + 1 + "."), r[1] + i + r[4]
- }
- return this.$getIndent(t)
- }
- }.call(c.prototype), t.Mode = c
-}), ace.define("ace/mode/javascript", ["require", "exports", "module", "ace/lib/oop", "ace/mode/text", "ace/tokenizer", "ace/mode/javascript_highlight_rules", "ace/mode/matching_brace_outdent", "ace/range", "ace/worker/worker_client", "ace/mode/behaviour/cstyle", "ace/mode/folding/cstyle"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("./text").Mode, s = e("../tokenizer").Tokenizer, o = e("./javascript_highlight_rules").JavaScriptHighlightRules, u = e("./matching_brace_outdent").MatchingBraceOutdent, a = e("../range").Range, f = e("../worker/worker_client").WorkerClient, l = e("./behaviour/cstyle").CstyleBehaviour, c = e("./folding/cstyle").FoldMode, h = function () {
- this.$tokenizer = new s((new o).getRules()), this.$outdent = new u, this.$behaviour = new l, this.foldingRules = new c
- };
- r.inherits(h, i), function () {
- this.toggleCommentLines = function (e, t, n, r) {
- var i = !0, s = /^(\s*)\/\//;
- for (var o = n; o <= r; o++)if (!s.test(t.getLine(o))) {
- i = !1;
- break
- }
- if (i) {
- var u = new a(0, 0, 0, 0);
- for (var o = n; o <= r; o++) {
- var f = t.getLine(o), l = f.match(s);
- u.start.row = o, u.end.row = o, u.end.column = l[0].length, t.replace(u, l[1])
- }
- } else t.indentRows(n, r, "//")
- }, this.getNextLineIndent = function (e, t, n) {
- var r = this.$getIndent(t), i = this.$tokenizer.getLineTokens(t, e), s = i.tokens, o = i.state;
- if (s.length && s[s.length - 1].type == "comment")return r;
- if (e == "start" || e == "regex_allowed") {
- var u = t.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/);
- u && (r += n)
- } else if (e == "doc-start") {
- if (o == "start" || e == "regex_allowed")return"";
- var u = t.match(/^\s*(\/?)\*/);
- u && (u[1] && (r += " "), r += "* ")
- }
- return r
- }, this.checkOutdent = function (e, t, n) {
- return this.$outdent.checkOutdent(t, n)
- }, this.autoOutdent = function (e, t, n) {
- this.$outdent.autoOutdent(t, n)
- }, this.createWorker = function (e) {
- var t = new f(["ace"], "ace/mode/javascript_worker", "JavaScriptWorker");
- return t.attachToDocument(e.getDocument()), t.on("jslint", function (t) {
- e.setAnnotations(t.data)
- }), t.on("terminate", function () {
- e.clearAnnotations()
- }), t
- }
- }.call(h.prototype), t.Mode = h
-}), ace.define("ace/mode/javascript_highlight_rules", ["require", "exports", "module", "ace/lib/oop", "ace/mode/doc_comment_highlight_rules", "ace/mode/text_highlight_rules"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("./doc_comment_highlight_rules").DocCommentHighlightRules, s = e("./text_highlight_rules").TextHighlightRules, o = function () {
- var e = this.createKeywordMapper({"variable.language": "Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document", keyword: "const|yield|import|get|set|break|case|catch|continue|default|delete|do|else|finally|for|function|if|in|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|__parent__|__count__|escape|unescape|with|__proto__|class|enum|extends|super|export|implements|private|public|interface|package|protected|static", "storage.type": "const|let|var|function", "constant.language": "null|Infinity|NaN|undefined", "support.function": "alert", "constant.language.boolean": "true|false"}, "identifier"), t = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void", n = "[a-zA-Z\\$_¡-￿][a-zA-Z\\d\\$_¡-￿]*\\b", r = "\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|[0-2][0-7]{0,2}|3[0-6][0-7]?|37[0-7]?|[4-7][0-7]?|.)";
- this.$rules = {start: [
- {token: "comment", regex: /\/\/.*$/},
- i.getStartRule("doc-start"),
- {token: "comment", regex: /\/\*/, next: "comment"},
- {token: "string", regex: "'(?=.)", next: "qstring"},
- {token: "string", regex: '"(?=.)', next: "qqstring"},
- {token: "constant.numeric", regex: /0[xX][0-9a-fA-F]+\b/},
- {token: "constant.numeric", regex: /[+-]?\d+(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?\b/},
- {token: ["storage.type", "punctuation.operator", "support.function", "punctuation.operator", "entity.name.function", "text", "keyword.operator"], regex: "(" + n + ")(\\.)(prototype)(\\.)(" + n + ")(\\s*)(=)", next: "function_arguments"},
- {token: ["storage.type", "punctuation.operator", "entity.name.function", "text", "keyword.operator", "text", "storage.type", "text", "paren.lparen"], regex: "(" + n + ")(\\.)(" + n + ")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", next: "function_arguments"},
- {token: ["entity.name.function", "text", "keyword.operator", "text", "storage.type", "text", "paren.lparen"], regex: "(" + n + ")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", next: "function_arguments"},
- {token: ["storage.type", "punctuation.operator", "entity.name.function", "text", "keyword.operator", "text", "storage.type", "text", "entity.name.function", "text", "paren.lparen"], regex: "(" + n + ")(\\.)(" + n + ")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()", next: "function_arguments"},
- {token: ["storage.type", "text", "entity.name.function", "text", "paren.lparen"], regex: "(function)(\\s+)(" + n + ")(\\s*)(\\()", next: "function_arguments"},
- {token: ["entity.name.function", "text", "punctuation.operator", "text", "storage.type", "text", "paren.lparen"], regex: "(" + n + ")(\\s*)(:)(\\s*)(function)(\\s*)(\\()", next: "function_arguments"},
- {token: ["text", "text", "storage.type", "text", "paren.lparen"], regex: "(:)(\\s*)(function)(\\s*)(\\()", next: "function_arguments"},
- {token: "keyword", regex: "(?:" + t + ")\\b", next: "regex_allowed"},
- {token: ["punctuation.operator", "support.function"], regex: /(\.)(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:opzzzz|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/},
- {token: ["punctuation.operator", "support.function.dom"], regex: /(\.)(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/},
- {token: ["punctuation.operator", "support.constant"], regex: /(\.)(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/},
- {token: ["storage.type", "punctuation.operator", "support.function.firebug"], regex: /(console)(\.)(warn|info|log|error|time|timeEnd|assert)\b/},
- {token: e, regex: n},
- {token: "keyword.operator", regex: /--|\+\+|[!$%&*+\-~]|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|\*=|%=|\+=|\-=|&=|\^=/, next: "regex_allowed"},
- {token: "punctuation.operator", regex: /\?|\:|\,|\;|\./, next: "regex_allowed"},
- {token: "paren.lparen", regex: /[\[({]/, next: "regex_allowed"},
- {token: "paren.rparen", regex: /[\])}]/},
- {token: "keyword.operator", regex: /\/=?/, next: "regex_allowed"},
- {token: "comment", regex: /^#!.*$/}
- ], regex_allowed: [i.getStartRule("doc-start"), {token: "comment", regex: "\\/\\*", next: "comment_regex_allowed"}, {token: "comment", regex: "\\/\\/.*$"}, {token: "string.regexp", regex: "\\/", next: "regex"}, {token: "text", regex: "\\s+"}, {token: "empty", regex: "", next: "start"}], regex: [
- {token: "regexp.keyword.operator", regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},
- {token: "string.regexp", regex: "/\\w*", next: "start"},
- {token: "invalid", regex: /\{\d+,?(?:\d+)?}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/},
- {token: "constant.language.escape", regex: /\(\?[:=!]|\)|{\d+,?(?:\d+)?}|{,\d+}|[+*]\?|[()$^+*?]/},
- {token: "constant.language.delimiter", regex: /\|/},
- {token: "constant.language.escape", regex: /\[\^?/, next: "regex_character_class"},
- {token: "empty", regex: "$", next: "start"},
- {defaultToken: "string.regexp"}
- ], regex_character_class: [
- {token: "regexp.keyword.operator", regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},
- {token: "constant.language.escape", regex: "]", next: "regex"},
- {token: "constant.language.escape", regex: "-"},
- {token: "empty", regex: "$", next: "start"},
- {defaultToken: "string.regexp.charachterclass"}
- ], function_arguments: [
- {token: "variable.parameter", regex: n},
- {token: "punctuation.operator", regex: "[, ]+"},
- {token: "punctuation.operator", regex: "$"},
- {token: "empty", regex: "", next: "start"}
- ], comment_regex_allowed: [
- {token: "comment", regex: "\\*\\/", next: "regex_allowed"},
- {defaultToken: "comment"}
- ], comment: [
- {token: "comment", regex: "\\*\\/", next: "start"},
- {defaultToken: "comment"}
- ], qqstring: [
- {token: "constant.language.escape", regex: r},
- {token: "string", regex: "\\\\$", next: "qqstring"},
- {token: "string", regex: '"|$', next: "start"},
- {defaultToken: "string"}
- ], qstring: [
- {token: "constant.language.escape", regex: r},
- {token: "string", regex: "\\\\$", next: "qstring"},
- {token: "string", regex: "'|$", next: "start"},
- {defaultToken: "string"}
- ]}, this.embedRules(i, "doc-", [i.getEndRule("start")])
- };
- r.inherits(o, s), t.JavaScriptHighlightRules = o
-}), ace.define("ace/mode/doc_comment_highlight_rules", ["require", "exports", "module", "ace/lib/oop", "ace/mode/text_highlight_rules"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("./text_highlight_rules").TextHighlightRules, s = function () {
- this.$rules = {start: [
- {token: "comment.doc.tag", regex: "@[\\w\\d_]+"},
- {token: "comment.doc.tag", regex: "\\bTODO\\b"},
- {defaultToken: "comment.doc"}
- ]}
- };
- r.inherits(s, i), s.getStartRule = function (e) {
- return{token: "comment.doc", regex: "\\/\\*(?=\\*)", next: e}
- }, s.getEndRule = function (e) {
- return{token: "comment.doc", regex: "\\*\\/", next: e}
- }, t.DocCommentHighlightRules = s
-}), ace.define("ace/mode/matching_brace_outdent", ["require", "exports", "module", "ace/range"], function (e, t, n) {
- var r = e("../range").Range, i = function () {
- };
- (function () {
- this.checkOutdent = function (e, t) {
- return/^\s+$/.test(e) ? /^\s*\}/.test(t) : !1
- }, this.autoOutdent = function (e, t) {
- var n = e.getLine(t), i = n.match(/^(\s*\})/);
- if (!i)return 0;
- var s = i[1].length, o = e.findMatchingBracket({row: t, column: s});
- if (!o || o.row == t)return 0;
- var u = this.$getIndent(e.getLine(o.row));
- e.replace(new r(t, 0, t, s - 1), u)
- }, this.$getIndent = function (e) {
- var t = e.match(/^(\s+)/);
- return t ? t[1] : ""
- }
- }).call(i.prototype), t.MatchingBraceOutdent = i
-}), ace.define("ace/mode/behaviour/cstyle", ["require", "exports", "module", "ace/lib/oop", "ace/mode/behaviour", "ace/token_iterator", "ace/lib/lang"], function (e, t, n) {
- var r = e("../../lib/oop"), i = e("../behaviour").Behaviour, s = e("../../token_iterator").TokenIterator, o = e("../../lib/lang"), u = ["text", "paren.rparen", "punctuation.operator"], a = ["text", "paren.rparen", "punctuation.operator", "comment"], f = 0, l = -1, c = "", h = 0, p = -1, d = "", v = "", m = function () {
- m.isSaneInsertion = function (e, t) {
- var n = e.getCursorPosition(), r = new s(t, n.row, n.column);
- if (!this.$matchTokenType(r.getCurrentToken() || "text", u)) {
- var i = new s(t, n.row, n.column + 1);
- if (!this.$matchTokenType(i.getCurrentToken() || "text", u))return!1
- }
- return r.stepForward(), r.getCurrentTokenRow() !== n.row || this.$matchTokenType(r.getCurrentToken() || "text", a)
- }, m.$matchTokenType = function (e, t) {
- return t.indexOf(e.type || e) > -1
- }, m.recordAutoInsert = function (e, t, n) {
- var r = e.getCursorPosition(), i = t.doc.getLine(r.row);
- this.isAutoInsertedClosing(r, i, c[0]) || (f = 0), l = r.row, c = n + i.substr(r.column), f++
- }, m.recordMaybeInsert = function (e, t, n) {
- var r = e.getCursorPosition(), i = t.doc.getLine(r.row);
- this.isMaybeInsertedClosing(r, i) || (h = 0), p = r.row, d = i.substr(0, r.column) + n, v = i.substr(r.column), h++
- }, m.isAutoInsertedClosing = function (e, t, n) {
- return f > 0 && e.row === l && n === c[0] && t.substr(e.column) === c
- }, m.isMaybeInsertedClosing = function (e, t) {
- return h > 0 && e.row === p && t.substr(e.column) === v && t.substr(0, e.column) == d
- }, m.popAutoInsertedClosing = function () {
- c = c.substr(1), f--
- }, m.clearMaybeInsertedClosing = function () {
- h = 0, p = -1
- }, this.add("braces", "insertion", function (e, t, n, r, i) {
- var s = n.getCursorPosition(), u = r.doc.getLine(s.row);
- if (i == "{") {
- var a = n.getSelectionRange(), f = r.doc.getTextRange(a);
- if (f !== "" && f !== "{" && n.getWrapBehavioursEnabled())return{text: "{" + f + "}", selection: !1};
- if (m.isSaneInsertion(n, r))return/[\]\}\)]/.test(u[s.column]) ? (m.recordAutoInsert(n, r, "}"), {text: "{}", selection: [1, 1]}) : (m.recordMaybeInsert(n, r, "{"), {text: "{", selection: [1, 1]})
- } else if (i == "}") {
- var l = u.substring(s.column, s.column + 1);
- if (l == "}") {
- var c = r.$findOpeningBracket("}", {column: s.column + 1, row: s.row});
- if (c !== null && m.isAutoInsertedClosing(s, u, i))return m.popAutoInsertedClosing(), {text: "", selection: [1, 1]}
- }
- } else if (i == "\n" || i == "\r\n") {
- var p = "";
- m.isMaybeInsertedClosing(s, u) && (p = o.stringRepeat("}", h), m.clearMaybeInsertedClosing());
- var l = u.substring(s.column, s.column + 1);
- if (l == "}" || p !== "") {
- var d = r.findMatchingBracket({row: s.row, column: s.column}, "}");
- if (!d)return null;
- var v = this.getNextLineIndent(e, u.substring(0, s.column), r.getTabString()), g = this.$getIndent(u);
- return{text: "\n" + v + "\n" + g + p, selection: [1, v.length, 1, v.length]}
- }
- }
- }), this.add("braces", "deletion", function (e, t, n, r, i) {
- var s = r.doc.getTextRange(i);
- if (!i.isMultiLine() && s == "{") {
- var o = r.doc.getLine(i.start.row), u = o.substring(i.end.column, i.end.column + 1);
- if (u == "}")return i.end.column++, i;
- h--
- }
- }), this.add("parens", "insertion", function (e, t, n, r, i) {
- if (i == "(") {
- var s = n.getSelectionRange(), o = r.doc.getTextRange(s);
- if (o !== "" && n.getWrapBehavioursEnabled())return{text: "(" + o + ")", selection: !1};
- if (m.isSaneInsertion(n, r))return m.recordAutoInsert(n, r, ")"), {text: "()", selection: [1, 1]}
- } else if (i == ")") {
- var u = n.getCursorPosition(), a = r.doc.getLine(u.row), f = a.substring(u.column, u.column + 1);
- if (f == ")") {
- var l = r.$findOpeningBracket(")", {column: u.column + 1, row: u.row});
- if (l !== null && m.isAutoInsertedClosing(u, a, i))return m.popAutoInsertedClosing(), {text: "", selection: [1, 1]}
- }
- }
- }), this.add("parens", "deletion", function (e, t, n, r, i) {
- var s = r.doc.getTextRange(i);
- if (!i.isMultiLine() && s == "(") {
- var o = r.doc.getLine(i.start.row), u = o.substring(i.start.column + 1, i.start.column + 2);
- if (u == ")")return i.end.column++, i
- }
- }), this.add("brackets", "insertion", function (e, t, n, r, i) {
- if (i == "[") {
- var s = n.getSelectionRange(), o = r.doc.getTextRange(s);
- if (o !== "" && n.getWrapBehavioursEnabled())return{text: "[" + o + "]", selection: !1};
- if (m.isSaneInsertion(n, r))return m.recordAutoInsert(n, r, "]"), {text: "[]", selection: [1, 1]}
- } else if (i == "]") {
- var u = n.getCursorPosition(), a = r.doc.getLine(u.row), f = a.substring(u.column, u.column + 1);
- if (f == "]") {
- var l = r.$findOpeningBracket("]", {column: u.column + 1, row: u.row});
- if (l !== null && m.isAutoInsertedClosing(u, a, i))return m.popAutoInsertedClosing(), {text: "", selection: [1, 1]}
- }
- }
- }), this.add("brackets", "deletion", function (e, t, n, r, i) {
- var s = r.doc.getTextRange(i);
- if (!i.isMultiLine() && s == "[") {
- var o = r.doc.getLine(i.start.row), u = o.substring(i.start.column + 1, i.start.column + 2);
- if (u == "]")return i.end.column++, i
- }
- }), this.add("string_dquotes", "insertion", function (e, t, n, r, i) {
- if (i == '"' || i == "'") {
- var s = i, o = n.getSelectionRange(), u = r.doc.getTextRange(o);
- if (u !== "" && u !== "'" && u != '"' && n.getWrapBehavioursEnabled())return{text: s + u + s, selection: !1};
- var a = n.getCursorPosition(), f = r.doc.getLine(a.row), l = f.substring(a.column - 1, a.column);
- if (l == "\\")return null;
- var c = r.getTokens(o.start.row), h = 0, p, d = -1;
- for (var v = 0; v < c.length; v++) {
- p = c[v], p.type == "string" ? d = -1 : d < 0 && (d = p.value.indexOf(s));
- if (p.value.length + h > o.start.column)break;
- h += c[v].value.length
- }
- if (!p || d < 0 && p.type !== "comment" && (p.type !== "string" || o.start.column !== p.value.length + h - 1 && p.value.lastIndexOf(s) === p.value.length - 1)) {
- if (!m.isSaneInsertion(n, r))return;
- return{text: s + s, selection: [1, 1]}
- }
- if (p && p.type === "string") {
- var g = f.substring(a.column, a.column + 1);
- if (g == s)return{text: "", selection: [1, 1]}
- }
- }
- }), this.add("string_dquotes", "deletion", function (e, t, n, r, i) {
- var s = r.doc.getTextRange(i);
- if (!i.isMultiLine() && (s == '"' || s == "'")) {
- var o = r.doc.getLine(i.start.row), u = o.substring(i.start.column + 1, i.start.column + 2);
- if (u == s)return i.end.column++, i
- }
- })
- };
- r.inherits(m, i), t.CstyleBehaviour = m
-}), ace.define("ace/mode/folding/cstyle", ["require", "exports", "module", "ace/lib/oop", "ace/range", "ace/mode/folding/fold_mode"], function (e, t, n) {
- var r = e("../../lib/oop"), i = e("../../range").Range, s = e("./fold_mode").FoldMode, o = t.FoldMode = function () {
- };
- r.inherits(o, s), function () {
- this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/, this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/, this.getFoldWidgetRange = function (e, t, n) {
- var r = e.getLine(n), i = r.match(this.foldingStartMarker);
- if (i) {
- var s = i.index;
- return i[1] ? this.openingBracketBlock(e, i[1], n, s) : e.getCommentFoldRange(n, s + i[0].length, 1)
- }
- if (t !== "markbeginend")return;
- var i = r.match(this.foldingStopMarker);
- if (i) {
- var s = i.index + i[0].length;
- return i[1] ? this.closingBracketBlock(e, i[1], n, s) : e.getCommentFoldRange(n, s, -1)
- }
- }
- }.call(o.prototype)
-}), ace.define("ace/mode/xml", ["require", "exports", "module", "ace/lib/oop", "ace/mode/text", "ace/tokenizer", "ace/mode/xml_highlight_rules", "ace/mode/behaviour/xml", "ace/mode/folding/xml"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("./text").Mode, s = e("../tokenizer").Tokenizer, o = e("./xml_highlight_rules").XmlHighlightRules, u = e("./behaviour/xml").XmlBehaviour, a = e("./folding/xml").FoldMode, f = function () {
- this.$tokenizer = new s((new o).getRules()), this.$behaviour = new u, this.foldingRules = new a
- };
- r.inherits(f, i), function () {
- this.getNextLineIndent = function (e, t, n) {
- return this.$getIndent(t)
- }
- }.call(f.prototype), t.Mode = f
-}), ace.define("ace/mode/xml_highlight_rules", ["require", "exports", "module", "ace/lib/oop", "ace/mode/xml_util", "ace/mode/text_highlight_rules"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("./xml_util"), s = e("./text_highlight_rules").TextHighlightRules, o = function () {
- this.$rules = {start: [
- {token: "text", regex: "<\\!\\[CDATA\\[", next: "cdata"},
- {token: "xml-pe", regex: "<\\?.*?\\?>"},
- {token: "comment", regex: "<\\!--", next: "comment"},
- {token: "xml-pe", regex: "<\\!.*?>"},
- {token: "meta.tag", regex: "<\\/?", next: "tag"},
- {token: "text", regex: "\\s+"},
- {token: "constant.character.entity", regex: "(?:[0-9]+;)|(?:[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}
- ], cdata: [
- {token: "text", regex: "\\]\\]>", next: "start"},
- {token: "text", regex: "\\s+"},
- {token: "text", regex: "(?:[^\\]]|\\](?!\\]>))+"}
- ], comment: [
- {token: "comment", regex: ".*?-->", next: "start"},
- {token: "comment", regex: ".+"}
- ]}, i.tag(this.$rules, "tag", "start")
- };
- r.inherits(o, s), t.XmlHighlightRules = o
-}), ace.define("ace/mode/xml_util", ["require", "exports", "module"], function (e, t, n) {
- function r(e) {
- return[
- {token: "string", regex: '"', next: e + "_qqstring"},
- {token: "string", regex: "'", next: e + "_qstring"}
- ]
- }
-
- function i(e, t) {
- return[
- {token: "string", regex: e, next: t},
- {token: "constant.language.escape", regex: "(?:[0-9]+;)|(?:[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"},
- {defaultToken: "string"}
- ]
- }
-
- t.tag = function (e, t, n, s) {
- e[t] = [
- {token: "text", regex: "\\s+"},
- {token: s ? function (e) {
- return s[e] ? "meta.tag.tag-name." + s[e] : "meta.tag.tag-name"
- } : "meta.tag.tag-name", regex: "[-_a-zA-Z0-9:]+", next: t + "_embed_attribute_list"},
- {token: "empty", regex: "", next: t + "_embed_attribute_list"}
- ], e[t + "_qstring"] = i("'", t + "_embed_attribute_list"), e[t + "_qqstring"] = i('"', t + "_embed_attribute_list"), e[t + "_embed_attribute_list"] = [
- {token: "meta.tag.r", regex: "/?>", next: n},
- {token: "keyword.operator", regex: "="},
- {token: "entity.other.attribute-name", regex: "[-_a-zA-Z0-9:]+"},
- {token: "constant.numeric", regex: "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},
- {token: "text", regex: "\\s+"}
- ].concat(r(t))
- }
-}), ace.define("ace/mode/behaviour/xml", ["require", "exports", "module", "ace/lib/oop", "ace/mode/behaviour", "ace/mode/behaviour/cstyle", "ace/token_iterator"], function (e, t, n) {
- function u(e, t) {
- var n = !0, r = e.type.split("."), i = t.split(".");
- return i.forEach(function (e) {
- if (r.indexOf(e) == -1)return n = !1, !1
- }), n
- }
-
- var r = e("../../lib/oop"), i = e("../behaviour").Behaviour, s = e("./cstyle").CstyleBehaviour, o = e("../../token_iterator").TokenIterator, a = function () {
- this.inherit(s, ["string_dquotes"]), this.add("autoclosing", "insertion", function (e, t, n, r, i) {
- if (i == ">") {
- var s = n.getCursorPosition(), a = new o(r, s.row, s.column), f = a.getCurrentToken(), l = !1;
- if (!f || !u(f, "meta.tag") && (!u(f, "text") || !f.value.match("/"))) {
- do f = a.stepBackward(); while (f && (u(f, "string") || u(f, "keyword.operator") || u(f, "entity.attribute-name") || u(f, "text")))
- } else l = !0;
- if (!f || !u(f, "meta.tag-name") || a.stepBackward().value.match("/"))return;
- var c = f.value;
- if (l)var c = c.substring(0, s.column - f.start);
- return{text: ">" + c + ">", selection: [1, 1]}
- }
- }), this.add("autoindent", "insertion", function (e, t, n, r, i) {
- if (i == "\n") {
- var s = n.getCursorPosition(), o = r.doc.getLine(s.row), u = o.substring(s.column, s.column + 2);
- if (u == "") {
- var a = this.$getIndent(r.doc.getLine(s.row)) + r.getTabString(), f = this.$getIndent(r.doc.getLine(s.row));
- return{text: "\n" + a + "\n" + f, selection: [1, a.length, 1, a.length]}
- }
- }
- })
- };
- r.inherits(a, i), t.XmlBehaviour = a
-}), ace.define("ace/mode/folding/xml", ["require", "exports", "module", "ace/lib/oop", "ace/lib/lang", "ace/range", "ace/mode/folding/fold_mode", "ace/token_iterator"], function (e, t, n) {
- var r = e("../../lib/oop"), i = e("../../lib/lang"), s = e("../../range").Range, o = e("./fold_mode").FoldMode, u = e("../../token_iterator").TokenIterator, a = t.FoldMode = function (e) {
- o.call(this), this.voidElements = e || {}
- };
- r.inherits(a, o), function () {
- this.getFoldWidget = function (e, t, n) {
- var r = this._getFirstTagInLine(e, n);
- return r.closing ? t == "markbeginend" ? "end" : "" : !r.tagName || this.voidElements[r.tagName.toLowerCase()] ? "" : r.selfClosing ? "" : r.value.indexOf("/" + r.tagName) !== -1 ? "" : "start"
- }, this._getFirstTagInLine = function (e, t) {
- var n = e.getTokens(t), r = "";
- for (var s = 0; s < n.length; s++) {
- var o = n[s];
- o.type.indexOf("meta.tag") === 0 ? r += o.value : r += i.stringRepeat(" ", o.value.length)
- }
- return this._parseTag(r)
- }, this.tagRe = /^(\s*)((\/?)([-_a-zA-Z0-9:!]*)\s*(\/?)>?)/, this._parseTag = function (e) {
- var t = this.tagRe.exec(e), n = this.tagRe.lastIndex || 0;
- return this.tagRe.lastIndex = 0, {value: e, match: t ? t[2] : "", closing: t ? !!t[3] : !1, selfClosing: t ? !!t[5] || t[2] == "/>" : !1, tagName: t ? t[4] : "", column: t[1] ? n + t[1].length : n}
- }, this._readTagForward = function (e) {
- var t = e.getCurrentToken();
- if (!t)return null;
- var n = "", r;
- do if (t.type.indexOf("meta.tag") === 0) {
- if (!r)var r = {row: e.getCurrentTokenRow(), column: e.getCurrentTokenColumn()};
- n += t.value;
- if (n.indexOf(">") !== -1) {
- var i = this._parseTag(n);
- return i.start = r, i.end = {row: e.getCurrentTokenRow(), column: e.getCurrentTokenColumn() + t.value.length}, e.stepForward(), i
- }
- } while (t = e.stepForward());
- return null
- }, this._readTagBackward = function (e) {
- var t = e.getCurrentToken();
- if (!t)return null;
- var n = "", r;
- do if (t.type.indexOf("meta.tag") === 0) {
- r || (r = {row: e.getCurrentTokenRow(), column: e.getCurrentTokenColumn() + t.value.length}), n = t.value + n;
- if (n.indexOf("<") !== -1) {
- var i = this._parseTag(n);
- return i.end = r, i.start = {row: e.getCurrentTokenRow(), column: e.getCurrentTokenColumn()}, e.stepBackward(), i
- }
- } while (t = e.stepBackward());
- return null
- }, this._pop = function (e, t) {
- while (e.length) {
- var n = e[e.length - 1];
- if (!t || n.tagName == t.tagName)return e.pop();
- if (this.voidElements[t.tagName])return;
- if (this.voidElements[n.tagName]) {
- e.pop();
- continue
- }
- return null
- }
- }, this.getFoldWidgetRange = function (e, t, n) {
- var r = this._getFirstTagInLine(e, n);
- if (!r.match)return null;
- var i = r.closing || r.selfClosing, o = [], a;
- if (!i) {
- var f = new u(e, n, r.column), l = {row: n, column: r.column + r.tagName.length + 2};
- while (a = this._readTagForward(f)) {
- if (a.selfClosing) {
- if (!o.length)return a.start.column += a.tagName.length + 2, a.end.column -= 2, s.fromPoints(a.start, a.end);
- continue
- }
- if (a.closing) {
- this._pop(o, a);
- if (o.length == 0)return s.fromPoints(l, a.start)
- } else o.push(a)
- }
- } else {
- var f = new u(e, n, r.column + r.match.length), c = {row: n, column: r.column};
- while (a = this._readTagBackward(f)) {
- if (a.selfClosing) {
- if (!o.length)return a.start.column += a.tagName.length + 2, a.end.column -= 2, s.fromPoints(a.start, a.end);
- continue
- }
- if (!a.closing) {
- this._pop(o, a);
- if (o.length == 0)return a.start.column += a.tagName.length + 2, s.fromPoints(a.start, c)
- } else o.push(a)
- }
- }
- }
- }.call(a.prototype)
-}), ace.define("ace/mode/html", ["require", "exports", "module", "ace/lib/oop", "ace/mode/text", "ace/mode/javascript", "ace/mode/css", "ace/tokenizer", "ace/mode/html_highlight_rules", "ace/mode/behaviour/html", "ace/mode/folding/html"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("./text").Mode, s = e("./javascript").Mode, o = e("./css").Mode, u = e("../tokenizer").Tokenizer, a = e("./html_highlight_rules").HtmlHighlightRules, f = e("./behaviour/html").HtmlBehaviour, l = e("./folding/html").FoldMode, c = function () {
- var e = new a;
- this.$tokenizer = new u(e.getRules()), this.$behaviour = new f, this.$embeds = e.getEmbeds(), this.createModeDelegates({"js-": s, "css-": o}), this.foldingRules = new l
- };
- r.inherits(c, i), function () {
- this.toggleCommentLines = function (e, t, n, r) {
- return 0
- }, this.getNextLineIndent = function (e, t, n) {
- return this.$getIndent(t)
- }, this.checkOutdent = function (e, t, n) {
- return!1
- }
- }.call(c.prototype), t.Mode = c
-}), ace.define("ace/mode/css", ["require", "exports", "module", "ace/lib/oop", "ace/mode/text", "ace/tokenizer", "ace/mode/css_highlight_rules", "ace/mode/matching_brace_outdent", "ace/worker/worker_client", "ace/mode/behaviour/css", "ace/mode/folding/cstyle"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("./text").Mode, s = e("../tokenizer").Tokenizer, o = e("./css_highlight_rules").CssHighlightRules, u = e("./matching_brace_outdent").MatchingBraceOutdent, a = e("../worker/worker_client").WorkerClient, f = e("./behaviour/css").CssBehaviour, l = e("./folding/cstyle").FoldMode, c = function () {
- this.$tokenizer = new s((new o).getRules(), "i"), this.$outdent = new u, this.$behaviour = new f, this.foldingRules = new l
- };
- r.inherits(c, i), function () {
- this.foldingRules = "cStyle", this.getNextLineIndent = function (e, t, n) {
- var r = this.$getIndent(t), i = this.$tokenizer.getLineTokens(t, e).tokens;
- if (i.length && i[i.length - 1].type == "comment")return r;
- var s = t.match(/^.*\{\s*$/);
- return s && (r += n), r
- }, this.checkOutdent = function (e, t, n) {
- return this.$outdent.checkOutdent(t, n)
- }, this.autoOutdent = function (e, t, n) {
- this.$outdent.autoOutdent(t, n)
- }, this.createWorker = function (e) {
- var t = new a(["ace"], "ace/mode/css_worker", "Worker");
- return t.attachToDocument(e.getDocument()), t.on("csslint", function (t) {
- e.setAnnotations(t.data)
- }), t.on("terminate", function () {
- e.clearAnnotations()
- }), t
- }
- }.call(c.prototype), t.Mode = c
-}), ace.define("ace/mode/css_highlight_rules", ["require", "exports", "module", "ace/lib/oop", "ace/lib/lang", "ace/mode/text_highlight_rules"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("../lib/lang"), s = e("./text_highlight_rules").TextHighlightRules, o = t.supportType = "animation-fill-mode|alignment-adjust|alignment-baseline|animation-delay|animation-direction|animation-duration|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|animation|appearance|azimuth|backface-visibility|background-attachment|background-break|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|background|baseline-shift|binding|bleed|bookmark-label|bookmark-level|bookmark-state|bookmark-target|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|border|bottom|box-align|box-decoration-break|box-direction|box-flex-group|box-flex|box-lines|box-ordinal-group|box-orient|box-pack|box-shadow|box-sizing|break-after|break-before|break-inside|caption-side|clear|clip|color-profile|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|crop|cue-after|cue-before|cue|cursor|direction|display|dominant-baseline|drop-initial-after-adjust|drop-initial-after-align|drop-initial-before-adjust|drop-initial-before-align|drop-initial-size|drop-initial-value|elevation|empty-cells|fit|fit-position|float-offset|float|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|font|grid-columns|grid-rows|hanging-punctuation|height|hyphenate-after|hyphenate-before|hyphenate-character|hyphenate-lines|hyphenate-resource|hyphens|icon|image-orientation|image-rendering|image-resolution|inline-box-align|left|letter-spacing|line-height|line-stacking-ruby|line-stacking-shift|line-stacking-strategy|line-stacking|list-style-image|list-style-position|list-style-type|list-style|margin-bottom|margin-left|margin-right|margin-top|margin|mark-after|mark-before|mark|marks|marquee-direction|marquee-play-count|marquee-speed|marquee-style|max-height|max-width|min-height|min-width|move-to|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|orphans|outline-color|outline-offset|outline-style|outline-width|outline|overflow-style|overflow-x|overflow-y|overflow|padding-bottom|padding-left|padding-right|padding-top|padding|page-break-after|page-break-before|page-break-inside|page-policy|page|pause-after|pause-before|pause|perspective-origin|perspective|phonemes|pitch-range|pitch|play-during|position|presentation-level|punctuation-trim|quotes|rendering-intent|resize|rest-after|rest-before|rest|richness|right|rotation-point|rotation|ruby-align|ruby-overhang|ruby-position|ruby-span|size|speak-header|speak-numeral|speak-punctuation|speak|speech-rate|stress|string-set|table-layout|target-name|target-new|target-position|target|text-align-last|text-align|text-decoration|text-emphasis|text-height|text-indent|text-justify|text-outline|text-shadow|text-transform|text-wrap|top|transform-origin|transform-style|transform|transition-delay|transition-duration|transition-property|transition-timing-function|transition|unicode-bidi|vertical-align|visibility|voice-balance|voice-duration|voice-family|voice-pitch-range|voice-pitch|voice-rate|voice-stress|voice-volume|volume|white-space-collapse|white-space|widows|width|word-break|word-spacing|word-wrap|z-index", u = t.supportFunction = "rgb|rgba|url|attr|counter|counters", a = t.supportConstant = "absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero", f = t.supportConstantColor = "aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow", l = t.supportConstantFonts = "arial|century|comic|courier|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace", c = t.numRe = "\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))", h = t.pseudoElements = "(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b", p = t.pseudoClasses = "(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b", d = function () {
- var e = this.createKeywordMapper({"support.function": u, "support.constant": a, "support.type": o, "support.constant.color": f, "support.constant.fonts": l}, "text", !0), t = [
- {token: "comment", regex: "\\/\\*", next: "ruleset_comment"},
- {token: "string", regex: '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},
- {token: "string", regex: "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},
- {token: ["constant.numeric", "keyword"], regex: "(" + c + ")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vm|vw|%)"},
- {token: "constant.numeric", regex: c},
- {token: "constant.numeric", regex: "#[a-f0-9]{6}"},
- {token: "constant.numeric", regex: "#[a-f0-9]{3}"},
- {token: ["punctuation", "entity.other.attribute-name.pseudo-element.css"], regex: h},
- {token: ["punctuation", "entity.other.attribute-name.pseudo-class.css"], regex: p},
- {token: e, regex: "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"}
- ], n = i.copyArray(t);
- n.unshift({token: "paren.rparen", regex: "\\}", next: "start"});
- var r = i.copyArray(t);
- r.unshift({token: "paren.rparen", regex: "\\}", next: "media"});
- var s = [
- {token: "comment", regex: ".+"}
- ], d = i.copyArray(s);
- d.unshift({token: "comment", regex: ".*?\\*\\/", next: "start"});
- var v = i.copyArray(s);
- v.unshift({token: "comment", regex: ".*?\\*\\/", next: "media"});
- var m = i.copyArray(s);
- m.unshift({token: "comment", regex: ".*?\\*\\/", next: "ruleset"}), this.$rules = {start: [
- {token: "comment", regex: "\\/\\*", next: "comment"},
- {token: "paren.lparen", regex: "\\{", next: "ruleset"},
- {token: "string", regex: "@.*?{", next: "media"},
- {token: "keyword", regex: "#[a-z0-9-_]+"},
- {token: "variable", regex: "\\.[a-z0-9-_]+"},
- {token: "string", regex: ":[a-z0-9-_]+"},
- {token: "constant", regex: "[a-z0-9-_]+"}
- ], media: [
- {token: "comment", regex: "\\/\\*", next: "media_comment"},
- {token: "paren.lparen", regex: "\\{", next: "media_ruleset"},
- {token: "string", regex: "\\}", next: "start"},
- {token: "keyword", regex: "#[a-z0-9-_]+"},
- {token: "variable", regex: "\\.[a-z0-9-_]+"},
- {token: "string", regex: ":[a-z0-9-_]+"},
- {token: "constant", regex: "[a-z0-9-_]+"}
- ], comment: d, ruleset: n, ruleset_comment: m, media_ruleset: r, media_comment: v}
- };
- r.inherits(d, s), t.CssHighlightRules = d
-}), ace.define("ace/mode/behaviour/css", ["require", "exports", "module", "ace/lib/oop", "ace/mode/behaviour", "ace/mode/behaviour/cstyle", "ace/token_iterator"], function (e, t, n) {
- var r = e("../../lib/oop"), i = e("../behaviour").Behaviour, s = e("./cstyle").CstyleBehaviour, o = e("../../token_iterator").TokenIterator, u = function () {
- this.inherit(s), this.add("colon", "insertion", function (e, t, n, r, i) {
- if (i === ":") {
- var s = n.getCursorPosition(), u = new o(r, s.row, s.column), a = u.getCurrentToken();
- a && a.value.match(/\s+/) && (a = u.stepBackward());
- if (a && a.type === "support.type") {
- var f = r.doc.getLine(s.row), l = f.substring(s.column, s.column + 1);
- if (l === ":")return{text: "", selection: [1, 1]};
- if (!f.substring(s.column).match(/^\s*;/))return{text: ":;", selection: [1, 1]}
- }
- }
- }), this.add("colon", "deletion", function (e, t, n, r, i) {
- var s = r.doc.getTextRange(i);
- if (!i.isMultiLine() && s === ":") {
- var o = r.doc.getLine(i.start.row), u = o.substring(i.end.column, i.end.column + 1);
- if (u === ";")return i.end.column++, i
- }
- }), this.add("semicolon", "insertion", function (e, t, n, r, i) {
- if (i === ";") {
- var s = n.getCursorPosition(), o = r.doc.getLine(s.row), u = o.substring(s.column, s.column + 1);
- if (u === ";")return{text: "", selection: [1, 1]}
- }
- })
- };
- r.inherits(u, s), t.CssBehaviour = u
-}), ace.define("ace/mode/html_highlight_rules", ["require", "exports", "module", "ace/lib/oop", "ace/lib/lang", "ace/mode/css_highlight_rules", "ace/mode/javascript_highlight_rules", "ace/mode/xml_util", "ace/mode/text_highlight_rules"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("../lib/lang"), s = e("./css_highlight_rules").CssHighlightRules, o = e("./javascript_highlight_rules").JavaScriptHighlightRules, u = e("./xml_util"), a = e("./text_highlight_rules").TextHighlightRules, f = i.createMap({a: "anchor", button: "form", form: "form", img: "image", input: "form", label: "form", script: "script", select: "form", textarea: "form", style: "style", table: "table", tbody: "table", td: "table", tfoot: "table", th: "table", tr: "table"}), l = function () {
- this.$rules = {start: [
- {token: "text", regex: "<\\!\\[CDATA\\[", next: "cdata"},
- {token: "xml-pe", regex: "<\\?.*?\\?>"},
- {token: "comment", regex: "<\\!--", next: "comment"},
- {token: "xml-pe", regex: "<\\!.*?>"},
- {token: "meta.tag", regex: "<(?=script\\b)", next: "script"},
- {token: "meta.tag", regex: "<(?=style\\b)", next: "style"},
- {token: "meta.tag", regex: "<\\/?", next: "tag"},
- {token: "text", regex: "\\s+"},
- {token: "constant.character.entity", regex: "(?:[0-9]+;)|(?:[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}
- ], cdata: [
- {token: "text", regex: "\\]\\]>", next: "start"}
- ], comment: [
- {token: "comment", regex: ".*?-->", next: "start"},
- {defaultToken: "comment"}
- ]}, u.tag(this.$rules, "tag", "start", f), u.tag(this.$rules, "style", "css-start", f), u.tag(this.$rules, "script", "js-start", f), this.embedRules(o, "js-", [
- {token: "comment", regex: "\\/\\/.*(?=<\\/script>)", next: "tag"},
- {token: "meta.tag", regex: "<\\/(?=script)", next: "tag"}
- ]), this.embedRules(s, "css-", [
- {token: "meta.tag", regex: "<\\/(?=style)", next: "tag"}
- ])
- };
- r.inherits(l, a), t.HtmlHighlightRules = l
-}), ace.define("ace/mode/behaviour/html", ["require", "exports", "module", "ace/lib/oop", "ace/mode/behaviour/xml", "ace/mode/behaviour/cstyle", "ace/token_iterator"], function (e, t, n) {
- function a(e, t) {
- var n = !0, r = e.type.split("."), i = t.split(".");
- return i.forEach(function (e) {
- if (r.indexOf(e) == -1)return n = !1, !1
- }), n
- }
-
- var r = e("../../lib/oop"), i = e("../behaviour/xml").XmlBehaviour, s = e("./cstyle").CstyleBehaviour, o = e("../../token_iterator").TokenIterator, u = ["area", "base", "br", "col", "command", "embed", "hr", "img", "input", "keygen", "link", "meta", "param", "source", "track", "wbr"], f = function () {
- this.inherit(i), this.add("autoclosing", "insertion", function (e, t, n, r, i) {
- if (i == ">") {
- var s = n.getCursorPosition(), f = new o(r, s.row, s.column), l = f.getCurrentToken(), c = !1;
- if (!l || !a(l, "meta.tag") && (!a(l, "text") || !l.value.match("/"))) {
- do l = f.stepBackward(); while (l && (a(l, "string") || a(l, "keyword.operator") || a(l, "entity.attribute-name") || a(l, "text")))
- } else c = !0;
- if (!l || !a(l, "meta.tag-name") || f.stepBackward().value.match("/"))return;
- var h = l.value;
- if (c)var h = h.substring(0, s.column - l.start);
- if (u.indexOf(h) !== -1)return;
- return{text: ">" + h + ">", selection: [1, 1]}
- }
- })
- };
- r.inherits(f, i), t.HtmlBehaviour = f
-}), ace.define("ace/mode/folding/html", ["require", "exports", "module", "ace/lib/oop", "ace/mode/folding/mixed", "ace/mode/folding/xml", "ace/mode/folding/cstyle"], function (e, t, n) {
- var r = e("../../lib/oop"), i = e("./mixed").FoldMode, s = e("./xml").FoldMode, o = e("./cstyle").FoldMode, u = t.FoldMode = function () {
- i.call(this, new s({area: 1, base: 1, br: 1, col: 1, command: 1, embed: 1, hr: 1, img: 1, input: 1, keygen: 1, link: 1, meta: 1, param: 1, source: 1, track: 1, wbr: 1, li: 1, dt: 1, dd: 1, p: 1, rt: 1, rp: 1, optgroup: 1, option: 1, colgroup: 1, td: 1, th: 1}), {"js-": new o, "css-": new o})
- };
- r.inherits(u, i)
-}), ace.define("ace/mode/folding/mixed", ["require", "exports", "module", "ace/lib/oop", "ace/mode/folding/fold_mode"], function (e, t, n) {
- var r = e("../../lib/oop"), i = e("./fold_mode").FoldMode, s = t.FoldMode = function (e, t) {
- this.defaultMode = e, this.subModes = t
- };
- r.inherits(s, i), function () {
- this.$getMode = function (e) {
- for (var t in this.subModes)if (e.indexOf(t) === 0)return this.subModes[t];
- return null
- }, this.$tryMode = function (e, t, n, r) {
- var i = this.$getMode(e);
- return i ? i.getFoldWidget(t, n, r) : ""
- }, this.getFoldWidget = function (e, t, n) {
- return this.$tryMode(e.getState(n - 1), e, t, n) || this.$tryMode(e.getState(n), e, t, n) || this.defaultMode.getFoldWidget(e, t, n)
- }, this.getFoldWidgetRange = function (e, t, n) {
- var r = this.$getMode(e.getState(n - 1));
- if (!r || !r.getFoldWidget(e, t, n))r = this.$getMode(e.getState(n));
- if (!r || !r.getFoldWidget(e, t, n))r = this.defaultMode;
- return r.getFoldWidgetRange(e, t, n)
- }
- }.call(s.prototype)
-}), ace.define("ace/mode/markdown_highlight_rules", ["require", "exports", "module", "ace/lib/oop", "ace/mode/text_highlight_rules", "ace/mode/javascript_highlight_rules", "ace/mode/xml_highlight_rules", "ace/mode/html_highlight_rules", "ace/mode/css_highlight_rules"], function (e, t, n) {
- function f(e, t) {
- return{token: "support.function", regex: "^```" + e + "\\s*$", next: t + "start"}
- }
-
- var r = e("../lib/oop"), i = e("./text_highlight_rules").TextHighlightRules, s = e("./javascript_highlight_rules").JavaScriptHighlightRules, o = e("./xml_highlight_rules").XmlHighlightRules, u = e("./html_highlight_rules").HtmlHighlightRules, a = e("./css_highlight_rules").CssHighlightRules, l = function () {
- this.$rules = {basic: [
- {token: "support.function", regex: "(`+)(.*?[^`])(\\1)"},
- {token: ["text", "constant", "text", "url", "string", "text"], regex: '^([ ]{0,3}\\[)([^\\]]+)(\\]:\\s*)([^ ]+)(\\s*(?:["][^"]+["])?(\\s*))$'},
- {token: ["text", "string", "text", "constant", "text"], regex: "(\\[)((?:[[^\\]]*\\]|[^\\[\\]])*)(\\][ ]?(?:\\n[ ]*)?\\[)(.*?)(\\])"},
- {token: ["text", "string", "text", "markup.underline", "string", "text"], regex: '(\\[)(\\[[^\\]]*\\]|[^\\[\\]]*)(\\]\\([ \\t]*)((?:(?:[^\\(]*?\\([^\\)]*?\\)\\S*?)|(?:.*?))>?)((?:[ ]*"(?:.*?)"[ \\t]*)?)(\\))'},
- {token: "string", regex: "([*]{2}|[_]{2}(?=\\S))(.*?\\S[*_]*)(\\1)"},
- {token: "string", regex: "([*]|[_](?=\\S))(.*?\\S[*_]*)(\\1)"},
- {token: ["text", "url", "text"], regex: "(<)((?:https?|ftp|dict):[^'\">\\s]+|(?:mailto:)?[-.\\w]+\\@[-a-z0-9]+(?:\\.[-a-z0-9]+)*\\.[a-z]+)(>)"}
- ], allowBlock: [
- {token: "support.function", regex: "^ {4}.+", next: "allowBlock"},
- {token: "empty", regex: "", next: "start"}
- ], start: [
- {token: "empty_line", regex: "^$", next: "allowBlock"},
- {token: "markup.heading.1", regex: "^=+(?=\\s*$)"},
- {token: "markup.heading.2", regex: "^\\-+(?=\\s*$)"},
- {token: function (e) {
- return"markup.heading." + e.search(/[^#]/)
- }, regex: "^#{1,6}(?:[^ #].*| +.*(?:[^ #].*|[^ ]+.* +#+ *))$"},
- f("(?:javascript|js)", "js-"),
- f("xml", "xml-"),
- f("html", "html-"),
- f("css", "css-"),
- {token: "support.function", regex: "^```\\s*[a-zA-Z]*(?:{.*?\\})?\\s*$", next: "githubblock"},
- {token: "string", regex: "^>[ ].+$", next: "blockquote"},
- {token: "constant", regex: "^ {0,2}(?:(?: ?\\* ?){3,}|(?: ?\\- ?){3,}|(?: ?\\_ ?){3,})\\s*$", next: "allowBlock"},
- {token: "markup.list", regex: "^\\s{0,3}(?:[*+-]|\\d+\\.)\\s+", next: "listblock-start"},
- {include: "basic"}
- ], "listblock-start": [
- {token: "support.variable", regex: /(?:\[[ x]\])?/, next: "listblock"}
- ], listblock: [
- {token: "empty_line", regex: "^$", next: "start"},
- {include: "basic", noEscape: !0},
- {token: "markup.list", regex: "^\\s{0,3}(?:[*+-]|\\d+\\.)\\s+", next: "listblock-start"},
- {defaultToken: "markup.list"}
- ], blockquote: [
- {token: "empty_line", regex: "^\\s*$", next: "start"},
- {token: "string", regex: ".+"}
- ], githubblock: [
- {token: "support.function", regex: "^```", next: "start"},
- {token: "support.function", regex: ".+"}
- ]}, this.embedRules(s, "js-", [
- {token: "support.function", regex: "^```", next: "start"}
- ]), this.embedRules(u, "html-", [
- {token: "support.function", regex: "^```", next: "start"}
- ]), this.embedRules(a, "css-", [
- {token: "support.function", regex: "^```", next: "start"}
- ]), this.embedRules(o, "xml-", [
- {token: "support.function", regex: "^```", next: "start"}
- ]);
- var e = (new u).getRules();
- for (var t in e)this.$rules[t] ? this.$rules[t] = this.$rules[t].concat(e[t]) : this.$rules[t] = e[t];
- this.normalizeRules()
- };
- r.inherits(l, i), t.MarkdownHighlightRules = l
-}), ace.define("ace/mode/folding/markdown", ["require", "exports", "module", "ace/lib/oop", "ace/mode/folding/fold_mode", "ace/range"], function (e, t, n) {
- var r = e("../../lib/oop"), i = e("./fold_mode").FoldMode, s = e("../../range").Range, o = t.FoldMode = function () {
- };
- r.inherits(o, i), function () {
- this.foldingStartMarker = /^(?:[=-]+\s*$|#{1,6} |`{3})/, this.getFoldWidget = function (e, t, n) {
- var r = e.getLine(n);
- return this.foldingStartMarker.test(r) ? r[0] == "`" ? e.bgTokenizer.getState(n) == "start" ? "end" : "start" : "start" : ""
- }, this.getFoldWidgetRange = function (e, t, n) {
- function l(t) {
- return f = e.getTokens(t)[0], f && f.type.lastIndexOf(c, 0) === 0
- }
-
- function h() {
- var e = f.value[0];
- return e == "=" ? 6 : e == "-" ? 5 : 7 - f.value.search(/[^#]/)
- }
-
- var r = e.getLine(n), i = r.length, o = e.getLength(), u = n, a = n;
- if (!r.match(this.foldingStartMarker))return;
- if (r[0] == "`") {
- if (e.bgTokenizer.getState(n) !== "start") {
- while (++n < o) {
- r = e.getLine(n);
- if (r[0] == "`" & r.substring(0, 3) == "```")break
- }
- return new s(u, i, n, 0)
- }
- while (n-- > 0) {
- r = e.getLine(n);
- if (r[0] == "`" & r.substring(0, 3) == "```")break
- }
- return new s(n, r.length, u, 0)
- }
- var f, c = "markup.heading";
- if (l(n)) {
- var p = h();
- while (++n < o) {
- if (!l(n))continue;
- var d = h();
- if (d >= p)break
- }
- a = n - (!f || ["=", "-"].indexOf(f.value[0]) == -1 ? 1 : 2);
- if (a > u)while (a > u && /^\s*$/.test(e.getLine(a)))a--;
- if (a > u) {
- var v = e.getLine(a).length;
- return new s(u, i, a, v)
- }
- }
- }
- }.call(o.prototype)
-})
\ No newline at end of file
diff --git a/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/mode-objectivec.js b/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/mode-objectivec.js
deleted file mode 100644
index ddabacc..0000000
--- a/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/mode-objectivec.js
+++ /dev/null
@@ -1,160 +0,0 @@
-ace.define("ace/mode/objectivec", ["require", "exports", "module", "ace/lib/oop", "ace/mode/text", "ace/tokenizer", "ace/mode/objectivec_highlight_rules", "ace/mode/folding/cstyle"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("./text").Mode, s = e("../tokenizer").Tokenizer, o = e("./objectivec_highlight_rules").ObjectiveCHighlightRules, u = e("./folding/cstyle").FoldMode, a = function () {
- var e = new o;
- this.foldingRules = new u, this.$tokenizer = new s(e.getRules())
- };
- r.inherits(a, i), function () {
- }.call(a.prototype), t.Mode = a
-}), ace.define("ace/mode/objectivec_highlight_rules", ["require", "exports", "module", "ace/lib/oop", "ace/mode/doc_comment_highlight_rules", "ace/mode/c_cpp_highlight_rules"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("./doc_comment_highlight_rules").DocCommentHighlightRules, s = e("./c_cpp_highlight_rules"), o = s.c_cppHighlightRules, u = function () {
- var e = "\\\\(?:[abefnrtv'\"?\\\\]|[0-3]\\d{1,2}|[4-7]\\d?|222|x[a-zA-Z0-9]+)", t = [
- {regex: "\\b_cmd\\b", token: "variable.other.selector.objc"},
- {regex: "\\b(?:self|super)\\b", token: "variable.language.objc"}
- ], n = new o, r = n.getRules();
- this.$rules = {start: [
- {token: "comment", regex: "\\/\\/.*$"},
- i.getStartRule("doc-start"),
- {token: "comment", regex: "\\/\\*", next: "comment"},
- {token: ["storage.type.objc", "punctuation.definition.storage.type.objc", "entity.name.type.objc", "text", "entity.other.inherited-class.objc"], regex: "(@)(interface|protocol)(?!.+;)(\\s+[A-Za-z_][A-Za-z0-9_]*)(\\s*:\\s*)([A-Za-z]+)"},
- {token: ["storage.type.objc"], regex: "(@end)"},
- {token: ["storage.type.objc", "entity.name.type.objc", "entity.other.inherited-class.objc"], regex: "(@implementation)(\\s+[A-Za-z_][A-Za-z0-9_]*)(\\s*?::\\s*(?:[A-Za-z][A-Za-z0-9]*))?"},
- {token: "string.begin.objc", regex: '@"', next: "constant_NSString"},
- {token: "storage.type.objc", regex: "\\bid\\s*<", next: "protocol_list"},
- {token: "keyword.control.macro.objc", regex: "\\bNS_DURING|NS_HANDLER|NS_ENDHANDLER\\b"},
- {token: ["punctuation.definition.keyword.objc", "keyword.control.exception.objc"], regex: "(@)(try|catch|finally|throw)\\b"},
- {token: ["punctuation.definition.keyword.objc", "keyword.other.objc"], regex: "(@)(defs|encode)\\b"},
- {token: ["storage.type.id.objc", "text"], regex: "(\\bid\\b)(\\s|\\n)?"},
- {token: "storage.type.objc", regex: "\\bIBOutlet|IBAction|BOOL|SEL|id|unichar|IMP|Class\\b"},
- {token: ["punctuation.definition.storage.type.objc", "storage.type.objc"], regex: "(@)(class|protocol)\\b"},
- {token: ["punctuation.definition.storage.type.objc", "punctuation"], regex: "(@selector)(\\s*\\()", next: "selectors"},
- {token: ["punctuation.definition.storage.modifier.objc", "storage.modifier.objc"], regex: "(@)(synchronized|public|private|protected|package)\\b"},
- {token: "constant.language.objc", regex: "\\bYES|NO|Nil|nil\\b"},
- {token: "support.variable.foundation", regex: "\\bNSApp\\b"},
- {token: ["support.function.cocoa.leopard"], regex: "(?:\\b)(NS(?:Rect(?:ToCGRect|FromCGRect)|MakeCollectable|S(?:tringFromProtocol|ize(?:ToCGSize|FromCGSize))|Draw(?:NinePartImage|ThreePartImage)|P(?:oint(?:ToCGPoint|FromCGPoint)|rotocolFromString)|EventMaskFromType|Value))(?:\\b)"},
- {token: ["support.function.cocoa"], regex: "(?:\\b)(NS(?:R(?:ound(?:DownToMultipleOfPageSize|UpToMultipleOfPageSize)|un(?:CriticalAlertPanel(?:RelativeToWindow)?|InformationalAlertPanel(?:RelativeToWindow)?|AlertPanel(?:RelativeToWindow)?)|e(?:set(?:MapTable|HashTable)|c(?:ycleZone|t(?:Clip(?:List)?|F(?:ill(?:UsingOperation|List(?:UsingOperation|With(?:Grays|Colors(?:UsingOperation)?))?)?|romString))|ordAllocationEvent)|turnAddress|leaseAlertPanel|a(?:dPixel|l(?:MemoryAvailable|locateCollectable))|gisterServicesProvider)|angeFromString)|Get(?:SizeAndAlignment|CriticalAlertPanel|InformationalAlertPanel|UncaughtExceptionHandler|FileType(?:s)?|WindowServerMemory|AlertPanel)|M(?:i(?:n(?:X|Y)|d(?:X|Y))|ouseInRect|a(?:p(?:Remove|Get|Member|Insert(?:IfAbsent|KnownAbsent)?)|ke(?:R(?:ect|ange)|Size|Point)|x(?:Range|X|Y)))|B(?:itsPer(?:SampleFromDepth|PixelFromDepth)|e(?:stDepth|ep|gin(?:CriticalAlertSheet|InformationalAlertSheet|AlertSheet)))|S(?:ho(?:uldRetainWithZone|w(?:sServicesMenuItem|AnimationEffect))|tringFrom(?:R(?:ect|ange)|MapTable|S(?:ize|elector)|HashTable|Class|Point)|izeFromString|e(?:t(?:ShowsServicesMenuItem|ZoneName|UncaughtExceptionHandler|FocusRingStyle)|lectorFromString|archPathForDirectoriesInDomains)|wap(?:Big(?:ShortToHost|IntToHost|DoubleToHost|FloatToHost|Long(?:ToHost|LongToHost))|Short|Host(?:ShortTo(?:Big|Little)|IntTo(?:Big|Little)|DoubleTo(?:Big|Little)|FloatTo(?:Big|Little)|Long(?:To(?:Big|Little)|LongTo(?:Big|Little)))|Int|Double|Float|L(?:ittle(?:ShortToHost|IntToHost|DoubleToHost|FloatToHost|Long(?:ToHost|LongToHost))|ong(?:Long)?)))|H(?:ighlightRect|o(?:stByteOrder|meDirectory(?:ForUser)?)|eight|ash(?:Remove|Get|Insert(?:IfAbsent|KnownAbsent)?)|FSType(?:CodeFromFileType|OfFile))|N(?:umberOfColorComponents|ext(?:MapEnumeratorPair|HashEnumeratorItem))|C(?:o(?:n(?:tainsRect|vert(?:GlyphsToPackedGlyphs|Swapped(?:DoubleToHost|FloatToHost)|Host(?:DoubleToSwapped|FloatToSwapped)))|unt(?:MapTable|HashTable|Frames|Windows(?:ForContext)?)|py(?:M(?:emoryPages|apTableWithZone)|Bits|HashTableWithZone|Object)|lorSpaceFromDepth|mpare(?:MapTables|HashTables))|lassFromString|reate(?:MapTable(?:WithZone)?|HashTable(?:WithZone)?|Zone|File(?:namePboardType|ContentsPboardType)))|TemporaryDirectory|I(?:s(?:ControllerMarker|EmptyRect|FreedObject)|n(?:setRect|crementExtraRefCount|te(?:r(?:sect(?:sRect|ionR(?:ect|ange))|faceStyleForKey)|gralRect)))|Zone(?:Realloc|Malloc|Name|Calloc|Fr(?:omPointer|ee))|O(?:penStepRootDirectory|ffsetRect)|D(?:i(?:sableScreenUpdates|videRect)|ottedFrameRect|e(?:c(?:imal(?:Round|Multiply|S(?:tring|ubtract)|Normalize|Co(?:py|mpa(?:ct|re))|IsNotANumber|Divide|Power|Add)|rementExtraRefCountWasZero)|faultMallocZone|allocate(?:MemoryPages|Object))|raw(?:Gr(?:oove|ayBezel)|B(?:itmap|utton)|ColorTiledRects|TiledRects|DarkBezel|W(?:hiteBezel|indowBackground)|LightBezel))|U(?:serName|n(?:ionR(?:ect|ange)|registerServicesProvider)|pdateDynamicServices)|Java(?:Bundle(?:Setup|Cleanup)|Setup(?:VirtualMachine)?|Needs(?:ToLoadClasses|VirtualMachine)|ClassesF(?:orBundle|romPath)|ObjectNamedInPath|ProvidesClasses)|P(?:oint(?:InRect|FromString)|erformService|lanarFromDepth|ageSize)|E(?:n(?:d(?:MapTableEnumeration|HashTableEnumeration)|umerate(?:MapTable|HashTable)|ableScreenUpdates)|qual(?:R(?:ects|anges)|Sizes|Points)|raseRect|xtraRefCount)|F(?:ileTypeForHFSTypeCode|ullUserName|r(?:ee(?:MapTable|HashTable)|ame(?:Rect(?:WithWidth(?:UsingOperation)?)?|Address)))|Wi(?:ndowList(?:ForContext)?|dth)|Lo(?:cationInRange|g(?:v|PageSize)?)|A(?:ccessibility(?:R(?:oleDescription(?:ForUIElement)?|aiseBadArgumentException)|Unignored(?:Children(?:ForOnlyChild)?|Descendant|Ancestor)|PostNotification|ActionDescription)|pplication(?:Main|Load)|vailableWindowDepths|ll(?:MapTable(?:Values|Keys)|HashTableObjects|ocate(?:MemoryPages|Collectable|Object)))))(?:\\b)"},
- {token: ["support.class.cocoa.leopard"], regex: "(?:\\b)(NS(?:RuleEditor|G(?:arbageCollector|radient)|MapTable|HashTable|Co(?:ndition|llectionView(?:Item)?)|T(?:oolbarItemGroup|extInputClient|r(?:eeNode|ackingArea))|InvocationOperation|Operation(?:Queue)?|D(?:ictionaryController|ockTile)|P(?:ointer(?:Functions|Array)|athC(?:o(?:ntrol(?:Delegate)?|mponentCell)|ell(?:Delegate)?)|r(?:intPanelAccessorizing|edicateEditor(?:RowTemplate)?))|ViewController|FastEnumeration|Animat(?:ionContext|ablePropertyContainer)))(?:\\b)"},
- {token: ["support.class.cocoa"], regex: "(?:\\b)(NS(?:R(?:u(?:nLoop|ler(?:Marker|View))|e(?:sponder|cursiveLock|lativeSpecifier)|an(?:domSpecifier|geSpecifier))|G(?:etCommand|lyph(?:Generator|Storage|Info)|raphicsContext)|XML(?:Node|D(?:ocument|TD(?:Node)?)|Parser|Element)|M(?:iddleSpecifier|ov(?:ie(?:View)?|eCommand)|utable(?:S(?:tring|et)|C(?:haracterSet|opying)|IndexSet|D(?:ictionary|ata)|URLRequest|ParagraphStyle|A(?:ttributedString|rray))|e(?:ssagePort(?:NameServer)?|nu(?:Item(?:Cell)?|View)?|t(?:hodSignature|adata(?:Item|Query(?:ResultGroup|AttributeValueTuple)?)))|a(?:ch(?:BootstrapServer|Port)|trix))|B(?:itmapImageRep|ox|u(?:ndle|tton(?:Cell)?)|ezierPath|rowser(?:Cell)?)|S(?:hadow|c(?:anner|r(?:ipt(?:SuiteRegistry|C(?:o(?:ercionHandler|mmand(?:Description)?)|lassDescription)|ObjectSpecifier|ExecutionContext|WhoseTest)|oll(?:er|View)|een))|t(?:epper(?:Cell)?|atus(?:Bar|Item)|r(?:ing|eam))|imple(?:HorizontalTypesetter|CString)|o(?:cketPort(?:NameServer)?|und|rtDescriptor)|p(?:e(?:cifierTest|ech(?:Recognizer|Synthesizer)|ll(?:Server|Checker))|litView)|e(?:cureTextField(?:Cell)?|t(?:Command)?|archField(?:Cell)?|rializer|gmentedC(?:ontrol|ell))|lider(?:Cell)?|avePanel)|H(?:ost|TTP(?:Cookie(?:Storage)?|URLResponse)|elpManager)|N(?:ib(?:Con(?:nector|trolConnector)|OutletConnector)?|otification(?:Center|Queue)?|u(?:ll|mber(?:Formatter)?)|etService(?:Browser)?|ameSpecifier)|C(?:ha(?:ngeSpelling|racterSet)|o(?:n(?:stantString|nection|trol(?:ler)?|ditionLock)|d(?:ing|er)|unt(?:Command|edSet)|pying|lor(?:Space|P(?:ick(?:ing(?:Custom|Default)|er)|anel)|Well|List)?|m(?:p(?:oundPredicate|arisonPredicate)|boBox(?:Cell)?))|u(?:stomImageRep|rsor)|IImageRep|ell|l(?:ipView|o(?:seCommand|neCommand)|assDescription)|a(?:ched(?:ImageRep|URLResponse)|lendar(?:Date)?)|reateCommand)|T(?:hread|ypesetter|ime(?:Zone|r)|o(?:olbar(?:Item(?:Validations)?)?|kenField(?:Cell)?)|ext(?:Block|Storage|Container|Tab(?:le(?:Block)?)?|Input|View|Field(?:Cell)?|List|Attachment(?:Cell)?)?|a(?:sk|b(?:le(?:Header(?:Cell|View)|Column|View)|View(?:Item)?))|reeController)|I(?:n(?:dex(?:S(?:pecifier|et)|Path)|put(?:Manager|S(?:tream|erv(?:iceProvider|er(?:MouseTracker)?)))|vocation)|gnoreMisspelledWords|mage(?:Rep|Cell|View)?)|O(?:ut(?:putStream|lineView)|pen(?:GL(?:Context|Pixel(?:Buffer|Format)|View)|Panel)|bj(?:CTypeSerializationCallBack|ect(?:Controller)?))|D(?:i(?:st(?:antObject(?:Request)?|ributed(?:NotificationCenter|Lock))|ctionary|rectoryEnumerator)|ocument(?:Controller)?|e(?:serializer|cimalNumber(?:Behaviors|Handler)?|leteCommand)|at(?:e(?:Components|Picker(?:Cell)?|Formatter)?|a)|ra(?:wer|ggingInfo))|U(?:ser(?:InterfaceValidations|Defaults(?:Controller)?)|RL(?:Re(?:sponse|quest)|Handle(?:Client)?|C(?:onnection|ache|redential(?:Storage)?)|Download(?:Delegate)?|Prot(?:ocol(?:Client)?|ectionSpace)|AuthenticationChallenge(?:Sender)?)?|n(?:iqueIDSpecifier|doManager|archiver))|P(?:ipe|o(?:sitionalSpecifier|pUpButton(?:Cell)?|rt(?:Message|NameServer|Coder)?)|ICTImageRep|ersistentDocument|DFImageRep|a(?:steboard|nel|ragraphStyle|geLayout)|r(?:int(?:Info|er|Operation|Panel)|o(?:cessInfo|tocolChecker|perty(?:Specifier|ListSerialization)|gressIndicator|xy)|edicate))|E(?:numerator|vent|PSImageRep|rror|x(?:ception|istsCommand|pression))|V(?:iew(?:Animation)?|al(?:idated(?:ToobarItem|UserInterfaceItem)|ue(?:Transformer)?))|Keyed(?:Unarchiver|Archiver)|Qui(?:ckDrawView|tCommand)|F(?:ile(?:Manager|Handle|Wrapper)|o(?:nt(?:Manager|Descriptor|Panel)?|rm(?:Cell|atter)))|W(?:hoseSpecifier|indow(?:Controller)?|orkspace)|L(?:o(?:c(?:k(?:ing)?|ale)|gicalTest)|evelIndicator(?:Cell)?|ayoutManager)|A(?:ssertionHandler|nimation|ctionCell|ttributedString|utoreleasePool|TSTypesetter|ppl(?:ication|e(?:Script|Event(?:Manager|Descriptor)))|ffineTransform|lert|r(?:chiver|ray(?:Controller)?))))(?:\\b)"},
- {token: ["support.type.cocoa.leopard"], regex: "(?:\\b)(NS(?:R(?:u(?:nLoop|ler(?:Marker|View))|e(?:sponder|cursiveLock|lativeSpecifier)|an(?:domSpecifier|geSpecifier))|G(?:etCommand|lyph(?:Generator|Storage|Info)|raphicsContext)|XML(?:Node|D(?:ocument|TD(?:Node)?)|Parser|Element)|M(?:iddleSpecifier|ov(?:ie(?:View)?|eCommand)|utable(?:S(?:tring|et)|C(?:haracterSet|opying)|IndexSet|D(?:ictionary|ata)|URLRequest|ParagraphStyle|A(?:ttributedString|rray))|e(?:ssagePort(?:NameServer)?|nu(?:Item(?:Cell)?|View)?|t(?:hodSignature|adata(?:Item|Query(?:ResultGroup|AttributeValueTuple)?)))|a(?:ch(?:BootstrapServer|Port)|trix))|B(?:itmapImageRep|ox|u(?:ndle|tton(?:Cell)?)|ezierPath|rowser(?:Cell)?)|S(?:hadow|c(?:anner|r(?:ipt(?:SuiteRegistry|C(?:o(?:ercionHandler|mmand(?:Description)?)|lassDescription)|ObjectSpecifier|ExecutionContext|WhoseTest)|oll(?:er|View)|een))|t(?:epper(?:Cell)?|atus(?:Bar|Item)|r(?:ing|eam))|imple(?:HorizontalTypesetter|CString)|o(?:cketPort(?:NameServer)?|und|rtDescriptor)|p(?:e(?:cifierTest|ech(?:Recognizer|Synthesizer)|ll(?:Server|Checker))|litView)|e(?:cureTextField(?:Cell)?|t(?:Command)?|archField(?:Cell)?|rializer|gmentedC(?:ontrol|ell))|lider(?:Cell)?|avePanel)|H(?:ost|TTP(?:Cookie(?:Storage)?|URLResponse)|elpManager)|N(?:ib(?:Con(?:nector|trolConnector)|OutletConnector)?|otification(?:Center|Queue)?|u(?:ll|mber(?:Formatter)?)|etService(?:Browser)?|ameSpecifier)|C(?:ha(?:ngeSpelling|racterSet)|o(?:n(?:stantString|nection|trol(?:ler)?|ditionLock)|d(?:ing|er)|unt(?:Command|edSet)|pying|lor(?:Space|P(?:ick(?:ing(?:Custom|Default)|er)|anel)|Well|List)?|m(?:p(?:oundPredicate|arisonPredicate)|boBox(?:Cell)?))|u(?:stomImageRep|rsor)|IImageRep|ell|l(?:ipView|o(?:seCommand|neCommand)|assDescription)|a(?:ched(?:ImageRep|URLResponse)|lendar(?:Date)?)|reateCommand)|T(?:hread|ypesetter|ime(?:Zone|r)|o(?:olbar(?:Item(?:Validations)?)?|kenField(?:Cell)?)|ext(?:Block|Storage|Container|Tab(?:le(?:Block)?)?|Input|View|Field(?:Cell)?|List|Attachment(?:Cell)?)?|a(?:sk|b(?:le(?:Header(?:Cell|View)|Column|View)|View(?:Item)?))|reeController)|I(?:n(?:dex(?:S(?:pecifier|et)|Path)|put(?:Manager|S(?:tream|erv(?:iceProvider|er(?:MouseTracker)?)))|vocation)|gnoreMisspelledWords|mage(?:Rep|Cell|View)?)|O(?:ut(?:putStream|lineView)|pen(?:GL(?:Context|Pixel(?:Buffer|Format)|View)|Panel)|bj(?:CTypeSerializationCallBack|ect(?:Controller)?))|D(?:i(?:st(?:antObject(?:Request)?|ributed(?:NotificationCenter|Lock))|ctionary|rectoryEnumerator)|ocument(?:Controller)?|e(?:serializer|cimalNumber(?:Behaviors|Handler)?|leteCommand)|at(?:e(?:Components|Picker(?:Cell)?|Formatter)?|a)|ra(?:wer|ggingInfo))|U(?:ser(?:InterfaceValidations|Defaults(?:Controller)?)|RL(?:Re(?:sponse|quest)|Handle(?:Client)?|C(?:onnection|ache|redential(?:Storage)?)|Download(?:Delegate)?|Prot(?:ocol(?:Client)?|ectionSpace)|AuthenticationChallenge(?:Sender)?)?|n(?:iqueIDSpecifier|doManager|archiver))|P(?:ipe|o(?:sitionalSpecifier|pUpButton(?:Cell)?|rt(?:Message|NameServer|Coder)?)|ICTImageRep|ersistentDocument|DFImageRep|a(?:steboard|nel|ragraphStyle|geLayout)|r(?:int(?:Info|er|Operation|Panel)|o(?:cessInfo|tocolChecker|perty(?:Specifier|ListSerialization)|gressIndicator|xy)|edicate))|E(?:numerator|vent|PSImageRep|rror|x(?:ception|istsCommand|pression))|V(?:iew(?:Animation)?|al(?:idated(?:ToobarItem|UserInterfaceItem)|ue(?:Transformer)?))|Keyed(?:Unarchiver|Archiver)|Qui(?:ckDrawView|tCommand)|F(?:ile(?:Manager|Handle|Wrapper)|o(?:nt(?:Manager|Descriptor|Panel)?|rm(?:Cell|atter)))|W(?:hoseSpecifier|indow(?:Controller)?|orkspace)|L(?:o(?:c(?:k(?:ing)?|ale)|gicalTest)|evelIndicator(?:Cell)?|ayoutManager)|A(?:ssertionHandler|nimation|ctionCell|ttributedString|utoreleasePool|TSTypesetter|ppl(?:ication|e(?:Script|Event(?:Manager|Descriptor)))|ffineTransform|lert|r(?:chiver|ray(?:Controller)?))))(?:\\b)"},
- {token: ["support.class.quartz"], regex: "(?:\\b)(C(?:I(?:Sampler|Co(?:ntext|lor)|Image(?:Accumulator)?|PlugIn(?:Registration)?|Vector|Kernel|Filter(?:Generator|Shape)?)|A(?:Renderer|MediaTiming(?:Function)?|BasicAnimation|ScrollLayer|Constraint(?:LayoutManager)?|T(?:iledLayer|extLayer|rans(?:ition|action))|OpenGLLayer|PropertyAnimation|KeyframeAnimation|Layer|A(?:nimation(?:Group)?|ction))))(?:\\b)"},
- {token: ["support.type.quartz"], regex: "(?:\\b)(C(?:G(?:Float|Point|Size|Rect)|IFormat|AConstraintAttribute))(?:\\b)"},
- {token: ["support.type.cocoa"], regex: "(?:\\b)(NS(?:R(?:ect(?:Edge)?|ange)|G(?:lyph(?:Relation|LayoutMode)?|radientType)|M(?:odalSession|a(?:trixMode|p(?:Table|Enumerator)))|B(?:itmapImageFileType|orderType|uttonType|ezelStyle|ackingStoreType|rowserColumnResizingType)|S(?:cr(?:oll(?:er(?:Part|Arrow)|ArrowPosition)|eenAuxiliaryOpaque)|tringEncoding|ize|ocketNativeHandle|election(?:Granularity|Direction|Affinity)|wapped(?:Double|Float)|aveOperationType)|Ha(?:sh(?:Table|Enumerator)|ndler(?:2)?)|C(?:o(?:ntrol(?:Size|Tint)|mp(?:ositingOperation|arisonResult))|ell(?:State|Type|ImagePosition|Attribute))|T(?:hreadPrivate|ypesetterGlyphInfo|i(?:ckMarkPosition|tlePosition|meInterval)|o(?:ol(?:TipTag|bar(?:SizeMode|DisplayMode))|kenStyle)|IFFCompression|ext(?:TabType|Alignment)|ab(?:State|leViewDropOperation|ViewType)|rackingRectTag)|ImageInterpolation|Zone|OpenGL(?:ContextAuxiliary|PixelFormatAuxiliary)|D(?:ocumentChangeType|atePickerElementFlags|ra(?:werState|gOperation))|UsableScrollerParts|P(?:oint|r(?:intingPageOrder|ogressIndicator(?:Style|Th(?:ickness|readInfo))))|EventType|KeyValueObservingOptions|Fo(?:nt(?:SymbolicTraits|TraitMask|Action)|cusRingType)|W(?:indow(?:OrderingMode|Depth)|orkspace(?:IconCreationOptions|LaunchOptions)|ritingDirection)|L(?:ineBreakMode|ayout(?:Status|Direction))|A(?:nimation(?:Progress|Effect)|ppl(?:ication(?:TerminateReply|DelegateReply|PrintReply)|eEventManagerSuspensionID)|ffineTransformStruct|lertStyle)))(?:\\b)"},
- {token: ["support.constant.cocoa"], regex: "(?:\\b)(NS(?:NotFound|Ordered(?:Ascending|Descending|Same)))(?:\\b)"},
- {token: ["support.constant.notification.cocoa.leopard"], regex: "(?:\\b)(NS(?:MenuDidBeginTracking|ViewDidUpdateTrackingAreas)?Notification)(?:\\b)"},
- {token: ["support.constant.notification.cocoa"], regex: "(?:\\b)(NS(?:Menu(?:Did(?:RemoveItem|SendAction|ChangeItem|EndTracking|AddItem)|WillSendAction)|S(?:ystemColorsDidChange|plitView(?:DidResizeSubviews|WillResizeSubviews))|C(?:o(?:nt(?:extHelpModeDid(?:Deactivate|Activate)|rolT(?:intDidChange|extDid(?:BeginEditing|Change|EndEditing)))|lor(?:PanelColorDidChange|ListDidChange)|mboBox(?:Selection(?:IsChanging|DidChange)|Will(?:Dismiss|PopUp)))|lassDescriptionNeededForClass)|T(?:oolbar(?:DidRemoveItem|WillAddItem)|ext(?:Storage(?:DidProcessEditing|WillProcessEditing)|Did(?:BeginEditing|Change|EndEditing)|View(?:DidChange(?:Selection|TypingAttributes)|WillChangeNotifyingTextView))|ableView(?:Selection(?:IsChanging|DidChange)|ColumnDid(?:Resize|Move)))|ImageRepRegistryDidChange|OutlineView(?:Selection(?:IsChanging|DidChange)|ColumnDid(?:Resize|Move)|Item(?:Did(?:Collapse|Expand)|Will(?:Collapse|Expand)))|Drawer(?:Did(?:Close|Open)|Will(?:Close|Open))|PopUpButton(?:CellWillPopUp|WillPopUp)|View(?:GlobalFrameDidChange|BoundsDidChange|F(?:ocusDidChange|rameDidChange))|FontSetChanged|W(?:indow(?:Did(?:Resi(?:ze|gn(?:Main|Key))|M(?:iniaturize|ove)|Become(?:Main|Key)|ChangeScreen(?:|Profile)|Deminiaturize|Update|E(?:ndSheet|xpose))|Will(?:M(?:iniaturize|ove)|BeginSheet|Close))|orkspace(?:SessionDid(?:ResignActive|BecomeActive)|Did(?:Mount|TerminateApplication|Unmount|PerformFileOperation|Wake|LaunchApplication)|Will(?:Sleep|Unmount|PowerOff|LaunchApplication)))|A(?:ntialiasThresholdChanged|ppl(?:ication(?:Did(?:ResignActive|BecomeActive|Hide|ChangeScreenParameters|U(?:nhide|pdate)|FinishLaunching)|Will(?:ResignActive|BecomeActive|Hide|Terminate|U(?:nhide|pdate)|FinishLaunching))|eEventManagerWillProcessFirstEvent)))Notification)(?:\\b)"},
- {token: ["support.constant.cocoa.leopard"], regex: "(?:\\b)(NS(?:RuleEditor(?:RowType(?:Simple|Compound)|NestingMode(?:Si(?:ngle|mple)|Compound|List))|GradientDraws(?:BeforeStartingLocation|AfterEndingLocation)|M(?:inusSetExpressionType|a(?:chPortDeallocate(?:ReceiveRight|SendRight|None)|pTable(?:StrongMemory|CopyIn|ZeroingWeakMemory|ObjectPointerPersonality)))|B(?:oxCustom|undleExecutableArchitecture(?:X86|I386|PPC(?:64)?)|etweenPredicateOperatorType|ackgroundStyle(?:Raised|Dark|L(?:ight|owered)))|S(?:tring(?:DrawingTruncatesLastVisibleLine|EncodingConversion(?:ExternalRepresentation|AllowLossy))|ubqueryExpressionType|p(?:e(?:ech(?:SentenceBoundary|ImmediateBoundary|WordBoundary)|llingState(?:GrammarFlag|SpellingFlag))|litViewDividerStyleThi(?:n|ck))|e(?:rvice(?:RequestTimedOutError|M(?:iscellaneousError|alformedServiceDictionaryError)|InvalidPasteboardDataError|ErrorM(?:inimum|aximum)|Application(?:NotFoundError|LaunchFailedError))|gmentStyle(?:Round(?:Rect|ed)|SmallSquare|Capsule|Textured(?:Rounded|Square)|Automatic)))|H(?:UDWindowMask|ashTable(?:StrongMemory|CopyIn|ZeroingWeakMemory|ObjectPointerPersonality))|N(?:oModeColorPanel|etServiceNoAutoRename)|C(?:hangeRedone|o(?:ntainsPredicateOperatorType|l(?:orRenderingIntent(?:RelativeColorimetric|Saturation|Default|Perceptual|AbsoluteColorimetric)|lectorDisabledOption))|ellHit(?:None|ContentArea|TrackableArea|EditableTextArea))|T(?:imeZoneNameStyle(?:S(?:hort(?:Standard|DaylightSaving)|tandard)|DaylightSaving)|extFieldDatePickerStyle|ableViewSelectionHighlightStyle(?:Regular|SourceList)|racking(?:Mouse(?:Moved|EnteredAndExited)|CursorUpdate|InVisibleRect|EnabledDuringMouseDrag|A(?:ssumeInside|ctive(?:In(?:KeyWindow|ActiveApp)|WhenFirstResponder|Always))))|I(?:n(?:tersectSetExpressionType|dexedColorSpaceModel)|mageScale(?:None|Proportionally(?:Down|UpOrDown)|AxesIndependently))|Ope(?:nGLPFAAllowOfflineRenderers|rationQueue(?:DefaultMaxConcurrentOperationCount|Priority(?:High|Normal|Very(?:High|Low)|Low)))|D(?:iacriticInsensitiveSearch|ownloadsDirectory)|U(?:nionSetExpressionType|TF(?:16(?:BigEndianStringEncoding|StringEncoding|LittleEndianStringEncoding)|32(?:BigEndianStringEncoding|StringEncoding|LittleEndianStringEncoding)))|P(?:ointerFunctions(?:Ma(?:chVirtualMemory|llocMemory)|Str(?:ongMemory|uctPersonality)|C(?:StringPersonality|opyIn)|IntegerPersonality|ZeroingWeakMemory|O(?:paque(?:Memory|Personality)|bjectP(?:ointerPersonality|ersonality)))|at(?:hStyle(?:Standard|NavigationBar|PopUp)|ternColorSpaceModel)|rintPanelShows(?:Scaling|Copies|Orientation|P(?:a(?:perSize|ge(?:Range|SetupAccessory))|review)))|Executable(?:RuntimeMismatchError|NotLoadableError|ErrorM(?:inimum|aximum)|L(?:inkError|oadError)|ArchitectureMismatchError)|KeyValueObservingOption(?:Initial|Prior)|F(?:i(?:ndPanelSubstringMatchType(?:StartsWith|Contains|EndsWith|FullWord)|leRead(?:TooLargeError|UnknownStringEncodingError))|orcedOrderingSearch)|Wi(?:ndow(?:BackingLocation(?:MainMemory|Default|VideoMemory)|Sharing(?:Read(?:Only|Write)|None)|CollectionBehavior(?:MoveToActiveSpace|CanJoinAllSpaces|Default))|dthInsensitiveSearch)|AggregateExpressionType))(?:\\b)"},
- {token: ["support.constant.cocoa"], regex: "(?:\\b)(NS(?:R(?:GB(?:ModeColorPanel|ColorSpaceModel)|ight(?:Mouse(?:D(?:own(?:Mask)?|ragged(?:Mask)?)|Up(?:Mask)?)|T(?:ext(?:Movement|Alignment)|ab(?:sBezelBorder|StopType))|ArrowFunctionKey)|ound(?:RectBezelStyle|Bankers|ed(?:BezelStyle|TokenStyle|DisclosureBezelStyle)|Down|Up|Plain|Line(?:CapStyle|JoinStyle))|un(?:StoppedResponse|ContinuesResponse|AbortedResponse)|e(?:s(?:izableWindowMask|et(?:CursorRectsRunLoopOrdering|FunctionKey))|ce(?:ssedBezelStyle|iver(?:sCantHandleCommandScriptError|EvaluationScriptError))|turnTextMovement|doFunctionKey|quiredArgumentsMissingScriptError|l(?:evancyLevelIndicatorStyle|ative(?:Before|After))|gular(?:SquareBezelStyle|ControlSize)|moveTraitFontAction)|a(?:n(?:domSubelement|geDateMode)|tingLevelIndicatorStyle|dio(?:ModeMatrix|Button)))|G(?:IFFileType|lyph(?:Below|Inscribe(?:B(?:elow|ase)|Over(?:strike|Below)|Above)|Layout(?:WithPrevious|A(?:tAPoint|gainstAPoint))|A(?:ttribute(?:BidiLevel|Soft|Inscribe|Elastic)|bove))|r(?:ooveBorder|eaterThan(?:Comparison|OrEqualTo(?:Comparison|PredicateOperatorType)|PredicateOperatorType)|a(?:y(?:ModeColorPanel|ColorSpaceModel)|dient(?:None|Con(?:cave(?:Strong|Weak)|vex(?:Strong|Weak)))|phiteControlTint)))|XML(?:N(?:o(?:tationDeclarationKind|de(?:CompactEmptyElement|IsCDATA|OptionsNone|Use(?:SingleQuotes|DoubleQuotes)|Pre(?:serve(?:NamespaceOrder|C(?:haracterReferences|DATA)|DTD|Prefixes|E(?:ntities|mptyElements)|Quotes|Whitespace|A(?:ttributeOrder|ll))|ttyPrint)|ExpandEmptyElement))|amespaceKind)|CommentKind|TextKind|InvalidKind|D(?:ocument(?:X(?:MLKind|HTMLKind|Include)|HTMLKind|T(?:idy(?:XML|HTML)|extKind)|IncludeContentTypeDeclaration|Validate|Kind)|TDKind)|P(?:arser(?:GTRequiredError|XMLDeclNot(?:StartedError|FinishedError)|Mi(?:splaced(?:XMLDeclarationError|CDATAEndStringError)|xedContentDeclNot(?:StartedError|FinishedError))|S(?:t(?:andaloneValueError|ringNot(?:StartedError|ClosedError))|paceRequiredError|eparatorRequiredError)|N(?:MTOKENRequiredError|o(?:t(?:ationNot(?:StartedError|FinishedError)|WellBalancedError)|DTDError)|amespaceDeclarationError|AMERequiredError)|C(?:haracterRef(?:In(?:DTDError|PrologError|EpilogError)|AtEOFError)|o(?:nditionalSectionNot(?:StartedError|FinishedError)|mment(?:NotFinishedError|ContainsDoubleHyphenError))|DATANotFinishedError)|TagNameMismatchError|In(?:ternalError|valid(?:HexCharacterRefError|C(?:haracter(?:RefError|InEntityError|Error)|onditionalSectionError)|DecimalCharacterRefError|URIError|Encoding(?:NameError|Error)))|OutOfMemoryError|D(?:ocumentStartError|elegateAbortedParseError|OCTYPEDeclNotFinishedError)|U(?:RI(?:RequiredError|FragmentError)|n(?:declaredEntityError|parsedEntityError|knownEncodingError|finishedTagError))|P(?:CDATARequiredError|ublicIdentifierRequiredError|arsedEntityRef(?:MissingSemiError|NoNameError|In(?:Internal(?:SubsetError|Error)|PrologError|EpilogError)|AtEOFError)|r(?:ocessingInstructionNot(?:StartedError|FinishedError)|ematureDocumentEndError))|E(?:n(?:codingNotSupportedError|tity(?:Ref(?:In(?:DTDError|PrologError|EpilogError)|erence(?:MissingSemiError|WithoutNameError)|LoopError|AtEOFError)|BoundaryError|Not(?:StartedError|FinishedError)|Is(?:ParameterError|ExternalError)|ValueRequiredError))|qualExpectedError|lementContentDeclNot(?:StartedError|FinishedError)|xt(?:ernalS(?:tandaloneEntityError|ubsetNotFinishedError)|raContentError)|mptyDocumentError)|L(?:iteralNot(?:StartedError|FinishedError)|T(?:RequiredError|SlashRequiredError)|essThanSymbolInAttributeError)|Attribute(?:RedefinedError|HasNoValueError|Not(?:StartedError|FinishedError)|ListNot(?:StartedError|FinishedError)))|rocessingInstructionKind)|E(?:ntity(?:GeneralKind|DeclarationKind|UnparsedKind|P(?:ar(?:sedKind|ameterKind)|redefined))|lement(?:Declaration(?:MixedKind|UndefinedKind|E(?:lementKind|mptyKind)|Kind|AnyKind)|Kind))|Attribute(?:N(?:MToken(?:sKind|Kind)|otationKind)|CDATAKind|ID(?:Ref(?:sKind|Kind)|Kind)|DeclarationKind|En(?:tit(?:yKind|iesKind)|umerationKind)|Kind))|M(?:i(?:n(?:XEdge|iaturizableWindowMask|YEdge|uteCalendarUnit)|terLineJoinStyle|ddleSubelement|xedState)|o(?:nthCalendarUnit|deSwitchFunctionKey|use(?:Moved(?:Mask)?|E(?:ntered(?:Mask)?|ventSubtype|xited(?:Mask)?))|veToBezierPathElement|mentary(?:ChangeButton|Push(?:Button|InButton)|Light(?:Button)?))|enuFunctionKey|a(?:c(?:intoshInterfaceStyle|OSRomanStringEncoding)|tchesPredicateOperatorType|ppedRead|x(?:XEdge|YEdge))|ACHOperatingSystem)|B(?:MPFileType|o(?:ttomTabsBezelBorder|ldFontMask|rderlessWindowMask|x(?:Se(?:condary|parator)|OldStyle|Primary))|uttLineCapStyle|e(?:zelBorder|velLineJoinStyle|low(?:Bottom|Top)|gin(?:sWith(?:Comparison|PredicateOperatorType)|FunctionKey))|lueControlTint|ack(?:spaceCharacter|tabTextMovement|ingStore(?:Retained|Buffered|Nonretained)|TabCharacter|wardsSearch|groundTab)|r(?:owser(?:NoColumnResizing|UserColumnResizing|AutoColumnResizing)|eakFunctionKey))|S(?:h(?:ift(?:JISStringEncoding|KeyMask)|ow(?:ControlGlyphs|InvisibleGlyphs)|adowlessSquareBezelStyle)|y(?:s(?:ReqFunctionKey|tem(?:D(?:omainMask|efined(?:Mask)?)|FunctionKey))|mbolStringEncoding)|c(?:a(?:nnedOption|le(?:None|ToFit|Proportionally))|r(?:oll(?:er(?:NoPart|Increment(?:Page|Line|Arrow)|Decrement(?:Page|Line|Arrow)|Knob(?:Slot)?|Arrows(?:M(?:inEnd|axEnd)|None|DefaultSetting))|Wheel(?:Mask)?|LockFunctionKey)|eenChangedEventType))|t(?:opFunctionKey|r(?:ingDrawing(?:OneShot|DisableScreenFontSubstitution|Uses(?:DeviceMetrics|FontLeading|LineFragmentOrigin))|eam(?:Status(?:Reading|NotOpen|Closed|Open(?:ing)?|Error|Writing|AtEnd)|Event(?:Has(?:BytesAvailable|SpaceAvailable)|None|OpenCompleted|E(?:ndEncountered|rrorOccurred)))))|i(?:ngle(?:DateMode|UnderlineStyle)|ze(?:DownFontAction|UpFontAction))|olarisOperatingSystem|unOSOperatingSystem|pecialPageOrder|e(?:condCalendarUnit|lect(?:By(?:Character|Paragraph|Word)|i(?:ng(?:Next|Previous)|onAffinity(?:Downstream|Upstream))|edTab|FunctionKey)|gmentSwitchTracking(?:Momentary|Select(?:One|Any)))|quareLineCapStyle|witchButton|ave(?:ToOperation|Op(?:tions(?:Yes|No|Ask)|eration)|AsOperation)|mall(?:SquareBezelStyle|C(?:ontrolSize|apsFontMask)|IconButtonBezelStyle))|H(?:ighlightModeMatrix|SBModeColorPanel|o(?:ur(?:Minute(?:SecondDatePickerElementFlag|DatePickerElementFlag)|CalendarUnit)|rizontalRuler|meFunctionKey)|TTPCookieAcceptPolicy(?:Never|OnlyFromMainDocumentDomain|Always)|e(?:lp(?:ButtonBezelStyle|KeyMask|FunctionKey)|avierFontAction)|PUXOperatingSystem)|Year(?:MonthDa(?:yDatePickerElementFlag|tePickerElementFlag)|CalendarUnit)|N(?:o(?:n(?:StandardCharacterSetFontMask|ZeroWindingRule|activatingPanelMask|LossyASCIIStringEncoding)|Border|t(?:ification(?:SuspensionBehavior(?:Hold|Coalesce|D(?:eliverImmediately|rop))|NoCoalescing|CoalescingOn(?:Sender|Name)|DeliverImmediately|PostToAllSessions)|PredicateType|EqualToPredicateOperatorType)|S(?:cr(?:iptError|ollerParts)|ubelement|pecifierError)|CellMask|T(?:itle|opLevelContainersSpecifierError|abs(?:BezelBorder|NoBorder|LineBorder))|I(?:nterfaceStyle|mage)|UnderlineStyle|FontChangeAction)|u(?:ll(?:Glyph|CellType)|m(?:eric(?:Search|PadKeyMask)|berFormatter(?:Round(?:Half(?:Down|Up|Even)|Ceiling|Down|Up|Floor)|Behavior(?:10|Default)|S(?:cientificStyle|pellOutStyle)|NoStyle|CurrencyStyle|DecimalStyle|P(?:ercentStyle|ad(?:Before(?:Suffix|Prefix)|After(?:Suffix|Prefix))))))|e(?:t(?:Services(?:BadArgumentError|NotFoundError|C(?:ollisionError|ancelledError)|TimeoutError|InvalidError|UnknownError|ActivityInProgress)|workDomainMask)|wlineCharacter|xt(?:StepInterfaceStyle|FunctionKey))|EXTSTEPStringEncoding|a(?:t(?:iveShortGlyphPacking|uralTextAlignment)|rrowFontMask))|C(?:hange(?:ReadOtherContents|GrayCell(?:Mask)?|BackgroundCell(?:Mask)?|Cleared|Done|Undone|Autosaved)|MYK(?:ModeColorPanel|ColorSpaceModel)|ircular(?:BezelStyle|Slider)|o(?:n(?:stantValueExpressionType|t(?:inuousCapacityLevelIndicatorStyle|entsCellMask|ain(?:sComparison|erSpecifierError)|rol(?:Glyph|KeyMask))|densedFontMask)|lor(?:Panel(?:RGBModeMask|GrayModeMask|HSBModeMask|C(?:MYKModeMask|olorListModeMask|ustomPaletteModeMask|rayonModeMask)|WheelModeMask|AllModesMask)|ListModeColorPanel)|reServiceDirectory|m(?:p(?:osite(?:XOR|Source(?:In|O(?:ut|ver)|Atop)|Highlight|C(?:opy|lear)|Destination(?:In|O(?:ut|ver)|Atop)|Plus(?:Darker|Lighter))|ressedFontMask)|mandKeyMask))|u(?:stom(?:SelectorPredicateOperatorType|PaletteModeColorPanel)|r(?:sor(?:Update(?:Mask)?|PointingDevice)|veToBezierPathElement))|e(?:nterT(?:extAlignment|abStopType)|ll(?:State|H(?:ighlighted|as(?:Image(?:Horizontal|OnLeftOrBottom)|OverlappingImage))|ChangesContents|Is(?:Bordered|InsetButton)|Disabled|Editable|LightsBy(?:Gray|Background|Contents)|AllowsMixedState))|l(?:ipPagination|o(?:s(?:ePathBezierPathElement|ableWindowMask)|ckAndCalendarDatePickerStyle)|ear(?:ControlTint|DisplayFunctionKey|LineFunctionKey))|a(?:seInsensitive(?:Search|PredicateOption)|n(?:notCreateScriptCommandError|cel(?:Button|TextMovement))|chesDirectory|lculation(?:NoError|Overflow|DivideByZero|Underflow|LossOfPrecision)|rriageReturnCharacter)|r(?:itical(?:Request|AlertStyle)|ayonModeColorPanel))|T(?:hick(?:SquareBezelStyle|erSquareBezelStyle)|ypesetter(?:Behavior|HorizontalTabAction|ContainerBreakAction|ZeroAdvancementAction|OriginalBehavior|ParagraphBreakAction|WhitespaceAction|L(?:ineBreakAction|atestBehavior))|i(?:ckMark(?:Right|Below|Left|Above)|tledWindowMask|meZoneDatePickerElementFlag)|o(?:olbarItemVisibilityPriority(?:Standard|High|User|Low)|pTabsBezelBorder|ggleButton)|IFF(?:Compression(?:N(?:one|EXT)|CCITTFAX(?:3|4)|OldJPEG|JPEG|PackBits|LZW)|FileType)|e(?:rminate(?:Now|Cancel|Later)|xt(?:Read(?:InapplicableDocumentTypeError|WriteErrorM(?:inimum|aximum))|Block(?:M(?:i(?:nimum(?:Height|Width)|ddleAlignment)|a(?:rgin|ximum(?:Height|Width)))|B(?:o(?:ttomAlignment|rder)|aselineAlignment)|Height|TopAlignment|P(?:ercentageValueType|adding)|Width|AbsoluteValueType)|StorageEdited(?:Characters|Attributes)|CellType|ured(?:RoundedBezelStyle|BackgroundWindowMask|SquareBezelStyle)|Table(?:FixedLayoutAlgorithm|AutomaticLayoutAlgorithm)|Field(?:RoundedBezel|SquareBezel|AndStepperDatePickerStyle)|WriteInapplicableDocumentTypeError|ListPrependEnclosingMarker))|woByteGlyphPacking|ab(?:Character|TextMovement|le(?:tP(?:oint(?:Mask|EventSubtype)?|roximity(?:Mask|EventSubtype)?)|Column(?:NoResizing|UserResizingMask|AutoresizingMask)|View(?:ReverseSequentialColumnAutoresizingStyle|GridNone|S(?:olid(?:HorizontalGridLineMask|VerticalGridLineMask)|equentialColumnAutoresizingStyle)|NoColumnAutoresizing|UniformColumnAutoresizingStyle|FirstColumnOnlyAutoresizingStyle|LastColumnOnlyAutoresizingStyle)))|rackModeMatrix)|I(?:n(?:sert(?:CharFunctionKey|FunctionKey|LineFunctionKey)|t(?:Type|ernalS(?:criptError|pecifierError))|dexSubelement|validIndexSpecifierError|formational(?:Request|AlertStyle)|PredicateOperatorType)|talicFontMask|SO(?:2022JPStringEncoding|Latin(?:1StringEncoding|2StringEncoding))|dentityMappingCharacterCollection|llegalTextMovement|mage(?:R(?:ight|ep(?:MatchesDevice|LoadStatus(?:ReadingHeader|Completed|InvalidData|Un(?:expectedEOF|knownType)|WillNeedAllData)))|Below|C(?:ellType|ache(?:BySize|Never|Default|Always))|Interpolation(?:High|None|Default|Low)|O(?:nly|verlaps)|Frame(?:Gr(?:oove|ayBezel)|Button|None|Photo)|L(?:oadStatus(?:ReadError|C(?:ompleted|ancelled)|InvalidData|UnexpectedEOF)|eft)|A(?:lign(?:Right|Bottom(?:Right|Left)?|Center|Top(?:Right|Left)?|Left)|bove)))|O(?:n(?:State|eByteGlyphPacking|OffButton|lyScrollerArrows)|ther(?:Mouse(?:D(?:own(?:Mask)?|ragged(?:Mask)?)|Up(?:Mask)?)|TextMovement)|SF1OperatingSystem|pe(?:n(?:GL(?:GO(?:Re(?:setLibrary|tainRenderers)|ClearFormatCache|FormatCacheSize)|PFA(?:R(?:obust|endererID)|M(?:inimumPolicy|ulti(?:sample|Screen)|PSafe|aximumPolicy)|BackingStore|S(?:creenMask|te(?:ncilSize|reo)|ingleRenderer|upersample|ample(?:s|Buffers|Alpha))|NoRecovery|C(?:o(?:lor(?:Size|Float)|mpliant)|losestPolicy)|OffScreen|D(?:oubleBuffer|epthSize)|PixelBuffer|VirtualScreenCount|FullScreen|Window|A(?:cc(?:umSize|elerated)|ux(?:Buffers|DepthStencil)|l(?:phaSize|lRenderers))))|StepUnicodeReservedBase)|rationNotSupportedForKeyS(?:criptError|pecifierError))|ffState|KButton|rPredicateType|bjC(?:B(?:itfield|oolType)|S(?:hortType|tr(?:ingType|uctType)|electorType)|NoType|CharType|ObjectType|DoubleType|UnionType|PointerType|VoidType|FloatType|Long(?:Type|longType)|ArrayType))|D(?:i(?:s(?:c(?:losureBezelStyle|reteCapacityLevelIndicatorStyle)|playWindowRunLoopOrdering)|acriticInsensitivePredicateOption|rect(?:Selection|PredicateModifier))|o(?:c(?:ModalWindowMask|ument(?:Directory|ationDirectory))|ubleType|wn(?:TextMovement|ArrowFunctionKey))|e(?:s(?:cendingPageOrder|ktopDirectory)|cimalTabStopType|v(?:ice(?:NColorSpaceModel|IndependentModifierFlagsMask)|eloper(?:Directory|ApplicationDirectory))|fault(?:ControlTint|TokenStyle)|lete(?:Char(?:acter|FunctionKey)|FunctionKey|LineFunctionKey)|moApplicationDirectory)|a(?:yCalendarUnit|teFormatter(?:MediumStyle|Behavior(?:10|Default)|ShortStyle|NoStyle|FullStyle|LongStyle))|ra(?:wer(?:Clos(?:ingState|edState)|Open(?:ingState|State))|gOperation(?:Generic|Move|None|Copy|Delete|Private|Every|Link|All)))|U(?:ser(?:CancelledError|D(?:irectory|omainMask)|FunctionKey)|RL(?:Handle(?:NotLoaded|Load(?:Succeeded|InProgress|Failed))|CredentialPersistence(?:None|Permanent|ForSession))|n(?:scaledWindowMask|cachedRead|i(?:codeStringEncoding|talicFontMask|fiedTitleAndToolbarWindowMask)|d(?:o(?:CloseGroupingRunLoopOrdering|FunctionKey)|e(?:finedDateComponent|rline(?:Style(?:Single|None|Thick|Double)|Pattern(?:Solid|D(?:ot|ash(?:Dot(?:Dot)?)?)))))|known(?:ColorSpaceModel|P(?:ointingDevice|ageOrder)|KeyS(?:criptError|pecifierError))|boldFontMask)|tilityWindowMask|TF8StringEncoding|p(?:dateWindowsRunLoopOrdering|TextMovement|ArrowFunctionKey))|J(?:ustifiedTextAlignment|PEG(?:2000FileType|FileType)|apaneseEUC(?:GlyphPacking|StringEncoding))|P(?:o(?:s(?:t(?:Now|erFontMask|WhenIdle|ASAP)|iti(?:on(?:Replace|Be(?:fore|ginning)|End|After)|ve(?:IntType|DoubleType|FloatType)))|pUp(?:NoArrow|ArrowAt(?:Bottom|Center))|werOffEventType|rtraitOrientation)|NGFileType|ush(?:InCell(?:Mask)?|OnPushOffButton)|e(?:n(?:TipMask|UpperSideMask|PointingDevice|LowerSideMask)|riodic(?:Mask)?)|P(?:S(?:caleField|tatus(?:Title|Field)|aveButton)|N(?:ote(?:Title|Field)|ame(?:Title|Field))|CopiesField|TitleField|ImageButton|OptionsButton|P(?:a(?:perFeedButton|ge(?:Range(?:To|From)|ChoiceMatrix))|reviewButton)|LayoutButton)|lainTextTokenStyle|a(?:useFunctionKey|ragraphSeparatorCharacter|ge(?:DownFunctionKey|UpFunctionKey))|r(?:int(?:ing(?:ReplyLater|Success|Cancelled|Failure)|ScreenFunctionKey|erTable(?:NotFound|OK|Error)|FunctionKey)|o(?:p(?:ertyList(?:XMLFormat|MutableContainers(?:AndLeaves)?|BinaryFormat|Immutable|OpenStepFormat)|rietaryStringEncoding)|gressIndicator(?:BarStyle|SpinningStyle|Preferred(?:SmallThickness|Thickness|LargeThickness|AquaThickness)))|e(?:ssedTab|vFunctionKey))|L(?:HeightForm|CancelButton|TitleField|ImageButton|O(?:KButton|rientationMatrix)|UnitsButton|PaperNameButton|WidthForm))|E(?:n(?:terCharacter|d(?:sWith(?:Comparison|PredicateOperatorType)|FunctionKey))|v(?:e(?:nOddWindingRule|rySubelement)|aluatedObjectExpressionType)|qualTo(?:Comparison|PredicateOperatorType)|ra(?:serPointingDevice|CalendarUnit|DatePickerElementFlag)|x(?:clude(?:10|QuickDrawElementsIconCreationOption)|pandedFontMask|ecuteFunctionKey))|V(?:i(?:ew(?:M(?:in(?:XMargin|YMargin)|ax(?:XMargin|YMargin))|HeightSizable|NotSizable|WidthSizable)|aPanelFontAction)|erticalRuler|a(?:lidationErrorM(?:inimum|aximum)|riableExpressionType))|Key(?:SpecifierEvaluationScriptError|Down(?:Mask)?|Up(?:Mask)?|PathExpressionType|Value(?:MinusSetMutation|SetSetMutation|Change(?:Re(?:placement|moval)|Setting|Insertion)|IntersectSetMutation|ObservingOption(?:New|Old)|UnionSetMutation|ValidationError))|QTMovie(?:NormalPlayback|Looping(?:BackAndForthPlayback|Playback))|F(?:1(?:1FunctionKey|7FunctionKey|2FunctionKey|8FunctionKey|3FunctionKey|9FunctionKey|4FunctionKey|5FunctionKey|FunctionKey|0FunctionKey|6FunctionKey)|7FunctionKey|i(?:nd(?:PanelAction(?:Replace(?:A(?:ndFind|ll(?:InSelection)?))?|S(?:howFindPanel|e(?:tFindString|lectAll(?:InSelection)?))|Next|Previous)|FunctionKey)|tPagination|le(?:Read(?:No(?:SuchFileError|PermissionError)|CorruptFileError|In(?:validFileNameError|applicableStringEncodingError)|Un(?:supportedSchemeError|knownError))|HandlingPanel(?:CancelButton|OKButton)|NoSuchFileError|ErrorM(?:inimum|aximum)|Write(?:NoPermissionError|In(?:validFileNameError|applicableStringEncodingError)|OutOfSpaceError|Un(?:supportedSchemeError|knownError))|LockingError)|xedPitchFontMask)|2(?:1FunctionKey|7FunctionKey|2FunctionKey|8FunctionKey|3FunctionKey|9FunctionKey|4FunctionKey|5FunctionKey|FunctionKey|0FunctionKey|6FunctionKey)|o(?:nt(?:Mo(?:noSpaceTrait|dernSerifsClass)|BoldTrait|S(?:ymbolicClass|criptsClass|labSerifsClass|ansSerifClass)|C(?:o(?:ndensedTrait|llectionApplicationOnlyMask)|larendonSerifsClass)|TransitionalSerifsClass|I(?:ntegerAdvancementsRenderingMode|talicTrait)|O(?:ldStyleSerifsClass|rnamentalsClass)|DefaultRenderingMode|U(?:nknownClass|IOptimizedTrait)|Panel(?:S(?:hadowEffectModeMask|t(?:andardModesMask|rikethroughEffectModeMask)|izeModeMask)|CollectionModeMask|TextColorEffectModeMask|DocumentColorEffectModeMask|UnderlineEffectModeMask|FaceModeMask|All(?:ModesMask|EffectsModeMask))|ExpandedTrait|VerticalTrait|F(?:amilyClassMask|reeformSerifsClass)|Antialiased(?:RenderingMode|IntegerAdvancementsRenderingMode))|cusRing(?:Below|Type(?:None|Default|Exterior)|Only|Above)|urByteGlyphPacking|rm(?:attingError(?:M(?:inimum|aximum))?|FeedCharacter))|8FunctionKey|unction(?:ExpressionType|KeyMask)|3(?:1FunctionKey|2FunctionKey|3FunctionKey|4FunctionKey|5FunctionKey|FunctionKey|0FunctionKey)|9FunctionKey|4FunctionKey|P(?:RevertButton|S(?:ize(?:Title|Field)|etButton)|CurrentField|Preview(?:Button|Field))|l(?:oat(?:ingPointSamplesBitmapFormat|Type)|agsChanged(?:Mask)?)|axButton|5FunctionKey|6FunctionKey)|W(?:heelModeColorPanel|indow(?:s(?:NTOperatingSystem|CP125(?:1StringEncoding|2StringEncoding|3StringEncoding|4StringEncoding|0StringEncoding)|95(?:InterfaceStyle|OperatingSystem))|M(?:iniaturizeButton|ovedEventType)|Below|CloseButton|ToolbarButton|ZoomButton|Out|DocumentIconButton|ExposedEventType|Above)|orkspaceLaunch(?:NewInstance|InhibitingBackgroundOnly|Default|PreferringClassic|WithoutA(?:ctivation|ddingToRecents)|A(?:sync|nd(?:Hide(?:Others)?|Print)|llowingClassicStartup))|eek(?:day(?:CalendarUnit|OrdinalCalendarUnit)|CalendarUnit)|a(?:ntsBidiLevels|rningAlertStyle)|r(?:itingDirection(?:RightToLeft|Natural|LeftToRight)|apCalendarComponents))|L(?:i(?:stModeMatrix|ne(?:Moves(?:Right|Down|Up|Left)|B(?:order|reakBy(?:C(?:harWrapping|lipping)|Truncating(?:Middle|Head|Tail)|WordWrapping))|S(?:eparatorCharacter|weep(?:Right|Down|Up|Left))|ToBezierPathElement|DoesntMove|arSlider)|teralSearch|kePredicateOperatorType|ghterFontAction|braryDirectory)|ocalDomainMask|e(?:ssThan(?:Comparison|OrEqualTo(?:Comparison|PredicateOperatorType)|PredicateOperatorType)|ft(?:Mouse(?:D(?:own(?:Mask)?|ragged(?:Mask)?)|Up(?:Mask)?)|T(?:ext(?:Movement|Alignment)|ab(?:sBezelBorder|StopType))|ArrowFunctionKey))|a(?:yout(?:RightToLeft|NotDone|CantFit|OutOfGlyphs|Done|LeftToRight)|ndscapeOrientation)|ABColorSpaceModel)|A(?:sc(?:iiWithDoubleByteEUCGlyphPacking|endingPageOrder)|n(?:y(?:Type|PredicateModifier|EventMask)|choredSearch|imation(?:Blocking|Nonblocking(?:Threaded)?|E(?:ffect(?:DisappearingItemDefault|Poof)|ase(?:In(?:Out)?|Out))|Linear)|dPredicateType)|t(?:Bottom|tachmentCharacter|omicWrite|Top)|SCIIStringEncoding|d(?:obe(?:GB1CharacterCollection|CNS1CharacterCollection|Japan(?:1CharacterCollection|2CharacterCollection)|Korea1CharacterCollection)|dTraitFontAction|minApplicationDirectory)|uto(?:saveOperation|Pagination)|pp(?:lication(?:SupportDirectory|D(?:irectory|e(?:fined(?:Mask)?|legateReply(?:Success|Cancel|Failure)|activatedEventType))|ActivatedEventType)|KitDefined(?:Mask)?)|l(?:ternateKeyMask|pha(?:ShiftKeyMask|NonpremultipliedBitmapFormat|FirstBitmapFormat)|ert(?:SecondButtonReturn|ThirdButtonReturn|OtherReturn|DefaultReturn|ErrorReturn|FirstButtonReturn|AlternateReturn)|l(?:ScrollerParts|DomainsMask|PredicateModifier|LibrariesDirectory|ApplicationsDirectory))|rgument(?:sWrongScriptError|EvaluationScriptError)|bove(?:Bottom|Top)|WTEventType)))(?:\\b)"},
- {token: "support.function.C99.c", regex: s.cFunctions},
- {token: n.getKeywords(), regex: "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},
- {token: "punctuation.section.scope.begin.objc", regex: "\\[", next: "bracketed_content"},
- {token: "meta.function.objc", regex: "^(?:-|\\+)\\s*"}
- ], constant_NSString: [
- {token: "constant.character.escape.objc", regex: e},
- {token: "invalid.illegal.unknown-escape.objc", regex: "\\\\."},
- {token: "string", regex: '[^"\\\\]+'},
- {token: "punctuation.definition.string.end", regex: '"', next: "start"}
- ], protocol_list: [
- {token: "punctuation.section.scope.end.objc", regex: ">", next: "start"},
- {token: "support.other.protocol.objc", regex: "\bNS(?:GlyphStorage|M(?:utableCopying|enuItem)|C(?:hangeSpelling|o(?:ding|pying|lorPicking(?:Custom|Default)))|T(?:oolbarItemValidations|ext(?:Input|AttachmentCell))|I(?:nputServ(?:iceProvider|erMouseTracker)|gnoreMisspelledWords)|Obj(?:CTypeSerializationCallBack|ect)|D(?:ecimalNumberBehaviors|raggingInfo)|U(?:serInterfaceValidations|RL(?:HandleClient|DownloadDelegate|ProtocolClient|AuthenticationChallengeSender))|Validated(?:ToobarItem|UserInterfaceItem)|Locking)\b"}
- ], selectors: [
- {token: "support.function.any-method.name-of-parameter.objc", regex: "\\b(?:[a-zA-Z_:][\\w]*)+"},
- {token: "punctuation", regex: "\\)", next: "start"}
- ], bracketed_content: [
- {token: "punctuation.section.scope.end.objc", regex: "]", next: "start"},
- {token: ["support.function.any-method.objc"], regex: "(?:predicateWithFormat:| NSPredicate predicateWithFormat:)", next: "start"},
- {token: "support.function.any-method.objc", regex: "\\w+(?::|(?=]))", next: "start"}
- ], bracketed_strings: [
- {token: "punctuation.section.scope.end.objc", regex: "]", next: "start"},
- {token: "keyword.operator.logical.predicate.cocoa", regex: "\\b(?:AND|OR|NOT|IN)\\b"},
- {token: ["invalid.illegal.unknown-method.objc", "punctuation.separator.arguments.objc"], regex: "\\b(w+)(:)"},
- {regex: "\\b(?:ALL|ANY|SOME|NONE)\\b", token: "constant.language.predicate.cocoa"},
- {regex: "\\b(?:NULL|NIL|SELF|TRUE|YES|FALSE|NO|FIRST|LAST|SIZE)\\b", token: "constant.language.predicate.cocoa"},
- {regex: "\\b(?:MATCHES|CONTAINS|BEGINSWITH|ENDSWITH|BETWEEN)\\b", token: "keyword.operator.comparison.predicate.cocoa"},
- {regex: "\\bC(?:ASEINSENSITIVE|I)\\b", token: "keyword.other.modifier.predicate.cocoa"},
- {regex: "\\b(?:ANYKEY|SUBQUERY|CAST|TRUEPREDICATE|FALSEPREDICATE)\\b", token: "keyword.other.predicate.cocoa"},
- {regex: e, token: "constant.character.escape.objc"},
- {regex: "\\\\.", token: "invalid.illegal.unknown-escape.objc"},
- {token: "string", regex: '[^"\\\\]'},
- {token: "punctuation.definition.string.end.objc", regex: '"', next: "predicates"}
- ], comment: [
- {token: "comment", regex: ".*?\\*\\/", next: "start"},
- {token: "comment", regex: ".+"}
- ], methods: [
- {token: "meta.function.objc", regex: "(?=\\{|#)|;", next: "start"}
- ]};
- for (var u in r)this.$rules[u] ? this.$rules[u].push && this.$rules[u].push.apply(this.$rules[u], r[u]) : this.$rules[u] = r[u];
- this.$rules.bracketed_content = this.$rules.bracketed_content.concat(this.$rules.start, t), this.embedRules(i, "doc-", [i.getEndRule("start")])
- };
- r.inherits(u, o), t.ObjectiveCHighlightRules = u
-}), ace.define("ace/mode/doc_comment_highlight_rules", ["require", "exports", "module", "ace/lib/oop", "ace/mode/text_highlight_rules"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("./text_highlight_rules").TextHighlightRules, s = function () {
- this.$rules = {start: [
- {token: "comment.doc.tag", regex: "@[\\w\\d_]+"},
- {token: "comment.doc.tag", regex: "\\bTODO\\b"},
- {defaultToken: "comment.doc"}
- ]}
- };
- r.inherits(s, i), s.getStartRule = function (e) {
- return{token: "comment.doc", regex: "\\/\\*(?=\\*)", next: e}
- }, s.getEndRule = function (e) {
- return{token: "comment.doc", regex: "\\*\\/", next: e}
- }, t.DocCommentHighlightRules = s
-}), ace.define("ace/mode/c_cpp_highlight_rules", ["require", "exports", "module", "ace/lib/oop", "ace/mode/doc_comment_highlight_rules", "ace/mode/text_highlight_rules"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("./doc_comment_highlight_rules").DocCommentHighlightRules, s = e("./text_highlight_rules").TextHighlightRules, o = t.cFunctions = "\\s*\\bhypot(?:f|l)?|s(?:scanf|ystem|nprintf|ca(?:nf|lb(?:n(?:f|l)?|ln(?:f|l)?))|i(?:n(?:h(?:f|l)?|f|l)?|gn(?:al|bit))|tr(?:s(?:tr|pn)|nc(?:py|at|mp)|c(?:spn|hr|oll|py|at|mp)|to(?:imax|d|u(?:l(?:l)?|max)|k|f|l(?:d|l)?)|error|pbrk|ftime|len|rchr|xfrm)|printf|et(?:jmp|vbuf|locale|buf)|qrt(?:f|l)?|w(?:scanf|printf)|rand)|n(?:e(?:arbyint(?:f|l)?|xt(?:toward(?:f|l)?|after(?:f|l)?))|an(?:f|l)?)|c(?:s(?:in(?:h(?:f|l)?|f|l)?|qrt(?:f|l)?)|cos(?:h(?:f)?|f|l)?|imag(?:f|l)?|t(?:ime|an(?:h(?:f|l)?|f|l)?)|o(?:s(?:h(?:f|l)?|f|l)?|nj(?:f|l)?|pysign(?:f|l)?)|p(?:ow(?:f|l)?|roj(?:f|l)?)|e(?:il(?:f|l)?|xp(?:f|l)?)|l(?:o(?:ck|g(?:f|l)?)|earerr)|a(?:sin(?:h(?:f|l)?|f|l)?|cos(?:h(?:f|l)?|f|l)?|tan(?:h(?:f|l)?|f|l)?|lloc|rg(?:f|l)?|bs(?:f|l)?)|real(?:f|l)?|brt(?:f|l)?)|t(?:ime|o(?:upper|lower)|an(?:h(?:f|l)?|f|l)?|runc(?:f|l)?|gamma(?:f|l)?|mp(?:nam|file))|i(?:s(?:space|n(?:ormal|an)|cntrl|inf|digit|u(?:nordered|pper)|p(?:unct|rint)|finite|w(?:space|c(?:ntrl|type)|digit|upper|p(?:unct|rint)|lower|al(?:num|pha)|graph|xdigit|blank)|l(?:ower|ess(?:equal|greater)?)|al(?:num|pha)|gr(?:eater(?:equal)?|aph)|xdigit|blank)|logb(?:f|l)?|max(?:div|abs))|di(?:v|fftime)|_Exit|unget(?:c|wc)|p(?:ow(?:f|l)?|ut(?:s|c(?:har)?|wc(?:har)?)|error|rintf)|e(?:rf(?:c(?:f|l)?|f|l)?|x(?:it|p(?:2(?:f|l)?|f|l|m1(?:f|l)?)?))|v(?:s(?:scanf|nprintf|canf|printf|w(?:scanf|printf))|printf|f(?:scanf|printf|w(?:scanf|printf))|w(?:scanf|printf)|a_(?:start|copy|end|arg))|qsort|f(?:s(?:canf|e(?:tpos|ek))|close|tell|open|dim(?:f|l)?|p(?:classify|ut(?:s|c|w(?:s|c))|rintf)|e(?:holdexcept|set(?:e(?:nv|xceptflag)|round)|clearexcept|testexcept|of|updateenv|r(?:aiseexcept|ror)|get(?:e(?:nv|xceptflag)|round))|flush|w(?:scanf|ide|printf|rite)|loor(?:f|l)?|abs(?:f|l)?|get(?:s|c|pos|w(?:s|c))|re(?:open|e|ad|xp(?:f|l)?)|m(?:in(?:f|l)?|od(?:f|l)?|a(?:f|l|x(?:f|l)?)?))|l(?:d(?:iv|exp(?:f|l)?)|o(?:ngjmp|cal(?:time|econv)|g(?:1(?:p(?:f|l)?|0(?:f|l)?)|2(?:f|l)?|f|l|b(?:f|l)?)?)|abs|l(?:div|abs|r(?:int(?:f|l)?|ound(?:f|l)?))|r(?:int(?:f|l)?|ound(?:f|l)?)|gamma(?:f|l)?)|w(?:scanf|c(?:s(?:s(?:tr|pn)|nc(?:py|at|mp)|c(?:spn|hr|oll|py|at|mp)|to(?:imax|d|u(?:l(?:l)?|max)|k|f|l(?:d|l)?|mbs)|pbrk|ftime|len|r(?:chr|tombs)|xfrm)|to(?:b|mb)|rtomb)|printf|mem(?:set|c(?:hr|py|mp)|move))|a(?:s(?:sert|ctime|in(?:h(?:f|l)?|f|l)?)|cos(?:h(?:f|l)?|f|l)?|t(?:o(?:i|f|l(?:l)?)|exit|an(?:h(?:f|l)?|2(?:f|l)?|f|l)?)|b(?:s|ort))|g(?:et(?:s|c(?:har)?|env|wc(?:har)?)|mtime)|r(?:int(?:f|l)?|ound(?:f|l)?|e(?:name|alloc|wind|m(?:ove|quo(?:f|l)?|ainder(?:f|l)?))|a(?:nd|ise))|b(?:search|towc)|m(?:odf(?:f|l)?|em(?:set|c(?:hr|py|mp)|move)|ktime|alloc|b(?:s(?:init|towcs|rtowcs)|towc|len|r(?:towc|len)))\\b", u = function () {
- var e = "break|case|continue|default|do|else|for|goto|if|_Pragma|return|switch|while|catch|operator|try|throw|using", t = "asm|__asm__|auto|bool|_Bool|char|_Complex|double|enum|float|_Imaginary|int|long|short|signed|struct|typedef|union|unsigned|void|class|wchar_t|template", n = "const|extern|register|restrict|static|volatile|inline|private:|protected:|public:|friend|explicit|virtual|export|mutable|typename", r = "and|and_eq|bitand|bitor|compl|not|not_eq|or|or_eq|typeid|xor|xor_eqconst_cast|dynamic_cast|reinterpret_cast|static_cast|sizeof|namespace", s = "NULL|true|false|TRUE|FALSE", u = this.$keywords = this.createKeywordMapper({"keyword.control": e, "storage.type": t, "storage.modifier": n, "keyword.operator": r, "variable.language": "this", "constant.language": s}, "identifier"), a = "[a-zA-Z\\$_¡-￿][a-zA-Zd\\$_¡-￿]*\\b";
- this.$rules = {start: [
- {token: "comment", regex: "\\/\\/.*$"},
- i.getStartRule("doc-start"),
- {token: "comment", regex: "\\/\\*", next: "comment"},
- {token: "string", regex: '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},
- {token: "string", regex: '["].*\\\\$', next: "qqstring"},
- {token: "string", regex: "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},
- {token: "string", regex: "['].*\\\\$", next: "qstring"},
- {token: "constant.numeric", regex: "0[xX][0-9a-fA-F]+\\b"},
- {token: "constant.numeric", regex: "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},
- {token: "keyword", regex: "(?:#include|#import|#pragma|#line|#define|#undef|#if|#ifdef|#else|#elif|#ifndef)\\b", next: "directive"},
- {token: "keyword", regex: "(?:#endif)\\b"},
- {token: "support.function.C99.c", regex: o},
- {token: u, regex: "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},
- {token: "keyword.operator", regex: "!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|==|=|!=|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|new|delete|typeof|void)"},
- {token: "punctuation.operator", regex: "\\?|\\:|\\,|\\;|\\."},
- {token: "paren.lparen", regex: "[[({]"},
- {token: "paren.rparen", regex: "[\\])}]"},
- {token: "text", regex: "\\s+"}
- ], comment: [
- {token: "comment", regex: ".*?\\*\\/", next: "start"},
- {token: "comment", regex: ".+"}
- ], qqstring: [
- {token: "string", regex: '(?:(?:\\\\.)|(?:[^"\\\\]))*?"', next: "start"},
- {token: "string", regex: ".+"}
- ], qstring: [
- {token: "string", regex: "(?:(?:\\\\.)|(?:[^'\\\\]))*?'", next: "start"},
- {token: "string", regex: ".+"}
- ], directive: [
- {token: "constant.other.multiline", regex: /\\/},
- {token: "constant.other.multiline", regex: /.*\\/},
- {token: "constant.other", regex: "\\s*<.+?>", next: "start"},
- {token: "constant.other", regex: '\\s*["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]', next: "start"},
- {token: "constant.other", regex: "\\s*['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']", next: "start"},
- {token: "constant.other", regex: /[^\\\/]+/, next: "start"}
- ]}, this.embedRules(i, "doc-", [i.getEndRule("start")])
- };
- r.inherits(u, s), t.c_cppHighlightRules = u
-}), ace.define("ace/mode/folding/cstyle", ["require", "exports", "module", "ace/lib/oop", "ace/range", "ace/mode/folding/fold_mode"], function (e, t, n) {
- var r = e("../../lib/oop"), i = e("../../range").Range, s = e("./fold_mode").FoldMode, o = t.FoldMode = function () {
- };
- r.inherits(o, s), function () {
- this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/, this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/, this.getFoldWidgetRange = function (e, t, n) {
- var r = e.getLine(n), i = r.match(this.foldingStartMarker);
- if (i) {
- var s = i.index;
- return i[1] ? this.openingBracketBlock(e, i[1], n, s) : e.getCommentFoldRange(n, s + i[0].length, 1)
- }
- if (t !== "markbeginend")return;
- var i = r.match(this.foldingStopMarker);
- if (i) {
- var s = i.index + i[0].length;
- return i[1] ? this.closingBracketBlock(e, i[1], n, s) : e.getCommentFoldRange(n, s, -1)
- }
- }
- }.call(o.prototype)
-})
\ No newline at end of file
diff --git a/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/mode-ocaml.js b/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/mode-ocaml.js
deleted file mode 100644
index 115332c..0000000
--- a/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/mode-ocaml.js
+++ /dev/null
@@ -1,69 +0,0 @@
-ace.define("ace/mode/ocaml", ["require", "exports", "module", "ace/lib/oop", "ace/mode/text", "ace/tokenizer", "ace/mode/ocaml_highlight_rules", "ace/mode/matching_brace_outdent", "ace/range"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("./text").Mode, s = e("../tokenizer").Tokenizer, o = e("./ocaml_highlight_rules").OcamlHighlightRules, u = e("./matching_brace_outdent").MatchingBraceOutdent, a = e("../range").Range, f = function () {
- this.$tokenizer = new s((new o).getRules()), this.$outdent = new u
- };
- r.inherits(f, i);
- var l = /(?:[({[=:]|[-=]>|\b(?:else|try|with))\s*$/;
- (function () {
- this.toggleCommentLines = function (e, t, n, r) {
- var i, s, o = !0, u = /^\s*\(\*(.*)\*\)/;
- for (i = n; i <= r; i++)if (!u.test(t.getLine(i))) {
- o = !1;
- break
- }
- var f = new a(0, 0, 0, 0);
- for (i = n; i <= r; i++)s = t.getLine(i), f.start.row = i, f.end.row = i, f.end.column = s.length, t.replace(f, o ? s.match(u)[1] : "(*" + s + "*)")
- }, this.getNextLineIndent = function (e, t, n) {
- var r = this.$getIndent(t), i = this.$tokenizer.getLineTokens(t, e).tokens;
- return(!i.length || i[i.length - 1].type !== "comment") && e === "start" && l.test(t) && (r += n), r
- }, this.checkOutdent = function (e, t, n) {
- return this.$outdent.checkOutdent(t, n)
- }, this.autoOutdent = function (e, t, n) {
- this.$outdent.autoOutdent(t, n)
- }
- }).call(f.prototype), t.Mode = f
-}), ace.define("ace/mode/ocaml_highlight_rules", ["require", "exports", "module", "ace/lib/oop", "ace/mode/text_highlight_rules"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("./text_highlight_rules").TextHighlightRules, s = function () {
- var e = "and|as|assert|begin|class|constraint|do|done|downto|else|end|exception|external|for|fun|function|functor|if|in|include|inherit|initializer|lazy|let|match|method|module|mutable|new|object|of|open|or|private|rec|sig|struct|then|to|try|type|val|virtual|when|while|with", t = "true|false", n = "abs|abs_big_int|abs_float|abs_num|abstract_tag|accept|access|acos|add|add_available_units|add_big_int|add_buffer|add_channel|add_char|add_initializer|add_int_big_int|add_interfaces|add_num|add_string|add_substitute|add_substring|alarm|allocated_bytes|allow_only|allow_unsafe_modules|always|append|appname_get|appname_set|approx_num_exp|approx_num_fix|arg|argv|arith_status|array|array1_of_genarray|array2_of_genarray|array3_of_genarray|asin|asr|assoc|assq|at_exit|atan|atan2|auto_synchronize|background|basename|beginning_of_input|big_int_of_int|big_int_of_num|big_int_of_string|bind|bind_class|bind_tag|bits|bits_of_float|black|blit|blit_image|blue|bool|bool_of_string|bounded_full_split|bounded_split|bounded_split_delim|bprintf|break|broadcast|bscanf|button_down|c_layout|capitalize|cardinal|cardinal|catch|catch_break|ceil|ceiling_num|channel|char|char_of_int|chdir|check|check_suffix|chmod|choose|chop_extension|chop_suffix|chown|chown|chr|chroot|classify_float|clear|clear_available_units|clear_close_on_exec|clear_graph|clear_nonblock|clear_parser|close|close|closeTk|close_box|close_graph|close_in|close_in_noerr|close_out|close_out_noerr|close_process|close_process|close_process_full|close_process_in|close_process_out|close_subwindow|close_tag|close_tbox|closedir|closedir|closure_tag|code|combine|combine|combine|command|compact|compare|compare_big_int|compare_num|complex32|complex64|concat|conj|connect|contains|contains_from|contents|copy|cos|cosh|count|count|counters|create|create_alarm|create_image|create_matrix|create_matrix|create_matrix|create_object|create_object_and_run_initializers|create_object_opt|create_process|create_process|create_process_env|create_process_env|create_table|current|current_dir_name|current_point|current_x|current_y|curveto|custom_tag|cyan|data_size|decr|decr_num|default_available_units|delay|delete_alarm|descr_of_in_channel|descr_of_out_channel|destroy|diff|dim|dim1|dim2|dim3|dims|dirname|display_mode|div|div_big_int|div_num|double_array_tag|double_tag|draw_arc|draw_char|draw_circle|draw_ellipse|draw_image|draw_poly|draw_poly_line|draw_rect|draw_segments|draw_string|dummy_pos|dummy_table|dump_image|dup|dup2|elements|empty|end_of_input|environment|eprintf|epsilon_float|eq_big_int|eq_num|equal|err_formatter|error_message|escaped|establish_server|executable_name|execv|execve|execvp|execvpe|exists|exists2|exit|exp|failwith|fast_sort|fchmod|fchown|field|file|file_exists|fill|fill_arc|fill_circle|fill_ellipse|fill_poly|fill_rect|filter|final_tag|finalise|find|find_all|first_chars|firstkey|flatten|float|float32|float64|float_of_big_int|float_of_bits|float_of_int|float_of_num|float_of_string|floor|floor_num|flush|flush_all|flush_input|flush_str_formatter|fold|fold_left|fold_left2|fold_right|fold_right2|for_all|for_all2|force|force_newline|force_val|foreground|fork|format_of_string|formatter_of_buffer|formatter_of_out_channel|fortran_layout|forward_tag|fprintf|frexp|from|from_channel|from_file|from_file_bin|from_function|from_string|fscanf|fst|fstat|ftruncate|full_init|full_major|full_split|gcd_big_int|ge_big_int|ge_num|genarray_of_array1|genarray_of_array2|genarray_of_array3|get|get_all_formatter_output_functions|get_approx_printing|get_copy|get_ellipsis_text|get_error_when_null_denominator|get_floating_precision|get_formatter_output_functions|get_formatter_tag_functions|get_image|get_margin|get_mark_tags|get_max_boxes|get_max_indent|get_method|get_method_label|get_normalize_ratio|get_normalize_ratio_when_printing|get_print_tags|get_state|get_variable|getcwd|getegid|getegid|getenv|getenv|getenv|geteuid|geteuid|getgid|getgid|getgrgid|getgrgid|getgrnam|getgrnam|getgroups|gethostbyaddr|gethostbyname|gethostname|getitimer|getlogin|getpeername|getpid|getppid|getprotobyname|getprotobynumber|getpwnam|getpwuid|getservbyname|getservbyport|getsockname|getsockopt|getsockopt_float|getsockopt_int|getsockopt_optint|gettimeofday|getuid|global_replace|global_substitute|gmtime|green|grid|group_beginning|group_end|gt_big_int|gt_num|guard|handle_unix_error|hash|hash_param|hd|header_size|i|id|ignore|in_channel_length|in_channel_of_descr|incr|incr_num|index|index_from|inet_addr_any|inet_addr_of_string|infinity|infix_tag|init|init_class|input|input_binary_int|input_byte|input_char|input_line|input_value|int|int16_signed|int16_unsigned|int32|int64|int8_signed|int8_unsigned|int_of_big_int|int_of_char|int_of_float|int_of_num|int_of_string|integer_num|inter|interactive|inv|invalid_arg|is_block|is_empty|is_implicit|is_int|is_int_big_int|is_integer_num|is_relative|iter|iter2|iteri|join|junk|key_pressed|kill|kind|kprintf|kscanf|land|last_chars|layout|lazy_from_fun|lazy_from_val|lazy_is_val|lazy_tag|ldexp|le_big_int|le_num|length|lexeme|lexeme_char|lexeme_end|lexeme_end_p|lexeme_start|lexeme_start_p|lineto|link|list|listen|lnot|loadfile|loadfile_private|localtime|lock|lockf|log|log10|logand|lognot|logor|logxor|lor|lower_window|lowercase|lseek|lsl|lsr|lstat|lt_big_int|lt_num|lxor|magenta|magic|mainLoop|major|major_slice|make|make_formatter|make_image|make_lexer|make_matrix|make_self_init|map|map2|map_file|mapi|marshal|match_beginning|match_end|matched_group|matched_string|max|max_array_length|max_big_int|max_elt|max_float|max_int|max_num|max_string_length|mem|mem_assoc|mem_assq|memq|merge|min|min_big_int|min_elt|min_float|min_int|min_num|minor|minus_big_int|minus_num|minus_one|mkdir|mkfifo|mktime|mod|mod_big_int|mod_float|mod_num|modf|mouse_pos|moveto|mul|mult_big_int|mult_int_big_int|mult_num|nan|narrow|nat_of_num|nativeint|neg|neg_infinity|new_block|new_channel|new_method|new_variable|next|nextkey|nice|nice|no_scan_tag|norm|norm2|not|npeek|nth|nth_dim|num_digits_big_int|num_dims|num_of_big_int|num_of_int|num_of_nat|num_of_ratio|num_of_string|O|obj|object_tag|ocaml_version|of_array|of_channel|of_float|of_int|of_int32|of_list|of_nativeint|of_string|one|openTk|open_box|open_connection|open_graph|open_hbox|open_hovbox|open_hvbox|open_in|open_in_bin|open_in_gen|open_out|open_out_bin|open_out_gen|open_process|open_process_full|open_process_in|open_process_out|open_subwindow|open_tag|open_tbox|open_temp_file|open_vbox|opendbm|opendir|openfile|or|os_type|out_channel_length|out_channel_of_descr|output|output_binary_int|output_buffer|output_byte|output_char|output_string|output_value|over_max_boxes|pack|params|parent_dir_name|parse|parse_argv|partition|pause|peek|pipe|pixels|place|plot|plots|point_color|polar|poll|pop|pos_in|pos_out|pow|power_big_int_positive_big_int|power_big_int_positive_int|power_int_positive_big_int|power_int_positive_int|power_num|pp_close_box|pp_close_tag|pp_close_tbox|pp_force_newline|pp_get_all_formatter_output_functions|pp_get_ellipsis_text|pp_get_formatter_output_functions|pp_get_formatter_tag_functions|pp_get_margin|pp_get_mark_tags|pp_get_max_boxes|pp_get_max_indent|pp_get_print_tags|pp_open_box|pp_open_hbox|pp_open_hovbox|pp_open_hvbox|pp_open_tag|pp_open_tbox|pp_open_vbox|pp_over_max_boxes|pp_print_as|pp_print_bool|pp_print_break|pp_print_char|pp_print_cut|pp_print_float|pp_print_flush|pp_print_if_newline|pp_print_int|pp_print_newline|pp_print_space|pp_print_string|pp_print_tab|pp_print_tbreak|pp_set_all_formatter_output_functions|pp_set_ellipsis_text|pp_set_formatter_out_channel|pp_set_formatter_output_functions|pp_set_formatter_tag_functions|pp_set_margin|pp_set_mark_tags|pp_set_max_boxes|pp_set_max_indent|pp_set_print_tags|pp_set_tab|pp_set_tags|pred|pred_big_int|pred_num|prerr_char|prerr_endline|prerr_float|prerr_int|prerr_newline|prerr_string|print|print_as|print_bool|print_break|print_char|print_cut|print_endline|print_float|print_flush|print_if_newline|print_int|print_newline|print_space|print_stat|print_string|print_tab|print_tbreak|printf|prohibit|public_method_label|push|putenv|quo_num|quomod_big_int|quote|raise|raise_window|ratio_of_num|rcontains_from|read|read_float|read_int|read_key|read_line|readdir|readdir|readlink|really_input|receive|recv|recvfrom|red|ref|regexp|regexp_case_fold|regexp_string|regexp_string_case_fold|register|register_exception|rem|remember_mode|remove|remove_assoc|remove_assq|rename|replace|replace_first|replace_matched|repr|reset|reshape|reshape_1|reshape_2|reshape_3|rev|rev_append|rev_map|rev_map2|rewinddir|rgb|rhs_end|rhs_end_pos|rhs_start|rhs_start_pos|rindex|rindex_from|rlineto|rmdir|rmoveto|round_num|run_initializers|run_initializers_opt|scanf|search_backward|search_forward|seek_in|seek_out|select|self|self_init|send|sendto|set|set_all_formatter_output_functions|set_approx_printing|set_binary_mode_in|set_binary_mode_out|set_close_on_exec|set_close_on_exec|set_color|set_ellipsis_text|set_error_when_null_denominator|set_field|set_floating_precision|set_font|set_formatter_out_channel|set_formatter_output_functions|set_formatter_tag_functions|set_line_width|set_margin|set_mark_tags|set_max_boxes|set_max_indent|set_method|set_nonblock|set_nonblock|set_normalize_ratio|set_normalize_ratio_when_printing|set_print_tags|set_signal|set_state|set_tab|set_tag|set_tags|set_text_size|set_window_title|setgid|setgid|setitimer|setitimer|setsid|setsid|setsockopt|setsockopt|setsockopt_float|setsockopt_float|setsockopt_int|setsockopt_int|setsockopt_optint|setsockopt_optint|setuid|setuid|shift_left|shift_left|shift_left|shift_right|shift_right|shift_right|shift_right_logical|shift_right_logical|shift_right_logical|show_buckets|shutdown|shutdown|shutdown_connection|shutdown_connection|sigabrt|sigalrm|sigchld|sigcont|sigfpe|sighup|sigill|sigint|sigkill|sign_big_int|sign_num|signal|signal|sigpending|sigpending|sigpipe|sigprocmask|sigprocmask|sigprof|sigquit|sigsegv|sigstop|sigsuspend|sigsuspend|sigterm|sigtstp|sigttin|sigttou|sigusr1|sigusr2|sigvtalrm|sin|singleton|sinh|size|size|size_x|size_y|sleep|sleep|sleep|slice_left|slice_left|slice_left_1|slice_left_2|slice_right|slice_right|slice_right_1|slice_right_2|snd|socket|socket|socket|socketpair|socketpair|sort|sound|split|split_delim|sprintf|sprintf|sqrt|sqrt|sqrt_big_int|square_big_int|square_num|sscanf|stable_sort|stable_sort|stable_sort|stable_sort|stable_sort|stable_sort|stat|stat|stat|stat|stat|stats|stats|std_formatter|stdbuf|stderr|stderr|stderr|stdib|stdin|stdin|stdin|stdout|stdout|stdout|str_formatter|string|string_after|string_before|string_match|string_of_big_int|string_of_bool|string_of_float|string_of_format|string_of_inet_addr|string_of_inet_addr|string_of_int|string_of_num|string_partial_match|string_tag|sub|sub|sub_big_int|sub_left|sub_num|sub_right|subset|subset|substitute_first|substring|succ|succ|succ|succ|succ_big_int|succ_num|symbol_end|symbol_end_pos|symbol_start|symbol_start_pos|symlink|symlink|sync|synchronize|system|system|system|tag|take|tan|tanh|tcdrain|tcdrain|tcflow|tcflow|tcflush|tcflush|tcgetattr|tcgetattr|tcsendbreak|tcsendbreak|tcsetattr|tcsetattr|temp_file|text_size|time|time|time|timed_read|timed_write|times|times|tl|tl|tl|to_buffer|to_channel|to_float|to_hex|to_int|to_int32|to_list|to_list|to_list|to_nativeint|to_string|to_string|to_string|to_string|to_string|top|top|total_size|transfer|transp|truncate|truncate|truncate|truncate|truncate|truncate|try_lock|umask|umask|uncapitalize|uncapitalize|uncapitalize|union|union|unit_big_int|unlink|unlink|unlock|unmarshal|unsafe_blit|unsafe_fill|unsafe_get|unsafe_get|unsafe_set|unsafe_set|update|uppercase|uppercase|uppercase|uppercase|usage|utimes|utimes|wait|wait|wait|wait|wait_next_event|wait_pid|wait_read|wait_signal|wait_timed_read|wait_timed_write|wait_write|waitpid|white|widen|window_id|word_size|wrap|wrap_abort|write|yellow|yield|zero|zero_big_int|Arg|Arith_status|Array|Array1|Array2|Array3|ArrayLabels|Big_int|Bigarray|Buffer|Callback|CamlinternalOO|Char|Complex|Condition|Dbm|Digest|Dynlink|Event|Filename|Format|Gc|Genarray|Genlex|Graphics|GraphicsX11|Hashtbl|Int32|Int64|LargeFile|Lazy|Lexing|List|ListLabels|Make|Map|Marshal|MoreLabels|Mutex|Nativeint|Num|Obj|Oo|Parsing|Pervasives|Printexc|Printf|Queue|Random|Scanf|Scanning|Set|Sort|Stack|State|StdLabels|Str|Stream|String|StringLabels|Sys|Thread|ThreadUnix|Tk|Unix|UnixLabels|Weak", r = this.createKeywordMapper({"variable.language": "this", keyword: e, "constant.language": t, "support.function": n}, "identifier"), i = "(?:(?:[1-9]\\d*)|(?:0))", s = "(?:0[oO]?[0-7]+)", o = "(?:0[xX][\\dA-Fa-f]+)", u = "(?:0[bB][01]+)", a = "(?:" + i + "|" + s + "|" + o + "|" + u + ")", f = "(?:[eE][+-]?\\d+)", l = "(?:\\.\\d+)", c = "(?:\\d+)", h = "(?:(?:" + c + "?" + l + ")|(?:" + c + "\\.))", p = "(?:(?:" + h + "|" + c + ")" + f + ")", d = "(?:" + p + "|" + h + ")";
- this.$rules = {start: [
- {token: "comment", regex: "\\(\\*.*?\\*\\)\\s*?$"},
- {token: "comment", regex: "\\(\\*.*", next: "comment"},
- {token: "string", regex: '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},
- {token: "string", regex: "'.'"},
- {token: "string", regex: '"', next: "qstring"},
- {token: "constant.numeric", regex: "(?:" + d + "|\\d+)[jJ]\\b"},
- {token: "constant.numeric", regex: d},
- {token: "constant.numeric", regex: a + "\\b"},
- {token: r, regex: "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},
- {token: "keyword.operator", regex: "\\+\\.|\\-\\.|\\*\\.|\\/\\.|#|;;|\\+|\\-|\\*|\\*\\*\\/|\\/\\/|%|<<|>>|&|\\||\\^|~|<|>|<=|=>|==|!=|<>|<-|="},
- {token: "paren.lparen", regex: "[[({]"},
- {token: "paren.rparen", regex: "[\\])}]"},
- {token: "text", regex: "\\s+"}
- ], comment: [
- {token: "comment", regex: ".*?\\*\\)", next: "start"},
- {token: "comment", regex: ".+"}
- ], qstring: [
- {token: "string", regex: '"', next: "start"},
- {token: "string", regex: ".+"}
- ]}
- };
- r.inherits(s, i), t.OcamlHighlightRules = s
-}), ace.define("ace/mode/matching_brace_outdent", ["require", "exports", "module", "ace/range"], function (e, t, n) {
- var r = e("../range").Range, i = function () {
- };
- (function () {
- this.checkOutdent = function (e, t) {
- return/^\s+$/.test(e) ? /^\s*\}/.test(t) : !1
- }, this.autoOutdent = function (e, t) {
- var n = e.getLine(t), i = n.match(/^(\s*\})/);
- if (!i)return 0;
- var s = i[1].length, o = e.findMatchingBracket({row: t, column: s});
- if (!o || o.row == t)return 0;
- var u = this.$getIndent(e.getLine(o.row));
- e.replace(new r(t, 0, t, s - 1), u)
- }, this.$getIndent = function (e) {
- var t = e.match(/^(\s+)/);
- return t ? t[1] : ""
- }
- }).call(i.prototype), t.MatchingBraceOutdent = i
-})
\ No newline at end of file
diff --git a/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/mode-pascal.js b/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/mode-pascal.js
deleted file mode 100644
index df0d8d8..0000000
--- a/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/mode-pascal.js
+++ /dev/null
@@ -1,232 +0,0 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Distributed under the BSD license:
- *
- * Copyright (c) 2012, Ajax.org B.V.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the name of Ajax.org B.V. nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *
- * Contributor(s):
- *
- *
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/mode/pascal', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/pascal_highlight_rules', 'ace/mode/folding/coffee'], function (require, exports, module) {
-
-
- var oop = require("../lib/oop");
- var TextMode = require("./text").Mode;
- var Tokenizer = require("../tokenizer").Tokenizer;
- var PascalHighlightRules = require("./pascal_highlight_rules").PascalHighlightRules;
- var FoldMode = require("./folding/coffee").FoldMode;
-
- var Mode = function () {
- var highlighter = new PascalHighlightRules();
- this.foldingRules = new FoldMode();
- this.$tokenizer = new Tokenizer(highlighter.getRules());
- };
- oop.inherits(Mode, TextMode);
-
- (function () {
- }).call(Mode.prototype);
-
- exports.Mode = Mode;
-});
-
-define('ace/mode/pascal_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function (require, exports, module) {
-
-
- var oop = require("../lib/oop");
- var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-
- var PascalHighlightRules = function () {
-
- this.$rules = { start: [
- { caseInsensitive: true,
- token: 'keyword.control.pascal',
- regex: '\\b(?:(absolute|abstract|all|and|and_then|array|as|asm|attribute|begin|bindable|case|class|const|constructor|destructor|div|do|do|else|end|except|export|exports|external|far|file|finalization|finally|for|forward|goto|if|implementation|import|in|inherited|initialization|interface|interrupt|is|label|library|mod|module|name|near|nil|not|object|of|only|operator|or|or_else|otherwise|packed|pow|private|program|property|protected|public|published|qualified|record|repeat|resident|restricted|segment|set|shl|shr|then|to|try|type|unit|until|uses|value|var|view|virtual|while|with|xor))\\b' },
- { caseInsensitive: true,
- token: [ 'variable.pascal', "text",
- 'storage.type.prototype.pascal',
- 'entity.name.function.prototype.pascal' ],
- regex: '\\b(function|procedure)(\\s+)(\\w+)(\\.\\w+)?(?=(?:\\(.*?\\))?;\\s*(?:attribute|forward|external))' },
- { token: 'keyword.operator',
- regex: '[+\\-;,/*%]|:=|=' },
- { caseInsensitive: true,
- token: [ 'variable.pascal', "text",
- 'storage.type.function.pascal',
- 'entity.name.function.pascal' ],
- regex: '\\b(function|procedure)(\\s+)(\\w+)(\\.\\w+)?' },
- { token: 'constant.numeric.pascal',
- regex: '\\b((0(x|X)[0-9a-fA-F]*)|(([0-9]+\\.?[0-9]*)|(\\.[0-9]+))((e|E)(\\+|-)?[0-9]+)?)(L|l|UL|ul|u|U|F|f|ll|LL|ull|ULL)?\\b' },
- { token: 'punctuation.definition.comment.pascal',
- regex: '--',
- push: [
- { token: 'comment.line.double-dash.pascal.one',
- regex: '$',
- next: 'pop' },
- { defaultToken: 'comment.line.double-dash.pascal.one' }
- ] },
- { token: 'punctuation.definition.comment.pascal',
- regex: '//',
- push: [
- { token: 'comment.line.double-slash.pascal.two',
- regex: '$',
- next: 'pop' },
- { defaultToken: 'comment.line.double-slash.pascal.two' }
- ] },
- { token: 'punctuation.definition.comment.pascal',
- regex: '\\(\\*',
- push: [
- { token: 'punctuation.definition.comment.pascal',
- regex: '\\*\\)',
- next: 'pop' },
- { defaultToken: 'comment.block.pascal.one' }
- ] },
- { token: 'punctuation.definition.comment.pascal',
- regex: '\\{',
- push: [
- { token: 'punctuation.definition.comment.pascal',
- regex: '\\}',
- next: 'pop' },
- { defaultToken: 'comment.block.pascal.two' }
- ] },
- { token: 'punctuation.definition.string.begin.pascal',
- regex: '"',
- push: [
- { token: 'constant.character.escape.pascal', regex: '\\\\.' },
- { token: 'punctuation.definition.string.end.pascal',
- regex: '"',
- next: 'pop' },
- { defaultToken: 'string.quoted.double.pascal' }
- ],
- },
- { token: 'punctuation.definition.string.begin.pascal',
- regex: '\'',
- push: [
- { token: 'constant.character.escape.apostrophe.pascal',
- regex: '\'\'' },
- { token: 'punctuation.definition.string.end.pascal',
- regex: '\'',
- next: 'pop' },
- { defaultToken: 'string.quoted.single.pascal' }
- ] }
- ] }
-
- this.normalizeRules();
- };
-
- oop.inherits(PascalHighlightRules, TextHighlightRules);
-
- exports.PascalHighlightRules = PascalHighlightRules;
-});
-
-define('ace/mode/folding/coffee', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/folding/fold_mode', 'ace/range'], function (require, exports, module) {
-
-
- var oop = require("../../lib/oop");
- var BaseFoldMode = require("./fold_mode").FoldMode;
- var Range = require("../../range").Range;
-
- var FoldMode = exports.FoldMode = function () {
- };
- oop.inherits(FoldMode, BaseFoldMode);
-
- (function () {
-
- this.getFoldWidgetRange = function (session, foldStyle, row) {
- var range = this.indentationBlock(session, row);
- if (range)
- return range;
-
- var re = /\S/;
- var line = session.getLine(row);
- var startLevel = line.search(re);
- if (startLevel == -1 || line[startLevel] != "#")
- return;
-
- var startColumn = line.length;
- var maxRow = session.getLength();
- var startRow = row;
- var endRow = row;
-
- while (++row < maxRow) {
- line = session.getLine(row);
- var level = line.search(re);
-
- if (level == -1)
- continue;
-
- if (line[level] != "#")
- break;
-
- endRow = row;
- }
-
- if (endRow > startRow) {
- var endColumn = session.getLine(endRow).length;
- return new Range(startRow, startColumn, endRow, endColumn);
- }
- };
- this.getFoldWidget = function (session, foldStyle, row) {
- var line = session.getLine(row);
- var indent = line.search(/\S/);
- var next = session.getLine(row + 1);
- var prev = session.getLine(row - 1);
- var prevIndent = prev.search(/\S/);
- var nextIndent = next.search(/\S/);
-
- if (indent == -1) {
- session.foldWidgets[row - 1] = prevIndent != -1 && prevIndent < nextIndent ? "start" : "";
- return "";
- }
- if (prevIndent == -1) {
- if (indent == nextIndent && line[indent] == "#" && next[indent] == "#") {
- session.foldWidgets[row - 1] = "";
- session.foldWidgets[row + 1] = "";
- return "start";
- }
- } else if (prevIndent == indent && line[indent] == "#" && prev[indent] == "#") {
- if (session.getLine(row - 2).search(/\S/) == -1) {
- session.foldWidgets[row - 1] = "start";
- session.foldWidgets[row + 1] = "";
- return "";
- }
- }
-
- if (prevIndent != -1 && prevIndent < indent)
- session.foldWidgets[row - 1] = "start";
- else
- session.foldWidgets[row - 1] = "";
-
- if (indent < nextIndent)
- return "start";
- else
- return "";
- };
-
- }).call(FoldMode.prototype);
-
-});
diff --git a/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/mode-perl.js b/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/mode-perl.js
deleted file mode 100644
index 36193c5..0000000
--- a/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/mode-perl.js
+++ /dev/null
@@ -1,95 +0,0 @@
-ace.define("ace/mode/perl", ["require", "exports", "module", "ace/lib/oop", "ace/mode/text", "ace/tokenizer", "ace/mode/perl_highlight_rules", "ace/mode/matching_brace_outdent", "ace/range", "ace/mode/folding/cstyle"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("./text").Mode, s = e("../tokenizer").Tokenizer, o = e("./perl_highlight_rules").PerlHighlightRules, u = e("./matching_brace_outdent").MatchingBraceOutdent, a = e("../range").Range, f = e("./folding/cstyle").FoldMode, l = function () {
- this.$tokenizer = new s((new o).getRules()), this.$outdent = new u, this.foldingRules = new f
- };
- r.inherits(l, i), function () {
- this.toggleCommentLines = function (e, t, n, r) {
- var i = !0, s = /^(\s*)#/;
- for (var o = n; o <= r; o++)if (!s.test(t.getLine(o))) {
- i = !1;
- break
- }
- if (i) {
- var u = new a(0, 0, 0, 0);
- for (var o = n; o <= r; o++) {
- var f = t.getLine(o), l = f.match(s);
- u.start.row = o, u.end.row = o, u.end.column = l[0].length, t.replace(u, l[1])
- }
- } else t.indentRows(n, r, "#")
- }, this.getNextLineIndent = function (e, t, n) {
- var r = this.$getIndent(t), i = this.$tokenizer.getLineTokens(t, e), s = i.tokens;
- if (s.length && s[s.length - 1].type == "comment")return r;
- if (e == "start") {
- var o = t.match(/^.*[\{\(\[\:]\s*$/);
- o && (r += n)
- }
- return r
- }, this.checkOutdent = function (e, t, n) {
- return this.$outdent.checkOutdent(t, n)
- }, this.autoOutdent = function (e, t, n) {
- this.$outdent.autoOutdent(t, n)
- }
- }.call(l.prototype), t.Mode = l
-}), ace.define("ace/mode/perl_highlight_rules", ["require", "exports", "module", "ace/lib/oop", "ace/mode/text_highlight_rules"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("./text_highlight_rules").TextHighlightRules, s = function () {
- var e = "base|constant|continue|else|elsif|for|foreach|format|goto|if|last|local|my|next|no|package|parent|redo|require|scalar|sub|unless|until|while|use|vars", t = "ARGV|ENV|INC|SIG", n = "getprotobynumber|getprotobyname|getservbyname|gethostbyaddr|gethostbyname|getservbyport|getnetbyaddr|getnetbyname|getsockname|getpeername|setpriority|getprotoent|setprotoent|getpriority|endprotoent|getservent|setservent|endservent|sethostent|socketpair|getsockopt|gethostent|endhostent|setsockopt|setnetent|quotemeta|localtime|prototype|getnetent|endnetent|rewinddir|wantarray|getpwuid|closedir|getlogin|readlink|endgrent|getgrgid|getgrnam|shmwrite|shutdown|readline|endpwent|setgrent|readpipe|formline|truncate|dbmclose|syswrite|setpwent|getpwnam|getgrent|getpwent|ucfirst|sysread|setpgrp|shmread|sysseek|sysopen|telldir|defined|opendir|connect|lcfirst|getppid|binmode|syscall|sprintf|getpgrp|readdir|seekdir|waitpid|reverse|unshift|symlink|dbmopen|semget|msgrcv|rename|listen|chroot|msgsnd|shmctl|accept|unpack|exists|fileno|shmget|system|unlink|printf|gmtime|msgctl|semctl|values|rindex|substr|splice|length|msgget|select|socket|return|caller|delete|alarm|ioctl|index|undef|lstat|times|srand|chown|fcntl|close|write|umask|rmdir|study|sleep|chomp|untie|print|utime|mkdir|atan2|split|crypt|flock|chmod|BEGIN|bless|chdir|semop|shift|reset|link|stat|chop|grep|fork|dump|join|open|tell|pipe|exit|glob|warn|each|bind|sort|pack|eval|push|keys|getc|kill|seek|sqrt|send|wait|rand|tied|read|time|exec|recv|eof|chr|int|ord|exp|pos|pop|sin|log|abs|oct|hex|tie|cos|vec|END|ref|map|die|uc|lc|do", r = this.createKeywordMapper({keyword: e, "constant.language": t, "support.function": n}, "identifier");
- this.$rules = {start: [
- {token: "comment", regex: "#.*$"},
- {token: "string.regexp", regex: "[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/]\\w*\\s*(?=[).,;]|$)"},
- {token: "string", regex: '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},
- {token: "string", regex: '["].*\\\\$', next: "qqstring"},
- {token: "string", regex: "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},
- {token: "string", regex: "['].*\\\\$", next: "qstring"},
- {token: "constant.numeric", regex: "0x[0-9a-fA-F]+\\b"},
- {token: "constant.numeric", regex: "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},
- {token: r, regex: "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},
- {token: "keyword.operator", regex: "\\.\\.\\.|\\|\\|=|>>=|<<=|<=>|&&=|=>|!~|\\^=|&=|\\|=|\\.=|x=|%=|\\/=|\\*=|\\-=|\\+=|=~|\\*\\*|\\-\\-|\\.\\.|\\|\\||&&|\\+\\+|\\->|!=|==|>=|<=|>>|<<|,|=|\\?\\:|\\^|\\||x|%|\\/|\\*|<|&|\\\\|~|!|>|\\.|\\-|\\+|\\-C|\\-b|\\-S|\\-u|\\-t|\\-p|\\-l|\\-d|\\-f|\\-g|\\-s|\\-z|\\-k|\\-e|\\-O|\\-T|\\-B|\\-M|\\-A|\\-X|\\-W|\\-c|\\-R|\\-o|\\-x|\\-w|\\-r|\\b(?:and|cmp|eq|ge|gt|le|lt|ne|not|or|xor)"},
- {token: "lparen", regex: "[[({]"},
- {token: "rparen", regex: "[\\])}]"},
- {token: "text", regex: "\\s+"}
- ], qqstring: [
- {token: "string", regex: '(?:(?:\\\\.)|(?:[^"\\\\]))*?"', next: "start"},
- {token: "string", regex: ".+"}
- ], qstring: [
- {token: "string", regex: "(?:(?:\\\\.)|(?:[^'\\\\]))*?'", next: "start"},
- {token: "string", regex: ".+"}
- ]}
- };
- r.inherits(s, i), t.PerlHighlightRules = s
-}), ace.define("ace/mode/matching_brace_outdent", ["require", "exports", "module", "ace/range"], function (e, t, n) {
- var r = e("../range").Range, i = function () {
- };
- (function () {
- this.checkOutdent = function (e, t) {
- return/^\s+$/.test(e) ? /^\s*\}/.test(t) : !1
- }, this.autoOutdent = function (e, t) {
- var n = e.getLine(t), i = n.match(/^(\s*\})/);
- if (!i)return 0;
- var s = i[1].length, o = e.findMatchingBracket({row: t, column: s});
- if (!o || o.row == t)return 0;
- var u = this.$getIndent(e.getLine(o.row));
- e.replace(new r(t, 0, t, s - 1), u)
- }, this.$getIndent = function (e) {
- var t = e.match(/^(\s+)/);
- return t ? t[1] : ""
- }
- }).call(i.prototype), t.MatchingBraceOutdent = i
-}), ace.define("ace/mode/folding/cstyle", ["require", "exports", "module", "ace/lib/oop", "ace/range", "ace/mode/folding/fold_mode"], function (e, t, n) {
- var r = e("../../lib/oop"), i = e("../../range").Range, s = e("./fold_mode").FoldMode, o = t.FoldMode = function () {
- };
- r.inherits(o, s), function () {
- this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/, this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/, this.getFoldWidgetRange = function (e, t, n) {
- var r = e.getLine(n), i = r.match(this.foldingStartMarker);
- if (i) {
- var s = i.index;
- return i[1] ? this.openingBracketBlock(e, i[1], n, s) : e.getCommentFoldRange(n, s + i[0].length, 1)
- }
- if (t !== "markbeginend")return;
- var i = r.match(this.foldingStopMarker);
- if (i) {
- var s = i.index + i[0].length;
- return i[1] ? this.closingBracketBlock(e, i[1], n, s) : e.getCommentFoldRange(n, s, -1)
- }
- }
- }.call(o.prototype)
-})
\ No newline at end of file
diff --git a/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/mode-pgsql.js b/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/mode-pgsql.js
deleted file mode 100644
index d540c3e..0000000
--- a/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/mode-pgsql.js
+++ /dev/null
@@ -1,144 +0,0 @@
-ace.define("ace/mode/pgsql", ["require", "exports", "module", "ace/lib/oop", "ace/mode/text", "ace/tokenizer", "ace/mode/pgsql_highlight_rules", "ace/range"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("../mode/text").Mode, s = e("../tokenizer").Tokenizer, o = e("./pgsql_highlight_rules").PgsqlHighlightRules, u = e("../range").Range, a = function () {
- this.$tokenizer = new s((new o).getRules())
- };
- r.inherits(a, i), function () {
- this.toggleCommentLines = function (e, t, n, r) {
- var i = !0, s = /^(\s*)--/;
- for (var o = n; o <= r; o++)if (!s.test(t.getLine(o))) {
- i = !1;
- break
- }
- if (i) {
- var a = new u(0, 0, 0, 0);
- for (var o = n; o <= r; o++) {
- var f = t.getLine(o), l = f.match(s);
- a.start.row = o, a.end.row = o, a.end.column = l[0].length, t.replace(a, l[1])
- }
- } else t.indentRows(n, r, "--")
- }, this.getNextLineIndent = function (e, t, n) {
- return e == "start" || e == "keyword.statementEnd" ? "" : this.$getIndent(t)
- }
- }.call(a.prototype), t.Mode = a
-}), ace.define("ace/mode/pgsql_highlight_rules", ["require", "exports", "module", "ace/lib/oop", "ace/lib/lang", "ace/mode/doc_comment_highlight_rules", "ace/mode/text_highlight_rules", "ace/mode/perl_highlight_rules", "ace/mode/python_highlight_rules"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("../lib/lang"), s = e("./doc_comment_highlight_rules").DocCommentHighlightRules, o = e("./text_highlight_rules").TextHighlightRules, u = e("./perl_highlight_rules").PerlHighlightRules, a = e("./python_highlight_rules").PythonHighlightRules, f = function () {
- var e = "abort|absolute|abstime|access|aclitem|action|add|admin|after|aggregate|all|also|alter|always|analyse|analyze|and|any|anyarray|anyelement|anyenum|anynonarray|array|as|asc|assertion|assignment|asymmetric|at|attribute|authorization|backward|before|begin|between|bigint|binary|bit|bool|boolean|both|box|bpchar|by|bytea|cache|called|cascade|cascaded|case|cast|catalog|chain|char|character|characteristics|check|checkpoint|cid|cidr|circle|class|close|cluster|coalesce|collate|collation|column|comment|comments|commit|committed|concurrently|configuration|connection|constraint|constraints|content|continue|conversion|copy|cost|create|cross|cstring|csv|current|current_catalog|current_date|current_role|current_schema|current_time|current_timestamp|current_user|cursor|cycle|data|database|date|day|deallocate|dec|decimal|declare|default|defaults|deferrable|deferred|definer|delete|delimiter|delimiters|desc|dictionary|disable|discard|distinct|do|document|domain|double|drop|each|else|enable|encoding|encrypted|end|enum|escape|except|exclude|excluding|exclusive|execute|exists|explain|extension|external|extract|false|family|fdw_handler|fetch|first|float|float4|float8|following|for|force|foreign|forward|freeze|from|full|function|functions|global|grant|granted|greatest|group|gtsvector|handler|having|header|hold|hour|identity|if|ilike|immediate|immutable|implicit|in|including|increment|index|indexes|inet|inherit|inherits|initially|inline|inner|inout|input|insensitive|insert|instead|int|int2|int2vector|int4|int8|integer|internal|intersect|interval|into|invoker|is|isnull|isolation|join|key|label|language|language_handler|large|last|lc_collate|lc_ctype|leading|least|left|level|like|limit|line|listen|load|local|localtime|localtimestamp|location|lock|lseg|macaddr|mapping|match|maxvalue|minute|minvalue|mode|money|month|move|name|names|national|natural|nchar|next|no|none|not|nothing|notify|notnull|nowait|null|nullif|nulls|numeric|object|of|off|offset|oid|oids|oidvector|on|only|opaque|operator|option|options|or|order|out|outer|over|overlaps|overlay|owned|owner|parser|partial|partition|passing|password|path|pg_attribute|pg_auth_members|pg_authid|pg_class|pg_database|pg_node_tree|pg_proc|pg_type|placing|plans|point|polygon|position|preceding|precision|prepare|prepared|preserve|primary|prior|privileges|procedural|procedure|quote|range|read|real|reassign|recheck|record|recursive|ref|refcursor|references|regclass|regconfig|regdictionary|regoper|regoperator|regproc|regprocedure|regtype|reindex|relative|release|reltime|rename|repeatable|replace|replica|reset|restart|restrict|returning|returns|revoke|right|role|rollback|row|rows|rule|savepoint|schema|scroll|search|second|security|select|sequence|sequences|serializable|server|session|session_user|set|setof|share|show|similar|simple|smallint|smgr|some|stable|standalone|start|statement|statistics|stdin|stdout|storage|strict|strip|substring|symmetric|sysid|system|table|tables|tablespace|temp|template|temporary|text|then|tid|time|timestamp|timestamptz|timetz|tinterval|to|trailing|transaction|treat|trigger|trim|true|truncate|trusted|tsquery|tsvector|txid_snapshot|type|unbounded|uncommitted|unencrypted|union|unique|unknown|unlisten|unlogged|until|update|user|using|uuid|vacuum|valid|validate|validator|value|values|varbit|varchar|variadic|varying|verbose|version|view|void|volatile|when|where|whitespace|window|with|without|work|wrapper|write|xid|xml|xmlattributes|xmlconcat|xmlelement|xmlexists|xmlforest|xmlparse|xmlpi|xmlroot|xmlserialize|year|yes|zone", t = "RI_FKey_cascade_del|RI_FKey_cascade_upd|RI_FKey_check_ins|RI_FKey_check_upd|RI_FKey_noaction_del|RI_FKey_noaction_upd|RI_FKey_restrict_del|RI_FKey_restrict_upd|RI_FKey_setdefault_del|RI_FKey_setdefault_upd|RI_FKey_setnull_del|RI_FKey_setnull_upd|abbrev|abs|abstime|abstimeeq|abstimege|abstimegt|abstimein|abstimele|abstimelt|abstimene|abstimeout|abstimerecv|abstimesend|aclcontains|aclexplode|aclinsert|aclitemeq|aclitemin|aclitemout|aclremove|acos|age|any_in|any_out|anyarray_in|anyarray_out|anyarray_recv|anyarray_send|anyelement_in|anyelement_out|anyenum_in|anyenum_out|anynonarray_in|anynonarray_out|anytextcat|area|areajoinsel|areasel|array_agg|array_agg_finalfn|array_agg_transfn|array_append|array_cat|array_dims|array_eq|array_fill|array_ge|array_gt|array_in|array_larger|array_le|array_length|array_lower|array_lt|array_ndims|array_ne|array_out|array_prepend|array_recv|array_send|array_smaller|array_to_string|array_upper|arraycontained|arraycontains|arrayoverlap|ascii|ascii_to_mic|ascii_to_utf8|asin|atan|atan2|avg|big5_to_euc_tw|big5_to_mic|big5_to_utf8|bit_and|bit_in|bit_length|bit_or|bit_out|bit_recv|bit_send|bitand|bitcat|bitcmp|biteq|bitge|bitgt|bitle|bitlt|bitne|bitnot|bitor|bitshiftleft|bitshiftright|bittypmodin|bittypmodout|bitxor|bool|bool_and|bool_or|booland_statefunc|booleq|boolge|boolgt|boolin|boolle|boollt|boolne|boolor_statefunc|boolout|boolrecv|boolsend|box|box_above|box_above_eq|box_add|box_below|box_below_eq|box_center|box_contain|box_contain_pt|box_contained|box_distance|box_div|box_eq|box_ge|box_gt|box_in|box_intersect|box_le|box_left|box_lt|box_mul|box_out|box_overabove|box_overbelow|box_overlap|box_overleft|box_overright|box_recv|box_right|box_same|box_send|box_sub|bpchar_larger|bpchar_pattern_ge|bpchar_pattern_gt|bpchar_pattern_le|bpchar_pattern_lt|bpchar_smaller|bpcharcmp|bpchareq|bpcharge|bpchargt|bpchariclike|bpcharicnlike|bpcharicregexeq|bpcharicregexne|bpcharin|bpcharle|bpcharlike|bpcharlt|bpcharne|bpcharnlike|bpcharout|bpcharrecv|bpcharregexeq|bpcharregexne|bpcharsend|bpchartypmodin|bpchartypmodout|broadcast|btabstimecmp|btarraycmp|btbeginscan|btboolcmp|btbpchar_pattern_cmp|btbuild|btbuildempty|btbulkdelete|btcharcmp|btcostestimate|btendscan|btfloat48cmp|btfloat4cmp|btfloat84cmp|btfloat8cmp|btgetbitmap|btgettuple|btinsert|btint24cmp|btint28cmp|btint2cmp|btint42cmp|btint48cmp|btint4cmp|btint82cmp|btint84cmp|btint8cmp|btmarkpos|btnamecmp|btoidcmp|btoidvectorcmp|btoptions|btrecordcmp|btreltimecmp|btrescan|btrestrpos|btrim|bttext_pattern_cmp|bttextcmp|bttidcmp|bttintervalcmp|btvacuumcleanup|byteacat|byteacmp|byteaeq|byteage|byteagt|byteain|byteale|bytealike|bytealt|byteane|byteanlike|byteaout|bytearecv|byteasend|cash_cmp|cash_div_cash|cash_div_flt4|cash_div_flt8|cash_div_int2|cash_div_int4|cash_eq|cash_ge|cash_gt|cash_in|cash_le|cash_lt|cash_mi|cash_mul_flt4|cash_mul_flt8|cash_mul_int2|cash_mul_int4|cash_ne|cash_out|cash_pl|cash_recv|cash_send|cash_words|cashlarger|cashsmaller|cbrt|ceil|ceiling|center|char|char_length|character_length|chareq|charge|chargt|charin|charle|charlt|charne|charout|charrecv|charsend|chr|cideq|cidin|cidout|cidr|cidr_in|cidr_out|cidr_recv|cidr_send|cidrecv|cidsend|circle|circle_above|circle_add_pt|circle_below|circle_center|circle_contain|circle_contain_pt|circle_contained|circle_distance|circle_div_pt|circle_eq|circle_ge|circle_gt|circle_in|circle_le|circle_left|circle_lt|circle_mul_pt|circle_ne|circle_out|circle_overabove|circle_overbelow|circle_overlap|circle_overleft|circle_overright|circle_recv|circle_right|circle_same|circle_send|circle_sub_pt|clock_timestamp|close_lb|close_ls|close_lseg|close_pb|close_pl|close_ps|close_sb|close_sl|col_description|concat|concat_ws|contjoinsel|contsel|convert|convert_from|convert_to|corr|cos|cot|count|covar_pop|covar_samp|cstring_in|cstring_out|cstring_recv|cstring_send|cume_dist|current_database|current_query|current_schema|current_schemas|current_setting|current_user|currtid|currtid2|currval|cursor_to_xml|cursor_to_xmlschema|database_to_xml|database_to_xml_and_xmlschema|database_to_xmlschema|date|date_cmp|date_cmp_timestamp|date_cmp_timestamptz|date_eq|date_eq_timestamp|date_eq_timestamptz|date_ge|date_ge_timestamp|date_ge_timestamptz|date_gt|date_gt_timestamp|date_gt_timestamptz|date_in|date_larger|date_le|date_le_timestamp|date_le_timestamptz|date_lt|date_lt_timestamp|date_lt_timestamptz|date_mi|date_mi_interval|date_mii|date_ne|date_ne_timestamp|date_ne_timestamptz|date_out|date_part|date_pl_interval|date_pli|date_recv|date_send|date_smaller|date_trunc|datetime_pl|datetimetz_pl|dcbrt|decode|degrees|dense_rank|dexp|diagonal|diameter|dispell_init|dispell_lexize|dist_cpoly|dist_lb|dist_pb|dist_pc|dist_pl|dist_ppath|dist_ps|dist_sb|dist_sl|div|dlog1|dlog10|domain_in|domain_recv|dpow|dround|dsimple_init|dsimple_lexize|dsnowball_init|dsnowball_lexize|dsqrt|dsynonym_init|dsynonym_lexize|dtrunc|encode|enum_cmp|enum_eq|enum_first|enum_ge|enum_gt|enum_in|enum_larger|enum_last|enum_le|enum_lt|enum_ne|enum_out|enum_range|enum_recv|enum_send|enum_smaller|eqjoinsel|eqsel|euc_cn_to_mic|euc_cn_to_utf8|euc_jis_2004_to_shift_jis_2004|euc_jis_2004_to_utf8|euc_jp_to_mic|euc_jp_to_sjis|euc_jp_to_utf8|euc_kr_to_mic|euc_kr_to_utf8|euc_tw_to_big5|euc_tw_to_mic|euc_tw_to_utf8|every|exp|factorial|family|fdw_handler_in|fdw_handler_out|first_value|float4|float48div|float48eq|float48ge|float48gt|float48le|float48lt|float48mi|float48mul|float48ne|float48pl|float4_accum|float4abs|float4div|float4eq|float4ge|float4gt|float4in|float4larger|float4le|float4lt|float4mi|float4mul|float4ne|float4out|float4pl|float4recv|float4send|float4smaller|float4um|float4up|float8|float84div|float84eq|float84ge|float84gt|float84le|float84lt|float84mi|float84mul|float84ne|float84pl|float8_accum|float8_avg|float8_corr|float8_covar_pop|float8_covar_samp|float8_regr_accum|float8_regr_avgx|float8_regr_avgy|float8_regr_intercept|float8_regr_r2|float8_regr_slope|float8_regr_sxx|float8_regr_sxy|float8_regr_syy|float8_stddev_pop|float8_stddev_samp|float8_var_pop|float8_var_samp|float8abs|float8div|float8eq|float8ge|float8gt|float8in|float8larger|float8le|float8lt|float8mi|float8mul|float8ne|float8out|float8pl|float8recv|float8send|float8smaller|float8um|float8up|floor|flt4_mul_cash|flt8_mul_cash|fmgr_c_validator|fmgr_internal_validator|fmgr_sql_validator|format|format_type|gb18030_to_utf8|gbk_to_utf8|generate_series|generate_subscripts|get_bit|get_byte|get_current_ts_config|getdatabaseencoding|getpgusername|gin_cmp_prefix|gin_cmp_tslexeme|gin_extract_tsquery|gin_extract_tsvector|gin_tsquery_consistent|ginarrayconsistent|ginarrayextract|ginbeginscan|ginbuild|ginbuildempty|ginbulkdelete|gincostestimate|ginendscan|gingetbitmap|gininsert|ginmarkpos|ginoptions|ginqueryarrayextract|ginrescan|ginrestrpos|ginvacuumcleanup|gist_box_compress|gist_box_consistent|gist_box_decompress|gist_box_penalty|gist_box_picksplit|gist_box_same|gist_box_union|gist_circle_compress|gist_circle_consistent|gist_point_compress|gist_point_consistent|gist_point_distance|gist_poly_compress|gist_poly_consistent|gistbeginscan|gistbuild|gistbuildempty|gistbulkdelete|gistcostestimate|gistendscan|gistgetbitmap|gistgettuple|gistinsert|gistmarkpos|gistoptions|gistrescan|gistrestrpos|gistvacuumcleanup|gtsquery_compress|gtsquery_consistent|gtsquery_decompress|gtsquery_penalty|gtsquery_picksplit|gtsquery_same|gtsquery_union|gtsvector_compress|gtsvector_consistent|gtsvector_decompress|gtsvector_penalty|gtsvector_picksplit|gtsvector_same|gtsvector_union|gtsvectorin|gtsvectorout|has_any_column_privilege|has_column_privilege|has_database_privilege|has_foreign_data_wrapper_privilege|has_function_privilege|has_language_privilege|has_schema_privilege|has_sequence_privilege|has_server_privilege|has_table_privilege|has_tablespace_privilege|hash_aclitem|hash_array|hash_numeric|hashbeginscan|hashbpchar|hashbuild|hashbuildempty|hashbulkdelete|hashchar|hashcostestimate|hashendscan|hashenum|hashfloat4|hashfloat8|hashgetbitmap|hashgettuple|hashinet|hashinsert|hashint2|hashint2vector|hashint4|hashint8|hashmacaddr|hashmarkpos|hashname|hashoid|hashoidvector|hashoptions|hashrescan|hashrestrpos|hashtext|hashvacuumcleanup|hashvarlena|height|host|hostmask|iclikejoinsel|iclikesel|icnlikejoinsel|icnlikesel|icregexeqjoinsel|icregexeqsel|icregexnejoinsel|icregexnesel|inet_client_addr|inet_client_port|inet_in|inet_out|inet_recv|inet_send|inet_server_addr|inet_server_port|inetand|inetmi|inetmi_int8|inetnot|inetor|inetpl|initcap|int2|int24div|int24eq|int24ge|int24gt|int24le|int24lt|int24mi|int24mul|int24ne|int24pl|int28div|int28eq|int28ge|int28gt|int28le|int28lt|int28mi|int28mul|int28ne|int28pl|int2_accum|int2_avg_accum|int2_mul_cash|int2_sum|int2abs|int2and|int2div|int2eq|int2ge|int2gt|int2in|int2larger|int2le|int2lt|int2mi|int2mod|int2mul|int2ne|int2not|int2or|int2out|int2pl|int2recv|int2send|int2shl|int2shr|int2smaller|int2um|int2up|int2vectoreq|int2vectorin|int2vectorout|int2vectorrecv|int2vectorsend|int2xor|int4|int42div|int42eq|int42ge|int42gt|int42le|int42lt|int42mi|int42mul|int42ne|int42pl|int48div|int48eq|int48ge|int48gt|int48le|int48lt|int48mi|int48mul|int48ne|int48pl|int4_accum|int4_avg_accum|int4_mul_cash|int4_sum|int4abs|int4and|int4div|int4eq|int4ge|int4gt|int4in|int4inc|int4larger|int4le|int4lt|int4mi|int4mod|int4mul|int4ne|int4not|int4or|int4out|int4pl|int4recv|int4send|int4shl|int4shr|int4smaller|int4um|int4up|int4xor|int8|int82div|int82eq|int82ge|int82gt|int82le|int82lt|int82mi|int82mul|int82ne|int82pl|int84div|int84eq|int84ge|int84gt|int84le|int84lt|int84mi|int84mul|int84ne|int84pl|int8_accum|int8_avg|int8_avg_accum|int8_sum|int8abs|int8and|int8div|int8eq|int8ge|int8gt|int8in|int8inc|int8inc_any|int8inc_float8_float8|int8larger|int8le|int8lt|int8mi|int8mod|int8mul|int8ne|int8not|int8or|int8out|int8pl|int8pl_inet|int8recv|int8send|int8shl|int8shr|int8smaller|int8um|int8up|int8xor|integer_pl_date|inter_lb|inter_sb|inter_sl|internal_in|internal_out|interval_accum|interval_avg|interval_cmp|interval_div|interval_eq|interval_ge|interval_gt|interval_hash|interval_in|interval_larger|interval_le|interval_lt|interval_mi|interval_mul|interval_ne|interval_out|interval_pl|interval_pl_date|interval_pl_time|interval_pl_timestamp|interval_pl_timestamptz|interval_pl_timetz|interval_recv|interval_send|interval_smaller|interval_um|intervaltypmodin|intervaltypmodout|intinterval|isclosed|isfinite|ishorizontal|iso8859_1_to_utf8|iso8859_to_utf8|iso_to_koi8r|iso_to_mic|iso_to_win1251|iso_to_win866|isopen|isparallel|isperp|isvertical|johab_to_utf8|justify_days|justify_hours|justify_interval|koi8r_to_iso|koi8r_to_mic|koi8r_to_utf8|koi8r_to_win1251|koi8r_to_win866|koi8u_to_utf8|lag|language_handler_in|language_handler_out|last_value|lastval|latin1_to_mic|latin2_to_mic|latin2_to_win1250|latin3_to_mic|latin4_to_mic|lead|left|length|like|like_escape|likejoinsel|likesel|line|line_distance|line_eq|line_horizontal|line_in|line_interpt|line_intersect|line_out|line_parallel|line_perp|line_recv|line_send|line_vertical|ln|lo_close|lo_creat|lo_create|lo_export|lo_import|lo_lseek|lo_open|lo_tell|lo_truncate|lo_unlink|log|loread|lower|lowrite|lpad|lseg|lseg_center|lseg_distance|lseg_eq|lseg_ge|lseg_gt|lseg_horizontal|lseg_in|lseg_interpt|lseg_intersect|lseg_le|lseg_length|lseg_lt|lseg_ne|lseg_out|lseg_parallel|lseg_perp|lseg_recv|lseg_send|lseg_vertical|ltrim|macaddr_cmp|macaddr_eq|macaddr_ge|macaddr_gt|macaddr_in|macaddr_le|macaddr_lt|macaddr_ne|macaddr_out|macaddr_recv|macaddr_send|makeaclitem|masklen|max|md5|mic_to_ascii|mic_to_big5|mic_to_euc_cn|mic_to_euc_jp|mic_to_euc_kr|mic_to_euc_tw|mic_to_iso|mic_to_koi8r|mic_to_latin1|mic_to_latin2|mic_to_latin3|mic_to_latin4|mic_to_sjis|mic_to_win1250|mic_to_win1251|mic_to_win866|min|mktinterval|mod|money|mul_d_interval|name|nameeq|namege|namegt|nameiclike|nameicnlike|nameicregexeq|nameicregexne|namein|namele|namelike|namelt|namene|namenlike|nameout|namerecv|nameregexeq|nameregexne|namesend|neqjoinsel|neqsel|netmask|network|network_cmp|network_eq|network_ge|network_gt|network_le|network_lt|network_ne|network_sub|network_subeq|network_sup|network_supeq|nextval|nlikejoinsel|nlikesel|notlike|now|npoints|nth_value|ntile|numeric_abs|numeric_accum|numeric_add|numeric_avg|numeric_avg_accum|numeric_cmp|numeric_div|numeric_div_trunc|numeric_eq|numeric_exp|numeric_fac|numeric_ge|numeric_gt|numeric_in|numeric_inc|numeric_larger|numeric_le|numeric_ln|numeric_log|numeric_lt|numeric_mod|numeric_mul|numeric_ne|numeric_out|numeric_power|numeric_recv|numeric_send|numeric_smaller|numeric_sqrt|numeric_stddev_pop|numeric_stddev_samp|numeric_sub|numeric_uminus|numeric_uplus|numeric_var_pop|numeric_var_samp|numerictypmodin|numerictypmodout|numnode|obj_description|octet_length|oid|oideq|oidge|oidgt|oidin|oidlarger|oidle|oidlt|oidne|oidout|oidrecv|oidsend|oidsmaller|oidvectoreq|oidvectorge|oidvectorgt|oidvectorin|oidvectorle|oidvectorlt|oidvectorne|oidvectorout|oidvectorrecv|oidvectorsend|oidvectortypes|on_pb|on_pl|on_ppath|on_ps|on_sb|on_sl|opaque_in|opaque_out|overlaps|overlay|path|path_add|path_add_pt|path_center|path_contain_pt|path_distance|path_div_pt|path_in|path_inter|path_length|path_mul_pt|path_n_eq|path_n_ge|path_n_gt|path_n_le|path_n_lt|path_npoints|path_out|path_recv|path_send|path_sub_pt|pclose|percent_rank|pg_advisory_lock|pg_advisory_lock_shared|pg_advisory_unlock|pg_advisory_unlock_all|pg_advisory_unlock_shared|pg_advisory_xact_lock|pg_advisory_xact_lock_shared|pg_available_extension_versions|pg_available_extensions|pg_backend_pid|pg_cancel_backend|pg_char_to_encoding|pg_client_encoding|pg_collation_is_visible|pg_column_size|pg_conf_load_time|pg_conversion_is_visible|pg_create_restore_point|pg_current_xlog_insert_location|pg_current_xlog_location|pg_cursor|pg_database_size|pg_describe_object|pg_encoding_max_length|pg_encoding_to_char|pg_extension_config_dump|pg_extension_update_paths|pg_function_is_visible|pg_get_constraintdef|pg_get_expr|pg_get_function_arguments|pg_get_function_identity_arguments|pg_get_function_result|pg_get_functiondef|pg_get_indexdef|pg_get_keywords|pg_get_ruledef|pg_get_serial_sequence|pg_get_triggerdef|pg_get_userbyid|pg_get_viewdef|pg_has_role|pg_indexes_size|pg_is_in_recovery|pg_is_other_temp_schema|pg_is_xlog_replay_paused|pg_last_xact_replay_timestamp|pg_last_xlog_receive_location|pg_last_xlog_replay_location|pg_listening_channels|pg_lock_status|pg_ls_dir|pg_my_temp_schema|pg_node_tree_in|pg_node_tree_out|pg_node_tree_recv|pg_node_tree_send|pg_notify|pg_opclass_is_visible|pg_operator_is_visible|pg_options_to_table|pg_postmaster_start_time|pg_prepared_statement|pg_prepared_xact|pg_read_binary_file|pg_read_file|pg_relation_filenode|pg_relation_filepath|pg_relation_size|pg_reload_conf|pg_rotate_logfile|pg_sequence_parameters|pg_show_all_settings|pg_size_pretty|pg_sleep|pg_start_backup|pg_stat_clear_snapshot|pg_stat_file|pg_stat_get_activity|pg_stat_get_analyze_count|pg_stat_get_autoanalyze_count|pg_stat_get_autovacuum_count|pg_stat_get_backend_activity|pg_stat_get_backend_activity_start|pg_stat_get_backend_client_addr|pg_stat_get_backend_client_port|pg_stat_get_backend_dbid|pg_stat_get_backend_idset|pg_stat_get_backend_pid|pg_stat_get_backend_start|pg_stat_get_backend_userid|pg_stat_get_backend_waiting|pg_stat_get_backend_xact_start|pg_stat_get_bgwriter_buf_written_checkpoints|pg_stat_get_bgwriter_buf_written_clean|pg_stat_get_bgwriter_maxwritten_clean|pg_stat_get_bgwriter_requested_checkpoints|pg_stat_get_bgwriter_stat_reset_time|pg_stat_get_bgwriter_timed_checkpoints|pg_stat_get_blocks_fetched|pg_stat_get_blocks_hit|pg_stat_get_buf_alloc|pg_stat_get_buf_fsync_backend|pg_stat_get_buf_written_backend|pg_stat_get_db_blocks_fetched|pg_stat_get_db_blocks_hit|pg_stat_get_db_conflict_all|pg_stat_get_db_conflict_bufferpin|pg_stat_get_db_conflict_lock|pg_stat_get_db_conflict_snapshot|pg_stat_get_db_conflict_startup_deadlock|pg_stat_get_db_conflict_tablespace|pg_stat_get_db_numbackends|pg_stat_get_db_stat_reset_time|pg_stat_get_db_tuples_deleted|pg_stat_get_db_tuples_fetched|pg_stat_get_db_tuples_inserted|pg_stat_get_db_tuples_returned|pg_stat_get_db_tuples_updated|pg_stat_get_db_xact_commit|pg_stat_get_db_xact_rollback|pg_stat_get_dead_tuples|pg_stat_get_function_calls|pg_stat_get_function_self_time|pg_stat_get_function_time|pg_stat_get_last_analyze_time|pg_stat_get_last_autoanalyze_time|pg_stat_get_last_autovacuum_time|pg_stat_get_last_vacuum_time|pg_stat_get_live_tuples|pg_stat_get_numscans|pg_stat_get_tuples_deleted|pg_stat_get_tuples_fetched|pg_stat_get_tuples_hot_updated|pg_stat_get_tuples_inserted|pg_stat_get_tuples_returned|pg_stat_get_tuples_updated|pg_stat_get_vacuum_count|pg_stat_get_wal_senders|pg_stat_get_xact_blocks_fetched|pg_stat_get_xact_blocks_hit|pg_stat_get_xact_function_calls|pg_stat_get_xact_function_self_time|pg_stat_get_xact_function_time|pg_stat_get_xact_numscans|pg_stat_get_xact_tuples_deleted|pg_stat_get_xact_tuples_fetched|pg_stat_get_xact_tuples_hot_updated|pg_stat_get_xact_tuples_inserted|pg_stat_get_xact_tuples_returned|pg_stat_get_xact_tuples_updated|pg_stat_reset|pg_stat_reset_shared|pg_stat_reset_single_function_counters|pg_stat_reset_single_table_counters|pg_stop_backup|pg_switch_xlog|pg_table_is_visible|pg_table_size|pg_tablespace_databases|pg_tablespace_size|pg_terminate_backend|pg_timezone_abbrevs|pg_timezone_names|pg_total_relation_size|pg_try_advisory_lock|pg_try_advisory_lock_shared|pg_try_advisory_xact_lock|pg_try_advisory_xact_lock_shared|pg_ts_config_is_visible|pg_ts_dict_is_visible|pg_ts_parser_is_visible|pg_ts_template_is_visible|pg_type_is_visible|pg_typeof|pg_xlog_replay_pause|pg_xlog_replay_resume|pg_xlogfile_name|pg_xlogfile_name_offset|pi|plainto_tsquery|plpgsql_call_handler|plpgsql_inline_handler|plpgsql_validator|point|point_above|point_add|point_below|point_distance|point_div|point_eq|point_horiz|point_in|point_left|point_mul|point_ne|point_out|point_recv|point_right|point_send|point_sub|point_vert|poly_above|poly_below|poly_center|poly_contain|poly_contain_pt|poly_contained|poly_distance|poly_in|poly_left|poly_npoints|poly_out|poly_overabove|poly_overbelow|poly_overlap|poly_overleft|poly_overright|poly_recv|poly_right|poly_same|poly_send|polygon|popen|position|positionjoinsel|positionsel|postgresql_fdw_validator|pow|power|prsd_end|prsd_headline|prsd_lextype|prsd_nexttoken|prsd_start|pt_contained_circle|pt_contained_poly|query_to_xml|query_to_xml_and_xmlschema|query_to_xmlschema|querytree|quote_ident|quote_literal|quote_nullable|radians|radius|random|rank|record_eq|record_ge|record_gt|record_in|record_le|record_lt|record_ne|record_out|record_recv|record_send|regclass|regclassin|regclassout|regclassrecv|regclasssend|regconfigin|regconfigout|regconfigrecv|regconfigsend|regdictionaryin|regdictionaryout|regdictionaryrecv|regdictionarysend|regexeqjoinsel|regexeqsel|regexnejoinsel|regexnesel|regexp_matches|regexp_replace|regexp_split_to_array|regexp_split_to_table|regoperatorin|regoperatorout|regoperatorrecv|regoperatorsend|regoperin|regoperout|regoperrecv|regopersend|regprocedurein|regprocedureout|regprocedurerecv|regproceduresend|regprocin|regprocout|regprocrecv|regprocsend|regr_avgx|regr_avgy|regr_count|regr_intercept|regr_r2|regr_slope|regr_sxx|regr_sxy|regr_syy|regtypein|regtypeout|regtyperecv|regtypesend|reltime|reltimeeq|reltimege|reltimegt|reltimein|reltimele|reltimelt|reltimene|reltimeout|reltimerecv|reltimesend|repeat|replace|reverse|right|round|row_number|rpad|rtrim|scalargtjoinsel|scalargtsel|scalarltjoinsel|scalarltsel|schema_to_xml|schema_to_xml_and_xmlschema|schema_to_xmlschema|session_user|set_bit|set_byte|set_config|set_masklen|setseed|setval|setweight|shell_in|shell_out|shift_jis_2004_to_euc_jis_2004|shift_jis_2004_to_utf8|shobj_description|sign|similar_escape|sin|sjis_to_euc_jp|sjis_to_mic|sjis_to_utf8|slope|smgreq|smgrin|smgrne|smgrout|split_part|sqrt|statement_timestamp|stddev|stddev_pop|stddev_samp|string_agg|string_agg_finalfn|string_agg_transfn|string_to_array|strip|strpos|substr|substring|sum|suppress_redundant_updates_trigger|table_to_xml|table_to_xml_and_xmlschema|table_to_xmlschema|tan|text|text_ge|text_gt|text_larger|text_le|text_lt|text_pattern_ge|text_pattern_gt|text_pattern_le|text_pattern_lt|text_smaller|textanycat|textcat|texteq|texticlike|texticnlike|texticregexeq|texticregexne|textin|textlen|textlike|textne|textnlike|textout|textrecv|textregexeq|textregexne|textsend|thesaurus_init|thesaurus_lexize|tideq|tidge|tidgt|tidin|tidlarger|tidle|tidlt|tidne|tidout|tidrecv|tidsend|tidsmaller|time_cmp|time_eq|time_ge|time_gt|time_hash|time_in|time_larger|time_le|time_lt|time_mi_interval|time_mi_time|time_ne|time_out|time_pl_interval|time_recv|time_send|time_smaller|timedate_pl|timemi|timenow|timeofday|timepl|timestamp_cmp|timestamp_cmp_date|timestamp_cmp_timestamptz|timestamp_eq|timestamp_eq_date|timestamp_eq_timestamptz|timestamp_ge|timestamp_ge_date|timestamp_ge_timestamptz|timestamp_gt|timestamp_gt_date|timestamp_gt_timestamptz|timestamp_hash|timestamp_in|timestamp_larger|timestamp_le|timestamp_le_date|timestamp_le_timestamptz|timestamp_lt|timestamp_lt_date|timestamp_lt_timestamptz|timestamp_mi|timestamp_mi_interval|timestamp_ne|timestamp_ne_date|timestamp_ne_timestamptz|timestamp_out|timestamp_pl_interval|timestamp_recv|timestamp_send|timestamp_smaller|timestamptypmodin|timestamptypmodout|timestamptz_cmp|timestamptz_cmp_date|timestamptz_cmp_timestamp|timestamptz_eq|timestamptz_eq_date|timestamptz_eq_timestamp|timestamptz_ge|timestamptz_ge_date|timestamptz_ge_timestamp|timestamptz_gt|timestamptz_gt_date|timestamptz_gt_timestamp|timestamptz_in|timestamptz_larger|timestamptz_le|timestamptz_le_date|timestamptz_le_timestamp|timestamptz_lt|timestamptz_lt_date|timestamptz_lt_timestamp|timestamptz_mi|timestamptz_mi_interval|timestamptz_ne|timestamptz_ne_date|timestamptz_ne_timestamp|timestamptz_out|timestamptz_pl_interval|timestamptz_recv|timestamptz_send|timestamptz_smaller|timestamptztypmodin|timestamptztypmodout|timetypmodin|timetypmodout|timetz_cmp|timetz_eq|timetz_ge|timetz_gt|timetz_hash|timetz_in|timetz_larger|timetz_le|timetz_lt|timetz_mi_interval|timetz_ne|timetz_out|timetz_pl_interval|timetz_recv|timetz_send|timetz_smaller|timetzdate_pl|timetztypmodin|timetztypmodout|timezone|tinterval|tintervalct|tintervalend|tintervaleq|tintervalge|tintervalgt|tintervalin|tintervalle|tintervalleneq|tintervallenge|tintervallengt|tintervallenle|tintervallenlt|tintervallenne|tintervallt|tintervalne|tintervalout|tintervalov|tintervalrecv|tintervalrel|tintervalsame|tintervalsend|tintervalstart|to_ascii|to_char|to_date|to_hex|to_number|to_timestamp|to_tsquery|to_tsvector|transaction_timestamp|translate|trigger_in|trigger_out|trunc|ts_debug|ts_headline|ts_lexize|ts_match_qv|ts_match_tq|ts_match_tt|ts_match_vq|ts_parse|ts_rank|ts_rank_cd|ts_rewrite|ts_stat|ts_token_type|ts_typanalyze|tsmatchjoinsel|tsmatchsel|tsq_mcontained|tsq_mcontains|tsquery_and|tsquery_cmp|tsquery_eq|tsquery_ge|tsquery_gt|tsquery_le|tsquery_lt|tsquery_ne|tsquery_not|tsquery_or|tsqueryin|tsqueryout|tsqueryrecv|tsquerysend|tsvector_cmp|tsvector_concat|tsvector_eq|tsvector_ge|tsvector_gt|tsvector_le|tsvector_lt|tsvector_ne|tsvector_update_trigger|tsvector_update_trigger_column|tsvectorin|tsvectorout|tsvectorrecv|tsvectorsend|txid_current|txid_current_snapshot|txid_snapshot_in|txid_snapshot_out|txid_snapshot_recv|txid_snapshot_send|txid_snapshot_xip|txid_snapshot_xmax|txid_snapshot_xmin|txid_visible_in_snapshot|uhc_to_utf8|unique_key_recheck|unknownin|unknownout|unknownrecv|unknownsend|unnest|upper|utf8_to_ascii|utf8_to_big5|utf8_to_euc_cn|utf8_to_euc_jis_2004|utf8_to_euc_jp|utf8_to_euc_kr|utf8_to_euc_tw|utf8_to_gb18030|utf8_to_gbk|utf8_to_iso8859|utf8_to_iso8859_1|utf8_to_johab|utf8_to_koi8r|utf8_to_koi8u|utf8_to_shift_jis_2004|utf8_to_sjis|utf8_to_uhc|utf8_to_win|uuid_cmp|uuid_eq|uuid_ge|uuid_gt|uuid_hash|uuid_in|uuid_le|uuid_lt|uuid_ne|uuid_out|uuid_recv|uuid_send|var_pop|var_samp|varbit_in|varbit_out|varbit_recv|varbit_send|varbitcmp|varbiteq|varbitge|varbitgt|varbitle|varbitlt|varbitne|varbittypmodin|varbittypmodout|varcharin|varcharout|varcharrecv|varcharsend|varchartypmodin|varchartypmodout|variance|version|void_in|void_out|void_recv|void_send|width|width_bucket|win1250_to_latin2|win1250_to_mic|win1251_to_iso|win1251_to_koi8r|win1251_to_mic|win1251_to_win866|win866_to_iso|win866_to_koi8r|win866_to_mic|win866_to_win1251|win_to_utf8|xideq|xideqint4|xidin|xidout|xidrecv|xidsend|xml|xml_in|xml_is_well_formed|xml_is_well_formed_content|xml_is_well_formed_document|xml_out|xml_recv|xml_send|xmlagg|xmlcomment|xmlconcat2|xmlexists|xmlvalidate|xpath|xpath_exists", n = this.createKeywordMapper({"support.function": t, keyword: e}, "identifier", !0), r = [
- {token: "string", regex: "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},
- {token: "variable.language", regex: '".*?"'},
- {token: "constant.numeric", regex: "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},
- {token: n, regex: "[a-zA-Z_][a-zA-Z0-9_$]*\\b"},
- {token: "keyword.operator", regex: "!|!!|!~|!~\\*|!~~|!~~\\*|#|##|#<|#<=|#<>|#=|#>|#>=|%|\\&|\\&\\&|\\&<|\\&<\\||\\&>|\\*|\\+|\\-|/|<|<#>|<\\->|<<|<<=|<<\\||<=|<>|<\\?>|<@|<\\^|=|>|>=|>>|>>=|>\\^|\\?#|\\?\\-|\\?\\-\\||\\?\\||\\?\\|\\||@|@\\-@|@>|@@|@@@|\\^|\\||\\|\\&>|\\|/|\\|>>|\\|\\||\\|\\|/|~|~\\*|~<=~|~<~|~=|~>=~|~>~|~~|~~\\*"},
- {token: "paren.lparen", regex: "[\\(]"},
- {token: "paren.rparen", regex: "[\\)]"},
- {token: "text", regex: "\\s+"}
- ];
- this.$rules = {start: [
- {token: "comment", regex: "--.*$"},
- s.getStartRule("doc-start"),
- {token: "comment", regex: "\\/\\*", next: "comment"},
- {token: "keyword.statementBegin", regex: "^[a-zA-Z]+", next: "statement"},
- {token: "support.buildin", regex: "^\\\\[\\S]+.*$"}
- ], statement: [
- {token: "comment", regex: "--.*$"},
- {token: "comment", regex: "\\/\\*", next: "commentStatement"},
- {token: "statementEnd", regex: ";", next: "start"},
- {token: "string", regex: "\\$perl\\$", next: "perl-start"},
- {token: "string", regex: "\\$python\\$", next: "python-start"},
- {token: "string", regex: "\\$[\\w_0-9]*\\$$", next: "dollarSql"},
- {token: "string", regex: "\\$[\\w_0-9]*\\$", next: "dollarStatementString"}
- ].concat(r), dollarSql: [
- {token: "comment", regex: "--.*$"},
- {token: "comment", regex: "\\/\\*", next: "commentDollarSql"},
- {token: "string", regex: "^\\$[\\w_0-9]*\\$", next: "statement"},
- {token: "string", regex: "\\$[\\w_0-9]*\\$", next: "dollarSqlString"}
- ].concat(r), comment: [
- {token: "comment", regex: ".*?\\*\\/", next: "start"},
- {token: "comment", regex: ".+"}
- ], commentStatement: [
- {token: "comment", regex: ".*?\\*\\/", next: "statement"},
- {token: "comment", regex: ".+"}
- ], commentDollarSql: [
- {token: "comment", regex: ".*?\\*\\/", next: "dollarSql"},
- {token: "comment", regex: ".+"}
- ], dollarStatementString: [
- {token: "string", regex: ".*?\\$[\\w_0-9]*\\$", next: "statement"},
- {token: "string", regex: ".+"}
- ], dollarSqlString: [
- {token: "string", regex: ".*?\\$[\\w_0-9]*\\$", next: "dollarSql"},
- {token: "string", regex: ".+"}
- ]}, this.embedRules(s, "doc-", [s.getEndRule("start")]), this.embedRules(u, "perl-", [
- {token: "string", regex: "\\$perl\\$", next: "statement"}
- ]), this.embedRules(a, "python-", [
- {token: "string", regex: "\\$python\\$", next: "statement"}
- ])
- };
- r.inherits(f, o), t.PgsqlHighlightRules = f
-}), ace.define("ace/mode/doc_comment_highlight_rules", ["require", "exports", "module", "ace/lib/oop", "ace/mode/text_highlight_rules"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("./text_highlight_rules").TextHighlightRules, s = function () {
- this.$rules = {start: [
- {token: "comment.doc.tag", regex: "@[\\w\\d_]+"},
- {token: "comment.doc.tag", regex: "\\bTODO\\b"},
- {defaultToken: "comment.doc"}
- ]}
- };
- r.inherits(s, i), s.getStartRule = function (e) {
- return{token: "comment.doc", regex: "\\/\\*(?=\\*)", next: e}
- }, s.getEndRule = function (e) {
- return{token: "comment.doc", regex: "\\*\\/", next: e}
- }, t.DocCommentHighlightRules = s
-}), ace.define("ace/mode/perl_highlight_rules", ["require", "exports", "module", "ace/lib/oop", "ace/mode/text_highlight_rules"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("./text_highlight_rules").TextHighlightRules, s = function () {
- var e = "base|constant|continue|else|elsif|for|foreach|format|goto|if|last|local|my|next|no|package|parent|redo|require|scalar|sub|unless|until|while|use|vars", t = "ARGV|ENV|INC|SIG", n = "getprotobynumber|getprotobyname|getservbyname|gethostbyaddr|gethostbyname|getservbyport|getnetbyaddr|getnetbyname|getsockname|getpeername|setpriority|getprotoent|setprotoent|getpriority|endprotoent|getservent|setservent|endservent|sethostent|socketpair|getsockopt|gethostent|endhostent|setsockopt|setnetent|quotemeta|localtime|prototype|getnetent|endnetent|rewinddir|wantarray|getpwuid|closedir|getlogin|readlink|endgrent|getgrgid|getgrnam|shmwrite|shutdown|readline|endpwent|setgrent|readpipe|formline|truncate|dbmclose|syswrite|setpwent|getpwnam|getgrent|getpwent|ucfirst|sysread|setpgrp|shmread|sysseek|sysopen|telldir|defined|opendir|connect|lcfirst|getppid|binmode|syscall|sprintf|getpgrp|readdir|seekdir|waitpid|reverse|unshift|symlink|dbmopen|semget|msgrcv|rename|listen|chroot|msgsnd|shmctl|accept|unpack|exists|fileno|shmget|system|unlink|printf|gmtime|msgctl|semctl|values|rindex|substr|splice|length|msgget|select|socket|return|caller|delete|alarm|ioctl|index|undef|lstat|times|srand|chown|fcntl|close|write|umask|rmdir|study|sleep|chomp|untie|print|utime|mkdir|atan2|split|crypt|flock|chmod|BEGIN|bless|chdir|semop|shift|reset|link|stat|chop|grep|fork|dump|join|open|tell|pipe|exit|glob|warn|each|bind|sort|pack|eval|push|keys|getc|kill|seek|sqrt|send|wait|rand|tied|read|time|exec|recv|eof|chr|int|ord|exp|pos|pop|sin|log|abs|oct|hex|tie|cos|vec|END|ref|map|die|uc|lc|do", r = this.createKeywordMapper({keyword: e, "constant.language": t, "support.function": n}, "identifier");
- this.$rules = {start: [
- {token: "comment", regex: "#.*$"},
- {token: "string.regexp", regex: "[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/]\\w*\\s*(?=[).,;]|$)"},
- {token: "string", regex: '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},
- {token: "string", regex: '["].*\\\\$', next: "qqstring"},
- {token: "string", regex: "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},
- {token: "string", regex: "['].*\\\\$", next: "qstring"},
- {token: "constant.numeric", regex: "0x[0-9a-fA-F]+\\b"},
- {token: "constant.numeric", regex: "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},
- {token: r, regex: "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},
- {token: "keyword.operator", regex: "\\.\\.\\.|\\|\\|=|>>=|<<=|<=>|&&=|=>|!~|\\^=|&=|\\|=|\\.=|x=|%=|\\/=|\\*=|\\-=|\\+=|=~|\\*\\*|\\-\\-|\\.\\.|\\|\\||&&|\\+\\+|\\->|!=|==|>=|<=|>>|<<|,|=|\\?\\:|\\^|\\||x|%|\\/|\\*|<|&|\\\\|~|!|>|\\.|\\-|\\+|\\-C|\\-b|\\-S|\\-u|\\-t|\\-p|\\-l|\\-d|\\-f|\\-g|\\-s|\\-z|\\-k|\\-e|\\-O|\\-T|\\-B|\\-M|\\-A|\\-X|\\-W|\\-c|\\-R|\\-o|\\-x|\\-w|\\-r|\\b(?:and|cmp|eq|ge|gt|le|lt|ne|not|or|xor)"},
- {token: "lparen", regex: "[[({]"},
- {token: "rparen", regex: "[\\])}]"},
- {token: "text", regex: "\\s+"}
- ], qqstring: [
- {token: "string", regex: '(?:(?:\\\\.)|(?:[^"\\\\]))*?"', next: "start"},
- {token: "string", regex: ".+"}
- ], qstring: [
- {token: "string", regex: "(?:(?:\\\\.)|(?:[^'\\\\]))*?'", next: "start"},
- {token: "string", regex: ".+"}
- ]}
- };
- r.inherits(s, i), t.PerlHighlightRules = s
-}), ace.define("ace/mode/python_highlight_rules", ["require", "exports", "module", "ace/lib/oop", "ace/mode/text_highlight_rules"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("./text_highlight_rules").TextHighlightRules, s = function () {
- var e = "and|as|assert|break|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|not|or|pass|print|raise|return|try|while|with|yield", t = "True|False|None|NotImplemented|Ellipsis|__debug__", n = "abs|divmod|input|open|staticmethod|all|enumerate|int|ord|str|any|eval|isinstance|pow|sum|basestring|execfile|issubclass|print|super|binfile|iter|property|tuple|bool|filter|len|range|type|bytearray|float|list|raw_input|unichr|callable|format|locals|reduce|unicode|chr|frozenset|long|reload|vars|classmethod|getattr|map|repr|xrange|cmp|globals|max|reversed|zip|compile|hasattr|memoryview|round|__import__|complex|hash|min|set|apply|delattr|help|next|setattr|buffer|dict|hex|object|slice|coerce|dir|id|oct|sorted|intern", r = this.createKeywordMapper({"invalid.deprecated": "debugger", "support.function": n, "constant.language": t, keyword: e}, "identifier"), i = "(?:r|u|ur|R|U|UR|Ur|uR)?", s = "(?:(?:[1-9]\\d*)|(?:0))", o = "(?:0[oO]?[0-7]+)", u = "(?:0[xX][\\dA-Fa-f]+)", a = "(?:0[bB][01]+)", f = "(?:" + s + "|" + o + "|" + u + "|" + a + ")", l = "(?:[eE][+-]?\\d+)", c = "(?:\\.\\d+)", h = "(?:\\d+)", p = "(?:(?:" + h + "?" + c + ")|(?:" + h + "\\.))", d = "(?:(?:" + p + "|" + h + ")" + l + ")", v = "(?:" + d + "|" + p + ")";
- this.$rules = {start: [
- {token: "comment", regex: "#.*$"},
- {token: "string", regex: i + '"{3}(?:[^\\\\]|\\\\.)*?"{3}'},
- {token: "string", regex: i + '"{3}.*$', next: "qqstring"},
- {token: "string", regex: i + '"(?:[^\\\\]|\\\\.)*?"'},
- {token: "string", regex: i + "'{3}(?:[^\\\\]|\\\\.)*?'{3}"},
- {token: "string", regex: i + "'{3}.*$", next: "qstring"},
- {token: "string", regex: i + "'(?:[^\\\\]|\\\\.)*?'"},
- {token: "constant.numeric", regex: "(?:" + v + "|\\d+)[jJ]\\b"},
- {token: "constant.numeric", regex: v},
- {token: "constant.numeric", regex: f + "[lL]\\b"},
- {token: "constant.numeric", regex: f + "\\b"},
- {token: r, regex: "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},
- {token: "keyword.operator", regex: "\\+|\\-|\\*|\\*\\*|\\/|\\/\\/|%|<<|>>|&|\\||\\^|~|<|>|<=|=>|==|!=|<>|="},
- {token: "paren.lparen", regex: "[\\[\\(\\{]"},
- {token: "paren.rparen", regex: "[\\]\\)\\}]"},
- {token: "text", regex: "\\s+"}
- ], qqstring: [
- {token: "string", regex: '(?:[^\\\\]|\\\\.)*?"{3}', next: "start"},
- {token: "string", regex: ".+"}
- ], qstring: [
- {token: "string", regex: "(?:[^\\\\]|\\\\.)*?'{3}", next: "start"},
- {token: "string", regex: ".+"}
- ]}
- };
- r.inherits(s, i), t.PythonHighlightRules = s
-})
\ No newline at end of file
diff --git a/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/mode-php.js b/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/mode-php.js
deleted file mode 100644
index 5634dd8..0000000
--- a/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/mode-php.js
+++ /dev/null
@@ -1,437 +0,0 @@
-ace.define("ace/mode/php", ["require", "exports", "module", "ace/lib/oop", "ace/mode/text", "ace/tokenizer", "ace/mode/php_highlight_rules", "ace/mode/matching_brace_outdent", "ace/range", "ace/worker/worker_client", "ace/mode/behaviour/cstyle", "ace/mode/folding/cstyle", "ace/unicode"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("./text").Mode, s = e("../tokenizer").Tokenizer, o = e("./php_highlight_rules").PhpHighlightRules, u = e("./php_highlight_rules").PhpLangHighlightRules, a = e("./matching_brace_outdent").MatchingBraceOutdent, f = e("../range").Range, l = e("../worker/worker_client").WorkerClient, c = e("./behaviour/cstyle").CstyleBehaviour, h = e("./folding/cstyle").FoldMode, p = e("../unicode"), d = function (e) {
- var t = e && e.inline, n = t ? u : o;
- this.$tokenizer = new s((new n).getRules()), this.$outdent = new a, this.$behaviour = new c, this.foldingRules = new h
- };
- r.inherits(d, i), function () {
- this.tokenRe = new RegExp("^[" + p.packages.L + p.packages.Mn + p.packages.Mc + p.packages.Nd + p.packages.Pc + "_]+", "g"), this.nonTokenRe = new RegExp("^(?:[^" + p.packages.L + p.packages.Mn + p.packages.Mc + p.packages.Nd + p.packages.Pc + "_]|s])+", "g"), this.toggleCommentLines = function (e, t, n, r) {
- var i = !0, s = /^(\s*)#/;
- for (var o = n; o <= r; o++)if (!s.test(t.getLine(o))) {
- i = !1;
- break
- }
- if (i) {
- var u = new f(0, 0, 0, 0);
- for (var o = n; o <= r; o++) {
- var a = t.getLine(o), l = a.match(s);
- u.start.row = o, u.end.row = o, u.end.column = l[0].length, t.replace(u, l[1])
- }
- } else t.indentRows(n, r, "#")
- }, this.getNextLineIndent = function (e, t, n) {
- var r = this.$getIndent(t), i = this.$tokenizer.getLineTokens(t, e), s = i.tokens, o = i.state;
- if (s.length && s[s.length - 1].type == "comment")return r;
- if (e == "php-start") {
- var u = t.match(/^.*[\{\(\[\:]\s*$/);
- u && (r += n)
- } else if (e == "php-doc-start") {
- if (o != "php-doc-start")return"";
- var u = t.match(/^\s*(\/?)\*/);
- u && (u[1] && (r += " "), r += "* ")
- }
- return r
- }, this.checkOutdent = function (e, t, n) {
- return this.$outdent.checkOutdent(t, n)
- }, this.autoOutdent = function (e, t, n) {
- this.$outdent.autoOutdent(t, n)
- }, this.createWorker = function (e) {
- var t = new l(["ace"], "ace/mode/php_worker", "PhpWorker");
- return t.attachToDocument(e.getDocument()), t.on("error", function (t) {
- e.setAnnotations(t.data)
- }), t.on("ok", function () {
- e.clearAnnotations()
- }), t
- }
- }.call(d.prototype), t.Mode = d
-}), ace.define("ace/mode/php_highlight_rules", ["require", "exports", "module", "ace/lib/oop", "ace/lib/lang", "ace/mode/doc_comment_highlight_rules", "ace/mode/text_highlight_rules", "ace/mode/html_highlight_rules"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("../lib/lang"), s = e("./doc_comment_highlight_rules").DocCommentHighlightRules, o = e("./text_highlight_rules").TextHighlightRules, u = e("./html_highlight_rules").HtmlHighlightRules, a = function () {
- var e = s, t = i.arrayToMap("abs|acos|acosh|addcslashes|addslashes|aggregate|aggregate_info|aggregate_methods|aggregate_methods_by_list|aggregate_methods_by_regexp|aggregate_properties|aggregate_properties_by_list|aggregate_properties_by_regexp|aggregation_info|amqpconnection|amqpexchange|amqpqueue|apache_child_terminate|apache_get_modules|apache_get_version|apache_getenv|apache_lookup_uri|apache_note|apache_request_headers|apache_reset_timeout|apache_response_headers|apache_setenv|apc_add|apc_bin_dump|apc_bin_dumpfile|apc_bin_load|apc_bin_loadfile|apc_cache_info|apc_cas|apc_clear_cache|apc_compile_file|apc_dec|apc_define_constants|apc_delete|apc_delete_file|apc_exists|apc_fetch|apc_inc|apc_load_constants|apc_sma_info|apc_store|apciterator|apd_breakpoint|apd_callstack|apd_clunk|apd_continue|apd_croak|apd_dump_function_table|apd_dump_persistent_resources|apd_dump_regular_resources|apd_echo|apd_get_active_symbols|apd_set_pprof_trace|apd_set_session|apd_set_session_trace|apd_set_session_trace_socket|appenditerator|array|array_change_key_case|array_chunk|array_combine|array_count_values|array_diff|array_diff_assoc|array_diff_key|array_diff_uassoc|array_diff_ukey|array_fill|array_fill_keys|array_filter|array_flip|array_intersect|array_intersect_assoc|array_intersect_key|array_intersect_uassoc|array_intersect_ukey|array_key_exists|array_keys|array_map|array_merge|array_merge_recursive|array_multisort|array_pad|array_pop|array_product|array_push|array_rand|array_reduce|array_replace|array_replace_recursive|array_reverse|array_search|array_shift|array_slice|array_splice|array_sum|array_udiff|array_udiff_assoc|array_udiff_uassoc|array_uintersect|array_uintersect_assoc|array_uintersect_uassoc|array_unique|array_unshift|array_values|array_walk|array_walk_recursive|arrayaccess|arrayiterator|arrayobject|arsort|asin|asinh|asort|assert|assert_options|atan|atan2|atanh|audioproperties|badfunctioncallexception|badmethodcallexception|base64_decode|base64_encode|base_convert|basename|bbcode_add_element|bbcode_add_smiley|bbcode_create|bbcode_destroy|bbcode_parse|bbcode_set_arg_parser|bbcode_set_flags|bcadd|bccomp|bcdiv|bcmod|bcmul|bcompiler_load|bcompiler_load_exe|bcompiler_parse_class|bcompiler_read|bcompiler_write_class|bcompiler_write_constant|bcompiler_write_exe_footer|bcompiler_write_file|bcompiler_write_footer|bcompiler_write_function|bcompiler_write_functions_from_file|bcompiler_write_header|bcompiler_write_included_filename|bcpow|bcpowmod|bcscale|bcsqrt|bcsub|bin2hex|bind_textdomain_codeset|bindec|bindtextdomain|bson_decode|bson_encode|bumpValue|bzclose|bzcompress|bzdecompress|bzerrno|bzerror|bzerrstr|bzflush|bzopen|bzread|bzwrite|cachingiterator|cairo|cairo_create|cairo_font_face_get_type|cairo_font_face_status|cairo_font_options_create|cairo_font_options_equal|cairo_font_options_get_antialias|cairo_font_options_get_hint_metrics|cairo_font_options_get_hint_style|cairo_font_options_get_subpixel_order|cairo_font_options_hash|cairo_font_options_merge|cairo_font_options_set_antialias|cairo_font_options_set_hint_metrics|cairo_font_options_set_hint_style|cairo_font_options_set_subpixel_order|cairo_font_options_status|cairo_format_stride_for_width|cairo_image_surface_create|cairo_image_surface_create_for_data|cairo_image_surface_create_from_png|cairo_image_surface_get_data|cairo_image_surface_get_format|cairo_image_surface_get_height|cairo_image_surface_get_stride|cairo_image_surface_get_width|cairo_matrix_create_scale|cairo_matrix_create_translate|cairo_matrix_invert|cairo_matrix_multiply|cairo_matrix_rotate|cairo_matrix_transform_distance|cairo_matrix_transform_point|cairo_matrix_translate|cairo_pattern_add_color_stop_rgb|cairo_pattern_add_color_stop_rgba|cairo_pattern_create_for_surface|cairo_pattern_create_linear|cairo_pattern_create_radial|cairo_pattern_create_rgb|cairo_pattern_create_rgba|cairo_pattern_get_color_stop_count|cairo_pattern_get_color_stop_rgba|cairo_pattern_get_extend|cairo_pattern_get_filter|cairo_pattern_get_linear_points|cairo_pattern_get_matrix|cairo_pattern_get_radial_circles|cairo_pattern_get_rgba|cairo_pattern_get_surface|cairo_pattern_get_type|cairo_pattern_set_extend|cairo_pattern_set_filter|cairo_pattern_set_matrix|cairo_pattern_status|cairo_pdf_surface_create|cairo_pdf_surface_set_size|cairo_ps_get_levels|cairo_ps_level_to_string|cairo_ps_surface_create|cairo_ps_surface_dsc_begin_page_setup|cairo_ps_surface_dsc_begin_setup|cairo_ps_surface_dsc_comment|cairo_ps_surface_get_eps|cairo_ps_surface_restrict_to_level|cairo_ps_surface_set_eps|cairo_ps_surface_set_size|cairo_scaled_font_create|cairo_scaled_font_extents|cairo_scaled_font_get_ctm|cairo_scaled_font_get_font_face|cairo_scaled_font_get_font_matrix|cairo_scaled_font_get_font_options|cairo_scaled_font_get_scale_matrix|cairo_scaled_font_get_type|cairo_scaled_font_glyph_extents|cairo_scaled_font_status|cairo_scaled_font_text_extents|cairo_surface_copy_page|cairo_surface_create_similar|cairo_surface_finish|cairo_surface_flush|cairo_surface_get_content|cairo_surface_get_device_offset|cairo_surface_get_font_options|cairo_surface_get_type|cairo_surface_mark_dirty|cairo_surface_mark_dirty_rectangle|cairo_surface_set_device_offset|cairo_surface_set_fallback_resolution|cairo_surface_show_page|cairo_surface_status|cairo_surface_write_to_png|cairo_svg_surface_create|cairo_svg_surface_restrict_to_version|cairo_svg_version_to_string|cairoantialias|cairocontent|cairocontext|cairoexception|cairoextend|cairofillrule|cairofilter|cairofontface|cairofontoptions|cairofontslant|cairofonttype|cairofontweight|cairoformat|cairogradientpattern|cairohintmetrics|cairohintstyle|cairoimagesurface|cairolineargradient|cairolinecap|cairolinejoin|cairomatrix|cairooperator|cairopath|cairopattern|cairopatterntype|cairopdfsurface|cairopslevel|cairopssurface|cairoradialgradient|cairoscaledfont|cairosolidpattern|cairostatus|cairosubpixelorder|cairosurface|cairosurfacepattern|cairosurfacetype|cairosvgsurface|cairosvgversion|cairotoyfontface|cal_days_in_month|cal_from_jd|cal_info|cal_to_jd|calcul_hmac|calculhmac|call_user_func|call_user_func_array|call_user_method|call_user_method_array|callbackfilteriterator|ceil|chdb|chdb_create|chdir|checkdate|checkdnsrr|chgrp|chmod|chop|chown|chr|chroot|chunk_split|class_alias|class_exists|class_implements|class_parents|classkit_import|classkit_method_add|classkit_method_copy|classkit_method_redefine|classkit_method_remove|classkit_method_rename|clearstatcache|clone|closedir|closelog|collator|com|com_addref|com_create_guid|com_event_sink|com_get|com_get_active_object|com_invoke|com_isenum|com_load|com_load_typelib|com_message_pump|com_print_typeinfo|com_propget|com_propput|com_propset|com_release|com_set|compact|connection_aborted|connection_status|connection_timeout|constant|construct|construct|construct|convert_cyr_string|convert_uudecode|convert_uuencode|copy|cos|cosh|count|count_chars|countable|counter_bump|counter_bump_value|counter_create|counter_get|counter_get_meta|counter_get_named|counter_get_value|counter_reset|counter_reset_value|crack_check|crack_closedict|crack_getlastmessage|crack_opendict|crc32|create_function|crypt|ctype_alnum|ctype_alpha|ctype_cntrl|ctype_digit|ctype_graph|ctype_lower|ctype_print|ctype_punct|ctype_space|ctype_upper|ctype_xdigit|cubrid_affected_rows|cubrid_bind|cubrid_client_encoding|cubrid_close|cubrid_close_prepare|cubrid_close_request|cubrid_col_get|cubrid_col_size|cubrid_column_names|cubrid_column_types|cubrid_commit|cubrid_connect|cubrid_connect_with_url|cubrid_current_oid|cubrid_data_seek|cubrid_db_name|cubrid_disconnect|cubrid_drop|cubrid_errno|cubrid_error|cubrid_error_code|cubrid_error_code_facility|cubrid_error_msg|cubrid_execute|cubrid_fetch|cubrid_fetch_array|cubrid_fetch_assoc|cubrid_fetch_field|cubrid_fetch_lengths|cubrid_fetch_object|cubrid_fetch_row|cubrid_field_flags|cubrid_field_len|cubrid_field_name|cubrid_field_seek|cubrid_field_table|cubrid_field_type|cubrid_free_result|cubrid_get|cubrid_get_autocommit|cubrid_get_charset|cubrid_get_class_name|cubrid_get_client_info|cubrid_get_db_parameter|cubrid_get_server_info|cubrid_insert_id|cubrid_is_instance|cubrid_list_dbs|cubrid_load_from_glo|cubrid_lob_close|cubrid_lob_export|cubrid_lob_get|cubrid_lob_send|cubrid_lob_size|cubrid_lock_read|cubrid_lock_write|cubrid_move_cursor|cubrid_new_glo|cubrid_next_result|cubrid_num_cols|cubrid_num_fields|cubrid_num_rows|cubrid_ping|cubrid_prepare|cubrid_put|cubrid_query|cubrid_real_escape_string|cubrid_result|cubrid_rollback|cubrid_save_to_glo|cubrid_schema|cubrid_send_glo|cubrid_seq_drop|cubrid_seq_insert|cubrid_seq_put|cubrid_set_add|cubrid_set_autocommit|cubrid_set_db_parameter|cubrid_set_drop|cubrid_unbuffered_query|cubrid_version|curl_close|curl_copy_handle|curl_errno|curl_error|curl_exec|curl_getinfo|curl_init|curl_multi_add_handle|curl_multi_close|curl_multi_exec|curl_multi_getcontent|curl_multi_info_read|curl_multi_init|curl_multi_remove_handle|curl_multi_select|curl_setopt|curl_setopt_array|curl_version|current|cyrus_authenticate|cyrus_bind|cyrus_close|cyrus_connect|cyrus_query|cyrus_unbind|date|date_add|date_create|date_create_from_format|date_date_set|date_default_timezone_get|date_default_timezone_set|date_diff|date_format|date_get_last_errors|date_interval_create_from_date_string|date_interval_format|date_isodate_set|date_modify|date_offset_get|date_parse|date_parse_from_format|date_sub|date_sun_info|date_sunrise|date_sunset|date_time_set|date_timestamp_get|date_timestamp_set|date_timezone_get|date_timezone_set|dateinterval|dateperiod|datetime|datetimezone|db2_autocommit|db2_bind_param|db2_client_info|db2_close|db2_column_privileges|db2_columns|db2_commit|db2_conn_error|db2_conn_errormsg|db2_connect|db2_cursor_type|db2_escape_string|db2_exec|db2_execute|db2_fetch_array|db2_fetch_assoc|db2_fetch_both|db2_fetch_object|db2_fetch_row|db2_field_display_size|db2_field_name|db2_field_num|db2_field_precision|db2_field_scale|db2_field_type|db2_field_width|db2_foreign_keys|db2_free_result|db2_free_stmt|db2_get_option|db2_last_insert_id|db2_lob_read|db2_next_result|db2_num_fields|db2_num_rows|db2_pclose|db2_pconnect|db2_prepare|db2_primary_keys|db2_procedure_columns|db2_procedures|db2_result|db2_rollback|db2_server_info|db2_set_option|db2_special_columns|db2_statistics|db2_stmt_error|db2_stmt_errormsg|db2_table_privileges|db2_tables|dba_close|dba_delete|dba_exists|dba_fetch|dba_firstkey|dba_handlers|dba_insert|dba_key_split|dba_list|dba_nextkey|dba_open|dba_optimize|dba_popen|dba_replace|dba_sync|dbase_add_record|dbase_close|dbase_create|dbase_delete_record|dbase_get_header_info|dbase_get_record|dbase_get_record_with_names|dbase_numfields|dbase_numrecords|dbase_open|dbase_pack|dbase_replace_record|dbplus_add|dbplus_aql|dbplus_chdir|dbplus_close|dbplus_curr|dbplus_errcode|dbplus_errno|dbplus_find|dbplus_first|dbplus_flush|dbplus_freealllocks|dbplus_freelock|dbplus_freerlocks|dbplus_getlock|dbplus_getunique|dbplus_info|dbplus_last|dbplus_lockrel|dbplus_next|dbplus_open|dbplus_prev|dbplus_rchperm|dbplus_rcreate|dbplus_rcrtexact|dbplus_rcrtlike|dbplus_resolve|dbplus_restorepos|dbplus_rkeys|dbplus_ropen|dbplus_rquery|dbplus_rrename|dbplus_rsecindex|dbplus_runlink|dbplus_rzap|dbplus_savepos|dbplus_setindex|dbplus_setindexbynumber|dbplus_sql|dbplus_tcl|dbplus_tremove|dbplus_undo|dbplus_undoprepare|dbplus_unlockrel|dbplus_unselect|dbplus_update|dbplus_xlockrel|dbplus_xunlockrel|dbx_close|dbx_compare|dbx_connect|dbx_error|dbx_escape_string|dbx_fetch_row|dbx_query|dbx_sort|dcgettext|dcngettext|deaggregate|debug_backtrace|debug_print_backtrace|debug_zval_dump|decbin|dechex|decoct|define|define_syslog_variables|defined|deg2rad|delete|dgettext|die|dio_close|dio_fcntl|dio_open|dio_read|dio_seek|dio_stat|dio_tcsetattr|dio_truncate|dio_write|dir|directoryiterator|dirname|disk_free_space|disk_total_space|diskfreespace|dl|dngettext|dns_check_record|dns_get_mx|dns_get_record|dom_import_simplexml|domainexception|domattr|domattribute_name|domattribute_set_value|domattribute_specified|domattribute_value|domcharacterdata|domcomment|domdocument|domdocument_add_root|domdocument_create_attribute|domdocument_create_cdata_section|domdocument_create_comment|domdocument_create_element|domdocument_create_element_ns|domdocument_create_entity_reference|domdocument_create_processing_instruction|domdocument_create_text_node|domdocument_doctype|domdocument_document_element|domdocument_dump_file|domdocument_dump_mem|domdocument_get_element_by_id|domdocument_get_elements_by_tagname|domdocument_html_dump_mem|domdocument_xinclude|domdocumentfragment|domdocumenttype|domdocumenttype_entities|domdocumenttype_internal_subset|domdocumenttype_name|domdocumenttype_notations|domdocumenttype_public_id|domdocumenttype_system_id|domelement|domelement_get_attribute|domelement_get_attribute_node|domelement_get_elements_by_tagname|domelement_has_attribute|domelement_remove_attribute|domelement_set_attribute|domelement_set_attribute_node|domelement_tagname|domentity|domentityreference|domexception|domimplementation|domnamednodemap|domnode|domnode_add_namespace|domnode_append_child|domnode_append_sibling|domnode_attributes|domnode_child_nodes|domnode_clone_node|domnode_dump_node|domnode_first_child|domnode_get_content|domnode_has_attributes|domnode_has_child_nodes|domnode_insert_before|domnode_is_blank_node|domnode_last_child|domnode_next_sibling|domnode_node_name|domnode_node_type|domnode_node_value|domnode_owner_document|domnode_parent_node|domnode_prefix|domnode_previous_sibling|domnode_remove_child|domnode_replace_child|domnode_replace_node|domnode_set_content|domnode_set_name|domnode_set_namespace|domnode_unlink_node|domnodelist|domnotation|domprocessinginstruction|domprocessinginstruction_data|domprocessinginstruction_target|domtext|domxml_new_doc|domxml_open_file|domxml_open_mem|domxml_version|domxml_xmltree|domxml_xslt_stylesheet|domxml_xslt_stylesheet_doc|domxml_xslt_stylesheet_file|domxml_xslt_version|domxpath|domxsltstylesheet_process|domxsltstylesheet_result_dump_file|domxsltstylesheet_result_dump_mem|dotnet|dotnet_load|doubleval|each|easter_date|easter_days|echo|empty|emptyiterator|enchant_broker_describe|enchant_broker_dict_exists|enchant_broker_free|enchant_broker_free_dict|enchant_broker_get_error|enchant_broker_init|enchant_broker_list_dicts|enchant_broker_request_dict|enchant_broker_request_pwl_dict|enchant_broker_set_ordering|enchant_dict_add_to_personal|enchant_dict_add_to_session|enchant_dict_check|enchant_dict_describe|enchant_dict_get_error|enchant_dict_is_in_session|enchant_dict_quick_check|enchant_dict_store_replacement|enchant_dict_suggest|end|ereg|ereg_replace|eregi|eregi_replace|error_get_last|error_log|error_reporting|errorexception|escapeshellarg|escapeshellcmd|eval|event_add|event_base_free|event_base_loop|event_base_loopbreak|event_base_loopexit|event_base_new|event_base_priority_init|event_base_set|event_buffer_base_set|event_buffer_disable|event_buffer_enable|event_buffer_fd_set|event_buffer_free|event_buffer_new|event_buffer_priority_set|event_buffer_read|event_buffer_set_callback|event_buffer_timeout_set|event_buffer_watermark_set|event_buffer_write|event_del|event_free|event_new|event_set|exception|exec|exif_imagetype|exif_read_data|exif_tagname|exif_thumbnail|exit|exp|expect_expectl|expect_popen|explode|expm1|export|export|extension_loaded|extract|ezmlm_hash|fam_cancel_monitor|fam_close|fam_monitor_collection|fam_monitor_directory|fam_monitor_file|fam_next_event|fam_open|fam_pending|fam_resume_monitor|fam_suspend_monitor|fbsql_affected_rows|fbsql_autocommit|fbsql_blob_size|fbsql_change_user|fbsql_clob_size|fbsql_close|fbsql_commit|fbsql_connect|fbsql_create_blob|fbsql_create_clob|fbsql_create_db|fbsql_data_seek|fbsql_database|fbsql_database_password|fbsql_db_query|fbsql_db_status|fbsql_drop_db|fbsql_errno|fbsql_error|fbsql_fetch_array|fbsql_fetch_assoc|fbsql_fetch_field|fbsql_fetch_lengths|fbsql_fetch_object|fbsql_fetch_row|fbsql_field_flags|fbsql_field_len|fbsql_field_name|fbsql_field_seek|fbsql_field_table|fbsql_field_type|fbsql_free_result|fbsql_get_autostart_info|fbsql_hostname|fbsql_insert_id|fbsql_list_dbs|fbsql_list_fields|fbsql_list_tables|fbsql_next_result|fbsql_num_fields|fbsql_num_rows|fbsql_password|fbsql_pconnect|fbsql_query|fbsql_read_blob|fbsql_read_clob|fbsql_result|fbsql_rollback|fbsql_rows_fetched|fbsql_select_db|fbsql_set_characterset|fbsql_set_lob_mode|fbsql_set_password|fbsql_set_transaction|fbsql_start_db|fbsql_stop_db|fbsql_table_name|fbsql_tablename|fbsql_username|fbsql_warnings|fclose|fdf_add_doc_javascript|fdf_add_template|fdf_close|fdf_create|fdf_enum_values|fdf_errno|fdf_error|fdf_get_ap|fdf_get_attachment|fdf_get_encoding|fdf_get_file|fdf_get_flags|fdf_get_opt|fdf_get_status|fdf_get_value|fdf_get_version|fdf_header|fdf_next_field_name|fdf_open|fdf_open_string|fdf_remove_item|fdf_save|fdf_save_string|fdf_set_ap|fdf_set_encoding|fdf_set_file|fdf_set_flags|fdf_set_javascript_action|fdf_set_on_import_javascript|fdf_set_opt|fdf_set_status|fdf_set_submit_form_action|fdf_set_target_frame|fdf_set_value|fdf_set_version|feof|fflush|fgetc|fgetcsv|fgets|fgetss|file|file_exists|file_get_contents|file_put_contents|fileatime|filectime|filegroup|fileinode|filemtime|fileowner|fileperms|filepro|filepro_fieldcount|filepro_fieldname|filepro_fieldtype|filepro_fieldwidth|filepro_retrieve|filepro_rowcount|filesize|filesystemiterator|filetype|filter_has_var|filter_id|filter_input|filter_input_array|filter_list|filter_var|filter_var_array|filteriterator|finfo_buffer|finfo_close|finfo_file|finfo_open|finfo_set_flags|floatval|flock|floor|flush|fmod|fnmatch|fopen|forward_static_call|forward_static_call_array|fpassthru|fprintf|fputcsv|fputs|fread|frenchtojd|fribidi_log2vis|fscanf|fseek|fsockopen|fstat|ftell|ftok|ftp_alloc|ftp_cdup|ftp_chdir|ftp_chmod|ftp_close|ftp_connect|ftp_delete|ftp_exec|ftp_fget|ftp_fput|ftp_get|ftp_get_option|ftp_login|ftp_mdtm|ftp_mkdir|ftp_nb_continue|ftp_nb_fget|ftp_nb_fput|ftp_nb_get|ftp_nb_put|ftp_nlist|ftp_pasv|ftp_put|ftp_pwd|ftp_quit|ftp_raw|ftp_rawlist|ftp_rename|ftp_rmdir|ftp_set_option|ftp_site|ftp_size|ftp_ssl_connect|ftp_systype|ftruncate|func_get_arg|func_get_args|func_num_args|function_exists|fwrite|gc_collect_cycles|gc_disable|gc_enable|gc_enabled|gd_info|gearmanclient|gearmanjob|gearmantask|gearmanworker|geoip_continent_code_by_name|geoip_country_code3_by_name|geoip_country_code_by_name|geoip_country_name_by_name|geoip_database_info|geoip_db_avail|geoip_db_filename|geoip_db_get_all_info|geoip_id_by_name|geoip_isp_by_name|geoip_org_by_name|geoip_record_by_name|geoip_region_by_name|geoip_region_name_by_code|geoip_time_zone_by_country_and_region|getMeta|getNamed|getValue|get_browser|get_called_class|get_cfg_var|get_class|get_class_methods|get_class_vars|get_current_user|get_declared_classes|get_declared_interfaces|get_defined_constants|get_defined_functions|get_defined_vars|get_extension_funcs|get_headers|get_html_translation_table|get_include_path|get_included_files|get_loaded_extensions|get_magic_quotes_gpc|get_magic_quotes_runtime|get_meta_tags|get_object_vars|get_parent_class|get_required_files|get_resource_type|getallheaders|getconstant|getconstants|getconstructor|getcwd|getdate|getdefaultproperties|getdoccomment|getendline|getenv|getextension|getextensionname|getfilename|gethostbyaddr|gethostbyname|gethostbynamel|gethostname|getimagesize|getinterfacenames|getinterfaces|getlastmod|getmethod|getmethods|getmodifiers|getmxrr|getmygid|getmyinode|getmypid|getmyuid|getname|getnamespacename|getopt|getparentclass|getproperties|getproperty|getprotobyname|getprotobynumber|getrandmax|getrusage|getservbyname|getservbyport|getshortname|getstartline|getstaticproperties|getstaticpropertyvalue|gettext|gettimeofday|gettype|glob|globiterator|gmagick|gmagickdraw|gmagickpixel|gmdate|gmmktime|gmp_abs|gmp_add|gmp_and|gmp_clrbit|gmp_cmp|gmp_com|gmp_div|gmp_div_q|gmp_div_qr|gmp_div_r|gmp_divexact|gmp_fact|gmp_gcd|gmp_gcdext|gmp_hamdist|gmp_init|gmp_intval|gmp_invert|gmp_jacobi|gmp_legendre|gmp_mod|gmp_mul|gmp_neg|gmp_nextprime|gmp_or|gmp_perfect_square|gmp_popcount|gmp_pow|gmp_powm|gmp_prob_prime|gmp_random|gmp_scan0|gmp_scan1|gmp_setbit|gmp_sign|gmp_sqrt|gmp_sqrtrem|gmp_strval|gmp_sub|gmp_testbit|gmp_xor|gmstrftime|gnupg_adddecryptkey|gnupg_addencryptkey|gnupg_addsignkey|gnupg_cleardecryptkeys|gnupg_clearencryptkeys|gnupg_clearsignkeys|gnupg_decrypt|gnupg_decryptverify|gnupg_encrypt|gnupg_encryptsign|gnupg_export|gnupg_geterror|gnupg_getprotocol|gnupg_import|gnupg_init|gnupg_keyinfo|gnupg_setarmor|gnupg_seterrormode|gnupg_setsignmode|gnupg_sign|gnupg_verify|gopher_parsedir|grapheme_extract|grapheme_stripos|grapheme_stristr|grapheme_strlen|grapheme_strpos|grapheme_strripos|grapheme_strrpos|grapheme_strstr|grapheme_substr|gregoriantojd|gupnp_context_get_host_ip|gupnp_context_get_port|gupnp_context_get_subscription_timeout|gupnp_context_host_path|gupnp_context_new|gupnp_context_set_subscription_timeout|gupnp_context_timeout_add|gupnp_context_unhost_path|gupnp_control_point_browse_start|gupnp_control_point_browse_stop|gupnp_control_point_callback_set|gupnp_control_point_new|gupnp_device_action_callback_set|gupnp_device_info_get|gupnp_device_info_get_service|gupnp_root_device_get_available|gupnp_root_device_get_relative_location|gupnp_root_device_new|gupnp_root_device_set_available|gupnp_root_device_start|gupnp_root_device_stop|gupnp_service_action_get|gupnp_service_action_return|gupnp_service_action_return_error|gupnp_service_action_set|gupnp_service_freeze_notify|gupnp_service_info_get|gupnp_service_info_get_introspection|gupnp_service_introspection_get_state_variable|gupnp_service_notify|gupnp_service_proxy_action_get|gupnp_service_proxy_action_set|gupnp_service_proxy_add_notify|gupnp_service_proxy_callback_set|gupnp_service_proxy_get_subscribed|gupnp_service_proxy_remove_notify|gupnp_service_proxy_set_subscribed|gupnp_service_thaw_notify|gzclose|gzcompress|gzdecode|gzdeflate|gzencode|gzeof|gzfile|gzgetc|gzgets|gzgetss|gzinflate|gzopen|gzpassthru|gzputs|gzread|gzrewind|gzseek|gztell|gzuncompress|gzwrite|halt_compiler|haruannotation|haruannotation_setborderstyle|haruannotation_sethighlightmode|haruannotation_seticon|haruannotation_setopened|harudestination|harudestination_setfit|harudestination_setfitb|harudestination_setfitbh|harudestination_setfitbv|harudestination_setfith|harudestination_setfitr|harudestination_setfitv|harudestination_setxyz|harudoc|harudoc_addpage|harudoc_addpagelabel|harudoc_construct|harudoc_createoutline|harudoc_getcurrentencoder|harudoc_getcurrentpage|harudoc_getencoder|harudoc_getfont|harudoc_getinfoattr|harudoc_getpagelayout|harudoc_getpagemode|harudoc_getstreamsize|harudoc_insertpage|harudoc_loadjpeg|harudoc_loadpng|harudoc_loadraw|harudoc_loadttc|harudoc_loadttf|harudoc_loadtype1|harudoc_output|harudoc_readfromstream|harudoc_reseterror|harudoc_resetstream|harudoc_save|harudoc_savetostream|harudoc_setcompressionmode|harudoc_setcurrentencoder|harudoc_setencryptionmode|harudoc_setinfoattr|harudoc_setinfodateattr|harudoc_setopenaction|harudoc_setpagelayout|harudoc_setpagemode|harudoc_setpagesconfiguration|harudoc_setpassword|harudoc_setpermission|harudoc_usecnsencodings|harudoc_usecnsfonts|harudoc_usecntencodings|harudoc_usecntfonts|harudoc_usejpencodings|harudoc_usejpfonts|harudoc_usekrencodings|harudoc_usekrfonts|haruencoder|haruencoder_getbytetype|haruencoder_gettype|haruencoder_getunicode|haruencoder_getwritingmode|haruexception|harufont|harufont_getascent|harufont_getcapheight|harufont_getdescent|harufont_getencodingname|harufont_getfontname|harufont_gettextwidth|harufont_getunicodewidth|harufont_getxheight|harufont_measuretext|haruimage|haruimage_getbitspercomponent|haruimage_getcolorspace|haruimage_getheight|haruimage_getsize|haruimage_getwidth|haruimage_setcolormask|haruimage_setmaskimage|haruoutline|haruoutline_setdestination|haruoutline_setopened|harupage|harupage_arc|harupage_begintext|harupage_circle|harupage_closepath|harupage_concat|harupage_createdestination|harupage_createlinkannotation|harupage_createtextannotation|harupage_createurlannotation|harupage_curveto|harupage_curveto2|harupage_curveto3|harupage_drawimage|harupage_ellipse|harupage_endpath|harupage_endtext|harupage_eofill|harupage_eofillstroke|harupage_fill|harupage_fillstroke|harupage_getcharspace|harupage_getcmykfill|harupage_getcmykstroke|harupage_getcurrentfont|harupage_getcurrentfontsize|harupage_getcurrentpos|harupage_getcurrenttextpos|harupage_getdash|harupage_getfillingcolorspace|harupage_getflatness|harupage_getgmode|harupage_getgrayfill|harupage_getgraystroke|harupage_getheight|harupage_gethorizontalscaling|harupage_getlinecap|harupage_getlinejoin|harupage_getlinewidth|harupage_getmiterlimit|harupage_getrgbfill|harupage_getrgbstroke|harupage_getstrokingcolorspace|harupage_gettextleading|harupage_gettextmatrix|harupage_gettextrenderingmode|harupage_gettextrise|harupage_gettextwidth|harupage_gettransmatrix|harupage_getwidth|harupage_getwordspace|harupage_lineto|harupage_measuretext|harupage_movetextpos|harupage_moveto|harupage_movetonextline|harupage_rectangle|harupage_setcharspace|harupage_setcmykfill|harupage_setcmykstroke|harupage_setdash|harupage_setflatness|harupage_setfontandsize|harupage_setgrayfill|harupage_setgraystroke|harupage_setheight|harupage_sethorizontalscaling|harupage_setlinecap|harupage_setlinejoin|harupage_setlinewidth|harupage_setmiterlimit|harupage_setrgbfill|harupage_setrgbstroke|harupage_setrotate|harupage_setsize|harupage_setslideshow|harupage_settextleading|harupage_settextmatrix|harupage_settextrenderingmode|harupage_settextrise|harupage_setwidth|harupage_setwordspace|harupage_showtext|harupage_showtextnextline|harupage_stroke|harupage_textout|harupage_textrect|hasconstant|hash|hash_algos|hash_copy|hash_file|hash_final|hash_hmac|hash_hmac_file|hash_init|hash_update|hash_update_file|hash_update_stream|hasmethod|hasproperty|header|header_register_callback|header_remove|headers_list|headers_sent|hebrev|hebrevc|hex2bin|hexdec|highlight_file|highlight_string|html_entity_decode|htmlentities|htmlspecialchars|htmlspecialchars_decode|http_build_cookie|http_build_query|http_build_str|http_build_url|http_cache_etag|http_cache_last_modified|http_chunked_decode|http_date|http_deflate|http_get|http_get_request_body|http_get_request_body_stream|http_get_request_headers|http_head|http_inflate|http_match_etag|http_match_modified|http_match_request_header|http_negotiate_charset|http_negotiate_content_type|http_negotiate_language|http_parse_cookie|http_parse_headers|http_parse_message|http_parse_params|http_persistent_handles_clean|http_persistent_handles_count|http_persistent_handles_ident|http_post_data|http_post_fields|http_put_data|http_put_file|http_put_stream|http_redirect|http_request|http_request_body_encode|http_request_method_exists|http_request_method_name|http_request_method_register|http_request_method_unregister|http_response_code|http_send_content_disposition|http_send_content_type|http_send_data|http_send_file|http_send_last_modified|http_send_status|http_send_stream|http_support|http_throttle|httpdeflatestream|httpdeflatestream_construct|httpdeflatestream_factory|httpdeflatestream_finish|httpdeflatestream_flush|httpdeflatestream_update|httpinflatestream|httpinflatestream_construct|httpinflatestream_factory|httpinflatestream_finish|httpinflatestream_flush|httpinflatestream_update|httpmessage|httpmessage_addheaders|httpmessage_construct|httpmessage_detach|httpmessage_factory|httpmessage_fromenv|httpmessage_fromstring|httpmessage_getbody|httpmessage_getheader|httpmessage_getheaders|httpmessage_gethttpversion|httpmessage_getparentmessage|httpmessage_getrequestmethod|httpmessage_getrequesturl|httpmessage_getresponsecode|httpmessage_getresponsestatus|httpmessage_gettype|httpmessage_guesscontenttype|httpmessage_prepend|httpmessage_reverse|httpmessage_send|httpmessage_setbody|httpmessage_setheaders|httpmessage_sethttpversion|httpmessage_setrequestmethod|httpmessage_setrequesturl|httpmessage_setresponsecode|httpmessage_setresponsestatus|httpmessage_settype|httpmessage_tomessagetypeobject|httpmessage_tostring|httpquerystring|httpquerystring_construct|httpquerystring_get|httpquerystring_mod|httpquerystring_set|httpquerystring_singleton|httpquerystring_toarray|httpquerystring_tostring|httpquerystring_xlate|httprequest|httprequest_addcookies|httprequest_addheaders|httprequest_addpostfields|httprequest_addpostfile|httprequest_addputdata|httprequest_addquerydata|httprequest_addrawpostdata|httprequest_addssloptions|httprequest_clearhistory|httprequest_construct|httprequest_enablecookies|httprequest_getcontenttype|httprequest_getcookies|httprequest_getheaders|httprequest_gethistory|httprequest_getmethod|httprequest_getoptions|httprequest_getpostfields|httprequest_getpostfiles|httprequest_getputdata|httprequest_getputfile|httprequest_getquerydata|httprequest_getrawpostdata|httprequest_getrawrequestmessage|httprequest_getrawresponsemessage|httprequest_getrequestmessage|httprequest_getresponsebody|httprequest_getresponsecode|httprequest_getresponsecookies|httprequest_getresponsedata|httprequest_getresponseheader|httprequest_getresponseinfo|httprequest_getresponsemessage|httprequest_getresponsestatus|httprequest_getssloptions|httprequest_geturl|httprequest_resetcookies|httprequest_send|httprequest_setcontenttype|httprequest_setcookies|httprequest_setheaders|httprequest_setmethod|httprequest_setoptions|httprequest_setpostfields|httprequest_setpostfiles|httprequest_setputdata|httprequest_setputfile|httprequest_setquerydata|httprequest_setrawpostdata|httprequest_setssloptions|httprequest_seturl|httprequestpool|httprequestpool_attach|httprequestpool_construct|httprequestpool_destruct|httprequestpool_detach|httprequestpool_getattachedrequests|httprequestpool_getfinishedrequests|httprequestpool_reset|httprequestpool_send|httprequestpool_socketperform|httprequestpool_socketselect|httpresponse|httpresponse_capture|httpresponse_getbuffersize|httpresponse_getcache|httpresponse_getcachecontrol|httpresponse_getcontentdisposition|httpresponse_getcontenttype|httpresponse_getdata|httpresponse_getetag|httpresponse_getfile|httpresponse_getgzip|httpresponse_getheader|httpresponse_getlastmodified|httpresponse_getrequestbody|httpresponse_getrequestbodystream|httpresponse_getrequestheaders|httpresponse_getstream|httpresponse_getthrottledelay|httpresponse_guesscontenttype|httpresponse_redirect|httpresponse_send|httpresponse_setbuffersize|httpresponse_setcache|httpresponse_setcachecontrol|httpresponse_setcontentdisposition|httpresponse_setcontenttype|httpresponse_setdata|httpresponse_setetag|httpresponse_setfile|httpresponse_setgzip|httpresponse_setheader|httpresponse_setlastmodified|httpresponse_setstream|httpresponse_setthrottledelay|httpresponse_status|hw_array2objrec|hw_changeobject|hw_children|hw_childrenobj|hw_close|hw_connect|hw_connection_info|hw_cp|hw_deleteobject|hw_docbyanchor|hw_docbyanchorobj|hw_document_attributes|hw_document_bodytag|hw_document_content|hw_document_setcontent|hw_document_size|hw_dummy|hw_edittext|hw_error|hw_errormsg|hw_free_document|hw_getanchors|hw_getanchorsobj|hw_getandlock|hw_getchildcoll|hw_getchildcollobj|hw_getchilddoccoll|hw_getchilddoccollobj|hw_getobject|hw_getobjectbyquery|hw_getobjectbyquerycoll|hw_getobjectbyquerycollobj|hw_getobjectbyqueryobj|hw_getparents|hw_getparentsobj|hw_getrellink|hw_getremote|hw_getremotechildren|hw_getsrcbydestobj|hw_gettext|hw_getusername|hw_identify|hw_incollections|hw_info|hw_inscoll|hw_insdoc|hw_insertanchors|hw_insertdocument|hw_insertobject|hw_mapid|hw_modifyobject|hw_mv|hw_new_document|hw_objrec2array|hw_output_document|hw_pconnect|hw_pipedocument|hw_root|hw_setlinkroot|hw_stat|hw_unlock|hw_who|hwapi_attribute|hwapi_attribute_key|hwapi_attribute_langdepvalue|hwapi_attribute_value|hwapi_attribute_values|hwapi_checkin|hwapi_checkout|hwapi_children|hwapi_content|hwapi_content_mimetype|hwapi_content_read|hwapi_copy|hwapi_dbstat|hwapi_dcstat|hwapi_dstanchors|hwapi_dstofsrcanchor|hwapi_error_count|hwapi_error_reason|hwapi_find|hwapi_ftstat|hwapi_hgcsp|hwapi_hwstat|hwapi_identify|hwapi_info|hwapi_insert|hwapi_insertanchor|hwapi_insertcollection|hwapi_insertdocument|hwapi_link|hwapi_lock|hwapi_move|hwapi_new_content|hwapi_object|hwapi_object_assign|hwapi_object_attreditable|hwapi_object_count|hwapi_object_insert|hwapi_object_new|hwapi_object_remove|hwapi_object_title|hwapi_object_value|hwapi_objectbyanchor|hwapi_parents|hwapi_reason_description|hwapi_reason_type|hwapi_remove|hwapi_replace|hwapi_setcommittedversion|hwapi_srcanchors|hwapi_srcsofdst|hwapi_unlock|hwapi_user|hwapi_userlist|hypot|ibase_add_user|ibase_affected_rows|ibase_backup|ibase_blob_add|ibase_blob_cancel|ibase_blob_close|ibase_blob_create|ibase_blob_echo|ibase_blob_get|ibase_blob_import|ibase_blob_info|ibase_blob_open|ibase_close|ibase_commit|ibase_commit_ret|ibase_connect|ibase_db_info|ibase_delete_user|ibase_drop_db|ibase_errcode|ibase_errmsg|ibase_execute|ibase_fetch_assoc|ibase_fetch_object|ibase_fetch_row|ibase_field_info|ibase_free_event_handler|ibase_free_query|ibase_free_result|ibase_gen_id|ibase_maintain_db|ibase_modify_user|ibase_name_result|ibase_num_fields|ibase_num_params|ibase_param_info|ibase_pconnect|ibase_prepare|ibase_query|ibase_restore|ibase_rollback|ibase_rollback_ret|ibase_server_info|ibase_service_attach|ibase_service_detach|ibase_set_event_handler|ibase_timefmt|ibase_trans|ibase_wait_event|iconv|iconv_get_encoding|iconv_mime_decode|iconv_mime_decode_headers|iconv_mime_encode|iconv_set_encoding|iconv_strlen|iconv_strpos|iconv_strrpos|iconv_substr|id3_get_frame_long_name|id3_get_frame_short_name|id3_get_genre_id|id3_get_genre_list|id3_get_genre_name|id3_get_tag|id3_get_version|id3_remove_tag|id3_set_tag|id3v2attachedpictureframe|id3v2frame|id3v2tag|idate|idn_to_ascii|idn_to_unicode|idn_to_utf8|ifx_affected_rows|ifx_blobinfile_mode|ifx_byteasvarchar|ifx_close|ifx_connect|ifx_copy_blob|ifx_create_blob|ifx_create_char|ifx_do|ifx_error|ifx_errormsg|ifx_fetch_row|ifx_fieldproperties|ifx_fieldtypes|ifx_free_blob|ifx_free_char|ifx_free_result|ifx_get_blob|ifx_get_char|ifx_getsqlca|ifx_htmltbl_result|ifx_nullformat|ifx_num_fields|ifx_num_rows|ifx_pconnect|ifx_prepare|ifx_query|ifx_textasvarchar|ifx_update_blob|ifx_update_char|ifxus_close_slob|ifxus_create_slob|ifxus_free_slob|ifxus_open_slob|ifxus_read_slob|ifxus_seek_slob|ifxus_tell_slob|ifxus_write_slob|ignore_user_abort|iis_add_server|iis_get_dir_security|iis_get_script_map|iis_get_server_by_comment|iis_get_server_by_path|iis_get_server_rights|iis_get_service_state|iis_remove_server|iis_set_app_settings|iis_set_dir_security|iis_set_script_map|iis_set_server_rights|iis_start_server|iis_start_service|iis_stop_server|iis_stop_service|image2wbmp|image_type_to_extension|image_type_to_mime_type|imagealphablending|imageantialias|imagearc|imagechar|imagecharup|imagecolorallocate|imagecolorallocatealpha|imagecolorat|imagecolorclosest|imagecolorclosestalpha|imagecolorclosesthwb|imagecolordeallocate|imagecolorexact|imagecolorexactalpha|imagecolormatch|imagecolorresolve|imagecolorresolvealpha|imagecolorset|imagecolorsforindex|imagecolorstotal|imagecolortransparent|imageconvolution|imagecopy|imagecopymerge|imagecopymergegray|imagecopyresampled|imagecopyresized|imagecreate|imagecreatefromgd|imagecreatefromgd2|imagecreatefromgd2part|imagecreatefromgif|imagecreatefromjpeg|imagecreatefrompng|imagecreatefromstring|imagecreatefromwbmp|imagecreatefromxbm|imagecreatefromxpm|imagecreatetruecolor|imagedashedline|imagedestroy|imageellipse|imagefill|imagefilledarc|imagefilledellipse|imagefilledpolygon|imagefilledrectangle|imagefilltoborder|imagefilter|imagefontheight|imagefontwidth|imageftbbox|imagefttext|imagegammacorrect|imagegd|imagegd2|imagegif|imagegrabscreen|imagegrabwindow|imageinterlace|imageistruecolor|imagejpeg|imagelayereffect|imageline|imageloadfont|imagepalettecopy|imagepng|imagepolygon|imagepsbbox|imagepsencodefont|imagepsextendfont|imagepsfreefont|imagepsloadfont|imagepsslantfont|imagepstext|imagerectangle|imagerotate|imagesavealpha|imagesetbrush|imagesetpixel|imagesetstyle|imagesetthickness|imagesettile|imagestring|imagestringup|imagesx|imagesy|imagetruecolortopalette|imagettfbbox|imagettftext|imagetypes|imagewbmp|imagexbm|imagick|imagick_adaptiveblurimage|imagick_adaptiveresizeimage|imagick_adaptivesharpenimage|imagick_adaptivethresholdimage|imagick_addimage|imagick_addnoiseimage|imagick_affinetransformimage|imagick_animateimages|imagick_annotateimage|imagick_appendimages|imagick_averageimages|imagick_blackthresholdimage|imagick_blurimage|imagick_borderimage|imagick_charcoalimage|imagick_chopimage|imagick_clear|imagick_clipimage|imagick_clippathimage|imagick_clone|imagick_clutimage|imagick_coalesceimages|imagick_colorfloodfillimage|imagick_colorizeimage|imagick_combineimages|imagick_commentimage|imagick_compareimagechannels|imagick_compareimagelayers|imagick_compareimages|imagick_compositeimage|imagick_construct|imagick_contrastimage|imagick_contraststretchimage|imagick_convolveimage|imagick_cropimage|imagick_cropthumbnailimage|imagick_current|imagick_cyclecolormapimage|imagick_decipherimage|imagick_deconstructimages|imagick_deleteimageartifact|imagick_despeckleimage|imagick_destroy|imagick_displayimage|imagick_displayimages|imagick_distortimage|imagick_drawimage|imagick_edgeimage|imagick_embossimage|imagick_encipherimage|imagick_enhanceimage|imagick_equalizeimage|imagick_evaluateimage|imagick_extentimage|imagick_flattenimages|imagick_flipimage|imagick_floodfillpaintimage|imagick_flopimage|imagick_frameimage|imagick_fximage|imagick_gammaimage|imagick_gaussianblurimage|imagick_getcolorspace|imagick_getcompression|imagick_getcompressionquality|imagick_getcopyright|imagick_getfilename|imagick_getfont|imagick_getformat|imagick_getgravity|imagick_gethomeurl|imagick_getimage|imagick_getimagealphachannel|imagick_getimageartifact|imagick_getimagebackgroundcolor|imagick_getimageblob|imagick_getimageblueprimary|imagick_getimagebordercolor|imagick_getimagechanneldepth|imagick_getimagechanneldistortion|imagick_getimagechanneldistortions|imagick_getimagechannelextrema|imagick_getimagechannelmean|imagick_getimagechannelrange|imagick_getimagechannelstatistics|imagick_getimageclipmask|imagick_getimagecolormapcolor|imagick_getimagecolors|imagick_getimagecolorspace|imagick_getimagecompose|imagick_getimagecompression|imagick_getimagecompressionquality|imagick_getimagedelay|imagick_getimagedepth|imagick_getimagedispose|imagick_getimagedistortion|imagick_getimageextrema|imagick_getimagefilename|imagick_getimageformat|imagick_getimagegamma|imagick_getimagegeometry|imagick_getimagegravity|imagick_getimagegreenprimary|imagick_getimageheight|imagick_getimagehistogram|imagick_getimageindex|imagick_getimageinterlacescheme|imagick_getimageinterpolatemethod|imagick_getimageiterations|imagick_getimagelength|imagick_getimagemagicklicense|imagick_getimagematte|imagick_getimagemattecolor|imagick_getimageorientation|imagick_getimagepage|imagick_getimagepixelcolor|imagick_getimageprofile|imagick_getimageprofiles|imagick_getimageproperties|imagick_getimageproperty|imagick_getimageredprimary|imagick_getimageregion|imagick_getimagerenderingintent|imagick_getimageresolution|imagick_getimagesblob|imagick_getimagescene|imagick_getimagesignature|imagick_getimagesize|imagick_getimagetickspersecond|imagick_getimagetotalinkdensity|imagick_getimagetype|imagick_getimageunits|imagick_getimagevirtualpixelmethod|imagick_getimagewhitepoint|imagick_getimagewidth|imagick_getinterlacescheme|imagick_getiteratorindex|imagick_getnumberimages|imagick_getoption|imagick_getpackagename|imagick_getpage|imagick_getpixeliterator|imagick_getpixelregioniterator|imagick_getpointsize|imagick_getquantumdepth|imagick_getquantumrange|imagick_getreleasedate|imagick_getresource|imagick_getresourcelimit|imagick_getsamplingfactors|imagick_getsize|imagick_getsizeoffset|imagick_getversion|imagick_hasnextimage|imagick_haspreviousimage|imagick_identifyimage|imagick_implodeimage|imagick_labelimage|imagick_levelimage|imagick_linearstretchimage|imagick_liquidrescaleimage|imagick_magnifyimage|imagick_mapimage|imagick_mattefloodfillimage|imagick_medianfilterimage|imagick_mergeimagelayers|imagick_minifyimage|imagick_modulateimage|imagick_montageimage|imagick_morphimages|imagick_mosaicimages|imagick_motionblurimage|imagick_negateimage|imagick_newimage|imagick_newpseudoimage|imagick_nextimage|imagick_normalizeimage|imagick_oilpaintimage|imagick_opaquepaintimage|imagick_optimizeimagelayers|imagick_orderedposterizeimage|imagick_paintfloodfillimage|imagick_paintopaqueimage|imagick_painttransparentimage|imagick_pingimage|imagick_pingimageblob|imagick_pingimagefile|imagick_polaroidimage|imagick_posterizeimage|imagick_previewimages|imagick_previousimage|imagick_profileimage|imagick_quantizeimage|imagick_quantizeimages|imagick_queryfontmetrics|imagick_queryfonts|imagick_queryformats|imagick_radialblurimage|imagick_raiseimage|imagick_randomthresholdimage|imagick_readimage|imagick_readimageblob|imagick_readimagefile|imagick_recolorimage|imagick_reducenoiseimage|imagick_removeimage|imagick_removeimageprofile|imagick_render|imagick_resampleimage|imagick_resetimagepage|imagick_resizeimage|imagick_rollimage|imagick_rotateimage|imagick_roundcorners|imagick_sampleimage|imagick_scaleimage|imagick_separateimagechannel|imagick_sepiatoneimage|imagick_setbackgroundcolor|imagick_setcolorspace|imagick_setcompression|imagick_setcompressionquality|imagick_setfilename|imagick_setfirstiterator|imagick_setfont|imagick_setformat|imagick_setgravity|imagick_setimage|imagick_setimagealphachannel|imagick_setimageartifact|imagick_setimagebackgroundcolor|imagick_setimagebias|imagick_setimageblueprimary|imagick_setimagebordercolor|imagick_setimagechanneldepth|imagick_setimageclipmask|imagick_setimagecolormapcolor|imagick_setimagecolorspace|imagick_setimagecompose|imagick_setimagecompression|imagick_setimagecompressionquality|imagick_setimagedelay|imagick_setimagedepth|imagick_setimagedispose|imagick_setimageextent|imagick_setimagefilename|imagick_setimageformat|imagick_setimagegamma|imagick_setimagegravity|imagick_setimagegreenprimary|imagick_setimageindex|imagick_setimageinterlacescheme|imagick_setimageinterpolatemethod|imagick_setimageiterations|imagick_setimagematte|imagick_setimagemattecolor|imagick_setimageopacity|imagick_setimageorientation|imagick_setimagepage|imagick_setimageprofile|imagick_setimageproperty|imagick_setimageredprimary|imagick_setimagerenderingintent|imagick_setimageresolution|imagick_setimagescene|imagick_setimagetickspersecond|imagick_setimagetype|imagick_setimageunits|imagick_setimagevirtualpixelmethod|imagick_setimagewhitepoint|imagick_setinterlacescheme|imagick_setiteratorindex|imagick_setlastiterator|imagick_setoption|imagick_setpage|imagick_setpointsize|imagick_setresolution|imagick_setresourcelimit|imagick_setsamplingfactors|imagick_setsize|imagick_setsizeoffset|imagick_settype|imagick_shadeimage|imagick_shadowimage|imagick_sharpenimage|imagick_shaveimage|imagick_shearimage|imagick_sigmoidalcontrastimage|imagick_sketchimage|imagick_solarizeimage|imagick_spliceimage|imagick_spreadimage|imagick_steganoimage|imagick_stereoimage|imagick_stripimage|imagick_swirlimage|imagick_textureimage|imagick_thresholdimage|imagick_thumbnailimage|imagick_tintimage|imagick_transformimage|imagick_transparentpaintimage|imagick_transposeimage|imagick_transverseimage|imagick_trimimage|imagick_uniqueimagecolors|imagick_unsharpmaskimage|imagick_valid|imagick_vignetteimage|imagick_waveimage|imagick_whitethresholdimage|imagick_writeimage|imagick_writeimagefile|imagick_writeimages|imagick_writeimagesfile|imagickdraw|imagickdraw_affine|imagickdraw_annotation|imagickdraw_arc|imagickdraw_bezier|imagickdraw_circle|imagickdraw_clear|imagickdraw_clone|imagickdraw_color|imagickdraw_comment|imagickdraw_composite|imagickdraw_construct|imagickdraw_destroy|imagickdraw_ellipse|imagickdraw_getclippath|imagickdraw_getcliprule|imagickdraw_getclipunits|imagickdraw_getfillcolor|imagickdraw_getfillopacity|imagickdraw_getfillrule|imagickdraw_getfont|imagickdraw_getfontfamily|imagickdraw_getfontsize|imagickdraw_getfontstyle|imagickdraw_getfontweight|imagickdraw_getgravity|imagickdraw_getstrokeantialias|imagickdraw_getstrokecolor|imagickdraw_getstrokedasharray|imagickdraw_getstrokedashoffset|imagickdraw_getstrokelinecap|imagickdraw_getstrokelinejoin|imagickdraw_getstrokemiterlimit|imagickdraw_getstrokeopacity|imagickdraw_getstrokewidth|imagickdraw_gettextalignment|imagickdraw_gettextantialias|imagickdraw_gettextdecoration|imagickdraw_gettextencoding|imagickdraw_gettextundercolor|imagickdraw_getvectorgraphics|imagickdraw_line|imagickdraw_matte|imagickdraw_pathclose|imagickdraw_pathcurvetoabsolute|imagickdraw_pathcurvetoquadraticbezierabsolute|imagickdraw_pathcurvetoquadraticbezierrelative|imagickdraw_pathcurvetoquadraticbeziersmoothabsolute|imagickdraw_pathcurvetoquadraticbeziersmoothrelative|imagickdraw_pathcurvetorelative|imagickdraw_pathcurvetosmoothabsolute|imagickdraw_pathcurvetosmoothrelative|imagickdraw_pathellipticarcabsolute|imagickdraw_pathellipticarcrelative|imagickdraw_pathfinish|imagickdraw_pathlinetoabsolute|imagickdraw_pathlinetohorizontalabsolute|imagickdraw_pathlinetohorizontalrelative|imagickdraw_pathlinetorelative|imagickdraw_pathlinetoverticalabsolute|imagickdraw_pathlinetoverticalrelative|imagickdraw_pathmovetoabsolute|imagickdraw_pathmovetorelative|imagickdraw_pathstart|imagickdraw_point|imagickdraw_polygon|imagickdraw_polyline|imagickdraw_pop|imagickdraw_popclippath|imagickdraw_popdefs|imagickdraw_poppattern|imagickdraw_push|imagickdraw_pushclippath|imagickdraw_pushdefs|imagickdraw_pushpattern|imagickdraw_rectangle|imagickdraw_render|imagickdraw_rotate|imagickdraw_roundrectangle|imagickdraw_scale|imagickdraw_setclippath|imagickdraw_setcliprule|imagickdraw_setclipunits|imagickdraw_setfillalpha|imagickdraw_setfillcolor|imagickdraw_setfillopacity|imagickdraw_setfillpatternurl|imagickdraw_setfillrule|imagickdraw_setfont|imagickdraw_setfontfamily|imagickdraw_setfontsize|imagickdraw_setfontstretch|imagickdraw_setfontstyle|imagickdraw_setfontweight|imagickdraw_setgravity|imagickdraw_setstrokealpha|imagickdraw_setstrokeantialias|imagickdraw_setstrokecolor|imagickdraw_setstrokedasharray|imagickdraw_setstrokedashoffset|imagickdraw_setstrokelinecap|imagickdraw_setstrokelinejoin|imagickdraw_setstrokemiterlimit|imagickdraw_setstrokeopacity|imagickdraw_setstrokepatternurl|imagickdraw_setstrokewidth|imagickdraw_settextalignment|imagickdraw_settextantialias|imagickdraw_settextdecoration|imagickdraw_settextencoding|imagickdraw_settextundercolor|imagickdraw_setvectorgraphics|imagickdraw_setviewbox|imagickdraw_skewx|imagickdraw_skewy|imagickdraw_translate|imagickpixel|imagickpixel_clear|imagickpixel_construct|imagickpixel_destroy|imagickpixel_getcolor|imagickpixel_getcolorasstring|imagickpixel_getcolorcount|imagickpixel_getcolorvalue|imagickpixel_gethsl|imagickpixel_issimilar|imagickpixel_setcolor|imagickpixel_setcolorvalue|imagickpixel_sethsl|imagickpixeliterator|imagickpixeliterator_clear|imagickpixeliterator_construct|imagickpixeliterator_destroy|imagickpixeliterator_getcurrentiteratorrow|imagickpixeliterator_getiteratorrow|imagickpixeliterator_getnextiteratorrow|imagickpixeliterator_getpreviousiteratorrow|imagickpixeliterator_newpixeliterator|imagickpixeliterator_newpixelregioniterator|imagickpixeliterator_resetiterator|imagickpixeliterator_setiteratorfirstrow|imagickpixeliterator_setiteratorlastrow|imagickpixeliterator_setiteratorrow|imagickpixeliterator_synciterator|imap_8bit|imap_alerts|imap_append|imap_base64|imap_binary|imap_body|imap_bodystruct|imap_check|imap_clearflag_full|imap_close|imap_create|imap_createmailbox|imap_delete|imap_deletemailbox|imap_errors|imap_expunge|imap_fetch_overview|imap_fetchbody|imap_fetchheader|imap_fetchmime|imap_fetchstructure|imap_fetchtext|imap_gc|imap_get_quota|imap_get_quotaroot|imap_getacl|imap_getmailboxes|imap_getsubscribed|imap_header|imap_headerinfo|imap_headers|imap_last_error|imap_list|imap_listmailbox|imap_listscan|imap_listsubscribed|imap_lsub|imap_mail|imap_mail_compose|imap_mail_copy|imap_mail_move|imap_mailboxmsginfo|imap_mime_header_decode|imap_msgno|imap_num_msg|imap_num_recent|imap_open|imap_ping|imap_qprint|imap_rename|imap_renamemailbox|imap_reopen|imap_rfc822_parse_adrlist|imap_rfc822_parse_headers|imap_rfc822_write_address|imap_savebody|imap_scan|imap_scanmailbox|imap_search|imap_set_quota|imap_setacl|imap_setflag_full|imap_sort|imap_status|imap_subscribe|imap_thread|imap_timeout|imap_uid|imap_undelete|imap_unsubscribe|imap_utf7_decode|imap_utf7_encode|imap_utf8|implementsinterface|implode|import_request_variables|in_array|include|include_once|inclued_get_data|inet_ntop|inet_pton|infiniteiterator|ingres_autocommit|ingres_autocommit_state|ingres_charset|ingres_close|ingres_commit|ingres_connect|ingres_cursor|ingres_errno|ingres_error|ingres_errsqlstate|ingres_escape_string|ingres_execute|ingres_fetch_array|ingres_fetch_assoc|ingres_fetch_object|ingres_fetch_proc_return|ingres_fetch_row|ingres_field_length|ingres_field_name|ingres_field_nullable|ingres_field_precision|ingres_field_scale|ingres_field_type|ingres_free_result|ingres_next_error|ingres_num_fields|ingres_num_rows|ingres_pconnect|ingres_prepare|ingres_query|ingres_result_seek|ingres_rollback|ingres_set_environment|ingres_unbuffered_query|ini_alter|ini_get|ini_get_all|ini_restore|ini_set|innamespace|inotify_add_watch|inotify_init|inotify_queue_len|inotify_read|inotify_rm_watch|interface_exists|intl_error_name|intl_get_error_code|intl_get_error_message|intl_is_failure|intldateformatter|intval|invalidargumentexception|invoke|invokeargs|ip2long|iptcembed|iptcparse|is_a|is_array|is_bool|is_callable|is_dir|is_double|is_executable|is_file|is_finite|is_float|is_infinite|is_int|is_integer|is_link|is_long|is_nan|is_null|is_numeric|is_object|is_readable|is_real|is_resource|is_scalar|is_soap_fault|is_string|is_subclass_of|is_uploaded_file|is_writable|is_writeable|isabstract|iscloneable|isdisabled|isfinal|isinstance|isinstantiable|isinterface|isinternal|isiterateable|isset|issubclassof|isuserdefined|iterator|iterator_apply|iterator_count|iterator_to_array|iteratoraggregate|iteratoriterator|java_last_exception_clear|java_last_exception_get|jddayofweek|jdmonthname|jdtofrench|jdtogregorian|jdtojewish|jdtojulian|jdtounix|jewishtojd|join|jpeg2wbmp|json_decode|json_encode|json_last_error|jsonserializable|judy|judy_type|judy_version|juliantojd|kadm5_chpass_principal|kadm5_create_principal|kadm5_delete_principal|kadm5_destroy|kadm5_flush|kadm5_get_policies|kadm5_get_principal|kadm5_get_principals|kadm5_init_with_password|kadm5_modify_principal|key|krsort|ksort|lcfirst|lcg_value|lchgrp|lchown|ldap_8859_to_t61|ldap_add|ldap_bind|ldap_close|ldap_compare|ldap_connect|ldap_count_entries|ldap_delete|ldap_dn2ufn|ldap_err2str|ldap_errno|ldap_error|ldap_explode_dn|ldap_first_attribute|ldap_first_entry|ldap_first_reference|ldap_free_result|ldap_get_attributes|ldap_get_dn|ldap_get_entries|ldap_get_option|ldap_get_values|ldap_get_values_len|ldap_list|ldap_mod_add|ldap_mod_del|ldap_mod_replace|ldap_modify|ldap_next_attribute|ldap_next_entry|ldap_next_reference|ldap_parse_reference|ldap_parse_result|ldap_read|ldap_rename|ldap_sasl_bind|ldap_search|ldap_set_option|ldap_set_rebind_proc|ldap_sort|ldap_start_tls|ldap_t61_to_8859|ldap_unbind|lengthexception|levenshtein|libxml_clear_errors|libxml_disable_entity_loader|libxml_get_errors|libxml_get_last_error|libxml_set_streams_context|libxml_use_internal_errors|libxmlerror|limititerator|link|linkinfo|list|locale|localeconv|localtime|log|log10|log1p|logicexception|long2ip|lstat|ltrim|lzf_compress|lzf_decompress|lzf_optimized_for|m_checkstatus|m_completeauthorizations|m_connect|m_connectionerror|m_deletetrans|m_destroyconn|m_destroyengine|m_getcell|m_getcellbynum|m_getcommadelimited|m_getheader|m_initconn|m_initengine|m_iscommadelimited|m_maxconntimeout|m_monitor|m_numcolumns|m_numrows|m_parsecommadelimited|m_responsekeys|m_responseparam|m_returnstatus|m_setblocking|m_setdropfile|m_setip|m_setssl|m_setssl_cafile|m_setssl_files|m_settimeout|m_sslcert_gen_hash|m_transactionssent|m_transinqueue|m_transkeyval|m_transnew|m_transsend|m_uwait|m_validateidentifier|m_verifyconnection|m_verifysslcert|magic_quotes_runtime|mail|mailparse_determine_best_xfer_encoding|mailparse_msg_create|mailparse_msg_extract_part|mailparse_msg_extract_part_file|mailparse_msg_extract_whole_part_file|mailparse_msg_free|mailparse_msg_get_part|mailparse_msg_get_part_data|mailparse_msg_get_structure|mailparse_msg_parse|mailparse_msg_parse_file|mailparse_rfc822_parse_addresses|mailparse_stream_encode|mailparse_uudecode_all|main|max|maxdb_affected_rows|maxdb_autocommit|maxdb_bind_param|maxdb_bind_result|maxdb_change_user|maxdb_character_set_name|maxdb_client_encoding|maxdb_close|maxdb_close_long_data|maxdb_commit|maxdb_connect|maxdb_connect_errno|maxdb_connect_error|maxdb_data_seek|maxdb_debug|maxdb_disable_reads_from_master|maxdb_disable_rpl_parse|maxdb_dump_debug_info|maxdb_embedded_connect|maxdb_enable_reads_from_master|maxdb_enable_rpl_parse|maxdb_errno|maxdb_error|maxdb_escape_string|maxdb_execute|maxdb_fetch|maxdb_fetch_array|maxdb_fetch_assoc|maxdb_fetch_field|maxdb_fetch_field_direct|maxdb_fetch_fields|maxdb_fetch_lengths|maxdb_fetch_object|maxdb_fetch_row|maxdb_field_count|maxdb_field_seek|maxdb_field_tell|maxdb_free_result|maxdb_get_client_info|maxdb_get_client_version|maxdb_get_host_info|maxdb_get_metadata|maxdb_get_proto_info|maxdb_get_server_info|maxdb_get_server_version|maxdb_info|maxdb_init|maxdb_insert_id|maxdb_kill|maxdb_master_query|maxdb_more_results|maxdb_multi_query|maxdb_next_result|maxdb_num_fields|maxdb_num_rows|maxdb_options|maxdb_param_count|maxdb_ping|maxdb_prepare|maxdb_query|maxdb_real_connect|maxdb_real_escape_string|maxdb_real_query|maxdb_report|maxdb_rollback|maxdb_rpl_parse_enabled|maxdb_rpl_probe|maxdb_rpl_query_type|maxdb_select_db|maxdb_send_long_data|maxdb_send_query|maxdb_server_end|maxdb_server_init|maxdb_set_opt|maxdb_sqlstate|maxdb_ssl_set|maxdb_stat|maxdb_stmt_affected_rows|maxdb_stmt_bind_param|maxdb_stmt_bind_result|maxdb_stmt_close|maxdb_stmt_close_long_data|maxdb_stmt_data_seek|maxdb_stmt_errno|maxdb_stmt_error|maxdb_stmt_execute|maxdb_stmt_fetch|maxdb_stmt_free_result|maxdb_stmt_init|maxdb_stmt_num_rows|maxdb_stmt_param_count|maxdb_stmt_prepare|maxdb_stmt_reset|maxdb_stmt_result_metadata|maxdb_stmt_send_long_data|maxdb_stmt_sqlstate|maxdb_stmt_store_result|maxdb_store_result|maxdb_thread_id|maxdb_thread_safe|maxdb_use_result|maxdb_warning_count|mb_check_encoding|mb_convert_case|mb_convert_encoding|mb_convert_kana|mb_convert_variables|mb_decode_mimeheader|mb_decode_numericentity|mb_detect_encoding|mb_detect_order|mb_encode_mimeheader|mb_encode_numericentity|mb_encoding_aliases|mb_ereg|mb_ereg_match|mb_ereg_replace|mb_ereg_search|mb_ereg_search_getpos|mb_ereg_search_getregs|mb_ereg_search_init|mb_ereg_search_pos|mb_ereg_search_regs|mb_ereg_search_setpos|mb_eregi|mb_eregi_replace|mb_get_info|mb_http_input|mb_http_output|mb_internal_encoding|mb_language|mb_list_encodings|mb_output_handler|mb_parse_str|mb_preferred_mime_name|mb_regex_encoding|mb_regex_set_options|mb_send_mail|mb_split|mb_strcut|mb_strimwidth|mb_stripos|mb_stristr|mb_strlen|mb_strpos|mb_strrchr|mb_strrichr|mb_strripos|mb_strrpos|mb_strstr|mb_strtolower|mb_strtoupper|mb_strwidth|mb_substitute_character|mb_substr|mb_substr_count|mcrypt_cbc|mcrypt_cfb|mcrypt_create_iv|mcrypt_decrypt|mcrypt_ecb|mcrypt_enc_get_algorithms_name|mcrypt_enc_get_block_size|mcrypt_enc_get_iv_size|mcrypt_enc_get_key_size|mcrypt_enc_get_modes_name|mcrypt_enc_get_supported_key_sizes|mcrypt_enc_is_block_algorithm|mcrypt_enc_is_block_algorithm_mode|mcrypt_enc_is_block_mode|mcrypt_enc_self_test|mcrypt_encrypt|mcrypt_generic|mcrypt_generic_deinit|mcrypt_generic_end|mcrypt_generic_init|mcrypt_get_block_size|mcrypt_get_cipher_name|mcrypt_get_iv_size|mcrypt_get_key_size|mcrypt_list_algorithms|mcrypt_list_modes|mcrypt_module_close|mcrypt_module_get_algo_block_size|mcrypt_module_get_algo_key_size|mcrypt_module_get_supported_key_sizes|mcrypt_module_is_block_algorithm|mcrypt_module_is_block_algorithm_mode|mcrypt_module_is_block_mode|mcrypt_module_open|mcrypt_module_self_test|mcrypt_ofb|md5|md5_file|mdecrypt_generic|memcache|memcache_debug|memcached|memory_get_peak_usage|memory_get_usage|messageformatter|metaphone|method_exists|mhash|mhash_count|mhash_get_block_size|mhash_get_hash_name|mhash_keygen_s2k|microtime|mime_content_type|min|ming_keypress|ming_setcubicthreshold|ming_setscale|ming_setswfcompression|ming_useconstants|ming_useswfversion|mkdir|mktime|money_format|mongo|mongobindata|mongocode|mongocollection|mongoconnectionexception|mongocursor|mongocursorexception|mongocursortimeoutexception|mongodate|mongodb|mongodbref|mongoexception|mongogridfs|mongogridfscursor|mongogridfsexception|mongogridfsfile|mongoid|mongoint32|mongoint64|mongomaxkey|mongominkey|mongoregex|mongotimestamp|move_uploaded_file|mpegfile|mqseries_back|mqseries_begin|mqseries_close|mqseries_cmit|mqseries_conn|mqseries_connx|mqseries_disc|mqseries_get|mqseries_inq|mqseries_open|mqseries_put|mqseries_put1|mqseries_set|mqseries_strerror|msession_connect|msession_count|msession_create|msession_destroy|msession_disconnect|msession_find|msession_get|msession_get_array|msession_get_data|msession_inc|msession_list|msession_listvar|msession_lock|msession_plugin|msession_randstr|msession_set|msession_set_array|msession_set_data|msession_timeout|msession_uniq|msession_unlock|msg_get_queue|msg_queue_exists|msg_receive|msg_remove_queue|msg_send|msg_set_queue|msg_stat_queue|msql|msql_affected_rows|msql_close|msql_connect|msql_create_db|msql_createdb|msql_data_seek|msql_db_query|msql_dbname|msql_drop_db|msql_error|msql_fetch_array|msql_fetch_field|msql_fetch_object|msql_fetch_row|msql_field_flags|msql_field_len|msql_field_name|msql_field_seek|msql_field_table|msql_field_type|msql_fieldflags|msql_fieldlen|msql_fieldname|msql_fieldtable|msql_fieldtype|msql_free_result|msql_list_dbs|msql_list_fields|msql_list_tables|msql_num_fields|msql_num_rows|msql_numfields|msql_numrows|msql_pconnect|msql_query|msql_regcase|msql_result|msql_select_db|msql_tablename|mssql_bind|mssql_close|mssql_connect|mssql_data_seek|mssql_execute|mssql_fetch_array|mssql_fetch_assoc|mssql_fetch_batch|mssql_fetch_field|mssql_fetch_object|mssql_fetch_row|mssql_field_length|mssql_field_name|mssql_field_seek|mssql_field_type|mssql_free_result|mssql_free_statement|mssql_get_last_message|mssql_guid_string|mssql_init|mssql_min_error_severity|mssql_min_message_severity|mssql_next_result|mssql_num_fields|mssql_num_rows|mssql_pconnect|mssql_query|mssql_result|mssql_rows_affected|mssql_select_db|mt_getrandmax|mt_rand|mt_srand|multipleiterator|mysql_affected_rows|mysql_client_encoding|mysql_close|mysql_connect|mysql_create_db|mysql_data_seek|mysql_db_name|mysql_db_query|mysql_drop_db|mysql_errno|mysql_error|mysql_escape_string|mysql_fetch_array|mysql_fetch_assoc|mysql_fetch_field|mysql_fetch_lengths|mysql_fetch_object|mysql_fetch_row|mysql_field_flags|mysql_field_len|mysql_field_name|mysql_field_seek|mysql_field_table|mysql_field_type|mysql_free_result|mysql_get_client_info|mysql_get_host_info|mysql_get_proto_info|mysql_get_server_info|mysql_info|mysql_insert_id|mysql_list_dbs|mysql_list_fields|mysql_list_processes|mysql_list_tables|mysql_num_fields|mysql_num_rows|mysql_pconnect|mysql_ping|mysql_query|mysql_real_escape_string|mysql_result|mysql_select_db|mysql_set_charset|mysql_stat|mysql_tablename|mysql_thread_id|mysql_unbuffered_query|mysqli|mysqli_bind_param|mysqli_bind_result|mysqli_client_encoding|mysqli_connect|mysqli_disable_reads_from_master|mysqli_disable_rpl_parse|mysqli_driver|mysqli_enable_reads_from_master|mysqli_enable_rpl_parse|mysqli_escape_string|mysqli_execute|mysqli_fetch|mysqli_get_metadata|mysqli_master_query|mysqli_param_count|mysqli_report|mysqli_result|mysqli_rpl_parse_enabled|mysqli_rpl_probe|mysqli_rpl_query_type|mysqli_send_long_data|mysqli_send_query|mysqli_set_opt|mysqli_slave_query|mysqli_stmt|mysqli_warning|mysqlnd_ms_get_stats|mysqlnd_ms_query_is_select|mysqlnd_ms_set_user_pick_server|mysqlnd_qc_change_handler|mysqlnd_qc_clear_cache|mysqlnd_qc_get_cache_info|mysqlnd_qc_get_core_stats|mysqlnd_qc_get_handler|mysqlnd_qc_get_query_trace_log|mysqlnd_qc_set_user_handlers|natcasesort|natsort|ncurses_addch|ncurses_addchnstr|ncurses_addchstr|ncurses_addnstr|ncurses_addstr|ncurses_assume_default_colors|ncurses_attroff|ncurses_attron|ncurses_attrset|ncurses_baudrate|ncurses_beep|ncurses_bkgd|ncurses_bkgdset|ncurses_border|ncurses_bottom_panel|ncurses_can_change_color|ncurses_cbreak|ncurses_clear|ncurses_clrtobot|ncurses_clrtoeol|ncurses_color_content|ncurses_color_set|ncurses_curs_set|ncurses_def_prog_mode|ncurses_def_shell_mode|ncurses_define_key|ncurses_del_panel|ncurses_delay_output|ncurses_delch|ncurses_deleteln|ncurses_delwin|ncurses_doupdate|ncurses_echo|ncurses_echochar|ncurses_end|ncurses_erase|ncurses_erasechar|ncurses_filter|ncurses_flash|ncurses_flushinp|ncurses_getch|ncurses_getmaxyx|ncurses_getmouse|ncurses_getyx|ncurses_halfdelay|ncurses_has_colors|ncurses_has_ic|ncurses_has_il|ncurses_has_key|ncurses_hide_panel|ncurses_hline|ncurses_inch|ncurses_init|ncurses_init_color|ncurses_init_pair|ncurses_insch|ncurses_insdelln|ncurses_insertln|ncurses_insstr|ncurses_instr|ncurses_isendwin|ncurses_keyok|ncurses_keypad|ncurses_killchar|ncurses_longname|ncurses_meta|ncurses_mouse_trafo|ncurses_mouseinterval|ncurses_mousemask|ncurses_move|ncurses_move_panel|ncurses_mvaddch|ncurses_mvaddchnstr|ncurses_mvaddchstr|ncurses_mvaddnstr|ncurses_mvaddstr|ncurses_mvcur|ncurses_mvdelch|ncurses_mvgetch|ncurses_mvhline|ncurses_mvinch|ncurses_mvvline|ncurses_mvwaddstr|ncurses_napms|ncurses_new_panel|ncurses_newpad|ncurses_newwin|ncurses_nl|ncurses_nocbreak|ncurses_noecho|ncurses_nonl|ncurses_noqiflush|ncurses_noraw|ncurses_pair_content|ncurses_panel_above|ncurses_panel_below|ncurses_panel_window|ncurses_pnoutrefresh|ncurses_prefresh|ncurses_putp|ncurses_qiflush|ncurses_raw|ncurses_refresh|ncurses_replace_panel|ncurses_reset_prog_mode|ncurses_reset_shell_mode|ncurses_resetty|ncurses_savetty|ncurses_scr_dump|ncurses_scr_init|ncurses_scr_restore|ncurses_scr_set|ncurses_scrl|ncurses_show_panel|ncurses_slk_attr|ncurses_slk_attroff|ncurses_slk_attron|ncurses_slk_attrset|ncurses_slk_clear|ncurses_slk_color|ncurses_slk_init|ncurses_slk_noutrefresh|ncurses_slk_refresh|ncurses_slk_restore|ncurses_slk_set|ncurses_slk_touch|ncurses_standend|ncurses_standout|ncurses_start_color|ncurses_termattrs|ncurses_termname|ncurses_timeout|ncurses_top_panel|ncurses_typeahead|ncurses_ungetch|ncurses_ungetmouse|ncurses_update_panels|ncurses_use_default_colors|ncurses_use_env|ncurses_use_extended_names|ncurses_vidattr|ncurses_vline|ncurses_waddch|ncurses_waddstr|ncurses_wattroff|ncurses_wattron|ncurses_wattrset|ncurses_wborder|ncurses_wclear|ncurses_wcolor_set|ncurses_werase|ncurses_wgetch|ncurses_whline|ncurses_wmouse_trafo|ncurses_wmove|ncurses_wnoutrefresh|ncurses_wrefresh|ncurses_wstandend|ncurses_wstandout|ncurses_wvline|newinstance|newinstanceargs|newt_bell|newt_button|newt_button_bar|newt_centered_window|newt_checkbox|newt_checkbox_get_value|newt_checkbox_set_flags|newt_checkbox_set_value|newt_checkbox_tree|newt_checkbox_tree_add_item|newt_checkbox_tree_find_item|newt_checkbox_tree_get_current|newt_checkbox_tree_get_entry_value|newt_checkbox_tree_get_multi_selection|newt_checkbox_tree_get_selection|newt_checkbox_tree_multi|newt_checkbox_tree_set_current|newt_checkbox_tree_set_entry|newt_checkbox_tree_set_entry_value|newt_checkbox_tree_set_width|newt_clear_key_buffer|newt_cls|newt_compact_button|newt_component_add_callback|newt_component_takes_focus|newt_create_grid|newt_cursor_off|newt_cursor_on|newt_delay|newt_draw_form|newt_draw_root_text|newt_entry|newt_entry_get_value|newt_entry_set|newt_entry_set_filter|newt_entry_set_flags|newt_finished|newt_form|newt_form_add_component|newt_form_add_components|newt_form_add_hot_key|newt_form_destroy|newt_form_get_current|newt_form_run|newt_form_set_background|newt_form_set_height|newt_form_set_size|newt_form_set_timer|newt_form_set_width|newt_form_watch_fd|newt_get_screen_size|newt_grid_add_components_to_form|newt_grid_basic_window|newt_grid_free|newt_grid_get_size|newt_grid_h_close_stacked|newt_grid_h_stacked|newt_grid_place|newt_grid_set_field|newt_grid_simple_window|newt_grid_v_close_stacked|newt_grid_v_stacked|newt_grid_wrapped_window|newt_grid_wrapped_window_at|newt_init|newt_label|newt_label_set_text|newt_listbox|newt_listbox_append_entry|newt_listbox_clear|newt_listbox_clear_selection|newt_listbox_delete_entry|newt_listbox_get_current|newt_listbox_get_selection|newt_listbox_insert_entry|newt_listbox_item_count|newt_listbox_select_item|newt_listbox_set_current|newt_listbox_set_current_by_key|newt_listbox_set_data|newt_listbox_set_entry|newt_listbox_set_width|newt_listitem|newt_listitem_get_data|newt_listitem_set|newt_open_window|newt_pop_help_line|newt_pop_window|newt_push_help_line|newt_radio_get_current|newt_radiobutton|newt_redraw_help_line|newt_reflow_text|newt_refresh|newt_resize_screen|newt_resume|newt_run_form|newt_scale|newt_scale_set|newt_scrollbar_set|newt_set_help_callback|newt_set_suspend_callback|newt_suspend|newt_textbox|newt_textbox_get_num_lines|newt_textbox_reflowed|newt_textbox_set_height|newt_textbox_set_text|newt_vertical_scrollbar|newt_wait_for_key|newt_win_choice|newt_win_entries|newt_win_menu|newt_win_message|newt_win_messagev|newt_win_ternary|next|ngettext|nl2br|nl_langinfo|norewinditerator|normalizer|notes_body|notes_copy_db|notes_create_db|notes_create_note|notes_drop_db|notes_find_note|notes_header_info|notes_list_msgs|notes_mark_read|notes_mark_unread|notes_nav_create|notes_search|notes_unread|notes_version|nsapi_request_headers|nsapi_response_headers|nsapi_virtual|nthmac|number_format|numberformatter|oauth|oauth_get_sbs|oauth_urlencode|oauthexception|oauthprovider|ob_clean|ob_deflatehandler|ob_end_clean|ob_end_flush|ob_etaghandler|ob_flush|ob_get_clean|ob_get_contents|ob_get_flush|ob_get_length|ob_get_level|ob_get_status|ob_gzhandler|ob_iconv_handler|ob_implicit_flush|ob_inflatehandler|ob_list_handlers|ob_start|ob_tidyhandler|oci_bind_array_by_name|oci_bind_by_name|oci_cancel|oci_client_version|oci_close|oci_collection_append|oci_collection_assign|oci_collection_element_assign|oci_collection_element_get|oci_collection_free|oci_collection_max|oci_collection_size|oci_collection_trim|oci_commit|oci_connect|oci_define_by_name|oci_error|oci_execute|oci_fetch|oci_fetch_all|oci_fetch_array|oci_fetch_assoc|oci_fetch_object|oci_fetch_row|oci_field_is_null|oci_field_name|oci_field_precision|oci_field_scale|oci_field_size|oci_field_type|oci_field_type_raw|oci_free_statement|oci_internal_debug|oci_lob_append|oci_lob_close|oci_lob_copy|oci_lob_eof|oci_lob_erase|oci_lob_export|oci_lob_flush|oci_lob_free|oci_lob_getbuffering|oci_lob_import|oci_lob_is_equal|oci_lob_load|oci_lob_read|oci_lob_rewind|oci_lob_save|oci_lob_savefile|oci_lob_seek|oci_lob_setbuffering|oci_lob_size|oci_lob_tell|oci_lob_truncate|oci_lob_write|oci_lob_writetemporary|oci_lob_writetofile|oci_new_collection|oci_new_connect|oci_new_cursor|oci_new_descriptor|oci_num_fields|oci_num_rows|oci_parse|oci_password_change|oci_pconnect|oci_result|oci_rollback|oci_server_version|oci_set_action|oci_set_client_identifier|oci_set_client_info|oci_set_edition|oci_set_module_name|oci_set_prefetch|oci_statement_type|ocibindbyname|ocicancel|ocicloselob|ocicollappend|ocicollassign|ocicollassignelem|ocicollgetelem|ocicollmax|ocicollsize|ocicolltrim|ocicolumnisnull|ocicolumnname|ocicolumnprecision|ocicolumnscale|ocicolumnsize|ocicolumntype|ocicolumntyperaw|ocicommit|ocidefinebyname|ocierror|ociexecute|ocifetch|ocifetchinto|ocifetchstatement|ocifreecollection|ocifreecursor|ocifreedesc|ocifreestatement|ociinternaldebug|ociloadlob|ocilogoff|ocilogon|ocinewcollection|ocinewcursor|ocinewdescriptor|ocinlogon|ocinumcols|ociparse|ociplogon|ociresult|ocirollback|ocirowcount|ocisavelob|ocisavelobfile|ociserverversion|ocisetprefetch|ocistatementtype|ociwritelobtofile|ociwritetemporarylob|octdec|odbc_autocommit|odbc_binmode|odbc_close|odbc_close_all|odbc_columnprivileges|odbc_columns|odbc_commit|odbc_connect|odbc_cursor|odbc_data_source|odbc_do|odbc_error|odbc_errormsg|odbc_exec|odbc_execute|odbc_fetch_array|odbc_fetch_into|odbc_fetch_object|odbc_fetch_row|odbc_field_len|odbc_field_name|odbc_field_num|odbc_field_precision|odbc_field_scale|odbc_field_type|odbc_foreignkeys|odbc_free_result|odbc_gettypeinfo|odbc_longreadlen|odbc_next_result|odbc_num_fields|odbc_num_rows|odbc_pconnect|odbc_prepare|odbc_primarykeys|odbc_procedurecolumns|odbc_procedures|odbc_result|odbc_result_all|odbc_rollback|odbc_setoption|odbc_specialcolumns|odbc_statistics|odbc_tableprivileges|odbc_tables|openal_buffer_create|openal_buffer_data|openal_buffer_destroy|openal_buffer_get|openal_buffer_loadwav|openal_context_create|openal_context_current|openal_context_destroy|openal_context_process|openal_context_suspend|openal_device_close|openal_device_open|openal_listener_get|openal_listener_set|openal_source_create|openal_source_destroy|openal_source_get|openal_source_pause|openal_source_play|openal_source_rewind|openal_source_set|openal_source_stop|openal_stream|opendir|openlog|openssl_cipher_iv_length|openssl_csr_export|openssl_csr_export_to_file|openssl_csr_get_public_key|openssl_csr_get_subject|openssl_csr_new|openssl_csr_sign|openssl_decrypt|openssl_dh_compute_key|openssl_digest|openssl_encrypt|openssl_error_string|openssl_free_key|openssl_get_cipher_methods|openssl_get_md_methods|openssl_get_privatekey|openssl_get_publickey|openssl_open|openssl_pkcs12_export|openssl_pkcs12_export_to_file|openssl_pkcs12_read|openssl_pkcs7_decrypt|openssl_pkcs7_encrypt|openssl_pkcs7_sign|openssl_pkcs7_verify|openssl_pkey_export|openssl_pkey_export_to_file|openssl_pkey_free|openssl_pkey_get_details|openssl_pkey_get_private|openssl_pkey_get_public|openssl_pkey_new|openssl_private_decrypt|openssl_private_encrypt|openssl_public_decrypt|openssl_public_encrypt|openssl_random_pseudo_bytes|openssl_seal|openssl_sign|openssl_verify|openssl_x509_check_private_key|openssl_x509_checkpurpose|openssl_x509_export|openssl_x509_export_to_file|openssl_x509_free|openssl_x509_parse|openssl_x509_read|ord|outeriterator|outofboundsexception|outofrangeexception|output_add_rewrite_var|output_reset_rewrite_vars|overflowexception|overload|override_function|ovrimos_close|ovrimos_commit|ovrimos_connect|ovrimos_cursor|ovrimos_exec|ovrimos_execute|ovrimos_fetch_into|ovrimos_fetch_row|ovrimos_field_len|ovrimos_field_name|ovrimos_field_num|ovrimos_field_type|ovrimos_free_result|ovrimos_longreadlen|ovrimos_num_fields|ovrimos_num_rows|ovrimos_prepare|ovrimos_result|ovrimos_result_all|ovrimos_rollback|pack|parentiterator|parse_ini_file|parse_ini_string|parse_str|parse_url|parsekit_compile_file|parsekit_compile_string|parsekit_func_arginfo|passthru|pathinfo|pclose|pcntl_alarm|pcntl_exec|pcntl_fork|pcntl_getpriority|pcntl_setpriority|pcntl_signal|pcntl_signal_dispatch|pcntl_sigprocmask|pcntl_sigtimedwait|pcntl_sigwaitinfo|pcntl_wait|pcntl_waitpid|pcntl_wexitstatus|pcntl_wifexited|pcntl_wifsignaled|pcntl_wifstopped|pcntl_wstopsig|pcntl_wtermsig|pdf_activate_item|pdf_add_annotation|pdf_add_bookmark|pdf_add_launchlink|pdf_add_locallink|pdf_add_nameddest|pdf_add_note|pdf_add_outline|pdf_add_pdflink|pdf_add_table_cell|pdf_add_textflow|pdf_add_thumbnail|pdf_add_weblink|pdf_arc|pdf_arcn|pdf_attach_file|pdf_begin_document|pdf_begin_font|pdf_begin_glyph|pdf_begin_item|pdf_begin_layer|pdf_begin_page|pdf_begin_page_ext|pdf_begin_pattern|pdf_begin_template|pdf_begin_template_ext|pdf_circle|pdf_clip|pdf_close|pdf_close_image|pdf_close_pdi|pdf_close_pdi_page|pdf_closepath|pdf_closepath_fill_stroke|pdf_closepath_stroke|pdf_concat|pdf_continue_text|pdf_create_3dview|pdf_create_action|pdf_create_annotation|pdf_create_bookmark|pdf_create_field|pdf_create_fieldgroup|pdf_create_gstate|pdf_create_pvf|pdf_create_textflow|pdf_curveto|pdf_define_layer|pdf_delete|pdf_delete_pvf|pdf_delete_table|pdf_delete_textflow|pdf_encoding_set_char|pdf_end_document|pdf_end_font|pdf_end_glyph|pdf_end_item|pdf_end_layer|pdf_end_page|pdf_end_page_ext|pdf_end_pattern|pdf_end_template|pdf_endpath|pdf_fill|pdf_fill_imageblock|pdf_fill_pdfblock|pdf_fill_stroke|pdf_fill_textblock|pdf_findfont|pdf_fit_image|pdf_fit_pdi_page|pdf_fit_table|pdf_fit_textflow|pdf_fit_textline|pdf_get_apiname|pdf_get_buffer|pdf_get_errmsg|pdf_get_errnum|pdf_get_font|pdf_get_fontname|pdf_get_fontsize|pdf_get_image_height|pdf_get_image_width|pdf_get_majorversion|pdf_get_minorversion|pdf_get_parameter|pdf_get_pdi_parameter|pdf_get_pdi_value|pdf_get_value|pdf_info_font|pdf_info_matchbox|pdf_info_table|pdf_info_textflow|pdf_info_textline|pdf_initgraphics|pdf_lineto|pdf_load_3ddata|pdf_load_font|pdf_load_iccprofile|pdf_load_image|pdf_makespotcolor|pdf_moveto|pdf_new|pdf_open_ccitt|pdf_open_file|pdf_open_gif|pdf_open_image|pdf_open_image_file|pdf_open_jpeg|pdf_open_memory_image|pdf_open_pdi|pdf_open_pdi_document|pdf_open_pdi_page|pdf_open_tiff|pdf_pcos_get_number|pdf_pcos_get_stream|pdf_pcos_get_string|pdf_place_image|pdf_place_pdi_page|pdf_process_pdi|pdf_rect|pdf_restore|pdf_resume_page|pdf_rotate|pdf_save|pdf_scale|pdf_set_border_color|pdf_set_border_dash|pdf_set_border_style|pdf_set_char_spacing|pdf_set_duration|pdf_set_gstate|pdf_set_horiz_scaling|pdf_set_info|pdf_set_info_author|pdf_set_info_creator|pdf_set_info_keywords|pdf_set_info_subject|pdf_set_info_title|pdf_set_layer_dependency|pdf_set_leading|pdf_set_parameter|pdf_set_text_matrix|pdf_set_text_pos|pdf_set_text_rendering|pdf_set_text_rise|pdf_set_value|pdf_set_word_spacing|pdf_setcolor|pdf_setdash|pdf_setdashpattern|pdf_setflat|pdf_setfont|pdf_setgray|pdf_setgray_fill|pdf_setgray_stroke|pdf_setlinecap|pdf_setlinejoin|pdf_setlinewidth|pdf_setmatrix|pdf_setmiterlimit|pdf_setpolydash|pdf_setrgbcolor|pdf_setrgbcolor_fill|pdf_setrgbcolor_stroke|pdf_shading|pdf_shading_pattern|pdf_shfill|pdf_show|pdf_show_boxed|pdf_show_xy|pdf_skew|pdf_stringwidth|pdf_stroke|pdf_suspend_page|pdf_translate|pdf_utf16_to_utf8|pdf_utf32_to_utf16|pdf_utf8_to_utf16|pdo|pdo_cubrid_schema|pdo_pgsqllobcreate|pdo_pgsqllobopen|pdo_pgsqllobunlink|pdo_sqlitecreateaggregate|pdo_sqlitecreatefunction|pdoexception|pdostatement|pfsockopen|pg_affected_rows|pg_cancel_query|pg_client_encoding|pg_close|pg_connect|pg_connection_busy|pg_connection_reset|pg_connection_status|pg_convert|pg_copy_from|pg_copy_to|pg_dbname|pg_delete|pg_end_copy|pg_escape_bytea|pg_escape_string|pg_execute|pg_fetch_all|pg_fetch_all_columns|pg_fetch_array|pg_fetch_assoc|pg_fetch_object|pg_fetch_result|pg_fetch_row|pg_field_is_null|pg_field_name|pg_field_num|pg_field_prtlen|pg_field_size|pg_field_table|pg_field_type|pg_field_type_oid|pg_free_result|pg_get_notify|pg_get_pid|pg_get_result|pg_host|pg_insert|pg_last_error|pg_last_notice|pg_last_oid|pg_lo_close|pg_lo_create|pg_lo_export|pg_lo_import|pg_lo_open|pg_lo_read|pg_lo_read_all|pg_lo_seek|pg_lo_tell|pg_lo_unlink|pg_lo_write|pg_meta_data|pg_num_fields|pg_num_rows|pg_options|pg_parameter_status|pg_pconnect|pg_ping|pg_port|pg_prepare|pg_put_line|pg_query|pg_query_params|pg_result_error|pg_result_error_field|pg_result_seek|pg_result_status|pg_select|pg_send_execute|pg_send_prepare|pg_send_query|pg_send_query_params|pg_set_client_encoding|pg_set_error_verbosity|pg_trace|pg_transaction_status|pg_tty|pg_unescape_bytea|pg_untrace|pg_update|pg_version|php_check_syntax|php_ini_loaded_file|php_ini_scanned_files|php_logo_guid|php_sapi_name|php_strip_whitespace|php_uname|phpcredits|phpinfo|phpversion|pi|png2wbmp|popen|pos|posix_access|posix_ctermid|posix_errno|posix_get_last_error|posix_getcwd|posix_getegid|posix_geteuid|posix_getgid|posix_getgrgid|posix_getgrnam|posix_getgroups|posix_getlogin|posix_getpgid|posix_getpgrp|posix_getpid|posix_getppid|posix_getpwnam|posix_getpwuid|posix_getrlimit|posix_getsid|posix_getuid|posix_initgroups|posix_isatty|posix_kill|posix_mkfifo|posix_mknod|posix_setegid|posix_seteuid|posix_setgid|posix_setpgid|posix_setsid|posix_setuid|posix_strerror|posix_times|posix_ttyname|posix_uname|pow|preg_filter|preg_grep|preg_last_error|preg_match|preg_match_all|preg_quote|preg_replace|preg_replace_callback|preg_split|prev|print|print_r|printer_abort|printer_close|printer_create_brush|printer_create_dc|printer_create_font|printer_create_pen|printer_delete_brush|printer_delete_dc|printer_delete_font|printer_delete_pen|printer_draw_bmp|printer_draw_chord|printer_draw_elipse|printer_draw_line|printer_draw_pie|printer_draw_rectangle|printer_draw_roundrect|printer_draw_text|printer_end_doc|printer_end_page|printer_get_option|printer_list|printer_logical_fontheight|printer_open|printer_select_brush|printer_select_font|printer_select_pen|printer_set_option|printer_start_doc|printer_start_page|printer_write|printf|proc_close|proc_get_status|proc_nice|proc_open|proc_terminate|property_exists|ps_add_bookmark|ps_add_launchlink|ps_add_locallink|ps_add_note|ps_add_pdflink|ps_add_weblink|ps_arc|ps_arcn|ps_begin_page|ps_begin_pattern|ps_begin_template|ps_circle|ps_clip|ps_close|ps_close_image|ps_closepath|ps_closepath_stroke|ps_continue_text|ps_curveto|ps_delete|ps_end_page|ps_end_pattern|ps_end_template|ps_fill|ps_fill_stroke|ps_findfont|ps_get_buffer|ps_get_parameter|ps_get_value|ps_hyphenate|ps_include_file|ps_lineto|ps_makespotcolor|ps_moveto|ps_new|ps_open_file|ps_open_image|ps_open_image_file|ps_open_memory_image|ps_place_image|ps_rect|ps_restore|ps_rotate|ps_save|ps_scale|ps_set_border_color|ps_set_border_dash|ps_set_border_style|ps_set_info|ps_set_parameter|ps_set_text_pos|ps_set_value|ps_setcolor|ps_setdash|ps_setflat|ps_setfont|ps_setgray|ps_setlinecap|ps_setlinejoin|ps_setlinewidth|ps_setmiterlimit|ps_setoverprintmode|ps_setpolydash|ps_shading|ps_shading_pattern|ps_shfill|ps_show|ps_show2|ps_show_boxed|ps_show_xy|ps_show_xy2|ps_string_geometry|ps_stringwidth|ps_stroke|ps_symbol|ps_symbol_name|ps_symbol_width|ps_translate|pspell_add_to_personal|pspell_add_to_session|pspell_check|pspell_clear_session|pspell_config_create|pspell_config_data_dir|pspell_config_dict_dir|pspell_config_ignore|pspell_config_mode|pspell_config_personal|pspell_config_repl|pspell_config_runtogether|pspell_config_save_repl|pspell_new|pspell_new_config|pspell_new_personal|pspell_save_wordlist|pspell_store_replacement|pspell_suggest|putenv|px_close|px_create_fp|px_date2string|px_delete|px_delete_record|px_get_field|px_get_info|px_get_parameter|px_get_record|px_get_schema|px_get_value|px_insert_record|px_new|px_numfields|px_numrecords|px_open_fp|px_put_record|px_retrieve_record|px_set_blob_file|px_set_parameter|px_set_tablename|px_set_targetencoding|px_set_value|px_timestamp2string|px_update_record|qdom_error|qdom_tree|quoted_printable_decode|quoted_printable_encode|quotemeta|rad2deg|radius_acct_open|radius_add_server|radius_auth_open|radius_close|radius_config|radius_create_request|radius_cvt_addr|radius_cvt_int|radius_cvt_string|radius_demangle|radius_demangle_mppe_key|radius_get_attr|radius_get_vendor_attr|radius_put_addr|radius_put_attr|radius_put_int|radius_put_string|radius_put_vendor_addr|radius_put_vendor_attr|radius_put_vendor_int|radius_put_vendor_string|radius_request_authenticator|radius_send_request|radius_server_secret|radius_strerror|rand|range|rangeexception|rar_wrapper_cache_stats|rararchive|rarentry|rarexception|rawurldecode|rawurlencode|read_exif_data|readdir|readfile|readgzfile|readline|readline_add_history|readline_callback_handler_install|readline_callback_handler_remove|readline_callback_read_char|readline_clear_history|readline_completion_function|readline_info|readline_list_history|readline_on_new_line|readline_read_history|readline_redisplay|readline_write_history|readlink|realpath|realpath_cache_get|realpath_cache_size|recode|recode_file|recode_string|recursivearrayiterator|recursivecachingiterator|recursivecallbackfilteriterator|recursivedirectoryiterator|recursivefilteriterator|recursiveiterator|recursiveiteratoriterator|recursiveregexiterator|recursivetreeiterator|reflection|reflectionclass|reflectionexception|reflectionextension|reflectionfunction|reflectionfunctionabstract|reflectionmethod|reflectionobject|reflectionparameter|reflectionproperty|reflector|regexiterator|register_shutdown_function|register_tick_function|rename|rename_function|require|require_once|reset|resetValue|resourcebundle|restore_error_handler|restore_exception_handler|restore_include_path|return|rewind|rewinddir|rmdir|round|rpm_close|rpm_get_tag|rpm_is_valid|rpm_open|rpm_version|rrd_create|rrd_error|rrd_fetch|rrd_first|rrd_graph|rrd_info|rrd_last|rrd_lastupdate|rrd_restore|rrd_tune|rrd_update|rrd_xport|rrdcreator|rrdgraph|rrdupdater|rsort|rtrim|runkit_class_adopt|runkit_class_emancipate|runkit_constant_add|runkit_constant_redefine|runkit_constant_remove|runkit_function_add|runkit_function_copy|runkit_function_redefine|runkit_function_remove|runkit_function_rename|runkit_import|runkit_lint|runkit_lint_file|runkit_method_add|runkit_method_copy|runkit_method_redefine|runkit_method_remove|runkit_method_rename|runkit_return_value_used|runkit_sandbox_output_handler|runkit_superglobals|runtimeexception|samconnection_commit|samconnection_connect|samconnection_constructor|samconnection_disconnect|samconnection_errno|samconnection_error|samconnection_isconnected|samconnection_peek|samconnection_peekall|samconnection_receive|samconnection_remove|samconnection_rollback|samconnection_send|samconnection_setDebug|samconnection_subscribe|samconnection_unsubscribe|sammessage_body|sammessage_constructor|sammessage_header|sca_createdataobject|sca_getservice|sca_localproxy_createdataobject|sca_soapproxy_createdataobject|scandir|sdo_das_changesummary_beginlogging|sdo_das_changesummary_endlogging|sdo_das_changesummary_getchangeddataobjects|sdo_das_changesummary_getchangetype|sdo_das_changesummary_getoldcontainer|sdo_das_changesummary_getoldvalues|sdo_das_changesummary_islogging|sdo_das_datafactory_addpropertytotype|sdo_das_datafactory_addtype|sdo_das_datafactory_getdatafactory|sdo_das_dataobject_getchangesummary|sdo_das_relational_applychanges|sdo_das_relational_construct|sdo_das_relational_createrootdataobject|sdo_das_relational_executepreparedquery|sdo_das_relational_executequery|sdo_das_setting_getlistindex|sdo_das_setting_getpropertyindex|sdo_das_setting_getpropertyname|sdo_das_setting_getvalue|sdo_das_setting_isset|sdo_das_xml_addtypes|sdo_das_xml_create|sdo_das_xml_createdataobject|sdo_das_xml_createdocument|sdo_das_xml_document_getrootdataobject|sdo_das_xml_document_getrootelementname|sdo_das_xml_document_getrootelementuri|sdo_das_xml_document_setencoding|sdo_das_xml_document_setxmldeclaration|sdo_das_xml_document_setxmlversion|sdo_das_xml_loadfile|sdo_das_xml_loadstring|sdo_das_xml_savefile|sdo_das_xml_savestring|sdo_datafactory_create|sdo_dataobject_clear|sdo_dataobject_createdataobject|sdo_dataobject_getcontainer|sdo_dataobject_getsequence|sdo_dataobject_gettypename|sdo_dataobject_gettypenamespaceuri|sdo_exception_getcause|sdo_list_insert|sdo_model_property_getcontainingtype|sdo_model_property_getdefault|sdo_model_property_getname|sdo_model_property_gettype|sdo_model_property_iscontainment|sdo_model_property_ismany|sdo_model_reflectiondataobject_construct|sdo_model_reflectiondataobject_export|sdo_model_reflectiondataobject_getcontainmentproperty|sdo_model_reflectiondataobject_getinstanceproperties|sdo_model_reflectiondataobject_gettype|sdo_model_type_getbasetype|sdo_model_type_getname|sdo_model_type_getnamespaceuri|sdo_model_type_getproperties|sdo_model_type_getproperty|sdo_model_type_isabstracttype|sdo_model_type_isdatatype|sdo_model_type_isinstance|sdo_model_type_isopentype|sdo_model_type_issequencedtype|sdo_sequence_getproperty|sdo_sequence_insert|sdo_sequence_move|seekableiterator|sem_acquire|sem_get|sem_release|sem_remove|serializable|serialize|session_cache_expire|session_cache_limiter|session_commit|session_decode|session_destroy|session_encode|session_get_cookie_params|session_id|session_is_registered|session_module_name|session_name|session_pgsql_add_error|session_pgsql_get_error|session_pgsql_get_field|session_pgsql_reset|session_pgsql_set_field|session_pgsql_status|session_regenerate_id|session_register|session_save_path|session_set_cookie_params|session_set_save_handler|session_start|session_unregister|session_unset|session_write_close|setCounterClass|set_error_handler|set_exception_handler|set_file_buffer|set_include_path|set_magic_quotes_runtime|set_socket_blocking|set_time_limit|setcookie|setlocale|setproctitle|setrawcookie|setstaticpropertyvalue|setthreadtitle|settype|sha1|sha1_file|shell_exec|shm_attach|shm_detach|shm_get_var|shm_has_var|shm_put_var|shm_remove|shm_remove_var|shmop_close|shmop_delete|shmop_open|shmop_read|shmop_size|shmop_write|show_source|shuffle|signeurlpaiement|similar_text|simplexml_import_dom|simplexml_load_file|simplexml_load_string|simplexmlelement|simplexmliterator|sin|sinh|sizeof|sleep|snmp|snmp2_get|snmp2_getnext|snmp2_real_walk|snmp2_set|snmp2_walk|snmp3_get|snmp3_getnext|snmp3_real_walk|snmp3_set|snmp3_walk|snmp_get_quick_print|snmp_get_valueretrieval|snmp_read_mib|snmp_set_enum_print|snmp_set_oid_numeric_print|snmp_set_oid_output_format|snmp_set_quick_print|snmp_set_valueretrieval|snmpget|snmpgetnext|snmprealwalk|snmpset|snmpwalk|snmpwalkoid|soapclient|soapfault|soapheader|soapparam|soapserver|soapvar|socket_accept|socket_bind|socket_clear_error|socket_close|socket_connect|socket_create|socket_create_listen|socket_create_pair|socket_get_option|socket_get_status|socket_getpeername|socket_getsockname|socket_last_error|socket_listen|socket_read|socket_recv|socket_recvfrom|socket_select|socket_send|socket_sendto|socket_set_block|socket_set_blocking|socket_set_nonblock|socket_set_option|socket_set_timeout|socket_shutdown|socket_strerror|socket_write|solr_get_version|solrclient|solrclientexception|solrdocument|solrdocumentfield|solrexception|solrgenericresponse|solrillegalargumentexception|solrillegaloperationexception|solrinputdocument|solrmodifiableparams|solrobject|solrparams|solrpingresponse|solrquery|solrqueryresponse|solrresponse|solrupdateresponse|solrutils|sort|soundex|sphinxclient|spl_autoload|spl_autoload_call|spl_autoload_extensions|spl_autoload_functions|spl_autoload_register|spl_autoload_unregister|spl_classes|spl_object_hash|splbool|spldoublylinkedlist|splenum|splfileinfo|splfileobject|splfixedarray|splfloat|splheap|splint|split|spliti|splmaxheap|splminheap|splobjectstorage|splobserver|splpriorityqueue|splqueue|splstack|splstring|splsubject|spltempfileobject|spoofchecker|sprintf|sql_regcase|sqlite3|sqlite3result|sqlite3stmt|sqlite_array_query|sqlite_busy_timeout|sqlite_changes|sqlite_close|sqlite_column|sqlite_create_aggregate|sqlite_create_function|sqlite_current|sqlite_error_string|sqlite_escape_string|sqlite_exec|sqlite_factory|sqlite_fetch_all|sqlite_fetch_array|sqlite_fetch_column_types|sqlite_fetch_object|sqlite_fetch_single|sqlite_fetch_string|sqlite_field_name|sqlite_has_more|sqlite_has_prev|sqlite_key|sqlite_last_error|sqlite_last_insert_rowid|sqlite_libencoding|sqlite_libversion|sqlite_next|sqlite_num_fields|sqlite_num_rows|sqlite_open|sqlite_popen|sqlite_prev|sqlite_query|sqlite_rewind|sqlite_seek|sqlite_single_query|sqlite_udf_decode_binary|sqlite_udf_encode_binary|sqlite_unbuffered_query|sqlite_valid|sqrt|srand|sscanf|ssdeep_fuzzy_compare|ssdeep_fuzzy_hash|ssdeep_fuzzy_hash_filename|ssh2_auth_hostbased_file|ssh2_auth_none|ssh2_auth_password|ssh2_auth_pubkey_file|ssh2_connect|ssh2_exec|ssh2_fetch_stream|ssh2_fingerprint|ssh2_methods_negotiated|ssh2_publickey_add|ssh2_publickey_init|ssh2_publickey_list|ssh2_publickey_remove|ssh2_scp_recv|ssh2_scp_send|ssh2_sftp|ssh2_sftp_lstat|ssh2_sftp_mkdir|ssh2_sftp_readlink|ssh2_sftp_realpath|ssh2_sftp_rename|ssh2_sftp_rmdir|ssh2_sftp_stat|ssh2_sftp_symlink|ssh2_sftp_unlink|ssh2_shell|ssh2_tunnel|stat|stats_absolute_deviation|stats_cdf_beta|stats_cdf_binomial|stats_cdf_cauchy|stats_cdf_chisquare|stats_cdf_exponential|stats_cdf_f|stats_cdf_gamma|stats_cdf_laplace|stats_cdf_logistic|stats_cdf_negative_binomial|stats_cdf_noncentral_chisquare|stats_cdf_noncentral_f|stats_cdf_poisson|stats_cdf_t|stats_cdf_uniform|stats_cdf_weibull|stats_covariance|stats_den_uniform|stats_dens_beta|stats_dens_cauchy|stats_dens_chisquare|stats_dens_exponential|stats_dens_f|stats_dens_gamma|stats_dens_laplace|stats_dens_logistic|stats_dens_negative_binomial|stats_dens_normal|stats_dens_pmf_binomial|stats_dens_pmf_hypergeometric|stats_dens_pmf_poisson|stats_dens_t|stats_dens_weibull|stats_harmonic_mean|stats_kurtosis|stats_rand_gen_beta|stats_rand_gen_chisquare|stats_rand_gen_exponential|stats_rand_gen_f|stats_rand_gen_funiform|stats_rand_gen_gamma|stats_rand_gen_ibinomial|stats_rand_gen_ibinomial_negative|stats_rand_gen_int|stats_rand_gen_ipoisson|stats_rand_gen_iuniform|stats_rand_gen_noncenral_chisquare|stats_rand_gen_noncentral_f|stats_rand_gen_noncentral_t|stats_rand_gen_normal|stats_rand_gen_t|stats_rand_get_seeds|stats_rand_phrase_to_seeds|stats_rand_ranf|stats_rand_setall|stats_skew|stats_standard_deviation|stats_stat_binomial_coef|stats_stat_correlation|stats_stat_gennch|stats_stat_independent_t|stats_stat_innerproduct|stats_stat_noncentral_t|stats_stat_paired_t|stats_stat_percentile|stats_stat_powersum|stats_variance|stomp|stomp_connect_error|stomp_version|stompexception|stompframe|str_getcsv|str_ireplace|str_pad|str_repeat|str_replace|str_rot13|str_shuffle|str_split|str_word_count|strcasecmp|strchr|strcmp|strcoll|strcspn|stream_bucket_append|stream_bucket_make_writeable|stream_bucket_new|stream_bucket_prepend|stream_context_create|stream_context_get_default|stream_context_get_options|stream_context_get_params|stream_context_set_default|stream_context_set_option|stream_context_set_params|stream_copy_to_stream|stream_encoding|stream_filter_append|stream_filter_prepend|stream_filter_register|stream_filter_remove|stream_get_contents|stream_get_filters|stream_get_line|stream_get_meta_data|stream_get_transports|stream_get_wrappers|stream_is_local|stream_notification_callback|stream_register_wrapper|stream_resolve_include_path|stream_select|stream_set_blocking|stream_set_read_buffer|stream_set_timeout|stream_set_write_buffer|stream_socket_accept|stream_socket_client|stream_socket_enable_crypto|stream_socket_get_name|stream_socket_pair|stream_socket_recvfrom|stream_socket_sendto|stream_socket_server|stream_socket_shutdown|stream_supports_lock|stream_wrapper_register|stream_wrapper_restore|stream_wrapper_unregister|streamwrapper|strftime|strip_tags|stripcslashes|stripos|stripslashes|stristr|strlen|strnatcasecmp|strnatcmp|strncasecmp|strncmp|strpbrk|strpos|strptime|strrchr|strrev|strripos|strrpos|strspn|strstr|strtok|strtolower|strtotime|strtoupper|strtr|strval|substr|substr_compare|substr_count|substr_replace|svm|svmmodel|svn_add|svn_auth_get_parameter|svn_auth_set_parameter|svn_blame|svn_cat|svn_checkout|svn_cleanup|svn_client_version|svn_commit|svn_delete|svn_diff|svn_export|svn_fs_abort_txn|svn_fs_apply_text|svn_fs_begin_txn2|svn_fs_change_node_prop|svn_fs_check_path|svn_fs_contents_changed|svn_fs_copy|svn_fs_delete|svn_fs_dir_entries|svn_fs_file_contents|svn_fs_file_length|svn_fs_is_dir|svn_fs_is_file|svn_fs_make_dir|svn_fs_make_file|svn_fs_node_created_rev|svn_fs_node_prop|svn_fs_props_changed|svn_fs_revision_prop|svn_fs_revision_root|svn_fs_txn_root|svn_fs_youngest_rev|svn_import|svn_log|svn_ls|svn_mkdir|svn_repos_create|svn_repos_fs|svn_repos_fs_begin_txn_for_commit|svn_repos_fs_commit_txn|svn_repos_hotcopy|svn_repos_open|svn_repos_recover|svn_revert|svn_status|svn_update|swf_actiongeturl|swf_actiongotoframe|swf_actiongotolabel|swf_actionnextframe|swf_actionplay|swf_actionprevframe|swf_actionsettarget|swf_actionstop|swf_actiontogglequality|swf_actionwaitforframe|swf_addbuttonrecord|swf_addcolor|swf_closefile|swf_definebitmap|swf_definefont|swf_defineline|swf_definepoly|swf_definerect|swf_definetext|swf_endbutton|swf_enddoaction|swf_endshape|swf_endsymbol|swf_fontsize|swf_fontslant|swf_fonttracking|swf_getbitmapinfo|swf_getfontinfo|swf_getframe|swf_labelframe|swf_lookat|swf_modifyobject|swf_mulcolor|swf_nextid|swf_oncondition|swf_openfile|swf_ortho|swf_ortho2|swf_perspective|swf_placeobject|swf_polarview|swf_popmatrix|swf_posround|swf_pushmatrix|swf_removeobject|swf_rotate|swf_scale|swf_setfont|swf_setframe|swf_shapearc|swf_shapecurveto|swf_shapecurveto3|swf_shapefillbitmapclip|swf_shapefillbitmaptile|swf_shapefilloff|swf_shapefillsolid|swf_shapelinesolid|swf_shapelineto|swf_shapemoveto|swf_showframe|swf_startbutton|swf_startdoaction|swf_startshape|swf_startsymbol|swf_textwidth|swf_translate|swf_viewport|swfaction|swfbitmap|swfbutton|swfdisplayitem|swffill|swffont|swffontchar|swfgradient|swfmorph|swfmovie|swfprebuiltclip|swfshape|swfsound|swfsoundinstance|swfsprite|swftext|swftextfield|swfvideostream|swish_construct|swish_getmetalist|swish_getpropertylist|swish_prepare|swish_query|swishresult_getmetalist|swishresult_stem|swishresults_getparsedwords|swishresults_getremovedstopwords|swishresults_nextresult|swishresults_seekresult|swishsearch_execute|swishsearch_resetlimit|swishsearch_setlimit|swishsearch_setphrasedelimiter|swishsearch_setsort|swishsearch_setstructure|sybase_affected_rows|sybase_close|sybase_connect|sybase_data_seek|sybase_deadlock_retry_count|sybase_fetch_array|sybase_fetch_assoc|sybase_fetch_field|sybase_fetch_object|sybase_fetch_row|sybase_field_seek|sybase_free_result|sybase_get_last_message|sybase_min_client_severity|sybase_min_error_severity|sybase_min_message_severity|sybase_min_server_severity|sybase_num_fields|sybase_num_rows|sybase_pconnect|sybase_query|sybase_result|sybase_select_db|sybase_set_message_handler|sybase_unbuffered_query|symlink|sys_get_temp_dir|sys_getloadavg|syslog|system|tag|tan|tanh|tcpwrap_check|tempnam|textdomain|tidy|tidy_access_count|tidy_config_count|tidy_diagnose|tidy_error_count|tidy_get_error_buffer|tidy_get_output|tidy_load_config|tidy_reset_config|tidy_save_config|tidy_set_encoding|tidy_setopt|tidy_warning_count|tidynode|time|time_nanosleep|time_sleep_until|timezone_abbreviations_list|timezone_identifiers_list|timezone_location_get|timezone_name_from_abbr|timezone_name_get|timezone_offset_get|timezone_open|timezone_transitions_get|timezone_version_get|tmpfile|token_get_all|token_name|tokyotyrant|tokyotyrantquery|tokyotyranttable|tostring|tostring|touch|transliterator|traversable|trigger_error|trim|uasort|ucfirst|ucwords|udm_add_search_limit|udm_alloc_agent|udm_alloc_agent_array|udm_api_version|udm_cat_list|udm_cat_path|udm_check_charset|udm_check_stored|udm_clear_search_limits|udm_close_stored|udm_crc32|udm_errno|udm_error|udm_find|udm_free_agent|udm_free_ispell_data|udm_free_res|udm_get_doc_count|udm_get_res_field|udm_get_res_param|udm_hash32|udm_load_ispell_data|udm_open_stored|udm_set_agent_param|uksort|umask|underflowexception|unexpectedvalueexception|uniqid|unixtojd|unlink|unpack|unregister_tick_function|unserialize|unset|urldecode|urlencode|use_soap_error_handler|user_error|usleep|usort|utf8_decode|utf8_encode|v8js|v8jsexception|var_dump|var_export|variant|variant_abs|variant_add|variant_and|variant_cast|variant_cat|variant_cmp|variant_date_from_timestamp|variant_date_to_timestamp|variant_div|variant_eqv|variant_fix|variant_get_type|variant_idiv|variant_imp|variant_int|variant_mod|variant_mul|variant_neg|variant_not|variant_or|variant_pow|variant_round|variant_set|variant_set_type|variant_sub|variant_xor|version_compare|vfprintf|virtual|vpopmail_add_alias_domain|vpopmail_add_alias_domain_ex|vpopmail_add_domain|vpopmail_add_domain_ex|vpopmail_add_user|vpopmail_alias_add|vpopmail_alias_del|vpopmail_alias_del_domain|vpopmail_alias_get|vpopmail_alias_get_all|vpopmail_auth_user|vpopmail_del_domain|vpopmail_del_domain_ex|vpopmail_del_user|vpopmail_error|vpopmail_passwd|vpopmail_set_user_quota|vprintf|vsprintf|w32api_deftype|w32api_init_dtype|w32api_invoke_function|w32api_register_function|w32api_set_call_method|wddx_add_vars|wddx_deserialize|wddx_packet_end|wddx_packet_start|wddx_serialize_value|wddx_serialize_vars|win32_continue_service|win32_create_service|win32_delete_service|win32_get_last_control_message|win32_pause_service|win32_ps_list_procs|win32_ps_stat_mem|win32_ps_stat_proc|win32_query_service_status|win32_set_service_status|win32_start_service|win32_start_service_ctrl_dispatcher|win32_stop_service|wincache_fcache_fileinfo|wincache_fcache_meminfo|wincache_lock|wincache_ocache_fileinfo|wincache_ocache_meminfo|wincache_refresh_if_changed|wincache_rplist_fileinfo|wincache_rplist_meminfo|wincache_scache_info|wincache_scache_meminfo|wincache_ucache_add|wincache_ucache_cas|wincache_ucache_clear|wincache_ucache_dec|wincache_ucache_delete|wincache_ucache_exists|wincache_ucache_get|wincache_ucache_inc|wincache_ucache_info|wincache_ucache_meminfo|wincache_ucache_set|wincache_unlock|wordwrap|xattr_get|xattr_list|xattr_remove|xattr_set|xattr_supported|xdiff_file_bdiff|xdiff_file_bdiff_size|xdiff_file_bpatch|xdiff_file_diff|xdiff_file_diff_binary|xdiff_file_merge3|xdiff_file_patch|xdiff_file_patch_binary|xdiff_file_rabdiff|xdiff_string_bdiff|xdiff_string_bdiff_size|xdiff_string_bpatch|xdiff_string_diff|xdiff_string_diff_binary|xdiff_string_merge3|xdiff_string_patch|xdiff_string_patch_binary|xdiff_string_rabdiff|xhprof_disable|xhprof_enable|xhprof_sample_disable|xhprof_sample_enable|xml_error_string|xml_get_current_byte_index|xml_get_current_column_number|xml_get_current_line_number|xml_get_error_code|xml_parse|xml_parse_into_struct|xml_parser_create|xml_parser_create_ns|xml_parser_free|xml_parser_get_option|xml_parser_set_option|xml_set_character_data_handler|xml_set_default_handler|xml_set_element_handler|xml_set_end_namespace_decl_handler|xml_set_external_entity_ref_handler|xml_set_notation_decl_handler|xml_set_object|xml_set_processing_instruction_handler|xml_set_start_namespace_decl_handler|xml_set_unparsed_entity_decl_handler|xmlreader|xmlrpc_decode|xmlrpc_decode_request|xmlrpc_encode|xmlrpc_encode_request|xmlrpc_get_type|xmlrpc_is_fault|xmlrpc_parse_method_descriptions|xmlrpc_server_add_introspection_data|xmlrpc_server_call_method|xmlrpc_server_create|xmlrpc_server_destroy|xmlrpc_server_register_introspection_callback|xmlrpc_server_register_method|xmlrpc_set_type|xmlwriter_end_attribute|xmlwriter_end_cdata|xmlwriter_end_comment|xmlwriter_end_document|xmlwriter_end_dtd|xmlwriter_end_dtd_attlist|xmlwriter_end_dtd_element|xmlwriter_end_dtd_entity|xmlwriter_end_element|xmlwriter_end_pi|xmlwriter_flush|xmlwriter_full_end_element|xmlwriter_open_memory|xmlwriter_open_uri|xmlwriter_output_memory|xmlwriter_set_indent|xmlwriter_set_indent_string|xmlwriter_start_attribute|xmlwriter_start_attribute_ns|xmlwriter_start_cdata|xmlwriter_start_comment|xmlwriter_start_document|xmlwriter_start_dtd|xmlwriter_start_dtd_attlist|xmlwriter_start_dtd_element|xmlwriter_start_dtd_entity|xmlwriter_start_element|xmlwriter_start_element_ns|xmlwriter_start_pi|xmlwriter_text|xmlwriter_write_attribute|xmlwriter_write_attribute_ns|xmlwriter_write_cdata|xmlwriter_write_comment|xmlwriter_write_dtd|xmlwriter_write_dtd_attlist|xmlwriter_write_dtd_element|xmlwriter_write_dtd_entity|xmlwriter_write_element|xmlwriter_write_element_ns|xmlwriter_write_pi|xmlwriter_write_raw|xpath_eval|xpath_eval_expression|xpath_new_context|xpath_register_ns|xpath_register_ns_auto|xptr_eval|xptr_new_context|xslt_backend_info|xslt_backend_name|xslt_backend_version|xslt_create|xslt_errno|xslt_error|xslt_free|xslt_getopt|xslt_process|xslt_set_base|xslt_set_encoding|xslt_set_error_handler|xslt_set_log|xslt_set_object|xslt_set_sax_handler|xslt_set_sax_handlers|xslt_set_scheme_handler|xslt_set_scheme_handlers|xslt_setopt|xsltprocessor|yaml_emit|yaml_emit_file|yaml_parse|yaml_parse_file|yaml_parse_url|yaz_addinfo|yaz_ccl_conf|yaz_ccl_parse|yaz_close|yaz_connect|yaz_database|yaz_element|yaz_errno|yaz_error|yaz_es|yaz_es_result|yaz_get_option|yaz_hits|yaz_itemorder|yaz_present|yaz_range|yaz_record|yaz_scan|yaz_scan_result|yaz_schema|yaz_search|yaz_set_option|yaz_sort|yaz_syntax|yaz_wait|yp_all|yp_cat|yp_err_string|yp_errno|yp_first|yp_get_default_domain|yp_master|yp_match|yp_next|yp_order|zend_logo_guid|zend_thread_id|zend_version|zip_close|zip_entry_close|zip_entry_compressedsize|zip_entry_compressionmethod|zip_entry_filesize|zip_entry_name|zip_entry_open|zip_entry_read|zip_open|zip_read|ziparchive|ziparchive_addemptydir|ziparchive_addfile|ziparchive_addfromstring|ziparchive_close|ziparchive_deleteindex|ziparchive_deletename|ziparchive_extractto|ziparchive_getarchivecomment|ziparchive_getcommentindex|ziparchive_getcommentname|ziparchive_getfromindex|ziparchive_getfromname|ziparchive_getnameindex|ziparchive_getstatusstring|ziparchive_getstream|ziparchive_locatename|ziparchive_open|ziparchive_renameindex|ziparchive_renamename|ziparchive_setCommentName|ziparchive_setarchivecomment|ziparchive_setcommentindex|ziparchive_statindex|ziparchive_statname|ziparchive_unchangeall|ziparchive_unchangearchive|ziparchive_unchangeindex|ziparchive_unchangename|zlib_get_coding_type".split("|")), n = i.arrayToMap("abstract|and|array|as|break|case|catch|class|clone|const|continue|declare|default|do|else|elseif|enddeclare|endfor|endforeach|endif|endswitch|endwhile|extends|final|for|foreach|function|global|goto|if|implements|interface|instanceof|namespace|new|or|private|protected|public|static|switch|throw|try|use|var|while|xor".split("|")), r = i.arrayToMap("die|echo|empty|exit|eval|include|include_once|isset|list|require|require_once|return|print|unset".split("|")), o = i.arrayToMap("true|false|null|__CLASS__|__DIR__|__FILE__|__LINE__|__METHOD__|__FUNCTION__|__NAMESPACE__".split("|")), u = i.arrayToMap("$GLOBALS|$_SERVER|$_GET|$_POST|$_FILES|$_REQUEST|$_SESSION|$_ENV|$_COOKIE|$php_errormsg|$HTTP_RAW_POST_DATA|$http_response_header|$argc|$argv".split("|")), a = i.arrayToMap("key_exists|cairo_matrix_create_scale|cairo_matrix_create_translate|call_user_method|call_user_method_array|com_addref|com_get|com_invoke|com_isenum|com_load|com_release|com_set|connection_timeout|cubrid_load_from_glo|cubrid_new_glo|cubrid_save_to_glo|cubrid_send_glo|define_syslog_variables|dl|ereg|ereg_replace|eregi|eregi_replace|hw_documentattributes|hw_documentbodytag|hw_documentsize|hw_outputdocument|imagedashedline|maxdb_bind_param|maxdb_bind_result|maxdb_client_encoding|maxdb_close_long_data|maxdb_execute|maxdb_fetch|maxdb_get_metadata|maxdb_param_count|maxdb_send_long_data|mcrypt_ecb|mcrypt_generic_end|mime_content_type|mysql_createdb|mysql_dbname|mysql_db_query|mysql_drop_db|mysql_dropdb|mysql_escape_string|mysql_fieldflags|mysql_fieldflags|mysql_fieldname|mysql_fieldtable|mysql_fieldtype|mysql_freeresult|mysql_listdbs|mysql_list_fields|mysql_listfields|mysql_list_tables|mysql_listtables|mysql_numfields|mysql_numrows|mysql_selectdb|mysql_tablename|mysqli_bind_param|mysqli_bind_result|mysqli_disable_reads_from_master|mysqli_disable_rpl_parse|mysqli_enable_reads_from_master|mysqli_enable_rpl_parse|mysqli_execute|mysqli_fetch|mysqli_get_metadata|mysqli_master_query|mysqli_param_count|mysqli_rpl_parse_enabled|mysqli_rpl_probe|mysqli_rpl_query_type|mysqli_send_long_data|mysqli_send_query|mysqli_slave_query|ocibindbyname|ocicancel|ocicloselob|ocicollappend|ocicollassign|ocicollassignelem|ocicollgetelem|ocicollmax|ocicollsize|ocicolltrim|ocicolumnisnull|ocicolumnname|ocicolumnprecision|ocicolumnscale|ocicolumnsize|ocicolumntype|ocicolumntyperaw|ocicommit|ocidefinebyname|ocierror|ociexecute|ocifetch|ocifetchinto|ocifetchstatement|ocifreecollection|ocifreecursor|ocifreedesc|ocifreestatement|ociinternaldebug|ociloadlob|ocilogoff|ocilogon|ocinewcollection|ocinewcursor|ocinewdescriptor|ocinlogon|ocinumcols|ociparse|ociplogon|ociresult|ocirollback|ocirowcount|ocisavelob|ocisavelobfile|ociserverversion|ocisetprefetch|ocistatementtype|ociwritelobtofile|ociwritetemporarylob|PDF_add_annotation|PDF_add_bookmark|PDF_add_launchlink|PDF_add_locallink|PDF_add_note|PDF_add_outline|PDF_add_pdflink|PDF_add_weblink|PDF_attach_file|PDF_begin_page|PDF_begin_template|PDF_close_pdi|PDF_close|PDF_findfont|PDF_get_font|PDF_get_fontname|PDF_get_fontsize|PDF_get_image_height|PDF_get_image_width|PDF_get_majorversion|PDF_get_minorversion|PDF_get_pdi_parameter|PDF_get_pdi_value|PDF_open_ccitt|PDF_open_file|PDF_open_gif|PDF_open_image_file|PDF_open_image|PDF_open_jpeg|PDF_open_pdi|PDF_open_tiff|PDF_place_image|PDF_place_pdi_page|PDF_set_border_color|PDF_set_border_dash|PDF_set_border_style|PDF_set_char_spacing|PDF_set_duration|PDF_set_horiz_scaling|PDF_set_info_author|PDF_set_info_creator|PDF_set_info_keywords|PDF_set_info_subject|PDF_set_info_title|PDF_set_leading|PDF_set_text_matrix|PDF_set_text_rendering|PDF_set_text_rise|PDF_set_word_spacing|PDF_setgray_fill|PDF_setgray_stroke|PDF_setgray|PDF_setpolydash|PDF_setrgbcolor_fill|PDF_setrgbcolor_stroke|PDF_setrgbcolor|PDF_show_boxed|php_check_syntax|px_set_tablename|px_set_targetencoding|runkit_sandbox_output_handler|session_is_registered|session_register|session_unregisterset_magic_quotes_runtime|magic_quotes_runtime|set_socket_blocking|socket_set_blocking|set_socket_timeout|socket_set_timeout|split|spliti|sql_regcase".split("|")), f = i.arrayToMap("cfunction|old_function".split("|")), l = i.arrayToMap([]);
- this.$rules = {start: [
- {token: "comment", regex: "\\/\\/.*$"},
- {token: "comment", regex: "#.*$"},
- e.getStartRule("doc-start"),
- {token: "comment", regex: "\\/\\*", next: "comment"},
- {token: "string.regexp", regex: "[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/][gimy]*\\s*(?=[).,;]|$)"},
- {token: "string", regex: '"', next: "qqstring"},
- {token: "string", regex: "'", next: "qstring"},
- {token: "constant.numeric", regex: "0[xX][0-9a-fA-F]+\\b"},
- {token: "constant.numeric", regex: "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},
- {token: "constant.language", regex: "\\b(?:DEFAULT_INCLUDE_PATH|E_(?:ALL|CO(?:MPILE_(?:ERROR|WARNING)|RE_(?:ERROR|WARNING))|ERROR|NOTICE|PARSE|STRICT|USER_(?:ERROR|NOTICE|WARNING)|WARNING)|P(?:EAR_(?:EXTENSION_DIR|INSTALL_DIR)|HP_(?:BINDIR|CONFIG_FILE_(?:PATH|SCAN_DIR)|DATADIR|E(?:OL|XTENSION_DIR)|INT_(?:MAX|SIZE)|L(?:IBDIR|OCALSTATEDIR)|O(?:S|UTPUT_HANDLER_(?:CONT|END|START))|PREFIX|S(?:API|HLIB_SUFFIX|YSCONFDIR)|VERSION))|__COMPILER_HALT_OFFSET__)\\b"},
- {token: "constant.language", regex: "\\b(?:A(?:B(?:DAY_(?:1|2|3|4|5|6|7)|MON_(?:1(?:0|1|2|)|2|3|4|5|6|7|8|9))|LT_DIGITS|M_STR|SSERT_(?:ACTIVE|BAIL|CALLBACK|QUIET_EVAL|WARNING))|C(?:ASE_(?:LOWER|UPPER)|HAR_MAX|O(?:DESET|NNECTION_(?:ABORTED|NORMAL|TIMEOUT)|UNT_(?:NORMAL|RECURSIVE))|R(?:EDITS_(?:ALL|DOCS|FULLPAGE|G(?:ENERAL|ROUP)|MODULES|QA|SAPI)|NCYSTR|YPT_(?:BLOWFISH|EXT_DES|MD5|S(?:ALT_LENGTH|TD_DES)))|URRENCY_SYMBOL)|D(?:AY_(?:1|2|3|4|5|6|7)|ECIMAL_POINT|IRECTORY_SEPARATOR|_(?:FMT|T_FMT))|E(?:NT_(?:COMPAT|NOQUOTES|QUOTES)|RA(?:_(?:D_(?:FMT|T_FMT)|T_FMT|YEAR)|)|XTR_(?:IF_EXISTS|OVERWRITE|PREFIX_(?:ALL|I(?:F_EXISTS|NVALID)|SAME)|SKIP))|FRAC_DIGITS|GROUPING|HTML_(?:ENTITIES|SPECIALCHARS)|IN(?:FO_(?:ALL|C(?:ONFIGURATION|REDITS)|ENVIRONMENT|GENERAL|LICENSE|MODULES|VARIABLES)|I_(?:ALL|PERDIR|SYSTEM|USER)|T_(?:CURR_SYMBOL|FRAC_DIGITS))|L(?:C_(?:ALL|C(?:OLLATE|TYPE)|M(?:ESSAGES|ONETARY)|NUMERIC|TIME)|O(?:CK_(?:EX|NB|SH|UN)|G_(?:A(?:LERT|UTH(?:PRIV|))|C(?:ONS|R(?:IT|ON))|D(?:AEMON|EBUG)|E(?:MERG|RR)|INFO|KERN|L(?:OCAL(?:0|1|2|3|4|5|6|7)|PR)|MAIL|N(?:DELAY|EWS|O(?:TICE|WAIT))|ODELAY|P(?:ERROR|ID)|SYSLOG|U(?:SER|UCP)|WARNING)))|M(?:ON_(?:1(?:0|1|2|)|2|3|4|5|6|7|8|9|DECIMAL_POINT|GROUPING|THOUSANDS_SEP)|_(?:1_PI|2_(?:PI|SQRTPI)|E|L(?:N(?:10|2)|OG(?:10E|2E))|PI(?:_(?:2|4)|)|SQRT(?:1_2|2)))|N(?:EGATIVE_SIGN|O(?:EXPR|STR)|_(?:CS_PRECEDES|S(?:EP_BY_SPACE|IGN_POSN)))|P(?:ATH(?:INFO_(?:BASENAME|DIRNAME|EXTENSION)|_SEPARATOR)|M_STR|OSITIVE_SIGN|_(?:CS_PRECEDES|S(?:EP_BY_SPACE|IGN_POSN)))|RADIXCHAR|S(?:EEK_(?:CUR|END|SET)|ORT_(?:ASC|DESC|NUMERIC|REGULAR|STRING)|TR_PAD_(?:BOTH|LEFT|RIGHT))|T(?:HOUS(?:ANDS_SEP|EP)|_FMT(?:_AMPM|))|YES(?:EXPR|STR)|STD(?:IN|OUT|ERR))\\b"},
- {token: function (e) {
- return n.hasOwnProperty(e) ? "keyword" : o.hasOwnProperty(e) ? "constant.language" : u.hasOwnProperty(e) ? "variable.language" : l.hasOwnProperty(e) ? "invalid.illegal" : t.hasOwnProperty(e) ? "support.function" : e == "debugger" ? "invalid.deprecated" : e.match(/^(\$[a-zA-Z][a-zA-Z0-9_]*|self|parent)$/) ? "variable" : "identifier"
- }, regex: "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},
- {token: function (e, t, n) {
- e = e.substr(3);
- if (e[0] == "'" || e[0] == '"')e = e.slice(1, -1);
- return n.unshift(this.next, e), "markup.list"
- }, regex: /<<<(?:\w+|'\w+'|"\w+")$/, next: "heredoc"},
- {token: "keyword.operator", regex: "!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)"},
- {token: "paren.lparen", regex: "[[({]"},
- {token: "paren.rparen", regex: "[\\])}]"},
- {token: "text", regex: "\\s+"}
- ], heredoc: [
- {token: function (e, t, n) {
- return n[1] + ";" != e ? "string" : (n.shift(), n.shift(), "markup.list")
- }, regex: "^\\w+;$", next: "start"},
- {token: "string", regex: ".*"}
- ], comment: [
- {token: "comment", regex: ".*?\\*\\/", next: "start"},
- {token: "comment", regex: ".+"}
- ], qqstring: [
- {token: "constant.language.escape", regex: '\\\\(?:[nrtvef\\\\"$]|[0-7]{1,3}|x[0-9A-Fa-f]{1,2})'},
- {token: "constant.language.escape", regex: /\$[\w]+(?:\[[\w\]+]|=>\w+)?/},
- {token: "constant.language.escape", regex: /\$\{[^"\}]+\}?/},
- {token: "string", regex: '"', next: "start"},
- {defaultToken: "string"}
- ], qstring: [
- {token: "constant.language.escape", regex: /\\['\\]/},
- {token: "string", regex: "'", next: "start"},
- {defaultToken: "string"}
- ]}, this.embedRules(s, "doc-", [s.getEndRule("start")])
- };
- r.inherits(a, o);
- var f = function () {
- u.call(this);
- for (var e in this.$rules)this.$rules[e].unshift({token: "support.php_tag", regex: "<\\?(?:php|\\=)?", next: "php-start"});
- this.embedRules(a, "php-"), this.$rules["php-start"].unshift({token: "support.php_tag", regex: "\\?>", next: "start"})
- };
- r.inherits(f, u), t.PhpHighlightRules = f, t.PhpLangHighlightRules = a
-}), ace.define("ace/mode/doc_comment_highlight_rules", ["require", "exports", "module", "ace/lib/oop", "ace/mode/text_highlight_rules"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("./text_highlight_rules").TextHighlightRules, s = function () {
- this.$rules = {start: [
- {token: "comment.doc.tag", regex: "@[\\w\\d_]+"},
- {token: "comment.doc.tag", regex: "\\bTODO\\b"},
- {defaultToken: "comment.doc"}
- ]}
- };
- r.inherits(s, i), s.getStartRule = function (e) {
- return{token: "comment.doc", regex: "\\/\\*(?=\\*)", next: e}
- }, s.getEndRule = function (e) {
- return{token: "comment.doc", regex: "\\*\\/", next: e}
- }, t.DocCommentHighlightRules = s
-}), ace.define("ace/mode/html_highlight_rules", ["require", "exports", "module", "ace/lib/oop", "ace/lib/lang", "ace/mode/css_highlight_rules", "ace/mode/javascript_highlight_rules", "ace/mode/xml_util", "ace/mode/text_highlight_rules"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("../lib/lang"), s = e("./css_highlight_rules").CssHighlightRules, o = e("./javascript_highlight_rules").JavaScriptHighlightRules, u = e("./xml_util"), a = e("./text_highlight_rules").TextHighlightRules, f = i.createMap({a: "anchor", button: "form", form: "form", img: "image", input: "form", label: "form", script: "script", select: "form", textarea: "form", style: "style", table: "table", tbody: "table", td: "table", tfoot: "table", th: "table", tr: "table"}), l = function () {
- this.$rules = {start: [
- {token: "text", regex: "<\\!\\[CDATA\\[", next: "cdata"},
- {token: "xml-pe", regex: "<\\?.*?\\?>"},
- {token: "comment", regex: "<\\!--", next: "comment"},
- {token: "xml-pe", regex: "<\\!.*?>"},
- {token: "meta.tag", regex: "<(?=script\\b)", next: "script"},
- {token: "meta.tag", regex: "<(?=style\\b)", next: "style"},
- {token: "meta.tag", regex: "<\\/?", next: "tag"},
- {token: "text", regex: "\\s+"},
- {token: "constant.character.entity", regex: "(?:[0-9]+;)|(?:[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}
- ], cdata: [
- {token: "text", regex: "\\]\\]>", next: "start"}
- ], comment: [
- {token: "comment", regex: ".*?-->", next: "start"},
- {defaultToken: "comment"}
- ]}, u.tag(this.$rules, "tag", "start", f), u.tag(this.$rules, "style", "css-start", f), u.tag(this.$rules, "script", "js-start", f), this.embedRules(o, "js-", [
- {token: "comment", regex: "\\/\\/.*(?=<\\/script>)", next: "tag"},
- {token: "meta.tag", regex: "<\\/(?=script)", next: "tag"}
- ]), this.embedRules(s, "css-", [
- {token: "meta.tag", regex: "<\\/(?=style)", next: "tag"}
- ])
- };
- r.inherits(l, a), t.HtmlHighlightRules = l
-}), ace.define("ace/mode/css_highlight_rules", ["require", "exports", "module", "ace/lib/oop", "ace/lib/lang", "ace/mode/text_highlight_rules"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("../lib/lang"), s = e("./text_highlight_rules").TextHighlightRules, o = t.supportType = "animation-fill-mode|alignment-adjust|alignment-baseline|animation-delay|animation-direction|animation-duration|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|animation|appearance|azimuth|backface-visibility|background-attachment|background-break|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|background|baseline-shift|binding|bleed|bookmark-label|bookmark-level|bookmark-state|bookmark-target|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|border|bottom|box-align|box-decoration-break|box-direction|box-flex-group|box-flex|box-lines|box-ordinal-group|box-orient|box-pack|box-shadow|box-sizing|break-after|break-before|break-inside|caption-side|clear|clip|color-profile|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|crop|cue-after|cue-before|cue|cursor|direction|display|dominant-baseline|drop-initial-after-adjust|drop-initial-after-align|drop-initial-before-adjust|drop-initial-before-align|drop-initial-size|drop-initial-value|elevation|empty-cells|fit|fit-position|float-offset|float|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|font|grid-columns|grid-rows|hanging-punctuation|height|hyphenate-after|hyphenate-before|hyphenate-character|hyphenate-lines|hyphenate-resource|hyphens|icon|image-orientation|image-rendering|image-resolution|inline-box-align|left|letter-spacing|line-height|line-stacking-ruby|line-stacking-shift|line-stacking-strategy|line-stacking|list-style-image|list-style-position|list-style-type|list-style|margin-bottom|margin-left|margin-right|margin-top|margin|mark-after|mark-before|mark|marks|marquee-direction|marquee-play-count|marquee-speed|marquee-style|max-height|max-width|min-height|min-width|move-to|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|orphans|outline-color|outline-offset|outline-style|outline-width|outline|overflow-style|overflow-x|overflow-y|overflow|padding-bottom|padding-left|padding-right|padding-top|padding|page-break-after|page-break-before|page-break-inside|page-policy|page|pause-after|pause-before|pause|perspective-origin|perspective|phonemes|pitch-range|pitch|play-during|position|presentation-level|punctuation-trim|quotes|rendering-intent|resize|rest-after|rest-before|rest|richness|right|rotation-point|rotation|ruby-align|ruby-overhang|ruby-position|ruby-span|size|speak-header|speak-numeral|speak-punctuation|speak|speech-rate|stress|string-set|table-layout|target-name|target-new|target-position|target|text-align-last|text-align|text-decoration|text-emphasis|text-height|text-indent|text-justify|text-outline|text-shadow|text-transform|text-wrap|top|transform-origin|transform-style|transform|transition-delay|transition-duration|transition-property|transition-timing-function|transition|unicode-bidi|vertical-align|visibility|voice-balance|voice-duration|voice-family|voice-pitch-range|voice-pitch|voice-rate|voice-stress|voice-volume|volume|white-space-collapse|white-space|widows|width|word-break|word-spacing|word-wrap|z-index", u = t.supportFunction = "rgb|rgba|url|attr|counter|counters", a = t.supportConstant = "absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero", f = t.supportConstantColor = "aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow", l = t.supportConstantFonts = "arial|century|comic|courier|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace", c = t.numRe = "\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))", h = t.pseudoElements = "(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b", p = t.pseudoClasses = "(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b", d = function () {
- var e = this.createKeywordMapper({"support.function": u, "support.constant": a, "support.type": o, "support.constant.color": f, "support.constant.fonts": l}, "text", !0), t = [
- {token: "comment", regex: "\\/\\*", next: "ruleset_comment"},
- {token: "string", regex: '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},
- {token: "string", regex: "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},
- {token: ["constant.numeric", "keyword"], regex: "(" + c + ")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vm|vw|%)"},
- {token: "constant.numeric", regex: c},
- {token: "constant.numeric", regex: "#[a-f0-9]{6}"},
- {token: "constant.numeric", regex: "#[a-f0-9]{3}"},
- {token: ["punctuation", "entity.other.attribute-name.pseudo-element.css"], regex: h},
- {token: ["punctuation", "entity.other.attribute-name.pseudo-class.css"], regex: p},
- {token: e, regex: "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"}
- ], n = i.copyArray(t);
- n.unshift({token: "paren.rparen", regex: "\\}", next: "start"});
- var r = i.copyArray(t);
- r.unshift({token: "paren.rparen", regex: "\\}", next: "media"});
- var s = [
- {token: "comment", regex: ".+"}
- ], d = i.copyArray(s);
- d.unshift({token: "comment", regex: ".*?\\*\\/", next: "start"});
- var v = i.copyArray(s);
- v.unshift({token: "comment", regex: ".*?\\*\\/", next: "media"});
- var m = i.copyArray(s);
- m.unshift({token: "comment", regex: ".*?\\*\\/", next: "ruleset"}), this.$rules = {start: [
- {token: "comment", regex: "\\/\\*", next: "comment"},
- {token: "paren.lparen", regex: "\\{", next: "ruleset"},
- {token: "string", regex: "@.*?{", next: "media"},
- {token: "keyword", regex: "#[a-z0-9-_]+"},
- {token: "variable", regex: "\\.[a-z0-9-_]+"},
- {token: "string", regex: ":[a-z0-9-_]+"},
- {token: "constant", regex: "[a-z0-9-_]+"}
- ], media: [
- {token: "comment", regex: "\\/\\*", next: "media_comment"},
- {token: "paren.lparen", regex: "\\{", next: "media_ruleset"},
- {token: "string", regex: "\\}", next: "start"},
- {token: "keyword", regex: "#[a-z0-9-_]+"},
- {token: "variable", regex: "\\.[a-z0-9-_]+"},
- {token: "string", regex: ":[a-z0-9-_]+"},
- {token: "constant", regex: "[a-z0-9-_]+"}
- ], comment: d, ruleset: n, ruleset_comment: m, media_ruleset: r, media_comment: v}
- };
- r.inherits(d, s), t.CssHighlightRules = d
-}), ace.define("ace/mode/javascript_highlight_rules", ["require", "exports", "module", "ace/lib/oop", "ace/mode/doc_comment_highlight_rules", "ace/mode/text_highlight_rules"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("./doc_comment_highlight_rules").DocCommentHighlightRules, s = e("./text_highlight_rules").TextHighlightRules, o = function () {
- var e = this.createKeywordMapper({"variable.language": "Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document", keyword: "const|yield|import|get|set|break|case|catch|continue|default|delete|do|else|finally|for|function|if|in|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|__parent__|__count__|escape|unescape|with|__proto__|class|enum|extends|super|export|implements|private|public|interface|package|protected|static", "storage.type": "const|let|var|function", "constant.language": "null|Infinity|NaN|undefined", "support.function": "alert", "constant.language.boolean": "true|false"}, "identifier"), t = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void", n = "[a-zA-Z\\$_¡-￿][a-zA-Z\\d\\$_¡-￿]*\\b", r = "\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|[0-2][0-7]{0,2}|3[0-6][0-7]?|37[0-7]?|[4-7][0-7]?|.)";
- this.$rules = {start: [
- {token: "comment", regex: /\/\/.*$/},
- i.getStartRule("doc-start"),
- {token: "comment", regex: /\/\*/, next: "comment"},
- {token: "string", regex: "'(?=.)", next: "qstring"},
- {token: "string", regex: '"(?=.)', next: "qqstring"},
- {token: "constant.numeric", regex: /0[xX][0-9a-fA-F]+\b/},
- {token: "constant.numeric", regex: /[+-]?\d+(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?\b/},
- {token: ["storage.type", "punctuation.operator", "support.function", "punctuation.operator", "entity.name.function", "text", "keyword.operator"], regex: "(" + n + ")(\\.)(prototype)(\\.)(" + n + ")(\\s*)(=)", next: "function_arguments"},
- {token: ["storage.type", "punctuation.operator", "entity.name.function", "text", "keyword.operator", "text", "storage.type", "text", "paren.lparen"], regex: "(" + n + ")(\\.)(" + n + ")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", next: "function_arguments"},
- {token: ["entity.name.function", "text", "keyword.operator", "text", "storage.type", "text", "paren.lparen"], regex: "(" + n + ")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", next: "function_arguments"},
- {token: ["storage.type", "punctuation.operator", "entity.name.function", "text", "keyword.operator", "text", "storage.type", "text", "entity.name.function", "text", "paren.lparen"], regex: "(" + n + ")(\\.)(" + n + ")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()", next: "function_arguments"},
- {token: ["storage.type", "text", "entity.name.function", "text", "paren.lparen"], regex: "(function)(\\s+)(" + n + ")(\\s*)(\\()", next: "function_arguments"},
- {token: ["entity.name.function", "text", "punctuation.operator", "text", "storage.type", "text", "paren.lparen"], regex: "(" + n + ")(\\s*)(:)(\\s*)(function)(\\s*)(\\()", next: "function_arguments"},
- {token: ["text", "text", "storage.type", "text", "paren.lparen"], regex: "(:)(\\s*)(function)(\\s*)(\\()", next: "function_arguments"},
- {token: "keyword", regex: "(?:" + t + ")\\b", next: "regex_allowed"},
- {token: ["punctuation.operator", "support.function"], regex: /(\.)(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:opzzzz|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/},
- {token: ["punctuation.operator", "support.function.dom"], regex: /(\.)(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/},
- {token: ["punctuation.operator", "support.constant"], regex: /(\.)(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/},
- {token: ["storage.type", "punctuation.operator", "support.function.firebug"], regex: /(console)(\.)(warn|info|log|error|time|timeEnd|assert)\b/},
- {token: e, regex: n},
- {token: "keyword.operator", regex: /--|\+\+|[!$%&*+\-~]|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|\*=|%=|\+=|\-=|&=|\^=/, next: "regex_allowed"},
- {token: "punctuation.operator", regex: /\?|\:|\,|\;|\./, next: "regex_allowed"},
- {token: "paren.lparen", regex: /[\[({]/, next: "regex_allowed"},
- {token: "paren.rparen", regex: /[\])}]/},
- {token: "keyword.operator", regex: /\/=?/, next: "regex_allowed"},
- {token: "comment", regex: /^#!.*$/}
- ], regex_allowed: [i.getStartRule("doc-start"), {token: "comment", regex: "\\/\\*", next: "comment_regex_allowed"}, {token: "comment", regex: "\\/\\/.*$"}, {token: "string.regexp", regex: "\\/", next: "regex"}, {token: "text", regex: "\\s+"}, {token: "empty", regex: "", next: "start"}], regex: [
- {token: "regexp.keyword.operator", regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},
- {token: "string.regexp", regex: "/\\w*", next: "start"},
- {token: "invalid", regex: /\{\d+,?(?:\d+)?}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/},
- {token: "constant.language.escape", regex: /\(\?[:=!]|\)|{\d+,?(?:\d+)?}|{,\d+}|[+*]\?|[()$^+*?]/},
- {token: "constant.language.delimiter", regex: /\|/},
- {token: "constant.language.escape", regex: /\[\^?/, next: "regex_character_class"},
- {token: "empty", regex: "$", next: "start"},
- {defaultToken: "string.regexp"}
- ], regex_character_class: [
- {token: "regexp.keyword.operator", regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},
- {token: "constant.language.escape", regex: "]", next: "regex"},
- {token: "constant.language.escape", regex: "-"},
- {token: "empty", regex: "$", next: "start"},
- {defaultToken: "string.regexp.charachterclass"}
- ], function_arguments: [
- {token: "variable.parameter", regex: n},
- {token: "punctuation.operator", regex: "[, ]+"},
- {token: "punctuation.operator", regex: "$"},
- {token: "empty", regex: "", next: "start"}
- ], comment_regex_allowed: [
- {token: "comment", regex: "\\*\\/", next: "regex_allowed"},
- {defaultToken: "comment"}
- ], comment: [
- {token: "comment", regex: "\\*\\/", next: "start"},
- {defaultToken: "comment"}
- ], qqstring: [
- {token: "constant.language.escape", regex: r},
- {token: "string", regex: "\\\\$", next: "qqstring"},
- {token: "string", regex: '"|$', next: "start"},
- {defaultToken: "string"}
- ], qstring: [
- {token: "constant.language.escape", regex: r},
- {token: "string", regex: "\\\\$", next: "qstring"},
- {token: "string", regex: "'|$", next: "start"},
- {defaultToken: "string"}
- ]}, this.embedRules(i, "doc-", [i.getEndRule("start")])
- };
- r.inherits(o, s), t.JavaScriptHighlightRules = o
-}), ace.define("ace/mode/xml_util", ["require", "exports", "module"], function (e, t, n) {
- function r(e) {
- return[
- {token: "string", regex: '"', next: e + "_qqstring"},
- {token: "string", regex: "'", next: e + "_qstring"}
- ]
- }
-
- function i(e, t) {
- return[
- {token: "string", regex: e, next: t},
- {token: "constant.language.escape", regex: "(?:[0-9]+;)|(?:[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"},
- {defaultToken: "string"}
- ]
- }
-
- t.tag = function (e, t, n, s) {
- e[t] = [
- {token: "text", regex: "\\s+"},
- {token: s ? function (e) {
- return s[e] ? "meta.tag.tag-name." + s[e] : "meta.tag.tag-name"
- } : "meta.tag.tag-name", regex: "[-_a-zA-Z0-9:]+", next: t + "_embed_attribute_list"},
- {token: "empty", regex: "", next: t + "_embed_attribute_list"}
- ], e[t + "_qstring"] = i("'", t + "_embed_attribute_list"), e[t + "_qqstring"] = i('"', t + "_embed_attribute_list"), e[t + "_embed_attribute_list"] = [
- {token: "meta.tag.r", regex: "/?>", next: n},
- {token: "keyword.operator", regex: "="},
- {token: "entity.other.attribute-name", regex: "[-_a-zA-Z0-9:]+"},
- {token: "constant.numeric", regex: "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},
- {token: "text", regex: "\\s+"}
- ].concat(r(t))
- }
-}), ace.define("ace/mode/matching_brace_outdent", ["require", "exports", "module", "ace/range"], function (e, t, n) {
- var r = e("../range").Range, i = function () {
- };
- (function () {
- this.checkOutdent = function (e, t) {
- return/^\s+$/.test(e) ? /^\s*\}/.test(t) : !1
- }, this.autoOutdent = function (e, t) {
- var n = e.getLine(t), i = n.match(/^(\s*\})/);
- if (!i)return 0;
- var s = i[1].length, o = e.findMatchingBracket({row: t, column: s});
- if (!o || o.row == t)return 0;
- var u = this.$getIndent(e.getLine(o.row));
- e.replace(new r(t, 0, t, s - 1), u)
- }, this.$getIndent = function (e) {
- var t = e.match(/^(\s+)/);
- return t ? t[1] : ""
- }
- }).call(i.prototype), t.MatchingBraceOutdent = i
-}), ace.define("ace/mode/behaviour/cstyle", ["require", "exports", "module", "ace/lib/oop", "ace/mode/behaviour", "ace/token_iterator", "ace/lib/lang"], function (e, t, n) {
- var r = e("../../lib/oop"), i = e("../behaviour").Behaviour, s = e("../../token_iterator").TokenIterator, o = e("../../lib/lang"), u = ["text", "paren.rparen", "punctuation.operator"], a = ["text", "paren.rparen", "punctuation.operator", "comment"], f = 0, l = -1, c = "", h = 0, p = -1, d = "", v = "", m = function () {
- m.isSaneInsertion = function (e, t) {
- var n = e.getCursorPosition(), r = new s(t, n.row, n.column);
- if (!this.$matchTokenType(r.getCurrentToken() || "text", u)) {
- var i = new s(t, n.row, n.column + 1);
- if (!this.$matchTokenType(i.getCurrentToken() || "text", u))return!1
- }
- return r.stepForward(), r.getCurrentTokenRow() !== n.row || this.$matchTokenType(r.getCurrentToken() || "text", a)
- }, m.$matchTokenType = function (e, t) {
- return t.indexOf(e.type || e) > -1
- }, m.recordAutoInsert = function (e, t, n) {
- var r = e.getCursorPosition(), i = t.doc.getLine(r.row);
- this.isAutoInsertedClosing(r, i, c[0]) || (f = 0), l = r.row, c = n + i.substr(r.column), f++
- }, m.recordMaybeInsert = function (e, t, n) {
- var r = e.getCursorPosition(), i = t.doc.getLine(r.row);
- this.isMaybeInsertedClosing(r, i) || (h = 0), p = r.row, d = i.substr(0, r.column) + n, v = i.substr(r.column), h++
- }, m.isAutoInsertedClosing = function (e, t, n) {
- return f > 0 && e.row === l && n === c[0] && t.substr(e.column) === c
- }, m.isMaybeInsertedClosing = function (e, t) {
- return h > 0 && e.row === p && t.substr(e.column) === v && t.substr(0, e.column) == d
- }, m.popAutoInsertedClosing = function () {
- c = c.substr(1), f--
- }, m.clearMaybeInsertedClosing = function () {
- h = 0, p = -1
- }, this.add("braces", "insertion", function (e, t, n, r, i) {
- var s = n.getCursorPosition(), u = r.doc.getLine(s.row);
- if (i == "{") {
- var a = n.getSelectionRange(), f = r.doc.getTextRange(a);
- if (f !== "" && f !== "{" && n.getWrapBehavioursEnabled())return{text: "{" + f + "}", selection: !1};
- if (m.isSaneInsertion(n, r))return/[\]\}\)]/.test(u[s.column]) ? (m.recordAutoInsert(n, r, "}"), {text: "{}", selection: [1, 1]}) : (m.recordMaybeInsert(n, r, "{"), {text: "{", selection: [1, 1]})
- } else if (i == "}") {
- var l = u.substring(s.column, s.column + 1);
- if (l == "}") {
- var c = r.$findOpeningBracket("}", {column: s.column + 1, row: s.row});
- if (c !== null && m.isAutoInsertedClosing(s, u, i))return m.popAutoInsertedClosing(), {text: "", selection: [1, 1]}
- }
- } else if (i == "\n" || i == "\r\n") {
- var p = "";
- m.isMaybeInsertedClosing(s, u) && (p = o.stringRepeat("}", h), m.clearMaybeInsertedClosing());
- var l = u.substring(s.column, s.column + 1);
- if (l == "}" || p !== "") {
- var d = r.findMatchingBracket({row: s.row, column: s.column}, "}");
- if (!d)return null;
- var v = this.getNextLineIndent(e, u.substring(0, s.column), r.getTabString()), g = this.$getIndent(u);
- return{text: "\n" + v + "\n" + g + p, selection: [1, v.length, 1, v.length]}
- }
- }
- }), this.add("braces", "deletion", function (e, t, n, r, i) {
- var s = r.doc.getTextRange(i);
- if (!i.isMultiLine() && s == "{") {
- var o = r.doc.getLine(i.start.row), u = o.substring(i.end.column, i.end.column + 1);
- if (u == "}")return i.end.column++, i;
- h--
- }
- }), this.add("parens", "insertion", function (e, t, n, r, i) {
- if (i == "(") {
- var s = n.getSelectionRange(), o = r.doc.getTextRange(s);
- if (o !== "" && n.getWrapBehavioursEnabled())return{text: "(" + o + ")", selection: !1};
- if (m.isSaneInsertion(n, r))return m.recordAutoInsert(n, r, ")"), {text: "()", selection: [1, 1]}
- } else if (i == ")") {
- var u = n.getCursorPosition(), a = r.doc.getLine(u.row), f = a.substring(u.column, u.column + 1);
- if (f == ")") {
- var l = r.$findOpeningBracket(")", {column: u.column + 1, row: u.row});
- if (l !== null && m.isAutoInsertedClosing(u, a, i))return m.popAutoInsertedClosing(), {text: "", selection: [1, 1]}
- }
- }
- }), this.add("parens", "deletion", function (e, t, n, r, i) {
- var s = r.doc.getTextRange(i);
- if (!i.isMultiLine() && s == "(") {
- var o = r.doc.getLine(i.start.row), u = o.substring(i.start.column + 1, i.start.column + 2);
- if (u == ")")return i.end.column++, i
- }
- }), this.add("brackets", "insertion", function (e, t, n, r, i) {
- if (i == "[") {
- var s = n.getSelectionRange(), o = r.doc.getTextRange(s);
- if (o !== "" && n.getWrapBehavioursEnabled())return{text: "[" + o + "]", selection: !1};
- if (m.isSaneInsertion(n, r))return m.recordAutoInsert(n, r, "]"), {text: "[]", selection: [1, 1]}
- } else if (i == "]") {
- var u = n.getCursorPosition(), a = r.doc.getLine(u.row), f = a.substring(u.column, u.column + 1);
- if (f == "]") {
- var l = r.$findOpeningBracket("]", {column: u.column + 1, row: u.row});
- if (l !== null && m.isAutoInsertedClosing(u, a, i))return m.popAutoInsertedClosing(), {text: "", selection: [1, 1]}
- }
- }
- }), this.add("brackets", "deletion", function (e, t, n, r, i) {
- var s = r.doc.getTextRange(i);
- if (!i.isMultiLine() && s == "[") {
- var o = r.doc.getLine(i.start.row), u = o.substring(i.start.column + 1, i.start.column + 2);
- if (u == "]")return i.end.column++, i
- }
- }), this.add("string_dquotes", "insertion", function (e, t, n, r, i) {
- if (i == '"' || i == "'") {
- var s = i, o = n.getSelectionRange(), u = r.doc.getTextRange(o);
- if (u !== "" && u !== "'" && u != '"' && n.getWrapBehavioursEnabled())return{text: s + u + s, selection: !1};
- var a = n.getCursorPosition(), f = r.doc.getLine(a.row), l = f.substring(a.column - 1, a.column);
- if (l == "\\")return null;
- var c = r.getTokens(o.start.row), h = 0, p, d = -1;
- for (var v = 0; v < c.length; v++) {
- p = c[v], p.type == "string" ? d = -1 : d < 0 && (d = p.value.indexOf(s));
- if (p.value.length + h > o.start.column)break;
- h += c[v].value.length
- }
- if (!p || d < 0 && p.type !== "comment" && (p.type !== "string" || o.start.column !== p.value.length + h - 1 && p.value.lastIndexOf(s) === p.value.length - 1)) {
- if (!m.isSaneInsertion(n, r))return;
- return{text: s + s, selection: [1, 1]}
- }
- if (p && p.type === "string") {
- var g = f.substring(a.column, a.column + 1);
- if (g == s)return{text: "", selection: [1, 1]}
- }
- }
- }), this.add("string_dquotes", "deletion", function (e, t, n, r, i) {
- var s = r.doc.getTextRange(i);
- if (!i.isMultiLine() && (s == '"' || s == "'")) {
- var o = r.doc.getLine(i.start.row), u = o.substring(i.start.column + 1, i.start.column + 2);
- if (u == s)return i.end.column++, i
- }
- })
- };
- r.inherits(m, i), t.CstyleBehaviour = m
-}), ace.define("ace/mode/folding/cstyle", ["require", "exports", "module", "ace/lib/oop", "ace/range", "ace/mode/folding/fold_mode"], function (e, t, n) {
- var r = e("../../lib/oop"), i = e("../../range").Range, s = e("./fold_mode").FoldMode, o = t.FoldMode = function () {
- };
- r.inherits(o, s), function () {
- this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/, this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/, this.getFoldWidgetRange = function (e, t, n) {
- var r = e.getLine(n), i = r.match(this.foldingStartMarker);
- if (i) {
- var s = i.index;
- return i[1] ? this.openingBracketBlock(e, i[1], n, s) : e.getCommentFoldRange(n, s + i[0].length, 1)
- }
- if (t !== "markbeginend")return;
- var i = r.match(this.foldingStopMarker);
- if (i) {
- var s = i.index + i[0].length;
- return i[1] ? this.closingBracketBlock(e, i[1], n, s) : e.getCommentFoldRange(n, s, -1)
- }
- }
- }.call(o.prototype)
-})
\ No newline at end of file
diff --git a/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/mode-powershell.js b/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/mode-powershell.js
deleted file mode 100644
index b3a3e33..0000000
--- a/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/mode-powershell.js
+++ /dev/null
@@ -1,206 +0,0 @@
-ace.define("ace/mode/powershell", ["require", "exports", "module", "ace/lib/oop", "ace/mode/text", "ace/tokenizer", "ace/mode/powershell_highlight_rules", "ace/mode/matching_brace_outdent", "ace/mode/behaviour/cstyle", "ace/mode/folding/cstyle"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("./text").Mode, s = e("../tokenizer").Tokenizer, o = e("./powershell_highlight_rules").PowershellHighlightRules, u = e("./matching_brace_outdent").MatchingBraceOutdent, a = e("./behaviour/cstyle").CstyleBehaviour, f = e("./folding/cstyle").FoldMode, l = function () {
- this.$tokenizer = new s((new o).getRules()), this.$outdent = new u, this.$behaviour = new a, this.foldingRules = new f
- };
- r.inherits(l, i), function () {
- this.getNextLineIndent = function (e, t, n) {
- var r = this.$getIndent(t), i = this.$tokenizer.getLineTokens(t, e), s = i.tokens;
- if (s.length && s[s.length - 1].type == "comment")return r;
- if (e == "start") {
- var o = t.match(/^.*[\{\(\[]\s*$/);
- o && (r += n)
- }
- return r
- }, this.checkOutdent = function (e, t, n) {
- return this.$outdent.checkOutdent(t, n)
- }, this.autoOutdent = function (e, t, n) {
- this.$outdent.autoOutdent(t, n)
- }, this.createWorker = function (e) {
- return null
- }
- }.call(l.prototype), t.Mode = l
-}), ace.define("ace/mode/powershell_highlight_rules", ["require", "exports", "module", "ace/lib/oop", "ace/mode/text_highlight_rules"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("./text_highlight_rules").TextHighlightRules, s = function () {
- var e = "function|if|else|elseif|switch|while|default|for|do|until|break|continue|foreach|return|filter|in|trap|throw|param|begin|process|end", t = "Get-Alias|Import-Alias|New-Alias|Set-Alias|Get-AuthenticodeSignature|Set-AuthenticodeSignature|Set-Location|Get-ChildItem|Clear-Item|Get-Command|Measure-Command|Trace-Command|Add-Computer|Checkpoint-Computer|Remove-Computer|Restart-Computer|Restore-Computer|Stop-Computer|Reset-ComputerMachinePassword|Test-ComputerSecureChannel|Add-Content|Get-Content|Set-Content|Clear-Content|Get-Command|Invoke-Command|Enable-ComputerRestore|Disable-ComputerRestore|Get-ComputerRestorePoint|Test-Connection|ConvertFrom-CSV|ConvertTo-CSV|ConvertTo-Html|ConvertTo-Xml|ConvertFrom-SecureString|ConvertTo-SecureString|Copy-Item|Export-Counter|Get-Counter|Import-Counter|Get-Credential|Get-Culture|Get-ChildItem|Get-Date|Set-Date|Remove-Item|Compare-Object|Get-Event|Get-WinEvent|New-Event|Remove-Event|Unregister-Event|Wait-Event|Clear-EventLog|Get-Eventlog|Limit-EventLog|New-Eventlog|Remove-EventLog|Show-EventLog|Write-EventLog|Get-EventSubscriber|Register-EngineEvent|Register-ObjectEvent|Register-WmiEvent|Get-ExecutionPolicy|Set-ExecutionPolicy|Export-Alias|Export-Clixml|Export-Console|Export-Csv|ForEach-Object|Format-Custom|Format-List|Format-Table|Format-Wide|Export-FormatData|Get-FormatData|Get-Item|Get-ChildItem|Get-Help|Add-History|Clear-History|Get-History|Invoke-History|Get-Host|Read-Host|Write-Host|Get-HotFix|Import-Clixml|Import-Csv|Invoke-Command|Invoke-Expression|Get-Item|Invoke-Item|New-Item|Remove-Item|Set-Item|Clear-ItemProperty|Copy-ItemProperty|Get-ItemProperty|Move-ItemProperty|New-ItemProperty|Remove-ItemProperty|Rename-ItemProperty|Set-ItemProperty|Get-Job|Receive-Job|Remove-Job|Start-Job|Stop-Job|Wait-Job|Stop-Process|Update-List|Get-Location|Pop-Location|Push-Location|Set-Location|Send-MailMessage|Add-Member|Get-Member|Move-Item|Compare-Object|Group-Object|Measure-Object|New-Object|Select-Object|Sort-Object|Where-Object|Out-Default|Out-File|Out-GridView|Out-Host|Out-Null|Out-Printer|Out-String|Convert-Path|Join-Path|Resolve-Path|Split-Path|Test-Path|Get-Pfxcertificate|Pop-Location|Push-Location|Get-Process|Start-Process|Stop-Process|Wait-Process|Enable-PSBreakpoint|Disable-PSBreakpoint|Get-PSBreakpoint|Set-PSBreakpoint|Remove-PSBreakpoint|Get-PSDrive|New-PSDrive|Remove-PSDrive|Get-PSProvider|Set-PSdebug|Enter-PSSession|Exit-PSSession|Export-PSSession|Get-PSSession|Import-PSSession|New-PSSession|Remove-PSSession|Disable-PSSessionConfiguration|Enable-PSSessionConfiguration|Get-PSSessionConfiguration|Register-PSSessionConfiguration|Set-PSSessionConfiguration|Unregister-PSSessionConfiguration|New-PSSessionOption|Add-PsSnapIn|Get-PsSnapin|Remove-PSSnapin|Get-Random|Read-Host|Remove-Item|Rename-Item|Rename-ItemProperty|Select-Object|Select-XML|Send-MailMessage|Get-Service|New-Service|Restart-Service|Resume-Service|Set-Service|Start-Service|Stop-Service|Suspend-Service|Sort-Object|Start-Sleep|ConvertFrom-StringData|Select-String|Tee-Object|New-Timespan|Trace-Command|Get-Tracesource|Set-Tracesource|Start-Transaction|Complete-Transaction|Get-Transaction|Use-Transaction|Undo-Transaction|Start-Transcript|Stop-Transcript|Add-Type|Update-TypeData|Get-Uiculture|Get-Unique|Update-Formatdata|Update-Typedata|Clear-Variable|Get-Variable|New-Variable|Remove-Variable|Set-Variable|New-WebServiceProxy|Where-Object|Write-Debug|Write-Error|Write-Host|Write-Output|Write-Progress|Write-Verbose|Write-Warning|Set-WmiInstance|Invoke-WmiMethod|Get-WmiObject|Remove-WmiObject|Connect-WSMan|Disconnect-WSMan|Test-WSMan|Invoke-WSManAction|Disable-WSManCredSSP|Enable-WSManCredSSP|Get-WSManCredSSP|New-WSManInstance|Get-WSManInstance|Set-WSManInstance|Remove-WSManInstance|Set-WSManQuickConfig|New-WSManSessionOption", n = this.createKeywordMapper({"support.function": t, keyword: e}, "identifier"), r = "eq|ne|ge|gt|lt|le|like|notlike|match|notmatch|replace|contains|notcontains|ieq|ine|ige|igt|ile|ilt|ilike|inotlike|imatch|inotmatch|ireplace|icontains|inotcontains|is|isnot|as|and|or|band|bor|not";
- this.$rules = {start: [
- {token: "comment", regex: "#.*$"},
- {token: "comment.start", regex: "<#", next: "comment"},
- {token: "string", regex: '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},
- {token: "string", regex: "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},
- {token: "constant.numeric", regex: "0[xX][0-9a-fA-F]+\\b"},
- {token: "constant.numeric", regex: "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},
- {token: "constant.language.boolean", regex: "[$](?:[Tt]rue|[Ff]alse)\\b"},
- {token: "constant.language", regex: "[$][Nn]ull\\b"},
- {token: "variable.instance", regex: "[$][a-zA-Z][a-zA-Z0-9_]*\\b"},
- {token: n, regex: "[a-zA-Z_$][a-zA-Z0-9_$\\-]*\\b"},
- {token: "keyword.operator", regex: "\\-(?:" + r + ")"},
- {token: "keyword.operator", regex: "&|\\*|\\+|\\-|\\=|\\+=|\\-="},
- {token: "lparen", regex: "[[({]"},
- {token: "rparen", regex: "[\\])}]"},
- {token: "text", regex: "\\s+"}
- ], comment: [
- {token: "comment.end", regex: "#>", next: "start"},
- {token: "doc.comment.tag", regex: "^\\.\\w+"},
- {token: "comment", regex: "\\w+"},
- {token: "comment", regex: "."}
- ]}
- };
- r.inherits(s, i), t.PowershellHighlightRules = s
-}), ace.define("ace/mode/matching_brace_outdent", ["require", "exports", "module", "ace/range"], function (e, t, n) {
- var r = e("../range").Range, i = function () {
- };
- (function () {
- this.checkOutdent = function (e, t) {
- return/^\s+$/.test(e) ? /^\s*\}/.test(t) : !1
- }, this.autoOutdent = function (e, t) {
- var n = e.getLine(t), i = n.match(/^(\s*\})/);
- if (!i)return 0;
- var s = i[1].length, o = e.findMatchingBracket({row: t, column: s});
- if (!o || o.row == t)return 0;
- var u = this.$getIndent(e.getLine(o.row));
- e.replace(new r(t, 0, t, s - 1), u)
- }, this.$getIndent = function (e) {
- var t = e.match(/^(\s+)/);
- return t ? t[1] : ""
- }
- }).call(i.prototype), t.MatchingBraceOutdent = i
-}), ace.define("ace/mode/behaviour/cstyle", ["require", "exports", "module", "ace/lib/oop", "ace/mode/behaviour", "ace/token_iterator", "ace/lib/lang"], function (e, t, n) {
- var r = e("../../lib/oop"), i = e("../behaviour").Behaviour, s = e("../../token_iterator").TokenIterator, o = e("../../lib/lang"), u = ["text", "paren.rparen", "punctuation.operator"], a = ["text", "paren.rparen", "punctuation.operator", "comment"], f = 0, l = -1, c = "", h = 0, p = -1, d = "", v = "", m = function () {
- m.isSaneInsertion = function (e, t) {
- var n = e.getCursorPosition(), r = new s(t, n.row, n.column);
- if (!this.$matchTokenType(r.getCurrentToken() || "text", u)) {
- var i = new s(t, n.row, n.column + 1);
- if (!this.$matchTokenType(i.getCurrentToken() || "text", u))return!1
- }
- return r.stepForward(), r.getCurrentTokenRow() !== n.row || this.$matchTokenType(r.getCurrentToken() || "text", a)
- }, m.$matchTokenType = function (e, t) {
- return t.indexOf(e.type || e) > -1
- }, m.recordAutoInsert = function (e, t, n) {
- var r = e.getCursorPosition(), i = t.doc.getLine(r.row);
- this.isAutoInsertedClosing(r, i, c[0]) || (f = 0), l = r.row, c = n + i.substr(r.column), f++
- }, m.recordMaybeInsert = function (e, t, n) {
- var r = e.getCursorPosition(), i = t.doc.getLine(r.row);
- this.isMaybeInsertedClosing(r, i) || (h = 0), p = r.row, d = i.substr(0, r.column) + n, v = i.substr(r.column), h++
- }, m.isAutoInsertedClosing = function (e, t, n) {
- return f > 0 && e.row === l && n === c[0] && t.substr(e.column) === c
- }, m.isMaybeInsertedClosing = function (e, t) {
- return h > 0 && e.row === p && t.substr(e.column) === v && t.substr(0, e.column) == d
- }, m.popAutoInsertedClosing = function () {
- c = c.substr(1), f--
- }, m.clearMaybeInsertedClosing = function () {
- h = 0, p = -1
- }, this.add("braces", "insertion", function (e, t, n, r, i) {
- var s = n.getCursorPosition(), u = r.doc.getLine(s.row);
- if (i == "{") {
- var a = n.getSelectionRange(), f = r.doc.getTextRange(a);
- if (f !== "" && f !== "{" && n.getWrapBehavioursEnabled())return{text: "{" + f + "}", selection: !1};
- if (m.isSaneInsertion(n, r))return/[\]\}\)]/.test(u[s.column]) ? (m.recordAutoInsert(n, r, "}"), {text: "{}", selection: [1, 1]}) : (m.recordMaybeInsert(n, r, "{"), {text: "{", selection: [1, 1]})
- } else if (i == "}") {
- var l = u.substring(s.column, s.column + 1);
- if (l == "}") {
- var c = r.$findOpeningBracket("}", {column: s.column + 1, row: s.row});
- if (c !== null && m.isAutoInsertedClosing(s, u, i))return m.popAutoInsertedClosing(), {text: "", selection: [1, 1]}
- }
- } else if (i == "\n" || i == "\r\n") {
- var p = "";
- m.isMaybeInsertedClosing(s, u) && (p = o.stringRepeat("}", h), m.clearMaybeInsertedClosing());
- var l = u.substring(s.column, s.column + 1);
- if (l == "}" || p !== "") {
- var d = r.findMatchingBracket({row: s.row, column: s.column}, "}");
- if (!d)return null;
- var v = this.getNextLineIndent(e, u.substring(0, s.column), r.getTabString()), g = this.$getIndent(u);
- return{text: "\n" + v + "\n" + g + p, selection: [1, v.length, 1, v.length]}
- }
- }
- }), this.add("braces", "deletion", function (e, t, n, r, i) {
- var s = r.doc.getTextRange(i);
- if (!i.isMultiLine() && s == "{") {
- var o = r.doc.getLine(i.start.row), u = o.substring(i.end.column, i.end.column + 1);
- if (u == "}")return i.end.column++, i;
- h--
- }
- }), this.add("parens", "insertion", function (e, t, n, r, i) {
- if (i == "(") {
- var s = n.getSelectionRange(), o = r.doc.getTextRange(s);
- if (o !== "" && n.getWrapBehavioursEnabled())return{text: "(" + o + ")", selection: !1};
- if (m.isSaneInsertion(n, r))return m.recordAutoInsert(n, r, ")"), {text: "()", selection: [1, 1]}
- } else if (i == ")") {
- var u = n.getCursorPosition(), a = r.doc.getLine(u.row), f = a.substring(u.column, u.column + 1);
- if (f == ")") {
- var l = r.$findOpeningBracket(")", {column: u.column + 1, row: u.row});
- if (l !== null && m.isAutoInsertedClosing(u, a, i))return m.popAutoInsertedClosing(), {text: "", selection: [1, 1]}
- }
- }
- }), this.add("parens", "deletion", function (e, t, n, r, i) {
- var s = r.doc.getTextRange(i);
- if (!i.isMultiLine() && s == "(") {
- var o = r.doc.getLine(i.start.row), u = o.substring(i.start.column + 1, i.start.column + 2);
- if (u == ")")return i.end.column++, i
- }
- }), this.add("brackets", "insertion", function (e, t, n, r, i) {
- if (i == "[") {
- var s = n.getSelectionRange(), o = r.doc.getTextRange(s);
- if (o !== "" && n.getWrapBehavioursEnabled())return{text: "[" + o + "]", selection: !1};
- if (m.isSaneInsertion(n, r))return m.recordAutoInsert(n, r, "]"), {text: "[]", selection: [1, 1]}
- } else if (i == "]") {
- var u = n.getCursorPosition(), a = r.doc.getLine(u.row), f = a.substring(u.column, u.column + 1);
- if (f == "]") {
- var l = r.$findOpeningBracket("]", {column: u.column + 1, row: u.row});
- if (l !== null && m.isAutoInsertedClosing(u, a, i))return m.popAutoInsertedClosing(), {text: "", selection: [1, 1]}
- }
- }
- }), this.add("brackets", "deletion", function (e, t, n, r, i) {
- var s = r.doc.getTextRange(i);
- if (!i.isMultiLine() && s == "[") {
- var o = r.doc.getLine(i.start.row), u = o.substring(i.start.column + 1, i.start.column + 2);
- if (u == "]")return i.end.column++, i
- }
- }), this.add("string_dquotes", "insertion", function (e, t, n, r, i) {
- if (i == '"' || i == "'") {
- var s = i, o = n.getSelectionRange(), u = r.doc.getTextRange(o);
- if (u !== "" && u !== "'" && u != '"' && n.getWrapBehavioursEnabled())return{text: s + u + s, selection: !1};
- var a = n.getCursorPosition(), f = r.doc.getLine(a.row), l = f.substring(a.column - 1, a.column);
- if (l == "\\")return null;
- var c = r.getTokens(o.start.row), h = 0, p, d = -1;
- for (var v = 0; v < c.length; v++) {
- p = c[v], p.type == "string" ? d = -1 : d < 0 && (d = p.value.indexOf(s));
- if (p.value.length + h > o.start.column)break;
- h += c[v].value.length
- }
- if (!p || d < 0 && p.type !== "comment" && (p.type !== "string" || o.start.column !== p.value.length + h - 1 && p.value.lastIndexOf(s) === p.value.length - 1)) {
- if (!m.isSaneInsertion(n, r))return;
- return{text: s + s, selection: [1, 1]}
- }
- if (p && p.type === "string") {
- var g = f.substring(a.column, a.column + 1);
- if (g == s)return{text: "", selection: [1, 1]}
- }
- }
- }), this.add("string_dquotes", "deletion", function (e, t, n, r, i) {
- var s = r.doc.getTextRange(i);
- if (!i.isMultiLine() && (s == '"' || s == "'")) {
- var o = r.doc.getLine(i.start.row), u = o.substring(i.start.column + 1, i.start.column + 2);
- if (u == s)return i.end.column++, i
- }
- })
- };
- r.inherits(m, i), t.CstyleBehaviour = m
-}), ace.define("ace/mode/folding/cstyle", ["require", "exports", "module", "ace/lib/oop", "ace/range", "ace/mode/folding/fold_mode"], function (e, t, n) {
- var r = e("../../lib/oop"), i = e("../../range").Range, s = e("./fold_mode").FoldMode, o = t.FoldMode = function () {
- };
- r.inherits(o, s), function () {
- this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/, this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/, this.getFoldWidgetRange = function (e, t, n) {
- var r = e.getLine(n), i = r.match(this.foldingStartMarker);
- if (i) {
- var s = i.index;
- return i[1] ? this.openingBracketBlock(e, i[1], n, s) : e.getCommentFoldRange(n, s + i[0].length, 1)
- }
- if (t !== "markbeginend")return;
- var i = r.match(this.foldingStopMarker);
- if (i) {
- var s = i.index + i[0].length;
- return i[1] ? this.closingBracketBlock(e, i[1], n, s) : e.getCommentFoldRange(n, s, -1)
- }
- }
- }.call(o.prototype)
-})
\ No newline at end of file
diff --git a/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/mode-python.js b/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/mode-python.js
deleted file mode 100644
index c894ddb..0000000
--- a/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/mode-python.js
+++ /dev/null
@@ -1,80 +0,0 @@
-ace.define("ace/mode/python", ["require", "exports", "module", "ace/lib/oop", "ace/mode/text", "ace/tokenizer", "ace/mode/python_highlight_rules", "ace/mode/folding/pythonic", "ace/range"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("./text").Mode, s = e("../tokenizer").Tokenizer, o = e("./python_highlight_rules").PythonHighlightRules, u = e("./folding/pythonic").FoldMode, a = e("../range").Range, f = function () {
- this.$tokenizer = new s((new o).getRules()), this.foldingRules = new u("\\:")
- };
- r.inherits(f, i), function () {
- this.toggleCommentLines = function (e, t, n, r) {
- var i = !0, s = /^(\s*)#/;
- for (var o = n; o <= r; o++)if (!s.test(t.getLine(o))) {
- i = !1;
- break
- }
- if (i) {
- var u = new a(0, 0, 0, 0);
- for (var o = n; o <= r; o++) {
- var f = t.getLine(o), l = f.match(s);
- u.start.row = o, u.end.row = o, u.end.column = l[0].length, t.replace(u, l[1])
- }
- } else t.indentRows(n, r, "#")
- }, this.getNextLineIndent = function (e, t, n) {
- var r = this.$getIndent(t), i = this.$tokenizer.getLineTokens(t, e), s = i.tokens;
- if (s.length && s[s.length - 1].type == "comment")return r;
- if (e == "start") {
- var o = t.match(/^.*[\{\(\[\:]\s*$/);
- o && (r += n)
- }
- return r
- };
- var e = {pass: 1, "return": 1, raise: 1, "break": 1, "continue": 1};
- this.checkOutdent = function (t, n, r) {
- if (r !== "\r\n" && r !== "\r" && r !== "\n")return!1;
- var i = this.$tokenizer.getLineTokens(n.trim(), t).tokens;
- if (!i)return!1;
- do var s = i.pop(); while (s && (s.type == "comment" || s.type == "text" && s.value.match(/^\s+$/)));
- return s ? s.type == "keyword" && e[s.value] : !1
- }, this.autoOutdent = function (e, t, n) {
- n += 1;
- var r = this.$getIndent(t.getLine(n)), i = t.getTabString();
- r.slice(-i.length) == i && t.remove(new a(n, r.length - i.length, n, r.length))
- }
- }.call(f.prototype), t.Mode = f
-}), ace.define("ace/mode/python_highlight_rules", ["require", "exports", "module", "ace/lib/oop", "ace/mode/text_highlight_rules"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("./text_highlight_rules").TextHighlightRules, s = function () {
- var e = "and|as|assert|break|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|not|or|pass|print|raise|return|try|while|with|yield", t = "True|False|None|NotImplemented|Ellipsis|__debug__", n = "abs|divmod|input|open|staticmethod|all|enumerate|int|ord|str|any|eval|isinstance|pow|sum|basestring|execfile|issubclass|print|super|binfile|iter|property|tuple|bool|filter|len|range|type|bytearray|float|list|raw_input|unichr|callable|format|locals|reduce|unicode|chr|frozenset|long|reload|vars|classmethod|getattr|map|repr|xrange|cmp|globals|max|reversed|zip|compile|hasattr|memoryview|round|__import__|complex|hash|min|set|apply|delattr|help|next|setattr|buffer|dict|hex|object|slice|coerce|dir|id|oct|sorted|intern", r = this.createKeywordMapper({"invalid.deprecated": "debugger", "support.function": n, "constant.language": t, keyword: e}, "identifier"), i = "(?:r|u|ur|R|U|UR|Ur|uR)?", s = "(?:(?:[1-9]\\d*)|(?:0))", o = "(?:0[oO]?[0-7]+)", u = "(?:0[xX][\\dA-Fa-f]+)", a = "(?:0[bB][01]+)", f = "(?:" + s + "|" + o + "|" + u + "|" + a + ")", l = "(?:[eE][+-]?\\d+)", c = "(?:\\.\\d+)", h = "(?:\\d+)", p = "(?:(?:" + h + "?" + c + ")|(?:" + h + "\\.))", d = "(?:(?:" + p + "|" + h + ")" + l + ")", v = "(?:" + d + "|" + p + ")";
- this.$rules = {start: [
- {token: "comment", regex: "#.*$"},
- {token: "string", regex: i + '"{3}(?:[^\\\\]|\\\\.)*?"{3}'},
- {token: "string", regex: i + '"{3}.*$', next: "qqstring"},
- {token: "string", regex: i + '"(?:[^\\\\]|\\\\.)*?"'},
- {token: "string", regex: i + "'{3}(?:[^\\\\]|\\\\.)*?'{3}"},
- {token: "string", regex: i + "'{3}.*$", next: "qstring"},
- {token: "string", regex: i + "'(?:[^\\\\]|\\\\.)*?'"},
- {token: "constant.numeric", regex: "(?:" + v + "|\\d+)[jJ]\\b"},
- {token: "constant.numeric", regex: v},
- {token: "constant.numeric", regex: f + "[lL]\\b"},
- {token: "constant.numeric", regex: f + "\\b"},
- {token: r, regex: "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},
- {token: "keyword.operator", regex: "\\+|\\-|\\*|\\*\\*|\\/|\\/\\/|%|<<|>>|&|\\||\\^|~|<|>|<=|=>|==|!=|<>|="},
- {token: "paren.lparen", regex: "[\\[\\(\\{]"},
- {token: "paren.rparen", regex: "[\\]\\)\\}]"},
- {token: "text", regex: "\\s+"}
- ], qqstring: [
- {token: "string", regex: '(?:[^\\\\]|\\\\.)*?"{3}', next: "start"},
- {token: "string", regex: ".+"}
- ], qstring: [
- {token: "string", regex: "(?:[^\\\\]|\\\\.)*?'{3}", next: "start"},
- {token: "string", regex: ".+"}
- ]}
- };
- r.inherits(s, i), t.PythonHighlightRules = s
-}), ace.define("ace/mode/folding/pythonic", ["require", "exports", "module", "ace/lib/oop", "ace/mode/folding/fold_mode"], function (e, t, n) {
- var r = e("../../lib/oop"), i = e("./fold_mode").FoldMode, s = t.FoldMode = function (e) {
- this.foldingStartMarker = new RegExp("([\\[{])(?:\\s*)$|(" + e + ")(?:\\s*)(?:#.*)?$")
- };
- r.inherits(s, i), function () {
- this.getFoldWidgetRange = function (e, t, n) {
- var r = e.getLine(n), i = r.match(this.foldingStartMarker);
- if (i)return i[1] ? this.openingBracketBlock(e, i[1], n, i.index) : i[2] ? this.indentationBlock(e, n, i.index + i[2].length) : this.indentationBlock(e, n)
- }
- }.call(s.prototype)
-})
\ No newline at end of file
diff --git a/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/mode-r.js b/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/mode-r.js
deleted file mode 100644
index 6fec44c..0000000
--- a/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/mode-r.js
+++ /dev/null
@@ -1,113 +0,0 @@
-ace.define("ace/mode/r", ["require", "exports", "module", "ace/range", "ace/lib/oop", "ace/mode/text", "ace/tokenizer", "ace/mode/text_highlight_rules", "ace/mode/r_highlight_rules", "ace/mode/matching_brace_outdent", "ace/unicode"], function (e, t, n) {
- var r = e("../range").Range, i = e("../lib/oop"), s = e("./text").Mode, o = e("../tokenizer").Tokenizer, u = e("./text_highlight_rules").TextHighlightRules, a = e("./r_highlight_rules").RHighlightRules, f = e("./matching_brace_outdent").MatchingBraceOutdent, l = e("../unicode"), c = function () {
- this.$tokenizer = new o((new a).getRules()), this.$outdent = new f
- };
- i.inherits(c, s), function () {
- this.tokenRe = new RegExp("^[" + l.packages.L + l.packages.Mn + l.packages.Mc + l.packages.Nd + l.packages.Pc + "._]+", "g"), this.nonTokenRe = new RegExp("^(?:[^" + l.packages.L + l.packages.Mn + l.packages.Mc + l.packages.Nd + l.packages.Pc + "._]|s])+", "g"), this.$complements = {"(": ")", "[": "]", '"': '"', "'": "'", "{": "}"}, this.$reOpen = /^[(["'{]$/, this.$reClose = /^[)\]"'}]$/, this.getNextLineIndent = function (e, t, n, r, i) {
- return this.codeModel.getNextLineIndent(i, t, e, n, r)
- }, this.allowAutoInsert = this.smartAllowAutoInsert, this.checkOutdent = function (e, t, n) {
- return/^\s+$/.test(t) ? /^\s*[\{\}\)]/.test(n) : !1
- }, this.getIndentForOpenBrace = function (e) {
- return this.codeModel.getIndentForOpenBrace(e)
- }, this.autoOutdent = function (e, t, n) {
- if (n == 0)return 0;
- var i = t.getLine(n), s = i.match(/^(\s*[\}\)])/);
- if (s) {
- var o = s[1].length, u = t.findMatchingBracket({row: n, column: o});
- if (!u || u.row == n)return 0;
- var a = this.codeModel.getIndentForOpenBrace(u);
- t.replace(new r(n, 0, n, o - 1), a)
- }
- s = i.match(/^(\s*\{)/);
- if (s) {
- var o = s[1].length, a = this.codeModel.getBraceIndent(n - 1);
- t.replace(new r(n, 0, n, o - 1), a)
- }
- }, this.$getIndent = function (e) {
- var t = e.match(/^(\s+)/);
- return t ? t[1] : ""
- }, this.transformAction = function (e, t, n, r, i) {
- if (t === "insertion" && i === "\n") {
- var s = n.getSelectionRange().start, o = /^((\s*#+')\s*)/.exec(r.doc.getLine(s.row));
- if (o && n.getSelectionRange().start.column >= o[2].length)return{text: "\n" + o[1]}
- }
- return!1
- }
- }.call(c.prototype), t.Mode = c
-}), ace.define("ace/mode/r_highlight_rules", ["require", "exports", "module", "ace/lib/oop", "ace/lib/lang", "ace/mode/text_highlight_rules", "ace/mode/tex_highlight_rules"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("../lib/lang"), s = e("./text_highlight_rules").TextHighlightRules, o = e("./tex_highlight_rules").TexHighlightRules, u = function () {
- var e = i.arrayToMap("function|if|in|break|next|repeat|else|for|return|switch|while|try|tryCatch|stop|warning|require|library|attach|detach|source|setMethod|setGeneric|setGroupGeneric|setClass".split("|")), t = i.arrayToMap("NULL|NA|TRUE|FALSE|T|F|Inf|NaN|NA_integer_|NA_real_|NA_character_|NA_complex_".split("|"));
- this.$rules = {start: [
- {token: "comment.sectionhead", regex: "#+(?!').*(?:----|====|####)\\s*$"},
- {token: "comment", regex: "#+'", next: "rd-start"},
- {token: "comment", regex: "#.*$"},
- {token: "string", regex: '["]', next: "qqstring"},
- {token: "string", regex: "[']", next: "qstring"},
- {token: "constant.numeric", regex: "0[xX][0-9a-fA-F]+[Li]?\\b"},
- {token: "constant.numeric", regex: "\\d+L\\b"},
- {token: "constant.numeric", regex: "\\d+(?:\\.\\d*)?(?:[eE][+\\-]?\\d*)?i?\\b"},
- {token: "constant.numeric", regex: "\\.\\d+(?:[eE][+\\-]?\\d*)?i?\\b"},
- {token: "constant.language.boolean", regex: "(?:TRUE|FALSE|T|F)\\b"},
- {token: "identifier", regex: "`.*?`"},
- {token: function (n) {
- return e[n] ? "keyword" : t[n] ? "constant.language" : n == "..." || n.match(/^\.\.\d+$/) ? "variable.language" : "identifier"
- }, regex: "[a-zA-Z.][a-zA-Z0-9._]*\\b"},
- {token: "keyword.operator", regex: "%%|>=|<=|==|!=|\\->|<\\-|\\|\\||&&|=|\\+|\\-|\\*|/|\\^|>|<|!|&|\\||~|\\$|:"},
- {token: "keyword.operator", regex: "%.*?%"},
- {token: "paren.keyword.operator", regex: "[[({]"},
- {token: "paren.keyword.operator", regex: "[\\])}]"},
- {token: "text", regex: "\\s+"}
- ], qqstring: [
- {token: "string", regex: '(?:(?:\\\\.)|(?:[^"\\\\]))*?"', next: "start"},
- {token: "string", regex: ".+"}
- ], qstring: [
- {token: "string", regex: "(?:(?:\\\\.)|(?:[^'\\\\]))*?'", next: "start"},
- {token: "string", regex: ".+"}
- ]};
- var n = (new o("comment")).getRules();
- for (var r = 0; r < n.start.length; r++)n.start[r].token += ".virtual-comment";
- this.addRules(n, "rd-"), this.$rules["rd-start"].unshift({token: "text", regex: "^", next: "start"}), this.$rules["rd-start"].unshift({token: "keyword", regex: "@(?!@)[^ ]*"}), this.$rules["rd-start"].unshift({token: "comment", regex: "@@"}), this.$rules["rd-start"].push({token: "comment", regex: "[^%\\\\[({\\])}]+"})
- };
- r.inherits(u, s), t.RHighlightRules = u
-}), ace.define("ace/mode/tex_highlight_rules", ["require", "exports", "module", "ace/lib/oop", "ace/lib/lang", "ace/mode/text_highlight_rules"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("../lib/lang"), s = e("./text_highlight_rules").TextHighlightRules, o = function (e) {
- e || (e = "text"), this.$rules = {start: [
- {token: "comment", regex: "%.*$"},
- {token: e, regex: "\\\\[$&%#\\{\\}]"},
- {token: "keyword", regex: "\\\\(?:documentclass|usepackage|newcounter|setcounter|addtocounter|value|arabic|stepcounter|newenvironment|renewenvironment|ref|vref|eqref|pageref|label|cite[a-zA-Z]*|tag|begin|end|bibitem)\\b", next: "nospell"},
- {token: "keyword", regex: "\\\\(?:[a-zA-z0-9]+|[^a-zA-z0-9])"},
- {token: "paren.keyword.operator", regex: "[[({]"},
- {token: "paren.keyword.operator", regex: "[\\])}]"},
- {token: e, regex: "\\s+"}
- ], nospell: [
- {token: "comment", regex: "%.*$", next: "start"},
- {token: "nospell." + e, regex: "\\\\[$&%#\\{\\}]"},
- {token: "keyword", regex: "\\\\(?:documentclass|usepackage|newcounter|setcounter|addtocounter|value|arabic|stepcounter|newenvironment|renewenvironment|ref|vref|eqref|pageref|label|cite[a-zA-Z]*|tag|begin|end|bibitem)\\b"},
- {token: "keyword", regex: "\\\\(?:[a-zA-z0-9]+|[^a-zA-z0-9])", next: "start"},
- {token: "paren.keyword.operator", regex: "[[({]"},
- {token: "paren.keyword.operator", regex: "[\\])]"},
- {token: "paren.keyword.operator", regex: "}", next: "start"},
- {token: "nospell." + e, regex: "\\s+"},
- {token: "nospell." + e, regex: "\\w+"}
- ]}
- };
- r.inherits(o, s), t.TexHighlightRules = o
-}), ace.define("ace/mode/matching_brace_outdent", ["require", "exports", "module", "ace/range"], function (e, t, n) {
- var r = e("../range").Range, i = function () {
- };
- (function () {
- this.checkOutdent = function (e, t) {
- return/^\s+$/.test(e) ? /^\s*\}/.test(t) : !1
- }, this.autoOutdent = function (e, t) {
- var n = e.getLine(t), i = n.match(/^(\s*\})/);
- if (!i)return 0;
- var s = i[1].length, o = e.findMatchingBracket({row: t, column: s});
- if (!o || o.row == t)return 0;
- var u = this.$getIndent(e.getLine(o.row));
- e.replace(new r(t, 0, t, s - 1), u)
- }, this.$getIndent = function (e) {
- var t = e.match(/^(\s+)/);
- return t ? t[1] : ""
- }
- }).call(i.prototype), t.MatchingBraceOutdent = i
-})
\ No newline at end of file
diff --git a/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/mode-rdoc.js b/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/mode-rdoc.js
deleted file mode 100644
index 3fdf8a4..0000000
--- a/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/mode-rdoc.js
+++ /dev/null
@@ -1,62 +0,0 @@
-ace.define("ace/mode/rdoc", ["require", "exports", "module", "ace/lib/oop", "ace/mode/text", "ace/tokenizer", "ace/mode/text_highlight_rules", "ace/mode/rdoc_highlight_rules", "ace/mode/matching_brace_outdent"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("./text").Mode, s = e("../tokenizer").Tokenizer, o = e("./text_highlight_rules").TextHighlightRules, u = e("./rdoc_highlight_rules").RDocHighlightRules, a = e("./matching_brace_outdent").MatchingBraceOutdent, f = function (e) {
- this.$tokenizer = new s((new u).getRules()), this.$outdent = new a
- };
- r.inherits(f, i), function () {
- this.getNextLineIndent = function (e, t, n) {
- return this.$getIndent(t)
- }
- }.call(f.prototype), t.Mode = f
-}), ace.define("ace/mode/rdoc_highlight_rules", ["require", "exports", "module", "ace/lib/oop", "ace/lib/lang", "ace/mode/text_highlight_rules", "ace/mode/latex_highlight_rules"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("../lib/lang"), s = e("./text_highlight_rules").TextHighlightRules, o = e("./latex_highlight_rules"), u = function () {
- this.$rules = {start: [
- {token: "comment", regex: "%.*$"},
- {token: "text", regex: "\\\\[$&%#\\{\\}]"},
- {token: "keyword", regex: "\\\\(?:name|alias|method|S3method|S4method|item|code|preformatted|kbd|pkg|var|env|option|command|author|email|url|source|cite|acronym|href|code|preformatted|link|eqn|deqn|keyword|usage|examples|dontrun|dontshow|figure|if|ifelse|Sexpr|RdOpts|inputencoding|usepackage)\\b", next: "nospell"},
- {token: "keyword", regex: "\\\\(?:[a-zA-z0-9]+|[^a-zA-z0-9])"},
- {token: "paren.keyword.operator", regex: "[[({]"},
- {token: "paren.keyword.operator", regex: "[\\])}]"},
- {token: "text", regex: "\\s+"}
- ], nospell: [
- {token: "comment", regex: "%.*$", next: "start"},
- {token: "nospell.text", regex: "\\\\[$&%#\\{\\}]"},
- {token: "keyword", regex: "\\\\(?:name|alias|method|S3method|S4method|item|code|preformatted|kbd|pkg|var|env|option|command|author|email|url|source|cite|acronym|href|code|preformatted|link|eqn|deqn|keyword|usage|examples|dontrun|dontshow|figure|if|ifelse|Sexpr|RdOpts|inputencoding|usepackage)\\b"},
- {token: "keyword", regex: "\\\\(?:[a-zA-z0-9]+|[^a-zA-z0-9])", next: "start"},
- {token: "paren.keyword.operator", regex: "[[({]"},
- {token: "paren.keyword.operator", regex: "[\\])]"},
- {token: "paren.keyword.operator", regex: "}", next: "start"},
- {token: "nospell.text", regex: "\\s+"},
- {token: "nospell.text", regex: "\\w+"}
- ]}
- };
- r.inherits(u, s), t.RDocHighlightRules = u
-}), ace.define("ace/mode/latex_highlight_rules", ["require", "exports", "module", "ace/lib/oop", "ace/mode/text_highlight_rules"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("./text_highlight_rules").TextHighlightRules, s = function () {
- this.$rules = {start: [
- {token: "keyword", regex: "\\\\(?:[^a-zA-Z]|[a-zA-Z]+)"},
- {token: "lparen", regex: "[[({]"},
- {token: "rparen", regex: "[\\])}]"},
- {token: "string", regex: "\\$(?:(?:\\\\.)|(?:[^\\$\\\\]))*?\\$"},
- {token: "comment", regex: "%.*$"}
- ]}
- };
- r.inherits(s, i), t.LatexHighlightRules = s
-}), ace.define("ace/mode/matching_brace_outdent", ["require", "exports", "module", "ace/range"], function (e, t, n) {
- var r = e("../range").Range, i = function () {
- };
- (function () {
- this.checkOutdent = function (e, t) {
- return/^\s+$/.test(e) ? /^\s*\}/.test(t) : !1
- }, this.autoOutdent = function (e, t) {
- var n = e.getLine(t), i = n.match(/^(\s*\})/);
- if (!i)return 0;
- var s = i[1].length, o = e.findMatchingBracket({row: t, column: s});
- if (!o || o.row == t)return 0;
- var u = this.$getIndent(e.getLine(o.row));
- e.replace(new r(t, 0, t, s - 1), u)
- }, this.$getIndent = function (e) {
- var t = e.match(/^(\s+)/);
- return t ? t[1] : ""
- }
- }).call(i.prototype), t.MatchingBraceOutdent = i
-})
\ No newline at end of file
diff --git a/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/mode-rhtml.js b/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/mode-rhtml.js
deleted file mode 100644
index d3399af..0000000
--- a/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/mode-rhtml.js
+++ /dev/null
@@ -1,686 +0,0 @@
-ace.define("ace/mode/rhtml", ["require", "exports", "module", "ace/lib/oop", "ace/mode/html", "ace/tokenizer", "ace/mode/rhtml_highlight_rules"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("./html").Mode, s = e("../tokenizer").Tokenizer, o = e("./rhtml_highlight_rules").RHtmlHighlightRules, u = function (e, t) {
- this.$session = t, this.$tokenizer = new s((new o).getRules())
- };
- r.inherits(u, i), function () {
- this.insertChunkInfo = {value: "\n", position: {row: 0, column: 15}}, this.getLanguageMode = function (e) {
- return this.$session.getState(e.row).match(/^r-/) ? "R" : "HTML"
- }, this.getNextLineIndent = function (e, t, n, r, i) {
- return this.codeModel.getNextLineIndent(i, t, e, n, r)
- }
- }.call(u.prototype), t.Mode = u
-}), ace.define("ace/mode/html", ["require", "exports", "module", "ace/lib/oop", "ace/mode/text", "ace/mode/javascript", "ace/mode/css", "ace/tokenizer", "ace/mode/html_highlight_rules", "ace/mode/behaviour/html", "ace/mode/folding/html"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("./text").Mode, s = e("./javascript").Mode, o = e("./css").Mode, u = e("../tokenizer").Tokenizer, a = e("./html_highlight_rules").HtmlHighlightRules, f = e("./behaviour/html").HtmlBehaviour, l = e("./folding/html").FoldMode, c = function () {
- var e = new a;
- this.$tokenizer = new u(e.getRules()), this.$behaviour = new f, this.$embeds = e.getEmbeds(), this.createModeDelegates({"js-": s, "css-": o}), this.foldingRules = new l
- };
- r.inherits(c, i), function () {
- this.toggleCommentLines = function (e, t, n, r) {
- return 0
- }, this.getNextLineIndent = function (e, t, n) {
- return this.$getIndent(t)
- }, this.checkOutdent = function (e, t, n) {
- return!1
- }
- }.call(c.prototype), t.Mode = c
-}), ace.define("ace/mode/javascript", ["require", "exports", "module", "ace/lib/oop", "ace/mode/text", "ace/tokenizer", "ace/mode/javascript_highlight_rules", "ace/mode/matching_brace_outdent", "ace/range", "ace/worker/worker_client", "ace/mode/behaviour/cstyle", "ace/mode/folding/cstyle"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("./text").Mode, s = e("../tokenizer").Tokenizer, o = e("./javascript_highlight_rules").JavaScriptHighlightRules, u = e("./matching_brace_outdent").MatchingBraceOutdent, a = e("../range").Range, f = e("../worker/worker_client").WorkerClient, l = e("./behaviour/cstyle").CstyleBehaviour, c = e("./folding/cstyle").FoldMode, h = function () {
- this.$tokenizer = new s((new o).getRules()), this.$outdent = new u, this.$behaviour = new l, this.foldingRules = new c
- };
- r.inherits(h, i), function () {
- this.toggleCommentLines = function (e, t, n, r) {
- var i = !0, s = /^(\s*)\/\//;
- for (var o = n; o <= r; o++)if (!s.test(t.getLine(o))) {
- i = !1;
- break
- }
- if (i) {
- var u = new a(0, 0, 0, 0);
- for (var o = n; o <= r; o++) {
- var f = t.getLine(o), l = f.match(s);
- u.start.row = o, u.end.row = o, u.end.column = l[0].length, t.replace(u, l[1])
- }
- } else t.indentRows(n, r, "//")
- }, this.getNextLineIndent = function (e, t, n) {
- var r = this.$getIndent(t), i = this.$tokenizer.getLineTokens(t, e), s = i.tokens, o = i.state;
- if (s.length && s[s.length - 1].type == "comment")return r;
- if (e == "start" || e == "regex_allowed") {
- var u = t.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/);
- u && (r += n)
- } else if (e == "doc-start") {
- if (o == "start" || e == "regex_allowed")return"";
- var u = t.match(/^\s*(\/?)\*/);
- u && (u[1] && (r += " "), r += "* ")
- }
- return r
- }, this.checkOutdent = function (e, t, n) {
- return this.$outdent.checkOutdent(t, n)
- }, this.autoOutdent = function (e, t, n) {
- this.$outdent.autoOutdent(t, n)
- }, this.createWorker = function (e) {
- var t = new f(["ace"], "ace/mode/javascript_worker", "JavaScriptWorker");
- return t.attachToDocument(e.getDocument()), t.on("jslint", function (t) {
- e.setAnnotations(t.data)
- }), t.on("terminate", function () {
- e.clearAnnotations()
- }), t
- }
- }.call(h.prototype), t.Mode = h
-}), ace.define("ace/mode/javascript_highlight_rules", ["require", "exports", "module", "ace/lib/oop", "ace/mode/doc_comment_highlight_rules", "ace/mode/text_highlight_rules"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("./doc_comment_highlight_rules").DocCommentHighlightRules, s = e("./text_highlight_rules").TextHighlightRules, o = function () {
- var e = this.createKeywordMapper({"variable.language": "Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document", keyword: "const|yield|import|get|set|break|case|catch|continue|default|delete|do|else|finally|for|function|if|in|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|__parent__|__count__|escape|unescape|with|__proto__|class|enum|extends|super|export|implements|private|public|interface|package|protected|static", "storage.type": "const|let|var|function", "constant.language": "null|Infinity|NaN|undefined", "support.function": "alert", "constant.language.boolean": "true|false"}, "identifier"), t = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void", n = "[a-zA-Z\\$_¡-￿][a-zA-Z\\d\\$_¡-￿]*\\b", r = "\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|[0-2][0-7]{0,2}|3[0-6][0-7]?|37[0-7]?|[4-7][0-7]?|.)";
- this.$rules = {start: [
- {token: "comment", regex: /\/\/.*$/},
- i.getStartRule("doc-start"),
- {token: "comment", regex: /\/\*/, next: "comment"},
- {token: "string", regex: "'(?=.)", next: "qstring"},
- {token: "string", regex: '"(?=.)', next: "qqstring"},
- {token: "constant.numeric", regex: /0[xX][0-9a-fA-F]+\b/},
- {token: "constant.numeric", regex: /[+-]?\d+(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?\b/},
- {token: ["storage.type", "punctuation.operator", "support.function", "punctuation.operator", "entity.name.function", "text", "keyword.operator"], regex: "(" + n + ")(\\.)(prototype)(\\.)(" + n + ")(\\s*)(=)", next: "function_arguments"},
- {token: ["storage.type", "punctuation.operator", "entity.name.function", "text", "keyword.operator", "text", "storage.type", "text", "paren.lparen"], regex: "(" + n + ")(\\.)(" + n + ")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", next: "function_arguments"},
- {token: ["entity.name.function", "text", "keyword.operator", "text", "storage.type", "text", "paren.lparen"], regex: "(" + n + ")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", next: "function_arguments"},
- {token: ["storage.type", "punctuation.operator", "entity.name.function", "text", "keyword.operator", "text", "storage.type", "text", "entity.name.function", "text", "paren.lparen"], regex: "(" + n + ")(\\.)(" + n + ")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()", next: "function_arguments"},
- {token: ["storage.type", "text", "entity.name.function", "text", "paren.lparen"], regex: "(function)(\\s+)(" + n + ")(\\s*)(\\()", next: "function_arguments"},
- {token: ["entity.name.function", "text", "punctuation.operator", "text", "storage.type", "text", "paren.lparen"], regex: "(" + n + ")(\\s*)(:)(\\s*)(function)(\\s*)(\\()", next: "function_arguments"},
- {token: ["text", "text", "storage.type", "text", "paren.lparen"], regex: "(:)(\\s*)(function)(\\s*)(\\()", next: "function_arguments"},
- {token: "keyword", regex: "(?:" + t + ")\\b", next: "regex_allowed"},
- {token: ["punctuation.operator", "support.function"], regex: /(\.)(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:opzzzz|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/},
- {token: ["punctuation.operator", "support.function.dom"], regex: /(\.)(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/},
- {token: ["punctuation.operator", "support.constant"], regex: /(\.)(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/},
- {token: ["storage.type", "punctuation.operator", "support.function.firebug"], regex: /(console)(\.)(warn|info|log|error|time|timeEnd|assert)\b/},
- {token: e, regex: n},
- {token: "keyword.operator", regex: /--|\+\+|[!$%&*+\-~]|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|\*=|%=|\+=|\-=|&=|\^=/, next: "regex_allowed"},
- {token: "punctuation.operator", regex: /\?|\:|\,|\;|\./, next: "regex_allowed"},
- {token: "paren.lparen", regex: /[\[({]/, next: "regex_allowed"},
- {token: "paren.rparen", regex: /[\])}]/},
- {token: "keyword.operator", regex: /\/=?/, next: "regex_allowed"},
- {token: "comment", regex: /^#!.*$/}
- ], regex_allowed: [i.getStartRule("doc-start"), {token: "comment", regex: "\\/\\*", next: "comment_regex_allowed"}, {token: "comment", regex: "\\/\\/.*$"}, {token: "string.regexp", regex: "\\/", next: "regex"}, {token: "text", regex: "\\s+"}, {token: "empty", regex: "", next: "start"}], regex: [
- {token: "regexp.keyword.operator", regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},
- {token: "string.regexp", regex: "/\\w*", next: "start"},
- {token: "invalid", regex: /\{\d+,?(?:\d+)?}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/},
- {token: "constant.language.escape", regex: /\(\?[:=!]|\)|{\d+,?(?:\d+)?}|{,\d+}|[+*]\?|[()$^+*?]/},
- {token: "constant.language.delimiter", regex: /\|/},
- {token: "constant.language.escape", regex: /\[\^?/, next: "regex_character_class"},
- {token: "empty", regex: "$", next: "start"},
- {defaultToken: "string.regexp"}
- ], regex_character_class: [
- {token: "regexp.keyword.operator", regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},
- {token: "constant.language.escape", regex: "]", next: "regex"},
- {token: "constant.language.escape", regex: "-"},
- {token: "empty", regex: "$", next: "start"},
- {defaultToken: "string.regexp.charachterclass"}
- ], function_arguments: [
- {token: "variable.parameter", regex: n},
- {token: "punctuation.operator", regex: "[, ]+"},
- {token: "punctuation.operator", regex: "$"},
- {token: "empty", regex: "", next: "start"}
- ], comment_regex_allowed: [
- {token: "comment", regex: "\\*\\/", next: "regex_allowed"},
- {defaultToken: "comment"}
- ], comment: [
- {token: "comment", regex: "\\*\\/", next: "start"},
- {defaultToken: "comment"}
- ], qqstring: [
- {token: "constant.language.escape", regex: r},
- {token: "string", regex: "\\\\$", next: "qqstring"},
- {token: "string", regex: '"|$', next: "start"},
- {defaultToken: "string"}
- ], qstring: [
- {token: "constant.language.escape", regex: r},
- {token: "string", regex: "\\\\$", next: "qstring"},
- {token: "string", regex: "'|$", next: "start"},
- {defaultToken: "string"}
- ]}, this.embedRules(i, "doc-", [i.getEndRule("start")])
- };
- r.inherits(o, s), t.JavaScriptHighlightRules = o
-}), ace.define("ace/mode/doc_comment_highlight_rules", ["require", "exports", "module", "ace/lib/oop", "ace/mode/text_highlight_rules"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("./text_highlight_rules").TextHighlightRules, s = function () {
- this.$rules = {start: [
- {token: "comment.doc.tag", regex: "@[\\w\\d_]+"},
- {token: "comment.doc.tag", regex: "\\bTODO\\b"},
- {defaultToken: "comment.doc"}
- ]}
- };
- r.inherits(s, i), s.getStartRule = function (e) {
- return{token: "comment.doc", regex: "\\/\\*(?=\\*)", next: e}
- }, s.getEndRule = function (e) {
- return{token: "comment.doc", regex: "\\*\\/", next: e}
- }, t.DocCommentHighlightRules = s
-}), ace.define("ace/mode/matching_brace_outdent", ["require", "exports", "module", "ace/range"], function (e, t, n) {
- var r = e("../range").Range, i = function () {
- };
- (function () {
- this.checkOutdent = function (e, t) {
- return/^\s+$/.test(e) ? /^\s*\}/.test(t) : !1
- }, this.autoOutdent = function (e, t) {
- var n = e.getLine(t), i = n.match(/^(\s*\})/);
- if (!i)return 0;
- var s = i[1].length, o = e.findMatchingBracket({row: t, column: s});
- if (!o || o.row == t)return 0;
- var u = this.$getIndent(e.getLine(o.row));
- e.replace(new r(t, 0, t, s - 1), u)
- }, this.$getIndent = function (e) {
- var t = e.match(/^(\s+)/);
- return t ? t[1] : ""
- }
- }).call(i.prototype), t.MatchingBraceOutdent = i
-}), ace.define("ace/mode/behaviour/cstyle", ["require", "exports", "module", "ace/lib/oop", "ace/mode/behaviour", "ace/token_iterator", "ace/lib/lang"], function (e, t, n) {
- var r = e("../../lib/oop"), i = e("../behaviour").Behaviour, s = e("../../token_iterator").TokenIterator, o = e("../../lib/lang"), u = ["text", "paren.rparen", "punctuation.operator"], a = ["text", "paren.rparen", "punctuation.operator", "comment"], f = 0, l = -1, c = "", h = 0, p = -1, d = "", v = "", m = function () {
- m.isSaneInsertion = function (e, t) {
- var n = e.getCursorPosition(), r = new s(t, n.row, n.column);
- if (!this.$matchTokenType(r.getCurrentToken() || "text", u)) {
- var i = new s(t, n.row, n.column + 1);
- if (!this.$matchTokenType(i.getCurrentToken() || "text", u))return!1
- }
- return r.stepForward(), r.getCurrentTokenRow() !== n.row || this.$matchTokenType(r.getCurrentToken() || "text", a)
- }, m.$matchTokenType = function (e, t) {
- return t.indexOf(e.type || e) > -1
- }, m.recordAutoInsert = function (e, t, n) {
- var r = e.getCursorPosition(), i = t.doc.getLine(r.row);
- this.isAutoInsertedClosing(r, i, c[0]) || (f = 0), l = r.row, c = n + i.substr(r.column), f++
- }, m.recordMaybeInsert = function (e, t, n) {
- var r = e.getCursorPosition(), i = t.doc.getLine(r.row);
- this.isMaybeInsertedClosing(r, i) || (h = 0), p = r.row, d = i.substr(0, r.column) + n, v = i.substr(r.column), h++
- }, m.isAutoInsertedClosing = function (e, t, n) {
- return f > 0 && e.row === l && n === c[0] && t.substr(e.column) === c
- }, m.isMaybeInsertedClosing = function (e, t) {
- return h > 0 && e.row === p && t.substr(e.column) === v && t.substr(0, e.column) == d
- }, m.popAutoInsertedClosing = function () {
- c = c.substr(1), f--
- }, m.clearMaybeInsertedClosing = function () {
- h = 0, p = -1
- }, this.add("braces", "insertion", function (e, t, n, r, i) {
- var s = n.getCursorPosition(), u = r.doc.getLine(s.row);
- if (i == "{") {
- var a = n.getSelectionRange(), f = r.doc.getTextRange(a);
- if (f !== "" && f !== "{" && n.getWrapBehavioursEnabled())return{text: "{" + f + "}", selection: !1};
- if (m.isSaneInsertion(n, r))return/[\]\}\)]/.test(u[s.column]) ? (m.recordAutoInsert(n, r, "}"), {text: "{}", selection: [1, 1]}) : (m.recordMaybeInsert(n, r, "{"), {text: "{", selection: [1, 1]})
- } else if (i == "}") {
- var l = u.substring(s.column, s.column + 1);
- if (l == "}") {
- var c = r.$findOpeningBracket("}", {column: s.column + 1, row: s.row});
- if (c !== null && m.isAutoInsertedClosing(s, u, i))return m.popAutoInsertedClosing(), {text: "", selection: [1, 1]}
- }
- } else if (i == "\n" || i == "\r\n") {
- var p = "";
- m.isMaybeInsertedClosing(s, u) && (p = o.stringRepeat("}", h), m.clearMaybeInsertedClosing());
- var l = u.substring(s.column, s.column + 1);
- if (l == "}" || p !== "") {
- var d = r.findMatchingBracket({row: s.row, column: s.column}, "}");
- if (!d)return null;
- var v = this.getNextLineIndent(e, u.substring(0, s.column), r.getTabString()), g = this.$getIndent(u);
- return{text: "\n" + v + "\n" + g + p, selection: [1, v.length, 1, v.length]}
- }
- }
- }), this.add("braces", "deletion", function (e, t, n, r, i) {
- var s = r.doc.getTextRange(i);
- if (!i.isMultiLine() && s == "{") {
- var o = r.doc.getLine(i.start.row), u = o.substring(i.end.column, i.end.column + 1);
- if (u == "}")return i.end.column++, i;
- h--
- }
- }), this.add("parens", "insertion", function (e, t, n, r, i) {
- if (i == "(") {
- var s = n.getSelectionRange(), o = r.doc.getTextRange(s);
- if (o !== "" && n.getWrapBehavioursEnabled())return{text: "(" + o + ")", selection: !1};
- if (m.isSaneInsertion(n, r))return m.recordAutoInsert(n, r, ")"), {text: "()", selection: [1, 1]}
- } else if (i == ")") {
- var u = n.getCursorPosition(), a = r.doc.getLine(u.row), f = a.substring(u.column, u.column + 1);
- if (f == ")") {
- var l = r.$findOpeningBracket(")", {column: u.column + 1, row: u.row});
- if (l !== null && m.isAutoInsertedClosing(u, a, i))return m.popAutoInsertedClosing(), {text: "", selection: [1, 1]}
- }
- }
- }), this.add("parens", "deletion", function (e, t, n, r, i) {
- var s = r.doc.getTextRange(i);
- if (!i.isMultiLine() && s == "(") {
- var o = r.doc.getLine(i.start.row), u = o.substring(i.start.column + 1, i.start.column + 2);
- if (u == ")")return i.end.column++, i
- }
- }), this.add("brackets", "insertion", function (e, t, n, r, i) {
- if (i == "[") {
- var s = n.getSelectionRange(), o = r.doc.getTextRange(s);
- if (o !== "" && n.getWrapBehavioursEnabled())return{text: "[" + o + "]", selection: !1};
- if (m.isSaneInsertion(n, r))return m.recordAutoInsert(n, r, "]"), {text: "[]", selection: [1, 1]}
- } else if (i == "]") {
- var u = n.getCursorPosition(), a = r.doc.getLine(u.row), f = a.substring(u.column, u.column + 1);
- if (f == "]") {
- var l = r.$findOpeningBracket("]", {column: u.column + 1, row: u.row});
- if (l !== null && m.isAutoInsertedClosing(u, a, i))return m.popAutoInsertedClosing(), {text: "", selection: [1, 1]}
- }
- }
- }), this.add("brackets", "deletion", function (e, t, n, r, i) {
- var s = r.doc.getTextRange(i);
- if (!i.isMultiLine() && s == "[") {
- var o = r.doc.getLine(i.start.row), u = o.substring(i.start.column + 1, i.start.column + 2);
- if (u == "]")return i.end.column++, i
- }
- }), this.add("string_dquotes", "insertion", function (e, t, n, r, i) {
- if (i == '"' || i == "'") {
- var s = i, o = n.getSelectionRange(), u = r.doc.getTextRange(o);
- if (u !== "" && u !== "'" && u != '"' && n.getWrapBehavioursEnabled())return{text: s + u + s, selection: !1};
- var a = n.getCursorPosition(), f = r.doc.getLine(a.row), l = f.substring(a.column - 1, a.column);
- if (l == "\\")return null;
- var c = r.getTokens(o.start.row), h = 0, p, d = -1;
- for (var v = 0; v < c.length; v++) {
- p = c[v], p.type == "string" ? d = -1 : d < 0 && (d = p.value.indexOf(s));
- if (p.value.length + h > o.start.column)break;
- h += c[v].value.length
- }
- if (!p || d < 0 && p.type !== "comment" && (p.type !== "string" || o.start.column !== p.value.length + h - 1 && p.value.lastIndexOf(s) === p.value.length - 1)) {
- if (!m.isSaneInsertion(n, r))return;
- return{text: s + s, selection: [1, 1]}
- }
- if (p && p.type === "string") {
- var g = f.substring(a.column, a.column + 1);
- if (g == s)return{text: "", selection: [1, 1]}
- }
- }
- }), this.add("string_dquotes", "deletion", function (e, t, n, r, i) {
- var s = r.doc.getTextRange(i);
- if (!i.isMultiLine() && (s == '"' || s == "'")) {
- var o = r.doc.getLine(i.start.row), u = o.substring(i.start.column + 1, i.start.column + 2);
- if (u == s)return i.end.column++, i
- }
- })
- };
- r.inherits(m, i), t.CstyleBehaviour = m
-}), ace.define("ace/mode/folding/cstyle", ["require", "exports", "module", "ace/lib/oop", "ace/range", "ace/mode/folding/fold_mode"], function (e, t, n) {
- var r = e("../../lib/oop"), i = e("../../range").Range, s = e("./fold_mode").FoldMode, o = t.FoldMode = function () {
- };
- r.inherits(o, s), function () {
- this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/, this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/, this.getFoldWidgetRange = function (e, t, n) {
- var r = e.getLine(n), i = r.match(this.foldingStartMarker);
- if (i) {
- var s = i.index;
- return i[1] ? this.openingBracketBlock(e, i[1], n, s) : e.getCommentFoldRange(n, s + i[0].length, 1)
- }
- if (t !== "markbeginend")return;
- var i = r.match(this.foldingStopMarker);
- if (i) {
- var s = i.index + i[0].length;
- return i[1] ? this.closingBracketBlock(e, i[1], n, s) : e.getCommentFoldRange(n, s, -1)
- }
- }
- }.call(o.prototype)
-}), ace.define("ace/mode/css", ["require", "exports", "module", "ace/lib/oop", "ace/mode/text", "ace/tokenizer", "ace/mode/css_highlight_rules", "ace/mode/matching_brace_outdent", "ace/worker/worker_client", "ace/mode/behaviour/css", "ace/mode/folding/cstyle"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("./text").Mode, s = e("../tokenizer").Tokenizer, o = e("./css_highlight_rules").CssHighlightRules, u = e("./matching_brace_outdent").MatchingBraceOutdent, a = e("../worker/worker_client").WorkerClient, f = e("./behaviour/css").CssBehaviour, l = e("./folding/cstyle").FoldMode, c = function () {
- this.$tokenizer = new s((new o).getRules(), "i"), this.$outdent = new u, this.$behaviour = new f, this.foldingRules = new l
- };
- r.inherits(c, i), function () {
- this.foldingRules = "cStyle", this.getNextLineIndent = function (e, t, n) {
- var r = this.$getIndent(t), i = this.$tokenizer.getLineTokens(t, e).tokens;
- if (i.length && i[i.length - 1].type == "comment")return r;
- var s = t.match(/^.*\{\s*$/);
- return s && (r += n), r
- }, this.checkOutdent = function (e, t, n) {
- return this.$outdent.checkOutdent(t, n)
- }, this.autoOutdent = function (e, t, n) {
- this.$outdent.autoOutdent(t, n)
- }, this.createWorker = function (e) {
- var t = new a(["ace"], "ace/mode/css_worker", "Worker");
- return t.attachToDocument(e.getDocument()), t.on("csslint", function (t) {
- e.setAnnotations(t.data)
- }), t.on("terminate", function () {
- e.clearAnnotations()
- }), t
- }
- }.call(c.prototype), t.Mode = c
-}), ace.define("ace/mode/css_highlight_rules", ["require", "exports", "module", "ace/lib/oop", "ace/lib/lang", "ace/mode/text_highlight_rules"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("../lib/lang"), s = e("./text_highlight_rules").TextHighlightRules, o = t.supportType = "animation-fill-mode|alignment-adjust|alignment-baseline|animation-delay|animation-direction|animation-duration|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|animation|appearance|azimuth|backface-visibility|background-attachment|background-break|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|background|baseline-shift|binding|bleed|bookmark-label|bookmark-level|bookmark-state|bookmark-target|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|border|bottom|box-align|box-decoration-break|box-direction|box-flex-group|box-flex|box-lines|box-ordinal-group|box-orient|box-pack|box-shadow|box-sizing|break-after|break-before|break-inside|caption-side|clear|clip|color-profile|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|crop|cue-after|cue-before|cue|cursor|direction|display|dominant-baseline|drop-initial-after-adjust|drop-initial-after-align|drop-initial-before-adjust|drop-initial-before-align|drop-initial-size|drop-initial-value|elevation|empty-cells|fit|fit-position|float-offset|float|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|font|grid-columns|grid-rows|hanging-punctuation|height|hyphenate-after|hyphenate-before|hyphenate-character|hyphenate-lines|hyphenate-resource|hyphens|icon|image-orientation|image-rendering|image-resolution|inline-box-align|left|letter-spacing|line-height|line-stacking-ruby|line-stacking-shift|line-stacking-strategy|line-stacking|list-style-image|list-style-position|list-style-type|list-style|margin-bottom|margin-left|margin-right|margin-top|margin|mark-after|mark-before|mark|marks|marquee-direction|marquee-play-count|marquee-speed|marquee-style|max-height|max-width|min-height|min-width|move-to|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|orphans|outline-color|outline-offset|outline-style|outline-width|outline|overflow-style|overflow-x|overflow-y|overflow|padding-bottom|padding-left|padding-right|padding-top|padding|page-break-after|page-break-before|page-break-inside|page-policy|page|pause-after|pause-before|pause|perspective-origin|perspective|phonemes|pitch-range|pitch|play-during|position|presentation-level|punctuation-trim|quotes|rendering-intent|resize|rest-after|rest-before|rest|richness|right|rotation-point|rotation|ruby-align|ruby-overhang|ruby-position|ruby-span|size|speak-header|speak-numeral|speak-punctuation|speak|speech-rate|stress|string-set|table-layout|target-name|target-new|target-position|target|text-align-last|text-align|text-decoration|text-emphasis|text-height|text-indent|text-justify|text-outline|text-shadow|text-transform|text-wrap|top|transform-origin|transform-style|transform|transition-delay|transition-duration|transition-property|transition-timing-function|transition|unicode-bidi|vertical-align|visibility|voice-balance|voice-duration|voice-family|voice-pitch-range|voice-pitch|voice-rate|voice-stress|voice-volume|volume|white-space-collapse|white-space|widows|width|word-break|word-spacing|word-wrap|z-index", u = t.supportFunction = "rgb|rgba|url|attr|counter|counters", a = t.supportConstant = "absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero", f = t.supportConstantColor = "aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow", l = t.supportConstantFonts = "arial|century|comic|courier|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace", c = t.numRe = "\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))", h = t.pseudoElements = "(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b", p = t.pseudoClasses = "(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b", d = function () {
- var e = this.createKeywordMapper({"support.function": u, "support.constant": a, "support.type": o, "support.constant.color": f, "support.constant.fonts": l}, "text", !0), t = [
- {token: "comment", regex: "\\/\\*", next: "ruleset_comment"},
- {token: "string", regex: '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},
- {token: "string", regex: "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},
- {token: ["constant.numeric", "keyword"], regex: "(" + c + ")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vm|vw|%)"},
- {token: "constant.numeric", regex: c},
- {token: "constant.numeric", regex: "#[a-f0-9]{6}"},
- {token: "constant.numeric", regex: "#[a-f0-9]{3}"},
- {token: ["punctuation", "entity.other.attribute-name.pseudo-element.css"], regex: h},
- {token: ["punctuation", "entity.other.attribute-name.pseudo-class.css"], regex: p},
- {token: e, regex: "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"}
- ], n = i.copyArray(t);
- n.unshift({token: "paren.rparen", regex: "\\}", next: "start"});
- var r = i.copyArray(t);
- r.unshift({token: "paren.rparen", regex: "\\}", next: "media"});
- var s = [
- {token: "comment", regex: ".+"}
- ], d = i.copyArray(s);
- d.unshift({token: "comment", regex: ".*?\\*\\/", next: "start"});
- var v = i.copyArray(s);
- v.unshift({token: "comment", regex: ".*?\\*\\/", next: "media"});
- var m = i.copyArray(s);
- m.unshift({token: "comment", regex: ".*?\\*\\/", next: "ruleset"}), this.$rules = {start: [
- {token: "comment", regex: "\\/\\*", next: "comment"},
- {token: "paren.lparen", regex: "\\{", next: "ruleset"},
- {token: "string", regex: "@.*?{", next: "media"},
- {token: "keyword", regex: "#[a-z0-9-_]+"},
- {token: "variable", regex: "\\.[a-z0-9-_]+"},
- {token: "string", regex: ":[a-z0-9-_]+"},
- {token: "constant", regex: "[a-z0-9-_]+"}
- ], media: [
- {token: "comment", regex: "\\/\\*", next: "media_comment"},
- {token: "paren.lparen", regex: "\\{", next: "media_ruleset"},
- {token: "string", regex: "\\}", next: "start"},
- {token: "keyword", regex: "#[a-z0-9-_]+"},
- {token: "variable", regex: "\\.[a-z0-9-_]+"},
- {token: "string", regex: ":[a-z0-9-_]+"},
- {token: "constant", regex: "[a-z0-9-_]+"}
- ], comment: d, ruleset: n, ruleset_comment: m, media_ruleset: r, media_comment: v}
- };
- r.inherits(d, s), t.CssHighlightRules = d
-}), ace.define("ace/mode/behaviour/css", ["require", "exports", "module", "ace/lib/oop", "ace/mode/behaviour", "ace/mode/behaviour/cstyle", "ace/token_iterator"], function (e, t, n) {
- var r = e("../../lib/oop"), i = e("../behaviour").Behaviour, s = e("./cstyle").CstyleBehaviour, o = e("../../token_iterator").TokenIterator, u = function () {
- this.inherit(s), this.add("colon", "insertion", function (e, t, n, r, i) {
- if (i === ":") {
- var s = n.getCursorPosition(), u = new o(r, s.row, s.column), a = u.getCurrentToken();
- a && a.value.match(/\s+/) && (a = u.stepBackward());
- if (a && a.type === "support.type") {
- var f = r.doc.getLine(s.row), l = f.substring(s.column, s.column + 1);
- if (l === ":")return{text: "", selection: [1, 1]};
- if (!f.substring(s.column).match(/^\s*;/))return{text: ":;", selection: [1, 1]}
- }
- }
- }), this.add("colon", "deletion", function (e, t, n, r, i) {
- var s = r.doc.getTextRange(i);
- if (!i.isMultiLine() && s === ":") {
- var o = r.doc.getLine(i.start.row), u = o.substring(i.end.column, i.end.column + 1);
- if (u === ";")return i.end.column++, i
- }
- }), this.add("semicolon", "insertion", function (e, t, n, r, i) {
- if (i === ";") {
- var s = n.getCursorPosition(), o = r.doc.getLine(s.row), u = o.substring(s.column, s.column + 1);
- if (u === ";")return{text: "", selection: [1, 1]}
- }
- })
- };
- r.inherits(u, s), t.CssBehaviour = u
-}), ace.define("ace/mode/html_highlight_rules", ["require", "exports", "module", "ace/lib/oop", "ace/lib/lang", "ace/mode/css_highlight_rules", "ace/mode/javascript_highlight_rules", "ace/mode/xml_util", "ace/mode/text_highlight_rules"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("../lib/lang"), s = e("./css_highlight_rules").CssHighlightRules, o = e("./javascript_highlight_rules").JavaScriptHighlightRules, u = e("./xml_util"), a = e("./text_highlight_rules").TextHighlightRules, f = i.createMap({a: "anchor", button: "form", form: "form", img: "image", input: "form", label: "form", script: "script", select: "form", textarea: "form", style: "style", table: "table", tbody: "table", td: "table", tfoot: "table", th: "table", tr: "table"}), l = function () {
- this.$rules = {start: [
- {token: "text", regex: "<\\!\\[CDATA\\[", next: "cdata"},
- {token: "xml-pe", regex: "<\\?.*?\\?>"},
- {token: "comment", regex: "<\\!--", next: "comment"},
- {token: "xml-pe", regex: "<\\!.*?>"},
- {token: "meta.tag", regex: "<(?=script\\b)", next: "script"},
- {token: "meta.tag", regex: "<(?=style\\b)", next: "style"},
- {token: "meta.tag", regex: "<\\/?", next: "tag"},
- {token: "text", regex: "\\s+"},
- {token: "constant.character.entity", regex: "(?:[0-9]+;)|(?:[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}
- ], cdata: [
- {token: "text", regex: "\\]\\]>", next: "start"}
- ], comment: [
- {token: "comment", regex: ".*?-->", next: "start"},
- {defaultToken: "comment"}
- ]}, u.tag(this.$rules, "tag", "start", f), u.tag(this.$rules, "style", "css-start", f), u.tag(this.$rules, "script", "js-start", f), this.embedRules(o, "js-", [
- {token: "comment", regex: "\\/\\/.*(?=<\\/script>)", next: "tag"},
- {token: "meta.tag", regex: "<\\/(?=script)", next: "tag"}
- ]), this.embedRules(s, "css-", [
- {token: "meta.tag", regex: "<\\/(?=style)", next: "tag"}
- ])
- };
- r.inherits(l, a), t.HtmlHighlightRules = l
-}), ace.define("ace/mode/xml_util", ["require", "exports", "module"], function (e, t, n) {
- function r(e) {
- return[
- {token: "string", regex: '"', next: e + "_qqstring"},
- {token: "string", regex: "'", next: e + "_qstring"}
- ]
- }
-
- function i(e, t) {
- return[
- {token: "string", regex: e, next: t},
- {token: "constant.language.escape", regex: "(?:[0-9]+;)|(?:[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"},
- {defaultToken: "string"}
- ]
- }
-
- t.tag = function (e, t, n, s) {
- e[t] = [
- {token: "text", regex: "\\s+"},
- {token: s ? function (e) {
- return s[e] ? "meta.tag.tag-name." + s[e] : "meta.tag.tag-name"
- } : "meta.tag.tag-name", regex: "[-_a-zA-Z0-9:]+", next: t + "_embed_attribute_list"},
- {token: "empty", regex: "", next: t + "_embed_attribute_list"}
- ], e[t + "_qstring"] = i("'", t + "_embed_attribute_list"), e[t + "_qqstring"] = i('"', t + "_embed_attribute_list"), e[t + "_embed_attribute_list"] = [
- {token: "meta.tag.r", regex: "/?>", next: n},
- {token: "keyword.operator", regex: "="},
- {token: "entity.other.attribute-name", regex: "[-_a-zA-Z0-9:]+"},
- {token: "constant.numeric", regex: "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},
- {token: "text", regex: "\\s+"}
- ].concat(r(t))
- }
-}), ace.define("ace/mode/behaviour/html", ["require", "exports", "module", "ace/lib/oop", "ace/mode/behaviour/xml", "ace/mode/behaviour/cstyle", "ace/token_iterator"], function (e, t, n) {
- function a(e, t) {
- var n = !0, r = e.type.split("."), i = t.split(".");
- return i.forEach(function (e) {
- if (r.indexOf(e) == -1)return n = !1, !1
- }), n
- }
-
- var r = e("../../lib/oop"), i = e("../behaviour/xml").XmlBehaviour, s = e("./cstyle").CstyleBehaviour, o = e("../../token_iterator").TokenIterator, u = ["area", "base", "br", "col", "command", "embed", "hr", "img", "input", "keygen", "link", "meta", "param", "source", "track", "wbr"], f = function () {
- this.inherit(i), this.add("autoclosing", "insertion", function (e, t, n, r, i) {
- if (i == ">") {
- var s = n.getCursorPosition(), f = new o(r, s.row, s.column), l = f.getCurrentToken(), c = !1;
- if (!l || !a(l, "meta.tag") && (!a(l, "text") || !l.value.match("/"))) {
- do l = f.stepBackward(); while (l && (a(l, "string") || a(l, "keyword.operator") || a(l, "entity.attribute-name") || a(l, "text")))
- } else c = !0;
- if (!l || !a(l, "meta.tag-name") || f.stepBackward().value.match("/"))return;
- var h = l.value;
- if (c)var h = h.substring(0, s.column - l.start);
- if (u.indexOf(h) !== -1)return;
- return{text: ">" + h + ">", selection: [1, 1]}
- }
- })
- };
- r.inherits(f, i), t.HtmlBehaviour = f
-}), ace.define("ace/mode/behaviour/xml", ["require", "exports", "module", "ace/lib/oop", "ace/mode/behaviour", "ace/mode/behaviour/cstyle", "ace/token_iterator"], function (e, t, n) {
- function u(e, t) {
- var n = !0, r = e.type.split("."), i = t.split(".");
- return i.forEach(function (e) {
- if (r.indexOf(e) == -1)return n = !1, !1
- }), n
- }
-
- var r = e("../../lib/oop"), i = e("../behaviour").Behaviour, s = e("./cstyle").CstyleBehaviour, o = e("../../token_iterator").TokenIterator, a = function () {
- this.inherit(s, ["string_dquotes"]), this.add("autoclosing", "insertion", function (e, t, n, r, i) {
- if (i == ">") {
- var s = n.getCursorPosition(), a = new o(r, s.row, s.column), f = a.getCurrentToken(), l = !1;
- if (!f || !u(f, "meta.tag") && (!u(f, "text") || !f.value.match("/"))) {
- do f = a.stepBackward(); while (f && (u(f, "string") || u(f, "keyword.operator") || u(f, "entity.attribute-name") || u(f, "text")))
- } else l = !0;
- if (!f || !u(f, "meta.tag-name") || a.stepBackward().value.match("/"))return;
- var c = f.value;
- if (l)var c = c.substring(0, s.column - f.start);
- return{text: ">" + c + ">", selection: [1, 1]}
- }
- }), this.add("autoindent", "insertion", function (e, t, n, r, i) {
- if (i == "\n") {
- var s = n.getCursorPosition(), o = r.doc.getLine(s.row), u = o.substring(s.column, s.column + 2);
- if (u == "") {
- var a = this.$getIndent(r.doc.getLine(s.row)) + r.getTabString(), f = this.$getIndent(r.doc.getLine(s.row));
- return{text: "\n" + a + "\n" + f, selection: [1, a.length, 1, a.length]}
- }
- }
- })
- };
- r.inherits(a, i), t.XmlBehaviour = a
-}), ace.define("ace/mode/folding/html", ["require", "exports", "module", "ace/lib/oop", "ace/mode/folding/mixed", "ace/mode/folding/xml", "ace/mode/folding/cstyle"], function (e, t, n) {
- var r = e("../../lib/oop"), i = e("./mixed").FoldMode, s = e("./xml").FoldMode, o = e("./cstyle").FoldMode, u = t.FoldMode = function () {
- i.call(this, new s({area: 1, base: 1, br: 1, col: 1, command: 1, embed: 1, hr: 1, img: 1, input: 1, keygen: 1, link: 1, meta: 1, param: 1, source: 1, track: 1, wbr: 1, li: 1, dt: 1, dd: 1, p: 1, rt: 1, rp: 1, optgroup: 1, option: 1, colgroup: 1, td: 1, th: 1}), {"js-": new o, "css-": new o})
- };
- r.inherits(u, i)
-}), ace.define("ace/mode/folding/mixed", ["require", "exports", "module", "ace/lib/oop", "ace/mode/folding/fold_mode"], function (e, t, n) {
- var r = e("../../lib/oop"), i = e("./fold_mode").FoldMode, s = t.FoldMode = function (e, t) {
- this.defaultMode = e, this.subModes = t
- };
- r.inherits(s, i), function () {
- this.$getMode = function (e) {
- for (var t in this.subModes)if (e.indexOf(t) === 0)return this.subModes[t];
- return null
- }, this.$tryMode = function (e, t, n, r) {
- var i = this.$getMode(e);
- return i ? i.getFoldWidget(t, n, r) : ""
- }, this.getFoldWidget = function (e, t, n) {
- return this.$tryMode(e.getState(n - 1), e, t, n) || this.$tryMode(e.getState(n), e, t, n) || this.defaultMode.getFoldWidget(e, t, n)
- }, this.getFoldWidgetRange = function (e, t, n) {
- var r = this.$getMode(e.getState(n - 1));
- if (!r || !r.getFoldWidget(e, t, n))r = this.$getMode(e.getState(n));
- if (!r || !r.getFoldWidget(e, t, n))r = this.defaultMode;
- return r.getFoldWidgetRange(e, t, n)
- }
- }.call(s.prototype)
-}), ace.define("ace/mode/folding/xml", ["require", "exports", "module", "ace/lib/oop", "ace/lib/lang", "ace/range", "ace/mode/folding/fold_mode", "ace/token_iterator"], function (e, t, n) {
- var r = e("../../lib/oop"), i = e("../../lib/lang"), s = e("../../range").Range, o = e("./fold_mode").FoldMode, u = e("../../token_iterator").TokenIterator, a = t.FoldMode = function (e) {
- o.call(this), this.voidElements = e || {}
- };
- r.inherits(a, o), function () {
- this.getFoldWidget = function (e, t, n) {
- var r = this._getFirstTagInLine(e, n);
- return r.closing ? t == "markbeginend" ? "end" : "" : !r.tagName || this.voidElements[r.tagName.toLowerCase()] ? "" : r.selfClosing ? "" : r.value.indexOf("/" + r.tagName) !== -1 ? "" : "start"
- }, this._getFirstTagInLine = function (e, t) {
- var n = e.getTokens(t), r = "";
- for (var s = 0; s < n.length; s++) {
- var o = n[s];
- o.type.indexOf("meta.tag") === 0 ? r += o.value : r += i.stringRepeat(" ", o.value.length)
- }
- return this._parseTag(r)
- }, this.tagRe = /^(\s*)((\/?)([-_a-zA-Z0-9:!]*)\s*(\/?)>?)/, this._parseTag = function (e) {
- var t = this.tagRe.exec(e), n = this.tagRe.lastIndex || 0;
- return this.tagRe.lastIndex = 0, {value: e, match: t ? t[2] : "", closing: t ? !!t[3] : !1, selfClosing: t ? !!t[5] || t[2] == "/>" : !1, tagName: t ? t[4] : "", column: t[1] ? n + t[1].length : n}
- }, this._readTagForward = function (e) {
- var t = e.getCurrentToken();
- if (!t)return null;
- var n = "", r;
- do if (t.type.indexOf("meta.tag") === 0) {
- if (!r)var r = {row: e.getCurrentTokenRow(), column: e.getCurrentTokenColumn()};
- n += t.value;
- if (n.indexOf(">") !== -1) {
- var i = this._parseTag(n);
- return i.start = r, i.end = {row: e.getCurrentTokenRow(), column: e.getCurrentTokenColumn() + t.value.length}, e.stepForward(), i
- }
- } while (t = e.stepForward());
- return null
- }, this._readTagBackward = function (e) {
- var t = e.getCurrentToken();
- if (!t)return null;
- var n = "", r;
- do if (t.type.indexOf("meta.tag") === 0) {
- r || (r = {row: e.getCurrentTokenRow(), column: e.getCurrentTokenColumn() + t.value.length}), n = t.value + n;
- if (n.indexOf("<") !== -1) {
- var i = this._parseTag(n);
- return i.end = r, i.start = {row: e.getCurrentTokenRow(), column: e.getCurrentTokenColumn()}, e.stepBackward(), i
- }
- } while (t = e.stepBackward());
- return null
- }, this._pop = function (e, t) {
- while (e.length) {
- var n = e[e.length - 1];
- if (!t || n.tagName == t.tagName)return e.pop();
- if (this.voidElements[t.tagName])return;
- if (this.voidElements[n.tagName]) {
- e.pop();
- continue
- }
- return null
- }
- }, this.getFoldWidgetRange = function (e, t, n) {
- var r = this._getFirstTagInLine(e, n);
- if (!r.match)return null;
- var i = r.closing || r.selfClosing, o = [], a;
- if (!i) {
- var f = new u(e, n, r.column), l = {row: n, column: r.column + r.tagName.length + 2};
- while (a = this._readTagForward(f)) {
- if (a.selfClosing) {
- if (!o.length)return a.start.column += a.tagName.length + 2, a.end.column -= 2, s.fromPoints(a.start, a.end);
- continue
- }
- if (a.closing) {
- this._pop(o, a);
- if (o.length == 0)return s.fromPoints(l, a.start)
- } else o.push(a)
- }
- } else {
- var f = new u(e, n, r.column + r.match.length), c = {row: n, column: r.column};
- while (a = this._readTagBackward(f)) {
- if (a.selfClosing) {
- if (!o.length)return a.start.column += a.tagName.length + 2, a.end.column -= 2, s.fromPoints(a.start, a.end);
- continue
- }
- if (!a.closing) {
- this._pop(o, a);
- if (o.length == 0)return a.start.column += a.tagName.length + 2, s.fromPoints(a.start, c)
- } else o.push(a)
- }
- }
- }
- }.call(a.prototype)
-}), ace.define("ace/mode/rhtml_highlight_rules", ["require", "exports", "module", "ace/lib/oop", "ace/mode/r_highlight_rules", "ace/mode/html_highlight_rules", "ace/mode/text_highlight_rules"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("./r_highlight_rules").RHighlightRules, s = e("./html_highlight_rules").HtmlHighlightRules, o = e("./text_highlight_rules").TextHighlightRules, u = function () {
- this.$rules = (new s).getRules(), this.$rules.start.unshift({token: "support.function.codebegin", regex: "^", next: "start"})
- };
- r.inherits(u, o), t.RHtmlHighlightRules = u
-}), ace.define("ace/mode/r_highlight_rules", ["require", "exports", "module", "ace/lib/oop", "ace/lib/lang", "ace/mode/text_highlight_rules", "ace/mode/tex_highlight_rules"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("../lib/lang"), s = e("./text_highlight_rules").TextHighlightRules, o = e("./tex_highlight_rules").TexHighlightRules, u = function () {
- var e = i.arrayToMap("function|if|in|break|next|repeat|else|for|return|switch|while|try|tryCatch|stop|warning|require|library|attach|detach|source|setMethod|setGeneric|setGroupGeneric|setClass".split("|")), t = i.arrayToMap("NULL|NA|TRUE|FALSE|T|F|Inf|NaN|NA_integer_|NA_real_|NA_character_|NA_complex_".split("|"));
- this.$rules = {start: [
- {token: "comment.sectionhead", regex: "#+(?!').*(?:----|====|####)\\s*$"},
- {token: "comment", regex: "#+'", next: "rd-start"},
- {token: "comment", regex: "#.*$"},
- {token: "string", regex: '["]', next: "qqstring"},
- {token: "string", regex: "[']", next: "qstring"},
- {token: "constant.numeric", regex: "0[xX][0-9a-fA-F]+[Li]?\\b"},
- {token: "constant.numeric", regex: "\\d+L\\b"},
- {token: "constant.numeric", regex: "\\d+(?:\\.\\d*)?(?:[eE][+\\-]?\\d*)?i?\\b"},
- {token: "constant.numeric", regex: "\\.\\d+(?:[eE][+\\-]?\\d*)?i?\\b"},
- {token: "constant.language.boolean", regex: "(?:TRUE|FALSE|T|F)\\b"},
- {token: "identifier", regex: "`.*?`"},
- {token: function (n) {
- return e[n] ? "keyword" : t[n] ? "constant.language" : n == "..." || n.match(/^\.\.\d+$/) ? "variable.language" : "identifier"
- }, regex: "[a-zA-Z.][a-zA-Z0-9._]*\\b"},
- {token: "keyword.operator", regex: "%%|>=|<=|==|!=|\\->|<\\-|\\|\\||&&|=|\\+|\\-|\\*|/|\\^|>|<|!|&|\\||~|\\$|:"},
- {token: "keyword.operator", regex: "%.*?%"},
- {token: "paren.keyword.operator", regex: "[[({]"},
- {token: "paren.keyword.operator", regex: "[\\])}]"},
- {token: "text", regex: "\\s+"}
- ], qqstring: [
- {token: "string", regex: '(?:(?:\\\\.)|(?:[^"\\\\]))*?"', next: "start"},
- {token: "string", regex: ".+"}
- ], qstring: [
- {token: "string", regex: "(?:(?:\\\\.)|(?:[^'\\\\]))*?'", next: "start"},
- {token: "string", regex: ".+"}
- ]};
- var n = (new o("comment")).getRules();
- for (var r = 0; r < n.start.length; r++)n.start[r].token += ".virtual-comment";
- this.addRules(n, "rd-"), this.$rules["rd-start"].unshift({token: "text", regex: "^", next: "start"}), this.$rules["rd-start"].unshift({token: "keyword", regex: "@(?!@)[^ ]*"}), this.$rules["rd-start"].unshift({token: "comment", regex: "@@"}), this.$rules["rd-start"].push({token: "comment", regex: "[^%\\\\[({\\])}]+"})
- };
- r.inherits(u, s), t.RHighlightRules = u
-}), ace.define("ace/mode/tex_highlight_rules", ["require", "exports", "module", "ace/lib/oop", "ace/lib/lang", "ace/mode/text_highlight_rules"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("../lib/lang"), s = e("./text_highlight_rules").TextHighlightRules, o = function (e) {
- e || (e = "text"), this.$rules = {start: [
- {token: "comment", regex: "%.*$"},
- {token: e, regex: "\\\\[$&%#\\{\\}]"},
- {token: "keyword", regex: "\\\\(?:documentclass|usepackage|newcounter|setcounter|addtocounter|value|arabic|stepcounter|newenvironment|renewenvironment|ref|vref|eqref|pageref|label|cite[a-zA-Z]*|tag|begin|end|bibitem)\\b", next: "nospell"},
- {token: "keyword", regex: "\\\\(?:[a-zA-z0-9]+|[^a-zA-z0-9])"},
- {token: "paren.keyword.operator", regex: "[[({]"},
- {token: "paren.keyword.operator", regex: "[\\])}]"},
- {token: e, regex: "\\s+"}
- ], nospell: [
- {token: "comment", regex: "%.*$", next: "start"},
- {token: "nospell." + e, regex: "\\\\[$&%#\\{\\}]"},
- {token: "keyword", regex: "\\\\(?:documentclass|usepackage|newcounter|setcounter|addtocounter|value|arabic|stepcounter|newenvironment|renewenvironment|ref|vref|eqref|pageref|label|cite[a-zA-Z]*|tag|begin|end|bibitem)\\b"},
- {token: "keyword", regex: "\\\\(?:[a-zA-z0-9]+|[^a-zA-z0-9])", next: "start"},
- {token: "paren.keyword.operator", regex: "[[({]"},
- {token: "paren.keyword.operator", regex: "[\\])]"},
- {token: "paren.keyword.operator", regex: "}", next: "start"},
- {token: "nospell." + e, regex: "\\s+"},
- {token: "nospell." + e, regex: "\\w+"}
- ]}
- };
- r.inherits(o, s), t.TexHighlightRules = o
-})
\ No newline at end of file
diff --git a/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/mode-ruby.js b/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/mode-ruby.js
deleted file mode 100644
index fd9fc28..0000000
--- a/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/mode-ruby.js
+++ /dev/null
@@ -1,128 +0,0 @@
-ace.define("ace/mode/ruby", ["require", "exports", "module", "ace/lib/oop", "ace/mode/text", "ace/tokenizer", "ace/mode/ruby_highlight_rules", "ace/mode/matching_brace_outdent", "ace/range", "ace/mode/folding/coffee"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("./text").Mode, s = e("../tokenizer").Tokenizer, o = e("./ruby_highlight_rules").RubyHighlightRules, u = e("./matching_brace_outdent").MatchingBraceOutdent, a = e("../range").Range, f = e("./folding/coffee").FoldMode, l = function () {
- this.$tokenizer = new s((new o).getRules()), this.$outdent = new u, this.foldingRules = new f
- };
- r.inherits(l, i), function () {
- this.toggleCommentLines = function (e, t, n, r) {
- var i = !0, s = /^(\s*)#/;
- for (var o = n; o <= r; o++)if (!s.test(t.getLine(o))) {
- i = !1;
- break
- }
- if (i) {
- var u = new a(0, 0, 0, 0);
- for (var o = n; o <= r; o++) {
- var f = t.getLine(o), l = f.match(s);
- u.start.row = o, u.end.row = o, u.end.column = l[0].length, t.replace(u, l[1])
- }
- } else t.indentRows(n, r, "#")
- }, this.getNextLineIndent = function (e, t, n) {
- var r = this.$getIndent(t), i = this.$tokenizer.getLineTokens(t, e), s = i.tokens;
- if (s.length && s[s.length - 1].type == "comment")return r;
- if (e == "start") {
- var o = t.match(/^.*[\{\(\[]\s*$/);
- o && (r += n)
- }
- return r
- }, this.checkOutdent = function (e, t, n) {
- return this.$outdent.checkOutdent(t, n)
- }, this.autoOutdent = function (e, t, n) {
- this.$outdent.autoOutdent(t, n)
- }
- }.call(l.prototype), t.Mode = l
-}), ace.define("ace/mode/ruby_highlight_rules", ["require", "exports", "module", "ace/lib/oop", "ace/mode/text_highlight_rules"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("./text_highlight_rules").TextHighlightRules, s = t.constantOtherSymbol = {token: "constant.other.symbol.ruby", regex: "[:](?:[A-Za-z_]|[@$](?=[a-zA-Z0-9_]))[a-zA-Z0-9_]*[!=?]?"}, o = t.qString = {token: "string", regex: "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"}, u = t.qqString = {token: "string", regex: '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'}, a = t.tString = {token: "string", regex: "[`](?:(?:\\\\.)|(?:[^'\\\\]))*?[`]"}, f = t.constantNumericHex = {token: "constant.numeric", regex: "0[xX][0-9a-fA-F](?:[0-9a-fA-F]|_(?=[0-9a-fA-F]))*\\b"}, l = t.constantNumericFloat = {token: "constant.numeric", regex: "[+-]?\\d(?:\\d|_(?=\\d))*(?:(?:\\.\\d(?:\\d|_(?=\\d))*)?(?:[eE][+-]?\\d+)?)?\\b"}, c = function () {
- var e = "abort|Array|assert|assert_equal|assert_not_equal|assert_same|assert_not_same|assert_nil|assert_not_nil|assert_match|assert_no_match|assert_in_delta|assert_throws|assert_raise|assert_nothing_raised|assert_instance_of|assert_kind_of|assert_respond_to|assert_operator|assert_send|assert_difference|assert_no_difference|assert_recognizes|assert_generates|assert_response|assert_redirected_to|assert_template|assert_select|assert_select_email|assert_select_rjs|assert_select_encoded|css_select|at_exit|attr|attr_writer|attr_reader|attr_accessor|attr_accessible|autoload|binding|block_given?|callcc|caller|catch|chomp|chomp!|chop|chop!|defined?|delete_via_redirect|eval|exec|exit|exit!|fail|Float|flunk|follow_redirect!|fork|form_for|form_tag|format|gets|global_variables|gsub|gsub!|get_via_redirect|h|host!|https?|https!|include|Integer|lambda|link_to|link_to_unless_current|link_to_function|link_to_remote|load|local_variables|loop|open|open_session|p|print|printf|proc|putc|puts|post_via_redirect|put_via_redirect|raise|rand|raw|readline|readlines|redirect?|request_via_redirect|require|scan|select|set_trace_func|sleep|split|sprintf|srand|String|stylesheet_link_tag|syscall|system|sub|sub!|test|throw|trace_var|trap|untrace_var|atan2|cos|exp|frexp|ldexp|log|log10|sin|sqrt|tan|render|javascript_include_tag|csrf_meta_tag|label_tag|text_field_tag|submit_tag|check_box_tag|content_tag|radio_button_tag|text_area_tag|password_field_tag|hidden_field_tag|fields_for|select_tag|options_for_select|options_from_collection_for_select|collection_select|time_zone_select|select_date|select_time|select_datetime|date_select|time_select|datetime_select|select_year|select_month|select_day|select_hour|select_minute|select_second|file_field_tag|file_field|respond_to|skip_before_filter|around_filter|after_filter|verify|protect_from_forgery|rescue_from|helper_method|redirect_to|before_filter|send_data|send_file|validates_presence_of|validates_uniqueness_of|validates_length_of|validates_format_of|validates_acceptance_of|validates_associated|validates_exclusion_of|validates_inclusion_of|validates_numericality_of|validates_with|validates_each|authenticate_or_request_with_http_basic|authenticate_or_request_with_http_digest|filter_parameter_logging|match|get|post|resources|redirect|scope|assert_routing|translate|localize|extract_locale_from_tld|t|l|caches_page|expire_page|caches_action|expire_action|cache|expire_fragment|expire_cache_for|observe|cache_sweeper|has_many|has_one|belongs_to|has_and_belongs_to_many", t = "alias|and|BEGIN|begin|break|case|class|def|defined|do|else|elsif|END|end|ensure|__FILE__|finally|for|gem|if|in|__LINE__|module|next|not|or|private|protected|public|redo|rescue|retry|return|super|then|undef|unless|until|when|while|yield", n = "true|TRUE|false|FALSE|nil|NIL|ARGF|ARGV|DATA|ENV|RUBY_PLATFORM|RUBY_RELEASE_DATE|RUBY_VERSION|STDERR|STDIN|STDOUT|TOPLEVEL_BINDING", r = "$DEBUG|$defout|$FILENAME|$LOAD_PATH|$SAFE|$stdin|$stdout|$stderr|$VERBOSE|$!|root_url|flash|session|cookies|params|request|response|logger|self", i = this.$keywords = this.createKeywordMapper({keyword: t, "constant.language": n, "variable.language": r, "support.function": e, "invalid.deprecated": "debugger"}, "identifier");
- this.$rules = {start: [
- {token: "comment", regex: "#.*$"},
- {token: "comment", regex: "^=begin\\s", next: "comment"},
- {token: "string.regexp", regex: "[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/]\\w*\\s*(?=[).,;]|$)"},
- o,
- u,
- a,
- {token: "text", regex: "::"},
- {token: "variable.instance", regex: "@{1,2}[a-zA-Z_\\d]+"},
- {token: "support.class", regex: "[A-Z][a-zA-Z_\\d]+"},
- s,
- f,
- l,
- {token: "constant.language.boolean", regex: "(?:true|false)\\b"},
- {token: i, regex: "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},
- {token: "punctuation.separator.key-value", regex: "=>"},
- {stateName: "heredoc", token: function (e, t, n) {
- var r = e[3] == "-" ? "heredoc" : "indentedHeredoc", i = e.split(this.splitRegex);
- return n.push(r, i[3]), [
- {type: "constant", value: "<<"},
- {type: "string", value: i[2]},
- {type: "support.class", value: i[3]},
- {type: "string", value: i[4]}
- ]
- }, regex: "(<<-?)(['\"`]?)([\\w]+)(['\"`]?)", rules: {heredoc: [
- {token: function (e, t, n) {
- return e == n[1] ? (n.shift(), n.shift(), "support.class") : "string"
- }, regex: ".*$", next: "start"}
- ], indentedHeredoc: [
- {token: "string", regex: "^ +"},
- {token: function (e, t, n) {
- return e == n[1] ? (n.shift(), n.shift(), "support.class") : "string"
- }, regex: ".*$", next: "start"}
- ]}},
- {token: "keyword.operator", regex: "!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)"},
- {token: "paren.lparen", regex: "[[({]"},
- {token: "paren.rparen", regex: "[\\])}]"},
- {token: "text", regex: "\\s+"}
- ], comment: [
- {token: "comment", regex: "^=end\\s.*$", next: "start"},
- {token: "comment", regex: ".+"}
- ]}, this.normalizeRules()
- };
- r.inherits(c, i), t.RubyHighlightRules = c
-}), ace.define("ace/mode/matching_brace_outdent", ["require", "exports", "module", "ace/range"], function (e, t, n) {
- var r = e("../range").Range, i = function () {
- };
- (function () {
- this.checkOutdent = function (e, t) {
- return/^\s+$/.test(e) ? /^\s*\}/.test(t) : !1
- }, this.autoOutdent = function (e, t) {
- var n = e.getLine(t), i = n.match(/^(\s*\})/);
- if (!i)return 0;
- var s = i[1].length, o = e.findMatchingBracket({row: t, column: s});
- if (!o || o.row == t)return 0;
- var u = this.$getIndent(e.getLine(o.row));
- e.replace(new r(t, 0, t, s - 1), u)
- }, this.$getIndent = function (e) {
- var t = e.match(/^(\s+)/);
- return t ? t[1] : ""
- }
- }).call(i.prototype), t.MatchingBraceOutdent = i
-}), ace.define("ace/mode/folding/coffee", ["require", "exports", "module", "ace/lib/oop", "ace/mode/folding/fold_mode", "ace/range"], function (e, t, n) {
- var r = e("../../lib/oop"), i = e("./fold_mode").FoldMode, s = e("../../range").Range, o = t.FoldMode = function () {
- };
- r.inherits(o, i), function () {
- this.getFoldWidgetRange = function (e, t, n) {
- var r = this.indentationBlock(e, n);
- if (r)return r;
- var i = /\S/, o = e.getLine(n), u = o.search(i);
- if (u == -1 || o[u] != "#")return;
- var a = o.length, f = e.getLength(), l = n, c = n;
- while (++n < f) {
- o = e.getLine(n);
- var h = o.search(i);
- if (h == -1)continue;
- if (o[h] != "#")break;
- c = n
- }
- if (c > l) {
- var p = e.getLine(c).length;
- return new s(l, a, c, p)
- }
- }, this.getFoldWidget = function (e, t, n) {
- var r = e.getLine(n), i = r.search(/\S/), s = e.getLine(n + 1), o = e.getLine(n - 1), u = o.search(/\S/), a = s.search(/\S/);
- if (i == -1)return e.foldWidgets[n - 1] = u != -1 && u < a ? "start" : "", "";
- if (u == -1) {
- if (i == a && r[i] == "#" && s[i] == "#")return e.foldWidgets[n - 1] = "", e.foldWidgets[n + 1] = "", "start"
- } else if (u == i && r[i] == "#" && o[i] == "#" && e.getLine(n - 2).search(/\S/) == -1)return e.foldWidgets[n - 1] = "start", e.foldWidgets[n + 1] = "", "";
- return u != -1 && u < i ? e.foldWidgets[n - 1] = "start" : e.foldWidgets[n - 1] = "", i < a ? "start" : ""
- }
- }.call(o.prototype)
-})
\ No newline at end of file
diff --git a/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/mode-sass.js b/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/mode-sass.js
deleted file mode 100644
index 693645b..0000000
--- a/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/mode-sass.js
+++ /dev/null
@@ -1,466 +0,0 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Distributed under the BSD license:
- *
- * Copyright (c) 2010, Ajax.org B.V.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the name of Ajax.org B.V. nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * ***** END LICENSE BLOCK ***** */
-
-define('ace/mode/sass', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/sass_highlight_rules', 'ace/mode/folding/coffee'], function (require, exports, module) {
-
-
- var oop = require("../lib/oop");
- var TextMode = require("./text").Mode;
- var Tokenizer = require("../tokenizer").Tokenizer;
- var SassHighlightRules = require("./sass_highlight_rules").SassHighlightRules;
- var FoldMode = require("./folding/coffee").FoldMode;
-
- var Mode = function () {
- this.$tokenizer = new Tokenizer(new SassHighlightRules().getRules());
- this.foldingRules = new FoldMode();
- };
- oop.inherits(Mode, TextMode);
-
- (function () {
-
- }).call(Mode.prototype);
-
- exports.Mode = Mode;
-
-});
-
-define('ace/mode/sass_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/mode/scss_highlight_rules'], function (require, exports, module) {
-
-
- var oop = require("../lib/oop");
- var lang = require("../lib/lang");
- var ScssHighlightRules = require("./scss_highlight_rules").ScssHighlightRules;
-
- var SassHighlightRules = function () {
- ScssHighlightRules.call(this);
- var start = this.$rules.start;
- if (start[1].token == "comment") {
- start.splice(1, 1, {
- token: function (value, currentState, stack) {
- stack.unshift(this.next, value.length - 2, currentState);
- return "comment";
- },
- regex: /^\s*\/\*/,
- next: "comment"
- }, {
- token: "error.invalid",
- regex: "/\\*|[{;}]"
- }, {
- token: "support.type",
- regex: /^\s*:[\w\-]+\s/,
- });
-
- this.$rules.comment = [
- {regex: /^\s*/, token: function (value, currentState, stack) {
- if (value.length < stack[1]) {
- stack.shift();
- stack.shift();
- this.next = stack.shift();
- return "text";
- } else {
- stack[1] = value.length;
- this.next = "";
- return "comment";
- }
- }, next: "start"},
- {defaultToken: "comment"}
- ]
- }
- };
-
- oop.inherits(SassHighlightRules, ScssHighlightRules);
-
- exports.SassHighlightRules = SassHighlightRules;
-
-});
-
-define('ace/mode/scss_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/mode/text_highlight_rules'], function (require, exports, module) {
-
-
- var oop = require("../lib/oop");
- var lang = require("../lib/lang");
- var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-
- var ScssHighlightRules = function () {
-
- var properties = lang.arrayToMap((function () {
-
- var browserPrefix = ("-webkit-|-moz-|-o-|-ms-|-svg-|-pie-|-khtml-").split("|");
-
- var prefixProperties = ("appearance|background-clip|background-inline-policy|background-origin|" +
- "background-size|binding|border-bottom-colors|border-left-colors|" +
- "border-right-colors|border-top-colors|border-end|border-end-color|" +
- "border-end-style|border-end-width|border-image|border-start|" +
- "border-start-color|border-start-style|border-start-width|box-align|" +
- "box-direction|box-flex|box-flexgroup|box-ordinal-group|box-orient|" +
- "box-pack|box-sizing|column-count|column-gap|column-width|column-rule|" +
- "column-rule-width|column-rule-style|column-rule-color|float-edge|" +
- "font-feature-settings|font-language-override|force-broken-image-icon|" +
- "image-region|margin-end|margin-start|opacity|outline|outline-color|" +
- "outline-offset|outline-radius|outline-radius-bottomleft|" +
- "outline-radius-bottomright|outline-radius-topleft|outline-radius-topright|" +
- "outline-style|outline-width|padding-end|padding-start|stack-sizing|" +
- "tab-size|text-blink|text-decoration-color|text-decoration-line|" +
- "text-decoration-style|transform|transform-origin|transition|" +
- "transition-delay|transition-duration|transition-property|" +
- "transition-timing-function|user-focus|user-input|user-modify|user-select|" +
- "window-shadow|border-radius").split("|");
-
- var properties = ("azimuth|background-attachment|background-color|background-image|" +
- "background-position|background-repeat|background|border-bottom-color|" +
- "border-bottom-style|border-bottom-width|border-bottom|border-collapse|" +
- "border-color|border-left-color|border-left-style|border-left-width|" +
- "border-left|border-right-color|border-right-style|border-right-width|" +
- "border-right|border-spacing|border-style|border-top-color|" +
- "border-top-style|border-top-width|border-top|border-width|border|bottom|" +
- "box-shadow|box-sizing|caption-side|clear|clip|color|content|counter-increment|" +
- "counter-reset|cue-after|cue-before|cue|cursor|direction|display|" +
- "elevation|empty-cells|float|font-family|font-size-adjust|font-size|" +
- "font-stretch|font-style|font-variant|font-weight|font|height|left|" +
- "letter-spacing|line-height|list-style-image|list-style-position|" +
- "list-style-type|list-style|margin-bottom|margin-left|margin-right|" +
- "margin-top|marker-offset|margin|marks|max-height|max-width|min-height|" +
- "min-width|opacity|orphans|outline-color|" +
- "outline-style|outline-width|outline|overflow|overflow-x|overflow-y|padding-bottom|" +
- "padding-left|padding-right|padding-top|padding|page-break-after|" +
- "page-break-before|page-break-inside|page|pause-after|pause-before|" +
- "pause|pitch-range|pitch|play-during|position|quotes|richness|right|" +
- "size|speak-header|speak-numeral|speak-punctuation|speech-rate|speak|" +
- "stress|table-layout|text-align|text-decoration|text-indent|" +
- "text-shadow|text-transform|top|unicode-bidi|vertical-align|" +
- "visibility|voice-family|volume|white-space|widows|width|word-spacing|" +
- "z-index").split("|");
- var ret = [];
- for (var i = 0, ln = browserPrefix.length; i < ln; i++) {
- Array.prototype.push.apply(
- ret,
- (( browserPrefix[i] + prefixProperties.join("|" + browserPrefix[i]) ).split("|"))
- );
- }
- Array.prototype.push.apply(ret, prefixProperties);
- Array.prototype.push.apply(ret, properties);
-
- return ret;
-
- })());
-
-
- var functions = lang.arrayToMap(
- ("hsl|hsla|rgb|rgba|url|attr|counter|counters|abs|adjust_color|adjust_hue|" +
- "alpha|join|blue|ceil|change_color|comparable|complement|darken|desaturate|" +
- "floor|grayscale|green|hue|if|invert|join|length|lighten|lightness|mix|" +
- "nth|opacify|opacity|percentage|quote|red|round|saturate|saturation|" +
- "scale_color|transparentize|type_of|unit|unitless|unqoute").split("|")
- );
-
- var constants = lang.arrayToMap(
- ("absolute|all-scroll|always|armenian|auto|baseline|below|bidi-override|" +
- "block|bold|bolder|border-box|both|bottom|break-all|break-word|capitalize|center|" +
- "char|circle|cjk-ideographic|col-resize|collapse|content-box|crosshair|dashed|" +
- "decimal-leading-zero|decimal|default|disabled|disc|" +
- "distribute-all-lines|distribute-letter|distribute-space|" +
- "distribute|dotted|double|e-resize|ellipsis|fixed|georgian|groove|" +
- "hand|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|" +
- "ideograph-alpha|ideograph-numeric|ideograph-parenthesis|" +
- "ideograph-space|inactive|inherit|inline-block|inline|inset|inside|" +
- "inter-ideograph|inter-word|italic|justify|katakana-iroha|katakana|" +
- "keep-all|left|lighter|line-edge|line-through|line|list-item|loose|" +
- "lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|" +
- "medium|middle|move|n-resize|ne-resize|newspaper|no-drop|no-repeat|" +
- "nw-resize|none|normal|not-allowed|nowrap|oblique|outset|outside|" +
- "overline|pointer|progress|relative|repeat-x|repeat-y|repeat|right|" +
- "ridge|row-resize|rtl|s-resize|scroll|se-resize|separate|small-caps|" +
- "solid|square|static|strict|super|sw-resize|table-footer-group|" +
- "table-header-group|tb-rl|text-bottom|text-top|text|thick|thin|top|" +
- "transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|" +
- "vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|" +
- "zero").split("|")
- );
-
- var colors = lang.arrayToMap(
- ("aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|" +
- "purple|red|silver|teal|white|yellow").split("|")
- );
-
- var keywords = lang.arrayToMap(
- ("@mixin|@extend|@include|@import|@media|@debug|@warn|@if|@for|@each|@while|@else|@font-face|@-webkit-keyframes|if|and|!default|module|def|end|declare").split("|")
- )
-
- var tags = lang.arrayToMap(
- ("a|abbr|acronym|address|applet|area|article|aside|audio|b|base|basefont|bdo|" +
- "big|blockquote|body|br|button|canvas|caption|center|cite|code|col|colgroup|" +
- "command|datalist|dd|del|details|dfn|dir|div|dl|dt|em|embed|fieldset|" +
- "figcaption|figure|font|footer|form|frame|frameset|h1|h2|h3|h4|h5|h6|head|" +
- "header|hgroup|hr|html|i|iframe|img|input|ins|keygen|kbd|label|legend|li|" +
- "link|map|mark|menu|meta|meter|nav|noframes|noscript|object|ol|optgroup|" +
- "option|output|p|param|pre|progress|q|rp|rt|ruby|s|samp|script|section|select|" +
- "small|source|span|strike|strong|style|sub|summary|sup|table|tbody|td|" +
- "textarea|tfoot|th|thead|time|title|tr|tt|u|ul|var|video|wbr|xmp").split("|")
- );
-
- var numRe = "\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))";
-
- this.$rules = {
- "start": [
- {
- token: "comment",
- regex: "\\/\\/.*$"
- },
- {
- token: "comment", // multi line comment
- regex: "\\/\\*",
- next: "comment"
- },
- {
- token: "string", // single line
- regex: '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
- },
- {
- token: "string", // multi line string start
- regex: '["].*\\\\$',
- next: "qqstring"
- },
- {
- token: "string", // single line
- regex: "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
- },
- {
- token: "string", // multi line string start
- regex: "['].*\\\\$",
- next: "qstring"
- },
- {
- token: "constant.numeric",
- regex: numRe + "(?:em|ex|px|cm|mm|in|pt|pc|deg|rad|grad|ms|s|hz|khz|%)"
- },
- {
- token: "constant.numeric", // hex6 color
- regex: "#[a-f0-9]{6}"
- },
- {
- token: "constant.numeric", // hex3 color
- regex: "#[a-f0-9]{3}"
- },
- {
- token: "constant.numeric",
- regex: numRe
- },
- {
- token: ["support.function", "string", "support.function"],
- regex: "(url\\()(.*)(\\))"
- },
- {
- token: function (value) {
- if (properties.hasOwnProperty(value.toLowerCase()))
- return "support.type";
- if (keywords.hasOwnProperty(value))
- return "keyword";
- else if (constants.hasOwnProperty(value))
- return "constant.language";
- else if (functions.hasOwnProperty(value))
- return "support.function";
- else if (colors.hasOwnProperty(value.toLowerCase()))
- return "support.constant.color";
- else if (tags.hasOwnProperty(value.toLowerCase()))
- return "variable.language";
- else
- return "text";
- },
- regex: "\\-?[@a-z_][@a-z0-9_\\-]*"
- },
- {
- token: "variable",
- regex: "[a-z_\\-$][a-z0-9_\\-$]*\\b"
- },
- {
- token: "variable.language",
- regex: "#[a-z0-9-_]+"
- },
- {
- token: "variable.language",
- regex: "\\.[a-z0-9-_]+"
- },
- {
- token: "variable.language",
- regex: ":[a-z0-9-_]+"
- },
- {
- token: "constant",
- regex: "[a-z0-9-_]+"
- },
- {
- token: "keyword.operator",
- regex: "<|>|<=|>=|==|!=|-|%|#|\\+|\\$|\\+|\\*"
- },
- {
- token: "paren.lparen",
- regex: "[[({]"
- },
- {
- token: "paren.rparen",
- regex: "[\\])}]"
- },
- {
- token: "text",
- regex: "\\s+"
- },
- {
- caseInsensitive: true
- }
- ],
- "comment": [
- {
- token: "comment", // closing comment
- regex: ".*?\\*\\/",
- next: "start"
- },
- {
- token: "comment", // comment spanning whole line
- regex: ".+"
- }
- ],
- "qqstring": [
- {
- token: "string",
- regex: '(?:(?:\\\\.)|(?:[^"\\\\]))*?"',
- next: "start"
- },
- {
- token: "string",
- regex: '.+'
- }
- ],
- "qstring": [
- {
- token: "string",
- regex: "(?:(?:\\\\.)|(?:[^'\\\\]))*?'",
- next: "start"
- },
- {
- token: "string",
- regex: '.+'
- }
- ]
- };
- };
-
- oop.inherits(ScssHighlightRules, TextHighlightRules);
-
- exports.ScssHighlightRules = ScssHighlightRules;
-
-});
-
-define('ace/mode/folding/coffee', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/folding/fold_mode', 'ace/range'], function (require, exports, module) {
-
-
- var oop = require("../../lib/oop");
- var BaseFoldMode = require("./fold_mode").FoldMode;
- var Range = require("../../range").Range;
-
- var FoldMode = exports.FoldMode = function () {
- };
- oop.inherits(FoldMode, BaseFoldMode);
-
- (function () {
-
- this.getFoldWidgetRange = function (session, foldStyle, row) {
- var range = this.indentationBlock(session, row);
- if (range)
- return range;
-
- var re = /\S/;
- var line = session.getLine(row);
- var startLevel = line.search(re);
- if (startLevel == -1 || line[startLevel] != "#")
- return;
-
- var startColumn = line.length;
- var maxRow = session.getLength();
- var startRow = row;
- var endRow = row;
-
- while (++row < maxRow) {
- line = session.getLine(row);
- var level = line.search(re);
-
- if (level == -1)
- continue;
-
- if (line[level] != "#")
- break;
-
- endRow = row;
- }
-
- if (endRow > startRow) {
- var endColumn = session.getLine(endRow).length;
- return new Range(startRow, startColumn, endRow, endColumn);
- }
- };
- this.getFoldWidget = function (session, foldStyle, row) {
- var line = session.getLine(row);
- var indent = line.search(/\S/);
- var next = session.getLine(row + 1);
- var prev = session.getLine(row - 1);
- var prevIndent = prev.search(/\S/);
- var nextIndent = next.search(/\S/);
-
- if (indent == -1) {
- session.foldWidgets[row - 1] = prevIndent != -1 && prevIndent < nextIndent ? "start" : "";
- return "";
- }
- if (prevIndent == -1) {
- if (indent == nextIndent && line[indent] == "#" && next[indent] == "#") {
- session.foldWidgets[row - 1] = "";
- session.foldWidgets[row + 1] = "";
- return "start";
- }
- } else if (prevIndent == indent && line[indent] == "#" && prev[indent] == "#") {
- if (session.getLine(row - 2).search(/\S/) == -1) {
- session.foldWidgets[row - 1] = "start";
- session.foldWidgets[row + 1] = "";
- return "";
- }
- }
-
- if (prevIndent != -1 && prevIndent < indent)
- session.foldWidgets[row - 1] = "start";
- else
- session.foldWidgets[row - 1] = "";
-
- if (indent < nextIndent)
- return "start";
- else
- return "";
- };
-
- }).call(FoldMode.prototype);
-
-});
diff --git a/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/mode-scad.js b/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/mode-scad.js
deleted file mode 100644
index 13c39ad..0000000
--- a/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/mode-scad.js
+++ /dev/null
@@ -1,239 +0,0 @@
-ace.define("ace/mode/scad", ["require", "exports", "module", "ace/lib/oop", "ace/mode/text", "ace/tokenizer", "ace/mode/scad_highlight_rules", "ace/mode/matching_brace_outdent", "ace/range", "ace/mode/behaviour/cstyle", "ace/mode/folding/cstyle"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("./text").Mode, s = e("../tokenizer").Tokenizer, o = e("./scad_highlight_rules").scadHighlightRules, u = e("./matching_brace_outdent").MatchingBraceOutdent, a = e("../range").Range, f = e("./behaviour/cstyle").CstyleBehaviour, l = e("./folding/cstyle").FoldMode, c = function () {
- this.$tokenizer = new s((new o).getRules()), this.$outdent = new u, this.$behaviour = new f, this.foldingRules = new l
- };
- r.inherits(c, i), function () {
- this.toggleCommentLines = function (e, t, n, r) {
- var i = !0, s = /^(\s*)\/\//;
- for (var o = n; o <= r; o++)if (!s.test(t.getLine(o))) {
- i = !1;
- break
- }
- if (i) {
- var u = new a(0, 0, 0, 0);
- for (var o = n; o <= r; o++) {
- var f = t.getLine(o), l = f.match(s);
- u.start.row = o, u.end.row = o, u.end.column = l[0].length, t.replace(u, l[1])
- }
- } else t.indentRows(n, r, "//")
- }, this.getNextLineIndent = function (e, t, n) {
- var r = this.$getIndent(t), i = this.$tokenizer.getLineTokens(t, e), s = i.tokens, o = i.state;
- if (s.length && s[s.length - 1].type == "comment")return r;
- if (e == "start") {
- var u = t.match(/^.*[\{\(\[]\s*$/);
- u && (r += n)
- } else if (e == "doc-start") {
- if (o == "start")return"";
- var u = t.match(/^\s*(\/?)\*/);
- u && (u[1] && (r += " "), r += "* ")
- }
- return r
- }, this.checkOutdent = function (e, t, n) {
- return this.$outdent.checkOutdent(t, n)
- }, this.autoOutdent = function (e, t, n) {
- this.$outdent.autoOutdent(t, n)
- }
- }.call(c.prototype), t.Mode = c
-}), ace.define("ace/mode/scad_highlight_rules", ["require", "exports", "module", "ace/lib/oop", "ace/lib/lang", "ace/mode/doc_comment_highlight_rules", "ace/mode/text_highlight_rules"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("../lib/lang"), s = e("./doc_comment_highlight_rules").DocCommentHighlightRules, o = e("./text_highlight_rules").TextHighlightRules, u = function () {
- var e = this.createKeywordMapper({"variable.language": "this", keyword: "module|if|else|for", "constant.language": "NULL"}, "identifier");
- this.$rules = {start: [
- {token: "comment", regex: "\\/\\/.*$"},
- s.getStartRule("start"),
- {token: "comment", regex: "\\/\\*", next: "comment"},
- {token: "string", regex: '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},
- {token: "string", regex: '["].*\\\\$', next: "qqstring"},
- {token: "string", regex: "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},
- {token: "string", regex: "['].*\\\\$", next: "qstring"},
- {token: "constant.numeric", regex: "0[xX][0-9a-fA-F]+\\b"},
- {token: "constant.numeric", regex: "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},
- {token: "constant", regex: "<[a-zA-Z0-9.]+>"},
- {token: "keyword", regex: "(?:use|include)"},
- {token: e, regex: "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},
- {token: "keyword.operator", regex: "!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|==|=|!=|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|new|delete|typeof|void)"},
- {token: "paren.lparen", regex: "[[({]"},
- {token: "paren.rparen", regex: "[\\])}]"},
- {token: "text", regex: "\\s+"}
- ], comment: [
- {token: "comment", regex: ".*?\\*\\/", next: "start"},
- {token: "comment", regex: ".+"}
- ], qqstring: [
- {token: "string", regex: '(?:(?:\\\\.)|(?:[^"\\\\]))*?"', next: "start"},
- {token: "string", regex: ".+"}
- ], qstring: [
- {token: "string", regex: "(?:(?:\\\\.)|(?:[^'\\\\]))*?'", next: "start"},
- {token: "string", regex: ".+"}
- ]}, this.embedRules(s, "doc-", [s.getEndRule("start")])
- };
- r.inherits(u, o), t.scadHighlightRules = u
-}), ace.define("ace/mode/doc_comment_highlight_rules", ["require", "exports", "module", "ace/lib/oop", "ace/mode/text_highlight_rules"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("./text_highlight_rules").TextHighlightRules, s = function () {
- this.$rules = {start: [
- {token: "comment.doc.tag", regex: "@[\\w\\d_]+"},
- {token: "comment.doc.tag", regex: "\\bTODO\\b"},
- {defaultToken: "comment.doc"}
- ]}
- };
- r.inherits(s, i), s.getStartRule = function (e) {
- return{token: "comment.doc", regex: "\\/\\*(?=\\*)", next: e}
- }, s.getEndRule = function (e) {
- return{token: "comment.doc", regex: "\\*\\/", next: e}
- }, t.DocCommentHighlightRules = s
-}), ace.define("ace/mode/matching_brace_outdent", ["require", "exports", "module", "ace/range"], function (e, t, n) {
- var r = e("../range").Range, i = function () {
- };
- (function () {
- this.checkOutdent = function (e, t) {
- return/^\s+$/.test(e) ? /^\s*\}/.test(t) : !1
- }, this.autoOutdent = function (e, t) {
- var n = e.getLine(t), i = n.match(/^(\s*\})/);
- if (!i)return 0;
- var s = i[1].length, o = e.findMatchingBracket({row: t, column: s});
- if (!o || o.row == t)return 0;
- var u = this.$getIndent(e.getLine(o.row));
- e.replace(new r(t, 0, t, s - 1), u)
- }, this.$getIndent = function (e) {
- var t = e.match(/^(\s+)/);
- return t ? t[1] : ""
- }
- }).call(i.prototype), t.MatchingBraceOutdent = i
-}), ace.define("ace/mode/behaviour/cstyle", ["require", "exports", "module", "ace/lib/oop", "ace/mode/behaviour", "ace/token_iterator", "ace/lib/lang"], function (e, t, n) {
- var r = e("../../lib/oop"), i = e("../behaviour").Behaviour, s = e("../../token_iterator").TokenIterator, o = e("../../lib/lang"), u = ["text", "paren.rparen", "punctuation.operator"], a = ["text", "paren.rparen", "punctuation.operator", "comment"], f = 0, l = -1, c = "", h = 0, p = -1, d = "", v = "", m = function () {
- m.isSaneInsertion = function (e, t) {
- var n = e.getCursorPosition(), r = new s(t, n.row, n.column);
- if (!this.$matchTokenType(r.getCurrentToken() || "text", u)) {
- var i = new s(t, n.row, n.column + 1);
- if (!this.$matchTokenType(i.getCurrentToken() || "text", u))return!1
- }
- return r.stepForward(), r.getCurrentTokenRow() !== n.row || this.$matchTokenType(r.getCurrentToken() || "text", a)
- }, m.$matchTokenType = function (e, t) {
- return t.indexOf(e.type || e) > -1
- }, m.recordAutoInsert = function (e, t, n) {
- var r = e.getCursorPosition(), i = t.doc.getLine(r.row);
- this.isAutoInsertedClosing(r, i, c[0]) || (f = 0), l = r.row, c = n + i.substr(r.column), f++
- }, m.recordMaybeInsert = function (e, t, n) {
- var r = e.getCursorPosition(), i = t.doc.getLine(r.row);
- this.isMaybeInsertedClosing(r, i) || (h = 0), p = r.row, d = i.substr(0, r.column) + n, v = i.substr(r.column), h++
- }, m.isAutoInsertedClosing = function (e, t, n) {
- return f > 0 && e.row === l && n === c[0] && t.substr(e.column) === c
- }, m.isMaybeInsertedClosing = function (e, t) {
- return h > 0 && e.row === p && t.substr(e.column) === v && t.substr(0, e.column) == d
- }, m.popAutoInsertedClosing = function () {
- c = c.substr(1), f--
- }, m.clearMaybeInsertedClosing = function () {
- h = 0, p = -1
- }, this.add("braces", "insertion", function (e, t, n, r, i) {
- var s = n.getCursorPosition(), u = r.doc.getLine(s.row);
- if (i == "{") {
- var a = n.getSelectionRange(), f = r.doc.getTextRange(a);
- if (f !== "" && f !== "{" && n.getWrapBehavioursEnabled())return{text: "{" + f + "}", selection: !1};
- if (m.isSaneInsertion(n, r))return/[\]\}\)]/.test(u[s.column]) ? (m.recordAutoInsert(n, r, "}"), {text: "{}", selection: [1, 1]}) : (m.recordMaybeInsert(n, r, "{"), {text: "{", selection: [1, 1]})
- } else if (i == "}") {
- var l = u.substring(s.column, s.column + 1);
- if (l == "}") {
- var c = r.$findOpeningBracket("}", {column: s.column + 1, row: s.row});
- if (c !== null && m.isAutoInsertedClosing(s, u, i))return m.popAutoInsertedClosing(), {text: "", selection: [1, 1]}
- }
- } else if (i == "\n" || i == "\r\n") {
- var p = "";
- m.isMaybeInsertedClosing(s, u) && (p = o.stringRepeat("}", h), m.clearMaybeInsertedClosing());
- var l = u.substring(s.column, s.column + 1);
- if (l == "}" || p !== "") {
- var d = r.findMatchingBracket({row: s.row, column: s.column}, "}");
- if (!d)return null;
- var v = this.getNextLineIndent(e, u.substring(0, s.column), r.getTabString()), g = this.$getIndent(u);
- return{text: "\n" + v + "\n" + g + p, selection: [1, v.length, 1, v.length]}
- }
- }
- }), this.add("braces", "deletion", function (e, t, n, r, i) {
- var s = r.doc.getTextRange(i);
- if (!i.isMultiLine() && s == "{") {
- var o = r.doc.getLine(i.start.row), u = o.substring(i.end.column, i.end.column + 1);
- if (u == "}")return i.end.column++, i;
- h--
- }
- }), this.add("parens", "insertion", function (e, t, n, r, i) {
- if (i == "(") {
- var s = n.getSelectionRange(), o = r.doc.getTextRange(s);
- if (o !== "" && n.getWrapBehavioursEnabled())return{text: "(" + o + ")", selection: !1};
- if (m.isSaneInsertion(n, r))return m.recordAutoInsert(n, r, ")"), {text: "()", selection: [1, 1]}
- } else if (i == ")") {
- var u = n.getCursorPosition(), a = r.doc.getLine(u.row), f = a.substring(u.column, u.column + 1);
- if (f == ")") {
- var l = r.$findOpeningBracket(")", {column: u.column + 1, row: u.row});
- if (l !== null && m.isAutoInsertedClosing(u, a, i))return m.popAutoInsertedClosing(), {text: "", selection: [1, 1]}
- }
- }
- }), this.add("parens", "deletion", function (e, t, n, r, i) {
- var s = r.doc.getTextRange(i);
- if (!i.isMultiLine() && s == "(") {
- var o = r.doc.getLine(i.start.row), u = o.substring(i.start.column + 1, i.start.column + 2);
- if (u == ")")return i.end.column++, i
- }
- }), this.add("brackets", "insertion", function (e, t, n, r, i) {
- if (i == "[") {
- var s = n.getSelectionRange(), o = r.doc.getTextRange(s);
- if (o !== "" && n.getWrapBehavioursEnabled())return{text: "[" + o + "]", selection: !1};
- if (m.isSaneInsertion(n, r))return m.recordAutoInsert(n, r, "]"), {text: "[]", selection: [1, 1]}
- } else if (i == "]") {
- var u = n.getCursorPosition(), a = r.doc.getLine(u.row), f = a.substring(u.column, u.column + 1);
- if (f == "]") {
- var l = r.$findOpeningBracket("]", {column: u.column + 1, row: u.row});
- if (l !== null && m.isAutoInsertedClosing(u, a, i))return m.popAutoInsertedClosing(), {text: "", selection: [1, 1]}
- }
- }
- }), this.add("brackets", "deletion", function (e, t, n, r, i) {
- var s = r.doc.getTextRange(i);
- if (!i.isMultiLine() && s == "[") {
- var o = r.doc.getLine(i.start.row), u = o.substring(i.start.column + 1, i.start.column + 2);
- if (u == "]")return i.end.column++, i
- }
- }), this.add("string_dquotes", "insertion", function (e, t, n, r, i) {
- if (i == '"' || i == "'") {
- var s = i, o = n.getSelectionRange(), u = r.doc.getTextRange(o);
- if (u !== "" && u !== "'" && u != '"' && n.getWrapBehavioursEnabled())return{text: s + u + s, selection: !1};
- var a = n.getCursorPosition(), f = r.doc.getLine(a.row), l = f.substring(a.column - 1, a.column);
- if (l == "\\")return null;
- var c = r.getTokens(o.start.row), h = 0, p, d = -1;
- for (var v = 0; v < c.length; v++) {
- p = c[v], p.type == "string" ? d = -1 : d < 0 && (d = p.value.indexOf(s));
- if (p.value.length + h > o.start.column)break;
- h += c[v].value.length
- }
- if (!p || d < 0 && p.type !== "comment" && (p.type !== "string" || o.start.column !== p.value.length + h - 1 && p.value.lastIndexOf(s) === p.value.length - 1)) {
- if (!m.isSaneInsertion(n, r))return;
- return{text: s + s, selection: [1, 1]}
- }
- if (p && p.type === "string") {
- var g = f.substring(a.column, a.column + 1);
- if (g == s)return{text: "", selection: [1, 1]}
- }
- }
- }), this.add("string_dquotes", "deletion", function (e, t, n, r, i) {
- var s = r.doc.getTextRange(i);
- if (!i.isMultiLine() && (s == '"' || s == "'")) {
- var o = r.doc.getLine(i.start.row), u = o.substring(i.start.column + 1, i.start.column + 2);
- if (u == s)return i.end.column++, i
- }
- })
- };
- r.inherits(m, i), t.CstyleBehaviour = m
-}), ace.define("ace/mode/folding/cstyle", ["require", "exports", "module", "ace/lib/oop", "ace/range", "ace/mode/folding/fold_mode"], function (e, t, n) {
- var r = e("../../lib/oop"), i = e("../../range").Range, s = e("./fold_mode").FoldMode, o = t.FoldMode = function () {
- };
- r.inherits(o, s), function () {
- this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/, this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/, this.getFoldWidgetRange = function (e, t, n) {
- var r = e.getLine(n), i = r.match(this.foldingStartMarker);
- if (i) {
- var s = i.index;
- return i[1] ? this.openingBracketBlock(e, i[1], n, s) : e.getCommentFoldRange(n, s + i[0].length, 1)
- }
- if (t !== "markbeginend")return;
- var i = r.match(this.foldingStopMarker);
- if (i) {
- var s = i.index + i[0].length;
- return i[1] ? this.closingBracketBlock(e, i[1], n, s) : e.getCommentFoldRange(n, s, -1)
- }
- }
- }.call(o.prototype)
-})
\ No newline at end of file
diff --git a/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/mode-scala.js b/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/mode-scala.js
deleted file mode 100644
index f76999a..0000000
--- a/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/mode-scala.js
+++ /dev/null
@@ -1,325 +0,0 @@
-ace.define("ace/mode/scala", ["require", "exports", "module", "ace/lib/oop", "ace/mode/javascript", "ace/tokenizer", "ace/mode/scala_highlight_rules"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("./javascript").Mode, s = e("../tokenizer").Tokenizer, o = e("./scala_highlight_rules").ScalaHighlightRules, u = function () {
- i.call(this), this.$tokenizer = new s((new o).getRules())
- };
- r.inherits(u, i), function () {
- this.createWorker = function (e) {
- return null
- }
- }.call(u.prototype), t.Mode = u
-}), ace.define("ace/mode/javascript", ["require", "exports", "module", "ace/lib/oop", "ace/mode/text", "ace/tokenizer", "ace/mode/javascript_highlight_rules", "ace/mode/matching_brace_outdent", "ace/range", "ace/worker/worker_client", "ace/mode/behaviour/cstyle", "ace/mode/folding/cstyle"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("./text").Mode, s = e("../tokenizer").Tokenizer, o = e("./javascript_highlight_rules").JavaScriptHighlightRules, u = e("./matching_brace_outdent").MatchingBraceOutdent, a = e("../range").Range, f = e("../worker/worker_client").WorkerClient, l = e("./behaviour/cstyle").CstyleBehaviour, c = e("./folding/cstyle").FoldMode, h = function () {
- this.$tokenizer = new s((new o).getRules()), this.$outdent = new u, this.$behaviour = new l, this.foldingRules = new c
- };
- r.inherits(h, i), function () {
- this.toggleCommentLines = function (e, t, n, r) {
- var i = !0, s = /^(\s*)\/\//;
- for (var o = n; o <= r; o++)if (!s.test(t.getLine(o))) {
- i = !1;
- break
- }
- if (i) {
- var u = new a(0, 0, 0, 0);
- for (var o = n; o <= r; o++) {
- var f = t.getLine(o), l = f.match(s);
- u.start.row = o, u.end.row = o, u.end.column = l[0].length, t.replace(u, l[1])
- }
- } else t.indentRows(n, r, "//")
- }, this.getNextLineIndent = function (e, t, n) {
- var r = this.$getIndent(t), i = this.$tokenizer.getLineTokens(t, e), s = i.tokens, o = i.state;
- if (s.length && s[s.length - 1].type == "comment")return r;
- if (e == "start" || e == "regex_allowed") {
- var u = t.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/);
- u && (r += n)
- } else if (e == "doc-start") {
- if (o == "start" || e == "regex_allowed")return"";
- var u = t.match(/^\s*(\/?)\*/);
- u && (u[1] && (r += " "), r += "* ")
- }
- return r
- }, this.checkOutdent = function (e, t, n) {
- return this.$outdent.checkOutdent(t, n)
- }, this.autoOutdent = function (e, t, n) {
- this.$outdent.autoOutdent(t, n)
- }, this.createWorker = function (e) {
- var t = new f(["ace"], "ace/mode/javascript_worker", "JavaScriptWorker");
- return t.attachToDocument(e.getDocument()), t.on("jslint", function (t) {
- e.setAnnotations(t.data)
- }), t.on("terminate", function () {
- e.clearAnnotations()
- }), t
- }
- }.call(h.prototype), t.Mode = h
-}), ace.define("ace/mode/javascript_highlight_rules", ["require", "exports", "module", "ace/lib/oop", "ace/mode/doc_comment_highlight_rules", "ace/mode/text_highlight_rules"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("./doc_comment_highlight_rules").DocCommentHighlightRules, s = e("./text_highlight_rules").TextHighlightRules, o = function () {
- var e = this.createKeywordMapper({"variable.language": "Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document", keyword: "const|yield|import|get|set|break|case|catch|continue|default|delete|do|else|finally|for|function|if|in|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|__parent__|__count__|escape|unescape|with|__proto__|class|enum|extends|super|export|implements|private|public|interface|package|protected|static", "storage.type": "const|let|var|function", "constant.language": "null|Infinity|NaN|undefined", "support.function": "alert", "constant.language.boolean": "true|false"}, "identifier"), t = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void", n = "[a-zA-Z\\$_¡-￿][a-zA-Z\\d\\$_¡-￿]*\\b", r = "\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|[0-2][0-7]{0,2}|3[0-6][0-7]?|37[0-7]?|[4-7][0-7]?|.)";
- this.$rules = {start: [
- {token: "comment", regex: /\/\/.*$/},
- i.getStartRule("doc-start"),
- {token: "comment", regex: /\/\*/, next: "comment"},
- {token: "string", regex: "'(?=.)", next: "qstring"},
- {token: "string", regex: '"(?=.)', next: "qqstring"},
- {token: "constant.numeric", regex: /0[xX][0-9a-fA-F]+\b/},
- {token: "constant.numeric", regex: /[+-]?\d+(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?\b/},
- {token: ["storage.type", "punctuation.operator", "support.function", "punctuation.operator", "entity.name.function", "text", "keyword.operator"], regex: "(" + n + ")(\\.)(prototype)(\\.)(" + n + ")(\\s*)(=)", next: "function_arguments"},
- {token: ["storage.type", "punctuation.operator", "entity.name.function", "text", "keyword.operator", "text", "storage.type", "text", "paren.lparen"], regex: "(" + n + ")(\\.)(" + n + ")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", next: "function_arguments"},
- {token: ["entity.name.function", "text", "keyword.operator", "text", "storage.type", "text", "paren.lparen"], regex: "(" + n + ")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", next: "function_arguments"},
- {token: ["storage.type", "punctuation.operator", "entity.name.function", "text", "keyword.operator", "text", "storage.type", "text", "entity.name.function", "text", "paren.lparen"], regex: "(" + n + ")(\\.)(" + n + ")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()", next: "function_arguments"},
- {token: ["storage.type", "text", "entity.name.function", "text", "paren.lparen"], regex: "(function)(\\s+)(" + n + ")(\\s*)(\\()", next: "function_arguments"},
- {token: ["entity.name.function", "text", "punctuation.operator", "text", "storage.type", "text", "paren.lparen"], regex: "(" + n + ")(\\s*)(:)(\\s*)(function)(\\s*)(\\()", next: "function_arguments"},
- {token: ["text", "text", "storage.type", "text", "paren.lparen"], regex: "(:)(\\s*)(function)(\\s*)(\\()", next: "function_arguments"},
- {token: "keyword", regex: "(?:" + t + ")\\b", next: "regex_allowed"},
- {token: ["punctuation.operator", "support.function"], regex: /(\.)(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:opzzzz|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/},
- {token: ["punctuation.operator", "support.function.dom"], regex: /(\.)(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/},
- {token: ["punctuation.operator", "support.constant"], regex: /(\.)(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/},
- {token: ["storage.type", "punctuation.operator", "support.function.firebug"], regex: /(console)(\.)(warn|info|log|error|time|timeEnd|assert)\b/},
- {token: e, regex: n},
- {token: "keyword.operator", regex: /--|\+\+|[!$%&*+\-~]|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|\*=|%=|\+=|\-=|&=|\^=/, next: "regex_allowed"},
- {token: "punctuation.operator", regex: /\?|\:|\,|\;|\./, next: "regex_allowed"},
- {token: "paren.lparen", regex: /[\[({]/, next: "regex_allowed"},
- {token: "paren.rparen", regex: /[\])}]/},
- {token: "keyword.operator", regex: /\/=?/, next: "regex_allowed"},
- {token: "comment", regex: /^#!.*$/}
- ], regex_allowed: [i.getStartRule("doc-start"), {token: "comment", regex: "\\/\\*", next: "comment_regex_allowed"}, {token: "comment", regex: "\\/\\/.*$"}, {token: "string.regexp", regex: "\\/", next: "regex"}, {token: "text", regex: "\\s+"}, {token: "empty", regex: "", next: "start"}], regex: [
- {token: "regexp.keyword.operator", regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},
- {token: "string.regexp", regex: "/\\w*", next: "start"},
- {token: "invalid", regex: /\{\d+,?(?:\d+)?}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/},
- {token: "constant.language.escape", regex: /\(\?[:=!]|\)|{\d+,?(?:\d+)?}|{,\d+}|[+*]\?|[()$^+*?]/},
- {token: "constant.language.delimiter", regex: /\|/},
- {token: "constant.language.escape", regex: /\[\^?/, next: "regex_character_class"},
- {token: "empty", regex: "$", next: "start"},
- {defaultToken: "string.regexp"}
- ], regex_character_class: [
- {token: "regexp.keyword.operator", regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},
- {token: "constant.language.escape", regex: "]", next: "regex"},
- {token: "constant.language.escape", regex: "-"},
- {token: "empty", regex: "$", next: "start"},
- {defaultToken: "string.regexp.charachterclass"}
- ], function_arguments: [
- {token: "variable.parameter", regex: n},
- {token: "punctuation.operator", regex: "[, ]+"},
- {token: "punctuation.operator", regex: "$"},
- {token: "empty", regex: "", next: "start"}
- ], comment_regex_allowed: [
- {token: "comment", regex: "\\*\\/", next: "regex_allowed"},
- {defaultToken: "comment"}
- ], comment: [
- {token: "comment", regex: "\\*\\/", next: "start"},
- {defaultToken: "comment"}
- ], qqstring: [
- {token: "constant.language.escape", regex: r},
- {token: "string", regex: "\\\\$", next: "qqstring"},
- {token: "string", regex: '"|$', next: "start"},
- {defaultToken: "string"}
- ], qstring: [
- {token: "constant.language.escape", regex: r},
- {token: "string", regex: "\\\\$", next: "qstring"},
- {token: "string", regex: "'|$", next: "start"},
- {defaultToken: "string"}
- ]}, this.embedRules(i, "doc-", [i.getEndRule("start")])
- };
- r.inherits(o, s), t.JavaScriptHighlightRules = o
-}), ace.define("ace/mode/doc_comment_highlight_rules", ["require", "exports", "module", "ace/lib/oop", "ace/mode/text_highlight_rules"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("./text_highlight_rules").TextHighlightRules, s = function () {
- this.$rules = {start: [
- {token: "comment.doc.tag", regex: "@[\\w\\d_]+"},
- {token: "comment.doc.tag", regex: "\\bTODO\\b"},
- {defaultToken: "comment.doc"}
- ]}
- };
- r.inherits(s, i), s.getStartRule = function (e) {
- return{token: "comment.doc", regex: "\\/\\*(?=\\*)", next: e}
- }, s.getEndRule = function (e) {
- return{token: "comment.doc", regex: "\\*\\/", next: e}
- }, t.DocCommentHighlightRules = s
-}), ace.define("ace/mode/matching_brace_outdent", ["require", "exports", "module", "ace/range"], function (e, t, n) {
- var r = e("../range").Range, i = function () {
- };
- (function () {
- this.checkOutdent = function (e, t) {
- return/^\s+$/.test(e) ? /^\s*\}/.test(t) : !1
- }, this.autoOutdent = function (e, t) {
- var n = e.getLine(t), i = n.match(/^(\s*\})/);
- if (!i)return 0;
- var s = i[1].length, o = e.findMatchingBracket({row: t, column: s});
- if (!o || o.row == t)return 0;
- var u = this.$getIndent(e.getLine(o.row));
- e.replace(new r(t, 0, t, s - 1), u)
- }, this.$getIndent = function (e) {
- var t = e.match(/^(\s+)/);
- return t ? t[1] : ""
- }
- }).call(i.prototype), t.MatchingBraceOutdent = i
-}), ace.define("ace/mode/behaviour/cstyle", ["require", "exports", "module", "ace/lib/oop", "ace/mode/behaviour", "ace/token_iterator", "ace/lib/lang"], function (e, t, n) {
- var r = e("../../lib/oop"), i = e("../behaviour").Behaviour, s = e("../../token_iterator").TokenIterator, o = e("../../lib/lang"), u = ["text", "paren.rparen", "punctuation.operator"], a = ["text", "paren.rparen", "punctuation.operator", "comment"], f = 0, l = -1, c = "", h = 0, p = -1, d = "", v = "", m = function () {
- m.isSaneInsertion = function (e, t) {
- var n = e.getCursorPosition(), r = new s(t, n.row, n.column);
- if (!this.$matchTokenType(r.getCurrentToken() || "text", u)) {
- var i = new s(t, n.row, n.column + 1);
- if (!this.$matchTokenType(i.getCurrentToken() || "text", u))return!1
- }
- return r.stepForward(), r.getCurrentTokenRow() !== n.row || this.$matchTokenType(r.getCurrentToken() || "text", a)
- }, m.$matchTokenType = function (e, t) {
- return t.indexOf(e.type || e) > -1
- }, m.recordAutoInsert = function (e, t, n) {
- var r = e.getCursorPosition(), i = t.doc.getLine(r.row);
- this.isAutoInsertedClosing(r, i, c[0]) || (f = 0), l = r.row, c = n + i.substr(r.column), f++
- }, m.recordMaybeInsert = function (e, t, n) {
- var r = e.getCursorPosition(), i = t.doc.getLine(r.row);
- this.isMaybeInsertedClosing(r, i) || (h = 0), p = r.row, d = i.substr(0, r.column) + n, v = i.substr(r.column), h++
- }, m.isAutoInsertedClosing = function (e, t, n) {
- return f > 0 && e.row === l && n === c[0] && t.substr(e.column) === c
- }, m.isMaybeInsertedClosing = function (e, t) {
- return h > 0 && e.row === p && t.substr(e.column) === v && t.substr(0, e.column) == d
- }, m.popAutoInsertedClosing = function () {
- c = c.substr(1), f--
- }, m.clearMaybeInsertedClosing = function () {
- h = 0, p = -1
- }, this.add("braces", "insertion", function (e, t, n, r, i) {
- var s = n.getCursorPosition(), u = r.doc.getLine(s.row);
- if (i == "{") {
- var a = n.getSelectionRange(), f = r.doc.getTextRange(a);
- if (f !== "" && f !== "{" && n.getWrapBehavioursEnabled())return{text: "{" + f + "}", selection: !1};
- if (m.isSaneInsertion(n, r))return/[\]\}\)]/.test(u[s.column]) ? (m.recordAutoInsert(n, r, "}"), {text: "{}", selection: [1, 1]}) : (m.recordMaybeInsert(n, r, "{"), {text: "{", selection: [1, 1]})
- } else if (i == "}") {
- var l = u.substring(s.column, s.column + 1);
- if (l == "}") {
- var c = r.$findOpeningBracket("}", {column: s.column + 1, row: s.row});
- if (c !== null && m.isAutoInsertedClosing(s, u, i))return m.popAutoInsertedClosing(), {text: "", selection: [1, 1]}
- }
- } else if (i == "\n" || i == "\r\n") {
- var p = "";
- m.isMaybeInsertedClosing(s, u) && (p = o.stringRepeat("}", h), m.clearMaybeInsertedClosing());
- var l = u.substring(s.column, s.column + 1);
- if (l == "}" || p !== "") {
- var d = r.findMatchingBracket({row: s.row, column: s.column}, "}");
- if (!d)return null;
- var v = this.getNextLineIndent(e, u.substring(0, s.column), r.getTabString()), g = this.$getIndent(u);
- return{text: "\n" + v + "\n" + g + p, selection: [1, v.length, 1, v.length]}
- }
- }
- }), this.add("braces", "deletion", function (e, t, n, r, i) {
- var s = r.doc.getTextRange(i);
- if (!i.isMultiLine() && s == "{") {
- var o = r.doc.getLine(i.start.row), u = o.substring(i.end.column, i.end.column + 1);
- if (u == "}")return i.end.column++, i;
- h--
- }
- }), this.add("parens", "insertion", function (e, t, n, r, i) {
- if (i == "(") {
- var s = n.getSelectionRange(), o = r.doc.getTextRange(s);
- if (o !== "" && n.getWrapBehavioursEnabled())return{text: "(" + o + ")", selection: !1};
- if (m.isSaneInsertion(n, r))return m.recordAutoInsert(n, r, ")"), {text: "()", selection: [1, 1]}
- } else if (i == ")") {
- var u = n.getCursorPosition(), a = r.doc.getLine(u.row), f = a.substring(u.column, u.column + 1);
- if (f == ")") {
- var l = r.$findOpeningBracket(")", {column: u.column + 1, row: u.row});
- if (l !== null && m.isAutoInsertedClosing(u, a, i))return m.popAutoInsertedClosing(), {text: "", selection: [1, 1]}
- }
- }
- }), this.add("parens", "deletion", function (e, t, n, r, i) {
- var s = r.doc.getTextRange(i);
- if (!i.isMultiLine() && s == "(") {
- var o = r.doc.getLine(i.start.row), u = o.substring(i.start.column + 1, i.start.column + 2);
- if (u == ")")return i.end.column++, i
- }
- }), this.add("brackets", "insertion", function (e, t, n, r, i) {
- if (i == "[") {
- var s = n.getSelectionRange(), o = r.doc.getTextRange(s);
- if (o !== "" && n.getWrapBehavioursEnabled())return{text: "[" + o + "]", selection: !1};
- if (m.isSaneInsertion(n, r))return m.recordAutoInsert(n, r, "]"), {text: "[]", selection: [1, 1]}
- } else if (i == "]") {
- var u = n.getCursorPosition(), a = r.doc.getLine(u.row), f = a.substring(u.column, u.column + 1);
- if (f == "]") {
- var l = r.$findOpeningBracket("]", {column: u.column + 1, row: u.row});
- if (l !== null && m.isAutoInsertedClosing(u, a, i))return m.popAutoInsertedClosing(), {text: "", selection: [1, 1]}
- }
- }
- }), this.add("brackets", "deletion", function (e, t, n, r, i) {
- var s = r.doc.getTextRange(i);
- if (!i.isMultiLine() && s == "[") {
- var o = r.doc.getLine(i.start.row), u = o.substring(i.start.column + 1, i.start.column + 2);
- if (u == "]")return i.end.column++, i
- }
- }), this.add("string_dquotes", "insertion", function (e, t, n, r, i) {
- if (i == '"' || i == "'") {
- var s = i, o = n.getSelectionRange(), u = r.doc.getTextRange(o);
- if (u !== "" && u !== "'" && u != '"' && n.getWrapBehavioursEnabled())return{text: s + u + s, selection: !1};
- var a = n.getCursorPosition(), f = r.doc.getLine(a.row), l = f.substring(a.column - 1, a.column);
- if (l == "\\")return null;
- var c = r.getTokens(o.start.row), h = 0, p, d = -1;
- for (var v = 0; v < c.length; v++) {
- p = c[v], p.type == "string" ? d = -1 : d < 0 && (d = p.value.indexOf(s));
- if (p.value.length + h > o.start.column)break;
- h += c[v].value.length
- }
- if (!p || d < 0 && p.type !== "comment" && (p.type !== "string" || o.start.column !== p.value.length + h - 1 && p.value.lastIndexOf(s) === p.value.length - 1)) {
- if (!m.isSaneInsertion(n, r))return;
- return{text: s + s, selection: [1, 1]}
- }
- if (p && p.type === "string") {
- var g = f.substring(a.column, a.column + 1);
- if (g == s)return{text: "", selection: [1, 1]}
- }
- }
- }), this.add("string_dquotes", "deletion", function (e, t, n, r, i) {
- var s = r.doc.getTextRange(i);
- if (!i.isMultiLine() && (s == '"' || s == "'")) {
- var o = r.doc.getLine(i.start.row), u = o.substring(i.start.column + 1, i.start.column + 2);
- if (u == s)return i.end.column++, i
- }
- })
- };
- r.inherits(m, i), t.CstyleBehaviour = m
-}), ace.define("ace/mode/folding/cstyle", ["require", "exports", "module", "ace/lib/oop", "ace/range", "ace/mode/folding/fold_mode"], function (e, t, n) {
- var r = e("../../lib/oop"), i = e("../../range").Range, s = e("./fold_mode").FoldMode, o = t.FoldMode = function () {
- };
- r.inherits(o, s), function () {
- this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/, this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/, this.getFoldWidgetRange = function (e, t, n) {
- var r = e.getLine(n), i = r.match(this.foldingStartMarker);
- if (i) {
- var s = i.index;
- return i[1] ? this.openingBracketBlock(e, i[1], n, s) : e.getCommentFoldRange(n, s + i[0].length, 1)
- }
- if (t !== "markbeginend")return;
- var i = r.match(this.foldingStopMarker);
- if (i) {
- var s = i.index + i[0].length;
- return i[1] ? this.closingBracketBlock(e, i[1], n, s) : e.getCommentFoldRange(n, s, -1)
- }
- }
- }.call(o.prototype)
-}), ace.define("ace/mode/scala_highlight_rules", ["require", "exports", "module", "ace/lib/oop", "ace/mode/doc_comment_highlight_rules", "ace/mode/text_highlight_rules"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("./doc_comment_highlight_rules").DocCommentHighlightRules, s = e("./text_highlight_rules").TextHighlightRules, o = function () {
- var e = "case|default|do|else|for|if|match|while|throw|return|try|catch|finally|yield|abstract|class|def|extends|final|forSome|implicit|implicits|import|lazy|new|object|override|package|private|protected|sealed|super|this|trait|type|val|var|with", t = "true|false", n = "AbstractMethodError|AssertionError|ClassCircularityError|ClassFormatError|Deprecated|EnumConstantNotPresentException|ExceptionInInitializerError|IllegalAccessError|IllegalThreadStateException|InstantiationError|InternalError|NegativeArraySizeException|NoSuchFieldError|Override|Process|ProcessBuilder|SecurityManager|StringIndexOutOfBoundsException|SuppressWarnings|TypeNotPresentException|UnknownError|UnsatisfiedLinkError|UnsupportedClassVersionError|VerifyError|InstantiationException|IndexOutOfBoundsException|ArrayIndexOutOfBoundsException|CloneNotSupportedException|NoSuchFieldException|IllegalArgumentException|NumberFormatException|SecurityException|Void|InheritableThreadLocal|IllegalStateException|InterruptedException|NoSuchMethodException|IllegalAccessException|UnsupportedOperationException|Enum|StrictMath|Package|Compiler|Readable|Runtime|StringBuilder|Math|IncompatibleClassChangeError|NoSuchMethodError|ThreadLocal|RuntimePermission|ArithmeticException|NullPointerException|Long|Integer|Short|Byte|Double|Number|Float|Character|Boolean|StackTraceElement|Appendable|StringBuffer|Iterable|ThreadGroup|Runnable|Thread|IllegalMonitorStateException|StackOverflowError|OutOfMemoryError|VirtualMachineError|ArrayStoreException|ClassCastException|LinkageError|NoClassDefFoundError|ClassNotFoundException|RuntimeException|Exception|ThreadDeath|Error|Throwable|System|ClassLoader|Cloneable|Class|CharSequence|Comparable|String|Object|Unit|Any|AnyVal|AnyRef|Null|ScalaObject|Singleton|Seq|Iterable|List|Option|Array|Char|Byte|Short|Int|Long|Nothing", r = this.createKeywordMapper({"variable.language": "this", keyword: e, "support.function": n, "constant.language": t}, "identifier");
- this.$rules = {start: [
- {token: "comment", regex: "\\/\\/.*$"},
- i.getStartRule("doc-start"),
- {token: "comment", regex: "\\/\\*", next: "comment"},
- {token: "string.regexp", regex: "[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/]\\w*\\s*(?=[).,;]|$)"},
- {token: "string", regex: '"""', next: "tstring"},
- {token: "string", regex: '"(?=.)', next: "string"},
- {token: "symbol.constant", regex: "'[\\w\\d_]+"},
- {token: "constant.numeric", regex: "0[xX][0-9a-fA-F]+\\b"},
- {token: "constant.numeric", regex: "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},
- {token: "constant.language.boolean", regex: "(?:true|false)\\b"},
- {token: r, regex: "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},
- {token: "keyword.operator", regex: "!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)"},
- {token: "paren.lparen", regex: "[[({]"},
- {token: "paren.rparen", regex: "[\\])}]"},
- {token: "text", regex: "\\s+"}
- ], comment: [
- {token: "comment", regex: ".*?\\*\\/", next: "start"},
- {token: "comment", regex: ".+"}
- ], string: [
- {token: "escape", regex: '\\\\"'},
- {token: "string", regex: '"', next: "start"},
- {token: "string.invalid", regex: '[^"\\\\]*$', next: "start"},
- {token: "string", regex: '[^"\\\\]+'}
- ], tstring: [
- {token: "string", regex: '"{3,5}', next: "start"},
- {token: "string", regex: ".+?"}
- ]}, this.embedRules(i, "doc-", [i.getEndRule("start")])
- };
- r.inherits(o, s), t.ScalaHighlightRules = o
-})
\ No newline at end of file
diff --git a/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/mode-scheme.js b/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/mode-scheme.js
deleted file mode 100644
index 7cba192..0000000
--- a/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/mode-scheme.js
+++ /dev/null
@@ -1,28 +0,0 @@
-ace.define("ace/mode/scheme", ["require", "exports", "module", "ace/lib/oop", "ace/mode/text", "ace/tokenizer", "ace/mode/scheme_highlight_rules"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("./text").Mode, s = e("../tokenizer").Tokenizer, o = e("./scheme_highlight_rules").SchemeHighlightRules, u = function () {
- var e = new o;
- this.$tokenizer = new s(e.getRules())
- };
- r.inherits(u, i), function () {
- }.call(u.prototype), t.Mode = u
-}), ace.define("ace/mode/scheme_highlight_rules", ["require", "exports", "module", "ace/lib/oop", "ace/mode/text_highlight_rules"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("./text_highlight_rules").TextHighlightRules, s = function () {
- var e = "case|do|let|loop|if|else|when", t = "eq?|eqv?|equal?|and|or|not|null?", n = "#t|#f", r = "cons|car|cdr|cond|lambda|lambda*|syntax-rules|format|set!|quote|eval|append|list|list?|member?|load", i = this.createKeywordMapper({"keyword.control": e, "keyword.operator": t, "constant.language": n, "support.function": r}, "identifier", !0);
- this.$rules = {start: [
- {token: "comment", regex: ";.*$"},
- {token: ["storage.type.function-type.scheme", "text", "entity.name.function.scheme"], regex: "(?:\\b(?:(define|define-syntax|define-macro))\\b)(\\s+)((?:\\w|\\-|\\!|\\?)*)"},
- {token: "punctuation.definition.constant.character.scheme", regex: "#:\\S+"},
- {token: ["punctuation.definition.variable.scheme", "variable.other.global.scheme", "punctuation.definition.variable.scheme"], regex: "(\\*)(\\S*)(\\*)"},
- {token: "constant.numeric", regex: "#[xXoObB][0-9a-fA-F]+"},
- {token: "constant.numeric", regex: "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?"},
- {token: i, regex: "[a-zA-Z_#][a-zA-Z0-9_\\-\\?\\!\\*]*"},
- {token: "string", regex: '"(?=.)', next: "qqstring"}
- ], qqstring: [
- {token: "constant.character.escape.scheme", regex: "\\\\."},
- {token: "string", regex: '[^"\\\\]+', merge: !0},
- {token: "string", regex: "\\\\$", next: "qqstring", merge: !0},
- {token: "string", regex: '"|$', next: "start", merge: !0}
- ]}
- };
- r.inherits(s, i), t.SchemeHighlightRules = s
-})
\ No newline at end of file
diff --git a/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/mode-scss.js b/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/mode-scss.js
deleted file mode 100644
index c3afb89..0000000
--- a/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/mode-scss.js
+++ /dev/null
@@ -1,242 +0,0 @@
-ace.define("ace/mode/scss", ["require", "exports", "module", "ace/lib/oop", "ace/mode/text", "ace/tokenizer", "ace/mode/scss_highlight_rules", "ace/mode/matching_brace_outdent", "ace/mode/behaviour/css", "ace/mode/folding/cstyle"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("./text").Mode, s = e("../tokenizer").Tokenizer, o = e("./scss_highlight_rules").ScssHighlightRules, u = e("./matching_brace_outdent").MatchingBraceOutdent, a = e("./behaviour/css").CssBehaviour, f = e("./folding/cstyle").FoldMode, l = function () {
- this.$tokenizer = new s((new o).getRules(), "i"), this.$outdent = new u, this.$behaviour = new a, this.foldingRules = new f
- };
- r.inherits(l, i), function () {
- this.getNextLineIndent = function (e, t, n) {
- var r = this.$getIndent(t), i = this.$tokenizer.getLineTokens(t, e).tokens;
- if (i.length && i[i.length - 1].type == "comment")return r;
- var s = t.match(/^.*\{\s*$/);
- return s && (r += n), r
- }, this.checkOutdent = function (e, t, n) {
- return this.$outdent.checkOutdent(t, n)
- }, this.autoOutdent = function (e, t, n) {
- this.$outdent.autoOutdent(t, n)
- }
- }.call(l.prototype), t.Mode = l
-}), ace.define("ace/mode/scss_highlight_rules", ["require", "exports", "module", "ace/lib/oop", "ace/lib/lang", "ace/mode/text_highlight_rules"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("../lib/lang"), s = e("./text_highlight_rules").TextHighlightRules, o = function () {
- var e = i.arrayToMap(function () {
- var e = "-webkit-|-moz-|-o-|-ms-|-svg-|-pie-|-khtml-".split("|"), t = "appearance|background-clip|background-inline-policy|background-origin|background-size|binding|border-bottom-colors|border-left-colors|border-right-colors|border-top-colors|border-end|border-end-color|border-end-style|border-end-width|border-image|border-start|border-start-color|border-start-style|border-start-width|box-align|box-direction|box-flex|box-flexgroup|box-ordinal-group|box-orient|box-pack|box-sizing|column-count|column-gap|column-width|column-rule|column-rule-width|column-rule-style|column-rule-color|float-edge|font-feature-settings|font-language-override|force-broken-image-icon|image-region|margin-end|margin-start|opacity|outline|outline-color|outline-offset|outline-radius|outline-radius-bottomleft|outline-radius-bottomright|outline-radius-topleft|outline-radius-topright|outline-style|outline-width|padding-end|padding-start|stack-sizing|tab-size|text-blink|text-decoration-color|text-decoration-line|text-decoration-style|transform|transform-origin|transition|transition-delay|transition-duration|transition-property|transition-timing-function|user-focus|user-input|user-modify|user-select|window-shadow|border-radius".split("|"), n = "azimuth|background-attachment|background-color|background-image|background-position|background-repeat|background|border-bottom-color|border-bottom-style|border-bottom-width|border-bottom|border-collapse|border-color|border-left-color|border-left-style|border-left-width|border-left|border-right-color|border-right-style|border-right-width|border-right|border-spacing|border-style|border-top-color|border-top-style|border-top-width|border-top|border-width|border|bottom|box-sizing|caption-side|clear|clip|color|content|counter-increment|counter-reset|cue-after|cue-before|cue|cursor|direction|display|elevation|empty-cells|float|font-family|font-size-adjust|font-size|font-stretch|font-style|font-variant|font-weight|font|height|left|letter-spacing|line-height|list-style-image|list-style-position|list-style-type|list-style|margin-bottom|margin-left|margin-right|margin-top|marker-offset|margin|marks|max-height|max-width|min-height|min-width|opacity|orphans|outline-color|outline-style|outline-width|outline|overflow|overflow-x|overflow-y|padding-bottom|padding-left|padding-right|padding-top|padding|page-break-after|page-break-before|page-break-inside|page|pause-after|pause-before|pause|pitch-range|pitch|play-during|position|quotes|richness|right|size|speak-header|speak-numeral|speak-punctuation|speech-rate|speak|stress|table-layout|text-align|text-decoration|text-indent|text-shadow|text-transform|top|unicode-bidi|vertical-align|visibility|voice-family|volume|white-space|widows|width|word-spacing|z-index".split("|"), r = [];
- for (var i = 0, s = e.length; i < s; i++)Array.prototype.push.apply(r, (e[i] + t.join("|" + e[i])).split("|"));
- return Array.prototype.push.apply(r, t), Array.prototype.push.apply(r, n), r
- }()), t = i.arrayToMap("hsl|hsla|rgb|rgba|url|attr|counter|counters|abs|adjust_color|adjust_hue|alpha|join|blue|ceil|change_color|comparable|complement|darken|desaturate|floor|grayscale|green|hue|if|invert|join|length|lighten|lightness|mix|nth|opacify|opacity|percentage|quote|red|round|saturate|saturation|scale_color|transparentize|type_of|unit|unitless|unqoute".split("|")), n = i.arrayToMap("absolute|all-scroll|always|armenian|auto|baseline|below|bidi-override|block|bold|bolder|border-box|both|bottom|break-all|break-word|capitalize|center|char|circle|cjk-ideographic|col-resize|collapse|content-box|crosshair|dashed|decimal-leading-zero|decimal|default|disabled|disc|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ellipsis|fixed|georgian|groove|hand|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|inactive|inherit|inline-block|inline|inset|inside|inter-ideograph|inter-word|italic|justify|katakana-iroha|katakana|keep-all|left|lighter|line-edge|line-through|line|list-item|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|medium|middle|move|n-resize|ne-resize|newspaper|no-drop|no-repeat|nw-resize|none|normal|not-allowed|nowrap|oblique|outset|outside|overline|pointer|progress|relative|repeat-x|repeat-y|repeat|right|ridge|row-resize|rtl|s-resize|scroll|se-resize|separate|small-caps|solid|square|static|strict|super|sw-resize|table-footer-group|table-header-group|tb-rl|text-bottom|text-top|text|thick|thin|top|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|zero".split("|")), r = i.arrayToMap("aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow".split("|")), s = i.arrayToMap("@mixin|@extend|@include|@import|@media|@debug|@warn|@if|@for|@each|@while|@else|@font-face|@-webkit-keyframes|if|and|!default|module|def|end|declare".split("|")), o = i.arrayToMap("a|abbr|acronym|address|applet|area|article|aside|audio|b|base|basefont|bdo|big|blockquote|body|br|button|canvas|caption|center|cite|code|col|colgroup|command|datalist|dd|del|details|dfn|dir|div|dl|dt|em|embed|fieldset|figcaption|figure|font|footer|form|frame|frameset|h1|h2|h3|h4|h5|h6|head|header|hgroup|hr|html|i|iframe|img|input|ins|keygen|kbd|label|legend|li|link|map|mark|menu|meta|meter|nav|noframes|noscript|object|ol|optgroup|option|output|p|param|pre|progress|q|rp|rt|ruby|s|samp|script|section|select|small|source|span|strike|strong|style|sub|summary|sup|table|tbody|td|textarea|tfoot|th|thead|time|title|tr|tt|u|ul|var|video|wbr|xmp".split("|")), u = "\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))";
- this.$rules = {start: [
- {token: "comment", regex: "\\/\\/.*$"},
- {token: "comment", regex: "\\/\\*", next: "comment"},
- {token: "string", regex: '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},
- {token: "string", regex: '["].*\\\\$', next: "qqstring"},
- {token: "string", regex: "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},
- {token: "string", regex: "['].*\\\\$", next: "qstring"},
- {token: "constant.numeric", regex: u + "(?:em|ex|px|cm|mm|in|pt|pc|deg|rad|grad|ms|s|hz|khz|%)"},
- {token: "constant.numeric", regex: "#[a-f0-9]{6}"},
- {token: "constant.numeric", regex: "#[a-f0-9]{3}"},
- {token: "constant.numeric", regex: u},
- {token: function (i) {
- return e.hasOwnProperty(i.toLowerCase()) ? "support.type" : s.hasOwnProperty(i) ? "keyword" : n.hasOwnProperty(i) ? "constant.language" : t.hasOwnProperty(i) ? "support.function" : r.hasOwnProperty(i.toLowerCase()) ? "support.constant.color" : o.hasOwnProperty(i.toLowerCase()) ? "variable.language" : "text"
- }, regex: "\\-?[@a-z_][@a-z0-9_\\-]*"},
- {token: "variable", regex: "[a-z_\\-$][a-z0-9_\\-$]*\\b"},
- {token: "variable.language", regex: "#[a-z0-9-_]+"},
- {token: "variable.language", regex: "\\.[a-z0-9-_]+"},
- {token: "variable.language", regex: ":[a-z0-9-_]+"},
- {token: "constant", regex: "[a-z0-9-_]+"},
- {token: "keyword.operator", regex: "<|>|<=|>=|==|!=|-|%|#|\\+|\\$|\\+|\\*"},
- {token: "paren.lparen", regex: "[[({]"},
- {token: "paren.rparen", regex: "[\\])}]"},
- {token: "text", regex: "\\s+"}
- ], comment: [
- {token: "comment", regex: ".*?\\*\\/", next: "start"},
- {token: "comment", regex: ".+"}
- ], qqstring: [
- {token: "string", regex: '(?:(?:\\\\.)|(?:[^"\\\\]))*?"', next: "start"},
- {token: "string", regex: ".+"}
- ], qstring: [
- {token: "string", regex: "(?:(?:\\\\.)|(?:[^'\\\\]))*?'", next: "start"},
- {token: "string", regex: ".+"}
- ]}
- };
- r.inherits(o, s), t.ScssHighlightRules = o
-}), ace.define("ace/mode/matching_brace_outdent", ["require", "exports", "module", "ace/range"], function (e, t, n) {
- var r = e("../range").Range, i = function () {
- };
- (function () {
- this.checkOutdent = function (e, t) {
- return/^\s+$/.test(e) ? /^\s*\}/.test(t) : !1
- }, this.autoOutdent = function (e, t) {
- var n = e.getLine(t), i = n.match(/^(\s*\})/);
- if (!i)return 0;
- var s = i[1].length, o = e.findMatchingBracket({row: t, column: s});
- if (!o || o.row == t)return 0;
- var u = this.$getIndent(e.getLine(o.row));
- e.replace(new r(t, 0, t, s - 1), u)
- }, this.$getIndent = function (e) {
- var t = e.match(/^(\s+)/);
- return t ? t[1] : ""
- }
- }).call(i.prototype), t.MatchingBraceOutdent = i
-}), ace.define("ace/mode/behaviour/css", ["require", "exports", "module", "ace/lib/oop", "ace/mode/behaviour", "ace/mode/behaviour/cstyle", "ace/token_iterator"], function (e, t, n) {
- var r = e("../../lib/oop"), i = e("../behaviour").Behaviour, s = e("./cstyle").CstyleBehaviour, o = e("../../token_iterator").TokenIterator, u = function () {
- this.inherit(s), this.add("colon", "insertion", function (e, t, n, r, i) {
- if (i === ":") {
- var s = n.getCursorPosition(), u = new o(r, s.row, s.column), a = u.getCurrentToken();
- a && a.value.match(/\s+/) && (a = u.stepBackward());
- if (a && a.type === "support.type") {
- var f = r.doc.getLine(s.row), l = f.substring(s.column, s.column + 1);
- if (l === ":")return{text: "", selection: [1, 1]};
- if (!f.substring(s.column).match(/^\s*;/))return{text: ":;", selection: [1, 1]}
- }
- }
- }), this.add("colon", "deletion", function (e, t, n, r, i) {
- var s = r.doc.getTextRange(i);
- if (!i.isMultiLine() && s === ":") {
- var o = r.doc.getLine(i.start.row), u = o.substring(i.end.column, i.end.column + 1);
- if (u === ";")return i.end.column++, i
- }
- }), this.add("semicolon", "insertion", function (e, t, n, r, i) {
- if (i === ";") {
- var s = n.getCursorPosition(), o = r.doc.getLine(s.row), u = o.substring(s.column, s.column + 1);
- if (u === ";")return{text: "", selection: [1, 1]}
- }
- })
- };
- r.inherits(u, s), t.CssBehaviour = u
-}), ace.define("ace/mode/behaviour/cstyle", ["require", "exports", "module", "ace/lib/oop", "ace/mode/behaviour", "ace/token_iterator", "ace/lib/lang"], function (e, t, n) {
- var r = e("../../lib/oop"), i = e("../behaviour").Behaviour, s = e("../../token_iterator").TokenIterator, o = e("../../lib/lang"), u = ["text", "paren.rparen", "punctuation.operator"], a = ["text", "paren.rparen", "punctuation.operator", "comment"], f = 0, l = -1, c = "", h = 0, p = -1, d = "", v = "", m = function () {
- m.isSaneInsertion = function (e, t) {
- var n = e.getCursorPosition(), r = new s(t, n.row, n.column);
- if (!this.$matchTokenType(r.getCurrentToken() || "text", u)) {
- var i = new s(t, n.row, n.column + 1);
- if (!this.$matchTokenType(i.getCurrentToken() || "text", u))return!1
- }
- return r.stepForward(), r.getCurrentTokenRow() !== n.row || this.$matchTokenType(r.getCurrentToken() || "text", a)
- }, m.$matchTokenType = function (e, t) {
- return t.indexOf(e.type || e) > -1
- }, m.recordAutoInsert = function (e, t, n) {
- var r = e.getCursorPosition(), i = t.doc.getLine(r.row);
- this.isAutoInsertedClosing(r, i, c[0]) || (f = 0), l = r.row, c = n + i.substr(r.column), f++
- }, m.recordMaybeInsert = function (e, t, n) {
- var r = e.getCursorPosition(), i = t.doc.getLine(r.row);
- this.isMaybeInsertedClosing(r, i) || (h = 0), p = r.row, d = i.substr(0, r.column) + n, v = i.substr(r.column), h++
- }, m.isAutoInsertedClosing = function (e, t, n) {
- return f > 0 && e.row === l && n === c[0] && t.substr(e.column) === c
- }, m.isMaybeInsertedClosing = function (e, t) {
- return h > 0 && e.row === p && t.substr(e.column) === v && t.substr(0, e.column) == d
- }, m.popAutoInsertedClosing = function () {
- c = c.substr(1), f--
- }, m.clearMaybeInsertedClosing = function () {
- h = 0, p = -1
- }, this.add("braces", "insertion", function (e, t, n, r, i) {
- var s = n.getCursorPosition(), u = r.doc.getLine(s.row);
- if (i == "{") {
- var a = n.getSelectionRange(), f = r.doc.getTextRange(a);
- if (f !== "" && f !== "{" && n.getWrapBehavioursEnabled())return{text: "{" + f + "}", selection: !1};
- if (m.isSaneInsertion(n, r))return/[\]\}\)]/.test(u[s.column]) ? (m.recordAutoInsert(n, r, "}"), {text: "{}", selection: [1, 1]}) : (m.recordMaybeInsert(n, r, "{"), {text: "{", selection: [1, 1]})
- } else if (i == "}") {
- var l = u.substring(s.column, s.column + 1);
- if (l == "}") {
- var c = r.$findOpeningBracket("}", {column: s.column + 1, row: s.row});
- if (c !== null && m.isAutoInsertedClosing(s, u, i))return m.popAutoInsertedClosing(), {text: "", selection: [1, 1]}
- }
- } else if (i == "\n" || i == "\r\n") {
- var p = "";
- m.isMaybeInsertedClosing(s, u) && (p = o.stringRepeat("}", h), m.clearMaybeInsertedClosing());
- var l = u.substring(s.column, s.column + 1);
- if (l == "}" || p !== "") {
- var d = r.findMatchingBracket({row: s.row, column: s.column}, "}");
- if (!d)return null;
- var v = this.getNextLineIndent(e, u.substring(0, s.column), r.getTabString()), g = this.$getIndent(u);
- return{text: "\n" + v + "\n" + g + p, selection: [1, v.length, 1, v.length]}
- }
- }
- }), this.add("braces", "deletion", function (e, t, n, r, i) {
- var s = r.doc.getTextRange(i);
- if (!i.isMultiLine() && s == "{") {
- var o = r.doc.getLine(i.start.row), u = o.substring(i.end.column, i.end.column + 1);
- if (u == "}")return i.end.column++, i;
- h--
- }
- }), this.add("parens", "insertion", function (e, t, n, r, i) {
- if (i == "(") {
- var s = n.getSelectionRange(), o = r.doc.getTextRange(s);
- if (o !== "" && n.getWrapBehavioursEnabled())return{text: "(" + o + ")", selection: !1};
- if (m.isSaneInsertion(n, r))return m.recordAutoInsert(n, r, ")"), {text: "()", selection: [1, 1]}
- } else if (i == ")") {
- var u = n.getCursorPosition(), a = r.doc.getLine(u.row), f = a.substring(u.column, u.column + 1);
- if (f == ")") {
- var l = r.$findOpeningBracket(")", {column: u.column + 1, row: u.row});
- if (l !== null && m.isAutoInsertedClosing(u, a, i))return m.popAutoInsertedClosing(), {text: "", selection: [1, 1]}
- }
- }
- }), this.add("parens", "deletion", function (e, t, n, r, i) {
- var s = r.doc.getTextRange(i);
- if (!i.isMultiLine() && s == "(") {
- var o = r.doc.getLine(i.start.row), u = o.substring(i.start.column + 1, i.start.column + 2);
- if (u == ")")return i.end.column++, i
- }
- }), this.add("brackets", "insertion", function (e, t, n, r, i) {
- if (i == "[") {
- var s = n.getSelectionRange(), o = r.doc.getTextRange(s);
- if (o !== "" && n.getWrapBehavioursEnabled())return{text: "[" + o + "]", selection: !1};
- if (m.isSaneInsertion(n, r))return m.recordAutoInsert(n, r, "]"), {text: "[]", selection: [1, 1]}
- } else if (i == "]") {
- var u = n.getCursorPosition(), a = r.doc.getLine(u.row), f = a.substring(u.column, u.column + 1);
- if (f == "]") {
- var l = r.$findOpeningBracket("]", {column: u.column + 1, row: u.row});
- if (l !== null && m.isAutoInsertedClosing(u, a, i))return m.popAutoInsertedClosing(), {text: "", selection: [1, 1]}
- }
- }
- }), this.add("brackets", "deletion", function (e, t, n, r, i) {
- var s = r.doc.getTextRange(i);
- if (!i.isMultiLine() && s == "[") {
- var o = r.doc.getLine(i.start.row), u = o.substring(i.start.column + 1, i.start.column + 2);
- if (u == "]")return i.end.column++, i
- }
- }), this.add("string_dquotes", "insertion", function (e, t, n, r, i) {
- if (i == '"' || i == "'") {
- var s = i, o = n.getSelectionRange(), u = r.doc.getTextRange(o);
- if (u !== "" && u !== "'" && u != '"' && n.getWrapBehavioursEnabled())return{text: s + u + s, selection: !1};
- var a = n.getCursorPosition(), f = r.doc.getLine(a.row), l = f.substring(a.column - 1, a.column);
- if (l == "\\")return null;
- var c = r.getTokens(o.start.row), h = 0, p, d = -1;
- for (var v = 0; v < c.length; v++) {
- p = c[v], p.type == "string" ? d = -1 : d < 0 && (d = p.value.indexOf(s));
- if (p.value.length + h > o.start.column)break;
- h += c[v].value.length
- }
- if (!p || d < 0 && p.type !== "comment" && (p.type !== "string" || o.start.column !== p.value.length + h - 1 && p.value.lastIndexOf(s) === p.value.length - 1)) {
- if (!m.isSaneInsertion(n, r))return;
- return{text: s + s, selection: [1, 1]}
- }
- if (p && p.type === "string") {
- var g = f.substring(a.column, a.column + 1);
- if (g == s)return{text: "", selection: [1, 1]}
- }
- }
- }), this.add("string_dquotes", "deletion", function (e, t, n, r, i) {
- var s = r.doc.getTextRange(i);
- if (!i.isMultiLine() && (s == '"' || s == "'")) {
- var o = r.doc.getLine(i.start.row), u = o.substring(i.start.column + 1, i.start.column + 2);
- if (u == s)return i.end.column++, i
- }
- })
- };
- r.inherits(m, i), t.CstyleBehaviour = m
-}), ace.define("ace/mode/folding/cstyle", ["require", "exports", "module", "ace/lib/oop", "ace/range", "ace/mode/folding/fold_mode"], function (e, t, n) {
- var r = e("../../lib/oop"), i = e("../../range").Range, s = e("./fold_mode").FoldMode, o = t.FoldMode = function () {
- };
- r.inherits(o, s), function () {
- this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/, this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/, this.getFoldWidgetRange = function (e, t, n) {
- var r = e.getLine(n), i = r.match(this.foldingStartMarker);
- if (i) {
- var s = i.index;
- return i[1] ? this.openingBracketBlock(e, i[1], n, s) : e.getCommentFoldRange(n, s + i[0].length, 1)
- }
- if (t !== "markbeginend")return;
- var i = r.match(this.foldingStopMarker);
- if (i) {
- var s = i.index + i[0].length;
- return i[1] ? this.closingBracketBlock(e, i[1], n, s) : e.getCommentFoldRange(n, s, -1)
- }
- }
- }.call(o.prototype)
-})
\ No newline at end of file
diff --git a/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/mode-sh.js b/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/mode-sh.js
deleted file mode 100644
index 1c36b5f..0000000
--- a/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/mode-sh.js
+++ /dev/null
@@ -1,61 +0,0 @@
-ace.define("ace/mode/sh", ["require", "exports", "module", "ace/lib/oop", "ace/mode/text", "ace/tokenizer", "ace/mode/sh_highlight_rules", "ace/range"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("./text").Mode, s = e("../tokenizer").Tokenizer, o = e("./sh_highlight_rules").ShHighlightRules, u = e("../range").Range, a = function () {
- this.$tokenizer = new s((new o).getRules())
- };
- r.inherits(a, i), function () {
- this.toggleCommentLines = function (e, t, n, r) {
- var i = !0, s = /^(\s*)#/;
- for (var o = n; o <= r; o++)if (!s.test(t.getLine(o))) {
- i = !1;
- break
- }
- if (i) {
- var a = new u(0, 0, 0, 0);
- for (var o = n; o <= r; o++) {
- var f = t.getLine(o), l = f.match(s);
- a.start.row = o, a.end.row = o, a.end.column = l[0].length, t.replace(a, l[1])
- }
- } else t.indentRows(n, r, "#")
- }, this.getNextLineIndent = function (e, t, n) {
- var r = this.$getIndent(t), i = this.$tokenizer.getLineTokens(t, e), s = i.tokens;
- if (s.length && s[s.length - 1].type == "comment")return r;
- if (e == "start") {
- var o = t.match(/^.*[\{\(\[\:]\s*$/);
- o && (r += n)
- }
- return r
- };
- var e = {pass: 1, "return": 1, raise: 1, "break": 1, "continue": 1};
- this.checkOutdent = function (t, n, r) {
- if (r !== "\r\n" && r !== "\r" && r !== "\n")return!1;
- var i = this.$tokenizer.getLineTokens(n.trim(), t).tokens;
- if (!i)return!1;
- do var s = i.pop(); while (s && (s.type == "comment" || s.type == "text" && s.value.match(/^\s+$/)));
- return s ? s.type == "keyword" && e[s.value] : !1
- }, this.autoOutdent = function (e, t, n) {
- n += 1;
- var r = this.$getIndent(t.getLine(n)), i = t.getTabString();
- r.slice(-i.length) == i && t.remove(new u(n, r.length - i.length, n, r.length))
- }
- }.call(a.prototype), t.Mode = a
-}), ace.define("ace/mode/sh_highlight_rules", ["require", "exports", "module", "ace/lib/oop", "ace/mode/text_highlight_rules"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("./text_highlight_rules").TextHighlightRules, s = t.reservedKeywords = "!|{|}|case|do|done|elif|else|esac|fi|for|if|in|then|until|while|&|;|export|local|read|typeset|unset|elif|select|set", o = t.languageConstructs = "[|]|alias|bg|bind|break|builtin|cd|command|compgen|complete|continue|dirs|disown|echo|enable|eval|exec|exit|fc|fg|getopts|hash|help|history|jobs|kill|let|logout|popd|printf|pushd|pwd|return|set|shift|shopt|source|suspend|test|times|trap|type|ulimit|umask|unalias|wait", u = function () {
- var e = this.createKeywordMapper({keyword: s, "support.function.builtin": o, "invalid.deprecated": "debugger"}, "identifier"), t = "(?:(?:[1-9]\\d*)|(?:0))", n = "(?:\\.\\d+)", r = "(?:\\d+)", i = "(?:(?:" + r + "?" + n + ")|(?:" + r + "\\.))", u = "(?:(?:" + i + "|" + r + ")" + ")", a = "(?:" + u + "|" + i + ")", f = "(?:&" + r + ")", l = "[a-zA-Z][a-zA-Z0-9_]*", c = "(?:(?:\\$" + l + ")|(?:" + l + "=))", h = "(?:\\$(?:SHLVL|\\$|\\!|\\?))", p = "(?:" + l + "\\s*\\(\\))";
- this.$rules = {start: [
- {token: ["text", "comment"], regex: /(^|\s)(#.*)$/},
- {token: "string", regex: '"(?:[^\\\\]|\\\\.)*?"'},
- {token: "variable.language", regex: h},
- {token: "variable", regex: c},
- {token: "support.function", regex: p},
- {token: "support.function", regex: f},
- {token: "string", regex: "'(?:[^\\\\]|\\\\.)*?'"},
- {token: "constant.numeric", regex: a},
- {token: "constant.numeric", regex: t + "\\b"},
- {token: e, regex: "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},
- {token: "keyword.operator", regex: "\\+|\\-|\\*|\\*\\*|\\/|\\/\\/|~|<|>|<=|=>|=|!="},
- {token: "paren.lparen", regex: "[\\[\\(\\{]"},
- {token: "paren.rparen", regex: "[\\]\\)\\}]"}
- ]}
- };
- r.inherits(u, i), t.ShHighlightRules = u
-})
\ No newline at end of file
diff --git a/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/mode-sql.js b/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/mode-sql.js
deleted file mode 100644
index d42f0a9..0000000
--- a/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/mode-sql.js
+++ /dev/null
@@ -1,37 +0,0 @@
-ace.define("ace/mode/sql", ["require", "exports", "module", "ace/lib/oop", "ace/mode/text", "ace/tokenizer", "ace/mode/sql_highlight_rules", "ace/range"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("./text").Mode, s = e("../tokenizer").Tokenizer, o = e("./sql_highlight_rules").SqlHighlightRules, u = e("../range").Range, a = function () {
- this.$tokenizer = new s((new o).getRules())
- };
- r.inherits(a, i), function () {
- this.toggleCommentLines = function (e, t, n, r) {
- var i = !0, s = [], o = /^(\s*)--/;
- for (var a = n; a <= r; a++)if (!o.test(t.getLine(a))) {
- i = !1;
- break
- }
- if (i) {
- var f = new u(0, 0, 0, 0);
- for (var a = n; a <= r; a++) {
- var l = t.getLine(a), c = l.match(o);
- f.start.row = a, f.end.row = a, f.end.column = c[0].length, t.replace(f, c[1])
- }
- } else t.indentRows(n, r, "--")
- }
- }.call(a.prototype), t.Mode = a
-}), ace.define("ace/mode/sql_highlight_rules", ["require", "exports", "module", "ace/lib/oop", "ace/mode/text_highlight_rules"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("./text_highlight_rules").TextHighlightRules, s = function () {
- var e = "select|insert|update|delete|from|where|and|or|group|by|order|limit|offset|having|as|case|when|else|end|type|left|right|join|on|outer|desc|asc", t = "true|false|null", n = "count|min|max|avg|sum|rank|now|coalesce", r = this.createKeywordMapper({"support.function": n, keyword: e, "constant.language": t}, "identifier", !0);
- this.$rules = {start: [
- {token: "comment", regex: "--.*$"},
- {token: "string", regex: '".*?"'},
- {token: "string", regex: "'.*?'"},
- {token: "constant.numeric", regex: "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},
- {token: r, regex: "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},
- {token: "keyword.operator", regex: "\\+|\\-|\\/|\\/\\/|%|<@>|@>|<@|&|\\^|~|<|>|<=|=>|==|!=|<>|="},
- {token: "paren.lparen", regex: "[\\(]"},
- {token: "paren.rparen", regex: "[\\)]"},
- {token: "text", regex: "\\s+"}
- ]}
- };
- r.inherits(s, i), t.SqlHighlightRules = s
-})
\ No newline at end of file
diff --git a/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/mode-stylus.js b/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/mode-stylus.js
deleted file mode 100644
index 6376eb5..0000000
--- a/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/mode-stylus.js
+++ /dev/null
@@ -1,121 +0,0 @@
-ace.define("ace/mode/stylus", ["require", "exports", "module", "ace/lib/oop", "ace/mode/text", "ace/tokenizer", "ace/mode/stylus_highlight_rules", "ace/mode/folding/coffee"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("./text").Mode, s = e("../tokenizer").Tokenizer, o = e("./stylus_highlight_rules").StylusHighlightRules, u = e("./folding/coffee").FoldMode, a = function () {
- var e = new o;
- this.foldingRules = new u, this.$tokenizer = new s(e.getRules())
- };
- r.inherits(a, i), function () {
- }.call(a.prototype), t.Mode = a
-}), ace.define("ace/mode/stylus_highlight_rules", ["require", "exports", "module", "ace/lib/oop", "ace/mode/text_highlight_rules", "ace/mode/css_highlight_rules"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("./text_highlight_rules").TextHighlightRules, s = e("./css_highlight_rules"), o = function () {
- var e = this.createKeywordMapper({"support.type": s.supportType, "support.function": s.supportFunction, "support.constant": s.supportConstant, "support.constant.color": s.supportConstantColor, "support.constant.fonts": s.supportConstantFonts}, "text", !0);
- this.$rules = {start: [
- {token: "comment", regex: /\/\/.*$/},
- {token: "comment", regex: /\/\*/, next: "comment"},
- {token: ["entity.name.function.stylus", "text"], regex: "^([-a-zA-Z_][-\\w]*)?(\\()"},
- {token: ["entity.other.attribute-name.class.stylus"], regex: "\\.-?[_a-zA-Z]+[_a-zA-Z0-9-]*"},
- {token: ["entity.language.stylus"], regex: "^ *&"},
- {token: ["variable.language.stylus"], regex: "(arguments)"},
- {token: ["keyword.stylus"], regex: "@[-\\w]+"},
- {token: ["punctuation", "entity.other.attribute-name.pseudo-element.css"], regex: s.pseudoElements},
- {token: ["punctuation", "entity.other.attribute-name.pseudo-class.css"], regex: s.pseudoClasses},
- {token: ["entity.name.tag.stylus"], regex: "(?:\\b)(a|abbr|acronym|address|area|article|aside|audio|b|base|big|blockquote|body|br|button|canvas|caption|cite|code|col|colgroup|datalist|dd|del|details|dfn|dialog|div|dl|dt|em|eventsource|fieldset|figure|figcaption|footer|form|frame|frameset|(?:h[1-6])|head|header|hgroup|hr|html|i|iframe|img|input|ins|kbd|label|legend|li|link|map|mark|menu|meta|meter|nav|noframes|noscript|object|ol|optgroup|option|output|p|param|pre|progress|q|samp|script|section|select|small|span|strike|strong|style|sub|summary|sup|table|tbody|td|textarea|tfoot|th|thead|time|title|tr|tt|ul|var|video)(?:\\b)"},
- {token: "constant.numeric", regex: "#[a-f0-9]{6}"},
- {token: "constant.numeric", regex: "#[a-f0-9]{3}"},
- {token: ["punctuation.definition.entity.stylus", "entity.other.attribute-name.id.stylus"], regex: "(#)([a-zA-Z][a-zA-Z0-9_-]*)"},
- {token: "meta.vendor-prefix.stylus", regex: "-webkit-|-moz\\-|-ms-|-o-"},
- {token: "keyword.control.stylus", regex: "(?:!important|for|in|return|true|false|null|if|else|unless|return)\\b"},
- {token: "keyword.operator.stylus", regex: "!|~|\\+|-|(?:\\*)?\\*|\\/|%|(?:\\.)\\.\\.|<|>|(?:=|:|\\?|\\+|-|\\*|\\/|%|<|>)?=|!="},
- {token: "keyword.operator.stylus", regex: "(?:in|is(?:nt)?|not)\\b"},
- {token: "string", regex: "'(?=.)", next: "qstring"},
- {token: "string", regex: '"(?=.)', next: "qqstring"},
- {token: "constant.numeric", regex: s.numRe},
- {token: "keyword", regex: "(?:ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vm|vw|%)\\b"},
- {token: e, regex: "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"}
- ], comment: [
- {token: "comment", regex: ".*?\\*\\/", next: "start"},
- {token: "comment", regex: ".+"}
- ], qqstring: [
- {token: "string", regex: '[^"\\\\]+'},
- {token: "string", regex: "\\\\$", next: "qqstring"},
- {token: "string", regex: '"|$', next: "start"}
- ], qstring: [
- {token: "string", regex: "[^'\\\\]+"},
- {token: "string", regex: "\\\\$", next: "qstring"},
- {token: "string", regex: "'|$", next: "start"}
- ]}
- };
- r.inherits(o, i), t.StylusHighlightRules = o
-}), ace.define("ace/mode/css_highlight_rules", ["require", "exports", "module", "ace/lib/oop", "ace/lib/lang", "ace/mode/text_highlight_rules"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("../lib/lang"), s = e("./text_highlight_rules").TextHighlightRules, o = t.supportType = "animation-fill-mode|alignment-adjust|alignment-baseline|animation-delay|animation-direction|animation-duration|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|animation|appearance|azimuth|backface-visibility|background-attachment|background-break|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|background|baseline-shift|binding|bleed|bookmark-label|bookmark-level|bookmark-state|bookmark-target|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|border|bottom|box-align|box-decoration-break|box-direction|box-flex-group|box-flex|box-lines|box-ordinal-group|box-orient|box-pack|box-shadow|box-sizing|break-after|break-before|break-inside|caption-side|clear|clip|color-profile|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|crop|cue-after|cue-before|cue|cursor|direction|display|dominant-baseline|drop-initial-after-adjust|drop-initial-after-align|drop-initial-before-adjust|drop-initial-before-align|drop-initial-size|drop-initial-value|elevation|empty-cells|fit|fit-position|float-offset|float|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|font|grid-columns|grid-rows|hanging-punctuation|height|hyphenate-after|hyphenate-before|hyphenate-character|hyphenate-lines|hyphenate-resource|hyphens|icon|image-orientation|image-rendering|image-resolution|inline-box-align|left|letter-spacing|line-height|line-stacking-ruby|line-stacking-shift|line-stacking-strategy|line-stacking|list-style-image|list-style-position|list-style-type|list-style|margin-bottom|margin-left|margin-right|margin-top|margin|mark-after|mark-before|mark|marks|marquee-direction|marquee-play-count|marquee-speed|marquee-style|max-height|max-width|min-height|min-width|move-to|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|orphans|outline-color|outline-offset|outline-style|outline-width|outline|overflow-style|overflow-x|overflow-y|overflow|padding-bottom|padding-left|padding-right|padding-top|padding|page-break-after|page-break-before|page-break-inside|page-policy|page|pause-after|pause-before|pause|perspective-origin|perspective|phonemes|pitch-range|pitch|play-during|position|presentation-level|punctuation-trim|quotes|rendering-intent|resize|rest-after|rest-before|rest|richness|right|rotation-point|rotation|ruby-align|ruby-overhang|ruby-position|ruby-span|size|speak-header|speak-numeral|speak-punctuation|speak|speech-rate|stress|string-set|table-layout|target-name|target-new|target-position|target|text-align-last|text-align|text-decoration|text-emphasis|text-height|text-indent|text-justify|text-outline|text-shadow|text-transform|text-wrap|top|transform-origin|transform-style|transform|transition-delay|transition-duration|transition-property|transition-timing-function|transition|unicode-bidi|vertical-align|visibility|voice-balance|voice-duration|voice-family|voice-pitch-range|voice-pitch|voice-rate|voice-stress|voice-volume|volume|white-space-collapse|white-space|widows|width|word-break|word-spacing|word-wrap|z-index", u = t.supportFunction = "rgb|rgba|url|attr|counter|counters", a = t.supportConstant = "absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero", f = t.supportConstantColor = "aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow", l = t.supportConstantFonts = "arial|century|comic|courier|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace", c = t.numRe = "\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))", h = t.pseudoElements = "(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b", p = t.pseudoClasses = "(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b", d = function () {
- var e = this.createKeywordMapper({"support.function": u, "support.constant": a, "support.type": o, "support.constant.color": f, "support.constant.fonts": l}, "text", !0), t = [
- {token: "comment", regex: "\\/\\*", next: "ruleset_comment"},
- {token: "string", regex: '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},
- {token: "string", regex: "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},
- {token: ["constant.numeric", "keyword"], regex: "(" + c + ")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vm|vw|%)"},
- {token: "constant.numeric", regex: c},
- {token: "constant.numeric", regex: "#[a-f0-9]{6}"},
- {token: "constant.numeric", regex: "#[a-f0-9]{3}"},
- {token: ["punctuation", "entity.other.attribute-name.pseudo-element.css"], regex: h},
- {token: ["punctuation", "entity.other.attribute-name.pseudo-class.css"], regex: p},
- {token: e, regex: "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"}
- ], n = i.copyArray(t);
- n.unshift({token: "paren.rparen", regex: "\\}", next: "start"});
- var r = i.copyArray(t);
- r.unshift({token: "paren.rparen", regex: "\\}", next: "media"});
- var s = [
- {token: "comment", regex: ".+"}
- ], d = i.copyArray(s);
- d.unshift({token: "comment", regex: ".*?\\*\\/", next: "start"});
- var v = i.copyArray(s);
- v.unshift({token: "comment", regex: ".*?\\*\\/", next: "media"});
- var m = i.copyArray(s);
- m.unshift({token: "comment", regex: ".*?\\*\\/", next: "ruleset"}), this.$rules = {start: [
- {token: "comment", regex: "\\/\\*", next: "comment"},
- {token: "paren.lparen", regex: "\\{", next: "ruleset"},
- {token: "string", regex: "@.*?{", next: "media"},
- {token: "keyword", regex: "#[a-z0-9-_]+"},
- {token: "variable", regex: "\\.[a-z0-9-_]+"},
- {token: "string", regex: ":[a-z0-9-_]+"},
- {token: "constant", regex: "[a-z0-9-_]+"}
- ], media: [
- {token: "comment", regex: "\\/\\*", next: "media_comment"},
- {token: "paren.lparen", regex: "\\{", next: "media_ruleset"},
- {token: "string", regex: "\\}", next: "start"},
- {token: "keyword", regex: "#[a-z0-9-_]+"},
- {token: "variable", regex: "\\.[a-z0-9-_]+"},
- {token: "string", regex: ":[a-z0-9-_]+"},
- {token: "constant", regex: "[a-z0-9-_]+"}
- ], comment: d, ruleset: n, ruleset_comment: m, media_ruleset: r, media_comment: v}
- };
- r.inherits(d, s), t.CssHighlightRules = d
-}), ace.define("ace/mode/folding/coffee", ["require", "exports", "module", "ace/lib/oop", "ace/mode/folding/fold_mode", "ace/range"], function (e, t, n) {
- var r = e("../../lib/oop"), i = e("./fold_mode").FoldMode, s = e("../../range").Range, o = t.FoldMode = function () {
- };
- r.inherits(o, i), function () {
- this.getFoldWidgetRange = function (e, t, n) {
- var r = this.indentationBlock(e, n);
- if (r)return r;
- var i = /\S/, o = e.getLine(n), u = o.search(i);
- if (u == -1 || o[u] != "#")return;
- var a = o.length, f = e.getLength(), l = n, c = n;
- while (++n < f) {
- o = e.getLine(n);
- var h = o.search(i);
- if (h == -1)continue;
- if (o[h] != "#")break;
- c = n
- }
- if (c > l) {
- var p = e.getLine(c).length;
- return new s(l, a, c, p)
- }
- }, this.getFoldWidget = function (e, t, n) {
- var r = e.getLine(n), i = r.search(/\S/), s = e.getLine(n + 1), o = e.getLine(n - 1), u = o.search(/\S/), a = s.search(/\S/);
- if (i == -1)return e.foldWidgets[n - 1] = u != -1 && u < a ? "start" : "", "";
- if (u == -1) {
- if (i == a && r[i] == "#" && s[i] == "#")return e.foldWidgets[n - 1] = "", e.foldWidgets[n + 1] = "", "start"
- } else if (u == i && r[i] == "#" && o[i] == "#" && e.getLine(n - 2).search(/\S/) == -1)return e.foldWidgets[n - 1] = "start", e.foldWidgets[n + 1] = "", "";
- return u != -1 && u < i ? e.foldWidgets[n - 1] = "start" : e.foldWidgets[n - 1] = "", i < a ? "start" : ""
- }
- }.call(o.prototype)
-})
\ No newline at end of file
diff --git a/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/mode-svg.js b/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/mode-svg.js
deleted file mode 100644
index 6dd6d2b..0000000
--- a/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/mode-svg.js
+++ /dev/null
@@ -1,496 +0,0 @@
-ace.define("ace/mode/svg", ["require", "exports", "module", "ace/lib/oop", "ace/mode/xml", "ace/mode/javascript", "ace/tokenizer", "ace/mode/svg_highlight_rules", "ace/mode/folding/mixed", "ace/mode/folding/xml", "ace/mode/folding/cstyle"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("./xml").Mode, s = e("./javascript").Mode, o = e("../tokenizer").Tokenizer, u = e("./svg_highlight_rules").SvgHighlightRules, a = e("./folding/mixed").FoldMode, f = e("./folding/xml").FoldMode, l = e("./folding/cstyle").FoldMode, c = function () {
- i.call(this), this.highlighter = new u, this.$tokenizer = new o(this.highlighter.getRules()), this.$embeds = this.highlighter.getEmbeds(), this.createModeDelegates({"js-": s}), this.foldingRules = new a(new f({}), {"js-": new l})
- };
- r.inherits(c, i), function () {
- this.getNextLineIndent = function (e, t, n) {
- return this.$getIndent(t)
- }
- }.call(c.prototype), t.Mode = c
-}), ace.define("ace/mode/xml", ["require", "exports", "module", "ace/lib/oop", "ace/mode/text", "ace/tokenizer", "ace/mode/xml_highlight_rules", "ace/mode/behaviour/xml", "ace/mode/folding/xml"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("./text").Mode, s = e("../tokenizer").Tokenizer, o = e("./xml_highlight_rules").XmlHighlightRules, u = e("./behaviour/xml").XmlBehaviour, a = e("./folding/xml").FoldMode, f = function () {
- this.$tokenizer = new s((new o).getRules()), this.$behaviour = new u, this.foldingRules = new a
- };
- r.inherits(f, i), function () {
- this.getNextLineIndent = function (e, t, n) {
- return this.$getIndent(t)
- }
- }.call(f.prototype), t.Mode = f
-}), ace.define("ace/mode/xml_highlight_rules", ["require", "exports", "module", "ace/lib/oop", "ace/mode/xml_util", "ace/mode/text_highlight_rules"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("./xml_util"), s = e("./text_highlight_rules").TextHighlightRules, o = function () {
- this.$rules = {start: [
- {token: "text", regex: "<\\!\\[CDATA\\[", next: "cdata"},
- {token: "xml-pe", regex: "<\\?.*?\\?>"},
- {token: "comment", regex: "<\\!--", next: "comment"},
- {token: "xml-pe", regex: "<\\!.*?>"},
- {token: "meta.tag", regex: "<\\/?", next: "tag"},
- {token: "text", regex: "\\s+"},
- {token: "constant.character.entity", regex: "(?:[0-9]+;)|(?:[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}
- ], cdata: [
- {token: "text", regex: "\\]\\]>", next: "start"},
- {token: "text", regex: "\\s+"},
- {token: "text", regex: "(?:[^\\]]|\\](?!\\]>))+"}
- ], comment: [
- {token: "comment", regex: ".*?-->", next: "start"},
- {token: "comment", regex: ".+"}
- ]}, i.tag(this.$rules, "tag", "start")
- };
- r.inherits(o, s), t.XmlHighlightRules = o
-}), ace.define("ace/mode/xml_util", ["require", "exports", "module"], function (e, t, n) {
- function r(e) {
- return[
- {token: "string", regex: '"', next: e + "_qqstring"},
- {token: "string", regex: "'", next: e + "_qstring"}
- ]
- }
-
- function i(e, t) {
- return[
- {token: "string", regex: e, next: t},
- {token: "constant.language.escape", regex: "(?:[0-9]+;)|(?:[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"},
- {defaultToken: "string"}
- ]
- }
-
- t.tag = function (e, t, n, s) {
- e[t] = [
- {token: "text", regex: "\\s+"},
- {token: s ? function (e) {
- return s[e] ? "meta.tag.tag-name." + s[e] : "meta.tag.tag-name"
- } : "meta.tag.tag-name", regex: "[-_a-zA-Z0-9:]+", next: t + "_embed_attribute_list"},
- {token: "empty", regex: "", next: t + "_embed_attribute_list"}
- ], e[t + "_qstring"] = i("'", t + "_embed_attribute_list"), e[t + "_qqstring"] = i('"', t + "_embed_attribute_list"), e[t + "_embed_attribute_list"] = [
- {token: "meta.tag.r", regex: "/?>", next: n},
- {token: "keyword.operator", regex: "="},
- {token: "entity.other.attribute-name", regex: "[-_a-zA-Z0-9:]+"},
- {token: "constant.numeric", regex: "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},
- {token: "text", regex: "\\s+"}
- ].concat(r(t))
- }
-}), ace.define("ace/mode/behaviour/xml", ["require", "exports", "module", "ace/lib/oop", "ace/mode/behaviour", "ace/mode/behaviour/cstyle", "ace/token_iterator"], function (e, t, n) {
- function u(e, t) {
- var n = !0, r = e.type.split("."), i = t.split(".");
- return i.forEach(function (e) {
- if (r.indexOf(e) == -1)return n = !1, !1
- }), n
- }
-
- var r = e("../../lib/oop"), i = e("../behaviour").Behaviour, s = e("./cstyle").CstyleBehaviour, o = e("../../token_iterator").TokenIterator, a = function () {
- this.inherit(s, ["string_dquotes"]), this.add("autoclosing", "insertion", function (e, t, n, r, i) {
- if (i == ">") {
- var s = n.getCursorPosition(), a = new o(r, s.row, s.column), f = a.getCurrentToken(), l = !1;
- if (!f || !u(f, "meta.tag") && (!u(f, "text") || !f.value.match("/"))) {
- do f = a.stepBackward(); while (f && (u(f, "string") || u(f, "keyword.operator") || u(f, "entity.attribute-name") || u(f, "text")))
- } else l = !0;
- if (!f || !u(f, "meta.tag-name") || a.stepBackward().value.match("/"))return;
- var c = f.value;
- if (l)var c = c.substring(0, s.column - f.start);
- return{text: ">" + c + ">", selection: [1, 1]}
- }
- }), this.add("autoindent", "insertion", function (e, t, n, r, i) {
- if (i == "\n") {
- var s = n.getCursorPosition(), o = r.doc.getLine(s.row), u = o.substring(s.column, s.column + 2);
- if (u == "") {
- var a = this.$getIndent(r.doc.getLine(s.row)) + r.getTabString(), f = this.$getIndent(r.doc.getLine(s.row));
- return{text: "\n" + a + "\n" + f, selection: [1, a.length, 1, a.length]}
- }
- }
- })
- };
- r.inherits(a, i), t.XmlBehaviour = a
-}), ace.define("ace/mode/behaviour/cstyle", ["require", "exports", "module", "ace/lib/oop", "ace/mode/behaviour", "ace/token_iterator", "ace/lib/lang"], function (e, t, n) {
- var r = e("../../lib/oop"), i = e("../behaviour").Behaviour, s = e("../../token_iterator").TokenIterator, o = e("../../lib/lang"), u = ["text", "paren.rparen", "punctuation.operator"], a = ["text", "paren.rparen", "punctuation.operator", "comment"], f = 0, l = -1, c = "", h = 0, p = -1, d = "", v = "", m = function () {
- m.isSaneInsertion = function (e, t) {
- var n = e.getCursorPosition(), r = new s(t, n.row, n.column);
- if (!this.$matchTokenType(r.getCurrentToken() || "text", u)) {
- var i = new s(t, n.row, n.column + 1);
- if (!this.$matchTokenType(i.getCurrentToken() || "text", u))return!1
- }
- return r.stepForward(), r.getCurrentTokenRow() !== n.row || this.$matchTokenType(r.getCurrentToken() || "text", a)
- }, m.$matchTokenType = function (e, t) {
- return t.indexOf(e.type || e) > -1
- }, m.recordAutoInsert = function (e, t, n) {
- var r = e.getCursorPosition(), i = t.doc.getLine(r.row);
- this.isAutoInsertedClosing(r, i, c[0]) || (f = 0), l = r.row, c = n + i.substr(r.column), f++
- }, m.recordMaybeInsert = function (e, t, n) {
- var r = e.getCursorPosition(), i = t.doc.getLine(r.row);
- this.isMaybeInsertedClosing(r, i) || (h = 0), p = r.row, d = i.substr(0, r.column) + n, v = i.substr(r.column), h++
- }, m.isAutoInsertedClosing = function (e, t, n) {
- return f > 0 && e.row === l && n === c[0] && t.substr(e.column) === c
- }, m.isMaybeInsertedClosing = function (e, t) {
- return h > 0 && e.row === p && t.substr(e.column) === v && t.substr(0, e.column) == d
- }, m.popAutoInsertedClosing = function () {
- c = c.substr(1), f--
- }, m.clearMaybeInsertedClosing = function () {
- h = 0, p = -1
- }, this.add("braces", "insertion", function (e, t, n, r, i) {
- var s = n.getCursorPosition(), u = r.doc.getLine(s.row);
- if (i == "{") {
- var a = n.getSelectionRange(), f = r.doc.getTextRange(a);
- if (f !== "" && f !== "{" && n.getWrapBehavioursEnabled())return{text: "{" + f + "}", selection: !1};
- if (m.isSaneInsertion(n, r))return/[\]\}\)]/.test(u[s.column]) ? (m.recordAutoInsert(n, r, "}"), {text: "{}", selection: [1, 1]}) : (m.recordMaybeInsert(n, r, "{"), {text: "{", selection: [1, 1]})
- } else if (i == "}") {
- var l = u.substring(s.column, s.column + 1);
- if (l == "}") {
- var c = r.$findOpeningBracket("}", {column: s.column + 1, row: s.row});
- if (c !== null && m.isAutoInsertedClosing(s, u, i))return m.popAutoInsertedClosing(), {text: "", selection: [1, 1]}
- }
- } else if (i == "\n" || i == "\r\n") {
- var p = "";
- m.isMaybeInsertedClosing(s, u) && (p = o.stringRepeat("}", h), m.clearMaybeInsertedClosing());
- var l = u.substring(s.column, s.column + 1);
- if (l == "}" || p !== "") {
- var d = r.findMatchingBracket({row: s.row, column: s.column}, "}");
- if (!d)return null;
- var v = this.getNextLineIndent(e, u.substring(0, s.column), r.getTabString()), g = this.$getIndent(u);
- return{text: "\n" + v + "\n" + g + p, selection: [1, v.length, 1, v.length]}
- }
- }
- }), this.add("braces", "deletion", function (e, t, n, r, i) {
- var s = r.doc.getTextRange(i);
- if (!i.isMultiLine() && s == "{") {
- var o = r.doc.getLine(i.start.row), u = o.substring(i.end.column, i.end.column + 1);
- if (u == "}")return i.end.column++, i;
- h--
- }
- }), this.add("parens", "insertion", function (e, t, n, r, i) {
- if (i == "(") {
- var s = n.getSelectionRange(), o = r.doc.getTextRange(s);
- if (o !== "" && n.getWrapBehavioursEnabled())return{text: "(" + o + ")", selection: !1};
- if (m.isSaneInsertion(n, r))return m.recordAutoInsert(n, r, ")"), {text: "()", selection: [1, 1]}
- } else if (i == ")") {
- var u = n.getCursorPosition(), a = r.doc.getLine(u.row), f = a.substring(u.column, u.column + 1);
- if (f == ")") {
- var l = r.$findOpeningBracket(")", {column: u.column + 1, row: u.row});
- if (l !== null && m.isAutoInsertedClosing(u, a, i))return m.popAutoInsertedClosing(), {text: "", selection: [1, 1]}
- }
- }
- }), this.add("parens", "deletion", function (e, t, n, r, i) {
- var s = r.doc.getTextRange(i);
- if (!i.isMultiLine() && s == "(") {
- var o = r.doc.getLine(i.start.row), u = o.substring(i.start.column + 1, i.start.column + 2);
- if (u == ")")return i.end.column++, i
- }
- }), this.add("brackets", "insertion", function (e, t, n, r, i) {
- if (i == "[") {
- var s = n.getSelectionRange(), o = r.doc.getTextRange(s);
- if (o !== "" && n.getWrapBehavioursEnabled())return{text: "[" + o + "]", selection: !1};
- if (m.isSaneInsertion(n, r))return m.recordAutoInsert(n, r, "]"), {text: "[]", selection: [1, 1]}
- } else if (i == "]") {
- var u = n.getCursorPosition(), a = r.doc.getLine(u.row), f = a.substring(u.column, u.column + 1);
- if (f == "]") {
- var l = r.$findOpeningBracket("]", {column: u.column + 1, row: u.row});
- if (l !== null && m.isAutoInsertedClosing(u, a, i))return m.popAutoInsertedClosing(), {text: "", selection: [1, 1]}
- }
- }
- }), this.add("brackets", "deletion", function (e, t, n, r, i) {
- var s = r.doc.getTextRange(i);
- if (!i.isMultiLine() && s == "[") {
- var o = r.doc.getLine(i.start.row), u = o.substring(i.start.column + 1, i.start.column + 2);
- if (u == "]")return i.end.column++, i
- }
- }), this.add("string_dquotes", "insertion", function (e, t, n, r, i) {
- if (i == '"' || i == "'") {
- var s = i, o = n.getSelectionRange(), u = r.doc.getTextRange(o);
- if (u !== "" && u !== "'" && u != '"' && n.getWrapBehavioursEnabled())return{text: s + u + s, selection: !1};
- var a = n.getCursorPosition(), f = r.doc.getLine(a.row), l = f.substring(a.column - 1, a.column);
- if (l == "\\")return null;
- var c = r.getTokens(o.start.row), h = 0, p, d = -1;
- for (var v = 0; v < c.length; v++) {
- p = c[v], p.type == "string" ? d = -1 : d < 0 && (d = p.value.indexOf(s));
- if (p.value.length + h > o.start.column)break;
- h += c[v].value.length
- }
- if (!p || d < 0 && p.type !== "comment" && (p.type !== "string" || o.start.column !== p.value.length + h - 1 && p.value.lastIndexOf(s) === p.value.length - 1)) {
- if (!m.isSaneInsertion(n, r))return;
- return{text: s + s, selection: [1, 1]}
- }
- if (p && p.type === "string") {
- var g = f.substring(a.column, a.column + 1);
- if (g == s)return{text: "", selection: [1, 1]}
- }
- }
- }), this.add("string_dquotes", "deletion", function (e, t, n, r, i) {
- var s = r.doc.getTextRange(i);
- if (!i.isMultiLine() && (s == '"' || s == "'")) {
- var o = r.doc.getLine(i.start.row), u = o.substring(i.start.column + 1, i.start.column + 2);
- if (u == s)return i.end.column++, i
- }
- })
- };
- r.inherits(m, i), t.CstyleBehaviour = m
-}), ace.define("ace/mode/folding/xml", ["require", "exports", "module", "ace/lib/oop", "ace/lib/lang", "ace/range", "ace/mode/folding/fold_mode", "ace/token_iterator"], function (e, t, n) {
- var r = e("../../lib/oop"), i = e("../../lib/lang"), s = e("../../range").Range, o = e("./fold_mode").FoldMode, u = e("../../token_iterator").TokenIterator, a = t.FoldMode = function (e) {
- o.call(this), this.voidElements = e || {}
- };
- r.inherits(a, o), function () {
- this.getFoldWidget = function (e, t, n) {
- var r = this._getFirstTagInLine(e, n);
- return r.closing ? t == "markbeginend" ? "end" : "" : !r.tagName || this.voidElements[r.tagName.toLowerCase()] ? "" : r.selfClosing ? "" : r.value.indexOf("/" + r.tagName) !== -1 ? "" : "start"
- }, this._getFirstTagInLine = function (e, t) {
- var n = e.getTokens(t), r = "";
- for (var s = 0; s < n.length; s++) {
- var o = n[s];
- o.type.indexOf("meta.tag") === 0 ? r += o.value : r += i.stringRepeat(" ", o.value.length)
- }
- return this._parseTag(r)
- }, this.tagRe = /^(\s*)((\/?)([-_a-zA-Z0-9:!]*)\s*(\/?)>?)/, this._parseTag = function (e) {
- var t = this.tagRe.exec(e), n = this.tagRe.lastIndex || 0;
- return this.tagRe.lastIndex = 0, {value: e, match: t ? t[2] : "", closing: t ? !!t[3] : !1, selfClosing: t ? !!t[5] || t[2] == "/>" : !1, tagName: t ? t[4] : "", column: t[1] ? n + t[1].length : n}
- }, this._readTagForward = function (e) {
- var t = e.getCurrentToken();
- if (!t)return null;
- var n = "", r;
- do if (t.type.indexOf("meta.tag") === 0) {
- if (!r)var r = {row: e.getCurrentTokenRow(), column: e.getCurrentTokenColumn()};
- n += t.value;
- if (n.indexOf(">") !== -1) {
- var i = this._parseTag(n);
- return i.start = r, i.end = {row: e.getCurrentTokenRow(), column: e.getCurrentTokenColumn() + t.value.length}, e.stepForward(), i
- }
- } while (t = e.stepForward());
- return null
- }, this._readTagBackward = function (e) {
- var t = e.getCurrentToken();
- if (!t)return null;
- var n = "", r;
- do if (t.type.indexOf("meta.tag") === 0) {
- r || (r = {row: e.getCurrentTokenRow(), column: e.getCurrentTokenColumn() + t.value.length}), n = t.value + n;
- if (n.indexOf("<") !== -1) {
- var i = this._parseTag(n);
- return i.end = r, i.start = {row: e.getCurrentTokenRow(), column: e.getCurrentTokenColumn()}, e.stepBackward(), i
- }
- } while (t = e.stepBackward());
- return null
- }, this._pop = function (e, t) {
- while (e.length) {
- var n = e[e.length - 1];
- if (!t || n.tagName == t.tagName)return e.pop();
- if (this.voidElements[t.tagName])return;
- if (this.voidElements[n.tagName]) {
- e.pop();
- continue
- }
- return null
- }
- }, this.getFoldWidgetRange = function (e, t, n) {
- var r = this._getFirstTagInLine(e, n);
- if (!r.match)return null;
- var i = r.closing || r.selfClosing, o = [], a;
- if (!i) {
- var f = new u(e, n, r.column), l = {row: n, column: r.column + r.tagName.length + 2};
- while (a = this._readTagForward(f)) {
- if (a.selfClosing) {
- if (!o.length)return a.start.column += a.tagName.length + 2, a.end.column -= 2, s.fromPoints(a.start, a.end);
- continue
- }
- if (a.closing) {
- this._pop(o, a);
- if (o.length == 0)return s.fromPoints(l, a.start)
- } else o.push(a)
- }
- } else {
- var f = new u(e, n, r.column + r.match.length), c = {row: n, column: r.column};
- while (a = this._readTagBackward(f)) {
- if (a.selfClosing) {
- if (!o.length)return a.start.column += a.tagName.length + 2, a.end.column -= 2, s.fromPoints(a.start, a.end);
- continue
- }
- if (!a.closing) {
- this._pop(o, a);
- if (o.length == 0)return a.start.column += a.tagName.length + 2, s.fromPoints(a.start, c)
- } else o.push(a)
- }
- }
- }
- }.call(a.prototype)
-}), ace.define("ace/mode/javascript", ["require", "exports", "module", "ace/lib/oop", "ace/mode/text", "ace/tokenizer", "ace/mode/javascript_highlight_rules", "ace/mode/matching_brace_outdent", "ace/range", "ace/worker/worker_client", "ace/mode/behaviour/cstyle", "ace/mode/folding/cstyle"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("./text").Mode, s = e("../tokenizer").Tokenizer, o = e("./javascript_highlight_rules").JavaScriptHighlightRules, u = e("./matching_brace_outdent").MatchingBraceOutdent, a = e("../range").Range, f = e("../worker/worker_client").WorkerClient, l = e("./behaviour/cstyle").CstyleBehaviour, c = e("./folding/cstyle").FoldMode, h = function () {
- this.$tokenizer = new s((new o).getRules()), this.$outdent = new u, this.$behaviour = new l, this.foldingRules = new c
- };
- r.inherits(h, i), function () {
- this.toggleCommentLines = function (e, t, n, r) {
- var i = !0, s = /^(\s*)\/\//;
- for (var o = n; o <= r; o++)if (!s.test(t.getLine(o))) {
- i = !1;
- break
- }
- if (i) {
- var u = new a(0, 0, 0, 0);
- for (var o = n; o <= r; o++) {
- var f = t.getLine(o), l = f.match(s);
- u.start.row = o, u.end.row = o, u.end.column = l[0].length, t.replace(u, l[1])
- }
- } else t.indentRows(n, r, "//")
- }, this.getNextLineIndent = function (e, t, n) {
- var r = this.$getIndent(t), i = this.$tokenizer.getLineTokens(t, e), s = i.tokens, o = i.state;
- if (s.length && s[s.length - 1].type == "comment")return r;
- if (e == "start" || e == "regex_allowed") {
- var u = t.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/);
- u && (r += n)
- } else if (e == "doc-start") {
- if (o == "start" || e == "regex_allowed")return"";
- var u = t.match(/^\s*(\/?)\*/);
- u && (u[1] && (r += " "), r += "* ")
- }
- return r
- }, this.checkOutdent = function (e, t, n) {
- return this.$outdent.checkOutdent(t, n)
- }, this.autoOutdent = function (e, t, n) {
- this.$outdent.autoOutdent(t, n)
- }, this.createWorker = function (e) {
- var t = new f(["ace"], "ace/mode/javascript_worker", "JavaScriptWorker");
- return t.attachToDocument(e.getDocument()), t.on("jslint", function (t) {
- e.setAnnotations(t.data)
- }), t.on("terminate", function () {
- e.clearAnnotations()
- }), t
- }
- }.call(h.prototype), t.Mode = h
-}), ace.define("ace/mode/javascript_highlight_rules", ["require", "exports", "module", "ace/lib/oop", "ace/mode/doc_comment_highlight_rules", "ace/mode/text_highlight_rules"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("./doc_comment_highlight_rules").DocCommentHighlightRules, s = e("./text_highlight_rules").TextHighlightRules, o = function () {
- var e = this.createKeywordMapper({"variable.language": "Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document", keyword: "const|yield|import|get|set|break|case|catch|continue|default|delete|do|else|finally|for|function|if|in|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|__parent__|__count__|escape|unescape|with|__proto__|class|enum|extends|super|export|implements|private|public|interface|package|protected|static", "storage.type": "const|let|var|function", "constant.language": "null|Infinity|NaN|undefined", "support.function": "alert", "constant.language.boolean": "true|false"}, "identifier"), t = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void", n = "[a-zA-Z\\$_¡-￿][a-zA-Z\\d\\$_¡-￿]*\\b", r = "\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|[0-2][0-7]{0,2}|3[0-6][0-7]?|37[0-7]?|[4-7][0-7]?|.)";
- this.$rules = {start: [
- {token: "comment", regex: /\/\/.*$/},
- i.getStartRule("doc-start"),
- {token: "comment", regex: /\/\*/, next: "comment"},
- {token: "string", regex: "'(?=.)", next: "qstring"},
- {token: "string", regex: '"(?=.)', next: "qqstring"},
- {token: "constant.numeric", regex: /0[xX][0-9a-fA-F]+\b/},
- {token: "constant.numeric", regex: /[+-]?\d+(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?\b/},
- {token: ["storage.type", "punctuation.operator", "support.function", "punctuation.operator", "entity.name.function", "text", "keyword.operator"], regex: "(" + n + ")(\\.)(prototype)(\\.)(" + n + ")(\\s*)(=)", next: "function_arguments"},
- {token: ["storage.type", "punctuation.operator", "entity.name.function", "text", "keyword.operator", "text", "storage.type", "text", "paren.lparen"], regex: "(" + n + ")(\\.)(" + n + ")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", next: "function_arguments"},
- {token: ["entity.name.function", "text", "keyword.operator", "text", "storage.type", "text", "paren.lparen"], regex: "(" + n + ")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", next: "function_arguments"},
- {token: ["storage.type", "punctuation.operator", "entity.name.function", "text", "keyword.operator", "text", "storage.type", "text", "entity.name.function", "text", "paren.lparen"], regex: "(" + n + ")(\\.)(" + n + ")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()", next: "function_arguments"},
- {token: ["storage.type", "text", "entity.name.function", "text", "paren.lparen"], regex: "(function)(\\s+)(" + n + ")(\\s*)(\\()", next: "function_arguments"},
- {token: ["entity.name.function", "text", "punctuation.operator", "text", "storage.type", "text", "paren.lparen"], regex: "(" + n + ")(\\s*)(:)(\\s*)(function)(\\s*)(\\()", next: "function_arguments"},
- {token: ["text", "text", "storage.type", "text", "paren.lparen"], regex: "(:)(\\s*)(function)(\\s*)(\\()", next: "function_arguments"},
- {token: "keyword", regex: "(?:" + t + ")\\b", next: "regex_allowed"},
- {token: ["punctuation.operator", "support.function"], regex: /(\.)(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:opzzzz|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/},
- {token: ["punctuation.operator", "support.function.dom"], regex: /(\.)(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/},
- {token: ["punctuation.operator", "support.constant"], regex: /(\.)(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/},
- {token: ["storage.type", "punctuation.operator", "support.function.firebug"], regex: /(console)(\.)(warn|info|log|error|time|timeEnd|assert)\b/},
- {token: e, regex: n},
- {token: "keyword.operator", regex: /--|\+\+|[!$%&*+\-~]|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|\*=|%=|\+=|\-=|&=|\^=/, next: "regex_allowed"},
- {token: "punctuation.operator", regex: /\?|\:|\,|\;|\./, next: "regex_allowed"},
- {token: "paren.lparen", regex: /[\[({]/, next: "regex_allowed"},
- {token: "paren.rparen", regex: /[\])}]/},
- {token: "keyword.operator", regex: /\/=?/, next: "regex_allowed"},
- {token: "comment", regex: /^#!.*$/}
- ], regex_allowed: [i.getStartRule("doc-start"), {token: "comment", regex: "\\/\\*", next: "comment_regex_allowed"}, {token: "comment", regex: "\\/\\/.*$"}, {token: "string.regexp", regex: "\\/", next: "regex"}, {token: "text", regex: "\\s+"}, {token: "empty", regex: "", next: "start"}], regex: [
- {token: "regexp.keyword.operator", regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},
- {token: "string.regexp", regex: "/\\w*", next: "start"},
- {token: "invalid", regex: /\{\d+,?(?:\d+)?}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/},
- {token: "constant.language.escape", regex: /\(\?[:=!]|\)|{\d+,?(?:\d+)?}|{,\d+}|[+*]\?|[()$^+*?]/},
- {token: "constant.language.delimiter", regex: /\|/},
- {token: "constant.language.escape", regex: /\[\^?/, next: "regex_character_class"},
- {token: "empty", regex: "$", next: "start"},
- {defaultToken: "string.regexp"}
- ], regex_character_class: [
- {token: "regexp.keyword.operator", regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},
- {token: "constant.language.escape", regex: "]", next: "regex"},
- {token: "constant.language.escape", regex: "-"},
- {token: "empty", regex: "$", next: "start"},
- {defaultToken: "string.regexp.charachterclass"}
- ], function_arguments: [
- {token: "variable.parameter", regex: n},
- {token: "punctuation.operator", regex: "[, ]+"},
- {token: "punctuation.operator", regex: "$"},
- {token: "empty", regex: "", next: "start"}
- ], comment_regex_allowed: [
- {token: "comment", regex: "\\*\\/", next: "regex_allowed"},
- {defaultToken: "comment"}
- ], comment: [
- {token: "comment", regex: "\\*\\/", next: "start"},
- {defaultToken: "comment"}
- ], qqstring: [
- {token: "constant.language.escape", regex: r},
- {token: "string", regex: "\\\\$", next: "qqstring"},
- {token: "string", regex: '"|$', next: "start"},
- {defaultToken: "string"}
- ], qstring: [
- {token: "constant.language.escape", regex: r},
- {token: "string", regex: "\\\\$", next: "qstring"},
- {token: "string", regex: "'|$", next: "start"},
- {defaultToken: "string"}
- ]}, this.embedRules(i, "doc-", [i.getEndRule("start")])
- };
- r.inherits(o, s), t.JavaScriptHighlightRules = o
-}), ace.define("ace/mode/doc_comment_highlight_rules", ["require", "exports", "module", "ace/lib/oop", "ace/mode/text_highlight_rules"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("./text_highlight_rules").TextHighlightRules, s = function () {
- this.$rules = {start: [
- {token: "comment.doc.tag", regex: "@[\\w\\d_]+"},
- {token: "comment.doc.tag", regex: "\\bTODO\\b"},
- {defaultToken: "comment.doc"}
- ]}
- };
- r.inherits(s, i), s.getStartRule = function (e) {
- return{token: "comment.doc", regex: "\\/\\*(?=\\*)", next: e}
- }, s.getEndRule = function (e) {
- return{token: "comment.doc", regex: "\\*\\/", next: e}
- }, t.DocCommentHighlightRules = s
-}), ace.define("ace/mode/matching_brace_outdent", ["require", "exports", "module", "ace/range"], function (e, t, n) {
- var r = e("../range").Range, i = function () {
- };
- (function () {
- this.checkOutdent = function (e, t) {
- return/^\s+$/.test(e) ? /^\s*\}/.test(t) : !1
- }, this.autoOutdent = function (e, t) {
- var n = e.getLine(t), i = n.match(/^(\s*\})/);
- if (!i)return 0;
- var s = i[1].length, o = e.findMatchingBracket({row: t, column: s});
- if (!o || o.row == t)return 0;
- var u = this.$getIndent(e.getLine(o.row));
- e.replace(new r(t, 0, t, s - 1), u)
- }, this.$getIndent = function (e) {
- var t = e.match(/^(\s+)/);
- return t ? t[1] : ""
- }
- }).call(i.prototype), t.MatchingBraceOutdent = i
-}), ace.define("ace/mode/folding/cstyle", ["require", "exports", "module", "ace/lib/oop", "ace/range", "ace/mode/folding/fold_mode"], function (e, t, n) {
- var r = e("../../lib/oop"), i = e("../../range").Range, s = e("./fold_mode").FoldMode, o = t.FoldMode = function () {
- };
- r.inherits(o, s), function () {
- this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/, this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/, this.getFoldWidgetRange = function (e, t, n) {
- var r = e.getLine(n), i = r.match(this.foldingStartMarker);
- if (i) {
- var s = i.index;
- return i[1] ? this.openingBracketBlock(e, i[1], n, s) : e.getCommentFoldRange(n, s + i[0].length, 1)
- }
- if (t !== "markbeginend")return;
- var i = r.match(this.foldingStopMarker);
- if (i) {
- var s = i.index + i[0].length;
- return i[1] ? this.closingBracketBlock(e, i[1], n, s) : e.getCommentFoldRange(n, s, -1)
- }
- }
- }.call(o.prototype)
-}), ace.define("ace/mode/svg_highlight_rules", ["require", "exports", "module", "ace/lib/oop", "ace/mode/javascript_highlight_rules", "ace/mode/xml_highlight_rules", "ace/mode/xml_util"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("./javascript_highlight_rules").JavaScriptHighlightRules, s = e("./xml_highlight_rules").XmlHighlightRules, o = e("./xml_util"), u = function () {
- s.call(this), this.$rules.start.splice(3, 0, {token: "meta.tag", regex: "<(?=script)", next: "script"}), o.tag(this.$rules, "script", "js-start"), this.embedRules(i, "js-", [
- {token: "comment", regex: "\\/\\/.*(?=<\\/script>)", next: "tag"},
- {token: "meta.tag", regex: "<\\/(?=script)", next: "tag"}
- ])
- };
- r.inherits(u, s), t.SvgHighlightRules = u
-}), ace.define("ace/mode/folding/mixed", ["require", "exports", "module", "ace/lib/oop", "ace/mode/folding/fold_mode"], function (e, t, n) {
- var r = e("../../lib/oop"), i = e("./fold_mode").FoldMode, s = t.FoldMode = function (e, t) {
- this.defaultMode = e, this.subModes = t
- };
- r.inherits(s, i), function () {
- this.$getMode = function (e) {
- for (var t in this.subModes)if (e.indexOf(t) === 0)return this.subModes[t];
- return null
- }, this.$tryMode = function (e, t, n, r) {
- var i = this.$getMode(e);
- return i ? i.getFoldWidget(t, n, r) : ""
- }, this.getFoldWidget = function (e, t, n) {
- return this.$tryMode(e.getState(n - 1), e, t, n) || this.$tryMode(e.getState(n), e, t, n) || this.defaultMode.getFoldWidget(e, t, n)
- }, this.getFoldWidgetRange = function (e, t, n) {
- var r = this.$getMode(e.getState(n - 1));
- if (!r || !r.getFoldWidget(e, t, n))r = this.$getMode(e.getState(n));
- if (!r || !r.getFoldWidget(e, t, n))r = this.defaultMode;
- return r.getFoldWidgetRange(e, t, n)
- }
- }.call(s.prototype)
-})
\ No newline at end of file
diff --git a/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/mode-tcl.js b/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/mode-tcl.js
deleted file mode 100644
index dfd180c..0000000
--- a/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/mode-tcl.js
+++ /dev/null
@@ -1,112 +0,0 @@
-ace.define("ace/mode/tcl", ["require", "exports", "module", "ace/lib/oop", "ace/mode/text", "ace/tokenizer", "ace/mode/folding/cstyle", "ace/mode/tcl_highlight_rules", "ace/mode/matching_brace_outdent", "ace/range"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("./text").Mode, s = e("../tokenizer").Tokenizer, o = e("./folding/cstyle").FoldMode, u = e("./tcl_highlight_rules").TclHighlightRules, a = e("./matching_brace_outdent").MatchingBraceOutdent, f = e("../range").Range, l = function () {
- this.$tokenizer = new s((new u).getRules()), this.$outdent = new a, this.foldingRules = new o
- };
- r.inherits(l, i), function () {
- this.toggleCommentLines = function (e, t, n, r) {
- var i = !0, s = /^(\s*)#/;
- for (var o = n; o <= r; o++)if (!s.test(t.getLine(o))) {
- i = !1;
- break
- }
- if (i) {
- var u = new f(0, 0, 0, 0);
- for (var o = n; o <= r; o++) {
- var a = t.getLine(o), l = a.match(s);
- u.start.row = o, u.end.row = o, u.end.column = l[0].length, t.replace(u, l[1])
- }
- } else t.indentRows(n, r, "#")
- }, this.getNextLineIndent = function (e, t, n) {
- var r = this.$getIndent(t), i = this.$tokenizer.getLineTokens(t, e), s = i.tokens;
- if (s.length && s[s.length - 1].type == "comment")return r;
- if (e == "start") {
- var o = t.match(/^.*[\{\(\[]\s*$/);
- o && (r += n)
- }
- return r
- }, this.checkOutdent = function (e, t, n) {
- return this.$outdent.checkOutdent(t, n)
- }, this.autoOutdent = function (e, t, n) {
- this.$outdent.autoOutdent(t, n)
- }
- }.call(l.prototype), t.Mode = l
-}), ace.define("ace/mode/folding/cstyle", ["require", "exports", "module", "ace/lib/oop", "ace/range", "ace/mode/folding/fold_mode"], function (e, t, n) {
- var r = e("../../lib/oop"), i = e("../../range").Range, s = e("./fold_mode").FoldMode, o = t.FoldMode = function () {
- };
- r.inherits(o, s), function () {
- this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/, this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/, this.getFoldWidgetRange = function (e, t, n) {
- var r = e.getLine(n), i = r.match(this.foldingStartMarker);
- if (i) {
- var s = i.index;
- return i[1] ? this.openingBracketBlock(e, i[1], n, s) : e.getCommentFoldRange(n, s + i[0].length, 1)
- }
- if (t !== "markbeginend")return;
- var i = r.match(this.foldingStopMarker);
- if (i) {
- var s = i.index + i[0].length;
- return i[1] ? this.closingBracketBlock(e, i[1], n, s) : e.getCommentFoldRange(n, s, -1)
- }
- }
- }.call(o.prototype)
-}), ace.define("ace/mode/tcl_highlight_rules", ["require", "exports", "module", "ace/lib/oop", "ace/mode/text_highlight_rules"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("./text_highlight_rules").TextHighlightRules, s = function () {
- this.$rules = {start: [
- {token: "comment", regex: "#.*\\\\$", next: "commentfollow"},
- {token: "comment", regex: "#.*$"},
- {token: "support.function", regex: "[\\\\]$", next: "splitlineStart"},
- {token: "text", regex: '[\\\\](?:["]|[{]|[}]|[[]|[]]|[$]|[])'},
- {token: "text", regex: "^|[^{][;][^}]|[/\r/]", next: "commandItem"},
- {token: "string", regex: '[ ]*["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},
- {token: "string", regex: '[ ]*["]', next: "qqstring"},
- {token: "variable.instance", regex: "[$]", next: "variable"},
- {token: "support.function", regex: "!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|{\\*}|;|::"},
- {token: "identifier", regex: "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},
- {token: "paren.lparen", regex: "[[{]", next: "commandItem"},
- {token: "paren.lparen", regex: "[(]"},
- {token: "paren.rparen", regex: "[\\])}]"},
- {token: "text", regex: "\\s+"}
- ], commandItem: [
- {token: "comment", regex: "#.*\\\\$", next: "commentfollow"},
- {token: "comment", regex: "#.*$", next: "start"},
- {token: "string", regex: '[ ]*["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},
- {token: "variable.instance", regex: "[$]", next: "variable"},
- {token: "support.function", regex: "(?:[:][:])[a-zA-Z0-9_/]+(?:[:][:])", next: "commandItem"},
- {token: "support.function", regex: "[a-zA-Z0-9_/]+(?:[:][:])", next: "commandItem"},
- {token: "support.function", regex: "(?:[:][:])", next: "commandItem"},
- {token: "paren.rparen", regex: "[\\])}]"},
- {token: "support.function", regex: "!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|{\\*}|;|::"},
- {token: "keyword", regex: "[a-zA-Z0-9_/]+", next: "start"}
- ], commentfollow: [
- {token: "comment", regex: ".*\\\\$", next: "commentfollow"},
- {token: "comment", regex: ".+", next: "start"}
- ], splitlineStart: [
- {token: "text", regex: "^.", next: "start"}
- ], variable: [
- {token: "variable.instance", regex: "(?:[:][:])?[a-zA-Z_\\d]+(?:(?:[:][:])?[a-zA-Z_\\d]+)?(?:[(][a-zA-Z_\\d]+[)])?", next: "start"},
- {token: "variable.instance", regex: "[a-zA-Z_\\d]+(?:[(][a-zA-Z_\\d]+[)])?", next: "start"},
- {token: "variable.instance", regex: "{?[a-zA-Z_\\d]+}?", next: "start"}
- ], qqstring: [
- {token: "string", regex: '(?:[^\\\\]|\\\\.)*?["]', next: "start"},
- {token: "string", regex: ".+"}
- ]}
- };
- r.inherits(s, i), t.TclHighlightRules = s
-}), ace.define("ace/mode/matching_brace_outdent", ["require", "exports", "module", "ace/range"], function (e, t, n) {
- var r = e("../range").Range, i = function () {
- };
- (function () {
- this.checkOutdent = function (e, t) {
- return/^\s+$/.test(e) ? /^\s*\}/.test(t) : !1
- }, this.autoOutdent = function (e, t) {
- var n = e.getLine(t), i = n.match(/^(\s*\})/);
- if (!i)return 0;
- var s = i[1].length, o = e.findMatchingBracket({row: t, column: s});
- if (!o || o.row == t)return 0;
- var u = this.$getIndent(e.getLine(o.row));
- e.replace(new r(t, 0, t, s - 1), u)
- }, this.$getIndent = function (e) {
- var t = e.match(/^(\s+)/);
- return t ? t[1] : ""
- }
- }).call(i.prototype), t.MatchingBraceOutdent = i
-})
\ No newline at end of file
diff --git a/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/mode-tex.js b/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/mode-tex.js
deleted file mode 100644
index d184f41..0000000
--- a/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/mode-tex.js
+++ /dev/null
@@ -1,53 +0,0 @@
-ace.define("ace/mode/tex", ["require", "exports", "module", "ace/lib/oop", "ace/mode/text", "ace/tokenizer", "ace/mode/text_highlight_rules", "ace/mode/tex_highlight_rules", "ace/mode/matching_brace_outdent"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("./text").Mode, s = e("../tokenizer").Tokenizer, o = e("./text_highlight_rules").TextHighlightRules, u = e("./tex_highlight_rules").TexHighlightRules, a = e("./matching_brace_outdent").MatchingBraceOutdent, f = function (e) {
- e ? this.$tokenizer = new s((new o).getRules()) : this.$tokenizer = new s((new u).getRules()), this.$outdent = new a
- };
- r.inherits(f, i), function () {
- this.getNextLineIndent = function (e, t, n) {
- return this.$getIndent(t)
- }, this.allowAutoInsert = function () {
- return!1
- }
- }.call(f.prototype), t.Mode = f
-}), ace.define("ace/mode/tex_highlight_rules", ["require", "exports", "module", "ace/lib/oop", "ace/lib/lang", "ace/mode/text_highlight_rules"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("../lib/lang"), s = e("./text_highlight_rules").TextHighlightRules, o = function (e) {
- e || (e = "text"), this.$rules = {start: [
- {token: "comment", regex: "%.*$"},
- {token: e, regex: "\\\\[$&%#\\{\\}]"},
- {token: "keyword", regex: "\\\\(?:documentclass|usepackage|newcounter|setcounter|addtocounter|value|arabic|stepcounter|newenvironment|renewenvironment|ref|vref|eqref|pageref|label|cite[a-zA-Z]*|tag|begin|end|bibitem)\\b", next: "nospell"},
- {token: "keyword", regex: "\\\\(?:[a-zA-z0-9]+|[^a-zA-z0-9])"},
- {token: "paren.keyword.operator", regex: "[[({]"},
- {token: "paren.keyword.operator", regex: "[\\])}]"},
- {token: e, regex: "\\s+"}
- ], nospell: [
- {token: "comment", regex: "%.*$", next: "start"},
- {token: "nospell." + e, regex: "\\\\[$&%#\\{\\}]"},
- {token: "keyword", regex: "\\\\(?:documentclass|usepackage|newcounter|setcounter|addtocounter|value|arabic|stepcounter|newenvironment|renewenvironment|ref|vref|eqref|pageref|label|cite[a-zA-Z]*|tag|begin|end|bibitem)\\b"},
- {token: "keyword", regex: "\\\\(?:[a-zA-z0-9]+|[^a-zA-z0-9])", next: "start"},
- {token: "paren.keyword.operator", regex: "[[({]"},
- {token: "paren.keyword.operator", regex: "[\\])]"},
- {token: "paren.keyword.operator", regex: "}", next: "start"},
- {token: "nospell." + e, regex: "\\s+"},
- {token: "nospell." + e, regex: "\\w+"}
- ]}
- };
- r.inherits(o, s), t.TexHighlightRules = o
-}), ace.define("ace/mode/matching_brace_outdent", ["require", "exports", "module", "ace/range"], function (e, t, n) {
- var r = e("../range").Range, i = function () {
- };
- (function () {
- this.checkOutdent = function (e, t) {
- return/^\s+$/.test(e) ? /^\s*\}/.test(t) : !1
- }, this.autoOutdent = function (e, t) {
- var n = e.getLine(t), i = n.match(/^(\s*\})/);
- if (!i)return 0;
- var s = i[1].length, o = e.findMatchingBracket({row: t, column: s});
- if (!o || o.row == t)return 0;
- var u = this.$getIndent(e.getLine(o.row));
- e.replace(new r(t, 0, t, s - 1), u)
- }, this.$getIndent = function (e) {
- var t = e.match(/^(\s+)/);
- return t ? t[1] : ""
- }
- }).call(i.prototype), t.MatchingBraceOutdent = i
-})
\ No newline at end of file
diff --git a/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/mode-text.js b/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/mode-text.js
deleted file mode 100644
index e69de29..0000000
diff --git a/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/mode-textile.js b/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/mode-textile.js
deleted file mode 100644
index 65512a7..0000000
--- a/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/mode-textile.js
+++ /dev/null
@@ -1,50 +0,0 @@
-ace.define("ace/mode/textile", ["require", "exports", "module", "ace/lib/oop", "ace/mode/text", "ace/tokenizer", "ace/mode/textile_highlight_rules", "ace/mode/matching_brace_outdent"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("./text").Mode, s = e("../tokenizer").Tokenizer, o = e("./textile_highlight_rules").TextileHighlightRules, u = e("./matching_brace_outdent").MatchingBraceOutdent, a = function () {
- this.$tokenizer = new s((new o).getRules()), this.$outdent = new u
- };
- r.inherits(a, i), function () {
- this.getNextLineIndent = function (e, t, n) {
- return e == "intag" ? n : ""
- }, this.checkOutdent = function (e, t, n) {
- return this.$outdent.checkOutdent(t, n)
- }, this.autoOutdent = function (e, t, n) {
- this.$outdent.autoOutdent(t, n)
- }
- }.call(a.prototype), t.Mode = a
-}), ace.define("ace/mode/textile_highlight_rules", ["require", "exports", "module", "ace/lib/oop", "ace/mode/text_highlight_rules"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("./text_highlight_rules").TextHighlightRules, s = function () {
- this.$rules = {start: [
- {token: function (e) {
- return e.charAt(0) == "h" ? "markup.heading." + e.charAt(1) : "markup.heading"
- }, regex: "h1|h2|h3|h4|h5|h6|bq|p|bc|pre", next: "blocktag"},
- {token: "keyword", regex: "[\\*]+|[#]+"},
- {token: "text", regex: ".+"}
- ], blocktag: [
- {token: "keyword", regex: "\\. ", next: "start"},
- {token: "keyword", regex: "\\(", next: "blocktagproperties"}
- ], blocktagproperties: [
- {token: "keyword", regex: "\\)", next: "blocktag"},
- {token: "string", regex: "[a-zA-Z0-9\\-_]+"},
- {token: "keyword", regex: "#"}
- ]}
- };
- r.inherits(s, i), t.TextileHighlightRules = s
-}), ace.define("ace/mode/matching_brace_outdent", ["require", "exports", "module", "ace/range"], function (e, t, n) {
- var r = e("../range").Range, i = function () {
- };
- (function () {
- this.checkOutdent = function (e, t) {
- return/^\s+$/.test(e) ? /^\s*\}/.test(t) : !1
- }, this.autoOutdent = function (e, t) {
- var n = e.getLine(t), i = n.match(/^(\s*\})/);
- if (!i)return 0;
- var s = i[1].length, o = e.findMatchingBracket({row: t, column: s});
- if (!o || o.row == t)return 0;
- var u = this.$getIndent(e.getLine(o.row));
- e.replace(new r(t, 0, t, s - 1), u)
- }, this.$getIndent = function (e) {
- var t = e.match(/^(\s+)/);
- return t ? t[1] : ""
- }
- }).call(i.prototype), t.MatchingBraceOutdent = i
-})
\ No newline at end of file
diff --git a/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/mode-tm_snippet.js b/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/mode-tm_snippet.js
deleted file mode 100644
index e5274c3..0000000
--- a/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/mode-tm_snippet.js
+++ /dev/null
@@ -1,45 +0,0 @@
-ace.define("ace/mode/tm_snippet", ["require", "exports", "module", "ace/lib/oop", "ace/mode/text", "ace/tokenizer", "ace/mode/text_highlight_rules"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("./text").Mode, s = e("../tokenizer").Tokenizer, o = e("./text_highlight_rules").TextHighlightRules, u = function () {
- var e = "SELECTION|CURRENT_WORD|SELECTED_TEXT|CURRENT_LINE|LINE_INDEX|LINE_NUMBER|SOFT_TABS|TAB_SIZE|FILENAME|FILEPATH|FULLNAME";
- this.$rules = {start: [
- {token: "constant.language.escape", regex: /\\[\$}`\\]/},
- {token: "keyword", regex: "\\$(?:TM_)?(?:" + e + ")\\b"},
- {token: "variable", regex: "\\$\\w+"},
- {token: function (e, t, n) {
- return n[1] ? n[1]++ : n.unshift("start", 1), this.tokenName
- }, tokenName: "markup.list", regex: "\\${",next:"varDecl"},{token:function(e,t,n){return n[1]?(n[1]--,n[1]||n.splice(0,2),this.tokenName):"text"},tokenName:"markup.list",regex:"}"},
- {token: "doc,comment", regex: /^\${2}-{5,}$/}
- ], varDecl: [
- {regex: /\d+\b/, token: "constant.numeric"},
- {token: "keyword", regex: "(?:TM_)?(?:" + e + ")\\b"},
- {token: "variable", regex: "\\w+"},
- {regex: /:/, token: "punctuation.operator", next: "start"},
- {regex: /\//, token: "string.regex", next: "regexp"},
- {regex: "", next: "start"}
- ], regexp: [
- {regex: /\\./, token: "escape"},
- {regex: /\[/, token: "regex.start", next: "charClass"},
- {regex: "/", token: "string.regex", next: "format"},
- {token: "string.regex", regex: "."}
- ], charClass: [
- {regex: "\\.", token: "escape"},
- {regex: "\\]", token: "regex.end", next: "regexp"},
- {token: "string.regex", regex: "."}
- ], format: [
- {regex: /\\[ulULE]/, token: "keyword"},
- {regex: /\$\d+/, token: "variable"},
- {regex: "/[gim]*:?", token: "string.regex", next: "start"},
- {token: "string", regex: "."}
- ]}
- };
- r.inherits(u, o), t.SnippetHighlightRules = u;
- var a = function () {
- var e = new u;
- this.$tokenizer = new s(e.getRules())
- };
- r.inherits(a, i), function () {
- this.getNextLineIndent = function (e, t, n) {
- return this.$getIndent(t)
- }
- }.call(a.prototype), t.Mode = a
-})
\ No newline at end of file
diff --git a/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/mode-tmsnippet.js b/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/mode-tmsnippet.js
deleted file mode 100644
index 5818ff5..0000000
--- a/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/mode-tmsnippet.js
+++ /dev/null
@@ -1,84 +0,0 @@
-define('ace/mode/tmsnippet', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/text_highlight_rules'], function (require, exports, module) {
-
-
- var oop = require("../lib/oop");
- var TextMode = require("./text").Mode;
- var Tokenizer = require("../tokenizer").Tokenizer;
- var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-
- var SnippetHighlightRules = function () {
-
- var builtins = "SELECTION|CURRENT_WORD|SELECTED_TEXT|CURRENT_LINE|LINE_INDEX|" +
- "LINE_NUMBER|SOFT_TABS|TAB_SIZE|FILENAME|FILEPATH|FULLNAME";
-
- this.$rules = {
- "start": [
- {token: "constant.language.escape", regex: /\\[\$}`\\]/},
- {token: "keyword", regex: "\\$(?:TM_)?(?:" + builtins + ")\\b"},
- {token: "variable", regex: "\\$\\w+"},
- {token: function (value, state, stack) {
- if (stack[1])
- stack[1]++;
- else
- stack.unshift("start", 1);
- return this.tokenName;
- }, tokenName: "markup.list", regex: "\\${", next: "varDecl"},
- {token: function (value, state, stack) {
- if (!stack[1])
- return "text";
- stack[1]--;
- if (!stack[1])
- stack.splice(0, 2);
- return this.tokenName;
- }, tokenName: "markup.list", regex: "}"},
- {token: "doc,comment", regex: /^\${2}-{5,}$/}
- ],
- "varDecl": [
- {regex: /\d+\b/, token: "constant.numeric"},
- {token: "keyword", regex: "(?:TM_)?(?:" + builtins + ")\\b"},
- {token: "variable", regex: "\\w+"},
- {regex: /:/, token: "punctuation.operator", next: "start"},
- {regex: /\//, token: "string.regex", next: "regexp"},
- {regex: "", next: "start"}
- ],
- "regexp": [
- {regex: /\\./, token: "escape"},
- {regex: /\[/, token: "regex.start", next: "charClass"},
- {regex: "/", token: "string.regex", next: "format"},
- {"token": "string.regex", regex: "."}
- ],
- charClass: [
- {regex: "\\.", token: "escape"},
- {regex: "\\]", token: "regex.end", next: "regexp"},
- {"token": "string.regex", regex: "."}
- ],
- "format": [
- {regex: /\\[ulULE]/, token: "keyword"},
- {regex: /\$\d+/, token: "variable"},
- {regex: "/[gim]*:?", token: "string.regex", next: "start"},
- {"token": "string", regex: "."}
- ]
- };
- };
-
- oop.inherits(SnippetHighlightRules, TextHighlightRules);
-
- exports.SnippetHighlightRules = SnippetHighlightRules;
-
-
- var Mode = function () {
- var highlighter = new SnippetHighlightRules();
-
- this.$tokenizer = new Tokenizer(highlighter.getRules());
- };
- oop.inherits(Mode, TextMode);
-
- (function () {
- this.getNextLineIndent = function (state, line, tab) {
- return this.$getIndent(line);
- };
- }).call(Mode.prototype);
- exports.Mode = Mode;
-
-
-});
diff --git a/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/mode-typescript.js b/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/mode-typescript.js
deleted file mode 100644
index ba97ac7..0000000
--- a/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/mode-typescript.js
+++ /dev/null
@@ -1,308 +0,0 @@
-ace.define("ace/mode/typescript", ["require", "exports", "module", "ace/lib/oop", "ace/mode/javascript", "ace/tokenizer", "ace/mode/typescript_highlight_rules", "ace/mode/behaviour/cstyle", "ace/mode/folding/cstyle", "ace/mode/matching_brace_outdent"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("./javascript").Mode, s = e("../tokenizer").Tokenizer, o = e("./typescript_highlight_rules").TypeScriptHighlightRules, u = e("./behaviour/cstyle").CstyleBehaviour, a = e("./folding/cstyle").FoldMode, f = e("./matching_brace_outdent").MatchingBraceOutdent, l = function () {
- var e = new o;
- this.$tokenizer = new s(e.getRules()), this.$outdent = new f, this.$behaviour = new u, this.foldingRules = new a
- };
- r.inherits(l, i), function () {
- this.createWorker = function (e) {
- return null
- }
- }.call(l.prototype), t.Mode = l
-}), ace.define("ace/mode/javascript", ["require", "exports", "module", "ace/lib/oop", "ace/mode/text", "ace/tokenizer", "ace/mode/javascript_highlight_rules", "ace/mode/matching_brace_outdent", "ace/range", "ace/worker/worker_client", "ace/mode/behaviour/cstyle", "ace/mode/folding/cstyle"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("./text").Mode, s = e("../tokenizer").Tokenizer, o = e("./javascript_highlight_rules").JavaScriptHighlightRules, u = e("./matching_brace_outdent").MatchingBraceOutdent, a = e("../range").Range, f = e("../worker/worker_client").WorkerClient, l = e("./behaviour/cstyle").CstyleBehaviour, c = e("./folding/cstyle").FoldMode, h = function () {
- this.$tokenizer = new s((new o).getRules()), this.$outdent = new u, this.$behaviour = new l, this.foldingRules = new c
- };
- r.inherits(h, i), function () {
- this.toggleCommentLines = function (e, t, n, r) {
- var i = !0, s = /^(\s*)\/\//;
- for (var o = n; o <= r; o++)if (!s.test(t.getLine(o))) {
- i = !1;
- break
- }
- if (i) {
- var u = new a(0, 0, 0, 0);
- for (var o = n; o <= r; o++) {
- var f = t.getLine(o), l = f.match(s);
- u.start.row = o, u.end.row = o, u.end.column = l[0].length, t.replace(u, l[1])
- }
- } else t.indentRows(n, r, "//")
- }, this.getNextLineIndent = function (e, t, n) {
- var r = this.$getIndent(t), i = this.$tokenizer.getLineTokens(t, e), s = i.tokens, o = i.state;
- if (s.length && s[s.length - 1].type == "comment")return r;
- if (e == "start" || e == "regex_allowed") {
- var u = t.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/);
- u && (r += n)
- } else if (e == "doc-start") {
- if (o == "start" || e == "regex_allowed")return"";
- var u = t.match(/^\s*(\/?)\*/);
- u && (u[1] && (r += " "), r += "* ")
- }
- return r
- }, this.checkOutdent = function (e, t, n) {
- return this.$outdent.checkOutdent(t, n)
- }, this.autoOutdent = function (e, t, n) {
- this.$outdent.autoOutdent(t, n)
- }, this.createWorker = function (e) {
- var t = new f(["ace"], "ace/mode/javascript_worker", "JavaScriptWorker");
- return t.attachToDocument(e.getDocument()), t.on("jslint", function (t) {
- e.setAnnotations(t.data)
- }), t.on("terminate", function () {
- e.clearAnnotations()
- }), t
- }
- }.call(h.prototype), t.Mode = h
-}), ace.define("ace/mode/javascript_highlight_rules", ["require", "exports", "module", "ace/lib/oop", "ace/mode/doc_comment_highlight_rules", "ace/mode/text_highlight_rules"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("./doc_comment_highlight_rules").DocCommentHighlightRules, s = e("./text_highlight_rules").TextHighlightRules, o = function () {
- var e = this.createKeywordMapper({"variable.language": "Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document", keyword: "const|yield|import|get|set|break|case|catch|continue|default|delete|do|else|finally|for|function|if|in|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|__parent__|__count__|escape|unescape|with|__proto__|class|enum|extends|super|export|implements|private|public|interface|package|protected|static", "storage.type": "const|let|var|function", "constant.language": "null|Infinity|NaN|undefined", "support.function": "alert", "constant.language.boolean": "true|false"}, "identifier"), t = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void", n = "[a-zA-Z\\$_¡-￿][a-zA-Z\\d\\$_¡-￿]*\\b", r = "\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|[0-2][0-7]{0,2}|3[0-6][0-7]?|37[0-7]?|[4-7][0-7]?|.)";
- this.$rules = {start: [
- {token: "comment", regex: /\/\/.*$/},
- i.getStartRule("doc-start"),
- {token: "comment", regex: /\/\*/, next: "comment"},
- {token: "string", regex: "'(?=.)", next: "qstring"},
- {token: "string", regex: '"(?=.)', next: "qqstring"},
- {token: "constant.numeric", regex: /0[xX][0-9a-fA-F]+\b/},
- {token: "constant.numeric", regex: /[+-]?\d+(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?\b/},
- {token: ["storage.type", "punctuation.operator", "support.function", "punctuation.operator", "entity.name.function", "text", "keyword.operator"], regex: "(" + n + ")(\\.)(prototype)(\\.)(" + n + ")(\\s*)(=)", next: "function_arguments"},
- {token: ["storage.type", "punctuation.operator", "entity.name.function", "text", "keyword.operator", "text", "storage.type", "text", "paren.lparen"], regex: "(" + n + ")(\\.)(" + n + ")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", next: "function_arguments"},
- {token: ["entity.name.function", "text", "keyword.operator", "text", "storage.type", "text", "paren.lparen"], regex: "(" + n + ")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", next: "function_arguments"},
- {token: ["storage.type", "punctuation.operator", "entity.name.function", "text", "keyword.operator", "text", "storage.type", "text", "entity.name.function", "text", "paren.lparen"], regex: "(" + n + ")(\\.)(" + n + ")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()", next: "function_arguments"},
- {token: ["storage.type", "text", "entity.name.function", "text", "paren.lparen"], regex: "(function)(\\s+)(" + n + ")(\\s*)(\\()", next: "function_arguments"},
- {token: ["entity.name.function", "text", "punctuation.operator", "text", "storage.type", "text", "paren.lparen"], regex: "(" + n + ")(\\s*)(:)(\\s*)(function)(\\s*)(\\()", next: "function_arguments"},
- {token: ["text", "text", "storage.type", "text", "paren.lparen"], regex: "(:)(\\s*)(function)(\\s*)(\\()", next: "function_arguments"},
- {token: "keyword", regex: "(?:" + t + ")\\b", next: "regex_allowed"},
- {token: ["punctuation.operator", "support.function"], regex: /(\.)(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:opzzzz|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/},
- {token: ["punctuation.operator", "support.function.dom"], regex: /(\.)(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/},
- {token: ["punctuation.operator", "support.constant"], regex: /(\.)(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/},
- {token: ["storage.type", "punctuation.operator", "support.function.firebug"], regex: /(console)(\.)(warn|info|log|error|time|timeEnd|assert)\b/},
- {token: e, regex: n},
- {token: "keyword.operator", regex: /--|\+\+|[!$%&*+\-~]|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|\*=|%=|\+=|\-=|&=|\^=/, next: "regex_allowed"},
- {token: "punctuation.operator", regex: /\?|\:|\,|\;|\./, next: "regex_allowed"},
- {token: "paren.lparen", regex: /[\[({]/, next: "regex_allowed"},
- {token: "paren.rparen", regex: /[\])}]/},
- {token: "keyword.operator", regex: /\/=?/, next: "regex_allowed"},
- {token: "comment", regex: /^#!.*$/}
- ], regex_allowed: [i.getStartRule("doc-start"), {token: "comment", regex: "\\/\\*", next: "comment_regex_allowed"}, {token: "comment", regex: "\\/\\/.*$"}, {token: "string.regexp", regex: "\\/", next: "regex"}, {token: "text", regex: "\\s+"}, {token: "empty", regex: "", next: "start"}], regex: [
- {token: "regexp.keyword.operator", regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},
- {token: "string.regexp", regex: "/\\w*", next: "start"},
- {token: "invalid", regex: /\{\d+,?(?:\d+)?}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/},
- {token: "constant.language.escape", regex: /\(\?[:=!]|\)|{\d+,?(?:\d+)?}|{,\d+}|[+*]\?|[()$^+*?]/},
- {token: "constant.language.delimiter", regex: /\|/},
- {token: "constant.language.escape", regex: /\[\^?/, next: "regex_character_class"},
- {token: "empty", regex: "$", next: "start"},
- {defaultToken: "string.regexp"}
- ], regex_character_class: [
- {token: "regexp.keyword.operator", regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},
- {token: "constant.language.escape", regex: "]", next: "regex"},
- {token: "constant.language.escape", regex: "-"},
- {token: "empty", regex: "$", next: "start"},
- {defaultToken: "string.regexp.charachterclass"}
- ], function_arguments: [
- {token: "variable.parameter", regex: n},
- {token: "punctuation.operator", regex: "[, ]+"},
- {token: "punctuation.operator", regex: "$"},
- {token: "empty", regex: "", next: "start"}
- ], comment_regex_allowed: [
- {token: "comment", regex: "\\*\\/", next: "regex_allowed"},
- {defaultToken: "comment"}
- ], comment: [
- {token: "comment", regex: "\\*\\/", next: "start"},
- {defaultToken: "comment"}
- ], qqstring: [
- {token: "constant.language.escape", regex: r},
- {token: "string", regex: "\\\\$", next: "qqstring"},
- {token: "string", regex: '"|$', next: "start"},
- {defaultToken: "string"}
- ], qstring: [
- {token: "constant.language.escape", regex: r},
- {token: "string", regex: "\\\\$", next: "qstring"},
- {token: "string", regex: "'|$", next: "start"},
- {defaultToken: "string"}
- ]}, this.embedRules(i, "doc-", [i.getEndRule("start")])
- };
- r.inherits(o, s), t.JavaScriptHighlightRules = o
-}), ace.define("ace/mode/doc_comment_highlight_rules", ["require", "exports", "module", "ace/lib/oop", "ace/mode/text_highlight_rules"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("./text_highlight_rules").TextHighlightRules, s = function () {
- this.$rules = {start: [
- {token: "comment.doc.tag", regex: "@[\\w\\d_]+"},
- {token: "comment.doc.tag", regex: "\\bTODO\\b"},
- {defaultToken: "comment.doc"}
- ]}
- };
- r.inherits(s, i), s.getStartRule = function (e) {
- return{token: "comment.doc", regex: "\\/\\*(?=\\*)", next: e}
- }, s.getEndRule = function (e) {
- return{token: "comment.doc", regex: "\\*\\/", next: e}
- }, t.DocCommentHighlightRules = s
-}), ace.define("ace/mode/matching_brace_outdent", ["require", "exports", "module", "ace/range"], function (e, t, n) {
- var r = e("../range").Range, i = function () {
- };
- (function () {
- this.checkOutdent = function (e, t) {
- return/^\s+$/.test(e) ? /^\s*\}/.test(t) : !1
- }, this.autoOutdent = function (e, t) {
- var n = e.getLine(t), i = n.match(/^(\s*\})/);
- if (!i)return 0;
- var s = i[1].length, o = e.findMatchingBracket({row: t, column: s});
- if (!o || o.row == t)return 0;
- var u = this.$getIndent(e.getLine(o.row));
- e.replace(new r(t, 0, t, s - 1), u)
- }, this.$getIndent = function (e) {
- var t = e.match(/^(\s+)/);
- return t ? t[1] : ""
- }
- }).call(i.prototype), t.MatchingBraceOutdent = i
-}), ace.define("ace/mode/behaviour/cstyle", ["require", "exports", "module", "ace/lib/oop", "ace/mode/behaviour", "ace/token_iterator", "ace/lib/lang"], function (e, t, n) {
- var r = e("../../lib/oop"), i = e("../behaviour").Behaviour, s = e("../../token_iterator").TokenIterator, o = e("../../lib/lang"), u = ["text", "paren.rparen", "punctuation.operator"], a = ["text", "paren.rparen", "punctuation.operator", "comment"], f = 0, l = -1, c = "", h = 0, p = -1, d = "", v = "", m = function () {
- m.isSaneInsertion = function (e, t) {
- var n = e.getCursorPosition(), r = new s(t, n.row, n.column);
- if (!this.$matchTokenType(r.getCurrentToken() || "text", u)) {
- var i = new s(t, n.row, n.column + 1);
- if (!this.$matchTokenType(i.getCurrentToken() || "text", u))return!1
- }
- return r.stepForward(), r.getCurrentTokenRow() !== n.row || this.$matchTokenType(r.getCurrentToken() || "text", a)
- }, m.$matchTokenType = function (e, t) {
- return t.indexOf(e.type || e) > -1
- }, m.recordAutoInsert = function (e, t, n) {
- var r = e.getCursorPosition(), i = t.doc.getLine(r.row);
- this.isAutoInsertedClosing(r, i, c[0]) || (f = 0), l = r.row, c = n + i.substr(r.column), f++
- }, m.recordMaybeInsert = function (e, t, n) {
- var r = e.getCursorPosition(), i = t.doc.getLine(r.row);
- this.isMaybeInsertedClosing(r, i) || (h = 0), p = r.row, d = i.substr(0, r.column) + n, v = i.substr(r.column), h++
- }, m.isAutoInsertedClosing = function (e, t, n) {
- return f > 0 && e.row === l && n === c[0] && t.substr(e.column) === c
- }, m.isMaybeInsertedClosing = function (e, t) {
- return h > 0 && e.row === p && t.substr(e.column) === v && t.substr(0, e.column) == d
- }, m.popAutoInsertedClosing = function () {
- c = c.substr(1), f--
- }, m.clearMaybeInsertedClosing = function () {
- h = 0, p = -1
- }, this.add("braces", "insertion", function (e, t, n, r, i) {
- var s = n.getCursorPosition(), u = r.doc.getLine(s.row);
- if (i == "{") {
- var a = n.getSelectionRange(), f = r.doc.getTextRange(a);
- if (f !== "" && f !== "{" && n.getWrapBehavioursEnabled())return{text: "{" + f + "}", selection: !1};
- if (m.isSaneInsertion(n, r))return/[\]\}\)]/.test(u[s.column]) ? (m.recordAutoInsert(n, r, "}"), {text: "{}", selection: [1, 1]}) : (m.recordMaybeInsert(n, r, "{"), {text: "{", selection: [1, 1]})
- } else if (i == "}") {
- var l = u.substring(s.column, s.column + 1);
- if (l == "}") {
- var c = r.$findOpeningBracket("}", {column: s.column + 1, row: s.row});
- if (c !== null && m.isAutoInsertedClosing(s, u, i))return m.popAutoInsertedClosing(), {text: "", selection: [1, 1]}
- }
- } else if (i == "\n" || i == "\r\n") {
- var p = "";
- m.isMaybeInsertedClosing(s, u) && (p = o.stringRepeat("}", h), m.clearMaybeInsertedClosing());
- var l = u.substring(s.column, s.column + 1);
- if (l == "}" || p !== "") {
- var d = r.findMatchingBracket({row: s.row, column: s.column}, "}");
- if (!d)return null;
- var v = this.getNextLineIndent(e, u.substring(0, s.column), r.getTabString()), g = this.$getIndent(u);
- return{text: "\n" + v + "\n" + g + p, selection: [1, v.length, 1, v.length]}
- }
- }
- }), this.add("braces", "deletion", function (e, t, n, r, i) {
- var s = r.doc.getTextRange(i);
- if (!i.isMultiLine() && s == "{") {
- var o = r.doc.getLine(i.start.row), u = o.substring(i.end.column, i.end.column + 1);
- if (u == "}")return i.end.column++, i;
- h--
- }
- }), this.add("parens", "insertion", function (e, t, n, r, i) {
- if (i == "(") {
- var s = n.getSelectionRange(), o = r.doc.getTextRange(s);
- if (o !== "" && n.getWrapBehavioursEnabled())return{text: "(" + o + ")", selection: !1};
- if (m.isSaneInsertion(n, r))return m.recordAutoInsert(n, r, ")"), {text: "()", selection: [1, 1]}
- } else if (i == ")") {
- var u = n.getCursorPosition(), a = r.doc.getLine(u.row), f = a.substring(u.column, u.column + 1);
- if (f == ")") {
- var l = r.$findOpeningBracket(")", {column: u.column + 1, row: u.row});
- if (l !== null && m.isAutoInsertedClosing(u, a, i))return m.popAutoInsertedClosing(), {text: "", selection: [1, 1]}
- }
- }
- }), this.add("parens", "deletion", function (e, t, n, r, i) {
- var s = r.doc.getTextRange(i);
- if (!i.isMultiLine() && s == "(") {
- var o = r.doc.getLine(i.start.row), u = o.substring(i.start.column + 1, i.start.column + 2);
- if (u == ")")return i.end.column++, i
- }
- }), this.add("brackets", "insertion", function (e, t, n, r, i) {
- if (i == "[") {
- var s = n.getSelectionRange(), o = r.doc.getTextRange(s);
- if (o !== "" && n.getWrapBehavioursEnabled())return{text: "[" + o + "]", selection: !1};
- if (m.isSaneInsertion(n, r))return m.recordAutoInsert(n, r, "]"), {text: "[]", selection: [1, 1]}
- } else if (i == "]") {
- var u = n.getCursorPosition(), a = r.doc.getLine(u.row), f = a.substring(u.column, u.column + 1);
- if (f == "]") {
- var l = r.$findOpeningBracket("]", {column: u.column + 1, row: u.row});
- if (l !== null && m.isAutoInsertedClosing(u, a, i))return m.popAutoInsertedClosing(), {text: "", selection: [1, 1]}
- }
- }
- }), this.add("brackets", "deletion", function (e, t, n, r, i) {
- var s = r.doc.getTextRange(i);
- if (!i.isMultiLine() && s == "[") {
- var o = r.doc.getLine(i.start.row), u = o.substring(i.start.column + 1, i.start.column + 2);
- if (u == "]")return i.end.column++, i
- }
- }), this.add("string_dquotes", "insertion", function (e, t, n, r, i) {
- if (i == '"' || i == "'") {
- var s = i, o = n.getSelectionRange(), u = r.doc.getTextRange(o);
- if (u !== "" && u !== "'" && u != '"' && n.getWrapBehavioursEnabled())return{text: s + u + s, selection: !1};
- var a = n.getCursorPosition(), f = r.doc.getLine(a.row), l = f.substring(a.column - 1, a.column);
- if (l == "\\")return null;
- var c = r.getTokens(o.start.row), h = 0, p, d = -1;
- for (var v = 0; v < c.length; v++) {
- p = c[v], p.type == "string" ? d = -1 : d < 0 && (d = p.value.indexOf(s));
- if (p.value.length + h > o.start.column)break;
- h += c[v].value.length
- }
- if (!p || d < 0 && p.type !== "comment" && (p.type !== "string" || o.start.column !== p.value.length + h - 1 && p.value.lastIndexOf(s) === p.value.length - 1)) {
- if (!m.isSaneInsertion(n, r))return;
- return{text: s + s, selection: [1, 1]}
- }
- if (p && p.type === "string") {
- var g = f.substring(a.column, a.column + 1);
- if (g == s)return{text: "", selection: [1, 1]}
- }
- }
- }), this.add("string_dquotes", "deletion", function (e, t, n, r, i) {
- var s = r.doc.getTextRange(i);
- if (!i.isMultiLine() && (s == '"' || s == "'")) {
- var o = r.doc.getLine(i.start.row), u = o.substring(i.start.column + 1, i.start.column + 2);
- if (u == s)return i.end.column++, i
- }
- })
- };
- r.inherits(m, i), t.CstyleBehaviour = m
-}), ace.define("ace/mode/folding/cstyle", ["require", "exports", "module", "ace/lib/oop", "ace/range", "ace/mode/folding/fold_mode"], function (e, t, n) {
- var r = e("../../lib/oop"), i = e("../../range").Range, s = e("./fold_mode").FoldMode, o = t.FoldMode = function () {
- };
- r.inherits(o, s), function () {
- this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/, this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/, this.getFoldWidgetRange = function (e, t, n) {
- var r = e.getLine(n), i = r.match(this.foldingStartMarker);
- if (i) {
- var s = i.index;
- return i[1] ? this.openingBracketBlock(e, i[1], n, s) : e.getCommentFoldRange(n, s + i[0].length, 1)
- }
- if (t !== "markbeginend")return;
- var i = r.match(this.foldingStopMarker);
- if (i) {
- var s = i.index + i[0].length;
- return i[1] ? this.closingBracketBlock(e, i[1], n, s) : e.getCommentFoldRange(n, s, -1)
- }
- }
- }.call(o.prototype)
-}), ace.define("ace/mode/typescript_highlight_rules", ["require", "exports", "module", "ace/lib/oop", "ace/mode/javascript_highlight_rules"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("./javascript_highlight_rules").JavaScriptHighlightRules, s = function () {
- var e = [
- {token: ["keyword.operator.ts", "text", "variable.parameter.function.ts", "text"], regex: "\\b(module)(\\s*)([a-zA-Z0-9_?.$][\\w?.$]*)(\\s*\\{)"},
- {token: ["storage.type.variable.ts", "text", "keyword.other.ts", "text"], regex: "(super)(\\s*\\()([a-zA-Z0-9,_?.$\\s]+\\s*)(\\))"},
- {token: ["entity.name.function.ts", "paren.lparen", "paren.rparen"], regex: "([a-zA-Z_?.$][\\w?.$]*)(\\()(\\))"},
- {token: ["variable.parameter.function.ts", "text", "variable.parameter.function.ts"], regex: "([a-zA-Z0-9_?.$][\\w?.$]*)(\\s*:\\s*)([a-zA-Z0-9_?.$][\\w?.$]*)"},
- {token: ["keyword.operator.ts"], regex: "(?:\\b(constructor|declare|interface|as|AS|public|private|class|extends|export|super)\\b)"},
- {token: ["storage.type.variable.ts"], regex: "(?:\\b(this\\.|string\\b|bool\\b|number)\\b)"},
- {token: ["keyword.operator.ts", "storage.type.variable.ts", "keyword.operator.ts", "storage.type.variable.ts"], regex: "(class)(\\s+[a-zA-Z0-9_?.$][\\w?.$]*\\s+)(extends)(\\s+[a-zA-Z0-9_?.$][\\w?.$]*\\s+)?"},
- {token: "keyword", regex: "(?:super|export|class|extends|import)\\b"}
- ], t = (new i).getRules();
- t.start = e.concat(t.start), this.$rules = t
- };
- r.inherits(s, i), t.TypeScriptHighlightRules = s
-})
\ No newline at end of file
diff --git a/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/mode-vbscript.js b/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/mode-vbscript.js
deleted file mode 100644
index 4414d01..0000000
--- a/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/mode-vbscript.js
+++ /dev/null
@@ -1,51 +0,0 @@
-ace.define("ace/mode/vbscript", ["require", "exports", "module", "ace/lib/oop", "ace/mode/text", "ace/tokenizer", "ace/mode/vbscript_highlight_rules"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("./text").Mode, s = e("../tokenizer").Tokenizer, o = e("./vbscript_highlight_rules").VBScriptHighlightRules, u = function () {
- var e = new o;
- this.$tokenizer = new s(e.getRules())
- };
- r.inherits(u, i), function () {
- }.call(u.prototype), t.Mode = u
-}), ace.define("ace/mode/vbscript_highlight_rules", ["require", "exports", "module", "ace/lib/oop", "ace/mode/text_highlight_rules"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("./text_highlight_rules").TextHighlightRules, s = function () {
- this.$rules = {start: [
- {token: ["meta.ending-space"], regex: "$"},
- {token: [null], regex: "^(?=\\t)", next: "state_3"},
- {token: [null], regex: "^(?= )", next: "state_4"},
- {token: ["storage.type.function.asp", "text", "entity.name.function.asp", "text", "punctuation.definition.parameters.asp", "variable.parameter.function.asp", "punctuation.definition.parameters.asp"], regex: "^\\s*((?:Function|Sub))(\\s*)([a-zA-Z_]\\w*)(\\s*)(\\()([^)]*)(\\)).*\\n?"},
- {token: "punctuation.definition.comment.asp", regex: "'|REM", next: "comment"},
- {token: ["keyword.control.asp"], regex: "(?:\\b(If|Then|Else|ElseIf|Else If|End If|While|Wend|For|To|Each|Case|Select|End Select|Return|Continue|Do|Until|Loop|Next|With|Exit Do|Exit For|Exit Function|Exit Property|Exit Sub|IIf)\\b)"},
- {token: ["keyword.operator.asp"], regex: "(?:\\b(Mod|And|Not|Or|Xor|as)\\b)"},
- {token: ["storage.type.asp"], regex: "Dim|Call|Class|Const|Dim|Redim|Function|Sub|Private Sub|Public Sub|End sub|End Function|Set|Let|Get|New|Randomize|Option Explicit|On Error Resume Next|On Error GoTo"},
- {token: ["storage.modifier.asp"], regex: "(?:\\b(Private|Public|Default)\\b)"},
- {token: ["constant.language.asp"], regex: "(?:\\s*\\b(Empty|False|Nothing|Null|True)\\b)"},
- {token: ["punctuation.definition.string.begin.asp"], regex: '"', next: "string"},
- {token: ["punctuation.definition.variable.asp"], regex: "(\\$)[a-zA-Z_x7f-xff][a-zA-Z0-9_x7f-xff]*?\\b\\s*"},
- {token: ["support.class.asp"], regex: "(?:\\b(Application|ObjectContext|Request|Response|Server|Session)\\b)"},
- {token: ["support.class.collection.asp"], regex: "(?:\\b(Contents|StaticObjects|ClientCertificate|Cookies|Form|QueryString|ServerVariables)\\b)"},
- {token: ["support.constant.asp"], regex: "(?:\\b(TotalBytes|Buffer|CacheControl|Charset|ContentType|Expires|ExpiresAbsolute|IsClientConnected|PICS|Status|ScriptTimeout|CodePage|LCID|SessionID|Timeout)\\b)"},
- {token: ["support.function.asp"], regex: "(?:\\b(Lock|Unlock|SetAbort|SetComplete|BianryRead|AddHeader|AppendToLog|BinaryWrite|Clear|End|Flush|Redirect|Write|CreateObject|HTMLEncode|MapPath|URLEncode|Abandon|Convert|Regex)\\b)"},
- {token: ["support.function.event.asp"], regex: "(?:\\b(Application_OnEnd|Application_OnStart|OnTransactionAbort|OnTransactionCommit|Session_OnEnd|Session_OnStart)\\b)"},
- {token: ["support.function.vb.asp"], regex: "(?:\\b(Array|Add|Asc|Atn|CBool|CByte|CCur|CDate|CDbl|Chr|CInt|CLng|Conversions|Cos|CreateObject|CSng|CStr|Date|DateAdd|DateDiff|DatePart|DateSerial|DateValue|Day|Derived|Math|Escape|Eval|Exists|Exp|Filter|FormatCurrency|FormatDateTime|FormatNumber|FormatPercent|GetLocale|GetObject|GetRef|Hex|Hour|InputBox|InStr|InStrRev|Int|Fix|IsArray|IsDate|IsEmpty|IsNull|IsNumeric|IsObject|Item|Items|Join|Keys|LBound|LCase|Left|Len|LoadPicture|Log|LTrim|RTrim|Trim|Maths|Mid|Minute|Month|MonthName|MsgBox|Now|Oct|Remove|RemoveAll|Replace|RGB|Right|Rnd|Round|ScriptEngine|ScriptEngineBuildVersion|ScriptEngineMajorVersion|ScriptEngineMinorVersion|Second|SetLocale|Sgn|Sin|Space|Split|Sqr|StrComp|String|StrReverse|Tan|Time|Timer|TimeSerial|TimeValue|TypeName|UBound|UCase|Unescape|VarType|Weekday|WeekdayName|Year)\\b)"},
- {token: ["constant.numeric.asp"], regex: "-?\\b(?:(?:0(?:x|X)[0-9a-fA-F]*)|(?:(?:[0-9]+\\.?[0-9]*)|(?:\\.[0-9]+))(?:(?:e|E)(?:\\+|-)?[0-9]+)?)(?:L|l|UL|ul|u|U|F|f)?\\b"},
- {token: ["support.type.vb.asp"], regex: "(?:\\b(vbtrue|fvbalse|vbcr|vbcrlf|vbformfeed|vblf|vbnewline|vbnullchar|vbnullstring|int32|vbtab|vbverticaltab|vbbinarycompare|vbtextcomparevbsunday|vbmonday|vbtuesday|vbwednesday|vbthursday|vbfriday|vbsaturday|vbusesystemdayofweek|vbfirstjan1|vbfirstfourdays|vbfirstfullweek|vbgeneraldate|vblongdate|vbshortdate|vblongtime|vbshorttime|vbobjecterror|vbEmpty|vbNull|vbInteger|vbLong|vbSingle|vbDouble|vbCurrency|vbDate|vbString|vbObject|vbError|vbBoolean|vbVariant|vbDataObject|vbDecimal|vbByte|vbArray)\\b)"},
- {token: ["entity.name.function.asp"], regex: "(?:(\\b[a-zA-Z_x7f-xff][a-zA-Z0-9_x7f-xff]*?\\b)(?=\\(\\)?))"},
- {token: ["keyword.operator.asp"], regex: "\\-|\\+|\\*\\/|\\>|\\<|\\=|\\&"}
- ], state_3: [
- {token: ["meta.odd-tab.tabs", "meta.even-tab.tabs"], regex: "(\\t)(\\t)?"},
- {token: "meta.leading-space", regex: "(?=[^\\t])", next: "start"},
- {token: "meta.leading-space", regex: ".", next: "state_3"}
- ], state_4: [
- {token: ["meta.odd-tab.spaces", "meta.even-tab.spaces"], regex: "( )( )?"},
- {token: "meta.leading-space", regex: "(?=[^ ])", next: "start"},
- {token: "meta.leading-space", regex: ".", next: "state_4"}
- ], comment: [
- {token: "comment.line.apostrophe.asp", regex: "$|(?=(?:%>))", next: "start"},
- {token: "comment.line.apostrophe.asp", regex: "."}
- ], string: [
- {token: "constant.character.escape.apostrophe.asp", regex: '""'},
- {token: "string.quoted.double.asp", regex: '"', next: "start"},
- {token: "string.quoted.double.asp", regex: "."}
- ]}
- };
- r.inherits(s, i), t.VBScriptHighlightRules = s
-})
\ No newline at end of file
diff --git a/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/mode-xml.js b/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/mode-xml.js
deleted file mode 100644
index 6adab0f..0000000
--- a/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/mode-xml.js
+++ /dev/null
@@ -1,298 +0,0 @@
-ace.define("ace/mode/xml", ["require", "exports", "module", "ace/lib/oop", "ace/mode/text", "ace/tokenizer", "ace/mode/xml_highlight_rules", "ace/mode/behaviour/xml", "ace/mode/folding/xml"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("./text").Mode, s = e("../tokenizer").Tokenizer, o = e("./xml_highlight_rules").XmlHighlightRules, u = e("./behaviour/xml").XmlBehaviour, a = e("./folding/xml").FoldMode, f = function () {
- this.$tokenizer = new s((new o).getRules()), this.$behaviour = new u, this.foldingRules = new a
- };
- r.inherits(f, i), function () {
- this.getNextLineIndent = function (e, t, n) {
- return this.$getIndent(t)
- }
- }.call(f.prototype), t.Mode = f
-}), ace.define("ace/mode/xml_highlight_rules", ["require", "exports", "module", "ace/lib/oop", "ace/mode/xml_util", "ace/mode/text_highlight_rules"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("./xml_util"), s = e("./text_highlight_rules").TextHighlightRules, o = function () {
- this.$rules = {start: [
- {token: "text", regex: "<\\!\\[CDATA\\[", next: "cdata"},
- {token: "xml-pe", regex: "<\\?.*?\\?>"},
- {token: "comment", regex: "<\\!--", next: "comment"},
- {token: "xml-pe", regex: "<\\!.*?>"},
- {token: "meta.tag", regex: "<\\/?", next: "tag"},
- {token: "text", regex: "\\s+"},
- {token: "constant.character.entity", regex: "(?:[0-9]+;)|(?:[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}
- ], cdata: [
- {token: "text", regex: "\\]\\]>", next: "start"},
- {token: "text", regex: "\\s+"},
- {token: "text", regex: "(?:[^\\]]|\\](?!\\]>))+"}
- ], comment: [
- {token: "comment", regex: ".*?-->", next: "start"},
- {token: "comment", regex: ".+"}
- ]}, i.tag(this.$rules, "tag", "start")
- };
- r.inherits(o, s), t.XmlHighlightRules = o
-}), ace.define("ace/mode/xml_util", ["require", "exports", "module"], function (e, t, n) {
- function r(e) {
- return[
- {token: "string", regex: '"', next: e + "_qqstring"},
- {token: "string", regex: "'", next: e + "_qstring"}
- ]
- }
-
- function i(e, t) {
- return[
- {token: "string", regex: e, next: t},
- {token: "constant.language.escape", regex: "(?:[0-9]+;)|(?:[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"},
- {defaultToken: "string"}
- ]
- }
-
- t.tag = function (e, t, n, s) {
- e[t] = [
- {token: "text", regex: "\\s+"},
- {token: s ? function (e) {
- return s[e] ? "meta.tag.tag-name." + s[e] : "meta.tag.tag-name"
- } : "meta.tag.tag-name", regex: "[-_a-zA-Z0-9:]+", next: t + "_embed_attribute_list"},
- {token: "empty", regex: "", next: t + "_embed_attribute_list"}
- ], e[t + "_qstring"] = i("'", t + "_embed_attribute_list"), e[t + "_qqstring"] = i('"', t + "_embed_attribute_list"), e[t + "_embed_attribute_list"] = [
- {token: "meta.tag.r", regex: "/?>", next: n},
- {token: "keyword.operator", regex: "="},
- {token: "entity.other.attribute-name", regex: "[-_a-zA-Z0-9:]+"},
- {token: "constant.numeric", regex: "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},
- {token: "text", regex: "\\s+"}
- ].concat(r(t))
- }
-}), ace.define("ace/mode/behaviour/xml", ["require", "exports", "module", "ace/lib/oop", "ace/mode/behaviour", "ace/mode/behaviour/cstyle", "ace/token_iterator"], function (e, t, n) {
- function u(e, t) {
- var n = !0, r = e.type.split("."), i = t.split(".");
- return i.forEach(function (e) {
- if (r.indexOf(e) == -1)return n = !1, !1
- }), n
- }
-
- var r = e("../../lib/oop"), i = e("../behaviour").Behaviour, s = e("./cstyle").CstyleBehaviour, o = e("../../token_iterator").TokenIterator, a = function () {
- this.inherit(s, ["string_dquotes"]), this.add("autoclosing", "insertion", function (e, t, n, r, i) {
- if (i == ">") {
- var s = n.getCursorPosition(), a = new o(r, s.row, s.column), f = a.getCurrentToken(), l = !1;
- if (!f || !u(f, "meta.tag") && (!u(f, "text") || !f.value.match("/"))) {
- do f = a.stepBackward(); while (f && (u(f, "string") || u(f, "keyword.operator") || u(f, "entity.attribute-name") || u(f, "text")))
- } else l = !0;
- if (!f || !u(f, "meta.tag-name") || a.stepBackward().value.match("/"))return;
- var c = f.value;
- if (l)var c = c.substring(0, s.column - f.start);
- return{text: ">" + c + ">", selection: [1, 1]}
- }
- }), this.add("autoindent", "insertion", function (e, t, n, r, i) {
- if (i == "\n") {
- var s = n.getCursorPosition(), o = r.doc.getLine(s.row), u = o.substring(s.column, s.column + 2);
- if (u == "") {
- var a = this.$getIndent(r.doc.getLine(s.row)) + r.getTabString(), f = this.$getIndent(r.doc.getLine(s.row));
- return{text: "\n" + a + "\n" + f, selection: [1, a.length, 1, a.length]}
- }
- }
- })
- };
- r.inherits(a, i), t.XmlBehaviour = a
-}), ace.define("ace/mode/behaviour/cstyle", ["require", "exports", "module", "ace/lib/oop", "ace/mode/behaviour", "ace/token_iterator", "ace/lib/lang"], function (e, t, n) {
- var r = e("../../lib/oop"), i = e("../behaviour").Behaviour, s = e("../../token_iterator").TokenIterator, o = e("../../lib/lang"), u = ["text", "paren.rparen", "punctuation.operator"], a = ["text", "paren.rparen", "punctuation.operator", "comment"], f = 0, l = -1, c = "", h = 0, p = -1, d = "", v = "", m = function () {
- m.isSaneInsertion = function (e, t) {
- var n = e.getCursorPosition(), r = new s(t, n.row, n.column);
- if (!this.$matchTokenType(r.getCurrentToken() || "text", u)) {
- var i = new s(t, n.row, n.column + 1);
- if (!this.$matchTokenType(i.getCurrentToken() || "text", u))return!1
- }
- return r.stepForward(), r.getCurrentTokenRow() !== n.row || this.$matchTokenType(r.getCurrentToken() || "text", a)
- }, m.$matchTokenType = function (e, t) {
- return t.indexOf(e.type || e) > -1
- }, m.recordAutoInsert = function (e, t, n) {
- var r = e.getCursorPosition(), i = t.doc.getLine(r.row);
- this.isAutoInsertedClosing(r, i, c[0]) || (f = 0), l = r.row, c = n + i.substr(r.column), f++
- }, m.recordMaybeInsert = function (e, t, n) {
- var r = e.getCursorPosition(), i = t.doc.getLine(r.row);
- this.isMaybeInsertedClosing(r, i) || (h = 0), p = r.row, d = i.substr(0, r.column) + n, v = i.substr(r.column), h++
- }, m.isAutoInsertedClosing = function (e, t, n) {
- return f > 0 && e.row === l && n === c[0] && t.substr(e.column) === c
- }, m.isMaybeInsertedClosing = function (e, t) {
- return h > 0 && e.row === p && t.substr(e.column) === v && t.substr(0, e.column) == d
- }, m.popAutoInsertedClosing = function () {
- c = c.substr(1), f--
- }, m.clearMaybeInsertedClosing = function () {
- h = 0, p = -1
- }, this.add("braces", "insertion", function (e, t, n, r, i) {
- var s = n.getCursorPosition(), u = r.doc.getLine(s.row);
- if (i == "{") {
- var a = n.getSelectionRange(), f = r.doc.getTextRange(a);
- if (f !== "" && f !== "{" && n.getWrapBehavioursEnabled())return{text: "{" + f + "}", selection: !1};
- if (m.isSaneInsertion(n, r))return/[\]\}\)]/.test(u[s.column]) ? (m.recordAutoInsert(n, r, "}"), {text: "{}", selection: [1, 1]}) : (m.recordMaybeInsert(n, r, "{"), {text: "{", selection: [1, 1]})
- } else if (i == "}") {
- var l = u.substring(s.column, s.column + 1);
- if (l == "}") {
- var c = r.$findOpeningBracket("}", {column: s.column + 1, row: s.row});
- if (c !== null && m.isAutoInsertedClosing(s, u, i))return m.popAutoInsertedClosing(), {text: "", selection: [1, 1]}
- }
- } else if (i == "\n" || i == "\r\n") {
- var p = "";
- m.isMaybeInsertedClosing(s, u) && (p = o.stringRepeat("}", h), m.clearMaybeInsertedClosing());
- var l = u.substring(s.column, s.column + 1);
- if (l == "}" || p !== "") {
- var d = r.findMatchingBracket({row: s.row, column: s.column}, "}");
- if (!d)return null;
- var v = this.getNextLineIndent(e, u.substring(0, s.column), r.getTabString()), g = this.$getIndent(u);
- return{text: "\n" + v + "\n" + g + p, selection: [1, v.length, 1, v.length]}
- }
- }
- }), this.add("braces", "deletion", function (e, t, n, r, i) {
- var s = r.doc.getTextRange(i);
- if (!i.isMultiLine() && s == "{") {
- var o = r.doc.getLine(i.start.row), u = o.substring(i.end.column, i.end.column + 1);
- if (u == "}")return i.end.column++, i;
- h--
- }
- }), this.add("parens", "insertion", function (e, t, n, r, i) {
- if (i == "(") {
- var s = n.getSelectionRange(), o = r.doc.getTextRange(s);
- if (o !== "" && n.getWrapBehavioursEnabled())return{text: "(" + o + ")", selection: !1};
- if (m.isSaneInsertion(n, r))return m.recordAutoInsert(n, r, ")"), {text: "()", selection: [1, 1]}
- } else if (i == ")") {
- var u = n.getCursorPosition(), a = r.doc.getLine(u.row), f = a.substring(u.column, u.column + 1);
- if (f == ")") {
- var l = r.$findOpeningBracket(")", {column: u.column + 1, row: u.row});
- if (l !== null && m.isAutoInsertedClosing(u, a, i))return m.popAutoInsertedClosing(), {text: "", selection: [1, 1]}
- }
- }
- }), this.add("parens", "deletion", function (e, t, n, r, i) {
- var s = r.doc.getTextRange(i);
- if (!i.isMultiLine() && s == "(") {
- var o = r.doc.getLine(i.start.row), u = o.substring(i.start.column + 1, i.start.column + 2);
- if (u == ")")return i.end.column++, i
- }
- }), this.add("brackets", "insertion", function (e, t, n, r, i) {
- if (i == "[") {
- var s = n.getSelectionRange(), o = r.doc.getTextRange(s);
- if (o !== "" && n.getWrapBehavioursEnabled())return{text: "[" + o + "]", selection: !1};
- if (m.isSaneInsertion(n, r))return m.recordAutoInsert(n, r, "]"), {text: "[]", selection: [1, 1]}
- } else if (i == "]") {
- var u = n.getCursorPosition(), a = r.doc.getLine(u.row), f = a.substring(u.column, u.column + 1);
- if (f == "]") {
- var l = r.$findOpeningBracket("]", {column: u.column + 1, row: u.row});
- if (l !== null && m.isAutoInsertedClosing(u, a, i))return m.popAutoInsertedClosing(), {text: "", selection: [1, 1]}
- }
- }
- }), this.add("brackets", "deletion", function (e, t, n, r, i) {
- var s = r.doc.getTextRange(i);
- if (!i.isMultiLine() && s == "[") {
- var o = r.doc.getLine(i.start.row), u = o.substring(i.start.column + 1, i.start.column + 2);
- if (u == "]")return i.end.column++, i
- }
- }), this.add("string_dquotes", "insertion", function (e, t, n, r, i) {
- if (i == '"' || i == "'") {
- var s = i, o = n.getSelectionRange(), u = r.doc.getTextRange(o);
- if (u !== "" && u !== "'" && u != '"' && n.getWrapBehavioursEnabled())return{text: s + u + s, selection: !1};
- var a = n.getCursorPosition(), f = r.doc.getLine(a.row), l = f.substring(a.column - 1, a.column);
- if (l == "\\")return null;
- var c = r.getTokens(o.start.row), h = 0, p, d = -1;
- for (var v = 0; v < c.length; v++) {
- p = c[v], p.type == "string" ? d = -1 : d < 0 && (d = p.value.indexOf(s));
- if (p.value.length + h > o.start.column)break;
- h += c[v].value.length
- }
- if (!p || d < 0 && p.type !== "comment" && (p.type !== "string" || o.start.column !== p.value.length + h - 1 && p.value.lastIndexOf(s) === p.value.length - 1)) {
- if (!m.isSaneInsertion(n, r))return;
- return{text: s + s, selection: [1, 1]}
- }
- if (p && p.type === "string") {
- var g = f.substring(a.column, a.column + 1);
- if (g == s)return{text: "", selection: [1, 1]}
- }
- }
- }), this.add("string_dquotes", "deletion", function (e, t, n, r, i) {
- var s = r.doc.getTextRange(i);
- if (!i.isMultiLine() && (s == '"' || s == "'")) {
- var o = r.doc.getLine(i.start.row), u = o.substring(i.start.column + 1, i.start.column + 2);
- if (u == s)return i.end.column++, i
- }
- })
- };
- r.inherits(m, i), t.CstyleBehaviour = m
-}), ace.define("ace/mode/folding/xml", ["require", "exports", "module", "ace/lib/oop", "ace/lib/lang", "ace/range", "ace/mode/folding/fold_mode", "ace/token_iterator"], function (e, t, n) {
- var r = e("../../lib/oop"), i = e("../../lib/lang"), s = e("../../range").Range, o = e("./fold_mode").FoldMode, u = e("../../token_iterator").TokenIterator, a = t.FoldMode = function (e) {
- o.call(this), this.voidElements = e || {}
- };
- r.inherits(a, o), function () {
- this.getFoldWidget = function (e, t, n) {
- var r = this._getFirstTagInLine(e, n);
- return r.closing ? t == "markbeginend" ? "end" : "" : !r.tagName || this.voidElements[r.tagName.toLowerCase()] ? "" : r.selfClosing ? "" : r.value.indexOf("/" + r.tagName) !== -1 ? "" : "start"
- }, this._getFirstTagInLine = function (e, t) {
- var n = e.getTokens(t), r = "";
- for (var s = 0; s < n.length; s++) {
- var o = n[s];
- o.type.indexOf("meta.tag") === 0 ? r += o.value : r += i.stringRepeat(" ", o.value.length)
- }
- return this._parseTag(r)
- }, this.tagRe = /^(\s*)((\/?)([-_a-zA-Z0-9:!]*)\s*(\/?)>?)/, this._parseTag = function (e) {
- var t = this.tagRe.exec(e), n = this.tagRe.lastIndex || 0;
- return this.tagRe.lastIndex = 0, {value: e, match: t ? t[2] : "", closing: t ? !!t[3] : !1, selfClosing: t ? !!t[5] || t[2] == "/>" : !1, tagName: t ? t[4] : "", column: t[1] ? n + t[1].length : n}
- }, this._readTagForward = function (e) {
- var t = e.getCurrentToken();
- if (!t)return null;
- var n = "", r;
- do if (t.type.indexOf("meta.tag") === 0) {
- if (!r)var r = {row: e.getCurrentTokenRow(), column: e.getCurrentTokenColumn()};
- n += t.value;
- if (n.indexOf(">") !== -1) {
- var i = this._parseTag(n);
- return i.start = r, i.end = {row: e.getCurrentTokenRow(), column: e.getCurrentTokenColumn() + t.value.length}, e.stepForward(), i
- }
- } while (t = e.stepForward());
- return null
- }, this._readTagBackward = function (e) {
- var t = e.getCurrentToken();
- if (!t)return null;
- var n = "", r;
- do if (t.type.indexOf("meta.tag") === 0) {
- r || (r = {row: e.getCurrentTokenRow(), column: e.getCurrentTokenColumn() + t.value.length}), n = t.value + n;
- if (n.indexOf("<") !== -1) {
- var i = this._parseTag(n);
- return i.end = r, i.start = {row: e.getCurrentTokenRow(), column: e.getCurrentTokenColumn()}, e.stepBackward(), i
- }
- } while (t = e.stepBackward());
- return null
- }, this._pop = function (e, t) {
- while (e.length) {
- var n = e[e.length - 1];
- if (!t || n.tagName == t.tagName)return e.pop();
- if (this.voidElements[t.tagName])return;
- if (this.voidElements[n.tagName]) {
- e.pop();
- continue
- }
- return null
- }
- }, this.getFoldWidgetRange = function (e, t, n) {
- var r = this._getFirstTagInLine(e, n);
- if (!r.match)return null;
- var i = r.closing || r.selfClosing, o = [], a;
- if (!i) {
- var f = new u(e, n, r.column), l = {row: n, column: r.column + r.tagName.length + 2};
- while (a = this._readTagForward(f)) {
- if (a.selfClosing) {
- if (!o.length)return a.start.column += a.tagName.length + 2, a.end.column -= 2, s.fromPoints(a.start, a.end);
- continue
- }
- if (a.closing) {
- this._pop(o, a);
- if (o.length == 0)return s.fromPoints(l, a.start)
- } else o.push(a)
- }
- } else {
- var f = new u(e, n, r.column + r.match.length), c = {row: n, column: r.column};
- while (a = this._readTagBackward(f)) {
- if (a.selfClosing) {
- if (!o.length)return a.start.column += a.tagName.length + 2, a.end.column -= 2, s.fromPoints(a.start, a.end);
- continue
- }
- if (!a.closing) {
- this._pop(o, a);
- if (o.length == 0)return a.start.column += a.tagName.length + 2, s.fromPoints(a.start, c)
- } else o.push(a)
- }
- }
- }
- }.call(a.prototype)
-})
\ No newline at end of file
diff --git a/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/mode-xquery.js b/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/mode-xquery.js
deleted file mode 100644
index 25c9371..0000000
--- a/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/mode-xquery.js
+++ /dev/null
@@ -1,252 +0,0 @@
-ace.define("ace/mode/xquery", ["require", "exports", "module", "ace/worker/worker_client", "ace/lib/oop", "ace/mode/text", "ace/tokenizer", "ace/mode/xquery_highlight_rules", "ace/range", "ace/mode/behaviour/cstyle", "ace/mode/folding/cstyle"], function (e, t, n) {
- var r = e("../worker/worker_client").WorkerClient, i = e("../lib/oop"), s = e("./text").Mode, o = e("../tokenizer").Tokenizer, u = e("./xquery_highlight_rules").XQueryHighlightRules, a = e("../range").Range, f = e("./behaviour/cstyle").CstyleBehaviour, l = e("./folding/cstyle").FoldMode, c = function (e) {
- this.$tokenizer = new o((new u).getRules()), this.$behaviour = new f(e), this.foldingRules = new l
- };
- i.inherits(c, s), function () {
- this.getNextLineIndent = function (e, t, n) {
- var r = this.$getIndent(t), i = t.match(/\s*(?:then|else|return|[{\(]|<\w+>)\s*$/);
- return i && (r += n), r
- }, this.checkOutdent = function (e, t, n) {
- return/^\s+$/.test(t) ? /^\s*[\}\)]/.test(n) : !1
- }, this.autoOutdent = function (e, t, n) {
- var r = t.getLine(n), i = r.match(/^(\s*[\}\)])/);
- if (!i)return 0;
- var s = i[1].length, o = t.findMatchingBracket({row: n, column: s});
- if (!o || o.row == n)return 0;
- var u = this.$getIndent(t.getLine(o.row));
- t.replace(new a(n, 0, n, s - 1), u)
- }, this.$getIndent = function (e) {
- var t = e.match(/^(\s+)/);
- return t ? t[1] : ""
- }, this.toggleCommentLines = function (e, t, n, r) {
- var i, s, o = !0, u = /^\s*\(:(.*):\)/;
- for (i = n; i <= r; i++)if (!u.test(t.getLine(i))) {
- o = !1;
- break
- }
- var f = new a(0, 0, 0, 0);
- for (i = n; i <= r; i++)s = t.getLine(i), f.start.row = i, f.end.row = i, f.end.column = s.length, t.replace(f, o ? s.match(u)[1] : "(:" + s + ":)")
- }, this.createWorker = function (e) {
- this.$deltas = [];
- var t = new r(["ace"], "ace/mode/xquery_worker", "XQueryWorker"), n = this;
- return e.getDocument().on("change", function (e) {
- n.$deltas.push(e.data)
- }), t.attachToDocument(e.getDocument()), t.on("start", function (e) {
- n.$deltas = []
- }), t.on("error", function (t) {
- e.setAnnotations([t.data])
- }), t.on("ok", function (t) {
- e.clearAnnotations()
- }), t.on("highlight", function (t) {
- if (n.$deltas.length > 0)return;
- var r = 0, i = e.getLength() - 1, s = t.data.lines, o = t.data.states;
- e.bgTokenizer.lines = s, e.bgTokenizer.states = o, e.bgTokenizer.fireUpdateEvent(r, i)
- }), t
- }
- }.call(c.prototype), t.Mode = c
-}), ace.define("ace/mode/xquery_highlight_rules", ["require", "exports", "module", "ace/lib/oop", "ace/mode/text_highlight_rules"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("./text_highlight_rules").TextHighlightRules, s = function () {
- var e = "after|ancestor|ancestor-or-self|and|as|ascending|attribute|before|case|cast|castable|child|collation|comment|copy|count|declare|default|delete|descendant|descendant-or-self|descending|div|document|document-node|element|else|empty|empty-sequence|end|eq|every|except|first|following|following-sibling|for|function|ge|group|gt|idiv|if|import|insert|instance|intersect|into|is|item|last|le|let|lt|mod|modify|module|namespace|namespace-node|ne|node|only|or|order|ordered|parent|preceding|preceding-sibling|processing-instruction|rename|replace|return|satisfies|schema-attribute|schema-element|self|some|stable|start|switch|text|to|treat|try|typeswitch|union|unordered|validate|where|with|xquery|contains|paragraphs|sentences|times|words|by|collectionreturn|variable|version|option|when|encoding|toswitch|catch|tumbling|sliding|window|at|using|stemming|collection|schema|while|on|nodes|index|external|then|in|updating|value|of|containsbreak|loop|continue|exit|returning|append|json|position".split("|"), t = "[_A-Za-zÀ-ÖØ-öø-˿Ͱ-ͽͿ-῿‌-â€â°-â†â°€-⿯ã€-퟿豈-ï·ï·°-�]", n = "[-._A-Za-z0-9·À-ÖØ-öø-˿̀-ͽͿ-῿‌â€â€¿â€â°-â†â°€-⿯ã€-퟿豈-ï·ï·°-�]", r = t + n + "*", i = "(?:" + r + ":)?" + r, s = "(?:(?:Q{.*}" + r + ")|(?:" + i + "))";
- this.$rules = {start: [
- {token: "support.type", regex: "<\\!\\[CDATA\\[", next: "cdata"},
- {token: "xml-pe", regex: "<\\?", next: "pi"},
- {token: "comment", regex: "<\\!--", next: "xmlcomment"},
- {token: "comment.doc", regex: "\\(:~", next: "comment.doc"},
- {token: "comment", regex: "\\(:", next: "comment"},
- {token: ["text", "meta.tag"], regex: "(<\\/?)(" + i + ")", next: "tag"},
- {token: "constant", regex: "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},
- {token: "variable", regex: "\\$" + s},
- {token: "string", regex: "'", next: "apos-string"},
- {token: "string", regex: '"', next: "quot-string"},
- {token: "text", regex: "\\s+"},
- {token: function (t) {
- return e.indexOf(t.toLowerCase()) !== -1 ? "keyword" : "support.function"
- }, regex: s},
- {token: "keyword.operator", regex: "\\*|:=|=|<|>|\\-|\\+"},
- {token: "lparen", regex: "[[({]"},
- {token: "rparen", regex: "[\\])}]"}
- ], tag: [
- {token: "text", regex: "\\/?>", next: "start"},
- {token: ["text", "meta.tag"], regex: "(<\\/)(" + i + ")", next: "start"},
- {token: "meta.tag", regex: i},
- {token: "text", regex: "\\s+"},
- {token: "string", regex: "'", next: "apos-attr"},
- {token: "string", regex: '"', next: "quot-attr"},
- {token: "string", regex: "'.*?'"},
- {token: "text", regex: "="}
- ], pi: [
- {token: "xml-pe", regex: ".*\\?>", next: "start"},
- {token: "xml-pe", regex: ".*"}
- ], cdata: [
- {token: "support.type", regex: "\\]\\]>", next: "start"},
- {token: "support.type", regex: "\\s+"},
- {token: "support.type", regex: "(?:[^\\]]|\\](?!\\]>))+"}
- ], "comment.doc": [
- {token: "comment.doc", regex: ":\\)", next: "start"},
- {token: "comment.doc.tag", regex: "[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\\.[a-zA-Z]{2,6}"},
- {token: "comment.doc.tag", regex: "@[\\w\\d_]+"},
- {token: "comment.doc", regex: "\\s+"},
- {token: "comment.doc.tag", regex: "TODO"},
- {token: "comment.doc", regex: "[^@:^\\s]+"},
- {token: "comment.doc", regex: "."}
- ], comment: [
- {token: "comment", regex: ".*:\\)", next: "start"},
- {token: "comment", regex: ".+"}
- ], xmlcomment: [
- {token: "comment", regex: ".*?-->", next: "start"},
- {token: "comment", regex: ".+"}
- ], "apos-string": [
- {token: "string", regex: ".*'", next: "start"},
- {token: "string", regex: ".*"}
- ], "quot-string": [
- {token: "string", regex: '.*"', next: "start"},
- {token: "string", regex: ".*"}
- ], "apos-attr": [
- {token: "string", regex: ".*'", next: "tag"},
- {token: "string", regex: ".*"}
- ], "quot-attr": [
- {token: "string", regex: '.*"', next: "tag"},
- {token: "string", regex: ".*"}
- ]}
- };
- r.inherits(s, i), t.XQueryHighlightRules = s
-}), ace.define("ace/mode/behaviour/cstyle", ["require", "exports", "module", "ace/lib/oop", "ace/mode/behaviour", "ace/token_iterator", "ace/lib/lang"], function (e, t, n) {
- var r = e("../../lib/oop"), i = e("../behaviour").Behaviour, s = e("../../token_iterator").TokenIterator, o = e("../../lib/lang"), u = ["text", "paren.rparen", "punctuation.operator"], a = ["text", "paren.rparen", "punctuation.operator", "comment"], f = 0, l = -1, c = "", h = 0, p = -1, d = "", v = "", m = function () {
- m.isSaneInsertion = function (e, t) {
- var n = e.getCursorPosition(), r = new s(t, n.row, n.column);
- if (!this.$matchTokenType(r.getCurrentToken() || "text", u)) {
- var i = new s(t, n.row, n.column + 1);
- if (!this.$matchTokenType(i.getCurrentToken() || "text", u))return!1
- }
- return r.stepForward(), r.getCurrentTokenRow() !== n.row || this.$matchTokenType(r.getCurrentToken() || "text", a)
- }, m.$matchTokenType = function (e, t) {
- return t.indexOf(e.type || e) > -1
- }, m.recordAutoInsert = function (e, t, n) {
- var r = e.getCursorPosition(), i = t.doc.getLine(r.row);
- this.isAutoInsertedClosing(r, i, c[0]) || (f = 0), l = r.row, c = n + i.substr(r.column), f++
- }, m.recordMaybeInsert = function (e, t, n) {
- var r = e.getCursorPosition(), i = t.doc.getLine(r.row);
- this.isMaybeInsertedClosing(r, i) || (h = 0), p = r.row, d = i.substr(0, r.column) + n, v = i.substr(r.column), h++
- }, m.isAutoInsertedClosing = function (e, t, n) {
- return f > 0 && e.row === l && n === c[0] && t.substr(e.column) === c
- }, m.isMaybeInsertedClosing = function (e, t) {
- return h > 0 && e.row === p && t.substr(e.column) === v && t.substr(0, e.column) == d
- }, m.popAutoInsertedClosing = function () {
- c = c.substr(1), f--
- }, m.clearMaybeInsertedClosing = function () {
- h = 0, p = -1
- }, this.add("braces", "insertion", function (e, t, n, r, i) {
- var s = n.getCursorPosition(), u = r.doc.getLine(s.row);
- if (i == "{") {
- var a = n.getSelectionRange(), f = r.doc.getTextRange(a);
- if (f !== "" && f !== "{" && n.getWrapBehavioursEnabled())return{text: "{" + f + "}", selection: !1};
- if (m.isSaneInsertion(n, r))return/[\]\}\)]/.test(u[s.column]) ? (m.recordAutoInsert(n, r, "}"), {text: "{}", selection: [1, 1]}) : (m.recordMaybeInsert(n, r, "{"), {text: "{", selection: [1, 1]})
- } else if (i == "}") {
- var l = u.substring(s.column, s.column + 1);
- if (l == "}") {
- var c = r.$findOpeningBracket("}", {column: s.column + 1, row: s.row});
- if (c !== null && m.isAutoInsertedClosing(s, u, i))return m.popAutoInsertedClosing(), {text: "", selection: [1, 1]}
- }
- } else if (i == "\n" || i == "\r\n") {
- var p = "";
- m.isMaybeInsertedClosing(s, u) && (p = o.stringRepeat("}", h), m.clearMaybeInsertedClosing());
- var l = u.substring(s.column, s.column + 1);
- if (l == "}" || p !== "") {
- var d = r.findMatchingBracket({row: s.row, column: s.column}, "}");
- if (!d)return null;
- var v = this.getNextLineIndent(e, u.substring(0, s.column), r.getTabString()), g = this.$getIndent(u);
- return{text: "\n" + v + "\n" + g + p, selection: [1, v.length, 1, v.length]}
- }
- }
- }), this.add("braces", "deletion", function (e, t, n, r, i) {
- var s = r.doc.getTextRange(i);
- if (!i.isMultiLine() && s == "{") {
- var o = r.doc.getLine(i.start.row), u = o.substring(i.end.column, i.end.column + 1);
- if (u == "}")return i.end.column++, i;
- h--
- }
- }), this.add("parens", "insertion", function (e, t, n, r, i) {
- if (i == "(") {
- var s = n.getSelectionRange(), o = r.doc.getTextRange(s);
- if (o !== "" && n.getWrapBehavioursEnabled())return{text: "(" + o + ")", selection: !1};
- if (m.isSaneInsertion(n, r))return m.recordAutoInsert(n, r, ")"), {text: "()", selection: [1, 1]}
- } else if (i == ")") {
- var u = n.getCursorPosition(), a = r.doc.getLine(u.row), f = a.substring(u.column, u.column + 1);
- if (f == ")") {
- var l = r.$findOpeningBracket(")", {column: u.column + 1, row: u.row});
- if (l !== null && m.isAutoInsertedClosing(u, a, i))return m.popAutoInsertedClosing(), {text: "", selection: [1, 1]}
- }
- }
- }), this.add("parens", "deletion", function (e, t, n, r, i) {
- var s = r.doc.getTextRange(i);
- if (!i.isMultiLine() && s == "(") {
- var o = r.doc.getLine(i.start.row), u = o.substring(i.start.column + 1, i.start.column + 2);
- if (u == ")")return i.end.column++, i
- }
- }), this.add("brackets", "insertion", function (e, t, n, r, i) {
- if (i == "[") {
- var s = n.getSelectionRange(), o = r.doc.getTextRange(s);
- if (o !== "" && n.getWrapBehavioursEnabled())return{text: "[" + o + "]", selection: !1};
- if (m.isSaneInsertion(n, r))return m.recordAutoInsert(n, r, "]"), {text: "[]", selection: [1, 1]}
- } else if (i == "]") {
- var u = n.getCursorPosition(), a = r.doc.getLine(u.row), f = a.substring(u.column, u.column + 1);
- if (f == "]") {
- var l = r.$findOpeningBracket("]", {column: u.column + 1, row: u.row});
- if (l !== null && m.isAutoInsertedClosing(u, a, i))return m.popAutoInsertedClosing(), {text: "", selection: [1, 1]}
- }
- }
- }), this.add("brackets", "deletion", function (e, t, n, r, i) {
- var s = r.doc.getTextRange(i);
- if (!i.isMultiLine() && s == "[") {
- var o = r.doc.getLine(i.start.row), u = o.substring(i.start.column + 1, i.start.column + 2);
- if (u == "]")return i.end.column++, i
- }
- }), this.add("string_dquotes", "insertion", function (e, t, n, r, i) {
- if (i == '"' || i == "'") {
- var s = i, o = n.getSelectionRange(), u = r.doc.getTextRange(o);
- if (u !== "" && u !== "'" && u != '"' && n.getWrapBehavioursEnabled())return{text: s + u + s, selection: !1};
- var a = n.getCursorPosition(), f = r.doc.getLine(a.row), l = f.substring(a.column - 1, a.column);
- if (l == "\\")return null;
- var c = r.getTokens(o.start.row), h = 0, p, d = -1;
- for (var v = 0; v < c.length; v++) {
- p = c[v], p.type == "string" ? d = -1 : d < 0 && (d = p.value.indexOf(s));
- if (p.value.length + h > o.start.column)break;
- h += c[v].value.length
- }
- if (!p || d < 0 && p.type !== "comment" && (p.type !== "string" || o.start.column !== p.value.length + h - 1 && p.value.lastIndexOf(s) === p.value.length - 1)) {
- if (!m.isSaneInsertion(n, r))return;
- return{text: s + s, selection: [1, 1]}
- }
- if (p && p.type === "string") {
- var g = f.substring(a.column, a.column + 1);
- if (g == s)return{text: "", selection: [1, 1]}
- }
- }
- }), this.add("string_dquotes", "deletion", function (e, t, n, r, i) {
- var s = r.doc.getTextRange(i);
- if (!i.isMultiLine() && (s == '"' || s == "'")) {
- var o = r.doc.getLine(i.start.row), u = o.substring(i.start.column + 1, i.start.column + 2);
- if (u == s)return i.end.column++, i
- }
- })
- };
- r.inherits(m, i), t.CstyleBehaviour = m
-}), ace.define("ace/mode/folding/cstyle", ["require", "exports", "module", "ace/lib/oop", "ace/range", "ace/mode/folding/fold_mode"], function (e, t, n) {
- var r = e("../../lib/oop"), i = e("../../range").Range, s = e("./fold_mode").FoldMode, o = t.FoldMode = function () {
- };
- r.inherits(o, s), function () {
- this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/, this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/, this.getFoldWidgetRange = function (e, t, n) {
- var r = e.getLine(n), i = r.match(this.foldingStartMarker);
- if (i) {
- var s = i.index;
- return i[1] ? this.openingBracketBlock(e, i[1], n, s) : e.getCommentFoldRange(n, s + i[0].length, 1)
- }
- if (t !== "markbeginend")return;
- var i = r.match(this.foldingStopMarker);
- if (i) {
- var s = i.index + i[0].length;
- return i[1] ? this.closingBracketBlock(e, i[1], n, s) : e.getCommentFoldRange(n, s, -1)
- }
- }
- }.call(o.prototype)
-})
\ No newline at end of file
diff --git a/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/mode-yaml.js b/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/mode-yaml.js
deleted file mode 100644
index 8ae142c..0000000
--- a/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/mode-yaml.js
+++ /dev/null
@@ -1,94 +0,0 @@
-ace.define("ace/mode/yaml", ["require", "exports", "module", "ace/lib/oop", "ace/mode/text", "ace/tokenizer", "ace/mode/yaml_highlight_rules", "ace/mode/matching_brace_outdent", "ace/mode/folding/coffee"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("./text").Mode, s = e("../tokenizer").Tokenizer, o = e("./yaml_highlight_rules").YamlHighlightRules, u = e("./matching_brace_outdent").MatchingBraceOutdent, a = e("./folding/coffee").FoldMode, f = function () {
- this.$tokenizer = new s((new o).getRules()), this.$outdent = new u, this.foldingRules = new a
- };
- r.inherits(f, i), function () {
- this.getNextLineIndent = function (e, t, n) {
- var r = this.$getIndent(t);
- if (e == "start") {
- var i = t.match(/^.*[\{\(\[]\s*$/);
- i && (r += n)
- }
- return r
- }, this.checkOutdent = function (e, t, n) {
- return this.$outdent.checkOutdent(t, n)
- }, this.autoOutdent = function (e, t, n) {
- this.$outdent.autoOutdent(t, n)
- }
- }.call(f.prototype), t.Mode = f
-}), ace.define("ace/mode/yaml_highlight_rules", ["require", "exports", "module", "ace/lib/oop", "ace/mode/text_highlight_rules"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("./text_highlight_rules").TextHighlightRules, s = function () {
- this.$rules = {start: [
- {token: "comment", regex: "#.*$"},
- {token: "list.markup", regex: /^(?:-{3}|\.{3})\s*(?=#|$)/},
- {token: "list.markup", regex: /^\s*[\-?](?:$|\s)/},
- {token: "constant", regex: "!![\\w//]+"},
- {token: "constant.language", regex: "[&\\*][a-zA-Z0-9-_]+"},
- {token: ["meta.tag", "keyword"], regex: /^(\s*\w.*?)(\:(?:\s+|$))/},
- {token: ["meta.tag", "keyword"], regex: /(\w+?)(\s*\:(?:\s+|$))/},
- {token: "keyword.operator", regex: "<<\\w*:\\w*"},
- {token: "keyword.operator", regex: "-\\s*(?=[{])"},
- {token: "string", regex: '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},
- {token: "string", regex: "[\\|>]\\w*", next: "qqstring"},
- {token: "string", regex: "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},
- {token: "constant.numeric", regex: /[+\-]?[\d_]+(?:(?:\.[\d_]*)?(?:[eE][+\-]?[\d_]+)?)?\b/},
- {token: "constant.numeric", regex: /[+\-]?\.inf\b|NaN\b|0x[\dA-Fa-f_]+|0b[10_]+/},
- {token: "constant.language.boolean", regex: "(?:true|false|TRUE|FALSE|True|False|yes|no)\\b"},
- {token: "invalid.illegal", regex: "\\/\\/.*$"},
- {token: "paren.lparen", regex: "[[({]"},
- {token: "paren.rparen", regex: "[\\])}]"}
- ], qqstring: [
- {token: "string", regex: "(?=(?:(?:\\\\.)|(?:[^:]))*?:)", next: "start"},
- {token: "string", regex: ".+"}
- ]}
- };
- r.inherits(s, i), t.YamlHighlightRules = s
-}), ace.define("ace/mode/matching_brace_outdent", ["require", "exports", "module", "ace/range"], function (e, t, n) {
- var r = e("../range").Range, i = function () {
- };
- (function () {
- this.checkOutdent = function (e, t) {
- return/^\s+$/.test(e) ? /^\s*\}/.test(t) : !1
- }, this.autoOutdent = function (e, t) {
- var n = e.getLine(t), i = n.match(/^(\s*\})/);
- if (!i)return 0;
- var s = i[1].length, o = e.findMatchingBracket({row: t, column: s});
- if (!o || o.row == t)return 0;
- var u = this.$getIndent(e.getLine(o.row));
- e.replace(new r(t, 0, t, s - 1), u)
- }, this.$getIndent = function (e) {
- var t = e.match(/^(\s+)/);
- return t ? t[1] : ""
- }
- }).call(i.prototype), t.MatchingBraceOutdent = i
-}), ace.define("ace/mode/folding/coffee", ["require", "exports", "module", "ace/lib/oop", "ace/mode/folding/fold_mode", "ace/range"], function (e, t, n) {
- var r = e("../../lib/oop"), i = e("./fold_mode").FoldMode, s = e("../../range").Range, o = t.FoldMode = function () {
- };
- r.inherits(o, i), function () {
- this.getFoldWidgetRange = function (e, t, n) {
- var r = this.indentationBlock(e, n);
- if (r)return r;
- var i = /\S/, o = e.getLine(n), u = o.search(i);
- if (u == -1 || o[u] != "#")return;
- var a = o.length, f = e.getLength(), l = n, c = n;
- while (++n < f) {
- o = e.getLine(n);
- var h = o.search(i);
- if (h == -1)continue;
- if (o[h] != "#")break;
- c = n
- }
- if (c > l) {
- var p = e.getLine(c).length;
- return new s(l, a, c, p)
- }
- }, this.getFoldWidget = function (e, t, n) {
- var r = e.getLine(n), i = r.search(/\S/), s = e.getLine(n + 1), o = e.getLine(n - 1), u = o.search(/\S/), a = s.search(/\S/);
- if (i == -1)return e.foldWidgets[n - 1] = u != -1 && u < a ? "start" : "", "";
- if (u == -1) {
- if (i == a && r[i] == "#" && s[i] == "#")return e.foldWidgets[n - 1] = "", e.foldWidgets[n + 1] = "", "start"
- } else if (u == i && r[i] == "#" && o[i] == "#" && e.getLine(n - 2).search(/\S/) == -1)return e.foldWidgets[n - 1] = "start", e.foldWidgets[n + 1] = "", "";
- return u != -1 && u < i ? e.foldWidgets[n - 1] = "start" : e.foldWidgets[n - 1] = "", i < a ? "start" : ""
- }
- }.call(o.prototype)
-})
\ No newline at end of file
diff --git a/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/theme-ambiance.js b/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/theme-ambiance.js
deleted file mode 100644
index 5adf67a..0000000
--- a/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/theme-ambiance.js
+++ /dev/null
@@ -1,5 +0,0 @@
-ace.define("ace/theme/ambiance", ["require", "exports", "module", "ace/lib/dom"], function (e, t, n) {
- t.isDark = !0, t.cssClass = "ace-ambiance", t.cssText = ".ace-ambiance .ace_gutter {background-color: #3d3d3d;background-image: -moz-linear-gradient(left, #3D3D3D, #333);background-image: -ms-linear-gradient(left, #3D3D3D, #333);background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#3D3D3D), to(#333));background-image: -webkit-linear-gradient(left, #3D3D3D, #333);background-image: -o-linear-gradient(left, #3D3D3D, #333);background-image: linear-gradient(left, #3D3D3D, #333);background-repeat: repeat-x;border-right: 1px solid #4d4d4d;text-shadow: 0px 1px 1px #4d4d4d;color: #222;}.ace-ambiance .ace_gutter-layer {background: repeat left top;}.ace-ambiance .ace_fold-widget {text-align: center;}.ace-ambiance .ace_fold-widget:hover {color: #777;}.ace-ambiance .ace_fold-widget.ace_start,.ace-ambiance .ace_fold-widget.ace_end,.ace-ambiance .ace_fold-widget.ace_closed{background: none;border: none;box-shadow: none;}.ace-ambiance .ace_fold-widget.ace_start:after {content: '▾'}.ace-ambiance .ace_fold-widget.ace_end:after {content: '▴'}.ace-ambiance .ace_fold-widget.ace_closed:after {content: '‣'}.ace-ambiance .ace_print-margin {border-left: 1px dotted #2D2D2D;right: 0;background: #262626;}.ace-ambiance .ace_scroller {background-color: #202020;-webkit-box-shadow: inset 0 0 10px black;-moz-box-shadow: inset 0 0 10px black;-o-box-shadow: inset 0 0 10px black;box-shadow: inset 0 0 10px black;}.ace-ambiance .ace_text-layer {color: #E6E1DC;}.ace-ambiance .ace_cursor {border-left: 1px solid #7991E8;}.ace-ambiance .ace_overwrite-cursors .ace_cursor {border: 1px solid #FFE300;background: #766B13;}.ace-ambiance.normal-mode .ace_cursor-layer {z-index: 0;}.ace-ambiance .ace_marker-layer .ace_selection {background: rgba(221, 240, 255, 0.20);}.ace-ambiance .ace_marker-layer .ace_selected-word {border-radius: 4px;border: 8px solid #3f475d;box-shadow: 0 0 4px black;}.ace-ambiance .ace_marker-layer .ace_step {background: rgb(198, 219, 174);}.ace-ambiance .ace_marker-layer .ace_bracket {margin: -1px 0 0 -1px;border: 1px solid rgba(255, 255, 255, 0.25);}.ace-ambiance .ace_marker-layer .ace_active-line {background: rgba(255, 255, 255, 0.031);}.ace-ambiance .ace_invisible {color: #333;}.ace-ambiance .ace_paren {color: #24C2C7;}.ace-ambiance .ace_keyword {color: #cda869;}.ace-ambiance .ace_keyword.ace_operator {color: #fa8d6a;}.ace-ambiance .ace_punctuation.ace_operator {color: #fa8d6a;}.ace-ambiance .ace_identifier {}.ace-ambiance .ace-statement {color: #cda869;}.ace-ambiance .ace_constant {color: #CF7EA9;}.ace-ambiance .ace_constant.ace_language {color: #CF7EA9;}.ace-ambiance .ace_constant.ace_library {}.ace-ambiance .ace_constant.ace_numeric {color: #78CF8A;}.ace-ambiance .ace_invalid {text-decoration: underline;}.ace-ambiance .ace_invalid.ace_illegal {color:#F8F8F8;background-color: rgba(86, 45, 86, 0.75);}.ace-ambiance .ace_invalid,.ace-ambiance .ace_deprecated {text-decoration: underline;font-style: italic;color: #D2A8A1;}.ace-ambiance .ace_support {color: #9B859D;}.ace-ambiance .ace_support.ace_function {color: #DAD085;}.ace-ambiance .ace_function.ace_buildin {color: #9b859d;}.ace-ambiance .ace_string {color: #8f9d6a;}.ace-ambiance .ace_string.ace_regexp {color: #DAD085;}.ace-ambiance .ace_comment {font-style: italic;color: #555;}.ace-ambiance .ace_comment.ace_doc {}.ace-ambiance .ace_comment.ace_doc.ace_tag {color: #666;font-style: normal;}.ace-ambiance .ace_definition,.ace-ambiance .ace_type {color: #aac6e3;}.ace-ambiance .ace_variable {color: #9999cc;}.ace-ambiance .ace_variable.ace_language {color: #9b859d;}.ace-ambiance .ace_xml-pe {color: #494949;}.ace-ambiance .ace_gutter-layer,.ace-ambiance .ace_text-layer {background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAQAAAAHUWYVAABFFUlEQVQYGbzBCeDVU/74/6fj9HIcx/FRHx9JCFmzMyGRURhLZIkUsoeRfUjS2FNDtr6WkMhO9sm+S8maJfu+Jcsg+/o/c+Z4z/t97/vezy3z+z8ekGlnYICG/o7gdk+wmSHZ1z4pJItqapjoKXWahm8NmV6eOTbWUOp6/6a/XIg6GQqmenJ2lDHyvCFZ2cBDbmtHA043VFhHwXxClWmeYAdLhV00Bd85go8VmaFCkbVkzlQENzfBDZ5gtN7HwF0KDrTwJ0dypSOzpaKCMwQHKTIreYIxlmhXTzTWkVm+LTynZhiSBT3RZQ7aGfjGEd3qyXQ1FDymqbKxpspERQN2MiRjNZlFFQXfCNFm9nM1zpAsoYjmtRTc5ajwuaXc5xrWskT97RaKzAGe5ARHhVUsDbjKklziiX5WROcJwSNCNI+9w1Jwv4Zb2r7lCMZ4oq5C0EdTx+2GzNuKpJ+iFf38JEWkHJn9DNF7mmBDITrWEg0VWL3pHU20tSZnuqWu+R3BtYa8XxV1HO7GyD32UkOpL/yDloINFTmvtId+nmAjxRw40VMwVKiwrKLE4bK5UOVntYwhOcSSXKrJHKPJedocpGjVz/ZMIbnYUPB10/eKCrs5apqpgVmWzBYWpmtKHecJPjaUuEgRDDaU0oZghCJ6zNMQ5ZhDYx05r5v2muQdM0EILtXUsaKiQX9WMEUotagQzFbUNN6NUPC2nm5pxEWGCjMc3GdJHjSU2kORLK/JGSrkfGEIjncU/CYUnOipoYemwj8tST9NsJmB7TUVXtbUtXATJVZXBMvYeTXJfobgJUPmGMP/yFaWonaa6BcFO3nqcIqCozSZoZoSr1g4zJOzuyGnxTEX3lUEJ7WcZgme8ddaWvWJo2AJR9DZU3CUIbhCSG6ybSwN6qtJVnCU2svDTP2ZInOw2cBTrqtQahtNZn9NcJ4l2NaSmSkkP1noZWnVwkLmdUPOwLZEwy2Z3S3R+4rIG9hcbpPXHFVWcQdZkn2FOta3cKWQnNRC5g1LsJah4GCzSVsKnCOY5OAFRTBekyyryeyilhFKva75r4Mc0aWanGEaThcy31s439KKxTzJYY5WTHPU1FtIHjQU3Oip4xlNzj/lBw23dYZVliQa7WAXf4shetcQfatI+jWRDBPmyNeW6A1P5kdDgyYJlba0BIM8BZu1JfrFwItyjcAMR3K0BWOIrtMEXyhyrlVEx3ui5dUBjmB/Q3CXW85R4mBD0s7B+4q5tKUjOlb9qqmhi5AZ6GFIC5HXtOobdYGlVdMVbNJ8toNTFcHxnoL+muBagcctjWnbNMuR00uI7nQESwg5q2qqrKWIfrNUmeQocY6HuyxJV02wj36w00yhpmUFenv4p6fUkZYqLyuinx2RGOjhCXYyJF84oiU00YMOOhhquNdfbOB7gU88pY4xJO8LVdp6/q2voeB4R04vIdhSE40xZObx1HGGJ/ja0LBthFInKaLPPFzuCaYaoj8JjPME8yoyxo6zlBqkiUZYgq00OYMswbWO5NGmq+xhipxHLRW29ARjNKXO0wRnear8XSg4XFPLKEPUS1GqvyLwiuBUoa7zpZ0l5xxFwWmWZC1H5h5FwU8eQ7K+g8UcVY6TMQreVQT/8uQ8Z+ALIXnSEa2pYZQneE9RZbSBNYXfWYJzW/h/4j4Dp1tYVcFIC5019Vyi4ThPqSFCzjGWaHQTBU8q6vrVwgxP9Lkm840imWKpcLCjYTtrKuwvsKSnrvHCXGkSMk9p6lhckfRpIeis+N2PiszT+mFLspyGleUhDwcLrZqmyeylxwjBcKHEapqkmyangyLZRVOijwOtCY5SsG5zL0OwlCJ4y5KznF3EUNDDrinwiyLZRzOXtlBbK5ITHFGLp8Q0R6ab6mS7enI2cFrxOyHvOCFaT1HThS1krjCwqWeurCkk+willhCC+RSZnRXBiZaC5RXRIZYKp2lyfrHwiKPKR0JDzrdU2EFgpidawlFDR6FgXUMNa+g1FY3bUQh2cLCwosRdnuQTS/S+JVrGLeWIvtQUvONJxlqSQYYKpwoN2kaocLjdVsis4Mk80ESF2YpSkzwldjHkjFCUutI/r+EHDU8oCs6yzL3PhWiEooZdFMkymlas4AcI3KmoMMNSQ3tHzjGWCrcJJdYyZC7QFGwjRL9p+MrRkAGWzIaWCn9W0F3TsK01c2ZvQw0byvxuQU0r1lM0qJO7wW0kRIMdDTtXEdzi4VIh+EoIHm0mWtAtpCixlabgn83fKTI7anJe9ST7WIK1DMGpQmYeA58ImV6ezOGOzK2Kgq01pd60cKWiUi9Lievb/0vIDPHQ05Kzt4ddPckQBQtoaurjyHnek/nKzpQLrVgKPjIkh2v4uyezpv+Xoo7fPFXaGFp1vaLKxQ4uUpQQS5VuQs7BCq4xRJv7fwpVvvFEB3j+620haOuocqMhWd6TTPAEx+mdFNGHdranFe95WrWmIvlY4F1Dle2ECgc6cto7SryuqGGGha0tFQ5V53migUKmg6XKAo4qS3mik+0OZpAhOLeZKicacgaYcyx5hypYQE02ZA4xi/pNhOQxR4klNKyqacj+mpxnLTnnGSo85++3ZCZq6lrZkXlGEX3o+C9FieccJbZWVFjC0Yo1FZnJhoYMFoI1hEZ9r6hwg75HwzBNhbZCdJEfJwTPGzJvaKImw1yYX1HDAmpXR+ZJQ/SmgqMNVQb5vgamGwLtt7VwvP7Qk1xpiM5x5Cyv93E06MZmgs0Nya2azIKOYKCGBQQW97RmhKNKF02JZqHEJ4o58qp7X5EcZmc56trXEqzjCBZ1MFGR87Ql2tSTs6CGxS05PTzRQorkbw7aKoKXFDXsYW42VJih/q+FP2BdTzDTwVqOYB13liM50vG7wy28qagyuIXMeQI/Oqq8bcn5wJI50xH00CRntyfpL1T4hydYpoXgNiFzoIUTDZnLNRzh4TBHwbYGDvZkxmlyJloyr6tRihpeUG94GnKtIznREF0tzJG/OOr73JBcrSh1k6WuTprgLU+mnSGnv6Zge0NNz+kTDdH8nuAuTdJDCNb21LCiIuqlYbqGzT3RAoZofQfjFazkqeNWdYaGvYTM001EW2oKPvVk1ldUGSgUtHFwjKM1h9jnFcmy5lChoLNaQMGGDsYbKixlaMBmmsx1QjCfflwTfO/gckW0ruZ3jugKR3R5W9hGUWqCgxuFgsuaCHorotGKzGaeZB9DMsaTnKCpMtwTvOzhYk0rdrArKCqcaWmVk1+F372ur1YkKxgatI8Qfe1gIX9wE9FgS8ESmuABIXnRUbCapcKe+nO7slClSZFzpV/LkLncEb1qiO42fS3R855Su2mCLh62t1SYZZYVmKwIHjREF2uihTzB20JOkz7dkxzYQnK0UOU494wh+VWRc6Un2kpTaVgLDFEkJ/uhzRcI0YKGgpGWOlocBU/a4fKoJ/pEaNV6jip3+Es9VXY078rGnmAdf7t9ylPXS34RBSuYPs1UecZTU78WanhBCHpZ5sAoTz0LGZKjPf9TRypqWEiTvOFglL1fCEY3wY/++rbk7C8bWebA6p6om6PgOL2kp44TFJlVNBXae2rqqdZztOJpT87GQsE9jqCPIe9VReZuQ/CIgacsyZdCpIScSYqcZk8r+nsyCzhyfhOqHGOIvrLknC8wTpFcaYiGC/RU1NRbUeUpocQOnkRpGOrIOcNRx+1uA0UrzhSSt+VyS3SJpnFWkzNDqOFGIWcfR86DnmARTQ1HKIL33ExPiemeOhYSSjzlSUZZuE4TveoJLnBUOFof6KiysCbnAEcZgcUNTDOwkqWu3RWtmGpZwlHhJENdZ3miGz0lJlsKnjbwqSHQjpxnFDlTLLwqJPMZMjd7KrzkSG7VsxXBZE+F8YZkb01Oe00yyRK9psh5SYh29ySPKBo2ylNht7ZkZnsKenjKNJu9PNEyZpaCHv4Kt6RQsLvAVp7M9kIimmCUwGeWqLMmGuIotYMmWNpSahkhZw9FqZsVnKJhsjAHvtHMsTM9fCI06Dx/u3vfUXCqfsKRc4oFY2jMsoo/7DJDwZ1CsIKnJu+J9ldkpmiCxQx1rWjI+T9FwcWWzOuaYH0Hj7klNRVWEQpmaqosakiGNTFHdjS/qnUdmf0NJW5xsL0HhimCCZZSRzmSPTXJQ4aaztAwtZnoabebJ+htCaZ7Cm535ByoqXKbX1WRc4Eh2MkRXWzImVc96Cj4VdOKVxR84VdQsIUM8Psoou2byVHyZFuq7O8otbSQ2UAoeEWTudATLGSpZzVLlXVkPU2Jc+27lsw2jmg5T5VhbeE3BT083K9WsTTkFU/Osi0rC5lRlpwRHUiesNS0sOvmqGML1aRbPAxTJD9ZKtxuob+hhl8cwYGWpJ8nub7t5p6coYbMovZ1BTdaKn1jYD6h4GFDNFyT/Kqe1XCXphXHOKLZmuRSRdBPEfVUXQzJm5YGPGGJdvAEr7hHNdGZnuBvrpciGmopOLf5N0uVMy0FfYToJk90uUCbJupaVpO53UJXR2bVpoU00V2KOo4zMFrBd0Jtz2pa0clT5Q5L8IpQ177mWQejPMEJhuQjS10ref6HHjdEhy1P1EYR7GtO0uSsKJQYLiTnG1rVScj5lyazpqWGl5uBbRWl7m6ixGOOnEsMJR7z8J0n6KMnCdxhiNYQCoZ6CmYLnO8omC3MkW3bktlPmEt/VQQHejL3+dOE5FlPdK/Mq8hZxxJtLyRrepLThYKbLZxkSb5W52vYxNOaOxUF0yxMUPwBTYqCzy01XayYK0sJyWBLqX0MwU5CzoymRzV0EjjeUeLgDpTo6ij42ZAzvD01dHUUTPLU96MdLbBME8nFBn7zJCMtJcZokn8YoqU0FS5WFKyniHobguMcmW8N0XkWZjkyN3hqOMtS08r+/xTBwpZSZ3qiVRX8SzMHHjfUNFjgHEPmY9PL3ykEzxkSre/1ZD6z/NuznuB0RcE1TWTm9zRgfUWVJiG6yrzgmWPXC8EAR4Wxhlad0ZbgQyEz3pG5RVEwwDJH2mgKpjcTiCOzn1lfUWANFbZ2BA8balnEweJC9J0iuaeZoI+ippFCztEKVvckR2iice1JvhVytrQwUAZpgsubCPaU7xUe9vWnaOpaSBEspalykhC9bUlOMpT42ZHca6hyrqKmw/wMR8H5ZmdFoBVJb03O4UL0tSNnvIeRmkrLWqrs78gcrEn2tpcboh0UPOW3UUR9PMk4T4nnNKWmCjlrefhCwxRNztfmIQVdDElvS4m1/WuOujoZCs5XVOjtKPGokJzsYCtFYoWonSPT21DheU/wWhM19FcElwqNGOsp9Q8N/cwXaiND1MmeL1Q5XROtYYgGeFq1aTMsoMmcrKjQrOFQTQ1fmBYhmW6o8Jkjc7iDJRTBIo5kgJD5yMEYA3srCg7VFKwiVJkmRCc5ohGOKhsYMn/XBLdo5taZjlb9YAlGWRimqbCsoY7HFAXLa5I1HPRxMMsQDHFkWtRNniqT9UEeNjcE7RUlrCJ4R2CSJuqlKHWvJXjAUNcITYkenuBRB84TbeepcqTj3zZyFJzgYQdHnqfgI0ddUwS6GqWpsKWhjq9cV0vBAEMN2znq+EBfIWT+pClYw5xsTlJU6GeIBsjGmmANTzJZiIYpgrM0Oa8ZMjd7NP87jxhqGOhJlnQtjuQpB+8aEE00wZFznSJPyHxgH3HkPOsJFvYk8zqCHzTs1BYOa4J3PFU+UVRZxlHDM4YavlNUuMoRveiZA2d7grMNc2g+RbSCEKzmgYsUmWmazFJyoiOZ4KnyhKOGRzWJa0+moyV4TVHDzn51Awtqaphfk/lRQ08FX1iiqxTB/kLwd0VynKfEvI6cd4XMV5bMhZ7gZUWVzYQ6Nm2BYzxJbw3bGthEUUMfgbGeorae6DxHtJoZ6alhZ0+ytiVoK1R4z5PTrOECT/SugseEOlb1MMNR4VRNcJy+V1Hg9ONClSZFZjdHlc6W6FBLdJja2MC5hhpu0DBYEY1TFGwiFAxRRCsYkiM9JRb0JNMVkW6CZYT/2EiTGWmo8k+h4FhDNE7BvppoTSFnmCV5xZKzvcCdDo7VVPnIU+I+Rc68juApC90MwcFCsJ5hDqxgScYKreruyQwTqrzoqDCmhWi4IbhB0Yrt3RGa6GfDv52rKXWhh28dyZaWUvcZeMTBaZoSGyiCtRU5J8iviioHaErs7Jkj61syVzTTgOcUOQ8buFBTYWdL5g3T4qlpe0+wvD63heAXRfCCIed9RbCsp2CiI7raUOYOTU13N8PNHvpaGvayo4a3LLT1lDrVEPT2zLUlheB1R+ZTRfKWJ+dcocLJfi11vyJ51lLqJ0WD7tRwryezjiV5W28uJO9qykzX8JDe2lHl/9oyBwa2UMfOngpXCixvKdXTk3wrsKmiVYdZIqsoWEERjbcUNDuiaQomGoIbFdEHmsyWnuR+IeriKDVLnlawlyNHKwKlSU631PKep8J4Q+ayjkSLKYLhalNHlYvttb6fHm0p6OApsZ4l2VfdqZkjuysy6ysKLlckf1KUutCTs39bmCgEyyoasIWlVaMF7mgmWtBT8Kol5xpH9IGllo8cJdopcvZ2sImlDmMIbtDk3KIpeNiS08lQw11NFPTwVFlPP6pJ2gvRfI7gQUfmNAtf6Gs0wQxDsKGlVBdF8rCa3jzdwMaGHOsItrZk7hAyOzpK9VS06j5F49b0VNGOOfKs3lDToMsMBe9ZWtHFEgxTJLs7qrygKZjUnmCYoeAqeU6jqWuLJup4WghOdvCYJnrSkSzoyRkm5M2StQwVltPkfCAk58tET/CSg+8MUecmotMEnhBKfWBIZsg2ihruMJQaoIm+tkTLKEqspMh00w95gvFCQRtDwTT1gVDDSEVdlwqZfxoQRbK0g+tbiBZxzKlpnpypejdDwTaeOvorMk/IJE10h9CqRe28hhLbe0pMsdSwv4ZbhKivo2BjDWfL8UKJgeavwlwb5KlwhyE4u4XkGE2ytZCznKLCDZZq42VzT8HLCrpruFbIfOIINmh/qCdZ1ZBc65kLHR1Bkyf5zn6pN3SvGKIlFNGplhrO9QSXanLOMQTLCa0YJCRrCZm/CZmrLTm7WzCK4GJDiWUdFeYx1LCFg3NMd0XmCuF3Y5rITLDUsYS9zoHVzwnJoYpSTQoObyEzr4cFBNqYTopoaU/wkyLZ2lPhX/5Y95ulxGTV7KjhWrOZgl8MyUUafjYraNjNU1N3IWcjT5WzWqjwtoarHSUObGYO3GCJZpsBlnJGPd6ZYLyl1GdCA2625IwwJDP8GUKymbzuyPlZlvTUsaUh5zFDhRWFzPKKZLAlWdcQbObgF9tOqOsmB1dqcqYJmWstFbZRRI9poolmqiLnU0POvxScpah2iSL5UJNzgScY5+AuIbpO0YD3NCW+dLMszFSdFCWGqG6eVq2uYVNDdICGD6W7EPRWZEY5gpsE9rUkS3mijzzJnm6UpUFXG1hCUeVoS5WfNcFpblELL2qqrCvMvRfd45oalvKU2tiQ6ePJOVMRXase9iTtLJztPxJKLWpo2CRDcJwn2sWSLKIO1WQWNTCvpVUvOZhgSC40JD0dOctaSqzkCRbXsKlb11Oip6PCJ0IwSJM31j3akRxlP7Rwn6aGaUL0qiLnJkvB3xWZ2+Q1TfCwpQH3G0o92UzmX4o/oJNQMMSQc547wVHhdk+VCw01DFYEnTxzZKAm74QmeNNR1w6WzEhNK15VJzuCdxQ53dRUDws5KvwgBMOEgpcVNe0hZI6RXT1Jd0cyj5nsaEAHgVmGaJIlWdsc5Ui2ElrRR6jrRAttNMEAIWrTDFubkZaok7/AkzfIwfuWVq0jHzuCK4QabtLUMVPB3kJ0oyHTSVFlqMALilJf2Rf8k5aaHtMfayocLBS8L89oKoxpJvnAkDPa0qp5DAUTHKWmCcnthlou8iCKaFFLHWcINd1nyIwXqrSxMNmSs6KmoL2QrKuWtlQ5V0120xQ5vRyZS1rgFkWwhiOwiuQbR0OOVhQM9iS3tiXp4RawRPMp5tDletOOBL95MpM01dZTBM9pkn5qF010rIeHFcFZhmSGpYpTsI6nwhqe5C9ynhlpp5ophuRb6WcJFldkVnVEwwxVfrVkvnWUuNLCg5bgboFHPDlDPDmnK7hUrWiIbjadDclujlZcaokOFup4Ri1kacV6jmrrK1hN9bGwpKEBQ4Q6DvIUXOmo6U5LqQM6EPyiKNjVkPnJkDPNEaxhiFay5ExW1NXVUGqcpYYdPcGiCq7z/TSlbhL4pplWXKd7NZO5QQFrefhRQW/NHOsqcIglc4UhWklR8K0QzbAw08CBDnpbgqXdeD/QUsM4RZXDFBW6WJKe/mFPdH0LtBgiq57wFLzlyQzz82qYx5D5WJP5yVJDW01BfyHnS6HKO/reZqId1WGa4Hkh2kWodJ8i6KoIPlAj2hPt76CzXsVR6koPRzWTfKqIentatYpQw2me4AA3y1Kind3SwoOKZDcFXTwl9tWU6mfgRk9d71sKtlNwrjnYw5tC5n5LdKiGry3JKNlHEd3oaMCFHrazBPMp/uNJ+V7IudcSbeOIdjUEdwl0VHCOZo5t6YluEuaC9mQeMgSfOyKnYGFHcIeQ84yQWbuJYJpZw5CzglDH7gKnWqqM9ZTaXcN0TeYhR84eQtJT76JJ1lREe7WnnvsMmRc9FQ7SBBM9mV3lCUdmHk/S2RAMt0QjFNFqQpWjDPQ01DXWUdDBkXziKPjGEP3VP+zIWU2t7im41FOloyWzn/L6dkUy3VLDaZ6appgDLHPjJEsyvJngWEPUyVBiAaHCTEXwrLvSEbV1e1gKJniicWorC1MUrVjB3uDhJE/wgSOzk1DXpk0k73qCM8xw2UvD5kJmDUfOomqMpWCkJRlvKXGmoeBm18USjVIk04SClxTB6YrgLAPLWYK9HLUt5cmc0vYES8GnTeRc6skZbQkWdxRsIcyBRzx1DbTk9FbU0caTPOgJHhJKnOGIVhQqvKmo0llRw9sabrZkDtdg3PqaKi9oatjY8B+G371paMg6+mZFNNtQ04mWBq3rYLOmtWWQp8KJnpy9DdFensyjdqZ+yY40VJlH8wcdLzC8PZnvHMFUTZUrDTkLyQaGus5X5LzpYAf3i+e/ZlhqGqWhh6Ou6xTR9Z6oi5AZZtp7Mj2EEm8oSpxiYZCHU/1fbGdNNNRRoZMhmilEb2gqHOEJDtXkHK/JnG6IrvbPCwV3NhONVdS1thBMs1T4QOBcTWa2IzhMk2nW5Kyn9tXUtpv9RsG2msxk+ZsQzRQacJncpgke0+T8y5Fzj8BiGo7XlJjaTIlpQs7KFjpqGnKuoyEPeIKnFMkZHvopgh81ySxNFWvJWcKRs70j2FOT012IllEEO1n4pD1513Yg2ssQPOThOkvyrqHUdEXOSEsihmBbTbKX1kLBPWqWkLOqJbjB3GBIZmoa8qWl4CG/iZ7oiA72ZL7TJNeZUY7kFQftDcHHluBzRbCegzMtrRjVQpX2lgoPKKLJAkcbMl01XK2p7yhL8pCBbQ3BN2avJgKvttcrWDK3CiUOVxQ8ZP+pqXKyIxnmBymCg5vJjNfkPK4+c8cIfK8ocVt7kmfd/I5SR1hKvCzUtb+lhgc00ZaO6CyhIQP1Uv4yIZjload72PXX0OIJvnFU+0Zf6MhsJwTfW0r0UwQfW4LNLZl5HK261JCZ4qnBaAreVAS3WrjV0LBnNDUNNDToCEeFfwgcb4gOEqLRhirWkexrCEYKVV711DLYEE1XBEsp5tpTGjorkomKYF9FDXv7fR3BGwbettSxnyL53MBPjsxDZjMh+VUW9NRxq1DhVk+FSxQcaGjV9Pawv6eGByw5qzoy7xk4RsOShqjJwWKe/1pEEfzkobeD/dQJmpqedcyBTy2sr4nGNRH0c0SPWTLrqAc0OQcb/gemKgqucQT7ySWKCn2EUotoCvpZct7RO2sy/QW0IWcXd7pQRQyZVwT2USRO87uhjioTLKV2brpMUcMQRbKH/N2T+UlTpaMls6cmc6CCNy3JdYYSUzzJQ4oSD3oKLncULOiJvjBEC2oqnCJkJluCYy2ZQ5so9YYlZ1VLlQU1mXEW1jZERwj/MUSRc24TdexlqLKfQBtDTScJUV8FszXBEY5ktpD5Ur9hYB4Nb1iikw3JoYpkKX+RodRKFt53MMuRnKSpY31PwYaGaILh3wxJGz9TkTPEETxoCWZrgvOlmyMzxFEwVJE5xZKzvyJ4WxEc16Gd4Xe3Weq4XH2jKRikqOkGQ87hQnC7wBmGYLAnesX3M+S87eFATauuN+Qcrh7xIxXJbUIdMw3JGE3ylCWzrieaqCn4zhGM19TQ3z1oH1AX+pWEqIc7wNGAkULBo/ZxRaV9NNyh4Br3rCHZzbzmSfawBL0dNRwpW1kK9mxPXR9povcdrGSZK9c2k0xwFGzjuniCtRSZCZ6ccZ7gaktmgAOtKbG/JnOkJrjcQTdFMsxRQ2cLY3WTIrlCw1eWKn8R6pvt4GFDso3QoL4a3nLk3G6JrtME3dSenpx7PNFTmga0EaJTLQ061sEeQoWXhSo9LTXsaSjoJQRXeZLtDclbCrYzfzHHeaKjHCVOUkQHO3JeEepr56mhiyaYYKjjNU+Fed1wS5VlhWSqI/hYUdDOkaxiKehoyOnrCV5yBHtbWFqTHCCwtpDcYolesVR5yUzTZBb3RNMd0d6WP+SvhuBmRcGxnuQzT95IC285cr41cLGQ6aJJhmi4TMGempxeimBRQw1tFKV+8jd6KuzoSTqqDxzRtpZkurvKEHxlqXKRIjjfUNNXQsNOsRScoWFLT+YeRZVD3GRN0MdQcKqQjHDMrdGGVu3iYJpQx3WGUvfbmxwFfR20WBq0oYY7LMFhhgYtr8jpaEnaOzjawWWaTP8mMr0t/EPDPoqcnxTBI5o58L7uoWnMrpoqPwgVrlAUWE+V+TQl9rawoyP6QGAlQw2TPRX+YSkxyBC8Z6jhHkXBgQL7WII3DVFnRfCrBfxewv9D6xsyjys4VkhWb9pUU627JllV0YDNHMku/ldNMMXDEo4aFnAkk4U6frNEU4XgZUPmEKHUl44KrzmYamjAbh0JFvGnaTLPu1s9jPCwjFpYiN7z1DTOk/nc07CfDFzmCf7i+bfNHXhDtLeBXzTBT5rkMvWOIxpl4EMh2LGJBu2syDnAEx2naEhHDWMMzPZEhygyS1mS5RTJr5ZkoKbEUoYqr2kqdDUE8ztK7OaIntJkFrIECwv8LJTaVx5XJE86go8dFeZ3FN3rjabCAYpoYEeC9zzJVULBbmZhDyd7ko09ydpNZ3nm2Kee4FPPXHnYEF1nqOFEC08LUVcDvYXkJHW8gTaKCk9YGOeIJhqiE4ToPEepdp7IWFjdwnWaufGMwJJCMtUTTBBK9BGCOy2tGGrJTHIwyEOzp6aPzNMOtlZkDvcEWpP5SVNhfkvDxhmSazTJXYrM9U1E0xwFVwqZQwzJxw6+kGGGUj2FglGGmnb1/G51udRSMNlTw6GGnCcUwVcOpmsqTHa06o72sw1RL02p9z0VbnMLOaIX3QKaYKSCFQzBKEUNHTSc48k53RH9wxGMtpQa5KjjW0W0n6XCCCG4yxNNdhQ4R4l1Ff+2sSd6UFHiIEOyqqFgT01mEUMD+joy75jPhOA+oVVLm309FR4yVOlp4RhLiScNmSmaYF5Pw0STrOIoWMSR2UkRXOMp+M4SHW8o8Zoi6OZgjKOaFar8zZDzkWzvKOjkKBjmCXby8JahhjXULY4KlzgKLvAwxVGhvyd4zxB1d9T0piazmKLCVZY5sKiD0y2ZSYrkUEPUbIk+dlQ4SJHTR50k1DPaUWIdTZW9NJwnJMOECgd7ou/MnppMJ02O1VT4Wsh85MnZzcFTngpXGKo84qmwgKbCL/orR/SzJ2crA+t6Mp94KvxJUeIbT3CQu1uIdlQEOzlKfS3UMcrTiFmOuroocrZrT2AcmamOKg8YomeEKm/rlT2sociMaybaUlFhuqHCM2qIJ+rg4EcDFymiDSxzaHdPcpE62pD5kyM5SBMoA1PaUtfIthS85ig1VPiPPYXgYEMNk4Qq7TXBgo7oT57gPUdwgCHzhIVFPFU6OYJzHAX9m5oNrVjeE61miDrqQ4VSa1oiURTsKHC0IfjNwU2WzK6eqK8jWln4g15TVBnqmDteCJ501PGAocJhhqjZdtBEB6lnhLreFJKxmlKbeGrqLiSThVIbCdGzloasa6lpMQXHCME2boLpJgT7yWaemu6wBONbqGNVRS0PKIL7LckbjmQtR7K8I5qtqel+T/ChJTNIKLjdUMNIRyvOEko9YYl2cwQveBikCNawJKcLBbc7+JM92mysNvd/Fqp8a0k6CNEe7cnZrxlW0wQXaXjaktnRwNOGZKYiONwS7a1JVheq3WgJHlQUGKHKmp4KAxXR/ULURcNgoa4zhKSLpZR3kxRRb0NmD0OFn+UCS7CzI1nbP6+o4x47QZE5xRCt3ZagnYcvmpYQktXdk5YKXTzBC57kKEe0VVuiSYqapssMS3C9p2CKkHOg8B8Pa8p5atrIw3qezIWanMGa5HRDNF6RM9wcacl0N+Q8Z8hsIkSnaIIdHRUOEebAPy1zbCkhM062FCJtif7PU+UtoVXzWKqM1PxXO8cfdruhFQ/a6x3JKYagvVDhQEtNiyiiSQ7OsuRsZUku0CRNDs4Sog6KKjsZgk2bYJqijgsEenoKeniinRXBn/U3lgpPdyDZynQx8IiioMnCep5Ky8mjGs6Wty0l1hUQTcNWswS3WRp2kCNZwJG8omG8JphPUaFbC8lEfabwP7VtM9yoaNCAjpR41VNhrD9LkbN722v0CoZMByFzhaW+MyzRYEWFDQwN2M4/JiT76PuljT3VU/A36eaIThb+R9oZGOAJ9tewkgGvqOMNRWYjT/Cwu99Q8LqDE4TgbLWxJ1jaDDAERsFOFrobgjUsBScaguXU8kKm2RL19tRypSHnHNlHiIZqgufs4opgQdVdwxBNNFBR6kVFqb8ogimOzB6a6HTzrlDHEpYaxjiiA4TMQobkDg2vejjfwJGWmnbVFAw3H3hq2NyQfG7hz4aC+w3BbwbesG0swYayvpAs6++Ri1Vfzx93mFChvyN5xVHTS+0p9aqCAxyZ6ZacZyw5+7uuQkFPR9DDk9NOiE7X1PCYJVjVUqq7JlrHwWALF5nfHNGjApdpqgzx5OwilDhCiDYTgnc9waGW4BdLNNUQvOtpzDOWHDH8D7TR/A/85KljEQu3NREc4Pl/6B1Hhc8Umb5CsKMmGC9EPcxoT2amwHNCmeOEnOPbklnMkbOgIvO5UMOpQrS9UGVdt6iH/fURjhI/WOpaW9OKLYRod6HCUEdOX000wpDZQ6hwg6LgZfOqo1RfT/CrJzjekXOGhpc1VW71ZLbXyyp+93ILbC1kPtIEYx0FIx1VDrLoVzXRKRYWk809yYlC9ImcrinxtabKnzRJk3lAU1OLEN1j2zrYzr2myHRXJFf4h4QKT1qSTzTB5+ZNTzTRkAxX8FcLV2uS8eoQQ2aAkFzvCM72sJIcJET3WPjRk5wi32uSS9rfZajpWEvj9hW42F4o5NytSXYy8IKHay10VYdrcl4SkqscrXpMwyGOgtkajheSxdQqmpxP1L3t4R5PqasFnrQEjytq6qgp9Y09Qx9o4S1FzhUCn1kyHSzBWLemoSGvOqLNhZyBjmCaAUYpMgt4Ck7wBBMMwWKWgjsUwTaGVsxWC1mYoKiyqqeGKYqonSIRQ3KIkHO0pmAxTdBHkbOvfllfr+AA+7gnc50huVKYK393FOyg7rbPO/izI7hE4CnHHHnJ0ogNPRUGeUpsrZZTBJcrovUcJe51BPsr6GkJdhCCsZ6aTtMEb2pqWkqeVtDXE/QVggsU/Nl86d9RMF3DxvZTA58agu810RWawCiSzzXBeU3MMW9oyJUedvNEvQyNu1f10BSMddR1vaLCYpYa/mGocLSiYDcLbQz8aMn5iyF4xBNMs1P0QEOV7o5gaWGuzSeLue4tt3ro7y4Tgm4G/mopdZgl6q0o6KzJWE3mMksNr3r+a6CbT8g5wZNzT9O7fi/zpaOmnz3BRoqos+tv9zMbdpxsqDBOEewtJLt7cg5wtKKbvldpSzRRCD43VFheCI7yZLppggMVBS/KMAdHODJvOwq2NQSbKKKPLdFWQs7Fqo+mpl01JXYRgq8dnGLhTiFzqmWsUMdpllZdbKlyvSdYxhI9YghOtxR8LgSLWHK62mGGVoxzBE8LNWzqH9CUesQzFy5RQzTc56mhi6fgXEWwpKfE5Z7M05ZgZUPmo6auiv8YKzDYwWBLMErIbKHJvOwIrvEdhOBcQ9JdU1NHQ7CXn2XIDFBKU2WAgcX9UAUzDXWd5alwuyJ41Z9rjKLCL4aCp4WarhPm2rH+SaHUYE001JDZ2ZAzXPjdMpZWvC9wmqIB2lLhQ01D5jO06hghWMndbM7yRJMsoCj1vYbnFQVrW9jak3OlEJ3s/96+p33dEPRV5GxiqaGjIthUU6FFEZyqCa5qJrpBdzSw95IUnOPIrCUUjRZQFrbw5PR0R1qiYx3cb6nrWUMrBmmiBQxVHtTew5ICP/ip6g4hed/Akob/32wvBHsIOX83cI8hGeNeNPCIkPmXe8fPKx84OMSRM1MTdXSwjCZ4S30jVGhvqTRak/OVhgGazHuOCud5onEO1lJr6ecVyaOK6H7zqlBlIaHE0oroCgfvGJIdPcmfLNGLjpz7hZwZQpUbFME0A1cIJa7VNORkgfsMBatbKgwwJM9bSvQXeNOvbIjelg6WWvo5kvbKaJJNHexkKNHL9xRyFlH8Ti2riB5wVPhUk7nGkJnoCe428LR/wRGdYIlmWebCyxou1rCk4g/ShugBDX0V0ZQWkh0dOVsagkM0yV6OoLd5ye+pRlsCr0n+KiQrGuq5yJDzrTAXHtLUMduTDBVKrSm3eHL+6ijxhFDX9Z5gVU/wliHYTMiMFpKLNMEywu80wd3meoFmt6VbRMPenhrOc6DVe4pgXU8DnnHakLOIIrlF4FZPIw6R+zxBP0dyq6OOZ4Q5sLKCcz084ok+VsMMyQhNZmmBgX5xIXOEJTmi7VsGTvMTNdHHhpzdbE8Du2oKxgvBqQKdDDnTFOylCFaxR1syz2iqrOI/FEpNc3C6f11/7+ASS6l2inq2ciTrCCzgyemrCL5SVPjQkdPZUmGy2c9Sw9FtR1sS30RmsKPCS4rkIC/2U0MduwucYolGaPjKEyhzmiPYXagyWbYz8LWBDdzRimAXzxx4z8K9hpzlhLq+NiQ97HuKorMUfK/OVvC2JfiHUPCQI/q7J2gjK+tTDNxkCc4TMssqCs4TGtLVwQihyoAWgj9bosU80XGW6Ac9TJGziaUh5+hnFcHOnlaM1iRn29NaqGENTTTSUHCH2tWTeV0osUhH6psuVLjRUmGWhm6OZEshGeNowABHcJ2Bpy2ZszRcKkRXd2QuKVEeXnbfaEq825FguqfgfE2whlChSRMdron+LATTPQ2Z369t4B9C5gs/ylzv+CMmepIDPclFQl13W0rspPd1JOcbghGOEutqCv5qacURQl3dDKyvyJlqKXGPgcM9FfawJAMVmdcspcYKOZc4GjDYkFlK05olNMHyHn4zFNykyOxt99RkHlfwmiHo60l2EKI+mhreEKp080Tbug08BVPcgoqC5zWt+NLDTZ7oNSF51N1qie7Va3uCCwyZbkINf/NED6jzOsBdZjFN8oqG3wxVunqCSYYKf3EdhJyf9YWGf7tRU2oH3VHgPr1fe5J9hOgHd7xQ0y7qBwXr23aGErP0cm64JVjZwsOGqL+mhNgZmhJLW2oY4UhedsyBgzrCKrq7BmcpNVhR6jBPq64Vgi+kn6XE68pp8J5/+0wRHGOpsKenQn9DZntPzjRLZpDAdD2fnSgkG9tmIXnUwQ6WVighs7Yi2MxQ0N3CqYaCXkJ0oyOztMDJjmSSpcpvlrk0RMMOjmArQ04PRV1DO1FwhCVaUVPpKUM03JK5SxPsIWRu8/CGHi8UHChiqGFDTbSRJWeYUDDcH6vJWUxR4k1FXbMUwV6e4AJFXS8oMqsZKqzvYQ9DDQdZckY4aGsIhtlubbd2r3j4QBMoTamdPZk7O/Bf62lacZwneNjQoGcdVU7zJOd7ghsUHOkosagic6cnWc8+4gg285R6zZP5s1/LUbCKIznTwK36PkdwlOrl4U1LwfdCCa+IrvFkmgw1PCAUXKWo0sURXWcI2muKJlgyFzhynCY4RBOsqCjoI1R5zREco0n2Vt09BQtYSizgKNHfUmUrQ5UOCh51BFcLmY7umhYqXKQomOop8bUnWNNQcIiBcYaC6xzMNOS8JQQfeqKBmmglB+97ok/lfk3ygaHSyZaCRTzRxQo6GzLfa2jWBPepw+UmT7SQEJyiyRkhBLMVOfcoMjcK0eZChfUNzFAUzCsEN5vP/X1uP/n/aoMX+K+nw/Hjr/9xOo7j7Pju61tLcgvJpTWXNbfN5jLpi6VfCOviTktKlFusQixdEKWmEBUKNaIpjZRSSOXSgzaaKLdabrm1/9nZ+/f+vd/vz/v9+Xy+zZ7PRorYoZqyLrCwQdEAixxVOEXNNnjX2nUSRlkqGmWowk8lxR50JPy9Bo6qJXaXwNvREBvnThPEPrewryLhcAnj5WE15Fqi8W7R1sAuEu86S4ENikItFN4xkv9Af4nXSnUVcLiA9xzesFpivRRVeFKtsMRaKBhuSbjOELnAUtlSQUpXgdfB4Z1oSbnFEetbQ0IrAe+Y+pqnDcEJFj6S8LDZzZHwY4e3XONNlARraomNEt2bkvGsosA3ioyHm+6jCMbI59wqt4eeara28IzEmyPgoRaUOEDhTVdEJhmCoTWfC0p8aNkCp0oYqih2iqGi4yXeMkOsn4LdLLnmKfh/YogjNsPebeFGR4m9BJHLzB61XQ3BtpISfS2FugsK9FAtLWX1dCRcrCnUp44CNzuCowUZmxSRgYaE6Za0W2u/E7CVXCiI/UOR8aAm1+OSyE3mOUcwyc1zBBeoX1kiKy0Zfxck1Gsyulti11i83QTBF5Kg3pDQThFMVHiPSlK+0cSedng/VaS8bOZbtsBcTcZAR8JP5KeqQ1OYKAi20njdNNRpgnsU//K+JnaXJaGTomr7aYIphoRn9aeShJWKEq9LcozSF7QleEfDI5LYm5bgVkFkRwVDBCVu0DDIkGupo8TZBq+/pMQURYErJQmPKGKjNDkWOLx7Jd5QizdUweIaKrlP7SwJDhZvONjLkOsBBX9UpGxnydhXkfBLQ8IxgojQbLFnJf81JytSljclYYyEFyx0kVBvKWOFJmONpshGAcsduQY5giVNCV51eOdJYo/pLhbvM0uDHSevNKRcrKZIqnCtJeEsO95RoqcgGK4ocZcho1tTYtcZvH41pNQ7vA0WrhIfOSraIIntIAi+NXWCErdbkvrWwjRLrt0NKUdL6KSOscTOdMSOUtBHwL6OLA0vNSdynaWQEnCpIvKaIrJJEbvHkmuNhn6OjM8VkSGSqn1uYJCGHnq9I3aLhNME3t6GjIkO7xrNFumpyTNX/NrwX7CrIRiqqWijI9JO4d1iieykyfiposQIQ8YjjsjlBh6oHWbwRjgYJQn2NgSnNycmJAk3NiXhx44Sxykihxm8ybUwT1OVKySc7vi3OXVkdBJ4AyXBeksDXG0IhgtYY0lY5ahCD0ehborIk5aUWRJviMA7Xt5kyRjonrXENkm8yYqgs8VzgrJmClK20uMM3jRJ0FiQICQF9hdETlLQWRIb5ki6WDfWRPobvO6a4GP5mcOrNzDFELtTkONLh9dXE8xypEg7z8A9jkhrQ6Fhjlg/QVktJXxt4WXzT/03Q8IaQWSqIuEvloQ2mqC9Jfi7wRul4RX3pSPlzpoVlmCtI2jvKHCFhjcM3sN6lqF6HxnKelLjXWbwrpR4xzuCrTUZx2qq9oAh8p6ixCUGr78g8oyjRAtB5CZFwi80VerVpI0h+IeBxa6Zg6kWvpDHaioYYuEsRbDC3eOmC2JvGYLeioxGknL2UATNJN6hmtj1DlpLvDVmocYbrGCVJKOrg4X6DgddLA203BKMFngdJJFtFd7vJLm6KEpc5yjQrkk7M80SGe34X24nSex1Ra5Omgb71JKyg8SrU3i/kARKwWpH0kOGhKkObyfd0ZGjvyXlAkVZ4xRbYJ2irFMkFY1SwyWxr2oo4zlNiV+7zmaweFpT4kR3kaDAFW6xpSqzJay05FtYR4HmZhc9UxKbbfF2V8RG1MBmSaE+kmC6JnaRXK9gsiXhJHl/U0qM0WTcbyhwkYIvFGwjSbjfwhiJt8ZSQU+Bd5+marPMOkVkD0muxYLIfEuhh60x/J92itguihJSEMySVPQnTewnEm+620rTQEMsOfo4/kP/0ARvWjitlpSX7GxBgcMEsd3EEeYWvdytd+Saawi6aCIj1CkGb6Aj9rwhx16Cf3vAwFy5pyLhVonXzy51FDpdEblbkdJbUcEPDEFzQ8qNmhzzLTmmKWKbFCXeEuRabp6rxbvAtLF442QjQ+wEA9eL1xSR7Q0JXzlSHjJ4exq89yR0laScJ/FW6z4a73pFMEfDiRZvuvijIt86RaSFOl01riV2mD1UEvxGk/Geg5aWwGki1zgKPG9J2U8PEg8qYvMsZeytiTRXBMslCU8JSlxi8EabjwUldlDNLfzTUmCgxWsjqWCOHavYAqsknKFIO0yQ61VL5AVFxk6WhEaCAkdJgt9aSkzXlKNX2jEa79waYuc7gq0N3GDJGCBhoiTXUEPsdknCUE1CK0fwsiaylSF2uiDyO4XX3pFhNd7R4itFGc0k/ElBZwWvq+GC6szVeEoS/MZ+qylwpKNKv9Z469UOjqCjwlusicyTxG6VpNxcQ8IncoR4RhLbR+NdpGGmJWOcIzJGUuKPGpQg8rrG21dOMqQssJQ4RxH5jaUqnZuQ0F4Q+cjxLwPtpZbIAk3QTJHQWBE5S1BokoVtDd6lhqr9UpHSUxMcIYl9pojsb8h4SBOsMQcqvOWC2E8EVehqiJ1hrrAEbQxeK0NGZ0Gkq+guSRgniM23bIHVkqwx4hiHd7smaOyglyIyQuM978j4VS08J/A2G1KeMBRo4fBaSNhKUEZfQewVQ/C1I+MgfbEleEzCUw7mKXI0M3hd1EESVji8x5uQ41nxs1q4RMJCCXs7Iq9acpxn22oSDnQ/sJTxsCbHIYZiLyhY05TY0ZLIOQrGaSJDDN4t8pVaIrsqqFdEegtizc1iTew5Q4ayBDMUsQMkXocaYkc0hZua412siZ1rSXlR460zRJ5SlHGe5j801RLMlJTxtaOM3Q1pvxJ45zUlWFD7rsAbpfEm1JHxG0eh8w2R7QQVzBUw28FhFp5QZzq8t2rx2joqulYTWSuJdTYfWwqMFMcovFmSyJPNyLhE4E10pHzYjOC3huArRa571ZsGajQpQx38SBP5pyZB6lMU3khDnp0MBV51BE9o2E+TY5Ml2E8S7C0o6w1xvCZjf0HkVEHCzFoyNmqC+9wdcqN+Tp7jSDheE9ws8Y5V0NJCn2bk2tqSY4okdrEhx1iDN8cSudwepWmAGXKcJXK65H9to8jYQRH7SBF01ESUJdd0TayVInaWhLkOjlXE5irKGOnI6GSWGCJa482zBI9rCr0jyTVcEuzriC1vcr6mwFGSiqy5zMwxBH/TJHwjSPhL8+01kaaSUuMFKTcLEvaUePcrSmwn8DZrgikWb7CGPxkSjhQwrRk57tctmxLsb9sZvL9LSlyuSLlWkqOjwduo8b6Uv1DkmudIeFF2dHCgxVtk8dpIvHpBxhEOdhKk7OLIUSdJ+cSRY57B+0DgGUUlNfpthTfGkauzxrvTsUUaCVhlKeteTXCoJDCa2NOKhOmC4G1H8JBd4OBZReSRGkqcb/CO1PyLJTLB4j1q8JYaIutEjSLX8YKM+a6phdMsdLFUoV5RTm9JSkuDN8WcIon0NZMNZWh1q8C7SJEwV5HxrmnnTrf3KoJBlmCYI2ilSLlfEvlE4011NNgjgthzEua0oKK7JLE7HZHlEl60BLMVFewg4EWNt0ThrVNEVkkiTwpKXSWJzdRENgvKGq4IhjsiezgSFtsfCUq8qki5S1LRQeYQQ4nemmCkImWMw3tFUoUBZk4NOeZYEp4XRKTGa6wJjrWNHBVJR4m3FCnbuD6aak2WsMTh3SZImGCIPKNgsDpVwnsa70K31lCFJZYcwwSMFcQulGTsZuEaSdBXkPGZhu0FsdUO73RHjq8MPGGIfaGIbVTk6iuI3GFgucHrIQkmWSJdBd7BBu+uOryWAhY7+Lki9rK5wtEQzWwvtbqGhIMFwWRJsElsY4m9IIg9L6lCX0VklaPAYkfkZEGDnOWowlBJjtMUkcGK4Lg6EtoZInMUBVYLgn0UsdmCyCz7gIGHFfk+k1QwTh5We7A9x+IdJ6CvIkEagms0hR50eH9UnTQJ+2oiKyVlLFUE+8gBGu8MQ3CppUHesnjTHN4QB/UGPhCTHLFPHMFrCqa73gqObUJGa03wgbhHkrCfpEpzNLE7JDS25FMKhlhKKWKfCgqstLCPu1zBXy0J2ztwjtixBu8UTRn9LVtkmCN2iyFhtME70JHRQ1KVZXqKI/KNIKYMCYs1GUMEKbM1bKOI9LDXC7zbHS+bt+1MTWS9odA9DtrYtpbImQJ2VHh/lisEwaHqUk1kjKTAKknkBEXkbkdMGwq0dnhzLJF3NJH3JVwrqOB4Sca2hti75nmJN0WzxS6UxDYoEpxpa4htVlRjkYE7DZGzJVU72uC9IyhQL4i8YfGWSYLLNcHXloyz7QhNifmKSE9JgfGmuyLhc403Xm9vqcp6gXe3xuuv8F6VJNxkyTHEkHG2g0aKXL0MsXc1bGfgas2//dCONXiNLCX+5mB7eZIl1kHh7ajwpikyzlUUWOVOsjSQlsS+M0R+pPje/dzBXRZGO0rMtgQrLLG9VSu9n6CMXS3BhwYmSoIBhsjNBmZbgusE9BCPCP5triU4VhNbJfE+swSP27aayE8tuTpYYjtrYjMVGZdp2NpS1s6aBnKSHDsbKuplKbHM4a0wMFd/5/DmGyKrJSUaW4IBrqUhx0vyfzTBBLPIUcnZdrAkNsKR0sWRspumSns6Ch0v/qqIbBYUWKvPU/CFoyrDJGwSNFhbA/MlzKqjrO80hRbpKx0Jewsi/STftwGSlKc1JZyAzx05dhLEdnfQvhZOqiHWWEAHC7+30FuRcZUgaO5gpaIK+xsiHRUsqaPElTV40xQZQ107Q9BZE1nryDVGU9ZSQ47bmhBpLcYpUt7S+xuK/FiT8qKjwXYw5ypS2iuCv7q1gtgjhuBuB8LCFY5cUuCNtsQOFcT+4Ih9JX+k8Ea6v0iCIRZOtCT0Et00JW5UeC85Cg0ScK0k411HcG1zKtre3SeITBRk7WfwDhEvaYLTHP9le0m8By0JDwn4TlLW/aJOvGHxdjYUes+ScZigCkYQdNdEOhkiezgShqkx8ueKjI8lDfK2oNiOFvrZH1hS+tk7NV7nOmLHicGWEgubkXKdwdtZknCLJXaCpkrjZBtLZFsDP9CdxWsSr05Sxl6CMmoFbCOgryX40uDtamB7SVmXW4Ihlgpmq+00tBKUUa83WbjLUNkzDmY7cow1JDygyPGlhgGKYKz4vcV7QBNbJIgM11TUqZaMdwTeSguH6rOaw1JRKzaaGyxVm2EJ/uCIrVWUcZUkcp2grMsEjK+DMwS59jQk3Kd6SEq1d0S6uVmO4Bc1lDXTUcHjluCXEq+1OlBDj1pi9zgiXxnKuE0SqTXwhqbETW6RggMEnGl/q49UT2iCzgJvRwVXS2K/d6+ZkyUl7jawSVLit46EwxVljDZwoSQ20sDBihztHfk2yA8NVZghiXwrYHQdfKAOtzsayjhY9bY0yE2CWEeJ9xfzO423xhL5syS2TFJofO2pboHob0nY4GiAgRrvGQEDa/FWSsoaaYl0syRsEt3kWoH3B01shCXhTUWe9w3Bt44SC9QCh3eShQctwbaK2ApLroGCMlZrYqvlY3qYhM0aXpFkPOuoqJ3Dm6fxXrGwVF9gCWZagjPqznfkuMKQ8DPTQRO8ZqG1hPGKEm9IgpGW4DZDgTNriTxvFiq+Lz+0cKfp4wj6OCK9JSnzNSn9LFU7UhKZZMnYwcJ8s8yRsECScK4j5UOB95HFO0CzhY4xJxuCix0lDlEUeMdS6EZBkTsUkZ4K74dugyTXS7aNgL8aqjDfkCE0ZbwkCXpaWCKhl8P7VD5jxykivSyxyZrYERbe168LYu9ZYh86IkscgVLE7tWPKmJv11CgoyJltMEbrohtVAQfO4ImltiHEroYEs7RxAarVpY8AwXMcMReFOTYWe5iiLRQxJ5Q8DtJ8LQhWOhIeFESPGsILhbNDRljNbHzNRlTFbk2S3L0NOS6V1KFJYKUbSTcIIhM0wQ/s2TM0SRMNcQmSap3jCH4yhJZKSkwyRHpYYgsFeQ4U7xoCB7VVOExhXepo9ABBsYbvGWKXPME3lyH95YioZ0gssQRWWbI+FaSMkXijZXwgiTlYdPdkNLaETxlyDVIwqeaEus0aTcYcg0RVOkpR3CSJqIddK+90JCxzsDVloyrFd5ZAr4TBKfaWa6boEA7C7s6EpYaeFPjveooY72mjIccLHJ9HUwVlDhKkmutJDJBwnp1rvulJZggKDRfbXAkvC/4l3ozQOG9a8lxjx0i7nV4jSXc7vhe3OwIxjgSHjdEhhsif9YkPGlus3iLFDnWOFhtCZbJg0UbQcIaR67JjthoCyMEZRwhiXWyxO5QxI6w5NhT4U1WsJvDO60J34fW9hwzwlKij6ZAW9ne4L0s8C6XeBMEkd/LQy1VucBRot6QMlbivaBhoBgjqGiCJNhsqVp/S2SsG6DIONCR0dXhvWbJ+MRRZJkkuEjgDXJjFQW6SSL7GXK8Z2CZg7cVsbWGoKmEpzQ5elpiy8Ryg7dMkLLUEauzeO86CuwlSOlgYLojZWeJ9xM3S1PWfEfKl5ISLQ0MEKR8YOB2QfCxJBjrKPCN4f9MkaSsqoVXJBmP7EpFZ9UQfOoOFwSzBN4MQ8LsGrymlipcJQhmy0GaQjPqCHaXRwuCZwRbqK2Fg9wlClZqYicrIgMdZfxTQ0c7TBIbrChxmuzoKG8XRaSrIhhiyNFJkrC7oIAWMEOQa5aBekPCRknCo4IKPrYkvCDI8aYmY7WFtprgekcJZ3oLIqssCSMtFbQTJKwXYy3BY5oCh2iKPCpJOE+zRdpYgi6O2KmOAgvVCYaU4ySRek1sgyFhJ403QFHiVEmJHwtybO1gs8Hr5+BETQX3War0qZngYGgtVZtoqd6vFSk/UwdZElYqyjrF4HXUeFspIi9IGKf4j92pKGAdCYMVsbcV3kRF0N+R8LUd5PCsIGWoxDtBkCI0nKofdJQxT+LtZflvuc8Q3CjwWkq8KwUpHzkK/NmSsclCL0nseQdj5FRH5CNHSgtLiW80Of5HU9Hhlsga9bnBq3fEVltKfO5IaSTmGjjc4J0otcP7QsJUSQM8pEj5/wCuUuC2DWz8AAAAAElFTkSuQmCC\");}.ace-ambiance .ace_indent-guide {background: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNQUFD4z6Crq/sfAAuYAuYl+7lfAAAAAElFTkSuQmCC\") right repeat-y;}";
- var r = e("../lib/dom");
- r.importCssString(t.cssText, t.cssClass)
-})
\ No newline at end of file
diff --git a/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/theme-chaos.js b/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/theme-chaos.js
deleted file mode 100644
index 3f0eabc..0000000
--- a/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/theme-chaos.js
+++ /dev/null
@@ -1,5 +0,0 @@
-ace.define("ace/theme/chaos", ["require", "exports", "module", "ace/lib/dom"], function (e, t, n) {
- t.isDark = !0, t.cssClass = "ace-chaos", t.cssText = ".ace-chaos .ace_gutter {background: #141414;color: #595959;border-right: 1px solid #282828;}.ace-chaos .ace_gutter-cell.ace_warning {background-image: none;background: #FC0;border-left: none;padding-left: 0;color: #000;}.ace-chaos .ace_gutter-cell.ace_error {background-position: -6px center;background-image: none;background: #F10;border-left: none;padding-left: 0;color: #000;}.ace-chaos .ace_print-margin {border-left: 1px solid #555;right: 0;background: #1D1D1D;}.ace-chaos .ace_scroller {background-color: #161616;}.ace-chaos .ace_text-layer {cursor: text;color: #E6E1DC;}.ace-chaos .ace_cursor {border-left: 2px solid #FFFFFF;}.ace-chaos .ace_cursor.ace_overwrite {border-left: 0px;border-bottom: 1px solid #FFFFFF;}.ace-chaos .ace_marker-layer .ace_selection {background: #494836;}.ace-chaos .ace_marker-layer .ace_step {background: rgb(198, 219, 174);}.ace-chaos .ace_marker-layer .ace_bracket {margin: -1px 0 0 -1px;border: 1px solid #FCE94F;}.ace-chaos .ace_marker-layer .ace_active-line {background: #333;}.ace-chaos .ace_gutter-active-line {background-color: #222;}.ace-chaos .ace_invisible {color: #404040;}.ace-chaos .ace_keyword {color:#00698F;}.ace-chaos .ace_keyword.ace_operator {color:#FF308F;}.ace-chaos .ace_constant {color:#1EDAFB;}.ace-chaos .ace_constant.ace_language {color:#FDC251;}.ace-chaos .ace_constant.ace_library {color:#8DFF0A;}.ace-chaos .ace_constant.ace_numeric {color:#58C554;}.ace-chaos .ace_invalid {color:#FFFFFF;background-color:#990000;}.ace-chaos .ace_invalid.ace_deprecated {color:#FFFFFF;background-color:#990000;}.ace-chaos .ace_support {color: #999;}.ace-chaos .ace_support.ace_function {color:#00AEEF;}.ace-chaos .ace_function {color:#00AEEF;}.ace-chaos .ace_string {color:#58C554;}.ace-chaos .ace_comment {color:#555;font-style:italic;padding-bottom: 0px;}.ace-chaos .ace_variable {color:#997744;}.ace-chaos .ace_meta.ace_tag {color:#BE53E6;}.ace-chaos .ace_entity.ace_other.ace_attribute-name {color:#FFFF89;}.ace-chaos .ace_markup.ace_underline {text-decoration: underline;}.ace-chaos .ace_fold-widget {text-align: center;}.ace-chaos .ace_fold-widget:hover {color: #777;}.ace-chaos .ace_fold-widget.ace_start,.ace-chaos .ace_fold-widget.ace_end,.ace-chaos .ace_fold-widget.ace_closed{background: none;border: none;box-shadow: none;}.ace-chaos .ace_fold-widget.ace_start:after {content: '▾'}.ace-chaos .ace_fold-widget.ace_end:after {content: '▴'}.ace-chaos .ace_fold-widget.ace_closed:after {content: '‣'}";
- var r = e("../lib/dom");
- r.importCssString(t.cssText, t.cssClass)
-})
\ No newline at end of file
diff --git a/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/theme-chrome.js b/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/theme-chrome.js
deleted file mode 100644
index 675dcee..0000000
--- a/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/theme-chrome.js
+++ /dev/null
@@ -1,5 +0,0 @@
-ace.define("ace/theme/chrome", ["require", "exports", "module", "ace/lib/dom"], function (e, t, n) {
- t.isDark = !1, t.cssClass = "ace-chrome", t.cssText = '.ace-chrome .ace_gutter {background: #ebebeb;color: #333;overflow : hidden;}.ace-chrome .ace_print-margin {width: 1px;background: #e8e8e8;}.ace-chrome .ace_scroller {background-color: #FFFFFF;}.ace-chrome .ace_cursor {border-left: 2px solid black;}.ace-chrome .ace_overwrite-cursors .ace_cursor {border-left: 0px;border-bottom: 1px solid black;}.ace-chrome .ace_invisible {color: rgb(191, 191, 191);}.ace-chrome .ace_constant.ace_buildin {color: rgb(88, 72, 246);}.ace-chrome .ace_constant.ace_language {color: rgb(88, 92, 246);}.ace-chrome .ace_constant.ace_library {color: rgb(6, 150, 14);}.ace-chrome .ace_invalid {background-color: rgb(153, 0, 0);color: white;}.ace-chrome .ace_fold {}.ace-chrome .ace_support.ace_function {color: rgb(60, 76, 114);}.ace-chrome .ace_support.ace_constant {color: rgb(6, 150, 14);}.ace-chrome .ace_support.ace_type,.ace-chrome .ace_support.ace_class.ace-chrome .ace_support.ace_other {color: rgb(109, 121, 222);}.ace-chrome .ace_variable.ace_parameter {font-style:italic;color:#FD971F;}.ace-chrome .ace_keyword.ace_operator {color: rgb(104, 118, 135);}.ace-chrome .ace_comment {color: #236e24;}.ace-chrome .ace_comment.ace_doc {color: #236e24;}.ace-chrome .ace_comment.ace_doc.ace_tag {color: #236e24;}.ace-chrome .ace_constant.ace_numeric {color: rgb(0, 0, 205);}.ace-chrome .ace_variable {color: rgb(49, 132, 149);}.ace-chrome .ace_xml-pe {color: rgb(104, 104, 91);}.ace-chrome .ace_entity.ace_name.ace_function {color: #0000A2;}.ace-chrome .ace_markup.ace_heading {color: rgb(12, 7, 255);}.ace-chrome .ace_markup.ace_list {color:rgb(185, 6, 144);}.ace-chrome .ace_marker-layer .ace_selection {background: rgb(181, 213, 255);}.ace-chrome .ace_marker-layer .ace_step {background: rgb(252, 255, 0);}.ace-chrome .ace_marker-layer .ace_stack {background: rgb(164, 229, 101);}.ace-chrome .ace_marker-layer .ace_bracket {margin: -1px 0 0 -1px;border: 1px solid rgb(192, 192, 192);}.ace-chrome .ace_marker-layer .ace_active-line {background: rgba(0, 0, 0, 0.07);}.ace-chrome .ace_gutter-active-line {background-color : #dcdcdc;}.ace-chrome .ace_marker-layer .ace_selected-word {background: rgb(250, 250, 255);border: 1px solid rgb(200, 200, 250);}.ace-chrome .ace_storage,.ace-chrome .ace_keyword,.ace-chrome .ace_meta.ace_tag {color: rgb(147, 15, 128);}.ace-chrome .ace_string.ace_regex {color: rgb(255, 0, 0)}.ace-chrome .ace_string {color: #1A1AA6;}.ace-chrome .ace_entity.ace_other.ace_attribute-name {color: #994409;}.ace-chrome .ace_indent-guide {background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==") right repeat-y;}';
- var r = e("../lib/dom");
- r.importCssString(t.cssText, t.cssClass)
-})
\ No newline at end of file
diff --git a/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/theme-clouds.js b/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/theme-clouds.js
deleted file mode 100644
index 14afc53..0000000
--- a/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/theme-clouds.js
+++ /dev/null
@@ -1,5 +0,0 @@
-ace.define("ace/theme/clouds", ["require", "exports", "module", "ace/lib/dom"], function (e, t, n) {
- t.isDark = !1, t.cssClass = "ace-clouds", t.cssText = '.ace-clouds .ace_gutter {background: #ebebeb;color: #333}.ace-clouds .ace_print-margin {width: 1px;background: #e8e8e8}.ace-clouds .ace_scroller {background-color: #FFFFFF}.ace-clouds .ace_text-layer {color: #000000}.ace-clouds .ace_cursor {border-left: 2px solid #000000}.ace-clouds .ace_overwrite-cursors .ace_cursor {border-left: 0px;border-bottom: 1px solid #000000}.ace-clouds .ace_marker-layer .ace_selection {background: #BDD5FC}.ace-clouds.ace_multiselect .ace_selection.ace_start {box-shadow: 0 0 3px 0px #FFFFFF;border-radius: 2px}.ace-clouds .ace_marker-layer .ace_step {background: rgb(255, 255, 0)}.ace-clouds .ace_marker-layer .ace_bracket {margin: -1px 0 0 -1px;border: 1px solid #BFBFBF}.ace-clouds .ace_marker-layer .ace_active-line {background: #FFFBD1}.ace-clouds .ace_gutter-active-line {background-color : #dcdcdc}.ace-clouds .ace_marker-layer .ace_selected-word {border: 1px solid #BDD5FC}.ace-clouds .ace_invisible {color: #BFBFBF}.ace-clouds .ace_keyword,.ace-clouds .ace_meta,.ace-clouds .ace_support.ace_constant.ace_property-value {color: #AF956F}.ace-clouds .ace_keyword.ace_operator {color: #484848}.ace-clouds .ace_keyword.ace_other.ace_unit {color: #96DC5F}.ace-clouds .ace_constant.ace_language {color: #39946A}.ace-clouds .ace_constant.ace_numeric {color: #46A609}.ace-clouds .ace_constant.ace_character.ace_entity {color: #BF78CC}.ace-clouds .ace_invalid {background-color: #FF002A}.ace-clouds .ace_fold {background-color: #AF956F;border-color: #000000}.ace-clouds .ace_storage,.ace-clouds .ace_support.ace_class,.ace-clouds .ace_support.ace_function,.ace-clouds .ace_support.ace_other,.ace-clouds .ace_support.ace_type {color: #C52727}.ace-clouds .ace_string {color: #5D90CD}.ace-clouds .ace_comment {color: #BCC8BA}.ace-clouds .ace_entity.ace_name.ace_tag,.ace-clouds .ace_entity.ace_other.ace_attribute-name {color: #606060}.ace-clouds .ace_markup.ace_underline {text-decoration: underline}.ace-clouds .ace_indent-guide {background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==") right repeat-y}';
- var r = e("../lib/dom");
- r.importCssString(t.cssText, t.cssClass)
-})
\ No newline at end of file
diff --git a/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/theme-clouds_midnight.js b/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/theme-clouds_midnight.js
deleted file mode 100644
index 048450d..0000000
--- a/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/theme-clouds_midnight.js
+++ /dev/null
@@ -1,5 +0,0 @@
-ace.define("ace/theme/clouds_midnight", ["require", "exports", "module", "ace/lib/dom"], function (e, t, n) {
- t.isDark = !0, t.cssClass = "ace-clouds-midnight", t.cssText = ".ace-clouds-midnight .ace_gutter {background: #232323;color: #929292}.ace-clouds-midnight .ace_print-margin {width: 1px;background: #232323}.ace-clouds-midnight .ace_scroller {background-color: #191919}.ace-clouds-midnight .ace_text-layer {color: #929292}.ace-clouds-midnight .ace_cursor {border-left: 2px solid #7DA5DC}.ace-clouds-midnight .ace_overwrite-cursors .ace_cursor {border-left: 0px;border-bottom: 1px solid #7DA5DC}.ace-clouds-midnight .ace_marker-layer .ace_selection {background: #000000}.ace-clouds-midnight.ace_multiselect .ace_selection.ace_start {box-shadow: 0 0 3px 0px #191919;border-radius: 2px}.ace-clouds-midnight .ace_marker-layer .ace_step {background: rgb(102, 82, 0)}.ace-clouds-midnight .ace_marker-layer .ace_bracket {margin: -1px 0 0 -1px;border: 1px solid #BFBFBF}.ace-clouds-midnight .ace_marker-layer .ace_active-line {background: rgba(215, 215, 215, 0.031)}.ace-clouds-midnight .ace_gutter-active-line {background-color: rgba(215, 215, 215, 0.031)}.ace-clouds-midnight .ace_marker-layer .ace_selected-word {border: 1px solid #000000}.ace-clouds-midnight .ace_invisible {color: #BFBFBF}.ace-clouds-midnight .ace_keyword,.ace-clouds-midnight .ace_meta,.ace-clouds-midnight .ace_support.ace_constant.ace_property-value {color: #927C5D}.ace-clouds-midnight .ace_keyword.ace_operator {color: #4B4B4B}.ace-clouds-midnight .ace_keyword.ace_other.ace_unit {color: #366F1A}.ace-clouds-midnight .ace_constant.ace_language {color: #39946A}.ace-clouds-midnight .ace_constant.ace_numeric {color: #46A609}.ace-clouds-midnight .ace_constant.ace_character.ace_entity {color: #A165AC}.ace-clouds-midnight .ace_invalid {color: #FFFFFF;background-color: #E92E2E}.ace-clouds-midnight .ace_fold {background-color: #927C5D;border-color: #929292}.ace-clouds-midnight .ace_storage,.ace-clouds-midnight .ace_support.ace_class,.ace-clouds-midnight .ace_support.ace_function,.ace-clouds-midnight .ace_support.ace_other,.ace-clouds-midnight .ace_support.ace_type {color: #E92E2E}.ace-clouds-midnight .ace_string {color: #5D90CD}.ace-clouds-midnight .ace_comment {color: #3C403B}.ace-clouds-midnight .ace_entity.ace_name.ace_tag,.ace-clouds-midnight .ace_entity.ace_other.ace_attribute-name {color: #606060}.ace-clouds-midnight .ace_markup.ace_underline {text-decoration: underline}.ace-clouds-midnight .ace_indent-guide {background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWOQlJT8z1BeXv4fAA2KA6+h9Z+2AAAAAElFTkSuQmCC) right repeat-y}";
- var r = e("../lib/dom");
- r.importCssString(t.cssText, t.cssClass)
-})
\ No newline at end of file
diff --git a/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/theme-cobalt.js b/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/theme-cobalt.js
deleted file mode 100644
index b43531e..0000000
--- a/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/theme-cobalt.js
+++ /dev/null
@@ -1,5 +0,0 @@
-ace.define("ace/theme/cobalt", ["require", "exports", "module", "ace/lib/dom"], function (e, t, n) {
- t.isDark = !0, t.cssClass = "ace-cobalt", t.cssText = ".ace-cobalt .ace_gutter {background: #011e3a;color: #fff}.ace-cobalt .ace_print-margin {width: 1px;background: #011e3a}.ace-cobalt .ace_scroller {background-color: #002240}.ace-cobalt .ace_text-layer {color: #FFFFFF}.ace-cobalt .ace_cursor {border-left: 2px solid #FFFFFF}.ace-cobalt .ace_overwrite-cursors .ace_cursor {border-left: 0px;border-bottom: 1px solid #FFFFFF}.ace-cobalt .ace_marker-layer .ace_selection {background: rgba(179, 101, 57, 0.75)}.ace-cobalt.ace_multiselect .ace_selection.ace_start {box-shadow: 0 0 3px 0px #002240;border-radius: 2px}.ace-cobalt .ace_marker-layer .ace_step {background: rgb(127, 111, 19)}.ace-cobalt .ace_marker-layer .ace_bracket {margin: -1px 0 0 -1px;border: 1px solid rgba(255, 255, 255, 0.15)}.ace-cobalt .ace_marker-layer .ace_active-line {background: rgba(0, 0, 0, 0.35)}.ace-cobalt .ace_gutter-active-line {background-color: rgba(0, 0, 0, 0.35)}.ace-cobalt .ace_marker-layer .ace_selected-word {border: 1px solid rgba(179, 101, 57, 0.75)}.ace-cobalt .ace_invisible {color: rgba(255, 255, 255, 0.15)}.ace-cobalt .ace_keyword,.ace-cobalt .ace_meta {color: #FF9D00}.ace-cobalt .ace_constant,.ace-cobalt .ace_constant.ace_character,.ace-cobalt .ace_constant.ace_character.ace_escape,.ace-cobalt .ace_constant.ace_other {color: #FF628C}.ace-cobalt .ace_invalid {color: #F8F8F8;background-color: #800F00}.ace-cobalt .ace_support {color: #80FFBB}.ace-cobalt .ace_support.ace_constant {color: #EB939A}.ace-cobalt .ace_fold {background-color: #FF9D00;border-color: #FFFFFF}.ace-cobalt .ace_support.ace_function {color: #FFB054}.ace-cobalt .ace_storage {color: #FFEE80}.ace-cobalt .ace_entity {color: #FFDD00}.ace-cobalt .ace_string {color: #3AD900}.ace-cobalt .ace_string.ace_regexp {color: #80FFC2}.ace-cobalt .ace_comment {font-style: italic;color: #0088FF}.ace-cobalt .ace_variable {color: #CCCCCC}.ace-cobalt .ace_variable.ace_language {color: #FF80E1}.ace-cobalt .ace_meta.ace_tag {color: #9EFFFF}.ace-cobalt .ace_markup.ace_underline {text-decoration: underline}.ace-cobalt .ace_markup.ace_heading {color: #C8E4FD;background-color: #001221}.ace-cobalt .ace_markup.ace_list {background-color: #130D26}.ace-cobalt .ace_indent-guide {background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNgUHL4zzBz5sz/AA80BCzv+WXhAAAAAElFTkSuQmCC) right repeat-y}";
- var r = e("../lib/dom");
- r.importCssString(t.cssText, t.cssClass)
-})
\ No newline at end of file
diff --git a/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/theme-crimson_editor.js b/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/theme-crimson_editor.js
deleted file mode 100644
index fa4ec6b..0000000
--- a/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/theme-crimson_editor.js
+++ /dev/null
@@ -1,5 +0,0 @@
-ace.define("ace/theme/crimson_editor", ["require", "exports", "module", "ace/lib/dom"], function (e, t, n) {
- t.isDark = !1, t.cssText = '.ace-crimson-editor .ace_gutter {background: #ebebeb;color: #333;overflow : hidden;}.ace-crimson-editor .ace_gutter-layer {width: 100%;text-align: right;}.ace-crimson-editor .ace_print-margin {width: 1px;background: #e8e8e8;}.ace-crimson-editor .ace_scroller {background-color: #FFFFFF;}.ace-crimson-editor .ace_text-layer {color: rgb(64, 64, 64);}.ace-crimson-editor .ace_cursor {border-left: 2px solid black;}.ace-crimson-editor .ace_overwrite-cursors .ace_cursor {border-left: 0px;border-bottom: 1px solid black;}.ace-crimson-editor .ace_invisible {color: rgb(191, 191, 191);}.ace-crimson-editor .ace_identifier {color: black;}.ace-crimson-editor .ace_keyword {color: blue;}.ace-crimson-editor .ace_constant.ace_buildin {color: rgb(88, 72, 246);}.ace-crimson-editor .ace_constant.ace_language {color: rgb(255, 156, 0);}.ace-crimson-editor .ace_constant.ace_library {color: rgb(6, 150, 14);}.ace-crimson-editor .ace_invalid {text-decoration: line-through;color: rgb(224, 0, 0);}.ace-crimson-editor .ace_fold {}.ace-crimson-editor .ace_support.ace_function {color: rgb(192, 0, 0);}.ace-crimson-editor .ace_support.ace_constant {color: rgb(6, 150, 14);}.ace-crimson-editor .ace_support.ace_type,.ace-crimson-editor .ace_support.ace_class {color: rgb(109, 121, 222);}.ace-crimson-editor .ace_keyword.ace_operator {color: rgb(49, 132, 149);}.ace-crimson-editor .ace_string {color: rgb(128, 0, 128);}.ace-crimson-editor .ace_comment {color: rgb(76, 136, 107);}.ace-crimson-editor .ace_comment.ace_doc {color: rgb(0, 102, 255);}.ace-crimson-editor .ace_comment.ace_doc.ace_tag {color: rgb(128, 159, 191);}.ace-crimson-editor .ace_constant.ace_numeric {color: rgb(0, 0, 64);}.ace-crimson-editor .ace_variable {color: rgb(0, 64, 128);}.ace-crimson-editor .ace_xml-pe {color: rgb(104, 104, 91);}.ace-crimson-editor .ace_marker-layer .ace_selection {background: rgb(181, 213, 255);}.ace-crimson-editor .ace_marker-layer .ace_step {background: rgb(252, 255, 0);}.ace-crimson-editor .ace_marker-layer .ace_stack {background: rgb(164, 229, 101);}.ace-crimson-editor .ace_marker-layer .ace_bracket {margin: -1px 0 0 -1px;border: 1px solid rgb(192, 192, 192);}.ace-crimson-editor .ace_marker-layer .ace_active-line {background: rgb(232, 242, 254);}.ace-crimson-editor .ace_gutter-active-line {background-color : #dcdcdc;}.ace-crimson-editor .ace_meta.ace_tag {color:rgb(28, 2, 255);}.ace-crimson-editor .ace_marker-layer .ace_selected-word {background: rgb(250, 250, 255);border: 1px solid rgb(200, 200, 250);}.ace-crimson-editor .ace_string.ace_regex {color: rgb(192, 0, 192);}.ace-crimson-editor .ace_indent-guide {background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==") right repeat-y;}', t.cssClass = "ace-crimson-editor";
- var r = e("../lib/dom");
- r.importCssString(t.cssText, t.cssClass)
-})
\ No newline at end of file
diff --git a/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/theme-dawn.js b/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/theme-dawn.js
deleted file mode 100644
index 373eb30..0000000
--- a/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/theme-dawn.js
+++ /dev/null
@@ -1,5 +0,0 @@
-ace.define("ace/theme/dawn", ["require", "exports", "module", "ace/lib/dom"], function (e, t, n) {
- t.isDark = !1, t.cssClass = "ace-dawn", t.cssText = ".ace-dawn .ace_gutter {background: #ebebeb;color: #333}.ace-dawn .ace_print-margin {width: 1px;background: #e8e8e8}.ace-dawn .ace_scroller {background-color: #F9F9F9}.ace-dawn .ace_text-layer {color: #080808}.ace-dawn .ace_cursor {border-left: 2px solid #000000}.ace-dawn .ace_overwrite-cursors .ace_cursor {border-left: 0px;border-bottom: 1px solid #000000}.ace-dawn .ace_marker-layer .ace_selection {background: rgba(39, 95, 255, 0.30)}.ace-dawn.ace_multiselect .ace_selection.ace_start {box-shadow: 0 0 3px 0px #F9F9F9;border-radius: 2px}.ace-dawn .ace_marker-layer .ace_step {background: rgb(255, 255, 0)}.ace-dawn .ace_marker-layer .ace_bracket {margin: -1px 0 0 -1px;border: 1px solid rgba(75, 75, 126, 0.50)}.ace-dawn .ace_marker-layer .ace_active-line {background: rgba(36, 99, 180, 0.12)}.ace-dawn .ace_gutter-active-line {background-color : #dcdcdc}.ace-dawn .ace_marker-layer .ace_selected-word {border: 1px solid rgba(39, 95, 255, 0.30)}.ace-dawn .ace_invisible {color: rgba(75, 75, 126, 0.50)}.ace-dawn .ace_keyword,.ace-dawn .ace_meta {color: #794938}.ace-dawn .ace_constant,.ace-dawn .ace_constant.ace_character,.ace-dawn .ace_constant.ace_character.ace_escape,.ace-dawn .ace_constant.ace_other {color: #811F24}.ace-dawn .ace_invalid.ace_illegal {text-decoration: underline;font-style: italic;color: #F8F8F8;background-color: #B52A1D}.ace-dawn .ace_invalid.ace_deprecated {text-decoration: underline;font-style: italic;color: #B52A1D}.ace-dawn .ace_support {color: #691C97}.ace-dawn .ace_support.ace_constant {color: #B4371F}.ace-dawn .ace_fold {background-color: #794938;border-color: #080808}.ace-dawn .ace_markup.ace_list,.ace-dawn .ace_support.ace_function {color: #693A17}.ace-dawn .ace_storage {font-style: italic;color: #A71D5D}.ace-dawn .ace_string {color: #0B6125}.ace-dawn .ace_string.ace_regexp {color: #CF5628}.ace-dawn .ace_comment {font-style: italic;color: #5A525F}.ace-dawn .ace_variable {color: #234A97}.ace-dawn .ace_markup.ace_underline {text-decoration: underline}.ace-dawn .ace_markup.ace_heading {color: #19356D}.ace-dawn .ace_indent-guide {background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4+fPnf4ZVq1b9BwAkVQboFQv98gAAAABJRU5ErkJggg==) right repeat-y}";
- var r = e("../lib/dom");
- r.importCssString(t.cssText, t.cssClass)
-})
\ No newline at end of file
diff --git a/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/theme-dreamweaver.js b/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/theme-dreamweaver.js
deleted file mode 100644
index f38e10b..0000000
--- a/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/theme-dreamweaver.js
+++ /dev/null
@@ -1,5 +0,0 @@
-ace.define("ace/theme/dreamweaver", ["require", "exports", "module", "ace/lib/dom"], function (e, t, n) {
- t.isDark = !1, t.cssClass = "ace-dreamweaver", t.cssText = '.ace-dreamweaver .ace_gutter {background: #e8e8e8;color: #333;}.ace-dreamweaver .ace_print-margin {width: 1px;background: #e8e8e8;}.ace-dreamweaver .ace_scroller {background-color: #FFFFFF;}.ace-dreamweaver .ace_fold {background-color: #757AD8;}.ace-dreamweaver .ace_text-layer {}.ace-dreamweaver .ace_cursor {border-left: 2px solid black;}.ace-dreamweaver .ace_overwrite-cursors .ace_cursor {border-left: 0px;border-bottom: 1px solid black;}.ace-dreamweaver .ace_invisible {color: rgb(191, 191, 191);}.ace-dreamweaver .ace_storage,.ace-dreamweaver .ace_keyword {color: blue;}.ace-dreamweaver .ace_constant.ace_buildin {color: rgb(88, 72, 246);}.ace-dreamweaver .ace_constant.ace_language {color: rgb(88, 92, 246);}.ace-dreamweaver .ace_constant.ace_library {color: rgb(6, 150, 14);}.ace-dreamweaver .ace_invalid {background-color: rgb(153, 0, 0);color: white;}.ace-dreamweaver .ace_support.ace_function {color: rgb(60, 76, 114);}.ace-dreamweaver .ace_support.ace_constant {color: rgb(6, 150, 14);}.ace-dreamweaver .ace_support.ace_type,.ace-dreamweaver .ace_support.ace_class {color: #009;}.ace-dreamweaver .ace_support.ace_php_tag {color: #f00;}.ace-dreamweaver .ace_keyword.ace_operator {color: rgb(104, 118, 135);}.ace-dreamweaver .ace_string {color: #00F;}.ace-dreamweaver .ace_comment {color: rgb(76, 136, 107);}.ace-dreamweaver .ace_comment.ace_doc {color: rgb(0, 102, 255);}.ace-dreamweaver .ace_comment.ace_doc.ace_tag {color: rgb(128, 159, 191);}.ace-dreamweaver .ace_constant.ace_numeric {color: rgb(0, 0, 205);}.ace-dreamweaver .ace_variable {color: #06F}.ace-dreamweaver .ace_xml-pe {color: rgb(104, 104, 91);}.ace-dreamweaver .ace_entity.ace_name.ace_function {color: #00F;}.ace-dreamweaver .ace_markup.ace_heading {color: rgb(12, 7, 255);}.ace-dreamweaver .ace_markup.ace_list {color:rgb(185, 6, 144);}.ace-dreamweaver .ace_marker-layer .ace_selection {background: rgb(181, 213, 255);}.ace-dreamweaver .ace_marker-layer .ace_step {background: rgb(252, 255, 0);}.ace-dreamweaver .ace_marker-layer .ace_stack {background: rgb(164, 229, 101);}.ace-dreamweaver .ace_marker-layer .ace_bracket {margin: -1px 0 0 -1px;border: 1px solid rgb(192, 192, 192);}.ace-dreamweaver .ace_marker-layer .ace_active-line {background: rgba(0, 0, 0, 0.07);}.ace-dreamweaver .ace_marker-layer .ace_selected-word {background: rgb(250, 250, 255);border: 1px solid rgb(200, 200, 250);}.ace-dreamweaver .ace_meta.ace_tag {color:#009;}.ace-dreamweaver .ace_meta.ace_tag.ace_anchor {color:#060;}.ace-dreamweaver .ace_meta.ace_tag.ace_form {color:#F90;}.ace-dreamweaver .ace_meta.ace_tag.ace_image {color:#909;}.ace-dreamweaver .ace_meta.ace_tag.ace_script {color:#900;}.ace-dreamweaver .ace_meta.ace_tag.ace_style {color:#909;}.ace-dreamweaver .ace_meta.ace_tag.ace_table {color:#099;}.ace-dreamweaver .ace_string.ace_regex {color: rgb(255, 0, 0)}.ace-dreamweaver .ace_indent-guide {background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==") right repeat-y;}';
- var r = e("../lib/dom");
- r.importCssString(t.cssText, t.cssClass)
-})
\ No newline at end of file
diff --git a/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/theme-eclipse.js b/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/theme-eclipse.js
deleted file mode 100644
index 7effc55..0000000
--- a/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/theme-eclipse.js
+++ /dev/null
@@ -1,5 +0,0 @@
-ace.define("ace/theme/eclipse", ["require", "exports", "module", "ace/lib/dom"], function (e, t, n) {
- t.isDark = !1, t.cssText = '.ace-eclipse .ace_gutter {background: #ebebeb;border-right: 1px solid rgb(159, 159, 159);color: rgb(136, 136, 136);}.ace-eclipse .ace_print-margin {width: 1px;background: #ebebeb;}.ace-eclipse .ace_scroller {background-color: #FFFFFF;}.ace-eclipse .ace_fold {background-color: rgb(60, 76, 114);}.ace-eclipse .ace_text-layer {}.ace-eclipse .ace_cursor {border-left: 2px solid black;}.ace-eclipse .ace_storage,.ace-eclipse .ace_keyword,.ace-eclipse .ace_variable {color: rgb(127, 0, 85);}.ace-eclipse .ace_constant.ace_buildin {color: rgb(88, 72, 246);}.ace-eclipse .ace_constant.ace_library {color: rgb(6, 150, 14);}.ace-eclipse .ace_function {color: rgb(60, 76, 114);}.ace-eclipse .ace_string {color: rgb(42, 0, 255);}.ace-eclipse .ace_comment {color: rgb(63, 127, 95);}.ace-eclipse .ace_comment.ace_doc {color: rgb(63, 95, 191);}.ace-eclipse .ace_comment.ace_doc.ace_tag {color: rgb(127, 159, 191);}.ace-eclipse .ace_constant.ace_numeric {}.ace-eclipse .ace_tag {color: rgb(63, 127, 127);}.ace-eclipse .ace_type {color: rgb(127, 0, 127);}.ace-eclipse .ace_xml-pe {color: rgb(104, 104, 91);}.ace-eclipse .ace_marker-layer .ace_selection {background: rgb(181, 213, 255);}.ace-eclipse .ace_marker-layer .ace_bracket {margin: -1px 0 0 -1px;border: 1px solid rgb(192, 192, 192);}.ace-eclipse .ace_meta.ace_tag {color:rgb(63, 127, 127);}.ace-eclipse .ace_entity.ace_other.ace_attribute-name {color:rgb(127, 0, 127);}.ace-eclipse .ace_marker-layer .ace_step {background: rgb(255, 255, 0);}.ace-eclipse .ace_marker-layer .ace_active-line {background: rgb(232, 242, 254);}.ace-eclipse .ace_marker-layer .ace_selected-word {border: 1px solid rgb(181, 213, 255);}.ace-eclipse .ace_indent-guide {background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==") right repeat-y;}', t.cssClass = "ace-eclipse";
- var r = e("../lib/dom");
- r.importCssString(t.cssText, t.cssClass)
-})
\ No newline at end of file
diff --git a/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/theme-github.js b/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/theme-github.js
deleted file mode 100644
index 4afc402..0000000
--- a/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/theme-github.js
+++ /dev/null
@@ -1,5 +0,0 @@
-ace.define("ace/theme/github", ["require", "exports", "module", "ace/lib/dom"], function (e, t, n) {
- t.isDark = !1, t.cssClass = "ace-github", t.cssText = '/* CSS style content from github\'s default pygments highlighter template.Cursor and selection styles from textmate.css. */.ace-github .ace_gutter {background: #e8e8e8;color: #AAA;}.ace-github .ace_scroller {background: #fff;}.ace-github .ace_keyword {font-weight: bold;}.ace-github .ace_string {color: #D14;}.ace-github .ace_variable.ace_class {color: teal;}.ace-github .ace_constant.ace_numeric {color: #099;}.ace-github .ace_constant.ace_buildin {color: #0086B3;}.ace-github .ace_support.ace_function {color: #0086B3;}.ace-github .ace_comment {color: #998;font-style: italic;}.ace-github .ace_variable.ace_language {color: #0086B3;}.ace-github .ace_paren {font-weight: bold;}.ace-github .ace_boolean {font-weight: bold;}.ace-github .ace_string.ace_regexp {color: #009926;font-weight: normal;}.ace-github .ace_variable.ace_instance {color: teal;}.ace-github .ace_constant.ace_language {font-weight: bold;}.ace-github .ace_text-layer {}.ace-github .ace_cursor {border-left: 2px solid black;}.ace-github .ace_overwrite-cursors .ace_cursor {border-left: 0px;border-bottom: 1px solid black;}.ace-github .ace_marker-layer .ace_active-line {background: rgb(255, 255, 204);}.ace-github .ace_marker-layer .ace_selection {background: rgb(181, 213, 255);}.ace-github.ace_multiselect .ace_selection.ace_start {box-shadow: 0 0 3px 0px white;border-radius: 2px;}/* bold keywords cause cursor issues for some fonts *//* this disables bold style for editor and keeps for static highlighter */.ace-github.ace_nobold .ace_line > span {font-weight: normal !important;}.ace-github .ace_marker-layer .ace_step {background: rgb(252, 255, 0);}.ace-github .ace_marker-layer .ace_stack {background: rgb(164, 229, 101);}.ace-github .ace_marker-layer .ace_bracket {margin: -1px 0 0 -1px;border: 1px solid rgb(192, 192, 192);}.ace-github .ace_gutter-active-line {background-color : rgba(0, 0, 0, 0.07);}.ace-github .ace_marker-layer .ace_selected-word {background: rgb(250, 250, 255);border: 1px solid rgb(200, 200, 250);}.ace-github .ace_print-margin {width: 1px;background: #e8e8e8;}.ace-github .ace_indent-guide {background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==") right repeat-y;}';
- var r = e("../lib/dom");
- r.importCssString(t.cssText, t.cssClass)
-})
\ No newline at end of file
diff --git a/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/theme-idle_fingers.js b/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/theme-idle_fingers.js
deleted file mode 100644
index 8c74d3a..0000000
--- a/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/theme-idle_fingers.js
+++ /dev/null
@@ -1,5 +0,0 @@
-ace.define("ace/theme/idle_fingers", ["require", "exports", "module", "ace/lib/dom"], function (e, t, n) {
- t.isDark = !0, t.cssClass = "ace-idle-fingers", t.cssText = ".ace-idle-fingers .ace_gutter {background: #3b3b3b;color: #fff}.ace-idle-fingers .ace_print-margin {width: 1px;background: #3b3b3b}.ace-idle-fingers .ace_scroller {background-color: #323232}.ace-idle-fingers .ace_text-layer {color: #FFFFFF}.ace-idle-fingers .ace_cursor {border-left: 2px solid #91FF00}.ace-idle-fingers .ace_overwrite-cursors .ace_cursor {border-left: 0px;border-bottom: 1px solid #91FF00}.ace-idle-fingers .ace_marker-layer .ace_selection {background: rgba(90, 100, 126, 0.88)}.ace-idle-fingers.ace_multiselect .ace_selection.ace_start {box-shadow: 0 0 3px 0px #323232;border-radius: 2px}.ace-idle-fingers .ace_marker-layer .ace_step {background: rgb(102, 82, 0)}.ace-idle-fingers .ace_marker-layer .ace_bracket {margin: -1px 0 0 -1px;border: 1px solid #404040}.ace-idle-fingers .ace_marker-layer .ace_active-line {background: #353637}.ace-idle-fingers .ace_gutter-active-line {background-color: #353637}.ace-idle-fingers .ace_marker-layer .ace_selected-word {border: 1px solid rgba(90, 100, 126, 0.88)}.ace-idle-fingers .ace_invisible {color: #404040}.ace-idle-fingers .ace_keyword,.ace-idle-fingers .ace_meta {color: #CC7833}.ace-idle-fingers .ace_constant,.ace-idle-fingers .ace_constant.ace_character,.ace-idle-fingers .ace_constant.ace_character.ace_escape,.ace-idle-fingers .ace_constant.ace_other,.ace-idle-fingers .ace_support.ace_constant {color: #6C99BB}.ace-idle-fingers .ace_invalid {color: #FFFFFF;background-color: #FF0000}.ace-idle-fingers .ace_fold {background-color: #CC7833;border-color: #FFFFFF}.ace-idle-fingers .ace_support.ace_function {color: #B83426}.ace-idle-fingers .ace_variable.ace_parameter {font-style: italic}.ace-idle-fingers .ace_string {color: #A5C261}.ace-idle-fingers .ace_string.ace_regexp {color: #CCCC33}.ace-idle-fingers .ace_comment {font-style: italic;color: #BC9458}.ace-idle-fingers .ace_meta.ace_tag {color: #FFE5BB}.ace-idle-fingers .ace_entity.ace_name {color: #FFC66D}.ace-idle-fingers .ace_markup.ace_underline {text-decoration: underline}.ace-idle-fingers .ace_collab.ace_user1 {color: #323232;background-color: #FFF980}.ace-idle-fingers .ace_indent-guide {background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWMwMjL6zzBz5sz/ABEUBGCqhK6UAAAAAElFTkSuQmCC) right repeat-y}";
- var r = e("../lib/dom");
- r.importCssString(t.cssText, t.cssClass)
-})
\ No newline at end of file
diff --git a/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/theme-kr.js b/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/theme-kr.js
deleted file mode 100644
index e29aabd..0000000
--- a/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/theme-kr.js
+++ /dev/null
@@ -1,5 +0,0 @@
-ace.define("ace/theme/kr_theme", ["require", "exports", "module", "ace/lib/dom"], function (e, t, n) {
- t.isDark = !0, t.cssClass = "ace-kr-theme", t.cssText = ".ace-kr-theme .ace_gutter {background: #1c1917;color: #FCFFE0}.ace-kr-theme .ace_print-margin {width: 1px;background: #1c1917}.ace-kr-theme .ace_scroller {background-color: #0B0A09}.ace-kr-theme .ace_text-layer {color: #FCFFE0}.ace-kr-theme .ace_cursor {border-left: 2px solid #FF9900}.ace-kr-theme .ace_overwrite-cursors .ace_cursor {border-left: 0px;border-bottom: 1px solid #FF9900}.ace-kr-theme .ace_marker-layer .ace_selection {background: rgba(170, 0, 255, 0.45)}.ace-kr-theme.ace_multiselect .ace_selection.ace_start {box-shadow: 0 0 3px 0px #0B0A09;border-radius: 2px}.ace-kr-theme .ace_marker-layer .ace_step {background: rgb(102, 82, 0)}.ace-kr-theme .ace_marker-layer .ace_bracket {margin: -1px 0 0 -1px;border: 1px solid rgba(255, 177, 111, 0.32)}.ace-kr-theme .ace_marker-layer .ace_active-line {background: #38403D}.ace-kr-theme .ace_gutter-active-line {background-color : #38403D}.ace-kr-theme .ace_marker-layer .ace_selected-word {border: 1px solid rgba(170, 0, 255, 0.45)}.ace-kr-theme .ace_invisible {color: rgba(255, 177, 111, 0.32)}.ace-kr-theme .ace_keyword,.ace-kr-theme .ace_meta {color: #949C8B}.ace-kr-theme .ace_constant,.ace-kr-theme .ace_constant.ace_character,.ace-kr-theme .ace_constant.ace_character.ace_escape,.ace-kr-theme .ace_constant.ace_other {color: rgba(210, 117, 24, 0.76)}.ace-kr-theme .ace_invalid {color: #F8F8F8;background-color: #A41300}.ace-kr-theme .ace_support {color: #9FC28A}.ace-kr-theme .ace_support.ace_constant {color: #C27E66}.ace-kr-theme .ace_fold {background-color: #949C8B;border-color: #FCFFE0}.ace-kr-theme .ace_support.ace_function {color: #85873A}.ace-kr-theme .ace_storage {color: #FFEE80}.ace-kr-theme .ace_string {color: rgba(164, 161, 181, 0.8)}.ace-kr-theme .ace_string.ace_regexp {color: rgba(125, 255, 192, 0.65)}.ace-kr-theme .ace_comment {font-style: italic;color: #706D5B}.ace-kr-theme .ace_variable {color: #D1A796}.ace-kr-theme .ace_variable.ace_language {color: #FF80E1}.ace-kr-theme .ace_meta.ace_tag {color: #BABD9C}.ace-kr-theme .ace_markup.ace_underline {text-decoration: underline}.ace-kr-theme .ace_markup.ace_list {background-color: #0F0040}.ace-kr-theme .ace_indent-guide {background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWPg5uL8zzBz5sz/AA1WA+hUYIqjAAAAAElFTkSuQmCC) right repeat-y}";
- var r = e("../lib/dom");
- r.importCssString(t.cssText, t.cssClass)
-})
\ No newline at end of file
diff --git a/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/theme-merbivore.js b/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/theme-merbivore.js
deleted file mode 100644
index 32903e1..0000000
--- a/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/theme-merbivore.js
+++ /dev/null
@@ -1,5 +0,0 @@
-ace.define("ace/theme/merbivore", ["require", "exports", "module", "ace/lib/dom"], function (e, t, n) {
- t.isDark = !0, t.cssClass = "ace-merbivore", t.cssText = ".ace-merbivore .ace_gutter {background: #202020;color: #E6E1DC}.ace-merbivore .ace_print-margin {width: 1px;background: #555651}.ace-merbivore .ace_scroller {background-color: #161616}.ace-merbivore .ace_text-layer {color: #E6E1DC}.ace-merbivore .ace_cursor {border-left: 2px solid #FFFFFF}.ace-merbivore .ace_overwrite-cursors .ace_cursor {border-left: 0px;border-bottom: 1px solid #FFFFFF}.ace-merbivore .ace_marker-layer .ace_selection {background: #454545}.ace-merbivore.ace_multiselect .ace_selection.ace_start {box-shadow: 0 0 3px 0px #161616;border-radius: 2px}.ace-merbivore .ace_marker-layer .ace_step {background: rgb(102, 82, 0)}.ace-merbivore .ace_marker-layer .ace_bracket {margin: -1px 0 0 -1px;border: 1px solid #404040}.ace-merbivore .ace_marker-layer .ace_active-line {background: #333435}.ace-merbivore .ace_gutter-active-line {background-color: #333435}.ace-merbivore .ace_marker-layer .ace_selected-word {border: 1px solid #454545}.ace-merbivore .ace_invisible {color: #404040}.ace-merbivore .ace_entity.ace_name.ace_tag,.ace-merbivore .ace_keyword,.ace-merbivore .ace_meta,.ace-merbivore .ace_meta.ace_tag,.ace-merbivore .ace_storage,.ace-merbivore .ace_support.ace_function {color: #FC6F09}.ace-merbivore .ace_constant,.ace-merbivore .ace_constant.ace_character,.ace-merbivore .ace_constant.ace_character.ace_escape,.ace-merbivore .ace_constant.ace_other,.ace-merbivore .ace_support.ace_type {color: #1EDAFB}.ace-merbivore .ace_constant.ace_character.ace_escape {color: #519F50}.ace-merbivore .ace_constant.ace_language {color: #FDC251}.ace-merbivore .ace_constant.ace_library,.ace-merbivore .ace_string,.ace-merbivore .ace_support.ace_constant {color: #8DFF0A}.ace-merbivore .ace_constant.ace_numeric {color: #58C554}.ace-merbivore .ace_invalid {color: #FFFFFF;background-color: #990000}.ace-merbivore .ace_fold {background-color: #FC6F09;border-color: #E6E1DC}.ace-merbivore .ace_comment {font-style: italic;color: #AD2EA4}.ace-merbivore .ace_entity.ace_other.ace_attribute-name {color: #FFFF89}.ace-merbivore .ace_markup.ace_underline {text-decoration: underline}.ace-merbivore .ace_indent-guide {background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWMQExP7zzBz5sz/AA50BAyDznYhAAAAAElFTkSuQmCC) right repeat-y}";
- var r = e("../lib/dom");
- r.importCssString(t.cssText, t.cssClass)
-})
\ No newline at end of file
diff --git a/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/theme-merbivore_soft.js b/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/theme-merbivore_soft.js
deleted file mode 100644
index ae906c6..0000000
--- a/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/theme-merbivore_soft.js
+++ /dev/null
@@ -1,5 +0,0 @@
-ace.define("ace/theme/merbivore_soft", ["require", "exports", "module", "ace/lib/dom"], function (e, t, n) {
- t.isDark = !0, t.cssClass = "ace-merbivore-soft", t.cssText = ".ace-merbivore-soft .ace_gutter {background: #262424;color: #E6E1DC}.ace-merbivore-soft .ace_print-margin {width: 1px;background: #262424}.ace-merbivore-soft .ace_scroller {background-color: #1C1C1C}.ace-merbivore-soft .ace_text-layer {color: #E6E1DC}.ace-merbivore-soft .ace_cursor {border-left: 2px solid #FFFFFF}.ace-merbivore-soft .ace_overwrite-cursors .ace_cursor {border-left: 0px;border-bottom: 1px solid #FFFFFF}.ace-merbivore-soft .ace_marker-layer .ace_selection {background: #494949}.ace-merbivore-soft.ace_multiselect .ace_selection.ace_start {box-shadow: 0 0 3px 0px #1C1C1C;border-radius: 2px}.ace-merbivore-soft .ace_marker-layer .ace_step {background: rgb(102, 82, 0)}.ace-merbivore-soft .ace_marker-layer .ace_bracket {margin: -1px 0 0 -1px;border: 1px solid #404040}.ace-merbivore-soft .ace_marker-layer .ace_active-line {background: #333435}.ace-merbivore-soft .ace_gutter-active-line {background-color: #333435}.ace-merbivore-soft .ace_marker-layer .ace_selected-word {border: 1px solid #494949}.ace-merbivore-soft .ace_invisible {color: #404040}.ace-merbivore-soft .ace_entity.ace_name.ace_tag,.ace-merbivore-soft .ace_keyword,.ace-merbivore-soft .ace_meta,.ace-merbivore-soft .ace_meta.ace_tag,.ace-merbivore-soft .ace_storage {color: #FC803A}.ace-merbivore-soft .ace_constant,.ace-merbivore-soft .ace_constant.ace_character,.ace-merbivore-soft .ace_constant.ace_character.ace_escape,.ace-merbivore-soft .ace_constant.ace_other,.ace-merbivore-soft .ace_support.ace_type {color: #68C1D8}.ace-merbivore-soft .ace_constant.ace_character.ace_escape {color: #B3E5B4}.ace-merbivore-soft .ace_constant.ace_language {color: #E1C582}.ace-merbivore-soft .ace_constant.ace_library,.ace-merbivore-soft .ace_string,.ace-merbivore-soft .ace_support.ace_constant {color: #8EC65F}.ace-merbivore-soft .ace_constant.ace_numeric {color: #7FC578}.ace-merbivore-soft .ace_invalid,.ace-merbivore-soft .ace_invalid.ace_deprecated {color: #FFFFFF;background-color: #FE3838}.ace-merbivore-soft .ace_fold {background-color: #FC803A;border-color: #E6E1DC}.ace-merbivore-soft .ace_comment,.ace-merbivore-soft .ace_meta {font-style: italic;color: #AC4BB8}.ace-merbivore-soft .ace_entity.ace_other.ace_attribute-name {color: #EAF1A3}.ace-merbivore-soft .ace_markup.ace_underline {text-decoration: underline}.ace-merbivore-soft .ace_indent-guide {background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWOQkZH5zzBz5sz/AA8EBB6crd1rAAAAAElFTkSuQmCC) right repeat-y}";
- var r = e("../lib/dom");
- r.importCssString(t.cssText, t.cssClass)
-})
\ No newline at end of file
diff --git a/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/theme-mono_industrial.js b/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/theme-mono_industrial.js
deleted file mode 100644
index 6571a38..0000000
--- a/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/theme-mono_industrial.js
+++ /dev/null
@@ -1,5 +0,0 @@
-ace.define("ace/theme/mono_industrial", ["require", "exports", "module", "ace/lib/dom"], function (e, t, n) {
- t.isDark = !0, t.cssClass = "ace-mono-industrial", t.cssText = ".ace-mono-industrial .ace_gutter {background: #1d2521;color: #C5C9C9}.ace-mono-industrial .ace_print-margin {width: 1px;background: #555651}.ace-mono-industrial .ace_scroller {background-color: #222C28}.ace-mono-industrial .ace_text-layer {color: #FFFFFF}.ace-mono-industrial .ace_cursor {border-left: 2px solid #FFFFFF}.ace-mono-industrial .ace_overwrite-cursors .ace_cursor {border-left: 0px;border-bottom: 1px solid #FFFFFF}.ace-mono-industrial .ace_marker-layer .ace_selection {background: rgba(145, 153, 148, 0.40)}.ace-mono-industrial.ace_multiselect .ace_selection.ace_start {box-shadow: 0 0 3px 0px #222C28;border-radius: 2px}.ace-mono-industrial .ace_marker-layer .ace_step {background: rgb(102, 82, 0)}.ace-mono-industrial .ace_marker-layer .ace_bracket {margin: -1px 0 0 -1px;border: 1px solid rgba(102, 108, 104, 0.50)}.ace-mono-industrial .ace_marker-layer .ace_active-line {background: rgba(12, 13, 12, 0.25)}.ace-mono-industrial .ace_gutter-active-line {background-color: rgba(12, 13, 12, 0.25)}.ace-mono-industrial .ace_marker-layer .ace_selected-word {border: 1px solid rgba(145, 153, 148, 0.40)}.ace-mono-industrial .ace_invisible {color: rgba(102, 108, 104, 0.50)}.ace-mono-industrial .ace_string {background-color: #151C19;color: #FFFFFF}.ace-mono-industrial .ace_keyword,.ace-mono-industrial .ace_meta {color: #A39E64}.ace-mono-industrial .ace_constant,.ace-mono-industrial .ace_constant.ace_character,.ace-mono-industrial .ace_constant.ace_character.ace_escape,.ace-mono-industrial .ace_constant.ace_numeric,.ace-mono-industrial .ace_constant.ace_other {color: #E98800}.ace-mono-industrial .ace_entity.ace_name.ace_function,.ace-mono-industrial .ace_keyword.ace_operator,.ace-mono-industrial .ace_variable {color: #A8B3AB}.ace-mono-industrial .ace_invalid {color: #FFFFFF;background-color: rgba(153, 0, 0, 0.68)}.ace-mono-industrial .ace_support.ace_constant {color: #C87500}.ace-mono-industrial .ace_fold {background-color: #A8B3AB;border-color: #FFFFFF}.ace-mono-industrial .ace_support.ace_function {color: #588E60}.ace-mono-industrial .ace_entity.ace_name,.ace-mono-industrial .ace_support.ace_class,.ace-mono-industrial .ace_support.ace_type {color: #5778B6}.ace-mono-industrial .ace_storage {color: #C23B00}.ace-mono-industrial .ace_variable.ace_language,.ace-mono-industrial .ace_variable.ace_parameter {color: #648BD2}.ace-mono-industrial .ace_comment {color: #666C68;background-color: #151C19}.ace-mono-industrial .ace_entity.ace_other.ace_attribute-name {color: #909993}.ace-mono-industrial .ace_markup.ace_underline {text-decoration: underline}.ace-mono-industrial .ace_entity.ace_name.ace_tag {color: #A65EFF}.ace-mono-industrial .ace_indent-guide {background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNQ0tH4zzBz5sz/ABAOBECKH+evAAAAAElFTkSuQmCC) right repeat-y}";
- var r = e("../lib/dom");
- r.importCssString(t.cssText, t.cssClass)
-})
\ No newline at end of file
diff --git a/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/theme-monokai.js b/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/theme-monokai.js
deleted file mode 100644
index 685528e..0000000
--- a/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/theme-monokai.js
+++ /dev/null
@@ -1,5 +0,0 @@
-ace.define("ace/theme/monokai", ["require", "exports", "module", "ace/lib/dom"], function (e, t, n) {
- t.isDark = !0, t.cssClass = "ace-monokai", t.cssText = ".ace-monokai .ace_gutter {background: #2F3129;color: #8F908A}.ace-monokai .ace_print-margin {width: 1px;background: #555651}.ace-monokai .ace_scroller {background-color: #272822}.ace-monokai .ace_text-layer {color: #F8F8F2}.ace-monokai .ace_cursor {border-left: 2px solid #F8F8F0}.ace-monokai .ace_overwrite-cursors .ace_cursor {border-left: 0px;border-bottom: 1px solid #F8F8F0}.ace-monokai .ace_marker-layer .ace_selection {background: #49483E}.ace-monokai.ace_multiselect .ace_selection.ace_start {box-shadow: 0 0 3px 0px #272822;border-radius: 2px}.ace-monokai .ace_marker-layer .ace_step {background: rgb(102, 82, 0)}.ace-monokai .ace_marker-layer .ace_bracket {margin: -1px 0 0 -1px;border: 1px solid #49483E}.ace-monokai .ace_marker-layer .ace_active-line {background: #202020}.ace-monokai .ace_gutter-active-line {background-color: #272727}.ace-monokai .ace_marker-layer .ace_selected-word {border: 1px solid #49483E}.ace-monokai .ace_invisible {color: #52524d}.ace-monokai .ace_entity.ace_name.ace_tag,.ace-monokai .ace_keyword,.ace-monokai .ace_meta,.ace-monokai .ace_storage {color: #F92672}.ace-monokai .ace_constant.ace_character,.ace-monokai .ace_constant.ace_language,.ace-monokai .ace_constant.ace_numeric,.ace-monokai .ace_constant.ace_other {color: #AE81FF}.ace-monokai .ace_invalid {color: #F8F8F0;background-color: #F92672}.ace-monokai .ace_invalid.ace_deprecated {color: #F8F8F0;background-color: #AE81FF}.ace-monokai .ace_support.ace_constant,.ace-monokai .ace_support.ace_function {color: #66D9EF}.ace-monokai .ace_fold {background-color: #A6E22E;border-color: #F8F8F2}.ace-monokai .ace_storage.ace_type,.ace-monokai .ace_support.ace_class,.ace-monokai .ace_support.ace_type {font-style: italic;color: #66D9EF}.ace-monokai .ace_entity.ace_name.ace_function,.ace-monokai .ace_entity.ace_other,.ace-monokai .ace_variable {color: #A6E22E}.ace-monokai .ace_variable.ace_parameter {font-style: italic;color: #FD971F}.ace-monokai .ace_string {color: #E6DB74}.ace-monokai .ace_comment {color: #75715E}.ace-monokai .ace_markup.ace_underline {text-decoration: underline}.ace-monokai .ace_indent-guide {background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNQ11D6z7Bq1ar/ABCKBG6g04U2AAAAAElFTkSuQmCC) right repeat-y}";
- var r = e("../lib/dom");
- r.importCssString(t.cssText, t.cssClass)
-})
\ No newline at end of file
diff --git a/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/theme-pastel_on_dark.js b/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/theme-pastel_on_dark.js
deleted file mode 100644
index 56f381f..0000000
--- a/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/theme-pastel_on_dark.js
+++ /dev/null
@@ -1,5 +0,0 @@
-ace.define("ace/theme/pastel_on_dark", ["require", "exports", "module", "ace/lib/dom"], function (e, t, n) {
- t.isDark = !0, t.cssClass = "ace-pastel-on-dark", t.cssText = ".ace-pastel-on-dark .ace_gutter {background: #353030;color: #8F938F}.ace-pastel-on-dark .ace_print-margin {width: 1px;background: #353030}.ace-pastel-on-dark .ace_scroller {background-color: #2C2828}.ace-pastel-on-dark .ace_text-layer {color: #8F938F}.ace-pastel-on-dark .ace_cursor {border-left: 2px solid #A7A7A7}.ace-pastel-on-dark .ace_overwrite-cursors .ace_cursor {border-left: 0px;border-bottom: 1px solid #A7A7A7}.ace-pastel-on-dark .ace_marker-layer .ace_selection {background: rgba(221, 240, 255, 0.20)}.ace-pastel-on-dark.ace_multiselect .ace_selection.ace_start {box-shadow: 0 0 3px 0px #2C2828;border-radius: 2px}.ace-pastel-on-dark .ace_marker-layer .ace_step {background: rgb(102, 82, 0)}.ace-pastel-on-dark .ace_marker-layer .ace_bracket {margin: -1px 0 0 -1px;border: 1px solid rgba(255, 255, 255, 0.25)}.ace-pastel-on-dark .ace_marker-layer .ace_active-line {background: rgba(255, 255, 255, 0.031)}.ace-pastel-on-dark .ace_gutter-active-line {background-color: rgba(255, 255, 255, 0.031)}.ace-pastel-on-dark .ace_marker-layer .ace_selected-word {border: 1px solid rgba(221, 240, 255, 0.20)}.ace-pastel-on-dark .ace_invisible {color: rgba(255, 255, 255, 0.25)}.ace-pastel-on-dark .ace_keyword,.ace-pastel-on-dark .ace_meta {color: #757aD8}.ace-pastel-on-dark .ace_constant,.ace-pastel-on-dark .ace_constant.ace_character,.ace-pastel-on-dark .ace_constant.ace_character.ace_escape,.ace-pastel-on-dark .ace_constant.ace_other {color: #4FB7C5}.ace-pastel-on-dark .ace_keyword.ace_operator {color: #797878}.ace-pastel-on-dark .ace_constant.ace_character {color: #AFA472}.ace-pastel-on-dark .ace_constant.ace_language {color: #DE8E30}.ace-pastel-on-dark .ace_constant.ace_numeric {color: #CCCCCC}.ace-pastel-on-dark .ace_invalid,.ace-pastel-on-dark .ace_invalid.ace_illegal {color: #F8F8F8;background-color: rgba(86, 45, 86, 0.75)}.ace-pastel-on-dark .ace_invalid.ace_deprecated {text-decoration: underline;font-style: italic;color: #D2A8A1}.ace-pastel-on-dark .ace_fold {background-color: #757aD8;border-color: #8F938F}.ace-pastel-on-dark .ace_support.ace_function {color: #AEB2F8}.ace-pastel-on-dark .ace_string {color: #66A968}.ace-pastel-on-dark .ace_string.ace_regexp {color: #E9C062}.ace-pastel-on-dark .ace_comment {color: #A6C6FF}.ace-pastel-on-dark .ace_variable {color: #BEBF55}.ace-pastel-on-dark .ace_variable.ace_language {color: #C1C144}.ace-pastel-on-dark .ace_xml-pe {color: #494949}.ace-pastel-on-dark .ace_markup.ace_underline {text-decoration: underline}.ace-pastel-on-dark .ace_indent-guide {background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWPQ0dD4z9DR0fEfAA+vBBPqhbn1AAAAAElFTkSuQmCC) right repeat-y}";
- var r = e("../lib/dom");
- r.importCssString(t.cssText, t.cssClass)
-})
\ No newline at end of file
diff --git a/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/theme-solarized_dark.js b/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/theme-solarized_dark.js
deleted file mode 100644
index 09f5b0c..0000000
--- a/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/theme-solarized_dark.js
+++ /dev/null
@@ -1,5 +0,0 @@
-ace.define("ace/theme/solarized_dark", ["require", "exports", "module", "ace/lib/dom"], function (e, t, n) {
- t.isDark = !0, t.cssClass = "ace-solarized-dark", t.cssText = ".ace-solarized-dark .ace_gutter {background: #01313f;color: #d0edf7}.ace-solarized-dark .ace_print-margin {width: 1px;background: #33555E}.ace-solarized-dark .ace_scroller {background-color: #002B36}.ace-solarized-dark .ace_entity.ace_other.ace_attribute-name,.ace-solarized-dark .ace_storage,.ace-solarized-dark .ace_text-layer {color: #93A1A1}.ace-solarized-dark .ace_cursor {border-left: 2px solid #D30102}.ace-solarized-dark .ace_overwrite-cursors .ace_cursor {border-left: 0px;border-bottom: 1px solid #D30102}.ace-solarized-dark .ace_marker-layer .ace_active-line,.ace-solarized-dark .ace_marker-layer .ace_selection {background: rgba(255, 255, 255, 0.1)}.ace-solarized-dark.ace_multiselect .ace_selection.ace_start {box-shadow: 0 0 3px 0px #002B36;border-radius: 2px}.ace-solarized-dark .ace_marker-layer .ace_step {background: rgb(102, 82, 0)}.ace-solarized-dark .ace_marker-layer .ace_bracket {margin: -1px 0 0 -1px;border: 1px solid rgba(147, 161, 161, 0.50)}.ace-solarized-dark .ace_gutter-active-line {background-color: #0d3440}.ace-solarized-dark .ace_marker-layer .ace_selected-word {border: 1px solid #073642}.ace-solarized-dark .ace_invisible {color: rgba(147, 161, 161, 0.50)}.ace-solarized-dark .ace_keyword,.ace-solarized-dark .ace_meta,.ace-solarized-dark .ace_support.ace_class,.ace-solarized-dark .ace_support.ace_type {color: #859900}.ace-solarized-dark .ace_constant.ace_character,.ace-solarized-dark .ace_constant.ace_other {color: #CB4B16}.ace-solarized-dark .ace_constant.ace_language {color: #B58900}.ace-solarized-dark .ace_constant.ace_numeric {color: #D33682}.ace-solarized-dark .ace_fold {background-color: #268BD2;border-color: #93A1A1}.ace-solarized-dark .ace_entity.ace_name.ace_function,.ace-solarized-dark .ace_entity.ace_name.ace_tag,.ace-solarized-dark .ace_support.ace_function,.ace-solarized-dark .ace_variable,.ace-solarized-dark .ace_variable.ace_language {color: #268BD2}.ace-solarized-dark .ace_string {color: #2AA198}.ace-solarized-dark .ace_string.ace_regexp {color: #D30102}.ace-solarized-dark .ace_comment {font-style: italic;color: #657B83}.ace-solarized-dark .ace_markup.ace_underline {text-decoration: underline}.ace-solarized-dark .ace_indent-guide {background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNg0Db7zzBz5sz/AA82BCv7wOIDAAAAAElFTkSuQmCC) right repeat-y}";
- var r = e("../lib/dom");
- r.importCssString(t.cssText, t.cssClass)
-})
\ No newline at end of file
diff --git a/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/theme-solarized_light.js b/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/theme-solarized_light.js
deleted file mode 100644
index 55ee4c4..0000000
--- a/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/theme-solarized_light.js
+++ /dev/null
@@ -1,5 +0,0 @@
-ace.define("ace/theme/solarized_light", ["require", "exports", "module", "ace/lib/dom"], function (e, t, n) {
- t.isDark = !1, t.cssClass = "ace-solarized-light", t.cssText = ".ace-solarized-light .ace_gutter {background: #fbf1d3;color: #333}.ace-solarized-light .ace_print-margin {width: 1px;background: #e8e8e8}.ace-solarized-light .ace_scroller {background-color: #FDF6E3}.ace-solarized-light .ace_text-layer {color: #586E75}.ace-solarized-light .ace_cursor {border-left: 2px solid #000000}.ace-solarized-light .ace_overwrite-cursors .ace_cursor {border-left: 0px;border-bottom: 1px solid #000000}.ace-solarized-light .ace_marker-layer .ace_selection {background: #073642}.ace-solarized-light.ace_multiselect .ace_selection.ace_start {box-shadow: 0 0 3px 0px #FDF6E3;border-radius: 2px}.ace-solarized-light .ace_marker-layer .ace_step {background: rgb(255, 255, 0)}.ace-solarized-light .ace_marker-layer .ace_bracket {margin: -1px 0 0 -1px;border: 1px solid rgba(147, 161, 161, 0.50)}.ace-solarized-light .ace_marker-layer .ace_active-line {background: #EEE8D5}.ace-solarized-light .ace_gutter-active-line {background-color : #dcdcdc}.ace-solarized-light .ace_marker-layer .ace_selected-word {border: 1px solid #073642}.ace-solarized-light .ace_invisible {color: rgba(147, 161, 161, 0.50)}.ace-solarized-light .ace_keyword,.ace-solarized-light .ace_meta,.ace-solarized-light .ace_support.ace_class,.ace-solarized-light .ace_support.ace_type {color: #859900}.ace-solarized-light .ace_constant.ace_character,.ace-solarized-light .ace_constant.ace_other {color: #CB4B16}.ace-solarized-light .ace_constant.ace_language {color: #B58900}.ace-solarized-light .ace_constant.ace_numeric {color: #D33682}.ace-solarized-light .ace_fold {background-color: #268BD2;border-color: #586E75}.ace-solarized-light .ace_entity.ace_name.ace_function,.ace-solarized-light .ace_entity.ace_name.ace_tag,.ace-solarized-light .ace_support.ace_function,.ace-solarized-light .ace_variable,.ace-solarized-light .ace_variable.ace_language {color: #268BD2}.ace-solarized-light .ace_storage {color: #073642}.ace-solarized-light .ace_string {color: #2AA198}.ace-solarized-light .ace_string.ace_regexp {color: #D30102}.ace-solarized-light .ace_comment,.ace-solarized-light .ace_entity.ace_other.ace_attribute-name {color: #93A1A1}.ace-solarized-light .ace_markup.ace_underline {text-decoration: underline}.ace-solarized-light .ace_indent-guide {background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4++3xf4ZVq1b9BwAjxwbT1g3hiwAAAABJRU5ErkJggg==) right repeat-y}";
- var r = e("../lib/dom");
- r.importCssString(t.cssText, t.cssClass)
-})
\ No newline at end of file
diff --git a/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/theme-textmate.js b/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/theme-textmate.js
deleted file mode 100644
index 8ffa99a..0000000
--- a/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/theme-textmate.js
+++ /dev/null
@@ -1,5 +0,0 @@
-ace.define("ace/theme/textmate", ["require", "exports", "module", "ace/lib/dom"], function (e, t, n) {
- t.isDark = !1, t.cssClass = "ace-tm", t.cssText = '.ace-tm .ace_gutter {background: #f0f0f0;color: #333;}.ace-tm .ace_print-margin {width: 1px;background: #e8e8e8;}.ace-tm .ace_fold {background-color: #6B72E6;}.ace-tm .ace_scroller {background-color: #FFFFFF;}.ace-tm .ace_cursor {border-left: 2px solid black;}.ace-tm .ace_overwrite-cursors .ace_cursor {border-left: 0px;border-bottom: 1px solid black;}.ace-tm .ace_invisible {color: rgb(191, 191, 191);}.ace-tm .ace_storage,.ace-tm .ace_keyword {color: blue;}.ace-tm .ace_constant {color: rgb(197, 6, 11);}.ace-tm .ace_constant.ace_buildin {color: rgb(88, 72, 246);}.ace-tm .ace_constant.ace_language {color: rgb(88, 92, 246);}.ace-tm .ace_constant.ace_library {color: rgb(6, 150, 14);}.ace-tm .ace_invalid {background-color: rgba(255, 0, 0, 0.1);color: red;}.ace-tm .ace_support.ace_function {color: rgb(60, 76, 114);}.ace-tm .ace_support.ace_constant {color: rgb(6, 150, 14);}.ace-tm .ace_support.ace_type,.ace-tm .ace_support.ace_class {color: rgb(109, 121, 222);}.ace-tm .ace_keyword.ace_operator {color: rgb(104, 118, 135);}.ace-tm .ace_string {color: rgb(3, 106, 7);}.ace-tm .ace_comment {color: rgb(76, 136, 107);}.ace-tm .ace_comment.ace_doc {color: rgb(0, 102, 255);}.ace-tm .ace_comment.ace_doc.ace_tag {color: rgb(128, 159, 191);}.ace-tm .ace_constant.ace_numeric {color: rgb(0, 0, 205);}.ace-tm .ace_variable {color: rgb(49, 132, 149);}.ace-tm .ace_xml-pe {color: rgb(104, 104, 91);}.ace-tm .ace_entity.ace_name.ace_function {color: #0000A2;}.ace-tm .ace_markup.ace_heading {color: rgb(12, 7, 255);}.ace-tm .ace_markup.ace_list {color:rgb(185, 6, 144);}.ace-tm .ace_meta.ace_tag {color:rgb(0, 22, 142);}.ace-tm .ace_string.ace_regex {color: rgb(255, 0, 0)}.ace-tm .ace_marker-layer .ace_selection {background: rgb(181, 213, 255);}.ace-tm.ace_multiselect .ace_selection.ace_start {box-shadow: 0 0 3px 0px white;border-radius: 2px;}.ace-tm .ace_marker-layer .ace_step {background: rgb(252, 255, 0);}.ace-tm .ace_marker-layer .ace_stack {background: rgb(164, 229, 101);}.ace-tm .ace_marker-layer .ace_bracket {margin: -1px 0 0 -1px;border: 1px solid rgb(192, 192, 192);}.ace-tm .ace_marker-layer .ace_active-line {background: rgba(0, 0, 0, 0.07);}.ace-tm .ace_gutter-active-line {background-color : #dcdcdc;}.ace-tm .ace_marker-layer .ace_selected-word {background: rgb(250, 250, 255);border: 1px solid rgb(200, 200, 250);}.ace-tm .ace_indent-guide {background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==") right repeat-y;}';
- var r = e("../lib/dom");
- r.importCssString(t.cssText, t.cssClass)
-})
\ No newline at end of file
diff --git a/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/theme-tomorrow.js b/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/theme-tomorrow.js
deleted file mode 100644
index cc84b61..0000000
--- a/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/theme-tomorrow.js
+++ /dev/null
@@ -1,5 +0,0 @@
-ace.define("ace/theme/tomorrow", ["require", "exports", "module", "ace/lib/dom"], function (e, t, n) {
- t.isDark = !1, t.cssClass = "ace-tomorrow", t.cssText = ".ace-tomorrow .ace_gutter {background: #f6f6f6;color: #4D4D4C}.ace-tomorrow .ace_print-margin {width: 1px;background: #f6f6f6}.ace-tomorrow .ace_scroller {background-color: #FFFFFF}.ace-tomorrow .ace_text-layer {color: #4D4D4C}.ace-tomorrow .ace_cursor {border-left: 2px solid #AEAFAD}.ace-tomorrow .ace_overwrite-cursors .ace_cursor {border-left: 0px;border-bottom: 1px solid #AEAFAD}.ace-tomorrow .ace_marker-layer .ace_selection {background: #D6D6D6}.ace-tomorrow.ace_multiselect .ace_selection.ace_start {box-shadow: 0 0 3px 0px #FFFFFF;border-radius: 2px}.ace-tomorrow .ace_marker-layer .ace_step {background: rgb(255, 255, 0)}.ace-tomorrow .ace_marker-layer .ace_bracket {margin: -1px 0 0 -1px;border: 1px solid #D1D1D1}.ace-tomorrow .ace_marker-layer .ace_active-line {background: #EFEFEF}.ace-tomorrow .ace_gutter-active-line {background-color : #dcdcdc}.ace-tomorrow .ace_marker-layer .ace_selected-word {border: 1px solid #D6D6D6}.ace-tomorrow .ace_invisible {color: #D1D1D1}.ace-tomorrow .ace_keyword,.ace-tomorrow .ace_meta,.ace-tomorrow .ace_storage,.ace-tomorrow .ace_storage.ace_type,.ace-tomorrow .ace_support.ace_type {color: #8959A8}.ace-tomorrow .ace_keyword.ace_operator {color: #3E999F}.ace-tomorrow .ace_constant.ace_character,.ace-tomorrow .ace_constant.ace_language,.ace-tomorrow .ace_constant.ace_numeric,.ace-tomorrow .ace_keyword.ace_other.ace_unit,.ace-tomorrow .ace_support.ace_constant,.ace-tomorrow .ace_variable.ace_parameter {color: #F5871F}.ace-tomorrow .ace_constant.ace_other {color: #666969}.ace-tomorrow .ace_invalid {color: #FFFFFF;background-color: #C82829}.ace-tomorrow .ace_invalid.ace_deprecated {color: #FFFFFF;background-color: #8959A8}.ace-tomorrow .ace_fold {background-color: #4271AE;border-color: #4D4D4C}.ace-tomorrow .ace_entity.ace_name.ace_function,.ace-tomorrow .ace_support.ace_function,.ace-tomorrow .ace_variable {color: #4271AE}.ace-tomorrow .ace_support.ace_class,.ace-tomorrow .ace_support.ace_type {color: #C99E00}.ace-tomorrow .ace_markup.ace_heading,.ace-tomorrow .ace_string {color: #718C00}.ace-tomorrow .ace_entity.ace_name.ace_tag,.ace-tomorrow .ace_entity.ace_other.ace_attribute-name,.ace-tomorrow .ace_meta.ace_tag,.ace-tomorrow .ace_string.ace_regexp,.ace-tomorrow .ace_variable {color: #C82829}.ace-tomorrow .ace_comment {color: #8E908C}.ace-tomorrow .ace_markup.ace_underline {text-decoration: underline}.ace-tomorrow .ace_indent-guide {background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bdu3f/BwAlfgctduB85QAAAABJRU5ErkJggg==) right repeat-y}";
- var r = e("../lib/dom");
- r.importCssString(t.cssText, t.cssClass)
-})
\ No newline at end of file
diff --git a/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/theme-tomorrow_night.js b/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/theme-tomorrow_night.js
deleted file mode 100644
index fd4d484..0000000
--- a/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/theme-tomorrow_night.js
+++ /dev/null
@@ -1,5 +0,0 @@
-ace.define("ace/theme/tomorrow_night", ["require", "exports", "module", "ace/lib/dom"], function (e, t, n) {
- t.isDark = !0, t.cssClass = "ace-tomorrow-night", t.cssText = ".ace-tomorrow-night .ace_gutter {background: #25282c;color: #C5C8C6}.ace-tomorrow-night .ace_print-margin {width: 1px;background: #25282c}.ace-tomorrow-night .ace_scroller {background-color: #1D1F21}.ace-tomorrow-night .ace_text-layer {color: #C5C8C6}.ace-tomorrow-night .ace_cursor {border-left: 2px solid #AEAFAD}.ace-tomorrow-night .ace_overwrite-cursors .ace_cursor {border-left: 0px;border-bottom: 1px solid #AEAFAD}.ace-tomorrow-night .ace_marker-layer .ace_selection {background: #373B41}.ace-tomorrow-night.ace_multiselect .ace_selection.ace_start {box-shadow: 0 0 3px 0px #1D1F21;border-radius: 2px}.ace-tomorrow-night .ace_marker-layer .ace_step {background: rgb(102, 82, 0)}.ace-tomorrow-night .ace_marker-layer .ace_bracket {margin: -1px 0 0 -1px;border: 1px solid #4B4E55}.ace-tomorrow-night .ace_marker-layer .ace_active-line {background: #282A2E}.ace-tomorrow-night .ace_gutter-active-line {background-color: #282A2E}.ace-tomorrow-night .ace_marker-layer .ace_selected-word {border: 1px solid #373B41}.ace-tomorrow-night .ace_invisible {color: #4B4E55}.ace-tomorrow-night .ace_keyword,.ace-tomorrow-night .ace_meta,.ace-tomorrow-night .ace_storage,.ace-tomorrow-night .ace_storage.ace_type,.ace-tomorrow-night .ace_support.ace_type {color: #B294BB}.ace-tomorrow-night .ace_keyword.ace_operator {color: #8ABEB7}.ace-tomorrow-night .ace_constant.ace_character,.ace-tomorrow-night .ace_constant.ace_language,.ace-tomorrow-night .ace_constant.ace_numeric,.ace-tomorrow-night .ace_keyword.ace_other.ace_unit,.ace-tomorrow-night .ace_support.ace_constant,.ace-tomorrow-night .ace_variable.ace_parameter {color: #DE935F}.ace-tomorrow-night .ace_constant.ace_other {color: #CED1CF}.ace-tomorrow-night .ace_invalid {color: #CED2CF;background-color: #DF5F5F}.ace-tomorrow-night .ace_invalid.ace_deprecated {color: #CED2CF;background-color: #B798BF}.ace-tomorrow-night .ace_fold {background-color: #81A2BE;border-color: #C5C8C6}.ace-tomorrow-night .ace_entity.ace_name.ace_function,.ace-tomorrow-night .ace_support.ace_function,.ace-tomorrow-night .ace_variable {color: #81A2BE}.ace-tomorrow-night .ace_support.ace_class,.ace-tomorrow-night .ace_support.ace_type {color: #F0C674}.ace-tomorrow-night .ace_markup.ace_heading,.ace-tomorrow-night .ace_string {color: #B5BD68}.ace-tomorrow-night .ace_entity.ace_name.ace_tag,.ace-tomorrow-night .ace_entity.ace_other.ace_attribute-name,.ace-tomorrow-night .ace_meta.ace_tag,.ace-tomorrow-night .ace_string.ace_regexp,.ace-tomorrow-night .ace_variable {color: #CC6666}.ace-tomorrow-night .ace_comment {color: #969896}.ace-tomorrow-night .ace_markup.ace_underline {text-decoration: underline}.ace-tomorrow-night .ace_indent-guide {background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWOQlVf8z7Bq1ar/AA/hBFp7egmpAAAAAElFTkSuQmCC) right repeat-y}";
- var r = e("../lib/dom");
- r.importCssString(t.cssText, t.cssClass)
-})
\ No newline at end of file
diff --git a/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/theme-tomorrow_night_blue.js b/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/theme-tomorrow_night_blue.js
deleted file mode 100644
index 2b9cb66..0000000
--- a/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/theme-tomorrow_night_blue.js
+++ /dev/null
@@ -1,5 +0,0 @@
-ace.define("ace/theme/tomorrow_night_blue", ["require", "exports", "module", "ace/lib/dom"], function (e, t, n) {
- t.isDark = !0, t.cssClass = "ace-tomorrow-night-blue", t.cssText = ".ace-tomorrow-night-blue .ace_gutter {background: #00204b;color: #7388b5}.ace-tomorrow-night-blue .ace_print-margin {width: 1px;background: #00204b}.ace-tomorrow-night-blue .ace_scroller {background-color: #002451}.ace-tomorrow-night-blue .ace_constant.ace_other,.ace-tomorrow-night-blue .ace_text-layer {color: #FFFFFF}.ace-tomorrow-night-blue .ace_cursor {border-left: 2px solid #FFFFFF}.ace-tomorrow-night-blue .ace_overwrite-cursors .ace_cursor {border-left: 0px;border-bottom: 1px solid #FFFFFF}.ace-tomorrow-night-blue .ace_marker-layer .ace_selection {background: #003F8E}.ace-tomorrow-night-blue.ace_multiselect .ace_selection.ace_start {box-shadow: 0 0 3px 0px #002451;border-radius: 2px}.ace-tomorrow-night-blue .ace_marker-layer .ace_step {background: rgb(127, 111, 19)}.ace-tomorrow-night-blue .ace_marker-layer .ace_bracket {margin: -1px 0 0 -1px;border: 1px solid #404F7D}.ace-tomorrow-night-blue .ace_marker-layer .ace_active-line {background: #00346E}.ace-tomorrow-night-blue .ace_gutter-active-line {background-color: #022040}.ace-tomorrow-night-blue .ace_marker-layer .ace_selected-word {border: 1px solid #003F8E}.ace-tomorrow-night-blue .ace_invisible {color: #404F7D}.ace-tomorrow-night-blue .ace_keyword,.ace-tomorrow-night-blue .ace_meta,.ace-tomorrow-night-blue .ace_storage,.ace-tomorrow-night-blue .ace_storage.ace_type,.ace-tomorrow-night-blue .ace_support.ace_type {color: #EBBBFF}.ace-tomorrow-night-blue .ace_keyword.ace_operator {color: #99FFFF}.ace-tomorrow-night-blue .ace_constant.ace_character,.ace-tomorrow-night-blue .ace_constant.ace_language,.ace-tomorrow-night-blue .ace_constant.ace_numeric,.ace-tomorrow-night-blue .ace_keyword.ace_other.ace_unit,.ace-tomorrow-night-blue .ace_support.ace_constant,.ace-tomorrow-night-blue .ace_variable.ace_parameter {color: #FFC58F}.ace-tomorrow-night-blue .ace_invalid {color: #FFFFFF;background-color: #F99DA5}.ace-tomorrow-night-blue .ace_invalid.ace_deprecated {color: #FFFFFF;background-color: #EBBBFF}.ace-tomorrow-night-blue .ace_fold {background-color: #BBDAFF;border-color: #FFFFFF}.ace-tomorrow-night-blue .ace_entity.ace_name.ace_function,.ace-tomorrow-night-blue .ace_support.ace_function,.ace-tomorrow-night-blue .ace_variable {color: #BBDAFF}.ace-tomorrow-night-blue .ace_support.ace_class,.ace-tomorrow-night-blue .ace_support.ace_type {color: #FFEEAD}.ace-tomorrow-night-blue .ace_markup.ace_heading,.ace-tomorrow-night-blue .ace_string {color: #D1F1A9}.ace-tomorrow-night-blue .ace_entity.ace_name.ace_tag,.ace-tomorrow-night-blue .ace_entity.ace_other.ace_attribute-name,.ace-tomorrow-night-blue .ace_meta.ace_tag,.ace-tomorrow-night-blue .ace_string.ace_regexp,.ace-tomorrow-night-blue .ace_variable {color: #FF9DA4}.ace-tomorrow-night-blue .ace_comment {color: #7285B7}.ace-tomorrow-night-blue .ace_markup.ace_underline {text-decoration: underline}.ace-tomorrow-night-blue .ace_indent-guide {background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNgUAn8z7Bq1ar/ABBUBHJ4/r3JAAAAAElFTkSuQmCC) right repeat-y}";
- var r = e("../lib/dom");
- r.importCssString(t.cssText, t.cssClass)
-})
\ No newline at end of file
diff --git a/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/theme-tomorrow_night_bright.js b/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/theme-tomorrow_night_bright.js
deleted file mode 100644
index ac5b758..0000000
--- a/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/theme-tomorrow_night_bright.js
+++ /dev/null
@@ -1,5 +0,0 @@
-ace.define("ace/theme/tomorrow_night_bright", ["require", "exports", "module", "ace/lib/dom"], function (e, t, n) {
- t.isDark = !0, t.cssClass = "ace-tomorrow-night-bright", t.cssText = ".ace-tomorrow-night-bright .ace_gutter {background: #1a1a1a;color: #DEDEDE}.ace-tomorrow-night-bright .ace_print-margin {width: 1px;background: #1a1a1a}.ace-tomorrow-night-bright .ace_scroller {background-color: #000000}.ace-tomorrow-night-bright .ace_text-layer {color: #DEDEDE}.ace-tomorrow-night-bright .ace_cursor {border-left: 2px solid #9F9F9F}.ace-tomorrow-night-bright .ace_overwrite-cursors .ace_cursor {border-left: 0px;border-bottom: 1px solid #9F9F9F}.ace-tomorrow-night-bright .ace_marker-layer .ace_selection {background: #424242}.ace-tomorrow-night-bright.ace_multiselect .ace_selection.ace_start {box-shadow: 0 0 3px 0px #000000;border-radius: 2px}.ace-tomorrow-night-bright .ace_marker-layer .ace_step {background: rgb(102, 82, 0)}.ace-tomorrow-night-bright .ace_marker-layer .ace_bracket {margin: -1px 0 0 -1px;border: 1px solid #343434}.ace-tomorrow-night-bright .ace_marker-layer .ace_active-line {background: #2A2A2A}.ace-tomorrow-night-bright .ace_gutter-active-line {background-color: #2A2A2A}.ace-tomorrow-night-bright .ace_marker-layer .ace_selected-word {border: 1px solid #424242}.ace-tomorrow-night-bright .ace_invisible {color: #343434}.ace-tomorrow-night-bright .ace_keyword,.ace-tomorrow-night-bright .ace_meta,.ace-tomorrow-night-bright .ace_storage,.ace-tomorrow-night-bright .ace_storage.ace_type,.ace-tomorrow-night-bright .ace_support.ace_type {color: #C397D8}.ace-tomorrow-night-bright .ace_keyword.ace_operator {color: #70C0B1}.ace-tomorrow-night-bright .ace_constant.ace_character,.ace-tomorrow-night-bright .ace_constant.ace_language,.ace-tomorrow-night-bright .ace_constant.ace_numeric,.ace-tomorrow-night-bright .ace_keyword.ace_other.ace_unit,.ace-tomorrow-night-bright .ace_support.ace_constant,.ace-tomorrow-night-bright .ace_variable.ace_parameter {color: #E78C45}.ace-tomorrow-night-bright .ace_constant.ace_other {color: #EEEEEE}.ace-tomorrow-night-bright .ace_invalid {color: #CED2CF;background-color: #DF5F5F}.ace-tomorrow-night-bright .ace_invalid.ace_deprecated {color: #CED2CF;background-color: #B798BF}.ace-tomorrow-night-bright .ace_fold {background-color: #7AA6DA;border-color: #DEDEDE}.ace-tomorrow-night-bright .ace_entity.ace_name.ace_function,.ace-tomorrow-night-bright .ace_support.ace_function,.ace-tomorrow-night-bright .ace_variable {color: #7AA6DA}.ace-tomorrow-night-bright .ace_support.ace_class,.ace-tomorrow-night-bright .ace_support.ace_type {color: #E7C547}.ace-tomorrow-night-bright .ace_markup.ace_heading,.ace-tomorrow-night-bright .ace_string {color: #B9CA4A}.ace-tomorrow-night-bright .ace_entity.ace_name.ace_tag,.ace-tomorrow-night-bright .ace_entity.ace_other.ace_attribute-name,.ace-tomorrow-night-bright .ace_meta.ace_tag,.ace-tomorrow-night-bright .ace_string.ace_regexp,.ace-tomorrow-night-bright .ace_variable {color: #D54E53}.ace-tomorrow-night-bright .ace_comment {color: #969896}.ace-tomorrow-night-bright .ace_markup.ace_underline {text-decoration: underline}.ace-tomorrow-night-bright .ace_indent-guide {background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNgYGD4z7Bq1ar/AAz9A/2naJQKAAAAAElFTkSuQmCC) right repeat-y}";
- var r = e("../lib/dom");
- r.importCssString(t.cssText, t.cssClass)
-})
\ No newline at end of file
diff --git a/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/theme-tomorrow_night_eighties.js b/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/theme-tomorrow_night_eighties.js
deleted file mode 100644
index 11ed648..0000000
--- a/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/theme-tomorrow_night_eighties.js
+++ /dev/null
@@ -1,5 +0,0 @@
-ace.define("ace/theme/tomorrow_night_eighties", ["require", "exports", "module", "ace/lib/dom"], function (e, t, n) {
- t.isDark = !0, t.cssClass = "ace-tomorrow-night-eighties", t.cssText = ".ace-tomorrow-night-eighties .ace_gutter {background: #272727;color: #CCC}.ace-tomorrow-night-eighties .ace_print-margin {width: 1px;background: #272727}.ace-tomorrow-night-eighties .ace_scroller {background-color: #2D2D2D}.ace-tomorrow-night-eighties .ace_constant.ace_other,.ace-tomorrow-night-eighties .ace_text-layer {color: #CCCCCC}.ace-tomorrow-night-eighties .ace_cursor {border-left: 2px solid #CCCCCC}.ace-tomorrow-night-eighties .ace_overwrite-cursors .ace_cursor {border-left: 0px;border-bottom: 1px solid #CCCCCC}.ace-tomorrow-night-eighties .ace_marker-layer .ace_selection {background: #515151}.ace-tomorrow-night-eighties.ace_multiselect .ace_selection.ace_start {box-shadow: 0 0 3px 0px #2D2D2D;border-radius: 2px}.ace-tomorrow-night-eighties .ace_marker-layer .ace_step {background: rgb(102, 82, 0)}.ace-tomorrow-night-eighties .ace_marker-layer .ace_bracket {margin: -1px 0 0 -1px;border: 1px solid #6A6A6A}.ace-tomorrow-night-eighties .ace_marker-layer .ace_active-line {background: #393939}.ace-tomorrow-night-eighties .ace_gutter-active-line {background-color: #393939}.ace-tomorrow-night-eighties .ace_marker-layer .ace_selected-word {border: 1px solid #515151}.ace-tomorrow-night-eighties .ace_invisible {color: #6A6A6A}.ace-tomorrow-night-eighties .ace_keyword,.ace-tomorrow-night-eighties .ace_meta,.ace-tomorrow-night-eighties .ace_storage,.ace-tomorrow-night-eighties .ace_storage.ace_type,.ace-tomorrow-night-eighties .ace_support.ace_type {color: #CC99CC}.ace-tomorrow-night-eighties .ace_keyword.ace_operator {color: #66CCCC}.ace-tomorrow-night-eighties .ace_constant.ace_character,.ace-tomorrow-night-eighties .ace_constant.ace_language,.ace-tomorrow-night-eighties .ace_constant.ace_numeric,.ace-tomorrow-night-eighties .ace_keyword.ace_other.ace_unit,.ace-tomorrow-night-eighties .ace_support.ace_constant,.ace-tomorrow-night-eighties .ace_variable.ace_parameter {color: #F99157}.ace-tomorrow-night-eighties .ace_invalid {color: #CDCDCD;background-color: #F2777A}.ace-tomorrow-night-eighties .ace_invalid.ace_deprecated {color: #CDCDCD;background-color: #CC99CC}.ace-tomorrow-night-eighties .ace_fold {background-color: #6699CC;border-color: #CCCCCC}.ace-tomorrow-night-eighties .ace_entity.ace_name.ace_function,.ace-tomorrow-night-eighties .ace_support.ace_function,.ace-tomorrow-night-eighties .ace_variable {color: #6699CC}.ace-tomorrow-night-eighties .ace_support.ace_class,.ace-tomorrow-night-eighties .ace_support.ace_type {color: #FFCC66}.ace-tomorrow-night-eighties .ace_markup.ace_heading,.ace-tomorrow-night-eighties .ace_string {color: #99CC99}.ace-tomorrow-night-eighties .ace_comment {color: #999999}.ace-tomorrow-night-eighties .ace_entity.ace_name.ace_tag,.ace-tomorrow-night-eighties .ace_entity.ace_other.ace_attribute-name,.ace-tomorrow-night-eighties .ace_meta.ace_tag,.ace-tomorrow-night-eighties .ace_variable {color: #F2777A}.ace-tomorrow-night-eighties .ace_markup.ace_underline {text-decoration: underline}.ace-tomorrow-night-eighties .ace_indent-guide {background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWPQ1dX9z7Bq1ar/ABE1BITwhhuFAAAAAElFTkSuQmCC) right repeat-y}";
- var r = e("../lib/dom");
- r.importCssString(t.cssText, t.cssClass)
-})
\ No newline at end of file
diff --git a/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/theme-twilight.js b/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/theme-twilight.js
deleted file mode 100644
index 3e9db05..0000000
--- a/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/theme-twilight.js
+++ /dev/null
@@ -1,5 +0,0 @@
-ace.define("ace/theme/twilight", ["require", "exports", "module", "ace/lib/dom"], function (e, t, n) {
- t.isDark = !0, t.cssClass = "ace-twilight", t.cssText = ".ace-twilight .ace_gutter {background: #232323;color: #E2E2E2}.ace-twilight .ace_print-margin {width: 1px;background: #232323}.ace-twilight .ace_scroller {background-color: #141414}.ace-twilight .ace_text-layer {color: #F8F8F8}.ace-twilight .ace_cursor {border-left: 2px solid #A7A7A7}.ace-twilight .ace_overwrite-cursors .ace_cursor {border-left: 0px;border-bottom: 1px solid #A7A7A7}.ace-twilight .ace_marker-layer .ace_selection {background: rgba(221, 240, 255, 0.20)}.ace-twilight.ace_multiselect .ace_selection.ace_start {box-shadow: 0 0 3px 0px #141414;border-radius: 2px}.ace-twilight .ace_marker-layer .ace_step {background: rgb(102, 82, 0)}.ace-twilight .ace_marker-layer .ace_bracket {margin: -1px 0 0 -1px;border: 1px solid rgba(255, 255, 255, 0.25)}.ace-twilight .ace_marker-layer .ace_active-line {background: rgba(255, 255, 255, 0.031)}.ace-twilight .ace_gutter-active-line {background-color: rgba(255, 255, 255, 0.031)}.ace-twilight .ace_marker-layer .ace_selected-word {border: 1px solid rgba(221, 240, 255, 0.20)}.ace-twilight .ace_invisible {color: rgba(255, 255, 255, 0.25)}.ace-twilight .ace_keyword,.ace-twilight .ace_meta {color: #CDA869}.ace-twilight .ace_constant,.ace-twilight .ace_constant.ace_character,.ace-twilight .ace_constant.ace_character.ace_escape,.ace-twilight .ace_constant.ace_other,.ace-twilight .ace_markup.ace_heading,.ace-twilight .ace_support.ace_constant {color: #CF6A4C}.ace-twilight .ace_invalid.ace_illegal {color: #F8F8F8;background-color: rgba(86, 45, 86, 0.75)}.ace-twilight .ace_invalid.ace_deprecated {text-decoration: underline;font-style: italic;color: #D2A8A1}.ace-twilight .ace_support {color: #9B859D}.ace-twilight .ace_fold {background-color: #AC885B;border-color: #F8F8F8}.ace-twilight .ace_support.ace_function {color: #DAD085}.ace-twilight .ace_markup.ace_list,.ace-twilight .ace_storage {color: #F9EE98}.ace-twilight .ace_entity.ace_name.ace_function,.ace-twilight .ace_meta.ace_tag,.ace-twilight .ace_variable {color: #AC885B}.ace-twilight .ace_string {color: #8F9D6A}.ace-twilight .ace_string.ace_regexp {color: #E9C062}.ace-twilight .ace_comment {font-style: italic;color: #5F5A60}.ace-twilight .ace_variable {color: #7587A6}.ace-twilight .ace_xml-pe {color: #494949}.ace-twilight .ace_markup.ace_underline {text-decoration: underline}.ace-twilight .ace_indent-guide {background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWMQERH5zzBz5sz/AA5EBAYqeZXWAAAAAElFTkSuQmCC) right repeat-y}";
- var r = e("../lib/dom");
- r.importCssString(t.cssText, t.cssClass)
-})
\ No newline at end of file
diff --git a/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/theme-vibrant_ink.js b/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/theme-vibrant_ink.js
deleted file mode 100644
index 983cf26..0000000
--- a/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/theme-vibrant_ink.js
+++ /dev/null
@@ -1,5 +0,0 @@
-ace.define("ace/theme/vibrant_ink", ["require", "exports", "module", "ace/lib/dom"], function (e, t, n) {
- t.isDark = !0, t.cssClass = "ace-vibrant-ink", t.cssText = ".ace-vibrant-ink .ace_gutter {background: #1a1a1a;color: #BEBEBE}.ace-vibrant-ink .ace_print-margin {width: 1px;background: #1a1a1a}.ace-vibrant-ink .ace_scroller {background-color: #0F0F0F}.ace-vibrant-ink .ace_text-layer {color: #FFFFFF}.ace-vibrant-ink .ace_cursor {border-left: 2px solid #FFFFFF}.ace-vibrant-ink .ace_overwrite-cursors .ace_cursor {border-left: 0px;border-bottom: 1px solid #FFFFFF}.ace-vibrant-ink .ace_marker-layer .ace_selection {background: #6699CC}.ace-vibrant-ink.ace_multiselect .ace_selection.ace_start {box-shadow: 0 0 3px 0px #0F0F0F;border-radius: 2px}.ace-vibrant-ink .ace_marker-layer .ace_step {background: rgb(102, 82, 0)}.ace-vibrant-ink .ace_marker-layer .ace_bracket {margin: -1px 0 0 -1px;border: 1px solid #404040}.ace-vibrant-ink .ace_marker-layer .ace_active-line {background: #333333}.ace-vibrant-ink .ace_gutter-active-line {background-color: #333333}.ace-vibrant-ink .ace_marker-layer .ace_selected-word {border: 1px solid #6699CC}.ace-vibrant-ink .ace_invisible {color: #404040}.ace-vibrant-ink .ace_keyword,.ace-vibrant-ink .ace_meta {color: #FF6600}.ace-vibrant-ink .ace_constant,.ace-vibrant-ink .ace_constant.ace_character,.ace-vibrant-ink .ace_constant.ace_character.ace_escape,.ace-vibrant-ink .ace_constant.ace_other {color: #339999}.ace-vibrant-ink .ace_constant.ace_numeric {color: #99CC99}.ace-vibrant-ink .ace_invalid,.ace-vibrant-ink .ace_invalid.ace_deprecated {color: #CCFF33;background-color: #000000}.ace-vibrant-ink .ace_fold {background-color: #FFCC00;border-color: #FFFFFF}.ace-vibrant-ink .ace_entity.ace_name.ace_function,.ace-vibrant-ink .ace_support.ace_function,.ace-vibrant-ink .ace_variable {color: #FFCC00}.ace-vibrant-ink .ace_variable.ace_parameter {font-style: italic}.ace-vibrant-ink .ace_string {color: #66FF00}.ace-vibrant-ink .ace_string.ace_regexp {color: #44B4CC}.ace-vibrant-ink .ace_comment {color: #9933CC}.ace-vibrant-ink .ace_entity.ace_other.ace_attribute-name {font-style: italic;color: #99CC99}.ace-vibrant-ink .ace_indent-guide {background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWPg5+f/z7Bq1ar/AA5lBCqoLxsgAAAAAElFTkSuQmCC) right repeat-y}";
- var r = e("../lib/dom");
- r.importCssString(t.cssText, t.cssClass)
-})
\ No newline at end of file
diff --git a/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/theme-xcode.js b/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/theme-xcode.js
deleted file mode 100644
index 91d3a0b..0000000
--- a/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/theme-xcode.js
+++ /dev/null
@@ -1,5 +0,0 @@
-ace.define("ace/theme/xcode", ["require", "exports", "module", "ace/lib/dom"], function (e, t, n) {
- t.isDark = !1, t.cssClass = "ace-xcode", t.cssText = "/* THIS THEME WAS AUTOGENERATED BY Theme.tmpl.css (UUID: EE3AD170-2B7F-4DE1-B724-C75F13FE0085) */.ace-xcode .ace_gutter {background: #e8e8e8;color: #333}.ace-xcode .ace_print-margin {width: 1px;background: #e8e8e8}.ace-xcode .ace_scroller {background-color: #FFFFFF}.ace-xcode .ace_text-layer {color: #000000}.ace-xcode .ace_cursor {border-left: 2px solid #000000}.ace-xcode .ace_overwrite-cursors .ace_cursor {border-left: 0px;border-bottom: 1px solid #000000}.ace-xcode .ace_marker-layer .ace_selection {background: #B5D5FF}.ace-xcode.ace_multiselect .ace_selection.ace_start {box-shadow: 0 0 3px 0px #FFFFFF;border-radius: 2px}.ace-xcode .ace_marker-layer .ace_step {background: rgb(198, 219, 174)}.ace-xcode .ace_marker-layer .ace_bracket {margin: -1px 0 0 -1px;border: 1px solid #BFBFBF}.ace-xcode .ace_marker-layer .ace_active-line {background: rgba(0, 0, 0, 0.071)}.ace-xcode .ace_gutter-active-line {background-color: rgba(0, 0, 0, 0.071)}.ace-xcode .ace_marker-layer .ace_selected-word {border: 1px solid #B5D5FF}.ace-xcode .ace_constant.ace_language,.ace-xcode .ace_keyword,.ace-xcode .ace_meta,.ace-xcode .ace_variable.ace_language {color: #C800A4}.ace-xcode .ace_invisible {color: #BFBFBF}.ace-xcode .ace_constant.ace_character,.ace-xcode .ace_constant.ace_other {color: #275A5E}.ace-xcode .ace_constant.ace_numeric {color: #3A00DC}.ace-xcode .ace_entity.ace_other.ace_attribute-name,.ace-xcode .ace_support.ace_constant,.ace-xcode .ace_support.ace_function {color: #450084}.ace-xcode .ace_fold {background-color: #C800A4;border-color: #000000}.ace-xcode .ace_entity.ace_name.ace_tag,.ace-xcode .ace_support.ace_class,.ace-xcode .ace_support.ace_type {color: #790EAD}.ace-xcode .ace_storage {color: #C900A4}.ace-xcode .ace_string {color: #DF0002}.ace-xcode .ace_comment {color: #008E00}.ace-xcode .ace_indent-guide {background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==) right repeat-y;}";
- var r = e("../lib/dom");
- r.importCssString(t.cssText, t.cssClass)
-})
\ No newline at end of file
diff --git a/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/worker-coffee.js b/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/worker-coffee.js
deleted file mode 100644
index 2eb1dcf..0000000
--- a/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/worker-coffee.js
+++ /dev/null
@@ -1,3240 +0,0 @@
-"no use strict";
-function initBaseUrls(e) {
- require.tlns = e
-}
-function initSender() {
- var e = require(null, "ace/lib/event_emitter").EventEmitter, t = require(null, "ace/lib/oop"), n = function () {
- };
- return function () {
- t.implement(this, e), 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(n.prototype), new n
-}
-if (typeof window != "undefined" && window.document)throw"atempt to load ace worker into main window instead of webWorker";
-var console = {log: function () {
- var e = Array.prototype.slice.call(arguments, 0);
- postMessage({type: "log", data: e})
-}, error: function () {
- var e = Array.prototype.slice.call(arguments, 0);
- postMessage({type: "log", data: e})
-}}, window = {console: console}, normalizeModule = function (e, t) {
- if (t.indexOf("!") !== -1) {
- var n = t.split("!");
- return normalizeModule(e, n[0]) + "!" + normalizeModule(e, n[1])
- }
- if (t.charAt(0) == ".") {
- var r = e.split("/").slice(0, -1).join("/");
- t = r + "/" + t;
- while (t.indexOf(".") !== -1 && i != t) {
- var i = t;
- t = t.replace(/\/\.\//, "/").replace(/[^\/]+\/\.\.\//, "")
- }
- }
- return t
-}, require = function (e, t) {
- if (!t.charAt)throw new Error("worker.js require() accepts only (parentId, id) as arguments");
- t = normalizeModule(e, t);
- var n = require.modules[t];
- if (n)return n.initialized || (n.initialized = !0, n.exports = n.factory().exports), n.exports;
- var r = t.split("/");
- r[0] = require.tlns[r[0]] || r[0];
- var i = r.join("/") + ".js";
- return require.id = t, importScripts(i), require(e, t)
-};
-require.modules = {}, require.tlns = {};
-var define = function (e, t, n) {
- arguments.length == 2 ? (n = t, typeof e != "string" && (t = e, e = require.id)) : arguments.length == 1 && (n = e, e = require.id);
- if (e.indexOf("text!") === 0)return;
- var r = function (t, n) {
- return require(e, t, n)
- };
- require.modules[e] = {factory: function () {
- var e = {exports: {}}, t = n(r, e.exports, e);
- return t && (e.exports = t), e
- }}
-}, main, sender;
-onmessage = function (e) {
- var t = e.data;
- if (t.command) {
- if (!main[t.command])throw new Error("Unknown command:" + t.command);
- main[t.command].apply(main, t.args)
- } else if (t.init) {
- initBaseUrls(t.tlns), require(null, "ace/lib/fixoldbrowsers"), sender = initSender();
- var n = require(null, t.module)[t.classname];
- main = new n(sender)
- } else t.event && sender && sender._emit(t.event, t.data)
-}, define("ace/lib/fixoldbrowsers", ["require", "exports", "module", "ace/lib/regexp", "ace/lib/es5-shim"], function (e, t, n) {
- e("./regexp"), e("./es5-shim")
-}), define("ace/lib/regexp", ["require", "exports", "module"], function (e, t, n) {
- function o(e) {
- return(e.global ? "g" : "") + (e.ignoreCase ? "i" : "") + (e.multiline ? "m" : "") + (e.extended ? "x" : "") + (e.sticky ? "y" : "")
- }
-
- function u(e, t, n) {
- if (Array.prototype.indexOf)return e.indexOf(t, n);
- for (var r = n || 0; r < e.length; r++)if (e[r] === t)return r;
- return-1
- }
-
- var r = {exec: RegExp.prototype.exec, test: RegExp.prototype.test, match: String.prototype.match, replace: String.prototype.replace, split: String.prototype.split}, i = r.exec.call(/()??/, "")[1] === undefined, s = function () {
- var e = /^/g;
- return r.test.call(e, ""), !e.lastIndex
- }();
- if (s && i)return;
- RegExp.prototype.exec = function (e) {
- var t = r.exec.apply(this, arguments), n, a;
- if (typeof e == "string" && t) {
- !i && t.length > 1 && u(t, "") > -1 && (a = RegExp(this.source, r.replace.call(o(this), "g", "")), r.replace.call(e.slice(t.index), a, function () {
- for (var e = 1; e < arguments.length - 2; e++)arguments[e] === undefined && (t[e] = undefined)
- }));
- if (this._xregexp && this._xregexp.captureNames)for (var f = 1; f < t.length; f++)n = this._xregexp.captureNames[f - 1], n && (t[n] = t[f]);
- !s && this.global && !t[0].length && this.lastIndex > t.index && this.lastIndex--
- }
- return t
- }, s || (RegExp.prototype.test = function (e) {
- var t = r.exec.call(this, e);
- return t && this.global && !t[0].length && this.lastIndex > t.index && this.lastIndex--, !!t
- })
-}), define("ace/lib/es5-shim", ["require", "exports", "module"], function (e, t, n) {
- function r() {
- }
-
- function w(e) {
- try {
- return Object.defineProperty(e, "sentinel", {}), "sentinel"in e
- } catch (t) {
- }
- }
-
- function j(e) {
- return e = +e, e !== e ? e = 0 : e !== 0 && e !== 1 / 0 && e !== -1 / 0 && (e = (e > 0 || -1) * Math.floor(Math.abs(e))), e
- }
-
- function F(e) {
- var t = typeof e;
- return e === null || t === "undefined" || t === "boolean" || t === "number" || t === "string"
- }
-
- function I(e) {
- var t, n, r;
- if (F(e))return e;
- n = e.valueOf;
- if (typeof n == "function") {
- t = n.call(e);
- if (F(t))return t
- }
- r = e.toString;
- if (typeof r == "function") {
- t = r.call(e);
- if (F(t))return t
- }
- throw new TypeError
- }
-
- Function.prototype.bind || (Function.prototype.bind = function (t) {
- var n = this;
- if (typeof n != "function")throw new TypeError("Function.prototype.bind called on incompatible " + n);
- var i = u.call(arguments, 1), s = function () {
- if (this instanceof s) {
- var e = n.apply(this, i.concat(u.call(arguments)));
- return Object(e) === e ? e : this
- }
- return n.apply(t, i.concat(u.call(arguments)))
- };
- return n.prototype && (r.prototype = n.prototype, s.prototype = new r, r.prototype = null), s
- });
- var i = Function.prototype.call, s = Array.prototype, o = Object.prototype, u = s.slice, a = i.bind(o.toString), f = i.bind(o.hasOwnProperty), l, c, h, p, d;
- if (d = f(o, "__defineGetter__"))l = i.bind(o.__defineGetter__), c = i.bind(o.__defineSetter__), h = i.bind(o.__lookupGetter__), p = i.bind(o.__lookupSetter__);
- if ([1, 2].splice(0).length != 2)if (!function () {
- function e(e) {
- var t = new Array(e + 2);
- return t[0] = t[1] = 0, t
- }
-
- var t = [], n;
- t.splice.apply(t, e(20)), t.splice.apply(t, e(26)), n = t.length, t.splice(5, 0, "XXX"), n + 1 == t.length;
- if (n + 1 == t.length)return!0
- }())Array.prototype.splice = function (e, t) {
- var n = this.length;
- e > 0 ? e > n && (e = n) : e == void 0 ? e = 0 : e < 0 && (e = Math.max(n + e, 0)), e + t < n || (t = n - e);
- var r = this.slice(e, e + t), i = u.call(arguments, 2), s = i.length;
- if (e === n)s && this.push.apply(this, i); else {
- var o = Math.min(t, n - e), a = e + o, f = a + s - o, l = n - a, c = n - o;
- if (f < a)for (var h = 0; h < l; ++h)this[f + h] = this[a + h]; else if (f > a)for (h = l; h--;)this[f + h] = this[a + h];
- if (s && e === c)this.length = c, this.push.apply(this, i); else {
- this.length = c + s;
- for (h = 0; h < s; ++h)this[e + h] = i[h]
- }
- }
- return r
- }; else {
- var v = Array.prototype.splice;
- Array.prototype.splice = function (e, t) {
- return arguments.length ? v.apply(this, [e === void 0 ? 0 : e, t === void 0 ? this.length - e : t].concat(u.call(arguments, 2))) : []
- }
- }
- Array.isArray || (Array.isArray = function (t) {
- return a(t) == "[object Array]"
- });
- var m = Object("a"), g = m[0] != "a" || !(0 in m);
- Array.prototype.forEach || (Array.prototype.forEach = function (t) {
- var n = q(this), r = g && a(this) == "[object String]" ? this.split("") : n, i = arguments[1], s = -1, o = r.length >>> 0;
- if (a(t) != "[object Function]")throw new TypeError;
- while (++s < o)s in r && t.call(i, r[s], s, n)
- }), Array.prototype.map || (Array.prototype.map = function (t) {
- var n = q(this), r = g && a(this) == "[object String]" ? this.split("") : n, i = r.length >>> 0, s = Array(i), o = arguments[1];
- if (a(t) != "[object Function]")throw new TypeError(t + " is not a function");
- for (var u = 0; u < i; u++)u in r && (s[u] = t.call(o, r[u], u, n));
- return s
- }), Array.prototype.filter || (Array.prototype.filter = function (t) {
- var n = q(this), r = g && a(this) == "[object String]" ? this.split("") : n, i = r.length >>> 0, s = [], o, u = arguments[1];
- if (a(t) != "[object Function]")throw new TypeError(t + " is not a function");
- for (var f = 0; f < i; f++)f in r && (o = r[f], t.call(u, o, f, n) && s.push(o));
- return s
- }), Array.prototype.every || (Array.prototype.every = function (t) {
- var n = q(this), r = g && a(this) == "[object String]" ? this.split("") : n, i = r.length >>> 0, s = arguments[1];
- if (a(t) != "[object Function]")throw new TypeError(t + " is not a function");
- for (var o = 0; o < i; o++)if (o in r && !t.call(s, r[o], o, n))return!1;
- return!0
- }), Array.prototype.some || (Array.prototype.some = function (t) {
- var n = q(this), r = g && a(this) == "[object String]" ? this.split("") : n, i = r.length >>> 0, s = arguments[1];
- if (a(t) != "[object Function]")throw new TypeError(t + " is not a function");
- for (var o = 0; o < i; o++)if (o in r && t.call(s, r[o], o, n))return!0;
- return!1
- }), Array.prototype.reduce || (Array.prototype.reduce = function (t) {
- var n = q(this), r = g && a(this) == "[object String]" ? this.split("") : n, i = r.length >>> 0;
- if (a(t) != "[object Function]")throw new TypeError(t + " is not a function");
- if (!i && arguments.length == 1)throw new TypeError("reduce of empty array with no initial value");
- var s = 0, o;
- if (arguments.length >= 2)o = arguments[1]; else do {
- if (s in r) {
- o = r[s++];
- break
- }
- if (++s >= i)throw new TypeError("reduce of empty array with no initial value")
- } while (!0);
- for (; s < i; s++)s in r && (o = t.call(void 0, o, r[s], s, n));
- return o
- }), Array.prototype.reduceRight || (Array.prototype.reduceRight = function (t) {
- var n = q(this), r = g && a(this) == "[object String]" ? this.split("") : n, i = r.length >>> 0;
- if (a(t) != "[object Function]")throw new TypeError(t + " is not a function");
- if (!i && arguments.length == 1)throw new TypeError("reduceRight of empty array with no initial value");
- var s, o = i - 1;
- if (arguments.length >= 2)s = arguments[1]; else do {
- if (o in r) {
- s = r[o--];
- break
- }
- if (--o < 0)throw new TypeError("reduceRight of empty array with no initial value")
- } while (!0);
- do o in this && (s = t.call(void 0, s, r[o], o, n)); while (o--);
- return s
- });
- if (!Array.prototype.indexOf || [0, 1].indexOf(1, 2) != -1)Array.prototype.indexOf = function (t) {
- var n = g && a(this) == "[object String]" ? this.split("") : q(this), r = n.length >>> 0;
- if (!r)return-1;
- var i = 0;
- arguments.length > 1 && (i = j(arguments[1])), i = i >= 0 ? i : Math.max(0, r + i);
- for (; i < r; i++)if (i in n && n[i] === t)return i;
- return-1
- };
- if (!Array.prototype.lastIndexOf || [0, 1].lastIndexOf(0, -3) != -1)Array.prototype.lastIndexOf = function (t) {
- var n = g && a(this) == "[object String]" ? this.split("") : q(this), r = n.length >>> 0;
- if (!r)return-1;
- var i = r - 1;
- arguments.length > 1 && (i = Math.min(i, j(arguments[1]))), i = i >= 0 ? i : r - Math.abs(i);
- for (; i >= 0; i--)if (i in n && t === n[i])return i;
- return-1
- };
- Object.getPrototypeOf || (Object.getPrototypeOf = function (t) {
- return t.__proto__ || (t.constructor ? t.constructor.prototype : o)
- });
- if (!Object.getOwnPropertyDescriptor) {
- var y = "Object.getOwnPropertyDescriptor called on a non-object: ";
- Object.getOwnPropertyDescriptor = function (t, n) {
- if (typeof t != "object" && typeof t != "function" || t === null)throw new TypeError(y + t);
- if (!f(t, n))return;
- var r, i, s;
- r = {enumerable: !0, configurable: !0};
- if (d) {
- var u = t.__proto__;
- t.__proto__ = o;
- var i = h(t, n), s = p(t, n);
- t.__proto__ = u;
- if (i || s)return i && (r.get = i), s && (r.set = s), r
- }
- return r.value = t[n], r
- }
- }
- Object.getOwnPropertyNames || (Object.getOwnPropertyNames = function (t) {
- return Object.keys(t)
- });
- if (!Object.create) {
- var b;
- Object.prototype.__proto__ === null ? b = function () {
- return{__proto__: null}
- } : b = function () {
- var e = {};
- for (var t in e)e[t] = null;
- return e.constructor = e.hasOwnProperty = e.propertyIsEnumerable = e.isPrototypeOf = e.toLocaleString = e.toString = e.valueOf = e.__proto__ = null, e
- }, Object.create = function (t, n) {
- var r;
- if (t === null)r = b(); else {
- if (typeof t != "object")throw new TypeError("typeof prototype[" + typeof t + "] != 'object'");
- var i = function () {
- };
- i.prototype = t, r = new i, r.__proto__ = t
- }
- return n !== void 0 && Object.defineProperties(r, n), r
- }
- }
- if (Object.defineProperty) {
- var E = w({}), S = typeof document == "undefined" || w(document.createElement("div"));
- if (!E || !S)var x = Object.defineProperty
- }
- if (!Object.defineProperty || x) {
- var T = "Property description must be an object: ", N = "Object.defineProperty called on non-object: ", C = "getters & setters can not be defined on this javascript engine";
- Object.defineProperty = function (t, n, r) {
- if (typeof t != "object" && typeof t != "function" || t === null)throw new TypeError(N + t);
- if (typeof r != "object" && typeof r != "function" || r === null)throw new TypeError(T + r);
- if (x)try {
- return x.call(Object, t, n, r)
- } catch (i) {
- }
- if (f(r, "value"))if (d && (h(t, n) || p(t, n))) {
- var s = t.__proto__;
- t.__proto__ = o, delete t[n], t[n] = r.value, t.__proto__ = s
- } else t[n] = r.value; else {
- if (!d)throw new TypeError(C);
- f(r, "get") && l(t, n, r.get), f(r, "set") && c(t, n, r.set)
- }
- return t
- }
- }
- Object.defineProperties || (Object.defineProperties = function (t, n) {
- for (var r in n)f(n, r) && Object.defineProperty(t, r, n[r]);
- return t
- }), Object.seal || (Object.seal = function (t) {
- return t
- }), Object.freeze || (Object.freeze = function (t) {
- return t
- });
- try {
- Object.freeze(function () {
- })
- } catch (k) {
- Object.freeze = function (t) {
- return function (n) {
- return typeof n == "function" ? n : t(n)
- }
- }(Object.freeze)
- }
- Object.preventExtensions || (Object.preventExtensions = function (t) {
- return t
- }), Object.isSealed || (Object.isSealed = function (t) {
- return!1
- }), Object.isFrozen || (Object.isFrozen = function (t) {
- return!1
- }), Object.isExtensible || (Object.isExtensible = function (t) {
- if (Object(t) === t)throw new TypeError;
- var n = "";
- while (f(t, n))n += "?";
- t[n] = !0;
- var r = f(t, n);
- return delete t[n], r
- });
- if (!Object.keys) {
- var L = !0, A = ["toString", "toLocaleString", "valueOf", "hasOwnProperty", "isPrototypeOf", "propertyIsEnumerable", "constructor"], O = A.length;
- for (var M in{toString: null})L = !1;
- Object.keys = function R(e) {
- if (typeof e != "object" && typeof e != "function" || e === null)throw new TypeError("Object.keys called on a non-object");
- var R = [];
- for (var t in e)f(e, t) && R.push(t);
- if (L)for (var n = 0, r = O; n < r; n++) {
- var i = A[n];
- f(e, i) && R.push(i)
- }
- return R
- }
- }
- Date.now || (Date.now = function () {
- return(new Date).getTime()
- });
- if ("0".split(void 0, 0).length) {
- var _ = String.prototype.split;
- String.prototype.split = function (e, t) {
- return e === void 0 && t === 0 ? [] : _.apply(this, arguments)
- }
- }
- if ("".substr && "0b".substr(-1) !== "b") {
- var D = String.prototype.substr;
- String.prototype.substr = function (e, t) {
- return D.call(this, e < 0 ? (e = this.length + e) < 0 ? 0 : e : e, t)
- }
- }
- var P = " \n\f\r Â áš€á Žâ€€â€â€‚         âŸã€€\u2028\u2029";
- if (!String.prototype.trim || P.trim()) {
- P = "[" + P + "]";
- var H = new RegExp("^" + P + P + "*"), B = new RegExp(P + P + "*$");
- String.prototype.trim = function () {
- if (this === undefined || this === null)throw new TypeError("can't convert " + this + " to object");
- return String(this).replace(H, "").replace(B, "")
- }
- }
- var q = function (e) {
- if (e == null)throw new TypeError("can't convert " + e + " to object");
- return Object(e)
- }
-}), define("ace/lib/event_emitter", ["require", "exports", "module"], function (e, t, n) {
- var r = {};
- r._emit = r._dispatchEvent = function (e, t) {
- this._eventRegistry = this._eventRegistry || {}, this._defaultHandlers = this._defaultHandlers || {};
- var n = this._eventRegistry[e] || [], r = this._defaultHandlers[e];
- if (!n.length && !r)return;
- if (typeof t != "object" || !t)t = {};
- t.type || (t.type = e), t.stopPropagation || (t.stopPropagation = function () {
- this.propagationStopped = !0
- }), t.preventDefault || (t.preventDefault = function () {
- this.defaultPrevented = !0
- });
- for (var i = 0; i < n.length; i++) {
- n[i](t);
- if (t.propagationStopped)break
- }
- if (r && !t.defaultPrevented)return r(t)
- }, r.setDefaultHandler = function (e, t) {
- this._defaultHandlers = this._defaultHandlers || {};
- if (this._defaultHandlers[e])throw new Error("The default handler for '" + e + "' is already set");
- this._defaultHandlers[e] = t
- }, r.on = r.addEventListener = function (e, t) {
- this._eventRegistry = this._eventRegistry || {};
- var n = this._eventRegistry[e];
- n || (n = this._eventRegistry[e] = []), n.indexOf(t) == -1 && n.push(t)
- }, r.removeListener = r.removeEventListener = function (e, t) {
- this._eventRegistry = this._eventRegistry || {};
- var n = this._eventRegistry[e];
- if (!n)return;
- var r = n.indexOf(t);
- r !== -1 && n.splice(r, 1)
- }, r.removeAllListeners = function (e) {
- this._eventRegistry && (this._eventRegistry[e] = [])
- }, t.EventEmitter = r
-}), define("ace/lib/oop", ["require", "exports", "module"], function (e, t, n) {
- t.inherits = function () {
- var e = function () {
- };
- return function (t, n) {
- e.prototype = n.prototype, t.super_ = n.prototype, t.prototype = new e, t.prototype.constructor = t
- }
- }(), t.mixin = function (e, t) {
- for (var n in t)e[n] = t[n]
- }, t.implement = function (e, n) {
- t.mixin(e, n)
- }
-}), define("ace/mode/coffee_worker", ["require", "exports", "module", "ace/lib/oop", "ace/worker/mirror", "ace/mode/coffee/coffee-script"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("../worker/mirror").Mirror, s = e("../mode/coffee/coffee-script");
- window.addEventListener = function () {
- };
- var o = t.Worker = function (e) {
- i.call(this, e), this.setTimeout(200)
- };
- r.inherits(o, i), function () {
- this.onUpdate = function () {
- var e = this.doc.getValue();
- try {
- s.parse(e)
- } catch (t) {
- var n = t.message.match(/Parse error on line (\d+): (.*)/);
- if (n) {
- this.sender.emit("error", {row: parseInt(n[1], 10) - 1, column: null, text: n[2], type: "error"});
- return
- }
- if (t instanceof SyntaxError) {
- var n = t.message.match(/ on line (\d+)/);
- n && this.sender.emit("error", {row: parseInt(n[1], 10) - 1, column: null, text: t.message.replace(n[0], ""), type: "error"})
- }
- return
- }
- this.sender.emit("ok")
- }
- }.call(o.prototype)
-}), define("ace/worker/mirror", ["require", "exports", "module", "ace/document", "ace/lib/lang"], function (e, t, n) {
- var r = e("../document").Document, i = e("../lib/lang"), s = t.Mirror = function (e) {
- this.sender = e;
- var t = this.doc = new r(""), n = this.deferredUpdate = i.deferredCall(this.onUpdate.bind(this)), s = this;
- e.on("change", function (e) {
- t.applyDeltas([e.data]), n.schedule(s.$timeout)
- })
- };
- (function () {
- this.$timeout = 500, this.setTimeout = function (e) {
- this.$timeout = e
- }, this.setValue = function (e) {
- this.doc.setValue(e), this.deferredUpdate.schedule(this.$timeout)
- }, this.getValue = function (e) {
- this.sender.callback(this.doc.getValue(), e)
- }, this.onUpdate = function () {
- }
- }).call(s.prototype)
-}), define("ace/document", ["require", "exports", "module", "ace/lib/oop", "ace/lib/event_emitter", "ace/range", "ace/anchor"], function (e, t, n) {
- var r = e("./lib/oop"), i = e("./lib/event_emitter").EventEmitter, s = e("./range").Range, o = e("./anchor").Anchor, u = function (e) {
- this.$lines = [], e.length == 0 ? this.$lines = [""] : Array.isArray(e) ? this.insertLines(0, e) : this.insert({row: 0, column: 0}, e)
- };
- (function () {
- r.implement(this, i), this.setValue = function (e) {
- var t = this.getLength();
- this.remove(new s(0, 0, t, this.getLine(t - 1).length)), this.insert({row: 0, column: 0}, e)
- }, this.getValue = function () {
- return this.getAllLines().join(this.getNewLineCharacter())
- }, this.createAnchor = function (e, t) {
- return new o(this, e, t)
- }, "aaa".split(/a/).length == 0 ? this.$split = function (e) {
- return e.replace(/\r\n|\r/g, "\n").split("\n")
- } : this.$split = function (e) {
- return e.split(/\r\n|\r|\n/)
- }, this.$detectNewLine = function (e) {
- var t = e.match(/^.*?(\r\n|\r|\n)/m);
- t ? this.$autoNewLine = t[1] : this.$autoNewLine = "\n"
- }, this.getNewLineCharacter = function () {
- switch (this.$newLineMode) {
- case"windows":
- return"\r\n";
- case"unix":
- return"\n";
- default:
- return this.$autoNewLine
- }
- }, this.$autoNewLine = "\n", this.$newLineMode = "auto", this.setNewLineMode = function (e) {
- if (this.$newLineMode === e)return;
- this.$newLineMode = e
- }, this.getNewLineMode = function () {
- return this.$newLineMode
- }, this.isNewLine = function (e) {
- return e == "\r\n" || e == "\r" || e == "\n"
- }, this.getLine = function (e) {
- return this.$lines[e] || ""
- }, this.getLines = function (e, t) {
- return this.$lines.slice(e, t + 1)
- }, this.getAllLines = function () {
- return this.getLines(0, this.getLength())
- }, this.getLength = function () {
- return this.$lines.length
- }, this.getTextRange = function (e) {
- if (e.start.row == e.end.row)return this.$lines[e.start.row].substring(e.start.column, e.end.column);
- var t = this.getLines(e.start.row + 1, e.end.row - 1);
- return t.unshift((this.$lines[e.start.row] || "").substring(e.start.column)), t.push((this.$lines[e.end.row] || "").substring(0, e.end.column)), t.join(this.getNewLineCharacter())
- }, this.$clipPosition = function (e) {
- var t = this.getLength();
- return e.row >= t && (e.row = Math.max(0, t - 1), e.column = this.getLine(t - 1).length), e
- }, this.insert = function (e, t) {
- if (!t || t.length === 0)return e;
- e = this.$clipPosition(e), this.getLength() <= 1 && this.$detectNewLine(t);
- var n = this.$split(t), r = n.splice(0, 1)[0], i = n.length == 0 ? null : n.splice(n.length - 1, 1)[0];
- return e = this.insertInLine(e, r), i !== null && (e = this.insertNewLine(e), e = this.insertLines(e.row, n), e = this.insertInLine(e, i || "")), e
- }, this.insertLines = function (e, t) {
- if (t.length == 0)return{row: e, column: 0};
- if (t.length > 65535) {
- var n = this.insertLines(e, t.slice(65535));
- t = t.slice(0, 65535)
- }
- var r = [e, 0];
- r.push.apply(r, t), this.$lines.splice.apply(this.$lines, r);
- var i = new s(e, 0, e + t.length, 0), o = {action: "insertLines", range: i, lines: t};
- return this._emit("change", {data: o}), n || i.end
- }, this.insertNewLine = function (e) {
- e = this.$clipPosition(e);
- var t = this.$lines[e.row] || "";
- this.$lines[e.row] = t.substring(0, e.column), this.$lines.splice(e.row + 1, 0, t.substring(e.column, t.length));
- var n = {row: e.row + 1, column: 0}, r = {action: "insertText", range: s.fromPoints(e, n), text: this.getNewLineCharacter()};
- return this._emit("change", {data: r}), n
- }, this.insertInLine = function (e, t) {
- if (t.length == 0)return e;
- var n = this.$lines[e.row] || "";
- this.$lines[e.row] = n.substring(0, e.column) + t + n.substring(e.column);
- var r = {row: e.row, column: e.column + t.length}, i = {action: "insertText", range: s.fromPoints(e, r), text: t};
- return this._emit("change", {data: i}), r
- }, this.remove = function (e) {
- e.start = this.$clipPosition(e.start), e.end = this.$clipPosition(e.end);
- if (e.isEmpty())return e.start;
- var t = e.start.row, n = e.end.row;
- if (e.isMultiLine()) {
- var r = e.start.column == 0 ? t : t + 1, i = n - 1;
- e.end.column > 0 && this.removeInLine(n, 0, e.end.column), i >= r && this.removeLines(r, i), r != t && (this.removeInLine(t, e.start.column, this.getLine(t).length), this.removeNewLine(e.start.row))
- } else this.removeInLine(t, e.start.column, e.end.column);
- return e.start
- }, this.removeInLine = function (e, t, n) {
- if (t == n)return;
- var r = new s(e, t, e, n), i = this.getLine(e), o = i.substring(t, n), u = i.substring(0, t) + i.substring(n, i.length);
- this.$lines.splice(e, 1, u);
- var a = {action: "removeText", range: r, text: o};
- return this._emit("change", {data: a}), r.start
- }, this.removeLines = function (e, t) {
- var n = new s(e, 0, t + 1, 0), r = this.$lines.splice(e, t - e + 1), i = {action: "removeLines", range: n, nl: this.getNewLineCharacter(), lines: r};
- return this._emit("change", {data: i}), r
- }, this.removeNewLine = function (e) {
- var t = this.getLine(e), n = this.getLine(e + 1), r = new s(e, t.length, e + 1, 0), i = t + n;
- this.$lines.splice(e, 2, i);
- var o = {action: "removeText", range: r, text: this.getNewLineCharacter()};
- this._emit("change", {data: o})
- }, this.replace = function (e, t) {
- if (t.length == 0 && e.isEmpty())return e.start;
- if (t == this.getTextRange(e))return e.end;
- this.remove(e);
- if (t)var n = this.insert(e.start, t); else n = e.start;
- return n
- }, this.applyDeltas = function (e) {
- for (var t = 0; t < e.length; t++) {
- var n = e[t], r = s.fromPoints(n.range.start, n.range.end);
- n.action == "insertLines" ? this.insertLines(r.start.row, n.lines) : n.action == "insertText" ? this.insert(r.start, n.text) : n.action == "removeLines" ? this.removeLines(r.start.row, r.end.row - 1) : n.action == "removeText" && this.remove(r)
- }
- }, this.revertDeltas = function (e) {
- for (var t = e.length - 1; t >= 0; t--) {
- var n = e[t], r = s.fromPoints(n.range.start, n.range.end);
- n.action == "insertLines" ? this.removeLines(r.start.row, r.end.row - 1) : n.action == "insertText" ? this.remove(r) : n.action == "removeLines" ? this.insertLines(r.start.row, n.lines) : n.action == "removeText" && this.insert(r.start, n.text)
- }
- }, this.indexToPosition = function (e, t) {
- var n = this.$lines || this.getAllLines(), r = this.getNewLineCharacter().length;
- for (var i = t || 0, s = n.length; i < s; i++) {
- e -= n[i].length + r;
- if (e < 0)return{row: i, column: e + n[i].length + r}
- }
- return{row: s - 1, column: n[s - 1].length}
- }, this.positionToIndex = function (e, t) {
- var n = this.$lines || this.getAllLines(), r = this.getNewLineCharacter().length, i = 0, s = Math.min(e.row, n.length);
- for (var o = t || 0; o < s; ++o)i += n[o].length;
- return i + r * o + e.column
- }
- }).call(u.prototype), t.Document = u
-}), define("ace/range", ["require", "exports", "module"], function (e, t, n) {
- var r = function (e, t, n, r) {
- this.start = {row: e, column: t}, this.end = {row: n, column: r}
- };
- (function () {
- this.isEqual = function (e) {
- return this.start.row == e.start.row && this.end.row == e.end.row && this.start.column == e.start.column && this.end.column == e.end.column
- }, this.toString = function () {
- return"Range: [" + this.start.row + "/" + this.start.column + "] -> [" + this.end.row + "/" + this.end.column + "]"
- }, this.contains = function (e, t) {
- return this.compare(e, t) == 0
- }, this.compareRange = function (e) {
- var t, n = e.end, r = e.start;
- return t = this.compare(n.row, n.column), t == 1 ? (t = this.compare(r.row, r.column), t == 1 ? 2 : t == 0 ? 1 : 0) : t == -1 ? -2 : (t = this.compare(r.row, r.column), t == -1 ? -1 : t == 1 ? 42 : 0)
- }, this.comparePoint = function (e) {
- return this.compare(e.row, e.column)
- }, this.containsRange = function (e) {
- return this.comparePoint(e.start) == 0 && this.comparePoint(e.end) == 0
- }, this.intersects = function (e) {
- var t = this.compareRange(e);
- return t == -1 || t == 0 || t == 1
- }, this.isEnd = function (e, t) {
- return this.end.row == e && this.end.column == t
- }, this.isStart = function (e, t) {
- return this.start.row == e && this.start.column == t
- }, this.setStart = function (e, t) {
- typeof e == "object" ? (this.start.column = e.column, this.start.row = e.row) : (this.start.row = e, this.start.column = t)
- }, this.setEnd = function (e, t) {
- typeof e == "object" ? (this.end.column = e.column, this.end.row = e.row) : (this.end.row = e, this.end.column = t)
- }, this.inside = function (e, t) {
- return this.compare(e, t) == 0 ? this.isEnd(e, t) || this.isStart(e, t) ? !1 : !0 : !1
- }, this.insideStart = function (e, t) {
- return this.compare(e, t) == 0 ? this.isEnd(e, t) ? !1 : !0 : !1
- }, this.insideEnd = function (e, t) {
- return this.compare(e, t) == 0 ? this.isStart(e, t) ? !1 : !0 : !1
- }, this.compare = function (e, t) {
- return!this.isMultiLine() && e === this.start.row ? t < this.start.column ? -1 : t > this.end.column ? 1 : 0 : e < this.start.row ? -1 : e > this.end.row ? 1 : this.start.row === e ? t >= this.start.column ? 0 : -1 : this.end.row === e ? t <= this.end.column ? 0 : 1 : 0
- }, this.compareStart = function (e, t) {
- return this.start.row == e && this.start.column == t ? -1 : this.compare(e, t)
- }, this.compareEnd = function (e, t) {
- return this.end.row == e && this.end.column == t ? 1 : this.compare(e, t)
- }, this.compareInside = function (e, t) {
- return this.end.row == e && this.end.column == t ? 1 : this.start.row == e && this.start.column == t ? -1 : this.compare(e, t)
- }, this.clipRows = function (e, t) {
- if (this.end.row > t)var n = {row: t + 1, column: 0};
- if (this.start.row > t)var i = {row: t + 1, column: 0};
- if (this.start.row < e)var i = {row: e, column: 0};
- if (this.end.row < e)var n = {row: e, column: 0};
- return r.fromPoints(i || this.start, n || this.end)
- }, this.extend = function (e, t) {
- var n = this.compare(e, t);
- if (n == 0)return this;
- if (n == -1)var i = {row: e, column: t}; else var s = {row: e, column: t};
- return r.fromPoints(i || this.start, s || this.end)
- }, this.isEmpty = function () {
- return this.start.row == this.end.row && this.start.column == this.end.column
- }, this.isMultiLine = function () {
- return this.start.row !== this.end.row
- }, this.clone = function () {
- return r.fromPoints(this.start, this.end)
- }, this.collapseRows = function () {
- return this.end.column == 0 ? new r(this.start.row, 0, Math.max(this.start.row, this.end.row - 1), 0) : new r(this.start.row, 0, this.end.row, 0)
- }, this.toScreenRange = function (e) {
- var t = e.documentToScreenPosition(this.start), n = e.documentToScreenPosition(this.end);
- return new r(t.row, t.column, n.row, n.column)
- }
- }).call(r.prototype), r.fromPoints = function (e, t) {
- return new r(e.row, e.column, t.row, t.column)
- }, t.Range = r
-}), define("ace/anchor", ["require", "exports", "module", "ace/lib/oop", "ace/lib/event_emitter"], function (e, t, n) {
- var r = e("./lib/oop"), i = e("./lib/event_emitter").EventEmitter, s = t.Anchor = function (e, t, n) {
- this.document = e, typeof n == "undefined" ? this.setPosition(t.row, t.column) : this.setPosition(t, n), this.$onChange = this.onChange.bind(this), e.on("change", this.$onChange)
- };
- (function () {
- r.implement(this, i), this.getPosition = function () {
- return this.$clipPositionToDocument(this.row, this.column)
- }, this.getDocument = function () {
- return this.document
- }, this.onChange = function (e) {
- var t = e.data, n = t.range;
- if (n.start.row == n.end.row && n.start.row != this.row)return;
- if (n.start.row > this.row)return;
- if (n.start.row == this.row && n.start.column > this.column)return;
- var r = this.row, i = this.column;
- t.action === "insertText" ? n.start.row === r && n.start.column <= i ? n.start.row === n.end.row ? i += n.end.column - n.start.column : (i -= n.start.column, r += n.end.row - n.start.row) : n.start.row !== n.end.row && n.start.row < r && (r += n.end.row - n.start.row) : t.action === "insertLines" ? n.start.row <= r && (r += n.end.row - n.start.row) : t.action == "removeText" ? n.start.row == r && n.start.column < i ? n.end.column >= i ? i = n.start.column : i = Math.max(0, i - (n.end.column - n.start.column)) : n.start.row !== n.end.row && n.start.row < r ? (n.end.row == r && (i = Math.max(0, i - n.end.column) + n.start.column), r -= n.end.row - n.start.row) : n.end.row == r && (r -= n.end.row - n.start.row, i = Math.max(0, i - n.end.column) + n.start.column) : t.action == "removeLines" && n.start.row <= r && (n.end.row <= r ? r -= n.end.row - n.start.row : (r = n.start.row, i = 0)), this.setPosition(r, i, !0)
- }, this.setPosition = function (e, t, n) {
- var r;
- n ? r = {row: e, column: t} : r = this.$clipPositionToDocument(e, t);
- if (this.row == r.row && this.column == r.column)return;
- var i = {row: this.row, column: this.column};
- this.row = r.row, this.column = r.column, this._emit("change", {old: i, value: r})
- }, this.detach = function () {
- this.document.removeEventListener("change", this.$onChange)
- }, this.$clipPositionToDocument = function (e, t) {
- var n = {};
- return e >= this.document.getLength() ? (n.row = Math.max(0, this.document.getLength() - 1), n.column = this.document.getLine(n.row).length) : e < 0 ? (n.row = 0, n.column = 0) : (n.row = e, n.column = Math.min(this.document.getLine(n.row).length, Math.max(0, t))), t < 0 && (n.column = 0), n
- }
- }).call(s.prototype)
-}), define("ace/lib/lang", ["require", "exports", "module"], function (e, t, n) {
- t.stringReverse = function (e) {
- return e.split("").reverse().join("")
- }, t.stringRepeat = function (e, t) {
- var n = "";
- while (t > 0) {
- t & 1 && (n += e);
- if (t >>= 1)e += e
- }
- return n
- };
- var r = /^\s\s*/, i = /\s\s*$/;
- t.stringTrimLeft = function (e) {
- return e.replace(r, "")
- }, t.stringTrimRight = function (e) {
- return e.replace(i, "")
- }, t.copyObject = function (e) {
- var t = {};
- for (var n in e)t[n] = e[n];
- return t
- }, t.copyArray = function (e) {
- var t = [];
- for (var n = 0, r = e.length; n < r; n++)e[n] && typeof e[n] == "object" ? t[n] = this.copyObject(e[n]) : t[n] = e[n];
- return t
- }, t.deepCopy = function (e) {
- if (typeof e != "object")return e;
- var t = e.constructor();
- for (var n in e)typeof e[n] == "object" ? t[n] = this.deepCopy(e[n]) : t[n] = e[n];
- return t
- }, t.arrayToMap = function (e) {
- var t = {};
- for (var n = 0; n < e.length; n++)t[e[n]] = 1;
- return t
- }, t.createMap = function (e) {
- var t = Object.create(null);
- for (var n in e)t[n] = e[n];
- return t
- }, t.arrayRemove = function (e, t) {
- for (var n = 0; n <= e.length; n++)t === e[n] && e.splice(n, 1)
- }, t.escapeRegExp = function (e) {
- return e.replace(/([.*+?^${}()|[\]\/\\])/g, "\\$1")
- }, t.escapeHTML = function (e) {
- return e.replace(/&/g, "&").replace(/"/g, """).replace(/'/g, "'").replace(/= 0 || G.call(a, n) >= 0) && (f = n.toUpperCase(), f === "WHEN" && (c = this.tag(), G.call(x, c) >= 0) ? f = "LEADING_WHEN" : f === "FOR" ? this.seenFor = !0 : f === "UNLESS" ? f = "IF" : G.call(U, f) >= 0 ? f = "UNARY" : G.call(H, f) >= 0 && (f !== "INSTANCEOF" && this.seenFor ? (f = "FOR" + f, this.seenFor = !1) : (f = "RELATION", this.value() === "!" && (this.tokens.pop(), n = "!" + n)))), G.call(E, n) >= 0 && (t ? (f = "IDENTIFIER", n = new String(n), n.reserved = !0) : G.call(B, n) >= 0 && this.error('reserved word "' + n + '"')), t || (G.call(o, n) >= 0 && (n = u[n]), f = function () {
- switch (n) {
- case"!":
- return"UNARY";
- case"==":
- case"!=":
- return"COMPARE";
- case"&&":
- case"||":
- return"LOGIC";
- case"true":
- case"false":
- return"BOOL";
- case"break":
- case"continue":
- return"STATEMENT";
- default:
- return f
- }
- }()), this.token(f, n), e && this.token(":", ":"), r.length)) : 0
- }, e.prototype.numberToken = function () {
- var e, t, n, r, i;
- if (!(n = _.exec(this.chunk)))return 0;
- r = n[0], /^0[BOX]/.test(r) ? this.error("radix prefix '" + r + "' must be lowercase") : /E/.test(r) && !/^0x/.test(r) ? this.error("exponential notation '" + r + "' must be indicated with a lowercase 'e'") : /^0\d*[89]/.test(r) ? this.error("decimal literal '" + r + "' must not be prefixed with '0'") : /^0\d+/.test(r) && this.error("octal literal '" + r + "' must be prefixed with '0o'"), t = r.length;
- if (i = /^0o([0-7]+)/.exec(r))r = "0x" + parseInt(i[1], 8).toString(16);
- if (e = /^0b([01]+)/.exec(r))r = "0x" + parseInt(e[1], 2).toString(16);
- return this.token("NUMBER", r), t
- }, e.prototype.stringToken = function () {
- var e, t, n;
- switch (this.chunk.charAt(0)) {
- case"'":
- if (!(e = I.exec(this.chunk)))return 0;
- this.token("STRING", (n = e[0]).replace(L, "\\\n"));
- break;
- case'"':
- if (!(n = this.balancedString(this.chunk, '"')))return 0;
- 0 < n.indexOf("#{",1)?this.interpolateString(n.slice(1,-1)):this.token("STRING", this.escapeLines(n));
- break;
- default:
- return 0
- }
- return(t = /^(?:\\.|[^\\])*\\(?:0[0-7]|[1-7])/.test(n)) && this.error("octal escape sequences " + n + " are not allowed"), this.line += X(n, "\n"), n.length
- }, e.prototype.heredocToken = function () {
- var e, t, n, r;
- return(n = h.exec(this.chunk)) ? (t = n[0], r = t.charAt(0), e = this.sanitizeHeredoc(n[2], {quote: r, indent: null}), r === '"' && 0 <= e.indexOf("#{")?this.interpolateString(e,{heredoc:!0}):this.token("STRING",this.makeString(e,r,!0)),this.line+=X(t,"\n"), t.length) : 0
- }, e.prototype.commentToken = function () {
- var e, t, n;
- return(n = this.chunk.match(f)) ? (e = n[0], t = n[1], t && this.token("HERECOMMENT", this.sanitizeHeredoc(t, {herecomment: !0, indent: Array(this.indent + 1).join(" ")})), this.line += X(e, "\n"), e.length) : 0
- }, e.prototype.jsToken = function () {
- var e, t;
- return this.chunk.charAt(0) !== "`" || !(e = w.exec(this.chunk)) ? 0 : (this.token("JS", (t = e[0]).slice(1, -1)), this.line += X(t, "\n"), t.length)
- }, e.prototype.regexToken = function () {
- var e, t, n, r, i, s, o;
- return this.chunk.charAt(0) !== "/" ? 0 : (n = v.exec(this.chunk)) ? (t = this.heregexToken(n), this.line += X(n[0], "\n"), t) : (r = $(this.tokens), r && (s = r[0], G.call(r.spaced ? O : M, s) >= 0) ? 0 : (n = P.exec(this.chunk)) ? (o = n, n = o[0], i = o[1], e = o[2], i.slice(0, 2) === "/*" && this.error("regular expressions cannot begin with `*`"), i === "//" && (i = "/(?:)/"), this.token("REGEX", "" + i + e), n.length) : 0)
- }, e.prototype.heregexToken = function (e) {
- var t, n, r, i, s, o, u, a, f, l, c, h, p;
- r = e[0], t = e[1], n = e[2];
- if (0 > t.indexOf("#{"))return i=t.replace(m,"").replace(/\//g,"\\/"),i.match(/^\*/)&&this.error("regular expressions cannot begin with `*`"),this.token("REGEX","/"+(i||"(?:)")+"/" + n), r.length;
- this.token("IDENTIFIER", "RegExp"), this.tokens.push(["CALL_START", "("]), o = [], l = this.interpolateString(t, {regex: !0});
- for (a = 0, f = l.length; a < f; a++) {
- c = l[a], s = c[0], u = c[1];
- if (s === "TOKENS")o.push.apply(o, u); else {
- if (!(u = u.replace(m, "")))continue;
- u = u.replace(/\\/g, "\\\\"), o.push(["STRING", this.makeString(u, '"', !0)])
- }
- o.push(["+", "+"])
- }
- return o.pop(), ((h = o[0]) != null ? h[0] : void 0) !== "STRING" && this.tokens.push(["STRING", '""'], ["+", "+"]), (p = this.tokens).push.apply(p, o), n && this.tokens.push([",", ","], ["STRING", '"' + n + '"']), this.token(")", ")"), r.length
- }, e.prototype.lineToken = function () {
- var e, t, n, r, i;
- if (!(n = A.exec(this.chunk)))return 0;
- t = n[0], this.line += X(t, "\n"), this.seenFor = !1, i = t.length - 1 - t.lastIndexOf("\n"), r = this.unfinished();
- if (i - this.indebt === this.indent)return r ? this.suppressNewlines() : this.newlineToken(), t.length;
- if (i > this.indent) {
- if (r)return this.indebt = i - this.indent, this.suppressNewlines(), t.length;
- e = i - this.indent + this.outdebt, this.token("INDENT", e), this.indents.push(e), this.ends.push("OUTDENT"), this.outdebt = this.indebt = 0
- } else this.indebt = 0, this.outdentToken(this.indent - i, r);
- return this.indent = i, t.length
- }, e.prototype.outdentToken = function (e, t) {
- var n, r;
- while (e > 0)r = this.indents.length - 1, this.indents[r] === void 0 ? e = 0 : this.indents[r] === this.outdebt ? (e -= this.outdebt, this.outdebt = 0) : this.indents[r] < this.outdebt ? (this.outdebt -= this.indents[r], e -= this.indents[r]) : (n = this.indents.pop() - this.outdebt, e -= n, this.outdebt = 0, this.pair("OUTDENT"), this.token("OUTDENT", n));
- n && (this.outdebt -= e);
- while (this.value() === ";")this.tokens.pop();
- return this.tag() !== "TERMINATOR" && !t && this.token("TERMINATOR", "\n"), this
- }, e.prototype.whitespaceToken = function () {
- var e, t, n;
- return!(e = z.exec(this.chunk)) && !(t = this.chunk.charAt(0) === "\n") ? 0 : (n = $(this.tokens), n && (n[e ? "spaced" : "newLine"] = !0), e ? e[0].length : 0)
- }, e.prototype.newlineToken = function () {
- while (this.value() === ";")this.tokens.pop();
- return this.tag() !== "TERMINATOR" && this.token("TERMINATOR", "\n"), this
- }, e.prototype.suppressNewlines = function () {
- return this.value() === "\\" && this.tokens.pop(), this
- }, e.prototype.literalToken = function () {
- var e, t, n, r, o, u, a, f;
- (e = D.exec(this.chunk)) ? (r = e[0], s.test(r) && this.tagParameters()) : r = this.chunk.charAt(0), n = r, t = $(this.tokens);
- if (r === "=" && t) {
- !t[1].reserved && (o = t[1], G.call(E, o) >= 0) && this.error('reserved word "' + this.value() + "\" can't be assigned");
- if ((u = t[1]) === "||" || u === "&&")return t[0] = "COMPOUND_ASSIGN", t[1] += "=", r.length
- }
- if (r === ";")this.seenFor = !1, n = "TERMINATOR"; else if (G.call(k, r) >= 0)n = "MATH"; else if (G.call(l, r) >= 0)n = "COMPARE"; else if (G.call(c, r) >= 0)n = "COMPOUND_ASSIGN"; else if (G.call(U, r) >= 0)n = "UNARY"; else if (G.call(F, r) >= 0)n = "SHIFT"; else if (G.call(N, r) >= 0 || r === "?" && (t != null ? t.spaced : void 0))n = "LOGIC"; else if (t && !t.spaced)if (r === "(" && (a = t[0], G.call(i, a) >= 0))t[0] === "?" && (t[0] = "FUNC_EXIST"), n = "CALL_START"; else if (r === "[" && (f = t[0], G.call(y, f) >= 0)) {
- n = "INDEX_START";
- switch (t[0]) {
- case"?":
- t[0] = "INDEX_SOAK"
- }
- }
- switch (r) {
- case"(":
- case"{":
- case"[":
- this.ends.push(b[r]);
- break;
- case")":
- case"}":
- case"]":
- this.pair(r)
- }
- return this.token(n, r), r.length
- }, e.prototype.sanitizeHeredoc = function (e, t) {
- var n, r, i, s, o;
- i = t.indent, r = t.herecomment;
- if (r) {
- p.test(e) && this.error('block comment cannot contain "*/", starting');
- if (e.indexOf("\n") <= 0)return e
- } else while (s = d.exec(e)) {
- n = s[1];
- if (i === null || 0 < (o = n.length) && o < i.length)i = n
- }
- return i && (e = e.replace(RegExp("\\n" + i, "g"), "\n")), r || (e = e.replace(/^\n/, "")), e
- }, e.prototype.tagParameters = function () {
- var e, t, n, r;
- if (this.tag() !== ")")return this;
- t = [], r = this.tokens, e = r.length, r[--e][0] = "PARAM_END";
- while (n = r[--e])switch (n[0]) {
- case")":
- t.push(n);
- break;
- case"(":
- case"CALL_START":
- if (!t.length)return n[0] === "(" ? (n[0] = "PARAM_START", this) : this;
- t.pop()
- }
- return this
- }, e.prototype.closeIndentation = function () {
- return this.outdentToken(this.indent)
- }, e.prototype.balancedString = function (e, t) {
- var n, r, i, s, o, u, a, f;
- n = 0, u = [t];
- for (r = a = 1, f = e.length; 1 <= f ? a < f : a > f; r = 1 <= f ? ++a : --a) {
- if (n) {
- --n;
- continue
- }
- switch (i = e.charAt(r)) {
- case"\\":
- ++n;
- continue;
- case t:
- u.pop();
- if (!u.length)return e.slice(0, +r + 1 || 9e9);
- t = u[u.length - 1];
- continue
- }
- t !== "}" || i !== '"' && i !== "'" ? t === "}" && i === "/" && (s = v.exec(e.slice(r)) || P.exec(e.slice(r))) ? n += s[0].length - 1 : t === "}" && i === "{" ? u.push(t = "}") : t === '"' && o === "#" && i === "{" && u.push(t = "}") : u.push(t = i), o = i
- }
- return this.error("missing " + u.pop() + ", starting")
- }, e.prototype.interpolateString = function (t, n) {
- var r, i, s, o, u, a, f, l, c, h, p, d, v, m, g, y, b, w;
- n == null && (n = {}), i = n.heredoc, h = n.regex, d = [], c = 0, s = -1;
- while (f = t.charAt(s += 1)) {
- if (f === "\\") {
- s += 1;
- continue
- }
- if (f !== "#" || t.charAt(s + 1) !== "{" || !(r = this.balancedString(t.slice(s + 1), "}")))continue;
- c < s && d.push(["NEOSTRING", t.slice(c, s)]), o = r.slice(1, -1);
- if (o.length) {
- l = (new e).tokenize(o, {line: this.line, rewrite: !1}), l.pop(), ((y = l[0]) != null ? y[0] : void 0) === "TERMINATOR" && l.shift();
- if (a = l.length)a > 1 && (l.unshift(["(", "(", this.line]), l.push([")", ")", this.line])), d.push(["TOKENS", l])
- }
- s += r.length, c = s + 1
- }
- s > c && c < t.length && d.push(["NEOSTRING", t.slice(c)]);
- if (h)return d;
- if (!d.length)return this.token("STRING", '""');
- d[0][0] !== "NEOSTRING" && d.unshift(["", ""]), (u = d.length > 1) && this.token("(", "(");
- for (s = m = 0, g = d.length; m < g; s = ++m)b = d[s], p = b[0], v = b[1], s && this.token("+", "+"), p === "TOKENS" ? (w = this.tokens).push.apply(w, v) : this.token("STRING", this.makeString(v, '"', i));
- return u && this.token(")", ")"), d
- }, e.prototype.pair = function (e) {
- var t, n;
- return e !== (n = $(this.ends)) ? ("OUTDENT" !== n && this.error("unmatched " + e), this.indent -= t = $(this.indents), this.outdentToken(t, !0), this.pair(e)) : this.ends.pop()
- }, e.prototype.token = function (e, t) {
- return this.tokens.push([e, t, this.line])
- }, e.prototype.tag = function (e, t) {
- var n;
- return(n = $(this.tokens, e)) && (t ? n[0] = t : n[0])
- }, e.prototype.value = function (e, t) {
- var n;
- return(n = $(this.tokens, e)) && (t ? n[1] = t : n[1])
- }, e.prototype.unfinished = function () {
- var e;
- return T.test(this.chunk) || (e = this.tag()) === "\\" || e === "." || e === "?." || e === "UNARY" || e === "MATH" || e === "+" || e === "-" || e === "SHIFT" || e === "RELATION" || e === "COMPARE" || e === "LOGIC" || e === "THROW" || e === "EXTENDS"
- }, e.prototype.escapeLines = function (e, t) {
- return e.replace(L, t ? "\\n" : "")
- }, e.prototype.makeString = function (e, t, n) {
- return e ? (e = e.replace(/\\([\s\S])/g, function (e, n) {
- return n === "\n" || n === t ? n : e
- }), e = e.replace(RegExp("" + t, "g"), "\\$&"), t + this.escapeLines(e, n) + t) : t + t
- }, e.prototype.error = function (e) {
- throw SyntaxError("" + e + " on line " + (this.line + 1))
- }, e
- }(), S = ["true", "false", "null", "this", "new", "delete", "typeof", "in", "instanceof", "return", "throw", "break", "continue", "debugger", "if", "else", "switch", "for", "while", "do", "try", "catch", "finally", "class", "extends", "super"], a = ["undefined", "then", "unless", "until", "loop", "of", "by", "when"], u = {and: "&&", or: "||", is: "==", isnt: "!=", not: "!", yes: "true", no: "false", on: "true", off: "false"}, o = function () {
- var e;
- e = [];
- for (V in u)e.push(V);
- return e
- }(), a = a.concat(o), B = ["case", "default", "function", "var", "void", "with", "const", "let", "enum", "export", "import", "native", "__hasProp", "__extends", "__slice", "__bind", "__indexOf", "implements", "interface", "package", "private", "protected", "public", "static", "yield"], q = ["arguments", "eval"], E = S.concat(B).concat(q), t.RESERVED = B.concat(S).concat(a).concat(q), t.STRICT_PROSCRIBED = q, g = /^([$A-Za-z_\x7f-\uffff][$\w\x7f-\uffff]*)([^\n\S]*:(?!:))?/, _ = /^0b[01]+|^0o[0-7]+|^0x[\da-f]+|^\d*\.?\d+(?:e[+-]?\d+)?/i, h = /^("""|''')([\s\S]*?)(?:\n[^\n\S]*)?\1/, D = /^(?:[-=]>|[-+*\/%<>&|^!?=]=|>>>=?|([-+:])\1|([&|<>])\2=?|\?\.|\.{2,3})/, z = /^[^\n\S]+/, f = /^###([^#][\s\S]*?)(?:###[^\n\S]*|(?:###)?$)|^(?:\s*#(?!##[^#]).*)+/, s = /^[-=]>/, A = /^(?:\n[^\n\S]*)+/, I = /^'[^\\']*(?:\\.[^\\']*)*'/, w = /^`[^\\`]*(?:\\.[^\\`]*)*`/, P = /^(\/(?![\s=])[^[\/\n\\]*(?:(?:\\[\s\S]|\[[^\]\n\\]*(?:\\[\s\S][^\]\n\\]*)*])[^[\/\n\\]*)*\/)([imgy]{0,4})(?!\w)/, v = /^\/{3}([\s\S]+?)\/{3}([imgy]{0,4})(?!\w)/, m = /\s+(?:#.*)?/g, L = /\n/g, d = /\n+([^\n\S]*)/g, p = /\*\//, T = /^\s*(?:,|\??\.(?![.\d])|::)/, R = /\s+$/, c = ["-=", "+=", "/=", "*=", "%=", "||=", "&&=", "?=", "<<=", ">>=", ">>>=", "&=", "^=", "|="], U = ["!", "~", "NEW", "TYPEOF", "DELETE", "DO"], N = ["&&", "||", "&", "|", "^"], F = ["<<", ">>", ">>>"], l = ["==", "!=", "<", ">", "<=", ">="], k = ["*", "/", "%"], H = ["IN", "OF", "INSTANCEOF"], r = ["TRUE", "FALSE"], O = ["NUMBER", "REGEX", "BOOL", "NULL", "UNDEFINED", "++", "--", "]"], M = O.concat(")", "}", "THIS", "IDENTIFIER", "STRING"), i = ["IDENTIFIER", "STRING", "REGEX", ")", "]", "}", "?", "::", "@", "THIS", "SUPER"], y = i.concat("NUMBER", "BOOL", "NULL", "UNDEFINED"), x = ["INDENT", "OUTDENT", "TERMINATOR"]
-}), define("ace/mode/coffee/rewriter", ["require", "exports", "module"], function (e, t, n) {
- var r, i, s, o, u, a, f, l, c, h, p, d, v, m, g, y, b, w, E = [].indexOf || function (e) {
- for (var t = 0, n = this.length; t < n; t++)if (t in this && this[t] === e)return t;
- return-1
- }, S = [].slice;
- t.Rewriter = function () {
- function e() {
- }
-
- return e.prototype.rewrite = function (e) {
- return this.tokens = e, this.removeLeadingNewlines(), this.removeMidExpressionNewlines(), this.closeOpenCalls(), this.closeOpenIndexes(), this.addImplicitIndentation(), this.tagPostfixConditionals(), this.addImplicitBraces(), this.addImplicitParentheses(), this.tokens
- }, e.prototype.scanTokens = function (e) {
- var t, n, r;
- r = this.tokens, t = 0;
- while (n = r[t])t += e.call(this, n, t, r);
- return!0
- }, e.prototype.detectEnd = function (e, t, n) {
- var r, i, u, a, f;
- u = this.tokens, r = 0;
- while (i = u[e]) {
- if (r === 0 && t.call(this, i, e))return n.call(this, i, e);
- if (!i || r < 0)return n.call(this, i, e - 1);
- if (a = i[0], E.call(o, a) >= 0)r += 1; else if (f = i[0], E.call(s, f) >= 0)r -= 1;
- e += 1
- }
- return e - 1
- }, e.prototype.removeLeadingNewlines = function () {
- var e, t, n, r, i;
- i = this.tokens;
- for (e = n = 0, r = i.length; n < r; e = ++n) {
- t = i[e][0];
- if (t !== "TERMINATOR")break
- }
- if (e)return this.tokens.splice(0, e)
- }, e.prototype.removeMidExpressionNewlines = function () {
- return this.scanTokens(function (e, t, n) {
- var r;
- return e[0] === "TERMINATOR" && (r = this.tag(t + 1), E.call(i, r) >= 0) ? (n.splice(t, 1), 0) : 1
- })
- }, e.prototype.closeOpenCalls = function () {
- var e, t;
- return t = function (e, t) {
- var n;
- return(n = e[0]) === ")" || n === "CALL_END" || e[0] === "OUTDENT" && this.tag(t - 1) === ")"
- }, e = function (e, t) {
- return this.tokens[e[0] === "OUTDENT" ? t - 1 : t][0] = "CALL_END"
- }, this.scanTokens(function (n, r) {
- return n[0] === "CALL_START" && this.detectEnd(r + 1, t, e), 1
- })
- }, e.prototype.closeOpenIndexes = function () {
- var e, t;
- return t = function (e, t) {
- var n;
- return(n = e[0]) === "]" || n === "INDEX_END"
- }, e = function (e, t) {
- return e[0] = "INDEX_END"
- }, this.scanTokens(function (n, r) {
- return n[0] === "INDEX_START" && this.detectEnd(r + 1, t, e), 1
- })
- }, e.prototype.addImplicitBraces = function () {
- var e, t, n, r, i, u, a, l;
- return r = [], i = null, l = null, n = !0, u = 0, a = 0, t = function (e, t) {
- var r, i, s, o, u, c;
- return u = this.tokens.slice(t + 1, +(t + 3) + 1 || 9e9), r = u[0], o = u[1], s = u[2], "HERECOMMENT" === (r != null ? r[0] : void 0) ? !1 : (i = e[0], E.call(p, i) >= 0 && (n = !1), (i === "TERMINATOR" || i === "OUTDENT" || E.call(f, i) >= 0 && n && t - a !== 1) && (!l && this.tag(t - 1) !== "," || (o != null ? o[0] : void 0) !== ":" && ((r != null ? r[0] : void 0) !== "@" || (s != null ? s[0] : void 0) !== ":")) || i === "," && r && (c = r[0]) !== "IDENTIFIER" && c !== "NUMBER" && c !== "STRING" && c !== "@" && c !== "TERMINATOR" && c !== "OUTDENT")
- }, e = function (e, t) {
- var n;
- return n = this.generate("}", "}", e[2]), this.tokens.splice(t, 0, n)
- }, this.scanTokens(function (u, f, c) {
- var h, d, v, m, g, y, b, w;
- if (b = m = u[0], E.call(o, b) >= 0)return r.push([m === "INDENT" && this.tag(f - 1) === "{" ? "{" : m, f]), 1;
- if (E.call(s, m) >= 0)return i = r.pop(), 1;
- if (m !== ":" || (h = this.tag(f - 2)) !== ":" && ((w = r[r.length - 1]) != null ? w[0] : void 0) === "{")return 1;
- n = !0, a = f + 1, r.push(["{"]), d = h === "@" ? f - 2 : f - 1;
- while (this.tag(d - 2) === "HERECOMMENT")d -= 2;
- return v = this.tag(d - 1), l = !v || E.call(p, v) >= 0, y = new String("{"), y.generated = !0, g = this.generate("{", y, u[2]), c.splice(d, 0, g), this.detectEnd(f + 2, t, e), 2
- })
- }, e.prototype.addImplicitParentheses = function () {
- var e, t, n, r, i;
- return n = i = r = !1, t = function (e, t) {
- var n, s, o, a;
- s = e[0];
- if (!i && e.fromThen)return!0;
- if (s === "IF" || s === "ELSE" || s === "CATCH" || s === "->" || s === "=>" || s === "CLASS")i = !0;
- if (s === "IF" || s === "ELSE" || s === "SWITCH" || s === "TRY" || s === "=")r = !0;
- return s !== "." && s !== "?." && s !== "::" || this.tag(t - 1) !== "OUTDENT" ? !e.generated && this.tag(t - 1) !== "," && (E.call(f, s) >= 0 || s === "INDENT" && !r) && (s !== "INDENT" || (o = this.tag(t - 2)) !== "CLASS" && o !== "EXTENDS" && (a = this.tag(t - 1), E.call(u, a) < 0) && (!(n = this.tokens[t + 1]) || !n.generated || n[0] !== "{")) : !0
- }, e = function (e, t) {
- return this.tokens.splice(t, 0, this.generate("CALL_END", ")", e[2]))
- }, this.scanTokens(function (s, o, u) {
- var f, h, d, v, m, g, y, b;
- m = s[0];
- if (m === "CLASS" || m === "IF" || m === "FOR" || m === "WHILE")n = !0;
- return g = u.slice(o - 1, +(o + 1) + 1 || 9e9), v = g[0], h = g[1], d = g[2], f = !n && m === "INDENT" && d && d.generated && d[0] === "{" && v && (y = v[0], E.call(l, y) >= 0), i = !1, r = !1, E.call(p, m) >= 0 && (n = !1), v && !v.spaced && m === "?" && (s.call = !0), s.fromThen ? 1 : f || (v != null ? v.spaced : void 0) && (v.call || (b = v[0], E.call(l, b) >= 0)) && (E.call(a, m) >= 0 || !s.spaced && !s.newLine && E.call(c, m) >= 0) ? (u.splice(o, 0, this.generate("CALL_START", "(", s[2])), this.detectEnd(o + 1, t, e), v[0] === "?" && (v[0] = "FUNC_EXIST"), 2) : 1
- })
- }, e.prototype.addImplicitIndentation = function () {
- var e, t, n, r, i;
- return i = n = r = null, t = function (e, t) {
- var n;
- return e[1] !== ";" && (n = e[0], E.call(d, n) >= 0) && (e[0] !== "ELSE" || i === "IF" || i === "THEN")
- }, e = function (e, t) {
- return this.tokens.splice(this.tag(t - 1) === "," ? t - 1 : t, 0, r)
- }, this.scanTokens(function (s, o, u) {
- var a, f, l;
- return a = s[0], a === "TERMINATOR" && this.tag(o + 1) === "THEN" ? (u.splice(o, 1), 0) : a === "ELSE" && this.tag(o - 1) !== "OUTDENT" ? (u.splice.apply(u, [o, 0].concat(S.call(this.indentation(s)))), 2) : a !== "CATCH" || (f = this.tag(o + 2)) !== "OUTDENT" && f !== "TERMINATOR" && f !== "FINALLY" ? E.call(v, a) >= 0 && this.tag(o + 1) !== "INDENT" && (a !== "ELSE" || this.tag(o + 1) !== "IF") ? (i = a, l = this.indentation(s, !0), n = l[0], r = l[1], i === "THEN" && (n.fromThen = !0), u.splice(o + 1, 0, n), this.detectEnd(o + 2, t, e), a === "THEN" && u.splice(o, 1), 1) : 1 : (u.splice.apply(u, [o + 2, 0].concat(S.call(this.indentation(s)))), 4)
- })
- }, e.prototype.tagPostfixConditionals = function () {
- var e, t, n;
- return n = null, t = function (e, t) {
- var n;
- return(n = e[0]) === "TERMINATOR" || n === "INDENT"
- }, e = function (e, t) {
- if (e[0] !== "INDENT" || e.generated && !e.fromThen)return n[0] = "POST_" + n[0]
- }, this.scanTokens(function (r, i) {
- return r[0] !== "IF" ? 1 : (n = r, this.detectEnd(i + 1, t, e), 1)
- })
- }, e.prototype.indentation = function (e, t) {
- var n, r;
- return t == null && (t = !1), n = ["INDENT", 2, e[2]], r = ["OUTDENT", 2, e[2]], t && (n.generated = r.generated = !0), [n, r]
- }, e.prototype.generate = function (e, t, n) {
- var r;
- return r = [e, t, n], r.generated = !0, r
- }, e.prototype.tag = function (e) {
- var t;
- return(t = this.tokens[e]) != null ? t[0] : void 0
- }, e
- }(), r = [
- ["(", ")"],
- ["[", "]"],
- ["{", "}"],
- ["INDENT", "OUTDENT"],
- ["CALL_START", "CALL_END"],
- ["PARAM_START", "PARAM_END"],
- ["INDEX_START", "INDEX_END"]
- ], t.INVERSES = h = {}, o = [], s = [];
- for (y = 0, b = r.length; y < b; y++)w = r[y], m = w[0], g = w[1], o.push(h[g] = m), s.push(h[m] = g);
- i = ["CATCH", "WHEN", "ELSE", "FINALLY"].concat(s), l = ["IDENTIFIER", "SUPER", ")", "CALL_END", "]", "INDEX_END", "@", "THIS"], a = ["IDENTIFIER", "NUMBER", "STRING", "JS", "REGEX", "NEW", "PARAM_START", "CLASS", "IF", "TRY", "SWITCH", "THIS", "BOOL", "NULL", "UNDEFINED", "UNARY", "SUPER", "@", "->", "=>", "[", "(", "{", "--", "++"], c = ["+", "-"], u = ["->", "=>", "{", "[", ","], f = ["POST_IF", "FOR", "WHILE", "UNTIL", "WHEN", "BY", "LOOP", "TERMINATOR"], v = ["ELSE", "->", "=>", "TRY", "FINALLY", "THEN"], d = ["TERMINATOR", "CATCH", "FINALLY", "ELSE", "OUTDENT", "LEADING_WHEN"], p = ["TERMINATOR", "INDENT", "OUTDENT"]
-}), define("ace/mode/coffee/helpers", ["require", "exports", "module"], function (e, t, n) {
- var r, i, s;
- t.starts = function (e, t, n) {
- return t === e.substr(n, t.length)
- }, t.ends = function (e, t, n) {
- var r;
- return r = t.length, t === e.substr(e.length - r - (n || 0), r)
- }, t.compact = function (e) {
- var t, n, r, i;
- i = [];
- for (n = 0, r = e.length; n < r; n++)t = e[n], t && i.push(t);
- return i
- }, t.count = function (e, t) {
- var n, r;
- n = r = 0;
- if (!t.length)return 1 / 0;
- while (r = 1 + e.indexOf(t, r))n++;
- return n
- }, t.merge = function (e, t) {
- return r(r({}, e), t)
- }, r = t.extend = function (e, t) {
- var n, r;
- for (n in t)r = t[n], e[n] = r;
- return e
- }, t.flatten = i = function (e) {
- var t, n, r, s;
- n = [];
- for (r = 0, s = e.length; r < s; r++)t = e[r], t instanceof Array ? n = n.concat(i(t)) : n.push(t);
- return n
- }, t.del = function (e, t) {
- var n;
- return n = e[t], delete e[t], n
- }, t.last = function (e, t) {
- return e[e.length - (t || 0) - 1]
- }, t.some = (s = Array.prototype.some) != null ? s : function (e) {
- var t, n, r;
- for (n = 0, r = this.length; n < r; n++) {
- t = this[n];
- if (e(t))return!0
- }
- return!1
- }
-}), define("ace/mode/coffee/parser", ["require", "exports", "module"], function (e, t, n) {
- var r = {trace: function () {
- }, yy: {}, symbols_: {error: 2, Root: 3, Body: 4, Block: 5, TERMINATOR: 6, Line: 7, Expression: 8, Statement: 9, Return: 10, Comment: 11, STATEMENT: 12, Value: 13, Invocation: 14, Code: 15, Operation: 16, Assign: 17, If: 18, Try: 19, While: 20, For: 21, Switch: 22, Class: 23, Throw: 24, INDENT: 25, OUTDENT: 26, Identifier: 27, IDENTIFIER: 28, AlphaNumeric: 29, NUMBER: 30, STRING: 31, Literal: 32, JS: 33, REGEX: 34, DEBUGGER: 35, UNDEFINED: 36, NULL: 37, BOOL: 38, Assignable: 39, "=": 40, AssignObj: 41, ObjAssignable: 42, ":": 43, ThisProperty: 44, RETURN: 45, HERECOMMENT: 46, PARAM_START: 47, ParamList: 48, PARAM_END: 49, FuncGlyph: 50, "->": 51, "=>": 52, OptComma: 53, ",": 54, Param: 55, ParamVar: 56, "...": 57, Array: 58, Object: 59, Splat: 60, SimpleAssignable: 61, Accessor: 62, Parenthetical: 63, Range: 64, This: 65, ".": 66, "?.": 67, "::": 68, Index: 69, INDEX_START: 70, IndexValue: 71, INDEX_END: 72, INDEX_SOAK: 73, Slice: 74, "{": 75, AssignList: 76, "}": 77, CLASS: 78, EXTENDS: 79, OptFuncExist: 80, Arguments: 81, SUPER: 82, FUNC_EXIST: 83, CALL_START: 84, CALL_END: 85, ArgList: 86, THIS: 87, "@": 88, "[": 89, "]": 90, RangeDots: 91, "..": 92, Arg: 93, SimpleArgs: 94, TRY: 95, Catch: 96, FINALLY: 97, CATCH: 98, THROW: 99, "(": 100, ")": 101, WhileSource: 102, WHILE: 103, WHEN: 104, UNTIL: 105, Loop: 106, LOOP: 107, ForBody: 108, FOR: 109, ForStart: 110, ForSource: 111, ForVariables: 112, OWN: 113, ForValue: 114, FORIN: 115, FOROF: 116, BY: 117, SWITCH: 118, Whens: 119, ELSE: 120, When: 121, LEADING_WHEN: 122, IfBlock: 123, IF: 124, POST_IF: 125, UNARY: 126, "-": 127, "+": 128, "--": 129, "++": 130, "?": 131, MATH: 132, SHIFT: 133, COMPARE: 134, LOGIC: 135, RELATION: 136, COMPOUND_ASSIGN: 137, $accept: 0, $end: 1}, terminals_: {2: "error", 6: "TERMINATOR", 12: "STATEMENT", 25: "INDENT", 26: "OUTDENT", 28: "IDENTIFIER", 30: "NUMBER", 31: "STRING", 33: "JS", 34: "REGEX", 35: "DEBUGGER", 36: "UNDEFINED", 37: "NULL", 38: "BOOL", 40: "=", 43: ":", 45: "RETURN", 46: "HERECOMMENT", 47: "PARAM_START", 49: "PARAM_END", 51: "->", 52: "=>", 54: ",", 57: "...", 66: ".", 67: "?.", 68: "::", 70: "INDEX_START", 72: "INDEX_END", 73: "INDEX_SOAK", 75: "{", 77: "}", 78: "CLASS", 79: "EXTENDS", 82: "SUPER", 83: "FUNC_EXIST", 84: "CALL_START", 85: "CALL_END", 87: "THIS", 88: "@", 89: "[", 90: "]", 92: "..", 95: "TRY", 97: "FINALLY", 98: "CATCH", 99: "THROW", 100: "(", 101: ")", 103: "WHILE", 104: "WHEN", 105: "UNTIL", 107: "LOOP", 109: "FOR", 113: "OWN", 115: "FORIN", 116: "FOROF", 117: "BY", 118: "SWITCH", 120: "ELSE", 122: "LEADING_WHEN", 124: "IF", 125: "POST_IF", 126: "UNARY", 127: "-", 128: "+", 129: "--", 130: "++", 131: "?", 132: "MATH", 133: "SHIFT", 134: "COMPARE", 135: "LOGIC", 136: "RELATION", 137: "COMPOUND_ASSIGN"}, productions_: [0, [3, 0], [3, 1], [3, 2], [4, 1], [4, 3], [4, 2], [7, 1], [7, 1], [9, 1], [9, 1], [9, 1], [8, 1], [8, 1], [8, 1], [8, 1], [8, 1], [8, 1], [8, 1], [8, 1], [8, 1], [8, 1], [8, 1], [8, 1], [5, 2], [5, 3], [27, 1], [29, 1], [29, 1], [32, 1], [32, 1], [32, 1], [32, 1], [32, 1], [32, 1], [32, 1], [17, 3], [17, 4], [17, 5], [41, 1], [41, 3], [41, 5], [41, 1], [42, 1], [42, 1], [42, 1], [10, 2], [10, 1], [11, 1], [15, 5], [15, 2], [50, 1], [50, 1], [53, 0], [53, 1], [48, 0], [48, 1], [48, 3], [48, 4], [48, 6], [55, 1], [55, 2], [55, 3], [56, 1], [56, 1], [56, 1], [56, 1], [60, 2], [61, 1], [61, 2], [61, 2], [61, 1], [39, 1], [39, 1], [39, 1], [13, 1], [13, 1], [13, 1], [13, 1], [13, 1], [62, 2], [62, 2], [62, 2], [62, 1], [62, 1], [69, 3], [69, 2], [71, 1], [71, 1], [59, 4], [76, 0], [76, 1], [76, 3], [76, 4], [76, 6], [23, 1], [23, 2], [23, 3], [23, 4], [23, 2], [23, 3], [23, 4], [23, 5], [14, 3], [14, 3], [14, 1], [14, 2], [80, 0], [80, 1], [81, 2], [81, 4], [65, 1], [65, 1], [44, 2], [58, 2], [58, 4], [91, 1], [91, 1], [64, 5], [74, 3], [74, 2], [74, 2], [74, 1], [86, 1], [86, 3], [86, 4], [86, 4], [86, 6], [93, 1], [93, 1], [94, 1], [94, 3], [19, 2], [19, 3], [19, 4], [19, 5], [96, 3], [24, 2], [63, 3], [63, 5], [102, 2], [102, 4], [102, 2], [102, 4], [20, 2], [20, 2], [20, 2], [20, 1], [106, 2], [106, 2], [21, 2], [21, 2], [21, 2], [108, 2], [108, 2], [110, 2], [110, 3], [114, 1], [114, 1], [114, 1], [114, 1], [112, 1], [112, 3], [111, 2], [111, 2], [111, 4], [111, 4], [111, 4], [111, 6], [111, 6], [22, 5], [22, 7], [22, 4], [22, 6], [119, 1], [119, 2], [121, 3], [121, 4], [123, 3], [123, 5], [18, 1], [18, 3], [18, 3], [18, 3], [16, 2], [16, 2], [16, 2], [16, 2], [16, 2], [16, 2], [16, 2], [16, 2], [16, 3], [16, 3], [16, 3], [16, 3], [16, 3], [16, 3], [16, 3], [16, 3], [16, 5], [16, 3]], performAction: function (t, n, r, i, s, o, u) {
- var a = o.length - 1;
- switch (s) {
- case 1:
- return this.$ = new i.Block;
- case 2:
- return this.$ = o[a];
- case 3:
- return this.$ = o[a - 1];
- case 4:
- this.$ = i.Block.wrap([o[a]]);
- break;
- case 5:
- this.$ = o[a - 2].push(o[a]);
- break;
- case 6:
- this.$ = o[a - 1];
- break;
- case 7:
- this.$ = o[a];
- break;
- case 8:
- this.$ = o[a];
- break;
- case 9:
- this.$ = o[a];
- break;
- case 10:
- this.$ = o[a];
- break;
- case 11:
- this.$ = new i.Literal(o[a]);
- break;
- case 12:
- this.$ = o[a];
- break;
- case 13:
- this.$ = o[a];
- break;
- case 14:
- this.$ = o[a];
- break;
- case 15:
- this.$ = o[a];
- break;
- case 16:
- this.$ = o[a];
- break;
- case 17:
- this.$ = o[a];
- break;
- case 18:
- this.$ = o[a];
- break;
- case 19:
- this.$ = o[a];
- break;
- case 20:
- this.$ = o[a];
- break;
- case 21:
- this.$ = o[a];
- break;
- case 22:
- this.$ = o[a];
- break;
- case 23:
- this.$ = o[a];
- break;
- case 24:
- this.$ = new i.Block;
- break;
- case 25:
- this.$ = o[a - 1];
- break;
- case 26:
- this.$ = new i.Literal(o[a]);
- break;
- case 27:
- this.$ = new i.Literal(o[a]);
- break;
- case 28:
- this.$ = new i.Literal(o[a]);
- break;
- case 29:
- this.$ = o[a];
- break;
- case 30:
- this.$ = new i.Literal(o[a]);
- break;
- case 31:
- this.$ = new i.Literal(o[a]);
- break;
- case 32:
- this.$ = new i.Literal(o[a]);
- break;
- case 33:
- this.$ = new i.Undefined;
- break;
- case 34:
- this.$ = new i.Null;
- break;
- case 35:
- this.$ = new i.Bool(o[a]);
- break;
- case 36:
- this.$ = new i.Assign(o[a - 2], o[a]);
- break;
- case 37:
- this.$ = new i.Assign(o[a - 3], o[a]);
- break;
- case 38:
- this.$ = new i.Assign(o[a - 4], o[a - 1]);
- break;
- case 39:
- this.$ = new i.Value(o[a]);
- break;
- case 40:
- this.$ = new i.Assign(new i.Value(o[a - 2]), o[a], "object");
- break;
- case 41:
- this.$ = new i.Assign(new i.Value(o[a - 4]), o[a - 1], "object");
- break;
- case 42:
- this.$ = o[a];
- break;
- case 43:
- this.$ = o[a];
- break;
- case 44:
- this.$ = o[a];
- break;
- case 45:
- this.$ = o[a];
- break;
- case 46:
- this.$ = new i.Return(o[a]);
- break;
- case 47:
- this.$ = new i.Return;
- break;
- case 48:
- this.$ = new i.Comment(o[a]);
- break;
- case 49:
- this.$ = new i.Code(o[a - 3], o[a], o[a - 1]);
- break;
- case 50:
- this.$ = new i.Code([], o[a], o[a - 1]);
- break;
- case 51:
- this.$ = "func";
- break;
- case 52:
- this.$ = "boundfunc";
- break;
- case 53:
- this.$ = o[a];
- break;
- case 54:
- this.$ = o[a];
- break;
- case 55:
- this.$ = [];
- break;
- case 56:
- this.$ = [o[a]];
- break;
- case 57:
- this.$ = o[a - 2].concat(o[a]);
- break;
- case 58:
- this.$ = o[a - 3].concat(o[a]);
- break;
- case 59:
- this.$ = o[a - 5].concat(o[a - 2]);
- break;
- case 60:
- this.$ = new i.Param(o[a]);
- break;
- case 61:
- this.$ = new i.Param(o[a - 1], null, !0);
- break;
- case 62:
- this.$ = new i.Param(o[a - 2], o[a]);
- break;
- case 63:
- this.$ = o[a];
- break;
- case 64:
- this.$ = o[a];
- break;
- case 65:
- this.$ = o[a];
- break;
- case 66:
- this.$ = o[a];
- break;
- case 67:
- this.$ = new i.Splat(o[a - 1]);
- break;
- case 68:
- this.$ = new i.Value(o[a]);
- break;
- case 69:
- this.$ = o[a - 1].add(o[a]);
- break;
- case 70:
- this.$ = new i.Value(o[a - 1], [].concat(o[a]));
- break;
- case 71:
- this.$ = o[a];
- break;
- case 72:
- this.$ = o[a];
- break;
- case 73:
- this.$ = new i.Value(o[a]);
- break;
- case 74:
- this.$ = new i.Value(o[a]);
- break;
- case 75:
- this.$ = o[a];
- break;
- case 76:
- this.$ = new i.Value(o[a]);
- break;
- case 77:
- this.$ = new i.Value(o[a]);
- break;
- case 78:
- this.$ = new i.Value(o[a]);
- break;
- case 79:
- this.$ = o[a];
- break;
- case 80:
- this.$ = new i.Access(o[a]);
- break;
- case 81:
- this.$ = new i.Access(o[a], "soak");
- break;
- case 82:
- this.$ = [new i.Access(new i.Literal("prototype")), new i.Access(o[a])];
- break;
- case 83:
- this.$ = new i.Access(new i.Literal("prototype"));
- break;
- case 84:
- this.$ = o[a];
- break;
- case 85:
- this.$ = o[a - 1];
- break;
- case 86:
- this.$ = i.extend(o[a], {soak: !0});
- break;
- case 87:
- this.$ = new i.Index(o[a]);
- break;
- case 88:
- this.$ = new i.Slice(o[a]);
- break;
- case 89:
- this.$ = new i.Obj(o[a - 2], o[a - 3].generated);
- break;
- case 90:
- this.$ = [];
- break;
- case 91:
- this.$ = [o[a]];
- break;
- case 92:
- this.$ = o[a - 2].concat(o[a]);
- break;
- case 93:
- this.$ = o[a - 3].concat(o[a]);
- break;
- case 94:
- this.$ = o[a - 5].concat(o[a - 2]);
- break;
- case 95:
- this.$ = new i.Class;
- break;
- case 96:
- this.$ = new i.Class(null, null, o[a]);
- break;
- case 97:
- this.$ = new i.Class(null, o[a]);
- break;
- case 98:
- this.$ = new i.Class(null, o[a - 1], o[a]);
- break;
- case 99:
- this.$ = new i.Class(o[a]);
- break;
- case 100:
- this.$ = new i.Class(o[a - 1], null, o[a]);
- break;
- case 101:
- this.$ = new i.Class(o[a - 2], o[a]);
- break;
- case 102:
- this.$ = new i.Class(o[a - 3], o[a - 1], o[a]);
- break;
- case 103:
- this.$ = new i.Call(o[a - 2], o[a], o[a - 1]);
- break;
- case 104:
- this.$ = new i.Call(o[a - 2], o[a], o[a - 1]);
- break;
- case 105:
- this.$ = new i.Call("super", [new i.Splat(new i.Literal("arguments"))]);
- break;
- case 106:
- this.$ = new i.Call("super", o[a]);
- break;
- case 107:
- this.$ = !1;
- break;
- case 108:
- this.$ = !0;
- break;
- case 109:
- this.$ = [];
- break;
- case 110:
- this.$ = o[a - 2];
- break;
- case 111:
- this.$ = new i.Value(new i.Literal("this"));
- break;
- case 112:
- this.$ = new i.Value(new i.Literal("this"));
- break;
- case 113:
- this.$ = new i.Value(new i.Literal("this"), [new i.Access(o[a])], "this");
- break;
- case 114:
- this.$ = new i.Arr([]);
- break;
- case 115:
- this.$ = new i.Arr(o[a - 2]);
- break;
- case 116:
- this.$ = "inclusive";
- break;
- case 117:
- this.$ = "exclusive";
- break;
- case 118:
- this.$ = new i.Range(o[a - 3], o[a - 1], o[a - 2]);
- break;
- case 119:
- this.$ = new i.Range(o[a - 2], o[a], o[a - 1]);
- break;
- case 120:
- this.$ = new i.Range(o[a - 1], null, o[a]);
- break;
- case 121:
- this.$ = new i.Range(null, o[a], o[a - 1]);
- break;
- case 122:
- this.$ = new i.Range(null, null, o[a]);
- break;
- case 123:
- this.$ = [o[a]];
- break;
- case 124:
- this.$ = o[a - 2].concat(o[a]);
- break;
- case 125:
- this.$ = o[a - 3].concat(o[a]);
- break;
- case 126:
- this.$ = o[a - 2];
- break;
- case 127:
- this.$ = o[a - 5].concat(o[a - 2]);
- break;
- case 128:
- this.$ = o[a];
- break;
- case 129:
- this.$ = o[a];
- break;
- case 130:
- this.$ = o[a];
- break;
- case 131:
- this.$ = [].concat(o[a - 2], o[a]);
- break;
- case 132:
- this.$ = new i.Try(o[a]);
- break;
- case 133:
- this.$ = new i.Try(o[a - 1], o[a][0], o[a][1]);
- break;
- case 134:
- this.$ = new i.Try(o[a - 2], null, null, o[a]);
- break;
- case 135:
- this.$ = new i.Try(o[a - 3], o[a - 2][0], o[a - 2][1], o[a]);
- break;
- case 136:
- this.$ = [o[a - 1], o[a]];
- break;
- case 137:
- this.$ = new i.Throw(o[a]);
- break;
- case 138:
- this.$ = new i.Parens(o[a - 1]);
- break;
- case 139:
- this.$ = new i.Parens(o[a - 2]);
- break;
- case 140:
- this.$ = new i.While(o[a]);
- break;
- case 141:
- this.$ = new i.While(o[a - 2], {guard: o[a]});
- break;
- case 142:
- this.$ = new i.While(o[a], {invert: !0});
- break;
- case 143:
- this.$ = new i.While(o[a - 2], {invert: !0, guard: o[a]});
- break;
- case 144:
- this.$ = o[a - 1].addBody(o[a]);
- break;
- case 145:
- this.$ = o[a].addBody(i.Block.wrap([o[a - 1]]));
- break;
- case 146:
- this.$ = o[a].addBody(i.Block.wrap([o[a - 1]]));
- break;
- case 147:
- this.$ = o[a];
- break;
- case 148:
- this.$ = (new i.While(new i.Literal("true"))).addBody(o[a]);
- break;
- case 149:
- this.$ = (new i.While(new i.Literal("true"))).addBody(i.Block.wrap([o[a]]));
- break;
- case 150:
- this.$ = new i.For(o[a - 1], o[a]);
- break;
- case 151:
- this.$ = new i.For(o[a - 1], o[a]);
- break;
- case 152:
- this.$ = new i.For(o[a], o[a - 1]);
- break;
- case 153:
- this.$ = {source: new i.Value(o[a])};
- break;
- case 154:
- this.$ = function () {
- return o[a].own = o[a - 1].own, o[a].name = o[a - 1][0], o[a].index = o[a - 1][1], o[a]
- }();
- break;
- case 155:
- this.$ = o[a];
- break;
- case 156:
- this.$ = function () {
- return o[a].own = !0, o[a]
- }();
- break;
- case 157:
- this.$ = o[a];
- break;
- case 158:
- this.$ = o[a];
- break;
- case 159:
- this.$ = new i.Value(o[a]);
- break;
- case 160:
- this.$ = new i.Value(o[a]);
- break;
- case 161:
- this.$ = [o[a]];
- break;
- case 162:
- this.$ = [o[a - 2], o[a]];
- break;
- case 163:
- this.$ = {source: o[a]};
- break;
- case 164:
- this.$ = {source: o[a], object: !0};
- break;
- case 165:
- this.$ = {source: o[a - 2], guard: o[a]};
- break;
- case 166:
- this.$ = {source: o[a - 2], guard: o[a], object: !0};
- break;
- case 167:
- this.$ = {source: o[a - 2], step: o[a]};
- break;
- case 168:
- this.$ = {source: o[a - 4], guard: o[a - 2], step: o[a]};
- break;
- case 169:
- this.$ = {source: o[a - 4], step: o[a - 2], guard: o[a]};
- break;
- case 170:
- this.$ = new i.Switch(o[a - 3], o[a - 1]);
- break;
- case 171:
- this.$ = new i.Switch(o[a - 5], o[a - 3], o[a - 1]);
- break;
- case 172:
- this.$ = new i.Switch(null, o[a - 1]);
- break;
- case 173:
- this.$ = new i.Switch(null, o[a - 3], o[a - 1]);
- break;
- case 174:
- this.$ = o[a];
- break;
- case 175:
- this.$ = o[a - 1].concat(o[a]);
- break;
- case 176:
- this.$ = [
- [o[a - 1], o[a]]
- ];
- break;
- case 177:
- this.$ = [
- [o[a - 2], o[a - 1]]
- ];
- break;
- case 178:
- this.$ = new i.If(o[a - 1], o[a], {type: o[a - 2]});
- break;
- case 179:
- this.$ = o[a - 4].addElse(new i.If(o[a - 1], o[a], {type: o[a - 2]}));
- break;
- case 180:
- this.$ = o[a];
- break;
- case 181:
- this.$ = o[a - 2].addElse(o[a]);
- break;
- case 182:
- this.$ = new i.If(o[a], i.Block.wrap([o[a - 2]]), {type: o[a - 1], statement: !0});
- break;
- case 183:
- this.$ = new i.If(o[a], i.Block.wrap([o[a - 2]]), {type: o[a - 1], statement: !0});
- break;
- case 184:
- this.$ = new i.Op(o[a - 1], o[a]);
- break;
- case 185:
- this.$ = new i.Op("-", o[a]);
- break;
- case 186:
- this.$ = new i.Op("+", o[a]);
- break;
- case 187:
- this.$ = new i.Op("--", o[a]);
- break;
- case 188:
- this.$ = new i.Op("++", o[a]);
- break;
- case 189:
- this.$ = new i.Op("--", o[a - 1], null, !0);
- break;
- case 190:
- this.$ = new i.Op("++", o[a - 1], null, !0);
- break;
- case 191:
- this.$ = new i.Existence(o[a - 1]);
- break;
- case 192:
- this.$ = new i.Op("+", o[a - 2], o[a]);
- break;
- case 193:
- this.$ = new i.Op("-", o[a - 2], o[a]);
- break;
- case 194:
- this.$ = new i.Op(o[a - 1], o[a - 2], o[a]);
- break;
- case 195:
- this.$ = new i.Op(o[a - 1], o[a - 2], o[a]);
- break;
- case 196:
- this.$ = new i.Op(o[a - 1], o[a - 2], o[a]);
- break;
- case 197:
- this.$ = new i.Op(o[a - 1], o[a - 2], o[a]);
- break;
- case 198:
- this.$ = function () {
- return o[a - 1].charAt(0) === "!" ? (new i.Op(o[a - 1].slice(1), o[a - 2], o[a])).invert() : new i.Op(o[a - 1], o[a - 2], o[a])
- }();
- break;
- case 199:
- this.$ = new i.Assign(o[a - 2], o[a], o[a - 1]);
- break;
- case 200:
- this.$ = new i.Assign(o[a - 4], o[a - 1], o[a - 3]);
- break;
- case 201:
- this.$ = new i.Extends(o[a - 2], o[a])
- }
- }, table: [
- {1: [2, 1], 3: 1, 4: 2, 5: 3, 7: 4, 8: 6, 9: 7, 10: 20, 11: 21, 12: [1, 22], 13: 8, 14: 9, 15: 10, 16: 11, 17: 12, 18: 13, 19: 14, 20: 15, 21: 16, 22: 17, 23: 18, 24: 19, 25: [1, 5], 27: 62, 28: [1, 73], 29: 49, 30: [1, 71], 31: [1, 72], 32: 24, 33: [1, 50], 34: [1, 51], 35: [1, 52], 36: [1, 53], 37: [1, 54], 38: [1, 55], 39: 23, 44: 63, 45: [1, 45], 46: [1, 46], 47: [1, 29], 50: 30, 51: [1, 60], 52: [1, 61], 58: 47, 59: 48, 61: 36, 63: 25, 64: 26, 65: 27, 75: [1, 70], 78: [1, 43], 82: [1, 28], 87: [1, 58], 88: [1, 59], 89: [1, 57], 95: [1, 38], 99: [1, 44], 100: [1, 56], 102: 39, 103: [1, 65], 105: [1, 66], 106: 40, 107: [1, 67], 108: 41, 109: [1, 68], 110: 69, 118: [1, 42], 123: 37, 124: [1, 64], 126: [1, 31], 127: [1, 32], 128: [1, 33], 129: [1, 34], 130: [1, 35]},
- {1: [3]},
- {1: [2, 2], 6: [1, 74]},
- {6: [1, 75]},
- {1: [2, 4], 6: [2, 4], 26: [2, 4], 101: [2, 4]},
- {4: 77, 7: 4, 8: 6, 9: 7, 10: 20, 11: 21, 12: [1, 22], 13: 8, 14: 9, 15: 10, 16: 11, 17: 12, 18: 13, 19: 14, 20: 15, 21: 16, 22: 17, 23: 18, 24: 19, 26: [1, 76], 27: 62, 28: [1, 73], 29: 49, 30: [1, 71], 31: [1, 72], 32: 24, 33: [1, 50], 34: [1, 51], 35: [1, 52], 36: [1, 53], 37: [1, 54], 38: [1, 55], 39: 23, 44: 63, 45: [1, 45], 46: [1, 46], 47: [1, 29], 50: 30, 51: [1, 60], 52: [1, 61], 58: 47, 59: 48, 61: 36, 63: 25, 64: 26, 65: 27, 75: [1, 70], 78: [1, 43], 82: [1, 28], 87: [1, 58], 88: [1, 59], 89: [1, 57], 95: [1, 38], 99: [1, 44], 100: [1, 56], 102: 39, 103: [1, 65], 105: [1, 66], 106: 40, 107: [1, 67], 108: 41, 109: [1, 68], 110: 69, 118: [1, 42], 123: 37, 124: [1, 64], 126: [1, 31], 127: [1, 32], 128: [1, 33], 129: [1, 34], 130: [1, 35]},
- {1: [2, 7], 6: [2, 7], 26: [2, 7], 101: [2, 7], 102: 87, 103: [1, 65], 105: [1, 66], 108: 88, 109: [1, 68], 110: 69, 125: [1, 86], 127: [1, 80], 128: [1, 79], 131: [1, 78], 132: [1, 81], 133: [1, 82], 134: [1, 83], 135: [1, 84], 136: [1, 85]},
- {1: [2, 8], 6: [2, 8], 26: [2, 8], 101: [2, 8], 102: 90, 103: [1, 65], 105: [1, 66], 108: 91, 109: [1, 68], 110: 69, 125: [1, 89]},
- {1: [2, 12], 6: [2, 12], 25: [2, 12], 26: [2, 12], 49: [2, 12], 54: [2, 12], 57: [2, 12], 62: 93, 66: [1, 95], 67: [1, 96], 68: [1, 97], 69: 98, 70: [1, 99], 72: [2, 12], 73: [1, 100], 77: [2, 12], 80: 92, 83: [1, 94], 84: [2, 107], 85: [2, 12], 90: [2, 12], 92: [2, 12], 101: [2, 12], 103: [2, 12], 104: [2, 12], 105: [2, 12], 109: [2, 12], 117: [2, 12], 125: [2, 12], 127: [2, 12], 128: [2, 12], 131: [2, 12], 132: [2, 12], 133: [2, 12], 134: [2, 12], 135: [2, 12], 136: [2, 12]},
- {1: [2, 13], 6: [2, 13], 25: [2, 13], 26: [2, 13], 49: [2, 13], 54: [2, 13], 57: [2, 13], 62: 102, 66: [1, 95], 67: [1, 96], 68: [1, 97], 69: 98, 70: [1, 99], 72: [2, 13], 73: [1, 100], 77: [2, 13], 80: 101, 83: [1, 94], 84: [2, 107], 85: [2, 13], 90: [2, 13], 92: [2, 13], 101: [2, 13], 103: [2, 13], 104: [2, 13], 105: [2, 13], 109: [2, 13], 117: [2, 13], 125: [2, 13], 127: [2, 13], 128: [2, 13], 131: [2, 13], 132: [2, 13], 133: [2, 13], 134: [2, 13], 135: [2, 13], 136: [2, 13]},
- {1: [2, 14], 6: [2, 14], 25: [2, 14], 26: [2, 14], 49: [2, 14], 54: [2, 14], 57: [2, 14], 72: [2, 14], 77: [2, 14], 85: [2, 14], 90: [2, 14], 92: [2, 14], 101: [2, 14], 103: [2, 14], 104: [2, 14], 105: [2, 14], 109: [2, 14], 117: [2, 14], 125: [2, 14], 127: [2, 14], 128: [2, 14], 131: [2, 14], 132: [2, 14], 133: [2, 14], 134: [2, 14], 135: [2, 14], 136: [2, 14]},
- {1: [2, 15], 6: [2, 15], 25: [2, 15], 26: [2, 15], 49: [2, 15], 54: [2, 15], 57: [2, 15], 72: [2, 15], 77: [2, 15], 85: [2, 15], 90: [2, 15], 92: [2, 15], 101: [2, 15], 103: [2, 15], 104: [2, 15], 105: [2, 15], 109: [2, 15], 117: [2, 15], 125: [2, 15], 127: [2, 15], 128: [2, 15], 131: [2, 15], 132: [2, 15], 133: [2, 15], 134: [2, 15], 135: [2, 15], 136: [2, 15]},
- {1: [2, 16], 6: [2, 16], 25: [2, 16], 26: [2, 16], 49: [2, 16], 54: [2, 16], 57: [2, 16], 72: [2, 16], 77: [2, 16], 85: [2, 16], 90: [2, 16], 92: [2, 16], 101: [2, 16], 103: [2, 16], 104: [2, 16], 105: [2, 16], 109: [2, 16], 117: [2, 16], 125: [2, 16], 127: [2, 16], 128: [2, 16], 131: [2, 16], 132: [2, 16], 133: [2, 16], 134: [2, 16], 135: [2, 16], 136: [2, 16]},
- {1: [2, 17], 6: [2, 17], 25: [2, 17], 26: [2, 17], 49: [2, 17], 54: [2, 17], 57: [2, 17], 72: [2, 17], 77: [2, 17], 85: [2, 17], 90: [2, 17], 92: [2, 17], 101: [2, 17], 103: [2, 17], 104: [2, 17], 105: [2, 17], 109: [2, 17], 117: [2, 17], 125: [2, 17], 127: [2, 17], 128: [2, 17], 131: [2, 17], 132: [2, 17], 133: [2, 17], 134: [2, 17], 135: [2, 17], 136: [2, 17]},
- {1: [2, 18], 6: [2, 18], 25: [2, 18], 26: [2, 18], 49: [2, 18], 54: [2, 18], 57: [2, 18], 72: [2, 18], 77: [2, 18], 85: [2, 18], 90: [2, 18], 92: [2, 18], 101: [2, 18], 103: [2, 18], 104: [2, 18], 105: [2, 18], 109: [2, 18], 117: [2, 18], 125: [2, 18], 127: [2, 18], 128: [2, 18], 131: [2, 18], 132: [2, 18], 133: [2, 18], 134: [2, 18], 135: [2, 18], 136: [2, 18]},
- {1: [2, 19], 6: [2, 19], 25: [2, 19], 26: [2, 19], 49: [2, 19], 54: [2, 19], 57: [2, 19], 72: [2, 19], 77: [2, 19], 85: [2, 19], 90: [2, 19], 92: [2, 19], 101: [2, 19], 103: [2, 19], 104: [2, 19], 105: [2, 19], 109: [2, 19], 117: [2, 19], 125: [2, 19], 127: [2, 19], 128: [2, 19], 131: [2, 19], 132: [2, 19], 133: [2, 19], 134: [2, 19], 135: [2, 19], 136: [2, 19]},
- {1: [2, 20], 6: [2, 20], 25: [2, 20], 26: [2, 20], 49: [2, 20], 54: [2, 20], 57: [2, 20], 72: [2, 20], 77: [2, 20], 85: [2, 20], 90: [2, 20], 92: [2, 20], 101: [2, 20], 103: [2, 20], 104: [2, 20], 105: [2, 20], 109: [2, 20], 117: [2, 20], 125: [2, 20], 127: [2, 20], 128: [2, 20], 131: [2, 20], 132: [2, 20], 133: [2, 20], 134: [2, 20], 135: [2, 20], 136: [2, 20]},
- {1: [2, 21], 6: [2, 21], 25: [2, 21], 26: [2, 21], 49: [2, 21], 54: [2, 21], 57: [2, 21], 72: [2, 21], 77: [2, 21], 85: [2, 21], 90: [2, 21], 92: [2, 21], 101: [2, 21], 103: [2, 21], 104: [2, 21], 105: [2, 21], 109: [2, 21], 117: [2, 21], 125: [2, 21], 127: [2, 21], 128: [2, 21], 131: [2, 21], 132: [2, 21], 133: [2, 21], 134: [2, 21], 135: [2, 21], 136: [2, 21]},
- {1: [2, 22], 6: [2, 22], 25: [2, 22], 26: [2, 22], 49: [2, 22], 54: [2, 22], 57: [2, 22], 72: [2, 22], 77: [2, 22], 85: [2, 22], 90: [2, 22], 92: [2, 22], 101: [2, 22], 103: [2, 22], 104: [2, 22], 105: [2, 22], 109: [2, 22], 117: [2, 22], 125: [2, 22], 127: [2, 22], 128: [2, 22], 131: [2, 22], 132: [2, 22], 133: [2, 22], 134: [2, 22], 135: [2, 22], 136: [2, 22]},
- {1: [2, 23], 6: [2, 23], 25: [2, 23], 26: [2, 23], 49: [2, 23], 54: [2, 23], 57: [2, 23], 72: [2, 23], 77: [2, 23], 85: [2, 23], 90: [2, 23], 92: [2, 23], 101: [2, 23], 103: [2, 23], 104: [2, 23], 105: [2, 23], 109: [2, 23], 117: [2, 23], 125: [2, 23], 127: [2, 23], 128: [2, 23], 131: [2, 23], 132: [2, 23], 133: [2, 23], 134: [2, 23], 135: [2, 23], 136: [2, 23]},
- {1: [2, 9], 6: [2, 9], 26: [2, 9], 101: [2, 9], 103: [2, 9], 105: [2, 9], 109: [2, 9], 125: [2, 9]},
- {1: [2, 10], 6: [2, 10], 26: [2, 10], 101: [2, 10], 103: [2, 10], 105: [2, 10], 109: [2, 10], 125: [2, 10]},
- {1: [2, 11], 6: [2, 11], 26: [2, 11], 101: [2, 11], 103: [2, 11], 105: [2, 11], 109: [2, 11], 125: [2, 11]},
- {1: [2, 75], 6: [2, 75], 25: [2, 75], 26: [2, 75], 40: [1, 103], 49: [2, 75], 54: [2, 75], 57: [2, 75], 66: [2, 75], 67: [2, 75], 68: [2, 75], 70: [2, 75], 72: [2, 75], 73: [2, 75], 77: [2, 75], 83: [2, 75], 84: [2, 75], 85: [2, 75], 90: [2, 75], 92: [2, 75], 101: [2, 75], 103: [2, 75], 104: [2, 75], 105: [2, 75], 109: [2, 75], 117: [2, 75], 125: [2, 75], 127: [2, 75], 128: [2, 75], 131: [2, 75], 132: [2, 75], 133: [2, 75], 134: [2, 75], 135: [2, 75], 136: [2, 75]},
- {1: [2, 76], 6: [2, 76], 25: [2, 76], 26: [2, 76], 49: [2, 76], 54: [2, 76], 57: [2, 76], 66: [2, 76], 67: [2, 76], 68: [2, 76], 70: [2, 76], 72: [2, 76], 73: [2, 76], 77: [2, 76], 83: [2, 76], 84: [2, 76], 85: [2, 76], 90: [2, 76], 92: [2, 76], 101: [2, 76], 103: [2, 76], 104: [2, 76], 105: [2, 76], 109: [2, 76], 117: [2, 76], 125: [2, 76], 127: [2, 76], 128: [2, 76], 131: [2, 76], 132: [2, 76], 133: [2, 76], 134: [2, 76], 135: [2, 76], 136: [2, 76]},
- {1: [2, 77], 6: [2, 77], 25: [2, 77], 26: [2, 77], 49: [2, 77], 54: [2, 77], 57: [2, 77], 66: [2, 77], 67: [2, 77], 68: [2, 77], 70: [2, 77], 72: [2, 77], 73: [2, 77], 77: [2, 77], 83: [2, 77], 84: [2, 77], 85: [2, 77], 90: [2, 77], 92: [2, 77], 101: [2, 77], 103: [2, 77], 104: [2, 77], 105: [2, 77], 109: [2, 77], 117: [2, 77], 125: [2, 77], 127: [2, 77], 128: [2, 77], 131: [2, 77], 132: [2, 77], 133: [2, 77], 134: [2, 77], 135: [2, 77], 136: [2, 77]},
- {1: [2, 78], 6: [2, 78], 25: [2, 78], 26: [2, 78], 49: [2, 78], 54: [2, 78], 57: [2, 78], 66: [2, 78], 67: [2, 78], 68: [2, 78], 70: [2, 78], 72: [2, 78], 73: [2, 78], 77: [2, 78], 83: [2, 78], 84: [2, 78], 85: [2, 78], 90: [2, 78], 92: [2, 78], 101: [2, 78], 103: [2, 78], 104: [2, 78], 105: [2, 78], 109: [2, 78], 117: [2, 78], 125: [2, 78], 127: [2, 78], 128: [2, 78], 131: [2, 78], 132: [2, 78], 133: [2, 78], 134: [2, 78], 135: [2, 78], 136: [2, 78]},
- {1: [2, 79], 6: [2, 79], 25: [2, 79], 26: [2, 79], 49: [2, 79], 54: [2, 79], 57: [2, 79], 66: [2, 79], 67: [2, 79], 68: [2, 79], 70: [2, 79], 72: [2, 79], 73: [2, 79], 77: [2, 79], 83: [2, 79], 84: [2, 79], 85: [2, 79], 90: [2, 79], 92: [2, 79], 101: [2, 79], 103: [2, 79], 104: [2, 79], 105: [2, 79], 109: [2, 79], 117: [2, 79], 125: [2, 79], 127: [2, 79], 128: [2, 79], 131: [2, 79], 132: [2, 79], 133: [2, 79], 134: [2, 79], 135: [2, 79], 136: [2, 79]},
- {1: [2, 105], 6: [2, 105], 25: [2, 105], 26: [2, 105], 49: [2, 105], 54: [2, 105], 57: [2, 105], 66: [2, 105], 67: [2, 105], 68: [2, 105], 70: [2, 105], 72: [2, 105], 73: [2, 105], 77: [2, 105], 81: 104, 83: [2, 105], 84: [1, 105], 85: [2, 105], 90: [2, 105], 92: [2, 105], 101: [2, 105], 103: [2, 105], 104: [2, 105], 105: [2, 105], 109: [2, 105], 117: [2, 105], 125: [2, 105], 127: [2, 105], 128: [2, 105], 131: [2, 105], 132: [2, 105], 133: [2, 105], 134: [2, 105], 135: [2, 105], 136: [2, 105]},
- {6: [2, 55], 25: [2, 55], 27: 109, 28: [1, 73], 44: 110, 48: 106, 49: [2, 55], 54: [2, 55], 55: 107, 56: 108, 58: 111, 59: 112, 75: [1, 70], 88: [1, 113], 89: [1, 114]},
- {5: 115, 25: [1, 5]},
- {8: 116, 9: 117, 10: 20, 11: 21, 12: [1, 22], 13: 8, 14: 9, 15: 10, 16: 11, 17: 12, 18: 13, 19: 14, 20: 15, 21: 16, 22: 17, 23: 18, 24: 19, 27: 62, 28: [1, 73], 29: 49, 30: [1, 71], 31: [1, 72], 32: 24, 33: [1, 50], 34: [1, 51], 35: [1, 52], 36: [1, 53], 37: [1, 54], 38: [1, 55], 39: 23, 44: 63, 45: [1, 45], 46: [1, 46], 47: [1, 29], 50: 30, 51: [1, 60], 52: [1, 61], 58: 47, 59: 48, 61: 36, 63: 25, 64: 26, 65: 27, 75: [1, 70], 78: [1, 43], 82: [1, 28], 87: [1, 58], 88: [1, 59], 89: [1, 57], 95: [1, 38], 99: [1, 44], 100: [1, 56], 102: 39, 103: [1, 65], 105: [1, 66], 106: 40, 107: [1, 67], 108: 41, 109: [1, 68], 110: 69, 118: [1, 42], 123: 37, 124: [1, 64], 126: [1, 31], 127: [1, 32], 128: [1, 33], 129: [1, 34], 130: [1, 35]},
- {8: 118, 9: 117, 10: 20, 11: 21, 12: [1, 22], 13: 8, 14: 9, 15: 10, 16: 11, 17: 12, 18: 13, 19: 14, 20: 15, 21: 16, 22: 17, 23: 18, 24: 19, 27: 62, 28: [1, 73], 29: 49, 30: [1, 71], 31: [1, 72], 32: 24, 33: [1, 50], 34: [1, 51], 35: [1, 52], 36: [1, 53], 37: [1, 54], 38: [1, 55], 39: 23, 44: 63, 45: [1, 45], 46: [1, 46], 47: [1, 29], 50: 30, 51: [1, 60], 52: [1, 61], 58: 47, 59: 48, 61: 36, 63: 25, 64: 26, 65: 27, 75: [1, 70], 78: [1, 43], 82: [1, 28], 87: [1, 58], 88: [1, 59], 89: [1, 57], 95: [1, 38], 99: [1, 44], 100: [1, 56], 102: 39, 103: [1, 65], 105: [1, 66], 106: 40, 107: [1, 67], 108: 41, 109: [1, 68], 110: 69, 118: [1, 42], 123: 37, 124: [1, 64], 126: [1, 31], 127: [1, 32], 128: [1, 33], 129: [1, 34], 130: [1, 35]},
- {8: 119, 9: 117, 10: 20, 11: 21, 12: [1, 22], 13: 8, 14: 9, 15: 10, 16: 11, 17: 12, 18: 13, 19: 14, 20: 15, 21: 16, 22: 17, 23: 18, 24: 19, 27: 62, 28: [1, 73], 29: 49, 30: [1, 71], 31: [1, 72], 32: 24, 33: [1, 50], 34: [1, 51], 35: [1, 52], 36: [1, 53], 37: [1, 54], 38: [1, 55], 39: 23, 44: 63, 45: [1, 45], 46: [1, 46], 47: [1, 29], 50: 30, 51: [1, 60], 52: [1, 61], 58: 47, 59: 48, 61: 36, 63: 25, 64: 26, 65: 27, 75: [1, 70], 78: [1, 43], 82: [1, 28], 87: [1, 58], 88: [1, 59], 89: [1, 57], 95: [1, 38], 99: [1, 44], 100: [1, 56], 102: 39, 103: [1, 65], 105: [1, 66], 106: 40, 107: [1, 67], 108: 41, 109: [1, 68], 110: 69, 118: [1, 42], 123: 37, 124: [1, 64], 126: [1, 31], 127: [1, 32], 128: [1, 33], 129: [1, 34], 130: [1, 35]},
- {13: 121, 14: 122, 27: 62, 28: [1, 73], 29: 49, 30: [1, 71], 31: [1, 72], 32: 24, 33: [1, 50], 34: [1, 51], 35: [1, 52], 36: [1, 53], 37: [1, 54], 38: [1, 55], 39: 123, 44: 63, 58: 47, 59: 48, 61: 120, 63: 25, 64: 26, 65: 27, 75: [1, 70], 82: [1, 28], 87: [1, 58], 88: [1, 59], 89: [1, 57], 100: [1, 56]},
- {13: 121, 14: 122, 27: 62, 28: [1, 73], 29: 49, 30: [1, 71], 31: [1, 72], 32: 24, 33: [1, 50], 34: [1, 51], 35: [1, 52], 36: [1, 53], 37: [1, 54], 38: [1, 55], 39: 123, 44: 63, 58: 47, 59: 48, 61: 124, 63: 25, 64: 26, 65: 27, 75: [1, 70], 82: [1, 28], 87: [1, 58], 88: [1, 59], 89: [1, 57], 100: [1, 56]},
- {1: [2, 72], 6: [2, 72], 25: [2, 72], 26: [2, 72], 40: [2, 72], 49: [2, 72], 54: [2, 72], 57: [2, 72], 66: [2, 72], 67: [2, 72], 68: [2, 72], 70: [2, 72], 72: [2, 72], 73: [2, 72], 77: [2, 72], 79: [1, 128], 83: [2, 72], 84: [2, 72], 85: [2, 72], 90: [2, 72], 92: [2, 72], 101: [2, 72], 103: [2, 72], 104: [2, 72], 105: [2, 72], 109: [2, 72], 117: [2, 72], 125: [2, 72], 127: [2, 72], 128: [2, 72], 129: [1, 125], 130: [1, 126], 131: [2, 72], 132: [2, 72], 133: [2, 72], 134: [2, 72], 135: [2, 72], 136: [2, 72], 137: [1, 127]},
- {1: [2, 180], 6: [2, 180], 25: [2, 180], 26: [2, 180], 49: [2, 180], 54: [2, 180], 57: [2, 180], 72: [2, 180], 77: [2, 180], 85: [2, 180], 90: [2, 180], 92: [2, 180], 101: [2, 180], 103: [2, 180], 104: [2, 180], 105: [2, 180], 109: [2, 180], 117: [2, 180], 120: [1, 129], 125: [2, 180], 127: [2, 180], 128: [2, 180], 131: [2, 180], 132: [2, 180], 133: [2, 180], 134: [2, 180], 135: [2, 180], 136: [2, 180]},
- {5: 130, 25: [1, 5]},
- {5: 131, 25: [1, 5]},
- {1: [2, 147], 6: [2, 147], 25: [2, 147], 26: [2, 147], 49: [2, 147], 54: [2, 147], 57: [2, 147], 72: [2, 147], 77: [2, 147], 85: [2, 147], 90: [2, 147], 92: [2, 147], 101: [2, 147], 103: [2, 147], 104: [2, 147], 105: [2, 147], 109: [2, 147], 117: [2, 147], 125: [2, 147], 127: [2, 147], 128: [2, 147], 131: [2, 147], 132: [2, 147], 133: [2, 147], 134: [2, 147], 135: [2, 147], 136: [2, 147]},
- {5: 132, 25: [1, 5]},
- {8: 133, 9: 117, 10: 20, 11: 21, 12: [1, 22], 13: 8, 14: 9, 15: 10, 16: 11, 17: 12, 18: 13, 19: 14, 20: 15, 21: 16, 22: 17, 23: 18, 24: 19, 25: [1, 134], 27: 62, 28: [1, 73], 29: 49, 30: [1, 71], 31: [1, 72], 32: 24, 33: [1, 50], 34: [1, 51], 35: [1, 52], 36: [1, 53], 37: [1, 54], 38: [1, 55], 39: 23, 44: 63, 45: [1, 45], 46: [1, 46], 47: [1, 29], 50: 30, 51: [1, 60], 52: [1, 61], 58: 47, 59: 48, 61: 36, 63: 25, 64: 26, 65: 27, 75: [1, 70], 78: [1, 43], 82: [1, 28], 87: [1, 58], 88: [1, 59], 89: [1, 57], 95: [1, 38], 99: [1, 44], 100: [1, 56], 102: 39, 103: [1, 65], 105: [1, 66], 106: 40, 107: [1, 67], 108: 41, 109: [1, 68], 110: 69, 118: [1, 42], 123: 37, 124: [1, 64], 126: [1, 31], 127: [1, 32], 128: [1, 33], 129: [1, 34], 130: [1, 35]},
- {1: [2, 95], 5: 135, 6: [2, 95], 13: 121, 14: 122, 25: [1, 5], 26: [2, 95], 27: 62, 28: [1, 73], 29: 49, 30: [1, 71], 31: [1, 72], 32: 24, 33: [1, 50], 34: [1, 51], 35: [1, 52], 36: [1, 53], 37: [1, 54], 38: [1, 55], 39: 123, 44: 63, 49: [2, 95], 54: [2, 95], 57: [2, 95], 58: 47, 59: 48, 61: 137, 63: 25, 64: 26, 65: 27, 72: [2, 95], 75: [1, 70], 77: [2, 95], 79: [1, 136], 82: [1, 28], 85: [2, 95], 87: [1, 58], 88: [1, 59], 89: [1, 57], 90: [2, 95], 92: [2, 95], 100: [1, 56], 101: [2, 95], 103: [2, 95], 104: [2, 95], 105: [2, 95], 109: [2, 95], 117: [2, 95], 125: [2, 95], 127: [2, 95], 128: [2, 95], 131: [2, 95], 132: [2, 95], 133: [2, 95], 134: [2, 95], 135: [2, 95], 136: [2, 95]},
- {8: 138, 9: 117, 10: 20, 11: 21, 12: [1, 22], 13: 8, 14: 9, 15: 10, 16: 11, 17: 12, 18: 13, 19: 14, 20: 15, 21: 16, 22: 17, 23: 18, 24: 19, 27: 62, 28: [1, 73], 29: 49, 30: [1, 71], 31: [1, 72], 32: 24, 33: [1, 50], 34: [1, 51], 35: [1, 52], 36: [1, 53], 37: [1, 54], 38: [1, 55], 39: 23, 44: 63, 45: [1, 45], 46: [1, 46], 47: [1, 29], 50: 30, 51: [1, 60], 52: [1, 61], 58: 47, 59: 48, 61: 36, 63: 25, 64: 26, 65: 27, 75: [1, 70], 78: [1, 43], 82: [1, 28], 87: [1, 58], 88: [1, 59], 89: [1, 57], 95: [1, 38], 99: [1, 44], 100: [1, 56], 102: 39, 103: [1, 65], 105: [1, 66], 106: 40, 107: [1, 67], 108: 41, 109: [1, 68], 110: 69, 118: [1, 42], 123: 37, 124: [1, 64], 126: [1, 31], 127: [1, 32], 128: [1, 33], 129: [1, 34], 130: [1, 35]},
- {1: [2, 47], 6: [2, 47], 8: 139, 9: 117, 10: 20, 11: 21, 12: [1, 22], 13: 8, 14: 9, 15: 10, 16: 11, 17: 12, 18: 13, 19: 14, 20: 15, 21: 16, 22: 17, 23: 18, 24: 19, 26: [2, 47], 27: 62, 28: [1, 73], 29: 49, 30: [1, 71], 31: [1, 72], 32: 24, 33: [1, 50], 34: [1, 51], 35: [1, 52], 36: [1, 53], 37: [1, 54], 38: [1, 55], 39: 23, 44: 63, 45: [1, 45], 46: [1, 46], 47: [1, 29], 50: 30, 51: [1, 60], 52: [1, 61], 58: 47, 59: 48, 61: 36, 63: 25, 64: 26, 65: 27, 75: [1, 70], 78: [1, 43], 82: [1, 28], 87: [1, 58], 88: [1, 59], 89: [1, 57], 95: [1, 38], 99: [1, 44], 100: [1, 56], 101: [2, 47], 102: 39, 103: [2, 47], 105: [2, 47], 106: 40, 107: [1, 67], 108: 41, 109: [2, 47], 110: 69, 118: [1, 42], 123: 37, 124: [1, 64], 125: [2, 47], 126: [1, 31], 127: [1, 32], 128: [1, 33], 129: [1, 34], 130: [1, 35]},
- {1: [2, 48], 6: [2, 48], 25: [2, 48], 26: [2, 48], 54: [2, 48], 77: [2, 48], 101: [2, 48], 103: [2, 48], 105: [2, 48], 109: [2, 48], 125: [2, 48]},
- {1: [2, 73], 6: [2, 73], 25: [2, 73], 26: [2, 73], 40: [2, 73], 49: [2, 73], 54: [2, 73], 57: [2, 73], 66: [2, 73], 67: [2, 73], 68: [2, 73], 70: [2, 73], 72: [2, 73], 73: [2, 73], 77: [2, 73], 83: [2, 73], 84: [2, 73], 85: [2, 73], 90: [2, 73], 92: [2, 73], 101: [2, 73], 103: [2, 73], 104: [2, 73], 105: [2, 73], 109: [2, 73], 117: [2, 73], 125: [2, 73], 127: [2, 73], 128: [2, 73], 131: [2, 73], 132: [2, 73], 133: [2, 73], 134: [2, 73], 135: [2, 73], 136: [2, 73]},
- {1: [2, 74], 6: [2, 74], 25: [2, 74], 26: [2, 74], 40: [2, 74], 49: [2, 74], 54: [2, 74], 57: [2, 74], 66: [2, 74], 67: [2, 74], 68: [2, 74], 70: [2, 74], 72: [2, 74], 73: [2, 74], 77: [2, 74], 83: [2, 74], 84: [2, 74], 85: [2, 74], 90: [2, 74], 92: [2, 74], 101: [2, 74], 103: [2, 74], 104: [2, 74], 105: [2, 74], 109: [2, 74], 117: [2, 74], 125: [2, 74], 127: [2, 74], 128: [2, 74], 131: [2, 74], 132: [2, 74], 133: [2, 74], 134: [2, 74], 135: [2, 74], 136: [2, 74]},
- {1: [2, 29], 6: [2, 29], 25: [2, 29], 26: [2, 29], 49: [2, 29], 54: [2, 29], 57: [2, 29], 66: [2, 29], 67: [2, 29], 68: [2, 29], 70: [2, 29], 72: [2, 29], 73: [2, 29], 77: [2, 29], 83: [2, 29], 84: [2, 29], 85: [2, 29], 90: [2, 29], 92: [2, 29], 101: [2, 29], 103: [2, 29], 104: [2, 29], 105: [2, 29], 109: [2, 29], 117: [2, 29], 125: [2, 29], 127: [2, 29], 128: [2, 29], 131: [2, 29], 132: [2, 29], 133: [2, 29], 134: [2, 29], 135: [2, 29], 136: [2, 29]},
- {1: [2, 30], 6: [2, 30], 25: [2, 30], 26: [2, 30], 49: [2, 30], 54: [2, 30], 57: [2, 30], 66: [2, 30], 67: [2, 30], 68: [2, 30], 70: [2, 30], 72: [2, 30], 73: [2, 30], 77: [2, 30], 83: [2, 30], 84: [2, 30], 85: [2, 30], 90: [2, 30], 92: [2, 30], 101: [2, 30], 103: [2, 30], 104: [2, 30], 105: [2, 30], 109: [2, 30], 117: [2, 30], 125: [2, 30], 127: [2, 30], 128: [2, 30], 131: [2, 30], 132: [2, 30], 133: [2, 30], 134: [2, 30], 135: [2, 30], 136: [2, 30]},
- {1: [2, 31], 6: [2, 31], 25: [2, 31], 26: [2, 31], 49: [2, 31], 54: [2, 31], 57: [2, 31], 66: [2, 31], 67: [2, 31], 68: [2, 31], 70: [2, 31], 72: [2, 31], 73: [2, 31], 77: [2, 31], 83: [2, 31], 84: [2, 31], 85: [2, 31], 90: [2, 31], 92: [2, 31], 101: [2, 31], 103: [2, 31], 104: [2, 31], 105: [2, 31], 109: [2, 31], 117: [2, 31], 125: [2, 31], 127: [2, 31], 128: [2, 31], 131: [2, 31], 132: [2, 31], 133: [2, 31], 134: [2, 31], 135: [2, 31], 136: [2, 31]},
- {1: [2, 32], 6: [2, 32], 25: [2, 32], 26: [2, 32], 49: [2, 32], 54: [2, 32], 57: [2, 32], 66: [2, 32], 67: [2, 32], 68: [2, 32], 70: [2, 32], 72: [2, 32], 73: [2, 32], 77: [2, 32], 83: [2, 32], 84: [2, 32], 85: [2, 32], 90: [2, 32], 92: [2, 32], 101: [2, 32], 103: [2, 32], 104: [2, 32], 105: [2, 32], 109: [2, 32], 117: [2, 32], 125: [2, 32], 127: [2, 32], 128: [2, 32], 131: [2, 32], 132: [2, 32], 133: [2, 32], 134: [2, 32], 135: [2, 32], 136: [2, 32]},
- {1: [2, 33], 6: [2, 33], 25: [2, 33], 26: [2, 33], 49: [2, 33], 54: [2, 33], 57: [2, 33], 66: [2, 33], 67: [2, 33], 68: [2, 33], 70: [2, 33], 72: [2, 33], 73: [2, 33], 77: [2, 33], 83: [2, 33], 84: [2, 33], 85: [2, 33], 90: [2, 33], 92: [2, 33], 101: [2, 33], 103: [2, 33], 104: [2, 33], 105: [2, 33], 109: [2, 33], 117: [2, 33], 125: [2, 33], 127: [2, 33], 128: [2, 33], 131: [2, 33], 132: [2, 33], 133: [2, 33], 134: [2, 33], 135: [2, 33], 136: [2, 33]},
- {1: [2, 34], 6: [2, 34], 25: [2, 34], 26: [2, 34], 49: [2, 34], 54: [2, 34], 57: [2, 34], 66: [2, 34], 67: [2, 34], 68: [2, 34], 70: [2, 34], 72: [2, 34], 73: [2, 34], 77: [2, 34], 83: [2, 34], 84: [2, 34], 85: [2, 34], 90: [2, 34], 92: [2, 34], 101: [2, 34], 103: [2, 34], 104: [2, 34], 105: [2, 34], 109: [2, 34], 117: [2, 34], 125: [2, 34], 127: [2, 34], 128: [2, 34], 131: [2, 34], 132: [2, 34], 133: [2, 34], 134: [2, 34], 135: [2, 34], 136: [2, 34]},
- {1: [2, 35], 6: [2, 35], 25: [2, 35], 26: [2, 35], 49: [2, 35], 54: [2, 35], 57: [2, 35], 66: [2, 35], 67: [2, 35], 68: [2, 35], 70: [2, 35], 72: [2, 35], 73: [2, 35], 77: [2, 35], 83: [2, 35], 84: [2, 35], 85: [2, 35], 90: [2, 35], 92: [2, 35], 101: [2, 35], 103: [2, 35], 104: [2, 35], 105: [2, 35], 109: [2, 35], 117: [2, 35], 125: [2, 35], 127: [2, 35], 128: [2, 35], 131: [2, 35], 132: [2, 35], 133: [2, 35], 134: [2, 35], 135: [2, 35], 136: [2, 35]},
- {4: 140, 7: 4, 8: 6, 9: 7, 10: 20, 11: 21, 12: [1, 22], 13: 8, 14: 9, 15: 10, 16: 11, 17: 12, 18: 13, 19: 14, 20: 15, 21: 16, 22: 17, 23: 18, 24: 19, 25: [1, 141], 27: 62, 28: [1, 73], 29: 49, 30: [1, 71], 31: [1, 72], 32: 24, 33: [1, 50], 34: [1, 51], 35: [1, 52], 36: [1, 53], 37: [1, 54], 38: [1, 55], 39: 23, 44: 63, 45: [1, 45], 46: [1, 46], 47: [1, 29], 50: 30, 51: [1, 60], 52: [1, 61], 58: 47, 59: 48, 61: 36, 63: 25, 64: 26, 65: 27, 75: [1, 70], 78: [1, 43], 82: [1, 28], 87: [1, 58], 88: [1, 59], 89: [1, 57], 95: [1, 38], 99: [1, 44], 100: [1, 56], 102: 39, 103: [1, 65], 105: [1, 66], 106: 40, 107: [1, 67], 108: 41, 109: [1, 68], 110: 69, 118: [1, 42], 123: 37, 124: [1, 64], 126: [1, 31], 127: [1, 32], 128: [1, 33], 129: [1, 34], 130: [1, 35]},
- {8: 142, 9: 117, 10: 20, 11: 21, 12: [1, 22], 13: 8, 14: 9, 15: 10, 16: 11, 17: 12, 18: 13, 19: 14, 20: 15, 21: 16, 22: 17, 23: 18, 24: 19, 25: [1, 146], 27: 62, 28: [1, 73], 29: 49, 30: [1, 71], 31: [1, 72], 32: 24, 33: [1, 50], 34: [1, 51], 35: [1, 52], 36: [1, 53], 37: [1, 54], 38: [1, 55], 39: 23, 44: 63, 45: [1, 45], 46: [1, 46], 47: [1, 29], 50: 30, 51: [1, 60], 52: [1, 61], 58: 47, 59: 48, 60: 147, 61: 36, 63: 25, 64: 26, 65: 27, 75: [1, 70], 78: [1, 43], 82: [1, 28], 86: 144, 87: [1, 58], 88: [1, 59], 89: [1, 57], 90: [1, 143], 93: 145, 95: [1, 38], 99: [1, 44], 100: [1, 56], 102: 39, 103: [1, 65], 105: [1, 66], 106: 40, 107: [1, 67], 108: 41, 109: [1, 68], 110: 69, 118: [1, 42], 123: 37, 124: [1, 64], 126: [1, 31], 127: [1, 32], 128: [1, 33], 129: [1, 34], 130: [1, 35]},
- {1: [2, 111], 6: [2, 111], 25: [2, 111], 26: [2, 111], 49: [2, 111], 54: [2, 111], 57: [2, 111], 66: [2, 111], 67: [2, 111], 68: [2, 111], 70: [2, 111], 72: [2, 111], 73: [2, 111], 77: [2, 111], 83: [2, 111], 84: [2, 111], 85: [2, 111], 90: [2, 111], 92: [2, 111], 101: [2, 111], 103: [2, 111], 104: [2, 111], 105: [2, 111], 109: [2, 111], 117: [2, 111], 125: [2, 111], 127: [2, 111], 128: [2, 111], 131: [2, 111], 132: [2, 111], 133: [2, 111], 134: [2, 111], 135: [2, 111], 136: [2, 111]},
- {1: [2, 112], 6: [2, 112], 25: [2, 112], 26: [2, 112], 27: 148, 28: [1, 73], 49: [2, 112], 54: [2, 112], 57: [2, 112], 66: [2, 112], 67: [2, 112], 68: [2, 112], 70: [2, 112], 72: [2, 112], 73: [2, 112], 77: [2, 112], 83: [2, 112], 84: [2, 112], 85: [2, 112], 90: [2, 112], 92: [2, 112], 101: [2, 112], 103: [2, 112], 104: [2, 112], 105: [2, 112], 109: [2, 112], 117: [2, 112], 125: [2, 112], 127: [2, 112], 128: [2, 112], 131: [2, 112], 132: [2, 112], 133: [2, 112], 134: [2, 112], 135: [2, 112], 136: [2, 112]},
- {25: [2, 51]},
- {25: [2, 52]},
- {1: [2, 68], 6: [2, 68], 25: [2, 68], 26: [2, 68], 40: [2, 68], 49: [2, 68], 54: [2, 68], 57: [2, 68], 66: [2, 68], 67: [2, 68], 68: [2, 68], 70: [2, 68], 72: [2, 68], 73: [2, 68], 77: [2, 68], 79: [2, 68], 83: [2, 68], 84: [2, 68], 85: [2, 68], 90: [2, 68], 92: [2, 68], 101: [2, 68], 103: [2, 68], 104: [2, 68], 105: [2, 68], 109: [2, 68], 117: [2, 68], 125: [2, 68], 127: [2, 68], 128: [2, 68], 129: [2, 68], 130: [2, 68], 131: [2, 68], 132: [2, 68], 133: [2, 68], 134: [2, 68], 135: [2, 68], 136: [2, 68], 137: [2, 68]},
- {1: [2, 71], 6: [2, 71], 25: [2, 71], 26: [2, 71], 40: [2, 71], 49: [2, 71], 54: [2, 71], 57: [2, 71], 66: [2, 71], 67: [2, 71], 68: [2, 71], 70: [2, 71], 72: [2, 71], 73: [2, 71], 77: [2, 71], 79: [2, 71], 83: [2, 71], 84: [2, 71], 85: [2, 71], 90: [2, 71], 92: [2, 71], 101: [2, 71], 103: [2, 71], 104: [2, 71], 105: [2, 71], 109: [2, 71], 117: [2, 71], 125: [2, 71], 127: [2, 71], 128: [2, 71], 129: [2, 71], 130: [2, 71], 131: [2, 71], 132: [2, 71], 133: [2, 71], 134: [2, 71], 135: [2, 71], 136: [2, 71], 137: [2, 71]},
- {8: 149, 9: 117, 10: 20, 11: 21, 12: [1, 22], 13: 8, 14: 9, 15: 10, 16: 11, 17: 12, 18: 13, 19: 14, 20: 15, 21: 16, 22: 17, 23: 18, 24: 19, 27: 62, 28: [1, 73], 29: 49, 30: [1, 71], 31: [1, 72], 32: 24, 33: [1, 50], 34: [1, 51], 35: [1, 52], 36: [1, 53], 37: [1, 54], 38: [1, 55], 39: 23, 44: 63, 45: [1, 45], 46: [1, 46], 47: [1, 29], 50: 30, 51: [1, 60], 52: [1, 61], 58: 47, 59: 48, 61: 36, 63: 25, 64: 26, 65: 27, 75: [1, 70], 78: [1, 43], 82: [1, 28], 87: [1, 58], 88: [1, 59], 89: [1, 57], 95: [1, 38], 99: [1, 44], 100: [1, 56], 102: 39, 103: [1, 65], 105: [1, 66], 106: 40, 107: [1, 67], 108: 41, 109: [1, 68], 110: 69, 118: [1, 42], 123: 37, 124: [1, 64], 126: [1, 31], 127: [1, 32], 128: [1, 33], 129: [1, 34], 130: [1, 35]},
- {8: 150, 9: 117, 10: 20, 11: 21, 12: [1, 22], 13: 8, 14: 9, 15: 10, 16: 11, 17: 12, 18: 13, 19: 14, 20: 15, 21: 16, 22: 17, 23: 18, 24: 19, 27: 62, 28: [1, 73], 29: 49, 30: [1, 71], 31: [1, 72], 32: 24, 33: [1, 50], 34: [1, 51], 35: [1, 52], 36: [1, 53], 37: [1, 54], 38: [1, 55], 39: 23, 44: 63, 45: [1, 45], 46: [1, 46], 47: [1, 29], 50: 30, 51: [1, 60], 52: [1, 61], 58: 47, 59: 48, 61: 36, 63: 25, 64: 26, 65: 27, 75: [1, 70], 78: [1, 43], 82: [1, 28], 87: [1, 58], 88: [1, 59], 89: [1, 57], 95: [1, 38], 99: [1, 44], 100: [1, 56], 102: 39, 103: [1, 65], 105: [1, 66], 106: 40, 107: [1, 67], 108: 41, 109: [1, 68], 110: 69, 118: [1, 42], 123: 37, 124: [1, 64], 126: [1, 31], 127: [1, 32], 128: [1, 33], 129: [1, 34], 130: [1, 35]},
- {8: 151, 9: 117, 10: 20, 11: 21, 12: [1, 22], 13: 8, 14: 9, 15: 10, 16: 11, 17: 12, 18: 13, 19: 14, 20: 15, 21: 16, 22: 17, 23: 18, 24: 19, 27: 62, 28: [1, 73], 29: 49, 30: [1, 71], 31: [1, 72], 32: 24, 33: [1, 50], 34: [1, 51], 35: [1, 52], 36: [1, 53], 37: [1, 54], 38: [1, 55], 39: 23, 44: 63, 45: [1, 45], 46: [1, 46], 47: [1, 29], 50: 30, 51: [1, 60], 52: [1, 61], 58: 47, 59: 48, 61: 36, 63: 25, 64: 26, 65: 27, 75: [1, 70], 78: [1, 43], 82: [1, 28], 87: [1, 58], 88: [1, 59], 89: [1, 57], 95: [1, 38], 99: [1, 44], 100: [1, 56], 102: 39, 103: [1, 65], 105: [1, 66], 106: 40, 107: [1, 67], 108: 41, 109: [1, 68], 110: 69, 118: [1, 42], 123: 37, 124: [1, 64], 126: [1, 31], 127: [1, 32], 128: [1, 33], 129: [1, 34], 130: [1, 35]},
- {5: 152, 8: 153, 9: 117, 10: 20, 11: 21, 12: [1, 22], 13: 8, 14: 9, 15: 10, 16: 11, 17: 12, 18: 13, 19: 14, 20: 15, 21: 16, 22: 17, 23: 18, 24: 19, 25: [1, 5], 27: 62, 28: [1, 73], 29: 49, 30: [1, 71], 31: [1, 72], 32: 24, 33: [1, 50], 34: [1, 51], 35: [1, 52], 36: [1, 53], 37: [1, 54], 38: [1, 55], 39: 23, 44: 63, 45: [1, 45], 46: [1, 46], 47: [1, 29], 50: 30, 51: [1, 60], 52: [1, 61], 58: 47, 59: 48, 61: 36, 63: 25, 64: 26, 65: 27, 75: [1, 70], 78: [1, 43], 82: [1, 28], 87: [1, 58], 88: [1, 59], 89: [1, 57], 95: [1, 38], 99: [1, 44], 100: [1, 56], 102: 39, 103: [1, 65], 105: [1, 66], 106: 40, 107: [1, 67], 108: 41, 109: [1, 68], 110: 69, 118: [1, 42], 123: 37, 124: [1, 64], 126: [1, 31], 127: [1, 32], 128: [1, 33], 129: [1, 34], 130: [1, 35]},
- {27: 158, 28: [1, 73], 44: 159, 58: 160, 59: 161, 64: 154, 75: [1, 70], 88: [1, 113], 89: [1, 57], 112: 155, 113: [1, 156], 114: 157},
- {111: 162, 115: [1, 163], 116: [1, 164]},
- {6: [2, 90], 11: 168, 25: [2, 90], 27: 169, 28: [1, 73], 29: 170, 30: [1, 71], 31: [1, 72], 41: 166, 42: 167, 44: 171, 46: [1, 46], 54: [2, 90], 76: 165, 77: [2, 90], 88: [1, 113]},
- {1: [2, 27], 6: [2, 27], 25: [2, 27], 26: [2, 27], 43: [2, 27], 49: [2, 27], 54: [2, 27], 57: [2, 27], 66: [2, 27], 67: [2, 27], 68: [2, 27], 70: [2, 27], 72: [2, 27], 73: [2, 27], 77: [2, 27], 83: [2, 27], 84: [2, 27], 85: [2, 27], 90: [2, 27], 92: [2, 27], 101: [2, 27], 103: [2, 27], 104: [2, 27], 105: [2, 27], 109: [2, 27], 117: [2, 27], 125: [2, 27], 127: [2, 27], 128: [2, 27], 131: [2, 27], 132: [2, 27], 133: [2, 27], 134: [2, 27], 135: [2, 27], 136: [2, 27]},
- {1: [2, 28], 6: [2, 28], 25: [2, 28], 26: [2, 28], 43: [2, 28], 49: [2, 28], 54: [2, 28], 57: [2, 28], 66: [2, 28], 67: [2, 28], 68: [2, 28], 70: [2, 28], 72: [2, 28], 73: [2, 28], 77: [2, 28], 83: [2, 28], 84: [2, 28], 85: [2, 28], 90: [2, 28], 92: [2, 28], 101: [2, 28], 103: [2, 28], 104: [2, 28], 105: [2, 28], 109: [2, 28], 117: [2, 28], 125: [2, 28], 127: [2, 28], 128: [2, 28], 131: [2, 28], 132: [2, 28], 133: [2, 28], 134: [2, 28], 135: [2, 28], 136: [2, 28]},
- {1: [2, 26], 6: [2, 26], 25: [2, 26], 26: [2, 26], 40: [2, 26], 43: [2, 26], 49: [2, 26], 54: [2, 26], 57: [2, 26], 66: [2, 26], 67: [2, 26], 68: [2, 26], 70: [2, 26], 72: [2, 26], 73: [2, 26], 77: [2, 26], 79: [2, 26], 83: [2, 26], 84: [2, 26], 85: [2, 26], 90: [2, 26], 92: [2, 26], 101: [2, 26], 103: [2, 26], 104: [2, 26], 105: [2, 26], 109: [2, 26], 115: [2, 26], 116: [2, 26], 117: [2, 26], 125: [2, 26], 127: [2, 26], 128: [2, 26], 129: [2, 26], 130: [2, 26], 131: [2, 26], 132: [2, 26], 133: [2, 26], 134: [2, 26], 135: [2, 26], 136: [2, 26], 137: [2, 26]},
- {1: [2, 6], 6: [2, 6], 7: 172, 8: 6, 9: 7, 10: 20, 11: 21, 12: [1, 22], 13: 8, 14: 9, 15: 10, 16: 11, 17: 12, 18: 13, 19: 14, 20: 15, 21: 16, 22: 17, 23: 18, 24: 19, 26: [2, 6], 27: 62, 28: [1, 73], 29: 49, 30: [1, 71], 31: [1, 72], 32: 24, 33: [1, 50], 34: [1, 51], 35: [1, 52], 36: [1, 53], 37: [1, 54], 38: [1, 55], 39: 23, 44: 63, 45: [1, 45], 46: [1, 46], 47: [1, 29], 50: 30, 51: [1, 60], 52: [1, 61], 58: 47, 59: 48, 61: 36, 63: 25, 64: 26, 65: 27, 75: [1, 70], 78: [1, 43], 82: [1, 28], 87: [1, 58], 88: [1, 59], 89: [1, 57], 95: [1, 38], 99: [1, 44], 100: [1, 56], 101: [2, 6], 102: 39, 103: [1, 65], 105: [1, 66], 106: 40, 107: [1, 67], 108: 41, 109: [1, 68], 110: 69, 118: [1, 42], 123: 37, 124: [1, 64], 126: [1, 31], 127: [1, 32], 128: [1, 33], 129: [1, 34], 130: [1, 35]},
- {1: [2, 3]},
- {1: [2, 24], 6: [2, 24], 25: [2, 24], 26: [2, 24], 49: [2, 24], 54: [2, 24], 57: [2, 24], 72: [2, 24], 77: [2, 24], 85: [2, 24], 90: [2, 24], 92: [2, 24], 97: [2, 24], 98: [2, 24], 101: [2, 24], 103: [2, 24], 104: [2, 24], 105: [2, 24], 109: [2, 24], 117: [2, 24], 120: [2, 24], 122: [2, 24], 125: [2, 24], 127: [2, 24], 128: [2, 24], 131: [2, 24], 132: [2, 24], 133: [2, 24], 134: [2, 24], 135: [2, 24], 136: [2, 24]},
- {6: [1, 74], 26: [1, 173]},
- {1: [2, 191], 6: [2, 191], 25: [2, 191], 26: [2, 191], 49: [2, 191], 54: [2, 191], 57: [2, 191], 72: [2, 191], 77: [2, 191], 85: [2, 191], 90: [2, 191], 92: [2, 191], 101: [2, 191], 103: [2, 191], 104: [2, 191], 105: [2, 191], 109: [2, 191], 117: [2, 191], 125: [2, 191], 127: [2, 191], 128: [2, 191], 131: [2, 191], 132: [2, 191], 133: [2, 191], 134: [2, 191], 135: [2, 191], 136: [2, 191]},
- {8: 174, 9: 117, 10: 20, 11: 21, 12: [1, 22], 13: 8, 14: 9, 15: 10, 16: 11, 17: 12, 18: 13, 19: 14, 20: 15, 21: 16, 22: 17, 23: 18, 24: 19, 27: 62, 28: [1, 73], 29: 49, 30: [1, 71], 31: [1, 72], 32: 24, 33: [1, 50], 34: [1, 51], 35: [1, 52], 36: [1, 53], 37: [1, 54], 38: [1, 55], 39: 23, 44: 63, 45: [1, 45], 46: [1, 46], 47: [1, 29], 50: 30, 51: [1, 60], 52: [1, 61], 58: 47, 59: 48, 61: 36, 63: 25, 64: 26, 65: 27, 75: [1, 70], 78: [1, 43], 82: [1, 28], 87: [1, 58], 88: [1, 59], 89: [1, 57], 95: [1, 38], 99: [1, 44], 100: [1, 56], 102: 39, 103: [1, 65], 105: [1, 66], 106: 40, 107: [1, 67], 108: 41, 109: [1, 68], 110: 69, 118: [1, 42], 123: 37, 124: [1, 64], 126: [1, 31], 127: [1, 32], 128: [1, 33], 129: [1, 34], 130: [1, 35]},
- {8: 175, 9: 117, 10: 20, 11: 21, 12: [1, 22], 13: 8, 14: 9, 15: 10, 16: 11, 17: 12, 18: 13, 19: 14, 20: 15, 21: 16, 22: 17, 23: 18, 24: 19, 27: 62, 28: [1, 73], 29: 49, 30: [1, 71], 31: [1, 72], 32: 24, 33: [1, 50], 34: [1, 51], 35: [1, 52], 36: [1, 53], 37: [1, 54], 38: [1, 55], 39: 23, 44: 63, 45: [1, 45], 46: [1, 46], 47: [1, 29], 50: 30, 51: [1, 60], 52: [1, 61], 58: 47, 59: 48, 61: 36, 63: 25, 64: 26, 65: 27, 75: [1, 70], 78: [1, 43], 82: [1, 28], 87: [1, 58], 88: [1, 59], 89: [1, 57], 95: [1, 38], 99: [1, 44], 100: [1, 56], 102: 39, 103: [1, 65], 105: [1, 66], 106: 40, 107: [1, 67], 108: 41, 109: [1, 68], 110: 69, 118: [1, 42], 123: 37, 124: [1, 64], 126: [1, 31], 127: [1, 32], 128: [1, 33], 129: [1, 34], 130: [1, 35]},
- {8: 176, 9: 117, 10: 20, 11: 21, 12: [1, 22], 13: 8, 14: 9, 15: 10, 16: 11, 17: 12, 18: 13, 19: 14, 20: 15, 21: 16, 22: 17, 23: 18, 24: 19, 27: 62, 28: [1, 73], 29: 49, 30: [1, 71], 31: [1, 72], 32: 24, 33: [1, 50], 34: [1, 51], 35: [1, 52], 36: [1, 53], 37: [1, 54], 38: [1, 55], 39: 23, 44: 63, 45: [1, 45], 46: [1, 46], 47: [1, 29], 50: 30, 51: [1, 60], 52: [1, 61], 58: 47, 59: 48, 61: 36, 63: 25, 64: 26, 65: 27, 75: [1, 70], 78: [1, 43], 82: [1, 28], 87: [1, 58], 88: [1, 59], 89: [1, 57], 95: [1, 38], 99: [1, 44], 100: [1, 56], 102: 39, 103: [1, 65], 105: [1, 66], 106: 40, 107: [1, 67], 108: 41, 109: [1, 68], 110: 69, 118: [1, 42], 123: 37, 124: [1, 64], 126: [1, 31], 127: [1, 32], 128: [1, 33], 129: [1, 34], 130: [1, 35]},
- {8: 177, 9: 117, 10: 20, 11: 21, 12: [1, 22], 13: 8, 14: 9, 15: 10, 16: 11, 17: 12, 18: 13, 19: 14, 20: 15, 21: 16, 22: 17, 23: 18, 24: 19, 27: 62, 28: [1, 73], 29: 49, 30: [1, 71], 31: [1, 72], 32: 24, 33: [1, 50], 34: [1, 51], 35: [1, 52], 36: [1, 53], 37: [1, 54], 38: [1, 55], 39: 23, 44: 63, 45: [1, 45], 46: [1, 46], 47: [1, 29], 50: 30, 51: [1, 60], 52: [1, 61], 58: 47, 59: 48, 61: 36, 63: 25, 64: 26, 65: 27, 75: [1, 70], 78: [1, 43], 82: [1, 28], 87: [1, 58], 88: [1, 59], 89: [1, 57], 95: [1, 38], 99: [1, 44], 100: [1, 56], 102: 39, 103: [1, 65], 105: [1, 66], 106: 40, 107: [1, 67], 108: 41, 109: [1, 68], 110: 69, 118: [1, 42], 123: 37, 124: [1, 64], 126: [1, 31], 127: [1, 32], 128: [1, 33], 129: [1, 34], 130: [1, 35]},
- {8: 178, 9: 117, 10: 20, 11: 21, 12: [1, 22], 13: 8, 14: 9, 15: 10, 16: 11, 17: 12, 18: 13, 19: 14, 20: 15, 21: 16, 22: 17, 23: 18, 24: 19, 27: 62, 28: [1, 73], 29: 49, 30: [1, 71], 31: [1, 72], 32: 24, 33: [1, 50], 34: [1, 51], 35: [1, 52], 36: [1, 53], 37: [1, 54], 38: [1, 55], 39: 23, 44: 63, 45: [1, 45], 46: [1, 46], 47: [1, 29], 50: 30, 51: [1, 60], 52: [1, 61], 58: 47, 59: 48, 61: 36, 63: 25, 64: 26, 65: 27, 75: [1, 70], 78: [1, 43], 82: [1, 28], 87: [1, 58], 88: [1, 59], 89: [1, 57], 95: [1, 38], 99: [1, 44], 100: [1, 56], 102: 39, 103: [1, 65], 105: [1, 66], 106: 40, 107: [1, 67], 108: 41, 109: [1, 68], 110: 69, 118: [1, 42], 123: 37, 124: [1, 64], 126: [1, 31], 127: [1, 32], 128: [1, 33], 129: [1, 34], 130: [1, 35]},
- {8: 179, 9: 117, 10: 20, 11: 21, 12: [1, 22], 13: 8, 14: 9, 15: 10, 16: 11, 17: 12, 18: 13, 19: 14, 20: 15, 21: 16, 22: 17, 23: 18, 24: 19, 27: 62, 28: [1, 73], 29: 49, 30: [1, 71], 31: [1, 72], 32: 24, 33: [1, 50], 34: [1, 51], 35: [1, 52], 36: [1, 53], 37: [1, 54], 38: [1, 55], 39: 23, 44: 63, 45: [1, 45], 46: [1, 46], 47: [1, 29], 50: 30, 51: [1, 60], 52: [1, 61], 58: 47, 59: 48, 61: 36, 63: 25, 64: 26, 65: 27, 75: [1, 70], 78: [1, 43], 82: [1, 28], 87: [1, 58], 88: [1, 59], 89: [1, 57], 95: [1, 38], 99: [1, 44], 100: [1, 56], 102: 39, 103: [1, 65], 105: [1, 66], 106: 40, 107: [1, 67], 108: 41, 109: [1, 68], 110: 69, 118: [1, 42], 123: 37, 124: [1, 64], 126: [1, 31], 127: [1, 32], 128: [1, 33], 129: [1, 34], 130: [1, 35]},
- {8: 180, 9: 117, 10: 20, 11: 21, 12: [1, 22], 13: 8, 14: 9, 15: 10, 16: 11, 17: 12, 18: 13, 19: 14, 20: 15, 21: 16, 22: 17, 23: 18, 24: 19, 27: 62, 28: [1, 73], 29: 49, 30: [1, 71], 31: [1, 72], 32: 24, 33: [1, 50], 34: [1, 51], 35: [1, 52], 36: [1, 53], 37: [1, 54], 38: [1, 55], 39: 23, 44: 63, 45: [1, 45], 46: [1, 46], 47: [1, 29], 50: 30, 51: [1, 60], 52: [1, 61], 58: 47, 59: 48, 61: 36, 63: 25, 64: 26, 65: 27, 75: [1, 70], 78: [1, 43], 82: [1, 28], 87: [1, 58], 88: [1, 59], 89: [1, 57], 95: [1, 38], 99: [1, 44], 100: [1, 56], 102: 39, 103: [1, 65], 105: [1, 66], 106: 40, 107: [1, 67], 108: 41, 109: [1, 68], 110: 69, 118: [1, 42], 123: 37, 124: [1, 64], 126: [1, 31], 127: [1, 32], 128: [1, 33], 129: [1, 34], 130: [1, 35]},
- {8: 181, 9: 117, 10: 20, 11: 21, 12: [1, 22], 13: 8, 14: 9, 15: 10, 16: 11, 17: 12, 18: 13, 19: 14, 20: 15, 21: 16, 22: 17, 23: 18, 24: 19, 27: 62, 28: [1, 73], 29: 49, 30: [1, 71], 31: [1, 72], 32: 24, 33: [1, 50], 34: [1, 51], 35: [1, 52], 36: [1, 53], 37: [1, 54], 38: [1, 55], 39: 23, 44: 63, 45: [1, 45], 46: [1, 46], 47: [1, 29], 50: 30, 51: [1, 60], 52: [1, 61], 58: 47, 59: 48, 61: 36, 63: 25, 64: 26, 65: 27, 75: [1, 70], 78: [1, 43], 82: [1, 28], 87: [1, 58], 88: [1, 59], 89: [1, 57], 95: [1, 38], 99: [1, 44], 100: [1, 56], 102: 39, 103: [1, 65], 105: [1, 66], 106: 40, 107: [1, 67], 108: 41, 109: [1, 68], 110: 69, 118: [1, 42], 123: 37, 124: [1, 64], 126: [1, 31], 127: [1, 32], 128: [1, 33], 129: [1, 34], 130: [1, 35]},
- {1: [2, 146], 6: [2, 146], 25: [2, 146], 26: [2, 146], 49: [2, 146], 54: [2, 146], 57: [2, 146], 72: [2, 146], 77: [2, 146], 85: [2, 146], 90: [2, 146], 92: [2, 146], 101: [2, 146], 103: [2, 146], 104: [2, 146], 105: [2, 146], 109: [2, 146], 117: [2, 146], 125: [2, 146], 127: [2, 146], 128: [2, 146], 131: [2, 146], 132: [2, 146], 133: [2, 146], 134: [2, 146], 135: [2, 146], 136: [2, 146]},
- {1: [2, 151], 6: [2, 151], 25: [2, 151], 26: [2, 151], 49: [2, 151], 54: [2, 151], 57: [2, 151], 72: [2, 151], 77: [2, 151], 85: [2, 151], 90: [2, 151], 92: [2, 151], 101: [2, 151], 103: [2, 151], 104: [2, 151], 105: [2, 151], 109: [2, 151], 117: [2, 151], 125: [2, 151], 127: [2, 151], 128: [2, 151], 131: [2, 151], 132: [2, 151], 133: [2, 151], 134: [2, 151], 135: [2, 151], 136: [2, 151]},
- {8: 182, 9: 117, 10: 20, 11: 21, 12: [1, 22], 13: 8, 14: 9, 15: 10, 16: 11, 17: 12, 18: 13, 19: 14, 20: 15, 21: 16, 22: 17, 23: 18, 24: 19, 27: 62, 28: [1, 73], 29: 49, 30: [1, 71], 31: [1, 72], 32: 24, 33: [1, 50], 34: [1, 51], 35: [1, 52], 36: [1, 53], 37: [1, 54], 38: [1, 55], 39: 23, 44: 63, 45: [1, 45], 46: [1, 46], 47: [1, 29], 50: 30, 51: [1, 60], 52: [1, 61], 58: 47, 59: 48, 61: 36, 63: 25, 64: 26, 65: 27, 75: [1, 70], 78: [1, 43], 82: [1, 28], 87: [1, 58], 88: [1, 59], 89: [1, 57], 95: [1, 38], 99: [1, 44], 100: [1, 56], 102: 39, 103: [1, 65], 105: [1, 66], 106: 40, 107: [1, 67], 108: 41, 109: [1, 68], 110: 69, 118: [1, 42], 123: 37, 124: [1, 64], 126: [1, 31], 127: [1, 32], 128: [1, 33], 129: [1, 34], 130: [1, 35]},
- {1: [2, 145], 6: [2, 145], 25: [2, 145], 26: [2, 145], 49: [2, 145], 54: [2, 145], 57: [2, 145], 72: [2, 145], 77: [2, 145], 85: [2, 145], 90: [2, 145], 92: [2, 145], 101: [2, 145], 103: [2, 145], 104: [2, 145], 105: [2, 145], 109: [2, 145], 117: [2, 145], 125: [2, 145], 127: [2, 145], 128: [2, 145], 131: [2, 145], 132: [2, 145], 133: [2, 145], 134: [2, 145], 135: [2, 145], 136: [2, 145]},
- {1: [2, 150], 6: [2, 150], 25: [2, 150], 26: [2, 150], 49: [2, 150], 54: [2, 150], 57: [2, 150], 72: [2, 150], 77: [2, 150], 85: [2, 150], 90: [2, 150], 92: [2, 150], 101: [2, 150], 103: [2, 150], 104: [2, 150], 105: [2, 150], 109: [2, 150], 117: [2, 150], 125: [2, 150], 127: [2, 150], 128: [2, 150], 131: [2, 150], 132: [2, 150], 133: [2, 150], 134: [2, 150], 135: [2, 150], 136: [2, 150]},
- {81: 183, 84: [1, 105]},
- {1: [2, 69], 6: [2, 69], 25: [2, 69], 26: [2, 69], 40: [2, 69], 49: [2, 69], 54: [2, 69], 57: [2, 69], 66: [2, 69], 67: [2, 69], 68: [2, 69], 70: [2, 69], 72: [2, 69], 73: [2, 69], 77: [2, 69], 79: [2, 69], 83: [2, 69], 84: [2, 69], 85: [2, 69], 90: [2, 69], 92: [2, 69], 101: [2, 69], 103: [2, 69], 104: [2, 69], 105: [2, 69], 109: [2, 69], 117: [2, 69], 125: [2, 69], 127: [2, 69], 128: [2, 69], 129: [2, 69], 130: [2, 69], 131: [2, 69], 132: [2, 69], 133: [2, 69], 134: [2, 69], 135: [2, 69], 136: [2, 69], 137: [2, 69]},
- {84: [2, 108]},
- {27: 184, 28: [1, 73]},
- {27: 185, 28: [1, 73]},
- {1: [2, 83], 6: [2, 83], 25: [2, 83], 26: [2, 83], 27: 186, 28: [1, 73], 40: [2, 83], 49: [2, 83], 54: [2, 83], 57: [2, 83], 66: [2, 83], 67: [2, 83], 68: [2, 83], 70: [2, 83], 72: [2, 83], 73: [2, 83], 77: [2, 83], 79: [2, 83], 83: [2, 83], 84: [2, 83], 85: [2, 83], 90: [2, 83], 92: [2, 83], 101: [2, 83], 103: [2, 83], 104: [2, 83], 105: [2, 83], 109: [2, 83], 117: [2, 83], 125: [2, 83], 127: [2, 83], 128: [2, 83], 129: [2, 83], 130: [2, 83], 131: [2, 83], 132: [2, 83], 133: [2, 83], 134: [2, 83], 135: [2, 83], 136: [2, 83], 137: [2, 83]},
- {1: [2, 84], 6: [2, 84], 25: [2, 84], 26: [2, 84], 40: [2, 84], 49: [2, 84], 54: [2, 84], 57: [2, 84], 66: [2, 84], 67: [2, 84], 68: [2, 84], 70: [2, 84], 72: [2, 84], 73: [2, 84], 77: [2, 84], 79: [2, 84], 83: [2, 84], 84: [2, 84], 85: [2, 84], 90: [2, 84], 92: [2, 84], 101: [2, 84], 103: [2, 84], 104: [2, 84], 105: [2, 84], 109: [2, 84], 117: [2, 84], 125: [2, 84], 127: [2, 84], 128: [2, 84], 129: [2, 84], 130: [2, 84], 131: [2, 84], 132: [2, 84], 133: [2, 84], 134: [2, 84], 135: [2, 84], 136: [2, 84], 137: [2, 84]},
- {8: 188, 9: 117, 10: 20, 11: 21, 12: [1, 22], 13: 8, 14: 9, 15: 10, 16: 11, 17: 12, 18: 13, 19: 14, 20: 15, 21: 16, 22: 17, 23: 18, 24: 19, 27: 62, 28: [1, 73], 29: 49, 30: [1, 71], 31: [1, 72], 32: 24, 33: [1, 50], 34: [1, 51], 35: [1, 52], 36: [1, 53], 37: [1, 54], 38: [1, 55], 39: 23, 44: 63, 45: [1, 45], 46: [1, 46], 47: [1, 29], 50: 30, 51: [1, 60], 52: [1, 61], 57: [1, 192], 58: 47, 59: 48, 61: 36, 63: 25, 64: 26, 65: 27, 71: 187, 74: 189, 75: [1, 70], 78: [1, 43], 82: [1, 28], 87: [1, 58], 88: [1, 59], 89: [1, 57], 91: 190, 92: [1, 191], 95: [1, 38], 99: [1, 44], 100: [1, 56], 102: 39, 103: [1, 65], 105: [1, 66], 106: 40, 107: [1, 67], 108: 41, 109: [1, 68], 110: 69, 118: [1, 42], 123: 37, 124: [1, 64], 126: [1, 31], 127: [1, 32], 128: [1, 33], 129: [1, 34], 130: [1, 35]},
- {69: 193, 70: [1, 99], 73: [1, 100]},
- {81: 194, 84: [1, 105]},
- {1: [2, 70], 6: [2, 70], 25: [2, 70], 26: [2, 70], 40: [2, 70], 49: [2, 70], 54: [2, 70], 57: [2, 70], 66: [2, 70], 67: [2, 70], 68: [2, 70], 70: [2, 70], 72: [2, 70], 73: [2, 70], 77: [2, 70], 79: [2, 70], 83: [2, 70], 84: [2, 70], 85: [2, 70], 90: [2, 70], 92: [2, 70], 101: [2, 70], 103: [2, 70], 104: [2, 70], 105: [2, 70], 109: [2, 70], 117: [2, 70], 125: [2, 70], 127: [2, 70], 128: [2, 70], 129: [2, 70], 130: [2, 70], 131: [2, 70], 132: [2, 70], 133: [2, 70], 134: [2, 70], 135: [2, 70], 136: [2, 70], 137: [2, 70]},
- {6: [1, 196], 8: 195, 9: 117, 10: 20, 11: 21, 12: [1, 22], 13: 8, 14: 9, 15: 10, 16: 11, 17: 12, 18: 13, 19: 14, 20: 15, 21: 16, 22: 17, 23: 18, 24: 19, 25: [1, 197], 27: 62, 28: [1, 73], 29: 49, 30: [1, 71], 31: [1, 72], 32: 24, 33: [1, 50], 34: [1, 51], 35: [1, 52], 36: [1, 53], 37: [1, 54], 38: [1, 55], 39: 23, 44: 63, 45: [1, 45], 46: [1, 46], 47: [1, 29], 50: 30, 51: [1, 60], 52: [1, 61], 58: 47, 59: 48, 61: 36, 63: 25, 64: 26, 65: 27, 75: [1, 70], 78: [1, 43], 82: [1, 28], 87: [1, 58], 88: [1, 59], 89: [1, 57], 95: [1, 38], 99: [1, 44], 100: [1, 56], 102: 39, 103: [1, 65], 105: [1, 66], 106: 40, 107: [1, 67], 108: 41, 109: [1, 68], 110: 69, 118: [1, 42], 123: 37, 124: [1, 64], 126: [1, 31], 127: [1, 32], 128: [1, 33], 129: [1, 34], 130: [1, 35]},
- {1: [2, 106], 6: [2, 106], 25: [2, 106], 26: [2, 106], 49: [2, 106], 54: [2, 106], 57: [2, 106], 66: [2, 106], 67: [2, 106], 68: [2, 106], 70: [2, 106], 72: [2, 106], 73: [2, 106], 77: [2, 106], 83: [2, 106], 84: [2, 106], 85: [2, 106], 90: [2, 106], 92: [2, 106], 101: [2, 106], 103: [2, 106], 104: [2, 106], 105: [2, 106], 109: [2, 106], 117: [2, 106], 125: [2, 106], 127: [2, 106], 128: [2, 106], 131: [2, 106], 132: [2, 106], 133: [2, 106], 134: [2, 106], 135: [2, 106], 136: [2, 106]},
- {8: 200, 9: 117, 10: 20, 11: 21, 12: [1, 22], 13: 8, 14: 9, 15: 10, 16: 11, 17: 12, 18: 13, 19: 14, 20: 15, 21: 16, 22: 17, 23: 18, 24: 19, 25: [1, 146], 27: 62, 28: [1, 73], 29: 49, 30: [1, 71], 31: [1, 72], 32: 24, 33: [1, 50], 34: [1, 51], 35: [1, 52], 36: [1, 53], 37: [1, 54], 38: [1, 55], 39: 23, 44: 63, 45: [1, 45], 46: [1, 46], 47: [1, 29], 50: 30, 51: [1, 60], 52: [1, 61], 58: 47, 59: 48, 60: 147, 61: 36, 63: 25, 64: 26, 65: 27, 75: [1, 70], 78: [1, 43], 82: [1, 28], 85: [1, 198], 86: 199, 87: [1, 58], 88: [1, 59], 89: [1, 57], 93: 145, 95: [1, 38], 99: [1, 44], 100: [1, 56], 102: 39, 103: [1, 65], 105: [1, 66], 106: 40, 107: [1, 67], 108: 41, 109: [1, 68], 110: 69, 118: [1, 42], 123: 37, 124: [1, 64], 126: [1, 31], 127: [1, 32], 128: [1, 33], 129: [1, 34], 130: [1, 35]},
- {6: [2, 53], 25: [2, 53], 49: [1, 201], 53: 203, 54: [1, 202]},
- {6: [2, 56], 25: [2, 56], 26: [2, 56], 49: [2, 56], 54: [2, 56]},
- {6: [2, 60], 25: [2, 60], 26: [2, 60], 40: [1, 205], 49: [2, 60], 54: [2, 60], 57: [1, 204]},
- {6: [2, 63], 25: [2, 63], 26: [2, 63], 40: [2, 63], 49: [2, 63], 54: [2, 63], 57: [2, 63]},
- {6: [2, 64], 25: [2, 64], 26: [2, 64], 40: [2, 64], 49: [2, 64], 54: [2, 64], 57: [2, 64]},
- {6: [2, 65], 25: [2, 65], 26: [2, 65], 40: [2, 65], 49: [2, 65], 54: [2, 65], 57: [2, 65]},
- {6: [2, 66], 25: [2, 66], 26: [2, 66], 40: [2, 66], 49: [2, 66], 54: [2, 66], 57: [2, 66]},
- {27: 148, 28: [1, 73]},
- {8: 200, 9: 117, 10: 20, 11: 21, 12: [1, 22], 13: 8, 14: 9, 15: 10, 16: 11, 17: 12, 18: 13, 19: 14, 20: 15, 21: 16, 22: 17, 23: 18, 24: 19, 25: [1, 146], 27: 62, 28: [1, 73], 29: 49, 30: [1, 71], 31: [1, 72], 32: 24, 33: [1, 50], 34: [1, 51], 35: [1, 52], 36: [1, 53], 37: [1, 54], 38: [1, 55], 39: 23, 44: 63, 45: [1, 45], 46: [1, 46], 47: [1, 29], 50: 30, 51: [1, 60], 52: [1, 61], 58: 47, 59: 48, 60: 147, 61: 36, 63: 25, 64: 26, 65: 27, 75: [1, 70], 78: [1, 43], 82: [1, 28], 86: 144, 87: [1, 58], 88: [1, 59], 89: [1, 57], 90: [1, 143], 93: 145, 95: [1, 38], 99: [1, 44], 100: [1, 56], 102: 39, 103: [1, 65], 105: [1, 66], 106: 40, 107: [1, 67], 108: 41, 109: [1, 68], 110: 69, 118: [1, 42], 123: 37, 124: [1, 64], 126: [1, 31], 127: [1, 32], 128: [1, 33], 129: [1, 34], 130: [1, 35]},
- {1: [2, 50], 6: [2, 50], 25: [2, 50], 26: [2, 50], 49: [2, 50], 54: [2, 50], 57: [2, 50], 72: [2, 50], 77: [2, 50], 85: [2, 50], 90: [2, 50], 92: [2, 50], 101: [2, 50], 103: [2, 50], 104: [2, 50], 105: [2, 50], 109: [2, 50], 117: [2, 50], 125: [2, 50], 127: [2, 50], 128: [2, 50], 131: [2, 50], 132: [2, 50], 133: [2, 50], 134: [2, 50], 135: [2, 50], 136: [2, 50]},
- {1: [2, 184], 6: [2, 184], 25: [2, 184], 26: [2, 184], 49: [2, 184], 54: [2, 184], 57: [2, 184], 72: [2, 184], 77: [2, 184], 85: [2, 184], 90: [2, 184], 92: [2, 184], 101: [2, 184], 102: 87, 103: [2, 184], 104: [2, 184], 105: [2, 184], 108: 88, 109: [2, 184], 110: 69, 117: [2, 184], 125: [2, 184], 127: [2, 184], 128: [2, 184], 131: [1, 78], 132: [2, 184], 133: [2, 184], 134: [2, 184], 135: [2, 184], 136: [2, 184]},
- {102: 90, 103: [1, 65], 105: [1, 66], 108: 91, 109: [1, 68], 110: 69, 125: [1, 89]},
- {1: [2, 185], 6: [2, 185], 25: [2, 185], 26: [2, 185], 49: [2, 185], 54: [2, 185], 57: [2, 185], 72: [2, 185], 77: [2, 185], 85: [2, 185], 90: [2, 185], 92: [2, 185], 101: [2, 185], 102: 87, 103: [2, 185], 104: [2, 185], 105: [2, 185], 108: 88, 109: [2, 185], 110: 69, 117: [2, 185], 125: [2, 185], 127: [2, 185], 128: [2, 185], 131: [1, 78], 132: [2, 185], 133: [2, 185], 134: [2, 185], 135: [2, 185], 136: [2, 185]},
- {1: [2, 186], 6: [2, 186], 25: [2, 186], 26: [2, 186], 49: [2, 186], 54: [2, 186], 57: [2, 186], 72: [2, 186], 77: [2, 186], 85: [2, 186], 90: [2, 186], 92: [2, 186], 101: [2, 186], 102: 87, 103: [2, 186], 104: [2, 186], 105: [2, 186], 108: 88, 109: [2, 186], 110: 69, 117: [2, 186], 125: [2, 186], 127: [2, 186], 128: [2, 186], 131: [1, 78], 132: [2, 186], 133: [2, 186], 134: [2, 186], 135: [2, 186], 136: [2, 186]},
- {1: [2, 187], 6: [2, 187], 25: [2, 187], 26: [2, 187], 49: [2, 187], 54: [2, 187], 57: [2, 187], 66: [2, 72], 67: [2, 72], 68: [2, 72], 70: [2, 72], 72: [2, 187], 73: [2, 72], 77: [2, 187], 83: [2, 72], 84: [2, 72], 85: [2, 187], 90: [2, 187], 92: [2, 187], 101: [2, 187], 103: [2, 187], 104: [2, 187], 105: [2, 187], 109: [2, 187], 117: [2, 187], 125: [2, 187], 127: [2, 187], 128: [2, 187], 131: [2, 187], 132: [2, 187], 133: [2, 187], 134: [2, 187], 135: [2, 187], 136: [2, 187]},
- {62: 93, 66: [1, 95], 67: [1, 96], 68: [1, 97], 69: 98, 70: [1, 99], 73: [1, 100], 80: 92, 83: [1, 94], 84: [2, 107]},
- {62: 102, 66: [1, 95], 67: [1, 96], 68: [1, 97], 69: 98, 70: [1, 99], 73: [1, 100], 80: 101, 83: [1, 94], 84: [2, 107]},
- {66: [2, 75], 67: [2, 75], 68: [2, 75], 70: [2, 75], 73: [2, 75], 83: [2, 75], 84: [2, 75]},
- {1: [2, 188], 6: [2, 188], 25: [2, 188], 26: [2, 188], 49: [2, 188], 54: [2, 188], 57: [2, 188], 66: [2, 72], 67: [2, 72], 68: [2, 72], 70: [2, 72], 72: [2, 188], 73: [2, 72], 77: [2, 188], 83: [2, 72], 84: [2, 72], 85: [2, 188], 90: [2, 188], 92: [2, 188], 101: [2, 188], 103: [2, 188], 104: [2, 188], 105: [2, 188], 109: [2, 188], 117: [2, 188], 125: [2, 188], 127: [2, 188], 128: [2, 188], 131: [2, 188], 132: [2, 188], 133: [2, 188], 134: [2, 188], 135: [2, 188], 136: [2, 188]},
- {1: [2, 189], 6: [2, 189], 25: [2, 189], 26: [2, 189], 49: [2, 189], 54: [2, 189], 57: [2, 189], 72: [2, 189], 77: [2, 189], 85: [2, 189], 90: [2, 189], 92: [2, 189], 101: [2, 189], 103: [2, 189], 104: [2, 189], 105: [2, 189], 109: [2, 189], 117: [2, 189], 125: [2, 189], 127: [2, 189], 128: [2, 189], 131: [2, 189], 132: [2, 189], 133: [2, 189], 134: [2, 189], 135: [2, 189], 136: [2, 189]},
- {1: [2, 190], 6: [2, 190], 25: [2, 190], 26: [2, 190], 49: [2, 190], 54: [2, 190], 57: [2, 190], 72: [2, 190], 77: [2, 190], 85: [2, 190], 90: [2, 190], 92: [2, 190], 101: [2, 190], 103: [2, 190], 104: [2, 190], 105: [2, 190], 109: [2, 190], 117: [2, 190], 125: [2, 190], 127: [2, 190], 128: [2, 190], 131: [2, 190], 132: [2, 190], 133: [2, 190], 134: [2, 190], 135: [2, 190], 136: [2, 190]},
- {8: 206, 9: 117, 10: 20, 11: 21, 12: [1, 22], 13: 8, 14: 9, 15: 10, 16: 11, 17: 12, 18: 13, 19: 14, 20: 15, 21: 16, 22: 17, 23: 18, 24: 19, 25: [1, 207], 27: 62, 28: [1, 73], 29: 49, 30: [1, 71], 31: [1, 72], 32: 24, 33: [1, 50], 34: [1, 51], 35: [1, 52], 36: [1, 53], 37: [1, 54], 38: [1, 55], 39: 23, 44: 63, 45: [1, 45], 46: [1, 46], 47: [1, 29], 50: 30, 51: [1, 60], 52: [1, 61], 58: 47, 59: 48, 61: 36, 63: 25, 64: 26, 65: 27, 75: [1, 70], 78: [1, 43], 82: [1, 28], 87: [1, 58], 88: [1, 59], 89: [1, 57], 95: [1, 38], 99: [1, 44], 100: [1, 56], 102: 39, 103: [1, 65], 105: [1, 66], 106: 40, 107: [1, 67], 108: 41, 109: [1, 68], 110: 69, 118: [1, 42], 123: 37, 124: [1, 64], 126: [1, 31], 127: [1, 32], 128: [1, 33], 129: [1, 34], 130: [1, 35]},
- {8: 208, 9: 117, 10: 20, 11: 21, 12: [1, 22], 13: 8, 14: 9, 15: 10, 16: 11, 17: 12, 18: 13, 19: 14, 20: 15, 21: 16, 22: 17, 23: 18, 24: 19, 27: 62, 28: [1, 73], 29: 49, 30: [1, 71], 31: [1, 72], 32: 24, 33: [1, 50], 34: [1, 51], 35: [1, 52], 36: [1, 53], 37: [1, 54], 38: [1, 55], 39: 23, 44: 63, 45: [1, 45], 46: [1, 46], 47: [1, 29], 50: 30, 51: [1, 60], 52: [1, 61], 58: 47, 59: 48, 61: 36, 63: 25, 64: 26, 65: 27, 75: [1, 70], 78: [1, 43], 82: [1, 28], 87: [1, 58], 88: [1, 59], 89: [1, 57], 95: [1, 38], 99: [1, 44], 100: [1, 56], 102: 39, 103: [1, 65], 105: [1, 66], 106: 40, 107: [1, 67], 108: 41, 109: [1, 68], 110: 69, 118: [1, 42], 123: 37, 124: [1, 64], 126: [1, 31], 127: [1, 32], 128: [1, 33], 129: [1, 34], 130: [1, 35]},
- {5: 209, 25: [1, 5], 124: [1, 210]},
- {1: [2, 132], 6: [2, 132], 25: [2, 132], 26: [2, 132], 49: [2, 132], 54: [2, 132], 57: [2, 132], 72: [2, 132], 77: [2, 132], 85: [2, 132], 90: [2, 132], 92: [2, 132], 96: 211, 97: [1, 212], 98: [1, 213], 101: [2, 132], 103: [2, 132], 104: [2, 132], 105: [2, 132], 109: [2, 132], 117: [2, 132], 125: [2, 132], 127: [2, 132], 128: [2, 132], 131: [2, 132], 132: [2, 132], 133: [2, 132], 134: [2, 132], 135: [2, 132], 136: [2, 132]},
- {1: [2, 144], 6: [2, 144], 25: [2, 144], 26: [2, 144], 49: [2, 144], 54: [2, 144], 57: [2, 144], 72: [2, 144], 77: [2, 144], 85: [2, 144], 90: [2, 144], 92: [2, 144], 101: [2, 144], 103: [2, 144], 104: [2, 144], 105: [2, 144], 109: [2, 144], 117: [2, 144], 125: [2, 144], 127: [2, 144], 128: [2, 144], 131: [2, 144], 132: [2, 144], 133: [2, 144], 134: [2, 144], 135: [2, 144], 136: [2, 144]},
- {1: [2, 152], 6: [2, 152], 25: [2, 152], 26: [2, 152], 49: [2, 152], 54: [2, 152], 57: [2, 152], 72: [2, 152], 77: [2, 152], 85: [2, 152], 90: [2, 152], 92: [2, 152], 101: [2, 152], 103: [2, 152], 104: [2, 152], 105: [2, 152], 109: [2, 152], 117: [2, 152], 125: [2, 152], 127: [2, 152], 128: [2, 152], 131: [2, 152], 132: [2, 152], 133: [2, 152], 134: [2, 152], 135: [2, 152], 136: [2, 152]},
- {25: [1, 214], 102: 87, 103: [1, 65], 105: [1, 66], 108: 88, 109: [1, 68], 110: 69, 125: [1, 86], 127: [1, 80], 128: [1, 79], 131: [1, 78], 132: [1, 81], 133: [1, 82], 134: [1, 83], 135: [1, 84], 136: [1, 85]},
- {119: 215, 121: 216, 122: [1, 217]},
- {1: [2, 96], 6: [2, 96], 25: [2, 96], 26: [2, 96], 49: [2, 96], 54: [2, 96], 57: [2, 96], 72: [2, 96], 77: [2, 96], 85: [2, 96], 90: [2, 96], 92: [2, 96], 101: [2, 96], 103: [2, 96], 104: [2, 96], 105: [2, 96], 109: [2, 96], 117: [2, 96], 125: [2, 96], 127: [2, 96], 128: [2, 96], 131: [2, 96], 132: [2, 96], 133: [2, 96], 134: [2, 96], 135: [2, 96], 136: [2, 96]},
- {8: 218, 9: 117, 10: 20, 11: 21, 12: [1, 22], 13: 8, 14: 9, 15: 10, 16: 11, 17: 12, 18: 13, 19: 14, 20: 15, 21: 16, 22: 17, 23: 18, 24: 19, 27: 62, 28: [1, 73], 29: 49, 30: [1, 71], 31: [1, 72], 32: 24, 33: [1, 50], 34: [1, 51], 35: [1, 52], 36: [1, 53], 37: [1, 54], 38: [1, 55], 39: 23, 44: 63, 45: [1, 45], 46: [1, 46], 47: [1, 29], 50: 30, 51: [1, 60], 52: [1, 61], 58: 47, 59: 48, 61: 36, 63: 25, 64: 26, 65: 27, 75: [1, 70], 78: [1, 43], 82: [1, 28], 87: [1, 58], 88: [1, 59], 89: [1, 57], 95: [1, 38], 99: [1, 44], 100: [1, 56], 102: 39, 103: [1, 65], 105: [1, 66], 106: 40, 107: [1, 67], 108: 41, 109: [1, 68], 110: 69, 118: [1, 42], 123: 37, 124: [1, 64], 126: [1, 31], 127: [1, 32], 128: [1, 33], 129: [1, 34], 130: [1, 35]},
- {1: [2, 99], 5: 219, 6: [2, 99], 25: [1, 5], 26: [2, 99], 49: [2, 99], 54: [2, 99], 57: [2, 99], 66: [2, 72], 67: [2, 72], 68: [2, 72], 70: [2, 72], 72: [2, 99], 73: [2, 72], 77: [2, 99], 79: [1, 220], 83: [2, 72], 84: [2, 72], 85: [2, 99], 90: [2, 99], 92: [2, 99], 101: [2, 99], 103: [2, 99], 104: [2, 99], 105: [2, 99], 109: [2, 99], 117: [2, 99], 125: [2, 99], 127: [2, 99], 128: [2, 99], 131: [2, 99], 132: [2, 99], 133: [2, 99], 134: [2, 99], 135: [2, 99], 136: [2, 99]},
- {1: [2, 137], 6: [2, 137], 25: [2, 137], 26: [2, 137], 49: [2, 137], 54: [2, 137], 57: [2, 137], 72: [2, 137], 77: [2, 137], 85: [2, 137], 90: [2, 137], 92: [2, 137], 101: [2, 137], 102: 87, 103: [2, 137], 104: [2, 137], 105: [2, 137], 108: 88, 109: [2, 137], 110: 69, 117: [2, 137], 125: [2, 137], 127: [1, 80], 128: [1, 79], 131: [1, 78], 132: [1, 81], 133: [1, 82], 134: [1, 83], 135: [1, 84], 136: [1, 85]},
- {1: [2, 46], 6: [2, 46], 26: [2, 46], 101: [2, 46], 102: 87, 103: [2, 46], 105: [2, 46], 108: 88, 109: [2, 46], 110: 69, 125: [2, 46], 127: [1, 80], 128: [1, 79], 131: [1, 78], 132: [1, 81], 133: [1, 82], 134: [1, 83], 135: [1, 84], 136: [1, 85]},
- {6: [1, 74], 101: [1, 221]},
- {4: 222, 7: 4, 8: 6, 9: 7, 10: 20, 11: 21, 12: [1, 22], 13: 8, 14: 9, 15: 10, 16: 11, 17: 12, 18: 13, 19: 14, 20: 15, 21: 16, 22: 17, 23: 18, 24: 19, 27: 62, 28: [1, 73], 29: 49, 30: [1, 71], 31: [1, 72], 32: 24, 33: [1, 50], 34: [1, 51], 35: [1, 52], 36: [1, 53], 37: [1, 54], 38: [1, 55], 39: 23, 44: 63, 45: [1, 45], 46: [1, 46], 47: [1, 29], 50: 30, 51: [1, 60], 52: [1, 61], 58: 47, 59: 48, 61: 36, 63: 25, 64: 26, 65: 27, 75: [1, 70], 78: [1, 43], 82: [1, 28], 87: [1, 58], 88: [1, 59], 89: [1, 57], 95: [1, 38], 99: [1, 44], 100: [1, 56], 102: 39, 103: [1, 65], 105: [1, 66], 106: 40, 107: [1, 67], 108: 41, 109: [1, 68], 110: 69, 118: [1, 42], 123: 37, 124: [1, 64], 126: [1, 31], 127: [1, 32], 128: [1, 33], 129: [1, 34], 130: [1, 35]},
- {6: [2, 128], 25: [2, 128], 54: [2, 128], 57: [1, 224], 90: [2, 128], 91: 223, 92: [1, 191], 102: 87, 103: [1, 65], 105: [1, 66], 108: 88, 109: [1, 68], 110: 69, 125: [1, 86], 127: [1, 80], 128: [1, 79], 131: [1, 78], 132: [1, 81], 133: [1, 82], 134: [1, 83], 135: [1, 84], 136: [1, 85]},
- {1: [2, 114], 6: [2, 114], 25: [2, 114], 26: [2, 114], 40: [2, 114], 49: [2, 114], 54: [2, 114], 57: [2, 114], 66: [2, 114], 67: [2, 114], 68: [2, 114], 70: [2, 114], 72: [2, 114], 73: [2, 114], 77: [2, 114], 83: [2, 114], 84: [2, 114], 85: [2, 114], 90: [2, 114], 92: [2, 114], 101: [2, 114], 103: [2, 114], 104: [2, 114], 105: [2, 114], 109: [2, 114], 115: [2, 114], 116: [2, 114], 117: [2, 114], 125: [2, 114], 127: [2, 114], 128: [2, 114], 131: [2, 114], 132: [2, 114], 133: [2, 114], 134: [2, 114], 135: [2, 114], 136: [2, 114]},
- {6: [2, 53], 25: [2, 53], 53: 225, 54: [1, 226], 90: [2, 53]},
- {6: [2, 123], 25: [2, 123], 26: [2, 123], 54: [2, 123], 85: [2, 123], 90: [2, 123]},
- {8: 200, 9: 117, 10: 20, 11: 21, 12: [1, 22], 13: 8, 14: 9, 15: 10, 16: 11, 17: 12, 18: 13, 19: 14, 20: 15, 21: 16, 22: 17, 23: 18, 24: 19, 25: [1, 146], 27: 62, 28: [1, 73], 29: 49, 30: [1, 71], 31: [1, 72], 32: 24, 33: [1, 50], 34: [1, 51], 35: [1, 52], 36: [1, 53], 37: [1, 54], 38: [1, 55], 39: 23, 44: 63, 45: [1, 45], 46: [1, 46], 47: [1, 29], 50: 30, 51: [1, 60], 52: [1, 61], 58: 47, 59: 48, 60: 147, 61: 36, 63: 25, 64: 26, 65: 27, 75: [1, 70], 78: [1, 43], 82: [1, 28], 86: 227, 87: [1, 58], 88: [1, 59], 89: [1, 57], 93: 145, 95: [1, 38], 99: [1, 44], 100: [1, 56], 102: 39, 103: [1, 65], 105: [1, 66], 106: 40, 107: [1, 67], 108: 41, 109: [1, 68], 110: 69, 118: [1, 42], 123: 37, 124: [1, 64], 126: [1, 31], 127: [1, 32], 128: [1, 33], 129: [1, 34], 130: [1, 35]},
- {6: [2, 129], 25: [2, 129], 26: [2, 129], 54: [2, 129], 85: [2, 129], 90: [2, 129]},
- {1: [2, 113], 6: [2, 113], 25: [2, 113], 26: [2, 113], 40: [2, 113], 43: [2, 113], 49: [2, 113], 54: [2, 113], 57: [2, 113], 66: [2, 113], 67: [2, 113], 68: [2, 113], 70: [2, 113], 72: [2, 113], 73: [2, 113], 77: [2, 113], 79: [2, 113], 83: [2, 113], 84: [2, 113], 85: [2, 113], 90: [2, 113], 92: [2, 113], 101: [2, 113], 103: [2, 113], 104: [2, 113], 105: [2, 113], 109: [2, 113], 115: [2, 113], 116: [2, 113], 117: [2, 113], 125: [2, 113], 127: [2, 113], 128: [2, 113], 129: [2, 113], 130: [2, 113], 131: [2, 113], 132: [2, 113], 133: [2, 113], 134: [2, 113], 135: [2, 113], 136: [2, 113], 137: [2, 113]},
- {5: 228, 25: [1, 5], 102: 87, 103: [1, 65], 105: [1, 66], 108: 88, 109: [1, 68], 110: 69, 125: [1, 86], 127: [1, 80], 128: [1, 79], 131: [1, 78], 132: [1, 81], 133: [1, 82], 134: [1, 83], 135: [1, 84], 136: [1, 85]},
- {1: [2, 140], 6: [2, 140], 25: [2, 140], 26: [2, 140], 49: [2, 140], 54: [2, 140], 57: [2, 140], 72: [2, 140], 77: [2, 140], 85: [2, 140], 90: [2, 140], 92: [2, 140], 101: [2, 140], 102: 87, 103: [1, 65], 104: [1, 229], 105: [1, 66], 108: 88, 109: [1, 68], 110: 69, 117: [2, 140], 125: [2, 140], 127: [1, 80], 128: [1, 79], 131: [1, 78], 132: [1, 81], 133: [1, 82], 134: [1, 83], 135: [1, 84], 136: [1, 85]},
- {1: [2, 142], 6: [2, 142], 25: [2, 142], 26: [2, 142], 49: [2, 142], 54: [2, 142], 57: [2, 142], 72: [2, 142], 77: [2, 142], 85: [2, 142], 90: [2, 142], 92: [2, 142], 101: [2, 142], 102: 87, 103: [1, 65], 104: [1, 230], 105: [1, 66], 108: 88, 109: [1, 68], 110: 69, 117: [2, 142], 125: [2, 142], 127: [1, 80], 128: [1, 79], 131: [1, 78], 132: [1, 81], 133: [1, 82], 134: [1, 83], 135: [1, 84], 136: [1, 85]},
- {1: [2, 148], 6: [2, 148], 25: [2, 148], 26: [2, 148], 49: [2, 148], 54: [2, 148], 57: [2, 148], 72: [2, 148], 77: [2, 148], 85: [2, 148], 90: [2, 148], 92: [2, 148], 101: [2, 148], 103: [2, 148], 104: [2, 148], 105: [2, 148], 109: [2, 148], 117: [2, 148], 125: [2, 148], 127: [2, 148], 128: [2, 148], 131: [2, 148], 132: [2, 148], 133: [2, 148], 134: [2, 148], 135: [2, 148], 136: [2, 148]},
- {1: [2, 149], 6: [2, 149], 25: [2, 149], 26: [2, 149], 49: [2, 149], 54: [2, 149], 57: [2, 149], 72: [2, 149], 77: [2, 149], 85: [2, 149], 90: [2, 149], 92: [2, 149], 101: [2, 149], 102: 87, 103: [1, 65], 104: [2, 149], 105: [1, 66], 108: 88, 109: [1, 68], 110: 69, 117: [2, 149], 125: [2, 149], 127: [1, 80], 128: [1, 79], 131: [1, 78], 132: [1, 81], 133: [1, 82], 134: [1, 83], 135: [1, 84], 136: [1, 85]},
- {1: [2, 153], 6: [2, 153], 25: [2, 153], 26: [2, 153], 49: [2, 153], 54: [2, 153], 57: [2, 153], 72: [2, 153], 77: [2, 153], 85: [2, 153], 90: [2, 153], 92: [2, 153], 101: [2, 153], 103: [2, 153], 104: [2, 153], 105: [2, 153], 109: [2, 153], 117: [2, 153], 125: [2, 153], 127: [2, 153], 128: [2, 153], 131: [2, 153], 132: [2, 153], 133: [2, 153], 134: [2, 153], 135: [2, 153], 136: [2, 153]},
- {115: [2, 155], 116: [2, 155]},
- {27: 158, 28: [1, 73], 44: 159, 58: 160, 59: 161, 75: [1, 70], 88: [1, 113], 89: [1, 114], 112: 231, 114: 157},
- {54: [1, 232], 115: [2, 161], 116: [2, 161]},
- {54: [2, 157], 115: [2, 157], 116: [2, 157]},
- {54: [2, 158], 115: [2, 158], 116: [2, 158]},
- {54: [2, 159], 115: [2, 159], 116: [2, 159]},
- {54: [2, 160], 115: [2, 160], 116: [2, 160]},
- {1: [2, 154], 6: [2, 154], 25: [2, 154], 26: [2, 154], 49: [2, 154], 54: [2, 154], 57: [2, 154], 72: [2, 154], 77: [2, 154], 85: [2, 154], 90: [2, 154], 92: [2, 154], 101: [2, 154], 103: [2, 154], 104: [2, 154], 105: [2, 154], 109: [2, 154], 117: [2, 154], 125: [2, 154], 127: [2, 154], 128: [2, 154], 131: [2, 154], 132: [2, 154], 133: [2, 154], 134: [2, 154], 135: [2, 154], 136: [2, 154]},
- {8: 233, 9: 117, 10: 20, 11: 21, 12: [1, 22], 13: 8, 14: 9, 15: 10, 16: 11, 17: 12, 18: 13, 19: 14, 20: 15, 21: 16, 22: 17, 23: 18, 24: 19, 27: 62, 28: [1, 73], 29: 49, 30: [1, 71], 31: [1, 72], 32: 24, 33: [1, 50], 34: [1, 51], 35: [1, 52], 36: [1, 53], 37: [1, 54], 38: [1, 55], 39: 23, 44: 63, 45: [1, 45], 46: [1, 46], 47: [1, 29], 50: 30, 51: [1, 60], 52: [1, 61], 58: 47, 59: 48, 61: 36, 63: 25, 64: 26, 65: 27, 75: [1, 70], 78: [1, 43], 82: [1, 28], 87: [1, 58], 88: [1, 59], 89: [1, 57], 95: [1, 38], 99: [1, 44], 100: [1, 56], 102: 39, 103: [1, 65], 105: [1, 66], 106: 40, 107: [1, 67], 108: 41, 109: [1, 68], 110: 69, 118: [1, 42], 123: 37, 124: [1, 64], 126: [1, 31], 127: [1, 32], 128: [1, 33], 129: [1, 34], 130: [1, 35]},
- {8: 234, 9: 117, 10: 20, 11: 21, 12: [1, 22], 13: 8, 14: 9, 15: 10, 16: 11, 17: 12, 18: 13, 19: 14, 20: 15, 21: 16, 22: 17, 23: 18, 24: 19, 27: 62, 28: [1, 73], 29: 49, 30: [1, 71], 31: [1, 72], 32: 24, 33: [1, 50], 34: [1, 51], 35: [1, 52], 36: [1, 53], 37: [1, 54], 38: [1, 55], 39: 23, 44: 63, 45: [1, 45], 46: [1, 46], 47: [1, 29], 50: 30, 51: [1, 60], 52: [1, 61], 58: 47, 59: 48, 61: 36, 63: 25, 64: 26, 65: 27, 75: [1, 70], 78: [1, 43], 82: [1, 28], 87: [1, 58], 88: [1, 59], 89: [1, 57], 95: [1, 38], 99: [1, 44], 100: [1, 56], 102: 39, 103: [1, 65], 105: [1, 66], 106: 40, 107: [1, 67], 108: 41, 109: [1, 68], 110: 69, 118: [1, 42], 123: 37, 124: [1, 64], 126: [1, 31], 127: [1, 32], 128: [1, 33], 129: [1, 34], 130: [1, 35]},
- {6: [2, 53], 25: [2, 53], 53: 235, 54: [1, 236], 77: [2, 53]},
- {6: [2, 91], 25: [2, 91], 26: [2, 91], 54: [2, 91], 77: [2, 91]},
- {6: [2, 39], 25: [2, 39], 26: [2, 39], 43: [1, 237], 54: [2, 39], 77: [2, 39]},
- {6: [2, 42], 25: [2, 42], 26: [2, 42], 54: [2, 42], 77: [2, 42]},
- {6: [2, 43], 25: [2, 43], 26: [2, 43], 43: [2, 43], 54: [2, 43], 77: [2, 43]},
- {6: [2, 44], 25: [2, 44], 26: [2, 44], 43: [2, 44], 54: [2, 44], 77: [2, 44]},
- {6: [2, 45], 25: [2, 45], 26: [2, 45], 43: [2, 45], 54: [2, 45], 77: [2, 45]},
- {1: [2, 5], 6: [2, 5], 26: [2, 5], 101: [2, 5]},
- {1: [2, 25], 6: [2, 25], 25: [2, 25], 26: [2, 25], 49: [2, 25], 54: [2, 25], 57: [2, 25], 72: [2, 25], 77: [2, 25], 85: [2, 25], 90: [2, 25], 92: [2, 25], 97: [2, 25], 98: [2, 25], 101: [2, 25], 103: [2, 25], 104: [2, 25], 105: [2, 25], 109: [2, 25], 117: [2, 25], 120: [2, 25], 122: [2, 25], 125: [2, 25], 127: [2, 25], 128: [2, 25], 131: [2, 25], 132: [2, 25], 133: [2, 25], 134: [2, 25], 135: [2, 25], 136: [2, 25]},
- {1: [2, 192], 6: [2, 192], 25: [2, 192], 26: [2, 192], 49: [2, 192], 54: [2, 192], 57: [2, 192], 72: [2, 192], 77: [2, 192], 85: [2, 192], 90: [2, 192], 92: [2, 192], 101: [2, 192], 102: 87, 103: [2, 192], 104: [2, 192], 105: [2, 192], 108: 88, 109: [2, 192], 110: 69, 117: [2, 192], 125: [2, 192], 127: [2, 192], 128: [2, 192], 131: [1, 78], 132: [1, 81], 133: [2, 192], 134: [2, 192], 135: [2, 192], 136: [2, 192]},
- {1: [2, 193], 6: [2, 193], 25: [2, 193], 26: [2, 193], 49: [2, 193], 54: [2, 193], 57: [2, 193], 72: [2, 193], 77: [2, 193], 85: [2, 193], 90: [2, 193], 92: [2, 193], 101: [2, 193], 102: 87, 103: [2, 193], 104: [2, 193], 105: [2, 193], 108: 88, 109: [2, 193], 110: 69, 117: [2, 193], 125: [2, 193], 127: [2, 193], 128: [2, 193], 131: [1, 78], 132: [1, 81], 133: [2, 193], 134: [2, 193], 135: [2, 193], 136: [2, 193]},
- {1: [2, 194], 6: [2, 194], 25: [2, 194], 26: [2, 194], 49: [2, 194], 54: [2, 194], 57: [2, 194], 72: [2, 194], 77: [2, 194], 85: [2, 194], 90: [2, 194], 92: [2, 194], 101: [2, 194], 102: 87, 103: [2, 194], 104: [2, 194], 105: [2, 194], 108: 88, 109: [2, 194], 110: 69, 117: [2, 194], 125: [2, 194], 127: [2, 194], 128: [2, 194], 131: [1, 78], 132: [2, 194], 133: [2, 194], 134: [2, 194], 135: [2, 194], 136: [2, 194]},
- {1: [2, 195], 6: [2, 195], 25: [2, 195], 26: [2, 195], 49: [2, 195], 54: [2, 195], 57: [2, 195], 72: [2, 195], 77: [2, 195], 85: [2, 195], 90: [2, 195], 92: [2, 195], 101: [2, 195], 102: 87, 103: [2, 195], 104: [2, 195], 105: [2, 195], 108: 88, 109: [2, 195], 110: 69, 117: [2, 195], 125: [2, 195], 127: [1, 80], 128: [1, 79], 131: [1, 78], 132: [1, 81], 133: [2, 195], 134: [2, 195], 135: [2, 195], 136: [2, 195]},
- {1: [2, 196], 6: [2, 196], 25: [2, 196], 26: [2, 196], 49: [2, 196], 54: [2, 196], 57: [2, 196], 72: [2, 196], 77: [2, 196], 85: [2, 196], 90: [2, 196], 92: [2, 196], 101: [2, 196], 102: 87, 103: [2, 196], 104: [2, 196], 105: [2, 196], 108: 88, 109: [2, 196], 110: 69, 117: [2, 196], 125: [2, 196], 127: [1, 80], 128: [1, 79], 131: [1, 78], 132: [1, 81], 133: [1, 82], 134: [2, 196], 135: [2, 196], 136: [1, 85]},
- {1: [2, 197], 6: [2, 197], 25: [2, 197], 26: [2, 197], 49: [2, 197], 54: [2, 197], 57: [2, 197], 72: [2, 197], 77: [2, 197], 85: [2, 197], 90: [2, 197], 92: [2, 197], 101: [2, 197], 102: 87, 103: [2, 197], 104: [2, 197], 105: [2, 197], 108: 88, 109: [2, 197], 110: 69, 117: [2, 197], 125: [2, 197], 127: [1, 80], 128: [1, 79], 131: [1, 78], 132: [1, 81], 133: [1, 82], 134: [1, 83], 135: [2, 197], 136: [1, 85]},
- {1: [2, 198], 6: [2, 198], 25: [2, 198], 26: [2, 198], 49: [2, 198], 54: [2, 198], 57: [2, 198], 72: [2, 198], 77: [2, 198], 85: [2, 198], 90: [2, 198], 92: [2, 198], 101: [2, 198], 102: 87, 103: [2, 198], 104: [2, 198], 105: [2, 198], 108: 88, 109: [2, 198], 110: 69, 117: [2, 198], 125: [2, 198], 127: [1, 80], 128: [1, 79], 131: [1, 78], 132: [1, 81], 133: [1, 82], 134: [2, 198], 135: [2, 198], 136: [2, 198]},
- {1: [2, 183], 6: [2, 183], 25: [2, 183], 26: [2, 183], 49: [2, 183], 54: [2, 183], 57: [2, 183], 72: [2, 183], 77: [2, 183], 85: [2, 183], 90: [2, 183], 92: [2, 183], 101: [2, 183], 102: 87, 103: [1, 65], 104: [2, 183], 105: [1, 66], 108: 88, 109: [1, 68], 110: 69, 117: [2, 183], 125: [1, 86], 127: [1, 80], 128: [1, 79], 131: [1, 78], 132: [1, 81], 133: [1, 82], 134: [1, 83], 135: [1, 84], 136: [1, 85]},
- {1: [2, 182], 6: [2, 182], 25: [2, 182], 26: [2, 182], 49: [2, 182], 54: [2, 182], 57: [2, 182], 72: [2, 182], 77: [2, 182], 85: [2, 182], 90: [2, 182], 92: [2, 182], 101: [2, 182], 102: 87, 103: [1, 65], 104: [2, 182], 105: [1, 66], 108: 88, 109: [1, 68], 110: 69, 117: [2, 182], 125: [1, 86], 127: [1, 80], 128: [1, 79], 131: [1, 78], 132: [1, 81], 133: [1, 82], 134: [1, 83], 135: [1, 84], 136: [1, 85]},
- {1: [2, 103], 6: [2, 103], 25: [2, 103], 26: [2, 103], 49: [2, 103], 54: [2, 103], 57: [2, 103], 66: [2, 103], 67: [2, 103], 68: [2, 103], 70: [2, 103], 72: [2, 103], 73: [2, 103], 77: [2, 103], 83: [2, 103], 84: [2, 103], 85: [2, 103], 90: [2, 103], 92: [2, 103], 101: [2, 103], 103: [2, 103], 104: [2, 103], 105: [2, 103], 109: [2, 103], 117: [2, 103], 125: [2, 103], 127: [2, 103], 128: [2, 103], 131: [2, 103], 132: [2, 103], 133: [2, 103], 134: [2, 103], 135: [2, 103], 136: [2, 103]},
- {1: [2, 80], 6: [2, 80], 25: [2, 80], 26: [2, 80], 40: [2, 80], 49: [2, 80], 54: [2, 80], 57: [2, 80], 66: [2, 80], 67: [2, 80], 68: [2, 80], 70: [2, 80], 72: [2, 80], 73: [2, 80], 77: [2, 80], 79: [2, 80], 83: [2, 80], 84: [2, 80], 85: [2, 80], 90: [2, 80], 92: [2, 80], 101: [2, 80], 103: [2, 80], 104: [2, 80], 105: [2, 80], 109: [2, 80], 117: [2, 80], 125: [2, 80], 127: [2, 80], 128: [2, 80], 129: [2, 80], 130: [2, 80], 131: [2, 80], 132: [2, 80], 133: [2, 80], 134: [2, 80], 135: [2, 80], 136: [2, 80], 137: [2, 80]},
- {1: [2, 81], 6: [2, 81], 25: [2, 81], 26: [2, 81], 40: [2, 81], 49: [2, 81], 54: [2, 81], 57: [2, 81], 66: [2, 81], 67: [2, 81], 68: [2, 81], 70: [2, 81], 72: [2, 81], 73: [2, 81], 77: [2, 81], 79: [2, 81], 83: [2, 81], 84: [2, 81], 85: [2, 81], 90: [2, 81], 92: [2, 81], 101: [2, 81], 103: [2, 81], 104: [2, 81], 105: [2, 81], 109: [2, 81], 117: [2, 81], 125: [2, 81], 127: [2, 81], 128: [2, 81], 129: [2, 81], 130: [2, 81], 131: [2, 81], 132: [2, 81], 133: [2, 81], 134: [2, 81], 135: [2, 81], 136: [2, 81], 137: [2, 81]},
- {1: [2, 82], 6: [2, 82], 25: [2, 82], 26: [2, 82], 40: [2, 82], 49: [2, 82], 54: [2, 82], 57: [2, 82], 66: [2, 82], 67: [2, 82], 68: [2, 82], 70: [2, 82], 72: [2, 82], 73: [2, 82], 77: [2, 82], 79: [2, 82], 83: [2, 82], 84: [2, 82], 85: [2, 82], 90: [2, 82], 92: [2, 82], 101: [2, 82], 103: [2, 82], 104: [2, 82], 105: [2, 82], 109: [2, 82], 117: [2, 82], 125: [2, 82], 127: [2, 82], 128: [2, 82], 129: [2, 82], 130: [2, 82], 131: [2, 82], 132: [2, 82], 133: [2, 82], 134: [2, 82], 135: [2, 82], 136: [2, 82], 137: [2, 82]},
- {72: [1, 238]},
- {57: [1, 192], 72: [2, 87], 91: 239, 92: [1, 191], 102: 87, 103: [1, 65], 105: [1, 66], 108: 88, 109: [1, 68], 110: 69, 125: [1, 86], 127: [1, 80], 128: [1, 79], 131: [1, 78], 132: [1, 81], 133: [1, 82], 134: [1, 83], 135: [1, 84], 136: [1, 85]},
- {72: [2, 88]},
- {8: 240, 9: 117, 10: 20, 11: 21, 12: [1, 22], 13: 8, 14: 9, 15: 10, 16: 11, 17: 12, 18: 13, 19: 14, 20: 15, 21: 16, 22: 17, 23: 18, 24: 19, 27: 62, 28: [1, 73], 29: 49, 30: [1, 71], 31: [1, 72], 32: 24, 33: [1, 50], 34: [1, 51], 35: [1, 52], 36: [1, 53], 37: [1, 54], 38: [1, 55], 39: 23, 44: 63, 45: [1, 45], 46: [1, 46], 47: [1, 29], 50: 30, 51: [1, 60], 52: [1, 61], 58: 47, 59: 48, 61: 36, 63: 25, 64: 26, 65: 27, 72: [2, 122], 75: [1, 70], 78: [1, 43], 82: [1, 28], 87: [1, 58], 88: [1, 59], 89: [1, 57], 95: [1, 38], 99: [1, 44], 100: [1, 56], 102: 39, 103: [1, 65], 105: [1, 66], 106: 40, 107: [1, 67], 108: 41, 109: [1, 68], 110: 69, 118: [1, 42], 123: 37, 124: [1, 64], 126: [1, 31], 127: [1, 32], 128: [1, 33], 129: [1, 34], 130: [1, 35]},
- {12: [2, 116], 28: [2, 116], 30: [2, 116], 31: [2, 116], 33: [2, 116], 34: [2, 116], 35: [2, 116], 36: [2, 116], 37: [2, 116], 38: [2, 116], 45: [2, 116], 46: [2, 116], 47: [2, 116], 51: [2, 116], 52: [2, 116], 72: [2, 116], 75: [2, 116], 78: [2, 116], 82: [2, 116], 87: [2, 116], 88: [2, 116], 89: [2, 116], 95: [2, 116], 99: [2, 116], 100: [2, 116], 103: [2, 116], 105: [2, 116], 107: [2, 116], 109: [2, 116], 118: [2, 116], 124: [2, 116], 126: [2, 116], 127: [2, 116], 128: [2, 116], 129: [2, 116], 130: [2, 116]},
- {12: [2, 117], 28: [2, 117], 30: [2, 117], 31: [2, 117], 33: [2, 117], 34: [2, 117], 35: [2, 117], 36: [2, 117], 37: [2, 117], 38: [2, 117], 45: [2, 117], 46: [2, 117], 47: [2, 117], 51: [2, 117], 52: [2, 117], 72: [2, 117], 75: [2, 117], 78: [2, 117], 82: [2, 117], 87: [2, 117], 88: [2, 117], 89: [2, 117], 95: [2, 117], 99: [2, 117], 100: [2, 117], 103: [2, 117], 105: [2, 117], 107: [2, 117], 109: [2, 117], 118: [2, 117], 124: [2, 117], 126: [2, 117], 127: [2, 117], 128: [2, 117], 129: [2, 117], 130: [2, 117]},
- {1: [2, 86], 6: [2, 86], 25: [2, 86], 26: [2, 86], 40: [2, 86], 49: [2, 86], 54: [2, 86], 57: [2, 86], 66: [2, 86], 67: [2, 86], 68: [2, 86], 70: [2, 86], 72: [2, 86], 73: [2, 86], 77: [2, 86], 79: [2, 86], 83: [2, 86], 84: [2, 86], 85: [2, 86], 90: [2, 86], 92: [2, 86], 101: [2, 86], 103: [2, 86], 104: [2, 86], 105: [2, 86], 109: [2, 86], 117: [2, 86], 125: [2, 86], 127: [2, 86], 128: [2, 86], 129: [2, 86], 130: [2, 86], 131: [2, 86], 132: [2, 86], 133: [2, 86], 134: [2, 86], 135: [2, 86], 136: [2, 86], 137: [2, 86]},
- {1: [2, 104], 6: [2, 104], 25: [2, 104], 26: [2, 104], 49: [2, 104], 54: [2, 104], 57: [2, 104], 66: [2, 104], 67: [2, 104], 68: [2, 104], 70: [2, 104], 72: [2, 104], 73: [2, 104], 77: [2, 104], 83: [2, 104], 84: [2, 104], 85: [2, 104], 90: [2, 104], 92: [2, 104], 101: [2, 104], 103: [2, 104], 104: [2, 104], 105: [2, 104], 109: [2, 104], 117: [2, 104], 125: [2, 104], 127: [2, 104], 128: [2, 104], 131: [2, 104], 132: [2, 104], 133: [2, 104], 134: [2, 104], 135: [2, 104], 136: [2, 104]},
- {1: [2, 36], 6: [2, 36], 25: [2, 36], 26: [2, 36], 49: [2, 36], 54: [2, 36], 57: [2, 36], 72: [2, 36], 77: [2, 36], 85: [2, 36], 90: [2, 36], 92: [2, 36], 101: [2, 36], 102: 87, 103: [2, 36], 104: [2, 36], 105: [2, 36], 108: 88, 109: [2, 36], 110: 69, 117: [2, 36], 125: [2, 36], 127: [1, 80], 128: [1, 79], 131: [1, 78], 132: [1, 81], 133: [1, 82], 134: [1, 83], 135: [1, 84], 136: [1, 85]},
- {8: 241, 9: 117, 10: 20, 11: 21, 12: [1, 22], 13: 8, 14: 9, 15: 10, 16: 11, 17: 12, 18: 13, 19: 14, 20: 15, 21: 16, 22: 17, 23: 18, 24: 19, 27: 62, 28: [1, 73], 29: 49, 30: [1, 71], 31: [1, 72], 32: 24, 33: [1, 50], 34: [1, 51], 35: [1, 52], 36: [1, 53], 37: [1, 54], 38: [1, 55], 39: 23, 44: 63, 45: [1, 45], 46: [1, 46], 47: [1, 29], 50: 30, 51: [1, 60], 52: [1, 61], 58: 47, 59: 48, 61: 36, 63: 25, 64: 26, 65: 27, 75: [1, 70], 78: [1, 43], 82: [1, 28], 87: [1, 58], 88: [1, 59], 89: [1, 57], 95: [1, 38], 99: [1, 44], 100: [1, 56], 102: 39, 103: [1, 65], 105: [1, 66], 106: 40, 107: [1, 67], 108: 41, 109: [1, 68], 110: 69, 118: [1, 42], 123: 37, 124: [1, 64], 126: [1, 31], 127: [1, 32], 128: [1, 33], 129: [1, 34], 130: [1, 35]},
- {8: 242, 9: 117, 10: 20, 11: 21, 12: [1, 22], 13: 8, 14: 9, 15: 10, 16: 11, 17: 12, 18: 13, 19: 14, 20: 15, 21: 16, 22: 17, 23: 18, 24: 19, 27: 62, 28: [1, 73], 29: 49, 30: [1, 71], 31: [1, 72], 32: 24, 33: [1, 50], 34: [1, 51], 35: [1, 52], 36: [1, 53], 37: [1, 54], 38: [1, 55], 39: 23, 44: 63, 45: [1, 45], 46: [1, 46], 47: [1, 29], 50: 30, 51: [1, 60], 52: [1, 61], 58: 47, 59: 48, 61: 36, 63: 25, 64: 26, 65: 27, 75: [1, 70], 78: [1, 43], 82: [1, 28], 87: [1, 58], 88: [1, 59], 89: [1, 57], 95: [1, 38], 99: [1, 44], 100: [1, 56], 102: 39, 103: [1, 65], 105: [1, 66], 106: 40, 107: [1, 67], 108: 41, 109: [1, 68], 110: 69, 118: [1, 42], 123: 37, 124: [1, 64], 126: [1, 31], 127: [1, 32], 128: [1, 33], 129: [1, 34], 130: [1, 35]},
- {1: [2, 109], 6: [2, 109], 25: [2, 109], 26: [2, 109], 49: [2, 109], 54: [2, 109], 57: [2, 109], 66: [2, 109], 67: [2, 109], 68: [2, 109], 70: [2, 109], 72: [2, 109], 73: [2, 109], 77: [2, 109], 83: [2, 109], 84: [2, 109], 85: [2, 109], 90: [2, 109], 92: [2, 109], 101: [2, 109], 103: [2, 109], 104: [2, 109], 105: [2, 109], 109: [2, 109], 117: [2, 109], 125: [2, 109], 127: [2, 109], 128: [2, 109], 131: [2, 109], 132: [2, 109], 133: [2, 109], 134: [2, 109], 135: [2, 109], 136: [2, 109]},
- {6: [2, 53], 25: [2, 53], 53: 243, 54: [1, 226], 85: [2, 53]},
- {6: [2, 128], 25: [2, 128], 26: [2, 128], 54: [2, 128], 57: [1, 244], 85: [2, 128], 90: [2, 128], 102: 87, 103: [1, 65], 105: [1, 66], 108: 88, 109: [1, 68], 110: 69, 125: [1, 86], 127: [1, 80], 128: [1, 79], 131: [1, 78], 132: [1, 81], 133: [1, 82], 134: [1, 83], 135: [1, 84], 136: [1, 85]},
- {50: 245, 51: [1, 60], 52: [1, 61]},
- {6: [2, 54], 25: [2, 54], 26: [2, 54], 27: 109, 28: [1, 73], 44: 110, 55: 246, 56: 108, 58: 111, 59: 112, 75: [1, 70], 88: [1, 113], 89: [1, 114]},
- {6: [1, 247], 25: [1, 248]},
- {6: [2, 61], 25: [2, 61], 26: [2, 61], 49: [2, 61], 54: [2, 61]},
- {8: 249, 9: 117, 10: 20, 11: 21, 12: [1, 22], 13: 8, 14: 9, 15: 10, 16: 11, 17: 12, 18: 13, 19: 14, 20: 15, 21: 16, 22: 17, 23: 18, 24: 19, 27: 62, 28: [1, 73], 29: 49, 30: [1, 71], 31: [1, 72], 32: 24, 33: [1, 50], 34: [1, 51], 35: [1, 52], 36: [1, 53], 37: [1, 54], 38: [1, 55], 39: 23, 44: 63, 45: [1, 45], 46: [1, 46], 47: [1, 29], 50: 30, 51: [1, 60], 52: [1, 61], 58: 47, 59: 48, 61: 36, 63: 25, 64: 26, 65: 27, 75: [1, 70], 78: [1, 43], 82: [1, 28], 87: [1, 58], 88: [1, 59], 89: [1, 57], 95: [1, 38], 99: [1, 44], 100: [1, 56], 102: 39, 103: [1, 65], 105: [1, 66], 106: 40, 107: [1, 67], 108: 41, 109: [1, 68], 110: 69, 118: [1, 42], 123: 37, 124: [1, 64], 126: [1, 31], 127: [1, 32], 128: [1, 33], 129: [1, 34], 130: [1, 35]},
- {1: [2, 199], 6: [2, 199], 25: [2, 199], 26: [2, 199], 49: [2, 199], 54: [2, 199], 57: [2, 199], 72: [2, 199], 77: [2, 199], 85: [2, 199], 90: [2, 199], 92: [2, 199], 101: [2, 199], 102: 87, 103: [2, 199], 104: [2, 199], 105: [2, 199], 108: 88, 109: [2, 199], 110: 69, 117: [2, 199], 125: [2, 199], 127: [1, 80], 128: [1, 79], 131: [1, 78], 132: [1, 81], 133: [1, 82], 134: [1, 83], 135: [1, 84], 136: [1, 85]},
- {8: 250, 9: 117, 10: 20, 11: 21, 12: [1, 22], 13: 8, 14: 9, 15: 10, 16: 11, 17: 12, 18: 13, 19: 14, 20: 15, 21: 16, 22: 17, 23: 18, 24: 19, 27: 62, 28: [1, 73], 29: 49, 30: [1, 71], 31: [1, 72], 32: 24, 33: [1, 50], 34: [1, 51], 35: [1, 52], 36: [1, 53], 37: [1, 54], 38: [1, 55], 39: 23, 44: 63, 45: [1, 45], 46: [1, 46], 47: [1, 29], 50: 30, 51: [1, 60], 52: [1, 61], 58: 47, 59: 48, 61: 36, 63: 25, 64: 26, 65: 27, 75: [1, 70], 78: [1, 43], 82: [1, 28], 87: [1, 58], 88: [1, 59], 89: [1, 57], 95: [1, 38], 99: [1, 44], 100: [1, 56], 102: 39, 103: [1, 65], 105: [1, 66], 106: 40, 107: [1, 67], 108: 41, 109: [1, 68], 110: 69, 118: [1, 42], 123: 37, 124: [1, 64], 126: [1, 31], 127: [1, 32], 128: [1, 33], 129: [1, 34], 130: [1, 35]},
- {1: [2, 201], 6: [2, 201], 25: [2, 201], 26: [2, 201], 49: [2, 201], 54: [2, 201], 57: [2, 201], 72: [2, 201], 77: [2, 201], 85: [2, 201], 90: [2, 201], 92: [2, 201], 101: [2, 201], 102: 87, 103: [2, 201], 104: [2, 201], 105: [2, 201], 108: 88, 109: [2, 201], 110: 69, 117: [2, 201], 125: [2, 201], 127: [1, 80], 128: [1, 79], 131: [1, 78], 132: [1, 81], 133: [1, 82], 134: [1, 83], 135: [1, 84], 136: [1, 85]},
- {1: [2, 181], 6: [2, 181], 25: [2, 181], 26: [2, 181], 49: [2, 181], 54: [2, 181], 57: [2, 181], 72: [2, 181], 77: [2, 181], 85: [2, 181], 90: [2, 181], 92: [2, 181], 101: [2, 181], 103: [2, 181], 104: [2, 181], 105: [2, 181], 109: [2, 181], 117: [2, 181], 125: [2, 181], 127: [2, 181], 128: [2, 181], 131: [2, 181], 132: [2, 181], 133: [2, 181], 134: [2, 181], 135: [2, 181], 136: [2, 181]},
- {8: 251, 9: 117, 10: 20, 11: 21, 12: [1, 22], 13: 8, 14: 9, 15: 10, 16: 11, 17: 12, 18: 13, 19: 14, 20: 15, 21: 16, 22: 17, 23: 18, 24: 19, 27: 62, 28: [1, 73], 29: 49, 30: [1, 71], 31: [1, 72], 32: 24, 33: [1, 50], 34: [1, 51], 35: [1, 52], 36: [1, 53], 37: [1, 54], 38: [1, 55], 39: 23, 44: 63, 45: [1, 45], 46: [1, 46], 47: [1, 29], 50: 30, 51: [1, 60], 52: [1, 61], 58: 47, 59: 48, 61: 36, 63: 25, 64: 26, 65: 27, 75: [1, 70], 78: [1, 43], 82: [1, 28], 87: [1, 58], 88: [1, 59], 89: [1, 57], 95: [1, 38], 99: [1, 44], 100: [1, 56], 102: 39, 103: [1, 65], 105: [1, 66], 106: 40, 107: [1, 67], 108: 41, 109: [1, 68], 110: 69, 118: [1, 42], 123: 37, 124: [1, 64], 126: [1, 31], 127: [1, 32], 128: [1, 33], 129: [1, 34], 130: [1, 35]},
- {1: [2, 133], 6: [2, 133], 25: [2, 133], 26: [2, 133], 49: [2, 133], 54: [2, 133], 57: [2, 133], 72: [2, 133], 77: [2, 133], 85: [2, 133], 90: [2, 133], 92: [2, 133], 97: [1, 252], 101: [2, 133], 103: [2, 133], 104: [2, 133], 105: [2, 133], 109: [2, 133], 117: [2, 133], 125: [2, 133], 127: [2, 133], 128: [2, 133], 131: [2, 133], 132: [2, 133], 133: [2, 133], 134: [2, 133], 135: [2, 133], 136: [2, 133]},
- {5: 253, 25: [1, 5]},
- {27: 254, 28: [1, 73]},
- {119: 255, 121: 216, 122: [1, 217]},
- {26: [1, 256], 120: [1, 257], 121: 258, 122: [1, 217]},
- {26: [2, 174], 120: [2, 174], 122: [2, 174]},
- {8: 260, 9: 117, 10: 20, 11: 21, 12: [1, 22], 13: 8, 14: 9, 15: 10, 16: 11, 17: 12, 18: 13, 19: 14, 20: 15, 21: 16, 22: 17, 23: 18, 24: 19, 27: 62, 28: [1, 73], 29: 49, 30: [1, 71], 31: [1, 72], 32: 24, 33: [1, 50], 34: [1, 51], 35: [1, 52], 36: [1, 53], 37: [1, 54], 38: [1, 55], 39: 23, 44: 63, 45: [1, 45], 46: [1, 46], 47: [1, 29], 50: 30, 51: [1, 60], 52: [1, 61], 58: 47, 59: 48, 61: 36, 63: 25, 64: 26, 65: 27, 75: [1, 70], 78: [1, 43], 82: [1, 28], 87: [1, 58], 88: [1, 59], 89: [1, 57], 94: 259, 95: [1, 38], 99: [1, 44], 100: [1, 56], 102: 39, 103: [1, 65], 105: [1, 66], 106: 40, 107: [1, 67], 108: 41, 109: [1, 68], 110: 69, 118: [1, 42], 123: 37, 124: [1, 64], 126: [1, 31], 127: [1, 32], 128: [1, 33], 129: [1, 34], 130: [1, 35]},
- {1: [2, 97], 5: 261, 6: [2, 97], 25: [1, 5], 26: [2, 97], 49: [2, 97], 54: [2, 97], 57: [2, 97], 72: [2, 97], 77: [2, 97], 85: [2, 97], 90: [2, 97], 92: [2, 97], 101: [2, 97], 102: 87, 103: [1, 65], 104: [2, 97], 105: [1, 66], 108: 88, 109: [1, 68], 110: 69, 117: [2, 97], 125: [2, 97], 127: [1, 80], 128: [1, 79], 131: [1, 78], 132: [1, 81], 133: [1, 82], 134: [1, 83], 135: [1, 84], 136: [1, 85]},
- {1: [2, 100], 6: [2, 100], 25: [2, 100], 26: [2, 100], 49: [2, 100], 54: [2, 100], 57: [2, 100], 72: [2, 100], 77: [2, 100], 85: [2, 100], 90: [2, 100], 92: [2, 100], 101: [2, 100], 103: [2, 100], 104: [2, 100], 105: [2, 100], 109: [2, 100], 117: [2, 100], 125: [2, 100], 127: [2, 100], 128: [2, 100], 131: [2, 100], 132: [2, 100], 133: [2, 100], 134: [2, 100], 135: [2, 100], 136: [2, 100]},
- {8: 262, 9: 117, 10: 20, 11: 21, 12: [1, 22], 13: 8, 14: 9, 15: 10, 16: 11, 17: 12, 18: 13, 19: 14, 20: 15, 21: 16, 22: 17, 23: 18, 24: 19, 27: 62, 28: [1, 73], 29: 49, 30: [1, 71], 31: [1, 72], 32: 24, 33: [1, 50], 34: [1, 51], 35: [1, 52], 36: [1, 53], 37: [1, 54], 38: [1, 55], 39: 23, 44: 63, 45: [1, 45], 46: [1, 46], 47: [1, 29], 50: 30, 51: [1, 60], 52: [1, 61], 58: 47, 59: 48, 61: 36, 63: 25, 64: 26, 65: 27, 75: [1, 70], 78: [1, 43], 82: [1, 28], 87: [1, 58], 88: [1, 59], 89: [1, 57], 95: [1, 38], 99: [1, 44], 100: [1, 56], 102: 39, 103: [1, 65], 105: [1, 66], 106: 40, 107: [1, 67], 108: 41, 109: [1, 68], 110: 69, 118: [1, 42], 123: 37, 124: [1, 64], 126: [1, 31], 127: [1, 32], 128: [1, 33], 129: [1, 34], 130: [1, 35]},
- {1: [2, 138], 6: [2, 138], 25: [2, 138], 26: [2, 138], 49: [2, 138], 54: [2, 138], 57: [2, 138], 66: [2, 138], 67: [2, 138], 68: [2, 138], 70: [2, 138], 72: [2, 138], 73: [2, 138], 77: [2, 138], 83: [2, 138], 84: [2, 138], 85: [2, 138], 90: [2, 138], 92: [2, 138], 101: [2, 138], 103: [2, 138], 104: [2, 138], 105: [2, 138], 109: [2, 138], 117: [2, 138], 125: [2, 138], 127: [2, 138], 128: [2, 138], 131: [2, 138], 132: [2, 138], 133: [2, 138], 134: [2, 138], 135: [2, 138], 136: [2, 138]},
- {6: [1, 74], 26: [1, 263]},
- {8: 264, 9: 117, 10: 20, 11: 21, 12: [1, 22], 13: 8, 14: 9, 15: 10, 16: 11, 17: 12, 18: 13, 19: 14, 20: 15, 21: 16, 22: 17, 23: 18, 24: 19, 27: 62, 28: [1, 73], 29: 49, 30: [1, 71], 31: [1, 72], 32: 24, 33: [1, 50], 34: [1, 51], 35: [1, 52], 36: [1, 53], 37: [1, 54], 38: [1, 55], 39: 23, 44: 63, 45: [1, 45], 46: [1, 46], 47: [1, 29], 50: 30, 51: [1, 60], 52: [1, 61], 58: 47, 59: 48, 61: 36, 63: 25, 64: 26, 65: 27, 75: [1, 70], 78: [1, 43], 82: [1, 28], 87: [1, 58], 88: [1, 59], 89: [1, 57], 95: [1, 38], 99: [1, 44], 100: [1, 56], 102: 39, 103: [1, 65], 105: [1, 66], 106: 40, 107: [1, 67], 108: 41, 109: [1, 68], 110: 69, 118: [1, 42], 123: 37, 124: [1, 64], 126: [1, 31], 127: [1, 32], 128: [1, 33], 129: [1, 34], 130: [1, 35]},
- {6: [2, 67], 12: [2, 117], 25: [2, 67], 28: [2, 117], 30: [2, 117], 31: [2, 117], 33: [2, 117], 34: [2, 117], 35: [2, 117], 36: [2, 117], 37: [2, 117], 38: [2, 117], 45: [2, 117], 46: [2, 117], 47: [2, 117], 51: [2, 117], 52: [2, 117], 54: [2, 67], 75: [2, 117], 78: [2, 117], 82: [2, 117], 87: [2, 117], 88: [2, 117], 89: [2, 117], 90: [2, 67], 95: [2, 117], 99: [2, 117], 100: [2, 117], 103: [2, 117], 105: [2, 117], 107: [2, 117], 109: [2, 117], 118: [2, 117], 124: [2, 117], 126: [2, 117], 127: [2, 117], 128: [2, 117], 129: [2, 117], 130: [2, 117]},
- {6: [1, 266], 25: [1, 267], 90: [1, 265]},
- {6: [2, 54], 8: 200, 9: 117, 10: 20, 11: 21, 12: [1, 22], 13: 8, 14: 9, 15: 10, 16: 11, 17: 12, 18: 13, 19: 14, 20: 15, 21: 16, 22: 17, 23: 18, 24: 19, 25: [2, 54], 26: [2, 54], 27: 62, 28: [1, 73], 29: 49, 30: [1, 71], 31: [1, 72], 32: 24, 33: [1, 50], 34: [1, 51], 35: [1, 52], 36: [1, 53], 37: [1, 54], 38: [1, 55], 39: 23, 44: 63, 45: [1, 45], 46: [1, 46], 47: [1, 29], 50: 30, 51: [1, 60], 52: [1, 61], 58: 47, 59: 48, 60: 147, 61: 36, 63: 25, 64: 26, 65: 27, 75: [1, 70], 78: [1, 43], 82: [1, 28], 85: [2, 54], 87: [1, 58], 88: [1, 59], 89: [1, 57], 90: [2, 54], 93: 268, 95: [1, 38], 99: [1, 44], 100: [1, 56], 102: 39, 103: [1, 65], 105: [1, 66], 106: 40, 107: [1, 67], 108: 41, 109: [1, 68], 110: 69, 118: [1, 42], 123: 37, 124: [1, 64], 126: [1, 31], 127: [1, 32], 128: [1, 33], 129: [1, 34], 130: [1, 35]},
- {6: [2, 53], 25: [2, 53], 26: [2, 53], 53: 269, 54: [1, 226]},
- {1: [2, 178], 6: [2, 178], 25: [2, 178], 26: [2, 178], 49: [2, 178], 54: [2, 178], 57: [2, 178], 72: [2, 178], 77: [2, 178], 85: [2, 178], 90: [2, 178], 92: [2, 178], 101: [2, 178], 103: [2, 178], 104: [2, 178], 105: [2, 178], 109: [2, 178], 117: [2, 178], 120: [2, 178], 125: [2, 178], 127: [2, 178], 128: [2, 178], 131: [2, 178], 132: [2, 178], 133: [2, 178], 134: [2, 178], 135: [2, 178], 136: [2, 178]},
- {8: 270, 9: 117, 10: 20, 11: 21, 12: [1, 22], 13: 8, 14: 9, 15: 10, 16: 11, 17: 12, 18: 13, 19: 14, 20: 15, 21: 16, 22: 17, 23: 18, 24: 19, 27: 62, 28: [1, 73], 29: 49, 30: [1, 71], 31: [1, 72], 32: 24, 33: [1, 50], 34: [1, 51], 35: [1, 52], 36: [1, 53], 37: [1, 54], 38: [1, 55], 39: 23, 44: 63, 45: [1, 45], 46: [1, 46], 47: [1, 29], 50: 30, 51: [1, 60], 52: [1, 61], 58: 47, 59: 48, 61: 36, 63: 25, 64: 26, 65: 27, 75: [1, 70], 78: [1, 43], 82: [1, 28], 87: [1, 58], 88: [1, 59], 89: [1, 57], 95: [1, 38], 99: [1, 44], 100: [1, 56], 102: 39, 103: [1, 65], 105: [1, 66], 106: 40, 107: [1, 67], 108: 41, 109: [1, 68], 110: 69, 118: [1, 42], 123: 37, 124: [1, 64], 126: [1, 31], 127: [1, 32], 128: [1, 33], 129: [1, 34], 130: [1, 35]},
- {8: 271, 9: 117, 10: 20, 11: 21, 12: [1, 22], 13: 8, 14: 9, 15: 10, 16: 11, 17: 12, 18: 13, 19: 14, 20: 15, 21: 16, 22: 17, 23: 18, 24: 19, 27: 62, 28: [1, 73], 29: 49, 30: [1, 71], 31: [1, 72], 32: 24, 33: [1, 50], 34: [1, 51], 35: [1, 52], 36: [1, 53], 37: [1, 54], 38: [1, 55], 39: 23, 44: 63, 45: [1, 45], 46: [1, 46], 47: [1, 29], 50: 30, 51: [1, 60], 52: [1, 61], 58: 47, 59: 48, 61: 36, 63: 25, 64: 26, 65: 27, 75: [1, 70], 78: [1, 43], 82: [1, 28], 87: [1, 58], 88: [1, 59], 89: [1, 57], 95: [1, 38], 99: [1, 44], 100: [1, 56], 102: 39, 103: [1, 65], 105: [1, 66], 106: 40, 107: [1, 67], 108: 41, 109: [1, 68], 110: 69, 118: [1, 42], 123: 37, 124: [1, 64], 126: [1, 31], 127: [1, 32], 128: [1, 33], 129: [1, 34], 130: [1, 35]},
- {115: [2, 156], 116: [2, 156]},
- {27: 158, 28: [1, 73], 44: 159, 58: 160, 59: 161, 75: [1, 70], 88: [1, 113], 89: [1, 114], 114: 272},
- {1: [2, 163], 6: [2, 163], 25: [2, 163], 26: [2, 163], 49: [2, 163], 54: [2, 163], 57: [2, 163], 72: [2, 163], 77: [2, 163], 85: [2, 163], 90: [2, 163], 92: [2, 163], 101: [2, 163], 102: 87, 103: [2, 163], 104: [1, 273], 105: [2, 163], 108: 88, 109: [2, 163], 110: 69, 117: [1, 274], 125: [2, 163], 127: [1, 80], 128: [1, 79], 131: [1, 78], 132: [1, 81], 133: [1, 82], 134: [1, 83], 135: [1, 84], 136: [1, 85]},
- {1: [2, 164], 6: [2, 164], 25: [2, 164], 26: [2, 164], 49: [2, 164], 54: [2, 164], 57: [2, 164], 72: [2, 164], 77: [2, 164], 85: [2, 164], 90: [2, 164], 92: [2, 164], 101: [2, 164], 102: 87, 103: [2, 164], 104: [1, 275], 105: [2, 164], 108: 88, 109: [2, 164], 110: 69, 117: [2, 164], 125: [2, 164], 127: [1, 80], 128: [1, 79], 131: [1, 78], 132: [1, 81], 133: [1, 82], 134: [1, 83], 135: [1, 84], 136: [1, 85]},
- {6: [1, 277], 25: [1, 278], 77: [1, 276]},
- {6: [2, 54], 11: 168, 25: [2, 54], 26: [2, 54], 27: 169, 28: [1, 73], 29: 170, 30: [1, 71], 31: [1, 72], 41: 279, 42: 167, 44: 171, 46: [1, 46], 77: [2, 54], 88: [1, 113]},
- {8: 280, 9: 117, 10: 20, 11: 21, 12: [1, 22], 13: 8, 14: 9, 15: 10, 16: 11, 17: 12, 18: 13, 19: 14, 20: 15, 21: 16, 22: 17, 23: 18, 24: 19, 25: [1, 281], 27: 62, 28: [1, 73], 29: 49, 30: [1, 71], 31: [1, 72], 32: 24, 33: [1, 50], 34: [1, 51], 35: [1, 52], 36: [1, 53], 37: [1, 54], 38: [1, 55], 39: 23, 44: 63, 45: [1, 45], 46: [1, 46], 47: [1, 29], 50: 30, 51: [1, 60], 52: [1, 61], 58: 47, 59: 48, 61: 36, 63: 25, 64: 26, 65: 27, 75: [1, 70], 78: [1, 43], 82: [1, 28], 87: [1, 58], 88: [1, 59], 89: [1, 57], 95: [1, 38], 99: [1, 44], 100: [1, 56], 102: 39, 103: [1, 65], 105: [1, 66], 106: 40, 107: [1, 67], 108: 41, 109: [1, 68], 110: 69, 118: [1, 42], 123: 37, 124: [1, 64], 126: [1, 31], 127: [1, 32], 128: [1, 33], 129: [1, 34], 130: [1, 35]},
- {1: [2, 85], 6: [2, 85], 25: [2, 85], 26: [2, 85], 40: [2, 85], 49: [2, 85], 54: [2, 85], 57: [2, 85], 66: [2, 85], 67: [2, 85], 68: [2, 85], 70: [2, 85], 72: [2, 85], 73: [2, 85], 77: [2, 85], 79: [2, 85], 83: [2, 85], 84: [2, 85], 85: [2, 85], 90: [2, 85], 92: [2, 85], 101: [2, 85], 103: [2, 85], 104: [2, 85], 105: [2, 85], 109: [2, 85], 117: [2, 85], 125: [2, 85], 127: [2, 85], 128: [2, 85], 129: [2, 85], 130: [2, 85], 131: [2, 85], 132: [2, 85], 133: [2, 85], 134: [2, 85], 135: [2, 85], 136: [2, 85], 137: [2, 85]},
- {8: 282, 9: 117, 10: 20, 11: 21, 12: [1, 22], 13: 8, 14: 9, 15: 10, 16: 11, 17: 12, 18: 13, 19: 14, 20: 15, 21: 16, 22: 17, 23: 18, 24: 19, 27: 62, 28: [1, 73], 29: 49, 30: [1, 71], 31: [1, 72], 32: 24, 33: [1, 50], 34: [1, 51], 35: [1, 52], 36: [1, 53], 37: [1, 54], 38: [1, 55], 39: 23, 44: 63, 45: [1, 45], 46: [1, 46], 47: [1, 29], 50: 30, 51: [1, 60], 52: [1, 61], 58: 47, 59: 48, 61: 36, 63: 25, 64: 26, 65: 27, 72: [2, 120], 75: [1, 70], 78: [1, 43], 82: [1, 28], 87: [1, 58], 88: [1, 59], 89: [1, 57], 95: [1, 38], 99: [1, 44], 100: [1, 56], 102: 39, 103: [1, 65], 105: [1, 66], 106: 40, 107: [1, 67], 108: 41, 109: [1, 68], 110: 69, 118: [1, 42], 123: 37, 124: [1, 64], 126: [1, 31], 127: [1, 32], 128: [1, 33], 129: [1, 34], 130: [1, 35]},
- {72: [2, 121], 102: 87, 103: [1, 65], 105: [1, 66], 108: 88, 109: [1, 68], 110: 69, 125: [1, 86], 127: [1, 80], 128: [1, 79], 131: [1, 78], 132: [1, 81], 133: [1, 82], 134: [1, 83], 135: [1, 84], 136: [1, 85]},
- {1: [2, 37], 6: [2, 37], 25: [2, 37], 26: [2, 37], 49: [2, 37], 54: [2, 37], 57: [2, 37], 72: [2, 37], 77: [2, 37], 85: [2, 37], 90: [2, 37], 92: [2, 37], 101: [2, 37], 102: 87, 103: [2, 37], 104: [2, 37], 105: [2, 37], 108: 88, 109: [2, 37], 110: 69, 117: [2, 37], 125: [2, 37], 127: [1, 80], 128: [1, 79], 131: [1, 78], 132: [1, 81], 133: [1, 82], 134: [1, 83], 135: [1, 84], 136: [1, 85]},
- {26: [1, 283], 102: 87, 103: [1, 65], 105: [1, 66], 108: 88, 109: [1, 68], 110: 69, 125: [1, 86], 127: [1, 80], 128: [1, 79], 131: [1, 78], 132: [1, 81], 133: [1, 82], 134: [1, 83], 135: [1, 84], 136: [1, 85]},
- {6: [1, 266], 25: [1, 267], 85: [1, 284]},
- {6: [2, 67], 25: [2, 67], 26: [2, 67], 54: [2, 67], 85: [2, 67], 90: [2, 67]},
- {5: 285, 25: [1, 5]},
- {6: [2, 57], 25: [2, 57], 26: [2, 57], 49: [2, 57], 54: [2, 57]},
- {27: 109, 28: [1, 73], 44: 110, 55: 286, 56: 108, 58: 111, 59: 112, 75: [1, 70], 88: [1, 113], 89: [1, 114]},
- {6: [2, 55], 25: [2, 55], 26: [2, 55], 27: 109, 28: [1, 73], 44: 110, 48: 287, 54: [2, 55], 55: 107, 56: 108, 58: 111, 59: 112, 75: [1, 70], 88: [1, 113], 89: [1, 114]},
- {6: [2, 62], 25: [2, 62], 26: [2, 62], 49: [2, 62], 54: [2, 62], 102: 87, 103: [1, 65], 105: [1, 66], 108: 88, 109: [1, 68], 110: 69, 125: [1, 86], 127: [1, 80], 128: [1, 79], 131: [1, 78], 132: [1, 81], 133: [1, 82], 134: [1, 83], 135: [1, 84], 136: [1, 85]},
- {26: [1, 288], 102: 87, 103: [1, 65], 105: [1, 66], 108: 88, 109: [1, 68], 110: 69, 125: [1, 86], 127: [1, 80], 128: [1, 79], 131: [1, 78], 132: [1, 81], 133: [1, 82], 134: [1, 83], 135: [1, 84], 136: [1, 85]},
- {5: 289, 25: [1, 5], 102: 87, 103: [1, 65], 105: [1, 66], 108: 88, 109: [1, 68], 110: 69, 125: [1, 86], 127: [1, 80], 128: [1, 79], 131: [1, 78], 132: [1, 81], 133: [1, 82], 134: [1, 83], 135: [1, 84], 136: [1, 85]},
- {5: 290, 25: [1, 5]},
- {1: [2, 134], 6: [2, 134], 25: [2, 134], 26: [2, 134], 49: [2, 134], 54: [2, 134], 57: [2, 134], 72: [2, 134], 77: [2, 134], 85: [2, 134], 90: [2, 134], 92: [2, 134], 101: [2, 134], 103: [2, 134], 104: [2, 134], 105: [2, 134], 109: [2, 134], 117: [2, 134], 125: [2, 134], 127: [2, 134], 128: [2, 134], 131: [2, 134], 132: [2, 134], 133: [2, 134], 134: [2, 134], 135: [2, 134], 136: [2, 134]},
- {5: 291, 25: [1, 5]},
- {26: [1, 292], 120: [1, 293], 121: 258, 122: [1, 217]},
- {1: [2, 172], 6: [2, 172], 25: [2, 172], 26: [2, 172], 49: [2, 172], 54: [2, 172], 57: [2, 172], 72: [2, 172], 77: [2, 172], 85: [2, 172], 90: [2, 172], 92: [2, 172], 101: [2, 172], 103: [2, 172], 104: [2, 172], 105: [2, 172], 109: [2, 172], 117: [2, 172], 125: [2, 172], 127: [2, 172], 128: [2, 172], 131: [2, 172], 132: [2, 172], 133: [2, 172], 134: [2, 172], 135: [2, 172], 136: [2, 172]},
- {5: 294, 25: [1, 5]},
- {26: [2, 175], 120: [2, 175], 122: [2, 175]},
- {5: 295, 25: [1, 5], 54: [1, 296]},
- {25: [2, 130], 54: [2, 130], 102: 87, 103: [1, 65], 105: [1, 66], 108: 88, 109: [1, 68], 110: 69, 125: [1, 86], 127: [1, 80], 128: [1, 79], 131: [1, 78], 132: [1, 81], 133: [1, 82], 134: [1, 83], 135: [1, 84], 136: [1, 85]},
- {1: [2, 98], 6: [2, 98], 25: [2, 98], 26: [2, 98], 49: [2, 98], 54: [2, 98], 57: [2, 98], 72: [2, 98], 77: [2, 98], 85: [2, 98], 90: [2, 98], 92: [2, 98], 101: [2, 98], 103: [2, 98], 104: [2, 98], 105: [2, 98], 109: [2, 98], 117: [2, 98], 125: [2, 98], 127: [2, 98], 128: [2, 98], 131: [2, 98], 132: [2, 98], 133: [2, 98], 134: [2, 98], 135: [2, 98], 136: [2, 98]},
- {1: [2, 101], 5: 297, 6: [2, 101], 25: [1, 5], 26: [2, 101], 49: [2, 101], 54: [2, 101], 57: [2, 101], 72: [2, 101], 77: [2, 101], 85: [2, 101], 90: [2, 101], 92: [2, 101], 101: [2, 101], 102: 87, 103: [1, 65], 104: [2, 101], 105: [1, 66], 108: 88, 109: [1, 68], 110: 69, 117: [2, 101], 125: [2, 101], 127: [1, 80], 128: [1, 79], 131: [1, 78], 132: [1, 81], 133: [1, 82], 134: [1, 83], 135: [1, 84], 136: [1, 85]},
- {101: [1, 298]},
- {90: [1, 299], 102: 87, 103: [1, 65], 105: [1, 66], 108: 88, 109: [1, 68], 110: 69, 125: [1, 86], 127: [1, 80], 128: [1, 79], 131: [1, 78], 132: [1, 81], 133: [1, 82], 134: [1, 83], 135: [1, 84], 136: [1, 85]},
- {1: [2, 115], 6: [2, 115], 25: [2, 115], 26: [2, 115], 40: [2, 115], 49: [2, 115], 54: [2, 115], 57: [2, 115], 66: [2, 115], 67: [2, 115], 68: [2, 115], 70: [2, 115], 72: [2, 115], 73: [2, 115], 77: [2, 115], 83: [2, 115], 84: [2, 115], 85: [2, 115], 90: [2, 115], 92: [2, 115], 101: [2, 115], 103: [2, 115], 104: [2, 115], 105: [2, 115], 109: [2, 115], 115: [2, 115], 116: [2, 115], 117: [2, 115], 125: [2, 115], 127: [2, 115], 128: [2, 115], 131: [2, 115], 132: [2, 115], 133: [2, 115], 134: [2, 115], 135: [2, 115], 136: [2, 115]},
- {8: 200, 9: 117, 10: 20, 11: 21, 12: [1, 22], 13: 8, 14: 9, 15: 10, 16: 11, 17: 12, 18: 13, 19: 14, 20: 15, 21: 16, 22: 17, 23: 18, 24: 19, 27: 62, 28: [1, 73], 29: 49, 30: [1, 71], 31: [1, 72], 32: 24, 33: [1, 50], 34: [1, 51], 35: [1, 52], 36: [1, 53], 37: [1, 54], 38: [1, 55], 39: 23, 44: 63, 45: [1, 45], 46: [1, 46], 47: [1, 29], 50: 30, 51: [1, 60], 52: [1, 61], 58: 47, 59: 48, 60: 147, 61: 36, 63: 25, 64: 26, 65: 27, 75: [1, 70], 78: [1, 43], 82: [1, 28], 87: [1, 58], 88: [1, 59], 89: [1, 57], 93: 300, 95: [1, 38], 99: [1, 44], 100: [1, 56], 102: 39, 103: [1, 65], 105: [1, 66], 106: 40, 107: [1, 67], 108: 41, 109: [1, 68], 110: 69, 118: [1, 42], 123: 37, 124: [1, 64], 126: [1, 31], 127: [1, 32], 128: [1, 33], 129: [1, 34], 130: [1, 35]},
- {8: 200, 9: 117, 10: 20, 11: 21, 12: [1, 22], 13: 8, 14: 9, 15: 10, 16: 11, 17: 12, 18: 13, 19: 14, 20: 15, 21: 16, 22: 17, 23: 18, 24: 19, 25: [1, 146], 27: 62, 28: [1, 73], 29: 49, 30: [1, 71], 31: [1, 72], 32: 24, 33: [1, 50], 34: [1, 51], 35: [1, 52], 36: [1, 53], 37: [1, 54], 38: [1, 55], 39: 23, 44: 63, 45: [1, 45], 46: [1, 46], 47: [1, 29], 50: 30, 51: [1, 60], 52: [1, 61], 58: 47, 59: 48, 60: 147, 61: 36, 63: 25, 64: 26, 65: 27, 75: [1, 70], 78: [1, 43], 82: [1, 28], 86: 301, 87: [1, 58], 88: [1, 59], 89: [1, 57], 93: 145, 95: [1, 38], 99: [1, 44], 100: [1, 56], 102: 39, 103: [1, 65], 105: [1, 66], 106: 40, 107: [1, 67], 108: 41, 109: [1, 68], 110: 69, 118: [1, 42], 123: 37, 124: [1, 64], 126: [1, 31], 127: [1, 32], 128: [1, 33], 129: [1, 34], 130: [1, 35]},
- {6: [2, 124], 25: [2, 124], 26: [2, 124], 54: [2, 124], 85: [2, 124], 90: [2, 124]},
- {6: [1, 266], 25: [1, 267], 26: [1, 302]},
- {1: [2, 141], 6: [2, 141], 25: [2, 141], 26: [2, 141], 49: [2, 141], 54: [2, 141], 57: [2, 141], 72: [2, 141], 77: [2, 141], 85: [2, 141], 90: [2, 141], 92: [2, 141], 101: [2, 141], 102: 87, 103: [1, 65], 104: [2, 141], 105: [1, 66], 108: 88, 109: [1, 68], 110: 69, 117: [2, 141], 125: [2, 141], 127: [1, 80], 128: [1, 79], 131: [1, 78], 132: [1, 81], 133: [1, 82], 134: [1, 83], 135: [1, 84], 136: [1, 85]},
- {1: [2, 143], 6: [2, 143], 25: [2, 143], 26: [2, 143], 49: [2, 143], 54: [2, 143], 57: [2, 143], 72: [2, 143], 77: [2, 143], 85: [2, 143], 90: [2, 143], 92: [2, 143], 101: [2, 143], 102: 87, 103: [1, 65], 104: [2, 143], 105: [1, 66], 108: 88, 109: [1, 68], 110: 69, 117: [2, 143], 125: [2, 143], 127: [1, 80], 128: [1, 79], 131: [1, 78], 132: [1, 81], 133: [1, 82], 134: [1, 83], 135: [1, 84], 136: [1, 85]},
- {115: [2, 162], 116: [2, 162]},
- {8: 303, 9: 117, 10: 20, 11: 21, 12: [1, 22], 13: 8, 14: 9, 15: 10, 16: 11, 17: 12, 18: 13, 19: 14, 20: 15, 21: 16, 22: 17, 23: 18, 24: 19, 27: 62, 28: [1, 73], 29: 49, 30: [1, 71], 31: [1, 72], 32: 24, 33: [1, 50], 34: [1, 51], 35: [1, 52], 36: [1, 53], 37: [1, 54], 38: [1, 55], 39: 23, 44: 63, 45: [1, 45], 46: [1, 46], 47: [1, 29], 50: 30, 51: [1, 60], 52: [1, 61], 58: 47, 59: 48, 61: 36, 63: 25, 64: 26, 65: 27, 75: [1, 70], 78: [1, 43], 82: [1, 28], 87: [1, 58], 88: [1, 59], 89: [1, 57], 95: [1, 38], 99: [1, 44], 100: [1, 56], 102: 39, 103: [1, 65], 105: [1, 66], 106: 40, 107: [1, 67], 108: 41, 109: [1, 68], 110: 69, 118: [1, 42], 123: 37, 124: [1, 64], 126: [1, 31], 127: [1, 32], 128: [1, 33], 129: [1, 34], 130: [1, 35]},
- {8: 304, 9: 117, 10: 20, 11: 21, 12: [1, 22], 13: 8, 14: 9, 15: 10, 16: 11, 17: 12, 18: 13, 19: 14, 20: 15, 21: 16, 22: 17, 23: 18, 24: 19, 27: 62, 28: [1, 73], 29: 49, 30: [1, 71], 31: [1, 72], 32: 24, 33: [1, 50], 34: [1, 51], 35: [1, 52], 36: [1, 53], 37: [1, 54], 38: [1, 55], 39: 23, 44: 63, 45: [1, 45], 46: [1, 46], 47: [1, 29], 50: 30, 51: [1, 60], 52: [1, 61], 58: 47, 59: 48, 61: 36, 63: 25, 64: 26, 65: 27, 75: [1, 70], 78: [1, 43], 82: [1, 28], 87: [1, 58], 88: [1, 59], 89: [1, 57], 95: [1, 38], 99: [1, 44], 100: [1, 56], 102: 39, 103: [1, 65], 105: [1, 66], 106: 40, 107: [1, 67], 108: 41, 109: [1, 68], 110: 69, 118: [1, 42], 123: 37, 124: [1, 64], 126: [1, 31], 127: [1, 32], 128: [1, 33], 129: [1, 34], 130: [1, 35]},
- {8: 305, 9: 117, 10: 20, 11: 21, 12: [1, 22], 13: 8, 14: 9, 15: 10, 16: 11, 17: 12, 18: 13, 19: 14, 20: 15, 21: 16, 22: 17, 23: 18, 24: 19, 27: 62, 28: [1, 73], 29: 49, 30: [1, 71], 31: [1, 72], 32: 24, 33: [1, 50], 34: [1, 51], 35: [1, 52], 36: [1, 53], 37: [1, 54], 38: [1, 55], 39: 23, 44: 63, 45: [1, 45], 46: [1, 46], 47: [1, 29], 50: 30, 51: [1, 60], 52: [1, 61], 58: 47, 59: 48, 61: 36, 63: 25, 64: 26, 65: 27, 75: [1, 70], 78: [1, 43], 82: [1, 28], 87: [1, 58], 88: [1, 59], 89: [1, 57], 95: [1, 38], 99: [1, 44], 100: [1, 56], 102: 39, 103: [1, 65], 105: [1, 66], 106: 40, 107: [1, 67], 108: 41, 109: [1, 68], 110: 69, 118: [1, 42], 123: 37, 124: [1, 64], 126: [1, 31], 127: [1, 32], 128: [1, 33], 129: [1, 34], 130: [1, 35]},
- {1: [2, 89], 6: [2, 89], 25: [2, 89], 26: [2, 89], 40: [2, 89], 49: [2, 89], 54: [2, 89], 57: [2, 89], 66: [2, 89], 67: [2, 89], 68: [2, 89], 70: [2, 89], 72: [2, 89], 73: [2, 89], 77: [2, 89], 83: [2, 89], 84: [2, 89], 85: [2, 89], 90: [2, 89], 92: [2, 89], 101: [2, 89], 103: [2, 89], 104: [2, 89], 105: [2, 89], 109: [2, 89], 115: [2, 89], 116: [2, 89], 117: [2, 89], 125: [2, 89], 127: [2, 89], 128: [2, 89], 131: [2, 89], 132: [2, 89], 133: [2, 89], 134: [2, 89], 135: [2, 89], 136: [2, 89]},
- {11: 168, 27: 169, 28: [1, 73], 29: 170, 30: [1, 71], 31: [1, 72], 41: 306, 42: 167, 44: 171, 46: [1, 46], 88: [1, 113]},
- {6: [2, 90], 11: 168, 25: [2, 90], 26: [2, 90], 27: 169, 28: [1, 73], 29: 170, 30: [1, 71], 31: [1, 72], 41: 166, 42: 167, 44: 171, 46: [1, 46], 54: [2, 90], 76: 307, 88: [1, 113]},
- {6: [2, 92], 25: [2, 92], 26: [2, 92], 54: [2, 92], 77: [2, 92]},
- {6: [2, 40], 25: [2, 40], 26: [2, 40], 54: [2, 40], 77: [2, 40], 102: 87, 103: [1, 65], 105: [1, 66], 108: 88, 109: [1, 68], 110: 69, 125: [1, 86], 127: [1, 80], 128: [1, 79], 131: [1, 78], 132: [1, 81], 133: [1, 82], 134: [1, 83], 135: [1, 84], 136: [1, 85]},
- {8: 308, 9: 117, 10: 20, 11: 21, 12: [1, 22], 13: 8, 14: 9, 15: 10, 16: 11, 17: 12, 18: 13, 19: 14, 20: 15, 21: 16, 22: 17, 23: 18, 24: 19, 27: 62, 28: [1, 73], 29: 49, 30: [1, 71], 31: [1, 72], 32: 24, 33: [1, 50], 34: [1, 51], 35: [1, 52], 36: [1, 53], 37: [1, 54], 38: [1, 55], 39: 23, 44: 63, 45: [1, 45], 46: [1, 46], 47: [1, 29], 50: 30, 51: [1, 60], 52: [1, 61], 58: 47, 59: 48, 61: 36, 63: 25, 64: 26, 65: 27, 75: [1, 70], 78: [1, 43], 82: [1, 28], 87: [1, 58], 88: [1, 59], 89: [1, 57], 95: [1, 38], 99: [1, 44], 100: [1, 56], 102: 39, 103: [1, 65], 105: [1, 66], 106: 40, 107: [1, 67], 108: 41, 109: [1, 68], 110: 69, 118: [1, 42], 123: 37, 124: [1, 64], 126: [1, 31], 127: [1, 32], 128: [1, 33], 129: [1, 34], 130: [1, 35]},
- {72: [2, 119], 102: 87, 103: [1, 65], 105: [1, 66], 108: 88, 109: [1, 68], 110: 69, 125: [1, 86], 127: [1, 80], 128: [1, 79], 131: [1, 78], 132: [1, 81], 133: [1, 82], 134: [1, 83], 135: [1, 84], 136: [1, 85]},
- {1: [2, 38], 6: [2, 38], 25: [2, 38], 26: [2, 38], 49: [2, 38], 54: [2, 38], 57: [2, 38], 72: [2, 38], 77: [2, 38], 85: [2, 38], 90: [2, 38], 92: [2, 38], 101: [2, 38], 103: [2, 38], 104: [2, 38], 105: [2, 38], 109: [2, 38], 117: [2, 38], 125: [2, 38], 127: [2, 38], 128: [2, 38], 131: [2, 38], 132: [2, 38], 133: [2, 38], 134: [2, 38], 135: [2, 38], 136: [2, 38]},
- {1: [2, 110], 6: [2, 110], 25: [2, 110], 26: [2, 110], 49: [2, 110], 54: [2, 110], 57: [2, 110], 66: [2, 110], 67: [2, 110], 68: [2, 110], 70: [2, 110], 72: [2, 110], 73: [2, 110], 77: [2, 110], 83: [2, 110], 84: [2, 110], 85: [2, 110], 90: [2, 110], 92: [2, 110], 101: [2, 110], 103: [2, 110], 104: [2, 110], 105: [2, 110], 109: [2, 110], 117: [2, 110], 125: [2, 110], 127: [2, 110], 128: [2, 110], 131: [2, 110], 132: [2, 110], 133: [2, 110], 134: [2, 110], 135: [2, 110], 136: [2, 110]},
- {1: [2, 49], 6: [2, 49], 25: [2, 49], 26: [2, 49], 49: [2, 49], 54: [2, 49], 57: [2, 49], 72: [2, 49], 77: [2, 49], 85: [2, 49], 90: [2, 49], 92: [2, 49], 101: [2, 49], 103: [2, 49], 104: [2, 49], 105: [2, 49], 109: [2, 49], 117: [2, 49], 125: [2, 49], 127: [2, 49], 128: [2, 49], 131: [2, 49], 132: [2, 49], 133: [2, 49], 134: [2, 49], 135: [2, 49], 136: [2, 49]},
- {6: [2, 58], 25: [2, 58], 26: [2, 58], 49: [2, 58], 54: [2, 58]},
- {6: [2, 53], 25: [2, 53], 26: [2, 53], 53: 309, 54: [1, 202]},
- {1: [2, 200], 6: [2, 200], 25: [2, 200], 26: [2, 200], 49: [2, 200], 54: [2, 200], 57: [2, 200], 72: [2, 200], 77: [2, 200], 85: [2, 200], 90: [2, 200], 92: [2, 200], 101: [2, 200], 103: [2, 200], 104: [2, 200], 105: [2, 200], 109: [2, 200], 117: [2, 200], 125: [2, 200], 127: [2, 200], 128: [2, 200], 131: [2, 200], 132: [2, 200], 133: [2, 200], 134: [2, 200], 135: [2, 200], 136: [2, 200]},
- {1: [2, 179], 6: [2, 179], 25: [2, 179], 26: [2, 179], 49: [2, 179], 54: [2, 179], 57: [2, 179], 72: [2, 179], 77: [2, 179], 85: [2, 179], 90: [2, 179], 92: [2, 179], 101: [2, 179], 103: [2, 179], 104: [2, 179], 105: [2, 179], 109: [2, 179], 117: [2, 179], 120: [2, 179], 125: [2, 179], 127: [2, 179], 128: [2, 179], 131: [2, 179], 132: [2, 179], 133: [2, 179], 134: [2, 179], 135: [2, 179], 136: [2, 179]},
- {1: [2, 135], 6: [2, 135], 25: [2, 135], 26: [2, 135], 49: [2, 135], 54: [2, 135], 57: [2, 135], 72: [2, 135], 77: [2, 135], 85: [2, 135], 90: [2, 135], 92: [2, 135], 101: [2, 135], 103: [2, 135], 104: [2, 135], 105: [2, 135], 109: [2, 135], 117: [2, 135], 125: [2, 135], 127: [2, 135], 128: [2, 135], 131: [2, 135], 132: [2, 135], 133: [2, 135], 134: [2, 135], 135: [2, 135], 136: [2, 135]},
- {1: [2, 136], 6: [2, 136], 25: [2, 136], 26: [2, 136], 49: [2, 136], 54: [2, 136], 57: [2, 136], 72: [2, 136], 77: [2, 136], 85: [2, 136], 90: [2, 136], 92: [2, 136], 97: [2, 136], 101: [2, 136], 103: [2, 136], 104: [2, 136], 105: [2, 136], 109: [2, 136], 117: [2, 136], 125: [2, 136], 127: [2, 136], 128: [2, 136], 131: [2, 136], 132: [2, 136], 133: [2, 136], 134: [2, 136], 135: [2, 136], 136: [2, 136]},
- {1: [2, 170], 6: [2, 170], 25: [2, 170], 26: [2, 170], 49: [2, 170], 54: [2, 170], 57: [2, 170], 72: [2, 170], 77: [2, 170], 85: [2, 170], 90: [2, 170], 92: [2, 170], 101: [2, 170], 103: [2, 170], 104: [2, 170], 105: [2, 170], 109: [2, 170], 117: [2, 170], 125: [2, 170], 127: [2, 170], 128: [2, 170], 131: [2, 170], 132: [2, 170], 133: [2, 170], 134: [2, 170], 135: [2, 170], 136: [2, 170]},
- {5: 310, 25: [1, 5]},
- {26: [1, 311]},
- {6: [1, 312], 26: [2, 176], 120: [2, 176], 122: [2, 176]},
- {8: 313, 9: 117, 10: 20, 11: 21, 12: [1, 22], 13: 8, 14: 9, 15: 10, 16: 11, 17: 12, 18: 13, 19: 14, 20: 15, 21: 16, 22: 17, 23: 18, 24: 19, 27: 62, 28: [1, 73], 29: 49, 30: [1, 71], 31: [1, 72], 32: 24, 33: [1, 50], 34: [1, 51], 35: [1, 52], 36: [1, 53], 37: [1, 54], 38: [1, 55], 39: 23, 44: 63, 45: [1, 45], 46: [1, 46], 47: [1, 29], 50: 30, 51: [1, 60], 52: [1, 61], 58: 47, 59: 48, 61: 36, 63: 25, 64: 26, 65: 27, 75: [1, 70], 78: [1, 43], 82: [1, 28], 87: [1, 58], 88: [1, 59], 89: [1, 57], 95: [1, 38], 99: [1, 44], 100: [1, 56], 102: 39, 103: [1, 65], 105: [1, 66], 106: 40, 107: [1, 67], 108: 41, 109: [1, 68], 110: 69, 118: [1, 42], 123: 37, 124: [1, 64], 126: [1, 31], 127: [1, 32], 128: [1, 33], 129: [1, 34], 130: [1, 35]},
- {1: [2, 102], 6: [2, 102], 25: [2, 102], 26: [2, 102], 49: [2, 102], 54: [2, 102], 57: [2, 102], 72: [2, 102], 77: [2, 102], 85: [2, 102], 90: [2, 102], 92: [2, 102], 101: [2, 102], 103: [2, 102], 104: [2, 102], 105: [2, 102], 109: [2, 102], 117: [2, 102], 125: [2, 102], 127: [2, 102], 128: [2, 102], 131: [2, 102], 132: [2, 102], 133: [2, 102], 134: [2, 102], 135: [2, 102], 136: [2, 102]},
- {1: [2, 139], 6: [2, 139], 25: [2, 139], 26: [2, 139], 49: [2, 139], 54: [2, 139], 57: [2, 139], 66: [2, 139], 67: [2, 139], 68: [2, 139], 70: [2, 139], 72: [2, 139], 73: [2, 139], 77: [2, 139], 83: [2, 139], 84: [2, 139], 85: [2, 139], 90: [2, 139], 92: [2, 139], 101: [2, 139], 103: [2, 139], 104: [2, 139], 105: [2, 139], 109: [2, 139], 117: [2, 139], 125: [2, 139], 127: [2, 139], 128: [2, 139], 131: [2, 139], 132: [2, 139], 133: [2, 139], 134: [2, 139], 135: [2, 139], 136: [2, 139]},
- {1: [2, 118], 6: [2, 118], 25: [2, 118], 26: [2, 118], 49: [2, 118], 54: [2, 118], 57: [2, 118], 66: [2, 118], 67: [2, 118], 68: [2, 118], 70: [2, 118], 72: [2, 118], 73: [2, 118], 77: [2, 118], 83: [2, 118], 84: [2, 118], 85: [2, 118], 90: [2, 118], 92: [2, 118], 101: [2, 118], 103: [2, 118], 104: [2, 118], 105: [2, 118], 109: [2, 118], 117: [2, 118], 125: [2, 118], 127: [2, 118], 128: [2, 118], 131: [2, 118], 132: [2, 118], 133: [2, 118], 134: [2, 118], 135: [2, 118], 136: [2, 118]},
- {6: [2, 125], 25: [2, 125], 26: [2, 125], 54: [2, 125], 85: [2, 125], 90: [2, 125]},
- {6: [2, 53], 25: [2, 53], 26: [2, 53], 53: 314, 54: [1, 226]},
- {6: [2, 126], 25: [2, 126], 26: [2, 126], 54: [2, 126], 85: [2, 126], 90: [2, 126]},
- {1: [2, 165], 6: [2, 165], 25: [2, 165], 26: [2, 165], 49: [2, 165], 54: [2, 165], 57: [2, 165], 72: [2, 165], 77: [2, 165], 85: [2, 165], 90: [2, 165], 92: [2, 165], 101: [2, 165], 102: 87, 103: [2, 165], 104: [2, 165], 105: [2, 165], 108: 88, 109: [2, 165], 110: 69, 117: [1, 315], 125: [2, 165], 127: [1, 80], 128: [1, 79], 131: [1, 78], 132: [1, 81], 133: [1, 82], 134: [1, 83], 135: [1, 84], 136: [1, 85]},
- {1: [2, 167], 6: [2, 167], 25: [2, 167], 26: [2, 167], 49: [2, 167], 54: [2, 167], 57: [2, 167], 72: [2, 167], 77: [2, 167], 85: [2, 167], 90: [2, 167], 92: [2, 167], 101: [2, 167], 102: 87, 103: [2, 167], 104: [1, 316], 105: [2, 167], 108: 88, 109: [2, 167], 110: 69, 117: [2, 167], 125: [2, 167], 127: [1, 80], 128: [1, 79], 131: [1, 78], 132: [1, 81], 133: [1, 82], 134: [1, 83], 135: [1, 84], 136: [1, 85]},
- {1: [2, 166], 6: [2, 166], 25: [2, 166], 26: [2, 166], 49: [2, 166], 54: [2, 166], 57: [2, 166], 72: [2, 166], 77: [2, 166], 85: [2, 166], 90: [2, 166], 92: [2, 166], 101: [2, 166], 102: 87, 103: [2, 166], 104: [2, 166], 105: [2, 166], 108: 88, 109: [2, 166], 110: 69, 117: [2, 166], 125: [2, 166], 127: [1, 80], 128: [1, 79], 131: [1, 78], 132: [1, 81], 133: [1, 82], 134: [1, 83], 135: [1, 84], 136: [1, 85]},
- {6: [2, 93], 25: [2, 93], 26: [2, 93], 54: [2, 93], 77: [2, 93]},
- {6: [2, 53], 25: [2, 53], 26: [2, 53], 53: 317, 54: [1, 236]},
- {26: [1, 318], 102: 87, 103: [1, 65], 105: [1, 66], 108: 88, 109: [1, 68], 110: 69, 125: [1, 86], 127: [1, 80], 128: [1, 79], 131: [1, 78], 132: [1, 81], 133: [1, 82], 134: [1, 83], 135: [1, 84], 136: [1, 85]},
- {6: [1, 247], 25: [1, 248], 26: [1, 319]},
- {26: [1, 320]},
- {1: [2, 173], 6: [2, 173], 25: [2, 173], 26: [2, 173], 49: [2, 173], 54: [2, 173], 57: [2, 173], 72: [2, 173], 77: [2, 173], 85: [2, 173], 90: [2, 173], 92: [2, 173], 101: [2, 173], 103: [2, 173], 104: [2, 173], 105: [2, 173], 109: [2, 173], 117: [2, 173], 125: [2, 173], 127: [2, 173], 128: [2, 173], 131: [2, 173], 132: [2, 173], 133: [2, 173], 134: [2, 173], 135: [2, 173], 136: [2, 173]},
- {26: [2, 177], 120: [2, 177], 122: [2, 177]},
- {25: [2, 131], 54: [2, 131], 102: 87, 103: [1, 65], 105: [1, 66], 108: 88, 109: [1, 68], 110: 69, 125: [1, 86], 127: [1, 80], 128: [1, 79], 131: [1, 78], 132: [1, 81], 133: [1, 82], 134: [1, 83], 135: [1, 84], 136: [1, 85]},
- {6: [1, 266], 25: [1, 267], 26: [1, 321]},
- {8: 322, 9: 117, 10: 20, 11: 21, 12: [1, 22], 13: 8, 14: 9, 15: 10, 16: 11, 17: 12, 18: 13, 19: 14, 20: 15, 21: 16, 22: 17, 23: 18, 24: 19, 27: 62, 28: [1, 73], 29: 49, 30: [1, 71], 31: [1, 72], 32: 24, 33: [1, 50], 34: [1, 51], 35: [1, 52], 36: [1, 53], 37: [1, 54], 38: [1, 55], 39: 23, 44: 63, 45: [1, 45], 46: [1, 46], 47: [1, 29], 50: 30, 51: [1, 60], 52: [1, 61], 58: 47, 59: 48, 61: 36, 63: 25, 64: 26, 65: 27, 75: [1, 70], 78: [1, 43], 82: [1, 28], 87: [1, 58], 88: [1, 59], 89: [1, 57], 95: [1, 38], 99: [1, 44], 100: [1, 56], 102: 39, 103: [1, 65], 105: [1, 66], 106: 40, 107: [1, 67], 108: 41, 109: [1, 68], 110: 69, 118: [1, 42], 123: 37, 124: [1, 64], 126: [1, 31], 127: [1, 32], 128: [1, 33], 129: [1, 34], 130: [1, 35]},
- {8: 323, 9: 117, 10: 20, 11: 21, 12: [1, 22], 13: 8, 14: 9, 15: 10, 16: 11, 17: 12, 18: 13, 19: 14, 20: 15, 21: 16, 22: 17, 23: 18, 24: 19, 27: 62, 28: [1, 73], 29: 49, 30: [1, 71], 31: [1, 72], 32: 24, 33: [1, 50], 34: [1, 51], 35: [1, 52], 36: [1, 53], 37: [1, 54], 38: [1, 55], 39: 23, 44: 63, 45: [1, 45], 46: [1, 46], 47: [1, 29], 50: 30, 51: [1, 60], 52: [1, 61], 58: 47, 59: 48, 61: 36, 63: 25, 64: 26, 65: 27, 75: [1, 70], 78: [1, 43], 82: [1, 28], 87: [1, 58], 88: [1, 59], 89: [1, 57], 95: [1, 38], 99: [1, 44], 100: [1, 56], 102: 39, 103: [1, 65], 105: [1, 66], 106: 40, 107: [1, 67], 108: 41, 109: [1, 68], 110: 69, 118: [1, 42], 123: 37, 124: [1, 64], 126: [1, 31], 127: [1, 32], 128: [1, 33], 129: [1, 34], 130: [1, 35]},
- {6: [1, 277], 25: [1, 278], 26: [1, 324]},
- {6: [2, 41], 25: [2, 41], 26: [2, 41], 54: [2, 41], 77: [2, 41]},
- {6: [2, 59], 25: [2, 59], 26: [2, 59], 49: [2, 59], 54: [2, 59]},
- {1: [2, 171], 6: [2, 171], 25: [2, 171], 26: [2, 171], 49: [2, 171], 54: [2, 171], 57: [2, 171], 72: [2, 171], 77: [2, 171], 85: [2, 171], 90: [2, 171], 92: [2, 171], 101: [2, 171], 103: [2, 171], 104: [2, 171], 105: [2, 171], 109: [2, 171], 117: [2, 171], 125: [2, 171], 127: [2, 171], 128: [2, 171], 131: [2, 171], 132: [2, 171], 133: [2, 171], 134: [2, 171], 135: [2, 171], 136: [2, 171]},
- {6: [2, 127], 25: [2, 127], 26: [2, 127], 54: [2, 127], 85: [2, 127], 90: [2, 127]},
- {1: [2, 168], 6: [2, 168], 25: [2, 168], 26: [2, 168], 49: [2, 168], 54: [2, 168], 57: [2, 168], 72: [2, 168], 77: [2, 168], 85: [2, 168], 90: [2, 168], 92: [2, 168], 101: [2, 168], 102: 87, 103: [2, 168], 104: [2, 168], 105: [2, 168], 108: 88, 109: [2, 168], 110: 69, 117: [2, 168], 125: [2, 168], 127: [1, 80], 128: [1, 79], 131: [1, 78], 132: [1, 81], 133: [1, 82], 134: [1, 83], 135: [1, 84], 136: [1, 85]},
- {1: [2, 169], 6: [2, 169], 25: [2, 169], 26: [2, 169], 49: [2, 169], 54: [2, 169], 57: [2, 169], 72: [2, 169], 77: [2, 169], 85: [2, 169], 90: [2, 169], 92: [2, 169], 101: [2, 169], 102: 87, 103: [2, 169], 104: [2, 169], 105: [2, 169], 108: 88, 109: [2, 169], 110: 69, 117: [2, 169], 125: [2, 169], 127: [1, 80], 128: [1, 79], 131: [1, 78], 132: [1, 81], 133: [1, 82], 134: [1, 83], 135: [1, 84], 136: [1, 85]},
- {6: [2, 94], 25: [2, 94], 26: [2, 94], 54: [2, 94], 77: [2, 94]}
- ], defaultActions: {60: [2, 51], 61: [2, 52], 75: [2, 3], 94: [2, 108], 189: [2, 88]}, parseError: function (t, n) {
- throw new Error(t)
- }, parse: function (t) {
- function d(e) {
- r.length = r.length - 2 * e, i.length = i.length - e, s.length = s.length - e
- }
-
- function v() {
- var e;
- return e = n.lexer.lex() || 1, typeof e != "number" && (e = n.symbols_[e] || e), e
- }
-
- var n = this, r = [0], i = [null], s = [], o = this.table, u = "", a = 0, f = 0, l = 0, c = 2, h = 1;
- this.lexer.setInput(t), this.lexer.yy = this.yy, this.yy.lexer = this.lexer, typeof this.lexer.yylloc == "undefined" && (this.lexer.yylloc = {});
- var p = this.lexer.yylloc;
- s.push(p), typeof this.yy.parseError == "function" && (this.parseError = this.yy.parseError);
- var m, g, y, b, w, E, S = {}, x, T, N, C;
- for (; ;) {
- y = r[r.length - 1], this.defaultActions[y] ? b = this.defaultActions[y] : (m == null && (m = v()), b = o[y] && o[y][m]);
- if (typeof b == "undefined" || !b.length || !b[0]) {
- if (!l) {
- C = [];
- for (x in o[y])this.terminals_[x] && x > 2 && C.push("'" + this.terminals_[x] + "'");
- var k = "";
- this.lexer.showPosition ? k = "Parse error on line " + (a + 1) + ":\n" + this.lexer.showPosition() + "\nExpecting " + C.join(", ") + ", got '" + this.terminals_[m] + "'" : k = "Parse error on line " + (a + 1) + ": Unexpected " + (m == 1 ? "end of input" : "'" + (this.terminals_[m] || m) + "'"), this.parseError(k, {text: this.lexer.match, token: this.terminals_[m] || m, line: this.lexer.yylineno, loc: p, expected: C})
- }
- if (l == 3) {
- if (m == h)throw new Error(k || "Parsing halted.");
- f = this.lexer.yyleng, u = this.lexer.yytext, a = this.lexer.yylineno, p = this.lexer.yylloc, m = v()
- }
- for (; ;) {
- if (c.toString()in o[y])break;
- if (y == 0)throw new Error(k || "Parsing halted.");
- d(1), y = r[r.length - 1]
- }
- g = m, m = c, y = r[r.length - 1], b = o[y] && o[y][c], l = 3
- }
- if (b[0]instanceof Array && b.length > 1)throw new Error("Parse Error: multiple actions possible at state: " + y + ", token: " + m);
- switch (b[0]) {
- case 1:
- r.push(m), i.push(this.lexer.yytext), s.push(this.lexer.yylloc), r.push(b[1]), m = null, g ? (m = g, g = null) : (f = this.lexer.yyleng, u = this.lexer.yytext, a = this.lexer.yylineno, p = this.lexer.yylloc, l > 0 && l--);
- break;
- case 2:
- T = this.productions_[b[1]][1], S.$ = i[i.length - T], S._$ = {first_line: s[s.length - (T || 1)].first_line, last_line: s[s.length - 1].last_line, first_column: s[s.length - (T || 1)].first_column, last_column: s[s.length - 1].last_column}, E = this.performAction.call(S, u, f, a, this.yy, b[1], i, s);
- if (typeof E != "undefined")return E;
- T && (r = r.slice(0, -1 * T * 2), i = i.slice(0, -1 * T), s = s.slice(0, -1 * T)), r.push(this.productions_[b[1]][0]), i.push(S.$), s.push(S._$), N = o[r[r.length - 2]][r[r.length - 1]], r.push(N);
- break;
- case 3:
- return!0
- }
- }
- return!0
- }};
- undefined, n.exports = r
-}), define("ace/mode/coffee/nodes", ["require", "exports", "module", "ace/mode/coffee/scope", "ace/mode/coffee/lexer", "ace/mode/coffee/helpers"], function (e, t, n) {
- var r, i, s, o, u, a, f, l, c, h, p, d, v, m, g, y, b, w, E, S, x, T, N, C, k, L, A, O, M, _, D, P, H, B, j, F, I, q, R, U, z, W, X, V, $, J, K, Q, G, Y, Z, et, tt, nt, rt, it, st, ot, ut, at, ft, lt, ct, ht, pt = {}.hasOwnProperty, dt = function (e, t) {
- function r() {
- this.constructor = e
- }
-
- for (var n in t)pt.call(t, n) && (e[n] = t[n]);
- return r.prototype = t.prototype, e.prototype = new r, e.__super__ = t.prototype, e
- }, vt = [].indexOf || function (e) {
- for (var t = 0, n = this.length; t < n; t++)if (t in this && this[t] === e)return t;
- return-1
- };
- R = e("./scope").Scope, ct = e("./lexer"), B = ct.RESERVED, q = ct.STRICT_PROSCRIBED, ht = e("./helpers"), Z = ht.compact, rt = ht.flatten, nt = ht.extend, st = ht.merge, et = ht.del, at = ht.starts, tt = ht.ends, it = ht.last, ut = ht.some, t.extend = nt, Y = function () {
- return!0
- }, M = function () {
- return!1
- }, V = function () {
- return this
- }, O = function () {
- return this.negated = !this.negated, this
- }, t.Base = o = function () {
- function e() {
- }
-
- return e.prototype.compile = function (e, t) {
- var n;
- return e = nt({}, e), t && (e.level = t), n = this.unfoldSoak(e) || this, n.tab = e.indent, e.level === k || !n.isStatement(e) ? n.compileNode(e) : n.compileClosure(e)
- }, e.prototype.compileClosure = function (e) {
- if (this.jumps())throw SyntaxError("cannot use a pure statement in an expression.");
- return e.sharedScope = !0, l.wrap(this).compileNode(e)
- }, e.prototype.cache = function (e, t, n) {
- var r, i;
- return this.isComplex() ? (r = new L(n || e.scope.freeVariable("ref")), i = new s(r, this), t ? [i.compile(e, t), r.value] : [i, r]) : (r = t ? this.compile(e, t) : this, [r, r])
- }, e.prototype.compileLoopReference = function (e, t) {
- var n, r;
- return n = r = this.compile(e, T), -Infinity < +n && +n < Infinity || m.test(n) && e.scope.check(n, !0) || (n = "" + (r = e.scope.freeVariable(t)) + " = " + n), [n, r]
- }, e.prototype.makeReturn = function (e) {
- var t;
- return t = this.unwrapAll(), e ? new a(new L("" + e + ".push"), [t]) : new F(t)
- }, e.prototype.contains = function (e) {
- var t;
- return t = !1, this.traverseChildren(!1, function (n) {
- if (e(n))return t = !0, !1
- }), t
- }, e.prototype.containsType = function (e) {
- return this instanceof e || this.contains(function (t) {
- return t instanceof e
- })
- }, e.prototype.lastNonComment = function (e) {
- var t;
- t = e.length;
- while (t--)if (!(e[t]instanceof h))return e[t];
- return null
- }, e.prototype.toString = function (e, t) {
- var n;
- return e == null && (e = ""), t == null && (t = this.constructor.name), n = "\n" + e + t, this.soak && (n += "?"), this.eachChild(function (t) {
- return n += t.toString(e + X)
- }), n
- }, e.prototype.eachChild = function (e) {
- var t, n, r, i, s, o, u, a;
- if (!this.children)return this;
- u = this.children;
- for (r = 0, s = u.length; r < s; r++) {
- t = u[r];
- if (this[t]) {
- a = rt([this[t]]);
- for (i = 0, o = a.length; i < o; i++) {
- n = a[i];
- if (e(n) === !1)return this
- }
- }
- }
- return this
- }, e.prototype.traverseChildren = function (e, t) {
- return this.eachChild(function (n) {
- return t(n) === !1 ? !1 : n.traverseChildren(e, t)
- })
- }, e.prototype.invert = function () {
- return new D("!", this)
- }, e.prototype.unwrapAll = function () {
- var e;
- e = this;
- while (e !== (e = e.unwrap()))continue;
- return e
- }, e.prototype.children = [], e.prototype.isStatement = M, e.prototype.jumps = M, e.prototype.isComplex = Y, e.prototype.isChainable = M, e.prototype.isAssignable = M, e.prototype.unwrap = V, e.prototype.unfoldSoak = M, e.prototype.assigns = M, e
- }(), t.Block = u = function (e) {
- function t(e) {
- this.expressions = Z(rt(e || []))
- }
-
- return dt(t, e), t.prototype.children = ["expressions"], t.prototype.push = function (e) {
- return this.expressions.push(e), this
- }, t.prototype.pop = function () {
- return this.expressions.pop()
- }, t.prototype.unshift = function (e) {
- return this.expressions.unshift(e), this
- }, t.prototype.unwrap = function () {
- return this.expressions.length === 1 ? this.expressions[0] : this
- }, t.prototype.isEmpty = function () {
- return!this.expressions.length
- }, t.prototype.isStatement = function (e) {
- var t, n, r, i;
- i = this.expressions;
- for (n = 0, r = i.length; n < r; n++) {
- t = i[n];
- if (t.isStatement(e))return!0
- }
- return!1
- }, t.prototype.jumps = function (e) {
- var t, n, r, i;
- i = this.expressions;
- for (n = 0, r = i.length; n < r; n++) {
- t = i[n];
- if (t.jumps(e))return t
- }
- }, t.prototype.makeReturn = function (e) {
- var t, n;
- n = this.expressions.length;
- while (n--) {
- t = this.expressions[n];
- if (!(t instanceof h)) {
- this.expressions[n] = t.makeReturn(e), t instanceof F && !t.expression && this.expressions.splice(n, 1);
- break
- }
- }
- return this
- }, t.prototype.compile = function (e, n) {
- return e == null && (e = {}), e.scope ? t.__super__.compile.call(this, e, n) : this.compileRoot(e)
- }, t.prototype.compileNode = function (e) {
- var n, r, i, s, o, u, a;
- this.tab = e.indent, s = e.level === k, r = [], a = this.expressions;
- for (o = 0, u = a.length; o < u; o++)i = a[o], i = i.unwrapAll(), i = i.unfoldSoak(e) || i, i instanceof t ? r.push(i.compileNode(e)) : s ? (i.front = !0, n = i.compile(e), i.isStatement(e) || (n = "" + this.tab + n + ";", i instanceof L && (n = "" + n + "\n")), r.push(n)) : r.push(i.compile(e, T));
- return s ? this.spaced ? "\n" + r.join("\n\n") + "\n" : r.join("\n") : (n = r.join(", ") || "void 0", r.length > 1 && e.level >= T ? "(" + n + ")" : n)
- }, t.prototype.compileRoot = function (e) {
- var t, n, r, i, s, o;
- return e.indent = e.bare ? "" : X, e.scope = new R(null, this, null), e.level = k, this.spaced = !0, i = "", e.bare || (s = function () {
- var e, t, i, s;
- i = this.expressions, s = [];
- for (r = e = 0, t = i.length; e < t; r = ++e) {
- n = i[r];
- if (!(n.unwrap()instanceof h))break;
- s.push(n)
- }
- return s
- }.call(this), o = this.expressions.slice(s.length), this.expressions = s, s.length && (i = "" + this.compileNode(st(e, {indent: ""})) + "\n"), this.expressions = o), t = this.compileWithDeclarations(e), e.bare ? t : "" + i + "(function() {\n" + t + "\n}).call(this);\n"
- }, t.prototype.compileWithDeclarations = function (e) {
- var t, n, r, i, s, o, u, a, f, l, c, p, d, v;
- n = o = "", p = this.expressions;
- for (s = l = 0, c = p.length; l < c; s = ++l) {
- i = p[s], i = i.unwrap();
- if (!(i instanceof h || i instanceof L))break
- }
- e = st(e, {level: k}), s && (u = this.expressions.splice(s, 9e9), d = [this.spaced, !1], f = d[0], this.spaced = d[1], v = [this.compileNode(e), f], n = v[0], this.spaced = v[1], this.expressions = u), o = this.compileNode(e), a = e.scope;
- if (a.expressions === this) {
- r = e.scope.hasDeclarations(), t = a.hasAssignments;
- if (r || t)s && (n += "\n"), n += "" + this.tab + "var ", r && (n += a.declaredVariables().join(", ")), t && (r && (n += ",\n" + (this.tab + X)), n += a.assignedVariables().join(",\n" + (this.tab + X))), n += ";\n"
- }
- return n + o
- }, t.wrap = function (e) {
- return e.length === 1 && e[0]instanceof t ? e[0] : new t(e)
- }, t
- }(o), t.Literal = L = function (e) {
- function t(e) {
- this.value = e
- }
-
- return dt(t, e), t.prototype.makeReturn = function () {
- return this.isStatement() ? this : t.__super__.makeReturn.apply(this, arguments)
- }, t.prototype.isAssignable = function () {
- return m.test(this.value)
- }, t.prototype.isStatement = function () {
- var e;
- return(e = this.value) === "break" || e === "continue" || e === "debugger"
- }, t.prototype.isComplex = M, t.prototype.assigns = function (e) {
- return e === this.value
- }, t.prototype.jumps = function (e) {
- if (this.value === "break" && !((e != null ? e.loop : void 0) || (e != null ? e.block : void 0)))return this;
- if (this.value === "continue" && (e != null ? !e.loop : !void 0))return this
- }, t.prototype.compileNode = function (e) {
- var t, n;
- return t = this.value === "this" ? ((n = e.scope.method) != null ? n.bound : void 0) ? e.scope.method.context : this.value : this.value.reserved ? '"' + this.value + '"' : this.value, this.isStatement() ? "" + this.tab + t + ";" : t
- }, t.prototype.toString = function () {
- return' "' + this.value + '"'
- }, t
- }(o), t.Undefined = function (e) {
- function t() {
- return t.__super__.constructor.apply(this, arguments)
- }
-
- return dt(t, e), t.prototype.isAssignable = M, t.prototype.isComplex = M, t.prototype.compileNode = function (e) {
- return e.level >= S ? "(void 0)" : "void 0"
- }, t
- }(o), t.Null = function (e) {
- function t() {
- return t.__super__.constructor.apply(this, arguments)
- }
-
- return dt(t, e), t.prototype.isAssignable = M, t.prototype.isComplex = M, t.prototype.compileNode = function () {
- return"null"
- }, t
- }(o), t.Bool = function (e) {
- function t(e) {
- this.val = e
- }
-
- return dt(t, e), t.prototype.isAssignable = M, t.prototype.isComplex = M, t.prototype.compileNode = function () {
- return this.val
- }, t
- }(o), t.Return = F = function (e) {
- function t(e) {
- e && !e.unwrap().isUndefined && (this.expression = e)
- }
-
- return dt(t, e), t.prototype.children = ["expression"], t.prototype.isStatement = Y, t.prototype.makeReturn = V, t.prototype.jumps = V, t.prototype.compile = function (e, n) {
- var r, i;
- return r = (i = this.expression) != null ? i.makeReturn() : void 0, !r || r instanceof t ? t.__super__.compile.call(this, e, n) : r.compile(e, n)
- }, t.prototype.compileNode = function (e) {
- return this.tab + ("return" + [this.expression ? " " + this.expression.compile(e, C) : void 0] + ";")
- }, t
- }(o), t.Value = Q = function (e) {
- function t(e, n, r) {
- return!n && e instanceof t ? e : (this.base = e, this.properties = n || [], r && (this[r] = !0), this)
- }
-
- return dt(t, e), t.prototype.children = ["base", "properties"], t.prototype.add = function (e) {
- return this.properties = this.properties.concat(e), this
- }, t.prototype.hasProperties = function () {
- return!!this.properties.length
- }, t.prototype.isArray = function () {
- return!this.properties.length && this.base instanceof i
- }, t.prototype.isComplex = function () {
- return this.hasProperties() || this.base.isComplex()
- }, t.prototype.isAssignable = function () {
- return this.hasProperties() || this.base.isAssignable()
- }, t.prototype.isSimpleNumber = function () {
- return this.base instanceof L && I.test(this.base.value)
- }, t.prototype.isString = function () {
- return this.base instanceof L && y.test(this.base.value)
- }, t.prototype.isAtomic = function () {
- var e, t, n, r;
- r = this.properties.concat(this.base);
- for (t = 0, n = r.length; t < n; t++) {
- e = r[t];
- if (e.soak || e instanceof a)return!1
- }
- return!0
- }, t.prototype.isStatement = function (e) {
- return!this.properties.length && this.base.isStatement(e)
- }, t.prototype.assigns = function (e) {
- return!this.properties.length && this.base.assigns(e)
- }, t.prototype.jumps = function (e) {
- return!this.properties.length && this.base.jumps(e)
- }, t.prototype.isObject = function (e) {
- return this.properties.length ? !1 : this.base instanceof _ && (!e || this.base.generated)
- }, t.prototype.isSplice = function () {
- return it(this.properties)instanceof U
- }, t.prototype.unwrap = function () {
- return this.properties.length ? this : this.base
- }, t.prototype.cacheReference = function (e) {
- var n, r, i, o;
- return i = it(this.properties), this.properties.length < 2 && !this.base.isComplex() && (i != null ? !i.isComplex() : !void 0) ? [this, this] : (n = new t(this.base, this.properties.slice(0, -1)), n.isComplex() && (r = new L(e.scope.freeVariable("base")), n = new t(new H(new s(r, n)))), i ? (i.isComplex() && (o = new L(e.scope.freeVariable("name")), i = new E(new s(o, i.index)), o = new E(o)), [n.add(i), new t(r || n.base, [o || i])]) : [n, r])
- }, t.prototype.compileNode = function (e) {
- var t, n, r, i, s;
- this.base.front = this.front, r = this.properties, t = this.base.compile(e, r.length ? S : null), (this.base instanceof H || r.length) && I.test(t) && (t = "" + t + ".");
- for (i = 0, s = r.length; i < s; i++)n = r[i], t += n.compile(e);
- return t
- }, t.prototype.unfoldSoak = function (e) {
- var n, r = this;
- return this.unfoldedSoak != null ? this.unfoldedSoak : (n = function () {
- var n, i, o, u, a, f, l, c, h;
- if (o = r.base.unfoldSoak(e))return Array.prototype.push.apply(o.body.properties, r.properties), o;
- h = r.properties;
- for (i = l = 0, c = h.length; l < c; i = ++l) {
- u = h[i];
- if (!u.soak)continue;
- return u.soak = !1, n = new t(r.base, r.properties.slice(0, i)), f = new t(r.base, r.properties.slice(i)), n.isComplex() && (a = new L(e.scope.freeVariable("ref")), n = new H(new s(a, n)), f.base = a), new b(new p(n), f, {soak: !0})
- }
- return null
- }(), this.unfoldedSoak = n || !1)
- }, t
- }(o), t.Comment = h = function (e) {
- function t(e) {
- this.comment = e
- }
-
- return dt(t, e), t.prototype.isStatement = Y, t.prototype.makeReturn = V, t.prototype.compileNode = function (e, t) {
- var n;
- return n = "/*" + ot(this.comment, this.tab) + ("\n" + this.tab + "*/\n"), (t || e.level) === k && (n = e.indent + n), n
- }, t
- }(o), t.Call = a = function (e) {
- function t(e, t, n) {
- this.args = t != null ? t : [], this.soak = n, this.isNew = !1, this.isSuper = e === "super", this.variable = this.isSuper ? null : e
- }
-
- return dt(t, e), t.prototype.children = ["variable", "args"], t.prototype.newInstance = function () {
- var e, n;
- return e = ((n = this.variable) != null ? n.base : void 0) || this.variable, e instanceof t && !e.isNew ? e.newInstance() : this.isNew = !0, this
- }, t.prototype.superReference = function (e) {
- var t, n, i;
- n = e.scope.namedMethod();
- if (!n)throw SyntaxError("cannot call super outside of a function.");
- i = n.name;
- if (i == null)throw SyntaxError("cannot call super on an anonymous function.");
- return n.klass ? (t = [new r(new L("__super__"))], n["static"] && t.push(new r(new L("constructor"))), t.push(new r(new L(i))), (new Q(new L(n.klass), t)).compile(e)) : "" + i + ".__super__.constructor"
- }, t.prototype.superThis = function (e) {
- var t;
- return t = e.scope.method, t && !t.klass && t.context || "this"
- }, t.prototype.unfoldSoak = function (e) {
- var n, r, i, s, o, u, a, f, l;
- if (this.soak) {
- if (this.variable) {
- if (r = ft(e, this, "variable"))return r;
- f = (new Q(this.variable)).cacheReference(e), i = f[0], o = f[1]
- } else i = new L(this.superReference(e)), o = new Q(i);
- return o = new t(o, this.args), o.isNew = this.isNew, i = new L("typeof " + i.compile(e) + ' === "function"'), new b(i, new Q(o), {soak: !0})
- }
- n = this, s = [];
- for (; ;) {
- if (n.variable instanceof t) {
- s.push(n), n = n.variable;
- continue
- }
- if (!(n.variable instanceof Q))break;
- s.push(n);
- if (!((n = n.variable.base)instanceof t))break
- }
- l = s.reverse();
- for (u = 0, a = l.length; u < a; u++)n = l[u], r && (n.variable instanceof t ? n.variable = r : n.variable.base = r), r = ft(e, n, "variable");
- return r
- }, t.prototype.filterImplicitObjects = function (e) {
- var t, n, r, i, o, u, a, f, l, c;
- n = [];
- for (u = 0, f = e.length; u < f; u++) {
- t = e[u];
- if (!((typeof t.isObject == "function" ? t.isObject() : void 0) && t.base.generated)) {
- n.push(t);
- continue
- }
- r = null, c = t.base.properties;
- for (a = 0, l = c.length; a < l; a++)i = c[a], i instanceof s || i instanceof h ? (r || n.push(r = new _(o = [], !0)), o.push(i)) : (n.push(i), r = null)
- }
- return n
- }, t.prototype.compileNode = function (e) {
- var t, n, r, i;
- return(i = this.variable) != null && (i.front = this.front), (r = z.compileSplattedArray(e, this.args, !0)) ? this.compileSplat(e, r) : (n = this.filterImplicitObjects(this.args), n = function () {
- var r, i, s;
- s = [];
- for (r = 0, i = n.length; r < i; r++)t = n[r], s.push(t.compile(e, T));
- return s
- }().join(", "), this.isSuper ? this.superReference(e) + (".call(" + this.superThis(e) + (n && ", " + n) + ")") : (this.isNew ? "new " : "") + this.variable.compile(e, S) + ("(" + n + ")"))
- }, t.prototype.compileSuper = function (e, t) {
- return"" + this.superReference(t) + ".call(" + this.superThis(t) + (e.length ? ", " : "") + e + ")"
- }, t.prototype.compileSplat = function (e, t) {
- var n, r, i, s, o;
- return this.isSuper ? "" + this.superReference(e) + ".apply(" + this.superThis(e) + ", " + t + ")" : this.isNew ? (i = this.tab + X, "(function(func, args, ctor) {\n" + i + "ctor.prototype = func.prototype;\n" + i + "var child = new ctor, result = func.apply(child, args), t = typeof result;\n" + i + 'return t == "object" || t == "function" ? result || child : child;\n' + this.tab + "})(" + this.variable.compile(e, T) + ", " + t + ", function(){})") : (n = new Q(this.variable), (s = n.properties.pop()) && n.isComplex() ? (o = e.scope.freeVariable("ref"), r = "(" + o + " = " + n.compile(e, T) + ")" + s.compile(e)) : (r = n.compile(e, S), I.test(r) && (r = "(" + r + ")"), s ? (o = r, r += s.compile(e)) : o = "null"), "" + r + ".apply(" + o + ", " + t + ")")
- }, t
- }(o), t.Extends = d = function (e) {
- function t(e, t) {
- this.child = e, this.parent = t
- }
-
- return dt(t, e), t.prototype.children = ["child", "parent"], t.prototype.compile = function (e) {
- return(new a(new Q(new L(lt("extends"))), [this.child, this.parent])).compile(e)
- }, t
- }(o), t.Access = r = function (e) {
- function t(e, t) {
- this.name = e, this.name.asKey = !0, this.soak = t === "soak"
- }
-
- return dt(t, e), t.prototype.children = ["name"], t.prototype.compile = function (e) {
- var t;
- return t = this.name.compile(e), m.test(t) ? "." + t : "[" + t + "]"
- }, t.prototype.isComplex = M, t
- }(o), t.Index = E = function (e) {
- function t(e) {
- this.index = e
- }
-
- return dt(t, e), t.prototype.children = ["index"], t.prototype.compile = function (e) {
- return"[" + this.index.compile(e, C) + "]"
- }, t.prototype.isComplex = function () {
- return this.index.isComplex()
- }, t
- }(o), t.Range = j = function (e) {
- function t(e, t, n) {
- this.from = e, this.to = t, this.exclusive = n === "exclusive", this.equals = this.exclusive ? "" : "="
- }
-
- return dt(t, e), t.prototype.children = ["from", "to"], t.prototype.compileVariables = function (e) {
- var t, n, r, i, s;
- e = st(e, {top: !0}), n = this.from.cache(e, T), this.fromC = n[0], this.fromVar = n[1], r = this.to.cache(e, T), this.toC = r[0], this.toVar = r[1];
- if (t = et(e, "step"))i = t.cache(e, T), this.step = i[0], this.stepVar = i[1];
- s = [this.fromVar.match(I), this.toVar.match(I)], this.fromNum = s[0], this.toNum = s[1];
- if (this.stepVar)return this.stepNum = this.stepVar.match(I)
- }, t.prototype.compileNode = function (e) {
- var t, n, r, i, s, o, u, a, f, l, c, h, p, d;
- return this.fromVar || this.compileVariables(e), e.index ? (u = this.fromNum && this.toNum, s = et(e, "index"), o = et(e, "name"), f = o && o !== s, h = "" + s + " = " + this.fromC, this.toC !== this.toVar && (h += ", " + this.toC), this.step !== this.stepVar && (h += ", " + this.step), p = ["" + s + " <" + this.equals, "" + s + " >" + this.equals], a = p[0], i = p[1], n = this.stepNum ? +this.stepNum > 0 ? "" + a + " " + this.toVar : "" + i + " " + this.toVar : u ? (d = [+this.fromNum, +this.toNum], r = d[0], c = d[1], d, r <= c ? "" + a + " " + c : "" + i + " " + c) : (t = "" + this.fromVar + " <= " + this.toVar, "" + t + " ? " + a + " " + this.toVar + " : " + i + " " + this.toVar), l = this.stepVar ? "" + s + " += " + this.stepVar : u ? f ? r <= c ? "++" + s : "--" + s : r <= c ? "" + s + "++" : "" + s + "--" : f ? "" + t + " ? ++" + s + " : --" + s : "" + t + " ? " + s + "++ : " + s + "--", f && (h = "" + o + " = " + h), f && (l = "" + o + " = " + l), "" + h + "; " + n + "; " + l) : this.compileArray(e)
- }, t.prototype.compileArray = function (e) {
- var t, n, r, i, s, o, u, a, f, l, c, h, p, d, v;
- if (this.fromNum && this.toNum && Math.abs(this.fromNum - this.toNum) <= 20)return f = function () {
- v = [];
- for (var e = p = +this.fromNum, t = +this.toNum; p <= t ? e <= t : e >= t; p <= t ? e++ : e--)v.push(e);
- return v
- }.apply(this), this.exclusive && f.pop(), "[" + f.join(", ") + "]";
- o = this.tab + X, s = e.scope.freeVariable("i"), l = e.scope.freeVariable("results"), a = "\n" + o + l + " = [];", this.fromNum && this.toNum ? (e.index = s, n = this.compileNode(e)) : (c = "" + s + " = " + this.fromC + (this.toC !== this.toVar ? ", " + this.toC : ""), r = "" + this.fromVar + " <= " + this.toVar, n = "var " + c + "; " + r + " ? " + s + " <" + this.equals + " " + this.toVar + " : " + s + " >" + this.equals + " " + this.toVar + "; " + r + " ? " + s + "++ : " + s + "--"), u = "{ " + l + ".push(" + s + "); }\n" + o + "return " + l + ";\n" + e.indent, i = function (e) {
- return e != null ? e.contains(function (e) {
- return e instanceof L && e.value === "arguments" && !e.asKey
- }) : void 0
- };
- if (i(this.from) || i(this.to))t = ", arguments";
- return"(function() {" + a + "\n" + o + "for (" + n + ")" + u + "}).apply(this" + (t != null ? t : "") + ")"
- }, t
- }(o), t.Slice = U = function (e) {
- function t(e) {
- this.range = e, t.__super__.constructor.call(this)
- }
-
- return dt(t, e), t.prototype.children = ["range"], t.prototype.compileNode = function (e) {
- var t, n, r, i, s, o;
- return o = this.range, i = o.to, n = o.from, r = n && n.compile(e, C) || "0", t = i && i.compile(e, C), i && (!!this.range.exclusive || +t !== -1) && (s = ", " + (this.range.exclusive ? t : I.test(t) ? "" + (+t + 1) : (t = i.compile(e, S), "+" + t + " + 1 || 9e9"))), ".slice(" + r + (s || "") + ")"
- }, t
- }(o), t.Obj = _ = function (e) {
- function t(e, t) {
- this.generated = t != null ? t : !1, this.objects = this.properties = e || []
- }
-
- return dt(t, e), t.prototype.children = ["properties"], t.prototype.compileNode = function (e) {
- var t, n, r, i, o, u, a, f, l, c, p;
- l = this.properties;
- if (!l.length)return this.front ? "({})" : "{}";
- if (this.generated)for (c = 0, p = l.length; c < p; c++) {
- u = l[c];
- if (u instanceof Q)throw new Error("cannot have an implicit value in an implicit object")
- }
- return n = e.indent += X, o = this.lastNonComment(this.properties), l = function () {
- var u, a, c;
- c = [];
- for (t = u = 0, a = l.length; u < a; t = ++u)f = l[t], i = t === l.length - 1 ? "" : f === o || f instanceof h ? "\n" : ",\n", r = f instanceof h ? "" : n, f instanceof Q && f["this"] && (f = new s(f.properties[0].name, f, "object")), f instanceof h || (f instanceof s || (f = new s(f, f, "object")), (f.variable.base || f.variable).asKey = !0), c.push(r + f.compile(e, k) + i);
- return c
- }(), l = l.join(""), a = "{" + (l && "\n" + l + "\n" + this.tab) + "}", this.front ? "(" + a + ")" : a
- }, t.prototype.assigns = function (e) {
- var t, n, r, i;
- i = this.properties;
- for (n = 0, r = i.length; n < r; n++) {
- t = i[n];
- if (t.assigns(e))return!0
- }
- return!1
- }, t
- }(o), t.Arr = i = function (e) {
- function t(e) {
- this.objects = e || []
- }
-
- return dt(t, e), t.prototype.children = ["objects"], t.prototype.filterImplicitObjects = a.prototype.filterImplicitObjects, t.prototype.compileNode = function (e) {
- var t, n, r;
- return this.objects.length ? (e.indent += X, r = this.filterImplicitObjects(this.objects), (t = z.compileSplattedArray(e, r)) ? t : (t = function () {
- var t, i, s;
- s = [];
- for (t = 0, i = r.length; t < i; t++)n = r[t], s.push(n.compile(e, T));
- return s
- }().join(", "), t.indexOf("\n") >= 0 ? "[\n" + e.indent + t + "\n" + this.tab + "]" : "[" + t + "]")) : "[]"
- }, t.prototype.assigns = function (e) {
- var t, n, r, i;
- i = this.objects;
- for (n = 0, r = i.length; n < r; n++) {
- t = i[n];
- if (t.assigns(e))return!0
- }
- return!1
- }, t
- }(o), t.Class = f = function (e) {
- function t(e, t, n) {
- this.variable = e, this.parent = t, this.body = n != null ? n : new u, this.boundFuncs = [], this.body.classBody = !0
- }
-
- return dt(t, e), t.prototype.children = ["variable", "parent", "body"], t.prototype.determineName = function () {
- var e, t;
- if (!this.variable)return null;
- e = (t = it(this.variable.properties)) ? t instanceof r && t.name.value : this.variable.base.value;
- if (vt.call(q, e) >= 0)throw SyntaxError("variable name may not be " + e);
- return e && (e = m.test(e) && e)
- }, t.prototype.setContext = function (e) {
- return this.body.traverseChildren(!1, function (t) {
- if (t.classBody)return!1;
- if (t instanceof L && t.value === "this")return t.value = e;
- if (t instanceof c) {
- t.klass = e;
- if (t.bound)return t.context = e
- }
- })
- }, t.prototype.addBoundFunctions = function (e) {
- var t, n, i, s, o, u;
- if (this.boundFuncs.length) {
- o = this.boundFuncs, u = [];
- for (i = 0, s = o.length; i < s; i++)t = o[i], n = (new Q(new L("this"), [new r(t)])).compile(e), u.push(this.ctor.body.unshift(new L("" + n + " = " + lt("bind") + "(" + n + ", this)")));
- return u
- }
- }, t.prototype.addProperties = function (e, t, n) {
- var i, o, u, a, f;
- return f = e.base.properties.slice(0), u = function () {
- var e;
- e = [];
- while (i = f.shift()) {
- if (i instanceof s) {
- o = i.variable.base, delete i.context, a = i.value;
- if (o.value === "constructor") {
- if (this.ctor)throw new Error("cannot define more than one constructor in a class");
- if (a.bound)throw new Error("cannot define a constructor as a bound function");
- a instanceof c ? i = this.ctor = a : (this.externalCtor = n.scope.freeVariable("class"), i = new s(new L(this.externalCtor), a))
- } else i.variable["this"] ? (a["static"] = !0, a.bound && (a.context = t)) : (i.variable = new Q(new L(t), [new r(new L("prototype")), new r(o)]), a instanceof c && a.bound && (this.boundFuncs.push(o), a.bound = !1))
- }
- e.push(i)
- }
- return e
- }.call(this), Z(u)
- }, t.prototype.walkBody = function (e, n) {
- var r = this;
- return this.traverseChildren(!1, function (i) {
- var s, o, a, f, l, c;
- if (i instanceof t)return!1;
- if (i instanceof u) {
- c = s = i.expressions;
- for (o = f = 0, l = c.length; f < l; o = ++f)a = c[o], a instanceof Q && a.isObject(!0) && (s[o] = r.addProperties(a, e, n));
- return i.expressions = s = rt(s)
- }
- })
- }, t.prototype.hoistDirectivePrologue = function () {
- var e, t, n;
- t = 0, e = this.body.expressions;
- while ((n = e[t]) && n instanceof h || n instanceof Q && n.isString())++t;
- return this.directives = e.splice(0, t)
- }, t.prototype.ensureConstructor = function (e) {
- return this.ctor || (this.ctor = new c, this.parent && this.ctor.body.push(new L("" + e + ".__super__.constructor.apply(this, arguments)")), this.externalCtor && this.ctor.body.push(new L("" + this.externalCtor + ".apply(this, arguments)")), this.ctor.body.makeReturn(), this.body.expressions.unshift(this.ctor)), this.ctor.ctor = this.ctor.name = e, this.ctor.klass = null, this.ctor.noReturn = !0
- }, t.prototype.compileNode = function (e) {
- var t, n, r, i, o, u, a;
- return n = this.determineName(), o = n || "_Class", o.reserved && (o = "_" + o), i = new L(o), this.hoistDirectivePrologue(), this.setContext(o), this.walkBody(o, e), this.ensureConstructor(o), this.body.spaced = !0, this.ctor instanceof c || this.body.expressions.unshift(this.ctor), this.body.expressions.push(i), (a = this.body.expressions).unshift.apply(a, this.directives), this.addBoundFunctions(e), t = l.wrap(this.body), this.parent && (this.superClass = new L(e.scope.freeVariable("super", !1)), this.body.expressions.unshift(new d(i, this.superClass)), t.args.push(this.parent), u = t.variable.params || t.variable.base.params, u.push(new P(this.superClass))), r = new H(t, !0), this.variable && (r = new s(this.variable, r)), r.compile(e)
- }, t
- }(o), t.Assign = s = function (e) {
- function t(e, t, n, r) {
- var i, s, o;
- this.variable = e, this.value = t, this.context = n, this.param = r && r.param, this.subpattern = r && r.subpattern, i = (o = s = this.variable.unwrapAll().value, vt.call(q, o) >= 0);
- if (i && this.context !== "object")throw SyntaxError('variable name may not be "' + s + '"')
- }
-
- return dt(t, e), t.prototype.children = ["variable", "value"], t.prototype.isStatement = function (e) {
- return(e != null ? e.level : void 0) === k && this.context != null && vt.call(this.context, "?") >= 0
- }, t.prototype.assigns = function (e) {
- return this[this.context === "object" ? "value" : "variable"].assigns(e)
- }, t.prototype.unfoldSoak = function (e) {
- return ft(e, this, "variable")
- }, t.prototype.compileNode = function (e) {
- var t, n, r, i, s, o, u, a, f;
- if (t = this.variable instanceof Q) {
- if (this.variable.isArray() || this.variable.isObject())return this.compilePatternMatch(e);
- if (this.variable.isSplice())return this.compileSplice(e);
- if ((o = this.context) === "||=" || o === "&&=" || o === "?=")return this.compileConditional(e)
- }
- r = this.variable.compile(e, T);
- if (!this.context) {
- if (!(s = this.variable.unwrapAll()).isAssignable())throw SyntaxError('"' + this.variable.compile(e) + '" cannot be assigned.');
- if (typeof s.hasProperties == "function" ? !s.hasProperties() : !void 0)this.param ? e.scope.add(r, "var") : e.scope.find(r)
- }
- return this.value instanceof c && (n = A.exec(r)) && (n[1] && (this.value.klass = n[1]), this.value.name = (u = (a = (f = n[2]) != null ? f : n[3]) != null ? a : n[4]) != null ? u : n[5]), i = this.value.compile(e, T), this.context === "object" ? "" + r + ": " + i : (i = r + (" " + (this.context || "=") + " ") + i, e.level <= T ? i : "(" + i + ")")
- }, t.prototype.compilePatternMatch = function (e) {
- var n, i, s, o, u, a, f, l, c, h, p, d, v, g, y, b, w, S, x, C, A, O, M, _, D, P, j;
- y = e.level === k, w = this.value, h = this.variable.base.objects;
- if (!(p = h.length))return s = w.compile(e), e.level >= N ? "(" + s + ")" : s;
- a = this.variable.isObject();
- if (y && p === 1 && !((c = h[0])instanceof z)) {
- c instanceof t ? (A = c, O = A.variable, u = O.base, c = A.value) : c.base instanceof H ? (M = (new Q(c.unwrapAll())).cacheReference(e), c = M[0], u = M[1]) : u = a ? c["this"] ? c.properties[0].name : c : new L(0), n = m.test(u.unwrap().value || 0), w = new Q(w), w.properties.push(new (n ? r : E)(u));
- if (_ = c.unwrap().value, vt.call(B, _) >= 0)throw new SyntaxError("assignment to a reserved word: " + c.compile(e) + " = " + w.compile(e));
- return(new t(c, w, null, {param: this.param})).compile(e, k)
- }
- S = w.compile(e, T), i = [], g = !1;
- if (!m.test(S) || this.variable.assigns(S))i.push("" + (d = e.scope.freeVariable("ref")) + " = " + S), S = d;
- for (o = x = 0, C = h.length; x < C; o = ++x) {
- c = h[o], u = o, a && (c instanceof t ? (D = c, P = D.variable, u = P.base, c = D.value) : c.base instanceof H ? (j = (new Q(c.unwrapAll())).cacheReference(e), c = j[0], u = j[1]) : u = c["this"] ? c.properties[0].name : c);
- if (!g && c instanceof z)l = c.name.unwrap().value, c = c.unwrap(), b = "" + p + " <= " + S + ".length ? " + lt("slice") + ".call(" + S + ", " + o, (v = p - o - 1) ? (f = e.scope.freeVariable("i"), b += ", " + f + " = " + S + ".length - " + v + ") : (" + f + " = " + o + ", [])") : b += ") : []", b = new L(b), g = "" + f + "++"; else {
- l = c.unwrap().value;
- if (c instanceof z)throw c = c.name.compile(e), new SyntaxError("multiple splats are disallowed in an assignment: " + c + "...");
- typeof u == "number" ? (u = new L(g || u), n = !1) : n = a && m.test(u.unwrap().value || 0), b = new Q(new L(S), [new (n ? r : E)(u)])
- }
- if (l != null && vt.call(B, l) >= 0)throw new SyntaxError("assignment to a reserved word: " + c.compile(e) + " = " + b.compile(e));
- i.push((new t(c, b, null, {param: this.param, subpattern: !0})).compile(e, T))
- }
- return!y && !this.subpattern && i.push(S), s = i.join(", "), e.level < T ? s : "(" + s + ")"
- }, t.prototype.compileConditional = function (e) {
- var n, r, i;
- i = this.variable.cacheReference(e), n = i[0], r = i[1];
- if (!n.properties.length && n.base instanceof L && n.base.value !== "this" && !e.scope.check(n.base.value))throw new Error('the variable "' + n.base.value + "\" can't be assigned with " + this.context + " because it has not been defined.");
- return vt.call(this.context, "?") >= 0 && (e.isExistentialEquals = !0), (new D(this.context.slice(0, -1), n, new t(r, this.value, "="))).compile(e)
- }, t.prototype.compileSplice = function (e) {
- var t, n, r, i, s, o, u, a, f, l, c, h;
- return l = this.variable.properties.pop().range, r = l.from, u = l.to, n = l.exclusive, o = this.variable.compile(e), c = (r != null ? r.cache(e, N) : void 0) || ["0", "0"], i = c[0], s = c[1], u ? (r != null ? r.isSimpleNumber() : void 0) && u.isSimpleNumber() ? (u = +u.compile(e) - +s, n || (u += 1)) : (u = u.compile(e, S) + " - " + s, n || (u += " + 1")) : u = "9e9", h = this.value.cache(e, T), a = h[0], f = h[1], t = "[].splice.apply(" + o + ", [" + i + ", " + u + "].concat(" + a + ")), " + f, e.level > k ? "(" + t + ")" : t
- }, t
- }(o), t.Code = c = function (e) {
- function t(e, t, n) {
- this.params = e || [], this.body = t || new u, this.bound = n === "boundfunc", this.bound && (this.context = "_this")
- }
-
- return dt(t, e), t.prototype.children = ["params", "body"], t.prototype.isStatement = function () {
- return!!this.ctor
- }, t.prototype.jumps = M, t.prototype.compileNode = function (e) {
- var t, n, r, o, u, a, f, l, c, h, p, d, v, m, g, y, w, E, x, T, N, C, k, A, O, M, _, P, H, B, j, F, I;
- e.scope = new R(e.scope, this.body, this), e.scope.shared = et(e, "sharedScope"), e.indent += X, delete e.bare, delete e.isExistentialEquals, c = [], n = [], _ = this.paramNames();
- for (g = 0, x = _.length; g < x; g++)a = _[g], e.scope.check(a) || e.scope.parameter(a);
- P = this.params;
- for (y = 0, T = P.length; y < T; y++) {
- l = P[y];
- if (!l.splat)continue;
- H = this.params;
- for (w = 0, N = H.length; w < N; w++)f = H[w].name, f["this"] && (f = f.properties[0].name), f.value && e.scope.add(f.value, "var", !0);
- p = new s(new Q(new i(function () {
- var t, n, r, i;
- r = this.params, i = [];
- for (t = 0, n = r.length; t < n; t++)f = r[t], i.push(f.asReference(e));
- return i
- }.call(this))), new Q(new L("arguments")));
- break
- }
- B = this.params;
- for (E = 0, C = B.length; E < C; E++)l = B[E], l.isComplex() ? (v = h = l.asReference(e), l.value && (v = new D("?", h, l.value)), n.push(new s(new Q(l.name), v, "=", {param: !0}))) : (h = l, l.value && (u = new L(h.name.value + " == null"), v = new s(new Q(l.name), l.value, "="), n.push(new b(u, v)))), p || c.push(h);
- m = this.body.isEmpty(), p && n.unshift(p), n.length && (j = this.body.expressions).unshift.apply(j, n);
- for (r = O = 0, k = c.length; O < k; r = ++O)f = c[r], e.scope.parameter(c[r] = f.compile(e));
- d = [], F = this.paramNames();
- for (M = 0, A = F.length; M < A; M++) {
- a = F[M];
- if (vt.call(d, a) >= 0)throw SyntaxError("multiple parameters named '" + a + "'");
- d.push(a)
- }
- return!m && !this.noReturn && this.body.makeReturn(), this.bound && (((I = e.scope.parent.method) != null ? I.bound : void 0) ? this.bound = this.context = e.scope.parent.method.context : this["static"] || e.scope.parent.assign("_this", "this")), o = e.indent, t = "function", this.ctor && (t += " " + this.name), t += "(" + c.join(", ") + ") {", this.body.isEmpty() || (t += "\n" + this.body.compileWithDeclarations(e) + "\n" + this.tab), t += "}", this.ctor ? this.tab + t : this.front || e.level >= S ? "(" + t + ")" : t
- }, t.prototype.paramNames = function () {
- var e, t, n, r, i;
- e = [], i = this.params;
- for (n = 0, r = i.length; n < r; n++)t = i[n], e.push.apply(e, t.names());
- return e
- }, t.prototype.traverseChildren = function (e, n) {
- if (e)return t.__super__.traverseChildren.call(this, e, n)
- }, t
- }(o), t.Param = P = function (e) {
- function t(e, t, n) {
- var r;
- this.name = e, this.value = t, this.splat = n;
- if (r = e = this.name.unwrapAll().value, vt.call(q, r) >= 0)throw SyntaxError('parameter name "' + e + '" is not allowed')
- }
-
- return dt(t, e), t.prototype.children = ["name", "value"], t.prototype.compile = function (e) {
- return this.name.compile(e, T)
- }, t.prototype.asReference = function (e) {
- var t;
- return this.reference ? this.reference : (t = this.name, t["this"] ? (t = t.properties[0].name, t.value.reserved && (t = new L(e.scope.freeVariable(t.value)))) : t.isComplex() && (t = new L(e.scope.freeVariable("arg"))), t = new Q(t), this.splat && (t = new z(t)), this.reference = t)
- }, t.prototype.isComplex = function () {
- return this.name.isComplex()
- }, t.prototype.names = function (e) {
- var t, n, r, i, o, u;
- e == null && (e = this.name), t = function (e) {
- var t;
- return t = e.properties[0].name.value, t.reserved ? [] : [t]
- };
- if (e instanceof L)return[e.value];
- if (e instanceof Q)return t(e);
- n = [], u = e.objects;
- for (i = 0, o = u.length; i < o; i++) {
- r = u[i];
- if (r instanceof s)n.push(r.value.unwrap().value); else if (r instanceof z)n.push(r.name.unwrap().value); else {
- if (!(r instanceof Q))throw SyntaxError("illegal parameter " + r.compile());
- r.isArray() || r.isObject() ? n.push.apply(n, this.names(r.base)) : r["this"] ? n.push.apply(n, t(r)) : n.push(r.base.value)
- }
- }
- return n
- }, t
- }(o), t.Splat = z = function (e) {
- function t(e) {
- this.name = e.compile ? e : new L(e)
- }
-
- return dt(t, e), t.prototype.children = ["name"], t.prototype.isAssignable = Y, t.prototype.assigns = function (e) {
- return this.name.assigns(e)
- }, t.prototype.compile = function (e) {
- return this.index != null ? this.compileParam(e) : this.name.compile(e)
- }, t.prototype.unwrap = function () {
- return this.name
- }, t.compileSplattedArray = function (e, n, r) {
- var i, s, o, u, a, f, l, c;
- a = -1;
- while ((f = n[++a]) && !(f instanceof t))continue;
- if (a >= n.length)return"";
- if (n.length === 1)return o = n[0].compile(e, T), r ? o : "" + lt("slice") + ".call(" + o + ")";
- i = n.slice(a);
- for (u = l = 0, c = i.length; l < c; u = ++l)f = i[u], o = f.compile(e, T), i[u] = f instanceof t ? "" + lt("slice") + ".call(" + o + ")" : "[" + o + "]";
- return a === 0 ? i[0] + (".concat(" + i.slice(1).join(", ") + ")") : (s = function () {
- var t, r, i, s;
- i = n.slice(0, a), s = [];
- for (t = 0, r = i.length; t < r; t++)f = i[t], s.push(f.compile(e, T));
- return s
- }(), "[" + s.join(", ") + "].concat(" + i.join(", ") + ")")
- }, t
- }(o), t.While = G = function (e) {
- function t(e, t) {
- this.condition = (t != null ? t.invert : void 0) ? e.invert() : e, this.guard = t != null ? t.guard : void 0
- }
-
- return dt(t, e), t.prototype.children = ["condition", "guard", "body"], t.prototype.isStatement = Y, t.prototype.makeReturn = function (e) {
- return e ? t.__super__.makeReturn.apply(this, arguments) : (this.returns = !this.jumps({loop: !0}), this)
- }, t.prototype.addBody = function (e) {
- return this.body = e, this
- }, t.prototype.jumps = function () {
- var e, t, n, r;
- e = this.body.expressions;
- if (!e.length)return!1;
- for (n = 0, r = e.length; n < r; n++) {
- t = e[n];
- if (t.jumps({loop: !0}))return t
- }
- return!1
- }, t.prototype.compileNode = function (e) {
- var t, n, r, i;
- return e.indent += X, i = "", t = this.body, t.isEmpty() ? t = "" : (this.returns && (t.makeReturn(r = e.scope.freeVariable("results")), i = "" + this.tab + r + " = [];\n"), this.guard && (t.expressions.length > 1 ? t.expressions.unshift(new b((new H(this.guard)).invert(), new L("continue"))) : this.guard && (t = u.wrap([new b(this.guard, t)]))), t = "\n" + t.compile(e, k) + "\n" + this.tab), n = i + this.tab + ("while (" + this.condition.compile(e, C) + ") {" + t + "}"), this.returns && (n += "\n" + this.tab + "return " + r + ";"), n
- }, t
- }(o), t.Op = D = function (e) {
- function r(e, n, r, i) {
- if (e === "in")return new w(n, r);
- if (e === "do")return this.generateDo(n);
- if (e === "new") {
- if (n instanceof a && !n["do"] && !n.isNew)return n.newInstance();
- if (n instanceof c && n.bound || n["do"])n = new H(n)
- }
- return this.operator = t[e] || e, this.first = n, this.second = r, this.flip = !!i, this
- }
-
- var t, n;
- return dt(r, e), t = {"==": "===", "!=": "!==", of: "in"}, n = {"!==": "===", "===": "!=="}, r.prototype.children = ["first", "second"], r.prototype.isSimpleNumber = M, r.prototype.isUnary = function () {
- return!this.second
- }, r.prototype.isComplex = function () {
- var e;
- return!this.isUnary() || (e = this.operator) !== "+" && e !== "-" || this.first.isComplex()
- }, r.prototype.isChainable = function () {
- var e;
- return(e = this.operator) === "<" || e === ">" || e === ">=" || e === "<=" || e === "===" || e === "!=="
- }, r.prototype.invert = function () {
- var e, t, i, s, o;
- if (this.isChainable() && this.first.isChainable()) {
- e = !0, t = this;
- while (t && t.operator)e && (e = t.operator in n), t = t.first;
- if (!e)return(new H(this)).invert();
- t = this;
- while (t && t.operator)t.invert = !t.invert, t.operator = n[t.operator], t = t.first;
- return this
- }
- return(s = n[this.operator]) ? (this.operator = s, this.first.unwrap()instanceof r && this.first.invert(), this) : this.second ? (new H(this)).invert() : this.operator === "!" && (i = this.first.unwrap())instanceof r && ((o = i.operator) === "!" || o === "in" || o === "instanceof") ? i : new r("!", this)
- }, r.prototype.unfoldSoak = function (e) {
- var t;
- return((t = this.operator) === "++" || t === "--" || t === "delete") && ft(e, this, "first")
- }, r.prototype.generateDo = function (e) {
- var t, n, r, i, o, u, f, l;
- i = [], n = e instanceof s && (o = e.value.unwrap())instanceof c ? o : e, l = n.params || [];
- for (u = 0, f = l.length; u < f; u++)r = l[u], r.value ? (i.push(r.value), delete r.value) : i.push(r);
- return t = new a(e, i), t["do"] = !0, t
- }, r.prototype.compileNode = function (e) {
- var t, n, r, i;
- n = this.isChainable() && this.first.isChainable(), n || (this.first.front = this.front);
- if (this.operator === "delete" && e.scope.check(this.first.unwrapAll().value))throw SyntaxError("delete operand may not be argument or var");
- if (((r = this.operator) === "--" || r === "++") && (i = this.first.unwrapAll().value, vt.call(q, i) >= 0))throw SyntaxError("prefix increment/decrement may not have eval or arguments operand");
- return this.isUnary() ? this.compileUnary(e) : n ? this.compileChain(e) : this.operator === "?" ? this.compileExistence(e) : (t = this.first.compile(e, N) + " " + this.operator + " " + this.second.compile(e, N), e.level <= N ? t : "(" + t + ")")
- }, r.prototype.compileChain = function (e) {
- var t, n, r, i;
- return i = this.first.second.cache(e), this.first.second = i[0], r = i[1], n = this.first.compile(e, N), t = "" + n + " " + (this.invert ? "&&" : "||") + " " + r.compile(e) + " " + this.operator + " " + this.second.compile(e, N), "(" + t + ")"
- }, r.prototype.compileExistence = function (e) {
- var t, n;
- return this.first.isComplex() ? (n = new L(e.scope.freeVariable("ref")), t = new H(new s(n, this.first))) : (t = this.first, n = t), (new b(new p(t), n, {type: "if"})).addElse(this.second).compile(e)
- }, r.prototype.compileUnary = function (e) {
- var t, n, i;
- if (e.level >= S)return(new H(this)).compile(e);
- n = [t = this.operator], i = t === "+" || t === "-", (t === "new" || t === "typeof" || t === "delete" || i && this.first instanceof r && this.first.operator === t) && n.push(" ");
- if (i && this.first instanceof r || t === "new" && this.first.isStatement(e))this.first = new H(this.first);
- return n.push(this.first.compile(e, N)), this.flip && n.reverse(), n.join("")
- }, r.prototype.toString = function (e) {
- return r.__super__.toString.call(this, e, this.constructor.name + " " + this.operator)
- }, r
- }(o), t.In = w = function (e) {
- function t(e, t) {
- this.object = e, this.array = t
- }
-
- return dt(t, e), t.prototype.children = ["object", "array"], t.prototype.invert = O, t.prototype.compileNode = function (e) {
- var t, n, r, i, s;
- if (this.array instanceof Q && this.array.isArray()) {
- s = this.array.base.objects;
- for (r = 0, i = s.length; r < i; r++) {
- n = s[r];
- if (n instanceof z) {
- t = !0;
- break
- }
- continue
- }
- if (!t)return this.compileOrTest(e)
- }
- return this.compileLoopTest(e)
- }, t.prototype.compileOrTest = function (e) {
- var t, n, r, i, s, o, u, a, f;
- return this.array.base.objects.length === 0 ? "" + !!this.negated : (a = this.object.cache(e, N), o = a[0], s = a[1], f = this.negated ? [" !== ", " && "] : [" === ", " || "], t = f[0], n = f[1], u = function () {
- var n, u, a, f;
- a = this.array.base.objects, f = [];
- for (r = n = 0, u = a.length; n < u; r = ++n)i = a[r], f.push((r ? s : o) + t + i.compile(e, S));
- return f
- }.call(this), u = u.join(n), e.level < N ? u : "(" + u + ")")
- }, t.prototype.compileLoopTest = function (e) {
- var t, n, r, i;
- return i = this.object.cache(e, T), r = i[0], n = i[1], t = lt("indexOf") + (".call(" + this.array.compile(e, T) + ", " + n + ") ") + (this.negated ? "< 0" : ">= 0"), r === n ? t : (t = r + ", " + t, e.level < T ? t : "(" + t + ")")
- }, t.prototype.toString = function (e) {
- return t.__super__.toString.call(this, e, this.constructor.name + (this.negated ? "!" : ""))
- }, t
- }(o), t.Try = J = function (e) {
- function t(e, t, n, r) {
- this.attempt = e, this.error = t, this.recovery = n, this.ensure = r
- }
-
- return dt(t, e), t.prototype.children = ["attempt", "recovery", "ensure"], t.prototype.isStatement = Y, t.prototype.jumps = function (e) {
- var t;
- return this.attempt.jumps(e) || ((t = this.recovery) != null ? t.jumps(e) : void 0)
- }, t.prototype.makeReturn = function (e) {
- return this.attempt && (this.attempt = this.attempt.makeReturn(e)), this.recovery && (this.recovery = this.recovery.makeReturn(e)), this
- }, t.prototype.compileNode = function (e) {
- var t, n, r, i;
- return e.indent += X, r = this.error ? " (" + this.error.compile(e) + ") " : " ", i = this.attempt.compile(e, k), t = function () {
- var t;
- if (this.recovery) {
- if (t = this.error.value, vt.call(q, t) >= 0)throw SyntaxError('catch variable may not be "' + this.error.value + '"');
- return e.scope.check(this.error.value) || e.scope.add(this.error.value, "param"), " catch" + r + "{\n" + this.recovery.compile(e, k) + "\n" + this.tab + "}"
- }
- if (!this.ensure && !this.recovery)return" catch (_error) {}"
- }.call(this), n = this.ensure ? " finally {\n" + this.ensure.compile(e, k) + "\n" + this.tab + "}" : "", "" + this.tab + "try {\n" + i + "\n" + this.tab + "}" + (t || "") + n
- }, t
- }(o), t.Throw = $ = function (e) {
- function t(e) {
- this.expression = e
- }
-
- return dt(t, e), t.prototype.children = ["expression"], t.prototype.isStatement = Y, t.prototype.jumps = M, t.prototype.makeReturn = V, t.prototype.compileNode = function (e) {
- return this.tab + ("throw " + this.expression.compile(e) + ";")
- }, t
- }(o), t.Existence = p = function (e) {
- function t(e) {
- this.expression = e
- }
-
- return dt(t, e), t.prototype.children = ["expression"], t.prototype.invert = O, t.prototype.compileNode = function (e) {
- var t, n, r, i;
- return this.expression.front = this.front, r = this.expression.compile(e, N), m.test(r) && !e.scope.check(r) ? (i = this.negated ? ["===", "||"] : ["!==", "&&"], t = i[0], n = i[1], r = "typeof " + r + " " + t + ' "undefined" ' + n + " " + r + " " + t + " null") : r = "" + r + " " + (this.negated ? "==" : "!=") + " null", e.level <= x ? r : "(" + r + ")"
- }, t
- }(o), t.Parens = H = function (e) {
- function t(e) {
- this.body = e
- }
-
- return dt(t, e), t.prototype.children = ["body"], t.prototype.unwrap = function () {
- return this.body
- }, t.prototype.isComplex = function () {
- return this.body.isComplex()
- }, t.prototype.compileNode = function (e) {
- var t, n, r;
- return r = this.body.unwrap(), r instanceof Q && r.isAtomic() ? (r.front = this.front, r.compile(e)) : (n = r.compile(e, C), t = e.level < N && (r instanceof D || r instanceof a || r instanceof v && r.returns), t ? n : "(" + n + ")")
- }, t
- }(o), t.For = v = function (e) {
- function t(e, t) {
- var n;
- this.source = t.source, this.guard = t.guard, this.step = t.step, this.name = t.name, this.index = t.index, this.body = u.wrap([e]), this.own = !!t.own, this.object = !!t.object, this.object && (n = [this.index, this.name], this.name = n[0], this.index = n[1]);
- if (this.index instanceof Q)throw SyntaxError("index cannot be a pattern matching expression");
- this.range = this.source instanceof Q && this.source.base instanceof j && !this.source.properties.length, this.pattern = this.name instanceof Q;
- if (this.range && this.index)throw SyntaxError("indexes do not apply to range loops");
- if (this.range && this.pattern)throw SyntaxError("cannot pattern match over range loops");
- this.returns = !1
- }
-
- return dt(t, e), t.prototype.children = ["body", "source", "guard", "step"], t.prototype.compileNode = function (e) {
- var t, n, r, i, o, a, f, l, c, h, p, d, v, g, y, w, E, S, x, C, A, O, M, _, D;
- return t = u.wrap([this.body]), p = (D = it(t.expressions)) != null ? D.jumps() : void 0, p && p instanceof F && (this.returns = !1), C = this.range ? this.source.base : this.source, x = e.scope, v = this.name && this.name.compile(e, T), f = this.index && this.index.compile(e, T), v && !this.pattern && x.find(v), f && x.find(f), this.returns && (S = x.freeVariable("results")), l = this.object && f || x.freeVariable("i"), c = this.range && v || f || l, h = c !== l ? "" + c + " = " : "", this.step && !this.range && (O = x.freeVariable("step")), this.pattern && (v = l), _ = "", o = "", n = "", a = this.tab + X, this.range ? r = C.compile(st(e, {index: l, name: v, step: this.step})) : (M = this.source.compile(e, T), (v || this.own) && !m.test(M) && (n = "" + this.tab + (y = x.freeVariable("ref")) + " = " + M + ";\n", M = y), v && !this.pattern && (g = "" + v + " = " + M + "[" + c + "]"), this.object || (d = x.freeVariable("len"), i = "" + h + l + " = 0, " + d + " = " + M + ".length", this.step && (i += ", " + O + " = " + this.step.compile(e, N)), A = "" + h + (this.step ? "" + l + " += " + O : c !== l ? "++" + l : "" + l + "++"), r = "" + i + "; " + l + " < " + d + "; " + A)), this.returns && (w = "" + this.tab + S + " = [];\n", E = "\n" + this.tab + "return " + S + ";", t.makeReturn(S)), this.guard && (t.expressions.length > 1 ? t.expressions.unshift(new b((new H(this.guard)).invert(), new L("continue"))) : this.guard && (t = u.wrap([new b(this.guard, t)]))), this.pattern && t.expressions.unshift(new s(this.name, new L("" + M + "[" + c + "]"))), n += this.pluckDirectCall(e, t), g && (_ = "\n" + a + g + ";"), this.object && (r = "" + c + " in " + M, this.own && (o = "\n" + a + "if (!" + lt("hasProp") + ".call(" + M + ", " + c + ")) continue;")), t = t.compile(st(e, {indent: a}), k), t && (t = "\n" + t + "\n"), "" + n + (w || "") + this.tab + "for (" + r + ") {" + o + _ + t + this.tab + "}" + (E || "")
- }, t.prototype.pluckDirectCall = function (e, t) {
- var n, r, i, o, u, f, l, h, p, d, v, m, g, y, b;
- r = "", d = t.expressions;
- for (u = h = 0, p = d.length; h < p; u = ++h) {
- i = d[u], i = i.unwrapAll();
- if (!(i instanceof a))continue;
- l = i.variable.unwrapAll();
- if (!(l instanceof c || l instanceof Q && ((v = l.base) != null ? v.unwrapAll() : void 0)instanceof c && l.properties.length === 1 && ((m = (g = l.properties[0].name) != null ? g.value : void 0) === "call" || m === "apply")))continue;
- o = ((y = l.base) != null ? y.unwrapAll() : void 0) || l, f = new L(e.scope.freeVariable("fn")), n = new Q(f), l.base && (b = [n, l], l.base = b[0], n = b[1]), t.expressions[u] = new a(n, i.args), r += this.tab + (new s(f, o)).compile(e, k) + ";\n"
- }
- return r
- }, t
- }(G), t.Switch = W = function (e) {
- function t(e, t, n) {
- this.subject = e, this.cases = t, this.otherwise = n
- }
-
- return dt(t, e), t.prototype.children = ["subject", "cases", "otherwise"], t.prototype.isStatement = Y, t.prototype.jumps = function (e) {
- var t, n, r, i, s, o, u;
- e == null && (e = {block: !0}), s = this.cases;
- for (r = 0, i = s.length; r < i; r++) {
- o = s[r], n = o[0], t = o[1];
- if (t.jumps(e))return t
- }
- return(u = this.otherwise) != null ? u.jumps(e) : void 0
- }, t.prototype.makeReturn = function (e) {
- var t, n, r, i, s;
- i = this.cases;
- for (n = 0, r = i.length; n < r; n++)t = i[n], t[1].makeReturn(e);
- return e && (this.otherwise || (this.otherwise = new u([new L("void 0")]))), (s = this.otherwise) != null && s.makeReturn(e), this
- }, t.prototype.compileNode = function (e) {
- var t, n, r, i, s, o, u, a, f, l, c, h, p, d, v, m, g;
- a = e.indent + X, f = e.indent = a + X, r = this.tab + ("switch (" + (((d = this.subject) != null ? d.compile(e, C) : void 0) || !1) + ") {\n"), v = this.cases;
- for (u = l = 0, h = v.length; l < h; u = ++l) {
- m = v[u], s = m[0], t = m[1], g = rt([s]);
- for (c = 0, p = g.length; c < p; c++)i = g[c], this.subject || (i = i.invert()), r += a + ("case " + i.compile(e, C) + ":\n");
- if (n = t.compile(e, k))r += n + "\n";
- if (u === this.cases.length - 1 && !this.otherwise)break;
- o = this.lastNonComment(t.expressions);
- if (o instanceof F || o instanceof L && o.jumps() && o.value !== "debugger")continue;
- r += f + "break;\n"
- }
- return this.otherwise && this.otherwise.expressions.length && (r += a + ("default:\n" + this.otherwise.compile(e, k) + "\n")), r + this.tab + "}"
- }, t
- }(o), t.If = b = function (e) {
- function t(e, t, n) {
- this.body = t, n == null && (n = {}), this.condition = n.type === "unless" ? e.invert() : e, this.elseBody = null, this.isChain = !1, this.soak = n.soak
- }
-
- return dt(t, e), t.prototype.children = ["condition", "body", "elseBody"], t.prototype.bodyNode = function () {
- var e;
- return(e = this.body) != null ? e.unwrap() : void 0
- }, t.prototype.elseBodyNode = function () {
- var e;
- return(e = this.elseBody) != null ? e.unwrap() : void 0
- }, t.prototype.addElse = function (e) {
- return this.isChain ? this.elseBodyNode().addElse(e) : (this.isChain = e instanceof t, this.elseBody = this.ensureBlock(e)), this
- }, t.prototype.isStatement = function (e) {
- var t;
- return(e != null ? e.level : void 0) === k || this.bodyNode().isStatement(e) || ((t = this.elseBodyNode()) != null ? t.isStatement(e) : void 0)
- }, t.prototype.jumps = function (e) {
- var t;
- return this.body.jumps(e) || ((t = this.elseBody) != null ? t.jumps(e) : void 0)
- }, t.prototype.compileNode = function (e) {
- return this.isStatement(e) ? this.compileStatement(e) : this.compileExpression(e)
- }, t.prototype.makeReturn = function (e) {
- return e && (this.elseBody || (this.elseBody = new u([new L("void 0")]))), this.body && (this.body = new u([this.body.makeReturn(e)])), this.elseBody && (this.elseBody = new u([this.elseBody.makeReturn(e)])), this
- }, t.prototype.ensureBlock = function (e) {
- return e instanceof u ? e : new u([e])
- }, t.prototype.compileStatement = function (e) {
- var n, r, i, s, o;
- return r = et(e, "chainChild"), s = et(e, "isExistentialEquals"), s ? (new t(this.condition.invert(), this.elseBodyNode(), {type: "if"})).compile(e) : (i = this.condition.compile(e, C), e.indent += X, n = this.ensureBlock(this.body), o = "if (" + i + ") {\n" + n.compile(e) + "\n" + this.tab + "}", r || (o = this.tab + o), this.elseBody ? o + " else " + (this.isChain ? (e.indent = this.tab, e.chainChild = !0, this.elseBody.unwrap().compile(e, k)) : "{\n" + this.elseBody.compile(e, k) + "\n" + this.tab + "}") : o)
- }, t.prototype.compileExpression = function (e) {
- var t, n, r, i;
- return i = this.condition.compile(e, x), n = this.bodyNode().compile(e, T), t = this.elseBodyNode() ? this.elseBodyNode().compile(e, T) : "void 0", r = "" + i + " ? " + n + " : " + t, e.level >= x ? "(" + r + ")" : r
- }, t.prototype.unfoldSoak = function () {
- return this.soak && this
- }, t
- }(o), l = {wrap: function (e, t, n) {
- var i, s, o, f, l;
- if (e.jumps())return e;
- o = new c([], u.wrap([e])), i = [];
- if ((f = e.contains(this.literalArgs)) || e.contains(this.literalThis))l = new L(f ? "apply" : "call"), i = [new L("this")], f && i.push(new L("arguments")), o = new Q(o, [new r(l)]);
- return o.noReturn = n, s = new a(o, i), t ? u.wrap([s]) : s
- }, literalArgs: function (e) {
- return e instanceof L && e.value === "arguments" && !e.asKey
- }, literalThis: function (e) {
- return e instanceof L && e.value === "this" && !e.asKey || e instanceof c && e.bound || e instanceof a && e.isSuper
- }}, ft = function (e, t, n) {
- var r;
- if (!(r = t[n].unfoldSoak(e)))return;
- return t[n] = r.body, r.body = new Q(t), r
- }, K = {"extends": function () {
- return"function(child, parent) { for (var key in parent) { if (" + lt("hasProp") + ".call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }"
- }, bind: function () {
- return"function(fn, me){ return function(){ return fn.apply(me, arguments); }; }"
- }, indexOf: function () {
- return"[].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; }"
- }, hasProp: function () {
- return"{}.hasOwnProperty"
- }, slice: function () {
- return"[].slice"
- }}, k = 1, C = 2, T = 3, x = 4, N = 5, S = 6, X = " ", g = "[$A-Za-z_\\x7f-\\uffff][$\\w\\x7f-\\uffff]*", m = RegExp("^" + g + "$"), I = /^[+-]?\d+$/, A = RegExp("^(?:(" + g + ")\\.prototype(?:\\.(" + g + ")|\\[(\"(?:[^\\\\\"\\r\\n]|\\\\.)*\"|'(?:[^\\\\'\\r\\n]|\\\\.)*')\\]|\\[(0x[\\da-fA-F]+|\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\]))|(" + g + ")$"), y = /^['"]/, lt = function (e) {
- var t;
- return t = "__" + e, R.root.assign(t, K[e]()), t
- }, ot = function (e, t) {
- return e = e.replace(/\n/g, "$&" + t), e.replace(/\s+$/, "")
- }
-}), define("ace/mode/coffee/scope", ["require", "exports", "module", "ace/mode/coffee/helpers"], function (e, t, n) {
- var r, i, s, o;
- o = e("./helpers"), i = o.extend, s = o.last, t.Scope = r = function () {
- function e(t, n, r) {
- this.parent = t, this.expressions = n, this.method = r, this.variables = [
- {name: "arguments", type: "arguments"}
- ], this.positions = {}, this.parent || (e.root = this)
- }
-
- return e.root = null, e.prototype.add = function (e, t, n) {
- return this.shared && !n ? this.parent.add(e, t, n) : Object.prototype.hasOwnProperty.call(this.positions, e) ? this.variables[this.positions[e]].type = t : this.positions[e] = this.variables.push({name: e, type: t}) - 1
- }, e.prototype.namedMethod = function () {
- return this.method.name || !this.parent ? this.method : this.parent.namedMethod()
- }, e.prototype.find = function (e) {
- return this.check(e) ? !0 : (this.add(e, "var"), !1)
- }, e.prototype.parameter = function (e) {
- if (this.shared && this.parent.check(e, !0))return;
- return this.add(e, "param")
- }, e.prototype.check = function (e) {
- var t;
- return!!(this.type(e) || ((t = this.parent) != null ? t.check(e) : void 0))
- }, e.prototype.temporary = function (e, t) {
- return e.length > 1 ? "_" + e + (t > 1 ? t - 1 : "") : "_" + (t + parseInt(e, 36)).toString(36).replace(/\d/g, "a")
- }, e.prototype.type = function (e) {
- var t, n, r, i;
- i = this.variables;
- for (n = 0, r = i.length; n < r; n++) {
- t = i[n];
- if (t.name === e)return t.type
- }
- return null
- }, e.prototype.freeVariable = function (e, t) {
- var n, r;
- t == null && (t = !0), n = 0;
- while (this.check(r = this.temporary(e, n)))n++;
- return t && this.add(r, "var", !0), r
- }, e.prototype.assign = function (e, t) {
- return this.add(e, {value: t, assigned: !0}, !0), this.hasAssignments = !0
- }, e.prototype.hasDeclarations = function () {
- return!!this.declaredVariables().length
- }, e.prototype.declaredVariables = function () {
- var e, t, n, r, i, s;
- e = [], t = [], s = this.variables;
- for (r = 0, i = s.length; r < i; r++)n = s[r], n.type === "var" && (n.name.charAt(0) === "_" ? t : e).push(n.name);
- return e.sort().concat(t.sort())
- }, e.prototype.assignedVariables = function () {
- var e, t, n, r, i;
- r = this.variables, i = [];
- for (t = 0, n = r.length; t < n; t++)e = r[t], e.type.assigned && i.push("" + e.name + " = " + e.type.value);
- return i
- }, e
- }()
-})
\ No newline at end of file
diff --git a/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/worker-css.js b/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/worker-css.js
deleted file mode 100644
index 48ef58d..0000000
--- a/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/worker-css.js
+++ /dev/null
@@ -1,2315 +0,0 @@
-"no use strict";
-function initBaseUrls(e) {
- require.tlns = e
-}
-function initSender() {
- var e = require(null, "ace/lib/event_emitter").EventEmitter, t = require(null, "ace/lib/oop"), n = function () {
- };
- return function () {
- t.implement(this, e), 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(n.prototype), new n
-}
-if (typeof window != "undefined" && window.document)throw"atempt to load ace worker into main window instead of webWorker";
-var console = {log: function () {
- var e = Array.prototype.slice.call(arguments, 0);
- postMessage({type: "log", data: e})
-}, error: function () {
- var e = Array.prototype.slice.call(arguments, 0);
- postMessage({type: "log", data: e})
-}}, window = {console: console}, normalizeModule = function (e, t) {
- if (t.indexOf("!") !== -1) {
- var n = t.split("!");
- return normalizeModule(e, n[0]) + "!" + normalizeModule(e, n[1])
- }
- if (t.charAt(0) == ".") {
- var r = e.split("/").slice(0, -1).join("/");
- t = r + "/" + t;
- while (t.indexOf(".") !== -1 && i != t) {
- var i = t;
- t = t.replace(/\/\.\//, "/").replace(/[^\/]+\/\.\.\//, "")
- }
- }
- return t
-}, require = function (e, t) {
- if (!t.charAt)throw new Error("worker.js require() accepts only (parentId, id) as arguments");
- t = normalizeModule(e, t);
- var n = require.modules[t];
- if (n)return n.initialized || (n.initialized = !0, n.exports = n.factory().exports), n.exports;
- var r = t.split("/");
- r[0] = require.tlns[r[0]] || r[0];
- var i = r.join("/") + ".js";
- return require.id = t, importScripts(i), require(e, t)
-};
-require.modules = {}, require.tlns = {};
-var define = function (e, t, n) {
- arguments.length == 2 ? (n = t, typeof e != "string" && (t = e, e = require.id)) : arguments.length == 1 && (n = e, e = require.id);
- if (e.indexOf("text!") === 0)return;
- var r = function (t, n) {
- return require(e, t, n)
- };
- require.modules[e] = {factory: function () {
- var e = {exports: {}}, t = n(r, e.exports, e);
- return t && (e.exports = t), e
- }}
-}, main, sender;
-onmessage = function (e) {
- var t = e.data;
- if (t.command) {
- if (!main[t.command])throw new Error("Unknown command:" + t.command);
- main[t.command].apply(main, t.args)
- } else if (t.init) {
- initBaseUrls(t.tlns), require(null, "ace/lib/fixoldbrowsers"), sender = initSender();
- var n = require(null, t.module)[t.classname];
- main = new n(sender)
- } else t.event && sender && sender._emit(t.event, t.data)
-}, define("ace/lib/fixoldbrowsers", ["require", "exports", "module", "ace/lib/regexp", "ace/lib/es5-shim"], function (e, t, n) {
- e("./regexp"), e("./es5-shim")
-}), define("ace/lib/regexp", ["require", "exports", "module"], function (e, t, n) {
- function o(e) {
- return(e.global ? "g" : "") + (e.ignoreCase ? "i" : "") + (e.multiline ? "m" : "") + (e.extended ? "x" : "") + (e.sticky ? "y" : "")
- }
-
- function u(e, t, n) {
- if (Array.prototype.indexOf)return e.indexOf(t, n);
- for (var r = n || 0; r < e.length; r++)if (e[r] === t)return r;
- return-1
- }
-
- var r = {exec: RegExp.prototype.exec, test: RegExp.prototype.test, match: String.prototype.match, replace: String.prototype.replace, split: String.prototype.split}, i = r.exec.call(/()??/, "")[1] === undefined, s = function () {
- var e = /^/g;
- return r.test.call(e, ""), !e.lastIndex
- }();
- if (s && i)return;
- RegExp.prototype.exec = function (e) {
- var t = r.exec.apply(this, arguments), n, a;
- if (typeof e == "string" && t) {
- !i && t.length > 1 && u(t, "") > -1 && (a = RegExp(this.source, r.replace.call(o(this), "g", "")), r.replace.call(e.slice(t.index), a, function () {
- for (var e = 1; e < arguments.length - 2; e++)arguments[e] === undefined && (t[e] = undefined)
- }));
- if (this._xregexp && this._xregexp.captureNames)for (var f = 1; f < t.length; f++)n = this._xregexp.captureNames[f - 1], n && (t[n] = t[f]);
- !s && this.global && !t[0].length && this.lastIndex > t.index && this.lastIndex--
- }
- return t
- }, s || (RegExp.prototype.test = function (e) {
- var t = r.exec.call(this, e);
- return t && this.global && !t[0].length && this.lastIndex > t.index && this.lastIndex--, !!t
- })
-}), define("ace/lib/es5-shim", ["require", "exports", "module"], function (e, t, n) {
- function r() {
- }
-
- function w(e) {
- try {
- return Object.defineProperty(e, "sentinel", {}), "sentinel"in e
- } catch (t) {
- }
- }
-
- function j(e) {
- return e = +e, e !== e ? e = 0 : e !== 0 && e !== 1 / 0 && e !== -1 / 0 && (e = (e > 0 || -1) * Math.floor(Math.abs(e))), e
- }
-
- function F(e) {
- var t = typeof e;
- return e === null || t === "undefined" || t === "boolean" || t === "number" || t === "string"
- }
-
- function I(e) {
- var t, n, r;
- if (F(e))return e;
- n = e.valueOf;
- if (typeof n == "function") {
- t = n.call(e);
- if (F(t))return t
- }
- r = e.toString;
- if (typeof r == "function") {
- t = r.call(e);
- if (F(t))return t
- }
- throw new TypeError
- }
-
- Function.prototype.bind || (Function.prototype.bind = function (t) {
- var n = this;
- if (typeof n != "function")throw new TypeError("Function.prototype.bind called on incompatible " + n);
- var i = u.call(arguments, 1), s = function () {
- if (this instanceof s) {
- var e = n.apply(this, i.concat(u.call(arguments)));
- return Object(e) === e ? e : this
- }
- return n.apply(t, i.concat(u.call(arguments)))
- };
- return n.prototype && (r.prototype = n.prototype, s.prototype = new r, r.prototype = null), s
- });
- var i = Function.prototype.call, s = Array.prototype, o = Object.prototype, u = s.slice, a = i.bind(o.toString), f = i.bind(o.hasOwnProperty), l, c, h, p, d;
- if (d = f(o, "__defineGetter__"))l = i.bind(o.__defineGetter__), c = i.bind(o.__defineSetter__), h = i.bind(o.__lookupGetter__), p = i.bind(o.__lookupSetter__);
- if ([1, 2].splice(0).length != 2)if (!function () {
- function e(e) {
- var t = new Array(e + 2);
- return t[0] = t[1] = 0, t
- }
-
- var t = [], n;
- t.splice.apply(t, e(20)), t.splice.apply(t, e(26)), n = t.length, t.splice(5, 0, "XXX"), n + 1 == t.length;
- if (n + 1 == t.length)return!0
- }())Array.prototype.splice = function (e, t) {
- var n = this.length;
- e > 0 ? e > n && (e = n) : e == void 0 ? e = 0 : e < 0 && (e = Math.max(n + e, 0)), e + t < n || (t = n - e);
- var r = this.slice(e, e + t), i = u.call(arguments, 2), s = i.length;
- if (e === n)s && this.push.apply(this, i); else {
- var o = Math.min(t, n - e), a = e + o, f = a + s - o, l = n - a, c = n - o;
- if (f < a)for (var h = 0; h < l; ++h)this[f + h] = this[a + h]; else if (f > a)for (h = l; h--;)this[f + h] = this[a + h];
- if (s && e === c)this.length = c, this.push.apply(this, i); else {
- this.length = c + s;
- for (h = 0; h < s; ++h)this[e + h] = i[h]
- }
- }
- return r
- }; else {
- var v = Array.prototype.splice;
- Array.prototype.splice = function (e, t) {
- return arguments.length ? v.apply(this, [e === void 0 ? 0 : e, t === void 0 ? this.length - e : t].concat(u.call(arguments, 2))) : []
- }
- }
- Array.isArray || (Array.isArray = function (t) {
- return a(t) == "[object Array]"
- });
- var m = Object("a"), g = m[0] != "a" || !(0 in m);
- Array.prototype.forEach || (Array.prototype.forEach = function (t) {
- var n = q(this), r = g && a(this) == "[object String]" ? this.split("") : n, i = arguments[1], s = -1, o = r.length >>> 0;
- if (a(t) != "[object Function]")throw new TypeError;
- while (++s < o)s in r && t.call(i, r[s], s, n)
- }), Array.prototype.map || (Array.prototype.map = function (t) {
- var n = q(this), r = g && a(this) == "[object String]" ? this.split("") : n, i = r.length >>> 0, s = Array(i), o = arguments[1];
- if (a(t) != "[object Function]")throw new TypeError(t + " is not a function");
- for (var u = 0; u < i; u++)u in r && (s[u] = t.call(o, r[u], u, n));
- return s
- }), Array.prototype.filter || (Array.prototype.filter = function (t) {
- var n = q(this), r = g && a(this) == "[object String]" ? this.split("") : n, i = r.length >>> 0, s = [], o, u = arguments[1];
- if (a(t) != "[object Function]")throw new TypeError(t + " is not a function");
- for (var f = 0; f < i; f++)f in r && (o = r[f], t.call(u, o, f, n) && s.push(o));
- return s
- }), Array.prototype.every || (Array.prototype.every = function (t) {
- var n = q(this), r = g && a(this) == "[object String]" ? this.split("") : n, i = r.length >>> 0, s = arguments[1];
- if (a(t) != "[object Function]")throw new TypeError(t + " is not a function");
- for (var o = 0; o < i; o++)if (o in r && !t.call(s, r[o], o, n))return!1;
- return!0
- }), Array.prototype.some || (Array.prototype.some = function (t) {
- var n = q(this), r = g && a(this) == "[object String]" ? this.split("") : n, i = r.length >>> 0, s = arguments[1];
- if (a(t) != "[object Function]")throw new TypeError(t + " is not a function");
- for (var o = 0; o < i; o++)if (o in r && t.call(s, r[o], o, n))return!0;
- return!1
- }), Array.prototype.reduce || (Array.prototype.reduce = function (t) {
- var n = q(this), r = g && a(this) == "[object String]" ? this.split("") : n, i = r.length >>> 0;
- if (a(t) != "[object Function]")throw new TypeError(t + " is not a function");
- if (!i && arguments.length == 1)throw new TypeError("reduce of empty array with no initial value");
- var s = 0, o;
- if (arguments.length >= 2)o = arguments[1]; else do {
- if (s in r) {
- o = r[s++];
- break
- }
- if (++s >= i)throw new TypeError("reduce of empty array with no initial value")
- } while (!0);
- for (; s < i; s++)s in r && (o = t.call(void 0, o, r[s], s, n));
- return o
- }), Array.prototype.reduceRight || (Array.prototype.reduceRight = function (t) {
- var n = q(this), r = g && a(this) == "[object String]" ? this.split("") : n, i = r.length >>> 0;
- if (a(t) != "[object Function]")throw new TypeError(t + " is not a function");
- if (!i && arguments.length == 1)throw new TypeError("reduceRight of empty array with no initial value");
- var s, o = i - 1;
- if (arguments.length >= 2)s = arguments[1]; else do {
- if (o in r) {
- s = r[o--];
- break
- }
- if (--o < 0)throw new TypeError("reduceRight of empty array with no initial value")
- } while (!0);
- do o in this && (s = t.call(void 0, s, r[o], o, n)); while (o--);
- return s
- });
- if (!Array.prototype.indexOf || [0, 1].indexOf(1, 2) != -1)Array.prototype.indexOf = function (t) {
- var n = g && a(this) == "[object String]" ? this.split("") : q(this), r = n.length >>> 0;
- if (!r)return-1;
- var i = 0;
- arguments.length > 1 && (i = j(arguments[1])), i = i >= 0 ? i : Math.max(0, r + i);
- for (; i < r; i++)if (i in n && n[i] === t)return i;
- return-1
- };
- if (!Array.prototype.lastIndexOf || [0, 1].lastIndexOf(0, -3) != -1)Array.prototype.lastIndexOf = function (t) {
- var n = g && a(this) == "[object String]" ? this.split("") : q(this), r = n.length >>> 0;
- if (!r)return-1;
- var i = r - 1;
- arguments.length > 1 && (i = Math.min(i, j(arguments[1]))), i = i >= 0 ? i : r - Math.abs(i);
- for (; i >= 0; i--)if (i in n && t === n[i])return i;
- return-1
- };
- Object.getPrototypeOf || (Object.getPrototypeOf = function (t) {
- return t.__proto__ || (t.constructor ? t.constructor.prototype : o)
- });
- if (!Object.getOwnPropertyDescriptor) {
- var y = "Object.getOwnPropertyDescriptor called on a non-object: ";
- Object.getOwnPropertyDescriptor = function (t, n) {
- if (typeof t != "object" && typeof t != "function" || t === null)throw new TypeError(y + t);
- if (!f(t, n))return;
- var r, i, s;
- r = {enumerable: !0, configurable: !0};
- if (d) {
- var u = t.__proto__;
- t.__proto__ = o;
- var i = h(t, n), s = p(t, n);
- t.__proto__ = u;
- if (i || s)return i && (r.get = i), s && (r.set = s), r
- }
- return r.value = t[n], r
- }
- }
- Object.getOwnPropertyNames || (Object.getOwnPropertyNames = function (t) {
- return Object.keys(t)
- });
- if (!Object.create) {
- var b;
- Object.prototype.__proto__ === null ? b = function () {
- return{__proto__: null}
- } : b = function () {
- var e = {};
- for (var t in e)e[t] = null;
- return e.constructor = e.hasOwnProperty = e.propertyIsEnumerable = e.isPrototypeOf = e.toLocaleString = e.toString = e.valueOf = e.__proto__ = null, e
- }, Object.create = function (t, n) {
- var r;
- if (t === null)r = b(); else {
- if (typeof t != "object")throw new TypeError("typeof prototype[" + typeof t + "] != 'object'");
- var i = function () {
- };
- i.prototype = t, r = new i, r.__proto__ = t
- }
- return n !== void 0 && Object.defineProperties(r, n), r
- }
- }
- if (Object.defineProperty) {
- var E = w({}), S = typeof document == "undefined" || w(document.createElement("div"));
- if (!E || !S)var x = Object.defineProperty
- }
- if (!Object.defineProperty || x) {
- var T = "Property description must be an object: ", N = "Object.defineProperty called on non-object: ", C = "getters & setters can not be defined on this javascript engine";
- Object.defineProperty = function (t, n, r) {
- if (typeof t != "object" && typeof t != "function" || t === null)throw new TypeError(N + t);
- if (typeof r != "object" && typeof r != "function" || r === null)throw new TypeError(T + r);
- if (x)try {
- return x.call(Object, t, n, r)
- } catch (i) {
- }
- if (f(r, "value"))if (d && (h(t, n) || p(t, n))) {
- var s = t.__proto__;
- t.__proto__ = o, delete t[n], t[n] = r.value, t.__proto__ = s
- } else t[n] = r.value; else {
- if (!d)throw new TypeError(C);
- f(r, "get") && l(t, n, r.get), f(r, "set") && c(t, n, r.set)
- }
- return t
- }
- }
- Object.defineProperties || (Object.defineProperties = function (t, n) {
- for (var r in n)f(n, r) && Object.defineProperty(t, r, n[r]);
- return t
- }), Object.seal || (Object.seal = function (t) {
- return t
- }), Object.freeze || (Object.freeze = function (t) {
- return t
- });
- try {
- Object.freeze(function () {
- })
- } catch (k) {
- Object.freeze = function (t) {
- return function (n) {
- return typeof n == "function" ? n : t(n)
- }
- }(Object.freeze)
- }
- Object.preventExtensions || (Object.preventExtensions = function (t) {
- return t
- }), Object.isSealed || (Object.isSealed = function (t) {
- return!1
- }), Object.isFrozen || (Object.isFrozen = function (t) {
- return!1
- }), Object.isExtensible || (Object.isExtensible = function (t) {
- if (Object(t) === t)throw new TypeError;
- var n = "";
- while (f(t, n))n += "?";
- t[n] = !0;
- var r = f(t, n);
- return delete t[n], r
- });
- if (!Object.keys) {
- var L = !0, A = ["toString", "toLocaleString", "valueOf", "hasOwnProperty", "isPrototypeOf", "propertyIsEnumerable", "constructor"], O = A.length;
- for (var M in{toString: null})L = !1;
- Object.keys = function R(e) {
- if (typeof e != "object" && typeof e != "function" || e === null)throw new TypeError("Object.keys called on a non-object");
- var R = [];
- for (var t in e)f(e, t) && R.push(t);
- if (L)for (var n = 0, r = O; n < r; n++) {
- var i = A[n];
- f(e, i) && R.push(i)
- }
- return R
- }
- }
- Date.now || (Date.now = function () {
- return(new Date).getTime()
- });
- if ("0".split(void 0, 0).length) {
- var _ = String.prototype.split;
- String.prototype.split = function (e, t) {
- return e === void 0 && t === 0 ? [] : _.apply(this, arguments)
- }
- }
- if ("".substr && "0b".substr(-1) !== "b") {
- var D = String.prototype.substr;
- String.prototype.substr = function (e, t) {
- return D.call(this, e < 0 ? (e = this.length + e) < 0 ? 0 : e : e, t)
- }
- }
- var P = " \n\f\r Â áš€á Žâ€€â€â€‚         âŸã€€\u2028\u2029";
- if (!String.prototype.trim || P.trim()) {
- P = "[" + P + "]";
- var H = new RegExp("^" + P + P + "*"), B = new RegExp(P + P + "*$");
- String.prototype.trim = function () {
- if (this === undefined || this === null)throw new TypeError("can't convert " + this + " to object");
- return String(this).replace(H, "").replace(B, "")
- }
- }
- var q = function (e) {
- if (e == null)throw new TypeError("can't convert " + e + " to object");
- return Object(e)
- }
-}), define("ace/lib/event_emitter", ["require", "exports", "module"], function (e, t, n) {
- var r = {};
- r._emit = r._dispatchEvent = function (e, t) {
- this._eventRegistry = this._eventRegistry || {}, this._defaultHandlers = this._defaultHandlers || {};
- var n = this._eventRegistry[e] || [], r = this._defaultHandlers[e];
- if (!n.length && !r)return;
- if (typeof t != "object" || !t)t = {};
- t.type || (t.type = e), t.stopPropagation || (t.stopPropagation = function () {
- this.propagationStopped = !0
- }), t.preventDefault || (t.preventDefault = function () {
- this.defaultPrevented = !0
- });
- for (var i = 0; i < n.length; i++) {
- n[i](t);
- if (t.propagationStopped)break
- }
- if (r && !t.defaultPrevented)return r(t)
- }, r.setDefaultHandler = function (e, t) {
- this._defaultHandlers = this._defaultHandlers || {};
- if (this._defaultHandlers[e])throw new Error("The default handler for '" + e + "' is already set");
- this._defaultHandlers[e] = t
- }, r.on = r.addEventListener = function (e, t) {
- this._eventRegistry = this._eventRegistry || {};
- var n = this._eventRegistry[e];
- n || (n = this._eventRegistry[e] = []), n.indexOf(t) == -1 && n.push(t)
- }, r.removeListener = r.removeEventListener = function (e, t) {
- this._eventRegistry = this._eventRegistry || {};
- var n = this._eventRegistry[e];
- if (!n)return;
- var r = n.indexOf(t);
- r !== -1 && n.splice(r, 1)
- }, r.removeAllListeners = function (e) {
- this._eventRegistry && (this._eventRegistry[e] = [])
- }, t.EventEmitter = r
-}), define("ace/lib/oop", ["require", "exports", "module"], function (e, t, n) {
- t.inherits = function () {
- var e = function () {
- };
- return function (t, n) {
- e.prototype = n.prototype, t.super_ = n.prototype, t.prototype = new e, t.prototype.constructor = t
- }
- }(), t.mixin = function (e, t) {
- for (var n in t)e[n] = t[n]
- }, t.implement = function (e, n) {
- t.mixin(e, n)
- }
-}), define("ace/mode/css_worker", ["require", "exports", "module", "ace/lib/oop", "ace/lib/lang", "ace/worker/mirror", "ace/mode/css/csslint"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("../lib/lang"), s = e("../worker/mirror").Mirror, o = e("./css/csslint").CSSLint, u = t.Worker = function (e) {
- s.call(this, e), this.setTimeout(400), this.ruleset = null, this.setDisabledRules("ids"), this.setInfoRules("adjoining-classes|qualified-headings|zero-units|gradients|import|outline-none")
- };
- r.inherits(u, s), function () {
- this.setInfoRules = function (e) {
- typeof e == "string" && (e = e.split("|")), this.infoRules = i.arrayToMap(e), this.doc.getValue() && this.deferredUpdate.schedule(100)
- }, this.setDisabledRules = function (e) {
- if (!e)this.ruleset = null; else {
- typeof e == "string" && (e = e.split("|"));
- var t = {};
- o.getRules().forEach(function (e) {
- t[e.id] = !0
- }), e.forEach(function (e) {
- delete t[e]
- }), this.ruleset = t
- }
- this.doc.getValue() && this.deferredUpdate.schedule(100)
- }, this.onUpdate = function () {
- var e = this.doc.getValue(), t = this.infoRules, n = o.verify(e, this.ruleset);
- this.sender.emit("csslint", n.messages.map(function (e) {
- return{row: e.line - 1, column: e.col - 1, text: e.message, type: t[e.rule.id] ? "info" : e.type}
- }))
- }
- }.call(u.prototype)
-}), define("ace/lib/lang", ["require", "exports", "module"], function (e, t, n) {
- t.stringReverse = function (e) {
- return e.split("").reverse().join("")
- }, t.stringRepeat = function (e, t) {
- var n = "";
- while (t > 0) {
- t & 1 && (n += e);
- if (t >>= 1)e += e
- }
- return n
- };
- var r = /^\s\s*/, i = /\s\s*$/;
- t.stringTrimLeft = function (e) {
- return e.replace(r, "")
- }, t.stringTrimRight = function (e) {
- return e.replace(i, "")
- }, t.copyObject = function (e) {
- var t = {};
- for (var n in e)t[n] = e[n];
- return t
- }, t.copyArray = function (e) {
- var t = [];
- for (var n = 0, r = e.length; n < r; n++)e[n] && typeof e[n] == "object" ? t[n] = this.copyObject(e[n]) : t[n] = e[n];
- return t
- }, t.deepCopy = function (e) {
- if (typeof e != "object")return e;
- var t = e.constructor();
- for (var n in e)typeof e[n] == "object" ? t[n] = this.deepCopy(e[n]) : t[n] = e[n];
- return t
- }, t.arrayToMap = function (e) {
- var t = {};
- for (var n = 0; n < e.length; n++)t[e[n]] = 1;
- return t
- }, t.createMap = function (e) {
- var t = Object.create(null);
- for (var n in e)t[n] = e[n];
- return t
- }, t.arrayRemove = function (e, t) {
- for (var n = 0; n <= e.length; n++)t === e[n] && e.splice(n, 1)
- }, t.escapeRegExp = function (e) {
- return e.replace(/([.*+?^${}()|[\]\/\\])/g, "\\$1")
- }, t.escapeHTML = function (e) {
- return e.replace(/&/g, "&").replace(/"/g, """).replace(/'/g, "'").replace(/= t && (e.row = Math.max(0, t - 1), e.column = this.getLine(t - 1).length), e
- }, this.insert = function (e, t) {
- if (!t || t.length === 0)return e;
- e = this.$clipPosition(e), this.getLength() <= 1 && this.$detectNewLine(t);
- var n = this.$split(t), r = n.splice(0, 1)[0], i = n.length == 0 ? null : n.splice(n.length - 1, 1)[0];
- return e = this.insertInLine(e, r), i !== null && (e = this.insertNewLine(e), e = this.insertLines(e.row, n), e = this.insertInLine(e, i || "")), e
- }, this.insertLines = function (e, t) {
- if (t.length == 0)return{row: e, column: 0};
- if (t.length > 65535) {
- var n = this.insertLines(e, t.slice(65535));
- t = t.slice(0, 65535)
- }
- var r = [e, 0];
- r.push.apply(r, t), this.$lines.splice.apply(this.$lines, r);
- var i = new s(e, 0, e + t.length, 0), o = {action: "insertLines", range: i, lines: t};
- return this._emit("change", {data: o}), n || i.end
- }, this.insertNewLine = function (e) {
- e = this.$clipPosition(e);
- var t = this.$lines[e.row] || "";
- this.$lines[e.row] = t.substring(0, e.column), this.$lines.splice(e.row + 1, 0, t.substring(e.column, t.length));
- var n = {row: e.row + 1, column: 0}, r = {action: "insertText", range: s.fromPoints(e, n), text: this.getNewLineCharacter()};
- return this._emit("change", {data: r}), n
- }, this.insertInLine = function (e, t) {
- if (t.length == 0)return e;
- var n = this.$lines[e.row] || "";
- this.$lines[e.row] = n.substring(0, e.column) + t + n.substring(e.column);
- var r = {row: e.row, column: e.column + t.length}, i = {action: "insertText", range: s.fromPoints(e, r), text: t};
- return this._emit("change", {data: i}), r
- }, this.remove = function (e) {
- e.start = this.$clipPosition(e.start), e.end = this.$clipPosition(e.end);
- if (e.isEmpty())return e.start;
- var t = e.start.row, n = e.end.row;
- if (e.isMultiLine()) {
- var r = e.start.column == 0 ? t : t + 1, i = n - 1;
- e.end.column > 0 && this.removeInLine(n, 0, e.end.column), i >= r && this.removeLines(r, i), r != t && (this.removeInLine(t, e.start.column, this.getLine(t).length), this.removeNewLine(e.start.row))
- } else this.removeInLine(t, e.start.column, e.end.column);
- return e.start
- }, this.removeInLine = function (e, t, n) {
- if (t == n)return;
- var r = new s(e, t, e, n), i = this.getLine(e), o = i.substring(t, n), u = i.substring(0, t) + i.substring(n, i.length);
- this.$lines.splice(e, 1, u);
- var a = {action: "removeText", range: r, text: o};
- return this._emit("change", {data: a}), r.start
- }, this.removeLines = function (e, t) {
- var n = new s(e, 0, t + 1, 0), r = this.$lines.splice(e, t - e + 1), i = {action: "removeLines", range: n, nl: this.getNewLineCharacter(), lines: r};
- return this._emit("change", {data: i}), r
- }, this.removeNewLine = function (e) {
- var t = this.getLine(e), n = this.getLine(e + 1), r = new s(e, t.length, e + 1, 0), i = t + n;
- this.$lines.splice(e, 2, i);
- var o = {action: "removeText", range: r, text: this.getNewLineCharacter()};
- this._emit("change", {data: o})
- }, this.replace = function (e, t) {
- if (t.length == 0 && e.isEmpty())return e.start;
- if (t == this.getTextRange(e))return e.end;
- this.remove(e);
- if (t)var n = this.insert(e.start, t); else n = e.start;
- return n
- }, this.applyDeltas = function (e) {
- for (var t = 0; t < e.length; t++) {
- var n = e[t], r = s.fromPoints(n.range.start, n.range.end);
- n.action == "insertLines" ? this.insertLines(r.start.row, n.lines) : n.action == "insertText" ? this.insert(r.start, n.text) : n.action == "removeLines" ? this.removeLines(r.start.row, r.end.row - 1) : n.action == "removeText" && this.remove(r)
- }
- }, this.revertDeltas = function (e) {
- for (var t = e.length - 1; t >= 0; t--) {
- var n = e[t], r = s.fromPoints(n.range.start, n.range.end);
- n.action == "insertLines" ? this.removeLines(r.start.row, r.end.row - 1) : n.action == "insertText" ? this.remove(r) : n.action == "removeLines" ? this.insertLines(r.start.row, n.lines) : n.action == "removeText" && this.insert(r.start, n.text)
- }
- }, this.indexToPosition = function (e, t) {
- var n = this.$lines || this.getAllLines(), r = this.getNewLineCharacter().length;
- for (var i = t || 0, s = n.length; i < s; i++) {
- e -= n[i].length + r;
- if (e < 0)return{row: i, column: e + n[i].length + r}
- }
- return{row: s - 1, column: n[s - 1].length}
- }, this.positionToIndex = function (e, t) {
- var n = this.$lines || this.getAllLines(), r = this.getNewLineCharacter().length, i = 0, s = Math.min(e.row, n.length);
- for (var o = t || 0; o < s; ++o)i += n[o].length;
- return i + r * o + e.column
- }
- }).call(u.prototype), t.Document = u
-}), define("ace/range", ["require", "exports", "module"], function (e, t, n) {
- var r = function (e, t, n, r) {
- this.start = {row: e, column: t}, this.end = {row: n, column: r}
- };
- (function () {
- this.isEqual = function (e) {
- return this.start.row == e.start.row && this.end.row == e.end.row && this.start.column == e.start.column && this.end.column == e.end.column
- }, this.toString = function () {
- return"Range: [" + this.start.row + "/" + this.start.column + "] -> [" + this.end.row + "/" + this.end.column + "]"
- }, this.contains = function (e, t) {
- return this.compare(e, t) == 0
- }, this.compareRange = function (e) {
- var t, n = e.end, r = e.start;
- return t = this.compare(n.row, n.column), t == 1 ? (t = this.compare(r.row, r.column), t == 1 ? 2 : t == 0 ? 1 : 0) : t == -1 ? -2 : (t = this.compare(r.row, r.column), t == -1 ? -1 : t == 1 ? 42 : 0)
- }, this.comparePoint = function (e) {
- return this.compare(e.row, e.column)
- }, this.containsRange = function (e) {
- return this.comparePoint(e.start) == 0 && this.comparePoint(e.end) == 0
- }, this.intersects = function (e) {
- var t = this.compareRange(e);
- return t == -1 || t == 0 || t == 1
- }, this.isEnd = function (e, t) {
- return this.end.row == e && this.end.column == t
- }, this.isStart = function (e, t) {
- return this.start.row == e && this.start.column == t
- }, this.setStart = function (e, t) {
- typeof e == "object" ? (this.start.column = e.column, this.start.row = e.row) : (this.start.row = e, this.start.column = t)
- }, this.setEnd = function (e, t) {
- typeof e == "object" ? (this.end.column = e.column, this.end.row = e.row) : (this.end.row = e, this.end.column = t)
- }, this.inside = function (e, t) {
- return this.compare(e, t) == 0 ? this.isEnd(e, t) || this.isStart(e, t) ? !1 : !0 : !1
- }, this.insideStart = function (e, t) {
- return this.compare(e, t) == 0 ? this.isEnd(e, t) ? !1 : !0 : !1
- }, this.insideEnd = function (e, t) {
- return this.compare(e, t) == 0 ? this.isStart(e, t) ? !1 : !0 : !1
- }, this.compare = function (e, t) {
- return!this.isMultiLine() && e === this.start.row ? t < this.start.column ? -1 : t > this.end.column ? 1 : 0 : e < this.start.row ? -1 : e > this.end.row ? 1 : this.start.row === e ? t >= this.start.column ? 0 : -1 : this.end.row === e ? t <= this.end.column ? 0 : 1 : 0
- }, this.compareStart = function (e, t) {
- return this.start.row == e && this.start.column == t ? -1 : this.compare(e, t)
- }, this.compareEnd = function (e, t) {
- return this.end.row == e && this.end.column == t ? 1 : this.compare(e, t)
- }, this.compareInside = function (e, t) {
- return this.end.row == e && this.end.column == t ? 1 : this.start.row == e && this.start.column == t ? -1 : this.compare(e, t)
- }, this.clipRows = function (e, t) {
- if (this.end.row > t)var n = {row: t + 1, column: 0};
- if (this.start.row > t)var i = {row: t + 1, column: 0};
- if (this.start.row < e)var i = {row: e, column: 0};
- if (this.end.row < e)var n = {row: e, column: 0};
- return r.fromPoints(i || this.start, n || this.end)
- }, this.extend = function (e, t) {
- var n = this.compare(e, t);
- if (n == 0)return this;
- if (n == -1)var i = {row: e, column: t}; else var s = {row: e, column: t};
- return r.fromPoints(i || this.start, s || this.end)
- }, this.isEmpty = function () {
- return this.start.row == this.end.row && this.start.column == this.end.column
- }, this.isMultiLine = function () {
- return this.start.row !== this.end.row
- }, this.clone = function () {
- return r.fromPoints(this.start, this.end)
- }, this.collapseRows = function () {
- return this.end.column == 0 ? new r(this.start.row, 0, Math.max(this.start.row, this.end.row - 1), 0) : new r(this.start.row, 0, this.end.row, 0)
- }, this.toScreenRange = function (e) {
- var t = e.documentToScreenPosition(this.start), n = e.documentToScreenPosition(this.end);
- return new r(t.row, t.column, n.row, n.column)
- }
- }).call(r.prototype), r.fromPoints = function (e, t) {
- return new r(e.row, e.column, t.row, t.column)
- }, t.Range = r
-}), define("ace/anchor", ["require", "exports", "module", "ace/lib/oop", "ace/lib/event_emitter"], function (e, t, n) {
- var r = e("./lib/oop"), i = e("./lib/event_emitter").EventEmitter, s = t.Anchor = function (e, t, n) {
- this.document = e, typeof n == "undefined" ? this.setPosition(t.row, t.column) : this.setPosition(t, n), this.$onChange = this.onChange.bind(this), e.on("change", this.$onChange)
- };
- (function () {
- r.implement(this, i), this.getPosition = function () {
- return this.$clipPositionToDocument(this.row, this.column)
- }, this.getDocument = function () {
- return this.document
- }, this.onChange = function (e) {
- var t = e.data, n = t.range;
- if (n.start.row == n.end.row && n.start.row != this.row)return;
- if (n.start.row > this.row)return;
- if (n.start.row == this.row && n.start.column > this.column)return;
- var r = this.row, i = this.column;
- t.action === "insertText" ? n.start.row === r && n.start.column <= i ? n.start.row === n.end.row ? i += n.end.column - n.start.column : (i -= n.start.column, r += n.end.row - n.start.row) : n.start.row !== n.end.row && n.start.row < r && (r += n.end.row - n.start.row) : t.action === "insertLines" ? n.start.row <= r && (r += n.end.row - n.start.row) : t.action == "removeText" ? n.start.row == r && n.start.column < i ? n.end.column >= i ? i = n.start.column : i = Math.max(0, i - (n.end.column - n.start.column)) : n.start.row !== n.end.row && n.start.row < r ? (n.end.row == r && (i = Math.max(0, i - n.end.column) + n.start.column), r -= n.end.row - n.start.row) : n.end.row == r && (r -= n.end.row - n.start.row, i = Math.max(0, i - n.end.column) + n.start.column) : t.action == "removeLines" && n.start.row <= r && (n.end.row <= r ? r -= n.end.row - n.start.row : (r = n.start.row, i = 0)), this.setPosition(r, i, !0)
- }, this.setPosition = function (e, t, n) {
- var r;
- n ? r = {row: e, column: t} : r = this.$clipPositionToDocument(e, t);
- if (this.row == r.row && this.column == r.column)return;
- var i = {row: this.row, column: this.column};
- this.row = r.row, this.column = r.column, this._emit("change", {old: i, value: r})
- }, this.detach = function () {
- this.document.removeEventListener("change", this.$onChange)
- }, this.$clipPositionToDocument = function (e, t) {
- var n = {};
- return e >= this.document.getLength() ? (n.row = Math.max(0, this.document.getLength() - 1), n.column = this.document.getLine(n.row).length) : e < 0 ? (n.row = 0, n.column = 0) : (n.row = e, n.column = Math.min(this.document.getLine(n.row).length, Math.max(0, t))), t < 0 && (n.column = 0), n
- }
- }).call(s.prototype)
-}), define("ace/mode/css/csslint", ["require", "exports", "module"], function (require, exports, module) {
- function Reporter(e, t) {
- this.messages = [], this.stats = [], this.lines = e, this.ruleset = t
- }
-
- var parserlib = {};
- (function () {
- function e() {
- this._listeners = {}
- }
-
- function t(e) {
- this._input = e.replace(/\n\r?/g, "\n"), this._line = 1, this._col = 1, this._cursor = 0
- }
-
- function n(e, t, n) {
- this.col = n, this.line = t, this.message = e
- }
-
- function r(e, t, n, r) {
- this.col = n, this.line = t, this.text = e, this.type = r
- }
-
- function i(e, n) {
- this._reader = e ? new t(e.toString()) : null, this._token = null, this._tokenData = n, this._lt = [], this._ltIndex = 0, this._ltIndexCache = []
- }
-
- e.prototype = {constructor: e, addListener: function (e, t) {
- this._listeners[e] || (this._listeners[e] = []), this._listeners[e].push(t)
- }, fire: function (e) {
- typeof e == "string" && (e = {type: e}), typeof e.target != "undefined" && (e.target = this);
- if (typeof e.type == "undefined")throw new Error("Event object missing 'type' property.");
- if (this._listeners[e.type]) {
- var t = this._listeners[e.type].concat();
- for (var n = 0, r = t.length; n < r; n++)t[n].call(this, e)
- }
- }, removeListener: function (e, t) {
- if (this._listeners[e]) {
- var n = this._listeners[e];
- for (var r = 0, i = n.length; r < i; r++)if (n[r] === t) {
- n.splice(r, 1);
- break
- }
- }
- }}, t.prototype = {constructor: t, getCol: function () {
- return this._col
- }, getLine: function () {
- return this._line
- }, eof: function () {
- return this._cursor == this._input.length
- }, peek: function (e) {
- var t = null;
- return e = typeof e == "undefined" ? 1 : e, this._cursor < this._input.length && (t = this._input.charAt(this._cursor + e - 1)), t
- }, read: function () {
- var e = null;
- return this._cursor < this._input.length && (this._input.charAt(this._cursor) == "\n" ? (this._line++, this._col = 1) : this._col++, e = this._input.charAt(this._cursor++)), e
- }, mark: function () {
- this._bookmark = {cursor: this._cursor, line: this._line, col: this._col}
- }, reset: function () {
- this._bookmark && (this._cursor = this._bookmark.cursor, this._line = this._bookmark.line, this._col = this._bookmark.col, delete this._bookmark)
- }, readTo: function (e) {
- var t = "", n;
- while (t.length < e.length || t.lastIndexOf(e) != t.length - e.length) {
- n = this.read();
- if (!n)throw new Error('Expected "' + e + '" at line ' + this._line + ", col " + this._col + ".");
- t += n
- }
- return t
- }, readWhile: function (e) {
- var t = "", n = this.read();
- while (n !== null && e(n))t += n, n = this.read();
- return t
- }, readMatch: function (e) {
- var t = this._input.substring(this._cursor), n = null;
- return typeof e == "string" ? t.indexOf(e) === 0 && (n = this.readCount(e.length)) : e instanceof RegExp && e.test(t) && (n = this.readCount(RegExp.lastMatch.length)), n
- }, readCount: function (e) {
- var t = "";
- while (e--)t += this.read();
- return t
- }}, n.prototype = new Error, r.fromToken = function (e) {
- return new r(e.value, e.startLine, e.startCol)
- }, r.prototype = {constructor: r, valueOf: function () {
- return this.toString()
- }, toString: function () {
- return this.text
- }}, i.createTokenData = function (e) {
- var t = [], n = {}, r = e.concat([]), i = 0, s = r.length + 1;
- r.UNKNOWN = -1, r.unshift({name: "EOF"});
- for (; i < s; i++)t.push(r[i].name), r[r[i].name] = i, r[i].text && (n[r[i].text] = i);
- return r.name = function (e) {
- return t[e]
- }, r.type = function (e) {
- return n[e]
- }, r
- }, i.prototype = {constructor: i, match: function (e, t) {
- e instanceof Array || (e = [e]);
- var n = this.get(t), r = 0, i = e.length;
- while (r < i)if (n == e[r++])return!0;
- return this.unget(), !1
- }, mustMatch: function (e, t) {
- var r;
- e instanceof Array || (e = [e]);
- if (!this.match.apply(this, arguments))throw r = this.LT(1), new n("Expected " + this._tokenData[e[0]].name + " at line " + r.startLine + ", col " + r.startCol + ".", r.startLine, r.startCol)
- }, advance: function (e, t) {
- while (this.LA(0) !== 0 && !this.match(e, t))this.get();
- return this.LA(0)
- }, get: function (e) {
- var t = this._tokenData, n = this._reader, r, i = 0, s = t.length, o = !1, u, a;
- if (this._lt.length && this._ltIndex >= 0 && this._ltIndex < this._lt.length) {
- i++, this._token = this._lt[this._ltIndex++], a = t[this._token.type];
- while (a.channel !== undefined && e !== a.channel && this._ltIndex < this._lt.length)this._token = this._lt[this._ltIndex++], a = t[this._token.type], i++;
- if ((a.channel === undefined || e === a.channel) && this._ltIndex <= this._lt.length)return this._ltIndexCache.push(i), this._token.type
- }
- return u = this._getToken(), u.type > -1 && !t[u.type].hide && (u.channel = t[u.type].channel, this._token = u, this._lt.push(u), this._ltIndexCache.push(this._lt.length - this._ltIndex + i), this._lt.length > 5 && this._lt.shift(), this._ltIndexCache.length > 5 && this._ltIndexCache.shift(), this._ltIndex = this._lt.length), a = t[u.type], a && (a.hide || a.channel !== undefined && e !== a.channel) ? this.get(e) : u.type
- }, LA: function (e) {
- var t = e, n;
- if (e > 0) {
- if (e > 5)throw new Error("Too much lookahead.");
- while (t)n = this.get(), t--;
- while (t < e)this.unget(), t++
- } else if (e < 0) {
- if (!this._lt[this._ltIndex + e])throw new Error("Too much lookbehind.");
- n = this._lt[this._ltIndex + e].type
- } else n = this._token.type;
- return n
- }, LT: function (e) {
- return this.LA(e), this._lt[this._ltIndex + e - 1]
- }, peek: function () {
- return this.LA(1)
- }, token: function () {
- return this._token
- }, tokenName: function (e) {
- return e < 0 || e > this._tokenData.length ? "UNKNOWN_TOKEN" : this._tokenData[e].name
- }, tokenType: function (e) {
- return this._tokenData[e] || -1
- }, unget: function () {
- if (!this._ltIndexCache.length)throw new Error("Too much lookahead.");
- this._ltIndex -= this._ltIndexCache.pop(), this._token = this._lt[this._ltIndex - 1]
- }}, parserlib.util = {StringReader: t, SyntaxError: n, SyntaxUnit: r, EventTarget: e, TokenStreamBase: i}
- })(), function () {
- function Combinator(e, t, n) {
- SyntaxUnit.call(this, e, t, n, Parser.COMBINATOR_TYPE), this.type = "unknown", /^\s+$/.test(e) ? this.type = "descendant" : e == ">" ? this.type = "child" : e == "+" ? this.type = "adjacent-sibling" : e == "~" && (this.type = "sibling")
- }
-
- function MediaFeature(e, t) {
- SyntaxUnit.call(this, "(" + e + (t !== null ? ":" + t : "") + ")", e.startLine, e.startCol, Parser.MEDIA_FEATURE_TYPE), this.name = e, this.value = t
- }
-
- function MediaQuery(e, t, n, r, i) {
- SyntaxUnit.call(this, (e ? e + " " : "") + (t ? t + " " : "") + n.join(" and "), r, i, Parser.MEDIA_QUERY_TYPE), this.modifier = e, this.mediaType = t, this.features = n
- }
-
- function Parser(e) {
- EventTarget.call(this), this.options = e || {}, this._tokenStream = null
- }
-
- function PropertyName(e, t, n, r) {
- SyntaxUnit.call(this, e, n, r, Parser.PROPERTY_NAME_TYPE), this.hack = t
- }
-
- function PropertyValue(e, t, n) {
- SyntaxUnit.call(this, e.join(" "), t, n, Parser.PROPERTY_VALUE_TYPE), this.parts = e
- }
-
- function PropertyValueIterator(e) {
- this._i = 0, this._parts = e.parts, this._marks = [], this.value = e
- }
-
- function PropertyValuePart(text, line, col) {
- SyntaxUnit.call(this, text, line, col, Parser.PROPERTY_VALUE_PART_TYPE), this.type = "unknown";
- var temp;
- if (/^([+\-]?[\d\.]+)([a-z]+)$/i.test(text)) {
- this.type = "dimension", this.value = +RegExp.$1, this.units = RegExp.$2;
- switch (this.units.toLowerCase()) {
- case"em":
- case"rem":
- case"ex":
- case"px":
- case"cm":
- case"mm":
- case"in":
- case"pt":
- case"pc":
- case"ch":
- this.type = "length";
- break;
- case"deg":
- case"rad":
- case"grad":
- this.type = "angle";
- break;
- case"ms":
- case"s":
- this.type = "time";
- break;
- case"hz":
- case"khz":
- this.type = "frequency";
- break;
- case"dpi":
- case"dpcm":
- this.type = "resolution"
- }
- } else/^([+\-]?[\d\.]+)%$/i.test(text) ? (this.type = "percentage", this.value = +RegExp.$1) : /^([+\-]?[\d\.]+)%$/i.test(text) ? (this.type = "percentage", this.value = +RegExp.$1) : /^([+\-]?\d+)$/i.test(text) ? (this.type = "integer", this.value = +RegExp.$1) : /^([+\-]?[\d\.]+)$/i.test(text) ? (this.type = "number", this.value = +RegExp.$1) : /^#([a-f0-9]{3,6})/i.test(text) ? (this.type = "color", temp = RegExp.$1, temp.length == 3 ? (this.red = parseInt(temp.charAt(0) + temp.charAt(0), 16), this.green = parseInt(temp.charAt(1) + temp.charAt(1), 16), this.blue = parseInt(temp.charAt(2) + temp.charAt(2), 16)) : (this.red = parseInt(temp.substring(0, 2), 16), this.green = parseInt(temp.substring(2, 4), 16), this.blue = parseInt(temp.substring(4, 6), 16))) : /^rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/i.test(text) ? (this.type = "color", this.red = +RegExp.$1, this.green = +RegExp.$2, this.blue = +RegExp.$3) : /^rgb\(\s*(\d+)%\s*,\s*(\d+)%\s*,\s*(\d+)%\s*\)/i.test(text) ? (this.type = "color", this.red = +RegExp.$1 * 255 / 100, this.green = +RegExp.$2 * 255 / 100, this.blue = +RegExp.$3 * 255 / 100) : /^rgba\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*([\d\.]+)\s*\)/i.test(text) ? (this.type = "color", this.red = +RegExp.$1, this.green = +RegExp.$2, this.blue = +RegExp.$3, this.alpha = +RegExp.$4) : /^rgba\(\s*(\d+)%\s*,\s*(\d+)%\s*,\s*(\d+)%\s*,\s*([\d\.]+)\s*\)/i.test(text) ? (this.type = "color", this.red = +RegExp.$1 * 255 / 100, this.green = +RegExp.$2 * 255 / 100, this.blue = +RegExp.$3 * 255 / 100, this.alpha = +RegExp.$4) : /^hsl\(\s*(\d+)\s*,\s*(\d+)%\s*,\s*(\d+)%\s*\)/i.test(text) ? (this.type = "color", this.hue = +RegExp.$1, this.saturation = +RegExp.$2 / 100, this.lightness = +RegExp.$3 / 100) : /^hsla\(\s*(\d+)\s*,\s*(\d+)%\s*,\s*(\d+)%\s*,\s*([\d\.]+)\s*\)/i.test(text) ? (this.type = "color", this.hue = +RegExp.$1, this.saturation = +RegExp.$2 / 100, this.lightness = +RegExp.$3 / 100, this.alpha = +RegExp.$4) : /^url\(["']?([^\)"']+)["']?\)/i.test(text) ? (this.type = "uri", this.uri = RegExp.$1) : /^([^\(]+)\(/i.test(text) ? (this.type = "function", this.name = RegExp.$1, this.value = text) : /^["'][^"']*["']/.test(text) ? (this.type = "string", this.value = eval(text)) : Colors[text.toLowerCase()] ? (this.type = "color", temp = Colors[text.toLowerCase()].substring(1), this.red = parseInt(temp.substring(0, 2), 16), this.green = parseInt(temp.substring(2, 4), 16), this.blue = parseInt(temp.substring(4, 6), 16)) : /^[\,\/]$/.test(text) ? (this.type = "operator", this.value = text) : /^[a-z\-\u0080-\uFFFF][a-z0-9\-\u0080-\uFFFF]*$/i.test(text) && (this.type = "identifier", this.value = text)
- }
-
- function Selector(e, t, n) {
- SyntaxUnit.call(this, e.join(" "), t, n, Parser.SELECTOR_TYPE), this.parts = e, this.specificity = Specificity.calculate(this)
- }
-
- function SelectorPart(e, t, n, r, i) {
- SyntaxUnit.call(this, n, r, i, Parser.SELECTOR_PART_TYPE), this.elementName = e, this.modifiers = t
- }
-
- function SelectorSubPart(e, t, n, r) {
- SyntaxUnit.call(this, e, n, r, Parser.SELECTOR_SUB_PART_TYPE), this.type = t, this.args = []
- }
-
- function Specificity(e, t, n, r) {
- this.a = e, this.b = t, this.c = n, this.d = r
- }
-
- function isHexDigit(e) {
- return e !== null && h.test(e)
- }
-
- function isDigit(e) {
- return e !== null && /\d/.test(e)
- }
-
- function isWhitespace(e) {
- return e !== null && /\s/.test(e)
- }
-
- function isNewLine(e) {
- return e !== null && nl.test(e)
- }
-
- function isNameStart(e) {
- return e !== null && /[a-z_\u0080-\uFFFF\\]/i.test(e)
- }
-
- function isNameChar(e) {
- return e !== null && (isNameStart(e) || /[0-9\-\\]/.test(e))
- }
-
- function isIdentStart(e) {
- return e !== null && (isNameStart(e) || /\-\\/.test(e))
- }
-
- function mix(e, t) {
- for (var n in t)t.hasOwnProperty(n) && (e[n] = t[n]);
- return e
- }
-
- function TokenStream(e) {
- TokenStreamBase.call(this, e, Tokens)
- }
-
- function ValidationError(e, t, n) {
- this.col = n, this.line = t, this.message = e
- }
-
- var EventTarget = parserlib.util.EventTarget, TokenStreamBase = parserlib.util.TokenStreamBase, StringReader = parserlib.util.StringReader, SyntaxError = parserlib.util.SyntaxError, SyntaxUnit = parserlib.util.SyntaxUnit, Colors = {aliceblue: "#f0f8ff", antiquewhite: "#faebd7", aqua: "#00ffff", aquamarine: "#7fffd4", azure: "#f0ffff", beige: "#f5f5dc", bisque: "#ffe4c4", black: "#000000", blanchedalmond: "#ffebcd", blue: "#0000ff", blueviolet: "#8a2be2", brown: "#a52a2a", burlywood: "#deb887", cadetblue: "#5f9ea0", chartreuse: "#7fff00", chocolate: "#d2691e", coral: "#ff7f50", cornflowerblue: "#6495ed", cornsilk: "#fff8dc", crimson: "#dc143c", cyan: "#00ffff", darkblue: "#00008b", darkcyan: "#008b8b", darkgoldenrod: "#b8860b", darkgray: "#a9a9a9", darkgreen: "#006400", darkkhaki: "#bdb76b", darkmagenta: "#8b008b", darkolivegreen: "#556b2f", darkorange: "#ff8c00", darkorchid: "#9932cc", darkred: "#8b0000", darksalmon: "#e9967a", darkseagreen: "#8fbc8f", darkslateblue: "#483d8b", darkslategray: "#2f4f4f", darkturquoise: "#00ced1", darkviolet: "#9400d3", deeppink: "#ff1493", deepskyblue: "#00bfff", dimgray: "#696969", dodgerblue: "#1e90ff", firebrick: "#b22222", floralwhite: "#fffaf0", forestgreen: "#228b22", fuchsia: "#ff00ff", gainsboro: "#dcdcdc", ghostwhite: "#f8f8ff", gold: "#ffd700", goldenrod: "#daa520", gray: "#808080", green: "#008000", greenyellow: "#adff2f", honeydew: "#f0fff0", hotpink: "#ff69b4", indianred: "#cd5c5c", indigo: "#4b0082", ivory: "#fffff0", khaki: "#f0e68c", lavender: "#e6e6fa", lavenderblush: "#fff0f5", lawngreen: "#7cfc00", lemonchiffon: "#fffacd", lightblue: "#add8e6", lightcoral: "#f08080", lightcyan: "#e0ffff", lightgoldenrodyellow: "#fafad2", lightgray: "#d3d3d3", lightgreen: "#90ee90", lightpink: "#ffb6c1", lightsalmon: "#ffa07a", lightseagreen: "#20b2aa", lightskyblue: "#87cefa", lightslategray: "#778899", lightsteelblue: "#b0c4de", lightyellow: "#ffffe0", lime: "#00ff00", limegreen: "#32cd32", linen: "#faf0e6", magenta: "#ff00ff", maroon: "#800000", mediumaquamarine: "#66cdaa", mediumblue: "#0000cd", mediumorchid: "#ba55d3", mediumpurple: "#9370d8", mediumseagreen: "#3cb371", mediumslateblue: "#7b68ee", mediumspringgreen: "#00fa9a", mediumturquoise: "#48d1cc", mediumvioletred: "#c71585", midnightblue: "#191970", mintcream: "#f5fffa", mistyrose: "#ffe4e1", moccasin: "#ffe4b5", navajowhite: "#ffdead", navy: "#000080", oldlace: "#fdf5e6", olive: "#808000", olivedrab: "#6b8e23", orange: "#ffa500", orangered: "#ff4500", orchid: "#da70d6", palegoldenrod: "#eee8aa", palegreen: "#98fb98", paleturquoise: "#afeeee", palevioletred: "#d87093", papayawhip: "#ffefd5", peachpuff: "#ffdab9", peru: "#cd853f", pink: "#ffc0cb", plum: "#dda0dd", powderblue: "#b0e0e6", purple: "#800080", red: "#ff0000", rosybrown: "#bc8f8f", royalblue: "#4169e1", saddlebrown: "#8b4513", salmon: "#fa8072", sandybrown: "#f4a460", seagreen: "#2e8b57", seashell: "#fff5ee", sienna: "#a0522d", silver: "#c0c0c0", skyblue: "#87ceeb", slateblue: "#6a5acd", slategray: "#708090", snow: "#fffafa", springgreen: "#00ff7f", steelblue: "#4682b4", tan: "#d2b48c", teal: "#008080", thistle: "#d8bfd8", tomato: "#ff6347", turquoise: "#40e0d0", violet: "#ee82ee", wheat: "#f5deb3", white: "#ffffff", whitesmoke: "#f5f5f5", yellow: "#ffff00", yellowgreen: "#9acd32"};
- Combinator.prototype = new SyntaxUnit, Combinator.prototype.constructor = Combinator, MediaFeature.prototype = new SyntaxUnit, MediaFeature.prototype.constructor = MediaFeature, MediaQuery.prototype = new SyntaxUnit, MediaQuery.prototype.constructor = MediaQuery, Parser.DEFAULT_TYPE = 0, Parser.COMBINATOR_TYPE = 1, Parser.MEDIA_FEATURE_TYPE = 2, Parser.MEDIA_QUERY_TYPE = 3, Parser.PROPERTY_NAME_TYPE = 4, Parser.PROPERTY_VALUE_TYPE = 5, Parser.PROPERTY_VALUE_PART_TYPE = 6, Parser.SELECTOR_TYPE = 7, Parser.SELECTOR_PART_TYPE = 8, Parser.SELECTOR_SUB_PART_TYPE = 9, Parser.prototype = function () {
- var e = new EventTarget, t, n = {constructor: Parser, DEFAULT_TYPE: 0, COMBINATOR_TYPE: 1, MEDIA_FEATURE_TYPE: 2, MEDIA_QUERY_TYPE: 3, PROPERTY_NAME_TYPE: 4, PROPERTY_VALUE_TYPE: 5, PROPERTY_VALUE_PART_TYPE: 6, SELECTOR_TYPE: 7, SELECTOR_PART_TYPE: 8, SELECTOR_SUB_PART_TYPE: 9, _stylesheet: function () {
- var e = this._tokenStream, t = null, n, r, i;
- this.fire("startstylesheet"), this._charset(), this._skipCruft();
- while (e.peek() == Tokens.IMPORT_SYM)this._import(), this._skipCruft();
- while (e.peek() == Tokens.NAMESPACE_SYM)this._namespace(), this._skipCruft();
- i = e.peek();
- while (i > Tokens.EOF) {
- try {
- switch (i) {
- case Tokens.MEDIA_SYM:
- this._media(), this._skipCruft();
- break;
- case Tokens.PAGE_SYM:
- this._page(), this._skipCruft();
- break;
- case Tokens.FONT_FACE_SYM:
- this._font_face(), this._skipCruft();
- break;
- case Tokens.KEYFRAMES_SYM:
- this._keyframes(), this._skipCruft();
- break;
- case Tokens.UNKNOWN_SYM:
- e.get();
- if (!!this.options.strict)throw new SyntaxError("Unknown @ rule.", e.LT(0).startLine, e.LT(0).startCol);
- this.fire({type: "error", error: null, message: "Unknown @ rule: " + e.LT(0).value + ".", line: e.LT(0).startLine, col: e.LT(0).startCol}), n = 0;
- while (e.advance([Tokens.LBRACE, Tokens.RBRACE]) == Tokens.LBRACE)n++;
- while (n)e.advance([Tokens.RBRACE]), n--;
- break;
- case Tokens.S:
- this._readWhitespace();
- break;
- default:
- if (!this._ruleset())switch (i) {
- case Tokens.CHARSET_SYM:
- throw r = e.LT(1), this._charset(!1), new SyntaxError("@charset not allowed here.", r.startLine, r.startCol);
- case Tokens.IMPORT_SYM:
- throw r = e.LT(1), this._import(!1), new SyntaxError("@import not allowed here.", r.startLine, r.startCol);
- case Tokens.NAMESPACE_SYM:
- throw r = e.LT(1), this._namespace(!1), new SyntaxError("@namespace not allowed here.", r.startLine, r.startCol);
- default:
- e.get(), this._unexpectedToken(e.token())
- }
- }
- } catch (s) {
- if (!(s instanceof SyntaxError && !this.options.strict))throw s;
- this.fire({type: "error", error: s, message: s.message, line: s.line, col: s.col})
- }
- i = e.peek()
- }
- i != Tokens.EOF && this._unexpectedToken(e.token()), this.fire("endstylesheet")
- }, _charset: function (e) {
- var t = this._tokenStream, n, r, i, s;
- t.match(Tokens.CHARSET_SYM) && (i = t.token().startLine, s = t.token().startCol, this._readWhitespace(), t.mustMatch(Tokens.STRING), r = t.token(), n = r.value, this._readWhitespace(), t.mustMatch(Tokens.SEMICOLON), e !== !1 && this.fire({type: "charset", charset: n, line: i, col: s}))
- }, _import: function (e) {
- var t = this._tokenStream, n, r, i, s = [];
- t.mustMatch(Tokens.IMPORT_SYM), i = t.token(), this._readWhitespace(), t.mustMatch([Tokens.STRING, Tokens.URI]), r = t.token().value.replace(/(?:url\()?["']([^"']+)["']\)?/, "$1"), this._readWhitespace(), s = this._media_query_list(), t.mustMatch(Tokens.SEMICOLON), this._readWhitespace(), e !== !1 && this.fire({type: "import", uri: r, media: s, line: i.startLine, col: i.startCol})
- }, _namespace: function (e) {
- var t = this._tokenStream, n, r, i, s;
- t.mustMatch(Tokens.NAMESPACE_SYM), n = t.token().startLine, r = t.token().startCol, this._readWhitespace(), t.match(Tokens.IDENT) && (i = t.token().value, this._readWhitespace()), t.mustMatch([Tokens.STRING, Tokens.URI]), s = t.token().value.replace(/(?:url\()?["']([^"']+)["']\)?/, "$1"), this._readWhitespace(), t.mustMatch(Tokens.SEMICOLON), this._readWhitespace(), e !== !1 && this.fire({type: "namespace", prefix: i, uri: s, line: n, col: r})
- }, _media: function () {
- var e = this._tokenStream, t, n, r;
- e.mustMatch(Tokens.MEDIA_SYM), t = e.token().startLine, n = e.token().startCol, this._readWhitespace(), r = this._media_query_list(), e.mustMatch(Tokens.LBRACE), this._readWhitespace(), this.fire({type: "startmedia", media: r, line: t, col: n});
- for (; ;)if (e.peek() == Tokens.PAGE_SYM)this._page(); else if (!this._ruleset())break;
- e.mustMatch(Tokens.RBRACE), this._readWhitespace(), this.fire({type: "endmedia", media: r, line: t, col: n})
- }, _media_query_list: function () {
- var e = this._tokenStream, t = [];
- this._readWhitespace(), (e.peek() == Tokens.IDENT || e.peek() == Tokens.LPAREN) && t.push(this._media_query());
- while (e.match(Tokens.COMMA))this._readWhitespace(), t.push(this._media_query());
- return t
- }, _media_query: function () {
- var e = this._tokenStream, t = null, n = null, r = null, i = [];
- e.match(Tokens.IDENT) && (n = e.token().value.toLowerCase(), n != "only" && n != "not" ? (e.unget(), n = null) : r = e.token()), this._readWhitespace(), e.peek() == Tokens.IDENT ? (t = this._media_type(), r === null && (r = e.token())) : e.peek() == Tokens.LPAREN && (r === null && (r = e.LT(1)), i.push(this._media_expression()));
- if (t === null && i.length === 0)return null;
- this._readWhitespace();
- while (e.match(Tokens.IDENT))e.token().value.toLowerCase() != "and" && this._unexpectedToken(e.token()), this._readWhitespace(), i.push(this._media_expression());
- return new MediaQuery(n, t, i, r.startLine, r.startCol)
- }, _media_type: function () {
- return this._media_feature()
- }, _media_expression: function () {
- var e = this._tokenStream, t = null, n, r = null;
- return e.mustMatch(Tokens.LPAREN), t = this._media_feature(), this._readWhitespace(), e.match(Tokens.COLON) && (this._readWhitespace(), n = e.LT(1), r = this._expression()), e.mustMatch(Tokens.RPAREN), this._readWhitespace(), new MediaFeature(t, r ? new SyntaxUnit(r, n.startLine, n.startCol) : null)
- }, _media_feature: function () {
- var e = this._tokenStream;
- return e.mustMatch(Tokens.IDENT), SyntaxUnit.fromToken(e.token())
- }, _page: function () {
- var e = this._tokenStream, t, n, r = null, i = null;
- e.mustMatch(Tokens.PAGE_SYM), t = e.token().startLine, n = e.token().startCol, this._readWhitespace(), e.match(Tokens.IDENT) && (r = e.token().value, r.toLowerCase() === "auto" && this._unexpectedToken(e.token())), e.peek() == Tokens.COLON && (i = this._pseudo_page()), this._readWhitespace(), this.fire({type: "startpage", id: r, pseudo: i, line: t, col: n}), this._readDeclarations(!0, !0), this.fire({type: "endpage", id: r, pseudo: i, line: t, col: n})
- }, _margin: function () {
- var e = this._tokenStream, t, n, r = this._margin_sym();
- return r ? (t = e.token().startLine, n = e.token().startCol, this.fire({type: "startpagemargin", margin: r, line: t, col: n}), this._readDeclarations(!0), this.fire({type: "endpagemargin", margin: r, line: t, col: n}), !0) : !1
- }, _margin_sym: function () {
- var e = this._tokenStream;
- return e.match([Tokens.TOPLEFTCORNER_SYM, Tokens.TOPLEFT_SYM, Tokens.TOPCENTER_SYM, Tokens.TOPRIGHT_SYM, Tokens.TOPRIGHTCORNER_SYM, Tokens.BOTTOMLEFTCORNER_SYM, Tokens.BOTTOMLEFT_SYM, Tokens.BOTTOMCENTER_SYM, Tokens.BOTTOMRIGHT_SYM, Tokens.BOTTOMRIGHTCORNER_SYM, Tokens.LEFTTOP_SYM, Tokens.LEFTMIDDLE_SYM, Tokens.LEFTBOTTOM_SYM, Tokens.RIGHTTOP_SYM, Tokens.RIGHTMIDDLE_SYM, Tokens.RIGHTBOTTOM_SYM]) ? SyntaxUnit.fromToken(e.token()) : null
- }, _pseudo_page: function () {
- var e = this._tokenStream;
- return e.mustMatch(Tokens.COLON), e.mustMatch(Tokens.IDENT), e.token().value
- }, _font_face: function () {
- var e = this._tokenStream, t, n;
- e.mustMatch(Tokens.FONT_FACE_SYM), t = e.token().startLine, n = e.token().startCol, this._readWhitespace(), this.fire({type: "startfontface", line: t, col: n}), this._readDeclarations(!0), this.fire({type: "endfontface", line: t, col: n})
- }, _operator: function () {
- var e = this._tokenStream, t = null;
- return e.match([Tokens.SLASH, Tokens.COMMA]) && (t = e.token(), this._readWhitespace()), t ? PropertyValuePart.fromToken(t) : null
- }, _combinator: function () {
- var e = this._tokenStream, t = null, n;
- return e.match([Tokens.PLUS, Tokens.GREATER, Tokens.TILDE]) && (n = e.token(), t = new Combinator(n.value, n.startLine, n.startCol), this._readWhitespace()), t
- }, _unary_operator: function () {
- var e = this._tokenStream;
- return e.match([Tokens.MINUS, Tokens.PLUS]) ? e.token().value : null
- }, _property: function () {
- var e = this._tokenStream, t = null, n = null, r, i, s, o;
- return e.peek() == Tokens.STAR && this.options.starHack && (e.get(), i = e.token(), n = i.value, s = i.startLine, o = i.startCol), e.match(Tokens.IDENT) && (i = e.token(), r = i.value, r.charAt(0) == "_" && this.options.underscoreHack && (n = "_", r = r.substring(1)), t = new PropertyName(r, n, s || i.startLine, o || i.startCol), this._readWhitespace()), t
- }, _ruleset: function () {
- var e = this._tokenStream, t, n;
- try {
- n = this._selectors_group()
- } catch (r) {
- if (r instanceof SyntaxError && !this.options.strict) {
- this.fire({type: "error", error: r, message: r.message, line: r.line, col: r.col}), t = e.advance([Tokens.RBRACE]);
- if (t != Tokens.RBRACE)throw r;
- return!0
- }
- throw r
- }
- return n && (this.fire({type: "startrule", selectors: n, line: n[0].line, col: n[0].col}), this._readDeclarations(!0), this.fire({type: "endrule", selectors: n, line: n[0].line, col: n[0].col})), n
- }, _selectors_group: function () {
- var e = this._tokenStream, t = [], n;
- n = this._selector();
- if (n !== null) {
- t.push(n);
- while (e.match(Tokens.COMMA))this._readWhitespace(), n = this._selector(), n !== null ? t.push(n) : this._unexpectedToken(e.LT(1))
- }
- return t.length ? t : null
- }, _selector: function () {
- var e = this._tokenStream, t = [], n = null, r = null, i = null;
- n = this._simple_selector_sequence();
- if (n === null)return null;
- t.push(n);
- do {
- r = this._combinator();
- if (r !== null)t.push(r), n = this._simple_selector_sequence(), n === null ? this._unexpectedToken(e.LT(1)) : t.push(n); else {
- if (!this._readWhitespace())break;
- i = new Combinator(e.token().value, e.token().startLine, e.token().startCol), r = this._combinator(), n = this._simple_selector_sequence(), n === null ? r !== null && this._unexpectedToken(e.LT(1)) : (r !== null ? t.push(r) : t.push(i), t.push(n))
- }
- } while (!0);
- return new Selector(t, t[0].line, t[0].col)
- }, _simple_selector_sequence: function () {
- var e = this._tokenStream, t = null, n = [], r = "", i = [function () {
- return e.match(Tokens.HASH) ? new SelectorSubPart(e.token().value, "id", e.token().startLine, e.token().startCol) : null
- }, this._class, this._attrib, this._pseudo, this._negation], s = 0, o = i.length, u = null, a = !1, f, l;
- f = e.LT(1).startLine, l = e.LT(1).startCol, t = this._type_selector(), t || (t = this._universal()), t !== null && (r += t);
- for (; ;) {
- if (e.peek() === Tokens.S)break;
- while (s < o && u === null)u = i[s++].call(this);
- if (u === null) {
- if (r === "")return null;
- break
- }
- s = 0, n.push(u), r += u.toString(), u = null
- }
- return r !== "" ? new SelectorPart(t, n, r, f, l) : null
- }, _type_selector: function () {
- var e = this._tokenStream, t = this._namespace_prefix(), n = this._element_name();
- return n ? (t && (n.text = t + n.text, n.col -= t.length), n) : (t && (e.unget(), t.length > 1 && e.unget()), null)
- }, _class: function () {
- var e = this._tokenStream, t;
- return e.match(Tokens.DOT) ? (e.mustMatch(Tokens.IDENT), t = e.token(), new SelectorSubPart("." + t.value, "class", t.startLine, t.startCol - 1)) : null
- }, _element_name: function () {
- var e = this._tokenStream, t;
- return e.match(Tokens.IDENT) ? (t = e.token(), new SelectorSubPart(t.value, "elementName", t.startLine, t.startCol)) : null
- }, _namespace_prefix: function () {
- var e = this._tokenStream, t = "";
- if (e.LA(1) === Tokens.PIPE || e.LA(2) === Tokens.PIPE)e.match([Tokens.IDENT, Tokens.STAR]) && (t += e.token().value), e.mustMatch(Tokens.PIPE), t += "|";
- return t.length ? t : null
- }, _universal: function () {
- var e = this._tokenStream, t = "", n;
- return n = this._namespace_prefix(), n && (t += n), e.match(Tokens.STAR) && (t += "*"), t.length ? t : null
- }, _attrib: function () {
- var e = this._tokenStream, t = null, n, r;
- return e.match(Tokens.LBRACKET) ? (r = e.token(), t = r.value, t += this._readWhitespace(), n = this._namespace_prefix(), n && (t += n), e.mustMatch(Tokens.IDENT), t += e.token().value, t += this._readWhitespace(), e.match([Tokens.PREFIXMATCH, Tokens.SUFFIXMATCH, Tokens.SUBSTRINGMATCH, Tokens.EQUALS, Tokens.INCLUDES, Tokens.DASHMATCH]) && (t += e.token().value, t += this._readWhitespace(), e.mustMatch([Tokens.IDENT, Tokens.STRING]), t += e.token().value, t += this._readWhitespace()), e.mustMatch(Tokens.RBRACKET), new SelectorSubPart(t + "]", "attribute", r.startLine, r.startCol)) : null
- }, _pseudo: function () {
- var e = this._tokenStream, t = null, n = ":", r, i;
- return e.match(Tokens.COLON) && (e.match(Tokens.COLON) && (n += ":"), e.match(Tokens.IDENT) ? (t = e.token().value, r = e.token().startLine, i = e.token().startCol - n.length) : e.peek() == Tokens.FUNCTION && (r = e.LT(1).startLine, i = e.LT(1).startCol - n.length, t = this._functional_pseudo()), t && (t = new SelectorSubPart(n + t, "pseudo", r, i))), t
- }, _functional_pseudo: function () {
- var e = this._tokenStream, t = null;
- return e.match(Tokens.FUNCTION) && (t = e.token().value, t += this._readWhitespace(), t += this._expression(), e.mustMatch(Tokens.RPAREN), t += ")"), t
- }, _expression: function () {
- var e = this._tokenStream, t = "";
- while (e.match([Tokens.PLUS, Tokens.MINUS, Tokens.DIMENSION, Tokens.NUMBER, Tokens.STRING, Tokens.IDENT, Tokens.LENGTH, Tokens.FREQ, Tokens.ANGLE, Tokens.TIME, Tokens.RESOLUTION]))t += e.token().value, t += this._readWhitespace();
- return t.length ? t : null
- }, _negation: function () {
- var e = this._tokenStream, t, n, r = "", i, s = null;
- return e.match(Tokens.NOT) && (r = e.token().value, t = e.token().startLine, n = e.token().startCol, r += this._readWhitespace(), i = this._negation_arg(), r += i, r += this._readWhitespace(), e.match(Tokens.RPAREN), r += e.token().value, s = new SelectorSubPart(r, "not", t, n), s.args.push(i)), s
- }, _negation_arg: function () {
- var e = this._tokenStream, t = [this._type_selector, this._universal, function () {
- return e.match(Tokens.HASH) ? new SelectorSubPart(e.token().value, "id", e.token().startLine, e.token().startCol) : null
- }, this._class, this._attrib, this._pseudo], n = null, r = 0, i = t.length, s, o, u, a;
- o = e.LT(1).startLine, u = e.LT(1).startCol;
- while (r < i && n === null)n = t[r].call(this), r++;
- return n === null && this._unexpectedToken(e.LT(1)), n.type == "elementName" ? a = new SelectorPart(n, [], n.toString(), o, u) : a = new SelectorPart(null, [n], n.toString(), o, u), a
- }, _declaration: function () {
- var e = this._tokenStream, t = null, n = null, r = null, i = null, s = null, o = "";
- t = this._property();
- if (t !== null) {
- e.mustMatch(Tokens.COLON), this._readWhitespace(), n = this._expr(), (!n || n.length === 0) && this._unexpectedToken(e.LT(1)), r = this._prio(), o = t.toString();
- if (this.options.starHack && t.hack == "*" || this.options.underscoreHack && t.hack == "_")o = t.text;
- try {
- this._validateProperty(o, n)
- } catch (u) {
- s = u
- }
- return this.fire({type: "property", property: t, value: n, important: r, line: t.line, col: t.col, invalid: s}), !0
- }
- return!1
- }, _prio: function () {
- var e = this._tokenStream, t = e.match(Tokens.IMPORTANT_SYM);
- return this._readWhitespace(), t
- }, _expr: function () {
- var e = this._tokenStream, t = [], n = null, r = null;
- n = this._term();
- if (n !== null) {
- t.push(n);
- do {
- r = this._operator(), r && t.push(r), n = this._term();
- if (n === null)break;
- t.push(n)
- } while (!0)
- }
- return t.length > 0 ? new PropertyValue(t, t[0].line, t[0].col) : null
- }, _term: function () {
- var e = this._tokenStream, t = null, n = null, r, i, s;
- return t = this._unary_operator(), t !== null && (i = e.token().startLine, s = e.token().startCol), e.peek() == Tokens.IE_FUNCTION && this.options.ieFilters ? (n = this._ie_function(), t === null && (i = e.token().startLine, s = e.token().startCol)) : e.match([Tokens.NUMBER, Tokens.PERCENTAGE, Tokens.LENGTH, Tokens.ANGLE, Tokens.TIME, Tokens.FREQ, Tokens.STRING, Tokens.IDENT, Tokens.URI, Tokens.UNICODE_RANGE]) ? (n = e.token().value, t === null && (i = e.token().startLine, s = e.token().startCol), this._readWhitespace()) : (r = this._hexcolor(), r === null ? (t === null && (i = e.LT(1).startLine, s = e.LT(1).startCol), n === null && (e.LA(3) == Tokens.EQUALS && this.options.ieFilters ? n = this._ie_function() : n = this._function())) : (n = r.value, t === null && (i = r.startLine, s = r.startCol))), n !== null ? new PropertyValuePart(t !== null ? t + n : n, i, s) : null
- }, _function: function () {
- var e = this._tokenStream, t = null, n = null, r;
- if (e.match(Tokens.FUNCTION)) {
- t = e.token().value, this._readWhitespace(), n = this._expr(), t += n;
- if (this.options.ieFilters && e.peek() == Tokens.EQUALS)do {
- this._readWhitespace() && (t += e.token().value), e.LA(0) == Tokens.COMMA && (t += e.token().value), e.match(Tokens.IDENT), t += e.token().value, e.match(Tokens.EQUALS), t += e.token().value, r = e.peek();
- while (r != Tokens.COMMA && r != Tokens.S && r != Tokens.RPAREN)e.get(), t += e.token().value, r = e.peek()
- } while (e.match([Tokens.COMMA, Tokens.S]));
- e.match(Tokens.RPAREN), t += ")", this._readWhitespace()
- }
- return t
- }, _ie_function: function () {
- var e = this._tokenStream, t = null, n = null, r;
- if (e.match([Tokens.IE_FUNCTION, Tokens.FUNCTION])) {
- t = e.token().value;
- do {
- this._readWhitespace() && (t += e.token().value), e.LA(0) == Tokens.COMMA && (t += e.token().value), e.match(Tokens.IDENT), t += e.token().value, e.match(Tokens.EQUALS), t += e.token().value, r = e.peek();
- while (r != Tokens.COMMA && r != Tokens.S && r != Tokens.RPAREN)e.get(), t += e.token().value, r = e.peek()
- } while (e.match([Tokens.COMMA, Tokens.S]));
- e.match(Tokens.RPAREN), t += ")", this._readWhitespace()
- }
- return t
- }, _hexcolor: function () {
- var e = this._tokenStream, t = null, n;
- if (e.match(Tokens.HASH)) {
- t = e.token(), n = t.value;
- if (!/#[a-f0-9]{3,6}/i.test(n))throw new SyntaxError("Expected a hex color but found '" + n + "' at line " + t.startLine + ", col " + t.startCol + ".", t.startLine, t.startCol);
- this._readWhitespace()
- }
- return t
- }, _keyframes: function () {
- var e = this._tokenStream, t, n, r, i = "";
- e.mustMatch(Tokens.KEYFRAMES_SYM), t = e.token(), /^@\-([^\-]+)\-/.test(t.value) && (i = RegExp.$1), this._readWhitespace(), r = this._keyframe_name(), this._readWhitespace(), e.mustMatch(Tokens.LBRACE), this.fire({type: "startkeyframes", name: r, prefix: i, line: t.startLine, col: t.startCol}), this._readWhitespace(), n = e.peek();
- while (n == Tokens.IDENT || n == Tokens.PERCENTAGE)this._keyframe_rule(), this._readWhitespace(), n = e.peek();
- this.fire({type: "endkeyframes", name: r, prefix: i, line: t.startLine, col: t.startCol}), this._readWhitespace(), e.mustMatch(Tokens.RBRACE)
- }, _keyframe_name: function () {
- var e = this._tokenStream, t;
- return e.mustMatch([Tokens.IDENT, Tokens.STRING]), SyntaxUnit.fromToken(e.token())
- }, _keyframe_rule: function () {
- var e = this._tokenStream, t, n = this._key_list();
- this.fire({type: "startkeyframerule", keys: n, line: n[0].line, col: n[0].col}), this._readDeclarations(!0), this.fire({type: "endkeyframerule", keys: n, line: n[0].line, col: n[0].col})
- }, _key_list: function () {
- var e = this._tokenStream, t, n, r = [];
- r.push(this._key()), this._readWhitespace();
- while (e.match(Tokens.COMMA))this._readWhitespace(), r.push(this._key()), this._readWhitespace();
- return r
- }, _key: function () {
- var e = this._tokenStream, t;
- if (e.match(Tokens.PERCENTAGE))return SyntaxUnit.fromToken(e.token());
- if (e.match(Tokens.IDENT)) {
- t = e.token();
- if (/from|to/i.test(t.value))return SyntaxUnit.fromToken(t);
- e.unget()
- }
- this._unexpectedToken(e.LT(1))
- }, _skipCruft: function () {
- while (this._tokenStream.match([Tokens.S, Tokens.CDO, Tokens.CDC]));
- }, _readDeclarations: function (e, t) {
- var n = this._tokenStream, r;
- this._readWhitespace(), e && n.mustMatch(Tokens.LBRACE), this._readWhitespace();
- try {
- for (; ;) {
- if (!(n.match(Tokens.SEMICOLON) || t && this._margin())) {
- if (!this._declaration())break;
- if (!n.match(Tokens.SEMICOLON))break
- }
- this._readWhitespace()
- }
- n.mustMatch(Tokens.RBRACE), this._readWhitespace()
- } catch (i) {
- if (!(i instanceof SyntaxError && !this.options.strict))throw i;
- this.fire({type: "error", error: i, message: i.message, line: i.line, col: i.col}), r = n.advance([Tokens.SEMICOLON, Tokens.RBRACE]);
- if (r == Tokens.SEMICOLON)this._readDeclarations(!1, t); else if (r != Tokens.RBRACE)throw i
- }
- }, _readWhitespace: function () {
- var e = this._tokenStream, t = "";
- while (e.match(Tokens.S))t += e.token().value;
- return t
- }, _unexpectedToken: function (e) {
- throw new SyntaxError("Unexpected token '" + e.value + "' at line " + e.startLine + ", col " + e.startCol + ".", e.startLine, e.startCol)
- }, _verifyEnd: function () {
- this._tokenStream.LA(1) != Tokens.EOF && this._unexpectedToken(this._tokenStream.LT(1))
- }, _validateProperty: function (e, t) {
- Validation.validate(e, t)
- }, parse: function (e) {
- this._tokenStream = new TokenStream(e, Tokens), this._stylesheet()
- }, parseStyleSheet: function (e) {
- return this.parse(e)
- }, parseMediaQuery: function (e) {
- this._tokenStream = new TokenStream(e, Tokens);
- var t = this._media_query();
- return this._verifyEnd(), t
- }, parsePropertyValue: function (e) {
- this._tokenStream = new TokenStream(e, Tokens), this._readWhitespace();
- var t = this._expr();
- return this._readWhitespace(), this._verifyEnd(), t
- }, parseRule: function (e) {
- this._tokenStream = new TokenStream(e, Tokens), this._readWhitespace();
- var t = this._ruleset();
- return this._readWhitespace(), this._verifyEnd(), t
- }, parseSelector: function (e) {
- this._tokenStream = new TokenStream(e, Tokens), this._readWhitespace();
- var t = this._selector();
- return this._readWhitespace(), this._verifyEnd(), t
- }, parseStyleAttribute: function (e) {
- e += "}", this._tokenStream = new TokenStream(e, Tokens), this._readDeclarations()
- }};
- for (t in n)n.hasOwnProperty(t) && (e[t] = n[t]);
- return e
- }();
- var Properties = {"alignment-adjust": "auto | baseline | before-edge | text-before-edge | middle | central | after-edge | text-after-edge | ideographic | alphabetic | hanging | mathematical | | ", "alignment-baseline": "baseline | use-script | before-edge | text-before-edge | after-edge | text-after-edge | central | middle | ideographic | alphabetic | hanging | mathematical", animation: 1, "animation-delay": {multi: "", comma: !0}, "animation-direction": {multi: "normal | alternate", comma: !0}, "animation-duration": {multi: "", comma: !0}, "animation-iteration-count": {multi: " | infinite", comma: !0}, "animation-name": {multi: "none | ", comma: !0}, "animation-play-state": {multi: "running | paused", comma: !0}, "animation-timing-function": 1, "-moz-animation-delay": {multi: "", comma: !0}, "-moz-animation-direction": {multi: "normal | alternate", comma: !0}, "-moz-animation-duration": {multi: "", comma: !0}, "-moz-animation-iteration-count": {multi: " | infinite", comma: !0}, "-moz-animation-name": {multi: "none | ", comma: !0}, "-moz-animation-play-state": {multi: "running | paused", comma: !0}, "-ms-animation-delay": {multi: "", comma: !0}, "-ms-animation-direction": {multi: "normal | alternate", comma: !0}, "-ms-animation-duration": {multi: "", comma: !0}, "-ms-animation-iteration-count": {multi: " | infinite", comma: !0}, "-ms-animation-name": {multi: "none | ", comma: !0}, "-ms-animation-play-state": {multi: "running | paused", comma: !0}, "-webkit-animation-delay": {multi: "", comma: !0}, "-webkit-animation-direction": {multi: "normal | alternate", comma: !0}, "-webkit-animation-duration": {multi: "", comma: !0}, "-webkit-animation-iteration-count": {multi: " | infinite", comma: !0}, "-webkit-animation-name": {multi: "none | ", comma: !0}, "-webkit-animation-play-state": {multi: "running | paused", comma: !0}, "-o-animation-delay": {multi: "", comma: !0}, "-o-animation-direction": {multi: "normal | alternate", comma: !0}, "-o-animation-duration": {multi: "", comma: !0}, "-o-animation-iteration-count": {multi: " | infinite", comma: !0}, "-o-animation-name": {multi: "none | ", comma: !0}, "-o-animation-play-state": {multi: "running | paused", comma: !0}, appearance: "icon | window | desktop | workspace | document | tooltip | dialog | button | push-button | hyperlink | radio-button | checkbox | menu-item | tab | menu | menubar | pull-down-menu | pop-up-menu | list-menu | radio-group | checkbox-group | outline-tree | range | field | combo-box | signature | password | normal | inherit", azimuth: function (e) {
- var t = " | leftwards | rightwards | inherit", n = "left-side | far-left | left | center-left | center | center-right | right | far-right | right-side", r = !1, i = !1, s;
- ValidationTypes.isAny(e, t) || (ValidationTypes.isAny(e, "behind") && (r = !0, i = !0), ValidationTypes.isAny(e, n) && (i = !0, r || ValidationTypes.isAny(e, "behind")));
- if (e.hasNext())throw s = e.next(), i ? new ValidationError("Expected end of value but found '" + s + "'.", s.line, s.col) : new ValidationError("Expected (<'azimuth'>) but found '" + s + "'.", s.line, s.col)
- }, "backface-visibility": "visible | hidden", background: 1, "background-attachment": {multi: "", comma: !0}, "background-clip": {multi: "", comma: !0}, "background-color": " | inherit", "background-image": {multi: "", comma: !0}, "background-origin": {multi: "", comma: !0}, "background-position": {multi: "", comma: !0}, "background-repeat": {multi: ""}, "background-size": {multi: "", comma: !0}, "baseline-shift": "baseline | sub | super | | ", behavior: 1, binding: 1, bleed: "", "bookmark-label": " | | ", "bookmark-level": "none | ", "bookmark-state": "open | closed", "bookmark-target": "none | | ", border: " || || ", "border-bottom": " || || ", "border-bottom-color": "", "border-bottom-left-radius": "", "border-bottom-right-radius": "", "border-bottom-style": "", "border-bottom-width": "", "border-collapse": "collapse | separate | inherit", "border-color": {multi: " | inherit", max: 4}, "border-image": 1, "border-image-outset": {multi: " | ", max: 4}, "border-image-repeat": {multi: "stretch | repeat | round", max: 2}, "border-image-slice": function (e) {
- var t = !1, n = " | ", r = !1, i = 0, s = 4, o;
- ValidationTypes.isAny(e, "fill") && (r = !0, t = !0);
- while (e.hasNext() && i < s) {
- t = ValidationTypes.isAny(e, n);
- if (!t)break;
- i++
- }
- r ? t = !0 : ValidationTypes.isAny(e, "fill");
- if (e.hasNext())throw o = e.next(), t ? new ValidationError("Expected end of value but found '" + o + "'.", o.line, o.col) : new ValidationError("Expected ([ | ]{1,4} && fill?) but found '" + o + "'.", o.line, o.col)
- }, "border-image-source": " | none", "border-image-width": {multi: " | | | auto", max: 4}, "border-left": " || || ", "border-left-color": " | inherit", "border-left-style": "", "border-left-width": "", "border-radius": function (e) {
- var t = !1, n = " | ", r = !1, i = !1, s = 0, o = 8, u;
- while (e.hasNext() && s < o) {
- t = ValidationTypes.isAny(e, n);
- if (!t) {
- if (!(e.peek() == "/" && s > 1 && !r))break;
- r = !0, o = s + 5, e.next()
- }
- s++
- }
- if (e.hasNext())throw u = e.next(), t ? new ValidationError("Expected end of value but found '" + u + "'.", u.line, u.col) : new ValidationError("Expected (<'border-radius'>) but found '" + u + "'.", u.line, u.col)
- }, "border-right": " || || ", "border-right-color": " | inherit", "border-right-style": "", "border-right-width": "", "border-spacing": {multi: " | inherit", max: 2}, "border-style": {multi: "", max: 4}, "border-top": " || || ", "border-top-color": " | inherit", "border-top-left-radius": "", "border-top-right-radius": "", "border-top-style": "", "border-top-width": "", "border-width": {multi: "", max: 4}, bottom: " | inherit", "box-align": "start | end | center | baseline | stretch", "box-decoration-break": "slice |clone", "box-direction": "normal | reverse | inherit", "box-flex": "", "box-flex-group": "", "box-lines": "single | multiple", "box-ordinal-group": "", "box-orient": "horizontal | vertical | inline-axis | block-axis | inherit", "box-pack": "start | end | center | justify", "box-shadow": function (e) {
- var t = !1, n;
- if (!ValidationTypes.isAny(e, "none"))Validation.multiProperty("", e, !0, Infinity); else if (e.hasNext())throw n = e.next(), new ValidationError("Expected end of value but found '" + n + "'.", n.line, n.col)
- }, "box-sizing": "content-box | border-box | inherit", "break-after": "auto | always | avoid | left | right | page | column | avoid-page | avoid-column", "break-before": "auto | always | avoid | left | right | page | column | avoid-page | avoid-column", "break-inside": "auto | avoid | avoid-page | avoid-column", "caption-side": "top | bottom | inherit", clear: "none | right | left | both | inherit", clip: 1, color: " | inherit", "color-profile": 1, "column-count": " | auto", "column-fill": "auto | balance", "column-gap": " | normal", "column-rule": " || || ", "column-rule-color": "", "column-rule-style": "", "column-rule-width": "", "column-span": "none | all", "column-width": " | auto", columns: 1, content: 1, "counter-increment": 1, "counter-reset": 1, crop: " | auto", cue: "cue-after | cue-before | inherit", "cue-after": 1, "cue-before": 1, cursor: 1, direction: "ltr | rtl | inherit", display: "inline | block | list-item | inline-block | table | inline-table | table-row-group | table-header-group | table-footer-group | table-row | table-column-group | table-column | table-cell | table-caption | box | inline-box | grid | inline-grid | none | inherit", "dominant-baseline": 1, "drop-initial-after-adjust": "central | middle | after-edge | text-after-edge | ideographic | alphabetic | mathematical | | ", "drop-initial-after-align": "baseline | use-script | before-edge | text-before-edge | after-edge | text-after-edge | central | middle | ideographic | alphabetic | hanging | mathematical", "drop-initial-before-adjust": "before-edge | text-before-edge | central | middle | hanging | mathematical | | ", "drop-initial-before-align": "caps-height | baseline | use-script | before-edge | text-before-edge | after-edge | text-after-edge | central | middle | ideographic | alphabetic | hanging | mathematical", "drop-initial-size": "auto | line | | ", "drop-initial-value": "initial | ", elevation: " | below | level | above | higher | lower | inherit", "empty-cells": "show | hide | inherit", filter: 1, fit: "fill | hidden | meet | slice", "fit-position": 1, "float": "left | right | none | inherit", "float-offset": 1, font: 1, "font-family": 1, "font-size": " | | | | inherit", "font-size-adjust": " | none | inherit", "font-stretch": "normal | ultra-condensed | extra-condensed | condensed | semi-condensed | semi-expanded | expanded | extra-expanded | ultra-expanded | inherit", "font-style": "normal | italic | oblique | inherit", "font-variant": "normal | small-caps | inherit", "font-weight": "normal | bold | bolder | lighter | 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900 | inherit", "grid-cell-stacking": "columns | rows | layer", "grid-column": 1, "grid-columns": 1, "grid-column-align": "start | end | center | stretch", "grid-column-sizing": 1, "grid-column-span": "", "grid-flow": "none | rows | columns", "grid-layer": "", "grid-row": 1, "grid-rows": 1, "grid-row-align": "start | end | center | stretch", "grid-row-span": "", "grid-row-sizing": 1, "hanging-punctuation": 1, height: " | inherit", "hyphenate-after": " | auto", "hyphenate-before": " | auto", "hyphenate-character": " | auto", "hyphenate-lines": "no-limit | ", "hyphenate-resource": 1, hyphens: "none | manual | auto", icon: 1, "image-orientation": "angle | auto", "image-rendering": 1, "image-resolution": 1, "inline-box-align": "initial | last | ", left: " | inherit", "letter-spacing": " | normal | inherit", "line-height": " | | | normal | inherit", "line-break": "auto | loose | normal | strict", "line-stacking": 1, "line-stacking-ruby": "exclude-ruby | include-ruby", "line-stacking-shift": "consider-shifts | disregard-shifts", "line-stacking-strategy": "inline-line-height | block-line-height | max-height | grid-height", "list-style": 1, "list-style-image": " | none | inherit", "list-style-position": "inside | outside | inherit", "list-style-type": "disc | circle | square | decimal | decimal-leading-zero | lower-roman | upper-roman | lower-greek | lower-latin | upper-latin | armenian | georgian | lower-alpha | upper-alpha | none | inherit", margin: {multi: " | inherit", max: 4}, "margin-bottom": " | inherit", "margin-left": " | inherit", "margin-right": " | inherit", "margin-top": " | inherit", mark: 1, "mark-after": 1, "mark-before": 1, marks: 1, "marquee-direction": 1, "marquee-play-count": 1, "marquee-speed": 1, "marquee-style": 1, "max-height": " | | none | inherit", "max-width": " | | none | inherit", "min-height": " | | inherit", "min-width": " | | inherit", "move-to": 1, "nav-down": 1, "nav-index": 1, "nav-left": 1, "nav-right": 1, "nav-up": 1, opacity: " | inherit", orphans: " | inherit", outline: 1, "outline-color": " | invert | inherit", "outline-offset": 1, "outline-style": " | inherit", "outline-width": " | inherit", overflow: "visible | hidden | scroll | auto | inherit", "overflow-style": 1, "overflow-x": 1, "overflow-y": 1, padding: {multi: " | inherit", max: 4}, "padding-bottom": " | inherit", "padding-left": " | inherit", "padding-right": " | inherit", "padding-top": " | inherit", page: 1, "page-break-after": "auto | always | avoid | left | right | inherit", "page-break-before": "auto | always | avoid | left | right | inherit", "page-break-inside": "auto | avoid | inherit", "page-policy": 1, pause: 1, "pause-after": 1, "pause-before": 1, perspective: 1, "perspective-origin": 1, phonemes: 1, pitch: 1, "pitch-range": 1, "play-during": 1, "pointer-events": "auto | none | visiblePainted | visibleFill | visibleStroke | visible | painted | fill | stroke | all | inherit", position: "static | relative | absolute | fixed | inherit", "presentation-level": 1, "punctuation-trim": 1, quotes: 1, "rendering-intent": 1, resize: 1, rest: 1, "rest-after": 1, "rest-before": 1, richness: 1, right: " | inherit", rotation: 1, "rotation-point": 1, "ruby-align": 1, "ruby-overhang": 1, "ruby-position": 1, "ruby-span": 1, size: 1, speak: "normal | none | spell-out | inherit", "speak-header": "once | always | inherit", "speak-numeral": "digits | continuous | inherit", "speak-punctuation": "code | none | inherit", "speech-rate": 1, src: 1, stress: 1, "string-set": 1, "table-layout": "auto | fixed | inherit", "tab-size": " | ", target: 1, "target-name": 1, "target-new": 1, "target-position": 1, "text-align": "left | right | center | justify | inherit", "text-align-last": 1, "text-decoration": 1, "text-emphasis": 1, "text-height": 1, "text-indent": " | | inherit", "text-justify": "auto | none | inter-word | inter-ideograph | inter-cluster | distribute | kashida", "text-outline": 1, "text-overflow": 1, "text-rendering": "auto | optimizeSpeed | optimizeLegibility | geometricPrecision | inherit", "text-shadow": 1, "text-transform": "capitalize | uppercase | lowercase | none | inherit", "text-wrap": "normal | none | avoid", top: " | inherit", transform: 1, "transform-origin": 1, "transform-style": 1, transition: 1, "transition-delay": 1, "transition-duration": 1, "transition-property": 1, "transition-timing-function": 1, "unicode-bidi": "normal | embed | bidi-override | inherit", "user-modify": "read-only | read-write | write-only | inherit", "user-select": "none | text | toggle | element | elements | all | inherit", "vertical-align": " | | baseline | sub | super | top | text-top | middle | bottom | text-bottom | inherit", visibility: "visible | hidden | collapse | inherit", "voice-balance": 1, "voice-duration": 1, "voice-family": 1, "voice-pitch": 1, "voice-pitch-range": 1, "voice-rate": 1, "voice-stress": 1, "voice-volume": 1, volume: 1, "white-space": "normal | pre | nowrap | pre-wrap | pre-line | inherit", "white-space-collapse": 1, widows: " | inherit", width: " | | auto | inherit", "word-break": "normal | keep-all | break-all", "word-spacing": " | normal | inherit", "word-wrap": 1, "z-index": " | auto | inherit", zoom: " | | normal"};
- PropertyName.prototype = new SyntaxUnit, PropertyName.prototype.constructor = PropertyName, PropertyName.prototype.toString = function () {
- return(this.hack ? this.hack : "") + this.text
- }, PropertyValue.prototype = new SyntaxUnit, PropertyValue.prototype.constructor = PropertyValue, PropertyValueIterator.prototype.count = function () {
- return this._parts.length
- }, PropertyValueIterator.prototype.isFirst = function () {
- return this._i === 0
- }, PropertyValueIterator.prototype.hasNext = function () {
- return this._i < this._parts.length
- }, PropertyValueIterator.prototype.mark = function () {
- this._marks.push(this._i)
- }, PropertyValueIterator.prototype.peek = function (e) {
- return this.hasNext() ? this._parts[this._i + (e || 0)] : null
- }, PropertyValueIterator.prototype.next = function () {
- return this.hasNext() ? this._parts[this._i++] : null
- }, PropertyValueIterator.prototype.previous = function () {
- return this._i > 0 ? this._parts[--this._i] : null
- }, PropertyValueIterator.prototype.restore = function () {
- this._marks.length && (this._i = this._marks.pop())
- }, PropertyValuePart.prototype = new SyntaxUnit, PropertyValuePart.prototype.constructor = PropertyValuePart, PropertyValuePart.fromToken = function (e) {
- return new PropertyValuePart(e.value, e.startLine, e.startCol)
- };
- var Pseudos = {":first-letter": 1, ":first-line": 1, ":before": 1, ":after": 1};
- Pseudos.ELEMENT = 1, Pseudos.CLASS = 2, Pseudos.isElement = function (e) {
- return e.indexOf("::") === 0 || Pseudos[e.toLowerCase()] == Pseudos.ELEMENT
- }, Selector.prototype = new SyntaxUnit, Selector.prototype.constructor = Selector, SelectorPart.prototype = new SyntaxUnit, SelectorPart.prototype.constructor = SelectorPart, SelectorSubPart.prototype = new SyntaxUnit, SelectorSubPart.prototype.constructor = SelectorSubPart, Specificity.prototype = {constructor: Specificity, compare: function (e) {
- var t = ["a", "b", "c", "d"], n, r;
- for (n = 0, r = t.length; n < r; n++) {
- if (this[t[n]] < e[t[n]])return-1;
- if (this[t[n]] > e[t[n]])return 1
- }
- return 0
- }, valueOf: function () {
- return this.a * 1e3 + this.b * 100 + this.c * 10 + this.d
- }, toString: function () {
- return this.a + "," + this.b + "," + this.c + "," + this.d
- }}, Specificity.calculate = function (e) {
- function u(e) {
- var t, n, r, a, f = e.elementName ? e.elementName.text : "", l;
- f && f.charAt(f.length - 1) != "*" && o++;
- for (t = 0, r = e.modifiers.length; t < r; t++) {
- l = e.modifiers[t];
- switch (l.type) {
- case"class":
- case"attribute":
- s++;
- break;
- case"id":
- i++;
- break;
- case"pseudo":
- Pseudos.isElement(l.text) ? o++ : s++;
- break;
- case"not":
- for (n = 0, a = l.args.length; n < a; n++)u(l.args[n])
- }
- }
- }
-
- var t, n, r, i = 0, s = 0, o = 0;
- for (t = 0, n = e.parts.length; t < n; t++)r = e.parts[t], r instanceof SelectorPart && u(r);
- return new Specificity(0, i, s, o)
- };
- var h = /^[0-9a-fA-F]$/, nonascii = /^[\u0080-\uFFFF]$/, nl = /\n|\r\n|\r|\f/;
- TokenStream.prototype = mix(new TokenStreamBase, {_getToken: function (e) {
- var t, n = this._reader, r = null, i = n.getLine(), s = n.getCol();
- t = n.read();
- while (t) {
- switch (t) {
- case"/":
- n.peek() == "*" ? r = this.commentToken(t, i, s) : r = this.charToken(t, i, s);
- break;
- case"|":
- case"~":
- case"^":
- case"$":
- case"*":
- n.peek() == "=" ? r = this.comparisonToken(t, i, s) : r = this.charToken(t, i, s);
- break;
- case'"':
- case"'":
- r = this.stringToken(t, i, s);
- break;
- case"#":
- isNameChar(n.peek()) ? r = this.hashToken(t, i, s) : r = this.charToken(t, i, s);
- break;
- case".":
- isDigit(n.peek()) ? r = this.numberToken(t, i, s) : r = this.charToken(t, i, s);
- break;
- case"-":
- n.peek() == "-" ? r = this.htmlCommentEndToken(t, i, s) : isNameStart(n.peek()) ? r = this.identOrFunctionToken(t, i, s) : r = this.charToken(t, i, s);
- break;
- case"!":
- r = this.importantToken(t, i, s);
- break;
- case"@":
- r = this.atRuleToken(t, i, s);
- break;
- case":":
- r = this.notToken(t, i, s);
- break;
- case"<":
- r = this.htmlCommentStartToken(t, i, s);
- break;
- case"U":
- case"u":
- if (n.peek() == "+") {
- r = this.unicodeRangeToken(t, i, s);
- break
- }
- ;
- default:
- isDigit(t) ? r = this.numberToken(t, i, s) : isWhitespace(t) ? r = this.whitespaceToken(t, i, s) : isIdentStart(t) ? r = this.identOrFunctionToken(t, i, s) : r = this.charToken(t, i, s)
- }
- break
- }
- return!r && t === null && (r = this.createToken(Tokens.EOF, null, i, s)), r
- }, createToken: function (e, t, n, r, i) {
- var s = this._reader;
- return i = i || {}, {value: t, type: e, channel: i.channel, hide: i.hide || !1, startLine: n, startCol: r, endLine: s.getLine(), endCol: s.getCol()}
- }, atRuleToken: function (e, t, n) {
- var r = e, i = this._reader, s = Tokens.CHAR, o = !1, u, a;
- i.mark(), u = this.readName(), r = e + u, s = Tokens.type(r.toLowerCase());
- if (s == Tokens.CHAR || s == Tokens.UNKNOWN)r.length > 1 ? s = Tokens.UNKNOWN_SYM : (s = Tokens.CHAR, r = e, i.reset());
- return this.createToken(s, r, t, n)
- }, charToken: function (e, t, n) {
- var r = Tokens.type(e);
- return r == -1 && (r = Tokens.CHAR), this.createToken(r, e, t, n)
- }, commentToken: function (e, t, n) {
- var r = this._reader, i = this.readComment(e);
- return this.createToken(Tokens.COMMENT, i, t, n)
- }, comparisonToken: function (e, t, n) {
- var r = this._reader, i = e + r.read(), s = Tokens.type(i) || Tokens.CHAR;
- return this.createToken(s, i, t, n)
- }, hashToken: function (e, t, n) {
- var r = this._reader, i = this.readName(e);
- return this.createToken(Tokens.HASH, i, t, n)
- }, htmlCommentStartToken: function (e, t, n) {
- var r = this._reader, i = e;
- return r.mark(), i += r.readCount(3), i == "" ? this.createToken(Tokens.CDC, i, t, n) : (r.reset(), this.charToken(e, t, n))
- }, identOrFunctionToken: function (e, t, n) {
- var r = this._reader, i = this.readName(e), s = Tokens.IDENT;
- return r.peek() == "(" ? (i += r.read(), i.toLowerCase() == "url(" ? (s = Tokens.URI, i = this.readURI(i), i.toLowerCase() == "url(" && (s = Tokens.FUNCTION)) : s = Tokens.FUNCTION) : r.peek() == ":" && i.toLowerCase() == "progid" && (i += r.readTo("("), s = Tokens.IE_FUNCTION), this.createToken(s, i, t, n)
- }, importantToken: function (e, t, n) {
- var r = this._reader, i = e, s = Tokens.CHAR, o, u;
- r.mark(), u = r.read();
- while (u) {
- if (u == "/") {
- if (r.peek() != "*")break;
- o = this.readComment(u);
- if (o === "")break
- } else {
- if (!isWhitespace(u)) {
- if (/i/i.test(u)) {
- o = r.readCount(8), /mportant/i.test(o) && (i += u + o, s = Tokens.IMPORTANT_SYM);
- break
- }
- break
- }
- i += u + this.readWhitespace()
- }
- u = r.read()
- }
- return s == Tokens.CHAR ? (r.reset(), this.charToken(e, t, n)) : this.createToken(s, i, t, n)
- }, notToken: function (e, t, n) {
- var r = this._reader, i = e;
- return r.mark(), i += r.readCount(4), i.toLowerCase() == ":not(" ? this.createToken(Tokens.NOT, i, t, n) : (r.reset(), this.charToken(e, t, n))
- }, numberToken: function (e, t, n) {
- var r = this._reader, i = this.readNumber(e), s, o = Tokens.NUMBER, u = r.peek();
- return isIdentStart(u) ? (s = this.readName(r.read()), i += s, /^em$|^ex$|^px$|^gd$|^rem$|^vw$|^vh$|^vm$|^ch$|^cm$|^mm$|^in$|^pt$|^pc$/i.test(s) ? o = Tokens.LENGTH : /^deg|^rad$|^grad$/i.test(s) ? o = Tokens.ANGLE : /^ms$|^s$/i.test(s) ? o = Tokens.TIME : /^hz$|^khz$/i.test(s) ? o = Tokens.FREQ : /^dpi$|^dpcm$/i.test(s) ? o = Tokens.RESOLUTION : o = Tokens.DIMENSION) : u == "%" && (i += r.read(), o = Tokens.PERCENTAGE), this.createToken(o, i, t, n)
- }, stringToken: function (e, t, n) {
- var r = e, i = e, s = this._reader, o = e, u = Tokens.STRING, a = s.read();
- while (a) {
- i += a;
- if (a == r && o != "\\")break;
- if (isNewLine(s.peek()) && a != "\\") {
- u = Tokens.INVALID;
- break
- }
- o = a, a = s.read()
- }
- return a === null && (u = Tokens.INVALID), this.createToken(u, i, t, n)
- }, unicodeRangeToken: function (e, t, n) {
- var r = this._reader, i = e, s, o = Tokens.CHAR;
- return r.peek() == "+" && (r.mark(), i += r.read(), i += this.readUnicodeRangePart(!0), i.length == 2 ? r.reset() : (o = Tokens.UNICODE_RANGE, i.indexOf("?") == -1 && r.peek() == "-" && (r.mark(), s = r.read(), s += this.readUnicodeRangePart(!1), s.length == 1 ? r.reset() : i += s))), this.createToken(o, i, t, n)
- }, whitespaceToken: function (e, t, n) {
- var r = this._reader, i = e + this.readWhitespace();
- return this.createToken(Tokens.S, i, t, n)
- }, readUnicodeRangePart: function (e) {
- var t = this._reader, n = "", r = t.peek();
- while (isHexDigit(r) && n.length < 6)t.read(), n += r, r = t.peek();
- if (e)while (r == "?" && n.length < 6)t.read(), n += r, r = t.peek();
- return n
- }, readWhitespace: function () {
- var e = this._reader, t = "", n = e.peek();
- while (isWhitespace(n))e.read(), t += n, n = e.peek();
- return t
- }, readNumber: function (e) {
- var t = this._reader, n = e, r = e == ".", i = t.peek();
- while (i) {
- if (isDigit(i))n += t.read(); else {
- if (i != ".")break;
- if (r)break;
- r = !0, n += t.read()
- }
- i = t.peek()
- }
- return n
- }, readString: function () {
- var e = this._reader, t = e.read(), n = t, r = t, i = e.peek();
- while (i) {
- i = e.read(), n += i;
- if (i == t && r != "\\")break;
- if (isNewLine(e.peek()) && i != "\\") {
- n = "";
- break
- }
- r = i, i = e.peek()
- }
- return i === null && (n = ""), n
- }, readURI: function (e) {
- var t = this._reader, n = e, r = "", i = t.peek();
- t.mark();
- while (i && isWhitespace(i))t.read(), i = t.peek();
- i == "'" || i == '"' ? r = this.readString() : r = this.readURL(), i = t.peek();
- while (i && isWhitespace(i))t.read(), i = t.peek();
- return r === "" || i != ")" ? (n = e, t.reset()) : n += r + t.read(), n
- }, readURL: function () {
- var e = this._reader, t = "", n = e.peek();
- while (/^[!#$%&\\*-~]$/.test(n))t += e.read(), n = e.peek();
- return t
- }, readName: function (e) {
- var t = this._reader, n = e || "", r = t.peek();
- for (; ;)if (r == "\\")n += this.readEscape(t.read()), r = t.peek(); else {
- if (!r || !isNameChar(r))break;
- n += t.read(), r = t.peek()
- }
- return n
- }, readEscape: function (e) {
- var t = this._reader, n = e || "", r = 0, i = t.peek();
- if (isHexDigit(i))do n += t.read(), i = t.peek(); while (i && isHexDigit(i) && ++r < 6);
- return n.length == 3 && /\s/.test(i) || n.length == 7 || n.length == 1 ? t.read() : i = "", n + i
- }, readComment: function (e) {
- var t = this._reader, n = e || "", r = t.read();
- if (r == "*") {
- while (r) {
- n += r;
- if (n.length > 2 && r == "*" && t.peek() == "/") {
- n += t.read();
- break
- }
- r = t.read()
- }
- return n
- }
- return""
- }});
- var Tokens = [
- {name: "CDO"},
- {name: "CDC"},
- {name: "S", whitespace: !0},
- {name: "COMMENT", comment: !0, hide: !0, channel: "comment"},
- {name: "INCLUDES", text: "~="},
- {name: "DASHMATCH", text: "|="},
- {name: "PREFIXMATCH", text: "^="},
- {name: "SUFFIXMATCH", text: "$="},
- {name: "SUBSTRINGMATCH", text: "*="},
- {name: "STRING"},
- {name: "IDENT"},
- {name: "HASH"},
- {name: "IMPORT_SYM", text: "@import"},
- {name: "PAGE_SYM", text: "@page"},
- {name: "MEDIA_SYM", text: "@media"},
- {name: "FONT_FACE_SYM", text: "@font-face"},
- {name: "CHARSET_SYM", text: "@charset"},
- {name: "NAMESPACE_SYM", text: "@namespace"},
- {name: "UNKNOWN_SYM"},
- {name: "KEYFRAMES_SYM", text: ["@keyframes", "@-webkit-keyframes", "@-moz-keyframes", "@-o-keyframes"]},
- {name: "IMPORTANT_SYM"},
- {name: "LENGTH"},
- {name: "ANGLE"},
- {name: "TIME"},
- {name: "FREQ"},
- {name: "DIMENSION"},
- {name: "PERCENTAGE"},
- {name: "NUMBER"},
- {name: "URI"},
- {name: "FUNCTION"},
- {name: "UNICODE_RANGE"},
- {name: "INVALID"},
- {name: "PLUS", text: "+"},
- {name: "GREATER", text: ">"},
- {name: "COMMA", text: ","},
- {name: "TILDE", text: "~"},
- {name: "NOT"},
- {name: "TOPLEFTCORNER_SYM", text: "@top-left-corner"},
- {name: "TOPLEFT_SYM", text: "@top-left"},
- {name: "TOPCENTER_SYM", text: "@top-center"},
- {name: "TOPRIGHT_SYM", text: "@top-right"},
- {name: "TOPRIGHTCORNER_SYM", text: "@top-right-corner"},
- {name: "BOTTOMLEFTCORNER_SYM", text: "@bottom-left-corner"},
- {name: "BOTTOMLEFT_SYM", text: "@bottom-left"},
- {name: "BOTTOMCENTER_SYM", text: "@bottom-center"},
- {name: "BOTTOMRIGHT_SYM", text: "@bottom-right"},
- {name: "BOTTOMRIGHTCORNER_SYM", text: "@bottom-right-corner"},
- {name: "LEFTTOP_SYM", text: "@left-top"},
- {name: "LEFTMIDDLE_SYM", text: "@left-middle"},
- {name: "LEFTBOTTOM_SYM", text: "@left-bottom"},
- {name: "RIGHTTOP_SYM", text: "@right-top"},
- {name: "RIGHTMIDDLE_SYM", text: "@right-middle"},
- {name: "RIGHTBOTTOM_SYM", text: "@right-bottom"},
- {name: "RESOLUTION", state: "media"},
- {name: "IE_FUNCTION"},
- {name: "CHAR"},
- {name: "PIPE", text: "|"},
- {name: "SLASH", text: "/"},
- {name: "MINUS", text: "-"},
- {name: "STAR", text: "*"},
- {name: "LBRACE", text: "{"},
- {name: "RBRACE", text: "}"},
- {name: "LBRACKET", text: "["},
- {name: "RBRACKET", text: "]"},
- {name: "EQUALS", text: "="},
- {name: "COLON", text: ":"},
- {name: "SEMICOLON", text: ";"},
- {name: "LPAREN", text: "("},
- {name: "RPAREN", text: ")"},
- {name: "DOT", text: "."}
- ];
- (function () {
- var e = [], t = {};
- Tokens.UNKNOWN = -1, Tokens.unshift({name: "EOF"});
- for (var n = 0, r = Tokens.length; n < r; n++) {
- e.push(Tokens[n].name), Tokens[Tokens[n].name] = n;
- if (Tokens[n].text)if (Tokens[n].text instanceof Array)for (var i = 0; i < Tokens[n].text.length; i++)t[Tokens[n].text[i]] = n; else t[Tokens[n].text] = n
- }
- Tokens.name = function (t) {
- return e[t]
- }, Tokens.type = function (e) {
- return t[e] || -1
- }
- })();
- var Validation = {validate: function (e, t) {
- var n = e.toString().toLowerCase(), r = t.parts, i = new PropertyValueIterator(t), s = Properties[n], o, u, a, f, l, c, h, p, d, v, m;
- if (!s) {
- if (n.indexOf("-") !== 0)throw new ValidationError("Unknown property '" + e + "'.", e.line, e.col)
- } else typeof s != "number" && (typeof s == "string" ? s.indexOf("||") > -1 ? this.groupProperty(s, i) : this.singleProperty(s, i, 1) : s.multi ? this.multiProperty(s.multi, i, s.comma, s.max || Infinity) : typeof s == "function" && s(i))
- }, singleProperty: function (e, t, n, r) {
- var i = !1, s = t.value, o = 0, u;
- while (t.hasNext() && o < n) {
- i = ValidationTypes.isAny(t, e);
- if (!i)break;
- o++
- }
- if (!i)throw t.hasNext() && !t.isFirst() ? (u = t.peek(), new ValidationError("Expected end of value but found '" + u + "'.", u.line, u.col)) : new ValidationError("Expected (" + e + ") but found '" + s + "'.", s.line, s.col);
- if (t.hasNext())throw u = t.next(), new ValidationError("Expected end of value but found '" + u + "'.", u.line, u.col)
- }, multiProperty: function (e, t, n, r) {
- var i = !1, s = t.value, o = 0, u = !1, a;
- while (t.hasNext() && !i && o < r) {
- if (!ValidationTypes.isAny(t, e))break;
- o++;
- if (!t.hasNext())i = !0; else if (n) {
- if (t.peek() != ",")break;
- a = t.next()
- }
- }
- if (!i)throw t.hasNext() && !t.isFirst() ? (a = t.peek(), new ValidationError("Expected end of value but found '" + a + "'.", a.line, a.col)) : (a = t.previous(), n && a == "," ? new ValidationError("Expected end of value but found '" + a + "'.", a.line, a.col) : new ValidationError("Expected (" + e + ") but found '" + s + "'.", s.line, s.col));
- if (t.hasNext())throw a = t.next(), new ValidationError("Expected end of value but found '" + a + "'.", a.line, a.col)
- }, groupProperty: function (e, t, n) {
- var r = !1, i = t.value, s = e.split("||").length, o = {count: 0}, u = !1, a, f;
- while (t.hasNext() && !r) {
- a = ValidationTypes.isAnyOfGroup(t, e);
- if (!a)break;
- if (o[a])break;
- o[a] = 1, o.count++, u = !0;
- if (o.count == s || !t.hasNext())r = !0
- }
- if (!r)throw u && t.hasNext() ? (f = t.peek(), new ValidationError("Expected end of value but found '" + f + "'.", f.line, f.col)) : new ValidationError("Expected (" + e + ") but found '" + i + "'.", i.line, i.col);
- if (t.hasNext())throw f = t.next(), new ValidationError("Expected end of value but found '" + f + "'.", f.line, f.col)
- }};
- ValidationError.prototype = new Error;
- var ValidationTypes = {isLiteral: function (e, t) {
- var n = e.text.toString().toLowerCase(), r = t.split(" | "), i, s, o = !1;
- for (i = 0, s = r.length; i < s && !o; i++)n == r[i].toLowerCase() && (o = !0);
- return o
- }, isSimple: function (e) {
- return!!this.simple[e]
- }, isComplex: function (e) {
- return!!this.complex[e]
- }, isAny: function (e, t) {
- var n = t.split(" | "), r, i, s = !1;
- for (r = 0, i = n.length; r < i && !s && e.hasNext(); r++)s = this.isType(e, n[r]);
- return s
- }, isAnyOfGroup: function (e, t) {
- var n = t.split(" || "), r, i, s = !1;
- for (r = 0, i = n.length; r < i && !s; r++)s = this.isType(e, n[r]);
- return s ? n[r - 1] : !1
- }, isType: function (e, t) {
- var n = e.peek(), r = !1;
- return t.charAt(0) != "<" ? (r = this.isLiteral(n, t), r && e.next()) : this.simple[t] ? (r = this.simple[t](n), r && e.next()) : r = this.complex[t](e), r
- }, simple: {"": function (e) {
- return ValidationTypes.isLiteral(e, "xx-small | x-small | small | medium | large | x-large | xx-large")
- }, "": function (e) {
- return ValidationTypes.isLiteral(e, "scroll | fixed | local")
- }, "": function (e) {
- return e.type == "function" && e.name == "attr"
- }, "": function (e) {
- return this[""](e) || this[""](e) || e == "none"
- }, "": function (e) {
- return e.type == "function" && /^(?:\-(?:ms|moz|o|webkit)\-)?(?:repeating\-)?(?:radial\-|linear\-)?gradient/i.test(e)
- }, "": function (e) {
- return ValidationTypes.isLiteral(e, "padding-box | border-box | content-box")
- }, "": function (e) {
- return e.type == "function" && e.name == "content"
- }, "": function (e) {
- return ValidationTypes.isLiteral(e, "smaller | larger")
- }, "": function (e) {
- return e.type == "identifier"
- }, "": function (e) {
- return e.type == "length" || e.type == "number" || e.type == "integer" || e == "0"
- }, "": function (e) {
- return e.type == "color" || e == "transparent"
- }, "": function (e) {
- return e.type == "number" || this[""](e)
- }, "": function (e) {
- return e.type == "integer"
- }, "": function (e) {
- return e.type == "integer"
- }, "": function (e) {
- return e.type == "angle"
- }, "": function (e) {
- return e.type == "uri"
- }, "": function (e) {
- return this[""](e)
- }, "": function (e) {
- return e.type == "percentage" || e == "0"
- }, "": function (e) {
- return this[""](e) || ValidationTypes.isLiteral(e, "thin | medium | thick")
- }, "": function (e) {
- return ValidationTypes.isLiteral(e, "none | hidden | dotted | dashed | solid | double | groove | ridge | inset | outset")
- }, "": function (e) {
- return this[""](e) || this[""](e) || ValidationTypes.isLiteral(e, "auto")
- }, "": function (e) {
- return this[""](e) || this[""](e)
- }, "": function (e) {
- return e.type == "function" && (e.name == "rect" || e.name == "inset-rect")
- }, "": function (e) {
- return e.type == "time"
- }}, complex: {"": function (e) {
- var t = this, n = !1, r = " | ", i = "left | center | right", s = "top | center | bottom", o, u, a;
- return ValidationTypes.isAny(e, "top | bottom") ? n = !0 : ValidationTypes.isAny(e, r) ? e.hasNext() && (n = ValidationTypes.isAny(e, r + " | " + s)) : ValidationTypes.isAny(e, i) && e.hasNext() && (ValidationTypes.isAny(e, s) ? (n = !0, ValidationTypes.isAny(e, r)) : ValidationTypes.isAny(e, r) && (ValidationTypes.isAny(e, s) && ValidationTypes.isAny(e, r), n = !0)), n
- }, "": function (e) {
- var t = this, n = !1, r = " | | auto", i, s, o;
- return ValidationTypes.isAny(e, "cover | contain") ? n = !0 : ValidationTypes.isAny(e, r) && (n = !0, ValidationTypes.isAny(e, r)), n
- }, "": function (e) {
- var t = !1, n = "repeat | space | round | no-repeat", r;
- return e.hasNext() && (r = e.next(), ValidationTypes.isLiteral(r, "repeat-x | repeat-y") ? t = !0 : ValidationTypes.isLiteral(r, n) && (t = !0, e.hasNext() && ValidationTypes.isLiteral(e.peek(), n) && e.next())), t
- }, "": function (e) {
- var t = !1, n = 0, r = !1, i = !1, s;
- if (e.hasNext()) {
- ValidationTypes.isAny(e, "inset") && (r = !0), ValidationTypes.isAny(e, "") && (i = !0);
- while (ValidationTypes.isAny(e, "") && n < 4)n++;
- e.hasNext() && (i || ValidationTypes.isAny(e, ""), r || ValidationTypes.isAny(e, "inset")), t = n >= 2 && n <= 4
- }
- return t
- }, "": function (e) {
- var t = !1, n = 0, r = " | ", i;
- return ValidationTypes.isAny(e, r) && (t = !0, ValidationTypes.isAny(e, r)), t
- }}};
- parserlib.css = {Colors: Colors, Combinator: Combinator, Parser: Parser, PropertyName: PropertyName, PropertyValue: PropertyValue, PropertyValuePart: PropertyValuePart, MediaFeature: MediaFeature, MediaQuery: MediaQuery, Selector: Selector, SelectorPart: SelectorPart, SelectorSubPart: SelectorSubPart, Specificity: Specificity, TokenStream: TokenStream, Tokens: Tokens, ValidationError: ValidationError}
- }();
- var CSSLint = function () {
- var e = [], t = [], n = new parserlib.util.EventTarget;
- return n.version = "0.9.9", n.addRule = function (t) {
- e.push(t), e[t.id] = t
- }, n.clearRules = function () {
- e = []
- }, n.getRules = function () {
- return[].concat(e).sort(function (e, t) {
- return e.id > t.id ? 1 : 0
- })
- }, n.getRuleset = function () {
- var t = {}, n = 0, r = e.length;
- while (n < r)t[e[n++].id] = 1;
- return t
- }, n.addFormatter = function (e) {
- t[e.id] = e
- }, n.getFormatter = function (e) {
- return t[e]
- }, n.format = function (e, t, n, r) {
- var i = this.getFormatter(n), s = null;
- return i && (s = i.startFormat(), s += i.formatResults(e, t, r || {}), s += i.endFormat()), s
- }, n.hasFormat = function (e) {
- return t.hasOwnProperty(e)
- }, n.verify = function (t, n) {
- var r = 0, i = e.length, s, o, u, a = new parserlib.css.Parser({starHack: !0, ieFilters: !0, underscoreHack: !0, strict: !1});
- o = t.replace(/\n\r?/g, "$split$").split("$split$"), n || (n = this.getRuleset()), s = new Reporter(o, n), n.errors = 2;
- for (r in n)n.hasOwnProperty(r) && e[r] && e[r].init(a, s);
- try {
- a.parse(t)
- } catch (f) {
- s.error("Fatal error, cannot continue: " + f.message, f.line, f.col, {})
- }
- return u = {messages: s.messages, stats: s.stats}, u.messages.sort(function (e, t) {
- return e.rollup && !t.rollup ? 1 : !e.rollup && t.rollup ? -1 : e.line - t.line
- }), u
- }, n
- }();
- Reporter.prototype = {constructor: Reporter, error: function (e, t, n, r) {
- this.messages.push({type: "error", line: t, col: n, message: e, evidence: this.lines[t - 1], rule: r || {}})
- }, warn: function (e, t, n, r) {
- this.report(e, t, n, r)
- }, report: function (e, t, n, r) {
- this.messages.push({type: this.ruleset[r.id] == 2 ? "error" : "warning", line: t, col: n, message: e, evidence: this.lines[t - 1], rule: r})
- }, info: function (e, t, n, r) {
- this.messages.push({type: "info", line: t, col: n, message: e, evidence: this.lines[t - 1], rule: r})
- }, rollupError: function (e, t) {
- this.messages.push({type: "error", rollup: !0, message: e, rule: t})
- }, rollupWarn: function (e, t) {
- this.messages.push({type: "warning", rollup: !0, message: e, rule: t})
- }, stat: function (e, t) {
- this.stats[e] = t
- }}, CSSLint._Reporter = Reporter, CSSLint.Util = {mix: function (e, t) {
- var n;
- for (n in t)t.hasOwnProperty(n) && (e[n] = t[n]);
- return n
- }, indexOf: function (e, t) {
- if (e.indexOf)return e.indexOf(t);
- for (var n = 0, r = e.length; n < r; n++)if (e[n] === t)return n;
- return-1
- }, forEach: function (e, t) {
- if (e.forEach)return e.forEach(t);
- for (var n = 0, r = e.length; n < r; n++)t(e[n], n, e)
- }}, CSSLint.addRule({id: "adjoining-classes", name: "Disallow adjoining classes", desc: "Don't use adjoining classes.", browsers: "IE6", init: function (e, t) {
- var n = this;
- e.addListener("startrule", function (r) {
- var i = r.selectors, s, o, u, a, f, l, c;
- for (f = 0; f < i.length; f++) {
- s = i[f];
- for (l = 0; l < s.parts.length; l++) {
- o = s.parts[l];
- if (o.type == e.SELECTOR_PART_TYPE) {
- a = 0;
- for (c = 0; c < o.modifiers.length; c++)u = o.modifiers[c], u.type == "class" && a++, a > 1 && t.report("Don't use adjoining classes.", o.line, o.col, n)
- }
- }
- }
- })
- }}), CSSLint.addRule({id: "box-model", name: "Beware of broken box size", desc: "Don't use width or height when using padding or border.", browsers: "All", init: function (e, t) {
- function u() {
- s = {}, o = !1
- }
-
- function a() {
- var e, u;
- if (!o) {
- if (s.height)for (e in i)i.hasOwnProperty(e) && s[e] && (u = s[e].value, (e != "padding" || u.parts.length !== 2 || u.parts[0].value !== 0) && t.report("Using height with " + e + " can sometimes make elements larger than you expect.", s[e].line, s[e].col, n));
- if (s.width)for (e in r)r.hasOwnProperty(e) && s[e] && (u = s[e].value, (e != "padding" || u.parts.length !== 2 || u.parts[1].value !== 0) && t.report("Using width with " + e + " can sometimes make elements larger than you expect.", s[e].line, s[e].col, n))
- }
- }
-
- var n = this, r = {border: 1, "border-left": 1, "border-right": 1, padding: 1, "padding-left": 1, "padding-right": 1}, i = {border: 1, "border-bottom": 1, "border-top": 1, padding: 1, "padding-bottom": 1, "padding-top": 1}, s, o = !1;
- e.addListener("startrule", u), e.addListener("startfontface", u), e.addListener("startpage", u), e.addListener("startpagemargin", u), e.addListener("startkeyframerule", u), e.addListener("property", function (e) {
- var t = e.property.text.toLowerCase();
- i[t] || r[t] ? !/^0\S*$/.test(e.value) && (t != "border" || e.value != "none") && (s[t] = {line: e.property.line, col: e.property.col, value: e.value}) : /^(width|height)/i.test(t) && /^(length|percentage)/.test(e.value.parts[0].type) ? s[t] = 1 : t == "box-sizing" && (o = !0)
- }), e.addListener("endrule", a), e.addListener("endfontface", a), e.addListener("endpage", a), e.addListener("endpagemargin", a), e.addListener("endkeyframerule", a)
- }}), CSSLint.addRule({id: "box-sizing", name: "Disallow use of box-sizing", desc: "The box-sizing properties isn't supported in IE6 and IE7.", browsers: "IE6, IE7", tags: ["Compatibility"], init: function (e, t) {
- var n = this;
- e.addListener("property", function (e) {
- var r = e.property.text.toLowerCase();
- r == "box-sizing" && t.report("The box-sizing property isn't supported in IE6 and IE7.", e.line, e.col, n)
- })
- }}), CSSLint.addRule({id: "compatible-vendor-prefixes", name: "Require compatible vendor prefixes", desc: "Include all compatible vendor prefixes to reach a wider range of users.", browsers: "All", init: function (e, t) {
- var n = this, r, i, s, o, u, a, f, l = !1, c = Array.prototype.push, h = [];
- r = {animation: "webkit moz", "animation-delay": "webkit moz", "animation-direction": "webkit moz", "animation-duration": "webkit moz", "animation-fill-mode": "webkit moz", "animation-iteration-count": "webkit moz", "animation-name": "webkit moz", "animation-play-state": "webkit moz", "animation-timing-function": "webkit moz", appearance: "webkit moz", "border-end": "webkit moz", "border-end-color": "webkit moz", "border-end-style": "webkit moz", "border-end-width": "webkit moz", "border-image": "webkit moz o", "border-radius": "webkit moz", "border-start": "webkit moz", "border-start-color": "webkit moz", "border-start-style": "webkit moz", "border-start-width": "webkit moz", "box-align": "webkit moz ms", "box-direction": "webkit moz ms", "box-flex": "webkit moz ms", "box-lines": "webkit ms", "box-ordinal-group": "webkit moz ms", "box-orient": "webkit moz ms", "box-pack": "webkit moz ms", "box-sizing": "webkit moz", "box-shadow": "webkit moz", "column-count": "webkit moz ms", "column-gap": "webkit moz ms", "column-rule": "webkit moz ms", "column-rule-color": "webkit moz ms", "column-rule-style": "webkit moz ms", "column-rule-width": "webkit moz ms", "column-width": "webkit moz ms", hyphens: "epub moz", "line-break": "webkit ms", "margin-end": "webkit moz", "margin-start": "webkit moz", "marquee-speed": "webkit wap", "marquee-style": "webkit wap", "padding-end": "webkit moz", "padding-start": "webkit moz", "tab-size": "moz o", "text-size-adjust": "webkit ms", transform: "webkit moz ms o", "transform-origin": "webkit moz ms o", transition: "webkit moz o", "transition-delay": "webkit moz o", "transition-duration": "webkit moz o", "transition-property": "webkit moz o", "transition-timing-function": "webkit moz o", "user-modify": "webkit moz", "user-select": "webkit moz ms", "word-break": "epub ms", "writing-mode": "epub ms"};
- for (s in r)if (r.hasOwnProperty(s)) {
- o = [], u = r[s].split(" ");
- for (a = 0, f = u.length; a < f; a++)o.push("-" + u[a] + "-" + s);
- r[s] = o, c.apply(h, o)
- }
- e.addListener("startrule", function () {
- i = []
- }), e.addListener("startkeyframes", function (e) {
- l = e.prefix || !0
- }), e.addListener("endkeyframes", function (e) {
- l = !1
- }), e.addListener("property", function (e) {
- var t = e.property;
- CSSLint.Util.indexOf(h, t.text) > -1 && (!l || typeof l != "string" || t.text.indexOf("-" + l + "-") !== 0) && i.push(t)
- }), e.addListener("endrule", function (e) {
- if (!i.length)return;
- var s = {}, o, u, a, f, l, c, h, p, d, v;
- for (o = 0, u = i.length; o < u; o++) {
- a = i[o];
- for (f in r)r.hasOwnProperty(f) && (l = r[f], CSSLint.Util.indexOf(l, a.text) > -1 && (s[f] || (s[f] = {full: l.slice(0), actual: [], actualNodes: []}), CSSLint.Util.indexOf(s[f].actual, a.text) === -1 && (s[f].actual.push(a.text), s[f].actualNodes.push(a))))
- }
- for (f in s)if (s.hasOwnProperty(f)) {
- c = s[f], h = c.full, p = c.actual;
- if (h.length > p.length)for (o = 0, u = h.length; o < u; o++)d = h[o], CSSLint.Util.indexOf(p, d) === -1 && (v = p.length === 1 ? p[0] : p.length == 2 ? p.join(" and ") : p.join(", "), t.report("The property " + d + " is compatible with " + v + " and should be included as well.", c.actualNodes[0].line, c.actualNodes[0].col, n))
- }
- })
- }}), CSSLint.addRule({id: "display-property-grouping", name: "Require properties appropriate for display", desc: "Certain properties shouldn't be used with certain display property values.", browsers: "All", init: function (e, t) {
- function s(e, s, o) {
- i[e] && (typeof r[e] != "string" || i[e].value.toLowerCase() != r[e]) && t.report(o || e + " can't be used with display: " + s + ".", i[e].line, i[e].col, n)
- }
-
- function o() {
- i = {}
- }
-
- function u() {
- var e = i.display ? i.display.value : null;
- if (e)switch (e) {
- case"inline":
- s("height", e), s("width", e), s("margin", e), s("margin-top", e), s("margin-bottom", e), s("float", e, "display:inline has no effect on floated elements (but may be used to fix the IE6 double-margin bug).");
- break;
- case"block":
- s("vertical-align", e);
- break;
- case"inline-block":
- s("float", e);
- break;
- default:
- e.indexOf("table-") === 0 && (s("margin", e), s("margin-left", e), s("margin-right", e), s("margin-top", e), s("margin-bottom", e), s("float", e))
- }
- }
-
- var n = this, r = {display: 1, "float": "none", height: 1, width: 1, margin: 1, "margin-left": 1, "margin-right": 1, "margin-bottom": 1, "margin-top": 1, padding: 1, "padding-left": 1, "padding-right": 1, "padding-bottom": 1, "padding-top": 1, "vertical-align": 1}, i;
- e.addListener("startrule", o), e.addListener("startfontface", o), e.addListener("startkeyframerule", o), e.addListener("startpagemargin", o), e.addListener("startpage", o), e.addListener("property", function (e) {
- var t = e.property.text.toLowerCase();
- r[t] && (i[t] = {value: e.value.text, line: e.property.line, col: e.property.col})
- }), e.addListener("endrule", u), e.addListener("endfontface", u), e.addListener("endkeyframerule", u), e.addListener("endpagemargin", u), e.addListener("endpage", u)
- }}), CSSLint.addRule({id: "duplicate-background-images", name: "Disallow duplicate background images", desc: "Every background-image should be unique. Use a common class for e.g. sprites.", browsers: "All", init: function (e, t) {
- var n = this, r = {};
- e.addListener("property", function (e) {
- var i = e.property.text, s = e.value, o, u;
- if (i.match(/background/i))for (o = 0, u = s.parts.length; o < u; o++)s.parts[o].type == "uri" && (typeof r[s.parts[o].uri] == "undefined" ? r[s.parts[o].uri] = e : t.report("Background image '" + s.parts[o].uri + "' was used multiple times, first declared at line " + r[s.parts[o].uri].line + ", col " + r[s.parts[o].uri].col + ".", e.line, e.col, n))
- })
- }}), CSSLint.addRule({id: "duplicate-properties", name: "Disallow duplicate properties", desc: "Duplicate properties must appear one after the other.", browsers: "All", init: function (e, t) {
- function s(e) {
- r = {}
- }
-
- var n = this, r, i;
- e.addListener("startrule", s), e.addListener("startfontface", s), e.addListener("startpage", s), e.addListener("startpagemargin", s), e.addListener("startkeyframerule", s), e.addListener("property", function (e) {
- var s = e.property, o = s.text.toLowerCase();
- r[o] && (i != o || r[o] == e.value.text) && t.report("Duplicate property '" + e.property + "' found.", e.line, e.col, n), r[o] = e.value.text, i = o
- })
- }}), CSSLint.addRule({id: "empty-rules", name: "Disallow empty rules", desc: "Rules without any properties specified should be removed.", browsers: "All", init: function (e, t) {
- var n = this, r = 0;
- e.addListener("startrule", function () {
- r = 0
- }), e.addListener("property", function () {
- r++
- }), e.addListener("endrule", function (e) {
- var i = e.selectors;
- r === 0 && t.report("Rule is empty.", i[0].line, i[0].col, n)
- })
- }}), CSSLint.addRule({id: "errors", name: "Parsing Errors", desc: "This rule looks for recoverable syntax errors.", browsers: "All", init: function (e, t) {
- var n = this;
- e.addListener("error", function (e) {
- t.error(e.message, e.line, e.col, n)
- })
- }}), CSSLint.addRule({id: "fallback-colors", name: "Require fallback colors", desc: "For older browsers that don't support RGBA, HSL, or HSLA, provide a fallback color.", browsers: "IE6,IE7,IE8", init: function (e, t) {
- function o(e) {
- s = {}, r = null
- }
-
- var n = this, r, i = {color: 1, background: 1, "background-color": 1}, s;
- e.addListener("startrule", o), e.addListener("startfontface", o), e.addListener("startpage", o), e.addListener("startpagemargin", o), e.addListener("startkeyframerule", o), e.addListener("property", function (e) {
- var s = e.property, o = s.text.toLowerCase(), u = e.value.parts, a = 0, f = "", l = u.length;
- if (i[o])while (a < l)u[a].type == "color" && ("alpha"in u[a] || "hue"in u[a] ? (/([^\)]+)\(/.test(u[a]) && (f = RegExp.$1.toUpperCase()), (!r || r.property.text.toLowerCase() != o || r.colorType != "compat") && t.report("Fallback " + o + " (hex or RGB) should precede " + f + " " + o + ".", e.line, e.col, n)) : e.colorType = "compat"), a++;
- r = e
- })
- }}), CSSLint.addRule({id: "floats", name: "Disallow too many floats", desc: "This rule tests if the float property is used too many times", browsers: "All", init: function (e, t) {
- var n = this, r = 0;
- e.addListener("property", function (e) {
- e.property.text.toLowerCase() == "float" && e.value.text.toLowerCase() != "none" && r++
- }), e.addListener("endstylesheet", function () {
- t.stat("floats", r), r >= 10 && t.rollupWarn("Too many floats (" + r + "), you're probably using them for layout. Consider using a grid system instead.", n)
- })
- }}), CSSLint.addRule({id: "font-faces", name: "Don't use too many web fonts", desc: "Too many different web fonts in the same stylesheet.", browsers: "All", init: function (e, t) {
- var n = this, r = 0;
- e.addListener("startfontface", function () {
- r++
- }), e.addListener("endstylesheet", function () {
- r > 5 && t.rollupWarn("Too many @font-face declarations (" + r + ").", n)
- })
- }}), CSSLint.addRule({id: "font-sizes", name: "Disallow too many font sizes", desc: "Checks the number of font-size declarations.", browsers: "All", init: function (e, t) {
- var n = this, r = 0;
- e.addListener("property", function (e) {
- e.property == "font-size" && r++
- }), e.addListener("endstylesheet", function () {
- t.stat("font-sizes", r), r >= 10 && t.rollupWarn("Too many font-size declarations (" + r + "), abstraction needed.", n)
- })
- }}), CSSLint.addRule({id: "gradients", name: "Require all gradient definitions", desc: "When using a vendor-prefixed gradient, make sure to use them all.", browsers: "All", init: function (e, t) {
- var n = this, r;
- e.addListener("startrule", function () {
- r = {moz: 0, webkit: 0, oldWebkit: 0, ms: 0, o: 0}
- }), e.addListener("property", function (e) {
- /\-(moz|ms|o|webkit)(?:\-(?:linear|radial))\-gradient/i.test(e.value) ? r[RegExp.$1] = 1 : /\-webkit\-gradient/i.test(e.value) && (r.oldWebkit = 1)
- }), e.addListener("endrule", function (e) {
- var i = [];
- r.moz || i.push("Firefox 3.6+"), r.webkit || i.push("Webkit (Safari 5+, Chrome)"), r.oldWebkit || i.push("Old Webkit (Safari 4+, Chrome)"), r.ms || i.push("Internet Explorer 10+"), r.o || i.push("Opera 11.1+"), i.length && i.length < 5 && t.report("Missing vendor-prefixed CSS gradients for " + i.join(", ") + ".", e.selectors[0].line, e.selectors[0].col, n)
- })
- }}), CSSLint.addRule({id: "ids", name: "Disallow IDs in selectors", desc: "Selectors should not contain IDs.", browsers: "All", init: function (e, t) {
- var n = this;
- e.addListener("startrule", function (r) {
- var i = r.selectors, s, o, u, a, f, l, c;
- for (f = 0; f < i.length; f++) {
- s = i[f], a = 0;
- for (l = 0; l < s.parts.length; l++) {
- o = s.parts[l];
- if (o.type == e.SELECTOR_PART_TYPE)for (c = 0; c < o.modifiers.length; c++)u = o.modifiers[c], u.type == "id" && a++
- }
- a == 1 ? t.report("Don't use IDs in selectors.", s.line, s.col, n) : a > 1 && t.report(a + " IDs in the selector, really?", s.line, s.col, n)
- }
- })
- }}), CSSLint.addRule({id: "import", name: "Disallow @import", desc: "Don't use @import, use instead.", browsers: "All", init: function (e, t) {
- var n = this;
- e.addListener("import", function (e) {
- t.report("@import prevents parallel downloads, use instead.", e.line, e.col, n)
- })
- }}), CSSLint.addRule({id: "important", name: "Disallow !important", desc: "Be careful when using !important declaration", browsers: "All", init: function (e, t) {
- var n = this, r = 0;
- e.addListener("property", function (e) {
- e.important === !0 && (r++, t.report("Use of !important", e.line, e.col, n))
- }), e.addListener("endstylesheet", function () {
- t.stat("important", r), r >= 10 && t.rollupWarn("Too many !important declarations (" + r + "), try to use less than 10 to avoid specificity issues.", n)
- })
- }}), CSSLint.addRule({id: "known-properties", name: "Require use of known properties", desc: "Properties should be known (listed in CSS3 specification) or be a vendor-prefixed property.", browsers: "All", init: function (e, t) {
- var n = this;
- e.addListener("property", function (e) {
- var r = e.property.text.toLowerCase();
- e.invalid && t.report(e.invalid.message, e.line, e.col, n)
- })
- }}), CSSLint.addRule({id: "outline-none", name: "Disallow outline: none", desc: "Use of outline: none or outline: 0 should be limited to :focus rules.", browsers: "All", tags: ["Accessibility"], init: function (e, t) {
- function i(e) {
- e.selectors ? r = {line: e.line, col: e.col, selectors: e.selectors, propCount: 0, outline: !1} : r = null
- }
-
- function s(e) {
- r && r.outline && (r.selectors.toString().toLowerCase().indexOf(":focus") == -1 ? t.report("Outlines should only be modified using :focus.", r.line, r.col, n) : r.propCount == 1 && t.report("Outlines shouldn't be hidden unless other visual changes are made.", r.line, r.col, n))
- }
-
- var n = this, r;
- e.addListener("startrule", i), e.addListener("startfontface", i), e.addListener("startpage", i), e.addListener("startpagemargin", i), e.addListener("startkeyframerule", i), e.addListener("property", function (e) {
- var t = e.property.text.toLowerCase(), n = e.value;
- r && (r.propCount++, t == "outline" && (n == "none" || n == "0") && (r.outline = !0))
- }), e.addListener("endrule", s), e.addListener("endfontface", s), e.addListener("endpage", s), e.addListener("endpagemargin", s), e.addListener("endkeyframerule", s)
- }}), CSSLint.addRule({id: "overqualified-elements", name: "Disallow overqualified elements", desc: "Don't use classes or IDs with elements (a.foo or a#foo).", browsers: "All", init: function (e, t) {
- var n = this, r = {};
- e.addListener("startrule", function (i) {
- var s = i.selectors, o, u, a, f, l, c;
- for (f = 0; f < s.length; f++) {
- o = s[f];
- for (l = 0; l < o.parts.length; l++) {
- u = o.parts[l];
- if (u.type == e.SELECTOR_PART_TYPE)for (c = 0; c < u.modifiers.length; c++)a = u.modifiers[c], u.elementName && a.type == "id" ? t.report("Element (" + u + ") is overqualified, just use " + a + " without element name.", u.line, u.col, n) : a.type == "class" && (r[a] || (r[a] = []), r[a].push({modifier: a, part: u}))
- }
- }
- }), e.addListener("endstylesheet", function () {
- var e;
- for (e in r)r.hasOwnProperty(e) && r[e].length == 1 && r[e][0].part.elementName && t.report("Element (" + r[e][0].part + ") is overqualified, just use " + r[e][0].modifier + " without element name.", r[e][0].part.line, r[e][0].part.col, n)
- })
- }}), CSSLint.addRule({id: "qualified-headings", name: "Disallow qualified headings", desc: "Headings should not be qualified (namespaced).", browsers: "All", init: function (e, t) {
- var n = this;
- e.addListener("startrule", function (r) {
- var i = r.selectors, s, o, u, a;
- for (u = 0; u < i.length; u++) {
- s = i[u];
- for (a = 0; a < s.parts.length; a++)o = s.parts[a], o.type == e.SELECTOR_PART_TYPE && o.elementName && /h[1-6]/.test(o.elementName.toString()) && a > 0 && t.report("Heading (" + o.elementName + ") should not be qualified.", o.line, o.col, n)
- }
- })
- }}), CSSLint.addRule({id: "regex-selectors", name: "Disallow selectors that look like regexs", desc: "Selectors that look like regular expressions are slow and should be avoided.", browsers: "All", init: function (e, t) {
- var n = this;
- e.addListener("startrule", function (r) {
- var i = r.selectors, s, o, u, a, f, l;
- for (a = 0; a < i.length; a++) {
- s = i[a];
- for (f = 0; f < s.parts.length; f++) {
- o = s.parts[f];
- if (o.type == e.SELECTOR_PART_TYPE)for (l = 0; l < o.modifiers.length; l++)u = o.modifiers[l], u.type == "attribute" && /([\~\|\^\$\*]=)/.test(u) && t.report("Attribute selectors with " + RegExp.$1 + " are slow!", u.line, u.col, n)
- }
- }
- })
- }}), CSSLint.addRule({id: "rules-count", name: "Rules Count", desc: "Track how many rules there are.", browsers: "All", init: function (e, t) {
- var n = this, r = 0;
- e.addListener("startrule", function () {
- r++
- }), e.addListener("endstylesheet", function () {
- t.stat("rule-count", r)
- })
- }}), CSSLint.addRule({id: "shorthand", name: "Require shorthand properties", desc: "Use shorthand properties where possible.", browsers: "All", init: function (e, t) {
- function f(e) {
- u = {}
- }
-
- function l(e) {
- var r, i, s, o;
- for (r in a)if (a.hasOwnProperty(r)) {
- o = 0;
- for (i = 0, s = a[r].length; i < s; i++)o += u[a[r][i]] ? 1 : 0;
- o == a[r].length && t.report("The properties " + a[r].join(", ") + " can be replaced by " + r + ".", e.line, e.col, n)
- }
- }
-
- var n = this, r, i, s, o = {}, u, a = {margin: ["margin-top", "margin-bottom", "margin-left", "margin-right"], padding: ["padding-top", "padding-bottom", "padding-left", "padding-right"]};
- for (r in a)if (a.hasOwnProperty(r))for (i = 0, s = a[r].length; i < s; i++)o[a[r][i]] = r;
- e.addListener("startrule", f), e.addListener("startfontface", f), e.addListener("property", function (e) {
- var t = e.property.toString().toLowerCase(), n = e.value.parts[0].value;
- o[t] && (u[t] = 1)
- }), e.addListener("endrule", l), e.addListener("endfontface", l)
- }}), CSSLint.addRule({id: "star-property-hack", name: "Disallow properties with a star prefix", desc: "Checks for the star property hack (targets IE6/7)", browsers: "All", init: function (e, t) {
- var n = this;
- e.addListener("property", function (e) {
- var r = e.property;
- r.hack == "*" && t.report("Property with star prefix found.", e.property.line, e.property.col, n)
- })
- }}), CSSLint.addRule({id: "text-indent", name: "Disallow negative text-indent", desc: "Checks for text indent less than -99px", browsers: "All", init: function (e, t) {
- function s(e) {
- r = !1, i = "inherit"
- }
-
- function o(e) {
- r && i != "ltr" && t.report("Negative text-indent doesn't work well with RTL. If you use text-indent for image replacement explicitly set direction for that item to ltr.", r.line, r.col, n)
- }
-
- var n = this, r, i;
- e.addListener("startrule", s), e.addListener("startfontface", s), e.addListener("property", function (e) {
- var t = e.property.toString().toLowerCase(), n = e.value;
- t == "text-indent" && n.parts[0].value < -99 ? r = e.property : t == "direction" && n == "ltr" && (i = "ltr")
- }), e.addListener("endrule", o), e.addListener("endfontface", o)
- }}), CSSLint.addRule({id: "underscore-property-hack", name: "Disallow properties with an underscore prefix", desc: "Checks for the underscore property hack (targets IE6)", browsers: "All", init: function (e, t) {
- var n = this;
- e.addListener("property", function (e) {
- var r = e.property;
- r.hack == "_" && t.report("Property with underscore prefix found.", e.property.line, e.property.col, n)
- })
- }}), CSSLint.addRule({id: "unique-headings", name: "Headings should only be defined once", desc: "Headings should be defined only once.", browsers: "All", init: function (e, t) {
- var n = this, r = {h1: 0, h2: 0, h3: 0, h4: 0, h5: 0, h6: 0};
- e.addListener("startrule", function (e) {
- var i = e.selectors, s, o, u, a, f;
- for (a = 0; a < i.length; a++) {
- s = i[a], o = s.parts[s.parts.length - 1];
- if (o.elementName && /(h[1-6])/i.test(o.elementName.toString())) {
- for (f = 0; f < o.modifiers.length; f++)if (o.modifiers[f].type == "pseudo") {
- u = !0;
- break
- }
- u || (r[RegExp.$1]++, r[RegExp.$1] > 1 && t.report("Heading (" + o.elementName + ") has already been defined.", o.line, o.col, n))
- }
- }
- }), e.addListener("endstylesheet", function (e) {
- var i, s = [];
- for (i in r)r.hasOwnProperty(i) && r[i] > 1 && s.push(r[i] + " " + i + "s");
- s.length && t.rollupWarn("You have " + s.join(", ") + " defined in this stylesheet.", n)
- })
- }}), CSSLint.addRule({id: "universal-selector", name: "Disallow universal selector", desc: "The universal selector (*) is known to be slow.", browsers: "All", init: function (e, t) {
- var n = this;
- e.addListener("startrule", function (e) {
- var r = e.selectors, i, s, o, u, a, f;
- for (u = 0; u < r.length; u++)i = r[u], s = i.parts[i.parts.length - 1], s.elementName == "*" && t.report(n.desc, s.line, s.col, n)
- })
- }}), CSSLint.addRule({id: "unqualified-attributes", name: "Disallow unqualified attribute selectors", desc: "Unqualified attribute selectors are known to be slow.", browsers: "All", init: function (e, t) {
- var n = this;
- e.addListener("startrule", function (r) {
- var i = r.selectors, s, o, u, a, f, l;
- for (a = 0; a < i.length; a++) {
- s = i[a], o = s.parts[s.parts.length - 1];
- if (o.type == e.SELECTOR_PART_TYPE)for (l = 0; l < o.modifiers.length; l++)u = o.modifiers[l], u.type == "attribute" && (!o.elementName || o.elementName == "*") && t.report(n.desc, o.line, o.col, n)
- }
- })
- }}), CSSLint.addRule({id: "vendor-prefix", name: "Require standard property with vendor prefix", desc: "When using a vendor-prefixed property, make sure to include the standard one.", browsers: "All", init: function (e, t) {
- function o() {
- r = {}, i = 1
- }
-
- function u(e) {
- var i, o, u, a, f, l, c = [];
- for (i in r)s[i] && c.push({actual: i, needed: s[i]});
- for (o = 0, u = c.length; o < u; o++)f = c[o].needed, l = c[o].actual, r[f] ? r[f][0].pos < r[l][0].pos && t.report("Standard property '" + f + "' should come after vendor-prefixed property '" + l + "'.", r[l][0].name.line, r[l][0].name.col, n) : t.report("Missing standard property '" + f + "' to go along with '" + l + "'.", r[l][0].name.line, r[l][0].name.col, n)
- }
-
- var n = this, r, i, s = {"-webkit-border-radius": "border-radius", "-webkit-border-top-left-radius": "border-top-left-radius", "-webkit-border-top-right-radius": "border-top-right-radius", "-webkit-border-bottom-left-radius": "border-bottom-left-radius", "-webkit-border-bottom-right-radius": "border-bottom-right-radius", "-o-border-radius": "border-radius", "-o-border-top-left-radius": "border-top-left-radius", "-o-border-top-right-radius": "border-top-right-radius", "-o-border-bottom-left-radius": "border-bottom-left-radius", "-o-border-bottom-right-radius": "border-bottom-right-radius", "-moz-border-radius": "border-radius", "-moz-border-radius-topleft": "border-top-left-radius", "-moz-border-radius-topright": "border-top-right-radius", "-moz-border-radius-bottomleft": "border-bottom-left-radius", "-moz-border-radius-bottomright": "border-bottom-right-radius", "-moz-column-count": "column-count", "-webkit-column-count": "column-count", "-moz-column-gap": "column-gap", "-webkit-column-gap": "column-gap", "-moz-column-rule": "column-rule", "-webkit-column-rule": "column-rule", "-moz-column-rule-style": "column-rule-style", "-webkit-column-rule-style": "column-rule-style", "-moz-column-rule-color": "column-rule-color", "-webkit-column-rule-color": "column-rule-color", "-moz-column-rule-width": "column-rule-width", "-webkit-column-rule-width": "column-rule-width", "-moz-column-width": "column-width", "-webkit-column-width": "column-width", "-webkit-column-span": "column-span", "-webkit-columns": "columns", "-moz-box-shadow": "box-shadow", "-webkit-box-shadow": "box-shadow", "-moz-transform": "transform", "-webkit-transform": "transform", "-o-transform": "transform", "-ms-transform": "transform", "-moz-transform-origin": "transform-origin", "-webkit-transform-origin": "transform-origin", "-o-transform-origin": "transform-origin", "-ms-transform-origin": "transform-origin", "-moz-box-sizing": "box-sizing", "-webkit-box-sizing": "box-sizing", "-moz-user-select": "user-select", "-khtml-user-select": "user-select", "-webkit-user-select": "user-select"};
- e.addListener("startrule", o), e.addListener("startfontface", o), e.addListener("startpage", o), e.addListener("startpagemargin", o), e.addListener("startkeyframerule", o), e.addListener("property", function (e) {
- var t = e.property.text.toLowerCase();
- r[t] || (r[t] = []), r[t].push({name: e.property, value: e.value, pos: i++})
- }), e.addListener("endrule", u), e.addListener("endfontface", u), e.addListener("endpage", u), e.addListener("endpagemargin", u), e.addListener("endkeyframerule", u)
- }}), CSSLint.addRule({id: "zero-units", name: "Disallow units for 0 values", desc: "You don't need to specify units when a value is 0.", browsers: "All", init: function (e, t) {
- var n = this;
- e.addListener("property", function (e) {
- var r = e.value.parts, i = 0, s = r.length;
- while (i < s)(r[i].units || r[i].type == "percentage") && r[i].value === 0 && r[i].type != "time" && t.report("Values of 0 shouldn't have units specified.", r[i].line, r[i].col, n), i++
- })
- }}), exports.CSSLint = CSSLint
-})
\ No newline at end of file
diff --git a/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/worker-javascript.js b/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/worker-javascript.js
deleted file mode 100644
index 46a174c..0000000
--- a/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/worker-javascript.js
+++ /dev/null
@@ -1,2106 +0,0 @@
-"no use strict";
-function initBaseUrls(e) {
- require.tlns = e
-}
-function initSender() {
- var e = require(null, "ace/lib/event_emitter").EventEmitter, t = require(null, "ace/lib/oop"), n = function () {
- };
- return function () {
- t.implement(this, e), 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(n.prototype), new n
-}
-if (typeof window != "undefined" && window.document)throw"atempt to load ace worker into main window instead of webWorker";
-var console = {log: function () {
- var e = Array.prototype.slice.call(arguments, 0);
- postMessage({type: "log", data: e})
-}, error: function () {
- var e = Array.prototype.slice.call(arguments, 0);
- postMessage({type: "log", data: e})
-}}, window = {console: console}, normalizeModule = function (e, t) {
- if (t.indexOf("!") !== -1) {
- var n = t.split("!");
- return normalizeModule(e, n[0]) + "!" + normalizeModule(e, n[1])
- }
- if (t.charAt(0) == ".") {
- var r = e.split("/").slice(0, -1).join("/");
- t = r + "/" + t;
- while (t.indexOf(".") !== -1 && i != t) {
- var i = t;
- t = t.replace(/\/\.\//, "/").replace(/[^\/]+\/\.\.\//, "")
- }
- }
- return t
-}, require = function (e, t) {
- if (!t.charAt)throw new Error("worker.js require() accepts only (parentId, id) as arguments");
- t = normalizeModule(e, t);
- var n = require.modules[t];
- if (n)return n.initialized || (n.initialized = !0, n.exports = n.factory().exports), n.exports;
- var r = t.split("/");
- r[0] = require.tlns[r[0]] || r[0];
- var i = r.join("/") + ".js";
- return require.id = t, importScripts(i), require(e, t)
-};
-require.modules = {}, require.tlns = {};
-var define = function (e, t, n) {
- arguments.length == 2 ? (n = t, typeof e != "string" && (t = e, e = require.id)) : arguments.length == 1 && (n = e, e = require.id);
- if (e.indexOf("text!") === 0)return;
- var r = function (t, n) {
- return require(e, t, n)
- };
- require.modules[e] = {factory: function () {
- var e = {exports: {}}, t = n(r, e.exports, e);
- return t && (e.exports = t), e
- }}
-}, main, sender;
-onmessage = function (e) {
- var t = e.data;
- if (t.command) {
- if (!main[t.command])throw new Error("Unknown command:" + t.command);
- main[t.command].apply(main, t.args)
- } else if (t.init) {
- initBaseUrls(t.tlns), require(null, "ace/lib/fixoldbrowsers"), sender = initSender();
- var n = require(null, t.module)[t.classname];
- main = new n(sender)
- } else t.event && sender && sender._emit(t.event, t.data)
-}, define("ace/lib/fixoldbrowsers", ["require", "exports", "module", "ace/lib/regexp", "ace/lib/es5-shim"], function (e, t, n) {
- e("./regexp"), e("./es5-shim")
-}), define("ace/lib/regexp", ["require", "exports", "module"], function (e, t, n) {
- function o(e) {
- return(e.global ? "g" : "") + (e.ignoreCase ? "i" : "") + (e.multiline ? "m" : "") + (e.extended ? "x" : "") + (e.sticky ? "y" : "")
- }
-
- function u(e, t, n) {
- if (Array.prototype.indexOf)return e.indexOf(t, n);
- for (var r = n || 0; r < e.length; r++)if (e[r] === t)return r;
- return-1
- }
-
- var r = {exec: RegExp.prototype.exec, test: RegExp.prototype.test, match: String.prototype.match, replace: String.prototype.replace, split: String.prototype.split}, i = r.exec.call(/()??/, "")[1] === undefined, s = function () {
- var e = /^/g;
- return r.test.call(e, ""), !e.lastIndex
- }();
- if (s && i)return;
- RegExp.prototype.exec = function (e) {
- var t = r.exec.apply(this, arguments), n, a;
- if (typeof e == "string" && t) {
- !i && t.length > 1 && u(t, "") > -1 && (a = RegExp(this.source, r.replace.call(o(this), "g", "")), r.replace.call(e.slice(t.index), a, function () {
- for (var e = 1; e < arguments.length - 2; e++)arguments[e] === undefined && (t[e] = undefined)
- }));
- if (this._xregexp && this._xregexp.captureNames)for (var f = 1; f < t.length; f++)n = this._xregexp.captureNames[f - 1], n && (t[n] = t[f]);
- !s && this.global && !t[0].length && this.lastIndex > t.index && this.lastIndex--
- }
- return t
- }, s || (RegExp.prototype.test = function (e) {
- var t = r.exec.call(this, e);
- return t && this.global && !t[0].length && this.lastIndex > t.index && this.lastIndex--, !!t
- })
-}), define("ace/lib/es5-shim", ["require", "exports", "module"], function (e, t, n) {
- function r() {
- }
-
- function w(e) {
- try {
- return Object.defineProperty(e, "sentinel", {}), "sentinel"in e
- } catch (t) {
- }
- }
-
- function j(e) {
- return e = +e, e !== e ? e = 0 : e !== 0 && e !== 1 / 0 && e !== -1 / 0 && (e = (e > 0 || -1) * Math.floor(Math.abs(e))), e
- }
-
- function F(e) {
- var t = typeof e;
- return e === null || t === "undefined" || t === "boolean" || t === "number" || t === "string"
- }
-
- function I(e) {
- var t, n, r;
- if (F(e))return e;
- n = e.valueOf;
- if (typeof n == "function") {
- t = n.call(e);
- if (F(t))return t
- }
- r = e.toString;
- if (typeof r == "function") {
- t = r.call(e);
- if (F(t))return t
- }
- throw new TypeError
- }
-
- Function.prototype.bind || (Function.prototype.bind = function (t) {
- var n = this;
- if (typeof n != "function")throw new TypeError("Function.prototype.bind called on incompatible " + n);
- var i = u.call(arguments, 1), s = function () {
- if (this instanceof s) {
- var e = n.apply(this, i.concat(u.call(arguments)));
- return Object(e) === e ? e : this
- }
- return n.apply(t, i.concat(u.call(arguments)))
- };
- return n.prototype && (r.prototype = n.prototype, s.prototype = new r, r.prototype = null), s
- });
- var i = Function.prototype.call, s = Array.prototype, o = Object.prototype, u = s.slice, a = i.bind(o.toString), f = i.bind(o.hasOwnProperty), l, c, h, p, d;
- if (d = f(o, "__defineGetter__"))l = i.bind(o.__defineGetter__), c = i.bind(o.__defineSetter__), h = i.bind(o.__lookupGetter__), p = i.bind(o.__lookupSetter__);
- if ([1, 2].splice(0).length != 2)if (!function () {
- function e(e) {
- var t = new Array(e + 2);
- return t[0] = t[1] = 0, t
- }
-
- var t = [], n;
- t.splice.apply(t, e(20)), t.splice.apply(t, e(26)), n = t.length, t.splice(5, 0, "XXX"), n + 1 == t.length;
- if (n + 1 == t.length)return!0
- }())Array.prototype.splice = function (e, t) {
- var n = this.length;
- e > 0 ? e > n && (e = n) : e == void 0 ? e = 0 : e < 0 && (e = Math.max(n + e, 0)), e + t < n || (t = n - e);
- var r = this.slice(e, e + t), i = u.call(arguments, 2), s = i.length;
- if (e === n)s && this.push.apply(this, i); else {
- var o = Math.min(t, n - e), a = e + o, f = a + s - o, l = n - a, c = n - o;
- if (f < a)for (var h = 0; h < l; ++h)this[f + h] = this[a + h]; else if (f > a)for (h = l; h--;)this[f + h] = this[a + h];
- if (s && e === c)this.length = c, this.push.apply(this, i); else {
- this.length = c + s;
- for (h = 0; h < s; ++h)this[e + h] = i[h]
- }
- }
- return r
- }; else {
- var v = Array.prototype.splice;
- Array.prototype.splice = function (e, t) {
- return arguments.length ? v.apply(this, [e === void 0 ? 0 : e, t === void 0 ? this.length - e : t].concat(u.call(arguments, 2))) : []
- }
- }
- Array.isArray || (Array.isArray = function (t) {
- return a(t) == "[object Array]"
- });
- var m = Object("a"), g = m[0] != "a" || !(0 in m);
- Array.prototype.forEach || (Array.prototype.forEach = function (t) {
- var n = q(this), r = g && a(this) == "[object String]" ? this.split("") : n, i = arguments[1], s = -1, o = r.length >>> 0;
- if (a(t) != "[object Function]")throw new TypeError;
- while (++s < o)s in r && t.call(i, r[s], s, n)
- }), Array.prototype.map || (Array.prototype.map = function (t) {
- var n = q(this), r = g && a(this) == "[object String]" ? this.split("") : n, i = r.length >>> 0, s = Array(i), o = arguments[1];
- if (a(t) != "[object Function]")throw new TypeError(t + " is not a function");
- for (var u = 0; u < i; u++)u in r && (s[u] = t.call(o, r[u], u, n));
- return s
- }), Array.prototype.filter || (Array.prototype.filter = function (t) {
- var n = q(this), r = g && a(this) == "[object String]" ? this.split("") : n, i = r.length >>> 0, s = [], o, u = arguments[1];
- if (a(t) != "[object Function]")throw new TypeError(t + " is not a function");
- for (var f = 0; f < i; f++)f in r && (o = r[f], t.call(u, o, f, n) && s.push(o));
- return s
- }), Array.prototype.every || (Array.prototype.every = function (t) {
- var n = q(this), r = g && a(this) == "[object String]" ? this.split("") : n, i = r.length >>> 0, s = arguments[1];
- if (a(t) != "[object Function]")throw new TypeError(t + " is not a function");
- for (var o = 0; o < i; o++)if (o in r && !t.call(s, r[o], o, n))return!1;
- return!0
- }), Array.prototype.some || (Array.prototype.some = function (t) {
- var n = q(this), r = g && a(this) == "[object String]" ? this.split("") : n, i = r.length >>> 0, s = arguments[1];
- if (a(t) != "[object Function]")throw new TypeError(t + " is not a function");
- for (var o = 0; o < i; o++)if (o in r && t.call(s, r[o], o, n))return!0;
- return!1
- }), Array.prototype.reduce || (Array.prototype.reduce = function (t) {
- var n = q(this), r = g && a(this) == "[object String]" ? this.split("") : n, i = r.length >>> 0;
- if (a(t) != "[object Function]")throw new TypeError(t + " is not a function");
- if (!i && arguments.length == 1)throw new TypeError("reduce of empty array with no initial value");
- var s = 0, o;
- if (arguments.length >= 2)o = arguments[1]; else do {
- if (s in r) {
- o = r[s++];
- break
- }
- if (++s >= i)throw new TypeError("reduce of empty array with no initial value")
- } while (!0);
- for (; s < i; s++)s in r && (o = t.call(void 0, o, r[s], s, n));
- return o
- }), Array.prototype.reduceRight || (Array.prototype.reduceRight = function (t) {
- var n = q(this), r = g && a(this) == "[object String]" ? this.split("") : n, i = r.length >>> 0;
- if (a(t) != "[object Function]")throw new TypeError(t + " is not a function");
- if (!i && arguments.length == 1)throw new TypeError("reduceRight of empty array with no initial value");
- var s, o = i - 1;
- if (arguments.length >= 2)s = arguments[1]; else do {
- if (o in r) {
- s = r[o--];
- break
- }
- if (--o < 0)throw new TypeError("reduceRight of empty array with no initial value")
- } while (!0);
- do o in this && (s = t.call(void 0, s, r[o], o, n)); while (o--);
- return s
- });
- if (!Array.prototype.indexOf || [0, 1].indexOf(1, 2) != -1)Array.prototype.indexOf = function (t) {
- var n = g && a(this) == "[object String]" ? this.split("") : q(this), r = n.length >>> 0;
- if (!r)return-1;
- var i = 0;
- arguments.length > 1 && (i = j(arguments[1])), i = i >= 0 ? i : Math.max(0, r + i);
- for (; i < r; i++)if (i in n && n[i] === t)return i;
- return-1
- };
- if (!Array.prototype.lastIndexOf || [0, 1].lastIndexOf(0, -3) != -1)Array.prototype.lastIndexOf = function (t) {
- var n = g && a(this) == "[object String]" ? this.split("") : q(this), r = n.length >>> 0;
- if (!r)return-1;
- var i = r - 1;
- arguments.length > 1 && (i = Math.min(i, j(arguments[1]))), i = i >= 0 ? i : r - Math.abs(i);
- for (; i >= 0; i--)if (i in n && t === n[i])return i;
- return-1
- };
- Object.getPrototypeOf || (Object.getPrototypeOf = function (t) {
- return t.__proto__ || (t.constructor ? t.constructor.prototype : o)
- });
- if (!Object.getOwnPropertyDescriptor) {
- var y = "Object.getOwnPropertyDescriptor called on a non-object: ";
- Object.getOwnPropertyDescriptor = function (t, n) {
- if (typeof t != "object" && typeof t != "function" || t === null)throw new TypeError(y + t);
- if (!f(t, n))return;
- var r, i, s;
- r = {enumerable: !0, configurable: !0};
- if (d) {
- var u = t.__proto__;
- t.__proto__ = o;
- var i = h(t, n), s = p(t, n);
- t.__proto__ = u;
- if (i || s)return i && (r.get = i), s && (r.set = s), r
- }
- return r.value = t[n], r
- }
- }
- Object.getOwnPropertyNames || (Object.getOwnPropertyNames = function (t) {
- return Object.keys(t)
- });
- if (!Object.create) {
- var b;
- Object.prototype.__proto__ === null ? b = function () {
- return{__proto__: null}
- } : b = function () {
- var e = {};
- for (var t in e)e[t] = null;
- return e.constructor = e.hasOwnProperty = e.propertyIsEnumerable = e.isPrototypeOf = e.toLocaleString = e.toString = e.valueOf = e.__proto__ = null, e
- }, Object.create = function (t, n) {
- var r;
- if (t === null)r = b(); else {
- if (typeof t != "object")throw new TypeError("typeof prototype[" + typeof t + "] != 'object'");
- var i = function () {
- };
- i.prototype = t, r = new i, r.__proto__ = t
- }
- return n !== void 0 && Object.defineProperties(r, n), r
- }
- }
- if (Object.defineProperty) {
- var E = w({}), S = typeof document == "undefined" || w(document.createElement("div"));
- if (!E || !S)var x = Object.defineProperty
- }
- if (!Object.defineProperty || x) {
- var T = "Property description must be an object: ", N = "Object.defineProperty called on non-object: ", C = "getters & setters can not be defined on this javascript engine";
- Object.defineProperty = function (t, n, r) {
- if (typeof t != "object" && typeof t != "function" || t === null)throw new TypeError(N + t);
- if (typeof r != "object" && typeof r != "function" || r === null)throw new TypeError(T + r);
- if (x)try {
- return x.call(Object, t, n, r)
- } catch (i) {
- }
- if (f(r, "value"))if (d && (h(t, n) || p(t, n))) {
- var s = t.__proto__;
- t.__proto__ = o, delete t[n], t[n] = r.value, t.__proto__ = s
- } else t[n] = r.value; else {
- if (!d)throw new TypeError(C);
- f(r, "get") && l(t, n, r.get), f(r, "set") && c(t, n, r.set)
- }
- return t
- }
- }
- Object.defineProperties || (Object.defineProperties = function (t, n) {
- for (var r in n)f(n, r) && Object.defineProperty(t, r, n[r]);
- return t
- }), Object.seal || (Object.seal = function (t) {
- return t
- }), Object.freeze || (Object.freeze = function (t) {
- return t
- });
- try {
- Object.freeze(function () {
- })
- } catch (k) {
- Object.freeze = function (t) {
- return function (n) {
- return typeof n == "function" ? n : t(n)
- }
- }(Object.freeze)
- }
- Object.preventExtensions || (Object.preventExtensions = function (t) {
- return t
- }), Object.isSealed || (Object.isSealed = function (t) {
- return!1
- }), Object.isFrozen || (Object.isFrozen = function (t) {
- return!1
- }), Object.isExtensible || (Object.isExtensible = function (t) {
- if (Object(t) === t)throw new TypeError;
- var n = "";
- while (f(t, n))n += "?";
- t[n] = !0;
- var r = f(t, n);
- return delete t[n], r
- });
- if (!Object.keys) {
- var L = !0, A = ["toString", "toLocaleString", "valueOf", "hasOwnProperty", "isPrototypeOf", "propertyIsEnumerable", "constructor"], O = A.length;
- for (var M in{toString: null})L = !1;
- Object.keys = function R(e) {
- if (typeof e != "object" && typeof e != "function" || e === null)throw new TypeError("Object.keys called on a non-object");
- var R = [];
- for (var t in e)f(e, t) && R.push(t);
- if (L)for (var n = 0, r = O; n < r; n++) {
- var i = A[n];
- f(e, i) && R.push(i)
- }
- return R
- }
- }
- Date.now || (Date.now = function () {
- return(new Date).getTime()
- });
- if ("0".split(void 0, 0).length) {
- var _ = String.prototype.split;
- String.prototype.split = function (e, t) {
- return e === void 0 && t === 0 ? [] : _.apply(this, arguments)
- }
- }
- if ("".substr && "0b".substr(-1) !== "b") {
- var D = String.prototype.substr;
- String.prototype.substr = function (e, t) {
- return D.call(this, e < 0 ? (e = this.length + e) < 0 ? 0 : e : e, t)
- }
- }
- var P = " \n\f\r Â áš€á Žâ€€â€â€‚         âŸã€€\u2028\u2029";
- if (!String.prototype.trim || P.trim()) {
- P = "[" + P + "]";
- var H = new RegExp("^" + P + P + "*"), B = new RegExp(P + P + "*$");
- String.prototype.trim = function () {
- if (this === undefined || this === null)throw new TypeError("can't convert " + this + " to object");
- return String(this).replace(H, "").replace(B, "")
- }
- }
- var q = function (e) {
- if (e == null)throw new TypeError("can't convert " + e + " to object");
- return Object(e)
- }
-}), define("ace/lib/event_emitter", ["require", "exports", "module"], function (e, t, n) {
- var r = {};
- r._emit = r._dispatchEvent = function (e, t) {
- this._eventRegistry = this._eventRegistry || {}, this._defaultHandlers = this._defaultHandlers || {};
- var n = this._eventRegistry[e] || [], r = this._defaultHandlers[e];
- if (!n.length && !r)return;
- if (typeof t != "object" || !t)t = {};
- t.type || (t.type = e), t.stopPropagation || (t.stopPropagation = function () {
- this.propagationStopped = !0
- }), t.preventDefault || (t.preventDefault = function () {
- this.defaultPrevented = !0
- });
- for (var i = 0; i < n.length; i++) {
- n[i](t);
- if (t.propagationStopped)break
- }
- if (r && !t.defaultPrevented)return r(t)
- }, r.setDefaultHandler = function (e, t) {
- this._defaultHandlers = this._defaultHandlers || {};
- if (this._defaultHandlers[e])throw new Error("The default handler for '" + e + "' is already set");
- this._defaultHandlers[e] = t
- }, r.on = r.addEventListener = function (e, t) {
- this._eventRegistry = this._eventRegistry || {};
- var n = this._eventRegistry[e];
- n || (n = this._eventRegistry[e] = []), n.indexOf(t) == -1 && n.push(t)
- }, r.removeListener = r.removeEventListener = function (e, t) {
- this._eventRegistry = this._eventRegistry || {};
- var n = this._eventRegistry[e];
- if (!n)return;
- var r = n.indexOf(t);
- r !== -1 && n.splice(r, 1)
- }, r.removeAllListeners = function (e) {
- this._eventRegistry && (this._eventRegistry[e] = [])
- }, t.EventEmitter = r
-}), define("ace/lib/oop", ["require", "exports", "module"], function (e, t, n) {
- t.inherits = function () {
- var e = function () {
- };
- return function (t, n) {
- e.prototype = n.prototype, t.super_ = n.prototype, t.prototype = new e, t.prototype.constructor = t
- }
- }(), t.mixin = function (e, t) {
- for (var n in t)e[n] = t[n]
- }, t.implement = function (e, n) {
- t.mixin(e, n)
- }
-}), define("ace/mode/javascript_worker", ["require", "exports", "module", "ace/lib/oop", "ace/worker/mirror", "ace/mode/javascript/jshint"], function (require, exports, module) {
- function startRegex(e) {
- return RegExp("^(" + e.join("|") + ")")
- }
-
- var oop = require("../lib/oop"), Mirror = require("../worker/mirror").Mirror, lint = require("./javascript/jshint").JSHINT, disabledWarningsRe = startRegex(["Bad for in variable '(.+)'.", 'Missing "use strict"']), errorsRe = startRegex(["Unexpected", "Expected ", "Confusing (plus|minus)", "\\{a\\} unterminated regular expression", "Unclosed ", "Unmatched ", "Unbegun comment", "Bad invocation", "Missing space after", "Missing operator at"]), infoRe = startRegex(["Expected an assignment", "Bad escapement of EOL", "Unexpected comma", "Unexpected space", "Missing radix parameter.", "A leading decimal point can", "\\['{a}'\\] is better written in dot notation.", "'{a}' used out of scope"]), JavaScriptWorker = exports.JavaScriptWorker = function (e) {
- Mirror.call(this, e), this.setTimeout(500), this.setOptions()
- };
- oop.inherits(JavaScriptWorker, Mirror), function () {
- this.setOptions = function (e) {
- this.options = e || {es5: !0, esnext: !0, devel: !0, browser: !0, node: !0, laxcomma: !0, laxbreak: !0, lastsemic: !0, onevar: !1, passfail: !1, maxerr: 100, expr: !0, multistr: !0, globalstrict: !0}, this.doc.getValue() && this.deferredUpdate.schedule(100)
- }, this.changeOptions = function (e) {
- oop.mixin(this.options, e), this.doc.getValue() && this.deferredUpdate.schedule(100)
- }, this.isValidJS = function (str) {
- try {
- eval("throw 0;" + str)
- } catch (e) {
- if (e === 0)return!0
- }
- return!1
- }, this.onUpdate = function () {
- var e = this.doc.getValue();
- e = e.replace(/^#!.*\n/, "\n");
- if (!e) {
- this.sender.emit("jslint", []);
- return
- }
- var t = [], n = this.isValidJS(e) ? "warning" : "error";
- lint(e, this.options);
- var r = lint.errors, i = !1;
- for (var s = 0; s < r.length; s++) {
- var o = r[s];
- if (!o)continue;
- var u = o.raw, a = "warning";
- if (u == "Missing semicolon.") {
- var f = o.evidence.substr(o.character);
- f = f.charAt(f.search(/\S/)), n == "error" && f && /[\w\d{(['"]/.test(f) ? (o.reason = 'Missing ";" before statement', a = "error") : a = "info"
- } else {
- if (disabledWarningsRe.test(u))continue;
- infoRe.test(u) ? a = "info" : errorsRe.test(u) ? (i = !0, a = n) : u == "'{a}' is not defined." ? a = "warning" : u == "'{a}' is defined but never used." && (a = "info")
- }
- t.push({row: o.line - 1, column: o.character - 1, text: o.reason, type: a, raw: u}), i
- }
- this.sender.emit("jslint", t)
- }
- }.call(JavaScriptWorker.prototype)
-}), define("ace/worker/mirror", ["require", "exports", "module", "ace/document", "ace/lib/lang"], function (e, t, n) {
- var r = e("../document").Document, i = e("../lib/lang"), s = t.Mirror = function (e) {
- this.sender = e;
- var t = this.doc = new r(""), n = this.deferredUpdate = i.deferredCall(this.onUpdate.bind(this)), s = this;
- e.on("change", function (e) {
- t.applyDeltas([e.data]), n.schedule(s.$timeout)
- })
- };
- (function () {
- this.$timeout = 500, this.setTimeout = function (e) {
- this.$timeout = e
- }, this.setValue = function (e) {
- this.doc.setValue(e), this.deferredUpdate.schedule(this.$timeout)
- }, this.getValue = function (e) {
- this.sender.callback(this.doc.getValue(), e)
- }, this.onUpdate = function () {
- }
- }).call(s.prototype)
-}), define("ace/document", ["require", "exports", "module", "ace/lib/oop", "ace/lib/event_emitter", "ace/range", "ace/anchor"], function (e, t, n) {
- var r = e("./lib/oop"), i = e("./lib/event_emitter").EventEmitter, s = e("./range").Range, o = e("./anchor").Anchor, u = function (e) {
- this.$lines = [], e.length == 0 ? this.$lines = [""] : Array.isArray(e) ? this.insertLines(0, e) : this.insert({row: 0, column: 0}, e)
- };
- (function () {
- r.implement(this, i), this.setValue = function (e) {
- var t = this.getLength();
- this.remove(new s(0, 0, t, this.getLine(t - 1).length)), this.insert({row: 0, column: 0}, e)
- }, this.getValue = function () {
- return this.getAllLines().join(this.getNewLineCharacter())
- }, this.createAnchor = function (e, t) {
- return new o(this, e, t)
- }, "aaa".split(/a/).length == 0 ? this.$split = function (e) {
- return e.replace(/\r\n|\r/g, "\n").split("\n")
- } : this.$split = function (e) {
- return e.split(/\r\n|\r|\n/)
- }, this.$detectNewLine = function (e) {
- var t = e.match(/^.*?(\r\n|\r|\n)/m);
- t ? this.$autoNewLine = t[1] : this.$autoNewLine = "\n"
- }, this.getNewLineCharacter = function () {
- switch (this.$newLineMode) {
- case"windows":
- return"\r\n";
- case"unix":
- return"\n";
- default:
- return this.$autoNewLine
- }
- }, this.$autoNewLine = "\n", this.$newLineMode = "auto", this.setNewLineMode = function (e) {
- if (this.$newLineMode === e)return;
- this.$newLineMode = e
- }, this.getNewLineMode = function () {
- return this.$newLineMode
- }, this.isNewLine = function (e) {
- return e == "\r\n" || e == "\r" || e == "\n"
- }, this.getLine = function (e) {
- return this.$lines[e] || ""
- }, this.getLines = function (e, t) {
- return this.$lines.slice(e, t + 1)
- }, this.getAllLines = function () {
- return this.getLines(0, this.getLength())
- }, this.getLength = function () {
- return this.$lines.length
- }, this.getTextRange = function (e) {
- if (e.start.row == e.end.row)return this.$lines[e.start.row].substring(e.start.column, e.end.column);
- var t = this.getLines(e.start.row + 1, e.end.row - 1);
- return t.unshift((this.$lines[e.start.row] || "").substring(e.start.column)), t.push((this.$lines[e.end.row] || "").substring(0, e.end.column)), t.join(this.getNewLineCharacter())
- }, this.$clipPosition = function (e) {
- var t = this.getLength();
- return e.row >= t && (e.row = Math.max(0, t - 1), e.column = this.getLine(t - 1).length), e
- }, this.insert = function (e, t) {
- if (!t || t.length === 0)return e;
- e = this.$clipPosition(e), this.getLength() <= 1 && this.$detectNewLine(t);
- var n = this.$split(t), r = n.splice(0, 1)[0], i = n.length == 0 ? null : n.splice(n.length - 1, 1)[0];
- return e = this.insertInLine(e, r), i !== null && (e = this.insertNewLine(e), e = this.insertLines(e.row, n), e = this.insertInLine(e, i || "")), e
- }, this.insertLines = function (e, t) {
- if (t.length == 0)return{row: e, column: 0};
- if (t.length > 65535) {
- var n = this.insertLines(e, t.slice(65535));
- t = t.slice(0, 65535)
- }
- var r = [e, 0];
- r.push.apply(r, t), this.$lines.splice.apply(this.$lines, r);
- var i = new s(e, 0, e + t.length, 0), o = {action: "insertLines", range: i, lines: t};
- return this._emit("change", {data: o}), n || i.end
- }, this.insertNewLine = function (e) {
- e = this.$clipPosition(e);
- var t = this.$lines[e.row] || "";
- this.$lines[e.row] = t.substring(0, e.column), this.$lines.splice(e.row + 1, 0, t.substring(e.column, t.length));
- var n = {row: e.row + 1, column: 0}, r = {action: "insertText", range: s.fromPoints(e, n), text: this.getNewLineCharacter()};
- return this._emit("change", {data: r}), n
- }, this.insertInLine = function (e, t) {
- if (t.length == 0)return e;
- var n = this.$lines[e.row] || "";
- this.$lines[e.row] = n.substring(0, e.column) + t + n.substring(e.column);
- var r = {row: e.row, column: e.column + t.length}, i = {action: "insertText", range: s.fromPoints(e, r), text: t};
- return this._emit("change", {data: i}), r
- }, this.remove = function (e) {
- e.start = this.$clipPosition(e.start), e.end = this.$clipPosition(e.end);
- if (e.isEmpty())return e.start;
- var t = e.start.row, n = e.end.row;
- if (e.isMultiLine()) {
- var r = e.start.column == 0 ? t : t + 1, i = n - 1;
- e.end.column > 0 && this.removeInLine(n, 0, e.end.column), i >= r && this.removeLines(r, i), r != t && (this.removeInLine(t, e.start.column, this.getLine(t).length), this.removeNewLine(e.start.row))
- } else this.removeInLine(t, e.start.column, e.end.column);
- return e.start
- }, this.removeInLine = function (e, t, n) {
- if (t == n)return;
- var r = new s(e, t, e, n), i = this.getLine(e), o = i.substring(t, n), u = i.substring(0, t) + i.substring(n, i.length);
- this.$lines.splice(e, 1, u);
- var a = {action: "removeText", range: r, text: o};
- return this._emit("change", {data: a}), r.start
- }, this.removeLines = function (e, t) {
- var n = new s(e, 0, t + 1, 0), r = this.$lines.splice(e, t - e + 1), i = {action: "removeLines", range: n, nl: this.getNewLineCharacter(), lines: r};
- return this._emit("change", {data: i}), r
- }, this.removeNewLine = function (e) {
- var t = this.getLine(e), n = this.getLine(e + 1), r = new s(e, t.length, e + 1, 0), i = t + n;
- this.$lines.splice(e, 2, i);
- var o = {action: "removeText", range: r, text: this.getNewLineCharacter()};
- this._emit("change", {data: o})
- }, this.replace = function (e, t) {
- if (t.length == 0 && e.isEmpty())return e.start;
- if (t == this.getTextRange(e))return e.end;
- this.remove(e);
- if (t)var n = this.insert(e.start, t); else n = e.start;
- return n
- }, this.applyDeltas = function (e) {
- for (var t = 0; t < e.length; t++) {
- var n = e[t], r = s.fromPoints(n.range.start, n.range.end);
- n.action == "insertLines" ? this.insertLines(r.start.row, n.lines) : n.action == "insertText" ? this.insert(r.start, n.text) : n.action == "removeLines" ? this.removeLines(r.start.row, r.end.row - 1) : n.action == "removeText" && this.remove(r)
- }
- }, this.revertDeltas = function (e) {
- for (var t = e.length - 1; t >= 0; t--) {
- var n = e[t], r = s.fromPoints(n.range.start, n.range.end);
- n.action == "insertLines" ? this.removeLines(r.start.row, r.end.row - 1) : n.action == "insertText" ? this.remove(r) : n.action == "removeLines" ? this.insertLines(r.start.row, n.lines) : n.action == "removeText" && this.insert(r.start, n.text)
- }
- }, this.indexToPosition = function (e, t) {
- var n = this.$lines || this.getAllLines(), r = this.getNewLineCharacter().length;
- for (var i = t || 0, s = n.length; i < s; i++) {
- e -= n[i].length + r;
- if (e < 0)return{row: i, column: e + n[i].length + r}
- }
- return{row: s - 1, column: n[s - 1].length}
- }, this.positionToIndex = function (e, t) {
- var n = this.$lines || this.getAllLines(), r = this.getNewLineCharacter().length, i = 0, s = Math.min(e.row, n.length);
- for (var o = t || 0; o < s; ++o)i += n[o].length;
- return i + r * o + e.column
- }
- }).call(u.prototype), t.Document = u
-}), define("ace/range", ["require", "exports", "module"], function (e, t, n) {
- var r = function (e, t, n, r) {
- this.start = {row: e, column: t}, this.end = {row: n, column: r}
- };
- (function () {
- this.isEqual = function (e) {
- return this.start.row == e.start.row && this.end.row == e.end.row && this.start.column == e.start.column && this.end.column == e.end.column
- }, this.toString = function () {
- return"Range: [" + this.start.row + "/" + this.start.column + "] -> [" + this.end.row + "/" + this.end.column + "]"
- }, this.contains = function (e, t) {
- return this.compare(e, t) == 0
- }, this.compareRange = function (e) {
- var t, n = e.end, r = e.start;
- return t = this.compare(n.row, n.column), t == 1 ? (t = this.compare(r.row, r.column), t == 1 ? 2 : t == 0 ? 1 : 0) : t == -1 ? -2 : (t = this.compare(r.row, r.column), t == -1 ? -1 : t == 1 ? 42 : 0)
- }, this.comparePoint = function (e) {
- return this.compare(e.row, e.column)
- }, this.containsRange = function (e) {
- return this.comparePoint(e.start) == 0 && this.comparePoint(e.end) == 0
- }, this.intersects = function (e) {
- var t = this.compareRange(e);
- return t == -1 || t == 0 || t == 1
- }, this.isEnd = function (e, t) {
- return this.end.row == e && this.end.column == t
- }, this.isStart = function (e, t) {
- return this.start.row == e && this.start.column == t
- }, this.setStart = function (e, t) {
- typeof e == "object" ? (this.start.column = e.column, this.start.row = e.row) : (this.start.row = e, this.start.column = t)
- }, this.setEnd = function (e, t) {
- typeof e == "object" ? (this.end.column = e.column, this.end.row = e.row) : (this.end.row = e, this.end.column = t)
- }, this.inside = function (e, t) {
- return this.compare(e, t) == 0 ? this.isEnd(e, t) || this.isStart(e, t) ? !1 : !0 : !1
- }, this.insideStart = function (e, t) {
- return this.compare(e, t) == 0 ? this.isEnd(e, t) ? !1 : !0 : !1
- }, this.insideEnd = function (e, t) {
- return this.compare(e, t) == 0 ? this.isStart(e, t) ? !1 : !0 : !1
- }, this.compare = function (e, t) {
- return!this.isMultiLine() && e === this.start.row ? t < this.start.column ? -1 : t > this.end.column ? 1 : 0 : e < this.start.row ? -1 : e > this.end.row ? 1 : this.start.row === e ? t >= this.start.column ? 0 : -1 : this.end.row === e ? t <= this.end.column ? 0 : 1 : 0
- }, this.compareStart = function (e, t) {
- return this.start.row == e && this.start.column == t ? -1 : this.compare(e, t)
- }, this.compareEnd = function (e, t) {
- return this.end.row == e && this.end.column == t ? 1 : this.compare(e, t)
- }, this.compareInside = function (e, t) {
- return this.end.row == e && this.end.column == t ? 1 : this.start.row == e && this.start.column == t ? -1 : this.compare(e, t)
- }, this.clipRows = function (e, t) {
- if (this.end.row > t)var n = {row: t + 1, column: 0};
- if (this.start.row > t)var i = {row: t + 1, column: 0};
- if (this.start.row < e)var i = {row: e, column: 0};
- if (this.end.row < e)var n = {row: e, column: 0};
- return r.fromPoints(i || this.start, n || this.end)
- }, this.extend = function (e, t) {
- var n = this.compare(e, t);
- if (n == 0)return this;
- if (n == -1)var i = {row: e, column: t}; else var s = {row: e, column: t};
- return r.fromPoints(i || this.start, s || this.end)
- }, this.isEmpty = function () {
- return this.start.row == this.end.row && this.start.column == this.end.column
- }, this.isMultiLine = function () {
- return this.start.row !== this.end.row
- }, this.clone = function () {
- return r.fromPoints(this.start, this.end)
- }, this.collapseRows = function () {
- return this.end.column == 0 ? new r(this.start.row, 0, Math.max(this.start.row, this.end.row - 1), 0) : new r(this.start.row, 0, this.end.row, 0)
- }, this.toScreenRange = function (e) {
- var t = e.documentToScreenPosition(this.start), n = e.documentToScreenPosition(this.end);
- return new r(t.row, t.column, n.row, n.column)
- }
- }).call(r.prototype), r.fromPoints = function (e, t) {
- return new r(e.row, e.column, t.row, t.column)
- }, t.Range = r
-}), define("ace/anchor", ["require", "exports", "module", "ace/lib/oop", "ace/lib/event_emitter"], function (e, t, n) {
- var r = e("./lib/oop"), i = e("./lib/event_emitter").EventEmitter, s = t.Anchor = function (e, t, n) {
- this.document = e, typeof n == "undefined" ? this.setPosition(t.row, t.column) : this.setPosition(t, n), this.$onChange = this.onChange.bind(this), e.on("change", this.$onChange)
- };
- (function () {
- r.implement(this, i), this.getPosition = function () {
- return this.$clipPositionToDocument(this.row, this.column)
- }, this.getDocument = function () {
- return this.document
- }, this.onChange = function (e) {
- var t = e.data, n = t.range;
- if (n.start.row == n.end.row && n.start.row != this.row)return;
- if (n.start.row > this.row)return;
- if (n.start.row == this.row && n.start.column > this.column)return;
- var r = this.row, i = this.column;
- t.action === "insertText" ? n.start.row === r && n.start.column <= i ? n.start.row === n.end.row ? i += n.end.column - n.start.column : (i -= n.start.column, r += n.end.row - n.start.row) : n.start.row !== n.end.row && n.start.row < r && (r += n.end.row - n.start.row) : t.action === "insertLines" ? n.start.row <= r && (r += n.end.row - n.start.row) : t.action == "removeText" ? n.start.row == r && n.start.column < i ? n.end.column >= i ? i = n.start.column : i = Math.max(0, i - (n.end.column - n.start.column)) : n.start.row !== n.end.row && n.start.row < r ? (n.end.row == r && (i = Math.max(0, i - n.end.column) + n.start.column), r -= n.end.row - n.start.row) : n.end.row == r && (r -= n.end.row - n.start.row, i = Math.max(0, i - n.end.column) + n.start.column) : t.action == "removeLines" && n.start.row <= r && (n.end.row <= r ? r -= n.end.row - n.start.row : (r = n.start.row, i = 0)), this.setPosition(r, i, !0)
- }, this.setPosition = function (e, t, n) {
- var r;
- n ? r = {row: e, column: t} : r = this.$clipPositionToDocument(e, t);
- if (this.row == r.row && this.column == r.column)return;
- var i = {row: this.row, column: this.column};
- this.row = r.row, this.column = r.column, this._emit("change", {old: i, value: r})
- }, this.detach = function () {
- this.document.removeEventListener("change", this.$onChange)
- }, this.$clipPositionToDocument = function (e, t) {
- var n = {};
- return e >= this.document.getLength() ? (n.row = Math.max(0, this.document.getLength() - 1), n.column = this.document.getLine(n.row).length) : e < 0 ? (n.row = 0, n.column = 0) : (n.row = e, n.column = Math.min(this.document.getLine(n.row).length, Math.max(0, t))), t < 0 && (n.column = 0), n
- }
- }).call(s.prototype)
-}), define("ace/lib/lang", ["require", "exports", "module"], function (e, t, n) {
- t.stringReverse = function (e) {
- return e.split("").reverse().join("")
- }, t.stringRepeat = function (e, t) {
- var n = "";
- while (t > 0) {
- t & 1 && (n += e);
- if (t >>= 1)e += e
- }
- return n
- };
- var r = /^\s\s*/, i = /\s\s*$/;
- t.stringTrimLeft = function (e) {
- return e.replace(r, "")
- }, t.stringTrimRight = function (e) {
- return e.replace(i, "")
- }, t.copyObject = function (e) {
- var t = {};
- for (var n in e)t[n] = e[n];
- return t
- }, t.copyArray = function (e) {
- var t = [];
- for (var n = 0, r = e.length; n < r; n++)e[n] && typeof e[n] == "object" ? t[n] = this.copyObject(e[n]) : t[n] = e[n];
- return t
- }, t.deepCopy = function (e) {
- if (typeof e != "object")return e;
- var t = e.constructor();
- for (var n in e)typeof e[n] == "object" ? t[n] = this.deepCopy(e[n]) : t[n] = e[n];
- return t
- }, t.arrayToMap = function (e) {
- var t = {};
- for (var n = 0; n < e.length; n++)t[e[n]] = 1;
- return t
- }, t.createMap = function (e) {
- var t = Object.create(null);
- for (var n in e)t[n] = e[n];
- return t
- }, t.arrayRemove = function (e, t) {
- for (var n = 0; n <= e.length; n++)t === e[n] && e.splice(n, 1)
- }, t.escapeRegExp = function (e) {
- return e.replace(/([.*+?^${}()|[\]\/\\])/g, "\\$1")
- }, t.escapeHTML = function (e) {
- return e.replace(/&/g, "&").replace(/"/g, """).replace(/'/g, "'").replace(/= "a" && e <= "zï¿¿" || e >= "A" && e <= "Zï¿¿"
- }
-
- function ct(e) {
- return e >= "0" && e <= "9"
- }
-
- function ht(e, t) {
- return e ? !e.identifier || e.value !== t ? !1 : !0 : !1
- }
-
- function pt(e, t) {
- return e.replace(/\{([^{}]*)\}/g, function (e, n) {
- var r = t[n];
- return typeof r == "string" || typeof r == "number" ? r : e
- })
- }
-
- function dt(e, t) {
- var n;
- for (n in t)ut(t, n) && !ut(r.blacklist, n) && (e[n] = t[n])
- }
-
- function vt() {
- Object.keys(r.blacklist).forEach(function (e) {
- delete O[e]
- })
- }
-
- function mt() {
- A.couch && dt(O, a), A.rhino && dt(O, H), A.prototypejs && dt(O, D), A.node && (dt(O, k), A.globalstrict = !0), A.devel && dt(O, l), A.dojo && dt(O, c), A.browser && dt(O, u), A.nonstandard && dt(O, I), A.jquery && dt(O, w), A.mootools && dt(O, N), A.worker && dt(O, J), A.wsh && dt(O, K), A.esnext && V(), A.globalstrict && A.strict !== !1 && (A.strict = !0), A.yui && dt(O, Q)
- }
-
- function gt(e, t, n) {
- var r = Math.floor(t / E.length * 100);
- throw{name: "JSHintError", line: t, character: n, message: e + " (" + r + "% scanned).", raw: e}
- }
-
- function yt(e, t, n, i) {
- return r.undefs.push([e, t, n, i])
- }
-
- function bt(e, t, n, i, s, o) {
- var u, a, f;
- return t = t || C, t.id === "(end)" && (t = z), a = t.line || 0, u = t.from || 0, f = {id: "(error)", raw: e, evidence: E[a - 1] || "", line: a, character: u, scope: r.scope, a: n, b: i, c: s, d: o}, f.reason = pt(e, f), r.errors.push(f), A.passfail && gt("Stopping. ", a, u), $ += 1, $ >= A.maxerr && gt("Too many errors.", a, u), f
- }
-
- function wt(e, t, n, r, i, s, o) {
- return bt(e, {line: t, from: n}, r, i, s, o)
- }
-
- function Et(e, t, n, r, i, s) {
- bt(e, t, n, r, i, s)
- }
-
- function St(e, t, n, r, i, s, o) {
- return Et(e, {line: t, from: n}, r, i, s, o)
- }
-
- function xt(e, t) {
- var n;
- return n = {id: "(internal)", elem: e, value: t}, r.internals.push(n), n
- }
-
- function Nt(e, t, n) {
- e === "hasOwnProperty" && bt("'hasOwnProperty' is a really bad name."), t === "exception" && ut(h["(context)"], e) && h[e] !== !0 && !A.node && bt("Value of '{a}' may be overwritten in IE.", C, e), ut(h, e) && !h["(global)"] && (h[e] === !0 ? A.latedef && bt("'{a}' was used before it was defined.", C, e) : !A.shadow && t !== "exception" && bt("'{a}' is already defined.", C, e)), h[e] = t, n && (h["(tokens)"][e] = n), h["(global)"] ? (v[e] = h, ut(m, e) && (A.latedef && bt("'{a}' was used before it was defined.", C, e), delete m[e])) : B[e] = h
- }
-
- function Ct() {
- var e = C, t = e.value, i = A.quotmark, u = {}, a, l, c, p, d, v, m;
- switch (t) {
- case"*/":
- Et("Unbegun comment.");
- break;
- case"/*members":
- case"/*member":
- t = "/*members", T || (T = {}), l = T, A.quotmark = !1;
- break;
- case"/*jshint":
- case"/*jslint":
- l = A, c = n;
- break;
- case"/*global":
- l = u;
- break;
- default:
- Et("What?")
- }
- p = Tt.token();
- e:for (; ;) {
- m = !1;
- for (; ;) {
- if (p.type === "special" && p.value === "*/")break e;
- if (p.id !== "(endline)" && p.id !== ",")break;
- p = Tt.token()
- }
- t === "/*global" && p.value === "-" && (m = !0, p = Tt.token()), p.type !== "(string)" && p.type !== "(identifier)" && t !== "/*members" && Et("Bad option.", p), v = Tt.token();
- if (v.id === ":") {
- v = Tt.token(), l === T && Et("Expected '{a}' and instead saw '{b}'.", p, "*/", ":"), t === "/*jshint" && at(p.value, p);
- var g = ["maxstatements", "maxparams", "maxdepth", "maxcomplexity", "maxerr", "maxlen", "indent"];
- if (g.indexOf(p.value) > -1 && (t === "/*jshint" || t === "/*jslint"))a = +v.value, (typeof a != "number" || !isFinite(a) || a <= 0 || Math.floor(a) !== a) && Et("Expected a small integer and instead saw '{a}'.", v, v.value), p.value === "indent" && (l.white = !0), l[p.value] = a; else if (p.value === "validthis")h["(global)"] ? Et("Option 'validthis' can't be used in a global scope.") : v.value === "true" || v.value === "false" ? l[p.value] = v.value === "true" : Et("Bad option value.", v); else if (p.value === "quotmark" && t === "/*jshint")switch (v.value) {
- case"true":
- l.quotmark = !0;
- break;
- case"false":
- l.quotmark = !1;
- break;
- case"double":
- case"single":
- l.quotmark = v.value;
- break;
- default:
- Et("Bad option value.", v)
- } else v.value === "true" || v.value === "false" ? (t === "/*jslint" ? (d = o[p.value] || p.value, l[d] = v.value === "true", s[d] !== undefined && (l[d] = !l[d])) : l[p.value] = v.value === "true", p.value === "newcap" && (l["(explicitNewcap)"] = !0)) : Et("Bad option value.", v);
- p = Tt.token()
- } else(t === "/*jshint" || t === "/*jslint") && Et("Missing option value.", p), l[p.value] = !1, t === "/*global" && m === !0 && (r.blacklist[p.value] = p.value, vt()), p = v
- }
- t === "/*members" && (A.quotmark = i), dt(O, u);
- for (var y in u)ut(u, y) && (f[y] = e);
- c && mt()
- }
-
- function kt(e) {
- var t = e || 0, n = 0, r;
- while (n <= t)r = S[n], r || (r = S[n] = Tt.token()), n += 1;
- return r
- }
-
- function Lt(t, n) {
- switch (z.id) {
- case"(number)":
- C.id === "." && bt("A dot following a number can be confused with a decimal point.", z);
- break;
- case"-":
- (C.id === "-" || C.id === "--") && bt("Confusing minusses.");
- break;
- case"+":
- (C.id === "+" || C.id === "++") && bt("Confusing plusses.")
- }
- if (z.type === "(string)" || z.identifier)e = z.value;
- t && C.id !== t && (n ? C.id === "(end)" ? bt("Unmatched '{a}'.", n, n.id) : bt("Expected '{a}' to match '{b}' from line {c} and instead saw '{d}'.", C, t, n.id, n.line, C.value) : (C.type !== "(identifier)" || C.value !== t) && bt("Expected '{a}' and instead saw '{b}'.", C, t, C.value)), _ = z, z = C;
- for (; ;) {
- C = S.shift() || Tt.token();
- if (C.id === "(end)" || C.id === "(error)")return;
- if (C.type === "special")Ct(); else if (C.id !== "(endline)")break
- }
- }
-
- function At(t, n) {
- var r, i = !1, s = !1;
- C.id === "(end)" && Et("Unexpected early end of program.", z), Lt(), n && (e = "anonymous", h["(verb)"] = z.value);
- if (n === !0 && z.fud)r = z.fud(); else {
- if (z.nud)r = z.nud(); else {
- if (C.type === "(number)" && z.id === ".")return bt("A leading decimal point can be confused with a dot: '.{a}'.", z, C.value), Lt(), z;
- Et("Expected an identifier and instead saw '{a}'.", z, z.id)
- }
- while (t < C.lbp)i = z.value === "Array", s = z.value === "Object", r && (r.value || r.first && r.first.value) && (r.value !== "new" || r.first && r.first.value && r.first.value === ".") && (i = !1, r.value !== z.value && (s = !1)), Lt(), i && z.id === "(" && C.id === ")" && bt("Use the array literal notation [].", z), s && z.id === "(" && C.id === ")" && bt("Use the object literal notation {}.", z), z.led ? r = z.led(r) : Et("Expected an operator and instead saw '{a}'.", z, z.id)
- }
- return r
- }
-
- function Ot(e, t) {
- e = e || z, t = t || C, A.white && e.character !== t.from && e.line === t.line && (e.from += e.character - e.from, bt("Unexpected space after '{a}'.", e, e.value))
- }
-
- function Mt(e, t) {
- e = e || z, t = t || C, A.white && (e.character !== t.from || e.line !== t.line) && bt("Unexpected space before '{a}'.", t, t.value)
- }
-
- function _t(e, t) {
- e = e || z, t = t || C, A.white && !e.comment && e.line === t.line && Ot(e, t)
- }
-
- function Dt(e, t) {
- if (A.white) {
- e = e || z, t = t || C;
- if (e.value === ";" && t.value === ";")return;
- e.line === t.line && e.character === t.from && (e.from += e.character - e.from, bt("Missing space after '{a}'.", e, e.value))
- }
- }
-
- function Pt(e, t) {
- e = e || z, t = t || C, !A.laxbreak && e.line !== t.line ? bt("Bad line breaking before '{a}'.", t, t.id) : A.white && (e = e || z, t = t || C, e.character === t.from && (e.from += e.character - e.from, bt("Missing space after '{a}'.", e, e.value)))
- }
-
- function Ht(e) {
- var t;
- A.white && C.id !== "(end)" && (t = y + (e || 0), C.from !== t && bt("Expected '{a}' to have an indentation at {b} instead at {c}.", C, C.value, t, C.from))
- }
-
- function Bt(e) {
- e = e || z, e.line !== C.line && bt("Line breaking error '{a}'.", e, e.value)
- }
-
- function jt() {
- z.line !== C.line ? A.laxcomma || (jt.first && (bt("Comma warnings can be turned off with 'laxcomma'"), jt.first = !1), bt("Bad line breaking before '{a}'.", z, C.id)) : !z.comment && z.character !== C.from && A.white && (z.from += z.character - z.from, bt("Unexpected space after '{a}'.", z, z.value)), Lt(","), Dt(z, C)
- }
-
- function Ft(e, t) {
- var n = R[e];
- if (!n || typeof n != "object")R[e] = n = {id: e, lbp: t, value: e};
- return n
- }
-
- function It(e) {
- return Ft(e, 0)
- }
-
- function qt(e, t) {
- var n = It(e);
- return n.identifier = n.reserved = !0, n.fud = t, n
- }
-
- function Rt(e, t) {
- var n = qt(e, t);
- return n.block = !0, n
- }
-
- function Ut(e) {
- var t = e.id.charAt(0);
- if (t >= "a" && t <= "z" || t >= "A" && t <= "Z")e.identifier = e.reserved = !0;
- return e
- }
-
- function zt(e, t) {
- var n = Ft(e, 150);
- return Ut(n), n.nud = typeof t == "function" ? t : function () {
- this.right = At(150), this.arity = "unary";
- if (this.id === "++" || this.id === "--")A.plusplus ? bt("Unexpected use of '{a}'.", this, this.id) : (!this.right.identifier || this.right.reserved) && this.right.id !== "." && this.right.id !== "[" && bt("Bad operand.", this);
- return this
- }, n
- }
-
- function Wt(e, t) {
- var n = It(e);
- return n.type = e, n.nud = t, n
- }
-
- function Xt(e, t) {
- var n = Wt(e, t);
- return n.identifier = n.reserved = !0, n
- }
-
- function Vt(e, t) {
- return Xt(e, function () {
- return typeof t == "function" && t(this), this
- })
- }
-
- function $t(e, t, n, r) {
- var i = Ft(e, n);
- return Ut(i), i.led = function (i) {
- return r || (Pt(_, z), Dt(z, C)), e === "in" && i.id === "!" && bt("Confusing use of '{a}'.", i, "!"), typeof t == "function" ? t(i, this) : (this.left = i, this.right = At(n), this)
- }, i
- }
-
- function Jt(e, t) {
- var n = Ft(e, 100);
- return n.led = function (e) {
- Pt(_, z), Dt(z, C);
- var n = At(100);
- return ht(e, "NaN") || ht(n, "NaN") ? bt("Use the isNaN function to compare with NaN.", this) : t && t.apply(this, [e, n]), e.id === "!" && bt("Confusing use of '{a}'.", e, "!"), n.id === "!" && bt("Confusing use of '{a}'.", n, "!"), this.left = e, this.right = n, this
- }, n
- }
-
- function Kt(e) {
- return e && (e.type === "(number)" && +e.value === 0 || e.type === "(string)" && e.value === "" || e.type === "null" && !A.eqnull || e.type === "true" || e.type === "false" || e.type === "undefined")
- }
-
- function Qt(e) {
- return Ft(e, 20).exps = !0, $t(e, function (e, t) {
- t.left = e, O[e.value] === !1 && B[e.value]["(global)"] === !0 ? bt("Read only.", e) : e["function"] && bt("'{a}' is a function.", e, e.value);
- if (e) {
- A.esnext && h[e.value] === "const" && bt("Attempting to override '{a}' which is a constant", e, e.value);
- if (e.id === "." || e.id === "[")return(!e.left || e.left.value === "arguments") && bt("Bad assignment.", t), t.right = At(19), t;
- if (e.identifier && !e.reserved)return h[e.value] === "exception" && bt("Do not assign to the exception parameter.", e), t.right = At(19), t;
- e === R["function"] && bt("Expected an identifier in an assignment and instead saw a function invocation.", z)
- }
- Et("Bad assignment.", t)
- }, 20)
- }
-
- function Gt(e, t, n) {
- var r = Ft(e, n);
- return Ut(r), r.led = typeof t == "function" ? t : function (e) {
- return A.bitwise && bt("Unexpected use of '{a}'.", this, this.id), this.left = e, this.right = At(n), this
- }, r
- }
-
- function Yt(e) {
- return Ft(e, 20).exps = !0, $t(e, function (e, t) {
- A.bitwise && bt("Unexpected use of '{a}'.", t, t.id), Dt(_, z), Dt(z, C);
- if (e)return e.id === "." || e.id === "[" || e.identifier && !e.reserved ? (At(19), t) : (e === R["function"] && bt("Expected an identifier in an assignment, and instead saw a function invocation.", z), t);
- Et("Bad assignment.", t)
- }, 20)
- }
-
- function Zt(e) {
- var t = Ft(e, 150);
- return t.led = function (e) {
- return A.plusplus ? bt("Unexpected use of '{a}'.", this, this.id) : (!e.identifier || e.reserved) && e.id !== "." && e.id !== "[" && bt("Bad operand.", this), this.left = e, this
- }, t
- }
-
- function en(e) {
- if (C.identifier)return Lt(), z.reserved && !A.es5 && (!e || z.value !== "undefined") && bt("Expected an identifier and instead saw '{a}' (a reserved word).", z, z.id), z.value
- }
-
- function tn(e) {
- var t = en(e);
- if (t)return t;
- z.id === "function" && C.id === "(" ? bt("Missing name in function declaration.") : Et("Expected an identifier and instead saw '{a}'.", C, C.value)
- }
-
- function nn(e) {
- var t = 0, n;
- if (C.id !== ";" || L)return;
- for (; ;) {
- n = kt(t);
- if (n.reach)return;
- if (n.id !== "(endline)") {
- if (n.id === "function") {
- if (!A.latedef)break;
- bt("Inner functions should be listed at the top of the outer function.", n);
- break
- }
- bt("Unreachable '{a}' after '{b}'.", n, n.value, e);
- break
- }
- t += 1
- }
- }
-
- function rn(e) {
- var t = y, n, r = B, i = C;
- if (i.id === ";") {
- Lt(";");
- return
- }
- i.identifier && !i.reserved && kt().id === ":" && (Lt(), Lt(":"), B = Object.create(r), Nt(i.value, "label"), !C.labelled && C.value !== "{" && bt("Label '{a}' on {b} statement.", C, i.value, C.value), it.test(i.value + ":") && bt("Label '{a}' looks like a javascript url.", i, i.value), C.label = i.value, i = C);
- if (i.id === "{") {
- un(!0, !0);
- return
- }
- e || Ht(), n = At(0, !0);
- if (!i.block) {
- !A.expr && (!n || !n.exps) ? bt("Expected an assignment or function call and instead saw an expression.", z) : A.nonew && n.id === "(" && n.left.id === "new" && bt("Do not use 'new' for side effects.", i);
- if (C.id === ",")return jt();
- C.id !== ";" ? A.asi || (!A.lastsemic || C.id !== "}" || C.line !== z.line) && wt("Missing semicolon.", z.line, z.character) : (Ot(z, C), Lt(";"), Dt(z, C))
- }
- return y = t, B = r, n
- }
-
- function sn(e) {
- var t = [], n;
- while (!C.reach && C.id !== "(end)")C.id === ";" ? (n = kt(), (!n || n.id !== "(") && bt("Unnecessary semicolon."), Lt(";")) : t.push(rn(e === C.line));
- return t
- }
-
- function on() {
- var e, t, n;
- for (; ;) {
- if (C.id === "(string)") {
- t = kt(0);
- if (t.id === "(endline)") {
- e = 1;
- do n = kt(e), e += 1; while (n.id === "(endline)");
- if (n.id !== ";") {
- if (n.id !== "(string)" && n.id !== "(number)" && n.id !== "(regexp)" && n.identifier !== !0 && n.id !== "}")break;
- bt("Missing semicolon.", C)
- } else t = n
- } else if (t.id === "}")bt("Missing semicolon.", t); else if (t.id !== ";")break;
- Ht(), Lt(), q[z.value] && bt('Unnecessary directive "{a}".', z, z.value), z.value === "use strict" && (A["(explicitNewcap)"] || (A.newcap = !0), A.undef = !0), q[z.value] = !0, t.id === ";" && Lt(";");
- continue
- }
- break
- }
- }
-
- function un(e, t, n) {
- var r, i = g, s = y, o, u = B, a, f, l;
- g = e;
- if (!e || !A.funcscope)B = Object.create(B);
- Dt(z, C), a = C;
- var c = h["(metrics)"];
- c.nestedBlockDepth += 1, c.verifyMaxNestedBlockDepthPerFunction();
- if (C.id === "{") {
- Lt("{"), f = z.line;
- if (C.id !== "}") {
- y += A.indent;
- while (!e && C.from > y)y += A.indent;
- if (n) {
- o = {};
- for (l in q)ut(q, l) && (o[l] = q[l]);
- on(), A.strict && h["(context)"]["(global)"] && !o["use strict"] && !q["use strict"] && bt('Missing "use strict" statement.')
- }
- r = sn(f), c.statementCount += r.length, n && (q = o), y -= A.indent, f !== C.line && Ht()
- } else f !== C.line && Ht();
- Lt("}", a), y = s
- } else e ? ((!t || A.curly) && bt("Expected '{a}' and instead saw '{b}'.", C, "{", C.value), L = !0, y += A.indent, r = [rn(C.line === z.line)], y -= A.indent, L = !1) : Et("Expected '{a}' and instead saw '{b}'.", C, "{", C.value);
- h["(verb)"] = null;
- if (!e || !A.funcscope)B = u;
- return g = i, e && A.noempty && (!r || r.length === 0) && bt("Empty block."), c.nestedBlockDepth -= 1, r
- }
-
- function an(e) {
- T && typeof T[e] != "boolean" && bt("Unexpected /*member '{a}'.", z, e), typeof x[e] == "number" ? x[e] += 1 : x[e] = 1
- }
-
- function fn(e) {
- var t = e.value, n = e.line, r = m[t];
- typeof r == "function" && (r = !1), r ? r[r.length - 1] !== n && r.push(n) : (r = [n], m[t] = r)
- }
-
- function ln() {
- var e = en(!0);
- return e || (C.id === "(string)" ? (e = C.value, Lt()) : C.id === "(number)" && (e = C.value.toString(), Lt())), e
- }
-
- function cn() {
- var e = C, t = [], n;
- Lt("("), _t();
- if (C.id === ")") {
- Lt(")");
- return
- }
- for (; ;) {
- n = tn(!0), t.push(n), Nt(n, "unused", z);
- if (C.id !== ",")return Lt(")", e), _t(_, z), t;
- jt()
- }
- }
-
- function hn(t, n) {
- var r, i = A, s = B;
- return A = Object.create(A), B = Object.create(B), h = {"(name)": t || '"' + e + '"', "(line)": C.line, "(character)": C.character, "(context)": h, "(breakage)": 0, "(loopage)": 0, "(metrics)": pn(C), "(scope)": B, "(statement)": n, "(tokens)": {}}, r = h, z.funct = h, d.push(h), t && Nt(t, "function"), h["(params)"] = cn(), h["(metrics)"].verifyMaxParametersPerFunction(h["(params)"]), un(!1, !1, !0), h["(metrics)"].verifyMaxStatementsPerFunction(), h["(metrics)"].verifyMaxComplexityPerFunction(), B = s, A = i, h["(last)"] = z.line, h["(lastcharacter)"] = z.character, h = h["(context)"], r
- }
-
- function pn(e) {
- return{statementCount: 0, nestedBlockDepth: -1, ComplexityCount: 1, verifyMaxStatementsPerFunction: function () {
- if (A.maxstatements && this.statementCount > A.maxstatements) {
- var t = "Too many statements per function (" + this.statementCount + ").";
- bt(t, e)
- }
- }, verifyMaxParametersPerFunction: function (t) {
- t = t || [];
- if (A.maxparams && t.length > A.maxparams) {
- var n = "Too many parameters per function (" + t.length + ").";
- bt(n, e)
- }
- }, verifyMaxNestedBlockDepthPerFunction: function () {
- if (A.maxdepth && this.nestedBlockDepth > 0 && this.nestedBlockDepth === A.maxdepth + 1) {
- var e = "Blocks are nested too deeply (" + this.nestedBlockDepth + ").";
- bt(e)
- }
- }, verifyMaxComplexityPerFunction: function () {
- var t = A.maxcomplexity, n = this.ComplexityCount;
- if (t && n > t) {
- var r = "Cyclomatic complexity is too high per function (" + n + ").";
- bt(r, e)
- }
- }}
- }
-
- function dn() {
- h["(metrics)"].ComplexityCount += 1
- }
-
- function mn() {
- function e() {
- var e = {}, t = C;
- Lt("{");
- if (C.id !== "}")for (; ;) {
- if (C.id === "(end)")Et("Missing '}' to match '{' from line {a}.", C, t.line); else {
- if (C.id === "}") {
- bt("Unexpected comma.", z);
- break
- }
- C.id === "," ? Et("Unexpected comma.", C) : C.id !== "(string)" && bt("Expected a string and instead saw {a}.", C, C.value)
- }
- e[C.value] === !0 ? bt("Duplicate key '{a}'.", C, C.value) : C.value === "__proto__" && !A.proto || C.value === "__iterator__" && !A.iterator ? bt("The '{a}' key may produce unexpected results.", C, C.value) : e[C.value] = !0, Lt(), Lt(":"), mn();
- if (C.id !== ",")break;
- Lt(",")
- }
- Lt("}")
- }
-
- function t() {
- var e = C;
- Lt("[");
- if (C.id !== "]")for (; ;) {
- if (C.id === "(end)")Et("Missing ']' to match '[' from line {a}.", C, e.line); else {
- if (C.id === "]") {
- bt("Unexpected comma.", z);
- break
- }
- C.id === "," && Et("Unexpected comma.", C)
- }
- mn();
- if (C.id !== ",")break;
- Lt(",")
- }
- Lt("]")
- }
-
- switch (C.id) {
- case"{":
- e();
- break;
- case"[":
- t();
- break;
- case"true":
- case"false":
- case"null":
- case"(number)":
- case"(string)":
- Lt();
- break;
- case"-":
- Lt("-"), z.character !== C.from && bt("Unexpected space after '-'.", z), Ot(z, C), Lt("(number)");
- break;
- default:
- Et("Expected a JSON value.", C)
- }
- }
-
- var e, t = {"<": !0, "<=": !0, "==": !0, "===": !0, "!==": !0, "!=": !0, ">": !0, ">=": !0, "+": !0, "-": !0, "*": !0, "/": !0, "%": !0}, n = {asi: !0, bitwise: !0, boss: !0, browser: !0, camelcase: !0, couch: !0, curly: !0, debug: !0, devel: !0, dojo: !0, eqeqeq: !0, eqnull: !0, es5: !0, esnext: !0, evil: !0, expr: !0, forin: !0, funcscope: !0, globalstrict: !0, immed: !0, iterator: !0, jquery: !0, lastsemic: !0, latedef: !0, laxbreak: !0, laxcomma: !0, loopfunc: !0, mootools: !0, multistr: !0, newcap: !0, noarg: !0, node: !0, noempty: !0, nonew: !0, nonstandard: !0, nomen: !0, onevar: !0, onecase: !0, passfail: !0, plusplus: !0, proto: !0, prototypejs: !0, regexdash: !0, regexp: !0, rhino: !0, undef: !0, unused: !0, scripturl: !0, shadow: !0, smarttabs: !0, strict: !0, sub: !0, supernew: !0, trailing: !0, validthis: !0, withstmt: !0, white: !0, worker: !0, wsh: !0, yui: !0}, i = {maxlen: !1, indent: !1, maxerr: !1, predef: !1, quotmark: !1, scope: !1, maxstatements: !1, maxdepth: !1, maxparams: !1, maxcomplexity: !1}, s = {bitwise: !0, forin: !0, newcap: !0, nomen: !0, plusplus: !0, regexp: !0, undef: !0, white: !0, eqeqeq: !0, onevar: !0}, o = {eqeq: "eqeqeq", vars: "onevar", windows: "wsh"}, u = {ArrayBuffer: !1, ArrayBufferView: !1, Audio: !1, Blob: !1, addEventListener: !1, applicationCache: !1, atob: !1, blur: !1, btoa: !1, clearInterval: !1, clearTimeout: !1, close: !1, closed: !1, DataView: !1, DOMParser: !1, defaultStatus: !1, document: !1, event: !1, FileReader: !1, Float32Array: !1, Float64Array: !1, FormData: !1, focus: !1, frames: !1, getComputedStyle: !1, HTMLElement: !1, HTMLAnchorElement: !1, HTMLBaseElement: !1, HTMLBlockquoteElement: !1, HTMLBodyElement: !1, HTMLBRElement: !1, HTMLButtonElement: !1, HTMLCanvasElement: !1, HTMLDirectoryElement: !1, HTMLDivElement: !1, HTMLDListElement: !1, HTMLFieldSetElement: !1, HTMLFontElement: !1, HTMLFormElement: !1, HTMLFrameElement: !1, HTMLFrameSetElement: !1, HTMLHeadElement: !1, HTMLHeadingElement: !1, HTMLHRElement: !1, HTMLHtmlElement: !1, HTMLIFrameElement: !1, HTMLImageElement: !1, HTMLInputElement: !1, HTMLIsIndexElement: !1, HTMLLabelElement: !1, HTMLLayerElement: !1, HTMLLegendElement: !1, HTMLLIElement: !1, HTMLLinkElement: !1, HTMLMapElement: !1, HTMLMenuElement: !1, HTMLMetaElement: !1, HTMLModElement: !1, HTMLObjectElement: !1, HTMLOListElement: !1, HTMLOptGroupElement: !1, HTMLOptionElement: !1, HTMLParagraphElement: !1, HTMLParamElement: !1, HTMLPreElement: !1, HTMLQuoteElement: !1, HTMLScriptElement: !1, HTMLSelectElement: !1, HTMLStyleElement: !1, HTMLTableCaptionElement: !1, HTMLTableCellElement: !1, HTMLTableColElement: !1, HTMLTableElement: !1, HTMLTableRowElement: !1, HTMLTableSectionElement: !1, HTMLTextAreaElement: !1, HTMLTitleElement: !1, HTMLUListElement: !1, HTMLVideoElement: !1, history: !1, Int16Array: !1, Int32Array: !1, Int8Array: !1, Image: !1, length: !1, localStorage: !1, location: !1, MessageChannel: !1, MessageEvent: !1, MessagePort: !1, moveBy: !1, moveTo: !1, MutationObserver: !1, name: !1, Node: !1, NodeFilter: !1, navigator: !1, onbeforeunload: !0, onblur: !0, onerror: !0, onfocus: !0, onload: !0, onresize: !0, onunload: !0, open: !1, openDatabase: !1, opener: !1, Option: !1, parent: !1, print: !1, removeEventListener: !1, resizeBy: !1, resizeTo: !1, screen: !1, scroll: !1, scrollBy: !1, scrollTo: !1, sessionStorage: !1, setInterval: !1, setTimeout: !1, SharedWorker: !1, status: !1, top: !1, Uint16Array: !1, Uint32Array: !1, Uint8Array: !1, WebSocket: !1, window: !1, Worker: !1, XMLHttpRequest: !1, XMLSerializer: !1, XPathEvaluator: !1, XPathException: !1, XPathExpression: !1, XPathNamespace: !1, XPathNSResolver: !1, XPathResult: !1}, a = {require: !1, respond: !1, getRow: !1, emit: !1, send: !1, start: !1, sum: !1, log: !1, exports: !1, module: !1, provides: !1}, f, l = {alert: !1, confirm: !1, console: !1, Debug: !1, opera: !1, prompt: !1}, c = {dojo: !1, dijit: !1, dojox: !1, define: !1, require: !1}, h, p = ["closure", "exception", "global", "label", "outer", "unused", "var"], d, v, m, g, y, b, w = {$: !1, jQuery: !1}, E, S, x, T, N = {$: !1, $$: !1, Asset: !1, Browser: !1, Chain: !1, Class: !1, Color: !1, Cookie: !1, Core: !1, Document: !1, DomReady: !1, DOMEvent: !1, DOMReady: !1, Drag: !1, Element: !1, Elements: !1, Event: !1, Events: !1, Fx: !1, Group: !1, Hash: !1, HtmlTable: !1, Iframe: !1, IframeShim: !1, InputValidator: !1, instanceOf: !1, Keyboard: !1, Locale: !1, Mask: !1, MooTools: !1, Native: !1, Options: !1, OverText: !1, Request: !1, Scroller: !1, Slick: !1, Slider: !1, Sortables: !1, Spinner: !1, Swiff: !1, Tips: !1, Type: !1, typeOf: !1, URI: !1, Window: !1}, C, k = {__filename: !1, __dirname: !1, Buffer: !1, console: !1, exports: !0, GLOBAL: !1, global: !1, module: !1, process: !1, require: !1, setTimeout: !1, clearTimeout: !1, setInterval: !1, clearInterval: !1}, L, A, O, M, _, D = {$: !1, $$: !1, $A: !1, $F: !1, $H: !1, $R: !1, $break: !1, $continue: !1, $w: !1, Abstract: !1, Ajax: !1, Class: !1, Enumerable: !1, Element: !1, Event: !1, Field: !1, Form: !1, Hash: !1, Insertion: !1, ObjectRange: !1, PeriodicalExecuter: !1, Position: !1, Prototype: !1, Selector: !1, Template: !1, Toggle: !1, Try: !1, Autocompleter: !1, Builder: !1, Control: !1, Draggable: !1, Draggables: !1, Droppables: !1, Effect: !1, Sortable: !1, SortableObserver: !1, Sound: !1, Scriptaculous: !1}, P, H = {defineClass: !1, deserialize: !1, gc: !1, help: !1, importPackage: !1, java: !1, load: !1, loadClass: !1, print: !1, quit: !1, readFile: !1, readUrl: !1, runCommand: !1, seal: !1, serialize: !1, spawn: !1, sync: !1, toint32: !1, version: !1}, B, j, F = {Array: !1, Boolean: !1, Date: !1, decodeURI: !1, decodeURIComponent: !1, encodeURI: !1, encodeURIComponent: !1, Error: !1, eval: !1, EvalError: !1, Function: !1, hasOwnProperty: !1, isFinite: !1, isNaN: !1, JSON: !1, Map: !1, Math: !1, NaN: !1, Number: !1, Object: !1, parseInt: !1, parseFloat: !1, RangeError: !1, ReferenceError: !1, RegExp: !1, Set: !1, String: !1, SyntaxError: !1, TypeError: !1, URIError: !1, WeakMap: !1}, I = {escape: !1, unescape: !1}, q, R = {}, U, z, W, X, V, $, J = {importScripts: !0, postMessage: !0, self: !0}, K = {ActiveXObject: !0, Enumerator: !0, GetObject: !0, ScriptEngine: !0, ScriptEngineBuildVersion: !0, ScriptEngineMajorVersion: !0, ScriptEngineMinorVersion: !0, VBArray: !0, WSH: !0, WScript: !0, XDomainRequest: !0}, Q = {YUI: !1, Y: !1, YUI_config: !1}, G, Y, Z, et, tt, nt, rt, it, st;
- (function () {
- G = /@cc|<\/?|script|\]\s*\]|<\s*!|</i, Y = /[\u0000-\u001f\u007f-\u009f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/, Z = /^\s*([(){}\[.,:;'"~\?\]#@]|==?=?|\/=(?!(\S*\/[gim]?))|\/(\*(jshint|jslint|members?|global)?|\/)?|\*[\/=]?|\+(?:=|\++)?|-(?:=|-+)?|%=?|&[&=]?|\|[|=]?|>>?>?=?|<([\/=!]|\!(\[|--)?|<=?)?|\^=?|\!=?=?|[a-zA-Z_$][a-zA-Z0-9_$]*|[0-9]+([xX][0-9a-fA-F]+|\.[0-9]*)?([eE][+\-]?[0-9]+)?)/, et = /[\u0000-\u001f&<"\/\\\u007f-\u009f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/, tt = /[\u0000-\u001f&<"\/\\\u007f-\u009f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g, nt = /\*\//, rt = /^([a-zA-Z_$][a-zA-Z0-9_$]*)$/, it = /^(?:javascript|jscript|ecmascript|vbscript|mocha|livescript)\s*:/i, st = /^\s*\/\*\s*falls\sthrough\s*\*\/\s*$/
- })(), typeof Array.isArray != "function" && (Array.isArray = function (e) {
- return Object.prototype.toString.apply(e) === "[object Array]"
- }), Array.prototype.forEach || (Array.prototype.forEach = function (e, t) {
- var n = this.length;
- for (var r = 0; r < n; r++)e.call(t || this, this[r], r, this)
- }), Array.prototype.indexOf || (Array.prototype.indexOf = function (e) {
- if (this === null || this === undefined)throw new TypeError;
- var t = new Object(this), n = t.length >>> 0;
- if (n === 0)return-1;
- var r = 0;
- arguments.length > 0 && (r = Number(arguments[1]), r != r ? r = 0 : r !== 0 && r != Infinity && r != -Infinity && (r = (r > 0 || -1) * Math.floor(Math.abs(r))));
- if (r >= n)return-1;
- var i = r >= 0 ? r : Math.max(n - Math.abs(r), 0);
- for (; i < n; i++)if (i in t && t[i] === e)return i;
- return-1
- }), typeof Object.create != "function" && (Object.create = function (e) {
- return ot.prototype = e, new ot
- }), typeof Object.keys != "function" && (Object.keys = function (e) {
- var t = [], n;
- for (n in e)ut(e, n) && t.push(n);
- return t
- });
- var Tt = function () {
- function s() {
- var e, n, s;
- return r >= E.length ? !1 : (t = 1, i = E[r], r += 1, A.smarttabs ? (n = i.match(/(\/\/)? \t/), e = n && !n[1] ? 0 : -1) : e = i.search(/ \t|\t [^\*]/), e >= 0 && wt("Mixed spaces and tabs.", r, e + 1), i = i.replace(/\t/g, U), e = i.search(Y), e >= 0 && wt("Unsafe character.", r, e), A.maxlen && A.maxlen < i.length && wt("Line too long.", r, i.length), s = A.trailing && i.match(/^(.*?)\s+$/), s && !/^\s+$/.test(i) && wt("Trailing whitespace.", r, s[1].length + 1), !0)
- }
-
- function o(e, i) {
- function u(e) {
- if (!A.proto && e === "__proto__") {
- wt("The '{a}' property is deprecated.", r, n, e);
- return
- }
- if (!A.iterator && e === "__iterator__") {
- wt("'{a}' is only available in JavaScript 1.7.", r, n, e);
- return
- }
- var t = /^(_+.*|.*_+)$/.test(e);
- if (A.nomen && t && e !== "_") {
- if (A.node && z.id !== "." && /^(__dirname|__filename)$/.test(e))return;
- wt("Unexpected {a} in '{b}'.", r, n, "dangling '_'", e);
- return
- }
- A.camelcase && e.replace(/^_+/, "").indexOf("_") > -1 && !e.match(/^[A-Z0-9_]*$/) && wt("Identifier '{a}' is not in camel case.", r, n, i)
- }
-
- var s, o;
- return e === "(color)" || e === "(range)" ? o = {type: e} : e === "(punctuator)" || e === "(identifier)" && ut(R, i) ? o = R[i] || R["(error)"] : o = R[e], o = Object.create(o), (e === "(string)" || e === "(range)") && !A.scripturl && it.test(i) && wt("Script URL.", r, n), e === "(identifier)" && (o.identifier = !0, u(i)), o.value = i, o.line = r, o.character = t, o.from = n, s = o.id, s !== "(endline)" && (M = s && ("(,=:[!&|?{};".indexOf(s.charAt(s.length - 1)) >= 0 || s === "return" || s === "case")), o
- }
-
- var t, n, r, i;
- return{init: function (e) {
- typeof e == "string" ? E = e.replace(/\r\n/g, "\n").replace(/\r/g, "\n").split("\n") : E = e, E[0] && E[0].substr(0, 2) === "#!" && (E[0] = ""), r = 0, s(), n = 1
- }, range: function (e, s) {
- var u, a = "";
- n = t, i.charAt(0) !== e && St("Expected '{a}' and instead saw '{b}'.", r, t, e, i.charAt(0));
- for (; ;) {
- i = i.slice(1), t += 1, u = i.charAt(0);
- switch (u) {
- case"":
- St("Missing '{a}'.", r, t, u);
- break;
- case s:
- return i = i.slice(1), t += 1, o("(range)", a);
- case"\\":
- wt("Unexpected '{a}'.", r, t, u)
- }
- a += u
- }
- }, token: function () {
- function E(e) {
- var r = e.exec(i), s;
- if (r)return p = r[0].length, s = r[1], u = s.charAt(0), i = i.substr(p), n = t + p - s.length, t += p, s
- }
-
- function S(e) {
- function c(e) {
- var n = parseInt(i.substr(a + 1, e), 16);
- a += e, n >= 32 && n <= 126 && n !== 34 && n !== 92 && n !== 39 && wt("Unnecessary escapement.", r, t), t += e, u = String.fromCharCode(n)
- }
-
- var u, a, f = "", l = !1;
- b && e !== '"' && wt("Strings must use doublequote.", r, t), A.quotmark && (A.quotmark === "single" && e !== "'" ? wt("Strings must use singlequote.", r, t) : A.quotmark === "double" && e !== '"' ? wt("Strings must use doublequote.", r, t) : A.quotmark === !0 && (P = P || e, P !== e && wt("Mixed double and single quotes.", r, t))), a = 0;
- e:for (; ;) {
- while (a >= i.length) {
- a = 0;
- var h = r, p = n;
- if (!s()) {
- St("Unclosed string.", h, p);
- break e
- }
- l ? l = !1 : wt("Unclosed string.", h, p)
- }
- u = i.charAt(a);
- if (u === e)return t += 1, i = i.substr(a + 1), o("(string)", f, e);
- if (u < " ") {
- if (u === "\n" || u === "\r")break;
- wt("Control character in string: {a}.", r, t + a, i.slice(0, a))
- } else if (u === "\\") {
- a += 1, t += 1, u = i.charAt(a), w = i.charAt(a + 1);
- switch (u) {
- case"\\":
- case'"':
- case"/":
- break;
- case"'":
- b && wt("Avoid \\'.", r, t);
- break;
- case"b":
- u = "\b";
- break;
- case"f":
- u = "\f";
- break;
- case"n":
- u = "\n";
- break;
- case"r":
- u = "\r";
- break;
- case"t":
- u = " ";
- break;
- case"0":
- u = "\0", w >= 0 && w <= 7 && q["use strict"] && wt("Octal literals are not allowed in strict mode.", r, t);
- break;
- case"u":
- c(4);
- break;
- case"v":
- b && wt("Avoid \\v.", r, t), u = "";
- break;
- case"x":
- b && wt("Avoid \\x-.", r, t), c(2);
- break;
- case"":
- l = !0;
- if (A.multistr) {
- b && wt("Avoid EOL escapement.", r, t), u = "", t -= 1;
- break
- }
- wt("Bad escapement of EOL. Use option multistr if needed.", r, t);
- break;
- case"!":
- if (i.charAt(a - 2) === "<")break;
- default:
- wt("Bad escapement.", r, t)
- }
- }
- f += u, t += 1, a += 1
- }
- }
-
- var e, u, a, f, l, c, h, p, d, v, m, g, y, w;
- for (; ;) {
- if (!i)return o(s() ? "(endline)" : "(end)", "");
- m = E(Z);
- if (!m) {
- m = "", u = "";
- while (i && i < "!")i = i.substr(1);
- i && (St("Unexpected '{a}'.", r, t, i.substr(0, 1)), i = "")
- } else {
- if (lt(u) || u === "_" || u === "$")return o("(identifier)", m);
- if (ct(u))return isFinite(Number(m)) || wt("Bad number '{a}'.", r, t, m), lt(i.substr(0, 1)) && wt("Missing space after '{a}'.", r, t, m), u === "0" && (f = m.substr(1, 1), ct(f) ? z.id !== "." && wt("Don't use extra leading zeros '{a}'.", r, t, m) : b && (f === "x" || f === "X") && wt("Avoid 0x-. '{a}'.", r, t, m)), m.substr(m.length - 1) === "." && wt("A trailing decimal point can be confused with a dot '{a}'.", r, t, m), o("(number)", m);
- switch (m) {
- case'"':
- case"'":
- return S(m);
- case"//":
- i = "", z.comment = !0;
- break;
- case"/*":
- for (; ;) {
- h = i.search(nt);
- if (h >= 0)break;
- s() || St("Unclosed comment.", r, t)
- }
- i = i.substr(h + 2), z.comment = !0;
- break;
- case"/*members":
- case"/*member":
- case"/*jshint":
- case"/*jslint":
- case"/*global":
- case"*/":
- return{value: m, type: "special", line: r, character: t, from: n};
- case"":
- break;
- case"/":
- i.charAt(0) === "=" && St("A regular expression literal can be confused with '/='.", r, n);
- if (M) {
- l = 0, a = 0, p = 0;
- for (; ;) {
- e = !0, u = i.charAt(p), p += 1;
- switch (u) {
- case"":
- return St("Unclosed regular expression.", r, n), gt("Stopping.", r, n);
- case"/":
- l > 0 && wt("{a} unterminated regular expression group(s).", r, n + p, l), u = i.substr(0, p - 1), v = {g: !0, i: !0, m: !0};
- while (v[i.charAt(p)] === !0)v[i.charAt(p)] = !1, p += 1;
- return t += p, i = i.substr(p), v = i.charAt(0), (v === "/" || v === "*") && St("Confusing regular expression.", r, n), o("(regexp)", u);
- case"\\":
- u = i.charAt(p), u < " " ? wt("Unexpected control character in regular expression.", r, n + p) : u === "<" && wt("Unexpected escaped character '{a}' in regular expression.", r, n + p, u), p += 1;
- break;
- case"(":
- l += 1, e = !1;
- if (i.charAt(p) === "?") {
- p += 1;
- switch (i.charAt(p)) {
- case":":
- case"=":
- case"!":
- p += 1;
- break;
- default:
- wt("Expected '{a}' and instead saw '{b}'.", r, n + p, ":", i.charAt(p))
- }
- } else a += 1;
- break;
- case"|":
- e = !1;
- break;
- case")":
- l === 0 ? wt("Unescaped '{a}'.", r, n + p, ")") : l -= 1;
- break;
- case" ":
- v = 1;
- while (i.charAt(p) === " ")p += 1, v += 1;
- v > 1 && wt("Spaces are hard to count. Use {{a}}.", r, n + p, v);
- break;
- case"[":
- u = i.charAt(p), u === "^" && (p += 1, i.charAt(p) === "]" && St("Unescaped '{a}'.", r, n + p, "^")), u === "]" && wt("Empty class.", r, n + p - 1), g = !1, y = !1;
- e:do {
- u = i.charAt(p), p += 1;
- switch (u) {
- case"[":
- case"^":
- wt("Unescaped '{a}'.", r, n + p, u), y ? y = !1 : g = !0;
- break;
- case"-":
- g && !y ? (g = !1, y = !0) : y ? y = !1 : i.charAt(p) === "]" ? y = !0 : (A.regexdash !== (p === 2 || p === 3 && i.charAt(1) === "^") && wt("Unescaped '{a}'.", r, n + p - 1, "-"), g = !0);
- break;
- case"]":
- y && !A.regexdash && wt("Unescaped '{a}'.", r, n + p - 1, "-");
- break e;
- case"\\":
- u = i.charAt(p), u < " " ? wt("Unexpected control character in regular expression.", r, n + p) : u === "<" && wt("Unexpected escaped character '{a}' in regular expression.", r, n + p, u), p += 1, /[wsd]/i.test(u) ? (y && (wt("Unescaped '{a}'.", r, n + p, "-"), y = !1), g = !1) : y ? y = !1 : g = !0;
- break;
- case"/":
- wt("Unescaped '{a}'.", r, n + p - 1, "/"), y ? y = !1 : g = !0;
- break;
- case"<":
- y ? y = !1 : g = !0;
- break;
- default:
- y ? y = !1 : g = !0
- }
- } while (u);
- break;
- case".":
- A.regexp && wt("Insecure '{a}'.", r, n + p, u);
- break;
- case"]":
- case"?":
- case"{":
- case"}":
- case"+":
- case"*":
- wt("Unescaped '{a}'.", r, n + p, u)
- }
- if (e)switch (i.charAt(p)) {
- case"?":
- case"+":
- case"*":
- p += 1, i.charAt(p) === "?" && (p += 1);
- break;
- case"{":
- p += 1, u = i.charAt(p);
- if (u < "0" || u > "9") {
- wt("Expected a number and instead saw '{a}'.", r, n + p, u);
- break
- }
- p += 1, d = +u;
- for (; ;) {
- u = i.charAt(p);
- if (u < "0" || u > "9")break;
- p += 1, d = +u + d * 10
- }
- c = d;
- if (u === ",") {
- p += 1, c = Infinity, u = i.charAt(p);
- if (u >= "0" && u <= "9") {
- p += 1, c = +u;
- for (; ;) {
- u = i.charAt(p);
- if (u < "0" || u > "9")break;
- p += 1, c = +u + c * 10
- }
- }
- }
- i.charAt(p) !== "}" ? wt("Expected '{a}' and instead saw '{b}'.", r, n + p, "}", u) : p += 1, i.charAt(p) === "?" && (p += 1), d > c && wt("'{a}' should not be greater than '{b}'.", r, n + p, d, c)
- }
- }
- return u = i.substr(0, p - 1), t += p, i = i.substr(p), o("(regexp)", u)
- }
- return o("(punctuator)", m);
- case"#":
- return o("(punctuator)", m);
- default:
- return o("(punctuator)", m)
- }
- }
- }
- }}
- }();
- Wt("(number)", function () {
- return this
- }), Wt("(string)", function () {
- return this
- }), R["(identifier)"] = {type: "(identifier)", lbp: 0, identifier: !0, nud: function () {
- var t = this.value, n = B[t], r;
- typeof n == "function" ? n = undefined : typeof n == "boolean" && (r = h, h = d[0], Nt(t, "var"), n = h, h = r);
- if (h === n)switch (h[t]) {
- case"unused":
- h[t] = "var";
- break;
- case"unction":
- h[t] = "function", this["function"] = !0;
- break;
- case"function":
- this["function"] = !0;
- break;
- case"label":
- bt("'{a}' is a statement label.", z, t)
- } else if (h["(global)"])A.undef && typeof O[t] != "boolean" && (e !== "typeof" && e !== "delete" || C && (C.value === "." || C.value === "[")) && yt(h, "'{a}' is not defined.", z, t), fn(z); else switch (h[t]) {
- case"closure":
- case"function":
- case"var":
- case"unused":
- bt("'{a}' used out of scope.", z, t);
- break;
- case"label":
- bt("'{a}' is a statement label.", z, t);
- break;
- case"outer":
- case"global":
- break;
- default:
- if (n === !0)h[t] = !0; else if (n === null)bt("'{a}' is not allowed.", z, t), fn(z); else if (typeof n != "object")A.undef && (e !== "typeof" && e !== "delete" || C && (C.value === "." || C.value === "[")) && yt(h, "'{a}' is not defined.", z, t), h[t] = !0, fn(z); else switch (n[t]) {
- case"function":
- case"unction":
- this["function"] = !0, n[t] = "closure", h[t] = n["(global)"] ? "global" : "outer";
- break;
- case"var":
- case"unused":
- n[t] = "closure", h[t] = n["(global)"] ? "global" : "outer";
- break;
- case"closure":
- h[t] = n["(global)"] ? "global" : "outer";
- break;
- case"label":
- bt("'{a}' is a statement label.", z, t)
- }
- }
- return this
- }, led: function () {
- Et("Expected an operator and instead saw '{a}'.", C, C.value)
- }}, Wt("(regexp)", function () {
- return this
- }), It("(endline)"), It("(begin)"), It("(end)").reach = !0, It("").reach = !0, It(""), It("(error)").reach = !0, It("}").reach = !0, It(")"), It("]"), It('"').reach = !0, It("'").reach = !0, It(";"), It(":").reach = !0, It(","), It("#"), It("@"), Xt("else"), Xt("case").reach = !0, Xt("catch"), Xt("default").reach = !0, Xt("finally"), Vt("arguments", function (e) {
- q["use strict"] && h["(global)"] && bt("Strict violation.", e)
- }), Vt("eval"), Vt("false"), Vt("Infinity"), Vt("null"), Vt("this", function (e) {
- q["use strict"] && !A.validthis && (h["(statement)"] && h["(name)"].charAt(0) > "Z" || h["(global)"]) && bt("Possible strict violation.", e)
- }), Vt("true"), Vt("undefined"), Qt("=", "assign", 20), Qt("+=", "assignadd", 20), Qt("-=", "assignsub", 20), Qt("*=", "assignmult", 20), Qt("/=", "assigndiv", 20).nud = function () {
- Et("A regular expression literal can be confused with '/='.")
- }, Qt("%=", "assignmod", 20), Yt("&=", "assignbitand", 20), Yt("|=", "assignbitor", 20), Yt("^=", "assignbitxor", 20), Yt("<<=", "assignshiftleft", 20), Yt(">>=", "assignshiftright", 20), Yt(">>>=", "assignshiftrightunsigned", 20), $t("?", function (e, t) {
- return t.left = e, t.right = At(10), Lt(":"), t["else"] = At(10), t
- }, 30), $t("||", "or", 40), $t("&&", "and", 50), Gt("|", "bitor", 70), Gt("^", "bitxor", 80), Gt("&", "bitand", 90), Jt("==", function (e, t) {
- var n = A.eqnull && (e.value === "null" || t.value === "null");
- return!n && A.eqeqeq ? bt("Expected '{a}' and instead saw '{b}'.", this, "===", "==") : Kt(e) ? bt("Use '{a}' to compare with '{b}'.", this, "===", e.value) : Kt(t) && bt("Use '{a}' to compare with '{b}'.", this, "===", t.value), this
- }), Jt("==="), Jt("!=", function (e, t) {
- var n = A.eqnull && (e.value === "null" || t.value === "null");
- return!n && A.eqeqeq ? bt("Expected '{a}' and instead saw '{b}'.", this, "!==", "!=") : Kt(e) ? bt("Use '{a}' to compare with '{b}'.", this, "!==", e.value) : Kt(t) && bt("Use '{a}' to compare with '{b}'.", this, "!==", t.value), this
- }), Jt("!=="), Jt("<"), Jt(">"), Jt("<="), Jt(">="), Gt("<<", "shiftleft", 120), Gt(">>", "shiftright", 120), Gt(">>>", "shiftrightunsigned", 120), $t("in", "in", 120), $t("instanceof", "instanceof", 120), $t("+", function (e, t) {
- var n = At(130);
- return e && n && e.id === "(string)" && n.id === "(string)" ? (e.value += n.value, e.character = n.character, !A.scripturl && it.test(e.value) && bt("JavaScript URL.", e), e) : (t.left = e, t.right = n, t)
- }, 130), zt("+", "num"), zt("+++", function () {
- return bt("Confusing pluses."), this.right = At(150), this.arity = "unary", this
- }), $t("+++", function (e) {
- return bt("Confusing pluses."), this.left = e, this.right = At(130), this
- }, 130), $t("-", "sub", 130), zt("-", "neg"), zt("---", function () {
- return bt("Confusing minuses."), this.right = At(150), this.arity = "unary", this
- }), $t("---", function (e) {
- return bt("Confusing minuses."), this.left = e, this.right = At(130), this
- }, 130), $t("*", "mult", 140), $t("/", "div", 140), $t("%", "mod", 140), Zt("++", "postinc"), zt("++", "preinc"), R["++"].exps = !0, Zt("--", "postdec"), zt("--", "predec"), R["--"].exps = !0, zt("delete",function () {
- var e = At(0);
- return(!e || e.id !== "." && e.id !== "[") && bt("Variables should not be deleted."), this.first = e, this
- }).exps = !0, zt("~", function () {
- return A.bitwise && bt("Unexpected '{a}'.", this, "~"), At(150), this
- }), zt("!", function () {
- return this.right = At(150), this.arity = "unary", t[this.right.id] === !0 && bt("Confusing use of '{a}'.", this, "!"), this
- }), zt("typeof", "typeof"), zt("new", function () {
- var e = At(155), t;
- if (e && e.id !== "function")if (e.identifier) {
- e["new"] = !0;
- switch (e.value) {
- case"Number":
- case"String":
- case"Boolean":
- case"Math":
- case"JSON":
- bt("Do not use {a} as a constructor.", _, e.value);
- break;
- case"Function":
- A.evil || bt("The Function constructor is eval.");
- break;
- case"Date":
- case"RegExp":
- break;
- default:
- e.id !== "function" && (t = e.value.substr(0, 1), A.newcap && (t < "A" || t > "Z") && !ut(v, e.value) && bt("A constructor name should start with an uppercase letter.", z))
- }
- } else e.id !== "." && e.id !== "[" && e.id !== "(" && bt("Bad constructor.", z); else A.supernew || bt("Weird construction. Delete 'new'.", this);
- return Ot(z, C), C.id !== "(" && !A.supernew && bt("Missing '()' invoking a constructor.", z, z.value), this.first = e, this
- }), R["new"].exps = !0, zt("void").exps = !0, $t(".", function (e, t) {
- Ot(_, z), Mt();
- var n = tn();
- return typeof n == "string" && an(n), t.left = e, t.right = n, !e || e.value !== "arguments" || n !== "callee" && n !== "caller" ? !A.evil && e && e.value === "document" && (n === "write" || n === "writeln") && bt("document.write can be a form of eval.", e) : A.noarg ? bt("Avoid arguments.{a}.", e, n) : q["use strict"] && Et("Strict violation."), !A.evil && (n === "eval" || n === "execScript") && bt("eval is evil."), t
- }, 160, !0), $t("(",function (e, t) {
- _.id !== "}" && _.id !== ")" && Mt(_, z), _t(), A.immed && !e.immed && e.id === "function" && bt("Wrap an immediate function invocation in parentheses to assist the reader in understanding that the expression is the result of a function, and not the function itself.");
- var n = 0, r = [];
- e && e.type === "(identifier)" && e.value.match(/^[A-Z]([A-Z0-9_$]*[a-z][A-Za-z0-9_$]*)?$/) && "Number String Boolean Date Object".indexOf(e.value) === -1 && (e.value === "Math" ? bt("Math is not a function.", e) : A.newcap && bt("Missing 'new' prefix when invoking a constructor.", e));
- if (C.id !== ")")for (; ;) {
- r[r.length] = At(10), n += 1;
- if (C.id !== ",")break;
- jt()
- }
- return Lt(")"), _t(_, z), typeof e == "object" && (e.value === "parseInt" && n === 1 && bt("Missing radix parameter.", z), A.evil || (e.value === "eval" || e.value === "Function" || e.value === "execScript" ? (bt("eval is evil.", e), r[0] && [0].id === "(string)" && xt(e, r[0].value)) : !r[0] || r[0].id !== "(string)" || e.value !== "setTimeout" && e.value !== "setInterval" ? r[0] && r[0].id === "(string)" && e.value === "." && e.left.value === "window" && (e.right === "setTimeout" || e.right === "setInterval") && (bt("Implied eval is evil. Pass a function instead of a string.", e), xt(e, r[0].value)) : (bt("Implied eval is evil. Pass a function instead of a string.", e), xt(e, r[0].value))), !e.identifier && e.id !== "." && e.id !== "[" && e.id !== "(" && e.id !== "&&" && e.id !== "||" && e.id !== "?" && bt("Bad invocation.", e)), t.left = e, t
- }, 155, !0).exps = !0, zt("(", function () {
- _t(), C.id === "function" && (C.immed = !0);
- var e = At(0);
- return Lt(")", this), _t(_, z), A.immed && e.id === "function" && C.id !== "(" && (C.id !== "." || kt().value !== "call" && kt().value !== "apply") && bt("Do not wrap function literals in parens unless they are to be immediately invoked.", this), e
- }), $t("[", function (e, t) {
- Mt(_, z), _t();
- var n = At(0), r;
- return n && n.type === "(string)" && (!A.evil && (n.value === "eval" || n.value === "execScript") && bt("eval is evil.", t), an(n.value), !A.sub && rt.test(n.value) && (r = R[n.value], (!r || !r.reserved) && bt("['{a}'] is better written in dot notation.", _, n.value))), Lt("]", t), _t(_, z), t.left = e, t.right = n, t
- }, 160, !0), zt("[", function () {
- var e = z.line !== C.line;
- this.first = [], e && (y += A.indent, C.from === y + A.indent && (y += A.indent));
- while (C.id !== "(end)") {
- while (C.id === ",")A.es5 || bt("Extra comma."), Lt(",");
- if (C.id === "]")break;
- e && z.line !== C.line && Ht(), this.first.push(At(10));
- if (C.id !== ",")break;
- jt();
- if (C.id === "]" && !A.es5) {
- bt("Extra comma.", z);
- break
- }
- }
- return e && (y -= A.indent, Ht()), Lt("]", this), this
- }, 160), function (e) {
- e.nud = function () {
- function o(e, t) {
- s[e] && ut(s, e) ? bt("Duplicate member '{a}'.", C, n) : s[e] = {}, s[e].basic = !0, s[e].basicToken = t
- }
-
- function u(e, t) {
- s[e] && ut(s, e) ? (s[e].basic || s[e].setter) && bt("Duplicate member '{a}'.", C, n) : s[e] = {}, s[e].setter = !0, s[e].setterToken = t
- }
-
- function a(e) {
- s[e] && ut(s, e) ? (s[e].basic || s[e].getter) && bt("Duplicate member '{a}'.", C, n) : s[e] = {}, s[e].getter = !0, s[e].getterToken = z
- }
-
- var e, t, n, r, i, s = {};
- e = z.line !== C.line, e && (y += A.indent, C.from === y + A.indent && (y += A.indent));
- for (; ;) {
- if (C.id === "}")break;
- e && Ht();
- if (C.value === "get" && kt().id !== ":")Lt("get"), A.es5 || Et("get/set are ES5 features."), n = ln(), n || Et("Missing property name."), a(n), i = C, Ot(z, C), t = hn(), r = t["(params)"], r && bt("Unexpected parameter '{a}' in get {b} function.", i, r[0], n), Ot(z, C); else if (C.value === "set" && kt().id !== ":")Lt("set"), A.es5 || Et("get/set are ES5 features."), n = ln(), n || Et("Missing property name."), u(n, C), i = C, Ot(z, C), t = hn(), r = t["(params)"], (!r || r.length !== 1) && bt("Expected a single parameter in set {a} function.", i, n); else {
- n = ln(), o(n, C);
- if (typeof n != "string")break;
- Lt(":"), Dt(z, C), At(10)
- }
- an(n);
- if (C.id !== ",")break;
- jt(), C.id === "," ? bt("Extra comma.", z) : C.id === "}" && !A.es5 && bt("Extra comma.", z)
- }
- e && (y -= A.indent, Ht()), Lt("}", this);
- if (A.es5)for (var f in s)ut(s, f) && s[f].setter && !s[f].getter && bt("Setter is defined without getter.", s[f].setterToken);
- return this
- }, e.fud = function () {
- Et("Expected to see a statement and instead saw a block.", z)
- }
- }(It("{")), V = function () {
- var e = qt("const", function (e) {
- var t, n, r;
- this.first = [];
- for (; ;) {
- Dt(z, C), t = tn(), h[t] === "const" && bt("const '" + t + "' has already been declared"), h["(global)"] && O[t] === !1 && bt("Redefinition of '{a}'.", z, t), Nt(t, "const");
- if (e)break;
- n = z, this.first.push(z), C.id !== "=" && bt("const '{a}' is initialized to 'undefined'.", z, t), C.id === "=" && (Dt(z, C), Lt("="), Dt(z, C), C.id === "undefined" && bt("It is not necessary to initialize '{a}' to 'undefined'.", z, t), kt(0).id === "=" && C.identifier && Et("Constant {a} was not declared correctly.", C, C.value), r = At(0), n.first = r);
- if (C.id !== ",")break;
- jt()
- }
- return this
- });
- e.exps = !0
- };
- var vn = qt("var", function (e) {
- var t, n, r;
- h["(onevar)"] && A.onevar ? bt("Too many var statements.") : h["(global)"] || (h["(onevar)"] = !0), this.first = [];
- for (; ;) {
- Dt(z, C), t = tn(), A.esnext && h[t] === "const" && bt("const '" + t + "' has already been declared"), h["(global)"] && O[t] === !1 && bt("Redefinition of '{a}'.", z, t), Nt(t, "unused", z);
- if (e)break;
- n = z, this.first.push(z), C.id === "=" && (Dt(z, C), Lt("="), Dt(z, C), C.id === "undefined" && bt("It is not necessary to initialize '{a}' to 'undefined'.", z, t), kt(0).id === "=" && C.identifier && Et("Variable {a} was not declared correctly.", C, C.value), r = At(0), n.first = r);
- if (C.id !== ",")break;
- jt()
- }
- return this
- });
- vn.exps = !0, Rt("function", function () {
- g && bt("Function declarations should not be placed in blocks. Use a function expression or move the statement to the top of the outer function.", z);
- var e = tn();
- return A.esnext && h[e] === "const" && bt("const '" + e + "' has already been declared"), Ot(z, C), Nt(e, "unction", z), hn(e, {statement: !0}), C.id === "(" && C.line === z.line && Et("Function declarations are not invocable. Wrap the whole function invocation in parens."), this
- }), zt("function", function () {
- var e = en();
- return e ? Ot(z, C) : Dt(z, C), hn(e), !A.loopfunc && h["(loopage)"] && bt("Don't make functions within a loop."), this
- }), Rt("if", function () {
- var e = C;
- return dn(), Lt("("), Dt(this, e), _t(), At(20), C.id === "=" && (A.boss || bt("Assignment in conditional expression"), Lt("="), At(20)), Lt(")", e), _t(_, z), un(!0, !0), C.id === "else" && (Dt(z, C), Lt("else"), C.id === "if" || C.id === "switch" ? rn(!0) : un(!0, !0)), this
- }), Rt("try", function () {
- function t() {
- var e = B, t;
- Lt("catch"), Dt(z, C), Lt("("), B = Object.create(e), t = C.value, C.type !== "(identifier)" && (t = null, bt("Expected an identifier and instead saw '{a}'.", C, t)), Lt(), Lt(")"), h = {"(name)": "(catch)", "(line)": C.line, "(character)": C.character, "(context)": h, "(breakage)": h["(breakage)"], "(loopage)": h["(loopage)"], "(scope)": B, "(statement)": !1, "(metrics)": pn(C), "(catch)": !0, "(tokens)": {}}, t && Nt(t, "exception"), z.funct = h, d.push(h), un(!1), B = e, h["(last)"] = z.line, h["(lastcharacter)"] = z.character, h = h["(context)"]
- }
-
- var e;
- un(!1), C.id === "catch" && (dn(), t(), e = !0);
- if (C.id === "finally") {
- Lt("finally"), un(!1);
- return
- }
- return e || Et("Expected '{a}' and instead saw '{b}'.", C, "catch", C.value), this
- }), Rt("while",function () {
- var e = C;
- return h["(breakage)"] += 1, h["(loopage)"] += 1, dn(), Lt("("), Dt(this, e), _t(), At(20), C.id === "=" && (A.boss || bt("Assignment in conditional expression"), Lt("="), At(20)), Lt(")", e), _t(_, z), un(!0, !0), h["(breakage)"] -= 1, h["(loopage)"] -= 1, this
- }).labelled = !0, Rt("with", function () {
- var e = C;
- return q["use strict"] ? Et("'with' is not allowed in strict mode.", z) : A.withstmt || bt("Don't use 'with'.", z), Lt("("), Dt(this, e), _t(), At(0), Lt(")", e), _t(_, z), un(!0, !0), this
- }), Rt("switch",function () {
- var e = C, t = !1;
- h["(breakage)"] += 1, Lt("("), Dt(this, e), _t(), this.condition = At(20), Lt(")", e), _t(_, z), Dt(z, C), e = C, Lt("{"), Dt(z, C), y += A.indent, this.cases = [];
- for (; ;)switch (C.id) {
- case"case":
- switch (h["(verb)"]) {
- case"break":
- case"case":
- case"continue":
- case"return":
- case"switch":
- case"throw":
- break;
- default:
- st.test(E[C.line - 2]) || bt("Expected a 'break' statement before 'case'.", z)
- }
- Ht(-A.indent), Lt("case"), this.cases.push(At(20)), dn(), t = !0, Lt(":"), h["(verb)"] = "case";
- break;
- case"default":
- switch (h["(verb)"]) {
- case"break":
- case"continue":
- case"return":
- case"throw":
- break;
- default:
- st.test(E[C.line - 2]) || bt("Expected a 'break' statement before 'default'.", z)
- }
- Ht(-A.indent), Lt("default"), t = !0, Lt(":");
- break;
- case"}":
- y -= A.indent, Ht(), Lt("}", e);
- if (this.cases.length === 1 || this.condition.id === "true" || this.condition.id === "false")A.onecase || bt("This 'switch' should be an 'if'.", this);
- h["(breakage)"] -= 1, h["(verb)"] = undefined;
- return;
- case"(end)":
- Et("Missing '{a}'.", C, "}");
- return;
- default:
- if (t)switch (z.id) {
- case",":
- Et("Each value should have its own case label.");
- return;
- case":":
- t = !1, sn();
- break;
- default:
- Et("Missing ':' on a case clause.", z);
- return
- } else {
- if (z.id !== ":") {
- Et("Expected '{a}' and instead saw '{b}'.", C, "case", C.value);
- return
- }
- Lt(":"), Et("Unexpected '{a}'.", z, ":"), sn()
- }
- }
- }).labelled = !0, qt("debugger",function () {
- return A.debug || bt("All 'debugger' statements should be removed."), this
- }).exps = !0, function () {
- var e = qt("do", function () {
- h["(breakage)"] += 1, h["(loopage)"] += 1, dn(), this.first = un(!0), Lt("while");
- var e = C;
- return Dt(z, e), Lt("("), _t(), At(20), C.id === "=" && (A.boss || bt("Assignment in conditional expression"), Lt("="), At(20)), Lt(")", e), _t(_, z), h["(breakage)"] -= 1, h["(loopage)"] -= 1, this
- });
- e.labelled = !0, e.exps = !0
- }(), Rt("for",function () {
- var e, t = C;
- h["(breakage)"] += 1, h["(loopage)"] += 1, dn(), Lt("("), Dt(this, t), _t();
- if (kt(C.id === "var" ? 1 : 0).id === "in") {
- if (C.id === "var")Lt("var"), vn.fud.call(vn, !0); else {
- switch (h[C.value]) {
- case"unused":
- h[C.value] = "var";
- break;
- case"var":
- break;
- default:
- bt("Bad for in variable '{a}'.", C, C.value)
- }
- Lt()
- }
- return Lt("in"), At(20), Lt(")", t), e = un(!0, !0), A.forin && e && (e.length > 1 || typeof e[0] != "object" || e[0].value !== "if") && bt("The body of a for in should be wrapped in an if statement to filter unwanted properties from the prototype.", this), h["(breakage)"] -= 1, h["(loopage)"] -= 1, this
- }
- if (C.id !== ";")if (C.id === "var")Lt("var"), vn.fud.call(vn); else for (; ;) {
- At(0, "for");
- if (C.id !== ",")break;
- jt()
- }
- Bt(z), Lt(";"), C.id !== ";" && (At(20), C.id === "=" && (A.boss || bt("Assignment in conditional expression"), Lt("="), At(20))), Bt(z), Lt(";"), C.id === ";" && Et("Expected '{a}' and instead saw '{b}'.", C, ")", ";");
- if (C.id !== ")")for (; ;) {
- At(0, "for");
- if (C.id !== ",")break;
- jt()
- }
- return Lt(")", t), _t(_, z), un(!0, !0), h["(breakage)"] -= 1, h["(loopage)"] -= 1, this
- }).labelled = !0, qt("break",function () {
- var e = C.value;
- return h["(breakage)"] === 0 && bt("Unexpected '{a}'.", C, this.value), A.asi || Bt(this), C.id !== ";" && z.line === C.line && (h[e] !== "label" ? bt("'{a}' is not a statement label.", C, e) : B[e] !== h && bt("'{a}' is out of scope.", C, e), this.first = C, Lt()), nn("break"), this
- }).exps = !0, qt("continue",function () {
- var e = C.value;
- return h["(breakage)"] === 0 && bt("Unexpected '{a}'.", C, this.value), A.asi || Bt(this), C.id !== ";" ? z.line === C.line && (h[e] !== "label" ? bt("'{a}' is not a statement label.", C, e) : B[e] !== h && bt("'{a}' is out of scope.", C, e), this.first = C, Lt()) : h["(loopage)"] || bt("Unexpected '{a}'.", C, this.value), nn("continue"), this
- }).exps = !0, qt("return",function () {
- return this.line === C.line ? (C.id === "(regexp)" && bt("Wrap the /regexp/ literal in parens to disambiguate the slash operator."), C.id !== ";" && !C.reach && (Dt(z, C), kt().value === "=" && !A.boss && wt("Did you mean to return a conditional instead of an assignment?", z.line, z.character + 1), this.first = At(0))) : A.asi || Bt(this), nn("return"), this
- }).exps = !0, qt("throw",function () {
- return Bt(this), Dt(z, C), this.first = At(20), nn("throw"), this
- }).exps = !0, Xt("class"), Xt("const"), Xt("enum"), Xt("export"), Xt("extends"), Xt("import"), Xt("super"), Xt("let"), Xt("yield"), Xt("implements"), Xt("interface"), Xt("package"), Xt("private"), Xt("protected"), Xt("public"), Xt("static");
- var gn = function (e, t, n) {
- var i, s, o, u, a, l = {};
- t && t.scope ? r.scope = t.scope : (r.errors = [], r.undefs = [], r.internals = [], r.blacklist = {}, r.scope = "(main)"), O = Object.create(F), f = Object.create(null), dt(O, n || {});
- if (t) {
- i = t.predef, i && (!Array.isArray(i) && typeof i == "object" && (i = Object.keys(i)), i.forEach(function (e) {
- var t;
- e[0] === "-" ? (t = e.slice(1), r.blacklist[t] = t) : O[e] = !0
- })), a = Object.keys(t);
- for (u = 0; u < a.length; u++)l[a[u]] = t[a[u]], a[u] === "newcap" && t[a[u]] === !1 && (l["(explicitNewcap)"] = !0), a[u] === "indent" && (l.white = !0)
- }
- A = l, A.indent = A.indent || 4, A.maxerr = A.maxerr || 50, U = "";
- for (s = 0; s < A.indent; s += 1)U += " ";
- y = 1, v = Object.create(O), B = v, h = {"(global)": !0, "(name)": "(global)", "(scope)": B, "(breakage)": 0, "(loopage)": 0, "(tokens)": {}, "(metrics)": pn(C)}, d = [h], X = [], j = null, x = {}, T = null, m = {}, g = !1, S = [], b = !1, $ = 0, E = [], W = [];
- if (!ft(e) && !Array.isArray(e))return St("Input is neither a string nor an array of strings.", 0), !1;
- if (ft(e) && /^\s*$/g.test(e))return St("Input is an empty string.", 0), !1;
- if (e.length === 0)return St("Input is an empty array.", 0), !1;
- Tt.init(e), M = !0, q = {}, _ = z = C = R["(begin)"];
- for (var c in t)ut(t, c) && at(c, z);
- mt(), dt(O, n || {}), jt.first = !0, P = undefined;
- try {
- Lt();
- switch (C.id) {
- case"{":
- case"[":
- A.laxbreak = !0, b = !0, mn();
- break;
- default:
- on(), q["use strict"] && !A.globalstrict && bt('Use the function form of "use strict".', _), sn()
- }
- Lt(C && C.value !== "." ? "(end)" : undefined);
- var p = function (e, t) {
- do {
- if (typeof t[e] == "string")return t[e] === "unused" ? t[e] = "var" : t[e] === "unction" && (t[e] = "closure"), !0;
- t = t["(context)"]
- } while (t);
- return!1
- }, w = function (e, t) {
- if (!m[e])return;
- var n = [];
- for (var r = 0; r < m[e].length; r += 1)m[e][r] !== t && n.push(m[e][r]);
- n.length === 0 ? delete m[e] : m[e] = n
- }, N = function (e, t) {
- var n = t.line, r = t.character;
- A.unused && wt("'{a}' is defined but never used.", n, r, e), W.push({name: e, line: n, character: r})
- }, k = function (e, t) {
- var n = e[t], r = e["(tokens)"][t];
- if (t.charAt(0) === "(")return;
- if (n !== "unused" && n !== "unction")return;
- if (e["(params)"] && e["(params)"].indexOf(t) !== -1)return;
- N(t, r)
- };
- for (s = 0; s < r.undefs.length; s += 1)o = r.undefs[s].slice(0), p(o[2].value, o[0]) ? w(o[2].value, o[2].line) : bt.apply(bt, o.slice(1));
- d.forEach(function (e) {
- for (var t in e)ut(e, t) && k(e, t);
- if (!e["(params)"])return;
- var n = e["(params)"].slice(), r = n.pop(), i;
- while (r) {
- i = e[r];
- if (r === "undefined")return;
- if (i !== "unused" && i !== "unction")return;
- N(r, e["(tokens)"][r]), r = n.pop()
- }
- });
- for (var L in f)ut(f, L) && !ut(v, L) && N(L, f[L])
- } catch (D) {
- if (D) {
- var H = C || {};
- r.errors.push({raw: D.raw, reason: D.message, line: D.line || H.line, character: D.character || H.from}, null)
- }
- }
- if (r.scope === "(main)") {
- t = t || {};
- for (s = 0; s < r.internals.length; s += 1)o = r.internals[s], t.scope = o.elem, gn(o.value, t, n)
- }
- return r.errors.length === 0
- };
- return gn.data = function () {
- var e = {functions: [], options: A}, t = [], n = [], r, i, s, o, u, a;
- gn.errors.length && (e.errors = gn.errors), b && (e.json = !0);
- for (u in m)ut(m, u) && t.push({name: u, line: m[u]});
- t.length > 0 && (e.implieds = t), X.length > 0 && (e.urls = X), a = Object.keys(B), a.length > 0 && (e.globals = a);
- for (s = 1; s < d.length; s += 1) {
- i = d[s], r = {};
- for (o = 0; o < p.length; o += 1)r[p[o]] = [];
- for (o = 0; o < p.length; o += 1)r[p[o]].length === 0 && delete r[p[o]];
- r.name = i["(name)"], r.param = i["(params)"], r.line = i["(line)"], r.character = i["(character)"], r.last = i["(last)"], r.lastcharacter = i["(lastcharacter)"], e.functions.push(r)
- }
- W.length > 0 && (e.unused = W), n = [];
- for (u in x)if (typeof x[u] == "number") {
- e.member = x;
- break
- }
- return e
- }, gn.jshint = gn, gn
- }();
- typeof t == "object" && t && (t.JSHINT = r)
-})
\ No newline at end of file
diff --git a/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/worker-json.js b/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/worker-json.js
deleted file mode 100644
index 8a7e29c..0000000
--- a/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/worker-json.js
+++ /dev/null
@@ -1,875 +0,0 @@
-"no use strict";
-function initBaseUrls(e) {
- require.tlns = e
-}
-function initSender() {
- var e = require(null, "ace/lib/event_emitter").EventEmitter, t = require(null, "ace/lib/oop"), n = function () {
- };
- return function () {
- t.implement(this, e), 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(n.prototype), new n
-}
-if (typeof window != "undefined" && window.document)throw"atempt to load ace worker into main window instead of webWorker";
-var console = {log: function () {
- var e = Array.prototype.slice.call(arguments, 0);
- postMessage({type: "log", data: e})
-}, error: function () {
- var e = Array.prototype.slice.call(arguments, 0);
- postMessage({type: "log", data: e})
-}}, window = {console: console}, normalizeModule = function (e, t) {
- if (t.indexOf("!") !== -1) {
- var n = t.split("!");
- return normalizeModule(e, n[0]) + "!" + normalizeModule(e, n[1])
- }
- if (t.charAt(0) == ".") {
- var r = e.split("/").slice(0, -1).join("/");
- t = r + "/" + t;
- while (t.indexOf(".") !== -1 && i != t) {
- var i = t;
- t = t.replace(/\/\.\//, "/").replace(/[^\/]+\/\.\.\//, "")
- }
- }
- return t
-}, require = function (e, t) {
- if (!t.charAt)throw new Error("worker.js require() accepts only (parentId, id) as arguments");
- t = normalizeModule(e, t);
- var n = require.modules[t];
- if (n)return n.initialized || (n.initialized = !0, n.exports = n.factory().exports), n.exports;
- var r = t.split("/");
- r[0] = require.tlns[r[0]] || r[0];
- var i = r.join("/") + ".js";
- return require.id = t, importScripts(i), require(e, t)
-};
-require.modules = {}, require.tlns = {};
-var define = function (e, t, n) {
- arguments.length == 2 ? (n = t, typeof e != "string" && (t = e, e = require.id)) : arguments.length == 1 && (n = e, e = require.id);
- if (e.indexOf("text!") === 0)return;
- var r = function (t, n) {
- return require(e, t, n)
- };
- require.modules[e] = {factory: function () {
- var e = {exports: {}}, t = n(r, e.exports, e);
- return t && (e.exports = t), e
- }}
-}, main, sender;
-onmessage = function (e) {
- var t = e.data;
- if (t.command) {
- if (!main[t.command])throw new Error("Unknown command:" + t.command);
- main[t.command].apply(main, t.args)
- } else if (t.init) {
- initBaseUrls(t.tlns), require(null, "ace/lib/fixoldbrowsers"), sender = initSender();
- var n = require(null, t.module)[t.classname];
- main = new n(sender)
- } else t.event && sender && sender._emit(t.event, t.data)
-}, define("ace/lib/fixoldbrowsers", ["require", "exports", "module", "ace/lib/regexp", "ace/lib/es5-shim"], function (e, t, n) {
- e("./regexp"), e("./es5-shim")
-}), define("ace/lib/regexp", ["require", "exports", "module"], function (e, t, n) {
- function o(e) {
- return(e.global ? "g" : "") + (e.ignoreCase ? "i" : "") + (e.multiline ? "m" : "") + (e.extended ? "x" : "") + (e.sticky ? "y" : "")
- }
-
- function u(e, t, n) {
- if (Array.prototype.indexOf)return e.indexOf(t, n);
- for (var r = n || 0; r < e.length; r++)if (e[r] === t)return r;
- return-1
- }
-
- var r = {exec: RegExp.prototype.exec, test: RegExp.prototype.test, match: String.prototype.match, replace: String.prototype.replace, split: String.prototype.split}, i = r.exec.call(/()??/, "")[1] === undefined, s = function () {
- var e = /^/g;
- return r.test.call(e, ""), !e.lastIndex
- }();
- if (s && i)return;
- RegExp.prototype.exec = function (e) {
- var t = r.exec.apply(this, arguments), n, a;
- if (typeof e == "string" && t) {
- !i && t.length > 1 && u(t, "") > -1 && (a = RegExp(this.source, r.replace.call(o(this), "g", "")), r.replace.call(e.slice(t.index), a, function () {
- for (var e = 1; e < arguments.length - 2; e++)arguments[e] === undefined && (t[e] = undefined)
- }));
- if (this._xregexp && this._xregexp.captureNames)for (var f = 1; f < t.length; f++)n = this._xregexp.captureNames[f - 1], n && (t[n] = t[f]);
- !s && this.global && !t[0].length && this.lastIndex > t.index && this.lastIndex--
- }
- return t
- }, s || (RegExp.prototype.test = function (e) {
- var t = r.exec.call(this, e);
- return t && this.global && !t[0].length && this.lastIndex > t.index && this.lastIndex--, !!t
- })
-}), define("ace/lib/es5-shim", ["require", "exports", "module"], function (e, t, n) {
- function r() {
- }
-
- function w(e) {
- try {
- return Object.defineProperty(e, "sentinel", {}), "sentinel"in e
- } catch (t) {
- }
- }
-
- function j(e) {
- return e = +e, e !== e ? e = 0 : e !== 0 && e !== 1 / 0 && e !== -1 / 0 && (e = (e > 0 || -1) * Math.floor(Math.abs(e))), e
- }
-
- function F(e) {
- var t = typeof e;
- return e === null || t === "undefined" || t === "boolean" || t === "number" || t === "string"
- }
-
- function I(e) {
- var t, n, r;
- if (F(e))return e;
- n = e.valueOf;
- if (typeof n == "function") {
- t = n.call(e);
- if (F(t))return t
- }
- r = e.toString;
- if (typeof r == "function") {
- t = r.call(e);
- if (F(t))return t
- }
- throw new TypeError
- }
-
- Function.prototype.bind || (Function.prototype.bind = function (t) {
- var n = this;
- if (typeof n != "function")throw new TypeError("Function.prototype.bind called on incompatible " + n);
- var i = u.call(arguments, 1), s = function () {
- if (this instanceof s) {
- var e = n.apply(this, i.concat(u.call(arguments)));
- return Object(e) === e ? e : this
- }
- return n.apply(t, i.concat(u.call(arguments)))
- };
- return n.prototype && (r.prototype = n.prototype, s.prototype = new r, r.prototype = null), s
- });
- var i = Function.prototype.call, s = Array.prototype, o = Object.prototype, u = s.slice, a = i.bind(o.toString), f = i.bind(o.hasOwnProperty), l, c, h, p, d;
- if (d = f(o, "__defineGetter__"))l = i.bind(o.__defineGetter__), c = i.bind(o.__defineSetter__), h = i.bind(o.__lookupGetter__), p = i.bind(o.__lookupSetter__);
- if ([1, 2].splice(0).length != 2)if (!function () {
- function e(e) {
- var t = new Array(e + 2);
- return t[0] = t[1] = 0, t
- }
-
- var t = [], n;
- t.splice.apply(t, e(20)), t.splice.apply(t, e(26)), n = t.length, t.splice(5, 0, "XXX"), n + 1 == t.length;
- if (n + 1 == t.length)return!0
- }())Array.prototype.splice = function (e, t) {
- var n = this.length;
- e > 0 ? e > n && (e = n) : e == void 0 ? e = 0 : e < 0 && (e = Math.max(n + e, 0)), e + t < n || (t = n - e);
- var r = this.slice(e, e + t), i = u.call(arguments, 2), s = i.length;
- if (e === n)s && this.push.apply(this, i); else {
- var o = Math.min(t, n - e), a = e + o, f = a + s - o, l = n - a, c = n - o;
- if (f < a)for (var h = 0; h < l; ++h)this[f + h] = this[a + h]; else if (f > a)for (h = l; h--;)this[f + h] = this[a + h];
- if (s && e === c)this.length = c, this.push.apply(this, i); else {
- this.length = c + s;
- for (h = 0; h < s; ++h)this[e + h] = i[h]
- }
- }
- return r
- }; else {
- var v = Array.prototype.splice;
- Array.prototype.splice = function (e, t) {
- return arguments.length ? v.apply(this, [e === void 0 ? 0 : e, t === void 0 ? this.length - e : t].concat(u.call(arguments, 2))) : []
- }
- }
- Array.isArray || (Array.isArray = function (t) {
- return a(t) == "[object Array]"
- });
- var m = Object("a"), g = m[0] != "a" || !(0 in m);
- Array.prototype.forEach || (Array.prototype.forEach = function (t) {
- var n = q(this), r = g && a(this) == "[object String]" ? this.split("") : n, i = arguments[1], s = -1, o = r.length >>> 0;
- if (a(t) != "[object Function]")throw new TypeError;
- while (++s < o)s in r && t.call(i, r[s], s, n)
- }), Array.prototype.map || (Array.prototype.map = function (t) {
- var n = q(this), r = g && a(this) == "[object String]" ? this.split("") : n, i = r.length >>> 0, s = Array(i), o = arguments[1];
- if (a(t) != "[object Function]")throw new TypeError(t + " is not a function");
- for (var u = 0; u < i; u++)u in r && (s[u] = t.call(o, r[u], u, n));
- return s
- }), Array.prototype.filter || (Array.prototype.filter = function (t) {
- var n = q(this), r = g && a(this) == "[object String]" ? this.split("") : n, i = r.length >>> 0, s = [], o, u = arguments[1];
- if (a(t) != "[object Function]")throw new TypeError(t + " is not a function");
- for (var f = 0; f < i; f++)f in r && (o = r[f], t.call(u, o, f, n) && s.push(o));
- return s
- }), Array.prototype.every || (Array.prototype.every = function (t) {
- var n = q(this), r = g && a(this) == "[object String]" ? this.split("") : n, i = r.length >>> 0, s = arguments[1];
- if (a(t) != "[object Function]")throw new TypeError(t + " is not a function");
- for (var o = 0; o < i; o++)if (o in r && !t.call(s, r[o], o, n))return!1;
- return!0
- }), Array.prototype.some || (Array.prototype.some = function (t) {
- var n = q(this), r = g && a(this) == "[object String]" ? this.split("") : n, i = r.length >>> 0, s = arguments[1];
- if (a(t) != "[object Function]")throw new TypeError(t + " is not a function");
- for (var o = 0; o < i; o++)if (o in r && t.call(s, r[o], o, n))return!0;
- return!1
- }), Array.prototype.reduce || (Array.prototype.reduce = function (t) {
- var n = q(this), r = g && a(this) == "[object String]" ? this.split("") : n, i = r.length >>> 0;
- if (a(t) != "[object Function]")throw new TypeError(t + " is not a function");
- if (!i && arguments.length == 1)throw new TypeError("reduce of empty array with no initial value");
- var s = 0, o;
- if (arguments.length >= 2)o = arguments[1]; else do {
- if (s in r) {
- o = r[s++];
- break
- }
- if (++s >= i)throw new TypeError("reduce of empty array with no initial value")
- } while (!0);
- for (; s < i; s++)s in r && (o = t.call(void 0, o, r[s], s, n));
- return o
- }), Array.prototype.reduceRight || (Array.prototype.reduceRight = function (t) {
- var n = q(this), r = g && a(this) == "[object String]" ? this.split("") : n, i = r.length >>> 0;
- if (a(t) != "[object Function]")throw new TypeError(t + " is not a function");
- if (!i && arguments.length == 1)throw new TypeError("reduceRight of empty array with no initial value");
- var s, o = i - 1;
- if (arguments.length >= 2)s = arguments[1]; else do {
- if (o in r) {
- s = r[o--];
- break
- }
- if (--o < 0)throw new TypeError("reduceRight of empty array with no initial value")
- } while (!0);
- do o in this && (s = t.call(void 0, s, r[o], o, n)); while (o--);
- return s
- });
- if (!Array.prototype.indexOf || [0, 1].indexOf(1, 2) != -1)Array.prototype.indexOf = function (t) {
- var n = g && a(this) == "[object String]" ? this.split("") : q(this), r = n.length >>> 0;
- if (!r)return-1;
- var i = 0;
- arguments.length > 1 && (i = j(arguments[1])), i = i >= 0 ? i : Math.max(0, r + i);
- for (; i < r; i++)if (i in n && n[i] === t)return i;
- return-1
- };
- if (!Array.prototype.lastIndexOf || [0, 1].lastIndexOf(0, -3) != -1)Array.prototype.lastIndexOf = function (t) {
- var n = g && a(this) == "[object String]" ? this.split("") : q(this), r = n.length >>> 0;
- if (!r)return-1;
- var i = r - 1;
- arguments.length > 1 && (i = Math.min(i, j(arguments[1]))), i = i >= 0 ? i : r - Math.abs(i);
- for (; i >= 0; i--)if (i in n && t === n[i])return i;
- return-1
- };
- Object.getPrototypeOf || (Object.getPrototypeOf = function (t) {
- return t.__proto__ || (t.constructor ? t.constructor.prototype : o)
- });
- if (!Object.getOwnPropertyDescriptor) {
- var y = "Object.getOwnPropertyDescriptor called on a non-object: ";
- Object.getOwnPropertyDescriptor = function (t, n) {
- if (typeof t != "object" && typeof t != "function" || t === null)throw new TypeError(y + t);
- if (!f(t, n))return;
- var r, i, s;
- r = {enumerable: !0, configurable: !0};
- if (d) {
- var u = t.__proto__;
- t.__proto__ = o;
- var i = h(t, n), s = p(t, n);
- t.__proto__ = u;
- if (i || s)return i && (r.get = i), s && (r.set = s), r
- }
- return r.value = t[n], r
- }
- }
- Object.getOwnPropertyNames || (Object.getOwnPropertyNames = function (t) {
- return Object.keys(t)
- });
- if (!Object.create) {
- var b;
- Object.prototype.__proto__ === null ? b = function () {
- return{__proto__: null}
- } : b = function () {
- var e = {};
- for (var t in e)e[t] = null;
- return e.constructor = e.hasOwnProperty = e.propertyIsEnumerable = e.isPrototypeOf = e.toLocaleString = e.toString = e.valueOf = e.__proto__ = null, e
- }, Object.create = function (t, n) {
- var r;
- if (t === null)r = b(); else {
- if (typeof t != "object")throw new TypeError("typeof prototype[" + typeof t + "] != 'object'");
- var i = function () {
- };
- i.prototype = t, r = new i, r.__proto__ = t
- }
- return n !== void 0 && Object.defineProperties(r, n), r
- }
- }
- if (Object.defineProperty) {
- var E = w({}), S = typeof document == "undefined" || w(document.createElement("div"));
- if (!E || !S)var x = Object.defineProperty
- }
- if (!Object.defineProperty || x) {
- var T = "Property description must be an object: ", N = "Object.defineProperty called on non-object: ", C = "getters & setters can not be defined on this javascript engine";
- Object.defineProperty = function (t, n, r) {
- if (typeof t != "object" && typeof t != "function" || t === null)throw new TypeError(N + t);
- if (typeof r != "object" && typeof r != "function" || r === null)throw new TypeError(T + r);
- if (x)try {
- return x.call(Object, t, n, r)
- } catch (i) {
- }
- if (f(r, "value"))if (d && (h(t, n) || p(t, n))) {
- var s = t.__proto__;
- t.__proto__ = o, delete t[n], t[n] = r.value, t.__proto__ = s
- } else t[n] = r.value; else {
- if (!d)throw new TypeError(C);
- f(r, "get") && l(t, n, r.get), f(r, "set") && c(t, n, r.set)
- }
- return t
- }
- }
- Object.defineProperties || (Object.defineProperties = function (t, n) {
- for (var r in n)f(n, r) && Object.defineProperty(t, r, n[r]);
- return t
- }), Object.seal || (Object.seal = function (t) {
- return t
- }), Object.freeze || (Object.freeze = function (t) {
- return t
- });
- try {
- Object.freeze(function () {
- })
- } catch (k) {
- Object.freeze = function (t) {
- return function (n) {
- return typeof n == "function" ? n : t(n)
- }
- }(Object.freeze)
- }
- Object.preventExtensions || (Object.preventExtensions = function (t) {
- return t
- }), Object.isSealed || (Object.isSealed = function (t) {
- return!1
- }), Object.isFrozen || (Object.isFrozen = function (t) {
- return!1
- }), Object.isExtensible || (Object.isExtensible = function (t) {
- if (Object(t) === t)throw new TypeError;
- var n = "";
- while (f(t, n))n += "?";
- t[n] = !0;
- var r = f(t, n);
- return delete t[n], r
- });
- if (!Object.keys) {
- var L = !0, A = ["toString", "toLocaleString", "valueOf", "hasOwnProperty", "isPrototypeOf", "propertyIsEnumerable", "constructor"], O = A.length;
- for (var M in{toString: null})L = !1;
- Object.keys = function R(e) {
- if (typeof e != "object" && typeof e != "function" || e === null)throw new TypeError("Object.keys called on a non-object");
- var R = [];
- for (var t in e)f(e, t) && R.push(t);
- if (L)for (var n = 0, r = O; n < r; n++) {
- var i = A[n];
- f(e, i) && R.push(i)
- }
- return R
- }
- }
- Date.now || (Date.now = function () {
- return(new Date).getTime()
- });
- if ("0".split(void 0, 0).length) {
- var _ = String.prototype.split;
- String.prototype.split = function (e, t) {
- return e === void 0 && t === 0 ? [] : _.apply(this, arguments)
- }
- }
- if ("".substr && "0b".substr(-1) !== "b") {
- var D = String.prototype.substr;
- String.prototype.substr = function (e, t) {
- return D.call(this, e < 0 ? (e = this.length + e) < 0 ? 0 : e : e, t)
- }
- }
- var P = " \n\f\r Â áš€á Žâ€€â€â€‚         âŸã€€\u2028\u2029";
- if (!String.prototype.trim || P.trim()) {
- P = "[" + P + "]";
- var H = new RegExp("^" + P + P + "*"), B = new RegExp(P + P + "*$");
- String.prototype.trim = function () {
- if (this === undefined || this === null)throw new TypeError("can't convert " + this + " to object");
- return String(this).replace(H, "").replace(B, "")
- }
- }
- var q = function (e) {
- if (e == null)throw new TypeError("can't convert " + e + " to object");
- return Object(e)
- }
-}), define("ace/lib/event_emitter", ["require", "exports", "module"], function (e, t, n) {
- var r = {};
- r._emit = r._dispatchEvent = function (e, t) {
- this._eventRegistry = this._eventRegistry || {}, this._defaultHandlers = this._defaultHandlers || {};
- var n = this._eventRegistry[e] || [], r = this._defaultHandlers[e];
- if (!n.length && !r)return;
- if (typeof t != "object" || !t)t = {};
- t.type || (t.type = e), t.stopPropagation || (t.stopPropagation = function () {
- this.propagationStopped = !0
- }), t.preventDefault || (t.preventDefault = function () {
- this.defaultPrevented = !0
- });
- for (var i = 0; i < n.length; i++) {
- n[i](t);
- if (t.propagationStopped)break
- }
- if (r && !t.defaultPrevented)return r(t)
- }, r.setDefaultHandler = function (e, t) {
- this._defaultHandlers = this._defaultHandlers || {};
- if (this._defaultHandlers[e])throw new Error("The default handler for '" + e + "' is already set");
- this._defaultHandlers[e] = t
- }, r.on = r.addEventListener = function (e, t) {
- this._eventRegistry = this._eventRegistry || {};
- var n = this._eventRegistry[e];
- n || (n = this._eventRegistry[e] = []), n.indexOf(t) == -1 && n.push(t)
- }, r.removeListener = r.removeEventListener = function (e, t) {
- this._eventRegistry = this._eventRegistry || {};
- var n = this._eventRegistry[e];
- if (!n)return;
- var r = n.indexOf(t);
- r !== -1 && n.splice(r, 1)
- }, r.removeAllListeners = function (e) {
- this._eventRegistry && (this._eventRegistry[e] = [])
- }, t.EventEmitter = r
-}), define("ace/lib/oop", ["require", "exports", "module"], function (e, t, n) {
- t.inherits = function () {
- var e = function () {
- };
- return function (t, n) {
- e.prototype = n.prototype, t.super_ = n.prototype, t.prototype = new e, t.prototype.constructor = t
- }
- }(), t.mixin = function (e, t) {
- for (var n in t)e[n] = t[n]
- }, t.implement = function (e, n) {
- t.mixin(e, n)
- }
-}), define("ace/mode/json_worker", ["require", "exports", "module", "ace/lib/oop", "ace/worker/mirror", "ace/mode/json/json_parse"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("../worker/mirror").Mirror, s = e("./json/json_parse"), o = t.JsonWorker = function (e) {
- i.call(this, e), this.setTimeout(200)
- };
- r.inherits(o, i), function () {
- this.onUpdate = function () {
- var e = this.doc.getValue();
- try {
- var t = s(e)
- } catch (n) {
- var r = this.doc.indexToPosition(n.at - 1);
- this.sender.emit("error", {row: r.row, column: r.column, text: n.message, type: "error"});
- return
- }
- this.sender.emit("ok")
- }
- }.call(o.prototype)
-}), define("ace/worker/mirror", ["require", "exports", "module", "ace/document", "ace/lib/lang"], function (e, t, n) {
- var r = e("../document").Document, i = e("../lib/lang"), s = t.Mirror = function (e) {
- this.sender = e;
- var t = this.doc = new r(""), n = this.deferredUpdate = i.deferredCall(this.onUpdate.bind(this)), s = this;
- e.on("change", function (e) {
- t.applyDeltas([e.data]), n.schedule(s.$timeout)
- })
- };
- (function () {
- this.$timeout = 500, this.setTimeout = function (e) {
- this.$timeout = e
- }, this.setValue = function (e) {
- this.doc.setValue(e), this.deferredUpdate.schedule(this.$timeout)
- }, this.getValue = function (e) {
- this.sender.callback(this.doc.getValue(), e)
- }, this.onUpdate = function () {
- }
- }).call(s.prototype)
-}), define("ace/document", ["require", "exports", "module", "ace/lib/oop", "ace/lib/event_emitter", "ace/range", "ace/anchor"], function (e, t, n) {
- var r = e("./lib/oop"), i = e("./lib/event_emitter").EventEmitter, s = e("./range").Range, o = e("./anchor").Anchor, u = function (e) {
- this.$lines = [], e.length == 0 ? this.$lines = [""] : Array.isArray(e) ? this.insertLines(0, e) : this.insert({row: 0, column: 0}, e)
- };
- (function () {
- r.implement(this, i), this.setValue = function (e) {
- var t = this.getLength();
- this.remove(new s(0, 0, t, this.getLine(t - 1).length)), this.insert({row: 0, column: 0}, e)
- }, this.getValue = function () {
- return this.getAllLines().join(this.getNewLineCharacter())
- }, this.createAnchor = function (e, t) {
- return new o(this, e, t)
- }, "aaa".split(/a/).length == 0 ? this.$split = function (e) {
- return e.replace(/\r\n|\r/g, "\n").split("\n")
- } : this.$split = function (e) {
- return e.split(/\r\n|\r|\n/)
- }, this.$detectNewLine = function (e) {
- var t = e.match(/^.*?(\r\n|\r|\n)/m);
- t ? this.$autoNewLine = t[1] : this.$autoNewLine = "\n"
- }, this.getNewLineCharacter = function () {
- switch (this.$newLineMode) {
- case"windows":
- return"\r\n";
- case"unix":
- return"\n";
- default:
- return this.$autoNewLine
- }
- }, this.$autoNewLine = "\n", this.$newLineMode = "auto", this.setNewLineMode = function (e) {
- if (this.$newLineMode === e)return;
- this.$newLineMode = e
- }, this.getNewLineMode = function () {
- return this.$newLineMode
- }, this.isNewLine = function (e) {
- return e == "\r\n" || e == "\r" || e == "\n"
- }, this.getLine = function (e) {
- return this.$lines[e] || ""
- }, this.getLines = function (e, t) {
- return this.$lines.slice(e, t + 1)
- }, this.getAllLines = function () {
- return this.getLines(0, this.getLength())
- }, this.getLength = function () {
- return this.$lines.length
- }, this.getTextRange = function (e) {
- if (e.start.row == e.end.row)return this.$lines[e.start.row].substring(e.start.column, e.end.column);
- var t = this.getLines(e.start.row + 1, e.end.row - 1);
- return t.unshift((this.$lines[e.start.row] || "").substring(e.start.column)), t.push((this.$lines[e.end.row] || "").substring(0, e.end.column)), t.join(this.getNewLineCharacter())
- }, this.$clipPosition = function (e) {
- var t = this.getLength();
- return e.row >= t && (e.row = Math.max(0, t - 1), e.column = this.getLine(t - 1).length), e
- }, this.insert = function (e, t) {
- if (!t || t.length === 0)return e;
- e = this.$clipPosition(e), this.getLength() <= 1 && this.$detectNewLine(t);
- var n = this.$split(t), r = n.splice(0, 1)[0], i = n.length == 0 ? null : n.splice(n.length - 1, 1)[0];
- return e = this.insertInLine(e, r), i !== null && (e = this.insertNewLine(e), e = this.insertLines(e.row, n), e = this.insertInLine(e, i || "")), e
- }, this.insertLines = function (e, t) {
- if (t.length == 0)return{row: e, column: 0};
- if (t.length > 65535) {
- var n = this.insertLines(e, t.slice(65535));
- t = t.slice(0, 65535)
- }
- var r = [e, 0];
- r.push.apply(r, t), this.$lines.splice.apply(this.$lines, r);
- var i = new s(e, 0, e + t.length, 0), o = {action: "insertLines", range: i, lines: t};
- return this._emit("change", {data: o}), n || i.end
- }, this.insertNewLine = function (e) {
- e = this.$clipPosition(e);
- var t = this.$lines[e.row] || "";
- this.$lines[e.row] = t.substring(0, e.column), this.$lines.splice(e.row + 1, 0, t.substring(e.column, t.length));
- var n = {row: e.row + 1, column: 0}, r = {action: "insertText", range: s.fromPoints(e, n), text: this.getNewLineCharacter()};
- return this._emit("change", {data: r}), n
- }, this.insertInLine = function (e, t) {
- if (t.length == 0)return e;
- var n = this.$lines[e.row] || "";
- this.$lines[e.row] = n.substring(0, e.column) + t + n.substring(e.column);
- var r = {row: e.row, column: e.column + t.length}, i = {action: "insertText", range: s.fromPoints(e, r), text: t};
- return this._emit("change", {data: i}), r
- }, this.remove = function (e) {
- e.start = this.$clipPosition(e.start), e.end = this.$clipPosition(e.end);
- if (e.isEmpty())return e.start;
- var t = e.start.row, n = e.end.row;
- if (e.isMultiLine()) {
- var r = e.start.column == 0 ? t : t + 1, i = n - 1;
- e.end.column > 0 && this.removeInLine(n, 0, e.end.column), i >= r && this.removeLines(r, i), r != t && (this.removeInLine(t, e.start.column, this.getLine(t).length), this.removeNewLine(e.start.row))
- } else this.removeInLine(t, e.start.column, e.end.column);
- return e.start
- }, this.removeInLine = function (e, t, n) {
- if (t == n)return;
- var r = new s(e, t, e, n), i = this.getLine(e), o = i.substring(t, n), u = i.substring(0, t) + i.substring(n, i.length);
- this.$lines.splice(e, 1, u);
- var a = {action: "removeText", range: r, text: o};
- return this._emit("change", {data: a}), r.start
- }, this.removeLines = function (e, t) {
- var n = new s(e, 0, t + 1, 0), r = this.$lines.splice(e, t - e + 1), i = {action: "removeLines", range: n, nl: this.getNewLineCharacter(), lines: r};
- return this._emit("change", {data: i}), r
- }, this.removeNewLine = function (e) {
- var t = this.getLine(e), n = this.getLine(e + 1), r = new s(e, t.length, e + 1, 0), i = t + n;
- this.$lines.splice(e, 2, i);
- var o = {action: "removeText", range: r, text: this.getNewLineCharacter()};
- this._emit("change", {data: o})
- }, this.replace = function (e, t) {
- if (t.length == 0 && e.isEmpty())return e.start;
- if (t == this.getTextRange(e))return e.end;
- this.remove(e);
- if (t)var n = this.insert(e.start, t); else n = e.start;
- return n
- }, this.applyDeltas = function (e) {
- for (var t = 0; t < e.length; t++) {
- var n = e[t], r = s.fromPoints(n.range.start, n.range.end);
- n.action == "insertLines" ? this.insertLines(r.start.row, n.lines) : n.action == "insertText" ? this.insert(r.start, n.text) : n.action == "removeLines" ? this.removeLines(r.start.row, r.end.row - 1) : n.action == "removeText" && this.remove(r)
- }
- }, this.revertDeltas = function (e) {
- for (var t = e.length - 1; t >= 0; t--) {
- var n = e[t], r = s.fromPoints(n.range.start, n.range.end);
- n.action == "insertLines" ? this.removeLines(r.start.row, r.end.row - 1) : n.action == "insertText" ? this.remove(r) : n.action == "removeLines" ? this.insertLines(r.start.row, n.lines) : n.action == "removeText" && this.insert(r.start, n.text)
- }
- }, this.indexToPosition = function (e, t) {
- var n = this.$lines || this.getAllLines(), r = this.getNewLineCharacter().length;
- for (var i = t || 0, s = n.length; i < s; i++) {
- e -= n[i].length + r;
- if (e < 0)return{row: i, column: e + n[i].length + r}
- }
- return{row: s - 1, column: n[s - 1].length}
- }, this.positionToIndex = function (e, t) {
- var n = this.$lines || this.getAllLines(), r = this.getNewLineCharacter().length, i = 0, s = Math.min(e.row, n.length);
- for (var o = t || 0; o < s; ++o)i += n[o].length;
- return i + r * o + e.column
- }
- }).call(u.prototype), t.Document = u
-}), define("ace/range", ["require", "exports", "module"], function (e, t, n) {
- var r = function (e, t, n, r) {
- this.start = {row: e, column: t}, this.end = {row: n, column: r}
- };
- (function () {
- this.isEqual = function (e) {
- return this.start.row == e.start.row && this.end.row == e.end.row && this.start.column == e.start.column && this.end.column == e.end.column
- }, this.toString = function () {
- return"Range: [" + this.start.row + "/" + this.start.column + "] -> [" + this.end.row + "/" + this.end.column + "]"
- }, this.contains = function (e, t) {
- return this.compare(e, t) == 0
- }, this.compareRange = function (e) {
- var t, n = e.end, r = e.start;
- return t = this.compare(n.row, n.column), t == 1 ? (t = this.compare(r.row, r.column), t == 1 ? 2 : t == 0 ? 1 : 0) : t == -1 ? -2 : (t = this.compare(r.row, r.column), t == -1 ? -1 : t == 1 ? 42 : 0)
- }, this.comparePoint = function (e) {
- return this.compare(e.row, e.column)
- }, this.containsRange = function (e) {
- return this.comparePoint(e.start) == 0 && this.comparePoint(e.end) == 0
- }, this.intersects = function (e) {
- var t = this.compareRange(e);
- return t == -1 || t == 0 || t == 1
- }, this.isEnd = function (e, t) {
- return this.end.row == e && this.end.column == t
- }, this.isStart = function (e, t) {
- return this.start.row == e && this.start.column == t
- }, this.setStart = function (e, t) {
- typeof e == "object" ? (this.start.column = e.column, this.start.row = e.row) : (this.start.row = e, this.start.column = t)
- }, this.setEnd = function (e, t) {
- typeof e == "object" ? (this.end.column = e.column, this.end.row = e.row) : (this.end.row = e, this.end.column = t)
- }, this.inside = function (e, t) {
- return this.compare(e, t) == 0 ? this.isEnd(e, t) || this.isStart(e, t) ? !1 : !0 : !1
- }, this.insideStart = function (e, t) {
- return this.compare(e, t) == 0 ? this.isEnd(e, t) ? !1 : !0 : !1
- }, this.insideEnd = function (e, t) {
- return this.compare(e, t) == 0 ? this.isStart(e, t) ? !1 : !0 : !1
- }, this.compare = function (e, t) {
- return!this.isMultiLine() && e === this.start.row ? t < this.start.column ? -1 : t > this.end.column ? 1 : 0 : e < this.start.row ? -1 : e > this.end.row ? 1 : this.start.row === e ? t >= this.start.column ? 0 : -1 : this.end.row === e ? t <= this.end.column ? 0 : 1 : 0
- }, this.compareStart = function (e, t) {
- return this.start.row == e && this.start.column == t ? -1 : this.compare(e, t)
- }, this.compareEnd = function (e, t) {
- return this.end.row == e && this.end.column == t ? 1 : this.compare(e, t)
- }, this.compareInside = function (e, t) {
- return this.end.row == e && this.end.column == t ? 1 : this.start.row == e && this.start.column == t ? -1 : this.compare(e, t)
- }, this.clipRows = function (e, t) {
- if (this.end.row > t)var n = {row: t + 1, column: 0};
- if (this.start.row > t)var i = {row: t + 1, column: 0};
- if (this.start.row < e)var i = {row: e, column: 0};
- if (this.end.row < e)var n = {row: e, column: 0};
- return r.fromPoints(i || this.start, n || this.end)
- }, this.extend = function (e, t) {
- var n = this.compare(e, t);
- if (n == 0)return this;
- if (n == -1)var i = {row: e, column: t}; else var s = {row: e, column: t};
- return r.fromPoints(i || this.start, s || this.end)
- }, this.isEmpty = function () {
- return this.start.row == this.end.row && this.start.column == this.end.column
- }, this.isMultiLine = function () {
- return this.start.row !== this.end.row
- }, this.clone = function () {
- return r.fromPoints(this.start, this.end)
- }, this.collapseRows = function () {
- return this.end.column == 0 ? new r(this.start.row, 0, Math.max(this.start.row, this.end.row - 1), 0) : new r(this.start.row, 0, this.end.row, 0)
- }, this.toScreenRange = function (e) {
- var t = e.documentToScreenPosition(this.start), n = e.documentToScreenPosition(this.end);
- return new r(t.row, t.column, n.row, n.column)
- }
- }).call(r.prototype), r.fromPoints = function (e, t) {
- return new r(e.row, e.column, t.row, t.column)
- }, t.Range = r
-}), define("ace/anchor", ["require", "exports", "module", "ace/lib/oop", "ace/lib/event_emitter"], function (e, t, n) {
- var r = e("./lib/oop"), i = e("./lib/event_emitter").EventEmitter, s = t.Anchor = function (e, t, n) {
- this.document = e, typeof n == "undefined" ? this.setPosition(t.row, t.column) : this.setPosition(t, n), this.$onChange = this.onChange.bind(this), e.on("change", this.$onChange)
- };
- (function () {
- r.implement(this, i), this.getPosition = function () {
- return this.$clipPositionToDocument(this.row, this.column)
- }, this.getDocument = function () {
- return this.document
- }, this.onChange = function (e) {
- var t = e.data, n = t.range;
- if (n.start.row == n.end.row && n.start.row != this.row)return;
- if (n.start.row > this.row)return;
- if (n.start.row == this.row && n.start.column > this.column)return;
- var r = this.row, i = this.column;
- t.action === "insertText" ? n.start.row === r && n.start.column <= i ? n.start.row === n.end.row ? i += n.end.column - n.start.column : (i -= n.start.column, r += n.end.row - n.start.row) : n.start.row !== n.end.row && n.start.row < r && (r += n.end.row - n.start.row) : t.action === "insertLines" ? n.start.row <= r && (r += n.end.row - n.start.row) : t.action == "removeText" ? n.start.row == r && n.start.column < i ? n.end.column >= i ? i = n.start.column : i = Math.max(0, i - (n.end.column - n.start.column)) : n.start.row !== n.end.row && n.start.row < r ? (n.end.row == r && (i = Math.max(0, i - n.end.column) + n.start.column), r -= n.end.row - n.start.row) : n.end.row == r && (r -= n.end.row - n.start.row, i = Math.max(0, i - n.end.column) + n.start.column) : t.action == "removeLines" && n.start.row <= r && (n.end.row <= r ? r -= n.end.row - n.start.row : (r = n.start.row, i = 0)), this.setPosition(r, i, !0)
- }, this.setPosition = function (e, t, n) {
- var r;
- n ? r = {row: e, column: t} : r = this.$clipPositionToDocument(e, t);
- if (this.row == r.row && this.column == r.column)return;
- var i = {row: this.row, column: this.column};
- this.row = r.row, this.column = r.column, this._emit("change", {old: i, value: r})
- }, this.detach = function () {
- this.document.removeEventListener("change", this.$onChange)
- }, this.$clipPositionToDocument = function (e, t) {
- var n = {};
- return e >= this.document.getLength() ? (n.row = Math.max(0, this.document.getLength() - 1), n.column = this.document.getLine(n.row).length) : e < 0 ? (n.row = 0, n.column = 0) : (n.row = e, n.column = Math.min(this.document.getLine(n.row).length, Math.max(0, t))), t < 0 && (n.column = 0), n
- }
- }).call(s.prototype)
-}), define("ace/lib/lang", ["require", "exports", "module"], function (e, t, n) {
- t.stringReverse = function (e) {
- return e.split("").reverse().join("")
- }, t.stringRepeat = function (e, t) {
- var n = "";
- while (t > 0) {
- t & 1 && (n += e);
- if (t >>= 1)e += e
- }
- return n
- };
- var r = /^\s\s*/, i = /\s\s*$/;
- t.stringTrimLeft = function (e) {
- return e.replace(r, "")
- }, t.stringTrimRight = function (e) {
- return e.replace(i, "")
- }, t.copyObject = function (e) {
- var t = {};
- for (var n in e)t[n] = e[n];
- return t
- }, t.copyArray = function (e) {
- var t = [];
- for (var n = 0, r = e.length; n < r; n++)e[n] && typeof e[n] == "object" ? t[n] = this.copyObject(e[n]) : t[n] = e[n];
- return t
- }, t.deepCopy = function (e) {
- if (typeof e != "object")return e;
- var t = e.constructor();
- for (var n in e)typeof e[n] == "object" ? t[n] = this.deepCopy(e[n]) : t[n] = e[n];
- return t
- }, t.arrayToMap = function (e) {
- var t = {};
- for (var n = 0; n < e.length; n++)t[e[n]] = 1;
- return t
- }, t.createMap = function (e) {
- var t = Object.create(null);
- for (var n in e)t[n] = e[n];
- return t
- }, t.arrayRemove = function (e, t) {
- for (var n = 0; n <= e.length; n++)t === e[n] && e.splice(n, 1)
- }, t.escapeRegExp = function (e) {
- return e.replace(/([.*+?^${}()|[\]\/\\])/g, "\\$1")
- }, t.escapeHTML = function (e) {
- return e.replace(/&/g, "&").replace(/"/g, """).replace(/'/g, "'").replace(/= "0" && i <= "9")t += i, a();
- if (i === ".") {
- t += ".";
- while (a() && i >= "0" && i <= "9")t += i
- }
- if (i === "e" || i === "E") {
- t += i, a();
- if (i === "-" || i === "+")t += i, a();
- while (i >= "0" && i <= "9")t += i, a()
- }
- e = +t;
- if (!isNaN(e))return e;
- u("Bad number")
- }, l = function () {
- var e, t, n = "", r;
- if (i === '"')while (a()) {
- if (i === '"')return a(), n;
- if (i === "\\") {
- a();
- if (i === "u") {
- r = 0;
- for (t = 0; t < 4; t += 1) {
- e = parseInt(a(), 16);
- if (!isFinite(e))break;
- r = r * 16 + e
- }
- n += String.fromCharCode(r)
- } else {
- if (typeof s[i] != "string")break;
- n += s[i]
- }
- } else n += i
- }
- u("Bad string")
- }, c = function () {
- while (i && i <= " ")a()
- }, h = function () {
- switch (i) {
- case"t":
- return a("t"), a("r"), a("u"), a("e"), !0;
- case"f":
- return a("f"), a("a"), a("l"), a("s"), a("e"), !1;
- case"n":
- return a("n"), a("u"), a("l"), a("l"), null
- }
- u("Unexpected '" + i + "'")
- }, p, d = function () {
- var e = [];
- if (i === "[") {
- a("["), c();
- if (i === "]")return a("]"), e;
- while (i) {
- e.push(p()), c();
- if (i === "]")return a("]"), e;
- a(","), c()
- }
- }
- u("Bad array")
- }, v = function () {
- var e, t = {};
- if (i === "{") {
- a("{"), c();
- if (i === "}")return a("}"), t;
- while (i) {
- e = l(), c(), a(":"), Object.hasOwnProperty.call(t, e) && u('Duplicate key "' + e + '"'), t[e] = p(), c();
- if (i === "}")return a("}"), t;
- a(","), c()
- }
- }
- u("Bad object")
- };
- return p = function () {
- c();
- switch (i) {
- case"{":
- return v();
- case"[":
- return d();
- case'"':
- return l();
- case"-":
- return f();
- default:
- return i >= "0" && i <= "9" ? f() : h()
- }
- }, function (e, t) {
- var n;
- return o = e, r = 0, i = " ", n = p(), c(), i && u("Syntax error"), typeof t == "function" ? function s(e, n) {
- var r, i, o = e[n];
- if (o && typeof o == "object")for (r in o)Object.hasOwnProperty.call(o, r) && (i = s(o, r), i !== undefined ? o[r] = i : delete o[r]);
- return t.call(e, n, o)
- }({"": n}, "") : n
- }
-})
\ No newline at end of file
diff --git a/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/worker-php.js b/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/worker-php.js
deleted file mode 100644
index 837b69c..0000000
--- a/src/common/lib/vendor/2amigos/yiiwheels/widgets/ace/assets/js/worker-php.js
+++ /dev/null
@@ -1,2003 +0,0 @@
-"no use strict";
-function initBaseUrls(e) {
- require.tlns = e
-}
-function initSender() {
- var e = require(null, "ace/lib/event_emitter").EventEmitter, t = require(null, "ace/lib/oop"), n = function () {
- };
- return function () {
- t.implement(this, e), 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(n.prototype), new n
-}
-if (typeof window != "undefined" && window.document)throw"atempt to load ace worker into main window instead of webWorker";
-var console = {log: function () {
- var e = Array.prototype.slice.call(arguments, 0);
- postMessage({type: "log", data: e})
-}, error: function () {
- var e = Array.prototype.slice.call(arguments, 0);
- postMessage({type: "log", data: e})
-}}, window = {console: console}, normalizeModule = function (e, t) {
- if (t.indexOf("!") !== -1) {
- var n = t.split("!");
- return normalizeModule(e, n[0]) + "!" + normalizeModule(e, n[1])
- }
- if (t.charAt(0) == ".") {
- var r = e.split("/").slice(0, -1).join("/");
- t = r + "/" + t;
- while (t.indexOf(".") !== -1 && i != t) {
- var i = t;
- t = t.replace(/\/\.\//, "/").replace(/[^\/]+\/\.\.\//, "")
- }
- }
- return t
-}, require = function (e, t) {
- if (!t.charAt)throw new Error("worker.js require() accepts only (parentId, id) as arguments");
- t = normalizeModule(e, t);
- var n = require.modules[t];
- if (n)return n.initialized || (n.initialized = !0, n.exports = n.factory().exports), n.exports;
- var r = t.split("/");
- r[0] = require.tlns[r[0]] || r[0];
- var i = r.join("/") + ".js";
- return require.id = t, importScripts(i), require(e, t)
-};
-require.modules = {}, require.tlns = {};
-var define = function (e, t, n) {
- arguments.length == 2 ? (n = t, typeof e != "string" && (t = e, e = require.id)) : arguments.length == 1 && (n = e, e = require.id);
- if (e.indexOf("text!") === 0)return;
- var r = function (t, n) {
- return require(e, t, n)
- };
- require.modules[e] = {factory: function () {
- var e = {exports: {}}, t = n(r, e.exports, e);
- return t && (e.exports = t), e
- }}
-}, main, sender;
-onmessage = function (e) {
- var t = e.data;
- if (t.command) {
- if (!main[t.command])throw new Error("Unknown command:" + t.command);
- main[t.command].apply(main, t.args)
- } else if (t.init) {
- initBaseUrls(t.tlns), require(null, "ace/lib/fixoldbrowsers"), sender = initSender();
- var n = require(null, t.module)[t.classname];
- main = new n(sender)
- } else t.event && sender && sender._emit(t.event, t.data)
-}, define("ace/lib/fixoldbrowsers", ["require", "exports", "module", "ace/lib/regexp", "ace/lib/es5-shim"], function (e, t, n) {
- e("./regexp"), e("./es5-shim")
-}), define("ace/lib/regexp", ["require", "exports", "module"], function (e, t, n) {
- function o(e) {
- return(e.global ? "g" : "") + (e.ignoreCase ? "i" : "") + (e.multiline ? "m" : "") + (e.extended ? "x" : "") + (e.sticky ? "y" : "")
- }
-
- function u(e, t, n) {
- if (Array.prototype.indexOf)return e.indexOf(t, n);
- for (var r = n || 0; r < e.length; r++)if (e[r] === t)return r;
- return-1
- }
-
- var r = {exec: RegExp.prototype.exec, test: RegExp.prototype.test, match: String.prototype.match, replace: String.prototype.replace, split: String.prototype.split}, i = r.exec.call(/()??/, "")[1] === undefined, s = function () {
- var e = /^/g;
- return r.test.call(e, ""), !e.lastIndex
- }();
- if (s && i)return;
- RegExp.prototype.exec = function (e) {
- var t = r.exec.apply(this, arguments), n, a;
- if (typeof e == "string" && t) {
- !i && t.length > 1 && u(t, "") > -1 && (a = RegExp(this.source, r.replace.call(o(this), "g", "")), r.replace.call(e.slice(t.index), a, function () {
- for (var e = 1; e < arguments.length - 2; e++)arguments[e] === undefined && (t[e] = undefined)
- }));
- if (this._xregexp && this._xregexp.captureNames)for (var f = 1; f < t.length; f++)n = this._xregexp.captureNames[f - 1], n && (t[n] = t[f]);
- !s && this.global && !t[0].length && this.lastIndex > t.index && this.lastIndex--
- }
- return t
- }, s || (RegExp.prototype.test = function (e) {
- var t = r.exec.call(this, e);
- return t && this.global && !t[0].length && this.lastIndex > t.index && this.lastIndex--, !!t
- })
-}), define("ace/lib/es5-shim", ["require", "exports", "module"], function (e, t, n) {
- function r() {
- }
-
- function w(e) {
- try {
- return Object.defineProperty(e, "sentinel", {}), "sentinel"in e
- } catch (t) {
- }
- }
-
- function j(e) {
- return e = +e, e !== e ? e = 0 : e !== 0 && e !== 1 / 0 && e !== -1 / 0 && (e = (e > 0 || -1) * Math.floor(Math.abs(e))), e
- }
-
- function F(e) {
- var t = typeof e;
- return e === null || t === "undefined" || t === "boolean" || t === "number" || t === "string"
- }
-
- function I(e) {
- var t, n, r;
- if (F(e))return e;
- n = e.valueOf;
- if (typeof n == "function") {
- t = n.call(e);
- if (F(t))return t
- }
- r = e.toString;
- if (typeof r == "function") {
- t = r.call(e);
- if (F(t))return t
- }
- throw new TypeError
- }
-
- Function.prototype.bind || (Function.prototype.bind = function (t) {
- var n = this;
- if (typeof n != "function")throw new TypeError("Function.prototype.bind called on incompatible " + n);
- var i = u.call(arguments, 1), s = function () {
- if (this instanceof s) {
- var e = n.apply(this, i.concat(u.call(arguments)));
- return Object(e) === e ? e : this
- }
- return n.apply(t, i.concat(u.call(arguments)))
- };
- return n.prototype && (r.prototype = n.prototype, s.prototype = new r, r.prototype = null), s
- });
- var i = Function.prototype.call, s = Array.prototype, o = Object.prototype, u = s.slice, a = i.bind(o.toString), f = i.bind(o.hasOwnProperty), l, c, h, p, d;
- if (d = f(o, "__defineGetter__"))l = i.bind(o.__defineGetter__), c = i.bind(o.__defineSetter__), h = i.bind(o.__lookupGetter__), p = i.bind(o.__lookupSetter__);
- if ([1, 2].splice(0).length != 2)if (!function () {
- function e(e) {
- var t = new Array(e + 2);
- return t[0] = t[1] = 0, t
- }
-
- var t = [], n;
- t.splice.apply(t, e(20)), t.splice.apply(t, e(26)), n = t.length, t.splice(5, 0, "XXX"), n + 1 == t.length;
- if (n + 1 == t.length)return!0
- }())Array.prototype.splice = function (e, t) {
- var n = this.length;
- e > 0 ? e > n && (e = n) : e == void 0 ? e = 0 : e < 0 && (e = Math.max(n + e, 0)), e + t < n || (t = n - e);
- var r = this.slice(e, e + t), i = u.call(arguments, 2), s = i.length;
- if (e === n)s && this.push.apply(this, i); else {
- var o = Math.min(t, n - e), a = e + o, f = a + s - o, l = n - a, c = n - o;
- if (f < a)for (var h = 0; h < l; ++h)this[f + h] = this[a + h]; else if (f > a)for (h = l; h--;)this[f + h] = this[a + h];
- if (s && e === c)this.length = c, this.push.apply(this, i); else {
- this.length = c + s;
- for (h = 0; h < s; ++h)this[e + h] = i[h]
- }
- }
- return r
- }; else {
- var v = Array.prototype.splice;
- Array.prototype.splice = function (e, t) {
- return arguments.length ? v.apply(this, [e === void 0 ? 0 : e, t === void 0 ? this.length - e : t].concat(u.call(arguments, 2))) : []
- }
- }
- Array.isArray || (Array.isArray = function (t) {
- return a(t) == "[object Array]"
- });
- var m = Object("a"), g = m[0] != "a" || !(0 in m);
- Array.prototype.forEach || (Array.prototype.forEach = function (t) {
- var n = q(this), r = g && a(this) == "[object String]" ? this.split("") : n, i = arguments[1], s = -1, o = r.length >>> 0;
- if (a(t) != "[object Function]")throw new TypeError;
- while (++s < o)s in r && t.call(i, r[s], s, n)
- }), Array.prototype.map || (Array.prototype.map = function (t) {
- var n = q(this), r = g && a(this) == "[object String]" ? this.split("") : n, i = r.length >>> 0, s = Array(i), o = arguments[1];
- if (a(t) != "[object Function]")throw new TypeError(t + " is not a function");
- for (var u = 0; u < i; u++)u in r && (s[u] = t.call(o, r[u], u, n));
- return s
- }), Array.prototype.filter || (Array.prototype.filter = function (t) {
- var n = q(this), r = g && a(this) == "[object String]" ? this.split("") : n, i = r.length >>> 0, s = [], o, u = arguments[1];
- if (a(t) != "[object Function]")throw new TypeError(t + " is not a function");
- for (var f = 0; f < i; f++)f in r && (o = r[f], t.call(u, o, f, n) && s.push(o));
- return s
- }), Array.prototype.every || (Array.prototype.every = function (t) {
- var n = q(this), r = g && a(this) == "[object String]" ? this.split("") : n, i = r.length >>> 0, s = arguments[1];
- if (a(t) != "[object Function]")throw new TypeError(t + " is not a function");
- for (var o = 0; o < i; o++)if (o in r && !t.call(s, r[o], o, n))return!1;
- return!0
- }), Array.prototype.some || (Array.prototype.some = function (t) {
- var n = q(this), r = g && a(this) == "[object String]" ? this.split("") : n, i = r.length >>> 0, s = arguments[1];
- if (a(t) != "[object Function]")throw new TypeError(t + " is not a function");
- for (var o = 0; o < i; o++)if (o in r && t.call(s, r[o], o, n))return!0;
- return!1
- }), Array.prototype.reduce || (Array.prototype.reduce = function (t) {
- var n = q(this), r = g && a(this) == "[object String]" ? this.split("") : n, i = r.length >>> 0;
- if (a(t) != "[object Function]")throw new TypeError(t + " is not a function");
- if (!i && arguments.length == 1)throw new TypeError("reduce of empty array with no initial value");
- var s = 0, o;
- if (arguments.length >= 2)o = arguments[1]; else do {
- if (s in r) {
- o = r[s++];
- break
- }
- if (++s >= i)throw new TypeError("reduce of empty array with no initial value")
- } while (!0);
- for (; s < i; s++)s in r && (o = t.call(void 0, o, r[s], s, n));
- return o
- }), Array.prototype.reduceRight || (Array.prototype.reduceRight = function (t) {
- var n = q(this), r = g && a(this) == "[object String]" ? this.split("") : n, i = r.length >>> 0;
- if (a(t) != "[object Function]")throw new TypeError(t + " is not a function");
- if (!i && arguments.length == 1)throw new TypeError("reduceRight of empty array with no initial value");
- var s, o = i - 1;
- if (arguments.length >= 2)s = arguments[1]; else do {
- if (o in r) {
- s = r[o--];
- break
- }
- if (--o < 0)throw new TypeError("reduceRight of empty array with no initial value")
- } while (!0);
- do o in this && (s = t.call(void 0, s, r[o], o, n)); while (o--);
- return s
- });
- if (!Array.prototype.indexOf || [0, 1].indexOf(1, 2) != -1)Array.prototype.indexOf = function (t) {
- var n = g && a(this) == "[object String]" ? this.split("") : q(this), r = n.length >>> 0;
- if (!r)return-1;
- var i = 0;
- arguments.length > 1 && (i = j(arguments[1])), i = i >= 0 ? i : Math.max(0, r + i);
- for (; i < r; i++)if (i in n && n[i] === t)return i;
- return-1
- };
- if (!Array.prototype.lastIndexOf || [0, 1].lastIndexOf(0, -3) != -1)Array.prototype.lastIndexOf = function (t) {
- var n = g && a(this) == "[object String]" ? this.split("") : q(this), r = n.length >>> 0;
- if (!r)return-1;
- var i = r - 1;
- arguments.length > 1 && (i = Math.min(i, j(arguments[1]))), i = i >= 0 ? i : r - Math.abs(i);
- for (; i >= 0; i--)if (i in n && t === n[i])return i;
- return-1
- };
- Object.getPrototypeOf || (Object.getPrototypeOf = function (t) {
- return t.__proto__ || (t.constructor ? t.constructor.prototype : o)
- });
- if (!Object.getOwnPropertyDescriptor) {
- var y = "Object.getOwnPropertyDescriptor called on a non-object: ";
- Object.getOwnPropertyDescriptor = function (t, n) {
- if (typeof t != "object" && typeof t != "function" || t === null)throw new TypeError(y + t);
- if (!f(t, n))return;
- var r, i, s;
- r = {enumerable: !0, configurable: !0};
- if (d) {
- var u = t.__proto__;
- t.__proto__ = o;
- var i = h(t, n), s = p(t, n);
- t.__proto__ = u;
- if (i || s)return i && (r.get = i), s && (r.set = s), r
- }
- return r.value = t[n], r
- }
- }
- Object.getOwnPropertyNames || (Object.getOwnPropertyNames = function (t) {
- return Object.keys(t)
- });
- if (!Object.create) {
- var b;
- Object.prototype.__proto__ === null ? b = function () {
- return{__proto__: null}
- } : b = function () {
- var e = {};
- for (var t in e)e[t] = null;
- return e.constructor = e.hasOwnProperty = e.propertyIsEnumerable = e.isPrototypeOf = e.toLocaleString = e.toString = e.valueOf = e.__proto__ = null, e
- }, Object.create = function (t, n) {
- var r;
- if (t === null)r = b(); else {
- if (typeof t != "object")throw new TypeError("typeof prototype[" + typeof t + "] != 'object'");
- var i = function () {
- };
- i.prototype = t, r = new i, r.__proto__ = t
- }
- return n !== void 0 && Object.defineProperties(r, n), r
- }
- }
- if (Object.defineProperty) {
- var E = w({}), S = typeof document == "undefined" || w(document.createElement("div"));
- if (!E || !S)var x = Object.defineProperty
- }
- if (!Object.defineProperty || x) {
- var T = "Property description must be an object: ", N = "Object.defineProperty called on non-object: ", C = "getters & setters can not be defined on this javascript engine";
- Object.defineProperty = function (t, n, r) {
- if (typeof t != "object" && typeof t != "function" || t === null)throw new TypeError(N + t);
- if (typeof r != "object" && typeof r != "function" || r === null)throw new TypeError(T + r);
- if (x)try {
- return x.call(Object, t, n, r)
- } catch (i) {
- }
- if (f(r, "value"))if (d && (h(t, n) || p(t, n))) {
- var s = t.__proto__;
- t.__proto__ = o, delete t[n], t[n] = r.value, t.__proto__ = s
- } else t[n] = r.value; else {
- if (!d)throw new TypeError(C);
- f(r, "get") && l(t, n, r.get), f(r, "set") && c(t, n, r.set)
- }
- return t
- }
- }
- Object.defineProperties || (Object.defineProperties = function (t, n) {
- for (var r in n)f(n, r) && Object.defineProperty(t, r, n[r]);
- return t
- }), Object.seal || (Object.seal = function (t) {
- return t
- }), Object.freeze || (Object.freeze = function (t) {
- return t
- });
- try {
- Object.freeze(function () {
- })
- } catch (k) {
- Object.freeze = function (t) {
- return function (n) {
- return typeof n == "function" ? n : t(n)
- }
- }(Object.freeze)
- }
- Object.preventExtensions || (Object.preventExtensions = function (t) {
- return t
- }), Object.isSealed || (Object.isSealed = function (t) {
- return!1
- }), Object.isFrozen || (Object.isFrozen = function (t) {
- return!1
- }), Object.isExtensible || (Object.isExtensible = function (t) {
- if (Object(t) === t)throw new TypeError;
- var n = "";
- while (f(t, n))n += "?";
- t[n] = !0;
- var r = f(t, n);
- return delete t[n], r
- });
- if (!Object.keys) {
- var L = !0, A = ["toString", "toLocaleString", "valueOf", "hasOwnProperty", "isPrototypeOf", "propertyIsEnumerable", "constructor"], O = A.length;
- for (var M in{toString: null})L = !1;
- Object.keys = function R(e) {
- if (typeof e != "object" && typeof e != "function" || e === null)throw new TypeError("Object.keys called on a non-object");
- var R = [];
- for (var t in e)f(e, t) && R.push(t);
- if (L)for (var n = 0, r = O; n < r; n++) {
- var i = A[n];
- f(e, i) && R.push(i)
- }
- return R
- }
- }
- Date.now || (Date.now = function () {
- return(new Date).getTime()
- });
- if ("0".split(void 0, 0).length) {
- var _ = String.prototype.split;
- String.prototype.split = function (e, t) {
- return e === void 0 && t === 0 ? [] : _.apply(this, arguments)
- }
- }
- if ("".substr && "0b".substr(-1) !== "b") {
- var D = String.prototype.substr;
- String.prototype.substr = function (e, t) {
- return D.call(this, e < 0 ? (e = this.length + e) < 0 ? 0 : e : e, t)
- }
- }
- var P = " \n\f\r Â áš€á Žâ€€â€â€‚         âŸã€€\u2028\u2029";
- if (!String.prototype.trim || P.trim()) {
- P = "[" + P + "]";
- var H = new RegExp("^" + P + P + "*"), B = new RegExp(P + P + "*$");
- String.prototype.trim = function () {
- if (this === undefined || this === null)throw new TypeError("can't convert " + this + " to object");
- return String(this).replace(H, "").replace(B, "")
- }
- }
- var q = function (e) {
- if (e == null)throw new TypeError("can't convert " + e + " to object");
- return Object(e)
- }
-}), define("ace/lib/event_emitter", ["require", "exports", "module"], function (e, t, n) {
- var r = {};
- r._emit = r._dispatchEvent = function (e, t) {
- this._eventRegistry = this._eventRegistry || {}, this._defaultHandlers = this._defaultHandlers || {};
- var n = this._eventRegistry[e] || [], r = this._defaultHandlers[e];
- if (!n.length && !r)return;
- if (typeof t != "object" || !t)t = {};
- t.type || (t.type = e), t.stopPropagation || (t.stopPropagation = function () {
- this.propagationStopped = !0
- }), t.preventDefault || (t.preventDefault = function () {
- this.defaultPrevented = !0
- });
- for (var i = 0; i < n.length; i++) {
- n[i](t);
- if (t.propagationStopped)break
- }
- if (r && !t.defaultPrevented)return r(t)
- }, r.setDefaultHandler = function (e, t) {
- this._defaultHandlers = this._defaultHandlers || {};
- if (this._defaultHandlers[e])throw new Error("The default handler for '" + e + "' is already set");
- this._defaultHandlers[e] = t
- }, r.on = r.addEventListener = function (e, t) {
- this._eventRegistry = this._eventRegistry || {};
- var n = this._eventRegistry[e];
- n || (n = this._eventRegistry[e] = []), n.indexOf(t) == -1 && n.push(t)
- }, r.removeListener = r.removeEventListener = function (e, t) {
- this._eventRegistry = this._eventRegistry || {};
- var n = this._eventRegistry[e];
- if (!n)return;
- var r = n.indexOf(t);
- r !== -1 && n.splice(r, 1)
- }, r.removeAllListeners = function (e) {
- this._eventRegistry && (this._eventRegistry[e] = [])
- }, t.EventEmitter = r
-}), define("ace/lib/oop", ["require", "exports", "module"], function (e, t, n) {
- t.inherits = function () {
- var e = function () {
- };
- return function (t, n) {
- e.prototype = n.prototype, t.super_ = n.prototype, t.prototype = new e, t.prototype.constructor = t
- }
- }(), t.mixin = function (e, t) {
- for (var n in t)e[n] = t[n]
- }, t.implement = function (e, n) {
- t.mixin(e, n)
- }
-}), define("ace/mode/php_worker", ["require", "exports", "module", "ace/lib/oop", "ace/worker/mirror", "ace/mode/php/php"], function (e, t, n) {
- var r = e("../lib/oop"), i = e("../worker/mirror").Mirror, s = e("./php/php").PHP, o = t.PhpWorker = function (e) {
- i.call(this, e), this.setTimeout(500)
- };
- r.inherits(o, i), function () {
- this.onUpdate = function () {
- var e = this.doc.getValue(), t = [], n = s.Lexer(e, {short_open_tag: 1});
- try {
- new s.Parser(n)
- } catch (r) {
- t.push({row: r.line - 1, column: null, text: r.message.charAt(0).toUpperCase() + r.message.substring(1), type: "error"})
- }
- t.length ? this.sender.emit("error", t) : this.sender.emit("ok")
- }
- }.call(o.prototype)
-}), define("ace/worker/mirror", ["require", "exports", "module", "ace/document", "ace/lib/lang"], function (e, t, n) {
- var r = e("../document").Document, i = e("../lib/lang"), s = t.Mirror = function (e) {
- this.sender = e;
- var t = this.doc = new r(""), n = this.deferredUpdate = i.deferredCall(this.onUpdate.bind(this)), s = this;
- e.on("change", function (e) {
- t.applyDeltas([e.data]), n.schedule(s.$timeout)
- })
- };
- (function () {
- this.$timeout = 500, this.setTimeout = function (e) {
- this.$timeout = e
- }, this.setValue = function (e) {
- this.doc.setValue(e), this.deferredUpdate.schedule(this.$timeout)
- }, this.getValue = function (e) {
- this.sender.callback(this.doc.getValue(), e)
- }, this.onUpdate = function () {
- }
- }).call(s.prototype)
-}), define("ace/document", ["require", "exports", "module", "ace/lib/oop", "ace/lib/event_emitter", "ace/range", "ace/anchor"], function (e, t, n) {
- var r = e("./lib/oop"), i = e("./lib/event_emitter").EventEmitter, s = e("./range").Range, o = e("./anchor").Anchor, u = function (e) {
- this.$lines = [], e.length == 0 ? this.$lines = [""] : Array.isArray(e) ? this.insertLines(0, e) : this.insert({row: 0, column: 0}, e)
- };
- (function () {
- r.implement(this, i), this.setValue = function (e) {
- var t = this.getLength();
- this.remove(new s(0, 0, t, this.getLine(t - 1).length)), this.insert({row: 0, column: 0}, e)
- }, this.getValue = function () {
- return this.getAllLines().join(this.getNewLineCharacter())
- }, this.createAnchor = function (e, t) {
- return new o(this, e, t)
- }, "aaa".split(/a/).length == 0 ? this.$split = function (e) {
- return e.replace(/\r\n|\r/g, "\n").split("\n")
- } : this.$split = function (e) {
- return e.split(/\r\n|\r|\n/)
- }, this.$detectNewLine = function (e) {
- var t = e.match(/^.*?(\r\n|\r|\n)/m);
- t ? this.$autoNewLine = t[1] : this.$autoNewLine = "\n"
- }, this.getNewLineCharacter = function () {
- switch (this.$newLineMode) {
- case"windows":
- return"\r\n";
- case"unix":
- return"\n";
- default:
- return this.$autoNewLine
- }
- }, this.$autoNewLine = "\n", this.$newLineMode = "auto", this.setNewLineMode = function (e) {
- if (this.$newLineMode === e)return;
- this.$newLineMode = e
- }, this.getNewLineMode = function () {
- return this.$newLineMode
- }, this.isNewLine = function (e) {
- return e == "\r\n" || e == "\r" || e == "\n"
- }, this.getLine = function (e) {
- return this.$lines[e] || ""
- }, this.getLines = function (e, t) {
- return this.$lines.slice(e, t + 1)
- }, this.getAllLines = function () {
- return this.getLines(0, this.getLength())
- }, this.getLength = function () {
- return this.$lines.length
- }, this.getTextRange = function (e) {
- if (e.start.row == e.end.row)return this.$lines[e.start.row].substring(e.start.column, e.end.column);
- var t = this.getLines(e.start.row + 1, e.end.row - 1);
- return t.unshift((this.$lines[e.start.row] || "").substring(e.start.column)), t.push((this.$lines[e.end.row] || "").substring(0, e.end.column)), t.join(this.getNewLineCharacter())
- }, this.$clipPosition = function (e) {
- var t = this.getLength();
- return e.row >= t && (e.row = Math.max(0, t - 1), e.column = this.getLine(t - 1).length), e
- }, this.insert = function (e, t) {
- if (!t || t.length === 0)return e;
- e = this.$clipPosition(e), this.getLength() <= 1 && this.$detectNewLine(t);
- var n = this.$split(t), r = n.splice(0, 1)[0], i = n.length == 0 ? null : n.splice(n.length - 1, 1)[0];
- return e = this.insertInLine(e, r), i !== null && (e = this.insertNewLine(e), e = this.insertLines(e.row, n), e = this.insertInLine(e, i || "")), e
- }, this.insertLines = function (e, t) {
- if (t.length == 0)return{row: e, column: 0};
- if (t.length > 65535) {
- var n = this.insertLines(e, t.slice(65535));
- t = t.slice(0, 65535)
- }
- var r = [e, 0];
- r.push.apply(r, t), this.$lines.splice.apply(this.$lines, r);
- var i = new s(e, 0, e + t.length, 0), o = {action: "insertLines", range: i, lines: t};
- return this._emit("change", {data: o}), n || i.end
- }, this.insertNewLine = function (e) {
- e = this.$clipPosition(e);
- var t = this.$lines[e.row] || "";
- this.$lines[e.row] = t.substring(0, e.column), this.$lines.splice(e.row + 1, 0, t.substring(e.column, t.length));
- var n = {row: e.row + 1, column: 0}, r = {action: "insertText", range: s.fromPoints(e, n), text: this.getNewLineCharacter()};
- return this._emit("change", {data: r}), n
- }, this.insertInLine = function (e, t) {
- if (t.length == 0)return e;
- var n = this.$lines[e.row] || "";
- this.$lines[e.row] = n.substring(0, e.column) + t + n.substring(e.column);
- var r = {row: e.row, column: e.column + t.length}, i = {action: "insertText", range: s.fromPoints(e, r), text: t};
- return this._emit("change", {data: i}), r
- }, this.remove = function (e) {
- e.start = this.$clipPosition(e.start), e.end = this.$clipPosition(e.end);
- if (e.isEmpty())return e.start;
- var t = e.start.row, n = e.end.row;
- if (e.isMultiLine()) {
- var r = e.start.column == 0 ? t : t + 1, i = n - 1;
- e.end.column > 0 && this.removeInLine(n, 0, e.end.column), i >= r && this.removeLines(r, i), r != t && (this.removeInLine(t, e.start.column, this.getLine(t).length), this.removeNewLine(e.start.row))
- } else this.removeInLine(t, e.start.column, e.end.column);
- return e.start
- }, this.removeInLine = function (e, t, n) {
- if (t == n)return;
- var r = new s(e, t, e, n), i = this.getLine(e), o = i.substring(t, n), u = i.substring(0, t) + i.substring(n, i.length);
- this.$lines.splice(e, 1, u);
- var a = {action: "removeText", range: r, text: o};
- return this._emit("change", {data: a}), r.start
- }, this.removeLines = function (e, t) {
- var n = new s(e, 0, t + 1, 0), r = this.$lines.splice(e, t - e + 1), i = {action: "removeLines", range: n, nl: this.getNewLineCharacter(), lines: r};
- return this._emit("change", {data: i}), r
- }, this.removeNewLine = function (e) {
- var t = this.getLine(e), n = this.getLine(e + 1), r = new s(e, t.length, e + 1, 0), i = t + n;
- this.$lines.splice(e, 2, i);
- var o = {action: "removeText", range: r, text: this.getNewLineCharacter()};
- this._emit("change", {data: o})
- }, this.replace = function (e, t) {
- if (t.length == 0 && e.isEmpty())return e.start;
- if (t == this.getTextRange(e))return e.end;
- this.remove(e);
- if (t)var n = this.insert(e.start, t); else n = e.start;
- return n
- }, this.applyDeltas = function (e) {
- for (var t = 0; t < e.length; t++) {
- var n = e[t], r = s.fromPoints(n.range.start, n.range.end);
- n.action == "insertLines" ? this.insertLines(r.start.row, n.lines) : n.action == "insertText" ? this.insert(r.start, n.text) : n.action == "removeLines" ? this.removeLines(r.start.row, r.end.row - 1) : n.action == "removeText" && this.remove(r)
- }
- }, this.revertDeltas = function (e) {
- for (var t = e.length - 1; t >= 0; t--) {
- var n = e[t], r = s.fromPoints(n.range.start, n.range.end);
- n.action == "insertLines" ? this.removeLines(r.start.row, r.end.row - 1) : n.action == "insertText" ? this.remove(r) : n.action == "removeLines" ? this.insertLines(r.start.row, n.lines) : n.action == "removeText" && this.insert(r.start, n.text)
- }
- }, this.indexToPosition = function (e, t) {
- var n = this.$lines || this.getAllLines(), r = this.getNewLineCharacter().length;
- for (var i = t || 0, s = n.length; i < s; i++) {
- e -= n[i].length + r;
- if (e < 0)return{row: i, column: e + n[i].length + r}
- }
- return{row: s - 1, column: n[s - 1].length}
- }, this.positionToIndex = function (e, t) {
- var n = this.$lines || this.getAllLines(), r = this.getNewLineCharacter().length, i = 0, s = Math.min(e.row, n.length);
- for (var o = t || 0; o < s; ++o)i += n[o].length;
- return i + r * o + e.column
- }
- }).call(u.prototype), t.Document = u
-}), define("ace/range", ["require", "exports", "module"], function (e, t, n) {
- var r = function (e, t, n, r) {
- this.start = {row: e, column: t}, this.end = {row: n, column: r}
- };
- (function () {
- this.isEqual = function (e) {
- return this.start.row == e.start.row && this.end.row == e.end.row && this.start.column == e.start.column && this.end.column == e.end.column
- }, this.toString = function () {
- return"Range: [" + this.start.row + "/" + this.start.column + "] -> [" + this.end.row + "/" + this.end.column + "]"
- }, this.contains = function (e, t) {
- return this.compare(e, t) == 0
- }, this.compareRange = function (e) {
- var t, n = e.end, r = e.start;
- return t = this.compare(n.row, n.column), t == 1 ? (t = this.compare(r.row, r.column), t == 1 ? 2 : t == 0 ? 1 : 0) : t == -1 ? -2 : (t = this.compare(r.row, r.column), t == -1 ? -1 : t == 1 ? 42 : 0)
- }, this.comparePoint = function (e) {
- return this.compare(e.row, e.column)
- }, this.containsRange = function (e) {
- return this.comparePoint(e.start) == 0 && this.comparePoint(e.end) == 0
- }, this.intersects = function (e) {
- var t = this.compareRange(e);
- return t == -1 || t == 0 || t == 1
- }, this.isEnd = function (e, t) {
- return this.end.row == e && this.end.column == t
- }, this.isStart = function (e, t) {
- return this.start.row == e && this.start.column == t
- }, this.setStart = function (e, t) {
- typeof e == "object" ? (this.start.column = e.column, this.start.row = e.row) : (this.start.row = e, this.start.column = t)
- }, this.setEnd = function (e, t) {
- typeof e == "object" ? (this.end.column = e.column, this.end.row = e.row) : (this.end.row = e, this.end.column = t)
- }, this.inside = function (e, t) {
- return this.compare(e, t) == 0 ? this.isEnd(e, t) || this.isStart(e, t) ? !1 : !0 : !1
- }, this.insideStart = function (e, t) {
- return this.compare(e, t) == 0 ? this.isEnd(e, t) ? !1 : !0 : !1
- }, this.insideEnd = function (e, t) {
- return this.compare(e, t) == 0 ? this.isStart(e, t) ? !1 : !0 : !1
- }, this.compare = function (e, t) {
- return!this.isMultiLine() && e === this.start.row ? t < this.start.column ? -1 : t > this.end.column ? 1 : 0 : e < this.start.row ? -1 : e > this.end.row ? 1 : this.start.row === e ? t >= this.start.column ? 0 : -1 : this.end.row === e ? t <= this.end.column ? 0 : 1 : 0
- }, this.compareStart = function (e, t) {
- return this.start.row == e && this.start.column == t ? -1 : this.compare(e, t)
- }, this.compareEnd = function (e, t) {
- return this.end.row == e && this.end.column == t ? 1 : this.compare(e, t)
- }, this.compareInside = function (e, t) {
- return this.end.row == e && this.end.column == t ? 1 : this.start.row == e && this.start.column == t ? -1 : this.compare(e, t)
- }, this.clipRows = function (e, t) {
- if (this.end.row > t)var n = {row: t + 1, column: 0};
- if (this.start.row > t)var i = {row: t + 1, column: 0};
- if (this.start.row < e)var i = {row: e, column: 0};
- if (this.end.row < e)var n = {row: e, column: 0};
- return r.fromPoints(i || this.start, n || this.end)
- }, this.extend = function (e, t) {
- var n = this.compare(e, t);
- if (n == 0)return this;
- if (n == -1)var i = {row: e, column: t}; else var s = {row: e, column: t};
- return r.fromPoints(i || this.start, s || this.end)
- }, this.isEmpty = function () {
- return this.start.row == this.end.row && this.start.column == this.end.column
- }, this.isMultiLine = function () {
- return this.start.row !== this.end.row
- }, this.clone = function () {
- return r.fromPoints(this.start, this.end)
- }, this.collapseRows = function () {
- return this.end.column == 0 ? new r(this.start.row, 0, Math.max(this.start.row, this.end.row - 1), 0) : new r(this.start.row, 0, this.end.row, 0)
- }, this.toScreenRange = function (e) {
- var t = e.documentToScreenPosition(this.start), n = e.documentToScreenPosition(this.end);
- return new r(t.row, t.column, n.row, n.column)
- }
- }).call(r.prototype), r.fromPoints = function (e, t) {
- return new r(e.row, e.column, t.row, t.column)
- }, t.Range = r
-}), define("ace/anchor", ["require", "exports", "module", "ace/lib/oop", "ace/lib/event_emitter"], function (e, t, n) {
- var r = e("./lib/oop"), i = e("./lib/event_emitter").EventEmitter, s = t.Anchor = function (e, t, n) {
- this.document = e, typeof n == "undefined" ? this.setPosition(t.row, t.column) : this.setPosition(t, n), this.$onChange = this.onChange.bind(this), e.on("change", this.$onChange)
- };
- (function () {
- r.implement(this, i), this.getPosition = function () {
- return this.$clipPositionToDocument(this.row, this.column)
- }, this.getDocument = function () {
- return this.document
- }, this.onChange = function (e) {
- var t = e.data, n = t.range;
- if (n.start.row == n.end.row && n.start.row != this.row)return;
- if (n.start.row > this.row)return;
- if (n.start.row == this.row && n.start.column > this.column)return;
- var r = this.row, i = this.column;
- t.action === "insertText" ? n.start.row === r && n.start.column <= i ? n.start.row === n.end.row ? i += n.end.column - n.start.column : (i -= n.start.column, r += n.end.row - n.start.row) : n.start.row !== n.end.row && n.start.row < r && (r += n.end.row - n.start.row) : t.action === "insertLines" ? n.start.row <= r && (r += n.end.row - n.start.row) : t.action == "removeText" ? n.start.row == r && n.start.column < i ? n.end.column >= i ? i = n.start.column : i = Math.max(0, i - (n.end.column - n.start.column)) : n.start.row !== n.end.row && n.start.row < r ? (n.end.row == r && (i = Math.max(0, i - n.end.column) + n.start.column), r -= n.end.row - n.start.row) : n.end.row == r && (r -= n.end.row - n.start.row, i = Math.max(0, i - n.end.column) + n.start.column) : t.action == "removeLines" && n.start.row <= r && (n.end.row <= r ? r -= n.end.row - n.start.row : (r = n.start.row, i = 0)), this.setPosition(r, i, !0)
- }, this.setPosition = function (e, t, n) {
- var r;
- n ? r = {row: e, column: t} : r = this.$clipPositionToDocument(e, t);
- if (this.row == r.row && this.column == r.column)return;
- var i = {row: this.row, column: this.column};
- this.row = r.row, this.column = r.column, this._emit("change", {old: i, value: r})
- }, this.detach = function () {
- this.document.removeEventListener("change", this.$onChange)
- }, this.$clipPositionToDocument = function (e, t) {
- var n = {};
- return e >= this.document.getLength() ? (n.row = Math.max(0, this.document.getLength() - 1), n.column = this.document.getLine(n.row).length) : e < 0 ? (n.row = 0, n.column = 0) : (n.row = e, n.column = Math.min(this.document.getLine(n.row).length, Math.max(0, t))), t < 0 && (n.column = 0), n
- }
- }).call(s.prototype)
-}), define("ace/lib/lang", ["require", "exports", "module"], function (e, t, n) {
- t.stringReverse = function (e) {
- return e.split("").reverse().join("")
- }, t.stringRepeat = function (e, t) {
- var n = "";
- while (t > 0) {
- t & 1 && (n += e);
- if (t >>= 1)e += e
- }
- return n
- };
- var r = /^\s\s*/, i = /\s\s*$/;
- t.stringTrimLeft = function (e) {
- return e.replace(r, "")
- }, t.stringTrimRight = function (e) {
- return e.replace(i, "")
- }, t.copyObject = function (e) {
- var t = {};
- for (var n in e)t[n] = e[n];
- return t
- }, t.copyArray = function (e) {
- var t = [];
- for (var n = 0, r = e.length; n < r; n++)e[n] && typeof e[n] == "object" ? t[n] = this.copyObject(e[n]) : t[n] = e[n];
- return t
- }, t.deepCopy = function (e) {
- if (typeof e != "object")return e;
- var t = e.constructor();
- for (var n in e)typeof e[n] == "object" ? t[n] = this.deepCopy(e[n]) : t[n] = e[n];
- return t
- }, t.arrayToMap = function (e) {
- var t = {};
- for (var n = 0; n < e.length; n++)t[e[n]] = 1;
- return t
- }, t.createMap = function (e) {
- var t = Object.create(null);
- for (var n in e)t[n] = e[n];
- return t
- }, t.arrayRemove = function (e, t) {
- for (var n = 0; n <= e.length; n++)t === e[n] && e.splice(n, 1)
- }, t.escapeRegExp = function (e) {
- return e.replace(/([.*+?^${}()|[\]\/\\])/g, "\\$1")
- }, t.escapeHTML = function (e) {
- return e.replace(/&/g, "&").replace(/"/g, """).replace(/'/g, "'").replace(/)/i : /(\<\?php\s|<\?=|\
diff --git a/src/common/lib/vendor/2amigos/yiiwheels/widgets/fileupload/views/form.php b/src/common/lib/vendor/2amigos/yiiwheels/widgets/fileupload/views/form.php
deleted file mode 100644
index eafac76..0000000
--- a/src/common/lib/vendor/2amigos/yiiwheels/widgets/fileupload/views/form.php
+++ /dev/null
@@ -1,45 +0,0 @@
-
-url, 'post', $this->htmlOptions); ?>
-
-
-
-
-
-
-
-
diff --git a/src/common/lib/vendor/2amigos/yiiwheels/widgets/fileupload/views/upload.php b/src/common/lib/vendor/2amigos/yiiwheels/widgets/fileupload/views/upload.php
deleted file mode 100644
index 1bec204..0000000
--- a/src/common/lib/vendor/2amigos/yiiwheels/widgets/fileupload/views/upload.php
+++ /dev/null
@@ -1,37 +0,0 @@
-
-
diff --git a/src/common/lib/vendor/2amigos/yiiwheels/widgets/fineuploader/WhFineUploader.php b/src/common/lib/vendor/2amigos/yiiwheels/widgets/fineuploader/WhFineUploader.php
deleted file mode 100644
index 21ce05b..0000000
--- a/src/common/lib/vendor/2amigos/yiiwheels/widgets/fineuploader/WhFineUploader.php
+++ /dev/null
@@ -1,175 +0,0 @@
-
- * @copyright Copyright © 2amigos.us 2013-
- * @license http://www.opensource.org/licenses/bsd-license.php New BSD License
- * @package YiiWheels.widgets.fileuploader
- * @uses YiiWheels.helpers.WhHtml
- */
-Yii::import('yiiwheels.helpers.WhHtml');
-
-class WhFineUploader extends CInputWidget
-{
- /**
- * @var string upload action url
- */
- public $uploadAction;
-
- /**
- * @var string the HTML tag to render the uploader to
- */
- public $tagName = 'div';
-
- /**
- * @var string text to display if javascript is disabled
- */
- public $noScriptText;
-
- /**
- * @var array the plugin options
- */
- public $pluginOptions = array();
-
- /**
- * @var array the events
- */
- public $events = array();
-
- /**
- * @var string which scenario we get the validation from
- */
- public $scenario;
-
- /**
- * @var array d
- */
- protected $defaultOptions = array();
-
- /**
- * @throws CException
- */
- public function init()
- {
- if ($this->uploadAction === null) {
- throw new CException(Yii::t('zii', '"uploadAction" attribute cannot be blank'));
- }
- if ($this->noScriptText === null) {
- $this->noScriptText = Yii::t('zii', "Please enable JavaScript to use file uploader.");
- }
-
- $this->attachBehavior('ywplugin', array('class' => 'yiiwheels.behaviors.WhPlugin'));
-
- $this->initDefaultOptions();
- }
-
- /**
- * Widget's run method
- */
- public function run()
- {
- $this->renderTag();
- $this->registerClientScript();
- }
-
- /**
- * Renders the tag where the button is going to be rendered
- */
- public function renderTag()
- {
- echo CHtml::tag($this->tagName, $this->htmlOptions, '' . $this->noScriptText . ' ', true);
- }
-
- /**
- * Registers required client script for finuploader
- */
- public function registerClientScript()
- {
- /* publish assets dir */
- $path = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'assets';
- $assetsUrl = $this->getAssetsUrl($path);
-
- /* @var $cs CClientScript */
- $cs = Yii::app()->getClientScript();
-
- $script = YII_DEBUG ? 'jquery.fineuploader-3.2.js' : 'jquery.fineuploader-3.2.min.js';
-
- $cs->registerCssFile($assetsUrl . '/css/fineuploader.css');
- $cs->registerScriptFile($assetsUrl . '/js/' . $script);
-
- /* initialize plugin */
- $selector = '#' . WhHtml::getOption('id', $this->htmlOptions, $this->getId());
-
- $this->getApi()->registerPlugin(
- 'fineUploader',
- $selector,
- CMap::mergeArray($this->defaultOptions, $this->pluginOptions)
- );
- $this->getApi()->registerEvents($selector, $this->events);
- }
-
- /**
- * Sets up default options for the plugin
- * - thanks https://github.com/anggiaj
- */
- protected function initDefaultOptions()
- {
- list($name, $id) = $this->resolveNameID();
-
- $this->htmlOptions = WhHtml::defaultOption('id', $id, $this->htmlOptions);
- $this->htmlOptions = WhHtml::defaultOption('name', $name, $this->htmlOptions);
-
-
- $this->defaultOptions = array(
- 'request' => array(
- 'endpoint' => $this->uploadAction,
- 'inputName' => $name,
- ),
- 'validation' => $this->getValidator(),
- 'messages' => array(
- 'typeError' => Yii::t('zii', '{file} has an invalid extension. Valid extension(s): {extensions}.'),
- 'sizeError' => Yii::t('zii', '{file} is too large, maximum file size is {sizeLimit}.'),
- 'minSizeError' => Yii::t('zii', '{file} is too small, minimum file size is {minSizeLimit}.'),
- 'emptyError:' => Yii::t('zii', '{file} is empty, please select files again without it.'),
- 'noFilesError' => Yii::t('zii', 'No files to upload.'),
- 'onLeave' => Yii::t(
- 'zii',
- 'The files are being uploaded, if you leave now the upload will be cancelled.'
- )
- ),
- );
- }
-
- /**
- * @return array
- */
- protected function getValidator()
- {
- $ret = array();
- if ($this->hasModel()) {
- if ($this->scenario !== null) {
- $originalScenario = $this->model->getScenario();
- $this->model->setScenario($this->scenario);
- $validators = $this->model->getValidators($this->attribute);
- $this->model->setScenario($originalScenario);
-
- } else {
- $validators = $this->model->getValidators($this->attribute);
- }
-
- // we are just looking for the first founded CFileValidator
- foreach ($validators as $validator) {
- if (is_a($validator, 'CFileValidator')) {
- $ret = array(
- 'allowedExtensions' => explode(',', str_replace(' ', '', $validator->types)),
- 'sizeLimit' => $validator->maxSize,
- 'minSizeLimit' => $validator->minSize,
- );
- break;
- }
- }
- }
- return $ret;
- }
-}
\ No newline at end of file
diff --git a/src/common/lib/vendor/2amigos/yiiwheels/widgets/fineuploader/assets/css/fineuploader.css b/src/common/lib/vendor/2amigos/yiiwheels/widgets/fineuploader/assets/css/fineuploader.css
deleted file mode 100644
index 6732d23..0000000
--- a/src/common/lib/vendor/2amigos/yiiwheels/widgets/fineuploader/assets/css/fineuploader.css
+++ /dev/null
@@ -1,174 +0,0 @@
-/*
- * Original version: 1.0 © 2010 Andrew Valums ( andrew(at)valums.com )
- * Current Maintainer (2.0+): 2012, Ray Nicholus ( fineuploader(at)garstasio.com )
- *
- * Licensed under MIT license, GNU GPL 2 or later, GNU LGPL 2 or later, see license.txt.
- */
-.qq-uploader {
- position: relative;
- width: 100%;
-}
-
-.qq-upload-button {
- display: block;
- width: 105px;
- padding: 7px 0;
- text-align: center;
- background: #880000;
- border-bottom: 1px solid #DDD;
- color: #FFF;
-}
-
-.qq-upload-button-hover {
- background: #CC0000;
-}
-
-.qq-upload-button-focus {
- outline: 1px dotted #000000;
-}
-
-.qq-upload-drop-area, .qq-upload-extra-drop-area {
- position: absolute;
- top: 0;
- left: 0;
- width: 100%;
- height: 100%;
- min-height: 30px;
- z-index: 2;
- background: #FF9797;
- text-align: center;
-}
-
-.qq-upload-drop-area span {
- display: block;
- position: absolute;
- top: 50%;
- width: 100%;
- margin-top: -8px;
- font-size: 16px;
-}
-
-.qq-upload-extra-drop-area {
- position: relative;
- margin-top: 50px;
- font-size: 16px;
- padding-top: 30px;
- height: 20px;
- min-height: 40px;
-}
-
-.qq-upload-drop-area-active {
- background: #FF7171;
-}
-
-.qq-upload-list {
- margin: 0;
- padding: 0;
- list-style: none;
-}
-
-.qq-upload-list li {
- margin: 0;
- padding: 9px;
- line-height: 15px;
- font-size: 16px;
- background-color: #FFF0BD;
-}
-
-.qq-upload-file, .qq-upload-spinner, .qq-upload-size, .qq-upload-cancel, .qq-upload-retry, .qq-upload-failed-text, .qq-upload-finished {
- margin-right: 12px;
-}
-
-.qq-upload-file {
-}
-
-.qq-upload-spinner {
- display: inline-block;
- background: url("../img/loading.gif");
- width: 15px;
- height: 15px;
- vertical-align: text-bottom;
-}
-
-.qq-drop-processing {
- display: none;
-}
-
-.qq-drop-processing-spinner {
- display: inline-block;
- background: url("../img/processing.gif");
- width: 24px;
- height: 24px;
- vertical-align: text-bottom;
-}
-
-.qq-upload-finished {
- display: none;
- width: 15px;
- height: 15px;
- vertical-align: text-bottom;
-}
-
-.qq-upload-retry {
- display: none;
- color: #000000;
-}
-
-.qq-upload-cancel {
- color: #000000;
-}
-
-.qq-upload-retryable .qq-upload-retry {
- display: inline;
-}
-
-.qq-upload-size, .qq-upload-cancel, .qq-upload-retry {
- font-size: 12px;
- font-weight: normal;
-}
-
-.qq-upload-failed-text {
- display: none;
- font-style: italic;
- font-weight: bold;
-}
-
-.qq-upload-failed-icon {
- display: none;
- width: 15px;
- height: 15px;
- vertical-align: text-bottom;
-}
-
-.qq-upload-fail .qq-upload-failed-text {
- display: inline;
-}
-
-.qq-upload-retrying .qq-upload-failed-text {
- display: inline;
- color: #D60000;
-}
-
-.qq-upload-list li.qq-upload-success {
- background-color: #5DA30C;
- color: #FFFFFF;
-}
-
-.qq-upload-list li.qq-upload-fail {
- background-color: #D60000;
- color: #FFFFFF;
-}
-
-.qq-progress-bar {
- background: -moz-linear-gradient(top, rgba(30, 87, 153, 1) 0%, rgba(41, 137, 216, 1) 50%, rgba(32, 124, 202, 1) 51%, rgba(125, 185, 232, 1) 100%); /* FF3.6+ */
- background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, rgba(30, 87, 153, 1)), color-stop(50%, rgba(41, 137, 216, 1)), color-stop(51%, rgba(32, 124, 202, 1)), color-stop(100%, rgba(125, 185, 232, 1))); /* Chrome,Safari4+ */
- background: -webkit-linear-gradient(top, rgba(30, 87, 153, 1) 0%, rgba(41, 137, 216, 1) 50%, rgba(32, 124, 202, 1) 51%, rgba(125, 185, 232, 1) 100%); /* Chrome10+,Safari5.1+ */
- background: -o-linear-gradient(top, rgba(30, 87, 153, 1) 0%, rgba(41, 137, 216, 1) 50%, rgba(32, 124, 202, 1) 51%, rgba(125, 185, 232, 1) 100%); /* Opera 11.10+ */
- background: -ms-linear-gradient(top, rgba(30, 87, 153, 1) 0%, rgba(41, 137, 216, 1) 50%, rgba(32, 124, 202, 1) 51%, rgba(125, 185, 232, 1) 100%); /* IE10+ */
- background: linear-gradient(to bottom, rgba(30, 87, 153, 1) 0%, rgba(41, 137, 216, 1) 50%, rgba(32, 124, 202, 1) 51%, rgba(125, 185, 232, 1) 100%); /* W3C */
- width: 0%;
- height: 15px;
- border-radius: 6px;
- margin-bottom: 3px;
- display: none;
-}
diff --git a/src/common/lib/vendor/2amigos/yiiwheels/widgets/fineuploader/assets/img/loading.gif b/src/common/lib/vendor/2amigos/yiiwheels/widgets/fineuploader/assets/img/loading.gif
deleted file mode 100644
index 6fba776..0000000
Binary files a/src/common/lib/vendor/2amigos/yiiwheels/widgets/fineuploader/assets/img/loading.gif and /dev/null differ
diff --git a/src/common/lib/vendor/2amigos/yiiwheels/widgets/fineuploader/assets/img/processing.gif b/src/common/lib/vendor/2amigos/yiiwheels/widgets/fineuploader/assets/img/processing.gif
deleted file mode 100644
index 7c99504..0000000
Binary files a/src/common/lib/vendor/2amigos/yiiwheels/widgets/fineuploader/assets/img/processing.gif and /dev/null differ
diff --git a/src/common/lib/vendor/2amigos/yiiwheels/widgets/fineuploader/assets/js/jquery.fineuploader-3.2.js b/src/common/lib/vendor/2amigos/yiiwheels/widgets/fineuploader/assets/js/jquery.fineuploader-3.2.js
deleted file mode 100644
index 177bf12..0000000
--- a/src/common/lib/vendor/2amigos/yiiwheels/widgets/fineuploader/assets/js/jquery.fineuploader-3.2.js
+++ /dev/null
@@ -1,3245 +0,0 @@
-/**
- * http://github.com/Valums-File-Uploader/file-uploader
- *
- * Multiple file upload component with progress-bar, drag-and-drop, support for all modern browsers.
- *
- * Original version: 1.0 © 2010 Andrew Valums ( andrew(at)valums.com )
- * Current Maintainer (2.0+): © 2012, Ray Nicholus ( fineuploader(at)garstasio.com )
- *
- * Licensed under MIT license, GNU GPL 2 or later, GNU LGPL 2 or later, see license.txt.
- */
-/*globals window, navigator, document, FormData, File, HTMLInputElement, XMLHttpRequest*/
-var qq = function (element) {
- "use strict";
-
- return {
- hide: function () {
- element.style.display = 'none';
- return this;
- },
-
- /** Returns the function which detaches attached event */
- attach: function (type, fn) {
- if (element.addEventListener) {
- element.addEventListener(type, fn, false);
- } else if (element.attachEvent) {
- element.attachEvent('on' + type, fn);
- }
- return function () {
- qq(element).detach(type, fn);
- };
- },
-
- detach: function (type, fn) {
- if (element.removeEventListener) {
- element.removeEventListener(type, fn, false);
- } else if (element.attachEvent) {
- element.detachEvent('on' + type, fn);
- }
- return this;
- },
-
- contains: function (descendant) {
- // compareposition returns false in this case
- if (element === descendant) {
- return true;
- }
-
- if (element.contains) {
- return element.contains(descendant);
- } else {
- /*jslint bitwise: true*/
- return !!(descendant.compareDocumentPosition(element) & 8);
- }
- },
-
- /**
- * Insert this element before elementB.
- */
- insertBefore: function (elementB) {
- elementB.parentNode.insertBefore(element, elementB);
- return this;
- },
-
- remove: function () {
- element.parentNode.removeChild(element);
- return this;
- },
-
- /**
- * Sets styles for an element.
- * Fixes opacity in IE6-8.
- */
- css: function (styles) {
- if (styles.opacity !== null) {
- if (typeof element.style.opacity !== 'string' && typeof(element.filters) !== 'undefined') {
- styles.filter = 'alpha(opacity=' + Math.round(100 * styles.opacity) + ')';
- }
- }
- qq.extend(element.style, styles);
-
- return this;
- },
-
- hasClass: function (name) {
- var re = new RegExp('(^| )' + name + '( |$)');
- return re.test(element.className);
- },
-
- addClass: function (name) {
- if (!qq(element).hasClass(name)) {
- element.className += ' ' + name;
- }
- return this;
- },
-
- removeClass: function (name) {
- var re = new RegExp('(^| )' + name + '( |$)');
- element.className = element.className.replace(re, ' ').replace(/^\s+|\s+$/g, "");
- return this;
- },
-
- getByClass: function (className) {
- var candidates,
- result = [];
-
- if (element.querySelectorAll) {
- return element.querySelectorAll('.' + className);
- }
-
- candidates = element.getElementsByTagName("*");
-
- qq.each(candidates, function (idx, val) {
- if (qq(val).hasClass(className)) {
- result.push(val);
- }
- });
- return result;
- },
-
- children: function () {
- var children = [],
- child = element.firstChild;
-
- while (child) {
- if (child.nodeType === 1) {
- children.push(child);
- }
- child = child.nextSibling;
- }
-
- return children;
- },
-
- setText: function (text) {
- element.innerText = text;
- element.textContent = text;
- return this;
- },
-
- clearText: function () {
- return qq(element).setText("");
- }
- };
-};
-
-qq.log = function (message, level) {
- "use strict";
-
- if (window.console) {
- if (!level || level === 'info') {
- window.console.log(message);
- }
- else {
- if (window.console[level]) {
- window.console[level](message);
- }
- else {
- window.console.log('<' + level + '> ' + message);
- }
- }
- }
-};
-
-qq.isObject = function (variable) {
- "use strict";
- return variable !== null && variable && typeof(variable) === "object" && variable.constructor === Object;
-};
-
-qq.isFunction = function (variable) {
- "use strict";
- return typeof(variable) === "function";
-};
-
-qq.isFileOrInput = function (maybeFileOrInput) {
- "use strict";
- if (window.File && maybeFileOrInput instanceof File) {
- return true;
- }
- else if (window.HTMLInputElement) {
- if (maybeFileOrInput instanceof HTMLInputElement) {
- if (maybeFileOrInput.type && maybeFileOrInput.type.toLowerCase() === 'file') {
- return true;
- }
- }
- }
- else if (maybeFileOrInput.tagName) {
- if (maybeFileOrInput.tagName.toLowerCase() === 'input') {
- if (maybeFileOrInput.type && maybeFileOrInput.type.toLowerCase() === 'file') {
- return true;
- }
- }
- }
-
- return false;
-};
-
-qq.isXhrUploadSupported = function () {
- "use strict";
- var input = document.createElement('input');
- input.type = 'file';
-
- return (
- input.multiple !== undefined &&
- typeof File !== "undefined" &&
- typeof FormData !== "undefined" &&
- typeof (new XMLHttpRequest()).upload !== "undefined" );
-};
-
-qq.isFolderDropSupported = function (dataTransfer) {
- "use strict";
- return (dataTransfer.items && dataTransfer.items[0].webkitGetAsEntry);
-};
-
-qq.isFileChunkingSupported = function () {
- "use strict";
- return !qq.android() && //android's impl of Blob.slice is broken
- qq.isXhrUploadSupported() &&
- (File.prototype.slice || File.prototype.webkitSlice || File.prototype.mozSlice);
-};
-
-qq.extend = function (first, second, extendNested) {
- "use strict";
- qq.each(second, function (prop, val) {
- if (extendNested && qq.isObject(val)) {
- if (first[prop] === undefined) {
- first[prop] = {};
- }
- qq.extend(first[prop], val, true);
- }
- else {
- first[prop] = val;
- }
- });
-};
-
-/**
- * Searches for a given element in the array, returns -1 if it is not present.
- * @param {Number} [from] The index at which to begin the search
- */
-qq.indexOf = function (arr, elt, from) {
- "use strict";
-
- if (arr.indexOf) {
- return arr.indexOf(elt, from);
- }
-
- from = from || 0;
- var len = arr.length;
-
- if (from < 0) {
- from += len;
- }
-
- for (; from < len; from += 1) {
- if (arr.hasOwnProperty(from) && arr[from] === elt) {
- return from;
- }
- }
- return -1;
-};
-
-//this is a version 4 UUID
-qq.getUniqueId = function () {
- "use strict";
-
- return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
- /*jslint eqeq: true, bitwise: true*/
- var r = Math.random() * 16 | 0, v = c == 'x' ? r : (r & 0x3 | 0x8);
- return v.toString(16);
- });
-};
-
-//
-// Browsers and platforms detection
-
-qq.ie = function () {
- "use strict";
- return navigator.userAgent.indexOf('MSIE') !== -1;
-};
-qq.ie10 = function () {
- "use strict";
- return navigator.userAgent.indexOf('MSIE 10') !== -1;
-};
-qq.safari = function () {
- "use strict";
- return navigator.vendor !== undefined && navigator.vendor.indexOf("Apple") !== -1;
-};
-qq.chrome = function () {
- "use strict";
- return navigator.vendor !== undefined && navigator.vendor.indexOf('Google') !== -1;
-};
-qq.firefox = function () {
- "use strict";
- return (navigator.userAgent.indexOf('Mozilla') !== -1 && navigator.vendor !== undefined && navigator.vendor === '');
-};
-qq.windows = function () {
- "use strict";
- return navigator.platform === "Win32";
-};
-qq.android = function () {
- "use strict";
- return navigator.userAgent.toLowerCase().indexOf('android') !== -1;
-};
-
-//
-// Events
-
-qq.preventDefault = function (e) {
- "use strict";
- if (e.preventDefault) {
- e.preventDefault();
- } else {
- e.returnValue = false;
- }
-};
-
-/**
- * Creates and returns element from html string
- * Uses innerHTML to create an element
- */
-qq.toElement = (function () {
- "use strict";
- var div = document.createElement('div');
- return function (html) {
- div.innerHTML = html;
- var element = div.firstChild;
- div.removeChild(element);
- return element;
- };
-}());
-
-//key and value are passed to callback for each item in the object or array
-qq.each = function (obj, callback) {
- "use strict";
- var key, retVal;
- if (obj) {
- for (key in obj) {
- if (Object.prototype.hasOwnProperty.call(obj, key)) {
- retVal = callback(key, obj[key]);
- if (retVal === false) {
- break;
- }
- }
- }
- }
-};
-
-/**
- * obj2url() takes a json-object as argument and generates
- * a querystring. pretty much like jQuery.param()
- *
- * how to use:
- *
- * `qq.obj2url({a:'b',c:'d'},'http://any.url/upload?otherParam=value');`
- *
- * will result in:
- *
- * `http://any.url/upload?otherParam=value&a=b&c=d`
- *
- * @param Object JSON-Object
- * @param String current querystring-part
- * @return String encoded querystring
- */
-qq.obj2url = function (obj, temp, prefixDone) {
- "use strict";
- /*jshint laxbreak: true*/
- var i, len,
- uristrings = [],
- prefix = '&',
- add = function (nextObj, i) {
- var nextTemp = temp
- ? (/\[\]$/.test(temp)) // prevent double-encoding
- ? temp
- : temp + '[' + i + ']'
- : i;
- if ((nextTemp !== 'undefined') && (i !== 'undefined')) {
- uristrings.push(
- (typeof nextObj === 'object')
- ? qq.obj2url(nextObj, nextTemp, true)
- : (Object.prototype.toString.call(nextObj) === '[object Function]')
- ? encodeURIComponent(nextTemp) + '=' + encodeURIComponent(nextObj())
- : encodeURIComponent(nextTemp) + '=' + encodeURIComponent(nextObj)
- );
- }
- };
-
- if (!prefixDone && temp) {
- prefix = (/\?/.test(temp)) ? (/\?$/.test(temp)) ? '' : '&' : '?';
- uristrings.push(temp);
- uristrings.push(qq.obj2url(obj));
- } else if ((Object.prototype.toString.call(obj) === '[object Array]') && (typeof obj !== 'undefined')) {
- // we wont use a for-in-loop on an array (performance)
- for (i = -1, len = obj.length; i < len; i += 1) {
- add(obj[i], i);
- }
- } else if ((typeof obj !== 'undefined') && (obj !== null) && (typeof obj === "object")) {
- // for anything else but a scalar, we will use for-in-loop
- for (i in obj) {
- if (obj.hasOwnProperty(i)) {
- add(obj[i], i);
- }
- }
- } else {
- uristrings.push(encodeURIComponent(temp) + '=' + encodeURIComponent(obj));
- }
-
- if (temp) {
- return uristrings.join(prefix);
- } else {
- return uristrings.join(prefix)
- .replace(/^&/, '')
- .replace(/%20/g, '+');
- }
-};
-
-qq.obj2FormData = function (obj, formData, arrayKeyName) {
- "use strict";
- if (!formData) {
- formData = new FormData();
- }
-
- qq.each(obj, function (key, val) {
- key = arrayKeyName ? arrayKeyName + '[' + key + ']' : key;
-
- if (qq.isObject(val)) {
- qq.obj2FormData(val, formData, key);
- }
- else if (qq.isFunction(val)) {
- formData.append(encodeURIComponent(key), encodeURIComponent(val()));
- }
- else {
- formData.append(encodeURIComponent(key), encodeURIComponent(val));
- }
- });
-
- return formData;
-};
-
-qq.obj2Inputs = function (obj, form) {
- "use strict";
- var input;
-
- if (!form) {
- form = document.createElement('form');
- }
-
- qq.obj2FormData(obj, {
- append: function (key, val) {
- input = document.createElement('input');
- input.setAttribute('name', key);
- input.setAttribute('value', val);
- form.appendChild(input);
- }
- });
-
- return form;
-};
-
-qq.setCookie = function (name, value, days) {
- var date = new Date(),
- expires = "";
-
- if (days) {
- date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000));
- expires = "; expires=" + date.toGMTString();
- }
-
- document.cookie = name + "=" + value + expires + "; path=/";
-};
-
-qq.getCookie = function (name) {
- var nameEQ = name + "=",
- ca = document.cookie.split(';'),
- c;
-
- for (var i = 0; i < ca.length; i++) {
- c = ca[i];
- while (c.charAt(0) == ' ') {
- c = c.substring(1, c.length);
- }
- if (c.indexOf(nameEQ) === 0) {
- return c.substring(nameEQ.length, c.length);
- }
- }
-};
-
-qq.getCookieNames = function (regexp) {
- var cookies = document.cookie.split(';'),
- cookieNames = [];
-
- qq.each(cookies, function (idx, cookie) {
- cookie = cookie.trim();
-
- var equalsIdx = cookie.indexOf("=");
-
- if (cookie.match(regexp)) {
- cookieNames.push(cookie.substr(0, equalsIdx));
- }
- });
-
- return cookieNames;
-};
-
-qq.deleteCookie = function (name) {
- qq.setCookie(name, "", -1);
-};
-
-qq.areCookiesEnabled = function () {
- var randNum = Math.random() * 100000,
- name = "qqCookieTest:" + randNum;
- qq.setCookie(name, 1);
-
- if (qq.getCookie(name)) {
- qq.deleteCookie(name);
- return true;
- }
- return false;
-};
-
-/**
- * Not recommended for use outside of Fine Uploader since this falls back to an unchecked eval if JSON.parse is not
- * implemented. For a more secure JSON.parse polyfill, use Douglas Crockford's json2.js.
- */
-qq.parseJson = function (json) {
- /*jshint evil: true*/
- if (typeof JSON.parse === "function") {
- return JSON.parse(json);
- } else {
- return eval("(" + json + ")");
- }
-};
-
-/**
- * A generic module which supports object disposing in dispose() method.
- * */
-qq.DisposeSupport = function () {
- "use strict";
- var disposers = [];
-
- return {
- /** Run all registered disposers */
- dispose: function () {
- var disposer;
- do {
- disposer = disposers.shift();
- if (disposer) {
- disposer();
- }
- }
- while (disposer);
- },
-
- /** Attach event handler and register de-attacher as a disposer */
- attach: function () {
- var args = arguments;
- /*jslint undef:true*/
- this.addDisposer(qq(args[0]).attach.apply(this, Array.prototype.slice.call(arguments, 1)));
- },
-
- /** Add disposer to the collection */
- addDisposer: function (disposeFunction) {
- disposers.push(disposeFunction);
- }
- };
-};
-qq.UploadButton = function (o) {
- this._options = {
- element: null,
- // if set to true adds multiple attribute to file input
- multiple: false,
- acceptFiles: null,
- // name attribute of file input
- name: 'file',
- onChange: function (input) {
- },
- hoverClass: 'qq-upload-button-hover',
- focusClass: 'qq-upload-button-focus'
- };
-
- qq.extend(this._options, o);
- this._disposeSupport = new qq.DisposeSupport();
-
- this._element = this._options.element;
-
- // make button suitable container for input
- qq(this._element).css({
- position: 'relative',
- overflow: 'hidden',
- // Make sure browse button is in the right side
- // in Internet Explorer
- direction: 'ltr'
- });
-
- this._input = this._createInput();
-};
-
-qq.UploadButton.prototype = {
- /* returns file input element */
- getInput: function () {
- return this._input;
- },
- /* cleans/recreates the file input */
- reset: function () {
- if (this._input.parentNode) {
- qq(this._input).remove();
- }
-
- qq(this._element).removeClass(this._options.focusClass);
- this._input = this._createInput();
- },
- _createInput: function () {
- var input = document.createElement("input");
-
- if (this._options.multiple) {
- input.setAttribute("multiple", "multiple");
- }
-
- if (this._options.acceptFiles) input.setAttribute("accept", this._options.acceptFiles);
-
- input.setAttribute("type", "file");
- input.setAttribute("name", this._options.name);
-
- qq(input).css({
- position: 'absolute',
- // in Opera only 'browse' button
- // is clickable and it is located at
- // the right side of the input
- right: 0,
- top: 0,
- fontFamily: 'Arial',
- // 4 persons reported this, the max values that worked for them were 243, 236, 236, 118
- fontSize: '118px',
- margin: 0,
- padding: 0,
- cursor: 'pointer',
- opacity: 0
- });
-
- this._element.appendChild(input);
-
- var self = this;
- this._disposeSupport.attach(input, 'change', function () {
- self._options.onChange(input);
- });
-
- this._disposeSupport.attach(input, 'mouseover', function () {
- qq(self._element).addClass(self._options.hoverClass);
- });
- this._disposeSupport.attach(input, 'mouseout', function () {
- qq(self._element).removeClass(self._options.hoverClass);
- });
- this._disposeSupport.attach(input, 'focus', function () {
- qq(self._element).addClass(self._options.focusClass);
- });
- this._disposeSupport.attach(input, 'blur', function () {
- qq(self._element).removeClass(self._options.focusClass);
- });
-
- // IE and Opera, unfortunately have 2 tab stops on file input
- // which is unacceptable in our case, disable keyboard access
- if (window.attachEvent) {
- // it is IE or Opera
- input.setAttribute('tabIndex', "-1");
- }
-
- return input;
- }
-};
-/**
- * Class for uploading files, uploading itself is handled by child classes
- */
-/*globals qq*/
-qq.UploadHandler = function (o) {
- "use strict";
-
- var queue = [],
- options, log, dequeue, handlerImpl;
-
- // Default options, can be overridden by the user
- options = {
- debug: false,
- forceMultipart: true,
- paramsInBody: false,
- paramsStore: {},
- endpointStore: {},
- maxConnections: 3, // maximum number of concurrent uploads
- uuidParamName: 'qquuid',
- totalFileSizeParamName: 'qqtotalfilesize',
- chunking: {
- enabled: false,
- partSize: 2000000, //bytes
- paramNames: {
- partIndex: 'qqpartindex',
- partByteOffset: 'qqpartbyteoffset',
- chunkSize: 'qqchunksize',
- totalParts: 'qqtotalparts',
- filename: 'qqfilename'
- }
- },
- resume: {
- enabled: false,
- id: null,
- cookiesExpireIn: 7, //days
- paramNames: {
- resuming: "qqresume"
- }
- },
- log: function (str, level) {
- },
- onProgress: function (id, fileName, loaded, total) {
- },
- onComplete: function (id, fileName, response, xhr) {
- },
- onCancel: function (id, fileName) {
- },
- onUpload: function (id, fileName) {
- },
- onUploadChunk: function (id, fileName, chunkData) {
- },
- onAutoRetry: function (id, fileName, response, xhr) {
- },
- onResume: function (id, fileName, chunkData) {
- }
-
- };
- qq.extend(options, o);
-
- log = options.log;
-
- /**
- * Removes element from queue, starts upload of next
- */
- dequeue = function (id) {
- var i = qq.indexOf(queue, id),
- max = options.maxConnections,
- nextId;
-
- queue.splice(i, 1);
-
- if (queue.length >= max && i < max) {
- nextId = queue[max - 1];
- handlerImpl.upload(nextId);
- }
- };
-
- if (qq.isXhrUploadSupported()) {
- handlerImpl = new qq.UploadHandlerXhr(options, dequeue, log);
- }
- else {
- handlerImpl = new qq.UploadHandlerForm(options, dequeue, log);
- }
-
-
- return {
- /**
- * Adds file or file input to the queue
- * @returns id
- **/
- add: function (file) {
- return handlerImpl.add(file);
- },
- /**
- * Sends the file identified by id
- */
- upload: function (id) {
- var len = queue.push(id);
-
- // if too many active uploads, wait...
- if (len <= options.maxConnections) {
- return handlerImpl.upload(id);
- }
- },
- retry: function (id) {
- var i = qq.indexOf(queue, id);
- if (i >= 0) {
- return handlerImpl.upload(id, true);
- }
- else {
- return this.upload(id);
- }
- },
- /**
- * Cancels file upload by id
- */
- cancel: function (id) {
- log('Cancelling ' + id);
- options.paramsStore.remove(id);
- handlerImpl.cancel(id);
- dequeue(id);
- },
- /**
- * Cancels all uploads
- */
- cancelAll: function () {
- qq.each(queue, function (idx, fileId) {
- this.cancel(fileId);
- });
-
- queue = [];
- },
- /**
- * Returns name of the file identified by id
- */
- getName: function (id) {
- return handlerImpl.getName(id);
- },
- /**
- * Returns size of the file identified by id
- */
- getSize: function (id) {
- if (handlerImpl.getSize) {
- return handlerImpl.getSize(id);
- }
- },
- getFile: function (id) {
- if (handlerImpl.getFile) {
- return handlerImpl.getFile(id);
- }
- },
- /**
- * Returns id of files being uploaded or
- * waiting for their turn
- */
- getQueue: function () {
- return queue;
- },
- reset: function () {
- log('Resetting upload handler');
- queue = [];
- handlerImpl.reset();
- },
- getUuid: function (id) {
- return handlerImpl.getUuid(id);
- },
- /**
- * Determine if the file exists.
- */
- isValid: function (id) {
- return handlerImpl.isValid(id);
- },
- getResumableFilesData: function () {
- if (handlerImpl.getResumableFilesData) {
- return handlerImpl.getResumableFilesData();
- }
- return [];
- }
- };
-};
-/*globals qq, document, setTimeout*/
-/*jslint white: true*/
-qq.UploadHandlerForm = function (o, uploadCompleteCallback, logCallback) {
- "use strict";
-
- var options = o,
- inputs = [],
- uuids = [],
- detachLoadEvents = {},
- uploadComplete = uploadCompleteCallback,
- log = logCallback,
- api;
-
- function attachLoadEvent(iframe, callback) {
- /*jslint eqeq: true*/
-
- detachLoadEvents[iframe.id] = qq(iframe).attach('load', function () {
- log('Received response for ' + iframe.id);
-
- // when we remove iframe from dom
- // the request stops, but in IE load
- // event fires
- if (!iframe.parentNode) {
- return;
- }
-
- try {
- // fixing Opera 10.53
- if (iframe.contentDocument &&
- iframe.contentDocument.body &&
- iframe.contentDocument.body.innerHTML == "false") {
- // In Opera event is fired second time
- // when body.innerHTML changed from false
- // to server response approx. after 1 sec
- // when we upload file with iframe
- return;
- }
- }
- catch (error) {
- //IE may throw an "access is denied" error when attempting to access contentDocument on the iframe in some cases
- log('Error when attempting to access iframe during handling of upload response (' + error + ")", 'error');
- }
-
- callback();
- });
- }
-
- /**
- * Returns json object received by iframe from server.
- */
- function getIframeContentJson(iframe) {
- /*jshint evil: true*/
-
- var response;
-
- //IE may throw an "access is denied" error when attempting to access contentDocument on the iframe in some cases
- try {
- // iframe.contentWindow.document - for IE<7
- var doc = iframe.contentDocument || iframe.contentWindow.document,
- innerHTML = doc.body.innerHTML;
-
- log("converting iframe's innerHTML to JSON");
- log("innerHTML = " + innerHTML);
- //plain text response may be wrapped in tag
- if (innerHTML && innerHTML.match(/^ ');
- // src="javascript:false;" removes ie6 prompt on https
-
- iframe.setAttribute('id', id);
-
- iframe.style.display = 'none';
- document.body.appendChild(iframe);
-
- return iframe;
- }
-
- /**
- * Creates form, that will be submitted to iframe
- */
- function createForm(id, iframe) {
- var params = options.paramsStore.getParams(id),
- protocol = options.demoMode ? "GET" : "POST",
- form = qq.toElement(' '),
- endpoint = options.endpointStore.getEndpoint(id),
- url = endpoint;
-
- params[options.uuidParamName] = uuids[id];
-
- if (!options.paramsInBody) {
- url = qq.obj2url(params, endpoint);
- }
- else {
- qq.obj2Inputs(params, form);
- }
-
- form.setAttribute('action', url);
- form.setAttribute('target', iframe.name);
- form.style.display = 'none';
- document.body.appendChild(form);
-
- return form;
- }
-
-
- api = {
- add: function (fileInput) {
- fileInput.setAttribute('name', options.inputName);
-
- var id = inputs.push(fileInput) - 1;
- uuids[id] = qq.getUniqueId();
-
- // remove file input from DOM
- if (fileInput.parentNode) {
- qq(fileInput).remove();
- }
-
- return id;
- },
- getName: function (id) {
- /*jslint regexp: true*/
-
- // get input value and remove path to normalize
- return inputs[id].value.replace(/.*(\/|\\)/, "");
- },
- isValid: function (id) {
- return inputs[id] !== undefined;
- },
- reset: function () {
- qq.UploadHandler.prototype.reset.apply(this, arguments);
- inputs = [];
- uuids = [];
- detachLoadEvents = {};
- },
- getUuid: function (id) {
- return uuids[id];
- },
- cancel: function (id) {
- options.onCancel(id, this.getName(id));
-
- delete inputs[id];
- delete uuids[id];
- delete detachLoadEvents[id];
-
- var iframe = document.getElementById(id);
- if (iframe) {
- // to cancel request set src to something else
- // we use src="javascript:false;" because it doesn't
- // trigger ie6 prompt on https
- iframe.setAttribute('src', 'java' + String.fromCharCode(115) + 'cript:false;'); //deal with "JSLint: javascript URL" warning, which apparently cannot be turned off
-
- qq(iframe).remove();
- }
- },
- upload: function (id) {
- var input = inputs[id],
- fileName = api.getName(id),
- iframe = createIframe(id),
- form = createForm(id, iframe);
-
- if (!input) {
- throw new Error('file with passed id was not added, or already uploaded or cancelled');
- }
-
- options.onUpload(id, this.getName(id));
-
- form.appendChild(input);
-
- attachLoadEvent(iframe, function () {
- log('iframe loaded');
-
- var response = getIframeContentJson(iframe);
-
- // timeout added to fix busy state in FF3.6
- setTimeout(function () {
- detachLoadEvents[id]();
- delete detachLoadEvents[id];
- qq(iframe).remove();
- }, 1);
-
- if (!response.success) {
- if (options.onAutoRetry(id, fileName, response)) {
- return;
- }
- }
- options.onComplete(id, fileName, response);
- uploadComplete(id);
- });
-
- log('Sending upload request for ' + id);
- form.submit();
- qq(form).remove();
-
- return id;
- }
- };
-
- return api;
-};
-/*globals qq, File, XMLHttpRequest, FormData*/
-qq.UploadHandlerXhr = function (o, uploadCompleteCallback, logCallback) {
- "use strict";
-
- var options = o,
- uploadComplete = uploadCompleteCallback,
- log = logCallback,
- fileState = [],
- cookieItemDelimiter = "|",
- chunkFiles = options.chunking.enabled && qq.isFileChunkingSupported(),
- resumeEnabled = options.resume.enabled && chunkFiles && qq.areCookiesEnabled(),
- resumeId = getResumeId(),
- multipart = options.forceMultipart || options.paramsInBody,
- api;
-
-
- function addChunkingSpecificParams(id, params, chunkData) {
- var size = api.getSize(id),
- name = api.getName(id);
-
- params[options.chunking.paramNames.partIndex] = chunkData.part;
- params[options.chunking.paramNames.partByteOffset] = chunkData.start;
- params[options.chunking.paramNames.chunkSize] = chunkData.end - chunkData.start;
- params[options.chunking.paramNames.totalParts] = chunkData.count;
- params[options.totalFileSizeParamName] = size;
-
-
- /**
- * When a Blob is sent in a multipart request, the filename value in the content-disposition header is either "blob"
- * or an empty string. So, we will need to include the actual file name as a param in this case.
- */
- if (multipart) {
- params[options.chunking.paramNames.filename] = name;
- }
- }
-
- function addResumeSpecificParams(params) {
- params[options.resume.paramNames.resuming] = true;
- }
-
- function getChunk(file, startByte, endByte) {
- if (file.slice) {
- return file.slice(startByte, endByte);
- }
- else if (file.mozSlice) {
- return file.mozSlice(startByte, endByte);
- }
- else if (file.webkitSlice) {
- return file.webkitSlice(startByte, endByte);
- }
- }
-
- function getChunkData(id, chunkIndex) {
- var chunkSize = options.chunking.partSize,
- fileSize = api.getSize(id),
- file = fileState[id].file,
- startBytes = chunkSize * chunkIndex,
- endBytes = startBytes + chunkSize >= fileSize ? fileSize : startBytes + chunkSize,
- totalChunks = getTotalChunks(id);
-
- return {
- part: chunkIndex,
- start: startBytes,
- end: endBytes,
- count: totalChunks,
- blob: getChunk(file, startBytes, endBytes)
- };
- }
-
- function getTotalChunks(id) {
- var fileSize = api.getSize(id),
- chunkSize = options.chunking.partSize;
-
- return Math.ceil(fileSize / chunkSize);
- }
-
- function createXhr(id) {
- fileState[id].xhr = new XMLHttpRequest();
- return fileState[id].xhr;
- }
-
- function setParamsAndGetEntityToSend(params, xhr, fileOrBlob, id) {
- var formData = new FormData(),
- protocol = options.demoMode ? "GET" : "POST",
- endpoint = options.endpointStore.getEndpoint(id),
- url = endpoint,
- name = api.getName(id),
- size = api.getSize(id);
-
- params[options.uuidParamName] = fileState[id].uuid;
-
- if (multipart) {
- params[options.totalFileSizeParamName] = size;
- }
-
- //build query string
- if (!options.paramsInBody) {
- params[options.inputName] = name;
- url = qq.obj2url(params, endpoint);
- }
-
- xhr.open(protocol, url, true);
- if (multipart) {
- if (options.paramsInBody) {
- qq.obj2FormData(params, formData);
- }
-
- formData.append(options.inputName, fileOrBlob);
- return formData;
- }
-
- return fileOrBlob;
- }
-
- function setHeaders(id, xhr) {
- var extraHeaders = options.customHeaders,
- name = api.getName(id),
- file = fileState[id].file;
-
- xhr.setRequestHeader("X-Requested-With", "XMLHttpRequest");
- xhr.setRequestHeader("Cache-Control", "no-cache");
-
- if (!multipart) {
- xhr.setRequestHeader("Content-Type", "application/octet-stream");
- //NOTE: return mime type in xhr works on chrome 16.0.9 firefox 11.0a2
- xhr.setRequestHeader("X-Mime-Type", file.type);
- }
-
- qq.each(extraHeaders, function (name, val) {
- xhr.setRequestHeader(name, val);
- });
- }
-
- function handleCompletedFile(id, response, xhr) {
- var name = api.getName(id),
- size = api.getSize(id);
-
- fileState[id].attemptingResume = false;
-
- options.onProgress(id, name, size, size);
-
- options.onComplete(id, name, response, xhr);
- delete fileState[id].xhr;
- uploadComplete(id);
- }
-
- function uploadNextChunk(id) {
- var chunkData = getChunkData(id, fileState[id].remainingChunkIdxs[0]),
- xhr = createXhr(id),
- size = api.getSize(id),
- name = api.getName(id),
- toSend, params;
-
- if (fileState[id].loaded === undefined) {
- fileState[id].loaded = 0;
- }
-
- persistChunkData(id, chunkData);
-
- xhr.onreadystatechange = getReadyStateChangeHandler(id, xhr);
-
- xhr.upload.onprogress = function (e) {
- if (e.lengthComputable) {
- if (fileState[id].loaded < size) {
- var totalLoaded = e.loaded + fileState[id].loaded;
- options.onProgress(id, name, totalLoaded, size);
- }
- }
- };
-
- options.onUploadChunk(id, name, getChunkDataForCallback(chunkData));
-
- params = options.paramsStore.getParams(id);
- addChunkingSpecificParams(id, params, chunkData);
-
- if (fileState[id].attemptingResume) {
- addResumeSpecificParams(params);
- }
-
- toSend = setParamsAndGetEntityToSend(params, xhr, chunkData.blob, id);
- setHeaders(id, xhr);
-
- log('Sending chunked upload request for ' + id + ": bytes " + (chunkData.start + 1) + "-" + chunkData.end + " of " + size);
- xhr.send(toSend);
- }
-
-
- function handleSuccessfullyCompletedChunk(id, response, xhr) {
- var chunkIdx = fileState[id].remainingChunkIdxs.shift(),
- chunkData = getChunkData(id, chunkIdx);
-
- fileState[id].attemptingResume = false;
- fileState[id].loaded += chunkData.end - chunkData.start;
-
- if (fileState[id].remainingChunkIdxs.length > 0) {
- uploadNextChunk(id);
- }
- else {
- deletePersistedChunkData(id);
- handleCompletedFile(id, response, xhr);
- }
- }
-
- function isErrorResponse(xhr, response) {
- return xhr.status !== 200 || !response.success || response.reset;
- }
-
- function parseResponse(xhr) {
- var response;
-
- try {
- response = qq.parseJson(xhr.responseText);
- }
- catch (error) {
- log('Error when attempting to parse xhr response text (' + error + ')', 'error');
- response = {};
- }
-
- return response;
- }
-
- function handleResetResponse(id) {
- log('Server has ordered chunking effort to be restarted on next attempt for file ID ' + id, 'error');
-
- if (resumeEnabled) {
- deletePersistedChunkData(id);
- }
- fileState[id].remainingChunkIdxs = [];
- delete fileState[id].loaded;
- }
-
- function handleResetResponseOnResumeAttempt(id) {
- fileState[id].attemptingResume = false;
- log("Server has declared that it cannot handle resume for file ID " + id + " - starting from the first chunk", 'error');
- api.upload(id, true);
- }
-
- function handleNonResetErrorResponse(id, response, xhr) {
- var name = api.getName(id);
-
- if (options.onAutoRetry(id, name, response, xhr)) {
- return;
- }
- else {
- handleCompletedFile(id, response, xhr);
- }
- }
-
- function onComplete(id, xhr) {
- var response;
-
- // the request was aborted/cancelled
- if (!fileState[id]) {
- return;
- }
-
- log("xhr - server response received for " + id);
- log("responseText = " + xhr.responseText);
- response = parseResponse(xhr);
-
- if (isErrorResponse(xhr, response)) {
- if (response.reset) {
- handleResetResponse(id);
- }
-
- if (fileState[id].attemptingResume && response.reset) {
- handleResetResponseOnResumeAttempt(id);
- }
- else {
- handleNonResetErrorResponse(id, response, xhr);
- }
- }
- else if (chunkFiles) {
- handleSuccessfullyCompletedChunk(id, response, xhr);
- }
- else {
- handleCompletedFile(id, response, xhr);
- }
- }
-
- function getChunkDataForCallback(chunkData) {
- return {
- partIndex: chunkData.part,
- startByte: chunkData.start + 1,
- endByte: chunkData.end,
- totalParts: chunkData.count
- };
- }
-
- function getReadyStateChangeHandler(id, xhr) {
- return function () {
- if (xhr.readyState === 4) {
- onComplete(id, xhr);
- }
- };
- }
-
- function persistChunkData(id, chunkData) {
- var fileUuid = api.getUuid(id),
- cookieName = getChunkDataCookieName(id),
- cookieValue = fileUuid + cookieItemDelimiter + chunkData.part,
- cookieExpDays = options.resume.cookiesExpireIn;
-
- qq.setCookie(cookieName, cookieValue, cookieExpDays);
- }
-
- function deletePersistedChunkData(id) {
- var cookieName = getChunkDataCookieName(id);
-
- qq.deleteCookie(cookieName);
- }
-
- function getPersistedChunkData(id) {
- var chunkCookieValue = qq.getCookie(getChunkDataCookieName(id)),
- delimiterIndex, uuid, partIndex;
-
- if (chunkCookieValue) {
- delimiterIndex = chunkCookieValue.indexOf(cookieItemDelimiter);
- uuid = chunkCookieValue.substr(0, delimiterIndex);
- partIndex = parseInt(chunkCookieValue.substr(delimiterIndex + 1, chunkCookieValue.length - delimiterIndex), 10);
-
- return {
- uuid: uuid,
- part: partIndex
- };
- }
- }
-
- function getChunkDataCookieName(id) {
- var filename = api.getName(id),
- fileSize = api.getSize(id),
- maxChunkSize = options.chunking.partSize,
- cookieName;
-
- cookieName = "qqfilechunk" + cookieItemDelimiter + encodeURIComponent(filename) + cookieItemDelimiter + fileSize + cookieItemDelimiter + maxChunkSize;
-
- if (resumeId !== undefined) {
- cookieName += cookieItemDelimiter + resumeId;
- }
-
- return cookieName;
- }
-
- function getResumeId() {
- if (options.resume.id !== null &&
- options.resume.id !== undefined && !qq.isFunction(options.resume.id) && !qq.isObject(options.resume.id)) {
-
- return options.resume.id;
- }
- }
-
- function handleFileChunkingUpload(id, retry) {
- var name = api.getName(id),
- firstChunkIndex = 0,
- persistedChunkInfoForResume, firstChunkDataForResume, currentChunkIndex;
-
- if (!fileState[id].remainingChunkIdxs || fileState[id].remainingChunkIdxs.length === 0) {
- fileState[id].remainingChunkIdxs = [];
-
- if (resumeEnabled && !retry) {
- persistedChunkInfoForResume = getPersistedChunkData(id);
- if (persistedChunkInfoForResume) {
- firstChunkDataForResume = getChunkData(id, persistedChunkInfoForResume.part);
- if (options.onResume(id, name, getChunkDataForCallback(firstChunkDataForResume)) !== false) {
- firstChunkIndex = persistedChunkInfoForResume.part;
- fileState[id].uuid = persistedChunkInfoForResume.uuid;
- fileState[id].loaded = firstChunkDataForResume.start;
- fileState[id].attemptingResume = true;
- log('Resuming ' + name + " at partition index " + firstChunkIndex);
- }
- }
- }
-
- for (currentChunkIndex = getTotalChunks(id) - 1; currentChunkIndex >= firstChunkIndex; currentChunkIndex -= 1) {
- fileState[id].remainingChunkIdxs.unshift(currentChunkIndex);
- }
- }
-
- uploadNextChunk(id);
- }
-
- function handleStandardFileUpload(id) {
- var file = fileState[id].file,
- name = api.getName(id),
- xhr, params, toSend;
-
- fileState[id].loaded = 0;
-
- xhr = createXhr(id);
-
- xhr.upload.onprogress = function (e) {
- if (e.lengthComputable) {
- fileState[id].loaded = e.loaded;
- options.onProgress(id, name, e.loaded, e.total);
- }
- };
-
- xhr.onreadystatechange = getReadyStateChangeHandler(id, xhr);
-
- params = options.paramsStore.getParams(id);
- toSend = setParamsAndGetEntityToSend(params, xhr, file, id);
- setHeaders(id, xhr);
-
- log('Sending upload request for ' + id);
- xhr.send(toSend);
- }
-
-
- api = {
- /**
- * Adds file to the queue
- * Returns id to use with upload, cancel
- **/
- add: function (file) {
- if (!(file instanceof File)) {
- throw new Error('Passed obj in not a File (in qq.UploadHandlerXhr)');
- }
-
-
- var id = fileState.push({file: file}) - 1;
- fileState[id].uuid = qq.getUniqueId();
-
- return id;
- },
- getName: function (id) {
- var file = fileState[id].file;
- // fix missing name in Safari 4
- //NOTE: fixed missing name firefox 11.0a2 file.fileName is actually undefined
- return (file.fileName !== null && file.fileName !== undefined) ? file.fileName : file.name;
- },
- getSize: function (id) {
- /*jshint eqnull: true*/
- var file = fileState[id].file;
- return file.fileSize != null ? file.fileSize : file.size;
- },
- getFile: function (id) {
- if (fileState[id]) {
- return fileState[id].file;
- }
- },
- /**
- * Returns uploaded bytes for file identified by id
- */
- getLoaded: function (id) {
- return fileState[id].loaded || 0;
- },
- isValid: function (id) {
- return fileState[id] !== undefined;
- },
- reset: function () {
- fileState = [];
- },
- getUuid: function (id) {
- return fileState[id].uuid;
- },
- /**
- * Sends the file identified by id to the server
- */
- upload: function (id, retry) {
- var name = this.getName(id);
-
- options.onUpload(id, name);
-
- if (chunkFiles) {
- handleFileChunkingUpload(id, retry);
- }
- else {
- handleStandardFileUpload(id);
- }
- },
- cancel: function (id) {
- options.onCancel(id, this.getName(id));
-
- if (fileState[id].xhr) {
- fileState[id].xhr.abort();
- }
-
- if (resumeEnabled) {
- deletePersistedChunkData(id);
- }
-
- delete fileState[id];
- },
- getResumableFilesData: function () {
- var matchingCookieNames = [],
- resumableFilesData = [];
-
- if (chunkFiles && resumeEnabled) {
- if (resumeId === undefined) {
- matchingCookieNames = qq.getCookieNames(new RegExp("^qqfilechunk\\" + cookieItemDelimiter + ".+\\" +
- cookieItemDelimiter + "\\d+\\" + cookieItemDelimiter + options.chunking.partSize + "="));
- }
- else {
- matchingCookieNames = qq.getCookieNames(new RegExp("^qqfilechunk\\" + cookieItemDelimiter + ".+\\" +
- cookieItemDelimiter + "\\d+\\" + cookieItemDelimiter + options.chunking.partSize + "\\" +
- cookieItemDelimiter + resumeId + "="));
- }
-
- qq.each(matchingCookieNames, function (idx, cookieName) {
- var cookiesNameParts = cookieName.split(cookieItemDelimiter);
- var cookieValueParts = qq.getCookie(cookieName).split(cookieItemDelimiter);
-
- resumableFilesData.push({
- name: decodeURIComponent(cookiesNameParts[1]),
- size: cookiesNameParts[2],
- uuid: cookieValueParts[0],
- partIdx: cookieValueParts[1]
- });
- });
-
- return resumableFilesData;
- }
- return [];
- }
- };
-
- return api;
-};
-qq.FineUploaderBasic = function (o) {
- var that = this;
- this._options = {
- debug: false,
- button: null,
- multiple: true,
- maxConnections: 3,
- disableCancelForFormUploads: false,
- autoUpload: true,
- request: {
- endpoint: '/server/upload',
- params: {},
- paramsInBody: false,
- customHeaders: {},
- forceMultipart: true,
- inputName: 'qqfile',
- uuidName: 'qquuid',
- totalFileSizeName: 'qqtotalfilesize'
- },
- validation: {
- allowedExtensions: [],
- sizeLimit: 0,
- minSizeLimit: 0,
- stopOnFirstInvalidFile: true
- },
- callbacks: {
- onSubmit: function (id, fileName) {
- },
- onComplete: function (id, fileName, responseJSON) {
- },
- onCancel: function (id, fileName) {
- },
- onUpload: function (id, fileName) {
- },
- onUploadChunk: function (id, fileName, chunkData) {
- },
- onResume: function (id, fileName, chunkData) {
- },
- onProgress: function (id, fileName, loaded, total) {
- },
- onError: function (id, fileName, reason) {
- },
- onAutoRetry: function (id, fileName, attemptNumber) {
- },
- onManualRetry: function (id, fileName) {
- },
- onValidateBatch: function (fileData) {
- },
- onValidate: function (fileData) {
- }
- },
- messages: {
- typeError: "{file} has an invalid extension. Valid extension(s): {extensions}.",
- sizeError: "{file} is too large, maximum file size is {sizeLimit}.",
- minSizeError: "{file} is too small, minimum file size is {minSizeLimit}.",
- emptyError: "{file} is empty, please select files again without it.",
- noFilesError: "No files to upload.",
- onLeave: "The files are being uploaded, if you leave now the upload will be cancelled."
- },
- retry: {
- enableAuto: false,
- maxAutoAttempts: 3,
- autoAttemptDelay: 5,
- preventRetryResponseProperty: 'preventRetry'
- },
- classes: {
- buttonHover: 'qq-upload-button-hover',
- buttonFocus: 'qq-upload-button-focus'
- },
- chunking: {
- enabled: false,
- partSize: 2000000,
- paramNames: {
- partIndex: 'qqpartindex',
- partByteOffset: 'qqpartbyteoffset',
- chunkSize: 'qqchunksize',
- totalFileSize: 'qqtotalfilesize',
- totalParts: 'qqtotalparts',
- filename: 'qqfilename'
- }
- },
- resume: {
- enabled: false,
- id: null,
- cookiesExpireIn: 7, //days
- paramNames: {
- resuming: "qqresume"
- }
- },
- formatFileName: function (fileName) {
- if (fileName.length > 33) {
- fileName = fileName.slice(0, 19) + '...' + fileName.slice(-14);
- }
- return fileName;
- },
- text: {
- sizeSymbols: ['kB', 'MB', 'GB', 'TB', 'PB', 'EB']
- }
- };
-
- qq.extend(this._options, o, true);
- this._wrapCallbacks();
- this._disposeSupport = new qq.DisposeSupport();
-
- // number of files being uploaded
- this._filesInProgress = [];
-
- this._storedFileIds = [];
-
- this._autoRetries = [];
- this._retryTimeouts = [];
- this._preventRetries = [];
-
- this._paramsStore = this._createParamsStore();
- this._endpointStore = this._createEndpointStore();
-
- this._handler = this._createUploadHandler();
-
- if (this._options.button) {
- this._button = this._createUploadButton(this._options.button);
- }
-
- this._preventLeaveInProgress();
-};
-
-qq.FineUploaderBasic.prototype = {
- log: function (str, level) {
- if (this._options.debug && (!level || level === 'info')) {
- qq.log('[FineUploader] ' + str);
- }
- else if (level && level !== 'info') {
- qq.log('[FineUploader] ' + str, level);
-
- }
- },
- setParams: function (params, fileId) {
- /*jshint eqeqeq: true, eqnull: true*/
- if (fileId == null) {
- this._options.request.params = params;
- }
- else {
- this._paramsStore.setParams(params, fileId);
- }
- },
- setEndpoint: function (endpoint, fileId) {
- /*jshint eqeqeq: true, eqnull: true*/
- if (fileId == null) {
- this._options.request.endpoint = endpoint;
- }
- else {
- this._endpointStore.setEndpoint(endpoint, fileId);
- }
- },
- getInProgress: function () {
- return this._filesInProgress.length;
- },
- uploadStoredFiles: function () {
- "use strict";
- var idToUpload;
-
- while (this._storedFileIds.length) {
- idToUpload = this._storedFileIds.shift();
- this._filesInProgress.push(idToUpload);
- this._handler.upload(idToUpload);
- }
- },
- clearStoredFiles: function () {
- this._storedFileIds = [];
- },
- retry: function (id) {
- if (this._onBeforeManualRetry(id)) {
- this._handler.retry(id);
- return true;
- }
- else {
- return false;
- }
- },
- cancel: function (fileId) {
- this._handler.cancel(fileId);
- },
- reset: function () {
- this.log("Resetting uploader...");
- this._handler.reset();
- this._filesInProgress = [];
- this._storedFileIds = [];
- this._autoRetries = [];
- this._retryTimeouts = [];
- this._preventRetries = [];
- this._button.reset();
- this._paramsStore.reset();
- this._endpointStore.reset();
- },
- addFiles: function (filesOrInputs) {
- var self = this,
- verifiedFilesOrInputs = [],
- index, fileOrInput;
-
- if (filesOrInputs) {
- if (!window.FileList || !(filesOrInputs instanceof FileList)) {
- filesOrInputs = [].concat(filesOrInputs);
- }
-
- for (index = 0; index < filesOrInputs.length; index += 1) {
- fileOrInput = filesOrInputs[index];
-
- if (qq.isFileOrInput(fileOrInput)) {
- verifiedFilesOrInputs.push(fileOrInput);
- }
- else {
- self.log(fileOrInput + ' is not a File or INPUT element! Ignoring!', 'warn');
- }
- }
-
- this.log('Processing ' + verifiedFilesOrInputs.length + ' files or inputs...');
- this._uploadFileList(verifiedFilesOrInputs);
- }
- },
- getUuid: function (fileId) {
- return this._handler.getUuid(fileId);
- },
- getResumableFilesData: function () {
- return this._handler.getResumableFilesData();
- },
- getSize: function (fileId) {
- return this._handler.getSize(fileId);
- },
- getFile: function (fileId) {
- return this._handler.getFile(fileId);
- },
- _createUploadButton: function (element) {
- var self = this;
-
- var button = new qq.UploadButton({
- element: element,
- multiple: this._options.multiple && qq.isXhrUploadSupported(),
- acceptFiles: this._options.validation.acceptFiles,
- onChange: function (input) {
- self._onInputChange(input);
- },
- hoverClass: this._options.classes.buttonHover,
- focusClass: this._options.classes.buttonFocus
- });
-
- this._disposeSupport.addDisposer(function () {
- button.dispose();
- });
- return button;
- },
- _createUploadHandler: function () {
- var self = this;
-
- return new qq.UploadHandler({
- debug: this._options.debug,
- forceMultipart: this._options.request.forceMultipart,
- maxConnections: this._options.maxConnections,
- customHeaders: this._options.request.customHeaders,
- inputName: this._options.request.inputName,
- uuidParamName: this._options.request.uuidName,
- totalFileSizeParamName: this._options.request.totalFileSizeName,
- demoMode: this._options.demoMode,
- paramsInBody: this._options.request.paramsInBody,
- paramsStore: this._paramsStore,
- endpointStore: this._endpointStore,
- chunking: this._options.chunking,
- resume: this._options.resume,
- log: function (str, level) {
- self.log(str, level);
- },
- onProgress: function (id, fileName, loaded, total) {
- self._onProgress(id, fileName, loaded, total);
- self._options.callbacks.onProgress(id, fileName, loaded, total);
- },
- onComplete: function (id, fileName, result, xhr) {
- self._onComplete(id, fileName, result, xhr);
- self._options.callbacks.onComplete(id, fileName, result);
- },
- onCancel: function (id, fileName) {
- self._onCancel(id, fileName);
- self._options.callbacks.onCancel(id, fileName);
- },
- onUpload: function (id, fileName) {
- self._onUpload(id, fileName);
- self._options.callbacks.onUpload(id, fileName);
- },
- onUploadChunk: function (id, fileName, chunkData) {
- self._options.callbacks.onUploadChunk(id, fileName, chunkData);
- },
- onResume: function (id, fileName, chunkData) {
- return self._options.callbacks.onResume(id, fileName, chunkData);
- },
- onAutoRetry: function (id, fileName, responseJSON, xhr) {
- self._preventRetries[id] = responseJSON[self._options.retry.preventRetryResponseProperty];
-
- if (self._shouldAutoRetry(id, fileName, responseJSON)) {
- self._maybeParseAndSendUploadError(id, fileName, responseJSON, xhr);
- self._options.callbacks.onAutoRetry(id, fileName, self._autoRetries[id] + 1);
- self._onBeforeAutoRetry(id, fileName);
-
- self._retryTimeouts[id] = setTimeout(function () {
- self._onAutoRetry(id, fileName, responseJSON)
- }, self._options.retry.autoAttemptDelay * 1000);
-
- return true;
- }
- else {
- return false;
- }
- }
- });
- },
- _preventLeaveInProgress: function () {
- var self = this;
-
- this._disposeSupport.attach(window, 'beforeunload', function (e) {
- if (!self._filesInProgress.length) {
- return;
- }
-
- var e = e || window.event;
- // for ie, ff
- e.returnValue = self._options.messages.onLeave;
- // for webkit
- return self._options.messages.onLeave;
- });
- },
- _onSubmit: function (id, fileName) {
- if (this._options.autoUpload) {
- this._filesInProgress.push(id);
- }
- },
- _onProgress: function (id, fileName, loaded, total) {
- },
- _onComplete: function (id, fileName, result, xhr) {
- this._removeFromFilesInProgress(id);
- this._maybeParseAndSendUploadError(id, fileName, result, xhr);
- },
- _onCancel: function (id, fileName) {
- this._removeFromFilesInProgress(id);
-
- clearTimeout(this._retryTimeouts[id]);
-
- var storedFileIndex = qq.indexOf(this._storedFileIds, id);
- if (!this._options.autoUpload && storedFileIndex >= 0) {
- this._storedFileIds.splice(storedFileIndex, 1);
- }
- },
- _removeFromFilesInProgress: function (id) {
- var index = qq.indexOf(this._filesInProgress, id);
- if (index >= 0) {
- this._filesInProgress.splice(index, 1);
- }
- },
- _onUpload: function (id, fileName) {
- },
- _onInputChange: function (input) {
- if (qq.isXhrUploadSupported()) {
- this.addFiles(input.files);
- } else {
- this.addFiles(input);
- }
- this._button.reset();
- },
- _onBeforeAutoRetry: function (id, fileName) {
- this.log("Waiting " + this._options.retry.autoAttemptDelay + " seconds before retrying " + fileName + "...");
- },
- _onAutoRetry: function (id, fileName, responseJSON) {
- this.log("Retrying " + fileName + "...");
- this._autoRetries[id]++;
- this._handler.retry(id);
- },
- _shouldAutoRetry: function (id, fileName, responseJSON) {
- if (!this._preventRetries[id] && this._options.retry.enableAuto) {
- if (this._autoRetries[id] === undefined) {
- this._autoRetries[id] = 0;
- }
-
- return this._autoRetries[id] < this._options.retry.maxAutoAttempts
- }
-
- return false;
- },
- //return false if we should not attempt the requested retry
- _onBeforeManualRetry: function (id) {
- if (this._preventRetries[id]) {
- this.log("Retries are forbidden for id " + id, 'warn');
- return false;
- }
- else if (this._handler.isValid(id)) {
- var fileName = this._handler.getName(id);
-
- if (this._options.callbacks.onManualRetry(id, fileName) === false) {
- return false;
- }
-
- this.log("Retrying upload for '" + fileName + "' (id: " + id + ")...");
- this._filesInProgress.push(id);
- return true;
- }
- else {
- this.log("'" + id + "' is not a valid file ID", 'error');
- return false;
- }
- },
- _maybeParseAndSendUploadError: function (id, fileName, response, xhr) {
- //assuming no one will actually set the response code to something other than 200 and still set 'success' to true
- if (!response.success) {
- if (xhr && xhr.status !== 200 && !response.error) {
- this._options.callbacks.onError(id, fileName, "XHR returned response code " + xhr.status);
- }
- else {
- var errorReason = response.error ? response.error : "Upload failure reason unknown";
- this._options.callbacks.onError(id, fileName, errorReason);
- }
- }
- },
- _uploadFileList: function (files) {
- var validationDescriptors, index, batchInvalid;
-
- validationDescriptors = this._getValidationDescriptors(files);
- batchInvalid = this._options.callbacks.onValidateBatch(validationDescriptors) === false;
-
- if (!batchInvalid) {
- if (files.length > 0) {
- for (index = 0; index < files.length; index++) {
- if (this._validateFile(files[index])) {
- this._uploadFile(files[index]);
- } else {
- if (this._options.validation.stopOnFirstInvalidFile) {
- return;
- }
- }
- }
- }
- else {
- this._error('noFilesError', "");
- }
- }
- },
- _uploadFile: function (fileContainer) {
- var id = this._handler.add(fileContainer);
- var fileName = this._handler.getName(id);
-
- if (this._options.callbacks.onSubmit(id, fileName) !== false) {
- this._onSubmit(id, fileName);
- if (this._options.autoUpload) {
- this._handler.upload(id);
- }
- else {
- this._storeFileForLater(id);
- }
- }
- },
- _storeFileForLater: function (id) {
- this._storedFileIds.push(id);
- },
- _validateFile: function (file) {
- var validationDescriptor, name, size;
-
- validationDescriptor = this._getValidationDescriptor(file);
- name = validationDescriptor.name;
- size = validationDescriptor.size;
-
- if (this._options.callbacks.onValidate(validationDescriptor) === false) {
- return false;
- }
-
- if (!this._isAllowedExtension(name)) {
- this._error('typeError', name);
- return false;
-
- }
- else if (size === 0) {
- this._error('emptyError', name);
- return false;
-
- }
- else if (size && this._options.validation.sizeLimit && size > this._options.validation.sizeLimit) {
- this._error('sizeError', name);
- return false;
-
- }
- else if (size && size < this._options.validation.minSizeLimit) {
- this._error('minSizeError', name);
- return false;
- }
-
- return true;
- },
- _error: function (code, fileName) {
- var message = this._options.messages[code];
-
- function r(name, replacement) {
- message = message.replace(name, replacement);
- }
-
- var extensions = this._options.validation.allowedExtensions.join(', ').toLowerCase();
-
- r('{file}', this._options.formatFileName(fileName));
- r('{extensions}', extensions);
- r('{sizeLimit}', this._formatSize(this._options.validation.sizeLimit));
- r('{minSizeLimit}', this._formatSize(this._options.validation.minSizeLimit));
-
- this._options.callbacks.onError(null, fileName, message);
-
- return message;
- },
- _isAllowedExtension: function (fileName) {
- var allowed = this._options.validation.allowedExtensions,
- valid = false;
-
- if (!allowed.length) {
- return true;
- }
-
- qq.each(allowed, function (idx, allowedExt) {
- /*jshint eqeqeq: true, eqnull: true*/
- var extRegex = new RegExp('\\.' + allowedExt + "$", 'i');
-
- if (fileName.match(extRegex) != null) {
- valid = true;
- return false;
- }
- });
-
- return valid;
- },
- _formatSize: function (bytes) {
- var i = -1;
- do {
- bytes = bytes / 1024;
- i++;
- } while (bytes > 99);
-
- return Math.max(bytes, 0.1).toFixed(1) + this._options.text.sizeSymbols[i];
- },
- _wrapCallbacks: function () {
- var self, safeCallback;
-
- self = this;
-
- safeCallback = function (name, callback, args) {
- try {
- return callback.apply(self, args);
- }
- catch (exception) {
- self.log("Caught exception in '" + name + "' callback - " + exception.message, 'error');
- }
- }
-
- for (var prop in this._options.callbacks) {
- (function () {
- var callbackName, callbackFunc;
- callbackName = prop;
- callbackFunc = self._options.callbacks[callbackName];
- self._options.callbacks[callbackName] = function () {
- return safeCallback(callbackName, callbackFunc, arguments);
- }
- }());
- }
- },
- _parseFileName: function (file) {
- var name;
-
- if (file.value) {
- // it is a file input
- // get input value and remove path to normalize
- name = file.value.replace(/.*(\/|\\)/, "");
- } else {
- // fix missing properties in Safari 4 and firefox 11.0a2
- name = (file.fileName !== null && file.fileName !== undefined) ? file.fileName : file.name;
- }
-
- return name;
- },
- _parseFileSize: function (file) {
- var size;
-
- if (!file.value) {
- // fix missing properties in Safari 4 and firefox 11.0a2
- size = (file.fileSize !== null && file.fileSize !== undefined) ? file.fileSize : file.size;
- }
-
- return size;
- },
- _getValidationDescriptor: function (file) {
- var name, size, fileDescriptor;
-
- fileDescriptor = {};
- name = this._parseFileName(file);
- size = this._parseFileSize(file);
-
- fileDescriptor.name = name;
- if (size) {
- fileDescriptor.size = size;
- }
-
- return fileDescriptor;
- },
- _getValidationDescriptors: function (files) {
- var self = this,
- fileDescriptors = [];
-
- qq.each(files, function (idx, file) {
- fileDescriptors.push(self._getValidationDescriptor(file));
- });
-
- return fileDescriptors;
- },
- _createParamsStore: function () {
- var paramsStore = {},
- self = this;
-
- return {
- setParams: function (params, fileId) {
- var paramsCopy = {};
- qq.extend(paramsCopy, params);
- paramsStore[fileId] = paramsCopy;
- },
-
- getParams: function (fileId) {
- /*jshint eqeqeq: true, eqnull: true*/
- var paramsCopy = {};
-
- if (fileId != null && paramsStore[fileId]) {
- qq.extend(paramsCopy, paramsStore[fileId]);
- }
- else {
- qq.extend(paramsCopy, self._options.request.params);
- }
-
- return paramsCopy;
- },
-
- remove: function (fileId) {
- return delete paramsStore[fileId];
- },
-
- reset: function () {
- paramsStore = {};
- }
- };
- },
- _createEndpointStore: function () {
- var endpointStore = {},
- self = this;
-
- return {
- setEndpoint: function (endpoint, fileId) {
- endpointStore[fileId] = endpoint;
- },
-
- getEndpoint: function (fileId) {
- /*jshint eqeqeq: true, eqnull: true*/
- if (fileId != null && endpointStore[fileId]) {
- return endpointStore[fileId];
- }
-
- return self._options.request.endpoint;
- },
-
- remove: function (fileId) {
- return delete endpointStore[fileId];
- },
-
- reset: function () {
- endpointStore = {};
- }
- };
- }
-};
-/*globals qq, document*/
-qq.DragAndDrop = function (o) {
- "use strict";
-
- var options, dz, dirPending,
- droppedFiles = [],
- droppedEntriesCount = 0,
- droppedEntriesParsedCount = 0,
- disposeSupport = new qq.DisposeSupport();
-
- options = {
- dropArea: null,
- extraDropzones: [],
- hideDropzones: true,
- multiple: true,
- classes: {
- dropActive: null
- },
- callbacks: {
- dropProcessing: function (isProcessing, files) {
- },
- error: function (code, filename) {
- },
- log: function (message, level) {
- }
- }
- };
-
- qq.extend(options, o);
-
- function maybeUploadDroppedFiles() {
- if (droppedEntriesCount === droppedEntriesParsedCount && !dirPending) {
- options.callbacks.log('Grabbed ' + droppedFiles.length + " files after tree traversal.");
- dz.dropDisabled(false);
- options.callbacks.dropProcessing(false, droppedFiles);
- }
- }
-
- function addDroppedFile(file) {
- droppedFiles.push(file);
- droppedEntriesParsedCount += 1;
- maybeUploadDroppedFiles();
- }
-
- function traverseFileTree(entry) {
- var dirReader, i;
-
- droppedEntriesCount += 1;
-
- if (entry.isFile) {
- entry.file(function (file) {
- addDroppedFile(file);
- });
- }
- else if (entry.isDirectory) {
- dirPending = true;
- dirReader = entry.createReader();
- dirReader.readEntries(function (entries) {
- droppedEntriesParsedCount += 1;
- for (i = 0; i < entries.length; i += 1) {
- traverseFileTree(entries[i]);
- }
-
- dirPending = false;
-
- if (!entries.length) {
- maybeUploadDroppedFiles();
- }
- });
- }
- }
-
- function handleDataTransfer(dataTransfer) {
- var i, items, entry;
-
- options.callbacks.dropProcessing(true);
- dz.dropDisabled(true);
-
- if (dataTransfer.files.length > 1 && !options.multiple) {
- options.callbacks.dropProcessing(false);
- options.callbacks.error('tooManyFilesError', "");
- dz.dropDisabled(false);
- }
- else {
- droppedFiles = [];
- droppedEntriesCount = 0;
- droppedEntriesParsedCount = 0;
-
- if (qq.isFolderDropSupported(dataTransfer)) {
- items = dataTransfer.items;
-
- for (i = 0; i < items.length; i += 1) {
- entry = items[i].webkitGetAsEntry();
- if (entry) {
- //due to a bug in Chrome's File System API impl - #149735
- if (entry.isFile) {
- droppedFiles.push(items[i].getAsFile());
- if (i === items.length - 1) {
- maybeUploadDroppedFiles();
- }
- }
-
- else {
- traverseFileTree(entry);
- }
- }
- }
- }
- else {
- options.callbacks.dropProcessing(false, dataTransfer.files);
- dz.dropDisabled(false);
- }
- }
- }
-
- function setupDropzone(dropArea) {
- dz = new qq.UploadDropZone({
- element: dropArea,
- onEnter: function (e) {
- qq(dropArea).addClass(options.classes.dropActive);
- e.stopPropagation();
- },
- onLeaveNotDescendants: function (e) {
- qq(dropArea).removeClass(options.classes.dropActive);
- },
- onDrop: function (e) {
- if (options.hideDropzones) {
- qq(dropArea).hide();
- }
- qq(dropArea).removeClass(options.classes.dropActive);
-
- handleDataTransfer(e.dataTransfer);
- }
- });
-
- disposeSupport.addDisposer(function () {
- dz.dispose();
- });
-
- if (options.hideDropzones) {
- qq(dropArea).hide();
- }
- }
-
- function isFileDrag(dragEvent) {
- var fileDrag;
-
- qq.each(dragEvent.dataTransfer.types, function (key, val) {
- if (val === 'Files') {
- fileDrag = true;
- return false;
- }
- });
-
- return fileDrag;
- }
-
- function setupDragDrop() {
- if (options.dropArea) {
- options.extraDropzones.push(options.dropArea);
- }
-
- var i, dropzones = options.extraDropzones;
-
- for (i = 0; i < dropzones.length; i += 1) {
- setupDropzone(dropzones[i]);
- }
-
- // IE <= 9 does not support the File API used for drag+drop uploads
- if (options.dropArea && (!qq.ie() || qq.ie10())) {
- disposeSupport.attach(document, 'dragenter', function (e) {
- if (!dz.dropDisabled() && isFileDrag(e)) {
- if (qq(options.dropArea).hasClass(options.classes.dropDisabled)) {
- return;
- }
-
- options.dropArea.style.display = 'block';
- for (i = 0; i < dropzones.length; i += 1) {
- dropzones[i].style.display = 'block';
- }
- }
- });
- }
- disposeSupport.attach(document, 'dragleave', function (e) {
- if (options.hideDropzones && qq.FineUploader.prototype._leaving_document_out(e)) {
- for (i = 0; i < dropzones.length; i += 1) {
- qq(dropzones[i]).hide();
- }
- }
- });
- disposeSupport.attach(document, 'drop', function (e) {
- if (options.hideDropzones) {
- for (i = 0; i < dropzones.length; i += 1) {
- qq(dropzones[i]).hide();
- }
- }
- e.preventDefault();
- });
- }
-
- return {
- setup: function () {
- setupDragDrop();
- },
-
- setupExtraDropzone: function (element) {
- options.extraDropzones.push(element);
- setupDropzone(element);
- },
-
- removeExtraDropzone: function (element) {
- var i, dzs = options.extraDropzones;
- for (i in dzs) {
- if (dzs[i] === element) {
- return dzs.splice(i, 1);
- }
- }
- },
-
- dispose: function () {
- disposeSupport.dispose();
- dz.dispose();
- }
- };
-};
-
-
-qq.UploadDropZone = function (o) {
- "use strict";
-
- var options, element, preventDrop, dropOutsideDisabled, disposeSupport = new qq.DisposeSupport();
-
- options = {
- element: null,
- onEnter: function (e) {
- },
- onLeave: function (e) {
- },
- // is not fired when leaving element by hovering descendants
- onLeaveNotDescendants: function (e) {
- },
- onDrop: function (e) {
- }
- };
-
- qq.extend(options, o);
- element = options.element;
-
- function dragover_should_be_canceled() {
- return qq.safari() || (qq.firefox() && qq.windows());
- }
-
- function disableDropOutside(e) {
- // run only once for all instances
- if (!dropOutsideDisabled) {
-
- // for these cases we need to catch onDrop to reset dropArea
- if (dragover_should_be_canceled) {
- disposeSupport.attach(document, 'dragover', function (e) {
- e.preventDefault();
- });
- } else {
- disposeSupport.attach(document, 'dragover', function (e) {
- if (e.dataTransfer) {
- e.dataTransfer.dropEffect = 'none';
- e.preventDefault();
- }
- });
- }
-
- dropOutsideDisabled = true;
- }
- }
-
- function isValidFileDrag(e) {
- // e.dataTransfer currently causing IE errors
- // IE9 does NOT support file API, so drag-and-drop is not possible
- if (qq.ie() && !qq.ie10()) {
- return false;
- }
-
- var effectTest, dt = e.dataTransfer,
- // do not check dt.types.contains in webkit, because it crashes safari 4
- isSafari = qq.safari();
-
- // dt.effectAllowed is none in Safari 5
- // dt.types.contains check is for firefox
- effectTest = qq.ie10() ? true : dt.effectAllowed !== 'none';
- return dt && effectTest && (dt.files || (!isSafari && dt.types.contains && dt.types.contains('Files')));
- }
-
- function isOrSetDropDisabled(isDisabled) {
- if (isDisabled !== undefined) {
- preventDrop = isDisabled;
- }
- return preventDrop;
- }
-
- function attachEvents() {
- disposeSupport.attach(element, 'dragover', function (e) {
- if (!isValidFileDrag(e)) {
- return;
- }
-
- var effect = qq.ie() ? null : e.dataTransfer.effectAllowed;
- if (effect === 'move' || effect === 'linkMove') {
- e.dataTransfer.dropEffect = 'move'; // for FF (only move allowed)
- } else {
- e.dataTransfer.dropEffect = 'copy'; // for Chrome
- }
-
- e.stopPropagation();
- e.preventDefault();
- });
-
- disposeSupport.attach(element, 'dragenter', function (e) {
- if (!isOrSetDropDisabled()) {
- if (!isValidFileDrag(e)) {
- return;
- }
- options.onEnter(e);
- }
- });
-
- disposeSupport.attach(element, 'dragleave', function (e) {
- if (!isValidFileDrag(e)) {
- return;
- }
-
- options.onLeave(e);
-
- var relatedTarget = document.elementFromPoint(e.clientX, e.clientY);
- // do not fire when moving a mouse over a descendant
- if (qq(this).contains(relatedTarget)) {
- return;
- }
-
- options.onLeaveNotDescendants(e);
- });
-
- disposeSupport.attach(element, 'drop', function (e) {
- if (!isOrSetDropDisabled()) {
- if (!isValidFileDrag(e)) {
- return;
- }
-
- e.preventDefault();
- options.onDrop(e);
- }
- });
- }
-
- disableDropOutside();
- attachEvents();
-
- return {
- dropDisabled: function (isDisabled) {
- return isOrSetDropDisabled(isDisabled);
- },
-
- dispose: function () {
- disposeSupport.dispose();
- }
- };
-};
-/**
- * Class that creates upload widget with drag-and-drop and file list
- * @inherits qq.FineUploaderBasic
- */
-qq.FineUploader = function (o) {
- // call parent constructor
- qq.FineUploaderBasic.apply(this, arguments);
-
- // additional options
- qq.extend(this._options, {
- element: null,
- listElement: null,
- dragAndDrop: {
- extraDropzones: [],
- hideDropzones: true,
- disableDefaultDropzone: false
- },
- text: {
- uploadButton: 'Upload a file',
- cancelButton: 'Cancel',
- retryButton: 'Retry',
- failUpload: 'Upload failed',
- dragZone: 'Drop files here to upload',
- dropProcessing: 'Processing dropped files...',
- formatProgress: "{percent}% of {total_size}",
- waitingForResponse: "Processing..."
- },
- template: '' +
- ((!this._options.dragAndDrop || !this._options.dragAndDrop.disableDefaultDropzone) ? '
{dragZoneText}
' : '') +
- (!this._options.button ? '
' : '') +
- '
{dropProcessingText} ' +
- (!this._options.listElement ? '
' : '') +
- '
',
-
- // template for one item in file list
- fileTemplate: '' +
- '
' +
- ' ' +
- ' ' +
- ' ' +
- ' ' +
- '{cancelButtonText} ' +
- '{retryButtonText} ' +
- '{statusText} ' +
- ' ',
- classes: {
- button: 'qq-upload-button',
- drop: 'qq-upload-drop-area',
- dropActive: 'qq-upload-drop-area-active',
- dropDisabled: 'qq-upload-drop-area-disabled',
- list: 'qq-upload-list',
- progressBar: 'qq-progress-bar',
- file: 'qq-upload-file',
- spinner: 'qq-upload-spinner',
- finished: 'qq-upload-finished',
- retrying: 'qq-upload-retrying',
- retryable: 'qq-upload-retryable',
- size: 'qq-upload-size',
- cancel: 'qq-upload-cancel',
- retry: 'qq-upload-retry',
- statusText: 'qq-upload-status-text',
-
- success: 'qq-upload-success',
- fail: 'qq-upload-fail',
-
- successIcon: null,
- failIcon: null,
-
- dropProcessing: 'qq-drop-processing',
- dropProcessingSpinner: 'qq-drop-processing-spinner'
- },
- failedUploadTextDisplay: {
- mode: 'default', //default, custom, or none
- maxChars: 50,
- responseProperty: 'error',
- enableTooltip: true
- },
- messages: {
- tooManyFilesError: "You may only drop one file"
- },
- retry: {
- showAutoRetryNote: true,
- autoRetryNote: "Retrying {retryNum}/{maxAuto}...",
- showButton: false
- },
- showMessage: function (message) {
- setTimeout(function () {
- alert(message);
- }, 0);
- }
- }, true);
-
- // overwrite options with user supplied
- qq.extend(this._options, o, true);
- this._wrapCallbacks();
-
- // overwrite the upload button text if any
- // same for the Cancel button and Fail message text
- this._options.template = this._options.template.replace(/\{dragZoneText\}/g, this._options.text.dragZone);
- this._options.template = this._options.template.replace(/\{uploadButtonText\}/g, this._options.text.uploadButton);
- this._options.template = this._options.template.replace(/\{dropProcessingText\}/g, this._options.text.dropProcessing);
- this._options.fileTemplate = this._options.fileTemplate.replace(/\{cancelButtonText\}/g, this._options.text.cancelButton);
- this._options.fileTemplate = this._options.fileTemplate.replace(/\{retryButtonText\}/g, this._options.text.retryButton);
- this._options.fileTemplate = this._options.fileTemplate.replace(/\{statusText\}/g, "");
-
- this._element = this._options.element;
- this._element.innerHTML = this._options.template;
- this._listElement = this._options.listElement || this._find(this._element, 'list');
-
- this._classes = this._options.classes;
-
- if (!this._button) {
- this._button = this._createUploadButton(this._find(this._element, 'button'));
- }
-
- this._bindCancelAndRetryEvents();
-
- this._dnd = this._setupDragAndDrop();
-};
-
-// inherit from Basic Uploader
-qq.extend(qq.FineUploader.prototype, qq.FineUploaderBasic.prototype);
-
-qq.extend(qq.FineUploader.prototype, {
- clearStoredFiles: function () {
- qq.FineUploaderBasic.prototype.clearStoredFiles.apply(this, arguments);
- this._listElement.innerHTML = "";
- },
- addExtraDropzone: function (element) {
- this._dnd.setupExtraDropzone(element);
- },
- removeExtraDropzone: function (element) {
- return this._dnd.removeExtraDropzone(element);
- },
- getItemByFileId: function (id) {
- var item = this._listElement.firstChild;
-
- // there can't be txt nodes in dynamically created list
- // and we can use nextSibling
- while (item) {
- if (item.qqFileId == id) return item;
- item = item.nextSibling;
- }
- },
- cancel: function (fileId) {
- qq.FineUploaderBasic.prototype.cancel.apply(this, arguments);
- var item = this.getItemByFileId(fileId);
- qq(item).remove();
- },
- reset: function () {
- qq.FineUploaderBasic.prototype.reset.apply(this, arguments);
- this._element.innerHTML = this._options.template;
- this._listElement = this._options.listElement || this._find(this._element, 'list');
- if (!this._options.button) {
- this._button = this._createUploadButton(this._find(this._element, 'button'));
- }
- this._bindCancelAndRetryEvents();
- this._dnd.dispose();
- this._dnd = this._setupDragAndDrop();
- },
- _setupDragAndDrop: function () {
- var self = this,
- dropProcessingEl = this._find(this._element, 'dropProcessing'),
- dnd, preventSelectFiles, defaultDropAreaEl;
-
- preventSelectFiles = function (event) {
- event.preventDefault();
- };
-
- if (!this._options.dragAndDrop.disableDefaultDropzone) {
- defaultDropAreaEl = this._find(this._options.element, 'drop');
- }
-
- dnd = new qq.DragAndDrop({
- dropArea: defaultDropAreaEl,
- extraDropzones: this._options.dragAndDrop.extraDropzones,
- hideDropzones: this._options.dragAndDrop.hideDropzones,
- multiple: this._options.multiple,
- classes: {
- dropActive: this._options.classes.dropActive
- },
- callbacks: {
- dropProcessing: function (isProcessing, files) {
- var input = self._button.getInput();
-
- if (isProcessing) {
- qq(dropProcessingEl).css({display: 'block'});
- qq(input).attach('click', preventSelectFiles);
- }
- else {
- qq(dropProcessingEl).hide();
- qq(input).detach('click', preventSelectFiles);
- }
-
- if (files) {
- self.addFiles(files);
- }
- },
- error: function (code, filename) {
- self._error(code, filename);
- },
- log: function (message, level) {
- self.log(message, level);
- }
- }
- });
-
- dnd.setup();
-
- return dnd;
- },
- _leaving_document_out: function (e) {
- return ((qq.chrome() || (qq.safari() && qq.windows())) && e.clientX == 0 && e.clientY == 0) // null coords for Chrome and Safari Windows
- || (qq.firefox() && !e.relatedTarget); // null e.relatedTarget for Firefox
- },
- _storeFileForLater: function (id) {
- qq.FineUploaderBasic.prototype._storeFileForLater.apply(this, arguments);
- var item = this.getItemByFileId(id);
- qq(this._find(item, 'spinner')).hide();
- },
- /**
- * Gets one of the elements listed in this._options.classes
- **/
- _find: function (parent, type) {
- var element = qq(parent).getByClass(this._options.classes[type])[0];
- if (!element) {
- throw new Error('element not found ' + type);
- }
-
- return element;
- },
- _onSubmit: function (id, fileName) {
- qq.FineUploaderBasic.prototype._onSubmit.apply(this, arguments);
- this._addToList(id, fileName);
- },
- // Update the progress bar & percentage as the file is uploaded
- _onProgress: function (id, fileName, loaded, total) {
- qq.FineUploaderBasic.prototype._onProgress.apply(this, arguments);
-
- var item, progressBar, text, percent, cancelLink, size;
-
- item = this.getItemByFileId(id);
- progressBar = this._find(item, 'progressBar');
- percent = Math.round(loaded / total * 100);
-
- if (loaded === total) {
- cancelLink = this._find(item, 'cancel');
- qq(cancelLink).hide();
-
- qq(progressBar).hide();
- qq(this._find(item, 'statusText')).setText(this._options.text.waitingForResponse);
-
- // If last byte was sent, just display final size
- text = this._formatSize(total);
- }
- else {
- // If still uploading, display percentage
- text = this._formatProgress(loaded, total);
-
- qq(progressBar).css({display: 'block'});
- }
-
- // Update progress bar element
- qq(progressBar).css({width: percent + '%'});
-
- size = this._find(item, 'size');
- qq(size).css({display: 'inline'});
- qq(size).setText(text);
- },
- _onComplete: function (id, fileName, result, xhr) {
- qq.FineUploaderBasic.prototype._onComplete.apply(this, arguments);
-
- var item = this.getItemByFileId(id);
-
- qq(this._find(item, 'statusText')).clearText();
-
- qq(item).removeClass(this._classes.retrying);
- qq(this._find(item, 'progressBar')).hide();
-
- if (!this._options.disableCancelForFormUploads || qq.isXhrUploadSupported()) {
- qq(this._find(item, 'cancel')).hide();
- }
- qq(this._find(item, 'spinner')).hide();
-
- if (result.success) {
- qq(item).addClass(this._classes.success);
- if (this._classes.successIcon) {
- this._find(item, 'finished').style.display = "inline-block";
- qq(item).addClass(this._classes.successIcon);
- }
- } else {
- qq(item).addClass(this._classes.fail);
- if (this._classes.failIcon) {
- this._find(item, 'finished').style.display = "inline-block";
- qq(item).addClass(this._classes.failIcon);
- }
- if (this._options.retry.showButton && !this._preventRetries[id]) {
- qq(item).addClass(this._classes.retryable);
- }
- this._controlFailureTextDisplay(item, result);
- }
- },
- _onUpload: function (id, fileName) {
- qq.FineUploaderBasic.prototype._onUpload.apply(this, arguments);
-
- var item = this.getItemByFileId(id);
- this._showSpinner(item);
- },
- _onBeforeAutoRetry: function (id) {
- var item, progressBar, cancelLink, failTextEl, retryNumForDisplay, maxAuto, retryNote;
-
- qq.FineUploaderBasic.prototype._onBeforeAutoRetry.apply(this, arguments);
-
- item = this.getItemByFileId(id);
- progressBar = this._find(item, 'progressBar');
-
- this._showCancelLink(item);
- progressBar.style.width = 0;
- qq(progressBar).hide();
-
- if (this._options.retry.showAutoRetryNote) {
- failTextEl = this._find(item, 'statusText');
- retryNumForDisplay = this._autoRetries[id] + 1;
- maxAuto = this._options.retry.maxAutoAttempts;
-
- retryNote = this._options.retry.autoRetryNote.replace(/\{retryNum\}/g, retryNumForDisplay);
- retryNote = retryNote.replace(/\{maxAuto\}/g, maxAuto);
-
- qq(failTextEl).setText(retryNote);
- if (retryNumForDisplay === 1) {
- qq(item).addClass(this._classes.retrying);
- }
- }
- },
- //return false if we should not attempt the requested retry
- _onBeforeManualRetry: function (id) {
- if (qq.FineUploaderBasic.prototype._onBeforeManualRetry.apply(this, arguments)) {
- var item = this.getItemByFileId(id);
- this._find(item, 'progressBar').style.width = 0;
- qq(item).removeClass(this._classes.fail);
- qq(this._find(item, 'statusText')).clearText();
- this._showSpinner(item);
- this._showCancelLink(item);
- return true;
- }
- return false;
- },
- _addToList: function (id, fileName) {
- var item = qq.toElement(this._options.fileTemplate);
- if (this._options.disableCancelForFormUploads && !qq.isXhrUploadSupported()) {
- var cancelLink = this._find(item, 'cancel');
- qq(cancelLink).remove();
- }
-
- item.qqFileId = id;
-
- var fileElement = this._find(item, 'file');
- qq(fileElement).setText(this._options.formatFileName(fileName));
- qq(this._find(item, 'size')).hide();
- if (!this._options.multiple) this._clearList();
- this._listElement.appendChild(item);
- },
- _clearList: function () {
- this._listElement.innerHTML = '';
- this.clearStoredFiles();
- },
- /**
- * delegate click event for cancel & retry links
- **/
- _bindCancelAndRetryEvents: function () {
- var self = this,
- list = this._listElement;
-
- this._disposeSupport.attach(list, 'click', function (e) {
- e = e || window.event;
- var target = e.target || e.srcElement;
-
- if (qq(target).hasClass(self._classes.cancel) || qq(target).hasClass(self._classes.retry)) {
- qq.preventDefault(e);
-
- var item = target.parentNode;
- while (item.qqFileId == undefined) {
- item = target = target.parentNode;
- }
-
- if (qq(target).hasClass(self._classes.cancel)) {
- self.cancel(item.qqFileId);
- }
- else {
- qq(item).removeClass(self._classes.retryable);
- self.retry(item.qqFileId);
- }
- }
- });
- },
- _formatProgress: function (uploadedSize, totalSize) {
- var message = this._options.text.formatProgress;
-
- function r(name, replacement) {
- message = message.replace(name, replacement);
- }
-
- r('{percent}', Math.round(uploadedSize / totalSize * 100));
- r('{total_size}', this._formatSize(totalSize));
- return message;
- },
- _controlFailureTextDisplay: function (item, response) {
- var mode, maxChars, responseProperty, failureReason, shortFailureReason;
-
- mode = this._options.failedUploadTextDisplay.mode;
- maxChars = this._options.failedUploadTextDisplay.maxChars;
- responseProperty = this._options.failedUploadTextDisplay.responseProperty;
-
- if (mode === 'custom') {
- failureReason = response[responseProperty];
- if (failureReason) {
- if (failureReason.length > maxChars) {
- shortFailureReason = failureReason.substring(0, maxChars) + '...';
- }
- }
- else {
- failureReason = this._options.text.failUpload;
- this.log("'" + responseProperty + "' is not a valid property on the server response.", 'warn');
- }
-
- qq(this._find(item, 'statusText')).setText(shortFailureReason || failureReason);
-
- if (this._options.failedUploadTextDisplay.enableTooltip) {
- this._showTooltip(item, failureReason);
- }
- }
- else if (mode === 'default') {
- qq(this._find(item, 'statusText')).setText(this._options.text.failUpload);
- }
- else if (mode !== 'none') {
- this.log("failedUploadTextDisplay.mode value of '" + mode + "' is not valid", 'warn');
- }
- },
- //TODO turn this into a real tooltip, with click trigger (so it is usable on mobile devices). See case #355 for details.
- _showTooltip: function (item, text) {
- item.title = text;
- },
- _showSpinner: function (item) {
- var spinnerEl = this._find(item, 'spinner');
- spinnerEl.style.display = "inline-block";
- },
- _showCancelLink: function (item) {
- if (!this._options.disableCancelForFormUploads || qq.isXhrUploadSupported()) {
- var cancelLink = this._find(item, 'cancel');
- cancelLink.style.display = 'inline';
- }
- },
- _error: function (code, fileName) {
- var message = qq.FineUploaderBasic.prototype._error.apply(this, arguments);
- this._options.showMessage(message);
- }
-});
-/*globals jQuery, qq*/
-(function ($) {
- "use strict";
- var uploader, $el, init, dataStore, pluginOption, pluginOptions, addCallbacks, transformVariables, isValidCommand,
- delegateCommand;
-
- pluginOptions = ['uploaderType'];
-
- init = function (options) {
- if (options) {
- var xformedOpts = transformVariables(options);
- addCallbacks(xformedOpts);
-
- if (pluginOption('uploaderType') === 'basic') {
- uploader(new qq.FineUploaderBasic(xformedOpts));
- }
- else {
- uploader(new qq.FineUploader(xformedOpts));
- }
- }
-
- return $el;
- };
-
- dataStore = function (key, val) {
- var data = $el.data('fineuploader');
-
- if (val) {
- if (data === undefined) {
- data = {};
- }
- data[key] = val;
- $el.data('fineuploader', data);
- }
- else {
- if (data === undefined) {
- return null;
- }
- return data[key];
- }
- };
-
- //the underlying Fine Uploader instance is stored in jQuery's data stored, associated with the element
- // tied to this instance of the plug-in
- uploader = function (instanceToStore) {
- return dataStore('uploader', instanceToStore);
- };
-
- pluginOption = function (option, optionVal) {
- return dataStore(option, optionVal);
- };
-
- //implement all callbacks defined in Fine Uploader as functions that trigger appropriately names events and
- // return the result of executing the bound handler back to Fine Uploader
- addCallbacks = function (transformedOpts) {
- var callbacks = transformedOpts.callbacks = {};
-
- $.each(new qq.FineUploaderBasic()._options.callbacks, function (prop, func) {
- var name, $callbackEl;
-
- name = /^on(\w+)/.exec(prop)[1];
- name = name.substring(0, 1).toLowerCase() + name.substring(1);
- $callbackEl = $el;
-
- callbacks[prop] = function () {
- var args = Array.prototype.slice.call(arguments);
- return $callbackEl.triggerHandler(name, args);
- };
- });
- };
-
- //transform jQuery objects into HTMLElements, and pass along all other option properties
- transformVariables = function (source, dest) {
- var xformed, arrayVals;
-
- if (dest === undefined) {
- if (source.uploaderType !== 'basic') {
- xformed = { element: $el[0] };
- }
- else {
- xformed = {};
- }
- }
- else {
- xformed = dest;
- }
-
- $.each(source, function (prop, val) {
- if ($.inArray(prop, pluginOptions) >= 0) {
- pluginOption(prop, val);
- }
- else if (val instanceof $) {
- xformed[prop] = val[0];
- }
- else if ($.isPlainObject(val)) {
- xformed[prop] = {};
- transformVariables(val, xformed[prop]);
- }
- else if ($.isArray(val)) {
- arrayVals = [];
- $.each(val, function (idx, arrayVal) {
- if (arrayVal instanceof $) {
- $.merge(arrayVals, arrayVal);
- }
- else {
- arrayVals.push(arrayVal);
- }
- });
- xformed[prop] = arrayVals;
- }
- else {
- xformed[prop] = val;
- }
- });
-
- if (dest === undefined) {
- return xformed;
- }
- };
-
- isValidCommand = function (command) {
- return $.type(command) === "string" && !command.match(/^_/) && //enforce private methods convention
- uploader()[command] !== undefined;
- };
-
- //assuming we have already verified that this is a valid command, call the associated function in the underlying
- // Fine Uploader instance (passing along the arguments from the caller) and return the result of the call back to the caller
- delegateCommand = function (command) {
- var xformedArgs = [], origArgs = Array.prototype.slice.call(arguments, 1);
-
- transformVariables(origArgs, xformedArgs);
-
- return uploader()[command].apply(uploader(), xformedArgs);
- };
-
- $.fn.fineUploader = function (optionsOrCommand) {
- var self = this, selfArgs = arguments, retVals = [];
-
- this.each(function (index, el) {
- $el = $(el);
-
- if (uploader() && isValidCommand(optionsOrCommand)) {
- retVals.push(delegateCommand.apply(self, selfArgs));
-
- if (self.length === 1) {
- return false;
- }
- }
- else if (typeof optionsOrCommand === 'object' || !optionsOrCommand) {
- init.apply(self, selfArgs);
- }
- else {
- $.error('Method ' + optionsOrCommand + ' does not exist on jQuery.fineUploader');
- }
- });
-
- if (retVals.length === 1) {
- return retVals[0];
- }
- else if (retVals.length > 1) {
- return retVals;
- }
-
- return this;
- };
-
-}(jQuery));
\ No newline at end of file
diff --git a/src/common/lib/vendor/2amigos/yiiwheels/widgets/fineuploader/assets/js/jquery.fineuploader-3.2.min.js b/src/common/lib/vendor/2amigos/yiiwheels/widgets/fineuploader/assets/js/jquery.fineuploader-3.2.min.js
deleted file mode 100644
index e578e20..0000000
--- a/src/common/lib/vendor/2amigos/yiiwheels/widgets/fineuploader/assets/js/jquery.fineuploader-3.2.min.js
+++ /dev/null
@@ -1,1994 +0,0 @@
-var qq = function (e) {
- "use strict";
- return{hide: function () {
- e.style.display = "none";
- return this
- }, attach: function (t, n) {
- if (e.addEventListener) {
- e.addEventListener(t, n, false)
- } else if (e.attachEvent) {
- e.attachEvent("on" + t, n)
- }
- return function () {
- qq(e).detach(t, n)
- }
- }, detach: function (t, n) {
- if (e.removeEventListener) {
- e.removeEventListener(t, n, false)
- } else if (e.attachEvent) {
- e.detachEvent("on" + t, n)
- }
- return this
- }, contains: function (t) {
- if (e === t) {
- return true
- }
- if (e.contains) {
- return e.contains(t)
- } else {
- return!!(t.compareDocumentPosition(e) & 8)
- }
- }, insertBefore: function (t) {
- t.parentNode.insertBefore(e, t);
- return this
- }, remove: function () {
- e.parentNode.removeChild(e);
- return this
- }, css: function (t) {
- if (t.opacity !== null) {
- if (typeof e.style.opacity !== "string" && typeof e.filters !== "undefined") {
- t.filter = "alpha(opacity=" + Math.round(100 * t.opacity) + ")"
- }
- }
- qq.extend(e.style, t);
- return this
- }, hasClass: function (t) {
- var n = new RegExp("(^| )" + t + "( |$)");
- return n.test(e.className)
- }, addClass: function (t) {
- if (!qq(e).hasClass(t)) {
- e.className += " " + t
- }
- return this
- }, removeClass: function (t) {
- var n = new RegExp("(^| )" + t + "( |$)");
- e.className = e.className.replace(n, " ").replace(/^\s+|\s+$/g, "");
- return this
- }, getByClass: function (t) {
- var n, r = [];
- if (e.querySelectorAll) {
- return e.querySelectorAll("." + t)
- }
- n = e.getElementsByTagName("*");
- qq.each(n, function (e, n) {
- if (qq(n).hasClass(t)) {
- r.push(n)
- }
- });
- return r
- }, children: function () {
- var t = [], n = e.firstChild;
- while (n) {
- if (n.nodeType === 1) {
- t.push(n)
- }
- n = n.nextSibling
- }
- return t
- }, setText: function (t) {
- e.innerText = t;
- e.textContent = t;
- return this
- }, clearText: function () {
- return qq(e).setText("")
- }}
-};
-qq.log = function (e, t) {
- "use strict";
- if (window.console) {
- if (!t || t === "info") {
- window.console.log(e)
- } else {
- if (window.console[t]) {
- window.console[t](e)
- } else {
- window.console.log("<" + t + "> " + e)
- }
- }
- }
-};
-qq.isObject = function (e) {
- "use strict";
- return e !== null && e && typeof e === "object" && e.constructor === Object
-};
-qq.isFunction = function (e) {
- "use strict";
- return typeof e === "function"
-};
-qq.isFileOrInput = function (e) {
- "use strict";
- if (window.File && e instanceof File) {
- return true
- } else if (window.HTMLInputElement) {
- if (e instanceof HTMLInputElement) {
- if (e.type && e.type.toLowerCase() === "file") {
- return true
- }
- }
- } else if (e.tagName) {
- if (e.tagName.toLowerCase() === "input") {
- if (e.type && e.type.toLowerCase() === "file") {
- return true
- }
- }
- }
- return false
-};
-qq.isXhrUploadSupported = function () {
- "use strict";
- var e = document.createElement("input");
- e.type = "file";
- return e.multiple !== undefined && typeof File !== "undefined" && typeof FormData !== "undefined" && typeof (new XMLHttpRequest).upload !== "undefined"
-};
-qq.isFolderDropSupported = function (e) {
- "use strict";
- return e.items && e.items[0].webkitGetAsEntry
-};
-qq.isFileChunkingSupported = function () {
- "use strict";
- return!qq.android() && qq.isXhrUploadSupported() && (File.prototype.slice || File.prototype.webkitSlice || File.prototype.mozSlice)
-};
-qq.extend = function (e, t, n) {
- "use strict";
- qq.each(t, function (t, r) {
- if (n && qq.isObject(r)) {
- if (e[t] === undefined) {
- e[t] = {}
- }
- qq.extend(e[t], r, true)
- } else {
- e[t] = r
- }
- })
-};
-qq.indexOf = function (e, t, n) {
- "use strict";
- if (e.indexOf) {
- return e.indexOf(t, n)
- }
- n = n || 0;
- var r = e.length;
- if (n < 0) {
- n += r
- }
- for (; n < r; n += 1) {
- if (e.hasOwnProperty(n) && e[n] === t) {
- return n
- }
- }
- return-1
-};
-qq.getUniqueId = function () {
- "use strict";
- return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function (e) {
- var t = Math.random() * 16 | 0, n = e == "x" ? t : t & 3 | 8;
- return n.toString(16)
- })
-};
-qq.ie = function () {
- "use strict";
- return navigator.userAgent.indexOf("MSIE") !== -1
-};
-qq.ie10 = function () {
- "use strict";
- return navigator.userAgent.indexOf("MSIE 10") !== -1
-};
-qq.safari = function () {
- "use strict";
- return navigator.vendor !== undefined && navigator.vendor.indexOf("Apple") !== -1
-};
-qq.chrome = function () {
- "use strict";
- return navigator.vendor !== undefined && navigator.vendor.indexOf("Google") !== -1
-};
-qq.firefox = function () {
- "use strict";
- return navigator.userAgent.indexOf("Mozilla") !== -1 && navigator.vendor !== undefined && navigator.vendor === ""
-};
-qq.windows = function () {
- "use strict";
- return navigator.platform === "Win32"
-};
-qq.android = function () {
- "use strict";
- return navigator.userAgent.toLowerCase().indexOf("android") !== -1
-};
-qq.preventDefault = function (e) {
- "use strict";
- if (e.preventDefault) {
- e.preventDefault()
- } else {
- e.returnValue = false
- }
-};
-qq.toElement = function () {
- "use strict";
- var e = document.createElement("div");
- return function (t) {
- e.innerHTML = t;
- var n = e.firstChild;
- e.removeChild(n);
- return n
- }
-}();
-qq.each = function (e, t) {
- "use strict";
- var n, r;
- if (e) {
- for (n in e) {
- if (Object.prototype.hasOwnProperty.call(e, n)) {
- r = t(n, e[n]);
- if (r === false) {
- break
- }
- }
- }
- }
-};
-qq.obj2url = function (e, t, n) {
- "use strict";
- var r, i, s = [], o = "&", u = function (e, n) {
- var r = t ? /\[\]$/.test(t) ? t : t + "[" + n + "]" : n;
- if (r !== "undefined" && n !== "undefined") {
- s.push(typeof e === "object" ? qq.obj2url(e, r, true) : Object.prototype.toString.call(e) === "[object Function]" ? encodeURIComponent(r) + "=" + encodeURIComponent(e()) : encodeURIComponent(r) + "=" + encodeURIComponent(e))
- }
- };
- if (!n && t) {
- o = /\?/.test(t) ? /\?$/.test(t) ? "" : "&" : "?";
- s.push(t);
- s.push(qq.obj2url(e))
- } else if (Object.prototype.toString.call(e) === "[object Array]" && typeof e !== "undefined") {
- for (r = -1, i = e.length; r < i; r += 1) {
- u(e[r], r)
- }
- } else if (typeof e !== "undefined" && e !== null && typeof e === "object") {
- for (r in e) {
- if (e.hasOwnProperty(r)) {
- u(e[r], r)
- }
- }
- } else {
- s.push(encodeURIComponent(t) + "=" + encodeURIComponent(e))
- }
- if (t) {
- return s.join(o)
- } else {
- return s.join(o).replace(/^&/, "").replace(/%20/g, "+")
- }
-};
-qq.obj2FormData = function (e, t, n) {
- "use strict";
- if (!t) {
- t = new FormData
- }
- qq.each(e, function (e, r) {
- e = n ? n + "[" + e + "]" : e;
- if (qq.isObject(r)) {
- qq.obj2FormData(r, t, e)
- } else if (qq.isFunction(r)) {
- t.append(encodeURIComponent(e), encodeURIComponent(r()))
- } else {
- t.append(encodeURIComponent(e), encodeURIComponent(r))
- }
- });
- return t
-};
-qq.obj2Inputs = function (e, t) {
- "use strict";
- var n;
- if (!t) {
- t = document.createElement("form")
- }
- qq.obj2FormData(e, {append: function (e, r) {
- n = document.createElement("input");
- n.setAttribute("name", e);
- n.setAttribute("value", r);
- t.appendChild(n)
- }});
- return t
-};
-qq.setCookie = function (e, t, n) {
- var r = new Date, i = "";
- if (n) {
- r.setTime(r.getTime() + n * 24 * 60 * 60 * 1e3);
- i = "; expires=" + r.toGMTString()
- }
- document.cookie = e + "=" + t + i + "; path=/"
-};
-qq.getCookie = function (e) {
- var t = e + "=", n = document.cookie.split(";"), r;
- for (var i = 0; i < n.length; i++) {
- r = n[i];
- while (r.charAt(0) == " ") {
- r = r.substring(1, r.length)
- }
- if (r.indexOf(t) === 0) {
- return r.substring(t.length, r.length)
- }
- }
-};
-qq.getCookieNames = function (e) {
- var t = document.cookie.split(";"), n = [];
- qq.each(t, function (t, r) {
- r = r.trim();
- var i = r.indexOf("=");
- if (r.match(e)) {
- n.push(r.substr(0, i))
- }
- });
- return n
-};
-qq.deleteCookie = function (e) {
- qq.setCookie(e, "", -1)
-};
-qq.areCookiesEnabled = function () {
- var e = Math.random() * 1e5, t = "qqCookieTest:" + e;
- qq.setCookie(t, 1);
- if (qq.getCookie(t)) {
- qq.deleteCookie(t);
- return true
- }
- return false
-};
-qq.parseJson = function (json) {
- if (typeof JSON.parse === "function") {
- return JSON.parse(json)
- } else {
- return eval("(" + json + ")")
- }
-};
-qq.DisposeSupport = function () {
- "use strict";
- var e = [];
- return{dispose: function () {
- var t;
- do {
- t = e.shift();
- if (t) {
- t()
- }
- } while (t)
- }, attach: function () {
- var e = arguments;
- this.addDisposer(qq(e[0]).attach.apply(this, Array.prototype.slice.call(arguments, 1)))
- }, addDisposer: function (t) {
- e.push(t)
- }}
-};
-qq.UploadButton = function (e) {
- this._options = {element: null, multiple: false, acceptFiles: null, name: "file", onChange: function (e) {
- }, hoverClass: "qq-upload-button-hover", focusClass: "qq-upload-button-focus"};
- qq.extend(this._options, e);
- this._disposeSupport = new qq.DisposeSupport;
- this._element = this._options.element;
- qq(this._element).css({position: "relative", overflow: "hidden", direction: "ltr"});
- this._input = this._createInput()
-};
-qq.UploadButton.prototype = {getInput: function () {
- return this._input
-}, reset: function () {
- if (this._input.parentNode) {
- qq(this._input).remove()
- }
- qq(this._element).removeClass(this._options.focusClass);
- this._input = this._createInput()
-}, _createInput: function () {
- var e = document.createElement("input");
- if (this._options.multiple) {
- e.setAttribute("multiple", "multiple")
- }
- if (this._options.acceptFiles)e.setAttribute("accept", this._options.acceptFiles);
- e.setAttribute("type", "file");
- e.setAttribute("name", this._options.name);
- qq(e).css({position: "absolute", right: 0, top: 0, fontFamily: "Arial", fontSize: "118px", margin: 0, padding: 0, cursor: "pointer", opacity: 0});
- this._element.appendChild(e);
- var t = this;
- this._disposeSupport.attach(e, "change", function () {
- t._options.onChange(e)
- });
- this._disposeSupport.attach(e, "mouseover", function () {
- qq(t._element).addClass(t._options.hoverClass)
- });
- this._disposeSupport.attach(e, "mouseout", function () {
- qq(t._element).removeClass(t._options.hoverClass)
- });
- this._disposeSupport.attach(e, "focus", function () {
- qq(t._element).addClass(t._options.focusClass)
- });
- this._disposeSupport.attach(e, "blur", function () {
- qq(t._element).removeClass(t._options.focusClass)
- });
- if (window.attachEvent) {
- e.setAttribute("tabIndex", "-1")
- }
- return e
-}};
-qq.UploadHandler = function (e) {
- "use strict";
- var t = [], n, r, i, s;
- n = {debug: false, forceMultipart: true, paramsInBody: false, paramsStore: {}, endpointStore: {}, maxConnections: 3, uuidParamName: "qquuid", totalFileSizeParamName: "qqtotalfilesize", chunking: {enabled: false, partSize: 2e6, paramNames: {partIndex: "qqpartindex", partByteOffset: "qqpartbyteoffset", chunkSize: "qqchunksize", totalParts: "qqtotalparts", filename: "qqfilename"}}, resume: {enabled: false, id: null, cookiesExpireIn: 7, paramNames: {resuming: "qqresume"}}, log: function (e, t) {
- }, onProgress: function (e, t, n, r) {
- }, onComplete: function (e, t, n, r) {
- }, onCancel: function (e, t) {
- }, onUpload: function (e, t) {
- }, onUploadChunk: function (e, t, n) {
- }, onAutoRetry: function (e, t, n, r) {
- }, onResume: function (e, t, n) {
- }};
- qq.extend(n, e);
- r = n.log;
- i = function (e) {
- var r = qq.indexOf(t, e), i = n.maxConnections, o;
- t.splice(r, 1);
- if (t.length >= i && r < i) {
- o = t[i - 1];
- s.upload(o)
- }
- };
- if (qq.isXhrUploadSupported()) {
- s = new qq.UploadHandlerXhr(n, i, r)
- } else {
- s = new qq.UploadHandlerForm(n, i, r)
- }
- return{add: function (e) {
- return s.add(e)
- }, upload: function (e) {
- var r = t.push(e);
- if (r <= n.maxConnections) {
- return s.upload(e)
- }
- }, retry: function (e) {
- var n = qq.indexOf(t, e);
- if (n >= 0) {
- return s.upload(e, true)
- } else {
- return this.upload(e)
- }
- }, cancel: function (e) {
- r("Cancelling " + e);
- n.paramsStore.remove(e);
- s.cancel(e);
- i(e)
- }, cancelAll: function () {
- qq.each(t, function (e, t) {
- this.cancel(t)
- });
- t = []
- }, getName: function (e) {
- return s.getName(e)
- }, getSize: function (e) {
- if (s.getSize) {
- return s.getSize(e)
- }
- }, getFile: function (e) {
- if (s.getFile) {
- return s.getFile(e)
- }
- }, getQueue: function () {
- return t
- }, reset: function () {
- r("Resetting upload handler");
- t = [];
- s.reset()
- }, getUuid: function (e) {
- return s.getUuid(e)
- }, isValid: function (e) {
- return s.isValid(e)
- }, getResumableFilesData: function () {
- if (s.getResumableFilesData) {
- return s.getResumableFilesData()
- }
- return[]
- }}
-};
-qq.UploadHandlerForm = function (o, uploadCompleteCallback, logCallback) {
- "use strict";
- function attachLoadEvent(e, t) {
- detachLoadEvents[e.id] = qq(e).attach("load", function () {
- log("Received response for " + e.id);
- if (!e.parentNode) {
- return
- }
- try {
- if (e.contentDocument && e.contentDocument.body && e.contentDocument.body.innerHTML == "false") {
- return
- }
- } catch (n) {
- log("Error when attempting to access iframe during handling of upload response (" + n + ")", "error")
- }
- t()
- })
- }
-
- function getIframeContentJson(iframe) {
- var response;
- try {
- var doc = iframe.contentDocument || iframe.contentWindow.document, innerHTML = doc.body.innerHTML;
- log("converting iframe's innerHTML to JSON");
- log("innerHTML = " + innerHTML);
- if (innerHTML && innerHTML.match(/^ ');
- t.setAttribute("id", e);
- t.style.display = "none";
- document.body.appendChild(t);
- return t
- }
-
- function createForm(e, t) {
- var n = options.paramsStore.getParams(e), r = options.demoMode ? "GET" : "POST", i = qq.toElement(''), s = options.endpointStore.getEndpoint(e), o = s;
- n[options.uuidParamName] = uuids[e];
- if (!options.paramsInBody) {
- o = qq.obj2url(n, s)
- } else {
- qq.obj2Inputs(n, i)
- }
- i.setAttribute("action", o);
- i.setAttribute("target", t.name);
- i.style.display = "none";
- document.body.appendChild(i);
- return i
- }
-
- var options = o, inputs = [], uuids = [], detachLoadEvents = {}, uploadComplete = uploadCompleteCallback, log = logCallback, api;
- api = {add: function (e) {
- e.setAttribute("name", options.inputName);
- var t = inputs.push(e) - 1;
- uuids[t] = qq.getUniqueId();
- if (e.parentNode) {
- qq(e).remove()
- }
- return t
- }, getName: function (e) {
- return inputs[e].value.replace(/.*(\/|\\)/, "")
- }, isValid: function (e) {
- return inputs[e] !== undefined
- }, reset: function () {
- qq.UploadHandler.prototype.reset.apply(this, arguments);
- inputs = [];
- uuids = [];
- detachLoadEvents = {}
- }, getUuid: function (e) {
- return uuids[e]
- }, cancel: function (e) {
- options.onCancel(e, this.getName(e));
- delete inputs[e];
- delete uuids[e];
- delete detachLoadEvents[e];
- var t = document.getElementById(e);
- if (t) {
- t.setAttribute("src", "java" + String.fromCharCode(115) + "cript:false;");
- qq(t).remove()
- }
- }, upload: function (e) {
- var t = inputs[e], n = api.getName(e), r = createIframe(e), i = createForm(e, r);
- if (!t) {
- throw new Error("file with passed id was not added, or already uploaded or cancelled")
- }
- options.onUpload(e, this.getName(e));
- i.appendChild(t);
- attachLoadEvent(r, function () {
- log("iframe loaded");
- var t = getIframeContentJson(r);
- setTimeout(function () {
- detachLoadEvents[e]();
- delete detachLoadEvents[e];
- qq(r).remove()
- }, 1);
- if (!t.success) {
- if (options.onAutoRetry(e, n, t)) {
- return
- }
- }
- options.onComplete(e, n, t);
- uploadComplete(e)
- });
- log("Sending upload request for " + e);
- i.submit();
- qq(i).remove();
- return e
- }};
- return api
-};
-qq.UploadHandlerXhr = function (e, t, n) {
- "use strict";
- function p(e, t, n) {
- var i = h.getSize(e), s = h.getName(e);
- t[r.chunking.paramNames.partIndex] = n.part;
- t[r.chunking.paramNames.partByteOffset] = n.start;
- t[r.chunking.paramNames.chunkSize] = n.end - n.start;
- t[r.chunking.paramNames.totalParts] = n.count;
- t[r.totalFileSizeParamName] = i;
- if (c) {
- t[r.chunking.paramNames.filename] = s
- }
- }
-
- function d(e) {
- e[r.resume.paramNames.resuming] = true
- }
-
- function v(e, t, n) {
- if (e.slice) {
- return e.slice(t, n)
- } else if (e.mozSlice) {
- return e.mozSlice(t, n)
- } else if (e.webkitSlice) {
- return e.webkitSlice(t, n)
- }
- }
-
- function m(e, t) {
- var n = r.chunking.partSize, i = h.getSize(e), s = o[e].file, u = n * t, a = u + n >= i ? i : u + n, f = g(e);
- return{part: t, start: u, end: a, count: f, blob: v(s, u, a)}
- }
-
- function g(e) {
- var t = h.getSize(e), n = r.chunking.partSize;
- return Math.ceil(t / n)
- }
-
- function y(e) {
- o[e].xhr = new XMLHttpRequest;
- return o[e].xhr
- }
-
- function b(e, t, n, i) {
- var s = new FormData, u = r.demoMode ? "GET" : "POST", a = r.endpointStore.getEndpoint(i), f = a, l = h.getName(i), p = h.getSize(i);
- e[r.uuidParamName] = o[i].uuid;
- if (c) {
- e[r.totalFileSizeParamName] = p
- }
- if (!r.paramsInBody) {
- e[r.inputName] = l;
- f = qq.obj2url(e, a)
- }
- t.open(u, f, true);
- if (c) {
- if (r.paramsInBody) {
- qq.obj2FormData(e, s)
- }
- s.append(r.inputName, n);
- return s
- }
- return n
- }
-
- function w(e, t) {
- var n = r.customHeaders, i = h.getName(e), s = o[e].file;
- t.setRequestHeader("X-Requested-With", "XMLHttpRequest");
- t.setRequestHeader("Cache-Control", "no-cache");
- if (!c) {
- t.setRequestHeader("Content-Type", "application/octet-stream");
- t.setRequestHeader("X-Mime-Type", s.type)
- }
- qq.each(n, function (e, n) {
- t.setRequestHeader(e, n)
- })
- }
-
- function E(e, t, n) {
- var s = h.getName(e), u = h.getSize(e);
- o[e].attemptingResume = false;
- r.onProgress(e, s, u, u);
- r.onComplete(e, s, t, n);
- delete o[e].xhr;
- i(e)
- }
-
- function S(e) {
- var t = m(e, o[e].remainingChunkIdxs[0]), n = y(e), i = h.getSize(e), u = h.getName(e), a, f;
- if (o[e].loaded === undefined) {
- o[e].loaded = 0
- }
- _(e, t);
- n.onreadystatechange = M(e, n);
- n.upload.onprogress = function (t) {
- if (t.lengthComputable) {
- if (o[e].loaded < i) {
- var n = t.loaded + o[e].loaded;
- r.onProgress(e, u, n, i)
- }
- }
- };
- r.onUploadChunk(e, u, O(t));
- f = r.paramsStore.getParams(e);
- p(e, f, t);
- if (o[e].attemptingResume) {
- d(f)
- }
- a = b(f, n, t.blob, e);
- w(e, n);
- s("Sending chunked upload request for " + e + ": bytes " + (t.start + 1) + "-" + t.end + " of " + i);
- n.send(a)
- }
-
- function x(e, t, n) {
- var r = o[e].remainingChunkIdxs.shift(), i = m(e, r);
- o[e].attemptingResume = false;
- o[e].loaded += i.end - i.start;
- if (o[e].remainingChunkIdxs.length > 0) {
- S(e)
- } else {
- D(e);
- E(e, t, n)
- }
- }
-
- function T(e, t) {
- return e.status !== 200 || !t.success || t.reset
- }
-
- function N(e) {
- var t;
- try {
- t = qq.parseJson(e.responseText)
- } catch (n) {
- s("Error when attempting to parse xhr response text (" + n + ")", "error");
- t = {}
- }
- return t
- }
-
- function C(e) {
- s("Server has ordered chunking effort to be restarted on next attempt for file ID " + e, "error");
- if (f) {
- D(e)
- }
- o[e].remainingChunkIdxs = [];
- delete o[e].loaded
- }
-
- function k(e) {
- o[e].attemptingResume = false;
- s("Server has declared that it cannot handle resume for file ID " + e + " - starting from the first chunk", "error");
- h.upload(e, true)
- }
-
- function L(e, t, n) {
- var i = h.getName(e);
- if (r.onAutoRetry(e, i, t, n)) {
- return
- } else {
- E(e, t, n)
- }
- }
-
- function A(e, t) {
- var n;
- if (!o[e]) {
- return
- }
- s("xhr - server response received for " + e);
- s("responseText = " + t.responseText);
- n = N(t);
- if (T(t, n)) {
- if (n.reset) {
- C(e)
- }
- if (o[e].attemptingResume && n.reset) {
- k(e)
- } else {
- L(e, n, t)
- }
- } else if (a) {
- x(e, n, t)
- } else {
- E(e, n, t)
- }
- }
-
- function O(e) {
- return{partIndex: e.part, startByte: e.start + 1, endByte: e.end, totalParts: e.count}
- }
-
- function M(e, t) {
- return function () {
- if (t.readyState === 4) {
- A(e, t)
- }
- }
- }
-
- function _(e, t) {
- var n = h.getUuid(e), i = H(e), s = n + u + t.part, o = r.resume.cookiesExpireIn;
- qq.setCookie(i, s, o)
- }
-
- function D(e) {
- var t = H(e);
- qq.deleteCookie(t)
- }
-
- function P(e) {
- var t = qq.getCookie(H(e)), n, r, i;
- if (t) {
- n = t.indexOf(u);
- r = t.substr(0, n);
- i = parseInt(t.substr(n + 1, t.length - n), 10);
- return{uuid: r, part: i}
- }
- }
-
- function H(e) {
- var t = h.getName(e), n = h.getSize(e), i = r.chunking.partSize, s;
- s = "qqfilechunk" + u + encodeURIComponent(t) + u + n + u + i;
- if (l !== undefined) {
- s += u + l
- }
- return s
- }
-
- function B() {
- if (r.resume.id !== null && r.resume.id !== undefined && !qq.isFunction(r.resume.id) && !qq.isObject(r.resume.id)) {
- return r.resume.id
- }
- }
-
- function j(e, t) {
- var n = h.getName(e), i = 0, u, a, l;
- if (!o[e].remainingChunkIdxs || o[e].remainingChunkIdxs.length === 0) {
- o[e].remainingChunkIdxs = [];
- if (f && !t) {
- u = P(e);
- if (u) {
- a = m(e, u.part);
- if (r.onResume(e, n, O(a)) !== false) {
- i = u.part;
- o[e].uuid = u.uuid;
- o[e].loaded = a.start;
- o[e].attemptingResume = true;
- s("Resuming " + n + " at partition index " + i)
- }
- }
- }
- for (l = g(e) - 1; l >= i; l -= 1) {
- o[e].remainingChunkIdxs.unshift(l)
- }
- }
- S(e)
- }
-
- function F(e) {
- var t = o[e].file, n = h.getName(e), i, u, a;
- o[e].loaded = 0;
- i = y(e);
- i.upload.onprogress = function (t) {
- if (t.lengthComputable) {
- o[e].loaded = t.loaded;
- r.onProgress(e, n, t.loaded, t.total)
- }
- };
- i.onreadystatechange = M(e, i);
- u = r.paramsStore.getParams(e);
- a = b(u, i, t, e);
- w(e, i);
- s("Sending upload request for " + e);
- i.send(a)
- }
-
- var r = e, i = t, s = n, o = [], u = "|", a = r.chunking.enabled && qq.isFileChunkingSupported(), f = r.resume.enabled && a && qq.areCookiesEnabled(), l = B(), c = r.forceMultipart || r.paramsInBody, h;
- h = {add: function (e) {
- if (!(e instanceof File)) {
- throw new Error("Passed obj in not a File (in qq.UploadHandlerXhr)")
- }
- var t = o.push({file: e}) - 1;
- o[t].uuid = qq.getUniqueId();
- return t
- }, getName: function (e) {
- var t = o[e].file;
- return t.fileName !== null && t.fileName !== undefined ? t.fileName : t.name
- }, getSize: function (e) {
- var t = o[e].file;
- return t.fileSize != null ? t.fileSize : t.size
- }, getFile: function (e) {
- if (o[e]) {
- return o[e].file
- }
- }, getLoaded: function (e) {
- return o[e].loaded || 0
- }, isValid: function (e) {
- return o[e] !== undefined
- }, reset: function () {
- o = []
- }, getUuid: function (e) {
- return o[e].uuid
- }, upload: function (e, t) {
- var n = this.getName(e);
- r.onUpload(e, n);
- if (a) {
- j(e, t)
- } else {
- F(e)
- }
- }, cancel: function (e) {
- r.onCancel(e, this.getName(e));
- if (o[e].xhr) {
- o[e].xhr.abort()
- }
- if (f) {
- D(e)
- }
- delete o[e]
- }, getResumableFilesData: function () {
- var e = [], t = [];
- if (a && f) {
- if (l === undefined) {
- e = qq.getCookieNames(new RegExp("^qqfilechunk\\" + u + ".+\\" + u + "\\d+\\" + u + r.chunking.partSize + "="))
- } else {
- e = qq.getCookieNames(new RegExp("^qqfilechunk\\" + u + ".+\\" + u + "\\d+\\" + u + r.chunking.partSize + "\\" + u + l + "="))
- }
- qq.each(e, function (e, n) {
- var r = n.split(u);
- var i = qq.getCookie(n).split(u);
- t.push({name: decodeURIComponent(r[1]), size: r[2], uuid: i[0], partIdx: i[1]})
- });
- return t
- }
- return[]
- }};
- return h
-};
-qq.FineUploaderBasic = function (e) {
- var t = this;
- this._options = {debug: false, button: null, multiple: true, maxConnections: 3, disableCancelForFormUploads: false, autoUpload: true, request: {endpoint: "/server/upload", params: {}, paramsInBody: false, customHeaders: {}, forceMultipart: true, inputName: "qqfile", uuidName: "qquuid", totalFileSizeName: "qqtotalfilesize"}, validation: {allowedExtensions: [], sizeLimit: 0, minSizeLimit: 0, stopOnFirstInvalidFile: true}, callbacks: {onSubmit: function (e, t) {
- }, onComplete: function (e, t, n) {
- }, onCancel: function (e, t) {
- }, onUpload: function (e, t) {
- }, onUploadChunk: function (e, t, n) {
- }, onResume: function (e, t, n) {
- }, onProgress: function (e, t, n, r) {
- }, onError: function (e, t, n) {
- }, onAutoRetry: function (e, t, n) {
- }, onManualRetry: function (e, t) {
- }, onValidateBatch: function (e) {
- }, onValidate: function (e) {
- }}, messages: {typeError: "{file} has an invalid extension. Valid extension(s): {extensions}.", sizeError: "{file} is too large, maximum file size is {sizeLimit}.", minSizeError: "{file} is too small, minimum file size is {minSizeLimit}.", emptyError: "{file} is empty, please select files again without it.", noFilesError: "No files to upload.", onLeave: "The files are being uploaded, if you leave now the upload will be cancelled."}, retry: {enableAuto: false, maxAutoAttempts: 3, autoAttemptDelay: 5, preventRetryResponseProperty: "preventRetry"}, classes: {buttonHover: "qq-upload-button-hover", buttonFocus: "qq-upload-button-focus"}, chunking: {enabled: false, partSize: 2e6, paramNames: {partIndex: "qqpartindex", partByteOffset: "qqpartbyteoffset", chunkSize: "qqchunksize", totalFileSize: "qqtotalfilesize", totalParts: "qqtotalparts", filename: "qqfilename"}}, resume: {enabled: false, id: null, cookiesExpireIn: 7, paramNames: {resuming: "qqresume"}}, formatFileName: function (e) {
- if (e.length > 33) {
- e = e.slice(0, 19) + "..." + e.slice(-14)
- }
- return e
- }, text: {sizeSymbols: ["kB", "MB", "GB", "TB", "PB", "EB"]}};
- qq.extend(this._options, e, true);
- this._wrapCallbacks();
- this._disposeSupport = new qq.DisposeSupport;
- this._filesInProgress = [];
- this._storedFileIds = [];
- this._autoRetries = [];
- this._retryTimeouts = [];
- this._preventRetries = [];
- this._paramsStore = this._createParamsStore();
- this._endpointStore = this._createEndpointStore();
- this._handler = this._createUploadHandler();
- if (this._options.button) {
- this._button = this._createUploadButton(this._options.button)
- }
- this._preventLeaveInProgress()
-};
-qq.FineUploaderBasic.prototype = {log: function (e, t) {
- if (this._options.debug && (!t || t === "info")) {
- qq.log("[FineUploader] " + e)
- } else if (t && t !== "info") {
- qq.log("[FineUploader] " + e, t)
- }
-}, setParams: function (e, t) {
- if (t == null) {
- this._options.request.params = e
- } else {
- this._paramsStore.setParams(e, t)
- }
-}, setEndpoint: function (e, t) {
- if (t == null) {
- this._options.request.endpoint = e
- } else {
- this._endpointStore.setEndpoint(e, t)
- }
-}, getInProgress: function () {
- return this._filesInProgress.length
-}, uploadStoredFiles: function () {
- "use strict";
- var e;
- while (this._storedFileIds.length) {
- e = this._storedFileIds.shift();
- this._filesInProgress.push(e);
- this._handler.upload(e)
- }
-}, clearStoredFiles: function () {
- this._storedFileIds = []
-}, retry: function (e) {
- if (this._onBeforeManualRetry(e)) {
- this._handler.retry(e);
- return true
- } else {
- return false
- }
-}, cancel: function (e) {
- this._handler.cancel(e)
-}, reset: function () {
- this.log("Resetting uploader...");
- this._handler.reset();
- this._filesInProgress = [];
- this._storedFileIds = [];
- this._autoRetries = [];
- this._retryTimeouts = [];
- this._preventRetries = [];
- this._button.reset();
- this._paramsStore.reset();
- this._endpointStore.reset()
-}, addFiles: function (e) {
- var t = this, n = [], r, i;
- if (e) {
- if (!window.FileList || !(e instanceof FileList)) {
- e = [].concat(e)
- }
- for (r = 0; r < e.length; r += 1) {
- i = e[r];
- if (qq.isFileOrInput(i)) {
- n.push(i)
- } else {
- t.log(i + " is not a File or INPUT element! Ignoring!", "warn")
- }
- }
- this.log("Processing " + n.length + " files or inputs...");
- this._uploadFileList(n)
- }
-}, getUuid: function (e) {
- return this._handler.getUuid(e)
-}, getResumableFilesData: function () {
- return this._handler.getResumableFilesData()
-}, getSize: function (e) {
- return this._handler.getSize(e)
-}, getFile: function (e) {
- return this._handler.getFile(e)
-}, _createUploadButton: function (e) {
- var t = this;
- var n = new qq.UploadButton({element: e, multiple: this._options.multiple && qq.isXhrUploadSupported(), acceptFiles: this._options.validation.acceptFiles, onChange: function (e) {
- t._onInputChange(e)
- }, hoverClass: this._options.classes.buttonHover, focusClass: this._options.classes.buttonFocus});
- this._disposeSupport.addDisposer(function () {
- n.dispose()
- });
- return n
-}, _createUploadHandler: function () {
- var e = this;
- return new qq.UploadHandler({debug: this._options.debug, forceMultipart: this._options.request.forceMultipart, maxConnections: this._options.maxConnections, customHeaders: this._options.request.customHeaders, inputName: this._options.request.inputName, uuidParamName: this._options.request.uuidName, totalFileSizeParamName: this._options.request.totalFileSizeName, demoMode: this._options.demoMode, paramsInBody: this._options.request.paramsInBody, paramsStore: this._paramsStore, endpointStore: this._endpointStore, chunking: this._options.chunking, resume: this._options.resume, log: function (t, n) {
- e.log(t, n)
- }, onProgress: function (t, n, r, i) {
- e._onProgress(t, n, r, i);
- e._options.callbacks.onProgress(t, n, r, i)
- }, onComplete: function (t, n, r, i) {
- e._onComplete(t, n, r, i);
- e._options.callbacks.onComplete(t, n, r)
- }, onCancel: function (t, n) {
- e._onCancel(t, n);
- e._options.callbacks.onCancel(t, n)
- }, onUpload: function (t, n) {
- e._onUpload(t, n);
- e._options.callbacks.onUpload(t, n)
- }, onUploadChunk: function (t, n, r) {
- e._options.callbacks.onUploadChunk(t, n, r)
- }, onResume: function (t, n, r) {
- return e._options.callbacks.onResume(t, n, r)
- }, onAutoRetry: function (t, n, r, i) {
- e._preventRetries[t] = r[e._options.retry.preventRetryResponseProperty];
- if (e._shouldAutoRetry(t, n, r)) {
- e._maybeParseAndSendUploadError(t, n, r, i);
- e._options.callbacks.onAutoRetry(t, n, e._autoRetries[t] + 1);
- e._onBeforeAutoRetry(t, n);
- e._retryTimeouts[t] = setTimeout(function () {
- e._onAutoRetry(t, n, r)
- }, e._options.retry.autoAttemptDelay * 1e3);
- return true
- } else {
- return false
- }
- }})
-}, _preventLeaveInProgress: function () {
- var e = this;
- this._disposeSupport.attach(window, "beforeunload", function (t) {
- if (!e._filesInProgress.length) {
- return
- }
- var t = t || window.event;
- t.returnValue = e._options.messages.onLeave;
- return e._options.messages.onLeave
- })
-}, _onSubmit: function (e, t) {
- if (this._options.autoUpload) {
- this._filesInProgress.push(e)
- }
-}, _onProgress: function (e, t, n, r) {
-}, _onComplete: function (e, t, n, r) {
- this._removeFromFilesInProgress(e);
- this._maybeParseAndSendUploadError(e, t, n, r)
-}, _onCancel: function (e, t) {
- this._removeFromFilesInProgress(e);
- clearTimeout(this._retryTimeouts[e]);
- var n = qq.indexOf(this._storedFileIds, e);
- if (!this._options.autoUpload && n >= 0) {
- this._storedFileIds.splice(n, 1)
- }
-}, _removeFromFilesInProgress: function (e) {
- var t = qq.indexOf(this._filesInProgress, e);
- if (t >= 0) {
- this._filesInProgress.splice(t, 1)
- }
-}, _onUpload: function (e, t) {
-}, _onInputChange: function (e) {
- if (qq.isXhrUploadSupported()) {
- this.addFiles(e.files)
- } else {
- this.addFiles(e)
- }
- this._button.reset()
-}, _onBeforeAutoRetry: function (e, t) {
- this.log("Waiting " + this._options.retry.autoAttemptDelay + " seconds before retrying " + t + "...")
-}, _onAutoRetry: function (e, t, n) {
- this.log("Retrying " + t + "...");
- this._autoRetries[e]++;
- this._handler.retry(e)
-}, _shouldAutoRetry: function (e, t, n) {
- if (!this._preventRetries[e] && this._options.retry.enableAuto) {
- if (this._autoRetries[e] === undefined) {
- this._autoRetries[e] = 0
- }
- return this._autoRetries[e] < this._options.retry.maxAutoAttempts
- }
- return false
-}, _onBeforeManualRetry: function (e) {
- if (this._preventRetries[e]) {
- this.log("Retries are forbidden for id " + e, "warn");
- return false
- } else if (this._handler.isValid(e)) {
- var t = this._handler.getName(e);
- if (this._options.callbacks.onManualRetry(e, t) === false) {
- return false
- }
- this.log("Retrying upload for '" + t + "' (id: " + e + ")...");
- this._filesInProgress.push(e);
- return true
- } else {
- this.log("'" + e + "' is not a valid file ID", "error");
- return false
- }
-}, _maybeParseAndSendUploadError: function (e, t, n, r) {
- if (!n.success) {
- if (r && r.status !== 200 && !n.error) {
- this._options.callbacks.onError(e, t, "XHR returned response code " + r.status)
- } else {
- var i = n.error ? n.error : "Upload failure reason unknown";
- this._options.callbacks.onError(e, t, i)
- }
- }
-}, _uploadFileList: function (e) {
- var t, n, r;
- t = this._getValidationDescriptors(e);
- r = this._options.callbacks.onValidateBatch(t) === false;
- if (!r) {
- if (e.length > 0) {
- for (n = 0; n < e.length; n++) {
- if (this._validateFile(e[n])) {
- this._uploadFile(e[n])
- } else {
- if (this._options.validation.stopOnFirstInvalidFile) {
- return
- }
- }
- }
- } else {
- this._error("noFilesError", "")
- }
- }
-}, _uploadFile: function (e) {
- var t = this._handler.add(e);
- var n = this._handler.getName(t);
- if (this._options.callbacks.onSubmit(t, n) !== false) {
- this._onSubmit(t, n);
- if (this._options.autoUpload) {
- this._handler.upload(t)
- } else {
- this._storeFileForLater(t)
- }
- }
-}, _storeFileForLater: function (e) {
- this._storedFileIds.push(e)
-}, _validateFile: function (e) {
- var t, n, r;
- t = this._getValidationDescriptor(e);
- n = t.name;
- r = t.size;
- if (this._options.callbacks.onValidate(t) === false) {
- return false
- }
- if (!this._isAllowedExtension(n)) {
- this._error("typeError", n);
- return false
- } else if (r === 0) {
- this._error("emptyError", n);
- return false
- } else if (r && this._options.validation.sizeLimit && r > this._options.validation.sizeLimit) {
- this._error("sizeError", n);
- return false
- } else if (r && r < this._options.validation.minSizeLimit) {
- this._error("minSizeError", n);
- return false
- }
- return true
-}, _error: function (e, t) {
- function r(e, t) {
- n = n.replace(e, t)
- }
-
- var n = this._options.messages[e];
- var i = this._options.validation.allowedExtensions.join(", ").toLowerCase();
- r("{file}", this._options.formatFileName(t));
- r("{extensions}", i);
- r("{sizeLimit}", this._formatSize(this._options.validation.sizeLimit));
- r("{minSizeLimit}", this._formatSize(this._options.validation.minSizeLimit));
- this._options.callbacks.onError(null, t, n);
- return n
-}, _isAllowedExtension: function (e) {
- var t = this._options.validation.allowedExtensions, n = false;
- if (!t.length) {
- return true
- }
- qq.each(t, function (t, r) {
- var i = new RegExp("\\." + r + "$", "i");
- if (e.match(i) != null) {
- n = true;
- return false
- }
- });
- return n
-}, _formatSize: function (e) {
- var t = -1;
- do {
- e = e / 1024;
- t++
- } while (e > 99);
- return Math.max(e, .1).toFixed(1) + this._options.text.sizeSymbols[t]
-}, _wrapCallbacks: function () {
- var e, t;
- e = this;
- t = function (t, n, r) {
- try {
- return n.apply(e, r)
- } catch (i) {
- e.log("Caught exception in '" + t + "' callback - " + i.message, "error")
- }
- };
- for (var n in this._options.callbacks) {
- (function () {
- var r, i;
- r = n;
- i = e._options.callbacks[r];
- e._options.callbacks[r] = function () {
- return t(r, i, arguments)
- }
- })()
- }
-}, _parseFileName: function (e) {
- var t;
- if (e.value) {
- t = e.value.replace(/.*(\/|\\)/, "")
- } else {
- t = e.fileName !== null && e.fileName !== undefined ? e.fileName : e.name
- }
- return t
-}, _parseFileSize: function (e) {
- var t;
- if (!e.value) {
- t = e.fileSize !== null && e.fileSize !== undefined ? e.fileSize : e.size
- }
- return t
-}, _getValidationDescriptor: function (e) {
- var t, n, r;
- r = {};
- t = this._parseFileName(e);
- n = this._parseFileSize(e);
- r.name = t;
- if (n) {
- r.size = n
- }
- return r
-}, _getValidationDescriptors: function (e) {
- var t = this, n = [];
- qq.each(e, function (e, r) {
- n.push(t._getValidationDescriptor(r))
- });
- return n
-}, _createParamsStore: function () {
- var e = {}, t = this;
- return{setParams: function (t, n) {
- var r = {};
- qq.extend(r, t);
- e[n] = r
- }, getParams: function (n) {
- var r = {};
- if (n != null && e[n]) {
- qq.extend(r, e[n])
- } else {
- qq.extend(r, t._options.request.params)
- }
- return r
- }, remove: function (t) {
- return delete e[t]
- }, reset: function () {
- e = {}
- }}
-}, _createEndpointStore: function () {
- var e = {}, t = this;
- return{setEndpoint: function (t, n) {
- e[n] = t
- }, getEndpoint: function (n) {
- if (n != null && e[n]) {
- return e[n]
- }
- return t._options.request.endpoint
- }, remove: function (t) {
- return delete e[t]
- }, reset: function () {
- e = {}
- }}
-}};
-qq.DragAndDrop = function (e) {
- "use strict";
- function a() {
- if (s === o && !r) {
- t.callbacks.log("Grabbed " + i.length + " files after tree traversal.");
- n.dropDisabled(false);
- t.callbacks.dropProcessing(false, i)
- }
- }
-
- function f(e) {
- i.push(e);
- o += 1;
- a()
- }
-
- function l(e) {
- var t, n;
- s += 1;
- if (e.isFile) {
- e.file(function (e) {
- f(e)
- })
- } else if (e.isDirectory) {
- r = true;
- t = e.createReader();
- t.readEntries(function (e) {
- o += 1;
- for (n = 0; n < e.length; n += 1) {
- l(e[n])
- }
- r = false;
- if (!e.length) {
- a()
- }
- })
- }
- }
-
- function c(e) {
- var r, u, f;
- t.callbacks.dropProcessing(true);
- n.dropDisabled(true);
- if (e.files.length > 1 && !t.multiple) {
- t.callbacks.dropProcessing(false);
- t.callbacks.error("tooManyFilesError", "");
- n.dropDisabled(false)
- } else {
- i = [];
- s = 0;
- o = 0;
- if (qq.isFolderDropSupported(e)) {
- u = e.items;
- for (r = 0; r < u.length; r += 1) {
- f = u[r].webkitGetAsEntry();
- if (f) {
- if (f.isFile) {
- i.push(u[r].getAsFile());
- if (r === u.length - 1) {
- a()
- }
- } else {
- l(f)
- }
- }
- }
- } else {
- t.callbacks.dropProcessing(false, e.files);
- n.dropDisabled(false)
- }
- }
- }
-
- function h(e) {
- n = new qq.UploadDropZone({element: e, onEnter: function (n) {
- qq(e).addClass(t.classes.dropActive);
- n.stopPropagation()
- }, onLeaveNotDescendants: function (n) {
- qq(e).removeClass(t.classes.dropActive)
- }, onDrop: function (n) {
- if (t.hideDropzones) {
- qq(e).hide()
- }
- qq(e).removeClass(t.classes.dropActive);
- c(n.dataTransfer)
- }});
- u.addDisposer(function () {
- n.dispose()
- });
- if (t.hideDropzones) {
- qq(e).hide()
- }
- }
-
- function p(e) {
- var t;
- qq.each(e.dataTransfer.types, function (e, n) {
- if (n === "Files") {
- t = true;
- return false
- }
- });
- return t
- }
-
- function d() {
- if (t.dropArea) {
- t.extraDropzones.push(t.dropArea)
- }
- var e, r = t.extraDropzones;
- for (e = 0; e < r.length; e += 1) {
- h(r[e])
- }
- if (t.dropArea && (!qq.ie() || qq.ie10())) {
- u.attach(document, "dragenter", function (i) {
- if (!n.dropDisabled() && p(i)) {
- if (qq(t.dropArea).hasClass(t.classes.dropDisabled)) {
- return
- }
- t.dropArea.style.display = "block";
- for (e = 0; e < r.length; e += 1) {
- r[e].style.display = "block"
- }
- }
- })
- }
- u.attach(document, "dragleave", function (n) {
- if (t.hideDropzones && qq.FineUploader.prototype._leaving_document_out(n)) {
- for (e = 0; e < r.length; e += 1) {
- qq(r[e]).hide()
- }
- }
- });
- u.attach(document, "drop", function (n) {
- if (t.hideDropzones) {
- for (e = 0; e < r.length; e += 1) {
- qq(r[e]).hide()
- }
- }
- n.preventDefault()
- })
- }
-
- var t, n, r, i = [], s = 0, o = 0, u = new qq.DisposeSupport;
- t = {dropArea: null, extraDropzones: [], hideDropzones: true, multiple: true, classes: {dropActive: null}, callbacks: {dropProcessing: function (e, t) {
- }, error: function (e, t) {
- }, log: function (e, t) {
- }}};
- qq.extend(t, e);
- return{setup: function () {
- d()
- }, setupExtraDropzone: function (e) {
- t.extraDropzones.push(e);
- h(e)
- }, removeExtraDropzone: function (e) {
- var n, r = t.extraDropzones;
- for (n in r) {
- if (r[n] === e) {
- return r.splice(n, 1)
- }
- }
- }, dispose: function () {
- u.dispose();
- n.dispose()
- }}
-};
-qq.UploadDropZone = function (e) {
- "use strict";
- function o() {
- return qq.safari() || qq.firefox() && qq.windows()
- }
-
- function u(e) {
- if (!i) {
- if (o) {
- s.attach(document, "dragover", function (e) {
- e.preventDefault()
- })
- } else {
- s.attach(document, "dragover", function (e) {
- if (e.dataTransfer) {
- e.dataTransfer.dropEffect = "none";
- e.preventDefault()
- }
- })
- }
- i = true
- }
- }
-
- function a(e) {
- if (qq.ie() && !qq.ie10()) {
- return false
- }
- var t, n = e.dataTransfer, r = qq.safari();
- t = qq.ie10() ? true : n.effectAllowed !== "none";
- return n && t && (n.files || !r && n.types.contains && n.types.contains("Files"))
- }
-
- function f(e) {
- if (e !== undefined) {
- r = e
- }
- return r
- }
-
- function l() {
- s.attach(n, "dragover", function (e) {
- if (!a(e)) {
- return
- }
- var t = qq.ie() ? null : e.dataTransfer.effectAllowed;
- if (t === "move" || t === "linkMove") {
- e.dataTransfer.dropEffect = "move"
- } else {
- e.dataTransfer.dropEffect = "copy"
- }
- e.stopPropagation();
- e.preventDefault()
- });
- s.attach(n, "dragenter", function (e) {
- if (!f()) {
- if (!a(e)) {
- return
- }
- t.onEnter(e)
- }
- });
- s.attach(n, "dragleave", function (e) {
- if (!a(e)) {
- return
- }
- t.onLeave(e);
- var n = document.elementFromPoint(e.clientX, e.clientY);
- if (qq(this).contains(n)) {
- return
- }
- t.onLeaveNotDescendants(e)
- });
- s.attach(n, "drop", function (e) {
- if (!f()) {
- if (!a(e)) {
- return
- }
- e.preventDefault();
- t.onDrop(e)
- }
- })
- }
-
- var t, n, r, i, s = new qq.DisposeSupport;
- t = {element: null, onEnter: function (e) {
- }, onLeave: function (e) {
- }, onLeaveNotDescendants: function (e) {
- }, onDrop: function (e) {
- }};
- qq.extend(t, e);
- n = t.element;
- u();
- l();
- return{dropDisabled: function (e) {
- return f(e)
- }, dispose: function () {
- s.dispose()
- }}
-};
-qq.FineUploader = function (e) {
- qq.FineUploaderBasic.apply(this, arguments);
- qq.extend(this._options, {element: null, listElement: null, dragAndDrop: {extraDropzones: [], hideDropzones: true, disableDefaultDropzone: false}, text: {uploadButton: "Upload a file", cancelButton: "Cancel", retryButton: "Retry", failUpload: "Upload failed", dragZone: "Drop files here to upload", dropProcessing: "Processing dropped files...", formatProgress: "{percent}% of {total_size}", waitingForResponse: "Processing..."}, template: '' + (!this._options.dragAndDrop || !this._options.dragAndDrop.disableDefaultDropzone ? '
{dragZoneText}
' : "") + (!this._options.button ? '
' : "") + '
{dropProcessingText} ' + (!this._options.listElement ? '
' : "") + "
", fileTemplate: "" + '
' + ' ' + ' ' + ' ' + ' ' + '{cancelButtonText} ' + '{retryButtonText} ' + '{statusText} ' + " ", classes: {button: "qq-upload-button", drop: "qq-upload-drop-area", dropActive: "qq-upload-drop-area-active", dropDisabled: "qq-upload-drop-area-disabled", list: "qq-upload-list", progressBar: "qq-progress-bar", file: "qq-upload-file", spinner: "qq-upload-spinner", finished: "qq-upload-finished", retrying: "qq-upload-retrying", retryable: "qq-upload-retryable", size: "qq-upload-size", cancel: "qq-upload-cancel", retry: "qq-upload-retry", statusText: "qq-upload-status-text", success: "qq-upload-success", fail: "qq-upload-fail", successIcon: null, failIcon: null, dropProcessing: "qq-drop-processing", dropProcessingSpinner: "qq-drop-processing-spinner"}, failedUploadTextDisplay: {mode: "default", maxChars: 50, responseProperty: "error", enableTooltip: true}, messages: {tooManyFilesError: "You may only drop one file"}, retry: {showAutoRetryNote: true, autoRetryNote: "Retrying {retryNum}/{maxAuto}...", showButton: false}, showMessage: function (e) {
- setTimeout(function () {
- alert(e)
- }, 0)
- }}, true);
- qq.extend(this._options, e, true);
- this._wrapCallbacks();
- this._options.template = this._options.template.replace(/\{dragZoneText\}/g, this._options.text.dragZone);
- this._options.template = this._options.template.replace(/\{uploadButtonText\}/g, this._options.text.uploadButton);
- this._options.template = this._options.template.replace(/\{dropProcessingText\}/g, this._options.text.dropProcessing);
- this._options.fileTemplate = this._options.fileTemplate.replace(/\{cancelButtonText\}/g, this._options.text.cancelButton);
- this._options.fileTemplate = this._options.fileTemplate.replace(/\{retryButtonText\}/g, this._options.text.retryButton);
- this._options.fileTemplate = this._options.fileTemplate.replace(/\{statusText\}/g, "");
- this._element = this._options.element;
- this._element.innerHTML = this._options.template;
- this._listElement = this._options.listElement || this._find(this._element, "list");
- this._classes = this._options.classes;
- if (!this._button) {
- this._button = this._createUploadButton(this._find(this._element, "button"))
- }
- this._bindCancelAndRetryEvents();
- this._dnd = this._setupDragAndDrop()
-};
-qq.extend(qq.FineUploader.prototype, qq.FineUploaderBasic.prototype);
-qq.extend(qq.FineUploader.prototype, {clearStoredFiles: function () {
- qq.FineUploaderBasic.prototype.clearStoredFiles.apply(this, arguments);
- this._listElement.innerHTML = ""
-}, addExtraDropzone: function (e) {
- this._dnd.setupExtraDropzone(e)
-}, removeExtraDropzone: function (e) {
- return this._dnd.removeExtraDropzone(e)
-}, getItemByFileId: function (e) {
- var t = this._listElement.firstChild;
- while (t) {
- if (t.qqFileId == e)return t;
- t = t.nextSibling
- }
-}, cancel: function (e) {
- qq.FineUploaderBasic.prototype.cancel.apply(this, arguments);
- var t = this.getItemByFileId(e);
- qq(t).remove()
-}, reset: function () {
- qq.FineUploaderBasic.prototype.reset.apply(this, arguments);
- this._element.innerHTML = this._options.template;
- this._listElement = this._options.listElement || this._find(this._element, "list");
- if (!this._options.button) {
- this._button = this._createUploadButton(this._find(this._element, "button"))
- }
- this._bindCancelAndRetryEvents();
- this._dnd.dispose();
- this._dnd = this._setupDragAndDrop()
-}, _setupDragAndDrop: function () {
- var e = this, t = this._find(this._element, "dropProcessing"), n, r, i;
- r = function (e) {
- e.preventDefault()
- };
- if (!this._options.dragAndDrop.disableDefaultDropzone) {
- i = this._find(this._options.element, "drop")
- }
- n = new qq.DragAndDrop({dropArea: i, extraDropzones: this._options.dragAndDrop.extraDropzones, hideDropzones: this._options.dragAndDrop.hideDropzones, multiple: this._options.multiple, classes: {dropActive: this._options.classes.dropActive}, callbacks: {dropProcessing: function (n, i) {
- var s = e._button.getInput();
- if (n) {
- qq(t).css({display: "block"});
- qq(s).attach("click", r)
- } else {
- qq(t).hide();
- qq(s).detach("click", r)
- }
- if (i) {
- e.addFiles(i)
- }
- }, error: function (t, n) {
- e._error(t, n)
- }, log: function (t, n) {
- e.log(t, n)
- }}});
- n.setup();
- return n
-}, _leaving_document_out: function (e) {
- return(qq.chrome() || qq.safari() && qq.windows()) && e.clientX == 0 && e.clientY == 0 || qq.firefox() && !e.relatedTarget
-}, _storeFileForLater: function (e) {
- qq.FineUploaderBasic.prototype._storeFileForLater.apply(this, arguments);
- var t = this.getItemByFileId(e);
- qq(this._find(t, "spinner")).hide()
-}, _find: function (e, t) {
- var n = qq(e).getByClass(this._options.classes[t])[0];
- if (!n) {
- throw new Error("element not found " + t)
- }
- return n
-}, _onSubmit: function (e, t) {
- qq.FineUploaderBasic.prototype._onSubmit.apply(this, arguments);
- this._addToList(e, t)
-}, _onProgress: function (e, t, n, r) {
- qq.FineUploaderBasic.prototype._onProgress.apply(this, arguments);
- var i, s, o, u, a, f;
- i = this.getItemByFileId(e);
- s = this._find(i, "progressBar");
- u = Math.round(n / r * 100);
- if (n === r) {
- a = this._find(i, "cancel");
- qq(a).hide();
- qq(s).hide();
- qq(this._find(i, "statusText")).setText(this._options.text.waitingForResponse);
- o = this._formatSize(r)
- } else {
- o = this._formatProgress(n, r);
- qq(s).css({display: "block"})
- }
- qq(s).css({width: u + "%"});
- f = this._find(i, "size");
- qq(f).css({display: "inline"});
- qq(f).setText(o)
-}, _onComplete: function (e, t, n, r) {
- qq.FineUploaderBasic.prototype._onComplete.apply(this, arguments);
- var i = this.getItemByFileId(e);
- qq(this._find(i, "statusText")).clearText();
- qq(i).removeClass(this._classes.retrying);
- qq(this._find(i, "progressBar")).hide();
- if (!this._options.disableCancelForFormUploads || qq.isXhrUploadSupported()) {
- qq(this._find(i, "cancel")).hide()
- }
- qq(this._find(i, "spinner")).hide();
- if (n.success) {
- qq(i).addClass(this._classes.success);
- if (this._classes.successIcon) {
- this._find(i, "finished").style.display = "inline-block";
- qq(i).addClass(this._classes.successIcon)
- }
- } else {
- qq(i).addClass(this._classes.fail);
- if (this._classes.failIcon) {
- this._find(i, "finished").style.display = "inline-block";
- qq(i).addClass(this._classes.failIcon)
- }
- if (this._options.retry.showButton && !this._preventRetries[e]) {
- qq(i).addClass(this._classes.retryable)
- }
- this._controlFailureTextDisplay(i, n)
- }
-}, _onUpload: function (e, t) {
- qq.FineUploaderBasic.prototype._onUpload.apply(this, arguments);
- var n = this.getItemByFileId(e);
- this._showSpinner(n)
-}, _onBeforeAutoRetry: function (e) {
- var t, n, r, i, s, o, u;
- qq.FineUploaderBasic.prototype._onBeforeAutoRetry.apply(this, arguments);
- t = this.getItemByFileId(e);
- n = this._find(t, "progressBar");
- this._showCancelLink(t);
- n.style.width = 0;
- qq(n).hide();
- if (this._options.retry.showAutoRetryNote) {
- i = this._find(t, "statusText");
- s = this._autoRetries[e] + 1;
- o = this._options.retry.maxAutoAttempts;
- u = this._options.retry.autoRetryNote.replace(/\{retryNum\}/g, s);
- u = u.replace(/\{maxAuto\}/g, o);
- qq(i).setText(u);
- if (s === 1) {
- qq(t).addClass(this._classes.retrying)
- }
- }
-}, _onBeforeManualRetry: function (e) {
- if (qq.FineUploaderBasic.prototype._onBeforeManualRetry.apply(this, arguments)) {
- var t = this.getItemByFileId(e);
- this._find(t, "progressBar").style.width = 0;
- qq(t).removeClass(this._classes.fail);
- qq(this._find(t, "statusText")).clearText();
- this._showSpinner(t);
- this._showCancelLink(t);
- return true
- }
- return false
-}, _addToList: function (e, t) {
- var n = qq.toElement(this._options.fileTemplate);
- if (this._options.disableCancelForFormUploads && !qq.isXhrUploadSupported()) {
- var r = this._find(n, "cancel");
- qq(r).remove()
- }
- n.qqFileId = e;
- var i = this._find(n, "file");
- qq(i).setText(this._options.formatFileName(t));
- qq(this._find(n, "size")).hide();
- if (!this._options.multiple)this._clearList();
- this._listElement.appendChild(n)
-}, _clearList: function () {
- this._listElement.innerHTML = "";
- this.clearStoredFiles()
-}, _bindCancelAndRetryEvents: function () {
- var e = this, t = this._listElement;
- this._disposeSupport.attach(t, "click", function (t) {
- t = t || window.event;
- var n = t.target || t.srcElement;
- if (qq(n).hasClass(e._classes.cancel) || qq(n).hasClass(e._classes.retry)) {
- qq.preventDefault(t);
- var r = n.parentNode;
- while (r.qqFileId == undefined) {
- r = n = n.parentNode
- }
- if (qq(n).hasClass(e._classes.cancel)) {
- e.cancel(r.qqFileId)
- } else {
- qq(r).removeClass(e._classes.retryable);
- e.retry(r.qqFileId)
- }
- }
- })
-}, _formatProgress: function (e, t) {
- function r(e, t) {
- n = n.replace(e, t)
- }
-
- var n = this._options.text.formatProgress;
- r("{percent}", Math.round(e / t * 100));
- r("{total_size}", this._formatSize(t));
- return n
-}, _controlFailureTextDisplay: function (e, t) {
- var n, r, i, s, o;
- n = this._options.failedUploadTextDisplay.mode;
- r = this._options.failedUploadTextDisplay.maxChars;
- i = this._options.failedUploadTextDisplay.responseProperty;
- if (n === "custom") {
- s = t[i];
- if (s) {
- if (s.length > r) {
- o = s.substring(0, r) + "..."
- }
- } else {
- s = this._options.text.failUpload;
- this.log("'" + i + "' is not a valid property on the server response.", "warn")
- }
- qq(this._find(e, "statusText")).setText(o || s);
- if (this._options.failedUploadTextDisplay.enableTooltip) {
- this._showTooltip(e, s)
- }
- } else if (n === "default") {
- qq(this._find(e, "statusText")).setText(this._options.text.failUpload)
- } else if (n !== "none") {
- this.log("failedUploadTextDisplay.mode value of '" + n + "' is not valid", "warn")
- }
-}, _showTooltip: function (e, t) {
- e.title = t
-}, _showSpinner: function (e) {
- var t = this._find(e, "spinner");
- t.style.display = "inline-block"
-}, _showCancelLink: function (e) {
- if (!this._options.disableCancelForFormUploads || qq.isXhrUploadSupported()) {
- var t = this._find(e, "cancel");
- t.style.display = "inline"
- }
-}, _error: function (e, t) {
- var n = qq.FineUploaderBasic.prototype._error.apply(this, arguments);
- this._options.showMessage(n)
-}});
-(function (e) {
- "use strict";
- var t, n, r, i, s, o, u, a, f, l;
- o = ["uploaderType"];
- r = function (e) {
- if (e) {
- var r = a(e);
- u(r);
- if (s("uploaderType") === "basic") {
- t(new qq.FineUploaderBasic(r))
- } else {
- t(new qq.FineUploader(r))
- }
- }
- return n
- };
- i = function (e, t) {
- var r = n.data("fineuploader");
- if (t) {
- if (r === undefined) {
- r = {}
- }
- r[e] = t;
- n.data("fineuploader", r)
- } else {
- if (r === undefined) {
- return null
- }
- return r[e]
- }
- };
- t = function (e) {
- return i("uploader", e)
- };
- s = function (e, t) {
- return i(e, t)
- };
- u = function (t) {
- var r = t.callbacks = {};
- e.each((new qq.FineUploaderBasic)._options.callbacks, function (e, t) {
- var i, s;
- i = /^on(\w+)/.exec(e)[1];
- i = i.substring(0, 1).toLowerCase() + i.substring(1);
- s = n;
- r[e] = function () {
- var e = Array.prototype.slice.call(arguments);
- return s.triggerHandler(i, e)
- }
- })
- };
- a = function (t, r) {
- var i, u;
- if (r === undefined) {
- if (t.uploaderType !== "basic") {
- i = {element: n[0]}
- } else {
- i = {}
- }
- } else {
- i = r
- }
- e.each(t, function (t, n) {
- if (e.inArray(t, o) >= 0) {
- s(t, n)
- } else if (n instanceof e) {
- i[t] = n[0]
- } else if (e.isPlainObject(n)) {
- i[t] = {};
- a(n, i[t])
- } else if (e.isArray(n)) {
- u = [];
- e.each(n, function (t, n) {
- if (n instanceof e) {
- e.merge(u, n)
- } else {
- u.push(n)
- }
- });
- i[t] = u
- } else {
- i[t] = n
- }
- });
- if (r === undefined) {
- return i
- }
- };
- f = function (n) {
- return e.type(n) === "string" && !n.match(/^_/) && t()[n] !== undefined
- };
- l = function (e) {
- var n = [], r = Array.prototype.slice.call(arguments, 1);
- a(r, n);
- return t()[e].apply(t(), n)
- };
- e.fn.fineUploader = function (i) {
- var s = this, o = arguments, u = [];
- this.each(function (a, c) {
- n = e(c);
- if (t() && f(i)) {
- u.push(l.apply(s, o));
- if (s.length === 1) {
- return false
- }
- } else if (typeof i === "object" || !i) {
- r.apply(s, o)
- } else {
- e.error("Method " + i + " does not exist on jQuery.fineUploader")
- }
- });
- if (u.length === 1) {
- return u[0]
- } else if (u.length > 1) {
- return u
- }
- return this
- }
-})(jQuery)
\ No newline at end of file
diff --git a/src/common/lib/vendor/2amigos/yiiwheels/widgets/form/WhActiveForm.php b/src/common/lib/vendor/2amigos/yiiwheels/widgets/form/WhActiveForm.php
deleted file mode 100644
index 85efec7..0000000
--- a/src/common/lib/vendor/2amigos/yiiwheels/widgets/form/WhActiveForm.php
+++ /dev/null
@@ -1,167 +0,0 @@
-
- * @copyright Copyright © 2amigos.us 2013-
- * @license http://www.opensource.org/licenses/bsd-license.php New BSD License
- * @package YiiWheels.widgets
- * @uses YiiStrap.widgets.form
- * @uses YiiWheels.helpers.WhHtml
- */
-
-Yii::import('bootstrap.widgets.TbActiveForm');
-Yii::import('yiiwheels.helpers.WhHtml');
-
-class WhActiveForm extends TbActiveForm
-{
- /**
- * Renders a datepicker field
- * @param $model
- * @param $attribute
- * @param array $htmlOptions
- * @return string
- */
- public function datePickerRow($model, $attribute, $htmlOptions = array())
- {
- return $this->row(WhHtml::INPUT_DATEPICKER, $model, $attribute, array(), $htmlOptions);
- }
-
- /**
- * Renders a timepicker field
- * @param $model
- * @param $attribute
- * @param array $htmlOptions
- * @return string
- */
- public function timePickerRow($model, $attribute, $htmlOptions = array())
- {
- return $this->row(WhHtml::INPUT_TIMEPICKER, $model, $attribute, array(), $htmlOptions);
- }
-
- /**
- * Renders a typeahead field
- * @param $model
- * @param $attribute
- * @param array $htmlOptions
- * @return string
- */
- public function typeAheadRow($model, $attribute, $htmlOptions = array())
- {
- return $this->row(WhHtml::INPUT_TYPEAHEAD, $model, $attribute, array(), $htmlOptions);
- }
-
- /**
- * Renders a typeahead field
- * @param $model
- * @param $attribute
- * @param array $htmlOptions
- * @return string
- */
- public function select2Row($model, $attribute, $htmlOptions = array())
- {
- return $this->row(WhHtml::INPUT_SELECT2, $model, $attribute, array(), $htmlOptions);
- }
-
- /**
- * Renders a multiselect field
- * @param $model
- * @param $attribute
- * @param array $htmlOptions
- * @return string
- */
- public function multiSelectRow($model, $attribute, $htmlOptions = array())
- {
- return $this->row(WhHtml::INPUT_MULTISELECT, $model, $attribute, array(), $htmlOptions);
- }
-
- /**
- * Renders a maskmoney field
- * @param $model
- * @param $attribute
- * @param array $htmlOptions
- * @return string
- */
- public function maskMoneyRow($model, $attribute, $htmlOptions = array())
- {
- return $this->row(WhHtml::INPUT_MASKMONEY, $model, $attribute, array(), $htmlOptions);
- }
-
- /**
- * Renders a redactor wyiwyg field
- * @param $model
- * @param $attribute
- * @param array $htmlOptions
- * @return string
- */
- public function redactorJsRow($model, $attribute, $htmlOptions = array())
- {
- return $this->row(WhHtml::INPUT_REDACTOR, $model, $attribute, array(), $htmlOptions);
- }
-
- /**
- * Helper method to display different input types for the different complain bootstrap forms wrapped with their
- * labels, help and error messages. This method is a replacement of the old 'typeRow' methods from Yii-Bootstrap
- * extension. Example:
- *
- * $form->row(WhHtml::INPUT_TEXT, $model, 'attribute', array('style'=>'width:125px'));
- * $form->row(WhHtml::INPUT_DROPDOWN, $model, 'attribute', array('a'=>'A','b'=>'B'), array());
- *
- * @param $type
- * @param $model
- * @param $attribute
- * @param $data
- * @param array $htmlOptions
- * @return string
- * @throws CException
- */
- public function row($type, $model, $attribute, $data = array(), $htmlOptions = array())
- {
- if (!in_array($type, WhHtml::validInputs()))
- throw new CException(Yii::t('tb', 'Unrecognized input type'));
-
- $labelOptions = WhHtml::popOption('labelOptions', $htmlOptions, array());
- $errorOptions = WhHtml::popOption('errorOptions', $htmlOptions, array());
- $containerOptions = WhHtml::popOption('containerOptions', $htmlOptions, array());
-
- $labelOptions = WhHtml::defaultOption('formType', $this->type, $labelOptions);
-
- ob_start();
-
- // make sure it holds the class control-label
- if ($this->type === WhHtml::FORM_HORIZONTAL)
- echo CHtml::openTag('div', WhHtml::addClassName('control-group', $containerOptions));
-
- // form's inline do not render labels and radio|checkbox input types render label's differently
- if ($this->type !== WhHtml::FORM_INLINE
- && !preg_match('/radio|checkbox/i', $type)
- && WhHtml::popOption('label', $htmlOptions, true)
- )
- echo CHtml::activeLabel($model, $attribute, $labelOptions);
- elseif (preg_match('/radio|checkbox/i', $type))
- $htmlOptions['labelOptions'] = $labelOptions;
-
- if (WhHtml::popOption('block', $htmlOptions, false))
- $htmlOptions = WhHtml::addClassName('input-block-level', $htmlOptions);
-
- $params = in_array($type, WhHtml::$dataInputs)
- ? array($model, $attribute, $data, $htmlOptions)
- : array($model, $attribute, $htmlOptions);
-
- $errorSpan = $this->error($model, $attribute, $errorOptions);
-
- echo $this->wrapControl(call_user_func_array('WhHtml::active' . ucfirst($type), $params), $errorSpan); /* since PHP 5.3 */
-
- if ($this->type == WhHtml::FORM_VERTICAL && WhHtml::popOption('error', $htmlOptions, true))
- echo $errorSpan;
-
- if ($this->type == WhHtml::FORM_HORIZONTAL)
- echo ' ';
-
- return ob_get_clean();
-
- }
-}
\ No newline at end of file
diff --git a/src/common/lib/vendor/2amigos/yiiwheels/widgets/google/WhVisualizationChart.php b/src/common/lib/vendor/2amigos/yiiwheels/widgets/google/WhVisualizationChart.php
deleted file mode 100644
index 066bcaf..0000000
--- a/src/common/lib/vendor/2amigos/yiiwheels/widgets/google/WhVisualizationChart.php
+++ /dev/null
@@ -1,90 +0,0 @@
-
- * @copyright Copyright © 2amigos.us 2013-
- * @license http://www.opensource.org/licenses/bsd-license.php New BSD License
- * @package YiiWheels.widgets.google
- * @uses YiiWheels.helpers.WhHtml
- */
-Yii::import('yiiwheels.helpers.WhHtml');
-
-class WhVisualizationChart extends CWidget
-{
- /**
- * @var string $containerId the container Id to render the visualization to
- */
- public $containerId;
-
- /**
- * @var string $visualization the type of visualization -ie PieChart
- * @see https://google-developers.appspot.com/chart/interactive/docs/gallery
- */
- public $visualization;
-
- /**
- * @var array $data the data to configure visualization
- * @see https://google-developers.appspot.com/chart/interactive/docs/datatables_dataviews#arraytodatatable
- */
- public $data = array();
-
- /**
- * @var array $options additional configuration options
- * @see https://google-developers.appspot.com/chart/interactive/docs/customizing_charts
- */
- public $options = array();
-
- /**
- * @var array $htmlOption the HTML tag attributes configuration
- */
- public $htmlOptions = array();
-
- /**
- * Widget's run method
- */
- public function run()
- {
- $id = $this->getId();
- $this->htmlOptions['id'] = $id;
- // if no container is set, it will create one
- if ($this->containerId == null) {
- $this->containerId = 'div-chart' . $id;
- echo 'htmlOptions) . '>
';
- }
- $this->registerClientScript();
- }
-
- /**
- * Registers required scripts
- */
- public function registerClientScript()
- {
- $id = $this->getId();
- $jsData = CJavaScript::jsonEncode($this->data);
- $jsOptions = CJavaScript::jsonEncode($this->options);
-
- $script = '
- google.setOnLoadCallback(drawChart' . $id . ');
- var ' . $id . '=null;
- function drawChart' . $id . '() {
- var data = google.visualization.arrayToDataTable(' . $jsData . ');
-
- var options = ' . $jsOptions . ';
-
- ' . $id . ' = new google.visualization.' . $this->visualization . '(document.getElementById("' . $this->containerId . '"));
- ' . $id . '.draw(data, options);
- }';
-
- /** @var $cs CClientScript */
- $cs = Yii::app()->getClientScript();
- $cs->registerScriptFile('https://www.google.com/jsapi');
- $cs->registerScript(
- __CLASS__ . '#' . $id,
- 'google.load("visualization", "1", {packages:["corechart"]});',
- CClientScript::POS_HEAD
- );
- $cs->registerScript($id, $script, CClientScript::POS_HEAD);
- }
-}
\ No newline at end of file
diff --git a/src/common/lib/vendor/2amigos/yiiwheels/widgets/grid/WhRelationalColumn.php b/src/common/lib/vendor/2amigos/yiiwheels/widgets/grid/WhRelationalColumn.php
deleted file mode 100644
index 99100b0..0000000
--- a/src/common/lib/vendor/2amigos/yiiwheels/widgets/grid/WhRelationalColumn.php
+++ /dev/null
@@ -1,211 +0,0 @@
-
- * @copyright Copyright © 2amigos.us 2013-
- * @license http://www.opensource.org/licenses/bsd-license.php New BSD License
- * @package YiiWheels.widgets.fileupload
- * @uses Yiistrap.widgets.TbDataColumn
- */
-Yii::import('bootstrap.widgets.TbDataColumn');
-
-class WhRelationalColumn extends TbDataColumn
-{
- /**
- * @var string $url the route to call via AJAX to get the data from
- */
- public $url;
-
- /**
- * @var string $cssClass the class name that will wrap up the cell content.
- * Important Note: this class will be used as the trigger for the AJAX call, so make sure is unique for the
- * column.
- */
- public $cssClass = 'wh-relational-column';
-
- /**
- * @var bool $cacheData if set to true, there won't be more than one AJAX request. If set to false, the widget will
- * continuously make AJAX requests. This is useful if the data could vary. If the data doesn't change then is better
- * to set it to true. Defaults to true.
- */
- public $cacheData = true;
-
- /**
- * @var string a javascript function that will be invoked if an AJAX call occurs.
- *
- * The function signature is function(tr, rowid, data)
- *
- * tr is the newly created TR HTML object that will display the returned server data.
- * rowid the model id of the row.
- * data is the data returned by the server that is already displayed on the row.
- *
- * Note: This handler is not called for JSONP requests.
- *
- * Example (add in a call to TbRelationalColumn):
- *
- * ...
- * 'afterAjaxUpdate'=>'js:function(tr,rowid, data){ console.log(rowid); }',
- * ...
- *
- */
- public $afterAjaxUpdate;
-
- /**
- * @var string $ajaxErrorMessage the message that is displayed on the newly created row in case there is an AJAX
- * error.
- */
- public $ajaxErrorMessage = 'Error';
-
- /**
- * widget initialization
- */
- public function init()
- {
- parent::init();
-
- if (empty($this->url))
- $this->url = Yii::app()->getRequest()->requestUri;
-
- $this->registerClientScript();
- }
-
- /**
- * Overrides CDataColumn renderDataCell in order to wrap up its content with the object that will be used as a
- * trigger.
- * Important: Making use of links as a content for this of column is an error.
- * @param int $row
- */
- public function renderDataCell($row)
- {
- $data = $this->grid->dataProvider->data[$row];
- $options = $this->htmlOptions;
- if ($this->cssClassExpression !== null) {
- $class = $this->evaluateExpression($this->cssClassExpression, array('row' => $row, 'data' => $data));
- if (isset($options['class']))
- $options['class'] .= ' ' . $class;
- else
- $options['class'] = $class;
- }
- echo CHtml::openTag('td', $options);
- echo CHtml::openTag('span', array('class' => $this->cssClass, 'data-rowid' => $this->getPrimaryKey($data)));
- $this->renderDataCellContent($row, $data);
- echo '';
- echo '';
- }
-
- /**
- * Helper function to return the primary key of the $data
- * * IMPORTANT: composite keys on CActiveDataProviders will return the keys joined by comma
- * @param CActiveRecord $data
- * @return null|string
- */
- protected function getPrimaryKey($data)
- {
- if ($this->grid->dataProvider instanceof CActiveDataProvider) {
- $key = $this->grid->dataProvider->keyAttribute === null ? $data->getPrimaryKey(
- ) : $data->{$this->keyAttribute};
- return is_array($key) ? implode(',', $key) : $key;
- }
- if ($this->grid->dataProvider instanceof CArrayDataProvider || $this->grid->dataProvider instanceof CSqlDataProvider)
- return is_object(
- $data
- ) ? $data->{$this->grid->dataProvider->keyField} : $data[$this->grid->dataProvider->keyField];
-
- return null;
- }
-
- /**
- * Register script that will handle its behavior
- */
- public function registerClientScript()
- {
- Yii::app()->bootstrap->registerAssetCss('bootstrap-relational.css');
- /** @var $cs CClientScript */
- $cs = Yii::app()->getClientScript();
- if ($this->afterAjaxUpdate !== null) {
- if ((!$this->afterAjaxUpdate instanceof CJavaScriptExpression) && strpos(
- $this->afterAjaxUpdate,
- 'js:'
- ) !== 0
- )
- $this->afterAjaxUpdate = new CJavaScriptExpression($this->afterAjaxUpdate);
- } else
- $this->afterAjaxUpdate = 'js:$.noop';
-
- $this->ajaxErrorMessage = CHtml::encode($this->ajaxErrorMessage);
- $afterAjaxUpdate = CJavaScript::encode($this->afterAjaxUpdate);
- $span = count($this->grid->columns);
- $loadingPic = CHtml::image(Yii::app()->yiiwheels->getAssetsUrl() . '/img/loading.gif');
- $cache = $this->cacheData ? 'true' : 'false';
- $data = !empty($this->submitData) && is_array(
- $this->submitData
- ) ? $this->submitData : 'js:{}';
- $data = CJavascript::encode($data);
-
- $js = <<cssClass}', function(){
- var span = $span;
- var that = $(this);
- var status = that.data('status');
- var rowid = that.data('rowid');
- var tr = $('#relatedinfo'+rowid);
- var parent = that.parents('tr').eq(0);
- var afterAjaxUpdate = {$afterAjaxUpdate};
-
- if (status && status=='on'){return}
- that.data('status','on');
-
- if (tr.length && !tr.is(':visible') && {$cache})
- {
- tr.slideDown();
- that.data('status','off');
- return;
- }else if (tr.length && tr.is(':visible'))
- {
- tr.slideUp();
- that.data('status','off');
- return;
- }
- if (tr.length)
- {
- tr.find('td').html('{$loadingPic}');
- if (!tr.is(':visible')){
- tr.slideDown();
- }
- }
- else
- {
- var td = $(' ').html('{$loadingPic}').attr({'colspan':$span});
- tr = $(' ').prop({'id':'relatedinfo'+rowid}).append(td);
- /* we need to maintain zebra styles :) */
- var fake = $(' ').append($(' ').attr({'colspan':$span}));
- parent.after(tr);
- tr.after(fake);
- }
- var data = $.extend({$data}, {id:rowid});
- $.ajax({
- url: '{$this->url}',
- data: data,
- success: function(data){
- tr.find('td').html(data);
- that.data('status','off');
- if ($.isFunction(afterAjaxUpdate))
- {
- afterAjaxUpdate(tr,rowid,data);
- }
- },
- error: function()
- {
- tr.find('td').html('{$this->ajaxErrorMessage}');
- that.data('status','off');
- }
- });
-});
-EOD;
- $cs->registerScript(__CLASS__ . '#' . $this->id, $js);
- }
-}
diff --git a/src/common/lib/vendor/2amigos/yiiwheels/widgets/highcharts/WhHighCharts.php b/src/common/lib/vendor/2amigos/yiiwheels/widgets/highcharts/WhHighCharts.php
deleted file mode 100644
index 7877016..0000000
--- a/src/common/lib/vendor/2amigos/yiiwheels/widgets/highcharts/WhHighCharts.php
+++ /dev/null
@@ -1,112 +0,0 @@
-
- * $this->widget('yiiwheels.widgets.WhHighCharts', array(
- * 'options'=>array(
- * 'title' => array('text' => 'Fruit Consumption'),
- * 'xAxis' => array(
- * 'categories' => array('Apples', 'Bananas', 'Oranges')
- * ),
- * 'yAxis' => array(
- * 'title' => array('text' => 'Fruit eaten')
- * ),
- * 'series' => array(
- * array('name' => 'Jane', 'data' => array(1, 0, 4)),
- * array('name' => 'John', 'data' => array(5, 7, 3))
- * )
- * )
- * ));
- *
- *
- * To find out more about the possible {@link $options} attribute please refer to
- * {@link http://www.hightcharts.com/ Highcharts site}
- *
- * @author Antonio Ramirez
- * @copyright Copyright © 2amigos.us 2013-
- * @license http://www.opensource.org/licenses/bsd-license.php New BSD License
- * @package YiiWheels.widgets.highcharts
- * @uses YiiWheels.WhHtml
- */
-Yii::import('yiiwheels.helpers.WhHtml');
-
-class WhHighCharts extends CWidget
-{
- /**
- * @var array $options the highcharts js configuration options
- * @see http://api.highcharts.com/highcharts
- */
- public $pluginOptions = array();
-
- /**
- * @var array $htmlOptions the HTML tag attributes
- */
- public $htmlOptions = array();
-
- /**
- * Widget's initialization method
- */
- public function init()
- {
- $this->attachBehavior('ywplugin', array('class' => 'yiiwheels.behaviors.WhPlugin'));
- $this->htmlOptions['id'] = WhHtml::getOption('id', $this->htmlOptions, $this->getId());
- }
-
- /**
- * Renders the widget.
- */
- public function run()
- {
- // if there is no renderTo id, build the layer with current id and initialize renderTo option
- if (!isset($this->options['chart']) || !isset($this->options['chart']['renderTo'])) {
- echo WhHtml::tag('div', $this->htmlOptions);
-
- if (isset($this->pluginOptions['chart']) && is_array($this->pluginOptions['chart'])) {
- $this->pluginOptions['chart']['renderTo'] = $this->htmlOptions['id'];
- } else {
- $this->pluginOptions['chart'] = array('renderTo' => $this->htmlOptions['id']);
- }
-
- }
- $this->registerClientScript();
- }
-
- /**
- * Publishes and registers the necessary script files.
- */
- protected function registerClientScript()
- {
- /* publish assets dir */
- $path = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'assets';
- $assetsUrl = $this->getAssetsUrl($path);
-
- /* @var $cs CClientScript */
- $cs = Yii::app()->getClientScript();
-
- $cs->registerScriptFile($assetsUrl . '/js/highcharts.js');
-
- /* register required files */
- $defaultOptions = array('exporting' => array('enabled' => true));
-
- $this->pluginOptions = CMap::mergeArray($defaultOptions, $this->pluginOptions);
-
- if (isset($this->options['exporting']) && @$this->options['exporting']['enabled']) {
- $cs->registerScriptFile($assetsUrl . '/js/modules/exporting.js');
- }
-
- if ($theme = WhHtml::getOption('theme', $this->pluginOptions)) {
- $cs->registerScriptFile($assetsUrl . '/js/themes/' . $theme . '.js');
- }
-
- $options = CJavaScript::encode($this->pluginOptions);
-
- $cs->registerScript(
- __CLASS__ . '#' . $this->getId(),
- "var highchart{$this->getId()} = new Highcharts.Chart({$options});"
- );
- }
-}
\ No newline at end of file
diff --git a/src/common/lib/vendor/2amigos/yiiwheels/widgets/highcharts/assets/js/adapters/mootools-adapter.js b/src/common/lib/vendor/2amigos/yiiwheels/widgets/highcharts/assets/js/adapters/mootools-adapter.js
deleted file mode 100644
index 39ed30e..0000000
--- a/src/common/lib/vendor/2amigos/yiiwheels/widgets/highcharts/assets/js/adapters/mootools-adapter.js
+++ /dev/null
@@ -1,92 +0,0 @@
-/*
- Highcharts JS v2.2.5 (2012-06-08)
- MooTools adapter
-
- (c) 2010-2011 Torstein H?nsi
-
- License: www.highcharts.com/license
- */
-(function () {
- var e = window, i = document, f = e.MooTools.version.substring(0, 3), g = f === "1.2" || f === "1.1", j = g || f === "1.3", h = e.$extend || function () {
- return Object.append.apply(Object, arguments)
- };
- e.HighchartsAdapter = {init: function (a) {
- var b = Fx.prototype, c = b.start, d = Fx.Morph.prototype, e = d.compute;
- b.start = function (b, d) {
- var e = this.element;
- if (b.d)this.paths = a.init(e, e.d, this.toD);
- c.apply(this, arguments);
- return this
- };
- d.compute = function (b, c, d) {
- var f = this.paths;
- if (f)this.element.attr("d", a.step(f[0], f[1], d, this.toD)); else return e.apply(this,
- arguments)
- }
- }, adapterRun: function (a, b) {
- return $(a).getStyle(b).toInt()
- }, getScript: function (a, b) {
- var c = i.getElementsByTagName("head")[0], d = i.createElement("script");
- d.type = "text/javascript";
- d.src = a;
- d.onload = b;
- c.appendChild(d)
- }, animate: function (a, b, c) {
- var d = a.attr, f = c && c.complete;
- if (d && !a.setStyle)a.getStyle = a.attr, a.setStyle = function () {
- var b = arguments;
- a.attr.call(a, b[0], b[1][0])
- }, a.$family = function () {
- return!0
- };
- e.HighchartsAdapter.stop(a);
- c = new Fx.Morph(d ? a : $(a), h({transition: Fx.Transitions.Quad.easeInOut},
- c));
- if (d)c.element = a;
- if (b.d)c.toD = b.d;
- f && c.addEvent("complete", f);
- c.start(b);
- a.fx = c
- }, each: function (a, b) {
- return g ? $each(a, b) : Array.each(a, b)
- }, map: function (a, b) {
- return a.map(b)
- }, grep: function (a, b) {
- return a.filter(b)
- }, merge: function () {
- var a = arguments, b = [
- {}
- ], c = a.length;
- if (g)a = $merge.apply(null, a); else {
- for (; c--;)typeof a[c] !== "boolean" && (b[c + 1] = a[c]);
- a = Object.merge.apply(Object, b)
- }
- return a
- }, offset: function (a) {
- a = $(a).getOffsets();
- return{left: a.x, top: a.y}
- }, extendWithEvents: function (a) {
- a.addEvent || (a.nodeName ?
- $(a) : h(a, new Events))
- }, addEvent: function (a, b, c) {
- typeof b === "string" && (b === "unload" && (b = "beforeunload"), e.HighchartsAdapter.extendWithEvents(a), a.addEvent(b, c))
- }, removeEvent: function (a, b, c) {
- typeof a !== "string" && (e.HighchartsAdapter.extendWithEvents(a), b ? (b === "unload" && (b = "beforeunload"), c ? a.removeEvent(b, c) : a.removeEvents && a.removeEvents(b)) : a.removeEvents())
- }, fireEvent: function (a, b, c, d) {
- b = {type: b, target: a};
- b = j ? new Event(b) : new DOMEvent(b);
- b = h(b, c);
- b.preventDefault = function () {
- d = null
- };
- a.fireEvent &&
- a.fireEvent(b.type, b);
- d && d(b)
- }, washMouseEvent: function (a) {
- a.pageX = a.page.x;
- a.pageY = a.page.y;
- return a
- }, stop: function (a) {
- a.fx && a.fx.cancel()
- }}
-})();
diff --git a/src/common/lib/vendor/2amigos/yiiwheels/widgets/highcharts/assets/js/adapters/mootools-adapter.src.js b/src/common/lib/vendor/2amigos/yiiwheels/widgets/highcharts/assets/js/adapters/mootools-adapter.src.js
deleted file mode 100644
index dc1b798..0000000
--- a/src/common/lib/vendor/2amigos/yiiwheels/widgets/highcharts/assets/js/adapters/mootools-adapter.src.js
+++ /dev/null
@@ -1,326 +0,0 @@
-/**
- * @license Highcharts JS v2.2.5 (2012-06-08)
- * MooTools adapter
- *
- * (c) 2010-2011 Torstein Hønsi
- *
- * License: www.highcharts.com/license
- */
-
-// JSLint options:
-/*global Fx, $, $extend, $each, $merge, Events, Event, DOMEvent */
-
-(function () {
-
- var win = window,
- doc = document,
- mooVersion = win.MooTools.version.substring(0, 3), // Get the first three characters of the version number
- legacy = mooVersion === '1.2' || mooVersion === '1.1', // 1.1 && 1.2 considered legacy, 1.3 is not.
- legacyEvent = legacy || mooVersion === '1.3', // In versions 1.1 - 1.3 the event class is named Event, in newer versions it is named DOMEvent.
- $extend = win.$extend || function () {
- return Object.append.apply(Object, arguments);
- };
-
- win.HighchartsAdapter = {
- /**
- * Initialize the adapter. This is run once as Highcharts is first run.
- * @param {Object} pathAnim The helper object to do animations across adapters.
- */
- init: function (pathAnim) {
- var fxProto = Fx.prototype,
- fxStart = fxProto.start,
- morphProto = Fx.Morph.prototype,
- morphCompute = morphProto.compute;
-
- // override Fx.start to allow animation of SVG element wrappers
- /*jslint unparam: true*/
- /* allow unused parameters in fx functions */
- fxProto.start = function (from, to) {
- var fx = this,
- elem = fx.element;
-
- // special for animating paths
- if (from.d) {
- //this.fromD = this.element.d.split(' ');
- fx.paths = pathAnim.init(
- elem,
- elem.d,
- fx.toD
- );
- }
- fxStart.apply(fx, arguments);
-
- return this; // chainable
- };
-
- // override Fx.step to allow animation of SVG element wrappers
- morphProto.compute = function (from, to, delta) {
- var fx = this,
- paths = fx.paths;
-
- if (paths) {
- fx.element.attr(
- 'd',
- pathAnim.step(paths[0], paths[1], delta, fx.toD)
- );
- } else {
- return morphCompute.apply(fx, arguments);
- }
- };
- /*jslint unparam: false*/
- },
-
- /**
- * Run a general method on the framework, following jQuery syntax
- * @param {Object} el The HTML element
- * @param {String} method Which method to run on the wrapped element
- */
- adapterRun: function (el, method) {
-
- // This currently works for getting inner width and height. If adding
- // more methods later, we need a conditional implementation for each.
- return $(el).getStyle(method).toInt();
-
- },
-
- /**
- * Downloads a script and executes a callback when done.
- * @param {String} scriptLocation
- * @param {Function} callback
- */
- getScript: function (scriptLocation, callback) {
- // We cannot assume that Assets class from mootools-more is available so instead insert a script tag to download script.
- var head = doc.getElementsByTagName('head')[0];
- var script = doc.createElement('script');
-
- script.type = 'text/javascript';
- script.src = scriptLocation;
- script.onload = callback;
-
- head.appendChild(script);
- },
-
- /**
- * Animate a HTML element or SVG element wrapper
- * @param {Object} el
- * @param {Object} params
- * @param {Object} options jQuery-like animation options: duration, easing, callback
- */
- animate: function (el, params, options) {
- var isSVGElement = el.attr,
- effect,
- complete = options && options.complete;
-
- if (isSVGElement && !el.setStyle) {
- // add setStyle and getStyle methods for internal use in Moo
- el.getStyle = el.attr;
- el.setStyle = function () { // property value is given as array in Moo - break it down
- var args = arguments;
- el.attr.call(el, args[0], args[1][0]);
- };
- // dirty hack to trick Moo into handling el as an element wrapper
- el.$family = function () {
- return true;
- };
- }
-
- // stop running animations
- win.HighchartsAdapter.stop(el);
-
- // define and run the effect
- effect = new Fx.Morph(
- isSVGElement ? el : $(el),
- $extend({
- transition: Fx.Transitions.Quad.easeInOut
- }, options)
- );
-
- // Make sure that the element reference is set when animating svg elements
- if (isSVGElement) {
- effect.element = el;
- }
-
- // special treatment for paths
- if (params.d) {
- effect.toD = params.d;
- }
-
- // jQuery-like events
- if (complete) {
- effect.addEvent('complete', complete);
- }
-
- // run
- effect.start(params);
-
- // record for use in stop method
- el.fx = effect;
- },
-
- /**
- * MooTool's each function
- *
- */
- each: function (arr, fn) {
- return legacy ?
- $each(arr, fn) :
- Array.each(arr, fn);
- },
-
- /**
- * Map an array
- * @param {Array} arr
- * @param {Function} fn
- */
- map: function (arr, fn) {
- return arr.map(fn);
- },
-
- /**
- * Grep or filter an array
- * @param {Array} arr
- * @param {Function} fn
- */
- grep: function (arr, fn) {
- return arr.filter(fn);
- },
-
- /**
- * Deep merge two objects and return a third
- */
- merge: function () {
- var args = arguments,
- args13 = [
- {}
- ], // MooTools 1.3+
- i = args.length,
- ret;
-
- if (legacy) {
- ret = $merge.apply(null, args);
- } else {
- while (i--) {
- // Boolean argumens should not be merged.
- // JQuery explicitly skips this, so we do it here as well.
- if (typeof args[i] !== 'boolean') {
- args13[i + 1] = args[i];
- }
- }
- ret = Object.merge.apply(Object, args13);
- }
-
- return ret;
- },
-
- /**
- * Get the offset of an element relative to the top left corner of the web page
- */
- offset: function (el) {
- var offsets = $(el).getOffsets();
- return {
- left: offsets.x,
- top: offsets.y
- };
- },
-
- /**
- * Extends an object with Events, if its not done
- */
- extendWithEvents: function (el) {
- // if the addEvent method is not defined, el is a custom Highcharts object
- // like series or point
- if (!el.addEvent) {
- if (el.nodeName) {
- el = $(el); // a dynamically generated node
- } else {
- $extend(el, new Events()); // a custom object
- }
- }
- },
-
- /**
- * Add an event listener
- * @param {Object} el HTML element or custom object
- * @param {String} type Event type
- * @param {Function} fn Event handler
- */
- addEvent: function (el, type, fn) {
- if (typeof type === 'string') { // chart broke due to el being string, type function
-
- if (type === 'unload') { // Moo self destructs before custom unload events
- type = 'beforeunload';
- }
-
- win.HighchartsAdapter.extendWithEvents(el);
-
- el.addEvent(type, fn);
- }
- },
-
- removeEvent: function (el, type, fn) {
- if (typeof el === 'string') {
- // el.removeEvents below apperantly calls this method again. Do not quite understand why, so for now just bail out.
- return;
- }
-
- win.HighchartsAdapter.extendWithEvents(el);
- if (type) {
- if (type === 'unload') { // Moo self destructs before custom unload events
- type = 'beforeunload';
- }
-
- if (fn) {
- el.removeEvent(type, fn);
- } else if (el.removeEvents) { // #958
- el.removeEvents(type);
- }
- } else {
- el.removeEvents();
- }
- },
-
- fireEvent: function (el, event, eventArguments, defaultFunction) {
- var eventArgs = {
- type: event,
- target: el
- };
- // create an event object that keeps all functions
- event = legacyEvent ? new Event(eventArgs) : new DOMEvent(eventArgs);
- event = $extend(event, eventArguments);
- // override the preventDefault function to be able to use
- // this for custom events
- event.preventDefault = function () {
- defaultFunction = null;
- };
- // if fireEvent is not available on the object, there hasn't been added
- // any events to it above
- if (el.fireEvent) {
- el.fireEvent(event.type, event);
- }
-
- // fire the default if it is passed and it is not prevented above
- if (defaultFunction) {
- defaultFunction(event);
- }
- },
-
- /**
- * Set back e.pageX and e.pageY that MooTools has abstracted away
- */
- washMouseEvent: function (e) {
- e.pageX = e.page.x;
- e.pageY = e.page.y;
- return e;
- },
-
- /**
- * Stop running animations on the object
- */
- stop: function (el) {
- if (el.fx) {
- el.fx.cancel();
- }
- }
- };
-
-}());
diff --git a/src/common/lib/vendor/2amigos/yiiwheels/widgets/highcharts/assets/js/adapters/prototype-adapter.js b/src/common/lib/vendor/2amigos/yiiwheels/widgets/highcharts/assets/js/adapters/prototype-adapter.js
deleted file mode 100644
index c54a756..0000000
--- a/src/common/lib/vendor/2amigos/yiiwheels/widgets/highcharts/assets/js/adapters/prototype-adapter.js
+++ /dev/null
@@ -1,101 +0,0 @@
-/*
- Highcharts JS v2.2.5 (2012-06-08)
- Prototype adapter
-
- @author Michael Nelson, Torstein H?nsi.
-
- Feel free to use and modify this script.
- Highcharts license: www.highcharts.com/license.
- */
-var HighchartsAdapter = function () {
- var g = typeof Effect !== "undefined";
- return{init: function (c) {
- if (g)Effect.HighchartsTransition = Class.create(Effect.Base, {initialize: function (a, b, d, e) {
- var f;
- this.element = a;
- this.key = b;
- f = a.attr ? a.attr(b) : $(a).getStyle(b);
- if (b === "d")this.paths = c.init(a, a.d, d), this.toD = d, f = 0, d = 1;
- this.start(Object.extend(e || {}, {from: f, to: d, attribute: b}))
- }, setup: function () {
- HighchartsAdapter._extend(this.element);
- if (!this.element._highchart_animation)this.element._highchart_animation = {};
- this.element._highchart_animation[this.key] =
- this
- }, update: function (a) {
- var b = this.paths, d = this.element;
- b && (a = c.step(b[0], b[1], a, this.toD));
- d.attr ? d.attr(this.options.attribute, a) : (b = {}, b[this.options.attribute] = a, $(d).setStyle(b))
- }, finish: function () {
- delete this.element._highchart_animation[this.key]
- }})
- }, adapterRun: function (c, a) {
- return parseInt($(c).getStyle(a), 10)
- }, getScript: function (c, a) {
- var b = $$("head")[0];
- b && b.appendChild((new Element("script", {type: "text/javascript", src: c})).observe("load", a))
- }, addNS: function (c) {
- var a = /^(?:click|mouse(?:down|up|over|move|out))$/;
- return/^(?:load|unload|abort|error|select|change|submit|reset|focus|blur|resize|scroll)$/.test(c) || a.test(c) ? c : "h:" + c
- }, addEvent: function (c, a, b) {
- c.addEventListener || c.attachEvent ? Event.observe($(c), HighchartsAdapter.addNS(a), b) : (HighchartsAdapter._extend(c), c._highcharts_observe(a, b))
- }, animate: function (c, a, b) {
- var d, b = b || {};
- b.delay = 0;
- b.duration = (b.duration || 500) / 1E3;
- b.afterFinish = b.complete;
- if (g)for (d in a)new Effect.HighchartsTransition($(c), d, a[d], b); else {
- if (c.attr)for (d in a)c.attr(d, a[d]);
- b.complete &&
- b.complete()
- }
- c.attr || $(c).setStyle(a)
- }, stop: function (c) {
- var a;
- if (c._highcharts_extended && c._highchart_animation)for (a in c._highchart_animation)c._highchart_animation[a].cancel()
- }, each: function (c, a) {
- $A(c).each(a)
- }, offset: function (c) {
- return $(c).cumulativeOffset()
- }, fireEvent: function (c, a, b, d) {
- c.fire ? c.fire(HighchartsAdapter.addNS(a), b) : c._highcharts_extended && (b = b || {}, c._highcharts_fire(a, b));
- b && b.defaultPrevented && (d = null);
- d && d(b)
- }, removeEvent: function (c, a, b) {
- $(c).stopObserving && (a && (a = HighchartsAdapter.addNS(a)),
- $(c).stopObserving(a, b));
- window === c ? Event.stopObserving(c, a, b) : (HighchartsAdapter._extend(c), c._highcharts_stop_observing(a, b))
- }, washMouseEvent: function (c) {
- return c
- }, grep: function (c, a) {
- return c.findAll(a)
- }, map: function (c, a) {
- return c.map(a)
- }, merge: function () {
- function c(a, b) {
- var d, e;
- for (e in b)d = b[e], a[e] = d && typeof d === "object" && d.constructor !== Array && typeof d.nodeType !== "number" ? c(a[e] || {}, d) : b[e];
- return a
- }
-
- return function () {
- var a = arguments, b, d = {};
- for (b = 0; b < a.length; b++)d = c(d, a[b]);
- return d
- }.apply(this,
- arguments)
- }, _extend: function (c) {
- c._highcharts_extended || Object.extend(c, {_highchart_events: {}, _highchart_animation: null, _highcharts_extended: !0, _highcharts_observe: function (a, b) {
- this._highchart_events[a] = [this._highchart_events[a], b].compact().flatten()
- }, _highcharts_stop_observing: function (a, b) {
- a ? b ? this._highchart_events[a] = [this._highchart_events[a]].compact().flatten().without(b) : delete this._highchart_events[a] : this._highchart_events = {}
- }, _highcharts_fire: function (a, b) {
- (this._highchart_events[a] ||
- []).each(function (a) {
- if (!b.stopped)b.preventDefault = function () {
- b.defaultPrevented = !0
- }, a.bind(this)(b) === !1 && b.preventDefault()
- }.bind(this))
- }})
- }}
-}();
diff --git a/src/common/lib/vendor/2amigos/yiiwheels/widgets/highcharts/assets/js/adapters/prototype-adapter.src.js b/src/common/lib/vendor/2amigos/yiiwheels/widgets/highcharts/assets/js/adapters/prototype-adapter.src.js
deleted file mode 100644
index 2a779e1..0000000
--- a/src/common/lib/vendor/2amigos/yiiwheels/widgets/highcharts/assets/js/adapters/prototype-adapter.src.js
+++ /dev/null
@@ -1,382 +0,0 @@
-/**
- * @license Highcharts JS v2.2.5 (2012-06-08)
- * Prototype adapter
- *
- * @author Michael Nelson, Torstein Hønsi.
- *
- * Feel free to use and modify this script.
- * Highcharts license: www.highcharts.com/license.
- */
-
-// JSLint options:
-/*global Effect, Class, Event, Element, $, $$, $A */
-
-// Adapter interface between prototype and the Highcharts charting library
-var HighchartsAdapter = (function () {
-
- var hasEffect = typeof Effect !== 'undefined';
-
- return {
-
- /**
- * Initialize the adapter. This is run once as Highcharts is first run.
- * @param {Object} pathAnim The helper object to do animations across adapters.
- */
- init: function (pathAnim) {
- if (hasEffect) {
- /**
- * Animation for Highcharts SVG element wrappers only
- * @param {Object} element
- * @param {Object} attribute
- * @param {Object} to
- * @param {Object} options
- */
- Effect.HighchartsTransition = Class.create(Effect.Base, {
- initialize: function (element, attr, to, options) {
- var from,
- opts;
-
- this.element = element;
- this.key = attr;
- from = element.attr ? element.attr(attr) : $(element).getStyle(attr);
-
- // special treatment for paths
- if (attr === 'd') {
- this.paths = pathAnim.init(
- element,
- element.d,
- to
- );
- this.toD = to;
-
-
- // fake values in order to read relative position as a float in update
- from = 0;
- to = 1;
- }
-
- opts = Object.extend((options || {}), {
- from: from,
- to: to,
- attribute: attr
- });
- this.start(opts);
- },
- setup: function () {
- HighchartsAdapter._extend(this.element);
- // If this is the first animation on this object, create the _highcharts_animation helper that
- // contain pointers to the animation objects.
- if (!this.element._highchart_animation) {
- this.element._highchart_animation = {};
- }
-
- // Store a reference to this animation instance.
- this.element._highchart_animation[this.key] = this;
- },
- update: function (position) {
- var paths = this.paths,
- element = this.element,
- obj;
-
- if (paths) {
- position = pathAnim.step(paths[0], paths[1], position, this.toD);
- }
-
- if (element.attr) { // SVGElement
- element.attr(this.options.attribute, position);
-
- } else { // HTML, #409
- obj = {};
- obj[this.options.attribute] = position;
- $(element).setStyle(obj);
- }
-
- },
- finish: function () {
- // Delete the property that holds this animation now that it is finished.
- // Both canceled animations and complete ones gets a 'finish' call.
- delete this.element._highchart_animation[this.key];
- }
- });
- }
- },
-
- /**
- * Run a general method on the framework, following jQuery syntax
- * @param {Object} el The HTML element
- * @param {String} method Which method to run on the wrapped element
- */
- adapterRun: function (el, method) {
-
- // This currently works for getting inner width and height. If adding
- // more methods later, we need a conditional implementation for each.
- return parseInt($(el).getStyle(method), 10);
-
- },
-
- /**
- * Downloads a script and executes a callback when done.
- * @param {String} scriptLocation
- * @param {Function} callback
- */
- getScript: function (scriptLocation, callback) {
- var head = $$('head')[0]; // Returns an array, so pick the first element.
- if (head) {
- // Append a new 'script' element, set its type and src attributes, add a 'load' handler that calls the callback
- head.appendChild(new Element('script', { type: 'text/javascript', src: scriptLocation}).observe('load', callback));
- }
- },
-
- /**
- * Custom events in prototype needs to be namespaced. This method adds a namespace 'h:' in front of
- * events that are not recognized as native.
- */
- addNS: function (eventName) {
- var HTMLEvents = /^(?:load|unload|abort|error|select|change|submit|reset|focus|blur|resize|scroll)$/,
- MouseEvents = /^(?:click|mouse(?:down|up|over|move|out))$/;
- return (HTMLEvents.test(eventName) || MouseEvents.test(eventName)) ?
- eventName :
- 'h:' + eventName;
- },
-
- // el needs an event to be attached. el is not necessarily a dom element
- addEvent: function (el, event, fn) {
- if (el.addEventListener || el.attachEvent) {
- Event.observe($(el), HighchartsAdapter.addNS(event), fn);
-
- } else {
- HighchartsAdapter._extend(el);
- el._highcharts_observe(event, fn);
- }
- },
-
- // motion makes things pretty. use it if effects is loaded, if not... still get to the end result.
- animate: function (el, params, options) {
- var key,
- fx;
-
- // default options
- options = options || {};
- options.delay = 0;
- options.duration = (options.duration || 500) / 1000;
- options.afterFinish = options.complete;
-
- // animate wrappers and DOM elements
- if (hasEffect) {
- for (key in params) {
- // The fx variable is seemingly thrown away here, but the Effect.setup will add itself to the _highcharts_animation object
- // on the element itself so its not really lost.
- fx = new Effect.HighchartsTransition($(el), key, params[key], options);
- }
- } else {
- if (el.attr) { // #409 without effects
- for (key in params) {
- el.attr(key, params[key]);
- }
- }
- if (options.complete) {
- options.complete();
- }
- }
-
- if (!el.attr) { // HTML element, #409
- $(el).setStyle(params);
- }
- },
-
- // this only occurs in higcharts 2.0+
- stop: function (el) {
- var key;
- if (el._highcharts_extended && el._highchart_animation) {
- for (key in el._highchart_animation) {
- // Cancel the animation
- // The 'finish' function in the Effect object will remove the reference
- el._highchart_animation[key].cancel();
- }
- }
- },
-
- // um.. each
- each: function (arr, fn) {
- $A(arr).each(fn);
- },
-
- /**
- * Get the cumulative offset relative to the top left of the page. This method, unlike its
- * jQuery and MooTools counterpart, still suffers from issue #208 regarding the position
- * of a chart within a fixed container.
- */
- offset: function (el) {
- return $(el).cumulativeOffset();
- },
-
- // fire an event based on an event name (event) and an object (el).
- // again, el may not be a dom element
- fireEvent: function (el, event, eventArguments, defaultFunction) {
- if (el.fire) {
- el.fire(HighchartsAdapter.addNS(event), eventArguments);
- } else if (el._highcharts_extended) {
- eventArguments = eventArguments || {};
- el._highcharts_fire(event, eventArguments);
- }
-
- if (eventArguments && eventArguments.defaultPrevented) {
- defaultFunction = null;
- }
-
- if (defaultFunction) {
- defaultFunction(eventArguments);
- }
- },
-
- removeEvent: function (el, event, handler) {
- if ($(el).stopObserving) {
- if (event) {
- event = HighchartsAdapter.addNS(event);
- }
- $(el).stopObserving(event, handler);
- }
- if (window === el) {
- Event.stopObserving(el, event, handler);
- } else {
- HighchartsAdapter._extend(el);
- el._highcharts_stop_observing(event, handler);
- }
- },
-
- washMouseEvent: function (e) {
- return e;
- },
-
- // um, grep
- grep: function (arr, fn) {
- return arr.findAll(fn);
- },
-
- // um, map
- map: function (arr, fn) {
- return arr.map(fn);
- },
-
- // deep merge. merge({a : 'a', b : {b1 : 'b1', b2 : 'b2'}}, {b : {b2 : 'b2_prime'}, c : 'c'}) => {a : 'a', b : {b1 : 'b1', b2 : 'b2_prime'}, c : 'c'}
- /*merge: function(){
- function doCopy(copy, original) {
- var value,
- key,
- undef,
- nil,
- same,
- obj,
- arr,
- node;
-
- for (key in original) {
- value = original[key];
- undef = typeof(value) === 'undefined';
- nil = value === null;
- same = original === copy[key];
-
- if (undef || nil || same) {
- continue;
- }
-
- obj = typeof(value) === 'object';
- arr = value && obj && value.constructor == Array;
- node = !!value.nodeType;
-
- if (obj && !arr && !node) {
- copy[key] = doCopy(typeof copy[key] == 'object' ? copy[key] : {}, value);
- }
- else {
- copy[key] = original[key];
- }
- }
- return copy;
- }
-
- var args = arguments, retVal = {};
-
- for (var i = 0; i < args.length; i++) {
- retVal = doCopy(retVal, args[i]);
- }
-
- return retVal;
- },*/
- merge: function () { // the built-in prototype merge function doesn't do deep copy
- function doCopy(copy, original) {
- var value, key;
-
- for (key in original) {
- value = original[key];
- if (value && typeof value === 'object' && value.constructor !== Array &&
- typeof value.nodeType !== 'number') {
- copy[key] = doCopy(copy[key] || {}, value); // copy
-
- } else {
- copy[key] = original[key];
- }
- }
- return copy;
- }
-
- function merge() {
- var args = arguments,
- i,
- retVal = {};
-
- for (i = 0; i < args.length; i++) {
- retVal = doCopy(retVal, args[i]);
-
- }
- return retVal;
- }
-
- return merge.apply(this, arguments);
- },
-
- // extend an object to handle highchart events (highchart objects, not svg elements).
- // this is a very simple way of handling events but whatever, it works (i think)
- _extend: function (object) {
- if (!object._highcharts_extended) {
- Object.extend(object, {
- _highchart_events: {},
- _highchart_animation: null,
- _highcharts_extended: true,
- _highcharts_observe: function (name, fn) {
- this._highchart_events[name] = [this._highchart_events[name], fn].compact().flatten();
- },
- _highcharts_stop_observing: function (name, fn) {
- if (name) {
- if (fn) {
- this._highchart_events[name] = [this._highchart_events[name]].compact().flatten().without(fn);
- } else {
- delete this._highchart_events[name];
- }
- } else {
- this._highchart_events = {};
- }
- },
- _highcharts_fire: function (name, args) {
- (this._highchart_events[name] || []).each(function (fn) {
- // args is never null here
- if (args.stopped) {
- return; // "throw $break" wasn't working. i think because of the scope of 'this'.
- }
-
- // Attach a simple preventDefault function to skip default handler if called
- args.preventDefault = function () {
- args.defaultPrevented = true;
- };
-
- // If the event handler return false, prevent the default handler from executing
- if (fn.bind(this)(args) === false) {
- args.preventDefault();
- }
- }
- .bind(this));
- }
- });
- }
- }
- };
-}());
diff --git a/src/common/lib/vendor/2amigos/yiiwheels/widgets/highcharts/assets/js/highcharts-more.js b/src/common/lib/vendor/2amigos/yiiwheels/widgets/highcharts/assets/js/highcharts-more.js
deleted file mode 100644
index 8236db8..0000000
--- a/src/common/lib/vendor/2amigos/yiiwheels/widgets/highcharts/assets/js/highcharts-more.js
+++ /dev/null
@@ -1,198 +0,0 @@
-/*
- Highcharts JS v2.2.5 (2012-06-08)
-
- (c) 2009-2011 Torstein H?nsi
-
- License: www.highcharts.com/license
- */
-(function (g, v) {
- var o = g.each, s = g.extend, p = g.merge, w = g.map, j = g.pick, q = g.pInt, i = g.getOptions().plotOptions, k = g.seriesTypes, t = g.Series, m = function () {
- }, r = g.Axis.prototype, l = g.Tick.prototype, x = {redraw: function () {
- this.isDirty = !1
- }, render: function () {
- this.isDirty = !1
- }, setScale: m, setCategories: m, setTitle: m}, u = {isRadial: !0, defaultRadialGaugeOptions: {center: ["50%", "50%"], labels: {align: "center", x: 0, y: null}, minorGridLineWidth: 0, minorTickInterval: "auto", minorTickLength: 10, minorTickPosition: "inside", minorTickWidth: 1,
- plotBands: [], size: ["90%"], tickLength: 10, tickPosition: "inside", tickWidth: 2, title: {rotation: 0}, zIndex: 2}, defaultRadialXOptions: {center: ["50%", "50%"], labels: {align: "center", distance: 15, x: 0, y: null}, maxPadding: 0, minPadding: 0, size: ["90%"]}, defaultRadialYOptions: {center: ["50%", "50%"], labels: {align: "left", x: 3, y: -2}, size: ["90%"], title: {x: -4, text: null}}, defaultBackgroundOptions: {shape: "circle", borderWidth: 1, borderColor: "silver", backgroundColor: {linearGradient: {x1: 0, y1: 0, x2: 0, y2: 1}, stops: [
- [0, "#FFF"],
- [1, "#DDD"]
- ]},
- from: Number.MIN_VALUE, innerRadius: 0, to: Number.MAX_VALUE, outerRadius: "105%"}, setOptions: function (a) {
- var b = this, c;
- b.options = c = p(b.defaultOptions, b.isXAxis ? {} : b.defaultYAxisOptions, b.defaultRadialOptions, a);
- o([].concat(g.splat(a.background || {})).reverse(), function (a) {
- a = p(b.defaultBackgroundOptions, a);
- a.color = a.backgroundColor;
- c.plotBands.unshift(a)
- })
- }, getOffset: function () {
- r.getOffset.call(this);
- this.chart.axisOffset[this.side] = 0;
- this.center = k.pie.prototype.getCenter.call(this)
- }, getLinePath: function (a) {
- var b =
- this.center, a = j(a, b[2] / 2 - this.offset);
- return this.chart.renderer.symbols.arc(this.left + b[0], this.top + b[1], a, a, {start: this.startAngleRad, end: this.endAngleRad, open: !0, innerR: 0})
- }, setAxisTranslation: function () {
- r.setAxisTranslation.call(this);
- if (this.center)this.transA = this.isCircular ? (this.endAngleRad - this.startAngleRad) / (this.max - this.min + (this.closestPointRange || 0) || 1) : this.center[2] / 2 / (this.max - this.min || 1), this.minPixelPadding = this.transA * ((this.pointRange || 0) / 2)
- }, setAxisSize: function () {
- r.setAxisSize.call(this);
- if (this.center)this.len = this.width = this.height = this.isCircular ? this.center[2] * (this.endAngleRad - this.startAngleRad) / 2 : this.center[2] / 2
- }, getPosition: function (a, b) {
- if (!this.isCircular)b = this.translate(a), a = this.min;
- return this.postTranslate(this.translate(a), j(b, this.center[2] / 2) - this.offset)
- }, postTranslate: function (a, b) {
- var c = this.chart, d = this.center, a = this.startAngleRad + a;
- return{x: c.plotLeft + d[0] + Math.cos(a) * b, y: c.plotTop + d[1] + Math.sin(a) * b}
- }, getPlotBandPath: function (a, b, c) {
- var d = this.center, e = this.startAngleRad,
- h = d[2] / 2, f = [j(c.outerRadius, "100%"), c.innerRadius, j(c.thickness, 10)], g = /%$/, n, f = w(f, function (a) {
- g.test(a) && (a = q(a, 10) * h / 100);
- return a
- });
- c.shape === "circle" ? (a = -Math.PI / 2, b = Math.PI * 1.5, n = !0) : (a = e + this.translate(a), b = e + this.translate(b));
- return this.chart.renderer.symbols.arc(this.left + d[0], this.top + d[1], f[0], f[0], {start: a, end: b, innerR: j(f[1], f[0] - f[2]), open: n})
- }, getPlotLinePath: function (a) {
- var b = this.center, c = this.chart, d = this.getPosition(a);
- return this.isCircular ? ["M", b[0] + c.plotLeft, b[1] + c.plotTop,
- "L", d.x, d.y] : u.getLinePath.call(this, this.translate(a))
- }, getTitlePosition: function () {
- var a = this.center, b = this.chart, c = this.options.title;
- return{x: b.plotLeft + a[0] + (c.x || 0), y: b.plotTop + a[1] - {high: 0.5, middle: 0.25, low: 0}[this.options.title.align] * a[2] + (c.y || 0)}
- }};
- r.init = function (a) {
- return function (b, c) {
- var d = b.angular, e = b.polar, h = c.isX, f;
- if (d) {
- if (s(this, h ? x : u), f = !h)this.defaultRadialOptions = this.defaultGaugeOptions
- } else if (e)s(this, u), this.defaultRadialOptions = (f = h) ? this.defaultRadialXOptions : this.defaultRadialYOptions;
- a.apply(this, arguments);
- if (d || e)d = this.options, this.startAngleRad = (d.startAngle - 90) * Math.PI / 180, this.endAngleRad = (d.endAngle - 90) * Math.PI / 180, this.offset = d.offset || 0, this.isCircular = f
- }
- }(r.init);
- l.getPosition = function (a) {
- return function () {
- var b = this.axis, c = arguments;
- return b.getPosition ? b.getPosition(c[1]) : a.apply(this, c)
- }
- }(l.getPosition);
- l.getLabelPosition = function (a) {
- return function () {
- var b = this.axis, c = b.options.labels, d = this.label, e = c.y, h;
- b.isRadial ? (h = b.getPosition(this.pos, b.center[2] / 2 + j(c.distance,
- -25)), c.rotation === "auto" ? d.attr({rotation: (b.translate(this.pos) + b.startAngleRad + Math.PI / 2) / Math.PI * 180}) : e === null && (e = q(d.styles.lineHeight) * 0.9 - d.getBBox().height / 2), h.x += c.x, h.y += e) : h = a.apply(this, arguments);
- return h
- }
- }(l.getLabelPosition);
- l.getMarkPath = function (a) {
- return function (b, c, d) {
- var e = this.axis;
- e.isRadial ? (e = e.getPosition(this.pos, e.center[2] / 2 + d), e = ["M", b, c, "L", e.x, e.y]) : e = a.apply(this, arguments);
- return e
- }
- }(l.getMarkPath);
- i.arearange = p(i.area, {lineWidth: 0, threshold: null, tooltip: {pointFormat: '{series.name} : {point.low} - {point.high}'},
- trackByArea: !0, dataLabels: {yHigh: -6, yLow: 16}});
- l = g.extendClass(g.Point, {applyOptions: function (a) {
- var b = this.series, c = 0;
- if (typeof a === "object" && typeof a.length !== "number")s(this, a), this.options = a; else if (a.length) {
- if (a.length === 3) {
- if (typeof a[0] === "string")this.name = a[0]; else if (typeof a[0] === "number")this.x = a[0];
- c++
- }
- this.low = a[c++];
- this.high = a[c++]
- }
- if (this.high === null)this.low = null;
- this.y = this.low;
- if (this.x === v && b)this.x = b.autoIncrement();
- return this
- }, toYData: function () {
- return[this.low, this.high]
- }});
- k.arearange = g.extendClass(k.area, {type: "arearange", valueCount: 2, pointClass: l, translate: function () {
- var a = this.yAxis;
- k.area.prototype.translate.apply(this);
- o(this.points, function (b) {
- if (b.y !== null)b.plotLow = b.plotY, b.plotHigh = a.translate(b.high, 0, 1, 0, 1)
- })
- }, getSegmentPath: function (a) {
- for (var b = [], c = a.length, d = t.prototype.getSegmentPath, e; c--;)e = a[c], b.push({plotX: e.plotX, plotY: e.plotHigh});
- a = d.call(this, a);
- d = d.call(this, b);
- b = [].concat(a, d);
- d[0] = "L";
- this.areaPath = this.areaPath.concat(a, d);
- return b
- }, drawDataLabels: function () {
- var a =
- this.points, b = a.length, c, d = [], e = t.prototype.drawDataLabels, h = this.options.dataLabels, f;
- for (c = b; c--;)f = a[c], f.y = f.high, f.plotY = f.plotHigh, d[c] = f.dataLabel, f.dataLabel = f.dataLabelUpper, h.y = h.yHigh;
- e.apply(this, arguments);
- for (c = b; c--;)f = a[c], f.dataLabelUpper = f.dataLabel, f.dataLabel = d[c], f.y = f.low, f.plotY = f.plotLow, h.y = h.yLow;
- e.apply(this, arguments)
- }, drawPoints: m});
- i.gauge = p(i.line, {dataLabels: {enabled: !0, y: 30, borderWidth: 1, borderColor: "silver", borderRadius: 3, style: {fontWeight: "bold"}}, dial: {}, pivot: {},
- tooltip: {headerFormat: ""}, showInLegend: !1});
- i = {type: "gauge", pointClass: g.extendClass(g.Point, {setState: function (a) {
- this.state = a
- }}), angular: !0, translate: function () {
- var a = this, b = a.yAxis, c = b.center;
- a.generatePoints();
- o(a.points, function (d) {
- var e = p(a.options.dial, d.dial), h = q(j(e.radius, 80)) * c[2] / 200, f = q(j(e.baseLength, 70)) * h / 100, g = q(j(e.rearLength, 10)) * h / 100, n = e.baseWidth || 3, i = e.topWidth || 1;
- d.shapeType = "path";
- d.shapeArgs = {d: e.path || ["M", -g, -n / 2, "L", f, -n / 2, h, -i / 2, h, i / 2, f, n / 2, -g, n / 2], translateX: c[0], translateY: c[1],
- rotation: (b.startAngleRad + b.translate(d.y)) * 180 / Math.PI};
- d.plotX = c[0];
- d.plotY = c[1]
- })
- }, drawPoints: function () {
- var a = this, b = a.yAxis.center, c = a.pivot, d = a.options, e = d.pivot, h = d.dial;
- o(a.points, function (b) {
- var c = b.graphic, d = b.shapeArgs, e = d.d;
- c ? (c.animate(d), d.d = e) : b.graphic = a.chart.renderer[b.shapeType](d).attr({stroke: h.borderColor || "none", "stroke-width": h.borderWidth || 0, fill: h.backgroundColor || "black"}).add(a.group)
- });
- c ? c.animate({cx: b[0], cy: b[1]}) : a.pivot = a.chart.renderer.circle(b[0], b[1], j(e.radius,
- 5)).attr({"stroke-width": e.borderWidth || 0, stroke: e.borderColor || "silver", fill: e.backgroundColor || "black"}).add(a.group)
- }, animate: function () {
- var a = this;
- o(a.points, function (b) {
- var c = b.graphic;
- c && (c.attr({rotation: a.yAxis.startAngleRad * 180 / Math.PI}), c.animate({rotation: b.shapeArgs.rotation}, a.options.animation))
- });
- a.animate = null
- }, render: function () {
- this.createGroup();
- k.pie.prototype.render.call(this)
- }, setData: k.pie.prototype.setData, drawTracker: k.column.prototype.drawTracker};
- k.gauge = g.extendClass(k.line,
- i);
- i = t.prototype;
- m = k.column.prototype;
- i.toXY = function (a) {
- var b, c = this.chart;
- a.rectPlotX = a.plotX;
- a.rectPlotY = a.plotY;
- b = this.xAxis.postTranslate(a.plotX, this.yAxis.len - a.plotY);
- a.plotX = a.polarPlotX = b.x - c.plotLeft;
- a.plotY = a.polarPlotY = b.y - c.plotTop
- };
- i.translate = function (a) {
- return function () {
- a.apply(this, arguments);
- if (this.xAxis.getPosition && this.type !== "column")for (var b = this.points, c = b.length; c--;)this.toXY(b[c])
- }
- }(i.translate);
- m.translate = function (a) {
- return function () {
- var b = this.xAxis, c = this.yAxis.len,
- d = b.center, e = b.startAngleRad, h = this.chart.renderer, f, g;
- a.apply(this, arguments);
- if (b.isRadial) {
- b = this.points;
- for (g = b.length; g--;)f = b[g], f.shapeType = "path", f.shapeArgs = {d: h.symbols.arc(d[0], d[1], c - f.plotY, null, {start: e + f.barX, end: e + f.barX + f.pointWidth, innerR: c - f.yBottom})}, this.toXY(f)
- }
- }
- }(m.translate)
-})(Highcharts);
diff --git a/src/common/lib/vendor/2amigos/yiiwheels/widgets/highcharts/assets/js/highcharts.js b/src/common/lib/vendor/2amigos/yiiwheels/widgets/highcharts/assets/js/highcharts.js
deleted file mode 100644
index 433eee5..0000000
--- a/src/common/lib/vendor/2amigos/yiiwheels/widgets/highcharts/assets/js/highcharts.js
+++ /dev/null
@@ -1,3273 +0,0 @@
-/*
- Highcharts JS v2.2.5 (2012-06-08)
-
- (c) 2009-2011 Torstein H?nsi
-
- License: www.highcharts.com/license
- */
-(function () {
- function u(a, b) {
- var c;
- a || (a = {});
- for (c in b)a[c] = b[c];
- return a
- }
-
- function la() {
- for (var a = 0, b = arguments, c = b.length, d = {}; a < c; a++)d[b[a++]] = b[a];
- return d
- }
-
- function w(a, b) {
- return parseInt(a, b || 10)
- }
-
- function ra(a) {
- return typeof a === "string"
- }
-
- function aa(a) {
- return typeof a === "object"
- }
-
- function Ja(a) {
- return Object.prototype.toString.call(a) === "[object Array]"
- }
-
- function Ka(a) {
- return typeof a === "number"
- }
-
- function ma(a) {
- return L.log(a) / L.LN10
- }
-
- function ba(a) {
- return L.pow(10, a)
- }
-
- function za(a, b) {
- for (var c =
- a.length; c--;)if (a[c] === b) {
- a.splice(c, 1);
- break
- }
- }
-
- function s(a) {
- return a !== A && a !== null
- }
-
- function z(a, b, c) {
- var d, e;
- if (ra(b))s(c) ? a.setAttribute(b, c) : a && a.getAttribute && (e = a.getAttribute(b)); else if (s(b) && aa(b))for (d in b)a.setAttribute(d, b[d]);
- return e
- }
-
- function na(a) {
- return Ja(a) ? a : [a]
- }
-
- function o() {
- var a = arguments, b, c, d = a.length;
- for (b = 0; b < d; b++)if (c = a[b], typeof c !== "undefined" && c !== null)return c
- }
-
- function F(a, b) {
- if (La && b && b.opacity !== A)b.filter = "alpha(opacity=" + b.opacity * 100 + ")";
- u(a.style, b)
- }
-
- function S(a, b, c, d, e) {
- a = B.createElement(a);
- b && u(a, b);
- e && F(a, {padding: 0, border: U, margin: 0});
- c && F(a, c);
- d && d.appendChild(a);
- return a
- }
-
- function ca(a, b) {
- var c = function () {
- };
- c.prototype = new a;
- u(c.prototype, b);
- return c
- }
-
- function Xa(a, b, c, d) {
- var e = V.lang, f = a;
- b === -1 ? (b = (a || 0).toString(), a = b.indexOf(".") > -1 ? b.split(".")[1].length : 0) : a = isNaN(b = M(b)) ? 2 : b;
- var b = a, c = c === void 0 ? e.decimalPoint : c, d = d === void 0 ? e.thousandsSep : d, e = f < 0 ? "-" : "", a = String(w(f = M(+f || 0).toFixed(b))), g = a.length > 3 ? a.length % 3 : 0;
- return e + (g ? a.substr(0, g) + d : "") +
- a.substr(g).replace(/(\d{3})(?=\d)/g, "$1" + d) + (b ? c + M(f - a).toFixed(b).slice(2) : "")
- }
-
- function sa(a, b) {
- return Array((b || 2) + 1 - String(a).length).join(0) + a
- }
-
- function gb(a, b, c, d) {
- var e, c = o(c, 1);
- e = a / c;
- b || (b = [1, 2, 2.5, 5, 10], d && d.allowDecimals === !1 && (c === 1 ? b = [1, 2, 5, 10] : c <= 0.1 && (b = [1 / c])));
- for (d = 0; d < b.length; d++)if (a = b[d], e <= (b[d] + (b[d + 1] || b[d])) / 2)break;
- a *= c;
- return a
- }
-
- function Ob(a, b) {
- var c = b || [
- [vb, [1, 2, 5, 10, 20, 25, 50, 100, 200, 500]],
- [hb, [1, 2, 5, 10, 15, 30]],
- [Ya, [1, 2, 5, 10, 15, 30]],
- [Ma, [1, 2, 3, 4, 6, 8, 12]],
- [oa, [1, 2]],
- [Za,
- [1, 2]],
- [Na, [1, 2, 3, 4, 6]],
- [ta, null]
- ], d = c[c.length - 1], e = D[d[0]], f = d[1], g;
- for (g = 0; g < c.length; g++)if (d = c[g], e = D[d[0]], f = d[1], c[g + 1] && a <= (e * f[f.length - 1] + D[c[g + 1][0]]) / 2)break;
- e === D[ta] && a < 5 * e && (f = [1, 2, 5]);
- e === D[ta] && a < 5 * e && (f = [1, 2, 5]);
- c = gb(a / e, f);
- return{unitRange: e, count: c, unitName: d[0]}
- }
-
- function Pb(a, b, c, d) {
- var e = [], f = {}, g = V.global.useUTC, h, i = new Date(b), b = a.unitRange, j = a.count;
- b >= D[hb] && (i.setMilliseconds(0), i.setSeconds(b >= D[Ya] ? 0 : j * W(i.getSeconds() / j)));
- if (b >= D[Ya])i[wb](b >= D[Ma] ? 0 : j * W(i[ib]() / j));
- if (b >= D[Ma])i[xb](b >= D[oa] ? 0 : j * W(i[jb]() / j));
- if (b >= D[oa])i[kb](b >= D[Na] ? 1 : j * W(i[Oa]() / j));
- b >= D[Na] && (i[yb](b >= D[ta] ? 0 : j * W(i[$a]() / j)), h = i[ab]());
- b >= D[ta] && (h -= h % j, i[zb](h));
- if (b === D[Za])i[kb](i[Oa]() - i[lb]() + o(d, 1));
- d = 1;
- h = i[ab]();
- for (var k = i.getTime(), l = i[$a](), m = i[Oa](), i = g ? 0 : (864E5 + i.getTimezoneOffset() * 6E4) % 864E5; k < c;)e.push(k), b === D[ta] ? k = bb(h + d * j, 0) : b === D[Na] ? k = bb(h, l + d * j) : !g && (b === D[oa] || b === D[Za]) ? k = bb(h, l, m + d * j * (b === D[oa] ? 1 : 7)) : (k += b * j, b <= D[Ma] && k % D[oa] === i && (f[k] = oa)), d++;
- e.push(k);
- e.info =
- u(a, {higherRanks: f, totalRange: b * j});
- return e
- }
-
- function Ab() {
- this.symbol = this.color = 0
- }
-
- function Qb(a, b) {
- var c = a.length, d, e;
- for (e = 0; e < c; e++)a[e].ss_i = e;
- a.sort(function (a, c) {
- d = b(a, c);
- return d === 0 ? a.ss_i - c.ss_i : d
- });
- for (e = 0; e < c; e++)delete a[e].ss_i
- }
-
- function Pa(a) {
- for (var b = a.length, c = a[0]; b--;)a[b] < c && (c = a[b]);
- return c
- }
-
- function Aa(a) {
- for (var b = a.length, c = a[0]; b--;)a[b] > c && (c = a[b]);
- return c
- }
-
- function Ba(a, b) {
- for (var c in a)a[c] && a[c] !== b && a[c].destroy && a[c].destroy(), delete a[c]
- }
-
- function Qa(a) {
- cb || (cb = S(ia));
- a && cb.appendChild(a);
- cb.innerHTML = ""
- }
-
- function mb(a, b) {
- var c = "Highcharts error #" + a + ": www.highcharts.com/errors/" + a;
- if (b)throw c; else N.console && console.log(c)
- }
-
- function ja(a) {
- return parseFloat(a.toPrecision(14))
- }
-
- function ua(a, b) {
- Ra = o(a, b.animation)
- }
-
- function Bb() {
- var a = V.global.useUTC, b = a ? "getUTC" : "get", c = a ? "setUTC" : "set";
- bb = a ? Date.UTC : function (a, b, c, g, h, i) {
- return(new Date(a, b, o(c, 1), o(g, 0), o(h, 0), o(i, 0))).getTime()
- };
- ib = b + "Minutes";
- jb = b + "Hours";
- lb = b + "Day";
- Oa = b + "Date";
- $a = b + "Month";
- ab = b + "FullYear";
- wb =
- c + "Minutes";
- xb = c + "Hours";
- kb = c + "Date";
- yb = c + "Month";
- zb = c + "FullYear"
- }
-
- function va() {
- }
-
- function Sa(a, b, c) {
- this.axis = a;
- this.pos = b;
- this.type = c || "";
- this.isNew = !0;
- c || this.addLabel()
- }
-
- function nb(a, b) {
- this.axis = a;
- if (b)this.options = b, this.id = b.id;
- return this
- }
-
- function Cb(a, b, c, d, e) {
- var f = a.chart.inverted;
- this.axis = a;
- this.isNegative = c;
- this.options = b;
- this.x = d;
- this.stack = e;
- this.alignOptions = {align: b.align || (f ? c ? "left" : "right" : "center"), verticalAlign: b.verticalAlign || (f ? "middle" : c ? "bottom" : "top"), y: o(b.y, f ? 4 : c ? 14 :
- -6), x: o(b.x, f ? c ? -6 : 6 : 0)};
- this.textAlign = b.textAlign || (f ? c ? "right" : "left" : "center")
- }
-
- function ob() {
- this.init.apply(this, arguments)
- }
-
- function pb(a, b) {
- var c = b.borderWidth, d = b.style, e = b.shared, f = w(d.padding);
- this.chart = a;
- this.options = b;
- d.padding = 0;
- this.crosshairs = [];
- this.currentY = this.currentX = 0;
- this.tooltipIsHidden = !0;
- this.label = a.renderer.label("", 0, 0, null, null, null, b.useHTML, null, "tooltip").attr({padding: f, fill: b.backgroundColor, "stroke-width": c, r: b.borderRadius, zIndex: 8}).css(d).hide().add();
- ga || this.label.shadow(b.shadow);
- this.shared = e
- }
-
- function Db(a, b) {
- var c = ga ? "" : b.chart.zoomType;
- this.zoomX = /x/.test(c);
- this.zoomY = /y/.test(c);
- this.options = b;
- this.chart = a;
- this.init(a, b.tooltip)
- }
-
- function qb(a) {
- this.init(a)
- }
-
- function rb(a, b) {
- var c, d = a.series;
- a.series = null;
- c = C(V, a);
- c.series = a.series = d;
- var d = c.chart, e = d.margin, e = aa(e) ? e : [e, e, e, e];
- this.optionsMarginTop = o(d.marginTop, e[0]);
- this.optionsMarginRight = o(d.marginRight, e[1]);
- this.optionsMarginBottom = o(d.marginBottom, e[2]);
- this.optionsMarginLeft = o(d.marginLeft, e[3]);
- this.runChartClick =
- (e = d.events) && !!e.click;
- this.callback = b;
- this.isResizing = 0;
- this.options = c;
- this.axes = [];
- this.series = [];
- this.hasCartesianSeries = d.showAxes;
- this.init(e)
- }
-
- var A, B = document, N = window, L = Math, t = L.round, W = L.floor, wa = L.ceil, x = L.max, O = L.min, M = L.abs, X = L.cos, da = L.sin, xa = L.PI, Eb = xa * 2 / 360, ya = navigator.userAgent, La = /msie/i.test(ya) && !N.opera, Ca = B.documentMode === 8, Fb = /AppleWebKit/.test(ya), Gb = /Firefox/.test(ya), Da = !!B.createElementNS && !!B.createElementNS("http://www.w3.org/2000/svg", "svg").createSVGRect, Rb = Gb && parseInt(ya.split("Firefox/")[1],
- 10) < 4, ga = !Da && !La && !!B.createElement("canvas").getContext, Ta, ea = B.documentElement.ontouchstart !== A, Hb = {}, sb = 0, cb, V, db, Ra, Ua, D, Sb = function () {
- }, ia = "div", U = "none", tb = "rgba(192,192,192," + (Da ? 1.0E-6 : 0.0020) + ")", vb = "millisecond", hb = "second", Ya = "minute", Ma = "hour", oa = "day", Za = "week", Na = "month", ta = "year", bb, ib, jb, lb, Oa, $a, ab, wb, xb, kb, yb, zb, Y = {};
- N.Highcharts = {};
- db = function (a, b, c) {
- if (!s(b) || isNaN(b))return"Invalid date";
- var a = o(a, "%Y-%m-%d %H:%M:%S"), d = new Date(b), e, f = d[jb](), g = d[lb](), h = d[Oa](), i = d[$a](), j =
- d[ab](), k = V.lang, l = k.weekdays, b = {a: l[g].substr(0, 3), A: l[g], d: sa(h), e: h, b: k.shortMonths[i], B: k.months[i], m: sa(i + 1), y: j.toString().substr(2, 2), Y: j, H: sa(f), I: sa(f % 12 || 12), l: f % 12 || 12, M: sa(d[ib]()), p: f < 12 ? "AM" : "PM", P: f < 12 ? "am" : "pm", S: sa(d.getSeconds()), L: sa(t(b % 1E3), 3)};
- for (e in b)a = a.replace("%" + e, b[e]);
- return c ? a.substr(0, 1).toUpperCase() + a.substr(1) : a
- };
- Ab.prototype = {wrapColor: function (a) {
- if (this.color >= a)this.color = 0
- }, wrapSymbol: function (a) {
- if (this.symbol >= a)this.symbol = 0
- }};
- D = la(vb, 1, hb, 1E3, Ya, 6E4,
- Ma, 36E5, oa, 864E5, Za, 6048E5, Na, 2592E6, ta, 31556952E3);
- Ua = {init: function (a, b, c) {
- var b = b || "", d = a.shift, e = b.indexOf("C") > -1, f = e ? 7 : 3, g, b = b.split(" "), c = [].concat(c), h, i, j = function (a) {
- for (g = a.length; g--;)a[g] === "M" && a.splice(g + 1, 0, a[g + 1], a[g + 2], a[g + 1], a[g + 2])
- };
- e && (j(b), j(c));
- a.isArea && (h = b.splice(b.length - 6, 6), i = c.splice(c.length - 6, 6));
- if (d <= c.length / f)for (; d--;)c = [].concat(c).splice(0, f).concat(c);
- a.shift = 0;
- if (b.length)for (a = c.length; b.length < a;)d = [].concat(b).splice(b.length - f, f), e && (d[f - 6] = d[f - 2], d[f -
- 5] = d[f - 1]), b = b.concat(d);
- h && (b = b.concat(h), c = c.concat(i));
- return[b, c]
- }, step: function (a, b, c, d) {
- var e = [], f = a.length;
- if (c === 1)e = d; else if (f === b.length && c < 1)for (; f--;)d = parseFloat(a[f]), e[f] = isNaN(d) ? a[f] : c * parseFloat(b[f] - d) + d; else e = b;
- return e
- }};
- var T = N.HighchartsAdapter, G = T || {}, Va = G.adapterRun, Ib = G.getScript, n = G.each, ub = G.grep, Jb = G.offset, Ea = G.map, C = G.merge, I = G.addEvent, P = G.removeEvent, E = G.fireEvent, Kb = G.washMouseEvent, eb = G.animate, Fa = G.stop;
- T && T.init && T.init(Ua);
- if (!T && N.jQuery) {
- var Q = jQuery, Ib = Q.getScript,
- Va = function (a, b) {
- return Q(a)[b]()
- }, n = function (a, b) {
- for (var c = 0, d = a.length; c < d; c++)if (b.call(a[c], a[c], c, a) === !1)return c
- }, ub = Q.grep, Ea = function (a, b) {
- for (var c = [], d = 0, e = a.length; d < e; d++)c[d] = b.call(a[d], a[d], d, a);
- return c
- }, C = function () {
- var a = arguments;
- return Q.extend(!0, null, a[0], a[1], a[2], a[3])
- }, Jb = function (a) {
- return Q(a).offset()
- }, I = function (a, b, c) {
- Q(a).bind(b, c)
- }, P = function (a, b, c) {
- var d = B.removeEventListener ? "removeEventListener" : "detachEvent";
- B[d] && !a[d] && (a[d] = function () {
- });
- Q(a).unbind(b, c)
- },
- E = function (a, b, c, d) {
- var e = Q.Event(b), f = "detached" + b, g;
- !La && c && (delete c.layerX, delete c.layerY);
- u(e, c);
- a[b] && (a[f] = a[b], a[b] = null);
- n(["preventDefault", "stopPropagation"], function (a) {
- var b = e[a];
- e[a] = function () {
- try {
- b.call(e)
- } catch (c) {
- a === "preventDefault" && (g = !0)
- }
- }
- });
- Q(a).trigger(e);
- a[f] && (a[b] = a[f], a[f] = null);
- d && !e.isDefaultPrevented() && !g && d(e)
- }, Kb = function (a) {
- return a
- }, eb = function (a, b, c) {
- var d = Q(a);
- if (b.d)a.toD = b.d, b.d = 1;
- d.stop();
- d.animate(b, c)
- }, Fa = function (a) {
- Q(a).stop()
- };
- Q.extend(Q.easing, {easeOutQuad: function (a, b, c, d, e) {
- return-d * (b /= e) * (b - 2) + c
- }});
- var Lb = Q.fx, Mb = Lb.step;
- n(["cur", "_default", "width", "height"], function (a, b) {
- var c = Mb, d, e;
- a === "cur" ? c = Lb.prototype : a === "_default" && Q.Tween && (c = Q.Tween.propHooks[a], a = "set");
- (d = c[a]) && (c[a] = function (c) {
- c = b ? c : this;
- e = c.elem;
- return e.attr ? e.attr(c.prop, a === "cur" ? A : c.now) : d.apply(this, arguments)
- })
- });
- Mb.d = function (a) {
- var b = a.elem;
- if (!a.started) {
- var c = Ua.init(b, b.d, b.toD);
- a.start = c[0];
- a.end = c[1];
- a.started = !0
- }
- b.attr("d", Ua.step(a.start, a.end, a.pos, b.toD))
- }
- }
- G = {enabled: !0,
- align: "center", x: 0, y: 15, style: {color: "#666", fontSize: "11px", lineHeight: "14px"}};
- V = {colors: "#4572A7,#AA4643,#89A54E,#80699B,#3D96AE,#DB843D,#92A8CD,#A47D7C,#B5CA92".split(","), symbols: ["circle", "diamond", "square", "triangle", "triangle-down"], lang: {loading: "Loading...", months: "January,February,March,April,May,June,July,August,September,October,November,December".split(","), shortMonths: "Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec".split(","), weekdays: "Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday".split(","),
- decimalPoint: ".", resetZoom: "Reset zoom", resetZoomTitle: "Reset zoom level 1:1", thousandsSep: ","}, global: {useUTC: !0, canvasToolsURL: "http://code.highcharts.com/2.2.5/modules/canvas-tools.js"}, chart: {borderColor: "#4572A7", borderRadius: 5, defaultSeriesType: "line", ignoreHiddenSeries: !0, spacingTop: 10, spacingRight: 10, spacingBottom: 15, spacingLeft: 10, style: {fontFamily: '"Lucida Grande", "Lucida Sans Unicode", Verdana, Arial, Helvetica, sans-serif', fontSize: "12px"}, backgroundColor: "#FFFFFF", plotBorderColor: "#C0C0C0",
- resetZoomButton: {theme: {zIndex: 20}, position: {align: "right", x: -10, y: 10}}}, title: {text: "Chart title", align: "center", y: 15, style: {color: "#3E576F", fontSize: "16px"}}, subtitle: {text: "", align: "center", y: 30, style: {color: "#6D869F"}}, plotOptions: {line: {allowPointSelect: !1, showCheckbox: !1, animation: {duration: 1E3}, events: {}, lineWidth: 2, shadow: !0, marker: {enabled: !0, lineWidth: 0, radius: 4, lineColor: "#FFFFFF", states: {hover: {}, select: {fillColor: "#FFFFFF", lineColor: "#000000", lineWidth: 2}}}, point: {events: {}}, dataLabels: C(G,
- {enabled: !1, y: -6, formatter: function () {
- return this.y
- }}), cropThreshold: 300, pointRange: 0, showInLegend: !0, states: {hover: {marker: {}}, select: {marker: {}}}, stickyTracking: !0}}, labels: {style: {position: "absolute", color: "#3E576F"}}, legend: {enabled: !0, align: "center", layout: "horizontal", labelFormatter: function () {
- return this.name
- }, borderWidth: 1, borderColor: "#909090", borderRadius: 5, navigation: {activeColor: "#3E576F", inactiveColor: "#CCC"}, shadow: !1, itemStyle: {cursor: "pointer", color: "#3E576F", fontSize: "12px"}, itemHoverStyle: {color: "#000"},
- itemHiddenStyle: {color: "#CCC"}, itemCheckboxStyle: {position: "absolute", width: "13px", height: "13px"}, symbolWidth: 16, symbolPadding: 5, verticalAlign: "bottom", x: 0, y: 0}, loading: {labelStyle: {fontWeight: "bold", position: "relative", top: "1em"}, style: {position: "absolute", backgroundColor: "white", opacity: 0.5, textAlign: "center"}}, tooltip: {enabled: !0, backgroundColor: "rgba(255, 255, 255, .85)", borderWidth: 2, borderRadius: 5, dateTimeLabelFormats: {millisecond: "%A, %b %e, %H:%M:%S.%L", second: "%A, %b %e, %H:%M:%S", minute: "%A, %b %e, %H:%M",
- hour: "%A, %b %e, %H:%M", day: "%A, %b %e, %Y", week: "Week from %A, %b %e, %Y", month: "%B %Y", year: "%Y"}, headerFormat: '{point.key} ', pointFormat: '{series.name} : {point.y} ', shadow: !0, shared: ga, snap: ea ? 25 : 10, style: {color: "#333333", fontSize: "12px", padding: "5px", whiteSpace: "nowrap"}}, credits: {enabled: !0, text: "Highcharts.com", href: "http://www.highcharts.com", position: {align: "right", x: -10, verticalAlign: "bottom", y: -5},
- style: {cursor: "pointer", color: "#909090", fontSize: "10px"}}};
- var Z = V.plotOptions, T = Z.line;
- Bb();
- var pa = function (a) {
- var b = [], c;
- (function (a) {
- (c = /rgba\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]?(?:\.[0-9]+)?)\s*\)/.exec(a)) ? b = [w(c[1]), w(c[2]), w(c[3]), parseFloat(c[4], 10)] : (c = /#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(a)) && (b = [w(c[1], 16), w(c[2], 16), w(c[3], 16), 1])
- })(a);
- return{get: function (c) {
- return b && !isNaN(b[0]) ? c === "rgb" ? "rgb(" + b[0] + "," + b[1] + "," + b[2] + ")" : c === "a" ? b[3] :
- "rgba(" + b.join(",") + ")" : a
- }, brighten: function (a) {
- if (Ka(a) && a !== 0) {
- var c;
- for (c = 0; c < 3; c++)b[c] += w(a * 255), b[c] < 0 && (b[c] = 0), b[c] > 255 && (b[c] = 255)
- }
- return this
- }, setOpacity: function (a) {
- b[3] = a;
- return this
- }}
- };
- va.prototype = {init: function (a, b) {
- this.element = b === "span" ? S(b) : B.createElementNS("http://www.w3.org/2000/svg", b);
- this.renderer = a;
- this.attrSetters = {}
- }, animate: function (a, b, c) {
- b = o(b, Ra, !0);
- Fa(this);
- if (b) {
- b = C(b);
- if (c)b.complete = c;
- eb(this, a, b)
- } else this.attr(a), c && c()
- }, attr: function (a, b) {
- var c, d, e, f, g = this.element,
- h = g.nodeName, i = this.renderer, j, k = this.attrSetters, l = this.shadows, m, p, q = this;
- ra(a) && s(b) && (c = a, a = {}, a[c] = b);
- if (ra(a))c = a, h === "circle" ? c = {x: "cx", y: "cy"}[c] || c : c === "strokeWidth" && (c = "stroke-width"), q = z(g, c) || this[c] || 0, c !== "d" && c !== "visibility" && (q = parseFloat(q)); else for (c in a)if (j = !1, d = a[c], e = k[c] && k[c](d, c), e !== !1) {
- e !== A && (d = e);
- if (c === "d")d && d.join && (d = d.join(" ")), /(NaN| {2}|^$)/.test(d) && (d = "M 0 0"); else if (c === "x" && h === "text") {
- for (e = 0; e < g.childNodes.length; e++)f = g.childNodes[e], z(f, "x") === z(g,
- "x") && z(f, "x", d);
- this.rotation && z(g, "transform", "rotate(" + this.rotation + " " + d + " " + w(a.y || z(g, "y")) + ")")
- } else if (c === "fill")d = i.color(d, g, c); else if (h === "circle" && (c === "x" || c === "y"))c = {x: "cx", y: "cy"}[c] || c; else if (h === "rect" && c === "r")z(g, {rx: d, ry: d}), j = !0; else if (c === "translateX" || c === "translateY" || c === "rotation" || c === "verticalAlign")j = p = !0; else if (c === "stroke")d = i.color(d, g, c); else if (c === "dashstyle")if (c = "stroke-dasharray", d = d && d.toLowerCase(), d === "solid")d = U; else {
- if (d) {
- d = d.replace("shortdashdotdot",
- "3,1,1,1,1,1,").replace("shortdashdot", "3,1,1,1").replace("shortdot", "1,1,").replace("shortdash", "3,1,").replace("longdash", "8,3,").replace(/dot/g, "1,3,").replace("dash", "4,3,").replace(/,$/, "").split(",");
- for (e = d.length; e--;)d[e] = w(d[e]) * a["stroke-width"];
- d = d.join(",")
- }
- } else if (c === "isTracker")this[c] = d; else if (c === "width")d = w(d); else if (c === "align")c = "text-anchor", d = {left: "start", center: "middle", right: "end"}[d]; else if (c === "title")e = g.getElementsByTagName("title")[0], e || (e = B.createElementNS("http://www.w3.org/2000/svg",
- "title"), g.appendChild(e)), e.textContent = d;
- c === "strokeWidth" && (c = "stroke-width");
- Fb && c === "stroke-width" && d === 0 && (d = 1.0E-6);
- this.symbolName && /^(x|y|width|height|r|start|end|innerR|anchorX|anchorY)/.test(c) && (m || (this.symbolAttr(a), m = !0), j = !0);
- if (l && /^(width|height|visibility|x|y|d|transform)$/.test(c))for (e = l.length; e--;)z(l[e], c, c === "height" ? x(d - (l[e].cutHeight || 0), 0) : d);
- if ((c === "width" || c === "height") && h === "rect" && d < 0)d = 0;
- this[c] = d;
- p && this.updateTransform();
- c === "text" ? (this.textStr = d, this.added &&
- i.buildText(this)) : j || z(g, c, d)
- }
- if (Fb && /Chrome\/(18|19)/.test(ya) && h === "text" && (a.x !== A || a.y !== A))c = g.parentNode, d = g.nextSibling, c && (c.removeChild(g), d ? c.insertBefore(g, d) : c.appendChild(g));
- return q
- }, symbolAttr: function (a) {
- var b = this;
- n("x,y,r,start,end,width,height,innerR,anchorX,anchorY".split(","), function (c) {
- b[c] = o(a[c], b[c])
- });
- b.attr({d: b.renderer.symbols[b.symbolName](b.x, b.y, b.width, b.height, b)})
- }, clip: function (a) {
- return this.attr("clip-path", "url(" + this.renderer.url + "#" + a.id + ")")
- }, crisp: function (a, b, c, d, e) {
- var f, g = {}, h = {}, i, a = a || this.strokeWidth || this.attr && this.attr("stroke-width") || 0;
- i = t(a) % 2 / 2;
- h.x = W(b || this.x || 0) + i;
- h.y = W(c || this.y || 0) + i;
- h.width = W((d || this.width || 0) - 2 * i);
- h.height = W((e || this.height || 0) - 2 * i);
- h.strokeWidth = a;
- for (f in h)this[f] !== h[f] && (this[f] = g[f] = h[f]);
- return g
- }, css: function (a) {
- var b = this.element, b = a && a.width && b.nodeName === "text", c, d = "", e = function (a, b) {
- return"-" + b.toLowerCase()
- };
- if (a && a.color)a.fill = a.color;
- this.styles = a = u(this.styles, a);
- if (La && !Da)b && delete a.width, F(this.element,
- a); else {
- for (c in a)d += c.replace(/([A-Z])/g, e) + ":" + a[c] + ";";
- this.attr({style: d})
- }
- b && this.added && this.renderer.buildText(this);
- return this
- }, on: function (a, b) {
- var c = b;
- ea && a === "click" && (a = "touchstart", c = function (a) {
- a.preventDefault();
- b()
- });
- this.element["on" + a] = c;
- return this
- }, setRadialReference: function (a) {
- this.element.radialReference = a;
- return this
- }, translate: function (a, b) {
- return this.attr({translateX: a, translateY: b})
- }, invert: function () {
- this.inverted = !0;
- this.updateTransform();
- return this
- }, htmlCss: function (a) {
- var b =
- this.element;
- if (b = a && b.tagName === "SPAN" && a.width)delete a.width, this.textWidth = b, this.updateTransform();
- this.styles = u(this.styles, a);
- F(this.element, a);
- return this
- }, htmlGetBBox: function (a) {
- var b = this.element, c = this.bBox;
- if (!c || a) {
- if (b.nodeName === "text")b.style.position = "absolute";
- c = this.bBox = {x: b.offsetLeft, y: b.offsetTop, width: b.offsetWidth, height: b.offsetHeight}
- }
- return c
- }, htmlUpdateTransform: function () {
- if (this.added) {
- var a = this.renderer, b = this.element, c = this.translateX || 0, d = this.translateY || 0, e = this.x ||
- 0, f = this.y || 0, g = this.textAlign || "left", h = {left: 0, center: 0.5, right: 1}[g], i = g && g !== "left", j = this.shadows;
- if (c || d)F(b, {marginLeft: c, marginTop: d}), j && n(j, function (a) {
- F(a, {marginLeft: c + 1, marginTop: d + 1})
- });
- this.inverted && n(b.childNodes, function (c) {
- a.invertChild(c, b)
- });
- if (b.tagName === "SPAN") {
- var k, l, j = this.rotation, m;
- k = 0;
- var p = 1, q = 0, fa;
- m = w(this.textWidth);
- var r = this.xCorr || 0, y = this.yCorr || 0, $ = [j, g, b.innerHTML, this.textWidth].join(",");
- if ($ !== this.cTT)s(j) && (k = j * Eb, p = X(k), q = da(k), F(b, {filter: j ? ["progid:DXImageTransform.Microsoft.Matrix(M11=",
- p, ", M12=", -q, ", M21=", q, ", M22=", p, ", sizingMethod='auto expand')"].join("") : U})), k = o(this.elemWidth, b.offsetWidth), l = o(this.elemHeight, b.offsetHeight), k > m && /[ \-]/.test(b.innerText) && (F(b, {width: m + "px", display: "block", whiteSpace: "normal"}), k = m), m = a.fontMetrics(b.style.fontSize).b, r = p < 0 && -k, y = q < 0 && -l, fa = p * q < 0, r += q * m * (fa ? 1 - h : h), y -= p * m * (j ? fa ? h : 1 - h : 1), i && (r -= k * h * (p < 0 ? -1 : 1), j && (y -= l * h * (q < 0 ? -1 : 1)), F(b, {textAlign: g})), this.xCorr = r, this.yCorr = y;
- F(b, {left: e + r + "px", top: f + y + "px"});
- this.cTT = $
- }
- } else this.alignOnAdd = !0
- }, updateTransform: function () {
- var a = this.translateX || 0, b = this.translateY || 0, c = this.inverted, d = this.rotation, e = [];
- c && (a += this.attr("width"), b += this.attr("height"));
- (a || b) && e.push("translate(" + a + "," + b + ")");
- c ? e.push("rotate(90) scale(-1,1)") : d && e.push("rotate(" + d + " " + (this.x || 0) + " " + (this.y || 0) + ")");
- e.length && z(this.element, "transform", e.join(" "))
- }, toFront: function () {
- var a = this.element;
- a.parentNode.appendChild(a);
- return this
- }, align: function (a, b, c) {
- a ? (this.alignOptions = a, this.alignByTranslate = b, c ||
- this.renderer.alignedObjects.push(this)) : (a = this.alignOptions, b = this.alignByTranslate);
- var c = o(c, this.renderer), d = a.align, e = a.verticalAlign, f = (c.x || 0) + (a.x || 0), g = (c.y || 0) + (a.y || 0), h = {};
- /^(right|center)$/.test(d) && (f += (c.width - (a.width || 0)) / {right: 1, center: 2}[d]);
- h[b ? "translateX" : "x"] = t(f);
- /^(bottom|middle)$/.test(e) && (g += (c.height - (a.height || 0)) / ({bottom: 1, middle: 2}[e] || 1));
- h[b ? "translateY" : "y"] = t(g);
- this[this.placed ? "animate" : "attr"](h);
- this.placed = !0;
- this.alignAttr = h;
- return this
- }, getBBox: function (a) {
- var b,
- c, d = this.rotation;
- c = this.element;
- var e = d * Eb;
- if (c.namespaceURI === "http://www.w3.org/2000/svg" || this.renderer.forExport) {
- try {
- b = c.getBBox ? u({}, c.getBBox()) : {width: c.offsetWidth, height: c.offsetHeight}
- } catch (f) {
- }
- if (!b || b.width < 0)b = {width: 0, height: 0};
- a = b.width;
- c = b.height;
- if (d)b.width = M(c * da(e)) + M(a * X(e)), b.height = M(c * X(e)) + M(a * da(e))
- } else b = this.htmlGetBBox(a);
- return b
- }, show: function () {
- return this.attr({visibility: "visible"})
- }, hide: function () {
- return this.attr({visibility: "hidden"})
- }, add: function (a) {
- var b =
- this.renderer, c = a || b, d = c.element || b.box, e = d.childNodes, f = this.element, g = z(f, "zIndex"), h;
- this.parentInverted = a && a.inverted;
- this.textStr !== void 0 && b.buildText(this);
- if (g)c.handleZ = !0, g = w(g);
- if (c.handleZ)for (c = 0; c < e.length; c++)if (a = e[c], b = z(a, "zIndex"), a !== f && (w(b) > g || !s(g) && s(b))) {
- d.insertBefore(f, a);
- h = !0;
- break
- }
- h || d.appendChild(f);
- this.added = !0;
- E(this, "add");
- return this
- }, safeRemoveChild: function (a) {
- var b = a.parentNode;
- b && b.removeChild(a)
- }, destroy: function () {
- var a = this, b = a.element || {}, c = a.shadows, d = a.box,
- e, f;
- b.onclick = b.onmouseout = b.onmouseover = b.onmousemove = null;
- Fa(a);
- if (a.clipPath)a.clipPath = a.clipPath.destroy();
- if (a.stops) {
- for (f = 0; f < a.stops.length; f++)a.stops[f] = a.stops[f].destroy();
- a.stops = null
- }
- a.safeRemoveChild(b);
- c && n(c, function (b) {
- a.safeRemoveChild(b)
- });
- d && d.destroy();
- za(a.renderer.alignedObjects, a);
- for (e in a)delete a[e];
- return null
- }, empty: function () {
- for (var a = this.element, b = a.childNodes, c = b.length; c--;)a.removeChild(b[c])
- }, shadow: function (a, b, c) {
- var d = [], e, f = this.element, g, h = this.parentInverted ?
- "(-1,-1)" : "(1,1)";
- if (a) {
- for (a = 1; a <= 3; a++) {
- e = f.cloneNode(0);
- g = 7 - 2 * a;
- z(e, {isShadow: "true", stroke: "rgb(0, 0, 0)", "stroke-opacity": 0.05 * a, "stroke-width": g, transform: "translate" + h, fill: U});
- if (c)z(e, "height", x(z(e, "height") - g, 0)), e.cutHeight = g;
- b ? b.element.appendChild(e) : f.parentNode.insertBefore(e, f);
- d.push(e)
- }
- this.shadows = d
- }
- return this
- }};
- var qa = function () {
- this.init.apply(this, arguments)
- };
- qa.prototype = {Element: va, init: function (a, b, c, d) {
- var e = location, f;
- f = this.createElement("svg").attr({xmlns: "http://www.w3.org/2000/svg",
- version: "1.1"});
- a.appendChild(f.element);
- this.isSVG = !0;
- this.box = f.element;
- this.boxWrapper = f;
- this.alignedObjects = [];
- this.url = La ? "" : e.href.replace(/#.*?$/, "").replace(/([\('\)])/g, "\\$1");
- this.defs = this.createElement("defs").add();
- this.forExport = d;
- this.gradients = {};
- this.setSize(b, c, !1);
- var g;
- if (Gb && a.getBoundingClientRect)this.subPixelFix = b = function () {
- F(a, {left: 0, top: 0});
- g = a.getBoundingClientRect();
- F(a, {left: wa(g.left) - g.left + "px", top: wa(g.top) - g.top + "px"})
- }, b(), I(N, "resize", b)
- }, isHidden: function () {
- return!this.boxWrapper.getBBox().width
- },
- destroy: function () {
- var a = this.defs;
- this.box = null;
- this.boxWrapper = this.boxWrapper.destroy();
- Ba(this.gradients || {});
- this.gradients = null;
- if (a)this.defs = a.destroy();
- this.subPixelFix && P(N, "resize", this.subPixelFix);
- return this.alignedObjects = null
- }, createElement: function (a) {
- var b = new this.Element;
- b.init(this, a);
- return b
- }, draw: function () {
- }, buildText: function (a) {
- for (var b = a.element, c = o(a.textStr, "").toString().replace(/<(b|strong)>/g, '').replace(/<(i|em)>/g, '').replace(//g, " ").split(//g), d = b.childNodes, e = /style="([^"]+)"/, f = /href="([^"]+)"/, g = z(b, "x"), h = a.styles, i = h && w(h.width), j = h && h.lineHeight, k, h = d.length, l = []; h--;)b.removeChild(d[h]);
- i && !a.added && this.box.appendChild(b);
- c[c.length - 1] === "" && c.pop();
- n(c, function (c, d) {
- var h, fa = 0, r, c = c.replace(//g, " |||");
- h = c.split("|||");
- n(h, function (c) {
- if (c !== "" || h.length === 1) {
- var m = {}, n = B.createElementNS("http://www.w3.org/2000/svg",
- "tspan");
- e.test(c) && z(n, "style", c.match(e)[1].replace(/(;| |^)color([ :])/, "$1fill$2"));
- f.test(c) && (z(n, "onclick", 'location.href="' + c.match(f)[1] + '"'), F(n, {cursor: "pointer"}));
- c = (c.replace(/<(.|\n)*?>/g, "") || " ").replace(/</g, "<").replace(/>/g, ">");
- n.appendChild(B.createTextNode(c));
- fa ? m.dx = 3 : m.x = g;
- if (!fa) {
- if (d) {
- !Da && a.renderer.forExport && F(n, {display: "block"});
- r = N.getComputedStyle && w(N.getComputedStyle(k, null).getPropertyValue("line-height"));
- if (!r || isNaN(r)) {
- var o;
- if (!(o = j))if (!(o = k.offsetHeight))l[d] =
- b.getBBox().height, o = t(l[d] - (l[d - 1] || 0)) || 18;
- r = o
- }
- z(n, "dy", r)
- }
- k = n
- }
- z(n, m);
- b.appendChild(n);
- fa++;
- if (i)for (var c = c.replace(/-/g, "- ").split(" "), H = []; c.length || H.length;)o = a.getBBox().width, m = o > i, !m || c.length === 1 ? (c = H, H = [], c.length && (n = B.createElementNS("http://www.w3.org/2000/svg", "tspan"), z(n, {dy: j || 16, x: g}), b.appendChild(n), o > i && (i = o))) : (n.removeChild(n.firstChild), H.unshift(c.pop())), c.length && n.appendChild(B.createTextNode(c.join(" ").replace(/- /g, "-")))
- }
- })
- })
- }, button: function (a, b, c, d, e, f, g) {
- var h =
- this.label(a, b, c), i = 0, j, k, l, m, p, a = {x1: 0, y1: 0, x2: 0, y2: 1}, e = C(la("stroke-width", 1, "stroke", "#999", "fill", la("linearGradient", a, "stops", [
- [0, "#FFF"],
- [1, "#DDD"]
- ]), "r", 3, "padding", 3, "style", la("color", "black")), e);
- l = e.style;
- delete e.style;
- f = C(e, la("stroke", "#68A", "fill", la("linearGradient", a, "stops", [
- [0, "#FFF"],
- [1, "#ACF"]
- ])), f);
- m = f.style;
- delete f.style;
- g = C(e, la("stroke", "#68A", "fill", la("linearGradient", a, "stops", [
- [0, "#9BD"],
- [1, "#CDF"]
- ])), g);
- p = g.style;
- delete g.style;
- I(h.element, "mouseenter", function () {
- h.attr(f).css(m)
- });
- I(h.element, "mouseleave", function () {
- j = [e, f, g][i];
- k = [l, m, p][i];
- h.attr(j).css(k)
- });
- h.setState = function (a) {
- (i = a) ? a === 2 && h.attr(g).css(p) : h.attr(e).css(l)
- };
- return h.on("click",function () {
- d.call(h)
- }).attr(e).css(u({cursor: "default"}, l))
- }, crispLine: function (a, b) {
- a[1] === a[4] && (a[1] = a[4] = t(a[1]) + b % 2 / 2);
- a[2] === a[5] && (a[2] = a[5] = t(a[2]) + b % 2 / 2);
- return a
- }, path: function (a) {
- var b = {fill: U};
- Ja(a) ? b.d = a : aa(a) && u(b, a);
- return this.createElement("path").attr(b)
- }, circle: function (a, b, c) {
- a = aa(a) ? a : {x: a, y: b, r: c};
- return this.createElement("circle").attr(a)
- },
- arc: function (a, b, c, d, e, f) {
- if (aa(a))b = a.y, c = a.r, d = a.innerR, e = a.start, f = a.end, a = a.x;
- return this.symbol("arc", a || 0, b || 0, c || 0, c || 0, {innerR: d || 0, start: e || 0, end: f || 0})
- }, rect: function (a, b, c, d, e, f) {
- e = aa(a) ? a.r : e;
- e = this.createElement("rect").attr({rx: e, ry: e, fill: U});
- return e.attr(aa(a) ? a : e.crisp(f, a, b, x(c, 0), x(d, 0)))
- }, setSize: function (a, b, c) {
- var d = this.alignedObjects, e = d.length;
- this.width = a;
- this.height = b;
- for (this.boxWrapper[o(c, !0) ? "animate" : "attr"]({width: a, height: b}); e--;)d[e].align()
- }, g: function (a) {
- var b =
- this.createElement("g");
- return s(a) ? b.attr({"class": "highcharts-" + a}) : b
- }, image: function (a, b, c, d, e) {
- var f = {preserveAspectRatio: U};
- arguments.length > 1 && u(f, {x: b, y: c, width: d, height: e});
- f = this.createElement("image").attr(f);
- f.element.setAttributeNS ? f.element.setAttributeNS("http://www.w3.org/1999/xlink", "href", a) : f.element.setAttribute("hc-svg-href", a);
- return f
- }, symbol: function (a, b, c, d, e, f) {
- var g, h = this.symbols[a], h = h && h(t(b), t(c), d, e, f), i = /^url\((.*?)\)$/, j, k;
- h ? (g = this.path(h), u(g, {symbolName: a, x: b, y: c,
- width: d, height: e}), f && u(g, f)) : i.test(a) && (k = function (a, b) {
- a.attr({width: b[0], height: b[1]});
- a.alignByTranslate || a.translate(-t(b[0] / 2), -t(b[1] / 2))
- }, j = a.match(i)[1], a = Hb[j], g = this.image(j).attr({x: b, y: c}), a ? k(g, a) : (g.attr({width: 0, height: 0}), S("img", {onload: function () {
- k(g, Hb[j] = [this.width, this.height])
- }, src: j})));
- return g
- }, symbols: {circle: function (a, b, c, d) {
- var e = 0.166 * c;
- return["M", a + c / 2, b, "C", a + c + e, b, a + c + e, b + d, a + c / 2, b + d, "C", a - e, b + d, a - e, b, a + c / 2, b, "Z"]
- }, square: function (a, b, c, d) {
- return["M", a, b, "L", a +
- c, b, a + c, b + d, a, b + d, "Z"]
- }, triangle: function (a, b, c, d) {
- return["M", a + c / 2, b, "L", a + c, b + d, a, b + d, "Z"]
- }, "triangle-down": function (a, b, c, d) {
- return["M", a, b, "L", a + c, b, a + c / 2, b + d, "Z"]
- }, diamond: function (a, b, c, d) {
- return["M", a + c / 2, b, "L", a + c, b + d / 2, a + c / 2, b + d, a, b + d / 2, "Z"]
- }, arc: function (a, b, c, d, e) {
- var f = e.start, c = e.r || c || d, g = e.end - 1.0E-6, d = e.innerR, h = e.open, i = X(f), j = da(f), k = X(g), g = da(g), e = e.end - f < xa ? 0 : 1;
- return["M", a + c * i, b + c * j, "A", c, c, 0, e, 1, a + c * k, b + c * g, h ? "M" : "L", a + d * k, b + d * g, "A", d, d, 0, e, 0, a + d * i, b + d * j, h ? "" : "Z"]
- }}, clipRect: function (a, b, c, d) {
- var e = "highcharts-" + sb++, f = this.createElement("clipPath").attr({id: e}).add(this.defs), a = this.rect(a, b, c, d, 0).add(f);
- a.id = e;
- a.clipPath = f;
- return a
- }, color: function (a, b, c) {
- var d = this, e, f = /^rgba/, g;
- a && a.linearGradient ? g = "linearGradient" : a && a.radialGradient && (g = "radialGradient");
- if (g) {
- var c = a[g], h = d.gradients, i, j, k, b = b.radialReference;
- if (!c.id || !h[c.id])Ja(c) && (a[g] = c = {x1: c[0], y1: c[1], x2: c[2], y2: c[3], gradientUnits: "userSpaceOnUse"}), g === "radialGradient" && b && !s(c.gradientUnits) && u(c, {cx: b[0] - b[2] /
- 2 + c.cx * b[2], cy: b[1] - b[2] / 2 + c.cy * b[2], r: c.r * b[2], gradientUnits: "userSpaceOnUse"}), c.id = "highcharts-" + sb++, h[c.id] = i = d.createElement(g).attr(c).add(d.defs), i.stops = [], n(a.stops, function (a) {
- f.test(a[1]) ? (e = pa(a[1]), j = e.get("rgb"), k = e.get("a")) : (j = a[1], k = 1);
- a = d.createElement("stop").attr({offset: a[0], "stop-color": j, "stop-opacity": k}).add(i);
- i.stops.push(a)
- });
- return"url(" + d.url + "#" + c.id + ")"
- } else return f.test(a) ? (e = pa(a), z(b, c + "-opacity", e.get("a")), e.get("rgb")) : (b.removeAttribute(c + "-opacity"), a)
- }, text: function (a, b, c, d) {
- var e = V.chart.style;
- if (d && !this.forExport)return this.html(a, b, c);
- b = t(o(b, 0));
- c = t(o(c, 0));
- a = this.createElement("text").attr({x: b, y: c, text: a}).css({fontFamily: e.fontFamily, fontSize: e.fontSize});
- a.x = b;
- a.y = c;
- return a
- }, html: function (a, b, c) {
- var d = V.chart.style, e = this.createElement("span"), f = e.attrSetters, g = e.element, h = e.renderer;
- f.text = function (a) {
- g.innerHTML = a;
- return!1
- };
- f.x = f.y = f.align = function (a, b) {
- b === "align" && (b = "textAlign");
- e[b] = a;
- e.htmlUpdateTransform();
- return!1
- };
- e.attr({text: a, x: t(b), y: t(c)}).css({position: "absolute",
- whiteSpace: "nowrap", fontFamily: d.fontFamily, fontSize: d.fontSize});
- e.css = e.htmlCss;
- if (h.isSVG)e.add = function (a) {
- var b, c, d = h.box.parentNode;
- if (a) {
- if (b = a.div, !b)b = a.div = S(ia, {className: z(a.element, "class")}, {position: "absolute", left: a.attr("translateX") + "px", top: a.attr("translateY") + "px"}, d), c = b.style, u(a.attrSetters, {translateX: function (a) {
- c.left = a + "px"
- }, translateY: function (a) {
- c.top = a + "px"
- }, visibility: function (a, b) {
- c[b] = a
- }})
- } else b = d;
- b.appendChild(g);
- e.added = !0;
- e.alignOnAdd && e.htmlUpdateTransform();
- return e
- };
- return e
- }, fontMetrics: function (a) {
- var a = w(a || 11), a = a < 24 ? a + 4 : t(a * 1.2), b = t(a * 0.8);
- return{h: a, b: b}
- }, label: function (a, b, c, d, e, f, g, h, i) {
- function j() {
- var a = p.styles, a = a && a.textAlign, b = $ * (1 - y), c;
- c = h ? 0 : Ha;
- if (s(Ga) && (a === "center" || a === "right"))b += {center: 0.5, right: 1}[a] * (Ga - r.width);
- (b !== q.x || c !== q.y) && q.attr({x: b, y: c});
- q.x = b;
- q.y = c
- }
-
- function k(a, b) {
- o ? o.attr(a, b) : x[a] = b
- }
-
- function l() {
- p.attr({text: a, x: b, y: c});
- s(e) && p.attr({anchorX: e, anchorY: f})
- }
-
- var m = this, p = m.g(i), q = m.text("", 0, 0, g).attr({zIndex: 1}).add(p),
- o, r, y = 0, $ = 3, Ga, v, H, J, K = 0, x = {}, Ha, g = p.attrSetters;
- I(p, "add", l);
- g.width = function (a) {
- Ga = a;
- return!1
- };
- g.height = function (a) {
- v = a;
- return!1
- };
- g.padding = function (a) {
- s(a) && a !== $ && ($ = a, j());
- return!1
- };
- g.align = function (a) {
- y = {left: 0, center: 0.5, right: 1}[a];
- return!1
- };
- g.text = function (a, b) {
- q.attr(b, a);
- var c;
- c = q.element.style;
- r = (Ga === void 0 || v === void 0 || p.styles.textAlign) && q.getBBox(!0);
- p.width = (Ga || r.width || 0) + 2 * $;
- p.height = (v || r.height || 0) + 2 * $;
- Ha = $ + m.fontMetrics(c && c.fontSize).b;
- if (!o)c = h ? -Ha : 0, p.box = o = d ? m.symbol(d,
- -y * $, c, p.width, p.height) : m.rect(-y * $, c, p.width, p.height, 0, x["stroke-width"]), o.add(p);
- o.attr(C({width: p.width, height: p.height}, x));
- x = null;
- j();
- return!1
- };
- g["stroke-width"] = function (a, b) {
- K = a % 2 / 2;
- k(b, a);
- return!1
- };
- g.stroke = g.fill = g.r = function (a, b) {
- k(b, a);
- return!1
- };
- g.anchorX = function (a, b) {
- e = a;
- k(b, a + K - H);
- return!1
- };
- g.anchorY = function (a, b) {
- f = a;
- k(b, a - J);
- return!1
- };
- g.x = function (a) {
- p.x = a;
- a -= y * ((Ga || r.width) + $);
- H = t(a);
- p.attr("translateX", H);
- return!1
- };
- g.y = function (a) {
- J = p.y = t(a);
- p.attr("translateY", a);
- return!1
- };
- var w = p.css;
- return u(p, {css: function (a) {
- if (a) {
- var b = {}, a = C({}, a);
- n("fontSize,fontWeight,fontFamily,color,lineHeight,width".split(","), function (c) {
- a[c] !== A && (b[c] = a[c], delete a[c])
- });
- q.css(b)
- }
- return w.call(p, a)
- }, getBBox: function () {
- return o.getBBox()
- }, shadow: function (a) {
- o.shadow(a);
- return p
- }, destroy: function () {
- P(p, "add", l);
- P(p.element, "mouseenter");
- P(p.element, "mouseleave");
- q && (q = q.destroy());
- va.prototype.destroy.call(p)
- }})
- }};
- Ta = qa;
- var ka;
- if (!Da && !ga) {
- ka = {init: function (a, b) {
- var c = ["<", b, ' filled="f" stroked="f"'],
- d = ["position: ", "absolute", ";"];
- (b === "shape" || b === ia) && d.push("left:0;top:0;width:1px;height:1px;");
- Ca && d.push("visibility: ", b === ia ? "hidden" : "visible");
- c.push(' style="', d.join(""), '"/>');
- if (b)c = b === ia || b === "span" || b === "img" ? c.join("") : a.prepVML(c), this.element = S(c);
- this.renderer = a;
- this.attrSetters = {}
- }, add: function (a) {
- var b = this.renderer, c = this.element, d = b.box, d = a ? a.element || a : d;
- a && a.inverted && b.invertChild(c, d);
- Ca && d.gVis === "hidden" && F(c, {visibility: "hidden"});
- d.appendChild(c);
- this.added = !0;
- this.alignOnAdd && !this.deferUpdateTransform && this.updateTransform();
- E(this, "add");
- return this
- }, toggleChildren: function (a, b) {
- for (var c = a.childNodes, d = c.length; d--;)F(c[d], {visibility: b}), c[d].nodeName === "DIV" && this.toggleChildren(c[d], b)
- }, updateTransform: va.prototype.htmlUpdateTransform, attr: function (a, b) {
- var c, d, e, f = this.element || {}, g = f.style, h = f.nodeName, i = this.renderer, j = this.symbolName, k, l = this.shadows, m, p = this.attrSetters, q = this;
- ra(a) && s(b) && (c = a, a = {}, a[c] = b);
- if (ra(a))c = a, q = c === "strokeWidth" || c === "stroke-width" ?
- this.strokeweight : this[c]; else for (c in a)if (d = a[c], m = !1, e = p[c] && p[c](d, c), e !== !1 && d !== null) {
- e !== A && (d = e);
- if (j && /^(x|y|r|start|end|width|height|innerR|anchorX|anchorY)/.test(c))k || (this.symbolAttr(a), k = !0), m = !0; else if (c === "d") {
- d = d || [];
- this.d = d.join(" ");
- e = d.length;
- for (m = []; e--;)m[e] = Ka(d[e]) ? t(d[e] * 10) - 5 : d[e] === "Z" ? "x" : d[e];
- d = m.join(" ") || "x";
- f.path = d;
- if (l)for (e = l.length; e--;)l[e].path = l[e].cutOff ? this.cutOffPath(d, l[e].cutOff) : d;
- m = !0
- } else if (c === "zIndex" || c === "visibility") {
- if (Ca && c === "visibility" &&
- h === "DIV")f.gVis = d, this.toggleChildren(f, d), d === "visible" && (d = null);
- d && (g[c] = d);
- m = !0
- } else if (c === "width" || c === "height")d = x(0, d), this[c] = d, this.updateClipping ? (this[c] = d, this.updateClipping()) : g[c] = d, m = !0; else if (c === "x" || c === "y")this[c] = d, g[{x: "left", y: "top"}[c]] = d; else if (c === "class")f.className = d; else if (c === "stroke")d = i.color(d, f, c), c = "strokecolor"; else if (c === "stroke-width" || c === "strokeWidth")f.stroked = d ? !0 : !1, c = "strokeweight", this[c] = d, Ka(d) && (d += "px"); else if (c === "dashstyle")(f.getElementsByTagName("stroke")[0] ||
- S(i.prepVML([" "]), null, null, f))[c] = d || "solid", this.dashstyle = d, m = !0; else if (c === "fill")h === "SPAN" ? g.color = d : (f.filled = d !== U ? !0 : !1, d = i.color(d, f, c), c = "fillcolor"); else if (h === "shape" && c === "rotation")this[c] = d; else if (c === "translateX" || c === "translateY" || c === "rotation")this[c] = d, this.updateTransform(), m = !0; else if (c === "text")this.bBox = null, f.innerHTML = d, m = !0;
- if (l && c === "visibility")for (e = l.length; e--;)l[e].style[c] = d;
- m || (Ca ? f[c] = d : z(f, c, d))
- }
- return q
- }, clip: function (a) {
- var b = this, c = a.members, d =
- b.element, e = d.parentNode;
- c.push(b);
- b.destroyClip = function () {
- za(c, b)
- };
- e && e.className === "highcharts-tracker" && !Ca && F(d, {visibility: "hidden"});
- return b.css(a.getCSS(b))
- }, css: va.prototype.htmlCss, safeRemoveChild: function (a) {
- a.parentNode && Qa(a)
- }, destroy: function () {
- this.destroyClip && this.destroyClip();
- return va.prototype.destroy.apply(this)
- }, empty: function () {
- for (var a = this.element.childNodes, b = a.length, c; b--;)c = a[b], c.parentNode.removeChild(c)
- }, on: function (a, b) {
- this.element["on" + a] = function () {
- var a = N.event;
- a.target = a.srcElement;
- b(a)
- };
- return this
- }, cutOffPath: function (a, b) {
- var c, a = a.split(/[ ,]/);
- c = a.length;
- if (c === 9 || c === 11)a[c - 4] = a[c - 2] = w(a[c - 2]) - 10 * b;
- return a.join(" ")
- }, shadow: function (a, b, c) {
- var d = [], e = this.element, f = this.renderer, g, h = e.style, i, j = e.path, k, l;
- j && typeof j.value !== "string" && (j = "x");
- l = j;
- if (a) {
- for (a = 1; a <= 3; a++) {
- k = 7 - 2 * a;
- c && (l = this.cutOffPath(j.value, k + 0.5));
- i = [' '];
- g =
- S(f.prepVML(i), null, {left: w(h.left) + 1, top: w(h.top) + 1});
- if (c)g.cutOff = k + 1;
- i = [' '];
- S(f.prepVML(i), null, null, g);
- b ? b.element.appendChild(g) : e.parentNode.insertBefore(g, e);
- d.push(g)
- }
- this.shadows = d
- }
- return this
- }};
- ka = ca(va, ka);
- var ha = {Element: ka, isIE8: ya.indexOf("MSIE 8.0") > -1, init: function (a, b, c) {
- var d, e;
- this.alignedObjects = [];
- d = this.createElement(ia);
- e = d.element;
- e.style.position = "relative";
- a.appendChild(d.element);
- this.box = e;
- this.boxWrapper = d;
- this.setSize(b, c,
- !1);
- if (!B.namespaces.hcv)B.namespaces.add("hcv", "urn:schemas-microsoft-com:vml"), B.createStyleSheet().cssText = "hcv\\:fill, hcv\\:path, hcv\\:shape, hcv\\:stroke{ behavior:url(#default#VML); display: inline-block; } "
- }, isHidden: function () {
- return!this.box.offsetWidth
- }, clipRect: function (a, b, c, d) {
- var e = this.createElement();
- return u(e, {members: [], left: a, top: b, width: c, height: d, getCSS: function (a) {
- var b = a.inverted, c = this.top, d = this.left, e = d + this.width, k = c + this.height, c = {clip: "rect(" + t(b ? d : c) + "px," + t(b ? k :
- e) + "px," + t(b ? e : k) + "px," + t(b ? c : d) + "px)"};
- !b && Ca && a.element.nodeName !== "IMG" && u(c, {width: e + "px", height: k + "px"});
- return c
- }, updateClipping: function () {
- n(e.members, function (a) {
- a.css(e.getCSS(a))
- })
- }})
- }, color: function (a, b, c) {
- var d, e = /^rgba/, f, g = U;
- a && a.linearGradient ? f = "gradient" : a && a.radialGradient && (f = "pattern");
- if (f) {
- var h, i, j = a.linearGradient || a.radialGradient, k, l, m, p, q, o, r = "", a = a.stops, y, s = [];
- l = a[0];
- y = a[a.length - 1];
- l[0] > 0 && a.unshift([0, l[1]]);
- y[0] < 1 && a.push([1, y[1]]);
- n(a, function (a, b) {
- e.test(a[1]) ? (d =
- pa(a[1]), h = d.get("rgb"), i = d.get("a")) : (h = a[1], i = 1);
- s.push(a[0] * 100 + "% " + h);
- b ? (p = i, q = h) : (m = i, o = h)
- });
- f === "gradient" ? (k = j.x1 || j[0] || 0, a = j.y1 || j[1] || 0, l = j.x2 || j[2] || 0, j = j.y2 || j[3] || 0, k = 90 - L.atan((j - a) / (l - k)) * 180 / xa) : (g = j.r * 2, r = 'src="http://code.highcharts.com/gfx/radial-gradient.png" size="' + g + "," + g + '" origin="0.5,0.5" position="' + j.cx + "," + j.cy + '" color2="' + o + '" ', g = q);
- c === "fill" ? (c = [' '],
- S(this.prepVML(c), null, null, b)) : g = h
- } else if (e.test(a) && b.tagName !== "IMG")d = pa(a), c = ["<", c, ' opacity="', d.get("a"), '"/>'], S(this.prepVML(c), null, null, b), g = d.get("rgb"); else {
- b = b.getElementsByTagName(c);
- if (b.length)b[0].opacity = 1;
- g = a
- }
- return g
- }, prepVML: function (a) {
- var b = this.isIE8, a = a.join("");
- b ? (a = a.replace("/>", ' xmlns="urn:schemas-microsoft-com:vml" />'), a = a.indexOf('style="') === -1 ? a.replace("/>", ' style="display:inline-block;behavior:url(#default#VML);" />') : a.replace('style="', 'style="display:inline-block;behavior:url(#default#VML);')) :
- a = a.replace("<", " 1 && f.css({left: b, top: c, width: d,
- height: e});
- return f
- }, rect: function (a, b, c, d, e, f) {
- if (aa(a))b = a.y, c = a.width, d = a.height, f = a.strokeWidth, a = a.x;
- var g = this.symbol("rect");
- g.r = e;
- return g.attr(g.crisp(f, a, b, x(c, 0), x(d, 0)))
- }, invertChild: function (a, b) {
- var c = b.style;
- F(a, {flip: "x", left: w(c.width) - 1, top: w(c.height) - 1, rotation: -90})
- }, symbols: {arc: function (a, b, c, d, e) {
- var f = e.start, g = e.end, h = e.r || c || d, c = X(f), d = da(f), i = X(g), j = da(g), k = e.innerR, l = 0.08 / h, m = k && 0.1 / k || 0;
- if (g - f === 0)return["x"]; else 2 * xa - g + f < l ? i = -l : g - f < m && (i = X(f + m));
- f = ["wa", a - h, b - h, a + h,
- b + h, a + h * c, b + h * d, a + h * i, b + h * j];
- e.open && f.push("M", a - k, b - k);
- f.push("at", a - k, b - k, a + k, b + k, a + k * i, b + k * j, a + k * c, b + k * d, "x", "e");
- return f
- }, circle: function (a, b, c, d) {
- return["wa", a, b, a + c, b + d, a + c, b + d / 2, a + c, b + d / 2, "e"]
- }, rect: function (a, b, c, d, e) {
- var f = a + c, g = b + d, h;
- !s(e) || !e.r ? f = qa.prototype.symbols.square.apply(0, arguments) : (h = O(e.r, c, d), f = ["M", a + h, b, "L", f - h, b, "wa", f - 2 * h, b, f, b + 2 * h, f - h, b, f, b + h, "L", f, g - h, "wa", f - 2 * h, g - 2 * h, f, g, f, g - h, f - h, g, "L", a + h, g, "wa", a, g - 2 * h, a + 2 * h, g, a + h, g, a, g - h, "L", a, b + h, "wa", a, b, a + 2 * h, b + 2 * h, a, b + h, a +
- h, b, "x", "e"]);
- return f
- }}};
- ka = function () {
- this.init.apply(this, arguments)
- };
- ka.prototype = C(qa.prototype, ha);
- Ta = ka
- }
- var fb, Nb;
- if (ga)fb = function () {
- }, fb.prototype.symbols = {}, Nb = function () {
- function a() {
- var a = b.length, d;
- for (d = 0; d < a; d++)b[d]();
- b = []
- }
-
- var b = [];
- return{push: function (c, d) {
- b.length === 0 && Ib(d, a);
- b.push(c)
- }}
- }();
- Ta = ka || fb || qa;
- Sa.prototype = {addLabel: function () {
- var a = this.axis, b = a.options, c = a.chart, d = a.horiz, e = a.categories, f = this.pos, g = b.labels, h = a.tickPositions, d = e && d && e.length && !g.step && !g.staggerLines && !g.rotation && c.plotWidth / h.length || !d && c.plotWidth / 2, i = f === h[0], j = f === h[h.length - 1], k = e && s(e[f]) ? e[f] : f, e = this.label, h = h.info, l;
- a.isDatetimeAxis && h && (l = b.dateTimeLabelFormats[h.higherRanks[f] || h.unitName]);
- this.isFirst = i;
- this.isLast = j;
- b = a.labelFormatter.call({axis: a, chart: c, isFirst: i, isLast: j, dateTimeLabelFormat: l, value: a.isLog ? ja(ba(k)) : k});
- f = d && {width: x(1, t(d - 2 * (g.padding || 10))) + "px"};
- f = u(f, g.style);
- if (s(e))e && e.attr({text: b}).css(f); else {
- d = {align: g.align};
- if (Ka(g.rotation))d.rotation = g.rotation;
- this.label = s(b) && g.enabled ? c.renderer.text(b, 0, 0, g.useHTML).attr(d).css(f).add(a.axisGroup) : null
- }
- }, getLabelSize: function () {
- var a = this.label, b = this.axis;
- return a ? (this.labelBBox = a.getBBox(!0))[b.horiz ? "height" : "width"] : 0
- }, getLabelSides: function () {
- var a = this.axis.options.labels, b = this.labelBBox.width, a = b * {left: 0, center: 0.5, right: 1}[a.align] - a.x;
- return[-a, b - a]
- }, handleOverflow: function (a, b) {
- var c = !0, d = this.axis, e = d.chart, f = this.isFirst, g = this.isLast, h = b.x, i = d.reversed, j = d.tickPositions;
- if (f || g) {
- var k =
- this.getLabelSides(), l = k[0], k = k[1], e = e.plotLeft, m = e + d.len, j = (d = d.ticks[j[a + (f ? 1 : -1)]]) && d.label.xy.x + d.getLabelSides()[f ? 0 : 1];
- f && !i || g && i ? h + l < e && (h = e - l, d && h + k > j && (c = !1)) : h + k > m && (h = m - k, d && h + l < j && (c = !1));
- b.x = h
- }
- return c
- }, getPosition: function (a, b, c, d) {
- var e = this.axis, f = e.chart, g = d && f.oldChartHeight || f.chartHeight;
- return{x: a ? e.translate(b + c, null, null, d) + e.transB : e.left + e.offset + (e.opposite ? (d && f.oldChartWidth || f.chartWidth) - e.right - e.left : 0), y: a ? g - e.bottom + e.offset - (e.opposite ? e.height : 0) : g - e.translate(b +
- c, null, null, d) - e.transB}
- }, getLabelPosition: function (a, b, c, d, e, f, g, h) {
- var i = this.axis, j = i.transA, k = i.reversed, i = i.staggerLines, a = a + e.x - (f && d ? f * j * (k ? -1 : 1) : 0), b = b + e.y - (f && !d ? f * j * (k ? 1 : -1) : 0);
- s(e.y) || (b += w(c.styles.lineHeight) * 0.9 - c.getBBox().height / 2);
- i && (b += g / (h || 1) % i * 16);
- return{x: a, y: b}
- }, getMarkPath: function (a, b, c, d, e, f) {
- return f.crispLine(["M", a, b, "L", a + (e ? 0 : -c), b + (e ? c : 0)], d)
- }, render: function (a, b) {
- var c = this.axis, d = c.options, e = c.chart.renderer, f = c.horiz, g = this.type, h = this.label, i = this.pos, j = d.labels,
- k = this.gridLine, l = g ? g + "Grid" : "grid", m = g ? g + "Tick" : "tick", p = d[l + "LineWidth"], q = d[l + "LineColor"], n = d[l + "LineDashStyle"], r = d[m + "Length"], l = d[m + "Width"] || 0, y = d[m + "Color"], s = d[m + "Position"], m = this.mark, t = j.step, v = !0, H = d.categories && d.tickmarkPlacement === "between" ? 0.5 : 0, J = this.getPosition(f, i, H, b), K = J.x, J = J.y, x = c.staggerLines;
- if (p) {
- i = c.getPlotLinePath(i + H, p, b);
- if (k === A) {
- k = {stroke: q, "stroke-width": p};
- if (n)k.dashstyle = n;
- if (!g)k.zIndex = 1;
- this.gridLine = k = p ? e.path(i).attr(k).add(c.gridGroup) : null
- }
- if (!b && k && i)k[this.isNew ?
- "attr" : "animate"]({d: i})
- }
- if (l)s === "inside" && (r = -r), c.opposite && (r = -r), g = this.getMarkPath(K, J, r, l, f, e), m ? m.animate({d: g}) : this.mark = e.path(g).attr({stroke: y, "stroke-width": l}).add(c.axisGroup);
- if (h && !isNaN(K))h.xy = J = this.getLabelPosition(K, J, h, f, j, H, a, t), this.isFirst && !o(d.showFirstLabel, 1) || this.isLast && !o(d.showLastLabel, 1) ? v = !1 : !x && f && j.overflow === "justify" && !this.handleOverflow(a, J) && (v = !1), t && a % t && (v = !1), v ? (h[this.isNew ? "attr" : "animate"](J), h.show(), this.isNew = !1) : h.hide()
- }, destroy: function () {
- Ba(this,
- this.axis)
- }};
- nb.prototype = {render: function () {
- var a = this, b = a.axis, c = b.horiz, d = (b.pointRange || 0) / 2, e = a.options, f = e.label, g = a.label, h = e.width, i = e.to, j = e.from, k = s(j) && s(i), l = e.value, m = e.dashStyle, p = a.svgElem, q = [], n, r = e.color, y = e.zIndex, t = e.events, u = b.chart.renderer;
- b.isLog && (j = ma(j), i = ma(i), l = ma(l));
- if (h) {
- if (q = b.getPlotLinePath(l, h), d = {stroke: r, "stroke-width": h}, m)d.dashstyle = m
- } else if (k) {
- if (j = x(j, b.min - d), i = O(i, b.max + d), q = b.getPlotBandPath(j, i, e), d = {fill: r}, e.borderWidth)d.stroke = e.borderColor, d["stroke-width"] =
- e.borderWidth
- } else return;
- if (s(y))d.zIndex = y;
- if (p)q ? p.animate({d: q}, null, p.onGetPath) : (p.hide(), p.onGetPath = function () {
- p.show()
- }); else if (q && q.length && (a.svgElem = p = u.path(q).attr(d).add(), t))for (n in e = function (b) {
- p.on(b, function (c) {
- t[b].apply(a, [c])
- })
- }, t)e(n);
- if (f && s(f.text) && q && q.length && b.width > 0 && b.height > 0) {
- f = C({align: c && k && "center", x: c ? !k && 4 : 10, verticalAlign: !c && k && "middle", y: c ? k ? 16 : 10 : k ? 6 : -4, rotation: c && !k && 90}, f);
- if (!g)a.label = g = u.text(f.text, 0, 0).attr({align: f.textAlign || f.align, rotation: f.rotation,
- zIndex: y}).css(f.style).add();
- b = [q[1], q[4], o(q[6], q[1])];
- q = [q[2], q[5], o(q[7], q[2])];
- c = Pa(b);
- k = Pa(q);
- g.align(f, !1, {x: c, y: k, width: Aa(b) - c, height: Aa(q) - k});
- g.show()
- } else g && g.hide();
- return a
- }, destroy: function () {
- za(this.axis.plotLinesAndBands, this);
- Ba(this, this.axis)
- }};
- Cb.prototype = {destroy: function () {
- Ba(this, this.axis)
- }, setTotal: function (a) {
- this.cum = this.total = a
- }, render: function (a) {
- var b = this.options.formatter.call(this);
- this.label ? this.label.attr({text: b, visibility: "hidden"}) : this.label = this.axis.chart.renderer.text(b,
- 0, 0).css(this.options.style).attr({align: this.textAlign, rotation: this.options.rotation, visibility: "hidden"}).add(a)
- }, setOffset: function (a, b) {
- var c = this.axis, d = c.chart, e = d.inverted, f = this.isNegative, g = c.translate(this.total, 0, 0, 0, 1), c = c.translate(0), c = M(g - c), h = d.xAxis[0].translate(this.x) + a, d = d.plotHeight, e = {x: e ? f ? g : g - c : h, y: e ? d - h - b : f ? d - g - c : d - g, width: e ? c : b, height: e ? b : c};
- this.label && this.label.align(this.alignOptions, null, e).attr({visibility: "visible"})
- }};
- ob.prototype = {defaultOptions: {dateTimeLabelFormats: {millisecond: "%H:%M:%S.%L",
- second: "%H:%M:%S", minute: "%H:%M", hour: "%H:%M", day: "%e. %b", week: "%e. %b", month: "%b '%y", year: "%Y"}, endOnTick: !1, gridLineColor: "#C0C0C0", labels: G, lineColor: "#C0D0E0", lineWidth: 1, minPadding: 0.01, maxPadding: 0.01, minorGridLineColor: "#E0E0E0", minorGridLineWidth: 1, minorTickColor: "#A0A0A0", minorTickLength: 2, minorTickPosition: "outside", startOfWeek: 1, startOnTick: !1, tickColor: "#C0D0E0", tickLength: 5, tickmarkPlacement: "between", tickPixelInterval: 100, tickPosition: "outside", tickWidth: 1, title: {align: "middle", style: {color: "#6D869F",
- fontWeight: "bold"}}, type: "linear"}, defaultYAxisOptions: {endOnTick: !0, gridLineWidth: 1, tickPixelInterval: 72, showLastLabel: !0, labels: {align: "right", x: -8, y: 3}, lineWidth: 0, maxPadding: 0.05, minPadding: 0.05, startOnTick: !0, tickWidth: 0, title: {rotation: 270, text: "Y-values"}, stackLabels: {enabled: !1, formatter: function () {
- return this.total
- }, style: G.style}}, defaultLeftAxisOptions: {labels: {align: "right", x: -8, y: null}, title: {rotation: 270}}, defaultRightAxisOptions: {labels: {align: "left", x: 8, y: null}, title: {rotation: 90}},
- defaultBottomAxisOptions: {labels: {align: "center", x: 0, y: 14}, title: {rotation: 0}}, defaultTopAxisOptions: {labels: {align: "center", x: 0, y: -5}, title: {rotation: 0}}, init: function (a, b) {
- var c = b.isX;
- this.horiz = a.inverted ? !c : c;
- this.xOrY = (this.isXAxis = c) ? "x" : "y";
- this.opposite = b.opposite;
- this.side = this.horiz ? this.opposite ? 0 : 2 : this.opposite ? 1 : 3;
- this.setOptions(b);
- var d = this.options, e = d.type, f = e === "datetime";
- this.labelFormatter = d.labels.formatter || this.defaultLabelFormatter;
- this.staggerLines = this.horiz && d.labels.staggerLines;
- this.userOptions = b;
- this.minPixelPadding = 0;
- this.chart = a;
- this.reversed = d.reversed;
- this.categories = d.categories;
- this.isLog = e === "logarithmic";
- this.isLinked = s(d.linkedTo);
- this.isDatetimeAxis = f;
- this.ticks = {};
- this.minorTicks = {};
- this.plotLinesAndBands = [];
- this.alternateBands = {};
- this.len = 0;
- this.minRange = this.userMinRange = d.minRange || d.maxZoom;
- this.range = d.range;
- this.offset = d.offset || 0;
- this.stacks = {};
- this.min = this.max = null;
- var g, d = this.options.events;
- a.axes.push(this);
- a[c ? "xAxis" : "yAxis"].push(this);
- this.series =
- [];
- if (a.inverted && c && this.reversed === A)this.reversed = !0;
- this.removePlotLine = this.removePlotBand = this.removePlotBandOrLine;
- this.addPlotLine = this.addPlotBand = this.addPlotBandOrLine;
- for (g in d)I(this, g, d[g]);
- if (this.isLog)this.val2lin = ma, this.lin2val = ba
- }, setOptions: function (a) {
- this.options = C(this.defaultOptions, this.isXAxis ? {} : this.defaultYAxisOptions, [this.defaultTopAxisOptions, this.defaultRightAxisOptions, this.defaultBottomAxisOptions, this.defaultLeftAxisOptions][this.side], a)
- }, defaultLabelFormatter: function () {
- var a =
- this.axis, b = this.value, c = a.tickInterval, d = this.dateTimeLabelFormat;
- return a.categories ? b : d ? db(d, b) : c % 1E6 === 0 ? b / 1E6 + "M" : c % 1E3 === 0 ? b / 1E3 + "k" : b >= 1E3 ? Xa(b, 0) : Xa(b, -1)
- }, getSeriesExtremes: function () {
- var a = this, b = a.chart, c = a.stacks, d = [], e = [], f;
- a.dataMin = a.dataMax = null;
- n(a.series, function (g) {
- if (g.visible || !b.options.chart.ignoreHiddenSeries) {
- var h = g.options, i, j, k, l, m, p, q, n, r, y = h.threshold, t, u = [], v = 0;
- if (a.isLog && y <= 0)y = h.threshold = null;
- if (a.isXAxis) {
- if (h = g.xData, h.length)a.dataMin = O(o(a.dataMin, h[0]), Pa(h)),
- a.dataMax = x(o(a.dataMax, h[0]), Aa(h))
- } else {
- var H, J, K, C = g.cropped, Ha = g.xAxis.getExtremes(), w = !!g.modifyValue;
- i = h.stacking;
- a.usePercentage = i === "percent";
- if (i)m = h.stack, l = g.type + o(m, ""), p = "-" + l, g.stackKey = l, j = d[l] || [], d[l] = j, k = e[p] || [], e[p] = k;
- if (a.usePercentage)a.dataMin = 0, a.dataMax = 99;
- h = g.processedXData;
- q = g.processedYData;
- t = q.length;
- for (f = 0; f < t; f++)if (n = h[f], r = q[f], r !== null && r !== A && (i ? (J = (H = r < y) ? k : j, K = H ? p : l, r = J[n] = s(J[n]) ? J[n] + r : r, c[K] || (c[K] = {}), c[K][n] || (c[K][n] = new Cb(a, a.options.stackLabels, H, n,
- m)), c[K][n].setTotal(r)) : w && (r = g.modifyValue(r)), C || (h[f + 1] || n) >= Ha.min && (h[f - 1] || n) <= Ha.max))if (n = r.length)for (; n--;)r[n] !== null && (u[v++] = r[n]); else u[v++] = r;
- if (!a.usePercentage && u.length)a.dataMin = O(o(a.dataMin, u[0]), Pa(u)), a.dataMax = x(o(a.dataMax, u[0]), Aa(u));
- if (s(y))if (a.dataMin >= y)a.dataMin = y, a.ignoreMinPadding = !0; else if (a.dataMax < y)a.dataMax = y, a.ignoreMaxPadding = !0
- }
- }
- })
- }, translate: function (a, b, c, d, e) {
- var f = this.len, g = 1, h = 0, i = d ? this.oldTransA : this.transA, d = d ? this.oldMin : this.min, e = this.options.ordinal ||
- this.isLog && e;
- if (!i)i = this.transA;
- c && (g *= -1, h = f);
- this.reversed && (g *= -1, h -= g * f);
- b ? (this.reversed && (a = f - a), a = a / i + d, e && (a = this.lin2val(a))) : (e && (a = this.val2lin(a)), a = g * (a - d) * i + h + g * this.minPixelPadding);
- return a
- }, getPlotLinePath: function (a, b, c) {
- var d = this.chart, e = this.left, f = this.top, g, h, i, a = this.translate(a, null, null, c), j = c && d.oldChartHeight || d.chartHeight, k = c && d.oldChartWidth || d.chartWidth, l;
- g = this.transB;
- c = h = t(a + g);
- g = i = t(j - a - g);
- if (isNaN(a))l = !0; else if (this.horiz) {
- if (g = f, i = j - this.bottom, c < e || c > e + this.width)l = !0
- } else if (c = e, h = k - this.right, g < f || g > f + this.height)l = !0;
- return l ? null : d.renderer.crispLine(["M", c, g, "L", h, i], b || 0)
- }, getPlotBandPath: function (a, b) {
- var c = this.getPlotLinePath(b), d = this.getPlotLinePath(a);
- d && c ? d.push(c[4], c[5], c[1], c[2]) : d = null;
- return d
- }, getLinearTickPositions: function (a, b, c) {
- for (var d, b = ja(W(b / a) * a), c = ja(wa(c / a) * a), e = []; b <= c;) {
- e.push(b);
- b = ja(b + a);
- if (b === d)break;
- d = b
- }
- return e
- }, getLogTickPositions: function (a, b, c, d) {
- var e = this.options, f = this.len, g = [];
- if (!d)this._minorAutoInterval = null;
- if (a >= 0.5)a = t(a), g = this.getLinearTickPositions(a, b, c); else if (a >= 0.08)for (var f = W(b), h, i, j, k, l, e = a > 0.3 ? [1, 2, 4] : a > 0.15 ? [1, 2, 4, 6, 8] : [1, 2, 3, 4, 5, 6, 7, 8, 9]; f < c + 1 && !l; f++) {
- i = e.length;
- for (h = 0; h < i && !l; h++)j = ma(ba(f) * e[h]), j > b && g.push(k), k > c && (l = !0), k = j
- } else if (b = ba(b), c = ba(c), a = e[d ? "minorTickInterval" : "tickInterval"], a = o(a === "auto" ? null : a, this._minorAutoInterval, (c - b) * (e.tickPixelInterval / (d ? 5 : 1)) / ((d ? f / this.tickPositions.length : f) || 1)), a = gb(a, null, L.pow(10, W(L.log(a) / L.LN10))), g = Ea(this.getLinearTickPositions(a,
- b, c), ma), !d)this._minorAutoInterval = a / 5;
- if (!d)this.tickInterval = a;
- return g
- }, getMinorTickPositions: function () {
- var a = this.tickPositions, b = this.minorTickInterval, c = [], d, e;
- if (this.isLog) {
- e = a.length;
- for (d = 1; d < e; d++)c = c.concat(this.getLogTickPositions(b, a[d - 1], a[d], !0))
- } else for (a = this.min + (a[0] - this.min) % b; a <= this.max; a += b)c.push(a);
- return c
- }, adjustForMinRange: function () {
- var a = this.options, b = this.min, c = this.max, d, e = this.dataMax - this.dataMin >= this.minRange, f, g, h, i, j;
- if (this.isXAxis && this.minRange === A && !this.isLog)s(a.min) || s(a.max) ? this.minRange = null : (n(this.series, function (a) {
- i = a.xData;
- for (g = j = a.xIncrement ? 1 : i.length - 1; g > 0; g--)if (h = i[g] - i[g - 1], f === A || h < f)f = h
- }), this.minRange = O(f * 5, this.dataMax - this.dataMin));
- if (c - b < this.minRange) {
- var k = this.minRange;
- d = (k - c + b) / 2;
- d = [b - d, o(a.min, b - d)];
- if (e)d[2] = this.dataMin;
- b = Aa(d);
- c = [b + k, o(a.max, b + k)];
- if (e)c[2] = this.dataMax;
- c = Pa(c);
- c - b < k && (d[0] = c - k, d[1] = o(a.min, c - k), b = Aa(d))
- }
- this.min = b;
- this.max = c
- }, setAxisTranslation: function () {
- var a = this.max - this.min, b = 0, c, d, e = this.transA;
- if (this.isXAxis)this.isLinked ? b = this.linkedParent.pointRange : n(this.series, function (a) {
- b = x(b, a.pointRange);
- d = a.closestPointRange;
- !a.noSharedTooltip && s(d) && (c = s(c) ? O(c, d) : d)
- }), this.pointRange = b, this.closestPointRange = c;
- this.oldTransA = e;
- this.translationSlope = this.transA = e = this.len / (a + b || 1);
- this.transB = this.horiz ? this.left : this.bottom;
- this.minPixelPadding = e * (b / 2)
- }, setTickPositions: function (a) {
- var b = this, c = b.chart, d = b.options, e = b.isLog, f = b.isDatetimeAxis, g = b.isXAxis, h = b.isLinked, i = b.options.tickPositioner,
- j = d.maxPadding, k = d.minPadding, l = d.tickInterval, m = d.tickPixelInterval, p = b.categories;
- h ? (b.linkedParent = c[g ? "xAxis" : "yAxis"][d.linkedTo], c = b.linkedParent.getExtremes(), b.min = o(c.min, c.dataMin), b.max = o(c.max, c.dataMax), d.type !== b.linkedParent.options.type && mb(11, 1)) : (b.min = o(b.userMin, d.min, b.dataMin), b.max = o(b.userMax, d.max, b.dataMax));
- if (e)!a && O(b.min, o(b.dataMin, b.min)) <= 0 && mb(10, 1), b.min = ja(ma(b.min)), b.max = ja(ma(b.max));
- if (b.range && (b.userMin = b.min = x(b.min, b.max - b.range), b.userMax = b.max, a))b.range =
- null;
- b.adjustForMinRange();
- if (!p && !b.usePercentage && !h && s(b.min) && s(b.max)) {
- c = b.max - b.min || 1;
- if (!s(d.min) && !s(b.userMin) && k && (b.dataMin < 0 || !b.ignoreMinPadding))b.min -= c * k;
- if (!s(d.max) && !s(b.userMax) && j && (b.dataMax > 0 || !b.ignoreMaxPadding))b.max += c * j
- }
- b.tickInterval = b.min === b.max || b.min === void 0 || b.max === void 0 ? 1 : h && !l && m === b.linkedParent.options.tickPixelInterval ? b.linkedParent.tickInterval : o(l, p ? 1 : (b.max - b.min) * m / (b.len || 1));
- g && !a && n(b.series, function (a) {
- a.processData(b.min !== b.oldMin || b.max !== b.oldMax)
- });
- b.setAxisTranslation();
- b.beforeSetTickPositions && b.beforeSetTickPositions();
- if (b.postProcessTickInterval)b.tickInterval = b.postProcessTickInterval(b.tickInterval);
- if (!f && !e && (a = L.pow(10, W(L.log(b.tickInterval) / L.LN10)), !s(d.tickInterval)))b.tickInterval = gb(b.tickInterval, null, a, d);
- b.minorTickInterval = d.minorTickInterval === "auto" && b.tickInterval ? b.tickInterval / 5 : d.minorTickInterval;
- b.tickPositions = i = d.tickPositions || i && i.apply(b, [b.min, b.max]);
- if (!i)i = f ? (b.getNonLinearTimeTicks || Pb)(Ob(b.tickInterval,
- d.units), b.min, b.max, d.startOfWeek, b.ordinalPositions, b.closestPointRange, !0) : e ? b.getLogTickPositions(b.tickInterval, b.min, b.max) : b.getLinearTickPositions(b.tickInterval, b.min, b.max), b.tickPositions = i;
- if (!h)e = i[0], f = i[i.length - 1], d.startOnTick ? b.min = e : b.min > e && i.shift(), d.endOnTick ? b.max = f : b.max < f && i.pop()
- }, setMaxTicks: function () {
- var a = this.chart, b = a.maxTicks, c = this.tickPositions, d = this.xOrY;
- b || (b = {x: 0, y: 0});
- if (!this.isLinked && !this.isDatetimeAxis && c.length > b[d] && this.options.alignTicks !== !1)b[d] =
- c.length;
- a.maxTicks = b
- }, adjustTickAmount: function () {
- var a = this.xOrY, b = this.tickPositions, c = this.chart.maxTicks;
- if (c && c[a] && !this.isDatetimeAxis && !this.categories && !this.isLinked && this.options.alignTicks !== !1) {
- var d = this.tickAmount, e = b.length;
- this.tickAmount = a = c[a];
- if (e < a) {
- for (; b.length < a;)b.push(ja(b[b.length - 1] + this.tickInterval));
- this.transA *= (e - 1) / (a - 1);
- this.max = b[b.length - 1]
- }
- if (s(d) && a !== d)this.isDirty = !0
- }
- }, setScale: function () {
- var a = this.stacks, b, c, d, e;
- this.oldMin = this.min;
- this.oldMax = this.max;
- this.oldAxisLength = this.len;
- this.setAxisSize();
- e = this.len !== this.oldAxisLength;
- n(this.series, function (a) {
- if (a.isDirtyData || a.isDirty || a.xAxis.isDirty)d = !0
- });
- if (e || d || this.isLinked || this.userMin !== this.oldUserMin || this.userMax !== this.oldUserMax)if (this.getSeriesExtremes(), this.setTickPositions(), this.oldUserMin = this.userMin, this.oldUserMax = this.userMax, !this.isDirty)this.isDirty = e || this.min !== this.oldMin || this.max !== this.oldMax;
- if (!this.isXAxis)for (b in a)for (c in a[b])a[b][c].cum = a[b][c].total;
- this.setMaxTicks()
- },
- setExtremes: function (a, b, c, d, e) {
- var f = this, g = f.chart, c = o(c, !0), e = u(e, {min: a, max: b});
- E(f, "setExtremes", e, function () {
- f.userMin = a;
- f.userMax = b;
- f.isDirtyExtremes = !0;
- c && g.redraw(d)
- })
- }, setAxisSize: function () {
- var a = this.chart, b = this.options, c = b.offsetLeft || 0, d = b.offsetRight || 0;
- this.left = o(b.left, a.plotLeft + c);
- this.top = o(b.top, a.plotTop);
- this.width = o(b.width, a.plotWidth - c + d);
- this.height = o(b.height, a.plotHeight);
- this.bottom = a.chartHeight - this.height - this.top;
- this.right = a.chartWidth - this.width - this.left;
- this.len =
- x(this.horiz ? this.width : this.height, 0)
- }, getExtremes: function () {
- var a = this.isLog;
- return{min: a ? ja(ba(this.min)) : this.min, max: a ? ja(ba(this.max)) : this.max, dataMin: this.dataMin, dataMax: this.dataMax, userMin: this.userMin, userMax: this.userMax}
- }, getThreshold: function (a) {
- var b = this.isLog, c = b ? ba(this.min) : this.min, b = b ? ba(this.max) : this.max;
- c > a || a === null ? a = c : b < a && (a = b);
- return this.translate(a, 0, 1, 0, 1)
- }, addPlotBandOrLine: function (a) {
- a = (new nb(this, a)).render();
- this.plotLinesAndBands.push(a);
- return a
- }, getOffset: function () {
- var a =
- this, b = a.chart, c = b.renderer, d = a.options, e = a.tickPositions, f = a.ticks, g = a.horiz, h = a.side, i, j = 0, k, l = 0, m = d.title, p = d.labels, q = 0, fa = b.axisOffset, r = [-1, 1, 1, -1][h], y;
- a.hasData = b = a.series.length && s(a.min) && s(a.max);
- a.showAxis = i = b || o(d.showEmpty, !0);
- if (!a.axisGroup)a.axisGroup = c.g("axis").attr({zIndex: d.zIndex || 7}).add(), a.gridGroup = c.g("grid").attr({zIndex: d.gridZIndex || 1}).add();
- if (b || a.isLinked)n(e, function (b) {
- f[b] ? f[b].addLabel() : f[b] = new Sa(a, b)
- }), n(e, function (a) {
- if (h === 0 || h === 2 || {1: "left", 3: "right"}[h] ===
- p.align)q = x(f[a].getLabelSize(), q)
- }), a.staggerLines && (q += (a.staggerLines - 1) * 16); else for (y in f)f[y].destroy(), delete f[y];
- if (m && m.text) {
- if (!a.axisTitle)a.axisTitle = c.text(m.text, 0, 0, m.useHTML).attr({zIndex: 7, rotation: m.rotation || 0, align: m.textAlign || {low: "left", middle: "center", high: "right"}[m.align]}).css(m.style).add(a.axisGroup), a.axisTitle.isNew = !0;
- if (i)j = a.axisTitle.getBBox()[g ? "height" : "width"], l = o(m.margin, g ? 5 : 10), k = m.offset;
- a.axisTitle[i ? "show" : "hide"]()
- }
- a.offset = r * o(d.offset, fa[h]);
- a.axisTitleMargin =
- o(k, q + l + (h !== 2 && q && r * d.labels[g ? "y" : "x"]));
- fa[h] = x(fa[h], a.axisTitleMargin + j + r * a.offset)
- }, getLinePath: function (a) {
- var b = this.chart, c = this.opposite, d = this.offset, e = this.horiz, f = this.left + (c ? this.width : 0) + d, c = b.chartHeight - this.bottom - (c ? this.height : 0) + d;
- return b.renderer.crispLine(["M", e ? this.left : f, e ? c : this.top, "L", e ? b.chartWidth - this.right : f, e ? c : b.chartHeight - this.bottom], a)
- }, getTitlePosition: function () {
- var a = this.horiz, b = this.left, c = this.top, d = this.len, e = this.options.title, f = a ? b : c, g = this.opposite,
- h = this.offset, i = w(e.style.fontSize || 12), d = {low: f + (a ? 0 : d), middle: f + d / 2, high: f + (a ? d : 0)}[e.align], b = (a ? c + this.height : b) + (a ? 1 : -1) * (g ? -1 : 1) * this.axisTitleMargin + (this.side === 2 ? i : 0);
- return{x: a ? d : b + (g ? this.width : 0) + h + (e.x || 0), y: a ? b - (g ? this.height : 0) + h : d + (e.y || 0)}
- }, render: function () {
- var a = this, b = a.chart, c = b.renderer, d = a.options, e = a.isLog, f = a.isLinked, g = a.tickPositions, h = a.axisTitle, i = a.stacks, j = a.ticks, k = a.minorTicks, l = a.alternateBands, m = d.stackLabels, p = d.alternateGridColor, q = d.lineWidth, o, r = b.hasRendered &&
- s(a.oldMin) && !isNaN(a.oldMin), y = a.showAxis, t, u;
- if (a.hasData || f)if (a.minorTickInterval && !a.categories && n(a.getMinorTickPositions(), function (b) {
- k[b] || (k[b] = new Sa(a, b, "minor"));
- r && k[b].isNew && k[b].render(null, !0);
- k[b].isActive = !0;
- k[b].render()
- }), n(g.slice(1).concat([g[0]]), function (b, c) {
- c = c === g.length - 1 ? 0 : c + 1;
- if (!f || b >= a.min && b <= a.max)j[b] || (j[b] = new Sa(a, b)), r && j[b].isNew && j[b].render(c, !0), j[b].isActive = !0, j[b].render(c)
- }), p && n(g, function (b, c) {
- if (c % 2 === 0 && b < a.max)l[b] || (l[b] = new nb(a)), t = b, u = g[c +
- 1] !== A ? g[c + 1] : a.max, l[b].options = {from: e ? ba(t) : t, to: e ? ba(u) : u, color: p}, l[b].render(), l[b].isActive = !0
- }), !a._addedPlotLB)n((d.plotLines || []).concat(d.plotBands || []), function (b) {
- a.addPlotBandOrLine(b)
- }), a._addedPlotLB = !0;
- n([j, k, l], function (a) {
- for (var b in a)a[b].isActive ? a[b].isActive = !1 : (a[b].destroy(), delete a[b])
- });
- if (q)o = a.getLinePath(q), a.axisLine ? a.axisLine.animate({d: o}) : a.axisLine = c.path(o).attr({stroke: d.lineColor, "stroke-width": q, zIndex: 7}).add(), a.axisLine[y ? "show" : "hide"]();
- if (h && y)h[h.isNew ?
- "attr" : "animate"](a.getTitlePosition()), h.isNew = !1;
- if (m && m.enabled) {
- var v, H, d = a.stackTotalGroup;
- if (!d)a.stackTotalGroup = d = c.g("stack-labels").attr({visibility: "visible", zIndex: 6}).add();
- d.translate(b.plotLeft, b.plotTop);
- for (v in i)for (H in b = i[v], b)b[H].render(d)
- }
- a.isDirty = !1
- }, removePlotBandOrLine: function (a) {
- for (var b = this.plotLinesAndBands, c = b.length; c--;)b[c].id === a && b[c].destroy()
- }, setTitle: function (a, b) {
- var c = this.chart, d = this.options;
- d.title = C(d.title, a);
- this.axisTitle = void 0;
- this.isDirty = !0;
- o(b, !0) && c.redraw()
- }, redraw: function () {
- var a = this.chart;
- a.tracker.resetTracker && a.tracker.resetTracker(!0);
- this.render();
- n(this.plotLinesAndBands, function (a) {
- a.render()
- });
- n(this.series, function (a) {
- a.isDirty = !0
- })
- }, setCategories: function (a, b) {
- var c = this.chart;
- this.categories = this.userOptions.categories = a;
- n(this.series, function (a) {
- a.translate();
- a.setTooltipPoints(!0)
- });
- this.isDirty = !0;
- o(b, !0) && c.redraw()
- }, destroy: function () {
- var a = this, b = a.stacks, c;
- P(a);
- for (c in b)Ba(b[c]), b[c] = null;
- n([a.ticks, a.minorTicks,
- a.alternateBands, a.plotLinesAndBands], function (a) {
- Ba(a)
- });
- n(["stackTotalGroup", "axisLine", "axisGroup", "gridGroup", "axisTitle"], function (b) {
- a[b] && (a[b] = a[b].destroy())
- })
- }};
- pb.prototype = {destroy: function () {
- n(this.crosshairs, function (a) {
- a && a.destroy()
- });
- if (this.label)this.label = this.label.destroy()
- }, move: function (a, b) {
- var c = this;
- c.currentX = c.tooltipIsHidden ? a : (2 * c.currentX + a) / 3;
- c.currentY = c.tooltipIsHidden ? b : (c.currentY + b) / 2;
- c.label.attr({x: c.currentX, y: c.currentY});
- c.tooltipTick = M(a - c.currentX) > 1 ||
- M(b - c.currentY) > 1 ? function () {
- c.move(a, b)
- } : null
- }, hide: function () {
- if (!this.tooltipIsHidden) {
- var a = this.chart.hoverPoints;
- this.label.hide();
- a && n(a, function (a) {
- a.setState()
- });
- this.chart.hoverPoints = null;
- this.tooltipIsHidden = !0
- }
- }, hideCrosshairs: function () {
- n(this.crosshairs, function (a) {
- a && a.hide()
- })
- }, getAnchor: function (a, b) {
- var c, d = this.chart, e = d.inverted, f = 0, g = 0, a = na(a);
- c = a[0].tooltipPos;
- c || (n(a, function (a) {
- f += a.plotX;
- g += a.plotLow ? (a.plotLow + a.plotHigh) / 2 : a.plotY
- }), f /= a.length, g /= a.length, c = [e ? d.plotWidth -
- g : f, this.shared && !e && a.length > 1 && b ? b.chartY - d.plotTop : e ? d.plotHeight - f : g]);
- return Ea(c, t)
- }, getPosition: function (a, b, c) {
- var d = this.chart, e = d.plotLeft, f = d.plotTop, g = d.plotWidth, h = d.plotHeight, i = o(this.options.distance, 12), j = c.plotX, c = c.plotY, d = j + e + (d.inverted ? i : -a - i), k = c - b + f + 15, l;
- d < 7 && (d = e + j + i);
- d + a > e + g && (d -= d + a - (e + g), k = c - b + f - i, l = !0);
- k < f + 5 && (k = f + 5, l && c >= k && c <= k + b && (k = c + f + i));
- k + b > f + h && (k = x(f, f + h - b - i));
- return{x: d, y: k}
- }, refresh: function (a, b) {
- function c() {
- var a = this.points || na(this), b = a[0].series, c;
- c = [b.tooltipHeaderFormatter(a[0].key)];
- n(a, function (a) {
- b = a.series;
- c.push(b.tooltipFormatter && b.tooltipFormatter(a) || a.point.tooltipFormatter(b.tooltipOptions.pointFormat))
- });
- c.push(f.footerFormat || "");
- return c.join("")
- }
-
- var d = this.chart, e = this.label, f = this.options, g, h, i, j = {}, k, l = [];
- k = f.formatter || c;
- var j = d.hoverPoints, m, p = f.crosshairs;
- i = this.shared;
- h = this.getAnchor(a, b);
- g = h[0];
- h = h[1];
- i && (!a.series || !a.series.noSharedTooltip) ? (j && n(j, function (a) {
- a.setState()
- }), d.hoverPoints = a, n(a, function (a) {
- a.setState("hover");
- l.push(a.getLabelConfig())
- }),
- j = {x: a[0].category, y: a[0].y}, j.points = l, a = a[0]) : j = a.getLabelConfig();
- k = k.call(j);
- j = a.series;
- i = i || !j.isCartesian || j.tooltipOutsidePlot || d.isInsidePlot(g, h);
- k === !1 || !i ? this.hide() : (this.tooltipIsHidden && e.show(), e.attr({text: k}), m = f.borderColor || a.color || j.color || "#606060", e.attr({stroke: m}), e = (f.positioner || this.getPosition).call(this, e.width, e.height, {plotX: g, plotY: h}), this.move(t(e.x), t(e.y)), this.tooltipIsHidden = !1);
- if (p) {
- p = na(p);
- for (e = p.length; e--;)if (i = a.series[e ? "yAxis" : "xAxis"], p[e] && i)if (i =
- i.getPlotLinePath(e ? o(a.stackY, a.y) : a.x, 1), this.crosshairs[e])this.crosshairs[e].attr({d: i, visibility: "visible"}); else {
- j = {"stroke-width": p[e].width || 1, stroke: p[e].color || "#C0C0C0", zIndex: p[e].zIndex || 2};
- if (p[e].dashStyle)j.dashstyle = p[e].dashStyle;
- this.crosshairs[e] = d.renderer.path(i).attr(j).add()
- }
- }
- E(d, "tooltipRefresh", {text: k, x: g + d.plotLeft, y: h + d.plotTop, borderColor: m})
- }, tick: function () {
- this.tooltipTick && this.tooltipTick()
- }};
- Db.prototype = {normalizeMouseEvent: function (a) {
- var b, c, d, a = a || N.event;
- if (!a.target)a.target =
- a.srcElement;
- if (a.originalEvent)a = a.originalEvent;
- if (a.event)a = a.event;
- d = a.touches ? a.touches.item(0) : a;
- this.chartPosition = b = Jb(this.chart.container);
- d.pageX === A ? (c = a.x, b = a.y) : (c = d.pageX - b.left, b = d.pageY - b.top);
- return u(a, {chartX: t(c), chartY: t(b)})
- }, getMouseCoordinates: function (a) {
- var b = {xAxis: [], yAxis: []}, c = this.chart;
- n(c.axes, function (d) {
- var e = d.isXAxis;
- b[e ? "xAxis" : "yAxis"].push({axis: d, value: d.translate((c.inverted ? !e : e) ? a.chartX - c.plotLeft : c.plotHeight - a.chartY + c.plotTop, !0)})
- });
- return b
- }, onmousemove: function (a) {
- var b =
- this.chart, c = b.series, d, e, f = b.hoverPoint, g = b.hoverSeries, h, i, j = b.chartWidth, k = b.inverted ? b.plotHeight + b.plotTop - a.chartY : a.chartX - b.plotLeft;
- if (b.tooltip && this.options.tooltip.shared && (!g || !g.noSharedTooltip)) {
- e = [];
- h = c.length;
- for (i = 0; i < h; i++)if (c[i].visible && c[i].options.enableMouseTracking !== !1 && !c[i].noSharedTooltip && c[i].tooltipPoints.length)d = c[i].tooltipPoints[k], d._dist = M(k - d.plotX), j = O(j, d._dist), e.push(d);
- for (h = e.length; h--;)e[h]._dist > j && e.splice(h, 1);
- if (e.length && e[0].plotX !== this.hoverX)b.tooltip.refresh(e,
- a), this.hoverX = e[0].plotX
- }
- if (g && g.tracker && (d = g.tooltipPoints[k]) && d !== f)d.onMouseOver()
- }, resetTracker: function (a) {
- var b = this.chart, c = b.hoverSeries, d = b.hoverPoint, e = b.hoverPoints || d, b = b.tooltip;
- (a = a && b && e) && na(e)[0].plotX === A && (a = !1);
- if (a)b.refresh(e); else {
- if (d)d.onMouseOut();
- if (c)c.onMouseOut();
- b && (b.hide(), b.hideCrosshairs());
- this.hoverX = null
- }
- }, setDOMEvents: function () {
- function a() {
- if (b.selectionMarker) {
- var f = {xAxis: [], yAxis: []}, g = b.selectionMarker.getBBox(), h = g.x - c.plotLeft, l = g.y - c.plotTop, m;
- e &&
- (n(c.axes, function (a) {
- if (a.options.zoomEnabled !== !1) {
- var b = a.isXAxis, d = c.inverted ? !b : b, e = a.translate(d ? h : c.plotHeight - l - g.height, !0, 0, 0, 1), d = a.translate(d ? h + g.width : c.plotHeight - l, !0, 0, 0, 1);
- !isNaN(e) && !isNaN(d) && (f[b ? "xAxis" : "yAxis"].push({axis: a, min: O(e, d), max: x(e, d)}), m = !0)
- }
- }), m && E(c, "selection", f, function (a) {
- c.zoom(a)
- }));
- b.selectionMarker = b.selectionMarker.destroy()
- }
- if (c)F(d, {cursor: "auto"}), c.cancelClick = e, c.mouseIsDown = e = !1;
- P(B, ea ? "touchend" : "mouseup", a)
- }
-
- var b = this, c = b.chart, d = c.container, e,
- f = b.zoomX && !c.inverted || b.zoomY && c.inverted, g = b.zoomY && !c.inverted || b.zoomX && c.inverted;
- b.hideTooltipOnMouseMove = function (a) {
- Kb(a);
- b.chartPosition && c.hoverSeries && c.hoverSeries.isCartesian && !c.isInsidePlot(a.pageX - b.chartPosition.left - c.plotLeft, a.pageY - b.chartPosition.top - c.plotTop) && b.resetTracker()
- };
- b.hideTooltipOnMouseLeave = function () {
- b.resetTracker();
- b.chartPosition = null
- };
- d.onmousedown = function (d) {
- d = b.normalizeMouseEvent(d);
- !ea && d.preventDefault && d.preventDefault();
- c.mouseIsDown = !0;
- c.cancelClick = !1;
- c.mouseDownX = b.mouseDownX = d.chartX;
- b.mouseDownY = d.chartY;
- I(B, ea ? "touchend" : "mouseup", a)
- };
- var h = function (a) {
- if (!a || !(a.touches && a.touches.length > 1)) {
- a = b.normalizeMouseEvent(a);
- if (!ea)a.returnValue = !1;
- var d = a.chartX, h = a.chartY, l = !c.isInsidePlot(d - c.plotLeft, h - c.plotTop);
- ea && a.type === "touchstart" && (z(a.target, "isTracker") ? c.runTrackerClick || a.preventDefault() : !c.runChartClick && !l && a.preventDefault());
- if (l)d < c.plotLeft ? d = c.plotLeft : d > c.plotLeft + c.plotWidth && (d = c.plotLeft + c.plotWidth), h < c.plotTop ? h =
- c.plotTop : h > c.plotTop + c.plotHeight && (h = c.plotTop + c.plotHeight);
- if (c.mouseIsDown && a.type !== "touchstart") {
- if (e = Math.sqrt(Math.pow(b.mouseDownX - d, 2) + Math.pow(b.mouseDownY - h, 2)), e > 10) {
- a = c.isInsidePlot(b.mouseDownX - c.plotLeft, b.mouseDownY - c.plotTop);
- if (c.hasCartesianSeries && (b.zoomX || b.zoomY) && a && !b.selectionMarker)b.selectionMarker = c.renderer.rect(c.plotLeft, c.plotTop, f ? 1 : c.plotWidth, g ? 1 : c.plotHeight, 0).attr({fill: b.options.chart.selectionMarkerFill || "rgba(69,114,167,0.25)", zIndex: 7}).add();
- if (b.selectionMarker &&
- f) {
- var m = d - b.mouseDownX;
- b.selectionMarker.attr({width: M(m), x: (m > 0 ? 0 : m) + b.mouseDownX})
- }
- b.selectionMarker && g && (h -= b.mouseDownY, b.selectionMarker.attr({height: M(h), y: (h > 0 ? 0 : h) + b.mouseDownY}));
- a && !b.selectionMarker && b.options.chart.panning && c.pan(d)
- }
- } else if (!l)b.onmousemove(a);
- return l || !c.hasCartesianSeries
- }
- };
- d.onmousemove = h;
- I(d, "mouseleave", b.hideTooltipOnMouseLeave);
- I(B, "mousemove", b.hideTooltipOnMouseMove);
- d.ontouchstart = function (a) {
- if (b.zoomX || b.zoomY)d.onmousedown(a);
- h(a)
- };
- d.ontouchmove = h;
- d.ontouchend =
- function () {
- e && b.resetTracker()
- };
- d.onclick = function (a) {
- var d = c.hoverPoint, e, f, a = b.normalizeMouseEvent(a);
- a.cancelBubble = !0;
- if (!c.cancelClick)d && (z(a.target, "isTracker") || z(a.target.parentNode, "isTracker")) ? (e = d.plotX, f = d.plotY, u(d, {pageX: b.chartPosition.left + c.plotLeft + (c.inverted ? c.plotWidth - f : e), pageY: b.chartPosition.top + c.plotTop + (c.inverted ? c.plotHeight - e : f)}), E(d.series, "click", u(a, {point: d})), d.firePointEvent("click", a)) : (u(a, b.getMouseCoordinates(a)), c.isInsidePlot(a.chartX - c.plotLeft, a.chartY -
- c.plotTop) && E(c, "click", a))
- }
- }, destroy: function () {
- var a = this.chart, b = a.container;
- if (a.trackerGroup)a.trackerGroup = a.trackerGroup.destroy();
- P(b, "mouseleave", this.hideTooltipOnMouseLeave);
- P(B, "mousemove", this.hideTooltipOnMouseMove);
- b.onclick = b.onmousedown = b.onmousemove = b.ontouchstart = b.ontouchend = b.ontouchmove = null;
- clearInterval(this.tooltipInterval)
- }, init: function (a, b) {
- if (!a.trackerGroup)a.trackerGroup = a.renderer.g("tracker").attr({zIndex: 9}).add();
- if (b.enabled)a.tooltip = new pb(a, b), this.tooltipInterval =
- setInterval(function () {
- a.tooltip.tick()
- }, 32);
- this.setDOMEvents()
- }};
- qb.prototype = {init: function (a) {
- var b = this, c = b.options = a.options.legend;
- if (c.enabled) {
- var d = c.itemStyle, e = o(c.padding, 8), f = c.itemMarginTop || 0;
- b.baseline = w(d.fontSize) + 3 + f;
- b.itemStyle = d;
- b.itemHiddenStyle = C(d, c.itemHiddenStyle);
- b.itemMarginTop = f;
- b.padding = e;
- b.initialItemX = e;
- b.initialItemY = e - 5;
- b.maxItemWidth = 0;
- b.chart = a;
- b.itemHeight = 0;
- b.lastLineHeight = 0;
- b.render();
- I(b.chart, "endResize", function () {
- b.positionCheckboxes()
- })
- }
- }, colorizeItem: function (a, b) {
- var c = this.options, d = a.legendItem, e = a.legendLine, f = a.legendSymbol, g = this.itemHiddenStyle.color, c = b ? c.itemStyle.color : g, g = b ? a.color : g;
- d && d.css({fill: c});
- e && e.attr({stroke: g});
- f && f.attr({stroke: g, fill: g})
- }, positionItem: function (a) {
- var b = this.options, c = b.symbolPadding, b = !b.rtl, d = a._legendItemPos, e = d[0], d = d[1], f = a.checkbox;
- a.legendGroup && a.legendGroup.translate(b ? e : this.legendWidth - e - 2 * c - 4, d);
- if (f)f.x = e, f.y = d
- }, destroyItem: function (a) {
- var b = a.checkbox;
- n(["legendItem", "legendLine", "legendSymbol", "legendGroup"],
- function (b) {
- a[b] && a[b].destroy()
- });
- b && Qa(a.checkbox)
- }, destroy: function () {
- var a = this.group, b = this.box;
- if (b)this.box = b.destroy();
- if (a)this.group = a.destroy()
- }, positionCheckboxes: function () {
- var a = this;
- n(a.allItems, function (b) {
- var c = b.checkbox, d = a.group.alignAttr;
- c && F(c, {left: d.translateX + b.legendItemWidth + c.x - 20 + "px", top: d.translateY + c.y + 3 + "px"})
- })
- }, renderItem: function (a) {
- var q;
- var b = this, c = b.chart, d = c.renderer, e = b.options, f = e.layout === "horizontal", g = e.symbolWidth, h = e.symbolPadding, i = b.itemStyle, j = b.itemHiddenStyle,
- k = b.padding, l = !e.rtl, m = e.width, p = e.itemMarginBottom || 0, n = b.itemMarginTop, o = b.initialItemX, r = a.legendItem, s = a.series || a, t = s.options, u = t.showCheckbox;
- if (!r && (a.legendGroup = d.g("legend-item").attr({zIndex: 1}).add(b.scrollGroup), s.drawLegendSymbol(b, a), a.legendItem = r = d.text(e.labelFormatter.call(a), l ? g + h : -h, b.baseline, e.useHTML).css(C(a.visible ? i : j)).attr({align: l ? "left" : "right", zIndex: 2}).add(a.legendGroup), a.legendGroup.on("mouseover",function () {
- a.setState("hover");
- r.css(b.options.itemHoverStyle)
- }).on("mouseout",
- function () {
- r.css(a.visible ? i : j);
- a.setState()
- }).on("click", function (b) {
- var c = function () {
- a.setVisible()
- }, b = {browserEvent: b};
- a.firePointEvent ? a.firePointEvent("legendItemClick", b, c) : E(a, "legendItemClick", b, c)
- }), b.colorizeItem(a, a.visible), t && u))a.checkbox = S("input", {type: "checkbox", checked: a.selected, defaultChecked: a.selected}, e.itemCheckboxStyle, c.container), I(a.checkbox, "click", function (b) {
- E(a, "checkboxClick", {checked: b.target.checked}, function () {
- a.select()
- })
- });
- d = r.getBBox();
- q = a.legendItemWidth = e.itemWidth ||
- g + h + d.width + k + (u ? 20 : 0), e = q;
- b.itemHeight = g = d.height;
- if (f && b.itemX - o + e > (m || c.chartWidth - 2 * k - o))b.itemX = o, b.itemY += n + b.lastLineHeight + p, b.lastLineHeight = 0;
- b.maxItemWidth = x(b.maxItemWidth, e);
- b.lastItemY = n + b.itemY + p;
- b.lastLineHeight = x(g, b.lastLineHeight);
- a._legendItemPos = [b.itemX, b.itemY];
- f ? b.itemX += e : (b.itemY += n + g + p, b.lastLineHeight = g);
- b.offsetWidth = m || x(f ? b.itemX - o : e, b.offsetWidth)
- }, render: function () {
- var a = this, b = a.chart, c = b.renderer, d = a.group, e, f, g, h, i = a.box, j = a.options, k = a.padding, l = j.borderWidth,
- m = j.backgroundColor;
- a.itemX = a.initialItemX;
- a.itemY = a.initialItemY;
- a.offsetWidth = 0;
- a.lastItemY = 0;
- if (!d)a.group = d = c.g("legend").attr({zIndex: 7}).add(), a.contentGroup = c.g().attr({zIndex: 1}).add(d), a.scrollGroup = c.g().add(a.contentGroup), a.clipRect = c.clipRect(0, 0, 9999, b.chartHeight), a.contentGroup.clip(a.clipRect);
- e = [];
- n(b.series, function (a) {
- var b = a.options;
- b.showInLegend && (e = e.concat(a.legendItems || (b.legendType === "point" ? a.data : a)))
- });
- Qb(e, function (a, b) {
- return(a.options.legendIndex || 0) - (b.options.legendIndex ||
- 0)
- });
- j.reversed && e.reverse();
- a.allItems = e;
- a.display = f = !!e.length;
- n(e, function (b) {
- a.renderItem(b)
- });
- g = j.width || a.offsetWidth;
- h = a.lastItemY + a.lastLineHeight;
- h = a.handleOverflow(h);
- if (l || m) {
- g += k;
- h += k;
- if (i) {
- if (g > 0 && h > 0)i[i.isNew ? "attr" : "animate"](i.crisp(null, null, null, g, h)), i.isNew = !1
- } else a.box = i = c.rect(0, 0, g, h, j.borderRadius, l || 0).attr({stroke: j.borderColor, "stroke-width": l || 0, fill: m || U}).add(d).shadow(j.shadow), i.isNew = !0;
- i[f ? "show" : "hide"]()
- }
- a.legendWidth = g;
- a.legendHeight = h;
- n(e, function (b) {
- a.positionItem(b)
- });
- f && d.align(u({width: g, height: h}, j), !0, b.spacingBox);
- b.isResizing || this.positionCheckboxes()
- }, handleOverflow: function (a) {
- var b = this, c = this.chart, d = c.renderer, e = this.options, f = e.y, f = c.spacingBox.height + (e.verticalAlign === "top" ? -f : f) - this.padding, g = e.maxHeight, h = this.clipRect, i = e.navigation, j = o(i.animation, !0), k = i.arrowSize || 12, l = this.nav;
- e.layout === "horizontal" && (f /= 2);
- g && (f = O(f, g));
- if (a > f) {
- this.clipHeight = c = f - 20;
- this.pageCount = wa(a / c);
- this.currentPage = o(this.currentPage, 1);
- this.fullHeight = a;
- h.attr({height: c});
- if (!l)this.nav = l = d.g().attr({zIndex: 1}).add(this.group), this.up = d.symbol("triangle", 0, 0, k, k).on("click",function () {
- b.scroll(-1, j)
- }).add(l), this.pager = d.text("", 15, 10).css(i.style).add(l), this.down = d.symbol("triangle-down", 0, 0, k, k).on("click",function () {
- b.scroll(1, j)
- }).add(l);
- b.scroll(0);
- a = f
- } else l && (h.attr({height: c.chartHeight}), l.hide(), this.scrollGroup.attr({translateY: 1}));
- return a
- }, scroll: function (a, b) {
- var c = this.pageCount, d = this.currentPage + a, e = this.clipHeight, f = this.options.navigation, g = f.activeColor,
- f = f.inactiveColor, h = this.pager, i = this.padding;
- d > c && (d = c);
- if (d > 0)b !== A && ua(b, this.chart), this.nav.attr({translateX: i, translateY: e + 7, visibility: "visible"}), this.up.attr({fill: d === 1 ? f : g}).css({cursor: d === 1 ? "default" : "pointer"}), h.attr({text: d + "/" + this.pageCount}), this.down.attr({x: 18 + this.pager.getBBox().width, fill: d === c ? f : g}).css({cursor: d === c ? "default" : "pointer"}), this.scrollGroup.animate({translateY: -O(e * (d - 1), this.fullHeight - e + i) + 1}), h.attr({text: d + "/" + c}), this.currentPage = d
- }};
- rb.prototype = {initSeries: function (a) {
- var b =
- this.options.chart, b = new Y[a.type || b.type || b.defaultSeriesType];
- b.init(this, a);
- return b
- }, addSeries: function (a, b, c) {
- var d = this;
- a && (ua(c, d), b = o(b, !0), E(d, "addSeries", {options: a}, function () {
- d.initSeries(a);
- d.isDirtyLegend = !0;
- b && d.redraw()
- }))
- }, isInsidePlot: function (a, b) {
- return a >= 0 && a <= this.plotWidth && b >= 0 && b <= this.plotHeight
- }, adjustTickAmounts: function () {
- this.options.chart.alignTicks !== !1 && n(this.axes, function (a) {
- a.adjustTickAmount()
- });
- this.maxTicks = null
- }, redraw: function (a) {
- var b = this.axes, c = this.series,
- d = this.tracker, e = this.legend, f = this.isDirtyLegend, g, h = this.isDirtyBox, i = c.length, j = i, k = this.clipRect, l = this.renderer, m = l.isHidden();
- ua(a, this);
- for (m && this.cloneRenderTo(); j--;)if (a = c[j], a.isDirty && a.options.stacking) {
- g = !0;
- break
- }
- if (g)for (j = i; j--;)if (a = c[j], a.options.stacking)a.isDirty = !0;
- n(c, function (a) {
- a.isDirty && a.options.legendType === "point" && (f = !0)
- });
- if (f && e.options.enabled)e.render(), this.isDirtyLegend = !1;
- if (this.hasCartesianSeries) {
- if (!this.isResizing)this.maxTicks = null, n(b, function (a) {
- a.setScale()
- });
- this.adjustTickAmounts();
- this.getMargins();
- n(b, function (a) {
- if (a.isDirtyExtremes)a.isDirtyExtremes = !1, E(a, "afterSetExtremes", a.getExtremes());
- if (a.isDirty || h || g)a.redraw(), h = !0
- })
- }
- h && (this.drawChartBox(), k && (Fa(k), k.animate({width: this.plotSizeX, height: this.plotSizeY + 1})));
- n(c, function (a) {
- a.isDirty && a.visible && (!a.isCartesian || a.xAxis) && a.redraw()
- });
- d && d.resetTracker && d.resetTracker(!0);
- l.draw();
- E(this, "redraw");
- m && this.cloneRenderTo(!0)
- }, showLoading: function (a) {
- var b = this.options, c = this.loadingDiv,
- d = b.loading;
- if (!c)this.loadingDiv = c = S(ia, {className: "highcharts-loading"}, u(d.style, {left: this.plotLeft + "px", top: this.plotTop + "px", width: this.plotWidth + "px", height: this.plotHeight + "px", zIndex: 10, display: U}), this.container), this.loadingSpan = S("span", null, d.labelStyle, c);
- this.loadingSpan.innerHTML = a || b.lang.loading;
- if (!this.loadingShown)F(c, {opacity: 0, display: ""}), eb(c, {opacity: d.style.opacity}, {duration: d.showDuration || 0}), this.loadingShown = !0
- }, hideLoading: function () {
- var a = this.options, b = this.loadingDiv;
- b && eb(b, {opacity: 0}, {duration: a.loading.hideDuration || 100, complete: function () {
- F(b, {display: U})
- }});
- this.loadingShown = !1
- }, get: function (a) {
- var b = this.axes, c = this.series, d, e;
- for (d = 0; d < b.length; d++)if (b[d].options.id === a)return b[d];
- for (d = 0; d < c.length; d++)if (c[d].options.id === a)return c[d];
- for (d = 0; d < c.length; d++) {
- e = c[d].points || [];
- for (b = 0; b < e.length; b++)if (e[b].id === a)return e[b]
- }
- return null
- }, getAxes: function () {
- var a = this, b = this.options, c = b.xAxis || {}, b = b.yAxis || {}, c = na(c);
- n(c, function (a, b) {
- a.index = b;
- a.isX = !0
- });
- b = na(b);
- n(b, function (a, b) {
- a.index = b
- });
- c = c.concat(b);
- n(c, function (b) {
- new ob(a, b)
- });
- a.adjustTickAmounts()
- }, getSelectedPoints: function () {
- var a = [];
- n(this.series, function (b) {
- a = a.concat(ub(b.points, function (a) {
- return a.selected
- }))
- });
- return a
- }, getSelectedSeries: function () {
- return ub(this.series, function (a) {
- return a.selected
- })
- }, showResetZoom: function () {
- var a = this, b = V.lang, c = a.options.chart.resetZoomButton, d = c.theme, e = d.states, f = c.relativeTo === "chart" ? null : {x: a.plotLeft, y: a.plotTop, width: a.plotWidth, height: a.plotHeight};
- this.resetZoomButton = a.renderer.button(b.resetZoom, null, null,function () {
- a.zoomOut()
- }, d, e && e.hover).attr({align: c.position.align, title: b.resetZoomTitle}).add().align(c.position, !1, f)
- }, zoomOut: function () {
- var a = this, b = a.resetZoomButton;
- E(a, "selection", {resetSelection: !0}, function () {
- a.zoom()
- });
- if (b)a.resetZoomButton = b.destroy()
- }, zoom: function (a) {
- var b = this, c = b.options.chart, d;
- b.resetZoomEnabled !== !1 && !b.resetZoomButton && b.showResetZoom();
- !a || a.resetSelection ? n(b.axes, function (a) {
- a.options.zoomEnabled !== !1 && (a.setExtremes(null, null, !1), d = !0)
- }) : n(a.xAxis.concat(a.yAxis), function (a) {
- var c = a.axis;
- if (b.tracker[c.isXAxis ? "zoomX" : "zoomY"])c.setExtremes(a.min, a.max, !1), d = !0
- });
- d && b.redraw(o(c.animation, b.pointCount < 100))
- }, pan: function (a) {
- var b = this.xAxis[0], c = this.mouseDownX, d = b.pointRange / 2, e = b.getExtremes(), f = b.translate(c - a, !0) + d, c = b.translate(c + this.plotWidth - a, !0) - d;
- (d = this.hoverPoints) && n(d, function (a) {
- a.setState()
- });
- b.series.length && f > O(e.dataMin, e.min) && c < x(e.dataMax, e.max) && b.setExtremes(f, c, !0,
- !1);
- this.mouseDownX = a;
- F(this.container, {cursor: "move"})
- }, setTitle: function (a, b) {
- var c = this, d = c.options, e;
- c.chartTitleOptions = e = C(d.title, a);
- c.chartSubtitleOptions = d = C(d.subtitle, b);
- n([
- ["title", a, e],
- ["subtitle", b, d]
- ], function (a) {
- var b = a[0], d = c[b], e = a[1], a = a[2];
- d && e && (d = d.destroy());
- a && a.text && !d && (c[b] = c.renderer.text(a.text, 0, 0, a.useHTML).attr({align: a.align, "class": "highcharts-" + b, zIndex: a.zIndex || 4}).css(a.style).add().align(a, !1, c.spacingBox))
- })
- }, getChartSize: function () {
- var a = this.options.chart,
- b = this.renderToClone || this.renderTo;
- this.containerWidth = Va(b, "width");
- this.containerHeight = Va(b, "height");
- this.chartWidth = a.width || this.containerWidth || 600;
- this.chartHeight = a.height || (this.containerHeight > 19 ? this.containerHeight : 400)
- }, cloneRenderTo: function (a) {
- var b = this.renderToClone, c = this.container;
- a ? b && (this.renderTo.appendChild(c), Qa(b), delete this.renderToClone) : (c && this.renderTo.removeChild(c), this.renderToClone = b = this.renderTo.cloneNode(0), F(b, {position: "absolute", top: "-9999px", display: "block"}),
- B.body.appendChild(b), c && b.appendChild(c))
- }, getContainer: function () {
- var a, b = this.options.chart, c, d, e;
- this.renderTo = a = b.renderTo;
- e = "highcharts-" + sb++;
- if (ra(a))this.renderTo = a = B.getElementById(a);
- a || mb(13, !0);
- a.innerHTML = "";
- a.offsetWidth || this.cloneRenderTo();
- this.getChartSize();
- c = this.chartWidth;
- d = this.chartHeight;
- this.container = a = S(ia, {className: "highcharts-container" + (b.className ? " " + b.className : ""), id: e}, u({position: "relative", overflow: "hidden", width: c + "px", height: d + "px", textAlign: "left", lineHeight: "normal"},
- b.style), this.renderToClone || a);
- this.renderer = b.forExport ? new qa(a, c, d, !0) : new Ta(a, c, d);
- ga && this.renderer.create(this, a, c, d)
- }, getMargins: function () {
- var a = this.options.chart, b = a.spacingTop, c = a.spacingRight, d = a.spacingBottom, a = a.spacingLeft, e, f = this.legend, g = this.optionsMarginTop, h = this.optionsMarginLeft, i = this.optionsMarginRight, j = this.optionsMarginBottom, k = this.chartTitleOptions, l = this.chartSubtitleOptions, m = this.options.legend, p = o(m.margin, 10), q = m.x, t = m.y, r = m.align, y = m.verticalAlign;
- this.resetMargins();
- e = this.axisOffset;
- if ((this.title || this.subtitle) && !s(this.optionsMarginTop))if (l = x(this.title && !k.floating && !k.verticalAlign && k.y || 0, this.subtitle && !l.floating && !l.verticalAlign && l.y || 0))this.plotTop = x(this.plotTop, l + o(k.margin, 15) + b);
- if (f.display && !m.floating)if (r === "right") {
- if (!s(i))this.marginRight = x(this.marginRight, f.legendWidth - q + p + c)
- } else if (r === "left") {
- if (!s(h))this.plotLeft = x(this.plotLeft, f.legendWidth + q + p + a)
- } else if (y === "top") {
- if (!s(g))this.plotTop = x(this.plotTop, f.legendHeight + t + p + b)
- } else if (y ===
- "bottom" && !s(j))this.marginBottom = x(this.marginBottom, f.legendHeight - t + p + d);
- this.extraBottomMargin && (this.marginBottom += this.extraBottomMargin);
- this.extraTopMargin && (this.plotTop += this.extraTopMargin);
- this.hasCartesianSeries && n(this.axes, function (a) {
- a.getOffset()
- });
- s(h) || (this.plotLeft += e[3]);
- s(g) || (this.plotTop += e[0]);
- s(j) || (this.marginBottom += e[2]);
- s(i) || (this.marginRight += e[1]);
- this.setChartSize()
- }, initReflow: function () {
- function a(a) {
- var g = c.width || Va(d, "width"), h = c.height || Va(d, "height"), a = a ?
- a.target : N;
- if (g && h && (a === N || a === B)) {
- if (g !== b.containerWidth || h !== b.containerHeight)clearTimeout(e), e = setTimeout(function () {
- b.resize(g, h, !1)
- }, 100);
- b.containerWidth = g;
- b.containerHeight = h
- }
- }
-
- var b = this, c = b.options.chart, d = b.renderTo, e;
- I(N, "resize", a);
- I(b, "destroy", function () {
- P(N, "resize", a)
- })
- }, fireEndResize: function () {
- var a = this;
- a && E(a, "endResize", null, function () {
- a.isResizing -= 1
- })
- }, resize: function (a, b, c) {
- var d, e, f = this.title, g = this.subtitle;
- this.isResizing += 1;
- ua(c, this);
- this.oldChartHeight = this.chartHeight;
- this.oldChartWidth = this.chartWidth;
- if (s(a))this.chartWidth = d = t(a);
- if (s(b))this.chartHeight = e = t(b);
- F(this.container, {width: d + "px", height: e + "px"});
- this.renderer.setSize(d, e, c);
- this.plotWidth = d - this.plotLeft - this.marginRight;
- this.plotHeight = e - this.plotTop - this.marginBottom;
- this.maxTicks = null;
- n(this.axes, function (a) {
- a.isDirty = !0;
- a.setScale()
- });
- n(this.series, function (a) {
- a.isDirty = !0
- });
- this.isDirtyBox = this.isDirtyLegend = !0;
- this.getMargins();
- a = this.spacingBox;
- f && f.align(null, null, a);
- g && g.align(null, null,
- a);
- this.redraw(c);
- this.oldChartHeight = null;
- E(this, "resize");
- Ra === !1 ? this.fireEndResize() : setTimeout(this.fireEndResize, Ra && Ra.duration || 500)
- }, setChartSize: function () {
- var a = this.inverted, b = this.chartWidth, c = this.chartHeight, d = this.options.chart, e = d.spacingTop, f = d.spacingRight, g = d.spacingBottom, d = d.spacingLeft;
- this.plotLeft = t(this.plotLeft);
- this.plotTop = t(this.plotTop);
- this.plotWidth = t(b - this.plotLeft - this.marginRight);
- this.plotHeight = t(c - this.plotTop - this.marginBottom);
- this.plotSizeX = a ? this.plotHeight :
- this.plotWidth;
- this.plotSizeY = a ? this.plotWidth : this.plotHeight;
- this.spacingBox = {x: d, y: e, width: b - d - f, height: c - e - g};
- n(this.axes, function (a) {
- a.setAxisSize();
- a.setAxisTranslation()
- })
- }, resetMargins: function () {
- var a = this.options.chart, b = a.spacingRight, c = a.spacingBottom, d = a.spacingLeft;
- this.plotTop = o(this.optionsMarginTop, a.spacingTop);
- this.marginRight = o(this.optionsMarginRight, b);
- this.marginBottom = o(this.optionsMarginBottom, c);
- this.plotLeft = o(this.optionsMarginLeft, d);
- this.axisOffset = [0, 0, 0, 0]
- }, drawChartBox: function () {
- var a =
- this.options.chart, b = this.renderer, c = this.chartWidth, d = this.chartHeight, e = this.chartBackground, f = this.plotBackground, g = this.plotBorder, h = this.plotBGImage, i = a.borderWidth || 0, j = a.backgroundColor, k = a.plotBackgroundColor, l = a.plotBackgroundImage, m, p = {x: this.plotLeft, y: this.plotTop, width: this.plotWidth, height: this.plotHeight};
- m = i + (a.shadow ? 8 : 0);
- if (i || j)if (e)e.animate(e.crisp(null, null, null, c - m, d - m)); else {
- e = {fill: j || U};
- if (i)e.stroke = a.borderColor, e["stroke-width"] = i;
- this.chartBackground = b.rect(m / 2, m / 2, c -
- m, d - m, a.borderRadius, i).attr(e).add().shadow(a.shadow)
- }
- if (k)f ? f.animate(p) : this.plotBackground = b.rect(this.plotLeft, this.plotTop, this.plotWidth, this.plotHeight, 0).attr({fill: k}).add().shadow(a.plotShadow);
- if (l)h ? h.animate(p) : this.plotBGImage = b.image(l, this.plotLeft, this.plotTop, this.plotWidth, this.plotHeight).add();
- if (a.plotBorderWidth)g ? g.animate(g.crisp(null, this.plotLeft, this.plotTop, this.plotWidth, this.plotHeight)) : this.plotBorder = b.rect(this.plotLeft, this.plotTop, this.plotWidth, this.plotHeight,
- 0, a.plotBorderWidth).attr({stroke: a.plotBorderColor, "stroke-width": a.plotBorderWidth, zIndex: 4}).add();
- this.isDirtyBox = !1
- }, propFromSeries: function () {
- var a = this, b = a.options.chart, c, d = a.options.series, e, f;
- n(["inverted", "angular", "polar"], function (g) {
- c = Y[b.type || b.defaultSeriesType];
- f = a[g] || b[g] || c && c.prototype[g];
- for (e = d && d.length; !f && e--;)(c = Y[d[e].type]) && c.prototype[g] && (f = !0);
- a[g] = f
- })
- }, render: function () {
- var a = this, b = a.axes, c = a.renderer, d = a.options, e = d.labels, d = d.credits, f;
- a.setTitle();
- a.legend = new qb(a);
- n(b, function (a) {
- a.setScale()
- });
- a.getMargins();
- a.maxTicks = null;
- n(b, function (a) {
- a.setTickPositions(!0);
- a.setMaxTicks()
- });
- a.adjustTickAmounts();
- a.getMargins();
- a.drawChartBox();
- a.hasCartesianSeries && n(b, function (a) {
- a.render()
- });
- if (!a.seriesGroup)a.seriesGroup = c.g("series-group").attr({zIndex: 3}).add();
- n(a.series, function (a) {
- a.translate();
- a.setTooltipPoints();
- a.render()
- });
- e.items && n(e.items, function () {
- var b = u(e.style, this.style), d = w(b.left) + a.plotLeft, f = w(b.top) + a.plotTop + 12;
- delete b.left;
- delete b.top;
- c.text(this.html, d, f).attr({zIndex: 2}).css(b).add()
- });
- if (d.enabled && !a.credits)f = d.href, a.credits = c.text(d.text, 0, 0).on("click",function () {
- if (f)location.href = f
- }).attr({align: d.position.align, zIndex: 8}).css(d.style).add().align(d.position);
- a.hasRendered = !0
- }, destroy: function () {
- var a = this, b = a.axes, c = a.series, d = a.container, e, f = d && d.parentNode;
- if (a !== null) {
- E(a, "destroy");
- P(a);
- for (e = b.length; e--;)b[e] = b[e].destroy();
- for (e = c.length; e--;)c[e] = c[e].destroy();
- n("title,subtitle,chartBackground,plotBackground,plotBGImage,plotBorder,seriesGroup,clipRect,credits,tracker,scroller,rangeSelector,legend,resetZoomButton,tooltip,renderer".split(","),
- function (b) {
- var c = a[b];
- c && (a[b] = c.destroy())
- });
- if (d)d.innerHTML = "", P(d), f && Qa(d), d = null;
- for (e in a)delete a[e];
- a = a.options = null
- }
- }, firstRender: function () {
- var a = this, b = a.options, c = a.callback;
- if (!Da && N == N.top && B.readyState !== "complete" || ga && !N.canvg)ga ? Nb.push(function () {
- a.firstRender()
- }, b.global.canvasToolsURL) : B.attachEvent("onreadystatechange", function () {
- B.detachEvent("onreadystatechange", a.firstRender);
- B.readyState === "complete" && a.firstRender()
- }); else {
- a.getContainer();
- E(a, "init");
- if (Highcharts.RangeSelector &&
- b.rangeSelector.enabled)a.rangeSelector = new Highcharts.RangeSelector(a);
- a.resetMargins();
- a.setChartSize();
- a.propFromSeries();
- a.getAxes();
- n(b.series || [], function (b) {
- a.initSeries(b)
- });
- if (Highcharts.Scroller && (b.navigator.enabled || b.scrollbar.enabled))a.scroller = new Highcharts.Scroller(a);
- a.tracker = new Db(a, b);
- a.render();
- a.renderer.draw();
- c && c.apply(a, [a]);
- n(a.callbacks, function (b) {
- b.apply(a, [a])
- });
- a.cloneRenderTo(!0);
- E(a, "load")
- }
- }, init: function (a) {
- var b = this.options.chart, c;
- b.reflow !== !1 && I(this, "load",
- this.initReflow);
- if (a)for (c in a)I(this, c, a[c]);
- this.xAxis = [];
- this.yAxis = [];
- this.animation = ga ? !1 : o(b.animation, !0);
- this.setSize = this.resize;
- this.pointCount = 0;
- this.counters = new Ab;
- this.firstRender()
- }};
- rb.prototype.callbacks = [];
- var Wa = function () {
- };
- Wa.prototype = {init: function (a, b, c) {
- var d = a.chart.counters;
- this.series = a;
- this.applyOptions(b, c);
- this.pointAttr = {};
- if (a.options.colorByPoint) {
- b = a.chart.options.colors;
- if (!this.options)this.options = {};
- this.color = this.options.color = this.color || b[d.color++];
- d.wrapColor(b.length)
- }
- a.chart.pointCount++;
- return this
- }, applyOptions: function (a, b) {
- var c = this.series, d = typeof a;
- this.config = a;
- if (d === "number" || a === null)this.y = a; else if (typeof a[0] === "number")this.x = a[0], this.y = a[1]; else if (d === "object" && typeof a.length !== "number") {
- if (u(this, a), this.options = a, a.dataLabels)c._hasPointLabels = !0
- } else if (typeof a[0] === "string")this.name = a[0], this.y = a[1];
- if (this.x === A)this.x = b === A ? c.autoIncrement() : b
- }, destroy: function () {
- var a = this.series.chart, b = a.hoverPoints, c;
- a.pointCount--;
- if (b && (this.setState(), za(b, this),
- !b.length))a.hoverPoints = null;
- if (this === a.hoverPoint)this.onMouseOut();
- if (this.graphic || this.dataLabel)P(this), this.destroyElements();
- this.legendItem && a.legend.destroyItem(this);
- for (c in this)this[c] = null
- }, destroyElements: function () {
- for (var a = "graphic,tracker,dataLabel,group,connector,shadowGroup".split(","), b, c = 6; c--;)b = a[c], this[b] && (this[b] = this[b].destroy())
- }, getLabelConfig: function () {
- return{x: this.category, y: this.y, key: this.name || this.category, series: this.series, point: this, percentage: this.percentage,
- total: this.total || this.stackTotal}
- }, select: function (a, b) {
- var c = this, d = c.series.chart, a = o(a, !c.selected);
- c.firePointEvent(a ? "select" : "unselect", {accumulate: b}, function () {
- c.selected = a;
- c.setState(a && "select");
- b || n(d.getSelectedPoints(), function (a) {
- if (a.selected && a !== c)a.selected = !1, a.setState(""), a.firePointEvent("unselect")
- })
- })
- }, onMouseOver: function () {
- var a = this.series, b = a.chart, c = b.tooltip, d = b.hoverPoint;
- if (d && d !== this)d.onMouseOut();
- this.firePointEvent("mouseOver");
- c && (!c.shared || a.noSharedTooltip) &&
- c.refresh(this);
- this.setState("hover");
- b.hoverPoint = this
- }, onMouseOut: function () {
- this.firePointEvent("mouseOut");
- this.setState();
- this.series.chart.hoverPoint = null
- }, tooltipFormatter: function (a) {
- var b = this.series, c = b.tooltipOptions, d = a.match(/\{(series|point)\.[a-zA-Z]+\}/g), e = /[{\.}]/, f, g, h, i, j = {y: 0, open: 0, high: 0, low: 0, close: 0, percentage: 1, total: 1};
- c.valuePrefix = c.valuePrefix || c.yPrefix;
- c.valueDecimals = c.valueDecimals || c.yDecimals;
- c.valueSuffix = c.valueSuffix || c.ySuffix;
- for (i in d)g = d[i], ra(g) && g !==
- a && (h = (" " + g).split(e), f = {point: this, series: b}[h[1]], h = h[2], f === this && j.hasOwnProperty(h) ? (f = j[h] ? h : "value", f = (c[f + "Prefix"] || "") + Xa(this[h], o(c[f + "Decimals"], -1)) + (c[f + "Suffix"] || "")) : f = f[h], a = a.replace(g, f));
- return a
- }, update: function (a, b, c) {
- var d = this, e = d.series, f = d.graphic, g, h = e.data, i = h.length, j = e.chart, b = o(b, !0);
- d.firePointEvent("update", {options: a}, function () {
- d.applyOptions(a);
- aa(a) && (e.getAttribs(), f && f.attr(d.pointAttr[e.state]));
- for (g = 0; g < i; g++)if (h[g] === d) {
- e.xData[g] = d.x;
- e.yData[g] = d.y;
- e.options.data[g] = a;
- break
- }
- e.isDirty = !0;
- e.isDirtyData = !0;
- b && j.redraw(c)
- })
- }, remove: function (a, b) {
- var c = this, d = c.series, e = d.chart, f, g = d.data, h = g.length;
- ua(b, e);
- a = o(a, !0);
- c.firePointEvent("remove", null, function () {
- for (f = 0; f < h; f++)if (g[f] === c) {
- g.splice(f, 1);
- d.options.data.splice(f, 1);
- d.xData.splice(f, 1);
- d.yData.splice(f, 1);
- break
- }
- c.destroy();
- d.isDirty = !0;
- d.isDirtyData = !0;
- a && e.redraw()
- })
- }, firePointEvent: function (a, b, c) {
- var d = this, e = this.series.options;
- (e.point.events[a] || d.options && d.options.events && d.options.events[a]) &&
- this.importEvents();
- a === "click" && e.allowPointSelect && (c = function (a) {
- d.select(null, a.ctrlKey || a.metaKey || a.shiftKey)
- });
- E(this, a, b, c)
- }, importEvents: function () {
- if (!this.hasImportedEvents) {
- var a = C(this.series.options.point, this.options).events, b;
- this.events = a;
- for (b in a)I(this, b, a[b]);
- this.hasImportedEvents = !0
- }
- }, setState: function (a) {
- var b = this.plotX, c = this.plotY, d = this.series, e = d.options.states, f = Z[d.type].marker && d.options.marker, g = f && !f.enabled, h = f && f.states[a], i = h && h.enabled === !1, j = d.stateMarkerGraphic,
- k = d.chart, l = this.pointAttr, a = a || "";
- if (!(a === this.state || this.selected && a !== "select" || e[a] && e[a].enabled === !1 || a && (i || g && !h.enabled))) {
- if (this.graphic)e = f && this.graphic.symbolName && l[a].r, this.graphic.attr(C(l[a], e ? {x: b - e, y: c - e, width: 2 * e, height: 2 * e} : {})); else {
- if (a && h) {
- if (!j)e = h.radius, d.stateMarkerGraphic = j = k.renderer.symbol(d.symbol, -e, -e, 2 * e, 2 * e).attr(l[a]).add(d.group);
- j.translate(b, c)
- }
- if (j)j[a ? "show" : "hide"]()
- }
- this.state = a
- }
- }};
- var R = function () {
- };
- R.prototype = {isCartesian: !0, type: "line", pointClass: Wa,
- sorted: !0, pointAttrToOptions: {stroke: "lineColor", "stroke-width": "lineWidth", fill: "fillColor", r: "radius"}, init: function (a, b) {
- var c, d;
- d = a.series.length;
- this.chart = a;
- this.options = b = this.setOptions(b);
- this.bindAxes();
- u(this, {index: d, name: b.name || "Series " + (d + 1), state: "", pointAttr: {}, visible: b.visible !== !1, selected: b.selected === !0});
- if (ga)b.animation = !1;
- d = b.events;
- for (c in d)I(this, c, d[c]);
- if (d && d.click || b.point && b.point.events && b.point.events.click || b.allowPointSelect)a.runTrackerClick = !0;
- this.getColor();
- this.getSymbol();
- this.setData(b.data, !1);
- if (this.isCartesian)a.hasCartesianSeries = !0;
- a.series.push(this)
- }, bindAxes: function () {
- var a = this, b = a.options, c = a.chart, d;
- a.isCartesian && n(["xAxis", "yAxis"], function (e) {
- n(c[e], function (c) {
- d = c.options;
- if (b[e] === d.index || b[e] === A && d.index === 0)c.series.push(a), a[e] = c, c.isDirty = !0
- })
- })
- }, autoIncrement: function () {
- var a = this.options, b = this.xIncrement, b = o(b, a.pointStart, 0);
- this.pointInterval = o(this.pointInterval, a.pointInterval, 1);
- this.xIncrement = b + this.pointInterval;
- return b
- }, getSegments: function () {
- var a = -1, b = [], c, d = this.points, e = d.length;
- if (e)if (this.options.connectNulls) {
- for (c = e; c--;)d[c].y === null && d.splice(c, 1);
- d.length && (b = [d])
- } else n(d, function (c, g) {
- c.y === null ? (g > a + 1 && b.push(d.slice(a + 1, g)), a = g) : g === e - 1 && b.push(d.slice(a + 1, g + 1))
- });
- this.segments = b
- }, setOptions: function (a) {
- var b = this.chart.options, c = b.plotOptions, d = a.data;
- a.data = null;
- c = C(c[this.type], c.series, a);
- c.data = a.data = d;
- this.tooltipOptions = C(b.tooltip, c.tooltip);
- return c
- }, getColor: function () {
- var a =
- this.options, b = this.chart.options.colors, c = this.chart.counters;
- this.color = a.color || !a.colorByPoint && b[c.color++] || "gray";
- c.wrapColor(b.length)
- }, getSymbol: function () {
- var a = this.options.marker, b = this.chart, c = b.options.symbols, b = b.counters;
- this.symbol = a.symbol || c[b.symbol++];
- if (/^url/.test(this.symbol))a.radius = 0;
- b.wrapSymbol(c.length)
- }, drawLegendSymbol: function (a) {
- var b = this.options, c = b.marker, d = a.options.symbolWidth, e = this.chart.renderer, f = this.legendGroup, a = a.baseline, g;
- if (b.lineWidth) {
- g = {"stroke-width": b.lineWidth};
- if (b.dashStyle)g.dashstyle = b.dashStyle;
- this.legendLine = e.path(["M", 0, a - 4, "L", d, a - 4]).attr(g).add(f)
- }
- if (c && c.enabled)b = c.radius, this.legendSymbol = e.symbol(this.symbol, d / 2 - b, a - 4 - b, 2 * b, 2 * b).attr(this.pointAttr[""]).add(f)
- }, addPoint: function (a, b, c, d) {
- var e = this.data, f = this.graph, g = this.area, h = this.chart, i = this.xData, j = this.yData, k = f && f.shift || 0, l = this.options.data;
- ua(d, h);
- if (f && c)f.shift = k + 1;
- if (g) {
- if (c)g.shift = k + 1;
- g.isArea = !0
- }
- b = o(b, !0);
- d = {series: this};
- this.pointClass.prototype.applyOptions.apply(d, [a]);
- i.push(d.x);
- j.push(this.valueCount === 4 ? [d.open, d.high, d.low, d.close] : d.y);
- l.push(a);
- c && (e[0] && e[0].remove ? e[0].remove(!1) : (e.shift(), i.shift(), j.shift(), l.shift()));
- this.getAttribs();
- this.isDirtyData = this.isDirty = !0;
- b && h.redraw()
- }, setData: function (a, b) {
- var c = this.points, d = this.options, e = this.initialColor, f = this.chart, g = null, h = this.xAxis, i = this.pointClass.prototype;
- this.xIncrement = null;
- this.pointRange = h && h.categories && 1 || d.pointRange;
- if (s(e))f.counters.color = e;
- var j = [], k = [], l = a ? a.length : [], m = this.valueCount;
- if (l > (d.turboThreshold || 1E3)) {
- for (e = 0; g === null && e < l;)g = a[e], e++;
- if (Ka(g)) {
- i = o(d.pointStart, 0);
- d = o(d.pointInterval, 1);
- for (e = 0; e < l; e++)j[e] = i, k[e] = a[e], i += d;
- this.xIncrement = i
- } else if (Ja(g))if (m)for (e = 0; e < l; e++)d = a[e], j[e] = d[0], k[e] = d.slice(1, m + 1); else for (e = 0; e < l; e++)d = a[e], j[e] = d[0], k[e] = d[1]
- } else for (e = 0; e < l; e++)d = {series: this}, i.applyOptions.apply(d, [a[e]]), j[e] = d.x, k[e] = i.toYData ? i.toYData.apply(d) : d.y;
- this.data = [];
- this.options.data = a;
- this.xData = j;
- this.yData = k;
- for (e = c && c.length || 0; e--;)c[e] && c[e].destroy &&
- c[e].destroy();
- if (h)h.minRange = h.userMinRange;
- this.isDirty = this.isDirtyData = f.isDirtyBox = !0;
- o(b, !0) && f.redraw(!1)
- }, remove: function (a, b) {
- var c = this, d = c.chart, a = o(a, !0);
- if (!c.isRemoving)c.isRemoving = !0, E(c, "remove", null, function () {
- c.destroy();
- d.isDirtyLegend = d.isDirtyBox = !0;
- a && d.redraw(b)
- });
- c.isRemoving = !1
- }, processData: function (a) {
- var b = this.xData, c = this.yData, d = b.length, e = 0, f = d, g, h, i = this.xAxis, j = this.options, k = j.cropThreshold, l = this.isCartesian;
- if (l && !this.isDirty && !i.isDirty && !this.yAxis.isDirty && !a)return!1;
- if (l && this.sorted && (!k || d > k || this.forceCrop))if (a = i.getExtremes(), i = a.min, k = a.max, b[d - 1] < i || b[0] > k)b = [], c = []; else if (b[0] < i || b[d - 1] > k) {
- for (a = 0; a < d; a++)if (b[a] >= i) {
- e = x(0, a - 1);
- break
- }
- for (; a < d; a++)if (b[a] > k) {
- f = a + 1;
- break
- }
- b = b.slice(e, f);
- c = c.slice(e, f);
- g = !0
- }
- for (a = b.length - 1; a > 0; a--)if (d = b[a] - b[a - 1], d > 0 && (h === A || d < h))h = d;
- this.cropped = g;
- this.cropStart = e;
- this.processedXData = b;
- this.processedYData = c;
- if (j.pointRange === null)this.pointRange = h || 1;
- this.closestPointRange = h
- }, generatePoints: function () {
- var a =
- this.options.data, b = this.data, c, d = this.processedXData, e = this.processedYData, f = this.pointClass, g = d.length, h = this.cropStart || 0, i, j = this.hasGroupedData, k, l = [], m;
- if (!b && !j)b = [], b.length = a.length, b = this.data = b;
- for (m = 0; m < g; m++)i = h + m, j ? l[m] = (new f).init(this, [d[m]].concat(na(e[m]))) : (b[i] ? k = b[i] : a[i] !== A && (b[i] = k = (new f).init(this, a[i], d[m])), l[m] = k);
- if (b && (g !== (c = b.length) || j))for (m = 0; m < c; m++)if (m === h && !j && (m += g), b[m])b[m].destroyElements(), b[m].plotX = A;
- this.data = b;
- this.points = l
- }, translate: function () {
- this.processedXData ||
- this.processData();
- this.generatePoints();
- for (var a = this.chart, b = this.options, c = b.stacking, d = this.xAxis, e = d.categories, f = this.yAxis, g = this.points, h = g.length, i = !!this.modifyValue, j, k = f.series, l = k.length; l--;)if (k[l].visible) {
- l === this.index && (j = !0);
- break
- }
- for (l = 0; l < h; l++) {
- var k = g[l], m = k.x, p = k.y, n = k.low, o = f.stacks[(p < b.threshold ? "-" : "") + this.stackKey];
- k.plotX = d.translate(m, 0, 0, 0, 1);
- if (c && this.visible && o && o[m]) {
- n = o[m];
- m = n.total;
- n.cum = n = n.cum - p;
- p = n + p;
- if (j)n = b.threshold;
- c === "percent" && (n = m ? n * 100 / m : 0, p = m ?
- p * 100 / m : 0);
- k.percentage = m ? k.y * 100 / m : 0;
- k.stackTotal = m;
- k.stackY = p
- }
- k.yBottom = s(n) ? f.translate(n, 0, 1, 0, 1) : null;
- i && (p = this.modifyValue(p, k));
- k.plotY = typeof p === "number" ? t(f.translate(p, 0, 1, 0, 1) * 10) / 10 : A;
- k.clientX = a.inverted ? a.plotHeight - k.plotX : k.plotX;
- k.category = e && e[k.x] !== A ? e[k.x] : k.x
- }
- this.getSegments()
- }, setTooltipPoints: function (a) {
- var b = [], c = this.chart.plotSizeX, d, e;
- d = this.xAxis;
- var f, g, h = [];
- if (this.options.enableMouseTracking !== !1) {
- if (a)this.tooltipPoints = null;
- n(this.segments || this.points, function (a) {
- b =
- b.concat(a)
- });
- d && d.reversed && (b = b.reverse());
- a = b.length;
- for (g = 0; g < a; g++) {
- f = b[g];
- d = b[g - 1] ? b[g - 1]._high + 1 : 0;
- for (f._high = e = b[g + 1] ? x(0, W((f.plotX + (b[g + 1] ? b[g + 1].plotX : c)) / 2)) : c; d >= 0 && d <= e;)h[d++] = f
- }
- this.tooltipPoints = h
- }
- }, tooltipHeaderFormatter: function (a) {
- var b = this.tooltipOptions, c = b.xDateFormat, d = this.xAxis, e = d && d.options.type === "datetime", f;
- if (e && !c)for (f in D)if (D[f] >= d.closestPointRange) {
- c = b.dateTimeLabelFormats[f];
- break
- }
- return b.headerFormat.replace("{point.key}", e ? db(c, a) : a).replace("{series.name}",
- this.name).replace("{series.color}", this.color)
- }, onMouseOver: function () {
- var a = this.chart, b = a.hoverSeries;
- if (ea || !a.mouseIsDown) {
- if (b && b !== this)b.onMouseOut();
- this.options.events.mouseOver && E(this, "mouseOver");
- this.setState("hover");
- a.hoverSeries = this
- }
- }, onMouseOut: function () {
- var a = this.options, b = this.chart, c = b.tooltip, d = b.hoverPoint;
- if (d)d.onMouseOut();
- this && a.events.mouseOut && E(this, "mouseOut");
- c && !a.stickyTracking && !c.shared && c.hide();
- this.setState();
- b.hoverSeries = null
- }, animate: function (a) {
- var b =
- this.chart, c = this.clipRect, d = this.options.animation;
- d && !aa(d) && (d = {});
- if (a) {
- if (!c.isAnimating)c.attr("width", 0), c.isAnimating = !0
- } else c.animate({width: b.plotSizeX}, d), this.animate = null
- }, drawPoints: function () {
- var a, b = this.points, c = this.chart, d, e, f, g, h, i, j, k;
- if (this.options.marker.enabled)for (f = b.length; f--;)if (g = b[f], d = g.plotX, e = g.plotY, k = g.graphic, e !== A && !isNaN(e))if (a = g.pointAttr[g.selected ? "select" : ""], h = a.r, i = o(g.marker && g.marker.symbol, this.symbol), j = i.indexOf("url") === 0, k)k.animate(u({x: d - h,
- y: e - h}, k.symbolName ? {width: 2 * h, height: 2 * h} : {})); else if (h > 0 || j)g.graphic = c.renderer.symbol(i, d - h, e - h, 2 * h, 2 * h).attr(a).add(this.group)
- }, convertAttribs: function (a, b, c, d) {
- var e = this.pointAttrToOptions, f, g, h = {}, a = a || {}, b = b || {}, c = c || {}, d = d || {};
- for (f in e)g = e[f], h[f] = o(a[g], b[f], c[f], d[f]);
- return h
- }, getAttribs: function () {
- var a = this, b = Z[a.type].marker ? a.options.marker : a.options, c = b.states, d = c.hover, e, f = a.color, g = {stroke: f, fill: f}, h = a.points || [], i = [], j, k = a.pointAttrToOptions, l;
- a.options.marker ? (d.radius =
- d.radius || b.radius + 2, d.lineWidth = d.lineWidth || b.lineWidth + 1) : d.color = d.color || pa(d.color || f).brighten(d.brightness).get();
- i[""] = a.convertAttribs(b, g);
- n(["hover", "select"], function (b) {
- i[b] = a.convertAttribs(c[b], i[""])
- });
- a.pointAttr = i;
- for (f = h.length; f--;) {
- g = h[f];
- if ((b = g.options && g.options.marker || g.options) && b.enabled === !1)b.radius = 0;
- e = !1;
- if (g.options)for (l in k)s(b[k[l]]) && (e = !0);
- if (e) {
- j = [];
- c = b.states || {};
- e = c.hover = c.hover || {};
- if (!a.options.marker)e.color = pa(e.color || g.options.color).brighten(e.brightness ||
- d.brightness).get();
- j[""] = a.convertAttribs(b, i[""]);
- j.hover = a.convertAttribs(c.hover, i.hover, j[""]);
- j.select = a.convertAttribs(c.select, i.select, j[""])
- } else j = i;
- g.pointAttr = j
- }
- }, destroy: function () {
- var a = this, b = a.chart, c = a.clipRect, d = /AppleWebKit\/533/.test(ya), e, f, g = a.data || [], h, i, j;
- E(a, "destroy");
- P(a);
- n(["xAxis", "yAxis"], function (b) {
- if (j = a[b])za(j.series, a), j.isDirty = !0
- });
- a.legendItem && a.chart.legend.destroyItem(a);
- for (f = g.length; f--;)(h = g[f]) && h.destroy && h.destroy();
- a.points = null;
- if (c && c !== b.clipRect)a.clipRect =
- c.destroy();
- n("area,graph,dataLabelsGroup,group,tracker,trackerGroup".split(","), function (b) {
- a[b] && (e = d && b === "group" ? "hide" : "destroy", a[b][e]())
- });
- if (b.hoverSeries === a)b.hoverSeries = null;
- za(b.series, a);
- for (i in a)delete a[i]
- }, drawDataLabels: function () {
- var a = this, b = a.options, c = b.dataLabels;
- if (c.enabled || a._hasPointLabels) {
- var d, e, f = a.points, g, h, i, j = a.dataLabelsGroup, k = a.chart, l = a.xAxis, l = l ? l.left : k.plotLeft, m = a.yAxis, m = m ? m.top : k.plotTop, p = k.renderer, q = k.inverted, u = a.type, r = b.stacking, y = u === "column" ||
- u === "bar", x = c.verticalAlign === null, w = c.y === null, v = p.fontMetrics(c.style.fontSize), H = v.h, J = v.b, K, z;
- y && (v = {top: J, middle: J - H / 2, bottom: -H + J}, r ? (x && (c = C(c, {verticalAlign: "middle"})), w && (c = C(c, {y: v[c.verticalAlign]}))) : x ? c = C(c, {verticalAlign: "top"}) : w && (c = C(c, {y: v[c.verticalAlign]})));
- j ? j.translate(l, m) : j = a.dataLabelsGroup = p.g("data-labels").attr({visibility: a.visible ? "visible" : "hidden", zIndex: 6}).translate(l, m).add();
- h = c;
- n(f, function (f) {
- K = f.dataLabel;
- c = h;
- (g = f.options) && g.dataLabels && (c = C(c, g.dataLabels));
- if (z = c.enabled) {
- var l = f.barX && f.barX + f.barW / 2 || o(f.plotX, -999), m = o(f.plotY, -999), n = c.y === null ? f.y >= b.threshold ? -H + J : J : c.y;
- d = (q ? k.plotWidth - m : l) + c.x;
- e = t((q ? k.plotHeight - l : m) + n)
- }
- if (K && a.isCartesian && (!k.isInsidePlot(d, e) || !z))f.dataLabel = K.destroy(); else if (z) {
- var l = c.align, v;
- i = c.formatter.call(f.getLabelConfig(), c);
- u === "column" && (d += {left: -1, right: 1}[l] * f.barW / 2 || 0);
- !r && q && f.y < 0 && (l = "right", d -= 10);
- c.style.color = o(c.color, c.style.color, a.color, "black");
- if (K)K.attr({text: i}).animate({x: d, y: e}); else if (s(i)) {
- l =
- {align: l, fill: c.backgroundColor, stroke: c.borderColor, "stroke-width": c.borderWidth, r: c.borderRadius || 0, rotation: c.rotation, padding: c.padding, zIndex: 1};
- for (v in l)l[v] === A && delete l[v];
- K = f.dataLabel = p[c.rotation ? "text" : "label"](i, d, e, null, null, null, c.useHTML, !0).attr(l).css(c.style).add(j).shadow(c.shadow)
- }
- if (y && b.stacking && K)v = f.barX, l = f.barY, m = f.barW, f = f.barH, K.align(c, null, {x: q ? k.plotWidth - l - f : v, y: q ? k.plotHeight - v - m : l, width: q ? f : m, height: q ? m : f})
- }
- })
- }
- }, getSegmentPath: function (a) {
- var b = this, c = [];
- n(a,
- function (d, e) {
- b.getPointSpline ? c.push.apply(c, b.getPointSpline(a, d, e)) : (c.push(e ? "L" : "M"), e && b.options.step && c.push(d.plotX, a[e - 1].plotY), c.push(d.plotX, d.plotY))
- });
- return c
- }, drawGraph: function () {
- var a = this, b = a.options, c = a.graph, d = [], e = a.group, f = b.lineColor || a.color, g = b.lineWidth, h = b.dashStyle, i, j = a.chart.renderer, k = [];
- n(a.segments, function (b) {
- i = a.getSegmentPath(b);
- b.length > 1 ? d = d.concat(i) : k.push(b[0])
- });
- a.graphPath = d;
- a.singlePoints = k;
- if (c)Fa(c), c.animate({d: d}); else if (g) {
- c = {stroke: f, "stroke-width": g};
- if (h)c.dashstyle = h;
- a.graph = j.path(d).attr(c).add(e).shadow(b.shadow)
- }
- }, invertGroups: function () {
- function a() {
- var a = {width: b.yAxis.len, height: b.xAxis.len};
- c.attr(a).invert();
- d && d.attr(a).invert()
- }
-
- var b = this, c = b.group, d = b.trackerGroup, e = b.chart;
- I(e, "resize", a);
- I(b, "destroy", function () {
- P(e, "resize", a)
- });
- a();
- b.invertGroups = a
- }, createGroup: function () {
- var a = this.chart;
- (this.group = a.renderer.g("series")).attr({visibility: this.visible ? "visible" : "hidden", zIndex: this.options.zIndex}).translate(this.xAxis.left,
- this.yAxis.top).add(a.seriesGroup);
- this.createGroup = Sb
- }, render: function () {
- var a = this, b = a.chart, c, d = a.options, e = d.clip !== !1, f = d.animation, f = (d = f && a.animate) ? f && f.duration || 500 : 0, g = a.clipRect, h = b.renderer;
- if (!g && (g = a.clipRect = !b.hasRendered && b.clipRect ? b.clipRect : h.clipRect(0, 0, b.plotSizeX, b.plotSizeY + 1), !b.clipRect))b.clipRect = g;
- a.createGroup();
- c = a.group;
- a.drawDataLabels();
- d && a.animate(!0);
- a.getAttribs();
- a.drawGraph && a.drawGraph();
- a.drawPoints();
- a.options.enableMouseTracking !== !1 && a.drawTracker();
- b.inverted && a.invertGroups();
- e && !a.hasRendered && (c.clip(g), a.trackerGroup && a.trackerGroup.clip(b.clipRect));
- d && a.animate();
- setTimeout(function () {
- g.isAnimating = !1;
- if ((c = a.group) && g !== b.clipRect && g.renderer) {
- if (e)c.clip(a.clipRect = b.clipRect);
- g.destroy()
- }
- }, f);
- a.isDirty = a.isDirtyData = !1;
- a.hasRendered = !0
- }, redraw: function () {
- var a = this.chart, b = this.isDirtyData, c = this.group;
- c && (a.inverted && c.attr({width: a.plotWidth, height: a.plotHeight}), c.animate({translateX: this.xAxis.left, translateY: this.yAxis.top}));
- this.translate();
- this.setTooltipPoints(!0);
- this.render();
- b && E(this, "updatedData")
- }, setState: function (a) {
- var b = this.options, c = this.graph, d = b.states, b = b.lineWidth, a = a || "";
- if (this.state !== a)this.state = a, d[a] && d[a].enabled === !1 || (a && (b = d[a].lineWidth || b + 1), c && !c.dashstyle && c.attr({"stroke-width": b}, a ? 0 : 500))
- }, setVisible: function (a, b) {
- var c = this.chart, d = this.legendItem, e = this.group, f = this.tracker, g = this.dataLabelsGroup, h, i = this.points, j = c.options.chart.ignoreHiddenSeries;
- h = this.visible;
- h = (this.visible =
- a = a === A ? !h : a) ? "show" : "hide";
- if (e)e[h]();
- if (f)f[h](); else if (i)for (e = i.length; e--;)if (f = i[e], f.tracker)f.tracker[h]();
- if (g)g[h]();
- d && c.legend.colorizeItem(this, a);
- this.isDirty = !0;
- this.options.stacking && n(c.series, function (a) {
- if (a.options.stacking && a.visible)a.isDirty = !0
- });
- if (j)c.isDirtyBox = !0;
- b !== !1 && c.redraw();
- E(this, h)
- }, show: function () {
- this.setVisible(!0)
- }, hide: function () {
- this.setVisible(!1)
- }, select: function (a) {
- this.selected = a = a === A ? !this.selected : a;
- if (this.checkbox)this.checkbox.checked = a;
- E(this,
- a ? "select" : "unselect")
- }, drawTrackerGroup: function () {
- var a = this.trackerGroup, b = this.chart;
- if (this.isCartesian) {
- if (!a)this.trackerGroup = a = b.renderer.g().attr({zIndex: this.options.zIndex || 1}).add(b.trackerGroup);
- a.translate(this.xAxis.left, this.yAxis.top)
- }
- return a
- }, drawTracker: function () {
- var a = this, b = a.options, c = b.trackByArea, d = [].concat(c ? a.areaPath : a.graphPath), e = d.length, f = a.chart, g = f.renderer, h = f.options.tooltip.snap, i = a.tracker, j = b.cursor, j = j && {cursor: j}, k = a.singlePoints, l = a.drawTrackerGroup(),
- m;
- if (e && !c)for (m = e + 1; m--;)d[m] === "M" && d.splice(m + 1, 0, d[m + 1] - h, d[m + 2], "L"), (m && d[m] === "M" || m === e) && d.splice(m, 0, "L", d[m - 2] + h, d[m - 1]);
- for (m = 0; m < k.length; m++)e = k[m], d.push("M", e.plotX - h, e.plotY, "L", e.plotX + h, e.plotY);
- i ? i.attr({d: d}) : a.tracker = g.path(d).attr({isTracker: !0, "stroke-linejoin": "bevel", visibility: a.visible ? "visible" : "hidden", stroke: tb, fill: c ? tb : U, "stroke-width": b.lineWidth + (c ? 0 : 2 * h)}).on(ea ? "touchstart" : "mouseover",function () {
- if (f.hoverSeries !== a)a.onMouseOver()
- }).on("mouseout",function () {
- if (!b.stickyTracking)a.onMouseOut()
- }).css(j).add(l)
- }};
- G = ca(R);
- Y.line = G;
- Z.area = C(T, {threshold: 0});
- G = ca(R, {type: "area", getSegmentPath: function (a) {
- var b = R.prototype.getSegmentPath.call(this, a), c = [].concat(b), d, e = this.options;
- d = b.length;
- var f = this.yAxis.getThreshold(e.threshold);
- d === 3 && c.push("L", b[1], b[2]);
- if (e.stacking && this.type !== "areaspline")for (d = a.length - 1; d >= 0; d--)d < a.length - 1 && e.step && c.push(a[d + 1].plotX, a[d].yBottom), c.push(a[d].plotX, a[d].yBottom); else c.push("L", a[a.length - 1].plotX, f, "L", a[0].plotX, f);
- this.areaPath = this.areaPath.concat(c);
- return b
- },
- drawGraph: function () {
- this.areaPath = [];
- R.prototype.drawGraph.apply(this);
- var a = this.areaPath, b = this.options, c = this.area;
- c ? c.animate({d: a}) : this.area = this.chart.renderer.path(a).attr({fill: o(b.fillColor, pa(this.color).setOpacity(b.fillOpacity || 0.75).get())}).add(this.group)
- }, drawLegendSymbol: function (a, b) {
- b.legendSymbol = this.chart.renderer.rect(0, a.baseline - 11, a.options.symbolWidth, 12, 2).attr({zIndex: 3}).add(b.legendGroup)
- }});
- Y.area = G;
- Z.spline = C(T);
- ha = ca(R, {type: "spline", getPointSpline: function (a, b, c) {
- var d = b.plotX, e = b.plotY, f = a[c - 1], g = a[c + 1], h, i, j, k;
- if (c && c < a.length - 1) {
- a = f.plotY;
- j = g.plotX;
- var g = g.plotY, l;
- h = (1.5 * d + f.plotX) / 2.5;
- i = (1.5 * e + a) / 2.5;
- j = (1.5 * d + j) / 2.5;
- k = (1.5 * e + g) / 2.5;
- l = (k - i) * (j - d) / (j - h) + e - k;
- i += l;
- k += l;
- i > a && i > e ? (i = x(a, e), k = 2 * e - i) : i < a && i < e && (i = O(a, e), k = 2 * e - i);
- k > g && k > e ? (k = x(g, e), i = 2 * e - k) : k < g && k < e && (k = O(g, e), i = 2 * e - k);
- b.rightContX = j;
- b.rightContY = k
- }
- c ? (b = ["C", f.rightContX || f.plotX, f.rightContY || f.plotY, h || d, i || e, d, e], f.rightContX = f.rightContY = null) : b = ["M", d, e];
- return b
- }});
- Y.spline = ha;
- Z.areaspline =
- C(Z.area);
- var Ia = G.prototype, ha = ca(ha, {type: "areaspline", getSegmentPath: Ia.getSegmentPath, drawGraph: Ia.drawGraph});
- Y.areaspline = ha;
- Z.column = C(T, {borderColor: "#FFFFFF", borderWidth: 1, borderRadius: 0, groupPadding: 0.2, marker: null, pointPadding: 0.1, minPointLength: 0, cropThreshold: 50, pointRange: null, states: {hover: {brightness: 0.1, shadow: !1}, select: {color: "#C0C0C0", borderColor: "#000000", shadow: !1}}, dataLabels: {y: null, verticalAlign: null}, threshold: 0});
- ha = ca(R, {type: "column", tooltipOutsidePlot: !0, pointAttrToOptions: {stroke: "borderColor",
- "stroke-width": "borderWidth", fill: "color", r: "borderRadius"}, init: function () {
- R.prototype.init.apply(this, arguments);
- var a = this, b = a.chart;
- b.hasRendered && n(b.series, function (b) {
- if (b.type === a.type)b.isDirty = !0
- })
- }, translate: function () {
- var a = this, b = a.chart, c = a.options, d = c.stacking, e = c.borderWidth, f = 0, g = a.xAxis, h = g.reversed, i = {}, j, k;
- R.prototype.translate.apply(a);
- n(b.series, function (b) {
- if (b.type === a.type && b.visible && a.options.group === b.options.group)b.options.stacking ? (j = b.stackKey, i[j] === A && (i[j] = f++),
- k = i[j]) : k = f++, b.columnIndex = k
- });
- var l = a.points, g = M(g.transA) * (g.ordinalSlope || c.pointRange || g.closestPointRange || 1), m = g * c.groupPadding, p = (g - 2 * m) / f, q = c.pointWidth, t = s(q) ? (p - q) / 2 : p * c.pointPadding, r = o(q, p - 2 * t), y = wa(x(r, 1 + 2 * e)), w = t + (m + ((h ? f - a.columnIndex : a.columnIndex) || 0) * p - g / 2) * (h ? -1 : 1), z = a.yAxis.getThreshold(c.threshold), v = o(c.minPointLength, 5);
- n(l, function (c) {
- var f = c.plotY, g = o(c.yBottom, z), h = c.plotX + w, i = wa(O(f, g)), j = wa(x(f, g) - i), k = a.yAxis.stacks[(c.y < 0 ? "-" : "") + a.stackKey];
- d && a.visible && k && k[c.x] &&
- k[c.x].setOffset(w, y);
- M(j) < v && v && (j = v, i = M(i - z) > v ? g - v : z - (f <= z ? v : 0));
- u(c, {barX: h, barY: i, barW: y, barH: j, pointWidth: r});
- c.shapeType = "rect";
- c.shapeArgs = f = b.renderer.Element.prototype.crisp.call(0, e, h, i, y, j);
- e % 2 && (f.y -= 1, f.height += 1);
- c.trackerArgs = M(j) < 3 && C(c.shapeArgs, {height: 6, y: i - 3})
- })
- }, getSymbol: function () {
- }, drawLegendSymbol: G.prototype.drawLegendSymbol, drawGraph: function () {
- }, drawPoints: function () {
- var a = this, b = a.options, c = a.chart.renderer, d, e;
- n(a.points, function (f) {
- var g = f.plotY;
- if (g !== A && !isNaN(g) &&
- f.y !== null)d = f.graphic, e = f.shapeArgs, d ? (Fa(d), d.animate(C(e))) : f.graphic = d = c[f.shapeType](e).attr(f.pointAttr[f.selected ? "select" : ""]).add(a.group).shadow(b.shadow, null, b.stacking && !b.borderRadius)
- })
- }, drawTracker: function () {
- var a = this, b = a.chart, c = b.renderer, d, e, f = +new Date, g = a.options, h = g.cursor, i = h && {cursor: h}, j = a.drawTrackerGroup(), k, l, m;
- n(a.points, function (h) {
- e = h.tracker;
- d = h.trackerArgs || h.shapeArgs;
- l = h.plotY;
- m = !a.isCartesian || l !== A && !isNaN(l);
- delete d.strokeWidth;
- if (h.y !== null && m)e ? e.attr(d) :
- h.tracker = c[h.shapeType](d).attr({isTracker: f, fill: tb, visibility: a.visible ? "visible" : "hidden"}).on(ea ? "touchstart" : "mouseover",function (c) {
- k = c.relatedTarget || c.fromElement;
- if (b.hoverSeries !== a && z(k, "isTracker") !== f)a.onMouseOver();
- h.onMouseOver()
- }).on("mouseout",function (b) {
- if (!g.stickyTracking && (k = b.relatedTarget || b.toElement, z(k, "isTracker") !== f))a.onMouseOut()
- }).css(i).add(h.group || j)
- })
- }, animate: function (a) {
- var b = this, c = b.points, d = b.options;
- if (!a)n(c, function (a) {
- var c = a.graphic, a = a.shapeArgs, g =
- b.yAxis, h = d.threshold;
- c && (c.attr({height: 0, y: s(h) ? g.getThreshold(h) : g.translate(g.getExtremes().min, 0, 1, 0, 1)}), c.animate({height: a.height, y: a.y}, d.animation))
- }), b.animate = null
- }, remove: function () {
- var a = this, b = a.chart;
- b.hasRendered && n(b.series, function (b) {
- if (b.type === a.type)b.isDirty = !0
- });
- R.prototype.remove.apply(a, arguments)
- }});
- Y.column = ha;
- Z.bar = C(Z.column, {dataLabels: {align: "left", x: 5, y: null, verticalAlign: "middle"}});
- Ia = ca(ha, {type: "bar", inverted: !0});
- Y.bar = Ia;
- Z.scatter = C(T, {lineWidth: 0, states: {hover: {lineWidth: 0}},
- tooltip: {headerFormat: '{series.name} ', pointFormat: "x: {point.x} y: {point.y} "}});
- Ia = ca(R, {type: "scatter", sorted: !1, translate: function () {
- var a = this;
- R.prototype.translate.apply(a);
- n(a.points, function (b) {
- b.shapeType = "circle";
- b.shapeArgs = {x: b.plotX, y: b.plotY, r: a.chart.options.tooltip.snap}
- })
- }, drawTracker: function () {
- for (var a = this, b = a.options.cursor, b = b && {cursor: b}, c = a.points, d = c.length, e; d--;)if (e = c[d].graphic)e.element._i =
- d;
- a._hasTracking ? a._hasTracking = !0 : a.group.attr({isTracker: !0}).on(ea ? "touchstart" : "mouseover",function (b) {
- a.onMouseOver();
- if (b.target._i !== A)c[b.target._i].onMouseOver()
- }).on("mouseout",function () {
- if (!a.options.stickyTracking)a.onMouseOut()
- }).css(b)
- }});
- Y.scatter = Ia;
- Z.pie = C(T, {borderColor: "#FFFFFF", borderWidth: 1, center: ["50%", "50%"], colorByPoint: !0, dataLabels: {distance: 30, enabled: !0, formatter: function () {
- return this.point.name
- }, y: 5}, legendType: "point", marker: null, size: "75%", showInLegend: !1, slicedOffset: 10,
- states: {hover: {brightness: 0.1, shadow: !1}}});
- T = {type: "pie", isCartesian: !1, pointClass: ca(Wa, {init: function () {
- Wa.prototype.init.apply(this, arguments);
- var a = this, b;
- u(a, {visible: a.visible !== !1, name: o(a.name, "Slice")});
- b = function () {
- a.slice()
- };
- I(a, "select", b);
- I(a, "unselect", b);
- return a
- }, setVisible: function (a) {
- var b = this.series.chart, c = this.tracker, d = this.dataLabel, e = this.connector, f = this.shadowGroup, g;
- g = (this.visible = a = a === A ? !this.visible : a) ? "show" : "hide";
- this.group[g]();
- if (c)c[g]();
- if (d)d[g]();
- if (e)e[g]();
- if (f)f[g]();
- this.legendItem && b.legend.colorizeItem(this, a)
- }, slice: function (a, b, c) {
- var d = this.series.chart, e = this.slicedTranslation;
- ua(c, d);
- o(b, !0);
- a = this.sliced = s(a) ? a : !this.sliced;
- a = {translateX: a ? e[0] : d.plotLeft, translateY: a ? e[1] : d.plotTop};
- this.group.animate(a);
- this.shadowGroup && this.shadowGroup.animate(a)
- }}), pointAttrToOptions: {stroke: "borderColor", "stroke-width": "borderWidth", fill: "color"}, getColor: function () {
- this.initialColor = this.chart.counters.color
- }, animate: function () {
- var a = this;
- n(a.points,
- function (b) {
- var c = b.graphic, b = b.shapeArgs, d = -xa / 2;
- c && (c.attr({r: 0, start: d, end: d}), c.animate({r: b.r, start: b.start, end: b.end}, a.options.animation))
- });
- a.animate = null
- }, setData: function (a, b) {
- R.prototype.setData.call(this, a, !1);
- this.processData();
- this.generatePoints();
- o(b, !0) && this.chart.redraw()
- }, getCenter: function () {
- var a = this.options, b = this.chart, c = b.plotWidth, d = b.plotHeight, a = a.center.concat([a.size, a.innerSize || 0]), e = O(c, d), f;
- return Ea(a, function (a, b) {
- return(f = /%$/.test(a)) ? [c, d, e, e][b] * w(a) / 100 : a
- })
- },
- translate: function () {
- this.generatePoints();
- var a = 0, b = -0.25, c = this.options, d = c.slicedOffset, e = d + c.borderWidth, f, g = this.chart, h, i, j, k = this.points, l = 2 * xa, m, p, o, s = c.dataLabels.distance;
- this.center = f = this.getCenter();
- this.getX = function (a, b) {
- j = L.asin((a - f[1]) / (f[2] / 2 + s));
- return f[0] + (b ? -1 : 1) * X(j) * (f[2] / 2 + s)
- };
- n(k, function (b) {
- a += b.y
- });
- n(k, function (c) {
- m = a ? c.y / a : 0;
- h = t(b * l * 1E3) / 1E3;
- b += m;
- i = t(b * l * 1E3) / 1E3;
- c.shapeType = "arc";
- c.shapeArgs = {x: f[0], y: f[1], r: f[2] / 2, innerR: f[3] / 2, start: h, end: i};
- j = (i + h) / 2;
- c.slicedTranslation =
- Ea([X(j) * d + g.plotLeft, da(j) * d + g.plotTop], t);
- p = X(j) * f[2] / 2;
- o = da(j) * f[2] / 2;
- c.tooltipPos = [f[0] + p * 0.7, f[1] + o * 0.7];
- c.labelPos = [f[0] + p + X(j) * s, f[1] + o + da(j) * s, f[0] + p + X(j) * e, f[1] + o + da(j) * e, f[0] + p, f[1] + o, s < 0 ? "center" : j < l / 4 ? "left" : "right", j];
- c.percentage = m * 100;
- c.total = a
- });
- this.setTooltipPoints()
- }, render: function () {
- this.getAttribs();
- this.drawPoints();
- this.options.enableMouseTracking !== !1 && this.drawTracker();
- this.drawDataLabels();
- this.options.animation && this.animate && this.animate();
- this.isDirty = !1
- }, drawPoints: function () {
- var a =
- this, b = a.chart, c = b.renderer, d, e, f, g = a.options.shadow, h, i;
- n(a.points, function (j) {
- e = j.graphic;
- i = j.shapeArgs;
- f = j.group;
- h = j.shadowGroup;
- if (g && !h)h = j.shadowGroup = c.g("shadow").attr({zIndex: 4}).add();
- if (!f)f = j.group = c.g("point").attr({zIndex: 5}).add();
- d = j.sliced ? j.slicedTranslation : [b.plotLeft, b.plotTop];
- f.translate(d[0], d[1]);
- h && h.translate(d[0], d[1]);
- e ? e.animate(i) : j.graphic = e = c.arc(i).setRadialReference(a.center).attr(u(j.pointAttr[""], {"stroke-linejoin": "round"})).add(j.group).shadow(g, h);
- j.visible === !1 && j.setVisible(!1)
- })
- }, drawDataLabels: function () {
- var a = this.data, b, c = this.chart, d = this.options.dataLabels, e = o(d.connectorPadding, 10), f = o(d.connectorWidth, 1), g, h, i = o(d.softConnector, !0), j = d.distance, k = this.center, l = k[2] / 2, m = k[1], p = j > 0, q = [
- [],
- []
- ], s, r, t, u, x = 2, v;
- if (d.enabled) {
- R.prototype.drawDataLabels.apply(this);
- n(a, function (a) {
- a.dataLabel && q[a.labelPos[7] < xa / 2 ? 0 : 1].push(a)
- });
- q[1].reverse();
- u = function (a, b) {
- return b.y - a.y
- };
- for (a = q[0][0] && q[0][0].dataLabel && (q[0][0].dataLabel.getBBox().height || 21); x--;) {
- var w =
- [], C = [], z = q[x], A = z.length, B;
- if (j > 0) {
- for (v = m - l - j; v <= m + l + j; v += a)w.push(v);
- t = w.length;
- if (A > t) {
- h = [].concat(z);
- h.sort(u);
- for (v = A; v--;)h[v].rank = v;
- for (v = A; v--;)z[v].rank >= t && z.splice(v, 1);
- A = z.length
- }
- for (v = 0; v < A; v++) {
- b = z[v];
- h = b.labelPos;
- b = 9999;
- for (r = 0; r < t; r++)g = M(w[r] - h[1]), g < b && (b = g, B = r);
- if (B < v && w[v] !== null)B = v; else for (t < A - v + B && w[v] !== null && (B = t - A + v); w[B] === null;)B++;
- C.push({i: B, y: w[B]});
- w[B] = null
- }
- C.sort(u)
- }
- for (v = 0; v < A; v++) {
- b = z[v];
- h = b.labelPos;
- g = b.dataLabel;
- t = b.visible === !1 ? "hidden" : "visible";
- s = h[1];
- if (j >
- 0) {
- if (r = C.pop(), B = r.i, r = r.y, s > r && w[B + 1] !== null || s < r && w[B - 1] !== null)r = s
- } else r = s;
- s = d.justify ? k[0] + (x ? -1 : 1) * (l + j) : this.getX(B === 0 || B === w.length - 1 ? s : r, x);
- g.attr({visibility: t, align: h[6]})[g.moved ? "animate" : "attr"]({x: s + d.x + ({left: e, right: -e}[h[6]] || 0), y: r + d.y});
- g.moved = !0;
- if (p && f)g = b.connector, h = i ? ["M", s + (h[6] === "left" ? 5 : -5), r, "C", s, r, 2 * h[2] - h[4], 2 * h[3] - h[5], h[2], h[3], "L", h[4], h[5]] : ["M", s + (h[6] === "left" ? 5 : -5), r, "L", h[2], h[3], "L", h[4], h[5]], g ? (g.animate({d: h}), g.attr("visibility", t)) : b.connector = g = this.chart.renderer.path(h).attr({"stroke-width": f,
- stroke: d.connectorColor || b.color || "#606060", visibility: t, zIndex: 3}).translate(c.plotLeft, c.plotTop).add()
- }
- }
- }
- }, drawTracker: ha.prototype.drawTracker, drawLegendSymbol: G.prototype.drawLegendSymbol, getSymbol: function () {
- }};
- T = ca(R, T);
- Y.pie = T;
- u(Highcharts, {Axis: ob, CanVGRenderer: fb, Chart: rb, Color: pa, Legend: qb, Point: Wa, Tick: Sa, Tooltip: pb, Renderer: Ta, Series: R, SVGRenderer: qa, VMLRenderer: ka, dateFormat: db, pathAnim: Ua, getOptions: function () {
- return V
- }, hasBidiBug: Rb, numberFormat: Xa, seriesTypes: Y, setOptions: function (a) {
- V =
- C(V, a);
- Bb();
- return V
- }, addEvent: I, removeEvent: P, createElement: S, discardElement: Qa, css: F, each: n, extend: u, map: Ea, merge: C, pick: o, splat: na, extendClass: ca, pInt: w, product: "Highcharts", version: "2.2.5"})
-})();
diff --git a/src/common/lib/vendor/2amigos/yiiwheels/widgets/highcharts/assets/js/highcharts.src.js b/src/common/lib/vendor/2amigos/yiiwheels/widgets/highcharts/assets/js/highcharts.src.js
deleted file mode 100644
index 2b3de2b..0000000
--- a/src/common/lib/vendor/2amigos/yiiwheels/widgets/highcharts/assets/js/highcharts.src.js
+++ /dev/null
@@ -1,14703 +0,0 @@
-// ==ClosureCompiler==
-// @compilation_level SIMPLE_OPTIMIZATIONS
-
-/**
- * @license Highcharts JS v2.2.5 (2012-06-08)
- *
- * (c) 2009-2011 Torstein Hønsi
- *
- * License: www.highcharts.com/license
- */
-
-// JSLint options:
-/*global Highcharts, document, window, navigator, setInterval, clearInterval, clearTimeout, setTimeout, location, jQuery, $, console */
-
-(function () {
-// encapsulated variables
- var UNDEFINED,
- doc = document,
- win = window,
- math = Math,
- mathRound = math.round,
- mathFloor = math.floor,
- mathCeil = math.ceil,
- mathMax = math.max,
- mathMin = math.min,
- mathAbs = math.abs,
- mathCos = math.cos,
- mathSin = math.sin,
- mathPI = math.PI,
- deg2rad = mathPI * 2 / 360,
-
-
- // some variables
- userAgent = navigator.userAgent,
- isIE = /msie/i.test(userAgent) && !win.opera,
- docMode8 = doc.documentMode === 8,
- isWebKit = /AppleWebKit/.test(userAgent),
- isFirefox = /Firefox/.test(userAgent),
- SVG_NS = 'http://www.w3.org/2000/svg',
- hasSVG = !!doc.createElementNS && !!doc.createElementNS(SVG_NS, 'svg').createSVGRect,
- hasBidiBug = isFirefox && parseInt(userAgent.split('Firefox/')[1], 10) < 4, // issue #38
- useCanVG = !hasSVG && !isIE && !!doc.createElement('canvas').getContext,
- Renderer,
- hasTouch = doc.documentElement.ontouchstart !== UNDEFINED,
- symbolSizes = {},
- idCounter = 0,
- garbageBin,
- defaultOptions,
- dateFormat, // function
- globalAnimation,
- pathAnim,
- timeUnits,
- noop = function () {
- },
-
- // some constants for frequently used strings
- DIV = 'div',
- ABSOLUTE = 'absolute',
- RELATIVE = 'relative',
- HIDDEN = 'hidden',
- PREFIX = 'highcharts-',
- VISIBLE = 'visible',
- PX = 'px',
- NONE = 'none',
- M = 'M',
- L = 'L',
- /*
- * Empirical lowest possible opacities for TRACKER_FILL
- * IE6: 0.002
- * IE7: 0.002
- * IE8: 0.002
- * IE9: 0.00000000001 (unlimited)
- * FF: 0.00000000001 (unlimited)
- * Chrome: 0.000001
- * Safari: 0.000001
- * Opera: 0.00000000001 (unlimited)
- */
- TRACKER_FILL = 'rgba(192,192,192,' + (hasSVG ? 0.000001 : 0.002) + ')', // invisible but clickable
- //TRACKER_FILL = 'rgba(192,192,192,0.5)',
- NORMAL_STATE = '',
- HOVER_STATE = 'hover',
- SELECT_STATE = 'select',
- MILLISECOND = 'millisecond',
- SECOND = 'second',
- MINUTE = 'minute',
- HOUR = 'hour',
- DAY = 'day',
- WEEK = 'week',
- MONTH = 'month',
- YEAR = 'year',
-
- // constants for attributes
- FILL = 'fill',
- LINEAR_GRADIENT = 'linearGradient',
- STOPS = 'stops',
- STROKE = 'stroke',
- STROKE_WIDTH = 'stroke-width',
-
- // time methods, changed based on whether or not UTC is used
- makeTime,
- getMinutes,
- getHours,
- getDay,
- getDate,
- getMonth,
- getFullYear,
- setMinutes,
- setHours,
- setDate,
- setMonth,
- setFullYear,
-
-
- // lookup over the types and the associated classes
- seriesTypes = {};
-
-// The Highcharts namespace
- win.Highcharts = {};
-
- /**
- * Extend an object with the members of another
- * @param {Object} a The object to be extended
- * @param {Object} b The object to add to the first one
- */
- function extend(a, b) {
- var n;
- if (!a) {
- a = {};
- }
- for (n in b) {
- a[n] = b[n];
- }
- return a;
- }
-
- /**
- * Take an array and turn into a hash with even number arguments as keys and odd numbers as
- * values. Allows creating constants for commonly used style properties, attributes etc.
- * Avoid it in performance critical situations like looping
- */
- function hash() {
- var i = 0,
- args = arguments,
- length = args.length,
- obj = {};
- for (; i < length; i++) {
- obj[args[i++]] = args[i];
- }
- return obj;
- }
-
- /**
- * Shortcut for parseInt
- * @param {Object} s
- * @param {Number} mag Magnitude
- */
- function pInt(s, mag) {
- return parseInt(s, mag || 10);
- }
-
- /**
- * Check for string
- * @param {Object} s
- */
- function isString(s) {
- return typeof s === 'string';
- }
-
- /**
- * Check for object
- * @param {Object} obj
- */
- function isObject(obj) {
- return typeof obj === 'object';
- }
-
- /**
- * Check for array
- * @param {Object} obj
- */
- function isArray(obj) {
- return Object.prototype.toString.call(obj) === '[object Array]';
- }
-
- /**
- * Check for number
- * @param {Object} n
- */
- function isNumber(n) {
- return typeof n === 'number';
- }
-
- function log2lin(num) {
- return math.log(num) / math.LN10;
- }
-
- function lin2log(num) {
- return math.pow(10, num);
- }
-
- /**
- * Remove last occurence of an item from an array
- * @param {Array} arr
- * @param {Mixed} item
- */
- function erase(arr, item) {
- var i = arr.length;
- while (i--) {
- if (arr[i] === item) {
- arr.splice(i, 1);
- break;
- }
- }
- //return arr;
- }
-
- /**
- * Returns true if the object is not null or undefined. Like MooTools' $.defined.
- * @param {Object} obj
- */
- function defined(obj) {
- return obj !== UNDEFINED && obj !== null;
- }
-
- /**
- * Set or get an attribute or an object of attributes. Can't use jQuery attr because
- * it attempts to set expando properties on the SVG element, which is not allowed.
- *
- * @param {Object} elem The DOM element to receive the attribute(s)
- * @param {String|Object} prop The property or an abject of key-value pairs
- * @param {String} value The value if a single property is set
- */
- function attr(elem, prop, value) {
- var key,
- setAttribute = 'setAttribute',
- ret;
-
- // if the prop is a string
- if (isString(prop)) {
- // set the value
- if (defined(value)) {
-
- elem[setAttribute](prop, value);
-
- // get the value
- } else if (elem && elem.getAttribute) { // elem not defined when printing pie demo...
- ret = elem.getAttribute(prop);
- }
-
- // else if prop is defined, it is a hash of key/value pairs
- } else if (defined(prop) && isObject(prop)) {
- for (key in prop) {
- elem[setAttribute](key, prop[key]);
- }
- }
- return ret;
- }
-
- /**
- * Check if an element is an array, and if not, make it into an array. Like
- * MooTools' $.splat.
- */
- function splat(obj) {
- return isArray(obj) ? obj : [obj];
- }
-
-
- /**
- * Return the first value that is defined. Like MooTools' $.pick.
- */
- function pick() {
- var args = arguments,
- i,
- arg,
- length = args.length;
- for (i = 0; i < length; i++) {
- arg = args[i];
- if (typeof arg !== 'undefined' && arg !== null) {
- return arg;
- }
- }
- }
-
- /**
- * Set CSS on a given element
- * @param {Object} el
- * @param {Object} styles Style object with camel case property names
- */
- function css(el, styles) {
- if (isIE) {
- if (styles && styles.opacity !== UNDEFINED) {
- styles.filter = 'alpha(opacity=' + (styles.opacity * 100) + ')';
- }
- }
- extend(el.style, styles);
- }
-
- /**
- * Utility function to create element with attributes and styles
- * @param {Object} tag
- * @param {Object} attribs
- * @param {Object} styles
- * @param {Object} parent
- * @param {Object} nopad
- */
- function createElement(tag, attribs, styles, parent, nopad) {
- var el = doc.createElement(tag);
- if (attribs) {
- extend(el, attribs);
- }
- if (nopad) {
- css(el, {padding: 0, border: NONE, margin: 0});
- }
- if (styles) {
- css(el, styles);
- }
- if (parent) {
- parent.appendChild(el);
- }
- return el;
- }
-
- /**
- * Extend a prototyped class by new members
- * @param {Object} parent
- * @param {Object} members
- */
- function extendClass(parent, members) {
- var object = function () {
- };
- object.prototype = new parent();
- extend(object.prototype, members);
- return object;
- }
-
- /**
- * How many decimals are there in a number
- */
- function getDecimals(number) {
-
- number = (number || 0).toString();
-
- return number.indexOf('.') > -1 ?
- number.split('.')[1].length :
- 0;
- }
-
- /**
- * Format a number and return a string based on input settings
- * @param {Number} number The input number to format
- * @param {Number} decimals The amount of decimals
- * @param {String} decPoint The decimal point, defaults to the one given in the lang options
- * @param {String} thousandsSep The thousands separator, defaults to the one given in the lang options
- */
- function numberFormat(number, decimals, decPoint, thousandsSep) {
- var lang = defaultOptions.lang,
- // http://kevin.vanzonneveld.net/techblog/article/javascript_equivalent_for_phps_number_format/
- n = number,
- c = decimals === -1 ?
- getDecimals(number) :
- (isNaN(decimals = mathAbs(decimals)) ? 2 : decimals),
- d = decPoint === undefined ? lang.decimalPoint : decPoint,
- t = thousandsSep === undefined ? lang.thousandsSep : thousandsSep,
- s = n < 0 ? "-" : "",
- i = String(pInt(n = mathAbs(+n || 0).toFixed(c))),
- j = i.length > 3 ? i.length % 3 : 0;
-
- return s + (j ? i.substr(0, j) + t : "") + i.substr(j).replace(/(\d{3})(?=\d)/g, "$1" + t) +
- (c ? d + mathAbs(n - i).toFixed(c).slice(2) : "");
- }
-
- /**
- * Pad a string to a given length by adding 0 to the beginning
- * @param {Number} number
- * @param {Number} length
- */
- function pad(number, length) {
- // Create an array of the remaining length +1 and join it with 0's
- return new Array((length || 2) + 1 - String(number).length).join(0) + number;
- }
-
- /**
- * Based on http://www.php.net/manual/en/function.strftime.php
- * @param {String} format
- * @param {Number} timestamp
- * @param {Boolean} capitalize
- */
- dateFormat = function (format, timestamp, capitalize) {
- if (!defined(timestamp) || isNaN(timestamp)) {
- return 'Invalid date';
- }
- format = pick(format, '%Y-%m-%d %H:%M:%S');
-
- var date = new Date(timestamp),
- key, // used in for constuct below
- // get the basic time values
- hours = date[getHours](),
- day = date[getDay](),
- dayOfMonth = date[getDate](),
- month = date[getMonth](),
- fullYear = date[getFullYear](),
- lang = defaultOptions.lang,
- langWeekdays = lang.weekdays,
- /* // uncomment this and the 'W' format key below to enable week numbers
- weekNumber = function () {
- var clone = new Date(date.valueOf()),
- day = clone[getDay]() == 0 ? 7 : clone[getDay](),
- dayNumber;
- clone.setDate(clone[getDate]() + 4 - day);
- dayNumber = mathFloor((clone.getTime() - new Date(clone[getFullYear](), 0, 1, -6)) / 86400000);
- return 1 + mathFloor(dayNumber / 7);
- },
- */
-
- // list all format keys
- replacements = {
-
- // Day
- 'a': langWeekdays[day].substr(0, 3), // Short weekday, like 'Mon'
- 'A': langWeekdays[day], // Long weekday, like 'Monday'
- 'd': pad(dayOfMonth), // Two digit day of the month, 01 to 31
- 'e': dayOfMonth, // Day of the month, 1 through 31
-
- // Week (none implemented)
- //'W': weekNumber(),
-
- // Month
- 'b': lang.shortMonths[month], // Short month, like 'Jan'
- 'B': lang.months[month], // Long month, like 'January'
- 'm': pad(month + 1), // Two digit month number, 01 through 12
-
- // Year
- 'y': fullYear.toString().substr(2, 2), // Two digits year, like 09 for 2009
- 'Y': fullYear, // Four digits year, like 2009
-
- // Time
- 'H': pad(hours), // Two digits hours in 24h format, 00 through 23
- 'I': pad((hours % 12) || 12), // Two digits hours in 12h format, 00 through 11
- 'l': (hours % 12) || 12, // Hours in 12h format, 1 through 12
- 'M': pad(date[getMinutes]()), // Two digits minutes, 00 through 59
- 'p': hours < 12 ? 'AM' : 'PM', // Upper case AM or PM
- 'P': hours < 12 ? 'am' : 'pm', // Lower case AM or PM
- 'S': pad(date.getSeconds()), // Two digits seconds, 00 through 59
- 'L': pad(mathRound(timestamp % 1000), 3) // Milliseconds (naming from Ruby)
- };
-
-
- // do the replaces
- for (key in replacements) {
- format = format.replace('%' + key, replacements[key]);
- }
-
- // Optionally capitalize the string and return
- return capitalize ? format.substr(0, 1).toUpperCase() + format.substr(1) : format;
- };
-
- /**
- * Take an interval and normalize it to multiples of 1, 2, 2.5 and 5
- * @param {Number} interval
- * @param {Array} multiples
- * @param {Number} magnitude
- * @param {Object} options
- */
- function normalizeTickInterval(interval, multiples, magnitude, options) {
- var normalized, i;
-
- // round to a tenfold of 1, 2, 2.5 or 5
- magnitude = pick(magnitude, 1);
- normalized = interval / magnitude;
-
- // multiples for a linear scale
- if (!multiples) {
- multiples = [1, 2, 2.5, 5, 10];
-
- // the allowDecimals option
- if (options && options.allowDecimals === false) {
- if (magnitude === 1) {
- multiples = [1, 2, 5, 10];
- } else if (magnitude <= 0.1) {
- multiples = [1 / magnitude];
- }
- }
- }
-
- // normalize the interval to the nearest multiple
- for (i = 0; i < multiples.length; i++) {
- interval = multiples[i];
- if (normalized <= (multiples[i] + (multiples[i + 1] || multiples[i])) / 2) {
- break;
- }
- }
-
- // multiply back to the correct magnitude
- interval *= magnitude;
-
- return interval;
- }
-
- /**
- * Get a normalized tick interval for dates. Returns a configuration object with
- * unit range (interval), count and name. Used to prepare data for getTimeTicks.
- * Previously this logic was part of getTimeTicks, but as getTimeTicks now runs
- * of segments in stock charts, the normalizing logic was extracted in order to
- * prevent it for running over again for each segment having the same interval.
- * #662, #697.
- */
- function normalizeTimeTickInterval(tickInterval, unitsOption) {
- var units = unitsOption || [
- [
- MILLISECOND, // unit name
- [1, 2, 5, 10, 20, 25, 50, 100, 200, 500] // allowed multiples
- ],
- [
- SECOND,
- [1, 2, 5, 10, 15, 30]
- ],
- [
- MINUTE,
- [1, 2, 5, 10, 15, 30]
- ],
- [
- HOUR,
- [1, 2, 3, 4, 6, 8, 12]
- ],
- [
- DAY,
- [1, 2]
- ],
- [
- WEEK,
- [1, 2]
- ],
- [
- MONTH,
- [1, 2, 3, 4, 6]
- ],
- [
- YEAR,
- null
- ]
- ],
- unit = units[units.length - 1], // default unit is years
- interval = timeUnits[unit[0]],
- multiples = unit[1],
- count,
- i;
-
- // loop through the units to find the one that best fits the tickInterval
- for (i = 0; i < units.length; i++) {
- unit = units[i];
- interval = timeUnits[unit[0]];
- multiples = unit[1];
-
-
- if (units[i + 1]) {
- // lessThan is in the middle between the highest multiple and the next unit.
- var lessThan = (interval * multiples[multiples.length - 1] +
- timeUnits[units[i + 1][0]]) / 2;
-
- // break and keep the current unit
- if (tickInterval <= lessThan) {
- break;
- }
- }
- }
-
- // prevent 2.5 years intervals, though 25, 250 etc. are allowed
- if (interval === timeUnits[YEAR] && tickInterval < 5 * interval) {
- multiples = [1, 2, 5];
- }
-
- // prevent 2.5 years intervals, though 25, 250 etc. are allowed
- if (interval === timeUnits[YEAR] && tickInterval < 5 * interval) {
- multiples = [1, 2, 5];
- }
-
- // get the count
- count = normalizeTickInterval(tickInterval / interval, multiples);
-
- return {
- unitRange: interval,
- count: count,
- unitName: unit[0]
- };
- }
-
- /**
- * Set the tick positions to a time unit that makes sense, for example
- * on the first of each month or on every Monday. Return an array
- * with the time positions. Used in datetime axes as well as for grouping
- * data on a datetime axis.
- *
- * @param {Object} normalizedInterval The interval in axis values (ms) and the count
- * @param {Number} min The minimum in axis values
- * @param {Number} max The maximum in axis values
- * @param {Number} startOfWeek
- */
- function getTimeTicks(normalizedInterval, min, max, startOfWeek) {
- var tickPositions = [],
- i,
- higherRanks = {},
- useUTC = defaultOptions.global.useUTC,
- minYear, // used in months and years as a basis for Date.UTC()
- minDate = new Date(min),
- interval = normalizedInterval.unitRange,
- count = normalizedInterval.count;
-
-
- if (interval >= timeUnits[SECOND]) { // second
- minDate.setMilliseconds(0);
- minDate.setSeconds(interval >= timeUnits[MINUTE] ? 0 :
- count * mathFloor(minDate.getSeconds() / count));
- }
-
- if (interval >= timeUnits[MINUTE]) { // minute
- minDate[setMinutes](interval >= timeUnits[HOUR] ? 0 :
- count * mathFloor(minDate[getMinutes]() / count));
- }
-
- if (interval >= timeUnits[HOUR]) { // hour
- minDate[setHours](interval >= timeUnits[DAY] ? 0 :
- count * mathFloor(minDate[getHours]() / count));
- }
-
- if (interval >= timeUnits[DAY]) { // day
- minDate[setDate](interval >= timeUnits[MONTH] ? 1 :
- count * mathFloor(minDate[getDate]() / count));
- }
-
- if (interval >= timeUnits[MONTH]) { // month
- minDate[setMonth](interval >= timeUnits[YEAR] ? 0 :
- count * mathFloor(minDate[getMonth]() / count));
- minYear = minDate[getFullYear]();
- }
-
- if (interval >= timeUnits[YEAR]) { // year
- minYear -= minYear % count;
- minDate[setFullYear](minYear);
- }
-
- // week is a special case that runs outside the hierarchy
- if (interval === timeUnits[WEEK]) {
- // get start of current week, independent of count
- minDate[setDate](minDate[getDate]() - minDate[getDay]() +
- pick(startOfWeek, 1));
- }
-
-
- // get tick positions
- i = 1;
- minYear = minDate[getFullYear]();
- var time = minDate.getTime(),
- minMonth = minDate[getMonth](),
- minDateDate = minDate[getDate](),
- timezoneOffset = useUTC ?
- 0 :
- (24 * 3600 * 1000 + minDate.getTimezoneOffset() * 60 * 1000) % (24 * 3600 * 1000); // #950
-
- // iterate and add tick positions at appropriate values
- while (time < max) {
- tickPositions.push(time);
-
- // if the interval is years, use Date.UTC to increase years
- if (interval === timeUnits[YEAR]) {
- time = makeTime(minYear + i * count, 0);
-
- // if the interval is months, use Date.UTC to increase months
- } else if (interval === timeUnits[MONTH]) {
- time = makeTime(minYear, minMonth + i * count);
-
- // if we're using global time, the interval is not fixed as it jumps
- // one hour at the DST crossover
- } else if (!useUTC && (interval === timeUnits[DAY] || interval === timeUnits[WEEK])) {
- time = makeTime(minYear, minMonth, minDateDate +
- i * count * (interval === timeUnits[DAY] ? 1 : 7));
-
- // else, the interval is fixed and we use simple addition
- } else {
- time += interval * count;
-
- // mark new days if the time is dividable by day
- if (interval <= timeUnits[HOUR] && time % timeUnits[DAY] === timezoneOffset) {
- higherRanks[time] = DAY;
- }
- }
-
- i++;
- }
-
- // push the last time
- tickPositions.push(time);
-
- // record information on the chosen unit - for dynamic label formatter
- tickPositions.info = extend(normalizedInterval, {
- higherRanks: higherRanks,
- totalRange: interval * count
- });
-
- return tickPositions;
- }
-
- /**
- * Helper class that contains variuos counters that are local to the chart.
- */
- function ChartCounters() {
- this.color = 0;
- this.symbol = 0;
- }
-
- ChartCounters.prototype = {
- /**
- * Wraps the color counter if it reaches the specified length.
- */
- wrapColor: function (length) {
- if (this.color >= length) {
- this.color = 0;
- }
- },
-
- /**
- * Wraps the symbol counter if it reaches the specified length.
- */
- wrapSymbol: function (length) {
- if (this.symbol >= length) {
- this.symbol = 0;
- }
- }
- };
-
-
- /**
- * Utility method that sorts an object array and keeping the order of equal items.
- * ECMA script standard does not specify the behaviour when items are equal.
- */
- function stableSort(arr, sortFunction) {
- var length = arr.length,
- sortValue,
- i;
-
- // Add index to each item
- for (i = 0; i < length; i++) {
- arr[i].ss_i = i; // stable sort index
- }
-
- arr.sort(function (a, b) {
- sortValue = sortFunction(a, b);
- return sortValue === 0 ? a.ss_i - b.ss_i : sortValue;
- });
-
- // Remove index from items
- for (i = 0; i < length; i++) {
- delete arr[i].ss_i; // stable sort index
- }
- }
-
- /**
- * Non-recursive method to find the lowest member of an array. Math.min raises a maximum
- * call stack size exceeded error in Chrome when trying to apply more than 150.000 points. This
- * method is slightly slower, but safe.
- */
- function arrayMin(data) {
- var i = data.length,
- min = data[0];
-
- while (i--) {
- if (data[i] < min) {
- min = data[i];
- }
- }
- return min;
- }
-
- /**
- * Non-recursive method to find the lowest member of an array. Math.min raises a maximum
- * call stack size exceeded error in Chrome when trying to apply more than 150.000 points. This
- * method is slightly slower, but safe.
- */
- function arrayMax(data) {
- var i = data.length,
- max = data[0];
-
- while (i--) {
- if (data[i] > max) {
- max = data[i];
- }
- }
- return max;
- }
-
- /**
- * Utility method that destroys any SVGElement or VMLElement that are properties on the given object.
- * It loops all properties and invokes destroy if there is a destroy method. The property is
- * then delete'ed.
- * @param {Object} The object to destroy properties on
- * @param {Object} Exception, do not destroy this property, only delete it.
- */
- function destroyObjectProperties(obj, except) {
- var n;
- for (n in obj) {
- // If the object is non-null and destroy is defined
- if (obj[n] && obj[n] !== except && obj[n].destroy) {
- // Invoke the destroy
- obj[n].destroy();
- }
-
- // Delete the property from the object.
- delete obj[n];
- }
- }
-
-
- /**
- * Discard an element by moving it to the bin and delete
- * @param {Object} The HTML node to discard
- */
- function discardElement(element) {
- // create a garbage bin element, not part of the DOM
- if (!garbageBin) {
- garbageBin = createElement(DIV);
- }
-
- // move the node and empty bin
- if (element) {
- garbageBin.appendChild(element);
- }
- garbageBin.innerHTML = '';
- }
-
- /**
- * Provide error messages for debugging, with links to online explanation
- */
- function error(code, stop) {
- var msg = 'Highcharts error #' + code + ': www.highcharts.com/errors/' + code;
- if (stop) {
- throw msg;
- } else if (win.console) {
- console.log(msg);
- }
- }
-
- /**
- * Fix JS round off float errors
- * @param {Number} num
- */
- function correctFloat(num) {
- return parseFloat(
- num.toPrecision(14)
- );
- }
-
- /**
- * The time unit lookup
- */
- /*jslint white: true*/
- timeUnits = hash(
- MILLISECOND, 1,
- SECOND, 1000,
- MINUTE, 60000,
- HOUR, 3600000,
- DAY, 24 * 3600000,
- WEEK, 7 * 24 * 3600000,
- MONTH, 30 * 24 * 3600000,
- YEAR, 31556952000
- );
- /*jslint white: false*/
- /**
- * Path interpolation algorithm used across adapters
- */
- pathAnim = {
- /**
- * Prepare start and end values so that the path can be animated one to one
- */
- init: function (elem, fromD, toD) {
- fromD = fromD || '';
- var shift = elem.shift,
- bezier = fromD.indexOf('C') > -1,
- numParams = bezier ? 7 : 3,
- endLength,
- slice,
- i,
- start = fromD.split(' '),
- end = [].concat(toD), // copy
- startBaseLine,
- endBaseLine,
- sixify = function (arr) { // in splines make move points have six parameters like bezier curves
- i = arr.length;
- while (i--) {
- if (arr[i] === M) {
- arr.splice(i + 1, 0, arr[i + 1], arr[i + 2], arr[i + 1], arr[i + 2]);
- }
- }
- };
-
- if (bezier) {
- sixify(start);
- sixify(end);
- }
-
- // pull out the base lines before padding
- if (elem.isArea) {
- startBaseLine = start.splice(start.length - 6, 6);
- endBaseLine = end.splice(end.length - 6, 6);
- }
-
- // if shifting points, prepend a dummy point to the end path
- if (shift <= end.length / numParams) {
- while (shift--) {
- end = [].concat(end).splice(0, numParams).concat(end);
- }
- }
- elem.shift = 0; // reset for following animations
-
- // copy and append last point until the length matches the end length
- if (start.length) {
- endLength = end.length;
- while (start.length < endLength) {
-
- //bezier && sixify(start);
- slice = [].concat(start).splice(start.length - numParams, numParams);
- if (bezier) { // disable first control point
- slice[numParams - 6] = slice[numParams - 2];
- slice[numParams - 5] = slice[numParams - 1];
- }
- start = start.concat(slice);
- }
- }
-
- if (startBaseLine) { // append the base lines for areas
- start = start.concat(startBaseLine);
- end = end.concat(endBaseLine);
- }
- return [start, end];
- },
-
- /**
- * Interpolate each value of the path and return the array
- */
- step: function (start, end, pos, complete) {
- var ret = [],
- i = start.length,
- startVal;
-
- if (pos === 1) { // land on the final path without adjustment points appended in the ends
- ret = complete;
-
- } else if (i === end.length && pos < 1) {
- while (i--) {
- startVal = parseFloat(start[i]);
- ret[i] =
- isNaN(startVal) ? // a letter instruction like M or L
- start[i] :
- pos * (parseFloat(end[i] - startVal)) + startVal;
-
- }
- } else { // if animation is finished or length not matching, land on right value
- ret = end;
- }
- return ret;
- }
- };
-
-
- /**
- * Set the global animation to either a given value, or fall back to the
- * given chart's animation option
- * @param {Object} animation
- * @param {Object} chart
- */
- function setAnimation(animation, chart) {
- globalAnimation = pick(animation, chart.animation);
- }
-
-
-// check for a custom HighchartsAdapter defined prior to this file
- var globalAdapter = win.HighchartsAdapter,
- adapter = globalAdapter || {},
-
- // Utility functions. If the HighchartsAdapter is not defined, adapter is an empty object
- // and all the utility functions will be null. In that case they are populated by the
- // default adapters below.
- adapterRun = adapter.adapterRun,
- getScript = adapter.getScript,
- each = adapter.each,
- grep = adapter.grep,
- offset = adapter.offset,
- map = adapter.map,
- merge = adapter.merge,
- addEvent = adapter.addEvent,
- removeEvent = adapter.removeEvent,
- fireEvent = adapter.fireEvent,
- washMouseEvent = adapter.washMouseEvent,
- animate = adapter.animate,
- stop = adapter.stop;
-
- /*
- * Define the adapter for frameworks. If an external adapter is not defined,
- * Highcharts reverts to the built-in jQuery adapter.
- */
- if (globalAdapter && globalAdapter.init) {
- // Initialize the adapter with the pathAnim object that takes care
- // of path animations.
- globalAdapter.init(pathAnim);
- }
- if (!globalAdapter && win.jQuery) {
- var jQ = jQuery;
-
- /**
- * Downloads a script and executes a callback when done.
- * @param {String} scriptLocation
- * @param {Function} callback
- */
- getScript = jQ.getScript;
-
- /**
- * A direct link to jQuery methods. MooTools and Prototype adapters must be implemented for each case of method.
- * @param {Object} elem The HTML element
- * @param {String} method Which method to run on the wrapped element
- */
- adapterRun = function (elem, method) {
- return jQ(elem)[method]();
- };
-
- /**
- * Utility for iterating over an array. Parameters are reversed compared to jQuery.
- * @param {Array} arr
- * @param {Function} fn
- */
- each = function (arr, fn) {
- var i = 0,
- len = arr.length;
- for (; i < len; i++) {
- if (fn.call(arr[i], arr[i], i, arr) === false) {
- return i;
- }
- }
- };
-
- /**
- * Filter an array
- */
- grep = jQ.grep;
-
- /**
- * Map an array
- * @param {Array} arr
- * @param {Function} fn
- */
- map = function (arr, fn) {
- //return jQuery.map(arr, fn);
- var results = [],
- i = 0,
- len = arr.length;
- for (; i < len; i++) {
- results[i] = fn.call(arr[i], arr[i], i, arr);
- }
- return results;
-
- };
-
- /**
- * Deep merge two objects and return a third object
- */
- merge = function () {
- var args = arguments;
- return jQ.extend(true, null, args[0], args[1], args[2], args[3]);
- };
-
- /**
- * Get the position of an element relative to the top left of the page
- */
- offset = function (el) {
- return jQ(el).offset();
- };
-
- /**
- * Add an event listener
- * @param {Object} el A HTML element or custom object
- * @param {String} event The event type
- * @param {Function} fn The event handler
- */
- addEvent = function (el, event, fn) {
- jQ(el).bind(event, fn);
- };
-
- /**
- * Remove event added with addEvent
- * @param {Object} el The object
- * @param {String} eventType The event type. Leave blank to remove all events.
- * @param {Function} handler The function to remove
- */
- removeEvent = function (el, eventType, handler) {
- // workaround for jQuery issue with unbinding custom events:
- // http://forum.jquery.com/topic/javascript-error-when-unbinding-a-custom-event-using-jquery-1-4-2
- var func = doc.removeEventListener ? 'removeEventListener' : 'detachEvent';
- if (doc[func] && !el[func]) {
- el[func] = function () {
- };
- }
-
- jQ(el).unbind(eventType, handler);
- };
-
- /**
- * Fire an event on a custom object
- * @param {Object} el
- * @param {String} type
- * @param {Object} eventArguments
- * @param {Function} defaultFunction
- */
- fireEvent = function (el, type, eventArguments, defaultFunction) {
- var event = jQ.Event(type),
- detachedType = 'detached' + type,
- defaultPrevented;
-
- // Remove warnings in Chrome when accessing layerX and layerY. Although Highcharts
- // never uses these properties, Chrome includes them in the default click event and
- // raises the warning when they are copied over in the extend statement below.
- //
- // To avoid problems in IE (see #1010) where we cannot delete the properties and avoid
- // testing if they are there (warning in chrome) the only option is to test if running IE.
- if (!isIE && eventArguments) {
- delete eventArguments.layerX;
- delete eventArguments.layerY;
- }
-
- extend(event, eventArguments);
-
- // Prevent jQuery from triggering the object method that is named the
- // same as the event. For example, if the event is 'select', jQuery
- // attempts calling el.select and it goes into a loop.
- if (el[type]) {
- el[detachedType] = el[type];
- el[type] = null;
- }
-
- // Wrap preventDefault and stopPropagation in try/catch blocks in
- // order to prevent JS errors when cancelling events on non-DOM
- // objects. #615.
- each(['preventDefault', 'stopPropagation'], function (fn) {
- var base = event[fn];
- event[fn] = function () {
- try {
- base.call(event);
- } catch (e) {
- if (fn === 'preventDefault') {
- defaultPrevented = true;
- }
- }
- };
- });
-
- // trigger it
- jQ(el).trigger(event);
-
- // attach the method
- if (el[detachedType]) {
- el[type] = el[detachedType];
- el[detachedType] = null;
- }
-
- if (defaultFunction && !event.isDefaultPrevented() && !defaultPrevented) {
- defaultFunction(event);
- }
- };
-
- /**
- * Extension method needed for MooTools
- */
- washMouseEvent = function (e) {
- return e;
- };
-
- /**
- * Animate a HTML element or SVG element wrapper
- * @param {Object} el
- * @param {Object} params
- * @param {Object} options jQuery-like animation options: duration, easing, callback
- */
- animate = function (el, params, options) {
- var $el = jQ(el);
- if (params.d) {
- el.toD = params.d; // keep the array form for paths, used in jQ.fx.step.d
- params.d = 1; // because in jQuery, animating to an array has a different meaning
- }
-
- $el.stop();
- $el.animate(params, options);
-
- };
- /**
- * Stop running animation
- */
- stop = function (el) {
- jQ(el).stop();
- };
-
-
- //=== Extend jQuery on init
-
- /*jslint unparam: true*/
- /* allow unused param x in this function */
- jQ.extend(jQ.easing, {
- easeOutQuad: function (x, t, b, c, d) {
- return -c * (t /= d) * (t - 2) + b;
- }
- });
- /*jslint unparam: false*/
-
- // extend the animate function to allow SVG animations
- var jFx = jQ.fx,
- jStep = jFx.step;
-
- // extend some methods to check for elem.attr, which means it is a Highcharts SVG object
- each(['cur', '_default', 'width', 'height'], function (fn, i) {
- var obj = jStep,
- base,
- elem;
-
- // Handle different parent objects
- if (fn === 'cur') {
- obj = jFx.prototype; // 'cur', the getter, relates to jFx.prototype
-
- } else if (fn === '_default' && jQ.Tween) { // jQuery 1.8 model
- obj = jQ.Tween.propHooks[fn];
- fn = 'set';
- }
-
- // Overwrite the method
- base = obj[fn];
- if (base) { // step.width and step.height don't exist in jQuery < 1.7
-
- // create the extended function replacement
- obj[fn] = function (fx) {
-
- // jFx.prototype.cur does not use fx argument
- fx = i ? fx : this;
-
- // shortcut
- elem = fx.elem;
-
- // jFX.prototype.cur returns the current value. The other ones are setters
- // and returning a value has no effect.
- return elem.attr ? // is SVG element wrapper
- elem.attr(fx.prop, fn === 'cur' ? UNDEFINED : fx.now) : // apply the SVG wrapper's method
- base.apply(this, arguments); // use jQuery's built-in method
- };
- }
- });
-
- // animate paths
- jStep.d = function (fx) {
- var elem = fx.elem;
-
-
- // Normally start and end should be set in state == 0, but sometimes,
- // for reasons unknown, this doesn't happen. Perhaps state == 0 is skipped
- // in these cases
- if (!fx.started) {
- var ends = pathAnim.init(elem, elem.d, elem.toD);
- fx.start = ends[0];
- fx.end = ends[1];
- fx.started = true;
- }
-
-
- // interpolate each value of the path
- elem.attr('d', pathAnim.step(fx.start, fx.end, fx.pos, elem.toD));
-
- };
- }
-
- /* ****************************************************************************
- * Handle the options *
- *****************************************************************************/
- var
-
- defaultLabelOptions = {
- enabled: true,
- // rotation: 0,
- align: 'center',
- x: 0,
- y: 15,
- /*formatter: function () {
- return this.value;
- },*/
- style: {
- color: '#666',
- fontSize: '11px',
- lineHeight: '14px'
- }
- };
-
- defaultOptions = {
- colors: ['#4572A7', '#AA4643', '#89A54E', '#80699B', '#3D96AE',
- '#DB843D', '#92A8CD', '#A47D7C', '#B5CA92'],
- symbols: ['circle', 'diamond', 'square', 'triangle', 'triangle-down'],
- lang: {
- loading: 'Loading...',
- months: ['January', 'February', 'March', 'April', 'May', 'June', 'July',
- 'August', 'September', 'October', 'November', 'December'],
- shortMonths: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],
- weekdays: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'],
- decimalPoint: '.',
- resetZoom: 'Reset zoom',
- resetZoomTitle: 'Reset zoom level 1:1',
- thousandsSep: ','
- },
- global: {
- useUTC: true,
- canvasToolsURL: 'http://code.highcharts.com/2.2.5/modules/canvas-tools.js'
- },
- chart: {
- //animation: true,
- //alignTicks: false,
- //reflow: true,
- //className: null,
- //events: { load, selection },
- //margin: [null],
- //marginTop: null,
- //marginRight: null,
- //marginBottom: null,
- //marginLeft: null,
- borderColor: '#4572A7',
- //borderWidth: 0,
- borderRadius: 5,
- defaultSeriesType: 'line',
- ignoreHiddenSeries: true,
- //inverted: false,
- //shadow: false,
- spacingTop: 10,
- spacingRight: 10,
- spacingBottom: 15,
- spacingLeft: 10,
- style: {
- fontFamily: '"Lucida Grande", "Lucida Sans Unicode", Verdana, Arial, Helvetica, sans-serif', // default font
- fontSize: '12px'
- },
- backgroundColor: '#FFFFFF',
- //plotBackgroundColor: null,
- plotBorderColor: '#C0C0C0',
- //plotBorderWidth: 0,
- //plotShadow: false,
- //zoomType: ''
- resetZoomButton: {
- theme: {
- zIndex: 20
- },
- position: {
- align: 'right',
- x: -10,
- //verticalAlign: 'top',
- y: 10
- }
- // relativeTo: 'plot'
- }
- },
- title: {
- text: 'Chart title',
- align: 'center',
- // floating: false,
- // margin: 15,
- // x: 0,
- // verticalAlign: 'top',
- y: 15,
- style: {
- color: '#3E576F',
- fontSize: '16px'
- }
-
- },
- subtitle: {
- text: '',
- align: 'center',
- // floating: false
- // x: 0,
- // verticalAlign: 'top',
- y: 30,
- style: {
- color: '#6D869F'
- }
- },
-
- plotOptions: {
- line: { // base series options
- allowPointSelect: false,
- showCheckbox: false,
- animation: {
- duration: 1000
- },
- //connectNulls: false,
- //cursor: 'default',
- //clip: true,
- //dashStyle: null,
- //enableMouseTracking: true,
- events: {},
- //legendIndex: 0,
- lineWidth: 2,
- shadow: true,
- // stacking: null,
- marker: {
- enabled: true,
- //symbol: null,
- lineWidth: 0,
- radius: 4,
- lineColor: '#FFFFFF',
- //fillColor: null,
- states: { // states for a single point
- hover: {
- //radius: base + 2
- },
- select: {
- fillColor: '#FFFFFF',
- lineColor: '#000000',
- lineWidth: 2
- }
- }
- },
- point: {
- events: {}
- },
- dataLabels: merge(defaultLabelOptions, {
- enabled: false,
- y: -6,
- formatter: function () {
- return this.y;
- }
- // backgroundColor: undefined,
- // borderColor: undefined,
- // borderRadius: undefined,
- // borderWidth: undefined,
- // padding: 3,
- // shadow: false
- }),
- cropThreshold: 300, // draw points outside the plot area when the number of points is less than this
- pointRange: 0,
- //pointStart: 0,
- //pointInterval: 1,
- showInLegend: true,
- states: { // states for the entire series
- hover: {
- //enabled: false,
- //lineWidth: base + 1,
- marker: {
- // lineWidth: base + 1,
- // radius: base + 1
- }
- },
- select: {
- marker: {}
- }
- },
- stickyTracking: true
- //tooltip: {
- //pointFormat: '{series.name} : {point.y} '
- //valueDecimals: null,
- //xDateFormat: '%A, %b %e, %Y',
- //valuePrefix: '',
- //ySuffix: ''
- //}
- // turboThreshold: 1000
- // zIndex: null
- }
- },
- labels: {
- //items: [],
- style: {
- //font: defaultFont,
- position: ABSOLUTE,
- color: '#3E576F'
- }
- },
- legend: {
- enabled: true,
- align: 'center',
- //floating: false,
- layout: 'horizontal',
- labelFormatter: function () {
- return this.name;
- },
- borderWidth: 1,
- borderColor: '#909090',
- borderRadius: 5,
- navigation: {
- // animation: true,
- activeColor: '#3E576F',
- // arrowSize: 12
- inactiveColor: '#CCC'
- // style: {} // text styles
- },
- // margin: 10,
- // reversed: false,
- shadow: false,
- // backgroundColor: null,
- /*style: {
- padding: '5px'
- },*/
- itemStyle: {
- cursor: 'pointer',
- color: '#3E576F',
- fontSize: '12px'
- },
- itemHoverStyle: {
- //cursor: 'pointer', removed as of #601
- color: '#000'
- },
- itemHiddenStyle: {
- color: '#CCC'
- },
- itemCheckboxStyle: {
- position: ABSOLUTE,
- width: '13px', // for IE precision
- height: '13px'
- },
- // itemWidth: undefined,
- symbolWidth: 16,
- symbolPadding: 5,
- verticalAlign: 'bottom',
- // width: undefined,
- x: 0,
- y: 0
- },
-
- loading: {
- // hideDuration: 100,
- labelStyle: {
- fontWeight: 'bold',
- position: RELATIVE,
- top: '1em'
- },
- // showDuration: 0,
- style: {
- position: ABSOLUTE,
- backgroundColor: 'white',
- opacity: 0.5,
- textAlign: 'center'
- }
- },
-
- tooltip: {
- enabled: true,
- //crosshairs: null,
- backgroundColor: 'rgba(255, 255, 255, .85)',
- borderWidth: 2,
- borderRadius: 5,
- dateTimeLabelFormats: {
- millisecond: '%A, %b %e, %H:%M:%S.%L',
- second: '%A, %b %e, %H:%M:%S',
- minute: '%A, %b %e, %H:%M',
- hour: '%A, %b %e, %H:%M',
- day: '%A, %b %e, %Y',
- week: 'Week from %A, %b %e, %Y',
- month: '%B %Y',
- year: '%Y'
- },
- //formatter: defaultFormatter,
- headerFormat: '{point.key} ',
- pointFormat: '{series.name} : {point.y} ',
- shadow: true,
- shared: useCanVG,
- snap: hasTouch ? 25 : 10,
- style: {
- color: '#333333',
- fontSize: '12px',
- padding: '5px',
- whiteSpace: 'nowrap'
- }
- //xDateFormat: '%A, %b %e, %Y',
- //valueDecimals: null,
- //valuePrefix: '',
- //valueSuffix: ''
- },
-
- credits: {
- enabled: true,
- text: 'Highcharts.com',
- href: 'http://www.highcharts.com',
- position: {
- align: 'right',
- x: -10,
- verticalAlign: 'bottom',
- y: -5
- },
- style: {
- cursor: 'pointer',
- color: '#909090',
- fontSize: '10px'
- }
- }
- };
-
-
-// Series defaults
- var defaultPlotOptions = defaultOptions.plotOptions,
- defaultSeriesOptions = defaultPlotOptions.line;
-
-// set the default time methods
- setTimeMethods();
-
-
- /**
- * Set the time methods globally based on the useUTC option. Time method can be either
- * local time or UTC (default).
- */
- function setTimeMethods() {
- var useUTC = defaultOptions.global.useUTC,
- GET = useUTC ? 'getUTC' : 'get',
- SET = useUTC ? 'setUTC' : 'set';
-
- makeTime = useUTC ? Date.UTC : function (year, month, date, hours, minutes, seconds) {
- return new Date(
- year,
- month,
- pick(date, 1),
- pick(hours, 0),
- pick(minutes, 0),
- pick(seconds, 0)
- ).getTime();
- };
- getMinutes = GET + 'Minutes';
- getHours = GET + 'Hours';
- getDay = GET + 'Day';
- getDate = GET + 'Date';
- getMonth = GET + 'Month';
- getFullYear = GET + 'FullYear';
- setMinutes = SET + 'Minutes';
- setHours = SET + 'Hours';
- setDate = SET + 'Date';
- setMonth = SET + 'Month';
- setFullYear = SET + 'FullYear';
-
- }
-
- /**
- * Merge the default options with custom options and return the new options structure
- * @param {Object} options The new custom options
- */
- function setOptions(options) {
-
- // Pull out axis options and apply them to the respective default axis options
- /*defaultXAxisOptions = merge(defaultXAxisOptions, options.xAxis);
- defaultYAxisOptions = merge(defaultYAxisOptions, options.yAxis);
- options.xAxis = options.yAxis = UNDEFINED;*/
-
- // Merge in the default options
- defaultOptions = merge(defaultOptions, options);
-
- // Apply UTC
- setTimeMethods();
-
- return defaultOptions;
- }
-
- /**
- * Get the updated default options. Merely exposing defaultOptions for outside modules
- * isn't enough because the setOptions method creates a new object.
- */
- function getOptions() {
- return defaultOptions;
- }
-
-
- /**
- * Handle color operations. The object methods are chainable.
- * @param {String} input The input color in either rbga or hex format
- */
- var Color = function (input) {
- // declare variables
- var rgba = [], result;
-
- /**
- * Parse the input color to rgba array
- * @param {String} input
- */
- function init(input) {
-
- // rgba
- result = /rgba\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]?(?:\.[0-9]+)?)\s*\)/.exec(input);
- if (result) {
- rgba = [pInt(result[1]), pInt(result[2]), pInt(result[3]), parseFloat(result[4], 10)];
- } else { // hex
- result = /#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(input);
- if (result) {
- rgba = [pInt(result[1], 16), pInt(result[2], 16), pInt(result[3], 16), 1];
- }
- }
-
- }
-
- /**
- * Return the color a specified format
- * @param {String} format
- */
- function get(format) {
- var ret;
-
- // it's NaN if gradient colors on a column chart
- if (rgba && !isNaN(rgba[0])) {
- if (format === 'rgb') {
- ret = 'rgb(' + rgba[0] + ',' + rgba[1] + ',' + rgba[2] + ')';
- } else if (format === 'a') {
- ret = rgba[3];
- } else {
- ret = 'rgba(' + rgba.join(',') + ')';
- }
- } else {
- ret = input;
- }
- return ret;
- }
-
- /**
- * Brighten the color
- * @param {Number} alpha
- */
- function brighten(alpha) {
- if (isNumber(alpha) && alpha !== 0) {
- var i;
- for (i = 0; i < 3; i++) {
- rgba[i] += pInt(alpha * 255);
-
- if (rgba[i] < 0) {
- rgba[i] = 0;
- }
- if (rgba[i] > 255) {
- rgba[i] = 255;
- }
- }
- }
- return this;
- }
-
- /**
- * Set the color's opacity to a given alpha value
- * @param {Number} alpha
- */
- function setOpacity(alpha) {
- rgba[3] = alpha;
- return this;
- }
-
- // initialize: parse the input
- init(input);
-
- // public methods
- return {
- get: get,
- brighten: brighten,
- setOpacity: setOpacity
- };
- };
-
-
- /**
- * A wrapper object for SVG elements
- */
- function SVGElement() {
- }
-
- SVGElement.prototype = {
- /**
- * Initialize the SVG renderer
- * @param {Object} renderer
- * @param {String} nodeName
- */
- init: function (renderer, nodeName) {
- var wrapper = this;
- wrapper.element = nodeName === 'span' ?
- createElement(nodeName) :
- doc.createElementNS(SVG_NS, nodeName);
- wrapper.renderer = renderer;
- /**
- * A collection of attribute setters. These methods, if defined, are called right before a certain
- * attribute is set on an element wrapper. Returning false prevents the default attribute
- * setter to run. Returning a value causes the default setter to set that value. Used in
- * Renderer.label.
- */
- wrapper.attrSetters = {};
- },
- /**
- * Animate a given attribute
- * @param {Object} params
- * @param {Number} options The same options as in jQuery animation
- * @param {Function} complete Function to perform at the end of animation
- */
- animate: function (params, options, complete) {
- var animOptions = pick(options, globalAnimation, true);
- stop(this); // stop regardless of animation actually running, or reverting to .attr (#607)
- if (animOptions) {
- animOptions = merge(animOptions);
- if (complete) { // allows using a callback with the global animation without overwriting it
- animOptions.complete = complete;
- }
- animate(this, params, animOptions);
- } else {
- this.attr(params);
- if (complete) {
- complete();
- }
- }
- },
- /**
- * Set or get a given attribute
- * @param {Object|String} hash
- * @param {Mixed|Undefined} val
- */
- attr: function (hash, val) {
- var wrapper = this,
- key,
- value,
- result,
- i,
- child,
- element = wrapper.element,
- nodeName = element.nodeName,
- renderer = wrapper.renderer,
- skipAttr,
- titleNode,
- attrSetters = wrapper.attrSetters,
- shadows = wrapper.shadows,
- hasSetSymbolSize,
- doTransform,
- ret = wrapper;
-
- // single key-value pair
- if (isString(hash) && defined(val)) {
- key = hash;
- hash = {};
- hash[key] = val;
- }
-
- // used as a getter: first argument is a string, second is undefined
- if (isString(hash)) {
- key = hash;
- if (nodeName === 'circle') {
- key = { x: 'cx', y: 'cy' }[key] || key;
- } else if (key === 'strokeWidth') {
- key = 'stroke-width';
- }
- ret = attr(element, key) || wrapper[key] || 0;
-
- if (key !== 'd' && key !== 'visibility') { // 'd' is string in animation step
- ret = parseFloat(ret);
- }
-
- // setter
- } else {
-
- for (key in hash) {
- skipAttr = false; // reset
- value = hash[key];
-
- // check for a specific attribute setter
- result = attrSetters[key] && attrSetters[key](value, key);
-
- if (result !== false) {
- if (result !== UNDEFINED) {
- value = result; // the attribute setter has returned a new value to set
- }
-
- // paths
- if (key === 'd') {
- if (value && value.join) { // join path
- value = value.join(' ');
- }
- if (/(NaN| {2}|^$)/.test(value)) {
- value = 'M 0 0';
- }
- //wrapper.d = value; // shortcut for animations
-
- // update child tspans x values
- } else if (key === 'x' && nodeName === 'text') {
- for (i = 0; i < element.childNodes.length; i++) {
- child = element.childNodes[i];
- // if the x values are equal, the tspan represents a linebreak
- if (attr(child, 'x') === attr(element, 'x')) {
- //child.setAttribute('x', value);
- attr(child, 'x', value);
- }
- }
-
- if (wrapper.rotation) {
- attr(element, 'transform', 'rotate(' + wrapper.rotation + ' ' + value + ' ' +
- pInt(hash.y || attr(element, 'y')) + ')');
- }
-
- // apply gradients
- } else if (key === 'fill') {
- value = renderer.color(value, element, key);
-
- // circle x and y
- } else if (nodeName === 'circle' && (key === 'x' || key === 'y')) {
- key = { x: 'cx', y: 'cy' }[key] || key;
-
- // rectangle border radius
- } else if (nodeName === 'rect' && key === 'r') {
- attr(element, {
- rx: value,
- ry: value
- });
- skipAttr = true;
-
- // translation and text rotation
- } else if (key === 'translateX' || key === 'translateY' || key === 'rotation' || key === 'verticalAlign') {
- doTransform = true;
- skipAttr = true;
-
- // apply opacity as subnode (required by legacy WebKit and Batik)
- } else if (key === 'stroke') {
- value = renderer.color(value, element, key);
-
- // emulate VML's dashstyle implementation
- } else if (key === 'dashstyle') {
- key = 'stroke-dasharray';
- value = value && value.toLowerCase();
- if (value === 'solid') {
- value = NONE;
- } else if (value) {
- value = value
- .replace('shortdashdotdot', '3,1,1,1,1,1,')
- .replace('shortdashdot', '3,1,1,1')
- .replace('shortdot', '1,1,')
- .replace('shortdash', '3,1,')
- .replace('longdash', '8,3,')
- .replace(/dot/g, '1,3,')
- .replace('dash', '4,3,')
- .replace(/,$/, '')
- .split(','); // ending comma
-
- i = value.length;
- while (i--) {
- value[i] = pInt(value[i]) * hash['stroke-width'];
- }
- value = value.join(',');
- }
-
- // special
- } else if (key === 'isTracker') {
- wrapper[key] = value;
-
- // IE9/MooTools combo: MooTools returns objects instead of numbers and IE9 Beta 2
- // is unable to cast them. Test again with final IE9.
- } else if (key === 'width') {
- value = pInt(value);
-
- // Text alignment
- } else if (key === 'align') {
- key = 'text-anchor';
- value = { left: 'start', center: 'middle', right: 'end' }[value];
-
- // Title requires a subnode, #431
- } else if (key === 'title') {
- titleNode = element.getElementsByTagName('title')[0];
- if (!titleNode) {
- titleNode = doc.createElementNS(SVG_NS, 'title');
- element.appendChild(titleNode);
- }
- titleNode.textContent = value;
- }
-
- // jQuery animate changes case
- if (key === 'strokeWidth') {
- key = 'stroke-width';
- }
-
- // Chrome/Win < 6 bug (http://code.google.com/p/chromium/issues/detail?id=15461)
- if (isWebKit && key === 'stroke-width' && value === 0) {
- value = 0.000001;
- }
-
- // symbols
- if (wrapper.symbolName && /^(x|y|width|height|r|start|end|innerR|anchorX|anchorY)/.test(key)) {
-
-
- if (!hasSetSymbolSize) {
- wrapper.symbolAttr(hash);
- hasSetSymbolSize = true;
- }
- skipAttr = true;
- }
-
- // let the shadow follow the main element
- if (shadows && /^(width|height|visibility|x|y|d|transform)$/.test(key)) {
- i = shadows.length;
- while (i--) {
- attr(
- shadows[i],
- key,
- key === 'height' ?
- mathMax(value - (shadows[i].cutHeight || 0), 0) :
- value
- );
- }
- }
-
- // validate heights
- if ((key === 'width' || key === 'height') && nodeName === 'rect' && value < 0) {
- value = 0;
- }
-
- // Record for animation and quick access without polling the DOM
- wrapper[key] = value;
-
- // Update transform
- if (doTransform) {
- wrapper.updateTransform();
- }
-
-
- if (key === 'text') {
- // only one node allowed
- wrapper.textStr = value;
- if (wrapper.added) {
- renderer.buildText(wrapper);
- }
- } else if (!skipAttr) {
- attr(element, key, value);
- }
-
- }
-
- }
-
- }
-
- // Workaround for our #732, WebKit's issue https://bugs.webkit.org/show_bug.cgi?id=78385
- // TODO: If the WebKit team fix this bug before the final release of Chrome 18, remove the workaround.
- if (isWebKit && /Chrome\/(18|19)/.test(userAgent)) {
- if (nodeName === 'text' && (hash.x !== UNDEFINED || hash.y !== UNDEFINED)) {
- var parent = element.parentNode,
- next = element.nextSibling;
-
- if (parent) {
- parent.removeChild(element);
- if (next) {
- parent.insertBefore(element, next);
- } else {
- parent.appendChild(element);
- }
- }
- }
- }
- // End of workaround for #732
-
- return ret;
- },
-
- /**
- * If one of the symbol size affecting parameters are changed,
- * check all the others only once for each call to an element's
- * .attr() method
- * @param {Object} hash
- */
- symbolAttr: function (hash) {
- var wrapper = this;
-
- each(['x', 'y', 'r', 'start', 'end', 'width', 'height', 'innerR', 'anchorX', 'anchorY'], function (key) {
- wrapper[key] = pick(hash[key], wrapper[key]);
- });
-
- wrapper.attr({
- d: wrapper.renderer.symbols[wrapper.symbolName](wrapper.x, wrapper.y, wrapper.width, wrapper.height, wrapper)
- });
- },
-
- /**
- * Apply a clipping path to this object
- * @param {String} id
- */
- clip: function (clipRect) {
- return this.attr('clip-path', 'url(' + this.renderer.url + '#' + clipRect.id + ')');
- },
-
- /**
- * Calculate the coordinates needed for drawing a rectangle crisply and return the
- * calculated attributes
- * @param {Number} strokeWidth
- * @param {Number} x
- * @param {Number} y
- * @param {Number} width
- * @param {Number} height
- */
- crisp: function (strokeWidth, x, y, width, height) {
-
- var wrapper = this,
- key,
- attribs = {},
- values = {},
- normalizer;
-
- strokeWidth = strokeWidth || wrapper.strokeWidth || (wrapper.attr && wrapper.attr('stroke-width')) || 0;
- normalizer = mathRound(strokeWidth) % 2 / 2; // mathRound because strokeWidth can sometimes have roundoff errors
-
- // normalize for crisp edges
- values.x = mathFloor(x || wrapper.x || 0) + normalizer;
- values.y = mathFloor(y || wrapper.y || 0) + normalizer;
- values.width = mathFloor((width || wrapper.width || 0) - 2 * normalizer);
- values.height = mathFloor((height || wrapper.height || 0) - 2 * normalizer);
- values.strokeWidth = strokeWidth;
-
- for (key in values) {
- if (wrapper[key] !== values[key]) { // only set attribute if changed
- wrapper[key] = attribs[key] = values[key];
- }
- }
-
- return attribs;
- },
-
- /**
- * Set styles for the element
- * @param {Object} styles
- */
- css: function (styles) {
- /*jslint unparam: true*/
- /* allow unused param a in the regexp function below */
- var elemWrapper = this,
- elem = elemWrapper.element,
- textWidth = styles && styles.width && elem.nodeName === 'text',
- n,
- serializedCss = '',
- hyphenate = function (a, b) {
- return '-' + b.toLowerCase();
- };
- /*jslint unparam: false*/
-
- // convert legacy
- if (styles && styles.color) {
- styles.fill = styles.color;
- }
-
- // Merge the new styles with the old ones
- styles = extend(
- elemWrapper.styles,
- styles
- );
-
- // store object
- elemWrapper.styles = styles;
-
- // serialize and set style attribute
- if (isIE && !hasSVG) { // legacy IE doesn't support setting style attribute
- if (textWidth) {
- delete styles.width;
- }
- css(elemWrapper.element, styles);
- } else {
- for (n in styles) {
- serializedCss += n.replace(/([A-Z])/g, hyphenate) + ':' + styles[n] + ';';
- }
- elemWrapper.attr({
- style: serializedCss
- });
- }
-
-
- // re-build text
- if (textWidth && elemWrapper.added) {
- elemWrapper.renderer.buildText(elemWrapper);
- }
-
- return elemWrapper;
- },
-
- /**
- * Add an event listener
- * @param {String} eventType
- * @param {Function} handler
- */
- on: function (eventType, handler) {
- var fn = handler;
- // touch
- if (hasTouch && eventType === 'click') {
- eventType = 'touchstart';
- fn = function (e) {
- e.preventDefault();
- handler();
- };
- }
- // simplest possible event model for internal use
- this.element['on' + eventType] = fn;
- return this;
- },
-
- /**
- * Set the coordinates needed to draw a consistent radial gradient across
- * pie slices regardless of positioning inside the chart. The format is
- * [centerX, centerY, diameter] in pixels.
- */
- setRadialReference: function (coordinates) {
- this.element.radialReference = coordinates;
- return this;
- },
-
- /**
- * Move an object and its children by x and y values
- * @param {Number} x
- * @param {Number} y
- */
- translate: function (x, y) {
- return this.attr({
- translateX: x,
- translateY: y
- });
- },
-
- /**
- * Invert a group, rotate and flip
- */
- invert: function () {
- var wrapper = this;
- wrapper.inverted = true;
- wrapper.updateTransform();
- return wrapper;
- },
-
- /**
- * Apply CSS to HTML elements. This is used in text within SVG rendering and
- * by the VML renderer
- */
- htmlCss: function (styles) {
- var wrapper = this,
- element = wrapper.element,
- textWidth = styles && element.tagName === 'SPAN' && styles.width;
-
- if (textWidth) {
- delete styles.width;
- wrapper.textWidth = textWidth;
- wrapper.updateTransform();
- }
-
- wrapper.styles = extend(wrapper.styles, styles);
- css(wrapper.element, styles);
-
- return wrapper;
- },
-
-
- /**
- * VML and useHTML method for calculating the bounding box based on offsets
- * @param {Boolean} refresh Whether to force a fresh value from the DOM or to
- * use the cached value
- *
- * @return {Object} A hash containing values for x, y, width and height
- */
-
- htmlGetBBox: function (refresh) {
- var wrapper = this,
- element = wrapper.element,
- bBox = wrapper.bBox;
-
- // faking getBBox in exported SVG in legacy IE
- if (!bBox || refresh) {
- // faking getBBox in exported SVG in legacy IE
- if (element.nodeName === 'text') {
- element.style.position = ABSOLUTE;
- }
-
- bBox = wrapper.bBox = {
- x: element.offsetLeft,
- y: element.offsetTop,
- width: element.offsetWidth,
- height: element.offsetHeight
- };
- }
-
- return bBox;
- },
-
- /**
- * VML override private method to update elements based on internal
- * properties based on SVG transform
- */
- htmlUpdateTransform: function () {
- // aligning non added elements is expensive
- if (!this.added) {
- this.alignOnAdd = true;
- return;
- }
-
- var wrapper = this,
- renderer = wrapper.renderer,
- elem = wrapper.element,
- translateX = wrapper.translateX || 0,
- translateY = wrapper.translateY || 0,
- x = wrapper.x || 0,
- y = wrapper.y || 0,
- align = wrapper.textAlign || 'left',
- alignCorrection = { left: 0, center: 0.5, right: 1 }[align],
- nonLeft = align && align !== 'left',
- shadows = wrapper.shadows;
-
- // apply translate
- if (translateX || translateY) {
- css(elem, {
- marginLeft: translateX,
- marginTop: translateY
- });
- if (shadows) { // used in labels/tooltip
- each(shadows, function (shadow) {
- css(shadow, {
- marginLeft: translateX + 1,
- marginTop: translateY + 1
- });
- });
- }
- }
-
- // apply inversion
- if (wrapper.inverted) { // wrapper is a group
- each(elem.childNodes, function (child) {
- renderer.invertChild(child, elem);
- });
- }
-
- if (elem.tagName === 'SPAN') {
-
- var width, height,
- rotation = wrapper.rotation,
- baseline,
- radians = 0,
- costheta = 1,
- sintheta = 0,
- quad,
- textWidth = pInt(wrapper.textWidth),
- xCorr = wrapper.xCorr || 0,
- yCorr = wrapper.yCorr || 0,
- currentTextTransform = [rotation, align, elem.innerHTML, wrapper.textWidth].join(',');
-
- if (currentTextTransform !== wrapper.cTT) { // do the calculations and DOM access only if properties changed
-
- if (defined(rotation)) {
- radians = rotation * deg2rad; // deg to rad
- costheta = mathCos(radians);
- sintheta = mathSin(radians);
-
- // Adjust for alignment and rotation. Rotation of useHTML content is not yet implemented
- // but it can probably be implemented for Firefox 3.5+ on user request. FF3.5+
- // has support for CSS3 transform. The getBBox method also needs to be updated
- // to compensate for the rotation, like it currently does for SVG.
- // Test case: http://highcharts.com/tests/?file=text-rotation
- css(elem, {
- filter: rotation ? ['progid:DXImageTransform.Microsoft.Matrix(M11=', costheta,
- ', M12=', -sintheta, ', M21=', sintheta, ', M22=', costheta,
- ', sizingMethod=\'auto expand\')'].join('') : NONE
- });
- }
-
- width = pick(wrapper.elemWidth, elem.offsetWidth);
- height = pick(wrapper.elemHeight, elem.offsetHeight);
-
- // update textWidth
- if (width > textWidth && /[ \-]/.test(elem.innerText)) { // #983
- css(elem, {
- width: textWidth + PX,
- display: 'block',
- whiteSpace: 'normal'
- });
- width = textWidth;
- }
-
- // correct x and y
- baseline = renderer.fontMetrics(elem.style.fontSize).b;
- xCorr = costheta < 0 && -width;
- yCorr = sintheta < 0 && -height;
-
- // correct for baseline and corners spilling out after rotation
- quad = costheta * sintheta < 0;
- xCorr += sintheta * baseline * (quad ? 1 - alignCorrection : alignCorrection);
- yCorr -= costheta * baseline * (rotation ? (quad ? alignCorrection : 1 - alignCorrection) : 1);
-
- // correct for the length/height of the text
- if (nonLeft) {
- xCorr -= width * alignCorrection * (costheta < 0 ? -1 : 1);
- if (rotation) {
- yCorr -= height * alignCorrection * (sintheta < 0 ? -1 : 1);
- }
- css(elem, {
- textAlign: align
- });
- }
-
- // record correction
- wrapper.xCorr = xCorr;
- wrapper.yCorr = yCorr;
- }
-
- // apply position with correction
- css(elem, {
- left: (x + xCorr) + PX,
- top: (y + yCorr) + PX
- });
-
- // record current text transform
- wrapper.cTT = currentTextTransform;
- }
- },
-
- /**
- * Private method to update the transform attribute based on internal
- * properties
- */
- updateTransform: function () {
- var wrapper = this,
- translateX = wrapper.translateX || 0,
- translateY = wrapper.translateY || 0,
- inverted = wrapper.inverted,
- rotation = wrapper.rotation,
- transform = [];
-
- // flipping affects translate as adjustment for flipping around the group's axis
- if (inverted) {
- translateX += wrapper.attr('width');
- translateY += wrapper.attr('height');
- }
-
- // apply translate
- if (translateX || translateY) {
- transform.push('translate(' + translateX + ',' + translateY + ')');
- }
-
- // apply rotation
- if (inverted) {
- transform.push('rotate(90) scale(-1,1)');
- } else if (rotation) { // text rotation
- transform.push('rotate(' + rotation + ' ' + (wrapper.x || 0) + ' ' + (wrapper.y || 0) + ')');
- }
-
- if (transform.length) {
- attr(wrapper.element, 'transform', transform.join(' '));
- }
- },
- /**
- * Bring the element to the front
- */
- toFront: function () {
- var element = this.element;
- element.parentNode.appendChild(element);
- return this;
- },
-
-
- /**
- * Break down alignment options like align, verticalAlign, x and y
- * to x and y relative to the chart.
- *
- * @param {Object} alignOptions
- * @param {Boolean} alignByTranslate
- * @param {Object} box The box to align to, needs a width and height
- *
- */
- align: function (alignOptions, alignByTranslate, box) {
- var elemWrapper = this;
-
- if (!alignOptions) { // called on resize
- alignOptions = elemWrapper.alignOptions;
- alignByTranslate = elemWrapper.alignByTranslate;
- } else { // first call on instanciate
- elemWrapper.alignOptions = alignOptions;
- elemWrapper.alignByTranslate = alignByTranslate;
- if (!box) { // boxes other than renderer handle this internally
- elemWrapper.renderer.alignedObjects.push(elemWrapper);
- }
- }
-
- box = pick(box, elemWrapper.renderer);
-
- var align = alignOptions.align,
- vAlign = alignOptions.verticalAlign,
- x = (box.x || 0) + (alignOptions.x || 0), // default: left align
- y = (box.y || 0) + (alignOptions.y || 0), // default: top align
- attribs = {};
-
-
- // align
- if (/^(right|center)$/.test(align)) {
- x += (box.width - (alignOptions.width || 0)) /
- { right: 1, center: 2 }[align];
- }
- attribs[alignByTranslate ? 'translateX' : 'x'] = mathRound(x);
-
-
- // vertical align
- if (/^(bottom|middle)$/.test(vAlign)) {
- y += (box.height - (alignOptions.height || 0)) /
- ({ bottom: 1, middle: 2 }[vAlign] || 1);
-
- }
- attribs[alignByTranslate ? 'translateY' : 'y'] = mathRound(y);
-
- // animate only if already placed
- elemWrapper[elemWrapper.placed ? 'animate' : 'attr'](attribs);
- elemWrapper.placed = true;
- elemWrapper.alignAttr = attribs;
-
- return elemWrapper;
- },
-
- /**
- * Get the bounding box (width, height, x and y) for the element
- */
- getBBox: function (refresh) {
- var wrapper = this,
- bBox,
- width,
- height,
- rotation = wrapper.rotation,
- element = wrapper.element,
- rad = rotation * deg2rad;
-
- // SVG elements
- if (element.namespaceURI === SVG_NS || wrapper.renderer.forExport) {
- try { // Fails in Firefox if the container has display: none.
-
- bBox = element.getBBox ?
- // SVG: use extend because IE9 is not allowed to change width and height in case
- // of rotation (below)
- extend({}, element.getBBox()) :
- // Canvas renderer and legacy IE in export mode
- {
- width: element.offsetWidth,
- height: element.offsetHeight
- };
- } catch (e) {
- }
-
- // If the bBox is not set, the try-catch block above failed. The other condition
- // is for Opera that returns a width of -Infinity on hidden elements.
- if (!bBox || bBox.width < 0) {
- bBox = { width: 0, height: 0 };
- }
-
- width = bBox.width;
- height = bBox.height;
-
- // adjust for rotated text
- if (rotation) {
- bBox.width = mathAbs(height * mathSin(rad)) + mathAbs(width * mathCos(rad));
- bBox.height = mathAbs(height * mathCos(rad)) + mathAbs(width * mathSin(rad));
- }
-
- // VML Renderer or useHTML within SVG
- } else {
- bBox = wrapper.htmlGetBBox(refresh);
- }
-
- return bBox;
- },
-
- /**
- * Show the element
- */
- show: function () {
- return this.attr({ visibility: VISIBLE });
- },
-
- /**
- * Hide the element
- */
- hide: function () {
- return this.attr({ visibility: HIDDEN });
- },
-
- /**
- * Add the element
- * @param {Object|Undefined} parent Can be an element, an element wrapper or undefined
- * to append the element to the renderer.box.
- */
- add: function (parent) {
-
- var renderer = this.renderer,
- parentWrapper = parent || renderer,
- parentNode = parentWrapper.element || renderer.box,
- childNodes = parentNode.childNodes,
- element = this.element,
- zIndex = attr(element, 'zIndex'),
- otherElement,
- otherZIndex,
- i,
- inserted;
-
- // mark as inverted
- this.parentInverted = parent && parent.inverted;
-
- // build formatted text
- if (this.textStr !== undefined) {
- renderer.buildText(this);
- }
-
- // mark the container as having z indexed children
- if (zIndex) {
- parentWrapper.handleZ = true;
- zIndex = pInt(zIndex);
- }
-
- // insert according to this and other elements' zIndex
- if (parentWrapper.handleZ) { // this element or any of its siblings has a z index
- for (i = 0; i < childNodes.length; i++) {
- otherElement = childNodes[i];
- otherZIndex = attr(otherElement, 'zIndex');
- if (otherElement !== element && (
- // insert before the first element with a higher zIndex
- pInt(otherZIndex) > zIndex ||
- // if no zIndex given, insert before the first element with a zIndex
- (!defined(zIndex) && defined(otherZIndex))
-
- )) {
- parentNode.insertBefore(element, otherElement);
- inserted = true;
- break;
- }
- }
- }
-
- // default: append at the end
- if (!inserted) {
- parentNode.appendChild(element);
- }
-
- // mark as added
- this.added = true;
-
- // fire an event for internal hooks
- fireEvent(this, 'add');
-
- return this;
- },
-
- /**
- * Removes a child either by removeChild or move to garbageBin.
- * Issue 490; in VML removeChild results in Orphaned nodes according to sIEve, discardElement does not.
- */
- safeRemoveChild: function (element) {
- var parentNode = element.parentNode;
- if (parentNode) {
- parentNode.removeChild(element);
- }
- },
-
- /**
- * Destroy the element and element wrapper
- */
- destroy: function () {
- var wrapper = this,
- element = wrapper.element || {},
- shadows = wrapper.shadows,
- box = wrapper.box,
- key,
- i;
-
- // remove events
- element.onclick = element.onmouseout = element.onmouseover = element.onmousemove = null;
- stop(wrapper); // stop running animations
-
- if (wrapper.clipPath) {
- wrapper.clipPath = wrapper.clipPath.destroy();
- }
-
- // Destroy stops in case this is a gradient object
- if (wrapper.stops) {
- for (i = 0; i < wrapper.stops.length; i++) {
- wrapper.stops[i] = wrapper.stops[i].destroy();
- }
- wrapper.stops = null;
- }
-
- // remove element
- wrapper.safeRemoveChild(element);
-
- // destroy shadows
- if (shadows) {
- each(shadows, function (shadow) {
- wrapper.safeRemoveChild(shadow);
- });
- }
-
- // destroy label box
- if (box) {
- box.destroy();
- }
-
- // remove from alignObjects
- erase(wrapper.renderer.alignedObjects, wrapper);
-
- for (key in wrapper) {
- delete wrapper[key];
- }
-
- return null;
- },
-
- /**
- * Empty a group element
- */
- empty: function () {
- var element = this.element,
- childNodes = element.childNodes,
- i = childNodes.length;
-
- while (i--) {
- element.removeChild(childNodes[i]);
- }
- },
-
- /**
- * Add a shadow to the element. Must be done after the element is added to the DOM
- * @param {Boolean} apply
- */
- shadow: function (apply, group, cutOff) {
- var shadows = [],
- i,
- shadow,
- element = this.element,
- strokeWidth,
-
- // compensate for inverted plot area
- transform = this.parentInverted ? '(-1,-1)' : '(1,1)';
-
-
- if (apply) {
- for (i = 1; i <= 3; i++) {
- shadow = element.cloneNode(0);
- strokeWidth = 7 - 2 * i;
- attr(shadow, {
- 'isShadow': 'true',
- 'stroke': 'rgb(0, 0, 0)',
- 'stroke-opacity': 0.05 * i,
- 'stroke-width': strokeWidth,
- 'transform': 'translate' + transform,
- 'fill': NONE
- });
- if (cutOff) {
- attr(shadow, 'height', mathMax(attr(shadow, 'height') - strokeWidth, 0));
- shadow.cutHeight = strokeWidth;
- }
-
- if (group) {
- group.element.appendChild(shadow);
- } else {
- element.parentNode.insertBefore(shadow, element);
- }
-
- shadows.push(shadow);
- }
-
- this.shadows = shadows;
- }
- return this;
-
- }
- };
-
-
- /**
- * The default SVG renderer
- */
- var SVGRenderer = function () {
- this.init.apply(this, arguments);
- };
- SVGRenderer.prototype = {
- Element: SVGElement,
-
- /**
- * Initialize the SVGRenderer
- * @param {Object} container
- * @param {Number} width
- * @param {Number} height
- * @param {Boolean} forExport
- */
- init: function (container, width, height, forExport) {
- var renderer = this,
- loc = location,
- boxWrapper;
-
- boxWrapper = renderer.createElement('svg')
- .attr({
- xmlns: SVG_NS,
- version: '1.1'
- });
- container.appendChild(boxWrapper.element);
-
- // object properties
- renderer.isSVG = true;
- renderer.box = boxWrapper.element;
- renderer.boxWrapper = boxWrapper;
- renderer.alignedObjects = [];
- renderer.url = isIE ? '' : loc.href.replace(/#.*?$/, '')
- .replace(/([\('\)])/g, '\\$1'); // Page url used for internal references. #24, #672.
- renderer.defs = this.createElement('defs').add();
- renderer.forExport = forExport;
- renderer.gradients = {}; // Object where gradient SvgElements are stored
-
- renderer.setSize(width, height, false);
-
-
- // Issue 110 workaround:
- // In Firefox, if a div is positioned by percentage, its pixel position may land
- // between pixels. The container itself doesn't display this, but an SVG element
- // inside this container will be drawn at subpixel precision. In order to draw
- // sharp lines, this must be compensated for. This doesn't seem to work inside
- // iframes though (like in jsFiddle).
- var subPixelFix, rect;
- if (isFirefox && container.getBoundingClientRect) {
- renderer.subPixelFix = subPixelFix = function () {
- css(container, { left: 0, top: 0 });
- rect = container.getBoundingClientRect();
- css(container, {
- left: (mathCeil(rect.left) - rect.left) + PX,
- top: (mathCeil(rect.top) - rect.top) + PX
- });
- };
-
- // run the fix now
- subPixelFix();
-
- // run it on resize
- addEvent(win, 'resize', subPixelFix);
- }
- },
-
- /**
- * Detect whether the renderer is hidden. This happens when one of the parent elements
- * has display: none. #608.
- */
- isHidden: function () {
- return !this.boxWrapper.getBBox().width;
- },
-
- /**
- * Destroys the renderer and its allocated members.
- */
- destroy: function () {
- var renderer = this,
- rendererDefs = renderer.defs;
- renderer.box = null;
- renderer.boxWrapper = renderer.boxWrapper.destroy();
-
- // Call destroy on all gradient elements
- destroyObjectProperties(renderer.gradients || {});
- renderer.gradients = null;
-
- // Defs are null in VMLRenderer
- // Otherwise, destroy them here.
- if (rendererDefs) {
- renderer.defs = rendererDefs.destroy();
- }
-
- // Remove sub pixel fix handler
- // We need to check that there is a handler, otherwise all functions that are registered for event 'resize' are removed
- // See issue #982
- if (renderer.subPixelFix) {
- removeEvent(win, 'resize', renderer.subPixelFix);
- }
-
- renderer.alignedObjects = null;
-
- return null;
- },
-
- /**
- * Create a wrapper for an SVG element
- * @param {Object} nodeName
- */
- createElement: function (nodeName) {
- var wrapper = new this.Element();
- wrapper.init(this, nodeName);
- return wrapper;
- },
-
- /**
- * Dummy function for use in canvas renderer
- */
- draw: function () {
- },
-
- /**
- * Parse a simple HTML string into SVG tspans
- *
- * @param {Object} textNode The parent text SVG node
- */
- buildText: function (wrapper) {
- var textNode = wrapper.element,
- lines = pick(wrapper.textStr, '').toString()
- .replace(/<(b|strong)>/g, '')
- .replace(/<(i|em)>/g, '')
- .replace(//g, ' ')
- .split(//g),
- childNodes = textNode.childNodes,
- styleRegex = /style="([^"]+)"/,
- hrefRegex = /href="([^"]+)"/,
- parentX = attr(textNode, 'x'),
- textStyles = wrapper.styles,
- width = textStyles && pInt(textStyles.width),
- textLineHeight = textStyles && textStyles.lineHeight,
- lastLine,
- GET_COMPUTED_STYLE = 'getComputedStyle',
- i = childNodes.length,
- linePositions = [];
-
- // Needed in IE9 because it doesn't report tspan's offsetHeight (#893)
- function getLineHeightByBBox(lineNo) {
- linePositions[lineNo] = textNode.getBBox().height;
- return mathRound(linePositions[lineNo] - (linePositions[lineNo - 1] || 0));
- }
-
- // remove old text
- while (i--) {
- textNode.removeChild(childNodes[i]);
- }
-
- if (width && !wrapper.added) {
- this.box.appendChild(textNode); // attach it to the DOM to read offset width
- }
-
- // remove empty line at end
- if (lines[lines.length - 1] === '') {
- lines.pop();
- }
-
- // build the lines
- each(lines, function (line, lineNo) {
- var spans, spanNo = 0, lineHeight;
-
- line = line.replace(//g, ' |||');
- spans = line.split('|||');
-
- each(spans, function (span) {
- if (span !== '' || spans.length === 1) {
- var attributes = {},
- tspan = doc.createElementNS(SVG_NS, 'tspan');
- if (styleRegex.test(span)) {
- attr(
- tspan,
- 'style',
- span.match(styleRegex)[1].replace(/(;| |^)color([ :])/, '$1fill$2')
- );
- }
- if (hrefRegex.test(span)) {
- attr(tspan, 'onclick', 'location.href=\"' + span.match(hrefRegex)[1] + '\"');
- css(tspan, { cursor: 'pointer' });
- }
-
- span = (span.replace(/<(.|\n)*?>/g, '') || ' ')
- .replace(/</g, '<')
- .replace(/>/g, '>');
-
- // issue #38 workaround.
- /*if (reverse) {
- arr = [];
- i = span.length;
- while (i--) {
- arr.push(span.charAt(i));
- }
- span = arr.join('');
- }*/
-
- // add the text node
- tspan.appendChild(doc.createTextNode(span));
-
- if (!spanNo) { // first span in a line, align it to the left
- attributes.x = parentX;
- } else {
- // Firefox ignores spaces at the front or end of the tspan
- attributes.dx = 3; // space
- }
-
- // first span on subsequent line, add the line height
- if (!spanNo) {
- if (lineNo) {
-
- // allow getting the right offset height in exporting in IE
- if (!hasSVG && wrapper.renderer.forExport) {
- css(tspan, { display: 'block' });
- }
-
- // Webkit and opera sometimes return 'normal' as the line height. In that
- // case, webkit uses offsetHeight, while Opera falls back to 18
- lineHeight = win[GET_COMPUTED_STYLE] &&
- pInt(win[GET_COMPUTED_STYLE](lastLine, null).getPropertyValue('line-height'));
-
- if (!lineHeight || isNaN(lineHeight)) {
- lineHeight = textLineHeight || lastLine.offsetHeight || getLineHeightByBBox(lineNo) || 18;
- }
- attr(tspan, 'dy', lineHeight);
- }
- lastLine = tspan; // record for use in next line
- }
-
- // add attributes
- attr(tspan, attributes);
-
- // append it
- textNode.appendChild(tspan);
-
- spanNo++;
-
- // check width and apply soft breaks
- if (width) {
- var words = span.replace(/-/g, '- ').split(' '),
- tooLong,
- actualWidth,
- rest = [];
-
- while (words.length || rest.length) {
- actualWidth = wrapper.getBBox().width;
- tooLong = actualWidth > width;
- if (!tooLong || words.length === 1) { // new line needed
- words = rest;
- rest = [];
- if (words.length) {
- tspan = doc.createElementNS(SVG_NS, 'tspan');
- attr(tspan, {
- dy: textLineHeight || 16,
- x: parentX
- });
- textNode.appendChild(tspan);
-
- if (actualWidth > width) { // a single word is pressing it out
- width = actualWidth;
- }
- }
- } else { // append to existing line tspan
- tspan.removeChild(tspan.firstChild);
- rest.unshift(words.pop());
- }
- if (words.length) {
- tspan.appendChild(doc.createTextNode(words.join(' ').replace(/- /g, '-')));
- }
- }
- }
- }
- });
- });
- },
-
- /**
- * Create a button with preset states
- * @param {String} text
- * @param {Number} x
- * @param {Number} y
- * @param {Function} callback
- * @param {Object} normalState
- * @param {Object} hoverState
- * @param {Object} pressedState
- */
- button: function (text, x, y, callback, normalState, hoverState, pressedState) {
- var label = this.label(text, x, y),
- curState = 0,
- stateOptions,
- stateStyle,
- normalStyle,
- hoverStyle,
- pressedStyle,
- STYLE = 'style',
- verticalGradient = { x1: 0, y1: 0, x2: 0, y2: 1 };
-
- // prepare the attributes
- /*jslint white: true*/
- normalState = merge(hash(
- STROKE_WIDTH, 1,
- STROKE, '#999',
- FILL, hash(
- LINEAR_GRADIENT, verticalGradient,
- STOPS, [
- [0, '#FFF'],
- [1, '#DDD']
- ]
- ),
- 'r', 3,
- 'padding', 3,
- STYLE, hash(
- 'color', 'black'
- )
- ), normalState);
- /*jslint white: false*/
- normalStyle = normalState[STYLE];
- delete normalState[STYLE];
-
- /*jslint white: true*/
- hoverState = merge(normalState, hash(
- STROKE, '#68A',
- FILL, hash(
- LINEAR_GRADIENT, verticalGradient,
- STOPS, [
- [0, '#FFF'],
- [1, '#ACF']
- ]
- )
- ), hoverState);
- /*jslint white: false*/
- hoverStyle = hoverState[STYLE];
- delete hoverState[STYLE];
-
- /*jslint white: true*/
- pressedState = merge(normalState, hash(
- STROKE, '#68A',
- FILL, hash(
- LINEAR_GRADIENT, verticalGradient,
- STOPS, [
- [0, '#9BD'],
- [1, '#CDF']
- ]
- )
- ), pressedState);
- /*jslint white: false*/
- pressedStyle = pressedState[STYLE];
- delete pressedState[STYLE];
-
- // add the events
- addEvent(label.element, 'mouseenter', function () {
- label.attr(hoverState)
- .css(hoverStyle);
- });
- addEvent(label.element, 'mouseleave', function () {
- stateOptions = [normalState, hoverState, pressedState][curState];
- stateStyle = [normalStyle, hoverStyle, pressedStyle][curState];
- label.attr(stateOptions)
- .css(stateStyle);
- });
-
- label.setState = function (state) {
- curState = state;
- if (!state) {
- label.attr(normalState)
- .css(normalStyle);
- } else if (state === 2) {
- label.attr(pressedState)
- .css(pressedStyle);
- }
- };
-
- return label
- .on('click', function () {
- callback.call(label);
- })
- .attr(normalState)
- .css(extend({ cursor: 'default' }, normalStyle));
- },
-
- /**
- * Make a straight line crisper by not spilling out to neighbour pixels
- * @param {Array} points
- * @param {Number} width
- */
- crispLine: function (points, width) {
- // points format: [M, 0, 0, L, 100, 0]
- // normalize to a crisp line
- if (points[1] === points[4]) {
- points[1] = points[4] = mathRound(points[1]) + (width % 2 / 2);
- }
- if (points[2] === points[5]) {
- points[2] = points[5] = mathRound(points[2]) + (width % 2 / 2);
- }
- return points;
- },
-
-
- /**
- * Draw a path
- * @param {Array} path An SVG path in array form
- */
- path: function (path) {
- var attr = {
- fill: NONE
- };
- if (isArray(path)) {
- attr.d = path;
- } else if (isObject(path)) { // attributes
- extend(attr, path);
- }
- return this.createElement('path').attr(attr);
- },
-
- /**
- * Draw and return an SVG circle
- * @param {Number} x The x position
- * @param {Number} y The y position
- * @param {Number} r The radius
- */
- circle: function (x, y, r) {
- var attr = isObject(x) ?
- x :
- {
- x: x,
- y: y,
- r: r
- };
-
- return this.createElement('circle').attr(attr);
- },
-
- /**
- * Draw and return an arc
- * @param {Number} x X position
- * @param {Number} y Y position
- * @param {Number} r Radius
- * @param {Number} innerR Inner radius like used in donut charts
- * @param {Number} start Starting angle
- * @param {Number} end Ending angle
- */
- arc: function (x, y, r, innerR, start, end) {
- // arcs are defined as symbols for the ability to set
- // attributes in attr and animate
-
- if (isObject(x)) {
- y = x.y;
- r = x.r;
- innerR = x.innerR;
- start = x.start;
- end = x.end;
- x = x.x;
- }
- return this.symbol('arc', x || 0, y || 0, r || 0, r || 0, {
- innerR: innerR || 0,
- start: start || 0,
- end: end || 0
- });
- },
-
- /**
- * Draw and return a rectangle
- * @param {Number} x Left position
- * @param {Number} y Top position
- * @param {Number} width
- * @param {Number} height
- * @param {Number} r Border corner radius
- * @param {Number} strokeWidth A stroke width can be supplied to allow crisp drawing
- */
- rect: function (x, y, width, height, r, strokeWidth) {
-
- r = isObject(x) ? x.r : r;
-
- var wrapper = this.createElement('rect').attr({
- rx: r,
- ry: r,
- fill: NONE
- });
- return wrapper.attr(
- isObject(x) ?
- x :
- // do not crispify when an object is passed in (as in column charts)
- wrapper.crisp(strokeWidth, x, y, mathMax(width, 0), mathMax(height, 0))
- );
- },
-
- /**
- * Resize the box and re-align all aligned elements
- * @param {Object} width
- * @param {Object} height
- * @param {Boolean} animate
- *
- */
- setSize: function (width, height, animate) {
- var renderer = this,
- alignedObjects = renderer.alignedObjects,
- i = alignedObjects.length;
-
- renderer.width = width;
- renderer.height = height;
-
- renderer.boxWrapper[pick(animate, true) ? 'animate' : 'attr']({
- width: width,
- height: height
- });
-
- while (i--) {
- alignedObjects[i].align();
- }
- },
-
- /**
- * Create a group
- * @param {String} name The group will be given a class name of 'highcharts-{name}'.
- * This can be used for styling and scripting.
- */
- g: function (name) {
- var elem = this.createElement('g');
- return defined(name) ? elem.attr({ 'class': PREFIX + name }) : elem;
- },
-
- /**
- * Display an image
- * @param {String} src
- * @param {Number} x
- * @param {Number} y
- * @param {Number} width
- * @param {Number} height
- */
- image: function (src, x, y, width, height) {
- var attribs = {
- preserveAspectRatio: NONE
- },
- elemWrapper;
-
- // optional properties
- if (arguments.length > 1) {
- extend(attribs, {
- x: x,
- y: y,
- width: width,
- height: height
- });
- }
-
- elemWrapper = this.createElement('image').attr(attribs);
-
- // set the href in the xlink namespace
- if (elemWrapper.element.setAttributeNS) {
- elemWrapper.element.setAttributeNS('http://www.w3.org/1999/xlink',
- 'href', src);
- } else {
- // could be exporting in IE
- // using href throws "not supported" in ie7 and under, requries regex shim to fix later
- elemWrapper.element.setAttribute('hc-svg-href', src);
- }
-
- return elemWrapper;
- },
-
- /**
- * Draw a symbol out of pre-defined shape paths from the namespace 'symbol' object.
- *
- * @param {Object} symbol
- * @param {Object} x
- * @param {Object} y
- * @param {Object} radius
- * @param {Object} options
- */
- symbol: function (symbol, x, y, width, height, options) {
-
- var obj,
-
- // get the symbol definition function
- symbolFn = this.symbols[symbol],
-
- // check if there's a path defined for this symbol
- path = symbolFn && symbolFn(
- mathRound(x),
- mathRound(y),
- width,
- height,
- options
- ),
-
- imageRegex = /^url\((.*?)\)$/,
- imageSrc,
- imageSize,
- centerImage;
-
- if (path) {
-
- obj = this.path(path);
- // expando properties for use in animate and attr
- extend(obj, {
- symbolName: symbol,
- x: x,
- y: y,
- width: width,
- height: height
- });
- if (options) {
- extend(obj, options);
- }
-
-
- // image symbols
- } else if (imageRegex.test(symbol)) {
-
- // On image load, set the size and position
- centerImage = function (img, size) {
- img.attr({
- width: size[0],
- height: size[1]
- });
-
- if (!img.alignByTranslate) { // #185
- img.translate(
- -mathRound(size[0] / 2),
- -mathRound(size[1] / 2)
- );
- }
- };
-
- imageSrc = symbol.match(imageRegex)[1];
- imageSize = symbolSizes[imageSrc];
-
- // create the image synchronously, add attribs async
- obj = this.image(imageSrc)
- .attr({
- x: x,
- y: y
- });
-
- if (imageSize) {
- centerImage(obj, imageSize);
- } else {
- // initialize image to be 0 size so export will still function if there's no cached sizes
- obj.attr({ width: 0, height: 0 });
-
- // create a dummy JavaScript image to get the width and height
- createElement('img', {
- onload: function () {
- var img = this;
-
- centerImage(obj, symbolSizes[imageSrc] = [img.width, img.height]);
- },
- src: imageSrc
- });
- }
- }
-
- return obj;
- },
-
- /**
- * An extendable collection of functions for defining symbol paths.
- */
- symbols: {
- 'circle': function (x, y, w, h) {
- var cpw = 0.166 * w;
- return [
- M, x + w / 2, y,
- 'C', x + w + cpw, y, x + w + cpw, y + h, x + w / 2, y + h,
- 'C', x - cpw, y + h, x - cpw, y, x + w / 2, y,
- 'Z'
- ];
- },
-
- 'square': function (x, y, w, h) {
- return [
- M, x, y,
- L, x + w, y,
- x + w, y + h,
- x, y + h,
- 'Z'
- ];
- },
-
- 'triangle': function (x, y, w, h) {
- return [
- M, x + w / 2, y,
- L, x + w, y + h,
- x, y + h,
- 'Z'
- ];
- },
-
- 'triangle-down': function (x, y, w, h) {
- return [
- M, x, y,
- L, x + w, y,
- x + w / 2, y + h,
- 'Z'
- ];
- },
- 'diamond': function (x, y, w, h) {
- return [
- M, x + w / 2, y,
- L, x + w, y + h / 2,
- x + w / 2, y + h,
- x, y + h / 2,
- 'Z'
- ];
- },
- 'arc': function (x, y, w, h, options) {
- var start = options.start,
- radius = options.r || w || h,
- end = options.end - 0.000001, // to prevent cos and sin of start and end from becoming equal on 360 arcs
- innerRadius = options.innerR,
- open = options.open,
- cosStart = mathCos(start),
- sinStart = mathSin(start),
- cosEnd = mathCos(end),
- sinEnd = mathSin(end),
- longArc = options.end - start < mathPI ? 0 : 1;
-
- return [
- M,
- x + radius * cosStart,
- y + radius * sinStart,
- 'A', // arcTo
- radius, // x radius
- radius, // y radius
- 0, // slanting
- longArc, // long or short arc
- 1, // clockwise
- x + radius * cosEnd,
- y + radius * sinEnd,
- open ? M : L,
- x + innerRadius * cosEnd,
- y + innerRadius * sinEnd,
- 'A', // arcTo
- innerRadius, // x radius
- innerRadius, // y radius
- 0, // slanting
- longArc, // long or short arc
- 0, // clockwise
- x + innerRadius * cosStart,
- y + innerRadius * sinStart,
-
- open ? '' : 'Z' // close
- ];
- }
- },
-
- /**
- * Define a clipping rectangle
- * @param {String} id
- * @param {Number} x
- * @param {Number} y
- * @param {Number} width
- * @param {Number} height
- */
- clipRect: function (x, y, width, height) {
- var wrapper,
- id = PREFIX + idCounter++,
-
- clipPath = this.createElement('clipPath').attr({
- id: id
- }).add(this.defs);
-
- wrapper = this.rect(x, y, width, height, 0).add(clipPath);
- wrapper.id = id;
- wrapper.clipPath = clipPath;
-
- return wrapper;
- },
-
-
- /**
- * Take a color and return it if it's a string, make it a gradient if it's a
- * gradient configuration object. Prior to Highstock, an array was used to define
- * a linear gradient with pixel positions relative to the SVG. In newer versions
- * we change the coordinates to apply relative to the shape, using coordinates
- * 0-1 within the shape. To preserve backwards compatibility, linearGradient
- * in this definition is an object of x1, y1, x2 and y2.
- *
- * @param {Object} color The color or config object
- */
- color: function (color, elem, prop) {
- var renderer = this,
- colorObject,
- regexRgba = /^rgba/,
- gradName;
-
- // Apply linear or radial gradients
- if (color && color.linearGradient) {
- gradName = 'linearGradient';
- } else if (color && color.radialGradient) {
- gradName = 'radialGradient';
- }
-
- if (gradName) {
- var gradAttr = color[gradName],
- gradients = renderer.gradients,
- gradientObject,
- stopColor,
- stopOpacity,
- radialReference = elem.radialReference;
-
- // Check if a gradient object with the same config object is created within this renderer
- if (!gradAttr.id || !gradients[gradAttr.id]) {
-
- // Keep < 2.2 kompatibility
- if (isArray(gradAttr)) {
- color[gradName] = gradAttr = {
- x1: gradAttr[0],
- y1: gradAttr[1],
- x2: gradAttr[2],
- y2: gradAttr[3],
- gradientUnits: 'userSpaceOnUse'
- };
- }
-
- // Correct the radial gradient for the radial reference system
- if (gradName === 'radialGradient' && radialReference && !defined(gradAttr.gradientUnits)) {
- extend(gradAttr, {
- cx: (radialReference[0] - radialReference[2] / 2) + gradAttr.cx * radialReference[2],
- cy: (radialReference[1] - radialReference[2] / 2) + gradAttr.cy * radialReference[2],
- r: gradAttr.r * radialReference[2],
- gradientUnits: 'userSpaceOnUse'
- });
- }
-
- // Set the id and create the element
- gradAttr.id = PREFIX + idCounter++;
- gradients[gradAttr.id] = gradientObject = renderer.createElement(gradName)
- .attr(gradAttr)
- .add(renderer.defs);
-
-
- // The gradient needs to keep a list of stops to be able to destroy them
- gradientObject.stops = [];
- each(color.stops, function (stop) {
- var stopObject;
- if (regexRgba.test(stop[1])) {
- colorObject = Color(stop[1]);
- stopColor = colorObject.get('rgb');
- stopOpacity = colorObject.get('a');
- } else {
- stopColor = stop[1];
- stopOpacity = 1;
- }
- stopObject = renderer.createElement('stop').attr({
- offset: stop[0],
- 'stop-color': stopColor,
- 'stop-opacity': stopOpacity
- }).add(gradientObject);
-
- // Add the stop element to the gradient
- gradientObject.stops.push(stopObject);
- });
- }
-
- // Return the reference to the gradient object
- return 'url(' + renderer.url + '#' + gradAttr.id + ')';
-
- // Webkit and Batik can't show rgba.
- } else if (regexRgba.test(color)) {
- colorObject = Color(color);
- attr(elem, prop + '-opacity', colorObject.get('a'));
-
- return colorObject.get('rgb');
-
-
- } else {
- // Remove the opacity attribute added above. Does not throw if the attribute is not there.
- elem.removeAttribute(prop + '-opacity');
-
- return color;
- }
-
- },
-
-
- /**
- * Add text to the SVG object
- * @param {String} str
- * @param {Number} x Left position
- * @param {Number} y Top position
- * @param {Boolean} useHTML Use HTML to render the text
- */
- text: function (str, x, y, useHTML) {
-
- // declare variables
- var renderer = this,
- defaultChartStyle = defaultOptions.chart.style,
- wrapper;
-
- if (useHTML && !renderer.forExport) {
- return renderer.html(str, x, y);
- }
-
- x = mathRound(pick(x, 0));
- y = mathRound(pick(y, 0));
-
- wrapper = renderer.createElement('text')
- .attr({
- x: x,
- y: y,
- text: str
- })
- .css({
- fontFamily: defaultChartStyle.fontFamily,
- fontSize: defaultChartStyle.fontSize
- });
-
- wrapper.x = x;
- wrapper.y = y;
- return wrapper;
- },
-
-
- /**
- * Create HTML text node. This is used by the VML renderer as well as the SVG
- * renderer through the useHTML option.
- *
- * @param {String} str
- * @param {Number} x
- * @param {Number} y
- */
- html: function (str, x, y) {
- var defaultChartStyle = defaultOptions.chart.style,
- wrapper = this.createElement('span'),
- attrSetters = wrapper.attrSetters,
- element = wrapper.element,
- renderer = wrapper.renderer;
-
- // Text setter
- attrSetters.text = function (value) {
- element.innerHTML = value;
- return false;
- };
-
- // Various setters which rely on update transform
- attrSetters.x = attrSetters.y = attrSetters.align = function (value, key) {
- if (key === 'align') {
- key = 'textAlign'; // Do not overwrite the SVGElement.align method. Same as VML.
- }
- wrapper[key] = value;
- wrapper.htmlUpdateTransform();
- return false;
- };
-
- // Set the default attributes
- wrapper.attr({
- text: str,
- x: mathRound(x),
- y: mathRound(y)
- })
- .css({
- position: ABSOLUTE,
- whiteSpace: 'nowrap',
- fontFamily: defaultChartStyle.fontFamily,
- fontSize: defaultChartStyle.fontSize
- });
-
- // Use the HTML specific .css method
- wrapper.css = wrapper.htmlCss;
-
- // This is specific for HTML within SVG
- if (renderer.isSVG) {
- wrapper.add = function (svgGroupWrapper) {
-
- var htmlGroup,
- htmlGroupStyle,
- container = renderer.box.parentNode;
-
- // Create a mock group to hold the HTML elements
- if (svgGroupWrapper) {
- htmlGroup = svgGroupWrapper.div;
- if (!htmlGroup) {
- htmlGroup = svgGroupWrapper.div = createElement(DIV, {
- className: attr(svgGroupWrapper.element, 'class')
- }, {
- position: ABSOLUTE,
- left: svgGroupWrapper.attr('translateX') + PX,
- top: svgGroupWrapper.attr('translateY') + PX
- }, container);
-
- // Ensure dynamic updating position
- htmlGroupStyle = htmlGroup.style;
- extend(svgGroupWrapper.attrSetters, {
- translateX: function (value) {
- htmlGroupStyle.left = value + PX;
- },
- translateY: function (value) {
- htmlGroupStyle.top = value + PX;
- },
- visibility: function (value, key) {
- htmlGroupStyle[key] = value;
- }
- });
-
- }
- } else {
- htmlGroup = container;
- }
-
- htmlGroup.appendChild(element);
-
- // Shared with VML:
- wrapper.added = true;
- if (wrapper.alignOnAdd) {
- wrapper.htmlUpdateTransform();
- }
-
- return wrapper;
- };
- }
- return wrapper;
- },
-
- /**
- * Utility to return the baseline offset and total line height from the font size
- */
- fontMetrics: function (fontSize) {
- fontSize = pInt(fontSize || 11);
-
- // Empirical values found by comparing font size and bounding box height.
- // Applies to the default font family. http://jsfiddle.net/highcharts/7xvn7/
- var lineHeight = fontSize < 24 ? fontSize + 4 : mathRound(fontSize * 1.2),
- baseline = mathRound(lineHeight * 0.8);
-
- return {
- h: lineHeight,
- b: baseline
- };
- },
-
- /**
- * Add a label, a text item that can hold a colored or gradient background
- * as well as a border and shadow.
- * @param {string} str
- * @param {Number} x
- * @param {Number} y
- * @param {String} shape
- * @param {Number} anchorX In case the shape has a pointer, like a flag, this is the
- * coordinates it should be pinned to
- * @param {Number} anchorY
- * @param {Boolean} baseline Whether to position the label relative to the text baseline,
- * like renderer.text, or to the upper border of the rectangle.
- * @param {String} className Class name for the group
- */
- label: function (str, x, y, shape, anchorX, anchorY, useHTML, baseline, className) {
-
- var renderer = this,
- wrapper = renderer.g(className),
- text = renderer.text('', 0, 0, useHTML)
- .attr({
- zIndex: 1
- })
- .add(wrapper),
- box,
- bBox,
- alignFactor = 0,
- padding = 3,
- width,
- height,
- wrapperX,
- wrapperY,
- crispAdjust = 0,
- deferredAttr = {},
- baselineOffset,
- attrSetters = wrapper.attrSetters;
-
- /**
- * This function runs after the label is added to the DOM (when the bounding box is
- * available), and after the text of the label is updated to detect the new bounding
- * box and reflect it in the border box.
- */
- function updateBoxSize() {
- var boxY,
- style = text.element.style;
-
- bBox = (width === undefined || height === undefined || wrapper.styles.textAlign) &&
- text.getBBox(true);
- wrapper.width = (width || bBox.width || 0) + 2 * padding;
- wrapper.height = (height || bBox.height || 0) + 2 * padding;
-
- // update the label-scoped y offset
- baselineOffset = padding + renderer.fontMetrics(style && style.fontSize).b;
-
-
- // create the border box if it is not already present
- if (!box) {
- boxY = baseline ? -baselineOffset : 0;
-
- wrapper.box = box = shape ?
- renderer.symbol(shape, -alignFactor * padding, boxY, wrapper.width, wrapper.height) :
- renderer.rect(-alignFactor * padding, boxY, wrapper.width, wrapper.height, 0, deferredAttr[STROKE_WIDTH]);
- box.add(wrapper);
- }
-
- // apply the box attributes
- box.attr(merge({
- width: wrapper.width,
- height: wrapper.height
- }, deferredAttr));
- deferredAttr = null;
- }
-
- /**
- * This function runs after setting text or padding, but only if padding is changed
- */
- function updateTextPadding() {
- var styles = wrapper.styles,
- textAlign = styles && styles.textAlign,
- x = padding * (1 - alignFactor),
- y;
-
- // determin y based on the baseline
- y = baseline ? 0 : baselineOffset;
-
- // compensate for alignment
- if (defined(width) && (textAlign === 'center' || textAlign === 'right')) {
- x += { center: 0.5, right: 1 }[textAlign] * (width - bBox.width);
- }
-
- // update if anything changed
- if (x !== text.x || y !== text.y) {
- text.attr({
- x: x,
- y: y
- });
- }
-
- // record current values
- text.x = x;
- text.y = y;
- }
-
- /**
- * Set a box attribute, or defer it if the box is not yet created
- * @param {Object} key
- * @param {Object} value
- */
- function boxAttr(key, value) {
- if (box) {
- box.attr(key, value);
- } else {
- deferredAttr[key] = value;
- }
- }
-
- function getSizeAfterAdd() {
- wrapper.attr({
- text: str, // alignment is available now
- x: x,
- y: y
- });
-
- if (defined(anchorX)) {
- wrapper.attr({
- anchorX: anchorX,
- anchorY: anchorY
- });
- }
- }
-
- /**
- * After the text element is added, get the desired size of the border box
- * and add it before the text in the DOM.
- */
- addEvent(wrapper, 'add', getSizeAfterAdd);
-
- /*
- * Add specific attribute setters.
- */
-
- // only change local variables
- attrSetters.width = function (value) {
- width = value;
- return false;
- };
- attrSetters.height = function (value) {
- height = value;
- return false;
- };
- attrSetters.padding = function (value) {
- if (defined(value) && value !== padding) {
- padding = value;
- updateTextPadding();
- }
-
- return false;
- };
-
- // change local variable and set attribue as well
- attrSetters.align = function (value) {
- alignFactor = { left: 0, center: 0.5, right: 1 }[value];
- return false; // prevent setting text-anchor on the group
- };
-
- // apply these to the box and the text alike
- attrSetters.text = function (value, key) {
- text.attr(key, value);
- updateBoxSize();
- updateTextPadding();
- return false;
- };
-
- // apply these to the box but not to the text
- attrSetters[STROKE_WIDTH] = function (value, key) {
- crispAdjust = value % 2 / 2;
- boxAttr(key, value);
- return false;
- };
- attrSetters.stroke = attrSetters.fill = attrSetters.r = function (value, key) {
- boxAttr(key, value);
- return false;
- };
- attrSetters.anchorX = function (value, key) {
- anchorX = value;
- boxAttr(key, value + crispAdjust - wrapperX);
- return false;
- };
- attrSetters.anchorY = function (value, key) {
- anchorY = value;
- boxAttr(key, value - wrapperY);
- return false;
- };
-
- // rename attributes
- attrSetters.x = function (value) {
- wrapper.x = value; // for animation getter
- value -= alignFactor * ((width || bBox.width) + padding);
- wrapperX = mathRound(value);
-
- wrapper.attr('translateX', wrapperX);
- return false;
- };
- attrSetters.y = function (value) {
- wrapperY = wrapper.y = mathRound(value);
- wrapper.attr('translateY', value);
- return false;
- };
-
- // Redirect certain methods to either the box or the text
- var baseCss = wrapper.css;
- return extend(wrapper, {
- /**
- * Pick up some properties and apply them to the text instead of the wrapper
- */
- css: function (styles) {
- if (styles) {
- var textStyles = {};
- styles = merge({}, styles); // create a copy to avoid altering the original object (#537)
- each(['fontSize', 'fontWeight', 'fontFamily', 'color', 'lineHeight', 'width'], function (prop) {
- if (styles[prop] !== UNDEFINED) {
- textStyles[prop] = styles[prop];
- delete styles[prop];
- }
- });
- text.css(textStyles);
- }
- return baseCss.call(wrapper, styles);
- },
- /**
- * Return the bounding box of the box, not the group
- */
- getBBox: function () {
- return box.getBBox();
- },
- /**
- * Apply the shadow to the box
- */
- shadow: function (b) {
- box.shadow(b);
- return wrapper;
- },
- /**
- * Destroy and release memory.
- */
- destroy: function () {
- removeEvent(wrapper, 'add', getSizeAfterAdd);
-
- // Added by button implementation
- removeEvent(wrapper.element, 'mouseenter');
- removeEvent(wrapper.element, 'mouseleave');
-
- if (text) {
- // Destroy the text element
- text = text.destroy();
- }
- // Call base implementation to destroy the rest
- SVGElement.prototype.destroy.call(wrapper);
- }
- });
- }
- }; // end SVGRenderer
-
-
-// general renderer
- Renderer = SVGRenderer;
-
-
- /* ****************************************************************************
- * *
- * START OF INTERNET EXPLORER <= 8 SPECIFIC CODE *
- * *
- * For applications and websites that don't need IE support, like platform *
- * targeted mobile apps and web apps, this code can be removed. *
- * *
- *****************************************************************************/
-
- /**
- * @constructor
- */
- var VMLRenderer;
- if (!hasSVG && !useCanVG) {
-
- /**
- * The VML element wrapper.
- */
- var VMLElement = {
-
- /**
- * Initialize a new VML element wrapper. It builds the markup as a string
- * to minimize DOM traffic.
- * @param {Object} renderer
- * @param {Object} nodeName
- */
- init: function (renderer, nodeName) {
- var wrapper = this,
- markup = ['<', nodeName, ' filled="f" stroked="f"'],
- style = ['position: ', ABSOLUTE, ';'];
-
- // divs and shapes need size
- if (nodeName === 'shape' || nodeName === DIV) {
- style.push('left:0;top:0;width:1px;height:1px;');
- }
- if (docMode8) {
- style.push('visibility: ', nodeName === DIV ? HIDDEN : VISIBLE);
- }
-
- markup.push(' style="', style.join(''), '"/>');
-
- // create element with default attributes and style
- if (nodeName) {
- markup = nodeName === DIV || nodeName === 'span' || nodeName === 'img' ?
- markup.join('')
- : renderer.prepVML(markup);
- wrapper.element = createElement(markup);
- }
-
- wrapper.renderer = renderer;
- wrapper.attrSetters = {};
- },
-
- /**
- * Add the node to the given parent
- * @param {Object} parent
- */
- add: function (parent) {
- var wrapper = this,
- renderer = wrapper.renderer,
- element = wrapper.element,
- box = renderer.box,
- inverted = parent && parent.inverted,
-
- // get the parent node
- parentNode = parent ?
- parent.element || parent :
- box;
-
-
- // if the parent group is inverted, apply inversion on all children
- if (inverted) { // only on groups
- renderer.invertChild(element, parentNode);
- }
-
- // issue #140 workaround - related to #61 and #74
- if (docMode8 && parentNode.gVis === HIDDEN) {
- css(element, { visibility: HIDDEN });
- }
-
- // append it
- parentNode.appendChild(element);
-
- // align text after adding to be able to read offset
- wrapper.added = true;
- if (wrapper.alignOnAdd && !wrapper.deferUpdateTransform) {
- wrapper.updateTransform();
- }
-
- // fire an event for internal hooks
- fireEvent(wrapper, 'add');
-
- return wrapper;
- },
-
- /**
- * In IE8 documentMode 8, we need to recursively set the visibility down in the DOM
- * tree for nested groups. Related to #61, #586.
- */
- toggleChildren: function (element, visibility) {
- var childNodes = element.childNodes,
- i = childNodes.length;
-
- while (i--) {
-
- // apply the visibility
- css(childNodes[i], { visibility: visibility });
-
- // we have a nested group, apply it to its children again
- if (childNodes[i].nodeName === 'DIV') {
- this.toggleChildren(childNodes[i], visibility);
- }
- }
- },
-
- /**
- * VML always uses htmlUpdateTransform
- */
- updateTransform: SVGElement.prototype.htmlUpdateTransform,
-
- /**
- * Get or set attributes
- */
- attr: function (hash, val) {
- var wrapper = this,
- key,
- value,
- i,
- result,
- element = wrapper.element || {},
- elemStyle = element.style,
- nodeName = element.nodeName,
- renderer = wrapper.renderer,
- symbolName = wrapper.symbolName,
- hasSetSymbolSize,
- shadows = wrapper.shadows,
- skipAttr,
- attrSetters = wrapper.attrSetters,
- ret = wrapper;
-
- // single key-value pair
- if (isString(hash) && defined(val)) {
- key = hash;
- hash = {};
- hash[key] = val;
- }
-
- // used as a getter, val is undefined
- if (isString(hash)) {
- key = hash;
- if (key === 'strokeWidth' || key === 'stroke-width') {
- ret = wrapper.strokeweight;
- } else {
- ret = wrapper[key];
- }
-
- // setter
- } else {
- for (key in hash) {
- value = hash[key];
- skipAttr = false;
-
- // check for a specific attribute setter
- result = attrSetters[key] && attrSetters[key](value, key);
-
- if (result !== false && value !== null) { // #620
-
- if (result !== UNDEFINED) {
- value = result; // the attribute setter has returned a new value to set
- }
-
-
- // prepare paths
- // symbols
- if (symbolName && /^(x|y|r|start|end|width|height|innerR|anchorX|anchorY)/.test(key)) {
- // if one of the symbol size affecting parameters are changed,
- // check all the others only once for each call to an element's
- // .attr() method
- if (!hasSetSymbolSize) {
- wrapper.symbolAttr(hash);
-
- hasSetSymbolSize = true;
- }
- skipAttr = true;
-
- } else if (key === 'd') {
- value = value || [];
- wrapper.d = value.join(' '); // used in getter for animation
-
- // convert paths
- i = value.length;
- var convertedPath = [];
- while (i--) {
-
- // Multiply by 10 to allow subpixel precision.
- // Substracting half a pixel seems to make the coordinates
- // align with SVG, but this hasn't been tested thoroughly
- if (isNumber(value[i])) {
- convertedPath[i] = mathRound(value[i] * 10) - 5;
- } else if (value[i] === 'Z') { // close the path
- convertedPath[i] = 'x';
- } else {
- convertedPath[i] = value[i];
- }
-
- }
- value = convertedPath.join(' ') || 'x';
- element.path = value;
-
- // update shadows
- if (shadows) {
- i = shadows.length;
- while (i--) {
- shadows[i].path = shadows[i].cutOff ? this.cutOffPath(value, shadows[i].cutOff) : value;
- }
- }
- skipAttr = true;
-
- // directly mapped to css
- } else if (key === 'zIndex' || key === 'visibility') {
-
- // workaround for #61 and #586
- if (docMode8 && key === 'visibility' && nodeName === 'DIV') {
- element.gVis = value;
- wrapper.toggleChildren(element, value);
- if (value === VISIBLE) { // #74
- value = null;
- }
- }
-
- if (value) {
- elemStyle[key] = value;
- }
-
-
- skipAttr = true;
-
- // width and height
- } else if (key === 'width' || key === 'height') {
-
- value = mathMax(0, value); // don't set width or height below zero (#311)
-
- this[key] = value; // used in getter
-
- // clipping rectangle special
- if (wrapper.updateClipping) {
- wrapper[key] = value;
- wrapper.updateClipping();
- } else {
- // normal
- elemStyle[key] = value;
- }
-
- skipAttr = true;
-
- // x and y
- } else if (key === 'x' || key === 'y') {
-
- wrapper[key] = value; // used in getter
- elemStyle[{ x: 'left', y: 'top' }[key]] = value;
-
- // class name
- } else if (key === 'class') {
- // IE8 Standards mode has problems retrieving the className
- element.className = value;
-
- // stroke
- } else if (key === 'stroke') {
-
- value = renderer.color(value, element, key);
-
- key = 'strokecolor';
-
- // stroke width
- } else if (key === 'stroke-width' || key === 'strokeWidth') {
- element.stroked = value ? true : false;
- key = 'strokeweight';
- wrapper[key] = value; // used in getter, issue #113
- if (isNumber(value)) {
- value += PX;
- }
-
- // dashStyle
- } else if (key === 'dashstyle') {
- var strokeElem = element.getElementsByTagName('stroke')[0] ||
- createElement(renderer.prepVML([' ']), null, null, element);
- strokeElem[key] = value || 'solid';
- wrapper.dashstyle = value;
- /* because changing stroke-width will change the dash length
- and cause an epileptic effect */
- skipAttr = true;
-
- // fill
- } else if (key === 'fill') {
-
- if (nodeName === 'SPAN') { // text color
- elemStyle.color = value;
- } else {
- element.filled = value !== NONE ? true : false;
-
- value = renderer.color(value, element, key);
-
- key = 'fillcolor';
- }
-
- // rotation on VML elements
- } else if (nodeName === 'shape' && key === 'rotation') {
- wrapper[key] = value;
-
- // translation for animation
- } else if (key === 'translateX' || key === 'translateY' || key === 'rotation') {
- wrapper[key] = value;
- wrapper.updateTransform();
-
- skipAttr = true;
-
- // text for rotated and non-rotated elements
- } else if (key === 'text') {
- this.bBox = null;
- element.innerHTML = value;
- skipAttr = true;
- }
-
- // let the shadow follow the main element
- if (shadows && key === 'visibility') {
- i = shadows.length;
- while (i--) {
- shadows[i].style[key] = value;
- }
- }
-
-
- if (!skipAttr) {
- if (docMode8) { // IE8 setAttribute bug
- element[key] = value;
- } else {
- attr(element, key, value);
- }
- }
-
- }
- }
- }
- return ret;
- },
-
- /**
- * Set the element's clipping to a predefined rectangle
- *
- * @param {String} id The id of the clip rectangle
- */
- clip: function (clipRect) {
- var wrapper = this,
- clipMembers = clipRect.members,
- element = wrapper.element,
- parentNode = element.parentNode;
-
- clipMembers.push(wrapper);
- wrapper.destroyClip = function () {
- erase(clipMembers, wrapper);
- };
-
- // Issue #863 workaround - related to #140, #61, #74
- if (parentNode && parentNode.className === 'highcharts-tracker' && !docMode8) {
- css(element, { visibility: HIDDEN });
- }
-
- return wrapper.css(clipRect.getCSS(wrapper));
- },
-
- /**
- * Set styles for the element
- * @param {Object} styles
- */
- css: SVGElement.prototype.htmlCss,
-
- /**
- * Removes a child either by removeChild or move to garbageBin.
- * Issue 490; in VML removeChild results in Orphaned nodes according to sIEve, discardElement does not.
- */
- safeRemoveChild: function (element) {
- // discardElement will detach the node from its parent before attaching it
- // to the garbage bin. Therefore it is important that the node is attached and have parent.
- var parentNode = element.parentNode;
- if (parentNode) {
- discardElement(element);
- }
- },
-
- /**
- * Extend element.destroy by removing it from the clip members array
- */
- destroy: function () {
- var wrapper = this;
-
- if (wrapper.destroyClip) {
- wrapper.destroyClip();
- }
-
- return SVGElement.prototype.destroy.apply(wrapper);
- },
-
- /**
- * Remove all child nodes of a group, except the v:group element
- */
- empty: function () {
- var element = this.element,
- childNodes = element.childNodes,
- i = childNodes.length,
- node;
-
- while (i--) {
- node = childNodes[i];
- node.parentNode.removeChild(node);
- }
- },
-
- /**
- * Add an event listener. VML override for normalizing event parameters.
- * @param {String} eventType
- * @param {Function} handler
- */
- on: function (eventType, handler) {
- // simplest possible event model for internal use
- this.element['on' + eventType] = function () {
- var evt = win.event;
- evt.target = evt.srcElement;
- handler(evt);
- };
- return this;
- },
-
- /**
- * In stacked columns, cut off the shadows so that they don't overlap
- */
- cutOffPath: function (path, length) {
-
- var len;
-
- path = path.split(/[ ,]/);
- len = path.length;
-
- if (len === 9 || len === 11) {
- path[len - 4] = path[len - 2] = pInt(path[len - 2]) - 10 * length;
- }
- return path.join(' ');
- },
-
- /**
- * Apply a drop shadow by copying elements and giving them different strokes
- * @param {Boolean} apply
- */
- shadow: function (apply, group, cutOff) {
- var shadows = [],
- i,
- element = this.element,
- renderer = this.renderer,
- shadow,
- elemStyle = element.style,
- markup,
- path = element.path,
- strokeWidth,
- modifiedPath;
-
- // some times empty paths are not strings
- if (path && typeof path.value !== 'string') {
- path = 'x';
- }
- modifiedPath = path;
-
- if (apply) {
- for (i = 1; i <= 3; i++) {
-
- strokeWidth = 7 - 2 * i;
-
- // Cut off shadows for stacked column items
- if (cutOff) {
- modifiedPath = this.cutOffPath(path.value, strokeWidth + 0.5);
- }
-
- markup = [' '];
-
- shadow = createElement(renderer.prepVML(markup),
- null, {
- left: pInt(elemStyle.left) + 1,
- top: pInt(elemStyle.top) + 1
- }
- );
- if (cutOff) {
- shadow.cutOff = strokeWidth + 1;
- }
-
- // apply the opacity
- markup = [' '];
- createElement(renderer.prepVML(markup), null, null, shadow);
-
-
- // insert it
- if (group) {
- group.element.appendChild(shadow);
- } else {
- element.parentNode.insertBefore(shadow, element);
- }
-
- // record it
- shadows.push(shadow);
-
- }
-
- this.shadows = shadows;
- }
- return this;
-
- }
- };
- VMLElement = extendClass(SVGElement, VMLElement);
-
- /**
- * The VML renderer
- */
- var VMLRendererExtension = { // inherit SVGRenderer
-
- Element: VMLElement,
- isIE8: userAgent.indexOf('MSIE 8.0') > -1,
-
-
- /**
- * Initialize the VMLRenderer
- * @param {Object} container
- * @param {Number} width
- * @param {Number} height
- */
- init: function (container, width, height) {
- var renderer = this,
- boxWrapper,
- box;
-
- renderer.alignedObjects = [];
-
- boxWrapper = renderer.createElement(DIV);
- box = boxWrapper.element;
- box.style.position = RELATIVE; // for freeform drawing using renderer directly
- container.appendChild(boxWrapper.element);
-
-
- // generate the containing box
- renderer.box = box;
- renderer.boxWrapper = boxWrapper;
-
-
- renderer.setSize(width, height, false);
-
- // The only way to make IE6 and IE7 print is to use a global namespace. However,
- // with IE8 the only way to make the dynamic shapes visible in screen and print mode
- // seems to be to add the xmlns attribute and the behaviour style inline.
- if (!doc.namespaces.hcv) {
-
- doc.namespaces.add('hcv', 'urn:schemas-microsoft-com:vml');
-
- // setup default css
- doc.createStyleSheet().cssText =
- 'hcv\\:fill, hcv\\:path, hcv\\:shape, hcv\\:stroke' +
- '{ behavior:url(#default#VML); display: inline-block; } ';
-
- }
- },
-
-
- /**
- * Detect whether the renderer is hidden. This happens when one of the parent elements
- * has display: none
- */
- isHidden: function () {
- return !this.box.offsetWidth;
- },
-
- /**
- * Define a clipping rectangle. In VML it is accomplished by storing the values
- * for setting the CSS style to all associated members.
- *
- * @param {Number} x
- * @param {Number} y
- * @param {Number} width
- * @param {Number} height
- */
- clipRect: function (x, y, width, height) {
-
- // create a dummy element
- var clipRect = this.createElement();
-
- // mimic a rectangle with its style object for automatic updating in attr
- return extend(clipRect, {
- members: [],
- left: x,
- top: y,
- width: width,
- height: height,
- getCSS: function (wrapper) {
- var inverted = wrapper.inverted,
- rect = this,
- top = rect.top,
- left = rect.left,
- right = left + rect.width,
- bottom = top + rect.height,
- ret = {
- clip: 'rect(' +
- mathRound(inverted ? left : top) + 'px,' +
- mathRound(inverted ? bottom : right) + 'px,' +
- mathRound(inverted ? right : bottom) + 'px,' +
- mathRound(inverted ? top : left) + 'px)'
- };
-
- // issue 74 workaround
- if (!inverted && docMode8 && wrapper.element.nodeName !== 'IMG') {
- extend(ret, {
- width: right + PX,
- height: bottom + PX
- });
- }
-
- return ret;
- },
-
- // used in attr and animation to update the clipping of all members
- updateClipping: function () {
- each(clipRect.members, function (member) {
- member.css(clipRect.getCSS(member));
- });
- }
- });
-
- },
-
-
- /**
- * Take a color and return it if it's a string, make it a gradient if it's a
- * gradient configuration object, and apply opacity.
- *
- * @param {Object} color The color or config object
- */
- color: function (color, elem, prop) {
- var colorObject,
- regexRgba = /^rgba/,
- markup,
- fillType,
- ret = NONE;
-
- // Check for linear or radial gradient
- if (color && color.linearGradient) {
- fillType = 'gradient';
- } else if (color && color.radialGradient) {
- fillType = 'pattern';
- }
-
-
- if (fillType) {
-
- var stopColor,
- stopOpacity,
- gradient = color.linearGradient || color.radialGradient,
- x1,
- y1,
- x2,
- y2,
- angle,
- opacity1,
- opacity2,
- color1,
- color2,
- fillAttr = '',
- stops = color.stops,
- firstStop,
- lastStop,
- colors = [];
-
- // Extend from 0 to 1
- firstStop = stops[0];
- lastStop = stops[stops.length - 1];
- if (firstStop[0] > 0) {
- stops.unshift([
- 0,
- firstStop[1]
- ]);
- }
- if (lastStop[0] < 1) {
- stops.push([
- 1,
- lastStop[1]
- ]);
- }
-
- // Compute the stops
- each(stops, function (stop, i) {
- if (regexRgba.test(stop[1])) {
- colorObject = Color(stop[1]);
- stopColor = colorObject.get('rgb');
- stopOpacity = colorObject.get('a');
- } else {
- stopColor = stop[1];
- stopOpacity = 1;
- }
-
- // Build the color attribute
- colors.push((stop[0] * 100) + '% ' + stopColor);
-
- // Only start and end opacities are allowed, so we use the first and the last
- if (!i) {
- opacity1 = stopOpacity;
- color2 = stopColor;
- } else {
- opacity2 = stopOpacity;
- color1 = stopColor;
- }
- });
-
- // Handle linear gradient angle
- if (fillType === 'gradient') {
- x1 = gradient.x1 || gradient[0] || 0;
- y1 = gradient.y1 || gradient[1] || 0;
- x2 = gradient.x2 || gradient[2] || 0;
- y2 = gradient.y2 || gradient[3] || 0;
- angle = 90 - math.atan(
- (y2 - y1) / // y vector
- (x2 - x1) // x vector
- ) * 180 / mathPI;
-
- // Radial (circular) gradient
- } else {
- // pie: http://jsfiddle.net/highcharts/66g8H/
- // reference: http://jsfiddle.net/highcharts/etznJ/
- // http://jsfiddle.net/highcharts/XRbCc/
- // http://jsfiddle.net/highcharts/F3fwR/
- // TODO:
- // - correct for radialRefeence
- // - check whether gradient stops are supported
- // - add global option for gradient image (must relate to version)
- var r = gradient.r,
- size = r * 2,
- cx = gradient.cx,
- cy = gradient.cy;
- //radialReference = elem.radialReference;
-
- //if (radialReference) {
- // Try setting pixel size, or other way to adjust the gradient size to the bounding box
- //}
- fillAttr = 'src="http://code.highcharts.com/gfx/radial-gradient.png" ' +
- 'size="' + size + ',' + size + '" ' +
- 'origin="0.5,0.5" ' +
- 'position="' + cx + ',' + cy + '" ' +
- 'color2="' + color2 + '" ';
-
- // The fill element's color attribute is broken in IE8 standards mode, so we
- // need to set the parent shape's fillcolor attribute instead.
- ret = color1;
- }
-
-
- // Apply the gradient to fills only.
- if (prop === 'fill') {
-
- // when colors attribute is used, the meanings of opacity and o:opacity2
- // are reversed.
- markup = [' '];
- createElement(this.prepVML(markup), null, null, elem);
-
- // Gradients are not supported for VML stroke, return the first color. #722.
- } else {
- ret = stopColor;
- }
-
-
- // if the color is an rgba color, split it and add a fill node
- // to hold the opacity component
- } else if (regexRgba.test(color) && elem.tagName !== 'IMG') {
-
- colorObject = Color(color);
-
- markup = ['<', prop, ' opacity="', colorObject.get('a'), '"/>'];
- createElement(this.prepVML(markup), null, null, elem);
-
- ret = colorObject.get('rgb');
-
-
- } else {
- var strokeNodes = elem.getElementsByTagName(prop);
- if (strokeNodes.length) {
- strokeNodes[0].opacity = 1;
- }
- ret = color;
- }
-
- return ret;
- },
-
- /**
- * Take a VML string and prepare it for either IE8 or IE6/IE7.
- * @param {Array} markup A string array of the VML markup to prepare
- */
- prepVML: function (markup) {
- var vmlStyle = 'display:inline-block;behavior:url(#default#VML);',
- isIE8 = this.isIE8;
-
- markup = markup.join('');
-
- if (isIE8) { // add xmlns and style inline
- markup = markup.replace('/>', ' xmlns="urn:schemas-microsoft-com:vml" />');
- if (markup.indexOf('style="') === -1) {
- markup = markup.replace('/>', ' style="' + vmlStyle + '" />');
- } else {
- markup = markup.replace('style="', 'style="' + vmlStyle);
- }
-
- } else { // add namespace
- markup = markup.replace('<', ' 1) {
- obj.css({
- left: x,
- top: y,
- width: width,
- height: height
- });
- }
- return obj;
- },
-
- /**
- * VML uses a shape for rect to overcome bugs and rotation problems
- */
- rect: function (x, y, width, height, r, strokeWidth) {
-
- if (isObject(x)) {
- y = x.y;
- width = x.width;
- height = x.height;
- strokeWidth = x.strokeWidth;
- x = x.x;
- }
- var wrapper = this.symbol('rect');
- wrapper.r = r;
-
- return wrapper.attr(wrapper.crisp(strokeWidth, x, y, mathMax(width, 0), mathMax(height, 0)));
- },
-
- /**
- * In the VML renderer, each child of an inverted div (group) is inverted
- * @param {Object} element
- * @param {Object} parentNode
- */
- invertChild: function (element, parentNode) {
- var parentStyle = parentNode.style;
- css(element, {
- flip: 'x',
- left: pInt(parentStyle.width) - 1,
- top: pInt(parentStyle.height) - 1,
- rotation: -90
- });
- },
-
- /**
- * Symbol definitions that override the parent SVG renderer's symbols
- *
- */
- symbols: {
- // VML specific arc function
- arc: function (x, y, w, h, options) {
- var start = options.start,
- end = options.end,
- radius = options.r || w || h,
- cosStart = mathCos(start),
- sinStart = mathSin(start),
- cosEnd = mathCos(end),
- sinEnd = mathSin(end),
- innerRadius = options.innerR,
- circleCorrection = 0.08 / radius, // #760
- innerCorrection = (innerRadius && 0.1 / innerRadius) || 0,
- ret;
-
- if (end - start === 0) { // no angle, don't show it.
- return ['x'];
-
- } else if (2 * mathPI - end + start < circleCorrection) { // full circle
- // empirical correction found by trying out the limits for different radii
- cosEnd = -circleCorrection;
- } else if (end - start < innerCorrection) { // issue #186, another mysterious VML arc problem
- cosEnd = mathCos(start + innerCorrection);
- }
-
- ret = [
- 'wa', // clockwise arc to
- x - radius, // left
- y - radius, // top
- x + radius, // right
- y + radius, // bottom
- x + radius * cosStart, // start x
- y + radius * sinStart, // start y
- x + radius * cosEnd, // end x
- y + radius * sinEnd // end y
- ];
-
- if (options.open) {
- ret.push(
- M,
- x - innerRadius,
- y - innerRadius
- );
- }
-
- ret.push(
- 'at', // anti clockwise arc to
- x - innerRadius, // left
- y - innerRadius, // top
- x + innerRadius, // right
- y + innerRadius, // bottom
- x + innerRadius * cosEnd, // start x
- y + innerRadius * sinEnd, // start y
- x + innerRadius * cosStart, // end x
- y + innerRadius * sinStart, // end y
- 'x', // finish path
- 'e' // close
- );
-
- return ret;
-
- },
- // Add circle symbol path. This performs significantly faster than v:oval.
- circle: function (x, y, w, h) {
-
- return [
- 'wa', // clockwisearcto
- x, // left
- y, // top
- x + w, // right
- y + h, // bottom
- x + w, // start x
- y + h / 2, // start y
- x + w, // end x
- y + h / 2, // end y
- //'x', // finish path
- 'e' // close
- ];
- },
- /**
- * Add rectangle symbol path which eases rotation and omits arcsize problems
- * compared to the built-in VML roundrect shape
- *
- * @param {Number} left Left position
- * @param {Number} top Top position
- * @param {Number} r Border radius
- * @param {Object} options Width and height
- */
-
- rect: function (left, top, width, height, options) {
-
- var right = left + width,
- bottom = top + height,
- ret,
- r;
-
- // No radius, return the more lightweight square
- if (!defined(options) || !options.r) {
- ret = SVGRenderer.prototype.symbols.square.apply(0, arguments);
-
- // Has radius add arcs for the corners
- } else {
-
- r = mathMin(options.r, width, height);
- ret = [
- M,
- left + r, top,
-
- L,
- right - r, top,
- 'wa',
- right - 2 * r, top,
- right, top + 2 * r,
- right - r, top,
- right, top + r,
-
- L,
- right, bottom - r,
- 'wa',
- right - 2 * r, bottom - 2 * r,
- right, bottom,
- right, bottom - r,
- right - r, bottom,
-
- L,
- left + r, bottom,
- 'wa',
- left, bottom - 2 * r,
- left + 2 * r, bottom,
- left + r, bottom,
- left, bottom - r,
-
- L,
- left, top + r,
- 'wa',
- left, top,
- left + 2 * r, top + 2 * r,
- left, top + r,
- left + r, top,
-
-
- 'x',
- 'e'
- ];
- }
- return ret;
- }
- }
- };
- VMLRenderer = function () {
- this.init.apply(this, arguments);
- };
- VMLRenderer.prototype = merge(SVGRenderer.prototype, VMLRendererExtension);
-
- // general renderer
- Renderer = VMLRenderer;
- }
-
- /* ****************************************************************************
- * *
- * END OF INTERNET EXPLORER <= 8 SPECIFIC CODE *
- * *
- *****************************************************************************/
- /* ****************************************************************************
- * *
- * START OF ANDROID < 3 SPECIFIC CODE. THIS CAN BE REMOVED IF YOU'RE NOT *
- * TARGETING THAT SYSTEM. *
- * *
- *****************************************************************************/
- var CanVGRenderer,
- CanVGController;
-
- if (useCanVG) {
- /**
- * The CanVGRenderer is empty from start to keep the source footprint small.
- * When requested, the CanVGController downloads the rest of the source packaged
- * together with the canvg library.
- */
- CanVGRenderer = function () {
- // Empty constructor
- };
-
- /**
- * Start with an empty symbols object. This is needed when exporting is used (exporting.src.js will add a few symbols), but
- * the implementation from SvgRenderer will not be merged in until first render.
- */
- CanVGRenderer.prototype.symbols = {};
-
- /**
- * Handles on demand download of canvg rendering support.
- */
- CanVGController = (function () {
- // List of renderering calls
- var deferredRenderCalls = [];
-
- /**
- * When downloaded, we are ready to draw deferred charts.
- */
- function drawDeferred() {
- var callLength = deferredRenderCalls.length,
- callIndex;
-
- // Draw all pending render calls
- for (callIndex = 0; callIndex < callLength; callIndex++) {
- deferredRenderCalls[callIndex]();
- }
- // Clear the list
- deferredRenderCalls = [];
- }
-
- return {
- push: function (func, scriptLocation) {
- // Only get the script once
- if (deferredRenderCalls.length === 0) {
- getScript(scriptLocation, drawDeferred);
- }
- // Register render call
- deferredRenderCalls.push(func);
- }
- };
- }());
- } // end CanVGRenderer
-
- /* ****************************************************************************
- * *
- * END OF ANDROID < 3 SPECIFIC CODE *
- * *
- *****************************************************************************/
-
- /**
- * General renderer
- */
- Renderer = VMLRenderer || CanVGRenderer || SVGRenderer;
- /**
- * The Tick class
- */
- function Tick(axis, pos, type) {
- this.axis = axis;
- this.pos = pos;
- this.type = type || '';
- this.isNew = true;
-
- if (!type) {
- this.addLabel();
- }
- }
-
- Tick.prototype = {
- /**
- * Write the tick label
- */
- addLabel: function () {
- var tick = this,
- axis = tick.axis,
- options = axis.options,
- chart = axis.chart,
- horiz = axis.horiz,
- categories = axis.categories,
- pos = tick.pos,
- labelOptions = options.labels,
- str,
- tickPositions = axis.tickPositions,
- width = (categories && horiz && categories.length && !labelOptions.step && !labelOptions.staggerLines && !labelOptions.rotation &&
- chart.plotWidth / tickPositions.length) ||
- (!horiz && chart.plotWidth / 2),
- isFirst = pos === tickPositions[0],
- isLast = pos === tickPositions[tickPositions.length - 1],
- css,
- attr,
- value = categories && defined(categories[pos]) ? categories[pos] : pos,
- label = tick.label,
- tickPositionInfo = tickPositions.info,
- dateTimeLabelFormat;
-
- // Set the datetime label format. If a higher rank is set for this position, use that. If not,
- // use the general format.
- if (axis.isDatetimeAxis && tickPositionInfo) {
- dateTimeLabelFormat = options.dateTimeLabelFormats[tickPositionInfo.higherRanks[pos] || tickPositionInfo.unitName];
- }
-
- // set properties for access in render method
- tick.isFirst = isFirst;
- tick.isLast = isLast;
-
- // get the string
- str = axis.labelFormatter.call({
- axis: axis,
- chart: chart,
- isFirst: isFirst,
- isLast: isLast,
- dateTimeLabelFormat: dateTimeLabelFormat,
- value: axis.isLog ? correctFloat(lin2log(value)) : value
- });
-
- // prepare CSS
- css = width && { width: mathMax(1, mathRound(width - 2 * (labelOptions.padding || 10))) + PX };
- css = extend(css, labelOptions.style);
-
- // first call
- if (!defined(label)) {
- attr = {
- align: labelOptions.align
- };
- if (isNumber(labelOptions.rotation)) {
- attr.rotation = labelOptions.rotation;
- }
- tick.label =
- defined(str) && labelOptions.enabled ?
- chart.renderer.text(
- str,
- 0,
- 0,
- labelOptions.useHTML
- )
- .attr(attr)
- // without position absolute, IE export sometimes is wrong
- .css(css)
- .add(axis.axisGroup) :
- null;
-
- // update
- } else if (label) {
- label.attr({
- text: str
- })
- .css(css);
- }
- },
-
- /**
- * Get the offset height or width of the label
- */
- getLabelSize: function () {
- var label = this.label,
- axis = this.axis;
- return label ?
- ((this.labelBBox = label.getBBox(true)))[axis.horiz ? 'height' : 'width'] :
- 0;
- },
-
- /**
- * Find how far the labels extend to the right and left of the tick's x position. Used for anti-collision
- * detection with overflow logic.
- */
- getLabelSides: function () {
- var bBox = this.labelBBox, // assume getLabelSize has run at this point
- axis = this.axis,
- options = axis.options,
- labelOptions = options.labels,
- width = bBox.width,
- leftSide = width * { left: 0, center: 0.5, right: 1 }[labelOptions.align] - labelOptions.x;
-
- return [-leftSide, width - leftSide];
- },
-
- /**
- * Handle the label overflow by adjusting the labels to the left and right edge, or
- * hide them if they collide into the neighbour label.
- */
- handleOverflow: function (index, xy) {
- var show = true,
- axis = this.axis,
- chart = axis.chart,
- isFirst = this.isFirst,
- isLast = this.isLast,
- x = xy.x,
- reversed = axis.reversed,
- tickPositions = axis.tickPositions;
-
- if (isFirst || isLast) {
-
- var sides = this.getLabelSides(),
- leftSide = sides[0],
- rightSide = sides[1],
- plotLeft = chart.plotLeft,
- plotRight = plotLeft + axis.len,
- neighbour = axis.ticks[tickPositions[index + (isFirst ? 1 : -1)]],
- neighbourEdge = neighbour && neighbour.label.xy.x + neighbour.getLabelSides()[isFirst ? 0 : 1];
-
- if ((isFirst && !reversed) || (isLast && reversed)) {
- // Is the label spilling out to the left of the plot area?
- if (x + leftSide < plotLeft) {
-
- // Align it to plot left
- x = plotLeft - leftSide;
-
- // Hide it if it now overlaps the neighbour label
- if (neighbour && x + rightSide > neighbourEdge) {
- show = false;
- }
- }
-
- } else {
- // Is the label spilling out to the right of the plot area?
- if (x + rightSide > plotRight) {
-
- // Align it to plot right
- x = plotRight - rightSide;
-
- // Hide it if it now overlaps the neighbour label
- if (neighbour && x + leftSide < neighbourEdge) {
- show = false;
- }
-
- }
- }
-
- // Set the modified x position of the label
- xy.x = x;
- }
- return show;
- },
-
- /**
- * Get the x and y position for ticks and labels
- */
- getPosition: function (horiz, pos, tickmarkOffset, old) {
- var axis = this.axis,
- chart = axis.chart,
- cHeight = (old && chart.oldChartHeight) || chart.chartHeight;
-
- return {
- x: horiz ?
- axis.translate(pos + tickmarkOffset, null, null, old) + axis.transB :
- axis.left + axis.offset + (axis.opposite ? ((old && chart.oldChartWidth) || chart.chartWidth) - axis.right - axis.left : 0),
-
- y: horiz ?
- cHeight - axis.bottom + axis.offset - (axis.opposite ? axis.height : 0) :
- cHeight - axis.translate(pos + tickmarkOffset, null, null, old) - axis.transB
- };
-
- },
-
- /**
- * Get the x, y position of the tick label
- */
- getLabelPosition: function (x, y, label, horiz, labelOptions, tickmarkOffset, index, step) {
- var axis = this.axis,
- transA = axis.transA,
- reversed = axis.reversed,
- staggerLines = axis.staggerLines;
-
- x = x + labelOptions.x - (tickmarkOffset && horiz ?
- tickmarkOffset * transA * (reversed ? -1 : 1) : 0);
- y = y + labelOptions.y - (tickmarkOffset && !horiz ?
- tickmarkOffset * transA * (reversed ? 1 : -1) : 0);
-
- // Vertically centered
- if (!defined(labelOptions.y)) {
- y += pInt(label.styles.lineHeight) * 0.9 - label.getBBox().height / 2;
- }
-
- // Correct for staggered labels
- if (staggerLines) {
- y += (index / (step || 1) % staggerLines) * 16;
- }
-
- return {
- x: x,
- y: y
- };
- },
-
- /**
- * Extendible method to return the path of the marker
- */
- getMarkPath: function (x, y, tickLength, tickWidth, horiz, renderer) {
- return renderer.crispLine([
- M,
- x,
- y,
- L,
- x + (horiz ? 0 : -tickLength),
- y + (horiz ? tickLength : 0)
- ], tickWidth);
- },
-
- /**
- * Put everything in place
- *
- * @param index {Number}
- * @param old {Boolean} Use old coordinates to prepare an animation into new position
- */
- render: function (index, old) {
- var tick = this,
- axis = tick.axis,
- options = axis.options,
- chart = axis.chart,
- renderer = chart.renderer,
- horiz = axis.horiz,
- type = tick.type,
- label = tick.label,
- pos = tick.pos,
- labelOptions = options.labels,
- gridLine = tick.gridLine,
- gridPrefix = type ? type + 'Grid' : 'grid',
- tickPrefix = type ? type + 'Tick' : 'tick',
- gridLineWidth = options[gridPrefix + 'LineWidth'],
- gridLineColor = options[gridPrefix + 'LineColor'],
- dashStyle = options[gridPrefix + 'LineDashStyle'],
- tickLength = options[tickPrefix + 'Length'],
- tickWidth = options[tickPrefix + 'Width'] || 0,
- tickColor = options[tickPrefix + 'Color'],
- tickPosition = options[tickPrefix + 'Position'],
- gridLinePath,
- mark = tick.mark,
- markPath,
- step = labelOptions.step,
- attribs,
- show = true,
- tickmarkOffset = (options.categories && options.tickmarkPlacement === 'between') ? 0.5 : 0,
- xy = tick.getPosition(horiz, pos, tickmarkOffset, old),
- x = xy.x,
- y = xy.y,
- staggerLines = axis.staggerLines;
-
- // create the grid line
- if (gridLineWidth) {
- gridLinePath = axis.getPlotLinePath(pos + tickmarkOffset, gridLineWidth, old);
-
- if (gridLine === UNDEFINED) {
- attribs = {
- stroke: gridLineColor,
- 'stroke-width': gridLineWidth
- };
- if (dashStyle) {
- attribs.dashstyle = dashStyle;
- }
- if (!type) {
- attribs.zIndex = 1;
- }
- tick.gridLine = gridLine =
- gridLineWidth ?
- renderer.path(gridLinePath)
- .attr(attribs).add(axis.gridGroup) :
- null;
- }
-
- // If the parameter 'old' is set, the current call will be followed
- // by another call, therefore do not do any animations this time
- if (!old && gridLine && gridLinePath) {
- gridLine[tick.isNew ? 'attr' : 'animate']({
- d: gridLinePath
- });
- }
- }
-
- // create the tick mark
- if (tickWidth) {
-
- // negate the length
- if (tickPosition === 'inside') {
- tickLength = -tickLength;
- }
- if (axis.opposite) {
- tickLength = -tickLength;
- }
-
- markPath = tick.getMarkPath(x, y, tickLength, tickWidth, horiz, renderer);
-
- if (mark) { // updating
- mark.animate({
- d: markPath
- });
- } else { // first time
- tick.mark = renderer.path(
- markPath
- ).attr({
- stroke: tickColor,
- 'stroke-width': tickWidth
- }).add(axis.axisGroup);
- }
- }
-
- // the label is created on init - now move it into place
- if (label && !isNaN(x)) {
- label.xy = xy = tick.getLabelPosition(x, y, label, horiz, labelOptions, tickmarkOffset, index, step);
-
- // apply show first and show last
- if ((tick.isFirst && !pick(options.showFirstLabel, 1)) ||
- (tick.isLast && !pick(options.showLastLabel, 1))) {
- show = false;
-
- // Handle label overflow and show or hide accordingly
- } else if (!staggerLines && horiz && labelOptions.overflow === 'justify' && !tick.handleOverflow(index, xy)) {
- show = false;
- }
-
- // apply step
- if (step && index % step) {
- // show those indices dividable by step
- show = false;
- }
-
- // Set the new position, and show or hide
- if (show) {
- label[tick.isNew ? 'attr' : 'animate'](xy);
- label.show();
- tick.isNew = false;
- } else {
- label.hide();
- }
- }
- },
-
- /**
- * Destructor for the tick prototype
- */
- destroy: function () {
- destroyObjectProperties(this, this.axis);
- }
- };
-
- /**
- * The object wrapper for plot lines and plot bands
- * @param {Object} options
- */
- function PlotLineOrBand(axis, options) {
- this.axis = axis;
-
- if (options) {
- this.options = options;
- this.id = options.id;
- }
-
- //plotLine.render()
- return this;
- }
-
- PlotLineOrBand.prototype = {
-
- /**
- * Render the plot line or plot band. If it is already existing,
- * move it.
- */
- render: function () {
- var plotLine = this,
- axis = plotLine.axis,
- horiz = axis.horiz,
- halfPointRange = (axis.pointRange || 0) / 2,
- options = plotLine.options,
- optionsLabel = options.label,
- label = plotLine.label,
- width = options.width,
- to = options.to,
- from = options.from,
- isBand = defined(from) && defined(to),
- value = options.value,
- dashStyle = options.dashStyle,
- svgElem = plotLine.svgElem,
- path = [],
- addEvent,
- eventType,
- xs,
- ys,
- x,
- y,
- color = options.color,
- zIndex = options.zIndex,
- events = options.events,
- attribs,
- renderer = axis.chart.renderer;
-
- // logarithmic conversion
- if (axis.isLog) {
- from = log2lin(from);
- to = log2lin(to);
- value = log2lin(value);
- }
-
- // plot line
- if (width) {
- path = axis.getPlotLinePath(value, width);
- attribs = {
- stroke: color,
- 'stroke-width': width
- };
- if (dashStyle) {
- attribs.dashstyle = dashStyle;
- }
- } else if (isBand) { // plot band
-
- // keep within plot area
- from = mathMax(from, axis.min - halfPointRange);
- to = mathMin(to, axis.max + halfPointRange);
-
- path = axis.getPlotBandPath(from, to, options);
- attribs = {
- fill: color
- };
- if (options.borderWidth) {
- attribs.stroke = options.borderColor;
- attribs['stroke-width'] = options.borderWidth;
- }
- } else {
- return;
- }
- // zIndex
- if (defined(zIndex)) {
- attribs.zIndex = zIndex;
- }
-
- // common for lines and bands
- if (svgElem) {
- if (path) {
- svgElem.animate({
- d: path
- }, null, svgElem.onGetPath);
- } else {
- svgElem.hide();
- svgElem.onGetPath = function () {
- svgElem.show();
- };
- }
- } else if (path && path.length) {
- plotLine.svgElem = svgElem = renderer.path(path)
- .attr(attribs).add();
-
- // events
- if (events) {
- addEvent = function (eventType) {
- svgElem.on(eventType, function (e) {
- events[eventType].apply(plotLine, [e]);
- });
- };
- for (eventType in events) {
- addEvent(eventType);
- }
- }
- }
-
- // the plot band/line label
- if (optionsLabel && defined(optionsLabel.text) && path && path.length && axis.width > 0 && axis.height > 0) {
- // apply defaults
- optionsLabel = merge({
- align: horiz && isBand && 'center',
- x: horiz ? !isBand && 4 : 10,
- verticalAlign: !horiz && isBand && 'middle',
- y: horiz ? isBand ? 16 : 10 : isBand ? 6 : -4,
- rotation: horiz && !isBand && 90
- }, optionsLabel);
-
- // add the SVG element
- if (!label) {
- plotLine.label = label = renderer.text(
- optionsLabel.text,
- 0,
- 0
- )
- .attr({
- align: optionsLabel.textAlign || optionsLabel.align,
- rotation: optionsLabel.rotation,
- zIndex: zIndex
- })
- .css(optionsLabel.style)
- .add();
- }
-
- // get the bounding box and align the label
- xs = [path[1], path[4], pick(path[6], path[1])];
- ys = [path[2], path[5], pick(path[7], path[2])];
- x = arrayMin(xs);
- y = arrayMin(ys);
-
- label.align(optionsLabel, false, {
- x: x,
- y: y,
- width: arrayMax(xs) - x,
- height: arrayMax(ys) - y
- });
- label.show();
-
- } else if (label) { // move out of sight
- label.hide();
- }
-
- // chainable
- return plotLine;
- },
-
- /**
- * Remove the plot line or band
- */
- destroy: function () {
- var plotLine = this,
- axis = plotLine.axis;
-
- // remove it from the lookup
- erase(axis.plotLinesAndBands, plotLine);
-
- destroyObjectProperties(plotLine, this.axis);
- }
- };
- /**
- * The class for stack items
- */
- function StackItem(axis, options, isNegative, x, stackOption) {
- var inverted = axis.chart.inverted;
-
- this.axis = axis;
-
- // Tells if the stack is negative
- this.isNegative = isNegative;
-
- // Save the options to be able to style the label
- this.options = options;
-
- // Save the x value to be able to position the label later
- this.x = x;
-
- // Save the stack option on the series configuration object
- this.stack = stackOption;
-
- // The align options and text align varies on whether the stack is negative and
- // if the chart is inverted or not.
- // First test the user supplied value, then use the dynamic.
- this.alignOptions = {
- align: options.align || (inverted ? (isNegative ? 'left' : 'right') : 'center'),
- verticalAlign: options.verticalAlign || (inverted ? 'middle' : (isNegative ? 'bottom' : 'top')),
- y: pick(options.y, inverted ? 4 : (isNegative ? 14 : -6)),
- x: pick(options.x, inverted ? (isNegative ? -6 : 6) : 0)
- };
-
- this.textAlign = options.textAlign || (inverted ? (isNegative ? 'right' : 'left') : 'center');
- }
-
- StackItem.prototype = {
- destroy: function () {
- destroyObjectProperties(this, this.axis);
- },
-
- /**
- * Sets the total of this stack. Should be called when a serie is hidden or shown
- * since that will affect the total of other stacks.
- */
- setTotal: function (total) {
- this.total = total;
- this.cum = total;
- },
-
- /**
- * Renders the stack total label and adds it to the stack label group.
- */
- render: function (group) {
- var str = this.options.formatter.call(this); // format the text in the label
-
- // Change the text to reflect the new total and set visibility to hidden in case the serie is hidden
- if (this.label) {
- this.label.attr({text: str, visibility: HIDDEN});
- // Create new label
- } else {
- this.label =
- this.axis.chart.renderer.text(str, 0, 0) // dummy positions, actual position updated with setOffset method in columnseries
- .css(this.options.style) // apply style
- .attr({align: this.textAlign, // fix the text-anchor
- rotation: this.options.rotation, // rotation
- visibility: HIDDEN }) // hidden until setOffset is called
- .add(group); // add to the labels-group
- }
- },
-
- /**
- * Sets the offset that the stack has from the x value and repositions the label.
- */
- setOffset: function (xOffset, xWidth) {
- var stackItem = this,
- axis = stackItem.axis,
- chart = axis.chart,
- inverted = chart.inverted,
- neg = this.isNegative, // special treatment is needed for negative stacks
- y = axis.translate(this.total, 0, 0, 0, 1), // stack value translated mapped to chart coordinates
- yZero = axis.translate(0), // stack origin
- h = mathAbs(y - yZero), // stack height
- x = chart.xAxis[0].translate(this.x) + xOffset, // stack x position
- plotHeight = chart.plotHeight,
- stackBox = { // this is the box for the complete stack
- x: inverted ? (neg ? y : y - h) : x,
- y: inverted ? plotHeight - x - xWidth : (neg ? (plotHeight - y - h) : plotHeight - y),
- width: inverted ? h : xWidth,
- height: inverted ? xWidth : h
- };
-
- if (this.label) {
- this.label
- .align(this.alignOptions, null, stackBox) // align the label to the box
- .attr({visibility: VISIBLE}); // set visibility
- }
-
- }
- };
- /**
- * Create a new axis object
- * @param {Object} chart
- * @param {Object} options
- */
- function Axis() {
- this.init.apply(this, arguments);
- }
-
- Axis.prototype = {
-
- /**
- * Default options for the X axis - the Y axis has extended defaults
- */
- defaultOptions: {
- // allowDecimals: null,
- // alternateGridColor: null,
- // categories: [],
- dateTimeLabelFormats: {
- millisecond: '%H:%M:%S.%L',
- second: '%H:%M:%S',
- minute: '%H:%M',
- hour: '%H:%M',
- day: '%e. %b',
- week: '%e. %b',
- month: '%b \'%y',
- year: '%Y'
- },
- endOnTick: false,
- gridLineColor: '#C0C0C0',
- // gridLineDashStyle: 'solid',
- // gridLineWidth: 0,
- // reversed: false,
-
- labels: defaultLabelOptions,
- // { step: null },
- lineColor: '#C0D0E0',
- lineWidth: 1,
- //linkedTo: null,
- //max: undefined,
- //min: undefined,
- minPadding: 0.01,
- maxPadding: 0.01,
- //minRange: null,
- minorGridLineColor: '#E0E0E0',
- // minorGridLineDashStyle: null,
- minorGridLineWidth: 1,
- minorTickColor: '#A0A0A0',
- //minorTickInterval: null,
- minorTickLength: 2,
- minorTickPosition: 'outside', // inside or outside
- //minorTickWidth: 0,
- //opposite: false,
- //offset: 0,
- //plotBands: [{
- // events: {},
- // zIndex: 1,
- // labels: { align, x, verticalAlign, y, style, rotation, textAlign }
- //}],
- //plotLines: [{
- // events: {}
- // dashStyle: {}
- // zIndex:
- // labels: { align, x, verticalAlign, y, style, rotation, textAlign }
- //}],
- //reversed: false,
- // showFirstLabel: true,
- // showLastLabel: true,
- startOfWeek: 1,
- startOnTick: false,
- tickColor: '#C0D0E0',
- //tickInterval: null,
- tickLength: 5,
- tickmarkPlacement: 'between', // on or between
- tickPixelInterval: 100,
- tickPosition: 'outside',
- tickWidth: 1,
- title: {
- //text: null,
- align: 'middle', // low, middle or high
- //margin: 0 for horizontal, 10 for vertical axes,
- //rotation: 0,
- //side: 'outside',
- style: {
- color: '#6D869F',
- //font: defaultFont.replace('normal', 'bold')
- fontWeight: 'bold'
- }
- //x: 0,
- //y: 0
- },
- type: 'linear' // linear, logarithmic or datetime
- },
-
- /**
- * This options set extends the defaultOptions for Y axes
- */
- defaultYAxisOptions: {
- endOnTick: true,
- gridLineWidth: 1,
- tickPixelInterval: 72,
- showLastLabel: true,
- labels: {
- align: 'right',
- x: -8,
- y: 3
- },
- lineWidth: 0,
- maxPadding: 0.05,
- minPadding: 0.05,
- startOnTick: true,
- tickWidth: 0,
- title: {
- rotation: 270,
- text: 'Y-values'
- },
- stackLabels: {
- enabled: false,
- //align: dynamic,
- //y: dynamic,
- //x: dynamic,
- //verticalAlign: dynamic,
- //textAlign: dynamic,
- //rotation: 0,
- formatter: function () {
- return this.total;
- },
- style: defaultLabelOptions.style
- }
- },
-
- /**
- * These options extend the defaultOptions for left axes
- */
- defaultLeftAxisOptions: {
- labels: {
- align: 'right',
- x: -8,
- y: null
- },
- title: {
- rotation: 270
- }
- },
-
- /**
- * These options extend the defaultOptions for right axes
- */
- defaultRightAxisOptions: {
- labels: {
- align: 'left',
- x: 8,
- y: null
- },
- title: {
- rotation: 90
- }
- },
-
- /**
- * These options extend the defaultOptions for bottom axes
- */
- defaultBottomAxisOptions: {
- labels: {
- align: 'center',
- x: 0,
- y: 14
- // overflow: undefined,
- // staggerLines: null
- },
- title: {
- rotation: 0
- }
- },
- /**
- * These options extend the defaultOptions for left axes
- */
- defaultTopAxisOptions: {
- labels: {
- align: 'center',
- x: 0,
- y: -5
- // overflow: undefined
- // staggerLines: null
- },
- title: {
- rotation: 0
- }
- },
-
- /**
- * Initialize the axis
- */
- init: function (chart, userOptions) {
-
-
- var isXAxis = userOptions.isX,
- axis = this;
-
- // Flag, is the axis horizontal
- axis.horiz = chart.inverted ? !isXAxis : isXAxis;
-
- // Flag, isXAxis
- axis.isXAxis = isXAxis;
- axis.xOrY = isXAxis ? 'x' : 'y';
-
-
- axis.opposite = userOptions.opposite; // needed in setOptions
- axis.side = axis.horiz ?
- (axis.opposite ? 0 : 2) : // top : bottom
- (axis.opposite ? 1 : 3); // right : left
-
- axis.setOptions(userOptions);
-
-
- var options = this.options,
- type = options.type,
- isDatetimeAxis = type === 'datetime';
-
- axis.labelFormatter = options.labels.formatter || axis.defaultLabelFormatter; // can be overwritten by dynamic format
-
-
- // Flag, stagger lines or not
- axis.staggerLines = axis.horiz && options.labels.staggerLines;
- axis.userOptions = userOptions;
-
- //axis.axisTitleMargin = UNDEFINED,// = options.title.margin,
- axis.minPixelPadding = 0;
- //axis.ignoreMinPadding = UNDEFINED; // can be set to true by a column or bar series
- //axis.ignoreMaxPadding = UNDEFINED;
-
- axis.chart = chart;
- axis.reversed = options.reversed;
-
- // Initial categories
- axis.categories = options.categories;
-
- // Elements
- //axis.axisGroup = UNDEFINED;
- //axis.gridGroup = UNDEFINED;
- //axis.axisTitle = UNDEFINED;
- //axis.axisLine = UNDEFINED;
-
- // Flag if type === logarithmic
- axis.isLog = type === 'logarithmic';
-
- // Flag, if axis is linked to another axis
- axis.isLinked = defined(options.linkedTo);
- // Linked axis.
- //axis.linkedParent = UNDEFINED;
-
- // Flag if type === datetime
- axis.isDatetimeAxis = isDatetimeAxis;
-
- // Flag if percentage mode
- //axis.usePercentage = UNDEFINED;
-
-
- // Tick positions
- //axis.tickPositions = UNDEFINED; // array containing predefined positions
- // Tick intervals
- //axis.tickInterval = UNDEFINED;
- //axis.minorTickInterval = UNDEFINED;
-
- // Major ticks
- axis.ticks = {};
- // Minor ticks
- axis.minorTicks = {};
- //axis.tickAmount = UNDEFINED;
-
- // List of plotLines/Bands
- axis.plotLinesAndBands = [];
-
- // Alternate bands
- axis.alternateBands = {};
-
- // Axis metrics
- //axis.left = UNDEFINED;
- //axis.top = UNDEFINED;
- //axis.width = UNDEFINED;
- //axis.height = UNDEFINED;
- //axis.bottom = UNDEFINED;
- //axis.right = UNDEFINED;
- //axis.transA = UNDEFINED;
- //axis.transB = UNDEFINED;
- //axis.oldTransA = UNDEFINED;
- axis.len = 0;
- //axis.oldMin = UNDEFINED;
- //axis.oldMax = UNDEFINED;
- //axis.oldUserMin = UNDEFINED;
- //axis.oldUserMax = UNDEFINED;
- //axis.oldAxisLength = UNDEFINED;
- axis.minRange = axis.userMinRange = options.minRange || options.maxZoom;
- axis.range = options.range;
- axis.offset = options.offset || 0;
-
-
- // Dictionary for stacks
- axis.stacks = {};
-
- // Min and max in the data
- //axis.dataMin = UNDEFINED,
- //axis.dataMax = UNDEFINED,
-
- // The axis range
- axis.max = null;
- axis.min = null;
-
- // User set min and max
- //axis.userMin = UNDEFINED,
- //axis.userMax = UNDEFINED,
-
- // Run Axis
-
- var eventType,
- events = axis.options.events;
-
- // Register
- chart.axes.push(axis);
- chart[isXAxis ? 'xAxis' : 'yAxis'].push(axis);
-
- axis.series = []; // populated by Series
-
- // inverted charts have reversed xAxes as default
- if (chart.inverted && isXAxis && axis.reversed === UNDEFINED) {
- axis.reversed = true;
- }
-
- axis.removePlotBand = axis.removePlotBandOrLine;
- axis.removePlotLine = axis.removePlotBandOrLine;
- axis.addPlotBand = axis.addPlotBandOrLine;
- axis.addPlotLine = axis.addPlotBandOrLine;
-
-
- // register event listeners
- for (eventType in events) {
- addEvent(axis, eventType, events[eventType]);
- }
-
- // extend logarithmic axis
- if (axis.isLog) {
- axis.val2lin = log2lin;
- axis.lin2val = lin2log;
- }
- },
-
- /**
- * Merge and set options
- */
- setOptions: function (userOptions) {
- this.options = merge(
- this.defaultOptions,
- this.isXAxis ? {} : this.defaultYAxisOptions,
- [this.defaultTopAxisOptions, this.defaultRightAxisOptions,
- this.defaultBottomAxisOptions, this.defaultLeftAxisOptions][this.side],
- userOptions
- );
- },
-
-
- /**
- * The default label formatter. The context is a special config object for the label.
- */
- defaultLabelFormatter: function () {
- var axis = this.axis,
- value = this.value,
- categories = axis.categories,
- tickInterval = axis.tickInterval,
- dateTimeLabelFormat = this.dateTimeLabelFormat,
- ret;
-
- if (categories) {
- ret = value;
-
- } else if (dateTimeLabelFormat) { // datetime axis
- ret = dateFormat(dateTimeLabelFormat, value);
-
- } else if (tickInterval % 1000000 === 0) { // use M abbreviation
- ret = (value / 1000000) + 'M';
-
- } else if (tickInterval % 1000 === 0) { // use k abbreviation
- ret = (value / 1000) + 'k';
-
- } else if (value >= 1000) { // add thousands separators
- ret = numberFormat(value, 0);
-
- } else { // small numbers
- ret = numberFormat(value, -1);
- }
- return ret;
- },
-
- /**
- * Get the minimum and maximum for the series of each axis
- */
- getSeriesExtremes: function () {
- var axis = this,
- chart = axis.chart,
- stacks = axis.stacks,
- posStack = [],
- negStack = [],
- i;
-
- // reset dataMin and dataMax in case we're redrawing
- axis.dataMin = axis.dataMax = null;
-
- // loop through this axis' series
- each(axis.series, function (series) {
-
- if (series.visible || !chart.options.chart.ignoreHiddenSeries) {
-
- var seriesOptions = series.options,
- stacking,
- posPointStack,
- negPointStack,
- stackKey,
- stackOption,
- negKey,
- xData,
- yData,
- x,
- y,
- threshold = seriesOptions.threshold,
- yDataLength,
- activeYData = [],
- activeCounter = 0;
-
- // Validate threshold in logarithmic axes
- if (axis.isLog && threshold <= 0) {
- threshold = seriesOptions.threshold = null;
- }
-
- // Get dataMin and dataMax for X axes
- if (axis.isXAxis) {
- xData = series.xData;
- if (xData.length) {
- axis.dataMin = mathMin(pick(axis.dataMin, xData[0]), arrayMin(xData));
- axis.dataMax = mathMax(pick(axis.dataMax, xData[0]), arrayMax(xData));
- }
-
- // Get dataMin and dataMax for Y axes, as well as handle stacking and processed data
- } else {
- var isNegative,
- pointStack,
- key,
- cropped = series.cropped,
- xExtremes = series.xAxis.getExtremes(),
- //findPointRange,
- //pointRange,
- j,
- hasModifyValue = !!series.modifyValue;
-
-
- // Handle stacking
- stacking = seriesOptions.stacking;
- axis.usePercentage = stacking === 'percent';
-
- // create a stack for this particular series type
- if (stacking) {
- stackOption = seriesOptions.stack;
- stackKey = series.type + pick(stackOption, '');
- negKey = '-' + stackKey;
- series.stackKey = stackKey; // used in translate
-
- posPointStack = posStack[stackKey] || []; // contains the total values for each x
- posStack[stackKey] = posPointStack;
-
- negPointStack = negStack[negKey] || [];
- negStack[negKey] = negPointStack;
- }
- if (axis.usePercentage) {
- axis.dataMin = 0;
- axis.dataMax = 99;
- }
-
- // processData can alter series.pointRange, so this goes after
- //findPointRange = series.pointRange === null;
-
- xData = series.processedXData;
- yData = series.processedYData;
- yDataLength = yData.length;
-
- // loop over the non-null y values and read them into a local array
- for (i = 0; i < yDataLength; i++) {
- x = xData[i];
- y = yData[i];
- if (y !== null && y !== UNDEFINED) {
-
- // read stacked values into a stack based on the x value,
- // the sign of y and the stack key
- if (stacking) {
- isNegative = y < threshold;
- pointStack = isNegative ? negPointStack : posPointStack;
- key = isNegative ? negKey : stackKey;
-
- y = pointStack[x] =
- defined(pointStack[x]) ?
- pointStack[x] + y : y;
-
-
- // add the series
- if (!stacks[key]) {
- stacks[key] = {};
- }
-
- // If the StackItem is there, just update the values,
- // if not, create one first
- if (!stacks[key][x]) {
- stacks[key][x] = new StackItem(axis, axis.options.stackLabels, isNegative, x, stackOption);
- }
- stacks[key][x].setTotal(y);
-
-
- // general hook, used for Highstock compare values feature
- } else if (hasModifyValue) {
- y = series.modifyValue(y);
- }
-
- // get the smallest distance between points
- /*if (i) {
- distance = mathAbs(xData[i] - xData[i - 1]);
- pointRange = pointRange === UNDEFINED ? distance : mathMin(distance, pointRange);
- }*/
-
- // for points within the visible range, including the first point outside the
- // visible range, consider y extremes
- if (cropped || ((xData[i + 1] || x) >= xExtremes.min && (xData[i - 1] || x) <= xExtremes.max)) {
-
- j = y.length;
- if (j) { // array, like ohlc or range data
- while (j--) {
- if (y[j] !== null) {
- activeYData[activeCounter++] = y[j];
- }
- }
- } else {
- activeYData[activeCounter++] = y;
- }
- }
- }
- }
-
- // record the least unit distance
- /*if (findPointRange) {
- series.pointRange = pointRange || 1;
- }
- series.closestPointRange = pointRange;*/
-
- // Get the dataMin and dataMax so far. If percentage is used, the min and max are
- // always 0 and 100. If the length of activeYData is 0, continue with null values.
- if (!axis.usePercentage && activeYData.length) {
- axis.dataMin = mathMin(pick(axis.dataMin, activeYData[0]), arrayMin(activeYData));
- axis.dataMax = mathMax(pick(axis.dataMax, activeYData[0]), arrayMax(activeYData));
- }
-
- // Adjust to threshold
- if (defined(threshold)) {
- if (axis.dataMin >= threshold) {
- axis.dataMin = threshold;
- axis.ignoreMinPadding = true;
- } else if (axis.dataMax < threshold) {
- axis.dataMax = threshold;
- axis.ignoreMaxPadding = true;
- }
- }
- }
- }
- });
- },
-
- /**
- * Translate from axis value to pixel position on the chart, or back
- *
- */
- translate: function (val, backwards, cvsCoord, old, handleLog) {
- var axis = this,
- axisLength = axis.len,
- sign = 1,
- cvsOffset = 0,
- localA = old ? axis.oldTransA : axis.transA,
- localMin = old ? axis.oldMin : axis.min,
- returnValue,
- postTranslate = axis.options.ordinal || (axis.isLog && handleLog);
-
- if (!localA) {
- localA = axis.transA;
- }
-
- if (cvsCoord) {
- sign *= -1; // canvas coordinates inverts the value
- cvsOffset = axisLength;
- }
- if (axis.reversed) { // reversed axis
- sign *= -1;
- cvsOffset -= sign * axisLength;
- }
-
- if (backwards) { // reverse translation
- if (axis.reversed) {
- val = axisLength - val;
- }
- returnValue = val / localA + localMin; // from chart pixel to value
- if (postTranslate) { // log and ordinal axes
- returnValue = axis.lin2val(returnValue);
- }
-
- } else { // normal translation, from axis value to pixel, relative to plot
- if (postTranslate) { // log and ordinal axes
- val = axis.val2lin(val);
- }
-
- returnValue = sign * (val - localMin) * localA + cvsOffset + (sign * axis.minPixelPadding);
- }
-
- return returnValue;
- },
-
- /**
- * Create the path for a plot line that goes from the given value on
- * this axis, across the plot to the opposite side
- * @param {Number} value
- * @param {Number} lineWidth Used for calculation crisp line
- * @param {Number] old Use old coordinates (for resizing and rescaling)
- */
- getPlotLinePath: function (value, lineWidth, old) {
- var axis = this,
- chart = axis.chart,
- axisLeft = axis.left,
- axisTop = axis.top,
- x1,
- y1,
- x2,
- y2,
- translatedValue = axis.translate(value, null, null, old),
- cHeight = (old && chart.oldChartHeight) || chart.chartHeight,
- cWidth = (old && chart.oldChartWidth) || chart.chartWidth,
- skip,
- transB = axis.transB;
-
- x1 = x2 = mathRound(translatedValue + transB);
- y1 = y2 = mathRound(cHeight - translatedValue - transB);
-
- if (isNaN(translatedValue)) { // no min or max
- skip = true;
-
- } else if (axis.horiz) {
- y1 = axisTop;
- y2 = cHeight - axis.bottom;
- if (x1 < axisLeft || x1 > axisLeft + axis.width) {
- skip = true;
- }
- } else {
- x1 = axisLeft;
- x2 = cWidth - axis.right;
-
- if (y1 < axisTop || y1 > axisTop + axis.height) {
- skip = true;
- }
- }
- return skip ?
- null :
- chart.renderer.crispLine([M, x1, y1, L, x2, y2], lineWidth || 0);
- },
-
- /**
- * Create the path for a plot band
- */
- getPlotBandPath: function (from, to) {
-
- var toPath = this.getPlotLinePath(to),
- path = this.getPlotLinePath(from);
-
- if (path && toPath) {
- path.push(
- toPath[4],
- toPath[5],
- toPath[1],
- toPath[2]
- );
- } else { // outside the axis area
- path = null;
- }
-
- return path;
- },
-
- /**
- * Set the tick positions of a linear axis to round values like whole tens or every five.
- */
- getLinearTickPositions: function (tickInterval, min, max) {
- var pos,
- lastPos,
- roundedMin = correctFloat(mathFloor(min / tickInterval) * tickInterval),
- roundedMax = correctFloat(mathCeil(max / tickInterval) * tickInterval),
- tickPositions = [];
-
- // Populate the intermediate values
- pos = roundedMin;
- while (pos <= roundedMax) {
-
- // Place the tick on the rounded value
- tickPositions.push(pos);
-
- // Always add the raw tickInterval, not the corrected one.
- pos = correctFloat(pos + tickInterval);
-
- // If the interval is not big enough in the current min - max range to actually increase
- // the loop variable, we need to break out to prevent endless loop. Issue #619
- if (pos === lastPos) {
- break;
- }
-
- // Record the last value
- lastPos = pos;
- }
- return tickPositions;
- },
-
- /**
- * Set the tick positions of a logarithmic axis
- */
- getLogTickPositions: function (interval, min, max, minor) {
- var axis = this,
- options = axis.options,
- axisLength = axis.len;
-
- // Since we use this method for both major and minor ticks,
- // use a local variable and return the result
- var positions = [];
-
- // Reset
- if (!minor) {
- axis._minorAutoInterval = null;
- }
-
- // First case: All ticks fall on whole logarithms: 1, 10, 100 etc.
- if (interval >= 0.5) {
- interval = mathRound(interval);
- positions = axis.getLinearTickPositions(interval, min, max);
-
- // Second case: We need intermediary ticks. For example
- // 1, 2, 4, 6, 8, 10, 20, 40 etc.
- } else if (interval >= 0.08) {
- var roundedMin = mathFloor(min),
- intermediate,
- i,
- j,
- len,
- pos,
- lastPos,
- break2;
-
- if (interval > 0.3) {
- intermediate = [1, 2, 4];
- } else if (interval > 0.15) { // 0.2 equals five minor ticks per 1, 10, 100 etc
- intermediate = [1, 2, 4, 6, 8];
- } else { // 0.1 equals ten minor ticks per 1, 10, 100 etc
- intermediate = [1, 2, 3, 4, 5, 6, 7, 8, 9];
- }
-
- for (i = roundedMin; i < max + 1 && !break2; i++) {
- len = intermediate.length;
- for (j = 0; j < len && !break2; j++) {
- pos = log2lin(lin2log(i) * intermediate[j]);
-
- if (pos > min) {
- positions.push(lastPos);
- }
-
- if (lastPos > max) {
- break2 = true;
- }
- lastPos = pos;
- }
- }
-
- // Third case: We are so deep in between whole logarithmic values that
- // we might as well handle the tick positions like a linear axis. For
- // example 1.01, 1.02, 1.03, 1.04.
- } else {
- var realMin = lin2log(min),
- realMax = lin2log(max),
- tickIntervalOption = options[minor ? 'minorTickInterval' : 'tickInterval'],
- filteredTickIntervalOption = tickIntervalOption === 'auto' ? null : tickIntervalOption,
- tickPixelIntervalOption = options.tickPixelInterval / (minor ? 5 : 1),
- totalPixelLength = minor ? axisLength / axis.tickPositions.length : axisLength;
-
- interval = pick(
- filteredTickIntervalOption,
- axis._minorAutoInterval,
- (realMax - realMin) * tickPixelIntervalOption / (totalPixelLength || 1)
- );
-
- interval = normalizeTickInterval(
- interval,
- null,
- math.pow(10, mathFloor(math.log(interval) / math.LN10))
- );
-
- positions = map(axis.getLinearTickPositions(
- interval,
- realMin,
- realMax
- ), log2lin);
-
- if (!minor) {
- axis._minorAutoInterval = interval / 5;
- }
- }
-
- // Set the axis-level tickInterval variable
- if (!minor) {
- axis.tickInterval = interval;
- }
- return positions;
- },
-
- /**
- * Return the minor tick positions. For logarithmic axes, reuse the same logic
- * as for major ticks.
- */
- getMinorTickPositions: function () {
- var axis = this,
- tickPositions = axis.tickPositions,
- minorTickInterval = axis.minorTickInterval;
-
- var minorTickPositions = [],
- pos,
- i,
- len;
-
- if (axis.isLog) {
- len = tickPositions.length;
- for (i = 1; i < len; i++) {
- minorTickPositions = minorTickPositions.concat(
- axis.getLogTickPositions(minorTickInterval, tickPositions[i - 1], tickPositions[i], true)
- );
- }
-
- } else {
- for (pos = axis.min + (tickPositions[0] - axis.min) % minorTickInterval; pos <= axis.max; pos += minorTickInterval) {
- minorTickPositions.push(pos);
- }
- }
-
- return minorTickPositions;
- },
-
- /**
- * Adjust the min and max for the minimum range. Keep in mind that the series data is
- * not yet processed, so we don't have information on data cropping and grouping, or
- * updated axis.pointRange or series.pointRange. The data can't be processed until
- * we have finally established min and max.
- */
- adjustForMinRange: function () {
- var axis = this,
- options = axis.options,
- min = axis.min,
- max = axis.max,
- zoomOffset,
- spaceAvailable = axis.dataMax - axis.dataMin >= axis.minRange,
- closestDataRange,
- i,
- distance,
- xData,
- loopLength,
- minArgs,
- maxArgs;
-
- // Set the automatic minimum range based on the closest point distance
- if (axis.isXAxis && axis.minRange === UNDEFINED && !axis.isLog) {
-
- if (defined(options.min) || defined(options.max)) {
- axis.minRange = null; // don't do this again
-
- } else {
-
- // Find the closest distance between raw data points, as opposed to
- // closestPointRange that applies to processed points (cropped and grouped)
- each(axis.series, function (series) {
- xData = series.xData;
- loopLength = series.xIncrement ? 1 : xData.length - 1;
- for (i = loopLength; i > 0; i--) {
- distance = xData[i] - xData[i - 1];
- if (closestDataRange === UNDEFINED || distance < closestDataRange) {
- closestDataRange = distance;
- }
- }
- });
- axis.minRange = mathMin(closestDataRange * 5, axis.dataMax - axis.dataMin);
- }
- }
-
- // if minRange is exceeded, adjust
- if (max - min < axis.minRange) {
- var minRange = axis.minRange;
- zoomOffset = (minRange - max + min) / 2;
-
- // if min and max options have been set, don't go beyond it
- minArgs = [min - zoomOffset, pick(options.min, min - zoomOffset)];
- if (spaceAvailable) { // if space is available, stay within the data range
- minArgs[2] = axis.dataMin;
- }
- min = arrayMax(minArgs);
-
- maxArgs = [min + minRange, pick(options.max, min + minRange)];
- if (spaceAvailable) { // if space is availabe, stay within the data range
- maxArgs[2] = axis.dataMax;
- }
-
- max = arrayMin(maxArgs);
-
- // now if the max is adjusted, adjust the min back
- if (max - min < minRange) {
- minArgs[0] = max - minRange;
- minArgs[1] = pick(options.min, max - minRange);
- min = arrayMax(minArgs);
- }
- }
-
- // Record modified extremes
- axis.min = min;
- axis.max = max;
- },
-
- /**
- * Update translation information
- */
- setAxisTranslation: function () {
- var axis = this,
- range = axis.max - axis.min,
- pointRange = 0,
- closestPointRange,
- seriesClosestPointRange,
- transA = axis.transA;
-
- // adjust translation for padding
- if (axis.isXAxis) {
- if (axis.isLinked) {
- pointRange = axis.linkedParent.pointRange;
- } else {
- each(axis.series, function (series) {
- pointRange = mathMax(pointRange, series.pointRange);
- seriesClosestPointRange = series.closestPointRange;
- if (!series.noSharedTooltip && defined(seriesClosestPointRange)) {
- closestPointRange = defined(closestPointRange) ?
- mathMin(closestPointRange, seriesClosestPointRange) :
- seriesClosestPointRange;
- }
- });
- }
-
- // pointRange means the width reserved for each point, like in a column chart
- axis.pointRange = pointRange;
-
- // closestPointRange means the closest distance between points. In columns
- // it is mostly equal to pointRange, but in lines pointRange is 0 while closestPointRange
- // is some other value
- axis.closestPointRange = closestPointRange;
- }
-
- // secondary values
- axis.oldTransA = transA;
- axis.translationSlope = axis.transA = transA = axis.len / ((range + pointRange) || 1);
- axis.transB = axis.horiz ? axis.left : axis.bottom; // translation addend
- axis.minPixelPadding = transA * (pointRange / 2);
- },
-
- /**
- * Set the tick positions to round values and optionally extend the extremes
- * to the nearest tick
- */
- setTickPositions: function (secondPass) {
- var axis = this,
- chart = axis.chart,
- options = axis.options,
- isLog = axis.isLog,
- isDatetimeAxis = axis.isDatetimeAxis,
- isXAxis = axis.isXAxis,
- isLinked = axis.isLinked,
- tickPositioner = axis.options.tickPositioner,
- magnitude,
- maxPadding = options.maxPadding,
- minPadding = options.minPadding,
- length,
- linkedParentExtremes,
- tickIntervalOption = options.tickInterval,
- tickPixelIntervalOption = options.tickPixelInterval,
- tickPositions,
- categories = axis.categories;
-
- // linked axis gets the extremes from the parent axis
- if (isLinked) {
- axis.linkedParent = chart[isXAxis ? 'xAxis' : 'yAxis'][options.linkedTo];
- linkedParentExtremes = axis.linkedParent.getExtremes();
- axis.min = pick(linkedParentExtremes.min, linkedParentExtremes.dataMin);
- axis.max = pick(linkedParentExtremes.max, linkedParentExtremes.dataMax);
- if (options.type !== axis.linkedParent.options.type) {
- error(11, 1); // Can't link axes of different type
- }
- } else { // initial min and max from the extreme data values
- axis.min = pick(axis.userMin, options.min, axis.dataMin);
- axis.max = pick(axis.userMax, options.max, axis.dataMax);
- }
-
- if (isLog) {
- if (!secondPass && mathMin(axis.min, pick(axis.dataMin, axis.min)) <= 0) { // #978
- error(10, 1); // Can't plot negative values on log axis
- }
- axis.min = correctFloat(log2lin(axis.min)); // correctFloat cures #934
- axis.max = correctFloat(log2lin(axis.max));
- }
-
- // handle zoomed range
- if (axis.range) {
- axis.userMin = axis.min = mathMax(axis.min, axis.max - axis.range); // #618
- axis.userMax = axis.max;
- if (secondPass) {
- axis.range = null; // don't use it when running setExtremes
- }
- }
-
- // adjust min and max for the minimum range
- axis.adjustForMinRange();
-
- // pad the values to get clear of the chart's edges
- if (!categories && !axis.usePercentage && !isLinked && defined(axis.min) && defined(axis.max)) {
- length = (axis.max - axis.min) || 1;
- if (!defined(options.min) && !defined(axis.userMin) && minPadding && (axis.dataMin < 0 || !axis.ignoreMinPadding)) {
- axis.min -= length * minPadding;
- }
- if (!defined(options.max) && !defined(axis.userMax) && maxPadding && (axis.dataMax > 0 || !axis.ignoreMaxPadding)) {
- axis.max += length * maxPadding;
- }
- }
-
- // get tickInterval
- if (axis.min === axis.max || axis.min === undefined || axis.max === undefined) {
- axis.tickInterval = 1;
- } else if (isLinked && !tickIntervalOption &&
- tickPixelIntervalOption === axis.linkedParent.options.tickPixelInterval) {
- axis.tickInterval = axis.linkedParent.tickInterval;
- } else {
- axis.tickInterval = pick(
- tickIntervalOption,
- categories ? // for categoried axis, 1 is default, for linear axis use tickPix
- 1 :
- (axis.max - axis.min) * tickPixelIntervalOption / (axis.len || 1)
- );
- }
-
- // Now we're finished detecting min and max, crop and group series data. This
- // is in turn needed in order to find tick positions in ordinal axes.
- if (isXAxis && !secondPass) {
- each(axis.series, function (series) {
- series.processData(axis.min !== axis.oldMin || axis.max !== axis.oldMax);
- });
- }
-
- // set the translation factor used in translate function
- axis.setAxisTranslation();
-
- // hook for ordinal axes. To do: merge with below
- if (axis.beforeSetTickPositions) {
- axis.beforeSetTickPositions();
- }
-
- // hook for extensions, used in Highstock ordinal axes
- if (axis.postProcessTickInterval) {
- axis.tickInterval = axis.postProcessTickInterval(axis.tickInterval);
- }
-
- // for linear axes, get magnitude and normalize the interval
- if (!isDatetimeAxis && !isLog) { // linear
- magnitude = math.pow(10, mathFloor(math.log(axis.tickInterval) / math.LN10));
- if (!defined(options.tickInterval)) {
- axis.tickInterval = normalizeTickInterval(axis.tickInterval, null, magnitude, options);
- }
- }
-
- // get minorTickInterval
- axis.minorTickInterval = options.minorTickInterval === 'auto' && axis.tickInterval ?
- axis.tickInterval / 5 : options.minorTickInterval;
-
- // find the tick positions
- axis.tickPositions = tickPositions = options.tickPositions || (tickPositioner && tickPositioner.apply(axis, [axis.min, axis.max]));
- if (!tickPositions) {
- if (isDatetimeAxis) {
- tickPositions = (axis.getNonLinearTimeTicks || getTimeTicks)(
- normalizeTimeTickInterval(axis.tickInterval, options.units),
- axis.min,
- axis.max,
- options.startOfWeek,
- axis.ordinalPositions,
- axis.closestPointRange,
- true
- );
- } else if (isLog) {
- tickPositions = axis.getLogTickPositions(axis.tickInterval, axis.min, axis.max);
- } else {
- tickPositions = axis.getLinearTickPositions(axis.tickInterval, axis.min, axis.max);
- }
- axis.tickPositions = tickPositions;
- }
-
- if (!isLinked) {
-
- // reset min/max or remove extremes based on start/end on tick
- var roundedMin = tickPositions[0],
- roundedMax = tickPositions[tickPositions.length - 1];
-
- if (options.startOnTick) {
- axis.min = roundedMin;
- } else if (axis.min > roundedMin) {
- tickPositions.shift();
- }
-
- if (options.endOnTick) {
- axis.max = roundedMax;
- } else if (axis.max < roundedMax) {
- tickPositions.pop();
- }
-
- }
- },
-
- /**
- * Set the max ticks of either the x and y axis collection
- */
- setMaxTicks: function () {
-
- var chart = this.chart,
- maxTicks = chart.maxTicks,
- tickPositions = this.tickPositions,
- xOrY = this.xOrY;
-
- if (!maxTicks) { // first call, or maxTicks have been reset after a zoom operation
- maxTicks = {
- x: 0,
- y: 0
- };
- }
-
- if (!this.isLinked && !this.isDatetimeAxis && tickPositions.length > maxTicks[xOrY] && this.options.alignTicks !== false) {
- maxTicks[xOrY] = tickPositions.length;
- }
- chart.maxTicks = maxTicks;
- },
-
- /**
- * When using multiple axes, adjust the number of ticks to match the highest
- * number of ticks in that group
- */
- adjustTickAmount: function () {
- var axis = this,
- chart = axis.chart,
- xOrY = axis.xOrY,
- tickPositions = axis.tickPositions,
- maxTicks = chart.maxTicks;
-
- if (maxTicks && maxTicks[xOrY] && !axis.isDatetimeAxis && !axis.categories && !axis.isLinked && axis.options.alignTicks !== false) { // only apply to linear scale
- var oldTickAmount = axis.tickAmount,
- calculatedTickAmount = tickPositions.length,
- tickAmount;
-
- // set the axis-level tickAmount to use below
- axis.tickAmount = tickAmount = maxTicks[xOrY];
-
- if (calculatedTickAmount < tickAmount) {
- while (tickPositions.length < tickAmount) {
- tickPositions.push(correctFloat(
- tickPositions[tickPositions.length - 1] + axis.tickInterval
- ));
- }
- axis.transA *= (calculatedTickAmount - 1) / (tickAmount - 1);
- axis.max = tickPositions[tickPositions.length - 1];
-
- }
- if (defined(oldTickAmount) && tickAmount !== oldTickAmount) {
- axis.isDirty = true;
- }
- }
- },
-
- /**
- * Set the scale based on data min and max, user set min and max or options
- *
- */
- setScale: function () {
- var axis = this,
- stacks = axis.stacks,
- type,
- i,
- isDirtyData,
- isDirtyAxisLength;
-
- axis.oldMin = axis.min;
- axis.oldMax = axis.max;
- axis.oldAxisLength = axis.len;
-
- // set the new axisLength
- axis.setAxisSize();
- //axisLength = horiz ? axisWidth : axisHeight;
- isDirtyAxisLength = axis.len !== axis.oldAxisLength;
-
- // is there new data?
- each(axis.series, function (series) {
- if (series.isDirtyData || series.isDirty ||
- series.xAxis.isDirty) { // when x axis is dirty, we need new data extremes for y as well
- isDirtyData = true;
- }
- });
-
- // do we really need to go through all this?
- if (isDirtyAxisLength || isDirtyData || axis.isLinked ||
- axis.userMin !== axis.oldUserMin || axis.userMax !== axis.oldUserMax) {
-
- // get data extremes if needed
- axis.getSeriesExtremes();
-
- // get fixed positions based on tickInterval
- axis.setTickPositions();
-
- // record old values to decide whether a rescale is necessary later on (#540)
- axis.oldUserMin = axis.userMin;
- axis.oldUserMax = axis.userMax;
-
- // Mark as dirty if it is not already set to dirty and extremes have changed. #595.
- if (!axis.isDirty) {
- axis.isDirty = isDirtyAxisLength || axis.min !== axis.oldMin || axis.max !== axis.oldMax;
- }
- }
-
-
- // reset stacks
- if (!axis.isXAxis) {
- for (type in stacks) {
- for (i in stacks[type]) {
- stacks[type][i].cum = stacks[type][i].total;
- }
- }
- }
-
- // Set the maximum tick amount
- axis.setMaxTicks();
- },
-
- /**
- * Set the extremes and optionally redraw
- * @param {Number} newMin
- * @param {Number} newMax
- * @param {Boolean} redraw
- * @param {Boolean|Object} animation Whether to apply animation, and optionally animation
- * configuration
- * @param {Object} eventArguments
- *
- */
- setExtremes: function (newMin, newMax, redraw, animation, eventArguments) {
- var axis = this,
- chart = axis.chart;
-
- redraw = pick(redraw, true); // defaults to true
-
- // Extend the arguments with min and max
- eventArguments = extend(eventArguments, {
- min: newMin,
- max: newMax
- });
-
- // Fire the event
- fireEvent(axis, 'setExtremes', eventArguments, function () { // the default event handler
-
- axis.userMin = newMin;
- axis.userMax = newMax;
-
- // Mark for running afterSetExtremes
- axis.isDirtyExtremes = true;
-
- // redraw
- if (redraw) {
- chart.redraw(animation);
- }
- });
- },
-
- /**
- * Update the axis metrics
- */
- setAxisSize: function () {
- var axis = this,
- chart = axis.chart,
- options = axis.options;
-
- var offsetLeft = options.offsetLeft || 0,
- offsetRight = options.offsetRight || 0;
-
- // basic values
- // expose to use in Series object and navigator
- axis.left = pick(options.left, chart.plotLeft + offsetLeft);
- axis.top = pick(options.top, chart.plotTop);
- axis.width = pick(options.width, chart.plotWidth - offsetLeft + offsetRight);
- axis.height = pick(options.height, chart.plotHeight);
- axis.bottom = chart.chartHeight - axis.height - axis.top;
- axis.right = chart.chartWidth - axis.width - axis.left;
- axis.len = mathMax(axis.horiz ? axis.width : axis.height, 0); // mathMax fixes #905
- },
-
- /**
- * Get the actual axis extremes
- */
- getExtremes: function () {
- var axis = this,
- isLog = axis.isLog;
-
- return {
- min: isLog ? correctFloat(lin2log(axis.min)) : axis.min,
- max: isLog ? correctFloat(lin2log(axis.max)) : axis.max,
- dataMin: axis.dataMin,
- dataMax: axis.dataMax,
- userMin: axis.userMin,
- userMax: axis.userMax
- };
- },
-
- /**
- * Get the zero plane either based on zero or on the min or max value.
- * Used in bar and area plots
- */
- getThreshold: function (threshold) {
- var axis = this,
- isLog = axis.isLog;
-
- var realMin = isLog ? lin2log(axis.min) : axis.min,
- realMax = isLog ? lin2log(axis.max) : axis.max;
-
- if (realMin > threshold || threshold === null) {
- threshold = realMin;
- } else if (realMax < threshold) {
- threshold = realMax;
- }
-
- return axis.translate(threshold, 0, 1, 0, 1);
- },
-
- /**
- * Add a plot band or plot line after render time
- *
- * @param options {Object} The plotBand or plotLine configuration object
- */
- addPlotBandOrLine: function (options) {
- var obj = new PlotLineOrBand(this, options).render();
- this.plotLinesAndBands.push(obj);
- return obj;
- },
-
- /**
- * Render the tick labels to a preliminary position to get their sizes
- */
- getOffset: function () {
- var axis = this,
- chart = axis.chart,
- renderer = chart.renderer,
- options = axis.options,
- tickPositions = axis.tickPositions,
- ticks = axis.ticks,
- horiz = axis.horiz,
- side = axis.side,
- hasData,
- showAxis,
- titleOffset = 0,
- titleOffsetOption,
- titleMargin = 0,
- axisTitleOptions = options.title,
- labelOptions = options.labels,
- labelOffset = 0, // reset
- axisOffset = chart.axisOffset,
- directionFactor = [-1, 1, 1, -1][side],
- n;
-
-
- // For reuse in Axis.render
- axis.hasData = hasData = axis.series.length && defined(axis.min) && defined(axis.max);
- axis.showAxis = showAxis = hasData || pick(options.showEmpty, true);
-
- // Create the axisGroup and gridGroup elements on first iteration
- if (!axis.axisGroup) {
- axis.axisGroup = renderer.g('axis')
- .attr({ zIndex: options.zIndex || 7 })
- .add();
- axis.gridGroup = renderer.g('grid')
- .attr({ zIndex: options.gridZIndex || 1 })
- .add();
- }
-
- if (hasData || axis.isLinked) {
- each(tickPositions, function (pos) {
- if (!ticks[pos]) {
- ticks[pos] = new Tick(axis, pos);
- } else {
- ticks[pos].addLabel(); // update labels depending on tick interval
- }
-
- });
-
- each(tickPositions, function (pos) {
- // left side must be align: right and right side must have align: left for labels
- if (side === 0 || side === 2 || { 1: 'left', 3: 'right' }[side] === labelOptions.align) {
-
- // get the highest offset
- labelOffset = mathMax(
- ticks[pos].getLabelSize(),
- labelOffset
- );
- }
-
- });
-
- if (axis.staggerLines) {
- labelOffset += (axis.staggerLines - 1) * 16;
- }
-
- } else { // doesn't have data
- for (n in ticks) {
- ticks[n].destroy();
- delete ticks[n];
- }
- }
-
- if (axisTitleOptions && axisTitleOptions.text) {
- if (!axis.axisTitle) {
- axis.axisTitle = renderer.text(
- axisTitleOptions.text,
- 0,
- 0,
- axisTitleOptions.useHTML
- )
- .attr({
- zIndex: 7,
- rotation: axisTitleOptions.rotation || 0,
- align: axisTitleOptions.textAlign ||
- { low: 'left', middle: 'center', high: 'right' }[axisTitleOptions.align]
- })
- .css(axisTitleOptions.style)
- .add(axis.axisGroup);
- axis.axisTitle.isNew = true;
- }
-
- if (showAxis) {
- titleOffset = axis.axisTitle.getBBox()[horiz ? 'height' : 'width'];
- titleMargin = pick(axisTitleOptions.margin, horiz ? 5 : 10);
- titleOffsetOption = axisTitleOptions.offset;
- }
-
- // hide or show the title depending on whether showEmpty is set
- axis.axisTitle[showAxis ? 'show' : 'hide']();
- }
-
- // handle automatic or user set offset
- axis.offset = directionFactor * pick(options.offset, axisOffset[side]);
-
-
- axis.axisTitleMargin =
- pick(titleOffsetOption,
- labelOffset + titleMargin +
- (side !== 2 && labelOffset && directionFactor * options.labels[horiz ? 'y' : 'x'])
- );
-
- axisOffset[side] = mathMax(
- axisOffset[side],
- axis.axisTitleMargin + titleOffset + directionFactor * axis.offset
- );
-
- },
-
- /**
- * Get the path for the axis line
- */
- getLinePath: function (lineWidth) {
- var chart = this.chart,
- opposite = this.opposite,
- offset = this.offset,
- horiz = this.horiz,
- lineLeft = this.left + (opposite ? this.width : 0) + offset,
- lineTop = chart.chartHeight - this.bottom - (opposite ? this.height : 0) + offset;
-
- return chart.renderer.crispLine([
- M,
- horiz ?
- this.left :
- lineLeft,
- horiz ?
- lineTop :
- this.top,
- L,
- horiz ?
- chart.chartWidth - this.right :
- lineLeft,
- horiz ?
- lineTop :
- chart.chartHeight - this.bottom
- ], lineWidth);
- },
-
- /**
- * Position the title
- */
- getTitlePosition: function () {
- // compute anchor points for each of the title align options
- var horiz = this.horiz,
- axisLeft = this.left,
- axisTop = this.top,
- axisLength = this.len,
- axisTitleOptions = this.options.title,
- margin = horiz ? axisLeft : axisTop,
- opposite = this.opposite,
- offset = this.offset,
- fontSize = pInt(axisTitleOptions.style.fontSize || 12),
-
- // the position in the length direction of the axis
- alongAxis = {
- low: margin + (horiz ? 0 : axisLength),
- middle: margin + axisLength / 2,
- high: margin + (horiz ? axisLength : 0)
- }[axisTitleOptions.align],
-
- // the position in the perpendicular direction of the axis
- offAxis = (horiz ? axisTop + this.height : axisLeft) +
- (horiz ? 1 : -1) * // horizontal axis reverses the margin
- (opposite ? -1 : 1) * // so does opposite axes
- this.axisTitleMargin +
- (this.side === 2 ? fontSize : 0);
-
- return {
- x: horiz ?
- alongAxis :
- offAxis + (opposite ? this.width : 0) + offset +
- (axisTitleOptions.x || 0), // x
- y: horiz ?
- offAxis - (opposite ? this.height : 0) + offset :
- alongAxis + (axisTitleOptions.y || 0) // y
- };
- },
-
- /**
- * Render the axis
- */
- render: function () {
- var axis = this,
- chart = axis.chart,
- renderer = chart.renderer,
- options = axis.options,
- isLog = axis.isLog,
- isLinked = axis.isLinked,
- tickPositions = axis.tickPositions,
- axisTitle = axis.axisTitle,
- stacks = axis.stacks,
- ticks = axis.ticks,
- minorTicks = axis.minorTicks,
- alternateBands = axis.alternateBands,
- stackLabelOptions = options.stackLabels,
- alternateGridColor = options.alternateGridColor,
- lineWidth = options.lineWidth,
- linePath,
- hasRendered = chart.hasRendered,
- slideInTicks = hasRendered && defined(axis.oldMin) && !isNaN(axis.oldMin),
- hasData = axis.hasData,
- showAxis = axis.showAxis,
- from,
- to;
-
- // If the series has data draw the ticks. Else only the line and title
- if (hasData || isLinked) {
-
- // minor ticks
- if (axis.minorTickInterval && !axis.categories) {
- each(axis.getMinorTickPositions(), function (pos) {
- if (!minorTicks[pos]) {
- minorTicks[pos] = new Tick(axis, pos, 'minor');
- }
-
- // render new ticks in old position
- if (slideInTicks && minorTicks[pos].isNew) {
- minorTicks[pos].render(null, true);
- }
-
-
- minorTicks[pos].isActive = true;
- minorTicks[pos].render();
- });
- }
-
- // Major ticks. Pull out the first item and render it last so that
- // we can get the position of the neighbour label. #808.
- each(tickPositions.slice(1).concat([tickPositions[0]]), function (pos, i) {
-
- // Reorganize the indices
- i = (i === tickPositions.length - 1) ? 0 : i + 1;
-
- // linked axes need an extra check to find out if
- if (!isLinked || (pos >= axis.min && pos <= axis.max)) {
-
- if (!ticks[pos]) {
- ticks[pos] = new Tick(axis, pos);
- }
-
- // render new ticks in old position
- if (slideInTicks && ticks[pos].isNew) {
- ticks[pos].render(i, true);
- }
-
- ticks[pos].isActive = true;
- ticks[pos].render(i);
- }
-
- });
-
- // alternate grid color
- if (alternateGridColor) {
- each(tickPositions, function (pos, i) {
- if (i % 2 === 0 && pos < axis.max) {
- if (!alternateBands[pos]) {
- alternateBands[pos] = new PlotLineOrBand(axis);
- }
- from = pos;
- to = tickPositions[i + 1] !== UNDEFINED ? tickPositions[i + 1] : axis.max;
- alternateBands[pos].options = {
- from: isLog ? lin2log(from) : from,
- to: isLog ? lin2log(to) : to,
- color: alternateGridColor
- };
- alternateBands[pos].render();
- alternateBands[pos].isActive = true;
- }
- });
- }
-
- // custom plot lines and bands
- if (!axis._addedPlotLB) { // only first time
- each((options.plotLines || []).concat(options.plotBands || []), function (plotLineOptions) {
- //plotLinesAndBands.push(new PlotLineOrBand(plotLineOptions).render());
- axis.addPlotBandOrLine(plotLineOptions);
- });
- axis._addedPlotLB = true;
- }
-
- } // end if hasData
-
- // remove inactive ticks
- each([ticks, minorTicks, alternateBands], function (coll) {
- var pos;
- for (pos in coll) {
- if (!coll[pos].isActive) {
- coll[pos].destroy();
- delete coll[pos];
- } else {
- coll[pos].isActive = false; // reset
- }
- }
- });
-
- // Static items. As the axis group is cleared on subsequent calls
- // to render, these items are added outside the group.
- // axis line
- if (lineWidth) {
- linePath = axis.getLinePath(lineWidth);
- if (!axis.axisLine) {
- axis.axisLine = renderer.path(linePath)
- .attr({
- stroke: options.lineColor,
- 'stroke-width': lineWidth,
- zIndex: 7
- })
- .add();
- } else {
- axis.axisLine.animate({ d: linePath });
- }
-
- // show or hide the line depending on options.showEmpty
- axis.axisLine[showAxis ? 'show' : 'hide']();
-
- }
-
- if (axisTitle && showAxis) {
-
- axisTitle[axisTitle.isNew ? 'attr' : 'animate'](
- axis.getTitlePosition()
- );
- axisTitle.isNew = false;
- }
-
- // Stacked totals:
- if (stackLabelOptions && stackLabelOptions.enabled) {
- var stackKey, oneStack, stackCategory,
- stackTotalGroup = axis.stackTotalGroup;
-
- // Create a separate group for the stack total labels
- if (!stackTotalGroup) {
- axis.stackTotalGroup = stackTotalGroup =
- renderer.g('stack-labels')
- .attr({
- visibility: VISIBLE,
- zIndex: 6
- })
- .add();
- }
-
- // plotLeft/Top will change when y axis gets wider so we need to translate the
- // stackTotalGroup at every render call. See bug #506 and #516
- stackTotalGroup.translate(chart.plotLeft, chart.plotTop);
-
- // Render each stack total
- for (stackKey in stacks) {
- oneStack = stacks[stackKey];
- for (stackCategory in oneStack) {
- oneStack[stackCategory].render(stackTotalGroup);
- }
- }
- }
- // End stacked totals
-
- axis.isDirty = false;
- },
-
- /**
- * Remove a plot band or plot line from the chart by id
- * @param {Object} id
- */
- removePlotBandOrLine: function (id) {
- var plotLinesAndBands = this.plotLinesAndBands,
- i = plotLinesAndBands.length;
- while (i--) {
- if (plotLinesAndBands[i].id === id) {
- plotLinesAndBands[i].destroy();
- }
- }
- },
-
- /**
- * Update the axis title by options
- */
- setTitle: function (newTitleOptions, redraw) {
- var axis = this,
- chart = axis.chart,
- options = axis.options,
- axisTitle;
-
- options.title = merge(options.title, newTitleOptions);
-
- axis.axisTitle = axisTitle && axisTitle.destroy(); // #922
- axis.isDirty = true;
-
- if (pick(redraw, true)) {
- chart.redraw();
- }
- },
-
- /**
- * Redraw the axis to reflect changes in the data or axis extremes
- */
- redraw: function () {
- var axis = this,
- chart = axis.chart;
-
- // hide tooltip and hover states
- if (chart.tracker.resetTracker) {
- chart.tracker.resetTracker(true);
- }
-
- // render the axis
- axis.render();
-
- // move plot lines and bands
- each(axis.plotLinesAndBands, function (plotLine) {
- plotLine.render();
- });
-
- // mark associated series as dirty and ready for redraw
- each(axis.series, function (series) {
- series.isDirty = true;
- });
-
- },
-
- /**
- * Set new axis categories and optionally redraw
- * @param {Array} newCategories
- * @param {Boolean} doRedraw
- */
- setCategories: function (newCategories, doRedraw) {
- var axis = this,
- chart = axis.chart;
-
- // set the categories
- axis.categories = axis.userOptions.categories = newCategories;
-
- // force reindexing tooltips
- each(axis.series, function (series) {
- series.translate();
- series.setTooltipPoints(true);
- });
-
-
- // optionally redraw
- axis.isDirty = true;
-
- if (pick(doRedraw, true)) {
- chart.redraw();
- }
- },
-
- /**
- * Destroys an Axis instance.
- */
- destroy: function () {
- var axis = this,
- stacks = axis.stacks,
- stackKey;
-
- // Remove the events
- removeEvent(axis);
-
- // Destroy each stack total
- for (stackKey in stacks) {
- destroyObjectProperties(stacks[stackKey]);
-
- stacks[stackKey] = null;
- }
-
- // Destroy collections
- each([axis.ticks, axis.minorTicks, axis.alternateBands, axis.plotLinesAndBands], function (coll) {
- destroyObjectProperties(coll);
- });
-
- // Destroy local variables
- each(['stackTotalGroup', 'axisLine', 'axisGroup', 'gridGroup', 'axisTitle'], function (prop) {
- if (axis[prop]) {
- axis[prop] = axis[prop].destroy();
- }
- });
- }
-
-
- }; // end Axis
-
- /**
- * The tooltip object
- * @param {Object} chart The chart instance
- * @param {Object} options Tooltip options
- */
- function Tooltip(chart, options) {
- var borderWidth = options.borderWidth,
- style = options.style,
- shared = options.shared,
- padding = pInt(style.padding);
-
- // Save the chart and options
- this.chart = chart;
- this.options = options;
-
- // remove padding CSS and apply padding on box instead
- style.padding = 0;
-
- // Keep track of the current series
- //this.currentSeries = UNDEFINED;
-
- // List of crosshairs
- this.crosshairs = [];
-
- // Current values of x and y when animating
- this.currentX = 0;
- this.currentY = 0;
-
- // The tooltipTick function, initialized to nothing
- //this.tooltipTick = UNDEFINED;
-
- // The tooltip is initially hidden
- this.tooltipIsHidden = true;
-
- // create the label
- this.label = chart.renderer.label('', 0, 0, null, null, null, options.useHTML, null, 'tooltip')
- .attr({
- padding: padding,
- fill: options.backgroundColor,
- 'stroke-width': borderWidth,
- r: options.borderRadius,
- zIndex: 8
- })
- .css(style)
- .hide()
- .add();
-
- // When using canVG the shadow shows up as a gray circle
- // even if the tooltip is hidden.
- if (!useCanVG) {
- this.label.shadow(options.shadow);
- }
-
- // Public property for getting the shared state.
- this.shared = shared;
- }
-
- Tooltip.prototype = {
- /**
- * Destroy the tooltip and its elements.
- */
- destroy: function () {
- each(this.crosshairs, function (crosshair) {
- if (crosshair) {
- crosshair.destroy();
- }
- });
-
- // Destroy and clear local variables
- if (this.label) {
- this.label = this.label.destroy();
- }
- },
-
- /**
- * Provide a soft movement for the tooltip
- *
- * @param {Number} finalX
- * @param {Number} finalY
- * @private
- */
- move: function (finalX, finalY) {
- var tooltip = this;
-
- // get intermediate values for animation
- tooltip.currentX = tooltip.tooltipIsHidden ? finalX : (2 * tooltip.currentX + finalX) / 3;
- tooltip.currentY = tooltip.tooltipIsHidden ? finalY : (tooltip.currentY + finalY) / 2;
-
- // move to the intermediate value
- tooltip.label.attr({ x: tooltip.currentX, y: tooltip.currentY });
-
- // run on next tick of the mouse tracker
- if (mathAbs(finalX - tooltip.currentX) > 1 || mathAbs(finalY - tooltip.currentY) > 1) {
- tooltip.tooltipTick = function () {
- tooltip.move(finalX, finalY);
- };
- } else {
- tooltip.tooltipTick = null;
- }
- },
-
- /**
- * Hide the tooltip
- */
- hide: function () {
- if (!this.tooltipIsHidden) {
- var hoverPoints = this.chart.hoverPoints;
-
- this.label.hide();
-
- // hide previous hoverPoints and set new
- if (hoverPoints) {
- each(hoverPoints, function (point) {
- point.setState();
- });
- }
-
- this.chart.hoverPoints = null;
- this.tooltipIsHidden = true;
- }
- },
-
- /**
- * Hide the crosshairs
- */
- hideCrosshairs: function () {
- each(this.crosshairs, function (crosshair) {
- if (crosshair) {
- crosshair.hide();
- }
- });
- },
-
- /**
- * Extendable method to get the anchor position of the tooltip
- * from a point or set of points
- */
- getAnchor: function (points, mouseEvent) {
- var ret,
- chart = this.chart,
- inverted = chart.inverted,
- plotX = 0,
- plotY = 0;
-
- points = splat(points);
-
- // Pie uses a special tooltipPos
- ret = points[0].tooltipPos;
-
- // When shared, use the average position
- if (!ret) {
- each(points, function (point) {
- plotX += point.plotX;
- plotY += point.plotLow ? (point.plotLow + point.plotHigh) / 2 : point.plotY;
- });
-
- plotX /= points.length;
- plotY /= points.length;
-
- ret = [
- inverted ? chart.plotWidth - plotY : plotX,
- this.shared && !inverted && points.length > 1 && mouseEvent ?
- mouseEvent.chartY - chart.plotTop : // place shared tooltip next to the mouse (#424)
- inverted ? chart.plotHeight - plotX : plotY
- ];
- }
-
- return map(ret, mathRound);
- },
-
- /**
- * Place the tooltip in a chart without spilling over
- * and not covering the point it self.
- */
- getPosition: function (boxWidth, boxHeight, point) {
-
- // Set up the variables
- var chart = this.chart,
- plotLeft = chart.plotLeft,
- plotTop = chart.plotTop,
- plotWidth = chart.plotWidth,
- plotHeight = chart.plotHeight,
- distance = pick(this.options.distance, 12),
- pointX = point.plotX,
- pointY = point.plotY,
- x = pointX + plotLeft + (chart.inverted ? distance : -boxWidth - distance),
- y = pointY - boxHeight + plotTop + 15, // 15 means the point is 15 pixels up from the bottom of the tooltip
- alignedRight;
-
- // It is too far to the left, adjust it
- if (x < 7) {
- x = plotLeft + pointX + distance;
- }
-
- // Test to see if the tooltip is too far to the right,
- // if it is, move it back to be inside and then up to not cover the point.
- if ((x + boxWidth) > (plotLeft + plotWidth)) {
- x -= (x + boxWidth) - (plotLeft + plotWidth);
- y = pointY - boxHeight + plotTop - distance;
- alignedRight = true;
- }
-
- // If it is now above the plot area, align it to the top of the plot area
- if (y < plotTop + 5) {
- y = plotTop + 5;
-
- // If the tooltip is still covering the point, move it below instead
- if (alignedRight && pointY >= y && pointY <= (y + boxHeight)) {
- y = pointY + plotTop + distance; // below
- }
- }
-
- // Now if the tooltip is below the chart, move it up. It's better to cover the
- // point than to disappear outside the chart. #834.
- if (y + boxHeight > plotTop + plotHeight) {
- y = mathMax(plotTop, plotTop + plotHeight - boxHeight - distance); // below
- }
-
-
- return {x: x, y: y};
- },
-
- /**
- * Refresh the tooltip's text and position.
- * @param {Object} point
- */
- refresh: function (point, mouseEvent) {
- var tooltip = this,
- chart = tooltip.chart,
- label = tooltip.label,
- options = tooltip.options;
-
- /**
- * In case no user defined formatter is given, this will be used
- */
- function defaultFormatter() {
- var pThis = this,
- items = pThis.points || splat(pThis),
- series = items[0].series,
- s;
-
- // build the header
- s = [series.tooltipHeaderFormatter(items[0].key)];
-
- // build the values
- each(items, function (item) {
- series = item.series;
- s.push((series.tooltipFormatter && series.tooltipFormatter(item)) ||
- item.point.tooltipFormatter(series.tooltipOptions.pointFormat));
- });
-
- // footer
- s.push(options.footerFormat || '');
-
- return s.join('');
- }
-
- var x,
- y,
- show,
- anchor,
- textConfig = {},
- text,
- pointConfig = [],
- formatter = options.formatter || defaultFormatter,
- hoverPoints = chart.hoverPoints,
- placedTooltipPoint,
- borderColor,
- crosshairsOptions = options.crosshairs,
- shared = tooltip.shared,
- currentSeries;
-
- // get the reference point coordinates (pie charts use tooltipPos)
- anchor = tooltip.getAnchor(point, mouseEvent);
- x = anchor[0];
- y = anchor[1];
-
- // shared tooltip, array is sent over
- if (shared && !(point.series && point.series.noSharedTooltip)) {
-
- // hide previous hoverPoints and set new
- if (hoverPoints) {
- each(hoverPoints, function (point) {
- point.setState();
- });
- }
- chart.hoverPoints = point;
-
- each(point, function (item) {
- item.setState(HOVER_STATE);
-
- pointConfig.push(item.getLabelConfig());
- });
-
- textConfig = {
- x: point[0].category,
- y: point[0].y
- };
- textConfig.points = pointConfig;
- point = point[0];
-
- // single point tooltip
- } else {
- textConfig = point.getLabelConfig();
- }
- text = formatter.call(textConfig);
-
- // register the current series
- currentSeries = point.series;
-
-
- // For line type series, hide tooltip if the point falls outside the plot
- show = shared || !currentSeries.isCartesian || currentSeries.tooltipOutsidePlot || chart.isInsidePlot(x, y);
-
- // update the inner HTML
- if (text === false || !show) {
- this.hide();
- } else {
-
- // show it
- if (tooltip.tooltipIsHidden) {
- label.show();
- }
-
- // update text
- label.attr({
- text: text
- });
-
- // set the stroke color of the box
- borderColor = options.borderColor || point.color || currentSeries.color || '#606060';
- label.attr({
- stroke: borderColor
- });
-
- placedTooltipPoint = (options.positioner || tooltip.getPosition).call(
- tooltip,
- label.width,
- label.height,
- { plotX: x, plotY: y }
- );
-
- // do the move
- tooltip.move(mathRound(placedTooltipPoint.x), mathRound(placedTooltipPoint.y));
-
-
- tooltip.tooltipIsHidden = false;
- }
-
- // crosshairs
- if (crosshairsOptions) {
- crosshairsOptions = splat(crosshairsOptions); // [x, y]
-
- var path,
- i = crosshairsOptions.length,
- attribs,
- axis;
-
- while (i--) {
- axis = point.series[i ? 'yAxis' : 'xAxis'];
- if (crosshairsOptions[i] && axis) {
-
- path = axis.getPlotLinePath(
- i ? pick(point.stackY, point.y) : point.x, // #814
- 1
- );
-
- if (tooltip.crosshairs[i]) {
- tooltip.crosshairs[i].attr({ d: path, visibility: VISIBLE });
- } else {
- attribs = {
- 'stroke-width': crosshairsOptions[i].width || 1,
- stroke: crosshairsOptions[i].color || '#C0C0C0',
- zIndex: crosshairsOptions[i].zIndex || 2
- };
- if (crosshairsOptions[i].dashStyle) {
- attribs.dashstyle = crosshairsOptions[i].dashStyle;
- }
- tooltip.crosshairs[i] = chart.renderer.path(path)
- .attr(attribs)
- .add();
- }
- }
- }
- }
- fireEvent(chart, 'tooltipRefresh', {
- text: text,
- x: x + chart.plotLeft,
- y: y + chart.plotTop,
- borderColor: borderColor
- });
- },
-
- /**
- * Runs the tooltip animation one tick.
- */
- tick: function () {
- if (this.tooltipTick) {
- this.tooltipTick();
- }
- }
- };
- /**
- * The mouse tracker object
- * @param {Object} chart The Chart instance
- * @param {Object} options The root options object
- */
- function MouseTracker(chart, options) {
- var zoomType = useCanVG ? '' : options.chart.zoomType;
-
- // Zoom status
- this.zoomX = /x/.test(zoomType);
- this.zoomY = /y/.test(zoomType);
-
- // Store reference to options
- this.options = options;
-
- // Reference to the chart
- this.chart = chart;
-
- // The interval id
- //this.tooltipInterval = UNDEFINED;
-
- // The cached x hover position
- //this.hoverX = UNDEFINED;
-
- // The chart position
- //this.chartPosition = UNDEFINED;
-
- // The selection marker element
- //this.selectionMarker = UNDEFINED;
-
- // False or a value > 0 if a dragging operation
- //this.mouseDownX = UNDEFINED;
- //this.mouseDownY = UNDEFINED;
- this.init(chart, options.tooltip);
- }
-
- MouseTracker.prototype = {
- /**
- * Add crossbrowser support for chartX and chartY
- * @param {Object} e The event object in standard browsers
- */
- normalizeMouseEvent: function (e) {
- var chartPosition,
- chartX,
- chartY,
- ePos;
-
- // common IE normalizing
- e = e || win.event;
- if (!e.target) {
- e.target = e.srcElement;
- }
-
- // jQuery only copies over some properties. IE needs e.x and iOS needs touches.
- if (e.originalEvent) {
- e = e.originalEvent;
- }
-
- // The same for MooTools. It renames e.pageX to e.page.x. #445.
- if (e.event) {
- e = e.event;
- }
-
- // iOS
- ePos = e.touches ? e.touches.item(0) : e;
-
- // get mouse position
- this.chartPosition = chartPosition = offset(this.chart.container);
-
- // chartX and chartY
- if (ePos.pageX === UNDEFINED) { // IE < 9. #886.
- chartX = e.x;
- chartY = e.y;
- } else {
- chartX = ePos.pageX - chartPosition.left;
- chartY = ePos.pageY - chartPosition.top;
- }
-
- return extend(e, {
- chartX: mathRound(chartX),
- chartY: mathRound(chartY)
-
- });
- },
-
- /**
- * Get the click position in terms of axis values.
- *
- * @param {Object} e A mouse event
- */
- getMouseCoordinates: function (e) {
- var coordinates = {
- xAxis: [],
- yAxis: []
- },
- chart = this.chart;
-
- each(chart.axes, function (axis) {
- var isXAxis = axis.isXAxis,
- isHorizontal = chart.inverted ? !isXAxis : isXAxis;
-
- coordinates[isXAxis ? 'xAxis' : 'yAxis'].push({
- axis: axis,
- value: axis.translate(
- isHorizontal ?
- e.chartX - chart.plotLeft :
- chart.plotHeight - e.chartY + chart.plotTop,
- true
- )
- });
- });
- return coordinates;
- },
-
- /**
- * With line type charts with a single tracker, get the point closest to the mouse
- */
- onmousemove: function (e) {
- var mouseTracker = this,
- chart = mouseTracker.chart,
- series = chart.series,
- point,
- points,
- hoverPoint = chart.hoverPoint,
- hoverSeries = chart.hoverSeries,
- i,
- j,
- distance = chart.chartWidth,
- // the index in the tooltipPoints array, corresponding to pixel position in plot area
- index = chart.inverted ? chart.plotHeight + chart.plotTop - e.chartY : e.chartX - chart.plotLeft;
-
- // shared tooltip
- if (chart.tooltip && mouseTracker.options.tooltip.shared && !(hoverSeries && hoverSeries.noSharedTooltip)) {
- points = [];
-
- // loop over all series and find the ones with points closest to the mouse
- i = series.length;
- for (j = 0; j < i; j++) {
- if (series[j].visible &&
- series[j].options.enableMouseTracking !== false && !series[j].noSharedTooltip && series[j].tooltipPoints.length) {
- point = series[j].tooltipPoints[index];
- point._dist = mathAbs(index - point.plotX);
- distance = mathMin(distance, point._dist);
- points.push(point);
- }
- }
- // remove furthest points
- i = points.length;
- while (i--) {
- if (points[i]._dist > distance) {
- points.splice(i, 1);
- }
- }
- // refresh the tooltip if necessary
- if (points.length && (points[0].plotX !== mouseTracker.hoverX)) {
- chart.tooltip.refresh(points, e);
- mouseTracker.hoverX = points[0].plotX;
- }
- }
-
- // separate tooltip and general mouse events
- if (hoverSeries && hoverSeries.tracker) { // only use for line-type series with common tracker
-
- // get the point
- point = hoverSeries.tooltipPoints[index];
-
- // a new point is hovered, refresh the tooltip
- if (point && point !== hoverPoint) {
-
- // trigger the events
- point.onMouseOver();
-
- }
- }
- },
-
-
- /**
- * Reset the tracking by hiding the tooltip, the hover series state and the hover point
- */
- resetTracker: function (allowMove) {
- var mouseTracker = this,
- chart = mouseTracker.chart,
- hoverSeries = chart.hoverSeries,
- hoverPoint = chart.hoverPoint,
- tooltipPoints = chart.hoverPoints || hoverPoint,
- tooltip = chart.tooltip;
-
- // Narrow in allowMove
- allowMove = allowMove && tooltip && tooltipPoints;
-
- // Check if the points have moved outside the plot area, #1003
- if (allowMove && splat(tooltipPoints)[0].plotX === UNDEFINED) {
- allowMove = false;
- }
-
- // Just move the tooltip, #349
- if (allowMove) {
- tooltip.refresh(tooltipPoints);
-
- // Full reset
- } else {
-
- if (hoverPoint) {
- hoverPoint.onMouseOut();
- }
-
- if (hoverSeries) {
- hoverSeries.onMouseOut();
- }
-
- if (tooltip) {
- tooltip.hide();
- tooltip.hideCrosshairs();
- }
-
- mouseTracker.hoverX = null;
-
- }
- },
-
- /**
- * Set the JS events on the container element
- */
- setDOMEvents: function () {
- var lastWasOutsidePlot = true,
- mouseTracker = this,
- chart = mouseTracker.chart,
- container = chart.container,
- hasDragged,
- zoomHor = (mouseTracker.zoomX && !chart.inverted) || (mouseTracker.zoomY && chart.inverted),
- zoomVert = (mouseTracker.zoomY && !chart.inverted) || (mouseTracker.zoomX && chart.inverted);
-
- /**
- * Mouse up or outside the plot area
- */
- function drop() {
- if (mouseTracker.selectionMarker) {
- var selectionData = {
- xAxis: [],
- yAxis: []
- },
- selectionBox = mouseTracker.selectionMarker.getBBox(),
- selectionLeft = selectionBox.x - chart.plotLeft,
- selectionTop = selectionBox.y - chart.plotTop,
- runZoom;
-
- // a selection has been made
- if (hasDragged) {
-
- // record each axis' min and max
- each(chart.axes, function (axis) {
- if (axis.options.zoomEnabled !== false) {
- var isXAxis = axis.isXAxis,
- isHorizontal = chart.inverted ? !isXAxis : isXAxis,
- selectionMin = axis.translate(
- isHorizontal ?
- selectionLeft :
- chart.plotHeight - selectionTop - selectionBox.height,
- true,
- 0,
- 0,
- 1
- ),
- selectionMax = axis.translate(
- isHorizontal ?
- selectionLeft + selectionBox.width :
- chart.plotHeight - selectionTop,
- true,
- 0,
- 0,
- 1
- );
-
- if (!isNaN(selectionMin) && !isNaN(selectionMax)) { // #859
- selectionData[isXAxis ? 'xAxis' : 'yAxis'].push({
- axis: axis,
- min: mathMin(selectionMin, selectionMax), // for reversed axes,
- max: mathMax(selectionMin, selectionMax)
- });
- runZoom = true;
- }
- }
- });
- if (runZoom) {
- fireEvent(chart, 'selection', selectionData, function (args) {
- chart.zoom(args);
- });
- }
-
- }
- mouseTracker.selectionMarker = mouseTracker.selectionMarker.destroy();
- }
-
- if (chart) { // it may be destroyed on mouse up - #877
- css(container, { cursor: 'auto' });
- chart.cancelClick = hasDragged; // #370
- chart.mouseIsDown = hasDragged = false;
- }
-
- removeEvent(doc, hasTouch ? 'touchend' : 'mouseup', drop);
- }
-
- /**
- * Special handler for mouse move that will hide the tooltip when the mouse leaves the plotarea.
- */
- mouseTracker.hideTooltipOnMouseMove = function (e) {
-
- // Get e.pageX and e.pageY back in MooTools
- washMouseEvent(e);
-
- // If we're outside, hide the tooltip
- if (mouseTracker.chartPosition && chart.hoverSeries && chart.hoverSeries.isCartesian && !chart.isInsidePlot(e.pageX - mouseTracker.chartPosition.left - chart.plotLeft,
- e.pageY - mouseTracker.chartPosition.top - chart.plotTop)) {
- mouseTracker.resetTracker();
- }
- };
-
- /**
- * When mouse leaves the container, hide the tooltip.
- */
- mouseTracker.hideTooltipOnMouseLeave = function () {
- mouseTracker.resetTracker();
- mouseTracker.chartPosition = null; // also reset the chart position, used in #149 fix
- };
-
-
- /*
- * Record the starting position of a dragoperation
- */
- container.onmousedown = function (e) {
- e = mouseTracker.normalizeMouseEvent(e);
-
- // issue #295, dragging not always working in Firefox
- if (!hasTouch && e.preventDefault) {
- e.preventDefault();
- }
-
- // record the start position
- chart.mouseIsDown = true;
- chart.cancelClick = false;
- chart.mouseDownX = mouseTracker.mouseDownX = e.chartX;
- mouseTracker.mouseDownY = e.chartY;
-
- addEvent(doc, hasTouch ? 'touchend' : 'mouseup', drop);
- };
-
- // The mousemove, touchmove and touchstart event handler
- var mouseMove = function (e) {
- // let the system handle multitouch operations like two finger scroll
- // and pinching
- if (e && e.touches && e.touches.length > 1) {
- return;
- }
-
- // normalize
- e = mouseTracker.normalizeMouseEvent(e);
- if (!hasTouch) { // not for touch devices
- e.returnValue = false;
- }
-
- var chartX = e.chartX,
- chartY = e.chartY,
- isOutsidePlot = !chart.isInsidePlot(chartX - chart.plotLeft, chartY - chart.plotTop);
-
- // on touch devices, only trigger click if a handler is defined
- if (hasTouch && e.type === 'touchstart') {
- if (attr(e.target, 'isTracker')) {
- if (!chart.runTrackerClick) {
- e.preventDefault();
- }
- } else if (!chart.runChartClick && !isOutsidePlot) {
- e.preventDefault();
- }
- }
-
- // cancel on mouse outside
- if (isOutsidePlot) {
-
- /*if (!lastWasOutsidePlot) {
- // reset the tracker
- resetTracker();
- }*/
-
- // drop the selection if any and reset mouseIsDown and hasDragged
- //drop();
- if (chartX < chart.plotLeft) {
- chartX = chart.plotLeft;
- } else if (chartX > chart.plotLeft + chart.plotWidth) {
- chartX = chart.plotLeft + chart.plotWidth;
- }
-
- if (chartY < chart.plotTop) {
- chartY = chart.plotTop;
- } else if (chartY > chart.plotTop + chart.plotHeight) {
- chartY = chart.plotTop + chart.plotHeight;
- }
- }
-
- if (chart.mouseIsDown && e.type !== 'touchstart') { // make selection
-
- // determine if the mouse has moved more than 10px
- hasDragged = Math.sqrt(
- Math.pow(mouseTracker.mouseDownX - chartX, 2) +
- Math.pow(mouseTracker.mouseDownY - chartY, 2)
- );
- if (hasDragged > 10) {
- var clickedInside = chart.isInsidePlot(mouseTracker.mouseDownX - chart.plotLeft, mouseTracker.mouseDownY - chart.plotTop);
-
- // make a selection
- if (chart.hasCartesianSeries && (mouseTracker.zoomX || mouseTracker.zoomY) && clickedInside) {
- if (!mouseTracker.selectionMarker) {
- mouseTracker.selectionMarker = chart.renderer.rect(
- chart.plotLeft,
- chart.plotTop,
- zoomHor ? 1 : chart.plotWidth,
- zoomVert ? 1 : chart.plotHeight,
- 0
- )
- .attr({
- fill: mouseTracker.options.chart.selectionMarkerFill || 'rgba(69,114,167,0.25)',
- zIndex: 7
- })
- .add();
- }
- }
-
- // adjust the width of the selection marker
- if (mouseTracker.selectionMarker && zoomHor) {
- var xSize = chartX - mouseTracker.mouseDownX;
- mouseTracker.selectionMarker.attr({
- width: mathAbs(xSize),
- x: (xSize > 0 ? 0 : xSize) + mouseTracker.mouseDownX
- });
- }
- // adjust the height of the selection marker
- if (mouseTracker.selectionMarker && zoomVert) {
- var ySize = chartY - mouseTracker.mouseDownY;
- mouseTracker.selectionMarker.attr({
- height: mathAbs(ySize),
- y: (ySize > 0 ? 0 : ySize) + mouseTracker.mouseDownY
- });
- }
-
- // panning
- if (clickedInside && !mouseTracker.selectionMarker && mouseTracker.options.chart.panning) {
- chart.pan(chartX);
- }
- }
-
- } else if (!isOutsidePlot) {
- // show the tooltip
- mouseTracker.onmousemove(e);
- }
-
- lastWasOutsidePlot = isOutsidePlot;
-
- // when outside plot, allow touch-drag by returning true
- return isOutsidePlot || !chart.hasCartesianSeries;
- };
-
- /*
- * When the mouse enters the container, run mouseMove
- */
- container.onmousemove = mouseMove;
-
- /*
- * When the mouse leaves the container, hide the tracking (tooltip).
- */
- addEvent(container, 'mouseleave', mouseTracker.hideTooltipOnMouseLeave);
-
- // issue #149 workaround
- // The mouseleave event above does not always fire. Whenever the mouse is moving
- // outside the plotarea, hide the tooltip
- addEvent(doc, 'mousemove', mouseTracker.hideTooltipOnMouseMove);
-
- container.ontouchstart = function (e) {
- // For touch devices, use touchmove to zoom
- if (mouseTracker.zoomX || mouseTracker.zoomY) {
- container.onmousedown(e);
- }
- // Show tooltip and prevent the lower mouse pseudo event
- mouseMove(e);
- };
-
- /*
- * Allow dragging the finger over the chart to read the values on touch
- * devices
- */
- container.ontouchmove = mouseMove;
-
- /*
- * Allow dragging the finger over the chart to read the values on touch
- * devices
- */
- container.ontouchend = function () {
- if (hasDragged) {
- mouseTracker.resetTracker();
- }
- };
-
-
- // MooTools 1.2.3 doesn't fire this in IE when using addEvent
- container.onclick = function (e) {
- var hoverPoint = chart.hoverPoint,
- plotX,
- plotY;
- e = mouseTracker.normalizeMouseEvent(e);
-
- e.cancelBubble = true; // IE specific
-
-
- if (!chart.cancelClick) {
- // Detect clicks on trackers or tracker groups, #783
- if (hoverPoint && (attr(e.target, 'isTracker') || attr(e.target.parentNode, 'isTracker'))) {
- plotX = hoverPoint.plotX;
- plotY = hoverPoint.plotY;
-
- // add page position info
- extend(hoverPoint, {
- pageX: mouseTracker.chartPosition.left + chart.plotLeft +
- (chart.inverted ? chart.plotWidth - plotY : plotX),
- pageY: mouseTracker.chartPosition.top + chart.plotTop +
- (chart.inverted ? chart.plotHeight - plotX : plotY)
- });
-
- // the series click event
- fireEvent(hoverPoint.series, 'click', extend(e, {
- point: hoverPoint
- }));
-
- // the point click event
- hoverPoint.firePointEvent('click', e);
-
- } else {
- extend(e, mouseTracker.getMouseCoordinates(e));
-
- // fire a click event in the chart
- if (chart.isInsidePlot(e.chartX - chart.plotLeft, e.chartY - chart.plotTop)) {
- fireEvent(chart, 'click', e);
- }
- }
-
-
- }
- };
-
- },
-
- /**
- * Destroys the MouseTracker object and disconnects DOM events.
- */
- destroy: function () {
- var mouseTracker = this,
- chart = mouseTracker.chart,
- container = chart.container;
-
- // Destroy the tracker group element
- if (chart.trackerGroup) {
- chart.trackerGroup = chart.trackerGroup.destroy();
- }
-
- removeEvent(container, 'mouseleave', mouseTracker.hideTooltipOnMouseLeave);
- removeEvent(doc, 'mousemove', mouseTracker.hideTooltipOnMouseMove);
- container.onclick = container.onmousedown = container.onmousemove = container.ontouchstart = container.ontouchend = container.ontouchmove = null;
-
- // memory and CPU leak
- clearInterval(this.tooltipInterval);
- },
-
- // Run MouseTracker
- init: function (chart, options) {
- if (!chart.trackerGroup) {
- chart.trackerGroup = chart.renderer.g('tracker')
- .attr({ zIndex: 9 })
- .add();
- }
-
- if (options.enabled) {
- chart.tooltip = new Tooltip(chart, options);
-
- // set the fixed interval ticking for the smooth tooltip
- this.tooltipInterval = setInterval(function () {
- chart.tooltip.tick();
- }, 32);
- }
-
- this.setDOMEvents();
- }
- };
- /**
- * The overview of the chart's series
- */
- function Legend(chart) {
-
- this.init(chart);
- }
-
- Legend.prototype = {
-
- /**
- * Initialize the legend
- */
- init: function (chart) {
- var legend = this,
- options = legend.options = chart.options.legend;
-
- if (!options.enabled) {
- return;
- }
-
- var //style = options.style || {}, // deprecated
- itemStyle = options.itemStyle,
- padding = pick(options.padding, 8),
- itemMarginTop = options.itemMarginTop || 0;
-
- legend.baseline = pInt(itemStyle.fontSize) + 3 + itemMarginTop; // used in Series prototype
- legend.itemStyle = itemStyle;
- legend.itemHiddenStyle = merge(itemStyle, options.itemHiddenStyle);
- legend.itemMarginTop = itemMarginTop;
- legend.padding = padding;
- legend.initialItemX = padding;
- legend.initialItemY = padding - 5; // 5 is the number of pixels above the text
- legend.maxItemWidth = 0;
- legend.chart = chart;
- //legend.allItems = UNDEFINED;
- //legend.legendWidth = UNDEFINED;
- //legend.legendHeight = UNDEFINED;
- //legend.offsetWidth = UNDEFINED;
- legend.itemHeight = 0;
- legend.lastLineHeight = 0;
- //legend.itemX = UNDEFINED;
- //legend.itemY = UNDEFINED;
- //legend.lastItemY = UNDEFINED;
-
- // Elements
- //legend.group = UNDEFINED;
- //legend.box = UNDEFINED;
-
- // run legend
- legend.render();
-
- // move checkboxes
- addEvent(legend.chart, 'endResize', function () {
- legend.positionCheckboxes();
- });
-
- /* // expose
- return {
- colorizeItem: colorizeItem,
- destroyItem: destroyItem,
- render: render,
- destroy: destroy,
- getLegendWidth: getLegendWidth,
- getLegendHeight: getLegendHeight
- };*/
- },
-
- /**
- * Set the colors for the legend item
- * @param {Object} item A Series or Point instance
- * @param {Object} visible Dimmed or colored
- */
- colorizeItem: function (item, visible) {
- var legend = this,
- options = legend.options,
- legendItem = item.legendItem,
- legendLine = item.legendLine,
- legendSymbol = item.legendSymbol,
- hiddenColor = legend.itemHiddenStyle.color,
- textColor = visible ? options.itemStyle.color : hiddenColor,
- symbolColor = visible ? item.color : hiddenColor;
-
- if (legendItem) {
- legendItem.css({ fill: textColor });
- }
- if (legendLine) {
- legendLine.attr({ stroke: symbolColor });
- }
- if (legendSymbol) {
- legendSymbol.attr({
- stroke: symbolColor,
- fill: symbolColor
- });
- }
- },
-
- /**
- * Position the legend item
- * @param {Object} item A Series or Point instance
- */
- positionItem: function (item) {
- var legend = this,
- options = legend.options,
- symbolPadding = options.symbolPadding,
- ltr = !options.rtl,
- legendItemPos = item._legendItemPos,
- itemX = legendItemPos[0],
- itemY = legendItemPos[1],
- checkbox = item.checkbox;
-
- if (item.legendGroup) {
- item.legendGroup.translate(
- ltr ? itemX : legend.legendWidth - itemX - 2 * symbolPadding - 4,
- itemY
- );
- }
-
- if (checkbox) {
- checkbox.x = itemX;
- checkbox.y = itemY;
- }
- },
-
- /**
- * Destroy a single legend item
- * @param {Object} item The series or point
- */
- destroyItem: function (item) {
- var checkbox = item.checkbox;
-
- // destroy SVG elements
- each(['legendItem', 'legendLine', 'legendSymbol', 'legendGroup'], function (key) {
- if (item[key]) {
- item[key].destroy();
- }
- });
-
- if (checkbox) {
- discardElement(item.checkbox);
- }
- },
-
- /**
- * Destroys the legend.
- */
- destroy: function () {
- var legend = this,
- legendGroup = legend.group,
- box = legend.box;
-
- if (box) {
- legend.box = box.destroy();
- }
-
- if (legendGroup) {
- legend.group = legendGroup.destroy();
- }
- },
-
- /**
- * Position the checkboxes after the width is determined
- */
- positionCheckboxes: function () {
- var legend = this;
-
- each(legend.allItems, function (item) {
- var checkbox = item.checkbox,
- alignAttr = legend.group.alignAttr;
- if (checkbox) {
- css(checkbox, {
- left: (alignAttr.translateX + item.legendItemWidth + checkbox.x - 20) + PX,
- top: (alignAttr.translateY + checkbox.y + 3) + PX
- });
- }
- });
- },
-
- /**
- * Render a single specific legend item
- * @param {Object} item A series or point
- */
- renderItem: function (item) {
- var legend = this,
- chart = legend.chart,
- renderer = chart.renderer,
- options = legend.options,
- horizontal = options.layout === 'horizontal',
- symbolWidth = options.symbolWidth,
- symbolPadding = options.symbolPadding,
- itemStyle = legend.itemStyle,
- itemHiddenStyle = legend.itemHiddenStyle,
- padding = legend.padding,
- ltr = !options.rtl,
- itemHeight,
- widthOption = options.width,
- itemMarginBottom = options.itemMarginBottom || 0,
- itemMarginTop = legend.itemMarginTop,
- initialItemX = legend.initialItemX,
- bBox,
- itemWidth,
- li = item.legendItem,
- series = item.series || item,
- itemOptions = series.options,
- showCheckbox = itemOptions.showCheckbox;
-
- if (!li) { // generate it once, later move it
-
- // Generate the group box
- // A group to hold the symbol and text. Text is to be appended in Legend class.
- item.legendGroup = renderer.g('legend-item')
- .attr({ zIndex: 1 })
- .add(legend.scrollGroup);
-
- // Draw the legend symbol inside the group box
- series.drawLegendSymbol(legend, item);
-
- // Generate the list item text and add it to the group
- item.legendItem = li = renderer.text(
- options.labelFormatter.call(item),
- ltr ? symbolWidth + symbolPadding : -symbolPadding,
- legend.baseline,
- options.useHTML
- )
- .css(merge(item.visible ? itemStyle : itemHiddenStyle)) // merge to prevent modifying original (#1021)
- .attr({
- align: ltr ? 'left' : 'right',
- zIndex: 2
- })
- .add(item.legendGroup);
-
- // Set the events on the item group
- item.legendGroup.on('mouseover', function () {
- item.setState(HOVER_STATE);
- li.css(legend.options.itemHoverStyle);
- })
- .on('mouseout', function () {
- li.css(item.visible ? itemStyle : itemHiddenStyle);
- item.setState();
- })
- .on('click', function (event) {
- var strLegendItemClick = 'legendItemClick',
- fnLegendItemClick = function () {
- item.setVisible();
- };
-
- // Pass over the click/touch event. #4.
- event = {
- browserEvent: event
- };
-
- // click the name or symbol
- if (item.firePointEvent) { // point
- item.firePointEvent(strLegendItemClick, event, fnLegendItemClick);
- } else {
- fireEvent(item, strLegendItemClick, event, fnLegendItemClick);
- }
- });
-
- // Colorize the items
- legend.colorizeItem(item, item.visible);
-
- // add the HTML checkbox on top
- if (itemOptions && showCheckbox) {
- item.checkbox = createElement('input', {
- type: 'checkbox',
- checked: item.selected,
- defaultChecked: item.selected // required by IE7
- }, options.itemCheckboxStyle, chart.container);
-
- addEvent(item.checkbox, 'click', function (event) {
- var target = event.target;
- fireEvent(item, 'checkboxClick', {
- checked: target.checked
- },
- function () {
- item.select();
- }
- );
- });
- }
- }
-
- // calculate the positions for the next line
- bBox = li.getBBox();
-
- itemWidth = item.legendItemWidth =
- options.itemWidth || symbolWidth + symbolPadding + bBox.width + padding +
- (showCheckbox ? 20 : 0);
- legend.itemHeight = itemHeight = bBox.height;
-
- // if the item exceeds the width, start a new line
- if (horizontal && legend.itemX - initialItemX + itemWidth >
- (widthOption || (chart.chartWidth - 2 * padding - initialItemX))) {
- legend.itemX = initialItemX;
- legend.itemY += itemMarginTop + legend.lastLineHeight + itemMarginBottom;
- legend.lastLineHeight = 0; // reset for next line
- }
-
- // If the item exceeds the height, start a new column
- /*if (!horizontal && legend.itemY + options.y + itemHeight > chart.chartHeight - spacingTop - spacingBottom) {
- legend.itemY = legend.initialItemY;
- legend.itemX += legend.maxItemWidth;
- legend.maxItemWidth = 0;
- }*/
-
- // Set the edge positions
- legend.maxItemWidth = mathMax(legend.maxItemWidth, itemWidth);
- legend.lastItemY = itemMarginTop + legend.itemY + itemMarginBottom;
- legend.lastLineHeight = mathMax(itemHeight, legend.lastLineHeight); // #915
-
- // cache the position of the newly generated or reordered items
- item._legendItemPos = [legend.itemX, legend.itemY];
-
- // advance
- if (horizontal) {
- legend.itemX += itemWidth;
-
- } else {
- legend.itemY += itemMarginTop + itemHeight + itemMarginBottom;
- legend.lastLineHeight = itemHeight;
- }
-
- // the width of the widest item
- legend.offsetWidth = widthOption || mathMax(
- horizontal ? legend.itemX - initialItemX : itemWidth,
- legend.offsetWidth
- );
- },
-
- /**
- * Render the legend. This method can be called both before and after
- * chart.render. If called after, it will only rearrange items instead
- * of creating new ones.
- */
- render: function () {
- var legend = this,
- chart = legend.chart,
- renderer = chart.renderer,
- legendGroup = legend.group,
- allItems,
- display,
- legendWidth,
- legendHeight,
- box = legend.box,
- options = legend.options,
- padding = legend.padding,
- legendBorderWidth = options.borderWidth,
- legendBackgroundColor = options.backgroundColor;
-
- legend.itemX = legend.initialItemX;
- legend.itemY = legend.initialItemY;
- legend.offsetWidth = 0;
- legend.lastItemY = 0;
-
- if (!legendGroup) {
- legend.group = legendGroup = renderer.g('legend')
- // #414, #759. Trackers will be drawn above the legend, but we have
- // to sacrifice that because tooltips need to be above the legend
- // and trackers above tooltips
- .attr({ zIndex: 7 })
- .add();
- legend.contentGroup = renderer.g()
- .attr({ zIndex: 1 }) // above background
- .add(legendGroup);
- legend.scrollGroup = renderer.g()
- .add(legend.contentGroup);
- legend.clipRect = renderer.clipRect(0, 0, 9999, chart.chartHeight);
- legend.contentGroup.clip(legend.clipRect);
- }
-
- // add each series or point
- allItems = [];
- each(chart.series, function (serie) {
- var seriesOptions = serie.options;
-
- if (!seriesOptions.showInLegend) {
- return;
- }
-
- // use points or series for the legend item depending on legendType
- allItems = allItems.concat(
- serie.legendItems ||
- (seriesOptions.legendType === 'point' ?
- serie.data :
- serie)
- );
- });
-
- // sort by legendIndex
- stableSort(allItems, function (a, b) {
- return (a.options.legendIndex || 0) - (b.options.legendIndex || 0);
- });
-
- // reversed legend
- if (options.reversed) {
- allItems.reverse();
- }
-
- legend.allItems = allItems;
- legend.display = display = !!allItems.length;
-
- // render the items
- each(allItems, function (item) {
- legend.renderItem(item);
- });
-
- // Draw the border
- legendWidth = options.width || legend.offsetWidth;
- legendHeight = legend.lastItemY + legend.lastLineHeight;
-
-
- legendHeight = legend.handleOverflow(legendHeight);
-
- if (legendBorderWidth || legendBackgroundColor) {
- legendWidth += padding;
- legendHeight += padding;
-
- if (!box) {
- legend.box = box = renderer.rect(
- 0,
- 0,
- legendWidth,
- legendHeight,
- options.borderRadius,
- legendBorderWidth || 0
- ).attr({
- stroke: options.borderColor,
- 'stroke-width': legendBorderWidth || 0,
- fill: legendBackgroundColor || NONE
- })
- .add(legendGroup)
- .shadow(options.shadow);
- box.isNew = true;
-
- } else if (legendWidth > 0 && legendHeight > 0) {
- box[box.isNew ? 'attr' : 'animate'](
- box.crisp(null, null, null, legendWidth, legendHeight)
- );
- box.isNew = false;
- }
-
- // hide the border if no items
- box[display ? 'show' : 'hide']();
- }
-
- legend.legendWidth = legendWidth;
- legend.legendHeight = legendHeight;
-
- // Now that the legend width and height are established, put the items in the
- // final position
- each(allItems, function (item) {
- legend.positionItem(item);
- });
-
- // 1.x compatibility: positioning based on style
- /*var props = ['left', 'right', 'top', 'bottom'],
- prop,
- i = 4;
- while (i--) {
- prop = props[i];
- if (options.style[prop] && options.style[prop] !== 'auto') {
- options[i < 2 ? 'align' : 'verticalAlign'] = prop;
- options[i < 2 ? 'x' : 'y'] = pInt(options.style[prop]) * (i % 2 ? -1 : 1);
- }
- }*/
-
- if (display) {
- legendGroup.align(extend({
- width: legendWidth,
- height: legendHeight
- }, options), true, chart.spacingBox);
- }
-
- if (!chart.isResizing) {
- this.positionCheckboxes();
- }
- },
-
- /**
- * Set up the overflow handling by adding navigation with up and down arrows below the
- * legend.
- */
- handleOverflow: function (legendHeight) {
- var legend = this,
- chart = this.chart,
- renderer = chart.renderer,
- pageCount,
- options = this.options,
- optionsY = options.y,
- alignTop = options.verticalAlign === 'top',
- spaceHeight = chart.spacingBox.height + (alignTop ? -optionsY : optionsY) - this.padding,
- maxHeight = options.maxHeight, // docs
- clipHeight,
- clipRect = this.clipRect,
- navOptions = options.navigation,
- animation = pick(navOptions.animation, true),
- arrowSize = navOptions.arrowSize || 12,
- nav = this.nav;
-
- // Adjust the height
- if (options.layout === 'horizontal') {
- spaceHeight /= 2;
- }
- if (maxHeight) {
- spaceHeight = mathMin(spaceHeight, maxHeight);
- }
-
- // Reset the legend height and adjust the clipping rectangle
- if (legendHeight > spaceHeight) {
-
- this.clipHeight = clipHeight = spaceHeight - 20;
- this.pageCount = pageCount = mathCeil(legendHeight / clipHeight);
- this.currentPage = pick(this.currentPage, 1);
- this.fullHeight = legendHeight;
-
- clipRect.attr({
- height: clipHeight
- });
-
- // Add navigation elements
- if (!nav) {
- this.nav = nav = renderer.g().attr({ zIndex: 1 }).add(this.group);
- this.up = renderer.symbol('triangle', 0, 0, arrowSize, arrowSize)
- .on('click', function () {
- legend.scroll(-1, animation);
- })
- .add(nav);
- this.pager = renderer.text('', 15, 10)
- .css(navOptions.style)
- .add(nav);
- this.down = renderer.symbol('triangle-down', 0, 0, arrowSize, arrowSize)
- .on('click', function () {
- legend.scroll(1, animation);
- })
- .add(nav);
- }
-
- // Set initial position
- legend.scroll(0);
-
- legendHeight = spaceHeight;
-
- } else if (nav) {
- clipRect.attr({
- height: chart.chartHeight
- });
- nav.hide();
- this.scrollGroup.attr({
- translateY: 1
- });
- }
-
- return legendHeight;
- },
-
- /**
- * Scroll the legend by a number of pages
- * @param {Object} scrollBy
- * @param {Object} animation
- */
- scroll: function (scrollBy, animation) {
- var pageCount = this.pageCount,
- currentPage = this.currentPage + scrollBy,
- clipHeight = this.clipHeight,
- navOptions = this.options.navigation,
- activeColor = navOptions.activeColor,
- inactiveColor = navOptions.inactiveColor,
- pager = this.pager,
- padding = this.padding;
-
- // When resizing while looking at the last page
- if (currentPage > pageCount) {
- currentPage = pageCount;
- }
-
- if (currentPage > 0) {
-
- if (animation !== UNDEFINED) {
- setAnimation(animation, this.chart);
- }
-
- this.nav.attr({
- translateX: padding,
- translateY: clipHeight + 7,
- visibility: VISIBLE
- });
- this.up.attr({
- fill: currentPage === 1 ? inactiveColor : activeColor
- })
- .css({
- cursor: currentPage === 1 ? 'default' : 'pointer'
- });
- pager.attr({
- text: currentPage + '/' + this.pageCount
- });
- this.down.attr({
- x: 18 + this.pager.getBBox().width, // adjust to text width
- fill: currentPage === pageCount ? inactiveColor : activeColor
- })
- .css({
- cursor: currentPage === pageCount ? 'default' : 'pointer'
- });
-
- this.scrollGroup.animate({
- translateY: -mathMin(clipHeight * (currentPage - 1), this.fullHeight - clipHeight + padding) + 1
- });
- pager.attr({
- text: currentPage + '/' + pageCount
- });
-
-
- this.currentPage = currentPage;
- }
-
- }
-
- };
-
-
- /**
- * The chart class
- * @param {Object} options
- * @param {Function} callback Function to run when the chart has loaded
- */
- function Chart(userOptions, callback) {
- // Handle regular options
- var options,
- seriesOptions = userOptions.series; // skip merging data points to increase performance
- userOptions.series = null;
- options = merge(defaultOptions, userOptions); // do the merge
- options.series = userOptions.series = seriesOptions; // set back the series data
-
- var optionsChart = options.chart,
- optionsMargin = optionsChart.margin,
- margin = isObject(optionsMargin) ?
- optionsMargin :
- [optionsMargin, optionsMargin, optionsMargin, optionsMargin];
-
- this.optionsMarginTop = pick(optionsChart.marginTop, margin[0]);
- this.optionsMarginRight = pick(optionsChart.marginRight, margin[1]);
- this.optionsMarginBottom = pick(optionsChart.marginBottom, margin[2]);
- this.optionsMarginLeft = pick(optionsChart.marginLeft, margin[3]);
-
- var chartEvents = optionsChart.events;
-
- this.runChartClick = chartEvents && !!chartEvents.click;
- this.callback = callback;
- this.isResizing = 0;
- this.options = options;
- //chartTitleOptions = UNDEFINED;
- //chartSubtitleOptions = UNDEFINED;
-
- this.axes = [];
- this.series = [];
- this.hasCartesianSeries = optionsChart.showAxes;
- //this.axisOffset = UNDEFINED;
- //this.maxTicks = UNDEFINED; // handle the greatest amount of ticks on grouped axes
- //this.inverted = UNDEFINED;
- //this.loadingShown = UNDEFINED;
- //this.container = UNDEFINED;
- //this.chartWidth = UNDEFINED;
- //this.chartHeight = UNDEFINED;
- //this.marginRight = UNDEFINED;
- //this.marginBottom = UNDEFINED;
- //this.containerWidth = UNDEFINED;
- //this.containerHeight = UNDEFINED;
- //this.oldChartWidth = UNDEFINED;
- //this.oldChartHeight = UNDEFINED;
-
- //this.renderTo = UNDEFINED;
- //this.renderToClone = UNDEFINED;
- //this.tracker = UNDEFINED;
-
- //this.spacingBox = UNDEFINED
-
- //this.legend = UNDEFINED;
-
- // Elements
- //this.chartBackground = UNDEFINED;
- //this.plotBackground = UNDEFINED;
- //this.plotBGImage = UNDEFINED;
- //this.plotBorder = UNDEFINED;
- //this.loadingDiv = UNDEFINED;
- //this.loadingSpan = UNDEFINED;
-
- this.init(chartEvents);
- }
-
- Chart.prototype = {
-
- /**
- * Initialize an individual series, called internally before render time
- */
- initSeries: function (options) {
- var chart = this,
- optionsChart = chart.options.chart,
- type = options.type || optionsChart.type || optionsChart.defaultSeriesType,
- series = new seriesTypes[type]();
-
- series.init(this, options);
- return series;
- },
-
- /**
- * Add a series dynamically after time
- *
- * @param {Object} options The config options
- * @param {Boolean} redraw Whether to redraw the chart after adding. Defaults to true.
- * @param {Boolean|Object} animation Whether to apply animation, and optionally animation
- * configuration
- *
- * @return {Object} series The newly created series object
- */
- addSeries: function (options, redraw, animation) {
- var series,
- chart = this;
-
- if (options) {
- setAnimation(animation, chart);
- redraw = pick(redraw, true); // defaults to true
-
- fireEvent(chart, 'addSeries', { options: options }, function () {
- chart.initSeries(options);
- //series = chart.initSeries(options);
- //series.isDirty = true;
-
- chart.isDirtyLegend = true; // the series array is out of sync with the display
- if (redraw) {
- chart.redraw();
- }
- });
- }
-
- return series;
- },
-
- /**
- * Check whether a given point is within the plot area
- *
- * @param {Number} x Pixel x relative to the plot area
- * @param {Number} y Pixel y relative to the plot area
- */
- isInsidePlot: function (x, y) {
- return x >= 0 &&
- x <= this.plotWidth &&
- y >= 0 &&
- y <= this.plotHeight;
- },
-
- /**
- * Adjust all axes tick amounts
- */
- adjustTickAmounts: function () {
- if (this.options.chart.alignTicks !== false) {
- each(this.axes, function (axis) {
- axis.adjustTickAmount();
- });
- }
- this.maxTicks = null;
- },
-
- /**
- * Redraw legend, axes or series based on updated data
- *
- * @param {Boolean|Object} animation Whether to apply animation, and optionally animation
- * configuration
- */
- redraw: function (animation) {
- var chart = this,
- axes = chart.axes,
- series = chart.series,
- tracker = chart.tracker,
- legend = chart.legend,
- redrawLegend = chart.isDirtyLegend,
- hasStackedSeries,
- isDirtyBox = chart.isDirtyBox, // todo: check if it has actually changed?
- seriesLength = series.length,
- i = seriesLength,
- clipRect = chart.clipRect,
- serie,
- renderer = chart.renderer,
- isHiddenChart = renderer.isHidden();
-
- setAnimation(animation, chart);
-
- if (isHiddenChart) {
- chart.cloneRenderTo();
- }
-
- // link stacked series
- while (i--) {
- serie = series[i];
- if (serie.isDirty && serie.options.stacking) {
- hasStackedSeries = true;
- break;
- }
- }
- if (hasStackedSeries) { // mark others as dirty
- i = seriesLength;
- while (i--) {
- serie = series[i];
- if (serie.options.stacking) {
- serie.isDirty = true;
- }
- }
- }
-
- // handle updated data in the series
- each(series, function (serie) {
- if (serie.isDirty) { // prepare the data so axis can read it
- if (serie.options.legendType === 'point') {
- redrawLegend = true;
- }
- }
- });
-
- // handle added or removed series
- if (redrawLegend && legend.options.enabled) { // series or pie points are added or removed
- // draw legend graphics
- legend.render();
-
- chart.isDirtyLegend = false;
- }
-
-
- if (chart.hasCartesianSeries) {
- if (!chart.isResizing) {
-
- // reset maxTicks
- chart.maxTicks = null;
-
- // set axes scales
- each(axes, function (axis) {
- axis.setScale();
- });
- }
- chart.adjustTickAmounts();
- chart.getMargins();
-
- // redraw axes
- each(axes, function (axis) {
-
- // Fire 'afterSetExtremes' only if extremes are set
- if (axis.isDirtyExtremes) { // #821
- axis.isDirtyExtremes = false;
- fireEvent(axis, 'afterSetExtremes', axis.getExtremes()); // #747, #751
- }
-
- if (axis.isDirty || isDirtyBox || hasStackedSeries) {
- axis.redraw();
- isDirtyBox = true; // #792
- }
- });
-
-
- }
-
- // the plot areas size has changed
- if (isDirtyBox) {
- chart.drawChartBox();
-
- // move clip rect
- if (clipRect) {
- stop(clipRect);
- clipRect.animate({ // for chart resize
- width: chart.plotSizeX,
- height: chart.plotSizeY + 1
- });
- }
-
- }
-
-
- // redraw affected series
- each(series, function (serie) {
- if (serie.isDirty && serie.visible &&
- (!serie.isCartesian || serie.xAxis)) { // issue #153
- serie.redraw();
- }
- });
-
-
- // move tooltip or reset
- if (tracker && tracker.resetTracker) {
- tracker.resetTracker(true);
- }
-
- // redraw if canvas
- renderer.draw();
-
- // fire the event
- fireEvent(chart, 'redraw'); // jQuery breaks this when calling it from addEvent. Overwrites chart.redraw
-
- if (isHiddenChart) {
- chart.cloneRenderTo(true);
- }
- },
-
-
- /**
- * Dim the chart and show a loading text or symbol
- * @param {String} str An optional text to show in the loading label instead of the default one
- */
- showLoading: function (str) {
- var chart = this,
- options = chart.options,
- loadingDiv = chart.loadingDiv;
-
- var loadingOptions = options.loading;
-
- // create the layer at the first call
- if (!loadingDiv) {
- chart.loadingDiv = loadingDiv = createElement(DIV, {
- className: PREFIX + 'loading'
- }, extend(loadingOptions.style, {
- left: chart.plotLeft + PX,
- top: chart.plotTop + PX,
- width: chart.plotWidth + PX,
- height: chart.plotHeight + PX,
- zIndex: 10,
- display: NONE
- }), chart.container);
-
- chart.loadingSpan = createElement(
- 'span',
- null,
- loadingOptions.labelStyle,
- loadingDiv
- );
-
- }
-
- // update text
- chart.loadingSpan.innerHTML = str || options.lang.loading;
-
- // show it
- if (!chart.loadingShown) {
- css(loadingDiv, { opacity: 0, display: '' });
- animate(loadingDiv, {
- opacity: loadingOptions.style.opacity
- }, {
- duration: loadingOptions.showDuration || 0
- });
- chart.loadingShown = true;
- }
- },
-
- /**
- * Hide the loading layer
- */
- hideLoading: function () {
- var options = this.options,
- loadingDiv = this.loadingDiv;
-
- if (loadingDiv) {
- animate(loadingDiv, {
- opacity: 0
- }, {
- duration: options.loading.hideDuration || 100,
- complete: function () {
- css(loadingDiv, { display: NONE });
- }
- });
- }
- this.loadingShown = false;
- },
-
- /**
- * Get an axis, series or point object by id.
- * @param id {String} The id as given in the configuration options
- */
- get: function (id) {
- var chart = this,
- axes = chart.axes,
- series = chart.series;
-
- var i,
- j,
- points;
-
- // search axes
- for (i = 0; i < axes.length; i++) {
- if (axes[i].options.id === id) {
- return axes[i];
- }
- }
-
- // search series
- for (i = 0; i < series.length; i++) {
- if (series[i].options.id === id) {
- return series[i];
- }
- }
-
- // search points
- for (i = 0; i < series.length; i++) {
- points = series[i].points || [];
- for (j = 0; j < points.length; j++) {
- if (points[j].id === id) {
- return points[j];
- }
- }
- }
- return null;
- },
-
- /**
- * Create the Axis instances based on the config options
- */
- getAxes: function () {
- var chart = this,
- options = this.options;
-
- var xAxisOptions = options.xAxis || {},
- yAxisOptions = options.yAxis || {},
- optionsArray,
- axis;
-
- // make sure the options are arrays and add some members
- xAxisOptions = splat(xAxisOptions);
- each(xAxisOptions, function (axis, i) {
- axis.index = i;
- axis.isX = true;
- });
-
- yAxisOptions = splat(yAxisOptions);
- each(yAxisOptions, function (axis, i) {
- axis.index = i;
- });
-
- // concatenate all axis options into one array
- optionsArray = xAxisOptions.concat(yAxisOptions);
-
- each(optionsArray, function (axisOptions) {
- axis = new Axis(chart, axisOptions);
- });
-
- chart.adjustTickAmounts();
- },
-
-
- /**
- * Get the currently selected points from all series
- */
- getSelectedPoints: function () {
- var points = [];
- each(this.series, function (serie) {
- points = points.concat(grep(serie.points, function (point) {
- return point.selected;
- }));
- });
- return points;
- },
-
- /**
- * Get the currently selected series
- */
- getSelectedSeries: function () {
- return grep(this.series, function (serie) {
- return serie.selected;
- });
- },
-
- /**
- * Display the zoom button
- */
- showResetZoom: function () {
- var chart = this,
- lang = defaultOptions.lang,
- btnOptions = chart.options.chart.resetZoomButton,
- theme = btnOptions.theme,
- states = theme.states,
- box = btnOptions.relativeTo === 'chart' ? null : {
- x: chart.plotLeft,
- y: chart.plotTop,
- width: chart.plotWidth,
- height: chart.plotHeight
- };
- this.resetZoomButton = chart.renderer.button(lang.resetZoom, null, null, function () {
- chart.zoomOut();
- }, theme, states && states.hover)
- .attr({
- align: btnOptions.position.align,
- title: lang.resetZoomTitle
- })
- .add()
- .align(btnOptions.position, false, box);
- },
-
- /**
- * Zoom out to 1:1
- */
- zoomOut: function () {
- var chart = this,
- resetZoomButton = chart.resetZoomButton;
-
- fireEvent(chart, 'selection', { resetSelection: true }, function () {
- chart.zoom();
- });
- if (resetZoomButton) {
- chart.resetZoomButton = resetZoomButton.destroy();
- }
- },
-
- /**
- * Zoom into a given portion of the chart given by axis coordinates
- * @param {Object} event
- */
- zoom: function (event) {
- var chart = this,
- optionsChart = chart.options.chart;
-
- // add button to reset selection
- var hasZoomed;
-
- if (chart.resetZoomEnabled !== false && !chart.resetZoomButton) { // hook for Stock charts etc.
- chart.showResetZoom();
- }
-
- // if zoom is called with no arguments, reset the axes
- if (!event || event.resetSelection) {
- each(chart.axes, function (axis) {
- if (axis.options.zoomEnabled !== false) {
- axis.setExtremes(null, null, false);
- hasZoomed = true;
- }
- });
- } else { // else, zoom in on all axes
- each(event.xAxis.concat(event.yAxis), function (axisData) {
- var axis = axisData.axis;
-
- // don't zoom more than minRange
- if (chart.tracker[axis.isXAxis ? 'zoomX' : 'zoomY']) {
- axis.setExtremes(axisData.min, axisData.max, false);
- hasZoomed = true;
- }
- });
- }
-
- // Redraw
- if (hasZoomed) {
- chart.redraw(
- pick(optionsChart.animation, chart.pointCount < 100) // animation
- );
- }
- },
-
- /**
- * Pan the chart by dragging the mouse across the pane. This function is called
- * on mouse move, and the distance to pan is computed from chartX compared to
- * the first chartX position in the dragging operation.
- */
- pan: function (chartX) {
- var chart = this;
-
- var xAxis = chart.xAxis[0],
- mouseDownX = chart.mouseDownX,
- halfPointRange = xAxis.pointRange / 2,
- extremes = xAxis.getExtremes(),
- newMin = xAxis.translate(mouseDownX - chartX, true) + halfPointRange,
- newMax = xAxis.translate(mouseDownX + chart.plotWidth - chartX, true) - halfPointRange,
- hoverPoints = chart.hoverPoints;
-
- // remove active points for shared tooltip
- if (hoverPoints) {
- each(hoverPoints, function (point) {
- point.setState();
- });
- }
-
- if (xAxis.series.length && newMin > mathMin(extremes.dataMin, extremes.min) && newMax < mathMax(extremes.dataMax, extremes.max)) {
- xAxis.setExtremes(newMin, newMax, true, false);
- }
-
- chart.mouseDownX = chartX; // set new reference for next run
- css(chart.container, { cursor: 'move' });
- },
-
- /**
- * Show the title and subtitle of the chart
- *
- * @param titleOptions {Object} New title options
- * @param subtitleOptions {Object} New subtitle options
- *
- */
- setTitle: function (titleOptions, subtitleOptions) {
- var chart = this,
- options = chart.options,
- chartTitleOptions,
- chartSubtitleOptions;
-
- chart.chartTitleOptions = chartTitleOptions = merge(options.title, titleOptions);
- chart.chartSubtitleOptions = chartSubtitleOptions = merge(options.subtitle, subtitleOptions);
-
- // add title and subtitle
- each([
- ['title', titleOptions, chartTitleOptions],
- ['subtitle', subtitleOptions, chartSubtitleOptions]
- ], function (arr) {
- var name = arr[0],
- title = chart[name],
- titleOptions = arr[1],
- chartTitleOptions = arr[2];
-
- if (title && titleOptions) {
- title = title.destroy(); // remove old
- }
- if (chartTitleOptions && chartTitleOptions.text && !title) {
- chart[name] = chart.renderer.text(
- chartTitleOptions.text,
- 0,
- 0,
- chartTitleOptions.useHTML
- )
- .attr({
- align: chartTitleOptions.align,
- 'class': PREFIX + name,
- zIndex: chartTitleOptions.zIndex || 4
- })
- .css(chartTitleOptions.style)
- .add()
- .align(chartTitleOptions, false, chart.spacingBox);
- }
- });
-
- },
-
- /**
- * Get chart width and height according to options and container size
- */
- getChartSize: function () {
- var chart = this,
- optionsChart = chart.options.chart,
- renderTo = chart.renderToClone || chart.renderTo;
-
- // get inner width and height from jQuery (#824)
- chart.containerWidth = adapterRun(renderTo, 'width');
- chart.containerHeight = adapterRun(renderTo, 'height');
-
- chart.chartWidth = optionsChart.width || chart.containerWidth || 600;
- chart.chartHeight = optionsChart.height ||
- // the offsetHeight of an empty container is 0 in standard browsers, but 19 in IE7:
- (chart.containerHeight > 19 ? chart.containerHeight : 400);
- },
-
- /**
- * Create a clone of the chart's renderTo div and place it outside the viewport to allow
- * size computation on chart.render and chart.redraw
- */
- cloneRenderTo: function (revert) {
- var clone = this.renderToClone,
- container = this.container;
-
- // Destroy the clone and bring the container back to the real renderTo div
- if (revert) {
- if (clone) {
- this.renderTo.appendChild(container);
- discardElement(clone);
- delete this.renderToClone;
- }
-
- // Set up the clone
- } else {
- if (container) {
- this.renderTo.removeChild(container); // do not clone this
- }
- this.renderToClone = clone = this.renderTo.cloneNode(0);
- css(clone, {
- position: ABSOLUTE,
- top: '-9999px',
- display: 'block' // #833
- });
- doc.body.appendChild(clone);
- if (container) {
- clone.appendChild(container);
- }
- }
- },
-
- /**
- * Get the containing element, determine the size and create the inner container
- * div to hold the chart
- */
- getContainer: function () {
- var chart = this,
- container,
- optionsChart = chart.options.chart,
- chartWidth,
- chartHeight,
- renderTo,
- containerId;
-
- chart.renderTo = renderTo = optionsChart.renderTo;
- containerId = PREFIX + idCounter++;
-
- if (isString(renderTo)) {
- chart.renderTo = renderTo = doc.getElementById(renderTo);
- }
-
- // Display an error if the renderTo is wrong
- if (!renderTo) {
- error(13, true);
- }
-
- // remove previous chart
- renderTo.innerHTML = '';
-
- // If the container doesn't have an offsetWidth, it has or is a child of a node
- // that has display:none. We need to temporarily move it out to a visible
- // state to determine the size, else the legend and tooltips won't render
- // properly
- if (!renderTo.offsetWidth) {
- chart.cloneRenderTo();
- }
-
- // get the width and height
- chart.getChartSize();
- chartWidth = chart.chartWidth;
- chartHeight = chart.chartHeight;
-
- // create the inner container
- chart.container = container = createElement(DIV, {
- className: PREFIX + 'container' +
- (optionsChart.className ? ' ' + optionsChart.className : ''),
- id: containerId
- }, extend({
- position: RELATIVE,
- overflow: HIDDEN, // needed for context menu (avoid scrollbars) and
- // content overflow in IE
- width: chartWidth + PX,
- height: chartHeight + PX,
- textAlign: 'left',
- lineHeight: 'normal' // #427
- }, optionsChart.style),
- chart.renderToClone || renderTo
- );
-
- chart.renderer =
- optionsChart.forExport ? // force SVG, used for SVG export
- new SVGRenderer(container, chartWidth, chartHeight, true) :
- new Renderer(container, chartWidth, chartHeight);
-
- if (useCanVG) {
- // If we need canvg library, extend and configure the renderer
- // to get the tracker for translating mouse events
- chart.renderer.create(chart, container, chartWidth, chartHeight);
- }
- },
-
- /**
- * Calculate margins by rendering axis labels in a preliminary position. Title,
- * subtitle and legend have already been rendered at this stage, but will be
- * moved into their final positions
- */
- getMargins: function () {
- var chart = this,
- optionsChart = chart.options.chart,
- spacingTop = optionsChart.spacingTop,
- spacingRight = optionsChart.spacingRight,
- spacingBottom = optionsChart.spacingBottom,
- spacingLeft = optionsChart.spacingLeft,
- axisOffset,
- legend = chart.legend,
- optionsMarginTop = chart.optionsMarginTop,
- optionsMarginLeft = chart.optionsMarginLeft,
- optionsMarginRight = chart.optionsMarginRight,
- optionsMarginBottom = chart.optionsMarginBottom,
- chartTitleOptions = chart.chartTitleOptions,
- chartSubtitleOptions = chart.chartSubtitleOptions,
- legendOptions = chart.options.legend,
- legendMargin = pick(legendOptions.margin, 10),
- legendX = legendOptions.x,
- legendY = legendOptions.y,
- align = legendOptions.align,
- verticalAlign = legendOptions.verticalAlign,
- titleOffset;
-
- chart.resetMargins();
- axisOffset = chart.axisOffset;
-
- // adjust for title and subtitle
- if ((chart.title || chart.subtitle) && !defined(chart.optionsMarginTop)) {
- titleOffset = mathMax(
- (chart.title && !chartTitleOptions.floating && !chartTitleOptions.verticalAlign && chartTitleOptions.y) || 0,
- (chart.subtitle && !chartSubtitleOptions.floating && !chartSubtitleOptions.verticalAlign && chartSubtitleOptions.y) || 0
- );
- if (titleOffset) {
- chart.plotTop = mathMax(chart.plotTop, titleOffset + pick(chartTitleOptions.margin, 15) + spacingTop);
- }
- }
- // adjust for legend
- if (legend.display && !legendOptions.floating) {
- if (align === 'right') { // horizontal alignment handled first
- if (!defined(optionsMarginRight)) {
- chart.marginRight = mathMax(
- chart.marginRight,
- legend.legendWidth - legendX + legendMargin + spacingRight
- );
- }
- } else if (align === 'left') {
- if (!defined(optionsMarginLeft)) {
- chart.plotLeft = mathMax(
- chart.plotLeft,
- legend.legendWidth + legendX + legendMargin + spacingLeft
- );
- }
-
- } else if (verticalAlign === 'top') {
- if (!defined(optionsMarginTop)) {
- chart.plotTop = mathMax(
- chart.plotTop,
- legend.legendHeight + legendY + legendMargin + spacingTop
- );
- }
-
- } else if (verticalAlign === 'bottom') {
- if (!defined(optionsMarginBottom)) {
- chart.marginBottom = mathMax(
- chart.marginBottom,
- legend.legendHeight - legendY + legendMargin + spacingBottom
- );
- }
- }
- }
-
- // adjust for scroller
- if (chart.extraBottomMargin) {
- chart.marginBottom += chart.extraBottomMargin;
- }
- if (chart.extraTopMargin) {
- chart.plotTop += chart.extraTopMargin;
- }
-
- // pre-render axes to get labels offset width
- if (chart.hasCartesianSeries) {
- each(chart.axes, function (axis) {
- axis.getOffset();
- });
- }
-
- if (!defined(optionsMarginLeft)) {
- chart.plotLeft += axisOffset[3];
- }
- if (!defined(optionsMarginTop)) {
- chart.plotTop += axisOffset[0];
- }
- if (!defined(optionsMarginBottom)) {
- chart.marginBottom += axisOffset[2];
- }
- if (!defined(optionsMarginRight)) {
- chart.marginRight += axisOffset[1];
- }
-
- chart.setChartSize();
-
- },
-
- /**
- * Add the event handlers necessary for auto resizing
- *
- */
- initReflow: function () {
- var chart = this,
- optionsChart = chart.options.chart,
- renderTo = chart.renderTo;
-
- var reflowTimeout;
-
- function reflow(e) {
- var width = optionsChart.width || adapterRun(renderTo, 'width'),
- height = optionsChart.height || adapterRun(renderTo, 'height'),
- target = e ? e.target : win; // #805 - MooTools doesn't supply e
-
- // Width and height checks for display:none. Target is doc in IE8 and Opera,
- // win in Firefox, Chrome and IE9.
- if (width && height && (target === win || target === doc)) {
-
- if (width !== chart.containerWidth || height !== chart.containerHeight) {
- clearTimeout(reflowTimeout);
- reflowTimeout = setTimeout(function () {
- chart.resize(width, height, false);
- }, 100);
- }
- chart.containerWidth = width;
- chart.containerHeight = height;
- }
- }
-
- addEvent(win, 'resize', reflow);
- addEvent(chart, 'destroy', function () {
- removeEvent(win, 'resize', reflow);
- });
- },
-
- /**
- * Fires endResize event on chart instance.
- */
- fireEndResize: function () {
- var chart = this;
-
- if (chart) {
- fireEvent(chart, 'endResize', null, function () {
- chart.isResizing -= 1;
- });
- }
- },
-
- /**
- * Resize the chart to a given width and height
- * @param {Number} width
- * @param {Number} height
- * @param {Object|Boolean} animation
- */
- // TODO: This method is called setSize in the api
- resize: function (width, height, animation) {
- var chart = this,
- chartWidth,
- chartHeight,
- spacingBox,
- chartTitle = chart.title,
- chartSubtitle = chart.subtitle;
-
- chart.isResizing += 1;
-
- // set the animation for the current process
- setAnimation(animation, chart);
-
- chart.oldChartHeight = chart.chartHeight;
- chart.oldChartWidth = chart.chartWidth;
- if (defined(width)) {
- chart.chartWidth = chartWidth = mathRound(width);
- }
- if (defined(height)) {
- chart.chartHeight = chartHeight = mathRound(height);
- }
-
- css(chart.container, {
- width: chartWidth + PX,
- height: chartHeight + PX
- });
- chart.renderer.setSize(chartWidth, chartHeight, animation);
-
- // update axis lengths for more correct tick intervals:
- chart.plotWidth = chartWidth - chart.plotLeft - chart.marginRight;
- chart.plotHeight = chartHeight - chart.plotTop - chart.marginBottom;
-
- // handle axes
- chart.maxTicks = null;
- each(chart.axes, function (axis) {
- axis.isDirty = true;
- axis.setScale();
- });
-
- // make sure non-cartesian series are also handled
- each(chart.series, function (serie) {
- serie.isDirty = true;
- });
-
- chart.isDirtyLegend = true; // force legend redraw
- chart.isDirtyBox = true; // force redraw of plot and chart border
-
- chart.getMargins();
-
- // move titles
- spacingBox = chart.spacingBox;
- if (chartTitle) {
- chartTitle.align(null, null, spacingBox);
- }
- if (chartSubtitle) {
- chartSubtitle.align(null, null, spacingBox);
- }
-
- chart.redraw(animation);
-
-
- chart.oldChartHeight = null;
- fireEvent(chart, 'resize');
-
- // fire endResize and set isResizing back
- // If animation is disabled, fire without delay
- if (globalAnimation === false) {
- chart.fireEndResize();
- } else { // else set a timeout with the animation duration
- setTimeout(chart.fireEndResize, (globalAnimation && globalAnimation.duration) || 500);
- }
- },
-
- /**
- * Set the public chart properties. This is done before and after the pre-render
- * to determine margin sizes
- */
- setChartSize: function () {
- var chart = this,
- inverted = chart.inverted,
- chartWidth = chart.chartWidth,
- chartHeight = chart.chartHeight,
- optionsChart = chart.options.chart,
- spacingTop = optionsChart.spacingTop,
- spacingRight = optionsChart.spacingRight,
- spacingBottom = optionsChart.spacingBottom,
- spacingLeft = optionsChart.spacingLeft;
-
- chart.plotLeft = mathRound(chart.plotLeft);
- chart.plotTop = mathRound(chart.plotTop);
- chart.plotWidth = mathRound(chartWidth - chart.plotLeft - chart.marginRight);
- chart.plotHeight = mathRound(chartHeight - chart.plotTop - chart.marginBottom);
-
- chart.plotSizeX = inverted ? chart.plotHeight : chart.plotWidth;
- chart.plotSizeY = inverted ? chart.plotWidth : chart.plotHeight;
-
- chart.spacingBox = {
- x: spacingLeft,
- y: spacingTop,
- width: chartWidth - spacingLeft - spacingRight,
- height: chartHeight - spacingTop - spacingBottom
- };
-
- each(chart.axes, function (axis) {
- axis.setAxisSize();
- axis.setAxisTranslation();
- });
- },
-
- /**
- * Initial margins before auto size margins are applied
- */
- resetMargins: function () {
- var chart = this,
- optionsChart = chart.options.chart,
- spacingTop = optionsChart.spacingTop,
- spacingRight = optionsChart.spacingRight,
- spacingBottom = optionsChart.spacingBottom,
- spacingLeft = optionsChart.spacingLeft;
-
- chart.plotTop = pick(chart.optionsMarginTop, spacingTop);
- chart.marginRight = pick(chart.optionsMarginRight, spacingRight);
- chart.marginBottom = pick(chart.optionsMarginBottom, spacingBottom);
- chart.plotLeft = pick(chart.optionsMarginLeft, spacingLeft);
- chart.axisOffset = [0, 0, 0, 0]; // top, right, bottom, left
- },
-
- /**
- * Draw the borders and backgrounds for chart and plot area
- */
- drawChartBox: function () {
- var chart = this,
- optionsChart = chart.options.chart,
- renderer = chart.renderer,
- chartWidth = chart.chartWidth,
- chartHeight = chart.chartHeight,
- chartBackground = chart.chartBackground,
- plotBackground = chart.plotBackground,
- plotBorder = chart.plotBorder,
- plotBGImage = chart.plotBGImage,
- chartBorderWidth = optionsChart.borderWidth || 0,
- chartBackgroundColor = optionsChart.backgroundColor,
- plotBackgroundColor = optionsChart.plotBackgroundColor,
- plotBackgroundImage = optionsChart.plotBackgroundImage,
- mgn,
- bgAttr,
- plotSize = {
- x: chart.plotLeft,
- y: chart.plotTop,
- width: chart.plotWidth,
- height: chart.plotHeight
- };
-
- // Chart area
- mgn = chartBorderWidth + (optionsChart.shadow ? 8 : 0);
-
- if (chartBorderWidth || chartBackgroundColor) {
- if (!chartBackground) {
-
- bgAttr = {
- fill: chartBackgroundColor || NONE
- };
- if (chartBorderWidth) { // #980
- bgAttr.stroke = optionsChart.borderColor;
- bgAttr['stroke-width'] = chartBorderWidth;
- }
- chart.chartBackground = renderer.rect(mgn / 2, mgn / 2, chartWidth - mgn, chartHeight - mgn,
- optionsChart.borderRadius, chartBorderWidth)
- .attr(bgAttr)
- .add()
- .shadow(optionsChart.shadow);
- } else { // resize
- chartBackground.animate(
- chartBackground.crisp(null, null, null, chartWidth - mgn, chartHeight - mgn)
- );
- }
- }
-
-
- // Plot background
- if (plotBackgroundColor) {
- if (!plotBackground) {
- chart.plotBackground = renderer.rect(chart.plotLeft, chart.plotTop, chart.plotWidth, chart.plotHeight, 0)
- .attr({
- fill: plotBackgroundColor
- })
- .add()
- .shadow(optionsChart.plotShadow);
- } else {
- plotBackground.animate(plotSize);
- }
- }
- if (plotBackgroundImage) {
- if (!plotBGImage) {
- chart.plotBGImage = renderer.image(plotBackgroundImage, chart.plotLeft, chart.plotTop, chart.plotWidth, chart.plotHeight)
- .add();
- } else {
- plotBGImage.animate(plotSize);
- }
- }
-
- // Plot area border
- if (optionsChart.plotBorderWidth) {
- if (!plotBorder) {
- chart.plotBorder = renderer.rect(chart.plotLeft, chart.plotTop, chart.plotWidth, chart.plotHeight, 0, optionsChart.plotBorderWidth)
- .attr({
- stroke: optionsChart.plotBorderColor,
- 'stroke-width': optionsChart.plotBorderWidth,
- zIndex: 4
- })
- .add();
- } else {
- plotBorder.animate(
- plotBorder.crisp(null, chart.plotLeft, chart.plotTop, chart.plotWidth, chart.plotHeight)
- );
- }
- }
-
- // reset
- chart.isDirtyBox = false;
- },
-
- /**
- * Detect whether a certain chart property is needed based on inspecting its options
- * and series. This mainly applies to the chart.invert property, and in extensions to
- * the chart.angular and chart.polar properties.
- */
- propFromSeries: function () {
- var chart = this,
- optionsChart = chart.options.chart,
- klass,
- seriesOptions = chart.options.series,
- i,
- value;
-
-
- each(['inverted', 'angular', 'polar'], function (key) {
-
- // The default series type's class
- klass = seriesTypes[optionsChart.type || optionsChart.defaultSeriesType];
-
- // Get the value from available chart-wide properties
- value = (
- chart[key] || // 1. it is set before
- optionsChart[key] || // 2. it is set in the options
- (klass && klass.prototype[key]) // 3. it's default series class requires it
- );
-
- // 4. Check if any the chart's series require it
- i = seriesOptions && seriesOptions.length;
- while (!value && i--) {
- klass = seriesTypes[seriesOptions[i].type];
- if (klass && klass.prototype[key]) {
- value = true;
- }
- }
-
- // Set the chart property
- chart[key] = value;
- });
-
- },
-
- /**
- * Render all graphics for the chart
- */
- render: function () {
- var chart = this,
- axes = chart.axes,
- renderer = chart.renderer,
- options = chart.options;
-
- var labels = options.labels,
- credits = options.credits,
- creditsHref;
-
- // Title
- chart.setTitle();
-
-
- // Legend
- chart.legend = new Legend(chart);
-
- // Get margins by pre-rendering axes
- // set axes scales
- each(axes, function (axis) {
- axis.setScale();
- });
- chart.getMargins();
-
- chart.maxTicks = null; // reset for second pass
- each(axes, function (axis) {
- axis.setTickPositions(true); // update to reflect the new margins
- axis.setMaxTicks();
- });
- chart.adjustTickAmounts();
- chart.getMargins(); // second pass to check for new labels
-
-
- // Draw the borders and backgrounds
- chart.drawChartBox();
-
-
- // Axes
- if (chart.hasCartesianSeries) {
- each(axes, function (axis) {
- axis.render();
- });
- }
-
- // The series
- if (!chart.seriesGroup) {
- chart.seriesGroup = renderer.g('series-group')
- .attr({ zIndex: 3 })
- .add();
- }
- each(chart.series, function (serie) {
- serie.translate();
- serie.setTooltipPoints();
- serie.render();
- });
-
- // Labels
- if (labels.items) {
- each(labels.items, function () {
- var style = extend(labels.style, this.style),
- x = pInt(style.left) + chart.plotLeft,
- y = pInt(style.top) + chart.plotTop + 12;
-
- // delete to prevent rewriting in IE
- delete style.left;
- delete style.top;
-
- renderer.text(
- this.html,
- x,
- y
- )
- .attr({ zIndex: 2 })
- .css(style)
- .add();
-
- });
- }
-
- // Credits
- if (credits.enabled && !chart.credits) {
- creditsHref = credits.href;
- chart.credits = renderer.text(
- credits.text,
- 0,
- 0
- )
- .on('click', function () {
- if (creditsHref) {
- location.href = creditsHref;
- }
- })
- .attr({
- align: credits.position.align,
- zIndex: 8
- })
- .css(credits.style)
- .add()
- .align(credits.position);
- }
-
- // Set flag
- chart.hasRendered = true;
-
- },
-
- /**
- * Clean up memory usage
- */
- destroy: function () {
- var chart = this,
- axes = chart.axes,
- series = chart.series,
- container = chart.container;
-
- var i,
- parentNode = container && container.parentNode;
-
- // If the chart is destroyed already, do nothing.
- // This will happen if if a script invokes chart.destroy and
- // then it will be called again on win.unload
- if (chart === null) {
- return;
- }
-
- // fire the chart.destoy event
- fireEvent(chart, 'destroy');
-
- // remove events
- removeEvent(chart);
-
- // ==== Destroy collections:
- // Destroy axes
- i = axes.length;
- while (i--) {
- axes[i] = axes[i].destroy();
- }
-
- // Destroy each series
- i = series.length;
- while (i--) {
- series[i] = series[i].destroy();
- }
-
- // ==== Destroy chart properties:
- each(['title', 'subtitle', 'chartBackground', 'plotBackground', 'plotBGImage', 'plotBorder', 'seriesGroup', 'clipRect', 'credits', 'tracker', 'scroller', 'rangeSelector', 'legend', 'resetZoomButton', 'tooltip', 'renderer'], function (name) {
- var prop = chart[name];
-
- if (prop) {
- chart[name] = prop.destroy();
- }
- });
-
- // remove container and all SVG
- if (container) { // can break in IE when destroyed before finished loading
- container.innerHTML = '';
- removeEvent(container);
- if (parentNode) {
- discardElement(container);
- }
-
- // IE6 leak
- container = null;
- }
-
- // clean it all up
- for (i in chart) {
- delete chart[i];
- }
-
- chart.options = null;
- chart = null;
- },
-
- /**
- * Prepare for first rendering after all data are loaded
- */
- firstRender: function () {
- var chart = this,
- options = chart.options,
- callback = chart.callback;
-
- // VML namespaces can't be added until after complete. Listening
- // for Perini's doScroll hack is not enough.
- var ONREADYSTATECHANGE = 'onreadystatechange',
- COMPLETE = 'complete';
- // Note: in spite of JSLint's complaints, win == win.top is required
- /*jslint eqeq: true*/
- if ((!hasSVG && (win == win.top && doc.readyState !== COMPLETE)) || (useCanVG && !win.canvg)) {
- /*jslint eqeq: false*/
- if (useCanVG) {
- // Delay rendering until canvg library is downloaded and ready
- CanVGController.push(function () {
- chart.firstRender();
- }, options.global.canvasToolsURL);
- } else {
- doc.attachEvent(ONREADYSTATECHANGE, function () {
- doc.detachEvent(ONREADYSTATECHANGE, chart.firstRender);
- if (doc.readyState === COMPLETE) {
- chart.firstRender();
- }
- });
- }
- return;
- }
-
- // create the container
- chart.getContainer();
-
- // Run an early event after the container and renderer are established
- fireEvent(chart, 'init');
-
- // Initialize range selector for stock charts
- if (Highcharts.RangeSelector && options.rangeSelector.enabled) {
- chart.rangeSelector = new Highcharts.RangeSelector(chart);
- }
-
- chart.resetMargins();
- chart.setChartSize();
-
- // Set the common chart properties (mainly invert) from the given series
- chart.propFromSeries();
-
- // get axes
- chart.getAxes();
-
- // Initialize the series
- each(options.series || [], function (serieOptions) {
- chart.initSeries(serieOptions);
- });
-
- // Run an event where series and axes can be added
- //fireEvent(chart, 'beforeRender');
-
- // Initialize scroller for stock charts
- if (Highcharts.Scroller && (options.navigator.enabled || options.scrollbar.enabled)) {
- chart.scroller = new Highcharts.Scroller(chart);
- }
-
- // depends on inverted and on margins being set
- chart.tracker = new MouseTracker(chart, options);
-
- chart.render();
-
- // add canvas
- chart.renderer.draw();
- // run callbacks
- if (callback) {
- callback.apply(chart, [chart]);
- }
- each(chart.callbacks, function (fn) {
- fn.apply(chart, [chart]);
- });
-
-
- // If the chart was rendered outside the top container, put it back in
- chart.cloneRenderTo(true);
-
- fireEvent(chart, 'load');
-
- },
-
- init: function (chartEvents) {
- var chart = this,
- optionsChart = chart.options.chart,
- eventType;
-
- // Run chart
-
- // Set up auto resize
- if (optionsChart.reflow !== false) {
- addEvent(chart, 'load', chart.initReflow);
- }
-
- // Chart event handlers
- if (chartEvents) {
- for (eventType in chartEvents) {
- addEvent(chart, eventType, chartEvents[eventType]);
- }
- }
-
- chart.xAxis = [];
- chart.yAxis = [];
-
- // Expose methods and variables
- chart.animation = useCanVG ? false : pick(optionsChart.animation, true);
- chart.setSize = chart.resize;
- chart.pointCount = 0;
- chart.counters = new ChartCounters();
- /*
- if ($) $(function () {
- $container = $('#container');
- var origChartWidth,
- origChartHeight;
- if ($container) {
- $('+ ')
- .insertBefore($container)
- .click(function () {
- if (origChartWidth === UNDEFINED) {
- origChartWidth = chartWidth;
- origChartHeight = chartHeight;
- }
- chart.resize(chartWidth *= 1.1, chartHeight *= 1.1);
- });
- $('- ')
- .insertBefore($container)
- .click(function () {
- if (origChartWidth === UNDEFINED) {
- origChartWidth = chartWidth;
- origChartHeight = chartHeight;
- }
- chart.resize(chartWidth *= 0.9, chartHeight *= 0.9);
- });
- $('1:1 ')
- .insertBefore($container)
- .click(function () {
- if (origChartWidth === UNDEFINED) {
- origChartWidth = chartWidth;
- origChartHeight = chartHeight;
- }
- chart.resize(origChartWidth, origChartHeight);
- });
- }
- })
- */
-
- chart.firstRender();
- }
- }; // end Chart
-
-// Hook for exporting module
- Chart.prototype.callbacks = [];
- /**
- * The Point object and prototype. Inheritable and used as base for PiePoint
- */
- var Point = function () {
- };
- Point.prototype = {
-
- /**
- * Initialize the point
- * @param {Object} series The series object containing this point
- * @param {Object} options The data in either number, array or object format
- */
- init: function (series, options, x) {
- var point = this,
- counters = series.chart.counters,
- defaultColors;
- point.series = series;
- point.applyOptions(options, x);
- point.pointAttr = {};
-
- if (series.options.colorByPoint) {
- defaultColors = series.chart.options.colors;
- if (!point.options) {
- point.options = {};
- }
- point.color = point.options.color = point.color || defaultColors[counters.color++];
-
- // loop back to zero
- counters.wrapColor(defaultColors.length);
- }
-
- series.chart.pointCount++;
- return point;
- },
- /**
- * Apply the options containing the x and y data and possible some extra properties.
- * This is called on point init or from point.update.
- *
- * @param {Object} options
- */
- applyOptions: function (options, x) {
- var point = this,
- series = point.series,
- optionsType = typeof options;
-
- point.config = options;
-
- // onedimensional array input
- if (optionsType === 'number' || options === null) {
- point.y = options;
- } else if (typeof options[0] === 'number') { // two-dimentional array
- point.x = options[0];
- point.y = options[1];
- } else if (optionsType === 'object' && typeof options.length !== 'number') { // object input
- // copy options directly to point
- extend(point, options);
- point.options = options;
-
- // This is the fastest way to detect if there are individual point dataLabels that need
- // to be considered in drawDataLabels. These can only occur in object configs.
- if (options.dataLabels) {
- series._hasPointLabels = true;
- }
- } else if (typeof options[0] === 'string') { // categorized data with name in first position
- point.name = options[0];
- point.y = options[1];
- }
-
- /*
- * If no x is set by now, get auto incremented value. All points must have an
- * x value, however the y value can be null to create a gap in the series
- */
- // todo: skip this? It is only used in applyOptions, in translate it should not be used
- if (point.x === UNDEFINED) {
- point.x = x === UNDEFINED ? series.autoIncrement() : x;
- }
-
-
- },
-
- /**
- * Destroy a point to clear memory. Its reference still stays in series.data.
- */
- destroy: function () {
- var point = this,
- series = point.series,
- chart = series.chart,
- hoverPoints = chart.hoverPoints,
- prop;
-
- chart.pointCount--;
-
- if (hoverPoints) {
- point.setState();
- erase(hoverPoints, point);
- if (!hoverPoints.length) {
- chart.hoverPoints = null;
- }
-
- }
- if (point === chart.hoverPoint) {
- point.onMouseOut();
- }
-
- // remove all events
- if (point.graphic || point.dataLabel) { // removeEvent and destroyElements are performance expensive
- removeEvent(point);
- point.destroyElements();
- }
-
- if (point.legendItem) { // pies have legend items
- chart.legend.destroyItem(point);
- }
-
- for (prop in point) {
- point[prop] = null;
- }
-
-
- },
-
- /**
- * Destroy SVG elements associated with the point
- */
- destroyElements: function () {
- var point = this,
- props = ['graphic', 'tracker', 'dataLabel', 'group', 'connector', 'shadowGroup'],
- prop,
- i = 6;
- while (i--) {
- prop = props[i];
- if (point[prop]) {
- point[prop] = point[prop].destroy();
- }
- }
- },
-
- /**
- * Return the configuration hash needed for the data label and tooltip formatters
- */
- getLabelConfig: function () {
- var point = this;
- return {
- x: point.category,
- y: point.y,
- key: point.name || point.category,
- series: point.series,
- point: point,
- percentage: point.percentage,
- total: point.total || point.stackTotal
- };
- },
-
- /**
- * Toggle the selection status of a point
- * @param {Boolean} selected Whether to select or unselect the point.
- * @param {Boolean} accumulate Whether to add to the previous selection. By default,
- * this happens if the control key (Cmd on Mac) was pressed during clicking.
- */
- select: function (selected, accumulate) {
- var point = this,
- series = point.series,
- chart = series.chart;
-
- selected = pick(selected, !point.selected);
-
- // fire the event with the defalut handler
- point.firePointEvent(selected ? 'select' : 'unselect', { accumulate: accumulate }, function () {
- point.selected = selected;
- point.setState(selected && SELECT_STATE);
-
- // unselect all other points unless Ctrl or Cmd + click
- if (!accumulate) {
- each(chart.getSelectedPoints(), function (loopPoint) {
- if (loopPoint.selected && loopPoint !== point) {
- loopPoint.selected = false;
- loopPoint.setState(NORMAL_STATE);
- loopPoint.firePointEvent('unselect');
- }
- });
- }
- });
- },
-
- onMouseOver: function () {
- var point = this,
- series = point.series,
- chart = series.chart,
- tooltip = chart.tooltip,
- hoverPoint = chart.hoverPoint;
-
- // set normal state to previous series
- if (hoverPoint && hoverPoint !== point) {
- hoverPoint.onMouseOut();
- }
-
- // trigger the event
- point.firePointEvent('mouseOver');
-
- // update the tooltip
- if (tooltip && (!tooltip.shared || series.noSharedTooltip)) {
- tooltip.refresh(point);
- }
-
- // hover this
- point.setState(HOVER_STATE);
- chart.hoverPoint = point;
- },
-
- onMouseOut: function () {
- var point = this;
- point.firePointEvent('mouseOut');
-
- point.setState();
- point.series.chart.hoverPoint = null;
- },
-
- /**
- * Extendable method for formatting each point's tooltip line
- *
- * @return {String} A string to be concatenated in to the common tooltip text
- */
- tooltipFormatter: function (pointFormat) {
- var point = this,
- series = point.series,
- seriesTooltipOptions = series.tooltipOptions,
- match = pointFormat.match(/\{(series|point)\.[a-zA-Z]+\}/g),
- splitter = /[{\.}]/,
- obj,
- key,
- replacement,
- repOptionKey,
- parts,
- prop,
- i,
- cfg = { // docs: percentageDecimals, percentagePrefix, percentageSuffix, totalDecimals, totalPrefix, totalSuffix
- y: 0, // 0: use 'value' for repOptionKey
- open: 0,
- high: 0,
- low: 0,
- close: 0,
- percentage: 1, // 1: use the self name for repOptionKey
- total: 1
- };
-
- // Backwards compatibility to y naming in early Highstock
- seriesTooltipOptions.valuePrefix = seriesTooltipOptions.valuePrefix || seriesTooltipOptions.yPrefix;
- seriesTooltipOptions.valueDecimals = seriesTooltipOptions.valueDecimals || seriesTooltipOptions.yDecimals;
- seriesTooltipOptions.valueSuffix = seriesTooltipOptions.valueSuffix || seriesTooltipOptions.ySuffix;
-
- // loop over the variables defined on the form {series.name}, {point.y} etc
- for (i in match) {
- key = match[i];
- if (isString(key) && key !== pointFormat) { // IE matches more than just the variables
-
- // Split it further into parts
- parts = (' ' + key).split(splitter); // add empty string because IE and the rest handles it differently
- obj = { 'point': point, 'series': series }[parts[1]];
- prop = parts[2];
-
- // Add some preformatting
- if (obj === point && cfg.hasOwnProperty(prop)) {
- repOptionKey = cfg[prop] ? prop : 'value';
- replacement = (seriesTooltipOptions[repOptionKey + 'Prefix'] || '') +
- numberFormat(point[prop], pick(seriesTooltipOptions[repOptionKey + 'Decimals'], -1)) +
- (seriesTooltipOptions[repOptionKey + 'Suffix'] || '');
-
- // Automatic replacement
- } else {
- replacement = obj[prop];
- }
-
- pointFormat = pointFormat.replace(key, replacement);
- }
- }
-
- return pointFormat;
- },
-
- /**
- * Update the point with new options (typically x/y data) and optionally redraw the series.
- *
- * @param {Object} options Point options as defined in the series.data array
- * @param {Boolean} redraw Whether to redraw the chart or wait for an explicit call
- * @param {Boolean|Object} animation Whether to apply animation, and optionally animation
- * configuration
- *
- */
- update: function (options, redraw, animation) {
- var point = this,
- series = point.series,
- graphic = point.graphic,
- i,
- data = series.data,
- dataLength = data.length,
- chart = series.chart;
-
- redraw = pick(redraw, true);
-
- // fire the event with a default handler of doing the update
- point.firePointEvent('update', { options: options }, function () {
-
- point.applyOptions(options);
-
- // update visuals
- if (isObject(options)) {
- series.getAttribs();
- if (graphic) {
- graphic.attr(point.pointAttr[series.state]);
- }
- }
-
- // record changes in the parallel arrays
- for (i = 0; i < dataLength; i++) {
- if (data[i] === point) {
- series.xData[i] = point.x;
- series.yData[i] = point.y;
- series.options.data[i] = options;
- break;
- }
- }
-
- // redraw
- series.isDirty = true;
- series.isDirtyData = true;
- if (redraw) {
- chart.redraw(animation);
- }
- });
- },
-
- /**
- * Remove a point and optionally redraw the series and if necessary the axes
- * @param {Boolean} redraw Whether to redraw the chart or wait for an explicit call
- * @param {Boolean|Object} animation Whether to apply animation, and optionally animation
- * configuration
- */
- remove: function (redraw, animation) {
- var point = this,
- series = point.series,
- chart = series.chart,
- i,
- data = series.data,
- dataLength = data.length;
-
- setAnimation(animation, chart);
- redraw = pick(redraw, true);
-
- // fire the event with a default handler of removing the point
- point.firePointEvent('remove', null, function () {
-
- //erase(series.data, point);
-
- for (i = 0; i < dataLength; i++) {
- if (data[i] === point) {
-
- // splice all the parallel arrays
- data.splice(i, 1);
- series.options.data.splice(i, 1);
- series.xData.splice(i, 1);
- series.yData.splice(i, 1);
- break;
- }
- }
-
- point.destroy();
-
-
- // redraw
- series.isDirty = true;
- series.isDirtyData = true;
- if (redraw) {
- chart.redraw();
- }
- });
-
-
- },
-
- /**
- * Fire an event on the Point object. Must not be renamed to fireEvent, as this
- * causes a name clash in MooTools
- * @param {String} eventType
- * @param {Object} eventArgs Additional event arguments
- * @param {Function} defaultFunction Default event handler
- */
- firePointEvent: function (eventType, eventArgs, defaultFunction) {
- var point = this,
- series = this.series,
- seriesOptions = series.options;
-
- // load event handlers on demand to save time on mouseover/out
- if (seriesOptions.point.events[eventType] || (point.options && point.options.events && point.options.events[eventType])) {
- this.importEvents();
- }
-
- // add default handler if in selection mode
- if (eventType === 'click' && seriesOptions.allowPointSelect) {
- defaultFunction = function (event) {
- // Control key is for Windows, meta (= Cmd key) for Mac, Shift for Opera
- point.select(null, event.ctrlKey || event.metaKey || event.shiftKey);
- };
- }
-
- fireEvent(this, eventType, eventArgs, defaultFunction);
- },
- /**
- * Import events from the series' and point's options. Only do it on
- * demand, to save processing time on hovering.
- */
- importEvents: function () {
- if (!this.hasImportedEvents) {
- var point = this,
- options = merge(point.series.options.point, point.options),
- events = options.events,
- eventType;
-
- point.events = events;
-
- for (eventType in events) {
- addEvent(point, eventType, events[eventType]);
- }
- this.hasImportedEvents = true;
-
- }
- },
-
- /**
- * Set the point's state
- * @param {String} state
- */
- setState: function (state) {
- var point = this,
- plotX = point.plotX,
- plotY = point.plotY,
- series = point.series,
- stateOptions = series.options.states,
- markerOptions = defaultPlotOptions[series.type].marker && series.options.marker,
- normalDisabled = markerOptions && !markerOptions.enabled,
- markerStateOptions = markerOptions && markerOptions.states[state],
- stateDisabled = markerStateOptions && markerStateOptions.enabled === false,
- stateMarkerGraphic = series.stateMarkerGraphic,
- chart = series.chart,
- radius,
- pointAttr = point.pointAttr;
-
- state = state || NORMAL_STATE; // empty string
-
- if (
- // already has this state
- state === point.state ||
- // selected points don't respond to hover
- (point.selected && state !== SELECT_STATE) ||
- // series' state options is disabled
- (stateOptions[state] && stateOptions[state].enabled === false) ||
- // point marker's state options is disabled
- (state && (stateDisabled || (normalDisabled && !markerStateOptions.enabled)))
-
- ) {
- return;
- }
-
- // apply hover styles to the existing point
- if (point.graphic) {
- radius = markerOptions && point.graphic.symbolName && pointAttr[state].r;
- point.graphic.attr(merge(
- pointAttr[state],
- radius ? { // new symbol attributes (#507, #612)
- x: plotX - radius,
- y: plotY - radius,
- width: 2 * radius,
- height: 2 * radius
- } : {}
- ));
- } else {
- // if a graphic is not applied to each point in the normal state, create a shared
- // graphic for the hover state
- if (state && markerStateOptions) {
- if (!stateMarkerGraphic) {
- radius = markerStateOptions.radius;
- series.stateMarkerGraphic = stateMarkerGraphic = chart.renderer.symbol(
- series.symbol,
- -radius,
- -radius,
- 2 * radius,
- 2 * radius
- )
- .attr(pointAttr[state])
- .add(series.group);
- }
-
- stateMarkerGraphic.translate(
- plotX,
- plotY
- );
- }
-
- if (stateMarkerGraphic) {
- stateMarkerGraphic[state ? 'show' : 'hide']();
- }
- }
-
- point.state = state;
- }
- };
-
- /**
- * @classDescription The base function which all other series types inherit from. The data in the series is stored
- * in various arrays.
- *
- * - First, series.options.data contains all the original config options for
- * each point whether added by options or methods like series.addPoint.
- * - Next, series.data contains those values converted to points, but in case the series data length
- * exceeds the cropThreshold, or if the data is grouped, series.data doesn't contain all the points. It
- * only contains the points that have been created on demand.
- * - Then there's series.points that contains all currently visible point objects. In case of cropping,
- * the cropped-away points are not part of this array. The series.points array starts at series.cropStart
- * compared to series.data and series.options.data. If however the series data is grouped, these can't
- * be correlated one to one.
- * - series.xData and series.processedXData contain clean x values, equivalent to series.data and series.points.
- * - series.yData and series.processedYData contain clean x values, equivalent to series.data and series.points.
- *
- * @param {Object} chart
- * @param {Object} options
- */
- var Series = function () {
- };
-
- Series.prototype = {
-
- isCartesian: true,
- type: 'line',
- pointClass: Point,
- sorted: true, // requires the data to be sorted
- pointAttrToOptions: { // mapping between SVG attributes and the corresponding options
- stroke: 'lineColor',
- 'stroke-width': 'lineWidth',
- fill: 'fillColor',
- r: 'radius'
- },
- init: function (chart, options) {
- var series = this,
- eventType,
- events,
- //pointEvent,
- index = chart.series.length;
-
- series.chart = chart;
- series.options = options = series.setOptions(options); // merge with plotOptions
-
- // bind the axes
- series.bindAxes();
-
- // set some variables
- extend(series, {
- index: index,
- name: options.name || 'Series ' + (index + 1),
- state: NORMAL_STATE,
- pointAttr: {},
- visible: options.visible !== false, // true by default
- selected: options.selected === true // false by default
- });
-
- // special
- if (useCanVG) {
- options.animation = false;
- }
-
- // register event listeners
- events = options.events;
- for (eventType in events) {
- addEvent(series, eventType, events[eventType]);
- }
- if (
- (events && events.click) ||
- (options.point && options.point.events && options.point.events.click) ||
- options.allowPointSelect
- ) {
- chart.runTrackerClick = true;
- }
-
- series.getColor();
- series.getSymbol();
-
- // set the data
- series.setData(options.data, false);
-
- // Mark cartesian
- if (series.isCartesian) {
- chart.hasCartesianSeries = true;
- }
-
- // Register it in the chart
- chart.series.push(series);
- },
-
- /**
- * Set the xAxis and yAxis properties of cartesian series, and register the series
- * in the axis.series array
- */
- bindAxes: function () {
- var series = this,
- seriesOptions = series.options,
- chart = series.chart,
- axisOptions;
-
- if (series.isCartesian) {
-
- each(['xAxis', 'yAxis'], function (AXIS) { // repeat for xAxis and yAxis
-
- each(chart[AXIS], function (axis) { // loop through the chart's axis objects
-
- axisOptions = axis.options;
-
- // apply if the series xAxis or yAxis option mathches the number of the
- // axis, or if undefined, use the first axis
- if ((seriesOptions[AXIS] === axisOptions.index) ||
- (seriesOptions[AXIS] === UNDEFINED && axisOptions.index === 0)) {
-
- // register this series in the axis.series lookup
- axis.series.push(series);
-
- // set this series.xAxis or series.yAxis reference
- series[AXIS] = axis;
-
- // mark dirty for redraw
- axis.isDirty = true;
- }
- });
-
- });
- }
- },
-
-
- /**
- * Return an auto incremented x value based on the pointStart and pointInterval options.
- * This is only used if an x value is not given for the point that calls autoIncrement.
- */
- autoIncrement: function () {
- var series = this,
- options = series.options,
- xIncrement = series.xIncrement;
-
- xIncrement = pick(xIncrement, options.pointStart, 0);
-
- series.pointInterval = pick(series.pointInterval, options.pointInterval, 1);
-
- series.xIncrement = xIncrement + series.pointInterval;
- return xIncrement;
- },
-
- /**
- * Divide the series data into segments divided by null values.
- */
- getSegments: function () {
- var series = this,
- lastNull = -1,
- segments = [],
- i,
- points = series.points,
- pointsLength = points.length;
-
- if (pointsLength) { // no action required for []
-
- // if connect nulls, just remove null points
- if (series.options.connectNulls) {
- i = pointsLength;
- while (i--) {
- if (points[i].y === null) {
- points.splice(i, 1);
- }
- }
- if (points.length) {
- segments = [points];
- }
-
- // else, split on null points
- } else {
- each(points, function (point, i) {
- if (point.y === null) {
- if (i > lastNull + 1) {
- segments.push(points.slice(lastNull + 1, i));
- }
- lastNull = i;
- } else if (i === pointsLength - 1) { // last value
- segments.push(points.slice(lastNull + 1, i + 1));
- }
- });
- }
- }
-
- // register it
- series.segments = segments;
- },
- /**
- * Set the series options by merging from the options tree
- * @param {Object} itemOptions
- */
- setOptions: function (itemOptions) {
- var series = this,
- chart = series.chart,
- chartOptions = chart.options,
- plotOptions = chartOptions.plotOptions,
- data = itemOptions.data,
- options;
-
- itemOptions.data = null; // remove from merge to prevent looping over the data set
-
- options = merge(
- plotOptions[this.type],
- plotOptions.series,
- itemOptions
- );
-
- // Re-insert the data array to the options and the original config (#717)
- options.data = itemOptions.data = data;
-
- // the tooltip options are merged between global and series specific options
- series.tooltipOptions = merge(chartOptions.tooltip, options.tooltip);
-
- return options;
-
- },
- /**
- * Get the series' color
- */
- getColor: function () {
- var options = this.options,
- defaultColors = this.chart.options.colors,
- counters = this.chart.counters;
- this.color = options.color ||
- (!options.colorByPoint && defaultColors[counters.color++]) || 'gray';
- counters.wrapColor(defaultColors.length);
- },
- /**
- * Get the series' symbol
- */
- getSymbol: function () {
- var series = this,
- seriesMarkerOption = series.options.marker,
- chart = series.chart,
- defaultSymbols = chart.options.symbols,
- counters = chart.counters;
- series.symbol = seriesMarkerOption.symbol || defaultSymbols[counters.symbol++];
-
- // don't substract radius in image symbols (#604)
- if (/^url/.test(series.symbol)) {
- seriesMarkerOption.radius = 0;
- }
- counters.wrapSymbol(defaultSymbols.length);
- },
-
- /**
- * Get the series' symbol in the legend. This method should be overridable to create custom
- * symbols through Highcharts.seriesTypes[type].prototype.drawLegendSymbols.
- *
- * @param {Object} legend The legend object
- */
- drawLegendSymbol: function (legend) {
-
- var options = this.options,
- markerOptions = options.marker,
- radius,
- legendOptions = legend.options,
- legendSymbol,
- symbolWidth = legendOptions.symbolWidth,
- renderer = this.chart.renderer,
- legendItemGroup = this.legendGroup,
- baseline = legend.baseline,
- attr;
-
- // Draw the line
- if (options.lineWidth) {
- attr = {
- 'stroke-width': options.lineWidth
- };
- if (options.dashStyle) {
- attr.dashstyle = options.dashStyle;
- }
- this.legendLine = renderer.path([
- M,
- 0,
- baseline - 4,
- L,
- symbolWidth,
- baseline - 4
- ])
- .attr(attr)
- .add(legendItemGroup);
- }
-
- // Draw the marker
- if (markerOptions && markerOptions.enabled) {
- radius = markerOptions.radius;
- this.legendSymbol = legendSymbol = renderer.symbol(
- this.symbol,
- (symbolWidth / 2) - radius,
- baseline - 4 - radius,
- 2 * radius,
- 2 * radius
- )
- .attr(this.pointAttr[NORMAL_STATE])
- .add(legendItemGroup);
- }
- },
-
- /**
- * Add a point dynamically after chart load time
- * @param {Object} options Point options as given in series.data
- * @param {Boolean} redraw Whether to redraw the chart or wait for an explicit call
- * @param {Boolean} shift If shift is true, a point is shifted off the start
- * of the series as one is appended to the end.
- * @param {Boolean|Object} animation Whether to apply animation, and optionally animation
- * configuration
- */
- addPoint: function (options, redraw, shift, animation) {
- var series = this,
- data = series.data,
- graph = series.graph,
- area = series.area,
- chart = series.chart,
- xData = series.xData,
- yData = series.yData,
- currentShift = (graph && graph.shift) || 0,
- dataOptions = series.options.data,
- point;
- //point = (new series.pointClass()).init(series, options);
-
- setAnimation(animation, chart);
-
- // Make graph animate sideways
- if (graph && shift) {
- graph.shift = currentShift + 1;
- }
- if (area) {
- if (shift) { // #780
- area.shift = currentShift + 1;
- }
- area.isArea = true; // needed in animation, both with and without shift
- }
-
- // Optional redraw, defaults to true
- redraw = pick(redraw, true);
-
- // Get options and push the point to xData, yData and series.options. In series.generatePoints
- // the Point instance will be created on demand and pushed to the series.data array.
- point = { series: series };
- series.pointClass.prototype.applyOptions.apply(point, [options]);
- xData.push(point.x);
- yData.push(series.valueCount === 4 ? [point.open, point.high, point.low, point.close] : point.y);
- dataOptions.push(options);
-
-
- // Shift the first point off the parallel arrays
- // todo: consider series.removePoint(i) method
- if (shift) {
- if (data[0] && data[0].remove) {
- data[0].remove(false);
- } else {
- data.shift();
- xData.shift();
- yData.shift();
- dataOptions.shift();
- }
- }
- series.getAttribs();
-
- // redraw
- series.isDirty = true;
- series.isDirtyData = true;
- if (redraw) {
- chart.redraw();
- }
- },
-
- /**
- * Replace the series data with a new set of data
- * @param {Object} data
- * @param {Object} redraw
- */
- setData: function (data, redraw) {
- var series = this,
- oldData = series.points,
- options = series.options,
- initialColor = series.initialColor,
- chart = series.chart,
- firstPoint = null,
- xAxis = series.xAxis,
- i,
- pointProto = series.pointClass.prototype;
-
- // reset properties
- series.xIncrement = null;
- series.pointRange = (xAxis && xAxis.categories && 1) || options.pointRange;
-
- if (defined(initialColor)) { // reset colors for pie
- chart.counters.color = initialColor;
- }
-
- // parallel arrays
- var xData = [],
- yData = [],
- dataLength = data ? data.length : [],
- turboThreshold = options.turboThreshold || 1000,
- pt,
- valueCount = series.valueCount;
-
- // In turbo mode, only one- or twodimensional arrays of numbers are allowed. The
- // first value is tested, and we assume that all the rest are defined the same
- // way. Although the 'for' loops are similar, they are repeated inside each
- // if-else conditional for max performance.
- if (dataLength > turboThreshold) {
-
- // find the first non-null point
- i = 0;
- while (firstPoint === null && i < dataLength) {
- firstPoint = data[i];
- i++;
- }
-
-
- if (isNumber(firstPoint)) { // assume all points are numbers
- var x = pick(options.pointStart, 0),
- pointInterval = pick(options.pointInterval, 1);
-
- for (i = 0; i < dataLength; i++) {
- xData[i] = x;
- yData[i] = data[i];
- x += pointInterval;
- }
- series.xIncrement = x;
- } else if (isArray(firstPoint)) { // assume all points are arrays
- if (valueCount) { // [x, low, high] or [x, o, h, l, c]
- for (i = 0; i < dataLength; i++) {
- pt = data[i];
- xData[i] = pt[0];
- yData[i] = pt.slice(1, valueCount + 1);
- }
- } else { // [x, y]
- for (i = 0; i < dataLength; i++) {
- pt = data[i];
- xData[i] = pt[0];
- yData[i] = pt[1];
- }
- }
- }
- /* else {
- error(12); // Highcharts expects configs to be numbers or arrays in turbo mode
- }*/
- } else {
- for (i = 0; i < dataLength; i++) {
- pt = { series: series };
- pointProto.applyOptions.apply(pt, [data[i]]);
- xData[i] = pt.x;
- yData[i] = pointProto.toYData ? pointProto.toYData.apply(pt) : pt.y;
- }
- }
-
- series.data = [];
- series.options.data = data;
- series.xData = xData;
- series.yData = yData;
-
- // destroy old points
- i = (oldData && oldData.length) || 0;
- while (i--) {
- if (oldData[i] && oldData[i].destroy) {
- oldData[i].destroy();
- }
- }
-
- // reset minRange (#878)
- if (xAxis) {
- xAxis.minRange = xAxis.userMinRange;
- }
-
- // redraw
- series.isDirty = series.isDirtyData = chart.isDirtyBox = true;
- if (pick(redraw, true)) {
- chart.redraw(false);
- }
- },
-
- /**
- * Remove a series and optionally redraw the chart
- *
- * @param {Boolean} redraw Whether to redraw the chart or wait for an explicit call
- * @param {Boolean|Object} animation Whether to apply animation, and optionally animation
- * configuration
- */
-
- remove: function (redraw, animation) {
- var series = this,
- chart = series.chart;
- redraw = pick(redraw, true);
-
- if (!series.isRemoving) { /* prevent triggering native event in jQuery
- (calling the remove function from the remove event) */
- series.isRemoving = true;
-
- // fire the event with a default handler of removing the point
- fireEvent(series, 'remove', null, function () {
-
-
- // destroy elements
- series.destroy();
-
-
- // redraw
- chart.isDirtyLegend = chart.isDirtyBox = true;
- if (redraw) {
- chart.redraw(animation);
- }
- });
-
- }
- series.isRemoving = false;
- },
-
- /**
- * Process the data by cropping away unused data points if the series is longer
- * than the crop threshold. This saves computing time for lage series.
- */
- processData: function (force) {
- var series = this,
- processedXData = series.xData, // copied during slice operation below
- processedYData = series.yData,
- dataLength = processedXData.length,
- cropStart = 0,
- cropEnd = dataLength,
- cropped,
- distance,
- closestPointRange,
- xAxis = series.xAxis,
- i, // loop variable
- options = series.options,
- cropThreshold = options.cropThreshold,
- isCartesian = series.isCartesian;
-
- // If the series data or axes haven't changed, don't go through this. Return false to pass
- // the message on to override methods like in data grouping.
- if (isCartesian && !series.isDirty && !xAxis.isDirty && !series.yAxis.isDirty && !force) {
- return false;
- }
-
- // optionally filter out points outside the plot area
- if (isCartesian && series.sorted && (!cropThreshold || dataLength > cropThreshold || series.forceCrop)) {
- var extremes = xAxis.getExtremes(),
- min = extremes.min,
- max = extremes.max;
-
- // it's outside current extremes
- if (processedXData[dataLength - 1] < min || processedXData[0] > max) {
- processedXData = [];
- processedYData = [];
-
- // only crop if it's actually spilling out
- } else if (processedXData[0] < min || processedXData[dataLength - 1] > max) {
-
- // iterate up to find slice start
- for (i = 0; i < dataLength; i++) {
- if (processedXData[i] >= min) {
- cropStart = mathMax(0, i - 1);
- break;
- }
- }
- // proceed to find slice end
- for (; i < dataLength; i++) {
- if (processedXData[i] > max) {
- cropEnd = i + 1;
- break;
- }
-
- }
- processedXData = processedXData.slice(cropStart, cropEnd);
- processedYData = processedYData.slice(cropStart, cropEnd);
- cropped = true;
- }
- }
-
-
- // Find the closest distance between processed points
- for (i = processedXData.length - 1; i > 0; i--) {
- distance = processedXData[i] - processedXData[i - 1];
- if (distance > 0 && (closestPointRange === UNDEFINED || distance < closestPointRange)) {
- closestPointRange = distance;
- }
- }
-
- // Record the properties
- series.cropped = cropped; // undefined or true
- series.cropStart = cropStart;
- series.processedXData = processedXData;
- series.processedYData = processedYData;
-
- if (options.pointRange === null) { // null means auto, as for columns, candlesticks and OHLC
- series.pointRange = closestPointRange || 1;
- }
- series.closestPointRange = closestPointRange;
-
- },
-
- /**
- * Generate the data point after the data has been processed by cropping away
- * unused points and optionally grouped in Highcharts Stock.
- */
- generatePoints: function () {
- var series = this,
- options = series.options,
- dataOptions = options.data,
- data = series.data,
- dataLength,
- processedXData = series.processedXData,
- processedYData = series.processedYData,
- pointClass = series.pointClass,
- processedDataLength = processedXData.length,
- cropStart = series.cropStart || 0,
- cursor,
- hasGroupedData = series.hasGroupedData,
- point,
- points = [],
- i;
-
- if (!data && !hasGroupedData) {
- var arr = [];
- arr.length = dataOptions.length;
- data = series.data = arr;
- }
-
- for (i = 0; i < processedDataLength; i++) {
- cursor = cropStart + i;
- if (!hasGroupedData) {
- if (data[cursor]) {
- point = data[cursor];
- } else if (dataOptions[cursor] !== UNDEFINED) { // #970
- data[cursor] = point = (new pointClass()).init(series, dataOptions[cursor], processedXData[i]);
- }
- points[i] = point;
- } else {
- // splat the y data in case of ohlc data array
- points[i] = (new pointClass()).init(series, [processedXData[i]].concat(splat(processedYData[i])));
- }
- }
-
- // Hide cropped-away points - this only runs when the number of points is above cropThreshold, or when
- // swithching view from non-grouped data to grouped data (#637)
- if (data && (processedDataLength !== (dataLength = data.length) || hasGroupedData)) {
- for (i = 0; i < dataLength; i++) {
- if (i === cropStart && !hasGroupedData) { // when has grouped data, clear all points
- i += processedDataLength;
- }
- if (data[i]) {
- data[i].destroyElements();
- data[i].plotX = UNDEFINED; // #1003
- }
- }
- }
-
- series.data = data;
- series.points = points;
- },
-
- /**
- * Translate data points from raw data values to chart specific positioning data
- * needed later in drawPoints, drawGraph and drawTracker.
- */
- translate: function () {
- if (!this.processedXData) { // hidden series
- this.processData();
- }
- this.generatePoints();
- var series = this,
- chart = series.chart,
- options = series.options,
- stacking = options.stacking,
- xAxis = series.xAxis,
- categories = xAxis.categories,
- yAxis = series.yAxis,
- points = series.points,
- dataLength = points.length,
- hasModifyValue = !!series.modifyValue,
- isLastSeries,
- allStackSeries = yAxis.series,
- i = allStackSeries.length;
-
- // Is it the last visible series?
- while (i--) {
- if (allStackSeries[i].visible) {
- if (i === series.index) {
- isLastSeries = true;
- }
- break;
- }
- }
-
- // Translate each point
- for (i = 0; i < dataLength; i++) {
- var point = points[i],
- xValue = point.x,
- yValue = point.y,
- yBottom = point.low,
- stack = yAxis.stacks[(yValue < options.threshold ? '-' : '') + series.stackKey],
- pointStack,
- pointStackTotal;
-
- // get the plotX translation
- //point.plotX = mathRound(xAxis.translate(xValue, 0, 0, 0, 1) * 10) / 10; // Math.round fixes #591
- point.plotX = xAxis.translate(xValue, 0, 0, 0, 1); // Math.round fixes #591
-
- // calculate the bottom y value for stacked series
- if (stacking && series.visible && stack && stack[xValue]) {
- pointStack = stack[xValue];
- pointStackTotal = pointStack.total;
- pointStack.cum = yBottom = pointStack.cum - yValue; // start from top
- yValue = yBottom + yValue;
-
- if (isLastSeries) {
- yBottom = options.threshold;
- }
-
- if (stacking === 'percent') {
- yBottom = pointStackTotal ? yBottom * 100 / pointStackTotal : 0;
- yValue = pointStackTotal ? yValue * 100 / pointStackTotal : 0;
- }
-
- point.percentage = pointStackTotal ? point.y * 100 / pointStackTotal : 0;
- point.stackTotal = pointStackTotal;
- point.stackY = yValue;
- }
-
- // Set translated yBottom or remove it
- point.yBottom = defined(yBottom) ?
- yAxis.translate(yBottom, 0, 1, 0, 1) :
- null;
-
- // general hook, used for Highstock compare mode
- if (hasModifyValue) {
- yValue = series.modifyValue(yValue, point);
- }
-
- // Set the the plotY value, reset it for redraws
- point.plotY = (typeof yValue === 'number') ?
- mathRound(yAxis.translate(yValue, 0, 1, 0, 1) * 10) / 10 : // Math.round fixes #591
- UNDEFINED;
-
- // set client related positions for mouse tracking
- point.clientX = chart.inverted ?
- chart.plotHeight - point.plotX :
- point.plotX; // for mouse tracking
-
- // some API data
- point.category = categories && categories[point.x] !== UNDEFINED ?
- categories[point.x] : point.x;
-
-
- }
-
- // now that we have the cropped data, build the segments
- series.getSegments();
- },
- /**
- * Memoize tooltip texts and positions
- */
- setTooltipPoints: function (renew) {
- var series = this,
- chart = series.chart,
- points = [],
- pointsLength,
- plotSize = chart.plotSizeX,
- low,
- high,
- xAxis = series.xAxis,
- point,
- i,
- tooltipPoints = []; // a lookup array for each pixel in the x dimension
-
- // don't waste resources if tracker is disabled
- if (series.options.enableMouseTracking === false) {
- return;
- }
-
- // renew
- if (renew) {
- series.tooltipPoints = null;
- }
-
- // concat segments to overcome null values
- each(series.segments || series.points, function (segment) {
- points = points.concat(segment);
- });
-
- // loop the concatenated points and apply each point to all the closest
- // pixel positions
- if (xAxis && xAxis.reversed) {
- points = points.reverse();
- }
-
- // Assign each pixel position to the nearest point
- pointsLength = points.length;
- for (i = 0; i < pointsLength; i++) {
- point = points[i];
- low = points[i - 1] ? points[i - 1]._high + 1 : 0;
- point._high = high = points[i + 1] ?
- mathMax(0, mathFloor((point.plotX + (points[i + 1] ? points[i + 1].plotX : plotSize)) / 2)) :
- plotSize;
-
- while (low >= 0 && low <= high) {
- tooltipPoints[low++] = point;
- }
- }
- series.tooltipPoints = tooltipPoints;
- },
-
- /**
- * Format the header of the tooltip
- */
- tooltipHeaderFormatter: function (key) {
- var series = this,
- tooltipOptions = series.tooltipOptions,
- xDateFormat = tooltipOptions.xDateFormat,
- xAxis = series.xAxis,
- isDateTime = xAxis && xAxis.options.type === 'datetime',
- n;
-
- // Guess the best date format based on the closest point distance (#568)
- if (isDateTime && !xDateFormat) {
- for (n in timeUnits) {
- if (timeUnits[n] >= xAxis.closestPointRange) {
- xDateFormat = tooltipOptions.dateTimeLabelFormats[n];
- break;
- }
- }
- }
-
- return tooltipOptions.headerFormat
- .replace('{point.key}', isDateTime ? dateFormat(xDateFormat, key) : key)
- .replace('{series.name}', series.name)
- .replace('{series.color}', series.color);
- },
-
- /**
- * Series mouse over handler
- */
- onMouseOver: function () {
- var series = this,
- chart = series.chart,
- hoverSeries = chart.hoverSeries;
-
- if (!hasTouch && chart.mouseIsDown) {
- return;
- }
-
- // set normal state to previous series
- if (hoverSeries && hoverSeries !== series) {
- hoverSeries.onMouseOut();
- }
-
- // trigger the event, but to save processing time,
- // only if defined
- if (series.options.events.mouseOver) {
- fireEvent(series, 'mouseOver');
- }
-
- // hover this
- series.setState(HOVER_STATE);
- chart.hoverSeries = series;
- },
-
- /**
- * Series mouse out handler
- */
- onMouseOut: function () {
- // trigger the event only if listeners exist
- var series = this,
- options = series.options,
- chart = series.chart,
- tooltip = chart.tooltip,
- hoverPoint = chart.hoverPoint;
-
- // trigger mouse out on the point, which must be in this series
- if (hoverPoint) {
- hoverPoint.onMouseOut();
- }
-
- // fire the mouse out event
- if (series && options.events.mouseOut) {
- fireEvent(series, 'mouseOut');
- }
-
-
- // hide the tooltip
- if (tooltip && !options.stickyTracking && !tooltip.shared) {
- tooltip.hide();
- }
-
- // set normal state
- series.setState();
- chart.hoverSeries = null;
- },
-
- /**
- * Animate in the series
- */
- animate: function (init) {
- var series = this,
- chart = series.chart,
- clipRect = series.clipRect,
- animation = series.options.animation;
-
- if (animation && !isObject(animation)) {
- animation = {};
- }
-
- if (init) { // initialize the animation
- if (!clipRect.isAnimating) { // apply it only for one of the series
- clipRect.attr('width', 0);
- clipRect.isAnimating = true;
- }
-
- } else { // run the animation
- clipRect.animate({
- width: chart.plotSizeX
- }, animation);
-
- // delete this function to allow it only once
- this.animate = null;
- }
- },
-
-
- /**
- * Draw the markers
- */
- drawPoints: function () {
- var series = this,
- pointAttr,
- points = series.points,
- chart = series.chart,
- plotX,
- plotY,
- i,
- point,
- radius,
- symbol,
- isImage,
- graphic;
-
- if (series.options.marker.enabled) {
- i = points.length;
- while (i--) {
- point = points[i];
- plotX = point.plotX;
- plotY = point.plotY;
- graphic = point.graphic;
-
- // only draw the point if y is defined
- if (plotY !== UNDEFINED && !isNaN(plotY)) {
-
- // shortcuts
- pointAttr = point.pointAttr[point.selected ? SELECT_STATE : NORMAL_STATE];
- radius = pointAttr.r;
- symbol = pick(point.marker && point.marker.symbol, series.symbol);
- isImage = symbol.indexOf('url') === 0;
-
- if (graphic) { // update
- graphic.animate(extend({
- x: plotX - radius,
- y: plotY - radius
- }, graphic.symbolName ? { // don't apply to image symbols #507
- width: 2 * radius,
- height: 2 * radius
- } : {}));
- } else if (radius > 0 || isImage) {
- point.graphic = chart.renderer.symbol(
- symbol,
- plotX - radius,
- plotY - radius,
- 2 * radius,
- 2 * radius
- )
- .attr(pointAttr)
- .add(series.group);
- }
- }
- }
- }
-
- },
-
- /**
- * Convert state properties from API naming conventions to SVG attributes
- *
- * @param {Object} options API options object
- * @param {Object} base1 SVG attribute object to inherit from
- * @param {Object} base2 Second level SVG attribute object to inherit from
- */
- convertAttribs: function (options, base1, base2, base3) {
- var conversion = this.pointAttrToOptions,
- attr,
- option,
- obj = {};
-
- options = options || {};
- base1 = base1 || {};
- base2 = base2 || {};
- base3 = base3 || {};
-
- for (attr in conversion) {
- option = conversion[attr];
- obj[attr] = pick(options[option], base1[attr], base2[attr], base3[attr]);
- }
- return obj;
- },
-
- /**
- * Get the state attributes. Each series type has its own set of attributes
- * that are allowed to change on a point's state change. Series wide attributes are stored for
- * all series, and additionally point specific attributes are stored for all
- * points with individual marker options. If such options are not defined for the point,
- * a reference to the series wide attributes is stored in point.pointAttr.
- */
- getAttribs: function () {
- var series = this,
- normalOptions = defaultPlotOptions[series.type].marker ? series.options.marker : series.options,
- stateOptions = normalOptions.states,
- stateOptionsHover = stateOptions[HOVER_STATE],
- pointStateOptionsHover,
- seriesColor = series.color,
- normalDefaults = {
- stroke: seriesColor,
- fill: seriesColor
- },
- points = series.points || [], // #927
- i,
- point,
- seriesPointAttr = [],
- pointAttr,
- pointAttrToOptions = series.pointAttrToOptions,
- hasPointSpecificOptions,
- key;
-
- // series type specific modifications
- if (series.options.marker) { // line, spline, area, areaspline, scatter
-
- // if no hover radius is given, default to normal radius + 2
- stateOptionsHover.radius = stateOptionsHover.radius || normalOptions.radius + 2;
- stateOptionsHover.lineWidth = stateOptionsHover.lineWidth || normalOptions.lineWidth + 1;
-
- } else { // column, bar, pie
-
- // if no hover color is given, brighten the normal color
- stateOptionsHover.color = stateOptionsHover.color ||
- Color(stateOptionsHover.color || seriesColor)
- .brighten(stateOptionsHover.brightness).get();
- }
-
- // general point attributes for the series normal state
- seriesPointAttr[NORMAL_STATE] = series.convertAttribs(normalOptions, normalDefaults);
-
- // HOVER_STATE and SELECT_STATE states inherit from normal state except the default radius
- each([HOVER_STATE, SELECT_STATE], function (state) {
- seriesPointAttr[state] =
- series.convertAttribs(stateOptions[state], seriesPointAttr[NORMAL_STATE]);
- });
-
- // set it
- series.pointAttr = seriesPointAttr;
-
-
- // Generate the point-specific attribute collections if specific point
- // options are given. If not, create a referance to the series wide point
- // attributes
- i = points.length;
- while (i--) {
- point = points[i];
- normalOptions = (point.options && point.options.marker) || point.options;
- if (normalOptions && normalOptions.enabled === false) {
- normalOptions.radius = 0;
- }
- hasPointSpecificOptions = false;
-
- // check if the point has specific visual options
- if (point.options) {
- for (key in pointAttrToOptions) {
- if (defined(normalOptions[pointAttrToOptions[key]])) {
- hasPointSpecificOptions = true;
- }
- }
- }
-
-
- // a specific marker config object is defined for the individual point:
- // create it's own attribute collection
- if (hasPointSpecificOptions) {
-
- pointAttr = [];
- stateOptions = normalOptions.states || {}; // reassign for individual point
- pointStateOptionsHover = stateOptions[HOVER_STATE] = stateOptions[HOVER_STATE] || {};
-
- // if no hover color is given, brighten the normal color
- if (!series.options.marker) { // column, bar, point
- pointStateOptionsHover.color =
- Color(pointStateOptionsHover.color || point.options.color)
- .brighten(pointStateOptionsHover.brightness ||
- stateOptionsHover.brightness).get();
-
- }
-
- // normal point state inherits series wide normal state
- pointAttr[NORMAL_STATE] = series.convertAttribs(normalOptions, seriesPointAttr[NORMAL_STATE]);
-
- // inherit from point normal and series hover
- pointAttr[HOVER_STATE] = series.convertAttribs(
- stateOptions[HOVER_STATE],
- seriesPointAttr[HOVER_STATE],
- pointAttr[NORMAL_STATE]
- );
- // inherit from point normal and series hover
- pointAttr[SELECT_STATE] = series.convertAttribs(
- stateOptions[SELECT_STATE],
- seriesPointAttr[SELECT_STATE],
- pointAttr[NORMAL_STATE]
- );
-
-
- // no marker config object is created: copy a reference to the series-wide
- // attribute collection
- } else {
- pointAttr = seriesPointAttr;
- }
-
- point.pointAttr = pointAttr;
-
- }
-
- },
-
-
- /**
- * Clear DOM objects and free up memory
- */
- destroy: function () {
- var series = this,
- chart = series.chart,
- seriesClipRect = series.clipRect,
- issue134 = /AppleWebKit\/533/.test(userAgent),
- destroy,
- i,
- data = series.data || [],
- point,
- prop,
- axis;
-
- // add event hook
- fireEvent(series, 'destroy');
-
- // remove all events
- removeEvent(series);
-
- // erase from axes
- each(['xAxis', 'yAxis'], function (AXIS) {
- axis = series[AXIS];
- if (axis) {
- erase(axis.series, series);
- axis.isDirty = true;
- }
- });
-
- // remove legend items
- if (series.legendItem) {
- series.chart.legend.destroyItem(series);
- }
-
- // destroy all points with their elements
- i = data.length;
- while (i--) {
- point = data[i];
- if (point && point.destroy) {
- point.destroy();
- }
- }
- series.points = null;
-
- // If this series clipRect is not the global one (which is removed on chart.destroy) we
- // destroy it here.
- if (seriesClipRect && seriesClipRect !== chart.clipRect) {
- series.clipRect = seriesClipRect.destroy();
- }
-
- // destroy all SVGElements associated to the series
- each(['area', 'graph', 'dataLabelsGroup', 'group', 'tracker', 'trackerGroup'], function (prop) {
- if (series[prop]) {
-
- // issue 134 workaround
- destroy = issue134 && prop === 'group' ?
- 'hide' :
- 'destroy';
-
- series[prop][destroy]();
- }
- });
-
- // remove from hoverSeries
- if (chart.hoverSeries === series) {
- chart.hoverSeries = null;
- }
- erase(chart.series, series);
-
- // clear all members
- for (prop in series) {
- delete series[prop];
- }
- },
-
- /**
- * Draw the data labels
- */
- drawDataLabels: function () {
-
- var series = this,
- seriesOptions = series.options,
- options = seriesOptions.dataLabels;
-
- if (options.enabled || series._hasPointLabels) {
- var x,
- y,
- points = series.points,
- pointOptions,
- generalOptions,
- str,
- dataLabelsGroup = series.dataLabelsGroup,
- chart = series.chart,
- xAxis = series.xAxis,
- groupLeft = xAxis ? xAxis.left : chart.plotLeft,
- yAxis = series.yAxis,
- groupTop = yAxis ? yAxis.top : chart.plotTop,
- renderer = chart.renderer,
- inverted = chart.inverted,
- seriesType = series.type,
- stacking = seriesOptions.stacking,
- isBarLike = seriesType === 'column' || seriesType === 'bar',
- vAlignIsNull = options.verticalAlign === null,
- yIsNull = options.y === null,
- fontMetrics = renderer.fontMetrics(options.style.fontSize), // height and baseline
- fontLineHeight = fontMetrics.h,
- fontBaseline = fontMetrics.b,
- dataLabel,
- enabled;
-
- if (isBarLike) {
- var defaultYs = {
- top: fontBaseline,
- middle: fontBaseline - fontLineHeight / 2,
- bottom: -fontLineHeight + fontBaseline
- };
- if (stacking) {
- // In stacked series the default label placement is inside the bars
- if (vAlignIsNull) {
- options = merge(options, {verticalAlign: 'middle'});
- }
-
- // If no y delta is specified, try to create a good default
- if (yIsNull) {
- options = merge(options, { y: defaultYs[options.verticalAlign]});
- }
- } else {
- // In non stacked series the default label placement is on top of the bars
- if (vAlignIsNull) {
- options = merge(options, {verticalAlign: 'top'});
-
- // If no y delta is specified, try to create a good default (like default bar)
- } else if (yIsNull) {
- options = merge(options, { y: defaultYs[options.verticalAlign]});
- }
-
- }
- }
-
-
- // create a separate group for the data labels to avoid rotation
- if (!dataLabelsGroup) {
- dataLabelsGroup = series.dataLabelsGroup =
- renderer.g('data-labels')
- .attr({
- visibility: series.visible ? VISIBLE : HIDDEN,
- zIndex: 6
- })
- .translate(groupLeft, groupTop)
- .add();
- } else {
- dataLabelsGroup.translate(groupLeft, groupTop);
- }
-
- // make the labels for each point
- generalOptions = options;
- each(points, function (point) {
-
- dataLabel = point.dataLabel;
-
- // Merge in individual options from point
- options = generalOptions; // reset changes from previous points
- pointOptions = point.options;
- if (pointOptions && pointOptions.dataLabels) {
- options = merge(options, pointOptions.dataLabels);
- }
- enabled = options.enabled;
-
- // Get the positions
- if (enabled) {
- var plotX = (point.barX && point.barX + point.barW / 2) || pick(point.plotX, -999),
- plotY = pick(point.plotY, -999),
-
- // if options.y is null, which happens by default on column charts, set the position
- // above or below the column depending on the threshold
- individualYDelta = options.y === null ?
- (point.y >= seriesOptions.threshold ?
- -fontLineHeight + fontBaseline : // below the threshold
- fontBaseline) : // above the threshold
- options.y;
-
- x = (inverted ? chart.plotWidth - plotY : plotX) + options.x;
- y = mathRound((inverted ? chart.plotHeight - plotX : plotY) + individualYDelta);
-
- }
-
- // If the point is outside the plot area, destroy it. #678, #820
- if (dataLabel && series.isCartesian && (!chart.isInsidePlot(x, y) || !enabled)) {
- point.dataLabel = dataLabel.destroy();
-
- // Individual labels are disabled if the are explicitly disabled
- // in the point options, or if they fall outside the plot area.
- } else if (enabled) {
-
- var align = options.align,
- attr,
- name;
-
- // Get the string
- str = options.formatter.call(point.getLabelConfig(), options);
-
- // in columns, align the string to the column
- if (seriesType === 'column') {
- x += { left: -1, right: 1 }[align] * point.barW / 2 || 0;
- }
-
- if (!stacking && inverted && point.y < 0) {
- align = 'right';
- x -= 10;
- }
-
- // Determine the color
- options.style.color = pick(options.color, options.style.color, series.color, 'black');
-
-
- // update existing label
- if (dataLabel) {
- // vertically centered
- dataLabel
- .attr({
- text: str
- }).animate({
- x: x,
- y: y
- });
- // create new label
- } else if (defined(str)) {
- attr = {
- align: align,
- fill: options.backgroundColor,
- stroke: options.borderColor,
- 'stroke-width': options.borderWidth,
- r: options.borderRadius || 0,
- rotation: options.rotation,
- padding: options.padding,
- zIndex: 1
- };
- // Remove unused attributes (#947)
- for (name in attr) {
- if (attr[name] === UNDEFINED) {
- delete attr[name];
- }
- }
-
- dataLabel = point.dataLabel = renderer[options.rotation ? 'text' : 'label']( // labels don't support rotation
- str,
- x,
- y,
- null,
- null,
- null,
- options.useHTML,
- true // baseline for backwards compat
- )
- .attr(attr)
- .css(options.style)
- .add(dataLabelsGroup)
- .shadow(options.shadow);
- }
-
- if (isBarLike && seriesOptions.stacking && dataLabel) {
- var barX = point.barX,
- barY = point.barY,
- barW = point.barW,
- barH = point.barH;
-
- dataLabel.align(options, null,
- {
- x: inverted ? chart.plotWidth - barY - barH : barX,
- y: inverted ? chart.plotHeight - barX - barW : barY,
- width: inverted ? barH : barW,
- height: inverted ? barW : barH
- });
- }
-
-
- }
- });
- }
- },
-
- /**
- * Return the graph path of a segment
- */
- getSegmentPath: function (segment) {
- var series = this,
- segmentPath = [];
-
- // build the segment line
- each(segment, function (point, i) {
-
- if (series.getPointSpline) { // generate the spline as defined in the SplineSeries object
- segmentPath.push.apply(segmentPath, series.getPointSpline(segment, point, i));
-
- } else {
-
- // moveTo or lineTo
- segmentPath.push(i ? L : M);
-
- // step line?
- if (i && series.options.step) {
- var lastPoint = segment[i - 1];
- segmentPath.push(
- point.plotX,
- lastPoint.plotY
- );
- }
-
- // normal line to next point
- segmentPath.push(
- point.plotX,
- point.plotY
- );
- }
- });
-
- return segmentPath;
- },
-
- /**
- * Draw the actual graph
- */
- drawGraph: function () {
- var series = this,
- options = series.options,
- chart = series.chart,
- graph = series.graph,
- graphPath = [],
- group = series.group,
- color = options.lineColor || series.color,
- lineWidth = options.lineWidth,
- dashStyle = options.dashStyle,
- segmentPath,
- renderer = chart.renderer,
- singlePoints = [], // used in drawTracker
- attribs;
-
- // divide into segments and build graph and area paths
- each(series.segments, function (segment) {
-
- segmentPath = series.getSegmentPath(segment);
-
- // add the segment to the graph, or a single point for tracking
- if (segment.length > 1) {
- graphPath = graphPath.concat(segmentPath);
- } else {
- singlePoints.push(segment[0]);
- }
- });
-
- // used in drawTracker:
- series.graphPath = graphPath;
- series.singlePoints = singlePoints;
-
- // draw the graph
- if (graph) {
- stop(graph); // cancel running animations, #459
- graph.animate({ d: graphPath });
-
- } else {
- if (lineWidth) {
- attribs = {
- stroke: color,
- 'stroke-width': lineWidth
- };
- if (dashStyle) {
- attribs.dashstyle = dashStyle;
- }
-
- series.graph = renderer.path(graphPath)
- .attr(attribs).add(group).shadow(options.shadow);
- }
- }
- },
-
- /**
- * Initialize and perform group inversion on series.group and series.trackerGroup
- */
- invertGroups: function () {
- var series = this,
- group = series.group,
- trackerGroup = series.trackerGroup,
- chart = series.chart;
-
- // A fixed size is needed for inversion to work
- function setInvert() {
- var size = {
- width: series.yAxis.len,
- height: series.xAxis.len
- };
-
- // Set the series.group size
- group.attr(size).invert();
-
- // Set the tracker group size
- if (trackerGroup) {
- trackerGroup.attr(size).invert();
- }
- }
-
- addEvent(chart, 'resize', setInvert); // do it on resize
- addEvent(series, 'destroy', function () {
- removeEvent(chart, 'resize', setInvert);
- });
-
- // Do it now
- setInvert(); // do it now
-
- // On subsequent render and redraw, just do setInvert without setting up events again
- series.invertGroups = setInvert;
- },
-
- /**
- * Create the series group
- */
- createGroup: function () {
-
- var chart = this.chart,
- group = this.group = chart.renderer.g('series');
-
- group.attr({
- visibility: this.visible ? VISIBLE : HIDDEN,
- zIndex: this.options.zIndex
- })
- .translate(this.xAxis.left, this.yAxis.top)
- .add(chart.seriesGroup);
-
- // Only run this once
- this.createGroup = noop;
- },
-
- /**
- * Render the graph and markers
- */
- render: function () {
- var series = this,
- chart = series.chart,
- group,
- options = series.options,
- doClip = options.clip !== false,
- animation = options.animation,
- doAnimation = animation && series.animate,
- duration = doAnimation ? (animation && animation.duration) || 500 : 0,
- clipRect = series.clipRect,
- renderer = chart.renderer;
-
-
- // Add plot area clipping rectangle. If this is before chart.hasRendered,
- // create one shared clipRect.
-
- // Todo: since creating the clip property, the clipRect is created but
- // never used when clip is false. A better way would be that the animation
- // would run, then the clipRect destroyed.
- if (!clipRect) {
- clipRect = series.clipRect = !chart.hasRendered && chart.clipRect ?
- chart.clipRect :
- renderer.clipRect(0, 0, chart.plotSizeX, chart.plotSizeY + 1);
- if (!chart.clipRect) {
- chart.clipRect = clipRect;
- }
- }
-
-
- // the group
- series.createGroup();
- group = series.group;
-
-
- series.drawDataLabels();
-
- // initiate the animation
- if (doAnimation) {
- series.animate(true);
- }
-
- // cache attributes for shapes
- series.getAttribs();
-
- // draw the graph if any
- if (series.drawGraph) {
- series.drawGraph();
- }
-
- // draw the points
- series.drawPoints();
-
- // draw the mouse tracking area
- if (series.options.enableMouseTracking !== false) {
- series.drawTracker();
- }
-
- // Handle inverted series and tracker groups
- if (chart.inverted) {
- series.invertGroups();
- }
-
- // Do the initial clipping. This must be done after inverting for VML.
- if (doClip && !series.hasRendered) {
- group.clip(clipRect);
- if (series.trackerGroup) {
- series.trackerGroup.clip(chart.clipRect);
- }
- }
-
-
- // run the animation
- if (doAnimation) {
- series.animate();
- }
-
- // finish the individual clipRect
- setTimeout(function () {
- clipRect.isAnimating = false;
- group = series.group; // can be destroyed during the timeout
- if (group && clipRect !== chart.clipRect && clipRect.renderer) {
- if (doClip) {
- group.clip((series.clipRect = chart.clipRect));
- }
- clipRect.destroy();
- }
- }, duration);
-
- series.isDirty = series.isDirtyData = false; // means data is in accordance with what you see
- // (See #322) series.isDirty = series.isDirtyData = false; // means data is in accordance with what you see
- series.hasRendered = true;
- },
-
- /**
- * Redraw the series after an update in the axes.
- */
- redraw: function () {
- var series = this,
- chart = series.chart,
- wasDirtyData = series.isDirtyData, // cache it here as it is set to false in render, but used after
- group = series.group;
-
- // reposition on resize
- if (group) {
- if (chart.inverted) {
- group.attr({
- width: chart.plotWidth,
- height: chart.plotHeight
- });
- }
-
- group.animate({
- translateX: series.xAxis.left,
- translateY: series.yAxis.top
- });
- }
-
- series.translate();
- series.setTooltipPoints(true);
-
- series.render();
- if (wasDirtyData) {
- fireEvent(series, 'updatedData');
- }
- },
-
- /**
- * Set the state of the graph
- */
- setState: function (state) {
- var series = this,
- options = series.options,
- graph = series.graph,
- stateOptions = options.states,
- lineWidth = options.lineWidth;
-
- state = state || NORMAL_STATE;
-
- if (series.state !== state) {
- series.state = state;
-
- if (stateOptions[state] && stateOptions[state].enabled === false) {
- return;
- }
-
- if (state) {
- lineWidth = stateOptions[state].lineWidth || lineWidth + 1;
- }
-
- if (graph && !graph.dashstyle) { // hover is turned off for dashed lines in VML
- graph.attr({ // use attr because animate will cause any other animation on the graph to stop
- 'stroke-width': lineWidth
- }, state ? 0 : 500);
- }
- }
- },
-
- /**
- * Set the visibility of the graph
- *
- * @param vis {Boolean} True to show the series, false to hide. If UNDEFINED,
- * the visibility is toggled.
- */
- setVisible: function (vis, redraw) {
- var series = this,
- chart = series.chart,
- legendItem = series.legendItem,
- seriesGroup = series.group,
- seriesTracker = series.tracker,
- dataLabelsGroup = series.dataLabelsGroup,
- showOrHide,
- i,
- points = series.points,
- point,
- ignoreHiddenSeries = chart.options.chart.ignoreHiddenSeries,
- oldVisibility = series.visible;
-
- // if called without an argument, toggle visibility
- series.visible = vis = vis === UNDEFINED ? !oldVisibility : vis;
- showOrHide = vis ? 'show' : 'hide';
-
- // show or hide series
- if (seriesGroup) { // pies don't have one
- seriesGroup[showOrHide]();
- }
-
- // show or hide trackers
- if (seriesTracker) {
- seriesTracker[showOrHide]();
- } else if (points) {
- i = points.length;
- while (i--) {
- point = points[i];
- if (point.tracker) {
- point.tracker[showOrHide]();
- }
- }
- }
-
-
- if (dataLabelsGroup) {
- dataLabelsGroup[showOrHide]();
- }
-
- if (legendItem) {
- chart.legend.colorizeItem(series, vis);
- }
-
-
- // rescale or adapt to resized chart
- series.isDirty = true;
- // in a stack, all other series are affected
- if (series.options.stacking) {
- each(chart.series, function (otherSeries) {
- if (otherSeries.options.stacking && otherSeries.visible) {
- otherSeries.isDirty = true;
- }
- });
- }
-
- if (ignoreHiddenSeries) {
- chart.isDirtyBox = true;
- }
- if (redraw !== false) {
- chart.redraw();
- }
-
- fireEvent(series, showOrHide);
- },
-
- /**
- * Show the graph
- */
- show: function () {
- this.setVisible(true);
- },
-
- /**
- * Hide the graph
- */
- hide: function () {
- this.setVisible(false);
- },
-
-
- /**
- * Set the selected state of the graph
- *
- * @param selected {Boolean} True to select the series, false to unselect. If
- * UNDEFINED, the selection state is toggled.
- */
- select: function (selected) {
- var series = this;
- // if called without an argument, toggle
- series.selected = selected = (selected === UNDEFINED) ? !series.selected : selected;
-
- if (series.checkbox) {
- series.checkbox.checked = selected;
- }
-
- fireEvent(series, selected ? 'select' : 'unselect');
- },
-
- /**
- * Create a group that holds the tracking object or objects. This allows for
- * individual clipping and placement of each series tracker.
- */
- drawTrackerGroup: function () {
- var trackerGroup = this.trackerGroup,
- chart = this.chart;
-
- if (this.isCartesian) {
-
- // Generate it on first call
- if (!trackerGroup) {
- this.trackerGroup = trackerGroup = chart.renderer.g()
- .attr({
- zIndex: this.options.zIndex || 1
- })
- .add(chart.trackerGroup);
-
- }
- // Place it on first and subsequent (redraw) calls
- trackerGroup.translate(this.xAxis.left, this.yAxis.top);
-
- }
-
- return trackerGroup;
- },
-
- /**
- * Draw the tracker object that sits above all data labels and markers to
- * track mouse events on the graph or points. For the line type charts
- * the tracker uses the same graphPath, but with a greater stroke width
- * for better control.
- */
- drawTracker: function () {
- var series = this,
- options = series.options,
- trackByArea = options.trackByArea,
- trackerPath = [].concat(trackByArea ? series.areaPath : series.graphPath),
- trackerPathLength = trackerPath.length,
- chart = series.chart,
- renderer = chart.renderer,
- snap = chart.options.tooltip.snap,
- tracker = series.tracker,
- cursor = options.cursor,
- css = cursor && { cursor: cursor },
- singlePoints = series.singlePoints,
- trackerGroup = series.drawTrackerGroup(),
- singlePoint,
- i;
-
- // Extend end points. A better way would be to use round linecaps,
- // but those are not clickable in VML.
- if (trackerPathLength && !trackByArea) {
- i = trackerPathLength + 1;
- while (i--) {
- if (trackerPath[i] === M) { // extend left side
- trackerPath.splice(i + 1, 0, trackerPath[i + 1] - snap, trackerPath[i + 2], L);
- }
- if ((i && trackerPath[i] === M) || i === trackerPathLength) { // extend right side
- trackerPath.splice(i, 0, L, trackerPath[i - 2] + snap, trackerPath[i - 1]);
- }
- }
- }
-
- // handle single points
- for (i = 0; i < singlePoints.length; i++) {
- singlePoint = singlePoints[i];
- trackerPath.push(M, singlePoint.plotX - snap, singlePoint.plotY,
- L, singlePoint.plotX + snap, singlePoint.plotY);
- }
-
-
- // draw the tracker
- if (tracker) {
- tracker.attr({ d: trackerPath });
-
- } else { // create
-
- series.tracker = renderer.path(trackerPath)
- .attr({
- isTracker: true,
- 'stroke-linejoin': 'bevel',
- visibility: series.visible ? VISIBLE : HIDDEN,
- stroke: TRACKER_FILL,
- fill: trackByArea ? TRACKER_FILL : NONE,
- 'stroke-width': options.lineWidth + (trackByArea ? 0 : 2 * snap)
- })
- .on(hasTouch ? 'touchstart' : 'mouseover', function () {
- if (chart.hoverSeries !== series) {
- series.onMouseOver();
- }
- })
- .on('mouseout', function () {
- if (!options.stickyTracking) {
- series.onMouseOut();
- }
- })
- .css(css)
- .add(trackerGroup);
- }
-
- }
-
- }; // end Series prototype
-
-
- /**
- * LineSeries object
- */
- var LineSeries = extendClass(Series);
- seriesTypes.line = LineSeries;
-
- /**
- * Set the default options for area
- */
- defaultPlotOptions.area = merge(defaultSeriesOptions, {
- threshold: 0
- // trackByArea: false,
- // lineColor: null, // overrides color, but lets fillColor be unaltered
- // fillOpacity: 0.75,
- // fillColor: null
- });
-
- /**
- * AreaSeries object
- */
- var AreaSeries = extendClass(Series, {
- type: 'area',
-
- /**
- * Extend the base Series getSegmentPath method by adding the path for the area.
- * This path is pushed to the series.areaPath property.
- */
- getSegmentPath: function (segment) {
-
- var segmentPath = Series.prototype.getSegmentPath.call(this, segment), // call base method
- areaSegmentPath = [].concat(segmentPath), // work on a copy for the area path
- i,
- options = this.options,
- segLength = segmentPath.length,
- translatedThreshold = this.yAxis.getThreshold(options.threshold);
-
- if (segLength === 3) { // for animation from 1 to two points
- areaSegmentPath.push(L, segmentPath[1], segmentPath[2]);
- }
- if (options.stacking && this.type !== 'areaspline') {
-
- // Follow stack back. Todo: implement areaspline. A general solution could be to
- // reverse the entire graphPath of the previous series, though may be hard with
- // splines and with series with different extremes
- for (i = segment.length - 1; i >= 0; i--) {
-
- // step line?
- if (i < segment.length - 1 && options.step) {
- areaSegmentPath.push(segment[i + 1].plotX, segment[i].yBottom);
- }
-
- areaSegmentPath.push(segment[i].plotX, segment[i].yBottom);
- }
-
- } else { // follow zero line back
- areaSegmentPath.push(
- L,
- segment[segment.length - 1].plotX,
- translatedThreshold,
- L,
- segment[0].plotX,
- translatedThreshold
- );
- }
- this.areaPath = this.areaPath.concat(areaSegmentPath);
-
- return segmentPath;
- },
-
- /**
- * Draw the graph and the underlying area. This method calls the Series base
- * function and adds the area. The areaPath is calculated in the getSegmentPath
- * method called from Series.prototype.drawGraph.
- */
- drawGraph: function () {
-
- // Define or reset areaPath
- this.areaPath = [];
-
- // Call the base method
- Series.prototype.drawGraph.apply(this);
-
- // Define local variables
- var areaPath = this.areaPath,
- options = this.options,
- area = this.area;
-
- // Create or update the area
- if (area) { // update
- area.animate({ d: areaPath });
-
- } else { // create
- this.area = this.chart.renderer.path(areaPath)
- .attr({
- fill: pick(
- options.fillColor,
- Color(this.color).setOpacity(options.fillOpacity || 0.75).get()
- )
- }).add(this.group);
- }
- },
-
- /**
- * Get the series' symbol in the legend
- *
- * @param {Object} legend The legend object
- * @param {Object} item The series (this) or point
- */
- drawLegendSymbol: function (legend, item) {
-
- item.legendSymbol = this.chart.renderer.rect(
- 0,
- legend.baseline - 11,
- legend.options.symbolWidth,
- 12,
- 2
- ).attr({
- zIndex: 3
- }).add(item.legendGroup);
-
- }
- });
-
- seriesTypes.area = AreaSeries;
- /**
- * Set the default options for spline
- */
- defaultPlotOptions.spline = merge(defaultSeriesOptions);
-
- /**
- * SplineSeries object
- */
- var SplineSeries = extendClass(Series, {
- type: 'spline',
-
- /**
- * Draw the actual graph
- */
- getPointSpline: function (segment, point, i) {
- var smoothing = 1.5, // 1 means control points midway between points, 2 means 1/3 from the point, 3 is 1/4 etc
- denom = smoothing + 1,
- plotX = point.plotX,
- plotY = point.plotY,
- lastPoint = segment[i - 1],
- nextPoint = segment[i + 1],
- leftContX,
- leftContY,
- rightContX,
- rightContY,
- ret;
-
- // find control points
- if (i && i < segment.length - 1) {
- var lastX = lastPoint.plotX,
- lastY = lastPoint.plotY,
- nextX = nextPoint.plotX,
- nextY = nextPoint.plotY,
- correction;
-
- leftContX = (smoothing * plotX + lastX) / denom;
- leftContY = (smoothing * plotY + lastY) / denom;
- rightContX = (smoothing * plotX + nextX) / denom;
- rightContY = (smoothing * plotY + nextY) / denom;
-
- // have the two control points make a straight line through main point
- correction = ((rightContY - leftContY) * (rightContX - plotX)) /
- (rightContX - leftContX) + plotY - rightContY;
-
- leftContY += correction;
- rightContY += correction;
-
- // to prevent false extremes, check that control points are between
- // neighbouring points' y values
- if (leftContY > lastY && leftContY > plotY) {
- leftContY = mathMax(lastY, plotY);
- rightContY = 2 * plotY - leftContY; // mirror of left control point
- } else if (leftContY < lastY && leftContY < plotY) {
- leftContY = mathMin(lastY, plotY);
- rightContY = 2 * plotY - leftContY;
- }
- if (rightContY > nextY && rightContY > plotY) {
- rightContY = mathMax(nextY, plotY);
- leftContY = 2 * plotY - rightContY;
- } else if (rightContY < nextY && rightContY < plotY) {
- rightContY = mathMin(nextY, plotY);
- leftContY = 2 * plotY - rightContY;
- }
-
- // record for drawing in next point
- point.rightContX = rightContX;
- point.rightContY = rightContY;
-
- }
-
- // moveTo or lineTo
- if (!i) {
- ret = [M, plotX, plotY];
- } else { // curve from last point to this
- ret = [
- 'C',
- lastPoint.rightContX || lastPoint.plotX,
- lastPoint.rightContY || lastPoint.plotY,
- leftContX || plotX,
- leftContY || plotY,
- plotX,
- plotY
- ];
- lastPoint.rightContX = lastPoint.rightContY = null; // reset for updating series later
- }
- return ret;
- }
- });
- seriesTypes.spline = SplineSeries;
-
- /**
- * Set the default options for areaspline
- */
- defaultPlotOptions.areaspline = merge(defaultPlotOptions.area);
-
- /**
- * AreaSplineSeries object
- */
- var areaProto = AreaSeries.prototype,
- AreaSplineSeries = extendClass(SplineSeries, {
- type: 'areaspline',
-
- // Mix in methods from the area series
- getSegmentPath: areaProto.getSegmentPath,
- drawGraph: areaProto.drawGraph
- });
- seriesTypes.areaspline = AreaSplineSeries;
-
- /**
- * Set the default options for column
- */
- defaultPlotOptions.column = merge(defaultSeriesOptions, {
- borderColor: '#FFFFFF',
- borderWidth: 1,
- borderRadius: 0,
- //colorByPoint: undefined,
- groupPadding: 0.2,
- marker: null, // point options are specified in the base options
- pointPadding: 0.1,
- //pointWidth: null,
- minPointLength: 0,
- cropThreshold: 50, // when there are more points, they will not animate out of the chart on xAxis.setExtremes
- pointRange: null, // null means auto, meaning 1 in a categorized axis and least distance between points if not categories
- states: {
- hover: {
- brightness: 0.1,
- shadow: false
- },
- select: {
- color: '#C0C0C0',
- borderColor: '#000000',
- shadow: false
- }
- },
- dataLabels: {
- y: null,
- verticalAlign: null
- },
- threshold: 0
- });
-
- /**
- * ColumnSeries object
- */
- var ColumnSeries = extendClass(Series, {
- type: 'column',
- tooltipOutsidePlot: true,
- pointAttrToOptions: { // mapping between SVG attributes and the corresponding options
- stroke: 'borderColor',
- 'stroke-width': 'borderWidth',
- fill: 'color',
- r: 'borderRadius'
- },
- init: function () {
- Series.prototype.init.apply(this, arguments);
-
- var series = this,
- chart = series.chart;
-
- // if the series is added dynamically, force redraw of other
- // series affected by a new column
- if (chart.hasRendered) {
- each(chart.series, function (otherSeries) {
- if (otherSeries.type === series.type) {
- otherSeries.isDirty = true;
- }
- });
- }
- },
-
- /**
- * Translate each point to the plot area coordinate system and find shape positions
- */
- translate: function () {
- var series = this,
- chart = series.chart,
- options = series.options,
- stacking = options.stacking,
- borderWidth = options.borderWidth,
- columnCount = 0,
- xAxis = series.xAxis,
- reversedXAxis = xAxis.reversed,
- stackGroups = {},
- stackKey,
- columnIndex;
-
- Series.prototype.translate.apply(series);
-
- // Get the total number of column type series.
- // This is called on every series. Consider moving this logic to a
- // chart.orderStacks() function and call it on init, addSeries and removeSeries
- each(chart.series, function (otherSeries) {
- if (otherSeries.type === series.type && otherSeries.visible &&
- series.options.group === otherSeries.options.group) { // used in Stock charts navigator series
- if (otherSeries.options.stacking) {
- stackKey = otherSeries.stackKey;
- if (stackGroups[stackKey] === UNDEFINED) {
- stackGroups[stackKey] = columnCount++;
- }
- columnIndex = stackGroups[stackKey];
- } else {
- columnIndex = columnCount++;
- }
- otherSeries.columnIndex = columnIndex;
- }
- });
-
- // calculate the width and position of each column based on
- // the number of column series in the plot, the groupPadding
- // and the pointPadding options
- var points = series.points,
- categoryWidth = mathAbs(xAxis.transA) * (xAxis.ordinalSlope || options.pointRange || xAxis.closestPointRange || 1),
- groupPadding = categoryWidth * options.groupPadding,
- groupWidth = categoryWidth - 2 * groupPadding,
- pointOffsetWidth = groupWidth / columnCount,
- optionPointWidth = options.pointWidth,
- pointPadding = defined(optionPointWidth) ? (pointOffsetWidth - optionPointWidth) / 2 :
- pointOffsetWidth * options.pointPadding,
- pointWidth = pick(optionPointWidth, pointOffsetWidth - 2 * pointPadding), // exact point width, used in polar charts
- barW = mathCeil(mathMax(pointWidth, 1 + 2 * borderWidth)), // rounded and postprocessed for border width
- colIndex = (reversedXAxis ? columnCount -
- series.columnIndex : series.columnIndex) || 0,
- pointXOffset = pointPadding + (groupPadding + colIndex *
- pointOffsetWidth - (categoryWidth / 2)) *
- (reversedXAxis ? -1 : 1),
- threshold = options.threshold,
- translatedThreshold = series.yAxis.getThreshold(threshold),
- minPointLength = pick(options.minPointLength, 5);
-
- // record the new values
- each(points, function (point) {
- var plotY = point.plotY,
- yBottom = pick(point.yBottom, translatedThreshold),
- barX = point.plotX + pointXOffset,
- barY = mathCeil(mathMin(plotY, yBottom)),
- barH = mathCeil(mathMax(plotY, yBottom) - barY),
- stack = series.yAxis.stacks[(point.y < 0 ? '-' : '') + series.stackKey],
- shapeArgs;
-
- // Record the offset'ed position and width of the bar to be able to align the stacking total correctly
- if (stacking && series.visible && stack && stack[point.x]) {
- stack[point.x].setOffset(pointXOffset, barW);
- }
-
- // handle options.minPointLength
- if (mathAbs(barH) < minPointLength) {
- if (minPointLength) {
- barH = minPointLength;
- barY =
- mathAbs(barY - translatedThreshold) > minPointLength ? // stacked
- yBottom - minPointLength : // keep position
- translatedThreshold - (plotY <= translatedThreshold ? minPointLength : 0);
- }
- }
-
- extend(point, {
- barX: barX,
- barY: barY,
- barW: barW,
- barH: barH,
- pointWidth: pointWidth
- });
-
- // create shape type and shape args that are reused in drawPoints and drawTracker
- point.shapeType = 'rect';
- point.shapeArgs = shapeArgs = chart.renderer.Element.prototype.crisp.call(0, borderWidth, barX, barY, barW, barH);
-
- if (borderWidth % 2) { // correct for shorting in crisp method, visible in stacked columns with 1px border
- shapeArgs.y -= 1;
- shapeArgs.height += 1;
- }
-
- // make small columns responsive to mouse
- point.trackerArgs = mathAbs(barH) < 3 && merge(point.shapeArgs, {
- height: 6,
- y: barY - 3
- });
- });
-
- },
-
- getSymbol: function () {
- },
-
- /**
- * Use a solid rectangle like the area series types
- */
- drawLegendSymbol: AreaSeries.prototype.drawLegendSymbol,
-
-
- /**
- * Columns have no graph
- */
- drawGraph: function () {
- },
-
- /**
- * Draw the columns. For bars, the series.group is rotated, so the same coordinates
- * apply for columns and bars. This method is inherited by scatter series.
- *
- */
- drawPoints: function () {
- var series = this,
- options = series.options,
- renderer = series.chart.renderer,
- graphic,
- shapeArgs;
-
-
- // draw the columns
- each(series.points, function (point) {
- var plotY = point.plotY;
- if (plotY !== UNDEFINED && !isNaN(plotY) && point.y !== null) {
- graphic = point.graphic;
- shapeArgs = point.shapeArgs;
- if (graphic) { // update
- stop(graphic);
- graphic.animate(merge(shapeArgs));
-
- } else {
- point.graphic = graphic = renderer[point.shapeType](shapeArgs)
- .attr(point.pointAttr[point.selected ? SELECT_STATE : NORMAL_STATE])
- .add(series.group)
- .shadow(options.shadow, null, options.stacking && !options.borderRadius);
- }
-
- }
- });
- },
- /**
- * Draw the individual tracker elements.
- * This method is inherited by scatter and pie charts too.
- */
- drawTracker: function () {
- var series = this,
- chart = series.chart,
- renderer = chart.renderer,
- shapeArgs,
- tracker,
- trackerLabel = +new Date(),
- options = series.options,
- cursor = options.cursor,
- css = cursor && { cursor: cursor },
- trackerGroup = series.drawTrackerGroup(),
- rel,
- plotY,
- validPlotY;
-
- each(series.points, function (point) {
- tracker = point.tracker;
- shapeArgs = point.trackerArgs || point.shapeArgs;
- plotY = point.plotY;
- validPlotY = !series.isCartesian || (plotY !== UNDEFINED && !isNaN(plotY));
- delete shapeArgs.strokeWidth;
- if (point.y !== null && validPlotY) {
- if (tracker) {// update
- tracker.attr(shapeArgs);
-
- } else {
- point.tracker =
- renderer[point.shapeType](shapeArgs)
- .attr({
- isTracker: trackerLabel,
- fill: TRACKER_FILL,
- visibility: series.visible ? VISIBLE : HIDDEN
- })
- .on(hasTouch ? 'touchstart' : 'mouseover', function (event) {
- rel = event.relatedTarget || event.fromElement;
- if (chart.hoverSeries !== series && attr(rel, 'isTracker') !== trackerLabel) {
- series.onMouseOver();
- }
- point.onMouseOver();
-
- })
- .on('mouseout', function (event) {
- if (!options.stickyTracking) {
- rel = event.relatedTarget || event.toElement;
- if (attr(rel, 'isTracker') !== trackerLabel) {
- series.onMouseOut();
- }
- }
- })
- .css(css)
- .add(point.group || trackerGroup); // pies have point group - see issue #118
- }
- }
- });
- },
-
-
- /**
- * Animate the column heights one by one from zero
- * @param {Boolean} init Whether to initialize the animation or run it
- */
- animate: function (init) {
- var series = this,
- points = series.points,
- options = series.options;
-
- if (!init) { // run the animation
- /*
- * Note: Ideally the animation should be initialized by calling
- * series.group.hide(), and then calling series.group.show()
- * after the animation was started. But this rendered the shadows
- * invisible in IE8 standards mode. If the columns flicker on large
- * datasets, this is the cause.
- */
-
- each(points, function (point) {
- var graphic = point.graphic,
- shapeArgs = point.shapeArgs,
- yAxis = series.yAxis,
- threshold = options.threshold;
-
- if (graphic) {
- // start values
- graphic.attr({
- height: 0,
- y: defined(threshold) ?
- yAxis.getThreshold(threshold) :
- yAxis.translate(yAxis.getExtremes().min, 0, 1, 0, 1)
- });
-
- // animate
- graphic.animate({
- height: shapeArgs.height,
- y: shapeArgs.y
- }, options.animation);
- }
- });
-
-
- // delete this function to allow it only once
- series.animate = null;
- }
-
- },
- /**
- * Remove this series from the chart
- */
- remove: function () {
- var series = this,
- chart = series.chart;
-
- // column and bar series affects other series of the same type
- // as they are either stacked or grouped
- if (chart.hasRendered) {
- each(chart.series, function (otherSeries) {
- if (otherSeries.type === series.type) {
- otherSeries.isDirty = true;
- }
- });
- }
-
- Series.prototype.remove.apply(series, arguments);
- }
- });
- seriesTypes.column = ColumnSeries;
- /**
- * Set the default options for bar
- */
- defaultPlotOptions.bar = merge(defaultPlotOptions.column, {
- dataLabels: {
- align: 'left',
- x: 5,
- y: null,
- verticalAlign: 'middle'
- }
- });
- /**
- * The Bar series class
- */
- var BarSeries = extendClass(ColumnSeries, {
- type: 'bar',
- inverted: true
- });
- seriesTypes.bar = BarSeries;
-
- /**
- * Set the default options for scatter
- */
- defaultPlotOptions.scatter = merge(defaultSeriesOptions, {
- lineWidth: 0,
- states: {
- hover: {
- lineWidth: 0
- }
- },
- tooltip: {
- headerFormat: '{series.name} ',
- pointFormat: 'x: {point.x} y: {point.y} '
- }
- });
-
- /**
- * The scatter series class
- */
- var ScatterSeries = extendClass(Series, {
- type: 'scatter',
- sorted: false,
- /**
- * Extend the base Series' translate method by adding shape type and
- * arguments for the point trackers
- */
- translate: function () {
- var series = this;
-
- Series.prototype.translate.apply(series);
-
- each(series.points, function (point) {
- point.shapeType = 'circle';
- point.shapeArgs = {
- x: point.plotX,
- y: point.plotY,
- r: series.chart.options.tooltip.snap
- };
- });
- },
-
- /**
- * Add tracking event listener to the series group, so the point graphics
- * themselves act as trackers
- */
- drawTracker: function () {
- var series = this,
- cursor = series.options.cursor,
- css = cursor && { cursor: cursor },
- points = series.points,
- i = points.length,
- graphic;
-
- // Set an expando property for the point index, used below
- while (i--) {
- graphic = points[i].graphic;
- if (graphic) { // doesn't exist for null points
- graphic.element._i = i;
- }
- }
-
- // Add the event listeners, we need to do this only once
- if (!series._hasTracking) {
- series.group
- .attr({
- isTracker: true
- })
- .on(hasTouch ? 'touchstart' : 'mouseover', function (e) {
- series.onMouseOver();
- if (e.target._i !== UNDEFINED) { // undefined on graph in scatterchart
- points[e.target._i].onMouseOver();
- }
- })
- .on('mouseout', function () {
- if (!series.options.stickyTracking) {
- series.onMouseOut();
- }
- })
- .css(css);
- } else {
- series._hasTracking = true;
- }
-
- }
- });
- seriesTypes.scatter = ScatterSeries;
-
- /**
- * Set the default options for pie
- */
- defaultPlotOptions.pie = merge(defaultSeriesOptions, {
- borderColor: '#FFFFFF',
- borderWidth: 1,
- center: ['50%', '50%'],
- colorByPoint: true, // always true for pies
- dataLabels: {
- // align: null,
- // connectorWidth: 1,
- // connectorColor: point.color,
- // connectorPadding: 5,
- distance: 30,
- enabled: true,
- formatter: function () {
- return this.point.name;
- },
- // softConnector: true,
- y: 5
- },
- //innerSize: 0,
- legendType: 'point',
- marker: null, // point options are specified in the base options
- size: '75%',
- showInLegend: false,
- slicedOffset: 10,
- states: {
- hover: {
- brightness: 0.1,
- shadow: false
- }
- }
- });
-
- /**
- * Extended point object for pies
- */
- var PiePoint = extendClass(Point, {
- /**
- * Initiate the pie slice
- */
- init: function () {
-
- Point.prototype.init.apply(this, arguments);
-
- var point = this,
- toggleSlice;
-
- //visible: options.visible !== false,
- extend(point, {
- visible: point.visible !== false,
- name: pick(point.name, 'Slice')
- });
-
- // add event listener for select
- toggleSlice = function () {
- point.slice();
- };
- addEvent(point, 'select', toggleSlice);
- addEvent(point, 'unselect', toggleSlice);
-
- return point;
- },
-
- /**
- * Toggle the visibility of the pie slice
- * @param {Boolean} vis Whether to show the slice or not. If undefined, the
- * visibility is toggled
- */
- setVisible: function (vis) {
- var point = this,
- chart = point.series.chart,
- tracker = point.tracker,
- dataLabel = point.dataLabel,
- connector = point.connector,
- shadowGroup = point.shadowGroup,
- method;
-
- // if called without an argument, toggle visibility
- point.visible = vis = vis === UNDEFINED ? !point.visible : vis;
-
- method = vis ? 'show' : 'hide';
-
- point.group[method]();
- if (tracker) {
- tracker[method]();
- }
- if (dataLabel) {
- dataLabel[method]();
- }
- if (connector) {
- connector[method]();
- }
- if (shadowGroup) {
- shadowGroup[method]();
- }
- if (point.legendItem) {
- chart.legend.colorizeItem(point, vis);
- }
- },
-
- /**
- * Set or toggle whether the slice is cut out from the pie
- * @param {Boolean} sliced When undefined, the slice state is toggled
- * @param {Boolean} redraw Whether to redraw the chart. True by default.
- */
- slice: function (sliced, redraw, animation) {
- var point = this,
- series = point.series,
- chart = series.chart,
- slicedTranslation = point.slicedTranslation,
- translation;
-
- setAnimation(animation, chart);
-
- // redraw is true by default
- redraw = pick(redraw, true);
-
- // if called without an argument, toggle
- sliced = point.sliced = defined(sliced) ? sliced : !point.sliced;
-
- translation = {
- translateX: (sliced ? slicedTranslation[0] : chart.plotLeft),
- translateY: (sliced ? slicedTranslation[1] : chart.plotTop)
- };
- point.group.animate(translation);
- if (point.shadowGroup) {
- point.shadowGroup.animate(translation);
- }
-
- }
- });
-
- /**
- * The Pie series class
- */
- var PieSeries = {
- type: 'pie',
- isCartesian: false,
- pointClass: PiePoint,
- pointAttrToOptions: { // mapping between SVG attributes and the corresponding options
- stroke: 'borderColor',
- 'stroke-width': 'borderWidth',
- fill: 'color'
- },
-
- /**
- * Pies have one color each point
- */
- getColor: function () {
- // record first color for use in setData
- this.initialColor = this.chart.counters.color;
- },
-
- /**
- * Animate the pies in
- */
- animate: function () {
- var series = this,
- points = series.points;
-
- each(points, function (point) {
- var graphic = point.graphic,
- args = point.shapeArgs,
- up = -mathPI / 2;
-
- if (graphic) {
- // start values
- graphic.attr({
- r: 0,
- start: up,
- end: up
- });
-
- // animate
- graphic.animate({
- r: args.r,
- start: args.start,
- end: args.end
- }, series.options.animation);
- }
- });
-
- // delete this function to allow it only once
- series.animate = null;
-
- },
-
- /**
- * Extend the basic setData method by running processData and generatePoints immediately,
- * in order to access the points from the legend.
- */
- setData: function (data, redraw) {
- Series.prototype.setData.call(this, data, false);
- this.processData();
- this.generatePoints();
- if (pick(redraw, true)) {
- this.chart.redraw();
- }
- },
-
- /**
- * Get the center of the pie based on the size and center options relative to the
- * plot area. Borrowed by the polar and gauge series types.
- */
- getCenter: function () {
-
- var options = this.options,
- chart = this.chart,
- plotWidth = chart.plotWidth,
- plotHeight = chart.plotHeight,
- positions = options.center.concat([options.size, options.innerSize || 0]),
- smallestSize = mathMin(plotWidth, plotHeight),
- isPercent;
-
- return map(positions, function (length, i) {
-
- isPercent = /%$/.test(length);
- return isPercent ?
- // i == 0: centerX, relative to width
- // i == 1: centerY, relative to height
- // i == 2: size, relative to smallestSize
- // i == 4: innerSize, relative to smallestSize
- [plotWidth, plotHeight, smallestSize, smallestSize][i] *
- pInt(length) / 100 :
- length;
- });
- },
-
- /**
- * Do translation for pie slices
- */
- translate: function () {
- this.generatePoints();
-
- var total = 0,
- series = this,
- cumulative = -0.25, // start at top
- precision = 1000, // issue #172
- options = series.options,
- slicedOffset = options.slicedOffset,
- connectorOffset = slicedOffset + options.borderWidth,
- positions,
- chart = series.chart,
- start,
- end,
- angle,
- points = series.points,
- circ = 2 * mathPI,
- fraction,
- radiusX, // the x component of the radius vector for a given point
- radiusY,
- labelDistance = options.dataLabels.distance;
-
- // get positions - either an integer or a percentage string must be given
- series.center = positions = series.getCenter();
-
- // utility for getting the x value from a given y, used for anticollision logic in data labels
- series.getX = function (y, left) {
-
- angle = math.asin((y - positions[1]) / (positions[2] / 2 + labelDistance));
-
- return positions[0] +
- (left ? -1 : 1) *
- (mathCos(angle) * (positions[2] / 2 + labelDistance));
- };
-
- // get the total sum
- each(points, function (point) {
- total += point.y;
- });
-
- each(points, function (point) {
- // set start and end angle
- fraction = total ? point.y / total : 0;
- start = mathRound(cumulative * circ * precision) / precision;
- cumulative += fraction;
- end = mathRound(cumulative * circ * precision) / precision;
-
- // set the shape
- point.shapeType = 'arc';
- point.shapeArgs = {
- x: positions[0],
- y: positions[1],
- r: positions[2] / 2,
- innerR: positions[3] / 2,
- start: start,
- end: end
- };
-
- // center for the sliced out slice
- angle = (end + start) / 2;
- point.slicedTranslation = map([
- mathCos(angle) * slicedOffset + chart.plotLeft,
- mathSin(angle) * slicedOffset + chart.plotTop
- ], mathRound);
-
- // set the anchor point for tooltips
- radiusX = mathCos(angle) * positions[2] / 2;
- radiusY = mathSin(angle) * positions[2] / 2;
- point.tooltipPos = [
- positions[0] + radiusX * 0.7,
- positions[1] + radiusY * 0.7
- ];
-
- // set the anchor point for data labels
- point.labelPos = [
- positions[0] + radiusX + mathCos(angle) * labelDistance, // first break of connector
- positions[1] + radiusY + mathSin(angle) * labelDistance, // a/a
- positions[0] + radiusX + mathCos(angle) * connectorOffset, // second break, right outside pie
- positions[1] + radiusY + mathSin(angle) * connectorOffset, // a/a
- positions[0] + radiusX, // landing point for connector
- positions[1] + radiusY, // a/a
- labelDistance < 0 ? // alignment
- 'center' :
- angle < circ / 4 ? 'left' : 'right', // alignment
- angle // center angle
- ];
-
- // API properties
- point.percentage = fraction * 100;
- point.total = total;
-
- });
-
-
- this.setTooltipPoints();
- },
-
- /**
- * Render the slices
- */
- render: function () {
- var series = this;
-
- // cache attributes for shapes
- series.getAttribs();
-
- this.drawPoints();
-
- // draw the mouse tracking area
- if (series.options.enableMouseTracking !== false) {
- series.drawTracker();
- }
-
- this.drawDataLabels();
-
- if (series.options.animation && series.animate) {
- series.animate();
- }
-
- // (See #322) series.isDirty = series.isDirtyData = false; // means data is in accordance with what you see
- series.isDirty = false; // means data is in accordance with what you see
- },
-
- /**
- * Draw the data points
- */
- drawPoints: function () {
- var series = this,
- chart = series.chart,
- renderer = chart.renderer,
- groupTranslation,
- //center,
- graphic,
- group,
- shadow = series.options.shadow,
- shadowGroup,
- shapeArgs;
-
- // draw the slices
- each(series.points, function (point) {
- graphic = point.graphic;
- shapeArgs = point.shapeArgs;
- group = point.group;
- shadowGroup = point.shadowGroup;
-
- // put the shadow behind all points
- if (shadow && !shadowGroup) {
- shadowGroup = point.shadowGroup = renderer.g('shadow')
- .attr({ zIndex: 4 })
- .add();
- }
-
- // create the group the first time
- if (!group) {
- group = point.group = renderer.g('point')
- .attr({ zIndex: 5 })
- .add();
- }
-
- // if the point is sliced, use special translation, else use plot area traslation
- groupTranslation = point.sliced ? point.slicedTranslation : [chart.plotLeft, chart.plotTop];
- group.translate(groupTranslation[0], groupTranslation[1]);
- if (shadowGroup) {
- shadowGroup.translate(groupTranslation[0], groupTranslation[1]);
- }
-
- // draw the slice
- if (graphic) {
- graphic.animate(shapeArgs);
- } else {
- point.graphic = graphic = renderer.arc(shapeArgs)
- .setRadialReference(series.center)
- .attr(extend(
- point.pointAttr[NORMAL_STATE],
- { 'stroke-linejoin': 'round' }
- ))
- .add(point.group)
- .shadow(shadow, shadowGroup);
-
- }
-
- // detect point specific visibility
- if (point.visible === false) {
- point.setVisible(false);
- }
-
- });
-
- },
-
- /**
- * Override the base drawDataLabels method by pie specific functionality
- */
- drawDataLabels: function () {
- var series = this,
- data = series.data,
- point,
- chart = series.chart,
- options = series.options.dataLabels,
- connectorPadding = pick(options.connectorPadding, 10),
- connectorWidth = pick(options.connectorWidth, 1),
- connector,
- connectorPath,
- softConnector = pick(options.softConnector, true),
- distanceOption = options.distance,
- seriesCenter = series.center,
- radius = seriesCenter[2] / 2,
- centerY = seriesCenter[1],
- outside = distanceOption > 0,
- dataLabel,
- labelPos,
- labelHeight,
- halves = [// divide the points into right and left halves for anti collision
- [], // right
- [] // left
- ],
- x,
- y,
- visibility,
- rankArr,
- sort,
- i = 2,
- j;
-
- // get out if not enabled
- if (!options.enabled) {
- return;
- }
-
- // run parent method
- Series.prototype.drawDataLabels.apply(series);
-
- // arrange points for detection collision
- each(data, function (point) {
- if (point.dataLabel) { // it may have been cancelled in the base method (#407)
- halves[
- point.labelPos[7] < mathPI / 2 ? 0 : 1
- ].push(point);
- }
- });
- halves[1].reverse();
-
- // define the sorting algorithm
- sort = function (a, b) {
- return b.y - a.y;
- };
-
- // assume equal label heights
- labelHeight = halves[0][0] && halves[0][0].dataLabel && (halves[0][0].dataLabel.getBBox().height || 21); // 21 is for #968
-
- /* Loop over the points in each half, starting from the top and bottom
- * of the pie to detect overlapping labels.
- */
- while (i--) {
-
- var slots = [],
- slotsLength,
- usedSlots = [],
- points = halves[i],
- pos,
- length = points.length,
- slotIndex;
-
- // Only do anti-collision when we are outside the pie and have connectors (#856)
- if (distanceOption > 0) {
-
- // build the slots
- for (pos = centerY - radius - distanceOption; pos <= centerY + radius + distanceOption; pos += labelHeight) {
- slots.push(pos);
- // visualize the slot
- /*
- var slotX = series.getX(pos, i) + chart.plotLeft - (i ? 100 : 0),
- slotY = pos + chart.plotTop;
- if (!isNaN(slotX)) {
- chart.renderer.rect(slotX, slotY - 7, 100, labelHeight)
- .attr({
- 'stroke-width': 1,
- stroke: 'silver'
- })
- .add();
- chart.renderer.text('Slot '+ (slots.length - 1), slotX, slotY + 4)
- .attr({
- fill: 'silver'
- }).add();
- }
- // */
- }
- slotsLength = slots.length;
-
- // if there are more values than available slots, remove lowest values
- if (length > slotsLength) {
- // create an array for sorting and ranking the points within each quarter
- rankArr = [].concat(points);
- rankArr.sort(sort);
- j = length;
- while (j--) {
- rankArr[j].rank = j;
- }
- j = length;
- while (j--) {
- if (points[j].rank >= slotsLength) {
- points.splice(j, 1);
- }
- }
- length = points.length;
- }
-
- // The label goes to the nearest open slot, but not closer to the edge than
- // the label's index.
- for (j = 0; j < length; j++) {
-
- point = points[j];
- labelPos = point.labelPos;
-
- var closest = 9999,
- distance,
- slotI;
-
- // find the closest slot index
- for (slotI = 0; slotI < slotsLength; slotI++) {
- distance = mathAbs(slots[slotI] - labelPos[1]);
- if (distance < closest) {
- closest = distance;
- slotIndex = slotI;
- }
- }
-
- // if that slot index is closer to the edges of the slots, move it
- // to the closest appropriate slot
- if (slotIndex < j && slots[j] !== null) { // cluster at the top
- slotIndex = j;
- } else if (slotsLength < length - j + slotIndex && slots[j] !== null) { // cluster at the bottom
- slotIndex = slotsLength - length + j;
- while (slots[slotIndex] === null) { // make sure it is not taken
- slotIndex++;
- }
- } else {
- // Slot is taken, find next free slot below. In the next run, the next slice will find the
- // slot above these, because it is the closest one
- while (slots[slotIndex] === null) { // make sure it is not taken
- slotIndex++;
- }
- }
-
- usedSlots.push({ i: slotIndex, y: slots[slotIndex] });
- slots[slotIndex] = null; // mark as taken
- }
- // sort them in order to fill in from the top
- usedSlots.sort(sort);
- }
-
- // now the used slots are sorted, fill them up sequentially
- for (j = 0; j < length; j++) {
-
- var slot, naturalY;
-
- point = points[j];
- labelPos = point.labelPos;
- dataLabel = point.dataLabel;
- visibility = point.visible === false ? HIDDEN : VISIBLE;
- naturalY = labelPos[1];
-
- if (distanceOption > 0) {
- slot = usedSlots.pop();
- slotIndex = slot.i;
-
- // if the slot next to currrent slot is free, the y value is allowed
- // to fall back to the natural position
- y = slot.y;
- if ((naturalY > y && slots[slotIndex + 1] !== null) ||
- (naturalY < y && slots[slotIndex - 1] !== null)) {
- y = naturalY;
- }
-
- } else {
- y = naturalY;
- }
-
- // get the x - use the natural x position for first and last slot, to prevent the top
- // and botton slice connectors from touching each other on either side
- x = options.justify ?
- seriesCenter[0] + (i ? -1 : 1) * (radius + distanceOption) :
- series.getX(slotIndex === 0 || slotIndex === slots.length - 1 ? naturalY : y, i);
-
- // move or place the data label
- dataLabel
- .attr({
- visibility: visibility,
- align: labelPos[6]
- })[dataLabel.moved ? 'animate' : 'attr']({
- x: x + options.x +
- ({ left: connectorPadding, right: -connectorPadding }[labelPos[6]] || 0),
- y: y + options.y
- });
- dataLabel.moved = true;
-
- // draw the connector
- if (outside && connectorWidth) {
- connector = point.connector;
-
- connectorPath = softConnector ? [
- M,
- x + (labelPos[6] === 'left' ? 5 : -5), y, // end of the string at the label
- 'C',
- x, y, // first break, next to the label
- 2 * labelPos[2] - labelPos[4], 2 * labelPos[3] - labelPos[5],
- labelPos[2], labelPos[3], // second break
- L,
- labelPos[4], labelPos[5] // base
- ] : [
- M,
- x + (labelPos[6] === 'left' ? 5 : -5), y, // end of the string at the label
- L,
- labelPos[2], labelPos[3], // second break
- L,
- labelPos[4], labelPos[5] // base
- ];
-
- if (connector) {
- connector.animate({ d: connectorPath });
- connector.attr('visibility', visibility);
-
- } else {
- point.connector = connector = series.chart.renderer.path(connectorPath).attr({
- 'stroke-width': connectorWidth,
- stroke: options.connectorColor || point.color || '#606060',
- visibility: visibility,
- zIndex: 3
- })
- .translate(chart.plotLeft, chart.plotTop)
- .add();
- }
- }
- }
- }
- },
-
- /**
- * Draw point specific tracker objects. Inherit directly from column series.
- */
- drawTracker: ColumnSeries.prototype.drawTracker,
-
- /**
- * Use a simple symbol from column prototype
- */
- drawLegendSymbol: AreaSeries.prototype.drawLegendSymbol,
-
- /**
- * Pies don't have point marker symbols
- */
- getSymbol: function () {
- }
-
- };
- PieSeries = extendClass(Series, PieSeries);
- seriesTypes.pie = PieSeries;
-
-
-// global variables
- extend(Highcharts, {
-
- // Constructors
- Axis: Axis,
- CanVGRenderer: CanVGRenderer,
- Chart: Chart,
- Color: Color,
- Legend: Legend,
- Point: Point,
- Tick: Tick,
- Tooltip: Tooltip,
- Renderer: Renderer,
- Series: Series,
- SVGRenderer: SVGRenderer,
- VMLRenderer: VMLRenderer,
-
- // Various
- dateFormat: dateFormat,
- pathAnim: pathAnim,
- getOptions: getOptions,
- hasBidiBug: hasBidiBug,
- numberFormat: numberFormat,
- seriesTypes: seriesTypes,
- setOptions: setOptions,
- addEvent: addEvent,
- removeEvent: removeEvent,
- createElement: createElement,
- discardElement: discardElement,
- css: css,
- each: each,
- extend: extend,
- map: map,
- merge: merge,
- pick: pick,
- splat: splat,
- extendClass: extendClass,
- pInt: pInt,
- product: 'Highcharts',
- version: '2.2.5'
- });
-}());
diff --git a/src/common/lib/vendor/2amigos/yiiwheels/widgets/highcharts/assets/js/modules/canvas-tools.js b/src/common/lib/vendor/2amigos/yiiwheels/widgets/highcharts/assets/js/modules/canvas-tools.js
deleted file mode 100644
index 45ea867..0000000
--- a/src/common/lib/vendor/2amigos/yiiwheels/widgets/highcharts/assets/js/modules/canvas-tools.js
+++ /dev/null
@@ -1,1590 +0,0 @@
-/*
- A class to parse color values
- @author Stoyan Stefanov
- @link http://www.phpied.com/rgb-color-parser-in-javascript/
- Use it if you like it
-
- canvg.js - Javascript SVG parser and renderer on Canvas
- MIT Licensed
- Gabe Lerner (gabelerner@gmail.com)
- http://code.google.com/p/canvg/
-
- Requires: rgbcolor.js - http://www.phpied.com/rgb-color-parser-in-javascript/
-
- Highcharts JS v2.2.5 (2012-06-08)
- CanVGRenderer Extension module
-
- (c) 2011-2012 Torstein H?nsi, Erik Olsson
-
- License: www.highcharts.com/license
- */
-function RGBColor(m) {
- this.ok = !1;
- m.charAt(0) == "#" && (m = m.substr(1, 6));
- var m = m.replace(/ /g, ""), m = m.toLowerCase(), a = {aliceblue: "f0f8ff", antiquewhite: "faebd7", aqua: "00ffff", aquamarine: "7fffd4", azure: "f0ffff", beige: "f5f5dc", bisque: "ffe4c4", black: "000000", blanchedalmond: "ffebcd", blue: "0000ff", blueviolet: "8a2be2", brown: "a52a2a", burlywood: "deb887", cadetblue: "5f9ea0", chartreuse: "7fff00", chocolate: "d2691e", coral: "ff7f50", cornflowerblue: "6495ed", cornsilk: "fff8dc", crimson: "dc143c", cyan: "00ffff", darkblue: "00008b",
- darkcyan: "008b8b", darkgoldenrod: "b8860b", darkgray: "a9a9a9", darkgreen: "006400", darkkhaki: "bdb76b", darkmagenta: "8b008b", darkolivegreen: "556b2f", darkorange: "ff8c00", darkorchid: "9932cc", darkred: "8b0000", darksalmon: "e9967a", darkseagreen: "8fbc8f", darkslateblue: "483d8b", darkslategray: "2f4f4f", darkturquoise: "00ced1", darkviolet: "9400d3", deeppink: "ff1493", deepskyblue: "00bfff", dimgray: "696969", dodgerblue: "1e90ff", feldspar: "d19275", firebrick: "b22222", floralwhite: "fffaf0", forestgreen: "228b22", fuchsia: "ff00ff",
- gainsboro: "dcdcdc", ghostwhite: "f8f8ff", gold: "ffd700", goldenrod: "daa520", gray: "808080", green: "008000", greenyellow: "adff2f", honeydew: "f0fff0", hotpink: "ff69b4", indianred: "cd5c5c", indigo: "4b0082", ivory: "fffff0", khaki: "f0e68c", lavender: "e6e6fa", lavenderblush: "fff0f5", lawngreen: "7cfc00", lemonchiffon: "fffacd", lightblue: "add8e6", lightcoral: "f08080", lightcyan: "e0ffff", lightgoldenrodyellow: "fafad2", lightgrey: "d3d3d3", lightgreen: "90ee90", lightpink: "ffb6c1", lightsalmon: "ffa07a", lightseagreen: "20b2aa", lightskyblue: "87cefa",
- lightslateblue: "8470ff", lightslategray: "778899", lightsteelblue: "b0c4de", lightyellow: "ffffe0", lime: "00ff00", limegreen: "32cd32", linen: "faf0e6", magenta: "ff00ff", maroon: "800000", mediumaquamarine: "66cdaa", mediumblue: "0000cd", mediumorchid: "ba55d3", mediumpurple: "9370d8", mediumseagreen: "3cb371", mediumslateblue: "7b68ee", mediumspringgreen: "00fa9a", mediumturquoise: "48d1cc", mediumvioletred: "c71585", midnightblue: "191970", mintcream: "f5fffa", mistyrose: "ffe4e1", moccasin: "ffe4b5", navajowhite: "ffdead", navy: "000080",
- oldlace: "fdf5e6", olive: "808000", olivedrab: "6b8e23", orange: "ffa500", orangered: "ff4500", orchid: "da70d6", palegoldenrod: "eee8aa", palegreen: "98fb98", paleturquoise: "afeeee", palevioletred: "d87093", papayawhip: "ffefd5", peachpuff: "ffdab9", peru: "cd853f", pink: "ffc0cb", plum: "dda0dd", powderblue: "b0e0e6", purple: "800080", red: "ff0000", rosybrown: "bc8f8f", royalblue: "4169e1", saddlebrown: "8b4513", salmon: "fa8072", sandybrown: "f4a460", seagreen: "2e8b57", seashell: "fff5ee", sienna: "a0522d", silver: "c0c0c0", skyblue: "87ceeb", slateblue: "6a5acd",
- slategray: "708090", snow: "fffafa", springgreen: "00ff7f", steelblue: "4682b4", tan: "d2b48c", teal: "008080", thistle: "d8bfd8", tomato: "ff6347", turquoise: "40e0d0", violet: "ee82ee", violetred: "d02090", wheat: "f5deb3", white: "ffffff", whitesmoke: "f5f5f5", yellow: "ffff00", yellowgreen: "9acd32"}, c;
- for (c in a)m == c && (m = a[c]);
- var d = [
- {re: /^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/, example: ["rgb(123, 234, 45)", "rgb(255,234,245)"], process: function (b) {
- return[parseInt(b[1]), parseInt(b[2]), parseInt(b[3])]
- }},
- {re: /^(\w{2})(\w{2})(\w{2})$/,
- example: ["#00ff00", "336699"], process: function (b) {
- return[parseInt(b[1], 16), parseInt(b[2], 16), parseInt(b[3], 16)]
- }},
- {re: /^(\w{1})(\w{1})(\w{1})$/, example: ["#fb0", "f0f"], process: function (b) {
- return[parseInt(b[1] + b[1], 16), parseInt(b[2] + b[2], 16), parseInt(b[3] + b[3], 16)]
- }}
- ];
- for (c = 0; c < d.length; c++) {
- var b = d[c].process, k = d[c].re.exec(m);
- if (k)channels = b(k), this.r = channels[0], this.g = channels[1], this.b = channels[2], this.ok = !0
- }
- this.r = this.r < 0 || isNaN(this.r) ? 0 : this.r > 255 ? 255 : this.r;
- this.g = this.g < 0 || isNaN(this.g) ? 0 :
- this.g > 255 ? 255 : this.g;
- this.b = this.b < 0 || isNaN(this.b) ? 0 : this.b > 255 ? 255 : this.b;
- this.toRGB = function () {
- return"rgb(" + this.r + ", " + this.g + ", " + this.b + ")"
- };
- this.toHex = function () {
- var b = this.r.toString(16), a = this.g.toString(16), d = this.b.toString(16);
- b.length == 1 && (b = "0" + b);
- a.length == 1 && (a = "0" + a);
- d.length == 1 && (d = "0" + d);
- return"#" + b + a + d
- };
- this.getHelpXML = function () {
- for (var b = [], k = 0; k < d.length; k++)for (var c = d[k].example, j = 0; j < c.length; j++)b[b.length] = c[j];
- for (var h in a)b[b.length] = h;
- c = document.createElement("ul");
- c.setAttribute("id", "rgbcolor-examples");
- for (k = 0; k < b.length; k++)try {
- var l = document.createElement("li"), o = new RGBColor(b[k]), n = document.createElement("div");
- n.style.cssText = "margin: 3px; border: 1px solid black; background:" + o.toHex() + "; color:" + o.toHex();
- n.appendChild(document.createTextNode("test"));
- var q = document.createTextNode(" " + b[k] + " -> " + o.toRGB() + " -> " + o.toHex());
- l.appendChild(n);
- l.appendChild(q);
- c.appendChild(l)
- } catch (p) {
- }
- return c
- }
-}
-if (!window.console)window.console = {}, window.console.log = function () {
-}, window.console.dir = function () {
-};
-if (!Array.prototype.indexOf)Array.prototype.indexOf = function (m) {
- for (var a = 0; a < this.length; a++)if (this[a] == m)return a;
- return-1
-};
-(function () {
- function m() {
- var a = {FRAMERATE: 30, MAX_VIRTUAL_PIXELS: 3E4};
- a.init = function (c) {
- a.Definitions = {};
- a.Styles = {};
- a.Animations = [];
- a.Images = [];
- a.ctx = c;
- a.ViewPort = new function () {
- this.viewPorts = [];
- this.Clear = function () {
- this.viewPorts = []
- };
- this.SetCurrent = function (a, b) {
- this.viewPorts.push({width: a, height: b})
- };
- this.RemoveCurrent = function () {
- this.viewPorts.pop()
- };
- this.Current = function () {
- return this.viewPorts[this.viewPorts.length - 1]
- };
- this.width = function () {
- return this.Current().width
- };
- this.height = function () {
- return this.Current().height
- };
- this.ComputeSize = function (a) {
- return a != null && typeof a == "number" ? a : a == "x" ? this.width() : a == "y" ? this.height() : Math.sqrt(Math.pow(this.width(), 2) + Math.pow(this.height(), 2)) / Math.sqrt(2)
- }
- }
- };
- a.init();
- a.ImagesLoaded = function () {
- for (var c = 0; c < a.Images.length; c++)if (!a.Images[c].loaded)return!1;
- return!0
- };
- a.trim = function (a) {
- return a.replace(/^\s+|\s+$/g, "")
- };
- a.compressSpaces = function (a) {
- return a.replace(/[\s\r\t\n]+/gm, " ")
- };
- a.ajax = function (a) {
- var d;
- return(d = window.XMLHttpRequest ? new XMLHttpRequest : new ActiveXObject("Microsoft.XMLHTTP")) ?
- (d.open("GET", a, !1), d.send(null), d.responseText) : null
- };
- a.parseXml = function (a) {
- if (window.DOMParser)return(new DOMParser).parseFromString(a, "text/xml"); else {
- var a = a.replace(/]*>/, ""), d = new ActiveXObject("Microsoft.XMLDOM");
- d.async = "false";
- d.loadXML(a);
- return d
- }
- };
- a.Property = function (c, d) {
- this.name = c;
- this.value = d;
- this.hasValue = function () {
- return this.value != null && this.value !== ""
- };
- this.numValue = function () {
- if (!this.hasValue())return 0;
- var b = parseFloat(this.value);
- (this.value + "").match(/%$/) &&
- (b /= 100);
- return b
- };
- this.valueOrDefault = function (b) {
- return this.hasValue() ? this.value : b
- };
- this.numValueOrDefault = function (b) {
- return this.hasValue() ? this.numValue() : b
- };
- var b = this;
- this.Color = {addOpacity: function (d) {
- var c = b.value;
- if (d != null && d != "") {
- var f = new RGBColor(b.value);
- f.ok && (c = "rgba(" + f.r + ", " + f.g + ", " + f.b + ", " + d + ")")
- }
- return new a.Property(b.name, c)
- }};
- this.Definition = {getDefinition: function () {
- var d = b.value.replace(/^(url\()?#([^\)]+)\)?$/, "$2");
- return a.Definitions[d]
- }, isUrl: function () {
- return b.value.indexOf("url(") ==
- 0
- }, getFillStyle: function (b) {
- var d = this.getDefinition();
- return d != null && d.createGradient ? d.createGradient(a.ctx, b) : d != null && d.createPattern ? d.createPattern(a.ctx, b) : null
- }};
- this.Length = {DPI: function () {
- return 96
- }, EM: function (b) {
- var d = 12, c = new a.Property("fontSize", a.Font.Parse(a.ctx.font).fontSize);
- c.hasValue() && (d = c.Length.toPixels(b));
- return d
- }, toPixels: function (d) {
- if (!b.hasValue())return 0;
- var c = b.value + "";
- return c.match(/em$/) ? b.numValue() * this.EM(d) : c.match(/ex$/) ? b.numValue() * this.EM(d) / 2 : c.match(/px$/) ?
- b.numValue() : c.match(/pt$/) ? b.numValue() * 1.25 : c.match(/pc$/) ? b.numValue() * 15 : c.match(/cm$/) ? b.numValue() * this.DPI(d) / 2.54 : c.match(/mm$/) ? b.numValue() * this.DPI(d) / 25.4 : c.match(/in$/) ? b.numValue() * this.DPI(d) : c.match(/%$/) ? b.numValue() * a.ViewPort.ComputeSize(d) : b.numValue()
- }};
- this.Time = {toMilliseconds: function () {
- if (!b.hasValue())return 0;
- var a = b.value + "";
- if (a.match(/s$/))return b.numValue() * 1E3;
- a.match(/ms$/);
- return b.numValue()
- }};
- this.Angle = {toRadians: function () {
- if (!b.hasValue())return 0;
- var a = b.value +
- "";
- return a.match(/deg$/) ? b.numValue() * (Math.PI / 180) : a.match(/grad$/) ? b.numValue() * (Math.PI / 200) : a.match(/rad$/) ? b.numValue() : b.numValue() * (Math.PI / 180)
- }}
- };
- a.Font = new function () {
- this.Styles = ["normal", "italic", "oblique", "inherit"];
- this.Variants = ["normal", "small-caps", "inherit"];
- this.Weights = "normal,bold,bolder,lighter,100,200,300,400,500,600,700,800,900,inherit".split(",");
- this.CreateFont = function (d, b, c, e, f, g) {
- g = g != null ? this.Parse(g) : this.CreateFont("", "", "", "", "", a.ctx.font);
- return{fontFamily: f ||
- g.fontFamily, fontSize: e || g.fontSize, fontStyle: d || g.fontStyle, fontWeight: c || g.fontWeight, fontVariant: b || g.fontVariant, toString: function () {
- return[this.fontStyle, this.fontVariant, this.fontWeight, this.fontSize, this.fontFamily].join(" ")
- }}
- };
- var c = this;
- this.Parse = function (d) {
- for (var b = {}, d = a.trim(a.compressSpaces(d || "")).split(" "), k = !1, e = !1, f = !1, g = !1, j = "", h = 0; h < d.length; h++)if (!e && c.Styles.indexOf(d[h]) != -1) {
- if (d[h] != "inherit")b.fontStyle = d[h];
- e = !0
- } else if (!g && c.Variants.indexOf(d[h]) != -1) {
- if (d[h] != "inherit")b.fontVariant =
- d[h];
- e = g = !0
- } else if (!f && c.Weights.indexOf(d[h]) != -1) {
- if (d[h] != "inherit")b.fontWeight = d[h];
- e = g = f = !0
- } else if (k)d[h] != "inherit" && (j += d[h]); else {
- if (d[h] != "inherit")b.fontSize = d[h].split("/")[0];
- e = g = f = k = !0
- }
- if (j != "")b.fontFamily = j;
- return b
- }
- };
- a.ToNumberArray = function (c) {
- for (var c = a.trim(a.compressSpaces((c || "").replace(/,/g, " "))).split(" "), d = 0; d < c.length; d++)c[d] = parseFloat(c[d]);
- return c
- };
- a.Point = function (a, d) {
- this.x = a;
- this.y = d;
- this.angleTo = function (b) {
- return Math.atan2(b.y - this.y, b.x - this.x)
- };
- this.applyTransform =
- function (b) {
- var a = this.x * b[1] + this.y * b[3] + b[5];
- this.x = this.x * b[0] + this.y * b[2] + b[4];
- this.y = a
- }
- };
- a.CreatePoint = function (c) {
- c = a.ToNumberArray(c);
- return new a.Point(c[0], c[1])
- };
- a.CreatePath = function (c) {
- for (var c = a.ToNumberArray(c), d = [], b = 0; b < c.length; b += 2)d.push(new a.Point(c[b], c[b + 1]));
- return d
- };
- a.BoundingBox = function (a, d, b, k) {
- this.y2 = this.x2 = this.y1 = this.x1 = Number.NaN;
- this.x = function () {
- return this.x1
- };
- this.y = function () {
- return this.y1
- };
- this.width = function () {
- return this.x2 - this.x1
- };
- this.height = function () {
- return this.y2 -
- this.y1
- };
- this.addPoint = function (b, a) {
- if (b != null) {
- if (isNaN(this.x1) || isNaN(this.x2))this.x2 = this.x1 = b;
- if (b < this.x1)this.x1 = b;
- if (b > this.x2)this.x2 = b
- }
- if (a != null) {
- if (isNaN(this.y1) || isNaN(this.y2))this.y2 = this.y1 = a;
- if (a < this.y1)this.y1 = a;
- if (a > this.y2)this.y2 = a
- }
- };
- this.addX = function (b) {
- this.addPoint(b, null)
- };
- this.addY = function (b) {
- this.addPoint(null, b)
- };
- this.addBoundingBox = function (b) {
- this.addPoint(b.x1, b.y1);
- this.addPoint(b.x2, b.y2)
- };
- this.addQuadraticCurve = function (b, a, d, c, k, l) {
- d = b + 2 / 3 * (d - b);
- c = a + 2 / 3 * (c -
- a);
- this.addBezierCurve(b, a, d, d + 1 / 3 * (k - b), c, c + 1 / 3 * (l - a), k, l)
- };
- this.addBezierCurve = function (b, a, d, c, k, l, o, n) {
- var q = [b, a], p = [d, c], t = [k, l], m = [o, n];
- this.addPoint(q[0], q[1]);
- this.addPoint(m[0], m[1]);
- for (i = 0; i <= 1; i++)b = function (b) {
- return Math.pow(1 - b, 3) * q[i] + 3 * Math.pow(1 - b, 2) * b * p[i] + 3 * (1 - b) * Math.pow(b, 2) * t[i] + Math.pow(b, 3) * m[i]
- }, a = 6 * q[i] - 12 * p[i] + 6 * t[i], d = -3 * q[i] + 9 * p[i] - 9 * t[i] + 3 * m[i], c = 3 * p[i] - 3 * q[i], d == 0 ? a != 0 && (a = -c / a, 0 < a && a < 1 && (i == 0 && this.addX(b(a)), i == 1 && this.addY(b(a)))) : (c = Math.pow(a, 2) - 4 * c * d, c < 0 || (k =
- (-a + Math.sqrt(c)) / (2 * d), 0 < k && k < 1 && (i == 0 && this.addX(b(k)), i == 1 && this.addY(b(k))), a = (-a - Math.sqrt(c)) / (2 * d), 0 < a && a < 1 && (i == 0 && this.addX(b(a)), i == 1 && this.addY(b(a)))))
- };
- this.isPointInBox = function (b, a) {
- return this.x1 <= b && b <= this.x2 && this.y1 <= a && a <= this.y2
- };
- this.addPoint(a, d);
- this.addPoint(b, k)
- };
- a.Transform = function (c) {
- var d = this;
- this.Type = {};
- this.Type.translate = function (b) {
- this.p = a.CreatePoint(b);
- this.apply = function (b) {
- b.translate(this.p.x || 0, this.p.y || 0)
- };
- this.applyToPoint = function (b) {
- b.applyTransform([1,
- 0, 0, 1, this.p.x || 0, this.p.y || 0])
- }
- };
- this.Type.rotate = function (b) {
- b = a.ToNumberArray(b);
- this.angle = new a.Property("angle", b[0]);
- this.cx = b[1] || 0;
- this.cy = b[2] || 0;
- this.apply = function (b) {
- b.translate(this.cx, this.cy);
- b.rotate(this.angle.Angle.toRadians());
- b.translate(-this.cx, -this.cy)
- };
- this.applyToPoint = function (b) {
- var a = this.angle.Angle.toRadians();
- b.applyTransform([1, 0, 0, 1, this.p.x || 0, this.p.y || 0]);
- b.applyTransform([Math.cos(a), Math.sin(a), -Math.sin(a), Math.cos(a), 0, 0]);
- b.applyTransform([1, 0, 0, 1, -this.p.x ||
- 0, -this.p.y || 0])
- }
- };
- this.Type.scale = function (b) {
- this.p = a.CreatePoint(b);
- this.apply = function (b) {
- b.scale(this.p.x || 1, this.p.y || this.p.x || 1)
- };
- this.applyToPoint = function (b) {
- b.applyTransform([this.p.x || 0, 0, 0, this.p.y || 0, 0, 0])
- }
- };
- this.Type.matrix = function (b) {
- this.m = a.ToNumberArray(b);
- this.apply = function (b) {
- b.transform(this.m[0], this.m[1], this.m[2], this.m[3], this.m[4], this.m[5])
- };
- this.applyToPoint = function (b) {
- b.applyTransform(this.m)
- }
- };
- this.Type.SkewBase = function (b) {
- this.base = d.Type.matrix;
- this.base(b);
- this.angle =
- new a.Property("angle", b)
- };
- this.Type.SkewBase.prototype = new this.Type.matrix;
- this.Type.skewX = function (b) {
- this.base = d.Type.SkewBase;
- this.base(b);
- this.m = [1, 0, Math.tan(this.angle.Angle.toRadians()), 1, 0, 0]
- };
- this.Type.skewX.prototype = new this.Type.SkewBase;
- this.Type.skewY = function (b) {
- this.base = d.Type.SkewBase;
- this.base(b);
- this.m = [1, Math.tan(this.angle.Angle.toRadians()), 0, 1, 0, 0]
- };
- this.Type.skewY.prototype = new this.Type.SkewBase;
- this.transforms = [];
- this.apply = function (b) {
- for (var a = 0; a < this.transforms.length; a++)this.transforms[a].apply(b)
- };
- this.applyToPoint = function (b) {
- for (var a = 0; a < this.transforms.length; a++)this.transforms[a].applyToPoint(b)
- };
- for (var c = a.trim(a.compressSpaces(c)).split(/\s(?=[a-z])/), b = 0; b < c.length; b++) {
- var k = c[b].split("(")[0], e = c[b].split("(")[1].replace(")", "");
- this.transforms.push(new this.Type[k](e))
- }
- };
- a.AspectRatio = function (c, d, b, k, e, f, g, j, h, l) {
- var d = a.compressSpaces(d), d = d.replace(/^defer\s/, ""), o = d.split(" ")[0] || "xMidYMid", d = d.split(" ")[1] || "meet", n = b / k, q = e / f, p = Math.min(n, q), m = Math.max(n, q);
- d == "meet" && (k *=
- p, f *= p);
- d == "slice" && (k *= m, f *= m);
- h = new a.Property("refX", h);
- l = new a.Property("refY", l);
- h.hasValue() && l.hasValue() ? c.translate(-p * h.Length.toPixels("x"), -p * l.Length.toPixels("y")) : (o.match(/^xMid/) && (d == "meet" && p == q || d == "slice" && m == q) && c.translate(b / 2 - k / 2, 0), o.match(/YMid$/) && (d == "meet" && p == n || d == "slice" && m == n) && c.translate(0, e / 2 - f / 2), o.match(/^xMax/) && (d == "meet" && p == q || d == "slice" && m == q) && c.translate(b - k, 0), o.match(/YMax$/) && (d == "meet" && p == n || d == "slice" && m == n) && c.translate(0, e - f));
- o == "none" ? c.scale(n,
- q) : d == "meet" ? c.scale(p, p) : d == "slice" && c.scale(m, m);
- c.translate(g == null ? 0 : -g, j == null ? 0 : -j)
- };
- a.Element = {};
- a.Element.ElementBase = function (c) {
- this.attributes = {};
- this.styles = {};
- this.children = [];
- this.attribute = function (b, d) {
- var c = this.attributes[b];
- if (c != null)return c;
- c = new a.Property(b, "");
- d == !0 && (this.attributes[b] = c);
- return c
- };
- this.style = function (b, d) {
- var c = this.styles[b];
- if (c != null)return c;
- c = this.attribute(b);
- if (c != null && c.hasValue())return c;
- c = this.parent;
- if (c != null && (c = c.style(b), c != null && c.hasValue()))return c;
- c = new a.Property(b, "");
- d == !0 && (this.styles[b] = c);
- return c
- };
- this.render = function (b) {
- if (this.style("display").value != "none" && this.attribute("visibility").value != "hidden") {
- b.save();
- this.setContext(b);
- if (this.attribute("mask").hasValue()) {
- var a = this.attribute("mask").Definition.getDefinition();
- a != null && a.apply(b, this)
- } else this.style("filter").hasValue() ? (a = this.style("filter").Definition.getDefinition(), a != null && a.apply(b, this)) : this.renderChildren(b);
- this.clearContext(b);
- b.restore()
- }
- };
- this.setContext =
- function () {
- };
- this.clearContext = function () {
- };
- this.renderChildren = function (b) {
- for (var a = 0; a < this.children.length; a++)this.children[a].render(b)
- };
- this.addChild = function (b, d) {
- var c = b;
- d && (c = a.CreateElement(b));
- c.parent = this;
- this.children.push(c)
- };
- if (c != null && c.nodeType == 1) {
- for (var d = 0; d < c.childNodes.length; d++) {
- var b = c.childNodes[d];
- b.nodeType == 1 && this.addChild(b, !0)
- }
- for (d = 0; d < c.attributes.length; d++)b = c.attributes[d], this.attributes[b.nodeName] = new a.Property(b.nodeName, b.nodeValue);
- b = a.Styles[c.nodeName];
- if (b != null)for (var k in b)this.styles[k] = b[k];
- if (this.attribute("class").hasValue())for (var d = a.compressSpaces(this.attribute("class").value).split(" "), e = 0; e < d.length; e++) {
- b = a.Styles["." + d[e]];
- if (b != null)for (k in b)this.styles[k] = b[k];
- b = a.Styles[c.nodeName + "." + d[e]];
- if (b != null)for (k in b)this.styles[k] = b[k]
- }
- if (this.attribute("style").hasValue()) {
- b = this.attribute("style").value.split(";");
- for (d = 0; d < b.length; d++)a.trim(b[d]) != "" && (c = b[d].split(":"), k = a.trim(c[0]), c = a.trim(c[1]), this.styles[k] = new a.Property(k,
- c))
- }
- this.attribute("id").hasValue() && a.Definitions[this.attribute("id").value] == null && (a.Definitions[this.attribute("id").value] = this)
- }
- };
- a.Element.RenderedElementBase = function (c) {
- this.base = a.Element.ElementBase;
- this.base(c);
- this.setContext = function (d) {
- if (this.style("fill").Definition.isUrl()) {
- var b = this.style("fill").Definition.getFillStyle(this);
- if (b != null)d.fillStyle = b
- } else if (this.style("fill").hasValue())b = this.style("fill"), this.style("fill-opacity").hasValue() && (b = b.Color.addOpacity(this.style("fill-opacity").value)),
- d.fillStyle = b.value == "none" ? "rgba(0,0,0,0)" : b.value;
- if (this.style("stroke").Definition.isUrl()) {
- if (b = this.style("stroke").Definition.getFillStyle(this), b != null)d.strokeStyle = b
- } else if (this.style("stroke").hasValue())b = this.style("stroke"), this.style("stroke-opacity").hasValue() && (b = b.Color.addOpacity(this.style("stroke-opacity").value)), d.strokeStyle = b.value == "none" ? "rgba(0,0,0,0)" : b.value;
- if (this.style("stroke-width").hasValue())d.lineWidth = this.style("stroke-width").Length.toPixels();
- if (this.style("stroke-linecap").hasValue())d.lineCap =
- this.style("stroke-linecap").value;
- if (this.style("stroke-linejoin").hasValue())d.lineJoin = this.style("stroke-linejoin").value;
- if (this.style("stroke-miterlimit").hasValue())d.miterLimit = this.style("stroke-miterlimit").value;
- if (typeof d.font != "undefined")d.font = a.Font.CreateFont(this.style("font-style").value, this.style("font-variant").value, this.style("font-weight").value, this.style("font-size").hasValue() ? this.style("font-size").Length.toPixels() + "px" : "", this.style("font-family").value).toString();
- this.attribute("transform").hasValue() && (new a.Transform(this.attribute("transform").value)).apply(d);
- this.attribute("clip-path").hasValue() && (b = this.attribute("clip-path").Definition.getDefinition(), b != null && b.apply(d));
- if (this.style("opacity").hasValue())d.globalAlpha = this.style("opacity").numValue()
- }
- };
- a.Element.RenderedElementBase.prototype = new a.Element.ElementBase;
- a.Element.PathElementBase = function (c) {
- this.base = a.Element.RenderedElementBase;
- this.base(c);
- this.path = function (d) {
- d != null && d.beginPath();
- return new a.BoundingBox
- };
- this.renderChildren = function (d) {
- this.path(d);
- a.Mouse.checkPath(this, d);
- d.fillStyle != "" && d.fill();
- d.strokeStyle != "" && d.stroke();
- var b = this.getMarkers();
- if (b != null) {
- if (this.style("marker-start").Definition.isUrl()) {
- var c = this.style("marker-start").Definition.getDefinition();
- c.render(d, b[0][0], b[0][1])
- }
- if (this.style("marker-mid").Definition.isUrl())for (var c = this.style("marker-mid").Definition.getDefinition(), e = 1; e < b.length - 1; e++)c.render(d, b[e][0], b[e][1]);
- this.style("marker-end").Definition.isUrl() &&
- (c = this.style("marker-end").Definition.getDefinition(), c.render(d, b[b.length - 1][0], b[b.length - 1][1]))
- }
- };
- this.getBoundingBox = function () {
- return this.path()
- };
- this.getMarkers = function () {
- return null
- }
- };
- a.Element.PathElementBase.prototype = new a.Element.RenderedElementBase;
- a.Element.svg = function (c) {
- this.base = a.Element.RenderedElementBase;
- this.base(c);
- this.baseClearContext = this.clearContext;
- this.clearContext = function (d) {
- this.baseClearContext(d);
- a.ViewPort.RemoveCurrent()
- };
- this.baseSetContext = this.setContext;
- this.setContext = function (d) {
- d.strokeStyle = "rgba(0,0,0,0)";
- d.lineCap = "butt";
- d.lineJoin = "miter";
- d.miterLimit = 4;
- this.baseSetContext(d);
- this.attribute("x").hasValue() && this.attribute("y").hasValue() && d.translate(this.attribute("x").Length.toPixels("x"), this.attribute("y").Length.toPixels("y"));
- var b = a.ViewPort.width(), c = a.ViewPort.height();
- if (typeof this.root == "undefined" && this.attribute("width").hasValue() && this.attribute("height").hasValue()) {
- var b = this.attribute("width").Length.toPixels("x"), c = this.attribute("height").Length.toPixels("y"),
- e = 0, f = 0;
- this.attribute("refX").hasValue() && this.attribute("refY").hasValue() && (e = -this.attribute("refX").Length.toPixels("x"), f = -this.attribute("refY").Length.toPixels("y"));
- d.beginPath();
- d.moveTo(e, f);
- d.lineTo(b, f);
- d.lineTo(b, c);
- d.lineTo(e, c);
- d.closePath();
- d.clip()
- }
- a.ViewPort.SetCurrent(b, c);
- if (this.attribute("viewBox").hasValue()) {
- var e = a.ToNumberArray(this.attribute("viewBox").value), f = e[0], g = e[1], b = e[2], c = e[3];
- a.AspectRatio(d, this.attribute("preserveAspectRatio").value, a.ViewPort.width(), b, a.ViewPort.height(),
- c, f, g, this.attribute("refX").value, this.attribute("refY").value);
- a.ViewPort.RemoveCurrent();
- a.ViewPort.SetCurrent(e[2], e[3])
- }
- }
- };
- a.Element.svg.prototype = new a.Element.RenderedElementBase;
- a.Element.rect = function (c) {
- this.base = a.Element.PathElementBase;
- this.base(c);
- this.path = function (d) {
- var b = this.attribute("x").Length.toPixels("x"), c = this.attribute("y").Length.toPixels("y"), e = this.attribute("width").Length.toPixels("x"), f = this.attribute("height").Length.toPixels("y"), g = this.attribute("rx").Length.toPixels("x"),
- j = this.attribute("ry").Length.toPixels("y");
- this.attribute("rx").hasValue() && !this.attribute("ry").hasValue() && (j = g);
- this.attribute("ry").hasValue() && !this.attribute("rx").hasValue() && (g = j);
- d != null && (d.beginPath(), d.moveTo(b + g, c), d.lineTo(b + e - g, c), d.quadraticCurveTo(b + e, c, b + e, c + j), d.lineTo(b + e, c + f - j), d.quadraticCurveTo(b + e, c + f, b + e - g, c + f), d.lineTo(b + g, c + f), d.quadraticCurveTo(b, c + f, b, c + f - j), d.lineTo(b, c + j), d.quadraticCurveTo(b, c, b + g, c), d.closePath());
- return new a.BoundingBox(b, c, b + e, c + f)
- }
- };
- a.Element.rect.prototype =
- new a.Element.PathElementBase;
- a.Element.circle = function (c) {
- this.base = a.Element.PathElementBase;
- this.base(c);
- this.path = function (d) {
- var b = this.attribute("cx").Length.toPixels("x"), c = this.attribute("cy").Length.toPixels("y"), e = this.attribute("r").Length.toPixels();
- d != null && (d.beginPath(), d.arc(b, c, e, 0, Math.PI * 2, !0), d.closePath());
- return new a.BoundingBox(b - e, c - e, b + e, c + e)
- }
- };
- a.Element.circle.prototype = new a.Element.PathElementBase;
- a.Element.ellipse = function (c) {
- this.base = a.Element.PathElementBase;
- this.base(c);
- this.path = function (d) {
- var b = 4 * ((Math.sqrt(2) - 1) / 3), c = this.attribute("rx").Length.toPixels("x"), e = this.attribute("ry").Length.toPixels("y"), f = this.attribute("cx").Length.toPixels("x"), g = this.attribute("cy").Length.toPixels("y");
- d != null && (d.beginPath(), d.moveTo(f, g - e), d.bezierCurveTo(f + b * c, g - e, f + c, g - b * e, f + c, g), d.bezierCurveTo(f + c, g + b * e, f + b * c, g + e, f, g + e), d.bezierCurveTo(f - b * c, g + e, f - c, g + b * e, f - c, g), d.bezierCurveTo(f - c, g - b * e, f - b * c, g - e, f, g - e), d.closePath());
- return new a.BoundingBox(f - c, g - e, f + c, g + e)
- }
- };
- a.Element.ellipse.prototype =
- new a.Element.PathElementBase;
- a.Element.line = function (c) {
- this.base = a.Element.PathElementBase;
- this.base(c);
- this.getPoints = function () {
- return[new a.Point(this.attribute("x1").Length.toPixels("x"), this.attribute("y1").Length.toPixels("y")), new a.Point(this.attribute("x2").Length.toPixels("x"), this.attribute("y2").Length.toPixels("y"))]
- };
- this.path = function (d) {
- var b = this.getPoints();
- d != null && (d.beginPath(), d.moveTo(b[0].x, b[0].y), d.lineTo(b[1].x, b[1].y));
- return new a.BoundingBox(b[0].x, b[0].y, b[1].x, b[1].y)
- };
- this.getMarkers = function () {
- var a = this.getPoints(), b = a[0].angleTo(a[1]);
- return[
- [a[0], b],
- [a[1], b]
- ]
- }
- };
- a.Element.line.prototype = new a.Element.PathElementBase;
- a.Element.polyline = function (c) {
- this.base = a.Element.PathElementBase;
- this.base(c);
- this.points = a.CreatePath(this.attribute("points").value);
- this.path = function (d) {
- var b = new a.BoundingBox(this.points[0].x, this.points[0].y);
- d != null && (d.beginPath(), d.moveTo(this.points[0].x, this.points[0].y));
- for (var c = 1; c < this.points.length; c++)b.addPoint(this.points[c].x,
- this.points[c].y), d != null && d.lineTo(this.points[c].x, this.points[c].y);
- return b
- };
- this.getMarkers = function () {
- for (var a = [], b = 0; b < this.points.length - 1; b++)a.push([this.points[b], this.points[b].angleTo(this.points[b + 1])]);
- a.push([this.points[this.points.length - 1], a[a.length - 1][1]]);
- return a
- }
- };
- a.Element.polyline.prototype = new a.Element.PathElementBase;
- a.Element.polygon = function (c) {
- this.base = a.Element.polyline;
- this.base(c);
- this.basePath = this.path;
- this.path = function (a) {
- var b = this.basePath(a);
- a != null && (a.lineTo(this.points[0].x,
- this.points[0].y), a.closePath());
- return b
- }
- };
- a.Element.polygon.prototype = new a.Element.polyline;
- a.Element.path = function (c) {
- this.base = a.Element.PathElementBase;
- this.base(c);
- c = this.attribute("d").value;
- c = c.replace(/,/gm, " ");
- c = c.replace(/([MmZzLlHhVvCcSsQqTtAa])([MmZzLlHhVvCcSsQqTtAa])/gm, "$1 $2");
- c = c.replace(/([MmZzLlHhVvCcSsQqTtAa])([MmZzLlHhVvCcSsQqTtAa])/gm, "$1 $2");
- c = c.replace(/([MmZzLlHhVvCcSsQqTtAa])([^\s])/gm, "$1 $2");
- c = c.replace(/([^\s])([MmZzLlHhVvCcSsQqTtAa])/gm, "$1 $2");
- c = c.replace(/([0-9])([+\-])/gm,
- "$1 $2");
- c = c.replace(/(\.[0-9]*)(\.)/gm, "$1 $2");
- c = c.replace(/([Aa](\s+[0-9]+){3})\s+([01])\s*([01])/gm, "$1 $3 $4 ");
- c = a.compressSpaces(c);
- c = a.trim(c);
- this.PathParser = new function (d) {
- this.tokens = d.split(" ");
- this.reset = function () {
- this.i = -1;
- this.previousCommand = this.command = "";
- this.start = new a.Point(0, 0);
- this.control = new a.Point(0, 0);
- this.current = new a.Point(0, 0);
- this.points = [];
- this.angles = []
- };
- this.isEnd = function () {
- return this.i >= this.tokens.length - 1
- };
- this.isCommandOrEnd = function () {
- return this.isEnd() ?
- !0 : this.tokens[this.i + 1].match(/^[A-Za-z]$/) != null
- };
- this.isRelativeCommand = function () {
- return this.command == this.command.toLowerCase()
- };
- this.getToken = function () {
- this.i += 1;
- return this.tokens[this.i]
- };
- this.getScalar = function () {
- return parseFloat(this.getToken())
- };
- this.nextCommand = function () {
- this.previousCommand = this.command;
- this.command = this.getToken()
- };
- this.getPoint = function () {
- return this.makeAbsolute(new a.Point(this.getScalar(), this.getScalar()))
- };
- this.getAsControlPoint = function () {
- var b = this.getPoint();
- return this.control = b
- };
- this.getAsCurrentPoint = function () {
- var b = this.getPoint();
- return this.current = b
- };
- this.getReflectedControlPoint = function () {
- return this.previousCommand.toLowerCase() != "c" && this.previousCommand.toLowerCase() != "s" ? this.current : new a.Point(2 * this.current.x - this.control.x, 2 * this.current.y - this.control.y)
- };
- this.makeAbsolute = function (b) {
- if (this.isRelativeCommand())b.x = this.current.x + b.x, b.y = this.current.y + b.y;
- return b
- };
- this.addMarker = function (b, a, d) {
- d != null && this.angles.length > 0 && this.angles[this.angles.length -
- 1] == null && (this.angles[this.angles.length - 1] = this.points[this.points.length - 1].angleTo(d));
- this.addMarkerAngle(b, a == null ? null : a.angleTo(b))
- };
- this.addMarkerAngle = function (b, a) {
- this.points.push(b);
- this.angles.push(a)
- };
- this.getMarkerPoints = function () {
- return this.points
- };
- this.getMarkerAngles = function () {
- for (var b = 0; b < this.angles.length; b++)if (this.angles[b] == null)for (var a = b + 1; a < this.angles.length; a++)if (this.angles[a] != null) {
- this.angles[b] = this.angles[a];
- break
- }
- return this.angles
- }
- }(c);
- this.path = function (d) {
- var b =
- this.PathParser;
- b.reset();
- var c = new a.BoundingBox;
- for (d != null && d.beginPath(); !b.isEnd();)switch (b.nextCommand(), b.command.toUpperCase()) {
- case "M":
- var e = b.getAsCurrentPoint();
- b.addMarker(e);
- c.addPoint(e.x, e.y);
- d != null && d.moveTo(e.x, e.y);
- for (b.start = b.current; !b.isCommandOrEnd();)e = b.getAsCurrentPoint(), b.addMarker(e, b.start), c.addPoint(e.x, e.y), d != null && d.lineTo(e.x, e.y);
- break;
- case "L":
- for (; !b.isCommandOrEnd();) {
- var f = b.current, e = b.getAsCurrentPoint();
- b.addMarker(e, f);
- c.addPoint(e.x, e.y);
- d != null &&
- d.lineTo(e.x, e.y)
- }
- break;
- case "H":
- for (; !b.isCommandOrEnd();)e = new a.Point((b.isRelativeCommand() ? b.current.x : 0) + b.getScalar(), b.current.y), b.addMarker(e, b.current), b.current = e, c.addPoint(b.current.x, b.current.y), d != null && d.lineTo(b.current.x, b.current.y);
- break;
- case "V":
- for (; !b.isCommandOrEnd();)e = new a.Point(b.current.x, (b.isRelativeCommand() ? b.current.y : 0) + b.getScalar()), b.addMarker(e, b.current), b.current = e, c.addPoint(b.current.x, b.current.y), d != null && d.lineTo(b.current.x, b.current.y);
- break;
- case "C":
- for (; !b.isCommandOrEnd();) {
- var g =
- b.current, f = b.getPoint(), j = b.getAsControlPoint(), e = b.getAsCurrentPoint();
- b.addMarker(e, j, f);
- c.addBezierCurve(g.x, g.y, f.x, f.y, j.x, j.y, e.x, e.y);
- d != null && d.bezierCurveTo(f.x, f.y, j.x, j.y, e.x, e.y)
- }
- break;
- case "S":
- for (; !b.isCommandOrEnd();)g = b.current, f = b.getReflectedControlPoint(), j = b.getAsControlPoint(), e = b.getAsCurrentPoint(), b.addMarker(e, j, f), c.addBezierCurve(g.x, g.y, f.x, f.y, j.x, j.y, e.x, e.y), d != null && d.bezierCurveTo(f.x, f.y, j.x, j.y, e.x, e.y);
- break;
- case "Q":
- for (; !b.isCommandOrEnd();)g = b.current, j = b.getAsControlPoint(),
- e = b.getAsCurrentPoint(), b.addMarker(e, j, j), c.addQuadraticCurve(g.x, g.y, j.x, j.y, e.x, e.y), d != null && d.quadraticCurveTo(j.x, j.y, e.x, e.y);
- break;
- case "T":
- for (; !b.isCommandOrEnd();)g = b.current, j = b.getReflectedControlPoint(), b.control = j, e = b.getAsCurrentPoint(), b.addMarker(e, j, j), c.addQuadraticCurve(g.x, g.y, j.x, j.y, e.x, e.y), d != null && d.quadraticCurveTo(j.x, j.y, e.x, e.y);
- break;
- case "A":
- for (; !b.isCommandOrEnd();) {
- var g = b.current, h = b.getScalar(), l = b.getScalar(), f = b.getScalar() * (Math.PI / 180), o = b.getScalar(), j = b.getScalar(),
- e = b.getAsCurrentPoint(), n = new a.Point(Math.cos(f) * (g.x - e.x) / 2 + Math.sin(f) * (g.y - e.y) / 2, -Math.sin(f) * (g.x - e.x) / 2 + Math.cos(f) * (g.y - e.y) / 2), q = Math.pow(n.x, 2) / Math.pow(h, 2) + Math.pow(n.y, 2) / Math.pow(l, 2);
- q > 1 && (h *= Math.sqrt(q), l *= Math.sqrt(q));
- o = (o == j ? -1 : 1) * Math.sqrt((Math.pow(h, 2) * Math.pow(l, 2) - Math.pow(h, 2) * Math.pow(n.y, 2) - Math.pow(l, 2) * Math.pow(n.x, 2)) / (Math.pow(h, 2) * Math.pow(n.y, 2) + Math.pow(l, 2) * Math.pow(n.x, 2)));
- isNaN(o) && (o = 0);
- var p = new a.Point(o * h * n.y / l, o * -l * n.x / h), g = new a.Point((g.x + e.x) / 2 + Math.cos(f) *
- p.x - Math.sin(f) * p.y, (g.y + e.y) / 2 + Math.sin(f) * p.x + Math.cos(f) * p.y), m = function (b, a) {
- return(b[0] * a[0] + b[1] * a[1]) / (Math.sqrt(Math.pow(b[0], 2) + Math.pow(b[1], 2)) * Math.sqrt(Math.pow(a[0], 2) + Math.pow(a[1], 2)))
- }, s = function (b, a) {
- return(b[0] * a[1] < b[1] * a[0] ? -1 : 1) * Math.acos(m(b, a))
- }, o = s([1, 0], [(n.x - p.x) / h, (n.y - p.y) / l]), q = [(n.x - p.x) / h, (n.y - p.y) / l], p = [(-n.x - p.x) / h, (-n.y - p.y) / l], n = s(q, p);
- if (m(q, p) <= -1)n = Math.PI;
- m(q, p) >= 1 && (n = 0);
- j == 0 && n > 0 && (n -= 2 * Math.PI);
- j == 1 && n < 0 && (n += 2 * Math.PI);
- q = new a.Point(g.x - h * Math.cos((o + n) /
- 2), g.y - l * Math.sin((o + n) / 2));
- b.addMarkerAngle(q, (o + n) / 2 + (j == 0 ? 1 : -1) * Math.PI / 2);
- b.addMarkerAngle(e, n + (j == 0 ? 1 : -1) * Math.PI / 2);
- c.addPoint(e.x, e.y);
- d != null && (m = h > l ? h : l, e = h > l ? 1 : h / l, h = h > l ? l / h : 1, d.translate(g.x, g.y), d.rotate(f), d.scale(e, h), d.arc(0, 0, m, o, o + n, 1 - j), d.scale(1 / e, 1 / h), d.rotate(-f), d.translate(-g.x, -g.y))
- }
- break;
- case "Z":
- d != null && d.closePath(), b.current = b.start
- }
- return c
- };
- this.getMarkers = function () {
- for (var a = this.PathParser.getMarkerPoints(), b = this.PathParser.getMarkerAngles(), c = [], e = 0; e < a.length; e++)c.push([a[e],
- b[e]]);
- return c
- }
- };
- a.Element.path.prototype = new a.Element.PathElementBase;
- a.Element.pattern = function (c) {
- this.base = a.Element.ElementBase;
- this.base(c);
- this.createPattern = function (d) {
- var b = new a.Element.svg;
- b.attributes.viewBox = new a.Property("viewBox", this.attribute("viewBox").value);
- b.attributes.x = new a.Property("x", this.attribute("x").value);
- b.attributes.y = new a.Property("y", this.attribute("y").value);
- b.attributes.width = new a.Property("width", this.attribute("width").value);
- b.attributes.height = new a.Property("height",
- this.attribute("height").value);
- b.children = this.children;
- var c = document.createElement("canvas");
- c.width = this.attribute("width").Length.toPixels("x");
- c.height = this.attribute("height").Length.toPixels("y");
- b.render(c.getContext("2d"));
- return d.createPattern(c, "repeat")
- }
- };
- a.Element.pattern.prototype = new a.Element.ElementBase;
- a.Element.marker = function (c) {
- this.base = a.Element.ElementBase;
- this.base(c);
- this.baseRender = this.render;
- this.render = function (d, b, c) {
- d.translate(b.x, b.y);
- this.attribute("orient").valueOrDefault("auto") ==
- "auto" && d.rotate(c);
- this.attribute("markerUnits").valueOrDefault("strokeWidth") == "strokeWidth" && d.scale(d.lineWidth, d.lineWidth);
- d.save();
- var e = new a.Element.svg;
- e.attributes.viewBox = new a.Property("viewBox", this.attribute("viewBox").value);
- e.attributes.refX = new a.Property("refX", this.attribute("refX").value);
- e.attributes.refY = new a.Property("refY", this.attribute("refY").value);
- e.attributes.width = new a.Property("width", this.attribute("markerWidth").value);
- e.attributes.height = new a.Property("height",
- this.attribute("markerHeight").value);
- e.attributes.fill = new a.Property("fill", this.attribute("fill").valueOrDefault("black"));
- e.attributes.stroke = new a.Property("stroke", this.attribute("stroke").valueOrDefault("none"));
- e.children = this.children;
- e.render(d);
- d.restore();
- this.attribute("markerUnits").valueOrDefault("strokeWidth") == "strokeWidth" && d.scale(1 / d.lineWidth, 1 / d.lineWidth);
- this.attribute("orient").valueOrDefault("auto") == "auto" && d.rotate(-c);
- d.translate(-b.x, -b.y)
- }
- };
- a.Element.marker.prototype =
- new a.Element.ElementBase;
- a.Element.defs = function (c) {
- this.base = a.Element.ElementBase;
- this.base(c);
- this.render = function () {
- }
- };
- a.Element.defs.prototype = new a.Element.ElementBase;
- a.Element.GradientBase = function (c) {
- this.base = a.Element.ElementBase;
- this.base(c);
- this.gradientUnits = this.attribute("gradientUnits").valueOrDefault("objectBoundingBox");
- this.stops = [];
- for (c = 0; c < this.children.length; c++)this.stops.push(this.children[c]);
- this.getGradient = function () {
- };
- this.createGradient = function (d, b) {
- var c = this;
- this.attribute("xlink:href").hasValue() &&
- (c = this.attribute("xlink:href").Definition.getDefinition());
- for (var e = this.getGradient(d, b), f = 0; f < c.stops.length; f++)e.addColorStop(c.stops[f].offset, c.stops[f].color);
- if (this.attribute("gradientTransform").hasValue()) {
- c = a.ViewPort.viewPorts[0];
- f = new a.Element.rect;
- f.attributes.x = new a.Property("x", -a.MAX_VIRTUAL_PIXELS / 3);
- f.attributes.y = new a.Property("y", -a.MAX_VIRTUAL_PIXELS / 3);
- f.attributes.width = new a.Property("width", a.MAX_VIRTUAL_PIXELS);
- f.attributes.height = new a.Property("height", a.MAX_VIRTUAL_PIXELS);
- var g = new a.Element.g;
- g.attributes.transform = new a.Property("transform", this.attribute("gradientTransform").value);
- g.children = [f];
- f = new a.Element.svg;
- f.attributes.x = new a.Property("x", 0);
- f.attributes.y = new a.Property("y", 0);
- f.attributes.width = new a.Property("width", c.width);
- f.attributes.height = new a.Property("height", c.height);
- f.children = [g];
- g = document.createElement("canvas");
- g.width = c.width;
- g.height = c.height;
- c = g.getContext("2d");
- c.fillStyle = e;
- f.render(c);
- return c.createPattern(g, "no-repeat")
- }
- return e
- }
- };
- a.Element.GradientBase.prototype = new a.Element.ElementBase;
- a.Element.linearGradient = function (c) {
- this.base = a.Element.GradientBase;
- this.base(c);
- this.getGradient = function (a, b) {
- var c = b.getBoundingBox(), e = this.gradientUnits == "objectBoundingBox" ? c.x() + c.width() * this.attribute("x1").numValue() : this.attribute("x1").Length.toPixels("x"), f = this.gradientUnits == "objectBoundingBox" ? c.y() + c.height() * this.attribute("y1").numValue() : this.attribute("y1").Length.toPixels("y"), g = this.gradientUnits == "objectBoundingBox" ?
- c.x() + c.width() * this.attribute("x2").numValue() : this.attribute("x2").Length.toPixels("x"), c = this.gradientUnits == "objectBoundingBox" ? c.y() + c.height() * this.attribute("y2").numValue() : this.attribute("y2").Length.toPixels("y");
- return a.createLinearGradient(e, f, g, c)
- }
- };
- a.Element.linearGradient.prototype = new a.Element.GradientBase;
- a.Element.radialGradient = function (c) {
- this.base = a.Element.GradientBase;
- this.base(c);
- this.getGradient = function (a, b) {
- var c = b.getBoundingBox(), e = this.gradientUnits == "objectBoundingBox" ?
- c.x() + c.width() * this.attribute("cx").numValue() : this.attribute("cx").Length.toPixels("x"), f = this.gradientUnits == "objectBoundingBox" ? c.y() + c.height() * this.attribute("cy").numValue() : this.attribute("cy").Length.toPixels("y"), g = e, j = f;
- this.attribute("fx").hasValue() && (g = this.gradientUnits == "objectBoundingBox" ? c.x() + c.width() * this.attribute("fx").numValue() : this.attribute("fx").Length.toPixels("x"));
- this.attribute("fy").hasValue() && (j = this.gradientUnits == "objectBoundingBox" ? c.y() + c.height() * this.attribute("fy").numValue() :
- this.attribute("fy").Length.toPixels("y"));
- c = this.gradientUnits == "objectBoundingBox" ? (c.width() + c.height()) / 2 * this.attribute("r").numValue() : this.attribute("r").Length.toPixels();
- return a.createRadialGradient(g, j, 0, e, f, c)
- }
- };
- a.Element.radialGradient.prototype = new a.Element.GradientBase;
- a.Element.stop = function (c) {
- this.base = a.Element.ElementBase;
- this.base(c);
- this.offset = this.attribute("offset").numValue();
- c = this.style("stop-color");
- this.style("stop-opacity").hasValue() && (c = c.Color.addOpacity(this.style("stop-opacity").value));
- this.color = c.value
- };
- a.Element.stop.prototype = new a.Element.ElementBase;
- a.Element.AnimateBase = function (c) {
- this.base = a.Element.ElementBase;
- this.base(c);
- a.Animations.push(this);
- this.duration = 0;
- this.begin = this.attribute("begin").Time.toMilliseconds();
- this.maxDuration = this.begin + this.attribute("dur").Time.toMilliseconds();
- this.getProperty = function () {
- var a = this.attribute("attributeType").value, b = this.attribute("attributeName").value;
- return a == "CSS" ? this.parent.style(b, !0) : this.parent.attribute(b, !0)
- };
- this.initialValue =
- null;
- this.removed = !1;
- this.calcValue = function () {
- return""
- };
- this.update = function (a) {
- if (this.initialValue == null)this.initialValue = this.getProperty().value;
- if (this.duration > this.maxDuration)if (this.attribute("repeatCount").value == "indefinite")this.duration = 0; else return this.attribute("fill").valueOrDefault("remove") == "remove" && !this.removed ? (this.removed = !0, this.getProperty().value = this.initialValue, !0) : !1;
- this.duration += a;
- a = !1;
- if (this.begin < this.duration)a = this.calcValue(), this.attribute("type").hasValue() &&
- (a = this.attribute("type").value + "(" + a + ")"), this.getProperty().value = a, a = !0;
- return a
- };
- this.progress = function () {
- return(this.duration - this.begin) / (this.maxDuration - this.begin)
- }
- };
- a.Element.AnimateBase.prototype = new a.Element.ElementBase;
- a.Element.animate = function (c) {
- this.base = a.Element.AnimateBase;
- this.base(c);
- this.calcValue = function () {
- var a = this.attribute("from").numValue(), b = this.attribute("to").numValue();
- return a + (b - a) * this.progress()
- }
- };
- a.Element.animate.prototype = new a.Element.AnimateBase;
- a.Element.animateColor =
- function (c) {
- this.base = a.Element.AnimateBase;
- this.base(c);
- this.calcValue = function () {
- var a = new RGBColor(this.attribute("from").value), b = new RGBColor(this.attribute("to").value);
- if (a.ok && b.ok) {
- var c = a.r + (b.r - a.r) * this.progress(), e = a.g + (b.g - a.g) * this.progress(), a = a.b + (b.b - a.b) * this.progress();
- return"rgb(" + parseInt(c, 10) + "," + parseInt(e, 10) + "," + parseInt(a, 10) + ")"
- }
- return this.attribute("from").value
- }
- };
- a.Element.animateColor.prototype = new a.Element.AnimateBase;
- a.Element.animateTransform = function (c) {
- this.base =
- a.Element.animate;
- this.base(c)
- };
- a.Element.animateTransform.prototype = new a.Element.animate;
- a.Element.font = function (c) {
- this.base = a.Element.ElementBase;
- this.base(c);
- this.horizAdvX = this.attribute("horiz-adv-x").numValue();
- this.isArabic = this.isRTL = !1;
- this.missingGlyph = this.fontFace = null;
- this.glyphs = [];
- for (c = 0; c < this.children.length; c++) {
- var d = this.children[c];
- if (d.type == "font-face")this.fontFace = d, d.style("font-family").hasValue() && (a.Definitions[d.style("font-family").value] = this); else if (d.type == "missing-glyph")this.missingGlyph =
- d; else if (d.type == "glyph")d.arabicForm != "" ? (this.isArabic = this.isRTL = !0, typeof this.glyphs[d.unicode] == "undefined" && (this.glyphs[d.unicode] = []), this.glyphs[d.unicode][d.arabicForm] = d) : this.glyphs[d.unicode] = d
- }
- };
- a.Element.font.prototype = new a.Element.ElementBase;
- a.Element.fontface = function (c) {
- this.base = a.Element.ElementBase;
- this.base(c);
- this.ascent = this.attribute("ascent").value;
- this.descent = this.attribute("descent").value;
- this.unitsPerEm = this.attribute("units-per-em").numValue()
- };
- a.Element.fontface.prototype =
- new a.Element.ElementBase;
- a.Element.missingglyph = function (c) {
- this.base = a.Element.path;
- this.base(c);
- this.horizAdvX = 0
- };
- a.Element.missingglyph.prototype = new a.Element.path;
- a.Element.glyph = function (c) {
- this.base = a.Element.path;
- this.base(c);
- this.horizAdvX = this.attribute("horiz-adv-x").numValue();
- this.unicode = this.attribute("unicode").value;
- this.arabicForm = this.attribute("arabic-form").value
- };
- a.Element.glyph.prototype = new a.Element.path;
- a.Element.text = function (c) {
- this.base = a.Element.RenderedElementBase;
- this.base(c);
- if (c != null) {
- this.children = [];
- for (var d = 0; d < c.childNodes.length; d++) {
- var b = c.childNodes[d];
- b.nodeType == 1 ? this.addChild(b, !0) : b.nodeType == 3 && this.addChild(new a.Element.tspan(b), !1)
- }
- }
- this.baseSetContext = this.setContext;
- this.setContext = function (b) {
- this.baseSetContext(b);
- if (this.style("dominant-baseline").hasValue())b.textBaseline = this.style("dominant-baseline").value;
- if (this.style("alignment-baseline").hasValue())b.textBaseline = this.style("alignment-baseline").value
- };
- this.renderChildren =
- function (b) {
- for (var a = this.style("text-anchor").valueOrDefault("start"), c = this.attribute("x").Length.toPixels("x"), d = this.attribute("y").Length.toPixels("y"), j = 0; j < this.children.length; j++) {
- var h = this.children[j];
- h.attribute("x").hasValue() ? h.x = h.attribute("x").Length.toPixels("x") : (h.attribute("dx").hasValue() && (c += h.attribute("dx").Length.toPixels("x")), h.x = c);
- c = h.measureText(b);
- if (a != "start" && (j == 0 || h.attribute("x").hasValue())) {
- for (var l = c, o = j + 1; o < this.children.length; o++) {
- var n = this.children[o];
- if (n.attribute("x").hasValue())break;
- l += n.measureText(b)
- }
- h.x -= a == "end" ? l : l / 2
- }
- c = h.x + c;
- h.attribute("y").hasValue() ? h.y = h.attribute("y").Length.toPixels("y") : (h.attribute("dy").hasValue() && (d += h.attribute("dy").Length.toPixels("y")), h.y = d);
- d = h.y;
- h.render(b)
- }
- }
- };
- a.Element.text.prototype = new a.Element.RenderedElementBase;
- a.Element.TextElementBase = function (c) {
- this.base = a.Element.RenderedElementBase;
- this.base(c);
- this.getGlyph = function (a, b, c) {
- var e = b[c], f = null;
- if (a.isArabic) {
- var g = "isolated";
- if ((c == 0 || b[c -
- 1] == " ") && c < b.length - 2 && b[c + 1] != " ")g = "terminal";
- c > 0 && b[c - 1] != " " && c < b.length - 2 && b[c + 1] != " " && (g = "medial");
- if (c > 0 && b[c - 1] != " " && (c == b.length - 1 || b[c + 1] == " "))g = "initial";
- typeof a.glyphs[e] != "undefined" && (f = a.glyphs[e][g], f == null && a.glyphs[e].type == "glyph" && (f = a.glyphs[e]))
- } else f = a.glyphs[e];
- if (f == null)f = a.missingGlyph;
- return f
- };
- this.renderChildren = function (c) {
- var b = this.parent.style("font-family").Definition.getDefinition();
- if (b != null) {
- var k = this.parent.style("font-size").numValueOrDefault(a.Font.Parse(a.ctx.font).fontSize),
- e = this.parent.style("font-style").valueOrDefault(a.Font.Parse(a.ctx.font).fontStyle), f = this.getText();
- b.isRTL && (f = f.split("").reverse().join(""));
- for (var g = a.ToNumberArray(this.parent.attribute("dx").value), j = 0; j < f.length; j++) {
- var h = this.getGlyph(b, f, j), l = k / b.fontFace.unitsPerEm;
- c.translate(this.x, this.y);
- c.scale(l, -l);
- var o = c.lineWidth;
- c.lineWidth = c.lineWidth * b.fontFace.unitsPerEm / k;
- e == "italic" && c.transform(1, 0, 0.4, 1, 0, 0);
- h.render(c);
- e == "italic" && c.transform(1, 0, -0.4, 1, 0, 0);
- c.lineWidth = o;
- c.scale(1 /
- l, -1 / l);
- c.translate(-this.x, -this.y);
- this.x += k * (h.horizAdvX || b.horizAdvX) / b.fontFace.unitsPerEm;
- typeof g[j] != "undefined" && !isNaN(g[j]) && (this.x += g[j])
- }
- } else c.strokeStyle != "" && c.strokeText(a.compressSpaces(this.getText()), this.x, this.y), c.fillStyle != "" && c.fillText(a.compressSpaces(this.getText()), this.x, this.y)
- };
- this.getText = function () {
- };
- this.measureText = function (c) {
- var b = this.parent.style("font-family").Definition.getDefinition();
- if (b != null) {
- var c = this.parent.style("font-size").numValueOrDefault(a.Font.Parse(a.ctx.font).fontSize),
- k = 0, e = this.getText();
- b.isRTL && (e = e.split("").reverse().join(""));
- for (var f = a.ToNumberArray(this.parent.attribute("dx").value), g = 0; g < e.length; g++) {
- var j = this.getGlyph(b, e, g);
- k += (j.horizAdvX || b.horizAdvX) * c / b.fontFace.unitsPerEm;
- typeof f[g] != "undefined" && !isNaN(f[g]) && (k += f[g])
- }
- return k
- }
- b = a.compressSpaces(this.getText());
- if (!c.measureText)return b.length * 10;
- c.save();
- this.setContext(c);
- b = c.measureText(b).width;
- c.restore();
- return b
- }
- };
- a.Element.TextElementBase.prototype = new a.Element.RenderedElementBase;
- a.Element.tspan = function (c) {
- this.base = a.Element.TextElementBase;
- this.base(c);
- this.text = c.nodeType == 3 ? c.nodeValue : c.childNodes.length > 0 ? c.childNodes[0].nodeValue : c.text;
- this.getText = function () {
- return this.text
- }
- };
- a.Element.tspan.prototype = new a.Element.TextElementBase;
- a.Element.tref = function (c) {
- this.base = a.Element.TextElementBase;
- this.base(c);
- this.getText = function () {
- var a = this.attribute("xlink:href").Definition.getDefinition();
- if (a != null)return a.children[0].getText()
- }
- };
- a.Element.tref.prototype = new a.Element.TextElementBase;
- a.Element.a = function (c) {
- this.base = a.Element.TextElementBase;
- this.base(c);
- this.hasText = !0;
- for (var d = 0; d < c.childNodes.length; d++)if (c.childNodes[d].nodeType != 3)this.hasText = !1;
- this.text = this.hasText ? c.childNodes[0].nodeValue : "";
- this.getText = function () {
- return this.text
- };
- this.baseRenderChildren = this.renderChildren;
- this.renderChildren = function (b) {
- if (this.hasText) {
- this.baseRenderChildren(b);
- var c = new a.Property("fontSize", a.Font.Parse(a.ctx.font).fontSize);
- a.Mouse.checkBoundingBox(this, new a.BoundingBox(this.x,
- this.y - c.Length.toPixels("y"), this.x + this.measureText(b), this.y))
- } else c = new a.Element.g, c.children = this.children, c.parent = this, c.render(b)
- };
- this.onclick = function () {
- window.open(this.attribute("xlink:href").value)
- };
- this.onmousemove = function () {
- a.ctx.canvas.style.cursor = "pointer"
- }
- };
- a.Element.a.prototype = new a.Element.TextElementBase;
- a.Element.image = function (c) {
- this.base = a.Element.RenderedElementBase;
- this.base(c);
- a.Images.push(this);
- this.img = document.createElement("img");
- this.loaded = !1;
- var d = this;
- this.img.onload =
- function () {
- d.loaded = !0
- };
- this.img.src = this.attribute("xlink:href").value;
- this.renderChildren = function (b) {
- var c = this.attribute("x").Length.toPixels("x"), d = this.attribute("y").Length.toPixels("y"), f = this.attribute("width").Length.toPixels("x"), g = this.attribute("height").Length.toPixels("y");
- f == 0 || g == 0 || (b.save(), b.translate(c, d), a.AspectRatio(b, this.attribute("preserveAspectRatio").value, f, this.img.width, g, this.img.height, 0, 0), b.drawImage(this.img, 0, 0), b.restore())
- }
- };
- a.Element.image.prototype = new a.Element.RenderedElementBase;
- a.Element.g = function (c) {
- this.base = a.Element.RenderedElementBase;
- this.base(c);
- this.getBoundingBox = function () {
- for (var c = new a.BoundingBox, b = 0; b < this.children.length; b++)c.addBoundingBox(this.children[b].getBoundingBox());
- return c
- }
- };
- a.Element.g.prototype = new a.Element.RenderedElementBase;
- a.Element.symbol = function (c) {
- this.base = a.Element.RenderedElementBase;
- this.base(c);
- this.baseSetContext = this.setContext;
- this.setContext = function (c) {
- this.baseSetContext(c);
- if (this.attribute("viewBox").hasValue()) {
- var b =
- a.ToNumberArray(this.attribute("viewBox").value), k = b[0], e = b[1];
- width = b[2];
- height = b[3];
- a.AspectRatio(c, this.attribute("preserveAspectRatio").value, this.attribute("width").Length.toPixels("x"), width, this.attribute("height").Length.toPixels("y"), height, k, e);
- a.ViewPort.SetCurrent(b[2], b[3])
- }
- }
- };
- a.Element.symbol.prototype = new a.Element.RenderedElementBase;
- a.Element.style = function (c) {
- this.base = a.Element.ElementBase;
- this.base(c);
- for (var c = c.childNodes[0].nodeValue + (c.childNodes.length > 1 ? c.childNodes[1].nodeValue :
- ""), c = c.replace(/(\/\*([^*]|[\r\n]|(\*+([^*\/]|[\r\n])))*\*+\/)|(^[\s]*\/\/.*)/gm, ""), c = a.compressSpaces(c), c = c.split("}"), d = 0; d < c.length; d++)if (a.trim(c[d]) != "")for (var b = c[d].split("{"), k = b[0].split(","), b = b[1].split(";"), e = 0; e < k.length; e++) {
- var f = a.trim(k[e]);
- if (f != "") {
- for (var g = {}, j = 0; j < b.length; j++) {
- var h = b[j].indexOf(":"), l = b[j].substr(0, h), h = b[j].substr(h + 1, b[j].length - h);
- l != null && h != null && (g[a.trim(l)] = new a.Property(a.trim(l), a.trim(h)))
- }
- a.Styles[f] = g;
- if (f == "@font-face") {
- f = g["font-family"].value.replace(/"/g,
- "");
- g = g.src.value.split(",");
- for (j = 0; j < g.length; j++)if (g[j].indexOf('format("svg")') > 0) {
- l = g[j].indexOf("url");
- h = g[j].indexOf(")", l);
- l = g[j].substr(l + 5, h - l - 6);
- l = a.parseXml(a.ajax(l)).getElementsByTagName("font");
- for (h = 0; h < l.length; h++) {
- var o = a.CreateElement(l[h]);
- a.Definitions[f] = o
- }
- }
- }
- }
- }
- };
- a.Element.style.prototype = new a.Element.ElementBase;
- a.Element.use = function (c) {
- this.base = a.Element.RenderedElementBase;
- this.base(c);
- this.baseSetContext = this.setContext;
- this.setContext = function (a) {
- this.baseSetContext(a);
- this.attribute("x").hasValue() && a.translate(this.attribute("x").Length.toPixels("x"), 0);
- this.attribute("y").hasValue() && a.translate(0, this.attribute("y").Length.toPixels("y"))
- };
- this.getDefinition = function () {
- var a = this.attribute("xlink:href").Definition.getDefinition();
- if (this.attribute("width").hasValue())a.attribute("width", !0).value = this.attribute("width").value;
- if (this.attribute("height").hasValue())a.attribute("height", !0).value = this.attribute("height").value;
- return a
- };
- this.path = function (a) {
- var b =
- this.getDefinition();
- b != null && b.path(a)
- };
- this.renderChildren = function (a) {
- var b = this.getDefinition();
- b != null && b.render(a)
- }
- };
- a.Element.use.prototype = new a.Element.RenderedElementBase;
- a.Element.mask = function (c) {
- this.base = a.Element.ElementBase;
- this.base(c);
- this.apply = function (a, b) {
- var c = this.attribute("x").Length.toPixels("x"), e = this.attribute("y").Length.toPixels("y"), f = this.attribute("width").Length.toPixels("x"), g = this.attribute("height").Length.toPixels("y"), j = b.attribute("mask").value;
- b.attribute("mask").value =
- "";
- var h = document.createElement("canvas");
- h.width = c + f;
- h.height = e + g;
- var l = h.getContext("2d");
- this.renderChildren(l);
- var o = document.createElement("canvas");
- o.width = c + f;
- o.height = e + g;
- var n = o.getContext("2d");
- b.render(n);
- n.globalCompositeOperation = "destination-in";
- n.fillStyle = l.createPattern(h, "no-repeat");
- n.fillRect(0, 0, c + f, e + g);
- a.fillStyle = n.createPattern(o, "no-repeat");
- a.fillRect(0, 0, c + f, e + g);
- b.attribute("mask").value = j
- };
- this.render = function () {
- }
- };
- a.Element.mask.prototype = new a.Element.ElementBase;
- a.Element.clipPath =
- function (c) {
- this.base = a.Element.ElementBase;
- this.base(c);
- this.apply = function (a) {
- for (var b = 0; b < this.children.length; b++)this.children[b].path && (this.children[b].path(a), a.clip())
- };
- this.render = function () {
- }
- };
- a.Element.clipPath.prototype = new a.Element.ElementBase;
- a.Element.filter = function (c) {
- this.base = a.Element.ElementBase;
- this.base(c);
- this.apply = function (a, b) {
- var c = b.getBoundingBox(), e = this.attribute("x").Length.toPixels("x"), f = this.attribute("y").Length.toPixels("y");
- if (e == 0 || f == 0)e = c.x1, f = c.y1;
- var g =
- this.attribute("width").Length.toPixels("x"), j = this.attribute("height").Length.toPixels("y");
- if (g == 0 || j == 0)g = c.width(), j = c.height();
- c = b.style("filter").value;
- b.style("filter").value = "";
- var h = 0.2 * g, l = 0.2 * j, o = document.createElement("canvas");
- o.width = g + 2 * h;
- o.height = j + 2 * l;
- var n = o.getContext("2d");
- n.translate(-e + h, -f + l);
- b.render(n);
- for (var q = 0; q < this.children.length; q++)this.children[q].apply(n, 0, 0, g + 2 * h, j + 2 * l);
- a.drawImage(o, 0, 0, g + 2 * h, j + 2 * l, e - h, f - l, g + 2 * h, j + 2 * l);
- b.style("filter", !0).value = c
- };
- this.render =
- function () {
- }
- };
- a.Element.filter.prototype = new a.Element.ElementBase;
- a.Element.feGaussianBlur = function (c) {
- function d(a, c, d, f, g) {
- for (var j = 0; j < g; j++)for (var h = 0; h < f; h++)for (var l = a[j * f * 4 + h * 4 + 3] / 255, o = 0; o < 4; o++) {
- for (var n = d[0] * (l == 0 ? 255 : a[j * f * 4 + h * 4 + o]) * (l == 0 || o == 3 ? 1 : l), q = 1; q < d.length; q++) {
- var p = Math.max(h - q, 0), m = a[j * f * 4 + p * 4 + 3] / 255, p = Math.min(h + q, f - 1), p = a[j * f * 4 + p * 4 + 3] / 255, s = d[q], r;
- m == 0 ? r = 255 : (r = Math.max(h - q, 0), r = a[j * f * 4 + r * 4 + o]);
- m = r * (m == 0 || o == 3 ? 1 : m);
- p == 0 ? r = 255 : (r = Math.min(h + q, f - 1), r = a[j * f * 4 + r * 4 + o]);
- n +=
- s * (m + r * (p == 0 || o == 3 ? 1 : p))
- }
- c[h * g * 4 + j * 4 + o] = n
- }
- }
-
- this.base = a.Element.ElementBase;
- this.base(c);
- this.apply = function (a, c, e, f, g) {
- var e = this.attribute("stdDeviation").numValue(), c = a.getImageData(0, 0, f, g), e = Math.max(e, 0.01), j = Math.ceil(e * 4) + 1;
- mask = [];
- for (var h = 0; h < j; h++)mask[h] = Math.exp(-0.5 * (h / e) * (h / e));
- e = mask;
- j = 0;
- for (h = 1; h < e.length; h++)j += Math.abs(e[h]);
- j = 2 * j + Math.abs(e[0]);
- for (h = 0; h < e.length; h++)e[h] /= j;
- tmp = [];
- d(c.data, tmp, e, f, g);
- d(tmp, c.data, e, g, f);
- a.clearRect(0, 0, f, g);
- a.putImageData(c, 0, 0)
- }
- };
- a.Element.filter.prototype =
- new a.Element.feGaussianBlur;
- a.Element.title = function () {
- };
- a.Element.title.prototype = new a.Element.ElementBase;
- a.Element.desc = function () {
- };
- a.Element.desc.prototype = new a.Element.ElementBase;
- a.Element.MISSING = function (a) {
- console.log("ERROR: Element '" + a.nodeName + "' not yet implemented.")
- };
- a.Element.MISSING.prototype = new a.Element.ElementBase;
- a.CreateElement = function (c) {
- var d = c.nodeName.replace(/^[^:]+:/, ""), d = d.replace(/\-/g, ""), b = null, b = typeof a.Element[d] != "undefined" ? new a.Element[d](c) : new a.Element.MISSING(c);
- b.type = c.nodeName;
- return b
- };
- a.load = function (c, d) {
- a.loadXml(c, a.ajax(d))
- };
- a.loadXml = function (c, d) {
- a.loadXmlDoc(c, a.parseXml(d))
- };
- a.loadXmlDoc = function (c, d) {
- a.init(c);
- var b = function (a) {
- for (var b = c.canvas; b;)a.x -= b.offsetLeft, a.y -= b.offsetTop, b = b.offsetParent;
- window.scrollX && (a.x += window.scrollX);
- window.scrollY && (a.y += window.scrollY);
- return a
- };
- if (a.opts.ignoreMouse != !0)c.canvas.onclick = function (c) {
- c = b(new a.Point(c != null ? c.clientX : event.clientX, c != null ? c.clientY : event.clientY));
- a.Mouse.onclick(c.x, c.y)
- },
- c.canvas.onmousemove = function (c) {
- c = b(new a.Point(c != null ? c.clientX : event.clientX, c != null ? c.clientY : event.clientY));
- a.Mouse.onmousemove(c.x, c.y)
- };
- var k = a.CreateElement(d.documentElement), e = k.root = !0, f = function () {
- a.ViewPort.Clear();
- c.canvas.parentNode && a.ViewPort.SetCurrent(c.canvas.parentNode.clientWidth, c.canvas.parentNode.clientHeight);
- if (a.opts.ignoreDimensions != !0) {
- if (k.style("width").hasValue())c.canvas.width = k.style("width").Length.toPixels("x"), c.canvas.style.width = c.canvas.width + "px";
- if (k.style("height").hasValue())c.canvas.height =
- k.style("height").Length.toPixels("y"), c.canvas.style.height = c.canvas.height + "px"
- }
- var b = c.canvas.clientWidth || c.canvas.width, d = c.canvas.clientHeight || c.canvas.height;
- a.ViewPort.SetCurrent(b, d);
- if (a.opts != null && a.opts.offsetX != null)k.attribute("x", !0).value = a.opts.offsetX;
- if (a.opts != null && a.opts.offsetY != null)k.attribute("y", !0).value = a.opts.offsetY;
- if (a.opts != null && a.opts.scaleWidth != null && a.opts.scaleHeight != null) {
- var f = 1, g = 1;
- k.attribute("width").hasValue() && (f = k.attribute("width").Length.toPixels("x") /
- a.opts.scaleWidth);
- k.attribute("height").hasValue() && (g = k.attribute("height").Length.toPixels("y") / a.opts.scaleHeight);
- k.attribute("width", !0).value = a.opts.scaleWidth;
- k.attribute("height", !0).value = a.opts.scaleHeight;
- k.attribute("viewBox", !0).value = "0 0 " + b * f + " " + d * g;
- k.attribute("preserveAspectRatio", !0).value = "none"
- }
- a.opts.ignoreClear != !0 && c.clearRect(0, 0, b, d);
- k.render(c);
- e && (e = !1, a.opts != null && typeof a.opts.renderCallback == "function" && a.opts.renderCallback())
- }, g = !0;
- a.ImagesLoaded() && (g = !1, f());
- a.intervalID = setInterval(function () {
- var b = !1;
- g && a.ImagesLoaded() && (g = !1, b = !0);
- a.opts.ignoreMouse != !0 && (b |= a.Mouse.hasEvents());
- if (a.opts.ignoreAnimation != !0)for (var c = 0; c < a.Animations.length; c++)b |= a.Animations[c].update(1E3 / a.FRAMERATE);
- a.opts != null && typeof a.opts.forceRedraw == "function" && a.opts.forceRedraw() == !0 && (b = !0);
- b && (f(), a.Mouse.runEvents())
- }, 1E3 / a.FRAMERATE)
- };
- a.stop = function () {
- a.intervalID && clearInterval(a.intervalID)
- };
- a.Mouse = new function () {
- this.events = [];
- this.hasEvents = function () {
- return this.events.length !=
- 0
- };
- this.onclick = function (a, d) {
- this.events.push({type: "onclick", x: a, y: d, run: function (a) {
- if (a.onclick)a.onclick()
- }})
- };
- this.onmousemove = function (a, d) {
- this.events.push({type: "onmousemove", x: a, y: d, run: function (a) {
- if (a.onmousemove)a.onmousemove()
- }})
- };
- this.eventElements = [];
- this.checkPath = function (a, d) {
- for (var b = 0; b < this.events.length; b++) {
- var k = this.events[b];
- d.isPointInPath && d.isPointInPath(k.x, k.y) && (this.eventElements[b] = a)
- }
- };
- this.checkBoundingBox = function (a, d) {
- for (var b = 0; b < this.events.length; b++) {
- var k =
- this.events[b];
- d.isPointInBox(k.x, k.y) && (this.eventElements[b] = a)
- }
- };
- this.runEvents = function () {
- a.ctx.canvas.style.cursor = "";
- for (var c = 0; c < this.events.length; c++)for (var d = this.events[c], b = this.eventElements[c]; b;)d.run(b), b = b.parent;
- this.events = [];
- this.eventElements = []
- }
- };
- return a
- }
-
- this.canvg = function (a, c, d) {
- if (a == null && c == null && d == null)for (var c = document.getElementsByTagName("svg"), b = 0; b < c.length; b++) {
- a = c[b];
- d = document.createElement("canvas");
- d.width = a.clientWidth;
- d.height = a.clientHeight;
- a.parentNode.insertBefore(d,
- a);
- a.parentNode.removeChild(a);
- var k = document.createElement("div");
- k.appendChild(a);
- canvg(d, k.innerHTML)
- } else d = d || {}, typeof a == "string" && (a = document.getElementById(a)), a.svg == null ? (b = m(), a.svg = b) : (b = a.svg, b.stop()), b.opts = d, a = a.getContext("2d"), typeof c.documentElement != "undefined" ? b.loadXmlDoc(a, c) : c.substr(0, 1) == "<" ? b.loadXml(a, c) : b.load(a, c)
- }
-})();
-if (CanvasRenderingContext2D)CanvasRenderingContext2D.prototype.drawSvg = function (m, a, c, d, b) {
- canvg(this.canvas, m, {ignoreMouse: !0, ignoreAnimation: !0, ignoreDimensions: !0, ignoreClear: !0, offsetX: a, offsetY: c, scaleWidth: d, scaleHeight: b})
-};
-(function (m) {
- var a = m.css, c = m.CanVGRenderer, d = m.SVGRenderer, b = m.extend, k = m.merge, e = m.addEvent, f = m.createElement, g = m.discardElement;
- b(c.prototype, d.prototype);
- b(c.prototype, {create: function (a, b, c, d) {
- this.setContainer(b, c, d);
- this.configure(a)
- }, setContainer: function (a, b, c) {
- var d = a.style, e = a.parentNode, g = d.left, d = d.top, k = a.offsetWidth, m = a.offsetHeight, s = {visibility: "hidden", position: "absolute"};
- this.init.apply(this, [a, b, c]);
- this.canvas = f("canvas", {width: k, height: m}, {position: "relative", left: g, top: d}, a);
- this.ttLine = f("div", null, s, e);
- this.ttDiv = f("div", null, s, e);
- this.ttTimer = void 0;
- this.hiddenSvg = a = f("div", {width: k, height: m}, {visibility: "hidden", left: g, top: d}, e);
- a.appendChild(this.box)
- }, configure: function (b) {
- var c = this, d = b.options.tooltip, f = d.borderWidth, g = c.ttDiv, m = d.style, p = c.ttLine, t = parseInt(m.padding, 10), m = k(m, {padding: t + "px", "background-color": d.backgroundColor, "border-style": "solid", "border-width": f + "px", "border-radius": d.borderRadius + "px"});
- d.shadow && (m = k(m, {"box-shadow": "1px 1px 3px gray",
- "-webkit-box-shadow": "1px 1px 3px gray"}));
- a(g, m);
- a(p, {"border-left": "1px solid darkgray"});
- e(b, "tooltipRefresh", function (d) {
- var e = b.container, f = e.offsetLeft, e = e.offsetTop, k;
- g.innerHTML = d.text;
- k = b.tooltip.getPosition(g.offsetWidth, g.offsetHeight, {plotX: d.x, plotY: d.y});
- a(g, {visibility: "visible", left: k.x + "px", top: k.y + "px", "border-color": d.borderColor});
- a(p, {visibility: "visible", left: f + d.x + "px", top: e + b.plotTop + "px", height: b.plotHeight + "px"});
- c.ttTimer !== void 0 && clearTimeout(c.ttTimer);
- c.ttTimer = setTimeout(function () {
- a(g,
- {visibility: "hidden"});
- a(p, {visibility: "hidden"})
- }, 3E3)
- })
- }, destroy: function () {
- g(this.canvas);
- this.ttTimer !== void 0 && clearTimeout(this.ttTimer);
- g(this.ttLine);
- g(this.ttDiv);
- g(this.hiddenSvg);
- return d.prototype.destroy.apply(this)
- }, color: function (a, b, c) {
- a && a.linearGradient && (a = a.stops[a.stops.length - 1][1]);
- return d.prototype.color.call(this, a, b, c)
- }, draw: function () {
- window.canvg(this.canvas, this.hiddenSvg.innerHTML)
- }})
-})(Highcharts);
diff --git a/src/common/lib/vendor/2amigos/yiiwheels/widgets/highcharts/assets/js/modules/canvas-tools.src.js b/src/common/lib/vendor/2amigos/yiiwheels/widgets/highcharts/assets/js/modules/canvas-tools.src.js
deleted file mode 100644
index f386940..0000000
--- a/src/common/lib/vendor/2amigos/yiiwheels/widgets/highcharts/assets/js/modules/canvas-tools.src.js
+++ /dev/null
@@ -1,3187 +0,0 @@
-/**
- * @license A class to parse color values
- * @author Stoyan Stefanov
- * @link http://www.phpied.com/rgb-color-parser-in-javascript/
- * Use it if you like it
- *
- */
-function RGBColor(color_string) {
- this.ok = false;
-
- // strip any leading #
- if (color_string.charAt(0) == '#') { // remove # if any
- color_string = color_string.substr(1, 6);
- }
-
- color_string = color_string.replace(/ /g, '');
- color_string = color_string.toLowerCase();
-
- // before getting into regexps, try simple matches
- // and overwrite the input
- var simple_colors = {
- aliceblue: 'f0f8ff',
- antiquewhite: 'faebd7',
- aqua: '00ffff',
- aquamarine: '7fffd4',
- azure: 'f0ffff',
- beige: 'f5f5dc',
- bisque: 'ffe4c4',
- black: '000000',
- blanchedalmond: 'ffebcd',
- blue: '0000ff',
- blueviolet: '8a2be2',
- brown: 'a52a2a',
- burlywood: 'deb887',
- cadetblue: '5f9ea0',
- chartreuse: '7fff00',
- chocolate: 'd2691e',
- coral: 'ff7f50',
- cornflowerblue: '6495ed',
- cornsilk: 'fff8dc',
- crimson: 'dc143c',
- cyan: '00ffff',
- darkblue: '00008b',
- darkcyan: '008b8b',
- darkgoldenrod: 'b8860b',
- darkgray: 'a9a9a9',
- darkgreen: '006400',
- darkkhaki: 'bdb76b',
- darkmagenta: '8b008b',
- darkolivegreen: '556b2f',
- darkorange: 'ff8c00',
- darkorchid: '9932cc',
- darkred: '8b0000',
- darksalmon: 'e9967a',
- darkseagreen: '8fbc8f',
- darkslateblue: '483d8b',
- darkslategray: '2f4f4f',
- darkturquoise: '00ced1',
- darkviolet: '9400d3',
- deeppink: 'ff1493',
- deepskyblue: '00bfff',
- dimgray: '696969',
- dodgerblue: '1e90ff',
- feldspar: 'd19275',
- firebrick: 'b22222',
- floralwhite: 'fffaf0',
- forestgreen: '228b22',
- fuchsia: 'ff00ff',
- gainsboro: 'dcdcdc',
- ghostwhite: 'f8f8ff',
- gold: 'ffd700',
- goldenrod: 'daa520',
- gray: '808080',
- green: '008000',
- greenyellow: 'adff2f',
- honeydew: 'f0fff0',
- hotpink: 'ff69b4',
- indianred: 'cd5c5c',
- indigo: '4b0082',
- ivory: 'fffff0',
- khaki: 'f0e68c',
- lavender: 'e6e6fa',
- lavenderblush: 'fff0f5',
- lawngreen: '7cfc00',
- lemonchiffon: 'fffacd',
- lightblue: 'add8e6',
- lightcoral: 'f08080',
- lightcyan: 'e0ffff',
- lightgoldenrodyellow: 'fafad2',
- lightgrey: 'd3d3d3',
- lightgreen: '90ee90',
- lightpink: 'ffb6c1',
- lightsalmon: 'ffa07a',
- lightseagreen: '20b2aa',
- lightskyblue: '87cefa',
- lightslateblue: '8470ff',
- lightslategray: '778899',
- lightsteelblue: 'b0c4de',
- lightyellow: 'ffffe0',
- lime: '00ff00',
- limegreen: '32cd32',
- linen: 'faf0e6',
- magenta: 'ff00ff',
- maroon: '800000',
- mediumaquamarine: '66cdaa',
- mediumblue: '0000cd',
- mediumorchid: 'ba55d3',
- mediumpurple: '9370d8',
- mediumseagreen: '3cb371',
- mediumslateblue: '7b68ee',
- mediumspringgreen: '00fa9a',
- mediumturquoise: '48d1cc',
- mediumvioletred: 'c71585',
- midnightblue: '191970',
- mintcream: 'f5fffa',
- mistyrose: 'ffe4e1',
- moccasin: 'ffe4b5',
- navajowhite: 'ffdead',
- navy: '000080',
- oldlace: 'fdf5e6',
- olive: '808000',
- olivedrab: '6b8e23',
- orange: 'ffa500',
- orangered: 'ff4500',
- orchid: 'da70d6',
- palegoldenrod: 'eee8aa',
- palegreen: '98fb98',
- paleturquoise: 'afeeee',
- palevioletred: 'd87093',
- papayawhip: 'ffefd5',
- peachpuff: 'ffdab9',
- peru: 'cd853f',
- pink: 'ffc0cb',
- plum: 'dda0dd',
- powderblue: 'b0e0e6',
- purple: '800080',
- red: 'ff0000',
- rosybrown: 'bc8f8f',
- royalblue: '4169e1',
- saddlebrown: '8b4513',
- salmon: 'fa8072',
- sandybrown: 'f4a460',
- seagreen: '2e8b57',
- seashell: 'fff5ee',
- sienna: 'a0522d',
- silver: 'c0c0c0',
- skyblue: '87ceeb',
- slateblue: '6a5acd',
- slategray: '708090',
- snow: 'fffafa',
- springgreen: '00ff7f',
- steelblue: '4682b4',
- tan: 'd2b48c',
- teal: '008080',
- thistle: 'd8bfd8',
- tomato: 'ff6347',
- turquoise: '40e0d0',
- violet: 'ee82ee',
- violetred: 'd02090',
- wheat: 'f5deb3',
- white: 'ffffff',
- whitesmoke: 'f5f5f5',
- yellow: 'ffff00',
- yellowgreen: '9acd32'
- };
- for (var key in simple_colors) {
- if (color_string == key) {
- color_string = simple_colors[key];
- }
- }
- // emd of simple type-in colors
-
- // array of color definition objects
- var color_defs = [
- {
- re: /^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/,
- example: ['rgb(123, 234, 45)', 'rgb(255,234,245)'],
- process: function (bits) {
- return [
- parseInt(bits[1]),
- parseInt(bits[2]),
- parseInt(bits[3])
- ];
- }
- },
- {
- re: /^(\w{2})(\w{2})(\w{2})$/,
- example: ['#00ff00', '336699'],
- process: function (bits) {
- return [
- parseInt(bits[1], 16),
- parseInt(bits[2], 16),
- parseInt(bits[3], 16)
- ];
- }
- },
- {
- re: /^(\w{1})(\w{1})(\w{1})$/,
- example: ['#fb0', 'f0f'],
- process: function (bits) {
- return [
- parseInt(bits[1] + bits[1], 16),
- parseInt(bits[2] + bits[2], 16),
- parseInt(bits[3] + bits[3], 16)
- ];
- }
- }
- ];
-
- // search through the definitions to find a match
- for (var i = 0; i < color_defs.length; i++) {
- var re = color_defs[i].re;
- var processor = color_defs[i].process;
- var bits = re.exec(color_string);
- if (bits) {
- channels = processor(bits);
- this.r = channels[0];
- this.g = channels[1];
- this.b = channels[2];
- this.ok = true;
- }
-
- }
-
- // validate/cleanup values
- this.r = (this.r < 0 || isNaN(this.r)) ? 0 : ((this.r > 255) ? 255 : this.r);
- this.g = (this.g < 0 || isNaN(this.g)) ? 0 : ((this.g > 255) ? 255 : this.g);
- this.b = (this.b < 0 || isNaN(this.b)) ? 0 : ((this.b > 255) ? 255 : this.b);
-
- // some getters
- this.toRGB = function () {
- return 'rgb(' + this.r + ', ' + this.g + ', ' + this.b + ')';
- }
- this.toHex = function () {
- var r = this.r.toString(16);
- var g = this.g.toString(16);
- var b = this.b.toString(16);
- if (r.length == 1) r = '0' + r;
- if (g.length == 1) g = '0' + g;
- if (b.length == 1) b = '0' + b;
- return '#' + r + g + b;
- }
-
- // help
- this.getHelpXML = function () {
-
- var examples = new Array();
- // add regexps
- for (var i = 0; i < color_defs.length; i++) {
- var example = color_defs[i].example;
- for (var j = 0; j < example.length; j++) {
- examples[examples.length] = example[j];
- }
- }
- // add type-in colors
- for (var sc in simple_colors) {
- examples[examples.length] = sc;
- }
-
- var xml = document.createElement('ul');
- xml.setAttribute('id', 'rgbcolor-examples');
- for (var i = 0; i < examples.length; i++) {
- try {
- var list_item = document.createElement('li');
- var list_color = new RGBColor(examples[i]);
- var example_div = document.createElement('div');
- example_div.style.cssText =
- 'margin: 3px; '
- + 'border: 1px solid black; '
- + 'background:' + list_color.toHex() + '; '
- + 'color:' + list_color.toHex()
- ;
- example_div.appendChild(document.createTextNode('test'));
- var list_item_value = document.createTextNode(
- ' ' + examples[i] + ' -> ' + list_color.toRGB() + ' -> ' + list_color.toHex()
- );
- list_item.appendChild(example_div);
- list_item.appendChild(list_item_value);
- xml.appendChild(list_item);
-
- } catch (e) {
- }
- }
- return xml;
-
- }
-
-}
-
-/**
- * @license canvg.js - Javascript SVG parser and renderer on Canvas
- * MIT Licensed
- * Gabe Lerner (gabelerner@gmail.com)
- * http://code.google.com/p/canvg/
- *
- * Requires: rgbcolor.js - http://www.phpied.com/rgb-color-parser-in-javascript/
- *
- */
-if (!window.console) {
- window.console = {};
- window.console.log = function (str) {
- };
- window.console.dir = function (str) {
- };
-}
-
-if (!Array.prototype.indexOf) {
- Array.prototype.indexOf = function (obj) {
- for (var i = 0; i < this.length; i++) {
- if (this[i] == obj) {
- return i;
- }
- }
- return -1;
- }
-}
-
-(function () {
- // canvg(target, s)
- // empty parameters: replace all 'svg' elements on page with 'canvas' elements
- // target: canvas element or the id of a canvas element
- // s: svg string, url to svg file, or xml document
- // opts: optional hash of options
- // ignoreMouse: true => ignore mouse events
- // ignoreAnimation: true => ignore animations
- // ignoreDimensions: true => does not try to resize canvas
- // ignoreClear: true => does not clear canvas
- // offsetX: int => draws at a x offset
- // offsetY: int => draws at a y offset
- // scaleWidth: int => scales horizontally to width
- // scaleHeight: int => scales vertically to height
- // renderCallback: function => will call the function after the first render is completed
- // forceRedraw: function => will call the function on every frame, if it returns true, will redraw
- this.canvg = function (target, s, opts) {
- // no parameters
- if (target == null && s == null && opts == null) {
- var svgTags = document.getElementsByTagName('svg');
- for (var i = 0; i < svgTags.length; i++) {
- var svgTag = svgTags[i];
- var c = document.createElement('canvas');
- c.width = svgTag.clientWidth;
- c.height = svgTag.clientHeight;
- svgTag.parentNode.insertBefore(c, svgTag);
- svgTag.parentNode.removeChild(svgTag);
- var div = document.createElement('div');
- div.appendChild(svgTag);
- canvg(c, div.innerHTML);
- }
- return;
- }
- opts = opts || {};
-
- if (typeof target == 'string') {
- target = document.getElementById(target);
- }
-
- // reuse class per canvas
- var svg;
- if (target.svg == null) {
- svg = build();
- target.svg = svg;
- }
- else {
- svg = target.svg;
- svg.stop();
- }
- svg.opts = opts;
-
- var ctx = target.getContext('2d');
- if (typeof(s.documentElement) != 'undefined') {
- // load from xml doc
- svg.loadXmlDoc(ctx, s);
- }
- else if (s.substr(0, 1) == '<') {
- // load from xml string
- svg.loadXml(ctx, s);
- }
- else {
- // load from url
- svg.load(ctx, s);
- }
- }
-
- function build() {
- var svg = { };
-
- svg.FRAMERATE = 30;
- svg.MAX_VIRTUAL_PIXELS = 30000;
-
- // globals
- svg.init = function (ctx) {
- svg.Definitions = {};
- svg.Styles = {};
- svg.Animations = [];
- svg.Images = [];
- svg.ctx = ctx;
- svg.ViewPort = new (function () {
- this.viewPorts = [];
- this.Clear = function () {
- this.viewPorts = [];
- }
- this.SetCurrent = function (width, height) {
- this.viewPorts.push({ width: width, height: height });
- }
- this.RemoveCurrent = function () {
- this.viewPorts.pop();
- }
- this.Current = function () {
- return this.viewPorts[this.viewPorts.length - 1];
- }
- this.width = function () {
- return this.Current().width;
- }
- this.height = function () {
- return this.Current().height;
- }
- this.ComputeSize = function (d) {
- if (d != null && typeof(d) == 'number') return d;
- if (d == 'x') return this.width();
- if (d == 'y') return this.height();
- return Math.sqrt(Math.pow(this.width(), 2) + Math.pow(this.height(), 2)) / Math.sqrt(2);
- }
- });
- }
- svg.init();
-
- // images loaded
- svg.ImagesLoaded = function () {
- for (var i = 0; i < svg.Images.length; i++) {
- if (!svg.Images[i].loaded) return false;
- }
- return true;
- }
-
- // trim
- svg.trim = function (s) {
- return s.replace(/^\s+|\s+$/g, '');
- }
-
- // compress spaces
- svg.compressSpaces = function (s) {
- return s.replace(/[\s\r\t\n]+/gm, ' ');
- }
-
- // ajax
- svg.ajax = function (url) {
- var AJAX;
- if (window.XMLHttpRequest) {
- AJAX = new XMLHttpRequest();
- }
- else {
- AJAX = new ActiveXObject('Microsoft.XMLHTTP');
- }
- if (AJAX) {
- AJAX.open('GET', url, false);
- AJAX.send(null);
- return AJAX.responseText;
- }
- return null;
- }
-
- // parse xml
- svg.parseXml = function (xml) {
- if (window.DOMParser) {
- var parser = new DOMParser();
- return parser.parseFromString(xml, 'text/xml');
- }
- else {
- xml = xml.replace(/]*>/, '');
- var xmlDoc = new ActiveXObject('Microsoft.XMLDOM');
- xmlDoc.async = 'false';
- xmlDoc.loadXML(xml);
- return xmlDoc;
- }
- }
-
- svg.Property = function (name, value) {
- this.name = name;
- this.value = value;
-
- this.hasValue = function () {
- return (this.value != null && this.value !== '');
- }
-
- // return the numerical value of the property
- this.numValue = function () {
- if (!this.hasValue()) return 0;
-
- var n = parseFloat(this.value);
- if ((this.value + '').match(/%$/)) {
- n = n / 100.0;
- }
- return n;
- }
-
- this.valueOrDefault = function (def) {
- if (this.hasValue()) return this.value;
- return def;
- }
-
- this.numValueOrDefault = function (def) {
- if (this.hasValue()) return this.numValue();
- return def;
- }
-
- /* EXTENSIONS */
- var that = this;
-
- // color extensions
- this.Color = {
- // augment the current color value with the opacity
- addOpacity: function (opacity) {
- var newValue = that.value;
- if (opacity != null && opacity != '') {
- var color = new RGBColor(that.value);
- if (color.ok) {
- newValue = 'rgba(' + color.r + ', ' + color.g + ', ' + color.b + ', ' + opacity + ')';
- }
- }
- return new svg.Property(that.name, newValue);
- }
- }
-
- // definition extensions
- this.Definition = {
- // get the definition from the definitions table
- getDefinition: function () {
- var name = that.value.replace(/^(url\()?#([^\)]+)\)?$/, '$2');
- return svg.Definitions[name];
- },
-
- isUrl: function () {
- return that.value.indexOf('url(') == 0
- },
-
- getFillStyle: function (e) {
- var def = this.getDefinition();
-
- // gradient
- if (def != null && def.createGradient) {
- return def.createGradient(svg.ctx, e);
- }
-
- // pattern
- if (def != null && def.createPattern) {
- return def.createPattern(svg.ctx, e);
- }
-
- return null;
- }
- }
-
- // length extensions
- this.Length = {
- DPI: function (viewPort) {
- return 96.0; // TODO: compute?
- },
-
- EM: function (viewPort) {
- var em = 12;
-
- var fontSize = new svg.Property('fontSize', svg.Font.Parse(svg.ctx.font).fontSize);
- if (fontSize.hasValue()) em = fontSize.Length.toPixels(viewPort);
-
- return em;
- },
-
- // get the length as pixels
- toPixels: function (viewPort) {
- if (!that.hasValue()) return 0;
- var s = that.value + '';
- if (s.match(/em$/)) return that.numValue() * this.EM(viewPort);
- if (s.match(/ex$/)) return that.numValue() * this.EM(viewPort) / 2.0;
- if (s.match(/px$/)) return that.numValue();
- if (s.match(/pt$/)) return that.numValue() * 1.25;
- if (s.match(/pc$/)) return that.numValue() * 15;
- if (s.match(/cm$/)) return that.numValue() * this.DPI(viewPort) / 2.54;
- if (s.match(/mm$/)) return that.numValue() * this.DPI(viewPort) / 25.4;
- if (s.match(/in$/)) return that.numValue() * this.DPI(viewPort);
- if (s.match(/%$/)) return that.numValue() * svg.ViewPort.ComputeSize(viewPort);
- return that.numValue();
- }
- }
-
- // time extensions
- this.Time = {
- // get the time as milliseconds
- toMilliseconds: function () {
- if (!that.hasValue()) return 0;
- var s = that.value + '';
- if (s.match(/s$/)) return that.numValue() * 1000;
- if (s.match(/ms$/)) return that.numValue();
- return that.numValue();
- }
- }
-
- // angle extensions
- this.Angle = {
- // get the angle as radians
- toRadians: function () {
- if (!that.hasValue()) return 0;
- var s = that.value + '';
- if (s.match(/deg$/)) return that.numValue() * (Math.PI / 180.0);
- if (s.match(/grad$/)) return that.numValue() * (Math.PI / 200.0);
- if (s.match(/rad$/)) return that.numValue();
- return that.numValue() * (Math.PI / 180.0);
- }
- }
- }
-
- // fonts
- svg.Font = new (function () {
- this.Styles = ['normal', 'italic', 'oblique', 'inherit'];
- this.Variants = ['normal', 'small-caps', 'inherit'];
- this.Weights = ['normal', 'bold', 'bolder', 'lighter', '100', '200', '300', '400', '500', '600', '700', '800', '900', 'inherit'];
-
- this.CreateFont = function (fontStyle, fontVariant, fontWeight, fontSize, fontFamily, inherit) {
- var f = inherit != null ? this.Parse(inherit) : this.CreateFont('', '', '', '', '', svg.ctx.font);
- return {
- fontFamily: fontFamily || f.fontFamily,
- fontSize: fontSize || f.fontSize,
- fontStyle: fontStyle || f.fontStyle,
- fontWeight: fontWeight || f.fontWeight,
- fontVariant: fontVariant || f.fontVariant,
- toString: function () {
- return [this.fontStyle, this.fontVariant, this.fontWeight, this.fontSize, this.fontFamily].join(' ')
- }
- }
- }
-
- var that = this;
- this.Parse = function (s) {
- var f = {};
- var d = svg.trim(svg.compressSpaces(s || '')).split(' ');
- var set = { fontSize: false, fontStyle: false, fontWeight: false, fontVariant: false }
- var ff = '';
- for (var i = 0; i < d.length; i++) {
- if (!set.fontStyle && that.Styles.indexOf(d[i]) != -1) {
- if (d[i] != 'inherit') f.fontStyle = d[i];
- set.fontStyle = true;
- }
- else if (!set.fontVariant && that.Variants.indexOf(d[i]) != -1) {
- if (d[i] != 'inherit') f.fontVariant = d[i];
- set.fontStyle = set.fontVariant = true;
- }
- else if (!set.fontWeight && that.Weights.indexOf(d[i]) != -1) {
- if (d[i] != 'inherit') f.fontWeight = d[i];
- set.fontStyle = set.fontVariant = set.fontWeight = true;
- }
- else if (!set.fontSize) {
- if (d[i] != 'inherit') f.fontSize = d[i].split('/')[0];
- set.fontStyle = set.fontVariant = set.fontWeight = set.fontSize = true;
- }
- else {
- if (d[i] != 'inherit') ff += d[i];
- }
- }
- if (ff != '') f.fontFamily = ff;
- return f;
- }
- });
-
- // points and paths
- svg.ToNumberArray = function (s) {
- var a = svg.trim(svg.compressSpaces((s || '').replace(/,/g, ' '))).split(' ');
- for (var i = 0; i < a.length; i++) {
- a[i] = parseFloat(a[i]);
- }
- return a;
- }
- svg.Point = function (x, y) {
- this.x = x;
- this.y = y;
-
- this.angleTo = function (p) {
- return Math.atan2(p.y - this.y, p.x - this.x);
- }
-
- this.applyTransform = function (v) {
- var xp = this.x * v[0] + this.y * v[2] + v[4];
- var yp = this.x * v[1] + this.y * v[3] + v[5];
- this.x = xp;
- this.y = yp;
- }
- }
- svg.CreatePoint = function (s) {
- var a = svg.ToNumberArray(s);
- return new svg.Point(a[0], a[1]);
- }
- svg.CreatePath = function (s) {
- var a = svg.ToNumberArray(s);
- var path = [];
- for (var i = 0; i < a.length; i += 2) {
- path.push(new svg.Point(a[i], a[i + 1]));
- }
- return path;
- }
-
- // bounding box
- svg.BoundingBox = function (x1, y1, x2, y2) { // pass in initial points if you want
- this.x1 = Number.NaN;
- this.y1 = Number.NaN;
- this.x2 = Number.NaN;
- this.y2 = Number.NaN;
-
- this.x = function () {
- return this.x1;
- }
- this.y = function () {
- return this.y1;
- }
- this.width = function () {
- return this.x2 - this.x1;
- }
- this.height = function () {
- return this.y2 - this.y1;
- }
-
- this.addPoint = function (x, y) {
- if (x != null) {
- if (isNaN(this.x1) || isNaN(this.x2)) {
- this.x1 = x;
- this.x2 = x;
- }
- if (x < this.x1) this.x1 = x;
- if (x > this.x2) this.x2 = x;
- }
-
- if (y != null) {
- if (isNaN(this.y1) || isNaN(this.y2)) {
- this.y1 = y;
- this.y2 = y;
- }
- if (y < this.y1) this.y1 = y;
- if (y > this.y2) this.y2 = y;
- }
- }
- this.addX = function (x) {
- this.addPoint(x, null);
- }
- this.addY = function (y) {
- this.addPoint(null, y);
- }
-
- this.addBoundingBox = function (bb) {
- this.addPoint(bb.x1, bb.y1);
- this.addPoint(bb.x2, bb.y2);
- }
-
- this.addQuadraticCurve = function (p0x, p0y, p1x, p1y, p2x, p2y) {
- var cp1x = p0x + 2 / 3 * (p1x - p0x); // CP1 = QP0 + 2/3 *(QP1-QP0)
- var cp1y = p0y + 2 / 3 * (p1y - p0y); // CP1 = QP0 + 2/3 *(QP1-QP0)
- var cp2x = cp1x + 1 / 3 * (p2x - p0x); // CP2 = CP1 + 1/3 *(QP2-QP0)
- var cp2y = cp1y + 1 / 3 * (p2y - p0y); // CP2 = CP1 + 1/3 *(QP2-QP0)
- this.addBezierCurve(p0x, p0y, cp1x, cp2x, cp1y, cp2y, p2x, p2y);
- }
-
- this.addBezierCurve = function (p0x, p0y, p1x, p1y, p2x, p2y, p3x, p3y) {
- // from http://blog.hackers-cafe.net/2009/06/how-to-calculate-bezier-curves-bounding.html
- var p0 = [p0x, p0y], p1 = [p1x, p1y], p2 = [p2x, p2y], p3 = [p3x, p3y];
- this.addPoint(p0[0], p0[1]);
- this.addPoint(p3[0], p3[1]);
-
- for (i = 0; i <= 1; i++) {
- var f = function (t) {
- return Math.pow(1 - t, 3) * p0[i]
- + 3 * Math.pow(1 - t, 2) * t * p1[i]
- + 3 * (1 - t) * Math.pow(t, 2) * p2[i]
- + Math.pow(t, 3) * p3[i];
- }
-
- var b = 6 * p0[i] - 12 * p1[i] + 6 * p2[i];
- var a = -3 * p0[i] + 9 * p1[i] - 9 * p2[i] + 3 * p3[i];
- var c = 3 * p1[i] - 3 * p0[i];
-
- if (a == 0) {
- if (b == 0) continue;
- var t = -c / b;
- if (0 < t && t < 1) {
- if (i == 0) this.addX(f(t));
- if (i == 1) this.addY(f(t));
- }
- continue;
- }
-
- var b2ac = Math.pow(b, 2) - 4 * c * a;
- if (b2ac < 0) continue;
- var t1 = (-b + Math.sqrt(b2ac)) / (2 * a);
- if (0 < t1 && t1 < 1) {
- if (i == 0) this.addX(f(t1));
- if (i == 1) this.addY(f(t1));
- }
- var t2 = (-b - Math.sqrt(b2ac)) / (2 * a);
- if (0 < t2 && t2 < 1) {
- if (i == 0) this.addX(f(t2));
- if (i == 1) this.addY(f(t2));
- }
- }
- }
-
- this.isPointInBox = function (x, y) {
- return (this.x1 <= x && x <= this.x2 && this.y1 <= y && y <= this.y2);
- }
-
- this.addPoint(x1, y1);
- this.addPoint(x2, y2);
- }
-
- // transforms
- svg.Transform = function (v) {
- var that = this;
- this.Type = {}
-
- // translate
- this.Type.translate = function (s) {
- this.p = svg.CreatePoint(s);
- this.apply = function (ctx) {
- ctx.translate(this.p.x || 0.0, this.p.y || 0.0);
- }
- this.applyToPoint = function (p) {
- p.applyTransform([1, 0, 0, 1, this.p.x || 0.0, this.p.y || 0.0]);
- }
- }
-
- // rotate
- this.Type.rotate = function (s) {
- var a = svg.ToNumberArray(s);
- this.angle = new svg.Property('angle', a[0]);
- this.cx = a[1] || 0;
- this.cy = a[2] || 0;
- this.apply = function (ctx) {
- ctx.translate(this.cx, this.cy);
- ctx.rotate(this.angle.Angle.toRadians());
- ctx.translate(-this.cx, -this.cy);
- }
- this.applyToPoint = function (p) {
- var a = this.angle.Angle.toRadians();
- p.applyTransform([1, 0, 0, 1, this.p.x || 0.0, this.p.y || 0.0]);
- p.applyTransform([Math.cos(a), Math.sin(a), -Math.sin(a), Math.cos(a), 0, 0]);
- p.applyTransform([1, 0, 0, 1, -this.p.x || 0.0, -this.p.y || 0.0]);
- }
- }
-
- this.Type.scale = function (s) {
- this.p = svg.CreatePoint(s);
- this.apply = function (ctx) {
- ctx.scale(this.p.x || 1.0, this.p.y || this.p.x || 1.0);
- }
- this.applyToPoint = function (p) {
- p.applyTransform([this.p.x || 0.0, 0, 0, this.p.y || 0.0, 0, 0]);
- }
- }
-
- this.Type.matrix = function (s) {
- this.m = svg.ToNumberArray(s);
- this.apply = function (ctx) {
- ctx.transform(this.m[0], this.m[1], this.m[2], this.m[3], this.m[4], this.m[5]);
- }
- this.applyToPoint = function (p) {
- p.applyTransform(this.m);
- }
- }
-
- this.Type.SkewBase = function (s) {
- this.base = that.Type.matrix;
- this.base(s);
- this.angle = new svg.Property('angle', s);
- }
- this.Type.SkewBase.prototype = new this.Type.matrix;
-
- this.Type.skewX = function (s) {
- this.base = that.Type.SkewBase;
- this.base(s);
- this.m = [1, 0, Math.tan(this.angle.Angle.toRadians()), 1, 0, 0];
- }
- this.Type.skewX.prototype = new this.Type.SkewBase;
-
- this.Type.skewY = function (s) {
- this.base = that.Type.SkewBase;
- this.base(s);
- this.m = [1, Math.tan(this.angle.Angle.toRadians()), 0, 1, 0, 0];
- }
- this.Type.skewY.prototype = new this.Type.SkewBase;
-
- this.transforms = [];
-
- this.apply = function (ctx) {
- for (var i = 0; i < this.transforms.length; i++) {
- this.transforms[i].apply(ctx);
- }
- }
-
- this.applyToPoint = function (p) {
- for (var i = 0; i < this.transforms.length; i++) {
- this.transforms[i].applyToPoint(p);
- }
- }
-
- var data = svg.trim(svg.compressSpaces(v)).split(/\s(?=[a-z])/);
- for (var i = 0; i < data.length; i++) {
- var type = data[i].split('(')[0];
- var s = data[i].split('(')[1].replace(')', '');
- var transform = new this.Type[type](s);
- this.transforms.push(transform);
- }
- }
-
- // aspect ratio
- svg.AspectRatio = function (ctx, aspectRatio, width, desiredWidth, height, desiredHeight, minX, minY, refX, refY) {
- // aspect ratio - http://www.w3.org/TR/SVG/coords.html#PreserveAspectRatioAttribute
- aspectRatio = svg.compressSpaces(aspectRatio);
- aspectRatio = aspectRatio.replace(/^defer\s/, ''); // ignore defer
- var align = aspectRatio.split(' ')[0] || 'xMidYMid';
- var meetOrSlice = aspectRatio.split(' ')[1] || 'meet';
-
- // calculate scale
- var scaleX = width / desiredWidth;
- var scaleY = height / desiredHeight;
- var scaleMin = Math.min(scaleX, scaleY);
- var scaleMax = Math.max(scaleX, scaleY);
- if (meetOrSlice == 'meet') {
- desiredWidth *= scaleMin;
- desiredHeight *= scaleMin;
- }
- if (meetOrSlice == 'slice') {
- desiredWidth *= scaleMax;
- desiredHeight *= scaleMax;
- }
-
- refX = new svg.Property('refX', refX);
- refY = new svg.Property('refY', refY);
- if (refX.hasValue() && refY.hasValue()) {
- ctx.translate(-scaleMin * refX.Length.toPixels('x'), -scaleMin * refY.Length.toPixels('y'));
- }
- else {
- // align
- if (align.match(/^xMid/) && ((meetOrSlice == 'meet' && scaleMin == scaleY) || (meetOrSlice == 'slice' && scaleMax == scaleY))) ctx.translate(width / 2.0 - desiredWidth / 2.0, 0);
- if (align.match(/YMid$/) && ((meetOrSlice == 'meet' && scaleMin == scaleX) || (meetOrSlice == 'slice' && scaleMax == scaleX))) ctx.translate(0, height / 2.0 - desiredHeight / 2.0);
- if (align.match(/^xMax/) && ((meetOrSlice == 'meet' && scaleMin == scaleY) || (meetOrSlice == 'slice' && scaleMax == scaleY))) ctx.translate(width - desiredWidth, 0);
- if (align.match(/YMax$/) && ((meetOrSlice == 'meet' && scaleMin == scaleX) || (meetOrSlice == 'slice' && scaleMax == scaleX))) ctx.translate(0, height - desiredHeight);
- }
-
- // scale
- if (align == 'none') ctx.scale(scaleX, scaleY);
- else if (meetOrSlice == 'meet') ctx.scale(scaleMin, scaleMin);
- else if (meetOrSlice == 'slice') ctx.scale(scaleMax, scaleMax);
-
- // translate
- ctx.translate(minX == null ? 0 : -minX, minY == null ? 0 : -minY);
- }
-
- // elements
- svg.Element = {}
-
- svg.Element.ElementBase = function (node) {
- this.attributes = {};
- this.styles = {};
- this.children = [];
-
- // get or create attribute
- this.attribute = function (name, createIfNotExists) {
- var a = this.attributes[name];
- if (a != null) return a;
-
- a = new svg.Property(name, '');
- if (createIfNotExists == true) this.attributes[name] = a;
- return a;
- }
-
- // get or create style, crawls up node tree
- this.style = function (name, createIfNotExists) {
- var s = this.styles[name];
- if (s != null) return s;
-
- var a = this.attribute(name);
- if (a != null && a.hasValue()) {
- return a;
- }
-
- var p = this.parent;
- if (p != null) {
- var ps = p.style(name);
- if (ps != null && ps.hasValue()) {
- return ps;
- }
- }
-
- s = new svg.Property(name, '');
- if (createIfNotExists == true) this.styles[name] = s;
- return s;
- }
-
- // base render
- this.render = function (ctx) {
- // don't render display=none
- if (this.style('display').value == 'none') return;
-
- // don't render visibility=hidden
- if (this.attribute('visibility').value == 'hidden') return;
-
- ctx.save();
- this.setContext(ctx);
- // mask
- if (this.attribute('mask').hasValue()) {
- var mask = this.attribute('mask').Definition.getDefinition();
- if (mask != null) mask.apply(ctx, this);
- }
- else if (this.style('filter').hasValue()) {
- var filter = this.style('filter').Definition.getDefinition();
- if (filter != null) filter.apply(ctx, this);
- }
- else this.renderChildren(ctx);
- this.clearContext(ctx);
- ctx.restore();
- }
-
- // base set context
- this.setContext = function (ctx) {
- // OVERRIDE ME!
- }
-
- // base clear context
- this.clearContext = function (ctx) {
- // OVERRIDE ME!
- }
-
- // base render children
- this.renderChildren = function (ctx) {
- for (var i = 0; i < this.children.length; i++) {
- this.children[i].render(ctx);
- }
- }
-
- this.addChild = function (childNode, create) {
- var child = childNode;
- if (create) child = svg.CreateElement(childNode);
- child.parent = this;
- this.children.push(child);
- }
-
- if (node != null && node.nodeType == 1) { //ELEMENT_NODE
- // add children
- for (var i = 0; i < node.childNodes.length; i++) {
- var childNode = node.childNodes[i];
- if (childNode.nodeType == 1) this.addChild(childNode, true); //ELEMENT_NODE
- }
-
- // add attributes
- for (var i = 0; i < node.attributes.length; i++) {
- var attribute = node.attributes[i];
- this.attributes[attribute.nodeName] = new svg.Property(attribute.nodeName, attribute.nodeValue);
- }
-
- // add tag styles
- var styles = svg.Styles[node.nodeName];
- if (styles != null) {
- for (var name in styles) {
- this.styles[name] = styles[name];
- }
- }
-
- // add class styles
- if (this.attribute('class').hasValue()) {
- var classes = svg.compressSpaces(this.attribute('class').value).split(' ');
- for (var j = 0; j < classes.length; j++) {
- styles = svg.Styles['.' + classes[j]];
- if (styles != null) {
- for (var name in styles) {
- this.styles[name] = styles[name];
- }
- }
- styles = svg.Styles[node.nodeName + '.' + classes[j]];
- if (styles != null) {
- for (var name in styles) {
- this.styles[name] = styles[name];
- }
- }
- }
- }
-
- // add inline styles
- if (this.attribute('style').hasValue()) {
- var styles = this.attribute('style').value.split(';');
- for (var i = 0; i < styles.length; i++) {
- if (svg.trim(styles[i]) != '') {
- var style = styles[i].split(':');
- var name = svg.trim(style[0]);
- var value = svg.trim(style[1]);
- this.styles[name] = new svg.Property(name, value);
- }
- }
- }
-
- // add id
- if (this.attribute('id').hasValue()) {
- if (svg.Definitions[this.attribute('id').value] == null) {
- svg.Definitions[this.attribute('id').value] = this;
- }
- }
- }
- }
-
- svg.Element.RenderedElementBase = function (node) {
- this.base = svg.Element.ElementBase;
- this.base(node);
-
- this.setContext = function (ctx) {
- // fill
- if (this.style('fill').Definition.isUrl()) {
- var fs = this.style('fill').Definition.getFillStyle(this);
- if (fs != null) ctx.fillStyle = fs;
- }
- else if (this.style('fill').hasValue()) {
- var fillStyle = this.style('fill');
- if (this.style('fill-opacity').hasValue()) fillStyle = fillStyle.Color.addOpacity(this.style('fill-opacity').value);
- ctx.fillStyle = (fillStyle.value == 'none' ? 'rgba(0,0,0,0)' : fillStyle.value);
- }
-
- // stroke
- if (this.style('stroke').Definition.isUrl()) {
- var fs = this.style('stroke').Definition.getFillStyle(this);
- if (fs != null) ctx.strokeStyle = fs;
- }
- else if (this.style('stroke').hasValue()) {
- var strokeStyle = this.style('stroke');
- if (this.style('stroke-opacity').hasValue()) strokeStyle = strokeStyle.Color.addOpacity(this.style('stroke-opacity').value);
- ctx.strokeStyle = (strokeStyle.value == 'none' ? 'rgba(0,0,0,0)' : strokeStyle.value);
- }
- if (this.style('stroke-width').hasValue()) ctx.lineWidth = this.style('stroke-width').Length.toPixels();
- if (this.style('stroke-linecap').hasValue()) ctx.lineCap = this.style('stroke-linecap').value;
- if (this.style('stroke-linejoin').hasValue()) ctx.lineJoin = this.style('stroke-linejoin').value;
- if (this.style('stroke-miterlimit').hasValue()) ctx.miterLimit = this.style('stroke-miterlimit').value;
-
- // font
- if (typeof(ctx.font) != 'undefined') {
- ctx.font = svg.Font.CreateFont(
- this.style('font-style').value,
- this.style('font-variant').value,
- this.style('font-weight').value,
- this.style('font-size').hasValue() ? this.style('font-size').Length.toPixels() + 'px' : '',
- this.style('font-family').value).toString();
- }
-
- // transform
- if (this.attribute('transform').hasValue()) {
- var transform = new svg.Transform(this.attribute('transform').value);
- transform.apply(ctx);
- }
-
- // clip
- if (this.attribute('clip-path').hasValue()) {
- var clip = this.attribute('clip-path').Definition.getDefinition();
- if (clip != null) clip.apply(ctx);
- }
-
- // opacity
- if (this.style('opacity').hasValue()) {
- ctx.globalAlpha = this.style('opacity').numValue();
- }
- }
- }
- svg.Element.RenderedElementBase.prototype = new svg.Element.ElementBase;
-
- svg.Element.PathElementBase = function (node) {
- this.base = svg.Element.RenderedElementBase;
- this.base(node);
-
- this.path = function (ctx) {
- if (ctx != null) ctx.beginPath();
- return new svg.BoundingBox();
- }
-
- this.renderChildren = function (ctx) {
- this.path(ctx);
- svg.Mouse.checkPath(this, ctx);
- if (ctx.fillStyle != '') ctx.fill();
- if (ctx.strokeStyle != '') ctx.stroke();
-
- var markers = this.getMarkers();
- if (markers != null) {
- if (this.style('marker-start').Definition.isUrl()) {
- var marker = this.style('marker-start').Definition.getDefinition();
- marker.render(ctx, markers[0][0], markers[0][1]);
- }
- if (this.style('marker-mid').Definition.isUrl()) {
- var marker = this.style('marker-mid').Definition.getDefinition();
- for (var i = 1; i < markers.length - 1; i++) {
- marker.render(ctx, markers[i][0], markers[i][1]);
- }
- }
- if (this.style('marker-end').Definition.isUrl()) {
- var marker = this.style('marker-end').Definition.getDefinition();
- marker.render(ctx, markers[markers.length - 1][0], markers[markers.length - 1][1]);
- }
- }
- }
-
- this.getBoundingBox = function () {
- return this.path();
- }
-
- this.getMarkers = function () {
- return null;
- }
- }
- svg.Element.PathElementBase.prototype = new svg.Element.RenderedElementBase;
-
- // svg element
- svg.Element.svg = function (node) {
- this.base = svg.Element.RenderedElementBase;
- this.base(node);
-
- this.baseClearContext = this.clearContext;
- this.clearContext = function (ctx) {
- this.baseClearContext(ctx);
- svg.ViewPort.RemoveCurrent();
- }
-
- this.baseSetContext = this.setContext;
- this.setContext = function (ctx) {
- // initial values
- ctx.strokeStyle = 'rgba(0,0,0,0)';
- ctx.lineCap = 'butt';
- ctx.lineJoin = 'miter';
- ctx.miterLimit = 4;
-
- this.baseSetContext(ctx);
-
- // create new view port
- if (this.attribute('x').hasValue() && this.attribute('y').hasValue()) {
- ctx.translate(this.attribute('x').Length.toPixels('x'), this.attribute('y').Length.toPixels('y'));
- }
-
- var width = svg.ViewPort.width();
- var height = svg.ViewPort.height();
- if (typeof(this.root) == 'undefined' && this.attribute('width').hasValue() && this.attribute('height').hasValue()) {
- width = this.attribute('width').Length.toPixels('x');
- height = this.attribute('height').Length.toPixels('y');
-
- var x = 0;
- var y = 0;
- if (this.attribute('refX').hasValue() && this.attribute('refY').hasValue()) {
- x = -this.attribute('refX').Length.toPixels('x');
- y = -this.attribute('refY').Length.toPixels('y');
- }
-
- ctx.beginPath();
- ctx.moveTo(x, y);
- ctx.lineTo(width, y);
- ctx.lineTo(width, height);
- ctx.lineTo(x, height);
- ctx.closePath();
- ctx.clip();
- }
- svg.ViewPort.SetCurrent(width, height);
-
- // viewbox
- if (this.attribute('viewBox').hasValue()) {
- var viewBox = svg.ToNumberArray(this.attribute('viewBox').value);
- var minX = viewBox[0];
- var minY = viewBox[1];
- width = viewBox[2];
- height = viewBox[3];
-
- svg.AspectRatio(ctx,
- this.attribute('preserveAspectRatio').value,
- svg.ViewPort.width(),
- width,
- svg.ViewPort.height(),
- height,
- minX,
- minY,
- this.attribute('refX').value,
- this.attribute('refY').value);
-
- svg.ViewPort.RemoveCurrent();
- svg.ViewPort.SetCurrent(viewBox[2], viewBox[3]);
- }
- }
- }
- svg.Element.svg.prototype = new svg.Element.RenderedElementBase;
-
- // rect element
- svg.Element.rect = function (node) {
- this.base = svg.Element.PathElementBase;
- this.base(node);
-
- this.path = function (ctx) {
- var x = this.attribute('x').Length.toPixels('x');
- var y = this.attribute('y').Length.toPixels('y');
- var width = this.attribute('width').Length.toPixels('x');
- var height = this.attribute('height').Length.toPixels('y');
- var rx = this.attribute('rx').Length.toPixels('x');
- var ry = this.attribute('ry').Length.toPixels('y');
- if (this.attribute('rx').hasValue() && !this.attribute('ry').hasValue()) ry = rx;
- if (this.attribute('ry').hasValue() && !this.attribute('rx').hasValue()) rx = ry;
-
- if (ctx != null) {
- ctx.beginPath();
- ctx.moveTo(x + rx, y);
- ctx.lineTo(x + width - rx, y);
- ctx.quadraticCurveTo(x + width, y, x + width, y + ry)
- ctx.lineTo(x + width, y + height - ry);
- ctx.quadraticCurveTo(x + width, y + height, x + width - rx, y + height)
- ctx.lineTo(x + rx, y + height);
- ctx.quadraticCurveTo(x, y + height, x, y + height - ry)
- ctx.lineTo(x, y + ry);
- ctx.quadraticCurveTo(x, y, x + rx, y)
- ctx.closePath();
- }
-
- return new svg.BoundingBox(x, y, x + width, y + height);
- }
- }
- svg.Element.rect.prototype = new svg.Element.PathElementBase;
-
- // circle element
- svg.Element.circle = function (node) {
- this.base = svg.Element.PathElementBase;
- this.base(node);
-
- this.path = function (ctx) {
- var cx = this.attribute('cx').Length.toPixels('x');
- var cy = this.attribute('cy').Length.toPixels('y');
- var r = this.attribute('r').Length.toPixels();
-
- if (ctx != null) {
- ctx.beginPath();
- ctx.arc(cx, cy, r, 0, Math.PI * 2, true);
- ctx.closePath();
- }
-
- return new svg.BoundingBox(cx - r, cy - r, cx + r, cy + r);
- }
- }
- svg.Element.circle.prototype = new svg.Element.PathElementBase;
-
- // ellipse element
- svg.Element.ellipse = function (node) {
- this.base = svg.Element.PathElementBase;
- this.base(node);
-
- this.path = function (ctx) {
- var KAPPA = 4 * ((Math.sqrt(2) - 1) / 3);
- var rx = this.attribute('rx').Length.toPixels('x');
- var ry = this.attribute('ry').Length.toPixels('y');
- var cx = this.attribute('cx').Length.toPixels('x');
- var cy = this.attribute('cy').Length.toPixels('y');
-
- if (ctx != null) {
- ctx.beginPath();
- ctx.moveTo(cx, cy - ry);
- ctx.bezierCurveTo(cx + (KAPPA * rx), cy - ry, cx + rx, cy - (KAPPA * ry), cx + rx, cy);
- ctx.bezierCurveTo(cx + rx, cy + (KAPPA * ry), cx + (KAPPA * rx), cy + ry, cx, cy + ry);
- ctx.bezierCurveTo(cx - (KAPPA * rx), cy + ry, cx - rx, cy + (KAPPA * ry), cx - rx, cy);
- ctx.bezierCurveTo(cx - rx, cy - (KAPPA * ry), cx - (KAPPA * rx), cy - ry, cx, cy - ry);
- ctx.closePath();
- }
-
- return new svg.BoundingBox(cx - rx, cy - ry, cx + rx, cy + ry);
- }
- }
- svg.Element.ellipse.prototype = new svg.Element.PathElementBase;
-
- // line element
- svg.Element.line = function (node) {
- this.base = svg.Element.PathElementBase;
- this.base(node);
-
- this.getPoints = function () {
- return [
- new svg.Point(this.attribute('x1').Length.toPixels('x'), this.attribute('y1').Length.toPixels('y')),
- new svg.Point(this.attribute('x2').Length.toPixels('x'), this.attribute('y2').Length.toPixels('y'))];
- }
-
- this.path = function (ctx) {
- var points = this.getPoints();
-
- if (ctx != null) {
- ctx.beginPath();
- ctx.moveTo(points[0].x, points[0].y);
- ctx.lineTo(points[1].x, points[1].y);
- }
-
- return new svg.BoundingBox(points[0].x, points[0].y, points[1].x, points[1].y);
- }
-
- this.getMarkers = function () {
- var points = this.getPoints();
- var a = points[0].angleTo(points[1]);
- return [
- [points[0], a],
- [points[1], a]
- ];
- }
- }
- svg.Element.line.prototype = new svg.Element.PathElementBase;
-
- // polyline element
- svg.Element.polyline = function (node) {
- this.base = svg.Element.PathElementBase;
- this.base(node);
-
- this.points = svg.CreatePath(this.attribute('points').value);
- this.path = function (ctx) {
- var bb = new svg.BoundingBox(this.points[0].x, this.points[0].y);
- if (ctx != null) {
- ctx.beginPath();
- ctx.moveTo(this.points[0].x, this.points[0].y);
- }
- for (var i = 1; i < this.points.length; i++) {
- bb.addPoint(this.points[i].x, this.points[i].y);
- if (ctx != null) ctx.lineTo(this.points[i].x, this.points[i].y);
- }
- return bb;
- }
-
- this.getMarkers = function () {
- var markers = [];
- for (var i = 0; i < this.points.length - 1; i++) {
- markers.push([this.points[i], this.points[i].angleTo(this.points[i + 1])]);
- }
- markers.push([this.points[this.points.length - 1], markers[markers.length - 1][1]]);
- return markers;
- }
- }
- svg.Element.polyline.prototype = new svg.Element.PathElementBase;
-
- // polygon element
- svg.Element.polygon = function (node) {
- this.base = svg.Element.polyline;
- this.base(node);
-
- this.basePath = this.path;
- this.path = function (ctx) {
- var bb = this.basePath(ctx);
- if (ctx != null) {
- ctx.lineTo(this.points[0].x, this.points[0].y);
- ctx.closePath();
- }
- return bb;
- }
- }
- svg.Element.polygon.prototype = new svg.Element.polyline;
-
- // path element
- svg.Element.path = function (node) {
- this.base = svg.Element.PathElementBase;
- this.base(node);
-
- var d = this.attribute('d').value;
- // TODO: convert to real lexer based on http://www.w3.org/TR/SVG11/paths.html#PathDataBNF
- d = d.replace(/,/gm, ' '); // get rid of all commas
- d = d.replace(/([MmZzLlHhVvCcSsQqTtAa])([MmZzLlHhVvCcSsQqTtAa])/gm, '$1 $2'); // separate commands from commands
- d = d.replace(/([MmZzLlHhVvCcSsQqTtAa])([MmZzLlHhVvCcSsQqTtAa])/gm, '$1 $2'); // separate commands from commands
- d = d.replace(/([MmZzLlHhVvCcSsQqTtAa])([^\s])/gm, '$1 $2'); // separate commands from points
- d = d.replace(/([^\s])([MmZzLlHhVvCcSsQqTtAa])/gm, '$1 $2'); // separate commands from points
- d = d.replace(/([0-9])([+\-])/gm, '$1 $2'); // separate digits when no comma
- d = d.replace(/(\.[0-9]*)(\.)/gm, '$1 $2'); // separate digits when no comma
- d = d.replace(/([Aa](\s+[0-9]+){3})\s+([01])\s*([01])/gm, '$1 $3 $4 '); // shorthand elliptical arc path syntax
- d = svg.compressSpaces(d); // compress multiple spaces
- d = svg.trim(d);
- this.PathParser = new (function (d) {
- this.tokens = d.split(' ');
-
- this.reset = function () {
- this.i = -1;
- this.command = '';
- this.previousCommand = '';
- this.start = new svg.Point(0, 0);
- this.control = new svg.Point(0, 0);
- this.current = new svg.Point(0, 0);
- this.points = [];
- this.angles = [];
- }
-
- this.isEnd = function () {
- return this.i >= this.tokens.length - 1;
- }
-
- this.isCommandOrEnd = function () {
- if (this.isEnd()) return true;
- return this.tokens[this.i + 1].match(/^[A-Za-z]$/) != null;
- }
-
- this.isRelativeCommand = function () {
- return this.command == this.command.toLowerCase();
- }
-
- this.getToken = function () {
- this.i = this.i + 1;
- return this.tokens[this.i];
- }
-
- this.getScalar = function () {
- return parseFloat(this.getToken());
- }
-
- this.nextCommand = function () {
- this.previousCommand = this.command;
- this.command = this.getToken();
- }
-
- this.getPoint = function () {
- var p = new svg.Point(this.getScalar(), this.getScalar());
- return this.makeAbsolute(p);
- }
-
- this.getAsControlPoint = function () {
- var p = this.getPoint();
- this.control = p;
- return p;
- }
-
- this.getAsCurrentPoint = function () {
- var p = this.getPoint();
- this.current = p;
- return p;
- }
-
- this.getReflectedControlPoint = function () {
- if (this.previousCommand.toLowerCase() != 'c' && this.previousCommand.toLowerCase() != 's') {
- return this.current;
- }
-
- // reflect point
- var p = new svg.Point(2 * this.current.x - this.control.x, 2 * this.current.y - this.control.y);
- return p;
- }
-
- this.makeAbsolute = function (p) {
- if (this.isRelativeCommand()) {
- p.x = this.current.x + p.x;
- p.y = this.current.y + p.y;
- }
- return p;
- }
-
- this.addMarker = function (p, from, priorTo) {
- // if the last angle isn't filled in because we didn't have this point yet ...
- if (priorTo != null && this.angles.length > 0 && this.angles[this.angles.length - 1] == null) {
- this.angles[this.angles.length - 1] = this.points[this.points.length - 1].angleTo(priorTo);
- }
- this.addMarkerAngle(p, from == null ? null : from.angleTo(p));
- }
-
- this.addMarkerAngle = function (p, a) {
- this.points.push(p);
- this.angles.push(a);
- }
-
- this.getMarkerPoints = function () {
- return this.points;
- }
- this.getMarkerAngles = function () {
- for (var i = 0; i < this.angles.length; i++) {
- if (this.angles[i] == null) {
- for (var j = i + 1; j < this.angles.length; j++) {
- if (this.angles[j] != null) {
- this.angles[i] = this.angles[j];
- break;
- }
- }
- }
- }
- return this.angles;
- }
- })(d);
-
- this.path = function (ctx) {
- var pp = this.PathParser;
- pp.reset();
-
- var bb = new svg.BoundingBox();
- if (ctx != null) ctx.beginPath();
- while (!pp.isEnd()) {
- pp.nextCommand();
- switch (pp.command.toUpperCase()) {
- case 'M':
- var p = pp.getAsCurrentPoint();
- pp.addMarker(p);
- bb.addPoint(p.x, p.y);
- if (ctx != null) ctx.moveTo(p.x, p.y);
- pp.start = pp.current;
- while (!pp.isCommandOrEnd()) {
- var p = pp.getAsCurrentPoint();
- pp.addMarker(p, pp.start);
- bb.addPoint(p.x, p.y);
- if (ctx != null) ctx.lineTo(p.x, p.y);
- }
- break;
- case 'L':
- while (!pp.isCommandOrEnd()) {
- var c = pp.current;
- var p = pp.getAsCurrentPoint();
- pp.addMarker(p, c);
- bb.addPoint(p.x, p.y);
- if (ctx != null) ctx.lineTo(p.x, p.y);
- }
- break;
- case 'H':
- while (!pp.isCommandOrEnd()) {
- var newP = new svg.Point((pp.isRelativeCommand() ? pp.current.x : 0) + pp.getScalar(), pp.current.y);
- pp.addMarker(newP, pp.current);
- pp.current = newP;
- bb.addPoint(pp.current.x, pp.current.y);
- if (ctx != null) ctx.lineTo(pp.current.x, pp.current.y);
- }
- break;
- case 'V':
- while (!pp.isCommandOrEnd()) {
- var newP = new svg.Point(pp.current.x, (pp.isRelativeCommand() ? pp.current.y : 0) + pp.getScalar());
- pp.addMarker(newP, pp.current);
- pp.current = newP;
- bb.addPoint(pp.current.x, pp.current.y);
- if (ctx != null) ctx.lineTo(pp.current.x, pp.current.y);
- }
- break;
- case 'C':
- while (!pp.isCommandOrEnd()) {
- var curr = pp.current;
- var p1 = pp.getPoint();
- var cntrl = pp.getAsControlPoint();
- var cp = pp.getAsCurrentPoint();
- pp.addMarker(cp, cntrl, p1);
- bb.addBezierCurve(curr.x, curr.y, p1.x, p1.y, cntrl.x, cntrl.y, cp.x, cp.y);
- if (ctx != null) ctx.bezierCurveTo(p1.x, p1.y, cntrl.x, cntrl.y, cp.x, cp.y);
- }
- break;
- case 'S':
- while (!pp.isCommandOrEnd()) {
- var curr = pp.current;
- var p1 = pp.getReflectedControlPoint();
- var cntrl = pp.getAsControlPoint();
- var cp = pp.getAsCurrentPoint();
- pp.addMarker(cp, cntrl, p1);
- bb.addBezierCurve(curr.x, curr.y, p1.x, p1.y, cntrl.x, cntrl.y, cp.x, cp.y);
- if (ctx != null) ctx.bezierCurveTo(p1.x, p1.y, cntrl.x, cntrl.y, cp.x, cp.y);
- }
- break;
- case 'Q':
- while (!pp.isCommandOrEnd()) {
- var curr = pp.current;
- var cntrl = pp.getAsControlPoint();
- var cp = pp.getAsCurrentPoint();
- pp.addMarker(cp, cntrl, cntrl);
- bb.addQuadraticCurve(curr.x, curr.y, cntrl.x, cntrl.y, cp.x, cp.y);
- if (ctx != null) ctx.quadraticCurveTo(cntrl.x, cntrl.y, cp.x, cp.y);
- }
- break;
- case 'T':
- while (!pp.isCommandOrEnd()) {
- var curr = pp.current;
- var cntrl = pp.getReflectedControlPoint();
- pp.control = cntrl;
- var cp = pp.getAsCurrentPoint();
- pp.addMarker(cp, cntrl, cntrl);
- bb.addQuadraticCurve(curr.x, curr.y, cntrl.x, cntrl.y, cp.x, cp.y);
- if (ctx != null) ctx.quadraticCurveTo(cntrl.x, cntrl.y, cp.x, cp.y);
- }
- break;
- case 'A':
- while (!pp.isCommandOrEnd()) {
- var curr = pp.current;
- var rx = pp.getScalar();
- var ry = pp.getScalar();
- var xAxisRotation = pp.getScalar() * (Math.PI / 180.0);
- var largeArcFlag = pp.getScalar();
- var sweepFlag = pp.getScalar();
- var cp = pp.getAsCurrentPoint();
-
- // Conversion from endpoint to center parameterization
- // http://www.w3.org/TR/SVG11/implnote.html#ArcImplementationNotes
- // x1', y1'
- var currp = new svg.Point(
- Math.cos(xAxisRotation) * (curr.x - cp.x) / 2.0 + Math.sin(xAxisRotation) * (curr.y - cp.y) / 2.0,
- -Math.sin(xAxisRotation) * (curr.x - cp.x) / 2.0 + Math.cos(xAxisRotation) * (curr.y - cp.y) / 2.0
- );
- // adjust radii
- var l = Math.pow(currp.x, 2) / Math.pow(rx, 2) + Math.pow(currp.y, 2) / Math.pow(ry, 2);
- if (l > 1) {
- rx *= Math.sqrt(l);
- ry *= Math.sqrt(l);
- }
- // cx', cy'
- var s = (largeArcFlag == sweepFlag ? -1 : 1) * Math.sqrt(
- ((Math.pow(rx, 2) * Math.pow(ry, 2)) - (Math.pow(rx, 2) * Math.pow(currp.y, 2)) - (Math.pow(ry, 2) * Math.pow(currp.x, 2))) /
- (Math.pow(rx, 2) * Math.pow(currp.y, 2) + Math.pow(ry, 2) * Math.pow(currp.x, 2))
- );
- if (isNaN(s)) s = 0;
- var cpp = new svg.Point(s * rx * currp.y / ry, s * -ry * currp.x / rx);
- // cx, cy
- var centp = new svg.Point(
- (curr.x + cp.x) / 2.0 + Math.cos(xAxisRotation) * cpp.x - Math.sin(xAxisRotation) * cpp.y,
- (curr.y + cp.y) / 2.0 + Math.sin(xAxisRotation) * cpp.x + Math.cos(xAxisRotation) * cpp.y
- );
- // vector magnitude
- var m = function (v) {
- return Math.sqrt(Math.pow(v[0], 2) + Math.pow(v[1], 2));
- }
- // ratio between two vectors
- var r = function (u, v) {
- return (u[0] * v[0] + u[1] * v[1]) / (m(u) * m(v))
- }
- // angle between two vectors
- var a = function (u, v) {
- return (u[0] * v[1] < u[1] * v[0] ? -1 : 1) * Math.acos(r(u, v));
- }
- // initial angle
- var a1 = a([1, 0], [(currp.x - cpp.x) / rx, (currp.y - cpp.y) / ry]);
- // angle delta
- var u = [(currp.x - cpp.x) / rx, (currp.y - cpp.y) / ry];
- var v = [(-currp.x - cpp.x) / rx, (-currp.y - cpp.y) / ry];
- var ad = a(u, v);
- if (r(u, v) <= -1) ad = Math.PI;
- if (r(u, v) >= 1) ad = 0;
-
- if (sweepFlag == 0 && ad > 0) ad = ad - 2 * Math.PI;
- if (sweepFlag == 1 && ad < 0) ad = ad + 2 * Math.PI;
-
- // for markers
- var halfWay = new svg.Point(
- centp.x - rx * Math.cos((a1 + ad) / 2),
- centp.y - ry * Math.sin((a1 + ad) / 2)
- );
- pp.addMarkerAngle(halfWay, (a1 + ad) / 2 + (sweepFlag == 0 ? 1 : -1) * Math.PI / 2);
- pp.addMarkerAngle(cp, ad + (sweepFlag == 0 ? 1 : -1) * Math.PI / 2);
-
- bb.addPoint(cp.x, cp.y); // TODO: this is too naive, make it better
- if (ctx != null) {
- var r = rx > ry ? rx : ry;
- var sx = rx > ry ? 1 : rx / ry;
- var sy = rx > ry ? ry / rx : 1;
-
- ctx.translate(centp.x, centp.y);
- ctx.rotate(xAxisRotation);
- ctx.scale(sx, sy);
- ctx.arc(0, 0, r, a1, a1 + ad, 1 - sweepFlag);
- ctx.scale(1 / sx, 1 / sy);
- ctx.rotate(-xAxisRotation);
- ctx.translate(-centp.x, -centp.y);
- }
- }
- break;
- case 'Z':
- if (ctx != null) ctx.closePath();
- pp.current = pp.start;
- }
- }
-
- return bb;
- }
-
- this.getMarkers = function () {
- var points = this.PathParser.getMarkerPoints();
- var angles = this.PathParser.getMarkerAngles();
-
- var markers = [];
- for (var i = 0; i < points.length; i++) {
- markers.push([points[i], angles[i]]);
- }
- return markers;
- }
- }
- svg.Element.path.prototype = new svg.Element.PathElementBase;
-
- // pattern element
- svg.Element.pattern = function (node) {
- this.base = svg.Element.ElementBase;
- this.base(node);
-
- this.createPattern = function (ctx, element) {
- // render me using a temporary svg element
- var tempSvg = new svg.Element.svg();
- tempSvg.attributes['viewBox'] = new svg.Property('viewBox', this.attribute('viewBox').value);
- tempSvg.attributes['x'] = new svg.Property('x', this.attribute('x').value);
- tempSvg.attributes['y'] = new svg.Property('y', this.attribute('y').value);
- tempSvg.attributes['width'] = new svg.Property('width', this.attribute('width').value);
- tempSvg.attributes['height'] = new svg.Property('height', this.attribute('height').value);
- tempSvg.children = this.children;
-
- var c = document.createElement('canvas');
- c.width = this.attribute('width').Length.toPixels('x');
- c.height = this.attribute('height').Length.toPixels('y');
- tempSvg.render(c.getContext('2d'));
- return ctx.createPattern(c, 'repeat');
- }
- }
- svg.Element.pattern.prototype = new svg.Element.ElementBase;
-
- // marker element
- svg.Element.marker = function (node) {
- this.base = svg.Element.ElementBase;
- this.base(node);
-
- this.baseRender = this.render;
- this.render = function (ctx, point, angle) {
- ctx.translate(point.x, point.y);
- if (this.attribute('orient').valueOrDefault('auto') == 'auto') ctx.rotate(angle);
- if (this.attribute('markerUnits').valueOrDefault('strokeWidth') == 'strokeWidth') ctx.scale(ctx.lineWidth, ctx.lineWidth);
- ctx.save();
-
- // render me using a temporary svg element
- var tempSvg = new svg.Element.svg();
- tempSvg.attributes['viewBox'] = new svg.Property('viewBox', this.attribute('viewBox').value);
- tempSvg.attributes['refX'] = new svg.Property('refX', this.attribute('refX').value);
- tempSvg.attributes['refY'] = new svg.Property('refY', this.attribute('refY').value);
- tempSvg.attributes['width'] = new svg.Property('width', this.attribute('markerWidth').value);
- tempSvg.attributes['height'] = new svg.Property('height', this.attribute('markerHeight').value);
- tempSvg.attributes['fill'] = new svg.Property('fill', this.attribute('fill').valueOrDefault('black'));
- tempSvg.attributes['stroke'] = new svg.Property('stroke', this.attribute('stroke').valueOrDefault('none'));
- tempSvg.children = this.children;
- tempSvg.render(ctx);
-
- ctx.restore();
- if (this.attribute('markerUnits').valueOrDefault('strokeWidth') == 'strokeWidth') ctx.scale(1 / ctx.lineWidth, 1 / ctx.lineWidth);
- if (this.attribute('orient').valueOrDefault('auto') == 'auto') ctx.rotate(-angle);
- ctx.translate(-point.x, -point.y);
- }
- }
- svg.Element.marker.prototype = new svg.Element.ElementBase;
-
- // definitions element
- svg.Element.defs = function (node) {
- this.base = svg.Element.ElementBase;
- this.base(node);
-
- this.render = function (ctx) {
- // NOOP
- }
- }
- svg.Element.defs.prototype = new svg.Element.ElementBase;
-
- // base for gradients
- svg.Element.GradientBase = function (node) {
- this.base = svg.Element.ElementBase;
- this.base(node);
-
- this.gradientUnits = this.attribute('gradientUnits').valueOrDefault('objectBoundingBox');
-
- this.stops = [];
- for (var i = 0; i < this.children.length; i++) {
- var child = this.children[i];
- this.stops.push(child);
- }
-
- this.getGradient = function () {
- // OVERRIDE ME!
- }
-
- this.createGradient = function (ctx, element) {
- var stopsContainer = this;
- if (this.attribute('xlink:href').hasValue()) {
- stopsContainer = this.attribute('xlink:href').Definition.getDefinition();
- }
-
- var g = this.getGradient(ctx, element);
- for (var i = 0; i < stopsContainer.stops.length; i++) {
- g.addColorStop(stopsContainer.stops[i].offset, stopsContainer.stops[i].color);
- }
-
- if (this.attribute('gradientTransform').hasValue()) {
- // render as transformed pattern on temporary canvas
- var rootView = svg.ViewPort.viewPorts[0];
-
- var rect = new svg.Element.rect();
- rect.attributes['x'] = new svg.Property('x', -svg.MAX_VIRTUAL_PIXELS / 3.0);
- rect.attributes['y'] = new svg.Property('y', -svg.MAX_VIRTUAL_PIXELS / 3.0);
- rect.attributes['width'] = new svg.Property('width', svg.MAX_VIRTUAL_PIXELS);
- rect.attributes['height'] = new svg.Property('height', svg.MAX_VIRTUAL_PIXELS);
-
- var group = new svg.Element.g();
- group.attributes['transform'] = new svg.Property('transform', this.attribute('gradientTransform').value);
- group.children = [ rect ];
-
- var tempSvg = new svg.Element.svg();
- tempSvg.attributes['x'] = new svg.Property('x', 0);
- tempSvg.attributes['y'] = new svg.Property('y', 0);
- tempSvg.attributes['width'] = new svg.Property('width', rootView.width);
- tempSvg.attributes['height'] = new svg.Property('height', rootView.height);
- tempSvg.children = [ group ];
-
- var c = document.createElement('canvas');
- c.width = rootView.width;
- c.height = rootView.height;
- var tempCtx = c.getContext('2d');
- tempCtx.fillStyle = g;
- tempSvg.render(tempCtx);
- return tempCtx.createPattern(c, 'no-repeat');
- }
-
- return g;
- }
- }
- svg.Element.GradientBase.prototype = new svg.Element.ElementBase;
-
- // linear gradient element
- svg.Element.linearGradient = function (node) {
- this.base = svg.Element.GradientBase;
- this.base(node);
-
- this.getGradient = function (ctx, element) {
- var bb = element.getBoundingBox();
-
- var x1 = (this.gradientUnits == 'objectBoundingBox'
- ? bb.x() + bb.width() * this.attribute('x1').numValue()
- : this.attribute('x1').Length.toPixels('x'));
- var y1 = (this.gradientUnits == 'objectBoundingBox'
- ? bb.y() + bb.height() * this.attribute('y1').numValue()
- : this.attribute('y1').Length.toPixels('y'));
- var x2 = (this.gradientUnits == 'objectBoundingBox'
- ? bb.x() + bb.width() * this.attribute('x2').numValue()
- : this.attribute('x2').Length.toPixels('x'));
- var y2 = (this.gradientUnits == 'objectBoundingBox'
- ? bb.y() + bb.height() * this.attribute('y2').numValue()
- : this.attribute('y2').Length.toPixels('y'));
-
- return ctx.createLinearGradient(x1, y1, x2, y2);
- }
- }
- svg.Element.linearGradient.prototype = new svg.Element.GradientBase;
-
- // radial gradient element
- svg.Element.radialGradient = function (node) {
- this.base = svg.Element.GradientBase;
- this.base(node);
-
- this.getGradient = function (ctx, element) {
- var bb = element.getBoundingBox();
-
- var cx = (this.gradientUnits == 'objectBoundingBox'
- ? bb.x() + bb.width() * this.attribute('cx').numValue()
- : this.attribute('cx').Length.toPixels('x'));
- var cy = (this.gradientUnits == 'objectBoundingBox'
- ? bb.y() + bb.height() * this.attribute('cy').numValue()
- : this.attribute('cy').Length.toPixels('y'));
-
- var fx = cx;
- var fy = cy;
- if (this.attribute('fx').hasValue()) {
- fx = (this.gradientUnits == 'objectBoundingBox'
- ? bb.x() + bb.width() * this.attribute('fx').numValue()
- : this.attribute('fx').Length.toPixels('x'));
- }
- if (this.attribute('fy').hasValue()) {
- fy = (this.gradientUnits == 'objectBoundingBox'
- ? bb.y() + bb.height() * this.attribute('fy').numValue()
- : this.attribute('fy').Length.toPixels('y'));
- }
-
- var r = (this.gradientUnits == 'objectBoundingBox'
- ? (bb.width() + bb.height()) / 2.0 * this.attribute('r').numValue()
- : this.attribute('r').Length.toPixels());
-
- return ctx.createRadialGradient(fx, fy, 0, cx, cy, r);
- }
- }
- svg.Element.radialGradient.prototype = new svg.Element.GradientBase;
-
- // gradient stop element
- svg.Element.stop = function (node) {
- this.base = svg.Element.ElementBase;
- this.base(node);
-
- this.offset = this.attribute('offset').numValue();
-
- var stopColor = this.style('stop-color');
- if (this.style('stop-opacity').hasValue()) stopColor = stopColor.Color.addOpacity(this.style('stop-opacity').value);
- this.color = stopColor.value;
- }
- svg.Element.stop.prototype = new svg.Element.ElementBase;
-
- // animation base element
- svg.Element.AnimateBase = function (node) {
- this.base = svg.Element.ElementBase;
- this.base(node);
-
- svg.Animations.push(this);
-
- this.duration = 0.0;
- this.begin = this.attribute('begin').Time.toMilliseconds();
- this.maxDuration = this.begin + this.attribute('dur').Time.toMilliseconds();
-
- this.getProperty = function () {
- var attributeType = this.attribute('attributeType').value;
- var attributeName = this.attribute('attributeName').value;
-
- if (attributeType == 'CSS') {
- return this.parent.style(attributeName, true);
- }
- return this.parent.attribute(attributeName, true);
- };
-
- this.initialValue = null;
- this.removed = false;
-
- this.calcValue = function () {
- // OVERRIDE ME!
- return '';
- }
-
- this.update = function (delta) {
- // set initial value
- if (this.initialValue == null) {
- this.initialValue = this.getProperty().value;
- }
-
- // if we're past the end time
- if (this.duration > this.maxDuration) {
- // loop for indefinitely repeating animations
- if (this.attribute('repeatCount').value == 'indefinite') {
- this.duration = 0.0
- }
- else if (this.attribute('fill').valueOrDefault('remove') == 'remove' && !this.removed) {
- this.removed = true;
- this.getProperty().value = this.initialValue;
- return true;
- }
- else {
- return false; // no updates made
- }
- }
- this.duration = this.duration + delta;
-
- // if we're past the begin time
- var updated = false;
- if (this.begin < this.duration) {
- var newValue = this.calcValue(); // tween
-
- if (this.attribute('type').hasValue()) {
- // for transform, etc.
- var type = this.attribute('type').value;
- newValue = type + '(' + newValue + ')';
- }
-
- this.getProperty().value = newValue;
- updated = true;
- }
-
- return updated;
- }
-
- // fraction of duration we've covered
- this.progress = function () {
- return ((this.duration - this.begin) / (this.maxDuration - this.begin));
- }
- }
- svg.Element.AnimateBase.prototype = new svg.Element.ElementBase;
-
- // animate element
- svg.Element.animate = function (node) {
- this.base = svg.Element.AnimateBase;
- this.base(node);
-
- this.calcValue = function () {
- var from = this.attribute('from').numValue();
- var to = this.attribute('to').numValue();
-
- // tween value linearly
- return from + (to - from) * this.progress();
- };
- }
- svg.Element.animate.prototype = new svg.Element.AnimateBase;
-
- // animate color element
- svg.Element.animateColor = function (node) {
- this.base = svg.Element.AnimateBase;
- this.base(node);
-
- this.calcValue = function () {
- var from = new RGBColor(this.attribute('from').value);
- var to = new RGBColor(this.attribute('to').value);
-
- if (from.ok && to.ok) {
- // tween color linearly
- var r = from.r + (to.r - from.r) * this.progress();
- var g = from.g + (to.g - from.g) * this.progress();
- var b = from.b + (to.b - from.b) * this.progress();
- return 'rgb(' + parseInt(r, 10) + ',' + parseInt(g, 10) + ',' + parseInt(b, 10) + ')';
- }
- return this.attribute('from').value;
- };
- }
- svg.Element.animateColor.prototype = new svg.Element.AnimateBase;
-
- // animate transform element
- svg.Element.animateTransform = function (node) {
- this.base = svg.Element.animate;
- this.base(node);
- }
- svg.Element.animateTransform.prototype = new svg.Element.animate;
-
- // font element
- svg.Element.font = function (node) {
- this.base = svg.Element.ElementBase;
- this.base(node);
-
- this.horizAdvX = this.attribute('horiz-adv-x').numValue();
-
- this.isRTL = false;
- this.isArabic = false;
- this.fontFace = null;
- this.missingGlyph = null;
- this.glyphs = [];
- for (var i = 0; i < this.children.length; i++) {
- var child = this.children[i];
- if (child.type == 'font-face') {
- this.fontFace = child;
- if (child.style('font-family').hasValue()) {
- svg.Definitions[child.style('font-family').value] = this;
- }
- }
- else if (child.type == 'missing-glyph') this.missingGlyph = child;
- else if (child.type == 'glyph') {
- if (child.arabicForm != '') {
- this.isRTL = true;
- this.isArabic = true;
- if (typeof(this.glyphs[child.unicode]) == 'undefined') this.glyphs[child.unicode] = [];
- this.glyphs[child.unicode][child.arabicForm] = child;
- }
- else {
- this.glyphs[child.unicode] = child;
- }
- }
- }
- }
- svg.Element.font.prototype = new svg.Element.ElementBase;
-
- // font-face element
- svg.Element.fontface = function (node) {
- this.base = svg.Element.ElementBase;
- this.base(node);
-
- this.ascent = this.attribute('ascent').value;
- this.descent = this.attribute('descent').value;
- this.unitsPerEm = this.attribute('units-per-em').numValue();
- }
- svg.Element.fontface.prototype = new svg.Element.ElementBase;
-
- // missing-glyph element
- svg.Element.missingglyph = function (node) {
- this.base = svg.Element.path;
- this.base(node);
-
- this.horizAdvX = 0;
- }
- svg.Element.missingglyph.prototype = new svg.Element.path;
-
- // glyph element
- svg.Element.glyph = function (node) {
- this.base = svg.Element.path;
- this.base(node);
-
- this.horizAdvX = this.attribute('horiz-adv-x').numValue();
- this.unicode = this.attribute('unicode').value;
- this.arabicForm = this.attribute('arabic-form').value;
- }
- svg.Element.glyph.prototype = new svg.Element.path;
-
- // text element
- svg.Element.text = function (node) {
- this.base = svg.Element.RenderedElementBase;
- this.base(node);
-
- if (node != null) {
- // add children
- this.children = [];
- for (var i = 0; i < node.childNodes.length; i++) {
- var childNode = node.childNodes[i];
- if (childNode.nodeType == 1) { // capture tspan and tref nodes
- this.addChild(childNode, true);
- }
- else if (childNode.nodeType == 3) { // capture text
- this.addChild(new svg.Element.tspan(childNode), false);
- }
- }
- }
-
- this.baseSetContext = this.setContext;
- this.setContext = function (ctx) {
- this.baseSetContext(ctx);
- if (this.style('dominant-baseline').hasValue()) ctx.textBaseline = this.style('dominant-baseline').value;
- if (this.style('alignment-baseline').hasValue()) ctx.textBaseline = this.style('alignment-baseline').value;
- }
-
- this.renderChildren = function (ctx) {
- var textAnchor = this.style('text-anchor').valueOrDefault('start');
- var x = this.attribute('x').Length.toPixels('x');
- var y = this.attribute('y').Length.toPixels('y');
- for (var i = 0; i < this.children.length; i++) {
- var child = this.children[i];
-
- if (child.attribute('x').hasValue()) {
- child.x = child.attribute('x').Length.toPixels('x');
- }
- else {
- if (child.attribute('dx').hasValue()) x += child.attribute('dx').Length.toPixels('x');
- child.x = x;
- }
-
- var childLength = child.measureText(ctx);
- if (textAnchor != 'start' && (i == 0 || child.attribute('x').hasValue())) { // new group?
- // loop through rest of children
- var groupLength = childLength;
- for (var j = i + 1; j < this.children.length; j++) {
- var childInGroup = this.children[j];
- if (childInGroup.attribute('x').hasValue()) break; // new group
- groupLength += childInGroup.measureText(ctx);
- }
- child.x -= (textAnchor == 'end' ? groupLength : groupLength / 2.0);
- }
- x = child.x + childLength;
-
- if (child.attribute('y').hasValue()) {
- child.y = child.attribute('y').Length.toPixels('y');
- }
- else {
- if (child.attribute('dy').hasValue()) y += child.attribute('dy').Length.toPixels('y');
- child.y = y;
- }
- y = child.y;
-
- child.render(ctx);
- }
- }
- }
- svg.Element.text.prototype = new svg.Element.RenderedElementBase;
-
- // text base
- svg.Element.TextElementBase = function (node) {
- this.base = svg.Element.RenderedElementBase;
- this.base(node);
-
- this.getGlyph = function (font, text, i) {
- var c = text[i];
- var glyph = null;
- if (font.isArabic) {
- var arabicForm = 'isolated';
- if ((i == 0 || text[i - 1] == ' ') && i < text.length - 2 && text[i + 1] != ' ') arabicForm = 'terminal';
- if (i > 0 && text[i - 1] != ' ' && i < text.length - 2 && text[i + 1] != ' ') arabicForm = 'medial';
- if (i > 0 && text[i - 1] != ' ' && (i == text.length - 1 || text[i + 1] == ' ')) arabicForm = 'initial';
- if (typeof(font.glyphs[c]) != 'undefined') {
- glyph = font.glyphs[c][arabicForm];
- if (glyph == null && font.glyphs[c].type == 'glyph') glyph = font.glyphs[c];
- }
- }
- else {
- glyph = font.glyphs[c];
- }
- if (glyph == null) glyph = font.missingGlyph;
- return glyph;
- }
-
- this.renderChildren = function (ctx) {
- var customFont = this.parent.style('font-family').Definition.getDefinition();
- if (customFont != null) {
- var fontSize = this.parent.style('font-size').numValueOrDefault(svg.Font.Parse(svg.ctx.font).fontSize);
- var fontStyle = this.parent.style('font-style').valueOrDefault(svg.Font.Parse(svg.ctx.font).fontStyle);
- var text = this.getText();
- if (customFont.isRTL) text = text.split("").reverse().join("");
-
- var dx = svg.ToNumberArray(this.parent.attribute('dx').value);
- for (var i = 0; i < text.length; i++) {
- var glyph = this.getGlyph(customFont, text, i);
- var scale = fontSize / customFont.fontFace.unitsPerEm;
- ctx.translate(this.x, this.y);
- ctx.scale(scale, -scale);
- var lw = ctx.lineWidth;
- ctx.lineWidth = ctx.lineWidth * customFont.fontFace.unitsPerEm / fontSize;
- if (fontStyle == 'italic') ctx.transform(1, 0, .4, 1, 0, 0);
- glyph.render(ctx);
- if (fontStyle == 'italic') ctx.transform(1, 0, -.4, 1, 0, 0);
- ctx.lineWidth = lw;
- ctx.scale(1 / scale, -1 / scale);
- ctx.translate(-this.x, -this.y);
-
- this.x += fontSize * (glyph.horizAdvX || customFont.horizAdvX) / customFont.fontFace.unitsPerEm;
- if (typeof(dx[i]) != 'undefined' && !isNaN(dx[i])) {
- this.x += dx[i];
- }
- }
- return;
- }
-
- if (ctx.strokeStyle != '') ctx.strokeText(svg.compressSpaces(this.getText()), this.x, this.y);
- if (ctx.fillStyle != '') ctx.fillText(svg.compressSpaces(this.getText()), this.x, this.y);
- }
-
- this.getText = function () {
- // OVERRIDE ME
- }
-
- this.measureText = function (ctx) {
- var customFont = this.parent.style('font-family').Definition.getDefinition();
- if (customFont != null) {
- var fontSize = this.parent.style('font-size').numValueOrDefault(svg.Font.Parse(svg.ctx.font).fontSize);
- var measure = 0;
- var text = this.getText();
- if (customFont.isRTL) text = text.split("").reverse().join("");
- var dx = svg.ToNumberArray(this.parent.attribute('dx').value);
- for (var i = 0; i < text.length; i++) {
- var glyph = this.getGlyph(customFont, text, i);
- measure += (glyph.horizAdvX || customFont.horizAdvX) * fontSize / customFont.fontFace.unitsPerEm;
- if (typeof(dx[i]) != 'undefined' && !isNaN(dx[i])) {
- measure += dx[i];
- }
- }
- return measure;
- }
-
- var textToMeasure = svg.compressSpaces(this.getText());
- if (!ctx.measureText) return textToMeasure.length * 10;
-
- ctx.save();
- this.setContext(ctx);
- var width = ctx.measureText(textToMeasure).width;
- ctx.restore();
- return width;
- }
- }
- svg.Element.TextElementBase.prototype = new svg.Element.RenderedElementBase;
-
- // tspan
- svg.Element.tspan = function (node) {
- this.base = svg.Element.TextElementBase;
- this.base(node);
-
- this.text = node.nodeType == 3 ? node.nodeValue : // text
- node.childNodes.length > 0 ? node.childNodes[0].nodeValue : // element
- node.text;
- this.getText = function () {
- return this.text;
- }
- }
- svg.Element.tspan.prototype = new svg.Element.TextElementBase;
-
- // tref
- svg.Element.tref = function (node) {
- this.base = svg.Element.TextElementBase;
- this.base(node);
-
- this.getText = function () {
- var element = this.attribute('xlink:href').Definition.getDefinition();
- if (element != null) return element.children[0].getText();
- }
- }
- svg.Element.tref.prototype = new svg.Element.TextElementBase;
-
- // a element
- svg.Element.a = function (node) {
- this.base = svg.Element.TextElementBase;
- this.base(node);
-
- this.hasText = true;
- for (var i = 0; i < node.childNodes.length; i++) {
- if (node.childNodes[i].nodeType != 3) this.hasText = false;
- }
-
- // this might contain text
- this.text = this.hasText ? node.childNodes[0].nodeValue : '';
- this.getText = function () {
- return this.text;
- }
-
- this.baseRenderChildren = this.renderChildren;
- this.renderChildren = function (ctx) {
- if (this.hasText) {
- // render as text element
- this.baseRenderChildren(ctx);
- var fontSize = new svg.Property('fontSize', svg.Font.Parse(svg.ctx.font).fontSize);
- svg.Mouse.checkBoundingBox(this, new svg.BoundingBox(this.x, this.y - fontSize.Length.toPixels('y'), this.x + this.measureText(ctx), this.y));
- }
- else {
- // render as temporary group
- var g = new svg.Element.g();
- g.children = this.children;
- g.parent = this;
- g.render(ctx);
- }
- }
-
- this.onclick = function () {
- window.open(this.attribute('xlink:href').value);
- }
-
- this.onmousemove = function () {
- svg.ctx.canvas.style.cursor = 'pointer';
- }
- }
- svg.Element.a.prototype = new svg.Element.TextElementBase;
-
- // image element
- svg.Element.image = function (node) {
- this.base = svg.Element.RenderedElementBase;
- this.base(node);
-
- svg.Images.push(this);
- this.img = document.createElement('img');
- this.loaded = false;
- var that = this;
- this.img.onload = function () {
- that.loaded = true;
- }
- this.img.src = this.attribute('xlink:href').value;
-
- this.renderChildren = function (ctx) {
- var x = this.attribute('x').Length.toPixels('x');
- var y = this.attribute('y').Length.toPixels('y');
-
- var width = this.attribute('width').Length.toPixels('x');
- var height = this.attribute('height').Length.toPixels('y');
- if (width == 0 || height == 0) return;
-
- ctx.save();
- ctx.translate(x, y);
- svg.AspectRatio(ctx,
- this.attribute('preserveAspectRatio').value,
- width,
- this.img.width,
- height,
- this.img.height,
- 0,
- 0);
- ctx.drawImage(this.img, 0, 0);
- ctx.restore();
- }
- }
- svg.Element.image.prototype = new svg.Element.RenderedElementBase;
-
- // group element
- svg.Element.g = function (node) {
- this.base = svg.Element.RenderedElementBase;
- this.base(node);
-
- this.getBoundingBox = function () {
- var bb = new svg.BoundingBox();
- for (var i = 0; i < this.children.length; i++) {
- bb.addBoundingBox(this.children[i].getBoundingBox());
- }
- return bb;
- };
- }
- svg.Element.g.prototype = new svg.Element.RenderedElementBase;
-
- // symbol element
- svg.Element.symbol = function (node) {
- this.base = svg.Element.RenderedElementBase;
- this.base(node);
-
- this.baseSetContext = this.setContext;
- this.setContext = function (ctx) {
- this.baseSetContext(ctx);
-
- // viewbox
- if (this.attribute('viewBox').hasValue()) {
- var viewBox = svg.ToNumberArray(this.attribute('viewBox').value);
- var minX = viewBox[0];
- var minY = viewBox[1];
- width = viewBox[2];
- height = viewBox[3];
-
- svg.AspectRatio(ctx,
- this.attribute('preserveAspectRatio').value,
- this.attribute('width').Length.toPixels('x'),
- width,
- this.attribute('height').Length.toPixels('y'),
- height,
- minX,
- minY);
-
- svg.ViewPort.SetCurrent(viewBox[2], viewBox[3]);
- }
- }
- }
- svg.Element.symbol.prototype = new svg.Element.RenderedElementBase;
-
- // style element
- svg.Element.style = function (node) {
- this.base = svg.Element.ElementBase;
- this.base(node);
-
- // text, or spaces then CDATA
- var css = node.childNodes[0].nodeValue + (node.childNodes.length > 1 ? node.childNodes[1].nodeValue : '');
- css = css.replace(/(\/\*([^*]|[\r\n]|(\*+([^*\/]|[\r\n])))*\*+\/)|(^[\s]*\/\/.*)/gm, ''); // remove comments
- css = svg.compressSpaces(css); // replace whitespace
- var cssDefs = css.split('}');
- for (var i = 0; i < cssDefs.length; i++) {
- if (svg.trim(cssDefs[i]) != '') {
- var cssDef = cssDefs[i].split('{');
- var cssClasses = cssDef[0].split(',');
- var cssProps = cssDef[1].split(';');
- for (var j = 0; j < cssClasses.length; j++) {
- var cssClass = svg.trim(cssClasses[j]);
- if (cssClass != '') {
- var props = {};
- for (var k = 0; k < cssProps.length; k++) {
- var prop = cssProps[k].indexOf(':');
- var name = cssProps[k].substr(0, prop);
- var value = cssProps[k].substr(prop + 1, cssProps[k].length - prop);
- if (name != null && value != null) {
- props[svg.trim(name)] = new svg.Property(svg.trim(name), svg.trim(value));
- }
- }
- svg.Styles[cssClass] = props;
- if (cssClass == '@font-face') {
- var fontFamily = props['font-family'].value.replace(/"/g, '');
- var srcs = props['src'].value.split(',');
- for (var s = 0; s < srcs.length; s++) {
- if (srcs[s].indexOf('format("svg")') > 0) {
- var urlStart = srcs[s].indexOf('url');
- var urlEnd = srcs[s].indexOf(')', urlStart);
- var url = srcs[s].substr(urlStart + 5, urlEnd - urlStart - 6);
- var doc = svg.parseXml(svg.ajax(url));
- var fonts = doc.getElementsByTagName('font');
- for (var f = 0; f < fonts.length; f++) {
- var font = svg.CreateElement(fonts[f]);
- svg.Definitions[fontFamily] = font;
- }
- }
- }
- }
- }
- }
- }
- }
- }
- svg.Element.style.prototype = new svg.Element.ElementBase;
-
- // use element
- svg.Element.use = function (node) {
- this.base = svg.Element.RenderedElementBase;
- this.base(node);
-
- this.baseSetContext = this.setContext;
- this.setContext = function (ctx) {
- this.baseSetContext(ctx);
- if (this.attribute('x').hasValue()) ctx.translate(this.attribute('x').Length.toPixels('x'), 0);
- if (this.attribute('y').hasValue()) ctx.translate(0, this.attribute('y').Length.toPixels('y'));
- }
-
- this.getDefinition = function () {
- var element = this.attribute('xlink:href').Definition.getDefinition();
- if (this.attribute('width').hasValue()) element.attribute('width', true).value = this.attribute('width').value;
- if (this.attribute('height').hasValue()) element.attribute('height', true).value = this.attribute('height').value;
- return element;
- }
-
- this.path = function (ctx) {
- var element = this.getDefinition();
- if (element != null) element.path(ctx);
- }
-
- this.renderChildren = function (ctx) {
- var element = this.getDefinition();
- if (element != null) element.render(ctx);
- }
- }
- svg.Element.use.prototype = new svg.Element.RenderedElementBase;
-
- // mask element
- svg.Element.mask = function (node) {
- this.base = svg.Element.ElementBase;
- this.base(node);
-
- this.apply = function (ctx, element) {
- // render as temp svg
- var x = this.attribute('x').Length.toPixels('x');
- var y = this.attribute('y').Length.toPixels('y');
- var width = this.attribute('width').Length.toPixels('x');
- var height = this.attribute('height').Length.toPixels('y');
-
- // temporarily remove mask to avoid recursion
- var mask = element.attribute('mask').value;
- element.attribute('mask').value = '';
-
- var cMask = document.createElement('canvas');
- cMask.width = x + width;
- cMask.height = y + height;
- var maskCtx = cMask.getContext('2d');
- this.renderChildren(maskCtx);
-
- var c = document.createElement('canvas');
- c.width = x + width;
- c.height = y + height;
- var tempCtx = c.getContext('2d');
- element.render(tempCtx);
- tempCtx.globalCompositeOperation = 'destination-in';
- tempCtx.fillStyle = maskCtx.createPattern(cMask, 'no-repeat');
- tempCtx.fillRect(0, 0, x + width, y + height);
-
- ctx.fillStyle = tempCtx.createPattern(c, 'no-repeat');
- ctx.fillRect(0, 0, x + width, y + height);
-
- // reassign mask
- element.attribute('mask').value = mask;
- }
-
- this.render = function (ctx) {
- // NO RENDER
- }
- }
- svg.Element.mask.prototype = new svg.Element.ElementBase;
-
- // clip element
- svg.Element.clipPath = function (node) {
- this.base = svg.Element.ElementBase;
- this.base(node);
-
- this.apply = function (ctx) {
- for (var i = 0; i < this.children.length; i++) {
- if (this.children[i].path) {
- this.children[i].path(ctx);
- ctx.clip();
- }
- }
- }
-
- this.render = function (ctx) {
- // NO RENDER
- }
- }
- svg.Element.clipPath.prototype = new svg.Element.ElementBase;
-
- // filters
- svg.Element.filter = function (node) {
- this.base = svg.Element.ElementBase;
- this.base(node);
-
- this.apply = function (ctx, element) {
- // render as temp svg
- var bb = element.getBoundingBox();
- var x = this.attribute('x').Length.toPixels('x');
- var y = this.attribute('y').Length.toPixels('y');
- if (x == 0 || y == 0) {
- x = bb.x1;
- y = bb.y1;
- }
- var width = this.attribute('width').Length.toPixels('x');
- var height = this.attribute('height').Length.toPixels('y');
- if (width == 0 || height == 0) {
- width = bb.width();
- height = bb.height();
- }
-
- // temporarily remove filter to avoid recursion
- var filter = element.style('filter').value;
- element.style('filter').value = '';
-
- // max filter distance
- var extraPercent = .20;
- var px = extraPercent * width;
- var py = extraPercent * height;
-
- var c = document.createElement('canvas');
- c.width = width + 2 * px;
- c.height = height + 2 * py;
- var tempCtx = c.getContext('2d');
- tempCtx.translate(-x + px, -y + py);
- element.render(tempCtx);
-
- // apply filters
- for (var i = 0; i < this.children.length; i++) {
- this.children[i].apply(tempCtx, 0, 0, width + 2 * px, height + 2 * py);
- }
-
- // render on me
- ctx.drawImage(c, 0, 0, width + 2 * px, height + 2 * py, x - px, y - py, width + 2 * px, height + 2 * py);
-
- // reassign filter
- element.style('filter', true).value = filter;
- }
-
- this.render = function (ctx) {
- // NO RENDER
- }
- }
- svg.Element.filter.prototype = new svg.Element.ElementBase;
-
- svg.Element.feGaussianBlur = function (node) {
- this.base = svg.Element.ElementBase;
- this.base(node);
-
- function make_fgauss(sigma) {
- sigma = Math.max(sigma, 0.01);
- var len = Math.ceil(sigma * 4.0) + 1;
- mask = [];
- for (var i = 0; i < len; i++) {
- mask[i] = Math.exp(-0.5 * (i / sigma) * (i / sigma));
- }
- return mask;
- }
-
- function normalize(mask) {
- var sum = 0;
- for (var i = 1; i < mask.length; i++) {
- sum += Math.abs(mask[i]);
- }
- sum = 2 * sum + Math.abs(mask[0]);
- for (var i = 0; i < mask.length; i++) {
- mask[i] /= sum;
- }
- return mask;
- }
-
- function convolve_even(src, dst, mask, width, height) {
- for (var y = 0; y < height; y++) {
- for (var x = 0; x < width; x++) {
- var a = imGet(src, x, y, width, height, 3) / 255;
- for (var rgba = 0; rgba < 4; rgba++) {
- var sum = mask[0] * (a == 0 ? 255 : imGet(src, x, y, width, height, rgba)) * (a == 0 || rgba == 3 ? 1 : a);
- for (var i = 1; i < mask.length; i++) {
- var a1 = imGet(src, Math.max(x - i, 0), y, width, height, 3) / 255;
- var a2 = imGet(src, Math.min(x + i, width - 1), y, width, height, 3) / 255;
- sum += mask[i] *
- ((a1 == 0 ? 255 : imGet(src, Math.max(x - i, 0), y, width, height, rgba)) * (a1 == 0 || rgba == 3 ? 1 : a1) +
- (a2 == 0 ? 255 : imGet(src, Math.min(x + i, width - 1), y, width, height, rgba)) * (a2 == 0 || rgba == 3 ? 1 : a2));
- }
- imSet(dst, y, x, height, width, rgba, sum);
- }
- }
- }
- }
-
- function imGet(img, x, y, width, height, rgba) {
- return img[y * width * 4 + x * 4 + rgba];
- }
-
- function imSet(img, x, y, width, height, rgba, val) {
- img[y * width * 4 + x * 4 + rgba] = val;
- }
-
- function blur(ctx, width, height, sigma) {
- var srcData = ctx.getImageData(0, 0, width, height);
- var mask = make_fgauss(sigma);
- mask = normalize(mask);
- tmp = [];
- convolve_even(srcData.data, tmp, mask, width, height);
- convolve_even(tmp, srcData.data, mask, height, width);
- ctx.clearRect(0, 0, width, height);
- ctx.putImageData(srcData, 0, 0);
- }
-
- this.apply = function (ctx, x, y, width, height) {
- // assuming x==0 && y==0 for now
- blur(ctx, width, height, this.attribute('stdDeviation').numValue());
- }
- }
- svg.Element.filter.prototype = new svg.Element.feGaussianBlur;
-
- // title element, do nothing
- svg.Element.title = function (node) {
- }
- svg.Element.title.prototype = new svg.Element.ElementBase;
-
- // desc element, do nothing
- svg.Element.desc = function (node) {
- }
- svg.Element.desc.prototype = new svg.Element.ElementBase;
-
- svg.Element.MISSING = function (node) {
- console.log('ERROR: Element \'' + node.nodeName + '\' not yet implemented.');
- }
- svg.Element.MISSING.prototype = new svg.Element.ElementBase;
-
- // element factory
- svg.CreateElement = function (node) {
- var className = node.nodeName.replace(/^[^:]+:/, ''); // remove namespace
- className = className.replace(/\-/g, ''); // remove dashes
- var e = null;
- if (typeof(svg.Element[className]) != 'undefined') {
- e = new svg.Element[className](node);
- }
- else {
- e = new svg.Element.MISSING(node);
- }
-
- e.type = node.nodeName;
- return e;
- }
-
- // load from url
- svg.load = function (ctx, url) {
- svg.loadXml(ctx, svg.ajax(url));
- }
-
- // load from xml
- svg.loadXml = function (ctx, xml) {
- svg.loadXmlDoc(ctx, svg.parseXml(xml));
- }
-
- svg.loadXmlDoc = function (ctx, dom) {
- svg.init(ctx);
-
- var mapXY = function (p) {
- var e = ctx.canvas;
- while (e) {
- p.x -= e.offsetLeft;
- p.y -= e.offsetTop;
- e = e.offsetParent;
- }
- if (window.scrollX) p.x += window.scrollX;
- if (window.scrollY) p.y += window.scrollY;
- return p;
- }
-
- // bind mouse
- if (svg.opts['ignoreMouse'] != true) {
- ctx.canvas.onclick = function (e) {
- var p = mapXY(new svg.Point(e != null ? e.clientX : event.clientX, e != null ? e.clientY : event.clientY));
- svg.Mouse.onclick(p.x, p.y);
- };
- ctx.canvas.onmousemove = function (e) {
- var p = mapXY(new svg.Point(e != null ? e.clientX : event.clientX, e != null ? e.clientY : event.clientY));
- svg.Mouse.onmousemove(p.x, p.y);
- };
- }
-
- var e = svg.CreateElement(dom.documentElement);
- e.root = true;
-
- // render loop
- var isFirstRender = true;
- var draw = function () {
- svg.ViewPort.Clear();
- if (ctx.canvas.parentNode) svg.ViewPort.SetCurrent(ctx.canvas.parentNode.clientWidth, ctx.canvas.parentNode.clientHeight);
-
- if (svg.opts['ignoreDimensions'] != true) {
- // set canvas size
- if (e.style('width').hasValue()) {
- ctx.canvas.width = e.style('width').Length.toPixels('x');
- ctx.canvas.style.width = ctx.canvas.width + 'px';
- }
- if (e.style('height').hasValue()) {
- ctx.canvas.height = e.style('height').Length.toPixels('y');
- ctx.canvas.style.height = ctx.canvas.height + 'px';
- }
- }
- var cWidth = ctx.canvas.clientWidth || ctx.canvas.width;
- var cHeight = ctx.canvas.clientHeight || ctx.canvas.height;
- svg.ViewPort.SetCurrent(cWidth, cHeight);
-
- if (svg.opts != null && svg.opts['offsetX'] != null) e.attribute('x', true).value = svg.opts['offsetX'];
- if (svg.opts != null && svg.opts['offsetY'] != null) e.attribute('y', true).value = svg.opts['offsetY'];
- if (svg.opts != null && svg.opts['scaleWidth'] != null && svg.opts['scaleHeight'] != null) {
- var xRatio = 1, yRatio = 1;
- if (e.attribute('width').hasValue()) xRatio = e.attribute('width').Length.toPixels('x') / svg.opts['scaleWidth'];
- if (e.attribute('height').hasValue()) yRatio = e.attribute('height').Length.toPixels('y') / svg.opts['scaleHeight'];
-
- e.attribute('width', true).value = svg.opts['scaleWidth'];
- e.attribute('height', true).value = svg.opts['scaleHeight'];
- e.attribute('viewBox', true).value = '0 0 ' + (cWidth * xRatio) + ' ' + (cHeight * yRatio);
- e.attribute('preserveAspectRatio', true).value = 'none';
- }
-
- // clear and render
- if (svg.opts['ignoreClear'] != true) {
- ctx.clearRect(0, 0, cWidth, cHeight);
- }
- e.render(ctx);
- if (isFirstRender) {
- isFirstRender = false;
- if (svg.opts != null && typeof(svg.opts['renderCallback']) == 'function') svg.opts['renderCallback']();
- }
- }
-
- var waitingForImages = true;
- if (svg.ImagesLoaded()) {
- waitingForImages = false;
- draw();
- }
- svg.intervalID = setInterval(function () {
- var needUpdate = false;
-
- if (waitingForImages && svg.ImagesLoaded()) {
- waitingForImages = false;
- needUpdate = true;
- }
-
- // need update from mouse events?
- if (svg.opts['ignoreMouse'] != true) {
- needUpdate = needUpdate | svg.Mouse.hasEvents();
- }
-
- // need update from animations?
- if (svg.opts['ignoreAnimation'] != true) {
- for (var i = 0; i < svg.Animations.length; i++) {
- needUpdate = needUpdate | svg.Animations[i].update(1000 / svg.FRAMERATE);
- }
- }
-
- // need update from redraw?
- if (svg.opts != null && typeof(svg.opts['forceRedraw']) == 'function') {
- if (svg.opts['forceRedraw']() == true) needUpdate = true;
- }
-
- // render if needed
- if (needUpdate) {
- draw();
- svg.Mouse.runEvents(); // run and clear our events
- }
- }, 1000 / svg.FRAMERATE);
- }
-
- svg.stop = function () {
- if (svg.intervalID) {
- clearInterval(svg.intervalID);
- }
- }
-
- svg.Mouse = new (function () {
- this.events = [];
- this.hasEvents = function () {
- return this.events.length != 0;
- }
-
- this.onclick = function (x, y) {
- this.events.push({ type: 'onclick', x: x, y: y,
- run: function (e) {
- if (e.onclick) e.onclick();
- }
- });
- }
-
- this.onmousemove = function (x, y) {
- this.events.push({ type: 'onmousemove', x: x, y: y,
- run: function (e) {
- if (e.onmousemove) e.onmousemove();
- }
- });
- }
-
- this.eventElements = [];
-
- this.checkPath = function (element, ctx) {
- for (var i = 0; i < this.events.length; i++) {
- var e = this.events[i];
- if (ctx.isPointInPath && ctx.isPointInPath(e.x, e.y)) this.eventElements[i] = element;
- }
- }
-
- this.checkBoundingBox = function (element, bb) {
- for (var i = 0; i < this.events.length; i++) {
- var e = this.events[i];
- if (bb.isPointInBox(e.x, e.y)) this.eventElements[i] = element;
- }
- }
-
- this.runEvents = function () {
- svg.ctx.canvas.style.cursor = '';
-
- for (var i = 0; i < this.events.length; i++) {
- var e = this.events[i];
- var element = this.eventElements[i];
- while (element) {
- e.run(element);
- element = element.parent;
- }
- }
-
- // done running, clear
- this.events = [];
- this.eventElements = [];
- }
- });
-
- return svg;
- }
-})();
-
-if (CanvasRenderingContext2D) {
- CanvasRenderingContext2D.prototype.drawSvg = function (s, dx, dy, dw, dh) {
- canvg(this.canvas, s, {
- ignoreMouse: true,
- ignoreAnimation: true,
- ignoreDimensions: true,
- ignoreClear: true,
- offsetX: dx,
- offsetY: dy,
- scaleWidth: dw,
- scaleHeight: dh
- });
- }
-}
-/**
- * @license Highcharts JS v2.2.5 (2012-06-08)
- * CanVGRenderer Extension module
- *
- * (c) 2011-2012 Torstein Hønsi, Erik Olsson
- *
- * License: www.highcharts.com/license
- */
-
-// JSLint options:
-/*global Highcharts */
-
-(function (Highcharts) { // encapsulate
- var UNDEFINED,
- DIV = 'div',
- ABSOLUTE = 'absolute',
- RELATIVE = 'relative',
- HIDDEN = 'hidden',
- VISIBLE = 'visible',
- PX = 'px',
- css = Highcharts.css,
- CanVGRenderer = Highcharts.CanVGRenderer,
- SVGRenderer = Highcharts.SVGRenderer,
- extend = Highcharts.extend,
- merge = Highcharts.merge,
- addEvent = Highcharts.addEvent,
- createElement = Highcharts.createElement,
- discardElement = Highcharts.discardElement;
-
- // Extend CanVG renderer on demand, inherit from SVGRenderer
- extend(CanVGRenderer.prototype, SVGRenderer.prototype);
-
- // Add additional functionality:
- extend(CanVGRenderer.prototype, {
- create: function (chart, container, chartWidth, chartHeight) {
- this.setContainer(container, chartWidth, chartHeight);
- this.configure(chart);
- },
- setContainer: function (container, chartWidth, chartHeight) {
- var containerStyle = container.style,
- containerParent = container.parentNode,
- containerLeft = containerStyle.left,
- containerTop = containerStyle.top,
- containerOffsetWidth = container.offsetWidth,
- containerOffsetHeight = container.offsetHeight,
- canvas,
- initialHiddenStyle = { visibility: HIDDEN, position: ABSOLUTE };
-
- this.init.apply(this, [container, chartWidth, chartHeight]);
-
- // add the canvas above it
- canvas = createElement('canvas', {
- width: containerOffsetWidth,
- height: containerOffsetHeight
- }, {
- position: RELATIVE,
- left: containerLeft,
- top: containerTop
- }, container);
- this.canvas = canvas;
-
- // Create the tooltip line and div, they are placed as siblings to
- // the container (and as direct childs to the div specified in the html page)
- this.ttLine = createElement(DIV, null, initialHiddenStyle, containerParent);
- this.ttDiv = createElement(DIV, null, initialHiddenStyle, containerParent);
- this.ttTimer = UNDEFINED;
-
- // Move away the svg node to a new div inside the container's parent so we can hide it.
- var hiddenSvg = createElement(DIV, {
- width: containerOffsetWidth,
- height: containerOffsetHeight
- }, {
- visibility: HIDDEN,
- left: containerLeft,
- top: containerTop
- }, containerParent);
- this.hiddenSvg = hiddenSvg;
- hiddenSvg.appendChild(this.box);
- },
-
- /**
- * Configures the renderer with the chart. Attach a listener to the event tooltipRefresh.
- **/
- configure: function (chart) {
- var renderer = this,
- options = chart.options.tooltip,
- borderWidth = options.borderWidth,
- tooltipDiv = renderer.ttDiv,
- tooltipDivStyle = options.style,
- tooltipLine = renderer.ttLine,
- padding = parseInt(tooltipDivStyle.padding, 10);
-
- // Add border styling from options to the style
- tooltipDivStyle = merge(tooltipDivStyle, {
- padding: padding + PX,
- 'background-color': options.backgroundColor,
- 'border-style': 'solid',
- 'border-width': borderWidth + PX,
- 'border-radius': options.borderRadius + PX
- });
-
- // Optionally add shadow
- if (options.shadow) {
- tooltipDivStyle = merge(tooltipDivStyle, {
- 'box-shadow': '1px 1px 3px gray', // w3c
- '-webkit-box-shadow': '1px 1px 3px gray' // webkit
- });
- }
- css(tooltipDiv, tooltipDivStyle);
-
- // Set simple style on the line
- css(tooltipLine, {
- 'border-left': '1px solid darkgray'
- });
-
- // This event is triggered when a new tooltip should be shown
- addEvent(chart, 'tooltipRefresh', function (args) {
- var chartContainer = chart.container,
- offsetLeft = chartContainer.offsetLeft,
- offsetTop = chartContainer.offsetTop,
- position;
-
- // Set the content of the tooltip
- tooltipDiv.innerHTML = args.text;
-
- // Compute the best position for the tooltip based on the divs size and container size.
- position = chart.tooltip.getPosition(tooltipDiv.offsetWidth, tooltipDiv.offsetHeight, {plotX: args.x, plotY: args.y});
-
- css(tooltipDiv, {
- visibility: VISIBLE,
- left: position.x + PX,
- top: position.y + PX,
- 'border-color': args.borderColor
- });
-
- // Position the tooltip line
- css(tooltipLine, {
- visibility: VISIBLE,
- left: offsetLeft + args.x + PX,
- top: offsetTop + chart.plotTop + PX,
- height: chart.plotHeight + PX
- });
-
- // This timeout hides the tooltip after 3 seconds
- // First clear any existing timer
- if (renderer.ttTimer !== UNDEFINED) {
- clearTimeout(renderer.ttTimer);
- }
-
- // Start a new timer that hides tooltip and line
- renderer.ttTimer = setTimeout(function () {
- css(tooltipDiv, { visibility: HIDDEN });
- css(tooltipLine, { visibility: HIDDEN });
- }, 3000);
- });
- },
-
- /**
- * Extend SVGRenderer.destroy to also destroy the elements added by CanVGRenderer.
- */
- destroy: function () {
- var renderer = this;
-
- // Remove the canvas
- discardElement(renderer.canvas);
-
- // Kill the timer
- if (renderer.ttTimer !== UNDEFINED) {
- clearTimeout(renderer.ttTimer);
- }
-
- // Remove the divs for tooltip and line
- discardElement(renderer.ttLine);
- discardElement(renderer.ttDiv);
- discardElement(renderer.hiddenSvg);
-
- // Continue with base class
- return SVGRenderer.prototype.destroy.apply(renderer);
- },
-
- /**
- * Take a color and return it if it's a string, do not make it a gradient even if it is a
- * gradient. Currently canvg cannot render gradients (turns out black),
- * see: http://code.google.com/p/canvg/issues/detail?id=104
- *
- * @param {Object} color The color or config object
- */
- color: function (color, elem, prop) {
- if (color && color.linearGradient) {
- // Pick the end color and forward to base implementation
- color = color.stops[color.stops.length - 1][1];
- }
- return SVGRenderer.prototype.color.call(this, color, elem, prop);
- },
-
- /**
- * Draws the SVG on the canvas or adds a draw invokation to the deferred list.
- */
- draw: function () {
- var renderer = this;
- window.canvg(renderer.canvas, renderer.hiddenSvg.innerHTML);
- }
- });
-}(Highcharts));
diff --git a/src/common/lib/vendor/2amigos/yiiwheels/widgets/highcharts/assets/js/modules/exporting.js b/src/common/lib/vendor/2amigos/yiiwheels/widgets/highcharts/assets/js/modules/exporting.js
deleted file mode 100644
index 0b406b9..0000000
--- a/src/common/lib/vendor/2amigos/yiiwheels/widgets/highcharts/assets/js/modules/exporting.js
+++ /dev/null
@@ -1,159 +0,0 @@
-/*
- Highcharts JS v2.2.5 (2012-06-08)
- Exporting module
-
- (c) 2010-2011 Torstein H?nsi
-
- License: www.highcharts.com/license
- */
-(function () {
- function x(a) {
- for (var b = a.length; b--;)typeof a[b] === "number" && (a[b] = Math.round(a[b]) - 0.5);
- return a
- }
-
- var g = Highcharts, y = g.Chart, z = g.addEvent, B = g.removeEvent, r = g.createElement, u = g.discardElement, t = g.css, s = g.merge, k = g.each, n = g.extend, C = Math.max, h = document, D = window, A = h.documentElement.ontouchstart !== void 0, v = g.getOptions();
- n(v.lang, {downloadPNG: "Download PNG image", downloadJPEG: "Download JPEG image", downloadPDF: "Download PDF document", downloadSVG: "Download SVG vector image", exportButtonTitle: "Export to raster or vector image",
- printButtonTitle: "Print the chart"});
- v.navigation = {menuStyle: {border: "1px solid #A0A0A0", background: "#FFFFFF"}, menuItemStyle: {padding: "0 5px", background: "none", color: "#303030", fontSize: A ? "14px" : "11px"}, menuItemHoverStyle: {background: "#4572A5", color: "#FFFFFF"}, buttonOptions: {align: "right", backgroundColor: {linearGradient: [0, 0, 0, 20], stops: [
- [0.4, "#F7F7F7"],
- [0.6, "#E3E3E3"]
- ]}, borderColor: "#B0B0B0", borderRadius: 3, borderWidth: 1, height: 20, hoverBorderColor: "#909090", hoverSymbolFill: "#81A7CF", hoverSymbolStroke: "#4572A5",
- symbolFill: "#E0E0E0", symbolStroke: "#A0A0A0", symbolX: 11.5, symbolY: 10.5, verticalAlign: "top", width: 24, y: 10}};
- v.exporting = {type: "image/png", url: "http://export.highcharts.com/", width: 800, buttons: {exportButton: {symbol: "exportIcon", x: -10, symbolFill: "#A8BF77", hoverSymbolFill: "#768F3E", _id: "exportButton", _titleKey: "exportButtonTitle", menuItems: [
- {textKey: "downloadPNG", onclick: function () {
- this.exportChart()
- }},
- {textKey: "downloadJPEG", onclick: function () {
- this.exportChart({type: "image/jpeg"})
- }},
- {textKey: "downloadPDF",
- onclick: function () {
- this.exportChart({type: "application/pdf"})
- }},
- {textKey: "downloadSVG", onclick: function () {
- this.exportChart({type: "image/svg+xml"})
- }}
- ]}, printButton: {symbol: "printIcon", x: -36, symbolFill: "#B5C9DF", hoverSymbolFill: "#779ABF", _id: "printButton", _titleKey: "printButtonTitle", onclick: function () {
- this.print()
- }}}};
- n(y.prototype, {getSVG: function (a) {
- var b = this, c, d, e, f = s(b.options, a);
- if (!h.createElementNS)h.createElementNS = function (a, b) {
- return h.createElement(b)
- };
- a = r("div", null, {position: "absolute",
- top: "-9999em", width: b.chartWidth + "px", height: b.chartHeight + "px"}, h.body);
- n(f.chart, {renderTo: a, forExport: !0});
- f.exporting.enabled = !1;
- f.chart.plotBackgroundImage = null;
- f.series = [];
- k(b.series, function (a) {
- e = s(a.options, {animation: !1, showCheckbox: !1, visible: a.visible});
- if (!e.isInternal) {
- if (e && e.marker && /^url\(/.test(e.marker.symbol))e.marker.symbol = "circle";
- f.series.push(e)
- }
- });
- c = new Highcharts.Chart(f);
- k(["xAxis", "yAxis"], function (a) {
- k(b[a], function (b, d) {
- var e = c[a][d], f = b.getExtremes(), g = f.userMin, f = f.userMax;
- (g !== void 0 || f !== void 0) && e.setExtremes(g, f, !0, !1)
- })
- });
- d = c.container.innerHTML;
- f = null;
- c.destroy();
- u(a);
- d = d.replace(/zIndex="[^"]+"/g, "").replace(/isShadow="[^"]+"/g, "").replace(/symbolName="[^"]+"/g, "").replace(/jQuery[0-9]+="[^"]+"/g, "").replace(/isTracker="[^"]+"/g, "").replace(/url\([^#]+#/g, "url(#").replace(/.*?$/, " ").replace(/ /g, "\u00a0").replace(//g,
- "\u00ad").replace(/ /g, 'xlink:href="$1"/>').replace(/id=([^" >]+)/g, 'id="$1"').replace(/class=([^" ]+)/g, 'class="$1"').replace(/ transform /g, " ").replace(/:(path|rect)/g, "$1").replace(/style="([^"]+)"/g, function (a) {
- return a.toLowerCase()
- });
- d = d.replace(/(url\(#highcharts-[0-9]+)"/g, "$1").replace(/"/g, "'");
- d.match(/ xmlns="/g).length === 2 && (d = d.replace(/xmlns="[^"]+"/,
- ""));
- return d
- }, exportChart: function (a, b) {
- var c, d = this.getSVG(s(this.options.exporting.chartOptions, b)), a = s(this.options.exporting, a);
- c = r("form", {method: "post", action: a.url, enctype: "multipart/form-data"}, {display: "none"}, h.body);
- k(["filename", "type", "width", "svg"], function (b) {
- r("input", {type: "hidden", name: b, value: {filename: a.filename || "chart", type: a.type, width: a.width, svg: d}[b]}, null, c)
- });
- c.submit();
- u(c)
- }, print: function () {
- var a = this, b = a.container, c = [], d = b.parentNode, e = h.body, f = e.childNodes;
- if (!a.isPrinting)a.isPrinting = !0, k(f, function (a, b) {
- if (a.nodeType === 1)c[b] = a.style.display, a.style.display = "none"
- }), e.appendChild(b), D.print(), setTimeout(function () {
- d.appendChild(b);
- k(f, function (a, b) {
- if (a.nodeType === 1)a.style.display = c[b]
- });
- a.isPrinting = !1
- }, 1E3)
- }, contextMenu: function (a, b, c, d, e, f) {
- var i = this, g = i.options.navigation, h = g.menuItemStyle, o = i.chartWidth, p = i.chartHeight, q = "cache-" + a, j = i[q], l = C(e, f), m, w;
- if (!j)i[q] = j = r("div", {className: "highcharts-" + a}, {position: "absolute", zIndex: 1E3, padding: l + "px"}, i.container), m = r("div",
- null, n({MozBoxShadow: "3px 3px 10px #888", WebkitBoxShadow: "3px 3px 10px #888", boxShadow: "3px 3px 10px #888"}, g.menuStyle), j), w = function () {
- t(j, {display: "none"})
- }, z(j, "mouseleave", w), k(b, function (a) {
- if (a) {
- var b = r("div", {onmouseover: function () {
- t(this, g.menuItemHoverStyle)
- }, onmouseout: function () {
- t(this, h)
- }, innerHTML: a.text || i.options.lang[a.textKey]}, n({cursor: "pointer"}, h), m);
- b[A ? "ontouchstart" : "onclick"] = function () {
- w();
- a.onclick.apply(i, arguments)
- };
- i.exportDivElements.push(b)
- }
- }), i.exportDivElements.push(m,
- j), i.exportMenuWidth = j.offsetWidth, i.exportMenuHeight = j.offsetHeight;
- a = {display: "block"};
- c + i.exportMenuWidth > o ? a.right = o - c - e - l + "px" : a.left = c - l + "px";
- d + f + i.exportMenuHeight > p ? a.bottom = p - d - l + "px" : a.top = d + f - l + "px";
- t(j, a)
- }, addButton: function (a) {
- function b() {
- p.attr(l);
- o.attr(j)
- }
-
- var c = this, d = c.renderer, e = s(c.options.navigation.buttonOptions, a), f = e.onclick, g = e.menuItems, h = e.width, k = e.height, o, p, q, a = e.borderWidth, j = {stroke: e.borderColor}, l = {stroke: e.symbolStroke, fill: e.symbolFill}, m = e.symbolSize || 12;
- if (!c.exportDivElements)c.exportDivElements =
- [], c.exportSVGElements = [];
- e.enabled !== !1 && (o = d.rect(0, 0, h, k, e.borderRadius, a).align(e, !0).attr(n({fill: e.backgroundColor, "stroke-width": a, zIndex: 19}, j)).add(), q = d.rect(0, 0, h, k, 0).align(e).attr({id: e._id, fill: "rgba(255, 255, 255, 0.001)", title: c.options.lang[e._titleKey], zIndex: 21}).css({cursor: "pointer"}).on("mouseover",function () {
- p.attr({stroke: e.hoverSymbolStroke, fill: e.hoverSymbolFill});
- o.attr({stroke: e.hoverBorderColor})
- }).on("mouseout", b).on("click", b).add(), g && (f = function () {
- b();
- var a = q.getBBox();
- c.contextMenu("export-menu", g, a.x, a.y, h, k)
- }), q.on("click", function () {
- f.apply(c, arguments)
- }), p = d.symbol(e.symbol, e.symbolX - m / 2, e.symbolY - m / 2, m, m).align(e, !0).attr(n(l, {"stroke-width": e.symbolStrokeWidth || 1, zIndex: 20})).add(), c.exportSVGElements.push(o, q, p))
- }, destroyExport: function () {
- var a, b;
- for (a = 0; a < this.exportSVGElements.length; a++)b = this.exportSVGElements[a], b.onclick = b.ontouchstart = null, this.exportSVGElements[a] = b.destroy();
- for (a = 0; a < this.exportDivElements.length; a++)b = this.exportDivElements[a],
- B(b, "mouseleave"), this.exportDivElements[a] = b.onmouseout = b.onmouseover = b.ontouchstart = b.onclick = null, u(b)
- }});
- g.Renderer.prototype.symbols.exportIcon = function (a, b, c, d) {
- return x(["M", a, b + c, "L", a + c, b + d, a + c, b + d * 0.8, a, b + d * 0.8, "Z", "M", a + c * 0.5, b + d * 0.8, "L", a + c * 0.8, b + d * 0.4, a + c * 0.4, b + d * 0.4, a + c * 0.4, b, a + c * 0.6, b, a + c * 0.6, b + d * 0.4, a + c * 0.2, b + d * 0.4, "Z"])
- };
- g.Renderer.prototype.symbols.printIcon = function (a, b, c, d) {
- return x(["M", a, b + d * 0.7, "L", a + c, b + d * 0.7, a + c, b + d * 0.4, a, b + d * 0.4, "Z", "M", a + c * 0.2, b + d * 0.4, "L", a + c * 0.2, b, a + c *
- 0.8, b, a + c * 0.8, b + d * 0.4, "Z", "M", a + c * 0.2, b + d * 0.7, "L", a, b + d, a + c, b + d, a + c * 0.8, b + d * 0.7, "Z"])
- };
- y.prototype.callbacks.push(function (a) {
- var b, c = a.options.exporting, d = c.buttons;
- if (c.enabled !== !1) {
- for (b in d)a.addButton(d[b]);
- z(a, "destroy", a.destroyExport)
- }
- })
-})();
diff --git a/src/common/lib/vendor/2amigos/yiiwheels/widgets/highcharts/assets/js/modules/exporting.src.js b/src/common/lib/vendor/2amigos/yiiwheels/widgets/highcharts/assets/js/modules/exporting.src.js
deleted file mode 100644
index e32bf21..0000000
--- a/src/common/lib/vendor/2amigos/yiiwheels/widgets/highcharts/assets/js/modules/exporting.src.js
+++ /dev/null
@@ -1,739 +0,0 @@
-/**
- * @license Highcharts JS v2.2.5 (2012-06-08)
- * Exporting module
- *
- * (c) 2010-2011 Torstein Hønsi
- *
- * License: www.highcharts.com/license
- */
-
-// JSLint options:
-/*global Highcharts, document, window, Math, setTimeout */
-
-(function () { // encapsulate
-
-// create shortcuts
- var HC = Highcharts,
- Chart = HC.Chart,
- addEvent = HC.addEvent,
- removeEvent = HC.removeEvent,
- createElement = HC.createElement,
- discardElement = HC.discardElement,
- css = HC.css,
- merge = HC.merge,
- each = HC.each,
- extend = HC.extend,
- math = Math,
- mathMax = math.max,
- doc = document,
- win = window,
- hasTouch = doc.documentElement.ontouchstart !== undefined,
- M = 'M',
- L = 'L',
- DIV = 'div',
- HIDDEN = 'hidden',
- NONE = 'none',
- PREFIX = 'highcharts-',
- ABSOLUTE = 'absolute',
- PX = 'px',
- UNDEFINED,
- defaultOptions = HC.getOptions();
-
- // Add language
- extend(defaultOptions.lang, {
- downloadPNG: 'Download PNG image',
- downloadJPEG: 'Download JPEG image',
- downloadPDF: 'Download PDF document',
- downloadSVG: 'Download SVG vector image',
- exportButtonTitle: 'Export to raster or vector image',
- printButtonTitle: 'Print the chart'
- });
-
-// Buttons and menus are collected in a separate config option set called 'navigation'.
-// This can be extended later to add control buttons like zoom and pan right click menus.
- defaultOptions.navigation = {
- menuStyle: {
- border: '1px solid #A0A0A0',
- background: '#FFFFFF'
- },
- menuItemStyle: {
- padding: '0 5px',
- background: NONE,
- color: '#303030',
- fontSize: hasTouch ? '14px' : '11px'
- },
- menuItemHoverStyle: {
- background: '#4572A5',
- color: '#FFFFFF'
- },
-
- buttonOptions: {
- align: 'right',
- backgroundColor: {
- linearGradient: [0, 0, 0, 20],
- stops: [
- [0.4, '#F7F7F7'],
- [0.6, '#E3E3E3']
- ]
- },
- borderColor: '#B0B0B0',
- borderRadius: 3,
- borderWidth: 1,
- //enabled: true,
- height: 20,
- hoverBorderColor: '#909090',
- hoverSymbolFill: '#81A7CF',
- hoverSymbolStroke: '#4572A5',
- symbolFill: '#E0E0E0',
- //symbolSize: 12,
- symbolStroke: '#A0A0A0',
- //symbolStrokeWidth: 1,
- symbolX: 11.5,
- symbolY: 10.5,
- verticalAlign: 'top',
- width: 24,
- y: 10
- }
- };
-
-
-// Add the export related options
- defaultOptions.exporting = {
- //enabled: true,
- //filename: 'chart',
- type: 'image/png',
- url: 'http://export.highcharts.com/',
- width: 800,
- buttons: {
- exportButton: {
- //enabled: true,
- symbol: 'exportIcon',
- x: -10,
- symbolFill: '#A8BF77',
- hoverSymbolFill: '#768F3E',
- _id: 'exportButton',
- _titleKey: 'exportButtonTitle',
- menuItems: [
- {
- textKey: 'downloadPNG',
- onclick: function () {
- this.exportChart();
- }
- },
- {
- textKey: 'downloadJPEG',
- onclick: function () {
- this.exportChart({
- type: 'image/jpeg'
- });
- }
- },
- {
- textKey: 'downloadPDF',
- onclick: function () {
- this.exportChart({
- type: 'application/pdf'
- });
- }
- },
- {
- textKey: 'downloadSVG',
- onclick: function () {
- this.exportChart({
- type: 'image/svg+xml'
- });
- }
- }
- // Enable this block to add "View SVG" to the dropdown menu
- /*
- ,{
-
- text: 'View SVG',
- onclick: function () {
- var svg = this.getSVG()
- .replace(//g, '>');
-
- doc.body.innerHTML = '' + svg + ' ';
- }
- } // */
- ]
-
- },
- printButton: {
- //enabled: true,
- symbol: 'printIcon',
- x: -36,
- symbolFill: '#B5C9DF',
- hoverSymbolFill: '#779ABF',
- _id: 'printButton',
- _titleKey: 'printButtonTitle',
- onclick: function () {
- this.print();
- }
- }
- }
- };
-
-
- extend(Chart.prototype, {
- /**
- * Return an SVG representation of the chart
- *
- * @param additionalOptions {Object} Additional chart options for the generated SVG representation
- */
- getSVG: function (additionalOptions) {
- var chart = this,
- chartCopy,
- sandbox,
- svg,
- seriesOptions,
- options = merge(chart.options, additionalOptions); // copy the options and add extra options
-
- // IE compatibility hack for generating SVG content that it doesn't really understand
- if (!doc.createElementNS) {
- /*jslint unparam: true*/
- /* allow unused parameter ns in function below */
- doc.createElementNS = function (ns, tagName) {
- return doc.createElement(tagName);
- };
- /*jslint unparam: false*/
- }
-
- // create a sandbox where a new chart will be generated
- sandbox = createElement(DIV, null, {
- position: ABSOLUTE,
- top: '-9999em',
- width: chart.chartWidth + PX,
- height: chart.chartHeight + PX
- }, doc.body);
-
- // override some options
- extend(options.chart, {
- renderTo: sandbox,
- forExport: true
- });
- options.exporting.enabled = false; // hide buttons in print
- options.chart.plotBackgroundImage = null; // the converter doesn't handle images
-
- // prepare for replicating the chart
- options.series = [];
- each(chart.series, function (serie) {
- seriesOptions = merge(serie.options, {
- animation: false, // turn off animation
- showCheckbox: false,
- visible: serie.visible
- });
-
- if (!seriesOptions.isInternal) { // used for the navigator series that has its own option set
-
- // remove image markers
- if (seriesOptions && seriesOptions.marker && /^url\(/.test(seriesOptions.marker.symbol)) {
- seriesOptions.marker.symbol = 'circle';
- }
-
- options.series.push(seriesOptions);
- }
- });
-
- // generate the chart copy
- chartCopy = new Highcharts.Chart(options);
-
- // reflect axis extremes in the export
- each(['xAxis', 'yAxis'], function (axisType) {
- each(chart[axisType], function (axis, i) {
- var axisCopy = chartCopy[axisType][i],
- extremes = axis.getExtremes(),
- userMin = extremes.userMin,
- userMax = extremes.userMax;
-
- if (userMin !== UNDEFINED || userMax !== UNDEFINED) {
- axisCopy.setExtremes(userMin, userMax, true, false);
- }
- });
- });
-
- // get the SVG from the container's innerHTML
- svg = chartCopy.container.innerHTML;
-
- // free up memory
- options = null;
- chartCopy.destroy();
- discardElement(sandbox);
-
- // sanitize
- svg = svg
- .replace(/zIndex="[^"]+"/g, '')
- .replace(/isShadow="[^"]+"/g, '')
- .replace(/symbolName="[^"]+"/g, '')
- .replace(/jQuery[0-9]+="[^"]+"/g, '')
- .replace(/isTracker="[^"]+"/g, '')
- .replace(/url\([^#]+#/g, 'url(#')
- .replace(/.*?$/, ' ') // any HTML added to the container after the SVG (#894)
- /* This fails in IE < 8
- .replace(/([0-9]+)\.([0-9]+)/g, function(s1, s2, s3) { // round off to save weight
- return s2 +'.'+ s3[0];
- })*/
-
- // Replace HTML entities, issue #347
- .replace(/ /g, '\u00A0') // no-break space
- .replace(//g, '\u00AD') // soft hyphen
-
- // IE specific
- .replace(/ /g, 'xlink:href="$1"/>')
- .replace(/id=([^" >]+)/g, 'id="$1"')
- .replace(/class=([^" ]+)/g, 'class="$1"')
- .replace(/ transform /g, ' ')
- .replace(/:(path|rect)/g, '$1')
- .replace(/style="([^"]+)"/g, function (s) {
- return s.toLowerCase();
- });
-
- // IE9 beta bugs with innerHTML. Test again with final IE9.
- svg = svg.replace(/(url\(#highcharts-[0-9]+)"/g, '$1')
- .replace(/"/g, "'");
- if (svg.match(/ xmlns="/g).length === 2) {
- svg = svg.replace(/xmlns="[^"]+"/, '');
- }
-
- return svg;
- },
-
- /**
- * Submit the SVG representation of the chart to the server
- * @param {Object} options Exporting options. Possible members are url, type and width.
- * @param {Object} chartOptions Additional chart options for the SVG representation of the chart
- */
- exportChart: function (options, chartOptions) {
- var form,
- chart = this,
- svg = chart.getSVG(merge(chart.options.exporting.chartOptions, chartOptions)); // docs
-
- // merge the options
- options = merge(chart.options.exporting, options);
-
- // create the form
- form = createElement('form', {
- method: 'post',
- action: options.url,
- enctype: 'multipart/form-data'
- }, {
- display: NONE
- }, doc.body);
-
- // add the values
- each(['filename', 'type', 'width', 'svg'], function (name) {
- createElement('input', {
- type: HIDDEN,
- name: name,
- value: {
- filename: options.filename || 'chart',
- type: options.type,
- width: options.width,
- svg: svg
- }[name]
- }, null, form);
- });
-
- // submit
- form.submit();
-
- // clean up
- discardElement(form);
- },
-
- /**
- * Print the chart
- */
- print: function () {
-
- var chart = this,
- container = chart.container,
- origDisplay = [],
- origParent = container.parentNode,
- body = doc.body,
- childNodes = body.childNodes;
-
- if (chart.isPrinting) { // block the button while in printing mode
- return;
- }
-
- chart.isPrinting = true;
-
- // hide all body content
- each(childNodes, function (node, i) {
- if (node.nodeType === 1) {
- origDisplay[i] = node.style.display;
- node.style.display = NONE;
- }
- });
-
- // pull out the chart
- body.appendChild(container);
-
- // print
- win.print();
-
- // allow the browser to prepare before reverting
- setTimeout(function () {
-
- // put the chart back in
- origParent.appendChild(container);
-
- // restore all body content
- each(childNodes, function (node, i) {
- if (node.nodeType === 1) {
- node.style.display = origDisplay[i];
- }
- });
-
- chart.isPrinting = false;
-
- }, 1000);
-
- },
-
- /**
- * Display a popup menu for choosing the export type
- *
- * @param {String} name An identifier for the menu
- * @param {Array} items A collection with text and onclicks for the items
- * @param {Number} x The x position of the opener button
- * @param {Number} y The y position of the opener button
- * @param {Number} width The width of the opener button
- * @param {Number} height The height of the opener button
- */
- contextMenu: function (name, items, x, y, width, height) {
- var chart = this,
- navOptions = chart.options.navigation,
- menuItemStyle = navOptions.menuItemStyle,
- chartWidth = chart.chartWidth,
- chartHeight = chart.chartHeight,
- cacheName = 'cache-' + name,
- menu = chart[cacheName],
- menuPadding = mathMax(width, height), // for mouse leave detection
- boxShadow = '3px 3px 10px #888',
- innerMenu,
- hide,
- menuStyle;
-
- // create the menu only the first time
- if (!menu) {
-
- // create a HTML element above the SVG
- chart[cacheName] = menu = createElement(DIV, {
- className: PREFIX + name
- }, {
- position: ABSOLUTE,
- zIndex: 1000,
- padding: menuPadding + PX
- }, chart.container);
-
- innerMenu = createElement(DIV, null,
- extend({
- MozBoxShadow: boxShadow,
- WebkitBoxShadow: boxShadow,
- boxShadow: boxShadow
- }, navOptions.menuStyle), menu);
-
- // hide on mouse out
- hide = function () {
- css(menu, { display: NONE });
- };
-
- addEvent(menu, 'mouseleave', hide);
-
-
- // create the items
- each(items, function (item) {
- if (item) {
- var div = createElement(DIV, {
- onmouseover: function () {
- css(this, navOptions.menuItemHoverStyle);
- },
- onmouseout: function () {
- css(this, menuItemStyle);
- },
- innerHTML: item.text || chart.options.lang[item.textKey]
- }, extend({
- cursor: 'pointer'
- }, menuItemStyle), innerMenu);
-
- div[hasTouch ? 'ontouchstart' : 'onclick'] = function () {
- hide();
- item.onclick.apply(chart, arguments);
- };
-
- // Keep references to menu divs to be able to destroy them
- chart.exportDivElements.push(div);
- }
- });
-
- // Keep references to menu and innerMenu div to be able to destroy them
- chart.exportDivElements.push(innerMenu, menu);
-
- chart.exportMenuWidth = menu.offsetWidth;
- chart.exportMenuHeight = menu.offsetHeight;
- }
-
- menuStyle = { display: 'block' };
-
- // if outside right, right align it
- if (x + chart.exportMenuWidth > chartWidth) {
- menuStyle.right = (chartWidth - x - width - menuPadding) + PX;
- } else {
- menuStyle.left = (x - menuPadding) + PX;
- }
- // if outside bottom, bottom align it
- if (y + height + chart.exportMenuHeight > chartHeight) {
- menuStyle.bottom = (chartHeight - y - menuPadding) + PX;
- } else {
- menuStyle.top = (y + height - menuPadding) + PX;
- }
-
- css(menu, menuStyle);
- },
-
- /**
- * Add the export button to the chart
- */
- addButton: function (options) {
- var chart = this,
- renderer = chart.renderer,
- btnOptions = merge(chart.options.navigation.buttonOptions, options),
- onclick = btnOptions.onclick,
- menuItems = btnOptions.menuItems,
- buttonWidth = btnOptions.width,
- buttonHeight = btnOptions.height,
- box,
- symbol,
- button,
- borderWidth = btnOptions.borderWidth,
- boxAttr = {
- stroke: btnOptions.borderColor
-
- },
- symbolAttr = {
- stroke: btnOptions.symbolStroke,
- fill: btnOptions.symbolFill
- },
- symbolSize = btnOptions.symbolSize || 12;
-
- // Keeps references to the button elements
- if (!chart.exportDivElements) {
- chart.exportDivElements = [];
- chart.exportSVGElements = [];
- }
-
- if (btnOptions.enabled === false) {
- return;
- }
-
- // element to capture the click
- function revert() {
- symbol.attr(symbolAttr);
- box.attr(boxAttr);
- }
-
- // the box border
- box = renderer.rect(
- 0,
- 0,
- buttonWidth,
- buttonHeight,
- btnOptions.borderRadius,
- borderWidth
- )
- //.translate(buttonLeft, buttonTop) // to allow gradients
- .align(btnOptions, true)
- .attr(extend({
- fill: btnOptions.backgroundColor,
- 'stroke-width': borderWidth,
- zIndex: 19
- }, boxAttr)).add();
-
- // the invisible element to track the clicks
- button = renderer.rect(
- 0,
- 0,
- buttonWidth,
- buttonHeight,
- 0
- )
- .align(btnOptions)
- .attr({
- id: btnOptions._id,
- fill: 'rgba(255, 255, 255, 0.001)',
- title: chart.options.lang[btnOptions._titleKey],
- zIndex: 21
- }).css({
- cursor: 'pointer'
- })
- .on('mouseover', function () {
- symbol.attr({
- stroke: btnOptions.hoverSymbolStroke,
- fill: btnOptions.hoverSymbolFill
- });
- box.attr({
- stroke: btnOptions.hoverBorderColor
- });
- })
- .on('mouseout', revert)
- .on('click', revert)
- .add();
-
- // add the click event
- if (menuItems) {
- onclick = function () {
- revert();
- var bBox = button.getBBox();
- chart.contextMenu('export-menu', menuItems, bBox.x, bBox.y, buttonWidth, buttonHeight);
- };
- }
- /*addEvent(button.element, 'click', function() {
- onclick.apply(chart, arguments);
- });*/
- button.on('click', function () {
- onclick.apply(chart, arguments);
- });
-
- // the icon
- symbol = renderer.symbol(
- btnOptions.symbol,
- btnOptions.symbolX - (symbolSize / 2),
- btnOptions.symbolY - (symbolSize / 2),
- symbolSize,
- symbolSize
- )
- .align(btnOptions, true)
- .attr(extend(symbolAttr, {
- 'stroke-width': btnOptions.symbolStrokeWidth || 1,
- zIndex: 20
- })).add();
-
- // Keep references to the renderer element so to be able to destroy them later.
- chart.exportSVGElements.push(box, button, symbol);
- },
-
- /**
- * Destroy the buttons.
- */
- destroyExport: function () {
- var i,
- chart = this,
- elem;
-
- // Destroy the extra buttons added
- for (i = 0; i < chart.exportSVGElements.length; i++) {
- elem = chart.exportSVGElements[i];
- // Destroy and null the svg/vml elements
- elem.onclick = elem.ontouchstart = null;
- chart.exportSVGElements[i] = elem.destroy();
- }
-
- // Destroy the divs for the menu
- for (i = 0; i < chart.exportDivElements.length; i++) {
- elem = chart.exportDivElements[i];
-
- // Remove the event handler
- removeEvent(elem, 'mouseleave');
-
- // Remove inline events
- chart.exportDivElements[i] = elem.onmouseout = elem.onmouseover = elem.ontouchstart = elem.onclick = null;
-
- // Destroy the div by moving to garbage bin
- discardElement(elem);
- }
- }
- });
-
- /**
- * Crisp for 1px stroke width, which is default. In the future, consider a smarter,
- * global function.
- */
- function crisp(arr) {
- var i = arr.length;
- while (i--) {
- if (typeof arr[i] === 'number') {
- arr[i] = Math.round(arr[i]) - 0.5;
- }
- }
- return arr;
- }
-
-// Create the export icon
- HC.Renderer.prototype.symbols.exportIcon = function (x, y, width, height) {
- return crisp([
- M, // the disk
- x, y + width,
- L,
- x + width, y + height,
- x + width, y + height * 0.8,
- x, y + height * 0.8,
- 'Z',
- M, // the arrow
- x + width * 0.5, y + height * 0.8,
- L,
- x + width * 0.8, y + height * 0.4,
- x + width * 0.4, y + height * 0.4,
- x + width * 0.4, y,
- x + width * 0.6, y,
- x + width * 0.6, y + height * 0.4,
- x + width * 0.2, y + height * 0.4,
- 'Z'
- ]);
- };
-// Create the print icon
- HC.Renderer.prototype.symbols.printIcon = function (x, y, width, height) {
- return crisp([
- M, // the printer
- x, y + height * 0.7,
- L,
- x + width, y + height * 0.7,
- x + width, y + height * 0.4,
- x, y + height * 0.4,
- 'Z',
- M, // the upper sheet
- x + width * 0.2, y + height * 0.4,
- L,
- x + width * 0.2, y,
- x + width * 0.8, y,
- x + width * 0.8, y + height * 0.4,
- 'Z',
- M, // the lower sheet
- x + width * 0.2, y + height * 0.7,
- L,
- x, y + height,
- x + width, y + height,
- x + width * 0.8, y + height * 0.7,
- 'Z'
- ]);
- };
-
-
-// Add the buttons on chart load
- Chart.prototype.callbacks.push(function (chart) {
- var n,
- exportingOptions = chart.options.exporting,
- buttons = exportingOptions.buttons;
-
- if (exportingOptions.enabled !== false) {
-
- for (n in buttons) {
- chart.addButton(buttons[n]);
- }
-
- // Destroy the export elements at chart destroy
- addEvent(chart, 'destroy', chart.destroyExport);
- }
-
- });
-
-
-}());
diff --git a/src/common/lib/vendor/2amigos/yiiwheels/widgets/highcharts/assets/js/themes/dark-blue.js b/src/common/lib/vendor/2amigos/yiiwheels/widgets/highcharts/assets/js/themes/dark-blue.js
deleted file mode 100644
index 3e520ca..0000000
--- a/src/common/lib/vendor/2amigos/yiiwheels/widgets/highcharts/assets/js/themes/dark-blue.js
+++ /dev/null
@@ -1,263 +0,0 @@
-/**
- * Dark blue theme for Highcharts JS
- * @author Torstein Hønsi
- */
-
-Highcharts.theme = {
- colors: ["#DDDF0D", "#55BF3B", "#DF5353", "#7798BF", "#aaeeee", "#ff0066", "#eeaaee",
- "#55BF3B", "#DF5353", "#7798BF", "#aaeeee"],
- chart: {
- backgroundColor: {
- linearGradient: [0, 0, 250, 500],
- stops: [
- [0, 'rgb(48, 48, 96)'],
- [1, 'rgb(0, 0, 0)']
- ]
- },
- borderColor: '#000000',
- borderWidth: 2,
- className: 'dark-container',
- plotBackgroundColor: 'rgba(255, 255, 255, .1)',
- plotBorderColor: '#CCCCCC',
- plotBorderWidth: 1
- },
- title: {
- style: {
- color: '#C0C0C0',
- font: 'bold 16px "Trebuchet MS", Verdana, sans-serif'
- }
- },
- subtitle: {
- style: {
- color: '#666666',
- font: 'bold 12px "Trebuchet MS", Verdana, sans-serif'
- }
- },
- xAxis: {
- gridLineColor: '#333333',
- gridLineWidth: 1,
- labels: {
- style: {
- color: '#A0A0A0'
- }
- },
- lineColor: '#A0A0A0',
- tickColor: '#A0A0A0',
- title: {
- style: {
- color: '#CCC',
- fontWeight: 'bold',
- fontSize: '12px',
- fontFamily: 'Trebuchet MS, Verdana, sans-serif'
-
- }
- }
- },
- yAxis: {
- gridLineColor: '#333333',
- labels: {
- style: {
- color: '#A0A0A0'
- }
- },
- lineColor: '#A0A0A0',
- minorTickInterval: null,
- tickColor: '#A0A0A0',
- tickWidth: 1,
- title: {
- style: {
- color: '#CCC',
- fontWeight: 'bold',
- fontSize: '12px',
- fontFamily: 'Trebuchet MS, Verdana, sans-serif'
- }
- }
- },
- tooltip: {
- backgroundColor: 'rgba(0, 0, 0, 0.75)',
- style: {
- color: '#F0F0F0'
- }
- },
- toolbar: {
- itemStyle: {
- color: 'silver'
- }
- },
- plotOptions: {
- line: {
- dataLabels: {
- color: '#CCC'
- },
- marker: {
- lineColor: '#333'
- }
- },
- spline: {
- marker: {
- lineColor: '#333'
- }
- },
- scatter: {
- marker: {
- lineColor: '#333'
- }
- },
- candlestick: {
- lineColor: 'white'
- }
- },
- legend: {
- itemStyle: {
- font: '9pt Trebuchet MS, Verdana, sans-serif',
- color: '#A0A0A0'
- },
- itemHoverStyle: {
- color: '#FFF'
- },
- itemHiddenStyle: {
- color: '#444'
- }
- },
- credits: {
- style: {
- color: '#666'
- }
- },
- labels: {
- style: {
- color: '#CCC'
- }
- },
-
- navigation: {
- buttonOptions: {
- backgroundColor: {
- linearGradient: [0, 0, 0, 20],
- stops: [
- [0.4, '#606060'],
- [0.6, '#333333']
- ]
- },
- borderColor: '#000000',
- symbolStroke: '#C0C0C0',
- hoverSymbolStroke: '#FFFFFF'
- }
- },
-
- exporting: {
- buttons: {
- exportButton: {
- symbolFill: '#55BE3B'
- },
- printButton: {
- symbolFill: '#7797BE'
- }
- }
- },
-
- // scroll charts
- rangeSelector: {
- buttonTheme: {
- fill: {
- linearGradient: [0, 0, 0, 20],
- stops: [
- [0.4, '#888'],
- [0.6, '#555']
- ]
- },
- stroke: '#000000',
- style: {
- color: '#CCC',
- fontWeight: 'bold'
- },
- states: {
- hover: {
- fill: {
- linearGradient: [0, 0, 0, 20],
- stops: [
- [0.4, '#BBB'],
- [0.6, '#888']
- ]
- },
- stroke: '#000000',
- style: {
- color: 'white'
- }
- },
- select: {
- fill: {
- linearGradient: [0, 0, 0, 20],
- stops: [
- [0.1, '#000'],
- [0.3, '#333']
- ]
- },
- stroke: '#000000',
- style: {
- color: 'yellow'
- }
- }
- }
- },
- inputStyle: {
- backgroundColor: '#333',
- color: 'silver'
- },
- labelStyle: {
- color: 'silver'
- }
- },
-
- navigator: {
- handles: {
- backgroundColor: '#666',
- borderColor: '#AAA'
- },
- outlineColor: '#CCC',
- maskFill: 'rgba(16, 16, 16, 0.5)',
- series: {
- color: '#7798BF',
- lineColor: '#A6C7ED'
- }
- },
-
- scrollbar: {
- barBackgroundColor: {
- linearGradient: [0, 0, 0, 20],
- stops: [
- [0.4, '#888'],
- [0.6, '#555']
- ]
- },
- barBorderColor: '#CCC',
- buttonArrowColor: '#CCC',
- buttonBackgroundColor: {
- linearGradient: [0, 0, 0, 20],
- stops: [
- [0.4, '#888'],
- [0.6, '#555']
- ]
- },
- buttonBorderColor: '#CCC',
- rifleColor: '#FFF',
- trackBackgroundColor: {
- linearGradient: [0, 0, 0, 10],
- stops: [
- [0, '#000'],
- [1, '#333']
- ]
- },
- trackBorderColor: '#666'
- },
-
- // special colors for some of the
- legendBackgroundColor: 'rgba(0, 0, 0, 0.5)',
- legendBackgroundColorSolid: 'rgb(35, 35, 70)',
- dataLabelsColor: '#444',
- textColor: '#C0C0C0',
- maskColor: 'rgba(255,255,255,0.3)'
-};
-
-// Apply the theme
-var highchartsOptions = Highcharts.setOptions(Highcharts.theme);
diff --git a/src/common/lib/vendor/2amigos/yiiwheels/widgets/highcharts/assets/js/themes/dark-green.js b/src/common/lib/vendor/2amigos/yiiwheels/widgets/highcharts/assets/js/themes/dark-green.js
deleted file mode 100644
index 124bb79..0000000
--- a/src/common/lib/vendor/2amigos/yiiwheels/widgets/highcharts/assets/js/themes/dark-green.js
+++ /dev/null
@@ -1,263 +0,0 @@
-/**
- * Dark blue theme for Highcharts JS
- * @author Torstein Hønsi
- */
-
-Highcharts.theme = {
- colors: ["#DDDF0D", "#55BF3B", "#DF5353", "#7798BF", "#aaeeee", "#ff0066", "#eeaaee",
- "#55BF3B", "#DF5353", "#7798BF", "#aaeeee"],
- chart: {
- backgroundColor: {
- linearGradient: [0, 0, 250, 500],
- stops: [
- [0, 'rgb(48, 96, 48)'],
- [1, 'rgb(0, 0, 0)']
- ]
- },
- borderColor: '#000000',
- borderWidth: 2,
- className: 'dark-container',
- plotBackgroundColor: 'rgba(255, 255, 255, .1)',
- plotBorderColor: '#CCCCCC',
- plotBorderWidth: 1
- },
- title: {
- style: {
- color: '#C0C0C0',
- font: 'bold 16px "Trebuchet MS", Verdana, sans-serif'
- }
- },
- subtitle: {
- style: {
- color: '#666666',
- font: 'bold 12px "Trebuchet MS", Verdana, sans-serif'
- }
- },
- xAxis: {
- gridLineColor: '#333333',
- gridLineWidth: 1,
- labels: {
- style: {
- color: '#A0A0A0'
- }
- },
- lineColor: '#A0A0A0',
- tickColor: '#A0A0A0',
- title: {
- style: {
- color: '#CCC',
- fontWeight: 'bold',
- fontSize: '12px',
- fontFamily: 'Trebuchet MS, Verdana, sans-serif'
-
- }
- }
- },
- yAxis: {
- gridLineColor: '#333333',
- labels: {
- style: {
- color: '#A0A0A0'
- }
- },
- lineColor: '#A0A0A0',
- minorTickInterval: null,
- tickColor: '#A0A0A0',
- tickWidth: 1,
- title: {
- style: {
- color: '#CCC',
- fontWeight: 'bold',
- fontSize: '12px',
- fontFamily: 'Trebuchet MS, Verdana, sans-serif'
- }
- }
- },
- tooltip: {
- backgroundColor: 'rgba(0, 0, 0, 0.75)',
- style: {
- color: '#F0F0F0'
- }
- },
- toolbar: {
- itemStyle: {
- color: 'silver'
- }
- },
- plotOptions: {
- line: {
- dataLabels: {
- color: '#CCC'
- },
- marker: {
- lineColor: '#333'
- }
- },
- spline: {
- marker: {
- lineColor: '#333'
- }
- },
- scatter: {
- marker: {
- lineColor: '#333'
- }
- },
- candlestick: {
- lineColor: 'white'
- }
- },
- legend: {
- itemStyle: {
- font: '9pt Trebuchet MS, Verdana, sans-serif',
- color: '#A0A0A0'
- },
- itemHoverStyle: {
- color: '#FFF'
- },
- itemHiddenStyle: {
- color: '#444'
- }
- },
- credits: {
- style: {
- color: '#666'
- }
- },
- labels: {
- style: {
- color: '#CCC'
- }
- },
-
- navigation: {
- buttonOptions: {
- backgroundColor: {
- linearGradient: [0, 0, 0, 20],
- stops: [
- [0.4, '#606060'],
- [0.6, '#333333']
- ]
- },
- borderColor: '#000000',
- symbolStroke: '#C0C0C0',
- hoverSymbolStroke: '#FFFFFF'
- }
- },
-
- exporting: {
- buttons: {
- exportButton: {
- symbolFill: '#55BE3B'
- },
- printButton: {
- symbolFill: '#7797BE'
- }
- }
- },
-
- // scroll charts
- rangeSelector: {
- buttonTheme: {
- fill: {
- linearGradient: [0, 0, 0, 20],
- stops: [
- [0.4, '#888'],
- [0.6, '#555']
- ]
- },
- stroke: '#000000',
- style: {
- color: '#CCC',
- fontWeight: 'bold'
- },
- states: {
- hover: {
- fill: {
- linearGradient: [0, 0, 0, 20],
- stops: [
- [0.4, '#BBB'],
- [0.6, '#888']
- ]
- },
- stroke: '#000000',
- style: {
- color: 'white'
- }
- },
- select: {
- fill: {
- linearGradient: [0, 0, 0, 20],
- stops: [
- [0.1, '#000'],
- [0.3, '#333']
- ]
- },
- stroke: '#000000',
- style: {
- color: 'yellow'
- }
- }
- }
- },
- inputStyle: {
- backgroundColor: '#333',
- color: 'silver'
- },
- labelStyle: {
- color: 'silver'
- }
- },
-
- navigator: {
- handles: {
- backgroundColor: '#666',
- borderColor: '#AAA'
- },
- outlineColor: '#CCC',
- maskFill: 'rgba(16, 16, 16, 0.5)',
- series: {
- color: '#7798BF',
- lineColor: '#A6C7ED'
- }
- },
-
- scrollbar: {
- barBackgroundColor: {
- linearGradient: [0, 0, 0, 20],
- stops: [
- [0.4, '#888'],
- [0.6, '#555']
- ]
- },
- barBorderColor: '#CCC',
- buttonArrowColor: '#CCC',
- buttonBackgroundColor: {
- linearGradient: [0, 0, 0, 20],
- stops: [
- [0.4, '#888'],
- [0.6, '#555']
- ]
- },
- buttonBorderColor: '#CCC',
- rifleColor: '#FFF',
- trackBackgroundColor: {
- linearGradient: [0, 0, 0, 10],
- stops: [
- [0, '#000'],
- [1, '#333']
- ]
- },
- trackBorderColor: '#666'
- },
-
- // special colors for some of the
- legendBackgroundColor: 'rgba(0, 0, 0, 0.5)',
- legendBackgroundColorSolid: 'rgb(35, 35, 70)',
- dataLabelsColor: '#444',
- textColor: '#C0C0C0',
- maskColor: 'rgba(255,255,255,0.3)'
-};
-
-// Apply the theme
-var highchartsOptions = Highcharts.setOptions(Highcharts.theme);
diff --git a/src/common/lib/vendor/2amigos/yiiwheels/widgets/highcharts/assets/js/themes/gray.js b/src/common/lib/vendor/2amigos/yiiwheels/widgets/highcharts/assets/js/themes/gray.js
deleted file mode 100644
index e235a4d..0000000
--- a/src/common/lib/vendor/2amigos/yiiwheels/widgets/highcharts/assets/js/themes/gray.js
+++ /dev/null
@@ -1,262 +0,0 @@
-/**
- * Gray theme for Highcharts JS
- * @author Torstein Hønsi
- */
-
-Highcharts.theme = {
- colors: ["#DDDF0D", "#7798BF", "#55BF3B", "#DF5353", "#aaeeee", "#ff0066", "#eeaaee",
- "#55BF3B", "#DF5353", "#7798BF", "#aaeeee"],
- chart: {
- backgroundColor: {
- linearGradient: [0, 0, 0, 400],
- stops: [
- [0, 'rgb(96, 96, 96)'],
- [1, 'rgb(16, 16, 16)']
- ]
- },
- borderWidth: 0,
- borderRadius: 15,
- plotBackgroundColor: null,
- plotShadow: false,
- plotBorderWidth: 0
- },
- title: {
- style: {
- color: '#FFF',
- font: '16px Lucida Grande, Lucida Sans Unicode, Verdana, Arial, Helvetica, sans-serif'
- }
- },
- subtitle: {
- style: {
- color: '#DDD',
- font: '12px Lucida Grande, Lucida Sans Unicode, Verdana, Arial, Helvetica, sans-serif'
- }
- },
- xAxis: {
- gridLineWidth: 0,
- lineColor: '#999',
- tickColor: '#999',
- labels: {
- style: {
- color: '#999',
- fontWeight: 'bold'
- }
- },
- title: {
- style: {
- color: '#AAA',
- font: 'bold 12px Lucida Grande, Lucida Sans Unicode, Verdana, Arial, Helvetica, sans-serif'
- }
- }
- },
- yAxis: {
- alternateGridColor: null,
- minorTickInterval: null,
- gridLineColor: 'rgba(255, 255, 255, .1)',
- lineWidth: 0,
- tickWidth: 0,
- labels: {
- style: {
- color: '#999',
- fontWeight: 'bold'
- }
- },
- title: {
- style: {
- color: '#AAA',
- font: 'bold 12px Lucida Grande, Lucida Sans Unicode, Verdana, Arial, Helvetica, sans-serif'
- }
- }
- },
- legend: {
- itemStyle: {
- color: '#CCC'
- },
- itemHoverStyle: {
- color: '#FFF'
- },
- itemHiddenStyle: {
- color: '#333'
- }
- },
- labels: {
- style: {
- color: '#CCC'
- }
- },
- tooltip: {
- backgroundColor: {
- linearGradient: [0, 0, 0, 50],
- stops: [
- [0, 'rgba(96, 96, 96, .8)'],
- [1, 'rgba(16, 16, 16, .8)']
- ]
- },
- borderWidth: 0,
- style: {
- color: '#FFF'
- }
- },
-
-
- plotOptions: {
- line: {
- dataLabels: {
- color: '#CCC'
- },
- marker: {
- lineColor: '#333'
- }
- },
- spline: {
- marker: {
- lineColor: '#333'
- }
- },
- scatter: {
- marker: {
- lineColor: '#333'
- }
- },
- candlestick: {
- lineColor: 'white'
- }
- },
-
- toolbar: {
- itemStyle: {
- color: '#CCC'
- }
- },
-
- navigation: {
- buttonOptions: {
- backgroundColor: {
- linearGradient: [0, 0, 0, 20],
- stops: [
- [0.4, '#606060'],
- [0.6, '#333333']
- ]
- },
- borderColor: '#000000',
- symbolStroke: '#C0C0C0',
- hoverSymbolStroke: '#FFFFFF'
- }
- },
-
- exporting: {
- buttons: {
- exportButton: {
- symbolFill: '#55BE3B'
- },
- printButton: {
- symbolFill: '#7797BE'
- }
- }
- },
-
- // scroll charts
- rangeSelector: {
- buttonTheme: {
- fill: {
- linearGradient: [0, 0, 0, 20],
- stops: [
- [0.4, '#888'],
- [0.6, '#555']
- ]
- },
- stroke: '#000000',
- style: {
- color: '#CCC',
- fontWeight: 'bold'
- },
- states: {
- hover: {
- fill: {
- linearGradient: [0, 0, 0, 20],
- stops: [
- [0.4, '#BBB'],
- [0.6, '#888']
- ]
- },
- stroke: '#000000',
- style: {
- color: 'white'
- }
- },
- select: {
- fill: {
- linearGradient: [0, 0, 0, 20],
- stops: [
- [0.1, '#000'],
- [0.3, '#333']
- ]
- },
- stroke: '#000000',
- style: {
- color: 'yellow'
- }
- }
- }
- },
- inputStyle: {
- backgroundColor: '#333',
- color: 'silver'
- },
- labelStyle: {
- color: 'silver'
- }
- },
-
- navigator: {
- handles: {
- backgroundColor: '#666',
- borderColor: '#AAA'
- },
- outlineColor: '#CCC',
- maskFill: 'rgba(16, 16, 16, 0.5)',
- series: {
- color: '#7798BF',
- lineColor: '#A6C7ED'
- }
- },
-
- scrollbar: {
- barBackgroundColor: {
- linearGradient: [0, 0, 0, 20],
- stops: [
- [0.4, '#888'],
- [0.6, '#555']
- ]
- },
- barBorderColor: '#CCC',
- buttonArrowColor: '#CCC',
- buttonBackgroundColor: {
- linearGradient: [0, 0, 0, 20],
- stops: [
- [0.4, '#888'],
- [0.6, '#555']
- ]
- },
- buttonBorderColor: '#CCC',
- rifleColor: '#FFF',
- trackBackgroundColor: {
- linearGradient: [0, 0, 0, 10],
- stops: [
- [0, '#000'],
- [1, '#333']
- ]
- },
- trackBorderColor: '#666'
- },
-
- // special colors for some of the demo examples
- legendBackgroundColor: 'rgba(48, 48, 48, 0.8)',
- legendBackgroundColorSolid: 'rgb(70, 70, 70)',
- dataLabelsColor: '#444',
- textColor: '#E0E0E0',
- maskColor: 'rgba(255,255,255,0.3)'
-};
-
-// Apply the theme
-var highchartsOptions = Highcharts.setOptions(Highcharts.theme);
diff --git a/src/common/lib/vendor/2amigos/yiiwheels/widgets/highcharts/assets/js/themes/grid.js b/src/common/lib/vendor/2amigos/yiiwheels/widgets/highcharts/assets/js/themes/grid.js
deleted file mode 100644
index e6d141a..0000000
--- a/src/common/lib/vendor/2amigos/yiiwheels/widgets/highcharts/assets/js/themes/grid.js
+++ /dev/null
@@ -1,95 +0,0 @@
-/**
- * Grid theme for Highcharts JS
- * @author Torstein Hønsi
- */
-
-Highcharts.theme = {
- colors: ['#058DC7', '#50B432', '#ED561B', '#DDDF00', '#24CBE5', '#64E572', '#FF9655', '#FFF263', '#6AF9C4'],
- chart: {
- backgroundColor: {
- linearGradient: [0, 0, 500, 500],
- stops: [
- [0, 'rgb(255, 255, 255)'],
- [1, 'rgb(240, 240, 255)']
- ]
- },
- borderWidth: 2,
- plotBackgroundColor: 'rgba(255, 255, 255, .9)',
- plotShadow: true,
- plotBorderWidth: 1
- },
- title: {
- style: {
- color: '#000',
- font: 'bold 16px "Trebuchet MS", Verdana, sans-serif'
- }
- },
- subtitle: {
- style: {
- color: '#666666',
- font: 'bold 12px "Trebuchet MS", Verdana, sans-serif'
- }
- },
- xAxis: {
- gridLineWidth: 1,
- lineColor: '#000',
- tickColor: '#000',
- labels: {
- style: {
- color: '#000',
- font: '11px Trebuchet MS, Verdana, sans-serif'
- }
- },
- title: {
- style: {
- color: '#333',
- fontWeight: 'bold',
- fontSize: '12px',
- fontFamily: 'Trebuchet MS, Verdana, sans-serif'
-
- }
- }
- },
- yAxis: {
- minorTickInterval: 'auto',
- lineColor: '#000',
- lineWidth: 1,
- tickWidth: 1,
- tickColor: '#000',
- labels: {
- style: {
- color: '#000',
- font: '11px Trebuchet MS, Verdana, sans-serif'
- }
- },
- title: {
- style: {
- color: '#333',
- fontWeight: 'bold',
- fontSize: '12px',
- fontFamily: 'Trebuchet MS, Verdana, sans-serif'
- }
- }
- },
- legend: {
- itemStyle: {
- font: '9pt Trebuchet MS, Verdana, sans-serif',
- color: 'black'
-
- },
- itemHoverStyle: {
- color: '#039'
- },
- itemHiddenStyle: {
- color: 'gray'
- }
- },
- labels: {
- style: {
- color: '#99b'
- }
- }
-};
-
-// Apply the theme
-var highchartsOptions = Highcharts.setOptions(Highcharts.theme);
diff --git a/src/common/lib/vendor/2amigos/yiiwheels/widgets/highcharts/assets/js/themes/skies.js b/src/common/lib/vendor/2amigos/yiiwheels/widgets/highcharts/assets/js/themes/skies.js
deleted file mode 100644
index cca39d1..0000000
--- a/src/common/lib/vendor/2amigos/yiiwheels/widgets/highcharts/assets/js/themes/skies.js
+++ /dev/null
@@ -1,89 +0,0 @@
-/**
- * Skies theme for Highcharts JS
- * @author Torstein Hønsi
- */
-
-Highcharts.theme = {
- colors: ["#514F78", "#42A07B", "#9B5E4A", "#72727F", "#1F949A", "#82914E", "#86777F", "#42A07B"],
- chart: {
- className: 'skies',
- borderWidth: 0,
- plotShadow: true,
- plotBackgroundImage: '/demo/gfx/skies.jpg',
- plotBackgroundColor: {
- linearGradient: [0, 0, 250, 500],
- stops: [
- [0, 'rgba(255, 255, 255, 1)'],
- [1, 'rgba(255, 255, 255, 0)']
- ]
- },
- plotBorderWidth: 1
- },
- title: {
- style: {
- color: '#3E576F',
- font: '16px Lucida Grande, Lucida Sans Unicode, Verdana, Arial, Helvetica, sans-serif'
- }
- },
- subtitle: {
- style: {
- color: '#6D869F',
- font: '12px Lucida Grande, Lucida Sans Unicode, Verdana, Arial, Helvetica, sans-serif'
- }
- },
- xAxis: {
- gridLineWidth: 0,
- lineColor: '#C0D0E0',
- tickColor: '#C0D0E0',
- labels: {
- style: {
- color: '#666',
- fontWeight: 'bold'
- }
- },
- title: {
- style: {
- color: '#666',
- font: '12px Lucida Grande, Lucida Sans Unicode, Verdana, Arial, Helvetica, sans-serif'
- }
- }
- },
- yAxis: {
- alternateGridColor: 'rgba(255, 255, 255, .5)',
- lineColor: '#C0D0E0',
- tickColor: '#C0D0E0',
- tickWidth: 1,
- labels: {
- style: {
- color: '#666',
- fontWeight: 'bold'
- }
- },
- title: {
- style: {
- color: '#666',
- font: '12px Lucida Grande, Lucida Sans Unicode, Verdana, Arial, Helvetica, sans-serif'
- }
- }
- },
- legend: {
- itemStyle: {
- font: '9pt Trebuchet MS, Verdana, sans-serif',
- color: '#3E576F'
- },
- itemHoverStyle: {
- color: 'black'
- },
- itemHiddenStyle: {
- color: 'silver'
- }
- },
- labels: {
- style: {
- color: '#3E576F'
- }
- }
-};
-
-// Apply the theme
-var highchartsOptions = Highcharts.setOptions(Highcharts.theme);
diff --git a/src/common/lib/vendor/2amigos/yiiwheels/widgets/html5editor/WhHtml5Editor.php b/src/common/lib/vendor/2amigos/yiiwheels/widgets/html5editor/WhHtml5Editor.php
deleted file mode 100644
index ec74658..0000000
--- a/src/common/lib/vendor/2amigos/yiiwheels/widgets/html5editor/WhHtml5Editor.php
+++ /dev/null
@@ -1,117 +0,0 @@
-
- * @copyright Copyright © 2amigos.us 2013-
- * @license http://www.opensource.org/licenses/bsd-license.php New BSD License
- * @package YiiWheels.widgets.highcharts
- * @uses YiiWheels.WhHtml
- */
-class WhHtml5Editor extends CInputWidget
-{
- /**
- * Editor language
- * Supports: de-DE, es-ES, fr-FR, pt-BR, sv-SE
- */
- public $lang = 'en';
-
- /**
- * Html options that will be assigned to the text area
- */
- public $htmlOptions = array();
-
- /**
- * Editor options that will be passed to the editor
- */
- public $pluginOptions = array();
-
- /**
- * Editor width
- */
- public $width = '100%';
-
- /**
- * Editor height
- */
- public $height = '400px';
-
- /**
- * Display editor
- */
- public function run()
- {
-
- list($name, $id) = $this->resolveNameID();
-
- $this->registerClientScript($id);
-
- $this->htmlOptions['id'] = $id;
-
- if (!array_key_exists('style', $this->htmlOptions))
- $this->htmlOptions['style'] = "width:{$this->width};height:{$this->height};";
- // Do we have a model?
- if ($this->hasModel())
- echo CHtml::activeTextArea($this->model, $this->attribute, $this->htmlOptions);
- else
- echo CHtml::textArea($name, $this->value, $this->htmlOptions);
- }
-
- /**
- * Register required script files
- * @param string $id
- */
- public function registerClientScript($id)
- {
- /* publish assets dir */
- $path = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'assets';
- $assetsUrl = $this->getAssetsUrl($path);
-
- /* @var $cs CClientScript */
- $cs = Yii::app()->getClientScript();
-
- $cs->registerCssFile($assetsUrl . '/css/bootstrap-wysihtml5.css');
- if (isset($this->pluginOptions['color'])) {
- $cs->registerCssFile($assetsUrl . '/css/wysiwyg-color.css');
- }
-
- $cs->registerScriptFile($assetsUrl . '/js/wysihtml5-0.3.0.js');
- $cs->registerScriptFile($assetsUrl . '/js/bootstrap-wysihtml5.js');
-
- if (in_array(@$this->pluginOptions['locale'], array('de-DE', 'es-ES', 'fr', 'fr-NL', 'pt-BR', 'sv-SE'))) {
- $cs->registerScriptFile(
- $assetsUrl . '/js/locale/bootstrap-wysihtml5.' . $this->pluginOptions['locale'] . '.js'
- );
- } elseif (in_array($this->lang, array('de-DE', 'es-ES', 'fr', 'fr-NL', 'pt-BR', 'sv-SE'))) {
- $cs->registerScriptFile($assetsUrl . '/js/locale/bootstrap-wysihtml5.' . $this->lang . '.js');
- $this->pluginOptions['locale'] = $this->lang;
- }
-
- $this->normalizeStylesheetsProperty();
-
- /* initialize plugin */
- $selector = '#' . WhHtml::getOption('id', $this->htmlOptions, $this->getId());
-
- $this->getApi()->registerPlugin('wysihtml5', $selector, $this->pluginOptions);
-
- }
-
- /**
- * Normalizes stylesheet property
- */
- private function normalizeStylesheetsProperty()
- {
- if (empty($this->pluginOptions['stylesheets']))
- $this->pluginOptions['stylesheets'] = array();
- else if (is_array($this->pluginOptions['stylesheets']))
- $this->pluginOptions['stylesheets'] = array_filter($this->pluginOptions['stylesheets'], 'is_string');
- else if (is_string($this->pluginOptions['stylesheets']))
- $this->pluginOptions['stylesheets'] = array($this->pluginOptions['stylesheets']);
- else
- $this->pluginOptions['stylesheets'] = array();
- }
-}
diff --git a/src/common/lib/vendor/2amigos/yiiwheels/widgets/html5editor/assets/css/bootstrap-wysihtml5.css b/src/common/lib/vendor/2amigos/yiiwheels/widgets/html5editor/assets/css/bootstrap-wysihtml5.css
deleted file mode 100644
index 7948ae0..0000000
--- a/src/common/lib/vendor/2amigos/yiiwheels/widgets/html5editor/assets/css/bootstrap-wysihtml5.css
+++ /dev/null
@@ -1,102 +0,0 @@
-ul.wysihtml5-toolbar {
- margin: 0;
- padding: 0;
- display: block;
-}
-
-ul.wysihtml5-toolbar::after {
- clear: both;
- display: table;
- content: "";
-}
-
-ul.wysihtml5-toolbar > li {
- float: left;
- display: list-item;
- list-style: none;
- margin: 0 5px 10px 0;
-}
-
-ul.wysihtml5-toolbar a[data-wysihtml5-command=bold] {
- font-weight: bold;
-}
-
-ul.wysihtml5-toolbar a[data-wysihtml5-command=italic] {
- font-style: italic;
-}
-
-ul.wysihtml5-toolbar a[data-wysihtml5-command=underline] {
- text-decoration: underline;
-}
-
-ul.wysihtml5-toolbar a.btn.wysihtml5-command-active {
- background-image: none;
- -webkit-box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15),0 1px 2px rgba(0, 0, 0, 0.05);
- -moz-box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15),0 1px 2px rgba(0, 0, 0, 0.05);
- box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15),0 1px 2px rgba(0, 0, 0, 0.05);
- background-color: #E6E6E6;
- background-color: #D9D9D9;
- outline: 0;
-}
-
-ul.wysihtml5-commands-disabled .dropdown-menu {
- display: none !important;
-}
-
-ul.wysihtml5-toolbar div.wysihtml5-colors {
- display:block;
- width: 50px;
- height: 20px;
- margin-top: 2px;
- margin-left: 5px;
- position: absolute;
- pointer-events: none;
-}
-
-ul.wysihtml5-toolbar a.wysihtml5-colors-title {
- padding-left: 70px;
-}
-
-ul.wysihtml5-toolbar div[data-wysihtml5-command-value="black"] {
- background: black !important;
-}
-
-ul.wysihtml5-toolbar div[data-wysihtml5-command-value="silver"] {
- background: silver !important;
-}
-
-ul.wysihtml5-toolbar div[data-wysihtml5-command-value="gray"] {
- background: gray !important;
-}
-
-ul.wysihtml5-toolbar div[data-wysihtml5-command-value="maroon"] {
- background: maroon !important;
-}
-
-ul.wysihtml5-toolbar div[data-wysihtml5-command-value="red"] {
- background: red !important;
-}
-
-ul.wysihtml5-toolbar div[data-wysihtml5-command-value="purple"] {
- background: purple !important;
-}
-
-ul.wysihtml5-toolbar div[data-wysihtml5-command-value="green"] {
- background: green !important;
-}
-
-ul.wysihtml5-toolbar div[data-wysihtml5-command-value="olive"] {
- background: olive !important;
-}
-
-ul.wysihtml5-toolbar div[data-wysihtml5-command-value="navy"] {
- background: navy !important;
-}
-
-ul.wysihtml5-toolbar div[data-wysihtml5-command-value="blue"] {
- background: blue !important;
-}
-
-ul.wysihtml5-toolbar div[data-wysihtml5-command-value="orange"] {
- background: orange !important;
-}
\ No newline at end of file
diff --git a/src/common/lib/vendor/2amigos/yiiwheels/widgets/html5editor/assets/css/wysiwyg-color.css b/src/common/lib/vendor/2amigos/yiiwheels/widgets/html5editor/assets/css/wysiwyg-color.css
deleted file mode 100644
index fee5d9f..0000000
--- a/src/common/lib/vendor/2amigos/yiiwheels/widgets/html5editor/assets/css/wysiwyg-color.css
+++ /dev/null
@@ -1,71 +0,0 @@
-/**
- * Default stylesheet for the bootstrap-wysihtml5 editor.
- * See the TbHtml5Editor widget for details.
- */
-.wysiwyg-color-black {
- color: black;
-}
-
-.wysiwyg-color-silver {
- color: silver;
-}
-
-.wysiwyg-color-gray {
- color: gray;
-}
-
-.wysiwyg-color-white {
- color: white;
-}
-
-.wysiwyg-color-maroon {
- color: maroon;
-}
-
-.wysiwyg-color-red {
- color: red;
-}
-
-.wysiwyg-color-purple {
- color: purple;
-}
-
-.wysiwyg-color-fuchsia {
- color: fuchsia;
-}
-
-.wysiwyg-color-green {
- color: green;
-}
-
-.wysiwyg-color-lime {
- color: lime;
-}
-
-.wysiwyg-color-olive {
- color: olive;
-}
-
-.wysiwyg-color-yellow {
- color: yellow;
-}
-
-.wysiwyg-color-navy {
- color: navy;
-}
-
-.wysiwyg-color-blue {
- color: blue;
-}
-
-.wysiwyg-color-teal {
- color: teal;
-}
-
-.wysiwyg-color-aqua {
- color: aqua;
-}
-
-.wysiwyg-color-orange {
- color: orange;
-}
\ No newline at end of file
diff --git a/src/common/lib/vendor/2amigos/yiiwheels/widgets/html5editor/assets/js/bootstrap-wysihtml5.js b/src/common/lib/vendor/2amigos/yiiwheels/widgets/html5editor/assets/js/bootstrap-wysihtml5.js
deleted file mode 100644
index f07dadd..0000000
--- a/src/common/lib/vendor/2amigos/yiiwheels/widgets/html5editor/assets/js/bootstrap-wysihtml5.js
+++ /dev/null
@@ -1,458 +0,0 @@
-!function($, wysi) {
- "use strict";
-
- var templates = function(key, locale) {
-
- var tpl = {
- "font-styles":
- "" +
- "" +
- " " + locale.font_styles.normal + " " +
- " " +
- "" +
- " ",
-
- "emphasis":
- "" +
- "" +
- " ",
-
- "lists":
- "" +
- "" +
- "
" +
- "
" +
- "
" +
- "
" +
- "
" +
- " ",
-
- "link":
- "" +
- "" +
- "" +
- "
" +
- " " +
- "
" +
- "" +
- "
" +
- " " +
- " ",
-
- "image":
- "" +
- "" +
- "" +
- "
" +
- " " +
- "
" +
- "" +
- "
" +
- " " +
- " ",
-
- "html":
- "" +
- "" +
- " ",
-
- "color":
- "" +
- "" +
- "" + locale.colours.black + " " +
- " " +
- "" +
- " "
- };
- return tpl[key];
- };
-
-
- var Wysihtml5 = function(el, options) {
- this.el = el;
- this.toolbar = this.createToolbar(el, options || defaultOptions);
- this.editor = this.createEditor(options);
-
- window.editor = this.editor;
-
- $('iframe.wysihtml5-sandbox').each(function(i, el){
- $(el.contentWindow).off('focus.wysihtml5').on({
- 'focus.wysihtml5' : function(){
- $('li.dropdown').removeClass('open');
- }
- });
- });
- };
-
- Wysihtml5.prototype = {
-
- constructor: Wysihtml5,
-
- createEditor: function(options) {
- options = options || {};
- options.toolbar = this.toolbar[0];
-
- var editor = new wysi.Editor(this.el[0], options);
-
- if(options && options.events) {
- for(var eventName in options.events) {
- editor.on(eventName, options.events[eventName]);
- }
- }
- return editor;
- },
-
- createToolbar: function(el, options) {
- var self = this;
- var toolbar = $("", {
- 'class' : "wysihtml5-toolbar",
- 'style': "display:none"
- });
- var culture = options.locale || defaultOptions.locale || "en";
- for(var key in defaultOptions) {
- var value = false;
-
- if(options[key] !== undefined) {
- if(options[key] === true) {
- value = true;
- }
- } else {
- value = defaultOptions[key];
- }
-
- if(value === true) {
- toolbar.append(templates(key, locale[culture]));
-
- if(key === "html") {
- this.initHtml(toolbar);
- }
-
- if(key === "link") {
- this.initInsertLink(toolbar);
- }
-
- if(key === "image") {
- this.initInsertImage(toolbar);
- }
- }
- }
-
- if(options.toolbar) {
- for(key in options.toolbar) {
- toolbar.append(options.toolbar[key]);
- }
- }
-
- toolbar.find("a[data-wysihtml5-command='formatBlock']").click(function(e) {
- var target = e.target || e.srcElement;
- var el = $(target);
- self.toolbar.find('.current-font').text(el.html());
- });
-
- toolbar.find("a[data-wysihtml5-command='foreColor']").click(function(e) {
- var target = e.target || e.srcElement;
- var el = $(target);
- self.toolbar.find('.current-color').text(el.html());
- });
-
- this.el.before(toolbar);
-
- return toolbar;
- },
-
- initHtml: function(toolbar) {
- var changeViewSelector = "a[data-wysihtml5-action='change_view']";
- toolbar.find(changeViewSelector).click(function(e) {
- toolbar.find('a.btn').not(changeViewSelector).toggleClass('disabled');
- });
- },
-
- initInsertImage: function(toolbar) {
- var self = this;
- var insertImageModal = toolbar.find('.bootstrap-wysihtml5-insert-image-modal');
- var urlInput = insertImageModal.find('.bootstrap-wysihtml5-insert-image-url');
- var insertButton = insertImageModal.find('a.btn-primary');
- var initialValue = urlInput.val();
-
- var insertImage = function() {
- var url = urlInput.val();
- urlInput.val(initialValue);
- self.editor.composer.commands.exec("insertImage", url);
- };
-
- urlInput.keypress(function(e) {
- if(e.which == 13) {
- insertImage();
- insertImageModal.modal('hide');
- }
- });
-
- insertButton.click(insertImage);
-
- insertImageModal.on('shown', function() {
- urlInput.focus();
- });
-
- insertImageModal.on('hide', function() {
- self.editor.currentView.element.focus();
- });
-
- toolbar.find('a[data-wysihtml5-command=insertImage]').click(function() {
- var activeButton = $(this).hasClass("wysihtml5-command-active");
-
- if (!activeButton) {
- insertImageModal.modal('show');
- insertImageModal.on('click.dismiss.modal', '[data-dismiss="modal"]', function(e) {
- e.stopPropagation();
- });
- return false;
- }
- else {
- return true;
- }
- });
- },
-
- initInsertLink: function(toolbar) {
- var self = this;
- var insertLinkModal = toolbar.find('.bootstrap-wysihtml5-insert-link-modal');
- var urlInput = insertLinkModal.find('.bootstrap-wysihtml5-insert-link-url');
- var insertButton = insertLinkModal.find('a.btn-primary');
- var initialValue = urlInput.val();
-
- var insertLink = function() {
- var url = urlInput.val();
- urlInput.val(initialValue);
- self.editor.composer.commands.exec("createLink", {
- href: url,
- target: "_blank",
- rel: "nofollow"
- });
- };
- var pressedEnter = false;
-
- urlInput.keypress(function(e) {
- if(e.which == 13) {
- insertLink();
- insertLinkModal.modal('hide');
- }
- });
-
- insertButton.click(insertLink);
-
- insertLinkModal.on('shown', function() {
- urlInput.focus();
- });
-
- insertLinkModal.on('hide', function() {
- self.editor.currentView.element.focus();
- });
-
- toolbar.find('a[data-wysihtml5-command=createLink]').click(function() {
- var activeButton = $(this).hasClass("wysihtml5-command-active");
-
- if (!activeButton) {
- insertLinkModal.modal('show');
- insertLinkModal.on('click.dismiss.modal', '[data-dismiss="modal"]', function(e) {
- e.stopPropagation();
- });
- return false;
- }
- else {
- return true;
- }
- });
- }
- };
-
- // these define our public api
- var methods = {
- resetDefaults: function() {
- $.fn.wysihtml5.defaultOptions = $.extend(true, {}, $.fn.wysihtml5.defaultOptionsCache);
- },
- bypassDefaults: function(options) {
- return this.each(function () {
- var $this = $(this);
- $this.data('wysihtml5', new Wysihtml5($this, options));
- });
- },
- shallowExtend: function (options) {
- var settings = $.extend({}, $.fn.wysihtml5.defaultOptions, options || {});
- var that = this;
- return methods.bypassDefaults.apply(that, [settings]);
- },
- deepExtend: function(options) {
- var settings = $.extend(true, {}, $.fn.wysihtml5.defaultOptions, options || {});
- var that = this;
- return methods.bypassDefaults.apply(that, [settings]);
- },
- init: function(options) {
- var that = this;
- return methods.shallowExtend.apply(that, [options]);
- }
- };
-
- $.fn.wysihtml5 = function ( method ) {
- if ( methods[method] ) {
- return methods[method].apply( this, Array.prototype.slice.call( arguments, 1 ));
- } else if ( typeof method === 'object' || ! method ) {
- return methods.init.apply( this, arguments );
- } else {
- $.error( 'Method ' + method + ' does not exist on jQuery.wysihtml5' );
- }
- };
-
- $.fn.wysihtml5.Constructor = Wysihtml5;
-
- var defaultOptions = $.fn.wysihtml5.defaultOptions = {
- "font-styles": true,
- "color": false,
- "emphasis": true,
- "lists": true,
- "html": false,
- "link": true,
- "image": true,
- events: {},
- parserRules: {
- classes: {
- // (path_to_project/lib/css/wysiwyg-color.css)
- "wysiwyg-color-silver" : 1,
- "wysiwyg-color-gray" : 1,
- "wysiwyg-color-white" : 1,
- "wysiwyg-color-maroon" : 1,
- "wysiwyg-color-red" : 1,
- "wysiwyg-color-purple" : 1,
- "wysiwyg-color-fuchsia" : 1,
- "wysiwyg-color-green" : 1,
- "wysiwyg-color-lime" : 1,
- "wysiwyg-color-olive" : 1,
- "wysiwyg-color-yellow" : 1,
- "wysiwyg-color-navy" : 1,
- "wysiwyg-color-blue" : 1,
- "wysiwyg-color-teal" : 1,
- "wysiwyg-color-aqua" : 1,
- "wysiwyg-color-orange" : 1,
- },
- tags: {
- "b": {},
- "i": {},
- "br": {},
- "ol": {},
- "ul": {},
- "li": {},
- "h1": {},
- "h2": {},
- "h3": {},
- "blockquote": {},
- "u": 1,
- "img": {
- "check_attributes": {
- "width": "numbers",
- "alt": "alt",
- "src": "url",
- "height": "numbers"
- }
- },
- "a": {
- set_attributes: {
- target: "_blank",
- rel: "nofollow"
- },
- check_attributes: {
- href: "url" // important to avoid XSS
- }
- },
- "span": 1,
- "div": 1
- }
- },
- stylesheets: ["./lib/css/wysiwyg-color.css"], // (path_to_project/lib/css/wysiwyg-color.css)
- locale: "en"
- };
-
- if (typeof $.fn.wysihtml5.defaultOptionsCache === 'undefined') {
- $.fn.wysihtml5.defaultOptionsCache = $.extend(true, {}, $.fn.wysihtml5.defaultOptions);
- }
-
- var locale = $.fn.wysihtml5.locale = {
- en: {
- font_styles: {
- normal: "Normal text",
- h1: "Heading 1",
- h2: "Heading 2",
- h3: "Heading 3"
- },
- emphasis: {
- bold: "Bold",
- italic: "Italic",
- underline: "Underline"
- },
- lists: {
- unordered: "Unordered list",
- ordered: "Ordered list",
- outdent: "Outdent",
- indent: "Indent"
- },
- link: {
- insert: "Insert link",
- cancel: "Cancel"
- },
- image: {
- insert: "Insert image",
- cancel: "Cancel"
- },
- html: {
- edit: "Edit HTML"
- },
- colours: {
- black: "Black",
- silver: "Silver",
- gray: "Grey",
- maroon: "Maroon",
- red: "Red",
- purple: "Purple",
- green: "Green",
- olive: "Olive",
- navy: "Navy",
- blue: "Blue",
- orange: "Orange"
- }
- }
- };
-
-}(window.jQuery, window.wysihtml5);
diff --git a/src/common/lib/vendor/2amigos/yiiwheels/widgets/html5editor/assets/js/locale/bootstrap-wysihtml5.bg-BG.js b/src/common/lib/vendor/2amigos/yiiwheels/widgets/html5editor/assets/js/locale/bootstrap-wysihtml5.bg-BG.js
deleted file mode 100644
index 6b1200e..0000000
--- a/src/common/lib/vendor/2amigos/yiiwheels/widgets/html5editor/assets/js/locale/bootstrap-wysihtml5.bg-BG.js
+++ /dev/null
@@ -1,48 +0,0 @@
-/**
- * Bulgarian translation for bootstrap-wysihtml5
- */
-(function($){
- $.fn.wysihtml5.locale["bg-BG"] = {
- font_styles: {
- normal: "Ðормален текÑÑ‚",
- h1: "Форматиране 1",
- h2: "Форматиране 2",
- h3: "Форматиране 3"
- },
- emphasis: {
- bold: "Болд",
- italic: "Италик",
- underline: "Подчертаване"
- },
- lists: {
- unordered: "Ðеподреден лиÑÑ‚",
- ordered: "Подреден лиÑÑ‚",
- outdent: "ОтÑтъпване",
- indent: "ЗаÑтъпване"
- },
- link: {
- insert: "ПоÑтавете линк",
- cancel: "Отказване"
- },
- image: {
- insert: "ПоÑтавете изображение",
- cancel: "Отказване"
- },
- html: {
- edit: "Ð ÐµÐ´Ð°ÐºÑ†Ð¸Ñ Ð½Ð° HTML"
- },
- colours: {
- black: "Черно",
- silver: "Сребърно",
- gray: "Сиво",
- maroon: "КеÑтенÑво",
- red: "Червено",
- purple: "Пурпурно",
- green: "Зелено",
- olive: "МаÑлинено",
- navy: "МорÑко Ñиньо",
- blue: "Синьо",
- orange: "Оранжево"
- }
- };
-}(jQuery));
diff --git a/src/common/lib/vendor/2amigos/yiiwheels/widgets/html5editor/assets/js/locale/bootstrap-wysihtml5.de-DE.js b/src/common/lib/vendor/2amigos/yiiwheels/widgets/html5editor/assets/js/locale/bootstrap-wysihtml5.de-DE.js
deleted file mode 100644
index 8b89bd1..0000000
--- a/src/common/lib/vendor/2amigos/yiiwheels/widgets/html5editor/assets/js/locale/bootstrap-wysihtml5.de-DE.js
+++ /dev/null
@@ -1,48 +0,0 @@
-/**
- * German translation for bootstrap-wysihtml5
- */
-(function($){
- $.fn.wysihtml5.locale["de-DE"] = {
- font_styles: {
- normal: "Normaler Text",
- h1: "Überschrift 1",
- h2: "Überschrift 2",
- h3: "Überschrift 3"
- },
- emphasis: {
- bold: "Fett",
- italic: "Kursiv",
- underline: "Unterstrichen"
- },
- lists: {
- unordered: "Ungeordnete Liste",
- ordered: "Geordnete Liste",
- outdent: "Einzug verkleinern",
- indent: "Einzug vergrößern"
- },
- link: {
- insert: "Link einfügen",
- cancel: "Abbrechen"
- },
- image: {
- insert: "Bild einfügen",
- cancel: "Abbrechen"
- },
- html: {
- edit: "HTML bearbeiten"
- },
- colours: {
- black: "Schwarz",
- silver: "Silber",
- gray: "Grau",
- maroon: "Kastanienbraun",
- red: "Rot",
- purple: "Violett",
- green: "Grün",
- olive: "Olivgrün",
- navy: "Marineblau",
- blue: "Blau",
- orange: "Orange"
- }
- };
-}(jQuery));
diff --git a/src/common/lib/vendor/2amigos/yiiwheels/widgets/html5editor/assets/js/locale/bootstrap-wysihtml5.es-ES.js b/src/common/lib/vendor/2amigos/yiiwheels/widgets/html5editor/assets/js/locale/bootstrap-wysihtml5.es-ES.js
deleted file mode 100644
index 134a219..0000000
--- a/src/common/lib/vendor/2amigos/yiiwheels/widgets/html5editor/assets/js/locale/bootstrap-wysihtml5.es-ES.js
+++ /dev/null
@@ -1,34 +0,0 @@
-/**
- * Uruguayan spanish translation for bootstrap-wysihtml5
- */
-(function($){
- $.fn.wysihtml5.locale["es-ES"] = {
- font_styles: {
- normal: "Texto normal",
- h1: "TÃtulo 1",
- h2: "TÃtulo 2"
- },
- emphasis: {
- bold: "Negrita",
- italic: "Itálica",
- underline: "Subrayado"
- },
- lists: {
- unordered: "Lista desordenada",
- ordered: "Lista ordenada",
- outdent: "Eliminar sangrÃa",
- indent: "Agregar sangrÃa"
- },
- link: {
- insert: "Insertar link",
- cancel: "Cancelar"
- },
- image: {
- insert: "Insertar imagen",
- cancel: "Cancelar"
- },
- html: {
- edit: "Editar HTML"
- }
- };
-}(jQuery));
\ No newline at end of file
diff --git a/src/common/lib/vendor/2amigos/yiiwheels/widgets/html5editor/assets/js/locale/bootstrap-wysihtml5.fr-FR.js b/src/common/lib/vendor/2amigos/yiiwheels/widgets/html5editor/assets/js/locale/bootstrap-wysihtml5.fr-FR.js
deleted file mode 100644
index e6d02a0..0000000
--- a/src/common/lib/vendor/2amigos/yiiwheels/widgets/html5editor/assets/js/locale/bootstrap-wysihtml5.fr-FR.js
+++ /dev/null
@@ -1,49 +0,0 @@
-/**
- * French translation for bootstrap-wysihtml5
- */
-(function($){
- $.fn.wysihtml5.locale["fr-FR"] = {
- font_styles: {
- normal: "Texte normal",
- h1: "Titre 1",
- h2: "Titre 2",
- h3: "Titre 3"
- },
- emphasis: {
- bold: "Gras",
- italic: "Italique",
- underline: "Souligné"
- },
- lists: {
- unordered: "Liste à puces",
- ordered: "Liste numérotée",
- outdent: "Diminuer le retrait",
- indent: "Augmenter le retrait",
- indered: "Augmenter le retrait"
- },
- link: {
- insert: "Insérer un lien",
- cancel: "Annuler"
- },
- image: {
- insert: "Insérer une image",
- cancel: "Annuler"
- },
- html: {
- edit: "Editer en HTML"
- },
- colours: {
- black: "Noir",
- silver: "Gris clair",
- gray: "Gris",
- maroon: "Marron",
- red: "Rouge",
- purple: "Pourpre",
- green: "Vert",
- olive: "Olive",
- navy: "Bleu marine",
- blue: "Bleu",
- orange: "Orange"
- }
- };
-}(jQuery));
\ No newline at end of file
diff --git a/src/common/lib/vendor/2amigos/yiiwheels/widgets/html5editor/assets/js/locale/bootstrap-wysihtml5.fr-NL.js b/src/common/lib/vendor/2amigos/yiiwheels/widgets/html5editor/assets/js/locale/bootstrap-wysihtml5.fr-NL.js
deleted file mode 100644
index 1b0a102..0000000
--- a/src/common/lib/vendor/2amigos/yiiwheels/widgets/html5editor/assets/js/locale/bootstrap-wysihtml5.fr-NL.js
+++ /dev/null
@@ -1,48 +0,0 @@
-/**
- * German translation for bootstrap-wysihtml5
- */
-(function($){
- $.fn.wysihtml5.locale["nl-NL"] = {
- font_styles: {
- normal: "Normale tekst",
- h1: "Kop 1",
- h2: "Kop 2",
- h3: "Kop 3"
- },
- emphasis: {
- bold: "Vet",
- italic: "Cursief",
- underline: "Onderstrepen"
- },
- lists: {
- unordered: "Lijst met opsommingstekens",
- ordered: "Genummerde lijst",
- outdent: "Inspringing verkleinen",
- indent: "Inspringing vergroten"
- },
- link: {
- insert: "Link invoegen",
- cancel: "Annuleer"
- },
- image: {
- insert: "Afbeelding invoegen",
- cancel: "Annuleer"
- },
- html: {
- edit: "HTML bewerken"
- },
- colours: {
- black: "Zwart",
- silver: "Zilver",
- gray: "Grijs",
- maroon: "Kastanjebruin",
- red: "Root",
- purple: "Paars",
- green: "Groen",
- olive: "Olijfgroen",
- navy: "Donkerblauw",
- blue: "Blauw",
- orange: "Oranje"
- }
- };
-}(jQuery));
\ No newline at end of file
diff --git a/src/common/lib/vendor/2amigos/yiiwheels/widgets/html5editor/assets/js/locale/bootstrap-wysihtml5.hu-HU.js b/src/common/lib/vendor/2amigos/yiiwheels/widgets/html5editor/assets/js/locale/bootstrap-wysihtml5.hu-HU.js
deleted file mode 100644
index 0f8169f..0000000
--- a/src/common/lib/vendor/2amigos/yiiwheels/widgets/html5editor/assets/js/locale/bootstrap-wysihtml5.hu-HU.js
+++ /dev/null
@@ -1,48 +0,0 @@
-/**
- * Hungarian translation for bootstrap-wysihtml5
- */
-(function($){
- $.fn.wysihtml5.locale["hu-HU"] = {
- font_styles: {
- normal: "Normál szöveg",
- h1: "Fejléc 1",
- h2: "Fejléc 2",
- h3: "Fejléc 3"
- },
- emphasis: {
- bold: "Félkövér",
- italic: "Dőlt",
- underline: "Aláhúzott"
- },
- lists: {
- unordered: "Rendezetlen lista",
- ordered: "Rendezett lista",
- outdent: "Behúzás csökkentése",
- indent: "Behúzás"
- },
- link: {
- insert: "Link beszúrása",
- cancel: "Mégsem"
- },
- image: {
- insert: "Kép beszúrása",
- cancel: "Mégsem"
- },
- html: {
- edit: "HTML szerkesztése"
- },
- colours: {
- black: "Fekete",
- silver: "Ezüst",
- gray: "Szürke",
- maroon: "Barna",
- red: "Piros",
- purple: "Lila",
- green: "Zöld",
- olive: "Olivazöld",
- navy: "Sötétkék",
- blue: "Kék",
- orange: "Narancssárga"
- }
- };
-}(jQuery));
diff --git a/src/common/lib/vendor/2amigos/yiiwheels/widgets/html5editor/assets/js/locale/bootstrap-wysihtml5.pt-BR.js b/src/common/lib/vendor/2amigos/yiiwheels/widgets/html5editor/assets/js/locale/bootstrap-wysihtml5.pt-BR.js
deleted file mode 100644
index 7070d4e..0000000
--- a/src/common/lib/vendor/2amigos/yiiwheels/widgets/html5editor/assets/js/locale/bootstrap-wysihtml5.pt-BR.js
+++ /dev/null
@@ -1,48 +0,0 @@
-/**
- * Brazilian portuguese translation for bootstrap-wysihtml5
- */
-(function($){
- $.fn.wysihtml5.locale["pt-BR"] = {
- font_styles: {
- normal: "Texto normal",
- h1: "TÃtulo 1",
- h2: "TÃtulo 2",
- h3: "TÃtulo 3"
- },
- emphasis: {
- bold: "Negrito",
- italic: "Itálico",
- underline: "Sublinhado"
- },
- lists: {
- unordered: "Lista",
- ordered: "Lista numerada",
- outdent: "Remover indentação",
- indent: "Indentar"
- },
- link: {
- insert: "Inserir link",
- cancel: "Cancelar"
- },
- image: {
- insert: "Inserir imagem",
- cancel: "Cancelar"
- },
- html: {
- edit: "Editar HTML"
- },
- colours: {
- black: "Preto",
- silver: "Prata",
- gray: "Cinza",
- maroon: "Marrom",
- red: "Vermelho",
- purple: "Roxo",
- green: "Verde",
- olive: "Oliva",
- navy: "Marinho",
- blue: "Azul",
- orange: "Laranja"
- }
- };
-}(jQuery));
\ No newline at end of file
diff --git a/src/common/lib/vendor/2amigos/yiiwheels/widgets/html5editor/assets/js/locale/bootstrap-wysihtml5.sv-SE.js b/src/common/lib/vendor/2amigos/yiiwheels/widgets/html5editor/assets/js/locale/bootstrap-wysihtml5.sv-SE.js
deleted file mode 100644
index 03f8246..0000000
--- a/src/common/lib/vendor/2amigos/yiiwheels/widgets/html5editor/assets/js/locale/bootstrap-wysihtml5.sv-SE.js
+++ /dev/null
@@ -1,48 +0,0 @@
-/**
- * Swedish translation for bootstrap-wysihtml5
- */
-(function($){
- $.fn.wysihtml5.locale["sv-SE"] = {
- font_styles: {
- normal: "Normal Text",
- h1: "Rubrik 1",
- h2: "Rubrik 2",
- h3: "Rubrik 3"
- },
- emphasis: {
- bold: "Fet",
- italic: "Kursiv",
- underline: "Understruken"
- },
- lists: {
- unordered: "Osorterad lista",
- ordered: "Sorterad lista",
- outdent: "Minska indrag",
- indent: "Öka indrag"
- },
- link: {
- insert: "Lägg till länk",
- cancel: "Avbryt"
- },
- image: {
- insert: "Lägg till Bild",
- cancel: "Avbryt"
- },
- html: {
- edit: "Redigera HTML"
- },
- colours: {
- black: "Svart",
- silver: "Silver",
- gray: "Grå",
- maroon: "Kastaniebrun",
- red: "Röd",
- purple: "Lila",
- green: "Grön",
- olive: "Olivgrön",
- navy: "Marinblå",
- blue: "Blå",
- orange: "Orange"
- }
- };
-}(jQuery));
\ No newline at end of file
diff --git a/src/common/lib/vendor/2amigos/yiiwheels/widgets/html5editor/assets/js/wysihtml5-0.3.0.js b/src/common/lib/vendor/2amigos/yiiwheels/widgets/html5editor/assets/js/wysihtml5-0.3.0.js
deleted file mode 100644
index b40e9a2..0000000
--- a/src/common/lib/vendor/2amigos/yiiwheels/widgets/html5editor/assets/js/wysihtml5-0.3.0.js
+++ /dev/null
@@ -1,9523 +0,0 @@
-/**
- * @license wysihtml5 v0.3.0
- * https://github.com/xing/wysihtml5
- *
- * Author: Christopher Blum (https://github.com/tiff)
- *
- * Copyright (C) 2012 XING AG
- * Licensed under the MIT license (MIT)
- *
- */
-var wysihtml5 = {
- version: "0.3.0",
-
- // namespaces
- commands: {},
- dom: {},
- quirks: {},
- toolbar: {},
- lang: {},
- selection: {},
- views: {},
-
- INVISIBLE_SPACE: "\uFEFF",
-
- EMPTY_FUNCTION: function() {},
-
- ELEMENT_NODE: 1,
- TEXT_NODE: 3,
-
- BACKSPACE_KEY: 8,
- ENTER_KEY: 13,
- ESCAPE_KEY: 27,
- SPACE_KEY: 32,
- DELETE_KEY: 46
-};/**
- * @license Rangy, a cross-browser JavaScript range and selection library
- * http://code.google.com/p/rangy/
- *
- * Copyright 2011, Tim Down
- * Licensed under the MIT license.
- * Version: 1.2.2
- * Build date: 13 November 2011
- */
-window['rangy'] = (function() {
-
-
- var OBJECT = "object", FUNCTION = "function", UNDEFINED = "undefined";
-
- var domRangeProperties = ["startContainer", "startOffset", "endContainer", "endOffset", "collapsed",
- "commonAncestorContainer", "START_TO_START", "START_TO_END", "END_TO_START", "END_TO_END"];
-
- var domRangeMethods = ["setStart", "setStartBefore", "setStartAfter", "setEnd", "setEndBefore",
- "setEndAfter", "collapse", "selectNode", "selectNodeContents", "compareBoundaryPoints", "deleteContents",
- "extractContents", "cloneContents", "insertNode", "surroundContents", "cloneRange", "toString", "detach"];
-
- var textRangeProperties = ["boundingHeight", "boundingLeft", "boundingTop", "boundingWidth", "htmlText", "text"];
-
- // Subset of TextRange's full set of methods that we're interested in
- var textRangeMethods = ["collapse", "compareEndPoints", "duplicate", "getBookmark", "moveToBookmark",
- "moveToElementText", "parentElement", "pasteHTML", "select", "setEndPoint", "getBoundingClientRect"];
-
- /*----------------------------------------------------------------------------------------------------------------*/
-
- // Trio of functions taken from Peter Michaux's article:
- // http://peter.michaux.ca/articles/feature-detection-state-of-the-art-browser-scripting
- function isHostMethod(o, p) {
- var t = typeof o[p];
- return t == FUNCTION || (!!(t == OBJECT && o[p])) || t == "unknown";
- }
-
- function isHostObject(o, p) {
- return !!(typeof o[p] == OBJECT && o[p]);
- }
-
- function isHostProperty(o, p) {
- return typeof o[p] != UNDEFINED;
- }
-
- // Creates a convenience function to save verbose repeated calls to tests functions
- function createMultiplePropertyTest(testFunc) {
- return function(o, props) {
- var i = props.length;
- while (i--) {
- if (!testFunc(o, props[i])) {
- return false;
- }
- }
- return true;
- };
- }
-
- // Next trio of functions are a convenience to save verbose repeated calls to previous two functions
- var areHostMethods = createMultiplePropertyTest(isHostMethod);
- var areHostObjects = createMultiplePropertyTest(isHostObject);
- var areHostProperties = createMultiplePropertyTest(isHostProperty);
-
- function isTextRange(range) {
- return range && areHostMethods(range, textRangeMethods) && areHostProperties(range, textRangeProperties);
- }
-
- var api = {
- version: "1.2.2",
- initialized: false,
- supported: true,
-
- util: {
- isHostMethod: isHostMethod,
- isHostObject: isHostObject,
- isHostProperty: isHostProperty,
- areHostMethods: areHostMethods,
- areHostObjects: areHostObjects,
- areHostProperties: areHostProperties,
- isTextRange: isTextRange
- },
-
- features: {},
-
- modules: {},
- config: {
- alertOnWarn: false,
- preferTextRange: false
- }
- };
-
- function fail(reason) {
- window.alert("Rangy not supported in your browser. Reason: " + reason);
- api.initialized = true;
- api.supported = false;
- }
-
- api.fail = fail;
-
- function warn(msg) {
- var warningMessage = "Rangy warning: " + msg;
- if (api.config.alertOnWarn) {
- window.alert(warningMessage);
- } else if (typeof window.console != UNDEFINED && typeof window.console.log != UNDEFINED) {
- window.console.log(warningMessage);
- }
- }
-
- api.warn = warn;
-
- if ({}.hasOwnProperty) {
- api.util.extend = function(o, props) {
- for (var i in props) {
- if (props.hasOwnProperty(i)) {
- o[i] = props[i];
- }
- }
- };
- } else {
- fail("hasOwnProperty not supported");
- }
-
- var initListeners = [];
- var moduleInitializers = [];
-
- // Initialization
- function init() {
- if (api.initialized) {
- return;
- }
- var testRange;
- var implementsDomRange = false, implementsTextRange = false;
-
- // First, perform basic feature tests
-
- if (isHostMethod(document, "createRange")) {
- testRange = document.createRange();
- if (areHostMethods(testRange, domRangeMethods) && areHostProperties(testRange, domRangeProperties)) {
- implementsDomRange = true;
- }
- testRange.detach();
- }
-
- var body = isHostObject(document, "body") ? document.body : document.getElementsByTagName("body")[0];
-
- if (body && isHostMethod(body, "createTextRange")) {
- testRange = body.createTextRange();
- if (isTextRange(testRange)) {
- implementsTextRange = true;
- }
- }
-
- if (!implementsDomRange && !implementsTextRange) {
- fail("Neither Range nor TextRange are implemented");
- }
-
- api.initialized = true;
- api.features = {
- implementsDomRange: implementsDomRange,
- implementsTextRange: implementsTextRange
- };
-
- // Initialize modules and call init listeners
- var allListeners = moduleInitializers.concat(initListeners);
- for (var i = 0, len = allListeners.length; i < len; ++i) {
- try {
- allListeners[i](api);
- } catch (ex) {
- if (isHostObject(window, "console") && isHostMethod(window.console, "log")) {
- window.console.log("Init listener threw an exception. Continuing.", ex);
- }
-
- }
- }
- }
-
- // Allow external scripts to initialize this library in case it's loaded after the document has loaded
- api.init = init;
-
- // Execute listener immediately if already initialized
- api.addInitListener = function(listener) {
- if (api.initialized) {
- listener(api);
- } else {
- initListeners.push(listener);
- }
- };
-
- var createMissingNativeApiListeners = [];
-
- api.addCreateMissingNativeApiListener = function(listener) {
- createMissingNativeApiListeners.push(listener);
- };
-
- function createMissingNativeApi(win) {
- win = win || window;
- init();
-
- // Notify listeners
- for (var i = 0, len = createMissingNativeApiListeners.length; i < len; ++i) {
- createMissingNativeApiListeners[i](win);
- }
- }
-
- api.createMissingNativeApi = createMissingNativeApi;
-
- /**
- * @constructor
- */
- function Module(name) {
- this.name = name;
- this.initialized = false;
- this.supported = false;
- }
-
- Module.prototype.fail = function(reason) {
- this.initialized = true;
- this.supported = false;
-
- throw new Error("Module '" + this.name + "' failed to load: " + reason);
- };
-
- Module.prototype.warn = function(msg) {
- api.warn("Module " + this.name + ": " + msg);
- };
-
- Module.prototype.createError = function(msg) {
- return new Error("Error in Rangy " + this.name + " module: " + msg);
- };
-
- api.createModule = function(name, initFunc) {
- var module = new Module(name);
- api.modules[name] = module;
-
- moduleInitializers.push(function(api) {
- initFunc(api, module);
- module.initialized = true;
- module.supported = true;
- });
- };
-
- api.requireModules = function(modules) {
- for (var i = 0, len = modules.length, module, moduleName; i < len; ++i) {
- moduleName = modules[i];
- module = api.modules[moduleName];
- if (!module || !(module instanceof Module)) {
- throw new Error("Module '" + moduleName + "' not found");
- }
- if (!module.supported) {
- throw new Error("Module '" + moduleName + "' not supported");
- }
- }
- };
-
- /*----------------------------------------------------------------------------------------------------------------*/
-
- // Wait for document to load before running tests
-
- var docReady = false;
-
- var loadHandler = function(e) {
-
- if (!docReady) {
- docReady = true;
- if (!api.initialized) {
- init();
- }
- }
- };
-
- // Test whether we have window and document objects that we will need
- if (typeof window == UNDEFINED) {
- fail("No window found");
- return;
- }
- if (typeof document == UNDEFINED) {
- fail("No document found");
- return;
- }
-
- if (isHostMethod(document, "addEventListener")) {
- document.addEventListener("DOMContentLoaded", loadHandler, false);
- }
-
- // Add a fallback in case the DOMContentLoaded event isn't supported
- if (isHostMethod(window, "addEventListener")) {
- window.addEventListener("load", loadHandler, false);
- } else if (isHostMethod(window, "attachEvent")) {
- window.attachEvent("onload", loadHandler);
- } else {
- fail("Window does not have required addEventListener or attachEvent method");
- }
-
- return api;
-})();
-rangy.createModule("DomUtil", function(api, module) {
-
- var UNDEF = "undefined";
- var util = api.util;
-
- // Perform feature tests
- if (!util.areHostMethods(document, ["createDocumentFragment", "createElement", "createTextNode"])) {
- module.fail("document missing a Node creation method");
- }
-
- if (!util.isHostMethod(document, "getElementsByTagName")) {
- module.fail("document missing getElementsByTagName method");
- }
-
- var el = document.createElement("div");
- if (!util.areHostMethods(el, ["insertBefore", "appendChild", "cloneNode"] ||
- !util.areHostObjects(el, ["previousSibling", "nextSibling", "childNodes", "parentNode"]))) {
- module.fail("Incomplete Element implementation");
- }
-
- // innerHTML is required for Range's createContextualFragment method
- if (!util.isHostProperty(el, "innerHTML")) {
- module.fail("Element is missing innerHTML property");
- }
-
- var textNode = document.createTextNode("test");
- if (!util.areHostMethods(textNode, ["splitText", "deleteData", "insertData", "appendData", "cloneNode"] ||
- !util.areHostObjects(el, ["previousSibling", "nextSibling", "childNodes", "parentNode"]) ||
- !util.areHostProperties(textNode, ["data"]))) {
- module.fail("Incomplete Text Node implementation");
- }
-
- /*----------------------------------------------------------------------------------------------------------------*/
-
- // Removed use of indexOf because of a bizarre bug in Opera that is thrown in one of the Acid3 tests. I haven't been
- // able to replicate it outside of the test. The bug is that indexOf returns -1 when called on an Array that
- // contains just the document as a single element and the value searched for is the document.
- var arrayContains = /*Array.prototype.indexOf ?
- function(arr, val) {
- return arr.indexOf(val) > -1;
- }:*/
-
- function(arr, val) {
- var i = arr.length;
- while (i--) {
- if (arr[i] === val) {
- return true;
- }
- }
- return false;
- };
-
- // Opera 11 puts HTML elements in the null namespace, it seems, and IE 7 has undefined namespaceURI
- function isHtmlNamespace(node) {
- var ns;
- return typeof node.namespaceURI == UNDEF || ((ns = node.namespaceURI) === null || ns == "http://www.w3.org/1999/xhtml");
- }
-
- function parentElement(node) {
- var parent = node.parentNode;
- return (parent.nodeType == 1) ? parent : null;
- }
-
- function getNodeIndex(node) {
- var i = 0;
- while( (node = node.previousSibling) ) {
- i++;
- }
- return i;
- }
-
- function getNodeLength(node) {
- var childNodes;
- return isCharacterDataNode(node) ? node.length : ((childNodes = node.childNodes) ? childNodes.length : 0);
- }
-
- function getCommonAncestor(node1, node2) {
- var ancestors = [], n;
- for (n = node1; n; n = n.parentNode) {
- ancestors.push(n);
- }
-
- for (n = node2; n; n = n.parentNode) {
- if (arrayContains(ancestors, n)) {
- return n;
- }
- }
-
- return null;
- }
-
- function isAncestorOf(ancestor, descendant, selfIsAncestor) {
- var n = selfIsAncestor ? descendant : descendant.parentNode;
- while (n) {
- if (n === ancestor) {
- return true;
- } else {
- n = n.parentNode;
- }
- }
- return false;
- }
-
- function getClosestAncestorIn(node, ancestor, selfIsAncestor) {
- var p, n = selfIsAncestor ? node : node.parentNode;
- while (n) {
- p = n.parentNode;
- if (p === ancestor) {
- return n;
- }
- n = p;
- }
- return null;
- }
-
- function isCharacterDataNode(node) {
- var t = node.nodeType;
- return t == 3 || t == 4 || t == 8 ; // Text, CDataSection or Comment
- }
-
- function insertAfter(node, precedingNode) {
- var nextNode = precedingNode.nextSibling, parent = precedingNode.parentNode;
- if (nextNode) {
- parent.insertBefore(node, nextNode);
- } else {
- parent.appendChild(node);
- }
- return node;
- }
-
- // Note that we cannot use splitText() because it is bugridden in IE 9.
- function splitDataNode(node, index) {
- var newNode = node.cloneNode(false);
- newNode.deleteData(0, index);
- node.deleteData(index, node.length - index);
- insertAfter(newNode, node);
- return newNode;
- }
-
- function getDocument(node) {
- if (node.nodeType == 9) {
- return node;
- } else if (typeof node.ownerDocument != UNDEF) {
- return node.ownerDocument;
- } else if (typeof node.document != UNDEF) {
- return node.document;
- } else if (node.parentNode) {
- return getDocument(node.parentNode);
- } else {
- throw new Error("getDocument: no document found for node");
- }
- }
-
- function getWindow(node) {
- var doc = getDocument(node);
- if (typeof doc.defaultView != UNDEF) {
- return doc.defaultView;
- } else if (typeof doc.parentWindow != UNDEF) {
- return doc.parentWindow;
- } else {
- throw new Error("Cannot get a window object for node");
- }
- }
-
- function getIframeDocument(iframeEl) {
- if (typeof iframeEl.contentDocument != UNDEF) {
- return iframeEl.contentDocument;
- } else if (typeof iframeEl.contentWindow != UNDEF) {
- return iframeEl.contentWindow.document;
- } else {
- throw new Error("getIframeWindow: No Document object found for iframe element");
- }
- }
-
- function getIframeWindow(iframeEl) {
- if (typeof iframeEl.contentWindow != UNDEF) {
- return iframeEl.contentWindow;
- } else if (typeof iframeEl.contentDocument != UNDEF) {
- return iframeEl.contentDocument.defaultView;
- } else {
- throw new Error("getIframeWindow: No Window object found for iframe element");
- }
- }
-
- function getBody(doc) {
- return util.isHostObject(doc, "body") ? doc.body : doc.getElementsByTagName("body")[0];
- }
-
- function getRootContainer(node) {
- var parent;
- while ( (parent = node.parentNode) ) {
- node = parent;
- }
- return node;
- }
-
- function comparePoints(nodeA, offsetA, nodeB, offsetB) {
- // See http://www.w3.org/TR/DOM-Level-2-Traversal-Range/ranges.html#Level-2-Range-Comparing
- var nodeC, root, childA, childB, n;
- if (nodeA == nodeB) {
-
- // Case 1: nodes are the same
- return offsetA === offsetB ? 0 : (offsetA < offsetB) ? -1 : 1;
- } else if ( (nodeC = getClosestAncestorIn(nodeB, nodeA, true)) ) {
-
- // Case 2: node C (container B or an ancestor) is a child node of A
- return offsetA <= getNodeIndex(nodeC) ? -1 : 1;
- } else if ( (nodeC = getClosestAncestorIn(nodeA, nodeB, true)) ) {
-
- // Case 3: node C (container A or an ancestor) is a child node of B
- return getNodeIndex(nodeC) < offsetB ? -1 : 1;
- } else {
-
- // Case 4: containers are siblings or descendants of siblings
- root = getCommonAncestor(nodeA, nodeB);
- childA = (nodeA === root) ? root : getClosestAncestorIn(nodeA, root, true);
- childB = (nodeB === root) ? root : getClosestAncestorIn(nodeB, root, true);
-
- if (childA === childB) {
- // This shouldn't be possible
-
- throw new Error("comparePoints got to case 4 and childA and childB are the same!");
- } else {
- n = root.firstChild;
- while (n) {
- if (n === childA) {
- return -1;
- } else if (n === childB) {
- return 1;
- }
- n = n.nextSibling;
- }
- throw new Error("Should not be here!");
- }
- }
- }
-
- function fragmentFromNodeChildren(node) {
- var fragment = getDocument(node).createDocumentFragment(), child;
- while ( (child = node.firstChild) ) {
- fragment.appendChild(child);
- }
- return fragment;
- }
-
- function inspectNode(node) {
- if (!node) {
- return "[No node]";
- }
- if (isCharacterDataNode(node)) {
- return '"' + node.data + '"';
- } else if (node.nodeType == 1) {
- var idAttr = node.id ? ' id="' + node.id + '"' : "";
- return "<" + node.nodeName + idAttr + ">[" + node.childNodes.length + "]";
- } else {
- return node.nodeName;
- }
- }
-
- /**
- * @constructor
- */
- function NodeIterator(root) {
- this.root = root;
- this._next = root;
- }
-
- NodeIterator.prototype = {
- _current: null,
-
- hasNext: function() {
- return !!this._next;
- },
-
- next: function() {
- var n = this._current = this._next;
- var child, next;
- if (this._current) {
- child = n.firstChild;
- if (child) {
- this._next = child;
- } else {
- next = null;
- while ((n !== this.root) && !(next = n.nextSibling)) {
- n = n.parentNode;
- }
- this._next = next;
- }
- }
- return this._current;
- },
-
- detach: function() {
- this._current = this._next = this.root = null;
- }
- };
-
- function createIterator(root) {
- return new NodeIterator(root);
- }
-
- /**
- * @constructor
- */
- function DomPosition(node, offset) {
- this.node = node;
- this.offset = offset;
- }
-
- DomPosition.prototype = {
- equals: function(pos) {
- return this.node === pos.node & this.offset == pos.offset;
- },
-
- inspect: function() {
- return "[DomPosition(" + inspectNode(this.node) + ":" + this.offset + ")]";
- }
- };
-
- /**
- * @constructor
- */
- function DOMException(codeName) {
- this.code = this[codeName];
- this.codeName = codeName;
- this.message = "DOMException: " + this.codeName;
- }
-
- DOMException.prototype = {
- INDEX_SIZE_ERR: 1,
- HIERARCHY_REQUEST_ERR: 3,
- WRONG_DOCUMENT_ERR: 4,
- NO_MODIFICATION_ALLOWED_ERR: 7,
- NOT_FOUND_ERR: 8,
- NOT_SUPPORTED_ERR: 9,
- INVALID_STATE_ERR: 11
- };
-
- DOMException.prototype.toString = function() {
- return this.message;
- };
-
- api.dom = {
- arrayContains: arrayContains,
- isHtmlNamespace: isHtmlNamespace,
- parentElement: parentElement,
- getNodeIndex: getNodeIndex,
- getNodeLength: getNodeLength,
- getCommonAncestor: getCommonAncestor,
- isAncestorOf: isAncestorOf,
- getClosestAncestorIn: getClosestAncestorIn,
- isCharacterDataNode: isCharacterDataNode,
- insertAfter: insertAfter,
- splitDataNode: splitDataNode,
- getDocument: getDocument,
- getWindow: getWindow,
- getIframeWindow: getIframeWindow,
- getIframeDocument: getIframeDocument,
- getBody: getBody,
- getRootContainer: getRootContainer,
- comparePoints: comparePoints,
- inspectNode: inspectNode,
- fragmentFromNodeChildren: fragmentFromNodeChildren,
- createIterator: createIterator,
- DomPosition: DomPosition
- };
-
- api.DOMException = DOMException;
-});rangy.createModule("DomRange", function(api, module) {
- api.requireModules( ["DomUtil"] );
-
-
- var dom = api.dom;
- var DomPosition = dom.DomPosition;
- var DOMException = api.DOMException;
-
- /*----------------------------------------------------------------------------------------------------------------*/
-
- // Utility functions
-
- function isNonTextPartiallySelected(node, range) {
- return (node.nodeType != 3) &&
- (dom.isAncestorOf(node, range.startContainer, true) || dom.isAncestorOf(node, range.endContainer, true));
- }
-
- function getRangeDocument(range) {
- return dom.getDocument(range.startContainer);
- }
-
- function dispatchEvent(range, type, args) {
- var listeners = range._listeners[type];
- if (listeners) {
- for (var i = 0, len = listeners.length; i < len; ++i) {
- listeners[i].call(range, {target: range, args: args});
- }
- }
- }
-
- function getBoundaryBeforeNode(node) {
- return new DomPosition(node.parentNode, dom.getNodeIndex(node));
- }
-
- function getBoundaryAfterNode(node) {
- return new DomPosition(node.parentNode, dom.getNodeIndex(node) + 1);
- }
-
- function insertNodeAtPosition(node, n, o) {
- var firstNodeInserted = node.nodeType == 11 ? node.firstChild : node;
- if (dom.isCharacterDataNode(n)) {
- if (o == n.length) {
- dom.insertAfter(node, n);
- } else {
- n.parentNode.insertBefore(node, o == 0 ? n : dom.splitDataNode(n, o));
- }
- } else if (o >= n.childNodes.length) {
- n.appendChild(node);
- } else {
- n.insertBefore(node, n.childNodes[o]);
- }
- return firstNodeInserted;
- }
-
- function cloneSubtree(iterator) {
- var partiallySelected;
- for (var node, frag = getRangeDocument(iterator.range).createDocumentFragment(), subIterator; node = iterator.next(); ) {
- partiallySelected = iterator.isPartiallySelectedSubtree();
-
- node = node.cloneNode(!partiallySelected);
- if (partiallySelected) {
- subIterator = iterator.getSubtreeIterator();
- node.appendChild(cloneSubtree(subIterator));
- subIterator.detach(true);
- }
-
- if (node.nodeType == 10) { // DocumentType
- throw new DOMException("HIERARCHY_REQUEST_ERR");
- }
- frag.appendChild(node);
- }
- return frag;
- }
-
- function iterateSubtree(rangeIterator, func, iteratorState) {
- var it, n;
- iteratorState = iteratorState || { stop: false };
- for (var node, subRangeIterator; node = rangeIterator.next(); ) {
- //log.debug("iterateSubtree, partially selected: " + rangeIterator.isPartiallySelectedSubtree(), nodeToString(node));
- if (rangeIterator.isPartiallySelectedSubtree()) {
- // The node is partially selected by the Range, so we can use a new RangeIterator on the portion of the
- // node selected by the Range.
- if (func(node) === false) {
- iteratorState.stop = true;
- return;
- } else {
- subRangeIterator = rangeIterator.getSubtreeIterator();
- iterateSubtree(subRangeIterator, func, iteratorState);
- subRangeIterator.detach(true);
- if (iteratorState.stop) {
- return;
- }
- }
- } else {
- // The whole node is selected, so we can use efficient DOM iteration to iterate over the node and its
- // descendant
- it = dom.createIterator(node);
- while ( (n = it.next()) ) {
- if (func(n) === false) {
- iteratorState.stop = true;
- return;
- }
- }
- }
- }
- }
-
- function deleteSubtree(iterator) {
- var subIterator;
- while (iterator.next()) {
- if (iterator.isPartiallySelectedSubtree()) {
- subIterator = iterator.getSubtreeIterator();
- deleteSubtree(subIterator);
- subIterator.detach(true);
- } else {
- iterator.remove();
- }
- }
- }
-
- function extractSubtree(iterator) {
-
- for (var node, frag = getRangeDocument(iterator.range).createDocumentFragment(), subIterator; node = iterator.next(); ) {
-
-
- if (iterator.isPartiallySelectedSubtree()) {
- node = node.cloneNode(false);
- subIterator = iterator.getSubtreeIterator();
- node.appendChild(extractSubtree(subIterator));
- subIterator.detach(true);
- } else {
- iterator.remove();
- }
- if (node.nodeType == 10) { // DocumentType
- throw new DOMException("HIERARCHY_REQUEST_ERR");
- }
- frag.appendChild(node);
- }
- return frag;
- }
-
- function getNodesInRange(range, nodeTypes, filter) {
- //log.info("getNodesInRange, " + nodeTypes.join(","));
- var filterNodeTypes = !!(nodeTypes && nodeTypes.length), regex;
- var filterExists = !!filter;
- if (filterNodeTypes) {
- regex = new RegExp("^(" + nodeTypes.join("|") + ")$");
- }
-
- var nodes = [];
- iterateSubtree(new RangeIterator(range, false), function(node) {
- if ((!filterNodeTypes || regex.test(node.nodeType)) && (!filterExists || filter(node))) {
- nodes.push(node);
- }
- });
- return nodes;
- }
-
- function inspect(range) {
- var name = (typeof range.getName == "undefined") ? "Range" : range.getName();
- return "[" + name + "(" + dom.inspectNode(range.startContainer) + ":" + range.startOffset + ", " +
- dom.inspectNode(range.endContainer) + ":" + range.endOffset + ")]";
- }
-
- /*----------------------------------------------------------------------------------------------------------------*/
-
- // RangeIterator code partially borrows from IERange by Tim Ryan (http://github.com/timcameronryan/IERange)
-
- /**
- * @constructor
- */
- function RangeIterator(range, clonePartiallySelectedTextNodes) {
- this.range = range;
- this.clonePartiallySelectedTextNodes = clonePartiallySelectedTextNodes;
-
-
-
- if (!range.collapsed) {
- this.sc = range.startContainer;
- this.so = range.startOffset;
- this.ec = range.endContainer;
- this.eo = range.endOffset;
- var root = range.commonAncestorContainer;
-
- if (this.sc === this.ec && dom.isCharacterDataNode(this.sc)) {
- this.isSingleCharacterDataNode = true;
- this._first = this._last = this._next = this.sc;
- } else {
- this._first = this._next = (this.sc === root && !dom.isCharacterDataNode(this.sc)) ?
- this.sc.childNodes[this.so] : dom.getClosestAncestorIn(this.sc, root, true);
- this._last = (this.ec === root && !dom.isCharacterDataNode(this.ec)) ?
- this.ec.childNodes[this.eo - 1] : dom.getClosestAncestorIn(this.ec, root, true);
- }
-
- }
- }
-
- RangeIterator.prototype = {
- _current: null,
- _next: null,
- _first: null,
- _last: null,
- isSingleCharacterDataNode: false,
-
- reset: function() {
- this._current = null;
- this._next = this._first;
- },
-
- hasNext: function() {
- return !!this._next;
- },
-
- next: function() {
- // Move to next node
- var current = this._current = this._next;
- if (current) {
- this._next = (current !== this._last) ? current.nextSibling : null;
-
- // Check for partially selected text nodes
- if (dom.isCharacterDataNode(current) && this.clonePartiallySelectedTextNodes) {
- if (current === this.ec) {
-
- (current = current.cloneNode(true)).deleteData(this.eo, current.length - this.eo);
- }
- if (this._current === this.sc) {
-
- (current = current.cloneNode(true)).deleteData(0, this.so);
- }
- }
- }
-
- return current;
- },
-
- remove: function() {
- var current = this._current, start, end;
-
- if (dom.isCharacterDataNode(current) && (current === this.sc || current === this.ec)) {
- start = (current === this.sc) ? this.so : 0;
- end = (current === this.ec) ? this.eo : current.length;
- if (start != end) {
- current.deleteData(start, end - start);
- }
- } else {
- if (current.parentNode) {
- current.parentNode.removeChild(current);
- } else {
-
- }
- }
- },
-
- // Checks if the current node is partially selected
- isPartiallySelectedSubtree: function() {
- var current = this._current;
- return isNonTextPartiallySelected(current, this.range);
- },
-
- getSubtreeIterator: function() {
- var subRange;
- if (this.isSingleCharacterDataNode) {
- subRange = this.range.cloneRange();
- subRange.collapse();
- } else {
- subRange = new Range(getRangeDocument(this.range));
- var current = this._current;
- var startContainer = current, startOffset = 0, endContainer = current, endOffset = dom.getNodeLength(current);
-
- if (dom.isAncestorOf(current, this.sc, true)) {
- startContainer = this.sc;
- startOffset = this.so;
- }
- if (dom.isAncestorOf(current, this.ec, true)) {
- endContainer = this.ec;
- endOffset = this.eo;
- }
-
- updateBoundaries(subRange, startContainer, startOffset, endContainer, endOffset);
- }
- return new RangeIterator(subRange, this.clonePartiallySelectedTextNodes);
- },
-
- detach: function(detachRange) {
- if (detachRange) {
- this.range.detach();
- }
- this.range = this._current = this._next = this._first = this._last = this.sc = this.so = this.ec = this.eo = null;
- }
- };
-
- /*----------------------------------------------------------------------------------------------------------------*/
-
- // Exceptions
-
- /**
- * @constructor
- */
- function RangeException(codeName) {
- this.code = this[codeName];
- this.codeName = codeName;
- this.message = "RangeException: " + this.codeName;
- }
-
- RangeException.prototype = {
- BAD_BOUNDARYPOINTS_ERR: 1,
- INVALID_NODE_TYPE_ERR: 2
- };
-
- RangeException.prototype.toString = function() {
- return this.message;
- };
-
- /*----------------------------------------------------------------------------------------------------------------*/
-
- /**
- * Currently iterates through all nodes in the range on creation until I think of a decent way to do it
- * TODO: Look into making this a proper iterator, not requiring preloading everything first
- * @constructor
- */
- function RangeNodeIterator(range, nodeTypes, filter) {
- this.nodes = getNodesInRange(range, nodeTypes, filter);
- this._next = this.nodes[0];
- this._position = 0;
- }
-
- RangeNodeIterator.prototype = {
- _current: null,
-
- hasNext: function() {
- return !!this._next;
- },
-
- next: function() {
- this._current = this._next;
- this._next = this.nodes[ ++this._position ];
- return this._current;
- },
-
- detach: function() {
- this._current = this._next = this.nodes = null;
- }
- };
-
- var beforeAfterNodeTypes = [1, 3, 4, 5, 7, 8, 10];
- var rootContainerNodeTypes = [2, 9, 11];
- var readonlyNodeTypes = [5, 6, 10, 12];
- var insertableNodeTypes = [1, 3, 4, 5, 7, 8, 10, 11];
- var surroundNodeTypes = [1, 3, 4, 5, 7, 8];
-
- function createAncestorFinder(nodeTypes) {
- return function(node, selfIsAncestor) {
- var t, n = selfIsAncestor ? node : node.parentNode;
- while (n) {
- t = n.nodeType;
- if (dom.arrayContains(nodeTypes, t)) {
- return n;
- }
- n = n.parentNode;
- }
- return null;
- };
- }
-
- var getRootContainer = dom.getRootContainer;
- var getDocumentOrFragmentContainer = createAncestorFinder( [9, 11] );
- var getReadonlyAncestor = createAncestorFinder(readonlyNodeTypes);
- var getDocTypeNotationEntityAncestor = createAncestorFinder( [6, 10, 12] );
-
- function assertNoDocTypeNotationEntityAncestor(node, allowSelf) {
- if (getDocTypeNotationEntityAncestor(node, allowSelf)) {
- throw new RangeException("INVALID_NODE_TYPE_ERR");
- }
- }
-
- function assertNotDetached(range) {
- if (!range.startContainer) {
- throw new DOMException("INVALID_STATE_ERR");
- }
- }
-
- function assertValidNodeType(node, invalidTypes) {
- if (!dom.arrayContains(invalidTypes, node.nodeType)) {
- throw new RangeException("INVALID_NODE_TYPE_ERR");
- }
- }
-
- function assertValidOffset(node, offset) {
- if (offset < 0 || offset > (dom.isCharacterDataNode(node) ? node.length : node.childNodes.length)) {
- throw new DOMException("INDEX_SIZE_ERR");
- }
- }
-
- function assertSameDocumentOrFragment(node1, node2) {
- if (getDocumentOrFragmentContainer(node1, true) !== getDocumentOrFragmentContainer(node2, true)) {
- throw new DOMException("WRONG_DOCUMENT_ERR");
- }
- }
-
- function assertNodeNotReadOnly(node) {
- if (getReadonlyAncestor(node, true)) {
- throw new DOMException("NO_MODIFICATION_ALLOWED_ERR");
- }
- }
-
- function assertNode(node, codeName) {
- if (!node) {
- throw new DOMException(codeName);
- }
- }
-
- function isOrphan(node) {
- return !dom.arrayContains(rootContainerNodeTypes, node.nodeType) && !getDocumentOrFragmentContainer(node, true);
- }
-
- function isValidOffset(node, offset) {
- return offset <= (dom.isCharacterDataNode(node) ? node.length : node.childNodes.length);
- }
-
- function assertRangeValid(range) {
- assertNotDetached(range);
- if (isOrphan(range.startContainer) || isOrphan(range.endContainer) ||
- !isValidOffset(range.startContainer, range.startOffset) ||
- !isValidOffset(range.endContainer, range.endOffset)) {
- throw new Error("Range error: Range is no longer valid after DOM mutation (" + range.inspect() + ")");
- }
- }
-
- /*----------------------------------------------------------------------------------------------------------------*/
-
- // Test the browser's innerHTML support to decide how to implement createContextualFragment
- var styleEl = document.createElement("style");
- var htmlParsingConforms = false;
- try {
- styleEl.innerHTML = "x ";
- htmlParsingConforms = (styleEl.firstChild.nodeType == 3); // Opera incorrectly creates an element node
- } catch (e) {
- // IE 6 and 7 throw
- }
-
- api.features.htmlParsingConforms = htmlParsingConforms;
-
- var createContextualFragment = htmlParsingConforms ?
-
- // Implementation as per HTML parsing spec, trusting in the browser's implementation of innerHTML. See
- // discussion and base code for this implementation at issue 67.
- // Spec: http://html5.org/specs/dom-parsing.html#extensions-to-the-range-interface
- // Thanks to Aleks Williams.
- function(fragmentStr) {
- // "Let node the context object's start's node."
- var node = this.startContainer;
- var doc = dom.getDocument(node);
-
- // "If the context object's start's node is null, raise an INVALID_STATE_ERR
- // exception and abort these steps."
- if (!node) {
- throw new DOMException("INVALID_STATE_ERR");
- }
-
- // "Let element be as follows, depending on node's interface:"
- // Document, Document Fragment: null
- var el = null;
-
- // "Element: node"
- if (node.nodeType == 1) {
- el = node;
-
- // "Text, Comment: node's parentElement"
- } else if (dom.isCharacterDataNode(node)) {
- el = dom.parentElement(node);
- }
-
- // "If either element is null or element's ownerDocument is an HTML document
- // and element's local name is "html" and element's namespace is the HTML
- // namespace"
- if (el === null || (
- el.nodeName == "HTML"
- && dom.isHtmlNamespace(dom.getDocument(el).documentElement)
- && dom.isHtmlNamespace(el)
- )) {
-
- // "let element be a new Element with "body" as its local name and the HTML
- // namespace as its namespace.""
- el = doc.createElement("body");
- } else {
- el = el.cloneNode(false);
- }
-
- // "If the node's document is an HTML document: Invoke the HTML fragment parsing algorithm."
- // "If the node's document is an XML document: Invoke the XML fragment parsing algorithm."
- // "In either case, the algorithm must be invoked with fragment as the input
- // and element as the context element."
- el.innerHTML = fragmentStr;
-
- // "If this raises an exception, then abort these steps. Otherwise, let new
- // children be the nodes returned."
-
- // "Let fragment be a new DocumentFragment."
- // "Append all new children to fragment."
- // "Return fragment."
- return dom.fragmentFromNodeChildren(el);
- } :
-
- // In this case, innerHTML cannot be trusted, so fall back to a simpler, non-conformant implementation that
- // previous versions of Rangy used (with the exception of using a body element rather than a div)
- function(fragmentStr) {
- assertNotDetached(this);
- var doc = getRangeDocument(this);
- var el = doc.createElement("body");
- el.innerHTML = fragmentStr;
-
- return dom.fragmentFromNodeChildren(el);
- };
-
- /*----------------------------------------------------------------------------------------------------------------*/
-
- var rangeProperties = ["startContainer", "startOffset", "endContainer", "endOffset", "collapsed",
- "commonAncestorContainer"];
-
- var s2s = 0, s2e = 1, e2e = 2, e2s = 3;
- var n_b = 0, n_a = 1, n_b_a = 2, n_i = 3;
-
- function RangePrototype() {}
-
- RangePrototype.prototype = {
- attachListener: function(type, listener) {
- this._listeners[type].push(listener);
- },
-
- compareBoundaryPoints: function(how, range) {
- assertRangeValid(this);
- assertSameDocumentOrFragment(this.startContainer, range.startContainer);
-
- var nodeA, offsetA, nodeB, offsetB;
- var prefixA = (how == e2s || how == s2s) ? "start" : "end";
- var prefixB = (how == s2e || how == s2s) ? "start" : "end";
- nodeA = this[prefixA + "Container"];
- offsetA = this[prefixA + "Offset"];
- nodeB = range[prefixB + "Container"];
- offsetB = range[prefixB + "Offset"];
- return dom.comparePoints(nodeA, offsetA, nodeB, offsetB);
- },
-
- insertNode: function(node) {
- assertRangeValid(this);
- assertValidNodeType(node, insertableNodeTypes);
- assertNodeNotReadOnly(this.startContainer);
-
- if (dom.isAncestorOf(node, this.startContainer, true)) {
- throw new DOMException("HIERARCHY_REQUEST_ERR");
- }
-
- // No check for whether the container of the start of the Range is of a type that does not allow
- // children of the type of node: the browser's DOM implementation should do this for us when we attempt
- // to add the node
-
- var firstNodeInserted = insertNodeAtPosition(node, this.startContainer, this.startOffset);
- this.setStartBefore(firstNodeInserted);
- },
-
- cloneContents: function() {
- assertRangeValid(this);
-
- var clone, frag;
- if (this.collapsed) {
- return getRangeDocument(this).createDocumentFragment();
- } else {
- if (this.startContainer === this.endContainer && dom.isCharacterDataNode(this.startContainer)) {
- clone = this.startContainer.cloneNode(true);
- clone.data = clone.data.slice(this.startOffset, this.endOffset);
- frag = getRangeDocument(this).createDocumentFragment();
- frag.appendChild(clone);
- return frag;
- } else {
- var iterator = new RangeIterator(this, true);
- clone = cloneSubtree(iterator);
- iterator.detach();
- }
- return clone;
- }
- },
-
- canSurroundContents: function() {
- assertRangeValid(this);
- assertNodeNotReadOnly(this.startContainer);
- assertNodeNotReadOnly(this.endContainer);
-
- // Check if the contents can be surrounded. Specifically, this means whether the range partially selects
- // no non-text nodes.
- var iterator = new RangeIterator(this, true);
- var boundariesInvalid = (iterator._first && (isNonTextPartiallySelected(iterator._first, this)) ||
- (iterator._last && isNonTextPartiallySelected(iterator._last, this)));
- iterator.detach();
- return !boundariesInvalid;
- },
-
- surroundContents: function(node) {
- assertValidNodeType(node, surroundNodeTypes);
-
- if (!this.canSurroundContents()) {
- throw new RangeException("BAD_BOUNDARYPOINTS_ERR");
- }
-
- // Extract the contents
- var content = this.extractContents();
-
- // Clear the children of the node
- if (node.hasChildNodes()) {
- while (node.lastChild) {
- node.removeChild(node.lastChild);
- }
- }
-
- // Insert the new node and add the extracted contents
- insertNodeAtPosition(node, this.startContainer, this.startOffset);
- node.appendChild(content);
-
- this.selectNode(node);
- },
-
- cloneRange: function() {
- assertRangeValid(this);
- var range = new Range(getRangeDocument(this));
- var i = rangeProperties.length, prop;
- while (i--) {
- prop = rangeProperties[i];
- range[prop] = this[prop];
- }
- return range;
- },
-
- toString: function() {
- assertRangeValid(this);
- var sc = this.startContainer;
- if (sc === this.endContainer && dom.isCharacterDataNode(sc)) {
- return (sc.nodeType == 3 || sc.nodeType == 4) ? sc.data.slice(this.startOffset, this.endOffset) : "";
- } else {
- var textBits = [], iterator = new RangeIterator(this, true);
-
- iterateSubtree(iterator, function(node) {
- // Accept only text or CDATA nodes, not comments
-
- if (node.nodeType == 3 || node.nodeType == 4) {
- textBits.push(node.data);
- }
- });
- iterator.detach();
- return textBits.join("");
- }
- },
-
- // The methods below are all non-standard. The following batch were introduced by Mozilla but have since
- // been removed from Mozilla.
-
- compareNode: function(node) {
- assertRangeValid(this);
-
- var parent = node.parentNode;
- var nodeIndex = dom.getNodeIndex(node);
-
- if (!parent) {
- throw new DOMException("NOT_FOUND_ERR");
- }
-
- var startComparison = this.comparePoint(parent, nodeIndex),
- endComparison = this.comparePoint(parent, nodeIndex + 1);
-
- if (startComparison < 0) { // Node starts before
- return (endComparison > 0) ? n_b_a : n_b;
- } else {
- return (endComparison > 0) ? n_a : n_i;
- }
- },
-
- comparePoint: function(node, offset) {
- assertRangeValid(this);
- assertNode(node, "HIERARCHY_REQUEST_ERR");
- assertSameDocumentOrFragment(node, this.startContainer);
-
- if (dom.comparePoints(node, offset, this.startContainer, this.startOffset) < 0) {
- return -1;
- } else if (dom.comparePoints(node, offset, this.endContainer, this.endOffset) > 0) {
- return 1;
- }
- return 0;
- },
-
- createContextualFragment: createContextualFragment,
-
- toHtml: function() {
- assertRangeValid(this);
- var container = getRangeDocument(this).createElement("div");
- container.appendChild(this.cloneContents());
- return container.innerHTML;
- },
-
- // touchingIsIntersecting determines whether this method considers a node that borders a range intersects
- // with it (as in WebKit) or not (as in Gecko pre-1.9, and the default)
- intersectsNode: function(node, touchingIsIntersecting) {
- assertRangeValid(this);
- assertNode(node, "NOT_FOUND_ERR");
- if (dom.getDocument(node) !== getRangeDocument(this)) {
- return false;
- }
-
- var parent = node.parentNode, offset = dom.getNodeIndex(node);
- assertNode(parent, "NOT_FOUND_ERR");
-
- var startComparison = dom.comparePoints(parent, offset, this.endContainer, this.endOffset),
- endComparison = dom.comparePoints(parent, offset + 1, this.startContainer, this.startOffset);
-
- return touchingIsIntersecting ? startComparison <= 0 && endComparison >= 0 : startComparison < 0 && endComparison > 0;
- },
-
-
- isPointInRange: function(node, offset) {
- assertRangeValid(this);
- assertNode(node, "HIERARCHY_REQUEST_ERR");
- assertSameDocumentOrFragment(node, this.startContainer);
-
- return (dom.comparePoints(node, offset, this.startContainer, this.startOffset) >= 0) &&
- (dom.comparePoints(node, offset, this.endContainer, this.endOffset) <= 0);
- },
-
- // The methods below are non-standard and invented by me.
-
- // Sharing a boundary start-to-end or end-to-start does not count as intersection.
- intersectsRange: function(range, touchingIsIntersecting) {
- assertRangeValid(this);
-
- if (getRangeDocument(range) != getRangeDocument(this)) {
- throw new DOMException("WRONG_DOCUMENT_ERR");
- }
-
- var startComparison = dom.comparePoints(this.startContainer, this.startOffset, range.endContainer, range.endOffset),
- endComparison = dom.comparePoints(this.endContainer, this.endOffset, range.startContainer, range.startOffset);
-
- return touchingIsIntersecting ? startComparison <= 0 && endComparison >= 0 : startComparison < 0 && endComparison > 0;
- },
-
- intersection: function(range) {
- if (this.intersectsRange(range)) {
- var startComparison = dom.comparePoints(this.startContainer, this.startOffset, range.startContainer, range.startOffset),
- endComparison = dom.comparePoints(this.endContainer, this.endOffset, range.endContainer, range.endOffset);
-
- var intersectionRange = this.cloneRange();
-
- if (startComparison == -1) {
- intersectionRange.setStart(range.startContainer, range.startOffset);
- }
- if (endComparison == 1) {
- intersectionRange.setEnd(range.endContainer, range.endOffset);
- }
- return intersectionRange;
- }
- return null;
- },
-
- union: function(range) {
- if (this.intersectsRange(range, true)) {
- var unionRange = this.cloneRange();
- if (dom.comparePoints(range.startContainer, range.startOffset, this.startContainer, this.startOffset) == -1) {
- unionRange.setStart(range.startContainer, range.startOffset);
- }
- if (dom.comparePoints(range.endContainer, range.endOffset, this.endContainer, this.endOffset) == 1) {
- unionRange.setEnd(range.endContainer, range.endOffset);
- }
- return unionRange;
- } else {
- throw new RangeException("Ranges do not intersect");
- }
- },
-
- containsNode: function(node, allowPartial) {
- if (allowPartial) {
- return this.intersectsNode(node, false);
- } else {
- return this.compareNode(node) == n_i;
- }
- },
-
- containsNodeContents: function(node) {
- return this.comparePoint(node, 0) >= 0 && this.comparePoint(node, dom.getNodeLength(node)) <= 0;
- },
-
- containsRange: function(range) {
- return this.intersection(range).equals(range);
- },
-
- containsNodeText: function(node) {
- var nodeRange = this.cloneRange();
- nodeRange.selectNode(node);
- var textNodes = nodeRange.getNodes([3]);
- if (textNodes.length > 0) {
- nodeRange.setStart(textNodes[0], 0);
- var lastTextNode = textNodes.pop();
- nodeRange.setEnd(lastTextNode, lastTextNode.length);
- var contains = this.containsRange(nodeRange);
- nodeRange.detach();
- return contains;
- } else {
- return this.containsNodeContents(node);
- }
- },
-
- createNodeIterator: function(nodeTypes, filter) {
- assertRangeValid(this);
- return new RangeNodeIterator(this, nodeTypes, filter);
- },
-
- getNodes: function(nodeTypes, filter) {
- assertRangeValid(this);
- return getNodesInRange(this, nodeTypes, filter);
- },
-
- getDocument: function() {
- return getRangeDocument(this);
- },
-
- collapseBefore: function(node) {
- assertNotDetached(this);
-
- this.setEndBefore(node);
- this.collapse(false);
- },
-
- collapseAfter: function(node) {
- assertNotDetached(this);
-
- this.setStartAfter(node);
- this.collapse(true);
- },
-
- getName: function() {
- return "DomRange";
- },
-
- equals: function(range) {
- return Range.rangesEqual(this, range);
- },
-
- inspect: function() {
- return inspect(this);
- }
- };
-
- function copyComparisonConstantsToObject(obj) {
- obj.START_TO_START = s2s;
- obj.START_TO_END = s2e;
- obj.END_TO_END = e2e;
- obj.END_TO_START = e2s;
-
- obj.NODE_BEFORE = n_b;
- obj.NODE_AFTER = n_a;
- obj.NODE_BEFORE_AND_AFTER = n_b_a;
- obj.NODE_INSIDE = n_i;
- }
-
- function copyComparisonConstants(constructor) {
- copyComparisonConstantsToObject(constructor);
- copyComparisonConstantsToObject(constructor.prototype);
- }
-
- function createRangeContentRemover(remover, boundaryUpdater) {
- return function() {
- assertRangeValid(this);
-
- var sc = this.startContainer, so = this.startOffset, root = this.commonAncestorContainer;
-
- var iterator = new RangeIterator(this, true);
-
- // Work out where to position the range after content removal
- var node, boundary;
- if (sc !== root) {
- node = dom.getClosestAncestorIn(sc, root, true);
- boundary = getBoundaryAfterNode(node);
- sc = boundary.node;
- so = boundary.offset;
- }
-
- // Check none of the range is read-only
- iterateSubtree(iterator, assertNodeNotReadOnly);
-
- iterator.reset();
-
- // Remove the content
- var returnValue = remover(iterator);
- iterator.detach();
-
- // Move to the new position
- boundaryUpdater(this, sc, so, sc, so);
-
- return returnValue;
- };
- }
-
- function createPrototypeRange(constructor, boundaryUpdater, detacher) {
- function createBeforeAfterNodeSetter(isBefore, isStart) {
- return function(node) {
- assertNotDetached(this);
- assertValidNodeType(node, beforeAfterNodeTypes);
- assertValidNodeType(getRootContainer(node), rootContainerNodeTypes);
-
- var boundary = (isBefore ? getBoundaryBeforeNode : getBoundaryAfterNode)(node);
- (isStart ? setRangeStart : setRangeEnd)(this, boundary.node, boundary.offset);
- };
- }
-
- function setRangeStart(range, node, offset) {
- var ec = range.endContainer, eo = range.endOffset;
- if (node !== range.startContainer || offset !== range.startOffset) {
- // Check the root containers of the range and the new boundary, and also check whether the new boundary
- // is after the current end. In either case, collapse the range to the new position
- if (getRootContainer(node) != getRootContainer(ec) || dom.comparePoints(node, offset, ec, eo) == 1) {
- ec = node;
- eo = offset;
- }
- boundaryUpdater(range, node, offset, ec, eo);
- }
- }
-
- function setRangeEnd(range, node, offset) {
- var sc = range.startContainer, so = range.startOffset;
- if (node !== range.endContainer || offset !== range.endOffset) {
- // Check the root containers of the range and the new boundary, and also check whether the new boundary
- // is after the current end. In either case, collapse the range to the new position
- if (getRootContainer(node) != getRootContainer(sc) || dom.comparePoints(node, offset, sc, so) == -1) {
- sc = node;
- so = offset;
- }
- boundaryUpdater(range, sc, so, node, offset);
- }
- }
-
- function setRangeStartAndEnd(range, node, offset) {
- if (node !== range.startContainer || offset !== range.startOffset || node !== range.endContainer || offset !== range.endOffset) {
- boundaryUpdater(range, node, offset, node, offset);
- }
- }
-
- constructor.prototype = new RangePrototype();
-
- api.util.extend(constructor.prototype, {
- setStart: function(node, offset) {
- assertNotDetached(this);
- assertNoDocTypeNotationEntityAncestor(node, true);
- assertValidOffset(node, offset);
-
- setRangeStart(this, node, offset);
- },
-
- setEnd: function(node, offset) {
- assertNotDetached(this);
- assertNoDocTypeNotationEntityAncestor(node, true);
- assertValidOffset(node, offset);
-
- setRangeEnd(this, node, offset);
- },
-
- setStartBefore: createBeforeAfterNodeSetter(true, true),
- setStartAfter: createBeforeAfterNodeSetter(false, true),
- setEndBefore: createBeforeAfterNodeSetter(true, false),
- setEndAfter: createBeforeAfterNodeSetter(false, false),
-
- collapse: function(isStart) {
- assertRangeValid(this);
- if (isStart) {
- boundaryUpdater(this, this.startContainer, this.startOffset, this.startContainer, this.startOffset);
- } else {
- boundaryUpdater(this, this.endContainer, this.endOffset, this.endContainer, this.endOffset);
- }
- },
-
- selectNodeContents: function(node) {
- // This doesn't seem well specified: the spec talks only about selecting the node's contents, which
- // could be taken to mean only its children. However, browsers implement this the same as selectNode for
- // text nodes, so I shall do likewise
- assertNotDetached(this);
- assertNoDocTypeNotationEntityAncestor(node, true);
-
- boundaryUpdater(this, node, 0, node, dom.getNodeLength(node));
- },
-
- selectNode: function(node) {
- assertNotDetached(this);
- assertNoDocTypeNotationEntityAncestor(node, false);
- assertValidNodeType(node, beforeAfterNodeTypes);
-
- var start = getBoundaryBeforeNode(node), end = getBoundaryAfterNode(node);
- boundaryUpdater(this, start.node, start.offset, end.node, end.offset);
- },
-
- extractContents: createRangeContentRemover(extractSubtree, boundaryUpdater),
-
- deleteContents: createRangeContentRemover(deleteSubtree, boundaryUpdater),
-
- canSurroundContents: function() {
- assertRangeValid(this);
- assertNodeNotReadOnly(this.startContainer);
- assertNodeNotReadOnly(this.endContainer);
-
- // Check if the contents can be surrounded. Specifically, this means whether the range partially selects
- // no non-text nodes.
- var iterator = new RangeIterator(this, true);
- var boundariesInvalid = (iterator._first && (isNonTextPartiallySelected(iterator._first, this)) ||
- (iterator._last && isNonTextPartiallySelected(iterator._last, this)));
- iterator.detach();
- return !boundariesInvalid;
- },
-
- detach: function() {
- detacher(this);
- },
-
- splitBoundaries: function() {
- assertRangeValid(this);
-
-
- var sc = this.startContainer, so = this.startOffset, ec = this.endContainer, eo = this.endOffset;
- var startEndSame = (sc === ec);
-
- if (dom.isCharacterDataNode(ec) && eo > 0 && eo < ec.length) {
- dom.splitDataNode(ec, eo);
-
- }
-
- if (dom.isCharacterDataNode(sc) && so > 0 && so < sc.length) {
-
- sc = dom.splitDataNode(sc, so);
- if (startEndSame) {
- eo -= so;
- ec = sc;
- } else if (ec == sc.parentNode && eo >= dom.getNodeIndex(sc)) {
- eo++;
- }
- so = 0;
-
- }
- boundaryUpdater(this, sc, so, ec, eo);
- },
-
- normalizeBoundaries: function() {
- assertRangeValid(this);
-
- var sc = this.startContainer, so = this.startOffset, ec = this.endContainer, eo = this.endOffset;
-
- var mergeForward = function(node) {
- var sibling = node.nextSibling;
- if (sibling && sibling.nodeType == node.nodeType) {
- ec = node;
- eo = node.length;
- node.appendData(sibling.data);
- sibling.parentNode.removeChild(sibling);
- }
- };
-
- var mergeBackward = function(node) {
- var sibling = node.previousSibling;
- if (sibling && sibling.nodeType == node.nodeType) {
- sc = node;
- var nodeLength = node.length;
- so = sibling.length;
- node.insertData(0, sibling.data);
- sibling.parentNode.removeChild(sibling);
- if (sc == ec) {
- eo += so;
- ec = sc;
- } else if (ec == node.parentNode) {
- var nodeIndex = dom.getNodeIndex(node);
- if (eo == nodeIndex) {
- ec = node;
- eo = nodeLength;
- } else if (eo > nodeIndex) {
- eo--;
- }
- }
- }
- };
-
- var normalizeStart = true;
-
- if (dom.isCharacterDataNode(ec)) {
- if (ec.length == eo) {
- mergeForward(ec);
- }
- } else {
- if (eo > 0) {
- var endNode = ec.childNodes[eo - 1];
- if (endNode && dom.isCharacterDataNode(endNode)) {
- mergeForward(endNode);
- }
- }
- normalizeStart = !this.collapsed;
- }
-
- if (normalizeStart) {
- if (dom.isCharacterDataNode(sc)) {
- if (so == 0) {
- mergeBackward(sc);
- }
- } else {
- if (so < sc.childNodes.length) {
- var startNode = sc.childNodes[so];
- if (startNode && dom.isCharacterDataNode(startNode)) {
- mergeBackward(startNode);
- }
- }
- }
- } else {
- sc = ec;
- so = eo;
- }
-
- boundaryUpdater(this, sc, so, ec, eo);
- },
-
- collapseToPoint: function(node, offset) {
- assertNotDetached(this);
-
- assertNoDocTypeNotationEntityAncestor(node, true);
- assertValidOffset(node, offset);
-
- setRangeStartAndEnd(this, node, offset);
- }
- });
-
- copyComparisonConstants(constructor);
- }
-
- /*----------------------------------------------------------------------------------------------------------------*/
-
- // Updates commonAncestorContainer and collapsed after boundary change
- function updateCollapsedAndCommonAncestor(range) {
- range.collapsed = (range.startContainer === range.endContainer && range.startOffset === range.endOffset);
- range.commonAncestorContainer = range.collapsed ?
- range.startContainer : dom.getCommonAncestor(range.startContainer, range.endContainer);
- }
-
- function updateBoundaries(range, startContainer, startOffset, endContainer, endOffset) {
- var startMoved = (range.startContainer !== startContainer || range.startOffset !== startOffset);
- var endMoved = (range.endContainer !== endContainer || range.endOffset !== endOffset);
-
- range.startContainer = startContainer;
- range.startOffset = startOffset;
- range.endContainer = endContainer;
- range.endOffset = endOffset;
-
- updateCollapsedAndCommonAncestor(range);
- dispatchEvent(range, "boundarychange", {startMoved: startMoved, endMoved: endMoved});
- }
-
- function detach(range) {
- assertNotDetached(range);
- range.startContainer = range.startOffset = range.endContainer = range.endOffset = null;
- range.collapsed = range.commonAncestorContainer = null;
- dispatchEvent(range, "detach", null);
- range._listeners = null;
- }
-
- /**
- * @constructor
- */
- function Range(doc) {
- this.startContainer = doc;
- this.startOffset = 0;
- this.endContainer = doc;
- this.endOffset = 0;
- this._listeners = {
- boundarychange: [],
- detach: []
- };
- updateCollapsedAndCommonAncestor(this);
- }
-
- createPrototypeRange(Range, updateBoundaries, detach);
-
- api.rangePrototype = RangePrototype.prototype;
-
- Range.rangeProperties = rangeProperties;
- Range.RangeIterator = RangeIterator;
- Range.copyComparisonConstants = copyComparisonConstants;
- Range.createPrototypeRange = createPrototypeRange;
- Range.inspect = inspect;
- Range.getRangeDocument = getRangeDocument;
- Range.rangesEqual = function(r1, r2) {
- return r1.startContainer === r2.startContainer &&
- r1.startOffset === r2.startOffset &&
- r1.endContainer === r2.endContainer &&
- r1.endOffset === r2.endOffset;
- };
-
- api.DomRange = Range;
- api.RangeException = RangeException;
-});rangy.createModule("WrappedRange", function(api, module) {
- api.requireModules( ["DomUtil", "DomRange"] );
-
- /**
- * @constructor
- */
- var WrappedRange;
- var dom = api.dom;
- var DomPosition = dom.DomPosition;
- var DomRange = api.DomRange;
-
-
-
- /*----------------------------------------------------------------------------------------------------------------*/
-
- /*
- This is a workaround for a bug where IE returns the wrong container element from the TextRange's parentElement()
- method. For example, in the following (where pipes denote the selection boundaries):
-
-
-
- var range = document.selection.createRange();
- alert(range.parentElement().id); // Should alert "ul" but alerts "b"
-
- This method returns the common ancestor node of the following:
- - the parentElement() of the textRange
- - the parentElement() of the textRange after calling collapse(true)
- - the parentElement() of the textRange after calling collapse(false)
- */
- function getTextRangeContainerElement(textRange) {
- var parentEl = textRange.parentElement();
-
- var range = textRange.duplicate();
- range.collapse(true);
- var startEl = range.parentElement();
- range = textRange.duplicate();
- range.collapse(false);
- var endEl = range.parentElement();
- var startEndContainer = (startEl == endEl) ? startEl : dom.getCommonAncestor(startEl, endEl);
-
- return startEndContainer == parentEl ? startEndContainer : dom.getCommonAncestor(parentEl, startEndContainer);
- }
-
- function textRangeIsCollapsed(textRange) {
- return textRange.compareEndPoints("StartToEnd", textRange) == 0;
- }
-
- // Gets the boundary of a TextRange expressed as a node and an offset within that node. This function started out as
- // an improved version of code found in Tim Cameron Ryan's IERange (http://code.google.com/p/ierange/) but has
- // grown, fixing problems with line breaks in preformatted text, adding workaround for IE TextRange bugs, handling
- // for inputs and images, plus optimizations.
- function getTextRangeBoundaryPosition(textRange, wholeRangeContainerElement, isStart, isCollapsed) {
- var workingRange = textRange.duplicate();
-
- workingRange.collapse(isStart);
- var containerElement = workingRange.parentElement();
-
- // Sometimes collapsing a TextRange that's at the start of a text node can move it into the previous node, so
- // check for that
- // TODO: Find out when. Workaround for wholeRangeContainerElement may break this
- if (!dom.isAncestorOf(wholeRangeContainerElement, containerElement, true)) {
- containerElement = wholeRangeContainerElement;
-
- }
-
-
-
- // Deal with nodes that cannot "contain rich HTML markup". In practice, this means form inputs, images and
- // similar. See http://msdn.microsoft.com/en-us/library/aa703950%28VS.85%29.aspx
- if (!containerElement.canHaveHTML) {
- return new DomPosition(containerElement.parentNode, dom.getNodeIndex(containerElement));
- }
-
- var workingNode = dom.getDocument(containerElement).createElement("span");
- var comparison, workingComparisonType = isStart ? "StartToStart" : "StartToEnd";
- var previousNode, nextNode, boundaryPosition, boundaryNode;
-
- // Move the working range through the container's children, starting at the end and working backwards, until the
- // working range reaches or goes past the boundary we're interested in
- do {
- containerElement.insertBefore(workingNode, workingNode.previousSibling);
- workingRange.moveToElementText(workingNode);
- } while ( (comparison = workingRange.compareEndPoints(workingComparisonType, textRange)) > 0 &&
- workingNode.previousSibling);
-
- // We've now reached or gone past the boundary of the text range we're interested in
- // so have identified the node we want
- boundaryNode = workingNode.nextSibling;
-
- if (comparison == -1 && boundaryNode && dom.isCharacterDataNode(boundaryNode)) {
- // This is a character data node (text, comment, cdata). The working range is collapsed at the start of the
- // node containing the text range's boundary, so we move the end of the working range to the boundary point
- // and measure the length of its text to get the boundary's offset within the node.
- workingRange.setEndPoint(isStart ? "EndToStart" : "EndToEnd", textRange);
-
-
- var offset;
-
- if (/[\r\n]/.test(boundaryNode.data)) {
- /*
- For the particular case of a boundary within a text node containing line breaks (within a element,
- for example), we need a slightly complicated approach to get the boundary's offset in IE. The facts:
-
- - Each line break is represented as \r in the text node's data/nodeValue properties
- - Each line break is represented as \r\n in the TextRange's 'text' property
- - The 'text' property of the TextRange does not contain trailing line breaks
-
- To get round the problem presented by the final fact above, we can use the fact that TextRange's
- moveStart() and moveEnd() methods return the actual number of characters moved, which is not necessarily
- the same as the number of characters it was instructed to move. The simplest approach is to use this to
- store the characters moved when moving both the start and end of the range to the start of the document
- body and subtracting the start offset from the end offset (the "move-negative-gazillion" method).
- However, this is extremely slow when the document is large and the range is near the end of it. Clearly
- doing the mirror image (i.e. moving the range boundaries to the end of the document) has the same
- problem.
-
- Another approach that works is to use moveStart() to move the start boundary of the range up to the end
- boundary one character at a time and incrementing a counter with the value returned by the moveStart()
- call. However, the check for whether the start boundary has reached the end boundary is expensive, so
- this method is slow (although unlike "move-negative-gazillion" is largely unaffected by the location of
- the range within the document).
-
- The method below is a hybrid of the two methods above. It uses the fact that a string containing the
- TextRange's 'text' property with each \r\n converted to a single \r character cannot be longer than the
- text of the TextRange, so the start of the range is moved that length initially and then a character at
- a time to make up for any trailing line breaks not contained in the 'text' property. This has good
- performance in most situations compared to the previous two methods.
- */
- var tempRange = workingRange.duplicate();
- var rangeLength = tempRange.text.replace(/\r\n/g, "\r").length;
-
- offset = tempRange.moveStart("character", rangeLength);
- while ( (comparison = tempRange.compareEndPoints("StartToEnd", tempRange)) == -1) {
- offset++;
- tempRange.moveStart("character", 1);
- }
- } else {
- offset = workingRange.text.length;
- }
- boundaryPosition = new DomPosition(boundaryNode, offset);
- } else {
-
-
- // If the boundary immediately follows a character data node and this is the end boundary, we should favour
- // a position within that, and likewise for a start boundary preceding a character data node
- previousNode = (isCollapsed || !isStart) && workingNode.previousSibling;
- nextNode = (isCollapsed || isStart) && workingNode.nextSibling;
-
-
-
- if (nextNode && dom.isCharacterDataNode(nextNode)) {
- boundaryPosition = new DomPosition(nextNode, 0);
- } else if (previousNode && dom.isCharacterDataNode(previousNode)) {
- boundaryPosition = new DomPosition(previousNode, previousNode.length);
- } else {
- boundaryPosition = new DomPosition(containerElement, dom.getNodeIndex(workingNode));
- }
- }
-
- // Clean up
- workingNode.parentNode.removeChild(workingNode);
-
- return boundaryPosition;
- }
-
- // Returns a TextRange representing the boundary of a TextRange expressed as a node and an offset within that node.
- // This function started out as an optimized version of code found in Tim Cameron Ryan's IERange
- // (http://code.google.com/p/ierange/)
- function createBoundaryTextRange(boundaryPosition, isStart) {
- var boundaryNode, boundaryParent, boundaryOffset = boundaryPosition.offset;
- var doc = dom.getDocument(boundaryPosition.node);
- var workingNode, childNodes, workingRange = doc.body.createTextRange();
- var nodeIsDataNode = dom.isCharacterDataNode(boundaryPosition.node);
-
- if (nodeIsDataNode) {
- boundaryNode = boundaryPosition.node;
- boundaryParent = boundaryNode.parentNode;
- } else {
- childNodes = boundaryPosition.node.childNodes;
- boundaryNode = (boundaryOffset < childNodes.length) ? childNodes[boundaryOffset] : null;
- boundaryParent = boundaryPosition.node;
- }
-
- // Position the range immediately before the node containing the boundary
- workingNode = doc.createElement("span");
-
- // Making the working element non-empty element persuades IE to consider the TextRange boundary to be within the
- // element rather than immediately before or after it, which is what we want
- workingNode.innerHTML = "feff;";
-
- // insertBefore is supposed to work like appendChild if the second parameter is null. However, a bug report
- // for IERange suggests that it can crash the browser: http://code.google.com/p/ierange/issues/detail?id=12
- if (boundaryNode) {
- boundaryParent.insertBefore(workingNode, boundaryNode);
- } else {
- boundaryParent.appendChild(workingNode);
- }
-
- workingRange.moveToElementText(workingNode);
- workingRange.collapse(!isStart);
-
- // Clean up
- boundaryParent.removeChild(workingNode);
-
- // Move the working range to the text offset, if required
- if (nodeIsDataNode) {
- workingRange[isStart ? "moveStart" : "moveEnd"]("character", boundaryOffset);
- }
-
- return workingRange;
- }
-
- /*----------------------------------------------------------------------------------------------------------------*/
-
- if (api.features.implementsDomRange && (!api.features.implementsTextRange || !api.config.preferTextRange)) {
- // This is a wrapper around the browser's native DOM Range. It has two aims:
- // - Provide workarounds for specific browser bugs
- // - provide convenient extensions, which are inherited from Rangy's DomRange
-
- (function() {
- var rangeProto;
- var rangeProperties = DomRange.rangeProperties;
- var canSetRangeStartAfterEnd;
-
- function updateRangeProperties(range) {
- var i = rangeProperties.length, prop;
- while (i--) {
- prop = rangeProperties[i];
- range[prop] = range.nativeRange[prop];
- }
- }
-
- function updateNativeRange(range, startContainer, startOffset, endContainer,endOffset) {
- var startMoved = (range.startContainer !== startContainer || range.startOffset != startOffset);
- var endMoved = (range.endContainer !== endContainer || range.endOffset != endOffset);
-
- // Always set both boundaries for the benefit of IE9 (see issue 35)
- if (startMoved || endMoved) {
- range.setEnd(endContainer, endOffset);
- range.setStart(startContainer, startOffset);
- }
- }
-
- function detach(range) {
- range.nativeRange.detach();
- range.detached = true;
- var i = rangeProperties.length, prop;
- while (i--) {
- prop = rangeProperties[i];
- range[prop] = null;
- }
- }
-
- var createBeforeAfterNodeSetter;
-
- WrappedRange = function(range) {
- if (!range) {
- throw new Error("Range must be specified");
- }
- this.nativeRange = range;
- updateRangeProperties(this);
- };
-
- DomRange.createPrototypeRange(WrappedRange, updateNativeRange, detach);
-
- rangeProto = WrappedRange.prototype;
-
- rangeProto.selectNode = function(node) {
- this.nativeRange.selectNode(node);
- updateRangeProperties(this);
- };
-
- rangeProto.deleteContents = function() {
- this.nativeRange.deleteContents();
- updateRangeProperties(this);
- };
-
- rangeProto.extractContents = function() {
- var frag = this.nativeRange.extractContents();
- updateRangeProperties(this);
- return frag;
- };
-
- rangeProto.cloneContents = function() {
- return this.nativeRange.cloneContents();
- };
-
- // TODO: Until I can find a way to programmatically trigger the Firefox bug (apparently long-standing, still
- // present in 3.6.8) that throws "Index or size is negative or greater than the allowed amount" for
- // insertNode in some circumstances, all browsers will have to use the Rangy's own implementation of
- // insertNode, which works but is almost certainly slower than the native implementation.
-/*
- rangeProto.insertNode = function(node) {
- this.nativeRange.insertNode(node);
- updateRangeProperties(this);
- };
-*/
-
- rangeProto.surroundContents = function(node) {
- this.nativeRange.surroundContents(node);
- updateRangeProperties(this);
- };
-
- rangeProto.collapse = function(isStart) {
- this.nativeRange.collapse(isStart);
- updateRangeProperties(this);
- };
-
- rangeProto.cloneRange = function() {
- return new WrappedRange(this.nativeRange.cloneRange());
- };
-
- rangeProto.refresh = function() {
- updateRangeProperties(this);
- };
-
- rangeProto.toString = function() {
- return this.nativeRange.toString();
- };
-
- // Create test range and node for feature detection
-
- var testTextNode = document.createTextNode("test");
- dom.getBody(document).appendChild(testTextNode);
- var range = document.createRange();
-
- /*--------------------------------------------------------------------------------------------------------*/
-
- // Test for Firefox 2 bug that prevents moving the start of a Range to a point after its current end and
- // correct for it
-
- range.setStart(testTextNode, 0);
- range.setEnd(testTextNode, 0);
-
- try {
- range.setStart(testTextNode, 1);
- canSetRangeStartAfterEnd = true;
-
- rangeProto.setStart = function(node, offset) {
- this.nativeRange.setStart(node, offset);
- updateRangeProperties(this);
- };
-
- rangeProto.setEnd = function(node, offset) {
- this.nativeRange.setEnd(node, offset);
- updateRangeProperties(this);
- };
-
- createBeforeAfterNodeSetter = function(name) {
- return function(node) {
- this.nativeRange[name](node);
- updateRangeProperties(this);
- };
- };
-
- } catch(ex) {
-
-
- canSetRangeStartAfterEnd = false;
-
- rangeProto.setStart = function(node, offset) {
- try {
- this.nativeRange.setStart(node, offset);
- } catch (ex) {
- this.nativeRange.setEnd(node, offset);
- this.nativeRange.setStart(node, offset);
- }
- updateRangeProperties(this);
- };
-
- rangeProto.setEnd = function(node, offset) {
- try {
- this.nativeRange.setEnd(node, offset);
- } catch (ex) {
- this.nativeRange.setStart(node, offset);
- this.nativeRange.setEnd(node, offset);
- }
- updateRangeProperties(this);
- };
-
- createBeforeAfterNodeSetter = function(name, oppositeName) {
- return function(node) {
- try {
- this.nativeRange[name](node);
- } catch (ex) {
- this.nativeRange[oppositeName](node);
- this.nativeRange[name](node);
- }
- updateRangeProperties(this);
- };
- };
- }
-
- rangeProto.setStartBefore = createBeforeAfterNodeSetter("setStartBefore", "setEndBefore");
- rangeProto.setStartAfter = createBeforeAfterNodeSetter("setStartAfter", "setEndAfter");
- rangeProto.setEndBefore = createBeforeAfterNodeSetter("setEndBefore", "setStartBefore");
- rangeProto.setEndAfter = createBeforeAfterNodeSetter("setEndAfter", "setStartAfter");
-
- /*--------------------------------------------------------------------------------------------------------*/
-
- // Test for and correct Firefox 2 behaviour with selectNodeContents on text nodes: it collapses the range to
- // the 0th character of the text node
- range.selectNodeContents(testTextNode);
- if (range.startContainer == testTextNode && range.endContainer == testTextNode &&
- range.startOffset == 0 && range.endOffset == testTextNode.length) {
- rangeProto.selectNodeContents = function(node) {
- this.nativeRange.selectNodeContents(node);
- updateRangeProperties(this);
- };
- } else {
- rangeProto.selectNodeContents = function(node) {
- this.setStart(node, 0);
- this.setEnd(node, DomRange.getEndOffset(node));
- };
- }
-
- /*--------------------------------------------------------------------------------------------------------*/
-
- // Test for WebKit bug that has the beahviour of compareBoundaryPoints round the wrong way for constants
- // START_TO_END and END_TO_START: https://bugs.webkit.org/show_bug.cgi?id=20738
-
- range.selectNodeContents(testTextNode);
- range.setEnd(testTextNode, 3);
-
- var range2 = document.createRange();
- range2.selectNodeContents(testTextNode);
- range2.setEnd(testTextNode, 4);
- range2.setStart(testTextNode, 2);
-
- if (range.compareBoundaryPoints(range.START_TO_END, range2) == -1 &
- range.compareBoundaryPoints(range.END_TO_START, range2) == 1) {
- // This is the wrong way round, so correct for it
-
-
- rangeProto.compareBoundaryPoints = function(type, range) {
- range = range.nativeRange || range;
- if (type == range.START_TO_END) {
- type = range.END_TO_START;
- } else if (type == range.END_TO_START) {
- type = range.START_TO_END;
- }
- return this.nativeRange.compareBoundaryPoints(type, range);
- };
- } else {
- rangeProto.compareBoundaryPoints = function(type, range) {
- return this.nativeRange.compareBoundaryPoints(type, range.nativeRange || range);
- };
- }
-
- /*--------------------------------------------------------------------------------------------------------*/
-
- // Test for existence of createContextualFragment and delegate to it if it exists
- if (api.util.isHostMethod(range, "createContextualFragment")) {
- rangeProto.createContextualFragment = function(fragmentStr) {
- return this.nativeRange.createContextualFragment(fragmentStr);
- };
- }
-
- /*--------------------------------------------------------------------------------------------------------*/
-
- // Clean up
- dom.getBody(document).removeChild(testTextNode);
- range.detach();
- range2.detach();
- })();
-
- api.createNativeRange = function(doc) {
- doc = doc || document;
- return doc.createRange();
- };
- } else if (api.features.implementsTextRange) {
- // This is a wrapper around a TextRange, providing full DOM Range functionality using rangy's DomRange as a
- // prototype
-
- WrappedRange = function(textRange) {
- this.textRange = textRange;
- this.refresh();
- };
-
- WrappedRange.prototype = new DomRange(document);
-
- WrappedRange.prototype.refresh = function() {
- var start, end;
-
- // TextRange's parentElement() method cannot be trusted. getTextRangeContainerElement() works around that.
- var rangeContainerElement = getTextRangeContainerElement(this.textRange);
-
- if (textRangeIsCollapsed(this.textRange)) {
- end = start = getTextRangeBoundaryPosition(this.textRange, rangeContainerElement, true, true);
- } else {
-
- start = getTextRangeBoundaryPosition(this.textRange, rangeContainerElement, true, false);
- end = getTextRangeBoundaryPosition(this.textRange, rangeContainerElement, false, false);
- }
-
- this.setStart(start.node, start.offset);
- this.setEnd(end.node, end.offset);
- };
-
- DomRange.copyComparisonConstants(WrappedRange);
-
- // Add WrappedRange as the Range property of the global object to allow expression like Range.END_TO_END to work
- var globalObj = (function() { return this; })();
- if (typeof globalObj.Range == "undefined") {
- globalObj.Range = WrappedRange;
- }
-
- api.createNativeRange = function(doc) {
- doc = doc || document;
- return doc.body.createTextRange();
- };
- }
-
- if (api.features.implementsTextRange) {
- WrappedRange.rangeToTextRange = function(range) {
- if (range.collapsed) {
- var tr = createBoundaryTextRange(new DomPosition(range.startContainer, range.startOffset), true);
-
-
-
- return tr;
-
- //return createBoundaryTextRange(new DomPosition(range.startContainer, range.startOffset), true);
- } else {
- var startRange = createBoundaryTextRange(new DomPosition(range.startContainer, range.startOffset), true);
- var endRange = createBoundaryTextRange(new DomPosition(range.endContainer, range.endOffset), false);
- var textRange = dom.getDocument(range.startContainer).body.createTextRange();
- textRange.setEndPoint("StartToStart", startRange);
- textRange.setEndPoint("EndToEnd", endRange);
- return textRange;
- }
- };
- }
-
- WrappedRange.prototype.getName = function() {
- return "WrappedRange";
- };
-
- api.WrappedRange = WrappedRange;
-
- api.createRange = function(doc) {
- doc = doc || document;
- return new WrappedRange(api.createNativeRange(doc));
- };
-
- api.createRangyRange = function(doc) {
- doc = doc || document;
- return new DomRange(doc);
- };
-
- api.createIframeRange = function(iframeEl) {
- return api.createRange(dom.getIframeDocument(iframeEl));
- };
-
- api.createIframeRangyRange = function(iframeEl) {
- return api.createRangyRange(dom.getIframeDocument(iframeEl));
- };
-
- api.addCreateMissingNativeApiListener(function(win) {
- var doc = win.document;
- if (typeof doc.createRange == "undefined") {
- doc.createRange = function() {
- return api.createRange(this);
- };
- }
- doc = win = null;
- });
-});rangy.createModule("WrappedSelection", function(api, module) {
- // This will create a selection object wrapper that follows the Selection object found in the WHATWG draft DOM Range
- // spec (http://html5.org/specs/dom-range.html)
-
- api.requireModules( ["DomUtil", "DomRange", "WrappedRange"] );
-
- api.config.checkSelectionRanges = true;
-
- var BOOLEAN = "boolean",
- windowPropertyName = "_rangySelection",
- dom = api.dom,
- util = api.util,
- DomRange = api.DomRange,
- WrappedRange = api.WrappedRange,
- DOMException = api.DOMException,
- DomPosition = dom.DomPosition,
- getSelection,
- selectionIsCollapsed,
- CONTROL = "Control";
-
-
-
- function getWinSelection(winParam) {
- return (winParam || window).getSelection();
- }
-
- function getDocSelection(winParam) {
- return (winParam || window).document.selection;
- }
-
- // Test for the Range/TextRange and Selection features required
- // Test for ability to retrieve selection
- var implementsWinGetSelection = api.util.isHostMethod(window, "getSelection"),
- implementsDocSelection = api.util.isHostObject(document, "selection");
-
- var useDocumentSelection = implementsDocSelection && (!implementsWinGetSelection || api.config.preferTextRange);
-
- if (useDocumentSelection) {
- getSelection = getDocSelection;
- api.isSelectionValid = function(winParam) {
- var doc = (winParam || window).document, nativeSel = doc.selection;
-
- // Check whether the selection TextRange is actually contained within the correct document
- return (nativeSel.type != "None" || dom.getDocument(nativeSel.createRange().parentElement()) == doc);
- };
- } else if (implementsWinGetSelection) {
- getSelection = getWinSelection;
- api.isSelectionValid = function() {
- return true;
- };
- } else {
- module.fail("Neither document.selection or window.getSelection() detected.");
- }
-
- api.getNativeSelection = getSelection;
-
- var testSelection = getSelection();
- var testRange = api.createNativeRange(document);
- var body = dom.getBody(document);
-
- // Obtaining a range from a selection
- var selectionHasAnchorAndFocus = util.areHostObjects(testSelection, ["anchorNode", "focusNode"] &&
- util.areHostProperties(testSelection, ["anchorOffset", "focusOffset"]));
- api.features.selectionHasAnchorAndFocus = selectionHasAnchorAndFocus;
-
- // Test for existence of native selection extend() method
- var selectionHasExtend = util.isHostMethod(testSelection, "extend");
- api.features.selectionHasExtend = selectionHasExtend;
-
- // Test if rangeCount exists
- var selectionHasRangeCount = (typeof testSelection.rangeCount == "number");
- api.features.selectionHasRangeCount = selectionHasRangeCount;
-
- var selectionSupportsMultipleRanges = false;
- var collapsedNonEditableSelectionsSupported = true;
-
- if (util.areHostMethods(testSelection, ["addRange", "getRangeAt", "removeAllRanges"]) &&
- typeof testSelection.rangeCount == "number" && api.features.implementsDomRange) {
-
- (function() {
- var iframe = document.createElement("iframe");
- body.appendChild(iframe);
-
- var iframeDoc = dom.getIframeDocument(iframe);
- iframeDoc.open();
- iframeDoc.write("12");
- iframeDoc.close();
-
- var sel = dom.getIframeWindow(iframe).getSelection();
- var docEl = iframeDoc.documentElement;
- var iframeBody = docEl.lastChild, textNode = iframeBody.firstChild;
-
- // Test whether the native selection will allow a collapsed selection within a non-editable element
- var r1 = iframeDoc.createRange();
- r1.setStart(textNode, 1);
- r1.collapse(true);
- sel.addRange(r1);
- collapsedNonEditableSelectionsSupported = (sel.rangeCount == 1);
- sel.removeAllRanges();
-
- // Test whether the native selection is capable of supporting multiple ranges
- var r2 = r1.cloneRange();
- r1.setStart(textNode, 0);
- r2.setEnd(textNode, 2);
- sel.addRange(r1);
- sel.addRange(r2);
-
- selectionSupportsMultipleRanges = (sel.rangeCount == 2);
-
- // Clean up
- r1.detach();
- r2.detach();
-
- body.removeChild(iframe);
- })();
- }
-
- api.features.selectionSupportsMultipleRanges = selectionSupportsMultipleRanges;
- api.features.collapsedNonEditableSelectionsSupported = collapsedNonEditableSelectionsSupported;
-
- // ControlRanges
- var implementsControlRange = false, testControlRange;
-
- if (body && util.isHostMethod(body, "createControlRange")) {
- testControlRange = body.createControlRange();
- if (util.areHostProperties(testControlRange, ["item", "add"])) {
- implementsControlRange = true;
- }
- }
- api.features.implementsControlRange = implementsControlRange;
-
- // Selection collapsedness
- if (selectionHasAnchorAndFocus) {
- selectionIsCollapsed = function(sel) {
- return sel.anchorNode === sel.focusNode && sel.anchorOffset === sel.focusOffset;
- };
- } else {
- selectionIsCollapsed = function(sel) {
- return sel.rangeCount ? sel.getRangeAt(sel.rangeCount - 1).collapsed : false;
- };
- }
-
- function updateAnchorAndFocusFromRange(sel, range, backwards) {
- var anchorPrefix = backwards ? "end" : "start", focusPrefix = backwards ? "start" : "end";
- sel.anchorNode = range[anchorPrefix + "Container"];
- sel.anchorOffset = range[anchorPrefix + "Offset"];
- sel.focusNode = range[focusPrefix + "Container"];
- sel.focusOffset = range[focusPrefix + "Offset"];
- }
-
- function updateAnchorAndFocusFromNativeSelection(sel) {
- var nativeSel = sel.nativeSelection;
- sel.anchorNode = nativeSel.anchorNode;
- sel.anchorOffset = nativeSel.anchorOffset;
- sel.focusNode = nativeSel.focusNode;
- sel.focusOffset = nativeSel.focusOffset;
- }
-
- function updateEmptySelection(sel) {
- sel.anchorNode = sel.focusNode = null;
- sel.anchorOffset = sel.focusOffset = 0;
- sel.rangeCount = 0;
- sel.isCollapsed = true;
- sel._ranges.length = 0;
- }
-
- function getNativeRange(range) {
- var nativeRange;
- if (range instanceof DomRange) {
- nativeRange = range._selectionNativeRange;
- if (!nativeRange) {
- nativeRange = api.createNativeRange(dom.getDocument(range.startContainer));
- nativeRange.setEnd(range.endContainer, range.endOffset);
- nativeRange.setStart(range.startContainer, range.startOffset);
- range._selectionNativeRange = nativeRange;
- range.attachListener("detach", function() {
-
- this._selectionNativeRange = null;
- });
- }
- } else if (range instanceof WrappedRange) {
- nativeRange = range.nativeRange;
- } else if (api.features.implementsDomRange && (range instanceof dom.getWindow(range.startContainer).Range)) {
- nativeRange = range;
- }
- return nativeRange;
- }
-
- function rangeContainsSingleElement(rangeNodes) {
- if (!rangeNodes.length || rangeNodes[0].nodeType != 1) {
- return false;
- }
- for (var i = 1, len = rangeNodes.length; i < len; ++i) {
- if (!dom.isAncestorOf(rangeNodes[0], rangeNodes[i])) {
- return false;
- }
- }
- return true;
- }
-
- function getSingleElementFromRange(range) {
- var nodes = range.getNodes();
- if (!rangeContainsSingleElement(nodes)) {
- throw new Error("getSingleElementFromRange: range " + range.inspect() + " did not consist of a single element");
- }
- return nodes[0];
- }
-
- function isTextRange(range) {
- return !!range && typeof range.text != "undefined";
- }
-
- function updateFromTextRange(sel, range) {
- // Create a Range from the selected TextRange
- var wrappedRange = new WrappedRange(range);
- sel._ranges = [wrappedRange];
-
- updateAnchorAndFocusFromRange(sel, wrappedRange, false);
- sel.rangeCount = 1;
- sel.isCollapsed = wrappedRange.collapsed;
- }
-
- function updateControlSelection(sel) {
- // Update the wrapped selection based on what's now in the native selection
- sel._ranges.length = 0;
- if (sel.docSelection.type == "None") {
- updateEmptySelection(sel);
- } else {
- var controlRange = sel.docSelection.createRange();
- if (isTextRange(controlRange)) {
- // This case (where the selection type is "Control" and calling createRange() on the selection returns
- // a TextRange) can happen in IE 9. It happens, for example, when all elements in the selected
- // ControlRange have been removed from the ControlRange and removed from the document.
- updateFromTextRange(sel, controlRange);
- } else {
- sel.rangeCount = controlRange.length;
- var range, doc = dom.getDocument(controlRange.item(0));
- for (var i = 0; i < sel.rangeCount; ++i) {
- range = api.createRange(doc);
- range.selectNode(controlRange.item(i));
- sel._ranges.push(range);
- }
- sel.isCollapsed = sel.rangeCount == 1 && sel._ranges[0].collapsed;
- updateAnchorAndFocusFromRange(sel, sel._ranges[sel.rangeCount - 1], false);
- }
- }
- }
-
- function addRangeToControlSelection(sel, range) {
- var controlRange = sel.docSelection.createRange();
- var rangeElement = getSingleElementFromRange(range);
-
- // Create a new ControlRange containing all the elements in the selected ControlRange plus the element
- // contained by the supplied range
- var doc = dom.getDocument(controlRange.item(0));
- var newControlRange = dom.getBody(doc).createControlRange();
- for (var i = 0, len = controlRange.length; i < len; ++i) {
- newControlRange.add(controlRange.item(i));
- }
- try {
- newControlRange.add(rangeElement);
- } catch (ex) {
- throw new Error("addRange(): Element within the specified Range could not be added to control selection (does it have layout?)");
- }
- newControlRange.select();
-
- // Update the wrapped selection based on what's now in the native selection
- updateControlSelection(sel);
- }
-
- var getSelectionRangeAt;
-
- if (util.isHostMethod(testSelection, "getRangeAt")) {
- getSelectionRangeAt = function(sel, index) {
- try {
- return sel.getRangeAt(index);
- } catch(ex) {
- return null;
- }
- };
- } else if (selectionHasAnchorAndFocus) {
- getSelectionRangeAt = function(sel) {
- var doc = dom.getDocument(sel.anchorNode);
- var range = api.createRange(doc);
- range.setStart(sel.anchorNode, sel.anchorOffset);
- range.setEnd(sel.focusNode, sel.focusOffset);
-
- // Handle the case when the selection was selected backwards (from the end to the start in the
- // document)
- if (range.collapsed !== this.isCollapsed) {
- range.setStart(sel.focusNode, sel.focusOffset);
- range.setEnd(sel.anchorNode, sel.anchorOffset);
- }
-
- return range;
- };
- }
-
- /**
- * @constructor
- */
- function WrappedSelection(selection, docSelection, win) {
- this.nativeSelection = selection;
- this.docSelection = docSelection;
- this._ranges = [];
- this.win = win;
- this.refresh();
- }
-
- api.getSelection = function(win) {
- win = win || window;
- var sel = win[windowPropertyName];
- var nativeSel = getSelection(win), docSel = implementsDocSelection ? getDocSelection(win) : null;
- if (sel) {
- sel.nativeSelection = nativeSel;
- sel.docSelection = docSel;
- sel.refresh(win);
- } else {
- sel = new WrappedSelection(nativeSel, docSel, win);
- win[windowPropertyName] = sel;
- }
- return sel;
- };
-
- api.getIframeSelection = function(iframeEl) {
- return api.getSelection(dom.getIframeWindow(iframeEl));
- };
-
- var selProto = WrappedSelection.prototype;
-
- function createControlSelection(sel, ranges) {
- // Ensure that the selection becomes of type "Control"
- var doc = dom.getDocument(ranges[0].startContainer);
- var controlRange = dom.getBody(doc).createControlRange();
- for (var i = 0, el; i < rangeCount; ++i) {
- el = getSingleElementFromRange(ranges[i]);
- try {
- controlRange.add(el);
- } catch (ex) {
- throw new Error("setRanges(): Element within the one of the specified Ranges could not be added to control selection (does it have layout?)");
- }
- }
- controlRange.select();
-
- // Update the wrapped selection based on what's now in the native selection
- updateControlSelection(sel);
- }
-
- // Selecting a range
- if (!useDocumentSelection && selectionHasAnchorAndFocus && util.areHostMethods(testSelection, ["removeAllRanges", "addRange"])) {
- selProto.removeAllRanges = function() {
- this.nativeSelection.removeAllRanges();
- updateEmptySelection(this);
- };
-
- var addRangeBackwards = function(sel, range) {
- var doc = DomRange.getRangeDocument(range);
- var endRange = api.createRange(doc);
- endRange.collapseToPoint(range.endContainer, range.endOffset);
- sel.nativeSelection.addRange(getNativeRange(endRange));
- sel.nativeSelection.extend(range.startContainer, range.startOffset);
- sel.refresh();
- };
-
- if (selectionHasRangeCount) {
- selProto.addRange = function(range, backwards) {
- if (implementsControlRange && implementsDocSelection && this.docSelection.type == CONTROL) {
- addRangeToControlSelection(this, range);
- } else {
- if (backwards && selectionHasExtend) {
- addRangeBackwards(this, range);
- } else {
- var previousRangeCount;
- if (selectionSupportsMultipleRanges) {
- previousRangeCount = this.rangeCount;
- } else {
- this.removeAllRanges();
- previousRangeCount = 0;
- }
- this.nativeSelection.addRange(getNativeRange(range));
-
- // Check whether adding the range was successful
- this.rangeCount = this.nativeSelection.rangeCount;
-
- if (this.rangeCount == previousRangeCount + 1) {
- // The range was added successfully
-
- // Check whether the range that we added to the selection is reflected in the last range extracted from
- // the selection
- if (api.config.checkSelectionRanges) {
- var nativeRange = getSelectionRangeAt(this.nativeSelection, this.rangeCount - 1);
- if (nativeRange && !DomRange.rangesEqual(nativeRange, range)) {
- // Happens in WebKit with, for example, a selection placed at the start of a text node
- range = new WrappedRange(nativeRange);
- }
- }
- this._ranges[this.rangeCount - 1] = range;
- updateAnchorAndFocusFromRange(this, range, selectionIsBackwards(this.nativeSelection));
- this.isCollapsed = selectionIsCollapsed(this);
- } else {
- // The range was not added successfully. The simplest thing is to refresh
- this.refresh();
- }
- }
- }
- };
- } else {
- selProto.addRange = function(range, backwards) {
- if (backwards && selectionHasExtend) {
- addRangeBackwards(this, range);
- } else {
- this.nativeSelection.addRange(getNativeRange(range));
- this.refresh();
- }
- };
- }
-
- selProto.setRanges = function(ranges) {
- if (implementsControlRange && ranges.length > 1) {
- createControlSelection(this, ranges);
- } else {
- this.removeAllRanges();
- for (var i = 0, len = ranges.length; i < len; ++i) {
- this.addRange(ranges[i]);
- }
- }
- };
- } else if (util.isHostMethod(testSelection, "empty") && util.isHostMethod(testRange, "select") &&
- implementsControlRange && useDocumentSelection) {
-
- selProto.removeAllRanges = function() {
- // Added try/catch as fix for issue #21
- try {
- this.docSelection.empty();
-
- // Check for empty() not working (issue #24)
- if (this.docSelection.type != "None") {
- // Work around failure to empty a control selection by instead selecting a TextRange and then
- // calling empty()
- var doc;
- if (this.anchorNode) {
- doc = dom.getDocument(this.anchorNode);
- } else if (this.docSelection.type == CONTROL) {
- var controlRange = this.docSelection.createRange();
- if (controlRange.length) {
- doc = dom.getDocument(controlRange.item(0)).body.createTextRange();
- }
- }
- if (doc) {
- var textRange = doc.body.createTextRange();
- textRange.select();
- this.docSelection.empty();
- }
- }
- } catch(ex) {}
- updateEmptySelection(this);
- };
-
- selProto.addRange = function(range) {
- if (this.docSelection.type == CONTROL) {
- addRangeToControlSelection(this, range);
- } else {
- WrappedRange.rangeToTextRange(range).select();
- this._ranges[0] = range;
- this.rangeCount = 1;
- this.isCollapsed = this._ranges[0].collapsed;
- updateAnchorAndFocusFromRange(this, range, false);
- }
- };
-
- selProto.setRanges = function(ranges) {
- this.removeAllRanges();
- var rangeCount = ranges.length;
- if (rangeCount > 1) {
- createControlSelection(this, ranges);
- } else if (rangeCount) {
- this.addRange(ranges[0]);
- }
- };
- } else {
- module.fail("No means of selecting a Range or TextRange was found");
- return false;
- }
-
- selProto.getRangeAt = function(index) {
- if (index < 0 || index >= this.rangeCount) {
- throw new DOMException("INDEX_SIZE_ERR");
- } else {
- return this._ranges[index];
- }
- };
-
- var refreshSelection;
-
- if (useDocumentSelection) {
- refreshSelection = function(sel) {
- var range;
- if (api.isSelectionValid(sel.win)) {
- range = sel.docSelection.createRange();
- } else {
- range = dom.getBody(sel.win.document).createTextRange();
- range.collapse(true);
- }
-
-
- if (sel.docSelection.type == CONTROL) {
- updateControlSelection(sel);
- } else if (isTextRange(range)) {
- updateFromTextRange(sel, range);
- } else {
- updateEmptySelection(sel);
- }
- };
- } else if (util.isHostMethod(testSelection, "getRangeAt") && typeof testSelection.rangeCount == "number") {
- refreshSelection = function(sel) {
- if (implementsControlRange && implementsDocSelection && sel.docSelection.type == CONTROL) {
- updateControlSelection(sel);
- } else {
- sel._ranges.length = sel.rangeCount = sel.nativeSelection.rangeCount;
- if (sel.rangeCount) {
- for (var i = 0, len = sel.rangeCount; i < len; ++i) {
- sel._ranges[i] = new api.WrappedRange(sel.nativeSelection.getRangeAt(i));
- }
- updateAnchorAndFocusFromRange(sel, sel._ranges[sel.rangeCount - 1], selectionIsBackwards(sel.nativeSelection));
- sel.isCollapsed = selectionIsCollapsed(sel);
- } else {
- updateEmptySelection(sel);
- }
- }
- };
- } else if (selectionHasAnchorAndFocus && typeof testSelection.isCollapsed == BOOLEAN && typeof testRange.collapsed == BOOLEAN && api.features.implementsDomRange) {
- refreshSelection = function(sel) {
- var range, nativeSel = sel.nativeSelection;
- if (nativeSel.anchorNode) {
- range = getSelectionRangeAt(nativeSel, 0);
- sel._ranges = [range];
- sel.rangeCount = 1;
- updateAnchorAndFocusFromNativeSelection(sel);
- sel.isCollapsed = selectionIsCollapsed(sel);
- } else {
- updateEmptySelection(sel);
- }
- };
- } else {
- module.fail("No means of obtaining a Range or TextRange from the user's selection was found");
- return false;
- }
-
- selProto.refresh = function(checkForChanges) {
- var oldRanges = checkForChanges ? this._ranges.slice(0) : null;
- refreshSelection(this);
- if (checkForChanges) {
- var i = oldRanges.length;
- if (i != this._ranges.length) {
- return false;
- }
- while (i--) {
- if (!DomRange.rangesEqual(oldRanges[i], this._ranges[i])) {
- return false;
- }
- }
- return true;
- }
- };
-
- // Removal of a single range
- var removeRangeManually = function(sel, range) {
- var ranges = sel.getAllRanges(), removed = false;
- sel.removeAllRanges();
- for (var i = 0, len = ranges.length; i < len; ++i) {
- if (removed || range !== ranges[i]) {
- sel.addRange(ranges[i]);
- } else {
- // According to the draft WHATWG Range spec, the same range may be added to the selection multiple
- // times. removeRange should only remove the first instance, so the following ensures only the first
- // instance is removed
- removed = true;
- }
- }
- if (!sel.rangeCount) {
- updateEmptySelection(sel);
- }
- };
-
- if (implementsControlRange) {
- selProto.removeRange = function(range) {
- if (this.docSelection.type == CONTROL) {
- var controlRange = this.docSelection.createRange();
- var rangeElement = getSingleElementFromRange(range);
-
- // Create a new ControlRange containing all the elements in the selected ControlRange minus the
- // element contained by the supplied range
- var doc = dom.getDocument(controlRange.item(0));
- var newControlRange = dom.getBody(doc).createControlRange();
- var el, removed = false;
- for (var i = 0, len = controlRange.length; i < len; ++i) {
- el = controlRange.item(i);
- if (el !== rangeElement || removed) {
- newControlRange.add(controlRange.item(i));
- } else {
- removed = true;
- }
- }
- newControlRange.select();
-
- // Update the wrapped selection based on what's now in the native selection
- updateControlSelection(this);
- } else {
- removeRangeManually(this, range);
- }
- };
- } else {
- selProto.removeRange = function(range) {
- removeRangeManually(this, range);
- };
- }
-
- // Detecting if a selection is backwards
- var selectionIsBackwards;
- if (!useDocumentSelection && selectionHasAnchorAndFocus && api.features.implementsDomRange) {
- selectionIsBackwards = function(sel) {
- var backwards = false;
- if (sel.anchorNode) {
- backwards = (dom.comparePoints(sel.anchorNode, sel.anchorOffset, sel.focusNode, sel.focusOffset) == 1);
- }
- return backwards;
- };
-
- selProto.isBackwards = function() {
- return selectionIsBackwards(this);
- };
- } else {
- selectionIsBackwards = selProto.isBackwards = function() {
- return false;
- };
- }
-
- // Selection text
- // This is conformant to the new WHATWG DOM Range draft spec but differs from WebKit and Mozilla's implementation
- selProto.toString = function() {
-
- var rangeTexts = [];
- for (var i = 0, len = this.rangeCount; i < len; ++i) {
- rangeTexts[i] = "" + this._ranges[i];
- }
- return rangeTexts.join("");
- };
-
- function assertNodeInSameDocument(sel, node) {
- if (sel.anchorNode && (dom.getDocument(sel.anchorNode) !== dom.getDocument(node))) {
- throw new DOMException("WRONG_DOCUMENT_ERR");
- }
- }
-
- // No current browsers conform fully to the HTML 5 draft spec for this method, so Rangy's own method is always used
- selProto.collapse = function(node, offset) {
- assertNodeInSameDocument(this, node);
- var range = api.createRange(dom.getDocument(node));
- range.collapseToPoint(node, offset);
- this.removeAllRanges();
- this.addRange(range);
- this.isCollapsed = true;
- };
-
- selProto.collapseToStart = function() {
- if (this.rangeCount) {
- var range = this._ranges[0];
- this.collapse(range.startContainer, range.startOffset);
- } else {
- throw new DOMException("INVALID_STATE_ERR");
- }
- };
-
- selProto.collapseToEnd = function() {
- if (this.rangeCount) {
- var range = this._ranges[this.rangeCount - 1];
- this.collapse(range.endContainer, range.endOffset);
- } else {
- throw new DOMException("INVALID_STATE_ERR");
- }
- };
-
- // The HTML 5 spec is very specific on how selectAllChildren should be implemented so the native implementation is
- // never used by Rangy.
- selProto.selectAllChildren = function(node) {
- assertNodeInSameDocument(this, node);
- var range = api.createRange(dom.getDocument(node));
- range.selectNodeContents(node);
- this.removeAllRanges();
- this.addRange(range);
- };
-
- selProto.deleteFromDocument = function() {
- // Sepcial behaviour required for Control selections
- if (implementsControlRange && implementsDocSelection && this.docSelection.type == CONTROL) {
- var controlRange = this.docSelection.createRange();
- var element;
- while (controlRange.length) {
- element = controlRange.item(0);
- controlRange.remove(element);
- element.parentNode.removeChild(element);
- }
- this.refresh();
- } else if (this.rangeCount) {
- var ranges = this.getAllRanges();
- this.removeAllRanges();
- for (var i = 0, len = ranges.length; i < len; ++i) {
- ranges[i].deleteContents();
- }
- // The HTML5 spec says nothing about what the selection should contain after calling deleteContents on each
- // range. Firefox moves the selection to where the final selected range was, so we emulate that
- this.addRange(ranges[len - 1]);
- }
- };
-
- // The following are non-standard extensions
- selProto.getAllRanges = function() {
- return this._ranges.slice(0);
- };
-
- selProto.setSingleRange = function(range) {
- this.setRanges( [range] );
- };
-
- selProto.containsNode = function(node, allowPartial) {
- for (var i = 0, len = this._ranges.length; i < len; ++i) {
- if (this._ranges[i].containsNode(node, allowPartial)) {
- return true;
- }
- }
- return false;
- };
-
- selProto.toHtml = function() {
- var html = "";
- if (this.rangeCount) {
- var container = DomRange.getRangeDocument(this._ranges[0]).createElement("div");
- for (var i = 0, len = this._ranges.length; i < len; ++i) {
- container.appendChild(this._ranges[i].cloneContents());
- }
- html = container.innerHTML;
- }
- return html;
- };
-
- function inspect(sel) {
- var rangeInspects = [];
- var anchor = new DomPosition(sel.anchorNode, sel.anchorOffset);
- var focus = new DomPosition(sel.focusNode, sel.focusOffset);
- var name = (typeof sel.getName == "function") ? sel.getName() : "Selection";
-
- if (typeof sel.rangeCount != "undefined") {
- for (var i = 0, len = sel.rangeCount; i < len; ++i) {
- rangeInspects[i] = DomRange.inspect(sel.getRangeAt(i));
- }
- }
- return "[" + name + "(Ranges: " + rangeInspects.join(", ") +
- ")(anchor: " + anchor.inspect() + ", focus: " + focus.inspect() + "]";
-
- }
-
- selProto.getName = function() {
- return "WrappedSelection";
- };
-
- selProto.inspect = function() {
- return inspect(this);
- };
-
- selProto.detach = function() {
- this.win[windowPropertyName] = null;
- this.win = this.anchorNode = this.focusNode = null;
- };
-
- WrappedSelection.inspect = inspect;
-
- api.Selection = WrappedSelection;
-
- api.selectionPrototype = selProto;
-
- api.addCreateMissingNativeApiListener(function(win) {
- if (typeof win.getSelection == "undefined") {
- win.getSelection = function() {
- return api.getSelection(this);
- };
- }
- win = null;
- });
-});
-/*
- Base.js, version 1.1a
- Copyright 2006-2010, Dean Edwards
- License: http://www.opensource.org/licenses/mit-license.php
-*/
-
-var Base = function() {
- // dummy
-};
-
-Base.extend = function(_instance, _static) { // subclass
- var extend = Base.prototype.extend;
-
- // build the prototype
- Base._prototyping = true;
- var proto = new this;
- extend.call(proto, _instance);
- proto.base = function() {
- // call this method from any other method to invoke that method's ancestor
- };
- delete Base._prototyping;
-
- // create the wrapper for the constructor function
- //var constructor = proto.constructor.valueOf(); //-dean
- var constructor = proto.constructor;
- var klass = proto.constructor = function() {
- if (!Base._prototyping) {
- if (this._constructing || this.constructor == klass) { // instantiation
- this._constructing = true;
- constructor.apply(this, arguments);
- delete this._constructing;
- } else if (arguments[0] != null) { // casting
- return (arguments[0].extend || extend).call(arguments[0], proto);
- }
- }
- };
-
- // build the class interface
- klass.ancestor = this;
- klass.extend = this.extend;
- klass.forEach = this.forEach;
- klass.implement = this.implement;
- klass.prototype = proto;
- klass.toString = this.toString;
- klass.valueOf = function(type) {
- //return (type == "object") ? klass : constructor; //-dean
- return (type == "object") ? klass : constructor.valueOf();
- };
- extend.call(klass, _static);
- // class initialisation
- if (typeof klass.init == "function") klass.init();
- return klass;
-};
-
-Base.prototype = {
- extend: function(source, value) {
- if (arguments.length > 1) { // extending with a name/value pair
- var ancestor = this[source];
- if (ancestor && (typeof value == "function") && // overriding a method?
- // the valueOf() comparison is to avoid circular references
- (!ancestor.valueOf || ancestor.valueOf() != value.valueOf()) &&
- /\bbase\b/.test(value)) {
- // get the underlying method
- var method = value.valueOf();
- // override
- value = function() {
- var previous = this.base || Base.prototype.base;
- this.base = ancestor;
- var returnValue = method.apply(this, arguments);
- this.base = previous;
- return returnValue;
- };
- // point to the underlying method
- value.valueOf = function(type) {
- return (type == "object") ? value : method;
- };
- value.toString = Base.toString;
- }
- this[source] = value;
- } else if (source) { // extending with an object literal
- var extend = Base.prototype.extend;
- // if this object has a customised extend method then use it
- if (!Base._prototyping && typeof this != "function") {
- extend = this.extend || extend;
- }
- var proto = {toSource: null};
- // do the "toString" and other methods manually
- var hidden = ["constructor", "toString", "valueOf"];
- // if we are prototyping then include the constructor
- var i = Base._prototyping ? 0 : 1;
- while (key = hidden[i++]) {
- if (source[key] != proto[key]) {
- extend.call(this, key, source[key]);
-
- }
- }
- // copy each of the source object's properties to this object
- for (var key in source) {
- if (!proto[key]) extend.call(this, key, source[key]);
- }
- }
- return this;
- }
-};
-
-// initialise
-Base = Base.extend({
- constructor: function() {
- this.extend(arguments[0]);
- }
-}, {
- ancestor: Object,
- version: "1.1",
-
- forEach: function(object, block, context) {
- for (var key in object) {
- if (this.prototype[key] === undefined) {
- block.call(context, object[key], key, object);
- }
- }
- },
-
- implement: function() {
- for (var i = 0; i < arguments.length; i++) {
- if (typeof arguments[i] == "function") {
- // if it's a function, call it
- arguments[i](this.prototype);
- } else {
- // add the interface using the extend method
- this.prototype.extend(arguments[i]);
- }
- }
- return this;
- },
-
- toString: function() {
- return String(this.valueOf());
- }
-});/**
- * Detect browser support for specific features
- */
-wysihtml5.browser = (function() {
- var userAgent = navigator.userAgent,
- testElement = document.createElement("div"),
- // Browser sniffing is unfortunately needed since some behaviors are impossible to feature detect
- isIE = userAgent.indexOf("MSIE") !== -1 && userAgent.indexOf("Opera") === -1,
- isGecko = userAgent.indexOf("Gecko") !== -1 && userAgent.indexOf("KHTML") === -1,
- isWebKit = userAgent.indexOf("AppleWebKit/") !== -1,
- isChrome = userAgent.indexOf("Chrome/") !== -1,
- isOpera = userAgent.indexOf("Opera/") !== -1;
-
- function iosVersion(userAgent) {
- return ((/ipad|iphone|ipod/.test(userAgent) && userAgent.match(/ os (\d+).+? like mac os x/)) || [, 0])[1];
- }
-
- return {
- // Static variable needed, publicly accessible, to be able override it in unit tests
- USER_AGENT: userAgent,
-
- /**
- * Exclude browsers that are not capable of displaying and handling
- * contentEditable as desired:
- * - iPhone, iPad (tested iOS 4.2.2) and Android (tested 2.2) refuse to make contentEditables focusable
- * - IE < 8 create invalid markup and crash randomly from time to time
- *
- * @return {Boolean}
- */
- supported: function() {
- var userAgent = this.USER_AGENT.toLowerCase(),
- // Essential for making html elements editable
- hasContentEditableSupport = "contentEditable" in testElement,
- // Following methods are needed in order to interact with the contentEditable area
- hasEditingApiSupport = document.execCommand && document.queryCommandSupported && document.queryCommandState,
- // document selector apis are only supported by IE 8+, Safari 4+, Chrome and Firefox 3.5+
- hasQuerySelectorSupport = document.querySelector && document.querySelectorAll,
- // contentEditable is unusable in mobile browsers (tested iOS 4.2.2, Android 2.2, Opera Mobile, WebOS 3.05)
- isIncompatibleMobileBrowser = (this.isIos() && iosVersion(userAgent) < 5) || userAgent.indexOf("opera mobi") !== -1 || userAgent.indexOf("hpwos/") !== -1;
-
- return hasContentEditableSupport
- && hasEditingApiSupport
- && hasQuerySelectorSupport
- && !isIncompatibleMobileBrowser;
- },
-
- isTouchDevice: function() {
- return this.supportsEvent("touchmove");
- },
-
- isIos: function() {
- var userAgent = this.USER_AGENT.toLowerCase();
- return userAgent.indexOf("webkit") !== -1 && userAgent.indexOf("mobile") !== -1;
- },
-
- /**
- * Whether the browser supports sandboxed iframes
- * Currently only IE 6+ offers such feature