Version 5.0.0 beta 1
This commit is contained in:
1 parent
25ddeb65d6
commit
15c7beabc5
6736 files changed
+627902
-497943
No files matched your search
@@ -0,0 +1,241 @@
|
||||
!function(n,r){"object"==typeof exports&&"undefined"!=typeof module?module.exports=r():"function"==typeof define&&define.amd?define("underscore",r):(n="undefined"!=typeof globalThis?globalThis:n||self,function(){var t=n._,e=n._=r();e.noConflict=function(){return n._=t,e}}())}(this,(function(){var n="1.13.1",r="object"==typeof self&&self.self===self&&self||"object"==typeof global&&global.global===global&&global||Function("return this")()||{},t=Array.prototype,e=Object.prototype,u="undefined"!=typeof Symbol?Symbol.prototype:null,o=t.push,i=t.slice,a=e.toString,f=e.hasOwnProperty,c="undefined"!=typeof ArrayBuffer,l="undefined"!=typeof DataView,s=Array.isArray,p=Object.keys,v=Object.create,h=c&&ArrayBuffer.isView,y=isNaN,d=isFinite,g=!{toString:null}.propertyIsEnumerable("toString"),b=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],m=Math.pow(2,53)-1;function j(n,r){return r=null==r?n.length-1:+r,function(){for(var t=Math.max(arguments.length-r,0),e=Array(t),u=0;u<t;u++)e[u]=arguments[u+r];switch(r){case 0:return n.call(this,e);case 1:return n.call(this,arguments[0],e);case 2:return n.call(this,arguments[0],arguments[1],e)}var o=Array(r+1);for(u=0;u<r;u++)o[u]=arguments[u];return o[r]=e,n.apply(this,o)}}function _(n){var r=typeof n;return"function"===r||"object"===r&&!!n}function w(n){return void 0===n}function A(n){return!0===n||!1===n||"[object Boolean]"===a.call(n)}function x(n){var r="[object "+n+"]";return function(n){return a.call(n)===r}}var S=x("String"),O=x("Number"),M=x("Date"),E=x("RegExp"),B=x("Error"),N=x("Symbol"),I=x("ArrayBuffer"),T=x("Function"),k=r.document&&r.document.childNodes;"function"!=typeof/./&&"object"!=typeof Int8Array&&"function"!=typeof k&&(T=function(n){return"function"==typeof n||!1});var D=T,R=x("Object"),F=l&&R(new DataView(new ArrayBuffer(8))),V="undefined"!=typeof Map&&R(new Map),P=x("DataView");var q=F?function(n){return null!=n&&D(n.getInt8)&&I(n.buffer)}:P,U=s||x("Array");function W(n,r){return null!=n&&f.call(n,r)}var z=x("Arguments");!function(){z(arguments)||(z=function(n){return W(n,"callee")})}();var L=z;function $(n){return O(n)&&y(n)}function C(n){return function(){return n}}function K(n){return function(r){var t=n(r);return"number"==typeof t&&t>=0&&t<=m}}function J(n){return function(r){return null==r?void 0:r[n]}}var G=J("byteLength"),H=K(G),Q=/\[object ((I|Ui)nt(8|16|32)|Float(32|64)|Uint8Clamped|Big(I|Ui)nt64)Array\]/;var X=c?function(n){return h?h(n)&&!q(n):H(n)&&Q.test(a.call(n))}:C(!1),Y=J("length");function Z(n,r){r=function(n){for(var r={},t=n.length,e=0;e<t;++e)r[n[e]]=!0;return{contains:function(n){return r[n]},push:function(t){return r[t]=!0,n.push(t)}}}(r);var t=b.length,u=n.constructor,o=D(u)&&u.prototype||e,i="constructor";for(W(n,i)&&!r.contains(i)&&r.push(i);t--;)(i=b[t])in n&&n[i]!==o[i]&&!r.contains(i)&&r.push(i)}function nn(n){if(!_(n))return[];if(p)return p(n);var r=[];for(var t in n)W(n,t)&&r.push(t);return g&&Z(n,r),r}function rn(n,r){var t=nn(r),e=t.length;if(null==n)return!e;for(var u=Object(n),o=0;o<e;o++){var i=t[o];if(r[i]!==u[i]||!(i in u))return!1}return!0}function tn(n){return n instanceof tn?n:this instanceof tn?void(this._wrapped=n):new tn(n)}function en(n){return new Uint8Array(n.buffer||n,n.byteOffset||0,G(n))}tn.VERSION=n,tn.prototype.value=function(){return this._wrapped},tn.prototype.valueOf=tn.prototype.toJSON=tn.prototype.value,tn.prototype.toString=function(){return String(this._wrapped)};var un="[object DataView]";function on(n,r,t,e){if(n===r)return 0!==n||1/n==1/r;if(null==n||null==r)return!1;if(n!=n)return r!=r;var o=typeof n;return("function"===o||"object"===o||"object"==typeof r)&&function n(r,t,e,o){r instanceof tn&&(r=r._wrapped);t instanceof tn&&(t=t._wrapped);var i=a.call(r);if(i!==a.call(t))return!1;if(F&&"[object Object]"==i&&q(r)){if(!q(t))return!1;i=un}switch(i){case"[object RegExp]":case"[object String]":return""+r==""+t;case"[object Number]":return+r!=+r?+t!=+t:0==+r?1/+r==1/t:+r==+t;case"[object Date]":case"[object Boolean]":return+r==+t;case"[object Symbol]":return u.valueOf.call(r)===u.valueOf.call(t);case"[object ArrayBuffer]":case un:return n(en(r),en(t),e,o)}var f="[object Array]"===i;if(!f&&X(r)){if(G(r)!==G(t))return!1;if(r.buffer===t.buffer&&r.byteOffset===t.byteOffset)return!0;f=!0}if(!f){if("object"!=typeof r||"object"!=typeof t)return!1;var c=r.constructor,l=t.constructor;if(c!==l&&!(D(c)&&c instanceof c&&D(l)&&l instanceof l)&&"constructor"in r&&"constructor"in t)return!1}o=o||[];var s=(e=e||[]).length;for(;s--;)if(e[s]===r)return o[s]===t;if(e.push(r),o.push(t),f){if((s=r.length)!==t.length)return!1;for(;s--;)if(!on(r[s],t[s],e,o))return!1}else{var p,v=nn(r);if(s=v.length,nn(t).length!==s)return!1;for(;s--;)if(p=v[s],!W(t,p)||!on(r[p],t[p],e,o))return!1}return e.pop(),o.pop(),!0}(n,r,t,e)}function an(n){if(!_(n))return[];var r=[];for(var t in n)r.push(t);return g&&Z(n,r),r}function fn(n){var r=Y(n);return function(t){if(null==t)return!1;var e=an(t)Line truncated
|
||||
!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(ie,e){"use strict";var oe=[],r=Object.getPrototypeOf,ae=oe.slice,g=oe.flat?function(e){return oe.flat.call(e)}:function(e){return oe.concat.apply([],e)},s=oe.push,se=oe.indexOf,n={},i=n.toString,ue=n.hasOwnProperty,o=ue.toString,a=o.call(Object),le={},v=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType&&"function"!=typeof e.item},y=function(e){return null!=e&&e===e.window},C=ie.document,u={type:!0,src:!0,nonce:!0,noModule:!0};function m(e,t,n){var r,i,o=(n=n||C).createElement("script");if(o.text=e,t)for(r in u)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function x(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?n[i.call(e)]||"object":typeof e}var t="3.7.1",l=/HTML$/i,ce=function(e,t){return new ce.fn.init(e,t)};function c(e){var t=!!e&&"length"in e&&e.length,n=x(e);return!v(e)&&!y(e)&&("array"===n||0===t||"number"==typeof t&&0<t&&t-1 in e)}function fe(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}ce.fn=ce.prototype={jquery:t,constructor:ce,length:0,toArray:function(){return ae.call(this)},get:function(e){return null==e?ae.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){var t=ce.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return ce.each(this,e)},map:function(n){return this.pushStack(ce.map(this,function(e,t){return n.call(e,t,e)}))},slice:function(){return this.pushStack(ae.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},even:function(){return this.pushStack(ce.grep(this,function(e,t){return(t+1)%2}))},odd:function(){return this.pushStack(ce.grep(this,function(e,t){return t%2}))},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(0<=n&&n<t?[this[n]]:[])},end:function(){return this.prevObject||this.constructor()},push:s,sort:oe.sort,splice:oe.splice},ce.extend=ce.fn.extend=function(){var e,t,n,r,i,o,a=arguments[0]||{},s=1,u=arguments.length,l=!1;for("boolean"==typeof a&&(l=a,a=arguments[s]||{},s++),"object"==typeof a||v(a)||(a={}),s===u&&(a=this,s--);s<u;s++)if(null!=(e=arguments[s]))for(t in e)r=e[t],"__proto__"!==t&&a!==r&&(l&&r&&(ce.isPlainObject(r)||(i=Array.isArray(r)))?(n=a[t],o=i&&!Array.isArray(n)?[]:i||ce.isPlainObject(n)?n:{},i=!1,a[t]=ce.extend(l,o,r)):void 0!==r&&(a[t]=r));return a},ce.extend({expando:"jQuery"+(t+Math.random()).replace(/\D/g,""),isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isPlainObject:function(e){var t,n;return!(!e||"[object Object]"!==i.call(e))&&(!(t=r(e))||"function"==typeof(n=ue.call(t,"constructor")&&t.constructor)&&o.call(n)===a)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},globalEval:function(e,t,n){m(e,{nonce:t&&t.nonce},n)},each:function(e,t){var n,r=0;if(c(e)){for(n=e.length;r<n;r++)if(!1===t.call(e[r],r,e[r]))break}else for(r in e)if(!1===t.call(e[r],r,e[r]))break;return e},text:function(e){var t,n="",r=0,i=e.nodeType;if(!i)while(t=e[r++])n+=ce.text(t);return 1===i||11===i?e.textContent:9===i?e.documentElement.textContent:3===i||4===i?e.nodeValue:n},makeArray:function(e,t){var n=t||[];return null!=e&&(c(Object(e))?ce.merge(n,"string"==typeof e?[e]:e):s.call(n,e)),n},inArray:function(e,t,n){return null==t?-1:se.call(t,e,n)},isXMLDoc:function(e){var t=e&&e.namespaceURI,n=e&&(e.ownerDocument||e).documentElement;return!l.test(t||n&&n.nodeName||"HTML")},merge:function(e,t){for(var n=+t.length,r=0,i=e.length;r<n;r++)e[i++]=t[r];return e.length=i,e},grep:function(e,t,n){for(var r=[],i=0,o=e.length,a=!n;i<o;i++)!t(e[i],i)!==a&&r.push(e[i]);return r},map:function(e,t,n){var r,i,o=0,a=[];if(c(e))for(r=e.length;o<r;o++)null!=(i=t(e[o],o,n))&&a.push(i);else for(o in e)null!=(i=t(e[o],o,n))&&a.push(i);return g(a)},guid:1,support:le}),"function"==typeof Symbol&&(ce.fn[Symbol.iterator]=oe[Symbol.iterator]),ce.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(e,t){n["[object "+t+"]"]=t.toLowerCase()});var pe=oe.pop,de=oe.sort,he=oe.splice,ge="[\\x20\\t\\r\\n\\f]",ve=new RegExp("^"+ge+"+|((?:^|[^\\\\])(?:\\\\.)*)"+ge+"+$","g");ce.contains=function(e,t){var n=t&&t.parentNode;return e===n||!(!n||1!==n.nodeType||!(e.contains?e.contains(n):e.compareDocumentPosition&&16&e.compareDocumentPosition(n)))};var f=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g;function p(e,t){return t?"\0"===e?"\ufffd":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e}ce.escapeSelector=function(e){return(e+"").replace(f,p)};var ye=C,me=s;!function(){var e,b,w,o,a,T,r,C,d,i,k=me,S=ce.expando,E=0,n=0,s=W(),c=W(),u=W(),h=W(),l=function(e,t){return e===t&&(a=!0),0},f="checked|selected|async|autofocus|autoplay|conLine truncated
|
||||
"undefined"==typeof jQuery.migrateMute&&(jQuery.migrateMute=!0),function(t){"use strict";"function"==typeof define&&define.amd?define(["jquery"],function(e){return t(e,window)}):"object"==typeof module&&module.exports?module.exports=t(require("jquery"),window):t(jQuery,window)}(function(s,n){"use strict";function e(e){return 0<=function(e,t){for(var r=/^(\d+)\.(\d+)\.(\d+)/,n=r.exec(e)||[],o=r.exec(t)||[],a=1;a<=3;a++){if(+o[a]<+n[a])return 1;if(+n[a]<+o[a])return-1}return 0}(s.fn.jquery,e)}s.migrateVersion="3.4.1";var t=Object.create(null);s.migrateDisablePatches=function(){for(var e=0;e<arguments.length;e++)t[arguments[e]]=!0},s.migrateEnablePatches=function(){for(var e=0;e<arguments.length;e++)delete t[arguments[e]]},s.migrateIsPatchEnabled=function(e){return!t[e]},n.console&&n.console.log&&(s&&e("3.0.0")&&!e("5.0.0")||n.console.log("JQMIGRATE: jQuery 3.x-4.x REQUIRED"),s.migrateWarnings&&n.console.log("JQMIGRATE: Migrate plugin loaded multiple times"),n.console.log("JQMIGRATE: Migrate is installed"+(s.migrateMute?"":" with logging active")+", version "+s.migrateVersion));var o={};function u(e,t){var r=n.console;!s.migrateIsPatchEnabled(e)||s.migrateDeduplicateWarnings&&o[t]||(o[t]=!0,s.migrateWarnings.push(t+" ["+e+"]"),r&&r.warn&&!s.migrateMute&&(r.warn("JQMIGRATE: "+t),s.migrateTrace&&r.trace&&r.trace()))}function r(e,t,r,n,o){Object.defineProperty(e,t,{configurable:!0,enumerable:!0,get:function(){return u(n,o),r},set:function(e){u(n,o),r=e}})}function a(e,t,r,n,o){var a=e[t];e[t]=function(){return o&&u(n,o),(s.migrateIsPatchEnabled(n)?r:a||s.noop).apply(this,arguments)}}function c(e,t,r,n,o){if(!o)throw new Error("No warning message provided");return a(e,t,r,n,o),0}function i(e,t,r,n){return a(e,t,r,n),0}s.migrateDeduplicateWarnings=!0,s.migrateWarnings=[],void 0===s.migrateTrace&&(s.migrateTrace=!0),s.migrateReset=function(){o={},s.migrateWarnings.length=0},"BackCompat"===n.document.compatMode&&u("quirks","jQuery is not compatible with Quirks Mode");var d,l,p,f={},m=s.fn.init,y=s.find,h=/\[(\s*[-\w]+\s*)([~|^$*]?=)\s*([-\w#]*?#[-\w#]*)\s*\]/,g=/\[(\s*[-\w]+\s*)([~|^$*]?=)\s*([-\w#]*?#[-\w#]*)\s*\]/g,v=/^[\s\uFEFF\xA0]+|([^\s\uFEFF\xA0])[\s\uFEFF\xA0]+$/g;for(d in i(s.fn,"init",function(e){var t=Array.prototype.slice.call(arguments);return s.migrateIsPatchEnabled("selector-empty-id")&&"string"==typeof e&&"#"===e&&(u("selector-empty-id","jQuery( '#' ) is not a valid selector"),t[0]=[]),m.apply(this,t)},"selector-empty-id"),s.fn.init.prototype=s.fn,i(s,"find",function(t){var r=Array.prototype.slice.call(arguments);if("string"==typeof t&&h.test(t))try{n.document.querySelector(t)}catch(e){t=t.replace(g,function(e,t,r,n){return"["+t+r+'"'+n+'"]'});try{n.document.querySelector(t),u("selector-hash","Attribute selector with '#' must be quoted: "+r[0]),r[0]=t}catch(e){u("selector-hash","Attribute selector with '#' was not fixed: "+r[0])}}return y.apply(this,r)},"selector-hash"),y)Object.prototype.hasOwnProperty.call(y,d)&&(s.find[d]=y[d]);c(s.fn,"size",function(){return this.length},"size","jQuery.fn.size() is deprecated and removed; use the .length property"),c(s,"parseJSON",function(){return JSON.parse.apply(null,arguments)},"parseJSON","jQuery.parseJSON is deprecated; use JSON.parse"),c(s,"holdReady",s.holdReady,"holdReady","jQuery.holdReady is deprecated"),c(s,"unique",s.uniqueSort,"unique","jQuery.unique is deprecated; use jQuery.uniqueSort"),r(s.expr,"filters",s.expr.pseudos,"expr-pre-pseudos","jQuery.expr.filters is deprecated; use jQuery.expr.pseudos"),r(s.expr,":",s.expr.pseudos,"expr-pre-pseudos","jQuery.expr[':'] is deprecated; use jQuery.expr.pseudos"),e("3.1.1")&&c(s,"trim",function(e){return null==e?"":(e+"").replace(v,"$1")},"trim","jQuery.trim is deprecated; use String.prototype.trim"),e("3.2.0")&&(c(s,"nodeName",function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},"nodeName","jQuery.nodeName is deprecated"),c(s,"isArray",Array.isArray,"isArray","jQuery.isArray is deprecated; use Array.isArray")),e("3.3.0")&&(c(s,"isNumeric",function(e){var t=typeof e;return("number"==t||"string"==t)&&!isNaN(e-parseFloat(e))},"isNumeric","jQuery.isNumeric() is deprecated"),s.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(e,t){f["[object "+t+"]"]=t.toLowerCase()}),c(s,"type",function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?f[Object.prototype.toString.call(e)]||"object":typeof e},"type","jQuery.type is deprecated"),c(s,"isFunction",function(e){return"function"==typeof e},"isFunction","jQuery.isFunction() is deprecated"),c(s,"isWindow",function(e){return null!=e&&e===e.window},"isWindow","jQuery.isWindow() is deprecated")),s.ajax&&(l=s.ajax,p=/(=)\?(?=&|$)|\?\?/,i(s,"ajax",function(){var e=l.apply(this,arguments);return e.promise&&(c(e,"success",e.done,"jqXHR-methods","jQXHR.success is deprecated and removed"),c(e,"error",e.fail,"jqXHR-methods","jQXHR.error is deprecated and removed"),c(e,"complete",e.always,"jqXHR-mLine truncated
|
||||
!function(t,e){"function"==typeof define&&define.amd?define("ev-emitter/ev-emitter",e):"object"==typeof module&&module.exports?module.exports=e():t.EvEmitter=e()}("undefined"!=typeof window?window:this,function(){function t(){}var e=t.prototype;return e.on=function(t,e){if(t&&e){var i=this._events=this._events||{},n=i[t]=i[t]||[];return-1==n.indexOf(e)&&n.push(e),this}},e.once=function(t,e){if(t&&e){this.on(t,e);var i=this._onceEvents=this._onceEvents||{},n=i[t]=i[t]||{};return n[e]=!0,this}},e.off=function(t,e){var i=this._events&&this._events[t];if(i&&i.length){var n=i.indexOf(e);return-1!=n&&i.splice(n,1),this}},e.emitEvent=function(t,e){var i=this._events&&this._events[t];if(i&&i.length){var n=0,o=i[n];e=e||[];for(var r=this._onceEvents&&this._onceEvents[t];o;){var s=r&&r[o];s&&(this.off(t,o),delete r[o]),o.apply(this,e),n+=s?0:1,o=i[n]}return this}},t}),function(t,e){"use strict";"function"==typeof define&&define.amd?define(["ev-emitter/ev-emitter"],function(i){return e(t,i)}):"object"==typeof module&&module.exports?module.exports=e(t,require("ev-emitter")):t.imagesLoaded=e(t,t.EvEmitter)}(window,function(t,e){function i(t,e){for(var i in e)t[i]=e[i];return t}function n(t){var e=[];if(Array.isArray(t))e=t;else if("number"==typeof t.length)for(var i=0;i<t.length;i++)e.push(t[i]);else e.push(t);return e}function o(t,e,r){return this instanceof o?("string"==typeof t&&(t=document.querySelectorAll(t)),this.elements=n(t),this.options=i({},this.options),"function"==typeof e?r=e:i(this.options,e),r&&this.on("always",r),this.getImages(),h&&(this.jqDeferred=new h.Deferred),void setTimeout(function(){this.check()}.bind(this))):new o(t,e,r)}function r(t){this.img=t}function s(t,e){this.url=t,this.element=e,this.img=new Image}var h=t.jQuery,a=t.console;o.prototype=Object.create(e.prototype),o.prototype.options={},o.prototype.getImages=function(){this.images=[],this.elements.forEach(this.addElementImages,this)},o.prototype.addElementImages=function(t){"IMG"==t.nodeName&&this.addImage(t),this.options.background===!0&&this.addElementBackgroundImages(t);var e=t.nodeType;if(e&&d[e]){for(var i=t.querySelectorAll("img"),n=0;n<i.length;n++){var o=i[n];this.addImage(o)}if("string"==typeof this.options.background){var r=t.querySelectorAll(this.options.background);for(n=0;n<r.length;n++){var s=r[n];this.addElementBackgroundImages(s)}}}};var d={1:!0,9:!0,11:!0};return o.prototype.addElementBackgroundImages=function(t){var e=getComputedStyle(t);if(e)for(var i=/url\((['"])?(.*?)\1\)/gi,n=i.exec(e.backgroundImage);null!==n;){var o=n&&n[2];o&&this.addBackground(o,t),n=i.exec(e.backgroundImage)}},o.prototype.addImage=function(t){var e=new r(t);this.images.push(e)},o.prototype.addBackground=function(t,e){var i=new s(t,e);this.images.push(i)},o.prototype.check=function(){function t(t,i,n){setTimeout(function(){e.progress(t,i,n)})}var e=this;return this.progressedCount=0,this.hasAnyBroken=!1,this.images.length?void this.images.forEach(function(e){e.once("progress",t),e.check()}):void this.complete()},o.prototype.progress=function(t,e,i){this.progressedCount++,this.hasAnyBroken=this.hasAnyBroken||!t.isLoaded,this.emitEvent("progress",[this,t,e]),this.jqDeferred&&this.jqDeferred.notify&&this.jqDeferred.notify(this,t),this.progressedCount==this.images.length&&this.complete(),this.options.debug&&a&&a.log("progress: "+i,t,e)},o.prototype.complete=function(){var t=this.hasAnyBroken?"fail":"done";if(this.isComplete=!0,this.emitEvent(t,[this]),this.emitEvent("always",[this]),this.jqDeferred){var e=this.hasAnyBroken?"reject":"resolve";this.jqDeferred[e](this)}},r.prototype=Object.create(e.prototype),r.prototype.check=function(){var t=this.getIsImageComplete();return t?void this.confirm(0!==this.img.naturalWidth,"naturalWidth"):(this.proxyImage=new Image,this.proxyImage.addEventListener("load",this),this.proxyImage.addEventListener("error",this),this.img.addEventListener("load",this),this.img.addEventListener("error",this),void(this.proxyImage.src=this.img.src))},r.prototype.getIsImageComplete=function(){return this.img.complete&&void 0!==this.img.naturalWidth},r.prototype.confirm=function(t,e){this.isLoaded=t,this.emitEvent("progress",[this,this.img,e])},r.prototype.handleEvent=function(t){var e="on"+t.type;this[e]&&this[e](t)},r.prototype.onload=function(){this.confirm(!0,"onload"),this.unbindEvents()},r.prototype.onerror=function(){this.confirm(!1,"onerror"),this.unbindEvents()},r.prototype.unbindEvents=function(){this.proxyImage.removeEventListener("load",this),this.proxyImage.removeEventListener("error",this),this.img.removeEventListener("load",this),this.img.removeEventListener("error",this)},s.prototype=Object.create(r.prototype),s.prototype.check=function(){this.img.addEventListener("load",this),this.img.addEventListener("error",this),this.img.src=this.url;var t=this.getIsImageComplete();t&&(this.confirm(0!==this.img.naturalWidth,"naturalWidth"),this.unbindEvents())},s.prototype.unbindEvents=function(){this.img.removeEventListener("loaLine truncated
|
||||
(function(e,t,n,r,i){function T(t){t=t.split(")");var n=e.trim,i=-1,s=t.length-1,o,u,a,f=h?new Float32Array(6):[],l=h?new Float32Array(6):[],c=h?new Float32Array(6):[1,0,0,1,0,0];f[0]=f[3]=c[0]=c[3]=1;f[1]=f[2]=f[4]=f[5]=0;while(++i<s){o=t[i].split("(");u=n(o[0]);a=o[1];l[0]=l[3]=1;l[1]=l[2]=l[4]=l[5]=0;switch(u){case b+"X":l[4]=parseInt(a,10);break;case b+"Y":l[5]=parseInt(a,10);break;case b:a=a.split(",");l[4]=parseInt(a[0],10);l[5]=parseInt(a[1]||0,10);break;case w:a=M(a);l[0]=r.cos(a);l[1]=r.sin(a);l[2]=-r.sin(a);l[3]=r.cos(a);break;case E+"X":l[0]=+a;break;case E+"Y":l[3]=a;break;case E:a=a.split(",");l[0]=a[0];l[3]=a.length>1?a[1]:a[0];break;case S+"X":l[2]=r.tan(M(a));break;case S+"Y":l[1]=r.tan(M(a));break;case x:a=a.split(",");l[0]=a[0];l[1]=a[1];l[2]=a[2];l[3]=a[3];l[4]=parseInt(a[4],10);l[5]=parseInt(a[5],10);break}c[0]=f[0]*l[0]+f[2]*l[1];c[1]=f[1]*l[0]+f[3]*l[1];c[2]=f[0]*l[2]+f[2]*l[3];c[3]=f[1]*l[2]+f[3]*l[3];c[4]=f[0]*l[4]+f[2]*l[5]+f[4];c[5]=f[1]*l[4]+f[3]*l[5]+f[5];f=[c[0],c[1],c[2],c[3],c[4],c[5]]}return c}function N(e){var t,n,i,s=e[0],o=e[1],u=e[2],a=e[3];if(s*a-o*u){t=r.sqrt(s*s+o*o);s/=t;o/=t;i=s*u+o*a;u-=s*i;a-=o*i;n=r.sqrt(u*u+a*a);u/=n;a/=n;i/=n;if(s*a<o*u){s=-s;o=-o;i=-i;t=-t}}else{t=n=i=0}return[[b,[+e[4],+e[5]]],[w,r.atan2(o,s)],[S+"X",r.atan(i)],[E,[t,n]]]}function C(t,n){var r={start:[],end:[]},i=-1,s,o,u,a;(t=="none"||L(t))&&(t="");(n=="none"||L(n))&&(n="");if(t&&n&&!n.indexOf("matrix")&&_(t).join()==_(n.split(")")[0]).join()){r.origin=t;t="";n=n.slice(n.indexOf(")")+1)}if(!t&&!n){return}if(!t||!n||A(t)==A(n)){t&&(t=t.split(")"))&&(s=t.length);n&&(n=n.split(")"))&&(s=n.length);while(++i<s-1){t[i]&&(o=t[i].split("("));n[i]&&(u=n[i].split("("));a=e.trim((o||u)[0]);O(r.start,k(a,o?o[1]:0));O(r.end,k(a,u?u[1]:0))}}else{r.start=N(T(t));r.end=N(T(n))}return r}function k(e,t){var n=+!e.indexOf(E),r,i=e.replace(/e[XY]/,"e");switch(e){case b+"Y":case E+"Y":t=[n,t?parseFloat(t):n];break;case b+"X":case b:case E+"X":r=1;case E:t=t?(t=t.split(","))&&[parseFloat(t[0]),parseFloat(t.length>1?t[1]:e==E?r||t[0]:n+"")]:[n,n];break;case S+"X":case S+"Y":case w:t=t?M(t):0;break;case x:return N(t?_(t):[1,0,0,1,0,0]);break}return[[i,t]]}function L(e){return m.test(e)}function A(e){return e.replace(/(?:\([^)]*\))|\s/g,"")}function O(e,t,n){while(n=t.shift()){e.push(n)}}function M(e){return~e.indexOf("deg")?parseInt(e,10)*(r.PI*2/360):~e.indexOf("grad")?parseInt(e,10)*(r.PI/200):parseFloat(e)}function _(e){e=/([^,]*),([^,]*),([^,]*),([^,]*),([^,p]*)(?:px)?,([^)p]*)(?:px)?/.exec(e);return[e[1],e[2],e[3],e[4],e[5],e[6]]}var s=n.createElement("div"),o=s.style,u="Transform",a=["O"+u,"ms"+u,"Webkit"+u,"Moz"+u],f=a.length,l,c,h="Float32Array"in t,p,d,v=/Matrix([^)]*)/,m=/^\s*matrix\(\s*1\s*,\s*0\s*,\s*0\s*,\s*1\s*(?:,\s*0(?:px)?\s*){2}\)\s*$/,g="transform",y="transformOrigin",b="translate",w="rotate",E="scale",S="skew",x="matrix";while(f--){if(a[f]in o){e.support[g]=l=a[f];e.support[y]=l+"Origin";continue}}if(!l){e.support.matrixFilter=c=o.filter===""}e.cssNumber[g]=e.cssNumber[y]=true;if(l&&l!=g){e.cssProps[g]=l;e.cssProps[y]=l+"Origin";if(l=="Moz"+u){p={get:function(t,n){return n?e.css(t,l).split("px").join(""):t.style[l]},set:function(e,t){e.style[l]=/matrix\([^)p]*\)/.test(t)?t.replace(/matrix((?:[^,]*,){4})([^,]*),([^)]*)/,x+"$1$2px,$3px"):t}}}else if(/^1\.[0-5](?:\.|$)/.test(e.fn.jquery)){p={get:function(t,n){return n?e.css(t,l.replace(/^ms/,"Ms")):t.style[l]}}}}else if(c){p={get:function(t,n,r){var s=n&&t.currentStyle?t.currentStyle:t.style,o,u;if(s&&v.test(s.filter)){o=RegExp.$1.split(",");o=[o[0].split("=")[1],o[2].split("=")[1],o[1].split("=")[1],o[3].split("=")[1]]}else{o=[1,0,0,1]}if(!e.cssHooks[y]){o[4]=s?parseInt(s.left,10)||0:0;o[5]=s?parseInt(s.top,10)||0:0}else{u=e._data(t,"transformTranslate",i);o[4]=u?u[0]:0;o[5]=u?u[1]:0}return r?o:x+"("+o+")"},set:function(t,n,r){var i=t.style,s,o,u,a;if(!r){i.zoom=1}n=T(n);o=["Matrix("+"M11="+n[0],"M12="+n[2],"M21="+n[1],"M22="+n[3],"SizingMethod='auto expand'"].join();u=(s=t.currentStyle)&&s.filter||i.filter||"";i.filter=v.test(u)?u.replace(v,o):u+" progid:DXImageTransform.Microsoft."+o+")";if(!e.cssHooks[y]){if(a=e.transform.centerOrigin){i[a=="margin"?"marginLeft":"left"]=-(t.offsetWidth/2)+t.clientWidth/2+"px";i[a=="margin"?"marginTop":"top"]=-(t.offsetHeight/2)+t.clientHeight/2+"px"}i.left=n[4]+"px";i.top=n[5]+"px"}else{e.cssHooks[y].set(t,n)}}}}if(p){e.cssHooks[g]=p}d=p&&p.get||e.css;e.fx.step.transform=function(t){var n=t.elem,i=t.start,s=t.end,o=t.pos,u="",a=1e5,f,h,v,m;if(!i||typeof i==="string"){if(!i){i=d(n,l)}if(c){n.style.zoom=1}s=s.split("+=").join(i);e.extend(t,C(i,s));i=t.start;s=t.end}f=i.length;while(f--){h=i[f];v=s[f];m=+false;switch(h[0]){case b:m="px";case E:m||(m="");u=h[0]+"("+r.round((h[1][0]+(v[1][0]-h[1][0])*o)*a)/a+m+","+r.round((h[1][1]+(v[1][1]-h[1][1])*o)*a)/a+m+")"+u;break;case S+"X":case S+"Y":case w:u=h[0]+"("+r.round((h[1]+(v[1]-h[1])*o)*a)/a+"rad)"+u;break}}t.origin&&(u=t.origin+u);p&&p.set?p.set(n,u,+true):n.styleLine truncated
|
||||
(function(global,factory){typeof exports==="object"&&typeof module!=="undefined"?module.exports=factory():typeof define==="function"&&define.amd?define(factory):(global=global||self,global.Mustache=factory())})(this,function(){"use strict";var objectToString=Object.prototype.toString;var isArray=Array.isArray||function isArrayPolyfill(object){return objectToString.call(object)==="[object Array]"};function isFunction(object){return typeof object==="function"}function typeStr(obj){return isArray(obj)?"array":typeof obj}function escapeRegExp(string){return string.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function hasProperty(obj,propName){return obj!=null&&typeof obj==="object"&&propName in obj}function primitiveHasOwnProperty(primitive,propName){return primitive!=null&&typeof primitive!=="object"&&primitive.hasOwnProperty&&primitive.hasOwnProperty(propName)}var regExpTest=RegExp.prototype.test;function testRegExp(re,string){return regExpTest.call(re,string)}var nonSpaceRe=/\S/;function isWhitespace(string){return!testRegExp(nonSpaceRe,string)}var entityMap={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/","`":"`","=":"="};function escapeHtml(string){return String(string).replace(/[&<>"'`=\/]/g,function fromEntityMap(s){return entityMap[s]})}var whiteRe=/\s*/;var spaceRe=/\s+/;var equalsRe=/\s*=/;var curlyRe=/\s*\}/;var tagRe=/#|\^|\/|>|\{|&|=|!/;function parseTemplate(template,tags){if(!template)return[];var lineHasNonSpace=false;var sections=[];var tokens=[];var spaces=[];var hasTag=false;var nonSpace=false;var indentation="";var tagIndex=0;function stripSpace(){if(hasTag&&!nonSpace){while(spaces.length)delete tokens[spaces.pop()]}else{spaces=[]}hasTag=false;nonSpace=false}var openingTagRe,closingTagRe,closingCurlyRe;function compileTags(tagsToCompile){if(typeof tagsToCompile==="string")tagsToCompile=tagsToCompile.split(spaceRe,2);if(!isArray(tagsToCompile)||tagsToCompile.length!==2)throw new Error("Invalid tags: "+tagsToCompile);openingTagRe=new RegExp(escapeRegExp(tagsToCompile[0])+"\\s*");closingTagRe=new RegExp("\\s*"+escapeRegExp(tagsToCompile[1]));closingCurlyRe=new RegExp("\\s*"+escapeRegExp("}"+tagsToCompile[1]))}compileTags(tags||mustache.tags);var scanner=new Scanner(template);var start,type,value,chr,token,openSection;while(!scanner.eos()){start=scanner.pos;value=scanner.scanUntil(openingTagRe);if(value){for(var i=0,valueLength=value.length;i<valueLength;++i){chr=value.charAt(i);if(isWhitespace(chr)){spaces.push(tokens.length);indentation+=chr}else{nonSpace=true;lineHasNonSpace=true;indentation+=" "}tokens.push(["text",chr,start,start+1]);start+=1;if(chr==="\n"){stripSpace();indentation="";tagIndex=0;lineHasNonSpace=false}}}if(!scanner.scan(openingTagRe))break;hasTag=true;type=scanner.scan(tagRe)||"name";scanner.scan(whiteRe);if(type==="="){value=scanner.scanUntil(equalsRe);scanner.scan(equalsRe);scanner.scanUntil(closingTagRe)}else if(type==="{"){value=scanner.scanUntil(closingCurlyRe);scanner.scan(curlyRe);scanner.scanUntil(closingTagRe);type="&"}else{value=scanner.scanUntil(closingTagRe)}if(!scanner.scan(closingTagRe))throw new Error("Unclosed tag at "+scanner.pos);if(type==">"){token=[type,value,start,scanner.pos,indentation,tagIndex,lineHasNonSpace]}else{token=[type,value,start,scanner.pos]}tagIndex++;tokens.push(token);if(type==="#"||type==="^"){sections.push(token)}else if(type==="/"){openSection=sections.pop();if(!openSection)throw new Error('Unopened section "'+value+'" at '+start);if(openSection[1]!==value)throw new Error('Unclosed section "'+openSection[1]+'" at '+start)}else if(type==="name"||type==="{"||type==="&"){nonSpace=true}else if(type==="="){compileTags(value)}}stripSpace();openSection=sections.pop();if(openSection)throw new Error('Unclosed section "'+openSection[1]+'" at '+scanner.pos);return nestTokens(squashTokens(tokens))}function squashTokens(tokens){var squashedTokens=[];var token,lastToken;for(var i=0,numTokens=tokens.length;i<numTokens;++i){token=tokens[i];if(token){if(token[0]==="text"&&lastToken&&lastToken[0]==="text"){lastToken[1]+=token[1];lastToken[3]=token[3]}else{squashedTokens.push(token);lastToken=token}}}return squashedTokens}function nestTokens(tokens){var nestedTokens=[];var collector=nestedTokens;var sections=[];var token,section;for(var i=0,numTokens=tokens.length;i<numTokens;++i){token=tokens[i];switch(token[0]){case"#":case"^":collector.push(token);sections.push(token);collector=token[4]=[];break;case"/":section=sections.pop();section[5]=token[2];collector=sections.length>0?sections[sections.length-1][4]:nestedTokens;break;default:collector.push(token)}}return nestedTokens}function Scanner(string){this.string=string;this.tail=string;this.pos=0}Scanner.prototype.eos=function eos(){return this.tail===""};Scanner.prototype.scan=function scan(re){var match=this.tail.match(re);if(!match||match.index!==0)return"";var string=match[0];this.tail=this.tail.substring(string.length);this.pos+=string.length;return string};ScannerLine truncated
|
||||
var Debug=Debug||{};;(function($,_,undefined){"use strict";Debug=function(){var options={enabled:false,level:1,adapters:[]};var LEVEL={DEBUG:1,INFO:2,WARN:3,ERROR:4};var debug=function(msg){logMessage(LEVEL.DEBUG,msg);return Debug;},info=function(msg){logMessage(LEVEL.INFO,msg);return Debug;},warn=function(msg){logMessage(LEVEL.WARN,msg);return Debug;},error=function(msg){logMessage(LEVEL.ERROR,msg);return Debug;},logMessage=function(level,message){if(options.enabled&&level>=options.level&&options.adapters.length){for(let i=0;i<options.adapters.length;i++){options.adapters[i].write(level,message);}}
|
||||
return Debug;},setEnabled=function(enabled){options.enabled=(enabled===false)?false:true;return Debug;},isEnabled=function(){return options.enabled;},setLevel=function(level){if(LEVEL[level]){options.level=LEVEL[level];}
|
||||
return Debug;},addAdapter=function(adapter){if(_.isObject(adapter)){options.adapters.push(adapter);}
|
||||
return Debug;},clearAdapters=function(){options.adapters=[];return Debug;};return{debug:debug,log:debug,info:info,warn:warn,error:error,setEnabled:setEnabled,setLevel:setLevel,addAdapter:addAdapter,clearAdapters:clearAdapters,isEnabled:isEnabled};}();var Console=function(){};Console.prototype.write=function(level,msg){if(window.console){switch(level){case 1:if(_.isObject(msg)){console.dir(msg);}else{console.log(msg);}
|
||||
break;case 2:console.info(msg);break;case 3:console.warn(msg);break;case 4:console.error(msg);break;}}};Debug.addAdapter(new Console);if(ipsDebug||(!_.isUndefined(window.localStorage)&&'localStorage'in window&&window['localStorage']!==null&&window.localStorage.getItem('DEBUG'))){Debug.setEnabled(true).setLevel('DEBUG').info("Enabled logging");}}(jQuery,_));;
|
||||
var ips=ips||{};jQuery.migrateMute=true;(function($,_,undefined){"use strict";let logTimeIndent=0;ips=(function(){var _settings,_strings={},_graphData={},uid=1,urand=Math.ceil(Math.random()*10000),elemContainer,_location='front';var boot=function(config){_settings=config;_setAjaxConfig();$.fn.animationComplete=function(callback){return $(this).one('webkitAnimationEnd animationend',function(e){if(e.target==this){callback.apply(this);}});};$.fn.identify=function(){return this.each(function(){if(!this.id){this.id='ips_uid_'+urand+'_'+(++uid);}});};var oldProp=$.fn.prop;var newProp=function(){var retFunc=oldProp.apply(this,arguments);this.trigger('propChanged',this);return retFunc;};$.fn.prop=newProp;Function.prototype.method=function(name,func){this.prototype[name]=func;return this;};_.templateSettings={interpolate:/\{\{(.+?)\}\}/g
|
||||
};if(!Debug.isEnabled()&&window.console){window.console.log("%cThis is a browser feature intended for developers. Do not paste any code here given to you by someone else. It may compromise your account or have other negative side effects.","font-weight: bold; font-size: 14px;");}
|
||||
$(document).trigger('doneBooting').ready(function(){_location=$('body').attr('data-pageLocation')||'front';});},getAjax=function(){if(getSetting('mock_ajax')){return getSetting('mock_ajax');}
|
||||
return $.ajax;},fetch=function(url,settings={}){return new Promise((resolve,reject)=>{const options={};if(typeof settings==='object'){Object.assign(options,settings)}else if(settings){return resolve(new TypeError(`Could not generate an ajax request because the settings is supposed to be of type object. Got a(n) ${typeof settings}`));}
|
||||
if(typeof url==='string'){options.url=url;}else if(typeof url==='object'){Object.assign(options,url)}else{return reject(new TypeError(`Could not generate an ajax request because url is supposed to be a string or an object. Got a ${typeof url}`));}
|
||||
options.async=true
|
||||
delete options.error
|
||||
delete options.success
|
||||
delete options.complete
|
||||
delete options.contents
|
||||
delete options.context
|
||||
delete options.converters
|
||||
delete options.dataFilter
|
||||
delete options.global
|
||||
delete options.isLocal
|
||||
delete options.jsonp
|
||||
delete options.jsonpCallback
|
||||
delete options.scriptAttrs
|
||||
delete options.statusCode
|
||||
delete options.traditional
|
||||
delete options.xhr
|
||||
delete options.xhrFields
|
||||
if(options.type&&!options.method){options.method=options.type;delete options.type;}
|
||||
getAjax()(options).done(resolve).fail(reject)})},getContainer=function(){var tryThis=$(getSetting('container'));return(tryThis.length)?tryThis:$('body');},_setAjaxConfig=function(){var data={csrfKey:ips.getSetting('csrfKey')};$.ajaxSetup({data:data,cache:true});var count=0;$(document).ajaxSend(function(event,request,settings){if(!_.isUndefined(settings)&&settings.showLoading===true){if(!$('#elAjaxLoading').length){getContainer().append(templates.render('core.general.ajax'));}
|
||||
count++;ips.utils.anim.go('fadeIn fast',$('#elAjaxLoading'));}}).ajaxComplete(function(event,request,settings){if(!_.isUndefined(settings)&&settings.showLoading===true){count--;if(count===0){ips.utils.anim.go('fadeOut fast',$('#elAjaxLoading'));}}
|
||||
if(!_.isUndefined(settings)&&!settings.bypassRedirect){var responseJson=null;if(!_.isUndefined(request.responseJSON)&&!_.isUndefined(request.responseJSON.redirect)){responseJson=request.responseJSON;}
|
||||
else if(!_.isUndefined(request.responseText)){try
|
||||
{var jsonResponse=$.parseJSON(request.responseText);if(jsonResponse&&!_.isUndefined(jsonResponse.redirect)){responseJson=jsonResponse;}}
|
||||
catch(err){}}
|
||||
if(responseJson){if(!_.isUndefined(responseJson.message)&&responseJson.message!=''){ips.utils.cookie.set('flmsg',responseJson.message);}
|
||||
if(responseJson.redirect.match(/#/)){window.location.href=responseJson.redirect;window.location.reload();}else{window.location=responseJson.redirect;}}}
|
||||
ips.utils.cookie.init();});},getSetting=function(key){return _settings[key];},getAllSettings=function(){return _settings;},setSetting=function(key,value){_settings[key]=value;},setString=function(strings){if(_.isString(strings)&&arguments.length==2&&_.isString(arguments[1])){strings={};strings[arguments[0]]=arguments[1];}else if(!_.isObject(strings)){Debug.warn("Invalid strings object passed to addString");return;}
|
||||
$.each(strings,function(key,value){_strings[key]=value;});},haveString=function(key){return!_.isUndefined(_strings[key]);},getString=function(key,values,showMissingError=true){if(!(key in _strings)){Debug.warn("The string '"+key+"' doesn't exist");return Debug.isEnabled()&&showMissingError?`[${key}]`:'';}
|
||||
let thisString=_strings[key];values=values||{};if(thisString.indexOf('{{')===-1){return thisString;}
|
||||
Object.assign(values,{baseURL:ips.getSetting('baseURL')});try{return _.template(thisString)(values);}catch(err){Debug.error(err);return Debug.isEnabled()?"[Error using language string "+key+"]":"";}},setGraphQlData=function(key,value){_graphData[key]=value;},getGraphQlData=function(key){return _graphData[key];},getLocation=function(){return _location;},createModule=function(name,fn){var bits=name.split('.'),currentPath=window;var tmpName=[];if(bits.length){for(var i=0;i<bits.length;i++){if(_.isUndefined(currentPath[bits[i]])){currentPath[bits[i]]={};}
|
||||
currentPath=currentPath[bits[i]];}}else{return false;}
|
||||
currentPath=_.extend(currentPath,fn.call(currentPath));if(_.isFunction(currentPath.init)){if(window.ipsScriptsExternallyLoaded){$(document.body).on('ipsScriptsReady',function(){currentPath.init.call(currentPath);})}else{$(document).ready(function(){currentPath.init.call(currentPath);});}}
|
||||
$(document).trigger('moduleCreated',[name]);},pluralize=function(stringKey,params){var word=stringKey;var i=0;if(!_.isArray(params)){params=[params];}
|
||||
word=word.replace(/\{(!|\d+?)?#(.*?)\}/g,function(a,b,c,d){if(!b||b=='!'){b=i;i++;}
|
||||
var value;var fallback;var output='';var replacement=params[b]+'';c.replace(/\[(.+?):(.+?)\]/g,function(w,x,y,z){var xLen=x.length*-1;if(x=='?'){fallback=y.replace('#',replacement);}
|
||||
else if(x.charAt(0)=='%'&&x.substring(1)==replacement.substring(0,x.substring(1).length)){value=y.replace('#',replacement);}
|
||||
else if(x.charAt(0)=='*'&&x.substring(1)==replacement.substr(-x.substring(1).length)){value=y.replace('#',replacement);}
|
||||
else if(x==replacement){value=y.replace('#',replacement);}});output=a.replace(/^\{/,'').replace(/\}$/,'').replace('!#','');output=output.replace(b+'#',replacement).replace('#',replacement);output=output.replace(/\[.+\]/,value==null?fallback:value).trim();return output;});return word;},testConsole=function(){if(window.atob&&window.console){console.log(window.atob("ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgd293ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICBzdWNoIGZvcnVtICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgaG93IGFqYXggICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICB2ZXJ5IGNvbW11bml0eSAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBtdWNoIG1lbWJlcgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCg=="));}
|
||||
return'';};var templates=function(){var _templateStore={};var set=function(key,template){_templateStore[key]=template;},get=function(key){if(_templateStore[key]){if(_.isFunction(_templateStore[key])){return _templateStore[key]();}else{return _templateStore[key];}}
|
||||
return'';},render=function(key,obj){obj=_.extend(obj||{},{baseURL:ips.getSetting('baseURL'),lang:_lang,blankImg:ips.getSetting('blankImg')||''});return Mustache.render(get(key),obj);},compile=function(key){if(_templateStore[key]){return Mustache.parse(get(key));}
|
||||
return $.noop;},_lang=function(){return function(text,render){return ips.getString(render(text));}};return{set,get,render,compile};}();function cleanContentsOf(elem){elem=$(elem)
|
||||
if(!elem.length){Debug.log(`Skipped the cleaning of IPS modules and controllers from an empty content selection`)
|
||||
return}
|
||||
Debug.log('Cleaning up IPS modules and controllers from content');window.ips.controller.cleanContentsOf(elem,false)
|
||||
window.ips.ui.destructAllWidgets($(elem));elem.each(function(){const elem=$(this)
|
||||
for(const group of['ui','utils']){for(const module in window.ips[group]){if(window.ips[group][module].onCleanup instanceof Function){try{window.ips[group][module].onCleanup(elem);}catch(e){e.message=`An error occurred when calling ips[${JSON.stringify(group)}][${JSON.stringify(module)}].onCleanup() an an element`
|
||||
e.cleanupTarget=elem
|
||||
Debug.error(e)}}}}})
|
||||
$(document).trigger('contentCleanup',[elem])}
|
||||
return{boot,createModule,getSetting,getAllSettings,setSetting,getGraphQlData,setGraphQlData,getAjax,fetch,getContainer,setString,haveString,getString,pluralize,getLocation,templates,testConsole,cleanContentsOf,uid(){return`${Math.round(Math.random() * Math.pow(16, 5)).toString(16)}-${Math.round(Math.random() * Math.pow(16, 5)).toString(16)}-${Math.round(Math.random() * Math.pow(16, 5)).toString(16)}-${Math.round(Math.random() * Math.pow(16, 5)).toString(16)}`},logTime(cb,message="Done timing code",{threshold=0}={}){const stack=(new Error()).stack;const lastLine=stack.split('\n').slice(0,3).pop().trim().replace(/^at\s*/,'');logTimeIndent++;let start=Date.now();const res=cb();const end=Date.now();if(message instanceof Function){try{message=message(end-start);}catch(e){e.message="\t".repeat(Math.max(0,logTimeIndent-1))+e.message;Debug.warn(e);message="Done timing code, but a message generator failed";}}
|
||||
if((end-start>=threshold)&&Debug.isEnabled()){if(typeof message==="string"){console.log(`${"\t".repeat(Math.max(0, logTimeIndent - 1))}${end - start}ms: ${message}\n${"\t".repeat(Math.max(1, logTimeIndent))}${lastLine}`);}else{console.log(`${"\t".repeat(Math.max(0, logTimeIndent - 1))}${end - start}ms: `,message,`\n${"\t".repeat(Math.max(1, logTimeIndent))}${lastLine}`);}}
|
||||
logTimeIndent--;return res;}};}());ips.boot(ipsSettings);}(jQuery,_));!function(){var lastBtn=null
|
||||
document.addEventListener('click',function(e){if(!e.target.closest)return;lastBtn=e.target.closest('button, input[type=submit]');},true);document.addEventListener('submit',function(e){if('submitter'in e)return;var canditates=[document.activeElement,lastBtn];lastBtn=null;for(var i=0;i<canditates.length;i++){var candidate=canditates[i];if(!candidate)continue;if(!candidate.form)continue;if(!candidate.matches('button, input[type=button], input[type=image]'))continue;e.submitter=candidate;return;}
|
||||
e.submitter=e.target.querySelector('button, input[type=button], input[type=image]');},true);}();;
|
||||
!function(){"use strict";var t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};!function(e){function n(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=Object.create(t.prototype);for(var a in n)o[a]=n[a];return o.constructor=e,e.prototype=o,e}function o(t){t=t||{},this.defaultProtocol=t.defaultProtocol||h.defaultProtocol,this.events=t.events||h.events,this.format=t.format||h.format,this.formatHref=t.formatHref||h.formatHref,this.nl2br=t.nl2br||h.nl2br,this.tagName=t.tagName||h.tagName,this.target=t.target||h.target,this.validate=t.validate||h.validate,this.ignoreTags=[],this.attributes=t.attributes||t.linkAttributes||h.attributes,this.className=t.className||t.linkClass||h.className;for(var e=t.ignoreTags||h.ignoreTags,n=0;n<e.length;n++)this.ignoreTags.push(e[n].toUpperCase())}function a(t,e){for(var n=0;n<t.length;n++)if(t[n]===e)return!0;return!1}function r(t){return t}function i(t,e){return"url"===e?"_blank":null}function s(){return function(t){this.j=[],this.T=t||null}}function c(t,e,n,o){for(var a=0,r=t.length,i=e,s=[],c=void 0;a<r&&(c=i.next(t[a]));)i=c,a++;if(a>=r)return[];for(;a<r-1;)c=new m(o),s.push(c),i.on(t[a],c),i=c,a++;return c=new m(n),s.push(c),i.on(t[r-1],c),s}function l(){return function(t){t&&(this.v=t)}}function u(t){var e=t?{v:t}:{};return n(b,l(),e)}function p(t){return t instanceof v||t instanceof R}var h={defaultProtocol:"http",events:null,format:r,formatHref:r,nl2br:!1,tagName:"a",target:i,validate:!0,ignoreTags:[],attributes:null,className:"linkified"};o.prototype={resolve:function(t){var e=t.toHref(this.defaultProtocol);return{formatted:this.get("format",t.toString(),t),formattedHref:this.get("formatHref",e,t),tagName:this.get("tagName",e,t),className:this.get("className",e,t),target:this.get("target",e,t),events:this.getObject("events",e,t),attributes:this.getObject("attributes",e,t)}},check:function(t){return this.get("validate",t.toString(),t)},get:function(e,n,o){var a=this[e];if(!a)return a;switch("undefined"==typeof a?"undefined":t(a)){case"function":return a(n,o.type);case"object":var r=a[o.type]||h[e];return"function"==typeof r?r(n,o.type):r}return a},getObject:function(t,e,n){var o=this[t];return"function"==typeof o?o(e,n.type):o}};var g=Object.freeze({defaults:h,Options:o,contains:a}),f=s();f.prototype={defaultTransition:!1,on:function(t,e){if(t instanceof Array){for(var n=0;n<t.length;n++)this.j.push([t[n],e]);return this}return this.j.push([t,e]),this},next:function(t){for(var e=0;e<this.j.length;e++){var n=this.j[e],o=n[0],a=n[1];if(this.test(t,o))return a}return this.defaultTransition},accepts:function(){return!!this.T},test:function(t,e){return t===e},emit:function(){return this.T}};var m=n(f,s(),{test:function(t,e){return t===e||e instanceof RegExp&&e.test(t)}}),d=n(f,s(),{jump:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=this.next(new t(""));return n===this.defaultTransition?(n=new this.constructor(e),this.on(t,n)):e&&(n.T=e),n},test:function(t,e){return t instanceof e}}),b=l();b.prototype={toString:function(){return this.v+""}};var v=u(),y=u("@"),k=u(":"),w=u("."),j=u(),x=u(),z=u("\n"),O=u(),S=u("+"),N=u("#"),T=u(),A=u("mailto:"),L=u("?"),E=u("/"),C=u("_"),P=u(),R=u(),q=u(),H=u("{"),B=u("["),U=u("<"),M=u("("),D=u("}"),I=u("]"),K=u(">"),_=u(")"),G=u("&"),Y=Object.freeze({Base:b,DOMAIN:v,AT:y,COLON:k,DOT:w,PUNCTUATION:j,LOCALHOST:x,NL:z,NUM:O,PLUS:S,POUND:N,QUERY:L,PROTOCOL:T,MAILTO:A,SLASH:E,UNDERSCORE:C,SYM:P,TLD:R,WS:q,OPENBRACE:H,OPENBRACKET:B,OPENANGLEBRACKET:U,OPENPAREN:M,CLOSEBRACE:D,CLOSEBRACKET:I,CLOSEANGLEBRACKET:K,CLOSEPAREN:_,AMPERSAND:G}),Q="aaa|aarp|abb|abbott|abogado|ac|academy|accenture|accountant|accountants|aco|active|actor|ad|adac|ads|adult|ae|aeg|aero|af|afl|ag|agency|ai|aig|airforce|airtel|al|alibaba|alipay|allfinanz|alsace|am|amica|amsterdam|an|analytics|android|ao|apartments|app|apple|aq|aquarelle|ar|aramco|archi|army|arpa|arte|as|asia|associates|at|attorney|au|auction|audi|audio|author|auto|autos|avianca|aw|ax|axa|az|azure|ba|baidu|band|bank|bar|barcelona|barclaycard|barclays|bargains|bauhaus|bayern|bb|bbc|bbva|bcg|bcn|bd|be|beats|beer|bentley|berlin|best|bet|bf|bg|bh|bharti|bi|bible|bid|bike|bing|bingo|bio|biz|bj|black|blackfriday|bloomberg|blue|bm|bms|bmw|bn|bnl|bnpparibas|bo|boats|boehringer|bom|bond|boo|book|boots|bosch|bostik|bot|boutique|br|bradesco|bridgestone|broadway|broker|brother|brussels|bs|bt|budapest|bugatti|build|builders|business|buy|buzz|bv|bw|by|bz|bzh|ca|cab|cafe|cal|call|camera|camp|cancerresearch|canon|capetown|capital|car|caravan|cards|care|career|careers|cars|cartier|casa|cash|casino|cat|catering|cba|cbn|cc|cd|ceb|center|ceo|cern|cf|cfa|cfd|cg|ch|chanel|channel|chase|chat|cheap|chloe|christmas|chrome|church|ci|cipriani|circle|cisco|citic|city|cityeats|ck|cl|claims|cleaning|click|clinic|clinique|clothing|cloud|cLine truncated
|
||||
"use strict";!function(e,t,n){var i=function(t,n){function i(e,t,n){var i=n[n.length-1];e.replaceChild(i,t);for(var r=n.length-2;r>=0;r--)e.insertBefore(n[r],i),i=n[r]}function r(e,t,n){for(var i=[],r=e,a=Array.isArray(r),o=0,r=a?r:r[Symbol.iterator]();;){var l;if(a){if(o>=r.length)break;l=r[o++]}else{if(o=r.next(),o.done)break;l=o.value}var f=l;if("nl"===f.type&&t.nl2br)i.push(n.createElement("br"));else if(f.isLink&&t.check(f)){var s=t.resolve(f),c=s.formatted,u=s.formattedHref,d=s.tagName,m=s.className,y=s.target,h=s.events,k=s.attributes,v=n.createElement(d);if(v.setAttribute("href",u),m&&v.setAttribute("class",m),y&&v.setAttribute("target",y),k)for(var g in k)v.setAttribute(g,k[g]);if(h)for(var b in h)v.addEventListener?v.addEventListener(b,h[b]):v.attachEvent&&v.attachEvent("on"+b,h[b]);v.appendChild(n.createTextNode(c)),i.push(v)}else i.push(n.createTextNode(f.toString()))}return i}function a(e,t,n){if(!e||e.nodeType!==d)throw new Error("Cannot linkify "+e+" - Invalid DOM Node type");var o=t.ignoreTags;if("A"===e.tagName||s.contains(o,e.tagName))return e;for(var l=e.firstChild;l;){switch(l.nodeType){case d:a(l,t,n);break;case m:var c=l.nodeValue,y=f(c);if(0===y.length||1===y.length&&y[0]instanceof u)break;var h=r(y,t,n);i(e,l,h),l=h[h.length-1]}l=l.nextSibling}return e}function o(t,n){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];try{i=i||document||e&&e.document||global&&global.document}catch(r){}if(!i)throw new Error("Cannot find document implementation. If you are in a non-browser environment like Node.js, pass the document implementation as the third argument to linkifyElement.");return n=new c(n),a(t,n,i)}function l(t){function n(e){return e=o.normalize(e),this.each(function(){o.helper(this,e,i)})}var i=arguments.length>1&&void 0!==arguments[1]&&arguments[1];t.fn=t.fn||{};try{i=i||document||e&&e.document||global&&global.document}catch(r){}if(!i)throw new Error("Cannot find document implementation. If you are in a non-browser environment like Node.js, pass the document implementation as the second argument to linkify/jquery");"function"!=typeof t.fn.linkify&&(t.fn.linkify=n,t(i).ready(function(){t("[data-linkify]").each(function(){var e=t(this),n=e.data(),i=n.linkify,r=n.linkifyNlbr,a={attributes:n.linkifyAttributes,defaultProtocol:n.linkifyDefaultProtocol,events:n.linkifyEvents,format:n.linkifyFormat,formatHref:n.linkifyFormatHref,nl2br:!!r&&0!==r&&"false"!==r,tagName:n.linkifyTagname,target:n.linkifyTarget,className:n.linkifyClassName||n.linkifyLinkclass,validate:n.linkifyValidate,ignoreTags:n.linkifyIgnoreTags},o="this"===i?e:e.find(i);o.linkify(a)})}))}t="default"in t?t["default"]:t;var f=n.tokenize,s=n.options,c=s.Options,u=n.parser.TOKENS.TEXT,d=1,m=3;o.helper=a,o.normalize=function(e){return new c(e)};try{!define&&(e.linkifyElement=o)}catch(y){}return l}(n,t);"function"!=typeof n.fn.linkify&&i(n)}(window,linkify,jQuery);;
|
||||
"use strict";function eventSuppressor(e){e.preventDefault();e.stopPropagation();}
|
||||
let uuid=0;const METHODS={ipsHide(){this.setAttribute('hidden','true')},ipsShow(){this.removeAttribute('hidden')
|
||||
this.classList.remove('ipsHide');if(this.style.display==='none'){this.style.display=''}},ipsEnable(){this.style.filter='';this.style.cursor='';if(this.dataset.disabledOriginalStyles){for(const[k,v]of Object.entries(JSON.parse(this.dataset.disabledOriginalStyles))){if(v){this.style[k]=v;}else{delete this.style[k];}}}
|
||||
delete this.dataset.disabledOriginalStyles;this.removeEventListener('click',eventSuppressor);this.removeEventListener('mousedown',eventSuppressor);this.removeEventListener('mouseup',eventSuppressor);this.removeEventListener('focus',eventSuppressor);if('ipstooltip'in this.dataset&&this.dataset.disableTitle&&this.dataset.disableTitle===(this.getAttribute('title')||this.getAttribute('_title'))){const originalTitle=this.dataset.originalTitle;delete this.dataset.disableTitle;if(!originalTitle){this.removeAttribute('title');this.removeAttribute('_title');delete this.dataset.ipstooltip;}else{this.setAttribute('title',originalTitle);this.setAttribute('_title',originalTitle);}}},ipsDisable(options={}){let{message,opacity}=options;if(!this.dataset.disabledOriginalStyles){const originals={filter:this.style.filter,cursor:this.style.cursor};this.dataset.disabledOriginalStyles=JSON.stringify(originals);}
|
||||
opacity=Number(opacity);opacity=(opacity>0&&opacity<1)?opacity:0.6;this.style.filter=`grayscale(1) opacity(${opacity * 100}%)`;this.style.cursor=(message?'default':'not-allowed');this.addEventListener('click',eventSuppressor);this.addEventListener('mousedown',eventSuppressor);this.addEventListener('mouseup',eventSuppressor);this.addEventListener('focus',eventSuppressor);if(typeof message==='string'){const originalMessage=('ipstooltip'in this.dataset)?(this.getAttribute('title')||this.getAttribute('_title')):false;if(originalMessage){this.dataset.originalTitle=originalMessage;}
|
||||
this.removeAttribute('_title');delete this.dataset.ipstooltip;this.setAttribute('title',message);this.dataset.disableTitle=message;this.setAttribute('data-ipstooltip','')}}};for(const[name,func]of Object.entries(METHODS)){Element.prototype[name]=function(...args){func.bind(this)(...args);return this;}
|
||||
NodeList.prototype[name]=function(...args){this.forEach(e=>{if(e instanceof Element){e[name](...args)}})
|
||||
return this;}}
|
||||
const ilang=(str,...values)=>{const raw=String.raw({raw:str},...values)
|
||||
return ips.getString(raw)||raw};
|
||||
(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.XRegExp=f()}})(function(){var define,module,exports;return(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){module.exports=function(XRegExp){'use strict';var REGEX_DATA='xregexp';var subParts=/(\()(?!\?)|\\([1-9]\d*)|\\[\s\S]|\[(?:[^\\\]]|\\[\s\S])*\]/g;var parts=XRegExp.union([/\({{([\w$]+)}}\)|{{([\w$]+)}}/,subParts],'g',{conjunction:'or'});function deanchor(pattern){var leadingAnchor=/^(?:\(\?:\))*\^/;var trailingAnchor=/\$(?:\(\?:\))*$/;if(leadingAnchor.test(pattern)&&trailingAnchor.test(pattern)&&trailingAnchor.test(pattern.replace(/\\[\s\S]/g,''))){return pattern.replace(leadingAnchor,'').replace(trailingAnchor,'');}
|
||||
return pattern;}
|
||||
function asXRegExp(value,addFlagX){var flags=addFlagX?'x':'';return XRegExp.isRegExp(value)?(value[REGEX_DATA]&&value[REGEX_DATA].captureNames?value:XRegExp(value.source,flags)):XRegExp(value,flags);}
|
||||
XRegExp.build=function(pattern,subs,flags){flags=flags||'';var addFlagX=flags.indexOf('x')>-1;var inlineFlags=/^\(\?([\w$]+)\)/.exec(pattern);if(inlineFlags){flags=XRegExp._clipDuplicates(flags+inlineFlags[1]);}
|
||||
var data={};for(var p in subs){if(subs.hasOwnProperty(p)){var sub=asXRegExp(subs[p],addFlagX);data[p]={pattern:deanchor(sub.source),names:sub[REGEX_DATA].captureNames||[]};}}
|
||||
var patternAsRegex=asXRegExp(pattern,addFlagX);var numCaps=0;var numPriorCaps;var numOuterCaps=0;var outerCapsMap=[0];var outerCapNames=patternAsRegex[REGEX_DATA].captureNames||[];var output=patternAsRegex.source.replace(parts,function($0,$1,$2,$3,$4){var subName=$1||$2;var capName;var intro;var localCapIndex;if(subName){if(!data.hasOwnProperty(subName)){throw new ReferenceError('Undefined property '+$0);}
|
||||
if($1){capName=outerCapNames[numOuterCaps];outerCapsMap[++numOuterCaps]=++numCaps;intro='(?<'+(capName||subName)+'>';}else{intro='(?:';}
|
||||
numPriorCaps=numCaps;return intro+data[subName].pattern.replace(subParts,function(match,paren,backref){if(paren){capName=data[subName].names[numCaps-numPriorCaps];++numCaps;if(capName){return'(?<'+capName+'>';}}else if(backref){localCapIndex=+backref-1;return data[subName].names[localCapIndex]?'\\k<'+data[subName].names[localCapIndex]+'>':'\\'+(+backref+numPriorCaps);}
|
||||
return match;})+')';}
|
||||
if($3){capName=outerCapNames[numOuterCaps];outerCapsMap[++numOuterCaps]=++numCaps;if(capName){return'(?<'+capName+'>';}}else if($4){localCapIndex=+$4-1;return outerCapNames[localCapIndex]?'\\k<'+outerCapNames[localCapIndex]+'>':'\\'+outerCapsMap[+$4];}
|
||||
return $0;});return XRegExp(output,flags);};};},{}],2:[function(require,module,exports){module.exports=function(XRegExp){'use strict';function row(name,value,start,end){return{name:name,value:value,start:start,end:end};}
|
||||
XRegExp.matchRecursive=function(str,left,right,flags,options){flags=flags||'';options=options||{};var global=flags.indexOf('g')>-1;var sticky=flags.indexOf('y')>-1;var basicFlags=flags.replace(/y/g,'');var escapeChar=options.escapeChar;var vN=options.valueNames;var output=[];var openTokens=0;var delimStart=0;var delimEnd=0;var lastOuterEnd=0;var outerStart;var innerStart;var leftMatch;var rightMatch;var esc;left=XRegExp(left,basicFlags);right=XRegExp(right,basicFlags);if(escapeChar){if(escapeChar.length>1){throw new Error('Cannot use more than one escape character');}
|
||||
escapeChar=XRegExp.escape(escapeChar);esc=new RegExp('(?:'+escapeChar+'[\\S\\s]|(?:(?!'+
|
||||
XRegExp.union([left,right],'',{conjunction:'or'}).source+
|
||||
')[^'+escapeChar+'])+)+',flags.replace(/[^imu]+/g,''));}
|
||||
while(true){if(escapeChar){delimEnd+=(XRegExp.exec(str,esc,delimEnd,'sticky')||[''])[0].length;}
|
||||
leftMatch=XRegExp.exec(str,left,delimEnd);rightMatch=XRegExp.exec(str,right,delimEnd);if(leftMatch&&rightMatch){if(leftMatch.index<=rightMatch.index){rightMatch=null;}else{leftMatch=null;}}
|
||||
if(leftMatch||rightMatch){delimStart=(leftMatch||rightMatch).index;delimEnd=delimStart+(leftMatch||rightMatch)[0].length;}else if(!openTokens){break;}
|
||||
if(sticky&&!openTokens&&delimStart>lastOuterEnd){break;}
|
||||
if(leftMatch){if(!openTokens){outerStart=delimStart;innerStart=delimEnd;}
|
||||
++openTokens;}else if(rightMatch&&openTokens){if(!--openTokens){if(vN){if(vN[0]&&outerStart>lastOuterEnd){output.push(row(vN[0],str.slice(lastOuterEnd,outerStart),lastOuterEnd,outerStart));}
|
||||
if(vN[1]){output.push(row(vN[1],str.slice(outerStart,innerStart),outerStart,innerStart));}
|
||||
if(vN[2]){output.push(row(vN[2],str.slice(innerStart,delimStart),innerStart,delimStart));}
|
||||
if(vN[3]){output.push(row(vN[3],str.slice(delimStart,delimEnd),delimStart,delimEnd));}}else{output.push(str.slice(innerStart,delimStart));}
|
||||
lastOuterEnd=delimEnd;if(!global){break;}}}else{throw new Error('Unbalanced delimiter found in string');}
|
||||
if(delimStart===delimEnd){++delimEnd;}}
|
||||
if(global&&!sticky&&vN&&vN[0]&&str.length>lastOuterEnd){output.push(row(vN[0],str.slice(lastOuterEnd),lastOuterEnd,str.length));}
|
||||
return output;};};},{}],3:[function(require,module,exports){module.exports=function(XRegExp){'use strict';var unicode={};var dec=XRegExp._dec;var hex=XRegExp._hex;var pad4=XRegExp._pad4;function normalize(name){return name.replace(/[- _]+/g,'').toLowerCase();}
|
||||
function charCode(chr){var esc=/^\\[xu](.+)/.exec(chr);return esc?dec(esc[1]):chr.charCodeAt(chr.charAt(0)==='\\'?1:0);}
|
||||
function invertBmp(range){var output='';var lastEnd=-1;XRegExp.forEach(range,/(\\x..|\\u....|\\?[\s\S])(?:-(\\x..|\\u....|\\?[\s\S]))?/,function(m){var start=charCode(m[1]);if(start>(lastEnd+1)){output+='\\u'+pad4(hex(lastEnd+1));if(start>(lastEnd+2)){output+='-\\u'+pad4(hex(start-1));}}
|
||||
lastEnd=charCode(m[2]||m[1]);});if(lastEnd<0xFFFF){output+='\\u'+pad4(hex(lastEnd+1));if(lastEnd<0xFFFE){output+='-\\uFFFF';}}
|
||||
return output;}
|
||||
function cacheInvertedBmp(slug){var prop='b!';return(unicode[slug][prop]||(unicode[slug][prop]=invertBmp(unicode[slug].bmp)));}
|
||||
function buildAstral(slug,isNegated){var item=unicode[slug];var combined='';if(item.bmp&&!item.isBmpLast){combined='['+item.bmp+']'+(item.astral?'|':'');}
|
||||
if(item.astral){combined+=item.astral;}
|
||||
if(item.isBmpLast&&item.bmp){combined+=(item.astral?'|':'')+'['+item.bmp+']';}
|
||||
return isNegated?'(?:(?!'+combined+')(?:[\uD800-\uDBFF][\uDC00-\uDFFF]|[\0-\uFFFF]))':'(?:'+combined+')';}
|
||||
function cacheAstral(slug,isNegated){var prop=isNegated?'a!':'a=';return(unicode[slug][prop]||(unicode[slug][prop]=buildAstral(slug,isNegated)));}
|
||||
XRegExp.addToken(/\\([pP])(?:{(\^?)([^}]*)}|([A-Za-z]))/,function(match,scope,flags){var ERR_DOUBLE_NEG='Invalid double negation ';var ERR_UNKNOWN_NAME='Unknown Unicode token ';var ERR_UNKNOWN_REF='Unicode token missing data ';var ERR_ASTRAL_ONLY='Astral mode required for Unicode token ';var ERR_ASTRAL_IN_CLASS='Astral mode does not support Unicode tokens within character classes';var isNegated=match[1]==='P'||!!match[2];var isAstralMode=flags.indexOf('A')>-1;var slug=normalize(match[4]||match[3]);var item=unicode[slug];if(match[1]==='P'&&match[2]){throw new SyntaxError(ERR_DOUBLE_NEG+match[0]);}
|
||||
if(!unicode.hasOwnProperty(slug)){throw new SyntaxError(ERR_UNKNOWN_NAME+match[0]);}
|
||||
if(item.inverseOf){slug=normalize(item.inverseOf);if(!unicode.hasOwnProperty(slug)){throw new ReferenceError(ERR_UNKNOWN_REF+match[0]+' -> '+item.inverseOf);}
|
||||
item=unicode[slug];isNegated=!isNegated;}
|
||||
if(!(item.bmp||isAstralMode)){throw new SyntaxError(ERR_ASTRAL_ONLY+match[0]);}
|
||||
if(isAstralMode){if(scope==='class'){throw new SyntaxError(ERR_ASTRAL_IN_CLASS);}
|
||||
return cacheAstral(slug,isNegated);}
|
||||
return scope==='class'?(isNegated?cacheInvertedBmp(slug):item.bmp):(isNegated?'[^':'[')+item.bmp+']';},{scope:'all',optionalFlags:'A',leadChar:'\\'});XRegExp.addUnicodeData=function(data){var ERR_NO_NAME='Unicode token requires name';var ERR_NO_DATA='Unicode token has no character data ';var item;for(var i=0;i<data.length;++i){item=data[i];if(!item.name){throw new Error(ERR_NO_NAME);}
|
||||
if(!(item.inverseOf||item.bmp||item.astral)){throw new Error(ERR_NO_DATA+item.name);}
|
||||
unicode[normalize(item.name)]=item;if(item.alias){unicode[normalize(item.alias)]=item;}}
|
||||
XRegExp.cache.flush('patterns');};XRegExp._getUnicodeProperty=function(name){var slug=normalize(name);return unicode[slug];};};},{}],4:[function(require,module,exports){module.exports=function(XRegExp){'use strict';if(!XRegExp.addUnicodeData){throw new ReferenceError('Unicode Base must be loaded before Unicode Blocks');}
|
||||
XRegExp.addUnicodeData([{name:'InAdlam',astral:'\uD83A[\uDD00-\uDD5F]'},{name:'InAegean_Numbers',astral:'\uD800[\uDD00-\uDD3F]'},{name:'InAhom',astral:'\uD805[\uDF00-\uDF3F]'},{name:'InAlchemical_Symbols',astral:'\uD83D[\uDF00-\uDF7F]'},{name:'InAlphabetic_Presentation_Forms',bmp:'\uFB00-\uFB4F'},{name:'InAnatolian_Hieroglyphs',astral:'\uD811[\uDC00-\uDE7F]'},{name:'InAncient_Greek_Musical_Notation',astral:'\uD834[\uDE00-\uDE4F]'},{name:'InAncient_Greek_Numbers',astral:'\uD800[\uDD40-\uDD8F]'},{name:'InAncient_Symbols',astral:'\uD800[\uDD90-\uDDCF]'},{name:'InArabic',bmp:'\u0600-\u06FF'},{name:'InArabic_Extended_A',bmp:'\u08A0-\u08FF'},{name:'InArabic_Mathematical_Alphabetic_Symbols',astral:'\uD83B[\uDE00-\uDEFF]'},{name:'InArabic_Presentation_Forms_A',bmp:'\uFB50-\uFDFF'},{name:'InArabic_Presentation_Forms_B',bmp:'\uFE70-\uFEFF'},{name:'InArabic_Supplement',bmp:'\u0750-\u077F'},{name:'InArmenian',bmp:'\u0530-\u058F'},{name:'InArrows',bmp:'\u2190-\u21FF'},{name:'InAvestan',astral:'\uD802[\uDF00-\uDF3F]'},{name:'InBalinese',bmp:'\u1B00-\u1B7F'},{name:'InBamum',bmp:'\uA6A0-\uA6FF'},{name:'InBamum_Supplement',astral:'\uD81A[\uDC00-\uDE3F]'},{name:'InBasic_Latin',bmp:'\0-\x7F'},{name:'InBassa_Vah',astral:'\uD81A[\uDED0-\uDEFF]'},{name:'InBatak',bmp:'\u1BC0-\u1BFF'},{name:'InBengali',bmp:'\u0980-\u09FF'},{name:'InBhaiksuki',astral:'\uD807[\uDC00-\uDC6F]'},{name:'InBlock_Elements',bmp:'\u2580-\u259F'},{name:'InBopomofo',bmp:'\u3100-\u312F'},{name:'InBopomofo_Extended',bmp:'\u31A0-\u31BF'},{name:'InBox_Drawing',bmp:'\u2500-\u257F'},{name:'InBrahmi',astral:'\uD804[\uDC00-\uDC7F]'},{name:'InBraille_Patterns',bmp:'\u2800-\u28FF'},{name:'InBuginese',bmp:'\u1A00-\u1A1F'},{name:'InBuhid',bmp:'\u1740-\u175F'},{name:'InByzantine_Musical_Symbols',astral:'\uD834[\uDC00-\uDCFF]'},{name:'InCJK_Compatibility',bmp:'\u3300-\u33FF'},{name:'InCJK_Compatibility_Forms',bmp:'\uFE30-\uFE4F'},{name:'InCJK_Compatibility_Ideographs',bmp:'\uF900-\uFAFF'},{name:'InCJK_Compatibility_Ideographs_Supplement',astral:'\uD87E[\uDC00-\uDE1F]'},{name:'InCJK_Radicals_Supplement',bmp:'\u2E80-\u2EFF'},{name:'InCJK_Strokes',bmp:'\u31C0-\u31EF'},{name:'InCJK_Symbols_and_Punctuation',bmp:'\u3000-\u303F'},{name:'InCJK_Unified_Ideographs',bmp:'\u4E00-\u9FFF'},{name:'InCJK_Unified_Ideographs_Extension_A',bmp:'\u3400-\u4DBF'},{name:'InCJK_Unified_Ideographs_Extension_B',astral:'[\uD840-\uD868][\uDC00-\uDFFF]|\uD869[\uDC00-\uDEDF]'},{name:'InCJK_Unified_Ideographs_Extension_C',astral:'\uD869[\uDF00-\uDFFF]|[\uD86A-\uD86C][\uDC00-\uDFFF]|\uD86D[\uDC00-\uDF3F]'},{name:'InCJK_Unified_Ideographs_Extension_D',astral:'\uD86D[\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1F]'},{name:'InCJK_Unified_Ideographs_Extension_E',astral:'\uD86E[\uDC20-\uDFFF]|[\uD86F-\uD872][\uDC00-\uDFFF]|\uD873[\uDC00-\uDEAF]'},{name:'InCarian',astral:'\uD800[\uDEA0-\uDEDF]'},{name:'InCaucasian_Albanian',astral:'\uD801[\uDD30-\uDD6F]'},{name:'InChakma',astral:'\uD804[\uDD00-\uDD4F]'},{name:'InCham',bmp:'\uAA00-\uAA5F'},{name:'InCherokee',bmp:'\u13A0-\u13FF'},{name:'InCherokee_Supplement',bmp:'\uAB70-\uABBF'},{name:'InCombining_Diacritical_Marks',bmp:'\u0300-\u036F'},{name:'InCombining_Diacritical_Marks_Extended',bmp:'\u1AB0-\u1AFF'},{name:'InCombining_Diacritical_Marks_Supplement',bmp:'\u1DC0-\u1DFF'},{name:'InCombining_Diacritical_Marks_for_Symbols',bmp:'\u20D0-\u20FF'},{name:'InCombining_Half_Marks',bmp:'\uFE20-\uFE2F'},{name:'InCommon_Indic_Number_Forms',bmp:'\uA830-\uA83F'},{name:'InControl_Pictures',bmp:'\u2400-\u243F'},{name:'InCoptic',bmp:'\u2C80-\u2CFF'},{name:'InCoptic_Epact_Numbers',astral:'\uD800[\uDEE0-\uDEFF]'},{name:'InCounting_Rod_Numerals',astral:'\uD834[\uDF60-\uDF7F]'},{name:'InCuneiform',astral:'\uD808[\uDC00-\uDFFF]'},{name:'InCuneiform_Numbers_and_Punctuation',astral:'\uD809[\uDC00-\uDC7F]'},{name:'InCurrency_Symbols',bmp:'\u20A0-\u20CF'},{name:'InCypriot_Syllabary',astral:'\uD802[\uDC00-\uDC3F]'},{name:'InCyrillic',bmp:'\u0400-\u04FF'},{name:'InCyrillic_Extended_A',bmp:'\u2DE0-\u2DFF'},{name:'InCyrillic_Extended_B',bmp:'\uA640-\uA69F'},{name:'InCyrillic_Extended_C',bmp:'\u1C80-\u1C8F'},{name:'InCyrillic_Supplement',bmp:'\u0500-\u052F'},{name:'InDeseret',astral:'\uD801[\uDC00-\uDC4F]'},{name:'InDevanagari',bmp:'\u0900-\u097F'},{name:'InDevanagari_Extended',bmp:'\uA8E0-\uA8FF'},{name:'InDingbats',bmp:'\u2700-\u27BF'},{name:'InDomino_Tiles',astral:'\uD83C[\uDC30-\uDC9F]'},{name:'InDuployan',astral:'\uD82F[\uDC00-\uDC9F]'},{name:'InEarly_Dynastic_Cuneiform',astral:'\uD809[\uDC80-\uDD4F]'},{name:'InEgyptian_Hieroglyphs',astral:'\uD80C[\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2F]'},{name:'InElbasan',astral:'\uD801[\uDD00-\uDD2F]'},{name:'InEmoticons',astral:'\uD83D[\uDE00-\uDE4F]'},{name:'InEnclosed_Alphanumeric_Supplement',astral:'\uD83C[\uDD00-\uDDFF]'},{name:'InEnclosed_Alphanumerics',bmp:'\u2460-\u24FF'},{name:'InEnclosed_CJK_Letters_and_Months',bmp:'\u3200-\u32FF'},{name:'InEnclosed_Ideographic_Supplement',astral:'\uD83C[\uDE00-\uDEFF]'},{name:'InEthiopic',bmp:'\u1200-\u137F'},{name:'InEtLine truncated
|
||||
XRegExp.addUnicodeData([{name:'C',alias:'Other',isBmpLast:true,bmp:'\0-\x1F\x7F-\x9F\xAD\u0378\u0379\u0380-\u0383\u038B\u038D\u03A2\u0530\u0557\u0558\u0560\u0588\u058B\u058C\u0590\u05C8-\u05CF\u05EB-\u05EF\u05F5-\u0605\u061C\u061D\u06DD\u070E\u070F\u074B\u074C\u07B2-\u07BF\u07FB-\u07FF\u082E\u082F\u083F\u085C\u085D\u085F-\u089F\u08B5\u08BE-\u08D3\u08E2\u0984\u098D\u098E\u0991\u0992\u09A9\u09B1\u09B3-\u09B5\u09BA\u09BB\u09C5\u09C6\u09C9\u09CA\u09CF-\u09D6\u09D8-\u09DB\u09DE\u09E4\u09E5\u09FC-\u0A00\u0A04\u0A0B-\u0A0E\u0A11\u0A12\u0A29\u0A31\u0A34\u0A37\u0A3A\u0A3B\u0A3D\u0A43-\u0A46\u0A49\u0A4A\u0A4E-\u0A50\u0A52-\u0A58\u0A5D\u0A5F-\u0A65\u0A76-\u0A80\u0A84\u0A8E\u0A92\u0AA9\u0AB1\u0AB4\u0ABA\u0ABB\u0AC6\u0ACA\u0ACE\u0ACF\u0AD1-\u0ADF\u0AE4\u0AE5\u0AF2-\u0AF8\u0AFA-\u0B00\u0B04\u0B0D\u0B0E\u0B11\u0B12\u0B29\u0B31\u0B34\u0B3A\u0B3B\u0B45\u0B46\u0B49\u0B4A\u0B4E-\u0B55\u0B58-\u0B5B\u0B5E\u0B64\u0B65\u0B78-\u0B81\u0B84\u0B8B-\u0B8D\u0B91\u0B96-\u0B98\u0B9B\u0B9D\u0BA0-\u0BA2\u0BA5-\u0BA7\u0BAB-\u0BAD\u0BBA-\u0BBD\u0BC3-\u0BC5\u0BC9\u0BCE\u0BCF\u0BD1-\u0BD6\u0BD8-\u0BE5\u0BFB-\u0BFF\u0C04\u0C0D\u0C11\u0C29\u0C3A-\u0C3C\u0C45\u0C49\u0C4E-\u0C54\u0C57\u0C5B-\u0C5F\u0C64\u0C65\u0C70-\u0C77\u0C84\u0C8D\u0C91\u0CA9\u0CB4\u0CBA\u0CBB\u0CC5\u0CC9\u0CCE-\u0CD4\u0CD7-\u0CDD\u0CDF\u0CE4\u0CE5\u0CF0\u0CF3-\u0D00\u0D04\u0D0D\u0D11\u0D3B\u0D3C\u0D45\u0D49\u0D50-\u0D53\u0D64\u0D65\u0D80\u0D81\u0D84\u0D97-\u0D99\u0DB2\u0DBC\u0DBE\u0DBF\u0DC7-\u0DC9\u0DCB-\u0DCE\u0DD5\u0DD7\u0DE0-\u0DE5\u0DF0\u0DF1\u0DF5-\u0E00\u0E3B-\u0E3E\u0E5C-\u0E80\u0E83\u0E85\u0E86\u0E89\u0E8B\u0E8C\u0E8E-\u0E93\u0E98\u0EA0\u0EA4\u0EA6\u0EA8\u0EA9\u0EAC\u0EBA\u0EBE\u0EBF\u0EC5\u0EC7\u0ECE\u0ECF\u0EDA\u0EDB\u0EE0-\u0EFF\u0F48\u0F6D-\u0F70\u0F98\u0FBD\u0FCD\u0FDB-\u0FFF\u10C6\u10C8-\u10CC\u10CE\u10CF\u1249\u124E\u124F\u1257\u1259\u125E\u125F\u1289\u128E\u128F\u12B1\u12B6\u12B7\u12BF\u12C1\u12C6\u12C7\u12D7\u1311\u1316\u1317\u135B\u135C\u137D-\u137F\u139A-\u139F\u13F6\u13F7\u13FE\u13FF\u169D-\u169F\u16F9-\u16FF\u170D\u1715-\u171F\u1737-\u173F\u1754-\u175F\u176D\u1771\u1774-\u177F\u17DE\u17DF\u17EA-\u17EF\u17FA-\u17FF\u180E\u180F\u181A-\u181F\u1878-\u187F\u18AB-\u18AF\u18F6-\u18FF\u191F\u192C-\u192F\u193C-\u193F\u1941-\u1943\u196E\u196F\u1975-\u197F\u19AC-\u19AF\u19CA-\u19CF\u19DB-\u19DD\u1A1C\u1A1D\u1A5F\u1A7D\u1A7E\u1A8A-\u1A8F\u1A9A-\u1A9F\u1AAE\u1AAF\u1ABF-\u1AFF\u1B4C-\u1B4F\u1B7D-\u1B7F\u1BF4-\u1BFB\u1C38-\u1C3A\u1C4A-\u1C4C\u1C89-\u1CBF\u1CC8-\u1CCF\u1CF7\u1CFA-\u1CFF\u1DF6-\u1DFA\u1F16\u1F17\u1F1E\u1F1F\u1F46\u1F47\u1F4E\u1F4F\u1F58\u1F5A\u1F5C\u1F5E\u1F7E\u1F7F\u1FB5\u1FC5\u1FD4\u1FD5\u1FDC\u1FF0\u1FF1\u1FF5\u1FFF\u200B-\u200F\u202A-\u202E\u2060-\u206F\u2072\u2073\u208F\u209D-\u209F\u20BF-\u20CF\u20F1-\u20FF\u218C-\u218F\u23FF\u2427-\u243F\u244B-\u245F\u2B74\u2B75\u2B96\u2B97\u2BBA-\u2BBC\u2BC9\u2BD2-\u2BEB\u2BF0-\u2BFF\u2C2F\u2C5F\u2CF4-\u2CF8\u2D26\u2D28-\u2D2C\u2D2E\u2D2F\u2D68-\u2D6E\u2D71-\u2D7E\u2D97-\u2D9F\u2DA7\u2DAF\u2DB7\u2DBF\u2DC7\u2DCF\u2DD7\u2DDF\u2E45-\u2E7F\u2E9A\u2EF4-\u2EFF\u2FD6-\u2FEF\u2FFC-\u2FFF\u3040\u3097\u3098\u3100-\u3104\u312E-\u3130\u318F\u31BB-\u31BF\u31E4-\u31EF\u321F\u32FF\u4DB6-\u4DBF\u9FD6-\u9FFF\uA48D-\uA48F\uA4C7-\uA4CF\uA62C-\uA63F\uA6F8-\uA6FF\uA7AF\uA7B8-\uA7F6\uA82C-\uA82F\uA83A-\uA83F\uA878-\uA87F\uA8C6-\uA8CD\uA8DA-\uA8DF\uA8FE\uA8FF\uA954-\uA95E\uA97D-\uA97F\uA9CE\uA9DA-\uA9DD\uA9FF\uAA37-\uAA3F\uAA4E\uAA4F\uAA5A\uAA5B\uAAC3-\uAADA\uAAF7-\uAB00\uAB07\uAB08\uAB0F\uAB10\uAB17-\uAB1F\uAB27\uAB2F\uAB66-\uAB6F\uABEE\uABEF\uABFA-\uABFF\uD7A4-\uD7AF\uD7C7-\uD7CA\uD7FC-\uF8FF\uFA6E\uFA6F\uFADA-\uFAFF\uFB07-\uFB12\uFB18-\uFB1C\uFB37\uFB3D\uFB3F\uFB42\uFB45\uFBC2-\uFBD2\uFD40-\uFD4F\uFD90\uFD91\uFDC8-\uFDEF\uFDFE\uFDFF\uFE1A-\uFE1F\uFE53\uFE67\uFE6C-\uFE6F\uFE75\uFEFD-\uFF00\uFFBF-\uFFC1\uFFC8\uFFC9\uFFD0\uFFD1\uFFD8\uFFD9\uFFDD-\uFFDF\uFFE7\uFFEF-\uFFFB\uFFFE\uFFFF',astral:'\uD800[\uDC0C\uDC27\uDC3B\uDC3E\uDC4E\uDC4F\uDC5E-\uDC7F\uDCFB-\uDCFF\uDD03-\uDD06\uDD34-\uDD36\uDD8F\uDD9C-\uDD9F\uDDA1-\uDDCF\uDDFE-\uDE7F\uDE9D-\uDE9F\uDED1-\uDEDF\uDEFC-\uDEFF\uDF24-\uDF2F\uDF4B-\uDF4F\uDF7B-\uDF7F\uDF9E\uDFC4-\uDFC7\uDFD6-\uDFFF]|\uD801[\uDC9E\uDC9F\uDCAA-\uDCAF\uDCD4-\uDCD7\uDCFC-\uDCFF\uDD28-\uDD2F\uDD64-\uDD6E\uDD70-\uDDFF\uDF37-\uDF3F\uDF56-\uDF5F\uDF68-\uDFFF]|\uD802[\uDC06\uDC07\uDC09\uDC36\uDC39-\uDC3B\uDC3D\uDC3E\uDC56\uDC9F-\uDCA6\uDCB0-\uDCDF\uDCF3\uDCF6-\uDCFA\uDD1C-\uDD1E\uDD3A-\uDD3E\uDD40-\uDD7F\uDDB8-\uDDBB\uDDD0\uDDD1\uDE04\uDE07-\uDE0B\uDE14\uDE18\uDE34-\uDE37\uDE3B-\uDE3E\uDE48-\uDE4F\uDE59-\uDE5F\uDEA0-\uDEBF\uDEE7-\uDEEA\uDEF7-\uDEFF\uDF36-\uDF38\uDF56\uDF57\uDF73-\uDF77\uDF92-\uDF98\uDF9D-\uDFA8\uDFB0-\uDFFF]|\uD803[\uDC49-\uDC7F\uDCB3-\uDCBF\uDCF3-\uDCF9\uDD00-\uDE5F\uDE7F-\uDFFF]|\uD804[\uDC4E-\uDC51\uDC70-\uDC7E\uDCBD\uDCC2-\uDCCF\uDCE9-\uDCEF\uDCFA-\uDCFF\uDD35\uDD44-\uDD4F\uDD77-\uDD7F\uDDCE\uDDCF\uDDE0\uDDF5-\uDDFF\uDE12\uDE3F-\uDE7F\uDE87\uDE89\uDE8E\uDE9E\uDEAA-\uDEAF\uDEEB-\uDEEF\uDEFA-\uDEFF\uDF04\uDF0D\uDF0E\uDF11\uDF12\uDF29\uDF31\uDF34\uDF3A\uDF3B\uDF45\uDF46\uDF49\uDF4A\uDF4E\uDF4F\uDF51-\uDLine truncated
|
||||
var unicodeData=[{name:'ASCII',bmp:'\0-\x7F'},{name:'Alphabetic',bmp:'A-Za-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0345\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05B0-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0657\u0659-\u065F\u066E-\u06D3\u06D5-\u06DC\u06E1-\u06E8\u06ED-\u06EF\u06FA-\u06FC\u06FF\u0710-\u073F\u074D-\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0817\u081A-\u082C\u0840-\u0858\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08DF\u08E3-\u08E9\u08F0-\u093B\u093D-\u094C\u094E-\u0950\u0955-\u0963\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD-\u09C4\u09C7\u09C8\u09CB\u09CC\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09F0\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3E-\u0A42\u0A47\u0A48\u0A4B\u0A4C\u0A51\u0A59-\u0A5C\u0A5E\u0A70-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD-\u0AC5\u0AC7-\u0AC9\u0ACB\u0ACC\u0AD0\u0AE0-\u0AE3\u0AF9\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D-\u0B44\u0B47\u0B48\u0B4B\u0B4C\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCC\u0BD0\u0BD7\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4C\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCC\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4C\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E46\u0E4D\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0ECD\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F71-\u0F81\u0F88-\u0F97\u0F99-\u0FBC\u1000-\u1036\u1038\u103B-\u103F\u1050-\u1062\u1065-\u1068\u106E-\u1086\u108E\u109C\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1713\u1720-\u1733\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17B3\u17B6-\u17C8\u17D7\u17DC\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u1938\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A1B\u1A20-\u1A5E\u1A61-\u1A74\u1AA7\u1B00-\u1B33\u1B35-\u1B43\u1B45-\u1B4B\u1B80-\u1BA9\u1BAC-\u1BAF\u1BBA-\u1BE5\u1BE7-\u1BF1\u1C00-\u1C35\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1D00-\u1DBF\u1DE7-\u1DF4\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u24B6-\u24E9\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA674-\uA67B\uA67F-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA827\uA840-\uA873\uA880-\uA8C3\uA8C5\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA92A\uA930-\uA952\uA960-\uA97C\uA980-\uA9B2\uA9B4-\uA9BF\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA60-\uAA76\uAA7A\uAA7E-\uAABE\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF5\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2Line truncated
|
||||
XRegExp.addUnicodeData([{name:'Adlam',astral:'\uD83A[\uDD00-\uDD4A\uDD50-\uDD59\uDD5E\uDD5F]'},{name:'Ahom',astral:'\uD805[\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF3F]'},{name:'Anatolian_Hieroglyphs',astral:'\uD811[\uDC00-\uDE46]'},{name:'Arabic',bmp:'\u0600-\u0604\u0606-\u060B\u060D-\u061A\u061E\u0620-\u063F\u0641-\u064A\u0656-\u066F\u0671-\u06DC\u06DE-\u06FF\u0750-\u077F\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u08FF\uFB50-\uFBC1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFD\uFE70-\uFE74\uFE76-\uFEFC',astral:'\uD803[\uDE60-\uDE7E]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB\uDEF0\uDEF1]'},{name:'Armenian',bmp:'\u0531-\u0556\u0559-\u055F\u0561-\u0587\u058A\u058D-\u058F\uFB13-\uFB17'},{name:'Avestan',astral:'\uD802[\uDF00-\uDF35\uDF39-\uDF3F]'},{name:'Balinese',bmp:'\u1B00-\u1B4B\u1B50-\u1B7C'},{name:'Bamum',bmp:'\uA6A0-\uA6F7',astral:'\uD81A[\uDC00-\uDE38]'},{name:'Bassa_Vah',astral:'\uD81A[\uDED0-\uDEED\uDEF0-\uDEF5]'},{name:'Batak',bmp:'\u1BC0-\u1BF3\u1BFC-\u1BFF'},{name:'Bengali',bmp:'\u0980-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09FB'},{name:'Bhaiksuki',astral:'\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC45\uDC50-\uDC6C]'},{name:'Bopomofo',bmp:'\u02EA\u02EB\u3105-\u312D\u31A0-\u31BA'},{name:'Brahmi',astral:'\uD804[\uDC00-\uDC4D\uDC52-\uDC6F\uDC7F]'},{name:'Braille',bmp:'\u2800-\u28FF'},{name:'Buginese',bmp:'\u1A00-\u1A1B\u1A1E\u1A1F'},{name:'Buhid',bmp:'\u1740-\u1753'},{name:'Canadian_Aboriginal',bmp:'\u1400-\u167F\u18B0-\u18F5'},{name:'Carian',astral:'\uD800[\uDEA0-\uDED0]'},{name:'Caucasian_Albanian',astral:'\uD801[\uDD30-\uDD63\uDD6F]'},{name:'Chakma',astral:'\uD804[\uDD00-\uDD34\uDD36-\uDD43]'},{name:'Cham',bmp:'\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA5C-\uAA5F'},{name:'Cherokee',bmp:'\u13A0-\u13F5\u13F8-\u13FD\uAB70-\uABBF'},{name:'Common',bmp:'\0-\x40\\x5B-\x60\\x7B-\xA9\xAB-\xB9\xBB-\xBF\xD7\xF7\u02B9-\u02DF\u02E5-\u02E9\u02EC-\u02FF\u0374\u037E\u0385\u0387\u0589\u0605\u060C\u061B\u061C\u061F\u0640\u06DD\u08E2\u0964\u0965\u0E3F\u0FD5-\u0FD8\u10FB\u16EB-\u16ED\u1735\u1736\u1802\u1803\u1805\u1CD3\u1CE1\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u2000-\u200B\u200E-\u2064\u2066-\u2070\u2074-\u207E\u2080-\u208E\u20A0-\u20BE\u2100-\u2125\u2127-\u2129\u212C-\u2131\u2133-\u214D\u214F-\u215F\u2189-\u218B\u2190-\u23FE\u2400-\u2426\u2440-\u244A\u2460-\u27FF\u2900-\u2B73\u2B76-\u2B95\u2B98-\u2BB9\u2BBD-\u2BC8\u2BCA-\u2BD1\u2BEC-\u2BEF\u2E00-\u2E44\u2FF0-\u2FFB\u3000-\u3004\u3006\u3008-\u3020\u3030-\u3037\u303C-\u303F\u309B\u309C\u30A0\u30FB\u30FC\u3190-\u319F\u31C0-\u31E3\u3220-\u325F\u327F-\u32CF\u3358-\u33FF\u4DC0-\u4DFF\uA700-\uA721\uA788-\uA78A\uA830-\uA839\uA92E\uA9CF\uAB5B\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE66\uFE68-\uFE6B\uFEFF\uFF01-\uFF20\uFF3B-\uFF40\uFF5B-\uFF65\uFF70\uFF9E\uFF9F\uFFE0-\uFFE6\uFFE8-\uFFEE\uFFF9-\uFFFD',astral:'\uD800[\uDD00-\uDD02\uDD07-\uDD33\uDD37-\uDD3F\uDD90-\uDD9B\uDDD0-\uDDFC\uDEE1-\uDEFB]|\uD82F[\uDCA0-\uDCA3]|\uD834[\uDC00-\uDCF5\uDD00-\uDD26\uDD29-\uDD66\uDD6A-\uDD7A\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDDE8\uDF00-\uDF56\uDF60-\uDF71]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDFCB\uDFCE-\uDFFF]|\uD83C[\uDC00-\uDC2B\uDC30-\uDC93\uDCA0-\uDCAE\uDCB1-\uDCBF\uDCC1-\uDCCF\uDCD1-\uDCF5\uDD00-\uDD0C\uDD10-\uDD2E\uDD30-\uDD6B\uDD70-\uDDAC\uDDE6-\uDDFF\uDE01\uDE02\uDE10-\uDE3B\uDE40-\uDE48\uDE50\uDE51\uDF00-\uDFFF]|\uD83D[\uDC00-\uDED2\uDEE0-\uDEEC\uDEF0-\uDEF6\uDF00-\uDF73\uDF80-\uDFD4]|\uD83E[\uDC00-\uDC0B\uDC10-\uDC47\uDC50-\uDC59\uDC60-\uDC87\uDC90-\uDCAD\uDD10-\uDD1E\uDD20-\uDD27\uDD30\uDD33-\uDD3E\uDD40-\uDD4B\uDD50-\uDD5E\uDD80-\uDD91\uDDC0]|\uDB40[\uDC01\uDC20-\uDC7F]'},{name:'Coptic',bmp:'\u03E2-\u03EF\u2C80-\u2CF3\u2CF9-\u2CFF'},{name:'Cuneiform',astral:'\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC70-\uDC74\uDC80-\uDD43]'},{name:'Cypriot',astral:'\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F]'},{name:'Cyrillic',bmp:'\u0400-\u0484\u0487-\u052F\u1C80-\u1C88\u1D2B\u1D78\u2DE0-\u2DFF\uA640-\uA69F\uFE2E\uFE2F'},{name:'Deseret',astral:'\uD801[\uDC00-\uDC4F]'},{name:'Devanagari',bmp:'\u0900-\u0950\u0953-\u0963\u0966-\u097F\uA8E0-\uA8FD'},{name:'Duployan',astral:'\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9C-\uDC9F]'},{name:'Egyptian_Hieroglyphs',astral:'\uD80C[\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]'},{name:'Elbasan',astral:'\uD801[\uDD00-\uDD27]'},{name:'Ethiopic',bmp:'\u1200-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-Line truncated
|
||||
};var replacementToken=/\$(?:{([\w$]+)}|(\d\d?|[\s\S]))/g;var correctExecNpcg=nativ.exec.call(/()??/,'')[1]===undefined;var hasFlagsProp=/x/.flags!==undefined;var toString={}.toString;function hasNativeFlag(flag){var isSupported=true;try{new RegExp('',flag);}catch(exception){isSupported=false;}
|
||||
return isSupported;}
|
||||
var hasNativeU=hasNativeFlag('u');var hasNativeY=hasNativeFlag('y');var registeredFlags={g:true,i:true,m:true,u:hasNativeU,y:hasNativeY};function augment(regex,captureNames,xSource,xFlags,isInternalOnly){var p;regex[REGEX_DATA]={captureNames:captureNames};if(isInternalOnly){return regex;}
|
||||
if(regex.__proto__){regex.__proto__=XRegExp.prototype;}else{for(p in XRegExp.prototype){regex[p]=XRegExp.prototype[p];}}
|
||||
regex[REGEX_DATA].source=xSource;regex[REGEX_DATA].flags=xFlags?xFlags.split('').sort().join(''):xFlags;return regex;}
|
||||
function clipDuplicates(str){return nativ.replace.call(str,/([\s\S])(?=[\s\S]*\1)/g,'');}
|
||||
function copyRegex(regex,options){if(!XRegExp.isRegExp(regex)){throw new TypeError('Type RegExp expected');}
|
||||
var xData=regex[REGEX_DATA]||{};var flags=getNativeFlags(regex);var flagsToAdd='';var flagsToRemove='';var xregexpSource=null;var xregexpFlags=null;options=options||{};if(options.removeG){flagsToRemove+='g';}
|
||||
if(options.removeY){flagsToRemove+='y';}
|
||||
if(flagsToRemove){flags=nativ.replace.call(flags,new RegExp('['+flagsToRemove+']+','g'),'');}
|
||||
if(options.addG){flagsToAdd+='g';}
|
||||
if(options.addY){flagsToAdd+='y';}
|
||||
if(flagsToAdd){flags=clipDuplicates(flags+flagsToAdd);}
|
||||
if(!options.isInternalOnly){if(xData.source!==undefined){xregexpSource=xData.source;}
|
||||
if(xData.flags!=null){xregexpFlags=flagsToAdd?clipDuplicates(xData.flags+flagsToAdd):xData.flags;}}
|
||||
regex=augment(new RegExp(options.source||regex.source,flags),hasNamedCapture(regex)?xData.captureNames.slice(0):null,xregexpSource,xregexpFlags,options.isInternalOnly);return regex;}
|
||||
function dec(hex){return parseInt(hex,16);}
|
||||
function getContextualTokenSeparator(match,scope,flags){if(match.input.charAt(match.index-1)==='('||match.input.charAt(match.index+match[0].length)===')'||isPatternNext(match.input,match.index+match[0].length,flags,'[?*+]|{\\d+(?:,\\d*)?}')){return'';}
|
||||
return'(?:)';}
|
||||
function getNativeFlags(regex){return hasFlagsProp?regex.flags:nativ.exec.call(/\/([a-z]*)$/i,RegExp.prototype.toString.call(regex))[1];}
|
||||
function hasNamedCapture(regex){return!!(regex[REGEX_DATA]&®ex[REGEX_DATA].captureNames);}
|
||||
function hex(dec){return parseInt(dec,10).toString(16);}
|
||||
function indexOf(array,value){var len=array.length;var i;for(i=0;i<len;++i){if(array[i]===value){return i;}}
|
||||
return-1;}
|
||||
function isPatternNext(pattern,pos,flags,needlePattern){var inlineCommentPattern='\\(\\?#[^)]*\\)';var lineCommentPattern='#[^#\\n]*';var patternsToIgnore=flags.indexOf('x')>-1?['\\s',lineCommentPattern,inlineCommentPattern]:[inlineCommentPattern];return nativ.test.call(new RegExp('^(?:'+patternsToIgnore.join('|')+')*(?:'+needlePattern+')'),pattern.slice(pos));}
|
||||
function isType(value,type){return toString.call(value)==='[object '+type+']';}
|
||||
function pad4(str){while(str.length<4){str='0'+str;}
|
||||
return str;}
|
||||
function prepareFlags(pattern,flags){var i;if(clipDuplicates(flags)!==flags){throw new SyntaxError('Invalid duplicate regex flag '+flags);}
|
||||
pattern=nativ.replace.call(pattern,/^\(\?([\w$]+)\)/,function($0,$1){if(nativ.test.call(/[gy]/,$1)){throw new SyntaxError('Cannot use flag g or y in mode modifier '+$0);}
|
||||
flags=clipDuplicates(flags+$1);return'';});for(i=0;i<flags.length;++i){if(!registeredFlags[flags.charAt(i)]){throw new SyntaxError('Unknown regex flag '+flags.charAt(i));}}
|
||||
return{pattern:pattern,flags:flags};}
|
||||
function prepareOptions(value){var options={};if(isType(value,'String')){XRegExp.forEach(value,/[^\s,]+/,function(match){options[match]=true;});return options;}
|
||||
return value;}
|
||||
function registerFlag(flag){if(!/^[\w$]$/.test(flag)){throw new Error('Flag must be a single character A-Za-z0-9_$');}
|
||||
registeredFlags[flag]=true;}
|
||||
function runTokens(pattern,flags,pos,scope,context){var i=tokens.length;var leadChar=pattern.charAt(pos);var result=null;var match;var t;while(i--){t=tokens[i];if((t.leadChar&&t.leadChar!==leadChar)||(t.scope!==scope&&t.scope!=='all')||(t.flag&&flags.indexOf(t.flag)===-1)){continue;}
|
||||
match=XRegExp.exec(pattern,t.regex,pos,'sticky');if(match){result={matchLength:match[0].length,output:t.handler.call(context,match,scope,flags),reparse:t.reparse};break;}}
|
||||
return result;}
|
||||
function setAstral(on){features.astral=on;}
|
||||
function setNatives(on){RegExp.prototype.exec=(on?fixed:nativ).exec;RegExp.prototype.test=(on?fixed:nativ).test;String.prototype.match=(on?fixed:nativ).match;String.prototype.replace=(on?fixed:nativ).replace;String.prototype.split=(on?fixed:nativ).split;features.natives=on;}
|
||||
function toObject(value){if(value==null){throw new TypeError('Cannot convert null or undefined to object');}
|
||||
return value;}
|
||||
function XRegExp(pattern,flags){if(XRegExp.isRegExp(pattern)){if(flags!==undefined){throw new TypeError('Cannot supply flags when copying a RegExp');}
|
||||
return copyRegex(pattern);}
|
||||
pattern=pattern===undefined?'':String(pattern);flags=flags===undefined?'':String(flags);if(XRegExp.isInstalled('astral')&&flags.indexOf('A')===-1){flags+='A';}
|
||||
if(!patternCache[pattern]){patternCache[pattern]={};}
|
||||
if(!patternCache[pattern][flags]){var context={hasNamedCapture:false,captureNames:[]};var scope=defaultScope;var output='';var pos=0;var result;var applied=prepareFlags(pattern,flags);var appliedPattern=applied.pattern;var appliedFlags=applied.flags;while(pos<appliedPattern.length){do{result=runTokens(appliedPattern,appliedFlags,pos,scope,context);if(result&&result.reparse){appliedPattern=appliedPattern.slice(0,pos)+
|
||||
result.output+
|
||||
appliedPattern.slice(pos+result.matchLength);}}while(result&&result.reparse);if(result){output+=result.output;pos+=(result.matchLength||1);}else{var token=XRegExp.exec(appliedPattern,nativeTokens[scope],pos,'sticky')[0];output+=token;pos+=token.length;if(token==='['&&scope===defaultScope){scope=classScope;}else if(token===']'&&scope===classScope){scope=defaultScope;}}}
|
||||
patternCache[pattern][flags]={pattern:nativ.replace.call(output,/(?:\(\?:\))+/g,'(?:)'),flags:nativ.replace.call(appliedFlags,/[^gimuy]+/g,''),captures:context.hasNamedCapture?context.captureNames:null};}
|
||||
var generated=patternCache[pattern][flags];return augment(new RegExp(generated.pattern,generated.flags),generated.captures,pattern,flags);}
|
||||
XRegExp.prototype=new RegExp();XRegExp.version='3.2.0';XRegExp._clipDuplicates=clipDuplicates;XRegExp._hasNativeFlag=hasNativeFlag;XRegExp._dec=dec;XRegExp._hex=hex;XRegExp._pad4=pad4;XRegExp.addToken=function(regex,handler,options){options=options||{};var optionalFlags=options.optionalFlags;var i;if(options.flag){registerFlag(options.flag);}
|
||||
if(optionalFlags){optionalFlags=nativ.split.call(optionalFlags,'');for(i=0;i<optionalFlags.length;++i){registerFlag(optionalFlags[i]);}}
|
||||
tokens.push({regex:copyRegex(regex,{addG:true,addY:hasNativeY,isInternalOnly:true}),handler:handler,scope:options.scope||defaultScope,flag:options.flag,reparse:options.reparse,leadChar:options.leadChar});XRegExp.cache.flush('patterns');};XRegExp.cache=function(pattern,flags){if(!regexCache[pattern]){regexCache[pattern]={};}
|
||||
return regexCache[pattern][flags]||(regexCache[pattern][flags]=XRegExp(pattern,flags));};XRegExp.cache.flush=function(cacheName){if(cacheName==='patterns'){patternCache={};}else{regexCache={};}};XRegExp.escape=function(str){return nativ.replace.call(toObject(str),/[-\[\]{}()*+?.,\\^$|#\s]/g,'\\$&');};XRegExp.exec=function(str,regex,pos,sticky){var cacheKey='g';var addY=false;var fakeY=false;var match;var r2;addY=hasNativeY&&!!(sticky||(regex.sticky&&sticky!==false));if(addY){cacheKey+='y';}else if(sticky){fakeY=true;cacheKey+='FakeY';}
|
||||
regex[REGEX_DATA]=regex[REGEX_DATA]||{};r2=regex[REGEX_DATA][cacheKey]||(regex[REGEX_DATA][cacheKey]=copyRegex(regex,{addG:true,addY:addY,source:fakeY?regex.source+'|()':undefined,removeY:sticky===false,isInternalOnly:true}));pos=pos||0;r2.lastIndex=pos;match=fixed.exec.call(r2,str);if(fakeY&&match&&match.pop()===''){match=null;}
|
||||
if(regex.global){regex.lastIndex=match?r2.lastIndex:0;}
|
||||
return match;};XRegExp.forEach=function(str,regex,callback){var pos=0;var i=-1;var match;while((match=XRegExp.exec(str,regex,pos))){callback(match,++i,str,regex);pos=match.index+(match[0].length||1);}};XRegExp.globalize=function(regex){return copyRegex(regex,{addG:true});};XRegExp.install=function(options){options=prepareOptions(options);if(!features.astral&&options.astral){setAstral(true);}
|
||||
if(!features.natives&&options.natives){setNatives(true);}};XRegExp.isInstalled=function(feature){return!!(features[feature]);};XRegExp.isRegExp=function(value){return toString.call(value)==='[object RegExp]';};XRegExp.match=function(str,regex,scope){var global=(regex.global&&scope!=='one')||scope==='all';var cacheKey=((global?'g':'')+(regex.sticky?'y':''))||'noGY';var result;var r2;regex[REGEX_DATA]=regex[REGEX_DATA]||{};r2=regex[REGEX_DATA][cacheKey]||(regex[REGEX_DATA][cacheKey]=copyRegex(regex,{addG:!!global,removeG:scope==='one',isInternalOnly:true}));result=nativ.match.call(toObject(str),r2);if(regex.global){regex.lastIndex=((scope==='one'&&result)?(result.index+result[0].length):0);}
|
||||
return global?(result||[]):(result&&result[0]);};XRegExp.matchChain=function(str,chain){return(function recurseChain(values,level){var item=chain[level].regex?chain[level]:{regex:chain[level]};var matches=[];function addMatch(match){if(item.backref){if(!(match.hasOwnProperty(item.backref)||+item.backref<match.length)){throw new ReferenceError('Backreference to undefined group: '+item.backref);}
|
||||
matches.push(match[item.backref]||'');}else{matches.push(match[0]);}}
|
||||
for(var i=0;i<values.length;++i){XRegExp.forEach(values[i],item.regex,addMatch);}
|
||||
return((level===chain.length-1)||!matches.length)?matches:recurseChain(matches,level+1);}([str],0));};XRegExp.replace=function(str,search,replacement,scope){var isRegex=XRegExp.isRegExp(search);var global=(search.global&&scope!=='one')||scope==='all';var cacheKey=((global?'g':'')+(search.sticky?'y':''))||'noGY';var s2=search;var result;if(isRegex){search[REGEX_DATA]=search[REGEX_DATA]||{};s2=search[REGEX_DATA][cacheKey]||(search[REGEX_DATA][cacheKey]=copyRegex(search,{addG:!!global,removeG:scope==='one',isInternalOnly:true}));}else if(global){s2=new RegExp(XRegExp.escape(String(search)),'g');}
|
||||
result=fixed.replace.call(toObject(str),s2,replacement);if(isRegex&&search.global){search.lastIndex=0;}
|
||||
return result;};XRegExp.replaceEach=function(str,replacements){var i;var r;for(i=0;i<replacements.length;++i){r=replacements[i];str=XRegExp.replace(str,r[0],r[1],r[2]);}
|
||||
return str;};XRegExp.split=function(str,separator,limit){return fixed.split.call(toObject(str),separator,limit);};XRegExp.test=function(str,regex,pos,sticky){return!!XRegExp.exec(str,regex,pos,sticky);};XRegExp.uninstall=function(options){options=prepareOptions(options);if(features.astral&&options.astral){setAstral(false);}
|
||||
if(features.natives&&options.natives){setNatives(false);}};XRegExp.union=function(patterns,flags,options){options=options||{};var conjunction=options.conjunction||'or';var numCaptures=0;var numPriorCaptures;var captureNames;function rewrite(match,paren,backref){var name=captureNames[numCaptures-numPriorCaptures];if(paren){++numCaptures;if(name){return'(?<'+name+'>';}}else if(backref){return'\\'+(+backref+numPriorCaptures);}
|
||||
return match;}
|
||||
if(!(isType(patterns,'Array')&&patterns.length)){throw new TypeError('Must provide a nonempty array of patterns to merge');}
|
||||
var parts=/(\()(?!\?)|\\([1-9]\d*)|\\[\s\S]|\[(?:[^\\\]]|\\[\s\S])*\]/g;var output=[];var pattern;for(var i=0;i<patterns.length;++i){pattern=patterns[i];if(XRegExp.isRegExp(pattern)){numPriorCaptures=numCaptures;captureNames=(pattern[REGEX_DATA]&&pattern[REGEX_DATA].captureNames)||[];output.push(nativ.replace.call(XRegExp(pattern.source).source,parts,rewrite));}else{output.push(XRegExp.escape(pattern));}}
|
||||
var separator=conjunction==='none'?'':'|';return XRegExp(output.join(separator),flags);};fixed.exec=function(str){var origLastIndex=this.lastIndex;var match=nativ.exec.apply(this,arguments);var name;var r2;var i;if(match){if(!correctExecNpcg&&match.length>1&&indexOf(match,'')>-1){r2=copyRegex(this,{removeG:true,isInternalOnly:true});nativ.replace.call(String(str).slice(match.index),r2,function(){var len=arguments.length;var i;for(i=1;i<len-2;++i){if(arguments[i]===undefined){match[i]=undefined;}}});}
|
||||
if(this[REGEX_DATA]&&this[REGEX_DATA].captureNames){for(i=1;i<match.length;++i){name=this[REGEX_DATA].captureNames[i-1];if(name){match[name]=match[i];}}}
|
||||
if(this.global&&!match[0].length&&(this.lastIndex>match.index)){this.lastIndex=match.index;}}
|
||||
if(!this.global){this.lastIndex=origLastIndex;}
|
||||
return match;};fixed.test=function(str){return!!fixed.exec.call(this,str);};fixed.match=function(regex){var result;if(!XRegExp.isRegExp(regex)){regex=new RegExp(regex);}else if(regex.global){result=nativ.match.apply(this,arguments);regex.lastIndex=0;return result;}
|
||||
return fixed.exec.call(regex,toObject(this));};fixed.replace=function(search,replacement){var isRegex=XRegExp.isRegExp(search);var origLastIndex;var captureNames;var result;if(isRegex){if(search[REGEX_DATA]){captureNames=search[REGEX_DATA].captureNames;}
|
||||
origLastIndex=search.lastIndex;}else{search+='';}
|
||||
if(isType(replacement,'Function')){result=nativ.replace.call(String(this),search,function(){var args=arguments;var i;if(captureNames){args[0]=new String(args[0]);for(i=0;i<captureNames.length;++i){if(captureNames[i]){args[0][captureNames[i]]=args[i+1];}}}
|
||||
if(isRegex&&search.global){search.lastIndex=args[args.length-2]+args[0].length;}
|
||||
return replacement.apply(undefined,args);});}else{result=nativ.replace.call(this==null?this:String(this),search,function(){var args=arguments;return nativ.replace.call(String(replacement),replacementToken,function($0,$1,$2){var n;if($1){n=+$1;if(n<=args.length-3){return args[n]||'';}
|
||||
n=captureNames?indexOf(captureNames,$1):-1;if(n<0){throw new SyntaxError('Backreference to undefined group '+$0);}
|
||||
return args[n+1]||'';}
|
||||
if($2==='$'){return'$';}
|
||||
if($2==='&'||+$2===0){return args[0];}
|
||||
if($2==='`'){return args[args.length-1].slice(0,args[args.length-2]);}
|
||||
if($2==="'"){return args[args.length-1].slice(args[args.length-2]+args[0].length);}
|
||||
$2=+$2;if(!isNaN($2)){if($2>args.length-3){throw new SyntaxError('Backreference to undefined group '+$0);}
|
||||
return args[$2]||'';}
|
||||
throw new SyntaxError('Invalid token '+$0);});});}
|
||||
if(isRegex){if(search.global){search.lastIndex=0;}else{search.lastIndex=origLastIndex;}}
|
||||
return result;};fixed.split=function(separator,limit){if(!XRegExp.isRegExp(separator)){return nativ.split.apply(this,arguments);}
|
||||
var str=String(this);var output=[];var origLastIndex=separator.lastIndex;var lastLastIndex=0;var lastLength;limit=(limit===undefined?-1:limit)>>>0;XRegExp.forEach(str,separator,function(match){if((match.index+match[0].length)>lastLastIndex){output.push(str.slice(lastLastIndex,match.index));if(match.length>1&&match.index<str.length){Array.prototype.push.apply(output,match.slice(1));}
|
||||
lastLength=match[0].length;lastLastIndex=match.index+lastLength;}});if(lastLastIndex===str.length){if(!nativ.test.call(separator,'')||lastLength){output.push('');}}else{output.push(str.slice(lastLastIndex));}
|
||||
separator.lastIndex=origLastIndex;return output.length>limit?output.slice(0,limit):output;};XRegExp.addToken(/\\([ABCE-RTUVXYZaeg-mopqyz]|c(?![A-Za-z])|u(?![\dA-Fa-f]{4}|{[\dA-Fa-f]+})|x(?![\dA-Fa-f]{2}))/,function(match,scope){if(match[1]==='B'&&scope===defaultScope){return match[0];}
|
||||
throw new SyntaxError('Invalid escape '+match[0]);},{scope:'all',leadChar:'\\'});XRegExp.addToken(/\\u{([\dA-Fa-f]+)}/,function(match,scope,flags){var code=dec(match[1]);if(code>0x10FFFF){throw new SyntaxError('Invalid Unicode code point '+match[0]);}
|
||||
if(code<=0xFFFF){return'\\u'+pad4(hex(code));}
|
||||
if(hasNativeU&&flags.indexOf('u')>-1){return match[0];}
|
||||
throw new SyntaxError('Cannot use Unicode code point above \\u{FFFF} without flag u');},{scope:'all',leadChar:'\\'});XRegExp.addToken(/\[(\^?)\]/,function(match){return match[1]?'[\\s\\S]':'\\b\\B';},{leadChar:'['});XRegExp.addToken(/\(\?#[^)]*\)/,getContextualTokenSeparator,{leadChar:'('});XRegExp.addToken(/\s+|#[^\n]*\n?/,getContextualTokenSeparator,{flag:'x'});XRegExp.addToken(/\./,function(){return'[\\s\\S]';},{flag:'s',leadChar:'.'});XRegExp.addToken(/\\k<([\w$]+)>/,function(match){var index=isNaN(match[1])?(indexOf(this.captureNames,match[1])+1):+match[1];var endIndex=match.index+match[0].length;if(!index||index>this.captureNames.length){throw new SyntaxError('Backreference to undefined group '+match[0]);}
|
||||
return'\\'+index+(endIndex===match.input.length||isNaN(match.input.charAt(endIndex))?'':'(?:)');},{leadChar:'\\'});XRegExp.addToken(/\\(\d+)/,function(match,scope){if(!(scope===defaultScope&&/^[1-9]/.test(match[1])&&+match[1]<=this.captureNames.length)&&match[1]!=='0'){throw new SyntaxError('Cannot use octal escape or backreference to undefined group '+
|
||||
match[0]);}
|
||||
return match[0];},{scope:'all',leadChar:'\\'});XRegExp.addToken(/\(\?P?<([\w$]+)>/,function(match){if(!isNaN(match[1])){throw new SyntaxError('Cannot use integer as capture name '+match[0]);}
|
||||
if(match[1]==='length'||match[1]==='__proto__'){throw new SyntaxError('Cannot use reserved word as capture name '+match[0]);}
|
||||
if(indexOf(this.captureNames,match[1])>-1){throw new SyntaxError('Cannot use same name for multiple groups '+match[0]);}
|
||||
this.captureNames.push(match[1]);this.hasNamedCapture=true;return'(';},{leadChar:'('});XRegExp.addToken(/\((?!\?)/,function(match,scope,flags){if(flags.indexOf('n')>-1){return'(?:';}
|
||||
this.captureNames.push(null);return'(';},{optionalFlags:'n',leadChar:'('});module.exports=XRegExp;},{}]},{},[8])(8)});;
|
||||
Reference in new issue
Block a user