react-hoax
Advanced tools
Comparing version 1.0.1 to 1.0.2
@@ -1,1 +0,1 @@ | ||
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("react")):"function"==typeof define&&define.amd?define(["React"],e):"object"==typeof exports?exports["react-hoax"]=e(require("react")):t["react-hoax"]=e(t.React)}(window,(function(t){return function(t){var e={};function r(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)r.d(n,o,function(e){return t[e]}.bind(null,o));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=95)}([function(e,r){e.exports=t},function(t,e){t.exports=function(t){return t}},function(t,e,r){var n=r(18),o="object"==typeof self&&self&&self.Object===Object&&self,u=n||o||Function("return this")();t.exports=u},function(t,e,r){var n=r(40),o=r(46);t.exports=function(t,e){var r=o(t,e);return n(r)?r:void 0}},function(t,e,r){var n=r(27);t.exports=function(t,e){return n(t,e)}},function(t,e,r){!function(t,e){e=e&&e.hasOwnProperty("default")?e.default:e;var r=Symbol(),n=function(t,n){var o=t[r];if(!o)throw new Error;var u=e.useReducer((function(t){return t+1}),0)[1],c=e.useContext(t),i=n(c),a=e.useRef(null);return e.useLayoutEffect((function(){a.current={f:n,v:c,s:i}})),e.useLayoutEffect((function(){var t=function(t){try{if(a.current.v===t||Object.is(a.current.s,a.current.f(t)))return}catch(t){}u()};return o.add(t),function(){o.delete(t)}}),[o]),i};t.createContext=function(t){var n,o,u=e.createContext(t,(function(){return 0}));return u[r]=new Set,u.Provider=(n=u.Provider,o=u[r],e.memo((function(t){var r=t.value,u=t.children;return o.forEach((function(t){t(r)})),e.createElement(n,{value:r},u)}))),delete u.Consumer,u},t.useContext=function(t){return n(t,(function(t){return t}))},t.useContextSelector=n}(e,r(0))},function(t,e,r){var n=r(30),o=r(31),u=r(32),c=r(33),i=r(34);function a(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}a.prototype.clear=n,a.prototype.delete=o,a.prototype.get=u,a.prototype.has=c,a.prototype.set=i,t.exports=a},function(t,e,r){var n=r(16);t.exports=function(t,e){for(var r=t.length;r--;)if(n(t[r][0],e))return r;return-1}},function(t,e,r){var n=r(14),o=r(42),u=r(43),c=n?n.toStringTag:void 0;t.exports=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":c&&c in Object(t)?o(t):u(t)}},function(t,e,r){var n=r(3)(Object,"create");t.exports=n},function(t,e,r){var n=r(55);t.exports=function(t,e){var r=t.__data__;return n(e)?r["string"==typeof e?"string":"hash"]:r.map}},function(t,e){t.exports=function(t){return null!=t&&"object"==typeof t}},function(t,e){t.exports=function(t){return null==t}},function(t,e,r){var n=r(3)(r(2),"Map");t.exports=n},function(t,e,r){var n=r(2).Symbol;t.exports=n},function(t,e){var r=Array.isArray;t.exports=r},function(t,e){t.exports=function(t,e){return t===e||t!=t&&e!=e}},function(t,e,r){var n=r(8),o=r(19);t.exports=function(t){if(!o(t))return!1;var e=n(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}},function(t,e,r){(function(e){var r="object"==typeof e&&e&&e.Object===Object&&e;t.exports=r}).call(this,r(41))},function(t,e){t.exports=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}},function(t,e){var r=Function.prototype.toString;t.exports=function(t){if(null!=t){try{return r.call(t)}catch(t){}try{return t+""}catch(t){}}return""}},function(t,e,r){var n=r(47),o=r(54),u=r(56),c=r(57),i=r(58);function a(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}a.prototype.clear=n,a.prototype.delete=o,a.prototype.get=u,a.prototype.has=c,a.prototype.set=i,t.exports=a},function(t,e,r){var n=r(59),o=r(62),u=r(63);t.exports=function(t,e,r,c,i,a){var f=1&r,s=t.length,p=e.length;if(s!=p&&!(f&&p>s))return!1;var l=a.get(t);if(l&&a.get(e))return l==e;var d=-1,b=!0,v=2&r?new n:void 0;for(a.set(t,e),a.set(e,t);++d<s;){var y=t[d],O=e[d];if(c)var h=f?c(O,y,d,e,t,a):c(y,O,d,t,e,a);if(void 0!==h){if(h)continue;b=!1;break}if(v){if(!o(e,(function(t,e){if(!u(v,e)&&(y===t||i(y,t,r,c,a)))return v.push(e)}))){b=!1;break}}else if(y!==O&&!i(y,O,r,c,a)){b=!1;break}}return a.delete(t),a.delete(e),b}},function(t,e,r){(function(t){var n=r(2),o=r(80),u=e&&!e.nodeType&&e,c=u&&"object"==typeof t&&t&&!t.nodeType&&t,i=c&&c.exports===u?n.Buffer:void 0,a=(i?i.isBuffer:void 0)||o;t.exports=a}).call(this,r(24)(t))},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},function(t,e,r){var n=r(82),o=r(83),u=r(84),c=u&&u.isTypedArray,i=c?o(c):n;t.exports=i},function(t,e){t.exports=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}},function(t,e,r){var n=r(28),o=r(11);t.exports=function t(e,r,u,c,i){return e===r||(null==e||null==r||!o(e)&&!o(r)?e!=e&&r!=r:n(e,r,u,c,t,i))}},function(t,e,r){var n=r(29),o=r(22),u=r(64),c=r(68),i=r(90),a=r(15),f=r(23),s=r(25),p="[object Object]",l=Object.prototype.hasOwnProperty;t.exports=function(t,e,r,d,b,v){var y=a(t),O=a(e),h=y?"[object Array]":i(t),j=O?"[object Array]":i(e),g=(h="[object Arguments]"==h?p:h)==p,P=(j="[object Arguments]"==j?p:j)==p,w=h==j;if(w&&f(t)){if(!f(e))return!1;y=!0,g=!1}if(w&&!g)return v||(v=new n),y||s(t)?o(t,e,r,d,b,v):u(t,e,h,r,d,b,v);if(!(1&r)){var m=g&&l.call(t,"__wrapped__"),x=P&&l.call(e,"__wrapped__");if(m||x){var _=m?t.value():t,S=x?e.value():e;return v||(v=new n),b(_,S,r,d,v)}}return!!w&&(v||(v=new n),c(t,e,r,d,b,v))}},function(t,e,r){var n=r(6),o=r(35),u=r(36),c=r(37),i=r(38),a=r(39);function f(t){var e=this.__data__=new n(t);this.size=e.size}f.prototype.clear=o,f.prototype.delete=u,f.prototype.get=c,f.prototype.has=i,f.prototype.set=a,t.exports=f},function(t,e){t.exports=function(){this.__data__=[],this.size=0}},function(t,e,r){var n=r(7),o=Array.prototype.splice;t.exports=function(t){var e=this.__data__,r=n(e,t);return!(r<0)&&(r==e.length-1?e.pop():o.call(e,r,1),--this.size,!0)}},function(t,e,r){var n=r(7);t.exports=function(t){var e=this.__data__,r=n(e,t);return r<0?void 0:e[r][1]}},function(t,e,r){var n=r(7);t.exports=function(t){return n(this.__data__,t)>-1}},function(t,e,r){var n=r(7);t.exports=function(t,e){var r=this.__data__,o=n(r,t);return o<0?(++this.size,r.push([t,e])):r[o][1]=e,this}},function(t,e,r){var n=r(6);t.exports=function(){this.__data__=new n,this.size=0}},function(t,e){t.exports=function(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r}},function(t,e){t.exports=function(t){return this.__data__.get(t)}},function(t,e){t.exports=function(t){return this.__data__.has(t)}},function(t,e,r){var n=r(6),o=r(13),u=r(21);t.exports=function(t,e){var r=this.__data__;if(r instanceof n){var c=r.__data__;if(!o||c.length<199)return c.push([t,e]),this.size=++r.size,this;r=this.__data__=new u(c)}return r.set(t,e),this.size=r.size,this}},function(t,e,r){var n=r(17),o=r(44),u=r(19),c=r(20),i=/^\[object .+?Constructor\]$/,a=Function.prototype,f=Object.prototype,s=a.toString,p=f.hasOwnProperty,l=RegExp("^"+s.call(p).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");t.exports=function(t){return!(!u(t)||o(t))&&(n(t)?l:i).test(c(t))}},function(t,e){var r;r=function(){return this}();try{r=r||new Function("return this")()}catch(t){"object"==typeof window&&(r=window)}t.exports=r},function(t,e,r){var n=r(14),o=Object.prototype,u=o.hasOwnProperty,c=o.toString,i=n?n.toStringTag:void 0;t.exports=function(t){var e=u.call(t,i),r=t[i];try{t[i]=void 0;var n=!0}catch(t){}var o=c.call(t);return n&&(e?t[i]=r:delete t[i]),o}},function(t,e){var r=Object.prototype.toString;t.exports=function(t){return r.call(t)}},function(t,e,r){var n,o=r(45),u=(n=/[^.]+$/.exec(o&&o.keys&&o.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"";t.exports=function(t){return!!u&&u in t}},function(t,e,r){var n=r(2)["__core-js_shared__"];t.exports=n},function(t,e){t.exports=function(t,e){return null==t?void 0:t[e]}},function(t,e,r){var n=r(48),o=r(6),u=r(13);t.exports=function(){this.size=0,this.__data__={hash:new n,map:new(u||o),string:new n}}},function(t,e,r){var n=r(49),o=r(50),u=r(51),c=r(52),i=r(53);function a(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}a.prototype.clear=n,a.prototype.delete=o,a.prototype.get=u,a.prototype.has=c,a.prototype.set=i,t.exports=a},function(t,e,r){var n=r(9);t.exports=function(){this.__data__=n?n(null):{},this.size=0}},function(t,e){t.exports=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}},function(t,e,r){var n=r(9),o=Object.prototype.hasOwnProperty;t.exports=function(t){var e=this.__data__;if(n){var r=e[t];return"__lodash_hash_undefined__"===r?void 0:r}return o.call(e,t)?e[t]:void 0}},function(t,e,r){var n=r(9),o=Object.prototype.hasOwnProperty;t.exports=function(t){var e=this.__data__;return n?void 0!==e[t]:o.call(e,t)}},function(t,e,r){var n=r(9);t.exports=function(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=n&&void 0===e?"__lodash_hash_undefined__":e,this}},function(t,e,r){var n=r(10);t.exports=function(t){var e=n(this,t).delete(t);return this.size-=e?1:0,e}},function(t,e){t.exports=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}},function(t,e,r){var n=r(10);t.exports=function(t){return n(this,t).get(t)}},function(t,e,r){var n=r(10);t.exports=function(t){return n(this,t).has(t)}},function(t,e,r){var n=r(10);t.exports=function(t,e){var r=n(this,t),o=r.size;return r.set(t,e),this.size+=r.size==o?0:1,this}},function(t,e,r){var n=r(21),o=r(60),u=r(61);function c(t){var e=-1,r=null==t?0:t.length;for(this.__data__=new n;++e<r;)this.add(t[e])}c.prototype.add=c.prototype.push=o,c.prototype.has=u,t.exports=c},function(t,e){t.exports=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this}},function(t,e){t.exports=function(t){return this.__data__.has(t)}},function(t,e){t.exports=function(t,e){for(var r=-1,n=null==t?0:t.length;++r<n;)if(e(t[r],r,t))return!0;return!1}},function(t,e){t.exports=function(t,e){return t.has(e)}},function(t,e,r){var n=r(14),o=r(65),u=r(16),c=r(22),i=r(66),a=r(67),f=n?n.prototype:void 0,s=f?f.valueOf:void 0;t.exports=function(t,e,r,n,f,p,l){switch(r){case"[object DataView]":if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case"[object ArrayBuffer]":return!(t.byteLength!=e.byteLength||!p(new o(t),new o(e)));case"[object Boolean]":case"[object Date]":case"[object Number]":return u(+t,+e);case"[object Error]":return t.name==e.name&&t.message==e.message;case"[object RegExp]":case"[object String]":return t==e+"";case"[object Map]":var d=i;case"[object Set]":var b=1&n;if(d||(d=a),t.size!=e.size&&!b)return!1;var v=l.get(t);if(v)return v==e;n|=2,l.set(t,e);var y=c(d(t),d(e),n,f,p,l);return l.delete(t),y;case"[object Symbol]":if(s)return s.call(t)==s.call(e)}return!1}},function(t,e,r){var n=r(2).Uint8Array;t.exports=n},function(t,e){t.exports=function(t){var e=-1,r=Array(t.size);return t.forEach((function(t,n){r[++e]=[n,t]})),r}},function(t,e){t.exports=function(t){var e=-1,r=Array(t.size);return t.forEach((function(t){r[++e]=t})),r}},function(t,e,r){var n=r(69),o=Object.prototype.hasOwnProperty;t.exports=function(t,e,r,u,c,i){var a=1&r,f=n(t),s=f.length;if(s!=n(e).length&&!a)return!1;for(var p=s;p--;){var l=f[p];if(!(a?l in e:o.call(e,l)))return!1}var d=i.get(t);if(d&&i.get(e))return d==e;var b=!0;i.set(t,e),i.set(e,t);for(var v=a;++p<s;){var y=t[l=f[p]],O=e[l];if(u)var h=a?u(O,y,l,e,t,i):u(y,O,l,t,e,i);if(!(void 0===h?y===O||c(y,O,r,u,i):h)){b=!1;break}v||(v="constructor"==l)}if(b&&!v){var j=t.constructor,g=e.constructor;j!=g&&"constructor"in t&&"constructor"in e&&!("function"==typeof j&&j instanceof j&&"function"==typeof g&&g instanceof g)&&(b=!1)}return i.delete(t),i.delete(e),b}},function(t,e,r){var n=r(70),o=r(72),u=r(75);t.exports=function(t){return n(t,u,o)}},function(t,e,r){var n=r(71),o=r(15);t.exports=function(t,e,r){var u=e(t);return o(t)?u:n(u,r(t))}},function(t,e){t.exports=function(t,e){for(var r=-1,n=e.length,o=t.length;++r<n;)t[o+r]=e[r];return t}},function(t,e,r){var n=r(73),o=r(74),u=Object.prototype.propertyIsEnumerable,c=Object.getOwnPropertySymbols,i=c?function(t){return null==t?[]:(t=Object(t),n(c(t),(function(e){return u.call(t,e)})))}:o;t.exports=i},function(t,e){t.exports=function(t,e){for(var r=-1,n=null==t?0:t.length,o=0,u=[];++r<n;){var c=t[r];e(c,r,t)&&(u[o++]=c)}return u}},function(t,e){t.exports=function(){return[]}},function(t,e,r){var n=r(76),o=r(85),u=r(89);t.exports=function(t){return u(t)?n(t):o(t)}},function(t,e,r){var n=r(77),o=r(78),u=r(15),c=r(23),i=r(81),a=r(25),f=Object.prototype.hasOwnProperty;t.exports=function(t,e){var r=u(t),s=!r&&o(t),p=!r&&!s&&c(t),l=!r&&!s&&!p&&a(t),d=r||s||p||l,b=d?n(t.length,String):[],v=b.length;for(var y in t)!e&&!f.call(t,y)||d&&("length"==y||p&&("offset"==y||"parent"==y)||l&&("buffer"==y||"byteLength"==y||"byteOffset"==y)||i(y,v))||b.push(y);return b}},function(t,e){t.exports=function(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n}},function(t,e,r){var n=r(79),o=r(11),u=Object.prototype,c=u.hasOwnProperty,i=u.propertyIsEnumerable,a=n(function(){return arguments}())?n:function(t){return o(t)&&c.call(t,"callee")&&!i.call(t,"callee")};t.exports=a},function(t,e,r){var n=r(8),o=r(11);t.exports=function(t){return o(t)&&"[object Arguments]"==n(t)}},function(t,e){t.exports=function(){return!1}},function(t,e){var r=/^(?:0|[1-9]\d*)$/;t.exports=function(t,e){var n=typeof t;return!!(e=null==e?9007199254740991:e)&&("number"==n||"symbol"!=n&&r.test(t))&&t>-1&&t%1==0&&t<e}},function(t,e,r){var n=r(8),o=r(26),u=r(11),c={};c["[object Float32Array]"]=c["[object Float64Array]"]=c["[object Int8Array]"]=c["[object Int16Array]"]=c["[object Int32Array]"]=c["[object Uint8Array]"]=c["[object Uint8ClampedArray]"]=c["[object Uint16Array]"]=c["[object Uint32Array]"]=!0,c["[object Arguments]"]=c["[object Array]"]=c["[object ArrayBuffer]"]=c["[object Boolean]"]=c["[object DataView]"]=c["[object Date]"]=c["[object Error]"]=c["[object Function]"]=c["[object Map]"]=c["[object Number]"]=c["[object Object]"]=c["[object RegExp]"]=c["[object Set]"]=c["[object String]"]=c["[object WeakMap]"]=!1,t.exports=function(t){return u(t)&&o(t.length)&&!!c[n(t)]}},function(t,e){t.exports=function(t){return function(e){return t(e)}}},function(t,e,r){(function(t){var n=r(18),o=e&&!e.nodeType&&e,u=o&&"object"==typeof t&&t&&!t.nodeType&&t,c=u&&u.exports===o&&n.process,i=function(){try{var t=u&&u.require&&u.require("util").types;return t||c&&c.binding&&c.binding("util")}catch(t){}}();t.exports=i}).call(this,r(24)(t))},function(t,e,r){var n=r(86),o=r(87),u=Object.prototype.hasOwnProperty;t.exports=function(t){if(!n(t))return o(t);var e=[];for(var r in Object(t))u.call(t,r)&&"constructor"!=r&&e.push(r);return e}},function(t,e){var r=Object.prototype;t.exports=function(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||r)}},function(t,e,r){var n=r(88)(Object.keys,Object);t.exports=n},function(t,e){t.exports=function(t,e){return function(r){return t(e(r))}}},function(t,e,r){var n=r(17),o=r(26);t.exports=function(t){return null!=t&&o(t.length)&&!n(t)}},function(t,e,r){var n=r(91),o=r(13),u=r(92),c=r(93),i=r(94),a=r(8),f=r(20),s=f(n),p=f(o),l=f(u),d=f(c),b=f(i),v=a;(n&&"[object DataView]"!=v(new n(new ArrayBuffer(1)))||o&&"[object Map]"!=v(new o)||u&&"[object Promise]"!=v(u.resolve())||c&&"[object Set]"!=v(new c)||i&&"[object WeakMap]"!=v(new i))&&(v=function(t){var e=a(t),r="[object Object]"==e?t.constructor:void 0,n=r?f(r):"";if(n)switch(n){case s:return"[object DataView]";case p:return"[object Map]";case l:return"[object Promise]";case d:return"[object Set]";case b:return"[object WeakMap]"}return e}),t.exports=v},function(t,e,r){var n=r(3)(r(2),"DataView");t.exports=n},function(t,e,r){var n=r(3)(r(2),"Promise");t.exports=n},function(t,e,r){var n=r(3)(r(2),"Set");t.exports=n},function(t,e,r){var n=r(3)(r(2),"WeakMap");t.exports=n},function(t,e,r){"use strict";r.r(e);var n={};r.r(n),r.d(n,"initialize",(function(){return O})),r.d(n,"update",(function(){return h})),r.d(n,"updateBatch",(function(){return j})),r.d(n,"reset",(function(){return g})),r.d(n,"resetPristine",(function(){return P})),r.d(n,"resetPristineKey",(function(){return w})),r.d(n,"startFetch",(function(){return m})),r.d(n,"doneFetch",(function(){return x})),r.d(n,"failFetch",(function(){return _})),r.d(n,"startProcess",(function(){return S})),r.d(n,"doneProcess",(function(){return R})),r.d(n,"removeResource",(function(){return D}));var o={};r.r(o),r.d(o,"initialize",(function(){return I})),r.d(o,"update",(function(){return k})),r.d(o,"updateBatch",(function(){return C})),r.d(o,"updateOnChange",(function(){return z})),r.d(o,"reset",(function(){return F})),r.d(o,"resetPristine",(function(){return M})),r.d(o,"resetPristineKey",(function(){return T})),r.d(o,"startFetch",(function(){return B})),r.d(o,"doneFetch",(function(){return K})),r.d(o,"failFetch",(function(){return U})),r.d(o,"startProcess",(function(){return L})),r.d(o,"doneProcess",(function(){return $}));var u={};r.r(u),r.d(u,"initializeResource",(function(){return St})),r.d(u,"updateResource",(function(){return Rt})),r.d(u,"updateBatchResource",(function(){return Dt})),r.d(u,"removeResource",(function(){return At})),r.d(u,"resetResource",(function(){return Et})),r.d(u,"resetPristineResource",(function(){return It})),r.d(u,"resetPristineKeyResource",(function(){return kt})),r.d(u,"startFetchResource",(function(){return Ct})),r.d(u,"doneFetchResource",(function(){return zt})),r.d(u,"failFetchResource",(function(){return Ft})),r.d(u,"startProcessResource",(function(){return Mt})),r.d(u,"doneProcessResource",(function(){return Tt}));var c={};function i(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function a(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t)){var r=[],n=!0,o=!1,u=void 0;try{for(var c,i=t[Symbol.iterator]();!(n=(c=i.next()).done)&&(r.push(c.value),!e||r.length!==e);n=!0);}catch(t){o=!0,u=t}finally{try{n||null==i.return||i.return()}finally{if(o)throw u}}return r}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}r.r(c),r.d(c,"initializeResource",(function(){return Bt})),r.d(c,"updateResource",(function(){return Kt})),r.d(c,"updateBatchResource",(function(){return Ut})),r.d(c,"updateOnChangeResource",(function(){return Lt})),r.d(c,"removeResource",(function(){return $t})),r.d(c,"resetResource",(function(){return qt})),r.d(c,"resetPristineResource",(function(){return Nt})),r.d(c,"resetPristineKeyResource",(function(){return Vt})),r.d(c,"startFetchResource",(function(){return Wt})),r.d(c,"doneFetchResource",(function(){return Ht})),r.d(c,"failFetchResource",(function(){return Gt})),r.d(c,"startProcessResource",(function(){return Jt})),r.d(c,"doneProcessResource",(function(){return Qt}));var f=r(0),s=r.n(f);function p(t){return function(t){if(Array.isArray(t)){for(var e=0,r=new Array(t.length);e<t.length;e++)r[e]=t[e];return r}}(t)||function(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}var l=r(1),d=r.n(l);function b(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}var v=function(t,e,r,n,o){if("function"!=typeof t)return e(t);var u=t.apply(void 0,p(n));return"function"==typeof u?u(e,r,o):e(u)},y=function(t,e){var r=e.initialState,n=e.init,o=void 0===n?d.a:n,u=e.actions,c=void 0===u?{}:u,s=e.extraArgument,p=a(Object(f.useReducer)(t,r,o),2),l=p[0],y=p[1],O=Object(f.useRef)();O.current=l;var h=Object(f.useRef)();if(h.current)return[l,h.current];var j=function(){return O.current};return h.current=Object.keys(c).reduce((function(t,e){return function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?b(Object(r),!0).forEach((function(e){i(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):b(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}({},t,i({},e,(function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return v(c[e],y,j,r,s)})))}),{dispatch:y}),[l,h.current]},O="initialize",h="update",j="updateBatch",g="reset",P="resetPristine",w="resetPristineKey",m="startFetch",x="doneFetch",_="failFetch",S="startProcess",R="doneProcess",D="removeResource";function A(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function E(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?A(Object(r),!0).forEach((function(e){i(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):A(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}var I=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=e.merge;return function(e,n){return e(r?{type:O,values:E({},n(),{},t)}:{type:O,values:t})}},k=function(t,e){return{type:h,attr:t,value:e}},C=function(t){return{type:j,values:t}},z=function(t){var e=t.target;return k(e.name,e.value)},F={type:g},M={type:P},T=function(t){return{type:w,attr:t}},B={type:m},K=function(t){return{type:x,values:t}},U={type:_},L={type:S},$={type:R},q=r(5),N=function(){return[Object(q.createContext)({}),Object(q.createContext)({})]};function V(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}var W=function(t){var e=t.getInitialState,r=t.defaultInitialState;return e&&"function"==typeof e?function(){return function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?V(Object(r),!0).forEach((function(e){i(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):V(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}({},r,{},e())}:function(){return r}},H=r(12),G=r.n(H),J=r(4),Q=r.n(J);function X(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Y(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?X(Object(r),!0).forEach((function(e){i(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):X(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}var Z=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"pristine",e=function(){return i({},t,{})},r=function(e,r){return!!e[t]&&e[t].hasOwnProperty(r)},n=function(e,r){return Y({},e,i({},t,Y({},e[t],i({},r,e[r]))))},o=function(n,o){return o?r(n,o)?(delete n[t][o],Y({},n,i({},t,Y({},n[t])))):n:Y({},n,{},e())};return{updatePristine:function(e,u,c){var i=r(e,u);return i||Q()(c,e[u])?i&&Q()(c,e[t][u])?o(e,u):e:n(e,u)},removePristine:o,getInitialPristineState:e}};function tt(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function et(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?tt(Object(r),!0).forEach((function(e){i(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):tt(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}var rt=function(t,e,r){return Array.isArray(r)?function(t,e,r){return r.reduce((function(e,r){var n=r.attr,o=r.value;return et({},e,{},t(e,n,o))}),e)}(t,e,r):function(t,e,r){return Object.keys(r).reduce((function(e,n){return et({},e,{},t(e,n,r[n]))}),e)}(t,e,r)},nt=function(t,e){return function(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:t,n=arguments.length>1?arguments[1]:void 0;return e.hasOwnProperty(n.type)?e[n.type](r,n):r}};function ot(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function ut(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?ot(Object(r),!0).forEach((function(e){i(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ot(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}var ct=function(t,e){var r,n=Z("pristine"),o=n.getInitialPristineState,u=n.updatePristine,c=n.removePristine,a=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return ut({},t(),{},e,{},o())},f=function(e,r,n){return n=function(e,r){return G()(r)?t()[e]:r}(r,n),ut({},e=u(e,r,n),i({},r,n))},s=ut((i(r={},O,(function(t,e){return a(e.values)})),i(r,h,(function(t,e){return f(t,e.attr,e.value)})),i(r,j,(function(t,e){return rt(f,t,e.values)})),i(r,g,(function(t,e){return a()})),i(r,P,(function(t,e){return c(t)})),i(r,w,(function(t,e){return c(t,e.attr)})),i(r,S,(function(t,e){return ut({},t,{processing:!0})})),i(r,R,(function(t,e){return ut({},t,{processing:!1})})),i(r,m,(function(t,e){return ut({},t,{loading:!0})})),i(r,x,(function(t,e){return a(ut({},e.values,{loading:!1,loaded:!0}))})),i(r,_,(function(t,e){return ut({},t,{loading:!1})})),r),e);return{reducer:nt(initialState,s),init:a}},it=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:d.a,r=Object(f.useRef)();return Object(q.useContextSelector)(t,(function(t){var n=e(t);return Q()(r.current,n)||(r.current=n),r.current}))},at=function(t){return function(e){return e.byId[t]}},ft=function(t,e){return{useSelector:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:d.a;return it(t,e)},useResourceSelector:function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:d.a,n=Object(f.useCallback)((function(t){return r(at(e)(t))}),[e]);return it(t,n)},useAction:function(t){var r=Object(f.useMemo)((function(){return t?function(e){return e[t]}:d.a}),[t]);return it(e,r)}}};function st(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}var pt=function(t){return function(e){return t?e.updateResource:e.update}},lt=function(t,e){return function(r){var n=r.fieldKey,o=r.resourceId,u=r.getUpdate,c=void 0===u?pt:u,s=r.select,p=void 0===s?o?at:d.a:s,l=Object(f.useCallback)((function(t){var e=o?p(o)(t):p(t);return[e[n],e.errors]}),[o,n]),b=a(it(t,l),2),v=b[0],y=b[1],O=Object(f.useCallback)((function(t){var e=c(o)(t);if("function"!=typeof e)throw new Error("useMember expects an 'update' dispatch function");return o?function(t,r){return e(o,t,r)}:e}),[o]),h=it(e,O);return[v,Object(f.useCallback)((function(t){return h(n,t)}),[h,n]),y[n],Object(f.useCallback)((function(t){return h("errors",function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?st(Object(r),!0).forEach((function(e){i(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):st(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}({},y,i({},n,t)))}),[h,y])]}},dt=function(t,e){var r=lt(t,e);return function(t){var e=t.fieldKey,n=t.resourceId,o=t.uniq,u=t.getUpdate,c=t.select,i=a(r({fieldKey:e,resourceId:n,getUpdate:u,select:c}),4),s=i[0],l=i[1],b=i[2],v=i[3],y=function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return t?function(t){return p(new Set(t))}:d.a}(o),O=Object(f.useCallback)((function(t){t<0||t>=s.length||l(y([].concat(p(s.slice(0,t)),p(s.slice(t+1)))))}),[s]),h=Object(f.useCallback)((function(t,e){t<0||t>=s.length||l(y([].concat(p(s.slice(0,t)),[e],p(s.slice(t+1)))))}),[s]),j=Object(f.useCallback)((function(t,e){t<0||l(y([].concat(p(s.slice(0,t)),[e],p(s.slice(t)))))}),[s]),g=Object(f.useCallback)((function(t){return j(s.length,t)}),[s]),P=Object(f.useCallback)((function(t,e){if(!(t<0||t>=s.length||e<0||e>=s.length)){var r=p(s),n=a(r.splice(t,1),1)[0];r.splice(e,0,n),l(y(r))}}),[s]);return{collection:s,set:l,add:j,push:g,edit:h,remove:O,reorder:P,error:b,setError:v}}};function bt(){return(bt=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t}).apply(this,arguments)}function vt(t,e){if(null==t)return{};var r,n,o=function(t,e){if(null==t)return{};var r,n,o={},u=Object.keys(t);for(n=0;n<u.length;n++)r=u[n],e.indexOf(r)>=0||(o[r]=t[r]);return o}(t,e);if(Object.getOwnPropertySymbols){var u=Object.getOwnPropertySymbols(t);for(n=0;n<u.length;n++)r=u[n],e.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(o[r]=t[r])}return o}var yt=function(t){return t.target.value},Ot=function(t){return t.target.checked},ht=function(t){var e=function(e){var r=e.Component,n=void 0===r?"input":r,o=e.fieldKey,u=e.select,c=e.resourceId,p=(e.getUpdate,e.onChange),l=void 0===p?d.a:p,b=vt(e,["Component","fieldKey","select","resourceId","getUpdate","onChange"]),v=a(t({fieldKey:o,select:u,resourceId:c}),3),y=v[0],O=v[1],h=v[2],j=function(){return O(l.apply(void 0,arguments))};return Object(f.useMemo)((function(){return s.a.createElement(n,bt(i({name:o,"data-testid":o,onChange:j,value:y,error:h},"name",o),b))}),[y,h,b.options])};return{Select:function(t){var r=t.Component,n=void 0===r?"select":r,o=t.onChange,u=void 0===o?yt:o,c=t.options,i=void 0===c?[]:c,a=vt(t,["Component","onChange","options"]);return s.a.createElement(e,bt({Component:n,onChange:u,options:i},a))},Checkbox:function(t){var r=t.type,n=void 0===r?"checkbox":r,o=t.onChange,u=void 0===o?Ot:o,c=vt(t,["type","onChange"]);return s.a.createElement(e,bt({type:n,onChange:u},c))},Input:function(t){var r=t.onChange,n=void 0===r?yt:r,o=vt(t,["onChange"]);return s.a.createElement(e,bt({type:"text",onChange:n},o))}}},jt=function(t,e){return{useSelector:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:d.a;return it(t,e)},useAction:function(t){var r=Object(f.useMemo)((function(){return t?function(e){return e[t]}:d.a}),[t]);return it(e,r)}}},gt={loading:!0,loaded:!1,processing:!1,errors:{}};function Pt(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function wt(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Pt(Object(r),!0).forEach((function(e){i(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Pt(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}var mt=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=e.getInitialState,n=e.reducer,u=e.actions,c=W({getInitialState:r,defaultInitialState:gt}),i=ct(c,n),f=i.reducer,p=i.init,l=N(),d=a(l,2),b=d[0],v=d[1],O=lt(b,v),h=dt(b,v),j=ht(O),g=jt(b,v),P=g.useSelector,w=g.useAction,m=function(t){var e=t.children,r=t.initialState,n=t.extraArgument,c=a(y(f,{initialState:r,init:p,actions:wt({},o,{},u),extraArgument:n}),2),i=c[0],l=c[1];return s.a.createElement(v.Provider,{value:l},s.a.createElement(b.Provider,{value:i},e))};return m.displayName=t,{Provider:m,useMember:O,useCollection:h,useSelector:P,useAction:w,Field:j}},xt={loading:!0,loaded:!1,processing:!1,byId:{},ids:[]},_t={loading:!0,loaded:!1,processing:!1,errors:{}},St="initializeResource",Rt="updateResource",Dt="updateBatchResource",At="removeResource",Et="resetResource",It="resetPristineResource",kt="resetPristineKeyResource",Ct="startFetchResource",zt="doneFetchResource",Ft="failFetchResource",Mt="startProcessResource",Tt="doneProcessResource",Bt=function(t,e){return{type:St,id:t,values:e}},Kt=function(t,e,r){return{type:Rt,id:t,attr:e,value:r}},Ut=function(t,e){return{type:Dt,id:t,values:e}},Lt=function(t,e){var r=e.target;return Kt(t,r.name,r.value)},$t=function(t){return{type:At,id:t}},qt=function(t){return{type:Et,id:t}},Nt=function(t){return{type:It,id:t}},Vt=function(t,e){return{type:kt,id:t,attr:e}},Wt=function(t){return{type:Ct,id:t}},Ht=function(t,e){return{type:zt,id:t,values:e}},Gt=function(t){return{type:Ft,id:t}},Jt=function(t){return{type:Mt,id:t}},Qt=function(t){return{type:Tt,id:t}};function Xt(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Yt(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Xt(Object(r),!0).forEach((function(e){i(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Xt(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}var Zt=function(t){var e,r=t.getInitialState,n=t.customReducer,o=void 0===n?{}:n,c=t.resourceReducer,a=void 0===c?{}:c,f=t.initResource,s=t.customResourceActionTypes,l=void 0===s?{}:s,d=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Yt({},r(),{},t)},b=function(t,e,r){var n=t.byId[e]||f();return a(n,Yt({id:e},r))},v=function(t,e,r){var n=e.toString(),o=t.byId.hasOwnProperty(n)?t.ids:[].concat(p(t.ids),[n]);return Yt({},t,{byId:Yt({},t.byId,i({},n,b(t,n,{type:Dt,values:r}))),ids:o})},y=function(t,e){var r=e.id,n=vt(e,["id"]),o=b(t,r,n),u=t.byId.hasOwnProperty(r)?t.ids:[].concat(p(t.ids),[r]);return Yt({},t,{byId:Yt({},t.byId,i({},r,o)),ids:u})},P=Yt((i(e={},O,(function(t,e){return d(e.values)})),i(e,h,(function(t,e){return v(t,e.attr,e.value)})),i(e,j,(function(t,e){return rt(v,t,e.values)})),i(e,g,(function(t,e){return d()})),i(e,S,(function(t,e){return Yt({},t,{processing:!0})})),i(e,R,(function(t,e){return Yt({},t,{processing:!1})})),i(e,m,(function(t,e){return Yt({},t,{loading:!0})})),i(e,x,(function(t,e){return function(t,e){var r=[],n=e.reduce((function(e,n){return r.push(n.id),Yt({},e,i({},n.id,b(t,n.id,{type:St,values:n})))}),{});return Yt({},t,{byId:Yt({},t.byId,{},n),ids:p(new Set([].concat(p(t.ids),r))),loading:!1,loaded:!0})}(t,e.values)})),i(e,_,(function(t,e){return Yt({},t,{loading:!1})})),i(e,D,(function(t,e){return function(t,e){var r=Yt({},t.byId);delete r[e];var n=t.ids.filter((function(t){return t!==e}));return Yt({},t,{byId:r,ids:n})}(t,e.id)})),e),Object.keys(Yt({},u,{},l)).reduce((function(t,e){return Yt({},t,i({},e,y))}),{}),{},o);return{reducer:nt(initialState,P),init:d}};function te(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function ee(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?te(Object(r),!0).forEach((function(e){i(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):te(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}var re=function(t,e){var r,n=Z("pristine"),o=n.getInitialPristineState,u=n.updatePristine,c=n.removePristine,a=function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return ee({id:e},t(),{},r,{},o())},f=function(e,r,n){return n=function(e,r){return G()(r)?t()[e]:r}(r,n),ee({},e=u(e,r,n),i({},r,n))},s=ee((i(r={},St,(function(t,e){return a(id,e.values)})),i(r,Rt,(function(t,e){return f(t,e.attr,e.value)})),i(r,Dt,(function(t,e){return rt(f,t,e.values)})),i(r,Et,(function(t,e){return a(e.id)})),i(r,It,(function(t,e){return c(t)})),i(r,kt,(function(t,e){return c(t,e.attr)})),i(r,Mt,(function(t,e){return ee({},t,{processing:!0})})),i(r,Tt,(function(t,e){return ee({},t,{processing:!1})})),i(r,Ct,(function(t,e){return ee({},t,{loading:!0})})),i(r,zt,(function(t,e){return a(id,ee({},e.values,{loading:!1,loaded:!0}))})),i(r,Ft,(function(t,e){return ee({},t,{loading:!1})})),r),e);return{reducer:nt(initialState,s),init:a}};function ne(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function oe(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?ne(Object(r),!0).forEach((function(e){i(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ne(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}var ue=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=e.getInitialState,n=e.reducer,u=e.actions,i=e.resourceOptions,f=void 0===i?{}:i,p=W({getInitialState:r,defaultInitialState:xt}),l=W({getInitialState:f.getInitialState,defaultInitialState:_t}),d=re(l,f.reducer),b=d.reducer,v=d.init,O=Zt({getInitialState:p,customReducer:n,resourceReducer:b,customResourceActionTypes:f.actionTypes,initResource:v}),h=O.reducer,j=O.init,g=N(),P=a(g,2),w=P[0],m=P[1],x=dt(w,m),_=lt(w,m),S=ht(_),R=ft(w,m),D=R.useSelector,A=R.useAction,E=R.useResourceSelector,I=function(t){var e=t.children,r=t.initialState,n=t.extraArgument,i=a(y(h,{initialState:r,init:j,actions:oe({},o,{},c,{},u),extraArgument:n}),2),f=i[0],p=i[1];return s.a.createElement(m.Provider,{value:p},s.a.createElement(w.Provider,{value:f},e))};return I.displayName=t,{Provider:I,useCollection:x,useMember:_,useSelector:D,useAction:A,useResourceSelector:E,Field:S}};function ce(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function ie(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?ce(Object(r),!0).forEach((function(e){i(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ce(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}r.d(e,"hoaxActions",(function(){return ae})),r.d(e,"hoaxActionTypes",(function(){return fe})),r.d(e,"makeMemberHoax",(function(){return mt})),r.d(e,"makeCollectionHoax",(function(){return ue}));var ae=ie({},o,{},c),fe=ie({},n,{},u)}])})); | ||
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("react")):"function"==typeof define&&define.amd?define(["React"],e):"object"==typeof exports?exports["react-hoax"]=e(require("react")):t["react-hoax"]=e(t.React)}(window,(function(t){return function(t){var e={};function r(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)r.d(n,o,function(e){return t[e]}.bind(null,o));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=95)}([function(e,r){e.exports=t},function(t,e){t.exports=function(t){return t}},function(t,e,r){var n=r(18),o="object"==typeof self&&self&&self.Object===Object&&self,u=n||o||Function("return this")();t.exports=u},function(t,e,r){var n=r(40),o=r(46);t.exports=function(t,e){var r=o(t,e);return n(r)?r:void 0}},function(t,e,r){var n=r(27);t.exports=function(t,e){return n(t,e)}},function(t,e,r){!function(t,e){e=e&&e.hasOwnProperty("default")?e.default:e;var r=Symbol(),n=function(t,n){var o=t[r];if(!o)throw new Error;var u=e.useReducer((function(t){return t+1}),0)[1],c=e.useContext(t),i=n(c),a=e.useRef(null);return e.useLayoutEffect((function(){a.current={f:n,v:c,s:i}})),e.useLayoutEffect((function(){var t=function(t){try{if(a.current.v===t||Object.is(a.current.s,a.current.f(t)))return}catch(t){}u()};return o.add(t),function(){o.delete(t)}}),[o]),i};t.createContext=function(t){var n,o,u=e.createContext(t,(function(){return 0}));return u[r]=new Set,u.Provider=(n=u.Provider,o=u[r],e.memo((function(t){var r=t.value,u=t.children;return o.forEach((function(t){t(r)})),e.createElement(n,{value:r},u)}))),delete u.Consumer,u},t.useContext=function(t){return n(t,(function(t){return t}))},t.useContextSelector=n}(e,r(0))},function(t,e,r){var n=r(30),o=r(31),u=r(32),c=r(33),i=r(34);function a(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}a.prototype.clear=n,a.prototype.delete=o,a.prototype.get=u,a.prototype.has=c,a.prototype.set=i,t.exports=a},function(t,e,r){var n=r(16);t.exports=function(t,e){for(var r=t.length;r--;)if(n(t[r][0],e))return r;return-1}},function(t,e,r){var n=r(14),o=r(42),u=r(43),c=n?n.toStringTag:void 0;t.exports=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":c&&c in Object(t)?o(t):u(t)}},function(t,e,r){var n=r(3)(Object,"create");t.exports=n},function(t,e,r){var n=r(55);t.exports=function(t,e){var r=t.__data__;return n(e)?r["string"==typeof e?"string":"hash"]:r.map}},function(t,e){t.exports=function(t){return null!=t&&"object"==typeof t}},function(t,e){t.exports=function(t){return null==t}},function(t,e,r){var n=r(3)(r(2),"Map");t.exports=n},function(t,e,r){var n=r(2).Symbol;t.exports=n},function(t,e){var r=Array.isArray;t.exports=r},function(t,e){t.exports=function(t,e){return t===e||t!=t&&e!=e}},function(t,e,r){var n=r(8),o=r(19);t.exports=function(t){if(!o(t))return!1;var e=n(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}},function(t,e,r){(function(e){var r="object"==typeof e&&e&&e.Object===Object&&e;t.exports=r}).call(this,r(41))},function(t,e){t.exports=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}},function(t,e){var r=Function.prototype.toString;t.exports=function(t){if(null!=t){try{return r.call(t)}catch(t){}try{return t+""}catch(t){}}return""}},function(t,e,r){var n=r(47),o=r(54),u=r(56),c=r(57),i=r(58);function a(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}a.prototype.clear=n,a.prototype.delete=o,a.prototype.get=u,a.prototype.has=c,a.prototype.set=i,t.exports=a},function(t,e,r){var n=r(59),o=r(62),u=r(63);t.exports=function(t,e,r,c,i,a){var f=1&r,s=t.length,p=e.length;if(s!=p&&!(f&&p>s))return!1;var l=a.get(t);if(l&&a.get(e))return l==e;var d=-1,b=!0,y=2&r?new n:void 0;for(a.set(t,e),a.set(e,t);++d<s;){var v=t[d],O=e[d];if(c)var h=f?c(O,v,d,e,t,a):c(v,O,d,t,e,a);if(void 0!==h){if(h)continue;b=!1;break}if(y){if(!o(e,(function(t,e){if(!u(y,e)&&(v===t||i(v,t,r,c,a)))return y.push(e)}))){b=!1;break}}else if(v!==O&&!i(v,O,r,c,a)){b=!1;break}}return a.delete(t),a.delete(e),b}},function(t,e,r){(function(t){var n=r(2),o=r(80),u=e&&!e.nodeType&&e,c=u&&"object"==typeof t&&t&&!t.nodeType&&t,i=c&&c.exports===u?n.Buffer:void 0,a=(i?i.isBuffer:void 0)||o;t.exports=a}).call(this,r(24)(t))},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},function(t,e,r){var n=r(82),o=r(83),u=r(84),c=u&&u.isTypedArray,i=c?o(c):n;t.exports=i},function(t,e){t.exports=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}},function(t,e,r){var n=r(28),o=r(11);t.exports=function t(e,r,u,c,i){return e===r||(null==e||null==r||!o(e)&&!o(r)?e!=e&&r!=r:n(e,r,u,c,t,i))}},function(t,e,r){var n=r(29),o=r(22),u=r(64),c=r(68),i=r(90),a=r(15),f=r(23),s=r(25),p="[object Object]",l=Object.prototype.hasOwnProperty;t.exports=function(t,e,r,d,b,y){var v=a(t),O=a(e),h=v?"[object Array]":i(t),j=O?"[object Array]":i(e),g=(h="[object Arguments]"==h?p:h)==p,P=(j="[object Arguments]"==j?p:j)==p,w=h==j;if(w&&f(t)){if(!f(e))return!1;v=!0,g=!1}if(w&&!g)return y||(y=new n),v||s(t)?o(t,e,r,d,b,y):u(t,e,h,r,d,b,y);if(!(1&r)){var m=g&&l.call(t,"__wrapped__"),x=P&&l.call(e,"__wrapped__");if(m||x){var _=m?t.value():t,S=x?e.value():e;return y||(y=new n),b(_,S,r,d,y)}}return!!w&&(y||(y=new n),c(t,e,r,d,b,y))}},function(t,e,r){var n=r(6),o=r(35),u=r(36),c=r(37),i=r(38),a=r(39);function f(t){var e=this.__data__=new n(t);this.size=e.size}f.prototype.clear=o,f.prototype.delete=u,f.prototype.get=c,f.prototype.has=i,f.prototype.set=a,t.exports=f},function(t,e){t.exports=function(){this.__data__=[],this.size=0}},function(t,e,r){var n=r(7),o=Array.prototype.splice;t.exports=function(t){var e=this.__data__,r=n(e,t);return!(r<0)&&(r==e.length-1?e.pop():o.call(e,r,1),--this.size,!0)}},function(t,e,r){var n=r(7);t.exports=function(t){var e=this.__data__,r=n(e,t);return r<0?void 0:e[r][1]}},function(t,e,r){var n=r(7);t.exports=function(t){return n(this.__data__,t)>-1}},function(t,e,r){var n=r(7);t.exports=function(t,e){var r=this.__data__,o=n(r,t);return o<0?(++this.size,r.push([t,e])):r[o][1]=e,this}},function(t,e,r){var n=r(6);t.exports=function(){this.__data__=new n,this.size=0}},function(t,e){t.exports=function(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r}},function(t,e){t.exports=function(t){return this.__data__.get(t)}},function(t,e){t.exports=function(t){return this.__data__.has(t)}},function(t,e,r){var n=r(6),o=r(13),u=r(21);t.exports=function(t,e){var r=this.__data__;if(r instanceof n){var c=r.__data__;if(!o||c.length<199)return c.push([t,e]),this.size=++r.size,this;r=this.__data__=new u(c)}return r.set(t,e),this.size=r.size,this}},function(t,e,r){var n=r(17),o=r(44),u=r(19),c=r(20),i=/^\[object .+?Constructor\]$/,a=Function.prototype,f=Object.prototype,s=a.toString,p=f.hasOwnProperty,l=RegExp("^"+s.call(p).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");t.exports=function(t){return!(!u(t)||o(t))&&(n(t)?l:i).test(c(t))}},function(t,e){var r;r=function(){return this}();try{r=r||new Function("return this")()}catch(t){"object"==typeof window&&(r=window)}t.exports=r},function(t,e,r){var n=r(14),o=Object.prototype,u=o.hasOwnProperty,c=o.toString,i=n?n.toStringTag:void 0;t.exports=function(t){var e=u.call(t,i),r=t[i];try{t[i]=void 0;var n=!0}catch(t){}var o=c.call(t);return n&&(e?t[i]=r:delete t[i]),o}},function(t,e){var r=Object.prototype.toString;t.exports=function(t){return r.call(t)}},function(t,e,r){var n,o=r(45),u=(n=/[^.]+$/.exec(o&&o.keys&&o.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"";t.exports=function(t){return!!u&&u in t}},function(t,e,r){var n=r(2)["__core-js_shared__"];t.exports=n},function(t,e){t.exports=function(t,e){return null==t?void 0:t[e]}},function(t,e,r){var n=r(48),o=r(6),u=r(13);t.exports=function(){this.size=0,this.__data__={hash:new n,map:new(u||o),string:new n}}},function(t,e,r){var n=r(49),o=r(50),u=r(51),c=r(52),i=r(53);function a(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}a.prototype.clear=n,a.prototype.delete=o,a.prototype.get=u,a.prototype.has=c,a.prototype.set=i,t.exports=a},function(t,e,r){var n=r(9);t.exports=function(){this.__data__=n?n(null):{},this.size=0}},function(t,e){t.exports=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}},function(t,e,r){var n=r(9),o=Object.prototype.hasOwnProperty;t.exports=function(t){var e=this.__data__;if(n){var r=e[t];return"__lodash_hash_undefined__"===r?void 0:r}return o.call(e,t)?e[t]:void 0}},function(t,e,r){var n=r(9),o=Object.prototype.hasOwnProperty;t.exports=function(t){var e=this.__data__;return n?void 0!==e[t]:o.call(e,t)}},function(t,e,r){var n=r(9);t.exports=function(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=n&&void 0===e?"__lodash_hash_undefined__":e,this}},function(t,e,r){var n=r(10);t.exports=function(t){var e=n(this,t).delete(t);return this.size-=e?1:0,e}},function(t,e){t.exports=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}},function(t,e,r){var n=r(10);t.exports=function(t){return n(this,t).get(t)}},function(t,e,r){var n=r(10);t.exports=function(t){return n(this,t).has(t)}},function(t,e,r){var n=r(10);t.exports=function(t,e){var r=n(this,t),o=r.size;return r.set(t,e),this.size+=r.size==o?0:1,this}},function(t,e,r){var n=r(21),o=r(60),u=r(61);function c(t){var e=-1,r=null==t?0:t.length;for(this.__data__=new n;++e<r;)this.add(t[e])}c.prototype.add=c.prototype.push=o,c.prototype.has=u,t.exports=c},function(t,e){t.exports=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this}},function(t,e){t.exports=function(t){return this.__data__.has(t)}},function(t,e){t.exports=function(t,e){for(var r=-1,n=null==t?0:t.length;++r<n;)if(e(t[r],r,t))return!0;return!1}},function(t,e){t.exports=function(t,e){return t.has(e)}},function(t,e,r){var n=r(14),o=r(65),u=r(16),c=r(22),i=r(66),a=r(67),f=n?n.prototype:void 0,s=f?f.valueOf:void 0;t.exports=function(t,e,r,n,f,p,l){switch(r){case"[object DataView]":if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case"[object ArrayBuffer]":return!(t.byteLength!=e.byteLength||!p(new o(t),new o(e)));case"[object Boolean]":case"[object Date]":case"[object Number]":return u(+t,+e);case"[object Error]":return t.name==e.name&&t.message==e.message;case"[object RegExp]":case"[object String]":return t==e+"";case"[object Map]":var d=i;case"[object Set]":var b=1&n;if(d||(d=a),t.size!=e.size&&!b)return!1;var y=l.get(t);if(y)return y==e;n|=2,l.set(t,e);var v=c(d(t),d(e),n,f,p,l);return l.delete(t),v;case"[object Symbol]":if(s)return s.call(t)==s.call(e)}return!1}},function(t,e,r){var n=r(2).Uint8Array;t.exports=n},function(t,e){t.exports=function(t){var e=-1,r=Array(t.size);return t.forEach((function(t,n){r[++e]=[n,t]})),r}},function(t,e){t.exports=function(t){var e=-1,r=Array(t.size);return t.forEach((function(t){r[++e]=t})),r}},function(t,e,r){var n=r(69),o=Object.prototype.hasOwnProperty;t.exports=function(t,e,r,u,c,i){var a=1&r,f=n(t),s=f.length;if(s!=n(e).length&&!a)return!1;for(var p=s;p--;){var l=f[p];if(!(a?l in e:o.call(e,l)))return!1}var d=i.get(t);if(d&&i.get(e))return d==e;var b=!0;i.set(t,e),i.set(e,t);for(var y=a;++p<s;){var v=t[l=f[p]],O=e[l];if(u)var h=a?u(O,v,l,e,t,i):u(v,O,l,t,e,i);if(!(void 0===h?v===O||c(v,O,r,u,i):h)){b=!1;break}y||(y="constructor"==l)}if(b&&!y){var j=t.constructor,g=e.constructor;j!=g&&"constructor"in t&&"constructor"in e&&!("function"==typeof j&&j instanceof j&&"function"==typeof g&&g instanceof g)&&(b=!1)}return i.delete(t),i.delete(e),b}},function(t,e,r){var n=r(70),o=r(72),u=r(75);t.exports=function(t){return n(t,u,o)}},function(t,e,r){var n=r(71),o=r(15);t.exports=function(t,e,r){var u=e(t);return o(t)?u:n(u,r(t))}},function(t,e){t.exports=function(t,e){for(var r=-1,n=e.length,o=t.length;++r<n;)t[o+r]=e[r];return t}},function(t,e,r){var n=r(73),o=r(74),u=Object.prototype.propertyIsEnumerable,c=Object.getOwnPropertySymbols,i=c?function(t){return null==t?[]:(t=Object(t),n(c(t),(function(e){return u.call(t,e)})))}:o;t.exports=i},function(t,e){t.exports=function(t,e){for(var r=-1,n=null==t?0:t.length,o=0,u=[];++r<n;){var c=t[r];e(c,r,t)&&(u[o++]=c)}return u}},function(t,e){t.exports=function(){return[]}},function(t,e,r){var n=r(76),o=r(85),u=r(89);t.exports=function(t){return u(t)?n(t):o(t)}},function(t,e,r){var n=r(77),o=r(78),u=r(15),c=r(23),i=r(81),a=r(25),f=Object.prototype.hasOwnProperty;t.exports=function(t,e){var r=u(t),s=!r&&o(t),p=!r&&!s&&c(t),l=!r&&!s&&!p&&a(t),d=r||s||p||l,b=d?n(t.length,String):[],y=b.length;for(var v in t)!e&&!f.call(t,v)||d&&("length"==v||p&&("offset"==v||"parent"==v)||l&&("buffer"==v||"byteLength"==v||"byteOffset"==v)||i(v,y))||b.push(v);return b}},function(t,e){t.exports=function(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n}},function(t,e,r){var n=r(79),o=r(11),u=Object.prototype,c=u.hasOwnProperty,i=u.propertyIsEnumerable,a=n(function(){return arguments}())?n:function(t){return o(t)&&c.call(t,"callee")&&!i.call(t,"callee")};t.exports=a},function(t,e,r){var n=r(8),o=r(11);t.exports=function(t){return o(t)&&"[object Arguments]"==n(t)}},function(t,e){t.exports=function(){return!1}},function(t,e){var r=/^(?:0|[1-9]\d*)$/;t.exports=function(t,e){var n=typeof t;return!!(e=null==e?9007199254740991:e)&&("number"==n||"symbol"!=n&&r.test(t))&&t>-1&&t%1==0&&t<e}},function(t,e,r){var n=r(8),o=r(26),u=r(11),c={};c["[object Float32Array]"]=c["[object Float64Array]"]=c["[object Int8Array]"]=c["[object Int16Array]"]=c["[object Int32Array]"]=c["[object Uint8Array]"]=c["[object Uint8ClampedArray]"]=c["[object Uint16Array]"]=c["[object Uint32Array]"]=!0,c["[object Arguments]"]=c["[object Array]"]=c["[object ArrayBuffer]"]=c["[object Boolean]"]=c["[object DataView]"]=c["[object Date]"]=c["[object Error]"]=c["[object Function]"]=c["[object Map]"]=c["[object Number]"]=c["[object Object]"]=c["[object RegExp]"]=c["[object Set]"]=c["[object String]"]=c["[object WeakMap]"]=!1,t.exports=function(t){return u(t)&&o(t.length)&&!!c[n(t)]}},function(t,e){t.exports=function(t){return function(e){return t(e)}}},function(t,e,r){(function(t){var n=r(18),o=e&&!e.nodeType&&e,u=o&&"object"==typeof t&&t&&!t.nodeType&&t,c=u&&u.exports===o&&n.process,i=function(){try{var t=u&&u.require&&u.require("util").types;return t||c&&c.binding&&c.binding("util")}catch(t){}}();t.exports=i}).call(this,r(24)(t))},function(t,e,r){var n=r(86),o=r(87),u=Object.prototype.hasOwnProperty;t.exports=function(t){if(!n(t))return o(t);var e=[];for(var r in Object(t))u.call(t,r)&&"constructor"!=r&&e.push(r);return e}},function(t,e){var r=Object.prototype;t.exports=function(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||r)}},function(t,e,r){var n=r(88)(Object.keys,Object);t.exports=n},function(t,e){t.exports=function(t,e){return function(r){return t(e(r))}}},function(t,e,r){var n=r(17),o=r(26);t.exports=function(t){return null!=t&&o(t.length)&&!n(t)}},function(t,e,r){var n=r(91),o=r(13),u=r(92),c=r(93),i=r(94),a=r(8),f=r(20),s=f(n),p=f(o),l=f(u),d=f(c),b=f(i),y=a;(n&&"[object DataView]"!=y(new n(new ArrayBuffer(1)))||o&&"[object Map]"!=y(new o)||u&&"[object Promise]"!=y(u.resolve())||c&&"[object Set]"!=y(new c)||i&&"[object WeakMap]"!=y(new i))&&(y=function(t){var e=a(t),r="[object Object]"==e?t.constructor:void 0,n=r?f(r):"";if(n)switch(n){case s:return"[object DataView]";case p:return"[object Map]";case l:return"[object Promise]";case d:return"[object Set]";case b:return"[object WeakMap]"}return e}),t.exports=y},function(t,e,r){var n=r(3)(r(2),"DataView");t.exports=n},function(t,e,r){var n=r(3)(r(2),"Promise");t.exports=n},function(t,e,r){var n=r(3)(r(2),"Set");t.exports=n},function(t,e,r){var n=r(3)(r(2),"WeakMap");t.exports=n},function(t,e,r){"use strict";r.r(e);var n={};r.r(n),r.d(n,"initialize",(function(){return O})),r.d(n,"update",(function(){return h})),r.d(n,"updateBatch",(function(){return j})),r.d(n,"reset",(function(){return g})),r.d(n,"resetPristine",(function(){return P})),r.d(n,"resetPristineKey",(function(){return w})),r.d(n,"startFetch",(function(){return m})),r.d(n,"doneFetch",(function(){return x})),r.d(n,"failFetch",(function(){return _})),r.d(n,"startProcess",(function(){return S})),r.d(n,"doneProcess",(function(){return R})),r.d(n,"removeResource",(function(){return D}));var o={};r.r(o),r.d(o,"initialize",(function(){return I})),r.d(o,"update",(function(){return k})),r.d(o,"updateBatch",(function(){return C})),r.d(o,"updateOnChange",(function(){return z})),r.d(o,"reset",(function(){return F})),r.d(o,"resetPristine",(function(){return M})),r.d(o,"resetPristineKey",(function(){return T})),r.d(o,"startFetch",(function(){return B})),r.d(o,"doneFetch",(function(){return K})),r.d(o,"failFetch",(function(){return U})),r.d(o,"startProcess",(function(){return L})),r.d(o,"doneProcess",(function(){return $}));var u={};r.r(u),r.d(u,"initializeResource",(function(){return St})),r.d(u,"updateResource",(function(){return Rt})),r.d(u,"updateBatchResource",(function(){return Dt})),r.d(u,"removeResource",(function(){return At})),r.d(u,"resetResource",(function(){return Et})),r.d(u,"resetPristineResource",(function(){return It})),r.d(u,"resetPristineKeyResource",(function(){return kt})),r.d(u,"startFetchResource",(function(){return Ct})),r.d(u,"doneFetchResource",(function(){return zt})),r.d(u,"failFetchResource",(function(){return Ft})),r.d(u,"startProcessResource",(function(){return Mt})),r.d(u,"doneProcessResource",(function(){return Tt}));var c={};function i(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function a(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t)){var r=[],n=!0,o=!1,u=void 0;try{for(var c,i=t[Symbol.iterator]();!(n=(c=i.next()).done)&&(r.push(c.value),!e||r.length!==e);n=!0);}catch(t){o=!0,u=t}finally{try{n||null==i.return||i.return()}finally{if(o)throw u}}return r}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}r.r(c),r.d(c,"initializeResource",(function(){return Bt})),r.d(c,"updateResource",(function(){return Kt})),r.d(c,"updateBatchResource",(function(){return Ut})),r.d(c,"updateOnChangeResource",(function(){return Lt})),r.d(c,"removeResource",(function(){return $t})),r.d(c,"resetResource",(function(){return qt})),r.d(c,"resetPristineResource",(function(){return Nt})),r.d(c,"resetPristineKeyResource",(function(){return Vt})),r.d(c,"startFetchResource",(function(){return Wt})),r.d(c,"doneFetchResource",(function(){return Ht})),r.d(c,"failFetchResource",(function(){return Gt})),r.d(c,"startProcessResource",(function(){return Jt})),r.d(c,"doneProcessResource",(function(){return Qt}));var f=r(0),s=r.n(f);function p(t){return function(t){if(Array.isArray(t)){for(var e=0,r=new Array(t.length);e<t.length;e++)r[e]=t[e];return r}}(t)||function(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}var l=r(1),d=r.n(l);function b(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}var y=function(t,e,r,n,o){if("function"!=typeof t)return e(t);var u=t.apply(void 0,p(n));return"function"==typeof u?u(e,r,o):e(u)},v=function(t,e){var r=e.initialState,n=e.init,o=void 0===n?d.a:n,u=e.actions,c=void 0===u?{}:u,s=e.extraArgument,p=a(Object(f.useReducer)(t,r,o),2),l=p[0],v=p[1],O=Object(f.useRef)();O.current=l;var h=Object(f.useRef)();if(h.current)return[l,h.current];var j=function(){return O.current};return h.current=Object.keys(c).reduce((function(t,e){return function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?b(Object(r),!0).forEach((function(e){i(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):b(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}({},t,i({},e,(function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return y(c[e],v,j,r,s)})))}),{dispatch:v}),[l,h.current]},O="initialize",h="update",j="updateBatch",g="reset",P="resetPristine",w="resetPristineKey",m="startFetch",x="doneFetch",_="failFetch",S="startProcess",R="doneProcess",D="removeResource";function A(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function E(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?A(Object(r),!0).forEach((function(e){i(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):A(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}var I=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=e.merge;return function(e,n){return e(r?{type:O,values:E({},n(),{},t)}:{type:O,values:t})}},k=function(t,e){return{type:h,attr:t,value:e}},C=function(t){return{type:j,values:t}},z=function(t){var e=t.target;return k(e.name,e.value)},F={type:g},M={type:P},T=function(t){return{type:w,attr:t}},B={type:m},K=function(t){return{type:x,values:t}},U={type:_},L={type:S},$={type:R},q=r(5),N=function(){return[Object(q.createContext)({}),Object(q.createContext)({})]};function V(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}var W=function(t){var e=t.getInitialState,r=t.defaultInitialState;return e&&"function"==typeof e?function(){return function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?V(Object(r),!0).forEach((function(e){i(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):V(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}({},r,{},e())}:function(){return r}},H=r(12),G=r.n(H),J=r(4),Q=r.n(J);function X(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Y(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?X(Object(r),!0).forEach((function(e){i(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):X(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}var Z=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"pristine",e=function(){return i({},t,{})},r=function(e,r){return!!e[t]&&e[t].hasOwnProperty(r)},n=function(e,r){return Y({},e,i({},t,Y({},e[t],i({},r,e[r]))))},o=function(n,o){return o?r(n,o)?(delete n[t][o],Y({},n,i({},t,Y({},n[t])))):n:Y({},n,{},e())};return{updatePristine:function(e,u,c){var i=r(e,u);return i||Q()(c,e[u])?i&&Q()(c,e[t][u])?o(e,u):e:n(e,u)},removePristine:o,getInitialPristineState:e}};function tt(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function et(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?tt(Object(r),!0).forEach((function(e){i(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):tt(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}var rt=function(t,e,r){return Array.isArray(r)?function(t,e,r){return r.reduce((function(e,r){var n=r.attr,o=r.value;return et({},e,{},t(e,n,o))}),e)}(t,e,r):function(t,e,r){return Object.keys(r).reduce((function(e,n){return et({},e,{},t(e,n,r[n]))}),e)}(t,e,r)},nt=function(t){return function(e,r){return t.hasOwnProperty(r.type)?t[r.type](e,r):e}};function ot(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function ut(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?ot(Object(r),!0).forEach((function(e){i(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ot(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}var ct=function(t,e){var r,n=Z("pristine"),o=n.getInitialPristineState,u=n.updatePristine,c=n.removePristine,a=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return ut({},t(),{},e,{},o())},f=function(e,r,n){return n=function(e,r){return G()(r)?t()[e]:r}(r,n),ut({},e=u(e,r,n),i({},r,n))},s=ut((i(r={},O,(function(t,e){return a(e.values)})),i(r,h,(function(t,e){return f(t,e.attr,e.value)})),i(r,j,(function(t,e){return rt(f,t,e.values)})),i(r,g,(function(t,e){return a()})),i(r,P,(function(t,e){return c(t)})),i(r,w,(function(t,e){return c(t,e.attr)})),i(r,S,(function(t,e){return ut({},t,{processing:!0})})),i(r,R,(function(t,e){return ut({},t,{processing:!1})})),i(r,m,(function(t,e){return ut({},t,{loading:!0})})),i(r,x,(function(t,e){return a(ut({},e.values,{loading:!1,loaded:!0}))})),i(r,_,(function(t,e){return ut({},t,{loading:!1})})),r),e);return{reducer:nt(s),init:a}},it=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:d.a,r=Object(f.useRef)();return Object(q.useContextSelector)(t,(function(t){var n=e(t);return Q()(r.current,n)||(r.current=n),r.current}))},at=function(t){return function(e){return e.byId[t]}},ft=function(t,e){return{useSelector:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:d.a;return it(t,e)},useResourceSelector:function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:d.a,n=Object(f.useCallback)((function(t){return r(at(e)(t))}),[e]);return it(t,n)},useAction:function(t){var r=Object(f.useMemo)((function(){return t?function(e){return e[t]}:d.a}),[t]);return it(e,r)}}};function st(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}var pt=function(t){return function(e){return t?e.updateResource:e.update}},lt=function(t,e){return function(r){var n=r.fieldKey,o=r.resourceId,u=r.getUpdate,c=void 0===u?pt:u,s=r.select,p=void 0===s?o?at:d.a:s,l=Object(f.useCallback)((function(t){var e=o?p(o)(t):p(t);return[e[n],e.errors]}),[o,n]),b=a(it(t,l),2),y=b[0],v=b[1],O=Object(f.useCallback)((function(t){var e=c(o)(t);if("function"!=typeof e)throw new Error("useMember expects an 'update' dispatch function");return o?function(t,r){return e(o,t,r)}:e}),[o]),h=it(e,O);return[y,Object(f.useCallback)((function(t){return h(n,t)}),[h,n]),v[n],Object(f.useCallback)((function(t){return h("errors",function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?st(Object(r),!0).forEach((function(e){i(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):st(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}({},v,i({},n,t)))}),[h,v])]}},dt=function(t,e){var r=lt(t,e);return function(t){var e=t.fieldKey,n=t.resourceId,o=t.uniq,u=t.getUpdate,c=t.select,i=a(r({fieldKey:e,resourceId:n,getUpdate:u,select:c}),4),s=i[0],l=i[1],b=i[2],y=i[3],v=function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return t?function(t){return p(new Set(t))}:d.a}(o),O=Object(f.useCallback)((function(t){t<0||t>=s.length||l(v([].concat(p(s.slice(0,t)),p(s.slice(t+1)))))}),[s]),h=Object(f.useCallback)((function(t,e){t<0||t>=s.length||l(v([].concat(p(s.slice(0,t)),[e],p(s.slice(t+1)))))}),[s]),j=Object(f.useCallback)((function(t,e){t<0||l(v([].concat(p(s.slice(0,t)),[e],p(s.slice(t)))))}),[s]),g=Object(f.useCallback)((function(t){return j(s.length,t)}),[s]),P=Object(f.useCallback)((function(t,e){if(!(t<0||t>=s.length||e<0||e>=s.length)){var r=p(s),n=a(r.splice(t,1),1)[0];r.splice(e,0,n),l(v(r))}}),[s]);return{collection:s,set:l,add:j,push:g,edit:h,remove:O,reorder:P,error:b,setError:y}}};function bt(){return(bt=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t}).apply(this,arguments)}function yt(t,e){if(null==t)return{};var r,n,o=function(t,e){if(null==t)return{};var r,n,o={},u=Object.keys(t);for(n=0;n<u.length;n++)r=u[n],e.indexOf(r)>=0||(o[r]=t[r]);return o}(t,e);if(Object.getOwnPropertySymbols){var u=Object.getOwnPropertySymbols(t);for(n=0;n<u.length;n++)r=u[n],e.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(o[r]=t[r])}return o}var vt=function(t){return t.target.value},Ot=function(t){return t.target.checked},ht=function(t){var e=function(e){var r=e.Component,n=void 0===r?"input":r,o=e.fieldKey,u=e.select,c=e.resourceId,p=(e.getUpdate,e.onChange),l=void 0===p?d.a:p,b=yt(e,["Component","fieldKey","select","resourceId","getUpdate","onChange"]),y=a(t({fieldKey:o,select:u,resourceId:c}),3),v=y[0],O=y[1],h=y[2],j=function(){return O(l.apply(void 0,arguments))};return Object(f.useMemo)((function(){return s.a.createElement(n,bt(i({name:o,"data-testid":o,onChange:j,value:v,error:h},"name",o),b))}),[v,h,b.options])};return{Select:function(t){var r=t.Component,n=void 0===r?"select":r,o=t.onChange,u=void 0===o?vt:o,c=t.options,i=void 0===c?[]:c,a=yt(t,["Component","onChange","options"]);return s.a.createElement(e,bt({Component:n,onChange:u,options:i},a))},Checkbox:function(t){var r=t.type,n=void 0===r?"checkbox":r,o=t.onChange,u=void 0===o?Ot:o,c=yt(t,["type","onChange"]);return s.a.createElement(e,bt({type:n,onChange:u},c))},Input:function(t){var r=t.onChange,n=void 0===r?vt:r,o=yt(t,["onChange"]);return s.a.createElement(e,bt({type:"text",onChange:n},o))}}},jt=function(t,e){return{useSelector:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:d.a;return it(t,e)},useAction:function(t){var r=Object(f.useMemo)((function(){return t?function(e){return e[t]}:d.a}),[t]);return it(e,r)}}},gt={loading:!0,loaded:!1,processing:!1,errors:{}};function Pt(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function wt(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Pt(Object(r),!0).forEach((function(e){i(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Pt(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}var mt=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=e.getInitialState,n=e.reducer,u=e.actions,c=W({getInitialState:r,defaultInitialState:gt}),i=ct(c,n),f=i.reducer,p=i.init,l=N(),d=a(l,2),b=d[0],y=d[1],O=lt(b,y),h=dt(b,y),j=ht(O),g=jt(b,y),P=g.useSelector,w=g.useAction,m=function(t){var e=t.children,r=t.initialState,n=t.extraArgument,c=a(v(f,{initialState:r,init:p,actions:wt({},o,{},u),extraArgument:n}),2),i=c[0],l=c[1];return s.a.createElement(y.Provider,{value:l},s.a.createElement(b.Provider,{value:i},e))};return m.displayName=t,{Provider:m,useMember:O,useCollection:h,useSelector:P,useAction:w,Field:j}},xt={loading:!0,loaded:!1,processing:!1,byId:{},ids:[]},_t={loading:!0,loaded:!1,processing:!1,errors:{}},St="initializeResource",Rt="updateResource",Dt="updateBatchResource",At="removeResource",Et="resetResource",It="resetPristineResource",kt="resetPristineKeyResource",Ct="startFetchResource",zt="doneFetchResource",Ft="failFetchResource",Mt="startProcessResource",Tt="doneProcessResource",Bt=function(t,e){return{type:St,id:t,values:e}},Kt=function(t,e,r){return{type:Rt,id:t,attr:e,value:r}},Ut=function(t,e){return{type:Dt,id:t,values:e}},Lt=function(t,e){var r=e.target;return Kt(t,r.name,r.value)},$t=function(t){return{type:At,id:t}},qt=function(t){return{type:Et,id:t}},Nt=function(t){return{type:It,id:t}},Vt=function(t,e){return{type:kt,id:t,attr:e}},Wt=function(t){return{type:Ct,id:t}},Ht=function(t,e){return{type:zt,id:t,values:e}},Gt=function(t){return{type:Ft,id:t}},Jt=function(t){return{type:Mt,id:t}},Qt=function(t){return{type:Tt,id:t}};function Xt(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Yt(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Xt(Object(r),!0).forEach((function(e){i(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Xt(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}var Zt=function(t){var e,r=t.getInitialState,n=t.customReducer,o=void 0===n?{}:n,c=t.resourceReducer,a=void 0===c?{}:c,f=t.initResource,s=t.customResourceActionTypes,l=void 0===s?{}:s,d=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Yt({},r(),{},t)},b=function(t,e,r){var n=t.byId[e]||f();return a(n,Yt({id:e},r))},y=function(t,e,r){var n=e.toString(),o=t.byId.hasOwnProperty(n)?t.ids:[].concat(p(t.ids),[n]);return Yt({},t,{byId:Yt({},t.byId,i({},n,b(t,n,{type:Dt,values:r}))),ids:o})},v=function(t,e){var r=e.id,n=yt(e,["id"]),o=b(t,r,n),u=t.byId.hasOwnProperty(r)?t.ids:[].concat(p(t.ids),[r]);return Yt({},t,{byId:Yt({},t.byId,i({},r,o)),ids:u})},P=Yt((i(e={},O,(function(t,e){return d(e.values)})),i(e,h,(function(t,e){return y(t,e.attr,e.value)})),i(e,j,(function(t,e){return rt(y,t,e.values)})),i(e,g,(function(t,e){return d()})),i(e,S,(function(t,e){return Yt({},t,{processing:!0})})),i(e,R,(function(t,e){return Yt({},t,{processing:!1})})),i(e,m,(function(t,e){return Yt({},t,{loading:!0})})),i(e,x,(function(t,e){return function(t,e){var r=[],n=e.reduce((function(e,n){return r.push(n.id),Yt({},e,i({},n.id,b(t,n.id,{type:St,values:n})))}),{});return Yt({},t,{byId:Yt({},t.byId,{},n),ids:p(new Set([].concat(p(t.ids),r))),loading:!1,loaded:!0})}(t,e.values)})),i(e,_,(function(t,e){return Yt({},t,{loading:!1})})),i(e,D,(function(t,e){return function(t,e){var r=Yt({},t.byId);delete r[e];var n=t.ids.filter((function(t){return t!==e}));return Yt({},t,{byId:r,ids:n})}(t,e.id)})),e),Object.keys(Yt({},u,{},l)).reduce((function(t,e){return Yt({},t,i({},e,v))}),{}),{},o);return{reducer:nt(P),init:d}};function te(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function ee(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?te(Object(r),!0).forEach((function(e){i(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):te(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}var re=function(t,e){var r,n=Z("pristine"),o=n.getInitialPristineState,u=n.updatePristine,c=n.removePristine,a=function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return ee({id:e},t(),{},r,{},o())},f=function(e,r,n){return n=function(e,r){return G()(r)?t()[e]:r}(r,n),ee({},e=u(e,r,n),i({},r,n))},s=ee((i(r={},St,(function(t,e){return a(e.id,e.values)})),i(r,Rt,(function(t,e){return f(t,e.attr,e.value)})),i(r,Dt,(function(t,e){return rt(f,t,e.values)})),i(r,Et,(function(t,e){return a(e.id)})),i(r,It,(function(t,e){return c(t)})),i(r,kt,(function(t,e){return c(t,e.attr)})),i(r,Mt,(function(t,e){return ee({},t,{processing:!0})})),i(r,Tt,(function(t,e){return ee({},t,{processing:!1})})),i(r,Ct,(function(t,e){return ee({},t,{loading:!0})})),i(r,zt,(function(t,e){return a(e.id,ee({},e.values,{loading:!1,loaded:!0}))})),i(r,Ft,(function(t,e){return ee({},t,{loading:!1})})),r),e);return{reducer:nt(s),init:a}};function ne(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function oe(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?ne(Object(r),!0).forEach((function(e){i(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ne(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}var ue=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=e.getInitialState,n=e.reducer,u=e.actions,i=e.resourceOptions,f=void 0===i?{}:i,p=W({getInitialState:r,defaultInitialState:xt}),l=W({getInitialState:f.getInitialState,defaultInitialState:_t}),d=re(l,f.reducer),b=d.reducer,y=d.init,O=Zt({getInitialState:p,customReducer:n,resourceReducer:b,customResourceActionTypes:f.actionTypes,initResource:y}),h=O.reducer,j=O.init,g=N(),P=a(g,2),w=P[0],m=P[1],x=dt(w,m),_=lt(w,m),S=ht(_),R=ft(w,m),D=R.useSelector,A=R.useAction,E=R.useResourceSelector,I=function(t){var e=t.children,r=t.initialState,n=t.extraArgument,i=a(v(h,{initialState:r,init:j,actions:oe({},o,{},c,{},u),extraArgument:n}),2),f=i[0],p=i[1];return s.a.createElement(m.Provider,{value:p},s.a.createElement(w.Provider,{value:f},e))};return I.displayName=t,{Provider:I,useCollection:x,useMember:_,useSelector:D,useAction:A,useResourceSelector:E,Field:S}};function ce(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function ie(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?ce(Object(r),!0).forEach((function(e){i(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ce(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}r.d(e,"hoaxActions",(function(){return ae})),r.d(e,"hoaxActionTypes",(function(){return fe})),r.d(e,"makeMemberHoax",(function(){return mt})),r.d(e,"makeCollectionHoax",(function(){return ue}));var ae=ie({},o,{},c),fe=ie({},n,{},u)}])})); |
@@ -137,3 +137,3 @@ import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties"; | ||
var reducer = createReducer(initialState, reducerHandlers); | ||
var reducer = createReducer(reducerHandlers); | ||
return { | ||
@@ -140,0 +140,0 @@ reducer: reducer, |
@@ -38,3 +38,3 @@ import _defineProperty from "@babel/runtime/helpers/esm/defineProperty"; | ||
var reducerHandlers = _objectSpread((_objectSpread3 = {}, _defineProperty(_objectSpread3, actionTypes.initializeResource, function (state, action) { | ||
return init(id, action.values); | ||
return init(action.id, action.values); | ||
}), _defineProperty(_objectSpread3, actionTypes.updateResource, function (state, action) { | ||
@@ -63,3 +63,3 @@ return update(state, action.attr, action.value); | ||
}), _defineProperty(_objectSpread3, actionTypes.doneFetchResource, function (state, action) { | ||
return init(id, _objectSpread({}, action.values, { | ||
return init(action.id, _objectSpread({}, action.values, { | ||
loading: false, | ||
@@ -74,3 +74,3 @@ loaded: true | ||
var reducer = createReducer(initialState, reducerHandlers); | ||
var reducer = createReducer(reducerHandlers); | ||
return { | ||
@@ -77,0 +77,0 @@ reducer: reducer, |
@@ -1,5 +0,3 @@ | ||
export default (function (initialState, handlers) { | ||
return function () { | ||
var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : initialState; | ||
var action = arguments.length > 1 ? arguments[1] : undefined; | ||
export default (function (handlers) { | ||
return function (state, action) { | ||
if (handlers.hasOwnProperty(action.type)) return handlers[action.type](state, action); | ||
@@ -6,0 +4,0 @@ return state; |
@@ -84,3 +84,3 @@ import _defineProperty from "@babel/runtime/helpers/esm/defineProperty"; | ||
var reducer = createReducer(initialState, reducerHandlers); | ||
var reducer = createReducer(reducerHandlers); | ||
return { | ||
@@ -87,0 +87,0 @@ reducer: reducer, |
@@ -152,3 +152,3 @@ "use strict"; | ||
var reducer = (0, _createReducer["default"])(initialState, reducerHandlers); | ||
var reducer = (0, _createReducer["default"])(reducerHandlers); | ||
return { | ||
@@ -155,0 +155,0 @@ reducer: reducer, |
@@ -54,3 +54,3 @@ "use strict"; | ||
var reducerHandlers = _objectSpread((_objectSpread3 = {}, (0, _defineProperty2["default"])(_objectSpread3, actionTypes.initializeResource, function (state, action) { | ||
return init(id, action.values); | ||
return init(action.id, action.values); | ||
}), (0, _defineProperty2["default"])(_objectSpread3, actionTypes.updateResource, function (state, action) { | ||
@@ -79,3 +79,3 @@ return update(state, action.attr, action.value); | ||
}), (0, _defineProperty2["default"])(_objectSpread3, actionTypes.doneFetchResource, function (state, action) { | ||
return init(id, _objectSpread({}, action.values, { | ||
return init(action.id, _objectSpread({}, action.values, { | ||
loading: false, | ||
@@ -90,3 +90,3 @@ loaded: true | ||
var reducer = (0, _createReducer["default"])(initialState, reducerHandlers); | ||
var reducer = (0, _createReducer["default"])(reducerHandlers); | ||
return { | ||
@@ -93,0 +93,0 @@ reducer: reducer, |
@@ -8,6 +8,4 @@ "use strict"; | ||
var _default = function _default(initialState, handlers) { | ||
return function () { | ||
var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : initialState; | ||
var action = arguments.length > 1 ? arguments[1] : undefined; | ||
var _default = function _default(handlers) { | ||
return function (state, action) { | ||
if (handlers.hasOwnProperty(action.type)) return handlers[action.type](state, action); | ||
@@ -14,0 +12,0 @@ return state; |
@@ -99,3 +99,3 @@ "use strict"; | ||
var reducer = (0, _createReducer["default"])(initialState, reducerHandlers); | ||
var reducer = (0, _createReducer["default"])(reducerHandlers); | ||
return { | ||
@@ -102,0 +102,0 @@ reducer: reducer, |
{ | ||
"name": "react-hoax", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"description": "Idiomatic resourceful context", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
@@ -138,5 +138,5 @@ import * as actionTypes from "../actionTypes"; | ||
const reducer = createReducer(initialState, reducerHandlers); | ||
const reducer = createReducer(reducerHandlers); | ||
return { reducer, init }; | ||
}; |
@@ -35,3 +35,3 @@ import isNil from "lodash/isNil"; | ||
[actionTypes.initializeResource]: (state, action) => | ||
init(id, action.values), | ||
init(action.id, action.values), | ||
[actionTypes.updateResource]: (state, action) => | ||
@@ -59,3 +59,3 @@ update(state, action.attr, action.value), | ||
[actionTypes.doneFetchResource]: (state, action) => | ||
init(id, { | ||
init(action.id, { | ||
...action.values, | ||
@@ -72,5 +72,5 @@ loading: false, | ||
const reducer = createReducer(initialState, reducerHandlers); | ||
const reducer = createReducer(reducerHandlers); | ||
return { reducer, init }; | ||
}; |
@@ -1,3 +0,3 @@ | ||
export default (initialState, handlers) => { | ||
return (state = initialState, action) => { | ||
export default handlers => { | ||
return (state, action) => { | ||
if (handlers.hasOwnProperty(action.type)) | ||
@@ -4,0 +4,0 @@ return handlers[action.type](state, action); |
@@ -65,5 +65,5 @@ import isNil from "lodash/isNil"; | ||
const reducer = createReducer(initialState, reducerHandlers); | ||
const reducer = createReducer(reducerHandlers); | ||
return { reducer, init }; | ||
}; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
329582
7318