mirror of https://github.com/hashicorp/consul
914 lines
123 KiB
JavaScript
914 lines
123 KiB
JavaScript
|
/*! For license information please see chunk.778.b0fb1162d11e4184d9d0.js.LICENSE.txt */
|
|||
|
(globalThis.webpackChunk_ember_auto_import_=globalThis.webpackChunk_ember_auto_import_||[]).push([[778],{9542:e=>{var t=Array.isArray
|
|||
|
e.exports=function(){if(!arguments.length)return[]
|
|||
|
var e=arguments[0]
|
|||
|
return t(e)?e:[e]}},9644:e=>{e.exports=function(e){var t=e?e.length:0
|
|||
|
return t?e[t-1]:void 0}},1609:(e,t,n)=>{var r="__lodash_hash_undefined__",i=1/0,o=9007199254740991,s="[object Arguments]",a="[object Function]",u="[object GeneratorFunction]",c="[object Symbol]",l=/^\[object .+?Constructor\]$/,f=/^(?:0|[1-9]\d*)$/,h="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,d="object"==typeof self&&self&&self.Object===Object&&self,p=h||d||Function("return this")()
|
|||
|
function g(e,t){return!(!e||!e.length)&&function(e,t,n){if(t!=t)return function(e,t,n,r){for(var i=e.length,o=-1;++o<i;)if(t(e[o],o,e))return o
|
|||
|
return-1}(e,m)
|
|||
|
for(var r=-1,i=e.length;++r<i;)if(e[r]===t)return r
|
|||
|
return-1}(e,t)>-1}function v(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n]
|
|||
|
return e}function m(e){return e!=e}function y(e,t){return e.has(t)}function b(e,t){return function(n){return e(t(n))}}var w,x=Array.prototype,k=Function.prototype,E=Object.prototype,_=p["__core-js_shared__"],S=(w=/[^.]+$/.exec(_&&_.keys&&_.keys.IE_PROTO||""))?"Symbol(src)_1."+w:"",C=k.toString,T=E.hasOwnProperty,j=E.toString,N=RegExp("^"+C.call(T).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),M=p.Symbol,O=b(Object.getPrototypeOf,Object),q=E.propertyIsEnumerable,A=x.splice,R=M?M.isConcatSpreadable:void 0,I=Object.getOwnPropertySymbols,F=Math.max,P=G(p,"Map"),D=G(Object,"create")
|
|||
|
function L(e){var t=-1,n=e?e.length:0
|
|||
|
for(this.clear();++t<n;){var r=e[t]
|
|||
|
this.set(r[0],r[1])}}function B(e){var t=-1,n=e?e.length:0
|
|||
|
for(this.clear();++t<n;){var r=e[t]
|
|||
|
this.set(r[0],r[1])}}function U(e){var t=-1,n=e?e.length:0
|
|||
|
for(this.clear();++t<n;){var r=e[t]
|
|||
|
this.set(r[0],r[1])}}function H(e){var t=-1,n=e?e.length:0
|
|||
|
for(this.__data__=new U;++t<n;)this.add(e[t])}function z(e,t){for(var n,r,i=e.length;i--;)if((n=e[i][0])===(r=t)||n!=n&&r!=r)return i
|
|||
|
return-1}function $(e,t,n,r,i){var o=-1,s=e.length
|
|||
|
for(n||(n=V),i||(i=[]);++o<s;){var a=e[o]
|
|||
|
t>0&&n(a)?t>1?$(a,t-1,n,r,i):v(i,a):r||(i[i.length]=a)}return i}function Q(e,t){var n,r,i=e.__data__
|
|||
|
return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?i["string"==typeof t?"string":"hash"]:i.map}function G(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t)
|
|||
|
return function(e){if(!ne(e)||S&&S in e)return!1
|
|||
|
var t=te(e)||function(e){var t=!1
|
|||
|
if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}(e)?N:l
|
|||
|
return t.test(function(e){if(null!=e){try{return C.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(e))}(n)?n:void 0}L.prototype.clear=function(){this.__data__=D?D(null):{}},L.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},L.prototype.get=function(e){var t=this.__data__
|
|||
|
if(D){var n=t[e]
|
|||
|
return n===r?void 0:n}return T.call(t,e)?t[e]:void 0},L.prototype.has=function(e){var t=this.__data__
|
|||
|
return D?void 0!==t[e]:T.call(t,e)},L.prototype.set=function(e,t){return this.__data__[e]=D&&void 0===t?r:t,this},B.prototype.clear=function(){this.__data__=[]},B.prototype.delete=function(e){var t=this.__data__,n=z(t,e)
|
|||
|
return!(n<0||(n==t.length-1?t.pop():A.call(t,n,1),0))},B.prototype.get=function(e){var t=this.__data__,n=z(t,e)
|
|||
|
return n<0?void 0:t[n][1]},B.prototype.has=function(e){return z(this.__data__,e)>-1},B.prototype.set=function(e,t){var n=this.__data__,r=z(n,e)
|
|||
|
return r<0?n.push([e,t]):n[r][1]=t,this},U.prototype.clear=function(){this.__data__={hash:new L,map:new(P||B),string:new L}},U.prototype.delete=function(e){return Q(this,e).delete(e)},U.prototype.get=function(e){return Q(this,e).get(e)},U.prototype.has=function(e){return Q(this,e).has(e)},U.prototype.set=function(e,t){return Q(this,e).set(e,t),this},H.prototype.add=H.prototype.push=function(e){return this.__data__.set(e,r),this},H.prototype.has=function(e){return this.__data__.has(e)}
|
|||
|
var Y=I?b(I,Object):ue,W=I?function(e){for(var t=[];e;)v(t,Y(e)),e=O(e)
|
|||
|
return t}:ue
|
|||
|
function V(e){return K(e)||Z(e)||!!(R&&e&&e[R])}function J(e,t){return!!(t=null==t?o:t)&&("number"==typeof e||f.test(e))&&e>-1&&e%1==0&&e<t}function X(e){if("string"==typeof e||function(e){return"symbol"==typeof e||re(e)&&j.call(e)==c}(e))return e
|
|||
|
var t=e+""
|
|||
|
return"0"==t&&1/e==-i?"-0":t}function Z(e){return function(e){return re(e)&&ee(e)}(e)&&T.call(e,"callee")&&(!q.call(e,"callee")||j.call(e)==s)}var K=Array.isArray
|
|||
|
function ee(e){return null!=e&&function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=o}(e.length)&&!te(e)}function te(e){var t=ne(e)?j.call(e):""
|
|||
|
return t==a||t==u}function ne(e){var t=typeof e
|
|||
|
return!!e&&("object"==t||"function"==t)}function re(e){return!!e&&"object"==typeof e}function ie(e){return ee(e)?function(e,t){var n=K(e)||Z(e)?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n)
|
|||
|
return r}(e.length,String):[],r=n.length,i=!!r
|
|||
|
for(var o in e)i&&("length"==o||J(o,r))||n.push(o)
|
|||
|
return n}(e):function(e){if(!ne(e))return function(e){var t=[]
|
|||
|
if(null!=e)for(var n in Object(e))t.push(n)
|
|||
|
return t}(e)
|
|||
|
var t,n,r=(n=(t=e)&&t.constructor,t===("function"==typeof n&&n.prototype||E)),i=[]
|
|||
|
for(var o in e)("constructor"!=o||!r&&T.call(e,o))&&i.push(o)
|
|||
|
return i}(e)}var oe,se,ae=(oe=function(e,t){return null==e?{}:(t=function(e,t){for(var n=-1,r=e?e.length:0,i=Array(r);++n<r;)i[n]=t(e[n],n,e)
|
|||
|
return i}($(t,1),X),function(e,t){return function(e,t,n){for(var r=-1,i=t.length,o={};++r<i;){var s=t[r],a=e[s]
|
|||
|
n(0,s)&&(o[s]=a)}return o}(e=Object(e),t,(function(t,n){return n in e}))}(e,function(e,t,n,r){var i=-1,o=g,s=!0,a=e.length,u=[],c=t.length
|
|||
|
if(!a)return u
|
|||
|
t.length>=200&&(o=y,s=!1,t=new H(t))
|
|||
|
e:for(;++i<a;){var l=e[i],f=l
|
|||
|
if(l=0!==l?l:0,s&&f==f){for(var h=c;h--;)if(t[h]===f)continue e
|
|||
|
u.push(l)}else o(t,f,undefined)||u.push(l)}return u}(function(e){return function(e,t,n){var r=t(e)
|
|||
|
return K(e)?r:v(r,n(e))}(e,ie,W)}(e),t)))},se=F(void 0===se?oe.length-1:se,0),function(){for(var e=arguments,t=-1,n=F(e.length-se,0),r=Array(n);++t<n;)r[t]=e[se+t]
|
|||
|
t=-1
|
|||
|
for(var i=Array(se+1);++t<se;)i[t]=e[t]
|
|||
|
return i[se]=r,function(e,t,n){switch(n.length){case 0:return e.call(t)
|
|||
|
case 1:return e.call(t,n[0])
|
|||
|
case 2:return e.call(t,n[0],n[1])
|
|||
|
case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}(oe,this,i)})
|
|||
|
function ue(){return[]}e.exports=ae},2053:(e,t,n)=>{var r
|
|||
|
e=n.nmd(e),function(){"use strict"
|
|||
|
function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){for(var n=0;n<t.length;n++){var r=t[n]
|
|||
|
r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function a(e,t,n){return t&&s(e.prototype,t),n&&s(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function u(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]
|
|||
|
if(null!=n){var r,i,o=[],s=!0,a=!1
|
|||
|
try{for(n=n.call(e);!(s=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);s=!0);}catch(e){a=!0,i=e}finally{try{s||null==n.return||n.return()}finally{if(a)throw i}}return o}}(e,t)||l(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function c(e){return function(e){if(Array.isArray(e))return f(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||l(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function l(e,t){if(e){if("string"==typeof e)return f(e,t)
|
|||
|
var n=Object.prototype.toString.call(e).slice(8,-1)
|
|||
|
return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?f(e,t):void 0}}function f(e,t){(null==t||t>e.length)&&(t=e.length)
|
|||
|
for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n]
|
|||
|
return r}var h=function(){if("undefined"!=typeof globalThis)return globalThis
|
|||
|
if("undefined"!=typeof self)return self
|
|||
|
if(void 0!==d)return d
|
|||
|
if(void 0!==n.g)return n.g
|
|||
|
throw new Error("Unable to locate global object")}(),d=h.window,p=h.console,g=h.setTimeout,v=h.clearTimeout,m=d&&d.document,y=d&&d.navigator,b=function(){var e="qunit-test-string"
|
|||
|
try{return h.sessionStorage.setItem(e,e),h.sessionStorage.removeItem(e),h.sessionStorage}catch(e){return}}(),w="function"==typeof h.Map&&"function"==typeof h.Map.prototype.keys&&"function"==typeof h.Symbol&&"symbol"===i(h.Symbol.iterator)?h.Map:function(e){var t=this,n=Object.create(null),r=Object.prototype.hasOwnProperty
|
|||
|
this.has=function(e){return r.call(n,e)},this.get=function(e){return n[e]},this.set=function(e,t){return r.call(n,e)||this.size++,n[e]=t,this},this.delete=function(e){r.call(n,e)&&(delete n[e],this.size--)},this.forEach=function(e){for(var t in n)e(n[t],t)},this.keys=function(){return Object.keys(n)},this.clear=function(){n=Object.create(null),this.size=0},this.size=0,e&&e.forEach((function(e,n){t.set(n,e)}))},x="function"==typeof h.Set&&"function"==typeof h.Set.prototype.values?h.Set:function(e){var t=Object.create(null)
|
|||
|
return Array.isArray(e)&&e.forEach((function(e){t[e]=!0})),{add:function(e){t[e]=!0},has:function(e){return e in t},get size(){return Object.keys(t).length}}},k={warn:p?Function.prototype.bind.call(p.warn||p.log,p):function(){}},E=Object.prototype.toString,_=Object.prototype.hasOwnProperty,S=d&&void 0!==d.performance&&"function"==typeof d.performance.mark&&"function"==typeof d.performance.measure?d.performance:void 0,C={now:S?S.now.bind(S):Date.now,measure:S?function(e,t,n){try{S.measure(e,t,n)}catch(e){k.warn("performance.measure could not be executed because of ",e.message)}}:function(){},mark:S?S.mark.bind(S):function(){}}
|
|||
|
function T(e,t){return e.filter((function(e){return-1===t.indexOf(e)}))}function j(e,t){return-1!==t.indexOf(e)}function N(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=t&&A("array",e)?[]:{}
|
|||
|
for(var r in e)if(_.call(e,r)){var i=e[r]
|
|||
|
n[r]=i===Object(i)?N(i,t):i}return n}function M(e,t){if(e!==Object(e))return e
|
|||
|
var n={}
|
|||
|
for(var r in t)_.call(t,r)&&_.call(e,r)&&(n[r]=M(e[r],t[r]))
|
|||
|
return n}function O(e,t,n){for(var r in t)_.call(t,r)&&(void 0===t[r]?delete e[r]:n&&void 0!==e[r]||(e[r]=t[r]))
|
|||
|
return e}function q(e){if(void 0===e)return"undefined"
|
|||
|
if(null===e)return"null"
|
|||
|
var t=E.call(e).match(/^\[object\s(.*)\]$/),n=t&&t[1]
|
|||
|
switch(n){case"Number":return isNaN(e)?"nan":"number"
|
|||
|
case"String":case"Boolean":case"Array":case"Set":case"Map":case"Date":case"RegExp":case"Function":case"Symbol":return n.toLowerCase()
|
|||
|
default:return i(e)}}function A(e,t){return q(t)===e}function R(e,t){for(var n=e+""+t,r=0,i=0;i<n.length;i++)r=(r<<5)-r+n.charCodeAt(i),r|=0
|
|||
|
var o=(4294967296+r).toString(16)
|
|||
|
return o.length<8&&(o="0000000"+o),o.slice(-8)}function I(e){var t=String(e)
|
|||
|
return"[object"===t.slice(0,7)?(e.name||"Error")+(e.message?": ".concat(e.message):""):t}var F=new x(["boolean","number","string"]),P=[]
|
|||
|
function D(e,t){return e===t}function L(e,t){return e===t||e.valueOf()===t.valueOf()}function B(e){var t=Object.getPrototypeOf(e)
|
|||
|
return t&&null!==t.constructor?e.constructor:Object}function U(e){return"flags"in e?e.flags:e.toString().match(/[gimuy]*$/)[0]}var H={undefined:D,null:D,boolean:L,number:function(e,t){return e===t||e.valueOf()===t.valueOf()||isNaN(e.valueOf())&&isNaN(t.valueOf())},string:L,symbol:D,date:L,nan:function(){return!0},regexp:function(e,t){return e.source===t.source&&U(e)===U(t)},function:D,array:function(e,t){if(e.length!==t.length)return!1
|
|||
|
for(var n=0;n<e.length;n++)if(!$(e[n],t[n]))return!1
|
|||
|
return!0},set:function(e,t){if(e.size!==t.size)return!1
|
|||
|
var n=!0
|
|||
|
return e.forEach((function(e){if(n){var r=!1
|
|||
|
t.forEach((function(t){if(!r){var n=P
|
|||
|
P=[],$(t,e)&&(r=!0),P=n}})),r||(n=!1)}})),n},map:function(e,t){if(e.size!==t.size)return!1
|
|||
|
var n=!0
|
|||
|
return e.forEach((function(e,r){if(n){var i=!1
|
|||
|
t.forEach((function(t,n){if(!i){var o=P
|
|||
|
P=[],H.array([t,n],[e,r])&&(i=!0),P=o}})),i||(n=!1)}})),n}},z={undefined:D,null:D,boolean:D,number:function(e,t){return e===t||isNaN(e)&&isNaN(t)},string:D,symbol:D,function:D,object:function(e,t){if(P.some((function(n){return n.a===e&&n.b===t})))return!0
|
|||
|
P.push({a:e,b:t})
|
|||
|
var n=q(e),r=q(t)
|
|||
|
if("object"!==n||"object"!==r)return n===r&&H[n](e,t)
|
|||
|
if(!1===function(e,t){return B(e)===B(t)}(e,t))return!1
|
|||
|
var i=[],o=[]
|
|||
|
for(var s in e)if(i.push(s),(e.constructor===Object||void 0===e.constructor||"function"!=typeof e[s]||"function"!=typeof t[s]||e[s].toString()!==t[s].toString())&&!$(e[s],t[s]))return!1
|
|||
|
for(var a in t)o.push(a)
|
|||
|
return H.array(i.sort(),o.sort())}}
|
|||
|
function $(e,t){if(e===t)return!0
|
|||
|
var n=i(e),r=i(t)
|
|||
|
return n!==r?("object"===n&&F.has(q(e))?e.valueOf():e)===("object"===r&&F.has(q(t))?t.valueOf():t):z[n](e,t)}function Q(e,t){var n=$(e,t)
|
|||
|
return P=[],n}function G(e,t){if(2===arguments.length)return e===t||Q(e,t)
|
|||
|
for(var n=arguments.length-1;n>0;){if(!Q(arguments[n-1],arguments[n]))return!1
|
|||
|
n--}return!0}var Y={altertitle:!0,collapse:!0,failOnZeroTests:!0,filter:void 0,maxDepth:5,module:void 0,moduleId:void 0,reorder:!0,requireExpects:!1,scrolltop:!0,storage:b,testId:void 0,urlConfig:[],currentModule:{name:"",tests:[],childModules:[],testsRun:0,testsIgnored:0,hooks:{before:[],beforeEach:[],afterEach:[],after:[]}},globalHooks:{},blocking:!0,callbacks:{},modules:[],queue:[],stats:{all:0,bad:0,testCount:0}},W=h&&h.QUnit&&!h.QUnit.version&&h.QUnit.config
|
|||
|
W&&O(Y,W),Y.modules.push(Y.currentModule)
|
|||
|
var V=function(){function e(e){return'"'+e.toString().replace(/\\/g,"\\\\").replace(/"/g,'\\"')+'"'}function t(e){return e+""}function n(e,t,n){var r=s.separator(),i=s.indent(1)
|
|||
|
return t.join&&(t=t.join(","+r+i)),t?[e,i+t,s.indent()+n].join(r):e+n}function r(e,t){if(s.maxDepth&&s.depth>s.maxDepth)return"[object Array]"
|
|||
|
this.up()
|
|||
|
for(var r=e.length,i=new Array(r);r--;)i[r]=this.parse(e[r],void 0,t)
|
|||
|
return this.down(),n("[",i,"]")}var o=/^function (\w+)/,s={parse:function(e,t,n){var r=(n=n||[]).indexOf(e)
|
|||
|
if(-1!==r)return"recursion(".concat(r-n.length,")")
|
|||
|
t=t||this.typeOf(e)
|
|||
|
var o=this.parsers[t],s=i(o)
|
|||
|
if("function"===s){n.push(e)
|
|||
|
var a=o.call(this,e,n)
|
|||
|
return n.pop(),a}return"string"===s?o:"[ERROR: Missing QUnit.dump formatter for type "+t+"]"},typeOf:function(e){var t
|
|||
|
return t=null===e?"null":void 0===e?"undefined":A("regexp",e)?"regexp":A("date",e)?"date":A("function",e)?"function":void 0!==e.setInterval&&void 0!==e.document&&void 0===e.nodeType?"window":9===e.nodeType?"document":e.nodeType?"node":function(e){return"[object Array]"===E.call(e)||"number"==typeof e.length&&void 0!==e.item&&(e.length?e.item(0)===e[0]:null===e.item(0)&&void 0===e[0])}(e)?"array":e.constructor===Error.prototype.constructor?"error":i(e),t},separator:function(){return this.multiline?this.HTML?"<br />":"\n":this.HTML?" ":" "},indent:function(e){if(!this.multiline)return""
|
|||
|
var t=this.indentChar
|
|||
|
return this.HTML&&(t=t.replace(/\t/g," ").replace(/ /g," ")),new Array(this.depth+(e||0)).join(t)},up:function(e){this.depth+=e||1},down:function(e){this.depth-=e||1},setParser:function(e,t){this.parsers[e]=t},quote:e,literal:t,join:n,depth:1,maxDepth:Y.maxDepth,parsers:{window:"[Window]",document:"[Document]",error:function(e){return'Error("'+e.message+'")'},unknown:"[Unknown]",null:"null",undefined:"undefined",function:function(e){var t="function",r="name"in e?e.name:(o.exec(e)||[])[1]
|
|||
|
return r&&(t+=" "+r),n(t=[t+="(",s.parse(e,"functionArgs"),"){"].join(""),s.parse(e,"functionCode"),"}")},array:r,nodelist:r,arguments:r,object:function(e,t){var r=[]
|
|||
|
if(s.maxDepth&&s.depth>s.maxDepth)return"[object Object]"
|
|||
|
s.up()
|
|||
|
var i=[]
|
|||
|
for(var o in e)i.push(o)
|
|||
|
var a=["message","name"]
|
|||
|
for(var u in a){var c=a[u]
|
|||
|
c in e&&!j(c,i)&&i.push(c)}i.sort()
|
|||
|
for(var l=0;l<i.length;l++){var f=i[l],h=e[f]
|
|||
|
r.push(s.parse(f,"key")+": "+s.parse(h,void 0,t))}return s.down(),n("{",r,"}")},node:function(e){var t=s.HTML?"<":"<",n=s.HTML?">":">",r=e.nodeName.toLowerCase(),i=t+r,o=e.attributes
|
|||
|
if(o)for(var a=0;a<o.length;a++){var u=o[a].nodeValue
|
|||
|
u&&"inherit"!==u&&(i+=" "+o[a].nodeName+"="+s.parse(u,"attribute"))}return i+=n,3!==e.nodeType&&4!==e.nodeType||(i+=e.nodeValue),i+t+"/"+r+n},functionArgs:function(e){var t=e.length
|
|||
|
if(!t)return""
|
|||
|
for(var n=new Array(t);t--;)n[t]=String.fromCharCode(97+t)
|
|||
|
return" "+n.join(", ")+" "},key:e,functionCode:"[code]",attribute:e,string:e,date:e,regexp:t,number:t,boolean:t,symbol:function(e){return e.toString()}},HTML:!1,indentChar:" ",multiline:!0}
|
|||
|
return s}(),J=function(){function e(t,n){o(this,e),this.name=t,this.fullName=n?n.fullName.concat(t):[],this.globalFailureCount=0,this.tests=[],this.childSuites=[],n&&n.pushChildSuite(this)}return a(e,[{key:"start",value:function(e){if(e){this._startTime=C.now()
|
|||
|
var t=this.fullName.length
|
|||
|
C.mark("qunit_suite_".concat(t,"_start"))}return{name:this.name,fullName:this.fullName.slice(),tests:this.tests.map((function(e){return e.start()})),childSuites:this.childSuites.map((function(e){return e.start()})),testCounts:{total:this.getTestCounts().total}}}},{key:"end",value:function(e){if(e){this._endTime=C.now()
|
|||
|
var t=this.fullName.length,n=this.fullName.join(" – ")
|
|||
|
C.mark("qunit_suite_".concat(t,"_end")),C.measure(0===t?"QUnit Test Run":"QUnit Test Suite: ".concat(n),"qunit_suite_".concat(t,"_start"),"qunit_suite_".concat(t,"_end"))}return{name:this.name,fullName:this.fullName.slice(),tests:this.tests.map((function(e){return e.end()})),childSuites:this.childSuites.map((function(e){return e.end()})),testCounts:this.getTestCounts(),runtime:this.getRuntime(),status:this.getStatus()}}},{key:"pushChildSuite",value:function(e){this.childSuites.push(e)}},{key:"pushTest",value:function(e){this.tests.push(e)}},{key:"getRuntime",value:function(){return Math.round(this._endTime-this._startTime)}},{key:"getTestCounts",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{passed:0,failed:0,skipped:0,todo:0,total:0}
|
|||
|
return e.failed+=this.globalFailureCount,e.total+=this.globalFailureCount,e=this.tests.reduce((function(e,t){return t.valid&&(e[t.getStatus()]++,e.total++),e}),e),this.childSuites.reduce((function(e,t){return t.getTestCounts(e)}),e)}},{key:"getStatus",value:function(){var e=this.getTestCounts(),t=e.total,n=e.failed,r=e.skipped,i=e.todo
|
|||
|
return n?"failed":r===t?"skipped":i===t?"todo":"passed"}}]),e}(),X=[],Z=new J
|
|||
|
function K(e,t,n){var r=t[n]
|
|||
|
"function"==typeof r&&e[n].push(r),delete t[n]}function ee(e,t){return function(n){Y.currentModule!==e&&k.warn("The `"+t+"` hook was called inside the wrong module (`"+Y.currentModule.name+"`). Instead, use hooks provided by the callback to the containing module (`"+e.name+"`). This will become an error in QUnit 3.0."),e.hooks[t].push(n)}}function te(e,t,n){"function"==typeof t&&(n=t,t=void 0)
|
|||
|
var r=function(e,t,n){var r=X.length?X.slice(-1)[0]:null,i=null!==r?[r.name,e].join(" > "):e,o=r?r.suiteReport:Z,s=null!==r&&r.skip||n.skip,a=null!==r&&r.todo||n.todo,u={}
|
|||
|
r&&O(u,r.testEnvironment),O(u,t)
|
|||
|
var c={name:i,parentModule:r,hooks:{before:[],beforeEach:[],afterEach:[],after:[]},testEnvironment:u,tests:[],moduleId:R(i),testsRun:0,testsIgnored:0,childModules:[],suiteReport:new J(e,o),stats:null,skip:s,todo:!s&&a,ignored:n.ignored||!1}
|
|||
|
return r&&r.childModules.push(c),Y.modules.push(c),c}(e,t,arguments.length>3&&void 0!==arguments[3]?arguments[3]:{}),i=r.testEnvironment,o=r.hooks
|
|||
|
K(o,i,"before"),K(o,i,"beforeEach"),K(o,i,"afterEach"),K(o,i,"after")
|
|||
|
var s={before:ee(r,"before"),beforeEach:ee(r,"beforeEach"),afterEach:ee(r,"afterEach"),after:ee(r,"after")},a=Y.currentModule
|
|||
|
if(Y.currentModule=r,"function"==typeof n){X.push(r)
|
|||
|
try{var u=n.call(r.testEnvironment,s)
|
|||
|
u&&"function"==typeof u.then&&k.warn("Returning a promise from a module callback is not supported. Instead, use hooks for async behavior. This will become an error in QUnit 3.0.")}finally{X.pop(),Y.currentModule=r.parentModule||a}}}var ne=!1
|
|||
|
function re(e,t,n){var r,i=ne&&(r=Y.modules.filter((function(e){return!e.ignored})).map((function(e){return e.moduleId})),!X.some((function(e){return r.includes(e.moduleId)})))
|
|||
|
te(e,t,n,{ignored:i})}re.only=function(){ne||(Y.modules.length=0,Y.queue.length=0,Y.currentModule.ignored=!0),ne=!0,te.apply(void 0,arguments)},re.skip=function(e,t,n){ne||te(e,t,n,{skip:!0})},re.todo=function(e,t,n){ne||te(e,t,n,{todo:!0})}
|
|||
|
var ie=(se(0)||"").replace(/(:\d+)+\)?/,"").replace(/.+[/\\]/,"")
|
|||
|
function oe(e,t){if(t=void 0===t?4:t,e&&e.stack){var n=e.stack.split("\n")
|
|||
|
if(/^error$/i.test(n[0])&&n.shift(),ie){for(var r=[],i=t;i<n.length&&-1===n[i].indexOf(ie);i++)r.push(n[i])
|
|||
|
if(r.length)return r.join("\n")}return n[t]}}function se(e){var t=new Error
|
|||
|
if(!t.stack)try{throw t}catch(e){t=e}return oe(t,e)}var ae=function(){function e(t){o(this,e),this.test=t}return a(e,[{key:"timeout",value:function(e){if("number"!=typeof e)throw new Error("You must pass a number as the duration to assert.timeout")
|
|||
|
this.test.timeout=e,Y.timeout&&(v(Y.timeout),Y.timeout=null,Y.timeoutHandler&&this.test.timeout>0&&this.test.internalResetTimeout(this.test.timeout))}},{key:"step",value:function(e){var t=e,n=!!e
|
|||
|
this.test.steps.push(e),void 0===e||""===e?t="You must provide a message to assert.step":"string"!=typeof e&&(t="You must provide a string value to assert.step",n=!1),this.pushResult({result:n,message:t})}},{key:"verifySteps",value:function(e,t){var n=this.test.steps.slice()
|
|||
|
this.deepEqual(n,e,t),this.test.steps.length=0}},{key:"expect",value:function(e){if(1!==arguments.length)return this.test.expected
|
|||
|
this.test.expected=e}},{key:"async",value:function(e){var t=void 0===e?1:e
|
|||
|
return this.test.internalStop(t)}},{key:"push",value:function(t,n,r,i,o){return k.warn("assert.push is deprecated and will be removed in QUnit 3.0. Please use assert.pushResult instead (https://api.qunitjs.com/assert/pushResult)."),(this instanceof e?this:Y.current.assert).pushResult({result:t,actual:n,expected:r,message:i,negative:o})}},{key:"pushResult",value:function(t){var n=this,r=n instanceof e&&n.test||Y.current
|
|||
|
if(!r)throw new Error("assertion outside test context, in "+se(2))
|
|||
|
return n instanceof e||(n=r.assert),n.test.pushResult(t)}},{key:"ok",value:function(e,t){t||(t=e?"okay":"failed, expected argument to be truthy, was: ".concat(V.parse(e))),this.pushResult({result:!!e,actual:e,expected:!0,message:t})}},{key:"notOk",value:function(e,t){t||(t=e?"failed, expected argument to be falsy, was: ".concat(V.parse(e)):"okay"),this.pushResult({result:!e,actual:e,expected:!1,message:t})}},{key:"true",value:function(e,t){this.pushResult({result:!0===e,actual:e,expected:!0,message:t})}},{key:"false",value:function(e,t){this.pushResult({result:!1===e,actual:e,expected:!1,message:t})}},{key:"equal",value:function(e,t,n){this.pushResult({result:t==e,actual:e,expected:t,message:n})}},{key:"notEqual",value:function(e,t,n){this.pushResult({result:t!=e,actual:e,expected:t,message:n,negative:!0})}},{key:"propEqual",value:function(e,t,n){e=N(e),t=N(t),this.pushResult({result:G(e,t),actual:e,expected:t,message:n})}},{key:"notPropEqual",value:function(e,t,n){e=N(e),t=N(t),this.pushResult({result:!G(e,t),actual:e,expected:t,message:n,negative:!0})}},{key:"propContains",value:function(e,t,n){e=M(e,t),t=N(t,!1),this.pushResult({result:G(e,t),actual:e,expected:t,message:n})}},{key:"notPropContains",value:function(e,t,n){e=M(e,t),t=N(t),this.pushResult({result:!G(e,t),actual:e,expected:t,message:n,negative:!0})}},{key:"deepEqual",value:function(e,t,n){this.pushResult({result:G(e,t),actual:e,expected:t,message:n})}},{key:"notDeepEqual",value:function(e,t,n){this.pushResult({result:!G(e,t),actual:e,expected:t,message:n,negative:!0})}},{key:"strictEqual",value:function(e,t,n){this.pushResult({result:t===e,actual:e,expected:t,message:n})}},{key:"notStrictEqual",value:function(e,t,n){this.pushResult({result:t!==e,actual:e,expected:t,message:n,negative:!0})}},{key:"throws",value:function(t,n,r){var i=u(ue(n,r,"throws"),2)
|
|||
|
n=i[0],r=i[1]
|
|||
|
var o=this instanceof e&&this.test||Y.current
|
|||
|
if("function"==typeof t){var s,a=!1
|
|||
|
o.ignoreGlobalErrors=!0
|
|||
|
try{t.call(o.testEnvironment)}catch(e){s=e}if(o.ignoreGlobalErrors=!1,s){var c=u(ce(s,n,r),3)
|
|||
|
a=c[0],n=c[1],r=c[2]}o.assert.pushResult({result:a,actual:s&&I(s),expected:n,message:r})}else o.assert.pushResult({result:!1,actual:t,message:'The value provided to `assert.throws` in "'+o.testName+'" was not a function.'})}},{key:"rejects",value:function(t,n,r){var i=u(ue(n,r,"rejects"),2)
|
|||
|
n=i[0],r=i[1]
|
|||
|
var o=this instanceof e&&this.test||Y.current,s=t&&t.then
|
|||
|
if("function"==typeof s){var a=this.async()
|
|||
|
return s.call(t,(function(){o.assert.pushResult({result:!1,message:'The promise returned by the `assert.rejects` callback in "'+o.testName+'" did not reject.',actual:t}),a()}),(function(e){var t,i=u(ce(e,n,r),3)
|
|||
|
t=i[0],n=i[1],r=i[2],o.assert.pushResult({result:t,actual:e&&I(e),expected:n,message:r}),a()}))}o.assert.pushResult({result:!1,message:'The value provided to `assert.rejects` in "'+o.testName+'" was not a promise.',actual:t})}}]),e}()
|
|||
|
function ue(e,t,n){var r=q(e)
|
|||
|
if("string"===r){if(void 0===t)return t=e,[e=void 0,t]
|
|||
|
throw new Error("assert."+n+" does not accept a string value for the expected argument.\nUse a non-string object value (e.g. RegExp or validator function) instead if necessary.")}if(e&&"regexp"!==r&&"function"!==r&&"object"!==r)throw new Error("Invalid expected value type ("+r+") provided to assert."+n+".")
|
|||
|
return[e,t]}function ce(e,t,n){var r=!1,i=q(t)
|
|||
|
if(t){if("regexp"===i)r=t.test(I(e)),t=String(t)
|
|||
|
else if("function"===i&&void 0!==t.prototype&&e instanceof t)r=!0
|
|||
|
else if("object"===i)r=e instanceof t.constructor&&e.name===t.name&&e.message===t.message,t=I(t)
|
|||
|
else if("function"===i)try{r=!0===t.call({},e),t=null}catch(e){t=I(e)}}else r=!0
|
|||
|
return[r,t,n]}ae.prototype.raises=ae.prototype.throws
|
|||
|
var le=Object.create(null),fe=["error","runStart","suiteStart","testStart","assertion","testEnd","suiteEnd","runEnd"]
|
|||
|
function he(e,t){if("string"!=typeof e)throw new TypeError("eventName must be a string when emitting an event")
|
|||
|
for(var n=le[e],r=n?c(n):[],i=0;i<r.length;i++)r[i](t)}var de="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==n.g?n.g:"undefined"!=typeof self?self:{}
|
|||
|
function pe(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var ge={exports:{}}
|
|||
|
!function(){var e=function(){if("undefined"!=typeof globalThis)return globalThis
|
|||
|
if("undefined"!=typeof self)return self
|
|||
|
if("undefined"!=typeof window)return window
|
|||
|
if(void 0!==de)return de
|
|||
|
throw new Error("unable to locate global object")}()
|
|||
|
if("function"!=typeof e.Promise){var t=setTimeout
|
|||
|
o.prototype.catch=function(e){return this.then(null,e)},o.prototype.then=function(e,t){var n=new this.constructor(r)
|
|||
|
return s(this,new l(e,t,n)),n},o.prototype.finally=function(e){var t=this.constructor
|
|||
|
return this.then((function(n){return t.resolve(e()).then((function(){return n}))}),(function(n){return t.resolve(e()).then((function(){return t.reject(n)}))}))},o.all=function(e){return new o((function(t,r){if(!n(e))return r(new TypeError("Promise.all accepts an array"))
|
|||
|
var o=Array.prototype.slice.call(e)
|
|||
|
if(0===o.length)return t([])
|
|||
|
var s=o.length
|
|||
|
function a(e,n){try{if(n&&("object"===i(n)||"function"==typeof n)){var u=n.then
|
|||
|
if("function"==typeof u)return void u.call(n,(function(t){a(e,t)}),r)}o[e]=n,0==--s&&t(o)}catch(e){r(e)}}for(var u=0;u<o.length;u++)a(u,o[u])}))},o.allSettled=function(e){return new this((function(t,n){if(!e||void 0===e.length)return n(new TypeError(i(e)+" "+e+" is not iterable(cannot read property Symbol(Symbol.iterator))"))
|
|||
|
var r=Array.prototype.slice.call(e)
|
|||
|
if(0===r.length)return t([])
|
|||
|
var o=r.length
|
|||
|
function s(e,n){if(n&&("object"===i(n)||"function"==typeof n)){var a=n.then
|
|||
|
if("function"==typeof a)return void a.call(n,(function(t){s(e,t)}),(function(n){r[e]={status:"rejected",reason:n},0==--o&&t(r)}))}r[e]={status:"fulfilled",value:n},0==--o&&t(r)}for(var a=0;a<r.length;a++)s(a,r[a])}))},o.resolve=function(e){return e&&"object"===i(e)&&e.constructor===o?e:new o((function(t){t(e)}))},o.reject=function(e){return new o((function(t,n){n(e)}))},o.race=function(e){return new o((function(t,r){if(!n(e))return r(new TypeError("Promise.race accepts an array"))
|
|||
|
for(var i=0,s=e.length;i<s;i++)o.resolve(e[i]).then(t,r)}))},o._immediateFn="function"==typeof setImmediate&&function(e){setImmediate(e)}||function(e){t(e,0)},o._unhandledRejectionFn=function(e){"undefined"!=typeof console&&console&&console.warn("Possible Unhandled Promise Rejection:",e)},ge.exports=o}else ge.exports=e.Promise
|
|||
|
function n(e){return Boolean(e&&void 0!==e.length)}function r(){}function o(e){if(!(this instanceof o))throw new TypeError("Promises must be constructed via new")
|
|||
|
if("function"!=typeof e)throw new TypeError("not a function")
|
|||
|
this._state=0,this._handled=!1,this._value=void 0,this._deferreds=[],f(e,this)}function s(e,t){for(;3===e._state;)e=e._value
|
|||
|
0!==e._state?(e._handled=!0,o._immediateFn((function(){var n=1===e._state?t.onFulfilled:t.onRejected
|
|||
|
if(null!==n){var r
|
|||
|
try{r=n(e._value)}catch(e){return void u(t.promise,e)}a(t.promise,r)}else(1===e._state?a:u)(t.promise,e._value)}))):e._deferreds.push(t)}function a(e,t){try{if(t===e)throw new TypeError("A promise cannot be resolved with itself.")
|
|||
|
if(t&&("object"===i(t)||"function"==typeof t)){var n=t.then
|
|||
|
if(t instanceof o)return e._state=3,e._value=t,void c(e)
|
|||
|
if("function"==typeof n)return void f((r=n,s=t,function(){r.apply(s,arguments)}),e)}e._state=1,e._value=t,c(e)}catch(t){u(e,t)}var r,s}function u(e,t){e._state=2,e._value=t,c(e)}function c(e){2===e._state&&0===e._deferreds.length&&o._immediateFn((function(){e._handled||o._unhandledRejectionFn(e._value)}))
|
|||
|
for(var t=0,n=e._deferreds.length;t<n;t++)s(e,e._deferreds[t])
|
|||
|
e._deferreds=null}function l(e,t,n){this.onFulfilled="function"==typeof e?e:null,this.onRejected="function"==typeof t?t:null,this.promise=n}function f(e,t){var n=!1
|
|||
|
try{e((function(e){n||(n=!0,a(t,e))}),(function(e){n||(n=!0,u(t,e))}))}catch(e){if(n)return
|
|||
|
n=!0,u(t,e)}}}()
|
|||
|
var ve=ge.exports
|
|||
|
function me(e,t){var n=Y.callbacks[e]
|
|||
|
if("log"!==e){var r=ve.resolve()
|
|||
|
return n.forEach((function(e){r=r.then((function(){return ve.resolve(e(t))}))})),r}n.map((function(e){return e(t)}))}var ye,be=0,we=[]
|
|||
|
function xe(){var e,t
|
|||
|
e=C.now(),Y.depth=(Y.depth||0)+1,ke(e),Y.depth--,we.length||Y.blocking||Y.current||(Y.blocking||Y.queue.length||0!==Y.depth?(t=Y.queue.shift()(),we.push.apply(we,c(t)),be>0&&be--,xe()):function(){var e
|
|||
|
if(0===Y.stats.testCount&&!0===Y.failOnZeroTests)return e=Y.filter&&Y.filter.length?new Error('No tests matched the filter "'.concat(Y.filter,'".')):Y.module&&Y.module.length?new Error('No tests matched the module "'.concat(Y.module,'".')):Y.moduleId&&Y.moduleId.length?new Error('No tests matched the moduleId "'.concat(Y.moduleId,'".')):Y.testId&&Y.testId.length?new Error('No tests matched the testId "'.concat(Y.testId,'".')):new Error("No tests were run."),Oe("global failure",O((function(t){t.pushResult({result:!1,message:e.message,source:e.stack})}),{validTest:!0})),void xe()
|
|||
|
var t=Y.storage,n=Math.round(C.now()-Y.started),r=Y.stats.all-Y.stats.bad
|
|||
|
Ee.finished=!0,he("runEnd",Z.end(!0)),me("done",{passed:r,failed:Y.stats.bad,total:Y.stats.all,runtime:n}).then((function(){if(t&&0===Y.stats.bad)for(var e=t.length-1;e>=0;e--){var n=t.key(e)
|
|||
|
0===n.indexOf("qunit-test-")&&t.removeItem(n)}}))}())}function ke(e){if(we.length&&!Y.blocking){var t=C.now()-e
|
|||
|
if(!g||Y.updateRate<=0||t<Y.updateRate){var n=we.shift()
|
|||
|
ve.resolve(n()).then((function(){we.length?ke(e):xe()}))}else g(xe)}}var Ee={finished:!1,add:function(e,t,n){if(t)Y.queue.splice(be++,0,e)
|
|||
|
else if(n){ye||(ye=function(e){var t=parseInt(R(e),16)||-1
|
|||
|
return function(){return t^=t<<13,t^=t>>>17,(t^=t<<5)<0&&(t+=4294967296),t/4294967296}}(n))
|
|||
|
var r=Math.floor(ye()*(Y.queue.length-be+1))
|
|||
|
Y.queue.splice(be+r,0,e)}else Y.queue.push(e)},advance:xe,taskCount:function(){return we.length}},_e=function(){function e(t,n,r){o(this,e),this.name=t,this.suiteName=n.name,this.fullName=n.fullName.concat(t),this.runtime=0,this.assertions=[],this.skipped=!!r.skip,this.todo=!!r.todo,this.valid=r.valid,this._startTime=0,this._endTime=0,n.pushTest(this)}return a(e,[{key:"start",value:function(e){return e&&(this._startTime=C.now(),C.mark("qunit_test_start")),{name:this.name,suiteName:this.suiteName,fullName:this.fullName.slice()}}},{key:"end",value:function(e){if(e&&(this._endTime=C.now(),C)){C.mark("qunit_test_end")
|
|||
|
var t=this.fullName.join(" – ")
|
|||
|
C.measure("QUnit Test: ".concat(t),"qunit_test_start","qunit_test_end")}return O(this.start(),{runtime:this.getRuntime(),status:this.getStatus(),errors:this.getFailedAssertions(),assertions:this.getAssertions()})}},{key:"pushAssertion",value:function(e){this.assertions.push(e)}},{key:"getRuntime",value:function(){return Math.round(this._endTime-this._startTime)}},{key:"getStatus",value:function(){return this.skipped?"skipped":(this.getFailedAssertions().length>0?this.todo:!this.todo)?this.todo?"todo":"passed":"failed"}},{key:"getFailedAssertions",value:function(){return this.assertions.filter((function(e){return!e.passed}))}},{key:"getAssertions",value:function(){return this.assertions.slice()}},{key:"slimAssertions",value:function(){this.assertions=this.assertions.map((function(e){return delete e.actual,delete e.expected,e}))}}]),e}()
|
|||
|
function Se(e){if(this.expected=null,this.assertions=[],this.module=Y.currentModule,this.steps=[],this.timeout=void 0,this.data=void 0,this.withData=!1,this.pauses=new w,this.nextPauseId=1,this.stackOffset=3,O(this,e),this.module.skip?(this.skip=!0,this.todo=!1):this.module.todo&&!this.skip&&(this.todo=!0),Ee.finished)k.warn("Unexpected test after runEnd. This is unstable and will fail in QUnit 3.0.")
|
|||
|
else{if(!this.skip&&"function"!=typeof this.callback){var t=this.todo?"QUnit.todo":"QUnit.test"
|
|||
|
throw new TypeError("You must provide a callback to ".concat(t,'("').concat(this.testName,'")'))}for(var n=0,r=this.module.tests;n<r.length;n++)this.module.tests[n].name===this.testName&&(this.testName+=" ")
|
|||
|
this.testId=R(this.module.name,this.testName),++Se.count,this.errorForStack=new Error,this.callback&&this.callback.validTest&&(this.errorForStack.stack=void 0),this.testReport=new _e(this.testName,this.module.suiteReport,{todo:this.todo,skip:this.skip,valid:this.valid()}),this.module.tests.push({name:this.testName,testId:this.testId,skip:!!this.skip}),this.skip?(this.callback=function(){},this.async=!1,this.expected=0):this.assert=new ae(this)}}function Ce(){if(!Y.current)throw new Error("pushFailure() assertion outside test context, in "+se(2))
|
|||
|
var e=Y.current
|
|||
|
return e.pushFailure.apply(e,arguments)}function Te(){if(Y.pollution=[],Y.noglobals)for(var e in h)if(_.call(h,e)){if(/^qunit-test-output/.test(e))continue
|
|||
|
Y.pollution.push(e)}}Se.count=0,Se.prototype={get stack(){return oe(this.errorForStack,this.stackOffset)},before:function(){var e=this,t=this.module,n=function(e){for(var t=e,n=[];t&&0===t.testsRun;)n.push(t),t=t.parentModule
|
|||
|
return n.reverse()}(t),r=ve.resolve()
|
|||
|
return n.forEach((function(e){r=r.then((function(){return e.stats={all:0,bad:0,started:C.now()},he("suiteStart",e.suiteReport.start(!0)),me("moduleStart",{name:e.name,tests:e.tests})}))})),r.then((function(){return Y.current=e,e.testEnvironment=O({},t.testEnvironment),e.started=C.now(),he("testStart",e.testReport.start(!0)),me("testStart",{name:e.testName,module:t.name,testId:e.testId,previousFailure:e.previousFailure}).then((function(){Y.pollution||Te()}))}))},run:function(){if(Y.current=this,Y.notrycatch)e(this)
|
|||
|
else try{e(this)}catch(e){this.pushFailure("Died on test #"+(this.assertions.length+1)+": "+(e.message||e)+"\n"+this.stack,oe(e,0)),Te(),Y.blocking&&Re(this)}function e(e){var t
|
|||
|
t=e.withData?e.callback.call(e.testEnvironment,e.assert,e.data):e.callback.call(e.testEnvironment,e.assert),e.resolvePromise(t),0===e.timeout&&e.pauses.size>0&&Ce("Test did not finish synchronously even though assert.timeout( 0 ) was used.",se(2))}},after:function(){!function(){var e=Y.pollution
|
|||
|
Te()
|
|||
|
var t=T(Y.pollution,e)
|
|||
|
t.length>0&&Ce("Introduced global variable(s): "+t.join(", "))
|
|||
|
var n=T(e,Y.pollution)
|
|||
|
n.length>0&&Ce("Deleted global variable(s): "+n.join(", "))}()},queueGlobalHook:function(e,t){var n=this
|
|||
|
return function(){var r
|
|||
|
if(Y.current=n,Y.notrycatch)r=e.call(n.testEnvironment,n.assert)
|
|||
|
else try{r=e.call(n.testEnvironment,n.assert)}catch(e){return void n.pushFailure("Global "+t+" failed on "+n.testName+": "+I(e),oe(e,0))}n.resolvePromise(r,t)}},queueHook:function(e,t,n){var r=this,i=function(){var n=e.call(r.testEnvironment,r.assert)
|
|||
|
r.resolvePromise(n,t)}
|
|||
|
return function(){if("before"===t){if(0!==n.testsRun)return
|
|||
|
r.preserveEnvironment=!0}if("after"!==t||function(e){return e.testsRun===Fe(e).filter((function(e){return!e.skip})).length-1}(n)||!(Y.queue.length>0||Ee.taskCount()>2))if(Y.current=r,Y.notrycatch)i()
|
|||
|
else try{i()}catch(e){r.pushFailure(t+" failed on "+r.testName+": "+(e.message||e),oe(e,0))}}},hooks:function(e){var t=[]
|
|||
|
return this.skip||(function(n){if(("beforeEach"===e||"afterEach"===e)&&Y.globalHooks[e])for(var r=0;r<Y.globalHooks[e].length;r++)t.push(n.queueGlobalHook(Y.globalHooks[e][r],e))}(this),function n(r,i){if(i.parentModule&&n(r,i.parentModule),i.hooks[e].length)for(var o=0;o<i.hooks[e].length;o++)t.push(r.queueHook(i.hooks[e][o],e,i))}(this,this.module)),t},finish:function(){if(Y.current=this,g&&(v(this.timeout),Y.timeoutHandler=null),this.callback=void 0,this.steps.length){var e=this.steps.join(", ")
|
|||
|
this.pushFailure("Expected assert.verifySteps() to be called before end of test "+"after using assert.step(). Unverified steps: ".concat(e),this.stack)}Y.requireExpects&&null===this.expected?this.pushFailure("Expected number of assertions to be defined, but expect() was not called.",this.stack):null!==this.expected&&this.expected!==this.assertions.length?this.pushFailure("Expected "+this.expected+" assertions, but "+this.assertions.length+" were run",this.stack):null!==this.expected||this.assertions.length||this.pushFailure("Expected at least one assertion, but none were run - call expect(0) to accept zero assertions.",this.stack)
|
|||
|
var t=this.module,n=t.name,r=this.testName,i=!!this.skip,o=!!this.todo,s=0,a=Y.storage
|
|||
|
this.runtime=Math.round(C.now()-this.started),Y.stats.all+=this.assertions.length,Y.stats.testCount+=1,t.stats.all+=this.assertions.length
|
|||
|
for(var u=0;u<this.assertions.length;u++)this.assertions[u].result||(s++,Y.stats.bad++,t.stats.bad++)
|
|||
|
i?De(t):function(e){for(e.testsRun++;e=e.parentModule;)e.testsRun++}(t),a&&(s?a.setItem("qunit-test-"+n+"-"+r,s):a.removeItem("qunit-test-"+n+"-"+r)),he("testEnd",this.testReport.end(!0)),this.testReport.slimAssertions()
|
|||
|
var l=this
|
|||
|
return me("testDone",{name:r,module:n,skipped:i,todo:o,failed:s,passed:this.assertions.length-s,total:this.assertions.length,runtime:i?0:this.runtime,assertions:this.assertions,testId:this.testId,get source(){return l.stack}}).then((function(){if(Pe(t)){for(var e=[t],n=t.parentModule;n&&Pe(n);)e.push(n),n=n.parentModule
|
|||
|
var r=ve.resolve()
|
|||
|
return e.forEach((function(e){r=r.then((function(){return function(e){for(var t=[e];t.length;){var n=t.shift()
|
|||
|
n.hooks={},t.push.apply(t,c(n.childModules))}return he("suiteEnd",e.suiteReport.end(!0)),me("moduleDone",{name:e.name,tests:e.tests,failed:e.stats.bad,passed:e.stats.all-e.stats.bad,total:e.stats.all,runtime:Math.round(C.now()-e.stats.started)})}(e)}))})),r}})).then((function(){Y.current=void 0}))},preserveTestEnvironment:function(){this.preserveEnvironment&&(this.module.testEnvironment=this.testEnvironment,this.testEnvironment=O({},this.module.testEnvironment))},queue:function(){var e=this
|
|||
|
if(this.valid()){var t=Y.storage&&+Y.storage.getItem("qunit-test-"+this.module.name+"-"+this.testName),n=Y.reorder&&!!t
|
|||
|
this.previousFailure=!!t,Ee.add((function(){return[function(){return e.before()}].concat(c(e.hooks("before")),[function(){e.preserveTestEnvironment()}],c(e.hooks("beforeEach")),[function(){e.run()}],c(e.hooks("afterEach").reverse()),c(e.hooks("after").reverse()),[function(){e.after()},function(){return e.finish()}])}),n,Y.seed)}else De(this.module)},pushResult:function(e){if(this!==Y.current){var t=e&&e.message||"",n=this&&this.testName||""
|
|||
|
throw new Error("Assertion occurred after test finished.\n> Test: "+n+"\n> Message: "+t+"\n")}var r={module:this.module.name,name:this.testName,result:e.result,message:e.message,actual:e.actual,testId:this.testId,negative:e.negative||!1,runtime:Math.round(C.now()-this.started),todo:!!this.todo}
|
|||
|
if(_.call(e,"expected")&&(r.expected=e.expected),!e.result){var i=e.source||se()
|
|||
|
i&&(r.source=i)}this.logAssertion(r),this.assertions.push({result:!!e.result,message:e.message})},pushFailure:function(e,t,n){if(!(this instanceof Se))throw new Error("pushFailure() assertion outside test context, was "+se(2))
|
|||
|
this.pushResult({result:!1,message:e||"error",actual:n||null,source:t})},logAssertion:function(e){me("log",e)
|
|||
|
var t={passed:e.result,actual:e.actual,expected:e.expected,message:e.message,stack:e.source,todo:e.todo}
|
|||
|
this.testReport.pushAssertion(t),he("assertion",t)},internalResetTimeout:function(e){v(Y.timeout),Y.timeout=g(Y.timeoutHandler(e),e)},internalStop:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1
|
|||
|
Y.blocking=!0
|
|||
|
var t,n=this,r=this.nextPauseId++,i={cancelled:!1,remaining:e}
|
|||
|
return n.pauses.set(r,i),g&&("number"==typeof n.timeout?t=n.timeout:"number"==typeof Y.testTimeout&&(t=Y.testTimeout),"number"==typeof t&&t>0&&(Y.timeoutHandler=function(e){return function(){Y.timeout=null,i.cancelled=!0,n.pauses.delete(r),n.pushFailure("Test took longer than ".concat(e,"ms; test timed out."),se(2)),Ie(n)}},v(Y.timeout),Y.timeout=g(Y.timeoutHandler(t),t))),function(){if(!i.cancelled){if(void 0===Y.current)throw new Error("Unexpected release of async pause after tests finished.\n"+"> Test: ".concat(n.testName," [async #").concat(r,"]"))
|
|||
|
if(Y.current!==n)throw new Error("Unexpected release of async pause during a different test.\n"+"> Test: ".concat(n.testName," [async #").concat(r,"]"))
|
|||
|
if(i.remaining<=0)throw new Error("Tried to release async pause that was already released.\n"+"> Test: ".concat(n.testName," [async #").concat(r,"]"))
|
|||
|
i.remaining--,0===i.remaining&&n.pauses.delete(r),Ie(n)}}},resolvePromise:function(e,t){if(null!=e){var n=this,r=e.then
|
|||
|
if("function"==typeof r){var i=n.internalStop(),o=function(){i()}
|
|||
|
Y.notrycatch?r.call(e,o):r.call(e,o,(function(e){var r="Promise rejected "+(t?t.replace(/Each$/,""):"during")+' "'+n.testName+'": '+(e&&e.message||e)
|
|||
|
n.pushFailure(r,oe(e,0)),Te(),Re(n)}))}}},valid:function(){if(this.callback&&this.callback.validTest)return!0
|
|||
|
if(!function e(t,n){return!n||!n.length||j(t.moduleId,n)||t.parentModule&&e(t.parentModule,n)}(this.module,Y.moduleId))return!1
|
|||
|
if(Y.testId&&Y.testId.length&&!j(this.testId,Y.testId))return!1
|
|||
|
var e=Y.module&&Y.module.toLowerCase()
|
|||
|
if(!function e(t,n){return!n||(t.name?t.name.toLowerCase():null)===n||!!t.parentModule&&e(t.parentModule,n)}(this.module,e))return!1
|
|||
|
var t=Y.filter
|
|||
|
if(!t)return!0
|
|||
|
var n=/^(!?)\/([\w\W]*)\/(i?$)/.exec(t),r=this.module.name+": "+this.testName
|
|||
|
return n?this.regexFilter(!!n[1],n[2],n[3],r):this.stringFilter(t,r)},regexFilter:function(e,t,n,r){return new RegExp(t,n).test(r)!==e},stringFilter:function(e,t){e=e.toLowerCase(),t=t.toLowerCase()
|
|||
|
var n="!"!==e.charAt(0)
|
|||
|
return n||(e=e.slice(1)),-1!==t.indexOf(e)?n:!n}}
|
|||
|
var je=!1
|
|||
|
function Ne(e){je||Y.currentModule.ignored||new Se(e).queue()}function Me(e){Y.currentModule.ignored||(je||(Y.queue.length=0,je=!0),new Se(e).queue())}function Oe(e,t){Ne({testName:e,callback:t})}function qe(e,t){return"".concat(e," [").concat(t,"]")}function Ae(e,t){if(Array.isArray(e))for(var n=0;n<e.length;n++)t(e[n],n)
|
|||
|
else{if("object"!==i(e)||null===e)throw new Error("test.each() expects an array or object as input, but\nfound ".concat(i(e)," instead."))
|
|||
|
for(var r in e)t(e[r],r)}}function Re(e){e.pauses.forEach((function(e){e.cancelled=!0})),e.pauses.clear(),Ie(e)}function Ie(e){e.pauses.size>0||(g?(v(Y.timeout),Y.timeout=g((function(){e.pauses.size>0||(v(Y.timeout),Y.timeout=null,Y.blocking=!1,Ee.advance())}))):(Y.blocking=!1,Ee.advance()))}function Fe(e){for(var t=[].concat(e.tests),n=c(e.childModules);n.length;){var r=n.shift()
|
|||
|
t.push.apply(t,r.tests),n.push.apply(n,c(r.childModules))}return t}function Pe(e){return e.testsRun+e.testsIgnored===Fe(e).length}function De(e){for(e.testsIgnored++;e=e.parentModule;)e.testsIgnored++}O(Oe,{todo:function(e,t){Ne({testName:e,callback:t,todo:!0})},skip:function(e){Ne({testName:e,skip:!0})},only:function(e,t){Me({testName:e,callback:t})},each:function(e,t,n){Ae(t,(function(t,r){Ne({testName:qe(e,r),callback:n,withData:!0,stackOffset:5,data:t})}))}}),Oe.todo.each=function(e,t,n){Ae(t,(function(t,r){Ne({testName:qe(e,r),callback:n,todo:!0,withData:!0,stackOffset:5,data:t})}))},Oe.skip.each=function(e,t){Ae(t,(function(t,n){Ne({testName:qe(e,n),stackOffset:5,skip:!0})}))},Oe.only.each=function(e,t,n){Ae(t,(function(t,r){Me({testName:qe(e,r),callback:n,withData:!0,stackOffset:5,data:t})}))}
|
|||
|
var Le,Be,Ue,He,ze=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}
|
|||
|
o(this,e),this.log=n.log||Function.prototype.bind.call(p.log,p),t.on("error",this.onError.bind(this)),t.on("runStart",this.onRunStart.bind(this)),t.on("testStart",this.onTestStart.bind(this)),t.on("testEnd",this.onTestEnd.bind(this)),t.on("runEnd",this.onRunEnd.bind(this))}return a(e,[{key:"onError",value:function(e){this.log("error",e)}},{key:"onRunStart",value:function(e){this.log("runStart",e)}},{key:"onTestStart",value:function(e){this.log("testStart",e)}},{key:"onTestEnd",value:function(e){this.log("testEnd",e)}},{key:"onRunEnd",value:function(e){this.log("runEnd",e)}}],[{key:"init",value:function(t,n){return new e(t,n)}}]),e}(),$e=!0
|
|||
|
if("undefined"!=typeof process){var Qe=process.env||{}
|
|||
|
Le=Qe.FORCE_COLOR,Be=Qe.NODE_DISABLE_COLORS,Ue=Qe.NO_COLOR,He=Qe.TERM,$e=process.stdout&&process.stdout.isTTY}var Ge={enabled:!Be&&null==Ue&&"dumb"!==He&&(null!=Le&&"0"!==Le||$e),reset:We(0,0),bold:We(1,22),dim:We(2,22),italic:We(3,23),underline:We(4,24),inverse:We(7,27),hidden:We(8,28),strikethrough:We(9,29),black:We(30,39),red:We(31,39),green:We(32,39),yellow:We(33,39),blue:We(34,39),magenta:We(35,39),cyan:We(36,39),white:We(37,39),gray:We(90,39),grey:We(90,39),bgBlack:We(40,49),bgRed:We(41,49),bgGreen:We(42,49),bgYellow:We(43,49),bgBlue:We(44,49),bgMagenta:We(45,49),bgCyan:We(46,49),bgWhite:We(47,49)}
|
|||
|
function Ye(e,t){for(var n,r=0,i="",o="";r<e.length;r++)i+=(n=e[r]).open,o+=n.close,~t.indexOf(n.close)&&(t=t.replace(n.rgx,n.close+n.open))
|
|||
|
return i+t+o}function We(e,t){var n={open:"[".concat(e,"m"),close:"[".concat(t,"m"),rgx:new RegExp("\\x1b\\[".concat(t,"m"),"g")}
|
|||
|
return function(t){return void 0!==this&&void 0!==this.has?(~this.has.indexOf(e)||(this.has.push(e),this.keys.push(n)),void 0===t?this:Ge.enabled?Ye(this.keys,t+""):t+""):void 0===t?((r={has:[e],keys:[n]}).reset=Ge.reset.bind(r),r.bold=Ge.bold.bind(r),r.dim=Ge.dim.bind(r),r.italic=Ge.italic.bind(r),r.underline=Ge.underline.bind(r),r.inverse=Ge.inverse.bind(r),r.hidden=Ge.hidden.bind(r),r.strikethrough=Ge.strikethrough.bind(r),r.black=Ge.black.bind(r),r.red=Ge.red.bind(r),r.green=Ge.green.bind(r),r.yellow=Ge.yellow.bind(r),r.blue=Ge.blue.bind(r),r.magenta=Ge.magenta.bind(r),r.cyan=Ge.cyan.bind(r),r.white=Ge.white.bind(r),r.gray=Ge.gray.bind(r),r.grey=Ge.grey.bind(r),r.bgBlack=Ge.bgBlack.bind(r),r.bgRed=Ge.bgRed.bind(r),r.bgGreen=Ge.bgGreen.bind(r),r.bgYellow=Ge.bgYellow.bind(r),r.bgBlue=Ge.bgBlue.bind(r),r.bgMagenta=Ge.bgMagenta.bind(r),r.bgCyan=Ge.bgCyan.bind(r),r.bgWhite=Ge.bgWhite.bind(r),r):Ge.enabled?Ye([n],t+""):t+""
|
|||
|
var r}}var Ve=Object.prototype.hasOwnProperty
|
|||
|
function Je(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:4
|
|||
|
if(void 0===e&&(e=String(e)),"number"!=typeof e||isFinite(e)||(e=String(e)),"number"==typeof e)return JSON.stringify(e)
|
|||
|
if("string"==typeof e){if(""===e||/['"\\/[{}\]\r\n]/.test(e)||/[-?:,[\]{}#&*!|=>'"%@`]/.test(e[0])||/(^\s|\s$)/.test(e)||/^[\d._-]+$/.test(e)||/^(true|false|y|n|yes|no|on|off)$/i.test(e)){if(!/\n/.test(e))return JSON.stringify(e)
|
|||
|
var n=new Array(t+1).join(" "),r=e.match(/\n+$/)
|
|||
|
return 1===(r?r[0].length:0)?"|\n"+e.replace(/\n$/,"").split("\n").map((function(e){return n+e})).join("\n"):"|+\n"+e.split("\n").map((function(e){return n+e})).join("\n")}return e}return JSON.stringify(Xe(e),null,2)}function Xe(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[]
|
|||
|
if(-1!==n.indexOf(e))return"[Circular]"
|
|||
|
switch(Object.prototype.toString.call(e).replace(/^\[.+\s(.+?)]$/,"$1").toLowerCase()){case"array":n.push(e),t=e.map((function(e){return Xe(e,n)})),n.pop()
|
|||
|
break
|
|||
|
case"object":n.push(e),t={},Object.keys(e).forEach((function(r){t[r]=Xe(e[r],n)})),n.pop()
|
|||
|
break
|
|||
|
default:t=e}return t}var Ze=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}
|
|||
|
o(this,e),this.log=n.log||Function.prototype.bind.call(p.log,p),this.testCount=0,this.ended=!1,this.bailed=!1,t.on("error",this.onError.bind(this)),t.on("runStart",this.onRunStart.bind(this)),t.on("testEnd",this.onTestEnd.bind(this)),t.on("runEnd",this.onRunEnd.bind(this))}return a(e,[{key:"onRunStart",value:function(e){this.log("TAP version 13")}},{key:"onError",value:function(e){this.bailed||(this.bailed=!0,this.ended||(this.testCount=this.testCount+1,this.log(Ge.red("not ok ".concat(this.testCount," global failure"))),this.logError(e)),this.log("Bail out! "+I(e).split("\n")[0]),this.ended&&this.logError(e))}},{key:"onTestEnd",value:function(e){var t=this
|
|||
|
this.testCount=this.testCount+1,"passed"===e.status?this.log("ok ".concat(this.testCount," ").concat(e.fullName.join(" > "))):"skipped"===e.status?this.log(Ge.yellow("ok ".concat(this.testCount," # SKIP ").concat(e.fullName.join(" > ")))):"todo"===e.status?(this.log(Ge.cyan("not ok ".concat(this.testCount," # TODO ").concat(e.fullName.join(" > ")))),e.errors.forEach((function(e){return t.logAssertion(e,"todo")}))):(this.log(Ge.red("not ok ".concat(this.testCount," ").concat(e.fullName.join(" > ")))),e.errors.forEach((function(e){return t.logAssertion(e)})))}},{key:"onRunEnd",value:function(e){this.ended=!0,this.log("1..".concat(e.testCounts.total)),this.log("# pass ".concat(e.testCounts.passed)),this.log(Ge.yellow("# skip ".concat(e.testCounts.skipped))),this.log(Ge.cyan("# todo ".concat(e.testCounts.todo))),this.log(Ge.red("# fail ".concat(e.testCounts.failed)))}},{key:"logAssertion",value:function(e,t){var n=" ---"
|
|||
|
n+="\n message: ".concat(Je(e.message||"failed")),n+="\n severity: ".concat(Je(t||"failed")),Ve.call(e,"actual")&&(n+="\n actual : ".concat(Je(e.actual))),Ve.call(e,"expected")&&(n+="\n expected: ".concat(Je(e.expected))),e.stack&&(n+="\n stack: ".concat(Je(e.stack+"\n"))),n+="\n ...",this.log(n)}},{key:"logError",value:function(e){var t=" ---"
|
|||
|
t+="\n message: ".concat(Je(I(e))),t+="\n severity: ".concat(Je("failed")),e&&e.stack&&(t+="\n stack: ".concat(Je(e.stack+"\n"))),t+="\n ...",this.log(t)}}],[{key:"init",value:function(t,n){return new e(t,n)}}]),e}(),Ke={console:ze,tap:Ze}
|
|||
|
function et(e){return function(t){Y.globalHooks[e]||(Y.globalHooks[e]=[]),Y.globalHooks[e].push(t)}}var tt={beforeEach:et("beforeEach"),afterEach:et("afterEach")}
|
|||
|
function nt(e){Y.current?Y.current.assert.pushResult({result:!1,message:"global failure: ".concat(I(e)),source:e&&e.stack||se(2)}):(Z.globalFailureCount++,Y.stats.bad++,Y.stats.all++,he("error",e))}var rt={}
|
|||
|
Y.currentModule.suiteReport=Z
|
|||
|
var it=!1,ot=!1
|
|||
|
function st(){ot=!0,g?g((function(){ut()})):ut()}function at(){Y.blocking=!1,Ee.advance()}function ut(){if(Y.started)at()
|
|||
|
else{Y.started=C.now(),""===Y.modules[0].name&&0===Y.modules[0].tests.length&&Y.modules.shift()
|
|||
|
for(var e=[],t=0;t<Y.modules.length;t++)""!==Y.modules[t].name&&e.push({name:Y.modules[t].name,moduleId:Y.modules[t].moduleId,tests:Y.modules[t].tests})
|
|||
|
he("runStart",Z.start(!0)),me("begin",{totalTests:Se.count,modules:e}).then(at)}}rt.isLocal=d&&d.location&&"file:"===d.location.protocol,rt.version="2.19.4",O(rt,{config:Y,dump:V,equiv:G,reporters:Ke,hooks:tt,is:A,objectType:q,on:function(e,t){if("string"!=typeof e)throw new TypeError("eventName must be a string when registering a listener")
|
|||
|
if(!j(e,fe)){var n=fe.join(", ")
|
|||
|
throw new Error('"'.concat(e,'" is not a valid event; must be one of: ').concat(n,"."))}if("function"!=typeof t)throw new TypeError("callback must be a function when registering a listener")
|
|||
|
le[e]||(le[e]=[]),j(t,le[e])||le[e].push(t)},onError:function(e){if(k.warn("QUnit.onError is deprecated and will be removed in QUnit 3.0. Please use QUnit.onUncaughtException instead."),Y.current&&Y.current.ignoreGlobalErrors)return!0
|
|||
|
var t=new Error(e.message)
|
|||
|
return t.stack=e.stacktrace||e.fileName+":"+e.lineNumber,nt(t),!1},onUncaughtException:nt,pushFailure:Ce,assert:ae.prototype,module:re,test:Oe,todo:Oe.todo,skip:Oe.skip,only:Oe.only,start:function(e){if(Y.current)throw new Error("QUnit.start cannot be called inside a test context.")
|
|||
|
var t=it
|
|||
|
if(it=!0,ot)throw new Error("Called start() while test already started running")
|
|||
|
if(t||e>1)throw new Error("Called start() outside of a test context too many times")
|
|||
|
if(Y.autostart)throw new Error("Called start() outside of a test context when QUnit.config.autostart was true")
|
|||
|
if(!Y.pageLoaded)return Y.autostart=!0,void(m||rt.load())
|
|||
|
st()},onUnhandledRejection:function(e){k.warn("QUnit.onUnhandledRejection is deprecated and will be removed in QUnit 3.0. Please use QUnit.onUncaughtException instead."),nt(e)},extend:function(){k.warn("QUnit.extend is deprecated and will be removed in QUnit 3.0. Please use Object.assign instead.")
|
|||
|
for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n]
|
|||
|
return O.apply(this,t)},load:function(){Y.pageLoaded=!0,O(Y,{started:0,updateRate:1e3,autostart:!0,filter:""},!0),ot||(Y.blocking=!1,Y.autostart&&st())},stack:function(e){return se(e=(e||0)+2)}}),function(e){var t=["begin","done","log","testStart","testDone","moduleStart","moduleDone"]
|
|||
|
function n(e){return function(t){if("function"!=typeof t)throw new Error("Callback parameter must be a function")
|
|||
|
Y.callbacks[e].push(t)}}for(var r=0;r<t.length;r++){var i=t[r]
|
|||
|
void 0===Y.callbacks[i]&&(Y.callbacks[i]=[]),e[i]=n(i)}}(rt),function(i){if(d&&m){if(d.QUnit&&d.QUnit.version)throw new Error("QUnit has already been defined.")
|
|||
|
d.QUnit=i}e&&e.exports&&(e.exports=i,e.exports.QUnit=i),t&&(t.QUnit=i),void 0===(r=function(){return i}.call(t,n,t,e))||(e.exports=r),i.config.autostart=!1}(rt),function(){if(d&&m){var e=rt.config,t=Object.prototype.hasOwnProperty
|
|||
|
rt.begin((function(){if(!t.call(e,"fixture")){var n=m.getElementById("qunit-fixture")
|
|||
|
n&&(e.fixture=n.cloneNode(!0))}})),rt.testStart((function(){if(null!=e.fixture){var t=m.getElementById("qunit-fixture")
|
|||
|
if("string"===i(e.fixture)){var n=m.createElement("div")
|
|||
|
n.setAttribute("id","qunit-fixture"),n.innerHTML=e.fixture,t.parentNode.replaceChild(n,t)}else{var r=e.fixture.cloneNode(!0)
|
|||
|
t.parentNode.replaceChild(r,t)}}}))}}(),function(){var e=void 0!==d&&d.location
|
|||
|
if(e){var t=function(){for(var t=Object.create(null),r=e.search.slice(1).split("&"),i=r.length,o=0;o<i;o++)if(r[o]){var s=r[o].split("="),a=n(s[0]),u=1===s.length||n(s.slice(1).join("="))
|
|||
|
t[a]=a in t?[].concat(t[a],u):u}return t}()
|
|||
|
rt.urlParams=t,rt.config.filter=t.filter,rt.config.module=t.module,rt.config.moduleId=[].concat(t.moduleId||[]),rt.config.testId=[].concat(t.testId||[]),!0===t.seed?rt.config.seed=Math.random().toString(36).slice(2):t.seed&&(rt.config.seed=t.seed),rt.config.urlConfig.push({id:"hidepassed",label:"Hide passed tests",tooltip:"Only show tests and assertions that fail. Stored as query-strings."},{id:"noglobals",label:"Check for Globals",tooltip:"Enabling this will test if any test introduces new properties on the global object (`window` in Browsers). Stored as query-strings."},{id:"notrycatch",label:"No try-catch",tooltip:"Enabling this will run tests outside of a try-catch block. Makes debugging exceptions in IE reasonable. Stored as query-strings."}),rt.begin((function(){for(var e=rt.config.urlConfig,n=0;n<e.length;n++){var r=rt.config.urlConfig[n]
|
|||
|
"string"!=typeof r&&(r=r.id),void 0===rt.config[r]&&(rt.config[r]=t[r])}}))}function n(e){return decodeURIComponent(e.replace(/\+/g,"%20"))}}()
|
|||
|
var ct={exports:{}}
|
|||
|
!function(e){var t,n
|
|||
|
t=de,n=function(){var e=void 0!==pe&&"undefined"==typeof window,t="function"==typeof Map?Map:function(){var e=Object.create(null)
|
|||
|
this.get=function(t){return e[t]},this.set=function(t,n){return e[t]=n,this},this.clear=function(){e=Object.create(null)}},n=new t,r=new t,o=[]
|
|||
|
o.total=0
|
|||
|
var s=[],a=[]
|
|||
|
function u(){n.clear(),r.clear(),s=[],a=[]}function c(e){for(var t=-9007199254740991,n=e.length-1;n>=0;--n){var r=e[n]
|
|||
|
if(null!==r){var i=r.score
|
|||
|
i>t&&(t=i)}}return-9007199254740991===t?null:t}function l(e,t){var n=e[t]
|
|||
|
if(void 0!==n)return n
|
|||
|
var r=t
|
|||
|
Array.isArray(t)||(r=t.split("."))
|
|||
|
for(var i=r.length,o=-1;e&&++o<i;)e=e[r[o]]
|
|||
|
return e}function f(e){return"object"===i(e)}var h=function(){var e=[],t=0,n={}
|
|||
|
function r(){for(var n=0,r=e[n],i=1;i<t;){var o=i+1
|
|||
|
n=i,o<t&&e[o].score<e[i].score&&(n=o),e[n-1>>1]=e[n],i=1+(n<<1)}for(var s=n-1>>1;n>0&&r.score<e[s].score;s=(n=s)-1>>1)e[n]=e[s]
|
|||
|
e[n]=r}return n.add=function(n){var r=t
|
|||
|
e[t++]=n
|
|||
|
for(var i=r-1>>1;r>0&&n.score<e[i].score;i=(r=i)-1>>1)e[r]=e[i]
|
|||
|
e[r]=n},n.poll=function(){if(0!==t){var n=e[0]
|
|||
|
return e[0]=e[--t],r(),n}},n.peek=function(n){if(0!==t)return e[0]},n.replaceTop=function(t){e[0]=t,r()},n},d=h()
|
|||
|
return function t(i){var p={single:function(e,t,n){return"farzher"==e?{target:"farzher was here (^-^*)/",score:0,indexes:[0,1,2,3,4,5,6]}:e?(f(e)||(e=p.getPreparedSearch(e)),t?(f(t)||(t=p.getPrepared(t)),((n&&void 0!==n.allowTypo?n.allowTypo:!i||void 0===i.allowTypo||i.allowTypo)?p.algorithm:p.algorithmNoTypo)(e,t,e[0])):null):null},go:function(e,t,n){if("farzher"==e)return[{target:"farzher was here (^-^*)/",score:0,indexes:[0,1,2,3,4,5,6],obj:t?t[0]:null}]
|
|||
|
if(!e)return o
|
|||
|
var r=(e=p.prepareSearch(e))[0],s=n&&n.threshold||i&&i.threshold||-9007199254740991,a=n&&n.limit||i&&i.limit||9007199254740991,u=(n&&void 0!==n.allowTypo?n.allowTypo:!i||void 0===i.allowTypo||i.allowTypo)?p.algorithm:p.algorithmNoTypo,h=0,g=0,v=t.length
|
|||
|
if(n&&n.keys)for(var m=n.scoreFn||c,y=n.keys,b=y.length,w=v-1;w>=0;--w){for(var x=t[w],k=new Array(b),E=b-1;E>=0;--E)(C=l(x,S=y[E]))?(f(C)||(C=p.getPrepared(C)),k[E]=u(e,C,r)):k[E]=null
|
|||
|
k.obj=x
|
|||
|
var _=m(k)
|
|||
|
null!==_&&(_<s||(k.score=_,h<a?(d.add(k),++h):(++g,_>d.peek().score&&d.replaceTop(k))))}else if(n&&n.key){var S=n.key
|
|||
|
for(w=v-1;w>=0;--w)(C=l(x=t[w],S))&&(f(C)||(C=p.getPrepared(C)),null!==(T=u(e,C,r))&&(T.score<s||(T={target:T.target,_targetLowerCodes:null,_nextBeginningIndexes:null,score:T.score,indexes:T.indexes,obj:x},h<a?(d.add(T),++h):(++g,T.score>d.peek().score&&d.replaceTop(T)))))}else for(w=v-1;w>=0;--w){var C,T;(C=t[w])&&(f(C)||(C=p.getPrepared(C)),null!==(T=u(e,C,r))&&(T.score<s||(h<a?(d.add(T),++h):(++g,T.score>d.peek().score&&d.replaceTop(T)))))}if(0===h)return o
|
|||
|
var j=new Array(h)
|
|||
|
for(w=h-1;w>=0;--w)j[w]=d.poll()
|
|||
|
return j.total=h+g,j},goAsync:function(t,n,r){var s=!1,a=new Promise((function(a,u){if("farzher"==t)return a([{target:"farzher was here (^-^*)/",score:0,indexes:[0,1,2,3,4,5,6],obj:n?n[0]:null}])
|
|||
|
if(!t)return a(o)
|
|||
|
var d=(t=p.prepareSearch(t))[0],g=h(),v=n.length-1,m=r&&r.threshold||i&&i.threshold||-9007199254740991,y=r&&r.limit||i&&i.limit||9007199254740991,b=(r&&void 0!==r.allowTypo?r.allowTypo:!i||void 0===i.allowTypo||i.allowTypo)?p.algorithm:p.algorithmNoTypo,w=0,x=0
|
|||
|
function k(){if(s)return u("canceled")
|
|||
|
var i=Date.now()
|
|||
|
if(r&&r.keys)for(var h=r.scoreFn||c,E=r.keys,_=E.length;v>=0;--v){if(v%1e3==0&&Date.now()-i>=10)return void(e?setImmediate(k):setTimeout(k))
|
|||
|
for(var S=n[v],C=new Array(_),T=_-1;T>=0;--T)(M=l(S,N=E[T]))?(f(M)||(M=p.getPrepared(M)),C[T]=b(t,M,d)):C[T]=null
|
|||
|
C.obj=S
|
|||
|
var j=h(C)
|
|||
|
null!==j&&(j<m||(C.score=j,w<y?(g.add(C),++w):(++x,j>g.peek().score&&g.replaceTop(C))))}else if(r&&r.key)for(var N=r.key;v>=0;--v){if(v%1e3==0&&Date.now()-i>=10)return void(e?setImmediate(k):setTimeout(k));(M=l(S=n[v],N))&&(f(M)||(M=p.getPrepared(M)),null!==(O=b(t,M,d))&&(O.score<m||(O={target:O.target,_targetLowerCodes:null,_nextBeginningIndexes:null,score:O.score,indexes:O.indexes,obj:S},w<y?(g.add(O),++w):(++x,O.score>g.peek().score&&g.replaceTop(O)))))}else for(;v>=0;--v){if(v%1e3==0&&Date.now()-i>=10)return void(e?setImmediate(k):setTimeout(k))
|
|||
|
var M,O;(M=n[v])&&(f(M)||(M=p.getPrepared(M)),null!==(O=b(t,M,d))&&(O.score<m||(w<y?(g.add(O),++w):(++x,O.score>g.peek().score&&g.replaceTop(O)))))}if(0===w)return a(o)
|
|||
|
for(var q=new Array(w),A=w-1;A>=0;--A)q[A]=g.poll()
|
|||
|
q.total=w+x,a(q)}e?setImmediate(k):k()}))
|
|||
|
return a.cancel=function(){s=!0},a},highlight:function(e,t,n){if("function"==typeof t)return p.highlightCallback(e,t)
|
|||
|
if(null===e)return null
|
|||
|
void 0===t&&(t="<b>"),void 0===n&&(n="</b>")
|
|||
|
for(var r="",i=0,o=!1,s=e.target,a=s.length,u=e.indexes,c=0;c<a;++c){var l=s[c]
|
|||
|
if(u[i]===c){if(o||(o=!0,r+=t),++i===u.length){r+=l+n+s.substr(c+1)
|
|||
|
break}}else o&&(o=!1,r+=n)
|
|||
|
r+=l}return r},highlightCallback:function(e,t){if(null===e)return null
|
|||
|
for(var n=e.target,r=n.length,i=e.indexes,o="",s=0,a=0,u=!1,c=(e=[],0);c<r;++c){var l=n[c]
|
|||
|
if(i[a]===c){if(++a,u||(u=!0,e.push(o),o=""),a===i.length){o+=l,e.push(t(o,s++)),o="",e.push(n.substr(c+1))
|
|||
|
break}}else u&&(u=!1,e.push(t(o,s++)),o="")
|
|||
|
o+=l}return e},prepare:function(e){return e?{target:e,_targetLowerCodes:p.prepareLowerCodes(e),_nextBeginningIndexes:null,score:null,indexes:null,obj:null}:{target:"",_targetLowerCodes:[0],_nextBeginningIndexes:null,score:null,indexes:null,obj:null}},prepareSlow:function(e){return e?{target:e,_targetLowerCodes:p.prepareLowerCodes(e),_nextBeginningIndexes:p.prepareNextBeginningIndexes(e),score:null,indexes:null,obj:null}:{target:"",_targetLowerCodes:[0],_nextBeginningIndexes:null,score:null,indexes:null,obj:null}},prepareSearch:function(e){return e||(e=""),p.prepareLowerCodes(e)},getPrepared:function(e){if(e.length>999)return p.prepare(e)
|
|||
|
var t=n.get(e)
|
|||
|
return void 0!==t||(t=p.prepare(e),n.set(e,t)),t},getPreparedSearch:function(e){if(e.length>999)return p.prepareSearch(e)
|
|||
|
var t=r.get(e)
|
|||
|
return void 0!==t||(t=p.prepareSearch(e),r.set(e,t)),t},algorithm:function(e,t,n){for(var r=t._targetLowerCodes,i=e.length,o=r.length,u=0,c=0,l=0,f=0;;){if(n===r[c]){if(s[f++]=c,++u===i)break
|
|||
|
n=e[0===l?u:l===u?u+1:l===u-1?u-1:u]}if(++c>=o)for(;;){if(u<=1)return null
|
|||
|
if(0===l){if(n===e[--u])continue
|
|||
|
l=u}else{if(1===l)return null
|
|||
|
if((n=e[1+(u=--l)])===e[u])continue}c=s[(f=u)-1]+1
|
|||
|
break}}u=0
|
|||
|
var h=0,d=!1,g=0,v=t._nextBeginningIndexes
|
|||
|
null===v&&(v=t._nextBeginningIndexes=p.prepareNextBeginningIndexes(t.target))
|
|||
|
var m=c=0===s[0]?0:v[s[0]-1]
|
|||
|
if(c!==o)for(;;)if(c>=o){if(u<=0){if(++h>i-2)break
|
|||
|
if(e[h]===e[h+1])continue
|
|||
|
c=m
|
|||
|
continue}--u,c=v[a[--g]]}else if(e[0===h?u:h===u?u+1:h===u-1?u-1:u]===r[c]){if(a[g++]=c,++u===i){d=!0
|
|||
|
break}++c}else c=v[c]
|
|||
|
if(d)var y=a,b=g
|
|||
|
else y=s,b=f
|
|||
|
for(var w=0,x=-1,k=0;k<i;++k)x!==(c=y[k])-1&&(w-=c),x=c
|
|||
|
for(d?0!==h&&(w+=-20):(w*=1e3,0!==l&&(w+=-20)),w-=o-i,t.score=w,t.indexes=new Array(b),k=b-1;k>=0;--k)t.indexes[k]=y[k]
|
|||
|
return t},algorithmNoTypo:function(e,t,n){for(var r=t._targetLowerCodes,i=e.length,o=r.length,u=0,c=0,l=0;;){if(n===r[c]){if(s[l++]=c,++u===i)break
|
|||
|
n=e[u]}if(++c>=o)return null}u=0
|
|||
|
var f=!1,h=0,d=t._nextBeginningIndexes
|
|||
|
if(null===d&&(d=t._nextBeginningIndexes=p.prepareNextBeginningIndexes(t.target)),(c=0===s[0]?0:d[s[0]-1])!==o)for(;;)if(c>=o){if(u<=0)break;--u,c=d[a[--h]]}else if(e[u]===r[c]){if(a[h++]=c,++u===i){f=!0
|
|||
|
break}++c}else c=d[c]
|
|||
|
if(f)var g=a,v=h
|
|||
|
else g=s,v=l
|
|||
|
for(var m=0,y=-1,b=0;b<i;++b)y!==(c=g[b])-1&&(m-=c),y=c
|
|||
|
for(f||(m*=1e3),m-=o-i,t.score=m,t.indexes=new Array(v),b=v-1;b>=0;--b)t.indexes[b]=g[b]
|
|||
|
return t},prepareLowerCodes:function(e){for(var t=e.length,n=[],r=e.toLowerCase(),i=0;i<t;++i)n[i]=r.charCodeAt(i)
|
|||
|
return n},prepareBeginningIndexes:function(e){for(var t=e.length,n=[],r=0,i=!1,o=!1,s=0;s<t;++s){var a=e.charCodeAt(s),u=a>=65&&a<=90,c=u||a>=97&&a<=122||a>=48&&a<=57,l=u&&!i||!o||!c
|
|||
|
i=u,o=c,l&&(n[r++]=s)}return n},prepareNextBeginningIndexes:function(e){for(var t=e.length,n=p.prepareBeginningIndexes(e),r=[],i=n[0],o=0,s=0;s<t;++s)i>s?r[s]=i:(i=n[++o],r[s]=void 0===i?t:i)
|
|||
|
return r},cleanup:u,new:t}
|
|||
|
return p}()},e.exports?e.exports=n():t.fuzzysort=n()}(ct)
|
|||
|
var lt=ct.exports,ft={failedTests:[],defined:0,completed:0}
|
|||
|
function ht(e){return e?(""+e).replace(/['"<>&]/g,(function(e){switch(e){case"'":return"'"
|
|||
|
case'"':return"""
|
|||
|
case"<":return"<"
|
|||
|
case">":return">"
|
|||
|
case"&":return"&"}})):""}!function(){if(d&&m){var e=rt.config,t=[],n=!1,r=Object.prototype.hasOwnProperty,i=j({filter:void 0,module:void 0,moduleId:void 0,testId:void 0}),o=null
|
|||
|
rt.on("runStart",(function(e){ft.defined=e.testCounts.total})),rt.begin((function(t){!function(t){var n,s,a,u,l,f,p,b,E=_("qunit")
|
|||
|
E&&(E.setAttribute("role","main"),E.innerHTML="<h1 id='qunit-header'>"+ht(m.title)+"</h1><h2 id='qunit-banner'></h2><div id='qunit-testrunner-toolbar' role='navigation'></div>"+(!(n=rt.config.testId)||n.length<=0?"":"<div id='qunit-filteredTest'>Rerunning selected tests: "+ht(n.join(", "))+" <a id='qunit-clearFilter' href='"+ht(i)+"'>Run all tests</a></div>")+"<h2 id='qunit-userAgent'></h2><ol id='qunit-tests'></ol>"),(s=_("qunit-header"))&&(s.innerHTML="<a href='"+ht(i)+"'>"+s.innerHTML+"</a> "),(a=_("qunit-banner"))&&(a.className=""),p=_("qunit-tests"),(b=_("qunit-testresult"))&&b.parentNode.removeChild(b),p&&(p.innerHTML="",(b=m.createElement("p")).id="qunit-testresult",b.className="result",p.parentNode.insertBefore(b,p),b.innerHTML='<div id="qunit-testresult-display">Running...<br /> </div><div id="qunit-testresult-controls"></div><div class="clearfix"></div>',l=_("qunit-testresult-controls")),l&&l.appendChild(((f=m.createElement("button")).id="qunit-abort-tests-button",f.innerHTML="Abort",h(f,"click",S),f)),(u=_("qunit-userAgent"))&&(u.innerHTML="",u.appendChild(m.createTextNode("QUnit "+rt.version+"; "+y.userAgent))),function(t){var n,i,s,a,u,l=_("qunit-testrunner-toolbar")
|
|||
|
if(l){l.appendChild(((u=m.createElement("span")).innerHTML=function(){for(var t=!1,n=e.urlConfig,i="",o=0;o<n.length;o++){var s=e.urlConfig[o]
|
|||
|
"string"==typeof s&&(s={id:s,label:s})
|
|||
|
var a=ht(s.id),u=ht(s.tooltip)
|
|||
|
if(s.value&&"string"!=typeof s.value){if(i+="<label for='qunit-urlconfig-"+a+"' title='"+u+"'>"+s.label+": </label><select id='qunit-urlconfig-"+a+"' name='"+a+"' title='"+u+"'><option></option>",Array.isArray(s.value))for(var c=0;c<s.value.length;c++)i+="<option value='"+(a=ht(s.value[c]))+"'"+(e[s.id]===s.value[c]?(t=!0)&&" selected='selected'":"")+">"+a+"</option>"
|
|||
|
else for(var l in s.value)r.call(s.value,l)&&(i+="<option value='"+ht(l)+"'"+(e[s.id]===l?(t=!0)&&" selected='selected'":"")+">"+ht(s.value[l])+"</option>")
|
|||
|
e[s.id]&&!t&&(i+="<option value='"+(a=ht(e[s.id]))+"' selected='selected' disabled='disabled'>"+a+"</option>"),i+="</select>"}else i+="<label for='qunit-urlconfig-"+a+"' title='"+u+"'><input id='qunit-urlconfig-"+a+"' name='"+a+"' type='checkbox'"+(s.value?" value='"+ht(s.value)+"'":"")+(e[s.id]?" checked='checked'":"")+" title='"+u+"' />"+ht(s.label)+"</label>"}return i}(),x(u,"qunit-url-config"),v(u.getElementsByTagName("input"),"change",T),v(u.getElementsByTagName("select"),"change",T),u))
|
|||
|
var f=m.createElement("span")
|
|||
|
f.id="qunit-toolbar-filters",f.appendChild((n=m.createElement("form"),i=m.createElement("label"),s=m.createElement("input"),a=m.createElement("button"),x(n,"qunit-filter"),i.innerHTML="Filter: ",s.type="text",s.value=e.filter||"",s.name="filter",s.id="qunit-filter-input",a.innerHTML="Go",i.appendChild(s),n.appendChild(i),n.appendChild(m.createTextNode(" ")),n.appendChild(a),h(n,"submit",C),n)),f.appendChild(function(t){var n=null
|
|||
|
if(o={options:t.modules.slice(),selectedMap:new w,isDirty:function(){return c(o.selectedMap.keys()).sort().join(",")!==c(n.keys()).sort().join(",")}},e.moduleId.length)for(var r=0;r<t.modules.length;r++){var i=t.modules[r];-1!==e.moduleId.indexOf(i.moduleId)&&o.selectedMap.set(i.moduleId,i.name)}n=new w(o.selectedMap)
|
|||
|
var s=m.createElement("input")
|
|||
|
s.id="qunit-modulefilter-search",s.autocomplete="off",h(s,"input",S),h(s,"input",_),h(s,"focus",_),h(s,"click",_)
|
|||
|
var a=m.createElement("label")
|
|||
|
a.htmlFor="qunit-modulefilter-search",a.textContent="Module:"
|
|||
|
var u=m.createElement("span")
|
|||
|
u.id="qunit-modulefilter-search-container",u.appendChild(s)
|
|||
|
var l=m.createElement("button")
|
|||
|
l.textContent="Apply",l.title="Re-run the selected test modules",h(l,"click",N)
|
|||
|
var f=m.createElement("button")
|
|||
|
f.textContent="Reset",f.type="reset",f.title="Restore the previous module selection"
|
|||
|
var p=m.createElement("button")
|
|||
|
p.textContent="Select none",p.type="button",p.title="Clear the current module selection",h(p,"click",(function(){o.selectedMap.clear(),T(),S()}))
|
|||
|
var v=m.createElement("span")
|
|||
|
v.id="qunit-modulefilter-actions",v.appendChild(l),v.appendChild(f),n.size&&v.appendChild(p)
|
|||
|
var y=m.createElement("ul")
|
|||
|
y.id="qunit-modulefilter-dropdown-list"
|
|||
|
var b=m.createElement("div")
|
|||
|
b.id="qunit-modulefilter-dropdown",b.style.display="none",b.appendChild(v),b.appendChild(y),h(b,"change",T),u.appendChild(b),T()
|
|||
|
var x,E=m.createElement("form")
|
|||
|
function _(){function e(t){var n=E.contains(t.target)
|
|||
|
27!==t.keyCode&&n||(27===t.keyCode&&n&&s.focus(),b.style.display="none",g(m,"click",e),g(m,"keydown",e),s.value="",S())}"none"===b.style.display&&(S(),b.style.display="block",h(m,"click",e),h(m,"keydown",e))}function S(){d.clearTimeout(x),x=d.setTimeout((function(){y.innerHTML=function(e){return function(e){var t=""
|
|||
|
o.selectedMap.forEach((function(e,n){t+=M(n,e,!0)}))
|
|||
|
for(var n=0;n<e.length;n++){var r=e[n].obj
|
|||
|
o.selectedMap.has(r.moduleId)||(t+=M(r.moduleId,r.name,!1))}return t}(""===e?o.options.slice(0,20).map((function(e){return{obj:e}})):lt.go(e,o.options,{limit:20,key:"name",allowTypo:!0}))}(s.value)}))}function T(e){var t=e&&e.target||null
|
|||
|
t&&(t.checked?o.selectedMap.set(t.value,t.parentNode.textContent):o.selectedMap.delete(t.value),k(t.parentNode,"checked",t.checked))
|
|||
|
var n=o.selectedMap.size?o.selectedMap.size+" "+(1===o.selectedMap.size?"module":"modules"):"All modules"
|
|||
|
s.placeholder=n,s.title="Type to search through and reduce the list.",f.disabled=!o.isDirty(),p.style.display=o.selectedMap.size?"":"none"}return E.id="qunit-modulefilter",E.appendChild(a),E.appendChild(m.createTextNode(" ")),E.appendChild(u),h(E,"submit",C),h(E,"reset",(function(){o.selectedMap=new w(n),T(),S()})),E}(t))
|
|||
|
var p=m.createElement("div")
|
|||
|
p.className="clearfix",l.appendChild(f),l.appendChild(p)}}(t)}(t)})),rt.on("runEnd",(function(t){var n,r,i,o=_("qunit-banner"),s=_("qunit-tests"),a=_("qunit-abort-tests-button"),u=e.stats.all-e.stats.bad,c=[t.testCounts.total," tests completed in ",t.runtime," milliseconds, with ",t.testCounts.failed," failed, ",t.testCounts.skipped," skipped, and ",t.testCounts.todo," todo.<br />","<span class='passed'>",u,"</span> assertions of <span class='total'>",e.stats.all,"</span> passed, <span class='failed'>",e.stats.bad,"</span> failed.",A(ft.failedTests)].join("")
|
|||
|
if(a&&a.disabled){c="Tests aborted after "+t.runtime+" milliseconds."
|
|||
|
for(var l=0;l<s.children.length;l++)""!==(n=s.children[l]).className&&"running"!==n.className||(n.className="aborted",i=n.getElementsByTagName("ol")[0],(r=m.createElement("li")).className="fail",r.innerHTML="Test aborted.",i.appendChild(r))}!o||a&&!1!==a.disabled||(o.className="failed"===t.status?"qunit-fail":"qunit-pass"),a&&a.parentNode.removeChild(a),s&&(_("qunit-testresult-display").innerHTML=c),e.altertitle&&m.title&&(m.title=["failed"===t.status?"✖":"✔",m.title.replace(/^[\u2714\u2716] /i,"")].join(" ")),e.scrolltop&&d.scrollTo&&d.scrollTo(0,0)})),rt.testStart((function(e){var t,n
|
|||
|
q(e.name,e.testId,e.module),(t=_("qunit-testresult-display"))&&(x(t,"running"),n=rt.config.reorder&&e.previousFailure,t.innerHTML=[F(ft),n?"Rerunning previously failed test: <br />":"Running: ",R(e.name,e.module),A(ft.failedTests)].join(""))})),rt.log((function(e){var t=_("qunit-test-output-"+e.testId)
|
|||
|
if(t){var n,i,o,s=ht(e.message)||(e.result?"okay":"failed")
|
|||
|
s="<span class='test-message'>"+s+"</span>",s+="<span class='runtime'>@ "+e.runtime+" ms</span>"
|
|||
|
var a=!1
|
|||
|
!e.result&&r.call(e,"expected")?(n=e.negative?"NOT "+rt.dump.parse(e.expected):rt.dump.parse(e.expected),i=rt.dump.parse(e.actual),s+="<table><tr class='test-expected'><th>Expected: </th><td><pre>"+ht(n)+"</pre></td></tr>",i!==n?(s+="<tr class='test-actual'><th>Result: </th><td><pre>"+ht(i)+"</pre></td></tr>","number"==typeof e.actual&&"number"==typeof e.expected?isNaN(e.actual)||isNaN(e.expected)||(a=!0,o=((o=e.actual-e.expected)>0?"+":"")+o):"boolean"!=typeof e.actual&&"boolean"!=typeof e.expected&&(a=P(o=rt.diff(n,i)).length!==P(n).length+P(i).length),a&&(s+="<tr class='test-diff'><th>Diff: </th><td><pre>"+o+"</pre></td></tr>")):-1!==n.indexOf("[object Array]")||-1!==n.indexOf("[object Object]")?s+="<tr class='test-message'><th>Message: </th><td>Diff suppressed as the depth of object is more than current max depth ("+rt.config.maxDepth+").<p>Hint: Use <code>QUnit.dump.maxDepth</code> to run with a higher max depth or <a href='"+ht(j({maxDepth:-1}))+"'>Rerun</a> without max depth.</p></td></tr>":s+="<tr class='test-message'><th>Message: </th><td>Diff suppressed as the expected and actual results have an equivalent serialization</td></tr>",e.source&&(s+="<tr class='test-source'><th>Source: </th><td><pre>"+ht(e.source)+"</pre></td></tr>"),s+="</table>"):!e.result&&e.source&&(s+="<table><tr class='test-source'><th>Source: </th><td><pre>"+ht(e.source)+"</pre></td></tr></table>")
|
|||
|
var u=t.getElementsByTagName("ol")[0],c=m.createElement("li")
|
|||
|
c.className=e.result?"pass":"fail",c.innerHTML=s,u.appendChild(c)}})),rt.testDone((function(r){var i=_("qunit-tests"),o=_("qunit-test-output-"+r.testId)
|
|||
|
if(i&&o){var s
|
|||
|
E(o,"running"),s=r.failed>0?"failed":r.todo?"todo":r.skipped?"skipped":"passed"
|
|||
|
var a=o.getElementsByTagName("ol")[0],u=r.passed,c=r.failed,l=r.failed>0?r.todo:!r.todo
|
|||
|
l?x(a,"qunit-collapsed"):(ft.failedTests.push(r.testId),e.collapse&&(n?x(a,"qunit-collapsed"):n=!0))
|
|||
|
var f=o.firstChild,d=c?"<b class='failed'>"+c+"</b>, <b class='passed'>"+u+"</b>, ":""
|
|||
|
if(f.innerHTML+=" <b class='counts'>("+d+r.assertions.length+")</b>",ft.completed++,r.skipped){o.className="skipped"
|
|||
|
var p=m.createElement("em")
|
|||
|
p.className="qunit-skipped-label",p.innerHTML="skipped",o.insertBefore(p,f)}else{if(h(f,"click",(function(){k(a,"qunit-collapsed")})),o.className=l?"pass":"fail",r.todo){var g=m.createElement("em")
|
|||
|
g.className="qunit-todo-label",g.innerHTML="todo",o.className+=" todo",o.insertBefore(g,f)}var v=m.createElement("span")
|
|||
|
v.className="runtime",v.innerHTML=r.runtime+" ms",o.insertBefore(v,a)}if(r.source){var y=m.createElement("p")
|
|||
|
y.innerHTML="<strong>Source: </strong>"+ht(r.source),x(y,"qunit-source"),l&&x(y,"qunit-collapsed"),h(f,"click",(function(){k(y,"qunit-collapsed")})),o.appendChild(y)}e.hidepassed&&("passed"===s||r.skipped)&&(t.push(o),i.removeChild(o))}})),rt.on("error",(function(e){var t=q("global failure")
|
|||
|
if(t){var n=ht(I(e))
|
|||
|
n="<span class='test-message'>"+n+"</span>",e&&e.stack&&(n+="<table><tr class='test-source'><th>Source: </th><td><pre>"+ht(e.stack)+"</pre></td></tr></table>")
|
|||
|
var r=t.getElementsByTagName("ol")[0],i=m.createElement("li")
|
|||
|
i.className="fail",i.innerHTML=n,r.appendChild(i),t.className="fail"}}))
|
|||
|
var s,a=(s=d.phantom)&&s.version&&s.version.major>0
|
|||
|
a&&p.warn("Support for PhantomJS is deprecated and will be removed in QUnit 3.0."),a||"complete"!==m.readyState?h(d,"load",rt.load):rt.load()
|
|||
|
var u=d.onerror
|
|||
|
d.onerror=function(t,n,r,i,o){var s=!1
|
|||
|
if(u){for(var a=arguments.length,c=new Array(a>5?a-5:0),l=5;l<a;l++)c[l-5]=arguments[l]
|
|||
|
s=u.call.apply(u,[this,t,n,r,i,o].concat(c))}if(!0!==s){if(e.current&&e.current.ignoreGlobalErrors)return!0
|
|||
|
var f=o||new Error(t)
|
|||
|
!f.stack&&n&&r&&(f.stack="".concat(n,":").concat(r)),rt.onUncaughtException(f)}return s},d.addEventListener("unhandledrejection",(function(e){rt.onUncaughtException(e.reason)}))}function f(e){return"function"==typeof e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function h(e,t,n){e.addEventListener(t,n,!1)}function g(e,t,n){e.removeEventListener(t,n,!1)}function v(e,t,n){for(var r=e.length;r--;)h(e[r],t,n)}function b(e,t){return(" "+e.className+" ").indexOf(" "+t+" ")>=0}function x(e,t){b(e,t)||(e.className+=(e.className?" ":"")+t)}function k(e,t,n){n||void 0===n&&!b(e,t)?x(e,t):E(e,t)}function E(e,t){for(var n=" "+e.className+" ";n.indexOf(" "+t+" ")>=0;)n=n.replace(" "+t+" "," ")
|
|||
|
e.className=f(n)}function _(e){return m.getElementById&&m.getElementById(e)}function S(){var e=_("qunit-abort-tests-button")
|
|||
|
return e&&(e.disabled=!0,e.innerHTML="Aborting..."),rt.config.queue.length=0,!1}function C(e){var t=_("qunit-filter-input")
|
|||
|
return t.value=f(t.value),N(),e&&e.preventDefault&&e.preventDefault(),!1}function T(){var n,r=this,i={}
|
|||
|
n="selectedIndex"in r?r.options[r.selectedIndex].value||void 0:r.checked?r.defaultValue||!0:void 0,i[r.name]=n
|
|||
|
var o=j(i)
|
|||
|
if("hidepassed"===r.name&&"replaceState"in d.history){rt.urlParams[r.name]=n,e[r.name]=n||!1
|
|||
|
var s=_("qunit-tests")
|
|||
|
if(s){var a=s.children.length,u=s.children
|
|||
|
if(r.checked){for(var c=0;c<a;c++){var f=u[c],h=f?f.className:"",p=h.indexOf("pass")>-1,g=h.indexOf("skipped")>-1;(p||g)&&t.push(f)}var v,m=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]
|
|||
|
if(!n){if(Array.isArray(e)||(n=l(e))){n&&(e=n)
|
|||
|
var r=0,i=function(){}
|
|||
|
return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,s=!0,a=!1
|
|||
|
return{s:function(){n=n.call(e)},n:function(){var e=n.next()
|
|||
|
return s=e.done,e},e:function(e){a=!0,o=e},f:function(){try{s||null==n.return||n.return()}finally{if(a)throw o}}}}(t)
|
|||
|
try{for(m.s();!(v=m.n()).done;){var y=v.value
|
|||
|
s.removeChild(y)}}catch(e){m.e(e)}finally{m.f()}}else for(var b;null!=(b=t.pop());)s.appendChild(b)}d.history.replaceState(null,"",o)}else d.location=o}function j(e){var t="?",n=d.location
|
|||
|
for(var i in e=O(O({},rt.urlParams),e))if(r.call(e,i)&&void 0!==e[i])for(var o=[].concat(e[i]),s=0;s<o.length;s++)t+=encodeURIComponent(i),!0!==o[s]&&(t+="="+encodeURIComponent(o[s])),t+="&"
|
|||
|
return n.protocol+"//"+n.host+n.pathname+t.slice(0,-1)}function N(){var e=_("qunit-filter-input").value
|
|||
|
d.location=j({filter:""===e?void 0:e,moduleId:c(o.selectedMap.keys()),module:void 0,testId:void 0})}function M(e,t,n){return'<li><label class="clickable'+(n?" checked":"")+'"><input type="checkbox" value="'+ht(e)+'"'+(n?' checked="checked"':"")+" />"+ht(t)+"</label></li>"}function q(e,t,n){var r=_("qunit-tests")
|
|||
|
if(r){var i=m.createElement("strong")
|
|||
|
i.innerHTML=R(e,n)
|
|||
|
var o=m.createElement("li")
|
|||
|
if(o.appendChild(i),void 0!==t){var s=m.createElement("a")
|
|||
|
s.innerHTML="Rerun",s.href=j({testId:t}),o.id="qunit-test-output-"+t,o.appendChild(s)}var a=m.createElement("ol")
|
|||
|
return a.className="qunit-assert-list",o.appendChild(a),r.appendChild(o),o}}function A(e){return 0===e.length?"":["<br /><a href='"+ht(j({testId:e}))+"'>",1===e.length?"Rerun 1 failed test":"Rerun "+e.length+" failed tests","</a>"].join("")}function R(e,t){var n=""
|
|||
|
return t&&(n="<span class='module-name'>"+ht(t)+"</span>: "),n+"<span class='test-name'>"+ht(e)+"</span>"}function F(e){return[e.completed," / ",e.defined," tests completed.<br />"].join("")}function P(e){return e.replace(/<\/?[^>]+(>|$)/g,"").replace(/"/g,"").replace(/\s+/g,"")}}(),rt.diff=function(){function e(){}var t=-1,n=Object.prototype.hasOwnProperty
|
|||
|
return e.prototype.DiffMain=function(e,t,n){var r=Date.now()+1e3
|
|||
|
if(null===e||null===t)throw new Error("Cannot diff null input.")
|
|||
|
if(e===t)return e?[[0,e]]:[]
|
|||
|
void 0===n&&(n=!0)
|
|||
|
var i=this.diffCommonPrefix(e,t),o=e.substring(0,i)
|
|||
|
e=e.substring(i),t=t.substring(i),i=this.diffCommonSuffix(e,t)
|
|||
|
var s=e.substring(e.length-i)
|
|||
|
e=e.substring(0,e.length-i),t=t.substring(0,t.length-i)
|
|||
|
var a=this.diffCompute(e,t,n,r)
|
|||
|
return o&&a.unshift([0,o]),s&&a.push([0,s]),this.diffCleanupMerge(a),a},e.prototype.diffCleanupEfficiency=function(e){var n,r,i,o,s,a,u,c,l
|
|||
|
for(n=!1,r=[],i=0,o=null,s=0,a=!1,u=!1,c=!1,l=!1;s<e.length;)0===e[s][0]?(e[s][1].length<4&&(c||l)?(r[i++]=s,a=c,u=l,o=e[s][1]):(i=0,o=null),c=l=!1):(e[s][0]===t?l=!0:c=!0,o&&(a&&u&&c&&l||o.length<2&&a+u+c+l===3)&&(e.splice(r[i-1],0,[t,o]),e[r[i-1]+1][0]=1,i--,o=null,a&&u?(c=l=!0,i=0):(s=--i>0?r[i-1]:-1,c=l=!1),n=!0)),s++
|
|||
|
n&&this.diffCleanupMerge(e)},e.prototype.diffPrettyHtml=function(e){for(var n=[],r=0;r<e.length;r++){var i=e[r][0],o=e[r][1]
|
|||
|
switch(i){case 1:n[r]="<ins>"+ht(o)+"</ins>"
|
|||
|
break
|
|||
|
case t:n[r]="<del>"+ht(o)+"</del>"
|
|||
|
break
|
|||
|
case 0:n[r]="<span>"+ht(o)+"</span>"}}return n.join("")},e.prototype.diffCommonPrefix=function(e,t){var n,r,i,o
|
|||
|
if(!e||!t||e.charAt(0)!==t.charAt(0))return 0
|
|||
|
for(i=0,n=r=Math.min(e.length,t.length),o=0;i<n;)e.substring(o,n)===t.substring(o,n)?o=i=n:r=n,n=Math.floor((r-i)/2+i)
|
|||
|
return n},e.prototype.diffCommonSuffix=function(e,t){var n,r,i,o
|
|||
|
if(!e||!t||e.charAt(e.length-1)!==t.charAt(t.length-1))return 0
|
|||
|
for(i=0,n=r=Math.min(e.length,t.length),o=0;i<n;)e.substring(e.length-n,e.length-o)===t.substring(t.length-n,t.length-o)?o=i=n:r=n,n=Math.floor((r-i)/2+i)
|
|||
|
return n},e.prototype.diffCompute=function(e,n,r,i){var o,s,a,u,c,l,f,h,d,p,g,v
|
|||
|
return e?n?(s=e.length>n.length?e:n,a=e.length>n.length?n:e,-1!==(u=s.indexOf(a))?(o=[[1,s.substring(0,u)],[0,a],[1,s.substring(u+a.length)]],e.length>n.length&&(o[0][0]=o[2][0]=t),o):1===a.length?[[t,e],[1,n]]:(c=this.diffHalfMatch(e,n))?(l=c[0],h=c[1],f=c[2],d=c[3],p=c[4],g=this.DiffMain(l,f,r,i),v=this.DiffMain(h,d,r,i),g.concat([[0,p]],v)):r&&e.length>100&&n.length>100?this.diffLineMode(e,n,i):this.diffBisect(e,n,i)):[[t,e]]:[[1,n]]},e.prototype.diffHalfMatch=function(e,t){var n,r,i,o,s,a,u,c,l,f
|
|||
|
if(n=e.length>t.length?e:t,r=e.length>t.length?t:e,n.length<4||2*r.length<n.length)return null
|
|||
|
function h(e,t,n){var r,o,s,a,u,c,l,f,h
|
|||
|
for(r=e.substring(n,n+Math.floor(e.length/4)),o=-1,s="";-1!==(o=t.indexOf(r,o+1));)a=i.diffCommonPrefix(e.substring(n),t.substring(o)),u=i.diffCommonSuffix(e.substring(0,n),t.substring(0,o)),s.length<u+a&&(s=t.substring(o-u,o)+t.substring(o,o+a),c=e.substring(0,n-u),l=e.substring(n+a),f=t.substring(0,o-u),h=t.substring(o+a))
|
|||
|
return 2*s.length>=e.length?[c,l,f,h,s]:null}return i=this,c=h(n,r,Math.ceil(n.length/4)),l=h(n,r,Math.ceil(n.length/2)),c||l?(f=l?c&&c[4].length>l[4].length?c:l:c,e.length>t.length?(o=f[0],u=f[1],a=f[2],s=f[3]):(a=f[0],s=f[1],o=f[2],u=f[3]),[o,u,a,s,f[4]]):null},e.prototype.diffLineMode=function(e,n,r){var i,o,s,a,u,c,l,f,h
|
|||
|
for(e=(i=this.diffLinesToChars(e,n)).chars1,n=i.chars2,s=i.lineArray,o=this.DiffMain(e,n,!1,r),this.diffCharsToLines(o,s),this.diffCleanupSemantic(o),o.push([0,""]),a=0,c=0,u=0,f="",l="";a<o.length;){switch(o[a][0]){case 1:u++,l+=o[a][1]
|
|||
|
break
|
|||
|
case t:c++,f+=o[a][1]
|
|||
|
break
|
|||
|
case 0:if(c>=1&&u>=1){for(o.splice(a-c-u,c+u),a=a-c-u,h=(i=this.DiffMain(f,l,!1,r)).length-1;h>=0;h--)o.splice(a,0,i[h])
|
|||
|
a+=i.length}u=0,c=0,f="",l=""}a++}return o.pop(),o},e.prototype.diffBisect=function(e,n,r){var i,o,s,a,u,c,l,f,h,d,p,g,v,m,y,b,w,x,k,E,_,S,C
|
|||
|
for(i=e.length,o=n.length,a=s=Math.ceil((i+o)/2),u=2*s,c=new Array(u),l=new Array(u),f=0;f<u;f++)c[f]=-1,l[f]=-1
|
|||
|
for(c[a+1]=0,l[a+1]=0,d=(h=i-o)%2!=0,p=0,g=0,v=0,m=0,_=0;_<s&&!(Date.now()>r);_++){for(S=-_+p;S<=_-g;S+=2){for(b=a+S,k=(w=S===-_||S!==_&&c[b-1]<c[b+1]?c[b+1]:c[b-1]+1)-S;w<i&&k<o&&e.charAt(w)===n.charAt(k);)w++,k++
|
|||
|
if(c[b]=w,w>i)g+=2
|
|||
|
else if(k>o)p+=2
|
|||
|
else if(d&&(y=a+h-S)>=0&&y<u&&-1!==l[y]&&w>=(x=i-l[y]))return this.diffBisectSplit(e,n,w,k,r)}for(C=-_+v;C<=_-m;C+=2){for(y=a+C,E=(x=C===-_||C!==_&&l[y-1]<l[y+1]?l[y+1]:l[y-1]+1)-C;x<i&&E<o&&e.charAt(i-x-1)===n.charAt(o-E-1);)x++,E++
|
|||
|
if(l[y]=x,x>i)m+=2
|
|||
|
else if(E>o)v+=2
|
|||
|
else if(!d&&(b=a+h-C)>=0&&b<u&&-1!==c[b]&&(k=a+(w=c[b])-b,w>=(x=i-x)))return this.diffBisectSplit(e,n,w,k,r)}}return[[t,e],[1,n]]},e.prototype.diffBisectSplit=function(e,t,n,r,i){var o,s,a,u,c,l
|
|||
|
return o=e.substring(0,n),a=t.substring(0,r),s=e.substring(n),u=t.substring(r),c=this.DiffMain(o,a,!1,i),l=this.DiffMain(s,u,!1,i),c.concat(l)},e.prototype.diffCleanupSemantic=function(e){for(var n,r,i,o,s=!1,a=[],u=0,c=null,l=0,f=0,h=0,d=0,p=0;l<e.length;)0===e[l][0]?(a[u++]=l,f=d,h=p,d=0,p=0,c=e[l][1]):(1===e[l][0]?d+=e[l][1].length:p+=e[l][1].length,c&&c.length<=Math.max(f,h)&&c.length<=Math.max(d,p)&&(e.splice(a[u-1],0,[t,c]),e[a[u-1]+1][0]=1,u--,l=--u>0?a[u-1]:-1,f=0,h=0,d=0,p=0,c=null,s=!0)),l++
|
|||
|
for(s&&this.diffCleanupMerge(e),l=1;l<e.length;)e[l-1][0]===t&&1===e[l][0]&&(n=e[l-1][1],r=e[l][1],(i=this.diffCommonOverlap(n,r))>=(o=this.diffCommonOverlap(r,n))?(i>=n.length/2||i>=r.length/2)&&(e.splice(l,0,[0,r.substring(0,i)]),e[l-1][1]=n.substring(0,n.length-i),e[l+1][1]=r.substring(i),l++):(o>=n.length/2||o>=r.length/2)&&(e.splice(l,0,[0,n.substring(0,o)]),e[l-1][0]=1,e[l-1][1]=r.substring(0,r.length-o),e[l+1][0]=t,e[l+1][1]=n.substring(o),l++),l++),l++},e.prototype.diffCommonOverlap=function(e,t){var n=e.length,r=t.length
|
|||
|
if(0===n||0===r)return 0
|
|||
|
n>r?e=e.substring(n-r):n<r&&(t=t.substring(0,n))
|
|||
|
var i=Math.min(n,r)
|
|||
|
if(e===t)return i
|
|||
|
for(var o=0,s=1;;){var a=e.substring(i-s),u=t.indexOf(a)
|
|||
|
if(-1===u)return o
|
|||
|
s+=u,0!==u&&e.substring(i-s)!==t.substring(0,s)||(o=s,s++)}},e.prototype.diffLinesToChars=function(e,t){var r=[],i={}
|
|||
|
function o(e){for(var t="",o=0,s=-1,a=r.length;s<e.length-1;){-1===(s=e.indexOf("\n",o))&&(s=e.length-1)
|
|||
|
var u=e.substring(o,s+1)
|
|||
|
o=s+1,n.call(i,u)?t+=String.fromCharCode(i[u]):(t+=String.fromCharCode(a),i[u]=a,r[a++]=u)}return t}return r[0]="",{chars1:o(e),chars2:o(t),lineArray:r}},e.prototype.diffCharsToLines=function(e,t){for(var n=0;n<e.length;n++){for(var r=e[n][1],i=[],o=0;o<r.length;o++)i[o]=t[r.charCodeAt(o)]
|
|||
|
e[n][1]=i.join("")}},e.prototype.diffCleanupMerge=function(e){e.push([0,""])
|
|||
|
for(var n=0,r=0,i=0,o="",s="";n<e.length;)switch(e[n][0]){case 1:i++,s+=e[n][1],n++
|
|||
|
break
|
|||
|
case t:r++,o+=e[n][1],n++
|
|||
|
break
|
|||
|
case 0:if(r+i>1){if(0!==r&&0!==i){var a=this.diffCommonPrefix(s,o)
|
|||
|
0!==a&&(n-r-i>0&&0===e[n-r-i-1][0]?e[n-r-i-1][1]+=s.substring(0,a):(e.splice(0,0,[0,s.substring(0,a)]),n++),s=s.substring(a),o=o.substring(a)),0!==(a=this.diffCommonSuffix(s,o))&&(e[n][1]=s.substring(s.length-a)+e[n][1],s=s.substring(0,s.length-a),o=o.substring(0,o.length-a))}0===r?e.splice(n-i,r+i,[1,s]):0===i?e.splice(n-r,r+i,[t,o]):e.splice(n-r-i,r+i,[t,o],[1,s]),n=n-r-i+(r?1:0)+(i?1:0)+1}else 0!==n&&0===e[n-1][0]?(e[n-1][1]+=e[n][1],e.splice(n,1)):n++
|
|||
|
i=0,r=0,o="",s=""}""===e[e.length-1][1]&&e.pop()
|
|||
|
var u=!1
|
|||
|
for(n=1;n<e.length-1;){if(0===e[n-1][0]&&0===e[n+1][0]){var c=e[n][1]
|
|||
|
c.substring(c.length-e[n-1][1].length)===e[n-1][1]?(e[n][1]=e[n-1][1]+e[n][1].substring(0,e[n][1].length-e[n-1][1].length),e[n+1][1]=e[n-1][1]+e[n+1][1],e.splice(n-1,1),u=!0):c.substring(0,e[n+1][1].length)===e[n+1][1]&&(e[n-1][1]+=e[n+1][1],e[n][1]=e[n][1].substring(e[n+1][1].length)+e[n+1][1],e.splice(n+1,1),u=!0)}n++}u&&this.diffCleanupMerge(e)},function(t,n){var r,i
|
|||
|
return i=(r=new e).DiffMain(t,n),r.diffCleanupEfficiency(i),r.diffPrettyHtml(i)}}()}()},1627:(e,t,n)=>{"use strict"
|
|||
|
var r=n(1996)
|
|||
|
e.exports=function(e){function t(e){var t=e?[].concat(e):[]
|
|||
|
return t.in_array=r.curry(t,n,t),t.each=r.curry(t,o,t),t.each_async=r.curry(t,s,t),t.collect=r.curry(t,a,t),t.collect_async=r.curry(t,u,t),t.flatten=r.curry(t,i,t),t.inject=r.curry(t,c,t),t.push_all=r.curry(t,l,t),t.fill=r.curry(t,f,t),t.find_all=r.curry(t,h,t),t.find=r.curry(t,d,t),t.last=r.curry(t,p,t),t.naked=r.curry(t,g,t),t}function n(e,t){for(var n=0;n<e.length;n++)if(e[n]===t)return!0}function i(e){if(!function(e){return"[object Array]"===Object.prototype.toString.call(e)}(e))return[e]
|
|||
|
if(0===e.length)return e
|
|||
|
var n=i(e[0]),r=i(e.slice(1))
|
|||
|
return t(n.concat(r))}function o(e,t){for(var n,r=0;r<e.length;r++)n=t(e[r],r)
|
|||
|
return n}function s(e,t,n){if(n=n||r.noop,!e.length)return n()
|
|||
|
var i=0,o=function(){t(e[i],i,(function(t,r){return t?n(t):++i>=e.length?n(null,r):void o()}))}
|
|||
|
o()}function a(e,n){for(var r=t(),i=0;i<e.length;i++)r.push(n(e[i],i))
|
|||
|
return r}function u(e,n,r){var i=t()
|
|||
|
s(e,(function(e,t,r){n(e,t,(function(e){if(e)return r(e)
|
|||
|
i.push_all(Array.prototype.splice.call(arguments,1)),r()}))}),(function(e){if(e)return r(e)
|
|||
|
r(null,i)}))}function c(e,t,n){for(var r=t,i=0;i<e.length;i++)r=n(r,e[i])
|
|||
|
return r}function l(e,t){t=t?[].concat(t):[]
|
|||
|
for(var n=0;n<t.length;n++)e.push(t[n])
|
|||
|
return e}function f(e,t,n){for(var r=0;r<n;r++)e.push(t)
|
|||
|
return e}function h(e,n){for(var r=t(),i=0;i<e.length;i++)n(e[i],i)&&r.push(e[i])
|
|||
|
return r}function d(e,t){for(var n,r=0;r<e.length;r++)if(t(e[r],r)){n=e[r]
|
|||
|
break}return n}function p(e){return e[e.length-1]}function g(e){return[].concat(e)}return t(e)}},2880:(e,t,n)=>{"use strict"
|
|||
|
var r=n(7131),i=n(2062),o=n(8090),s=n(1627)
|
|||
|
e.exports=function(e,t,n){var a=[]
|
|||
|
function u(){return 0===a.length}function c(){return a.length>1&&a[0].score.equals(a[1].score)}function l(){return a.find_all(h).collect(d).join(", ")}function f(e,t){return t.score.compare(e.score)}function h(e){return e.score.equals(a[0].score)}function d(e){return e.macro.toString()}this.validate=function(){return u()?{step:e,valid:!1,reason:"Undefined Step"}:c()?{step:e,valid:!1,reason:"Ambiguous Step (Patterns ["+l()+"] are all equally good candidates)"}:{step:e,valid:!0,winner:this.winner()}},this.clear_winner=function(){if(u())throw new Error("Undefined Step: ["+e+"]")
|
|||
|
if(c())throw new Error("Ambiguous Step: ["+e+"]. Patterns ["+l()+"] match equally well.")
|
|||
|
return this.winner()},this.winner=function(){return a[0].macro},function(e,t){a=t.collect((function(t){return{macro:t,score:new o([new r(e,t.levenshtein_signature()),new i(t,n)])}})).sort(f)}(e,s(t))}},891:e=>{"use strict"
|
|||
|
var t=function(e){this.pTFUHht733hM6wfnruGLgAu6Uqvy7MVp=!0,this.properties={},this.merge=function(e){return e&&e.pTFUHht733hM6wfnruGLgAu6Uqvy7MVp?this.merge(e.properties):new t(this.properties)._merge(e)},this._merge=function(e){for(var t in e)this.properties[t]=e[t]
|
|||
|
return this},this._merge(e)}
|
|||
|
e.exports=t},6754:(e,t,n)=>{"use strict"
|
|||
|
var r=n(1627),i=n(7191),o=n(1234),s=function(e){e=e||"$"
|
|||
|
var t={},n=new i(new RegExp("(?:^|[^\\\\])\\"+e+"(\\w+)","g")),a=new RegExp("(\\"+e+"\\w+)"),u=this
|
|||
|
function c(t,n){return l(t).each((function(r){if(n.in_array(r))throw new Error("Circular Definition: ["+n.join(", ")+"]")
|
|||
|
var i=f(r,n)
|
|||
|
return t=t.replace(e+r,i)}))}function l(e){return n.groups(e)}function f(e,n){var r=t[e]?t[e].pattern:"(.+)"
|
|||
|
return p(r)?u.expand(r,n.concat(e)).pattern:r}function h(e){return e.toString().replace(/^\/|\/$/g,"")}function d(e){return!!t[e]}function p(e){return n.test(e)}function g(e){return r(e.split(a)).inject(r(),(function(e,n){return e.push_all(p(n)?function(e){return l(e).inject(r(),(function(e,n){return d(n)?e.push_all(t[n].converters):e.push_all(g(f(n,[])))}))}(n):v(n))}))}function v(e){return r().fill(o,m(e))}function m(e){return new RegExp(e+"|").exec("").length-1}this.define=function(e,n,i){if(d(e))throw new Error("Duplicate term: ["+e+"]")
|
|||
|
if(i&&p(n))throw new Error("Expandable terms cannot use converters: ["+e+"]")
|
|||
|
if(i&&!function(e,t){return function(e){return r(e).inject(0,(function(e,t){return e+t.length-1}))}(e)===m(t)}(i,n))throw new Error("Wrong number of converters for: ["+e+"]")
|
|||
|
return p(n)||i||(i=v(n)),t[e]={pattern:h(n),converters:r(i)},this},this.merge=function(t){if(t._prefix()!==this._prefix())throw new Error("Cannot merge dictionaries with different prefixes")
|
|||
|
return new s(e)._merge(this)._merge(t)},this._merge=function(e){return e.each((function(e,t){u.define(e,t.pattern)})),this},this._prefix=function(){return e},this.each=function(e){for(var n in t)e(n,t[n])},this.expand=function(e,t){var n=h(e)
|
|||
|
return p(n)?{pattern:c(n,r(t)),converters:g(n)}:{pattern:n,converters:g(n)}}}
|
|||
|
e.exports=s},1235:(e,t,n)=>{"use strict"
|
|||
|
var r=n(1627),i=n(1996),o=new function(){var e=r()
|
|||
|
this.send=function(e,n,r){return 1===arguments.length?this.send(e,{}):2===arguments.length&&i.is_function(n)?this.send(e,{},n):(t(e,n),r&&r(),this)},this.on=function(t,n){return e.push({pattern:t,callback:n}),this}
|
|||
|
var t=function(e,t){n(e).each((function(n){n({name:e,data:t})}))},n=function(t){return e.find_all((function(e){return new RegExp(e.pattern).test(t)})).collect((function(e){return e.callback}))}}
|
|||
|
e.exports={instance:function(){return o},ON_SCENARIO:"__ON_SCENARIO__",ON_STEP:"__ON_STEP__",ON_EXECUTE:"__ON_EXECUTE__",ON_DEFINE:"__ON_DEFINE__"}},5748:(e,t,n)=>{"use strict"
|
|||
|
var r=n(29),i=function(e){this.constructor(e,/.*\.(?:feature|spec|specification)$/)}
|
|||
|
i.prototype=new r,e.exports=i},29:(e,t,n)=>{"use strict"
|
|||
|
var r=n(4061),i=r.path,o=r.fs,s=n(1627)
|
|||
|
e.exports=function(e,t){t=t||/.*/,this.each=function(e){this.list().forEach(e)},this.list=function(){return s(e).inject(s(),(function(e,t){return e.concat(n(t).find_all(f))}))}
|
|||
|
var n=function(e){return s(r(e).concat(a(e)))},r=function(e){return u(e).find_all(c)},a=function(e){return u(e).find_all(l).inject(s(),(function(e,t){return e.concat(n(t))}))},u=function(e){return o.existsSync(e)?s(o.readdirSync(e)).collect((function(t){return i.join(e,t)})):s()},c=function(e){return!l(e)},l=function(e){return o.statSync(e).isDirectory()},f=function(e){return s(t).find((function(t){return new RegExp(t).test(e)}))}}},7774:(e,t,n)=>{"use strict"
|
|||
|
var r=n(2880),i=n(891),o=n(1235),s=n(1627),a=n(1996)
|
|||
|
e.exports=function(e){e=s(e)
|
|||
|
var t,n=o.instance(),u=this
|
|||
|
function c(e){return!e.valid}function l(e){return e.step+(e.valid?"":" <-- "+e.reason)}this.requires=function(t){return e.push_all(t),this},this.validate=function(e){var n=s(e).collect((function(e){var n=u.rank_macros(e).validate()
|
|||
|
return t=n.winner,n}))
|
|||
|
if(n.find(c))throw new Error("Scenario cannot be interpreted\n"+n.collect(l).join("\n"))},this.interpret=function(e,t,r){t=(new i).merge(t),n.send(o.ON_SCENARIO,{scenario:e,ctx:t.properties})
|
|||
|
var a=f(t,r)
|
|||
|
s(e).each_async(a,r)}
|
|||
|
var f=function(e,t){var n=function(t,n,r){u.interpret_step(t,e,r)}
|
|||
|
return t?n:a.asynchronize(null,n)}
|
|||
|
this.interpret_step=function(e,r,s){var a=(new i).merge(r)
|
|||
|
n.send(o.ON_STEP,{step:e,ctx:a.properties})
|
|||
|
var u=this.rank_macros(e).clear_winner()
|
|||
|
t=u,u.interpret(e,a||{},s)},this.rank_macros=function(e){return new r(e,h(e),t)}
|
|||
|
var h=function(t){return e.inject([],(function(e,n){return e.concat(n.find_compatible_macros(t))}))}}},5798:(e,t,n)=>{"use strict"
|
|||
|
var r=n(1483),i=n(6754),o=n(1627)
|
|||
|
e.exports=function(e){e=e||new i
|
|||
|
var t=o(),n=this
|
|||
|
this.define=function(e,t,n,r){return o(e).each((function(e){s(e,t,n,r)})),this}
|
|||
|
var s=function(i,o,s,a){if(n.get_macro(i))throw new Error("Duplicate macro: ["+i+"]")
|
|||
|
t.push(new r(i,e.expand(i),o,s,n,a))}
|
|||
|
this.get_macro=function(e){return t.find((function(t){return t.is_identified_by(e)}))},this.find_compatible_macros=function(e){return t.find_all((function(t){return t.can_interpret(e)}))}}},1483:(e,t,n)=>{"use strict"
|
|||
|
var r=n(1996),i=n(1627),o=n(891),s=n(7191),a=n(1235)
|
|||
|
e.exports=function(e,t,n,u,c,l){e=p(e)
|
|||
|
var f=new s(t.pattern),h=(n=n||r.async_noop,a.instance())
|
|||
|
function d(e){return l.mode?"sync"===l.mode:n!==r.async_noop&&n.length!==e.length+1}function p(e){return new RegExp(e).toString()}l=l||{},this.library=c,this.is_identified_by=function(t){return e===p(t)},this.can_interpret=function(e){return f.test(e)},this.interpret=function(e,s,c){var p=new o({step:e}).merge(u).merge(s)
|
|||
|
!function(e,n){var r=0
|
|||
|
i(t.converters).collect((function(t){return function(n){t.apply(null,e.slice(r,r+=t.length-1).concat(n))}})).collect_async((function(e,t,n){e(n)}),n)}(f.groups(e),(function(t,i){if(t)return c(t)
|
|||
|
var o
|
|||
|
h.send(a.ON_EXECUTE,{step:e,ctx:p.properties,pattern:f.toString(),args:i})
|
|||
|
try{o=r.invoke(n,p.properties,d(i)?i:i.concat(c))}catch(t){if(c)return c(t)
|
|||
|
throw t}return function(e){return l.mode?"promise"===l.mode:e&&e.then}(o)?o.then(r.noargs(c)).catch(c):d(i)?c&&c():void 0}))},this.is_sibling=function(e){return e&&e.defined_in(c)},this.defined_in=function(e){return c===e},this.levenshtein_signature=function(){return f.without_expressions()},this.toString=function(){return e},h.send(a.ON_DEFINE,{signature:e,pattern:f.toString()})}},6947:(e,t,n)=>{"use strict"
|
|||
|
e.exports=function(){function e(){return"undefined"!=typeof process&&void 0!==n.g&&!0}function t(){return"undefined"!=typeof window}function r(){return"undefined"!=typeof phantom}return{get_container:function(){return t()?window:r()?phantom:e()?n.g:void 0},is_node:e,is_browser:t,is_phantom:r,is_karma:function(){return"undefined"!=typeof window&&void 0!==window.__karma__}}}},7191:(e,t,n)=>{"use strict"
|
|||
|
var r=n(1627)
|
|||
|
e.exports=function(e){var t=/(^|[^\\\\])\(.*?\)/g,n=/(^|[^\\\\])\[.*?\]/g,i=/(^|[^\\\\])\{.*?\}/g,o=/(^|[^\\\\])\\./g,s=/[^\w\s]/g,a=new RegExp(e)
|
|||
|
this.test=function(e){var t=a.test(e)
|
|||
|
return this.reset(),t},this.groups=function(e){for(var t=r(),n=a.exec(e);n;){var i=n.slice(1,n.length)
|
|||
|
t.push(i),n=a.global&&a.exec(e)}return this.reset(),t.flatten()},this.reset=function(){return a.lastIndex=0,this},this.without_expressions=function(){return a.source.replace(t,"$1").replace(n,"$1").replace(i,"$1").replace(o,"$1").replace(s,"")},this.equals=function(e){return this.toString()===e.toString()},this.toString=function(){return"/"+a.source+"/"}}},3575:e=>{"use strict"
|
|||
|
e.exports={trim:function(e){return e.replace(/^\s+|\s+$/g,"")},rtrim:function(e){return e.replace(/\s+$/g,"")},isBlank:function(e){return/^\s*$/g.test(e)},isNotBlank:function(e){return!this.isBlank(e)},indentation:function(e){var t=/^(\s*)/.exec(e)
|
|||
|
return t&&t[0].length||0}}},1481:(e,t,n)=>{"use strict"
|
|||
|
var r=n(7774),i=n(891),o=n(1996),s=function(e,t){if(!(this instanceof s))return new s(e,t)
|
|||
|
this.interpreter=new r(e),this.requires=function(e){return this.interpreter.requires(e),this},this.yadda=function(e,n,r){return 0===arguments.length?this:2===arguments.length&&o.is_function(n)?this.yadda(e,{},n):(this.interpreter.validate(e),void this.interpreter.interpret(e,(new i).merge(t).merge(n),r))},this.run=this.yadda,this.toString=function(){return"Yadda 2.2.0 Copyright 2010 Stephen Cresswell"}}
|
|||
|
e.exports=s},4636:e=>{"use strict"
|
|||
|
e.exports=function(e,t){var n=Date.parse(e)
|
|||
|
return isNaN(n)?t(new Error("Cannot convert ["+e+"] to a date")):t(null,new Date(n))}},2066:e=>{"use strict"
|
|||
|
e.exports=function(e,t){var n=parseFloat(e)
|
|||
|
return isNaN(n)?t(new Error("Cannot convert ["+e+"] to a float")):t(null,n)}},9627:(e,t,n)=>{"use strict"
|
|||
|
e.exports={date:n(4636),integer:n(9858),float:n(2066),list:n(9999),table:n(4084),pass_through:n(1234)}},9858:e=>{"use strict"
|
|||
|
e.exports=function(e,t){var n=parseInt(e)
|
|||
|
return isNaN(n)?t(new Error("Cannot convert ["+e+"] to an integer")):t(null,n)}},9999:e=>{"use strict"
|
|||
|
e.exports=function(e,t){return t(null,e.split(/\n/))}},1234:e=>{"use strict"
|
|||
|
e.exports=function(e,t){return t(null,e)}},4084:(e,t,n)=>{"use strict"
|
|||
|
var r=n(1627),i=n(3575),o=/[\|\u2506]/,s=/^[\|\u2506]|[\|\u2506]$/g,a=/^[\\|\u2506]?-{3,}/
|
|||
|
e.exports=function(e,t){var n,u=e.split(/\n/),c=(n=u.shift(),r(n.replace(s,"").split(o)).collect((function(e){return{text:i.trim(e),indentation:i.indentation(e)}})).naked()),l=h(u[0])?function(e){if(h(e))return d()
|
|||
|
p(e)}:function(e){if(h(e))throw new Error("Dashes are unexpected at this time")
|
|||
|
d(),p(e)},f=r()
|
|||
|
try{r(u).each(l),t(null,function(e){return e.collect((function(e){var t={}
|
|||
|
for(var n in e)t[n]=e[n].join("\n")
|
|||
|
return t})).naked()}(f))}catch(e){t(e)}function h(e){return a.test(e)}function d(){f.push({})}function p(e){var t=f.last()
|
|||
|
r(e.replace(s,"").split(o)).each((function(e,n){var r=c[n].text,o=c[n].indentation,s=i.rtrim(e.substr(o))
|
|||
|
if(i.isNotBlank(e)&&i.indentation(e)<o)throw new Error("Indentation error")
|
|||
|
t[r]=(t[r]||[]).concat(s)}))}}},1996:e=>{"use strict"
|
|||
|
e.exports=function(){var e=Array.prototype.slice
|
|||
|
function t(){}function n(t,n){return function(){var r=e.call(arguments,arguments.length-1)[0],i=e.call(arguments,0,arguments.length-2)
|
|||
|
n.apply(t,i),r&&r()}}return{noop:t,noargs:function(e){return function(){return e()}},async_noop:n(null,t),asynchronize:n,is_function:function(e){return e&&"[object Function]"==={}.toString.call(e)},curry:function(t,n){var r=e.call(arguments,2)
|
|||
|
return function(){return n.apply(t,r.concat(e.call(arguments)))}},invoke:function(e,t,n){return e.apply(t,n)}}}()},2216:(e,t,n)=>{"use strict"
|
|||
|
var r={Yadda:n(1481),EventBus:n(1235),Interpreter:n(7774),Context:n(891),Library:n(5798),Dictionary:n(6754),FeatureFileSearch:n(5748),FileSearch:n(29),Platform:n(6947),localisation:n(7679),converters:n(9627),parsers:n(1979),plugins:n(6827),shims:n(4061),createInstance:function(){return r.Yadda.apply(null,Array.prototype.slice.call(arguments,0))}}
|
|||
|
e.exports=r},6404:(e,t,n)=>{"use strict"
|
|||
|
var r=n(6767)
|
|||
|
e.exports=new r("Chinese",{feature:"[Ff]eature|功能",scenario:"(?:[Ss]cenario|[Ss]cenario [Oo]utline|场景|剧本|(?:场景|剧本)?大纲)",examples:"(?:[Ee]xamples|[Ww]here|例子|示例|举例|样例)",pending:"(?:[Pp]ending|[Tt]odo|待定|待做|待办|暂停|暂缓)",only:"(?:[Oo]nly|仅仅?)",background:"[Bb]ackground|背景|前提",given:"(?:[Gg]iven|[Ww]ith|[Aa]nd|[Bb]ut|[Ee]xcept|假如|假设|假定|并且|而且|同时|但是)",when:"(?:[Ww]hen|[Ii]f|[Aa]nd|[Bb]ut|当|如果|并且|而且|同时|但是)",then:"(?:[Tt]hen|[Ee]xpect|[Aa]nd|[Bb]ut|那么|期望|并且|而且|同时|但是)",_steps:["given","when","then"]})},3399:(e,t,n)=>{"use strict"
|
|||
|
var r=n(6767)
|
|||
|
e.exports=new r("Dutch",{feature:"(?:[Ff]eature|[Ff]unctionaliteit|[Ee]igenschap)",scenario:"(?:[Ss]cenario|[Gg|eval)",examples:"(?:[Vv]oorbeelden?)",pending:"(?:[Tt]odo|[Mm]oet nog)",only:"(?:[Aa]lleen)",background:"(?:[Aa]chtergrond)",given:"(?:[Ss]tel|[Gg]egeven(?:\\sdat)?|[Ee]n|[Mm]aar)",when:"(?:[Aa]ls|[Ww]anneer|[Ee]n|[Mm]aar)",then:"(?:[Dd]an|[Vv]ervolgens|[Ee]n|[Mm]aar)",_steps:["given","when","then"]})},1447:(e,t,n)=>{"use strict"
|
|||
|
var r=n(6767)
|
|||
|
e.exports=new r("English",{feature:"[Ff]eature",scenario:"(?:[Ss]cenario|[Ss]cenario [Oo]utline)",examples:"(?:[Ee]xamples|[Ww]here)",pending:"(?:[Pp]ending|[Tt]odo)",only:"(?:[Oo]nly)",background:"[Bb]ackground",given:"(?:[Gg]iven|[Ww]ith|[Aa]nd|[Bb]ut|[Ee]xcept)",when:"(?:[Ww]hen|[Ii]f|[Aa]nd|[Bb]ut)",then:"(?:[Tt]hen|[Ee]xpect|[Aa]nd|[Bb]ut)",_steps:["given","when","then"]})},7226:(e,t,n)=>{"use strict"
|
|||
|
var r=n(6767)
|
|||
|
e.exports=new r("French",{feature:"(?:[Ff]onctionnalité)",scenario:"(?:[Ss]cénario|[Pp]lan [Dd]u [Ss]cénario)",examples:"(?:[Ee]xemples|[Ee]xemple|[Oo][uù])",pending:"(?:[Ee]n attente|[Ee]n cours|[Tt]odo)",only:"(?:[Ss]eulement])",background:"(?:[Cc]ontexte)",given:"(?:[Ss]oit|[ÉéEe]tant données|[ÉéEe]tant donnée|[ÉéEe]tant donnés|[ÉéEe]tant donné|[Aa]vec|[Ee]t|[Mm]ais|[Aa]ttendre)",when:"(?:[Qq]uand|[Ll]orsqu'|[Ll]orsque|[Ss]i|[Ee]t|[Mm]ais)",then:"(?:[Aa]lors|[Aa]ttendre|[Ee]t|[Mm]ais)",_steps:["given","when","then","soit","etantdonnees","etantdonnee","etantdonne","quand","lorsque","alors"],get soit(){return this.given},get etantdonnees(){return this.given},get etantdonnee(){return this.given},get etantdonne(){return this.given},get quand(){return this.when},get lorsque(){return this.when},get alors(){return this.then}})},5805:(e,t,n)=>{"use strict"
|
|||
|
var r=n(6767)
|
|||
|
e.exports=new r("German",{feature:"(?:[Ff]unktionalität|[Ff]eature|[Aa]spekt|[Uu]secase|[Aa]nwendungsfall)",scenario:"(?:[Ss]zenario|[Ss]zenario( g|G)rundriss|[Gg]eschehnis)",examples:"(?:[Bb]eispiele?)",pending:"(?:[Tt]odo|[Oo]ffen)",only:"(?:[Nn]ur|[Ee]inzig)",background:"(?:[Gg]rundlage|[Hh]intergrund|[Ss]etup|[Vv]orausgesetzt)",given:"(?:[Aa]ngenommen|[Gg]egeben( sei(en)?)?|[Mm]it|[Uu]nd|[Aa]ber|[Aa]ußer)",when:"(?:[Ww]enn|[Ff]alls|[Uu]nd|[Aa]ber)",then:"(?:[Dd]ann|[Ff]olglich|[Aa]ußer|[Uu]nd|[Aa]ber)",_steps:["given","when","then"]})},6767:(e,t,n)=>{"use strict"
|
|||
|
var r=n(5798),i=n(1627)
|
|||
|
e.exports=function(e,t){var n=this
|
|||
|
this.is_language=!0,this.library=function(e){return n.localise_library(new r(e))},this.localise_library=function(e){return i(t._steps).each((function(t){e[t]=function(r,s,a,u){return i(r).each((function(r){return r=o(n.localise(t),r),e.define(r,s,a,u)}))}})),e}
|
|||
|
var o=function(e,t){var n=new RegExp("^/|/$","g"),r=new RegExp(/^(?:\^)?/)
|
|||
|
return t.toString().replace(n,"").replace(r,"^(?:\\s)*"+e+"\\s+")}
|
|||
|
this.localise=function(n){if(void 0===t[n])throw new Error('Keyword "'+n+'" has not been translated into '+e+".")
|
|||
|
return t[n]}}},683:(e,t,n)=>{"use strict"
|
|||
|
var r=n(6767)
|
|||
|
e.exports=new r("Norwegian",{feature:"[Ee]genskap",scenario:"[Ss]cenario",examples:"[Ee]ksempler",pending:"[Aa]vventer",only:"[Bb]are",background:"[Bb]akgrunn",given:"(?:[Gg]itt|[Mm]ed|[Oo]g|[Mm]en|[Uu]nntatt)",when:"(?:[Nn]år|[Oo]g|[Mm]en)",then:"(?:[Ss]å|[Ff]forvent|[Oo]g|[Mm]en)",_steps:["given","when","then","gitt","når","så"],get gitt(){return this.given},get"når"(){return this.when},get"så"(){return this.then}})},3411:(e,t,n)=>{"use strict"
|
|||
|
var r=n(6767)
|
|||
|
e.exports=new r("Pirate",{feature:"(?:[Tt]ale|[Yy]arn)",scenario:"(?:[Aa]dventure|[Ss]ortie)",examples:"[Ww]herest",pending:"[Bb]rig",only:"[Bb]lack [Ss]pot",background:"[Aa]ftground",given:"(?:[Gg]iveth|[Ww]ith|[Aa]nd|[Bb]ut|[Ee]xcept)",when:"(?:[Ww]hence|[Ii]f|[Aa]nd|[Bb]ut)",then:"(?:[Tt]hence|[Ee]xpect|[Aa]nd|[Bb]ut)",_steps:["given","when","then","giveth","whence","thence"],get giveth(){return this.given},get whence(){return this.when},get thence(){return this.then}})},8617:(e,t,n)=>{"use strict"
|
|||
|
var r=n(6767)
|
|||
|
e.exports=new r("Polish",{feature:"(?:[Ww]łaściwość|[Ff]unkcja|[Aa]spekt|[Pp]otrzeba [Bb]iznesowa)",scenario:"(?:[Ss]cenariusz|[Ss]zablon [Ss]cenariusza)",examples:"[Pp]rzykłady",pending:"(?:[Oo]czekujący|[Nn]iezweryfikowany|[Tt]odo)",only:"[Tt]ylko",background:"[Zz]ałożenia",given:"(?:[Zz]akładając|[Mm]ając|[Oo]raz|[Ii]|[Aa]le)",when:"(?:[Jj]eżeli|[Jj]eśli|[Gg]dy|[Kk]iedy|[Oo]raz|[Ii]|[Aa]le)",then:"(?:[Ww]tedy|[Oo]raz|[Ii]|[Aa]le)",_steps:["given","when","then","zakladajac","majac","jezeli","jesli","gdy","kiedy","wtedy"],get zakladajac(){return this.given},get majac(){return this.given},get jezeli(){return this.when},get jesli(){return this.when},get gdy(){return this.when},get kiedy(){return this.when},get wtedy(){return this.then}})},7291:(e,t,n)=>{"use strict"
|
|||
|
var r=n(6767)
|
|||
|
e.exports=new r("Portuguese",{feature:"(?:[Ff]uncionalidade|[Cc]aracter[íi]stica)",scenario:"(?:[Cc]en[aá]rio|[Cc]aso)",examples:"(?:[Ee]xemplos|[Ee]xemplo)",pending:"[Pp]endente",only:"[S][óo]",background:"[Ff]undo",given:"(?:[Ss]eja|[Ss]ejam|[Dd]ado|[Dd]ada|[Dd]ados|[Dd]adas|[Ee]|[Mm]as)",when:"(?:[Qq]uando|[Ss]e|[Qq]ue|[Ee]|[Mm]as)",then:"(?:[Ee]nt[aã]o|[Ee]|[Mm]as)",_steps:["given","when","then","seja","sejam","dado","dada","dados","dadas","quando","se","entao"],get seja(){return this.given},get sejam(){return this.given},get dado(){return this.given},get dada(){return this.given},get dados(){return this.given},get dadas(){return this.given},get quando(){return this.when},get se(){return this.when},get entao(){return this.then}})},342:(e,t,n)=>{"use strict"
|
|||
|
var r=n(6767)
|
|||
|
e.exports=new r("Russian",{feature:"(?:[Фф]ункция|[Фф]ункционал|[Сс]войство)",scenario:"Сценарий",examples:"Примеры?",pending:"(?:[Ww]ip|[Tt]odo)",only:"Только",background:"(?:[Пп]редыстория|[Кк]онтекст)",given:"(?:[Дд]опустим|[Дд]ано|[Пп]усть|[Ии]|[Н]о)(?:\\s[Яя])?",when:"(?:[Ее]сли|[Кк]огда|[Ии]|[Н]о)(?:\\s[Яя])?",then:"(?:[Тт]о|[Тт]огда|[Ии]|[Н]о)(?:\\s[Яя])?",_steps:["given","when","then"]})},7202:(e,t,n)=>{"use strict"
|
|||
|
var r=n(6767)
|
|||
|
e.exports=new r("Spanish",{feature:"(?:[Ff]uncionalidad|[Cc]aracterística)",scenario:"(?:[Ee]scenario|[Cc]aso)",examples:"(?:[Ee]jemplos|[Ee]jemplo)",pending:"[Pp]endiente",only:"[S]ólo",background:"[Ff]ondo",given:"(?:[Ss]ea|[Ss]ean|[Dd]ado|[Dd]ada|[Dd]ados|[Dd]adas)",when:"(?:[Cc]uando|[Ss]i|[Qq]ue)",then:"(?:[Ee]ntonces)",_steps:["given","when","then","sea","sean","dado","dada","dados","dadas","cuando","si","entonces"],get sea(){return this.given},get sean(){return this.given},get dado(){return this.given},get dada(){return this.given},get dados(){return this.given},get dadas(){return this.given},get cuando(){return this.when},get si(){return this.when},get entonces(){return this.then}})},3845:(e,t,n)=>{"use strict"
|
|||
|
var r=n(6767)
|
|||
|
e.exports=new r("Ukrainian",{feature:"(?:[Фф]ункція|[Фф]ункціонал|[Пп]отреба|[Аа]спект|[Оо]собливість|[Вв]ластивість)",scenario:"(?:[Сс]ценарій|[Шш]аблон)",examples:"[Пп]риклади",pending:"(?:[Нн]еперевірений|[Чч]екаючий|[Pp]ending|[Tt]odo)",only:"[Тт]ільки",background:"[Кк]онтекст",given:"(?:[Дд]ано|[Пп]ри|[Нн]ехай|[Іі]|[Тт]а|[Аа]ле)",when:"(?:[Яя]кщо|[Дд]е|[Кк]оли|[Іі]|[Тт]а|[Аа]ле)",then:"(?:[Тт]оді|[Іі]|[Тт]а|[Аа]ле)",_steps:["given","when","then"]})},7679:(e,t,n)=>{"use strict"
|
|||
|
e.exports={Chinese:n(6404),English:n(1447),French:n(7226),German:n(5805),Dutch:n(3399),Norwegian:n(683),Pirate:n(3411),Ukrainian:n(3845),Polish:n(8617),Spanish:n(7202),Russian:n(342),Portuguese:n(7291),default:n(1447),Language:n(6767)}},691:(e,t,n)=>{"use strict"
|
|||
|
e.exports=function(e){var t=n(4061).fs,r=new(n(5968))(e)
|
|||
|
this.parse=function(e,n){var i=t.readFileSync(e,"utf8"),o=r.parse(i)
|
|||
|
return n&&n(o)||o}}},5968:(e,t,n)=>{"use strict"
|
|||
|
var r=n(1627),i=n(1996),o=n(3575),s=n(7679)
|
|||
|
e.exports=function(e){var t,n,a={language:s.default,leftPlaceholderChar:"[",rightPlaceholderChar:"]"},u=(e=e&&e.is_language?{language:e}:e||a).language||a.language,c=e.leftPlaceholderChar||a.leftPlaceholderChar,l=e.rightPlaceholderChar||a.rightPlaceholderChar,f=new RegExp("^\\s*"+u.localise("feature")+":\\s*(.*)","i"),h=new RegExp("^\\s*"+u.localise("scenario")+":\\s*(.*)","i"),d=new RegExp("^\\s*"+u.localise("background")+":\\s*(.*)","i"),p=new RegExp("^\\s*"+u.localise("examples")+":","i"),g=new RegExp("^(.*)$","i"),v=new RegExp("^\\s*#"),m=new RegExp("^\\s*#{3,}"),y=new RegExp("^(\\s*)$"),b=new RegExp("(^\\s*[\\|┆]?-{3,})"),w=new RegExp("^\\s*@([^=]*)$"),x=new RegExp("^\\s*@([^=]*)=(.*)$")
|
|||
|
function k(e,r){var i,s=r+1
|
|||
|
try{if(i=m.test(e))return n=!n
|
|||
|
if(n)return
|
|||
|
if(i=v.test(e))return
|
|||
|
if(i=w.exec(e))return t.handle("Annotation",{key:o.trim(i[1]),value:!0},s)
|
|||
|
if(i=x.exec(e))return t.handle("Annotation",{key:o.trim(i[1]),value:o.trim(i[2])},s)
|
|||
|
if(i=f.exec(e))return t.handle("Feature",i[1],s)
|
|||
|
if(i=h.exec(e))return t.handle("Scenario",i[1],s)
|
|||
|
if(i=d.exec(e))return t.handle("Background",i[1],s)
|
|||
|
if(i=p.exec(e))return t.handle("Examples",s)
|
|||
|
if(i=y.exec(e))return t.handle("Blank",i[0],s)
|
|||
|
if(i=b.exec(e))return t.handle("Dash",i[1],s)
|
|||
|
if(i=g.exec(e))return t.handle("Text",i[1],s)}catch(t){throw t.message="Error parsing line "+s+', "'+e+'".\nOriginal error was: '+t.message,t}}this.parse=function(e,i){return t=new _,n=!1,function(e){return r(e.split(/\r\n|\n/))}(e).each(k),i&&i(t.export())||t.export()}
|
|||
|
var E=function(e){e=e||{},this.register=function(t,n){e[t]=n},this.unregister=function(){r(Array.prototype.slice.call(arguments)).each((function(t){delete e[t]}))},this.find=function(t){if(!e[t.toLowerCase()])throw new Error(t+" is unexpected at this time")
|
|||
|
return{handle:e[t.toLowerCase()]}}},_=function(){var e,t=this,n=new S,r=new E({text:i.noop,blank:i.noop,annotation:function(e,t){r.unregister("background"),n.stash(t.key,t.value)},feature:function(t,r){return e=new C(r,n,new S)},scenario:o,background:s})
|
|||
|
function o(t,r,i){return(e=new C(r,new S,n)).on(t,r,i)}var s=o
|
|||
|
this.handle=function(e,n,r){t=t.on(e,n,r)},this.on=function(e,t,n){return r.find(e).handle(e,t,n)||this},this.export=function(){if(!e)throw new Error("A feature must contain one or more scenarios")
|
|||
|
return e.export()}},S=function(){var e={}
|
|||
|
this.stash=function(t,n){if(/\s/.test(t))throw new Error("Invalid annotation: "+t)
|
|||
|
e[t.toLowerCase()]=n},this.export=function(){return e}},C=function(e,t,n){var s=[],a=[],u=new j,c=new E({text:function(e,t){s.push(o.trim(t))},blank:i.noop,annotation:function(e,t){c.unregister("background","text"),n.stash(t.key,t.value)},scenario:function(e,t){var r=new N(t,u,n,l)
|
|||
|
return a.push(r),n=new S,r},background:function(e,t){return u=new T(t,l),n=new S,u}}),l=this
|
|||
|
this.on=function(e,t,n){return c.find(e).handle(e,t,n)||this},this.export=function(){return function(){if(0===a.length)throw new Error("Feature requires one or more scenarios")}(),{title:e,annotations:t.export(),description:s,scenarios:r(a).collect((function(e){return e.export()})).flatten().naked()}}},T=function(e,t){var n=[],r=[],s=0,a=new E({text:u,blank:i.noop,annotation:v,scenario:m})
|
|||
|
function u(e,t,r){a.register("dash",c),n.push(o.trim(t))}function c(e,t,n){a.unregister("dash","annotation","scenario"),a.register("text",l),a.register("blank",h),s=o.indentation(t)}function l(e,t,n){a.register("dash",p),a.register("text",f),a.register("blank",h),a.register("annotation",v),a.register("scenario",m),g(t,"\n")}function f(e,t,n){d(),g(t,"\n")}function h(e,t,n){r.push(t)}function d(){r.length&&(g(r.join("\n"),"\n"),r=[])}function p(e,t,n){a.unregister("dash"),a.register("text",u),a.register("blank",i.noop),d()}function g(e,t){if(o.isNotBlank(e)&&o.indentation(e)<s)throw new Error("Indentation error")
|
|||
|
n[n.length-1]=n[n.length-1]+t+o.rtrim(e.substr(s))}function v(e,n,r){return y(),t.on(e,n,r)}function m(e,n,r){return y(),t.on(e,n,r)}function y(){if(0===n.length)throw new Error("Background requires one or more steps")}this.on=function(e,t,n){return a.find(e).handle(e,t,n)||this},this.export=function(){return y(),{steps:n}}},j=function(){var e=new E
|
|||
|
this.on=function(t,n,r){return e.find(t).handle(t,n,r)||this},this.export=function(){return{steps:[]}}},N=function(e,t,n,r){var s,a=[],u=[],c=[],l=0,f=new E({text:d,blank:i.noop,annotation:x,scenario:x,examples:k}),h=this
|
|||
|
function d(e,t,n){f.register("dash",p),u.push(o.trim(t))}function p(e,t,n){f.unregister("dash","annotation","scenario","examples"),f.register("text",g),f.register("blank",m),l=o.indentation(t)}function g(e,t,n){f.register("dash",b),f.register("text",v),f.register("blank",m),f.register("annotation",x),f.register("scenario",x),f.register("examples",k),w(t,"\n")}function v(e,t,n){y(),w(t,"\n")}function m(e,t,n){c.push(t)}function y(){c.length&&(w(c.join("\n"),"\n"),c=[])}function b(e,t,n){f.unregister("dash"),f.register("text",d),f.register("blank",i.noop),y()}function w(e,t){if(o.isNotBlank(e)&&o.indentation(e)<l)throw new Error("Indentation error")
|
|||
|
u[u.length-1]=u[u.length-1]+t+o.rtrim(e.substr(l))}function x(e,t,n){return _(),r.on(e,t,n)}function k(e,t,n){return _(),s=new M(h)}function _(){if(0===u.length)throw new Error("Scenario requires one or more steps")}this.on=function(e,t,n){return f.find(e).handle(e,t,n)||this},this.export=function(){_()
|
|||
|
var r={title:e,annotations:n.export(),description:a,steps:t.export().steps.concat(u)}
|
|||
|
return s?s.expand(r):r}},M=function(e){var t=[],n=r(),s=new S,a=new E({blank:i.noop,dash:function(e,t,n){a.unregister("blank","dash")},text:function(e,n,r){a.register("annotation",u),a.register("text",f),a.register("dash",h)
|
|||
|
var i=1
|
|||
|
t=b(n).collect((function(e){var t={text:o.trim(e),left:i,indentation:o.indentation(e)}
|
|||
|
return i+=e.length+1,t})).naked()}})
|
|||
|
function u(e,t,n){a.unregister("blank","dash"),s.stash(t.key,t.value)}function f(e,t,r){a.register("dash",v),a.register("blank",v),n.push({annotations:s,fields:y(t,{})}),m(r),s=new S}function h(e,t,n){a.register("text",d),a.register("dash",g)}function d(e,t,r){a.register("text",p),a.register("dash",g),a.register("blank",v),n.push({annotations:s,fields:y(t,{})}),m(r)}function p(e,t,r){y(t,n.last().fields)}function g(e,t,n){a.register("text",d),s=new S}function v(e,t,n){a.unregister("text","dash"),a.register("blank",i.noop),a.register("annotation",w),a.register("scenario",w)}function m(e){var i=n.last().fields
|
|||
|
r(t).each((function(t){i[t.text+".index"]=[n.length],i[t.text+".start.line"]=[e],i[t.text+".start.column"]=[t.left+t.indentation]}))}function y(e,n){return b(e,t.length).each((function(e,r){var i=t[r].text,s=t[r].indentation,a=o.rtrim(e.substr(s))
|
|||
|
if(o.isNotBlank(e)&&o.indentation(e)<s)throw new Error("Indentation error")
|
|||
|
n[i]=(n[i]||[]).concat(a)})),n}function b(e,t){var n=e.indexOf("┆")>=0?"┆":"|",i=r(e.split(n))
|
|||
|
if(void 0!==t&&t!==i.length)throw new Error("Incorrect number of fields in example table. Expected "+t+" but found "+i.length)
|
|||
|
return i}function w(t,n,r){return x(),e.on(t,n,r)}function x(){if(0===t.length)throw new Error("Examples table requires one or more headings")
|
|||
|
if(0===n.length)throw new Error("Examples table requires one or more rows")}function k(){var e={}
|
|||
|
return r(Array.prototype.slice.call(arguments)).each((function(t){for(var n in t)e[n]=t[n]})),e}function _(e,t){return r(t).collect((function(t){return C(e,t)})).naked()}function C(e,t){for(var n in e)t=t.replace(new RegExp("\\"+c+"\\s*"+n+"\\s*\\"+l,"g"),o.rtrim(e[n].join("\n")))
|
|||
|
return t}this.on=function(e,t,n){return a.find(e).handle(e,t,n)||this},this.expand=function(e){return x(),n.collect((function(t){return{title:C(t.fields,e.title),annotations:k(t.annotations.export(),e.annotations),description:_(t,e.description),steps:_(t.fields,e.steps)}})).naked()}}}},4245:(e,t,n)=>{"use strict"
|
|||
|
var r=n(1627)
|
|||
|
e.exports=function(){var e=/[^\s]/
|
|||
|
this.parse=function(e,r){var i=t(e).find_all(n)
|
|||
|
return r&&r(i)||i}
|
|||
|
var t=function(e){return r(e.split(/\n/))},n=function(t){return t&&e.test(t)}}},1979:(e,t,n)=>{"use strict"
|
|||
|
e.exports={StepParser:n(4245),FeatureParser:n(5968),FeatureFileParser:n(691)}},5807:(e,t,n)=>{"use strict"
|
|||
|
if(!(e=n.nmd(e)).client){var r=n(4061).fs
|
|||
|
n.g.process=n.g.process||{cwd:function(){return r.workingDirectory}}}e.exports=function(e,t){var r=n(2216).EventBus
|
|||
|
e.interpreter.interpret_step=function(e,n,i){var o=this
|
|||
|
t.then((function(){t.test.info(e),r.instance().send(r.ON_STEP,{step:e,ctx:n}),o.rank_macros(e).clear_winner().interpret(e,n,i)}))},t.yadda=function(t,n){if(void 0===t)return this
|
|||
|
e.run(t,n)}}},6827:(e,t,n)=>{"use strict"
|
|||
|
e.exports={casper:n(5807),mocha:{ScenarioLevelPlugin:n(1908),StepLevelPlugin:n(809)},get jasmine(){return this.mocha}}},1034:(e,t,n)=>{"use strict"
|
|||
|
var r=n(7679),i=n(6947),o=n(691),s=n(1627)
|
|||
|
e.exports.create=function(e){var t=new i,n=e.language||r.default,a=e.parser||new o(e),u=e.container||t.get_container()
|
|||
|
function c(e,t){s(e).each((function(e){l(e.title,e,t)}))}function l(e,t,n){var r;(h(r=t.annotations,"pending")?u.xdescribe:h(r,"only")?u.describe.only||u.fdescribe||u.ddescribe:u.describe)(e,(function(){n(t)}))}function f(e,t){return h(e,"pending")?u.xit:h(e,"only")?u.it.only||u.fit||u.iit:u.it}function h(e,t){var r=new RegExp("^"+n.localise(t)+"$","i")
|
|||
|
for(var i in e)if(r.test(i))return!0}return{featureFiles:function(e,t){s(e).each((function(e){c(a.parse(e),t)}))},features:c,describe:l,it_async:function(e,t,n){f(t.annotations)(e,(function(e){n(this,t,e)}))},it_sync:function(e,t,n){f(t.annotations)(e,(function(){n(this,t)}))}}}},1908:(e,t,n)=>{"use strict"
|
|||
|
var r=n(1627),i=n(6947),o=n(1034)
|
|||
|
e.exports.init=function(e){e=e||{}
|
|||
|
var t=new i,n=e.container||t.get_container(),s=o.create(e)
|
|||
|
n.featureFiles=n.featureFile=s.featureFiles,n.features=n.feature=s.features,n.scenarios=n.scenario=function(e,t){r(e).each((function(e){(1===t.length?s.it_sync:s.it_async)(e.title,e,(function(e,n,r){t(n,r)}))}))}}},809:(e,t,n)=>{"use strict"
|
|||
|
var r=n(1627),i=n(6947),o=n(1034)
|
|||
|
e.exports.init=function(e){e=e||{}
|
|||
|
var t=new i,n=e.container||t.get_container(),s=o.create(e)
|
|||
|
n.featureFiles=n.featureFile=s.featureFiles,n.features=n.feature=s.features,n.scenarios=n.scenario=function(e,t){r(e).each((function(e){s.describe(e.title,e,t)}))},n.steps=function(e,t){var n=!1
|
|||
|
function i(e,t){s.it_async(e,e,(function(e,r,i){if(n)return e.skip?e.skip():i()
|
|||
|
n=!0,t.bind(e)(r,(function(e){if(e)return(i.fail||i)(e)
|
|||
|
n=!1,i()}))}))}function o(e,t){s.it_sync(e,e,(function(e,r){if(n)return e.skip&&e.skip()
|
|||
|
n=!0,t.bind(e)(r),n=!1}))}r(e).each((function(e){(1===t.length?o:i)(e,t)}))}}},7131:e=>{"use strict"
|
|||
|
e.exports=function(e,t){var n
|
|||
|
this.value,this.type="LevenshteinDistanceScore"
|
|||
|
var r=this
|
|||
|
this.compare=function(e){return e.value-this.value},this.equals=function(e){return!!e&&this.type===e.type&&this.value===e.value},function(){var r=e.length,i=t.length
|
|||
|
n=new Array(r+1)
|
|||
|
for(var o=0;o<=r;o++)n[o]=new Array(i+1)
|
|||
|
for(o=0;o<=r;o++)for(var s=0;s<=i;s++)n[o][s]=0
|
|||
|
for(o=0;o<=r;o++)n[o][0]=o
|
|||
|
for(s=0;s<=i;s++)n[0][s]=s}(),function(){if(e===t)return r.value=0
|
|||
|
for(var i=0;i<t.length;i++)for(var o=0;o<e.length;o++)if(e[o]===t[i])n[o+1][i+1]=n[o][i]
|
|||
|
else{var s=n[o][i+1]+1,a=n[o+1][i]+1,u=n[o][i]+1
|
|||
|
n[o+1][i+1]=Math.min(u,s,a)}r.value=n[e.length][t.length]}()}},8090:(e,t,n)=>{"use strict"
|
|||
|
var r=n(1627)
|
|||
|
e.exports=function(e){this.scores=r(e),this.type="MultiScore",this.compare=function(e){for(var t=0;t<this.scores.length;t++){var n=this.scores[t].compare(e.scores[t])
|
|||
|
if(n)return n}return 0},this.equals=function(e){return!!e&&this.type===e.type&&0===this.compare(e)}}},2062:e=>{"use strict"
|
|||
|
e.exports=function(e,t){this.value=e.is_sibling(t)?1:0,this.type="SameLibraryScore",this.compare=function(e){return this.value-e.value},this.equals=function(e){return!!e&&this.type===e.type&&this.value===e.value}}},4061:(e,t,n)=>{"use strict"
|
|||
|
var r,i,o=n(6947)
|
|||
|
e.exports=(i={node:function(){return{fs:n(9265),path:n(3642),process:process}},phantom:function(){return{fs:n(8091),path:n(6656),process:n(4661)}},karma:function(){return{fs:n(1702),path:n(8104),process:n(5917)}}},(r=new o).is_phantom()?i.phantom():r.is_browser()&&r.is_karma()?i.karma():r.is_node()?i.node():{})},1702:(e,t,n)=>{e.exports=function(){"use strict"
|
|||
|
var e=n(8104)
|
|||
|
function t(t){return e.resolve(e.normalize(t.split("\\").join("/")))}var r=function(){this.registry=new i,this.converter=new o("/base/","/"),this.reader=new s(this.converter)
|
|||
|
var e=Object.keys(window.__karma__.files)
|
|||
|
this.converter.parseUris(e).forEach(this.registry.addFile,this.registry)}
|
|||
|
r.prototype={constructor:r,workingDirectory:"/",existsSync:function(e){return this.registry.exists(e)},readdirSync:function(e){return this.registry.getContent(e)},statSync:function(e){return{isDirectory:function(){return this.registry.isDirectory(e)}.bind(this)}},readFileSync:function(e,t){if("utf8"!==t)throw new Error("This fs.readFileSync() shim does not support other than utf8 encoding.")
|
|||
|
if(!this.registry.isFile(e))throw new Error("File does not exist: "+e)
|
|||
|
return this.reader.readFile(e)}}
|
|||
|
var i=function(){this.paths={}}
|
|||
|
i.prototype={constructor:i,addFile:function(n){n=t(n),this.paths[n]=i.TYPE_FILE
|
|||
|
var r=e.dirname(n)
|
|||
|
this.addDirectory(r)},addDirectory:function(n){n=t(n),this.paths[n]=i.TYPE_DIRECTORY
|
|||
|
var r=e.dirname(n)
|
|||
|
r!==n&&this.addDirectory(r)},isFile:function(e){return e=t(e),this.exists(e)&&this.paths[e]===i.TYPE_FILE},isDirectory:function(e){return e=t(e),this.exists(e)&&this.paths[e]===i.TYPE_DIRECTORY},exists:function(e){return e=t(e),this.paths.hasOwnProperty(e)},getContent:function(n){if(!this.isDirectory(n))throw new Error("Not a directory: "+n)
|
|||
|
return n=t(n),Object.keys(this.paths).filter((function(t){return t!==n&&e.dirname(t)===n}),this).map((function(t){return e.basename(t)}))}},i.TYPE_FILE=0,i.TYPE_DIRECTORY=1
|
|||
|
var o=function(e,t){this.workingDirectory=t,this.workingDirectoryPattern=this.patternFromBase(t),this.baseUri=e,this.baseUriPattern=this.patternFromBase(e)}
|
|||
|
o.prototype={constructor:o,patternFromBase:function(e,t){var n="^"+e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")
|
|||
|
return new RegExp(n,t)},parseUris:function(e){return e.filter((function(e){return this.baseUriPattern.test(e)}),this).map((function(e){return e.replace(this.baseUriPattern,this.workingDirectory)}),this)},buildUri:function(e){if(e=t(e),!this.workingDirectoryPattern.test(e))throw new Error("Path is not in working directory: "+e)
|
|||
|
return e.replace(this.workingDirectoryPattern,this.baseUri)}}
|
|||
|
var s=function(e){this.converter=e}
|
|||
|
return s.prototype={constructor:s,readFile:function(e){var t=this.converter.buildUri(e),n=new XMLHttpRequest
|
|||
|
return n.open("get",t,!1),n.send(),n.responseText}},new r}()},8104:(e,t,n)=>{e.exports=function(){"use strict"
|
|||
|
var e={}
|
|||
|
try{e=n(3642)}catch(e){throw new Error("The environment does not support the path module, it's probably not using browserify.")}if("function"!=typeof e.normalize||"function"!=typeof e.dirname)throw new Error("The path module emulation does not contain implementations of required functions.")
|
|||
|
return e}()},5917:(e,t,n)=>{e.exports=function(){"use strict"
|
|||
|
var e=n(1702)
|
|||
|
return{cwd:function(){return e.workingDirectory}}}()},8091:(e,t,n)=>{"use strict";(e=n.nmd(e)).exports=function(){if(e.client)return{}
|
|||
|
var t=n(9265)
|
|||
|
return t.existsSync=t.existsSync||t.exists,t.readdirSync=t.readdirSync||function(e){return t.list(e).filter((function(e){return"."!==e&&".."!==e}))},t.statSync=t.statSync||function(e){return{isDirectory:function(){return t.isDirectory(e)}}},t}()},6656:(e,t,n)=>{"use strict";(e=n.nmd(e)).exports=function(){if(e.client)return{}
|
|||
|
var t=n(9265),r={}
|
|||
|
try{r=n(3642)}catch(e){}return r.join=r.join||function(){return Array.prototype.join.call(arguments,t.separator)},r.relative=r.relative||function(e,n){return e+t.separator+n},r}()},4661:(e,t,n)=>{"use strict";(e=n.nmd(e)).exports=function(){if(e.client)return{}
|
|||
|
var t=n(9265),r=void 0!==r?r:{}
|
|||
|
return r.cwd=function(){return t.workingDirectory},r}()}}])
|