vviinn-widgets 2.4.3 → 2.4.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{app-globals-474864e0.js → app-globals-af9e1c96.js} +1 -1
- package/dist/cjs/cropper-handler.cjs.entry.js +1 -1
- package/dist/cjs/{customized-slots-0aa6c3d6.js → customized-slots-dc70586b.js} +1 -1
- package/dist/cjs/highlight-box_22.cjs.entry.js +4 -4
- package/dist/cjs/{imageSearch.store-076370bf.js → imageSearch.store-e11fb912.js} +1 -1
- package/dist/cjs/{index-61403ab1.js → index-07d3d672.js} +1 -1
- package/dist/cjs/{index-34d20028.js → index-135d1612.js} +14 -1
- package/dist/cjs/{index-a87f1a44.js → index-7e558d0b.js} +1 -1
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/vviinn-carousel_3.cjs.entry.js +15 -19
- package/dist/cjs/vviinn-error.cjs.entry.js +1 -1
- package/dist/cjs/vviinn-preloader.cjs.entry.js +2 -2
- package/dist/cjs/vviinn-recommendations-sidebar.cjs.entry.js +2 -2
- package/dist/cjs/vviinn-vpr-button.cjs.entry.js +2 -2
- package/dist/cjs/vviinn-vps-button.cjs.entry.js +3 -3
- package/dist/cjs/vviinn-vps-widget.cjs.entry.js +11 -7
- package/dist/cjs/vviinn-widgets.cjs.js +2 -2
- package/dist/collection/components/vviinn-product-card/vviinn-product-card.js +4 -12
- package/dist/collection/components/vviinn-vpr-widget/vviinn-vpr-vidget.js +8 -4
- package/dist/collection/components/vviinn-vps-widget/vviinn-vps-widget.js +8 -4
- package/dist/esm/{app-globals-3888cd41.js → app-globals-c988b07f.js} +1 -1
- package/dist/esm/cropper-handler.entry.js +1 -1
- package/dist/esm/{customized-slots-863113e2.js → customized-slots-62974f69.js} +1 -1
- package/dist/esm/highlight-box_22.entry.js +4 -4
- package/dist/esm/{imageSearch.store-b516d12e.js → imageSearch.store-5e2c3094.js} +1 -1
- package/dist/esm/{index-2f8fb0fe.js → index-412e5674.js} +13 -2
- package/dist/esm/{index-56c062df.js → index-4600de03.js} +1 -1
- package/dist/esm/{index-36978848.js → index-d0a661ce.js} +1 -1
- package/dist/esm/loader.js +2 -2
- package/dist/esm/vviinn-carousel_3.entry.js +15 -19
- package/dist/esm/vviinn-error.entry.js +1 -1
- package/dist/esm/vviinn-preloader.entry.js +2 -2
- package/dist/esm/vviinn-recommendations-sidebar.entry.js +2 -2
- package/dist/esm/vviinn-vpr-button.entry.js +2 -2
- package/dist/esm/vviinn-vps-button.entry.js +3 -3
- package/dist/esm/vviinn-vps-widget.entry.js +11 -7
- package/dist/esm/vviinn-widgets.js +2 -2
- package/dist/types/components/vviinn-vpr-widget/vviinn-vpr-vidget.d.ts +1 -1
- package/dist/types/components/vviinn-vps-widget/vviinn-vps-widget.d.ts +1 -1
- package/dist/vviinn-widgets/{p-c853cba8.js → p-11d26656.js} +1 -1
- package/dist/vviinn-widgets/{p-9cc6f0dd.entry.js → p-1bf0bfea.entry.js} +1 -1
- package/dist/vviinn-widgets/p-34d7d8fa.entry.js +1 -0
- package/dist/vviinn-widgets/p-521ba041.entry.js +1 -0
- package/dist/vviinn-widgets/{p-47183c9a.js → p-545ef9fd.js} +1 -1
- package/dist/vviinn-widgets/{p-f9410382.entry.js → p-62060afb.entry.js} +1 -1
- package/dist/vviinn-widgets/{p-0a9cee09.entry.js → p-79de17a4.entry.js} +1 -1
- package/{www/build/p-606ff863.js → dist/vviinn-widgets/p-7ec49ce4.js} +1 -1
- package/dist/vviinn-widgets/{p-2e6ecda7.entry.js → p-8ddb0d28.entry.js} +1 -1
- package/dist/vviinn-widgets/{p-d8d49616.entry.js → p-916817f8.entry.js} +1 -1
- package/{www/build/p-ac0a2989.js → dist/vviinn-widgets/p-9abc276d.js} +1 -1
- package/dist/vviinn-widgets/{p-b547a6d0.entry.js → p-b8932639.entry.js} +1 -1
- package/{www/build/p-535611cd.entry.js → dist/vviinn-widgets/p-c26d41ac.entry.js} +1 -1
- package/{www/build/p-28678772.js → dist/vviinn-widgets/p-d3b98fa3.js} +1 -1
- package/dist/vviinn-widgets/{p-b4caf042.js → p-eff93fbd.js} +1 -1
- package/dist/vviinn-widgets/vviinn-widgets.esm.js +1 -1
- package/package.json +1 -1
- package/www/build/{p-c853cba8.js → p-11d26656.js} +1 -1
- package/www/build/{p-9cc6f0dd.entry.js → p-1bf0bfea.entry.js} +1 -1
- package/www/build/p-34d7d8fa.entry.js +1 -0
- package/www/build/p-521ba041.entry.js +1 -0
- package/www/build/{p-47183c9a.js → p-545ef9fd.js} +1 -1
- package/www/build/{p-f9410382.entry.js → p-62060afb.entry.js} +1 -1
- package/www/build/{p-0a9cee09.entry.js → p-79de17a4.entry.js} +1 -1
- package/{dist/vviinn-widgets/p-606ff863.js → www/build/p-7ec49ce4.js} +1 -1
- package/www/build/p-8bfb73d1.js +1 -0
- package/www/build/{p-2e6ecda7.entry.js → p-8ddb0d28.entry.js} +1 -1
- package/www/build/{p-d8d49616.entry.js → p-916817f8.entry.js} +1 -1
- package/{dist/vviinn-widgets/p-ac0a2989.js → www/build/p-9abc276d.js} +1 -1
- package/www/build/p-a67898be.css +1 -0
- package/www/build/{p-b547a6d0.entry.js → p-b8932639.entry.js} +1 -1
- package/{dist/vviinn-widgets/p-535611cd.entry.js → www/build/p-c26d41ac.entry.js} +1 -1
- package/{dist/vviinn-widgets/p-28678772.js → www/build/p-d3b98fa3.js} +1 -1
- package/www/build/{p-b4caf042.js → p-eff93fbd.js} +1 -1
- package/www/build/vviinn-widgets.esm.js +1 -1
- package/www/index.html +1 -1
- package/dist/vviinn-widgets/p-ad29e9c5.entry.js +0 -1
- package/dist/vviinn-widgets/p-d2097302.entry.js +0 -1
- package/www/build/p-7c313f33.js +0 -125
- package/www/build/p-ad29e9c5.entry.js +0 -1
- package/www/build/p-d2097302.entry.js +0 -1
- package/www/build/p-e0153ae2.css +0 -6
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as n,f as r}from"./p-47183c9a.js";import{t,i as u,l as e,r as o,a as i,b as c,p as f,n as a,s as v,f as d,c as p,d as s,e as l,g as m,H as h,h as I,j as R,k as b}from"./p-f582db5c.js";var U="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function O(n,r,t){return n(t={path:r,exports:{},require:function(){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}()}},t.exports),t.exports}var M=O((function(n,r){function t(n){return n}function u(n){return function(){return n}}function e(n,r,t,u,e,o,i,c,f){switch(arguments.length){case 1:return n;case 2:return function(){return r(n.apply(this,arguments))};case 3:return function(){return t(r(n.apply(this,arguments)))};case 4:return function(){return u(t(r(n.apply(this,arguments))))};case 5:return function(){return e(u(t(r(n.apply(this,arguments)))))};case 6:return function(){return o(e(u(t(r(n.apply(this,arguments))))))};case 7:return function(){return i(o(e(u(t(r(n.apply(this,arguments)))))))};case 8:return function(){return c(i(o(e(u(t(r(n.apply(this,arguments))))))))};case 9:return function(){return f(c(i(o(e(u(t(r(n.apply(this,arguments)))))))))}}}function o(){throw new Error("Called `absurd` function which should be uncallable")}Object.defineProperty(r,"__esModule",{value:!0}),r.getEndomorphismMonoid=r.not=r.SK=r.hole=r.pipe=r.untupled=r.tupled=r.absurd=r.decrement=r.increment=r.tuple=r.flow=r.flip=r.constVoid=r.constUndefined=r.constNull=r.constFalse=r.constTrue=r.constant=r.unsafeCoerce=r.identity=r.apply=r.getRing=r.getSemiring=r.getMonoid=r.getSemigroup=r.getBooleanAlgebra=void 0,r.getBooleanAlgebra=function(n){return function(){return{meet:function(r,t){return function(u){return n.meet(r(u),t(u))}},join:function(r,t){return function(u){return n.join(r(u),t(u))}},zero:function(){return n.zero},one:function(){return n.one},implies:function(r,t){return function(u){return n.implies(r(u),t(u))}},not:function(r){return function(t){return n.not(r(t))}}}}},r.getSemigroup=function(n){return function(){return{concat:function(r,t){return function(u){return n.concat(r(u),t(u))}}}}},r.getMonoid=function(n){var t=r.getSemigroup(n);return function(){return{concat:t().concat,empty:function(){return n.empty}}}},r.getSemiring=function(n){return{add:function(r,t){return function(u){return n.add(r(u),t(u))}},zero:function(){return n.zero},mul:function(r,t){return function(u){return n.mul(r(u),t(u))}},one:function(){return n.one}}},r.getRing=function(n){var t=r.getSemiring(n);return{add:t.add,mul:t.mul,one:t.one,zero:t.zero,sub:function(r,t){return function(u){return n.sub(r(u),t(u))}}}},r.apply=function(n){return function(r){return r(n)}},r.identity=t,r.unsafeCoerce=t,r.constant=u,r.constTrue=u(!0),r.constFalse=u(!1),r.constNull=u(null),r.constUndefined=u(void 0),r.constVoid=r.constUndefined,r.flip=function(n){return function(r,t){return n(t,r)}},r.flow=e,r.tuple=function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return n},r.increment=function(n){return n+1},r.decrement=function(n){return n-1},r.absurd=o,r.tupled=function(n){return function(r){return n.apply(void 0,r)}},r.untupled=function(n){return function(){for(var r=[],t=0;t<arguments.length;t++)r[t]=arguments[t];return n(r)}},r.pipe=function(n,r,t,u,e,o,i,c,f){switch(arguments.length){case 1:return n;case 2:return r(n);case 3:return t(r(n));case 4:return u(t(r(n)));case 5:return e(u(t(r(n))));case 6:return o(e(u(t(r(n)))));case 7:return i(o(e(u(t(r(n))))));case 8:return c(i(o(e(u(t(r(n)))))));case 9:return f(c(i(o(e(u(t(r(n))))))));default:for(var a=arguments[0],v=1;v<arguments.length;v++)a=arguments[v](a);return a}},r.hole=o,r.SK=function(n,r){return r},r.not=function(n){return function(r){return!n(r)}},r.getEndomorphismMonoid=function(){return{concat:function(n,r){return e(n,r)},empty:t}}})),g=O((function(n,r){function t(n,r,u){return function(e){for(var o=Array(u.length+1),i=0;i<u.length;i++)o[i]=u[i];return o[u.length]=e,0===r?n.apply(null,o):t(n,r-1,o)}}Object.defineProperty(r,"__esModule",{value:!0}),r.sequenceS=r.sequenceT=r.getApplySemigroup=r.apS=r.apSecond=r.apFirst=r.ap=void 0,r.ap=function(n,r){return function(t){return function(u){return n.ap(n.map(u,(function(n){return function(t){return r.ap(n,t)}})),t)}}},r.apFirst=function(n){return function(r){return function(t){return n.ap(n.map(t,(function(n){return function(){return n}})),r)}}},r.apSecond=function(n){return function(r){return function(t){return n.ap(n.map(t,(function(){return function(n){return n}})),r)}}},r.apS=function(n){return function(r,t){return function(u){return n.ap(n.map(u,(function(n){return function(t){var u;return Object.assign({},n,((u={})[r]=t,u))}})),t)}}},r.getApplySemigroup=function(n){return function(r){return{concat:function(t,u){return n.ap(n.map(t,(function(n){return function(t){return r.concat(n,t)}})),u)}}}};var u={1:function(n){return[n]},2:function(n){return function(r){return[n,r]}},3:function(n){return function(r){return function(t){return[n,r,t]}}},4:function(n){return function(r){return function(t){return function(u){return[n,r,t,u]}}}},5:function(n){return function(r){return function(t){return function(u){return function(e){return[n,r,t,u,e]}}}}}};function e(n){return u.hasOwnProperty(n)||(u[n]=t(M.tuple,n-1,[])),u[n]}r.sequenceT=function(n){return function(){for(var r=[],t=0;t<arguments.length;t++)r[t]=arguments[t];for(var u=r.length,o=e(u),i=n.map(r[0],o),c=1;c<u;c++)i=n.ap(i,r[c]);return i}},r.sequenceS=function(n){return function(r){for(var u=Object.keys(r),e=u.length,o=function(n){var r=n.length;switch(r){case 1:return function(r){var t;return(t={})[n[0]]=r,t};case 2:return function(r){return function(t){var u;return(u={})[n[0]]=r,u[n[1]]=t,u}};case 3:return function(r){return function(t){return function(u){var e;return(e={})[n[0]]=r,e[n[1]]=t,e[n[2]]=u,e}}};case 4:return function(r){return function(t){return function(u){return function(e){var o;return(o={})[n[0]]=r,o[n[1]]=t,o[n[2]]=u,o[n[3]]=e,o}}}};case 5:return function(r){return function(t){return function(u){return function(e){return function(o){var i;return(i={})[n[0]]=r,i[n[1]]=t,i[n[2]]=u,i[n[3]]=e,i[n[4]]=o,i}}}}};default:return t((function(){for(var t=[],u=0;u<arguments.length;u++)t[u]=arguments[u];for(var e={},o=0;o<r;o++)e[n[o]]=t[o];return e}),r-1,[])}}(u),i=n.map(r[u[0]],o),c=1;c<e;c++)i=n.ap(i,r[u[c]]);return i}}})),j=O((function(n,r){Object.defineProperty(r,"__esModule",{value:!0}),r.bind=r.chainFirst=void 0,r.chainFirst=function(n){return function(r){return function(t){return n.chain(t,(function(t){return n.map(r(t),(function(){return t}))}))}}},r.bind=function(n){return function(r,t){return function(u){return n.chain(u,(function(u){return n.map(t(u),(function(n){var t;return Object.assign({},u,((t={})[r]=n,t))}))}))}}}})),w=O((function(n,r){var t=U&&U.__spreadArray||function(n,r){for(var t=0,u=r.length,e=n.length;t<u;t++,e++)n[e]=r[t];return n};Object.defineProperty(r,"__esModule",{value:!0}),r.fromReadonlyNonEmptyArray=r.has=r.emptyRecord=r.emptyReadonlyArray=r.tail=r.head=r.isNonEmpty=r.singleton=r.right=r.left=r.isRight=r.isLeft=r.some=r.none=r.isSome=r.isNone=void 0,r.isNone=function(n){return"None"===n._tag},r.isSome=function(n){return"Some"===n._tag},r.none={_tag:"None"},r.some=function(n){return{_tag:"Some",value:n}},r.isLeft=function(n){return"Left"===n._tag},r.isRight=function(n){return"Right"===n._tag},r.left=function(n){return{_tag:"Left",left:n}},r.right=function(n){return{_tag:"Right",right:n}},r.singleton=function(n){return[n]},r.isNonEmpty=function(n){return n.length>0},r.head=function(n){return n[0]},r.tail=function(n){return n.slice(1)},r.emptyReadonlyArray=[],r.emptyRecord={},r.has=Object.prototype.hasOwnProperty,r.fromReadonlyNonEmptyArray=function(n){return t([n[0]],n.slice(1))}})),x=O((function(n,r){var t=U&&U.__createBinding||(Object.create?function(n,r,t,u){void 0===u&&(u=t),Object.defineProperty(n,u,{enumerable:!0,get:function(){return r[t]}})}:function(n,r,t,u){void 0===u&&(u=t),n[u]=r[t]}),u=U&&U.__setModuleDefault||(Object.create?function(n,r){Object.defineProperty(n,"default",{enumerable:!0,value:r})}:function(n,r){n.default=r}),e=U&&U.__importStar||function(n){if(n&&n.__esModule)return n;var r={};if(null!=n)for(var e in n)"default"!==e&&Object.prototype.hasOwnProperty.call(n,e)&&t(r,n,e);return u(r,n),r};Object.defineProperty(r,"__esModule",{value:!0}),r.filterOrElse=r.chainEitherK=r.fromEitherK=r.chainOptionK=r.fromOptionK=r.fromPredicate=r.fromOption=void 0;var o=e(w);function i(n){return function(r){return function(t){return n.fromEither(o.isNone(t)?o.left(r()):o.right(t.value))}}}function c(n){var r=i(n);return function(n){var t=r(n);return function(n){return M.flow(n,t)}}}function f(n){return function(r){return M.flow(r,n.fromEither)}}r.fromOption=i,r.fromPredicate=function(n){return function(r,t){return function(u){return n.fromEither(r(u)?o.right(u):o.left(t(u)))}}},r.fromOptionK=c,r.chainOptionK=function(n,r){var t=c(n);return function(n){var u=t(n);return function(n){return function(t){return r.chain(t,u(n))}}}},r.fromEitherK=f,r.chainEitherK=function(n,r){var t=f(n);return function(n){return function(u){return r.chain(u,t(n))}}},r.filterOrElse=function(n,r){return function(t,u){return function(e){return r.chain(e,(function(r){return n.fromEither(t(r)?o.right(r):o.left(u(r)))}))}}}})),y=O((function(n,r){function t(n,r){return function(t){return function(u){return n.map(u,(function(n){return r.map(n,t)}))}}}Object.defineProperty(r,"__esModule",{value:!0}),r.getFunctorComposition=r.bindTo=r.flap=r.map=void 0,r.map=t,r.flap=function(n){return function(r){return function(t){return n.map(t,(function(n){return n(r)}))}}},r.bindTo=function(n){return function(r){return function(t){return n.map(t,(function(n){var t;return(t={})[r]=n,t}))}}},r.getFunctorComposition=function(n,r){var u=t(n,r);return{map:function(n,r){return M.pipe(n,u(r))}}}})),_=O((function(n,r){Object.defineProperty(r,"__esModule",{value:!0}),r.eqDate=r.eqNumber=r.eqString=r.eqBoolean=r.eq=r.strictEqual=r.getStructEq=r.getTupleEq=r.Contravariant=r.getMonoid=r.getSemigroup=r.eqStrict=r.URI=r.contramap=r.tuple=r.struct=r.fromEquals=void 0,r.fromEquals=function(n){return{equals:function(r,t){return r===t||n(r,t)}}},r.struct=function(n){return r.fromEquals((function(r,t){for(var u in n)if(!n[u].equals(r[u],t[u]))return!1;return!0}))},r.tuple=function(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];return r.fromEquals((function(r,t){return n.every((function(n,u){return n.equals(r[u],t[u])}))}))},r.contramap=function(n){return function(t){return r.fromEquals((function(r,u){return t.equals(n(r),n(u))}))}},r.URI="Eq",r.eqStrict={equals:function(n,r){return n===r}};var t={equals:function(){return!0}};r.getSemigroup=function(){return{concat:function(n,t){return r.fromEquals((function(r,u){return n.equals(r,u)&&t.equals(r,u)}))}}},r.getMonoid=function(){return{concat:r.getSemigroup().concat,empty:t}},r.Contravariant={URI:r.URI,contramap:function(n,t){return M.pipe(n,r.contramap(t))}},r.getTupleEq=r.tuple,r.getStructEq=r.struct,r.strictEqual=r.eqStrict.equals,r.eq=r.Contravariant,r.eqBoolean=r.eqStrict,r.eqString=r.eqStrict,r.eqNumber=r.eqStrict,r.eqDate={equals:function(n,r){return n.valueOf()===r.valueOf()}}})),W=O((function(n,r){Object.defineProperty(r,"__esModule",{value:!0}),r.ordDate=r.ordNumber=r.ordString=r.ordBoolean=r.ord=r.getDualOrd=r.getTupleOrd=r.between=r.clamp=r.max=r.min=r.geq=r.leq=r.gt=r.lt=r.equals=r.trivial=r.Contravariant=r.getMonoid=r.getSemigroup=r.URI=r.contramap=r.reverse=r.tuple=r.fromCompare=r.equalsDefault=void 0,r.equalsDefault=function(n){return function(r,t){return r===t||0===n(r,t)}},r.fromCompare=function(n){return{equals:r.equalsDefault(n),compare:function(r,t){return r===t?0:n(r,t)}}},r.tuple=function(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];return r.fromCompare((function(r,t){for(var u=0;u<n.length-1;u++){var e=n[u].compare(r[u],t[u]);if(0!==e)return e}return n[u].compare(r[u],t[u])}))},r.reverse=function(n){return r.fromCompare((function(r,t){return n.compare(t,r)}))},r.contramap=function(n){return function(t){return r.fromCompare((function(r,u){return t.compare(n(r),n(u))}))}},r.URI="Ord",r.getSemigroup=function(){return{concat:function(n,t){return r.fromCompare((function(r,u){var e=n.compare(r,u);return 0!==e?e:t.compare(r,u)}))}}},r.getMonoid=function(){return{concat:r.getSemigroup().concat,empty:r.fromCompare((function(){return 0}))}},r.Contravariant={URI:r.URI,contramap:function(n,t){return M.pipe(n,r.contramap(t))}},r.trivial={equals:M.constTrue,compare:M.constant(0)},r.equals=function(n){return function(r){return function(t){return t===r||0===n.compare(t,r)}}},r.lt=function(n){return function(r,t){return-1===n.compare(r,t)}},r.gt=function(n){return function(r,t){return 1===n.compare(r,t)}},r.leq=function(n){return function(r,t){return 1!==n.compare(r,t)}},r.geq=function(n){return function(r,t){return-1!==n.compare(r,t)}},r.min=function(n){return function(r,t){return r===t||n.compare(r,t)<1?r:t}},r.max=function(n){return function(r,t){return r===t||n.compare(r,t)>-1?r:t}},r.clamp=function(n){var t=r.min(n),u=r.max(n);return function(n,r){return function(e){return u(t(e,r),n)}}},r.between=function(n){var t=r.lt(n),u=r.gt(n);return function(n,r){return function(e){return!t(e,n)&&!u(e,r)}}},r.getTupleOrd=r.tuple,r.getDualOrd=r.reverse,r.ord=r.Contravariant;var t={equals:_.eqStrict.equals,compare:function(n,r){return n<r?-1:n>r?1:0}};r.ordBoolean=t,r.ordString=t,r.ordNumber=t,r.ordDate=M.pipe(r.ordNumber,r.contramap((function(n){return n.valueOf()})))})),E=O((function(n,r){Object.defineProperty(r,"__esModule",{value:!0}),r.concatAll=r.endo=r.filterSecond=r.filterFirst=r.reverse=void 0,r.reverse=function(n){return{concat:function(r,t){return n.concat(t,r)}}},r.filterFirst=function(n){return function(r){return{concat:function(t,u){return n(t)?r.concat(t,u):u}}}},r.filterSecond=function(n){return function(r){return{concat:function(t,u){return n(u)?r.concat(t,u):t}}}},r.endo=function(n){return function(r){return{concat:function(t,u){return r.concat(n(t),n(u))}}}},r.concatAll=function(n){return function(r){return function(t){return t.reduce((function(r,t){return n.concat(r,t)}),r)}}}})),k=O((function(n,r){var t=U&&U.__createBinding||(Object.create?function(n,r,t,u){void 0===u&&(u=t),Object.defineProperty(n,u,{enumerable:!0,get:function(){return r[t]}})}:function(n,r,t,u){void 0===u&&(u=t),n[u]=r[t]}),u=U&&U.__setModuleDefault||(Object.create?function(n,r){Object.defineProperty(n,"default",{enumerable:!0,value:r})}:function(n,r){n.default=r}),e=U&&U.__importStar||function(n){if(n&&n.__esModule)return n;var r={};if(null!=n)for(var e in n)"default"!==e&&Object.prototype.hasOwnProperty.call(n,e)&&t(r,n,e);return u(r,n),r};Object.defineProperty(r,"__esModule",{value:!0}),r.semigroupProduct=r.semigroupSum=r.semigroupString=r.getFunctionSemigroup=r.semigroupAny=r.semigroupAll=r.fold=r.getIntercalateSemigroup=r.getMeetSemigroup=r.getJoinSemigroup=r.getDualSemigroup=r.getStructSemigroup=r.getTupleSemigroup=r.getFirstSemigroup=r.getLastSemigroup=r.getObjectSemigroup=r.semigroupVoid=r.concatAll=r.last=r.first=r.intercalate=r.tuple=r.struct=r.reverse=r.constant=r.max=r.min=void 0;var o=e(w),i=e(E),c=e(W);r.min=function(n){return{concat:c.min(n)}},r.max=function(n){return{concat:c.max(n)}},r.constant=function(n){return{concat:function(){return n}}},r.reverse=i.reverse,r.struct=function(n){return{concat:function(r,t){var u={};for(var e in n)o.has.call(n,e)&&(u[e]=n[e].concat(r[e],t[e]));return u}}},r.tuple=function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return{concat:function(r,t){return n.map((function(n,u){return n.concat(r[u],t[u])}))}}},r.intercalate=function(n){return function(r){return{concat:function(t,u){return r.concat(t,r.concat(n,u))}}}},r.first=function(){return{concat:M.identity}},r.last=function(){return{concat:function(n,r){return r}}},r.concatAll=i.concatAll,r.semigroupVoid=r.constant(void 0),r.getObjectSemigroup=function(){return{concat:function(n,r){return Object.assign({},n,r)}}},r.getLastSemigroup=r.last,r.getFirstSemigroup=r.first,r.getTupleSemigroup=r.tuple,r.getStructSemigroup=r.struct,r.getDualSemigroup=r.reverse,r.getJoinSemigroup=r.max,r.getMeetSemigroup=r.min,r.getIntercalateSemigroup=r.intercalate,r.fold=function(n){var t=r.concatAll(n);return function(n,r){return void 0===r?t(n):t(n)(r)}},r.semigroupAll={concat:function(n,r){return n&&r}},r.semigroupAny={concat:function(n,r){return n||r}},r.getFunctionSemigroup=M.getSemigroup,r.semigroupString={concat:function(n,r){return n+r}},r.semigroupSum={concat:function(n,r){return n+r}},r.semigroupProduct={concat:function(n,r){return n*r}}})),q=O((function(n,r){var t=U&&U.__createBinding||(Object.create?function(n,r,t,u){void 0===u&&(u=t),Object.defineProperty(n,u,{enumerable:!0,get:function(){return r[t]}})}:function(n,r,t,u){void 0===u&&(u=t),n[u]=r[t]}),u=U&&U.__setModuleDefault||(Object.create?function(n,r){Object.defineProperty(n,"default",{enumerable:!0,value:r})}:function(n,r){n.default=r}),e=U&&U.__importStar||function(n){if(n&&n.__esModule)return n;var r={};if(null!=n)for(var e in n)"default"!==e&&Object.prototype.hasOwnProperty.call(n,e)&&t(r,n,e);return u(r,n),r},o=U&&U.__spreadArray||function(n,r){for(var t=0,u=r.length,e=n.length;t<u;t++,e++)n[e]=r[t];return n};Object.defineProperty(r,"__esModule",{value:!0}),r.reduceRight=r.foldMap=r.reduce=r.mapWithIndex=r.map=r.flatten=r.duplicate=r.extend=r.chain=r.ap=r.alt=r.altW=r.of=r.chunksOf=r.splitAt=r.chop=r.chainWithIndex=r.intersperse=r.prependAll=r.unzip=r.zip=r.zipWith=r.modifyAt=r.updateAt=r.sort=r.groupBy=r.group=r.reverse=r.concat=r.concatW=r.fromArray=r.unappend=r.unprepend=r.range=r.replicate=r.makeBy=r.fromReadonlyArray=r.rotate=r.union=r.sortBy=r.uniq=r.unsafeUpdateAt=r.unsafeInsertAt=r.append=r.appendW=r.prepend=r.prependW=r.isOutOfBound=r.isNonEmpty=r.empty=void 0,r.uncons=r.filterWithIndex=r.filter=r.groupSort=r.updateLast=r.modifyLast=r.updateHead=r.modifyHead=r.matchRight=r.matchLeft=r.concatAll=r.max=r.min=r.init=r.last=r.tail=r.head=r.apS=r.bind=r.bindTo=r.Do=r.Comonad=r.Alt=r.TraversableWithIndex=r.Traversable=r.FoldableWithIndex=r.Foldable=r.Monad=r.chainFirst=r.Chain=r.Applicative=r.apSecond=r.apFirst=r.Apply=r.FunctorWithIndex=r.Pointed=r.flap=r.Functor=r.getUnionSemigroup=r.getEq=r.getSemigroup=r.getShow=r.URI=r.extract=r.traverseWithIndex=r.sequence=r.traverse=r.reduceRightWithIndex=r.foldMapWithIndex=r.reduceWithIndex=void 0,r.readonlyNonEmptyArray=r.fold=r.prependToAll=r.insertAt=r.snoc=r.cons=r.unsnoc=void 0;var i=e(w),c=e(k);function f(n){return function(r){return r.concat(n)}}function a(n,r){return r?n.concat(r):function(r){return r.concat(n)}}function v(n){return function(t){var u=t.length;if(0===u)return r.empty;for(var e=[],o=t[0],i=[o],c=1;c<u;c++){var f=t[c];n.equals(f,o)?i.push(f):(e.push(i),i=[o=f])}return e.push(i),e}}r.empty=i.emptyReadonlyArray,r.isNonEmpty=i.isNonEmpty,r.isOutOfBound=function(n,r){return n<0||n>=r.length},r.prependW=function(n){return function(r){return o([n],r)}},r.prepend=r.prependW,r.appendW=function(n){return function(r){return o(o([],r),[n])}},r.append=r.appendW,r.unsafeInsertAt=function(n,t,u){if(r.isNonEmpty(u)){var e=i.fromReadonlyNonEmptyArray(u);return e.splice(n,0,t),e}return[t]},r.unsafeUpdateAt=function(n,r,t){if(t[n]===r)return t;var u=i.fromReadonlyNonEmptyArray(t);return u[n]=r,u},r.uniq=function(n){return function(t){if(1===t.length)return t;for(var u=[r.head(t)],e=function(r){u.every((function(t){return!n.equals(t,r)}))&&u.push(r)},o=0,i=r.tail(t);o<i.length;o++)e(i[o]);return u}},r.sortBy=function(n){if(r.isNonEmpty(n)){var t=W.getMonoid();return r.sort(n.reduce(t.concat,t.empty))}return M.identity},r.union=function(n){var t=r.uniq(n);return function(n){return function(r){return t(M.pipe(r,a(n)))}}},r.rotate=function(n){return function(t){var u=t.length,e=Math.round(n)%u;if(r.isOutOfBound(Math.abs(e),t)||0===e)return t;if(e<0){var o=r.splitAt(-e)(t);return M.pipe(o[1],a(o[0]))}return r.rotate(e-u)(t)}},r.fromReadonlyArray=function(n){return r.isNonEmpty(n)?i.some(n):i.none},r.makeBy=function(n){return function(r){for(var t=Math.max(0,Math.floor(r)),u=[n(0)],e=1;e<t;e++)u.push(n(e));return u}},r.replicate=function(n){return r.makeBy((function(){return n}))},r.range=function(n,t){return n<=t?r.makeBy((function(r){return n+r}))(t-n+1):[n]},r.unprepend=function(n){return[r.head(n),r.tail(n)]},r.unappend=function(n){return[r.init(n),r.last(n)]},r.fromArray=function(n){return r.fromReadonlyArray(n.slice())},r.concatW=f,r.concat=a,r.reverse=function(n){return 1===n.length?n:o([r.last(n)],n.slice(0,-1).reverse())},r.group=v,r.groupBy=function(n){return function(r){for(var t={},u=0,e=r;u<e.length;u++){var o=e[u],i=n(o);t.hasOwnProperty(i)?t[i].push(o):t[i]=[o]}return t}},r.sort=function(n){return function(r){return 1===r.length?r:r.slice().sort(n.compare)}},r.updateAt=function(n,t){return r.modifyAt(n,(function(){return t}))},r.modifyAt=function(n,t){return function(u){return r.isOutOfBound(n,u)?i.none:i.some(r.unsafeUpdateAt(n,t(u[n]),u))}},r.zipWith=function(n,r,t){for(var u=[t(n[0],r[0])],e=Math.min(n.length,r.length),o=1;o<e;o++)u[o]=t(n[o],r[o]);return u},r.zip=function n(t,u){return void 0===u?function(r){return n(r,t)}:r.zipWith(t,u,(function(n,r){return[n,r]}))},r.unzip=function(n){for(var r=[n[0][0]],t=[n[0][1]],u=1;u<n.length;u++)r[u]=n[u][0],t[u]=n[u][1];return[r,t]},r.prependAll=function(n){return function(r){for(var t=[n,r[0]],u=1;u<r.length;u++)t.push(n,r[u]);return t}},r.intersperse=function(n){return function(t){var u=r.tail(t);return r.isNonEmpty(u)?M.pipe(u,r.prependAll(n),r.prepend(r.head(t))):t}},r.chainWithIndex=function(n){return function(t){for(var u=i.fromReadonlyNonEmptyArray(n(0,r.head(t))),e=1;e<t.length;e++)u.push.apply(u,n(e,t[e]));return u}},r.chop=function(n){return function(t){for(var u=n(t),e=[u[0]],o=u[1];r.isNonEmpty(o);){var i=n(o),c=i[1];e.push(i[0]),o=c}return e}},r.splitAt=function(n){return function(t){var u=Math.max(1,n);return u>=t.length?[t,r.empty]:[M.pipe(t.slice(1,u),r.prepend(r.head(t))),t.slice(u)]}},r.chunksOf=function(n){return r.chop(r.splitAt(n))};var d=function(n,t){return M.pipe(n,r.map(t))},p=function(n,t){return M.pipe(n,r.mapWithIndex(t))},s=function(n,t){return M.pipe(n,r.ap(t))},l=function(n,t){return M.pipe(n,r.chain(t))},m=function(n,t){return M.pipe(n,r.extend(t))},h=function(n,t,u){return M.pipe(n,r.reduce(t,u))},I=function(n){var t=r.foldMap(n);return function(n,r){return M.pipe(n,t(r))}},R=function(n,t,u){return M.pipe(n,r.reduceRight(t,u))},b=function(n){var t=r.traverse(n);return function(n,r){return M.pipe(n,t(r))}},O=function(n,t){return M.pipe(n,r.alt(t))},x=function(n,t,u){return M.pipe(n,r.reduceWithIndex(t,u))},E=function(n){var t=r.foldMapWithIndex(n);return function(n,r){return M.pipe(n,t(r))}},q=function(n,t,u){return M.pipe(n,r.reduceRightWithIndex(t,u))},P=function(n){var t=r.traverseWithIndex(n);return function(n,r){return M.pipe(n,t(r))}};r.of=i.singleton,r.altW=function(n){return function(r){return M.pipe(r,f(n()))}},r.alt=r.altW,r.ap=function(n){return r.chain((function(t){return M.pipe(n,r.map(t))}))},r.chain=function(n){return r.chainWithIndex((function(r,t){return n(t)}))},r.extend=function(n){return function(t){for(var u=r.tail(t),e=[n(t)];r.isNonEmpty(u);)e.push(n(u)),u=r.tail(u);return e}},r.duplicate=r.extend(M.identity),r.flatten=r.chain(M.identity),r.map=function(n){return r.mapWithIndex((function(r,t){return n(t)}))},r.mapWithIndex=function(n){return function(t){for(var u=[n(0,r.head(t))],e=1;e<t.length;e++)u.push(n(e,t[e]));return u}},r.reduce=function(n,t){return r.reduceWithIndex(n,(function(n,r,u){return t(r,u)}))},r.foldMap=function(n){return function(r){return function(t){return t.slice(1).reduce((function(t,u){return n.concat(t,r(u))}),r(t[0]))}}},r.reduceRight=function(n,t){return r.reduceRightWithIndex(n,(function(n,r,u){return t(r,u)}))},r.reduceWithIndex=function(n,r){return function(t){return t.reduce((function(n,t,u){return r(u,n,t)}),n)}},r.foldMapWithIndex=function(n){return function(r){return function(t){return t.slice(1).reduce((function(t,u,e){return n.concat(t,r(e+1,u))}),r(0,t[0]))}}},r.reduceRightWithIndex=function(n,r){return function(t){return t.reduceRight((function(n,t,u){return r(u,t,n)}),n)}},r.traverse=function(n){var t=r.traverseWithIndex(n);return function(n){return t((function(r,t){return n(t)}))}},r.sequence=function(n){return r.traverseWithIndex(n)(M.SK)},r.traverseWithIndex=function(n){return function(t){return function(u){for(var e=n.map(t(0,r.head(u)),r.of),o=1;o<u.length;o++)e=n.ap(n.map(e,(function(n){return function(t){return M.pipe(n,r.append(t))}})),t(o,u[o]));return e}}},r.extract=i.head,r.URI="ReadonlyNonEmptyArray",r.getShow=function(n){return{show:function(r){return"["+r.map(n.show).join(", ")+"]"}}},r.getSemigroup=function(){return{concat:a}},r.getEq=function(n){return _.fromEquals((function(r,t){return r.length===t.length&&r.every((function(r,u){return n.equals(r,t[u])}))}))},r.getUnionSemigroup=function(n){var t=r.union(n);return{concat:function(n,r){return t(r)(n)}}},r.Functor={URI:r.URI,map:d},r.flap=y.flap(r.Functor),r.Pointed={URI:r.URI,of:r.of},r.FunctorWithIndex={URI:r.URI,map:d,mapWithIndex:p},r.Apply={URI:r.URI,map:d,ap:s},r.apFirst=g.apFirst(r.Apply),r.apSecond=g.apSecond(r.Apply),r.Applicative={URI:r.URI,map:d,ap:s,of:r.of},r.Chain={URI:r.URI,map:d,ap:s,chain:l},r.chainFirst=j.chainFirst(r.Chain),r.Monad={URI:r.URI,map:d,ap:s,of:r.of,chain:l},r.Foldable={URI:r.URI,reduce:h,foldMap:I,reduceRight:R},r.FoldableWithIndex={URI:r.URI,reduce:h,foldMap:I,reduceRight:R,reduceWithIndex:x,foldMapWithIndex:E,reduceRightWithIndex:q},r.Traversable={URI:r.URI,map:d,reduce:h,foldMap:I,reduceRight:R,traverse:b,sequence:r.sequence},r.TraversableWithIndex={URI:r.URI,map:d,mapWithIndex:p,reduce:h,foldMap:I,reduceRight:R,traverse:b,sequence:r.sequence,reduceWithIndex:x,foldMapWithIndex:E,reduceRightWithIndex:q,traverseWithIndex:P},r.Alt={URI:r.URI,map:d,alt:O},r.Comonad={URI:r.URI,map:d,extend:m,extract:r.extract},r.Do=r.of(i.emptyRecord),r.bindTo=y.bindTo(r.Functor),r.bind=j.bind(r.Chain),r.apS=g.apS(r.Apply),r.head=r.extract,r.tail=i.tail,r.last=function(n){return n[n.length-1]},r.init=function(n){return n.slice(0,-1)},r.min=function(n){var r=c.min(n);return function(n){return n.reduce(r.concat)}},r.max=function(n){var r=c.max(n);return function(n){return n.reduce(r.concat)}},r.concatAll=function(n){return function(r){return r.reduce(n.concat)}},r.matchLeft=function(n){return function(t){return n(r.head(t),r.tail(t))}},r.matchRight=function(n){return function(t){return n(r.init(t),r.last(t))}},r.modifyHead=function(n){return function(t){return o([n(r.head(t))],r.tail(t))}},r.updateHead=function(n){return r.modifyHead((function(){return n}))},r.modifyLast=function(n){return function(t){return M.pipe(r.init(t),r.append(n(r.last(t))))}},r.updateLast=function(n){return r.modifyLast((function(){return n}))},r.groupSort=function(n){var t=r.sort(n),u=v(n);return function(n){return r.isNonEmpty(n)?u(t(n)):r.empty}},r.filter=function(n){return r.filterWithIndex((function(r,t){return n(t)}))},r.filterWithIndex=function(n){return function(t){return r.fromReadonlyArray(t.filter((function(r,t){return n(t,r)})))}},r.uncons=r.unprepend,r.unsnoc=r.unappend,r.cons=function(n,t){return void 0===t?r.prepend(n):M.pipe(t,r.prepend(n))},r.snoc=function(n,r){return M.pipe(n,a([r]))},r.insertAt=function(n,t){return function(u){return n<0||n>u.length?i.none:i.some(r.unsafeInsertAt(n,t,u))}},r.prependToAll=r.prependAll,r.fold=r.concatAll,r.readonlyNonEmptyArray={URI:r.URI,of:r.of,map:d,mapWithIndex:p,ap:s,chain:l,extend:m,extract:r.extract,reduce:h,foldMap:I,reduceRight:R,traverse:b,sequence:r.sequence,reduceWithIndex:x,foldMapWithIndex:E,reduceRightWithIndex:q,traverseWithIndex:P,alt:O}})),P=O((function(n,r){var t=U&&U.__createBinding||(Object.create?function(n,r,t,u){void 0===u&&(u=t),Object.defineProperty(n,u,{enumerable:!0,get:function(){return r[t]}})}:function(n,r,t,u){void 0===u&&(u=t),n[u]=r[t]}),u=U&&U.__setModuleDefault||(Object.create?function(n,r){Object.defineProperty(n,"default",{enumerable:!0,value:r})}:function(n,r){n.default=r}),e=U&&U.__importStar||function(n){if(n&&n.__esModule)return n;var r={};if(null!=n)for(var e in n)"default"!==e&&Object.prototype.hasOwnProperty.call(n,e)&&t(r,n,e);return u(r,n),r},o=U&&U.__spreadArray||function(n,r){for(var t=0,u=r.length,e=n.length;t<u;t++,e++)n[e]=r[t];return n};Object.defineProperty(r,"__esModule",{value:!0}),r.mapWithIndex=r.map=r.flatten=r.duplicate=r.extend=r.chain=r.ap=r.alt=r.altW=r.chunksOf=r.splitAt=r.chop=r.chainWithIndex=r.foldMap=r.foldMapWithIndex=r.intersperse=r.prependAll=r.unzip=r.zip=r.zipWith=r.of=r.copy=r.modifyAt=r.updateAt=r.insertAt=r.sort=r.groupBy=r.group=r.reverse=r.concat=r.concatW=r.unappend=r.unprepend=r.range=r.replicate=r.makeBy=r.fromArray=r.fromReadonlyNonEmptyArray=r.rotate=r.union=r.sortBy=r.uniq=r.unsafeUpdateAt=r.unsafeInsertAt=r.append=r.appendW=r.prepend=r.prependW=r.isOutOfBound=r.isNonEmpty=void 0,r.filterWithIndex=r.filter=r.groupSort=r.updateLast=r.modifyLast=r.updateHead=r.modifyHead=r.matchRight=r.matchLeft=r.concatAll=r.max=r.min=r.init=r.last=r.tail=r.head=r.apS=r.bind=r.bindTo=r.Do=r.Comonad=r.Alt=r.TraversableWithIndex=r.Traversable=r.FoldableWithIndex=r.Foldable=r.Monad=r.chainFirst=r.Chain=r.Applicative=r.apSecond=r.apFirst=r.Apply=r.FunctorWithIndex=r.Pointed=r.flap=r.Functor=r.getUnionSemigroup=r.getEq=r.getSemigroup=r.getShow=r.URI=r.extract=r.traverseWithIndex=r.sequence=r.traverse=r.reduceRightWithIndex=r.reduceRight=r.reduceWithIndex=r.reduce=void 0,r.nonEmptyArray=r.fold=r.prependToAll=r.snoc=r.cons=r.unsnoc=r.uncons=void 0;var i=e(w),c=e(q);function f(n){return function(r){return r.concat(n)}}function a(n,r){return r?n.concat(r):function(r){return r.concat(n)}}function v(n){return function(r){var t=r.length;if(0===t)return[];for(var u=[],e=r[0],o=[e],i=1;i<t;i++){var c=r[i];n.equals(c,e)?o.push(c):(u.push(o),o=[e=c])}return u.push(o),u}}r.isNonEmpty=function(n){return n.length>0},r.isOutOfBound=function(n,r){return n<0||n>=r.length},r.prependW=function(n){return function(r){return o([n],r)}},r.prepend=r.prependW,r.appendW=function(n){return function(r){return o(o([],r),[n])}},r.append=r.appendW,r.unsafeInsertAt=function(n,t,u){if(r.isNonEmpty(u)){var e=r.fromReadonlyNonEmptyArray(u);return e.splice(n,0,t),e}return[t]},r.unsafeUpdateAt=function(n,t,u){var e=r.fromReadonlyNonEmptyArray(u);return e[n]=t,e},r.uniq=function(n){return function(t){if(1===t.length)return r.copy(t);for(var u=[r.head(t)],e=function(r){u.every((function(t){return!n.equals(t,r)}))&&u.push(r)},o=0,i=r.tail(t);o<i.length;o++)e(i[o]);return u}},r.sortBy=function(n){if(r.isNonEmpty(n)){var t=W.getMonoid();return r.sort(n.reduce(t.concat,t.empty))}return r.copy},r.union=function(n){var t=r.uniq(n);return function(n){return function(r){return t(M.pipe(r,a(n)))}}},r.rotate=function(n){return function(t){var u=t.length,e=Math.round(n)%u;if(r.isOutOfBound(Math.abs(e),t)||0===e)return r.copy(t);if(e<0){var o=r.splitAt(-e)(t);return M.pipe(o[1],a(o[0]))}return r.rotate(e-u)(t)}},r.fromReadonlyNonEmptyArray=i.fromReadonlyNonEmptyArray,r.fromArray=function(n){return r.isNonEmpty(n)?i.some(n):i.none},r.makeBy=function(n){return function(r){for(var t=Math.max(0,Math.floor(r)),u=[n(0)],e=1;e<t;e++)u.push(n(e));return u}},r.replicate=function(n){return r.makeBy((function(){return n}))},r.range=function(n,t){return n<=t?r.makeBy((function(r){return n+r}))(t-n+1):[n]},r.unprepend=function(n){return[r.head(n),r.tail(n)]},r.unappend=function(n){return[r.init(n),r.last(n)]},r.concatW=f,r.concat=a,r.reverse=function(n){return o([r.last(n)],n.slice(0,-1).reverse())},r.group=v,r.groupBy=function(n){return function(r){for(var t={},u=0,e=r;u<e.length;u++){var o=e[u],i=n(o);t.hasOwnProperty(i)?t[i].push(o):t[i]=[o]}return t}},r.sort=function(n){return function(r){return r.slice().sort(n.compare)}},r.insertAt=function(n,t){return function(u){return n<0||n>u.length?i.none:i.some(r.unsafeInsertAt(n,t,u))}},r.updateAt=function(n,t){return r.modifyAt(n,(function(){return t}))},r.modifyAt=function(n,t){return function(u){return r.isOutOfBound(n,u)?i.none:i.some(r.unsafeUpdateAt(n,t(u[n]),u))}},r.copy=r.fromReadonlyNonEmptyArray,r.of=function(n){return[n]},r.zipWith=function(n,r,t){for(var u=[t(n[0],r[0])],e=Math.min(n.length,r.length),o=1;o<e;o++)u[o]=t(n[o],r[o]);return u},r.zip=function n(t,u){return void 0===u?function(r){return n(r,t)}:r.zipWith(t,u,(function(n,r){return[n,r]}))},r.unzip=function(n){for(var r=[n[0][0]],t=[n[0][1]],u=1;u<n.length;u++)r[u]=n[u][0],t[u]=n[u][1];return[r,t]},r.prependAll=function(n){return function(r){for(var t=[n,r[0]],u=1;u<r.length;u++)t.push(n,r[u]);return t}},r.intersperse=function(n){return function(t){var u=r.tail(t);return r.isNonEmpty(u)?M.pipe(u,r.prependAll(n),r.prepend(r.head(t))):r.copy(t)}},r.foldMapWithIndex=c.foldMapWithIndex,r.foldMap=c.foldMap,r.chainWithIndex=function(n){return function(t){for(var u=r.fromReadonlyNonEmptyArray(n(0,r.head(t))),e=1;e<t.length;e++)u.push.apply(u,n(e,t[e]));return u}},r.chop=function(n){return function(t){for(var u=n(t),e=[u[0]],o=u[1];r.isNonEmpty(o);){var i=n(o),c=i[1];e.push(i[0]),o=c}return e}},r.splitAt=function(n){return function(t){var u=Math.max(1,n);return u>=t.length?[r.copy(t),[]]:[M.pipe(t.slice(1,u),r.prepend(r.head(t))),t.slice(u)]}},r.chunksOf=function(n){return r.chop(r.splitAt(n))};var d=function(n,t){return M.pipe(n,r.map(t))},p=function(n,t){return M.pipe(n,r.mapWithIndex(t))},s=function(n,t){return M.pipe(n,r.ap(t))},l=function(n,t){return M.pipe(n,r.chain(t))},m=function(n,t){return M.pipe(n,r.extend(t))},h=function(n,t,u){return M.pipe(n,r.reduce(t,u))},I=function(n){var t=r.foldMap(n);return function(n,r){return M.pipe(n,t(r))}},R=function(n,t,u){return M.pipe(n,r.reduceRight(t,u))},b=function(n){var t=r.traverse(n);return function(n,r){return M.pipe(n,t(r))}},O=function(n,t){return M.pipe(n,r.alt(t))},x=function(n,t,u){return M.pipe(n,r.reduceWithIndex(t,u))},_=function(n){var t=r.foldMapWithIndex(n);return function(n,r){return M.pipe(n,t(r))}},E=function(n,t,u){return M.pipe(n,r.reduceRightWithIndex(t,u))},k=function(n){var t=r.traverseWithIndex(n);return function(n,r){return M.pipe(n,t(r))}};r.altW=function(n){return function(r){return M.pipe(r,f(n()))}},r.alt=r.altW,r.ap=function(n){return r.chain((function(t){return M.pipe(n,r.map(t))}))},r.chain=function(n){return r.chainWithIndex((function(r,t){return n(t)}))},r.extend=function(n){return function(t){for(var u=r.tail(t),e=[n(t)];r.isNonEmpty(u);)e.push(n(u)),u=r.tail(u);return e}},r.duplicate=r.extend(M.identity),r.flatten=r.chain(M.identity),r.map=function(n){return r.mapWithIndex((function(r,t){return n(t)}))},r.mapWithIndex=function(n){return function(t){for(var u=[n(0,r.head(t))],e=1;e<t.length;e++)u.push(n(e,t[e]));return u}},r.reduce=c.reduce,r.reduceWithIndex=c.reduceWithIndex,r.reduceRight=c.reduceRight,r.reduceRightWithIndex=c.reduceRightWithIndex,r.traverse=function(n){var t=r.traverseWithIndex(n);return function(n){return t((function(r,t){return n(t)}))}},r.sequence=function(n){return r.traverseWithIndex(n)((function(n,r){return r}))},r.traverseWithIndex=function(n){return function(t){return function(u){for(var e=n.map(t(0,r.head(u)),r.of),o=1;o<u.length;o++)e=n.ap(n.map(e,(function(n){return function(t){return M.pipe(n,r.append(t))}})),t(o,u[o]));return e}}},r.extract=c.head,r.URI="NonEmptyArray",r.getShow=c.getShow,r.getSemigroup=function(){return{concat:a}},r.getEq=c.getEq,r.getUnionSemigroup=function(n){var t=r.union(n);return{concat:function(n,r){return t(r)(n)}}},r.Functor={URI:r.URI,map:d},r.flap=y.flap(r.Functor),r.Pointed={URI:r.URI,of:r.of},r.FunctorWithIndex={URI:r.URI,map:d,mapWithIndex:p},r.Apply={URI:r.URI,map:d,ap:s},r.apFirst=g.apFirst(r.Apply),r.apSecond=g.apSecond(r.Apply),r.Applicative={URI:r.URI,map:d,ap:s,of:r.of},r.Chain={URI:r.URI,map:d,ap:s,chain:l},r.chainFirst=j.chainFirst(r.Chain),r.Monad={URI:r.URI,map:d,ap:s,of:r.of,chain:l},r.Foldable={URI:r.URI,reduce:h,foldMap:I,reduceRight:R},r.FoldableWithIndex={URI:r.URI,reduce:h,foldMap:I,reduceRight:R,reduceWithIndex:x,foldMapWithIndex:_,reduceRightWithIndex:E},r.Traversable={URI:r.URI,map:d,reduce:h,foldMap:I,reduceRight:R,traverse:b,sequence:r.sequence},r.TraversableWithIndex={URI:r.URI,map:d,mapWithIndex:p,reduce:h,foldMap:I,reduceRight:R,traverse:b,sequence:r.sequence,reduceWithIndex:x,foldMapWithIndex:_,reduceRightWithIndex:E,traverseWithIndex:k},r.Alt={URI:r.URI,map:d,alt:O},r.Comonad={URI:r.URI,map:d,extend:m,extract:r.extract},r.Do=r.of(i.emptyRecord),r.bindTo=y.bindTo(r.Functor),r.bind=j.bind(r.Chain),r.apS=g.apS(r.Apply),r.head=c.head,r.tail=function(n){return n.slice(1)},r.last=c.last,r.init=function(n){return n.slice(0,-1)},r.min=c.min,r.max=c.max,r.concatAll=function(n){return function(r){return r.reduce(n.concat)}},r.matchLeft=function(n){return function(t){return n(r.head(t),r.tail(t))}},r.matchRight=function(n){return function(t){return n(r.init(t),r.last(t))}},r.modifyHead=function(n){return function(t){return o([n(r.head(t))],r.tail(t))}},r.updateHead=function(n){return r.modifyHead((function(){return n}))},r.modifyLast=function(n){return function(t){return M.pipe(r.init(t),r.append(n(r.last(t))))}},r.updateLast=function(n){return r.modifyLast((function(){return n}))},r.groupSort=function(n){var t=r.sort(n),u=v(n);return function(n){return r.isNonEmpty(n)?u(t(n)):[]}},r.filter=function(n){return r.filterWithIndex((function(r,t){return n(t)}))},r.filterWithIndex=function(n){return function(t){return r.fromArray(t.filter((function(r,t){return n(t,r)})))}},r.uncons=r.unprepend,r.unsnoc=r.unappend,r.cons=function(n,t){return void 0===t?r.prepend(n):M.pipe(t,r.prepend(n))},r.snoc=function(n,t){return M.pipe(n,r.append(t))},r.prependToAll=r.prependAll,r.fold=c.concatAll,r.nonEmptyArray={URI:r.URI,of:r.of,map:d,mapWithIndex:p,ap:s,chain:l,extend:m,extract:r.extract,reduce:h,foldMap:I,reduceRight:R,traverse:b,sequence:r.sequence,reduceWithIndex:x,foldMapWithIndex:_,reduceRightWithIndex:E,traverseWithIndex:k,alt:O}})),T=O((function(n,r){Object.defineProperty(r,"__esModule",{value:!0}),r.Field=r.MonoidProduct=r.MonoidSum=r.SemigroupProduct=r.SemigroupSum=r.MagmaSub=r.Show=r.Bounded=r.Ord=r.Eq=r.isNumber=void 0,r.isNumber=function(n){return"number"==typeof n},r.Eq={equals:function(n,r){return n===r}},r.Ord={equals:r.Eq.equals,compare:function(n,r){return n<r?-1:n>r?1:0}},r.Bounded={equals:r.Eq.equals,compare:r.Ord.compare,top:1/0,bottom:-1/0},r.Show={show:function(n){return JSON.stringify(n)}},r.MagmaSub={concat:function(n,r){return n-r}},r.SemigroupSum={concat:function(n,r){return n+r}},r.SemigroupProduct={concat:function(n,r){return n*r}},r.MonoidSum={concat:r.SemigroupSum.concat,empty:0},r.MonoidProduct={concat:r.SemigroupProduct.concat,empty:1},r.Field={add:r.SemigroupSum.concat,zero:0,mul:r.SemigroupProduct.concat,one:1,sub:r.MagmaSub.concat,degree:function(){return 1},div:function(n,r){return n/r},mod:function(n,r){return n%r}}})),A=O((function(n,r){Object.defineProperty(r,"__esModule",{value:!0}),r.right=r.left=r.flap=r.Functor=r.Bifunctor=r.URI=r.bimap=r.mapLeft=r.map=r.separated=void 0,r.separated=function(n,r){return{left:n,right:r}},r.map=function(n){return function(t){return r.separated(r.left(t),n(r.right(t)))}},r.mapLeft=function(n){return function(t){return r.separated(n(r.left(t)),r.right(t))}},r.bimap=function(n,t){return function(u){return r.separated(n(r.left(u)),t(r.right(u)))}},r.URI="Separated",r.Bifunctor={URI:r.URI,mapLeft:function(n,t){return M.pipe(n,r.mapLeft(t))},bimap:function(n,t,u){return M.pipe(n,r.bimap(t,u))}},r.Functor={URI:r.URI,map:function(n,t){return M.pipe(n,r.map(t))}},r.flap=y.flap(r.Functor),r.left=function(n){return n.left},r.right=function(n){return n.right}})),z=O((function(n,r){var t=U&&U.__createBinding||(Object.create?function(n,r,t,u){void 0===u&&(u=t),Object.defineProperty(n,u,{enumerable:!0,get:function(){return r[t]}})}:function(n,r,t,u){void 0===u&&(u=t),n[u]=r[t]}),u=U&&U.__setModuleDefault||(Object.create?function(n,r){Object.defineProperty(n,"default",{enumerable:!0,value:r})}:function(n,r){n.default=r}),e=U&&U.__importStar||function(n){if(n&&n.__esModule)return n;var r={};if(null!=n)for(var e in n)"default"!==e&&Object.prototype.hasOwnProperty.call(n,e)&&t(r,n,e);return u(r,n),r};Object.defineProperty(r,"__esModule",{value:!0}),r.filterE=r.witherDefault=r.wiltDefault=void 0;var o=e(w);r.wiltDefault=function(n,r){return function(t){var u=n.traverse(t);return function(n,e){return t.map(u(n,e),r.separate)}}},r.witherDefault=function(n,r){return function(t){var u=n.traverse(t);return function(n,e){return t.map(u(n,e),r.compact)}}},r.filterE=function(n){return function(r){var t=n.wither(r);return function(n){return function(u){return t(u,(function(t){return r.map(n(t),(function(n){return n?o.some(t):o.none}))}))}}}}})),L=O((function(n,r){Object.defineProperty(r,"__esModule",{value:!0}),r.guard=void 0,r.guard=function(n,r){return function(t){return t?r.of(void 0):n.zero()}}})),N=O((function(n,r){var t=U&&U.__createBinding||(Object.create?function(n,r,t,u){void 0===u&&(u=t),Object.defineProperty(n,u,{enumerable:!0,get:function(){return r[t]}})}:function(n,r,t,u){void 0===u&&(u=t),n[u]=r[t]}),u=U&&U.__setModuleDefault||(Object.create?function(n,r){Object.defineProperty(n,"default",{enumerable:!0,value:r})}:function(n,r){n.default=r}),e=U&&U.__importStar||function(n){if(n&&n.__esModule)return n;var r={};if(null!=n)for(var e in n)"default"!==e&&Object.prototype.hasOwnProperty.call(n,e)&&t(r,n,e);return u(r,n),r},o=U&&U.__spreadArray||function(n,r){for(var t=0,u=r.length,e=n.length;t<u;t++,e++)n[e]=r[t];return n};Object.defineProperty(r,"__esModule",{value:!0}),r.sort=r.lefts=r.rights=r.reverse=r.modifyAt=r.deleteAt=r.updateAt=r.insertAt=r.findLastIndex=r.findLastMap=r.findLast=r.findFirstMap=r.findFirst=r.findIndex=r.dropLeftWhile=r.dropRight=r.dropLeft=r.spanLeft=r.takeLeftWhile=r.takeRight=r.takeLeft=r.init=r.tail=r.last=r.head=r.lookup=r.isOutOfBound=r.size=r.scanRight=r.scanLeft=r.chainWithIndex=r.foldRight=r.matchRight=r.matchRightW=r.foldLeft=r.matchLeft=r.matchLeftW=r.match=r.matchW=r.fromEither=r.fromOption=r.fromPredicate=r.replicate=r.makeBy=r.appendW=r.append=r.prependW=r.prepend=r.isNonEmpty=r.isEmpty=void 0,r.sequence=r.traverse=r.reduceRightWithIndex=r.reduceRight=r.reduceWithIndex=r.foldMap=r.reduce=r.foldMapWithIndex=r.duplicate=r.extend=r.filterWithIndex=r.partitionMapWithIndex=r.partitionMap=r.partitionWithIndex=r.partition=r.compact=r.filterMap=r.filterMapWithIndex=r.filter=r.separate=r.mapWithIndex=r.map=r.flatten=r.chain=r.ap=r.alt=r.altW=r.zero=r.of=r._chainRecBreadthFirst=r._chainRecDepthFirst=r.difference=r.intersection=r.union=r.concat=r.concatW=r.comprehension=r.fromOptionK=r.chunksOf=r.splitAt=r.chop=r.sortBy=r.uniq=r.elem=r.rotate=r.intersperse=r.prependAll=r.unzip=r.zip=r.zipWith=void 0,r.toArray=r.unsafeDeleteAt=r.unsafeUpdateAt=r.unsafeInsertAt=r.fromEitherK=r.FromEither=r.filterE=r.Witherable=r.ChainRecBreadthFirst=r.chainRecBreadthFirst=r.ChainRecDepthFirst=r.chainRecDepthFirst=r.TraversableWithIndex=r.Traversable=r.FoldableWithIndex=r.Foldable=r.FilterableWithIndex=r.Filterable=r.Compactable=r.Extend=r.Alternative=r.guard=r.Zero=r.Alt=r.Unfoldable=r.chainFirst=r.Monad=r.Chain=r.Applicative=r.apSecond=r.apFirst=r.Apply=r.FunctorWithIndex=r.Pointed=r.flap=r.Functor=r.getDifferenceMagma=r.getIntersectionSemigroup=r.getUnionMonoid=r.getUnionSemigroup=r.getOrd=r.getEq=r.getMonoid=r.getSemigroup=r.getShow=r.URI=r.unfold=r.wilt=r.wither=r.traverseWithIndex=void 0,r.readonlyArray=r.prependToAll=r.snoc=r.cons=r.range=r.apS=r.bind=r.bindTo=r.Do=r.exists=r.some=r.every=r.empty=r.fromArray=void 0;var i=e(w),c=e(T),f=e(q);r.isEmpty=function(n){return 0===n.length},r.isNonEmpty=f.isNonEmpty,r.prepend=f.prepend,r.prependW=f.prependW,r.append=f.append,r.appendW=f.appendW,r.makeBy=function(n,t){return n<=0?r.empty:f.makeBy(t)(n)},r.replicate=function(n,t){return r.makeBy(n,(function(){return t}))},r.fromPredicate=function(n){return function(t){return n(t)?[t]:r.empty}},r.fromOption=function(n){return i.isNone(n)?r.empty:[n.value]},r.fromEither=function(n){return i.isLeft(n)?r.empty:[n.right]},r.matchW=function(n,t){return function(u){return r.isNonEmpty(u)?t(u):n()}},r.match=r.matchW,r.matchLeftW=function(n,t){return function(u){return r.isNonEmpty(u)?t(f.head(u),f.tail(u)):n()}},r.matchLeft=r.matchLeftW,r.foldLeft=r.matchLeft,r.matchRightW=function(n,t){return function(u){return r.isNonEmpty(u)?t(f.init(u),f.last(u)):n()}},r.matchRight=r.matchRightW,r.foldRight=r.matchRight,r.chainWithIndex=function(n){return function(t){if(r.isEmpty(t))return r.empty;for(var u=[],e=0;e<t.length;e++)u.push.apply(u,n(e,t[e]));return u}},r.scanLeft=function(n,r){return function(t){var u=t.length,e=new Array(u+1);e[0]=n;for(var o=0;o<u;o++)e[o+1]=r(e[o],t[o]);return e}},r.scanRight=function(n,r){return function(t){var u=t.length,e=new Array(u+1);e[u]=n;for(var o=u-1;o>=0;o--)e[o]=r(t[o],e[o+1]);return e}},r.size=function(n){return n.length},r.isOutOfBound=f.isOutOfBound,r.lookup=function n(t,u){return void 0===u?function(r){return n(t,r)}:r.isOutOfBound(t,u)?i.none:i.some(u[t])},r.head=function(n){return r.isNonEmpty(n)?i.some(f.head(n)):i.none},r.last=function(n){return r.isNonEmpty(n)?i.some(f.last(n)):i.none},r.tail=function(n){return r.isNonEmpty(n)?i.some(f.tail(n)):i.none},r.init=function(n){return r.isNonEmpty(n)?i.some(f.init(n)):i.none},r.takeLeft=function(n){return function(t){return r.isOutOfBound(n,t)?t:0===n?r.empty:t.slice(0,n)}},r.takeRight=function(n){return function(t){return r.isOutOfBound(n,t)?t:0===n?r.empty:t.slice(-n)}},r.takeLeftWhile=function(n){return function(t){for(var u=[],e=0,o=t;e<o.length;e++){var i=o[e];if(!n(i))break;u.push(i)}var c=u.length;return c===t.length?t:0===c?r.empty:u}};var a=function(n,r){for(var t=n.length,u=0;u<t&&r(n[u]);u++);return u};function v(n){return function(r,t){if(void 0===t){var u=v(n);return function(n){return u(r,n)}}for(var e=0;e<t.length;e++)if(n.equals(t[e],r))return!0;return!1}}function d(n){var t=f.union(n);return function(u,e){if(void 0===e){var o=d(n);return function(n){return o(n,u)}}return r.isNonEmpty(u)&&r.isNonEmpty(e)?t(e)(u):r.isNonEmpty(u)?u:e}}function p(n){var r=v(n);return function(t,u){if(void 0===u){var e=p(n);return function(n){return e(n,t)}}return t.filter((function(n){return r(n,u)}))}}function s(n){var r=v(n);return function(t,u){if(void 0===u){var e=s(n);return function(n){return e(n,t)}}return t.filter((function(n){return!r(n,u)}))}}r.spanLeft=function(n){return function(t){var u=r.splitAt(a(t,n))(t);return{init:u[0],rest:u[1]}}},r.dropLeft=function(n){return function(t){return n<=0||r.isEmpty(t)?t:n>=t.length?r.empty:t.slice(n,t.length)}},r.dropRight=function(n){return function(t){return n<=0||r.isEmpty(t)?t:n>=t.length?r.empty:t.slice(0,t.length-n)}},r.dropLeftWhile=function(n){return function(t){var u=a(t,n);return 0===u?t:u===t.length?r.empty:t.slice(u)}},r.findIndex=function(n){return function(r){for(var t=0;t<r.length;t++)if(n(r[t]))return i.some(t);return i.none}},r.findFirst=function(n){return function(r){for(var t=0;t<r.length;t++)if(n(r[t]))return i.some(r[t]);return i.none}},r.findFirstMap=function(n){return function(r){for(var t=0;t<r.length;t++){var u=n(r[t]);if(i.isSome(u))return u}return i.none}},r.findLast=function(n){return function(r){for(var t=r.length-1;t>=0;t--)if(n(r[t]))return i.some(r[t]);return i.none}},r.findLastMap=function(n){return function(r){for(var t=r.length-1;t>=0;t--){var u=n(r[t]);if(i.isSome(u))return u}return i.none}},r.findLastIndex=function(n){return function(r){for(var t=r.length-1;t>=0;t--)if(n(r[t]))return i.some(t);return i.none}},r.insertAt=function(n,r){return function(t){return n<0||n>t.length?i.none:i.some(f.unsafeInsertAt(n,r,t))}},r.updateAt=function(n,t){return r.modifyAt(n,(function(){return t}))},r.deleteAt=function(n){return function(t){return r.isOutOfBound(n,t)?i.none:i.some(r.unsafeDeleteAt(n,t))}},r.modifyAt=function(n,t){return function(u){return r.isOutOfBound(n,u)?i.none:i.some(r.unsafeUpdateAt(n,t(u[n]),u))}},r.reverse=function(n){return n.length<=1?n:n.slice().reverse()},r.rights=function(n){for(var r=[],t=0;t<n.length;t++){var u=n[t];"Right"===u._tag&&r.push(u.right)}return r},r.lefts=function(n){for(var r=[],t=0;t<n.length;t++){var u=n[t];"Left"===u._tag&&r.push(u.left)}return r},r.sort=function(n){return function(r){return r.length<=1?r:r.slice().sort(n.compare)}},r.zipWith=function(n,r,t){for(var u=[],e=Math.min(n.length,r.length),o=0;o<e;o++)u[o]=t(n[o],r[o]);return u},r.zip=function n(t,u){return void 0===u?function(r){return n(r,t)}:r.zipWith(t,u,(function(n,r){return[n,r]}))},r.unzip=function(n){for(var r=[],t=[],u=0;u<n.length;u++)r[u]=n[u][0],t[u]=n[u][1];return[r,t]},r.prependAll=function(n){var t=f.prependAll(n);return function(n){return r.isNonEmpty(n)?t(n):n}},r.intersperse=function(n){var t=f.intersperse(n);return function(n){return r.isNonEmpty(n)?t(n):n}},r.rotate=function(n){var t=f.rotate(n);return function(n){return r.isNonEmpty(n)?t(n):n}},r.elem=v,r.uniq=function(n){var t=f.uniq(n);return function(n){return r.isNonEmpty(n)?t(n):n}},r.sortBy=function(n){var t=f.sortBy(n);return function(n){return r.isNonEmpty(n)?t(n):n}},r.chop=function(n){var t=f.chop(n);return function(n){return r.isNonEmpty(n)?t(n):r.empty}},r.splitAt=function(n){return function(t){return n>=1&&r.isNonEmpty(t)?f.splitAt(n)(t):r.isEmpty(t)?[t,r.empty]:[r.empty,t]}},r.chunksOf=function(n){var t=f.chunksOf(n);return function(n){return r.isNonEmpty(n)?t(n):r.empty}},r.fromOptionK=function(n){return function(){for(var t=[],u=0;u<arguments.length;u++)t[u]=arguments[u];return r.fromOption(n.apply(void 0,t))}},r.comprehension=function(n,t,u){void 0===u&&(u=function(){return!0});var e=function(n,o){return r.isNonEmpty(o)?M.pipe(f.head(o),r.chain((function(t){return e(M.pipe(n,r.append(t)),f.tail(o))}))):u.apply(void 0,n)?[t.apply(void 0,n)]:r.empty};return e(r.empty,n)},r.concatW=function(n){return function(t){return r.isEmpty(t)?n:r.isEmpty(n)?t:t.concat(n)}},r.concat=r.concatW,r.union=d,r.intersection=p,r.difference=s;var l=function(n,t){return M.pipe(n,r.map(t))},m=function(n,t){return M.pipe(n,r.mapWithIndex(t))},h=function(n,t){return M.pipe(n,r.ap(t))},I=function(n,t){return M.pipe(n,r.chain(t))},R=function(n,t){return M.pipe(n,r.filter(t))},b=function(n,t){return M.pipe(n,r.filterMap(t))},O=function(n,t){return M.pipe(n,r.partition(t))},E=function(n,t){return M.pipe(n,r.partitionMap(t))},k=function(n,t){return M.pipe(n,r.partitionWithIndex(t))},P=function(n,t){return M.pipe(n,r.partitionMapWithIndex(t))},N=function(n,t){return M.pipe(n,r.alt(t))},C=function(n,t,u){return M.pipe(n,r.reduce(t,u))},S=function(n){var t=r.foldMap(n);return function(n,r){return M.pipe(n,t(r))}},D=function(n,t,u){return M.pipe(n,r.reduceRight(t,u))},F=function(n,t,u){return M.pipe(n,r.reduceWithIndex(t,u))},H=function(n){var t=r.foldMapWithIndex(n);return function(n,r){return M.pipe(n,t(r))}},J=function(n,t,u){return M.pipe(n,r.reduceRightWithIndex(t,u))},$=function(n,t){return M.pipe(n,r.filterMapWithIndex(t))},G=function(n,t){return M.pipe(n,r.filterWithIndex(t))},B=function(n,t){return M.pipe(n,r.extend(t))},K=function(n){var t=r.traverse(n);return function(n,r){return M.pipe(n,t(r))}},Q=function(n){var t=r.traverseWithIndex(n);return function(n,r){return M.pipe(n,t(r))}};r._chainRecDepthFirst=function(n,t){return M.pipe(n,r.chainRecDepthFirst(t))},r._chainRecBreadthFirst=function(n,t){return M.pipe(n,r.chainRecBreadthFirst(t))},r.of=f.of,r.zero=function(){return r.empty},r.altW=function(n){return function(r){return r.concat(n())}},r.alt=r.altW,r.ap=function(n){return r.chain((function(t){return M.pipe(n,r.map(t))}))},r.chain=function(n){return function(t){return M.pipe(t,r.chainWithIndex((function(r,t){return n(t)})))}},r.flatten=r.chain(M.identity),r.map=function(n){return function(r){return r.map((function(r){return n(r)}))}},r.mapWithIndex=function(n){return function(r){return r.map((function(r,t){return n(t,r)}))}},r.separate=function(n){for(var r=[],t=[],u=0,e=n;u<e.length;u++){var o=e[u];"Left"===o._tag?r.push(o.left):t.push(o.right)}return A.separated(r,t)},r.filter=function(n){return function(r){return r.filter(n)}},r.filterMapWithIndex=function(n){return function(r){for(var t=[],u=0;u<r.length;u++){var e=n(u,r[u]);i.isSome(e)&&t.push(e.value)}return t}},r.filterMap=function(n){return r.filterMapWithIndex((function(r,t){return n(t)}))},r.compact=r.filterMap(M.identity),r.partition=function(n){return r.partitionWithIndex((function(r,t){return n(t)}))},r.partitionWithIndex=function(n){return function(r){for(var t=[],u=[],e=0;e<r.length;e++){var o=r[e];n(e,o)?u.push(o):t.push(o)}return A.separated(t,u)}},r.partitionMap=function(n){return r.partitionMapWithIndex((function(r,t){return n(t)}))},r.partitionMapWithIndex=function(n){return function(r){for(var t=[],u=[],e=0;e<r.length;e++){var o=n(e,r[e]);"Left"===o._tag?t.push(o.left):u.push(o.right)}return A.separated(t,u)}},r.filterWithIndex=function(n){return function(r){return r.filter((function(r,t){return n(t,r)}))}},r.extend=function(n){return function(r){return r.map((function(t,u){return n(r.slice(u))}))}},r.duplicate=r.extend(M.identity),r.foldMapWithIndex=function(n){return function(r){return function(t){return t.reduce((function(t,u,e){return n.concat(t,r(e,u))}),n.empty)}}},r.reduce=function(n,t){return r.reduceWithIndex(n,(function(n,r,u){return t(r,u)}))},r.foldMap=function(n){var t=r.foldMapWithIndex(n);return function(n){return t((function(r,t){return n(t)}))}},r.reduceWithIndex=function(n,r){return function(t){for(var u=t.length,e=n,o=0;o<u;o++)e=r(o,e,t[o]);return e}},r.reduceRight=function(n,t){return r.reduceRightWithIndex(n,(function(n,r,u){return t(r,u)}))},r.reduceRightWithIndex=function(n,r){return function(t){return t.reduceRight((function(n,t,u){return r(u,t,n)}),n)}},r.traverse=function(n){var t=r.traverseWithIndex(n);return function(n){return t((function(r,t){return n(t)}))}},r.sequence=function(n){return function(t){return C(t,n.of(r.zero()),(function(t,u){return n.ap(n.map(t,(function(n){return function(t){return M.pipe(n,r.append(t))}})),u)}))}},r.traverseWithIndex=function(n){return function(t){return r.reduceWithIndex(n.of(r.zero()),(function(u,e,o){return n.ap(n.map(e,(function(n){return function(t){return M.pipe(n,r.append(t))}})),t(u,o))}))}},r.wither=function(n){var r=V(n);return function(n){return function(t){return r(t,n)}}},r.wilt=function(n){var r=X(n);return function(n){return function(t){return r(t,n)}}},r.unfold=function(n,r){for(var t=[],u=n;;){var e=r(u);if(!i.isSome(e))break;var o=e.value,c=o[1];t.push(o[0]),u=c}return t},r.URI="ReadonlyArray",r.getShow=function(n){return{show:function(r){return"["+r.map(n.show).join(", ")+"]"}}},r.getSemigroup=function(){return{concat:function(n,t){return r.isEmpty(n)?t:r.isEmpty(t)?n:n.concat(t)}}},r.getMonoid=function(){return{concat:r.getSemigroup().concat,empty:r.empty}},r.getEq=function(n){return _.fromEquals((function(r,t){return r.length===t.length&&r.every((function(r,u){return n.equals(r,t[u])}))}))},r.getOrd=function(n){return W.fromCompare((function(r,t){for(var u=r.length,e=t.length,o=Math.min(u,e),i=0;i<o;i++){var f=n.compare(r[i],t[i]);if(0!==f)return f}return c.Ord.compare(u,e)}))},r.getUnionSemigroup=function(n){var r=d(n);return{concat:function(n,t){return r(t)(n)}}},r.getUnionMonoid=function(n){return{concat:r.getUnionSemigroup(n).concat,empty:r.empty}},r.getIntersectionSemigroup=function(n){var r=p(n);return{concat:function(n,t){return r(t)(n)}}},r.getDifferenceMagma=function(n){var r=s(n);return{concat:function(n,t){return r(t)(n)}}},r.Functor={URI:r.URI,map:l},r.flap=y.flap(r.Functor),r.Pointed={URI:r.URI,of:r.of},r.FunctorWithIndex={URI:r.URI,map:l,mapWithIndex:m},r.Apply={URI:r.URI,map:l,ap:h},r.apFirst=g.apFirst(r.Apply),r.apSecond=g.apSecond(r.Apply),r.Applicative={URI:r.URI,map:l,ap:h,of:r.of},r.Chain={URI:r.URI,map:l,ap:h,chain:I},r.Monad={URI:r.URI,map:l,ap:h,of:r.of,chain:I},r.chainFirst=j.chainFirst(r.Chain),r.Unfoldable={URI:r.URI,unfold:r.unfold},r.Alt={URI:r.URI,map:l,alt:N},r.Zero={URI:r.URI,zero:r.zero},r.guard=L.guard(r.Zero,r.Pointed),r.Alternative={URI:r.URI,map:l,ap:h,of:r.of,alt:N,zero:r.zero},r.Extend={URI:r.URI,map:l,extend:B},r.Compactable={URI:r.URI,compact:r.compact,separate:r.separate},r.Filterable={URI:r.URI,map:l,compact:r.compact,separate:r.separate,filter:R,filterMap:b,partition:O,partitionMap:E},r.FilterableWithIndex={URI:r.URI,map:l,mapWithIndex:m,compact:r.compact,separate:r.separate,filter:R,filterMap:b,partition:O,partitionMap:E,partitionMapWithIndex:P,partitionWithIndex:k,filterMapWithIndex:$,filterWithIndex:G},r.Foldable={URI:r.URI,reduce:C,foldMap:S,reduceRight:D},r.FoldableWithIndex={URI:r.URI,reduce:C,foldMap:S,reduceRight:D,reduceWithIndex:F,foldMapWithIndex:H,reduceRightWithIndex:J},r.Traversable={URI:r.URI,map:l,reduce:C,foldMap:S,reduceRight:D,traverse:K,sequence:r.sequence},r.TraversableWithIndex={URI:r.URI,map:l,mapWithIndex:m,reduce:C,foldMap:S,reduceRight:D,reduceWithIndex:F,foldMapWithIndex:H,reduceRightWithIndex:J,traverse:K,sequence:r.sequence,traverseWithIndex:Q},r.chainRecDepthFirst=function(n){return function(r){for(var t=o([],n(r)),u=[];t.length>0;){var e=t.shift();i.isLeft(e)?t.unshift.apply(t,n(e.left)):u.push(e.right)}return u}},r.ChainRecDepthFirst={URI:r.URI,map:l,ap:h,chain:I,chainRec:r._chainRecDepthFirst},r.chainRecBreadthFirst=function(n){return function(r){var t=n(r),u=[],e=[];function o(r){i.isLeft(r)?n(r.left).forEach((function(n){return u.push(n)})):e.push(r.right)}for(var c=0,f=t;c<f.length;c++)o(f[c]);for(;u.length>0;)o(u.shift());return e}},r.ChainRecBreadthFirst={URI:r.URI,map:l,ap:h,chain:I,chainRec:r._chainRecBreadthFirst};var V=z.witherDefault(r.Traversable,r.Compactable),X=z.wiltDefault(r.Traversable,r.Compactable);r.Witherable={URI:r.URI,map:l,compact:r.compact,separate:r.separate,filter:R,filterMap:b,partition:O,partitionMap:E,reduce:C,foldMap:S,reduceRight:D,traverse:K,sequence:r.sequence,wither:V,wilt:X},r.filterE=z.filterE(r.Witherable),r.FromEither={URI:r.URI,fromEither:r.fromEither},r.fromEitherK=x.fromEitherK(r.FromEither),r.unsafeInsertAt=f.unsafeInsertAt,r.unsafeUpdateAt=function(n,t,u){return r.isNonEmpty(u)?f.unsafeUpdateAt(n,t,u):u},r.unsafeDeleteAt=function(n,r){var t=r.slice();return t.splice(n,1),t},r.toArray=function(n){return n.slice()},r.fromArray=function(n){return r.isEmpty(n)?r.empty:n.slice()},r.empty=f.empty,r.every=function(n){return function(r){return r.every(n)}},r.some=function(n){return function(r){return r.some(n)}},r.exists=r.some,r.Do=r.of(i.emptyRecord),r.bindTo=y.bindTo(r.Functor),r.bind=j.bind(r.Chain),r.apS=g.apS(r.Apply),r.range=f.range,r.cons=f.cons,r.snoc=f.snoc,r.prependToAll=r.prependAll,r.readonlyArray={URI:r.URI,compact:r.compact,separate:r.separate,map:l,ap:h,of:r.of,chain:I,filter:R,filterMap:b,partition:O,partitionMap:E,mapWithIndex:m,partitionMapWithIndex:P,partitionWithIndex:k,filterMapWithIndex:$,filterWithIndex:G,alt:N,zero:r.zero,unfold:r.unfold,reduce:C,foldMap:S,reduceRight:D,traverse:K,sequence:r.sequence,reduceWithIndex:F,foldMapWithIndex:H,reduceRightWithIndex:J,traverseWithIndex:Q,extend:B,wither:V,wilt:X}})),C=O((function(n,r){var t=U&&U.__createBinding||(Object.create?function(n,r,t,u){void 0===u&&(u=t),Object.defineProperty(n,u,{enumerable:!0,get:function(){return r[t]}})}:function(n,r,t,u){void 0===u&&(u=t),n[u]=r[t]}),u=U&&U.__setModuleDefault||(Object.create?function(n,r){Object.defineProperty(n,"default",{enumerable:!0,value:r})}:function(n,r){n.default=r}),e=U&&U.__importStar||function(n){if(n&&n.__esModule)return n;var r={};if(null!=n)for(var e in n)"default"!==e&&Object.prototype.hasOwnProperty.call(n,e)&&t(r,n,e);return u(r,n),r};Object.defineProperty(r,"__esModule",{value:!0}),r.lefts=r.rights=r.reverse=r.modifyAt=r.deleteAt=r.updateAt=r.insertAt=r.copy=r.findLastIndex=r.findLastMap=r.findLast=r.findFirstMap=r.findFirst=r.findIndex=r.dropLeftWhile=r.dropRight=r.dropLeft=r.spanLeft=r.takeLeftWhile=r.takeRight=r.takeLeft=r.init=r.tail=r.last=r.head=r.lookup=r.isOutOfBound=r.size=r.scanRight=r.scanLeft=r.chainWithIndex=r.foldRight=r.matchRight=r.matchRightW=r.foldLeft=r.matchLeft=r.matchLeftW=r.match=r.matchW=r.fromEither=r.fromOption=r.fromPredicate=r.replicate=r.makeBy=r.appendW=r.append=r.prependW=r.prepend=r.isNonEmpty=r.isEmpty=void 0,r.traverseWithIndex=r.sequence=r.traverse=r.reduceRightWithIndex=r.reduceRight=r.reduceWithIndex=r.reduce=r.foldMapWithIndex=r.foldMap=r.duplicate=r.extend=r.filterWithIndex=r.alt=r.altW=r.partitionMapWithIndex=r.partitionMap=r.partitionWithIndex=r.partition=r.filter=r.separate=r.compact=r.filterMap=r.filterMapWithIndex=r.mapWithIndex=r.flatten=r.chain=r.ap=r.map=r.zero=r.of=r.difference=r.intersection=r.union=r.concat=r.concatW=r.comprehension=r.fromOptionK=r.chunksOf=r.splitAt=r.chop=r.sortBy=r.uniq=r.elem=r.rotate=r.intersperse=r.prependAll=r.unzip=r.zip=r.zipWith=r.sort=void 0,r.some=r.every=r.unsafeDeleteAt=r.unsafeUpdateAt=r.unsafeInsertAt=r.fromEitherK=r.FromEither=r.filterE=r.ChainRecBreadthFirst=r.chainRecBreadthFirst=r.ChainRecDepthFirst=r.chainRecDepthFirst=r.Witherable=r.TraversableWithIndex=r.Traversable=r.FoldableWithIndex=r.Foldable=r.FilterableWithIndex=r.Filterable=r.Compactable=r.Extend=r.Alternative=r.guard=r.Zero=r.Alt=r.Unfoldable=r.Monad=r.chainFirst=r.Chain=r.Applicative=r.apSecond=r.apFirst=r.Apply=r.FunctorWithIndex=r.Pointed=r.flap=r.Functor=r.getDifferenceMagma=r.getIntersectionSemigroup=r.getUnionMonoid=r.getUnionSemigroup=r.getOrd=r.getEq=r.getMonoid=r.getSemigroup=r.getShow=r.URI=r.unfold=r.wilt=r.wither=void 0,r.array=r.prependToAll=r.snoc=r.cons=r.empty=r.range=r.apS=r.bind=r.bindTo=r.Do=r.exists=void 0;var o=e(w),i=e(P),c=e(N);r.isEmpty=function(n){return 0===n.length},r.isNonEmpty=i.isNonEmpty,r.prepend=i.prepend,r.prependW=i.prependW,r.append=i.append,r.appendW=i.appendW,r.makeBy=function(n,r){return n<=0?[]:i.makeBy(r)(n)},r.replicate=function(n,t){return r.makeBy(n,(function(){return t}))},r.fromPredicate=function(n){return function(r){return n(r)?[r]:[]}},r.fromOption=function(n){return o.isNone(n)?[]:[n.value]},r.fromEither=function(n){return o.isLeft(n)?[]:[n.right]},r.matchW=function(n,t){return function(u){return r.isNonEmpty(u)?t(u):n()}},r.match=r.matchW,r.matchLeftW=function(n,t){return function(u){return r.isNonEmpty(u)?t(i.head(u),i.tail(u)):n()}},r.matchLeft=r.matchLeftW,r.foldLeft=r.matchLeft,r.matchRightW=function(n,t){return function(u){return r.isNonEmpty(u)?t(i.init(u),i.last(u)):n()}},r.matchRight=r.matchRightW,r.foldRight=r.matchRight,r.chainWithIndex=function(n){return function(r){for(var t=[],u=0;u<r.length;u++)t.push.apply(t,n(u,r[u]));return t}},r.scanLeft=function(n,r){return function(t){var u=t.length,e=new Array(u+1);e[0]=n;for(var o=0;o<u;o++)e[o+1]=r(e[o],t[o]);return e}},r.scanRight=function(n,r){return function(t){var u=t.length,e=new Array(u+1);e[u]=n;for(var o=u-1;o>=0;o--)e[o]=r(t[o],e[o+1]);return e}},r.size=function(n){return n.length},r.isOutOfBound=i.isOutOfBound,r.lookup=c.lookup,r.head=c.head,r.last=c.last,r.tail=function(n){return r.isNonEmpty(n)?o.some(i.tail(n)):o.none},r.init=function(n){return r.isNonEmpty(n)?o.some(i.init(n)):o.none},r.takeLeft=function(n){return function(t){return r.isOutOfBound(n,t)?r.copy(t):t.slice(0,n)}},r.takeRight=function(n){return function(t){return r.isOutOfBound(n,t)?r.copy(t):0===n?[]:t.slice(-n)}},r.takeLeftWhile=function(n){return function(r){for(var t=[],u=0,e=r;u<e.length;u++){var o=e[u];if(!n(o))break;t.push(o)}return t}};var f=function(n,r){for(var t=n.length,u=0;u<t&&r(n[u]);u++);return u};function a(n){var t=i.union(n);return function(u,e){if(void 0===e){var o=a(n);return function(n){return o(n,u)}}return r.isNonEmpty(u)&&r.isNonEmpty(e)?t(e)(u):r.isNonEmpty(u)?r.copy(u):r.copy(e)}}function v(n){var t=r.elem(n);return function(r,u){if(void 0===u){var e=v(n);return function(n){return e(n,r)}}return r.filter((function(n){return t(n,u)}))}}function d(n){var t=r.elem(n);return function(r,u){if(void 0===u){var e=d(n);return function(n){return e(n,r)}}return r.filter((function(n){return!t(n,u)}))}}r.spanLeft=function(n){return function(t){var u=r.splitAt(f(t,n))(t);return{init:u[0],rest:u[1]}}},r.dropLeft=function(n){return function(t){return n<=0||r.isEmpty(t)?r.copy(t):n>=t.length?[]:t.slice(n,t.length)}},r.dropRight=function(n){return function(t){return n<=0||r.isEmpty(t)?r.copy(t):n>=t.length?[]:t.slice(0,t.length-n)}},r.dropLeftWhile=function(n){return function(r){return r.slice(f(r,n))}},r.findIndex=c.findIndex,r.findFirst=function(n){return c.findFirst(n)},r.findFirstMap=c.findFirstMap,r.findLast=function(n){return c.findLast(n)},r.findLastMap=c.findLastMap,r.findLastIndex=c.findLastIndex,r.copy=function(n){return n.slice()},r.insertAt=function(n,t){return function(u){return n<0||n>u.length?o.none:o.some(r.unsafeInsertAt(n,t,u))}},r.updateAt=function(n,t){return r.modifyAt(n,(function(){return t}))},r.deleteAt=function(n){return function(t){return r.isOutOfBound(n,t)?o.none:o.some(r.unsafeDeleteAt(n,t))}},r.modifyAt=function(n,t){return function(u){return r.isOutOfBound(n,u)?o.none:o.some(r.unsafeUpdateAt(n,t(u[n]),u))}},r.reverse=function(n){return r.isEmpty(n)?[]:n.slice().reverse()},r.rights=function(n){for(var r=[],t=0;t<n.length;t++){var u=n[t];"Right"===u._tag&&r.push(u.right)}return r},r.lefts=function(n){for(var r=[],t=0;t<n.length;t++){var u=n[t];"Left"===u._tag&&r.push(u.left)}return r},r.sort=function(n){return function(t){return t.length<=1?r.copy(t):t.slice().sort(n.compare)}},r.zipWith=function(n,r,t){for(var u=[],e=Math.min(n.length,r.length),o=0;o<e;o++)u[o]=t(n[o],r[o]);return u},r.zip=function n(t,u){return void 0===u?function(r){return n(r,t)}:r.zipWith(t,u,(function(n,r){return[n,r]}))},r.unzip=function(n){for(var r=[],t=[],u=0;u<n.length;u++)r[u]=n[u][0],t[u]=n[u][1];return[r,t]},r.prependAll=function(n){var t=i.prependAll(n);return function(n){return r.isNonEmpty(n)?t(n):[]}},r.intersperse=function(n){var t=i.intersperse(n);return function(n){return r.isNonEmpty(n)?t(n):r.copy(n)}},r.rotate=function(n){var t=i.rotate(n);return function(n){return r.isNonEmpty(n)?t(n):r.copy(n)}},r.elem=c.elem,r.uniq=function(n){var t=i.uniq(n);return function(n){return r.isNonEmpty(n)?t(n):r.copy(n)}},r.sortBy=function(n){var t=i.sortBy(n);return function(n){return r.isNonEmpty(n)?t(n):r.copy(n)}},r.chop=function(n){var t=i.chop(n);return function(n){return r.isNonEmpty(n)?t(n):[]}},r.splitAt=function(n){return function(t){return n>=1&&r.isNonEmpty(t)?i.splitAt(n)(t):r.isEmpty(t)?[r.copy(t),[]]:[[],r.copy(t)]}},r.chunksOf=function(n){var t=i.chunksOf(n);return function(n){return r.isNonEmpty(n)?t(n):[]}},r.fromOptionK=function(n){return function(){for(var t=[],u=0;u<arguments.length;u++)t[u]=arguments[u];return r.fromOption(n.apply(void 0,t))}},r.comprehension=function(n,t,u){void 0===u&&(u=function(){return!0});var e=function(n,o){return r.isNonEmpty(o)?M.pipe(i.head(o),r.chain((function(t){return e(M.pipe(n,r.append(t)),i.tail(o))}))):u.apply(void 0,n)?[t.apply(void 0,n)]:[]};return e([],n)},r.concatW=function(n){return function(t){return r.isEmpty(t)?r.copy(n):r.isEmpty(n)?r.copy(t):t.concat(n)}},r.concat=r.concatW,r.union=a,r.intersection=v,r.difference=d;var p=function(n,t){return M.pipe(n,r.map(t))},s=function(n,t){return M.pipe(n,r.mapWithIndex(t))},l=function(n,t){return M.pipe(n,r.ap(t))},m=function(n,t){return M.pipe(n,r.chain(t))},h=function(n,t){return M.pipe(n,r.filter(t))},I=function(n,t){return M.pipe(n,r.filterMap(t))},R=function(n,t){return M.pipe(n,r.partition(t))},b=function(n,t){return M.pipe(n,r.partitionMap(t))},O=function(n,t){return M.pipe(n,r.partitionWithIndex(t))},_=function(n,t){return M.pipe(n,r.partitionMapWithIndex(t))},W=function(n,t){return M.pipe(n,r.alt(t))},E=function(n,t,u){return M.pipe(n,r.reduce(t,u))},k=function(n){var t=r.foldMap(n);return function(n,r){return M.pipe(n,t(r))}},q=function(n,t,u){return M.pipe(n,r.reduceRight(t,u))},T=function(n,t,u){return M.pipe(n,r.reduceWithIndex(t,u))},C=function(n){var t=r.foldMapWithIndex(n);return function(n,r){return M.pipe(n,t(r))}},S=function(n,t,u){return M.pipe(n,r.reduceRightWithIndex(t,u))},D=function(n,t){return M.pipe(n,r.filterMapWithIndex(t))},F=function(n,t){return M.pipe(n,r.filterWithIndex(t))},H=function(n,t){return M.pipe(n,r.extend(t))},J=function(n){var t=r.traverse(n);return function(n,r){return M.pipe(n,t(r))}},$=function(n){var t=r.traverseWithIndex(n);return function(n,r){return M.pipe(n,t(r))}},G=c._chainRecDepthFirst,B=c._chainRecBreadthFirst;r.of=i.of,r.zero=function(){return[]},r.map=function(n){return function(r){return r.map((function(r){return n(r)}))}},r.ap=function(n){return r.chain((function(t){return M.pipe(n,r.map(t))}))},r.chain=function(n){return function(t){return M.pipe(t,r.chainWithIndex((function(r,t){return n(t)})))}},r.flatten=r.chain(M.identity),r.mapWithIndex=function(n){return function(r){return r.map((function(r,t){return n(t,r)}))}},r.filterMapWithIndex=function(n){return function(r){for(var t=[],u=0;u<r.length;u++){var e=n(u,r[u]);o.isSome(e)&&t.push(e.value)}return t}},r.filterMap=function(n){return r.filterMapWithIndex((function(r,t){return n(t)}))},r.compact=r.filterMap(M.identity),r.separate=function(n){for(var r=[],t=[],u=0,e=n;u<e.length;u++){var o=e[u];"Left"===o._tag?r.push(o.left):t.push(o.right)}return A.separated(r,t)},r.filter=function(n){return function(r){return r.filter(n)}},r.partition=function(n){return r.partitionWithIndex((function(r,t){return n(t)}))},r.partitionWithIndex=function(n){return function(r){for(var t=[],u=[],e=0;e<r.length;e++){var o=r[e];n(e,o)?u.push(o):t.push(o)}return A.separated(t,u)}},r.partitionMap=function(n){return r.partitionMapWithIndex((function(r,t){return n(t)}))},r.partitionMapWithIndex=function(n){return function(r){for(var t=[],u=[],e=0;e<r.length;e++){var o=n(e,r[e]);"Left"===o._tag?t.push(o.left):u.push(o.right)}return A.separated(t,u)}},r.altW=function(n){return function(r){return r.concat(n())}},r.alt=r.altW,r.filterWithIndex=function(n){return function(r){return r.filter((function(r,t){return n(t,r)}))}},r.extend=function(n){return function(r){return r.map((function(t,u){return n(r.slice(u))}))}},r.duplicate=r.extend(M.identity),r.foldMap=c.foldMap,r.foldMapWithIndex=c.foldMapWithIndex,r.reduce=c.reduce,r.reduceWithIndex=c.reduceWithIndex,r.reduceRight=c.reduceRight,r.reduceRightWithIndex=c.reduceRightWithIndex,r.traverse=function(n){var t=r.traverseWithIndex(n);return function(n){return t((function(r,t){return n(t)}))}},r.sequence=function(n){return function(t){return E(t,n.of(r.zero()),(function(t,u){return n.ap(n.map(t,(function(n){return function(t){return M.pipe(n,r.append(t))}})),u)}))}},r.traverseWithIndex=function(n){return function(t){return r.reduceWithIndex(n.of(r.zero()),(function(u,e,o){return n.ap(n.map(e,(function(n){return function(t){return M.pipe(n,r.append(t))}})),t(u,o))}))}},r.wither=function(n){var r=K(n);return function(n){return function(t){return r(t,n)}}},r.wilt=function(n){var r=Q(n);return function(n){return function(t){return r(t,n)}}},r.unfold=function(n,r){for(var t=[],u=n;;){var e=r(u);if(!o.isSome(e))break;var i=e.value,c=i[1];t.push(i[0]),u=c}return t},r.URI="Array",r.getShow=c.getShow,r.getSemigroup=function(){return{concat:function(n,r){return n.concat(r)}}},r.getMonoid=function(){return{concat:r.getSemigroup().concat,empty:[]}},r.getEq=c.getEq,r.getOrd=c.getOrd,r.getUnionSemigroup=function(n){var r=a(n);return{concat:function(n,t){return r(t)(n)}}},r.getUnionMonoid=function(n){return{concat:r.getUnionSemigroup(n).concat,empty:[]}},r.getIntersectionSemigroup=function(n){var r=v(n);return{concat:function(n,t){return r(t)(n)}}},r.getDifferenceMagma=function(n){var r=d(n);return{concat:function(n,t){return r(t)(n)}}},r.Functor={URI:r.URI,map:p},r.flap=y.flap(r.Functor),r.Pointed={URI:r.URI,of:r.of},r.FunctorWithIndex={URI:r.URI,map:p,mapWithIndex:s},r.Apply={URI:r.URI,map:p,ap:l},r.apFirst=g.apFirst(r.Apply),r.apSecond=g.apSecond(r.Apply),r.Applicative={URI:r.URI,map:p,ap:l,of:r.of},r.Chain={URI:r.URI,map:p,ap:l,chain:m},r.chainFirst=j.chainFirst(r.Chain),r.Monad={URI:r.URI,map:p,ap:l,of:r.of,chain:m},r.Unfoldable={URI:r.URI,unfold:r.unfold},r.Alt={URI:r.URI,map:p,alt:W},r.Zero={URI:r.URI,zero:r.zero},r.guard=L.guard(r.Zero,r.Pointed),r.Alternative={URI:r.URI,map:p,ap:l,of:r.of,alt:W,zero:r.zero},r.Extend={URI:r.URI,map:p,extend:H},r.Compactable={URI:r.URI,compact:r.compact,separate:r.separate},r.Filterable={URI:r.URI,map:p,compact:r.compact,separate:r.separate,filter:h,filterMap:I,partition:R,partitionMap:b},r.FilterableWithIndex={URI:r.URI,map:p,mapWithIndex:s,compact:r.compact,separate:r.separate,filter:h,filterMap:I,partition:R,partitionMap:b,partitionMapWithIndex:_,partitionWithIndex:O,filterMapWithIndex:D,filterWithIndex:F},r.Foldable={URI:r.URI,reduce:E,foldMap:k,reduceRight:q},r.FoldableWithIndex={URI:r.URI,reduce:E,foldMap:k,reduceRight:q,reduceWithIndex:T,foldMapWithIndex:C,reduceRightWithIndex:S},r.Traversable={URI:r.URI,map:p,reduce:E,foldMap:k,reduceRight:q,traverse:J,sequence:r.sequence},r.TraversableWithIndex={URI:r.URI,map:p,mapWithIndex:s,reduce:E,foldMap:k,reduceRight:q,reduceWithIndex:T,foldMapWithIndex:C,reduceRightWithIndex:S,traverse:J,sequence:r.sequence,traverseWithIndex:$};var K=z.witherDefault(r.Traversable,r.Compactable),Q=z.wiltDefault(r.Traversable,r.Compactable);r.Witherable={URI:r.URI,map:p,compact:r.compact,separate:r.separate,filter:h,filterMap:I,partition:R,partitionMap:b,reduce:E,foldMap:k,reduceRight:q,traverse:J,sequence:r.sequence,wither:K,wilt:Q},r.chainRecDepthFirst=c.chainRecDepthFirst,r.ChainRecDepthFirst={URI:r.URI,map:p,ap:l,chain:m,chainRec:G},r.chainRecBreadthFirst=c.chainRecBreadthFirst,r.ChainRecBreadthFirst={URI:r.URI,map:p,ap:l,chain:m,chainRec:B},r.filterE=z.filterE(r.Witherable),r.FromEither={URI:r.URI,fromEither:r.fromEither},r.fromEitherK=x.fromEitherK(r.FromEither),r.unsafeInsertAt=i.unsafeInsertAt,r.unsafeUpdateAt=function(n,t,u){return r.isNonEmpty(u)?i.unsafeUpdateAt(n,t,u):[]},r.unsafeDeleteAt=function(n,r){var t=r.slice();return t.splice(n,1),t},r.every=c.every,r.some=function(n){return function(r){return r.some(n)}},r.exists=r.some,r.Do=r.of(o.emptyRecord),r.bindTo=y.bindTo(r.Functor),r.bind=j.bind(r.Chain),r.apS=g.apS(r.Apply),r.range=i.range,r.empty=[],r.cons=i.cons,r.snoc=i.snoc,r.prependToAll=r.prependAll,r.array={URI:r.URI,compact:r.compact,separate:r.separate,map:p,ap:l,of:r.of,chain:m,filter:h,filterMap:I,partition:R,partitionMap:b,mapWithIndex:s,partitionMapWithIndex:_,partitionWithIndex:O,filterMapWithIndex:D,filterWithIndex:F,alt:W,zero:r.zero,unfold:r.unfold,reduce:E,foldMap:k,reduceRight:q,traverse:J,sequence:r.sequence,reduceWithIndex:T,foldMapWithIndex:C,reduceRightWithIndex:S,traverseWithIndex:$,extend:H,wither:K,wilt:Q}})),S=O((function(n,r){Object.defineProperty(r,"__esModule",{value:!0}),r.getApplicativeComposition=r.getApplicativeMonoid=void 0,r.getApplicativeMonoid=function(n){var r=g.getApplySemigroup(n);return function(t){return{concat:r(t).concat,empty:n.of(t.empty)}}},r.getApplicativeComposition=function(n,r){var t=y.getFunctorComposition(n,r).map,u=g.ap(n,r);return{map:t,of:function(t){return n.of(r.of(t))},ap:function(n,r){return M.pipe(n,u(r))}}}})),D=O((function(n,r){Object.defineProperty(r,"__esModule",{value:!0}),r.and=r.or=r.not=r.Contravariant=r.getMonoidAll=r.getSemigroupAll=r.getMonoidAny=r.getSemigroupAny=r.URI=r.contramap=void 0,r.contramap=function(n){return function(r){return M.flow(n,r)}},r.URI="Predicate",r.getSemigroupAny=function(){return{concat:function(n,t){return M.pipe(n,r.or(t))}}},r.getMonoidAny=function(){return{concat:r.getSemigroupAny().concat,empty:M.constFalse}},r.getSemigroupAll=function(){return{concat:function(n,t){return M.pipe(n,r.and(t))}}},r.getMonoidAll=function(){return{concat:r.getSemigroupAll().concat,empty:M.constTrue}},r.Contravariant={URI:r.URI,contramap:function(n,t){return M.pipe(n,r.contramap(t))}},r.not=function(n){return function(r){return!n(r)}},r.or=function(n){return function(r){return function(t){return r(t)||n(t)}}},r.and=function(n){return function(r){return function(t){return r(t)&&n(t)}}}})),F=O((function(n,r){var t=U&&U.__createBinding||(Object.create?function(n,r,t,u){void 0===u&&(u=t),Object.defineProperty(n,u,{enumerable:!0,get:function(){return r[t]}})}:function(n,r,t,u){void 0===u&&(u=t),n[u]=r[t]}),u=U&&U.__setModuleDefault||(Object.create?function(n,r){Object.defineProperty(n,"default",{enumerable:!0,value:r})}:function(n,r){n.default=r}),e=U&&U.__importStar||function(n){if(n&&n.__esModule)return n;var r={};if(null!=n)for(var e in n)"default"!==e&&Object.prototype.hasOwnProperty.call(n,e)&&t(r,n,e);return u(r,n),r};Object.defineProperty(r,"__esModule",{value:!0}),r.fromEither=r.MonadThrow=r.throwError=r.Witherable=r.wilt=r.wither=r.Traversable=r.sequence=r.traverse=r.Filterable=r.partitionMap=r.partition=r.filterMap=r.filter=r.Compactable=r.separate=r.compact=r.Extend=r.extend=r.Alternative=r.guard=r.Zero=r.zero=r.Alt=r.alt=r.altW=r.Foldable=r.reduceRight=r.foldMap=r.reduce=r.Monad=r.Chain=r.chain=r.Applicative=r.Apply=r.ap=r.Pointed=r.of=r.Functor=r.map=r.getMonoid=r.getOrd=r.getEq=r.getShow=r.URI=r.getRight=r.getLeft=r.fromPredicate=r.some=r.none=void 0,r.getLastMonoid=r.getFirstMonoid=r.getApplyMonoid=r.getApplySemigroup=r.option=r.mapNullable=r.getRefinement=r.sequenceArray=r.traverseArray=r.traverseArrayWithIndex=r.traverseReadonlyArrayWithIndex=r.traverseReadonlyNonEmptyArrayWithIndex=r.ApT=r.apS=r.bind=r.bindTo=r.Do=r.exists=r.elem=r.toUndefined=r.toNullable=r.chainNullableK=r.fromNullableK=r.tryCatchK=r.tryCatch=r.fromNullable=r.chainEitherK=r.fromEitherK=r.duplicate=r.chainFirst=r.flatten=r.apSecond=r.apFirst=r.flap=r.getOrElse=r.getOrElseW=r.fold=r.match=r.foldW=r.matchW=r.isNone=r.isSome=r.FromEither=void 0;var o=e(w);r.none=o.none,r.some=o.some,r.fromPredicate=function(n){return function(t){return n(t)?r.some(t):r.none}},r.getLeft=function(n){return"Right"===n._tag?r.none:r.some(n.left)},r.getRight=function(n){return"Left"===n._tag?r.none:r.some(n.right)};var i=function(n,t){return M.pipe(n,r.map(t))},c=function(n,t){return M.pipe(n,r.ap(t))},f=function(n,t){return M.pipe(n,r.chain(t))},a=function(n,t,u){return M.pipe(n,r.reduce(t,u))},v=function(n){var t=r.foldMap(n);return function(n,r){return M.pipe(n,t(r))}},d=function(n,t,u){return M.pipe(n,r.reduceRight(t,u))},p=function(n){var t=r.traverse(n);return function(n,r){return M.pipe(n,t(r))}},s=function(n,t){return M.pipe(n,r.alt(t))},l=function(n,t){return M.pipe(n,r.filter(t))},m=function(n,t){return M.pipe(n,r.filterMap(t))},h=function(n,t){return M.pipe(n,r.extend(t))},I=function(n,t){return M.pipe(n,r.partition(t))},R=function(n,t){return M.pipe(n,r.partitionMap(t))};r.URI="Option",r.getShow=function(n){return{show:function(t){return r.isNone(t)?"none":"some("+n.show(t.value)+")"}}},r.getEq=function(n){return{equals:function(t,u){return t===u||(r.isNone(t)?r.isNone(u):!r.isNone(u)&&n.equals(t.value,u.value))}}},r.getOrd=function(n){return{equals:r.getEq(n).equals,compare:function(t,u){return t===u?0:r.isSome(t)?r.isSome(u)?n.compare(t.value,u.value):1:-1}}},r.getMonoid=function(n){return{concat:function(t,u){return r.isNone(t)?u:r.isNone(u)?t:r.some(n.concat(t.value,u.value))},empty:r.none}},r.map=function(n){return function(t){return r.isNone(t)?r.none:r.some(n(t.value))}},r.Functor={URI:r.URI,map:i},r.of=r.some,r.Pointed={URI:r.URI,of:r.of},r.ap=function(n){return function(t){return r.isNone(t)||r.isNone(n)?r.none:r.some(t.value(n.value))}},r.Apply={URI:r.URI,map:i,ap:c},r.Applicative={URI:r.URI,map:i,ap:c,of:r.of},r.chain=function(n){return function(t){return r.isNone(t)?r.none:n(t.value)}},r.Chain={URI:r.URI,map:i,ap:c,chain:f},r.Monad={URI:r.URI,map:i,ap:c,of:r.of,chain:f},r.reduce=function(n,t){return function(u){return r.isNone(u)?n:t(n,u.value)}},r.foldMap=function(n){return function(t){return function(u){return r.isNone(u)?n.empty:t(u.value)}}},r.reduceRight=function(n,t){return function(u){return r.isNone(u)?n:t(u.value,n)}},r.Foldable={URI:r.URI,reduce:a,foldMap:v,reduceRight:d},r.altW=function(n){return function(t){return r.isNone(t)?n():t}},r.alt=r.altW,r.Alt={URI:r.URI,map:i,alt:s},r.zero=function(){return r.none},r.Zero={URI:r.URI,zero:r.zero},r.guard=L.guard(r.Zero,r.Pointed),r.Alternative={URI:r.URI,map:i,ap:c,of:r.of,alt:s,zero:r.zero},r.extend=function(n){return function(t){return r.isNone(t)?r.none:r.some(n(t))}},r.Extend={URI:r.URI,map:i,extend:h},r.compact=r.chain(M.identity);var b=A.separated(r.none,r.none);r.separate=function(n){return r.isNone(n)?b:A.separated(r.getLeft(n.value),r.getRight(n.value))},r.Compactable={URI:r.URI,compact:r.compact,separate:r.separate},r.filter=function(n){return function(t){return r.isNone(t)?r.none:n(t.value)?t:r.none}},r.filterMap=function(n){return function(t){return r.isNone(t)?r.none:n(t.value)}},r.partition=function(n){return function(r){return A.separated(l(r,D.not(n)),l(r,n))}},r.partitionMap=function(n){return M.flow(r.map(n),r.separate)},r.Filterable={URI:r.URI,map:i,compact:r.compact,separate:r.separate,filter:l,filterMap:m,partition:I,partitionMap:R},r.traverse=function(n){return function(t){return function(u){return r.isNone(u)?n.of(r.none):n.map(t(u.value),r.some)}}},r.sequence=function(n){return function(t){return r.isNone(t)?n.of(r.none):n.map(t.value,r.some)}},r.Traversable={URI:r.URI,map:i,reduce:a,foldMap:v,reduceRight:d,traverse:p,sequence:r.sequence};var O=z.witherDefault(r.Traversable,r.Compactable),_=z.wiltDefault(r.Traversable,r.Compactable);r.wither=function(n){var r=O(n);return function(n){return function(t){return r(t,n)}}},r.wilt=function(n){var r=_(n);return function(n){return function(t){return r(t,n)}}},r.Witherable={URI:r.URI,map:i,reduce:a,foldMap:v,reduceRight:d,traverse:p,sequence:r.sequence,compact:r.compact,separate:r.separate,filter:l,filterMap:m,partition:I,partitionMap:R,wither:O,wilt:_},r.throwError=function(){return r.none},r.MonadThrow={URI:r.URI,map:i,ap:c,of:r.of,chain:f,throwError:r.throwError},r.fromEither=r.getRight,r.FromEither={URI:r.URI,fromEither:r.fromEither},r.isSome=o.isSome,r.isNone=function(n){return"None"===n._tag},r.matchW=function(n,t){return function(u){return r.isNone(u)?n():t(u.value)}},r.foldW=r.matchW,r.match=r.matchW,r.fold=r.match,r.getOrElseW=function(n){return function(t){return r.isNone(t)?n():t.value}},r.getOrElse=r.getOrElseW,r.flap=y.flap(r.Functor),r.apFirst=g.apFirst(r.Apply),r.apSecond=g.apSecond(r.Apply),r.flatten=r.compact,r.chainFirst=j.chainFirst(r.Chain),r.duplicate=r.extend(M.identity),r.fromEitherK=x.fromEitherK(r.FromEither),r.chainEitherK=x.chainEitherK(r.FromEither,r.Chain),r.fromNullable=function(n){return null==n?r.none:r.some(n)},r.tryCatch=function(n){try{return r.some(n())}catch(n){return r.none}},r.tryCatchK=function(n){return function(){for(var t=[],u=0;u<arguments.length;u++)t[u]=arguments[u];return r.tryCatch((function(){return n.apply(void 0,t)}))}},r.fromNullableK=function(n){return M.flow(n,r.fromNullable)},r.chainNullableK=function(n){return function(t){return r.isNone(t)?r.none:r.fromNullable(n(t.value))}},r.toNullable=r.match(M.constNull,M.identity),r.toUndefined=r.match(M.constUndefined,M.identity),r.elem=function n(t){return function(u,e){if(void 0===e){var o=n(t);return function(n){return o(u,n)}}return!r.isNone(e)&&t.equals(u,e.value)}},r.exists=function(n){return function(t){return!r.isNone(t)&&n(t.value)}},r.Do=r.of(o.emptyRecord),r.bindTo=y.bindTo(r.Functor),r.bind=j.bind(r.Chain),r.apS=g.apS(r.Apply),r.ApT=r.of(o.emptyReadonlyArray),r.traverseReadonlyNonEmptyArrayWithIndex=function(n){return function(t){var u=n(0,o.head(t));if(r.isNone(u))return r.none;for(var e=[u.value],i=1;i<t.length;i++){var c=n(i,t[i]);if(r.isNone(c))return r.none;e.push(c.value)}return r.some(e)}},r.traverseReadonlyArrayWithIndex=function(n){var t=r.traverseReadonlyNonEmptyArrayWithIndex(n);return function(n){return o.isNonEmpty(n)?t(n):r.ApT}},r.traverseArrayWithIndex=r.traverseReadonlyArrayWithIndex,r.traverseArray=function(n){return r.traverseReadonlyArrayWithIndex((function(r,t){return n(t)}))},r.sequenceArray=r.traverseArray(M.identity),r.getRefinement=function(n){return function(t){return r.isSome(n(t))}},r.mapNullable=r.chainNullableK,r.option={URI:r.URI,map:i,of:r.of,ap:c,chain:f,reduce:a,foldMap:v,reduceRight:d,traverse:p,sequence:r.sequence,zero:r.zero,alt:s,extend:h,compact:r.compact,separate:r.separate,filter:l,filterMap:m,partition:I,partitionMap:R,wither:O,wilt:_,throwError:r.throwError},r.getApplySemigroup=g.getApplySemigroup(r.Apply),r.getApplyMonoid=S.getApplicativeMonoid(r.Applicative),r.getFirstMonoid=function(){return r.getMonoid(k.first())},r.getLastMonoid=function(){return r.getMonoid(k.last())}}));const H=n=>!("isConnected"in n)||n.isConnected,J=(()=>{let n;return(...r)=>{n&&clearTimeout(n),n=setTimeout((()=>{n=0,(n=>{for(let r of n.keys())n.set(r,n.get(r).filter(H))})(...r)}),2e3)}})(),$=(t,u)=>{const e=((n,r=((n,r)=>n!==r))=>{let t=new Map(Object.entries(null!=n?n:{}));const u={dispose:[],get:[],set:[],reset:[]},e=()=>{t=new Map(Object.entries(null!=n?n:{})),u.reset.forEach((n=>n()))},o=n=>(u.get.forEach((r=>r(n))),t.get(n)),i=(n,e)=>{const o=t.get(n);r(e,o,n)&&(t.set(n,e),u.set.forEach((r=>r(n,e,o))))},c="undefined"==typeof Proxy?{}:new Proxy(n,{get:(n,r)=>o(r),ownKeys:()=>Array.from(t.keys()),getOwnPropertyDescriptor:()=>({enumerable:!0,configurable:!0}),has:(n,r)=>t.has(r),set:(n,r,t)=>(i(r,t),!0)}),f=(n,r)=>(u[n].push(r),()=>{((n,r)=>{const t=n.indexOf(r);t>=0&&(n[t]=n[n.length-1],n.length--)})(u[n],r)});return{state:c,get:o,set:i,on:f,onChange:(r,t)=>{const u=f("set",((n,u)=>{n===r&&t(u)})),e=f("reset",(()=>t(n[r])));return()=>{u(),e()}},use:(...n)=>{const r=n.reduce(((n,r)=>(r.set&&n.push(f("set",r.set)),r.get&&n.push(f("get",r.get)),r.reset&&n.push(f("reset",r.reset)),r.dispose&&n.push(f("dispose",r.dispose)),n)),[]);return()=>r.forEach((n=>n()))},dispose:()=>{u.dispose.forEach((n=>n())),e()},reset:e,forceUpdate:n=>{const r=t.get(n);u.set.forEach((t=>t(n,r,r)))}}})(t,u);return e.use((()=>{if("function"!=typeof n)return{};const t=new Map;return{dispose:()=>t.clear(),get:r=>{const u=n();u&&((n,r,t)=>{const u=n.get(r);u?u.includes(t)||u.push(t):n.set(r,[t])})(t,r,u)},set:n=>{const u=t.get(n);u&&t.set(n,u.filter(r)),J(t)},reset:()=>{t.forEach((n=>n.forEach(r))),J(t)}}})()),e},{state:G,onChange:B}=$(Object.assign({fallbackStyles:"",pricePrefix:null,currencySign:null,apiPath:null,token:null,locale:"de-DE"},{trackingEnabled:!0}));function K(n,r,t){return function(u){for(var e=Array(t.length+1),o=0;o<t.length;o++)e[o]=t[o];return e[t.length]=u,0===r?n.apply(null,e):K(n,r-1,e)}}B("apiPath",(n=>{console.log("apiPathChanged",n)})),B("token",(n=>{console.log("tokenChanged",n)}));var Q={1:function(n){return[n]},2:function(n){return function(r){return[n,r]}},3:function(n){return function(r){return function(t){return[n,r,t]}}},4:function(n){return function(r){return function(t){return function(u){return[n,r,t,u]}}}},5:function(n){return function(r){return function(t){return function(u){return function(e){return[n,r,t,u,e]}}}}}};function V(n){return Q.hasOwnProperty(n)||(Q[n]=K(t,n-1,[])),Q[n]}function X(n){return function(){for(var r=[],t=0;t<arguments.length;t++)r[t]=arguments[t];for(var u=r.length,e=V(u),o=n.map(r[0],e),i=1;i<u;i++)o=n.ap(o,r[i]);return o}}function Y(n){return function(r){return function(t){return n.fromEither(u(t)?e(r()):o(t.value))}}}var Z=e,nn=o,rn=function(n,r){return f(n,tn(r))},tn=function(n){return function(r){return fn(r)?r:nn(n(r.right))}},un={URI:"Either",map:rn},en={URI:"Either",map:rn,ap:function(n,r){return f(n,function(n){return function(r){return fn(r)?r:fn(n)?n:nn(r.right(n.right))}}(r))}},on=function(n){return function(r){return fn(r)?Z(n(r.left)):r}},cn=Y({URI:"Either",fromEither:c}),fn=i,an=function(n,r){return function(t){return fn(t)?n(t.left):r(t.right)}},vn=a,dn=v,pn=function(n){return{concat:function(r,t){return sn(r)?t:sn(t)?r:dn(n.concat(r.value,t.value))},empty:vn}},sn=function(n){return"None"===n._tag},ln=function(n){return null==n?vn:dn(n)};function mn(n){return function(r){return n.map(r,nn)}}function hn(n){return function(n,r){return function(t){return function(u){return n.map(u,(function(n){return r.map(n,t)}))}}}(n,un)}function In(n){return function(n,r){return function(t){return function(u){return n.ap(n.map(u,(function(n){return function(t){return r.ap(n,t)}})),t)}}}(n,en)}function Rn(n){return function(r){return function(t){return n.chain(t,(function(t){return fn(t)?n.of(t):r(t.right)}))}}}function bn(n){return function(r){return function(t){return n.map(t,on(r))}}}function Un(n,r){return function(t){var u=p(t,n.fromTask);return function(n){return r.chain(n,u)}}}var On=function(n){return function(){return Promise.resolve().then(n)}},Mn=function(n,r){return f(n,jn(r))},gn=function(n,r){return f(n,wn(r))},jn=function(n){return function(r){return function(){return Promise.resolve().then(r).then(n)}}},wn=function(n){return function(r){return function(){return Promise.all([Promise.resolve().then(r),Promise.resolve().then(n)]).then((function(n){return(0,n[0])(n[1])}))}}},xn=function(n){return function(){return Promise.resolve(n)}},yn={URI:"Task",map:Mn},_n={URI:"Task",map:Mn,ap:gn},Wn={URI:"Task",map:Mn,of:xn,ap:gn,chain:function(n,r){return f(n,function(n){return function(r){return function(){return Promise.resolve().then(r).then((function(r){return n(r)()}))}}}(r))}},En=mn(yn),kn=p(On,En),qn=En,Pn=xn,Tn=hn(yn),An=bn(yn),zn=In(_n),Ln=Rn(Wn),Nn=Ln,Cn="TaskEither",Sn={URI:Cn,map:function(n,r){return f(n,Tn(r))},ap:function(n,r){return f(n,zn(r))},chain:function(n,r){return f(n,Ln(r))}},Dn=Y({URI:Cn,fromEither:Pn}),Fn=Un({URI:Cn,fromIO:kn,fromTask:qn},Sn),Hn=O((function(n,r){var t=U&&U.__createBinding||(Object.create?function(n,r,t,u){void 0===u&&(u=t),Object.defineProperty(n,u,{enumerable:!0,get:function(){return r[t]}})}:function(n,r,t,u){void 0===u&&(u=t),n[u]=r[t]}),u=U&&U.__setModuleDefault||(Object.create?function(n,r){Object.defineProperty(n,"default",{enumerable:!0,value:r})}:function(n,r){n.default=r}),e=U&&U.__importStar||function(n){if(n&&n.__esModule)return n;var r={};if(null!=n)for(var e in n)"default"!==e&&Object.prototype.hasOwnProperty.call(n,e)&&t(r,n,e);return u(r,n),r};Object.defineProperty(r,"__esModule",{value:!0}),r.getCompactableComposition=r.separate=r.compact=void 0;var o=e(A);function i(n,r){return function(t){return n.map(t,r.compact)}}function c(n,r,t){var u=i(n,r),e=y.map(n,t);return function(n){return o.separated(u(M.pipe(n,e(F.getLeft))),u(M.pipe(n,e(F.getRight))))}}r.compact=i,r.separate=c,r.getCompactableComposition=function(n,r){return{map:y.getFunctorComposition(n,r).map,compact:i(n,r),separate:c(n,r,r)}}})),Jn=O((function(n,r){Object.defineProperty(r,"__esModule",{value:!0}),r.tailRec=void 0,r.tailRec=function(n,r){for(var t=r(n);"Left"===t._tag;)t=r(t.left);return t.right}})),$n=O((function(n,r){var t=U&&U.__createBinding||(Object.create?function(n,r,t,u){void 0===u&&(u=t),Object.defineProperty(n,u,{enumerable:!0,get:function(){return r[t]}})}:function(n,r,t,u){void 0===u&&(u=t),n[u]=r[t]}),u=U&&U.__setModuleDefault||(Object.create?function(n,r){Object.defineProperty(n,"default",{enumerable:!0,value:r})}:function(n,r){n.default=r}),e=U&&U.__importStar||function(n){if(n&&n.__esModule)return n;var r={};if(null!=n)for(var e in n)"default"!==e&&Object.prototype.hasOwnProperty.call(n,e)&&t(r,n,e);return u(r,n),r};Object.defineProperty(r,"__esModule",{value:!0}),r.fold=r.match=r.foldW=r.matchW=r.isRight=r.isLeft=r.fromOption=r.fromPredicate=r.FromEither=r.MonadThrow=r.throwError=r.ChainRec=r.Extend=r.extend=r.Alt=r.alt=r.altW=r.Bifunctor=r.mapLeft=r.bimap=r.Traversable=r.sequence=r.traverse=r.Foldable=r.reduceRight=r.foldMap=r.reduce=r.Monad=r.Chain=r.chain=r.chainW=r.Applicative=r.Apply=r.ap=r.apW=r.Pointed=r.of=r.Functor=r.map=r.getAltValidation=r.getApplicativeValidation=r.getWitherable=r.getFilterable=r.getCompactable=r.getSemigroup=r.getEq=r.getShow=r.URI=r.right=r.left=void 0,r.getValidation=r.getValidationMonoid=r.getValidationSemigroup=r.getApplyMonoid=r.getApplySemigroup=r.either=r.stringifyJSON=r.parseJSON=r.sequenceArray=r.traverseArray=r.traverseArrayWithIndex=r.traverseReadonlyArrayWithIndex=r.traverseReadonlyNonEmptyArrayWithIndex=r.ApT=r.apSW=r.apS=r.bindW=r.bind=r.bindTo=r.Do=r.exists=r.elem=r.toError=r.toUnion=r.chainNullableK=r.fromNullableK=r.tryCatchK=r.tryCatch=r.fromNullable=r.orElse=r.orElseW=r.swap=r.filterOrElseW=r.filterOrElse=r.chainOptionK=r.fromOptionK=r.duplicate=r.flatten=r.flattenW=r.chainFirstW=r.chainFirst=r.apSecond=r.apFirst=r.flap=r.getOrElse=r.getOrElseW=void 0;var o=e(w);r.left=o.left,r.right=o.right;var i=function(n,t){return M.pipe(n,r.map(t))},c=function(n,t){return M.pipe(n,r.ap(t))},f=function(n,t){return M.pipe(n,r.chain(t))},a=function(n,t,u){return M.pipe(n,r.reduce(t,u))},v=function(n){return function(t,u){var e=r.foldMap(n);return M.pipe(t,e(u))}},d=function(n,t,u){return M.pipe(n,r.reduceRight(t,u))},p=function(n){var t=r.traverse(n);return function(n,r){return M.pipe(n,t(r))}},s=function(n,t,u){return M.pipe(n,r.bimap(t,u))},l=function(n,t){return M.pipe(n,r.mapLeft(t))},m=function(n,t){return M.pipe(n,r.alt(t))},h=function(n,t){return M.pipe(n,r.extend(t))},I=function(n,t){return Jn.tailRec(t(n),(function(n){return r.isLeft(n)?r.right(r.left(n.left)):r.isLeft(n.right)?r.left(t(n.right.left)):r.right(r.right(n.right.right))}))};r.URI="Either",r.getShow=function(n,t){return{show:function(u){return r.isLeft(u)?"left("+n.show(u.left)+")":"right("+t.show(u.right)+")"}}},r.getEq=function(n,t){return{equals:function(u,e){return u===e||(r.isLeft(u)?r.isLeft(e)&&n.equals(u.left,e.left):r.isRight(e)&&t.equals(u.right,e.right))}}},r.getSemigroup=function(n){return{concat:function(t,u){return r.isLeft(u)?t:r.isLeft(t)?u:r.right(n.concat(t.right,u.right))}}},r.getCompactable=function(n){var t=r.left(n.empty);return{URI:r.URI,_E:void 0,compact:function(n){return r.isLeft(n)?n:"None"===n.right._tag?t:r.right(n.right.value)},separate:function(n){return r.isLeft(n)?A.separated(n,n):r.isLeft(n.right)?A.separated(r.right(n.right.left),t):A.separated(t,r.right(n.right.right))}}},r.getFilterable=function(n){var t=r.left(n.empty),u=r.getCompactable(n);return{URI:r.URI,_E:void 0,map:i,compact:u.compact,separate:u.separate,filter:function(n,u){return r.isLeft(n)||u(n.right)?n:t},filterMap:function(n,u){if(r.isLeft(n))return n;var e=u(n.right);return"None"===e._tag?t:r.right(e.value)},partition:function(n,u){return r.isLeft(n)?A.separated(n,n):u(n.right)?A.separated(t,r.right(n.right)):A.separated(r.right(n.right),t)},partitionMap:function(n,u){if(r.isLeft(n))return A.separated(n,n);var e=u(n.right);return r.isLeft(e)?A.separated(r.right(e.left),t):A.separated(t,r.right(e.right))}}},r.getWitherable=function(n){var t=r.getFilterable(n),u=r.getCompactable(n);return{URI:r.URI,_E:void 0,map:i,compact:t.compact,separate:t.separate,filter:t.filter,filterMap:t.filterMap,partition:t.partition,partitionMap:t.partitionMap,traverse:p,sequence:r.sequence,reduce:a,foldMap:v,reduceRight:d,wither:z.witherDefault(r.Traversable,u),wilt:z.wiltDefault(r.Traversable,u)}},r.getApplicativeValidation=function(n){return{URI:r.URI,_E:void 0,map:i,ap:function(t,u){return r.isLeft(t)?r.isLeft(u)?r.left(n.concat(t.left,u.left)):t:r.isLeft(u)?u:r.right(t.right(u.right))},of:r.of}},r.getAltValidation=function(n){return{URI:r.URI,_E:void 0,map:i,alt:function(t,u){if(r.isRight(t))return t;var e=u();return r.isLeft(e)?r.left(n.concat(t.left,e.left)):e}}},r.map=function(n){return function(t){return r.isLeft(t)?t:r.right(n(t.right))}},r.Functor={URI:r.URI,map:i},r.of=r.right,r.Pointed={URI:r.URI,of:r.of},r.apW=function(n){return function(t){return r.isLeft(t)?t:r.isLeft(n)?n:r.right(t.right(n.right))}},r.ap=r.apW,r.Apply={URI:r.URI,map:i,ap:c},r.Applicative={URI:r.URI,map:i,ap:c,of:r.of},r.chainW=function(n){return function(t){return r.isLeft(t)?t:n(t.right)}},r.chain=r.chainW,r.Chain={URI:r.URI,map:i,ap:c,chain:f},r.Monad={URI:r.URI,map:i,ap:c,of:r.of,chain:f},r.reduce=function(n,t){return function(u){return r.isLeft(u)?n:t(n,u.right)}},r.foldMap=function(n){return function(t){return function(u){return r.isLeft(u)?n.empty:t(u.right)}}},r.reduceRight=function(n,t){return function(u){return r.isLeft(u)?n:t(u.right,n)}},r.Foldable={URI:r.URI,reduce:a,foldMap:v,reduceRight:d},r.traverse=function(n){return function(t){return function(u){return r.isLeft(u)?n.of(r.left(u.left)):n.map(t(u.right),r.right)}}},r.sequence=function(n){return function(t){return r.isLeft(t)?n.of(r.left(t.left)):n.map(t.right,r.right)}},r.Traversable={URI:r.URI,map:i,reduce:a,foldMap:v,reduceRight:d,traverse:p,sequence:r.sequence},r.bimap=function(n,t){return function(u){return r.isLeft(u)?r.left(n(u.left)):r.right(t(u.right))}},r.mapLeft=function(n){return function(t){return r.isLeft(t)?r.left(n(t.left)):t}},r.Bifunctor={URI:r.URI,bimap:s,mapLeft:l},r.altW=function(n){return function(t){return r.isLeft(t)?n():t}},r.alt=r.altW,r.Alt={URI:r.URI,map:i,alt:m},r.extend=function(n){return function(t){return r.isLeft(t)?t:r.right(n(t))}},r.Extend={URI:r.URI,map:i,extend:h},r.ChainRec={URI:r.URI,map:i,ap:c,chain:f,chainRec:I},r.throwError=r.left,r.MonadThrow={URI:r.URI,map:i,ap:c,of:r.of,chain:f,throwError:r.throwError},r.FromEither={URI:r.URI,fromEither:M.identity},r.fromPredicate=x.fromPredicate(r.FromEither),r.fromOption=x.fromOption(r.FromEither),r.isLeft=o.isLeft,r.isRight=o.isRight,r.matchW=function(n,t){return function(u){return r.isLeft(u)?n(u.left):t(u.right)}},r.foldW=r.matchW,r.match=r.matchW,r.fold=r.match,r.getOrElseW=function(n){return function(t){return r.isLeft(t)?n(t.left):t.right}},r.getOrElse=r.getOrElseW,r.flap=y.flap(r.Functor),r.apFirst=g.apFirst(r.Apply),r.apSecond=g.apSecond(r.Apply),r.chainFirst=j.chainFirst(r.Chain),r.chainFirstW=r.chainFirst,r.flattenW=r.chainW(M.identity),r.flatten=r.flattenW,r.duplicate=r.extend(M.identity),r.fromOptionK=x.fromOptionK(r.FromEither),r.chainOptionK=x.chainOptionK(r.FromEither,r.Chain),r.filterOrElse=x.filterOrElse(r.FromEither,r.Chain),r.filterOrElseW=r.filterOrElse,r.swap=function(n){return r.isLeft(n)?r.right(n.left):r.left(n.right)},r.orElseW=function(n){return function(t){return r.isLeft(t)?n(t.left):t}},r.orElse=r.orElseW,r.fromNullable=function(n){return function(t){return null==t?r.left(n):r.right(t)}},r.tryCatch=function(n,t){try{return r.right(n())}catch(n){return r.left(t(n))}},r.tryCatchK=function(n,t){return function(){for(var u=[],e=0;e<arguments.length;e++)u[e]=arguments[e];return r.tryCatch((function(){return n.apply(void 0,u)}),t)}},r.fromNullableK=function(n){var t=r.fromNullable(n);return function(n){return M.flow(n,t)}},r.chainNullableK=function(n){var t=r.fromNullableK(n);return function(n){return r.chain(t(n))}},r.toUnion=r.foldW(M.identity,M.identity),r.toError=function(n){return n instanceof Error?n:new Error(String(n))},r.elem=function n(t){return function(u,e){if(void 0===e){var o=n(t);return function(n){return o(u,n)}}return!r.isLeft(e)&&t.equals(u,e.right)}},r.exists=function(n){return function(t){return!r.isLeft(t)&&n(t.right)}},r.Do=r.of(o.emptyRecord),r.bindTo=y.bindTo(r.Functor),r.bind=j.bind(r.Chain),r.bindW=r.bind,r.apS=g.apS(r.Apply),r.apSW=r.apS,r.ApT=r.of(o.emptyReadonlyArray),r.traverseReadonlyNonEmptyArrayWithIndex=function(n){return function(t){var u=n(0,o.head(t));if(r.isLeft(u))return u;for(var e=[u.right],i=1;i<t.length;i++){var c=n(i,t[i]);if(r.isLeft(c))return c;e.push(c.right)}return r.right(e)}},r.traverseReadonlyArrayWithIndex=function(n){var t=r.traverseReadonlyNonEmptyArrayWithIndex(n);return function(n){return o.isNonEmpty(n)?t(n):r.ApT}},r.traverseArrayWithIndex=r.traverseReadonlyArrayWithIndex,r.traverseArray=function(n){return r.traverseReadonlyArrayWithIndex((function(r,t){return n(t)}))},r.sequenceArray=r.traverseArray(M.identity),r.parseJSON=function(n,t){return r.tryCatch((function(){return JSON.parse(n)}),t)},r.stringifyJSON=function(n,t){return r.tryCatch((function(){var r=JSON.stringify(n);if("string"!=typeof r)throw new Error("Converting unsupported structure to JSON");return r}),t)},r.either={URI:r.URI,map:i,of:r.of,ap:c,chain:f,reduce:a,foldMap:v,reduceRight:d,traverse:p,sequence:r.sequence,bimap:s,mapLeft:l,alt:m,extend:h,chainRec:I,throwError:r.throwError},r.getApplySemigroup=g.getApplySemigroup(r.Apply),r.getApplyMonoid=S.getApplicativeMonoid(r.Applicative),r.getValidationSemigroup=function(n,t){return g.getApplySemigroup(r.getApplicativeValidation(n))(t)},r.getValidationMonoid=function(n,t){return S.getApplicativeMonoid(r.getApplicativeValidation(n))(t)},r.getValidation=function(n){var t=r.getApplicativeValidation(n).ap,u=r.getAltValidation(n).alt;return{URI:r.URI,_E:void 0,map:i,of:r.of,chain:f,bimap:s,mapLeft:l,reduce:a,foldMap:v,reduceRight:d,extend:h,traverse:p,sequence:r.sequence,chainRec:I,throwError:r.throwError,ap:t,alt:u}}})),Gn=O((function(n,r){var t=U&&U.__createBinding||(Object.create?function(n,r,t,u){void 0===u&&(u=t),Object.defineProperty(n,u,{enumerable:!0,get:function(){return r[t]}})}:function(n,r,t,u){void 0===u&&(u=t),n[u]=r[t]}),u=U&&U.__setModuleDefault||(Object.create?function(n,r){Object.defineProperty(n,"default",{enumerable:!0,value:r})}:function(n,r){n.default=r}),e=U&&U.__importStar||function(n){if(n&&n.__esModule)return n;var r={};if(null!=n)for(var e in n)"default"!==e&&Object.prototype.hasOwnProperty.call(n,e)&&t(r,n,e);return u(r,n),r};Object.defineProperty(r,"__esModule",{value:!0}),r.getEitherM=r.toUnion=r.swap=r.orLeft=r.orElseFirst=r.orElse=r.getOrElse=r.matchE=r.match=r.altValidation=r.mapLeft=r.bimap=r.alt=r.chain=r.ap=r.map=r.leftF=r.rightF=r.left=r.right=void 0;var o=e($n);function i(n){return M.flow(o.right,n.of)}function c(n){return M.flow(o.left,n.of)}function f(n){return function(r){return n.map(r,o.right)}}function a(n){return function(r){return n.map(r,o.left)}}function v(n){return y.map(n,o.Functor)}function d(n){return g.ap(n,o.Apply)}function p(n){return function(r){return function(t){return n.chain(t,(function(t){return o.isLeft(t)?n.of(t):r(t.right)}))}}}function s(n){return function(r){return function(t){return n.chain(t,(function(t){return o.isLeft(t)?r():n.of(t)}))}}}function l(n){return function(r,t){return function(u){return n.map(u,o.bimap(r,t))}}}function m(n){return function(r){return function(t){return n.map(t,o.mapLeft(r))}}}function h(n){return function(r,t){return function(u){return n.chain(u,o.match(r,t))}}}function I(n){return function(r){return function(t){return n.chain(t,o.match(r,n.of))}}}function R(n){return function(r){return function(t){return n.chain(t,(function(t){return o.isLeft(t)?r(t.left):n.of(t)}))}}}function b(n){return function(r){return n.map(r,o.swap)}}r.right=i,r.left=c,r.rightF=f,r.leftF=a,r.map=v,r.ap=d,r.chain=p,r.alt=s,r.bimap=l,r.mapLeft=m,r.altValidation=function(n,r){return function(t){return function(u){return n.chain(u,o.match((function(u){return n.map(t(),o.mapLeft((function(n){return r.concat(u,n)})))}),i(n)))}}},r.match=function(n){return function(r,t){return function(u){return n.map(u,o.match(r,t))}}},r.matchE=h,r.getOrElse=I,r.orElse=R,r.orElseFirst=function(n){var r=R(n);return function(t){return r((function(r){return n.map(t(r),(function(n){return o.isLeft(n)?n:o.left(r)}))}))}},r.orLeft=function(n){return function(r){return function(t){return n.chain(t,o.match((function(t){return n.map(r(t),o.left)}),(function(r){return n.of(o.right(r))})))}}},r.swap=b,r.toUnion=function(n){return function(r){return n.map(r,o.toUnion)}},r.getEitherM=function(n){var r=d(n),t=v(n),u=p(n),e=s(n),o=l(n),U=m(n),O=h(n),g=I(n),j=R(n);return{map:function(n,r){return M.pipe(n,t(r))},ap:function(n,t){return M.pipe(n,r(t))},of:i(n),chain:function(n,r){return M.pipe(n,u(r))},alt:function(n,r){return M.pipe(n,e(r))},bimap:function(n,r,t){return M.pipe(n,o(r,t))},mapLeft:function(n,r){return M.pipe(n,U(r))},fold:function(n,r,t){return M.pipe(n,O(r,t))},getOrElse:function(n,r){return M.pipe(n,g(r))},orElse:function(n,r){return M.pipe(n,j(r))},swap:b(n),rightM:f(n),leftM:a(n),left:c(n)}}})),Bn=O((function(n,r){function t(n,r){return function(t){return function(u){return n.map(u,(function(n){return r.filter(n,t)}))}}}function u(n,r){return function(t){return function(u){return n.map(u,(function(n){return r.filterMap(n,t)}))}}}function e(n,r){var u=t(n,r);return function(n){var r=u(D.not(n)),t=u(n);return function(n){return A.separated(r(n),t(n))}}}function o(n,r){var t=u(n,r);return function(n){return function(r){return A.separated(M.pipe(r,t((function(r){return F.getLeft(n(r))}))),M.pipe(r,t((function(r){return F.getRight(n(r))}))))}}}Object.defineProperty(r,"__esModule",{value:!0}),r.getFilterableComposition=r.partitionMap=r.partition=r.filterMap=r.filter=void 0,r.filter=t,r.filterMap=u,r.partition=e,r.partitionMap=o,r.getFilterableComposition=function(n,r){var i=y.getFunctorComposition(n,r).map,c=Hn.compact(n,r),f=Hn.separate(n,r,r),a=t(n,r),v=u(n,r),d=e(n,r),p=o(n,r);return{map:i,compact:c,separate:f,filter:function(n,r){return M.pipe(n,a(r))},filterMap:function(n,r){return M.pipe(n,v(r))},partition:function(n,r){return M.pipe(n,d(r))},partitionMap:function(n,r){return M.pipe(n,p(r))}}}})),Kn=O((function(n,r){Object.defineProperty(r,"__esModule",{value:!0}),r.chainFirstIOK=r.chainIOK=r.fromIOK=void 0,r.fromIOK=function(n){return function(r){return M.flow(r,n.fromIO)}},r.chainIOK=function(n,r){return function(t){var u=M.flow(t,n.fromIO);return function(n){return r.chain(n,u)}}},r.chainFirstIOK=function(n,r){var t=j.chainFirst(r);return function(r){return t(M.flow(r,n.fromIO))}}})),Qn=O((function(n,r){Object.defineProperty(r,"__esModule",{value:!0}),r.chainFirstTaskK=r.chainTaskK=r.fromTaskK=void 0,r.fromTaskK=function(n){return function(r){return M.flow(r,n.fromTask)}},r.chainTaskK=function(n,r){return function(t){var u=M.flow(t,n.fromTask);return function(n){return r.chain(n,u)}}},r.chainFirstTaskK=function(n,r){var t=j.chainFirst(r);return function(r){return t(M.flow(r,n.fromTask))}}})),Vn=O((function(n,r){var t=U&&U.__createBinding||(Object.create?function(n,r,t,u){void 0===u&&(u=t),Object.defineProperty(n,u,{enumerable:!0,get:function(){return r[t]}})}:function(n,r,t,u){void 0===u&&(u=t),n[u]=r[t]}),u=U&&U.__setModuleDefault||(Object.create?function(n,r){Object.defineProperty(n,"default",{enumerable:!0,value:r})}:function(n,r){n.default=r}),e=U&&U.__importStar||function(n){if(n&&n.__esModule)return n;var r={};if(null!=n)for(var e in n)"default"!==e&&Object.prototype.hasOwnProperty.call(n,e)&&t(r,n,e);return u(r,n),r};Object.defineProperty(r,"__esModule",{value:!0}),r.getMonoid=r.getSemigroup=r.taskSeq=r.task=r.sequenceSeqArray=r.traverseSeqArray=r.traverseSeqArrayWithIndex=r.sequenceArray=r.traverseArray=r.traverseArrayWithIndex=r.traverseReadonlyArrayWithIndexSeq=r.traverseReadonlyNonEmptyArrayWithIndexSeq=r.traverseReadonlyArrayWithIndex=r.traverseReadonlyNonEmptyArrayWithIndex=r.ApT=r.apS=r.bind=r.bindTo=r.Do=r.never=r.FromTask=r.chainFirstIOK=r.chainIOK=r.fromIOK=r.FromIO=r.chainFirst=r.MonadTask=r.fromTask=r.MonadIO=r.Monad=r.Chain=r.ApplicativeSeq=r.ApplySeq=r.ApplicativePar=r.apSecond=r.apFirst=r.ApplyPar=r.Pointed=r.flap=r.Functor=r.getRaceMonoid=r.URI=r.flatten=r.chain=r.of=r.ap=r.map=r.delay=r.fromIO=void 0;var o=e(w);r.fromIO=function(n){return function(){return Promise.resolve().then(n)}},r.delay=function(n){return function(r){return function(){return new Promise((function(t){setTimeout((function(){Promise.resolve().then(r).then(t)}),n)}))}}};var i=function(n,t){return M.pipe(n,r.map(t))},c=function(n,t){return M.pipe(n,r.ap(t))},f=function(n,t){return M.pipe(n,r.chain((function(n){return M.pipe(t,r.map(n))})))},a=function(n,t){return M.pipe(n,r.chain(t))};r.map=function(n){return function(r){return function(){return Promise.resolve().then(r).then(n)}}},r.ap=function(n){return function(r){return function(){return Promise.all([Promise.resolve().then(r),Promise.resolve().then(n)]).then((function(n){return(0,n[0])(n[1])}))}}},r.of=function(n){return function(){return Promise.resolve(n)}},r.chain=function(n){return function(r){return function(){return Promise.resolve().then(r).then((function(r){return n(r)()}))}}},r.flatten=r.chain(M.identity),r.URI="Task",r.getRaceMonoid=function(){return{concat:function(n,r){return function(){return Promise.race([Promise.resolve().then(n),Promise.resolve().then(r)])}},empty:r.never}},r.Functor={URI:r.URI,map:i},r.flap=y.flap(r.Functor),r.Pointed={URI:r.URI,of:r.of},r.ApplyPar={URI:r.URI,map:i,ap:c},r.apFirst=g.apFirst(r.ApplyPar),r.apSecond=g.apSecond(r.ApplyPar),r.ApplicativePar={URI:r.URI,map:i,ap:c,of:r.of},r.ApplySeq={URI:r.URI,map:i,ap:f},r.ApplicativeSeq={URI:r.URI,map:i,ap:f,of:r.of},r.Chain={URI:r.URI,map:i,ap:c,chain:a},r.Monad={URI:r.URI,map:i,of:r.of,ap:c,chain:a},r.MonadIO={URI:r.URI,map:i,of:r.of,ap:c,chain:a,fromIO:r.fromIO},r.fromTask=M.identity,r.MonadTask={URI:r.URI,map:i,of:r.of,ap:c,chain:a,fromIO:r.fromIO,fromTask:r.fromTask},r.chainFirst=j.chainFirst(r.Chain),r.FromIO={URI:r.URI,fromIO:r.fromIO},r.fromIOK=Kn.fromIOK(r.FromIO),r.chainIOK=Kn.chainIOK(r.FromIO,r.Chain),r.chainFirstIOK=Kn.chainFirstIOK(r.FromIO,r.Chain),r.FromTask={URI:r.URI,fromIO:r.fromIO,fromTask:r.fromTask},r.never=function(){return new Promise((function(){}))},r.Do=r.of(o.emptyRecord),r.bindTo=y.bindTo(r.Functor),r.bind=j.bind(r.Chain),r.apS=g.apS(r.ApplyPar),r.ApT=r.of(o.emptyReadonlyArray),r.traverseReadonlyNonEmptyArrayWithIndex=function(n){return function(r){return function(){return Promise.all(r.map((function(r,t){return Promise.resolve().then((function(){return n(t,r)()}))})))}}},r.traverseReadonlyArrayWithIndex=function(n){var t=r.traverseReadonlyNonEmptyArrayWithIndex(n);return function(n){return o.isNonEmpty(n)?t(n):r.ApT}},r.traverseReadonlyNonEmptyArrayWithIndexSeq=function(n){return function(r){return function(){return o.tail(r).reduce((function(r,t,u){return r.then((function(r){return Promise.resolve().then(n(u+1,t)).then((function(n){return r.push(n),r}))}))}),Promise.resolve().then(n(0,o.head(r))).then(o.singleton))}}},r.traverseReadonlyArrayWithIndexSeq=function(n){var t=r.traverseReadonlyNonEmptyArrayWithIndexSeq(n);return function(n){return o.isNonEmpty(n)?t(n):r.ApT}},r.traverseArrayWithIndex=r.traverseReadonlyArrayWithIndex,r.traverseArray=function(n){return r.traverseReadonlyArrayWithIndex((function(r,t){return n(t)}))},r.sequenceArray=r.traverseArray(M.identity),r.traverseSeqArrayWithIndex=r.traverseReadonlyArrayWithIndexSeq,r.traverseSeqArray=function(n){return r.traverseReadonlyArrayWithIndexSeq((function(r,t){return n(t)}))},r.sequenceSeqArray=r.traverseSeqArray(M.identity),r.task={URI:r.URI,map:i,of:r.of,ap:c,chain:a,fromIO:r.fromIO,fromTask:r.fromTask},r.taskSeq={URI:r.URI,map:i,of:r.of,ap:f,chain:a,fromIO:r.fromIO,fromTask:r.fromTask},r.getSemigroup=g.getApplySemigroup(r.ApplySeq),r.getMonoid=S.getApplicativeMonoid(r.ApplicativeSeq)})),Xn=O((function(n,r){var t=U&&U.__createBinding||(Object.create?function(n,r,t,u){void 0===u&&(u=t),Object.defineProperty(n,u,{enumerable:!0,get:function(){return r[t]}})}:function(n,r,t,u){void 0===u&&(u=t),n[u]=r[t]}),u=U&&U.__setModuleDefault||(Object.create?function(n,r){Object.defineProperty(n,"default",{enumerable:!0,value:r})}:function(n,r){n.default=r}),e=U&&U.__importStar||function(n){if(n&&n.__esModule)return n;var r={};if(null!=n)for(var e in n)"default"!==e&&Object.prototype.hasOwnProperty.call(n,e)&&t(r,n,e);return u(r,n),r};Object.defineProperty(r,"__esModule",{value:!0}),r.getCompactable=r.getAltTaskValidation=r.getApplicativeTaskValidation=r.URI=r.throwError=r.of=r.altW=r.alt=r.flatten=r.flattenW=r.chainW=r.chain=r.apW=r.ap=r.mapLeft=r.bimap=r.map=r.chainIOEitherK=r.chainIOEitherKW=r.fromIOEitherK=r.chainTaskOptionK=r.fromTaskOptionK=r.swap=r.orLeft=r.orElseFirstW=r.orElseFirst=r.orElseW=r.orElse=r.toUnion=r.tryCatchK=r.tryCatch=r.getOrElseW=r.getOrElse=r.foldW=r.matchEW=r.fold=r.matchE=r.matchW=r.match=r.fromTaskOption=r.fromIOEither=r.fromEither=r.fromTask=r.fromIO=r.leftIO=r.rightIO=r.leftTask=r.rightTask=r.right=r.left=void 0,r.traverseReadonlyArrayWithIndexSeq=r.traverseReadonlyNonEmptyArrayWithIndexSeq=r.traverseReadonlyArrayWithIndex=r.traverseReadonlyNonEmptyArrayWithIndex=r.ApT=r.apSW=r.apS=r.bindW=r.bind=r.bindTo=r.Do=r.bracket=r.taskify=r.chainFirstTaskK=r.chainTaskK=r.fromTaskK=r.FromTask=r.chainFirstIOK=r.chainIOK=r.fromIOK=r.FromIO=r.fromEitherK=r.filterOrElseW=r.filterOrElse=r.fromPredicate=r.chainEitherKW=r.chainEitherK=r.chainOptionK=r.fromOptionK=r.fromOption=r.FromEither=r.Alt=r.Bifunctor=r.chainFirstW=r.chainFirst=r.MonadThrow=r.MonadTask=r.MonadIO=r.Monad=r.Chain=r.ApplicativeSeq=r.ApplySeq=r.ApplicativePar=r.apSecond=r.apFirst=r.ApplyPar=r.Pointed=r.flap=r.Functor=r.getFilterable=void 0,r.getTaskValidation=r.getSemigroup=r.getApplyMonoid=r.getApplySemigroup=r.taskEitherSeq=r.taskEither=r.sequenceSeqArray=r.traverseSeqArray=r.traverseSeqArrayWithIndex=r.sequenceArray=r.traverseArray=r.traverseArrayWithIndex=void 0;var o=e($n),i=e(Gn),c=e(w),f=e(Vn);r.left=i.left(f.Pointed),r.right=i.right(f.Pointed),r.rightTask=i.rightF(f.Functor),r.leftTask=i.leftF(f.Functor),r.rightIO=M.flow(f.fromIO,r.rightTask),r.leftIO=M.flow(f.fromIO,r.leftTask),r.fromIO=r.rightIO,r.fromTask=r.rightTask,r.fromEither=f.of,r.fromIOEither=f.fromIO,r.fromTaskOption=function(n){return f.map(o.fromOption(n))},r.match=i.match(f.Functor),r.matchW=r.match,r.matchE=i.matchE(f.Monad),r.fold=r.matchE,r.matchEW=r.matchE,r.foldW=r.matchEW,r.getOrElse=i.getOrElse(f.Monad),r.getOrElseW=r.getOrElse,r.tryCatch=function(n,r){return function(){return n().then(c.right,(function(n){return c.left(r(n))}))}},r.tryCatchK=function(n,t){return function(){for(var u=[],e=0;e<arguments.length;e++)u[e]=arguments[e];return r.tryCatch((function(){return n.apply(void 0,u)}),t)}},r.toUnion=i.toUnion(f.Functor),r.orElse=i.orElse(f.Monad),r.orElseW=r.orElse,r.orElseFirst=i.orElseFirst(f.Monad),r.orElseFirstW=r.orElseFirst,r.orLeft=i.orLeft(f.Monad),r.swap=i.swap(f.Functor),r.fromTaskOptionK=function(n){var t=r.fromTaskOption(n);return function(n){return M.flow(n,t)}},r.chainTaskOptionK=function(n){return M.flow(r.fromTaskOptionK(n),r.chain)},r.fromIOEitherK=function(n){return M.flow(n,r.fromIOEither)},r.chainIOEitherKW=function(n){return r.chainW(r.fromIOEitherK(n))},r.chainIOEitherK=r.chainIOEitherKW;var a=function(n,t){return M.pipe(n,r.map(t))},v=function(n,t){return M.pipe(n,r.ap(t))},d=function(n,t){return M.pipe(n,r.chain((function(n){return M.pipe(t,r.map(n))})))},p=function(n,t){return M.pipe(n,r.chain(t))},s=function(n,t,u){return M.pipe(n,r.bimap(t,u))},l=function(n,t){return M.pipe(n,r.mapLeft(t))},m=function(n,t){return M.pipe(n,r.alt(t))};function h(n,t){var u=g.ap(n,o.getApplicativeValidation(t));return{URI:r.URI,_E:void 0,map:a,ap:function(n,r){return M.pipe(n,u(r))},of:r.of}}function I(n){var t=i.altValidation(f.Monad,n);return{URI:r.URI,_E:void 0,map:a,alt:function(n,r){return M.pipe(n,t(r))}}}r.map=i.map(f.Functor),r.bimap=i.bimap(f.Functor),r.mapLeft=i.mapLeft(f.Functor),r.ap=i.ap(f.ApplyPar),r.apW=r.ap,r.chain=i.chain(f.Monad),r.chainW=r.chain,r.flattenW=r.chainW(M.identity),r.flatten=r.flattenW,r.alt=i.alt(f.Monad),r.altW=r.alt,r.of=r.right,r.throwError=r.left,r.URI="TaskEither",r.getApplicativeTaskValidation=h,r.getAltTaskValidation=I,r.getCompactable=function(n){var t=o.getCompactable(n);return{URI:r.URI,_E:void 0,compact:Hn.compact(f.Functor,t),separate:Hn.separate(f.Functor,t,o.Functor)}},r.getFilterable=function(n){var t=o.getFilterable(n),u=r.getCompactable(n),e=Bn.filter(f.Functor,t),i=Bn.filterMap(f.Functor,t),c=Bn.partition(f.Functor,t),v=Bn.partitionMap(f.Functor,t);return{URI:r.URI,_E:void 0,map:a,compact:u.compact,separate:u.separate,filter:function(n,r){return M.pipe(n,e(r))},filterMap:function(n,r){return M.pipe(n,i(r))},partition:function(n,r){return M.pipe(n,c(r))},partitionMap:function(n,r){return M.pipe(n,v(r))}}},r.Functor={URI:r.URI,map:a},r.flap=y.flap(r.Functor),r.Pointed={URI:r.URI,of:r.of},r.ApplyPar={URI:r.URI,map:a,ap:v},r.apFirst=g.apFirst(r.ApplyPar),r.apSecond=g.apSecond(r.ApplyPar),r.ApplicativePar={URI:r.URI,map:a,ap:v,of:r.of},r.ApplySeq={URI:r.URI,map:a,ap:d},r.ApplicativeSeq={URI:r.URI,map:a,ap:d,of:r.of},r.Chain={URI:r.URI,map:a,ap:v,chain:p},r.Monad={URI:r.URI,map:a,ap:v,chain:p,of:r.of},r.MonadIO={URI:r.URI,map:a,ap:v,chain:p,of:r.of,fromIO:r.fromIO},r.MonadTask={URI:r.URI,map:a,ap:v,chain:p,of:r.of,fromIO:r.fromIO,fromTask:r.fromTask},r.MonadThrow={URI:r.URI,map:a,ap:v,chain:p,of:r.of,throwError:r.throwError},r.chainFirst=j.chainFirst(r.Chain),r.chainFirstW=r.chainFirst,r.Bifunctor={URI:r.URI,bimap:s,mapLeft:l},r.Alt={URI:r.URI,map:a,alt:m},r.FromEither={URI:r.URI,fromEither:r.fromEither},r.fromOption=x.fromOption(r.FromEither),r.fromOptionK=x.fromOptionK(r.FromEither),r.chainOptionK=x.chainOptionK(r.FromEither,r.Chain),r.chainEitherK=x.chainEitherK(r.FromEither,r.Chain),r.chainEitherKW=r.chainEitherK,r.fromPredicate=x.fromPredicate(r.FromEither),r.filterOrElse=x.filterOrElse(r.FromEither,r.Chain),r.filterOrElseW=r.filterOrElse,r.fromEitherK=x.fromEitherK(r.FromEither),r.FromIO={URI:r.URI,fromIO:r.fromIO},r.fromIOK=Kn.fromIOK(r.FromIO),r.chainIOK=Kn.chainIOK(r.FromIO,r.Chain),r.chainFirstIOK=Kn.chainFirstIOK(r.FromIO,r.Chain),r.FromTask={URI:r.URI,fromIO:r.fromIO,fromTask:r.fromTask},r.fromTaskK=Qn.fromTaskK(r.FromTask),r.chainTaskK=Qn.chainTaskK(r.FromTask,r.Chain),r.chainFirstTaskK=Qn.chainFirstTaskK(r.FromTask,r.Chain),r.taskify=function(n){return function(){var r=Array.prototype.slice.call(arguments);return function(){return new Promise((function(t){n.apply(null,r.concat((function(n,r){return t(null!=n?c.left(n):c.right(r))})))}))}}},r.bracket=function(n,t,u){return M.pipe(n,r.chain((function(n){return M.pipe(t(n),f.chain((function(t){return M.pipe(u(n,t),r.chain((function(){return f.of(t)})))})))})))},r.Do=r.of(c.emptyRecord),r.bindTo=y.bindTo(r.Functor),r.bind=j.bind(r.Chain),r.bindW=r.bind,r.apS=g.apS(r.ApplyPar),r.apSW=r.apS,r.ApT=r.of(c.emptyReadonlyArray),r.traverseReadonlyNonEmptyArrayWithIndex=function(n){return M.flow(f.traverseReadonlyNonEmptyArrayWithIndex(n),f.map(o.traverseReadonlyNonEmptyArrayWithIndex(M.SK)))},r.traverseReadonlyArrayWithIndex=function(n){var t=r.traverseReadonlyNonEmptyArrayWithIndex(n);return function(n){return c.isNonEmpty(n)?t(n):r.ApT}},r.traverseReadonlyNonEmptyArrayWithIndexSeq=function(n){return function(r){return function(){return c.tail(r).reduce((function(r,t,u){return r.then((function(e){return c.isLeft(e)?r:n(u+1,t)().then((function(n){return c.isLeft(n)?n:(e.right.push(n.right),e)}))}))}),n(0,c.head(r))().then(o.map(c.singleton)))}}},r.traverseReadonlyArrayWithIndexSeq=function(n){var t=r.traverseReadonlyNonEmptyArrayWithIndexSeq(n);return function(n){return c.isNonEmpty(n)?t(n):r.ApT}},r.traverseArrayWithIndex=r.traverseReadonlyArrayWithIndex,r.traverseArray=function(n){return r.traverseReadonlyArrayWithIndex((function(r,t){return n(t)}))},r.sequenceArray=r.traverseArray(M.identity),r.traverseSeqArrayWithIndex=r.traverseReadonlyArrayWithIndexSeq,r.traverseSeqArray=function(n){return r.traverseReadonlyArrayWithIndexSeq((function(r,t){return n(t)}))},r.sequenceSeqArray=r.traverseSeqArray(M.identity),r.taskEither={URI:r.URI,bimap:s,mapLeft:l,map:a,of:r.of,ap:v,chain:p,alt:m,fromIO:r.fromIO,fromTask:r.fromTask,throwError:r.throwError},r.taskEitherSeq={URI:r.URI,bimap:s,mapLeft:l,map:a,of:r.of,ap:d,chain:p,alt:m,fromIO:r.fromIO,fromTask:r.fromTask,throwError:r.throwError},r.getApplySemigroup=g.getApplySemigroup(r.ApplySeq),r.getApplyMonoid=S.getApplicativeMonoid(r.ApplicativeSeq),r.getSemigroup=function(n){return g.getApplySemigroup(f.ApplySeq)(o.getSemigroup(n))},r.getTaskValidation=function(n){var t=h(f.ApplicativePar,n),u=I(n);return{URI:r.URI,_E:void 0,map:a,ap:t.ap,of:r.of,chain:p,bimap:s,mapLeft:l,alt:u.alt,fromIO:r.fromIO,fromTask:r.fromTask,throwError:r.throwError}}}));const Yn=n=>({kind:"server",inner:n}),Zn={kind:"client",inner:"Token not exist or empty"},nr={kind:"client",inner:"Api path empty or missing"},rr=pn({concat:function(n,r){return n+r},empty:""}),tr=()=>f(pn(d()).concat(ln(G.apiPath),ln("https://api.vviinn.com")),cn((()=>nr))),ur={concat:(n,r)=>{const t=new Headers;return void 0!==n&&n.forEach(((n,r)=>t.append(r,n))),void 0!==r&&r.forEach(((n,r)=>t.append(r,n))),t}},er=s({method:{concat:(n,r)=>{const t=rr.concat(ln(n),ln(r));return f(t,(u=()=>"GET",function(n){return sn(n)?u():n.value}));var u}},body:l(),headers:ur}),or=n=>({method:n}),ir=nn(or("GET")),cr=nn(or("POST")),fr=n=>n.status>=200&&n.status<300?Xn.right(n):Xn.left(n),ar=er,vr=(n,r)=>([t,u])=>{const e=new URL(n,t),o=ar.concat(u,r);return M.pipe(((n,r={})=>M.pipe(((n,r={method:"GET"})=>Xn.tryCatch((()=>fetch(n,r)),(n=>n)))(n,r),Xn.chain(fr),Xn.chain((n=>function(n){return Xn.fromTask((()=>n.json()))}(n)))))(e.toString(),o),Xn.mapLeft(Yn))},dr=n=>(n=>0===n.length)(n)?Z("entity is empty"):nn(n),pr=n=>{return f(n,("entity not exist",function(n){return null==n?Z("entity not exist"):nn(n)}),(r=dr,function(n){return fn(n)?n:r(n.right)}));var r},sr=n=>new Headers({Authorization:`Bearer ${n}`}),lr=n=>f(n,pr,$n.mapLeft((()=>Zn))),mr=n=>f(n,lr,$n.map(sr)),hr=g.sequenceT($n.Apply),Ir={equals:(n,r)=>n.class===r.class&&n.score===r.score&&n.rectangle.left===r.rectangle.left&&n.rectangle.top===r.rectangle.top&&n.rectangle.height===r.rectangle.height&&n.rectangle.width===r.rectangle.width},Rr=n=>M.pipe(hr(tr(),cr),Pn,Nn(vr("search/session",n)));var br;!function(n){n.eform="eform",n.etype="etype",n.form="form",n.href="href",n.method="method",n.accepts="accepts",n.produces="produces",n.rel="rel",n.type="type",n.value="value"}(br||(br={}));const Ur=n=>{switch(n.type){case"array":return n.value.map(Ur);default:return n.value}},Or=n=>r=>f(hr(tr(),nn(or(n.method))),Pn,Nn(vr(n.href,r))),Mr=(n,r)=>{const t=I(n),u=m.concat(t,r);return Object.assign(Object.assign({},u),{width:n.width,height:n.height})},gr=(n,r)=>{switch(r.direction){case h.NorthEast:return((n,r)=>{const t=m.concat(I(n),{x:0,y:r.position.y});return Object.assign(Object.assign({},t),{width:n.width+r.position.x,height:n.height-r.position.y})})(n,r);case h.NorthWest:return((n,r)=>{const t=m.concat(I(n),r.position);return Object.assign(Object.assign({},t),{width:n.width-r.position.x,height:n.height-r.position.y})})(n,r);case h.SouthEast:return((n,r)=>Object.assign(Object.assign({},n),{width:n.width+r.position.x,height:n.height+r.position.y}))(n,r);case h.SouthWest:return((n,r)=>{const t=m.concat(I(n),{x:r.position.x,y:0});return Object.assign(Object.assign({},t),{width:n.width-r.position.x,height:n.height+r.position.y})})(n,r)}},jr=n=>({x:0,y:0,width:n.width,height:n.height}),wr=n=>Object.assign({x:n.left,y:n.top},n),xr=n=>r=>({x:r.x*n.width,y:r.y*n.height,width:r.width*n.width,height:r.height*n.height}),yr=n=>({x:n.x+.5*n.width,y:n.y+.5*n.height});var _r;!function(n){n.desc="desc",n.eform="eform",n.enabled="enabled",n.etype="etype",n.form="form",n.label="label",n.max="max",n.maxlength="maxlength",n.maxsize="maxsize",n.min="min",n.minlength="minlength",n.minsize="minsize",n.mutable="mutable",n.name="name",n.options="options",n.pattern="pattern",n.placeholder="placeholder",n.required="required",n.secret="secret",n.type="type",n.value="value",n.visible="visible"}(_r||(_r={}));const Wr=(n,r)=>{const t=new URLSearchParams(Object.entries(r));return[`${n.href}?${t.toString()}`,{method:"GET"}]},Er=(n,r)=>[n.href,{body:JSON.stringify(r),method:n.method,headers:new Headers({"Content-Type":"application/ion+json"})}],kr=(n,r={})=>t=>M.pipe(hr(tr(),M.pipe(((n,r)=>M.pipe(((n,r)=>{const t=n.map((n=>n.name)),u=Object.keys(r),e=t.filter((n=>!u.includes(n)));return 0===e.length?nn(r):Z(`Data should contains fields: ${e.join(", ")}`)})(n.value,r),tn((r=>n.rel.includes("query-form")?Wr(n,r):Er(n,r)))))(n,r),on((n=>({kind:"app",inner:n}))))),Pn,Nn((n=>{const r=n[0],[u,e]=n[1];return vr(u,e)([r,t])}))),qr=async n=>new Promise((r=>{const t=new FileReader;t.addEventListener("load",(()=>{r(t.result)})),t.readAsDataURL(n)})),Pr=g.sequenceT(F.Apply);const Tr=["jpg","jpeg","png","webp"],Ar={kind:"client",inner:"File format not supported"},zr=n=>{const r=n.type.split("/")[1],t=(u=t=>t===r?F.some(n):F.none,function(n){for(var r=0;r<n.length;r++){var t=u(n[r]);if(R(t))return t}return a})(Tr);var u;return M.pipe(t,$n.fromOption((()=>Ar)))},Lr={kind:"app",inner:"File doesnt exist"},Nr=n=>()=>new Promise((r=>{const t=new FileReader,u=new Image;t.onload=n=>{u.src=n.target.result},u.onload=()=>r(u),t.readAsDataURL(n)}));var Cr=O((function(n,r){Object.defineProperty(r,"__esModule",{value:!0}),r.copy=void 0,r.copy=(n,r,t=0,u=0,e=n.width-t,o=n.height-u,i=0,c=0)=>{if(t|=0,u|=0,o|=0,i|=0,c|=0,(e|=0)<=0||o<=0)return;const f=new Uint32Array(n.data.buffer),a=new Uint32Array(r.data.buffer);for(let v=0;v<o;v++){const o=u+v;if(o<0||o>=n.height)continue;const d=c+v;if(!(d<0||d>=r.height))for(let u=0;u<e;u++){const e=t+u;if(e<0||e>=n.width)continue;const c=i+u;c<0||c>=r.width||(a[d*r.width+c]=f[o*n.width+e])}}}})),Sr=O((function(n,r){Object.defineProperty(r,"__esModule",{value:!0}),r.CreateImageFactory=(n=[0,0,0,0],r=4)=>{if(r=Math.floor(r),isNaN(r)||r<1)throw TypeError("channels should be a positive non-zero number");if(!("length"in n)||n.length<r)throw TypeError(`fill should be iterable with at least ${r} members`);const t=(n=new Uint8ClampedArray(n).slice(0,r)).every((n=>0===n));return(u,e,o)=>{if(void 0===u||void 0===e)throw TypeError("Not enough arguments");if(u=Math.floor(u),e=Math.floor(e),isNaN(u)||u<1||isNaN(e)||e<1)throw TypeError("Index or size is negative or greater than the allowed amount");const i=u*e*r;if(void 0===o&&(o=new Uint8ClampedArray(i)),o instanceof Uint8ClampedArray){if(o.length!==i)throw TypeError("Index or size is negative or greater than the allowed amount");if(!t)for(let t=0;t<e;t++)for(let e=0;e<u;e++){const i=(t*u+e)*r;for(let t=0;t<r;t++)o[i+t]=n[t]}return{get width(){return u},get height(){return e},get data(){return o}}}throw TypeError("Expected data to be Uint8ClampedArray or undefined")}},r.createImage=r.CreateImageFactory()})),Dr=O((function(n,r){Object.defineProperty(r,"__esModule",{value:!0}),r.filters=void 0;const t=(n,r)=>{if(n<=-r||n>=r)return 0;if(0==n)return 0;const t=n*Math.PI;return Math.sin(t)/t*Math.sin(t/r)/(t/r)},u=n=>Math.round(16383*n);r.filters=(n,r,e,o,i)=>{const c=i?2:3,f=1/e,a=Math.min(1,e),v=c/a,d=Math.floor(2*(v+1)),p=new Int16Array((d+2)*r);let s=0;for(let e=0;e<r;e++){const i=(e+.5)*f+o,d=Math.max(0,Math.floor(i-v)),l=Math.min(n-1,Math.ceil(i+v)),m=l-d+1,h=new Float32Array(m),I=new Int16Array(m);let R=0,b=0;for(let n=d;n<=l;n++){const r=t((n+.5-i)*a,c);R+=r,h[b]=r,b++}let U=0;for(let n=0;n<h.length;n++){const r=h[n]/R;U+=r,I[n]=u(r)}I[r>>1]+=u(1-U);let O=0;for(;O<I.length&&0===I[O];)O++;let M=I.length-1;for(;M>0&&0===I[M];)M--;const g=M-O+1;p[s++]=d+O,p[s++]=g,p.set(I.subarray(O,M+1),s),s+=g}return p}})),Fr=O((function(n,r){Object.defineProperty(r,"__esModule",{value:!0}),r.convolve=void 0,r.convolve=(n,r,t,u,e,o)=>{let i=0,c=0;for(let f=0;f<u;f++){let a=0;for(let t=0;t<e;t++){let t=i+4*o[a++]|0,e=0,f=0,v=0,d=0;for(let r=o[a++];r>0;r--){const r=o[a++];e=e+r*n[t]|0,f=f+r*n[t+1]|0,v=v+r*n[t+2]|0,d=d+r*n[t+3]|0,t=t+4|0}r[c]=e+8192>>14,r[c+1]=f+8192>>14,r[c+2]=v+8192>>14,r[c+3]=d+8192>>14,c=c+4*u|0}c=4*(f+1)|0,i=(f+1)*t*4|0}}})),Hr=O((function(n,r){Object.defineProperty(r,"__esModule",{value:!0}),r.lanczos2=r.lanczos=void 0;const t=(n,r,t=!1)=>{const u=r.height/n.height,e=Dr.filters(n.width,r.width,r.width/n.width,0,t),o=Dr.filters(n.height,r.height,u,0,t),i=new Uint8ClampedArray(r.width*n.height*4);Fr.convolve(n.data,i,n.width,n.height,r.width,e),Fr.convolve(i,r.data,n.height,r.width,r.height,o)};r.lanczos=(n,r,u=0,e=0,o=n.width-u,i=n.height-e,c=0,f=0,a=r.width-c,v=r.height-f)=>{if(e|=0,i|=0,c|=0,f|=0,a|=0,v|=0,(o|=0)<=0||i<=0||a<=0||v<=0)return;if(0==(u|=0)&&0===e&&o===n.width&&i===n.height&&0===c&&0===f&&a===r.width&&v===r.height)return void t(n,r);const d=Sr.createImage(o,i),p=Sr.createImage(a,v);Cr.copy(n,d,u,e),t(d,p),Cr.copy(p,r,0,0,p.width,p.height,c,f)},r.lanczos2=(n,r,u=0,e=0,o=n.width-u,i=n.height-e,c=0,f=0,a=r.width-c,v=r.height-f)=>{if(e|=0,i|=0,c|=0,f|=0,a|=0,v|=0,(o|=0)<=0||i<=0||a<=0||v<=0)return;if(0==(u|=0)&&0===e&&o===n.width&&i===n.height&&0===c&&0===f&&a===r.width&&v===r.height)return void t(n,r,!0);const d=Sr.createImage(o,i),p=Sr.createImage(a,v);Cr.copy(n,d,u,e),t(d,p,!0),Cr.copy(p,r,0,0,p.width,p.height,c,f)}}));const Jr=n=>({kind:"height",size:n}),$r=W.contramap((n=>n.size))(T.Ord),Gr=C.sort($r),Br=C.sort({equals:(n,r)=>n.kind===r.kind,compare:(n,r)=>n.kind===r.kind?0:"width"===n.kind?-1:1}),Kr=n=>r=>{const t=Gr(r),u=(n=>{const[r,t]=n;return r.size/t.size})(t),e=Object.assign(Object.assign({},t[0]),{size:n*u}),o=Object.assign(Object.assign({},t[1]),{size:n});return Br([o,e])},Qr=n=>{const{naturalWidth:r,naturalHeight:t}=n;return[(u=r,{kind:"width",size:u}),Jr(t)];var u},Vr=()=>{const n=document.createElement("canvas"),r=n.getContext("2d");return[n,r]},Xr=async n=>{const r=await fetch(n),t=await r.blob();return new File([t],"image",{type:t.type,lastModified:Date.now()})},Yr=n=>()=>new Promise((async r=>{const t=await fetch(n),u=await t.blob();r(new File([u],"image",{type:u.type,lastModified:Date.now()}))})),Zr=(n,r)=>n.naturalWidth>r?((n,r)=>{const t=Kr(n),[u,e]=Vr(),o=Qr(r),[i,c]=t(o).map((n=>n.size)),f=new ImageData(i,c),a=(n=>{const{naturalWidth:r,naturalHeight:t}=n,[u,e]=Vr();return u.width=r,u.height=t,e.drawImage(n,0,0),e.getImageData(0,0,r,t)})(r);return u.width=i,u.height=c,Hr.lanczos(a,f),e.putImageData(f,0,0),u.toDataURL()})(r,n):(n=>{const r=document.createElement("canvas"),{naturalWidth:t,naturalHeight:u}=n,e=r.getContext("2d");return r.width=t,r.height=u,e.drawImage(n,0,0,t,u),r.toDataURL()})(n),nt=n=>f(n,mr,tn((n=>({headers:n})))),{state:rt,onChange:tt}=$({token:void 0,results:[],filters:[],resetCategoryLink:void 0,activeIonLink:void 0,cropperHandlers:[],selectedCropper:void 0,rectangleSearchForm:void 0,detectedObjects:[],detectedObject:void 0,objectDetectionInProgress:!1,imageWidth:500,image:F.none,imageUrl:F.none,imageBounds:F.none,searchArea:F.none,resultsComponents:[],serverError:!1,loading:!1}),ut=async n=>{var r,t;rt.results=n.value,rt.filters=(t=Ur(n.filters),Object.entries(t).map((([n,r])=>({name:n,filters:r})))),rt.rectangleSearchForm=n.searchArea,rt.resetCategoryLink=null===(r=n.links)||void 0===r?void 0:r.clearFilters,rt.loading=!1},et=n=>f(nt(rt.token),Pn,Nn(Or(n))),ot=async()=>{rt.loading=!0,f(Pr(rt.imageBounds,rt.searchArea),F.map((async([n,r])=>{const t=(u=n,n=>({x:n.x/u.width,y:n.y/u.height,width:n.width/u.width,height:n.height/u.height}))(r);var u;const e={width:t.width,height:t.height,left:t.x,top:t.y};return await f(nt(rt.token),Pn,Nn(kr(rt.rectangleSearchForm,e)),Tn(ut))()})))},it=n=>{rt.loading=!0;const r=(n=>{const r=new FormData;return r.append("image",n),r})(n),t=hr(mr(rt.token),nn(r));return f(t,tn((([n,r])=>({headers:n,body:r}))),Pn,Ln(Rr),Tn((n=>(ut(n),(async n=>{rt.objectDetectionInProgress=!0;const r={kind:"server",inner:"Can not get a link for objects detection"};var t,u,e;await f((t=n,u="detectedObjects",f(t.links,ln,(e=n=>ln(n[u]),function(n){return sn(n)?vn:e(n.value)}))),Dn((()=>r)),Ln(et),Tn((n=>rt.detectedObjects=Ur(n))))(),rt.objectDetectionInProgress=!1})(n),rt.loading=!1,n))),An((n=>(rt.serverError=!0,rt.loading=!1,n))))},ct=rt;tt("activeIonLink",(async n=>{rt.loading=!0;const r=n||rt.resetCategoryLink;await f(nt(rt.token),Pn,Nn(Or(r)),Tn(ut),An((n=>({kind:"network error",inner:n}))))()})),tt("searchArea",(n=>{f(n,F.map((n=>{rt.cropperHandlers=b(n)})))})),tt("serverError",(()=>{rt.loading=!1}));const ft=n=>{ct.image=F.some(n),ct.imageUrl=F.some(n.src)},at=async n=>{const r=(n=>M.pipe(n,F.fromNullable,$n.fromOption((()=>Lr)),$n.chain(zr)))(n),t=(500,n=>M.pipe(n,Nr,Vn.map((n=>Zr(n,500))),Vn.chain(Yr)));const u=f(r,Pn,Fn(t)),e=await f(u,Ln(it))();return f(hr(e,r),tn((([n,r])=>(async(n,r)=>{const t={image:await(async n=>({name:n.name,mediaType:n.type,value:await qr(n)}))(r)},u=n.uploadHighResolutionImage;await f(nt(rt.token),Pn,Nn(kr(u,t)))()})(n,r)))),await f(u,Fn(Nr),Tn(ft))(),e};export{en as A,$n as E,P as N,F as O,k as S,Xn as T,C as _,M as a,ir as b,Nn as c,X as d,U as e,Pn as f,tr as g,O as h,ct as i,Pr as j,Mr as k,ot as l,vr as m,wr as n,Ur as o,xr as p,yr as q,Ir as r,G as s,gr as t,Xr as u,at as v,an as w,jr as x,Qr as y,Kr as z}
|
|
1
|
+
import{a as n,f as r}from"./p-545ef9fd.js";import{t,i as u,l as e,r as o,a as i,b as c,p as f,n as a,s as v,f as d,c as p,d as s,e as l,g as m,H as h,h as I,j as R,k as b}from"./p-f582db5c.js";var U="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function O(n,r,t){return n(t={path:r,exports:{},require:function(){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}()}},t.exports),t.exports}var M=O((function(n,r){function t(n){return n}function u(n){return function(){return n}}function e(n,r,t,u,e,o,i,c,f){switch(arguments.length){case 1:return n;case 2:return function(){return r(n.apply(this,arguments))};case 3:return function(){return t(r(n.apply(this,arguments)))};case 4:return function(){return u(t(r(n.apply(this,arguments))))};case 5:return function(){return e(u(t(r(n.apply(this,arguments)))))};case 6:return function(){return o(e(u(t(r(n.apply(this,arguments))))))};case 7:return function(){return i(o(e(u(t(r(n.apply(this,arguments)))))))};case 8:return function(){return c(i(o(e(u(t(r(n.apply(this,arguments))))))))};case 9:return function(){return f(c(i(o(e(u(t(r(n.apply(this,arguments)))))))))}}}function o(){throw new Error("Called `absurd` function which should be uncallable")}Object.defineProperty(r,"__esModule",{value:!0}),r.getEndomorphismMonoid=r.not=r.SK=r.hole=r.pipe=r.untupled=r.tupled=r.absurd=r.decrement=r.increment=r.tuple=r.flow=r.flip=r.constVoid=r.constUndefined=r.constNull=r.constFalse=r.constTrue=r.constant=r.unsafeCoerce=r.identity=r.apply=r.getRing=r.getSemiring=r.getMonoid=r.getSemigroup=r.getBooleanAlgebra=void 0,r.getBooleanAlgebra=function(n){return function(){return{meet:function(r,t){return function(u){return n.meet(r(u),t(u))}},join:function(r,t){return function(u){return n.join(r(u),t(u))}},zero:function(){return n.zero},one:function(){return n.one},implies:function(r,t){return function(u){return n.implies(r(u),t(u))}},not:function(r){return function(t){return n.not(r(t))}}}}},r.getSemigroup=function(n){return function(){return{concat:function(r,t){return function(u){return n.concat(r(u),t(u))}}}}},r.getMonoid=function(n){var t=r.getSemigroup(n);return function(){return{concat:t().concat,empty:function(){return n.empty}}}},r.getSemiring=function(n){return{add:function(r,t){return function(u){return n.add(r(u),t(u))}},zero:function(){return n.zero},mul:function(r,t){return function(u){return n.mul(r(u),t(u))}},one:function(){return n.one}}},r.getRing=function(n){var t=r.getSemiring(n);return{add:t.add,mul:t.mul,one:t.one,zero:t.zero,sub:function(r,t){return function(u){return n.sub(r(u),t(u))}}}},r.apply=function(n){return function(r){return r(n)}},r.identity=t,r.unsafeCoerce=t,r.constant=u,r.constTrue=u(!0),r.constFalse=u(!1),r.constNull=u(null),r.constUndefined=u(void 0),r.constVoid=r.constUndefined,r.flip=function(n){return function(r,t){return n(t,r)}},r.flow=e,r.tuple=function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return n},r.increment=function(n){return n+1},r.decrement=function(n){return n-1},r.absurd=o,r.tupled=function(n){return function(r){return n.apply(void 0,r)}},r.untupled=function(n){return function(){for(var r=[],t=0;t<arguments.length;t++)r[t]=arguments[t];return n(r)}},r.pipe=function(n,r,t,u,e,o,i,c,f){switch(arguments.length){case 1:return n;case 2:return r(n);case 3:return t(r(n));case 4:return u(t(r(n)));case 5:return e(u(t(r(n))));case 6:return o(e(u(t(r(n)))));case 7:return i(o(e(u(t(r(n))))));case 8:return c(i(o(e(u(t(r(n)))))));case 9:return f(c(i(o(e(u(t(r(n))))))));default:for(var a=arguments[0],v=1;v<arguments.length;v++)a=arguments[v](a);return a}},r.hole=o,r.SK=function(n,r){return r},r.not=function(n){return function(r){return!n(r)}},r.getEndomorphismMonoid=function(){return{concat:function(n,r){return e(n,r)},empty:t}}})),g=O((function(n,r){function t(n,r,u){return function(e){for(var o=Array(u.length+1),i=0;i<u.length;i++)o[i]=u[i];return o[u.length]=e,0===r?n.apply(null,o):t(n,r-1,o)}}Object.defineProperty(r,"__esModule",{value:!0}),r.sequenceS=r.sequenceT=r.getApplySemigroup=r.apS=r.apSecond=r.apFirst=r.ap=void 0,r.ap=function(n,r){return function(t){return function(u){return n.ap(n.map(u,(function(n){return function(t){return r.ap(n,t)}})),t)}}},r.apFirst=function(n){return function(r){return function(t){return n.ap(n.map(t,(function(n){return function(){return n}})),r)}}},r.apSecond=function(n){return function(r){return function(t){return n.ap(n.map(t,(function(){return function(n){return n}})),r)}}},r.apS=function(n){return function(r,t){return function(u){return n.ap(n.map(u,(function(n){return function(t){var u;return Object.assign({},n,((u={})[r]=t,u))}})),t)}}},r.getApplySemigroup=function(n){return function(r){return{concat:function(t,u){return n.ap(n.map(t,(function(n){return function(t){return r.concat(n,t)}})),u)}}}};var u={1:function(n){return[n]},2:function(n){return function(r){return[n,r]}},3:function(n){return function(r){return function(t){return[n,r,t]}}},4:function(n){return function(r){return function(t){return function(u){return[n,r,t,u]}}}},5:function(n){return function(r){return function(t){return function(u){return function(e){return[n,r,t,u,e]}}}}}};function e(n){return u.hasOwnProperty(n)||(u[n]=t(M.tuple,n-1,[])),u[n]}r.sequenceT=function(n){return function(){for(var r=[],t=0;t<arguments.length;t++)r[t]=arguments[t];for(var u=r.length,o=e(u),i=n.map(r[0],o),c=1;c<u;c++)i=n.ap(i,r[c]);return i}},r.sequenceS=function(n){return function(r){for(var u=Object.keys(r),e=u.length,o=function(n){var r=n.length;switch(r){case 1:return function(r){var t;return(t={})[n[0]]=r,t};case 2:return function(r){return function(t){var u;return(u={})[n[0]]=r,u[n[1]]=t,u}};case 3:return function(r){return function(t){return function(u){var e;return(e={})[n[0]]=r,e[n[1]]=t,e[n[2]]=u,e}}};case 4:return function(r){return function(t){return function(u){return function(e){var o;return(o={})[n[0]]=r,o[n[1]]=t,o[n[2]]=u,o[n[3]]=e,o}}}};case 5:return function(r){return function(t){return function(u){return function(e){return function(o){var i;return(i={})[n[0]]=r,i[n[1]]=t,i[n[2]]=u,i[n[3]]=e,i[n[4]]=o,i}}}}};default:return t((function(){for(var t=[],u=0;u<arguments.length;u++)t[u]=arguments[u];for(var e={},o=0;o<r;o++)e[n[o]]=t[o];return e}),r-1,[])}}(u),i=n.map(r[u[0]],o),c=1;c<e;c++)i=n.ap(i,r[u[c]]);return i}}})),j=O((function(n,r){Object.defineProperty(r,"__esModule",{value:!0}),r.bind=r.chainFirst=void 0,r.chainFirst=function(n){return function(r){return function(t){return n.chain(t,(function(t){return n.map(r(t),(function(){return t}))}))}}},r.bind=function(n){return function(r,t){return function(u){return n.chain(u,(function(u){return n.map(t(u),(function(n){var t;return Object.assign({},u,((t={})[r]=n,t))}))}))}}}})),w=O((function(n,r){var t=U&&U.__spreadArray||function(n,r){for(var t=0,u=r.length,e=n.length;t<u;t++,e++)n[e]=r[t];return n};Object.defineProperty(r,"__esModule",{value:!0}),r.fromReadonlyNonEmptyArray=r.has=r.emptyRecord=r.emptyReadonlyArray=r.tail=r.head=r.isNonEmpty=r.singleton=r.right=r.left=r.isRight=r.isLeft=r.some=r.none=r.isSome=r.isNone=void 0,r.isNone=function(n){return"None"===n._tag},r.isSome=function(n){return"Some"===n._tag},r.none={_tag:"None"},r.some=function(n){return{_tag:"Some",value:n}},r.isLeft=function(n){return"Left"===n._tag},r.isRight=function(n){return"Right"===n._tag},r.left=function(n){return{_tag:"Left",left:n}},r.right=function(n){return{_tag:"Right",right:n}},r.singleton=function(n){return[n]},r.isNonEmpty=function(n){return n.length>0},r.head=function(n){return n[0]},r.tail=function(n){return n.slice(1)},r.emptyReadonlyArray=[],r.emptyRecord={},r.has=Object.prototype.hasOwnProperty,r.fromReadonlyNonEmptyArray=function(n){return t([n[0]],n.slice(1))}})),x=O((function(n,r){var t=U&&U.__createBinding||(Object.create?function(n,r,t,u){void 0===u&&(u=t),Object.defineProperty(n,u,{enumerable:!0,get:function(){return r[t]}})}:function(n,r,t,u){void 0===u&&(u=t),n[u]=r[t]}),u=U&&U.__setModuleDefault||(Object.create?function(n,r){Object.defineProperty(n,"default",{enumerable:!0,value:r})}:function(n,r){n.default=r}),e=U&&U.__importStar||function(n){if(n&&n.__esModule)return n;var r={};if(null!=n)for(var e in n)"default"!==e&&Object.prototype.hasOwnProperty.call(n,e)&&t(r,n,e);return u(r,n),r};Object.defineProperty(r,"__esModule",{value:!0}),r.filterOrElse=r.chainEitherK=r.fromEitherK=r.chainOptionK=r.fromOptionK=r.fromPredicate=r.fromOption=void 0;var o=e(w);function i(n){return function(r){return function(t){return n.fromEither(o.isNone(t)?o.left(r()):o.right(t.value))}}}function c(n){var r=i(n);return function(n){var t=r(n);return function(n){return M.flow(n,t)}}}function f(n){return function(r){return M.flow(r,n.fromEither)}}r.fromOption=i,r.fromPredicate=function(n){return function(r,t){return function(u){return n.fromEither(r(u)?o.right(u):o.left(t(u)))}}},r.fromOptionK=c,r.chainOptionK=function(n,r){var t=c(n);return function(n){var u=t(n);return function(n){return function(t){return r.chain(t,u(n))}}}},r.fromEitherK=f,r.chainEitherK=function(n,r){var t=f(n);return function(n){return function(u){return r.chain(u,t(n))}}},r.filterOrElse=function(n,r){return function(t,u){return function(e){return r.chain(e,(function(r){return n.fromEither(t(r)?o.right(r):o.left(u(r)))}))}}}})),y=O((function(n,r){function t(n,r){return function(t){return function(u){return n.map(u,(function(n){return r.map(n,t)}))}}}Object.defineProperty(r,"__esModule",{value:!0}),r.getFunctorComposition=r.bindTo=r.flap=r.map=void 0,r.map=t,r.flap=function(n){return function(r){return function(t){return n.map(t,(function(n){return n(r)}))}}},r.bindTo=function(n){return function(r){return function(t){return n.map(t,(function(n){var t;return(t={})[r]=n,t}))}}},r.getFunctorComposition=function(n,r){var u=t(n,r);return{map:function(n,r){return M.pipe(n,u(r))}}}})),_=O((function(n,r){Object.defineProperty(r,"__esModule",{value:!0}),r.eqDate=r.eqNumber=r.eqString=r.eqBoolean=r.eq=r.strictEqual=r.getStructEq=r.getTupleEq=r.Contravariant=r.getMonoid=r.getSemigroup=r.eqStrict=r.URI=r.contramap=r.tuple=r.struct=r.fromEquals=void 0,r.fromEquals=function(n){return{equals:function(r,t){return r===t||n(r,t)}}},r.struct=function(n){return r.fromEquals((function(r,t){for(var u in n)if(!n[u].equals(r[u],t[u]))return!1;return!0}))},r.tuple=function(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];return r.fromEquals((function(r,t){return n.every((function(n,u){return n.equals(r[u],t[u])}))}))},r.contramap=function(n){return function(t){return r.fromEquals((function(r,u){return t.equals(n(r),n(u))}))}},r.URI="Eq",r.eqStrict={equals:function(n,r){return n===r}};var t={equals:function(){return!0}};r.getSemigroup=function(){return{concat:function(n,t){return r.fromEquals((function(r,u){return n.equals(r,u)&&t.equals(r,u)}))}}},r.getMonoid=function(){return{concat:r.getSemigroup().concat,empty:t}},r.Contravariant={URI:r.URI,contramap:function(n,t){return M.pipe(n,r.contramap(t))}},r.getTupleEq=r.tuple,r.getStructEq=r.struct,r.strictEqual=r.eqStrict.equals,r.eq=r.Contravariant,r.eqBoolean=r.eqStrict,r.eqString=r.eqStrict,r.eqNumber=r.eqStrict,r.eqDate={equals:function(n,r){return n.valueOf()===r.valueOf()}}})),W=O((function(n,r){Object.defineProperty(r,"__esModule",{value:!0}),r.ordDate=r.ordNumber=r.ordString=r.ordBoolean=r.ord=r.getDualOrd=r.getTupleOrd=r.between=r.clamp=r.max=r.min=r.geq=r.leq=r.gt=r.lt=r.equals=r.trivial=r.Contravariant=r.getMonoid=r.getSemigroup=r.URI=r.contramap=r.reverse=r.tuple=r.fromCompare=r.equalsDefault=void 0,r.equalsDefault=function(n){return function(r,t){return r===t||0===n(r,t)}},r.fromCompare=function(n){return{equals:r.equalsDefault(n),compare:function(r,t){return r===t?0:n(r,t)}}},r.tuple=function(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];return r.fromCompare((function(r,t){for(var u=0;u<n.length-1;u++){var e=n[u].compare(r[u],t[u]);if(0!==e)return e}return n[u].compare(r[u],t[u])}))},r.reverse=function(n){return r.fromCompare((function(r,t){return n.compare(t,r)}))},r.contramap=function(n){return function(t){return r.fromCompare((function(r,u){return t.compare(n(r),n(u))}))}},r.URI="Ord",r.getSemigroup=function(){return{concat:function(n,t){return r.fromCompare((function(r,u){var e=n.compare(r,u);return 0!==e?e:t.compare(r,u)}))}}},r.getMonoid=function(){return{concat:r.getSemigroup().concat,empty:r.fromCompare((function(){return 0}))}},r.Contravariant={URI:r.URI,contramap:function(n,t){return M.pipe(n,r.contramap(t))}},r.trivial={equals:M.constTrue,compare:M.constant(0)},r.equals=function(n){return function(r){return function(t){return t===r||0===n.compare(t,r)}}},r.lt=function(n){return function(r,t){return-1===n.compare(r,t)}},r.gt=function(n){return function(r,t){return 1===n.compare(r,t)}},r.leq=function(n){return function(r,t){return 1!==n.compare(r,t)}},r.geq=function(n){return function(r,t){return-1!==n.compare(r,t)}},r.min=function(n){return function(r,t){return r===t||n.compare(r,t)<1?r:t}},r.max=function(n){return function(r,t){return r===t||n.compare(r,t)>-1?r:t}},r.clamp=function(n){var t=r.min(n),u=r.max(n);return function(n,r){return function(e){return u(t(e,r),n)}}},r.between=function(n){var t=r.lt(n),u=r.gt(n);return function(n,r){return function(e){return!t(e,n)&&!u(e,r)}}},r.getTupleOrd=r.tuple,r.getDualOrd=r.reverse,r.ord=r.Contravariant;var t={equals:_.eqStrict.equals,compare:function(n,r){return n<r?-1:n>r?1:0}};r.ordBoolean=t,r.ordString=t,r.ordNumber=t,r.ordDate=M.pipe(r.ordNumber,r.contramap((function(n){return n.valueOf()})))})),E=O((function(n,r){Object.defineProperty(r,"__esModule",{value:!0}),r.concatAll=r.endo=r.filterSecond=r.filterFirst=r.reverse=void 0,r.reverse=function(n){return{concat:function(r,t){return n.concat(t,r)}}},r.filterFirst=function(n){return function(r){return{concat:function(t,u){return n(t)?r.concat(t,u):u}}}},r.filterSecond=function(n){return function(r){return{concat:function(t,u){return n(u)?r.concat(t,u):t}}}},r.endo=function(n){return function(r){return{concat:function(t,u){return r.concat(n(t),n(u))}}}},r.concatAll=function(n){return function(r){return function(t){return t.reduce((function(r,t){return n.concat(r,t)}),r)}}}})),k=O((function(n,r){var t=U&&U.__createBinding||(Object.create?function(n,r,t,u){void 0===u&&(u=t),Object.defineProperty(n,u,{enumerable:!0,get:function(){return r[t]}})}:function(n,r,t,u){void 0===u&&(u=t),n[u]=r[t]}),u=U&&U.__setModuleDefault||(Object.create?function(n,r){Object.defineProperty(n,"default",{enumerable:!0,value:r})}:function(n,r){n.default=r}),e=U&&U.__importStar||function(n){if(n&&n.__esModule)return n;var r={};if(null!=n)for(var e in n)"default"!==e&&Object.prototype.hasOwnProperty.call(n,e)&&t(r,n,e);return u(r,n),r};Object.defineProperty(r,"__esModule",{value:!0}),r.semigroupProduct=r.semigroupSum=r.semigroupString=r.getFunctionSemigroup=r.semigroupAny=r.semigroupAll=r.fold=r.getIntercalateSemigroup=r.getMeetSemigroup=r.getJoinSemigroup=r.getDualSemigroup=r.getStructSemigroup=r.getTupleSemigroup=r.getFirstSemigroup=r.getLastSemigroup=r.getObjectSemigroup=r.semigroupVoid=r.concatAll=r.last=r.first=r.intercalate=r.tuple=r.struct=r.reverse=r.constant=r.max=r.min=void 0;var o=e(w),i=e(E),c=e(W);r.min=function(n){return{concat:c.min(n)}},r.max=function(n){return{concat:c.max(n)}},r.constant=function(n){return{concat:function(){return n}}},r.reverse=i.reverse,r.struct=function(n){return{concat:function(r,t){var u={};for(var e in n)o.has.call(n,e)&&(u[e]=n[e].concat(r[e],t[e]));return u}}},r.tuple=function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return{concat:function(r,t){return n.map((function(n,u){return n.concat(r[u],t[u])}))}}},r.intercalate=function(n){return function(r){return{concat:function(t,u){return r.concat(t,r.concat(n,u))}}}},r.first=function(){return{concat:M.identity}},r.last=function(){return{concat:function(n,r){return r}}},r.concatAll=i.concatAll,r.semigroupVoid=r.constant(void 0),r.getObjectSemigroup=function(){return{concat:function(n,r){return Object.assign({},n,r)}}},r.getLastSemigroup=r.last,r.getFirstSemigroup=r.first,r.getTupleSemigroup=r.tuple,r.getStructSemigroup=r.struct,r.getDualSemigroup=r.reverse,r.getJoinSemigroup=r.max,r.getMeetSemigroup=r.min,r.getIntercalateSemigroup=r.intercalate,r.fold=function(n){var t=r.concatAll(n);return function(n,r){return void 0===r?t(n):t(n)(r)}},r.semigroupAll={concat:function(n,r){return n&&r}},r.semigroupAny={concat:function(n,r){return n||r}},r.getFunctionSemigroup=M.getSemigroup,r.semigroupString={concat:function(n,r){return n+r}},r.semigroupSum={concat:function(n,r){return n+r}},r.semigroupProduct={concat:function(n,r){return n*r}}})),q=O((function(n,r){var t=U&&U.__createBinding||(Object.create?function(n,r,t,u){void 0===u&&(u=t),Object.defineProperty(n,u,{enumerable:!0,get:function(){return r[t]}})}:function(n,r,t,u){void 0===u&&(u=t),n[u]=r[t]}),u=U&&U.__setModuleDefault||(Object.create?function(n,r){Object.defineProperty(n,"default",{enumerable:!0,value:r})}:function(n,r){n.default=r}),e=U&&U.__importStar||function(n){if(n&&n.__esModule)return n;var r={};if(null!=n)for(var e in n)"default"!==e&&Object.prototype.hasOwnProperty.call(n,e)&&t(r,n,e);return u(r,n),r},o=U&&U.__spreadArray||function(n,r){for(var t=0,u=r.length,e=n.length;t<u;t++,e++)n[e]=r[t];return n};Object.defineProperty(r,"__esModule",{value:!0}),r.reduceRight=r.foldMap=r.reduce=r.mapWithIndex=r.map=r.flatten=r.duplicate=r.extend=r.chain=r.ap=r.alt=r.altW=r.of=r.chunksOf=r.splitAt=r.chop=r.chainWithIndex=r.intersperse=r.prependAll=r.unzip=r.zip=r.zipWith=r.modifyAt=r.updateAt=r.sort=r.groupBy=r.group=r.reverse=r.concat=r.concatW=r.fromArray=r.unappend=r.unprepend=r.range=r.replicate=r.makeBy=r.fromReadonlyArray=r.rotate=r.union=r.sortBy=r.uniq=r.unsafeUpdateAt=r.unsafeInsertAt=r.append=r.appendW=r.prepend=r.prependW=r.isOutOfBound=r.isNonEmpty=r.empty=void 0,r.uncons=r.filterWithIndex=r.filter=r.groupSort=r.updateLast=r.modifyLast=r.updateHead=r.modifyHead=r.matchRight=r.matchLeft=r.concatAll=r.max=r.min=r.init=r.last=r.tail=r.head=r.apS=r.bind=r.bindTo=r.Do=r.Comonad=r.Alt=r.TraversableWithIndex=r.Traversable=r.FoldableWithIndex=r.Foldable=r.Monad=r.chainFirst=r.Chain=r.Applicative=r.apSecond=r.apFirst=r.Apply=r.FunctorWithIndex=r.Pointed=r.flap=r.Functor=r.getUnionSemigroup=r.getEq=r.getSemigroup=r.getShow=r.URI=r.extract=r.traverseWithIndex=r.sequence=r.traverse=r.reduceRightWithIndex=r.foldMapWithIndex=r.reduceWithIndex=void 0,r.readonlyNonEmptyArray=r.fold=r.prependToAll=r.insertAt=r.snoc=r.cons=r.unsnoc=void 0;var i=e(w),c=e(k);function f(n){return function(r){return r.concat(n)}}function a(n,r){return r?n.concat(r):function(r){return r.concat(n)}}function v(n){return function(t){var u=t.length;if(0===u)return r.empty;for(var e=[],o=t[0],i=[o],c=1;c<u;c++){var f=t[c];n.equals(f,o)?i.push(f):(e.push(i),i=[o=f])}return e.push(i),e}}r.empty=i.emptyReadonlyArray,r.isNonEmpty=i.isNonEmpty,r.isOutOfBound=function(n,r){return n<0||n>=r.length},r.prependW=function(n){return function(r){return o([n],r)}},r.prepend=r.prependW,r.appendW=function(n){return function(r){return o(o([],r),[n])}},r.append=r.appendW,r.unsafeInsertAt=function(n,t,u){if(r.isNonEmpty(u)){var e=i.fromReadonlyNonEmptyArray(u);return e.splice(n,0,t),e}return[t]},r.unsafeUpdateAt=function(n,r,t){if(t[n]===r)return t;var u=i.fromReadonlyNonEmptyArray(t);return u[n]=r,u},r.uniq=function(n){return function(t){if(1===t.length)return t;for(var u=[r.head(t)],e=function(r){u.every((function(t){return!n.equals(t,r)}))&&u.push(r)},o=0,i=r.tail(t);o<i.length;o++)e(i[o]);return u}},r.sortBy=function(n){if(r.isNonEmpty(n)){var t=W.getMonoid();return r.sort(n.reduce(t.concat,t.empty))}return M.identity},r.union=function(n){var t=r.uniq(n);return function(n){return function(r){return t(M.pipe(r,a(n)))}}},r.rotate=function(n){return function(t){var u=t.length,e=Math.round(n)%u;if(r.isOutOfBound(Math.abs(e),t)||0===e)return t;if(e<0){var o=r.splitAt(-e)(t);return M.pipe(o[1],a(o[0]))}return r.rotate(e-u)(t)}},r.fromReadonlyArray=function(n){return r.isNonEmpty(n)?i.some(n):i.none},r.makeBy=function(n){return function(r){for(var t=Math.max(0,Math.floor(r)),u=[n(0)],e=1;e<t;e++)u.push(n(e));return u}},r.replicate=function(n){return r.makeBy((function(){return n}))},r.range=function(n,t){return n<=t?r.makeBy((function(r){return n+r}))(t-n+1):[n]},r.unprepend=function(n){return[r.head(n),r.tail(n)]},r.unappend=function(n){return[r.init(n),r.last(n)]},r.fromArray=function(n){return r.fromReadonlyArray(n.slice())},r.concatW=f,r.concat=a,r.reverse=function(n){return 1===n.length?n:o([r.last(n)],n.slice(0,-1).reverse())},r.group=v,r.groupBy=function(n){return function(r){for(var t={},u=0,e=r;u<e.length;u++){var o=e[u],i=n(o);t.hasOwnProperty(i)?t[i].push(o):t[i]=[o]}return t}},r.sort=function(n){return function(r){return 1===r.length?r:r.slice().sort(n.compare)}},r.updateAt=function(n,t){return r.modifyAt(n,(function(){return t}))},r.modifyAt=function(n,t){return function(u){return r.isOutOfBound(n,u)?i.none:i.some(r.unsafeUpdateAt(n,t(u[n]),u))}},r.zipWith=function(n,r,t){for(var u=[t(n[0],r[0])],e=Math.min(n.length,r.length),o=1;o<e;o++)u[o]=t(n[o],r[o]);return u},r.zip=function n(t,u){return void 0===u?function(r){return n(r,t)}:r.zipWith(t,u,(function(n,r){return[n,r]}))},r.unzip=function(n){for(var r=[n[0][0]],t=[n[0][1]],u=1;u<n.length;u++)r[u]=n[u][0],t[u]=n[u][1];return[r,t]},r.prependAll=function(n){return function(r){for(var t=[n,r[0]],u=1;u<r.length;u++)t.push(n,r[u]);return t}},r.intersperse=function(n){return function(t){var u=r.tail(t);return r.isNonEmpty(u)?M.pipe(u,r.prependAll(n),r.prepend(r.head(t))):t}},r.chainWithIndex=function(n){return function(t){for(var u=i.fromReadonlyNonEmptyArray(n(0,r.head(t))),e=1;e<t.length;e++)u.push.apply(u,n(e,t[e]));return u}},r.chop=function(n){return function(t){for(var u=n(t),e=[u[0]],o=u[1];r.isNonEmpty(o);){var i=n(o),c=i[1];e.push(i[0]),o=c}return e}},r.splitAt=function(n){return function(t){var u=Math.max(1,n);return u>=t.length?[t,r.empty]:[M.pipe(t.slice(1,u),r.prepend(r.head(t))),t.slice(u)]}},r.chunksOf=function(n){return r.chop(r.splitAt(n))};var d=function(n,t){return M.pipe(n,r.map(t))},p=function(n,t){return M.pipe(n,r.mapWithIndex(t))},s=function(n,t){return M.pipe(n,r.ap(t))},l=function(n,t){return M.pipe(n,r.chain(t))},m=function(n,t){return M.pipe(n,r.extend(t))},h=function(n,t,u){return M.pipe(n,r.reduce(t,u))},I=function(n){var t=r.foldMap(n);return function(n,r){return M.pipe(n,t(r))}},R=function(n,t,u){return M.pipe(n,r.reduceRight(t,u))},b=function(n){var t=r.traverse(n);return function(n,r){return M.pipe(n,t(r))}},O=function(n,t){return M.pipe(n,r.alt(t))},x=function(n,t,u){return M.pipe(n,r.reduceWithIndex(t,u))},E=function(n){var t=r.foldMapWithIndex(n);return function(n,r){return M.pipe(n,t(r))}},q=function(n,t,u){return M.pipe(n,r.reduceRightWithIndex(t,u))},P=function(n){var t=r.traverseWithIndex(n);return function(n,r){return M.pipe(n,t(r))}};r.of=i.singleton,r.altW=function(n){return function(r){return M.pipe(r,f(n()))}},r.alt=r.altW,r.ap=function(n){return r.chain((function(t){return M.pipe(n,r.map(t))}))},r.chain=function(n){return r.chainWithIndex((function(r,t){return n(t)}))},r.extend=function(n){return function(t){for(var u=r.tail(t),e=[n(t)];r.isNonEmpty(u);)e.push(n(u)),u=r.tail(u);return e}},r.duplicate=r.extend(M.identity),r.flatten=r.chain(M.identity),r.map=function(n){return r.mapWithIndex((function(r,t){return n(t)}))},r.mapWithIndex=function(n){return function(t){for(var u=[n(0,r.head(t))],e=1;e<t.length;e++)u.push(n(e,t[e]));return u}},r.reduce=function(n,t){return r.reduceWithIndex(n,(function(n,r,u){return t(r,u)}))},r.foldMap=function(n){return function(r){return function(t){return t.slice(1).reduce((function(t,u){return n.concat(t,r(u))}),r(t[0]))}}},r.reduceRight=function(n,t){return r.reduceRightWithIndex(n,(function(n,r,u){return t(r,u)}))},r.reduceWithIndex=function(n,r){return function(t){return t.reduce((function(n,t,u){return r(u,n,t)}),n)}},r.foldMapWithIndex=function(n){return function(r){return function(t){return t.slice(1).reduce((function(t,u,e){return n.concat(t,r(e+1,u))}),r(0,t[0]))}}},r.reduceRightWithIndex=function(n,r){return function(t){return t.reduceRight((function(n,t,u){return r(u,t,n)}),n)}},r.traverse=function(n){var t=r.traverseWithIndex(n);return function(n){return t((function(r,t){return n(t)}))}},r.sequence=function(n){return r.traverseWithIndex(n)(M.SK)},r.traverseWithIndex=function(n){return function(t){return function(u){for(var e=n.map(t(0,r.head(u)),r.of),o=1;o<u.length;o++)e=n.ap(n.map(e,(function(n){return function(t){return M.pipe(n,r.append(t))}})),t(o,u[o]));return e}}},r.extract=i.head,r.URI="ReadonlyNonEmptyArray",r.getShow=function(n){return{show:function(r){return"["+r.map(n.show).join(", ")+"]"}}},r.getSemigroup=function(){return{concat:a}},r.getEq=function(n){return _.fromEquals((function(r,t){return r.length===t.length&&r.every((function(r,u){return n.equals(r,t[u])}))}))},r.getUnionSemigroup=function(n){var t=r.union(n);return{concat:function(n,r){return t(r)(n)}}},r.Functor={URI:r.URI,map:d},r.flap=y.flap(r.Functor),r.Pointed={URI:r.URI,of:r.of},r.FunctorWithIndex={URI:r.URI,map:d,mapWithIndex:p},r.Apply={URI:r.URI,map:d,ap:s},r.apFirst=g.apFirst(r.Apply),r.apSecond=g.apSecond(r.Apply),r.Applicative={URI:r.URI,map:d,ap:s,of:r.of},r.Chain={URI:r.URI,map:d,ap:s,chain:l},r.chainFirst=j.chainFirst(r.Chain),r.Monad={URI:r.URI,map:d,ap:s,of:r.of,chain:l},r.Foldable={URI:r.URI,reduce:h,foldMap:I,reduceRight:R},r.FoldableWithIndex={URI:r.URI,reduce:h,foldMap:I,reduceRight:R,reduceWithIndex:x,foldMapWithIndex:E,reduceRightWithIndex:q},r.Traversable={URI:r.URI,map:d,reduce:h,foldMap:I,reduceRight:R,traverse:b,sequence:r.sequence},r.TraversableWithIndex={URI:r.URI,map:d,mapWithIndex:p,reduce:h,foldMap:I,reduceRight:R,traverse:b,sequence:r.sequence,reduceWithIndex:x,foldMapWithIndex:E,reduceRightWithIndex:q,traverseWithIndex:P},r.Alt={URI:r.URI,map:d,alt:O},r.Comonad={URI:r.URI,map:d,extend:m,extract:r.extract},r.Do=r.of(i.emptyRecord),r.bindTo=y.bindTo(r.Functor),r.bind=j.bind(r.Chain),r.apS=g.apS(r.Apply),r.head=r.extract,r.tail=i.tail,r.last=function(n){return n[n.length-1]},r.init=function(n){return n.slice(0,-1)},r.min=function(n){var r=c.min(n);return function(n){return n.reduce(r.concat)}},r.max=function(n){var r=c.max(n);return function(n){return n.reduce(r.concat)}},r.concatAll=function(n){return function(r){return r.reduce(n.concat)}},r.matchLeft=function(n){return function(t){return n(r.head(t),r.tail(t))}},r.matchRight=function(n){return function(t){return n(r.init(t),r.last(t))}},r.modifyHead=function(n){return function(t){return o([n(r.head(t))],r.tail(t))}},r.updateHead=function(n){return r.modifyHead((function(){return n}))},r.modifyLast=function(n){return function(t){return M.pipe(r.init(t),r.append(n(r.last(t))))}},r.updateLast=function(n){return r.modifyLast((function(){return n}))},r.groupSort=function(n){var t=r.sort(n),u=v(n);return function(n){return r.isNonEmpty(n)?u(t(n)):r.empty}},r.filter=function(n){return r.filterWithIndex((function(r,t){return n(t)}))},r.filterWithIndex=function(n){return function(t){return r.fromReadonlyArray(t.filter((function(r,t){return n(t,r)})))}},r.uncons=r.unprepend,r.unsnoc=r.unappend,r.cons=function(n,t){return void 0===t?r.prepend(n):M.pipe(t,r.prepend(n))},r.snoc=function(n,r){return M.pipe(n,a([r]))},r.insertAt=function(n,t){return function(u){return n<0||n>u.length?i.none:i.some(r.unsafeInsertAt(n,t,u))}},r.prependToAll=r.prependAll,r.fold=r.concatAll,r.readonlyNonEmptyArray={URI:r.URI,of:r.of,map:d,mapWithIndex:p,ap:s,chain:l,extend:m,extract:r.extract,reduce:h,foldMap:I,reduceRight:R,traverse:b,sequence:r.sequence,reduceWithIndex:x,foldMapWithIndex:E,reduceRightWithIndex:q,traverseWithIndex:P,alt:O}})),P=O((function(n,r){var t=U&&U.__createBinding||(Object.create?function(n,r,t,u){void 0===u&&(u=t),Object.defineProperty(n,u,{enumerable:!0,get:function(){return r[t]}})}:function(n,r,t,u){void 0===u&&(u=t),n[u]=r[t]}),u=U&&U.__setModuleDefault||(Object.create?function(n,r){Object.defineProperty(n,"default",{enumerable:!0,value:r})}:function(n,r){n.default=r}),e=U&&U.__importStar||function(n){if(n&&n.__esModule)return n;var r={};if(null!=n)for(var e in n)"default"!==e&&Object.prototype.hasOwnProperty.call(n,e)&&t(r,n,e);return u(r,n),r},o=U&&U.__spreadArray||function(n,r){for(var t=0,u=r.length,e=n.length;t<u;t++,e++)n[e]=r[t];return n};Object.defineProperty(r,"__esModule",{value:!0}),r.mapWithIndex=r.map=r.flatten=r.duplicate=r.extend=r.chain=r.ap=r.alt=r.altW=r.chunksOf=r.splitAt=r.chop=r.chainWithIndex=r.foldMap=r.foldMapWithIndex=r.intersperse=r.prependAll=r.unzip=r.zip=r.zipWith=r.of=r.copy=r.modifyAt=r.updateAt=r.insertAt=r.sort=r.groupBy=r.group=r.reverse=r.concat=r.concatW=r.unappend=r.unprepend=r.range=r.replicate=r.makeBy=r.fromArray=r.fromReadonlyNonEmptyArray=r.rotate=r.union=r.sortBy=r.uniq=r.unsafeUpdateAt=r.unsafeInsertAt=r.append=r.appendW=r.prepend=r.prependW=r.isOutOfBound=r.isNonEmpty=void 0,r.filterWithIndex=r.filter=r.groupSort=r.updateLast=r.modifyLast=r.updateHead=r.modifyHead=r.matchRight=r.matchLeft=r.concatAll=r.max=r.min=r.init=r.last=r.tail=r.head=r.apS=r.bind=r.bindTo=r.Do=r.Comonad=r.Alt=r.TraversableWithIndex=r.Traversable=r.FoldableWithIndex=r.Foldable=r.Monad=r.chainFirst=r.Chain=r.Applicative=r.apSecond=r.apFirst=r.Apply=r.FunctorWithIndex=r.Pointed=r.flap=r.Functor=r.getUnionSemigroup=r.getEq=r.getSemigroup=r.getShow=r.URI=r.extract=r.traverseWithIndex=r.sequence=r.traverse=r.reduceRightWithIndex=r.reduceRight=r.reduceWithIndex=r.reduce=void 0,r.nonEmptyArray=r.fold=r.prependToAll=r.snoc=r.cons=r.unsnoc=r.uncons=void 0;var i=e(w),c=e(q);function f(n){return function(r){return r.concat(n)}}function a(n,r){return r?n.concat(r):function(r){return r.concat(n)}}function v(n){return function(r){var t=r.length;if(0===t)return[];for(var u=[],e=r[0],o=[e],i=1;i<t;i++){var c=r[i];n.equals(c,e)?o.push(c):(u.push(o),o=[e=c])}return u.push(o),u}}r.isNonEmpty=function(n){return n.length>0},r.isOutOfBound=function(n,r){return n<0||n>=r.length},r.prependW=function(n){return function(r){return o([n],r)}},r.prepend=r.prependW,r.appendW=function(n){return function(r){return o(o([],r),[n])}},r.append=r.appendW,r.unsafeInsertAt=function(n,t,u){if(r.isNonEmpty(u)){var e=r.fromReadonlyNonEmptyArray(u);return e.splice(n,0,t),e}return[t]},r.unsafeUpdateAt=function(n,t,u){var e=r.fromReadonlyNonEmptyArray(u);return e[n]=t,e},r.uniq=function(n){return function(t){if(1===t.length)return r.copy(t);for(var u=[r.head(t)],e=function(r){u.every((function(t){return!n.equals(t,r)}))&&u.push(r)},o=0,i=r.tail(t);o<i.length;o++)e(i[o]);return u}},r.sortBy=function(n){if(r.isNonEmpty(n)){var t=W.getMonoid();return r.sort(n.reduce(t.concat,t.empty))}return r.copy},r.union=function(n){var t=r.uniq(n);return function(n){return function(r){return t(M.pipe(r,a(n)))}}},r.rotate=function(n){return function(t){var u=t.length,e=Math.round(n)%u;if(r.isOutOfBound(Math.abs(e),t)||0===e)return r.copy(t);if(e<0){var o=r.splitAt(-e)(t);return M.pipe(o[1],a(o[0]))}return r.rotate(e-u)(t)}},r.fromReadonlyNonEmptyArray=i.fromReadonlyNonEmptyArray,r.fromArray=function(n){return r.isNonEmpty(n)?i.some(n):i.none},r.makeBy=function(n){return function(r){for(var t=Math.max(0,Math.floor(r)),u=[n(0)],e=1;e<t;e++)u.push(n(e));return u}},r.replicate=function(n){return r.makeBy((function(){return n}))},r.range=function(n,t){return n<=t?r.makeBy((function(r){return n+r}))(t-n+1):[n]},r.unprepend=function(n){return[r.head(n),r.tail(n)]},r.unappend=function(n){return[r.init(n),r.last(n)]},r.concatW=f,r.concat=a,r.reverse=function(n){return o([r.last(n)],n.slice(0,-1).reverse())},r.group=v,r.groupBy=function(n){return function(r){for(var t={},u=0,e=r;u<e.length;u++){var o=e[u],i=n(o);t.hasOwnProperty(i)?t[i].push(o):t[i]=[o]}return t}},r.sort=function(n){return function(r){return r.slice().sort(n.compare)}},r.insertAt=function(n,t){return function(u){return n<0||n>u.length?i.none:i.some(r.unsafeInsertAt(n,t,u))}},r.updateAt=function(n,t){return r.modifyAt(n,(function(){return t}))},r.modifyAt=function(n,t){return function(u){return r.isOutOfBound(n,u)?i.none:i.some(r.unsafeUpdateAt(n,t(u[n]),u))}},r.copy=r.fromReadonlyNonEmptyArray,r.of=function(n){return[n]},r.zipWith=function(n,r,t){for(var u=[t(n[0],r[0])],e=Math.min(n.length,r.length),o=1;o<e;o++)u[o]=t(n[o],r[o]);return u},r.zip=function n(t,u){return void 0===u?function(r){return n(r,t)}:r.zipWith(t,u,(function(n,r){return[n,r]}))},r.unzip=function(n){for(var r=[n[0][0]],t=[n[0][1]],u=1;u<n.length;u++)r[u]=n[u][0],t[u]=n[u][1];return[r,t]},r.prependAll=function(n){return function(r){for(var t=[n,r[0]],u=1;u<r.length;u++)t.push(n,r[u]);return t}},r.intersperse=function(n){return function(t){var u=r.tail(t);return r.isNonEmpty(u)?M.pipe(u,r.prependAll(n),r.prepend(r.head(t))):r.copy(t)}},r.foldMapWithIndex=c.foldMapWithIndex,r.foldMap=c.foldMap,r.chainWithIndex=function(n){return function(t){for(var u=r.fromReadonlyNonEmptyArray(n(0,r.head(t))),e=1;e<t.length;e++)u.push.apply(u,n(e,t[e]));return u}},r.chop=function(n){return function(t){for(var u=n(t),e=[u[0]],o=u[1];r.isNonEmpty(o);){var i=n(o),c=i[1];e.push(i[0]),o=c}return e}},r.splitAt=function(n){return function(t){var u=Math.max(1,n);return u>=t.length?[r.copy(t),[]]:[M.pipe(t.slice(1,u),r.prepend(r.head(t))),t.slice(u)]}},r.chunksOf=function(n){return r.chop(r.splitAt(n))};var d=function(n,t){return M.pipe(n,r.map(t))},p=function(n,t){return M.pipe(n,r.mapWithIndex(t))},s=function(n,t){return M.pipe(n,r.ap(t))},l=function(n,t){return M.pipe(n,r.chain(t))},m=function(n,t){return M.pipe(n,r.extend(t))},h=function(n,t,u){return M.pipe(n,r.reduce(t,u))},I=function(n){var t=r.foldMap(n);return function(n,r){return M.pipe(n,t(r))}},R=function(n,t,u){return M.pipe(n,r.reduceRight(t,u))},b=function(n){var t=r.traverse(n);return function(n,r){return M.pipe(n,t(r))}},O=function(n,t){return M.pipe(n,r.alt(t))},x=function(n,t,u){return M.pipe(n,r.reduceWithIndex(t,u))},_=function(n){var t=r.foldMapWithIndex(n);return function(n,r){return M.pipe(n,t(r))}},E=function(n,t,u){return M.pipe(n,r.reduceRightWithIndex(t,u))},k=function(n){var t=r.traverseWithIndex(n);return function(n,r){return M.pipe(n,t(r))}};r.altW=function(n){return function(r){return M.pipe(r,f(n()))}},r.alt=r.altW,r.ap=function(n){return r.chain((function(t){return M.pipe(n,r.map(t))}))},r.chain=function(n){return r.chainWithIndex((function(r,t){return n(t)}))},r.extend=function(n){return function(t){for(var u=r.tail(t),e=[n(t)];r.isNonEmpty(u);)e.push(n(u)),u=r.tail(u);return e}},r.duplicate=r.extend(M.identity),r.flatten=r.chain(M.identity),r.map=function(n){return r.mapWithIndex((function(r,t){return n(t)}))},r.mapWithIndex=function(n){return function(t){for(var u=[n(0,r.head(t))],e=1;e<t.length;e++)u.push(n(e,t[e]));return u}},r.reduce=c.reduce,r.reduceWithIndex=c.reduceWithIndex,r.reduceRight=c.reduceRight,r.reduceRightWithIndex=c.reduceRightWithIndex,r.traverse=function(n){var t=r.traverseWithIndex(n);return function(n){return t((function(r,t){return n(t)}))}},r.sequence=function(n){return r.traverseWithIndex(n)((function(n,r){return r}))},r.traverseWithIndex=function(n){return function(t){return function(u){for(var e=n.map(t(0,r.head(u)),r.of),o=1;o<u.length;o++)e=n.ap(n.map(e,(function(n){return function(t){return M.pipe(n,r.append(t))}})),t(o,u[o]));return e}}},r.extract=c.head,r.URI="NonEmptyArray",r.getShow=c.getShow,r.getSemigroup=function(){return{concat:a}},r.getEq=c.getEq,r.getUnionSemigroup=function(n){var t=r.union(n);return{concat:function(n,r){return t(r)(n)}}},r.Functor={URI:r.URI,map:d},r.flap=y.flap(r.Functor),r.Pointed={URI:r.URI,of:r.of},r.FunctorWithIndex={URI:r.URI,map:d,mapWithIndex:p},r.Apply={URI:r.URI,map:d,ap:s},r.apFirst=g.apFirst(r.Apply),r.apSecond=g.apSecond(r.Apply),r.Applicative={URI:r.URI,map:d,ap:s,of:r.of},r.Chain={URI:r.URI,map:d,ap:s,chain:l},r.chainFirst=j.chainFirst(r.Chain),r.Monad={URI:r.URI,map:d,ap:s,of:r.of,chain:l},r.Foldable={URI:r.URI,reduce:h,foldMap:I,reduceRight:R},r.FoldableWithIndex={URI:r.URI,reduce:h,foldMap:I,reduceRight:R,reduceWithIndex:x,foldMapWithIndex:_,reduceRightWithIndex:E},r.Traversable={URI:r.URI,map:d,reduce:h,foldMap:I,reduceRight:R,traverse:b,sequence:r.sequence},r.TraversableWithIndex={URI:r.URI,map:d,mapWithIndex:p,reduce:h,foldMap:I,reduceRight:R,traverse:b,sequence:r.sequence,reduceWithIndex:x,foldMapWithIndex:_,reduceRightWithIndex:E,traverseWithIndex:k},r.Alt={URI:r.URI,map:d,alt:O},r.Comonad={URI:r.URI,map:d,extend:m,extract:r.extract},r.Do=r.of(i.emptyRecord),r.bindTo=y.bindTo(r.Functor),r.bind=j.bind(r.Chain),r.apS=g.apS(r.Apply),r.head=c.head,r.tail=function(n){return n.slice(1)},r.last=c.last,r.init=function(n){return n.slice(0,-1)},r.min=c.min,r.max=c.max,r.concatAll=function(n){return function(r){return r.reduce(n.concat)}},r.matchLeft=function(n){return function(t){return n(r.head(t),r.tail(t))}},r.matchRight=function(n){return function(t){return n(r.init(t),r.last(t))}},r.modifyHead=function(n){return function(t){return o([n(r.head(t))],r.tail(t))}},r.updateHead=function(n){return r.modifyHead((function(){return n}))},r.modifyLast=function(n){return function(t){return M.pipe(r.init(t),r.append(n(r.last(t))))}},r.updateLast=function(n){return r.modifyLast((function(){return n}))},r.groupSort=function(n){var t=r.sort(n),u=v(n);return function(n){return r.isNonEmpty(n)?u(t(n)):[]}},r.filter=function(n){return r.filterWithIndex((function(r,t){return n(t)}))},r.filterWithIndex=function(n){return function(t){return r.fromArray(t.filter((function(r,t){return n(t,r)})))}},r.uncons=r.unprepend,r.unsnoc=r.unappend,r.cons=function(n,t){return void 0===t?r.prepend(n):M.pipe(t,r.prepend(n))},r.snoc=function(n,t){return M.pipe(n,r.append(t))},r.prependToAll=r.prependAll,r.fold=c.concatAll,r.nonEmptyArray={URI:r.URI,of:r.of,map:d,mapWithIndex:p,ap:s,chain:l,extend:m,extract:r.extract,reduce:h,foldMap:I,reduceRight:R,traverse:b,sequence:r.sequence,reduceWithIndex:x,foldMapWithIndex:_,reduceRightWithIndex:E,traverseWithIndex:k,alt:O}})),T=O((function(n,r){Object.defineProperty(r,"__esModule",{value:!0}),r.Field=r.MonoidProduct=r.MonoidSum=r.SemigroupProduct=r.SemigroupSum=r.MagmaSub=r.Show=r.Bounded=r.Ord=r.Eq=r.isNumber=void 0,r.isNumber=function(n){return"number"==typeof n},r.Eq={equals:function(n,r){return n===r}},r.Ord={equals:r.Eq.equals,compare:function(n,r){return n<r?-1:n>r?1:0}},r.Bounded={equals:r.Eq.equals,compare:r.Ord.compare,top:1/0,bottom:-1/0},r.Show={show:function(n){return JSON.stringify(n)}},r.MagmaSub={concat:function(n,r){return n-r}},r.SemigroupSum={concat:function(n,r){return n+r}},r.SemigroupProduct={concat:function(n,r){return n*r}},r.MonoidSum={concat:r.SemigroupSum.concat,empty:0},r.MonoidProduct={concat:r.SemigroupProduct.concat,empty:1},r.Field={add:r.SemigroupSum.concat,zero:0,mul:r.SemigroupProduct.concat,one:1,sub:r.MagmaSub.concat,degree:function(){return 1},div:function(n,r){return n/r},mod:function(n,r){return n%r}}})),A=O((function(n,r){Object.defineProperty(r,"__esModule",{value:!0}),r.right=r.left=r.flap=r.Functor=r.Bifunctor=r.URI=r.bimap=r.mapLeft=r.map=r.separated=void 0,r.separated=function(n,r){return{left:n,right:r}},r.map=function(n){return function(t){return r.separated(r.left(t),n(r.right(t)))}},r.mapLeft=function(n){return function(t){return r.separated(n(r.left(t)),r.right(t))}},r.bimap=function(n,t){return function(u){return r.separated(n(r.left(u)),t(r.right(u)))}},r.URI="Separated",r.Bifunctor={URI:r.URI,mapLeft:function(n,t){return M.pipe(n,r.mapLeft(t))},bimap:function(n,t,u){return M.pipe(n,r.bimap(t,u))}},r.Functor={URI:r.URI,map:function(n,t){return M.pipe(n,r.map(t))}},r.flap=y.flap(r.Functor),r.left=function(n){return n.left},r.right=function(n){return n.right}})),z=O((function(n,r){var t=U&&U.__createBinding||(Object.create?function(n,r,t,u){void 0===u&&(u=t),Object.defineProperty(n,u,{enumerable:!0,get:function(){return r[t]}})}:function(n,r,t,u){void 0===u&&(u=t),n[u]=r[t]}),u=U&&U.__setModuleDefault||(Object.create?function(n,r){Object.defineProperty(n,"default",{enumerable:!0,value:r})}:function(n,r){n.default=r}),e=U&&U.__importStar||function(n){if(n&&n.__esModule)return n;var r={};if(null!=n)for(var e in n)"default"!==e&&Object.prototype.hasOwnProperty.call(n,e)&&t(r,n,e);return u(r,n),r};Object.defineProperty(r,"__esModule",{value:!0}),r.filterE=r.witherDefault=r.wiltDefault=void 0;var o=e(w);r.wiltDefault=function(n,r){return function(t){var u=n.traverse(t);return function(n,e){return t.map(u(n,e),r.separate)}}},r.witherDefault=function(n,r){return function(t){var u=n.traverse(t);return function(n,e){return t.map(u(n,e),r.compact)}}},r.filterE=function(n){return function(r){var t=n.wither(r);return function(n){return function(u){return t(u,(function(t){return r.map(n(t),(function(n){return n?o.some(t):o.none}))}))}}}}})),L=O((function(n,r){Object.defineProperty(r,"__esModule",{value:!0}),r.guard=void 0,r.guard=function(n,r){return function(t){return t?r.of(void 0):n.zero()}}})),N=O((function(n,r){var t=U&&U.__createBinding||(Object.create?function(n,r,t,u){void 0===u&&(u=t),Object.defineProperty(n,u,{enumerable:!0,get:function(){return r[t]}})}:function(n,r,t,u){void 0===u&&(u=t),n[u]=r[t]}),u=U&&U.__setModuleDefault||(Object.create?function(n,r){Object.defineProperty(n,"default",{enumerable:!0,value:r})}:function(n,r){n.default=r}),e=U&&U.__importStar||function(n){if(n&&n.__esModule)return n;var r={};if(null!=n)for(var e in n)"default"!==e&&Object.prototype.hasOwnProperty.call(n,e)&&t(r,n,e);return u(r,n),r},o=U&&U.__spreadArray||function(n,r){for(var t=0,u=r.length,e=n.length;t<u;t++,e++)n[e]=r[t];return n};Object.defineProperty(r,"__esModule",{value:!0}),r.sort=r.lefts=r.rights=r.reverse=r.modifyAt=r.deleteAt=r.updateAt=r.insertAt=r.findLastIndex=r.findLastMap=r.findLast=r.findFirstMap=r.findFirst=r.findIndex=r.dropLeftWhile=r.dropRight=r.dropLeft=r.spanLeft=r.takeLeftWhile=r.takeRight=r.takeLeft=r.init=r.tail=r.last=r.head=r.lookup=r.isOutOfBound=r.size=r.scanRight=r.scanLeft=r.chainWithIndex=r.foldRight=r.matchRight=r.matchRightW=r.foldLeft=r.matchLeft=r.matchLeftW=r.match=r.matchW=r.fromEither=r.fromOption=r.fromPredicate=r.replicate=r.makeBy=r.appendW=r.append=r.prependW=r.prepend=r.isNonEmpty=r.isEmpty=void 0,r.sequence=r.traverse=r.reduceRightWithIndex=r.reduceRight=r.reduceWithIndex=r.foldMap=r.reduce=r.foldMapWithIndex=r.duplicate=r.extend=r.filterWithIndex=r.partitionMapWithIndex=r.partitionMap=r.partitionWithIndex=r.partition=r.compact=r.filterMap=r.filterMapWithIndex=r.filter=r.separate=r.mapWithIndex=r.map=r.flatten=r.chain=r.ap=r.alt=r.altW=r.zero=r.of=r._chainRecBreadthFirst=r._chainRecDepthFirst=r.difference=r.intersection=r.union=r.concat=r.concatW=r.comprehension=r.fromOptionK=r.chunksOf=r.splitAt=r.chop=r.sortBy=r.uniq=r.elem=r.rotate=r.intersperse=r.prependAll=r.unzip=r.zip=r.zipWith=void 0,r.toArray=r.unsafeDeleteAt=r.unsafeUpdateAt=r.unsafeInsertAt=r.fromEitherK=r.FromEither=r.filterE=r.Witherable=r.ChainRecBreadthFirst=r.chainRecBreadthFirst=r.ChainRecDepthFirst=r.chainRecDepthFirst=r.TraversableWithIndex=r.Traversable=r.FoldableWithIndex=r.Foldable=r.FilterableWithIndex=r.Filterable=r.Compactable=r.Extend=r.Alternative=r.guard=r.Zero=r.Alt=r.Unfoldable=r.chainFirst=r.Monad=r.Chain=r.Applicative=r.apSecond=r.apFirst=r.Apply=r.FunctorWithIndex=r.Pointed=r.flap=r.Functor=r.getDifferenceMagma=r.getIntersectionSemigroup=r.getUnionMonoid=r.getUnionSemigroup=r.getOrd=r.getEq=r.getMonoid=r.getSemigroup=r.getShow=r.URI=r.unfold=r.wilt=r.wither=r.traverseWithIndex=void 0,r.readonlyArray=r.prependToAll=r.snoc=r.cons=r.range=r.apS=r.bind=r.bindTo=r.Do=r.exists=r.some=r.every=r.empty=r.fromArray=void 0;var i=e(w),c=e(T),f=e(q);r.isEmpty=function(n){return 0===n.length},r.isNonEmpty=f.isNonEmpty,r.prepend=f.prepend,r.prependW=f.prependW,r.append=f.append,r.appendW=f.appendW,r.makeBy=function(n,t){return n<=0?r.empty:f.makeBy(t)(n)},r.replicate=function(n,t){return r.makeBy(n,(function(){return t}))},r.fromPredicate=function(n){return function(t){return n(t)?[t]:r.empty}},r.fromOption=function(n){return i.isNone(n)?r.empty:[n.value]},r.fromEither=function(n){return i.isLeft(n)?r.empty:[n.right]},r.matchW=function(n,t){return function(u){return r.isNonEmpty(u)?t(u):n()}},r.match=r.matchW,r.matchLeftW=function(n,t){return function(u){return r.isNonEmpty(u)?t(f.head(u),f.tail(u)):n()}},r.matchLeft=r.matchLeftW,r.foldLeft=r.matchLeft,r.matchRightW=function(n,t){return function(u){return r.isNonEmpty(u)?t(f.init(u),f.last(u)):n()}},r.matchRight=r.matchRightW,r.foldRight=r.matchRight,r.chainWithIndex=function(n){return function(t){if(r.isEmpty(t))return r.empty;for(var u=[],e=0;e<t.length;e++)u.push.apply(u,n(e,t[e]));return u}},r.scanLeft=function(n,r){return function(t){var u=t.length,e=new Array(u+1);e[0]=n;for(var o=0;o<u;o++)e[o+1]=r(e[o],t[o]);return e}},r.scanRight=function(n,r){return function(t){var u=t.length,e=new Array(u+1);e[u]=n;for(var o=u-1;o>=0;o--)e[o]=r(t[o],e[o+1]);return e}},r.size=function(n){return n.length},r.isOutOfBound=f.isOutOfBound,r.lookup=function n(t,u){return void 0===u?function(r){return n(t,r)}:r.isOutOfBound(t,u)?i.none:i.some(u[t])},r.head=function(n){return r.isNonEmpty(n)?i.some(f.head(n)):i.none},r.last=function(n){return r.isNonEmpty(n)?i.some(f.last(n)):i.none},r.tail=function(n){return r.isNonEmpty(n)?i.some(f.tail(n)):i.none},r.init=function(n){return r.isNonEmpty(n)?i.some(f.init(n)):i.none},r.takeLeft=function(n){return function(t){return r.isOutOfBound(n,t)?t:0===n?r.empty:t.slice(0,n)}},r.takeRight=function(n){return function(t){return r.isOutOfBound(n,t)?t:0===n?r.empty:t.slice(-n)}},r.takeLeftWhile=function(n){return function(t){for(var u=[],e=0,o=t;e<o.length;e++){var i=o[e];if(!n(i))break;u.push(i)}var c=u.length;return c===t.length?t:0===c?r.empty:u}};var a=function(n,r){for(var t=n.length,u=0;u<t&&r(n[u]);u++);return u};function v(n){return function(r,t){if(void 0===t){var u=v(n);return function(n){return u(r,n)}}for(var e=0;e<t.length;e++)if(n.equals(t[e],r))return!0;return!1}}function d(n){var t=f.union(n);return function(u,e){if(void 0===e){var o=d(n);return function(n){return o(n,u)}}return r.isNonEmpty(u)&&r.isNonEmpty(e)?t(e)(u):r.isNonEmpty(u)?u:e}}function p(n){var r=v(n);return function(t,u){if(void 0===u){var e=p(n);return function(n){return e(n,t)}}return t.filter((function(n){return r(n,u)}))}}function s(n){var r=v(n);return function(t,u){if(void 0===u){var e=s(n);return function(n){return e(n,t)}}return t.filter((function(n){return!r(n,u)}))}}r.spanLeft=function(n){return function(t){var u=r.splitAt(a(t,n))(t);return{init:u[0],rest:u[1]}}},r.dropLeft=function(n){return function(t){return n<=0||r.isEmpty(t)?t:n>=t.length?r.empty:t.slice(n,t.length)}},r.dropRight=function(n){return function(t){return n<=0||r.isEmpty(t)?t:n>=t.length?r.empty:t.slice(0,t.length-n)}},r.dropLeftWhile=function(n){return function(t){var u=a(t,n);return 0===u?t:u===t.length?r.empty:t.slice(u)}},r.findIndex=function(n){return function(r){for(var t=0;t<r.length;t++)if(n(r[t]))return i.some(t);return i.none}},r.findFirst=function(n){return function(r){for(var t=0;t<r.length;t++)if(n(r[t]))return i.some(r[t]);return i.none}},r.findFirstMap=function(n){return function(r){for(var t=0;t<r.length;t++){var u=n(r[t]);if(i.isSome(u))return u}return i.none}},r.findLast=function(n){return function(r){for(var t=r.length-1;t>=0;t--)if(n(r[t]))return i.some(r[t]);return i.none}},r.findLastMap=function(n){return function(r){for(var t=r.length-1;t>=0;t--){var u=n(r[t]);if(i.isSome(u))return u}return i.none}},r.findLastIndex=function(n){return function(r){for(var t=r.length-1;t>=0;t--)if(n(r[t]))return i.some(t);return i.none}},r.insertAt=function(n,r){return function(t){return n<0||n>t.length?i.none:i.some(f.unsafeInsertAt(n,r,t))}},r.updateAt=function(n,t){return r.modifyAt(n,(function(){return t}))},r.deleteAt=function(n){return function(t){return r.isOutOfBound(n,t)?i.none:i.some(r.unsafeDeleteAt(n,t))}},r.modifyAt=function(n,t){return function(u){return r.isOutOfBound(n,u)?i.none:i.some(r.unsafeUpdateAt(n,t(u[n]),u))}},r.reverse=function(n){return n.length<=1?n:n.slice().reverse()},r.rights=function(n){for(var r=[],t=0;t<n.length;t++){var u=n[t];"Right"===u._tag&&r.push(u.right)}return r},r.lefts=function(n){for(var r=[],t=0;t<n.length;t++){var u=n[t];"Left"===u._tag&&r.push(u.left)}return r},r.sort=function(n){return function(r){return r.length<=1?r:r.slice().sort(n.compare)}},r.zipWith=function(n,r,t){for(var u=[],e=Math.min(n.length,r.length),o=0;o<e;o++)u[o]=t(n[o],r[o]);return u},r.zip=function n(t,u){return void 0===u?function(r){return n(r,t)}:r.zipWith(t,u,(function(n,r){return[n,r]}))},r.unzip=function(n){for(var r=[],t=[],u=0;u<n.length;u++)r[u]=n[u][0],t[u]=n[u][1];return[r,t]},r.prependAll=function(n){var t=f.prependAll(n);return function(n){return r.isNonEmpty(n)?t(n):n}},r.intersperse=function(n){var t=f.intersperse(n);return function(n){return r.isNonEmpty(n)?t(n):n}},r.rotate=function(n){var t=f.rotate(n);return function(n){return r.isNonEmpty(n)?t(n):n}},r.elem=v,r.uniq=function(n){var t=f.uniq(n);return function(n){return r.isNonEmpty(n)?t(n):n}},r.sortBy=function(n){var t=f.sortBy(n);return function(n){return r.isNonEmpty(n)?t(n):n}},r.chop=function(n){var t=f.chop(n);return function(n){return r.isNonEmpty(n)?t(n):r.empty}},r.splitAt=function(n){return function(t){return n>=1&&r.isNonEmpty(t)?f.splitAt(n)(t):r.isEmpty(t)?[t,r.empty]:[r.empty,t]}},r.chunksOf=function(n){var t=f.chunksOf(n);return function(n){return r.isNonEmpty(n)?t(n):r.empty}},r.fromOptionK=function(n){return function(){for(var t=[],u=0;u<arguments.length;u++)t[u]=arguments[u];return r.fromOption(n.apply(void 0,t))}},r.comprehension=function(n,t,u){void 0===u&&(u=function(){return!0});var e=function(n,o){return r.isNonEmpty(o)?M.pipe(f.head(o),r.chain((function(t){return e(M.pipe(n,r.append(t)),f.tail(o))}))):u.apply(void 0,n)?[t.apply(void 0,n)]:r.empty};return e(r.empty,n)},r.concatW=function(n){return function(t){return r.isEmpty(t)?n:r.isEmpty(n)?t:t.concat(n)}},r.concat=r.concatW,r.union=d,r.intersection=p,r.difference=s;var l=function(n,t){return M.pipe(n,r.map(t))},m=function(n,t){return M.pipe(n,r.mapWithIndex(t))},h=function(n,t){return M.pipe(n,r.ap(t))},I=function(n,t){return M.pipe(n,r.chain(t))},R=function(n,t){return M.pipe(n,r.filter(t))},b=function(n,t){return M.pipe(n,r.filterMap(t))},O=function(n,t){return M.pipe(n,r.partition(t))},E=function(n,t){return M.pipe(n,r.partitionMap(t))},k=function(n,t){return M.pipe(n,r.partitionWithIndex(t))},P=function(n,t){return M.pipe(n,r.partitionMapWithIndex(t))},N=function(n,t){return M.pipe(n,r.alt(t))},C=function(n,t,u){return M.pipe(n,r.reduce(t,u))},S=function(n){var t=r.foldMap(n);return function(n,r){return M.pipe(n,t(r))}},D=function(n,t,u){return M.pipe(n,r.reduceRight(t,u))},F=function(n,t,u){return M.pipe(n,r.reduceWithIndex(t,u))},H=function(n){var t=r.foldMapWithIndex(n);return function(n,r){return M.pipe(n,t(r))}},J=function(n,t,u){return M.pipe(n,r.reduceRightWithIndex(t,u))},$=function(n,t){return M.pipe(n,r.filterMapWithIndex(t))},G=function(n,t){return M.pipe(n,r.filterWithIndex(t))},B=function(n,t){return M.pipe(n,r.extend(t))},K=function(n){var t=r.traverse(n);return function(n,r){return M.pipe(n,t(r))}},Q=function(n){var t=r.traverseWithIndex(n);return function(n,r){return M.pipe(n,t(r))}};r._chainRecDepthFirst=function(n,t){return M.pipe(n,r.chainRecDepthFirst(t))},r._chainRecBreadthFirst=function(n,t){return M.pipe(n,r.chainRecBreadthFirst(t))},r.of=f.of,r.zero=function(){return r.empty},r.altW=function(n){return function(r){return r.concat(n())}},r.alt=r.altW,r.ap=function(n){return r.chain((function(t){return M.pipe(n,r.map(t))}))},r.chain=function(n){return function(t){return M.pipe(t,r.chainWithIndex((function(r,t){return n(t)})))}},r.flatten=r.chain(M.identity),r.map=function(n){return function(r){return r.map((function(r){return n(r)}))}},r.mapWithIndex=function(n){return function(r){return r.map((function(r,t){return n(t,r)}))}},r.separate=function(n){for(var r=[],t=[],u=0,e=n;u<e.length;u++){var o=e[u];"Left"===o._tag?r.push(o.left):t.push(o.right)}return A.separated(r,t)},r.filter=function(n){return function(r){return r.filter(n)}},r.filterMapWithIndex=function(n){return function(r){for(var t=[],u=0;u<r.length;u++){var e=n(u,r[u]);i.isSome(e)&&t.push(e.value)}return t}},r.filterMap=function(n){return r.filterMapWithIndex((function(r,t){return n(t)}))},r.compact=r.filterMap(M.identity),r.partition=function(n){return r.partitionWithIndex((function(r,t){return n(t)}))},r.partitionWithIndex=function(n){return function(r){for(var t=[],u=[],e=0;e<r.length;e++){var o=r[e];n(e,o)?u.push(o):t.push(o)}return A.separated(t,u)}},r.partitionMap=function(n){return r.partitionMapWithIndex((function(r,t){return n(t)}))},r.partitionMapWithIndex=function(n){return function(r){for(var t=[],u=[],e=0;e<r.length;e++){var o=n(e,r[e]);"Left"===o._tag?t.push(o.left):u.push(o.right)}return A.separated(t,u)}},r.filterWithIndex=function(n){return function(r){return r.filter((function(r,t){return n(t,r)}))}},r.extend=function(n){return function(r){return r.map((function(t,u){return n(r.slice(u))}))}},r.duplicate=r.extend(M.identity),r.foldMapWithIndex=function(n){return function(r){return function(t){return t.reduce((function(t,u,e){return n.concat(t,r(e,u))}),n.empty)}}},r.reduce=function(n,t){return r.reduceWithIndex(n,(function(n,r,u){return t(r,u)}))},r.foldMap=function(n){var t=r.foldMapWithIndex(n);return function(n){return t((function(r,t){return n(t)}))}},r.reduceWithIndex=function(n,r){return function(t){for(var u=t.length,e=n,o=0;o<u;o++)e=r(o,e,t[o]);return e}},r.reduceRight=function(n,t){return r.reduceRightWithIndex(n,(function(n,r,u){return t(r,u)}))},r.reduceRightWithIndex=function(n,r){return function(t){return t.reduceRight((function(n,t,u){return r(u,t,n)}),n)}},r.traverse=function(n){var t=r.traverseWithIndex(n);return function(n){return t((function(r,t){return n(t)}))}},r.sequence=function(n){return function(t){return C(t,n.of(r.zero()),(function(t,u){return n.ap(n.map(t,(function(n){return function(t){return M.pipe(n,r.append(t))}})),u)}))}},r.traverseWithIndex=function(n){return function(t){return r.reduceWithIndex(n.of(r.zero()),(function(u,e,o){return n.ap(n.map(e,(function(n){return function(t){return M.pipe(n,r.append(t))}})),t(u,o))}))}},r.wither=function(n){var r=V(n);return function(n){return function(t){return r(t,n)}}},r.wilt=function(n){var r=X(n);return function(n){return function(t){return r(t,n)}}},r.unfold=function(n,r){for(var t=[],u=n;;){var e=r(u);if(!i.isSome(e))break;var o=e.value,c=o[1];t.push(o[0]),u=c}return t},r.URI="ReadonlyArray",r.getShow=function(n){return{show:function(r){return"["+r.map(n.show).join(", ")+"]"}}},r.getSemigroup=function(){return{concat:function(n,t){return r.isEmpty(n)?t:r.isEmpty(t)?n:n.concat(t)}}},r.getMonoid=function(){return{concat:r.getSemigroup().concat,empty:r.empty}},r.getEq=function(n){return _.fromEquals((function(r,t){return r.length===t.length&&r.every((function(r,u){return n.equals(r,t[u])}))}))},r.getOrd=function(n){return W.fromCompare((function(r,t){for(var u=r.length,e=t.length,o=Math.min(u,e),i=0;i<o;i++){var f=n.compare(r[i],t[i]);if(0!==f)return f}return c.Ord.compare(u,e)}))},r.getUnionSemigroup=function(n){var r=d(n);return{concat:function(n,t){return r(t)(n)}}},r.getUnionMonoid=function(n){return{concat:r.getUnionSemigroup(n).concat,empty:r.empty}},r.getIntersectionSemigroup=function(n){var r=p(n);return{concat:function(n,t){return r(t)(n)}}},r.getDifferenceMagma=function(n){var r=s(n);return{concat:function(n,t){return r(t)(n)}}},r.Functor={URI:r.URI,map:l},r.flap=y.flap(r.Functor),r.Pointed={URI:r.URI,of:r.of},r.FunctorWithIndex={URI:r.URI,map:l,mapWithIndex:m},r.Apply={URI:r.URI,map:l,ap:h},r.apFirst=g.apFirst(r.Apply),r.apSecond=g.apSecond(r.Apply),r.Applicative={URI:r.URI,map:l,ap:h,of:r.of},r.Chain={URI:r.URI,map:l,ap:h,chain:I},r.Monad={URI:r.URI,map:l,ap:h,of:r.of,chain:I},r.chainFirst=j.chainFirst(r.Chain),r.Unfoldable={URI:r.URI,unfold:r.unfold},r.Alt={URI:r.URI,map:l,alt:N},r.Zero={URI:r.URI,zero:r.zero},r.guard=L.guard(r.Zero,r.Pointed),r.Alternative={URI:r.URI,map:l,ap:h,of:r.of,alt:N,zero:r.zero},r.Extend={URI:r.URI,map:l,extend:B},r.Compactable={URI:r.URI,compact:r.compact,separate:r.separate},r.Filterable={URI:r.URI,map:l,compact:r.compact,separate:r.separate,filter:R,filterMap:b,partition:O,partitionMap:E},r.FilterableWithIndex={URI:r.URI,map:l,mapWithIndex:m,compact:r.compact,separate:r.separate,filter:R,filterMap:b,partition:O,partitionMap:E,partitionMapWithIndex:P,partitionWithIndex:k,filterMapWithIndex:$,filterWithIndex:G},r.Foldable={URI:r.URI,reduce:C,foldMap:S,reduceRight:D},r.FoldableWithIndex={URI:r.URI,reduce:C,foldMap:S,reduceRight:D,reduceWithIndex:F,foldMapWithIndex:H,reduceRightWithIndex:J},r.Traversable={URI:r.URI,map:l,reduce:C,foldMap:S,reduceRight:D,traverse:K,sequence:r.sequence},r.TraversableWithIndex={URI:r.URI,map:l,mapWithIndex:m,reduce:C,foldMap:S,reduceRight:D,reduceWithIndex:F,foldMapWithIndex:H,reduceRightWithIndex:J,traverse:K,sequence:r.sequence,traverseWithIndex:Q},r.chainRecDepthFirst=function(n){return function(r){for(var t=o([],n(r)),u=[];t.length>0;){var e=t.shift();i.isLeft(e)?t.unshift.apply(t,n(e.left)):u.push(e.right)}return u}},r.ChainRecDepthFirst={URI:r.URI,map:l,ap:h,chain:I,chainRec:r._chainRecDepthFirst},r.chainRecBreadthFirst=function(n){return function(r){var t=n(r),u=[],e=[];function o(r){i.isLeft(r)?n(r.left).forEach((function(n){return u.push(n)})):e.push(r.right)}for(var c=0,f=t;c<f.length;c++)o(f[c]);for(;u.length>0;)o(u.shift());return e}},r.ChainRecBreadthFirst={URI:r.URI,map:l,ap:h,chain:I,chainRec:r._chainRecBreadthFirst};var V=z.witherDefault(r.Traversable,r.Compactable),X=z.wiltDefault(r.Traversable,r.Compactable);r.Witherable={URI:r.URI,map:l,compact:r.compact,separate:r.separate,filter:R,filterMap:b,partition:O,partitionMap:E,reduce:C,foldMap:S,reduceRight:D,traverse:K,sequence:r.sequence,wither:V,wilt:X},r.filterE=z.filterE(r.Witherable),r.FromEither={URI:r.URI,fromEither:r.fromEither},r.fromEitherK=x.fromEitherK(r.FromEither),r.unsafeInsertAt=f.unsafeInsertAt,r.unsafeUpdateAt=function(n,t,u){return r.isNonEmpty(u)?f.unsafeUpdateAt(n,t,u):u},r.unsafeDeleteAt=function(n,r){var t=r.slice();return t.splice(n,1),t},r.toArray=function(n){return n.slice()},r.fromArray=function(n){return r.isEmpty(n)?r.empty:n.slice()},r.empty=f.empty,r.every=function(n){return function(r){return r.every(n)}},r.some=function(n){return function(r){return r.some(n)}},r.exists=r.some,r.Do=r.of(i.emptyRecord),r.bindTo=y.bindTo(r.Functor),r.bind=j.bind(r.Chain),r.apS=g.apS(r.Apply),r.range=f.range,r.cons=f.cons,r.snoc=f.snoc,r.prependToAll=r.prependAll,r.readonlyArray={URI:r.URI,compact:r.compact,separate:r.separate,map:l,ap:h,of:r.of,chain:I,filter:R,filterMap:b,partition:O,partitionMap:E,mapWithIndex:m,partitionMapWithIndex:P,partitionWithIndex:k,filterMapWithIndex:$,filterWithIndex:G,alt:N,zero:r.zero,unfold:r.unfold,reduce:C,foldMap:S,reduceRight:D,traverse:K,sequence:r.sequence,reduceWithIndex:F,foldMapWithIndex:H,reduceRightWithIndex:J,traverseWithIndex:Q,extend:B,wither:V,wilt:X}})),C=O((function(n,r){var t=U&&U.__createBinding||(Object.create?function(n,r,t,u){void 0===u&&(u=t),Object.defineProperty(n,u,{enumerable:!0,get:function(){return r[t]}})}:function(n,r,t,u){void 0===u&&(u=t),n[u]=r[t]}),u=U&&U.__setModuleDefault||(Object.create?function(n,r){Object.defineProperty(n,"default",{enumerable:!0,value:r})}:function(n,r){n.default=r}),e=U&&U.__importStar||function(n){if(n&&n.__esModule)return n;var r={};if(null!=n)for(var e in n)"default"!==e&&Object.prototype.hasOwnProperty.call(n,e)&&t(r,n,e);return u(r,n),r};Object.defineProperty(r,"__esModule",{value:!0}),r.lefts=r.rights=r.reverse=r.modifyAt=r.deleteAt=r.updateAt=r.insertAt=r.copy=r.findLastIndex=r.findLastMap=r.findLast=r.findFirstMap=r.findFirst=r.findIndex=r.dropLeftWhile=r.dropRight=r.dropLeft=r.spanLeft=r.takeLeftWhile=r.takeRight=r.takeLeft=r.init=r.tail=r.last=r.head=r.lookup=r.isOutOfBound=r.size=r.scanRight=r.scanLeft=r.chainWithIndex=r.foldRight=r.matchRight=r.matchRightW=r.foldLeft=r.matchLeft=r.matchLeftW=r.match=r.matchW=r.fromEither=r.fromOption=r.fromPredicate=r.replicate=r.makeBy=r.appendW=r.append=r.prependW=r.prepend=r.isNonEmpty=r.isEmpty=void 0,r.traverseWithIndex=r.sequence=r.traverse=r.reduceRightWithIndex=r.reduceRight=r.reduceWithIndex=r.reduce=r.foldMapWithIndex=r.foldMap=r.duplicate=r.extend=r.filterWithIndex=r.alt=r.altW=r.partitionMapWithIndex=r.partitionMap=r.partitionWithIndex=r.partition=r.filter=r.separate=r.compact=r.filterMap=r.filterMapWithIndex=r.mapWithIndex=r.flatten=r.chain=r.ap=r.map=r.zero=r.of=r.difference=r.intersection=r.union=r.concat=r.concatW=r.comprehension=r.fromOptionK=r.chunksOf=r.splitAt=r.chop=r.sortBy=r.uniq=r.elem=r.rotate=r.intersperse=r.prependAll=r.unzip=r.zip=r.zipWith=r.sort=void 0,r.some=r.every=r.unsafeDeleteAt=r.unsafeUpdateAt=r.unsafeInsertAt=r.fromEitherK=r.FromEither=r.filterE=r.ChainRecBreadthFirst=r.chainRecBreadthFirst=r.ChainRecDepthFirst=r.chainRecDepthFirst=r.Witherable=r.TraversableWithIndex=r.Traversable=r.FoldableWithIndex=r.Foldable=r.FilterableWithIndex=r.Filterable=r.Compactable=r.Extend=r.Alternative=r.guard=r.Zero=r.Alt=r.Unfoldable=r.Monad=r.chainFirst=r.Chain=r.Applicative=r.apSecond=r.apFirst=r.Apply=r.FunctorWithIndex=r.Pointed=r.flap=r.Functor=r.getDifferenceMagma=r.getIntersectionSemigroup=r.getUnionMonoid=r.getUnionSemigroup=r.getOrd=r.getEq=r.getMonoid=r.getSemigroup=r.getShow=r.URI=r.unfold=r.wilt=r.wither=void 0,r.array=r.prependToAll=r.snoc=r.cons=r.empty=r.range=r.apS=r.bind=r.bindTo=r.Do=r.exists=void 0;var o=e(w),i=e(P),c=e(N);r.isEmpty=function(n){return 0===n.length},r.isNonEmpty=i.isNonEmpty,r.prepend=i.prepend,r.prependW=i.prependW,r.append=i.append,r.appendW=i.appendW,r.makeBy=function(n,r){return n<=0?[]:i.makeBy(r)(n)},r.replicate=function(n,t){return r.makeBy(n,(function(){return t}))},r.fromPredicate=function(n){return function(r){return n(r)?[r]:[]}},r.fromOption=function(n){return o.isNone(n)?[]:[n.value]},r.fromEither=function(n){return o.isLeft(n)?[]:[n.right]},r.matchW=function(n,t){return function(u){return r.isNonEmpty(u)?t(u):n()}},r.match=r.matchW,r.matchLeftW=function(n,t){return function(u){return r.isNonEmpty(u)?t(i.head(u),i.tail(u)):n()}},r.matchLeft=r.matchLeftW,r.foldLeft=r.matchLeft,r.matchRightW=function(n,t){return function(u){return r.isNonEmpty(u)?t(i.init(u),i.last(u)):n()}},r.matchRight=r.matchRightW,r.foldRight=r.matchRight,r.chainWithIndex=function(n){return function(r){for(var t=[],u=0;u<r.length;u++)t.push.apply(t,n(u,r[u]));return t}},r.scanLeft=function(n,r){return function(t){var u=t.length,e=new Array(u+1);e[0]=n;for(var o=0;o<u;o++)e[o+1]=r(e[o],t[o]);return e}},r.scanRight=function(n,r){return function(t){var u=t.length,e=new Array(u+1);e[u]=n;for(var o=u-1;o>=0;o--)e[o]=r(t[o],e[o+1]);return e}},r.size=function(n){return n.length},r.isOutOfBound=i.isOutOfBound,r.lookup=c.lookup,r.head=c.head,r.last=c.last,r.tail=function(n){return r.isNonEmpty(n)?o.some(i.tail(n)):o.none},r.init=function(n){return r.isNonEmpty(n)?o.some(i.init(n)):o.none},r.takeLeft=function(n){return function(t){return r.isOutOfBound(n,t)?r.copy(t):t.slice(0,n)}},r.takeRight=function(n){return function(t){return r.isOutOfBound(n,t)?r.copy(t):0===n?[]:t.slice(-n)}},r.takeLeftWhile=function(n){return function(r){for(var t=[],u=0,e=r;u<e.length;u++){var o=e[u];if(!n(o))break;t.push(o)}return t}};var f=function(n,r){for(var t=n.length,u=0;u<t&&r(n[u]);u++);return u};function a(n){var t=i.union(n);return function(u,e){if(void 0===e){var o=a(n);return function(n){return o(n,u)}}return r.isNonEmpty(u)&&r.isNonEmpty(e)?t(e)(u):r.isNonEmpty(u)?r.copy(u):r.copy(e)}}function v(n){var t=r.elem(n);return function(r,u){if(void 0===u){var e=v(n);return function(n){return e(n,r)}}return r.filter((function(n){return t(n,u)}))}}function d(n){var t=r.elem(n);return function(r,u){if(void 0===u){var e=d(n);return function(n){return e(n,r)}}return r.filter((function(n){return!t(n,u)}))}}r.spanLeft=function(n){return function(t){var u=r.splitAt(f(t,n))(t);return{init:u[0],rest:u[1]}}},r.dropLeft=function(n){return function(t){return n<=0||r.isEmpty(t)?r.copy(t):n>=t.length?[]:t.slice(n,t.length)}},r.dropRight=function(n){return function(t){return n<=0||r.isEmpty(t)?r.copy(t):n>=t.length?[]:t.slice(0,t.length-n)}},r.dropLeftWhile=function(n){return function(r){return r.slice(f(r,n))}},r.findIndex=c.findIndex,r.findFirst=function(n){return c.findFirst(n)},r.findFirstMap=c.findFirstMap,r.findLast=function(n){return c.findLast(n)},r.findLastMap=c.findLastMap,r.findLastIndex=c.findLastIndex,r.copy=function(n){return n.slice()},r.insertAt=function(n,t){return function(u){return n<0||n>u.length?o.none:o.some(r.unsafeInsertAt(n,t,u))}},r.updateAt=function(n,t){return r.modifyAt(n,(function(){return t}))},r.deleteAt=function(n){return function(t){return r.isOutOfBound(n,t)?o.none:o.some(r.unsafeDeleteAt(n,t))}},r.modifyAt=function(n,t){return function(u){return r.isOutOfBound(n,u)?o.none:o.some(r.unsafeUpdateAt(n,t(u[n]),u))}},r.reverse=function(n){return r.isEmpty(n)?[]:n.slice().reverse()},r.rights=function(n){for(var r=[],t=0;t<n.length;t++){var u=n[t];"Right"===u._tag&&r.push(u.right)}return r},r.lefts=function(n){for(var r=[],t=0;t<n.length;t++){var u=n[t];"Left"===u._tag&&r.push(u.left)}return r},r.sort=function(n){return function(t){return t.length<=1?r.copy(t):t.slice().sort(n.compare)}},r.zipWith=function(n,r,t){for(var u=[],e=Math.min(n.length,r.length),o=0;o<e;o++)u[o]=t(n[o],r[o]);return u},r.zip=function n(t,u){return void 0===u?function(r){return n(r,t)}:r.zipWith(t,u,(function(n,r){return[n,r]}))},r.unzip=function(n){for(var r=[],t=[],u=0;u<n.length;u++)r[u]=n[u][0],t[u]=n[u][1];return[r,t]},r.prependAll=function(n){var t=i.prependAll(n);return function(n){return r.isNonEmpty(n)?t(n):[]}},r.intersperse=function(n){var t=i.intersperse(n);return function(n){return r.isNonEmpty(n)?t(n):r.copy(n)}},r.rotate=function(n){var t=i.rotate(n);return function(n){return r.isNonEmpty(n)?t(n):r.copy(n)}},r.elem=c.elem,r.uniq=function(n){var t=i.uniq(n);return function(n){return r.isNonEmpty(n)?t(n):r.copy(n)}},r.sortBy=function(n){var t=i.sortBy(n);return function(n){return r.isNonEmpty(n)?t(n):r.copy(n)}},r.chop=function(n){var t=i.chop(n);return function(n){return r.isNonEmpty(n)?t(n):[]}},r.splitAt=function(n){return function(t){return n>=1&&r.isNonEmpty(t)?i.splitAt(n)(t):r.isEmpty(t)?[r.copy(t),[]]:[[],r.copy(t)]}},r.chunksOf=function(n){var t=i.chunksOf(n);return function(n){return r.isNonEmpty(n)?t(n):[]}},r.fromOptionK=function(n){return function(){for(var t=[],u=0;u<arguments.length;u++)t[u]=arguments[u];return r.fromOption(n.apply(void 0,t))}},r.comprehension=function(n,t,u){void 0===u&&(u=function(){return!0});var e=function(n,o){return r.isNonEmpty(o)?M.pipe(i.head(o),r.chain((function(t){return e(M.pipe(n,r.append(t)),i.tail(o))}))):u.apply(void 0,n)?[t.apply(void 0,n)]:[]};return e([],n)},r.concatW=function(n){return function(t){return r.isEmpty(t)?r.copy(n):r.isEmpty(n)?r.copy(t):t.concat(n)}},r.concat=r.concatW,r.union=a,r.intersection=v,r.difference=d;var p=function(n,t){return M.pipe(n,r.map(t))},s=function(n,t){return M.pipe(n,r.mapWithIndex(t))},l=function(n,t){return M.pipe(n,r.ap(t))},m=function(n,t){return M.pipe(n,r.chain(t))},h=function(n,t){return M.pipe(n,r.filter(t))},I=function(n,t){return M.pipe(n,r.filterMap(t))},R=function(n,t){return M.pipe(n,r.partition(t))},b=function(n,t){return M.pipe(n,r.partitionMap(t))},O=function(n,t){return M.pipe(n,r.partitionWithIndex(t))},_=function(n,t){return M.pipe(n,r.partitionMapWithIndex(t))},W=function(n,t){return M.pipe(n,r.alt(t))},E=function(n,t,u){return M.pipe(n,r.reduce(t,u))},k=function(n){var t=r.foldMap(n);return function(n,r){return M.pipe(n,t(r))}},q=function(n,t,u){return M.pipe(n,r.reduceRight(t,u))},T=function(n,t,u){return M.pipe(n,r.reduceWithIndex(t,u))},C=function(n){var t=r.foldMapWithIndex(n);return function(n,r){return M.pipe(n,t(r))}},S=function(n,t,u){return M.pipe(n,r.reduceRightWithIndex(t,u))},D=function(n,t){return M.pipe(n,r.filterMapWithIndex(t))},F=function(n,t){return M.pipe(n,r.filterWithIndex(t))},H=function(n,t){return M.pipe(n,r.extend(t))},J=function(n){var t=r.traverse(n);return function(n,r){return M.pipe(n,t(r))}},$=function(n){var t=r.traverseWithIndex(n);return function(n,r){return M.pipe(n,t(r))}},G=c._chainRecDepthFirst,B=c._chainRecBreadthFirst;r.of=i.of,r.zero=function(){return[]},r.map=function(n){return function(r){return r.map((function(r){return n(r)}))}},r.ap=function(n){return r.chain((function(t){return M.pipe(n,r.map(t))}))},r.chain=function(n){return function(t){return M.pipe(t,r.chainWithIndex((function(r,t){return n(t)})))}},r.flatten=r.chain(M.identity),r.mapWithIndex=function(n){return function(r){return r.map((function(r,t){return n(t,r)}))}},r.filterMapWithIndex=function(n){return function(r){for(var t=[],u=0;u<r.length;u++){var e=n(u,r[u]);o.isSome(e)&&t.push(e.value)}return t}},r.filterMap=function(n){return r.filterMapWithIndex((function(r,t){return n(t)}))},r.compact=r.filterMap(M.identity),r.separate=function(n){for(var r=[],t=[],u=0,e=n;u<e.length;u++){var o=e[u];"Left"===o._tag?r.push(o.left):t.push(o.right)}return A.separated(r,t)},r.filter=function(n){return function(r){return r.filter(n)}},r.partition=function(n){return r.partitionWithIndex((function(r,t){return n(t)}))},r.partitionWithIndex=function(n){return function(r){for(var t=[],u=[],e=0;e<r.length;e++){var o=r[e];n(e,o)?u.push(o):t.push(o)}return A.separated(t,u)}},r.partitionMap=function(n){return r.partitionMapWithIndex((function(r,t){return n(t)}))},r.partitionMapWithIndex=function(n){return function(r){for(var t=[],u=[],e=0;e<r.length;e++){var o=n(e,r[e]);"Left"===o._tag?t.push(o.left):u.push(o.right)}return A.separated(t,u)}},r.altW=function(n){return function(r){return r.concat(n())}},r.alt=r.altW,r.filterWithIndex=function(n){return function(r){return r.filter((function(r,t){return n(t,r)}))}},r.extend=function(n){return function(r){return r.map((function(t,u){return n(r.slice(u))}))}},r.duplicate=r.extend(M.identity),r.foldMap=c.foldMap,r.foldMapWithIndex=c.foldMapWithIndex,r.reduce=c.reduce,r.reduceWithIndex=c.reduceWithIndex,r.reduceRight=c.reduceRight,r.reduceRightWithIndex=c.reduceRightWithIndex,r.traverse=function(n){var t=r.traverseWithIndex(n);return function(n){return t((function(r,t){return n(t)}))}},r.sequence=function(n){return function(t){return E(t,n.of(r.zero()),(function(t,u){return n.ap(n.map(t,(function(n){return function(t){return M.pipe(n,r.append(t))}})),u)}))}},r.traverseWithIndex=function(n){return function(t){return r.reduceWithIndex(n.of(r.zero()),(function(u,e,o){return n.ap(n.map(e,(function(n){return function(t){return M.pipe(n,r.append(t))}})),t(u,o))}))}},r.wither=function(n){var r=K(n);return function(n){return function(t){return r(t,n)}}},r.wilt=function(n){var r=Q(n);return function(n){return function(t){return r(t,n)}}},r.unfold=function(n,r){for(var t=[],u=n;;){var e=r(u);if(!o.isSome(e))break;var i=e.value,c=i[1];t.push(i[0]),u=c}return t},r.URI="Array",r.getShow=c.getShow,r.getSemigroup=function(){return{concat:function(n,r){return n.concat(r)}}},r.getMonoid=function(){return{concat:r.getSemigroup().concat,empty:[]}},r.getEq=c.getEq,r.getOrd=c.getOrd,r.getUnionSemigroup=function(n){var r=a(n);return{concat:function(n,t){return r(t)(n)}}},r.getUnionMonoid=function(n){return{concat:r.getUnionSemigroup(n).concat,empty:[]}},r.getIntersectionSemigroup=function(n){var r=v(n);return{concat:function(n,t){return r(t)(n)}}},r.getDifferenceMagma=function(n){var r=d(n);return{concat:function(n,t){return r(t)(n)}}},r.Functor={URI:r.URI,map:p},r.flap=y.flap(r.Functor),r.Pointed={URI:r.URI,of:r.of},r.FunctorWithIndex={URI:r.URI,map:p,mapWithIndex:s},r.Apply={URI:r.URI,map:p,ap:l},r.apFirst=g.apFirst(r.Apply),r.apSecond=g.apSecond(r.Apply),r.Applicative={URI:r.URI,map:p,ap:l,of:r.of},r.Chain={URI:r.URI,map:p,ap:l,chain:m},r.chainFirst=j.chainFirst(r.Chain),r.Monad={URI:r.URI,map:p,ap:l,of:r.of,chain:m},r.Unfoldable={URI:r.URI,unfold:r.unfold},r.Alt={URI:r.URI,map:p,alt:W},r.Zero={URI:r.URI,zero:r.zero},r.guard=L.guard(r.Zero,r.Pointed),r.Alternative={URI:r.URI,map:p,ap:l,of:r.of,alt:W,zero:r.zero},r.Extend={URI:r.URI,map:p,extend:H},r.Compactable={URI:r.URI,compact:r.compact,separate:r.separate},r.Filterable={URI:r.URI,map:p,compact:r.compact,separate:r.separate,filter:h,filterMap:I,partition:R,partitionMap:b},r.FilterableWithIndex={URI:r.URI,map:p,mapWithIndex:s,compact:r.compact,separate:r.separate,filter:h,filterMap:I,partition:R,partitionMap:b,partitionMapWithIndex:_,partitionWithIndex:O,filterMapWithIndex:D,filterWithIndex:F},r.Foldable={URI:r.URI,reduce:E,foldMap:k,reduceRight:q},r.FoldableWithIndex={URI:r.URI,reduce:E,foldMap:k,reduceRight:q,reduceWithIndex:T,foldMapWithIndex:C,reduceRightWithIndex:S},r.Traversable={URI:r.URI,map:p,reduce:E,foldMap:k,reduceRight:q,traverse:J,sequence:r.sequence},r.TraversableWithIndex={URI:r.URI,map:p,mapWithIndex:s,reduce:E,foldMap:k,reduceRight:q,reduceWithIndex:T,foldMapWithIndex:C,reduceRightWithIndex:S,traverse:J,sequence:r.sequence,traverseWithIndex:$};var K=z.witherDefault(r.Traversable,r.Compactable),Q=z.wiltDefault(r.Traversable,r.Compactable);r.Witherable={URI:r.URI,map:p,compact:r.compact,separate:r.separate,filter:h,filterMap:I,partition:R,partitionMap:b,reduce:E,foldMap:k,reduceRight:q,traverse:J,sequence:r.sequence,wither:K,wilt:Q},r.chainRecDepthFirst=c.chainRecDepthFirst,r.ChainRecDepthFirst={URI:r.URI,map:p,ap:l,chain:m,chainRec:G},r.chainRecBreadthFirst=c.chainRecBreadthFirst,r.ChainRecBreadthFirst={URI:r.URI,map:p,ap:l,chain:m,chainRec:B},r.filterE=z.filterE(r.Witherable),r.FromEither={URI:r.URI,fromEither:r.fromEither},r.fromEitherK=x.fromEitherK(r.FromEither),r.unsafeInsertAt=i.unsafeInsertAt,r.unsafeUpdateAt=function(n,t,u){return r.isNonEmpty(u)?i.unsafeUpdateAt(n,t,u):[]},r.unsafeDeleteAt=function(n,r){var t=r.slice();return t.splice(n,1),t},r.every=c.every,r.some=function(n){return function(r){return r.some(n)}},r.exists=r.some,r.Do=r.of(o.emptyRecord),r.bindTo=y.bindTo(r.Functor),r.bind=j.bind(r.Chain),r.apS=g.apS(r.Apply),r.range=i.range,r.empty=[],r.cons=i.cons,r.snoc=i.snoc,r.prependToAll=r.prependAll,r.array={URI:r.URI,compact:r.compact,separate:r.separate,map:p,ap:l,of:r.of,chain:m,filter:h,filterMap:I,partition:R,partitionMap:b,mapWithIndex:s,partitionMapWithIndex:_,partitionWithIndex:O,filterMapWithIndex:D,filterWithIndex:F,alt:W,zero:r.zero,unfold:r.unfold,reduce:E,foldMap:k,reduceRight:q,traverse:J,sequence:r.sequence,reduceWithIndex:T,foldMapWithIndex:C,reduceRightWithIndex:S,traverseWithIndex:$,extend:H,wither:K,wilt:Q}})),S=O((function(n,r){Object.defineProperty(r,"__esModule",{value:!0}),r.getApplicativeComposition=r.getApplicativeMonoid=void 0,r.getApplicativeMonoid=function(n){var r=g.getApplySemigroup(n);return function(t){return{concat:r(t).concat,empty:n.of(t.empty)}}},r.getApplicativeComposition=function(n,r){var t=y.getFunctorComposition(n,r).map,u=g.ap(n,r);return{map:t,of:function(t){return n.of(r.of(t))},ap:function(n,r){return M.pipe(n,u(r))}}}})),D=O((function(n,r){Object.defineProperty(r,"__esModule",{value:!0}),r.and=r.or=r.not=r.Contravariant=r.getMonoidAll=r.getSemigroupAll=r.getMonoidAny=r.getSemigroupAny=r.URI=r.contramap=void 0,r.contramap=function(n){return function(r){return M.flow(n,r)}},r.URI="Predicate",r.getSemigroupAny=function(){return{concat:function(n,t){return M.pipe(n,r.or(t))}}},r.getMonoidAny=function(){return{concat:r.getSemigroupAny().concat,empty:M.constFalse}},r.getSemigroupAll=function(){return{concat:function(n,t){return M.pipe(n,r.and(t))}}},r.getMonoidAll=function(){return{concat:r.getSemigroupAll().concat,empty:M.constTrue}},r.Contravariant={URI:r.URI,contramap:function(n,t){return M.pipe(n,r.contramap(t))}},r.not=function(n){return function(r){return!n(r)}},r.or=function(n){return function(r){return function(t){return r(t)||n(t)}}},r.and=function(n){return function(r){return function(t){return r(t)&&n(t)}}}})),F=O((function(n,r){var t=U&&U.__createBinding||(Object.create?function(n,r,t,u){void 0===u&&(u=t),Object.defineProperty(n,u,{enumerable:!0,get:function(){return r[t]}})}:function(n,r,t,u){void 0===u&&(u=t),n[u]=r[t]}),u=U&&U.__setModuleDefault||(Object.create?function(n,r){Object.defineProperty(n,"default",{enumerable:!0,value:r})}:function(n,r){n.default=r}),e=U&&U.__importStar||function(n){if(n&&n.__esModule)return n;var r={};if(null!=n)for(var e in n)"default"!==e&&Object.prototype.hasOwnProperty.call(n,e)&&t(r,n,e);return u(r,n),r};Object.defineProperty(r,"__esModule",{value:!0}),r.fromEither=r.MonadThrow=r.throwError=r.Witherable=r.wilt=r.wither=r.Traversable=r.sequence=r.traverse=r.Filterable=r.partitionMap=r.partition=r.filterMap=r.filter=r.Compactable=r.separate=r.compact=r.Extend=r.extend=r.Alternative=r.guard=r.Zero=r.zero=r.Alt=r.alt=r.altW=r.Foldable=r.reduceRight=r.foldMap=r.reduce=r.Monad=r.Chain=r.chain=r.Applicative=r.Apply=r.ap=r.Pointed=r.of=r.Functor=r.map=r.getMonoid=r.getOrd=r.getEq=r.getShow=r.URI=r.getRight=r.getLeft=r.fromPredicate=r.some=r.none=void 0,r.getLastMonoid=r.getFirstMonoid=r.getApplyMonoid=r.getApplySemigroup=r.option=r.mapNullable=r.getRefinement=r.sequenceArray=r.traverseArray=r.traverseArrayWithIndex=r.traverseReadonlyArrayWithIndex=r.traverseReadonlyNonEmptyArrayWithIndex=r.ApT=r.apS=r.bind=r.bindTo=r.Do=r.exists=r.elem=r.toUndefined=r.toNullable=r.chainNullableK=r.fromNullableK=r.tryCatchK=r.tryCatch=r.fromNullable=r.chainEitherK=r.fromEitherK=r.duplicate=r.chainFirst=r.flatten=r.apSecond=r.apFirst=r.flap=r.getOrElse=r.getOrElseW=r.fold=r.match=r.foldW=r.matchW=r.isNone=r.isSome=r.FromEither=void 0;var o=e(w);r.none=o.none,r.some=o.some,r.fromPredicate=function(n){return function(t){return n(t)?r.some(t):r.none}},r.getLeft=function(n){return"Right"===n._tag?r.none:r.some(n.left)},r.getRight=function(n){return"Left"===n._tag?r.none:r.some(n.right)};var i=function(n,t){return M.pipe(n,r.map(t))},c=function(n,t){return M.pipe(n,r.ap(t))},f=function(n,t){return M.pipe(n,r.chain(t))},a=function(n,t,u){return M.pipe(n,r.reduce(t,u))},v=function(n){var t=r.foldMap(n);return function(n,r){return M.pipe(n,t(r))}},d=function(n,t,u){return M.pipe(n,r.reduceRight(t,u))},p=function(n){var t=r.traverse(n);return function(n,r){return M.pipe(n,t(r))}},s=function(n,t){return M.pipe(n,r.alt(t))},l=function(n,t){return M.pipe(n,r.filter(t))},m=function(n,t){return M.pipe(n,r.filterMap(t))},h=function(n,t){return M.pipe(n,r.extend(t))},I=function(n,t){return M.pipe(n,r.partition(t))},R=function(n,t){return M.pipe(n,r.partitionMap(t))};r.URI="Option",r.getShow=function(n){return{show:function(t){return r.isNone(t)?"none":"some("+n.show(t.value)+")"}}},r.getEq=function(n){return{equals:function(t,u){return t===u||(r.isNone(t)?r.isNone(u):!r.isNone(u)&&n.equals(t.value,u.value))}}},r.getOrd=function(n){return{equals:r.getEq(n).equals,compare:function(t,u){return t===u?0:r.isSome(t)?r.isSome(u)?n.compare(t.value,u.value):1:-1}}},r.getMonoid=function(n){return{concat:function(t,u){return r.isNone(t)?u:r.isNone(u)?t:r.some(n.concat(t.value,u.value))},empty:r.none}},r.map=function(n){return function(t){return r.isNone(t)?r.none:r.some(n(t.value))}},r.Functor={URI:r.URI,map:i},r.of=r.some,r.Pointed={URI:r.URI,of:r.of},r.ap=function(n){return function(t){return r.isNone(t)||r.isNone(n)?r.none:r.some(t.value(n.value))}},r.Apply={URI:r.URI,map:i,ap:c},r.Applicative={URI:r.URI,map:i,ap:c,of:r.of},r.chain=function(n){return function(t){return r.isNone(t)?r.none:n(t.value)}},r.Chain={URI:r.URI,map:i,ap:c,chain:f},r.Monad={URI:r.URI,map:i,ap:c,of:r.of,chain:f},r.reduce=function(n,t){return function(u){return r.isNone(u)?n:t(n,u.value)}},r.foldMap=function(n){return function(t){return function(u){return r.isNone(u)?n.empty:t(u.value)}}},r.reduceRight=function(n,t){return function(u){return r.isNone(u)?n:t(u.value,n)}},r.Foldable={URI:r.URI,reduce:a,foldMap:v,reduceRight:d},r.altW=function(n){return function(t){return r.isNone(t)?n():t}},r.alt=r.altW,r.Alt={URI:r.URI,map:i,alt:s},r.zero=function(){return r.none},r.Zero={URI:r.URI,zero:r.zero},r.guard=L.guard(r.Zero,r.Pointed),r.Alternative={URI:r.URI,map:i,ap:c,of:r.of,alt:s,zero:r.zero},r.extend=function(n){return function(t){return r.isNone(t)?r.none:r.some(n(t))}},r.Extend={URI:r.URI,map:i,extend:h},r.compact=r.chain(M.identity);var b=A.separated(r.none,r.none);r.separate=function(n){return r.isNone(n)?b:A.separated(r.getLeft(n.value),r.getRight(n.value))},r.Compactable={URI:r.URI,compact:r.compact,separate:r.separate},r.filter=function(n){return function(t){return r.isNone(t)?r.none:n(t.value)?t:r.none}},r.filterMap=function(n){return function(t){return r.isNone(t)?r.none:n(t.value)}},r.partition=function(n){return function(r){return A.separated(l(r,D.not(n)),l(r,n))}},r.partitionMap=function(n){return M.flow(r.map(n),r.separate)},r.Filterable={URI:r.URI,map:i,compact:r.compact,separate:r.separate,filter:l,filterMap:m,partition:I,partitionMap:R},r.traverse=function(n){return function(t){return function(u){return r.isNone(u)?n.of(r.none):n.map(t(u.value),r.some)}}},r.sequence=function(n){return function(t){return r.isNone(t)?n.of(r.none):n.map(t.value,r.some)}},r.Traversable={URI:r.URI,map:i,reduce:a,foldMap:v,reduceRight:d,traverse:p,sequence:r.sequence};var O=z.witherDefault(r.Traversable,r.Compactable),_=z.wiltDefault(r.Traversable,r.Compactable);r.wither=function(n){var r=O(n);return function(n){return function(t){return r(t,n)}}},r.wilt=function(n){var r=_(n);return function(n){return function(t){return r(t,n)}}},r.Witherable={URI:r.URI,map:i,reduce:a,foldMap:v,reduceRight:d,traverse:p,sequence:r.sequence,compact:r.compact,separate:r.separate,filter:l,filterMap:m,partition:I,partitionMap:R,wither:O,wilt:_},r.throwError=function(){return r.none},r.MonadThrow={URI:r.URI,map:i,ap:c,of:r.of,chain:f,throwError:r.throwError},r.fromEither=r.getRight,r.FromEither={URI:r.URI,fromEither:r.fromEither},r.isSome=o.isSome,r.isNone=function(n){return"None"===n._tag},r.matchW=function(n,t){return function(u){return r.isNone(u)?n():t(u.value)}},r.foldW=r.matchW,r.match=r.matchW,r.fold=r.match,r.getOrElseW=function(n){return function(t){return r.isNone(t)?n():t.value}},r.getOrElse=r.getOrElseW,r.flap=y.flap(r.Functor),r.apFirst=g.apFirst(r.Apply),r.apSecond=g.apSecond(r.Apply),r.flatten=r.compact,r.chainFirst=j.chainFirst(r.Chain),r.duplicate=r.extend(M.identity),r.fromEitherK=x.fromEitherK(r.FromEither),r.chainEitherK=x.chainEitherK(r.FromEither,r.Chain),r.fromNullable=function(n){return null==n?r.none:r.some(n)},r.tryCatch=function(n){try{return r.some(n())}catch(n){return r.none}},r.tryCatchK=function(n){return function(){for(var t=[],u=0;u<arguments.length;u++)t[u]=arguments[u];return r.tryCatch((function(){return n.apply(void 0,t)}))}},r.fromNullableK=function(n){return M.flow(n,r.fromNullable)},r.chainNullableK=function(n){return function(t){return r.isNone(t)?r.none:r.fromNullable(n(t.value))}},r.toNullable=r.match(M.constNull,M.identity),r.toUndefined=r.match(M.constUndefined,M.identity),r.elem=function n(t){return function(u,e){if(void 0===e){var o=n(t);return function(n){return o(u,n)}}return!r.isNone(e)&&t.equals(u,e.value)}},r.exists=function(n){return function(t){return!r.isNone(t)&&n(t.value)}},r.Do=r.of(o.emptyRecord),r.bindTo=y.bindTo(r.Functor),r.bind=j.bind(r.Chain),r.apS=g.apS(r.Apply),r.ApT=r.of(o.emptyReadonlyArray),r.traverseReadonlyNonEmptyArrayWithIndex=function(n){return function(t){var u=n(0,o.head(t));if(r.isNone(u))return r.none;for(var e=[u.value],i=1;i<t.length;i++){var c=n(i,t[i]);if(r.isNone(c))return r.none;e.push(c.value)}return r.some(e)}},r.traverseReadonlyArrayWithIndex=function(n){var t=r.traverseReadonlyNonEmptyArrayWithIndex(n);return function(n){return o.isNonEmpty(n)?t(n):r.ApT}},r.traverseArrayWithIndex=r.traverseReadonlyArrayWithIndex,r.traverseArray=function(n){return r.traverseReadonlyArrayWithIndex((function(r,t){return n(t)}))},r.sequenceArray=r.traverseArray(M.identity),r.getRefinement=function(n){return function(t){return r.isSome(n(t))}},r.mapNullable=r.chainNullableK,r.option={URI:r.URI,map:i,of:r.of,ap:c,chain:f,reduce:a,foldMap:v,reduceRight:d,traverse:p,sequence:r.sequence,zero:r.zero,alt:s,extend:h,compact:r.compact,separate:r.separate,filter:l,filterMap:m,partition:I,partitionMap:R,wither:O,wilt:_,throwError:r.throwError},r.getApplySemigroup=g.getApplySemigroup(r.Apply),r.getApplyMonoid=S.getApplicativeMonoid(r.Applicative),r.getFirstMonoid=function(){return r.getMonoid(k.first())},r.getLastMonoid=function(){return r.getMonoid(k.last())}}));const H=n=>!("isConnected"in n)||n.isConnected,J=(()=>{let n;return(...r)=>{n&&clearTimeout(n),n=setTimeout((()=>{n=0,(n=>{for(let r of n.keys())n.set(r,n.get(r).filter(H))})(...r)}),2e3)}})(),$=(t,u)=>{const e=((n,r=((n,r)=>n!==r))=>{let t=new Map(Object.entries(null!=n?n:{}));const u={dispose:[],get:[],set:[],reset:[]},e=()=>{t=new Map(Object.entries(null!=n?n:{})),u.reset.forEach((n=>n()))},o=n=>(u.get.forEach((r=>r(n))),t.get(n)),i=(n,e)=>{const o=t.get(n);r(e,o,n)&&(t.set(n,e),u.set.forEach((r=>r(n,e,o))))},c="undefined"==typeof Proxy?{}:new Proxy(n,{get:(n,r)=>o(r),ownKeys:()=>Array.from(t.keys()),getOwnPropertyDescriptor:()=>({enumerable:!0,configurable:!0}),has:(n,r)=>t.has(r),set:(n,r,t)=>(i(r,t),!0)}),f=(n,r)=>(u[n].push(r),()=>{((n,r)=>{const t=n.indexOf(r);t>=0&&(n[t]=n[n.length-1],n.length--)})(u[n],r)});return{state:c,get:o,set:i,on:f,onChange:(r,t)=>{const u=f("set",((n,u)=>{n===r&&t(u)})),e=f("reset",(()=>t(n[r])));return()=>{u(),e()}},use:(...n)=>{const r=n.reduce(((n,r)=>(r.set&&n.push(f("set",r.set)),r.get&&n.push(f("get",r.get)),r.reset&&n.push(f("reset",r.reset)),r.dispose&&n.push(f("dispose",r.dispose)),n)),[]);return()=>r.forEach((n=>n()))},dispose:()=>{u.dispose.forEach((n=>n())),e()},reset:e,forceUpdate:n=>{const r=t.get(n);u.set.forEach((t=>t(n,r,r)))}}})(t,u);return e.use((()=>{if("function"!=typeof n)return{};const t=new Map;return{dispose:()=>t.clear(),get:r=>{const u=n();u&&((n,r,t)=>{const u=n.get(r);u?u.includes(t)||u.push(t):n.set(r,[t])})(t,r,u)},set:n=>{const u=t.get(n);u&&t.set(n,u.filter(r)),J(t)},reset:()=>{t.forEach((n=>n.forEach(r))),J(t)}}})()),e},{state:G,onChange:B}=$(Object.assign({fallbackStyles:"",pricePrefix:null,currencySign:null,apiPath:null,token:null,locale:"de-DE"},{trackingEnabled:!0}));function K(n,r,t){return function(u){for(var e=Array(t.length+1),o=0;o<t.length;o++)e[o]=t[o];return e[t.length]=u,0===r?n.apply(null,e):K(n,r-1,e)}}B("apiPath",(n=>{console.log("apiPathChanged",n)})),B("token",(n=>{console.log("tokenChanged",n)}));var Q={1:function(n){return[n]},2:function(n){return function(r){return[n,r]}},3:function(n){return function(r){return function(t){return[n,r,t]}}},4:function(n){return function(r){return function(t){return function(u){return[n,r,t,u]}}}},5:function(n){return function(r){return function(t){return function(u){return function(e){return[n,r,t,u,e]}}}}}};function V(n){return Q.hasOwnProperty(n)||(Q[n]=K(t,n-1,[])),Q[n]}function X(n){return function(){for(var r=[],t=0;t<arguments.length;t++)r[t]=arguments[t];for(var u=r.length,e=V(u),o=n.map(r[0],e),i=1;i<u;i++)o=n.ap(o,r[i]);return o}}function Y(n){return function(r){return function(t){return n.fromEither(u(t)?e(r()):o(t.value))}}}var Z=e,nn=o,rn=function(n,r){return f(n,tn(r))},tn=function(n){return function(r){return fn(r)?r:nn(n(r.right))}},un={URI:"Either",map:rn},en={URI:"Either",map:rn,ap:function(n,r){return f(n,function(n){return function(r){return fn(r)?r:fn(n)?n:nn(r.right(n.right))}}(r))}},on=function(n){return function(r){return fn(r)?Z(n(r.left)):r}},cn=Y({URI:"Either",fromEither:c}),fn=i,an=function(n,r){return function(t){return fn(t)?n(t.left):r(t.right)}},vn=a,dn=v,pn=function(n){return{concat:function(r,t){return sn(r)?t:sn(t)?r:dn(n.concat(r.value,t.value))},empty:vn}},sn=function(n){return"None"===n._tag},ln=function(n){return null==n?vn:dn(n)};function mn(n){return function(r){return n.map(r,nn)}}function hn(n){return function(n,r){return function(t){return function(u){return n.map(u,(function(n){return r.map(n,t)}))}}}(n,un)}function In(n){return function(n,r){return function(t){return function(u){return n.ap(n.map(u,(function(n){return function(t){return r.ap(n,t)}})),t)}}}(n,en)}function Rn(n){return function(r){return function(t){return n.chain(t,(function(t){return fn(t)?n.of(t):r(t.right)}))}}}function bn(n){return function(r){return function(t){return n.map(t,on(r))}}}function Un(n,r){return function(t){var u=p(t,n.fromTask);return function(n){return r.chain(n,u)}}}var On=function(n){return function(){return Promise.resolve().then(n)}},Mn=function(n,r){return f(n,jn(r))},gn=function(n,r){return f(n,wn(r))},jn=function(n){return function(r){return function(){return Promise.resolve().then(r).then(n)}}},wn=function(n){return function(r){return function(){return Promise.all([Promise.resolve().then(r),Promise.resolve().then(n)]).then((function(n){return(0,n[0])(n[1])}))}}},xn=function(n){return function(){return Promise.resolve(n)}},yn={URI:"Task",map:Mn},_n={URI:"Task",map:Mn,ap:gn},Wn={URI:"Task",map:Mn,of:xn,ap:gn,chain:function(n,r){return f(n,function(n){return function(r){return function(){return Promise.resolve().then(r).then((function(r){return n(r)()}))}}}(r))}},En=mn(yn),kn=p(On,En),qn=En,Pn=xn,Tn=hn(yn),An=bn(yn),zn=In(_n),Ln=Rn(Wn),Nn=Ln,Cn="TaskEither",Sn={URI:Cn,map:function(n,r){return f(n,Tn(r))},ap:function(n,r){return f(n,zn(r))},chain:function(n,r){return f(n,Ln(r))}},Dn=Y({URI:Cn,fromEither:Pn}),Fn=Un({URI:Cn,fromIO:kn,fromTask:qn},Sn),Hn=O((function(n,r){var t=U&&U.__createBinding||(Object.create?function(n,r,t,u){void 0===u&&(u=t),Object.defineProperty(n,u,{enumerable:!0,get:function(){return r[t]}})}:function(n,r,t,u){void 0===u&&(u=t),n[u]=r[t]}),u=U&&U.__setModuleDefault||(Object.create?function(n,r){Object.defineProperty(n,"default",{enumerable:!0,value:r})}:function(n,r){n.default=r}),e=U&&U.__importStar||function(n){if(n&&n.__esModule)return n;var r={};if(null!=n)for(var e in n)"default"!==e&&Object.prototype.hasOwnProperty.call(n,e)&&t(r,n,e);return u(r,n),r};Object.defineProperty(r,"__esModule",{value:!0}),r.getCompactableComposition=r.separate=r.compact=void 0;var o=e(A);function i(n,r){return function(t){return n.map(t,r.compact)}}function c(n,r,t){var u=i(n,r),e=y.map(n,t);return function(n){return o.separated(u(M.pipe(n,e(F.getLeft))),u(M.pipe(n,e(F.getRight))))}}r.compact=i,r.separate=c,r.getCompactableComposition=function(n,r){return{map:y.getFunctorComposition(n,r).map,compact:i(n,r),separate:c(n,r,r)}}})),Jn=O((function(n,r){Object.defineProperty(r,"__esModule",{value:!0}),r.tailRec=void 0,r.tailRec=function(n,r){for(var t=r(n);"Left"===t._tag;)t=r(t.left);return t.right}})),$n=O((function(n,r){var t=U&&U.__createBinding||(Object.create?function(n,r,t,u){void 0===u&&(u=t),Object.defineProperty(n,u,{enumerable:!0,get:function(){return r[t]}})}:function(n,r,t,u){void 0===u&&(u=t),n[u]=r[t]}),u=U&&U.__setModuleDefault||(Object.create?function(n,r){Object.defineProperty(n,"default",{enumerable:!0,value:r})}:function(n,r){n.default=r}),e=U&&U.__importStar||function(n){if(n&&n.__esModule)return n;var r={};if(null!=n)for(var e in n)"default"!==e&&Object.prototype.hasOwnProperty.call(n,e)&&t(r,n,e);return u(r,n),r};Object.defineProperty(r,"__esModule",{value:!0}),r.fold=r.match=r.foldW=r.matchW=r.isRight=r.isLeft=r.fromOption=r.fromPredicate=r.FromEither=r.MonadThrow=r.throwError=r.ChainRec=r.Extend=r.extend=r.Alt=r.alt=r.altW=r.Bifunctor=r.mapLeft=r.bimap=r.Traversable=r.sequence=r.traverse=r.Foldable=r.reduceRight=r.foldMap=r.reduce=r.Monad=r.Chain=r.chain=r.chainW=r.Applicative=r.Apply=r.ap=r.apW=r.Pointed=r.of=r.Functor=r.map=r.getAltValidation=r.getApplicativeValidation=r.getWitherable=r.getFilterable=r.getCompactable=r.getSemigroup=r.getEq=r.getShow=r.URI=r.right=r.left=void 0,r.getValidation=r.getValidationMonoid=r.getValidationSemigroup=r.getApplyMonoid=r.getApplySemigroup=r.either=r.stringifyJSON=r.parseJSON=r.sequenceArray=r.traverseArray=r.traverseArrayWithIndex=r.traverseReadonlyArrayWithIndex=r.traverseReadonlyNonEmptyArrayWithIndex=r.ApT=r.apSW=r.apS=r.bindW=r.bind=r.bindTo=r.Do=r.exists=r.elem=r.toError=r.toUnion=r.chainNullableK=r.fromNullableK=r.tryCatchK=r.tryCatch=r.fromNullable=r.orElse=r.orElseW=r.swap=r.filterOrElseW=r.filterOrElse=r.chainOptionK=r.fromOptionK=r.duplicate=r.flatten=r.flattenW=r.chainFirstW=r.chainFirst=r.apSecond=r.apFirst=r.flap=r.getOrElse=r.getOrElseW=void 0;var o=e(w);r.left=o.left,r.right=o.right;var i=function(n,t){return M.pipe(n,r.map(t))},c=function(n,t){return M.pipe(n,r.ap(t))},f=function(n,t){return M.pipe(n,r.chain(t))},a=function(n,t,u){return M.pipe(n,r.reduce(t,u))},v=function(n){return function(t,u){var e=r.foldMap(n);return M.pipe(t,e(u))}},d=function(n,t,u){return M.pipe(n,r.reduceRight(t,u))},p=function(n){var t=r.traverse(n);return function(n,r){return M.pipe(n,t(r))}},s=function(n,t,u){return M.pipe(n,r.bimap(t,u))},l=function(n,t){return M.pipe(n,r.mapLeft(t))},m=function(n,t){return M.pipe(n,r.alt(t))},h=function(n,t){return M.pipe(n,r.extend(t))},I=function(n,t){return Jn.tailRec(t(n),(function(n){return r.isLeft(n)?r.right(r.left(n.left)):r.isLeft(n.right)?r.left(t(n.right.left)):r.right(r.right(n.right.right))}))};r.URI="Either",r.getShow=function(n,t){return{show:function(u){return r.isLeft(u)?"left("+n.show(u.left)+")":"right("+t.show(u.right)+")"}}},r.getEq=function(n,t){return{equals:function(u,e){return u===e||(r.isLeft(u)?r.isLeft(e)&&n.equals(u.left,e.left):r.isRight(e)&&t.equals(u.right,e.right))}}},r.getSemigroup=function(n){return{concat:function(t,u){return r.isLeft(u)?t:r.isLeft(t)?u:r.right(n.concat(t.right,u.right))}}},r.getCompactable=function(n){var t=r.left(n.empty);return{URI:r.URI,_E:void 0,compact:function(n){return r.isLeft(n)?n:"None"===n.right._tag?t:r.right(n.right.value)},separate:function(n){return r.isLeft(n)?A.separated(n,n):r.isLeft(n.right)?A.separated(r.right(n.right.left),t):A.separated(t,r.right(n.right.right))}}},r.getFilterable=function(n){var t=r.left(n.empty),u=r.getCompactable(n);return{URI:r.URI,_E:void 0,map:i,compact:u.compact,separate:u.separate,filter:function(n,u){return r.isLeft(n)||u(n.right)?n:t},filterMap:function(n,u){if(r.isLeft(n))return n;var e=u(n.right);return"None"===e._tag?t:r.right(e.value)},partition:function(n,u){return r.isLeft(n)?A.separated(n,n):u(n.right)?A.separated(t,r.right(n.right)):A.separated(r.right(n.right),t)},partitionMap:function(n,u){if(r.isLeft(n))return A.separated(n,n);var e=u(n.right);return r.isLeft(e)?A.separated(r.right(e.left),t):A.separated(t,r.right(e.right))}}},r.getWitherable=function(n){var t=r.getFilterable(n),u=r.getCompactable(n);return{URI:r.URI,_E:void 0,map:i,compact:t.compact,separate:t.separate,filter:t.filter,filterMap:t.filterMap,partition:t.partition,partitionMap:t.partitionMap,traverse:p,sequence:r.sequence,reduce:a,foldMap:v,reduceRight:d,wither:z.witherDefault(r.Traversable,u),wilt:z.wiltDefault(r.Traversable,u)}},r.getApplicativeValidation=function(n){return{URI:r.URI,_E:void 0,map:i,ap:function(t,u){return r.isLeft(t)?r.isLeft(u)?r.left(n.concat(t.left,u.left)):t:r.isLeft(u)?u:r.right(t.right(u.right))},of:r.of}},r.getAltValidation=function(n){return{URI:r.URI,_E:void 0,map:i,alt:function(t,u){if(r.isRight(t))return t;var e=u();return r.isLeft(e)?r.left(n.concat(t.left,e.left)):e}}},r.map=function(n){return function(t){return r.isLeft(t)?t:r.right(n(t.right))}},r.Functor={URI:r.URI,map:i},r.of=r.right,r.Pointed={URI:r.URI,of:r.of},r.apW=function(n){return function(t){return r.isLeft(t)?t:r.isLeft(n)?n:r.right(t.right(n.right))}},r.ap=r.apW,r.Apply={URI:r.URI,map:i,ap:c},r.Applicative={URI:r.URI,map:i,ap:c,of:r.of},r.chainW=function(n){return function(t){return r.isLeft(t)?t:n(t.right)}},r.chain=r.chainW,r.Chain={URI:r.URI,map:i,ap:c,chain:f},r.Monad={URI:r.URI,map:i,ap:c,of:r.of,chain:f},r.reduce=function(n,t){return function(u){return r.isLeft(u)?n:t(n,u.right)}},r.foldMap=function(n){return function(t){return function(u){return r.isLeft(u)?n.empty:t(u.right)}}},r.reduceRight=function(n,t){return function(u){return r.isLeft(u)?n:t(u.right,n)}},r.Foldable={URI:r.URI,reduce:a,foldMap:v,reduceRight:d},r.traverse=function(n){return function(t){return function(u){return r.isLeft(u)?n.of(r.left(u.left)):n.map(t(u.right),r.right)}}},r.sequence=function(n){return function(t){return r.isLeft(t)?n.of(r.left(t.left)):n.map(t.right,r.right)}},r.Traversable={URI:r.URI,map:i,reduce:a,foldMap:v,reduceRight:d,traverse:p,sequence:r.sequence},r.bimap=function(n,t){return function(u){return r.isLeft(u)?r.left(n(u.left)):r.right(t(u.right))}},r.mapLeft=function(n){return function(t){return r.isLeft(t)?r.left(n(t.left)):t}},r.Bifunctor={URI:r.URI,bimap:s,mapLeft:l},r.altW=function(n){return function(t){return r.isLeft(t)?n():t}},r.alt=r.altW,r.Alt={URI:r.URI,map:i,alt:m},r.extend=function(n){return function(t){return r.isLeft(t)?t:r.right(n(t))}},r.Extend={URI:r.URI,map:i,extend:h},r.ChainRec={URI:r.URI,map:i,ap:c,chain:f,chainRec:I},r.throwError=r.left,r.MonadThrow={URI:r.URI,map:i,ap:c,of:r.of,chain:f,throwError:r.throwError},r.FromEither={URI:r.URI,fromEither:M.identity},r.fromPredicate=x.fromPredicate(r.FromEither),r.fromOption=x.fromOption(r.FromEither),r.isLeft=o.isLeft,r.isRight=o.isRight,r.matchW=function(n,t){return function(u){return r.isLeft(u)?n(u.left):t(u.right)}},r.foldW=r.matchW,r.match=r.matchW,r.fold=r.match,r.getOrElseW=function(n){return function(t){return r.isLeft(t)?n(t.left):t.right}},r.getOrElse=r.getOrElseW,r.flap=y.flap(r.Functor),r.apFirst=g.apFirst(r.Apply),r.apSecond=g.apSecond(r.Apply),r.chainFirst=j.chainFirst(r.Chain),r.chainFirstW=r.chainFirst,r.flattenW=r.chainW(M.identity),r.flatten=r.flattenW,r.duplicate=r.extend(M.identity),r.fromOptionK=x.fromOptionK(r.FromEither),r.chainOptionK=x.chainOptionK(r.FromEither,r.Chain),r.filterOrElse=x.filterOrElse(r.FromEither,r.Chain),r.filterOrElseW=r.filterOrElse,r.swap=function(n){return r.isLeft(n)?r.right(n.left):r.left(n.right)},r.orElseW=function(n){return function(t){return r.isLeft(t)?n(t.left):t}},r.orElse=r.orElseW,r.fromNullable=function(n){return function(t){return null==t?r.left(n):r.right(t)}},r.tryCatch=function(n,t){try{return r.right(n())}catch(n){return r.left(t(n))}},r.tryCatchK=function(n,t){return function(){for(var u=[],e=0;e<arguments.length;e++)u[e]=arguments[e];return r.tryCatch((function(){return n.apply(void 0,u)}),t)}},r.fromNullableK=function(n){var t=r.fromNullable(n);return function(n){return M.flow(n,t)}},r.chainNullableK=function(n){var t=r.fromNullableK(n);return function(n){return r.chain(t(n))}},r.toUnion=r.foldW(M.identity,M.identity),r.toError=function(n){return n instanceof Error?n:new Error(String(n))},r.elem=function n(t){return function(u,e){if(void 0===e){var o=n(t);return function(n){return o(u,n)}}return!r.isLeft(e)&&t.equals(u,e.right)}},r.exists=function(n){return function(t){return!r.isLeft(t)&&n(t.right)}},r.Do=r.of(o.emptyRecord),r.bindTo=y.bindTo(r.Functor),r.bind=j.bind(r.Chain),r.bindW=r.bind,r.apS=g.apS(r.Apply),r.apSW=r.apS,r.ApT=r.of(o.emptyReadonlyArray),r.traverseReadonlyNonEmptyArrayWithIndex=function(n){return function(t){var u=n(0,o.head(t));if(r.isLeft(u))return u;for(var e=[u.right],i=1;i<t.length;i++){var c=n(i,t[i]);if(r.isLeft(c))return c;e.push(c.right)}return r.right(e)}},r.traverseReadonlyArrayWithIndex=function(n){var t=r.traverseReadonlyNonEmptyArrayWithIndex(n);return function(n){return o.isNonEmpty(n)?t(n):r.ApT}},r.traverseArrayWithIndex=r.traverseReadonlyArrayWithIndex,r.traverseArray=function(n){return r.traverseReadonlyArrayWithIndex((function(r,t){return n(t)}))},r.sequenceArray=r.traverseArray(M.identity),r.parseJSON=function(n,t){return r.tryCatch((function(){return JSON.parse(n)}),t)},r.stringifyJSON=function(n,t){return r.tryCatch((function(){var r=JSON.stringify(n);if("string"!=typeof r)throw new Error("Converting unsupported structure to JSON");return r}),t)},r.either={URI:r.URI,map:i,of:r.of,ap:c,chain:f,reduce:a,foldMap:v,reduceRight:d,traverse:p,sequence:r.sequence,bimap:s,mapLeft:l,alt:m,extend:h,chainRec:I,throwError:r.throwError},r.getApplySemigroup=g.getApplySemigroup(r.Apply),r.getApplyMonoid=S.getApplicativeMonoid(r.Applicative),r.getValidationSemigroup=function(n,t){return g.getApplySemigroup(r.getApplicativeValidation(n))(t)},r.getValidationMonoid=function(n,t){return S.getApplicativeMonoid(r.getApplicativeValidation(n))(t)},r.getValidation=function(n){var t=r.getApplicativeValidation(n).ap,u=r.getAltValidation(n).alt;return{URI:r.URI,_E:void 0,map:i,of:r.of,chain:f,bimap:s,mapLeft:l,reduce:a,foldMap:v,reduceRight:d,extend:h,traverse:p,sequence:r.sequence,chainRec:I,throwError:r.throwError,ap:t,alt:u}}})),Gn=O((function(n,r){var t=U&&U.__createBinding||(Object.create?function(n,r,t,u){void 0===u&&(u=t),Object.defineProperty(n,u,{enumerable:!0,get:function(){return r[t]}})}:function(n,r,t,u){void 0===u&&(u=t),n[u]=r[t]}),u=U&&U.__setModuleDefault||(Object.create?function(n,r){Object.defineProperty(n,"default",{enumerable:!0,value:r})}:function(n,r){n.default=r}),e=U&&U.__importStar||function(n){if(n&&n.__esModule)return n;var r={};if(null!=n)for(var e in n)"default"!==e&&Object.prototype.hasOwnProperty.call(n,e)&&t(r,n,e);return u(r,n),r};Object.defineProperty(r,"__esModule",{value:!0}),r.getEitherM=r.toUnion=r.swap=r.orLeft=r.orElseFirst=r.orElse=r.getOrElse=r.matchE=r.match=r.altValidation=r.mapLeft=r.bimap=r.alt=r.chain=r.ap=r.map=r.leftF=r.rightF=r.left=r.right=void 0;var o=e($n);function i(n){return M.flow(o.right,n.of)}function c(n){return M.flow(o.left,n.of)}function f(n){return function(r){return n.map(r,o.right)}}function a(n){return function(r){return n.map(r,o.left)}}function v(n){return y.map(n,o.Functor)}function d(n){return g.ap(n,o.Apply)}function p(n){return function(r){return function(t){return n.chain(t,(function(t){return o.isLeft(t)?n.of(t):r(t.right)}))}}}function s(n){return function(r){return function(t){return n.chain(t,(function(t){return o.isLeft(t)?r():n.of(t)}))}}}function l(n){return function(r,t){return function(u){return n.map(u,o.bimap(r,t))}}}function m(n){return function(r){return function(t){return n.map(t,o.mapLeft(r))}}}function h(n){return function(r,t){return function(u){return n.chain(u,o.match(r,t))}}}function I(n){return function(r){return function(t){return n.chain(t,o.match(r,n.of))}}}function R(n){return function(r){return function(t){return n.chain(t,(function(t){return o.isLeft(t)?r(t.left):n.of(t)}))}}}function b(n){return function(r){return n.map(r,o.swap)}}r.right=i,r.left=c,r.rightF=f,r.leftF=a,r.map=v,r.ap=d,r.chain=p,r.alt=s,r.bimap=l,r.mapLeft=m,r.altValidation=function(n,r){return function(t){return function(u){return n.chain(u,o.match((function(u){return n.map(t(),o.mapLeft((function(n){return r.concat(u,n)})))}),i(n)))}}},r.match=function(n){return function(r,t){return function(u){return n.map(u,o.match(r,t))}}},r.matchE=h,r.getOrElse=I,r.orElse=R,r.orElseFirst=function(n){var r=R(n);return function(t){return r((function(r){return n.map(t(r),(function(n){return o.isLeft(n)?n:o.left(r)}))}))}},r.orLeft=function(n){return function(r){return function(t){return n.chain(t,o.match((function(t){return n.map(r(t),o.left)}),(function(r){return n.of(o.right(r))})))}}},r.swap=b,r.toUnion=function(n){return function(r){return n.map(r,o.toUnion)}},r.getEitherM=function(n){var r=d(n),t=v(n),u=p(n),e=s(n),o=l(n),U=m(n),O=h(n),g=I(n),j=R(n);return{map:function(n,r){return M.pipe(n,t(r))},ap:function(n,t){return M.pipe(n,r(t))},of:i(n),chain:function(n,r){return M.pipe(n,u(r))},alt:function(n,r){return M.pipe(n,e(r))},bimap:function(n,r,t){return M.pipe(n,o(r,t))},mapLeft:function(n,r){return M.pipe(n,U(r))},fold:function(n,r,t){return M.pipe(n,O(r,t))},getOrElse:function(n,r){return M.pipe(n,g(r))},orElse:function(n,r){return M.pipe(n,j(r))},swap:b(n),rightM:f(n),leftM:a(n),left:c(n)}}})),Bn=O((function(n,r){function t(n,r){return function(t){return function(u){return n.map(u,(function(n){return r.filter(n,t)}))}}}function u(n,r){return function(t){return function(u){return n.map(u,(function(n){return r.filterMap(n,t)}))}}}function e(n,r){var u=t(n,r);return function(n){var r=u(D.not(n)),t=u(n);return function(n){return A.separated(r(n),t(n))}}}function o(n,r){var t=u(n,r);return function(n){return function(r){return A.separated(M.pipe(r,t((function(r){return F.getLeft(n(r))}))),M.pipe(r,t((function(r){return F.getRight(n(r))}))))}}}Object.defineProperty(r,"__esModule",{value:!0}),r.getFilterableComposition=r.partitionMap=r.partition=r.filterMap=r.filter=void 0,r.filter=t,r.filterMap=u,r.partition=e,r.partitionMap=o,r.getFilterableComposition=function(n,r){var i=y.getFunctorComposition(n,r).map,c=Hn.compact(n,r),f=Hn.separate(n,r,r),a=t(n,r),v=u(n,r),d=e(n,r),p=o(n,r);return{map:i,compact:c,separate:f,filter:function(n,r){return M.pipe(n,a(r))},filterMap:function(n,r){return M.pipe(n,v(r))},partition:function(n,r){return M.pipe(n,d(r))},partitionMap:function(n,r){return M.pipe(n,p(r))}}}})),Kn=O((function(n,r){Object.defineProperty(r,"__esModule",{value:!0}),r.chainFirstIOK=r.chainIOK=r.fromIOK=void 0,r.fromIOK=function(n){return function(r){return M.flow(r,n.fromIO)}},r.chainIOK=function(n,r){return function(t){var u=M.flow(t,n.fromIO);return function(n){return r.chain(n,u)}}},r.chainFirstIOK=function(n,r){var t=j.chainFirst(r);return function(r){return t(M.flow(r,n.fromIO))}}})),Qn=O((function(n,r){Object.defineProperty(r,"__esModule",{value:!0}),r.chainFirstTaskK=r.chainTaskK=r.fromTaskK=void 0,r.fromTaskK=function(n){return function(r){return M.flow(r,n.fromTask)}},r.chainTaskK=function(n,r){return function(t){var u=M.flow(t,n.fromTask);return function(n){return r.chain(n,u)}}},r.chainFirstTaskK=function(n,r){var t=j.chainFirst(r);return function(r){return t(M.flow(r,n.fromTask))}}})),Vn=O((function(n,r){var t=U&&U.__createBinding||(Object.create?function(n,r,t,u){void 0===u&&(u=t),Object.defineProperty(n,u,{enumerable:!0,get:function(){return r[t]}})}:function(n,r,t,u){void 0===u&&(u=t),n[u]=r[t]}),u=U&&U.__setModuleDefault||(Object.create?function(n,r){Object.defineProperty(n,"default",{enumerable:!0,value:r})}:function(n,r){n.default=r}),e=U&&U.__importStar||function(n){if(n&&n.__esModule)return n;var r={};if(null!=n)for(var e in n)"default"!==e&&Object.prototype.hasOwnProperty.call(n,e)&&t(r,n,e);return u(r,n),r};Object.defineProperty(r,"__esModule",{value:!0}),r.getMonoid=r.getSemigroup=r.taskSeq=r.task=r.sequenceSeqArray=r.traverseSeqArray=r.traverseSeqArrayWithIndex=r.sequenceArray=r.traverseArray=r.traverseArrayWithIndex=r.traverseReadonlyArrayWithIndexSeq=r.traverseReadonlyNonEmptyArrayWithIndexSeq=r.traverseReadonlyArrayWithIndex=r.traverseReadonlyNonEmptyArrayWithIndex=r.ApT=r.apS=r.bind=r.bindTo=r.Do=r.never=r.FromTask=r.chainFirstIOK=r.chainIOK=r.fromIOK=r.FromIO=r.chainFirst=r.MonadTask=r.fromTask=r.MonadIO=r.Monad=r.Chain=r.ApplicativeSeq=r.ApplySeq=r.ApplicativePar=r.apSecond=r.apFirst=r.ApplyPar=r.Pointed=r.flap=r.Functor=r.getRaceMonoid=r.URI=r.flatten=r.chain=r.of=r.ap=r.map=r.delay=r.fromIO=void 0;var o=e(w);r.fromIO=function(n){return function(){return Promise.resolve().then(n)}},r.delay=function(n){return function(r){return function(){return new Promise((function(t){setTimeout((function(){Promise.resolve().then(r).then(t)}),n)}))}}};var i=function(n,t){return M.pipe(n,r.map(t))},c=function(n,t){return M.pipe(n,r.ap(t))},f=function(n,t){return M.pipe(n,r.chain((function(n){return M.pipe(t,r.map(n))})))},a=function(n,t){return M.pipe(n,r.chain(t))};r.map=function(n){return function(r){return function(){return Promise.resolve().then(r).then(n)}}},r.ap=function(n){return function(r){return function(){return Promise.all([Promise.resolve().then(r),Promise.resolve().then(n)]).then((function(n){return(0,n[0])(n[1])}))}}},r.of=function(n){return function(){return Promise.resolve(n)}},r.chain=function(n){return function(r){return function(){return Promise.resolve().then(r).then((function(r){return n(r)()}))}}},r.flatten=r.chain(M.identity),r.URI="Task",r.getRaceMonoid=function(){return{concat:function(n,r){return function(){return Promise.race([Promise.resolve().then(n),Promise.resolve().then(r)])}},empty:r.never}},r.Functor={URI:r.URI,map:i},r.flap=y.flap(r.Functor),r.Pointed={URI:r.URI,of:r.of},r.ApplyPar={URI:r.URI,map:i,ap:c},r.apFirst=g.apFirst(r.ApplyPar),r.apSecond=g.apSecond(r.ApplyPar),r.ApplicativePar={URI:r.URI,map:i,ap:c,of:r.of},r.ApplySeq={URI:r.URI,map:i,ap:f},r.ApplicativeSeq={URI:r.URI,map:i,ap:f,of:r.of},r.Chain={URI:r.URI,map:i,ap:c,chain:a},r.Monad={URI:r.URI,map:i,of:r.of,ap:c,chain:a},r.MonadIO={URI:r.URI,map:i,of:r.of,ap:c,chain:a,fromIO:r.fromIO},r.fromTask=M.identity,r.MonadTask={URI:r.URI,map:i,of:r.of,ap:c,chain:a,fromIO:r.fromIO,fromTask:r.fromTask},r.chainFirst=j.chainFirst(r.Chain),r.FromIO={URI:r.URI,fromIO:r.fromIO},r.fromIOK=Kn.fromIOK(r.FromIO),r.chainIOK=Kn.chainIOK(r.FromIO,r.Chain),r.chainFirstIOK=Kn.chainFirstIOK(r.FromIO,r.Chain),r.FromTask={URI:r.URI,fromIO:r.fromIO,fromTask:r.fromTask},r.never=function(){return new Promise((function(){}))},r.Do=r.of(o.emptyRecord),r.bindTo=y.bindTo(r.Functor),r.bind=j.bind(r.Chain),r.apS=g.apS(r.ApplyPar),r.ApT=r.of(o.emptyReadonlyArray),r.traverseReadonlyNonEmptyArrayWithIndex=function(n){return function(r){return function(){return Promise.all(r.map((function(r,t){return Promise.resolve().then((function(){return n(t,r)()}))})))}}},r.traverseReadonlyArrayWithIndex=function(n){var t=r.traverseReadonlyNonEmptyArrayWithIndex(n);return function(n){return o.isNonEmpty(n)?t(n):r.ApT}},r.traverseReadonlyNonEmptyArrayWithIndexSeq=function(n){return function(r){return function(){return o.tail(r).reduce((function(r,t,u){return r.then((function(r){return Promise.resolve().then(n(u+1,t)).then((function(n){return r.push(n),r}))}))}),Promise.resolve().then(n(0,o.head(r))).then(o.singleton))}}},r.traverseReadonlyArrayWithIndexSeq=function(n){var t=r.traverseReadonlyNonEmptyArrayWithIndexSeq(n);return function(n){return o.isNonEmpty(n)?t(n):r.ApT}},r.traverseArrayWithIndex=r.traverseReadonlyArrayWithIndex,r.traverseArray=function(n){return r.traverseReadonlyArrayWithIndex((function(r,t){return n(t)}))},r.sequenceArray=r.traverseArray(M.identity),r.traverseSeqArrayWithIndex=r.traverseReadonlyArrayWithIndexSeq,r.traverseSeqArray=function(n){return r.traverseReadonlyArrayWithIndexSeq((function(r,t){return n(t)}))},r.sequenceSeqArray=r.traverseSeqArray(M.identity),r.task={URI:r.URI,map:i,of:r.of,ap:c,chain:a,fromIO:r.fromIO,fromTask:r.fromTask},r.taskSeq={URI:r.URI,map:i,of:r.of,ap:f,chain:a,fromIO:r.fromIO,fromTask:r.fromTask},r.getSemigroup=g.getApplySemigroup(r.ApplySeq),r.getMonoid=S.getApplicativeMonoid(r.ApplicativeSeq)})),Xn=O((function(n,r){var t=U&&U.__createBinding||(Object.create?function(n,r,t,u){void 0===u&&(u=t),Object.defineProperty(n,u,{enumerable:!0,get:function(){return r[t]}})}:function(n,r,t,u){void 0===u&&(u=t),n[u]=r[t]}),u=U&&U.__setModuleDefault||(Object.create?function(n,r){Object.defineProperty(n,"default",{enumerable:!0,value:r})}:function(n,r){n.default=r}),e=U&&U.__importStar||function(n){if(n&&n.__esModule)return n;var r={};if(null!=n)for(var e in n)"default"!==e&&Object.prototype.hasOwnProperty.call(n,e)&&t(r,n,e);return u(r,n),r};Object.defineProperty(r,"__esModule",{value:!0}),r.getCompactable=r.getAltTaskValidation=r.getApplicativeTaskValidation=r.URI=r.throwError=r.of=r.altW=r.alt=r.flatten=r.flattenW=r.chainW=r.chain=r.apW=r.ap=r.mapLeft=r.bimap=r.map=r.chainIOEitherK=r.chainIOEitherKW=r.fromIOEitherK=r.chainTaskOptionK=r.fromTaskOptionK=r.swap=r.orLeft=r.orElseFirstW=r.orElseFirst=r.orElseW=r.orElse=r.toUnion=r.tryCatchK=r.tryCatch=r.getOrElseW=r.getOrElse=r.foldW=r.matchEW=r.fold=r.matchE=r.matchW=r.match=r.fromTaskOption=r.fromIOEither=r.fromEither=r.fromTask=r.fromIO=r.leftIO=r.rightIO=r.leftTask=r.rightTask=r.right=r.left=void 0,r.traverseReadonlyArrayWithIndexSeq=r.traverseReadonlyNonEmptyArrayWithIndexSeq=r.traverseReadonlyArrayWithIndex=r.traverseReadonlyNonEmptyArrayWithIndex=r.ApT=r.apSW=r.apS=r.bindW=r.bind=r.bindTo=r.Do=r.bracket=r.taskify=r.chainFirstTaskK=r.chainTaskK=r.fromTaskK=r.FromTask=r.chainFirstIOK=r.chainIOK=r.fromIOK=r.FromIO=r.fromEitherK=r.filterOrElseW=r.filterOrElse=r.fromPredicate=r.chainEitherKW=r.chainEitherK=r.chainOptionK=r.fromOptionK=r.fromOption=r.FromEither=r.Alt=r.Bifunctor=r.chainFirstW=r.chainFirst=r.MonadThrow=r.MonadTask=r.MonadIO=r.Monad=r.Chain=r.ApplicativeSeq=r.ApplySeq=r.ApplicativePar=r.apSecond=r.apFirst=r.ApplyPar=r.Pointed=r.flap=r.Functor=r.getFilterable=void 0,r.getTaskValidation=r.getSemigroup=r.getApplyMonoid=r.getApplySemigroup=r.taskEitherSeq=r.taskEither=r.sequenceSeqArray=r.traverseSeqArray=r.traverseSeqArrayWithIndex=r.sequenceArray=r.traverseArray=r.traverseArrayWithIndex=void 0;var o=e($n),i=e(Gn),c=e(w),f=e(Vn);r.left=i.left(f.Pointed),r.right=i.right(f.Pointed),r.rightTask=i.rightF(f.Functor),r.leftTask=i.leftF(f.Functor),r.rightIO=M.flow(f.fromIO,r.rightTask),r.leftIO=M.flow(f.fromIO,r.leftTask),r.fromIO=r.rightIO,r.fromTask=r.rightTask,r.fromEither=f.of,r.fromIOEither=f.fromIO,r.fromTaskOption=function(n){return f.map(o.fromOption(n))},r.match=i.match(f.Functor),r.matchW=r.match,r.matchE=i.matchE(f.Monad),r.fold=r.matchE,r.matchEW=r.matchE,r.foldW=r.matchEW,r.getOrElse=i.getOrElse(f.Monad),r.getOrElseW=r.getOrElse,r.tryCatch=function(n,r){return function(){return n().then(c.right,(function(n){return c.left(r(n))}))}},r.tryCatchK=function(n,t){return function(){for(var u=[],e=0;e<arguments.length;e++)u[e]=arguments[e];return r.tryCatch((function(){return n.apply(void 0,u)}),t)}},r.toUnion=i.toUnion(f.Functor),r.orElse=i.orElse(f.Monad),r.orElseW=r.orElse,r.orElseFirst=i.orElseFirst(f.Monad),r.orElseFirstW=r.orElseFirst,r.orLeft=i.orLeft(f.Monad),r.swap=i.swap(f.Functor),r.fromTaskOptionK=function(n){var t=r.fromTaskOption(n);return function(n){return M.flow(n,t)}},r.chainTaskOptionK=function(n){return M.flow(r.fromTaskOptionK(n),r.chain)},r.fromIOEitherK=function(n){return M.flow(n,r.fromIOEither)},r.chainIOEitherKW=function(n){return r.chainW(r.fromIOEitherK(n))},r.chainIOEitherK=r.chainIOEitherKW;var a=function(n,t){return M.pipe(n,r.map(t))},v=function(n,t){return M.pipe(n,r.ap(t))},d=function(n,t){return M.pipe(n,r.chain((function(n){return M.pipe(t,r.map(n))})))},p=function(n,t){return M.pipe(n,r.chain(t))},s=function(n,t,u){return M.pipe(n,r.bimap(t,u))},l=function(n,t){return M.pipe(n,r.mapLeft(t))},m=function(n,t){return M.pipe(n,r.alt(t))};function h(n,t){var u=g.ap(n,o.getApplicativeValidation(t));return{URI:r.URI,_E:void 0,map:a,ap:function(n,r){return M.pipe(n,u(r))},of:r.of}}function I(n){var t=i.altValidation(f.Monad,n);return{URI:r.URI,_E:void 0,map:a,alt:function(n,r){return M.pipe(n,t(r))}}}r.map=i.map(f.Functor),r.bimap=i.bimap(f.Functor),r.mapLeft=i.mapLeft(f.Functor),r.ap=i.ap(f.ApplyPar),r.apW=r.ap,r.chain=i.chain(f.Monad),r.chainW=r.chain,r.flattenW=r.chainW(M.identity),r.flatten=r.flattenW,r.alt=i.alt(f.Monad),r.altW=r.alt,r.of=r.right,r.throwError=r.left,r.URI="TaskEither",r.getApplicativeTaskValidation=h,r.getAltTaskValidation=I,r.getCompactable=function(n){var t=o.getCompactable(n);return{URI:r.URI,_E:void 0,compact:Hn.compact(f.Functor,t),separate:Hn.separate(f.Functor,t,o.Functor)}},r.getFilterable=function(n){var t=o.getFilterable(n),u=r.getCompactable(n),e=Bn.filter(f.Functor,t),i=Bn.filterMap(f.Functor,t),c=Bn.partition(f.Functor,t),v=Bn.partitionMap(f.Functor,t);return{URI:r.URI,_E:void 0,map:a,compact:u.compact,separate:u.separate,filter:function(n,r){return M.pipe(n,e(r))},filterMap:function(n,r){return M.pipe(n,i(r))},partition:function(n,r){return M.pipe(n,c(r))},partitionMap:function(n,r){return M.pipe(n,v(r))}}},r.Functor={URI:r.URI,map:a},r.flap=y.flap(r.Functor),r.Pointed={URI:r.URI,of:r.of},r.ApplyPar={URI:r.URI,map:a,ap:v},r.apFirst=g.apFirst(r.ApplyPar),r.apSecond=g.apSecond(r.ApplyPar),r.ApplicativePar={URI:r.URI,map:a,ap:v,of:r.of},r.ApplySeq={URI:r.URI,map:a,ap:d},r.ApplicativeSeq={URI:r.URI,map:a,ap:d,of:r.of},r.Chain={URI:r.URI,map:a,ap:v,chain:p},r.Monad={URI:r.URI,map:a,ap:v,chain:p,of:r.of},r.MonadIO={URI:r.URI,map:a,ap:v,chain:p,of:r.of,fromIO:r.fromIO},r.MonadTask={URI:r.URI,map:a,ap:v,chain:p,of:r.of,fromIO:r.fromIO,fromTask:r.fromTask},r.MonadThrow={URI:r.URI,map:a,ap:v,chain:p,of:r.of,throwError:r.throwError},r.chainFirst=j.chainFirst(r.Chain),r.chainFirstW=r.chainFirst,r.Bifunctor={URI:r.URI,bimap:s,mapLeft:l},r.Alt={URI:r.URI,map:a,alt:m},r.FromEither={URI:r.URI,fromEither:r.fromEither},r.fromOption=x.fromOption(r.FromEither),r.fromOptionK=x.fromOptionK(r.FromEither),r.chainOptionK=x.chainOptionK(r.FromEither,r.Chain),r.chainEitherK=x.chainEitherK(r.FromEither,r.Chain),r.chainEitherKW=r.chainEitherK,r.fromPredicate=x.fromPredicate(r.FromEither),r.filterOrElse=x.filterOrElse(r.FromEither,r.Chain),r.filterOrElseW=r.filterOrElse,r.fromEitherK=x.fromEitherK(r.FromEither),r.FromIO={URI:r.URI,fromIO:r.fromIO},r.fromIOK=Kn.fromIOK(r.FromIO),r.chainIOK=Kn.chainIOK(r.FromIO,r.Chain),r.chainFirstIOK=Kn.chainFirstIOK(r.FromIO,r.Chain),r.FromTask={URI:r.URI,fromIO:r.fromIO,fromTask:r.fromTask},r.fromTaskK=Qn.fromTaskK(r.FromTask),r.chainTaskK=Qn.chainTaskK(r.FromTask,r.Chain),r.chainFirstTaskK=Qn.chainFirstTaskK(r.FromTask,r.Chain),r.taskify=function(n){return function(){var r=Array.prototype.slice.call(arguments);return function(){return new Promise((function(t){n.apply(null,r.concat((function(n,r){return t(null!=n?c.left(n):c.right(r))})))}))}}},r.bracket=function(n,t,u){return M.pipe(n,r.chain((function(n){return M.pipe(t(n),f.chain((function(t){return M.pipe(u(n,t),r.chain((function(){return f.of(t)})))})))})))},r.Do=r.of(c.emptyRecord),r.bindTo=y.bindTo(r.Functor),r.bind=j.bind(r.Chain),r.bindW=r.bind,r.apS=g.apS(r.ApplyPar),r.apSW=r.apS,r.ApT=r.of(c.emptyReadonlyArray),r.traverseReadonlyNonEmptyArrayWithIndex=function(n){return M.flow(f.traverseReadonlyNonEmptyArrayWithIndex(n),f.map(o.traverseReadonlyNonEmptyArrayWithIndex(M.SK)))},r.traverseReadonlyArrayWithIndex=function(n){var t=r.traverseReadonlyNonEmptyArrayWithIndex(n);return function(n){return c.isNonEmpty(n)?t(n):r.ApT}},r.traverseReadonlyNonEmptyArrayWithIndexSeq=function(n){return function(r){return function(){return c.tail(r).reduce((function(r,t,u){return r.then((function(e){return c.isLeft(e)?r:n(u+1,t)().then((function(n){return c.isLeft(n)?n:(e.right.push(n.right),e)}))}))}),n(0,c.head(r))().then(o.map(c.singleton)))}}},r.traverseReadonlyArrayWithIndexSeq=function(n){var t=r.traverseReadonlyNonEmptyArrayWithIndexSeq(n);return function(n){return c.isNonEmpty(n)?t(n):r.ApT}},r.traverseArrayWithIndex=r.traverseReadonlyArrayWithIndex,r.traverseArray=function(n){return r.traverseReadonlyArrayWithIndex((function(r,t){return n(t)}))},r.sequenceArray=r.traverseArray(M.identity),r.traverseSeqArrayWithIndex=r.traverseReadonlyArrayWithIndexSeq,r.traverseSeqArray=function(n){return r.traverseReadonlyArrayWithIndexSeq((function(r,t){return n(t)}))},r.sequenceSeqArray=r.traverseSeqArray(M.identity),r.taskEither={URI:r.URI,bimap:s,mapLeft:l,map:a,of:r.of,ap:v,chain:p,alt:m,fromIO:r.fromIO,fromTask:r.fromTask,throwError:r.throwError},r.taskEitherSeq={URI:r.URI,bimap:s,mapLeft:l,map:a,of:r.of,ap:d,chain:p,alt:m,fromIO:r.fromIO,fromTask:r.fromTask,throwError:r.throwError},r.getApplySemigroup=g.getApplySemigroup(r.ApplySeq),r.getApplyMonoid=S.getApplicativeMonoid(r.ApplicativeSeq),r.getSemigroup=function(n){return g.getApplySemigroup(f.ApplySeq)(o.getSemigroup(n))},r.getTaskValidation=function(n){var t=h(f.ApplicativePar,n),u=I(n);return{URI:r.URI,_E:void 0,map:a,ap:t.ap,of:r.of,chain:p,bimap:s,mapLeft:l,alt:u.alt,fromIO:r.fromIO,fromTask:r.fromTask,throwError:r.throwError}}}));const Yn=n=>({kind:"server",inner:n}),Zn={kind:"client",inner:"Token not exist or empty"},nr={kind:"client",inner:"Api path empty or missing"},rr=pn({concat:function(n,r){return n+r},empty:""}),tr=()=>f(pn(d()).concat(ln(G.apiPath),ln("https://api.vviinn.com")),cn((()=>nr))),ur={concat:(n,r)=>{const t=new Headers;return void 0!==n&&n.forEach(((n,r)=>t.append(r,n))),void 0!==r&&r.forEach(((n,r)=>t.append(r,n))),t}},er=s({method:{concat:(n,r)=>{const t=rr.concat(ln(n),ln(r));return f(t,(u=()=>"GET",function(n){return sn(n)?u():n.value}));var u}},body:l(),headers:ur}),or=n=>({method:n}),ir=nn(or("GET")),cr=nn(or("POST")),fr=n=>n.status>=200&&n.status<300?Xn.right(n):Xn.left(n),ar=er,vr=(n,r)=>([t,u])=>{const e=new URL(n,t),o=ar.concat(u,r);return M.pipe(((n,r={})=>M.pipe(((n,r={method:"GET"})=>Xn.tryCatch((()=>fetch(n,r)),(n=>n)))(n,r),Xn.chain(fr),Xn.chain((n=>function(n){return Xn.fromTask((()=>n.json()))}(n)))))(e.toString(),o),Xn.mapLeft(Yn))},dr=n=>(n=>0===n.length)(n)?Z("entity is empty"):nn(n),pr=n=>{return f(n,("entity not exist",function(n){return null==n?Z("entity not exist"):nn(n)}),(r=dr,function(n){return fn(n)?n:r(n.right)}));var r},sr=n=>new Headers({Authorization:`Bearer ${n}`}),lr=n=>f(n,pr,$n.mapLeft((()=>Zn))),mr=n=>f(n,lr,$n.map(sr)),hr=g.sequenceT($n.Apply),Ir={equals:(n,r)=>n.class===r.class&&n.score===r.score&&n.rectangle.left===r.rectangle.left&&n.rectangle.top===r.rectangle.top&&n.rectangle.height===r.rectangle.height&&n.rectangle.width===r.rectangle.width},Rr=n=>M.pipe(hr(tr(),cr),Pn,Nn(vr("search/session",n)));var br;!function(n){n.eform="eform",n.etype="etype",n.form="form",n.href="href",n.method="method",n.accepts="accepts",n.produces="produces",n.rel="rel",n.type="type",n.value="value"}(br||(br={}));const Ur=n=>{switch(n.type){case"array":return n.value.map(Ur);default:return n.value}},Or=n=>r=>f(hr(tr(),nn(or(n.method))),Pn,Nn(vr(n.href,r))),Mr=(n,r)=>{const t=I(n),u=m.concat(t,r);return Object.assign(Object.assign({},u),{width:n.width,height:n.height})},gr=(n,r)=>{switch(r.direction){case h.NorthEast:return((n,r)=>{const t=m.concat(I(n),{x:0,y:r.position.y});return Object.assign(Object.assign({},t),{width:n.width+r.position.x,height:n.height-r.position.y})})(n,r);case h.NorthWest:return((n,r)=>{const t=m.concat(I(n),r.position);return Object.assign(Object.assign({},t),{width:n.width-r.position.x,height:n.height-r.position.y})})(n,r);case h.SouthEast:return((n,r)=>Object.assign(Object.assign({},n),{width:n.width+r.position.x,height:n.height+r.position.y}))(n,r);case h.SouthWest:return((n,r)=>{const t=m.concat(I(n),{x:r.position.x,y:0});return Object.assign(Object.assign({},t),{width:n.width-r.position.x,height:n.height+r.position.y})})(n,r)}},jr=n=>({x:0,y:0,width:n.width,height:n.height}),wr=n=>Object.assign({x:n.left,y:n.top},n),xr=n=>r=>({x:r.x*n.width,y:r.y*n.height,width:r.width*n.width,height:r.height*n.height}),yr=n=>({x:n.x+.5*n.width,y:n.y+.5*n.height});var _r;!function(n){n.desc="desc",n.eform="eform",n.enabled="enabled",n.etype="etype",n.form="form",n.label="label",n.max="max",n.maxlength="maxlength",n.maxsize="maxsize",n.min="min",n.minlength="minlength",n.minsize="minsize",n.mutable="mutable",n.name="name",n.options="options",n.pattern="pattern",n.placeholder="placeholder",n.required="required",n.secret="secret",n.type="type",n.value="value",n.visible="visible"}(_r||(_r={}));const Wr=(n,r)=>{const t=new URLSearchParams(Object.entries(r));return[`${n.href}?${t.toString()}`,{method:"GET"}]},Er=(n,r)=>[n.href,{body:JSON.stringify(r),method:n.method,headers:new Headers({"Content-Type":"application/ion+json"})}],kr=(n,r={})=>t=>M.pipe(hr(tr(),M.pipe(((n,r)=>M.pipe(((n,r)=>{const t=n.map((n=>n.name)),u=Object.keys(r),e=t.filter((n=>!u.includes(n)));return 0===e.length?nn(r):Z(`Data should contains fields: ${e.join(", ")}`)})(n.value,r),tn((r=>n.rel.includes("query-form")?Wr(n,r):Er(n,r)))))(n,r),on((n=>({kind:"app",inner:n}))))),Pn,Nn((n=>{const r=n[0],[u,e]=n[1];return vr(u,e)([r,t])}))),qr=async n=>new Promise((r=>{const t=new FileReader;t.addEventListener("load",(()=>{r(t.result)})),t.readAsDataURL(n)})),Pr=g.sequenceT(F.Apply);const Tr=["jpg","jpeg","png","webp"],Ar={kind:"client",inner:"File format not supported"},zr=n=>{const r=n.type.split("/")[1],t=(u=t=>t===r?F.some(n):F.none,function(n){for(var r=0;r<n.length;r++){var t=u(n[r]);if(R(t))return t}return a})(Tr);var u;return M.pipe(t,$n.fromOption((()=>Ar)))},Lr={kind:"app",inner:"File doesnt exist"},Nr=n=>()=>new Promise((r=>{const t=new FileReader,u=new Image;t.onload=n=>{u.src=n.target.result},u.onload=()=>r(u),t.readAsDataURL(n)}));var Cr=O((function(n,r){Object.defineProperty(r,"__esModule",{value:!0}),r.copy=void 0,r.copy=(n,r,t=0,u=0,e=n.width-t,o=n.height-u,i=0,c=0)=>{if(t|=0,u|=0,o|=0,i|=0,c|=0,(e|=0)<=0||o<=0)return;const f=new Uint32Array(n.data.buffer),a=new Uint32Array(r.data.buffer);for(let v=0;v<o;v++){const o=u+v;if(o<0||o>=n.height)continue;const d=c+v;if(!(d<0||d>=r.height))for(let u=0;u<e;u++){const e=t+u;if(e<0||e>=n.width)continue;const c=i+u;c<0||c>=r.width||(a[d*r.width+c]=f[o*n.width+e])}}}})),Sr=O((function(n,r){Object.defineProperty(r,"__esModule",{value:!0}),r.CreateImageFactory=(n=[0,0,0,0],r=4)=>{if(r=Math.floor(r),isNaN(r)||r<1)throw TypeError("channels should be a positive non-zero number");if(!("length"in n)||n.length<r)throw TypeError(`fill should be iterable with at least ${r} members`);const t=(n=new Uint8ClampedArray(n).slice(0,r)).every((n=>0===n));return(u,e,o)=>{if(void 0===u||void 0===e)throw TypeError("Not enough arguments");if(u=Math.floor(u),e=Math.floor(e),isNaN(u)||u<1||isNaN(e)||e<1)throw TypeError("Index or size is negative or greater than the allowed amount");const i=u*e*r;if(void 0===o&&(o=new Uint8ClampedArray(i)),o instanceof Uint8ClampedArray){if(o.length!==i)throw TypeError("Index or size is negative or greater than the allowed amount");if(!t)for(let t=0;t<e;t++)for(let e=0;e<u;e++){const i=(t*u+e)*r;for(let t=0;t<r;t++)o[i+t]=n[t]}return{get width(){return u},get height(){return e},get data(){return o}}}throw TypeError("Expected data to be Uint8ClampedArray or undefined")}},r.createImage=r.CreateImageFactory()})),Dr=O((function(n,r){Object.defineProperty(r,"__esModule",{value:!0}),r.filters=void 0;const t=(n,r)=>{if(n<=-r||n>=r)return 0;if(0==n)return 0;const t=n*Math.PI;return Math.sin(t)/t*Math.sin(t/r)/(t/r)},u=n=>Math.round(16383*n);r.filters=(n,r,e,o,i)=>{const c=i?2:3,f=1/e,a=Math.min(1,e),v=c/a,d=Math.floor(2*(v+1)),p=new Int16Array((d+2)*r);let s=0;for(let e=0;e<r;e++){const i=(e+.5)*f+o,d=Math.max(0,Math.floor(i-v)),l=Math.min(n-1,Math.ceil(i+v)),m=l-d+1,h=new Float32Array(m),I=new Int16Array(m);let R=0,b=0;for(let n=d;n<=l;n++){const r=t((n+.5-i)*a,c);R+=r,h[b]=r,b++}let U=0;for(let n=0;n<h.length;n++){const r=h[n]/R;U+=r,I[n]=u(r)}I[r>>1]+=u(1-U);let O=0;for(;O<I.length&&0===I[O];)O++;let M=I.length-1;for(;M>0&&0===I[M];)M--;const g=M-O+1;p[s++]=d+O,p[s++]=g,p.set(I.subarray(O,M+1),s),s+=g}return p}})),Fr=O((function(n,r){Object.defineProperty(r,"__esModule",{value:!0}),r.convolve=void 0,r.convolve=(n,r,t,u,e,o)=>{let i=0,c=0;for(let f=0;f<u;f++){let a=0;for(let t=0;t<e;t++){let t=i+4*o[a++]|0,e=0,f=0,v=0,d=0;for(let r=o[a++];r>0;r--){const r=o[a++];e=e+r*n[t]|0,f=f+r*n[t+1]|0,v=v+r*n[t+2]|0,d=d+r*n[t+3]|0,t=t+4|0}r[c]=e+8192>>14,r[c+1]=f+8192>>14,r[c+2]=v+8192>>14,r[c+3]=d+8192>>14,c=c+4*u|0}c=4*(f+1)|0,i=(f+1)*t*4|0}}})),Hr=O((function(n,r){Object.defineProperty(r,"__esModule",{value:!0}),r.lanczos2=r.lanczos=void 0;const t=(n,r,t=!1)=>{const u=r.height/n.height,e=Dr.filters(n.width,r.width,r.width/n.width,0,t),o=Dr.filters(n.height,r.height,u,0,t),i=new Uint8ClampedArray(r.width*n.height*4);Fr.convolve(n.data,i,n.width,n.height,r.width,e),Fr.convolve(i,r.data,n.height,r.width,r.height,o)};r.lanczos=(n,r,u=0,e=0,o=n.width-u,i=n.height-e,c=0,f=0,a=r.width-c,v=r.height-f)=>{if(e|=0,i|=0,c|=0,f|=0,a|=0,v|=0,(o|=0)<=0||i<=0||a<=0||v<=0)return;if(0==(u|=0)&&0===e&&o===n.width&&i===n.height&&0===c&&0===f&&a===r.width&&v===r.height)return void t(n,r);const d=Sr.createImage(o,i),p=Sr.createImage(a,v);Cr.copy(n,d,u,e),t(d,p),Cr.copy(p,r,0,0,p.width,p.height,c,f)},r.lanczos2=(n,r,u=0,e=0,o=n.width-u,i=n.height-e,c=0,f=0,a=r.width-c,v=r.height-f)=>{if(e|=0,i|=0,c|=0,f|=0,a|=0,v|=0,(o|=0)<=0||i<=0||a<=0||v<=0)return;if(0==(u|=0)&&0===e&&o===n.width&&i===n.height&&0===c&&0===f&&a===r.width&&v===r.height)return void t(n,r,!0);const d=Sr.createImage(o,i),p=Sr.createImage(a,v);Cr.copy(n,d,u,e),t(d,p,!0),Cr.copy(p,r,0,0,p.width,p.height,c,f)}}));const Jr=n=>({kind:"height",size:n}),$r=W.contramap((n=>n.size))(T.Ord),Gr=C.sort($r),Br=C.sort({equals:(n,r)=>n.kind===r.kind,compare:(n,r)=>n.kind===r.kind?0:"width"===n.kind?-1:1}),Kr=n=>r=>{const t=Gr(r),u=(n=>{const[r,t]=n;return r.size/t.size})(t),e=Object.assign(Object.assign({},t[0]),{size:n*u}),o=Object.assign(Object.assign({},t[1]),{size:n});return Br([o,e])},Qr=n=>{const{naturalWidth:r,naturalHeight:t}=n;return[(u=r,{kind:"width",size:u}),Jr(t)];var u},Vr=()=>{const n=document.createElement("canvas"),r=n.getContext("2d");return[n,r]},Xr=async n=>{const r=await fetch(n),t=await r.blob();return new File([t],"image",{type:t.type,lastModified:Date.now()})},Yr=n=>()=>new Promise((async r=>{const t=await fetch(n),u=await t.blob();r(new File([u],"image",{type:u.type,lastModified:Date.now()}))})),Zr=(n,r)=>n.naturalWidth>r?((n,r)=>{const t=Kr(n),[u,e]=Vr(),o=Qr(r),[i,c]=t(o).map((n=>n.size)),f=new ImageData(i,c),a=(n=>{const{naturalWidth:r,naturalHeight:t}=n,[u,e]=Vr();return u.width=r,u.height=t,e.drawImage(n,0,0),e.getImageData(0,0,r,t)})(r);return u.width=i,u.height=c,Hr.lanczos(a,f),e.putImageData(f,0,0),u.toDataURL()})(r,n):(n=>{const r=document.createElement("canvas"),{naturalWidth:t,naturalHeight:u}=n,e=r.getContext("2d");return r.width=t,r.height=u,e.drawImage(n,0,0,t,u),r.toDataURL()})(n),nt=n=>f(n,mr,tn((n=>({headers:n})))),{state:rt,onChange:tt}=$({token:void 0,results:[],filters:[],resetCategoryLink:void 0,activeIonLink:void 0,cropperHandlers:[],selectedCropper:void 0,rectangleSearchForm:void 0,detectedObjects:[],detectedObject:void 0,objectDetectionInProgress:!1,imageWidth:500,image:F.none,imageUrl:F.none,imageBounds:F.none,searchArea:F.none,resultsComponents:[],serverError:!1,loading:!1}),ut=async n=>{var r,t;rt.results=n.value,rt.filters=(t=Ur(n.filters),Object.entries(t).map((([n,r])=>({name:n,filters:r})))),rt.rectangleSearchForm=n.searchArea,rt.resetCategoryLink=null===(r=n.links)||void 0===r?void 0:r.clearFilters,rt.loading=!1},et=n=>f(nt(rt.token),Pn,Nn(Or(n))),ot=async()=>{rt.loading=!0,f(Pr(rt.imageBounds,rt.searchArea),F.map((async([n,r])=>{const t=(u=n,n=>({x:n.x/u.width,y:n.y/u.height,width:n.width/u.width,height:n.height/u.height}))(r);var u;const e={width:t.width,height:t.height,left:t.x,top:t.y};return await f(nt(rt.token),Pn,Nn(kr(rt.rectangleSearchForm,e)),Tn(ut))()})))},it=n=>{rt.loading=!0;const r=(n=>{const r=new FormData;return r.append("image",n),r})(n),t=hr(mr(rt.token),nn(r));return f(t,tn((([n,r])=>({headers:n,body:r}))),Pn,Ln(Rr),Tn((n=>(ut(n),(async n=>{rt.objectDetectionInProgress=!0;const r={kind:"server",inner:"Can not get a link for objects detection"};var t,u,e;await f((t=n,u="detectedObjects",f(t.links,ln,(e=n=>ln(n[u]),function(n){return sn(n)?vn:e(n.value)}))),Dn((()=>r)),Ln(et),Tn((n=>rt.detectedObjects=Ur(n))))(),rt.objectDetectionInProgress=!1})(n),rt.loading=!1,n))),An((n=>(rt.serverError=!0,rt.loading=!1,n))))},ct=rt;tt("activeIonLink",(async n=>{rt.loading=!0;const r=n||rt.resetCategoryLink;await f(nt(rt.token),Pn,Nn(Or(r)),Tn(ut),An((n=>({kind:"network error",inner:n}))))()})),tt("searchArea",(n=>{f(n,F.map((n=>{rt.cropperHandlers=b(n)})))})),tt("serverError",(()=>{rt.loading=!1}));const ft=n=>{ct.image=F.some(n),ct.imageUrl=F.some(n.src)},at=async n=>{const r=(n=>M.pipe(n,F.fromNullable,$n.fromOption((()=>Lr)),$n.chain(zr)))(n),t=(500,n=>M.pipe(n,Nr,Vn.map((n=>Zr(n,500))),Vn.chain(Yr)));const u=f(r,Pn,Fn(t)),e=await f(u,Ln(it))();return f(hr(e,r),tn((([n,r])=>(async(n,r)=>{const t={image:await(async n=>({name:n.name,mediaType:n.type,value:await qr(n)}))(r)},u=n.uploadHighResolutionImage;await f(nt(rt.token),Pn,Nn(kr(u,t)))()})(n,r)))),await f(u,Fn(Nr),Tn(ft))(),e};export{en as A,$n as E,P as N,F as O,k as S,Xn as T,C as _,M as a,ir as b,Nn as c,X as d,U as e,Pn as f,tr as g,O as h,ct as i,Pr as j,Mr as k,ot as l,vr as m,wr as n,Ur as o,xr as p,yr as q,Ir as r,G as s,gr as t,Xr as u,at as v,an as w,jr as x,Qr as y,Kr as z}
|