UNPKG

truman

Version:

Simple test fixtures for single page apps

2 lines 1.08 MB
var truman=function(modules){function __webpack_require__(moduleId){if(installedModules[moduleId])return installedModules[moduleId].exports;var module=installedModules[moduleId]={exports:{},id:moduleId,loaded:!1};return modules[moduleId].call(module.exports,module,module.exports,__webpack_require__),module.loaded=!0,module.exports}var installedModules={};return __webpack_require__.m=modules,__webpack_require__.c=installedModules,__webpack_require__.p="",__webpack_require__(0)}([function(module,exports,__webpack_require__){"use strict";var sinon=__webpack_require__(1),fixtureHelper=__webpack_require__(65),stateHelper=__webpack_require__(268),xhrHelper=__webpack_require__(208),loggingHelper=__webpack_require__(269),storage=__webpack_require__(270),Promise=__webpack_require__(293),opts={omittedDomains:[]},storageFixtures=[],RECORDING_STATE="recording",REPLAYING_STATE="replaying",truman=module.exports={_storageFifo:Promise.resolve(),_initialized:!1,initialize:function(options,callback){var message="Truman is up and running!";return opts=Object.assign(opts,options),truman._initialized?(callback&&callback(message),Promise.resolve(message)):(storage.initialize(options),fixtureHelper.initialize(options),truman._restoreState().then(function(){return truman._initialized=!0,loggingHelper.log("%c"+message,"color: green"),callback&&callback(message),message}))},pull:function(fixtureName,fixture,callback){if(truman.currentStatus())throw new Error("Cannot pull when in either a recording or replaying state, call `truman.restore()` first.");return storage.pull(fixtureName,fixture).then(function(){return callback()})},push:function(fixtureCollectionName,callback){if(truman.currentStatus())throw new Error("Cannot push when in either a recording or replaying state, call `truman.restore()` first.");return storage.load(fixtureCollectionName).then(function(result){return callback(result)})},record:function(fixtureCollectionName,callback){return truman.currentStatus()===REPLAYING_STATE&&truman.restore(),storage.load(fixtureCollectionName).then(function(fixtures){storageFixtures=fixtures,sinon.useFakeXMLHttpRequest(),window.XMLHttpRequest.useFilters=!0,window.XMLHttpRequest.addFilter(function(){return!0}),xhrHelper.monkeyPatchXHR(),window.XMLHttpRequest.onCreate=function(xhr){return truman._storeXHRWhenReady(xhr,fixtureCollectionName)},loggingHelper.log("%cRECORDING NEW FIXTURES","color: red")}).then(function(){stateHelper.updateState({fixtureCollectionName:fixtureCollectionName,status:RECORDING_STATE}),callback&&callback()})},replay:function(fixtureCollectionName,callback){return truman.currentStatus()===RECORDING_STATE&&truman.restore(),storage.load(fixtureCollectionName).then(function(fixtures){var fakeServer=sinon.fakeServer.create();fakeServer.autoRespond=!0,fakeServer.autoRespondAfter=0,fakeServer.respondWith(/.*/,function(xhr){var matchingFixtures=fixtureHelper.findForSinonXHR(fixtures,xhr),fixture=matchingFixtures[0];fixture?(matchingFixtures.length>1&&(fixtureHelper.removeFirst(fixtures,fixture),truman._storageFifo=truman._storageFifo.then(function(){return storage.store(fixtures,fixtureCollectionName)})),xhr.respond(fixture.response.status,fixture.response.headers,fixture.response.body),loggingHelper.log("%cREPLAY%c: "+fixture.request.method+" "+fixture.request.url,"color: green","color: black"),loggingHelper.log(xhr,fixture)):(loggingHelper.log("%cNOT FOUND%c: "+xhr.method+" "+xhr.url,"color: red","color: black"),loggingHelper.log("Looking for XHR:",xhr),"GET"===xhr.method?loggingHelper.log("Fixtures (closest URL first):",fixtureHelper.sortByClosestMatchingURL(fixtures,xhr)):loggingHelper.log("Fixtures:",fixtures))}),window.XMLHttpRequest.useFilters=!0,window.XMLHttpRequest.filters=[function(method,url){var foundFixtures=fixtureHelper.find(fixtures,{method:method,url:url}).length;return foundFixtures||(loggingHelper.log("%cCALLTHROUGH%c: "+url,"color: grey","color: black"),loggingHelper.log(fixtures)),!foundFixtures},function(method,url){var domain=fixtureHelper.domainFromUrl(url);return opts.omittedDomains.includes(domain)}],stateHelper.updateState({fixtureCollectionName:fixtureCollectionName,status:REPLAYING_STATE});var message="Replaying "+fixtures.length+" stored fixtures";callback&&callback(message),loggingHelper.log("%c"+message,"color: green")})},restore:function(){truman._restoreXhr(),stateHelper.updateState(null),loggingHelper.log("%cRESTORED%c: All XHR requests unstubbed.","color: green","color: black")},clear:function(fixtureCollectionName,callback){return storage.clear(fixtureCollectionName).then(function(){loggingHelper.log("%cCLEARED%c: All local fixtures cleared.","color: green","color: black"),callback&&callback()})},currentStatus:function(){return stateHelper.loadState().status||null},_restoreState:function(){var state=stateHelper.loadState();if(state.fixtureCollectionName){if(state.status===RECORDING_STATE)return truman.record(state.fixtureCollectionName);if(state.status===REPLAYING_STATE)return truman.replay(state.fixtureCollectionName)}return Promise.resolve()},_restoreXhr:function(){window.XMLHttpRequest.restore(),xhrHelper.unMonkeyPatchXHR()},_storeXHR:function(xhr,fixtureCollectionName){if(!opts.omittedDomains.includes(xhr.url))return loggingHelper.log("%cRECORDING%c: "+xhr.url,"color: red","color: black"),fixtureHelper.addXhr(storageFixtures,xhr),xhr.fixtured=!0,truman._storageFifo=truman._storageFifo.then(function(){return storage.store(storageFixtures,fixtureCollectionName)}),truman._storageFifo},_storeXHRWhenReady:function(xhr,fixtureCollectionName){var _this=this,_arguments=arguments;xhr.addEventListener("load",function(){xhr.fixtured||truman._storeXHR(xhr,fixtureCollectionName)});var oldOnReadyStateChange=xhr.onreadystatechange;xhr.addEventListener("readystatechange",function(){xhr.readyState!==window.XMLHttpRequest.DONE||xhr.fixtured||truman._storeXHR(xhr,fixtureCollectionName),oldOnReadyStateChange&&oldOnReadyStateChange.apply(_this,_arguments)})}}},function(module,exports,__webpack_require__){"use strict";exports.assert=__webpack_require__(2),exports.collection=__webpack_require__(19),exports.match=__webpack_require__(10),exports.spy=__webpack_require__(20),exports.spyCall=__webpack_require__(28),exports.stub=__webpack_require__(34),exports.mock=__webpack_require__(39);var sandbox=__webpack_require__(42);exports.sandbox=sandbox,exports.expectation=__webpack_require__(40),exports.createStubInstance=__webpack_require__(34).createStubInstance,exports.defaultConfig=__webpack_require__(64);var fakeTimers=__webpack_require__(43);exports.useFakeTimers=fakeTimers.useFakeTimers,exports.clock=fakeTimers.clock,exports.timers=fakeTimers.timers;var nise=__webpack_require__(45);exports.xhr=nise.fakeXhr.xhr,exports.FakeXMLHttpRequest=nise.fakeXhr.FakeXMLHttpRequest,exports.useFakeXMLHttpRequest=nise.fakeXhr.useFakeXMLHttpRequest,exports.fakeServer=nise.fakeServer,exports.fakeServerWithClock=nise.fakeServerWithClock,exports.createSandbox=sandbox.create,exports.createFakeServer=nise.fakeServer.create.bind(nise.fakeServer),exports.createFakeServerWithClock=nise.fakeServerWithClock.create.bind(nise.fakeServerWithClock);var behavior=__webpack_require__(21);exports.addBehavior=function(name,fn){behavior.addBehavior(exports.stub,name,fn)};var format=__webpack_require__(6);exports.setFormatter=format.setFormatter},function(module,exports,__webpack_require__){(function(global){"use strict";function verifyIsStub(){var args=Array.prototype.slice.call(arguments);args.forEach(function(method){method||assert.fail("fake is not a spy"),method.proxy&&method.proxy.isSinonProxy?verifyIsStub(method.proxy):("function"!=typeof method&&assert.fail(method+" is not a function"),"function"!=typeof method.getCall&&assert.fail(method+" is not stubbed"))})}function verifyIsValidAssertion(assertionMethod,assertionArgs){switch(assertionMethod){case"notCalled":case"called":case"calledOnce":case"calledTwice":case"calledThrice":0!==assertionArgs.length&&assert.fail(assertionMethod+" takes 1 argument but was called with "+(assertionArgs.length+1)+" arguments")}}function failAssertion(object,msg){object=object||global;var failMethod=object.fail||assert.fail;failMethod.call(object,msg)}function mirrorPropAsAssertion(name,method,message){2===arguments.length&&(message=method,method=name),assert[name]=function(fake){verifyIsStub(fake);var args=slice.call(arguments,1),failed=!1;verifyIsValidAssertion(name,args),failed="function"==typeof method?!method(fake):"function"==typeof fake[method]?!fake[method].apply(fake,args):!fake[method],failed?failAssertion(this,(fake.printf||fake.proxy.printf).apply(fake,[message].concat(args))):assert.pass(name)}}function exposedName(prefix,prop){return!prefix||/^fail/.test(prop)?prop:prefix+prop.slice(0,1).toUpperCase()+prop.slice(1)}var assert,calledInOrder=__webpack_require__(3),orderByFirstCall=__webpack_require__(4),timesInWords=__webpack_require__(5),format=__webpack_require__(6),sinonMatch=__webpack_require__(10),slice=Array.prototype.slice;assert={failException:"AssertError",fail:function(message){var error=new Error(message);throw error.name=this.failException||assert.failException,error},pass:function(){},callOrder:function(){verifyIsStub.apply(null,arguments);var expected="",actual="";if(calledInOrder(arguments))assert.pass("callOrder");else{try{expected=[].join.call(arguments,", ");for(var calls=slice.call(arguments),i=calls.length;i;)calls[--i].called||calls.splice(i,1);actual=orderByFirstCall(calls).join(", ")}catch(e){}failAssertion(this,"expected "+expected+" to be called in order but were called as "+actual)}},callCount:function(method,count){if(verifyIsStub(method),method.callCount!==count){var msg="expected %n to be called "+timesInWords(count)+" but was called %c%C";failAssertion(this,method.printf(msg))}else assert.pass("callCount")},expose:function(target,options){if(!target)throw new TypeError("target is null or undefined");var o=options||{},prefix="undefined"==typeof o.prefix&&"assert"||o.prefix,includeFail="undefined"==typeof o.includeFail||!!o.includeFail,instance=this;return Object.keys(instance).forEach(function(method){"expose"===method||!includeFail&&/^(fail)/.test(method)||(target[exposedName(prefix,method)]=instance[method])}),target},match:function(actual,expectation){var matcher=sinonMatch(expectation);if(matcher.test(actual))assert.pass("match");else{var formatted=["expected value to match"," expected = "+format(expectation)," actual = "+format(actual)];failAssertion(this,formatted.join("\n"))}}},mirrorPropAsAssertion("called","expected %n to have been called at least once but was never called"),mirrorPropAsAssertion("notCalled",function(spy){return!spy.called},"expected %n to not have been called but was called %c%C"),mirrorPropAsAssertion("calledOnce","expected %n to be called once but was called %c%C"),mirrorPropAsAssertion("calledTwice","expected %n to be called twice but was called %c%C"),mirrorPropAsAssertion("calledThrice","expected %n to be called thrice but was called %c%C"),mirrorPropAsAssertion("calledOn","expected %n to be called with %1 as this but was called with %t"),mirrorPropAsAssertion("alwaysCalledOn","expected %n to always be called with %1 as this but was called with %t"),mirrorPropAsAssertion("calledWithNew","expected %n to be called with new"),mirrorPropAsAssertion("alwaysCalledWithNew","expected %n to always be called with new"),mirrorPropAsAssertion("calledWith","expected %n to be called with arguments %D"),mirrorPropAsAssertion("calledWithMatch","expected %n to be called with match %D"),mirrorPropAsAssertion("alwaysCalledWith","expected %n to always be called with arguments %D"),mirrorPropAsAssertion("alwaysCalledWithMatch","expected %n to always be called with match %D"),mirrorPropAsAssertion("calledWithExactly","expected %n to be called with exact arguments %D"),mirrorPropAsAssertion("alwaysCalledWithExactly","expected %n to always be called with exact arguments %D"),mirrorPropAsAssertion("neverCalledWith","expected %n to never be called with arguments %*%C"),mirrorPropAsAssertion("neverCalledWithMatch","expected %n to never be called with match %*%C"),mirrorPropAsAssertion("threw","%n did not throw exception%C"),mirrorPropAsAssertion("alwaysThrew","%n did not always throw exception%C"),module.exports=assert}).call(exports,function(){return this}())},function(module,exports){"use strict";var every=Array.prototype.every;module.exports=function(spies){function hasCallsLeft(spy){return void 0===callMap[spy.id]&&(callMap[spy.id]=0),callMap[spy.id]<spy.callCount}var callMap={};return arguments.length>1&&(spies=arguments),every.call(spies,function(spy,i){var calledBeforeNext=!0;return i!==spies.length-1&&(calledBeforeNext=spy.calledBefore(spies[i+1])),!(!hasCallsLeft(spy)||!calledBeforeNext)&&(callMap[spy.id]+=1,!0)})}},function(module,exports){"use strict";module.exports=function(spies){return spies.sort(function(a,b){var aCall=a.getCall(0),bCall=b.getCall(0),aId=aCall&&aCall.callId||-1,bId=bCall&&bCall.callId||-1;return aId<bId?-1:1})}},function(module,exports){"use strict";var array=[null,"once","twice","thrice"];module.exports=function(count){return array[count]||(count||0)+" times"}},function(module,exports,__webpack_require__){"use strict";function format(){return customFormatter?customFormatter.apply(null,arguments):formatter.ascii.apply(formatter,arguments)}var customFormatter,formatio=__webpack_require__(7),formatter=formatio.configure({quoteStrings:!1,limitChildrenCount:250});format.setFormatter=function(aCustomFormatter){if("function"!=typeof aCustomFormatter)throw new Error("format.setFormatter must be called with a function");customFormatter=aCustomFormatter},module.exports=format},function(module,exports,__webpack_require__){var __WEBPACK_AMD_DEFINE_FACTORY__,__WEBPACK_AMD_DEFINE_ARRAY__,__WEBPACK_AMD_DEFINE_RESULT__;(function(global){(__webpack_require__(8)&&function(m){__WEBPACK_AMD_DEFINE_ARRAY__=[__webpack_require__(9)],__WEBPACK_AMD_DEFINE_FACTORY__=m,__WEBPACK_AMD_DEFINE_RESULT__="function"==typeof __WEBPACK_AMD_DEFINE_FACTORY__?__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports,__WEBPACK_AMD_DEFINE_ARRAY__):__WEBPACK_AMD_DEFINE_FACTORY__,!(void 0!==__WEBPACK_AMD_DEFINE_RESULT__&&(module.exports=__WEBPACK_AMD_DEFINE_RESULT__))}||"object"==typeof module&&function(m){module.exports=m(__webpack_require__(9))}||function(m){this.formatio=m(this.samsam)})(function(samsam){"use strict";function functionName(func){if(!func)return"";if(func.displayName)return func.displayName;if(func.name)return func.name;var matches=func.toString().match(/function\s+([^\(]+)/m);return matches&&matches[1]||""}function constructorName(f,object){var i,l,name=functionName(object&&object.constructor),excludes=f.excludeConstructors||formatio.excludeConstructors||[];for(i=0,l=excludes.length;i<l;++i){if("string"==typeof excludes[i]&&excludes[i]===name)return"";if(excludes[i].test&&excludes[i].test(name))return""}return name}function isCircular(object,objects){if("object"!=typeof object)return!1;var i,l;for(i=0,l=objects.length;i<l;++i)if(objects[i]===object)return!0;return!1}function ascii(f,object,processed,indent){if("string"==typeof object){if(0===object.length)return"(empty string)";var qs=f.quoteStrings,quote="boolean"!=typeof qs||qs;return processed||quote?'"'+object+'"':object}if("function"==typeof object&&!(object instanceof RegExp))return ascii.func(object);if(processed=processed||[],isCircular(object,processed))return"[Circular]";if("[object Array]"===Object.prototype.toString.call(object))return ascii.array.call(f,object,processed);if(!object)return String(1/object===-(1/0)?"-0":object);if(samsam.isElement(object))return ascii.element(object);if("function"==typeof object.toString&&object.toString!==Object.prototype.toString)return object.toString();var i,l;for(i=0,l=specialObjects.length;i<l;i++)if(object===specialObjects[i].object)return specialObjects[i].value;return"undefined"!=typeof Set&&object instanceof Set?ascii.set.call(f,object,processed):ascii.object.call(f,object,processed,indent)}function delimit(str,delimiters){return delimiters=delimiters||["[","]"],delimiters[0]+str+delimiters[1]}function Formatio(options){for(var opt in options)this[opt]=options[opt]}var formatio={excludeConstructors:["Object",/^.$/],quoteStrings:!0,limitChildrenCount:0},specialObjects=(Object.prototype.hasOwnProperty,[]);return"undefined"!=typeof global&&specialObjects.push({object:global,value:"[object global]"}),"undefined"!=typeof document&&specialObjects.push({object:document,value:"[object HTMLDocument]"}),"undefined"!=typeof window&&specialObjects.push({object:window,value:"[object Window]"}),ascii.func=function(func){return"function "+functionName(func)+"() {}"},ascii.array=function(array,processed,delimiters){processed=processed||[],processed.push(array);var i,l,pieces=[];for(l=this.limitChildrenCount>0?Math.min(this.limitChildrenCount,array.length):array.length,i=0;i<l;++i)pieces.push(ascii(this,array[i],processed));return l<array.length&&pieces.push("[... "+(array.length-l)+" more elements]"),delimit(pieces.join(", "),delimiters)},ascii.set=function(set,processed){return ascii.array.call(this,Array.from(set),processed,["Set {","}"])},ascii.object=function(object,processed,indent){processed=processed||[],processed.push(object),indent=indent||0;var prop,str,obj,i,k,l,pieces=[],properties=samsam.keys(object).sort(),length=3;for(l=this.limitChildrenCount>0?Math.min(this.limitChildrenCount,properties.length):properties.length,i=0;i<l;++i)prop=properties[i],obj=object[prop],str=isCircular(obj,processed)?"[Circular]":ascii(this,obj,processed,indent+2),str=(/\s/.test(prop)?'"'+prop+'"':prop)+": "+str,length+=str.length,pieces.push(str);var cons=constructorName(this,object),prefix=cons?"["+cons+"] ":"",is="";for(i=0,k=indent;i<k;++i)is+=" ";return l<properties.length&&pieces.push("[... "+(properties.length-l)+" more elements]"),length+indent>80?prefix+"{\n "+is+pieces.join(",\n "+is)+"\n"+is+"}":prefix+"{ "+pieces.join(", ")+" }"},ascii.element=function(element){var attr,attrName,i,l,val,tagName=element.tagName.toLowerCase(),attrs=element.attributes,pairs=[];for(i=0,l=attrs.length;i<l;++i)attr=attrs.item(i),attrName=attr.nodeName.toLowerCase().replace("html:",""),val=attr.nodeValue,"contenteditable"===attrName&&"inherit"===val||val&&pairs.push(attrName+'="'+val+'"');var formatted="<"+tagName+(pairs.length>0?" ":""),content=element.innerHTML||"";content.length>20&&(content=content.substr(0,20)+"[...]");var res=formatted+pairs.join(" ")+">"+content+"</"+tagName+">";return res.replace(/ contentEditable="inherit"/,"")},Formatio.prototype={functionName:functionName,configure:function(options){return new Formatio(options)},constructorName:function(object){return constructorName(this,object)},ascii:function(object,processed,indent){return ascii(this,object,processed,indent)}},Formatio.prototype})}).call(exports,function(){return this}())},function(module,exports){(function(__webpack_amd_options__){module.exports=__webpack_amd_options__}).call(exports,{})},function(module,exports,__webpack_require__){var __WEBPACK_AMD_DEFINE_FACTORY__,__WEBPACK_AMD_DEFINE_RESULT__;(__webpack_require__(8)&&function(m){__WEBPACK_AMD_DEFINE_FACTORY__=m,__WEBPACK_AMD_DEFINE_RESULT__="function"==typeof __WEBPACK_AMD_DEFINE_FACTORY__?__WEBPACK_AMD_DEFINE_FACTORY__.call(exports,__webpack_require__,exports,module):__WEBPACK_AMD_DEFINE_FACTORY__,!(void 0!==__WEBPACK_AMD_DEFINE_RESULT__&&(module.exports=__WEBPACK_AMD_DEFINE_RESULT__))}||"object"==typeof module&&function(m){module.exports=m()}||function(m){this.samsam=m()})(function(){function isNaN(value){var val=value;return"number"==typeof value&&value!==val}function getClass(value){return o.toString.call(value).split(/[ \]]/)[1]}function isArguments(object){if("Arguments"===getClass(object))return!0;if("object"!=typeof object||"number"!=typeof object.length||"Array"===getClass(object))return!1;if("function"==typeof object.callee)return!0;try{object[object.length]=6,delete object[object.length]}catch(e){return!0}return!1}function isElement(object){if(!object||1!==object.nodeType||!div)return!1;try{object.appendChild(div),object.removeChild(div)}catch(e){return!1}return!0}function keys(object){var prop,ks=[];for(prop in object)o.hasOwnProperty.call(object,prop)&&ks.push(prop);return ks}function isDate(value){return"function"==typeof value.getTime&&value.getTime()==value.valueOf()}function isNegZero(value){return 0===value&&1/value===-(1/0)}function identical(obj1,obj2){if(obj1===obj2||isNaN(obj1)&&isNaN(obj2))return 0!==obj1||isNegZero(obj1)===isNegZero(obj2)}function isSet(val){if("undefined"!=typeof Set&&val instanceof Set)return!0}function isSubset(s1,s2,compare){for(var values1=Array.from(s1),values2=Array.from(s2),i=0;i<values1.length;i++){for(var includes=!1,j=0;j<values2.length;j++)if(compare(values2[j],values1[i])){includes=!0;break}if(!includes)return!1}return!0}function deepEqualCyclic(obj1,obj2){function isObject(value){return!("object"!=typeof value||null===value||value instanceof Boolean||value instanceof Date||value instanceof Number||value instanceof RegExp||value instanceof String)}function getIndex(objects,obj){var i;for(i=0;i<objects.length;i++)if(objects[i]===obj)return i;return-1}var objects1=[],objects2=[],paths1=[],paths2=[],compared={};return function deepEqual(obj1,obj2,path1,path2){var type1=typeof obj1,type2=typeof obj2;if(obj1===obj2||isNaN(obj1)||isNaN(obj2)||null==obj1||null==obj2||"object"!==type1||"object"!==type2)return identical(obj1,obj2);if(isElement(obj1)||isElement(obj2))return!1;var isDate1=isDate(obj1),isDate2=isDate(obj2);if((isDate1||isDate2)&&(!isDate1||!isDate2||obj1.getTime()!==obj2.getTime()))return!1;if(obj1 instanceof RegExp&&obj2 instanceof RegExp&&obj1.toString()!==obj2.toString())return!1;var class1=getClass(obj1),class2=getClass(obj2),keys1=keys(obj1),keys2=keys(obj2);if(isArguments(obj1)||isArguments(obj2)){if(obj1.length!==obj2.length)return!1}else if(type1!==type2||class1!==class2||keys1.length!==keys2.length)return!1;if(isSet(obj1)||isSet(obj2))return!(!isSet(obj1)||!isSet(obj2)||obj1.size!==obj2.size)&&isSubset(obj1,obj2,deepEqual);var key,i,l,value1,value2,isObject1,isObject2,index1,index2,newPath1,newPath2;for(i=0,l=keys1.length;i<l;i++){if(key=keys1[i],!o.hasOwnProperty.call(obj2,key))return!1;if(value1=obj1[key],value2=obj2[key],isObject1=isObject(value1),isObject2=isObject(value2),index1=isObject1?getIndex(objects1,value1):-1,index2=isObject2?getIndex(objects2,value2):-1,newPath1=index1!==-1?paths1[index1]:path1+"["+JSON.stringify(key)+"]",newPath2=index2!==-1?paths2[index2]:path2+"["+JSON.stringify(key)+"]",compared[newPath1+newPath2])return!0;if(index1===-1&&isObject1&&(objects1.push(value1),paths1.push(newPath1)),index2===-1&&isObject2&&(objects2.push(value2),paths2.push(newPath2)),isObject1&&isObject2&&(compared[newPath1+newPath2]=!0),!deepEqual(value1,value2,newPath1,newPath2))return!1}return!0}(obj1,obj2,"$1","$2")}function arrayContains(array,subset,compare){if(0===subset.length)return!0;var i,l,j,k;for(i=0,l=array.length;i<l;++i)if(compare(array[i],subset[0])){for(j=0,k=subset.length;j<k;++j){if(i+j>=l)return!1;if(!compare(array[i+j],subset[j]))return!1}return!0}return!1}function match(object,matcher){if(matcher&&"function"==typeof matcher.test)return matcher.test(object);if("function"==typeof matcher)return matcher(object)===!0;if("string"==typeof matcher){matcher=matcher.toLowerCase();var notNull="string"==typeof object||!!object;return notNull&&String(object).toLowerCase().indexOf(matcher)>=0}if("number"==typeof matcher)return matcher===object;if("boolean"==typeof matcher)return matcher===object;if("undefined"==typeof matcher)return"undefined"==typeof object;if(null===matcher)return null===object;if(isSet(object))return isSubset(matcher,object,match);if("Array"===getClass(object)&&"Array"===getClass(matcher))return arrayContains(object,matcher,match);if(isDate(matcher))return isDate(object)&&object.getTime()===matcher.getTime();if(matcher&&"object"==typeof matcher){if(matcher===object)return!0;var prop;for(prop in matcher){var value=object[prop];if("undefined"==typeof value&&"function"==typeof object.getAttribute&&(value=object.getAttribute(prop)),null===matcher[prop]||"undefined"==typeof matcher[prop]){if(value!==matcher[prop])return!1}else if("undefined"==typeof value||!match(value,matcher[prop]))return!1}return!0}throw new Error("Matcher was not a string, a number, a function, a boolean or an object")}var o=Object.prototype,div="undefined"!=typeof document&&document.createElement("div");return{isArguments:isArguments,isElement:isElement,isDate:isDate,isNegZero:isNegZero,identical:identical,deepEqual:deepEqualCyclic,match:match,keys:keys}})},function(module,exports,__webpack_require__){"use strict";function assertType(value,type,name){var actual=typeOf(value);if(actual!==type)throw new TypeError("Expected type of "+name+" to be "+type+", but was "+actual)}function assertMethodExists(value,method,name,methodPath){if(null==value[method])throw new TypeError("Expected "+name+" to have method "+methodPath)}function isMatcher(object){return matcher.isPrototypeOf(object)}function matchObject(expectation,actual){return null!==actual&&void 0!==actual&&Object.keys(expectation).every(function(key){var exp=expectation[key],act=actual[key];if(isMatcher(exp)){if(!exp.test(act))return!1}else if("object"===typeOf(exp)){if(!matchObject(exp,act))return!1}else if(!deepEqual(exp,act))return!1;return!0})}function match(expectation,message){var m=Object.create(matcher),type=typeOf(expectation);return type in TYPE_MAP?TYPE_MAP[type](m,expectation,message):m.test=function(actual){return deepEqual(expectation,actual)},m.message||(m.message="match("+valueToString(expectation)+")"),m}function createPropertyMatcher(propertyTest,messagePrefix){return function(property,value){assertType(property,"string","property");var onlyProperty=1===arguments.length,message=messagePrefix+'("'+property+'"';return onlyProperty||(message+=", "+valueToString(value)),message+=")",match(function(actual){return!(void 0===actual||null===actual||!propertyTest(actual,property))&&(onlyProperty||deepEqual(value,actual[property]))},message)}}var deepEqual=__webpack_require__(11).use(match),every=__webpack_require__(12),functionName=__webpack_require__(13),get=__webpack_require__(14),iterableToString=__webpack_require__(15),typeOf=__webpack_require__(16),valueToString=__webpack_require__(18),indexOf=Array.prototype.indexOf,matcher={toString:function(){return this.message}},TYPE_MAP={"function":function(m,expectation,message){m.test=expectation,m.message=message||"match("+functionName(expectation)+")"},number:function(m,expectation){m.test=function(actual){return expectation==actual}},object:function(m,expectation){var array=[];return"function"==typeof expectation.test?(m.test=function(actual){return expectation.test(actual)===!0},m.message="match("+functionName(expectation.test)+")",m):(array=Object.keys(expectation).map(function(key){return key+": "+valueToString(expectation[key])}),m.test=function(actual){return matchObject(expectation,actual)},m.message="match("+array.join(", ")+")",m)},regexp:function(m,expectation){m.test=function(actual){return"string"==typeof actual&&expectation.test(actual)}},string:function(m,expectation){m.test=function(actual){return"string"==typeof actual&&actual.indexOf(expectation)!==-1},m.message='match("'+expectation+'")'}};matcher.or=function(m2){if(!arguments.length)throw new TypeError("Matcher expected");isMatcher(m2)||(m2=match(m2));var m1=this,or=Object.create(matcher);return or.test=function(actual){return m1.test(actual)||m2.test(actual)},or.message=m1.message+".or("+m2.message+")",or},matcher.and=function(m2){if(!arguments.length)throw new TypeError("Matcher expected");isMatcher(m2)||(m2=match(m2));var m1=this,and=Object.create(matcher);return and.test=function(actual){return m1.test(actual)&&m2.test(actual)},and.message=m1.message+".and("+m2.message+")",and},match.isMatcher=isMatcher,match.any=match(function(){return!0},"any"),match.defined=match(function(actual){return null!==actual&&void 0!==actual},"defined"),match.truthy=match(function(actual){return!!actual},"truthy"),match.falsy=match(function(actual){return!actual},"falsy"),match.same=function(expectation){return match(function(actual){return expectation===actual},"same("+valueToString(expectation)+")")},match.typeOf=function(type){return assertType(type,"string","type"),match(function(actual){return typeOf(actual)===type},'typeOf("'+type+'")')},match.instanceOf=function(type){return"undefined"==typeof Symbol||"undefined"==typeof Symbol.hasInstance?assertType(type,"function","type"):assertMethodExists(type,Symbol.hasInstance,"type","[Symbol.hasInstance]"),match(function(actual){return actual instanceof type},"instanceOf("+(functionName(type)||Object.prototype.toString.call(type))+")")},match.has=createPropertyMatcher(function(actual,property){return"object"==typeof actual?property in actual:void 0!==actual[property]},"has"),match.hasOwn=createPropertyMatcher(function(actual,property){return actual.hasOwnProperty(property)},"hasOwn"),match.hasNested=function(property,value){assertType(property,"string","property");var onlyProperty=1===arguments.length,message='hasNested("'+property+'"';return onlyProperty||(message+=", "+valueToString(value)),message+=")",match(function(actual){return void 0!==actual&&null!==actual&&void 0!==get(actual,property)&&(onlyProperty||deepEqual(value,get(actual,property)))},message)},match.every=function(predicate){if(!isMatcher(predicate))throw new TypeError("Matcher expected");return match(function(actual){return"object"===typeOf(actual)?every(Object.keys(actual),function(key){return predicate.test(actual[key])}):!!actual&&"function"===typeOf(actual.forEach)&&every(actual,function(element){return predicate.test(element)})},"every("+predicate.message+")")},match.some=function(predicate){if(!isMatcher(predicate))throw new TypeError("Matcher expected");return match(function(actual){return"object"===typeOf(actual)?!every(Object.keys(actual),function(key){return!predicate.test(actual[key])}):!!actual&&"function"===typeOf(actual.forEach)&&!every(actual,function(element){return!predicate.test(element)})},"some("+predicate.message+")")},match.array=match.typeOf("array"),match.array.deepEquals=function(expectation){return match(function(actual){var sameLength=actual.length===expectation.length;return"array"===typeOf(actual)&&sameLength&&every(actual,function(element,index){return expectation[index]===element})},"deepEquals(["+iterableToString(expectation)+"])")},match.array.startsWith=function(expectation){return match(function(actual){return"array"===typeOf(actual)&&every(expectation,function(expectedElement,index){return actual[index]===expectedElement})},"startsWith(["+iterableToString(expectation)+"])")},match.array.endsWith=function(expectation){return match(function(actual){var offset=actual.length-expectation.length;return"array"===typeOf(actual)&&every(expectation,function(expectedElement,index){return actual[offset+index]===expectedElement})},"endsWith(["+iterableToString(expectation)+"])")},match.array.contains=function(expectation){return match(function(actual){return"array"===typeOf(actual)&&every(expectation,function(expectedElement){return indexOf.call(actual,expectedElement)!==-1})},"contains(["+iterableToString(expectation)+"])")},match.map=match.typeOf("map"),match.map.deepEquals=function(expectation){return match(function(actual){var sameLength=actual.size===expectation.size;return"map"===typeOf(actual)&&sameLength&&every(actual,function(element,key){return expectation.has(key)&&expectation.get(key)===element})},"deepEquals(Map["+iterableToString(expectation)+"])")},match.map.contains=function(expectation){return match(function(actual){return"map"===typeOf(actual)&&every(expectation,function(element,key){return actual.has(key)&&actual.get(key)===element})},"contains(Map["+iterableToString(expectation)+"])"); },match.set=match.typeOf("set"),match.set.deepEquals=function(expectation){return match(function(actual){var sameLength=actual.size===expectation.size;return"set"===typeOf(actual)&&sameLength&&every(actual,function(element){return expectation.has(element)})},"deepEquals(Set["+iterableToString(expectation)+"])")},match.set.contains=function(expectation){return match(function(actual){return"set"===typeOf(actual)&&every(expectation,function(element){return actual.has(element)})},"contains(Set["+iterableToString(expectation)+"])")},match.bool=match.typeOf("boolean"),match.number=match.typeOf("number"),match.string=match.typeOf("string"),match.object=match.typeOf("object"),match.func=match.typeOf("function"),match.regexp=match.typeOf("regexp"),match.date=match.typeOf("date"),match.symbol=match.typeOf("symbol"),module.exports=match},function(module,exports){"use strict";function isReallyNaN(val){return val!==val}function isDOMNode(obj){var success=!1;try{obj.appendChild(div),success=div.parentNode===obj}catch(e){return!1}finally{try{obj.removeChild(div)}catch(e){}}return success}function isElement(obj){return div&&obj&&1===obj.nodeType&&isDOMNode(obj)}var div="undefined"!=typeof document&&document.createElement("div"),deepEqual=module.exports=function deepEqual(a,b){if("object"!=typeof a||"object"!=typeof b)return isReallyNaN(a)&&isReallyNaN(b)||a===b;if(isElement(a)||isElement(b))return a===b;if(a===b)return!0;if(null===a&&null!==b||null!==a&&null===b)return!1;if(a instanceof RegExp&&b instanceof RegExp)return a.source===b.source&&a.global===b.global&&a.ignoreCase===b.ignoreCase&&a.multiline===b.multiline;if(a instanceof Error&&b instanceof Error)return a===b;var aString=Object.prototype.toString.call(a);if(aString!==Object.prototype.toString.call(b))return!1;if("[object Date]"===aString)return a.valueOf()===b.valueOf();var prop,aLength=0,bLength=0;if("[object Array]"===aString&&a.length!==b.length)return!1;for(prop in a)if(Object.prototype.hasOwnProperty.call(a,prop)){if(aLength+=1,!(prop in b))return!1;if(!(arguments[2]||deepEqual)(a[prop],b[prop]))return!1}for(prop in b)Object.prototype.hasOwnProperty.call(b,prop)&&(bLength+=1);return aLength===bLength};deepEqual.use=function(match){return function deepEqual$matcher(a,b){return match.isMatcher(a)?match.isMatcher(b)?a===b:a.test(b):deepEqual(a,b,deepEqual$matcher)}}},function(module,exports){"use strict";module.exports=function(obj,fn){var pass=!0;try{obj.forEach(function(){if(!fn.apply(this,arguments))throw new Error})}catch(e){pass=!1}return pass}},function(module,exports){"use strict";module.exports=function(func){var matches,name=func.displayName||func.name;return!name&&(matches=func.toString().match(/function ([^\s\(]+)/))&&(name=matches[1]),name}},function(module,exports){(function(global){function getValue(object,key){return null==object?void 0:object[key]}function isHostObject(value){var result=!1;if(null!=value&&"function"!=typeof value.toString)try{result=!!(value+"")}catch(e){}return result}function Hash(entries){var index=-1,length=entries?entries.length:0;for(this.clear();++index<length;){var entry=entries[index];this.set(entry[0],entry[1])}}function hashClear(){this.__data__=nativeCreate?nativeCreate(null):{}}function hashDelete(key){return this.has(key)&&delete this.__data__[key]}function hashGet(key){var data=this.__data__;if(nativeCreate){var result=data[key];return result===HASH_UNDEFINED?void 0:result}return hasOwnProperty.call(data,key)?data[key]:void 0}function hashHas(key){var data=this.__data__;return nativeCreate?void 0!==data[key]:hasOwnProperty.call(data,key)}function hashSet(key,value){var data=this.__data__;return data[key]=nativeCreate&&void 0===value?HASH_UNDEFINED:value,this}function ListCache(entries){var index=-1,length=entries?entries.length:0;for(this.clear();++index<length;){var entry=entries[index];this.set(entry[0],entry[1])}}function listCacheClear(){this.__data__=[]}function listCacheDelete(key){var data=this.__data__,index=assocIndexOf(data,key);if(index<0)return!1;var lastIndex=data.length-1;return index==lastIndex?data.pop():splice.call(data,index,1),!0}function listCacheGet(key){var data=this.__data__,index=assocIndexOf(data,key);return index<0?void 0:data[index][1]}function listCacheHas(key){return assocIndexOf(this.__data__,key)>-1}function listCacheSet(key,value){var data=this.__data__,index=assocIndexOf(data,key);return index<0?data.push([key,value]):data[index][1]=value,this}function MapCache(entries){var index=-1,length=entries?entries.length:0;for(this.clear();++index<length;){var entry=entries[index];this.set(entry[0],entry[1])}}function mapCacheClear(){this.__data__={hash:new Hash,map:new(Map||ListCache),string:new Hash}}function mapCacheDelete(key){return getMapData(this,key)["delete"](key)}function mapCacheGet(key){return getMapData(this,key).get(key)}function mapCacheHas(key){return getMapData(this,key).has(key)}function mapCacheSet(key,value){return getMapData(this,key).set(key,value),this}function assocIndexOf(array,key){for(var length=array.length;length--;)if(eq(array[length][0],key))return length;return-1}function baseGet(object,path){path=isKey(path,object)?[path]:castPath(path);for(var index=0,length=path.length;null!=object&&index<length;)object=object[toKey(path[index++])];return index&&index==length?object:void 0}function baseIsNative(value){if(!isObject(value)||isMasked(value))return!1;var pattern=isFunction(value)||isHostObject(value)?reIsNative:reIsHostCtor;return pattern.test(toSource(value))}function baseToString(value){if("string"==typeof value)return value;if(isSymbol(value))return symbolToString?symbolToString.call(value):"";var result=value+"";return"0"==result&&1/value==-INFINITY?"-0":result}function castPath(value){return isArray(value)?value:stringToPath(value)}function getMapData(map,key){var data=map.__data__;return isKeyable(key)?data["string"==typeof key?"string":"hash"]:data.map}function getNative(object,key){var value=getValue(object,key);return baseIsNative(value)?value:void 0}function isKey(value,object){if(isArray(value))return!1;var type=typeof value;return!("number"!=type&&"symbol"!=type&&"boolean"!=type&&null!=value&&!isSymbol(value))||(reIsPlainProp.test(value)||!reIsDeepProp.test(value)||null!=object&&value in Object(object))}function isKeyable(value){var type=typeof value;return"string"==type||"number"==type||"symbol"==type||"boolean"==type?"__proto__"!==value:null===value}function isMasked(func){return!!maskSrcKey&&maskSrcKey in func}function toKey(value){if("string"==typeof value||isSymbol(value))return value;var result=value+"";return"0"==result&&1/value==-INFINITY?"-0":result}function toSource(func){if(null!=func){try{return funcToString.call(func)}catch(e){}try{return func+""}catch(e){}}return""}function memoize(func,resolver){if("function"!=typeof func||resolver&&"function"!=typeof resolver)throw new TypeError(FUNC_ERROR_TEXT);var memoized=function(){var args=arguments,key=resolver?resolver.apply(this,args):args[0],cache=memoized.cache;if(cache.has(key))return cache.get(key);var result=func.apply(this,args);return memoized.cache=cache.set(key,result),result};return memoized.cache=new(memoize.Cache||MapCache),memoized}function eq(value,other){return value===other||value!==value&&other!==other}function isFunction(value){var tag=isObject(value)?objectToString.call(value):"";return tag==funcTag||tag==genTag}function isObject(value){var type=typeof value;return!!value&&("object"==type||"function"==type)}function isObjectLike(value){return!!value&&"object"==typeof value}function isSymbol(value){return"symbol"==typeof value||isObjectLike(value)&&objectToString.call(value)==symbolTag}function toString(value){return null==value?"":baseToString(value)}function get(object,path,defaultValue){var result=null==object?void 0:baseGet(object,path);return void 0===result?defaultValue:result}var FUNC_ERROR_TEXT="Expected a function",HASH_UNDEFINED="__lodash_hash_undefined__",INFINITY=1/0,funcTag="[object Function]",genTag="[object GeneratorFunction]",symbolTag="[object Symbol]",reIsDeepProp=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,reIsPlainProp=/^\w*$/,reLeadingDot=/^\./,rePropName=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,reRegExpChar=/[\\^$.*+?()[\]{}|]/g,reEscapeChar=/\\(\\)?/g,reIsHostCtor=/^\[object .+?Constructor\]$/,freeGlobal="object"==typeof global&&global&&global.Object===Object&&global,freeSelf="object"==typeof self&&self&&self.Object===Object&&self,root=freeGlobal||freeSelf||Function("return this")(),arrayProto=Array.prototype,funcProto=Function.prototype,objectProto=Object.prototype,coreJsData=root["__core-js_shared__"],maskSrcKey=function(){var uid=/[^.]+$/.exec(coreJsData&&coreJsData.keys&&coreJsData.keys.IE_PROTO||"");return uid?"Symbol(src)_1."+uid:""}(),funcToString=funcProto.toString,hasOwnProperty=objectProto.hasOwnProperty,objectToString=objectProto.toString,reIsNative=RegExp("^"+funcToString.call(hasOwnProperty).replace(reRegExpChar,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Symbol=root.Symbol,splice=arrayProto.splice,Map=getNative(root,"Map"),nativeCreate=getNative(Object,"create"),symbolProto=Symbol?Symbol.prototype:void 0,symbolToString=symbolProto?symbolProto.toString:void 0;Hash.prototype.clear=hashClear,Hash.prototype["delete"]=hashDelete,Hash.prototype.get=hashGet,Hash.prototype.has=hashHas,Hash.prototype.set=hashSet,ListCache.prototype.clear=listCacheClear,ListCache.prototype["delete"]=listCacheDelete,ListCache.prototype.get=listCacheGet,ListCache.prototype.has=listCacheHas,ListCache.prototype.set=listCacheSet,MapCache.prototype.clear=mapCacheClear,MapCache.prototype["delete"]=mapCacheDelete,MapCache.prototype.get=mapCacheGet,MapCache.prototype.has=mapCacheHas,MapCache.prototype.set=mapCacheSet;var stringToPath=memoize(function(string){string=toString(string);var result=[];return reLeadingDot.test(string)&&result.push(""),string.replace(rePropName,function(match,number,quote,string){result.push(quote?string.replace(reEscapeChar,"$1"):number||match)}),result});memoize.Cache=MapCache;var isArray=Array.isArray;module.exports=get}).call(exports,function(){return this}())},function(module,exports,__webpack_require__){"use strict";var typeOf=__webpack_require__(16);module.exports=function(obj){function stringify(item){return"string"==typeof item?"'"+item+"'":String(item)}function mapToString(map){return map.forEach(function(value,key){representation+="["+stringify(key)+","+stringify(value)+"],"}),representation=representation.slice(0,-1)}function genericIterableToString(iterable){return iterable.forEach(function(value){representation+=stringify(value)+","}),representation=representation.slice(0,-1)}var representation="";return"map"===typeOf(obj)?mapToString(obj):genericIterableToString(obj)}},function(module,exports,__webpack_require__){"use strict";var type=__webpack_require__(17);module.exports=function(value){return type(value).toLowerCase()}},function(module,exports,__webpack_require__){(function(global){!function(global,factory){module.exports=factory()}(this,function(){"use strict";function typeDetect(obj){var typeofObj=typeof obj;if("object"!==typeofObj)return typeofObj;if(null===obj)return"null";if(obj===globalObject)return"global";if(Array.isArray(obj)&&(symbolToStringTagExists===!1||!(Symbol.toStringTag in obj)))return"Array";if("object"==typeof window){if("object"==typeof window.location&&obj===window.location)return"Location";if("object"==typeof window.document&&obj===window.document)return"Document";if("object"==typeof window.navigator){if("object"==typeof window.navigator.mimeTypes&&obj===window.navigator.mimeTypes)return"MimeTypeArray";if("object"==typeof window.navigator.plugins&&obj===window.navigator.plugins)return"PluginArray"}if(("function"==typeof window.HTMLElement||"object"==typeof window.HTMLElement)&&obj instanceof window.HTMLElement){if("BLOCKQUOTE"===obj.tagName)return"HTMLQuoteElement";if("TD"===obj.tagName)return"HTMLTableDataCellElement";if("TH"===obj.tagName)return"HTMLTableHeaderCellElement"}}var stringTag=symbolToStringTagExists&&obj[Symbol.toStringTag];if("string"==typeof stringTag)return stringTag;var objPrototype=Object.getPrototypeOf(obj);return objPrototype===RegExp.prototype?"RegExp":objPrototype===Date.prototype?"Date":promiseExists&&objPrototype===Promise.prototype?"Promise":setExists&&objPrototype===Set.prototype?"Set":mapExists&&objPrototype===Map.prototype?"Map":weakSetExists&&objPrototype===WeakSet.prototype?"WeakSet":weakMapExists&&objPrototype===WeakMap.prototype?"WeakMap":dataViewExists&&objPrototype===DataView.prototype?"DataView":mapExists&&objPrototype===mapIteratorPrototype?"Map Iterator":setExists&&objPrototype===setIteratorPrototype?"Set Iterator":arrayIteratorExists&&objPrototype===arrayIteratorPrototype?"Array Iterator":stringIteratorExists&&objPrototype===stringIteratorPrototype?"String Iterator":null===objPrototype?"Object":Object.prototype.toString.call(obj).slice(toStringLeftSliceLength,toStringRightSliceLength)}var promiseExists="function"==typeof Promise,globalObject="object"==typeof self?self:global,symbolExists="undefined"!=typeof Symbol,mapExists="undefined"!=typeof Map,setExists="undefined"!=typeof Set,weakMapExists="undefined"!=typeof WeakMap,weakSetExists="undefined"!=typeof WeakSet,dataViewExists="undefined"!=typeof DataView,symbolIteratorExists=symbolExists&&"undefined"!=typeof Symbol.iterator,symbolToStringTagExists=symbolExists&&"undefined"!=typeof Symbol.toStringTag,setEntriesExists=setExists&&"function"==typeof Set.prototype.entries,mapEntriesExists=mapExists&&"function"==typeof Map.prototype.entries,setIteratorPrototype=setEntriesExists&&Object.getPrototypeOf((new Set).entries()),mapIteratorPrototype=mapEntriesExists&&Object.getPrototypeOf((new Map).entries()),arrayIteratorExists=symbolIteratorExists&&"function"==typeof Array.prototype[Symbol.iterator],arrayIteratorPrototype=arrayIteratorExists&&Object.getPrototypeOf([][Symbol.iterator]()),stringIteratorExists=symbolIteratorExists&&"function"==typeof String.prototype[Symbol.iterator],stringIteratorPrototype=stringIteratorExists&&Object.getPrototypeOf(""[Symbol.iterator]()),toStringLeftSliceLength=8,toStringRightSliceLength=-1;return typeDetect})}).call(exports,function(){return this}())},function(module,exports){"use strict";module.exports=function(value){return value&&value.toString?value.toString():String(value)}},function(module,exports,__webpack_require__){"use strict";function getFakes(fakeCollection){return fakeCollection.fakes||(fakeCollection.fakes=[]),fakeCollection.fakes}function each(fakeCollection,method){var fakes=getFakes(fakeCollection),matchingFakes=filter.call(fakes,function(fake){return"function"==typeof fake[method]});matchingFakes.forEach(function(fake){fake[method]()})}var sinonSpy=__webpack_require__(20),sinonStub=__webpack_require__(34),sinonMock=__webpack_require__(39),collectOwnMethods=__webpack_require__(41),valueToString=__webpack_require__(18),push=Array.prototype.push,filter=Array.prototype.filter,collection={verify:function(){each(this,"verify")},restore:function(){each(this,"restore"),this.fakes=[]},reset:function(){each(this,"reset")},resetBehavior:function(){each(this,"resetBehavior")},resetHistory:function(){function privateResetHistory(f){var method=f.resetHistory||f.reset;method&&method.call(f)}getFakes(this).forEach(function(fake){if("function"==typeof fake)return void privateResetHistory(fake);var methods=[];fake.get&&methods.push(fake.get),fake.set&&methods.push(fake.set),methods.forEach(privateResetHistory)})},verifyAndRestore:function(){var exception;try{this.verify()}catch(e){exception=e}if(this.restore(),exception)throw exception},add:function(fake){return push.call(getFakes(this),fake),fake},addUsingPromise:function(fake){return fake.usingPromise(this.promiseLibrary),fake},spy:function(){return this.add(sinonSpy.apply(sinonSpy,arguments))},createStubInstance:function(constructor){if("function"!=typeof constructor)throw new TypeError("The constructor should be a function.");return this.stub.call(this,Object.create(constructor.prototype))},stub:function(object,property){if(object&&"undefined"!=typeof property&&!(property in object))throw new TypeError("Cannot stub non-existent own property "+valueToString(property));var stubbed=sinonStub.apply(null,arguments),isStubbingEntireObject="undefined"==typeof property&&"object"==typeof object;if(isStubbingEntireObject){var ownMethods=collectOwnMethods(stubbed);ownMethods.forEach(this.add.bind(this)),this.promiseLibrary&&ownMethods.forEach(this.addUsingPromise.bind(this))}else this.add(stubbed),this.promiseLibrary&&stubbed.usingPromise(this.promiseLibrary);return stubbed},mock:function(){return this.add(sinonMock.apply(null,arguments))},inject:function(obj){var col=this;return obj.spy=function(){return col.spy.apply(col,arguments)},obj.stub=function(){return col.stub.apply(col,arguments)},obj.mock=function(){return col.mock.apply(col,arguments)},obj}};module.exports=collection},function(module,exports,__webpack_require__){"use strict";function spy(object,property,types){var descriptor,methodDesc;return property||"function"!=typeof object?object||property?types?(descriptor={},methodDesc=getPropertyDescriptor(object,property),types.forEach(function(type){descriptor[type]=spy.create(methodDesc[type])}),wrapMethod(object,property,descriptor)):wrapMethod(object,property,spy.create(object[property])):spy.create(function(){}):spy.create(object)}function incrementCallCount(){this.called=!0,this.callCount+=1,this.notCalled=!1,this.calledOnce=1===this.callCount,this.calledTwice=2===this.callCount,this.calledThrice=3===this.callCount}function createCallProperties(){this.firstCall=this.getCall(0),this.secondCall=this.getCall(1),this.thirdCall=this.getCall(2),this.lastCall=this.getCall(this.callCount-1)}function createProxy(func,proxyLength){var p;if(proxyLength)sw