909 lines
122 KiB
JavaScript
909 lines
122 KiB
JavaScript
/*! For license information please see chunk.336.f5cb05e551aa08eb7125.js.LICENSE.txt */
|
||
(globalThis.webpackChunk_ember_auto_import_=globalThis.webpackChunk_ember_auto_import_||[]).push([[336],{3409:(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={warn:p?Function.prototype.bind.call(p.warn||p.log,p):function(){}},k=Object.prototype.toString,E=Object.prototype.hasOwnProperty,_=d&&void 0!==d.performance&&"function"==typeof d.performance.mark&&"function"==typeof d.performance.measure?d.performance:void 0,S={now:_?_.now.bind(_):Date.now,measure:_?function(e,t,n){try{_.measure(e,t,n)}catch(e){x.warn("performance.measure could not be executed because of ",e.message)}}:function(){},mark:_?_.mark.bind(_):function(){}}
|
||
function C(e,t){for(var n=e.slice(),r=0;r<n.length;r++)for(var i=0;i<t.length;i++)if(n[r]===t[i]){n.splice(r,1),r--
|
||
break}return n}function T(e,t){return-1!==t.indexOf(e)}function j(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=t&&q("array",e)?[]:{}
|
||
for(var r in e)if(E.call(e,r)){var i=e[r]
|
||
n[r]=i===Object(i)?j(i,t):i}return n}function N(e,t){if(e!==Object(e))return e
|
||
var n={}
|
||
for(var r in t)E.call(t,r)&&E.call(e,r)&&(n[r]=N(e[r],t[r]))
|
||
return n}function M(e,t,n){for(var r in t)E.call(t,r)&&(void 0===t[r]?delete e[r]:n&&void 0!==e[r]||(e[r]=t[r]))
|
||
return e}function O(e){if(void 0===e)return"undefined"
|
||
if(null===e)return"null"
|
||
var t=k.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 q(e,t){return O(t)===e}function A(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 R(e){var t=String(e)
|
||
return"[object"===t.slice(0,7)?(e.name||"Error")+(e.message?": ".concat(e.message):""):t}var I=function(){var e=[]
|
||
function t(e,t){return"object"===i(e)&&(e=e.valueOf()),"object"===i(t)&&(t=t.valueOf()),e===t}function n(e){return"flags"in e?e.flags:e.toString().match(/[gimuy]*$/)[0]}function r(t,n){return t===n||(-1===["object","array","map","set"].indexOf(O(t))?s(t,n):(e.every((function(e){return e.a!==t||e.b!==n}))&&e.push({a:t,b:n}),!0))}var o={string:t,boolean:t,number:t,null:t,undefined:t,symbol:t,date:t,nan:function(){return!0},regexp:function(e,t){return e.source===t.source&&n(e)===n(t)},function:function(){return!1},array:function(e,t){var n=e.length
|
||
if(n!==t.length)return!1
|
||
for(var i=0;i<n;i++)if(!r(e[i],t[i]))return!1
|
||
return!0},set:function(t,n){if(t.size!==n.size)return!1
|
||
var r=!0
|
||
return t.forEach((function(t){if(r){var i=!1
|
||
n.forEach((function(n){if(!i){var r=e
|
||
a(n,t)&&(i=!0),e=r}})),i||(r=!1)}})),r},map:function(t,n){if(t.size!==n.size)return!1
|
||
var r=!0
|
||
return t.forEach((function(t,i){if(r){var o=!1
|
||
n.forEach((function(n,r){if(!o){var s=e
|
||
a([n,r],[t,i])&&(o=!0),e=s}})),o||(r=!1)}})),r},object:function(e,t){if(!1===function(e,t){var n=Object.getPrototypeOf(e),r=Object.getPrototypeOf(t)
|
||
return e.constructor===t.constructor||(n&&null===n.constructor&&(n=null),r&&null===r.constructor&&(r=null),null===n&&r===Object.prototype||null===r&&n===Object.prototype)}(e,t))return!1
|
||
var n=[],i=[]
|
||
for(var o in e)if(n.push(o),(e.constructor===Object||void 0===e.constructor||"function"!=typeof e[o]||"function"!=typeof t[o]||e[o].toString()!==t[o].toString())&&!r(e[o],t[o]))return!1
|
||
for(var a in t)i.push(a)
|
||
return s(n.sort(),i.sort())}}
|
||
function s(e,t){var n=O(e)
|
||
return O(t)===n&&o[n](e,t)}function a(t,n){if(arguments.length<2)return!0
|
||
e=[{a:t,b:n}]
|
||
for(var r=0;r<e.length;r++){var i=e[r]
|
||
if(i.a!==i.b&&!s(i.a,i.b))return!1}return 2===arguments.length||a.apply(this,[].slice.call(arguments,1))}return function(){var t=a.apply(void 0,arguments)
|
||
return e.length=0,t}}(),F={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}},P=h&&h.QUnit&&!h.QUnit.version&&h.QUnit.config
|
||
P&&M(F,P),F.modules.push(F.currentModule)
|
||
var D=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":q("regexp",e)?"regexp":q("date",e)?"date":q("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]"===k.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:F.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&&!T(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}(),L=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=S.now()
|
||
var t=this.fullName.length
|
||
S.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=S.now()
|
||
var t=this.fullName.length,n=this.fullName.join(" – ")
|
||
S.mark("qunit_suite_".concat(t,"_end")),S.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}(),B=[],U=new L
|
||
function H(e,t,n){var r=B.length?B.slice(-1)[0]:null,i=null!==r?[r.name,e].join(" > "):e,o=r?r.suiteReport:U,s=null!==r&&r.skip||n.skip,a=null!==r&&r.todo||n.todo,u={}
|
||
r&&M(u,r.testEnvironment),M(u,t)
|
||
var c={name:i,parentModule:r,hooks:{before:[],beforeEach:[],afterEach:[],after:[]},testEnvironment:u,tests:[],moduleId:A(i),testsRun:0,testsIgnored:0,childModules:[],suiteReport:new L(e,o),stats:null,skip:s,todo:!s&&a,ignored:n.ignored||!1}
|
||
return r&&r.childModules.push(c),F.modules.push(c),c}function z(e,t,n){var r=t[n]
|
||
"function"==typeof r&&e[n].push(r),delete t[n]}function $(e,t){return function(n){F.currentModule!==e&&x.warn("The `"+t+"` hook was called inside the wrong module (`"+F.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 Q(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{}
|
||
"function"==typeof t&&(n=t,t=void 0)
|
||
var i=H(e,t,r),o=i.testEnvironment,s=i.hooks
|
||
z(s,o,"before"),z(s,o,"beforeEach"),z(s,o,"afterEach"),z(s,o,"after")
|
||
var a={before:$(i,"before"),beforeEach:$(i,"beforeEach"),afterEach:$(i,"afterEach"),after:$(i,"after")},u=F.currentModule
|
||
if(F.currentModule=i,"function"==typeof n){B.push(i)
|
||
try{var c=n.call(i.testEnvironment,a)
|
||
c&&"function"==typeof c.then&&x.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{B.pop(),F.currentModule=i.parentModule||u}}}var G=!1
|
||
function W(e,t,n){var r,i=G&&(r=F.modules.filter((function(e){return!e.ignored})).map((function(e){return e.moduleId})),!B.some((function(e){return r.includes(e.moduleId)})))
|
||
Q(e,t,n,{ignored:i})}W.only=function(){G||(F.modules.length=0,F.queue.length=0,F.currentModule.ignored=!0),G=!0,Q.apply(void 0,arguments)},W.skip=function(e,t,n){G||Q(e,t,n,{skip:!0})},W.todo=function(e,t,n){G||Q(e,t,n,{todo:!0})}
|
||
var Y=(J(0)||"").replace(/(:\d+)+\)?/,"").replace(/.+[/\\]/,"")
|
||
function V(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(),Y){for(var r=[],i=t;i<n.length&&-1===n[i].indexOf(Y);i++)r.push(n[i])
|
||
if(r.length)return r.join("\n")}return n[t]}}function J(e){var t=new Error
|
||
if(!t.stack)try{throw t}catch(e){t=e}return V(t,e)}var X=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,F.timeout&&(v(F.timeout),F.timeout=null,F.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 x.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:F.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||F.current
|
||
if(!r)throw new Error("assertion outside test context, in "+J(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(D.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(D.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){var r=t==e
|
||
this.pushResult({result:r,actual:e,expected:t,message:n})}},{key:"notEqual",value:function(e,t,n){var r=t!=e
|
||
this.pushResult({result:r,actual:e,expected:t,message:n,negative:!0})}},{key:"propEqual",value:function(e,t,n){e=j(e),t=j(t),this.pushResult({result:I(e,t),actual:e,expected:t,message:n})}},{key:"notPropEqual",value:function(e,t,n){e=j(e),t=j(t),this.pushResult({result:!I(e,t),actual:e,expected:t,message:n,negative:!0})}},{key:"propContains",value:function(e,t,n){e=N(e,t),t=j(t,!1),this.pushResult({result:I(e,t),actual:e,expected:t,message:n})}},{key:"notPropContains",value:function(e,t,n){e=N(e,t),t=j(t),this.pushResult({result:!I(e,t),actual:e,expected:t,message:n,negative:!0})}},{key:"deepEqual",value:function(e,t,n){this.pushResult({result:I(e,t),actual:e,expected:t,message:n})}},{key:"notDeepEqual",value:function(e,t,n){this.pushResult({result:!I(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(Z(n,r,"throws"),2)
|
||
n=i[0],r=i[1]
|
||
var o=this instanceof e&&this.test||F.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(K(s,n,r),3)
|
||
a=c[0],n=c[1],r=c[2]}o.assert.pushResult({result:a,actual:s&&R(s),expected:n,message:r})}else{var l='The value provided to `assert.throws` in "'+o.testName+'" was not a function.'
|
||
o.assert.pushResult({result:!1,actual:t,message:l})}}},{key:"rejects",value:function(t,n,r){var i=u(Z(n,r,"rejects"),2)
|
||
n=i[0],r=i[1]
|
||
var o=this instanceof e&&this.test||F.current,s=t&&t.then
|
||
if("function"==typeof s){var a=this.async()
|
||
return s.call(t,(function(){var e='The promise returned by the `assert.rejects` callback in "'+o.testName+'" did not reject.'
|
||
o.assert.pushResult({result:!1,message:e,actual:t}),a()}),(function(e){var t,i=u(K(e,n,r),3)
|
||
t=i[0],n=i[1],r=i[2],o.assert.pushResult({result:t,actual:e&&R(e),expected:n,message:r}),a()}))}var c='The value provided to `assert.rejects` in "'+o.testName+'" was not a promise.'
|
||
o.assert.pushResult({result:!1,message:c,actual:t})}}]),e}()
|
||
function Z(e,t,n){var r=O(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 K(e,t,n){var r=!1,i=O(t)
|
||
if(t){if("regexp"===i)r=t.test(R(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=R(t)
|
||
else if("function"===i)try{r=!0===t.call({},e),t=null}catch(e){t=R(e)}}else r=!0
|
||
return[r,t,n]}X.prototype.raises=X.prototype.throws
|
||
var ee=Object.create(null),te=["error","runStart","suiteStart","testStart","assertion","testEnd","suiteEnd","runEnd"]
|
||
function ne(e,t){if("string"!=typeof e)throw new TypeError("eventName must be a string when emitting an event")
|
||
for(var n=ee[e],r=n?c(n):[],i=0;i<r.length;i++)r[i](t)}var re="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==n.g?n.g:"undefined"!=typeof self?self:{},ie={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!==re)return re
|
||
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)},ie.exports=o}else ie.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 oe=ie.exports
|
||
function se(e,t){var n=F.callbacks[e]
|
||
if("log"!==e){var r=oe.resolve()
|
||
return n.forEach((function(e){r=r.then((function(){return oe.resolve(e(t))}))})),r}n.map((function(e){return e(t)}))}var ae,ue=0,ce=[]
|
||
function le(){var e,t
|
||
e=S.now(),F.depth=(F.depth||0)+1,fe(e),F.depth--,ce.length||F.blocking||F.current||(F.blocking||F.queue.length||0!==F.depth?(t=F.queue.shift()(),ce.push.apply(ce,c(t)),ue>0&&ue--,le()):function(){var e
|
||
if(0===F.stats.testCount&&!0===F.failOnZeroTests)return e=F.filter&&F.filter.length?new Error('No tests matched the filter "'.concat(F.filter,'".')):F.module&&F.module.length?new Error('No tests matched the module "'.concat(F.module,'".')):F.moduleId&&F.moduleId.length?new Error('No tests matched the moduleId "'.concat(F.moduleId,'".')):F.testId&&F.testId.length?new Error('No tests matched the testId "'.concat(F.testId,'".')):new Error("No tests were run."),we("global failure",M((function(t){t.pushResult({result:!1,message:e.message,source:e.stack})}),{validTest:!0})),void le()
|
||
var t=F.storage,n=Math.round(S.now()-F.started),r=F.stats.all-F.stats.bad
|
||
he.finished=!0,ne("runEnd",U.end(!0)),se("done",{passed:r,failed:F.stats.bad,total:F.stats.all,runtime:n}).then((function(){if(t&&0===F.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 fe(e){if(ce.length&&!F.blocking){var t=S.now()-e
|
||
if(!g||F.updateRate<=0||t<F.updateRate){var n=ce.shift()
|
||
oe.resolve(n()).then((function(){ce.length?fe(e):le()}))}else g(le)}}var he={finished:!1,add:function(e,t,n){if(t)F.queue.splice(ue++,0,e)
|
||
else if(n){ae||(ae=function(e){var t=parseInt(A(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(ae()*(F.queue.length-ue+1))
|
||
F.queue.splice(ue+r,0,e)}else F.queue.push(e)},advance:le,taskCount:function(){return ce.length}},de=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=S.now(),S.mark("qunit_test_start")),{name:this.name,suiteName:this.suiteName,fullName:this.fullName.slice()}}},{key:"end",value:function(e){if(e&&(this._endTime=S.now(),S)){S.mark("qunit_test_end")
|
||
var t=this.fullName.join(" – ")
|
||
S.measure("QUnit Test: ".concat(t),"qunit_test_start","qunit_test_end")}return M(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 pe(e){if(this.expected=null,this.assertions=[],this.module=F.currentModule,this.steps=[],this.timeout=void 0,this.data=void 0,this.withData=!1,this.pauses=new w,this.nextPauseId=1,this.stackOffset=3,M(this,e),this.module.skip?(this.skip=!0,this.todo=!1):this.module.todo&&!this.skip&&(this.todo=!0),he.finished)x.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,'")'))}++pe.count,this.errorForStack=new Error,this.callback&&this.callback.validTest&&(this.errorForStack.stack=void 0),this.testReport=new de(this.testName,this.module.suiteReport,{todo:this.todo,skip:this.skip,valid:this.valid()})
|
||
for(var n=0,r=this.module.tests;n<r.length;n++)this.module.tests[n].name===this.testName&&(this.testName+=" ")
|
||
this.testId=A(this.module.name,this.testName),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 X(this)}}function ge(){if(!F.current)throw new Error("pushFailure() assertion outside test context, in "+J(2))
|
||
var e=F.current
|
||
return e.pushFailure.apply(e,arguments)}function ve(){if(F.pollution=[],F.noglobals)for(var e in h)if(E.call(h,e)){if(/^qunit-test-output/.test(e))continue
|
||
F.pollution.push(e)}}pe.count=0,pe.prototype={get stack(){return V(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=oe.resolve()
|
||
return n.forEach((function(e){r=r.then((function(){return e.stats={all:0,bad:0,started:S.now()},ne("suiteStart",e.suiteReport.start(!0)),se("moduleStart",{name:e.name,tests:e.tests})}))})),r.then((function(){return F.current=e,e.testEnvironment=M({},t.testEnvironment),e.started=S.now(),ne("testStart",e.testReport.start(!0)),se("testStart",{name:e.testName,module:t.name,testId:e.testId,previousFailure:e.previousFailure}).then((function(){F.pollution||ve()}))}))},run:function(){if(F.current=this,F.notrycatch)e(this)
|
||
else try{e(this)}catch(e){this.pushFailure("Died on test #"+(this.assertions.length+1)+": "+(e.message||e)+"\n"+this.stack,V(e,0)),ve(),F.blocking&&Ee(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&&ge("Test did not finish synchronously even though assert.timeout( 0 ) was used.",J(2))}},after:function(){!function(){var e=F.pollution
|
||
ve()
|
||
var t=C(F.pollution,e)
|
||
t.length>0&&ge("Introduced global variable(s): "+t.join(", "))
|
||
var n=C(e,F.pollution)
|
||
n.length>0&&ge("Deleted global variable(s): "+n.join(", "))}()},queueGlobalHook:function(e,t){var n=this
|
||
return function(){var r
|
||
if(F.current=n,F.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+": "+R(e),V(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===Se(e).filter((function(e){return!e.skip})).length-1}(n)||!(F.queue.length>0||he.taskCount()>2))if(F.current=r,F.notrycatch)i()
|
||
else try{i()}catch(e){r.pushFailure(t+" failed on "+r.testName+": "+(e.message||e),V(e,0))}}},hooks:function(e){var t=[]
|
||
return this.skip||(function(n){if(("beforeEach"===e||"afterEach"===e)&&F.globalHooks[e])for(var r=0;r<F.globalHooks[e].length;r++)t.push(n.queueGlobalHook(F.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(F.current=this,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)}F.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=F.storage
|
||
this.runtime=Math.round(S.now()-this.started),F.stats.all+=this.assertions.length,F.stats.testCount+=1,t.stats.all+=this.assertions.length
|
||
for(var u=0;u<this.assertions.length;u++)this.assertions[u].result||(s++,F.stats.bad++,t.stats.bad++)
|
||
i?Te(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)),ne("testEnd",this.testReport.end(!0)),this.testReport.slimAssertions()
|
||
var l=this
|
||
return se("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(Ce(t)){for(var e=[t],n=t.parentModule;n&&Ce(n);)e.push(n),n=n.parentModule
|
||
var r=oe.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 ne("suiteEnd",e.suiteReport.end(!0)),se("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(S.now()-e.stats.started)})}(e)}))})),r}})).then((function(){F.current=void 0}))},preserveTestEnvironment:function(){this.preserveEnvironment&&(this.module.testEnvironment=this.testEnvironment,this.testEnvironment=M({},this.module.testEnvironment))},queue:function(){var e=this
|
||
if(this.valid()){var t=F.storage&&+F.storage.getItem("qunit-test-"+this.module.name+"-"+this.testName),n=F.reorder&&!!t
|
||
this.previousFailure=!!t,he.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,F.seed)}else Te(this.module)},pushResult:function(e){if(this!==F.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(S.now()-this.started),todo:!!this.todo}
|
||
if(E.call(e,"expected")&&(r.expected=e.expected),!e.result){var i=e.source||J()
|
||
i&&(r.source=i)}this.logAssertion(r),this.assertions.push({result:!!e.result,message:e.message})},pushFailure:function(e,t,n){if(!(this instanceof pe))throw new Error("pushFailure() assertion outside test context, was "+J(2))
|
||
this.pushResult({result:!1,message:e||"error",actual:n||null,source:t})},logAssertion:function(e){se("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),ne("assertion",t)},internalResetTimeout:function(e){v(F.timeout),F.timeout=g(F.timeoutHandler(e),e)},internalStop:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1
|
||
F.blocking=!0
|
||
var t,n=this,r=this.nextPauseId++,i={cancelled:!1,remaining:e}
|
||
function o(){if(!i.cancelled){if(void 0===F.current)throw new Error("Unexpected release of async pause after tests finished.\n"+"> Test: ".concat(n.testName," [async #").concat(r,"]"))
|
||
if(F.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),_e(n)}}return n.pauses.set(r,i),g&&("number"==typeof n.timeout?t=n.timeout:"number"==typeof F.testTimeout&&(t=F.testTimeout),"number"==typeof t&&t>0&&(F.timeoutHandler=function(e){return function(){F.timeout=null,i.cancelled=!0,n.pauses.delete(r),n.pushFailure("Test took longer than ".concat(e,"ms; test timed out."),J(2)),_e(n)}},v(F.timeout),F.timeout=g(F.timeoutHandler(t),t))),o},resolvePromise:function(e,t){if(null!=e){var n=this,r=e.then
|
||
if("function"==typeof r){var i=n.internalStop(),o=function(){i()}
|
||
F.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,V(e,0)),ve(),Ee(n)}))}}},valid:function(){if(this.callback&&this.callback.validTest)return!0
|
||
if(!function e(t,n){return!n||!n.length||T(t.moduleId,n)||t.parentModule&&e(t.parentModule,n)}(this.module,F.moduleId))return!1
|
||
if(F.testId&&F.testId.length&&!T(this.testId,F.testId))return!1
|
||
var e=F.module&&F.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=F.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 me=!1
|
||
function ye(e){me||F.currentModule.ignored||new pe(e).queue()}function be(e){F.currentModule.ignored||(me||(F.queue.length=0,me=!0),new pe(e).queue())}function we(e,t){ye({testName:e,callback:t})}function xe(e,t){return"".concat(e," [").concat(t,"]")}function ke(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 Ee(e){e.pauses.forEach((function(e){e.cancelled=!0})),e.pauses.clear(),_e(e)}function _e(e){e.pauses.size>0||(g?(v(F.timeout),F.timeout=g((function(){e.pauses.size>0||(v(F.timeout),F.timeout=null,F.blocking=!1,he.advance())}))):(F.blocking=!1,he.advance()))}function Se(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 Ce(e){return e.testsRun+e.testsIgnored===Se(e).length}function Te(e){for(e.testsIgnored++;e=e.parentModule;)e.testsIgnored++}M(we,{todo:function(e,t){ye({testName:e,callback:t,todo:!0})},skip:function(e){ye({testName:e,skip:!0})},only:function(e,t){be({testName:e,callback:t})},each:function(e,t,n){ke(t,(function(t,r){ye({testName:xe(e,r),callback:n,withData:!0,stackOffset:5,data:t})}))}}),we.todo.each=function(e,t,n){ke(t,(function(t,r){ye({testName:xe(e,r),callback:n,todo:!0,withData:!0,stackOffset:5,data:t})}))},we.skip.each=function(e,t){ke(t,(function(t,n){ye({testName:xe(e,n),stackOffset:5,skip:!0})}))},we.only.each=function(e,t,n){ke(t,(function(t,r){be({testName:xe(e,r),callback:n,withData:!0,stackOffset:5,data:t})}))}
|
||
var je,Ne,Me,Oe,qe=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}(),Ae=!0
|
||
if("undefined"!=typeof process){var Re=process.env
|
||
je=Re.FORCE_COLOR,Ne=Re.NODE_DISABLE_COLORS,Me=Re.NO_COLOR,Oe=Re.TERM,Ae=process.stdout&&process.stdout.isTTY}var Ie={enabled:!Ne&&null==Me&&"dumb"!==Oe&&(null!=je&&"0"!==je||Ae),reset:Pe(0,0),bold:Pe(1,22),dim:Pe(2,22),italic:Pe(3,23),underline:Pe(4,24),inverse:Pe(7,27),hidden:Pe(8,28),strikethrough:Pe(9,29),black:Pe(30,39),red:Pe(31,39),green:Pe(32,39),yellow:Pe(33,39),blue:Pe(34,39),magenta:Pe(35,39),cyan:Pe(36,39),white:Pe(37,39),gray:Pe(90,39),grey:Pe(90,39),bgBlack:Pe(40,49),bgRed:Pe(41,49),bgGreen:Pe(42,49),bgYellow:Pe(43,49),bgBlue:Pe(44,49),bgMagenta:Pe(45,49),bgCyan:Pe(46,49),bgWhite:Pe(47,49)}
|
||
function Fe(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 Pe(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:Ie.enabled?Fe(this.keys,t+""):t+""):void 0===t?((r={has:[e],keys:[n]}).reset=Ie.reset.bind(r),r.bold=Ie.bold.bind(r),r.dim=Ie.dim.bind(r),r.italic=Ie.italic.bind(r),r.underline=Ie.underline.bind(r),r.inverse=Ie.inverse.bind(r),r.hidden=Ie.hidden.bind(r),r.strikethrough=Ie.strikethrough.bind(r),r.black=Ie.black.bind(r),r.red=Ie.red.bind(r),r.green=Ie.green.bind(r),r.yellow=Ie.yellow.bind(r),r.blue=Ie.blue.bind(r),r.magenta=Ie.magenta.bind(r),r.cyan=Ie.cyan.bind(r),r.white=Ie.white.bind(r),r.gray=Ie.gray.bind(r),r.grey=Ie.grey.bind(r),r.bgBlack=Ie.bgBlack.bind(r),r.bgRed=Ie.bgRed.bind(r),r.bgGreen=Ie.bgGreen.bind(r),r.bgYellow=Ie.bgYellow.bind(r),r.bgBlue=Ie.bgBlue.bind(r),r.bgMagenta=Ie.bgMagenta.bind(r),r.bgCyan=Ie.bgCyan.bind(r),r.bgWhite=Ie.bgWhite.bind(r),r):Ie.enabled?Fe([n],t+""):t+""
|
||
var r}}var De=Object.prototype.hasOwnProperty
|
||
function Le(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){var n=/['"\\/[{}\]\r\n]/,r=/[-?:,[\]{}#&*!|=>'"%@`]/,i=/(^\s|\s$)/,o=/^[\d._-]+$/,s=/^(true|false|y|n|yes|no|on|off)$/i
|
||
if(""===e||n.test(e)||r.test(e[0])||i.test(e)||o.test(e)||s.test(e)){if(!/\n/.test(e))return JSON.stringify(e)
|
||
var a=new Array(t+1).join(" "),u=e.match(/\n+$/),c=u?u[0].length:0
|
||
if(1===c){var l=e.replace(/\n$/,"").split("\n").map((function(e){return a+e}))
|
||
return"|\n"+l.join("\n")}var f=e.split("\n").map((function(e){return a+e}))
|
||
return"|+\n"+f.join("\n")}return e}return JSON.stringify(Be(e),null,2)}function Be(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[]
|
||
if(-1!==t.indexOf(e))return"[Circular]"
|
||
var n,r=Object.prototype.toString.call(e).replace(/^\[.+\s(.+?)]$/,"$1").toLowerCase()
|
||
switch(r){case"array":t.push(e),n=e.map((function(e){return Be(e,t)})),t.pop()
|
||
break
|
||
case"object":t.push(e),n={},Object.keys(e).forEach((function(r){n[r]=Be(e[r],t)})),t.pop()
|
||
break
|
||
default:n=e}return n}var Ue=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(Ie.red("not ok ".concat(this.testCount," global failure"))),this.logError(e)),this.log("Bail out! "+R(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(Ie.yellow("ok ".concat(this.testCount," # SKIP ").concat(e.fullName.join(" > ")))):"todo"===e.status?(this.log(Ie.cyan("not ok ".concat(this.testCount," # TODO ").concat(e.fullName.join(" > ")))),e.errors.forEach((function(e){return t.logAssertion(e,"todo")}))):(this.log(Ie.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(Ie.yellow("# skip ".concat(e.testCounts.skipped))),this.log(Ie.cyan("# todo ".concat(e.testCounts.todo))),this.log(Ie.red("# fail ".concat(e.testCounts.failed)))}},{key:"logAssertion",value:function(e,t){var n=" ---"
|
||
n+="\n message: ".concat(Le(e.message||"failed")),n+="\n severity: ".concat(Le(t||"failed")),De.call(e,"actual")&&(n+="\n actual : ".concat(Le(e.actual))),De.call(e,"expected")&&(n+="\n expected: ".concat(Le(e.expected))),e.stack&&(n+="\n stack: ".concat(Le(e.stack+"\n"))),n+="\n ...",this.log(n)}},{key:"logError",value:function(e){var t=" ---"
|
||
t+="\n message: ".concat(Le(R(e))),t+="\n severity: ".concat(Le("failed")),e&&e.stack&&(t+="\n stack: ".concat(Le(e.stack+"\n"))),t+="\n ...",this.log(t)}}],[{key:"init",value:function(t,n){return new e(t,n)}}]),e}(),He={console:qe,tap:Ue}
|
||
function ze(e){return function(t){F.globalHooks[e]||(F.globalHooks[e]=[]),F.globalHooks[e].push(t)}}var $e={beforeEach:ze("beforeEach"),afterEach:ze("afterEach")}
|
||
function Qe(e){F.current?F.current.assert.pushResult({result:!1,message:"global failure: ".concat(R(e)),source:e&&e.stack||J(2)}):(U.globalFailureCount++,F.stats.bad++,F.stats.all++,ne("error",e))}var Ge={}
|
||
F.currentModule.suiteReport=U
|
||
var We=!1,Ye=!1
|
||
function Ve(){Ye=!0,g?g((function(){Xe()})):Xe()}function Je(){F.blocking=!1,he.advance()}function Xe(){if(F.started)Je()
|
||
else{F.started=S.now(),""===F.modules[0].name&&0===F.modules[0].tests.length&&F.modules.shift()
|
||
for(var e=[],t=0;t<F.modules.length;t++)""!==F.modules[t].name&&e.push({name:F.modules[t].name,moduleId:F.modules[t].moduleId,tests:F.modules[t].tests})
|
||
ne("runStart",U.start(!0)),se("begin",{totalTests:pe.count,modules:e}).then(Je)}}Ge.isLocal=d&&d.location&&"file:"===d.location.protocol,Ge.version="2.19.1",M(Ge,{config:F,dump:D,equiv:I,reporters:He,hooks:$e,is:q,objectType:O,on:function(e,t){if("string"!=typeof e)throw new TypeError("eventName must be a string when registering a listener")
|
||
if(!T(e,te)){var n=te.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")
|
||
ee[e]||(ee[e]=[]),T(t,ee[e])||ee[e].push(t)},onError:function(e){if(x.warn("QUnit.onError is deprecated and will be removed in QUnit 3.0. Please use QUnit.onUncaughtException instead."),F.current&&F.current.ignoreGlobalErrors)return!0
|
||
var t=new Error(e.message)
|
||
return t.stack=e.stacktrace||e.fileName+":"+e.lineNumber,Qe(t),!1},onUncaughtException:Qe,pushFailure:ge,assert:X.prototype,module:W,test:we,todo:we.todo,skip:we.skip,only:we.only,start:function(e){if(F.current)throw new Error("QUnit.start cannot be called inside a test context.")
|
||
var t=We
|
||
if(We=!0,Ye)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(F.autostart)throw new Error("Called start() outside of a test context when QUnit.config.autostart was true")
|
||
if(!F.pageLoaded)return F.autostart=!0,void(m||Ge.load())
|
||
Ve()},onUnhandledRejection:function(e){x.warn("QUnit.onUnhandledRejection is deprecated and will be removed in QUnit 3.0. Please use QUnit.onUncaughtException instead."),Qe(e)},extend:function(){x.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 M.apply(this,t)},load:function(){F.pageLoaded=!0,M(F,{started:0,updateRate:1e3,autostart:!0,filter:""},!0),Ye||(F.blocking=!1,F.autostart&&Ve())},stack:function(e){return J(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")
|
||
F.callbacks[e].push(t)}}for(var r=0;r<t.length;r++){var i=t[r]
|
||
void 0===F.callbacks[i]&&(F.callbacks[i]=[]),e[i]=n(i)}}(Ge),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}(Ge),function(){if(d&&m){var e=Ge.config,t=Object.prototype.hasOwnProperty
|
||
Ge.begin((function(){if(!t.call(e,"fixture")){var n=m.getElementById("qunit-fixture")
|
||
n&&(e.fixture=n.cloneNode(!0))}})),Ge.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}()
|
||
Ge.urlParams=t,Ge.config.filter=t.filter,Ge.config.module=t.module,Ge.config.moduleId=[].concat(t.moduleId||[]),Ge.config.testId=[].concat(t.testId||[]),!0===t.seed?Ge.config.seed=Math.random().toString(36).slice(2):t.seed&&(Ge.config.seed=t.seed),Ge.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."}),Ge.begin((function(){for(var e=Ge.config.urlConfig,n=0;n<e.length;n++){var r=Ge.config.urlConfig[n]
|
||
"string"!=typeof r&&(r=r.id),void 0===Ge.config[r]&&(Ge.config[r]=t[r])}}))}function n(e){return decodeURIComponent(e.replace(/\+/g,"%20"))}}()
|
||
var Ze={exports:{}}
|
||
!function(e){var t,n
|
||
t=re,n=function(){var e="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()}(Ze)
|
||
var Ke=Ze.exports,et={failedTests:[],defined:0,completed:0}
|
||
function tt(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=Ge.config,t=[],n=!1,r=Object.prototype.hasOwnProperty,i=j({filter:void 0,module:void 0,moduleId:void 0,testId:void 0}),o=null
|
||
Ge.on("runStart",(function(e){et.defined=e.testCounts.total})),Ge.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'>"+tt(m.title)+"</h1><h2 id='qunit-banner'></h2><div id='qunit-testrunner-toolbar' role='navigation'></div>"+(!(n=Ge.config.testId)||n.length<=0?"":"<div id='qunit-filteredTest'>Rerunning selected tests: "+tt(n.join(", "))+" <a id='qunit-clearFilter' href='"+tt(i)+"'>Run all tests</a></div>")+"<h2 id='qunit-userAgent'></h2><ol id='qunit-tests'></ol>"),(s=_("qunit-header"))&&(s.innerHTML="<a href='"+tt(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 "+Ge.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=tt(s.id),u=tt(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=tt(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='"+tt(l)+"'"+(e[s.id]===l?(t=!0)&&" selected='selected'":"")+">"+tt(s.value[l])+"</option>")
|
||
e[s.id]&&!t&&(i+="<option value='"+(a=tt(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='"+tt(s.value)+"'":"")+(e[s.id]?" checked='checked'":"")+" title='"+u+"' />"+tt(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+=O(n,e,!0)}))
|
||
for(var n=0;n<e.length;n++){var r=e[n].obj
|
||
o.selectedMap.has(r.moduleId)||(t+=O(r.moduleId,r.name,!1))}return t}(""===e?o.options.slice(0,20).map((function(e){return{obj:e}})):Ke.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)})),Ge.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(et.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)})),Ge.testStart((function(e){var t,n
|
||
q(e.name,e.testId,e.module),(t=_("qunit-testresult-display"))&&(x(t,"running"),n=Ge.config.reorder&&e.previousFailure,t.innerHTML=[F(et),n?"Rerunning previously failed test: <br />":"Running: ",I(e.name,e.module),A(et.failedTests)].join(""))})),Ge.log((function(e){var t=_("qunit-test-output-"+e.testId)
|
||
if(t){var n,i,o,s=tt(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 "+Ge.dump.parse(e.expected):Ge.dump.parse(e.expected),i=Ge.dump.parse(e.actual),s+="<table><tr class='test-expected'><th>Expected: </th><td><pre>"+tt(n)+"</pre></td></tr>",i!==n?(s+="<tr class='test-actual'><th>Result: </th><td><pre>"+tt(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=Ge.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 ("+Ge.config.maxDepth+").<p>Hint: Use <code>QUnit.dump.maxDepth</code> to run with a higher max depth or <a href='"+tt(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>"+tt(e.source)+"</pre></td></tr>"),s+="</table>"):!e.result&&e.source&&(s+="<table><tr class='test-source'><th>Source: </th><td><pre>"+tt(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)}})),Ge.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"):(et.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>",et.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>"+tt(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))}})),Ge.on("error",(function(e){var t=q("global failure")
|
||
if(t){var n=tt(R(e))
|
||
n="<span class='test-message'>"+n+"</span>",e&&e.stack&&(n+="<table><tr class='test-source'><th>Source: </th><td><pre>"+tt(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",Ge.load):Ge.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)),Ge.onUncaughtException(f)}return s},d.addEventListener("unhandledrejection",(function(e){Ge.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..."),Ge.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){Ge.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=M(M({},Ge.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 O(e,t,n){return'<li><label class="clickable'+(n?" checked":"")+'"><input type="checkbox" value="'+tt(e)+'"'+(n?' checked="checked"':"")+" />"+tt(t)+"</label></li>"}function q(e,t,n){var r=_("qunit-tests")
|
||
if(r){var i=m.createElement("strong")
|
||
i.innerHTML=I(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='"+tt(j({testId:e}))+"'>",1===e.length?"Rerun 1 failed test":"Rerun "+e.length+" failed tests","</a>"].join("")}function I(e,t){var n=""
|
||
return t&&(n="<span class='module-name'>"+tt(t)+"</span>: "),n+"<span class='test-name'>"+tt(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,"")}}(),Ge.diff=function(){function e(){}var t=-1,n=Object.prototype.hasOwnProperty
|
||
return e.prototype.DiffMain=function(e,t,n){var r,i,o,s,a,u
|
||
if(r=(new Date).getTime()+1e3,null===e||null===t)throw new Error("Null input. (DiffMain)")
|
||
return e===t?e?[[0,e]]:[]:(void 0===n&&(n=!0),i=n,o=this.diffCommonPrefix(e,t),s=e.substring(0,o),e=e.substring(o),t=t.substring(o),o=this.diffCommonSuffix(e,t),a=e.substring(e.length-o),e=e.substring(0,e.length-o),t=t.substring(0,t.length-o),u=this.diffCompute(e,t,i,r),s&&u.unshift([0,s]),a&&u.push([0,a]),this.diffCleanupMerge(u),u)},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>"+tt(o)+"</ins>"
|
||
break
|
||
case t:n[r]="<del>"+tt(o)+"</del>"
|
||
break
|
||
case 0:n[r]="<span>"+tt(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&&!((new Date).getTime()>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){var n,r,i,o,s,a,u,c,l,f,h,d,p
|
||
for(n=!1,r=[],i=0,o=null,s=0,c=0,l=0,a=0,u=0;s<e.length;)0===e[s][0]?(r[i++]=s,c=a,l=u,a=0,u=0,o=e[s][1]):(1===e[s][0]?a+=e[s][1].length:u+=e[s][1].length,o&&o.length<=Math.max(c,l)&&o.length<=Math.max(a,u)&&(e.splice(r[i-1],0,[t,o]),e[r[i-1]+1][0]=1,i--,s=--i>0?r[i-1]:-1,c=0,l=0,a=0,u=0,o=null,n=!0)),s++
|
||
for(n&&this.diffCleanupMerge(e),s=1;s<e.length;)e[s-1][0]===t&&1===e[s][0]&&(f=e[s-1][1],h=e[s][1],(d=this.diffCommonOverlap(f,h))>=(p=this.diffCommonOverlap(h,f))?(d>=f.length/2||d>=h.length/2)&&(e.splice(s,0,[0,h.substring(0,d)]),e[s-1][1]=f.substring(0,f.length-d),e[s+1][1]=h.substring(d),s++):(p>=f.length/2||p>=h.length/2)&&(e.splice(s,0,[0,f.substring(0,p)]),e[s-1][0]=1,e[s-1][1]=h.substring(0,h.length-p),e[s+1][0]=t,e[s+1][1]=f.substring(p),s++),s++),s++},e.prototype.diffCommonOverlap=function(e,t){var n,r,i,o,s,a,u
|
||
if(n=e.length,r=t.length,0===n||0===r)return 0
|
||
if(n>r?e=e.substring(n-r):n<r&&(t=t.substring(0,n)),i=Math.min(n,r),e===t)return i
|
||
for(o=0,s=1;;){if(a=e.substring(i-s),-1===(u=t.indexOf(a)))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 i={},(r=[])[0]="",{chars1:o(e),chars2:o(t),lineArray:r}},e.prototype.diffCharsToLines=function(e,t){var n,r,i,o
|
||
for(n=0;n<e.length;n++){for(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){var n,r,i,o,s,a,u,c
|
||
for(e.push([0,""]),n=0,r=0,i=0,s="",o="";n<e.length;)switch(e[n][0]){case 1:i++,o+=e[n][1],n++
|
||
break
|
||
case t:r++,s+=e[n][1],n++
|
||
break
|
||
case 0:r+i>1?(0!==r&&0!==i&&(0!==(a=this.diffCommonPrefix(o,s))&&(n-r-i>0&&0===e[n-r-i-1][0]?e[n-r-i-1][1]+=o.substring(0,a):(e.splice(0,0,[0,o.substring(0,a)]),n++),o=o.substring(a),s=s.substring(a)),0!==(a=this.diffCommonSuffix(o,s))&&(e[n][1]=o.substring(o.length-a)+e[n][1],o=o.substring(0,o.length-a),s=s.substring(0,s.length-a))),0===r?e.splice(n-i,r+i,[1,o]):0===i?e.splice(n-r,r+i,[t,s]):e.splice(n-r-i,r+i,[t,s],[1,o]),n=n-r-i+(r?1:0)+(i?1:0)+1):0!==n&&0===e[n-1][0]?(e[n-1][1]+=e[n][1],e.splice(n,1)):n++,i=0,r=0,s="",o=""}for(""===e[e.length-1][1]&&e.pop(),u=!1,n=1;n<e.length-1;)0===e[n-1][0]&&0===e[n+1][0]&&((c=e[n][1]).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)}}()}()},5665:e=>{var t=Array.isArray
|
||
e.exports=function(){if(!arguments.length)return[]
|
||
var e=arguments[0]
|
||
return t(e)?e:[e]}},66:e=>{e.exports=function(e){var t=e?e.length:0
|
||
return t?e[t-1]:void 0}},9254:(e,t,n)=>{var r="__lodash_hash_undefined__",i=9007199254740991,o=/^\[object .+?Constructor\]$/,s=/^(?:0|[1-9]\d*)$/,a="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,u="object"==typeof self&&self&&self.Object===Object&&self,c=a||u||Function("return this")()
|
||
function l(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)}function f(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,d)
|
||
for(var r=-1,i=e.length;++r<i;)if(e[r]===t)return r
|
||
return-1}(e,t)>-1}function h(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n]
|
||
return e}function d(e){return e!=e}function p(e,t){return e.has(t)}function g(e,t){return function(n){return e(t(n))}}var v,m=Array.prototype,y=Function.prototype,b=Object.prototype,w=c["__core-js_shared__"],x=(v=/[^.]+$/.exec(w&&w.keys&&w.keys.IE_PROTO||""))?"Symbol(src)_1."+v:"",k=y.toString,E=b.hasOwnProperty,_=b.toString,S=RegExp("^"+k.call(E).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),C=c.Symbol,T=g(Object.getPrototypeOf,Object),j=b.propertyIsEnumerable,N=m.splice,M=C?C.isConcatSpreadable:void 0,O=Object.getOwnPropertySymbols,q=Math.max,A=H(c,"Map"),R=H(Object,"create")
|
||
function I(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 F(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 P(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 D(e){var t=-1,n=e?e.length:0
|
||
for(this.__data__=new P;++t<n;)this.add(e[t])}function L(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 B(e,t,n,r,i){var o=-1,s=e.length
|
||
for(n||(n=Q),i||(i=[]);++o<s;){var a=e[o]
|
||
t>0&&n(a)?t>1?B(a,t-1,n,r,i):h(i,a):r||(i[i.length]=a)}return i}function U(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 H(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t)
|
||
return function(e){if(!Z(e)||x&&x in e)return!1
|
||
var t=X(e)||function(e){var t=!1
|
||
if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}(e)?S:o
|
||
return t.test(function(e){if(null!=e){try{return k.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(e))}(n)?n:void 0}I.prototype.clear=function(){this.__data__=R?R(null):{}},I.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},I.prototype.get=function(e){var t=this.__data__
|
||
if(R){var n=t[e]
|
||
return n===r?void 0:n}return E.call(t,e)?t[e]:void 0},I.prototype.has=function(e){var t=this.__data__
|
||
return R?void 0!==t[e]:E.call(t,e)},I.prototype.set=function(e,t){return this.__data__[e]=R&&void 0===t?r:t,this},F.prototype.clear=function(){this.__data__=[]},F.prototype.delete=function(e){var t=this.__data__,n=L(t,e)
|
||
return!(n<0||(n==t.length-1?t.pop():N.call(t,n,1),0))},F.prototype.get=function(e){var t=this.__data__,n=L(t,e)
|
||
return n<0?void 0:t[n][1]},F.prototype.has=function(e){return L(this.__data__,e)>-1},F.prototype.set=function(e,t){var n=this.__data__,r=L(n,e)
|
||
return r<0?n.push([e,t]):n[r][1]=t,this},P.prototype.clear=function(){this.__data__={hash:new I,map:new(A||F),string:new I}},P.prototype.delete=function(e){return U(this,e).delete(e)},P.prototype.get=function(e){return U(this,e).get(e)},P.prototype.has=function(e){return U(this,e).has(e)},P.prototype.set=function(e,t){return U(this,e).set(e,t),this},D.prototype.add=D.prototype.push=function(e){return this.__data__.set(e,r),this},D.prototype.has=function(e){return this.__data__.has(e)}
|
||
var z=O?g(O,Object):ie,$=O?function(e){for(var t=[];e;)h(t,z(e)),e=T(e)
|
||
return t}:ie
|
||
function Q(e){return V(e)||Y(e)||!!(M&&e&&e[M])}function G(e,t){return!!(t=null==t?i:t)&&("number"==typeof e||s.test(e))&&e>-1&&e%1==0&&e<t}function W(e){if("string"==typeof e||function(e){return"symbol"==typeof e||K(e)&&"[object Symbol]"==_.call(e)}(e))return e
|
||
var t=e+""
|
||
return"0"==t&&1/e==-1/0?"-0":t}function Y(e){return function(e){return K(e)&&J(e)}(e)&&E.call(e,"callee")&&(!j.call(e,"callee")||"[object Arguments]"==_.call(e))}var V=Array.isArray
|
||
function J(e){return null!=e&&function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=i}(e.length)&&!X(e)}function X(e){var t=Z(e)?_.call(e):""
|
||
return"[object Function]"==t||"[object GeneratorFunction]"==t}function Z(e){var t=typeof e
|
||
return!!e&&("object"==t||"function"==t)}function K(e){return!!e&&"object"==typeof e}function ee(e){return J(e)?function(e,t){var n=V(e)||Y(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||G(o,r))||n.push(o)
|
||
return n}(e):function(e){if(!Z(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||b)),i=[]
|
||
for(var o in e)("constructor"!=o||!r&&E.call(e,o))&&i.push(o)
|
||
return i}(e)}var te,ne,re=(te=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}(B(t,1),W),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=f,s=!0,a=e.length,u=[],c=t.length
|
||
if(!a)return u
|
||
t.length>=200&&(o=p,s=!1,t=new D(t))
|
||
e:for(;++i<a;){var l=e[i],h=l
|
||
if(l=0!==l?l:0,s&&h==h){for(var d=c;d--;)if(t[d]===h)continue e
|
||
u.push(l)}else o(t,h,undefined)||u.push(l)}return u}(function(e){return function(e,t,n){var r=t(e)
|
||
return V(e)?r:h(r,n(e))}(e,ee,$)}(e),t)))},ne=q(void 0===ne?te.length-1:ne,0),function(){for(var e=arguments,t=-1,n=q(e.length-ne,0),r=Array(n);++t<n;)r[t]=e[ne+t]
|
||
t=-1
|
||
for(var i=Array(ne+1);++t<ne;)i[t]=e[t]
|
||
return i[ne]=r,l(te,this,i)})
|
||
function ie(){return[]}e.exports=re},3143:(e,t,n)=>{"use strict"
|
||
var r=n(526)
|
||
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)}},8071:(e,t,n)=>{"use strict"
|
||
var r=n(4633),i=n(5901),o=n(6882),s=n(3143)
|
||
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))}},9174: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},3591:(e,t,n)=>{"use strict"
|
||
var r=n(3143),i=n(6690),o=n(9076),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},7453:(e,t,n)=>{"use strict"
|
||
var r=n(3143),i=n(526),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__"}},8392:(e,t,n)=>{"use strict"
|
||
var r=n(3527),i=function(e){this.constructor(e,/.*\.(?:feature|spec|specification)$/)}
|
||
i.prototype=new r,e.exports=i},3527:(e,t,n)=>{"use strict"
|
||
var r=n(9782),i=r.path,o=r.fs,s=n(3143)
|
||
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)}))}}},4404:(e,t,n)=>{"use strict"
|
||
var r=n(8071),i=n(9174),o=n(7453),s=n(3143),a=n(526)
|
||
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))}))}}},6877:(e,t,n)=>{"use strict"
|
||
var r=n(386),i=n(3591),o=n(3143)
|
||
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)}))}}},386:(e,t,n)=>{"use strict"
|
||
var r=n(526),i=n(3143),o=n(9174),s=n(6690),a=n(7453)
|
||
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()})}},886:(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__}}}},6690:(e,t,n)=>{"use strict"
|
||
var r=n(3143)
|
||
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+"/"}}},6007: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}}},5682:(e,t,n)=>{"use strict"
|
||
var r=n(4404),i=n(9174),o=n(526),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.1.0 Copyright 2010 Stephen Cresswell / Energized Work Ltd"}}
|
||
e.exports=s},7182: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))}},3986: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)}},2453:(e,t,n)=>{"use strict"
|
||
e.exports={date:n(7182),integer:n(7444),float:n(3986),list:n(3488),table:n(3337),pass_through:n(9076)}},7444: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)}},3488:e=>{"use strict"
|
||
e.exports=function(e,t){return t(null,e.split(/\n/))}},9076:e=>{"use strict"
|
||
e.exports=function(e,t){return t(null,e)}},3337:(e,t,n)=>{"use strict"
|
||
var r=n(3143),i=n(6007),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)}))}}},526: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)}}}()},409:(e,t,n)=>{"use strict"
|
||
var r={Yadda:n(5682),EventBus:n(7453),Interpreter:n(4404),Context:n(9174),Library:n(6877),Dictionary:n(3591),FeatureFileSearch:n(8392),FileSearch:n(3527),Platform:n(886),localisation:n(5534),converters:n(2453),parsers:n(3574),plugins:n(918),shims:n(9782),createInstance:function(){return r.Yadda.apply(null,Array.prototype.slice.call(arguments,0))}}
|
||
e.exports=r},2889:(e,t,n)=>{"use strict"
|
||
var r=n(8271)
|
||
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"]})},8555:(e,t,n)=>{"use strict"
|
||
var r=n(8271)
|
||
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"]})},9307:(e,t,n)=>{"use strict"
|
||
var r=n(8271)
|
||
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"]})},298:(e,t,n)=>{"use strict"
|
||
var r=n(8271)
|
||
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}})},4430:(e,t,n)=>{"use strict"
|
||
var r=n(8271)
|
||
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"]})},8271:(e,t,n)=>{"use strict"
|
||
var r=n(6877),i=n(3143)
|
||
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]}}},5821:(e,t,n)=>{"use strict"
|
||
var r=n(8271)
|
||
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}})},3040:(e,t,n)=>{"use strict"
|
||
var r=n(8271)
|
||
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}})},5991:(e,t,n)=>{"use strict"
|
||
var r=n(8271)
|
||
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}})},2482:(e,t,n)=>{"use strict"
|
||
var r=n(8271)
|
||
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}})},9494:(e,t,n)=>{"use strict"
|
||
var r=n(8271)
|
||
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"]})},4029:(e,t,n)=>{"use strict"
|
||
var r=n(8271)
|
||
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}})},6076:(e,t,n)=>{"use strict"
|
||
var r=n(8271)
|
||
e.exports=new r("Ukrainian",{feature:"(?:[Фф]ункція|[Фф]ункціонал|[Пп]отреба|[Аа]спект|[Оо]собливість|[Вв]ластивість)",scenario:"(?:[Сс]ценарій|[Шш]аблон)",examples:"[Пп]риклади",pending:"(?:[Нн]еперевірений|[Чч]екаючий|[Pp]ending|[Tt]odo)",only:"[Тт]ільки",background:"[Кк]онтекст",given:"(?:[Дд]ано|[Пп]ри|[Нн]ехай|[Іі]|[Тт]а|[Аа]ле)",when:"(?:[Яя]кщо|[Дд]е|[Кк]оли|[Іі]|[Тт]а|[Аа]ле)",then:"(?:[Тт]оді|[Іі]|[Тт]а|[Аа]ле)",_steps:["given","when","then"]})},5534:(e,t,n)=>{"use strict"
|
||
e.exports={Chinese:n(2889),English:n(9307),French:n(298),German:n(4430),Dutch:n(8555),Norwegian:n(5821),Pirate:n(3040),Ukrainian:n(6076),Polish:n(5991),Spanish:n(4029),Russian:n(9494),Portuguese:n(2482),default:n(9307),Language:n(8271)}},5070:(e,t,n)=>{"use strict"
|
||
e.exports=function(e){var t=n(9782).fs,r=new(n(3610))(e)
|
||
this.parse=function(e,n){var i=t.readFileSync(e,"utf8"),o=r.parse(i)
|
||
return n&&n(o)||o}}},3610:(e,t,n)=>{"use strict"
|
||
var r=n(3143),i=n(526),o=n(6007),s=n(5534)
|
||
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()}}}},7724:(e,t,n)=>{"use strict"
|
||
var r=n(3143)
|
||
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)}}},3574:(e,t,n)=>{"use strict"
|
||
e.exports={StepParser:n(7724),FeatureParser:n(3610),FeatureFileParser:n(5070)}},8418:(e,t,n)=>{"use strict"
|
||
if(!(e=n.nmd(e)).client){var r=n(9782).fs
|
||
n.g.process=n.g.process||{cwd:function(){return r.workingDirectory}}}e.exports=function(e,t){var r=n(409).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)}}},918:(e,t,n)=>{"use strict"
|
||
e.exports={casper:n(8418),mocha:{ScenarioLevelPlugin:n(616),StepLevelPlugin:n(2271)},get jasmine(){return this.mocha}}},749:(e,t,n)=>{"use strict"
|
||
var r=n(5534),i=n(886),o=n(5070),s=n(3143)
|
||
e.exports.create=function(e){var t=new i,n=e.language||r.default,a=e.parser||new o(n),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)}))}}}},616:(e,t,n)=>{"use strict"
|
||
var r=n(3143),i=n(886),o=n(749)
|
||
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)}))}))}}},2271:(e,t,n)=>{"use strict"
|
||
var r=n(3143),i=n(886),o=n(749)
|
||
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)}))}}},4633: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]}()}},6882:(e,t,n)=>{"use strict"
|
||
var r=n(3143)
|
||
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)}}},5901: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}}},9782:(e,t,n)=>{"use strict"
|
||
var r,i,o,s,a=n(886)
|
||
e.exports=(i=function(){return{fs:n(9265),path:n(3642),process:process}},o=function(){return{fs:n(4044),path:n(4152),process:n(5284)}},s=function(){return{fs:n(2459),path:n(8281),process:n(7804)}},(r=new a).is_phantom()?o():r.is_browser()&&r.is_karma()?s():r.is_node()?i():{})},2459:(e,t,n)=>{e.exports=function(){"use strict"
|
||
var e=n(8281)
|
||
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}()},8281:(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}()},7804:(e,t,n)=>{e.exports=function(){"use strict"
|
||
var e=n(2459)
|
||
return{cwd:function(){return e.workingDirectory}}}()},4044:(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}()},4152:(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}()},5284:(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}()}}])
|