vviinn-widgets 2.4.1 → 2.4.2

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.
Files changed (56) hide show
  1. package/dist/cjs/{app-globals-324e9cd0.js → app-globals-d999d944.js} +1 -1
  2. package/dist/cjs/cropper-handler_27.cjs.entry.js +5 -5
  3. package/dist/cjs/{customized-slots-703cd28d.js → customized-slots-90e8e849.js} +1 -1
  4. package/dist/cjs/{index-6078b9e5.js → index-53400160.js} +1 -1
  5. package/dist/cjs/{index-a00145c0.js → index-c0d08aca.js} +1 -1
  6. package/dist/cjs/{index-a821350a.js → index-e8cf5dc5.js} +1 -1
  7. package/dist/cjs/loader.cjs.js +2 -2
  8. package/dist/cjs/vviinn-carousel_2.cjs.entry.js +6 -6
  9. package/dist/cjs/vviinn-recommendations-sidebar.cjs.entry.js +2 -2
  10. package/dist/cjs/vviinn-vpr-button.cjs.entry.js +2 -2
  11. package/dist/cjs/vviinn-vps-button.cjs.entry.js +3 -3
  12. package/dist/cjs/vviinn-widgets.cjs.js +2 -2
  13. package/dist/collection/components/vviinn-carousel/vviinn-carousel.js +3 -3
  14. package/dist/collection/components/vviinn-example-images/vviinn-example-images.js +4 -4
  15. package/dist/esm/{app-globals-02b550a1.js → app-globals-f91c6f94.js} +1 -1
  16. package/dist/esm/cropper-handler_27.entry.js +5 -5
  17. package/dist/esm/{customized-slots-472f6e69.js → customized-slots-7be7f3b8.js} +1 -1
  18. package/dist/esm/{index-711602a5.js → index-00c7b7c2.js} +1 -1
  19. package/dist/esm/{index-26769494.js → index-840ec915.js} +1 -1
  20. package/dist/esm/{index-b908268d.js → index-d7147986.js} +1 -1
  21. package/dist/esm/loader.js +2 -2
  22. package/dist/esm/vviinn-carousel_2.entry.js +6 -6
  23. package/dist/esm/vviinn-recommendations-sidebar.entry.js +2 -2
  24. package/dist/esm/vviinn-vpr-button.entry.js +2 -2
  25. package/dist/esm/vviinn-vps-button.entry.js +3 -3
  26. package/dist/esm/vviinn-widgets.js +2 -2
  27. package/dist/vviinn-widgets/{p-4a7d9763.entry.js → p-07d8ba79.entry.js} +1 -1
  28. package/dist/vviinn-widgets/{p-817158df.js → p-196479f9.js} +1 -1
  29. package/dist/vviinn-widgets/{p-70f54b8b.entry.js → p-2d4cb17f.entry.js} +1 -1
  30. package/dist/vviinn-widgets/{p-e031c06c.js → p-7d5af04d.js} +1 -1
  31. package/dist/vviinn-widgets/{p-4fb28a11.entry.js → p-9c7297c8.entry.js} +1 -1
  32. package/dist/vviinn-widgets/{p-13842a39.js → p-a66512b2.js} +1 -1
  33. package/{www/build/p-19b7a59e.entry.js → dist/vviinn-widgets/p-ae524f97.entry.js} +1 -1
  34. package/{www/build/p-cd711bcd.js → dist/vviinn-widgets/p-ce96f232.js} +1 -1
  35. package/dist/vviinn-widgets/{p-ee679114.js → p-dc2da207.js} +1 -1
  36. package/dist/vviinn-widgets/p-fce4183d.entry.js +1 -0
  37. package/dist/vviinn-widgets/vviinn-widgets.esm.js +1 -1
  38. package/package.json +1 -1
  39. package/www/build/{p-4a7d9763.entry.js → p-07d8ba79.entry.js} +1 -1
  40. package/www/build/{p-817158df.js → p-196479f9.js} +1 -1
  41. package/www/build/{p-70f54b8b.entry.js → p-2d4cb17f.entry.js} +1 -1
  42. package/www/build/p-32bb0615.js +1 -0
  43. package/www/build/{p-e031c06c.js → p-7d5af04d.js} +1 -1
  44. package/www/build/{p-4fb28a11.entry.js → p-9c7297c8.entry.js} +1 -1
  45. package/www/build/{p-13842a39.js → p-a66512b2.js} +1 -1
  46. package/www/build/p-a67898be.css +1 -0
  47. package/{dist/vviinn-widgets/p-19b7a59e.entry.js → www/build/p-ae524f97.entry.js} +1 -1
  48. package/{dist/vviinn-widgets/p-cd711bcd.js → www/build/p-ce96f232.js} +1 -1
  49. package/www/build/{p-ee679114.js → p-dc2da207.js} +1 -1
  50. package/www/build/p-fce4183d.entry.js +1 -0
  51. package/www/build/vviinn-widgets.esm.js +1 -1
  52. package/www/index.html +1 -1
  53. package/dist/vviinn-widgets/p-6715be5d.entry.js +0 -1
  54. package/www/build/p-6715be5d.entry.js +0 -1
  55. package/www/build/p-92df8b33.js +0 -125
  56. package/www/build/p-e0153ae2.css +0 -6
@@ -1 +1 @@
1
- import{a as n,f as t}from"./p-ee679114.js";function r(n){return n}function e(n,t,r,e,u,i,o,c,f){switch(arguments.length){case 1:return n;case 2:return function(){return t(n.apply(this,arguments))};case 3:return function(){return r(t(n.apply(this,arguments)))};case 4:return function(){return e(r(t(n.apply(this,arguments))))};case 5:return function(){return u(e(r(t(n.apply(this,arguments)))))};case 6:return function(){return i(u(e(r(t(n.apply(this,arguments))))))};case 7:return function(){return o(i(u(e(r(t(n.apply(this,arguments)))))))};case 8:return function(){return c(o(i(u(e(r(t(n.apply(this,arguments))))))))};case 9:return function(){return f(c(o(i(u(e(r(t(n.apply(this,arguments)))))))))}}}function u(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];return n}function i(n,t,r,e,u,i,o,c,f){switch(arguments.length){case 1:return n;case 2:return t(n);case 3:return r(t(n));case 4:return e(r(t(n)));case 5:return u(e(r(t(n))));case 6:return i(u(e(r(t(n)))));case 7:return o(i(u(e(r(t(n))))));case 8:return c(o(i(u(e(r(t(n)))))));case 9:return f(c(o(i(u(e(r(t(n))))))));default:for(var a=arguments[0],s=1;s<arguments.length;s++)a=arguments[s](a);return a}}var o={_tag:"None"},c=function(n){return{_tag:"Left",left:n}},f=function(n){return{_tag:"Right",right:n}},a=Object.prototype.hasOwnProperty,s=function(n){return{concat:function(t,r){var e={};for(var u in n)a.call(n,u)&&(e[u]=n[u].concat(t[u],r[u]));return e}}},v={concat:function(n,t){return n+t}};const d={concat:(n,t)=>n-t},l=({x:n,y:t})=>({x:n,y:t}),p=({clientX:n,clientY:t})=>({x:n,y:t}),h=s({x:d,y:d}),m=s({x:v,y:v});var b;!function(n){n[n.East=0]="East",n[n.North=1]="North",n[n.NorthEast=2]="NorthEast",n[n.NorthWest=3]="NorthWest",n[n.South=4]="South",n[n.SouthEast=5]="SouthEast",n[n.SouthWest=6]="SouthWest",n[n.West=7]="West"}(b||(b={}));const y=n=>{switch(n){case b.East:return"e-resize";case b.North:return"n-resize";case b.NorthEast:return"ne-resize";case b.NorthWest:return"nw-resize";case b.South:return"s-resize";case b.SouthEast:return"se-resize";case b.SouthWest:return"sw-resize";case b.West:return"w-resize";default:return"pointer"}};var w="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function I(n,t,r){return n(r={path:t,exports:{},require:function(){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}()}},r.exports),r.exports}var g=I((function(n,t){function r(n){return n}function e(n){return function(){return n}}function u(n,t,r,e,u,i,o,c,f){switch(arguments.length){case 1:return n;case 2:return function(){return t(n.apply(this,arguments))};case 3:return function(){return r(t(n.apply(this,arguments)))};case 4:return function(){return e(r(t(n.apply(this,arguments))))};case 5:return function(){return u(e(r(t(n.apply(this,arguments)))))};case 6:return function(){return i(u(e(r(t(n.apply(this,arguments))))))};case 7:return function(){return o(i(u(e(r(t(n.apply(this,arguments)))))))};case 8:return function(){return c(o(i(u(e(r(t(n.apply(this,arguments))))))))};case 9:return function(){return f(c(o(i(u(e(r(t(n.apply(this,arguments)))))))))}}}function i(){throw new Error("Called `absurd` function which should be uncallable")}Object.defineProperty(t,"__esModule",{value:!0}),t.getEndomorphismMonoid=t.not=t.SK=t.hole=t.pipe=t.untupled=t.tupled=t.absurd=t.decrement=t.increment=t.tuple=t.flow=t.flip=t.constVoid=t.constUndefined=t.constNull=t.constFalse=t.constTrue=t.constant=t.unsafeCoerce=t.identity=t.apply=t.getRing=t.getSemiring=t.getMonoid=t.getSemigroup=t.getBooleanAlgebra=void 0,t.getBooleanAlgebra=function(n){return function(){return{meet:function(t,r){return function(e){return n.meet(t(e),r(e))}},join:function(t,r){return function(e){return n.join(t(e),r(e))}},zero:function(){return n.zero},one:function(){return n.one},implies:function(t,r){return function(e){return n.implies(t(e),r(e))}},not:function(t){return function(r){return n.not(t(r))}}}}},t.getSemigroup=function(n){return function(){return{concat:function(t,r){return function(e){return n.concat(t(e),r(e))}}}}},t.getMonoid=function(n){var r=t.getSemigroup(n);return function(){return{concat:r().concat,empty:function(){return n.empty}}}},t.getSemiring=function(n){return{add:function(t,r){return function(e){return n.add(t(e),r(e))}},zero:function(){return n.zero},mul:function(t,r){return function(e){return n.mul(t(e),r(e))}},one:function(){return n.one}}},t.getRing=function(n){var r=t.getSemiring(n);return{add:r.add,mul:r.mul,one:r.one,zero:r.zero,sub:function(t,r){return function(e){return n.sub(t(e),r(e))}}}},t.apply=function(n){return function(t){return t(n)}},t.identity=r,t.unsafeCoerce=r,t.constant=e,t.constTrue=e(!0),t.constFalse=e(!1),t.constNull=e(null),t.constUndefined=e(void 0),t.constVoid=t.constUndefined,t.flip=function(n){return function(t,r){return n(r,t)}},t.flow=u,t.tuple=function(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];return n},t.increment=function(n){return n+1},t.decrement=function(n){return n-1},t.absurd=i,t.tupled=function(n){return function(t){return n.apply(void 0,t)}},t.untupled=function(n){return function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return n(t)}},t.pipe=function(n,t,r,e,u,i,o,c,f){switch(arguments.length){case 1:return n;case 2:return t(n);case 3:return r(t(n));case 4:return e(r(t(n)));case 5:return u(e(r(t(n))));case 6:return i(u(e(r(t(n)))));case 7:return o(i(u(e(r(t(n))))));case 8:return c(o(i(u(e(r(t(n)))))));case 9:return f(c(o(i(u(e(r(t(n))))))));default:for(var a=arguments[0],s=1;s<arguments.length;s++)a=arguments[s](a);return a}},t.hole=i,t.SK=function(n,t){return t},t.not=function(n){return function(t){return!n(t)}},t.getEndomorphismMonoid=function(){return{concat:function(n,t){return u(n,t)},empty:r}}})),R=I((function(n,t){function r(n,t,e){return function(u){for(var i=Array(e.length+1),o=0;o<e.length;o++)i[o]=e[o];return i[e.length]=u,0===t?n.apply(null,i):r(n,t-1,i)}}Object.defineProperty(t,"__esModule",{value:!0}),t.sequenceS=t.sequenceT=t.getApplySemigroup=t.apS=t.apSecond=t.apFirst=t.ap=void 0,t.ap=function(n,t){return function(r){return function(e){return n.ap(n.map(e,(function(n){return function(r){return t.ap(n,r)}})),r)}}},t.apFirst=function(n){return function(t){return function(r){return n.ap(n.map(r,(function(n){return function(){return n}})),t)}}},t.apSecond=function(n){return function(t){return function(r){return n.ap(n.map(r,(function(){return function(n){return n}})),t)}}},t.apS=function(n){return function(t,r){return function(e){return n.ap(n.map(e,(function(n){return function(r){var e;return Object.assign({},n,((e={})[t]=r,e))}})),r)}}},t.getApplySemigroup=function(n){return function(t){return{concat:function(r,e){return n.ap(n.map(r,(function(n){return function(r){return t.concat(n,r)}})),e)}}}};var e={1:function(n){return[n]},2:function(n){return function(t){return[n,t]}},3:function(n){return function(t){return function(r){return[n,t,r]}}},4:function(n){return function(t){return function(r){return function(e){return[n,t,r,e]}}}},5:function(n){return function(t){return function(r){return function(e){return function(u){return[n,t,r,e,u]}}}}}};function u(n){return e.hasOwnProperty(n)||(e[n]=r(g.tuple,n-1,[])),e[n]}t.sequenceT=function(n){return function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];for(var e=t.length,i=u(e),o=n.map(t[0],i),c=1;c<e;c++)o=n.ap(o,t[c]);return o}},t.sequenceS=function(n){return function(t){for(var e=Object.keys(t),u=e.length,i=function(n){var t=n.length;switch(t){case 1:return function(t){var r;return(r={})[n[0]]=t,r};case 2:return function(t){return function(r){var e;return(e={})[n[0]]=t,e[n[1]]=r,e}};case 3:return function(t){return function(r){return function(e){var u;return(u={})[n[0]]=t,u[n[1]]=r,u[n[2]]=e,u}}};case 4:return function(t){return function(r){return function(e){return function(u){var i;return(i={})[n[0]]=t,i[n[1]]=r,i[n[2]]=e,i[n[3]]=u,i}}}};case 5:return function(t){return function(r){return function(e){return function(u){return function(i){var o;return(o={})[n[0]]=t,o[n[1]]=r,o[n[2]]=e,o[n[3]]=u,o[n[4]]=i,o}}}}};default:return r((function(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];for(var u={},i=0;i<t;i++)u[n[i]]=r[i];return u}),t-1,[])}}(e),o=n.map(t[e[0]],i),c=1;c<u;c++)o=n.ap(o,t[e[c]]);return o}}})),O=I((function(n,t){function r(n,t){return function(r){return function(e){return n.map(e,(function(n){return t.map(n,r)}))}}}Object.defineProperty(t,"__esModule",{value:!0}),t.getFunctorComposition=t.bindTo=t.flap=t.map=void 0,t.map=r,t.flap=function(n){return function(t){return function(r){return n.map(r,(function(n){return n(t)}))}}},t.bindTo=function(n){return function(t){return function(r){return n.map(r,(function(n){var r;return(r={})[t]=n,r}))}}},t.getFunctorComposition=function(n,t){var e=r(n,t);return{map:function(n,t){return g.pipe(n,e(t))}}}})),j=I((function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.getApplicativeComposition=t.getApplicativeMonoid=void 0,t.getApplicativeMonoid=function(n){var t=R.getApplySemigroup(n);return function(r){return{concat:t(r).concat,empty:n.of(r.empty)}}},t.getApplicativeComposition=function(n,t){var r=O.getFunctorComposition(n,t).map,e=R.ap(n,t);return{map:r,of:function(r){return n.of(t.of(r))},ap:function(n,t){return g.pipe(n,e(t))}}}})),_=I((function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.bind=t.chainFirst=void 0,t.chainFirst=function(n){return function(t){return function(r){return n.chain(r,(function(r){return n.map(t(r),(function(){return r}))}))}}},t.bind=function(n){return function(t,r){return function(e){return n.chain(e,(function(e){return n.map(r(e),(function(n){var r;return Object.assign({},e,((r={})[t]=n,r))}))}))}}}})),U=I((function(n,t){var r=w&&w.__spreadArray||function(n,t){for(var r=0,e=t.length,u=n.length;r<e;r++,u++)n[u]=t[r];return n};Object.defineProperty(t,"__esModule",{value:!0}),t.fromReadonlyNonEmptyArray=t.has=t.emptyRecord=t.emptyReadonlyArray=t.tail=t.head=t.isNonEmpty=t.singleton=t.right=t.left=t.isRight=t.isLeft=t.some=t.none=t.isSome=t.isNone=void 0,t.isNone=function(n){return"None"===n._tag},t.isSome=function(n){return"Some"===n._tag},t.none={_tag:"None"},t.some=function(n){return{_tag:"Some",value:n}},t.isLeft=function(n){return"Left"===n._tag},t.isRight=function(n){return"Right"===n._tag},t.left=function(n){return{_tag:"Left",left:n}},t.right=function(n){return{_tag:"Right",right:n}},t.singleton=function(n){return[n]},t.isNonEmpty=function(n){return n.length>0},t.head=function(n){return n[0]},t.tail=function(n){return n.slice(1)},t.emptyReadonlyArray=[],t.emptyRecord={},t.has=Object.prototype.hasOwnProperty,t.fromReadonlyNonEmptyArray=function(n){return r([n[0]],n.slice(1))}})),M=I((function(n,t){var r=w&&w.__createBinding||(Object.create?function(n,t,r,e){void 0===e&&(e=r),Object.defineProperty(n,e,{enumerable:!0,get:function(){return t[r]}})}:function(n,t,r,e){void 0===e&&(e=r),n[e]=t[r]}),e=w&&w.__setModuleDefault||(Object.create?function(n,t){Object.defineProperty(n,"default",{enumerable:!0,value:t})}:function(n,t){n.default=t}),u=w&&w.__importStar||function(n){if(n&&n.__esModule)return n;var t={};if(null!=n)for(var u in n)"default"!==u&&Object.prototype.hasOwnProperty.call(n,u)&&r(t,n,u);return e(t,n),t};Object.defineProperty(t,"__esModule",{value:!0}),t.filterOrElse=t.chainEitherK=t.fromEitherK=t.chainOptionK=t.fromOptionK=t.fromPredicate=t.fromOption=void 0;var i=u(U);function o(n){return function(t){return function(r){return n.fromEither(i.isNone(r)?i.left(t()):i.right(r.value))}}}function c(n){var t=o(n);return function(n){var r=t(n);return function(n){return g.flow(n,r)}}}function f(n){return function(t){return g.flow(t,n.fromEither)}}t.fromOption=o,t.fromPredicate=function(n){return function(t,r){return function(e){return n.fromEither(t(e)?i.right(e):i.left(r(e)))}}},t.fromOptionK=c,t.chainOptionK=function(n,t){var r=c(n);return function(n){var e=r(n);return function(n){return function(r){return t.chain(r,e(n))}}}},t.fromEitherK=f,t.chainEitherK=function(n,t){var r=f(n);return function(n){return function(e){return t.chain(e,r(n))}}},t.filterOrElse=function(n,t){return function(r,e){return function(u){return t.chain(u,(function(t){return n.fromEither(r(t)?i.right(t):i.left(e(t)))}))}}}})),x=I((function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.and=t.or=t.not=t.Contravariant=t.getMonoidAll=t.getSemigroupAll=t.getMonoidAny=t.getSemigroupAny=t.URI=t.contramap=void 0,t.contramap=function(n){return function(t){return g.flow(n,t)}},t.URI="Predicate",t.getSemigroupAny=function(){return{concat:function(n,r){return g.pipe(n,t.or(r))}}},t.getMonoidAny=function(){return{concat:t.getSemigroupAny().concat,empty:g.constFalse}},t.getSemigroupAll=function(){return{concat:function(n,r){return g.pipe(n,t.and(r))}}},t.getMonoidAll=function(){return{concat:t.getSemigroupAll().concat,empty:g.constTrue}},t.Contravariant={URI:t.URI,contramap:function(n,r){return g.pipe(n,t.contramap(r))}},t.not=function(n){return function(t){return!n(t)}},t.or=function(n){return function(t){return function(r){return t(r)||n(r)}}},t.and=function(n){return function(t){return function(r){return t(r)&&n(r)}}}})),E=I((function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.concatAll=t.endo=t.filterSecond=t.filterFirst=t.reverse=void 0,t.reverse=function(n){return{concat:function(t,r){return n.concat(r,t)}}},t.filterFirst=function(n){return function(t){return{concat:function(r,e){return n(r)?t.concat(r,e):e}}}},t.filterSecond=function(n){return function(t){return{concat:function(r,e){return n(e)?t.concat(r,e):r}}}},t.endo=function(n){return function(t){return{concat:function(r,e){return t.concat(n(r),n(e))}}}},t.concatAll=function(n){return function(t){return function(r){return r.reduce((function(t,r){return n.concat(t,r)}),t)}}}})),A=I((function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.eqDate=t.eqNumber=t.eqString=t.eqBoolean=t.eq=t.strictEqual=t.getStructEq=t.getTupleEq=t.Contravariant=t.getMonoid=t.getSemigroup=t.eqStrict=t.URI=t.contramap=t.tuple=t.struct=t.fromEquals=void 0,t.fromEquals=function(n){return{equals:function(t,r){return t===r||n(t,r)}}},t.struct=function(n){return t.fromEquals((function(t,r){for(var e in n)if(!n[e].equals(t[e],r[e]))return!1;return!0}))},t.tuple=function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return t.fromEquals((function(t,r){return n.every((function(n,e){return n.equals(t[e],r[e])}))}))},t.contramap=function(n){return function(r){return t.fromEquals((function(t,e){return r.equals(n(t),n(e))}))}},t.URI="Eq",t.eqStrict={equals:function(n,t){return n===t}};var r={equals:function(){return!0}};t.getSemigroup=function(){return{concat:function(n,r){return t.fromEquals((function(t,e){return n.equals(t,e)&&r.equals(t,e)}))}}},t.getMonoid=function(){return{concat:t.getSemigroup().concat,empty:r}},t.Contravariant={URI:t.URI,contramap:function(n,r){return g.pipe(n,t.contramap(r))}},t.getTupleEq=t.tuple,t.getStructEq=t.struct,t.strictEqual=t.eqStrict.equals,t.eq=t.Contravariant,t.eqBoolean=t.eqStrict,t.eqString=t.eqStrict,t.eqNumber=t.eqStrict,t.eqDate={equals:function(n,t){return n.valueOf()===t.valueOf()}}})),N=I((function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.ordDate=t.ordNumber=t.ordString=t.ordBoolean=t.ord=t.getDualOrd=t.getTupleOrd=t.between=t.clamp=t.max=t.min=t.geq=t.leq=t.gt=t.lt=t.equals=t.trivial=t.Contravariant=t.getMonoid=t.getSemigroup=t.URI=t.contramap=t.reverse=t.tuple=t.fromCompare=t.equalsDefault=void 0,t.equalsDefault=function(n){return function(t,r){return t===r||0===n(t,r)}},t.fromCompare=function(n){return{equals:t.equalsDefault(n),compare:function(t,r){return t===r?0:n(t,r)}}},t.tuple=function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return t.fromCompare((function(t,r){for(var e=0;e<n.length-1;e++){var u=n[e].compare(t[e],r[e]);if(0!==u)return u}return n[e].compare(t[e],r[e])}))},t.reverse=function(n){return t.fromCompare((function(t,r){return n.compare(r,t)}))},t.contramap=function(n){return function(r){return t.fromCompare((function(t,e){return r.compare(n(t),n(e))}))}},t.URI="Ord",t.getSemigroup=function(){return{concat:function(n,r){return t.fromCompare((function(t,e){var u=n.compare(t,e);return 0!==u?u:r.compare(t,e)}))}}},t.getMonoid=function(){return{concat:t.getSemigroup().concat,empty:t.fromCompare((function(){return 0}))}},t.Contravariant={URI:t.URI,contramap:function(n,r){return g.pipe(n,t.contramap(r))}},t.trivial={equals:g.constTrue,compare:g.constant(0)},t.equals=function(n){return function(t){return function(r){return r===t||0===n.compare(r,t)}}},t.lt=function(n){return function(t,r){return-1===n.compare(t,r)}},t.gt=function(n){return function(t,r){return 1===n.compare(t,r)}},t.leq=function(n){return function(t,r){return 1!==n.compare(t,r)}},t.geq=function(n){return function(t,r){return-1!==n.compare(t,r)}},t.min=function(n){return function(t,r){return t===r||n.compare(t,r)<1?t:r}},t.max=function(n){return function(t,r){return t===r||n.compare(t,r)>-1?t:r}},t.clamp=function(n){var r=t.min(n),e=t.max(n);return function(n,t){return function(u){return e(r(u,t),n)}}},t.between=function(n){var r=t.lt(n),e=t.gt(n);return function(n,t){return function(u){return!r(u,n)&&!e(u,t)}}},t.getTupleOrd=t.tuple,t.getDualOrd=t.reverse,t.ord=t.Contravariant;var r={equals:A.eqStrict.equals,compare:function(n,t){return n<t?-1:n>t?1:0}};t.ordBoolean=r,t.ordString=r,t.ordNumber=r,t.ordDate=g.pipe(t.ordNumber,t.contramap((function(n){return n.valueOf()})))})),W=I((function(n,t){var r=w&&w.__createBinding||(Object.create?function(n,t,r,e){void 0===e&&(e=r),Object.defineProperty(n,e,{enumerable:!0,get:function(){return t[r]}})}:function(n,t,r,e){void 0===e&&(e=r),n[e]=t[r]}),e=w&&w.__setModuleDefault||(Object.create?function(n,t){Object.defineProperty(n,"default",{enumerable:!0,value:t})}:function(n,t){n.default=t}),u=w&&w.__importStar||function(n){if(n&&n.__esModule)return n;var t={};if(null!=n)for(var u in n)"default"!==u&&Object.prototype.hasOwnProperty.call(n,u)&&r(t,n,u);return e(t,n),t};Object.defineProperty(t,"__esModule",{value:!0}),t.semigroupProduct=t.semigroupSum=t.semigroupString=t.getFunctionSemigroup=t.semigroupAny=t.semigroupAll=t.fold=t.getIntercalateSemigroup=t.getMeetSemigroup=t.getJoinSemigroup=t.getDualSemigroup=t.getStructSemigroup=t.getTupleSemigroup=t.getFirstSemigroup=t.getLastSemigroup=t.getObjectSemigroup=t.semigroupVoid=t.concatAll=t.last=t.first=t.intercalate=t.tuple=t.struct=t.reverse=t.constant=t.max=t.min=void 0;var i=u(U),o=u(E),c=u(N);t.min=function(n){return{concat:c.min(n)}},t.max=function(n){return{concat:c.max(n)}},t.constant=function(n){return{concat:function(){return n}}},t.reverse=o.reverse,t.struct=function(n){return{concat:function(t,r){var e={};for(var u in n)i.has.call(n,u)&&(e[u]=n[u].concat(t[u],r[u]));return e}}},t.tuple=function(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];return{concat:function(t,r){return n.map((function(n,e){return n.concat(t[e],r[e])}))}}},t.intercalate=function(n){return function(t){return{concat:function(r,e){return t.concat(r,t.concat(n,e))}}}},t.first=function(){return{concat:g.identity}},t.last=function(){return{concat:function(n,t){return t}}},t.concatAll=o.concatAll,t.semigroupVoid=t.constant(void 0),t.getObjectSemigroup=function(){return{concat:function(n,t){return Object.assign({},n,t)}}},t.getLastSemigroup=t.last,t.getFirstSemigroup=t.first,t.getTupleSemigroup=t.tuple,t.getStructSemigroup=t.struct,t.getDualSemigroup=t.reverse,t.getJoinSemigroup=t.max,t.getMeetSemigroup=t.min,t.getIntercalateSemigroup=t.intercalate,t.fold=function(n){var r=t.concatAll(n);return function(n,t){return void 0===t?r(n):r(n)(t)}},t.semigroupAll={concat:function(n,t){return n&&t}},t.semigroupAny={concat:function(n,t){return n||t}},t.getFunctionSemigroup=g.getSemigroup,t.semigroupString={concat:function(n,t){return n+t}},t.semigroupSum={concat:function(n,t){return n+t}},t.semigroupProduct={concat:function(n,t){return n*t}}})),T=I((function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.right=t.left=t.flap=t.Functor=t.Bifunctor=t.URI=t.bimap=t.mapLeft=t.map=t.separated=void 0,t.separated=function(n,t){return{left:n,right:t}},t.map=function(n){return function(r){return t.separated(t.left(r),n(t.right(r)))}},t.mapLeft=function(n){return function(r){return t.separated(n(t.left(r)),t.right(r))}},t.bimap=function(n,r){return function(e){return t.separated(n(t.left(e)),r(t.right(e)))}},t.URI="Separated",t.Bifunctor={URI:t.URI,mapLeft:function(n,r){return g.pipe(n,t.mapLeft(r))},bimap:function(n,r,e){return g.pipe(n,t.bimap(r,e))}},t.Functor={URI:t.URI,map:function(n,r){return g.pipe(n,t.map(r))}},t.flap=O.flap(t.Functor),t.left=function(n){return n.left},t.right=function(n){return n.right}})),S=I((function(n,t){var r=w&&w.__createBinding||(Object.create?function(n,t,r,e){void 0===e&&(e=r),Object.defineProperty(n,e,{enumerable:!0,get:function(){return t[r]}})}:function(n,t,r,e){void 0===e&&(e=r),n[e]=t[r]}),e=w&&w.__setModuleDefault||(Object.create?function(n,t){Object.defineProperty(n,"default",{enumerable:!0,value:t})}:function(n,t){n.default=t}),u=w&&w.__importStar||function(n){if(n&&n.__esModule)return n;var t={};if(null!=n)for(var u in n)"default"!==u&&Object.prototype.hasOwnProperty.call(n,u)&&r(t,n,u);return e(t,n),t};Object.defineProperty(t,"__esModule",{value:!0}),t.filterE=t.witherDefault=t.wiltDefault=void 0;var i=u(U);t.wiltDefault=function(n,t){return function(r){var e=n.traverse(r);return function(n,u){return r.map(e(n,u),t.separate)}}},t.witherDefault=function(n,t){return function(r){var e=n.traverse(r);return function(n,u){return r.map(e(n,u),t.compact)}}},t.filterE=function(n){return function(t){var r=n.wither(t);return function(n){return function(e){return r(e,(function(r){return t.map(n(r),(function(n){return n?i.some(r):i.none}))}))}}}}})),k=I((function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.guard=void 0,t.guard=function(n,t){return function(r){return r?t.of(void 0):n.zero()}}})),P=I((function(n,t){var r=w&&w.__createBinding||(Object.create?function(n,t,r,e){void 0===e&&(e=r),Object.defineProperty(n,e,{enumerable:!0,get:function(){return t[r]}})}:function(n,t,r,e){void 0===e&&(e=r),n[e]=t[r]}),e=w&&w.__setModuleDefault||(Object.create?function(n,t){Object.defineProperty(n,"default",{enumerable:!0,value:t})}:function(n,t){n.default=t}),u=w&&w.__importStar||function(n){if(n&&n.__esModule)return n;var t={};if(null!=n)for(var u in n)"default"!==u&&Object.prototype.hasOwnProperty.call(n,u)&&r(t,n,u);return e(t,n),t};Object.defineProperty(t,"__esModule",{value:!0}),t.fromEither=t.MonadThrow=t.throwError=t.Witherable=t.wilt=t.wither=t.Traversable=t.sequence=t.traverse=t.Filterable=t.partitionMap=t.partition=t.filterMap=t.filter=t.Compactable=t.separate=t.compact=t.Extend=t.extend=t.Alternative=t.guard=t.Zero=t.zero=t.Alt=t.alt=t.altW=t.Foldable=t.reduceRight=t.foldMap=t.reduce=t.Monad=t.Chain=t.chain=t.Applicative=t.Apply=t.ap=t.Pointed=t.of=t.Functor=t.map=t.getMonoid=t.getOrd=t.getEq=t.getShow=t.URI=t.getRight=t.getLeft=t.fromPredicate=t.some=t.none=void 0,t.getLastMonoid=t.getFirstMonoid=t.getApplyMonoid=t.getApplySemigroup=t.option=t.mapNullable=t.getRefinement=t.sequenceArray=t.traverseArray=t.traverseArrayWithIndex=t.traverseReadonlyArrayWithIndex=t.traverseReadonlyNonEmptyArrayWithIndex=t.ApT=t.apS=t.bind=t.bindTo=t.Do=t.exists=t.elem=t.toUndefined=t.toNullable=t.chainNullableK=t.fromNullableK=t.tryCatchK=t.tryCatch=t.fromNullable=t.chainEitherK=t.fromEitherK=t.duplicate=t.chainFirst=t.flatten=t.apSecond=t.apFirst=t.flap=t.getOrElse=t.getOrElseW=t.fold=t.match=t.foldW=t.matchW=t.isNone=t.isSome=t.FromEither=void 0;var i=u(U);t.none=i.none,t.some=i.some,t.fromPredicate=function(n){return function(r){return n(r)?t.some(r):t.none}},t.getLeft=function(n){return"Right"===n._tag?t.none:t.some(n.left)},t.getRight=function(n){return"Left"===n._tag?t.none:t.some(n.right)};var o=function(n,r){return g.pipe(n,t.map(r))},c=function(n,r){return g.pipe(n,t.ap(r))},f=function(n,r){return g.pipe(n,t.chain(r))},a=function(n,r,e){return g.pipe(n,t.reduce(r,e))},s=function(n){var r=t.foldMap(n);return function(n,t){return g.pipe(n,r(t))}},v=function(n,r,e){return g.pipe(n,t.reduceRight(r,e))},d=function(n){var r=t.traverse(n);return function(n,t){return g.pipe(n,r(t))}},l=function(n,r){return g.pipe(n,t.alt(r))},p=function(n,r){return g.pipe(n,t.filter(r))},h=function(n,r){return g.pipe(n,t.filterMap(r))},m=function(n,r){return g.pipe(n,t.extend(r))},b=function(n,r){return g.pipe(n,t.partition(r))},y=function(n,r){return g.pipe(n,t.partitionMap(r))};t.URI="Option",t.getShow=function(n){return{show:function(r){return t.isNone(r)?"none":"some("+n.show(r.value)+")"}}},t.getEq=function(n){return{equals:function(r,e){return r===e||(t.isNone(r)?t.isNone(e):!t.isNone(e)&&n.equals(r.value,e.value))}}},t.getOrd=function(n){return{equals:t.getEq(n).equals,compare:function(r,e){return r===e?0:t.isSome(r)?t.isSome(e)?n.compare(r.value,e.value):1:-1}}},t.getMonoid=function(n){return{concat:function(r,e){return t.isNone(r)?e:t.isNone(e)?r:t.some(n.concat(r.value,e.value))},empty:t.none}},t.map=function(n){return function(r){return t.isNone(r)?t.none:t.some(n(r.value))}},t.Functor={URI:t.URI,map:o},t.of=t.some,t.Pointed={URI:t.URI,of:t.of},t.ap=function(n){return function(r){return t.isNone(r)||t.isNone(n)?t.none:t.some(r.value(n.value))}},t.Apply={URI:t.URI,map:o,ap:c},t.Applicative={URI:t.URI,map:o,ap:c,of:t.of},t.chain=function(n){return function(r){return t.isNone(r)?t.none:n(r.value)}},t.Chain={URI:t.URI,map:o,ap:c,chain:f},t.Monad={URI:t.URI,map:o,ap:c,of:t.of,chain:f},t.reduce=function(n,r){return function(e){return t.isNone(e)?n:r(n,e.value)}},t.foldMap=function(n){return function(r){return function(e){return t.isNone(e)?n.empty:r(e.value)}}},t.reduceRight=function(n,r){return function(e){return t.isNone(e)?n:r(e.value,n)}},t.Foldable={URI:t.URI,reduce:a,foldMap:s,reduceRight:v},t.altW=function(n){return function(r){return t.isNone(r)?n():r}},t.alt=t.altW,t.Alt={URI:t.URI,map:o,alt:l},t.zero=function(){return t.none},t.Zero={URI:t.URI,zero:t.zero},t.guard=k.guard(t.Zero,t.Pointed),t.Alternative={URI:t.URI,map:o,ap:c,of:t.of,alt:l,zero:t.zero},t.extend=function(n){return function(r){return t.isNone(r)?t.none:t.some(n(r))}},t.Extend={URI:t.URI,map:o,extend:m},t.compact=t.chain(g.identity);var I=T.separated(t.none,t.none);t.separate=function(n){return t.isNone(n)?I:T.separated(t.getLeft(n.value),t.getRight(n.value))},t.Compactable={URI:t.URI,compact:t.compact,separate:t.separate},t.filter=function(n){return function(r){return t.isNone(r)?t.none:n(r.value)?r:t.none}},t.filterMap=function(n){return function(r){return t.isNone(r)?t.none:n(r.value)}},t.partition=function(n){return function(t){return T.separated(p(t,x.not(n)),p(t,n))}},t.partitionMap=function(n){return g.flow(t.map(n),t.separate)},t.Filterable={URI:t.URI,map:o,compact:t.compact,separate:t.separate,filter:p,filterMap:h,partition:b,partitionMap:y},t.traverse=function(n){return function(r){return function(e){return t.isNone(e)?n.of(t.none):n.map(r(e.value),t.some)}}},t.sequence=function(n){return function(r){return t.isNone(r)?n.of(t.none):n.map(r.value,t.some)}},t.Traversable={URI:t.URI,map:o,reduce:a,foldMap:s,reduceRight:v,traverse:d,sequence:t.sequence};var E=S.witherDefault(t.Traversable,t.Compactable),A=S.wiltDefault(t.Traversable,t.Compactable);t.wither=function(n){var t=E(n);return function(n){return function(r){return t(r,n)}}},t.wilt=function(n){var t=A(n);return function(n){return function(r){return t(r,n)}}},t.Witherable={URI:t.URI,map:o,reduce:a,foldMap:s,reduceRight:v,traverse:d,sequence:t.sequence,compact:t.compact,separate:t.separate,filter:p,filterMap:h,partition:b,partitionMap:y,wither:E,wilt:A},t.throwError=function(){return t.none},t.MonadThrow={URI:t.URI,map:o,ap:c,of:t.of,chain:f,throwError:t.throwError},t.fromEither=t.getRight,t.FromEither={URI:t.URI,fromEither:t.fromEither},t.isSome=i.isSome,t.isNone=function(n){return"None"===n._tag},t.matchW=function(n,r){return function(e){return t.isNone(e)?n():r(e.value)}},t.foldW=t.matchW,t.match=t.matchW,t.fold=t.match,t.getOrElseW=function(n){return function(r){return t.isNone(r)?n():r.value}},t.getOrElse=t.getOrElseW,t.flap=O.flap(t.Functor),t.apFirst=R.apFirst(t.Apply),t.apSecond=R.apSecond(t.Apply),t.flatten=t.compact,t.chainFirst=_.chainFirst(t.Chain),t.duplicate=t.extend(g.identity),t.fromEitherK=M.fromEitherK(t.FromEither),t.chainEitherK=M.chainEitherK(t.FromEither,t.Chain),t.fromNullable=function(n){return null==n?t.none:t.some(n)},t.tryCatch=function(n){try{return t.some(n())}catch(n){return t.none}},t.tryCatchK=function(n){return function(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];return t.tryCatch((function(){return n.apply(void 0,r)}))}},t.fromNullableK=function(n){return g.flow(n,t.fromNullable)},t.chainNullableK=function(n){return function(r){return t.isNone(r)?t.none:t.fromNullable(n(r.value))}},t.toNullable=t.match(g.constNull,g.identity),t.toUndefined=t.match(g.constUndefined,g.identity),t.elem=function n(r){return function(e,u){if(void 0===u){var i=n(r);return function(n){return i(e,n)}}return!t.isNone(u)&&r.equals(e,u.value)}},t.exists=function(n){return function(r){return!t.isNone(r)&&n(r.value)}},t.Do=t.of(i.emptyRecord),t.bindTo=O.bindTo(t.Functor),t.bind=_.bind(t.Chain),t.apS=R.apS(t.Apply),t.ApT=t.of(i.emptyReadonlyArray),t.traverseReadonlyNonEmptyArrayWithIndex=function(n){return function(r){var e=n(0,i.head(r));if(t.isNone(e))return t.none;for(var u=[e.value],o=1;o<r.length;o++){var c=n(o,r[o]);if(t.isNone(c))return t.none;u.push(c.value)}return t.some(u)}},t.traverseReadonlyArrayWithIndex=function(n){var r=t.traverseReadonlyNonEmptyArrayWithIndex(n);return function(n){return i.isNonEmpty(n)?r(n):t.ApT}},t.traverseArrayWithIndex=t.traverseReadonlyArrayWithIndex,t.traverseArray=function(n){return t.traverseReadonlyArrayWithIndex((function(t,r){return n(r)}))},t.sequenceArray=t.traverseArray(g.identity),t.getRefinement=function(n){return function(r){return t.isSome(n(r))}},t.mapNullable=t.chainNullableK,t.option={URI:t.URI,map:o,of:t.of,ap:c,chain:f,reduce:a,foldMap:s,reduceRight:v,traverse:d,sequence:t.sequence,zero:t.zero,alt:l,extend:m,compact:t.compact,separate:t.separate,filter:p,filterMap:h,partition:b,partitionMap:y,wither:E,wilt:A,throwError:t.throwError},t.getApplySemigroup=R.getApplySemigroup(t.Apply),t.getApplyMonoid=j.getApplicativeMonoid(t.Applicative),t.getFirstMonoid=function(){return t.getMonoid(W.first())},t.getLastMonoid=function(){return t.getMonoid(W.last())}}));const C=n=>!("isConnected"in n)||n.isConnected,q=(()=>{let n;return(...t)=>{n&&clearTimeout(n),n=setTimeout((()=>{n=0,(n=>{for(let t of n.keys())n.set(t,n.get(t).filter(C))})(...t)}),2e3)}})(),D=(r,e)=>{const u=((n,t=((n,t)=>n!==t))=>{let r=new Map(Object.entries(null!=n?n:{}));const e={dispose:[],get:[],set:[],reset:[]},u=()=>{r=new Map(Object.entries(null!=n?n:{})),e.reset.forEach((n=>n()))},i=n=>(e.get.forEach((t=>t(n))),r.get(n)),o=(n,u)=>{const i=r.get(n);t(u,i,n)&&(r.set(n,u),e.set.forEach((t=>t(n,u,i))))},c="undefined"==typeof Proxy?{}:new Proxy(n,{get:(n,t)=>i(t),ownKeys:()=>Array.from(r.keys()),getOwnPropertyDescriptor:()=>({enumerable:!0,configurable:!0}),has:(n,t)=>r.has(t),set:(n,t,r)=>(o(t,r),!0)}),f=(n,t)=>(e[n].push(t),()=>{((n,t)=>{const r=n.indexOf(t);r>=0&&(n[r]=n[n.length-1],n.length--)})(e[n],t)});return{state:c,get:i,set:o,on:f,onChange:(t,r)=>{const e=f("set",((n,e)=>{n===t&&r(e)})),u=f("reset",(()=>r(n[t])));return()=>{e(),u()}},use:(...n)=>{const t=n.reduce(((n,t)=>(t.set&&n.push(f("set",t.set)),t.get&&n.push(f("get",t.get)),t.reset&&n.push(f("reset",t.reset)),t.dispose&&n.push(f("dispose",t.dispose)),n)),[]);return()=>t.forEach((n=>n()))},dispose:()=>{e.dispose.forEach((n=>n())),u()},reset:u,forceUpdate:n=>{const t=r.get(n);e.set.forEach((r=>r(n,t,t)))}}})(r,e);return u.use((()=>{if("function"!=typeof n)return{};const r=new Map;return{dispose:()=>r.clear(),get:t=>{const e=n();e&&((n,t,r)=>{const e=n.get(t);e?e.includes(r)||e.push(r):n.set(t,[r])})(r,t,e)},set:n=>{const e=r.get(n);e&&r.set(n,e.filter(t)),q(r)},reset:()=>{r.forEach((n=>n.forEach(t))),q(r)}}})()),u};function z(n,t,r){return function(e){for(var u=Array(r.length+1),i=0;i<r.length;i++)u[i]=r[i];return u[r.length]=e,0===t?n.apply(null,u):z(n,t-1,u)}}var L={1:function(n){return[n]},2:function(n){return function(t){return[n,t]}},3:function(n){return function(t){return function(r){return[n,t,r]}}},4:function(n){return function(t){return function(r){return function(e){return[n,t,r,e]}}}},5:function(n){return function(t){return function(r){return function(e){return function(u){return[n,t,r,e,u]}}}}}};function F(n){return L.hasOwnProperty(n)||(L[n]=z(u,n-1,[])),L[n]}function H(n){return function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];for(var e=t.length,u=F(e),i=n.map(t[0],u),o=1;o<e;o++)i=n.ap(i,t[o]);return i}}function B(n){return function(t){return function(r){return n.fromEither("None"===r._tag?c(t()):f(r.value))}}}var G=c,V=f,J=function(n,t){return i(n,$(t))},$=function(n){return function(t){return Q(t)?t:V(n(t.right))}},K={URI:"Either",map:J},X={URI:"Either",map:J,ap:function(n,t){return i(n,function(n){return function(t){return Q(t)?t:Q(n)?n:V(t.right(n.right))}}(t))}},Z=function(n){return function(t){return Q(t)?G(n(t.left)):t}},Y=B({URI:"Either",fromEither:r}),Q=function(n){return"Left"===n._tag},nn=function(n,t){return function(r){return Q(r)?n(r.left):t(r.right)}},tn=o,rn=function(n){return{_tag:"Some",value:n}},en=function(n){return{concat:function(t,r){return un(t)?r:un(r)?t:rn(n.concat(t.value,r.value))},empty:tn}},un=function(n){return"None"===n._tag},on=function(n){return null==n?tn:rn(n)};function cn(n){return function(t){return n.map(t,V)}}function fn(n){return function(n,t){return function(r){return function(e){return n.map(e,(function(n){return t.map(n,r)}))}}}(n,K)}function an(n){return function(n,t){return function(r){return function(e){return n.ap(n.map(e,(function(n){return function(r){return t.ap(n,r)}})),r)}}}(n,X)}function sn(n){return function(t){return function(r){return n.chain(r,(function(r){return Q(r)?n.of(r):t(r.right)}))}}}function vn(n){return function(t){return function(r){return n.map(r,Z(t))}}}function dn(n,t){return function(r){var u=e(r,n.fromTask);return function(n){return t.chain(n,u)}}}var ln=function(n){return function(){return Promise.resolve().then(n)}},pn=function(n,t){return i(n,mn(t))},hn=function(n,t){return i(n,bn(t))},mn=function(n){return function(t){return function(){return Promise.resolve().then(t).then(n)}}},bn=function(n){return function(t){return function(){return Promise.all([Promise.resolve().then(t),Promise.resolve().then(n)]).then((function(n){return(0,n[0])(n[1])}))}}},yn=function(n){return function(){return Promise.resolve(n)}},wn={URI:"Task",map:pn},In={URI:"Task",map:pn,ap:hn},gn={URI:"Task",map:pn,of:yn,ap:hn,chain:function(n,t){return i(n,function(n){return function(t){return function(){return Promise.resolve().then(t).then((function(t){return n(t)()}))}}}(t))}},Rn=cn(wn),On=e(ln,Rn),jn=Rn,_n=yn,Un=fn(wn),Mn=vn(wn),xn=an(In),En=sn(gn),An=En,Nn="TaskEither",Wn={URI:Nn,map:function(n,t){return i(n,Un(t))},ap:function(n,t){return i(n,xn(t))},chain:function(n,t){return i(n,En(t))}},Tn=B({URI:Nn,fromEither:_n}),Sn=dn({URI:Nn,fromIO:On,fromTask:jn},Wn),kn=I((function(n,t){var r=w&&w.__createBinding||(Object.create?function(n,t,r,e){void 0===e&&(e=r),Object.defineProperty(n,e,{enumerable:!0,get:function(){return t[r]}})}:function(n,t,r,e){void 0===e&&(e=r),n[e]=t[r]}),e=w&&w.__setModuleDefault||(Object.create?function(n,t){Object.defineProperty(n,"default",{enumerable:!0,value:t})}:function(n,t){n.default=t}),u=w&&w.__importStar||function(n){if(n&&n.__esModule)return n;var t={};if(null!=n)for(var u in n)"default"!==u&&Object.prototype.hasOwnProperty.call(n,u)&&r(t,n,u);return e(t,n),t};Object.defineProperty(t,"__esModule",{value:!0}),t.getCompactableComposition=t.separate=t.compact=void 0;var i=u(T);function o(n,t){return function(r){return n.map(r,t.compact)}}function c(n,t,r){var e=o(n,t),u=O.map(n,r);return function(n){return i.separated(e(g.pipe(n,u(P.getLeft))),e(g.pipe(n,u(P.getRight))))}}t.compact=o,t.separate=c,t.getCompactableComposition=function(n,t){return{map:O.getFunctorComposition(n,t).map,compact:o(n,t),separate:c(n,t,t)}}})),Pn=I((function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.tailRec=void 0,t.tailRec=function(n,t){for(var r=t(n);"Left"===r._tag;)r=t(r.left);return r.right}})),Cn=I((function(n,t){var r=w&&w.__createBinding||(Object.create?function(n,t,r,e){void 0===e&&(e=r),Object.defineProperty(n,e,{enumerable:!0,get:function(){return t[r]}})}:function(n,t,r,e){void 0===e&&(e=r),n[e]=t[r]}),e=w&&w.__setModuleDefault||(Object.create?function(n,t){Object.defineProperty(n,"default",{enumerable:!0,value:t})}:function(n,t){n.default=t}),u=w&&w.__importStar||function(n){if(n&&n.__esModule)return n;var t={};if(null!=n)for(var u in n)"default"!==u&&Object.prototype.hasOwnProperty.call(n,u)&&r(t,n,u);return e(t,n),t};Object.defineProperty(t,"__esModule",{value:!0}),t.fold=t.match=t.foldW=t.matchW=t.isRight=t.isLeft=t.fromOption=t.fromPredicate=t.FromEither=t.MonadThrow=t.throwError=t.ChainRec=t.Extend=t.extend=t.Alt=t.alt=t.altW=t.Bifunctor=t.mapLeft=t.bimap=t.Traversable=t.sequence=t.traverse=t.Foldable=t.reduceRight=t.foldMap=t.reduce=t.Monad=t.Chain=t.chain=t.chainW=t.Applicative=t.Apply=t.ap=t.apW=t.Pointed=t.of=t.Functor=t.map=t.getAltValidation=t.getApplicativeValidation=t.getWitherable=t.getFilterable=t.getCompactable=t.getSemigroup=t.getEq=t.getShow=t.URI=t.right=t.left=void 0,t.getValidation=t.getValidationMonoid=t.getValidationSemigroup=t.getApplyMonoid=t.getApplySemigroup=t.either=t.stringifyJSON=t.parseJSON=t.sequenceArray=t.traverseArray=t.traverseArrayWithIndex=t.traverseReadonlyArrayWithIndex=t.traverseReadonlyNonEmptyArrayWithIndex=t.ApT=t.apSW=t.apS=t.bindW=t.bind=t.bindTo=t.Do=t.exists=t.elem=t.toError=t.toUnion=t.chainNullableK=t.fromNullableK=t.tryCatchK=t.tryCatch=t.fromNullable=t.orElse=t.orElseW=t.swap=t.filterOrElseW=t.filterOrElse=t.chainOptionK=t.fromOptionK=t.duplicate=t.flatten=t.flattenW=t.chainFirstW=t.chainFirst=t.apSecond=t.apFirst=t.flap=t.getOrElse=t.getOrElseW=void 0;var i=u(U);t.left=i.left,t.right=i.right;var o=function(n,r){return g.pipe(n,t.map(r))},c=function(n,r){return g.pipe(n,t.ap(r))},f=function(n,r){return g.pipe(n,t.chain(r))},a=function(n,r,e){return g.pipe(n,t.reduce(r,e))},s=function(n){return function(r,e){var u=t.foldMap(n);return g.pipe(r,u(e))}},v=function(n,r,e){return g.pipe(n,t.reduceRight(r,e))},d=function(n){var r=t.traverse(n);return function(n,t){return g.pipe(n,r(t))}},l=function(n,r,e){return g.pipe(n,t.bimap(r,e))},p=function(n,r){return g.pipe(n,t.mapLeft(r))},h=function(n,r){return g.pipe(n,t.alt(r))},m=function(n,r){return g.pipe(n,t.extend(r))},b=function(n,r){return Pn.tailRec(r(n),(function(n){return t.isLeft(n)?t.right(t.left(n.left)):t.isLeft(n.right)?t.left(r(n.right.left)):t.right(t.right(n.right.right))}))};t.URI="Either",t.getShow=function(n,r){return{show:function(e){return t.isLeft(e)?"left("+n.show(e.left)+")":"right("+r.show(e.right)+")"}}},t.getEq=function(n,r){return{equals:function(e,u){return e===u||(t.isLeft(e)?t.isLeft(u)&&n.equals(e.left,u.left):t.isRight(u)&&r.equals(e.right,u.right))}}},t.getSemigroup=function(n){return{concat:function(r,e){return t.isLeft(e)?r:t.isLeft(r)?e:t.right(n.concat(r.right,e.right))}}},t.getCompactable=function(n){var r=t.left(n.empty);return{URI:t.URI,_E:void 0,compact:function(n){return t.isLeft(n)?n:"None"===n.right._tag?r:t.right(n.right.value)},separate:function(n){return t.isLeft(n)?T.separated(n,n):t.isLeft(n.right)?T.separated(t.right(n.right.left),r):T.separated(r,t.right(n.right.right))}}},t.getFilterable=function(n){var r=t.left(n.empty),e=t.getCompactable(n);return{URI:t.URI,_E:void 0,map:o,compact:e.compact,separate:e.separate,filter:function(n,e){return t.isLeft(n)||e(n.right)?n:r},filterMap:function(n,e){if(t.isLeft(n))return n;var u=e(n.right);return"None"===u._tag?r:t.right(u.value)},partition:function(n,e){return t.isLeft(n)?T.separated(n,n):e(n.right)?T.separated(r,t.right(n.right)):T.separated(t.right(n.right),r)},partitionMap:function(n,e){if(t.isLeft(n))return T.separated(n,n);var u=e(n.right);return t.isLeft(u)?T.separated(t.right(u.left),r):T.separated(r,t.right(u.right))}}},t.getWitherable=function(n){var r=t.getFilterable(n),e=t.getCompactable(n);return{URI:t.URI,_E:void 0,map:o,compact:r.compact,separate:r.separate,filter:r.filter,filterMap:r.filterMap,partition:r.partition,partitionMap:r.partitionMap,traverse:d,sequence:t.sequence,reduce:a,foldMap:s,reduceRight:v,wither:S.witherDefault(t.Traversable,e),wilt:S.wiltDefault(t.Traversable,e)}},t.getApplicativeValidation=function(n){return{URI:t.URI,_E:void 0,map:o,ap:function(r,e){return t.isLeft(r)?t.isLeft(e)?t.left(n.concat(r.left,e.left)):r:t.isLeft(e)?e:t.right(r.right(e.right))},of:t.of}},t.getAltValidation=function(n){return{URI:t.URI,_E:void 0,map:o,alt:function(r,e){if(t.isRight(r))return r;var u=e();return t.isLeft(u)?t.left(n.concat(r.left,u.left)):u}}},t.map=function(n){return function(r){return t.isLeft(r)?r:t.right(n(r.right))}},t.Functor={URI:t.URI,map:o},t.of=t.right,t.Pointed={URI:t.URI,of:t.of},t.apW=function(n){return function(r){return t.isLeft(r)?r:t.isLeft(n)?n:t.right(r.right(n.right))}},t.ap=t.apW,t.Apply={URI:t.URI,map:o,ap:c},t.Applicative={URI:t.URI,map:o,ap:c,of:t.of},t.chainW=function(n){return function(r){return t.isLeft(r)?r:n(r.right)}},t.chain=t.chainW,t.Chain={URI:t.URI,map:o,ap:c,chain:f},t.Monad={URI:t.URI,map:o,ap:c,of:t.of,chain:f},t.reduce=function(n,r){return function(e){return t.isLeft(e)?n:r(n,e.right)}},t.foldMap=function(n){return function(r){return function(e){return t.isLeft(e)?n.empty:r(e.right)}}},t.reduceRight=function(n,r){return function(e){return t.isLeft(e)?n:r(e.right,n)}},t.Foldable={URI:t.URI,reduce:a,foldMap:s,reduceRight:v},t.traverse=function(n){return function(r){return function(e){return t.isLeft(e)?n.of(t.left(e.left)):n.map(r(e.right),t.right)}}},t.sequence=function(n){return function(r){return t.isLeft(r)?n.of(t.left(r.left)):n.map(r.right,t.right)}},t.Traversable={URI:t.URI,map:o,reduce:a,foldMap:s,reduceRight:v,traverse:d,sequence:t.sequence},t.bimap=function(n,r){return function(e){return t.isLeft(e)?t.left(n(e.left)):t.right(r(e.right))}},t.mapLeft=function(n){return function(r){return t.isLeft(r)?t.left(n(r.left)):r}},t.Bifunctor={URI:t.URI,bimap:l,mapLeft:p},t.altW=function(n){return function(r){return t.isLeft(r)?n():r}},t.alt=t.altW,t.Alt={URI:t.URI,map:o,alt:h},t.extend=function(n){return function(r){return t.isLeft(r)?r:t.right(n(r))}},t.Extend={URI:t.URI,map:o,extend:m},t.ChainRec={URI:t.URI,map:o,ap:c,chain:f,chainRec:b},t.throwError=t.left,t.MonadThrow={URI:t.URI,map:o,ap:c,of:t.of,chain:f,throwError:t.throwError},t.FromEither={URI:t.URI,fromEither:g.identity},t.fromPredicate=M.fromPredicate(t.FromEither),t.fromOption=M.fromOption(t.FromEither),t.isLeft=i.isLeft,t.isRight=i.isRight,t.matchW=function(n,r){return function(e){return t.isLeft(e)?n(e.left):r(e.right)}},t.foldW=t.matchW,t.match=t.matchW,t.fold=t.match,t.getOrElseW=function(n){return function(r){return t.isLeft(r)?n(r.left):r.right}},t.getOrElse=t.getOrElseW,t.flap=O.flap(t.Functor),t.apFirst=R.apFirst(t.Apply),t.apSecond=R.apSecond(t.Apply),t.chainFirst=_.chainFirst(t.Chain),t.chainFirstW=t.chainFirst,t.flattenW=t.chainW(g.identity),t.flatten=t.flattenW,t.duplicate=t.extend(g.identity),t.fromOptionK=M.fromOptionK(t.FromEither),t.chainOptionK=M.chainOptionK(t.FromEither,t.Chain),t.filterOrElse=M.filterOrElse(t.FromEither,t.Chain),t.filterOrElseW=t.filterOrElse,t.swap=function(n){return t.isLeft(n)?t.right(n.left):t.left(n.right)},t.orElseW=function(n){return function(r){return t.isLeft(r)?n(r.left):r}},t.orElse=t.orElseW,t.fromNullable=function(n){return function(r){return null==r?t.left(n):t.right(r)}},t.tryCatch=function(n,r){try{return t.right(n())}catch(n){return t.left(r(n))}},t.tryCatchK=function(n,r){return function(){for(var e=[],u=0;u<arguments.length;u++)e[u]=arguments[u];return t.tryCatch((function(){return n.apply(void 0,e)}),r)}},t.fromNullableK=function(n){var r=t.fromNullable(n);return function(n){return g.flow(n,r)}},t.chainNullableK=function(n){var r=t.fromNullableK(n);return function(n){return t.chain(r(n))}},t.toUnion=t.foldW(g.identity,g.identity),t.toError=function(n){return n instanceof Error?n:new Error(String(n))},t.elem=function n(r){return function(e,u){if(void 0===u){var i=n(r);return function(n){return i(e,n)}}return!t.isLeft(u)&&r.equals(e,u.right)}},t.exists=function(n){return function(r){return!t.isLeft(r)&&n(r.right)}},t.Do=t.of(i.emptyRecord),t.bindTo=O.bindTo(t.Functor),t.bind=_.bind(t.Chain),t.bindW=t.bind,t.apS=R.apS(t.Apply),t.apSW=t.apS,t.ApT=t.of(i.emptyReadonlyArray),t.traverseReadonlyNonEmptyArrayWithIndex=function(n){return function(r){var e=n(0,i.head(r));if(t.isLeft(e))return e;for(var u=[e.right],o=1;o<r.length;o++){var c=n(o,r[o]);if(t.isLeft(c))return c;u.push(c.right)}return t.right(u)}},t.traverseReadonlyArrayWithIndex=function(n){var r=t.traverseReadonlyNonEmptyArrayWithIndex(n);return function(n){return i.isNonEmpty(n)?r(n):t.ApT}},t.traverseArrayWithIndex=t.traverseReadonlyArrayWithIndex,t.traverseArray=function(n){return t.traverseReadonlyArrayWithIndex((function(t,r){return n(r)}))},t.sequenceArray=t.traverseArray(g.identity),t.parseJSON=function(n,r){return t.tryCatch((function(){return JSON.parse(n)}),r)},t.stringifyJSON=function(n,r){return t.tryCatch((function(){var t=JSON.stringify(n);if("string"!=typeof t)throw new Error("Converting unsupported structure to JSON");return t}),r)},t.either={URI:t.URI,map:o,of:t.of,ap:c,chain:f,reduce:a,foldMap:s,reduceRight:v,traverse:d,sequence:t.sequence,bimap:l,mapLeft:p,alt:h,extend:m,chainRec:b,throwError:t.throwError},t.getApplySemigroup=R.getApplySemigroup(t.Apply),t.getApplyMonoid=j.getApplicativeMonoid(t.Applicative),t.getValidationSemigroup=function(n,r){return R.getApplySemigroup(t.getApplicativeValidation(n))(r)},t.getValidationMonoid=function(n,r){return j.getApplicativeMonoid(t.getApplicativeValidation(n))(r)},t.getValidation=function(n){var r=t.getApplicativeValidation(n).ap,e=t.getAltValidation(n).alt;return{URI:t.URI,_E:void 0,map:o,of:t.of,chain:f,bimap:l,mapLeft:p,reduce:a,foldMap:s,reduceRight:v,extend:m,traverse:d,sequence:t.sequence,chainRec:b,throwError:t.throwError,ap:r,alt:e}}})),qn=I((function(n,t){var r=w&&w.__createBinding||(Object.create?function(n,t,r,e){void 0===e&&(e=r),Object.defineProperty(n,e,{enumerable:!0,get:function(){return t[r]}})}:function(n,t,r,e){void 0===e&&(e=r),n[e]=t[r]}),e=w&&w.__setModuleDefault||(Object.create?function(n,t){Object.defineProperty(n,"default",{enumerable:!0,value:t})}:function(n,t){n.default=t}),u=w&&w.__importStar||function(n){if(n&&n.__esModule)return n;var t={};if(null!=n)for(var u in n)"default"!==u&&Object.prototype.hasOwnProperty.call(n,u)&&r(t,n,u);return e(t,n),t};Object.defineProperty(t,"__esModule",{value:!0}),t.getEitherM=t.toUnion=t.swap=t.orLeft=t.orElseFirst=t.orElse=t.getOrElse=t.matchE=t.match=t.altValidation=t.mapLeft=t.bimap=t.alt=t.chain=t.ap=t.map=t.leftF=t.rightF=t.left=t.right=void 0;var i=u(Cn);function o(n){return g.flow(i.right,n.of)}function c(n){return g.flow(i.left,n.of)}function f(n){return function(t){return n.map(t,i.right)}}function a(n){return function(t){return n.map(t,i.left)}}function s(n){return O.map(n,i.Functor)}function v(n){return R.ap(n,i.Apply)}function d(n){return function(t){return function(r){return n.chain(r,(function(r){return i.isLeft(r)?n.of(r):t(r.right)}))}}}function l(n){return function(t){return function(r){return n.chain(r,(function(r){return i.isLeft(r)?t():n.of(r)}))}}}function p(n){return function(t,r){return function(e){return n.map(e,i.bimap(t,r))}}}function h(n){return function(t){return function(r){return n.map(r,i.mapLeft(t))}}}function m(n){return function(t,r){return function(e){return n.chain(e,i.match(t,r))}}}function b(n){return function(t){return function(r){return n.chain(r,i.match(t,n.of))}}}function y(n){return function(t){return function(r){return n.chain(r,(function(r){return i.isLeft(r)?t(r.left):n.of(r)}))}}}function I(n){return function(t){return n.map(t,i.swap)}}t.right=o,t.left=c,t.rightF=f,t.leftF=a,t.map=s,t.ap=v,t.chain=d,t.alt=l,t.bimap=p,t.mapLeft=h,t.altValidation=function(n,t){return function(r){return function(e){return n.chain(e,i.match((function(e){return n.map(r(),i.mapLeft((function(n){return t.concat(e,n)})))}),o(n)))}}},t.match=function(n){return function(t,r){return function(e){return n.map(e,i.match(t,r))}}},t.matchE=m,t.getOrElse=b,t.orElse=y,t.orElseFirst=function(n){var t=y(n);return function(r){return t((function(t){return n.map(r(t),(function(n){return i.isLeft(n)?n:i.left(t)}))}))}},t.orLeft=function(n){return function(t){return function(r){return n.chain(r,i.match((function(r){return n.map(t(r),i.left)}),(function(t){return n.of(i.right(t))})))}}},t.swap=I,t.toUnion=function(n){return function(t){return n.map(t,i.toUnion)}},t.getEitherM=function(n){var t=v(n),r=s(n),e=d(n),u=l(n),i=p(n),w=h(n),R=m(n),O=b(n),j=y(n);return{map:function(n,t){return g.pipe(n,r(t))},ap:function(n,r){return g.pipe(n,t(r))},of:o(n),chain:function(n,t){return g.pipe(n,e(t))},alt:function(n,t){return g.pipe(n,u(t))},bimap:function(n,t,r){return g.pipe(n,i(t,r))},mapLeft:function(n,t){return g.pipe(n,w(t))},fold:function(n,t,r){return g.pipe(n,R(t,r))},getOrElse:function(n,t){return g.pipe(n,O(t))},orElse:function(n,t){return g.pipe(n,j(t))},swap:I(n),rightM:f(n),leftM:a(n),left:c(n)}}})),Dn=I((function(n,t){function r(n,t){return function(r){return function(e){return n.map(e,(function(n){return t.filter(n,r)}))}}}function e(n,t){return function(r){return function(e){return n.map(e,(function(n){return t.filterMap(n,r)}))}}}function u(n,t){var e=r(n,t);return function(n){var t=e(x.not(n)),r=e(n);return function(n){return T.separated(t(n),r(n))}}}function i(n,t){var r=e(n,t);return function(n){return function(t){return T.separated(g.pipe(t,r((function(t){return P.getLeft(n(t))}))),g.pipe(t,r((function(t){return P.getRight(n(t))}))))}}}Object.defineProperty(t,"__esModule",{value:!0}),t.getFilterableComposition=t.partitionMap=t.partition=t.filterMap=t.filter=void 0,t.filter=r,t.filterMap=e,t.partition=u,t.partitionMap=i,t.getFilterableComposition=function(n,t){var o=O.getFunctorComposition(n,t).map,c=kn.compact(n,t),f=kn.separate(n,t,t),a=r(n,t),s=e(n,t),v=u(n,t),d=i(n,t);return{map:o,compact:c,separate:f,filter:function(n,t){return g.pipe(n,a(t))},filterMap:function(n,t){return g.pipe(n,s(t))},partition:function(n,t){return g.pipe(n,v(t))},partitionMap:function(n,t){return g.pipe(n,d(t))}}}})),zn=I((function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.chainFirstIOK=t.chainIOK=t.fromIOK=void 0,t.fromIOK=function(n){return function(t){return g.flow(t,n.fromIO)}},t.chainIOK=function(n,t){return function(r){var e=g.flow(r,n.fromIO);return function(n){return t.chain(n,e)}}},t.chainFirstIOK=function(n,t){var r=_.chainFirst(t);return function(t){return r(g.flow(t,n.fromIO))}}})),Ln=I((function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.chainFirstTaskK=t.chainTaskK=t.fromTaskK=void 0,t.fromTaskK=function(n){return function(t){return g.flow(t,n.fromTask)}},t.chainTaskK=function(n,t){return function(r){var e=g.flow(r,n.fromTask);return function(n){return t.chain(n,e)}}},t.chainFirstTaskK=function(n,t){var r=_.chainFirst(t);return function(t){return r(g.flow(t,n.fromTask))}}})),Fn=I((function(n,t){var r=w&&w.__createBinding||(Object.create?function(n,t,r,e){void 0===e&&(e=r),Object.defineProperty(n,e,{enumerable:!0,get:function(){return t[r]}})}:function(n,t,r,e){void 0===e&&(e=r),n[e]=t[r]}),e=w&&w.__setModuleDefault||(Object.create?function(n,t){Object.defineProperty(n,"default",{enumerable:!0,value:t})}:function(n,t){n.default=t}),u=w&&w.__importStar||function(n){if(n&&n.__esModule)return n;var t={};if(null!=n)for(var u in n)"default"!==u&&Object.prototype.hasOwnProperty.call(n,u)&&r(t,n,u);return e(t,n),t};Object.defineProperty(t,"__esModule",{value:!0}),t.getMonoid=t.getSemigroup=t.taskSeq=t.task=t.sequenceSeqArray=t.traverseSeqArray=t.traverseSeqArrayWithIndex=t.sequenceArray=t.traverseArray=t.traverseArrayWithIndex=t.traverseReadonlyArrayWithIndexSeq=t.traverseReadonlyNonEmptyArrayWithIndexSeq=t.traverseReadonlyArrayWithIndex=t.traverseReadonlyNonEmptyArrayWithIndex=t.ApT=t.apS=t.bind=t.bindTo=t.Do=t.never=t.FromTask=t.chainFirstIOK=t.chainIOK=t.fromIOK=t.FromIO=t.chainFirst=t.MonadTask=t.fromTask=t.MonadIO=t.Monad=t.Chain=t.ApplicativeSeq=t.ApplySeq=t.ApplicativePar=t.apSecond=t.apFirst=t.ApplyPar=t.Pointed=t.flap=t.Functor=t.getRaceMonoid=t.URI=t.flatten=t.chain=t.of=t.ap=t.map=t.delay=t.fromIO=void 0;var i=u(U);t.fromIO=function(n){return function(){return Promise.resolve().then(n)}},t.delay=function(n){return function(t){return function(){return new Promise((function(r){setTimeout((function(){Promise.resolve().then(t).then(r)}),n)}))}}};var o=function(n,r){return g.pipe(n,t.map(r))},c=function(n,r){return g.pipe(n,t.ap(r))},f=function(n,r){return g.pipe(n,t.chain((function(n){return g.pipe(r,t.map(n))})))},a=function(n,r){return g.pipe(n,t.chain(r))};t.map=function(n){return function(t){return function(){return Promise.resolve().then(t).then(n)}}},t.ap=function(n){return function(t){return function(){return Promise.all([Promise.resolve().then(t),Promise.resolve().then(n)]).then((function(n){return(0,n[0])(n[1])}))}}},t.of=function(n){return function(){return Promise.resolve(n)}},t.chain=function(n){return function(t){return function(){return Promise.resolve().then(t).then((function(t){return n(t)()}))}}},t.flatten=t.chain(g.identity),t.URI="Task",t.getRaceMonoid=function(){return{concat:function(n,t){return function(){return Promise.race([Promise.resolve().then(n),Promise.resolve().then(t)])}},empty:t.never}},t.Functor={URI:t.URI,map:o},t.flap=O.flap(t.Functor),t.Pointed={URI:t.URI,of:t.of},t.ApplyPar={URI:t.URI,map:o,ap:c},t.apFirst=R.apFirst(t.ApplyPar),t.apSecond=R.apSecond(t.ApplyPar),t.ApplicativePar={URI:t.URI,map:o,ap:c,of:t.of},t.ApplySeq={URI:t.URI,map:o,ap:f},t.ApplicativeSeq={URI:t.URI,map:o,ap:f,of:t.of},t.Chain={URI:t.URI,map:o,ap:c,chain:a},t.Monad={URI:t.URI,map:o,of:t.of,ap:c,chain:a},t.MonadIO={URI:t.URI,map:o,of:t.of,ap:c,chain:a,fromIO:t.fromIO},t.fromTask=g.identity,t.MonadTask={URI:t.URI,map:o,of:t.of,ap:c,chain:a,fromIO:t.fromIO,fromTask:t.fromTask},t.chainFirst=_.chainFirst(t.Chain),t.FromIO={URI:t.URI,fromIO:t.fromIO},t.fromIOK=zn.fromIOK(t.FromIO),t.chainIOK=zn.chainIOK(t.FromIO,t.Chain),t.chainFirstIOK=zn.chainFirstIOK(t.FromIO,t.Chain),t.FromTask={URI:t.URI,fromIO:t.fromIO,fromTask:t.fromTask},t.never=function(){return new Promise((function(){}))},t.Do=t.of(i.emptyRecord),t.bindTo=O.bindTo(t.Functor),t.bind=_.bind(t.Chain),t.apS=R.apS(t.ApplyPar),t.ApT=t.of(i.emptyReadonlyArray),t.traverseReadonlyNonEmptyArrayWithIndex=function(n){return function(t){return function(){return Promise.all(t.map((function(t,r){return Promise.resolve().then((function(){return n(r,t)()}))})))}}},t.traverseReadonlyArrayWithIndex=function(n){var r=t.traverseReadonlyNonEmptyArrayWithIndex(n);return function(n){return i.isNonEmpty(n)?r(n):t.ApT}},t.traverseReadonlyNonEmptyArrayWithIndexSeq=function(n){return function(t){return function(){return i.tail(t).reduce((function(t,r,e){return t.then((function(t){return Promise.resolve().then(n(e+1,r)).then((function(n){return t.push(n),t}))}))}),Promise.resolve().then(n(0,i.head(t))).then(i.singleton))}}},t.traverseReadonlyArrayWithIndexSeq=function(n){var r=t.traverseReadonlyNonEmptyArrayWithIndexSeq(n);return function(n){return i.isNonEmpty(n)?r(n):t.ApT}},t.traverseArrayWithIndex=t.traverseReadonlyArrayWithIndex,t.traverseArray=function(n){return t.traverseReadonlyArrayWithIndex((function(t,r){return n(r)}))},t.sequenceArray=t.traverseArray(g.identity),t.traverseSeqArrayWithIndex=t.traverseReadonlyArrayWithIndexSeq,t.traverseSeqArray=function(n){return t.traverseReadonlyArrayWithIndexSeq((function(t,r){return n(r)}))},t.sequenceSeqArray=t.traverseSeqArray(g.identity),t.task={URI:t.URI,map:o,of:t.of,ap:c,chain:a,fromIO:t.fromIO,fromTask:t.fromTask},t.taskSeq={URI:t.URI,map:o,of:t.of,ap:f,chain:a,fromIO:t.fromIO,fromTask:t.fromTask},t.getSemigroup=R.getApplySemigroup(t.ApplySeq),t.getMonoid=j.getApplicativeMonoid(t.ApplicativeSeq)})),Hn=I((function(n,t){var r=w&&w.__createBinding||(Object.create?function(n,t,r,e){void 0===e&&(e=r),Object.defineProperty(n,e,{enumerable:!0,get:function(){return t[r]}})}:function(n,t,r,e){void 0===e&&(e=r),n[e]=t[r]}),e=w&&w.__setModuleDefault||(Object.create?function(n,t){Object.defineProperty(n,"default",{enumerable:!0,value:t})}:function(n,t){n.default=t}),u=w&&w.__importStar||function(n){if(n&&n.__esModule)return n;var t={};if(null!=n)for(var u in n)"default"!==u&&Object.prototype.hasOwnProperty.call(n,u)&&r(t,n,u);return e(t,n),t};Object.defineProperty(t,"__esModule",{value:!0}),t.getCompactable=t.getAltTaskValidation=t.getApplicativeTaskValidation=t.URI=t.throwError=t.of=t.altW=t.alt=t.flatten=t.flattenW=t.chainW=t.chain=t.apW=t.ap=t.mapLeft=t.bimap=t.map=t.chainIOEitherK=t.chainIOEitherKW=t.fromIOEitherK=t.chainTaskOptionK=t.fromTaskOptionK=t.swap=t.orLeft=t.orElseFirstW=t.orElseFirst=t.orElseW=t.orElse=t.toUnion=t.tryCatchK=t.tryCatch=t.getOrElseW=t.getOrElse=t.foldW=t.matchEW=t.fold=t.matchE=t.matchW=t.match=t.fromTaskOption=t.fromIOEither=t.fromEither=t.fromTask=t.fromIO=t.leftIO=t.rightIO=t.leftTask=t.rightTask=t.right=t.left=void 0,t.traverseReadonlyArrayWithIndexSeq=t.traverseReadonlyNonEmptyArrayWithIndexSeq=t.traverseReadonlyArrayWithIndex=t.traverseReadonlyNonEmptyArrayWithIndex=t.ApT=t.apSW=t.apS=t.bindW=t.bind=t.bindTo=t.Do=t.bracket=t.taskify=t.chainFirstTaskK=t.chainTaskK=t.fromTaskK=t.FromTask=t.chainFirstIOK=t.chainIOK=t.fromIOK=t.FromIO=t.fromEitherK=t.filterOrElseW=t.filterOrElse=t.fromPredicate=t.chainEitherKW=t.chainEitherK=t.chainOptionK=t.fromOptionK=t.fromOption=t.FromEither=t.Alt=t.Bifunctor=t.chainFirstW=t.chainFirst=t.MonadThrow=t.MonadTask=t.MonadIO=t.Monad=t.Chain=t.ApplicativeSeq=t.ApplySeq=t.ApplicativePar=t.apSecond=t.apFirst=t.ApplyPar=t.Pointed=t.flap=t.Functor=t.getFilterable=void 0,t.getTaskValidation=t.getSemigroup=t.getApplyMonoid=t.getApplySemigroup=t.taskEitherSeq=t.taskEither=t.sequenceSeqArray=t.traverseSeqArray=t.traverseSeqArrayWithIndex=t.sequenceArray=t.traverseArray=t.traverseArrayWithIndex=void 0;var i=u(Cn),o=u(qn),c=u(U),f=u(Fn);t.left=o.left(f.Pointed),t.right=o.right(f.Pointed),t.rightTask=o.rightF(f.Functor),t.leftTask=o.leftF(f.Functor),t.rightIO=g.flow(f.fromIO,t.rightTask),t.leftIO=g.flow(f.fromIO,t.leftTask),t.fromIO=t.rightIO,t.fromTask=t.rightTask,t.fromEither=f.of,t.fromIOEither=f.fromIO,t.fromTaskOption=function(n){return f.map(i.fromOption(n))},t.match=o.match(f.Functor),t.matchW=t.match,t.matchE=o.matchE(f.Monad),t.fold=t.matchE,t.matchEW=t.matchE,t.foldW=t.matchEW,t.getOrElse=o.getOrElse(f.Monad),t.getOrElseW=t.getOrElse,t.tryCatch=function(n,t){return function(){return n().then(c.right,(function(n){return c.left(t(n))}))}},t.tryCatchK=function(n,r){return function(){for(var e=[],u=0;u<arguments.length;u++)e[u]=arguments[u];return t.tryCatch((function(){return n.apply(void 0,e)}),r)}},t.toUnion=o.toUnion(f.Functor),t.orElse=o.orElse(f.Monad),t.orElseW=t.orElse,t.orElseFirst=o.orElseFirst(f.Monad),t.orElseFirstW=t.orElseFirst,t.orLeft=o.orLeft(f.Monad),t.swap=o.swap(f.Functor),t.fromTaskOptionK=function(n){var r=t.fromTaskOption(n);return function(n){return g.flow(n,r)}},t.chainTaskOptionK=function(n){return g.flow(t.fromTaskOptionK(n),t.chain)},t.fromIOEitherK=function(n){return g.flow(n,t.fromIOEither)},t.chainIOEitherKW=function(n){return t.chainW(t.fromIOEitherK(n))},t.chainIOEitherK=t.chainIOEitherKW;var a=function(n,r){return g.pipe(n,t.map(r))},s=function(n,r){return g.pipe(n,t.ap(r))},v=function(n,r){return g.pipe(n,t.chain((function(n){return g.pipe(r,t.map(n))})))},d=function(n,r){return g.pipe(n,t.chain(r))},l=function(n,r,e){return g.pipe(n,t.bimap(r,e))},p=function(n,r){return g.pipe(n,t.mapLeft(r))},h=function(n,r){return g.pipe(n,t.alt(r))};function m(n,r){var e=R.ap(n,i.getApplicativeValidation(r));return{URI:t.URI,_E:void 0,map:a,ap:function(n,t){return g.pipe(n,e(t))},of:t.of}}function b(n){var r=o.altValidation(f.Monad,n);return{URI:t.URI,_E:void 0,map:a,alt:function(n,t){return g.pipe(n,r(t))}}}t.map=o.map(f.Functor),t.bimap=o.bimap(f.Functor),t.mapLeft=o.mapLeft(f.Functor),t.ap=o.ap(f.ApplyPar),t.apW=t.ap,t.chain=o.chain(f.Monad),t.chainW=t.chain,t.flattenW=t.chainW(g.identity),t.flatten=t.flattenW,t.alt=o.alt(f.Monad),t.altW=t.alt,t.of=t.right,t.throwError=t.left,t.URI="TaskEither",t.getApplicativeTaskValidation=m,t.getAltTaskValidation=b,t.getCompactable=function(n){var r=i.getCompactable(n);return{URI:t.URI,_E:void 0,compact:kn.compact(f.Functor,r),separate:kn.separate(f.Functor,r,i.Functor)}},t.getFilterable=function(n){var r=i.getFilterable(n),e=t.getCompactable(n),u=Dn.filter(f.Functor,r),o=Dn.filterMap(f.Functor,r),c=Dn.partition(f.Functor,r),s=Dn.partitionMap(f.Functor,r);return{URI:t.URI,_E:void 0,map:a,compact:e.compact,separate:e.separate,filter:function(n,t){return g.pipe(n,u(t))},filterMap:function(n,t){return g.pipe(n,o(t))},partition:function(n,t){return g.pipe(n,c(t))},partitionMap:function(n,t){return g.pipe(n,s(t))}}},t.Functor={URI:t.URI,map:a},t.flap=O.flap(t.Functor),t.Pointed={URI:t.URI,of:t.of},t.ApplyPar={URI:t.URI,map:a,ap:s},t.apFirst=R.apFirst(t.ApplyPar),t.apSecond=R.apSecond(t.ApplyPar),t.ApplicativePar={URI:t.URI,map:a,ap:s,of:t.of},t.ApplySeq={URI:t.URI,map:a,ap:v},t.ApplicativeSeq={URI:t.URI,map:a,ap:v,of:t.of},t.Chain={URI:t.URI,map:a,ap:s,chain:d},t.Monad={URI:t.URI,map:a,ap:s,chain:d,of:t.of},t.MonadIO={URI:t.URI,map:a,ap:s,chain:d,of:t.of,fromIO:t.fromIO},t.MonadTask={URI:t.URI,map:a,ap:s,chain:d,of:t.of,fromIO:t.fromIO,fromTask:t.fromTask},t.MonadThrow={URI:t.URI,map:a,ap:s,chain:d,of:t.of,throwError:t.throwError},t.chainFirst=_.chainFirst(t.Chain),t.chainFirstW=t.chainFirst,t.Bifunctor={URI:t.URI,bimap:l,mapLeft:p},t.Alt={URI:t.URI,map:a,alt:h},t.FromEither={URI:t.URI,fromEither:t.fromEither},t.fromOption=M.fromOption(t.FromEither),t.fromOptionK=M.fromOptionK(t.FromEither),t.chainOptionK=M.chainOptionK(t.FromEither,t.Chain),t.chainEitherK=M.chainEitherK(t.FromEither,t.Chain),t.chainEitherKW=t.chainEitherK,t.fromPredicate=M.fromPredicate(t.FromEither),t.filterOrElse=M.filterOrElse(t.FromEither,t.Chain),t.filterOrElseW=t.filterOrElse,t.fromEitherK=M.fromEitherK(t.FromEither),t.FromIO={URI:t.URI,fromIO:t.fromIO},t.fromIOK=zn.fromIOK(t.FromIO),t.chainIOK=zn.chainIOK(t.FromIO,t.Chain),t.chainFirstIOK=zn.chainFirstIOK(t.FromIO,t.Chain),t.FromTask={URI:t.URI,fromIO:t.fromIO,fromTask:t.fromTask},t.fromTaskK=Ln.fromTaskK(t.FromTask),t.chainTaskK=Ln.chainTaskK(t.FromTask,t.Chain),t.chainFirstTaskK=Ln.chainFirstTaskK(t.FromTask,t.Chain),t.taskify=function(n){return function(){var t=Array.prototype.slice.call(arguments);return function(){return new Promise((function(r){n.apply(null,t.concat((function(n,t){return r(null!=n?c.left(n):c.right(t))})))}))}}},t.bracket=function(n,r,e){return g.pipe(n,t.chain((function(n){return g.pipe(r(n),f.chain((function(r){return g.pipe(e(n,r),t.chain((function(){return f.of(r)})))})))})))},t.Do=t.of(c.emptyRecord),t.bindTo=O.bindTo(t.Functor),t.bind=_.bind(t.Chain),t.bindW=t.bind,t.apS=R.apS(t.ApplyPar),t.apSW=t.apS,t.ApT=t.of(c.emptyReadonlyArray),t.traverseReadonlyNonEmptyArrayWithIndex=function(n){return g.flow(f.traverseReadonlyNonEmptyArrayWithIndex(n),f.map(i.traverseReadonlyNonEmptyArrayWithIndex(g.SK)))},t.traverseReadonlyArrayWithIndex=function(n){var r=t.traverseReadonlyNonEmptyArrayWithIndex(n);return function(n){return c.isNonEmpty(n)?r(n):t.ApT}},t.traverseReadonlyNonEmptyArrayWithIndexSeq=function(n){return function(t){return function(){return c.tail(t).reduce((function(t,r,e){return t.then((function(u){return c.isLeft(u)?t:n(e+1,r)().then((function(n){return c.isLeft(n)?n:(u.right.push(n.right),u)}))}))}),n(0,c.head(t))().then(i.map(c.singleton)))}}},t.traverseReadonlyArrayWithIndexSeq=function(n){var r=t.traverseReadonlyNonEmptyArrayWithIndexSeq(n);return function(n){return c.isNonEmpty(n)?r(n):t.ApT}},t.traverseArrayWithIndex=t.traverseReadonlyArrayWithIndex,t.traverseArray=function(n){return t.traverseReadonlyArrayWithIndex((function(t,r){return n(r)}))},t.sequenceArray=t.traverseArray(g.identity),t.traverseSeqArrayWithIndex=t.traverseReadonlyArrayWithIndexSeq,t.traverseSeqArray=function(n){return t.traverseReadonlyArrayWithIndexSeq((function(t,r){return n(r)}))},t.sequenceSeqArray=t.traverseSeqArray(g.identity),t.taskEither={URI:t.URI,bimap:l,mapLeft:p,map:a,of:t.of,ap:s,chain:d,alt:h,fromIO:t.fromIO,fromTask:t.fromTask,throwError:t.throwError},t.taskEitherSeq={URI:t.URI,bimap:l,mapLeft:p,map:a,of:t.of,ap:v,chain:d,alt:h,fromIO:t.fromIO,fromTask:t.fromTask,throwError:t.throwError},t.getApplySemigroup=R.getApplySemigroup(t.ApplySeq),t.getApplyMonoid=j.getApplicativeMonoid(t.ApplicativeSeq),t.getSemigroup=function(n){return R.getApplySemigroup(f.ApplySeq)(i.getSemigroup(n))},t.getTaskValidation=function(n){var r=m(f.ApplicativePar,n),e=b(n);return{URI:t.URI,_E:void 0,map:a,ap:r.ap,of:t.of,chain:d,bimap:l,mapLeft:p,alt:e.alt,fromIO:t.fromIO,fromTask:t.fromTask,throwError:t.throwError}}}));const{state:Bn,onChange:Gn}=D(Object.assign({fallbackStyles:"",pricePrefix:null,currencySign:null,apiPath:null,token:null,locale:"de-DE"},{trackingEnabled:!0}));Gn("apiPath",(n=>{console.log("apiPathChanged",n)})),Gn("token",(n=>{console.log("tokenChanged",n)}));const Vn=n=>({kind:"server",inner:n}),Jn={kind:"client",inner:"Token not exist or empty"},$n={kind:"client",inner:"Api path empty or missing"},Kn=en({concat:function(n,t){return n+t},empty:""}),Xn=()=>i(en({concat:r}).concat(on(Bn.apiPath),on("https://api.vviinn.com")),Y((()=>$n))),Zn=s({method:{concat:(n,t)=>{return i(Kn.concat(on(n),on(t)),(r=()=>"GET",function(n){return un(n)?r():n.value}));var r}},body:{concat:function(n,t){return t}},headers:{concat:(n,t)=>{const r=new Headers;return void 0!==n&&n.forEach(((n,t)=>r.append(t,n))),void 0!==t&&t.forEach(((n,t)=>r.append(t,n))),r}}}),Yn=n=>({method:n}),Qn=V(Yn("GET")),nt=V(Yn("POST")),tt=n=>n.status>=200&&n.status<300?Hn.right(n):Hn.left(n),rt=Zn,et=(n,t)=>([r,e])=>{const u=new URL(n,r),i=rt.concat(e,t);return g.pipe(((n,t={})=>g.pipe(((n,t={method:"GET"})=>Hn.tryCatch((()=>fetch(n,t)),(n=>n)))(n,t),Hn.chain(tt),Hn.chain((n=>function(n){return Hn.fromTask((()=>n.json()))}(n)))))(u.toString(),i),Hn.mapLeft(Vn))},ut=n=>(n=>0===n.length)(n)?G("entity is empty"):V(n),it=n=>{return i(n,("entity not exist",function(n){return null==n?G("entity not exist"):V(n)}),(t=ut,function(n){return Q(n)?n:t(n.right)}));var t},ot=n=>new Headers({Authorization:`Bearer ${n}`}),ct=n=>i(n,it,Cn.mapLeft((()=>Jn))),ft=n=>i(n,ct,Cn.map(ot)),at=R.sequenceT(Cn.Apply),st={equals:(n,t)=>n.class===t.class&&n.score===t.score&&n.rectangle.left===t.rectangle.left&&n.rectangle.top===t.rectangle.top&&n.rectangle.height===t.rectangle.height&&n.rectangle.width===t.rectangle.width},vt=n=>g.pipe(at(Xn(),nt),_n,An(et("search/session",n)));var dt;!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"}(dt||(dt={}));const lt=n=>{switch(n.type){case"array":return n.value.map(lt);default:return n.value}},pt=n=>t=>i(at(Xn(),V(Yn(n.method))),_n,An(et(n.href,t))),ht=(n,t)=>{const r=l(n),e=m.concat(r,t);return Object.assign(Object.assign({},e),{width:n.width,height:n.height})},mt=(n,t)=>{switch(t.direction){case b.NorthEast:return((n,t)=>{const r=m.concat(l(n),{x:0,y:t.position.y});return Object.assign(Object.assign({},r),{width:n.width+t.position.x,height:n.height-t.position.y})})(n,t);case b.NorthWest:return((n,t)=>{const r=m.concat(l(n),t.position);return Object.assign(Object.assign({},r),{width:n.width-t.position.x,height:n.height-t.position.y})})(n,t);case b.SouthEast:return((n,t)=>Object.assign(Object.assign({},n),{width:n.width+t.position.x,height:n.height+t.position.y}))(n,t);case b.SouthWest:return((n,t)=>{const r=m.concat(l(n),{x:t.position.x,y:0});return Object.assign(Object.assign({},r),{width:n.width-t.position.x,height:n.height+t.position.y})})(n,t)}},bt=n=>({x:0,y:0,width:n.width,height:n.height}),yt=n=>Object.assign({x:n.left,y:n.top},n),wt=n=>t=>({x:t.x*n.width,y:t.y*n.height,width:t.width*n.width,height:t.height*n.height}),It=n=>({x:n.x+.5*n.width,y:n.y+.5*n.height});var gt;!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"}(gt||(gt={}));const Rt=(n,t)=>{const r=new URLSearchParams(Object.entries(t));return[`${n.href}?${r.toString()}`,{method:"GET"}]},Ot=(n,t)=>[n.href,{body:JSON.stringify(t),method:n.method,headers:new Headers({"Content-Type":"application/ion+json"})}],jt=(n,t={})=>r=>g.pipe(at(Xn(),g.pipe(((n,t)=>g.pipe(((n,t)=>{const r=n.map((n=>n.name)),e=Object.keys(t),u=r.filter((n=>!e.includes(n)));return 0===u.length?V(t):G(`Data should contains fields: ${u.join(", ")}`)})(n.value,t),$((t=>n.rel.includes("query-form")?Rt(n,t):Ot(n,t)))))(n,t),Z((n=>({kind:"app",inner:n}))))),_n,An((n=>{const t=n[0],[e,u]=n[1];return et(e,u)([t,r])}))),_t=async n=>new Promise((t=>{const r=new FileReader;r.addEventListener("load",(()=>{t(r.result)})),r.readAsDataURL(n)})),Ut=R.sequenceT(P.Apply);const Mt=["jpg","jpeg","png","webp"],xt={kind:"client",inner:"File format not supported"},Et=n=>{const t=n.type.split("/")[1],r=(e=r=>r===t?P.some(n):P.none,function(n){for(var t=0;t<n.length;t++){var r=e(n[t]);if("Some"===r._tag)return r}return o})(Mt);var e;return g.pipe(r,Cn.fromOption((()=>xt)))},At={kind:"app",inner:"File doesnt exist"},Nt=n=>()=>new Promise((t=>{const r=new FileReader,e=new Image;r.onload=n=>{e.src=n.target.result},e.onload=()=>t(e),r.readAsDataURL(n)}));var Wt=I((function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.copy=void 0,t.copy=(n,t,r=0,e=0,u=n.width-r,i=n.height-e,o=0,c=0)=>{if(r|=0,e|=0,i|=0,o|=0,c|=0,(u|=0)<=0||i<=0)return;const f=new Uint32Array(n.data.buffer),a=new Uint32Array(t.data.buffer);for(let s=0;s<i;s++){const i=e+s;if(i<0||i>=n.height)continue;const v=c+s;if(!(v<0||v>=t.height))for(let e=0;e<u;e++){const u=r+e;if(u<0||u>=n.width)continue;const c=o+e;c<0||c>=t.width||(a[v*t.width+c]=f[i*n.width+u])}}}})),Tt=I((function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.CreateImageFactory=(n=[0,0,0,0],t=4)=>{if(t=Math.floor(t),isNaN(t)||t<1)throw TypeError("channels should be a positive non-zero number");if(!("length"in n)||n.length<t)throw TypeError(`fill should be iterable with at least ${t} members`);const r=(n=new Uint8ClampedArray(n).slice(0,t)).every((n=>0===n));return(e,u,i)=>{if(void 0===e||void 0===u)throw TypeError("Not enough arguments");if(e=Math.floor(e),u=Math.floor(u),isNaN(e)||e<1||isNaN(u)||u<1)throw TypeError("Index or size is negative or greater than the allowed amount");const o=e*u*t;if(void 0===i&&(i=new Uint8ClampedArray(o)),i instanceof Uint8ClampedArray){if(i.length!==o)throw TypeError("Index or size is negative or greater than the allowed amount");if(!r)for(let r=0;r<u;r++)for(let u=0;u<e;u++){const o=(r*e+u)*t;for(let r=0;r<t;r++)i[o+r]=n[r]}return{get width(){return e},get height(){return u},get data(){return i}}}throw TypeError("Expected data to be Uint8ClampedArray or undefined")}},t.createImage=t.CreateImageFactory()})),St=I((function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.filters=void 0;const r=(n,t)=>{if(n<=-t||n>=t)return 0;if(0==n)return 0;const r=n*Math.PI;return Math.sin(r)/r*Math.sin(r/t)/(r/t)},e=n=>Math.round(16383*n);t.filters=(n,t,u,i,o)=>{const c=o?2:3,f=1/u,a=Math.min(1,u),s=c/a,v=Math.floor(2*(s+1)),d=new Int16Array((v+2)*t);let l=0;for(let u=0;u<t;u++){const o=(u+.5)*f+i,v=Math.max(0,Math.floor(o-s)),p=Math.min(n-1,Math.ceil(o+s)),h=p-v+1,m=new Float32Array(h),b=new Int16Array(h);let y=0,w=0;for(let n=v;n<=p;n++){const t=r((n+.5-o)*a,c);y+=t,m[w]=t,w++}let I=0;for(let n=0;n<m.length;n++){const t=m[n]/y;I+=t,b[n]=e(t)}b[t>>1]+=e(1-I);let g=0;for(;g<b.length&&0===b[g];)g++;let R=b.length-1;for(;R>0&&0===b[R];)R--;const O=R-g+1;d[l++]=v+g,d[l++]=O,d.set(b.subarray(g,R+1),l),l+=O}return d}})),kt=I((function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.convolve=void 0,t.convolve=(n,t,r,e,u,i)=>{let o=0,c=0;for(let f=0;f<e;f++){let a=0;for(let r=0;r<u;r++){let r=o+4*i[a++]|0,u=0,f=0,s=0,v=0;for(let t=i[a++];t>0;t--){const t=i[a++];u=u+t*n[r]|0,f=f+t*n[r+1]|0,s=s+t*n[r+2]|0,v=v+t*n[r+3]|0,r=r+4|0}t[c]=u+8192>>14,t[c+1]=f+8192>>14,t[c+2]=s+8192>>14,t[c+3]=v+8192>>14,c=c+4*e|0}c=4*(f+1)|0,o=(f+1)*r*4|0}}})),Pt=I((function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.lanczos2=t.lanczos=void 0;const r=(n,t,r=!1)=>{const e=t.height/n.height,u=St.filters(n.width,t.width,t.width/n.width,0,r),i=St.filters(n.height,t.height,e,0,r),o=new Uint8ClampedArray(t.width*n.height*4);kt.convolve(n.data,o,n.width,n.height,t.width,u),kt.convolve(o,t.data,n.height,t.width,t.height,i)};t.lanczos=(n,t,e=0,u=0,i=n.width-e,o=n.height-u,c=0,f=0,a=t.width-c,s=t.height-f)=>{if(u|=0,o|=0,c|=0,f|=0,a|=0,s|=0,(i|=0)<=0||o<=0||a<=0||s<=0)return;if(0==(e|=0)&&0===u&&i===n.width&&o===n.height&&0===c&&0===f&&a===t.width&&s===t.height)return void r(n,t);const v=Tt.createImage(i,o),d=Tt.createImage(a,s);Wt.copy(n,v,e,u),r(v,d),Wt.copy(d,t,0,0,d.width,d.height,c,f)},t.lanczos2=(n,t,e=0,u=0,i=n.width-e,o=n.height-u,c=0,f=0,a=t.width-c,s=t.height-f)=>{if(u|=0,o|=0,c|=0,f|=0,a|=0,s|=0,(i|=0)<=0||o<=0||a<=0||s<=0)return;if(0==(e|=0)&&0===u&&i===n.width&&o===n.height&&0===c&&0===f&&a===t.width&&s===t.height)return void r(n,t,!0);const v=Tt.createImage(i,o),d=Tt.createImage(a,s);Wt.copy(n,v,e,u),r(v,d,!0),Wt.copy(d,t,0,0,d.width,d.height,c,f)}})),Ct=I((function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.Field=t.MonoidProduct=t.MonoidSum=t.SemigroupProduct=t.SemigroupSum=t.MagmaSub=t.Show=t.Bounded=t.Ord=t.Eq=t.isNumber=void 0,t.isNumber=function(n){return"number"==typeof n},t.Eq={equals:function(n,t){return n===t}},t.Ord={equals:t.Eq.equals,compare:function(n,t){return n<t?-1:n>t?1:0}},t.Bounded={equals:t.Eq.equals,compare:t.Ord.compare,top:1/0,bottom:-1/0},t.Show={show:function(n){return JSON.stringify(n)}},t.MagmaSub={concat:function(n,t){return n-t}},t.SemigroupSum={concat:function(n,t){return n+t}},t.SemigroupProduct={concat:function(n,t){return n*t}},t.MonoidSum={concat:t.SemigroupSum.concat,empty:0},t.MonoidProduct={concat:t.SemigroupProduct.concat,empty:1},t.Field={add:t.SemigroupSum.concat,zero:0,mul:t.SemigroupProduct.concat,one:1,sub:t.MagmaSub.concat,degree:function(){return 1},div:function(n,t){return n/t},mod:function(n,t){return n%t}}})),qt=I((function(n,t){var r=w&&w.__createBinding||(Object.create?function(n,t,r,e){void 0===e&&(e=r),Object.defineProperty(n,e,{enumerable:!0,get:function(){return t[r]}})}:function(n,t,r,e){void 0===e&&(e=r),n[e]=t[r]}),e=w&&w.__setModuleDefault||(Object.create?function(n,t){Object.defineProperty(n,"default",{enumerable:!0,value:t})}:function(n,t){n.default=t}),u=w&&w.__importStar||function(n){if(n&&n.__esModule)return n;var t={};if(null!=n)for(var u in n)"default"!==u&&Object.prototype.hasOwnProperty.call(n,u)&&r(t,n,u);return e(t,n),t},i=w&&w.__spreadArray||function(n,t){for(var r=0,e=t.length,u=n.length;r<e;r++,u++)n[u]=t[r];return n};Object.defineProperty(t,"__esModule",{value:!0}),t.reduceRight=t.foldMap=t.reduce=t.mapWithIndex=t.map=t.flatten=t.duplicate=t.extend=t.chain=t.ap=t.alt=t.altW=t.of=t.chunksOf=t.splitAt=t.chop=t.chainWithIndex=t.intersperse=t.prependAll=t.unzip=t.zip=t.zipWith=t.modifyAt=t.updateAt=t.sort=t.groupBy=t.group=t.reverse=t.concat=t.concatW=t.fromArray=t.unappend=t.unprepend=t.range=t.replicate=t.makeBy=t.fromReadonlyArray=t.rotate=t.union=t.sortBy=t.uniq=t.unsafeUpdateAt=t.unsafeInsertAt=t.append=t.appendW=t.prepend=t.prependW=t.isOutOfBound=t.isNonEmpty=t.empty=void 0,t.uncons=t.filterWithIndex=t.filter=t.groupSort=t.updateLast=t.modifyLast=t.updateHead=t.modifyHead=t.matchRight=t.matchLeft=t.concatAll=t.max=t.min=t.init=t.last=t.tail=t.head=t.apS=t.bind=t.bindTo=t.Do=t.Comonad=t.Alt=t.TraversableWithIndex=t.Traversable=t.FoldableWithIndex=t.Foldable=t.Monad=t.chainFirst=t.Chain=t.Applicative=t.apSecond=t.apFirst=t.Apply=t.FunctorWithIndex=t.Pointed=t.flap=t.Functor=t.getUnionSemigroup=t.getEq=t.getSemigroup=t.getShow=t.URI=t.extract=t.traverseWithIndex=t.sequence=t.traverse=t.reduceRightWithIndex=t.foldMapWithIndex=t.reduceWithIndex=void 0,t.readonlyNonEmptyArray=t.fold=t.prependToAll=t.insertAt=t.snoc=t.cons=t.unsnoc=void 0;var o=u(U),c=u(W);function f(n){return function(t){return t.concat(n)}}function a(n,t){return t?n.concat(t):function(t){return t.concat(n)}}function s(n){return function(r){var e=r.length;if(0===e)return t.empty;for(var u=[],i=r[0],o=[i],c=1;c<e;c++){var f=r[c];n.equals(f,i)?o.push(f):(u.push(o),o=[i=f])}return u.push(o),u}}t.empty=o.emptyReadonlyArray,t.isNonEmpty=o.isNonEmpty,t.isOutOfBound=function(n,t){return n<0||n>=t.length},t.prependW=function(n){return function(t){return i([n],t)}},t.prepend=t.prependW,t.appendW=function(n){return function(t){return i(i([],t),[n])}},t.append=t.appendW,t.unsafeInsertAt=function(n,r,e){if(t.isNonEmpty(e)){var u=o.fromReadonlyNonEmptyArray(e);return u.splice(n,0,r),u}return[r]},t.unsafeUpdateAt=function(n,t,r){if(r[n]===t)return r;var e=o.fromReadonlyNonEmptyArray(r);return e[n]=t,e},t.uniq=function(n){return function(r){if(1===r.length)return r;for(var e=[t.head(r)],u=function(t){e.every((function(r){return!n.equals(r,t)}))&&e.push(t)},i=0,o=t.tail(r);i<o.length;i++)u(o[i]);return e}},t.sortBy=function(n){if(t.isNonEmpty(n)){var r=N.getMonoid();return t.sort(n.reduce(r.concat,r.empty))}return g.identity},t.union=function(n){var r=t.uniq(n);return function(n){return function(t){return r(g.pipe(t,a(n)))}}},t.rotate=function(n){return function(r){var e=r.length,u=Math.round(n)%e;if(t.isOutOfBound(Math.abs(u),r)||0===u)return r;if(u<0){var i=t.splitAt(-u)(r);return g.pipe(i[1],a(i[0]))}return t.rotate(u-e)(r)}},t.fromReadonlyArray=function(n){return t.isNonEmpty(n)?o.some(n):o.none},t.makeBy=function(n){return function(t){for(var r=Math.max(0,Math.floor(t)),e=[n(0)],u=1;u<r;u++)e.push(n(u));return e}},t.replicate=function(n){return t.makeBy((function(){return n}))},t.range=function(n,r){return n<=r?t.makeBy((function(t){return n+t}))(r-n+1):[n]},t.unprepend=function(n){return[t.head(n),t.tail(n)]},t.unappend=function(n){return[t.init(n),t.last(n)]},t.fromArray=function(n){return t.fromReadonlyArray(n.slice())},t.concatW=f,t.concat=a,t.reverse=function(n){return 1===n.length?n:i([t.last(n)],n.slice(0,-1).reverse())},t.group=s,t.groupBy=function(n){return function(t){for(var r={},e=0,u=t;e<u.length;e++){var i=u[e],o=n(i);r.hasOwnProperty(o)?r[o].push(i):r[o]=[i]}return r}},t.sort=function(n){return function(t){return 1===t.length?t:t.slice().sort(n.compare)}},t.updateAt=function(n,r){return t.modifyAt(n,(function(){return r}))},t.modifyAt=function(n,r){return function(e){return t.isOutOfBound(n,e)?o.none:o.some(t.unsafeUpdateAt(n,r(e[n]),e))}},t.zipWith=function(n,t,r){for(var e=[r(n[0],t[0])],u=Math.min(n.length,t.length),i=1;i<u;i++)e[i]=r(n[i],t[i]);return e},t.zip=function n(r,e){return void 0===e?function(t){return n(t,r)}:t.zipWith(r,e,(function(n,t){return[n,t]}))},t.unzip=function(n){for(var t=[n[0][0]],r=[n[0][1]],e=1;e<n.length;e++)t[e]=n[e][0],r[e]=n[e][1];return[t,r]},t.prependAll=function(n){return function(t){for(var r=[n,t[0]],e=1;e<t.length;e++)r.push(n,t[e]);return r}},t.intersperse=function(n){return function(r){var e=t.tail(r);return t.isNonEmpty(e)?g.pipe(e,t.prependAll(n),t.prepend(t.head(r))):r}},t.chainWithIndex=function(n){return function(r){for(var e=o.fromReadonlyNonEmptyArray(n(0,t.head(r))),u=1;u<r.length;u++)e.push.apply(e,n(u,r[u]));return e}},t.chop=function(n){return function(r){for(var e=n(r),u=[e[0]],i=e[1];t.isNonEmpty(i);){var o=n(i),c=o[1];u.push(o[0]),i=c}return u}},t.splitAt=function(n){return function(r){var e=Math.max(1,n);return e>=r.length?[r,t.empty]:[g.pipe(r.slice(1,e),t.prepend(t.head(r))),r.slice(e)]}},t.chunksOf=function(n){return t.chop(t.splitAt(n))};var v=function(n,r){return g.pipe(n,t.map(r))},d=function(n,r){return g.pipe(n,t.mapWithIndex(r))},l=function(n,r){return g.pipe(n,t.ap(r))},p=function(n,r){return g.pipe(n,t.chain(r))},h=function(n,r){return g.pipe(n,t.extend(r))},m=function(n,r,e){return g.pipe(n,t.reduce(r,e))},b=function(n){var r=t.foldMap(n);return function(n,t){return g.pipe(n,r(t))}},y=function(n,r,e){return g.pipe(n,t.reduceRight(r,e))},I=function(n){var r=t.traverse(n);return function(n,t){return g.pipe(n,r(t))}},j=function(n,r){return g.pipe(n,t.alt(r))},M=function(n,r,e){return g.pipe(n,t.reduceWithIndex(r,e))},x=function(n){var r=t.foldMapWithIndex(n);return function(n,t){return g.pipe(n,r(t))}},E=function(n,r,e){return g.pipe(n,t.reduceRightWithIndex(r,e))},T=function(n){var r=t.traverseWithIndex(n);return function(n,t){return g.pipe(n,r(t))}};t.of=o.singleton,t.altW=function(n){return function(t){return g.pipe(t,f(n()))}},t.alt=t.altW,t.ap=function(n){return t.chain((function(r){return g.pipe(n,t.map(r))}))},t.chain=function(n){return t.chainWithIndex((function(t,r){return n(r)}))},t.extend=function(n){return function(r){for(var e=t.tail(r),u=[n(r)];t.isNonEmpty(e);)u.push(n(e)),e=t.tail(e);return u}},t.duplicate=t.extend(g.identity),t.flatten=t.chain(g.identity),t.map=function(n){return t.mapWithIndex((function(t,r){return n(r)}))},t.mapWithIndex=function(n){return function(r){for(var e=[n(0,t.head(r))],u=1;u<r.length;u++)e.push(n(u,r[u]));return e}},t.reduce=function(n,r){return t.reduceWithIndex(n,(function(n,t,e){return r(t,e)}))},t.foldMap=function(n){return function(t){return function(r){return r.slice(1).reduce((function(r,e){return n.concat(r,t(e))}),t(r[0]))}}},t.reduceRight=function(n,r){return t.reduceRightWithIndex(n,(function(n,t,e){return r(t,e)}))},t.reduceWithIndex=function(n,t){return function(r){return r.reduce((function(n,r,e){return t(e,n,r)}),n)}},t.foldMapWithIndex=function(n){return function(t){return function(r){return r.slice(1).reduce((function(r,e,u){return n.concat(r,t(u+1,e))}),t(0,r[0]))}}},t.reduceRightWithIndex=function(n,t){return function(r){return r.reduceRight((function(n,r,e){return t(e,r,n)}),n)}},t.traverse=function(n){var r=t.traverseWithIndex(n);return function(n){return r((function(t,r){return n(r)}))}},t.sequence=function(n){return t.traverseWithIndex(n)(g.SK)},t.traverseWithIndex=function(n){return function(r){return function(e){for(var u=n.map(r(0,t.head(e)),t.of),i=1;i<e.length;i++)u=n.ap(n.map(u,(function(n){return function(r){return g.pipe(n,t.append(r))}})),r(i,e[i]));return u}}},t.extract=o.head,t.URI="ReadonlyNonEmptyArray",t.getShow=function(n){return{show:function(t){return"["+t.map(n.show).join(", ")+"]"}}},t.getSemigroup=function(){return{concat:a}},t.getEq=function(n){return A.fromEquals((function(t,r){return t.length===r.length&&t.every((function(t,e){return n.equals(t,r[e])}))}))},t.getUnionSemigroup=function(n){var r=t.union(n);return{concat:function(n,t){return r(t)(n)}}},t.Functor={URI:t.URI,map:v},t.flap=O.flap(t.Functor),t.Pointed={URI:t.URI,of:t.of},t.FunctorWithIndex={URI:t.URI,map:v,mapWithIndex:d},t.Apply={URI:t.URI,map:v,ap:l},t.apFirst=R.apFirst(t.Apply),t.apSecond=R.apSecond(t.Apply),t.Applicative={URI:t.URI,map:v,ap:l,of:t.of},t.Chain={URI:t.URI,map:v,ap:l,chain:p},t.chainFirst=_.chainFirst(t.Chain),t.Monad={URI:t.URI,map:v,ap:l,of:t.of,chain:p},t.Foldable={URI:t.URI,reduce:m,foldMap:b,reduceRight:y},t.FoldableWithIndex={URI:t.URI,reduce:m,foldMap:b,reduceRight:y,reduceWithIndex:M,foldMapWithIndex:x,reduceRightWithIndex:E},t.Traversable={URI:t.URI,map:v,reduce:m,foldMap:b,reduceRight:y,traverse:I,sequence:t.sequence},t.TraversableWithIndex={URI:t.URI,map:v,mapWithIndex:d,reduce:m,foldMap:b,reduceRight:y,traverse:I,sequence:t.sequence,reduceWithIndex:M,foldMapWithIndex:x,reduceRightWithIndex:E,traverseWithIndex:T},t.Alt={URI:t.URI,map:v,alt:j},t.Comonad={URI:t.URI,map:v,extend:h,extract:t.extract},t.Do=t.of(o.emptyRecord),t.bindTo=O.bindTo(t.Functor),t.bind=_.bind(t.Chain),t.apS=R.apS(t.Apply),t.head=t.extract,t.tail=o.tail,t.last=function(n){return n[n.length-1]},t.init=function(n){return n.slice(0,-1)},t.min=function(n){var t=c.min(n);return function(n){return n.reduce(t.concat)}},t.max=function(n){var t=c.max(n);return function(n){return n.reduce(t.concat)}},t.concatAll=function(n){return function(t){return t.reduce(n.concat)}},t.matchLeft=function(n){return function(r){return n(t.head(r),t.tail(r))}},t.matchRight=function(n){return function(r){return n(t.init(r),t.last(r))}},t.modifyHead=function(n){return function(r){return i([n(t.head(r))],t.tail(r))}},t.updateHead=function(n){return t.modifyHead((function(){return n}))},t.modifyLast=function(n){return function(r){return g.pipe(t.init(r),t.append(n(t.last(r))))}},t.updateLast=function(n){return t.modifyLast((function(){return n}))},t.groupSort=function(n){var r=t.sort(n),e=s(n);return function(n){return t.isNonEmpty(n)?e(r(n)):t.empty}},t.filter=function(n){return t.filterWithIndex((function(t,r){return n(r)}))},t.filterWithIndex=function(n){return function(r){return t.fromReadonlyArray(r.filter((function(t,r){return n(r,t)})))}},t.uncons=t.unprepend,t.unsnoc=t.unappend,t.cons=function(n,r){return void 0===r?t.prepend(n):g.pipe(r,t.prepend(n))},t.snoc=function(n,t){return g.pipe(n,a([t]))},t.insertAt=function(n,r){return function(e){return n<0||n>e.length?o.none:o.some(t.unsafeInsertAt(n,r,e))}},t.prependToAll=t.prependAll,t.fold=t.concatAll,t.readonlyNonEmptyArray={URI:t.URI,of:t.of,map:v,mapWithIndex:d,ap:l,chain:p,extend:h,extract:t.extract,reduce:m,foldMap:b,reduceRight:y,traverse:I,sequence:t.sequence,reduceWithIndex:M,foldMapWithIndex:x,reduceRightWithIndex:E,traverseWithIndex:T,alt:j}})),Dt=I((function(n,t){var r=w&&w.__createBinding||(Object.create?function(n,t,r,e){void 0===e&&(e=r),Object.defineProperty(n,e,{enumerable:!0,get:function(){return t[r]}})}:function(n,t,r,e){void 0===e&&(e=r),n[e]=t[r]}),e=w&&w.__setModuleDefault||(Object.create?function(n,t){Object.defineProperty(n,"default",{enumerable:!0,value:t})}:function(n,t){n.default=t}),u=w&&w.__importStar||function(n){if(n&&n.__esModule)return n;var t={};if(null!=n)for(var u in n)"default"!==u&&Object.prototype.hasOwnProperty.call(n,u)&&r(t,n,u);return e(t,n),t},i=w&&w.__spreadArray||function(n,t){for(var r=0,e=t.length,u=n.length;r<e;r++,u++)n[u]=t[r];return n};Object.defineProperty(t,"__esModule",{value:!0}),t.mapWithIndex=t.map=t.flatten=t.duplicate=t.extend=t.chain=t.ap=t.alt=t.altW=t.chunksOf=t.splitAt=t.chop=t.chainWithIndex=t.foldMap=t.foldMapWithIndex=t.intersperse=t.prependAll=t.unzip=t.zip=t.zipWith=t.of=t.copy=t.modifyAt=t.updateAt=t.insertAt=t.sort=t.groupBy=t.group=t.reverse=t.concat=t.concatW=t.unappend=t.unprepend=t.range=t.replicate=t.makeBy=t.fromArray=t.fromReadonlyNonEmptyArray=t.rotate=t.union=t.sortBy=t.uniq=t.unsafeUpdateAt=t.unsafeInsertAt=t.append=t.appendW=t.prepend=t.prependW=t.isOutOfBound=t.isNonEmpty=void 0,t.filterWithIndex=t.filter=t.groupSort=t.updateLast=t.modifyLast=t.updateHead=t.modifyHead=t.matchRight=t.matchLeft=t.concatAll=t.max=t.min=t.init=t.last=t.tail=t.head=t.apS=t.bind=t.bindTo=t.Do=t.Comonad=t.Alt=t.TraversableWithIndex=t.Traversable=t.FoldableWithIndex=t.Foldable=t.Monad=t.chainFirst=t.Chain=t.Applicative=t.apSecond=t.apFirst=t.Apply=t.FunctorWithIndex=t.Pointed=t.flap=t.Functor=t.getUnionSemigroup=t.getEq=t.getSemigroup=t.getShow=t.URI=t.extract=t.traverseWithIndex=t.sequence=t.traverse=t.reduceRightWithIndex=t.reduceRight=t.reduceWithIndex=t.reduce=void 0,t.nonEmptyArray=t.fold=t.prependToAll=t.snoc=t.cons=t.unsnoc=t.uncons=void 0;var o=u(U),c=u(qt);function f(n){return function(t){return t.concat(n)}}function a(n,t){return t?n.concat(t):function(t){return t.concat(n)}}function s(n){return function(t){var r=t.length;if(0===r)return[];for(var e=[],u=t[0],i=[u],o=1;o<r;o++){var c=t[o];n.equals(c,u)?i.push(c):(e.push(i),i=[u=c])}return e.push(i),e}}t.isNonEmpty=function(n){return n.length>0},t.isOutOfBound=function(n,t){return n<0||n>=t.length},t.prependW=function(n){return function(t){return i([n],t)}},t.prepend=t.prependW,t.appendW=function(n){return function(t){return i(i([],t),[n])}},t.append=t.appendW,t.unsafeInsertAt=function(n,r,e){if(t.isNonEmpty(e)){var u=t.fromReadonlyNonEmptyArray(e);return u.splice(n,0,r),u}return[r]},t.unsafeUpdateAt=function(n,r,e){var u=t.fromReadonlyNonEmptyArray(e);return u[n]=r,u},t.uniq=function(n){return function(r){if(1===r.length)return t.copy(r);for(var e=[t.head(r)],u=function(t){e.every((function(r){return!n.equals(r,t)}))&&e.push(t)},i=0,o=t.tail(r);i<o.length;i++)u(o[i]);return e}},t.sortBy=function(n){if(t.isNonEmpty(n)){var r=N.getMonoid();return t.sort(n.reduce(r.concat,r.empty))}return t.copy},t.union=function(n){var r=t.uniq(n);return function(n){return function(t){return r(g.pipe(t,a(n)))}}},t.rotate=function(n){return function(r){var e=r.length,u=Math.round(n)%e;if(t.isOutOfBound(Math.abs(u),r)||0===u)return t.copy(r);if(u<0){var i=t.splitAt(-u)(r);return g.pipe(i[1],a(i[0]))}return t.rotate(u-e)(r)}},t.fromReadonlyNonEmptyArray=o.fromReadonlyNonEmptyArray,t.fromArray=function(n){return t.isNonEmpty(n)?o.some(n):o.none},t.makeBy=function(n){return function(t){for(var r=Math.max(0,Math.floor(t)),e=[n(0)],u=1;u<r;u++)e.push(n(u));return e}},t.replicate=function(n){return t.makeBy((function(){return n}))},t.range=function(n,r){return n<=r?t.makeBy((function(t){return n+t}))(r-n+1):[n]},t.unprepend=function(n){return[t.head(n),t.tail(n)]},t.unappend=function(n){return[t.init(n),t.last(n)]},t.concatW=f,t.concat=a,t.reverse=function(n){return i([t.last(n)],n.slice(0,-1).reverse())},t.group=s,t.groupBy=function(n){return function(t){for(var r={},e=0,u=t;e<u.length;e++){var i=u[e],o=n(i);r.hasOwnProperty(o)?r[o].push(i):r[o]=[i]}return r}},t.sort=function(n){return function(t){return t.slice().sort(n.compare)}},t.insertAt=function(n,r){return function(e){return n<0||n>e.length?o.none:o.some(t.unsafeInsertAt(n,r,e))}},t.updateAt=function(n,r){return t.modifyAt(n,(function(){return r}))},t.modifyAt=function(n,r){return function(e){return t.isOutOfBound(n,e)?o.none:o.some(t.unsafeUpdateAt(n,r(e[n]),e))}},t.copy=t.fromReadonlyNonEmptyArray,t.of=function(n){return[n]},t.zipWith=function(n,t,r){for(var e=[r(n[0],t[0])],u=Math.min(n.length,t.length),i=1;i<u;i++)e[i]=r(n[i],t[i]);return e},t.zip=function n(r,e){return void 0===e?function(t){return n(t,r)}:t.zipWith(r,e,(function(n,t){return[n,t]}))},t.unzip=function(n){for(var t=[n[0][0]],r=[n[0][1]],e=1;e<n.length;e++)t[e]=n[e][0],r[e]=n[e][1];return[t,r]},t.prependAll=function(n){return function(t){for(var r=[n,t[0]],e=1;e<t.length;e++)r.push(n,t[e]);return r}},t.intersperse=function(n){return function(r){var e=t.tail(r);return t.isNonEmpty(e)?g.pipe(e,t.prependAll(n),t.prepend(t.head(r))):t.copy(r)}},t.foldMapWithIndex=c.foldMapWithIndex,t.foldMap=c.foldMap,t.chainWithIndex=function(n){return function(r){for(var e=t.fromReadonlyNonEmptyArray(n(0,t.head(r))),u=1;u<r.length;u++)e.push.apply(e,n(u,r[u]));return e}},t.chop=function(n){return function(r){for(var e=n(r),u=[e[0]],i=e[1];t.isNonEmpty(i);){var o=n(i),c=o[1];u.push(o[0]),i=c}return u}},t.splitAt=function(n){return function(r){var e=Math.max(1,n);return e>=r.length?[t.copy(r),[]]:[g.pipe(r.slice(1,e),t.prepend(t.head(r))),r.slice(e)]}},t.chunksOf=function(n){return t.chop(t.splitAt(n))};var v=function(n,r){return g.pipe(n,t.map(r))},d=function(n,r){return g.pipe(n,t.mapWithIndex(r))},l=function(n,r){return g.pipe(n,t.ap(r))},p=function(n,r){return g.pipe(n,t.chain(r))},h=function(n,r){return g.pipe(n,t.extend(r))},m=function(n,r,e){return g.pipe(n,t.reduce(r,e))},b=function(n){var r=t.foldMap(n);return function(n,t){return g.pipe(n,r(t))}},y=function(n,r,e){return g.pipe(n,t.reduceRight(r,e))},I=function(n){var r=t.traverse(n);return function(n,t){return g.pipe(n,r(t))}},j=function(n,r){return g.pipe(n,t.alt(r))},M=function(n,r,e){return g.pipe(n,t.reduceWithIndex(r,e))},x=function(n){var r=t.foldMapWithIndex(n);return function(n,t){return g.pipe(n,r(t))}},E=function(n,r,e){return g.pipe(n,t.reduceRightWithIndex(r,e))},A=function(n){var r=t.traverseWithIndex(n);return function(n,t){return g.pipe(n,r(t))}};t.altW=function(n){return function(t){return g.pipe(t,f(n()))}},t.alt=t.altW,t.ap=function(n){return t.chain((function(r){return g.pipe(n,t.map(r))}))},t.chain=function(n){return t.chainWithIndex((function(t,r){return n(r)}))},t.extend=function(n){return function(r){for(var e=t.tail(r),u=[n(r)];t.isNonEmpty(e);)u.push(n(e)),e=t.tail(e);return u}},t.duplicate=t.extend(g.identity),t.flatten=t.chain(g.identity),t.map=function(n){return t.mapWithIndex((function(t,r){return n(r)}))},t.mapWithIndex=function(n){return function(r){for(var e=[n(0,t.head(r))],u=1;u<r.length;u++)e.push(n(u,r[u]));return e}},t.reduce=c.reduce,t.reduceWithIndex=c.reduceWithIndex,t.reduceRight=c.reduceRight,t.reduceRightWithIndex=c.reduceRightWithIndex,t.traverse=function(n){var r=t.traverseWithIndex(n);return function(n){return r((function(t,r){return n(r)}))}},t.sequence=function(n){return t.traverseWithIndex(n)((function(n,t){return t}))},t.traverseWithIndex=function(n){return function(r){return function(e){for(var u=n.map(r(0,t.head(e)),t.of),i=1;i<e.length;i++)u=n.ap(n.map(u,(function(n){return function(r){return g.pipe(n,t.append(r))}})),r(i,e[i]));return u}}},t.extract=c.head,t.URI="NonEmptyArray",t.getShow=c.getShow,t.getSemigroup=function(){return{concat:a}},t.getEq=c.getEq,t.getUnionSemigroup=function(n){var r=t.union(n);return{concat:function(n,t){return r(t)(n)}}},t.Functor={URI:t.URI,map:v},t.flap=O.flap(t.Functor),t.Pointed={URI:t.URI,of:t.of},t.FunctorWithIndex={URI:t.URI,map:v,mapWithIndex:d},t.Apply={URI:t.URI,map:v,ap:l},t.apFirst=R.apFirst(t.Apply),t.apSecond=R.apSecond(t.Apply),t.Applicative={URI:t.URI,map:v,ap:l,of:t.of},t.Chain={URI:t.URI,map:v,ap:l,chain:p},t.chainFirst=_.chainFirst(t.Chain),t.Monad={URI:t.URI,map:v,ap:l,of:t.of,chain:p},t.Foldable={URI:t.URI,reduce:m,foldMap:b,reduceRight:y},t.FoldableWithIndex={URI:t.URI,reduce:m,foldMap:b,reduceRight:y,reduceWithIndex:M,foldMapWithIndex:x,reduceRightWithIndex:E},t.Traversable={URI:t.URI,map:v,reduce:m,foldMap:b,reduceRight:y,traverse:I,sequence:t.sequence},t.TraversableWithIndex={URI:t.URI,map:v,mapWithIndex:d,reduce:m,foldMap:b,reduceRight:y,traverse:I,sequence:t.sequence,reduceWithIndex:M,foldMapWithIndex:x,reduceRightWithIndex:E,traverseWithIndex:A},t.Alt={URI:t.URI,map:v,alt:j},t.Comonad={URI:t.URI,map:v,extend:h,extract:t.extract},t.Do=t.of(o.emptyRecord),t.bindTo=O.bindTo(t.Functor),t.bind=_.bind(t.Chain),t.apS=R.apS(t.Apply),t.head=c.head,t.tail=function(n){return n.slice(1)},t.last=c.last,t.init=function(n){return n.slice(0,-1)},t.min=c.min,t.max=c.max,t.concatAll=function(n){return function(t){return t.reduce(n.concat)}},t.matchLeft=function(n){return function(r){return n(t.head(r),t.tail(r))}},t.matchRight=function(n){return function(r){return n(t.init(r),t.last(r))}},t.modifyHead=function(n){return function(r){return i([n(t.head(r))],t.tail(r))}},t.updateHead=function(n){return t.modifyHead((function(){return n}))},t.modifyLast=function(n){return function(r){return g.pipe(t.init(r),t.append(n(t.last(r))))}},t.updateLast=function(n){return t.modifyLast((function(){return n}))},t.groupSort=function(n){var r=t.sort(n),e=s(n);return function(n){return t.isNonEmpty(n)?e(r(n)):[]}},t.filter=function(n){return t.filterWithIndex((function(t,r){return n(r)}))},t.filterWithIndex=function(n){return function(r){return t.fromArray(r.filter((function(t,r){return n(r,t)})))}},t.uncons=t.unprepend,t.unsnoc=t.unappend,t.cons=function(n,r){return void 0===r?t.prepend(n):g.pipe(r,t.prepend(n))},t.snoc=function(n,r){return g.pipe(n,t.append(r))},t.prependToAll=t.prependAll,t.fold=c.concatAll,t.nonEmptyArray={URI:t.URI,of:t.of,map:v,mapWithIndex:d,ap:l,chain:p,extend:h,extract:t.extract,reduce:m,foldMap:b,reduceRight:y,traverse:I,sequence:t.sequence,reduceWithIndex:M,foldMapWithIndex:x,reduceRightWithIndex:E,traverseWithIndex:A,alt:j}})),zt=I((function(n,t){var r=w&&w.__createBinding||(Object.create?function(n,t,r,e){void 0===e&&(e=r),Object.defineProperty(n,e,{enumerable:!0,get:function(){return t[r]}})}:function(n,t,r,e){void 0===e&&(e=r),n[e]=t[r]}),e=w&&w.__setModuleDefault||(Object.create?function(n,t){Object.defineProperty(n,"default",{enumerable:!0,value:t})}:function(n,t){n.default=t}),u=w&&w.__importStar||function(n){if(n&&n.__esModule)return n;var t={};if(null!=n)for(var u in n)"default"!==u&&Object.prototype.hasOwnProperty.call(n,u)&&r(t,n,u);return e(t,n),t},i=w&&w.__spreadArray||function(n,t){for(var r=0,e=t.length,u=n.length;r<e;r++,u++)n[u]=t[r];return n};Object.defineProperty(t,"__esModule",{value:!0}),t.sort=t.lefts=t.rights=t.reverse=t.modifyAt=t.deleteAt=t.updateAt=t.insertAt=t.findLastIndex=t.findLastMap=t.findLast=t.findFirstMap=t.findFirst=t.findIndex=t.dropLeftWhile=t.dropRight=t.dropLeft=t.spanLeft=t.takeLeftWhile=t.takeRight=t.takeLeft=t.init=t.tail=t.last=t.head=t.lookup=t.isOutOfBound=t.size=t.scanRight=t.scanLeft=t.chainWithIndex=t.foldRight=t.matchRight=t.matchRightW=t.foldLeft=t.matchLeft=t.matchLeftW=t.match=t.matchW=t.fromEither=t.fromOption=t.fromPredicate=t.replicate=t.makeBy=t.appendW=t.append=t.prependW=t.prepend=t.isNonEmpty=t.isEmpty=void 0,t.sequence=t.traverse=t.reduceRightWithIndex=t.reduceRight=t.reduceWithIndex=t.foldMap=t.reduce=t.foldMapWithIndex=t.duplicate=t.extend=t.filterWithIndex=t.partitionMapWithIndex=t.partitionMap=t.partitionWithIndex=t.partition=t.compact=t.filterMap=t.filterMapWithIndex=t.filter=t.separate=t.mapWithIndex=t.map=t.flatten=t.chain=t.ap=t.alt=t.altW=t.zero=t.of=t._chainRecBreadthFirst=t._chainRecDepthFirst=t.difference=t.intersection=t.union=t.concat=t.concatW=t.comprehension=t.fromOptionK=t.chunksOf=t.splitAt=t.chop=t.sortBy=t.uniq=t.elem=t.rotate=t.intersperse=t.prependAll=t.unzip=t.zip=t.zipWith=void 0,t.toArray=t.unsafeDeleteAt=t.unsafeUpdateAt=t.unsafeInsertAt=t.fromEitherK=t.FromEither=t.filterE=t.Witherable=t.ChainRecBreadthFirst=t.chainRecBreadthFirst=t.ChainRecDepthFirst=t.chainRecDepthFirst=t.TraversableWithIndex=t.Traversable=t.FoldableWithIndex=t.Foldable=t.FilterableWithIndex=t.Filterable=t.Compactable=t.Extend=t.Alternative=t.guard=t.Zero=t.Alt=t.Unfoldable=t.chainFirst=t.Monad=t.Chain=t.Applicative=t.apSecond=t.apFirst=t.Apply=t.FunctorWithIndex=t.Pointed=t.flap=t.Functor=t.getDifferenceMagma=t.getIntersectionSemigroup=t.getUnionMonoid=t.getUnionSemigroup=t.getOrd=t.getEq=t.getMonoid=t.getSemigroup=t.getShow=t.URI=t.unfold=t.wilt=t.wither=t.traverseWithIndex=void 0,t.readonlyArray=t.prependToAll=t.snoc=t.cons=t.range=t.apS=t.bind=t.bindTo=t.Do=t.exists=t.some=t.every=t.empty=t.fromArray=void 0;var o=u(U),c=u(Ct),f=u(qt);t.isEmpty=function(n){return 0===n.length},t.isNonEmpty=f.isNonEmpty,t.prepend=f.prepend,t.prependW=f.prependW,t.append=f.append,t.appendW=f.appendW,t.makeBy=function(n,r){return n<=0?t.empty:f.makeBy(r)(n)},t.replicate=function(n,r){return t.makeBy(n,(function(){return r}))},t.fromPredicate=function(n){return function(r){return n(r)?[r]:t.empty}},t.fromOption=function(n){return o.isNone(n)?t.empty:[n.value]},t.fromEither=function(n){return o.isLeft(n)?t.empty:[n.right]},t.matchW=function(n,r){return function(e){return t.isNonEmpty(e)?r(e):n()}},t.match=t.matchW,t.matchLeftW=function(n,r){return function(e){return t.isNonEmpty(e)?r(f.head(e),f.tail(e)):n()}},t.matchLeft=t.matchLeftW,t.foldLeft=t.matchLeft,t.matchRightW=function(n,r){return function(e){return t.isNonEmpty(e)?r(f.init(e),f.last(e)):n()}},t.matchRight=t.matchRightW,t.foldRight=t.matchRight,t.chainWithIndex=function(n){return function(r){if(t.isEmpty(r))return t.empty;for(var e=[],u=0;u<r.length;u++)e.push.apply(e,n(u,r[u]));return e}},t.scanLeft=function(n,t){return function(r){var e=r.length,u=new Array(e+1);u[0]=n;for(var i=0;i<e;i++)u[i+1]=t(u[i],r[i]);return u}},t.scanRight=function(n,t){return function(r){var e=r.length,u=new Array(e+1);u[e]=n;for(var i=e-1;i>=0;i--)u[i]=t(r[i],u[i+1]);return u}},t.size=function(n){return n.length},t.isOutOfBound=f.isOutOfBound,t.lookup=function n(r,e){return void 0===e?function(t){return n(r,t)}:t.isOutOfBound(r,e)?o.none:o.some(e[r])},t.head=function(n){return t.isNonEmpty(n)?o.some(f.head(n)):o.none},t.last=function(n){return t.isNonEmpty(n)?o.some(f.last(n)):o.none},t.tail=function(n){return t.isNonEmpty(n)?o.some(f.tail(n)):o.none},t.init=function(n){return t.isNonEmpty(n)?o.some(f.init(n)):o.none},t.takeLeft=function(n){return function(r){return t.isOutOfBound(n,r)?r:0===n?t.empty:r.slice(0,n)}},t.takeRight=function(n){return function(r){return t.isOutOfBound(n,r)?r:0===n?t.empty:r.slice(-n)}},t.takeLeftWhile=function(n){return function(r){for(var e=[],u=0,i=r;u<i.length;u++){var o=i[u];if(!n(o))break;e.push(o)}var c=e.length;return c===r.length?r:0===c?t.empty:e}};var a=function(n,t){for(var r=n.length,e=0;e<r&&t(n[e]);e++);return e};function s(n){return function(t,r){if(void 0===r){var e=s(n);return function(n){return e(t,n)}}for(var u=0;u<r.length;u++)if(n.equals(r[u],t))return!0;return!1}}function v(n){var r=f.union(n);return function(e,u){if(void 0===u){var i=v(n);return function(n){return i(n,e)}}return t.isNonEmpty(e)&&t.isNonEmpty(u)?r(u)(e):t.isNonEmpty(e)?e:u}}function d(n){var t=s(n);return function(r,e){if(void 0===e){var u=d(n);return function(n){return u(n,r)}}return r.filter((function(n){return t(n,e)}))}}function l(n){var t=s(n);return function(r,e){if(void 0===e){var u=l(n);return function(n){return u(n,r)}}return r.filter((function(n){return!t(n,e)}))}}t.spanLeft=function(n){return function(r){var e=t.splitAt(a(r,n))(r);return{init:e[0],rest:e[1]}}},t.dropLeft=function(n){return function(r){return n<=0||t.isEmpty(r)?r:n>=r.length?t.empty:r.slice(n,r.length)}},t.dropRight=function(n){return function(r){return n<=0||t.isEmpty(r)?r:n>=r.length?t.empty:r.slice(0,r.length-n)}},t.dropLeftWhile=function(n){return function(r){var e=a(r,n);return 0===e?r:e===r.length?t.empty:r.slice(e)}},t.findIndex=function(n){return function(t){for(var r=0;r<t.length;r++)if(n(t[r]))return o.some(r);return o.none}},t.findFirst=function(n){return function(t){for(var r=0;r<t.length;r++)if(n(t[r]))return o.some(t[r]);return o.none}},t.findFirstMap=function(n){return function(t){for(var r=0;r<t.length;r++){var e=n(t[r]);if(o.isSome(e))return e}return o.none}},t.findLast=function(n){return function(t){for(var r=t.length-1;r>=0;r--)if(n(t[r]))return o.some(t[r]);return o.none}},t.findLastMap=function(n){return function(t){for(var r=t.length-1;r>=0;r--){var e=n(t[r]);if(o.isSome(e))return e}return o.none}},t.findLastIndex=function(n){return function(t){for(var r=t.length-1;r>=0;r--)if(n(t[r]))return o.some(r);return o.none}},t.insertAt=function(n,t){return function(r){return n<0||n>r.length?o.none:o.some(f.unsafeInsertAt(n,t,r))}},t.updateAt=function(n,r){return t.modifyAt(n,(function(){return r}))},t.deleteAt=function(n){return function(r){return t.isOutOfBound(n,r)?o.none:o.some(t.unsafeDeleteAt(n,r))}},t.modifyAt=function(n,r){return function(e){return t.isOutOfBound(n,e)?o.none:o.some(t.unsafeUpdateAt(n,r(e[n]),e))}},t.reverse=function(n){return n.length<=1?n:n.slice().reverse()},t.rights=function(n){for(var t=[],r=0;r<n.length;r++){var e=n[r];"Right"===e._tag&&t.push(e.right)}return t},t.lefts=function(n){for(var t=[],r=0;r<n.length;r++){var e=n[r];"Left"===e._tag&&t.push(e.left)}return t},t.sort=function(n){return function(t){return t.length<=1?t:t.slice().sort(n.compare)}},t.zipWith=function(n,t,r){for(var e=[],u=Math.min(n.length,t.length),i=0;i<u;i++)e[i]=r(n[i],t[i]);return e},t.zip=function n(r,e){return void 0===e?function(t){return n(t,r)}:t.zipWith(r,e,(function(n,t){return[n,t]}))},t.unzip=function(n){for(var t=[],r=[],e=0;e<n.length;e++)t[e]=n[e][0],r[e]=n[e][1];return[t,r]},t.prependAll=function(n){var r=f.prependAll(n);return function(n){return t.isNonEmpty(n)?r(n):n}},t.intersperse=function(n){var r=f.intersperse(n);return function(n){return t.isNonEmpty(n)?r(n):n}},t.rotate=function(n){var r=f.rotate(n);return function(n){return t.isNonEmpty(n)?r(n):n}},t.elem=s,t.uniq=function(n){var r=f.uniq(n);return function(n){return t.isNonEmpty(n)?r(n):n}},t.sortBy=function(n){var r=f.sortBy(n);return function(n){return t.isNonEmpty(n)?r(n):n}},t.chop=function(n){var r=f.chop(n);return function(n){return t.isNonEmpty(n)?r(n):t.empty}},t.splitAt=function(n){return function(r){return n>=1&&t.isNonEmpty(r)?f.splitAt(n)(r):t.isEmpty(r)?[r,t.empty]:[t.empty,r]}},t.chunksOf=function(n){var r=f.chunksOf(n);return function(n){return t.isNonEmpty(n)?r(n):t.empty}},t.fromOptionK=function(n){return function(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];return t.fromOption(n.apply(void 0,r))}},t.comprehension=function(n,r,e){void 0===e&&(e=function(){return!0});var u=function(n,i){return t.isNonEmpty(i)?g.pipe(f.head(i),t.chain((function(r){return u(g.pipe(n,t.append(r)),f.tail(i))}))):e.apply(void 0,n)?[r.apply(void 0,n)]:t.empty};return u(t.empty,n)},t.concatW=function(n){return function(r){return t.isEmpty(r)?n:t.isEmpty(n)?r:r.concat(n)}},t.concat=t.concatW,t.union=v,t.intersection=d,t.difference=l;var p=function(n,r){return g.pipe(n,t.map(r))},h=function(n,r){return g.pipe(n,t.mapWithIndex(r))},m=function(n,r){return g.pipe(n,t.ap(r))},b=function(n,r){return g.pipe(n,t.chain(r))},y=function(n,r){return g.pipe(n,t.filter(r))},I=function(n,r){return g.pipe(n,t.filterMap(r))},j=function(n,r){return g.pipe(n,t.partition(r))},x=function(n,r){return g.pipe(n,t.partitionMap(r))},E=function(n,r){return g.pipe(n,t.partitionWithIndex(r))},W=function(n,r){return g.pipe(n,t.partitionMapWithIndex(r))},P=function(n,r){return g.pipe(n,t.alt(r))},C=function(n,r,e){return g.pipe(n,t.reduce(r,e))},q=function(n){var r=t.foldMap(n);return function(n,t){return g.pipe(n,r(t))}},D=function(n,r,e){return g.pipe(n,t.reduceRight(r,e))},z=function(n,r,e){return g.pipe(n,t.reduceWithIndex(r,e))},L=function(n){var r=t.foldMapWithIndex(n);return function(n,t){return g.pipe(n,r(t))}},F=function(n,r,e){return g.pipe(n,t.reduceRightWithIndex(r,e))},H=function(n,r){return g.pipe(n,t.filterMapWithIndex(r))},B=function(n,r){return g.pipe(n,t.filterWithIndex(r))},G=function(n,r){return g.pipe(n,t.extend(r))},V=function(n){var r=t.traverse(n);return function(n,t){return g.pipe(n,r(t))}},J=function(n){var r=t.traverseWithIndex(n);return function(n,t){return g.pipe(n,r(t))}};t._chainRecDepthFirst=function(n,r){return g.pipe(n,t.chainRecDepthFirst(r))},t._chainRecBreadthFirst=function(n,r){return g.pipe(n,t.chainRecBreadthFirst(r))},t.of=f.of,t.zero=function(){return t.empty},t.altW=function(n){return function(t){return t.concat(n())}},t.alt=t.altW,t.ap=function(n){return t.chain((function(r){return g.pipe(n,t.map(r))}))},t.chain=function(n){return function(r){return g.pipe(r,t.chainWithIndex((function(t,r){return n(r)})))}},t.flatten=t.chain(g.identity),t.map=function(n){return function(t){return t.map((function(t){return n(t)}))}},t.mapWithIndex=function(n){return function(t){return t.map((function(t,r){return n(r,t)}))}},t.separate=function(n){for(var t=[],r=[],e=0,u=n;e<u.length;e++){var i=u[e];"Left"===i._tag?t.push(i.left):r.push(i.right)}return T.separated(t,r)},t.filter=function(n){return function(t){return t.filter(n)}},t.filterMapWithIndex=function(n){return function(t){for(var r=[],e=0;e<t.length;e++){var u=n(e,t[e]);o.isSome(u)&&r.push(u.value)}return r}},t.filterMap=function(n){return t.filterMapWithIndex((function(t,r){return n(r)}))},t.compact=t.filterMap(g.identity),t.partition=function(n){return t.partitionWithIndex((function(t,r){return n(r)}))},t.partitionWithIndex=function(n){return function(t){for(var r=[],e=[],u=0;u<t.length;u++){var i=t[u];n(u,i)?e.push(i):r.push(i)}return T.separated(r,e)}},t.partitionMap=function(n){return t.partitionMapWithIndex((function(t,r){return n(r)}))},t.partitionMapWithIndex=function(n){return function(t){for(var r=[],e=[],u=0;u<t.length;u++){var i=n(u,t[u]);"Left"===i._tag?r.push(i.left):e.push(i.right)}return T.separated(r,e)}},t.filterWithIndex=function(n){return function(t){return t.filter((function(t,r){return n(r,t)}))}},t.extend=function(n){return function(t){return t.map((function(r,e){return n(t.slice(e))}))}},t.duplicate=t.extend(g.identity),t.foldMapWithIndex=function(n){return function(t){return function(r){return r.reduce((function(r,e,u){return n.concat(r,t(u,e))}),n.empty)}}},t.reduce=function(n,r){return t.reduceWithIndex(n,(function(n,t,e){return r(t,e)}))},t.foldMap=function(n){var r=t.foldMapWithIndex(n);return function(n){return r((function(t,r){return n(r)}))}},t.reduceWithIndex=function(n,t){return function(r){for(var e=r.length,u=n,i=0;i<e;i++)u=t(i,u,r[i]);return u}},t.reduceRight=function(n,r){return t.reduceRightWithIndex(n,(function(n,t,e){return r(t,e)}))},t.reduceRightWithIndex=function(n,t){return function(r){return r.reduceRight((function(n,r,e){return t(e,r,n)}),n)}},t.traverse=function(n){var r=t.traverseWithIndex(n);return function(n){return r((function(t,r){return n(r)}))}},t.sequence=function(n){return function(r){return C(r,n.of(t.zero()),(function(r,e){return n.ap(n.map(r,(function(n){return function(r){return g.pipe(n,t.append(r))}})),e)}))}},t.traverseWithIndex=function(n){return function(r){return t.reduceWithIndex(n.of(t.zero()),(function(e,u,i){return n.ap(n.map(u,(function(n){return function(r){return g.pipe(n,t.append(r))}})),r(e,i))}))}},t.wither=function(n){var t=$(n);return function(n){return function(r){return t(r,n)}}},t.wilt=function(n){var t=K(n);return function(n){return function(r){return t(r,n)}}},t.unfold=function(n,t){for(var r=[],e=n;;){var u=t(e);if(!o.isSome(u))break;var i=u.value,c=i[1];r.push(i[0]),e=c}return r},t.URI="ReadonlyArray",t.getShow=function(n){return{show:function(t){return"["+t.map(n.show).join(", ")+"]"}}},t.getSemigroup=function(){return{concat:function(n,r){return t.isEmpty(n)?r:t.isEmpty(r)?n:n.concat(r)}}},t.getMonoid=function(){return{concat:t.getSemigroup().concat,empty:t.empty}},t.getEq=function(n){return A.fromEquals((function(t,r){return t.length===r.length&&t.every((function(t,e){return n.equals(t,r[e])}))}))},t.getOrd=function(n){return N.fromCompare((function(t,r){for(var e=t.length,u=r.length,i=Math.min(e,u),o=0;o<i;o++){var f=n.compare(t[o],r[o]);if(0!==f)return f}return c.Ord.compare(e,u)}))},t.getUnionSemigroup=function(n){var t=v(n);return{concat:function(n,r){return t(r)(n)}}},t.getUnionMonoid=function(n){return{concat:t.getUnionSemigroup(n).concat,empty:t.empty}},t.getIntersectionSemigroup=function(n){var t=d(n);return{concat:function(n,r){return t(r)(n)}}},t.getDifferenceMagma=function(n){var t=l(n);return{concat:function(n,r){return t(r)(n)}}},t.Functor={URI:t.URI,map:p},t.flap=O.flap(t.Functor),t.Pointed={URI:t.URI,of:t.of},t.FunctorWithIndex={URI:t.URI,map:p,mapWithIndex:h},t.Apply={URI:t.URI,map:p,ap:m},t.apFirst=R.apFirst(t.Apply),t.apSecond=R.apSecond(t.Apply),t.Applicative={URI:t.URI,map:p,ap:m,of:t.of},t.Chain={URI:t.URI,map:p,ap:m,chain:b},t.Monad={URI:t.URI,map:p,ap:m,of:t.of,chain:b},t.chainFirst=_.chainFirst(t.Chain),t.Unfoldable={URI:t.URI,unfold:t.unfold},t.Alt={URI:t.URI,map:p,alt:P},t.Zero={URI:t.URI,zero:t.zero},t.guard=k.guard(t.Zero,t.Pointed),t.Alternative={URI:t.URI,map:p,ap:m,of:t.of,alt:P,zero:t.zero},t.Extend={URI:t.URI,map:p,extend:G},t.Compactable={URI:t.URI,compact:t.compact,separate:t.separate},t.Filterable={URI:t.URI,map:p,compact:t.compact,separate:t.separate,filter:y,filterMap:I,partition:j,partitionMap:x},t.FilterableWithIndex={URI:t.URI,map:p,mapWithIndex:h,compact:t.compact,separate:t.separate,filter:y,filterMap:I,partition:j,partitionMap:x,partitionMapWithIndex:W,partitionWithIndex:E,filterMapWithIndex:H,filterWithIndex:B},t.Foldable={URI:t.URI,reduce:C,foldMap:q,reduceRight:D},t.FoldableWithIndex={URI:t.URI,reduce:C,foldMap:q,reduceRight:D,reduceWithIndex:z,foldMapWithIndex:L,reduceRightWithIndex:F},t.Traversable={URI:t.URI,map:p,reduce:C,foldMap:q,reduceRight:D,traverse:V,sequence:t.sequence},t.TraversableWithIndex={URI:t.URI,map:p,mapWithIndex:h,reduce:C,foldMap:q,reduceRight:D,reduceWithIndex:z,foldMapWithIndex:L,reduceRightWithIndex:F,traverse:V,sequence:t.sequence,traverseWithIndex:J},t.chainRecDepthFirst=function(n){return function(t){for(var r=i([],n(t)),e=[];r.length>0;){var u=r.shift();o.isLeft(u)?r.unshift.apply(r,n(u.left)):e.push(u.right)}return e}},t.ChainRecDepthFirst={URI:t.URI,map:p,ap:m,chain:b,chainRec:t._chainRecDepthFirst},t.chainRecBreadthFirst=function(n){return function(t){var r=n(t),e=[],u=[];function i(t){o.isLeft(t)?n(t.left).forEach((function(n){return e.push(n)})):u.push(t.right)}for(var c=0,f=r;c<f.length;c++)i(f[c]);for(;e.length>0;)i(e.shift());return u}},t.ChainRecBreadthFirst={URI:t.URI,map:p,ap:m,chain:b,chainRec:t._chainRecBreadthFirst};var $=S.witherDefault(t.Traversable,t.Compactable),K=S.wiltDefault(t.Traversable,t.Compactable);t.Witherable={URI:t.URI,map:p,compact:t.compact,separate:t.separate,filter:y,filterMap:I,partition:j,partitionMap:x,reduce:C,foldMap:q,reduceRight:D,traverse:V,sequence:t.sequence,wither:$,wilt:K},t.filterE=S.filterE(t.Witherable),t.FromEither={URI:t.URI,fromEither:t.fromEither},t.fromEitherK=M.fromEitherK(t.FromEither),t.unsafeInsertAt=f.unsafeInsertAt,t.unsafeUpdateAt=function(n,r,e){return t.isNonEmpty(e)?f.unsafeUpdateAt(n,r,e):e},t.unsafeDeleteAt=function(n,t){var r=t.slice();return r.splice(n,1),r},t.toArray=function(n){return n.slice()},t.fromArray=function(n){return t.isEmpty(n)?t.empty:n.slice()},t.empty=f.empty,t.every=function(n){return function(t){return t.every(n)}},t.some=function(n){return function(t){return t.some(n)}},t.exists=t.some,t.Do=t.of(o.emptyRecord),t.bindTo=O.bindTo(t.Functor),t.bind=_.bind(t.Chain),t.apS=R.apS(t.Apply),t.range=f.range,t.cons=f.cons,t.snoc=f.snoc,t.prependToAll=t.prependAll,t.readonlyArray={URI:t.URI,compact:t.compact,separate:t.separate,map:p,ap:m,of:t.of,chain:b,filter:y,filterMap:I,partition:j,partitionMap:x,mapWithIndex:h,partitionMapWithIndex:W,partitionWithIndex:E,filterMapWithIndex:H,filterWithIndex:B,alt:P,zero:t.zero,unfold:t.unfold,reduce:C,foldMap:q,reduceRight:D,traverse:V,sequence:t.sequence,reduceWithIndex:z,foldMapWithIndex:L,reduceRightWithIndex:F,traverseWithIndex:J,extend:G,wither:$,wilt:K}})),Lt=I((function(n,t){var r=w&&w.__createBinding||(Object.create?function(n,t,r,e){void 0===e&&(e=r),Object.defineProperty(n,e,{enumerable:!0,get:function(){return t[r]}})}:function(n,t,r,e){void 0===e&&(e=r),n[e]=t[r]}),e=w&&w.__setModuleDefault||(Object.create?function(n,t){Object.defineProperty(n,"default",{enumerable:!0,value:t})}:function(n,t){n.default=t}),u=w&&w.__importStar||function(n){if(n&&n.__esModule)return n;var t={};if(null!=n)for(var u in n)"default"!==u&&Object.prototype.hasOwnProperty.call(n,u)&&r(t,n,u);return e(t,n),t};Object.defineProperty(t,"__esModule",{value:!0}),t.lefts=t.rights=t.reverse=t.modifyAt=t.deleteAt=t.updateAt=t.insertAt=t.copy=t.findLastIndex=t.findLastMap=t.findLast=t.findFirstMap=t.findFirst=t.findIndex=t.dropLeftWhile=t.dropRight=t.dropLeft=t.spanLeft=t.takeLeftWhile=t.takeRight=t.takeLeft=t.init=t.tail=t.last=t.head=t.lookup=t.isOutOfBound=t.size=t.scanRight=t.scanLeft=t.chainWithIndex=t.foldRight=t.matchRight=t.matchRightW=t.foldLeft=t.matchLeft=t.matchLeftW=t.match=t.matchW=t.fromEither=t.fromOption=t.fromPredicate=t.replicate=t.makeBy=t.appendW=t.append=t.prependW=t.prepend=t.isNonEmpty=t.isEmpty=void 0,t.traverseWithIndex=t.sequence=t.traverse=t.reduceRightWithIndex=t.reduceRight=t.reduceWithIndex=t.reduce=t.foldMapWithIndex=t.foldMap=t.duplicate=t.extend=t.filterWithIndex=t.alt=t.altW=t.partitionMapWithIndex=t.partitionMap=t.partitionWithIndex=t.partition=t.filter=t.separate=t.compact=t.filterMap=t.filterMapWithIndex=t.mapWithIndex=t.flatten=t.chain=t.ap=t.map=t.zero=t.of=t.difference=t.intersection=t.union=t.concat=t.concatW=t.comprehension=t.fromOptionK=t.chunksOf=t.splitAt=t.chop=t.sortBy=t.uniq=t.elem=t.rotate=t.intersperse=t.prependAll=t.unzip=t.zip=t.zipWith=t.sort=void 0,t.some=t.every=t.unsafeDeleteAt=t.unsafeUpdateAt=t.unsafeInsertAt=t.fromEitherK=t.FromEither=t.filterE=t.ChainRecBreadthFirst=t.chainRecBreadthFirst=t.ChainRecDepthFirst=t.chainRecDepthFirst=t.Witherable=t.TraversableWithIndex=t.Traversable=t.FoldableWithIndex=t.Foldable=t.FilterableWithIndex=t.Filterable=t.Compactable=t.Extend=t.Alternative=t.guard=t.Zero=t.Alt=t.Unfoldable=t.Monad=t.chainFirst=t.Chain=t.Applicative=t.apSecond=t.apFirst=t.Apply=t.FunctorWithIndex=t.Pointed=t.flap=t.Functor=t.getDifferenceMagma=t.getIntersectionSemigroup=t.getUnionMonoid=t.getUnionSemigroup=t.getOrd=t.getEq=t.getMonoid=t.getSemigroup=t.getShow=t.URI=t.unfold=t.wilt=t.wither=void 0,t.array=t.prependToAll=t.snoc=t.cons=t.empty=t.range=t.apS=t.bind=t.bindTo=t.Do=t.exists=void 0;var i=u(U),o=u(Dt),c=u(zt);t.isEmpty=function(n){return 0===n.length},t.isNonEmpty=o.isNonEmpty,t.prepend=o.prepend,t.prependW=o.prependW,t.append=o.append,t.appendW=o.appendW,t.makeBy=function(n,t){return n<=0?[]:o.makeBy(t)(n)},t.replicate=function(n,r){return t.makeBy(n,(function(){return r}))},t.fromPredicate=function(n){return function(t){return n(t)?[t]:[]}},t.fromOption=function(n){return i.isNone(n)?[]:[n.value]},t.fromEither=function(n){return i.isLeft(n)?[]:[n.right]},t.matchW=function(n,r){return function(e){return t.isNonEmpty(e)?r(e):n()}},t.match=t.matchW,t.matchLeftW=function(n,r){return function(e){return t.isNonEmpty(e)?r(o.head(e),o.tail(e)):n()}},t.matchLeft=t.matchLeftW,t.foldLeft=t.matchLeft,t.matchRightW=function(n,r){return function(e){return t.isNonEmpty(e)?r(o.init(e),o.last(e)):n()}},t.matchRight=t.matchRightW,t.foldRight=t.matchRight,t.chainWithIndex=function(n){return function(t){for(var r=[],e=0;e<t.length;e++)r.push.apply(r,n(e,t[e]));return r}},t.scanLeft=function(n,t){return function(r){var e=r.length,u=new Array(e+1);u[0]=n;for(var i=0;i<e;i++)u[i+1]=t(u[i],r[i]);return u}},t.scanRight=function(n,t){return function(r){var e=r.length,u=new Array(e+1);u[e]=n;for(var i=e-1;i>=0;i--)u[i]=t(r[i],u[i+1]);return u}},t.size=function(n){return n.length},t.isOutOfBound=o.isOutOfBound,t.lookup=c.lookup,t.head=c.head,t.last=c.last,t.tail=function(n){return t.isNonEmpty(n)?i.some(o.tail(n)):i.none},t.init=function(n){return t.isNonEmpty(n)?i.some(o.init(n)):i.none},t.takeLeft=function(n){return function(r){return t.isOutOfBound(n,r)?t.copy(r):r.slice(0,n)}},t.takeRight=function(n){return function(r){return t.isOutOfBound(n,r)?t.copy(r):0===n?[]:r.slice(-n)}},t.takeLeftWhile=function(n){return function(t){for(var r=[],e=0,u=t;e<u.length;e++){var i=u[e];if(!n(i))break;r.push(i)}return r}};var f=function(n,t){for(var r=n.length,e=0;e<r&&t(n[e]);e++);return e};function a(n){var r=o.union(n);return function(e,u){if(void 0===u){var i=a(n);return function(n){return i(n,e)}}return t.isNonEmpty(e)&&t.isNonEmpty(u)?r(u)(e):t.isNonEmpty(e)?t.copy(e):t.copy(u)}}function s(n){var r=t.elem(n);return function(t,e){if(void 0===e){var u=s(n);return function(n){return u(n,t)}}return t.filter((function(n){return r(n,e)}))}}function v(n){var r=t.elem(n);return function(t,e){if(void 0===e){var u=v(n);return function(n){return u(n,t)}}return t.filter((function(n){return!r(n,e)}))}}t.spanLeft=function(n){return function(r){var e=t.splitAt(f(r,n))(r);return{init:e[0],rest:e[1]}}},t.dropLeft=function(n){return function(r){return n<=0||t.isEmpty(r)?t.copy(r):n>=r.length?[]:r.slice(n,r.length)}},t.dropRight=function(n){return function(r){return n<=0||t.isEmpty(r)?t.copy(r):n>=r.length?[]:r.slice(0,r.length-n)}},t.dropLeftWhile=function(n){return function(t){return t.slice(f(t,n))}},t.findIndex=c.findIndex,t.findFirst=function(n){return c.findFirst(n)},t.findFirstMap=c.findFirstMap,t.findLast=function(n){return c.findLast(n)},t.findLastMap=c.findLastMap,t.findLastIndex=c.findLastIndex,t.copy=function(n){return n.slice()},t.insertAt=function(n,r){return function(e){return n<0||n>e.length?i.none:i.some(t.unsafeInsertAt(n,r,e))}},t.updateAt=function(n,r){return t.modifyAt(n,(function(){return r}))},t.deleteAt=function(n){return function(r){return t.isOutOfBound(n,r)?i.none:i.some(t.unsafeDeleteAt(n,r))}},t.modifyAt=function(n,r){return function(e){return t.isOutOfBound(n,e)?i.none:i.some(t.unsafeUpdateAt(n,r(e[n]),e))}},t.reverse=function(n){return t.isEmpty(n)?[]:n.slice().reverse()},t.rights=function(n){for(var t=[],r=0;r<n.length;r++){var e=n[r];"Right"===e._tag&&t.push(e.right)}return t},t.lefts=function(n){for(var t=[],r=0;r<n.length;r++){var e=n[r];"Left"===e._tag&&t.push(e.left)}return t},t.sort=function(n){return function(r){return r.length<=1?t.copy(r):r.slice().sort(n.compare)}},t.zipWith=function(n,t,r){for(var e=[],u=Math.min(n.length,t.length),i=0;i<u;i++)e[i]=r(n[i],t[i]);return e},t.zip=function n(r,e){return void 0===e?function(t){return n(t,r)}:t.zipWith(r,e,(function(n,t){return[n,t]}))},t.unzip=function(n){for(var t=[],r=[],e=0;e<n.length;e++)t[e]=n[e][0],r[e]=n[e][1];return[t,r]},t.prependAll=function(n){var r=o.prependAll(n);return function(n){return t.isNonEmpty(n)?r(n):[]}},t.intersperse=function(n){var r=o.intersperse(n);return function(n){return t.isNonEmpty(n)?r(n):t.copy(n)}},t.rotate=function(n){var r=o.rotate(n);return function(n){return t.isNonEmpty(n)?r(n):t.copy(n)}},t.elem=c.elem,t.uniq=function(n){var r=o.uniq(n);return function(n){return t.isNonEmpty(n)?r(n):t.copy(n)}},t.sortBy=function(n){var r=o.sortBy(n);return function(n){return t.isNonEmpty(n)?r(n):t.copy(n)}},t.chop=function(n){var r=o.chop(n);return function(n){return t.isNonEmpty(n)?r(n):[]}},t.splitAt=function(n){return function(r){return n>=1&&t.isNonEmpty(r)?o.splitAt(n)(r):t.isEmpty(r)?[t.copy(r),[]]:[[],t.copy(r)]}},t.chunksOf=function(n){var r=o.chunksOf(n);return function(n){return t.isNonEmpty(n)?r(n):[]}},t.fromOptionK=function(n){return function(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];return t.fromOption(n.apply(void 0,r))}},t.comprehension=function(n,r,e){void 0===e&&(e=function(){return!0});var u=function(n,i){return t.isNonEmpty(i)?g.pipe(o.head(i),t.chain((function(r){return u(g.pipe(n,t.append(r)),o.tail(i))}))):e.apply(void 0,n)?[r.apply(void 0,n)]:[]};return u([],n)},t.concatW=function(n){return function(r){return t.isEmpty(r)?t.copy(n):t.isEmpty(n)?t.copy(r):r.concat(n)}},t.concat=t.concatW,t.union=a,t.intersection=s,t.difference=v;var d=function(n,r){return g.pipe(n,t.map(r))},l=function(n,r){return g.pipe(n,t.mapWithIndex(r))},p=function(n,r){return g.pipe(n,t.ap(r))},h=function(n,r){return g.pipe(n,t.chain(r))},m=function(n,r){return g.pipe(n,t.filter(r))},b=function(n,r){return g.pipe(n,t.filterMap(r))},y=function(n,r){return g.pipe(n,t.partition(r))},I=function(n,r){return g.pipe(n,t.partitionMap(r))},j=function(n,r){return g.pipe(n,t.partitionWithIndex(r))},x=function(n,r){return g.pipe(n,t.partitionMapWithIndex(r))},E=function(n,r){return g.pipe(n,t.alt(r))},A=function(n,r,e){return g.pipe(n,t.reduce(r,e))},N=function(n){var r=t.foldMap(n);return function(n,t){return g.pipe(n,r(t))}},W=function(n,r,e){return g.pipe(n,t.reduceRight(r,e))},P=function(n,r,e){return g.pipe(n,t.reduceWithIndex(r,e))},C=function(n){var r=t.foldMapWithIndex(n);return function(n,t){return g.pipe(n,r(t))}},q=function(n,r,e){return g.pipe(n,t.reduceRightWithIndex(r,e))},D=function(n,r){return g.pipe(n,t.filterMapWithIndex(r))},z=function(n,r){return g.pipe(n,t.filterWithIndex(r))},L=function(n,r){return g.pipe(n,t.extend(r))},F=function(n){var r=t.traverse(n);return function(n,t){return g.pipe(n,r(t))}},H=function(n){var r=t.traverseWithIndex(n);return function(n,t){return g.pipe(n,r(t))}},B=c._chainRecDepthFirst,G=c._chainRecBreadthFirst;t.of=o.of,t.zero=function(){return[]},t.map=function(n){return function(t){return t.map((function(t){return n(t)}))}},t.ap=function(n){return t.chain((function(r){return g.pipe(n,t.map(r))}))},t.chain=function(n){return function(r){return g.pipe(r,t.chainWithIndex((function(t,r){return n(r)})))}},t.flatten=t.chain(g.identity),t.mapWithIndex=function(n){return function(t){return t.map((function(t,r){return n(r,t)}))}},t.filterMapWithIndex=function(n){return function(t){for(var r=[],e=0;e<t.length;e++){var u=n(e,t[e]);i.isSome(u)&&r.push(u.value)}return r}},t.filterMap=function(n){return t.filterMapWithIndex((function(t,r){return n(r)}))},t.compact=t.filterMap(g.identity),t.separate=function(n){for(var t=[],r=[],e=0,u=n;e<u.length;e++){var i=u[e];"Left"===i._tag?t.push(i.left):r.push(i.right)}return T.separated(t,r)},t.filter=function(n){return function(t){return t.filter(n)}},t.partition=function(n){return t.partitionWithIndex((function(t,r){return n(r)}))},t.partitionWithIndex=function(n){return function(t){for(var r=[],e=[],u=0;u<t.length;u++){var i=t[u];n(u,i)?e.push(i):r.push(i)}return T.separated(r,e)}},t.partitionMap=function(n){return t.partitionMapWithIndex((function(t,r){return n(r)}))},t.partitionMapWithIndex=function(n){return function(t){for(var r=[],e=[],u=0;u<t.length;u++){var i=n(u,t[u]);"Left"===i._tag?r.push(i.left):e.push(i.right)}return T.separated(r,e)}},t.altW=function(n){return function(t){return t.concat(n())}},t.alt=t.altW,t.filterWithIndex=function(n){return function(t){return t.filter((function(t,r){return n(r,t)}))}},t.extend=function(n){return function(t){return t.map((function(r,e){return n(t.slice(e))}))}},t.duplicate=t.extend(g.identity),t.foldMap=c.foldMap,t.foldMapWithIndex=c.foldMapWithIndex,t.reduce=c.reduce,t.reduceWithIndex=c.reduceWithIndex,t.reduceRight=c.reduceRight,t.reduceRightWithIndex=c.reduceRightWithIndex,t.traverse=function(n){var r=t.traverseWithIndex(n);return function(n){return r((function(t,r){return n(r)}))}},t.sequence=function(n){return function(r){return A(r,n.of(t.zero()),(function(r,e){return n.ap(n.map(r,(function(n){return function(r){return g.pipe(n,t.append(r))}})),e)}))}},t.traverseWithIndex=function(n){return function(r){return t.reduceWithIndex(n.of(t.zero()),(function(e,u,i){return n.ap(n.map(u,(function(n){return function(r){return g.pipe(n,t.append(r))}})),r(e,i))}))}},t.wither=function(n){var t=V(n);return function(n){return function(r){return t(r,n)}}},t.wilt=function(n){var t=J(n);return function(n){return function(r){return t(r,n)}}},t.unfold=function(n,t){for(var r=[],e=n;;){var u=t(e);if(!i.isSome(u))break;var o=u.value,c=o[1];r.push(o[0]),e=c}return r},t.URI="Array",t.getShow=c.getShow,t.getSemigroup=function(){return{concat:function(n,t){return n.concat(t)}}},t.getMonoid=function(){return{concat:t.getSemigroup().concat,empty:[]}},t.getEq=c.getEq,t.getOrd=c.getOrd,t.getUnionSemigroup=function(n){var t=a(n);return{concat:function(n,r){return t(r)(n)}}},t.getUnionMonoid=function(n){return{concat:t.getUnionSemigroup(n).concat,empty:[]}},t.getIntersectionSemigroup=function(n){var t=s(n);return{concat:function(n,r){return t(r)(n)}}},t.getDifferenceMagma=function(n){var t=v(n);return{concat:function(n,r){return t(r)(n)}}},t.Functor={URI:t.URI,map:d},t.flap=O.flap(t.Functor),t.Pointed={URI:t.URI,of:t.of},t.FunctorWithIndex={URI:t.URI,map:d,mapWithIndex:l},t.Apply={URI:t.URI,map:d,ap:p},t.apFirst=R.apFirst(t.Apply),t.apSecond=R.apSecond(t.Apply),t.Applicative={URI:t.URI,map:d,ap:p,of:t.of},t.Chain={URI:t.URI,map:d,ap:p,chain:h},t.chainFirst=_.chainFirst(t.Chain),t.Monad={URI:t.URI,map:d,ap:p,of:t.of,chain:h},t.Unfoldable={URI:t.URI,unfold:t.unfold},t.Alt={URI:t.URI,map:d,alt:E},t.Zero={URI:t.URI,zero:t.zero},t.guard=k.guard(t.Zero,t.Pointed),t.Alternative={URI:t.URI,map:d,ap:p,of:t.of,alt:E,zero:t.zero},t.Extend={URI:t.URI,map:d,extend:L},t.Compactable={URI:t.URI,compact:t.compact,separate:t.separate},t.Filterable={URI:t.URI,map:d,compact:t.compact,separate:t.separate,filter:m,filterMap:b,partition:y,partitionMap:I},t.FilterableWithIndex={URI:t.URI,map:d,mapWithIndex:l,compact:t.compact,separate:t.separate,filter:m,filterMap:b,partition:y,partitionMap:I,partitionMapWithIndex:x,partitionWithIndex:j,filterMapWithIndex:D,filterWithIndex:z},t.Foldable={URI:t.URI,reduce:A,foldMap:N,reduceRight:W},t.FoldableWithIndex={URI:t.URI,reduce:A,foldMap:N,reduceRight:W,reduceWithIndex:P,foldMapWithIndex:C,reduceRightWithIndex:q},t.Traversable={URI:t.URI,map:d,reduce:A,foldMap:N,reduceRight:W,traverse:F,sequence:t.sequence},t.TraversableWithIndex={URI:t.URI,map:d,mapWithIndex:l,reduce:A,foldMap:N,reduceRight:W,reduceWithIndex:P,foldMapWithIndex:C,reduceRightWithIndex:q,traverse:F,sequence:t.sequence,traverseWithIndex:H};var V=S.witherDefault(t.Traversable,t.Compactable),J=S.wiltDefault(t.Traversable,t.Compactable);t.Witherable={URI:t.URI,map:d,compact:t.compact,separate:t.separate,filter:m,filterMap:b,partition:y,partitionMap:I,reduce:A,foldMap:N,reduceRight:W,traverse:F,sequence:t.sequence,wither:V,wilt:J},t.chainRecDepthFirst=c.chainRecDepthFirst,t.ChainRecDepthFirst={URI:t.URI,map:d,ap:p,chain:h,chainRec:B},t.chainRecBreadthFirst=c.chainRecBreadthFirst,t.ChainRecBreadthFirst={URI:t.URI,map:d,ap:p,chain:h,chainRec:G},t.filterE=S.filterE(t.Witherable),t.FromEither={URI:t.URI,fromEither:t.fromEither},t.fromEitherK=M.fromEitherK(t.FromEither),t.unsafeInsertAt=o.unsafeInsertAt,t.unsafeUpdateAt=function(n,r,e){return t.isNonEmpty(e)?o.unsafeUpdateAt(n,r,e):[]},t.unsafeDeleteAt=function(n,t){var r=t.slice();return r.splice(n,1),r},t.every=c.every,t.some=function(n){return function(t){return t.some(n)}},t.exists=t.some,t.Do=t.of(i.emptyRecord),t.bindTo=O.bindTo(t.Functor),t.bind=_.bind(t.Chain),t.apS=R.apS(t.Apply),t.range=o.range,t.empty=[],t.cons=o.cons,t.snoc=o.snoc,t.prependToAll=t.prependAll,t.array={URI:t.URI,compact:t.compact,separate:t.separate,map:d,ap:p,of:t.of,chain:h,filter:m,filterMap:b,partition:y,partitionMap:I,mapWithIndex:l,partitionMapWithIndex:x,partitionWithIndex:j,filterMapWithIndex:D,filterWithIndex:z,alt:E,zero:t.zero,unfold:t.unfold,reduce:A,foldMap:N,reduceRight:W,traverse:F,sequence:t.sequence,reduceWithIndex:P,foldMapWithIndex:C,reduceRightWithIndex:q,traverseWithIndex:H,extend:L,wither:V,wilt:J}}));const Ft=n=>({kind:"height",size:n}),Ht=N.contramap((n=>n.size))(Ct.Ord),Bt=Lt.sort(Ht),Gt=Lt.sort({equals:(n,t)=>n.kind===t.kind,compare:(n,t)=>n.kind===t.kind?0:"width"===n.kind?-1:1}),Vt=n=>t=>{const r=Bt(t),e=(n=>{const[t,r]=n;return t.size/r.size})(r),u=Object.assign(Object.assign({},r[0]),{size:n*e}),i=Object.assign(Object.assign({},r[1]),{size:n});return Gt([i,u])},Jt=n=>{const{naturalWidth:t,naturalHeight:r}=n;return[(e=t,{kind:"width",size:e}),Ft(r)];var e},$t=()=>{const n=document.createElement("canvas"),t=n.getContext("2d");return[n,t]},Kt=async n=>{const t=await fetch(n),r=await t.blob();return new File([r],"image",{type:r.type,lastModified:Date.now()})},Xt=n=>()=>new Promise((async t=>{const r=await fetch(n),e=await r.blob();t(new File([e],"image",{type:e.type,lastModified:Date.now()}))})),Zt=(n,t)=>n.naturalWidth>t?((n,t)=>{const r=Vt(n),[e,u]=$t(),i=Jt(t),[o,c]=r(i).map((n=>n.size)),f=new ImageData(o,c),a=(n=>{const{naturalWidth:t,naturalHeight:r}=n,[e,u]=$t();return e.width=t,e.height=r,u.drawImage(n,0,0),u.getImageData(0,0,t,r)})(t);return e.width=o,e.height=c,Pt.lanczos(a,f),u.putImageData(f,0,0),e.toDataURL()})(t,n):(n=>{const t=document.createElement("canvas"),{naturalWidth:r,naturalHeight:e}=n,u=t.getContext("2d");return t.width=r,t.height=e,u.drawImage(n,0,0,r,e),t.toDataURL()})(n),Yt=n=>i(n,ft,$((n=>({headers:n})))),{state:Qt,onChange:nr}=D({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:P.none,imageUrl:P.none,imageBounds:P.none,searchArea:P.none,resultsComponents:[],serverError:!1,loading:!1}),tr=async n=>{var t,r;Qt.results=n.value,Qt.filters=(r=lt(n.filters),Object.entries(r).map((([n,t])=>({name:n,filters:t})))),Qt.rectangleSearchForm=n.searchArea,Qt.resetCategoryLink=null===(t=n.links)||void 0===t?void 0:t.clearFilters,Qt.loading=!1},rr=n=>i(Yt(Qt.token),_n,An(pt(n))),er=async()=>{Qt.loading=!0,i(Ut(Qt.imageBounds,Qt.searchArea),P.map((async([n,t])=>{const r=(e=n,n=>({x:n.x/e.width,y:n.y/e.height,width:n.width/e.width,height:n.height/e.height}))(t);var e;const u={width:r.width,height:r.height,left:r.x,top:r.y};return await i(Yt(Qt.token),_n,An(jt(Qt.rectangleSearchForm,u)),Un(tr))()})))},ur=n=>{Qt.loading=!0;const t=(n=>{const t=new FormData;return t.append("image",n),t})(n);return i(at(ft(Qt.token),V(t)),$((([n,t])=>({headers:n,body:t}))),_n,En(vt),Un((n=>(tr(n),(async n=>{Qt.objectDetectionInProgress=!0;const t={kind:"server",inner:"Can not get a link for objects detection"};var r,e,u;await i((r=n,e="detectedObjects",i(r.links,on,(u=n=>on(n[e]),function(n){return un(n)?tn:u(n.value)}))),Tn((()=>t)),En(rr),Un((n=>Qt.detectedObjects=lt(n))))(),Qt.objectDetectionInProgress=!1})(n),Qt.loading=!1,n))),Mn((n=>(Qt.serverError=!0,Qt.loading=!1,n))))},ir=Qt;nr("activeIonLink",(async n=>{Qt.loading=!0;const t=n||Qt.resetCategoryLink;await i(Yt(Qt.token),_n,An(pt(t)),Un(tr),Mn((n=>({kind:"network error",inner:n}))))()})),nr("searchArea",(n=>{i(n,P.map((n=>{var t;Qt.cropperHandlers=[{position:l(t=n),direction:b.NorthWest},{position:m.concat(l(t),{x:t.width,y:0}),direction:b.NorthEast},{position:m.concat(l(t),{x:0,y:t.height}),direction:b.SouthWest},{position:m.concat(l(t),{x:t.width,y:t.height}),direction:b.SouthEast}]})))})),nr("serverError",(()=>{Qt.loading=!1}));const or=n=>{ir.image=P.some(n),ir.imageUrl=P.some(n.src)},cr=async n=>{const t=(n=>g.pipe(n,P.fromNullable,Cn.fromOption((()=>At)),Cn.chain(Et)))(n),r=(500,n=>g.pipe(n,Nt,Fn.map((n=>Zt(n,500))),Fn.chain(Xt)));const e=i(t,_n,Sn(r)),u=await i(e,En(ur))();return i(at(u,t),$((([n,t])=>(async(n,t)=>{const r={image:await(async n=>({name:n.name,mediaType:n.type,value:await _t(n)}))(t)},e=n.uploadHighResolutionImage;await i(Yt(Qt.token),_n,An(jt(e,r)))()})(n,t)))),await i(e,Sn(Nt),Un(or))(),u};var fr,ar=new Uint8Array(16);function sr(){if(!fr&&!(fr="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return fr(ar)}const vr=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function dr(n){return"string"==typeof n&&vr.test(n)}for(var lr=[],pr=0;pr<256;++pr)lr.push((pr+256).toString(16).substr(1));function hr(n,t,r){var e=(n=n||{}).random||(n.rng||sr)();if(e[6]=15&e[6]|64,e[8]=63&e[8]|128,t){r=r||0;for(var u=0;u<16;++u)t[r+u]=e[u];return t}return function(n){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=(lr[n[t+0]]+lr[n[t+1]]+lr[n[t+2]]+lr[n[t+3]]+"-"+lr[n[t+4]]+lr[n[t+5]]+"-"+lr[n[t+6]]+lr[n[t+7]]+"-"+lr[n[t+8]]+lr[n[t+9]]+"-"+lr[n[t+10]]+lr[n[t+11]]+lr[n[t+12]]+lr[n[t+13]]+lr[n[t+14]]+lr[n[t+15]]).toLowerCase();if(!dr(r))throw TypeError("Stringified UUID is invalid");return r}(e)}var mr=function(n,t){if(t=t.split(":")[0],!(n=+n))return!1;switch(t){case"http":case"ws":return 80!==n;case"https":case"wss":return 443!==n;case"ftp":return 21!==n;case"gopher":return 70!==n;case"file":return!1}return 0!==n},br=Object.prototype.hasOwnProperty;function yr(n){try{return decodeURIComponent(n.replace(/\+/g," "))}catch(n){return null}}function wr(n){try{return encodeURIComponent(n)}catch(n){return null}}var Ir={stringify:function(n,t){t=t||"";var r,e,u=[];for(e in"string"!=typeof t&&(t="?"),n)if(br.call(n,e)){if((r=n[e])||null!=r&&!isNaN(r)||(r=""),e=wr(e),r=wr(r),null===e||null===r)continue;u.push(e+"="+r)}return u.length?t+u.join("&"):""},parse:function(n){for(var t,r=/([^=?#&]+)=?([^&]*)/g,e={};t=r.exec(n);){var u=yr(t[1]),i=yr(t[2]);null===u||null===i||u in e||(e[u]=i)}return e}},gr=/^[\x00-\x20\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/,Rr=/[\n\r\t]/g,Or=/^[A-Za-z][A-Za-z0-9+-.]*:\/\//,jr=/:\d+$/,_r=/^([a-z][a-z0-9.+-]*:)?(\/\/)?([\\/]+)?([\S\s]*)/i,Ur=/^[a-zA-Z]:/;function Mr(n){return(n||"").toString().replace(gr,"")}var xr=[["#","hash"],["?","query"],function(n,t){return Nr(t.protocol)?n.replace(/\\/g,"/"):n},["/","pathname"],["@","auth",1],[NaN,"host",void 0,1,1],[/:(\d*)$/,"port",void 0,1],[NaN,"hostname",void 0,1,1]],Er={hash:1,query:1};function Ar(n){var t;t="undefined"!=typeof window?window:void 0!==w?w:"undefined"!=typeof self?self:{};var r,e={},u=typeof(n=n||t.location||{});if("blob:"===n.protocol)e=new Tr(unescape(n.pathname),{});else if("string"===u)for(r in e=new Tr(n,{}),Er)delete e[r];else if("object"===u){for(r in n)r in Er||(e[r]=n[r]);void 0===e.slashes&&(e.slashes=Or.test(n.href))}return e}function Nr(n){return"file:"===n||"ftp:"===n||"http:"===n||"https:"===n||"ws:"===n||"wss:"===n}function Wr(n,t){n=(n=Mr(n)).replace(Rr,""),t=t||{};var r,e=_r.exec(n),u=e[1]?e[1].toLowerCase():"",i=!!e[2],o=!!e[3],c=0;return i?o?(r=e[2]+e[3]+e[4],c=e[2].length+e[3].length):(r=e[2]+e[4],c=e[2].length):o?(r=e[3]+e[4],c=e[3].length):r=e[4],"file:"===u?c>=2&&(r=r.slice(2)):Nr(u)?r=e[4]:u?i&&(r=r.slice(2)):c>=2&&Nr(t.protocol)&&(r=e[4]),{protocol:u,slashes:i||Nr(u),slashesCount:c,rest:r}}function Tr(n,t,r){if(n=(n=Mr(n)).replace(Rr,""),!(this instanceof Tr))return new Tr(n,t,r);var e,u,i,o,c,f,a=xr.slice(),s=typeof t,v=this,d=0;for("object"!==s&&"string"!==s&&(r=t,t=null),r&&"function"!=typeof r&&(r=Ir.parse),e=!(u=Wr(n||"",t=Ar(t))).protocol&&!u.slashes,v.slashes=u.slashes||e&&t.slashes,v.protocol=u.protocol||t.protocol||"",n=u.rest,("file:"===u.protocol&&(2!==u.slashesCount||Ur.test(n))||!u.slashes&&(u.protocol||u.slashesCount<2||!Nr(v.protocol)))&&(a[3]=[/(.*)/,"pathname"]);d<a.length;d++)"function"!=typeof(o=a[d])?(f=o[1],(i=o[0])!=i?v[f]=n:"string"==typeof i?~(c="@"===i?n.lastIndexOf(i):n.indexOf(i))&&("number"==typeof o[2]?(v[f]=n.slice(0,c),n=n.slice(c+o[2])):(v[f]=n.slice(c),n=n.slice(0,c))):(c=i.exec(n))&&(v[f]=c[1],n=n.slice(0,c.index)),v[f]=v[f]||e&&o[3]&&t[f]||"",o[4]&&(v[f]=v[f].toLowerCase())):n=o(n,v);r&&(v.query=r(v.query)),e&&t.slashes&&"/"!==v.pathname.charAt(0)&&(""!==v.pathname||""!==t.pathname)&&(v.pathname=function(n,t){if(""===n)return t;for(var r=(t||"/").split("/").slice(0,-1).concat(n.split("/")),e=r.length,u=r[e-1],i=!1,o=0;e--;)"."===r[e]?r.splice(e,1):".."===r[e]?(r.splice(e,1),o++):o&&(0===e&&(i=!0),r.splice(e,1),o--);return i&&r.unshift(""),"."!==u&&".."!==u||r.push(""),r.join("/")}(v.pathname,t.pathname)),"/"!==v.pathname.charAt(0)&&Nr(v.protocol)&&(v.pathname="/"+v.pathname),mr(v.port,v.protocol)||(v.host=v.hostname,v.port=""),v.username=v.password="",v.auth&&(~(c=v.auth.indexOf(":"))?(v.username=v.auth.slice(0,c),v.username=encodeURIComponent(decodeURIComponent(v.username)),v.password=v.auth.slice(c+1),v.password=encodeURIComponent(decodeURIComponent(v.password))):v.username=encodeURIComponent(decodeURIComponent(v.auth)),v.auth=v.password?v.username+":"+v.password:v.username),v.origin="file:"!==v.protocol&&Nr(v.protocol)&&v.host?v.protocol+"//"+v.host:"null",v.href=v.toString()}Tr.prototype={set:function(n,t,r){var e=this;switch(n){case"query":"string"==typeof t&&t.length&&(t=(r||Ir.parse)(t)),e[n]=t;break;case"port":e[n]=t,mr(t,e.protocol)?t&&(e.host=e.hostname+":"+t):(e.host=e.hostname,e[n]="");break;case"hostname":e[n]=t,e.port&&(t+=":"+e.port),e.host=t;break;case"host":e[n]=t,jr.test(t)?(t=t.split(":"),e.port=t.pop(),e.hostname=t.join(":")):(e.hostname=t,e.port="");break;case"protocol":e.protocol=t.toLowerCase(),e.slashes=!r;break;case"pathname":case"hash":if(t){var u="pathname"===n?"/":"#";e[n]=t.charAt(0)!==u?u+t:t}else e[n]=t;break;case"username":case"password":e[n]=encodeURIComponent(t);break;case"auth":var i=t.indexOf(":");~i?(e.username=t.slice(0,i),e.username=encodeURIComponent(decodeURIComponent(e.username)),e.password=t.slice(i+1),e.password=encodeURIComponent(decodeURIComponent(e.password))):e.username=encodeURIComponent(decodeURIComponent(t))}for(var o=0;o<xr.length;o++){var c=xr[o];c[4]&&(e[c[1]]=e[c[1]].toLowerCase())}return e.auth=e.password?e.username+":"+e.password:e.username,e.origin="file:"!==e.protocol&&Nr(e.protocol)&&e.host?e.protocol+"//"+e.host:"null",e.href=e.toString(),e},toString:function(n){n&&"function"==typeof n||(n=Ir.stringify);var t,r=this,e=r.host,u=r.protocol;u&&":"!==u.charAt(u.length-1)&&(u+=":");var i=u+(r.protocol&&r.slashes||Nr(r.protocol)?"//":"");return r.username?(i+=r.username,r.password&&(i+=":"+r.password),i+="@"):r.password?(i+=":"+r.password,i+="@"):"file:"!==r.protocol&&Nr(r.protocol)&&!e&&"/"!==r.pathname&&(i+="@"),(":"===e[e.length-1]||jr.test(r.hostname)&&!r.port)&&(e+=":"),i+=e+r.pathname,(t="object"==typeof r.query?n(r.query):r.query)&&(i+="?"!==t.charAt(0)?"?"+t:t),r.hash&&(i+=r.hash),i}},Tr.extractProtocol=Wr,Tr.location=Ar,Tr.trimLeft=Mr,Tr.qs=Ir;var Sr=Tr,kr=I((function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.map=t.mergeMap=t.of=t.from=t.Observable=void 0;var r=function(){function n(n){this.promise=n}return n.prototype.toPromise=function(){return this.promise},n.prototype.pipe=function(t){return new n(this.promise.then(t))},n}();t.Observable=r,t.from=function(n){return new r(n)},t.of=function(n){return new r(Promise.resolve(n))},t.mergeMap=function(n){return function(t){return n(t).toPromise()}},t.map=function(n){return n}})),Pr="undefined"!=typeof globalThis&&globalThis||"undefined"!=typeof self&&self||void 0!==Pr&&Pr,Cr="URLSearchParams"in Pr,qr="Symbol"in Pr&&"iterator"in Symbol,Dr="FileReader"in Pr&&"Blob"in Pr&&function(){try{return new Blob,!0}catch(n){return!1}}(),zr="FormData"in Pr,Lr="ArrayBuffer"in Pr;if(Lr)var Fr=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],Hr=ArrayBuffer.isView||function(n){return n&&Fr.indexOf(Object.prototype.toString.call(n))>-1};function Br(n){if("string"!=typeof n&&(n=String(n)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(n)||""===n)throw new TypeError('Invalid character in header field name: "'+n+'"');return n.toLowerCase()}function Gr(n){return"string"!=typeof n&&(n=String(n)),n}function Vr(n){var t={next:function(){var t=n.shift();return{done:void 0===t,value:t}}};return qr&&(t[Symbol.iterator]=function(){return t}),t}function Jr(n){this.map={},n instanceof Jr?n.forEach((function(n,t){this.append(t,n)}),this):Array.isArray(n)?n.forEach((function(n){this.append(n[0],n[1])}),this):n&&Object.getOwnPropertyNames(n).forEach((function(t){this.append(t,n[t])}),this)}function $r(n){if(n.bodyUsed)return Promise.reject(new TypeError("Already read"));n.bodyUsed=!0}function Kr(n){return new Promise((function(t,r){n.onload=function(){t(n.result)},n.onerror=function(){r(n.error)}}))}function Xr(n){var t=new FileReader,r=Kr(t);return t.readAsArrayBuffer(n),r}function Zr(n){if(n.slice)return n.slice(0);var t=new Uint8Array(n.byteLength);return t.set(new Uint8Array(n)),t.buffer}function Yr(){return this.bodyUsed=!1,this._initBody=function(n){var t;this.bodyUsed=this.bodyUsed,this._bodyInit=n,n?"string"==typeof n?this._bodyText=n:Dr&&Blob.prototype.isPrototypeOf(n)?this._bodyBlob=n:zr&&FormData.prototype.isPrototypeOf(n)?this._bodyFormData=n:Cr&&URLSearchParams.prototype.isPrototypeOf(n)?this._bodyText=n.toString():Lr&&Dr&&(t=n)&&DataView.prototype.isPrototypeOf(t)?(this._bodyArrayBuffer=Zr(n.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):Lr&&(ArrayBuffer.prototype.isPrototypeOf(n)||Hr(n))?this._bodyArrayBuffer=Zr(n):this._bodyText=n=Object.prototype.toString.call(n):this._bodyText="",this.headers.get("content-type")||("string"==typeof n?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):Cr&&URLSearchParams.prototype.isPrototypeOf(n)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},Dr&&(this.blob=function(){var n=$r(this);if(n)return n;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?$r(this)||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer)):this.blob().then(Xr)}),this.text=function(){var n,t,r,e=$r(this);if(e)return e;if(this._bodyBlob)return n=this._bodyBlob,r=Kr(t=new FileReader),t.readAsText(n),r;if(this._bodyArrayBuffer)return Promise.resolve(function(n){for(var t=new Uint8Array(n),r=new Array(t.length),e=0;e<t.length;e++)r[e]=String.fromCharCode(t[e]);return r.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},zr&&(this.formData=function(){return this.text().then(te)}),this.json=function(){return this.text().then(JSON.parse)},this}Jr.prototype.append=function(n,t){n=Br(n),t=Gr(t);var r=this.map[n];this.map[n]=r?r+", "+t:t},Jr.prototype.delete=function(n){delete this.map[Br(n)]},Jr.prototype.get=function(n){return n=Br(n),this.has(n)?this.map[n]:null},Jr.prototype.has=function(n){return this.map.hasOwnProperty(Br(n))},Jr.prototype.set=function(n,t){this.map[Br(n)]=Gr(t)},Jr.prototype.forEach=function(n,t){for(var r in this.map)this.map.hasOwnProperty(r)&&n.call(t,this.map[r],r,this)},Jr.prototype.keys=function(){var n=[];return this.forEach((function(t,r){n.push(r)})),Vr(n)},Jr.prototype.values=function(){var n=[];return this.forEach((function(t){n.push(t)})),Vr(n)},Jr.prototype.entries=function(){var n=[];return this.forEach((function(t,r){n.push([r,t])})),Vr(n)},qr&&(Jr.prototype[Symbol.iterator]=Jr.prototype.entries);var Qr=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function ne(n,t){if(!(this instanceof ne))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');var r,e,u=(t=t||{}).body;if(n instanceof ne){if(n.bodyUsed)throw new TypeError("Already read");this.url=n.url,this.credentials=n.credentials,t.headers||(this.headers=new Jr(n.headers)),this.method=n.method,this.mode=n.mode,this.signal=n.signal,u||null==n._bodyInit||(u=n._bodyInit,n.bodyUsed=!0)}else this.url=String(n);if(this.credentials=t.credentials||this.credentials||"same-origin",!t.headers&&this.headers||(this.headers=new Jr(t.headers)),this.method=(e=(r=t.method||this.method||"GET").toUpperCase(),Qr.indexOf(e)>-1?e:r),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&u)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(u),!("GET"!==this.method&&"HEAD"!==this.method||"no-store"!==t.cache&&"no-cache"!==t.cache)){var i=/([?&])_=[^&]*/;i.test(this.url)?this.url=this.url.replace(i,"$1_="+(new Date).getTime()):this.url+=(/\?/.test(this.url)?"&":"?")+"_="+(new Date).getTime()}}function te(n){var t=new FormData;return n.trim().split("&").forEach((function(n){if(n){var r=n.split("="),e=r.shift().replace(/\+/g," "),u=r.join("=").replace(/\+/g," ");t.append(decodeURIComponent(e),decodeURIComponent(u))}})),t}function re(n,t){if(!(this instanceof re))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.ok=this.status>=200&&this.status<300,this.statusText=void 0===t.statusText?"":""+t.statusText,this.headers=new Jr(t.headers),this.url=t.url||"",this._initBody(n)}ne.prototype.clone=function(){return new ne(this,{body:this._bodyInit})},Yr.call(ne.prototype),Yr.call(re.prototype),re.prototype.clone=function(){return new re(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new Jr(this.headers),url:this.url})},re.error=function(){var n=new re(null,{status:0,statusText:""});return n.type="error",n};var ee=[301,302,303,307,308];re.redirect=function(n,t){if(-1===ee.indexOf(t))throw new RangeError("Invalid status code");return new re(null,{status:t,headers:{location:n}})};var ue=Pr.DOMException;try{new ue}catch(n){(ue=function(n,t){this.message=n,this.name=t;var r=Error(n);this.stack=r.stack}).prototype=Object.create(Error.prototype),ue.prototype.constructor=ue}function ie(n,t){return new Promise((function(r,e){var u=new ne(n,t);if(u.signal&&u.signal.aborted)return e(new ue("Aborted","AbortError"));var i=new XMLHttpRequest;function o(){i.abort()}i.onload=function(){var n,t,e={status:i.status,statusText:i.statusText,headers:(n=i.getAllResponseHeaders()||"",t=new Jr,n.replace(/\r?\n[\t ]+/g," ").split("\r").map((function(n){return 0===n.indexOf("\n")?n.substr(1,n.length):n})).forEach((function(n){var r=n.split(":"),e=r.shift().trim();if(e){var u=r.join(":").trim();t.append(e,u)}})),t)};e.url="responseURL"in i?i.responseURL:e.headers.get("X-Request-URL");var u="response"in i?i.response:i.responseText;setTimeout((function(){r(new re(u,e))}),0)},i.onerror=function(){setTimeout((function(){e(new TypeError("Network request failed"))}),0)},i.ontimeout=function(){setTimeout((function(){e(new TypeError("Network request failed"))}),0)},i.onabort=function(){setTimeout((function(){e(new ue("Aborted","AbortError"))}),0)},i.open(u.method,function(n){try{return""===n&&Pr.location.href?Pr.location.href:n}catch(t){return n}}(u.url),!0),"include"===u.credentials?i.withCredentials=!0:"omit"===u.credentials&&(i.withCredentials=!1),"responseType"in i&&(Dr?i.responseType="blob":Lr&&u.headers.get("Content-Type")&&-1!==u.headers.get("Content-Type").indexOf("application/octet-stream")&&(i.responseType="arraybuffer")),!t||"object"!=typeof t.headers||t.headers instanceof Jr?u.headers.forEach((function(n,t){i.setRequestHeader(t,n)})):Object.getOwnPropertyNames(t.headers).forEach((function(n){i.setRequestHeader(n,Gr(t.headers[n]))})),u.signal&&(u.signal.addEventListener("abort",o),i.onreadystatechange=function(){4===i.readyState&&u.signal.removeEventListener("abort",o)}),i.send(void 0===u._bodyInit?null:u._bodyInit)}))}ie.polyfill=!0,Pr.fetch||(Pr.fetch=ie,Pr.Headers=Jr,Pr.Request=ne,Pr.Response=re);var oe=I((function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.IsomorphicFetchHttpLibrary=void 0;var r=function(){function n(){}return n.prototype.send=function(n){var t=n.getHttpMethod().toString(),r=n.getBody(),e=fetch(n.getUrl(),{method:t,body:r,headers:n.getHeaders(),credentials:"same-origin"}).then((function(n){var t={};n.headers.forEach((function(n,r){t[r]=n}));var r={text:function(){return n.text()},binary:function(){return n.blob()}};return new ce.ResponseContext(n.status,t,r)}));return(0,kr.from)(e)},n}();t.IsomorphicFetchHttpLibrary=r})),ce=I((function(n,t){var r,e,u=w&&w.__extends||(r=function(n,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])})(n,t)},function(n,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function e(){this.constructor=n}r(n,t),n.prototype=null===t?Object.create(t):(e.prototype=t.prototype,new e)}),i=w&&w.__createBinding||(Object.create?function(n,t,r,e){void 0===e&&(e=r);var u=Object.getOwnPropertyDescriptor(t,r);u&&!("get"in u?!t.__esModule:u.writable||u.configurable)||(u={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(n,e,u)}:function(n,t,r,e){void 0===e&&(e=r),n[e]=t[r]}),o=w&&w.__exportStar||function(n,t){for(var r in n)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,n,r)},c=w&&w.__awaiter||function(n,t,r,e){return new(r||(r=Promise))((function(u,i){function o(n){try{f(e.next(n))}catch(n){i(n)}}function c(n){try{f(e.throw(n))}catch(n){i(n)}}function f(n){var t;n.done?u(n.value):(t=n.value,t instanceof r?t:new r((function(n){n(t)}))).then(o,c)}f((e=e.apply(n,t||[])).next())}))},f=w&&w.__generator||function(n,t){var r,e,u,i,o={label:0,sent:function(){if(1&u[0])throw u[1];return u[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(i){return function(c){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;o;)try{if(r=1,e&&(u=2&i[0]?e.return:i[0]?e.throw||((u=e.return)&&u.call(e),0):e.next)&&!(u=u.call(e,i[1])).done)return u;switch(e=0,u&&(i=[2&i[0],u.value]),i[0]){case 0:case 1:u=i;break;case 4:return o.label++,{value:i[1],done:!1};case 5:o.label++,e=i[1],i=[0];continue;case 7:i=o.ops.pop(),o.trys.pop();continue;default:if(!((u=(u=o.trys).length>0&&u[u.length-1])||6!==i[0]&&2!==i[0])){o=0;continue}if(3===i[0]&&(!u||i[1]>u[0]&&i[1]<u[3])){o.label=i[1];break}if(6===i[0]&&o.label<u[1]){o.label=u[1],u=i;break}if(u&&o.label<u[2]){o.label=u[2],o.ops.push(i);break}u[2]&&o.ops.pop(),o.trys.pop();continue}i=t.call(n,o)}catch(n){i=[6,n],e=0}finally{r=u=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,c])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.wrapHttpLibrary=t.ResponseContext=t.SelfDecodingBody=t.RequestContext=t.HttpException=t.HttpMethod=void 0,o(oe,t),(e=t.HttpMethod||(t.HttpMethod={})).GET="GET",e.HEAD="HEAD",e.POST="POST",e.PUT="PUT",e.DELETE="DELETE",e.CONNECT="CONNECT",e.OPTIONS="OPTIONS",e.TRACE="TRACE",e.PATCH="PATCH";var a=function(n){function t(t){return n.call(this,t)||this}return u(t,n),t}(Error);t.HttpException=a;var s=function(){function n(n,t){this.httpMethod=t,this.headers={},this.body=void 0,this.url=new Sr(n,!0)}return n.prototype.getUrl=function(){return this.url.toString()},n.prototype.setUrl=function(n){this.url=new Sr(n,!0)},n.prototype.setBody=function(n){this.body=n},n.prototype.getHttpMethod=function(){return this.httpMethod},n.prototype.getHeaders=function(){return this.headers},n.prototype.getBody=function(){return this.body},n.prototype.setQueryParam=function(n,t){var r=this.url.query;r[n]=t,this.url.set("query",r)},n.prototype.addCookie=function(n,t){this.headers.Cookie||(this.headers.Cookie=""),this.headers.Cookie+=n+"="+t+"; "},n.prototype.setHeaderParam=function(n,t){this.headers[n]=t},n}();t.RequestContext=s;var v=function(){function n(n){this.dataSource=n}return n.prototype.binary=function(){return this.dataSource},n.prototype.text=function(){return c(this,void 0,void 0,(function(){var n;return f(this,(function(t){switch(t.label){case 0:return[4,this.dataSource];case 1:return(n=t.sent()).text?[2,n.text()]:[2,new Promise((function(t,r){var e=new FileReader;e.addEventListener("load",(function(){return t(e.result)})),e.addEventListener("error",(function(){return r(e.error)})),e.readAsText(n)}))]}}))}))},n}();t.SelfDecodingBody=v;var d=function(){function n(n,t,r){this.httpStatusCode=n,this.headers=t,this.body=r}return n.prototype.getParsedHeader=function(n){var t={};if(!this.headers[n])return t;for(var r=0,e=this.headers[n].split(";");r<e.length;r++){var u=e[r].split("=",2),i=u[0],o=u[1];i=i.toLowerCase().trim(),void 0===o?t[""]=i:((o=o.trim()).startsWith('"')&&o.endsWith('"')&&(o=o.substring(1,o.length-1)),t[i]=o)}return t},n.prototype.getBodyAsFile=function(){return c(this,void 0,void 0,(function(){var n,t,r;return f(this,(function(e){switch(e.label){case 0:return[4,this.body.binary()];case 1:n=e.sent(),t=this.getParsedHeader("content-disposition").filename||"",r=this.headers["content-type"]||"";try{return[2,new File([n],t,{type:r})]}catch(e){return[2,Object.assign(n,{name:t,type:r})]}return[2]}}))}))},n.prototype.getBodyAsAny=function(){try{return this.body.text()}catch(n){}try{return this.body.binary()}catch(n){}return Promise.resolve(void 0)},n}();t.ResponseContext=d,t.wrapHttpLibrary=function(n){return{send:function(t){return(0,kr.from)(n.send(t))}}}})),fe=I((function(n,t){var r=w&&w.__awaiter||function(n,t,r,e){return new(r||(r=Promise))((function(u,i){function o(n){try{f(e.next(n))}catch(n){i(n)}}function c(n){try{f(e.throw(n))}catch(n){i(n)}}function f(n){var t;n.done?u(n.value):(t=n.value,t instanceof r?t:new r((function(n){n(t)}))).then(o,c)}f((e=e.apply(n,t||[])).next())}))},e=w&&w.__generator||function(n,t){var r,e,u,i,o={label:0,sent:function(){if(1&u[0])throw u[1];return u[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(i){return function(c){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;o;)try{if(r=1,e&&(u=2&i[0]?e.return:i[0]?e.throw||((u=e.return)&&u.call(e),0):e.next)&&!(u=u.call(e,i[1])).done)return u;switch(e=0,u&&(i=[2&i[0],u.value]),i[0]){case 0:case 1:u=i;break;case 4:return o.label++,{value:i[1],done:!1};case 5:o.label++,e=i[1],i=[0];continue;case 7:i=o.ops.pop(),o.trys.pop();continue;default:if(!((u=(u=o.trys).length>0&&u[u.length-1])||6!==i[0]&&2!==i[0])){o=0;continue}if(3===i[0]&&(!u||i[1]>u[0]&&i[1]<u[3])){o.label=i[1];break}if(6===i[0]&&o.label<u[1]){o.label=u[1],u=i;break}if(u&&o.label<u[2]){o.label=u[2],o.ops.push(i);break}u[2]&&o.ops.pop(),o.trys.pop();continue}i=t.call(n,o)}catch(n){i=[6,n],e=0}finally{r=u=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,c])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.configureAuthMethods=t.BearerAuthAuthentication=void 0;var u=function(){function n(n){this.tokenProvider=n}return n.prototype.getName=function(){return"bearerAuth"},n.prototype.applySecurityAuthentication=function(n){return r(this,void 0,void 0,(function(){var t,r,u,i;return e(this,(function(e){switch(e.label){case 0:return r=(t=n).setHeaderParam,u=["Authorization"],i="Bearer ",[4,this.tokenProvider.getToken()];case 1:return r.apply(t,u.concat([i+e.sent()])),[2]}}))}))},n}();t.BearerAuthAuthentication=u,t.configureAuthMethods=function(n){var t={};return n?(t.default=n.default,n.bearerAuth&&(t.bearerAuth=new u(n.bearerAuth.tokenProvider)),t):t}})),ae=I((function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.Acknowledgement=void 0;var r=function(){function n(){}return n.getAttributeTypeMap=function(){return n.attributeTypeMap},n.discriminator=void 0,n.attributeTypeMap=[{name:"message",baseName:"message",type:"string",format:""}],n}();t.Acknowledgement=r})),se=I((function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.Config=void 0;var r=function(){function n(){}return n.getAttributeTypeMap=function(){return n.attributeTypeMap},n.discriminator=void 0,n.attributeTypeMap=[{name:"track",baseName:"track",type:"boolean",format:""}],n}();t.Config=r})),ve=I((function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.ErrorObject=void 0;var r=function(){function n(){}return n.getAttributeTypeMap=function(){return n.attributeTypeMap},n.discriminator=void 0,n.attributeTypeMap=[{name:"domain",baseName:"domain",type:"string",format:""},{name:"reason",baseName:"reason",type:"string",format:""},{name:"message",baseName:"message",type:"string",format:""},{name:"location",baseName:"location",type:"string",format:""},{name:"location_type",baseName:"location_type",type:"string",format:""},{name:"extended_help",baseName:"extended_help",type:"string",format:""},{name:"send_report",baseName:"send_report",type:"string",format:""}],n}();t.ErrorObject=r})),de=I((function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.ErrorResponse=void 0;var r=function(){function n(){}return n.getAttributeTypeMap=function(){return n.attributeTypeMap},n.discriminator=void 0,n.attributeTypeMap=[{name:"code",baseName:"code",type:"number",format:""},{name:"message",baseName:"message",type:"string",format:""},{name:"errors",baseName:"errors",type:"Array<ErrorObject>",format:""}],n}();t.ErrorResponse=r})),le=I((function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.Event=void 0;var r=function(){function n(){this.typ="Event"}return n.getAttributeTypeMap=function(){return n.attributeTypeMap},n.discriminator="typ",n.attributeTypeMap=[{name:"session_id",baseName:"session_id",type:"string",format:""},{name:"typ",baseName:"typ",type:"string",format:""}],n}();t.Event=r})),pe=I((function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.EventConfirmation=void 0;var r=function(){function n(){}return n.getAttributeTypeMap=function(){return n.attributeTypeMap},n.discriminator=void 0,n.attributeTypeMap=[{name:"status",baseName:"status",type:"EventConfirmationStatusEnum",format:""}],n}();t.EventConfirmation=r})),he=I((function(n,t){Object.defineProperty(t,"__esModule",{value:!0})})),me=I((function(n,t){var r,e=w&&w.__extends||(r=function(n,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])})(n,t)},function(n,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function e(){this.constructor=n}r(n,t),n.prototype=null===t?Object.create(t):(e.prototype=t.prototype,new e)});Object.defineProperty(t,"__esModule",{value:!0}),t.FilterEvent=void 0;var u=function(n){function t(){var t=n.call(this)||this;return t.typ="FilterEvent",t}return e(t,n),t.getAttributeTypeMap=function(){return n.getAttributeTypeMap.call(this).concat(t.attributeTypeMap)},t.discriminator=void 0,t.attributeTypeMap=[{name:"widget",baseName:"widget",type:"Widget",format:""},{name:"action",baseName:"action",type:"FilterAction",format:""},{name:"kind",baseName:"kind",type:"FilterKind",format:""}],t}(le.Event);t.FilterEvent=u})),be=I((function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.FilterEventAllOf=void 0;var r=function(){function n(){}return n.getAttributeTypeMap=function(){return n.attributeTypeMap},n.discriminator=void 0,n.attributeTypeMap=[{name:"widget",baseName:"widget",type:"Widget",format:""},{name:"action",baseName:"action",type:"FilterAction",format:""},{name:"kind",baseName:"kind",type:"FilterKind",format:""}],n}();t.FilterEventAllOf=r})),ye=I((function(n,t){Object.defineProperty(t,"__esModule",{value:!0})})),we=I((function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.Histogram=void 0;var r=function(){function n(){}return n.getAttributeTypeMap=function(){return n.attributeTypeMap},n.discriminator=void 0,n.attributeTypeMap=[{name:"summary",baseName:"summary",type:"HistogramSummary",format:""},{name:"intervals",baseName:"intervals",type:"Array<HistogramItem>",format:""}],n}();t.Histogram=r})),Ie=I((function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.HistogramItem=void 0;var r=function(){function n(){}return n.getAttributeTypeMap=function(){return n.attributeTypeMap},n.discriminator=void 0,n.attributeTypeMap=[{name:"interval",baseName:"interval",type:"Interval",format:""},{name:"frequency",baseName:"frequency",type:"number",format:""}],n}();t.HistogramItem=r})),ge=I((function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.HistogramSummary=void 0;var r=function(){function n(){}return n.getAttributeTypeMap=function(){return n.attributeTypeMap},n.discriminator=void 0,n.attributeTypeMap=[{name:"interval",baseName:"interval",type:"Interval",format:""},{name:"frequency",baseName:"frequency",type:"number",format:""}],n}();t.HistogramSummary=r})),Re=I((function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.InteractionReport=void 0;var r=function(){function n(){}return n.getAttributeTypeMap=function(){return n.attributeTypeMap},n.discriminator=void 0,n.attributeTypeMap=[{name:"interactions",baseName:"interactions",type:"Histogram",format:""},{name:"product_views",baseName:"product_views",type:"Histogram",format:""},{name:"product_clicks",baseName:"product_clicks",type:"Histogram",format:""},{name:"click_through_rate",baseName:"click_through_rate",type:"Rate",format:""}],n}();t.InteractionReport=r})),Oe=I((function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.Interval=void 0;var r=function(){function n(){}return n.getAttributeTypeMap=function(){return n.attributeTypeMap},n.discriminator=void 0,n.attributeTypeMap=[{name:"start_datetime",baseName:"start_datetime",type:"Date",format:"date-time"},{name:"end_datetime",baseName:"end_datetime",type:"Date",format:"date-time"}],n}();t.Interval=r})),je=I((function(n,t){var r,e=w&&w.__extends||(r=function(n,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])})(n,t)},function(n,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function e(){this.constructor=n}r(n,t),n.prototype=null===t?Object.create(t):(e.prototype=t.prototype,new e)});Object.defineProperty(t,"__esModule",{value:!0}),t.ProductClickEvent=void 0;var u=function(n){function t(){var t=n.call(this)||this;return t.typ="ProductClickEvent",t}return e(t,n),t.getAttributeTypeMap=function(){return n.getAttributeTypeMap.call(this).concat(t.attributeTypeMap)},t.discriminator=void 0,t.attributeTypeMap=[{name:"widget",baseName:"widget",type:"Widget",format:""},{name:"product",baseName:"product",type:"string",format:""},{name:"rank",baseName:"rank",type:"number",format:""}],t}(le.Event);t.ProductClickEvent=u})),_e=I((function(n,t){var r,e=w&&w.__extends||(r=function(n,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])})(n,t)},function(n,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function e(){this.constructor=n}r(n,t),n.prototype=null===t?Object.create(t):(e.prototype=t.prototype,new e)});Object.defineProperty(t,"__esModule",{value:!0}),t.ProductViewEvent=void 0;var u=function(n){function t(){var t=n.call(this)||this;return t.typ="ProductViewEvent",t}return e(t,n),t.getAttributeTypeMap=function(){return n.getAttributeTypeMap.call(this).concat(t.attributeTypeMap)},t.discriminator=void 0,t.attributeTypeMap=[{name:"widget",baseName:"widget",type:"Widget",format:""},{name:"product",baseName:"product",type:"string",format:""},{name:"rank",baseName:"rank",type:"number",format:""}],t}(le.Event);t.ProductViewEvent=u})),Ue=I((function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.ProductViewEventAllOf=void 0;var r=function(){function n(){}return n.getAttributeTypeMap=function(){return n.attributeTypeMap},n.discriminator=void 0,n.attributeTypeMap=[{name:"widget",baseName:"widget",type:"Widget",format:""},{name:"product",baseName:"product",type:"string",format:""},{name:"rank",baseName:"rank",type:"number",format:""}],n}();t.ProductViewEventAllOf=r})),Me=I((function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.Rate=void 0;var r=function(){function n(){}return n.getAttributeTypeMap=function(){return n.attributeTypeMap},n.discriminator=void 0,n.attributeTypeMap=[{name:"summary",baseName:"summary",type:"RateSummary",format:""},{name:"intervals",baseName:"intervals",type:"Array<RateItem>",format:""}],n}();t.Rate=r})),xe=I((function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.RateItem=void 0;var r=function(){function n(){}return n.getAttributeTypeMap=function(){return n.attributeTypeMap},n.discriminator=void 0,n.attributeTypeMap=[{name:"interval",baseName:"interval",type:"Interval",format:""},{name:"rate",baseName:"rate",type:"number",format:"float"}],n}();t.RateItem=r})),Ee=I((function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.RateSummary=void 0;var r=function(){function n(){}return n.getAttributeTypeMap=function(){return n.attributeTypeMap},n.discriminator=void 0,n.attributeTypeMap=[{name:"interval",baseName:"interval",type:"Interval",format:""},{name:"rate",baseName:"rate",type:"number",format:"float"}],n}();t.RateSummary=r})),Ae=I((function(n,t){Object.defineProperty(t,"__esModule",{value:!0})})),Ne=I((function(n,t){var r,e=w&&w.__extends||(r=function(n,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])})(n,t)},function(n,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function e(){this.constructor=n}r(n,t),n.prototype=null===t?Object.create(t):(e.prototype=t.prototype,new e)});Object.defineProperty(t,"__esModule",{value:!0}),t.SearchEvent=void 0;var u=function(n){function t(){var t=n.call(this)||this;return t.typ="SearchEvent",t}return e(t,n),t.getAttributeTypeMap=function(){return n.getAttributeTypeMap.call(this).concat(t.attributeTypeMap)},t.discriminator=void 0,t.attributeTypeMap=[{name:"widget",baseName:"widget",type:"Widget",format:""},{name:"source",baseName:"source",type:"SearchImageSource",format:""},{name:"search_area",baseName:"search_area",type:"SearchArea",format:""}],t}(le.Event);t.SearchEvent=u})),We=I((function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.SearchEventAllOf=void 0;var r=function(){function n(){}return n.getAttributeTypeMap=function(){return n.attributeTypeMap},n.discriminator=void 0,n.attributeTypeMap=[{name:"widget",baseName:"widget",type:"Widget",format:""},{name:"source",baseName:"source",type:"SearchImageSource",format:""},{name:"search_area",baseName:"search_area",type:"SearchArea",format:""}],n}();t.SearchEventAllOf=r})),Te=I((function(n,t){Object.defineProperty(t,"__esModule",{value:!0})})),Se=I((function(n,t){Object.defineProperty(t,"__esModule",{value:!0})})),ke=I((function(n,t){Object.defineProperty(t,"__esModule",{value:!0})})),Pe=I((function(n,t){var r,e=w&&w.__extends||(r=function(n,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])})(n,t)},function(n,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function e(){this.constructor=n}r(n,t),n.prototype=null===t?Object.create(t):(e.prototype=t.prototype,new e)});Object.defineProperty(t,"__esModule",{value:!0}),t.WidgetEvent=void 0;var u=function(n){function t(){var t=n.call(this)||this;return t.typ="WidgetEvent",t}return e(t,n),t.getAttributeTypeMap=function(){return n.getAttributeTypeMap.call(this).concat(t.attributeTypeMap)},t.discriminator=void 0,t.attributeTypeMap=[{name:"widget",baseName:"widget",type:"Widget",format:""},{name:"action",baseName:"action",type:"WidgetAction",format:""}],t}(le.Event);t.WidgetEvent=u})),Ce=I((function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.WidgetEventAllOf=void 0;var r=function(){function n(){}return n.getAttributeTypeMap=function(){return n.attributeTypeMap},n.discriminator=void 0,n.attributeTypeMap=[{name:"widget",baseName:"widget",type:"Widget",format:""},{name:"action",baseName:"action",type:"WidgetAction",format:""}],n}();t.WidgetEventAllOf=r})),qe=I((function(n,t){var r=w&&w.__createBinding||(Object.create?function(n,t,r,e){void 0===e&&(e=r);var u=Object.getOwnPropertyDescriptor(t,r);u&&!("get"in u?!t.__esModule:u.writable||u.configurable)||(u={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(n,e,u)}:function(n,t,r,e){void 0===e&&(e=r),n[e]=t[r]}),e=w&&w.__exportStar||function(n,t){for(var e in n)"default"===e||Object.prototype.hasOwnProperty.call(t,e)||r(t,n,e)};Object.defineProperty(t,"__esModule",{value:!0}),e(ae,t),e(se,t),e(ve,t),e(de,t),e(le,t),e(pe,t),e(he,t),e(me,t),e(be,t),e(ye,t),e(we,t),e(Ie,t),e(ge,t),e(Re,t),e(Oe,t),e(je,t),e(_e,t),e(Ue,t),e(Me,t),e(xe,t),e(Ee,t),e(Ae,t),e(Ne,t),e(We,t),e(Te,t),e(Se,t),e(ke,t),e(Pe,t),e(Ce,t)})),De=I((function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.PromiseMiddlewareWrapper=void 0;var r=function(){function n(n){this.middleware=n}return n.prototype.pre=function(n){return(0,kr.from)(this.middleware.pre(n))},n.prototype.post=function(n){return(0,kr.from)(this.middleware.post(n))},n}();t.PromiseMiddlewareWrapper=r})),ze=I((function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.servers=t.server2=t.server1=t.ServerConfiguration=void 0;var r=function(){function n(n,t){this.url=n,this.variableConfiguration=t}return n.prototype.setVariables=function(n){Object.assign(this.variableConfiguration,n)},n.prototype.getConfiguration=function(){return this.variableConfiguration},n.prototype.getUrl=function(){var n=this.url;for(var t in this.variableConfiguration){var r=new RegExp("{"+t+"}","g");n=n.replace(r,this.variableConfiguration[t])}return n},n.prototype.makeRequestContext=function(n,t){return new ce.RequestContext(this.getUrl()+n,t)},n}();t.ServerConfiguration=r,t.server1=new r("https://tracking.vviinn.com",{}),t.server2=new r("https://tracking.stage.vviinn.com",{}),t.servers=[t.server1,t.server2]})),Le=I((function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.createConfiguration=void 0,t.createConfiguration=function(n){void 0===n&&(n={});var t={baseServer:void 0!==n.baseServer?n.baseServer:ze.server1,httpApi:n.httpApi||new oe.IsomorphicFetchHttpLibrary,middleware:n.middleware||[],authMethods:(0,fe.configureAuthMethods)(n.authMethods)};return n.promiseMiddleware&&n.promiseMiddleware.forEach((function(n){return t.middleware.push(new De.PromiseMiddlewareWrapper(n))})),t}})),Fe=I((function(n,t){var r,e=w&&w.__extends||(r=function(n,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])})(n,t)},function(n,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function e(){this.constructor=n}r(n,t),n.prototype=null===t?Object.create(t):(e.prototype=t.prototype,new e)});Object.defineProperty(t,"__esModule",{value:!0}),t.ApiException=void 0;var u=function(n){function t(t,r,e,u){var i=n.call(this,"HTTP-Code: "+t+"\nMessage: "+r+"\nBody: "+JSON.stringify(e)+"\nHeaders: "+JSON.stringify(u))||this;return i.code=t,i.body=e,i.headers=u,i}return e(t,n),t}(Error);t.ApiException=u})),He=I((function(n,t){var r,e=w&&w.__extends||(r=function(n,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])})(n,t)},function(n,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function e(){this.constructor=n}r(n,t),n.prototype=null===t?Object.create(t):(e.prototype=t.prototype,new e)});Object.defineProperty(t,"__esModule",{value:!0}),t.RequiredError=t.BaseAPIRequestFactory=t.COLLECTION_FORMATS=void 0,t.COLLECTION_FORMATS={csv:",",ssv:" ",tsv:"\t",pipes:"|"},t.BaseAPIRequestFactory=function(n){this.configuration=n};var u=function(n){function t(t,r,e){var u=n.call(this,"Required parameter "+e+" was null or undefined when calling "+t+"."+r+".")||this;return u.api=t,u.method=r,u.field=e,u.name="RequiredError",u}return e(t,n),t}(Error);t.RequiredError=u})),Be=I((function(n,t){var r=w&&w.__createBinding||(Object.create?function(n,t,r,e){void 0===e&&(e=r);var u=Object.getOwnPropertyDescriptor(t,r);u&&!("get"in u?!t.__esModule:u.writable||u.configurable)||(u={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(n,e,u)}:function(n,t,r,e){void 0===e&&(e=r),n[e]=t[r]}),e=w&&w.__exportStar||function(n,t){for(var e in n)"default"===e||Object.prototype.hasOwnProperty.call(t,e)||r(t,n,e)};Object.defineProperty(t,"__esModule",{value:!0}),t.ObjectSerializer=void 0,e(ae,t),e(se,t),e(ve,t),e(de,t),e(le,t),e(pe,t),e(he,t),e(me,t),e(be,t),e(ye,t),e(we,t),e(Ie,t),e(ge,t),e(Re,t),e(Oe,t),e(je,t),e(_e,t),e(Ue,t),e(Me,t),e(xe,t),e(Ee,t),e(Ae,t),e(Ne,t),e(We,t),e(Te,t),e(Se,t),e(ke,t),e(Pe,t),e(Ce,t);var u=ae,i=se,o=ve,c=de,f=le,a=pe,s=me,v=be,d=we,l=Ie,p=ge,h=Re,m=Oe,b=je,y=_e,I=Ue,g=Me,R=xe,O=Ee,j=Ne,_=We,U=Pe,M=Ce,x=["string","boolean","double","integer","long","float","number","any"],E={"application/json":1/0,"application/octet-stream":0,"application/x-www-form-urlencoded":0},A=new Set(["EventConfirmationStatusEnum","FilterAction","FilterKind","SearchArea","SearchImageSource","Widget","WidgetAction"]),N={Acknowledgement:u.Acknowledgement,Config:i.Config,ErrorObject:o.ErrorObject,ErrorResponse:c.ErrorResponse,Event:f.Event,EventConfirmation:a.EventConfirmation,FilterEvent:s.FilterEvent,FilterEventAllOf:v.FilterEventAllOf,Histogram:d.Histogram,HistogramItem:l.HistogramItem,HistogramSummary:p.HistogramSummary,InteractionReport:h.InteractionReport,Interval:m.Interval,ProductClickEvent:b.ProductClickEvent,ProductViewEvent:y.ProductViewEvent,ProductViewEventAllOf:I.ProductViewEventAllOf,Rate:g.Rate,RateItem:R.RateItem,RateSummary:O.RateSummary,SearchEvent:j.SearchEvent,SearchEventAllOf:_.SearchEventAllOf,WidgetEvent:U.WidgetEvent,WidgetEventAllOf:M.WidgetEventAllOf},W=function(){function n(){}return n.findCorrectType=function(n,t){if(null==n)return t;if(-1!==x.indexOf(t.toLowerCase()))return t;if("Date"===t)return t;if(A.has(t))return t;if(!N[t])return t;var r=N[t].discriminator;if(null==r)return t;if(n[r]){var e=n[r];return N[e]?e:t}return t},n.serialize=function(t,r,e){if(null==t)return t;if(-1!==x.indexOf(r.toLowerCase()))return t;if(0===r.lastIndexOf("Array<",0)){var u=r.replace("Array<","");u=u.substring(0,u.length-1);var i=[];for(var o in t)i.push(n.serialize(t[o],u,e));return i}if("Date"===r){if("date"==e){var c=t.getMonth()+1;c=c<10?"0"+c.toString():c.toString();var f=t.getDate();return f=f<10?"0"+f.toString():f.toString(),t.getFullYear()+"-"+c+"-"+f}return t.toISOString()}if(A.has(r))return t;if(!N[r])return t;r=this.findCorrectType(t,r);var a=N[r].getAttributeTypeMap(),s={};for(var o in a){var v=a[o];s[v.baseName]=n.serialize(t[v.name],v.type,v.format)}return s},n.deserialize=function(t,r,e){if(r=n.findCorrectType(t,r),null==t)return t;if(-1!==x.indexOf(r.toLowerCase()))return t;if(0===r.lastIndexOf("Array<",0)){var u=r.replace("Array<","");u=u.substring(0,u.length-1);var i=[];for(var o in t)i.push(n.deserialize(t[o],u,e));return i}if("Date"===r)return new Date(t);if(A.has(r))return t;if(!N[r])return t;var c=new N[r],f=N[r].getAttributeTypeMap();for(var o in f){var a=f[o];c[a.name]=n.deserialize(t[a.baseName],a.type,a.format)}return c},n.normalizeMediaType=function(n){if(void 0!==n)return n.split(";")[0].trim().toLowerCase()},n.getPreferredMediaType=function(n){if(!n)return"application/json";for(var t=void 0,r=-1/0,e=0,u=n.map(this.normalizeMediaType);e<u.length;e++){var i=u[e];E[i]>r&&(t=i,r=E[i])}if(void 0===t)throw new Error("None of the given media types are supported: "+n.join(", "));return t},n.stringify=function(n,t){if("application/json"===t)return JSON.stringify(n);throw new Error("The mediaType "+t+" is not supported by ObjectSerializer.stringify.")},n.parse=function(n,t){if(void 0===t)throw new Error("Cannot parse content. No Content-Type defined.");if("application/json"===t)return JSON.parse(n);throw new Error("The mediaType "+t+" is not supported by ObjectSerializer.parse.")},n}();t.ObjectSerializer=W})),Ge=I((function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.canConsumeForm=t.isCodeInRange=void 0,t.isCodeInRange=function(n,t){if("0"===n)return!0;if(n==t.toString())return!0;var r=t.toString();if(r.length!=n.length)return!1;for(var e=0;e<r.length;e++)if("X"!=n.charAt(e)&&n.charAt(e)!=r.charAt(e))return!1;return!0},t.canConsumeForm=function(n){return-1!==n.indexOf("multipart/form-data")}})),Ve=I((function(n,t){var r,e=w&&w.__extends||(r=function(n,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])})(n,t)},function(n,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function e(){this.constructor=n}r(n,t),n.prototype=null===t?Object.create(t):(e.prototype=t.prototype,new e)}),u=w&&w.__awaiter||function(n,t,r,e){return new(r||(r=Promise))((function(u,i){function o(n){try{f(e.next(n))}catch(n){i(n)}}function c(n){try{f(e.throw(n))}catch(n){i(n)}}function f(n){var t;n.done?u(n.value):(t=n.value,t instanceof r?t:new r((function(n){n(t)}))).then(o,c)}f((e=e.apply(n,t||[])).next())}))},i=w&&w.__generator||function(n,t){var r,e,u,i,o={label:0,sent:function(){if(1&u[0])throw u[1];return u[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(i){return function(c){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;o;)try{if(r=1,e&&(u=2&i[0]?e.return:i[0]?e.throw||((u=e.return)&&u.call(e),0):e.next)&&!(u=u.call(e,i[1])).done)return u;switch(e=0,u&&(i=[2&i[0],u.value]),i[0]){case 0:case 1:u=i;break;case 4:return o.label++,{value:i[1],done:!1};case 5:o.label++,e=i[1],i=[0];continue;case 7:i=o.ops.pop(),o.trys.pop();continue;default:if(!((u=(u=o.trys).length>0&&u[u.length-1])||6!==i[0]&&2!==i[0])){o=0;continue}if(3===i[0]&&(!u||i[1]>u[0]&&i[1]<u[3])){o.label=i[1];break}if(6===i[0]&&o.label<u[1]){o.label=u[1],u=i;break}if(u&&o.label<u[2]){o.label=u[2],o.ops.push(i);break}u[2]&&o.ops.pop(),o.trys.pop();continue}i=t.call(n,o)}catch(n){i=[6,n],e=0}finally{r=u=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,c])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.DefaultApiResponseProcessor=t.DefaultApiRequestFactory=void 0;var o=function(n){function t(){return null!==n&&n.apply(this,arguments)||this}return e(t,n),t.prototype.applyConfiguration=function(n,t,r){var e,o,c;return u(this,void 0,void 0,(function(){var u,f,a,s,v,d,l;return i(this,(function(i){switch(i.label){case 0:if(u=r||this.configuration,null==n)throw new He.RequiredError("DefaultApi","applyConfiguration","site_id");return f="/site/{site_id}/configuration".replace("{site_id}",encodeURIComponent(String(n))),(a=u.baseServer.makeRequestContext(f,ce.HttpMethod.PUT)).setHeaderParam("Accept","application/json, */*;q=0.8"),s=Be.ObjectSerializer.getPreferredMediaType(["application/json"]),a.setHeaderParam("Content-Type",s),v=Be.ObjectSerializer.stringify(Be.ObjectSerializer.serialize(t,"Config",""),s),a.setBody(v),(null==(d=u.authMethods.bearerAuth)?void 0:d.applySecurityAuthentication)?[4,null==d?void 0:d.applySecurityAuthentication(a)]:[3,2];case 1:i.sent(),i.label=2;case 2:return(null==(l=(null===(e=null==r?void 0:r.authMethods)||void 0===e?void 0:e.default)||(null===(c=null===(o=this.configuration)||void 0===o?void 0:o.authMethods)||void 0===c?void 0:c.default))?void 0:l.applySecurityAuthentication)?[4,null==l?void 0:l.applySecurityAuthentication(a)]:[3,4];case 3:i.sent(),i.label=4;case 4:return[2,a]}}))}))},t.prototype.getConfiguration=function(n,t){var r,e,o;return u(this,void 0,void 0,(function(){var u,c,f,a,s;return i(this,(function(i){switch(i.label){case 0:if(u=t||this.configuration,null==n)throw new He.RequiredError("DefaultApi","getConfiguration","site_id");return c="/site/{site_id}/configuration".replace("{site_id}",encodeURIComponent(String(n))),(f=u.baseServer.makeRequestContext(c,ce.HttpMethod.GET)).setHeaderParam("Accept","application/json, */*;q=0.8"),(null==(a=u.authMethods.bearerAuth)?void 0:a.applySecurityAuthentication)?[4,null==a?void 0:a.applySecurityAuthentication(f)]:[3,2];case 1:i.sent(),i.label=2;case 2:return(null==(s=(null===(r=null==t?void 0:t.authMethods)||void 0===r?void 0:r.default)||(null===(o=null===(e=this.configuration)||void 0===e?void 0:e.authMethods)||void 0===o?void 0:o.default))?void 0:s.applySecurityAuthentication)?[4,null==s?void 0:s.applySecurityAuthentication(f)]:[3,4];case 3:i.sent(),i.label=4;case 4:return[2,f]}}))}))},t.prototype.getInteractions=function(n,t,r,e,o){var c,f,a;return u(this,void 0,void 0,(function(){var u,s,v,d,l;return i(this,(function(i){switch(i.label){case 0:if(u=o||this.configuration,null==n)throw new He.RequiredError("DefaultApi","getInteractions","site_id");if(null==t)throw new He.RequiredError("DefaultApi","getInteractions","start_datetime");if(null==r)throw new He.RequiredError("DefaultApi","getInteractions","end_datetime");return s="/site/{site_id}/interactions".replace("{site_id}",encodeURIComponent(String(n))),(v=u.baseServer.makeRequestContext(s,ce.HttpMethod.GET)).setHeaderParam("Accept","application/json, */*;q=0.8"),void 0!==t&&v.setQueryParam("start_datetime",Be.ObjectSerializer.serialize(t,"Date","date-time")),void 0!==r&&v.setQueryParam("end_datetime",Be.ObjectSerializer.serialize(r,"Date","date-time")),void 0!==e&&v.setQueryParam("widget",Be.ObjectSerializer.serialize(e,"Widget","")),(null==(d=u.authMethods.bearerAuth)?void 0:d.applySecurityAuthentication)?[4,null==d?void 0:d.applySecurityAuthentication(v)]:[3,2];case 1:i.sent(),i.label=2;case 2:return(null==(l=(null===(c=null==o?void 0:o.authMethods)||void 0===c?void 0:c.default)||(null===(a=null===(f=this.configuration)||void 0===f?void 0:f.authMethods)||void 0===a?void 0:a.default))?void 0:l.applySecurityAuthentication)?[4,null==l?void 0:l.applySecurityAuthentication(v)]:[3,4];case 3:i.sent(),i.label=4;case 4:return[2,v]}}))}))},t.prototype.openapi=function(n){var t,r,e;return u(this,void 0,void 0,(function(){var u,o,c,f;return i(this,(function(i){switch(i.label){case 0:return(o=(u=n||this.configuration).baseServer.makeRequestContext("/openapi.yaml",ce.HttpMethod.GET)).setHeaderParam("Accept","application/json, */*;q=0.8"),(null==(c=u.authMethods.bearerAuth)?void 0:c.applySecurityAuthentication)?[4,null==c?void 0:c.applySecurityAuthentication(o)]:[3,2];case 1:i.sent(),i.label=2;case 2:return(null==(f=(null===(t=null==n?void 0:n.authMethods)||void 0===t?void 0:t.default)||(null===(e=null===(r=this.configuration)||void 0===r?void 0:r.authMethods)||void 0===e?void 0:e.default))?void 0:f.applySecurityAuthentication)?[4,null==f?void 0:f.applySecurityAuthentication(o)]:[3,4];case 3:i.sent(),i.label=4;case 4:return[2,o]}}))}))},t.prototype.trackEvent=function(n,t){var r,e,o;return u(this,void 0,void 0,(function(){var u,c,f,a,s,v;return i(this,(function(i){switch(i.label){case 0:return(c=(u=t||this.configuration).baseServer.makeRequestContext("/event",ce.HttpMethod.POST)).setHeaderParam("Accept","application/json, */*;q=0.8"),f=Be.ObjectSerializer.getPreferredMediaType(["application/json"]),c.setHeaderParam("Content-Type",f),a=Be.ObjectSerializer.stringify(Be.ObjectSerializer.serialize(n,"ProductViewEvent | ProductClickEvent | WidgetEvent | FilterEvent | SearchEvent",""),f),c.setBody(a),(null==(s=u.authMethods.bearerAuth)?void 0:s.applySecurityAuthentication)?[4,null==s?void 0:s.applySecurityAuthentication(c)]:[3,2];case 1:i.sent(),i.label=2;case 2:return(null==(v=(null===(r=null==t?void 0:t.authMethods)||void 0===r?void 0:r.default)||(null===(o=null===(e=this.configuration)||void 0===e?void 0:e.authMethods)||void 0===o?void 0:o.default))?void 0:v.applySecurityAuthentication)?[4,null==v?void 0:v.applySecurityAuthentication(c)]:[3,4];case 3:i.sent(),i.label=4;case 4:return[2,c]}}))}))},t}(He.BaseAPIRequestFactory);t.DefaultApiRequestFactory=o;var c=function(){function n(){}return n.prototype.applyConfiguration=function(n){return u(this,void 0,void 0,(function(){var t,r,e,u,o,c,f;return i(this,(function(i){switch(i.label){case 0:return t=Be.ObjectSerializer.normalizeMediaType(n.headers["content-type"]),(0,Ge.isCodeInRange)("200",n.httpStatusCode)?[2]:n.httpStatusCode>=200&&n.httpStatusCode<=299?(e=(r=Be.ObjectSerializer).deserialize,o=(u=Be.ObjectSerializer).parse,[4,n.body.text()]):[3,2];case 1:return[2,e.apply(r,[o.apply(u,[i.sent(),t]),"void",""])];case 2:return c=Fe.ApiException.bind,f=[void 0,n.httpStatusCode,"Unknown API Status Code!"],[4,n.getBodyAsAny()];case 3:throw new(c.apply(Fe.ApiException,f.concat([i.sent(),n.headers])))}}))}))},n.prototype.getConfiguration=function(n){return u(this,void 0,void 0,(function(){var t,r,e,u,o,c,f;return i(this,(function(i){switch(i.label){case 0:return t=Be.ObjectSerializer.normalizeMediaType(n.headers["content-type"]),(0,Ge.isCodeInRange)("200",n.httpStatusCode)?[2]:n.httpStatusCode>=200&&n.httpStatusCode<=299?(e=(r=Be.ObjectSerializer).deserialize,o=(u=Be.ObjectSerializer).parse,[4,n.body.text()]):[3,2];case 1:return[2,e.apply(r,[o.apply(u,[i.sent(),t]),"void",""])];case 2:return c=Fe.ApiException.bind,f=[void 0,n.httpStatusCode,"Unknown API Status Code!"],[4,n.getBodyAsAny()];case 3:throw new(c.apply(Fe.ApiException,f.concat([i.sent(),n.headers])))}}))}))},n.prototype.getInteractions=function(n){return u(this,void 0,void 0,(function(){var t,r,e,u,o,c,f,a,s,v,d;return i(this,(function(i){switch(i.label){case 0:return t=Be.ObjectSerializer.normalizeMediaType(n.headers["content-type"]),(0,Ge.isCodeInRange)("200",n.httpStatusCode)?(e=(r=Be.ObjectSerializer).deserialize,o=(u=Be.ObjectSerializer).parse,[4,n.body.text()]):[3,2];case 1:return[2,e.apply(r,[o.apply(u,[i.sent(),t]),"InteractionReport",""])];case 2:return n.httpStatusCode>=200&&n.httpStatusCode<=299?(f=(c=Be.ObjectSerializer).deserialize,s=(a=Be.ObjectSerializer).parse,[4,n.body.text()]):[3,4];case 3:return[2,f.apply(c,[s.apply(a,[i.sent(),t]),"InteractionReport",""])];case 4:return v=Fe.ApiException.bind,d=[void 0,n.httpStatusCode,"Unknown API Status Code!"],[4,n.getBodyAsAny()];case 5:throw new(v.apply(Fe.ApiException,d.concat([i.sent(),n.headers])))}}))}))},n.prototype.openapi=function(n){return u(this,void 0,void 0,(function(){var t,r,e,u,o,c,f,a,s,v,d;return i(this,(function(i){switch(i.label){case 0:return t=Be.ObjectSerializer.normalizeMediaType(n.headers["content-type"]),(0,Ge.isCodeInRange)("200",n.httpStatusCode)?(e=(r=Be.ObjectSerializer).deserialize,o=(u=Be.ObjectSerializer).parse,[4,n.body.text()]):[3,2];case 1:return[2,e.apply(r,[o.apply(u,[i.sent(),t]),"string",""])];case 2:return n.httpStatusCode>=200&&n.httpStatusCode<=299?(f=(c=Be.ObjectSerializer).deserialize,s=(a=Be.ObjectSerializer).parse,[4,n.body.text()]):[3,4];case 3:return[2,f.apply(c,[s.apply(a,[i.sent(),t]),"string",""])];case 4:return v=Fe.ApiException.bind,d=[void 0,n.httpStatusCode,"Unknown API Status Code!"],[4,n.getBodyAsAny()];case 5:throw new(v.apply(Fe.ApiException,d.concat([i.sent(),n.headers])))}}))}))},n.prototype.trackEvent=function(n){return u(this,void 0,void 0,(function(){var t,r,e,u,o,c,f,a,s,v,d,l,p,h,m,b;return i(this,(function(i){switch(i.label){case 0:return t=Be.ObjectSerializer.normalizeMediaType(n.headers["content-type"]),(0,Ge.isCodeInRange)("200",n.httpStatusCode)?(e=(r=Be.ObjectSerializer).deserialize,o=(u=Be.ObjectSerializer).parse,[4,n.body.text()]):[3,2];case 1:return[2,v=e.apply(r,[o.apply(u,[i.sent(),t]),"EventConfirmation",""])];case 2:return(0,Ge.isCodeInRange)("502",n.httpStatusCode)?(f=(c=Be.ObjectSerializer).deserialize,s=(a=Be.ObjectSerializer).parse,[4,n.body.text()]):[3,4];case 3:throw v=f.apply(c,[s.apply(a,[i.sent(),t]),"ErrorResponse",""]),new Fe.ApiException(502,"an error occurred",v,n.headers);case 4:return n.httpStatusCode>=200&&n.httpStatusCode<=299?(l=(d=Be.ObjectSerializer).deserialize,h=(p=Be.ObjectSerializer).parse,[4,n.body.text()]):[3,6];case 5:return[2,v=l.apply(d,[h.apply(p,[i.sent(),t]),"EventConfirmation",""])];case 6:return m=Fe.ApiException.bind,b=[void 0,n.httpStatusCode,"Unknown API Status Code!"],[4,n.getBodyAsAny()];case 7:throw new(m.apply(Fe.ApiException,b.concat([i.sent(),n.headers])))}}))}))},n}();t.DefaultApiResponseProcessor=c})),Je=I((function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.ObservableDefaultApi=void 0;var r=kr,e=function(){function n(n,t,r){this.configuration=n,this.requestFactory=t||new Ve.DefaultApiRequestFactory(n),this.responseProcessor=r||new Ve.DefaultApiResponseProcessor}return n.prototype.applyConfiguration=function(n,t,e){for(var u=this,i=this.requestFactory.applyConfiguration(n,t,e),o=(0,kr.from)(i),c=function(n){o=o.pipe((0,r.mergeMap)((function(t){return n.pre(t)})))},f=0,a=this.configuration.middleware;f<a.length;f++)c(a[f]);return o.pipe((0,r.mergeMap)((function(n){return u.configuration.httpApi.send(n)}))).pipe((0,r.mergeMap)((function(n){for(var t=(0,kr.of)(n),e=function(n){t=t.pipe((0,r.mergeMap)((function(t){return n.post(t)})))},i=0,o=u.configuration.middleware;i<o.length;i++)e(o[i]);return t.pipe((0,r.map)((function(n){return u.responseProcessor.applyConfiguration(n)})))})))},n.prototype.getConfiguration=function(n,t){for(var e=this,u=this.requestFactory.getConfiguration(n,t),i=(0,kr.from)(u),o=function(n){i=i.pipe((0,r.mergeMap)((function(t){return n.pre(t)})))},c=0,f=this.configuration.middleware;c<f.length;c++)o(f[c]);return i.pipe((0,r.mergeMap)((function(n){return e.configuration.httpApi.send(n)}))).pipe((0,r.mergeMap)((function(n){for(var t=(0,kr.of)(n),u=function(n){t=t.pipe((0,r.mergeMap)((function(t){return n.post(t)})))},i=0,o=e.configuration.middleware;i<o.length;i++)u(o[i]);return t.pipe((0,r.map)((function(n){return e.responseProcessor.getConfiguration(n)})))})))},n.prototype.getInteractions=function(n,t,e,u,i){for(var o=this,c=this.requestFactory.getInteractions(n,t,e,u,i),f=(0,kr.from)(c),a=function(n){f=f.pipe((0,r.mergeMap)((function(t){return n.pre(t)})))},s=0,v=this.configuration.middleware;s<v.length;s++)a(v[s]);return f.pipe((0,r.mergeMap)((function(n){return o.configuration.httpApi.send(n)}))).pipe((0,r.mergeMap)((function(n){for(var t=(0,kr.of)(n),e=function(n){t=t.pipe((0,r.mergeMap)((function(t){return n.post(t)})))},u=0,i=o.configuration.middleware;u<i.length;u++)e(i[u]);return t.pipe((0,r.map)((function(n){return o.responseProcessor.getInteractions(n)})))})))},n.prototype.openapi=function(n){for(var t=this,e=this.requestFactory.openapi(n),u=(0,kr.from)(e),i=function(n){u=u.pipe((0,r.mergeMap)((function(t){return n.pre(t)})))},o=0,c=this.configuration.middleware;o<c.length;o++)i(c[o]);return u.pipe((0,r.mergeMap)((function(n){return t.configuration.httpApi.send(n)}))).pipe((0,r.mergeMap)((function(n){for(var e=(0,kr.of)(n),u=function(n){e=e.pipe((0,r.mergeMap)((function(t){return n.post(t)})))},i=0,o=t.configuration.middleware;i<o.length;i++)u(o[i]);return e.pipe((0,r.map)((function(n){return t.responseProcessor.openapi(n)})))})))},n.prototype.trackEvent=function(n,t){for(var e=this,u=this.requestFactory.trackEvent(n,t),i=(0,kr.from)(u),o=function(n){i=i.pipe((0,r.mergeMap)((function(t){return n.pre(t)})))},c=0,f=this.configuration.middleware;c<f.length;c++)o(f[c]);return i.pipe((0,r.mergeMap)((function(n){return e.configuration.httpApi.send(n)}))).pipe((0,r.mergeMap)((function(n){for(var t=(0,kr.of)(n),u=function(n){t=t.pipe((0,r.mergeMap)((function(t){return n.post(t)})))},i=0,o=e.configuration.middleware;i<o.length;i++)u(o[i]);return t.pipe((0,r.map)((function(n){return e.responseProcessor.trackEvent(n)})))})))},n}();t.ObservableDefaultApi=e})),$e=I((function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.PromiseDefaultApi=void 0;var r=function(){function n(n,t,r){this.api=new Je.ObservableDefaultApi(n,t,r)}return n.prototype.applyConfiguration=function(n,t,r){return this.api.applyConfiguration(n,t,r).toPromise()},n.prototype.getConfiguration=function(n,t){return this.api.getConfiguration(n,t).toPromise()},n.prototype.getInteractions=function(n,t,r,e,u){return this.api.getInteractions(n,t,r,e,u).toPromise()},n.prototype.openapi=function(n){return this.api.openapi(n).toPromise()},n.prototype.trackEvent=function(n,t){return this.api.trackEvent(n,t).toPromise()},n}();t.PromiseDefaultApi=r})),Ke=I((function(n,t){var r=w&&w.__createBinding||(Object.create?function(n,t,r,e){void 0===e&&(e=r);var u=Object.getOwnPropertyDescriptor(t,r);u&&!("get"in u?!t.__esModule:u.writable||u.configurable)||(u={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(n,e,u)}:function(n,t,r,e){void 0===e&&(e=r),n[e]=t[r]}),e=w&&w.__exportStar||function(n,t){for(var e in n)"default"===e||Object.prototype.hasOwnProperty.call(t,e)||r(t,n,e)};Object.defineProperty(t,"__esModule",{value:!0}),t.DefaultApi=t.createConfiguration=void 0,e(ce,t),e(fe,t),e(qe,t),Object.defineProperty(t,"createConfiguration",{enumerable:!0,get:function(){return Le.createConfiguration}}),e(Fe,t),e(ze,t),Object.defineProperty(t,"DefaultApi",{enumerable:!0,get:function(){return $e.PromiseDefaultApi}})}));const Xe=(n,t)=>{const r=(n=>(n=>!n.includes("stage"))(n)?Ke.servers[0]:Ke.servers[1])(n),e=(n=>({bearerAuth:{tokenProvider:{getToken:()=>new Promise((t=>t(n)))}}}))(t);return new Ke.DefaultApi(Ke.createConfiguration({baseServer:r,authMethods:e}))},Ze=n=>t=>Object.assign(Object.assign({},t),n),Ye=Ze({widget:"VPR",typ:"product_view_event"}),Qe=Ze({widget:"VPS",typ:"product_view_event"}),nu=Ze({widget:"VPR",typ:"widget_event"}),tu=Ze({widget:"VPS",typ:"widget_event"}),ru=Ze({widget:"VPS",typ:"search_event"}),eu=Ze({widget:"VPS",typ:"filter_event"});export{tu as A,Lt as B,An as C,et as D,Cn as E,_n as F,Xn as G,Qn as H,H as I,X as J,Ye as K,nu as L,Dt as N,P as O,W as S,Hn as T,g as _,h as a,er as b,yt as c,lt as d,wt as e,p as f,y as g,It as h,ir as i,st as j,Kt as k,cr as l,ht as m,nn as n,bt as o,i as p,Jt as q,Vt as r,Ut as s,mt as t,Bn as u,Qe as v,ru as w,eu as x,hr as y,Xe as z}
1
+ import{a as n,f as t}from"./p-dc2da207.js";function r(n){return n}function e(n,t,r,e,u,i,o,c,f){switch(arguments.length){case 1:return n;case 2:return function(){return t(n.apply(this,arguments))};case 3:return function(){return r(t(n.apply(this,arguments)))};case 4:return function(){return e(r(t(n.apply(this,arguments))))};case 5:return function(){return u(e(r(t(n.apply(this,arguments)))))};case 6:return function(){return i(u(e(r(t(n.apply(this,arguments))))))};case 7:return function(){return o(i(u(e(r(t(n.apply(this,arguments)))))))};case 8:return function(){return c(o(i(u(e(r(t(n.apply(this,arguments))))))))};case 9:return function(){return f(c(o(i(u(e(r(t(n.apply(this,arguments)))))))))}}}function u(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];return n}function i(n,t,r,e,u,i,o,c,f){switch(arguments.length){case 1:return n;case 2:return t(n);case 3:return r(t(n));case 4:return e(r(t(n)));case 5:return u(e(r(t(n))));case 6:return i(u(e(r(t(n)))));case 7:return o(i(u(e(r(t(n))))));case 8:return c(o(i(u(e(r(t(n)))))));case 9:return f(c(o(i(u(e(r(t(n))))))));default:for(var a=arguments[0],s=1;s<arguments.length;s++)a=arguments[s](a);return a}}var o={_tag:"None"},c=function(n){return{_tag:"Left",left:n}},f=function(n){return{_tag:"Right",right:n}},a=Object.prototype.hasOwnProperty,s=function(n){return{concat:function(t,r){var e={};for(var u in n)a.call(n,u)&&(e[u]=n[u].concat(t[u],r[u]));return e}}},v={concat:function(n,t){return n+t}};const d={concat:(n,t)=>n-t},l=({x:n,y:t})=>({x:n,y:t}),p=({clientX:n,clientY:t})=>({x:n,y:t}),h=s({x:d,y:d}),m=s({x:v,y:v});var b;!function(n){n[n.East=0]="East",n[n.North=1]="North",n[n.NorthEast=2]="NorthEast",n[n.NorthWest=3]="NorthWest",n[n.South=4]="South",n[n.SouthEast=5]="SouthEast",n[n.SouthWest=6]="SouthWest",n[n.West=7]="West"}(b||(b={}));const y=n=>{switch(n){case b.East:return"e-resize";case b.North:return"n-resize";case b.NorthEast:return"ne-resize";case b.NorthWest:return"nw-resize";case b.South:return"s-resize";case b.SouthEast:return"se-resize";case b.SouthWest:return"sw-resize";case b.West:return"w-resize";default:return"pointer"}};var w="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function I(n,t,r){return n(r={path:t,exports:{},require:function(){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}()}},r.exports),r.exports}var g=I((function(n,t){function r(n){return n}function e(n){return function(){return n}}function u(n,t,r,e,u,i,o,c,f){switch(arguments.length){case 1:return n;case 2:return function(){return t(n.apply(this,arguments))};case 3:return function(){return r(t(n.apply(this,arguments)))};case 4:return function(){return e(r(t(n.apply(this,arguments))))};case 5:return function(){return u(e(r(t(n.apply(this,arguments)))))};case 6:return function(){return i(u(e(r(t(n.apply(this,arguments))))))};case 7:return function(){return o(i(u(e(r(t(n.apply(this,arguments)))))))};case 8:return function(){return c(o(i(u(e(r(t(n.apply(this,arguments))))))))};case 9:return function(){return f(c(o(i(u(e(r(t(n.apply(this,arguments)))))))))}}}function i(){throw new Error("Called `absurd` function which should be uncallable")}Object.defineProperty(t,"__esModule",{value:!0}),t.getEndomorphismMonoid=t.not=t.SK=t.hole=t.pipe=t.untupled=t.tupled=t.absurd=t.decrement=t.increment=t.tuple=t.flow=t.flip=t.constVoid=t.constUndefined=t.constNull=t.constFalse=t.constTrue=t.constant=t.unsafeCoerce=t.identity=t.apply=t.getRing=t.getSemiring=t.getMonoid=t.getSemigroup=t.getBooleanAlgebra=void 0,t.getBooleanAlgebra=function(n){return function(){return{meet:function(t,r){return function(e){return n.meet(t(e),r(e))}},join:function(t,r){return function(e){return n.join(t(e),r(e))}},zero:function(){return n.zero},one:function(){return n.one},implies:function(t,r){return function(e){return n.implies(t(e),r(e))}},not:function(t){return function(r){return n.not(t(r))}}}}},t.getSemigroup=function(n){return function(){return{concat:function(t,r){return function(e){return n.concat(t(e),r(e))}}}}},t.getMonoid=function(n){var r=t.getSemigroup(n);return function(){return{concat:r().concat,empty:function(){return n.empty}}}},t.getSemiring=function(n){return{add:function(t,r){return function(e){return n.add(t(e),r(e))}},zero:function(){return n.zero},mul:function(t,r){return function(e){return n.mul(t(e),r(e))}},one:function(){return n.one}}},t.getRing=function(n){var r=t.getSemiring(n);return{add:r.add,mul:r.mul,one:r.one,zero:r.zero,sub:function(t,r){return function(e){return n.sub(t(e),r(e))}}}},t.apply=function(n){return function(t){return t(n)}},t.identity=r,t.unsafeCoerce=r,t.constant=e,t.constTrue=e(!0),t.constFalse=e(!1),t.constNull=e(null),t.constUndefined=e(void 0),t.constVoid=t.constUndefined,t.flip=function(n){return function(t,r){return n(r,t)}},t.flow=u,t.tuple=function(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];return n},t.increment=function(n){return n+1},t.decrement=function(n){return n-1},t.absurd=i,t.tupled=function(n){return function(t){return n.apply(void 0,t)}},t.untupled=function(n){return function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return n(t)}},t.pipe=function(n,t,r,e,u,i,o,c,f){switch(arguments.length){case 1:return n;case 2:return t(n);case 3:return r(t(n));case 4:return e(r(t(n)));case 5:return u(e(r(t(n))));case 6:return i(u(e(r(t(n)))));case 7:return o(i(u(e(r(t(n))))));case 8:return c(o(i(u(e(r(t(n)))))));case 9:return f(c(o(i(u(e(r(t(n))))))));default:for(var a=arguments[0],s=1;s<arguments.length;s++)a=arguments[s](a);return a}},t.hole=i,t.SK=function(n,t){return t},t.not=function(n){return function(t){return!n(t)}},t.getEndomorphismMonoid=function(){return{concat:function(n,t){return u(n,t)},empty:r}}})),R=I((function(n,t){function r(n,t,e){return function(u){for(var i=Array(e.length+1),o=0;o<e.length;o++)i[o]=e[o];return i[e.length]=u,0===t?n.apply(null,i):r(n,t-1,i)}}Object.defineProperty(t,"__esModule",{value:!0}),t.sequenceS=t.sequenceT=t.getApplySemigroup=t.apS=t.apSecond=t.apFirst=t.ap=void 0,t.ap=function(n,t){return function(r){return function(e){return n.ap(n.map(e,(function(n){return function(r){return t.ap(n,r)}})),r)}}},t.apFirst=function(n){return function(t){return function(r){return n.ap(n.map(r,(function(n){return function(){return n}})),t)}}},t.apSecond=function(n){return function(t){return function(r){return n.ap(n.map(r,(function(){return function(n){return n}})),t)}}},t.apS=function(n){return function(t,r){return function(e){return n.ap(n.map(e,(function(n){return function(r){var e;return Object.assign({},n,((e={})[t]=r,e))}})),r)}}},t.getApplySemigroup=function(n){return function(t){return{concat:function(r,e){return n.ap(n.map(r,(function(n){return function(r){return t.concat(n,r)}})),e)}}}};var e={1:function(n){return[n]},2:function(n){return function(t){return[n,t]}},3:function(n){return function(t){return function(r){return[n,t,r]}}},4:function(n){return function(t){return function(r){return function(e){return[n,t,r,e]}}}},5:function(n){return function(t){return function(r){return function(e){return function(u){return[n,t,r,e,u]}}}}}};function u(n){return e.hasOwnProperty(n)||(e[n]=r(g.tuple,n-1,[])),e[n]}t.sequenceT=function(n){return function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];for(var e=t.length,i=u(e),o=n.map(t[0],i),c=1;c<e;c++)o=n.ap(o,t[c]);return o}},t.sequenceS=function(n){return function(t){for(var e=Object.keys(t),u=e.length,i=function(n){var t=n.length;switch(t){case 1:return function(t){var r;return(r={})[n[0]]=t,r};case 2:return function(t){return function(r){var e;return(e={})[n[0]]=t,e[n[1]]=r,e}};case 3:return function(t){return function(r){return function(e){var u;return(u={})[n[0]]=t,u[n[1]]=r,u[n[2]]=e,u}}};case 4:return function(t){return function(r){return function(e){return function(u){var i;return(i={})[n[0]]=t,i[n[1]]=r,i[n[2]]=e,i[n[3]]=u,i}}}};case 5:return function(t){return function(r){return function(e){return function(u){return function(i){var o;return(o={})[n[0]]=t,o[n[1]]=r,o[n[2]]=e,o[n[3]]=u,o[n[4]]=i,o}}}}};default:return r((function(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];for(var u={},i=0;i<t;i++)u[n[i]]=r[i];return u}),t-1,[])}}(e),o=n.map(t[e[0]],i),c=1;c<u;c++)o=n.ap(o,t[e[c]]);return o}}})),O=I((function(n,t){function r(n,t){return function(r){return function(e){return n.map(e,(function(n){return t.map(n,r)}))}}}Object.defineProperty(t,"__esModule",{value:!0}),t.getFunctorComposition=t.bindTo=t.flap=t.map=void 0,t.map=r,t.flap=function(n){return function(t){return function(r){return n.map(r,(function(n){return n(t)}))}}},t.bindTo=function(n){return function(t){return function(r){return n.map(r,(function(n){var r;return(r={})[t]=n,r}))}}},t.getFunctorComposition=function(n,t){var e=r(n,t);return{map:function(n,t){return g.pipe(n,e(t))}}}})),j=I((function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.getApplicativeComposition=t.getApplicativeMonoid=void 0,t.getApplicativeMonoid=function(n){var t=R.getApplySemigroup(n);return function(r){return{concat:t(r).concat,empty:n.of(r.empty)}}},t.getApplicativeComposition=function(n,t){var r=O.getFunctorComposition(n,t).map,e=R.ap(n,t);return{map:r,of:function(r){return n.of(t.of(r))},ap:function(n,t){return g.pipe(n,e(t))}}}})),_=I((function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.bind=t.chainFirst=void 0,t.chainFirst=function(n){return function(t){return function(r){return n.chain(r,(function(r){return n.map(t(r),(function(){return r}))}))}}},t.bind=function(n){return function(t,r){return function(e){return n.chain(e,(function(e){return n.map(r(e),(function(n){var r;return Object.assign({},e,((r={})[t]=n,r))}))}))}}}})),U=I((function(n,t){var r=w&&w.__spreadArray||function(n,t){for(var r=0,e=t.length,u=n.length;r<e;r++,u++)n[u]=t[r];return n};Object.defineProperty(t,"__esModule",{value:!0}),t.fromReadonlyNonEmptyArray=t.has=t.emptyRecord=t.emptyReadonlyArray=t.tail=t.head=t.isNonEmpty=t.singleton=t.right=t.left=t.isRight=t.isLeft=t.some=t.none=t.isSome=t.isNone=void 0,t.isNone=function(n){return"None"===n._tag},t.isSome=function(n){return"Some"===n._tag},t.none={_tag:"None"},t.some=function(n){return{_tag:"Some",value:n}},t.isLeft=function(n){return"Left"===n._tag},t.isRight=function(n){return"Right"===n._tag},t.left=function(n){return{_tag:"Left",left:n}},t.right=function(n){return{_tag:"Right",right:n}},t.singleton=function(n){return[n]},t.isNonEmpty=function(n){return n.length>0},t.head=function(n){return n[0]},t.tail=function(n){return n.slice(1)},t.emptyReadonlyArray=[],t.emptyRecord={},t.has=Object.prototype.hasOwnProperty,t.fromReadonlyNonEmptyArray=function(n){return r([n[0]],n.slice(1))}})),M=I((function(n,t){var r=w&&w.__createBinding||(Object.create?function(n,t,r,e){void 0===e&&(e=r),Object.defineProperty(n,e,{enumerable:!0,get:function(){return t[r]}})}:function(n,t,r,e){void 0===e&&(e=r),n[e]=t[r]}),e=w&&w.__setModuleDefault||(Object.create?function(n,t){Object.defineProperty(n,"default",{enumerable:!0,value:t})}:function(n,t){n.default=t}),u=w&&w.__importStar||function(n){if(n&&n.__esModule)return n;var t={};if(null!=n)for(var u in n)"default"!==u&&Object.prototype.hasOwnProperty.call(n,u)&&r(t,n,u);return e(t,n),t};Object.defineProperty(t,"__esModule",{value:!0}),t.filterOrElse=t.chainEitherK=t.fromEitherK=t.chainOptionK=t.fromOptionK=t.fromPredicate=t.fromOption=void 0;var i=u(U);function o(n){return function(t){return function(r){return n.fromEither(i.isNone(r)?i.left(t()):i.right(r.value))}}}function c(n){var t=o(n);return function(n){var r=t(n);return function(n){return g.flow(n,r)}}}function f(n){return function(t){return g.flow(t,n.fromEither)}}t.fromOption=o,t.fromPredicate=function(n){return function(t,r){return function(e){return n.fromEither(t(e)?i.right(e):i.left(r(e)))}}},t.fromOptionK=c,t.chainOptionK=function(n,t){var r=c(n);return function(n){var e=r(n);return function(n){return function(r){return t.chain(r,e(n))}}}},t.fromEitherK=f,t.chainEitherK=function(n,t){var r=f(n);return function(n){return function(e){return t.chain(e,r(n))}}},t.filterOrElse=function(n,t){return function(r,e){return function(u){return t.chain(u,(function(t){return n.fromEither(r(t)?i.right(t):i.left(e(t)))}))}}}})),x=I((function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.and=t.or=t.not=t.Contravariant=t.getMonoidAll=t.getSemigroupAll=t.getMonoidAny=t.getSemigroupAny=t.URI=t.contramap=void 0,t.contramap=function(n){return function(t){return g.flow(n,t)}},t.URI="Predicate",t.getSemigroupAny=function(){return{concat:function(n,r){return g.pipe(n,t.or(r))}}},t.getMonoidAny=function(){return{concat:t.getSemigroupAny().concat,empty:g.constFalse}},t.getSemigroupAll=function(){return{concat:function(n,r){return g.pipe(n,t.and(r))}}},t.getMonoidAll=function(){return{concat:t.getSemigroupAll().concat,empty:g.constTrue}},t.Contravariant={URI:t.URI,contramap:function(n,r){return g.pipe(n,t.contramap(r))}},t.not=function(n){return function(t){return!n(t)}},t.or=function(n){return function(t){return function(r){return t(r)||n(r)}}},t.and=function(n){return function(t){return function(r){return t(r)&&n(r)}}}})),E=I((function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.concatAll=t.endo=t.filterSecond=t.filterFirst=t.reverse=void 0,t.reverse=function(n){return{concat:function(t,r){return n.concat(r,t)}}},t.filterFirst=function(n){return function(t){return{concat:function(r,e){return n(r)?t.concat(r,e):e}}}},t.filterSecond=function(n){return function(t){return{concat:function(r,e){return n(e)?t.concat(r,e):r}}}},t.endo=function(n){return function(t){return{concat:function(r,e){return t.concat(n(r),n(e))}}}},t.concatAll=function(n){return function(t){return function(r){return r.reduce((function(t,r){return n.concat(t,r)}),t)}}}})),A=I((function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.eqDate=t.eqNumber=t.eqString=t.eqBoolean=t.eq=t.strictEqual=t.getStructEq=t.getTupleEq=t.Contravariant=t.getMonoid=t.getSemigroup=t.eqStrict=t.URI=t.contramap=t.tuple=t.struct=t.fromEquals=void 0,t.fromEquals=function(n){return{equals:function(t,r){return t===r||n(t,r)}}},t.struct=function(n){return t.fromEquals((function(t,r){for(var e in n)if(!n[e].equals(t[e],r[e]))return!1;return!0}))},t.tuple=function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return t.fromEquals((function(t,r){return n.every((function(n,e){return n.equals(t[e],r[e])}))}))},t.contramap=function(n){return function(r){return t.fromEquals((function(t,e){return r.equals(n(t),n(e))}))}},t.URI="Eq",t.eqStrict={equals:function(n,t){return n===t}};var r={equals:function(){return!0}};t.getSemigroup=function(){return{concat:function(n,r){return t.fromEquals((function(t,e){return n.equals(t,e)&&r.equals(t,e)}))}}},t.getMonoid=function(){return{concat:t.getSemigroup().concat,empty:r}},t.Contravariant={URI:t.URI,contramap:function(n,r){return g.pipe(n,t.contramap(r))}},t.getTupleEq=t.tuple,t.getStructEq=t.struct,t.strictEqual=t.eqStrict.equals,t.eq=t.Contravariant,t.eqBoolean=t.eqStrict,t.eqString=t.eqStrict,t.eqNumber=t.eqStrict,t.eqDate={equals:function(n,t){return n.valueOf()===t.valueOf()}}})),N=I((function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.ordDate=t.ordNumber=t.ordString=t.ordBoolean=t.ord=t.getDualOrd=t.getTupleOrd=t.between=t.clamp=t.max=t.min=t.geq=t.leq=t.gt=t.lt=t.equals=t.trivial=t.Contravariant=t.getMonoid=t.getSemigroup=t.URI=t.contramap=t.reverse=t.tuple=t.fromCompare=t.equalsDefault=void 0,t.equalsDefault=function(n){return function(t,r){return t===r||0===n(t,r)}},t.fromCompare=function(n){return{equals:t.equalsDefault(n),compare:function(t,r){return t===r?0:n(t,r)}}},t.tuple=function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return t.fromCompare((function(t,r){for(var e=0;e<n.length-1;e++){var u=n[e].compare(t[e],r[e]);if(0!==u)return u}return n[e].compare(t[e],r[e])}))},t.reverse=function(n){return t.fromCompare((function(t,r){return n.compare(r,t)}))},t.contramap=function(n){return function(r){return t.fromCompare((function(t,e){return r.compare(n(t),n(e))}))}},t.URI="Ord",t.getSemigroup=function(){return{concat:function(n,r){return t.fromCompare((function(t,e){var u=n.compare(t,e);return 0!==u?u:r.compare(t,e)}))}}},t.getMonoid=function(){return{concat:t.getSemigroup().concat,empty:t.fromCompare((function(){return 0}))}},t.Contravariant={URI:t.URI,contramap:function(n,r){return g.pipe(n,t.contramap(r))}},t.trivial={equals:g.constTrue,compare:g.constant(0)},t.equals=function(n){return function(t){return function(r){return r===t||0===n.compare(r,t)}}},t.lt=function(n){return function(t,r){return-1===n.compare(t,r)}},t.gt=function(n){return function(t,r){return 1===n.compare(t,r)}},t.leq=function(n){return function(t,r){return 1!==n.compare(t,r)}},t.geq=function(n){return function(t,r){return-1!==n.compare(t,r)}},t.min=function(n){return function(t,r){return t===r||n.compare(t,r)<1?t:r}},t.max=function(n){return function(t,r){return t===r||n.compare(t,r)>-1?t:r}},t.clamp=function(n){var r=t.min(n),e=t.max(n);return function(n,t){return function(u){return e(r(u,t),n)}}},t.between=function(n){var r=t.lt(n),e=t.gt(n);return function(n,t){return function(u){return!r(u,n)&&!e(u,t)}}},t.getTupleOrd=t.tuple,t.getDualOrd=t.reverse,t.ord=t.Contravariant;var r={equals:A.eqStrict.equals,compare:function(n,t){return n<t?-1:n>t?1:0}};t.ordBoolean=r,t.ordString=r,t.ordNumber=r,t.ordDate=g.pipe(t.ordNumber,t.contramap((function(n){return n.valueOf()})))})),W=I((function(n,t){var r=w&&w.__createBinding||(Object.create?function(n,t,r,e){void 0===e&&(e=r),Object.defineProperty(n,e,{enumerable:!0,get:function(){return t[r]}})}:function(n,t,r,e){void 0===e&&(e=r),n[e]=t[r]}),e=w&&w.__setModuleDefault||(Object.create?function(n,t){Object.defineProperty(n,"default",{enumerable:!0,value:t})}:function(n,t){n.default=t}),u=w&&w.__importStar||function(n){if(n&&n.__esModule)return n;var t={};if(null!=n)for(var u in n)"default"!==u&&Object.prototype.hasOwnProperty.call(n,u)&&r(t,n,u);return e(t,n),t};Object.defineProperty(t,"__esModule",{value:!0}),t.semigroupProduct=t.semigroupSum=t.semigroupString=t.getFunctionSemigroup=t.semigroupAny=t.semigroupAll=t.fold=t.getIntercalateSemigroup=t.getMeetSemigroup=t.getJoinSemigroup=t.getDualSemigroup=t.getStructSemigroup=t.getTupleSemigroup=t.getFirstSemigroup=t.getLastSemigroup=t.getObjectSemigroup=t.semigroupVoid=t.concatAll=t.last=t.first=t.intercalate=t.tuple=t.struct=t.reverse=t.constant=t.max=t.min=void 0;var i=u(U),o=u(E),c=u(N);t.min=function(n){return{concat:c.min(n)}},t.max=function(n){return{concat:c.max(n)}},t.constant=function(n){return{concat:function(){return n}}},t.reverse=o.reverse,t.struct=function(n){return{concat:function(t,r){var e={};for(var u in n)i.has.call(n,u)&&(e[u]=n[u].concat(t[u],r[u]));return e}}},t.tuple=function(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];return{concat:function(t,r){return n.map((function(n,e){return n.concat(t[e],r[e])}))}}},t.intercalate=function(n){return function(t){return{concat:function(r,e){return t.concat(r,t.concat(n,e))}}}},t.first=function(){return{concat:g.identity}},t.last=function(){return{concat:function(n,t){return t}}},t.concatAll=o.concatAll,t.semigroupVoid=t.constant(void 0),t.getObjectSemigroup=function(){return{concat:function(n,t){return Object.assign({},n,t)}}},t.getLastSemigroup=t.last,t.getFirstSemigroup=t.first,t.getTupleSemigroup=t.tuple,t.getStructSemigroup=t.struct,t.getDualSemigroup=t.reverse,t.getJoinSemigroup=t.max,t.getMeetSemigroup=t.min,t.getIntercalateSemigroup=t.intercalate,t.fold=function(n){var r=t.concatAll(n);return function(n,t){return void 0===t?r(n):r(n)(t)}},t.semigroupAll={concat:function(n,t){return n&&t}},t.semigroupAny={concat:function(n,t){return n||t}},t.getFunctionSemigroup=g.getSemigroup,t.semigroupString={concat:function(n,t){return n+t}},t.semigroupSum={concat:function(n,t){return n+t}},t.semigroupProduct={concat:function(n,t){return n*t}}})),T=I((function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.right=t.left=t.flap=t.Functor=t.Bifunctor=t.URI=t.bimap=t.mapLeft=t.map=t.separated=void 0,t.separated=function(n,t){return{left:n,right:t}},t.map=function(n){return function(r){return t.separated(t.left(r),n(t.right(r)))}},t.mapLeft=function(n){return function(r){return t.separated(n(t.left(r)),t.right(r))}},t.bimap=function(n,r){return function(e){return t.separated(n(t.left(e)),r(t.right(e)))}},t.URI="Separated",t.Bifunctor={URI:t.URI,mapLeft:function(n,r){return g.pipe(n,t.mapLeft(r))},bimap:function(n,r,e){return g.pipe(n,t.bimap(r,e))}},t.Functor={URI:t.URI,map:function(n,r){return g.pipe(n,t.map(r))}},t.flap=O.flap(t.Functor),t.left=function(n){return n.left},t.right=function(n){return n.right}})),S=I((function(n,t){var r=w&&w.__createBinding||(Object.create?function(n,t,r,e){void 0===e&&(e=r),Object.defineProperty(n,e,{enumerable:!0,get:function(){return t[r]}})}:function(n,t,r,e){void 0===e&&(e=r),n[e]=t[r]}),e=w&&w.__setModuleDefault||(Object.create?function(n,t){Object.defineProperty(n,"default",{enumerable:!0,value:t})}:function(n,t){n.default=t}),u=w&&w.__importStar||function(n){if(n&&n.__esModule)return n;var t={};if(null!=n)for(var u in n)"default"!==u&&Object.prototype.hasOwnProperty.call(n,u)&&r(t,n,u);return e(t,n),t};Object.defineProperty(t,"__esModule",{value:!0}),t.filterE=t.witherDefault=t.wiltDefault=void 0;var i=u(U);t.wiltDefault=function(n,t){return function(r){var e=n.traverse(r);return function(n,u){return r.map(e(n,u),t.separate)}}},t.witherDefault=function(n,t){return function(r){var e=n.traverse(r);return function(n,u){return r.map(e(n,u),t.compact)}}},t.filterE=function(n){return function(t){var r=n.wither(t);return function(n){return function(e){return r(e,(function(r){return t.map(n(r),(function(n){return n?i.some(r):i.none}))}))}}}}})),k=I((function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.guard=void 0,t.guard=function(n,t){return function(r){return r?t.of(void 0):n.zero()}}})),P=I((function(n,t){var r=w&&w.__createBinding||(Object.create?function(n,t,r,e){void 0===e&&(e=r),Object.defineProperty(n,e,{enumerable:!0,get:function(){return t[r]}})}:function(n,t,r,e){void 0===e&&(e=r),n[e]=t[r]}),e=w&&w.__setModuleDefault||(Object.create?function(n,t){Object.defineProperty(n,"default",{enumerable:!0,value:t})}:function(n,t){n.default=t}),u=w&&w.__importStar||function(n){if(n&&n.__esModule)return n;var t={};if(null!=n)for(var u in n)"default"!==u&&Object.prototype.hasOwnProperty.call(n,u)&&r(t,n,u);return e(t,n),t};Object.defineProperty(t,"__esModule",{value:!0}),t.fromEither=t.MonadThrow=t.throwError=t.Witherable=t.wilt=t.wither=t.Traversable=t.sequence=t.traverse=t.Filterable=t.partitionMap=t.partition=t.filterMap=t.filter=t.Compactable=t.separate=t.compact=t.Extend=t.extend=t.Alternative=t.guard=t.Zero=t.zero=t.Alt=t.alt=t.altW=t.Foldable=t.reduceRight=t.foldMap=t.reduce=t.Monad=t.Chain=t.chain=t.Applicative=t.Apply=t.ap=t.Pointed=t.of=t.Functor=t.map=t.getMonoid=t.getOrd=t.getEq=t.getShow=t.URI=t.getRight=t.getLeft=t.fromPredicate=t.some=t.none=void 0,t.getLastMonoid=t.getFirstMonoid=t.getApplyMonoid=t.getApplySemigroup=t.option=t.mapNullable=t.getRefinement=t.sequenceArray=t.traverseArray=t.traverseArrayWithIndex=t.traverseReadonlyArrayWithIndex=t.traverseReadonlyNonEmptyArrayWithIndex=t.ApT=t.apS=t.bind=t.bindTo=t.Do=t.exists=t.elem=t.toUndefined=t.toNullable=t.chainNullableK=t.fromNullableK=t.tryCatchK=t.tryCatch=t.fromNullable=t.chainEitherK=t.fromEitherK=t.duplicate=t.chainFirst=t.flatten=t.apSecond=t.apFirst=t.flap=t.getOrElse=t.getOrElseW=t.fold=t.match=t.foldW=t.matchW=t.isNone=t.isSome=t.FromEither=void 0;var i=u(U);t.none=i.none,t.some=i.some,t.fromPredicate=function(n){return function(r){return n(r)?t.some(r):t.none}},t.getLeft=function(n){return"Right"===n._tag?t.none:t.some(n.left)},t.getRight=function(n){return"Left"===n._tag?t.none:t.some(n.right)};var o=function(n,r){return g.pipe(n,t.map(r))},c=function(n,r){return g.pipe(n,t.ap(r))},f=function(n,r){return g.pipe(n,t.chain(r))},a=function(n,r,e){return g.pipe(n,t.reduce(r,e))},s=function(n){var r=t.foldMap(n);return function(n,t){return g.pipe(n,r(t))}},v=function(n,r,e){return g.pipe(n,t.reduceRight(r,e))},d=function(n){var r=t.traverse(n);return function(n,t){return g.pipe(n,r(t))}},l=function(n,r){return g.pipe(n,t.alt(r))},p=function(n,r){return g.pipe(n,t.filter(r))},h=function(n,r){return g.pipe(n,t.filterMap(r))},m=function(n,r){return g.pipe(n,t.extend(r))},b=function(n,r){return g.pipe(n,t.partition(r))},y=function(n,r){return g.pipe(n,t.partitionMap(r))};t.URI="Option",t.getShow=function(n){return{show:function(r){return t.isNone(r)?"none":"some("+n.show(r.value)+")"}}},t.getEq=function(n){return{equals:function(r,e){return r===e||(t.isNone(r)?t.isNone(e):!t.isNone(e)&&n.equals(r.value,e.value))}}},t.getOrd=function(n){return{equals:t.getEq(n).equals,compare:function(r,e){return r===e?0:t.isSome(r)?t.isSome(e)?n.compare(r.value,e.value):1:-1}}},t.getMonoid=function(n){return{concat:function(r,e){return t.isNone(r)?e:t.isNone(e)?r:t.some(n.concat(r.value,e.value))},empty:t.none}},t.map=function(n){return function(r){return t.isNone(r)?t.none:t.some(n(r.value))}},t.Functor={URI:t.URI,map:o},t.of=t.some,t.Pointed={URI:t.URI,of:t.of},t.ap=function(n){return function(r){return t.isNone(r)||t.isNone(n)?t.none:t.some(r.value(n.value))}},t.Apply={URI:t.URI,map:o,ap:c},t.Applicative={URI:t.URI,map:o,ap:c,of:t.of},t.chain=function(n){return function(r){return t.isNone(r)?t.none:n(r.value)}},t.Chain={URI:t.URI,map:o,ap:c,chain:f},t.Monad={URI:t.URI,map:o,ap:c,of:t.of,chain:f},t.reduce=function(n,r){return function(e){return t.isNone(e)?n:r(n,e.value)}},t.foldMap=function(n){return function(r){return function(e){return t.isNone(e)?n.empty:r(e.value)}}},t.reduceRight=function(n,r){return function(e){return t.isNone(e)?n:r(e.value,n)}},t.Foldable={URI:t.URI,reduce:a,foldMap:s,reduceRight:v},t.altW=function(n){return function(r){return t.isNone(r)?n():r}},t.alt=t.altW,t.Alt={URI:t.URI,map:o,alt:l},t.zero=function(){return t.none},t.Zero={URI:t.URI,zero:t.zero},t.guard=k.guard(t.Zero,t.Pointed),t.Alternative={URI:t.URI,map:o,ap:c,of:t.of,alt:l,zero:t.zero},t.extend=function(n){return function(r){return t.isNone(r)?t.none:t.some(n(r))}},t.Extend={URI:t.URI,map:o,extend:m},t.compact=t.chain(g.identity);var I=T.separated(t.none,t.none);t.separate=function(n){return t.isNone(n)?I:T.separated(t.getLeft(n.value),t.getRight(n.value))},t.Compactable={URI:t.URI,compact:t.compact,separate:t.separate},t.filter=function(n){return function(r){return t.isNone(r)?t.none:n(r.value)?r:t.none}},t.filterMap=function(n){return function(r){return t.isNone(r)?t.none:n(r.value)}},t.partition=function(n){return function(t){return T.separated(p(t,x.not(n)),p(t,n))}},t.partitionMap=function(n){return g.flow(t.map(n),t.separate)},t.Filterable={URI:t.URI,map:o,compact:t.compact,separate:t.separate,filter:p,filterMap:h,partition:b,partitionMap:y},t.traverse=function(n){return function(r){return function(e){return t.isNone(e)?n.of(t.none):n.map(r(e.value),t.some)}}},t.sequence=function(n){return function(r){return t.isNone(r)?n.of(t.none):n.map(r.value,t.some)}},t.Traversable={URI:t.URI,map:o,reduce:a,foldMap:s,reduceRight:v,traverse:d,sequence:t.sequence};var E=S.witherDefault(t.Traversable,t.Compactable),A=S.wiltDefault(t.Traversable,t.Compactable);t.wither=function(n){var t=E(n);return function(n){return function(r){return t(r,n)}}},t.wilt=function(n){var t=A(n);return function(n){return function(r){return t(r,n)}}},t.Witherable={URI:t.URI,map:o,reduce:a,foldMap:s,reduceRight:v,traverse:d,sequence:t.sequence,compact:t.compact,separate:t.separate,filter:p,filterMap:h,partition:b,partitionMap:y,wither:E,wilt:A},t.throwError=function(){return t.none},t.MonadThrow={URI:t.URI,map:o,ap:c,of:t.of,chain:f,throwError:t.throwError},t.fromEither=t.getRight,t.FromEither={URI:t.URI,fromEither:t.fromEither},t.isSome=i.isSome,t.isNone=function(n){return"None"===n._tag},t.matchW=function(n,r){return function(e){return t.isNone(e)?n():r(e.value)}},t.foldW=t.matchW,t.match=t.matchW,t.fold=t.match,t.getOrElseW=function(n){return function(r){return t.isNone(r)?n():r.value}},t.getOrElse=t.getOrElseW,t.flap=O.flap(t.Functor),t.apFirst=R.apFirst(t.Apply),t.apSecond=R.apSecond(t.Apply),t.flatten=t.compact,t.chainFirst=_.chainFirst(t.Chain),t.duplicate=t.extend(g.identity),t.fromEitherK=M.fromEitherK(t.FromEither),t.chainEitherK=M.chainEitherK(t.FromEither,t.Chain),t.fromNullable=function(n){return null==n?t.none:t.some(n)},t.tryCatch=function(n){try{return t.some(n())}catch(n){return t.none}},t.tryCatchK=function(n){return function(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];return t.tryCatch((function(){return n.apply(void 0,r)}))}},t.fromNullableK=function(n){return g.flow(n,t.fromNullable)},t.chainNullableK=function(n){return function(r){return t.isNone(r)?t.none:t.fromNullable(n(r.value))}},t.toNullable=t.match(g.constNull,g.identity),t.toUndefined=t.match(g.constUndefined,g.identity),t.elem=function n(r){return function(e,u){if(void 0===u){var i=n(r);return function(n){return i(e,n)}}return!t.isNone(u)&&r.equals(e,u.value)}},t.exists=function(n){return function(r){return!t.isNone(r)&&n(r.value)}},t.Do=t.of(i.emptyRecord),t.bindTo=O.bindTo(t.Functor),t.bind=_.bind(t.Chain),t.apS=R.apS(t.Apply),t.ApT=t.of(i.emptyReadonlyArray),t.traverseReadonlyNonEmptyArrayWithIndex=function(n){return function(r){var e=n(0,i.head(r));if(t.isNone(e))return t.none;for(var u=[e.value],o=1;o<r.length;o++){var c=n(o,r[o]);if(t.isNone(c))return t.none;u.push(c.value)}return t.some(u)}},t.traverseReadonlyArrayWithIndex=function(n){var r=t.traverseReadonlyNonEmptyArrayWithIndex(n);return function(n){return i.isNonEmpty(n)?r(n):t.ApT}},t.traverseArrayWithIndex=t.traverseReadonlyArrayWithIndex,t.traverseArray=function(n){return t.traverseReadonlyArrayWithIndex((function(t,r){return n(r)}))},t.sequenceArray=t.traverseArray(g.identity),t.getRefinement=function(n){return function(r){return t.isSome(n(r))}},t.mapNullable=t.chainNullableK,t.option={URI:t.URI,map:o,of:t.of,ap:c,chain:f,reduce:a,foldMap:s,reduceRight:v,traverse:d,sequence:t.sequence,zero:t.zero,alt:l,extend:m,compact:t.compact,separate:t.separate,filter:p,filterMap:h,partition:b,partitionMap:y,wither:E,wilt:A,throwError:t.throwError},t.getApplySemigroup=R.getApplySemigroup(t.Apply),t.getApplyMonoid=j.getApplicativeMonoid(t.Applicative),t.getFirstMonoid=function(){return t.getMonoid(W.first())},t.getLastMonoid=function(){return t.getMonoid(W.last())}}));const C=n=>!("isConnected"in n)||n.isConnected,q=(()=>{let n;return(...t)=>{n&&clearTimeout(n),n=setTimeout((()=>{n=0,(n=>{for(let t of n.keys())n.set(t,n.get(t).filter(C))})(...t)}),2e3)}})(),D=(r,e)=>{const u=((n,t=((n,t)=>n!==t))=>{let r=new Map(Object.entries(null!=n?n:{}));const e={dispose:[],get:[],set:[],reset:[]},u=()=>{r=new Map(Object.entries(null!=n?n:{})),e.reset.forEach((n=>n()))},i=n=>(e.get.forEach((t=>t(n))),r.get(n)),o=(n,u)=>{const i=r.get(n);t(u,i,n)&&(r.set(n,u),e.set.forEach((t=>t(n,u,i))))},c="undefined"==typeof Proxy?{}:new Proxy(n,{get:(n,t)=>i(t),ownKeys:()=>Array.from(r.keys()),getOwnPropertyDescriptor:()=>({enumerable:!0,configurable:!0}),has:(n,t)=>r.has(t),set:(n,t,r)=>(o(t,r),!0)}),f=(n,t)=>(e[n].push(t),()=>{((n,t)=>{const r=n.indexOf(t);r>=0&&(n[r]=n[n.length-1],n.length--)})(e[n],t)});return{state:c,get:i,set:o,on:f,onChange:(t,r)=>{const e=f("set",((n,e)=>{n===t&&r(e)})),u=f("reset",(()=>r(n[t])));return()=>{e(),u()}},use:(...n)=>{const t=n.reduce(((n,t)=>(t.set&&n.push(f("set",t.set)),t.get&&n.push(f("get",t.get)),t.reset&&n.push(f("reset",t.reset)),t.dispose&&n.push(f("dispose",t.dispose)),n)),[]);return()=>t.forEach((n=>n()))},dispose:()=>{e.dispose.forEach((n=>n())),u()},reset:u,forceUpdate:n=>{const t=r.get(n);e.set.forEach((r=>r(n,t,t)))}}})(r,e);return u.use((()=>{if("function"!=typeof n)return{};const r=new Map;return{dispose:()=>r.clear(),get:t=>{const e=n();e&&((n,t,r)=>{const e=n.get(t);e?e.includes(r)||e.push(r):n.set(t,[r])})(r,t,e)},set:n=>{const e=r.get(n);e&&r.set(n,e.filter(t)),q(r)},reset:()=>{r.forEach((n=>n.forEach(t))),q(r)}}})()),u};function z(n,t,r){return function(e){for(var u=Array(r.length+1),i=0;i<r.length;i++)u[i]=r[i];return u[r.length]=e,0===t?n.apply(null,u):z(n,t-1,u)}}var L={1:function(n){return[n]},2:function(n){return function(t){return[n,t]}},3:function(n){return function(t){return function(r){return[n,t,r]}}},4:function(n){return function(t){return function(r){return function(e){return[n,t,r,e]}}}},5:function(n){return function(t){return function(r){return function(e){return function(u){return[n,t,r,e,u]}}}}}};function F(n){return L.hasOwnProperty(n)||(L[n]=z(u,n-1,[])),L[n]}function H(n){return function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];for(var e=t.length,u=F(e),i=n.map(t[0],u),o=1;o<e;o++)i=n.ap(i,t[o]);return i}}function B(n){return function(t){return function(r){return n.fromEither("None"===r._tag?c(t()):f(r.value))}}}var G=c,V=f,J=function(n,t){return i(n,$(t))},$=function(n){return function(t){return Q(t)?t:V(n(t.right))}},K={URI:"Either",map:J},X={URI:"Either",map:J,ap:function(n,t){return i(n,function(n){return function(t){return Q(t)?t:Q(n)?n:V(t.right(n.right))}}(t))}},Z=function(n){return function(t){return Q(t)?G(n(t.left)):t}},Y=B({URI:"Either",fromEither:r}),Q=function(n){return"Left"===n._tag},nn=function(n,t){return function(r){return Q(r)?n(r.left):t(r.right)}},tn=o,rn=function(n){return{_tag:"Some",value:n}},en=function(n){return{concat:function(t,r){return un(t)?r:un(r)?t:rn(n.concat(t.value,r.value))},empty:tn}},un=function(n){return"None"===n._tag},on=function(n){return null==n?tn:rn(n)};function cn(n){return function(t){return n.map(t,V)}}function fn(n){return function(n,t){return function(r){return function(e){return n.map(e,(function(n){return t.map(n,r)}))}}}(n,K)}function an(n){return function(n,t){return function(r){return function(e){return n.ap(n.map(e,(function(n){return function(r){return t.ap(n,r)}})),r)}}}(n,X)}function sn(n){return function(t){return function(r){return n.chain(r,(function(r){return Q(r)?n.of(r):t(r.right)}))}}}function vn(n){return function(t){return function(r){return n.map(r,Z(t))}}}function dn(n,t){return function(r){var u=e(r,n.fromTask);return function(n){return t.chain(n,u)}}}var ln=function(n){return function(){return Promise.resolve().then(n)}},pn=function(n,t){return i(n,mn(t))},hn=function(n,t){return i(n,bn(t))},mn=function(n){return function(t){return function(){return Promise.resolve().then(t).then(n)}}},bn=function(n){return function(t){return function(){return Promise.all([Promise.resolve().then(t),Promise.resolve().then(n)]).then((function(n){return(0,n[0])(n[1])}))}}},yn=function(n){return function(){return Promise.resolve(n)}},wn={URI:"Task",map:pn},In={URI:"Task",map:pn,ap:hn},gn={URI:"Task",map:pn,of:yn,ap:hn,chain:function(n,t){return i(n,function(n){return function(t){return function(){return Promise.resolve().then(t).then((function(t){return n(t)()}))}}}(t))}},Rn=cn(wn),On=e(ln,Rn),jn=Rn,_n=yn,Un=fn(wn),Mn=vn(wn),xn=an(In),En=sn(gn),An=En,Nn="TaskEither",Wn={URI:Nn,map:function(n,t){return i(n,Un(t))},ap:function(n,t){return i(n,xn(t))},chain:function(n,t){return i(n,En(t))}},Tn=B({URI:Nn,fromEither:_n}),Sn=dn({URI:Nn,fromIO:On,fromTask:jn},Wn),kn=I((function(n,t){var r=w&&w.__createBinding||(Object.create?function(n,t,r,e){void 0===e&&(e=r),Object.defineProperty(n,e,{enumerable:!0,get:function(){return t[r]}})}:function(n,t,r,e){void 0===e&&(e=r),n[e]=t[r]}),e=w&&w.__setModuleDefault||(Object.create?function(n,t){Object.defineProperty(n,"default",{enumerable:!0,value:t})}:function(n,t){n.default=t}),u=w&&w.__importStar||function(n){if(n&&n.__esModule)return n;var t={};if(null!=n)for(var u in n)"default"!==u&&Object.prototype.hasOwnProperty.call(n,u)&&r(t,n,u);return e(t,n),t};Object.defineProperty(t,"__esModule",{value:!0}),t.getCompactableComposition=t.separate=t.compact=void 0;var i=u(T);function o(n,t){return function(r){return n.map(r,t.compact)}}function c(n,t,r){var e=o(n,t),u=O.map(n,r);return function(n){return i.separated(e(g.pipe(n,u(P.getLeft))),e(g.pipe(n,u(P.getRight))))}}t.compact=o,t.separate=c,t.getCompactableComposition=function(n,t){return{map:O.getFunctorComposition(n,t).map,compact:o(n,t),separate:c(n,t,t)}}})),Pn=I((function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.tailRec=void 0,t.tailRec=function(n,t){for(var r=t(n);"Left"===r._tag;)r=t(r.left);return r.right}})),Cn=I((function(n,t){var r=w&&w.__createBinding||(Object.create?function(n,t,r,e){void 0===e&&(e=r),Object.defineProperty(n,e,{enumerable:!0,get:function(){return t[r]}})}:function(n,t,r,e){void 0===e&&(e=r),n[e]=t[r]}),e=w&&w.__setModuleDefault||(Object.create?function(n,t){Object.defineProperty(n,"default",{enumerable:!0,value:t})}:function(n,t){n.default=t}),u=w&&w.__importStar||function(n){if(n&&n.__esModule)return n;var t={};if(null!=n)for(var u in n)"default"!==u&&Object.prototype.hasOwnProperty.call(n,u)&&r(t,n,u);return e(t,n),t};Object.defineProperty(t,"__esModule",{value:!0}),t.fold=t.match=t.foldW=t.matchW=t.isRight=t.isLeft=t.fromOption=t.fromPredicate=t.FromEither=t.MonadThrow=t.throwError=t.ChainRec=t.Extend=t.extend=t.Alt=t.alt=t.altW=t.Bifunctor=t.mapLeft=t.bimap=t.Traversable=t.sequence=t.traverse=t.Foldable=t.reduceRight=t.foldMap=t.reduce=t.Monad=t.Chain=t.chain=t.chainW=t.Applicative=t.Apply=t.ap=t.apW=t.Pointed=t.of=t.Functor=t.map=t.getAltValidation=t.getApplicativeValidation=t.getWitherable=t.getFilterable=t.getCompactable=t.getSemigroup=t.getEq=t.getShow=t.URI=t.right=t.left=void 0,t.getValidation=t.getValidationMonoid=t.getValidationSemigroup=t.getApplyMonoid=t.getApplySemigroup=t.either=t.stringifyJSON=t.parseJSON=t.sequenceArray=t.traverseArray=t.traverseArrayWithIndex=t.traverseReadonlyArrayWithIndex=t.traverseReadonlyNonEmptyArrayWithIndex=t.ApT=t.apSW=t.apS=t.bindW=t.bind=t.bindTo=t.Do=t.exists=t.elem=t.toError=t.toUnion=t.chainNullableK=t.fromNullableK=t.tryCatchK=t.tryCatch=t.fromNullable=t.orElse=t.orElseW=t.swap=t.filterOrElseW=t.filterOrElse=t.chainOptionK=t.fromOptionK=t.duplicate=t.flatten=t.flattenW=t.chainFirstW=t.chainFirst=t.apSecond=t.apFirst=t.flap=t.getOrElse=t.getOrElseW=void 0;var i=u(U);t.left=i.left,t.right=i.right;var o=function(n,r){return g.pipe(n,t.map(r))},c=function(n,r){return g.pipe(n,t.ap(r))},f=function(n,r){return g.pipe(n,t.chain(r))},a=function(n,r,e){return g.pipe(n,t.reduce(r,e))},s=function(n){return function(r,e){var u=t.foldMap(n);return g.pipe(r,u(e))}},v=function(n,r,e){return g.pipe(n,t.reduceRight(r,e))},d=function(n){var r=t.traverse(n);return function(n,t){return g.pipe(n,r(t))}},l=function(n,r,e){return g.pipe(n,t.bimap(r,e))},p=function(n,r){return g.pipe(n,t.mapLeft(r))},h=function(n,r){return g.pipe(n,t.alt(r))},m=function(n,r){return g.pipe(n,t.extend(r))},b=function(n,r){return Pn.tailRec(r(n),(function(n){return t.isLeft(n)?t.right(t.left(n.left)):t.isLeft(n.right)?t.left(r(n.right.left)):t.right(t.right(n.right.right))}))};t.URI="Either",t.getShow=function(n,r){return{show:function(e){return t.isLeft(e)?"left("+n.show(e.left)+")":"right("+r.show(e.right)+")"}}},t.getEq=function(n,r){return{equals:function(e,u){return e===u||(t.isLeft(e)?t.isLeft(u)&&n.equals(e.left,u.left):t.isRight(u)&&r.equals(e.right,u.right))}}},t.getSemigroup=function(n){return{concat:function(r,e){return t.isLeft(e)?r:t.isLeft(r)?e:t.right(n.concat(r.right,e.right))}}},t.getCompactable=function(n){var r=t.left(n.empty);return{URI:t.URI,_E:void 0,compact:function(n){return t.isLeft(n)?n:"None"===n.right._tag?r:t.right(n.right.value)},separate:function(n){return t.isLeft(n)?T.separated(n,n):t.isLeft(n.right)?T.separated(t.right(n.right.left),r):T.separated(r,t.right(n.right.right))}}},t.getFilterable=function(n){var r=t.left(n.empty),e=t.getCompactable(n);return{URI:t.URI,_E:void 0,map:o,compact:e.compact,separate:e.separate,filter:function(n,e){return t.isLeft(n)||e(n.right)?n:r},filterMap:function(n,e){if(t.isLeft(n))return n;var u=e(n.right);return"None"===u._tag?r:t.right(u.value)},partition:function(n,e){return t.isLeft(n)?T.separated(n,n):e(n.right)?T.separated(r,t.right(n.right)):T.separated(t.right(n.right),r)},partitionMap:function(n,e){if(t.isLeft(n))return T.separated(n,n);var u=e(n.right);return t.isLeft(u)?T.separated(t.right(u.left),r):T.separated(r,t.right(u.right))}}},t.getWitherable=function(n){var r=t.getFilterable(n),e=t.getCompactable(n);return{URI:t.URI,_E:void 0,map:o,compact:r.compact,separate:r.separate,filter:r.filter,filterMap:r.filterMap,partition:r.partition,partitionMap:r.partitionMap,traverse:d,sequence:t.sequence,reduce:a,foldMap:s,reduceRight:v,wither:S.witherDefault(t.Traversable,e),wilt:S.wiltDefault(t.Traversable,e)}},t.getApplicativeValidation=function(n){return{URI:t.URI,_E:void 0,map:o,ap:function(r,e){return t.isLeft(r)?t.isLeft(e)?t.left(n.concat(r.left,e.left)):r:t.isLeft(e)?e:t.right(r.right(e.right))},of:t.of}},t.getAltValidation=function(n){return{URI:t.URI,_E:void 0,map:o,alt:function(r,e){if(t.isRight(r))return r;var u=e();return t.isLeft(u)?t.left(n.concat(r.left,u.left)):u}}},t.map=function(n){return function(r){return t.isLeft(r)?r:t.right(n(r.right))}},t.Functor={URI:t.URI,map:o},t.of=t.right,t.Pointed={URI:t.URI,of:t.of},t.apW=function(n){return function(r){return t.isLeft(r)?r:t.isLeft(n)?n:t.right(r.right(n.right))}},t.ap=t.apW,t.Apply={URI:t.URI,map:o,ap:c},t.Applicative={URI:t.URI,map:o,ap:c,of:t.of},t.chainW=function(n){return function(r){return t.isLeft(r)?r:n(r.right)}},t.chain=t.chainW,t.Chain={URI:t.URI,map:o,ap:c,chain:f},t.Monad={URI:t.URI,map:o,ap:c,of:t.of,chain:f},t.reduce=function(n,r){return function(e){return t.isLeft(e)?n:r(n,e.right)}},t.foldMap=function(n){return function(r){return function(e){return t.isLeft(e)?n.empty:r(e.right)}}},t.reduceRight=function(n,r){return function(e){return t.isLeft(e)?n:r(e.right,n)}},t.Foldable={URI:t.URI,reduce:a,foldMap:s,reduceRight:v},t.traverse=function(n){return function(r){return function(e){return t.isLeft(e)?n.of(t.left(e.left)):n.map(r(e.right),t.right)}}},t.sequence=function(n){return function(r){return t.isLeft(r)?n.of(t.left(r.left)):n.map(r.right,t.right)}},t.Traversable={URI:t.URI,map:o,reduce:a,foldMap:s,reduceRight:v,traverse:d,sequence:t.sequence},t.bimap=function(n,r){return function(e){return t.isLeft(e)?t.left(n(e.left)):t.right(r(e.right))}},t.mapLeft=function(n){return function(r){return t.isLeft(r)?t.left(n(r.left)):r}},t.Bifunctor={URI:t.URI,bimap:l,mapLeft:p},t.altW=function(n){return function(r){return t.isLeft(r)?n():r}},t.alt=t.altW,t.Alt={URI:t.URI,map:o,alt:h},t.extend=function(n){return function(r){return t.isLeft(r)?r:t.right(n(r))}},t.Extend={URI:t.URI,map:o,extend:m},t.ChainRec={URI:t.URI,map:o,ap:c,chain:f,chainRec:b},t.throwError=t.left,t.MonadThrow={URI:t.URI,map:o,ap:c,of:t.of,chain:f,throwError:t.throwError},t.FromEither={URI:t.URI,fromEither:g.identity},t.fromPredicate=M.fromPredicate(t.FromEither),t.fromOption=M.fromOption(t.FromEither),t.isLeft=i.isLeft,t.isRight=i.isRight,t.matchW=function(n,r){return function(e){return t.isLeft(e)?n(e.left):r(e.right)}},t.foldW=t.matchW,t.match=t.matchW,t.fold=t.match,t.getOrElseW=function(n){return function(r){return t.isLeft(r)?n(r.left):r.right}},t.getOrElse=t.getOrElseW,t.flap=O.flap(t.Functor),t.apFirst=R.apFirst(t.Apply),t.apSecond=R.apSecond(t.Apply),t.chainFirst=_.chainFirst(t.Chain),t.chainFirstW=t.chainFirst,t.flattenW=t.chainW(g.identity),t.flatten=t.flattenW,t.duplicate=t.extend(g.identity),t.fromOptionK=M.fromOptionK(t.FromEither),t.chainOptionK=M.chainOptionK(t.FromEither,t.Chain),t.filterOrElse=M.filterOrElse(t.FromEither,t.Chain),t.filterOrElseW=t.filterOrElse,t.swap=function(n){return t.isLeft(n)?t.right(n.left):t.left(n.right)},t.orElseW=function(n){return function(r){return t.isLeft(r)?n(r.left):r}},t.orElse=t.orElseW,t.fromNullable=function(n){return function(r){return null==r?t.left(n):t.right(r)}},t.tryCatch=function(n,r){try{return t.right(n())}catch(n){return t.left(r(n))}},t.tryCatchK=function(n,r){return function(){for(var e=[],u=0;u<arguments.length;u++)e[u]=arguments[u];return t.tryCatch((function(){return n.apply(void 0,e)}),r)}},t.fromNullableK=function(n){var r=t.fromNullable(n);return function(n){return g.flow(n,r)}},t.chainNullableK=function(n){var r=t.fromNullableK(n);return function(n){return t.chain(r(n))}},t.toUnion=t.foldW(g.identity,g.identity),t.toError=function(n){return n instanceof Error?n:new Error(String(n))},t.elem=function n(r){return function(e,u){if(void 0===u){var i=n(r);return function(n){return i(e,n)}}return!t.isLeft(u)&&r.equals(e,u.right)}},t.exists=function(n){return function(r){return!t.isLeft(r)&&n(r.right)}},t.Do=t.of(i.emptyRecord),t.bindTo=O.bindTo(t.Functor),t.bind=_.bind(t.Chain),t.bindW=t.bind,t.apS=R.apS(t.Apply),t.apSW=t.apS,t.ApT=t.of(i.emptyReadonlyArray),t.traverseReadonlyNonEmptyArrayWithIndex=function(n){return function(r){var e=n(0,i.head(r));if(t.isLeft(e))return e;for(var u=[e.right],o=1;o<r.length;o++){var c=n(o,r[o]);if(t.isLeft(c))return c;u.push(c.right)}return t.right(u)}},t.traverseReadonlyArrayWithIndex=function(n){var r=t.traverseReadonlyNonEmptyArrayWithIndex(n);return function(n){return i.isNonEmpty(n)?r(n):t.ApT}},t.traverseArrayWithIndex=t.traverseReadonlyArrayWithIndex,t.traverseArray=function(n){return t.traverseReadonlyArrayWithIndex((function(t,r){return n(r)}))},t.sequenceArray=t.traverseArray(g.identity),t.parseJSON=function(n,r){return t.tryCatch((function(){return JSON.parse(n)}),r)},t.stringifyJSON=function(n,r){return t.tryCatch((function(){var t=JSON.stringify(n);if("string"!=typeof t)throw new Error("Converting unsupported structure to JSON");return t}),r)},t.either={URI:t.URI,map:o,of:t.of,ap:c,chain:f,reduce:a,foldMap:s,reduceRight:v,traverse:d,sequence:t.sequence,bimap:l,mapLeft:p,alt:h,extend:m,chainRec:b,throwError:t.throwError},t.getApplySemigroup=R.getApplySemigroup(t.Apply),t.getApplyMonoid=j.getApplicativeMonoid(t.Applicative),t.getValidationSemigroup=function(n,r){return R.getApplySemigroup(t.getApplicativeValidation(n))(r)},t.getValidationMonoid=function(n,r){return j.getApplicativeMonoid(t.getApplicativeValidation(n))(r)},t.getValidation=function(n){var r=t.getApplicativeValidation(n).ap,e=t.getAltValidation(n).alt;return{URI:t.URI,_E:void 0,map:o,of:t.of,chain:f,bimap:l,mapLeft:p,reduce:a,foldMap:s,reduceRight:v,extend:m,traverse:d,sequence:t.sequence,chainRec:b,throwError:t.throwError,ap:r,alt:e}}})),qn=I((function(n,t){var r=w&&w.__createBinding||(Object.create?function(n,t,r,e){void 0===e&&(e=r),Object.defineProperty(n,e,{enumerable:!0,get:function(){return t[r]}})}:function(n,t,r,e){void 0===e&&(e=r),n[e]=t[r]}),e=w&&w.__setModuleDefault||(Object.create?function(n,t){Object.defineProperty(n,"default",{enumerable:!0,value:t})}:function(n,t){n.default=t}),u=w&&w.__importStar||function(n){if(n&&n.__esModule)return n;var t={};if(null!=n)for(var u in n)"default"!==u&&Object.prototype.hasOwnProperty.call(n,u)&&r(t,n,u);return e(t,n),t};Object.defineProperty(t,"__esModule",{value:!0}),t.getEitherM=t.toUnion=t.swap=t.orLeft=t.orElseFirst=t.orElse=t.getOrElse=t.matchE=t.match=t.altValidation=t.mapLeft=t.bimap=t.alt=t.chain=t.ap=t.map=t.leftF=t.rightF=t.left=t.right=void 0;var i=u(Cn);function o(n){return g.flow(i.right,n.of)}function c(n){return g.flow(i.left,n.of)}function f(n){return function(t){return n.map(t,i.right)}}function a(n){return function(t){return n.map(t,i.left)}}function s(n){return O.map(n,i.Functor)}function v(n){return R.ap(n,i.Apply)}function d(n){return function(t){return function(r){return n.chain(r,(function(r){return i.isLeft(r)?n.of(r):t(r.right)}))}}}function l(n){return function(t){return function(r){return n.chain(r,(function(r){return i.isLeft(r)?t():n.of(r)}))}}}function p(n){return function(t,r){return function(e){return n.map(e,i.bimap(t,r))}}}function h(n){return function(t){return function(r){return n.map(r,i.mapLeft(t))}}}function m(n){return function(t,r){return function(e){return n.chain(e,i.match(t,r))}}}function b(n){return function(t){return function(r){return n.chain(r,i.match(t,n.of))}}}function y(n){return function(t){return function(r){return n.chain(r,(function(r){return i.isLeft(r)?t(r.left):n.of(r)}))}}}function I(n){return function(t){return n.map(t,i.swap)}}t.right=o,t.left=c,t.rightF=f,t.leftF=a,t.map=s,t.ap=v,t.chain=d,t.alt=l,t.bimap=p,t.mapLeft=h,t.altValidation=function(n,t){return function(r){return function(e){return n.chain(e,i.match((function(e){return n.map(r(),i.mapLeft((function(n){return t.concat(e,n)})))}),o(n)))}}},t.match=function(n){return function(t,r){return function(e){return n.map(e,i.match(t,r))}}},t.matchE=m,t.getOrElse=b,t.orElse=y,t.orElseFirst=function(n){var t=y(n);return function(r){return t((function(t){return n.map(r(t),(function(n){return i.isLeft(n)?n:i.left(t)}))}))}},t.orLeft=function(n){return function(t){return function(r){return n.chain(r,i.match((function(r){return n.map(t(r),i.left)}),(function(t){return n.of(i.right(t))})))}}},t.swap=I,t.toUnion=function(n){return function(t){return n.map(t,i.toUnion)}},t.getEitherM=function(n){var t=v(n),r=s(n),e=d(n),u=l(n),i=p(n),w=h(n),R=m(n),O=b(n),j=y(n);return{map:function(n,t){return g.pipe(n,r(t))},ap:function(n,r){return g.pipe(n,t(r))},of:o(n),chain:function(n,t){return g.pipe(n,e(t))},alt:function(n,t){return g.pipe(n,u(t))},bimap:function(n,t,r){return g.pipe(n,i(t,r))},mapLeft:function(n,t){return g.pipe(n,w(t))},fold:function(n,t,r){return g.pipe(n,R(t,r))},getOrElse:function(n,t){return g.pipe(n,O(t))},orElse:function(n,t){return g.pipe(n,j(t))},swap:I(n),rightM:f(n),leftM:a(n),left:c(n)}}})),Dn=I((function(n,t){function r(n,t){return function(r){return function(e){return n.map(e,(function(n){return t.filter(n,r)}))}}}function e(n,t){return function(r){return function(e){return n.map(e,(function(n){return t.filterMap(n,r)}))}}}function u(n,t){var e=r(n,t);return function(n){var t=e(x.not(n)),r=e(n);return function(n){return T.separated(t(n),r(n))}}}function i(n,t){var r=e(n,t);return function(n){return function(t){return T.separated(g.pipe(t,r((function(t){return P.getLeft(n(t))}))),g.pipe(t,r((function(t){return P.getRight(n(t))}))))}}}Object.defineProperty(t,"__esModule",{value:!0}),t.getFilterableComposition=t.partitionMap=t.partition=t.filterMap=t.filter=void 0,t.filter=r,t.filterMap=e,t.partition=u,t.partitionMap=i,t.getFilterableComposition=function(n,t){var o=O.getFunctorComposition(n,t).map,c=kn.compact(n,t),f=kn.separate(n,t,t),a=r(n,t),s=e(n,t),v=u(n,t),d=i(n,t);return{map:o,compact:c,separate:f,filter:function(n,t){return g.pipe(n,a(t))},filterMap:function(n,t){return g.pipe(n,s(t))},partition:function(n,t){return g.pipe(n,v(t))},partitionMap:function(n,t){return g.pipe(n,d(t))}}}})),zn=I((function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.chainFirstIOK=t.chainIOK=t.fromIOK=void 0,t.fromIOK=function(n){return function(t){return g.flow(t,n.fromIO)}},t.chainIOK=function(n,t){return function(r){var e=g.flow(r,n.fromIO);return function(n){return t.chain(n,e)}}},t.chainFirstIOK=function(n,t){var r=_.chainFirst(t);return function(t){return r(g.flow(t,n.fromIO))}}})),Ln=I((function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.chainFirstTaskK=t.chainTaskK=t.fromTaskK=void 0,t.fromTaskK=function(n){return function(t){return g.flow(t,n.fromTask)}},t.chainTaskK=function(n,t){return function(r){var e=g.flow(r,n.fromTask);return function(n){return t.chain(n,e)}}},t.chainFirstTaskK=function(n,t){var r=_.chainFirst(t);return function(t){return r(g.flow(t,n.fromTask))}}})),Fn=I((function(n,t){var r=w&&w.__createBinding||(Object.create?function(n,t,r,e){void 0===e&&(e=r),Object.defineProperty(n,e,{enumerable:!0,get:function(){return t[r]}})}:function(n,t,r,e){void 0===e&&(e=r),n[e]=t[r]}),e=w&&w.__setModuleDefault||(Object.create?function(n,t){Object.defineProperty(n,"default",{enumerable:!0,value:t})}:function(n,t){n.default=t}),u=w&&w.__importStar||function(n){if(n&&n.__esModule)return n;var t={};if(null!=n)for(var u in n)"default"!==u&&Object.prototype.hasOwnProperty.call(n,u)&&r(t,n,u);return e(t,n),t};Object.defineProperty(t,"__esModule",{value:!0}),t.getMonoid=t.getSemigroup=t.taskSeq=t.task=t.sequenceSeqArray=t.traverseSeqArray=t.traverseSeqArrayWithIndex=t.sequenceArray=t.traverseArray=t.traverseArrayWithIndex=t.traverseReadonlyArrayWithIndexSeq=t.traverseReadonlyNonEmptyArrayWithIndexSeq=t.traverseReadonlyArrayWithIndex=t.traverseReadonlyNonEmptyArrayWithIndex=t.ApT=t.apS=t.bind=t.bindTo=t.Do=t.never=t.FromTask=t.chainFirstIOK=t.chainIOK=t.fromIOK=t.FromIO=t.chainFirst=t.MonadTask=t.fromTask=t.MonadIO=t.Monad=t.Chain=t.ApplicativeSeq=t.ApplySeq=t.ApplicativePar=t.apSecond=t.apFirst=t.ApplyPar=t.Pointed=t.flap=t.Functor=t.getRaceMonoid=t.URI=t.flatten=t.chain=t.of=t.ap=t.map=t.delay=t.fromIO=void 0;var i=u(U);t.fromIO=function(n){return function(){return Promise.resolve().then(n)}},t.delay=function(n){return function(t){return function(){return new Promise((function(r){setTimeout((function(){Promise.resolve().then(t).then(r)}),n)}))}}};var o=function(n,r){return g.pipe(n,t.map(r))},c=function(n,r){return g.pipe(n,t.ap(r))},f=function(n,r){return g.pipe(n,t.chain((function(n){return g.pipe(r,t.map(n))})))},a=function(n,r){return g.pipe(n,t.chain(r))};t.map=function(n){return function(t){return function(){return Promise.resolve().then(t).then(n)}}},t.ap=function(n){return function(t){return function(){return Promise.all([Promise.resolve().then(t),Promise.resolve().then(n)]).then((function(n){return(0,n[0])(n[1])}))}}},t.of=function(n){return function(){return Promise.resolve(n)}},t.chain=function(n){return function(t){return function(){return Promise.resolve().then(t).then((function(t){return n(t)()}))}}},t.flatten=t.chain(g.identity),t.URI="Task",t.getRaceMonoid=function(){return{concat:function(n,t){return function(){return Promise.race([Promise.resolve().then(n),Promise.resolve().then(t)])}},empty:t.never}},t.Functor={URI:t.URI,map:o},t.flap=O.flap(t.Functor),t.Pointed={URI:t.URI,of:t.of},t.ApplyPar={URI:t.URI,map:o,ap:c},t.apFirst=R.apFirst(t.ApplyPar),t.apSecond=R.apSecond(t.ApplyPar),t.ApplicativePar={URI:t.URI,map:o,ap:c,of:t.of},t.ApplySeq={URI:t.URI,map:o,ap:f},t.ApplicativeSeq={URI:t.URI,map:o,ap:f,of:t.of},t.Chain={URI:t.URI,map:o,ap:c,chain:a},t.Monad={URI:t.URI,map:o,of:t.of,ap:c,chain:a},t.MonadIO={URI:t.URI,map:o,of:t.of,ap:c,chain:a,fromIO:t.fromIO},t.fromTask=g.identity,t.MonadTask={URI:t.URI,map:o,of:t.of,ap:c,chain:a,fromIO:t.fromIO,fromTask:t.fromTask},t.chainFirst=_.chainFirst(t.Chain),t.FromIO={URI:t.URI,fromIO:t.fromIO},t.fromIOK=zn.fromIOK(t.FromIO),t.chainIOK=zn.chainIOK(t.FromIO,t.Chain),t.chainFirstIOK=zn.chainFirstIOK(t.FromIO,t.Chain),t.FromTask={URI:t.URI,fromIO:t.fromIO,fromTask:t.fromTask},t.never=function(){return new Promise((function(){}))},t.Do=t.of(i.emptyRecord),t.bindTo=O.bindTo(t.Functor),t.bind=_.bind(t.Chain),t.apS=R.apS(t.ApplyPar),t.ApT=t.of(i.emptyReadonlyArray),t.traverseReadonlyNonEmptyArrayWithIndex=function(n){return function(t){return function(){return Promise.all(t.map((function(t,r){return Promise.resolve().then((function(){return n(r,t)()}))})))}}},t.traverseReadonlyArrayWithIndex=function(n){var r=t.traverseReadonlyNonEmptyArrayWithIndex(n);return function(n){return i.isNonEmpty(n)?r(n):t.ApT}},t.traverseReadonlyNonEmptyArrayWithIndexSeq=function(n){return function(t){return function(){return i.tail(t).reduce((function(t,r,e){return t.then((function(t){return Promise.resolve().then(n(e+1,r)).then((function(n){return t.push(n),t}))}))}),Promise.resolve().then(n(0,i.head(t))).then(i.singleton))}}},t.traverseReadonlyArrayWithIndexSeq=function(n){var r=t.traverseReadonlyNonEmptyArrayWithIndexSeq(n);return function(n){return i.isNonEmpty(n)?r(n):t.ApT}},t.traverseArrayWithIndex=t.traverseReadonlyArrayWithIndex,t.traverseArray=function(n){return t.traverseReadonlyArrayWithIndex((function(t,r){return n(r)}))},t.sequenceArray=t.traverseArray(g.identity),t.traverseSeqArrayWithIndex=t.traverseReadonlyArrayWithIndexSeq,t.traverseSeqArray=function(n){return t.traverseReadonlyArrayWithIndexSeq((function(t,r){return n(r)}))},t.sequenceSeqArray=t.traverseSeqArray(g.identity),t.task={URI:t.URI,map:o,of:t.of,ap:c,chain:a,fromIO:t.fromIO,fromTask:t.fromTask},t.taskSeq={URI:t.URI,map:o,of:t.of,ap:f,chain:a,fromIO:t.fromIO,fromTask:t.fromTask},t.getSemigroup=R.getApplySemigroup(t.ApplySeq),t.getMonoid=j.getApplicativeMonoid(t.ApplicativeSeq)})),Hn=I((function(n,t){var r=w&&w.__createBinding||(Object.create?function(n,t,r,e){void 0===e&&(e=r),Object.defineProperty(n,e,{enumerable:!0,get:function(){return t[r]}})}:function(n,t,r,e){void 0===e&&(e=r),n[e]=t[r]}),e=w&&w.__setModuleDefault||(Object.create?function(n,t){Object.defineProperty(n,"default",{enumerable:!0,value:t})}:function(n,t){n.default=t}),u=w&&w.__importStar||function(n){if(n&&n.__esModule)return n;var t={};if(null!=n)for(var u in n)"default"!==u&&Object.prototype.hasOwnProperty.call(n,u)&&r(t,n,u);return e(t,n),t};Object.defineProperty(t,"__esModule",{value:!0}),t.getCompactable=t.getAltTaskValidation=t.getApplicativeTaskValidation=t.URI=t.throwError=t.of=t.altW=t.alt=t.flatten=t.flattenW=t.chainW=t.chain=t.apW=t.ap=t.mapLeft=t.bimap=t.map=t.chainIOEitherK=t.chainIOEitherKW=t.fromIOEitherK=t.chainTaskOptionK=t.fromTaskOptionK=t.swap=t.orLeft=t.orElseFirstW=t.orElseFirst=t.orElseW=t.orElse=t.toUnion=t.tryCatchK=t.tryCatch=t.getOrElseW=t.getOrElse=t.foldW=t.matchEW=t.fold=t.matchE=t.matchW=t.match=t.fromTaskOption=t.fromIOEither=t.fromEither=t.fromTask=t.fromIO=t.leftIO=t.rightIO=t.leftTask=t.rightTask=t.right=t.left=void 0,t.traverseReadonlyArrayWithIndexSeq=t.traverseReadonlyNonEmptyArrayWithIndexSeq=t.traverseReadonlyArrayWithIndex=t.traverseReadonlyNonEmptyArrayWithIndex=t.ApT=t.apSW=t.apS=t.bindW=t.bind=t.bindTo=t.Do=t.bracket=t.taskify=t.chainFirstTaskK=t.chainTaskK=t.fromTaskK=t.FromTask=t.chainFirstIOK=t.chainIOK=t.fromIOK=t.FromIO=t.fromEitherK=t.filterOrElseW=t.filterOrElse=t.fromPredicate=t.chainEitherKW=t.chainEitherK=t.chainOptionK=t.fromOptionK=t.fromOption=t.FromEither=t.Alt=t.Bifunctor=t.chainFirstW=t.chainFirst=t.MonadThrow=t.MonadTask=t.MonadIO=t.Monad=t.Chain=t.ApplicativeSeq=t.ApplySeq=t.ApplicativePar=t.apSecond=t.apFirst=t.ApplyPar=t.Pointed=t.flap=t.Functor=t.getFilterable=void 0,t.getTaskValidation=t.getSemigroup=t.getApplyMonoid=t.getApplySemigroup=t.taskEitherSeq=t.taskEither=t.sequenceSeqArray=t.traverseSeqArray=t.traverseSeqArrayWithIndex=t.sequenceArray=t.traverseArray=t.traverseArrayWithIndex=void 0;var i=u(Cn),o=u(qn),c=u(U),f=u(Fn);t.left=o.left(f.Pointed),t.right=o.right(f.Pointed),t.rightTask=o.rightF(f.Functor),t.leftTask=o.leftF(f.Functor),t.rightIO=g.flow(f.fromIO,t.rightTask),t.leftIO=g.flow(f.fromIO,t.leftTask),t.fromIO=t.rightIO,t.fromTask=t.rightTask,t.fromEither=f.of,t.fromIOEither=f.fromIO,t.fromTaskOption=function(n){return f.map(i.fromOption(n))},t.match=o.match(f.Functor),t.matchW=t.match,t.matchE=o.matchE(f.Monad),t.fold=t.matchE,t.matchEW=t.matchE,t.foldW=t.matchEW,t.getOrElse=o.getOrElse(f.Monad),t.getOrElseW=t.getOrElse,t.tryCatch=function(n,t){return function(){return n().then(c.right,(function(n){return c.left(t(n))}))}},t.tryCatchK=function(n,r){return function(){for(var e=[],u=0;u<arguments.length;u++)e[u]=arguments[u];return t.tryCatch((function(){return n.apply(void 0,e)}),r)}},t.toUnion=o.toUnion(f.Functor),t.orElse=o.orElse(f.Monad),t.orElseW=t.orElse,t.orElseFirst=o.orElseFirst(f.Monad),t.orElseFirstW=t.orElseFirst,t.orLeft=o.orLeft(f.Monad),t.swap=o.swap(f.Functor),t.fromTaskOptionK=function(n){var r=t.fromTaskOption(n);return function(n){return g.flow(n,r)}},t.chainTaskOptionK=function(n){return g.flow(t.fromTaskOptionK(n),t.chain)},t.fromIOEitherK=function(n){return g.flow(n,t.fromIOEither)},t.chainIOEitherKW=function(n){return t.chainW(t.fromIOEitherK(n))},t.chainIOEitherK=t.chainIOEitherKW;var a=function(n,r){return g.pipe(n,t.map(r))},s=function(n,r){return g.pipe(n,t.ap(r))},v=function(n,r){return g.pipe(n,t.chain((function(n){return g.pipe(r,t.map(n))})))},d=function(n,r){return g.pipe(n,t.chain(r))},l=function(n,r,e){return g.pipe(n,t.bimap(r,e))},p=function(n,r){return g.pipe(n,t.mapLeft(r))},h=function(n,r){return g.pipe(n,t.alt(r))};function m(n,r){var e=R.ap(n,i.getApplicativeValidation(r));return{URI:t.URI,_E:void 0,map:a,ap:function(n,t){return g.pipe(n,e(t))},of:t.of}}function b(n){var r=o.altValidation(f.Monad,n);return{URI:t.URI,_E:void 0,map:a,alt:function(n,t){return g.pipe(n,r(t))}}}t.map=o.map(f.Functor),t.bimap=o.bimap(f.Functor),t.mapLeft=o.mapLeft(f.Functor),t.ap=o.ap(f.ApplyPar),t.apW=t.ap,t.chain=o.chain(f.Monad),t.chainW=t.chain,t.flattenW=t.chainW(g.identity),t.flatten=t.flattenW,t.alt=o.alt(f.Monad),t.altW=t.alt,t.of=t.right,t.throwError=t.left,t.URI="TaskEither",t.getApplicativeTaskValidation=m,t.getAltTaskValidation=b,t.getCompactable=function(n){var r=i.getCompactable(n);return{URI:t.URI,_E:void 0,compact:kn.compact(f.Functor,r),separate:kn.separate(f.Functor,r,i.Functor)}},t.getFilterable=function(n){var r=i.getFilterable(n),e=t.getCompactable(n),u=Dn.filter(f.Functor,r),o=Dn.filterMap(f.Functor,r),c=Dn.partition(f.Functor,r),s=Dn.partitionMap(f.Functor,r);return{URI:t.URI,_E:void 0,map:a,compact:e.compact,separate:e.separate,filter:function(n,t){return g.pipe(n,u(t))},filterMap:function(n,t){return g.pipe(n,o(t))},partition:function(n,t){return g.pipe(n,c(t))},partitionMap:function(n,t){return g.pipe(n,s(t))}}},t.Functor={URI:t.URI,map:a},t.flap=O.flap(t.Functor),t.Pointed={URI:t.URI,of:t.of},t.ApplyPar={URI:t.URI,map:a,ap:s},t.apFirst=R.apFirst(t.ApplyPar),t.apSecond=R.apSecond(t.ApplyPar),t.ApplicativePar={URI:t.URI,map:a,ap:s,of:t.of},t.ApplySeq={URI:t.URI,map:a,ap:v},t.ApplicativeSeq={URI:t.URI,map:a,ap:v,of:t.of},t.Chain={URI:t.URI,map:a,ap:s,chain:d},t.Monad={URI:t.URI,map:a,ap:s,chain:d,of:t.of},t.MonadIO={URI:t.URI,map:a,ap:s,chain:d,of:t.of,fromIO:t.fromIO},t.MonadTask={URI:t.URI,map:a,ap:s,chain:d,of:t.of,fromIO:t.fromIO,fromTask:t.fromTask},t.MonadThrow={URI:t.URI,map:a,ap:s,chain:d,of:t.of,throwError:t.throwError},t.chainFirst=_.chainFirst(t.Chain),t.chainFirstW=t.chainFirst,t.Bifunctor={URI:t.URI,bimap:l,mapLeft:p},t.Alt={URI:t.URI,map:a,alt:h},t.FromEither={URI:t.URI,fromEither:t.fromEither},t.fromOption=M.fromOption(t.FromEither),t.fromOptionK=M.fromOptionK(t.FromEither),t.chainOptionK=M.chainOptionK(t.FromEither,t.Chain),t.chainEitherK=M.chainEitherK(t.FromEither,t.Chain),t.chainEitherKW=t.chainEitherK,t.fromPredicate=M.fromPredicate(t.FromEither),t.filterOrElse=M.filterOrElse(t.FromEither,t.Chain),t.filterOrElseW=t.filterOrElse,t.fromEitherK=M.fromEitherK(t.FromEither),t.FromIO={URI:t.URI,fromIO:t.fromIO},t.fromIOK=zn.fromIOK(t.FromIO),t.chainIOK=zn.chainIOK(t.FromIO,t.Chain),t.chainFirstIOK=zn.chainFirstIOK(t.FromIO,t.Chain),t.FromTask={URI:t.URI,fromIO:t.fromIO,fromTask:t.fromTask},t.fromTaskK=Ln.fromTaskK(t.FromTask),t.chainTaskK=Ln.chainTaskK(t.FromTask,t.Chain),t.chainFirstTaskK=Ln.chainFirstTaskK(t.FromTask,t.Chain),t.taskify=function(n){return function(){var t=Array.prototype.slice.call(arguments);return function(){return new Promise((function(r){n.apply(null,t.concat((function(n,t){return r(null!=n?c.left(n):c.right(t))})))}))}}},t.bracket=function(n,r,e){return g.pipe(n,t.chain((function(n){return g.pipe(r(n),f.chain((function(r){return g.pipe(e(n,r),t.chain((function(){return f.of(r)})))})))})))},t.Do=t.of(c.emptyRecord),t.bindTo=O.bindTo(t.Functor),t.bind=_.bind(t.Chain),t.bindW=t.bind,t.apS=R.apS(t.ApplyPar),t.apSW=t.apS,t.ApT=t.of(c.emptyReadonlyArray),t.traverseReadonlyNonEmptyArrayWithIndex=function(n){return g.flow(f.traverseReadonlyNonEmptyArrayWithIndex(n),f.map(i.traverseReadonlyNonEmptyArrayWithIndex(g.SK)))},t.traverseReadonlyArrayWithIndex=function(n){var r=t.traverseReadonlyNonEmptyArrayWithIndex(n);return function(n){return c.isNonEmpty(n)?r(n):t.ApT}},t.traverseReadonlyNonEmptyArrayWithIndexSeq=function(n){return function(t){return function(){return c.tail(t).reduce((function(t,r,e){return t.then((function(u){return c.isLeft(u)?t:n(e+1,r)().then((function(n){return c.isLeft(n)?n:(u.right.push(n.right),u)}))}))}),n(0,c.head(t))().then(i.map(c.singleton)))}}},t.traverseReadonlyArrayWithIndexSeq=function(n){var r=t.traverseReadonlyNonEmptyArrayWithIndexSeq(n);return function(n){return c.isNonEmpty(n)?r(n):t.ApT}},t.traverseArrayWithIndex=t.traverseReadonlyArrayWithIndex,t.traverseArray=function(n){return t.traverseReadonlyArrayWithIndex((function(t,r){return n(r)}))},t.sequenceArray=t.traverseArray(g.identity),t.traverseSeqArrayWithIndex=t.traverseReadonlyArrayWithIndexSeq,t.traverseSeqArray=function(n){return t.traverseReadonlyArrayWithIndexSeq((function(t,r){return n(r)}))},t.sequenceSeqArray=t.traverseSeqArray(g.identity),t.taskEither={URI:t.URI,bimap:l,mapLeft:p,map:a,of:t.of,ap:s,chain:d,alt:h,fromIO:t.fromIO,fromTask:t.fromTask,throwError:t.throwError},t.taskEitherSeq={URI:t.URI,bimap:l,mapLeft:p,map:a,of:t.of,ap:v,chain:d,alt:h,fromIO:t.fromIO,fromTask:t.fromTask,throwError:t.throwError},t.getApplySemigroup=R.getApplySemigroup(t.ApplySeq),t.getApplyMonoid=j.getApplicativeMonoid(t.ApplicativeSeq),t.getSemigroup=function(n){return R.getApplySemigroup(f.ApplySeq)(i.getSemigroup(n))},t.getTaskValidation=function(n){var r=m(f.ApplicativePar,n),e=b(n);return{URI:t.URI,_E:void 0,map:a,ap:r.ap,of:t.of,chain:d,bimap:l,mapLeft:p,alt:e.alt,fromIO:t.fromIO,fromTask:t.fromTask,throwError:t.throwError}}}));const{state:Bn,onChange:Gn}=D(Object.assign({fallbackStyles:"",pricePrefix:null,currencySign:null,apiPath:null,token:null,locale:"de-DE"},{trackingEnabled:!0}));Gn("apiPath",(n=>{console.log("apiPathChanged",n)})),Gn("token",(n=>{console.log("tokenChanged",n)}));const Vn=n=>({kind:"server",inner:n}),Jn={kind:"client",inner:"Token not exist or empty"},$n={kind:"client",inner:"Api path empty or missing"},Kn=en({concat:function(n,t){return n+t},empty:""}),Xn=()=>i(en({concat:r}).concat(on(Bn.apiPath),on("https://api.vviinn.com")),Y((()=>$n))),Zn=s({method:{concat:(n,t)=>{return i(Kn.concat(on(n),on(t)),(r=()=>"GET",function(n){return un(n)?r():n.value}));var r}},body:{concat:function(n,t){return t}},headers:{concat:(n,t)=>{const r=new Headers;return void 0!==n&&n.forEach(((n,t)=>r.append(t,n))),void 0!==t&&t.forEach(((n,t)=>r.append(t,n))),r}}}),Yn=n=>({method:n}),Qn=V(Yn("GET")),nt=V(Yn("POST")),tt=n=>n.status>=200&&n.status<300?Hn.right(n):Hn.left(n),rt=Zn,et=(n,t)=>([r,e])=>{const u=new URL(n,r),i=rt.concat(e,t);return g.pipe(((n,t={})=>g.pipe(((n,t={method:"GET"})=>Hn.tryCatch((()=>fetch(n,t)),(n=>n)))(n,t),Hn.chain(tt),Hn.chain((n=>function(n){return Hn.fromTask((()=>n.json()))}(n)))))(u.toString(),i),Hn.mapLeft(Vn))},ut=n=>(n=>0===n.length)(n)?G("entity is empty"):V(n),it=n=>{return i(n,("entity not exist",function(n){return null==n?G("entity not exist"):V(n)}),(t=ut,function(n){return Q(n)?n:t(n.right)}));var t},ot=n=>new Headers({Authorization:`Bearer ${n}`}),ct=n=>i(n,it,Cn.mapLeft((()=>Jn))),ft=n=>i(n,ct,Cn.map(ot)),at=R.sequenceT(Cn.Apply),st={equals:(n,t)=>n.class===t.class&&n.score===t.score&&n.rectangle.left===t.rectangle.left&&n.rectangle.top===t.rectangle.top&&n.rectangle.height===t.rectangle.height&&n.rectangle.width===t.rectangle.width},vt=n=>g.pipe(at(Xn(),nt),_n,An(et("search/session",n)));var dt;!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"}(dt||(dt={}));const lt=n=>{switch(n.type){case"array":return n.value.map(lt);default:return n.value}},pt=n=>t=>i(at(Xn(),V(Yn(n.method))),_n,An(et(n.href,t))),ht=(n,t)=>{const r=l(n),e=m.concat(r,t);return Object.assign(Object.assign({},e),{width:n.width,height:n.height})},mt=(n,t)=>{switch(t.direction){case b.NorthEast:return((n,t)=>{const r=m.concat(l(n),{x:0,y:t.position.y});return Object.assign(Object.assign({},r),{width:n.width+t.position.x,height:n.height-t.position.y})})(n,t);case b.NorthWest:return((n,t)=>{const r=m.concat(l(n),t.position);return Object.assign(Object.assign({},r),{width:n.width-t.position.x,height:n.height-t.position.y})})(n,t);case b.SouthEast:return((n,t)=>Object.assign(Object.assign({},n),{width:n.width+t.position.x,height:n.height+t.position.y}))(n,t);case b.SouthWest:return((n,t)=>{const r=m.concat(l(n),{x:t.position.x,y:0});return Object.assign(Object.assign({},r),{width:n.width-t.position.x,height:n.height+t.position.y})})(n,t)}},bt=n=>({x:0,y:0,width:n.width,height:n.height}),yt=n=>Object.assign({x:n.left,y:n.top},n),wt=n=>t=>({x:t.x*n.width,y:t.y*n.height,width:t.width*n.width,height:t.height*n.height}),It=n=>({x:n.x+.5*n.width,y:n.y+.5*n.height});var gt;!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"}(gt||(gt={}));const Rt=(n,t)=>{const r=new URLSearchParams(Object.entries(t));return[`${n.href}?${r.toString()}`,{method:"GET"}]},Ot=(n,t)=>[n.href,{body:JSON.stringify(t),method:n.method,headers:new Headers({"Content-Type":"application/ion+json"})}],jt=(n,t={})=>r=>g.pipe(at(Xn(),g.pipe(((n,t)=>g.pipe(((n,t)=>{const r=n.map((n=>n.name)),e=Object.keys(t),u=r.filter((n=>!e.includes(n)));return 0===u.length?V(t):G(`Data should contains fields: ${u.join(", ")}`)})(n.value,t),$((t=>n.rel.includes("query-form")?Rt(n,t):Ot(n,t)))))(n,t),Z((n=>({kind:"app",inner:n}))))),_n,An((n=>{const t=n[0],[e,u]=n[1];return et(e,u)([t,r])}))),_t=async n=>new Promise((t=>{const r=new FileReader;r.addEventListener("load",(()=>{t(r.result)})),r.readAsDataURL(n)})),Ut=R.sequenceT(P.Apply);const Mt=["jpg","jpeg","png","webp"],xt={kind:"client",inner:"File format not supported"},Et=n=>{const t=n.type.split("/")[1],r=(e=r=>r===t?P.some(n):P.none,function(n){for(var t=0;t<n.length;t++){var r=e(n[t]);if("Some"===r._tag)return r}return o})(Mt);var e;return g.pipe(r,Cn.fromOption((()=>xt)))},At={kind:"app",inner:"File doesnt exist"},Nt=n=>()=>new Promise((t=>{const r=new FileReader,e=new Image;r.onload=n=>{e.src=n.target.result},e.onload=()=>t(e),r.readAsDataURL(n)}));var Wt=I((function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.copy=void 0,t.copy=(n,t,r=0,e=0,u=n.width-r,i=n.height-e,o=0,c=0)=>{if(r|=0,e|=0,i|=0,o|=0,c|=0,(u|=0)<=0||i<=0)return;const f=new Uint32Array(n.data.buffer),a=new Uint32Array(t.data.buffer);for(let s=0;s<i;s++){const i=e+s;if(i<0||i>=n.height)continue;const v=c+s;if(!(v<0||v>=t.height))for(let e=0;e<u;e++){const u=r+e;if(u<0||u>=n.width)continue;const c=o+e;c<0||c>=t.width||(a[v*t.width+c]=f[i*n.width+u])}}}})),Tt=I((function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.CreateImageFactory=(n=[0,0,0,0],t=4)=>{if(t=Math.floor(t),isNaN(t)||t<1)throw TypeError("channels should be a positive non-zero number");if(!("length"in n)||n.length<t)throw TypeError(`fill should be iterable with at least ${t} members`);const r=(n=new Uint8ClampedArray(n).slice(0,t)).every((n=>0===n));return(e,u,i)=>{if(void 0===e||void 0===u)throw TypeError("Not enough arguments");if(e=Math.floor(e),u=Math.floor(u),isNaN(e)||e<1||isNaN(u)||u<1)throw TypeError("Index or size is negative or greater than the allowed amount");const o=e*u*t;if(void 0===i&&(i=new Uint8ClampedArray(o)),i instanceof Uint8ClampedArray){if(i.length!==o)throw TypeError("Index or size is negative or greater than the allowed amount");if(!r)for(let r=0;r<u;r++)for(let u=0;u<e;u++){const o=(r*e+u)*t;for(let r=0;r<t;r++)i[o+r]=n[r]}return{get width(){return e},get height(){return u},get data(){return i}}}throw TypeError("Expected data to be Uint8ClampedArray or undefined")}},t.createImage=t.CreateImageFactory()})),St=I((function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.filters=void 0;const r=(n,t)=>{if(n<=-t||n>=t)return 0;if(0==n)return 0;const r=n*Math.PI;return Math.sin(r)/r*Math.sin(r/t)/(r/t)},e=n=>Math.round(16383*n);t.filters=(n,t,u,i,o)=>{const c=o?2:3,f=1/u,a=Math.min(1,u),s=c/a,v=Math.floor(2*(s+1)),d=new Int16Array((v+2)*t);let l=0;for(let u=0;u<t;u++){const o=(u+.5)*f+i,v=Math.max(0,Math.floor(o-s)),p=Math.min(n-1,Math.ceil(o+s)),h=p-v+1,m=new Float32Array(h),b=new Int16Array(h);let y=0,w=0;for(let n=v;n<=p;n++){const t=r((n+.5-o)*a,c);y+=t,m[w]=t,w++}let I=0;for(let n=0;n<m.length;n++){const t=m[n]/y;I+=t,b[n]=e(t)}b[t>>1]+=e(1-I);let g=0;for(;g<b.length&&0===b[g];)g++;let R=b.length-1;for(;R>0&&0===b[R];)R--;const O=R-g+1;d[l++]=v+g,d[l++]=O,d.set(b.subarray(g,R+1),l),l+=O}return d}})),kt=I((function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.convolve=void 0,t.convolve=(n,t,r,e,u,i)=>{let o=0,c=0;for(let f=0;f<e;f++){let a=0;for(let r=0;r<u;r++){let r=o+4*i[a++]|0,u=0,f=0,s=0,v=0;for(let t=i[a++];t>0;t--){const t=i[a++];u=u+t*n[r]|0,f=f+t*n[r+1]|0,s=s+t*n[r+2]|0,v=v+t*n[r+3]|0,r=r+4|0}t[c]=u+8192>>14,t[c+1]=f+8192>>14,t[c+2]=s+8192>>14,t[c+3]=v+8192>>14,c=c+4*e|0}c=4*(f+1)|0,o=(f+1)*r*4|0}}})),Pt=I((function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.lanczos2=t.lanczos=void 0;const r=(n,t,r=!1)=>{const e=t.height/n.height,u=St.filters(n.width,t.width,t.width/n.width,0,r),i=St.filters(n.height,t.height,e,0,r),o=new Uint8ClampedArray(t.width*n.height*4);kt.convolve(n.data,o,n.width,n.height,t.width,u),kt.convolve(o,t.data,n.height,t.width,t.height,i)};t.lanczos=(n,t,e=0,u=0,i=n.width-e,o=n.height-u,c=0,f=0,a=t.width-c,s=t.height-f)=>{if(u|=0,o|=0,c|=0,f|=0,a|=0,s|=0,(i|=0)<=0||o<=0||a<=0||s<=0)return;if(0==(e|=0)&&0===u&&i===n.width&&o===n.height&&0===c&&0===f&&a===t.width&&s===t.height)return void r(n,t);const v=Tt.createImage(i,o),d=Tt.createImage(a,s);Wt.copy(n,v,e,u),r(v,d),Wt.copy(d,t,0,0,d.width,d.height,c,f)},t.lanczos2=(n,t,e=0,u=0,i=n.width-e,o=n.height-u,c=0,f=0,a=t.width-c,s=t.height-f)=>{if(u|=0,o|=0,c|=0,f|=0,a|=0,s|=0,(i|=0)<=0||o<=0||a<=0||s<=0)return;if(0==(e|=0)&&0===u&&i===n.width&&o===n.height&&0===c&&0===f&&a===t.width&&s===t.height)return void r(n,t,!0);const v=Tt.createImage(i,o),d=Tt.createImage(a,s);Wt.copy(n,v,e,u),r(v,d,!0),Wt.copy(d,t,0,0,d.width,d.height,c,f)}})),Ct=I((function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.Field=t.MonoidProduct=t.MonoidSum=t.SemigroupProduct=t.SemigroupSum=t.MagmaSub=t.Show=t.Bounded=t.Ord=t.Eq=t.isNumber=void 0,t.isNumber=function(n){return"number"==typeof n},t.Eq={equals:function(n,t){return n===t}},t.Ord={equals:t.Eq.equals,compare:function(n,t){return n<t?-1:n>t?1:0}},t.Bounded={equals:t.Eq.equals,compare:t.Ord.compare,top:1/0,bottom:-1/0},t.Show={show:function(n){return JSON.stringify(n)}},t.MagmaSub={concat:function(n,t){return n-t}},t.SemigroupSum={concat:function(n,t){return n+t}},t.SemigroupProduct={concat:function(n,t){return n*t}},t.MonoidSum={concat:t.SemigroupSum.concat,empty:0},t.MonoidProduct={concat:t.SemigroupProduct.concat,empty:1},t.Field={add:t.SemigroupSum.concat,zero:0,mul:t.SemigroupProduct.concat,one:1,sub:t.MagmaSub.concat,degree:function(){return 1},div:function(n,t){return n/t},mod:function(n,t){return n%t}}})),qt=I((function(n,t){var r=w&&w.__createBinding||(Object.create?function(n,t,r,e){void 0===e&&(e=r),Object.defineProperty(n,e,{enumerable:!0,get:function(){return t[r]}})}:function(n,t,r,e){void 0===e&&(e=r),n[e]=t[r]}),e=w&&w.__setModuleDefault||(Object.create?function(n,t){Object.defineProperty(n,"default",{enumerable:!0,value:t})}:function(n,t){n.default=t}),u=w&&w.__importStar||function(n){if(n&&n.__esModule)return n;var t={};if(null!=n)for(var u in n)"default"!==u&&Object.prototype.hasOwnProperty.call(n,u)&&r(t,n,u);return e(t,n),t},i=w&&w.__spreadArray||function(n,t){for(var r=0,e=t.length,u=n.length;r<e;r++,u++)n[u]=t[r];return n};Object.defineProperty(t,"__esModule",{value:!0}),t.reduceRight=t.foldMap=t.reduce=t.mapWithIndex=t.map=t.flatten=t.duplicate=t.extend=t.chain=t.ap=t.alt=t.altW=t.of=t.chunksOf=t.splitAt=t.chop=t.chainWithIndex=t.intersperse=t.prependAll=t.unzip=t.zip=t.zipWith=t.modifyAt=t.updateAt=t.sort=t.groupBy=t.group=t.reverse=t.concat=t.concatW=t.fromArray=t.unappend=t.unprepend=t.range=t.replicate=t.makeBy=t.fromReadonlyArray=t.rotate=t.union=t.sortBy=t.uniq=t.unsafeUpdateAt=t.unsafeInsertAt=t.append=t.appendW=t.prepend=t.prependW=t.isOutOfBound=t.isNonEmpty=t.empty=void 0,t.uncons=t.filterWithIndex=t.filter=t.groupSort=t.updateLast=t.modifyLast=t.updateHead=t.modifyHead=t.matchRight=t.matchLeft=t.concatAll=t.max=t.min=t.init=t.last=t.tail=t.head=t.apS=t.bind=t.bindTo=t.Do=t.Comonad=t.Alt=t.TraversableWithIndex=t.Traversable=t.FoldableWithIndex=t.Foldable=t.Monad=t.chainFirst=t.Chain=t.Applicative=t.apSecond=t.apFirst=t.Apply=t.FunctorWithIndex=t.Pointed=t.flap=t.Functor=t.getUnionSemigroup=t.getEq=t.getSemigroup=t.getShow=t.URI=t.extract=t.traverseWithIndex=t.sequence=t.traverse=t.reduceRightWithIndex=t.foldMapWithIndex=t.reduceWithIndex=void 0,t.readonlyNonEmptyArray=t.fold=t.prependToAll=t.insertAt=t.snoc=t.cons=t.unsnoc=void 0;var o=u(U),c=u(W);function f(n){return function(t){return t.concat(n)}}function a(n,t){return t?n.concat(t):function(t){return t.concat(n)}}function s(n){return function(r){var e=r.length;if(0===e)return t.empty;for(var u=[],i=r[0],o=[i],c=1;c<e;c++){var f=r[c];n.equals(f,i)?o.push(f):(u.push(o),o=[i=f])}return u.push(o),u}}t.empty=o.emptyReadonlyArray,t.isNonEmpty=o.isNonEmpty,t.isOutOfBound=function(n,t){return n<0||n>=t.length},t.prependW=function(n){return function(t){return i([n],t)}},t.prepend=t.prependW,t.appendW=function(n){return function(t){return i(i([],t),[n])}},t.append=t.appendW,t.unsafeInsertAt=function(n,r,e){if(t.isNonEmpty(e)){var u=o.fromReadonlyNonEmptyArray(e);return u.splice(n,0,r),u}return[r]},t.unsafeUpdateAt=function(n,t,r){if(r[n]===t)return r;var e=o.fromReadonlyNonEmptyArray(r);return e[n]=t,e},t.uniq=function(n){return function(r){if(1===r.length)return r;for(var e=[t.head(r)],u=function(t){e.every((function(r){return!n.equals(r,t)}))&&e.push(t)},i=0,o=t.tail(r);i<o.length;i++)u(o[i]);return e}},t.sortBy=function(n){if(t.isNonEmpty(n)){var r=N.getMonoid();return t.sort(n.reduce(r.concat,r.empty))}return g.identity},t.union=function(n){var r=t.uniq(n);return function(n){return function(t){return r(g.pipe(t,a(n)))}}},t.rotate=function(n){return function(r){var e=r.length,u=Math.round(n)%e;if(t.isOutOfBound(Math.abs(u),r)||0===u)return r;if(u<0){var i=t.splitAt(-u)(r);return g.pipe(i[1],a(i[0]))}return t.rotate(u-e)(r)}},t.fromReadonlyArray=function(n){return t.isNonEmpty(n)?o.some(n):o.none},t.makeBy=function(n){return function(t){for(var r=Math.max(0,Math.floor(t)),e=[n(0)],u=1;u<r;u++)e.push(n(u));return e}},t.replicate=function(n){return t.makeBy((function(){return n}))},t.range=function(n,r){return n<=r?t.makeBy((function(t){return n+t}))(r-n+1):[n]},t.unprepend=function(n){return[t.head(n),t.tail(n)]},t.unappend=function(n){return[t.init(n),t.last(n)]},t.fromArray=function(n){return t.fromReadonlyArray(n.slice())},t.concatW=f,t.concat=a,t.reverse=function(n){return 1===n.length?n:i([t.last(n)],n.slice(0,-1).reverse())},t.group=s,t.groupBy=function(n){return function(t){for(var r={},e=0,u=t;e<u.length;e++){var i=u[e],o=n(i);r.hasOwnProperty(o)?r[o].push(i):r[o]=[i]}return r}},t.sort=function(n){return function(t){return 1===t.length?t:t.slice().sort(n.compare)}},t.updateAt=function(n,r){return t.modifyAt(n,(function(){return r}))},t.modifyAt=function(n,r){return function(e){return t.isOutOfBound(n,e)?o.none:o.some(t.unsafeUpdateAt(n,r(e[n]),e))}},t.zipWith=function(n,t,r){for(var e=[r(n[0],t[0])],u=Math.min(n.length,t.length),i=1;i<u;i++)e[i]=r(n[i],t[i]);return e},t.zip=function n(r,e){return void 0===e?function(t){return n(t,r)}:t.zipWith(r,e,(function(n,t){return[n,t]}))},t.unzip=function(n){for(var t=[n[0][0]],r=[n[0][1]],e=1;e<n.length;e++)t[e]=n[e][0],r[e]=n[e][1];return[t,r]},t.prependAll=function(n){return function(t){for(var r=[n,t[0]],e=1;e<t.length;e++)r.push(n,t[e]);return r}},t.intersperse=function(n){return function(r){var e=t.tail(r);return t.isNonEmpty(e)?g.pipe(e,t.prependAll(n),t.prepend(t.head(r))):r}},t.chainWithIndex=function(n){return function(r){for(var e=o.fromReadonlyNonEmptyArray(n(0,t.head(r))),u=1;u<r.length;u++)e.push.apply(e,n(u,r[u]));return e}},t.chop=function(n){return function(r){for(var e=n(r),u=[e[0]],i=e[1];t.isNonEmpty(i);){var o=n(i),c=o[1];u.push(o[0]),i=c}return u}},t.splitAt=function(n){return function(r){var e=Math.max(1,n);return e>=r.length?[r,t.empty]:[g.pipe(r.slice(1,e),t.prepend(t.head(r))),r.slice(e)]}},t.chunksOf=function(n){return t.chop(t.splitAt(n))};var v=function(n,r){return g.pipe(n,t.map(r))},d=function(n,r){return g.pipe(n,t.mapWithIndex(r))},l=function(n,r){return g.pipe(n,t.ap(r))},p=function(n,r){return g.pipe(n,t.chain(r))},h=function(n,r){return g.pipe(n,t.extend(r))},m=function(n,r,e){return g.pipe(n,t.reduce(r,e))},b=function(n){var r=t.foldMap(n);return function(n,t){return g.pipe(n,r(t))}},y=function(n,r,e){return g.pipe(n,t.reduceRight(r,e))},I=function(n){var r=t.traverse(n);return function(n,t){return g.pipe(n,r(t))}},j=function(n,r){return g.pipe(n,t.alt(r))},M=function(n,r,e){return g.pipe(n,t.reduceWithIndex(r,e))},x=function(n){var r=t.foldMapWithIndex(n);return function(n,t){return g.pipe(n,r(t))}},E=function(n,r,e){return g.pipe(n,t.reduceRightWithIndex(r,e))},T=function(n){var r=t.traverseWithIndex(n);return function(n,t){return g.pipe(n,r(t))}};t.of=o.singleton,t.altW=function(n){return function(t){return g.pipe(t,f(n()))}},t.alt=t.altW,t.ap=function(n){return t.chain((function(r){return g.pipe(n,t.map(r))}))},t.chain=function(n){return t.chainWithIndex((function(t,r){return n(r)}))},t.extend=function(n){return function(r){for(var e=t.tail(r),u=[n(r)];t.isNonEmpty(e);)u.push(n(e)),e=t.tail(e);return u}},t.duplicate=t.extend(g.identity),t.flatten=t.chain(g.identity),t.map=function(n){return t.mapWithIndex((function(t,r){return n(r)}))},t.mapWithIndex=function(n){return function(r){for(var e=[n(0,t.head(r))],u=1;u<r.length;u++)e.push(n(u,r[u]));return e}},t.reduce=function(n,r){return t.reduceWithIndex(n,(function(n,t,e){return r(t,e)}))},t.foldMap=function(n){return function(t){return function(r){return r.slice(1).reduce((function(r,e){return n.concat(r,t(e))}),t(r[0]))}}},t.reduceRight=function(n,r){return t.reduceRightWithIndex(n,(function(n,t,e){return r(t,e)}))},t.reduceWithIndex=function(n,t){return function(r){return r.reduce((function(n,r,e){return t(e,n,r)}),n)}},t.foldMapWithIndex=function(n){return function(t){return function(r){return r.slice(1).reduce((function(r,e,u){return n.concat(r,t(u+1,e))}),t(0,r[0]))}}},t.reduceRightWithIndex=function(n,t){return function(r){return r.reduceRight((function(n,r,e){return t(e,r,n)}),n)}},t.traverse=function(n){var r=t.traverseWithIndex(n);return function(n){return r((function(t,r){return n(r)}))}},t.sequence=function(n){return t.traverseWithIndex(n)(g.SK)},t.traverseWithIndex=function(n){return function(r){return function(e){for(var u=n.map(r(0,t.head(e)),t.of),i=1;i<e.length;i++)u=n.ap(n.map(u,(function(n){return function(r){return g.pipe(n,t.append(r))}})),r(i,e[i]));return u}}},t.extract=o.head,t.URI="ReadonlyNonEmptyArray",t.getShow=function(n){return{show:function(t){return"["+t.map(n.show).join(", ")+"]"}}},t.getSemigroup=function(){return{concat:a}},t.getEq=function(n){return A.fromEquals((function(t,r){return t.length===r.length&&t.every((function(t,e){return n.equals(t,r[e])}))}))},t.getUnionSemigroup=function(n){var r=t.union(n);return{concat:function(n,t){return r(t)(n)}}},t.Functor={URI:t.URI,map:v},t.flap=O.flap(t.Functor),t.Pointed={URI:t.URI,of:t.of},t.FunctorWithIndex={URI:t.URI,map:v,mapWithIndex:d},t.Apply={URI:t.URI,map:v,ap:l},t.apFirst=R.apFirst(t.Apply),t.apSecond=R.apSecond(t.Apply),t.Applicative={URI:t.URI,map:v,ap:l,of:t.of},t.Chain={URI:t.URI,map:v,ap:l,chain:p},t.chainFirst=_.chainFirst(t.Chain),t.Monad={URI:t.URI,map:v,ap:l,of:t.of,chain:p},t.Foldable={URI:t.URI,reduce:m,foldMap:b,reduceRight:y},t.FoldableWithIndex={URI:t.URI,reduce:m,foldMap:b,reduceRight:y,reduceWithIndex:M,foldMapWithIndex:x,reduceRightWithIndex:E},t.Traversable={URI:t.URI,map:v,reduce:m,foldMap:b,reduceRight:y,traverse:I,sequence:t.sequence},t.TraversableWithIndex={URI:t.URI,map:v,mapWithIndex:d,reduce:m,foldMap:b,reduceRight:y,traverse:I,sequence:t.sequence,reduceWithIndex:M,foldMapWithIndex:x,reduceRightWithIndex:E,traverseWithIndex:T},t.Alt={URI:t.URI,map:v,alt:j},t.Comonad={URI:t.URI,map:v,extend:h,extract:t.extract},t.Do=t.of(o.emptyRecord),t.bindTo=O.bindTo(t.Functor),t.bind=_.bind(t.Chain),t.apS=R.apS(t.Apply),t.head=t.extract,t.tail=o.tail,t.last=function(n){return n[n.length-1]},t.init=function(n){return n.slice(0,-1)},t.min=function(n){var t=c.min(n);return function(n){return n.reduce(t.concat)}},t.max=function(n){var t=c.max(n);return function(n){return n.reduce(t.concat)}},t.concatAll=function(n){return function(t){return t.reduce(n.concat)}},t.matchLeft=function(n){return function(r){return n(t.head(r),t.tail(r))}},t.matchRight=function(n){return function(r){return n(t.init(r),t.last(r))}},t.modifyHead=function(n){return function(r){return i([n(t.head(r))],t.tail(r))}},t.updateHead=function(n){return t.modifyHead((function(){return n}))},t.modifyLast=function(n){return function(r){return g.pipe(t.init(r),t.append(n(t.last(r))))}},t.updateLast=function(n){return t.modifyLast((function(){return n}))},t.groupSort=function(n){var r=t.sort(n),e=s(n);return function(n){return t.isNonEmpty(n)?e(r(n)):t.empty}},t.filter=function(n){return t.filterWithIndex((function(t,r){return n(r)}))},t.filterWithIndex=function(n){return function(r){return t.fromReadonlyArray(r.filter((function(t,r){return n(r,t)})))}},t.uncons=t.unprepend,t.unsnoc=t.unappend,t.cons=function(n,r){return void 0===r?t.prepend(n):g.pipe(r,t.prepend(n))},t.snoc=function(n,t){return g.pipe(n,a([t]))},t.insertAt=function(n,r){return function(e){return n<0||n>e.length?o.none:o.some(t.unsafeInsertAt(n,r,e))}},t.prependToAll=t.prependAll,t.fold=t.concatAll,t.readonlyNonEmptyArray={URI:t.URI,of:t.of,map:v,mapWithIndex:d,ap:l,chain:p,extend:h,extract:t.extract,reduce:m,foldMap:b,reduceRight:y,traverse:I,sequence:t.sequence,reduceWithIndex:M,foldMapWithIndex:x,reduceRightWithIndex:E,traverseWithIndex:T,alt:j}})),Dt=I((function(n,t){var r=w&&w.__createBinding||(Object.create?function(n,t,r,e){void 0===e&&(e=r),Object.defineProperty(n,e,{enumerable:!0,get:function(){return t[r]}})}:function(n,t,r,e){void 0===e&&(e=r),n[e]=t[r]}),e=w&&w.__setModuleDefault||(Object.create?function(n,t){Object.defineProperty(n,"default",{enumerable:!0,value:t})}:function(n,t){n.default=t}),u=w&&w.__importStar||function(n){if(n&&n.__esModule)return n;var t={};if(null!=n)for(var u in n)"default"!==u&&Object.prototype.hasOwnProperty.call(n,u)&&r(t,n,u);return e(t,n),t},i=w&&w.__spreadArray||function(n,t){for(var r=0,e=t.length,u=n.length;r<e;r++,u++)n[u]=t[r];return n};Object.defineProperty(t,"__esModule",{value:!0}),t.mapWithIndex=t.map=t.flatten=t.duplicate=t.extend=t.chain=t.ap=t.alt=t.altW=t.chunksOf=t.splitAt=t.chop=t.chainWithIndex=t.foldMap=t.foldMapWithIndex=t.intersperse=t.prependAll=t.unzip=t.zip=t.zipWith=t.of=t.copy=t.modifyAt=t.updateAt=t.insertAt=t.sort=t.groupBy=t.group=t.reverse=t.concat=t.concatW=t.unappend=t.unprepend=t.range=t.replicate=t.makeBy=t.fromArray=t.fromReadonlyNonEmptyArray=t.rotate=t.union=t.sortBy=t.uniq=t.unsafeUpdateAt=t.unsafeInsertAt=t.append=t.appendW=t.prepend=t.prependW=t.isOutOfBound=t.isNonEmpty=void 0,t.filterWithIndex=t.filter=t.groupSort=t.updateLast=t.modifyLast=t.updateHead=t.modifyHead=t.matchRight=t.matchLeft=t.concatAll=t.max=t.min=t.init=t.last=t.tail=t.head=t.apS=t.bind=t.bindTo=t.Do=t.Comonad=t.Alt=t.TraversableWithIndex=t.Traversable=t.FoldableWithIndex=t.Foldable=t.Monad=t.chainFirst=t.Chain=t.Applicative=t.apSecond=t.apFirst=t.Apply=t.FunctorWithIndex=t.Pointed=t.flap=t.Functor=t.getUnionSemigroup=t.getEq=t.getSemigroup=t.getShow=t.URI=t.extract=t.traverseWithIndex=t.sequence=t.traverse=t.reduceRightWithIndex=t.reduceRight=t.reduceWithIndex=t.reduce=void 0,t.nonEmptyArray=t.fold=t.prependToAll=t.snoc=t.cons=t.unsnoc=t.uncons=void 0;var o=u(U),c=u(qt);function f(n){return function(t){return t.concat(n)}}function a(n,t){return t?n.concat(t):function(t){return t.concat(n)}}function s(n){return function(t){var r=t.length;if(0===r)return[];for(var e=[],u=t[0],i=[u],o=1;o<r;o++){var c=t[o];n.equals(c,u)?i.push(c):(e.push(i),i=[u=c])}return e.push(i),e}}t.isNonEmpty=function(n){return n.length>0},t.isOutOfBound=function(n,t){return n<0||n>=t.length},t.prependW=function(n){return function(t){return i([n],t)}},t.prepend=t.prependW,t.appendW=function(n){return function(t){return i(i([],t),[n])}},t.append=t.appendW,t.unsafeInsertAt=function(n,r,e){if(t.isNonEmpty(e)){var u=t.fromReadonlyNonEmptyArray(e);return u.splice(n,0,r),u}return[r]},t.unsafeUpdateAt=function(n,r,e){var u=t.fromReadonlyNonEmptyArray(e);return u[n]=r,u},t.uniq=function(n){return function(r){if(1===r.length)return t.copy(r);for(var e=[t.head(r)],u=function(t){e.every((function(r){return!n.equals(r,t)}))&&e.push(t)},i=0,o=t.tail(r);i<o.length;i++)u(o[i]);return e}},t.sortBy=function(n){if(t.isNonEmpty(n)){var r=N.getMonoid();return t.sort(n.reduce(r.concat,r.empty))}return t.copy},t.union=function(n){var r=t.uniq(n);return function(n){return function(t){return r(g.pipe(t,a(n)))}}},t.rotate=function(n){return function(r){var e=r.length,u=Math.round(n)%e;if(t.isOutOfBound(Math.abs(u),r)||0===u)return t.copy(r);if(u<0){var i=t.splitAt(-u)(r);return g.pipe(i[1],a(i[0]))}return t.rotate(u-e)(r)}},t.fromReadonlyNonEmptyArray=o.fromReadonlyNonEmptyArray,t.fromArray=function(n){return t.isNonEmpty(n)?o.some(n):o.none},t.makeBy=function(n){return function(t){for(var r=Math.max(0,Math.floor(t)),e=[n(0)],u=1;u<r;u++)e.push(n(u));return e}},t.replicate=function(n){return t.makeBy((function(){return n}))},t.range=function(n,r){return n<=r?t.makeBy((function(t){return n+t}))(r-n+1):[n]},t.unprepend=function(n){return[t.head(n),t.tail(n)]},t.unappend=function(n){return[t.init(n),t.last(n)]},t.concatW=f,t.concat=a,t.reverse=function(n){return i([t.last(n)],n.slice(0,-1).reverse())},t.group=s,t.groupBy=function(n){return function(t){for(var r={},e=0,u=t;e<u.length;e++){var i=u[e],o=n(i);r.hasOwnProperty(o)?r[o].push(i):r[o]=[i]}return r}},t.sort=function(n){return function(t){return t.slice().sort(n.compare)}},t.insertAt=function(n,r){return function(e){return n<0||n>e.length?o.none:o.some(t.unsafeInsertAt(n,r,e))}},t.updateAt=function(n,r){return t.modifyAt(n,(function(){return r}))},t.modifyAt=function(n,r){return function(e){return t.isOutOfBound(n,e)?o.none:o.some(t.unsafeUpdateAt(n,r(e[n]),e))}},t.copy=t.fromReadonlyNonEmptyArray,t.of=function(n){return[n]},t.zipWith=function(n,t,r){for(var e=[r(n[0],t[0])],u=Math.min(n.length,t.length),i=1;i<u;i++)e[i]=r(n[i],t[i]);return e},t.zip=function n(r,e){return void 0===e?function(t){return n(t,r)}:t.zipWith(r,e,(function(n,t){return[n,t]}))},t.unzip=function(n){for(var t=[n[0][0]],r=[n[0][1]],e=1;e<n.length;e++)t[e]=n[e][0],r[e]=n[e][1];return[t,r]},t.prependAll=function(n){return function(t){for(var r=[n,t[0]],e=1;e<t.length;e++)r.push(n,t[e]);return r}},t.intersperse=function(n){return function(r){var e=t.tail(r);return t.isNonEmpty(e)?g.pipe(e,t.prependAll(n),t.prepend(t.head(r))):t.copy(r)}},t.foldMapWithIndex=c.foldMapWithIndex,t.foldMap=c.foldMap,t.chainWithIndex=function(n){return function(r){for(var e=t.fromReadonlyNonEmptyArray(n(0,t.head(r))),u=1;u<r.length;u++)e.push.apply(e,n(u,r[u]));return e}},t.chop=function(n){return function(r){for(var e=n(r),u=[e[0]],i=e[1];t.isNonEmpty(i);){var o=n(i),c=o[1];u.push(o[0]),i=c}return u}},t.splitAt=function(n){return function(r){var e=Math.max(1,n);return e>=r.length?[t.copy(r),[]]:[g.pipe(r.slice(1,e),t.prepend(t.head(r))),r.slice(e)]}},t.chunksOf=function(n){return t.chop(t.splitAt(n))};var v=function(n,r){return g.pipe(n,t.map(r))},d=function(n,r){return g.pipe(n,t.mapWithIndex(r))},l=function(n,r){return g.pipe(n,t.ap(r))},p=function(n,r){return g.pipe(n,t.chain(r))},h=function(n,r){return g.pipe(n,t.extend(r))},m=function(n,r,e){return g.pipe(n,t.reduce(r,e))},b=function(n){var r=t.foldMap(n);return function(n,t){return g.pipe(n,r(t))}},y=function(n,r,e){return g.pipe(n,t.reduceRight(r,e))},I=function(n){var r=t.traverse(n);return function(n,t){return g.pipe(n,r(t))}},j=function(n,r){return g.pipe(n,t.alt(r))},M=function(n,r,e){return g.pipe(n,t.reduceWithIndex(r,e))},x=function(n){var r=t.foldMapWithIndex(n);return function(n,t){return g.pipe(n,r(t))}},E=function(n,r,e){return g.pipe(n,t.reduceRightWithIndex(r,e))},A=function(n){var r=t.traverseWithIndex(n);return function(n,t){return g.pipe(n,r(t))}};t.altW=function(n){return function(t){return g.pipe(t,f(n()))}},t.alt=t.altW,t.ap=function(n){return t.chain((function(r){return g.pipe(n,t.map(r))}))},t.chain=function(n){return t.chainWithIndex((function(t,r){return n(r)}))},t.extend=function(n){return function(r){for(var e=t.tail(r),u=[n(r)];t.isNonEmpty(e);)u.push(n(e)),e=t.tail(e);return u}},t.duplicate=t.extend(g.identity),t.flatten=t.chain(g.identity),t.map=function(n){return t.mapWithIndex((function(t,r){return n(r)}))},t.mapWithIndex=function(n){return function(r){for(var e=[n(0,t.head(r))],u=1;u<r.length;u++)e.push(n(u,r[u]));return e}},t.reduce=c.reduce,t.reduceWithIndex=c.reduceWithIndex,t.reduceRight=c.reduceRight,t.reduceRightWithIndex=c.reduceRightWithIndex,t.traverse=function(n){var r=t.traverseWithIndex(n);return function(n){return r((function(t,r){return n(r)}))}},t.sequence=function(n){return t.traverseWithIndex(n)((function(n,t){return t}))},t.traverseWithIndex=function(n){return function(r){return function(e){for(var u=n.map(r(0,t.head(e)),t.of),i=1;i<e.length;i++)u=n.ap(n.map(u,(function(n){return function(r){return g.pipe(n,t.append(r))}})),r(i,e[i]));return u}}},t.extract=c.head,t.URI="NonEmptyArray",t.getShow=c.getShow,t.getSemigroup=function(){return{concat:a}},t.getEq=c.getEq,t.getUnionSemigroup=function(n){var r=t.union(n);return{concat:function(n,t){return r(t)(n)}}},t.Functor={URI:t.URI,map:v},t.flap=O.flap(t.Functor),t.Pointed={URI:t.URI,of:t.of},t.FunctorWithIndex={URI:t.URI,map:v,mapWithIndex:d},t.Apply={URI:t.URI,map:v,ap:l},t.apFirst=R.apFirst(t.Apply),t.apSecond=R.apSecond(t.Apply),t.Applicative={URI:t.URI,map:v,ap:l,of:t.of},t.Chain={URI:t.URI,map:v,ap:l,chain:p},t.chainFirst=_.chainFirst(t.Chain),t.Monad={URI:t.URI,map:v,ap:l,of:t.of,chain:p},t.Foldable={URI:t.URI,reduce:m,foldMap:b,reduceRight:y},t.FoldableWithIndex={URI:t.URI,reduce:m,foldMap:b,reduceRight:y,reduceWithIndex:M,foldMapWithIndex:x,reduceRightWithIndex:E},t.Traversable={URI:t.URI,map:v,reduce:m,foldMap:b,reduceRight:y,traverse:I,sequence:t.sequence},t.TraversableWithIndex={URI:t.URI,map:v,mapWithIndex:d,reduce:m,foldMap:b,reduceRight:y,traverse:I,sequence:t.sequence,reduceWithIndex:M,foldMapWithIndex:x,reduceRightWithIndex:E,traverseWithIndex:A},t.Alt={URI:t.URI,map:v,alt:j},t.Comonad={URI:t.URI,map:v,extend:h,extract:t.extract},t.Do=t.of(o.emptyRecord),t.bindTo=O.bindTo(t.Functor),t.bind=_.bind(t.Chain),t.apS=R.apS(t.Apply),t.head=c.head,t.tail=function(n){return n.slice(1)},t.last=c.last,t.init=function(n){return n.slice(0,-1)},t.min=c.min,t.max=c.max,t.concatAll=function(n){return function(t){return t.reduce(n.concat)}},t.matchLeft=function(n){return function(r){return n(t.head(r),t.tail(r))}},t.matchRight=function(n){return function(r){return n(t.init(r),t.last(r))}},t.modifyHead=function(n){return function(r){return i([n(t.head(r))],t.tail(r))}},t.updateHead=function(n){return t.modifyHead((function(){return n}))},t.modifyLast=function(n){return function(r){return g.pipe(t.init(r),t.append(n(t.last(r))))}},t.updateLast=function(n){return t.modifyLast((function(){return n}))},t.groupSort=function(n){var r=t.sort(n),e=s(n);return function(n){return t.isNonEmpty(n)?e(r(n)):[]}},t.filter=function(n){return t.filterWithIndex((function(t,r){return n(r)}))},t.filterWithIndex=function(n){return function(r){return t.fromArray(r.filter((function(t,r){return n(r,t)})))}},t.uncons=t.unprepend,t.unsnoc=t.unappend,t.cons=function(n,r){return void 0===r?t.prepend(n):g.pipe(r,t.prepend(n))},t.snoc=function(n,r){return g.pipe(n,t.append(r))},t.prependToAll=t.prependAll,t.fold=c.concatAll,t.nonEmptyArray={URI:t.URI,of:t.of,map:v,mapWithIndex:d,ap:l,chain:p,extend:h,extract:t.extract,reduce:m,foldMap:b,reduceRight:y,traverse:I,sequence:t.sequence,reduceWithIndex:M,foldMapWithIndex:x,reduceRightWithIndex:E,traverseWithIndex:A,alt:j}})),zt=I((function(n,t){var r=w&&w.__createBinding||(Object.create?function(n,t,r,e){void 0===e&&(e=r),Object.defineProperty(n,e,{enumerable:!0,get:function(){return t[r]}})}:function(n,t,r,e){void 0===e&&(e=r),n[e]=t[r]}),e=w&&w.__setModuleDefault||(Object.create?function(n,t){Object.defineProperty(n,"default",{enumerable:!0,value:t})}:function(n,t){n.default=t}),u=w&&w.__importStar||function(n){if(n&&n.__esModule)return n;var t={};if(null!=n)for(var u in n)"default"!==u&&Object.prototype.hasOwnProperty.call(n,u)&&r(t,n,u);return e(t,n),t},i=w&&w.__spreadArray||function(n,t){for(var r=0,e=t.length,u=n.length;r<e;r++,u++)n[u]=t[r];return n};Object.defineProperty(t,"__esModule",{value:!0}),t.sort=t.lefts=t.rights=t.reverse=t.modifyAt=t.deleteAt=t.updateAt=t.insertAt=t.findLastIndex=t.findLastMap=t.findLast=t.findFirstMap=t.findFirst=t.findIndex=t.dropLeftWhile=t.dropRight=t.dropLeft=t.spanLeft=t.takeLeftWhile=t.takeRight=t.takeLeft=t.init=t.tail=t.last=t.head=t.lookup=t.isOutOfBound=t.size=t.scanRight=t.scanLeft=t.chainWithIndex=t.foldRight=t.matchRight=t.matchRightW=t.foldLeft=t.matchLeft=t.matchLeftW=t.match=t.matchW=t.fromEither=t.fromOption=t.fromPredicate=t.replicate=t.makeBy=t.appendW=t.append=t.prependW=t.prepend=t.isNonEmpty=t.isEmpty=void 0,t.sequence=t.traverse=t.reduceRightWithIndex=t.reduceRight=t.reduceWithIndex=t.foldMap=t.reduce=t.foldMapWithIndex=t.duplicate=t.extend=t.filterWithIndex=t.partitionMapWithIndex=t.partitionMap=t.partitionWithIndex=t.partition=t.compact=t.filterMap=t.filterMapWithIndex=t.filter=t.separate=t.mapWithIndex=t.map=t.flatten=t.chain=t.ap=t.alt=t.altW=t.zero=t.of=t._chainRecBreadthFirst=t._chainRecDepthFirst=t.difference=t.intersection=t.union=t.concat=t.concatW=t.comprehension=t.fromOptionK=t.chunksOf=t.splitAt=t.chop=t.sortBy=t.uniq=t.elem=t.rotate=t.intersperse=t.prependAll=t.unzip=t.zip=t.zipWith=void 0,t.toArray=t.unsafeDeleteAt=t.unsafeUpdateAt=t.unsafeInsertAt=t.fromEitherK=t.FromEither=t.filterE=t.Witherable=t.ChainRecBreadthFirst=t.chainRecBreadthFirst=t.ChainRecDepthFirst=t.chainRecDepthFirst=t.TraversableWithIndex=t.Traversable=t.FoldableWithIndex=t.Foldable=t.FilterableWithIndex=t.Filterable=t.Compactable=t.Extend=t.Alternative=t.guard=t.Zero=t.Alt=t.Unfoldable=t.chainFirst=t.Monad=t.Chain=t.Applicative=t.apSecond=t.apFirst=t.Apply=t.FunctorWithIndex=t.Pointed=t.flap=t.Functor=t.getDifferenceMagma=t.getIntersectionSemigroup=t.getUnionMonoid=t.getUnionSemigroup=t.getOrd=t.getEq=t.getMonoid=t.getSemigroup=t.getShow=t.URI=t.unfold=t.wilt=t.wither=t.traverseWithIndex=void 0,t.readonlyArray=t.prependToAll=t.snoc=t.cons=t.range=t.apS=t.bind=t.bindTo=t.Do=t.exists=t.some=t.every=t.empty=t.fromArray=void 0;var o=u(U),c=u(Ct),f=u(qt);t.isEmpty=function(n){return 0===n.length},t.isNonEmpty=f.isNonEmpty,t.prepend=f.prepend,t.prependW=f.prependW,t.append=f.append,t.appendW=f.appendW,t.makeBy=function(n,r){return n<=0?t.empty:f.makeBy(r)(n)},t.replicate=function(n,r){return t.makeBy(n,(function(){return r}))},t.fromPredicate=function(n){return function(r){return n(r)?[r]:t.empty}},t.fromOption=function(n){return o.isNone(n)?t.empty:[n.value]},t.fromEither=function(n){return o.isLeft(n)?t.empty:[n.right]},t.matchW=function(n,r){return function(e){return t.isNonEmpty(e)?r(e):n()}},t.match=t.matchW,t.matchLeftW=function(n,r){return function(e){return t.isNonEmpty(e)?r(f.head(e),f.tail(e)):n()}},t.matchLeft=t.matchLeftW,t.foldLeft=t.matchLeft,t.matchRightW=function(n,r){return function(e){return t.isNonEmpty(e)?r(f.init(e),f.last(e)):n()}},t.matchRight=t.matchRightW,t.foldRight=t.matchRight,t.chainWithIndex=function(n){return function(r){if(t.isEmpty(r))return t.empty;for(var e=[],u=0;u<r.length;u++)e.push.apply(e,n(u,r[u]));return e}},t.scanLeft=function(n,t){return function(r){var e=r.length,u=new Array(e+1);u[0]=n;for(var i=0;i<e;i++)u[i+1]=t(u[i],r[i]);return u}},t.scanRight=function(n,t){return function(r){var e=r.length,u=new Array(e+1);u[e]=n;for(var i=e-1;i>=0;i--)u[i]=t(r[i],u[i+1]);return u}},t.size=function(n){return n.length},t.isOutOfBound=f.isOutOfBound,t.lookup=function n(r,e){return void 0===e?function(t){return n(r,t)}:t.isOutOfBound(r,e)?o.none:o.some(e[r])},t.head=function(n){return t.isNonEmpty(n)?o.some(f.head(n)):o.none},t.last=function(n){return t.isNonEmpty(n)?o.some(f.last(n)):o.none},t.tail=function(n){return t.isNonEmpty(n)?o.some(f.tail(n)):o.none},t.init=function(n){return t.isNonEmpty(n)?o.some(f.init(n)):o.none},t.takeLeft=function(n){return function(r){return t.isOutOfBound(n,r)?r:0===n?t.empty:r.slice(0,n)}},t.takeRight=function(n){return function(r){return t.isOutOfBound(n,r)?r:0===n?t.empty:r.slice(-n)}},t.takeLeftWhile=function(n){return function(r){for(var e=[],u=0,i=r;u<i.length;u++){var o=i[u];if(!n(o))break;e.push(o)}var c=e.length;return c===r.length?r:0===c?t.empty:e}};var a=function(n,t){for(var r=n.length,e=0;e<r&&t(n[e]);e++);return e};function s(n){return function(t,r){if(void 0===r){var e=s(n);return function(n){return e(t,n)}}for(var u=0;u<r.length;u++)if(n.equals(r[u],t))return!0;return!1}}function v(n){var r=f.union(n);return function(e,u){if(void 0===u){var i=v(n);return function(n){return i(n,e)}}return t.isNonEmpty(e)&&t.isNonEmpty(u)?r(u)(e):t.isNonEmpty(e)?e:u}}function d(n){var t=s(n);return function(r,e){if(void 0===e){var u=d(n);return function(n){return u(n,r)}}return r.filter((function(n){return t(n,e)}))}}function l(n){var t=s(n);return function(r,e){if(void 0===e){var u=l(n);return function(n){return u(n,r)}}return r.filter((function(n){return!t(n,e)}))}}t.spanLeft=function(n){return function(r){var e=t.splitAt(a(r,n))(r);return{init:e[0],rest:e[1]}}},t.dropLeft=function(n){return function(r){return n<=0||t.isEmpty(r)?r:n>=r.length?t.empty:r.slice(n,r.length)}},t.dropRight=function(n){return function(r){return n<=0||t.isEmpty(r)?r:n>=r.length?t.empty:r.slice(0,r.length-n)}},t.dropLeftWhile=function(n){return function(r){var e=a(r,n);return 0===e?r:e===r.length?t.empty:r.slice(e)}},t.findIndex=function(n){return function(t){for(var r=0;r<t.length;r++)if(n(t[r]))return o.some(r);return o.none}},t.findFirst=function(n){return function(t){for(var r=0;r<t.length;r++)if(n(t[r]))return o.some(t[r]);return o.none}},t.findFirstMap=function(n){return function(t){for(var r=0;r<t.length;r++){var e=n(t[r]);if(o.isSome(e))return e}return o.none}},t.findLast=function(n){return function(t){for(var r=t.length-1;r>=0;r--)if(n(t[r]))return o.some(t[r]);return o.none}},t.findLastMap=function(n){return function(t){for(var r=t.length-1;r>=0;r--){var e=n(t[r]);if(o.isSome(e))return e}return o.none}},t.findLastIndex=function(n){return function(t){for(var r=t.length-1;r>=0;r--)if(n(t[r]))return o.some(r);return o.none}},t.insertAt=function(n,t){return function(r){return n<0||n>r.length?o.none:o.some(f.unsafeInsertAt(n,t,r))}},t.updateAt=function(n,r){return t.modifyAt(n,(function(){return r}))},t.deleteAt=function(n){return function(r){return t.isOutOfBound(n,r)?o.none:o.some(t.unsafeDeleteAt(n,r))}},t.modifyAt=function(n,r){return function(e){return t.isOutOfBound(n,e)?o.none:o.some(t.unsafeUpdateAt(n,r(e[n]),e))}},t.reverse=function(n){return n.length<=1?n:n.slice().reverse()},t.rights=function(n){for(var t=[],r=0;r<n.length;r++){var e=n[r];"Right"===e._tag&&t.push(e.right)}return t},t.lefts=function(n){for(var t=[],r=0;r<n.length;r++){var e=n[r];"Left"===e._tag&&t.push(e.left)}return t},t.sort=function(n){return function(t){return t.length<=1?t:t.slice().sort(n.compare)}},t.zipWith=function(n,t,r){for(var e=[],u=Math.min(n.length,t.length),i=0;i<u;i++)e[i]=r(n[i],t[i]);return e},t.zip=function n(r,e){return void 0===e?function(t){return n(t,r)}:t.zipWith(r,e,(function(n,t){return[n,t]}))},t.unzip=function(n){for(var t=[],r=[],e=0;e<n.length;e++)t[e]=n[e][0],r[e]=n[e][1];return[t,r]},t.prependAll=function(n){var r=f.prependAll(n);return function(n){return t.isNonEmpty(n)?r(n):n}},t.intersperse=function(n){var r=f.intersperse(n);return function(n){return t.isNonEmpty(n)?r(n):n}},t.rotate=function(n){var r=f.rotate(n);return function(n){return t.isNonEmpty(n)?r(n):n}},t.elem=s,t.uniq=function(n){var r=f.uniq(n);return function(n){return t.isNonEmpty(n)?r(n):n}},t.sortBy=function(n){var r=f.sortBy(n);return function(n){return t.isNonEmpty(n)?r(n):n}},t.chop=function(n){var r=f.chop(n);return function(n){return t.isNonEmpty(n)?r(n):t.empty}},t.splitAt=function(n){return function(r){return n>=1&&t.isNonEmpty(r)?f.splitAt(n)(r):t.isEmpty(r)?[r,t.empty]:[t.empty,r]}},t.chunksOf=function(n){var r=f.chunksOf(n);return function(n){return t.isNonEmpty(n)?r(n):t.empty}},t.fromOptionK=function(n){return function(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];return t.fromOption(n.apply(void 0,r))}},t.comprehension=function(n,r,e){void 0===e&&(e=function(){return!0});var u=function(n,i){return t.isNonEmpty(i)?g.pipe(f.head(i),t.chain((function(r){return u(g.pipe(n,t.append(r)),f.tail(i))}))):e.apply(void 0,n)?[r.apply(void 0,n)]:t.empty};return u(t.empty,n)},t.concatW=function(n){return function(r){return t.isEmpty(r)?n:t.isEmpty(n)?r:r.concat(n)}},t.concat=t.concatW,t.union=v,t.intersection=d,t.difference=l;var p=function(n,r){return g.pipe(n,t.map(r))},h=function(n,r){return g.pipe(n,t.mapWithIndex(r))},m=function(n,r){return g.pipe(n,t.ap(r))},b=function(n,r){return g.pipe(n,t.chain(r))},y=function(n,r){return g.pipe(n,t.filter(r))},I=function(n,r){return g.pipe(n,t.filterMap(r))},j=function(n,r){return g.pipe(n,t.partition(r))},x=function(n,r){return g.pipe(n,t.partitionMap(r))},E=function(n,r){return g.pipe(n,t.partitionWithIndex(r))},W=function(n,r){return g.pipe(n,t.partitionMapWithIndex(r))},P=function(n,r){return g.pipe(n,t.alt(r))},C=function(n,r,e){return g.pipe(n,t.reduce(r,e))},q=function(n){var r=t.foldMap(n);return function(n,t){return g.pipe(n,r(t))}},D=function(n,r,e){return g.pipe(n,t.reduceRight(r,e))},z=function(n,r,e){return g.pipe(n,t.reduceWithIndex(r,e))},L=function(n){var r=t.foldMapWithIndex(n);return function(n,t){return g.pipe(n,r(t))}},F=function(n,r,e){return g.pipe(n,t.reduceRightWithIndex(r,e))},H=function(n,r){return g.pipe(n,t.filterMapWithIndex(r))},B=function(n,r){return g.pipe(n,t.filterWithIndex(r))},G=function(n,r){return g.pipe(n,t.extend(r))},V=function(n){var r=t.traverse(n);return function(n,t){return g.pipe(n,r(t))}},J=function(n){var r=t.traverseWithIndex(n);return function(n,t){return g.pipe(n,r(t))}};t._chainRecDepthFirst=function(n,r){return g.pipe(n,t.chainRecDepthFirst(r))},t._chainRecBreadthFirst=function(n,r){return g.pipe(n,t.chainRecBreadthFirst(r))},t.of=f.of,t.zero=function(){return t.empty},t.altW=function(n){return function(t){return t.concat(n())}},t.alt=t.altW,t.ap=function(n){return t.chain((function(r){return g.pipe(n,t.map(r))}))},t.chain=function(n){return function(r){return g.pipe(r,t.chainWithIndex((function(t,r){return n(r)})))}},t.flatten=t.chain(g.identity),t.map=function(n){return function(t){return t.map((function(t){return n(t)}))}},t.mapWithIndex=function(n){return function(t){return t.map((function(t,r){return n(r,t)}))}},t.separate=function(n){for(var t=[],r=[],e=0,u=n;e<u.length;e++){var i=u[e];"Left"===i._tag?t.push(i.left):r.push(i.right)}return T.separated(t,r)},t.filter=function(n){return function(t){return t.filter(n)}},t.filterMapWithIndex=function(n){return function(t){for(var r=[],e=0;e<t.length;e++){var u=n(e,t[e]);o.isSome(u)&&r.push(u.value)}return r}},t.filterMap=function(n){return t.filterMapWithIndex((function(t,r){return n(r)}))},t.compact=t.filterMap(g.identity),t.partition=function(n){return t.partitionWithIndex((function(t,r){return n(r)}))},t.partitionWithIndex=function(n){return function(t){for(var r=[],e=[],u=0;u<t.length;u++){var i=t[u];n(u,i)?e.push(i):r.push(i)}return T.separated(r,e)}},t.partitionMap=function(n){return t.partitionMapWithIndex((function(t,r){return n(r)}))},t.partitionMapWithIndex=function(n){return function(t){for(var r=[],e=[],u=0;u<t.length;u++){var i=n(u,t[u]);"Left"===i._tag?r.push(i.left):e.push(i.right)}return T.separated(r,e)}},t.filterWithIndex=function(n){return function(t){return t.filter((function(t,r){return n(r,t)}))}},t.extend=function(n){return function(t){return t.map((function(r,e){return n(t.slice(e))}))}},t.duplicate=t.extend(g.identity),t.foldMapWithIndex=function(n){return function(t){return function(r){return r.reduce((function(r,e,u){return n.concat(r,t(u,e))}),n.empty)}}},t.reduce=function(n,r){return t.reduceWithIndex(n,(function(n,t,e){return r(t,e)}))},t.foldMap=function(n){var r=t.foldMapWithIndex(n);return function(n){return r((function(t,r){return n(r)}))}},t.reduceWithIndex=function(n,t){return function(r){for(var e=r.length,u=n,i=0;i<e;i++)u=t(i,u,r[i]);return u}},t.reduceRight=function(n,r){return t.reduceRightWithIndex(n,(function(n,t,e){return r(t,e)}))},t.reduceRightWithIndex=function(n,t){return function(r){return r.reduceRight((function(n,r,e){return t(e,r,n)}),n)}},t.traverse=function(n){var r=t.traverseWithIndex(n);return function(n){return r((function(t,r){return n(r)}))}},t.sequence=function(n){return function(r){return C(r,n.of(t.zero()),(function(r,e){return n.ap(n.map(r,(function(n){return function(r){return g.pipe(n,t.append(r))}})),e)}))}},t.traverseWithIndex=function(n){return function(r){return t.reduceWithIndex(n.of(t.zero()),(function(e,u,i){return n.ap(n.map(u,(function(n){return function(r){return g.pipe(n,t.append(r))}})),r(e,i))}))}},t.wither=function(n){var t=$(n);return function(n){return function(r){return t(r,n)}}},t.wilt=function(n){var t=K(n);return function(n){return function(r){return t(r,n)}}},t.unfold=function(n,t){for(var r=[],e=n;;){var u=t(e);if(!o.isSome(u))break;var i=u.value,c=i[1];r.push(i[0]),e=c}return r},t.URI="ReadonlyArray",t.getShow=function(n){return{show:function(t){return"["+t.map(n.show).join(", ")+"]"}}},t.getSemigroup=function(){return{concat:function(n,r){return t.isEmpty(n)?r:t.isEmpty(r)?n:n.concat(r)}}},t.getMonoid=function(){return{concat:t.getSemigroup().concat,empty:t.empty}},t.getEq=function(n){return A.fromEquals((function(t,r){return t.length===r.length&&t.every((function(t,e){return n.equals(t,r[e])}))}))},t.getOrd=function(n){return N.fromCompare((function(t,r){for(var e=t.length,u=r.length,i=Math.min(e,u),o=0;o<i;o++){var f=n.compare(t[o],r[o]);if(0!==f)return f}return c.Ord.compare(e,u)}))},t.getUnionSemigroup=function(n){var t=v(n);return{concat:function(n,r){return t(r)(n)}}},t.getUnionMonoid=function(n){return{concat:t.getUnionSemigroup(n).concat,empty:t.empty}},t.getIntersectionSemigroup=function(n){var t=d(n);return{concat:function(n,r){return t(r)(n)}}},t.getDifferenceMagma=function(n){var t=l(n);return{concat:function(n,r){return t(r)(n)}}},t.Functor={URI:t.URI,map:p},t.flap=O.flap(t.Functor),t.Pointed={URI:t.URI,of:t.of},t.FunctorWithIndex={URI:t.URI,map:p,mapWithIndex:h},t.Apply={URI:t.URI,map:p,ap:m},t.apFirst=R.apFirst(t.Apply),t.apSecond=R.apSecond(t.Apply),t.Applicative={URI:t.URI,map:p,ap:m,of:t.of},t.Chain={URI:t.URI,map:p,ap:m,chain:b},t.Monad={URI:t.URI,map:p,ap:m,of:t.of,chain:b},t.chainFirst=_.chainFirst(t.Chain),t.Unfoldable={URI:t.URI,unfold:t.unfold},t.Alt={URI:t.URI,map:p,alt:P},t.Zero={URI:t.URI,zero:t.zero},t.guard=k.guard(t.Zero,t.Pointed),t.Alternative={URI:t.URI,map:p,ap:m,of:t.of,alt:P,zero:t.zero},t.Extend={URI:t.URI,map:p,extend:G},t.Compactable={URI:t.URI,compact:t.compact,separate:t.separate},t.Filterable={URI:t.URI,map:p,compact:t.compact,separate:t.separate,filter:y,filterMap:I,partition:j,partitionMap:x},t.FilterableWithIndex={URI:t.URI,map:p,mapWithIndex:h,compact:t.compact,separate:t.separate,filter:y,filterMap:I,partition:j,partitionMap:x,partitionMapWithIndex:W,partitionWithIndex:E,filterMapWithIndex:H,filterWithIndex:B},t.Foldable={URI:t.URI,reduce:C,foldMap:q,reduceRight:D},t.FoldableWithIndex={URI:t.URI,reduce:C,foldMap:q,reduceRight:D,reduceWithIndex:z,foldMapWithIndex:L,reduceRightWithIndex:F},t.Traversable={URI:t.URI,map:p,reduce:C,foldMap:q,reduceRight:D,traverse:V,sequence:t.sequence},t.TraversableWithIndex={URI:t.URI,map:p,mapWithIndex:h,reduce:C,foldMap:q,reduceRight:D,reduceWithIndex:z,foldMapWithIndex:L,reduceRightWithIndex:F,traverse:V,sequence:t.sequence,traverseWithIndex:J},t.chainRecDepthFirst=function(n){return function(t){for(var r=i([],n(t)),e=[];r.length>0;){var u=r.shift();o.isLeft(u)?r.unshift.apply(r,n(u.left)):e.push(u.right)}return e}},t.ChainRecDepthFirst={URI:t.URI,map:p,ap:m,chain:b,chainRec:t._chainRecDepthFirst},t.chainRecBreadthFirst=function(n){return function(t){var r=n(t),e=[],u=[];function i(t){o.isLeft(t)?n(t.left).forEach((function(n){return e.push(n)})):u.push(t.right)}for(var c=0,f=r;c<f.length;c++)i(f[c]);for(;e.length>0;)i(e.shift());return u}},t.ChainRecBreadthFirst={URI:t.URI,map:p,ap:m,chain:b,chainRec:t._chainRecBreadthFirst};var $=S.witherDefault(t.Traversable,t.Compactable),K=S.wiltDefault(t.Traversable,t.Compactable);t.Witherable={URI:t.URI,map:p,compact:t.compact,separate:t.separate,filter:y,filterMap:I,partition:j,partitionMap:x,reduce:C,foldMap:q,reduceRight:D,traverse:V,sequence:t.sequence,wither:$,wilt:K},t.filterE=S.filterE(t.Witherable),t.FromEither={URI:t.URI,fromEither:t.fromEither},t.fromEitherK=M.fromEitherK(t.FromEither),t.unsafeInsertAt=f.unsafeInsertAt,t.unsafeUpdateAt=function(n,r,e){return t.isNonEmpty(e)?f.unsafeUpdateAt(n,r,e):e},t.unsafeDeleteAt=function(n,t){var r=t.slice();return r.splice(n,1),r},t.toArray=function(n){return n.slice()},t.fromArray=function(n){return t.isEmpty(n)?t.empty:n.slice()},t.empty=f.empty,t.every=function(n){return function(t){return t.every(n)}},t.some=function(n){return function(t){return t.some(n)}},t.exists=t.some,t.Do=t.of(o.emptyRecord),t.bindTo=O.bindTo(t.Functor),t.bind=_.bind(t.Chain),t.apS=R.apS(t.Apply),t.range=f.range,t.cons=f.cons,t.snoc=f.snoc,t.prependToAll=t.prependAll,t.readonlyArray={URI:t.URI,compact:t.compact,separate:t.separate,map:p,ap:m,of:t.of,chain:b,filter:y,filterMap:I,partition:j,partitionMap:x,mapWithIndex:h,partitionMapWithIndex:W,partitionWithIndex:E,filterMapWithIndex:H,filterWithIndex:B,alt:P,zero:t.zero,unfold:t.unfold,reduce:C,foldMap:q,reduceRight:D,traverse:V,sequence:t.sequence,reduceWithIndex:z,foldMapWithIndex:L,reduceRightWithIndex:F,traverseWithIndex:J,extend:G,wither:$,wilt:K}})),Lt=I((function(n,t){var r=w&&w.__createBinding||(Object.create?function(n,t,r,e){void 0===e&&(e=r),Object.defineProperty(n,e,{enumerable:!0,get:function(){return t[r]}})}:function(n,t,r,e){void 0===e&&(e=r),n[e]=t[r]}),e=w&&w.__setModuleDefault||(Object.create?function(n,t){Object.defineProperty(n,"default",{enumerable:!0,value:t})}:function(n,t){n.default=t}),u=w&&w.__importStar||function(n){if(n&&n.__esModule)return n;var t={};if(null!=n)for(var u in n)"default"!==u&&Object.prototype.hasOwnProperty.call(n,u)&&r(t,n,u);return e(t,n),t};Object.defineProperty(t,"__esModule",{value:!0}),t.lefts=t.rights=t.reverse=t.modifyAt=t.deleteAt=t.updateAt=t.insertAt=t.copy=t.findLastIndex=t.findLastMap=t.findLast=t.findFirstMap=t.findFirst=t.findIndex=t.dropLeftWhile=t.dropRight=t.dropLeft=t.spanLeft=t.takeLeftWhile=t.takeRight=t.takeLeft=t.init=t.tail=t.last=t.head=t.lookup=t.isOutOfBound=t.size=t.scanRight=t.scanLeft=t.chainWithIndex=t.foldRight=t.matchRight=t.matchRightW=t.foldLeft=t.matchLeft=t.matchLeftW=t.match=t.matchW=t.fromEither=t.fromOption=t.fromPredicate=t.replicate=t.makeBy=t.appendW=t.append=t.prependW=t.prepend=t.isNonEmpty=t.isEmpty=void 0,t.traverseWithIndex=t.sequence=t.traverse=t.reduceRightWithIndex=t.reduceRight=t.reduceWithIndex=t.reduce=t.foldMapWithIndex=t.foldMap=t.duplicate=t.extend=t.filterWithIndex=t.alt=t.altW=t.partitionMapWithIndex=t.partitionMap=t.partitionWithIndex=t.partition=t.filter=t.separate=t.compact=t.filterMap=t.filterMapWithIndex=t.mapWithIndex=t.flatten=t.chain=t.ap=t.map=t.zero=t.of=t.difference=t.intersection=t.union=t.concat=t.concatW=t.comprehension=t.fromOptionK=t.chunksOf=t.splitAt=t.chop=t.sortBy=t.uniq=t.elem=t.rotate=t.intersperse=t.prependAll=t.unzip=t.zip=t.zipWith=t.sort=void 0,t.some=t.every=t.unsafeDeleteAt=t.unsafeUpdateAt=t.unsafeInsertAt=t.fromEitherK=t.FromEither=t.filterE=t.ChainRecBreadthFirst=t.chainRecBreadthFirst=t.ChainRecDepthFirst=t.chainRecDepthFirst=t.Witherable=t.TraversableWithIndex=t.Traversable=t.FoldableWithIndex=t.Foldable=t.FilterableWithIndex=t.Filterable=t.Compactable=t.Extend=t.Alternative=t.guard=t.Zero=t.Alt=t.Unfoldable=t.Monad=t.chainFirst=t.Chain=t.Applicative=t.apSecond=t.apFirst=t.Apply=t.FunctorWithIndex=t.Pointed=t.flap=t.Functor=t.getDifferenceMagma=t.getIntersectionSemigroup=t.getUnionMonoid=t.getUnionSemigroup=t.getOrd=t.getEq=t.getMonoid=t.getSemigroup=t.getShow=t.URI=t.unfold=t.wilt=t.wither=void 0,t.array=t.prependToAll=t.snoc=t.cons=t.empty=t.range=t.apS=t.bind=t.bindTo=t.Do=t.exists=void 0;var i=u(U),o=u(Dt),c=u(zt);t.isEmpty=function(n){return 0===n.length},t.isNonEmpty=o.isNonEmpty,t.prepend=o.prepend,t.prependW=o.prependW,t.append=o.append,t.appendW=o.appendW,t.makeBy=function(n,t){return n<=0?[]:o.makeBy(t)(n)},t.replicate=function(n,r){return t.makeBy(n,(function(){return r}))},t.fromPredicate=function(n){return function(t){return n(t)?[t]:[]}},t.fromOption=function(n){return i.isNone(n)?[]:[n.value]},t.fromEither=function(n){return i.isLeft(n)?[]:[n.right]},t.matchW=function(n,r){return function(e){return t.isNonEmpty(e)?r(e):n()}},t.match=t.matchW,t.matchLeftW=function(n,r){return function(e){return t.isNonEmpty(e)?r(o.head(e),o.tail(e)):n()}},t.matchLeft=t.matchLeftW,t.foldLeft=t.matchLeft,t.matchRightW=function(n,r){return function(e){return t.isNonEmpty(e)?r(o.init(e),o.last(e)):n()}},t.matchRight=t.matchRightW,t.foldRight=t.matchRight,t.chainWithIndex=function(n){return function(t){for(var r=[],e=0;e<t.length;e++)r.push.apply(r,n(e,t[e]));return r}},t.scanLeft=function(n,t){return function(r){var e=r.length,u=new Array(e+1);u[0]=n;for(var i=0;i<e;i++)u[i+1]=t(u[i],r[i]);return u}},t.scanRight=function(n,t){return function(r){var e=r.length,u=new Array(e+1);u[e]=n;for(var i=e-1;i>=0;i--)u[i]=t(r[i],u[i+1]);return u}},t.size=function(n){return n.length},t.isOutOfBound=o.isOutOfBound,t.lookup=c.lookup,t.head=c.head,t.last=c.last,t.tail=function(n){return t.isNonEmpty(n)?i.some(o.tail(n)):i.none},t.init=function(n){return t.isNonEmpty(n)?i.some(o.init(n)):i.none},t.takeLeft=function(n){return function(r){return t.isOutOfBound(n,r)?t.copy(r):r.slice(0,n)}},t.takeRight=function(n){return function(r){return t.isOutOfBound(n,r)?t.copy(r):0===n?[]:r.slice(-n)}},t.takeLeftWhile=function(n){return function(t){for(var r=[],e=0,u=t;e<u.length;e++){var i=u[e];if(!n(i))break;r.push(i)}return r}};var f=function(n,t){for(var r=n.length,e=0;e<r&&t(n[e]);e++);return e};function a(n){var r=o.union(n);return function(e,u){if(void 0===u){var i=a(n);return function(n){return i(n,e)}}return t.isNonEmpty(e)&&t.isNonEmpty(u)?r(u)(e):t.isNonEmpty(e)?t.copy(e):t.copy(u)}}function s(n){var r=t.elem(n);return function(t,e){if(void 0===e){var u=s(n);return function(n){return u(n,t)}}return t.filter((function(n){return r(n,e)}))}}function v(n){var r=t.elem(n);return function(t,e){if(void 0===e){var u=v(n);return function(n){return u(n,t)}}return t.filter((function(n){return!r(n,e)}))}}t.spanLeft=function(n){return function(r){var e=t.splitAt(f(r,n))(r);return{init:e[0],rest:e[1]}}},t.dropLeft=function(n){return function(r){return n<=0||t.isEmpty(r)?t.copy(r):n>=r.length?[]:r.slice(n,r.length)}},t.dropRight=function(n){return function(r){return n<=0||t.isEmpty(r)?t.copy(r):n>=r.length?[]:r.slice(0,r.length-n)}},t.dropLeftWhile=function(n){return function(t){return t.slice(f(t,n))}},t.findIndex=c.findIndex,t.findFirst=function(n){return c.findFirst(n)},t.findFirstMap=c.findFirstMap,t.findLast=function(n){return c.findLast(n)},t.findLastMap=c.findLastMap,t.findLastIndex=c.findLastIndex,t.copy=function(n){return n.slice()},t.insertAt=function(n,r){return function(e){return n<0||n>e.length?i.none:i.some(t.unsafeInsertAt(n,r,e))}},t.updateAt=function(n,r){return t.modifyAt(n,(function(){return r}))},t.deleteAt=function(n){return function(r){return t.isOutOfBound(n,r)?i.none:i.some(t.unsafeDeleteAt(n,r))}},t.modifyAt=function(n,r){return function(e){return t.isOutOfBound(n,e)?i.none:i.some(t.unsafeUpdateAt(n,r(e[n]),e))}},t.reverse=function(n){return t.isEmpty(n)?[]:n.slice().reverse()},t.rights=function(n){for(var t=[],r=0;r<n.length;r++){var e=n[r];"Right"===e._tag&&t.push(e.right)}return t},t.lefts=function(n){for(var t=[],r=0;r<n.length;r++){var e=n[r];"Left"===e._tag&&t.push(e.left)}return t},t.sort=function(n){return function(r){return r.length<=1?t.copy(r):r.slice().sort(n.compare)}},t.zipWith=function(n,t,r){for(var e=[],u=Math.min(n.length,t.length),i=0;i<u;i++)e[i]=r(n[i],t[i]);return e},t.zip=function n(r,e){return void 0===e?function(t){return n(t,r)}:t.zipWith(r,e,(function(n,t){return[n,t]}))},t.unzip=function(n){for(var t=[],r=[],e=0;e<n.length;e++)t[e]=n[e][0],r[e]=n[e][1];return[t,r]},t.prependAll=function(n){var r=o.prependAll(n);return function(n){return t.isNonEmpty(n)?r(n):[]}},t.intersperse=function(n){var r=o.intersperse(n);return function(n){return t.isNonEmpty(n)?r(n):t.copy(n)}},t.rotate=function(n){var r=o.rotate(n);return function(n){return t.isNonEmpty(n)?r(n):t.copy(n)}},t.elem=c.elem,t.uniq=function(n){var r=o.uniq(n);return function(n){return t.isNonEmpty(n)?r(n):t.copy(n)}},t.sortBy=function(n){var r=o.sortBy(n);return function(n){return t.isNonEmpty(n)?r(n):t.copy(n)}},t.chop=function(n){var r=o.chop(n);return function(n){return t.isNonEmpty(n)?r(n):[]}},t.splitAt=function(n){return function(r){return n>=1&&t.isNonEmpty(r)?o.splitAt(n)(r):t.isEmpty(r)?[t.copy(r),[]]:[[],t.copy(r)]}},t.chunksOf=function(n){var r=o.chunksOf(n);return function(n){return t.isNonEmpty(n)?r(n):[]}},t.fromOptionK=function(n){return function(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];return t.fromOption(n.apply(void 0,r))}},t.comprehension=function(n,r,e){void 0===e&&(e=function(){return!0});var u=function(n,i){return t.isNonEmpty(i)?g.pipe(o.head(i),t.chain((function(r){return u(g.pipe(n,t.append(r)),o.tail(i))}))):e.apply(void 0,n)?[r.apply(void 0,n)]:[]};return u([],n)},t.concatW=function(n){return function(r){return t.isEmpty(r)?t.copy(n):t.isEmpty(n)?t.copy(r):r.concat(n)}},t.concat=t.concatW,t.union=a,t.intersection=s,t.difference=v;var d=function(n,r){return g.pipe(n,t.map(r))},l=function(n,r){return g.pipe(n,t.mapWithIndex(r))},p=function(n,r){return g.pipe(n,t.ap(r))},h=function(n,r){return g.pipe(n,t.chain(r))},m=function(n,r){return g.pipe(n,t.filter(r))},b=function(n,r){return g.pipe(n,t.filterMap(r))},y=function(n,r){return g.pipe(n,t.partition(r))},I=function(n,r){return g.pipe(n,t.partitionMap(r))},j=function(n,r){return g.pipe(n,t.partitionWithIndex(r))},x=function(n,r){return g.pipe(n,t.partitionMapWithIndex(r))},E=function(n,r){return g.pipe(n,t.alt(r))},A=function(n,r,e){return g.pipe(n,t.reduce(r,e))},N=function(n){var r=t.foldMap(n);return function(n,t){return g.pipe(n,r(t))}},W=function(n,r,e){return g.pipe(n,t.reduceRight(r,e))},P=function(n,r,e){return g.pipe(n,t.reduceWithIndex(r,e))},C=function(n){var r=t.foldMapWithIndex(n);return function(n,t){return g.pipe(n,r(t))}},q=function(n,r,e){return g.pipe(n,t.reduceRightWithIndex(r,e))},D=function(n,r){return g.pipe(n,t.filterMapWithIndex(r))},z=function(n,r){return g.pipe(n,t.filterWithIndex(r))},L=function(n,r){return g.pipe(n,t.extend(r))},F=function(n){var r=t.traverse(n);return function(n,t){return g.pipe(n,r(t))}},H=function(n){var r=t.traverseWithIndex(n);return function(n,t){return g.pipe(n,r(t))}},B=c._chainRecDepthFirst,G=c._chainRecBreadthFirst;t.of=o.of,t.zero=function(){return[]},t.map=function(n){return function(t){return t.map((function(t){return n(t)}))}},t.ap=function(n){return t.chain((function(r){return g.pipe(n,t.map(r))}))},t.chain=function(n){return function(r){return g.pipe(r,t.chainWithIndex((function(t,r){return n(r)})))}},t.flatten=t.chain(g.identity),t.mapWithIndex=function(n){return function(t){return t.map((function(t,r){return n(r,t)}))}},t.filterMapWithIndex=function(n){return function(t){for(var r=[],e=0;e<t.length;e++){var u=n(e,t[e]);i.isSome(u)&&r.push(u.value)}return r}},t.filterMap=function(n){return t.filterMapWithIndex((function(t,r){return n(r)}))},t.compact=t.filterMap(g.identity),t.separate=function(n){for(var t=[],r=[],e=0,u=n;e<u.length;e++){var i=u[e];"Left"===i._tag?t.push(i.left):r.push(i.right)}return T.separated(t,r)},t.filter=function(n){return function(t){return t.filter(n)}},t.partition=function(n){return t.partitionWithIndex((function(t,r){return n(r)}))},t.partitionWithIndex=function(n){return function(t){for(var r=[],e=[],u=0;u<t.length;u++){var i=t[u];n(u,i)?e.push(i):r.push(i)}return T.separated(r,e)}},t.partitionMap=function(n){return t.partitionMapWithIndex((function(t,r){return n(r)}))},t.partitionMapWithIndex=function(n){return function(t){for(var r=[],e=[],u=0;u<t.length;u++){var i=n(u,t[u]);"Left"===i._tag?r.push(i.left):e.push(i.right)}return T.separated(r,e)}},t.altW=function(n){return function(t){return t.concat(n())}},t.alt=t.altW,t.filterWithIndex=function(n){return function(t){return t.filter((function(t,r){return n(r,t)}))}},t.extend=function(n){return function(t){return t.map((function(r,e){return n(t.slice(e))}))}},t.duplicate=t.extend(g.identity),t.foldMap=c.foldMap,t.foldMapWithIndex=c.foldMapWithIndex,t.reduce=c.reduce,t.reduceWithIndex=c.reduceWithIndex,t.reduceRight=c.reduceRight,t.reduceRightWithIndex=c.reduceRightWithIndex,t.traverse=function(n){var r=t.traverseWithIndex(n);return function(n){return r((function(t,r){return n(r)}))}},t.sequence=function(n){return function(r){return A(r,n.of(t.zero()),(function(r,e){return n.ap(n.map(r,(function(n){return function(r){return g.pipe(n,t.append(r))}})),e)}))}},t.traverseWithIndex=function(n){return function(r){return t.reduceWithIndex(n.of(t.zero()),(function(e,u,i){return n.ap(n.map(u,(function(n){return function(r){return g.pipe(n,t.append(r))}})),r(e,i))}))}},t.wither=function(n){var t=V(n);return function(n){return function(r){return t(r,n)}}},t.wilt=function(n){var t=J(n);return function(n){return function(r){return t(r,n)}}},t.unfold=function(n,t){for(var r=[],e=n;;){var u=t(e);if(!i.isSome(u))break;var o=u.value,c=o[1];r.push(o[0]),e=c}return r},t.URI="Array",t.getShow=c.getShow,t.getSemigroup=function(){return{concat:function(n,t){return n.concat(t)}}},t.getMonoid=function(){return{concat:t.getSemigroup().concat,empty:[]}},t.getEq=c.getEq,t.getOrd=c.getOrd,t.getUnionSemigroup=function(n){var t=a(n);return{concat:function(n,r){return t(r)(n)}}},t.getUnionMonoid=function(n){return{concat:t.getUnionSemigroup(n).concat,empty:[]}},t.getIntersectionSemigroup=function(n){var t=s(n);return{concat:function(n,r){return t(r)(n)}}},t.getDifferenceMagma=function(n){var t=v(n);return{concat:function(n,r){return t(r)(n)}}},t.Functor={URI:t.URI,map:d},t.flap=O.flap(t.Functor),t.Pointed={URI:t.URI,of:t.of},t.FunctorWithIndex={URI:t.URI,map:d,mapWithIndex:l},t.Apply={URI:t.URI,map:d,ap:p},t.apFirst=R.apFirst(t.Apply),t.apSecond=R.apSecond(t.Apply),t.Applicative={URI:t.URI,map:d,ap:p,of:t.of},t.Chain={URI:t.URI,map:d,ap:p,chain:h},t.chainFirst=_.chainFirst(t.Chain),t.Monad={URI:t.URI,map:d,ap:p,of:t.of,chain:h},t.Unfoldable={URI:t.URI,unfold:t.unfold},t.Alt={URI:t.URI,map:d,alt:E},t.Zero={URI:t.URI,zero:t.zero},t.guard=k.guard(t.Zero,t.Pointed),t.Alternative={URI:t.URI,map:d,ap:p,of:t.of,alt:E,zero:t.zero},t.Extend={URI:t.URI,map:d,extend:L},t.Compactable={URI:t.URI,compact:t.compact,separate:t.separate},t.Filterable={URI:t.URI,map:d,compact:t.compact,separate:t.separate,filter:m,filterMap:b,partition:y,partitionMap:I},t.FilterableWithIndex={URI:t.URI,map:d,mapWithIndex:l,compact:t.compact,separate:t.separate,filter:m,filterMap:b,partition:y,partitionMap:I,partitionMapWithIndex:x,partitionWithIndex:j,filterMapWithIndex:D,filterWithIndex:z},t.Foldable={URI:t.URI,reduce:A,foldMap:N,reduceRight:W},t.FoldableWithIndex={URI:t.URI,reduce:A,foldMap:N,reduceRight:W,reduceWithIndex:P,foldMapWithIndex:C,reduceRightWithIndex:q},t.Traversable={URI:t.URI,map:d,reduce:A,foldMap:N,reduceRight:W,traverse:F,sequence:t.sequence},t.TraversableWithIndex={URI:t.URI,map:d,mapWithIndex:l,reduce:A,foldMap:N,reduceRight:W,reduceWithIndex:P,foldMapWithIndex:C,reduceRightWithIndex:q,traverse:F,sequence:t.sequence,traverseWithIndex:H};var V=S.witherDefault(t.Traversable,t.Compactable),J=S.wiltDefault(t.Traversable,t.Compactable);t.Witherable={URI:t.URI,map:d,compact:t.compact,separate:t.separate,filter:m,filterMap:b,partition:y,partitionMap:I,reduce:A,foldMap:N,reduceRight:W,traverse:F,sequence:t.sequence,wither:V,wilt:J},t.chainRecDepthFirst=c.chainRecDepthFirst,t.ChainRecDepthFirst={URI:t.URI,map:d,ap:p,chain:h,chainRec:B},t.chainRecBreadthFirst=c.chainRecBreadthFirst,t.ChainRecBreadthFirst={URI:t.URI,map:d,ap:p,chain:h,chainRec:G},t.filterE=S.filterE(t.Witherable),t.FromEither={URI:t.URI,fromEither:t.fromEither},t.fromEitherK=M.fromEitherK(t.FromEither),t.unsafeInsertAt=o.unsafeInsertAt,t.unsafeUpdateAt=function(n,r,e){return t.isNonEmpty(e)?o.unsafeUpdateAt(n,r,e):[]},t.unsafeDeleteAt=function(n,t){var r=t.slice();return r.splice(n,1),r},t.every=c.every,t.some=function(n){return function(t){return t.some(n)}},t.exists=t.some,t.Do=t.of(i.emptyRecord),t.bindTo=O.bindTo(t.Functor),t.bind=_.bind(t.Chain),t.apS=R.apS(t.Apply),t.range=o.range,t.empty=[],t.cons=o.cons,t.snoc=o.snoc,t.prependToAll=t.prependAll,t.array={URI:t.URI,compact:t.compact,separate:t.separate,map:d,ap:p,of:t.of,chain:h,filter:m,filterMap:b,partition:y,partitionMap:I,mapWithIndex:l,partitionMapWithIndex:x,partitionWithIndex:j,filterMapWithIndex:D,filterWithIndex:z,alt:E,zero:t.zero,unfold:t.unfold,reduce:A,foldMap:N,reduceRight:W,traverse:F,sequence:t.sequence,reduceWithIndex:P,foldMapWithIndex:C,reduceRightWithIndex:q,traverseWithIndex:H,extend:L,wither:V,wilt:J}}));const Ft=n=>({kind:"height",size:n}),Ht=N.contramap((n=>n.size))(Ct.Ord),Bt=Lt.sort(Ht),Gt=Lt.sort({equals:(n,t)=>n.kind===t.kind,compare:(n,t)=>n.kind===t.kind?0:"width"===n.kind?-1:1}),Vt=n=>t=>{const r=Bt(t),e=(n=>{const[t,r]=n;return t.size/r.size})(r),u=Object.assign(Object.assign({},r[0]),{size:n*e}),i=Object.assign(Object.assign({},r[1]),{size:n});return Gt([i,u])},Jt=n=>{const{naturalWidth:t,naturalHeight:r}=n;return[(e=t,{kind:"width",size:e}),Ft(r)];var e},$t=()=>{const n=document.createElement("canvas"),t=n.getContext("2d");return[n,t]},Kt=async n=>{const t=await fetch(n),r=await t.blob();return new File([r],"image",{type:r.type,lastModified:Date.now()})},Xt=n=>()=>new Promise((async t=>{const r=await fetch(n),e=await r.blob();t(new File([e],"image",{type:e.type,lastModified:Date.now()}))})),Zt=(n,t)=>n.naturalWidth>t?((n,t)=>{const r=Vt(n),[e,u]=$t(),i=Jt(t),[o,c]=r(i).map((n=>n.size)),f=new ImageData(o,c),a=(n=>{const{naturalWidth:t,naturalHeight:r}=n,[e,u]=$t();return e.width=t,e.height=r,u.drawImage(n,0,0),u.getImageData(0,0,t,r)})(t);return e.width=o,e.height=c,Pt.lanczos(a,f),u.putImageData(f,0,0),e.toDataURL()})(t,n):(n=>{const t=document.createElement("canvas"),{naturalWidth:r,naturalHeight:e}=n,u=t.getContext("2d");return t.width=r,t.height=e,u.drawImage(n,0,0,r,e),t.toDataURL()})(n),Yt=n=>i(n,ft,$((n=>({headers:n})))),{state:Qt,onChange:nr}=D({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:P.none,imageUrl:P.none,imageBounds:P.none,searchArea:P.none,resultsComponents:[],serverError:!1,loading:!1}),tr=async n=>{var t,r;Qt.results=n.value,Qt.filters=(r=lt(n.filters),Object.entries(r).map((([n,t])=>({name:n,filters:t})))),Qt.rectangleSearchForm=n.searchArea,Qt.resetCategoryLink=null===(t=n.links)||void 0===t?void 0:t.clearFilters,Qt.loading=!1},rr=n=>i(Yt(Qt.token),_n,An(pt(n))),er=async()=>{Qt.loading=!0,i(Ut(Qt.imageBounds,Qt.searchArea),P.map((async([n,t])=>{const r=(e=n,n=>({x:n.x/e.width,y:n.y/e.height,width:n.width/e.width,height:n.height/e.height}))(t);var e;const u={width:r.width,height:r.height,left:r.x,top:r.y};return await i(Yt(Qt.token),_n,An(jt(Qt.rectangleSearchForm,u)),Un(tr))()})))},ur=n=>{Qt.loading=!0;const t=(n=>{const t=new FormData;return t.append("image",n),t})(n);return i(at(ft(Qt.token),V(t)),$((([n,t])=>({headers:n,body:t}))),_n,En(vt),Un((n=>(tr(n),(async n=>{Qt.objectDetectionInProgress=!0;const t={kind:"server",inner:"Can not get a link for objects detection"};var r,e,u;await i((r=n,e="detectedObjects",i(r.links,on,(u=n=>on(n[e]),function(n){return un(n)?tn:u(n.value)}))),Tn((()=>t)),En(rr),Un((n=>Qt.detectedObjects=lt(n))))(),Qt.objectDetectionInProgress=!1})(n),Qt.loading=!1,n))),Mn((n=>(Qt.serverError=!0,Qt.loading=!1,n))))},ir=Qt;nr("activeIonLink",(async n=>{Qt.loading=!0;const t=n||Qt.resetCategoryLink;await i(Yt(Qt.token),_n,An(pt(t)),Un(tr),Mn((n=>({kind:"network error",inner:n}))))()})),nr("searchArea",(n=>{i(n,P.map((n=>{var t;Qt.cropperHandlers=[{position:l(t=n),direction:b.NorthWest},{position:m.concat(l(t),{x:t.width,y:0}),direction:b.NorthEast},{position:m.concat(l(t),{x:0,y:t.height}),direction:b.SouthWest},{position:m.concat(l(t),{x:t.width,y:t.height}),direction:b.SouthEast}]})))})),nr("serverError",(()=>{Qt.loading=!1}));const or=n=>{ir.image=P.some(n),ir.imageUrl=P.some(n.src)},cr=async n=>{const t=(n=>g.pipe(n,P.fromNullable,Cn.fromOption((()=>At)),Cn.chain(Et)))(n),r=(500,n=>g.pipe(n,Nt,Fn.map((n=>Zt(n,500))),Fn.chain(Xt)));const e=i(t,_n,Sn(r)),u=await i(e,En(ur))();return i(at(u,t),$((([n,t])=>(async(n,t)=>{const r={image:await(async n=>({name:n.name,mediaType:n.type,value:await _t(n)}))(t)},e=n.uploadHighResolutionImage;await i(Yt(Qt.token),_n,An(jt(e,r)))()})(n,t)))),await i(e,Sn(Nt),Un(or))(),u};var fr,ar=new Uint8Array(16);function sr(){if(!fr&&!(fr="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return fr(ar)}const vr=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function dr(n){return"string"==typeof n&&vr.test(n)}for(var lr=[],pr=0;pr<256;++pr)lr.push((pr+256).toString(16).substr(1));function hr(n,t,r){var e=(n=n||{}).random||(n.rng||sr)();if(e[6]=15&e[6]|64,e[8]=63&e[8]|128,t){r=r||0;for(var u=0;u<16;++u)t[r+u]=e[u];return t}return function(n){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=(lr[n[t+0]]+lr[n[t+1]]+lr[n[t+2]]+lr[n[t+3]]+"-"+lr[n[t+4]]+lr[n[t+5]]+"-"+lr[n[t+6]]+lr[n[t+7]]+"-"+lr[n[t+8]]+lr[n[t+9]]+"-"+lr[n[t+10]]+lr[n[t+11]]+lr[n[t+12]]+lr[n[t+13]]+lr[n[t+14]]+lr[n[t+15]]).toLowerCase();if(!dr(r))throw TypeError("Stringified UUID is invalid");return r}(e)}var mr=function(n,t){if(t=t.split(":")[0],!(n=+n))return!1;switch(t){case"http":case"ws":return 80!==n;case"https":case"wss":return 443!==n;case"ftp":return 21!==n;case"gopher":return 70!==n;case"file":return!1}return 0!==n},br=Object.prototype.hasOwnProperty;function yr(n){try{return decodeURIComponent(n.replace(/\+/g," "))}catch(n){return null}}function wr(n){try{return encodeURIComponent(n)}catch(n){return null}}var Ir={stringify:function(n,t){t=t||"";var r,e,u=[];for(e in"string"!=typeof t&&(t="?"),n)if(br.call(n,e)){if((r=n[e])||null!=r&&!isNaN(r)||(r=""),e=wr(e),r=wr(r),null===e||null===r)continue;u.push(e+"="+r)}return u.length?t+u.join("&"):""},parse:function(n){for(var t,r=/([^=?#&]+)=?([^&]*)/g,e={};t=r.exec(n);){var u=yr(t[1]),i=yr(t[2]);null===u||null===i||u in e||(e[u]=i)}return e}},gr=/^[\x00-\x20\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/,Rr=/[\n\r\t]/g,Or=/^[A-Za-z][A-Za-z0-9+-.]*:\/\//,jr=/:\d+$/,_r=/^([a-z][a-z0-9.+-]*:)?(\/\/)?([\\/]+)?([\S\s]*)/i,Ur=/^[a-zA-Z]:/;function Mr(n){return(n||"").toString().replace(gr,"")}var xr=[["#","hash"],["?","query"],function(n,t){return Nr(t.protocol)?n.replace(/\\/g,"/"):n},["/","pathname"],["@","auth",1],[NaN,"host",void 0,1,1],[/:(\d*)$/,"port",void 0,1],[NaN,"hostname",void 0,1,1]],Er={hash:1,query:1};function Ar(n){var t;t="undefined"!=typeof window?window:void 0!==w?w:"undefined"!=typeof self?self:{};var r,e={},u=typeof(n=n||t.location||{});if("blob:"===n.protocol)e=new Tr(unescape(n.pathname),{});else if("string"===u)for(r in e=new Tr(n,{}),Er)delete e[r];else if("object"===u){for(r in n)r in Er||(e[r]=n[r]);void 0===e.slashes&&(e.slashes=Or.test(n.href))}return e}function Nr(n){return"file:"===n||"ftp:"===n||"http:"===n||"https:"===n||"ws:"===n||"wss:"===n}function Wr(n,t){n=(n=Mr(n)).replace(Rr,""),t=t||{};var r,e=_r.exec(n),u=e[1]?e[1].toLowerCase():"",i=!!e[2],o=!!e[3],c=0;return i?o?(r=e[2]+e[3]+e[4],c=e[2].length+e[3].length):(r=e[2]+e[4],c=e[2].length):o?(r=e[3]+e[4],c=e[3].length):r=e[4],"file:"===u?c>=2&&(r=r.slice(2)):Nr(u)?r=e[4]:u?i&&(r=r.slice(2)):c>=2&&Nr(t.protocol)&&(r=e[4]),{protocol:u,slashes:i||Nr(u),slashesCount:c,rest:r}}function Tr(n,t,r){if(n=(n=Mr(n)).replace(Rr,""),!(this instanceof Tr))return new Tr(n,t,r);var e,u,i,o,c,f,a=xr.slice(),s=typeof t,v=this,d=0;for("object"!==s&&"string"!==s&&(r=t,t=null),r&&"function"!=typeof r&&(r=Ir.parse),e=!(u=Wr(n||"",t=Ar(t))).protocol&&!u.slashes,v.slashes=u.slashes||e&&t.slashes,v.protocol=u.protocol||t.protocol||"",n=u.rest,("file:"===u.protocol&&(2!==u.slashesCount||Ur.test(n))||!u.slashes&&(u.protocol||u.slashesCount<2||!Nr(v.protocol)))&&(a[3]=[/(.*)/,"pathname"]);d<a.length;d++)"function"!=typeof(o=a[d])?(f=o[1],(i=o[0])!=i?v[f]=n:"string"==typeof i?~(c="@"===i?n.lastIndexOf(i):n.indexOf(i))&&("number"==typeof o[2]?(v[f]=n.slice(0,c),n=n.slice(c+o[2])):(v[f]=n.slice(c),n=n.slice(0,c))):(c=i.exec(n))&&(v[f]=c[1],n=n.slice(0,c.index)),v[f]=v[f]||e&&o[3]&&t[f]||"",o[4]&&(v[f]=v[f].toLowerCase())):n=o(n,v);r&&(v.query=r(v.query)),e&&t.slashes&&"/"!==v.pathname.charAt(0)&&(""!==v.pathname||""!==t.pathname)&&(v.pathname=function(n,t){if(""===n)return t;for(var r=(t||"/").split("/").slice(0,-1).concat(n.split("/")),e=r.length,u=r[e-1],i=!1,o=0;e--;)"."===r[e]?r.splice(e,1):".."===r[e]?(r.splice(e,1),o++):o&&(0===e&&(i=!0),r.splice(e,1),o--);return i&&r.unshift(""),"."!==u&&".."!==u||r.push(""),r.join("/")}(v.pathname,t.pathname)),"/"!==v.pathname.charAt(0)&&Nr(v.protocol)&&(v.pathname="/"+v.pathname),mr(v.port,v.protocol)||(v.host=v.hostname,v.port=""),v.username=v.password="",v.auth&&(~(c=v.auth.indexOf(":"))?(v.username=v.auth.slice(0,c),v.username=encodeURIComponent(decodeURIComponent(v.username)),v.password=v.auth.slice(c+1),v.password=encodeURIComponent(decodeURIComponent(v.password))):v.username=encodeURIComponent(decodeURIComponent(v.auth)),v.auth=v.password?v.username+":"+v.password:v.username),v.origin="file:"!==v.protocol&&Nr(v.protocol)&&v.host?v.protocol+"//"+v.host:"null",v.href=v.toString()}Tr.prototype={set:function(n,t,r){var e=this;switch(n){case"query":"string"==typeof t&&t.length&&(t=(r||Ir.parse)(t)),e[n]=t;break;case"port":e[n]=t,mr(t,e.protocol)?t&&(e.host=e.hostname+":"+t):(e.host=e.hostname,e[n]="");break;case"hostname":e[n]=t,e.port&&(t+=":"+e.port),e.host=t;break;case"host":e[n]=t,jr.test(t)?(t=t.split(":"),e.port=t.pop(),e.hostname=t.join(":")):(e.hostname=t,e.port="");break;case"protocol":e.protocol=t.toLowerCase(),e.slashes=!r;break;case"pathname":case"hash":if(t){var u="pathname"===n?"/":"#";e[n]=t.charAt(0)!==u?u+t:t}else e[n]=t;break;case"username":case"password":e[n]=encodeURIComponent(t);break;case"auth":var i=t.indexOf(":");~i?(e.username=t.slice(0,i),e.username=encodeURIComponent(decodeURIComponent(e.username)),e.password=t.slice(i+1),e.password=encodeURIComponent(decodeURIComponent(e.password))):e.username=encodeURIComponent(decodeURIComponent(t))}for(var o=0;o<xr.length;o++){var c=xr[o];c[4]&&(e[c[1]]=e[c[1]].toLowerCase())}return e.auth=e.password?e.username+":"+e.password:e.username,e.origin="file:"!==e.protocol&&Nr(e.protocol)&&e.host?e.protocol+"//"+e.host:"null",e.href=e.toString(),e},toString:function(n){n&&"function"==typeof n||(n=Ir.stringify);var t,r=this,e=r.host,u=r.protocol;u&&":"!==u.charAt(u.length-1)&&(u+=":");var i=u+(r.protocol&&r.slashes||Nr(r.protocol)?"//":"");return r.username?(i+=r.username,r.password&&(i+=":"+r.password),i+="@"):r.password?(i+=":"+r.password,i+="@"):"file:"!==r.protocol&&Nr(r.protocol)&&!e&&"/"!==r.pathname&&(i+="@"),(":"===e[e.length-1]||jr.test(r.hostname)&&!r.port)&&(e+=":"),i+=e+r.pathname,(t="object"==typeof r.query?n(r.query):r.query)&&(i+="?"!==t.charAt(0)?"?"+t:t),r.hash&&(i+=r.hash),i}},Tr.extractProtocol=Wr,Tr.location=Ar,Tr.trimLeft=Mr,Tr.qs=Ir;var Sr=Tr,kr=I((function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.map=t.mergeMap=t.of=t.from=t.Observable=void 0;var r=function(){function n(n){this.promise=n}return n.prototype.toPromise=function(){return this.promise},n.prototype.pipe=function(t){return new n(this.promise.then(t))},n}();t.Observable=r,t.from=function(n){return new r(n)},t.of=function(n){return new r(Promise.resolve(n))},t.mergeMap=function(n){return function(t){return n(t).toPromise()}},t.map=function(n){return n}})),Pr="undefined"!=typeof globalThis&&globalThis||"undefined"!=typeof self&&self||void 0!==Pr&&Pr,Cr="URLSearchParams"in Pr,qr="Symbol"in Pr&&"iterator"in Symbol,Dr="FileReader"in Pr&&"Blob"in Pr&&function(){try{return new Blob,!0}catch(n){return!1}}(),zr="FormData"in Pr,Lr="ArrayBuffer"in Pr;if(Lr)var Fr=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],Hr=ArrayBuffer.isView||function(n){return n&&Fr.indexOf(Object.prototype.toString.call(n))>-1};function Br(n){if("string"!=typeof n&&(n=String(n)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(n)||""===n)throw new TypeError('Invalid character in header field name: "'+n+'"');return n.toLowerCase()}function Gr(n){return"string"!=typeof n&&(n=String(n)),n}function Vr(n){var t={next:function(){var t=n.shift();return{done:void 0===t,value:t}}};return qr&&(t[Symbol.iterator]=function(){return t}),t}function Jr(n){this.map={},n instanceof Jr?n.forEach((function(n,t){this.append(t,n)}),this):Array.isArray(n)?n.forEach((function(n){this.append(n[0],n[1])}),this):n&&Object.getOwnPropertyNames(n).forEach((function(t){this.append(t,n[t])}),this)}function $r(n){if(n.bodyUsed)return Promise.reject(new TypeError("Already read"));n.bodyUsed=!0}function Kr(n){return new Promise((function(t,r){n.onload=function(){t(n.result)},n.onerror=function(){r(n.error)}}))}function Xr(n){var t=new FileReader,r=Kr(t);return t.readAsArrayBuffer(n),r}function Zr(n){if(n.slice)return n.slice(0);var t=new Uint8Array(n.byteLength);return t.set(new Uint8Array(n)),t.buffer}function Yr(){return this.bodyUsed=!1,this._initBody=function(n){var t;this.bodyUsed=this.bodyUsed,this._bodyInit=n,n?"string"==typeof n?this._bodyText=n:Dr&&Blob.prototype.isPrototypeOf(n)?this._bodyBlob=n:zr&&FormData.prototype.isPrototypeOf(n)?this._bodyFormData=n:Cr&&URLSearchParams.prototype.isPrototypeOf(n)?this._bodyText=n.toString():Lr&&Dr&&(t=n)&&DataView.prototype.isPrototypeOf(t)?(this._bodyArrayBuffer=Zr(n.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):Lr&&(ArrayBuffer.prototype.isPrototypeOf(n)||Hr(n))?this._bodyArrayBuffer=Zr(n):this._bodyText=n=Object.prototype.toString.call(n):this._bodyText="",this.headers.get("content-type")||("string"==typeof n?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):Cr&&URLSearchParams.prototype.isPrototypeOf(n)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},Dr&&(this.blob=function(){var n=$r(this);if(n)return n;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?$r(this)||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer)):this.blob().then(Xr)}),this.text=function(){var n,t,r,e=$r(this);if(e)return e;if(this._bodyBlob)return n=this._bodyBlob,r=Kr(t=new FileReader),t.readAsText(n),r;if(this._bodyArrayBuffer)return Promise.resolve(function(n){for(var t=new Uint8Array(n),r=new Array(t.length),e=0;e<t.length;e++)r[e]=String.fromCharCode(t[e]);return r.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},zr&&(this.formData=function(){return this.text().then(te)}),this.json=function(){return this.text().then(JSON.parse)},this}Jr.prototype.append=function(n,t){n=Br(n),t=Gr(t);var r=this.map[n];this.map[n]=r?r+", "+t:t},Jr.prototype.delete=function(n){delete this.map[Br(n)]},Jr.prototype.get=function(n){return n=Br(n),this.has(n)?this.map[n]:null},Jr.prototype.has=function(n){return this.map.hasOwnProperty(Br(n))},Jr.prototype.set=function(n,t){this.map[Br(n)]=Gr(t)},Jr.prototype.forEach=function(n,t){for(var r in this.map)this.map.hasOwnProperty(r)&&n.call(t,this.map[r],r,this)},Jr.prototype.keys=function(){var n=[];return this.forEach((function(t,r){n.push(r)})),Vr(n)},Jr.prototype.values=function(){var n=[];return this.forEach((function(t){n.push(t)})),Vr(n)},Jr.prototype.entries=function(){var n=[];return this.forEach((function(t,r){n.push([r,t])})),Vr(n)},qr&&(Jr.prototype[Symbol.iterator]=Jr.prototype.entries);var Qr=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function ne(n,t){if(!(this instanceof ne))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');var r,e,u=(t=t||{}).body;if(n instanceof ne){if(n.bodyUsed)throw new TypeError("Already read");this.url=n.url,this.credentials=n.credentials,t.headers||(this.headers=new Jr(n.headers)),this.method=n.method,this.mode=n.mode,this.signal=n.signal,u||null==n._bodyInit||(u=n._bodyInit,n.bodyUsed=!0)}else this.url=String(n);if(this.credentials=t.credentials||this.credentials||"same-origin",!t.headers&&this.headers||(this.headers=new Jr(t.headers)),this.method=(e=(r=t.method||this.method||"GET").toUpperCase(),Qr.indexOf(e)>-1?e:r),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&u)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(u),!("GET"!==this.method&&"HEAD"!==this.method||"no-store"!==t.cache&&"no-cache"!==t.cache)){var i=/([?&])_=[^&]*/;i.test(this.url)?this.url=this.url.replace(i,"$1_="+(new Date).getTime()):this.url+=(/\?/.test(this.url)?"&":"?")+"_="+(new Date).getTime()}}function te(n){var t=new FormData;return n.trim().split("&").forEach((function(n){if(n){var r=n.split("="),e=r.shift().replace(/\+/g," "),u=r.join("=").replace(/\+/g," ");t.append(decodeURIComponent(e),decodeURIComponent(u))}})),t}function re(n,t){if(!(this instanceof re))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.ok=this.status>=200&&this.status<300,this.statusText=void 0===t.statusText?"":""+t.statusText,this.headers=new Jr(t.headers),this.url=t.url||"",this._initBody(n)}ne.prototype.clone=function(){return new ne(this,{body:this._bodyInit})},Yr.call(ne.prototype),Yr.call(re.prototype),re.prototype.clone=function(){return new re(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new Jr(this.headers),url:this.url})},re.error=function(){var n=new re(null,{status:0,statusText:""});return n.type="error",n};var ee=[301,302,303,307,308];re.redirect=function(n,t){if(-1===ee.indexOf(t))throw new RangeError("Invalid status code");return new re(null,{status:t,headers:{location:n}})};var ue=Pr.DOMException;try{new ue}catch(n){(ue=function(n,t){this.message=n,this.name=t;var r=Error(n);this.stack=r.stack}).prototype=Object.create(Error.prototype),ue.prototype.constructor=ue}function ie(n,t){return new Promise((function(r,e){var u=new ne(n,t);if(u.signal&&u.signal.aborted)return e(new ue("Aborted","AbortError"));var i=new XMLHttpRequest;function o(){i.abort()}i.onload=function(){var n,t,e={status:i.status,statusText:i.statusText,headers:(n=i.getAllResponseHeaders()||"",t=new Jr,n.replace(/\r?\n[\t ]+/g," ").split("\r").map((function(n){return 0===n.indexOf("\n")?n.substr(1,n.length):n})).forEach((function(n){var r=n.split(":"),e=r.shift().trim();if(e){var u=r.join(":").trim();t.append(e,u)}})),t)};e.url="responseURL"in i?i.responseURL:e.headers.get("X-Request-URL");var u="response"in i?i.response:i.responseText;setTimeout((function(){r(new re(u,e))}),0)},i.onerror=function(){setTimeout((function(){e(new TypeError("Network request failed"))}),0)},i.ontimeout=function(){setTimeout((function(){e(new TypeError("Network request failed"))}),0)},i.onabort=function(){setTimeout((function(){e(new ue("Aborted","AbortError"))}),0)},i.open(u.method,function(n){try{return""===n&&Pr.location.href?Pr.location.href:n}catch(t){return n}}(u.url),!0),"include"===u.credentials?i.withCredentials=!0:"omit"===u.credentials&&(i.withCredentials=!1),"responseType"in i&&(Dr?i.responseType="blob":Lr&&u.headers.get("Content-Type")&&-1!==u.headers.get("Content-Type").indexOf("application/octet-stream")&&(i.responseType="arraybuffer")),!t||"object"!=typeof t.headers||t.headers instanceof Jr?u.headers.forEach((function(n,t){i.setRequestHeader(t,n)})):Object.getOwnPropertyNames(t.headers).forEach((function(n){i.setRequestHeader(n,Gr(t.headers[n]))})),u.signal&&(u.signal.addEventListener("abort",o),i.onreadystatechange=function(){4===i.readyState&&u.signal.removeEventListener("abort",o)}),i.send(void 0===u._bodyInit?null:u._bodyInit)}))}ie.polyfill=!0,Pr.fetch||(Pr.fetch=ie,Pr.Headers=Jr,Pr.Request=ne,Pr.Response=re);var oe=I((function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.IsomorphicFetchHttpLibrary=void 0;var r=function(){function n(){}return n.prototype.send=function(n){var t=n.getHttpMethod().toString(),r=n.getBody(),e=fetch(n.getUrl(),{method:t,body:r,headers:n.getHeaders(),credentials:"same-origin"}).then((function(n){var t={};n.headers.forEach((function(n,r){t[r]=n}));var r={text:function(){return n.text()},binary:function(){return n.blob()}};return new ce.ResponseContext(n.status,t,r)}));return(0,kr.from)(e)},n}();t.IsomorphicFetchHttpLibrary=r})),ce=I((function(n,t){var r,e,u=w&&w.__extends||(r=function(n,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])})(n,t)},function(n,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function e(){this.constructor=n}r(n,t),n.prototype=null===t?Object.create(t):(e.prototype=t.prototype,new e)}),i=w&&w.__createBinding||(Object.create?function(n,t,r,e){void 0===e&&(e=r);var u=Object.getOwnPropertyDescriptor(t,r);u&&!("get"in u?!t.__esModule:u.writable||u.configurable)||(u={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(n,e,u)}:function(n,t,r,e){void 0===e&&(e=r),n[e]=t[r]}),o=w&&w.__exportStar||function(n,t){for(var r in n)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,n,r)},c=w&&w.__awaiter||function(n,t,r,e){return new(r||(r=Promise))((function(u,i){function o(n){try{f(e.next(n))}catch(n){i(n)}}function c(n){try{f(e.throw(n))}catch(n){i(n)}}function f(n){var t;n.done?u(n.value):(t=n.value,t instanceof r?t:new r((function(n){n(t)}))).then(o,c)}f((e=e.apply(n,t||[])).next())}))},f=w&&w.__generator||function(n,t){var r,e,u,i,o={label:0,sent:function(){if(1&u[0])throw u[1];return u[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(i){return function(c){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;o;)try{if(r=1,e&&(u=2&i[0]?e.return:i[0]?e.throw||((u=e.return)&&u.call(e),0):e.next)&&!(u=u.call(e,i[1])).done)return u;switch(e=0,u&&(i=[2&i[0],u.value]),i[0]){case 0:case 1:u=i;break;case 4:return o.label++,{value:i[1],done:!1};case 5:o.label++,e=i[1],i=[0];continue;case 7:i=o.ops.pop(),o.trys.pop();continue;default:if(!((u=(u=o.trys).length>0&&u[u.length-1])||6!==i[0]&&2!==i[0])){o=0;continue}if(3===i[0]&&(!u||i[1]>u[0]&&i[1]<u[3])){o.label=i[1];break}if(6===i[0]&&o.label<u[1]){o.label=u[1],u=i;break}if(u&&o.label<u[2]){o.label=u[2],o.ops.push(i);break}u[2]&&o.ops.pop(),o.trys.pop();continue}i=t.call(n,o)}catch(n){i=[6,n],e=0}finally{r=u=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,c])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.wrapHttpLibrary=t.ResponseContext=t.SelfDecodingBody=t.RequestContext=t.HttpException=t.HttpMethod=void 0,o(oe,t),(e=t.HttpMethod||(t.HttpMethod={})).GET="GET",e.HEAD="HEAD",e.POST="POST",e.PUT="PUT",e.DELETE="DELETE",e.CONNECT="CONNECT",e.OPTIONS="OPTIONS",e.TRACE="TRACE",e.PATCH="PATCH";var a=function(n){function t(t){return n.call(this,t)||this}return u(t,n),t}(Error);t.HttpException=a;var s=function(){function n(n,t){this.httpMethod=t,this.headers={},this.body=void 0,this.url=new Sr(n,!0)}return n.prototype.getUrl=function(){return this.url.toString()},n.prototype.setUrl=function(n){this.url=new Sr(n,!0)},n.prototype.setBody=function(n){this.body=n},n.prototype.getHttpMethod=function(){return this.httpMethod},n.prototype.getHeaders=function(){return this.headers},n.prototype.getBody=function(){return this.body},n.prototype.setQueryParam=function(n,t){var r=this.url.query;r[n]=t,this.url.set("query",r)},n.prototype.addCookie=function(n,t){this.headers.Cookie||(this.headers.Cookie=""),this.headers.Cookie+=n+"="+t+"; "},n.prototype.setHeaderParam=function(n,t){this.headers[n]=t},n}();t.RequestContext=s;var v=function(){function n(n){this.dataSource=n}return n.prototype.binary=function(){return this.dataSource},n.prototype.text=function(){return c(this,void 0,void 0,(function(){var n;return f(this,(function(t){switch(t.label){case 0:return[4,this.dataSource];case 1:return(n=t.sent()).text?[2,n.text()]:[2,new Promise((function(t,r){var e=new FileReader;e.addEventListener("load",(function(){return t(e.result)})),e.addEventListener("error",(function(){return r(e.error)})),e.readAsText(n)}))]}}))}))},n}();t.SelfDecodingBody=v;var d=function(){function n(n,t,r){this.httpStatusCode=n,this.headers=t,this.body=r}return n.prototype.getParsedHeader=function(n){var t={};if(!this.headers[n])return t;for(var r=0,e=this.headers[n].split(";");r<e.length;r++){var u=e[r].split("=",2),i=u[0],o=u[1];i=i.toLowerCase().trim(),void 0===o?t[""]=i:((o=o.trim()).startsWith('"')&&o.endsWith('"')&&(o=o.substring(1,o.length-1)),t[i]=o)}return t},n.prototype.getBodyAsFile=function(){return c(this,void 0,void 0,(function(){var n,t,r;return f(this,(function(e){switch(e.label){case 0:return[4,this.body.binary()];case 1:n=e.sent(),t=this.getParsedHeader("content-disposition").filename||"",r=this.headers["content-type"]||"";try{return[2,new File([n],t,{type:r})]}catch(e){return[2,Object.assign(n,{name:t,type:r})]}return[2]}}))}))},n.prototype.getBodyAsAny=function(){try{return this.body.text()}catch(n){}try{return this.body.binary()}catch(n){}return Promise.resolve(void 0)},n}();t.ResponseContext=d,t.wrapHttpLibrary=function(n){return{send:function(t){return(0,kr.from)(n.send(t))}}}})),fe=I((function(n,t){var r=w&&w.__awaiter||function(n,t,r,e){return new(r||(r=Promise))((function(u,i){function o(n){try{f(e.next(n))}catch(n){i(n)}}function c(n){try{f(e.throw(n))}catch(n){i(n)}}function f(n){var t;n.done?u(n.value):(t=n.value,t instanceof r?t:new r((function(n){n(t)}))).then(o,c)}f((e=e.apply(n,t||[])).next())}))},e=w&&w.__generator||function(n,t){var r,e,u,i,o={label:0,sent:function(){if(1&u[0])throw u[1];return u[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(i){return function(c){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;o;)try{if(r=1,e&&(u=2&i[0]?e.return:i[0]?e.throw||((u=e.return)&&u.call(e),0):e.next)&&!(u=u.call(e,i[1])).done)return u;switch(e=0,u&&(i=[2&i[0],u.value]),i[0]){case 0:case 1:u=i;break;case 4:return o.label++,{value:i[1],done:!1};case 5:o.label++,e=i[1],i=[0];continue;case 7:i=o.ops.pop(),o.trys.pop();continue;default:if(!((u=(u=o.trys).length>0&&u[u.length-1])||6!==i[0]&&2!==i[0])){o=0;continue}if(3===i[0]&&(!u||i[1]>u[0]&&i[1]<u[3])){o.label=i[1];break}if(6===i[0]&&o.label<u[1]){o.label=u[1],u=i;break}if(u&&o.label<u[2]){o.label=u[2],o.ops.push(i);break}u[2]&&o.ops.pop(),o.trys.pop();continue}i=t.call(n,o)}catch(n){i=[6,n],e=0}finally{r=u=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,c])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.configureAuthMethods=t.BearerAuthAuthentication=void 0;var u=function(){function n(n){this.tokenProvider=n}return n.prototype.getName=function(){return"bearerAuth"},n.prototype.applySecurityAuthentication=function(n){return r(this,void 0,void 0,(function(){var t,r,u,i;return e(this,(function(e){switch(e.label){case 0:return r=(t=n).setHeaderParam,u=["Authorization"],i="Bearer ",[4,this.tokenProvider.getToken()];case 1:return r.apply(t,u.concat([i+e.sent()])),[2]}}))}))},n}();t.BearerAuthAuthentication=u,t.configureAuthMethods=function(n){var t={};return n?(t.default=n.default,n.bearerAuth&&(t.bearerAuth=new u(n.bearerAuth.tokenProvider)),t):t}})),ae=I((function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.Acknowledgement=void 0;var r=function(){function n(){}return n.getAttributeTypeMap=function(){return n.attributeTypeMap},n.discriminator=void 0,n.attributeTypeMap=[{name:"message",baseName:"message",type:"string",format:""}],n}();t.Acknowledgement=r})),se=I((function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.Config=void 0;var r=function(){function n(){}return n.getAttributeTypeMap=function(){return n.attributeTypeMap},n.discriminator=void 0,n.attributeTypeMap=[{name:"track",baseName:"track",type:"boolean",format:""}],n}();t.Config=r})),ve=I((function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.ErrorObject=void 0;var r=function(){function n(){}return n.getAttributeTypeMap=function(){return n.attributeTypeMap},n.discriminator=void 0,n.attributeTypeMap=[{name:"domain",baseName:"domain",type:"string",format:""},{name:"reason",baseName:"reason",type:"string",format:""},{name:"message",baseName:"message",type:"string",format:""},{name:"location",baseName:"location",type:"string",format:""},{name:"location_type",baseName:"location_type",type:"string",format:""},{name:"extended_help",baseName:"extended_help",type:"string",format:""},{name:"send_report",baseName:"send_report",type:"string",format:""}],n}();t.ErrorObject=r})),de=I((function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.ErrorResponse=void 0;var r=function(){function n(){}return n.getAttributeTypeMap=function(){return n.attributeTypeMap},n.discriminator=void 0,n.attributeTypeMap=[{name:"code",baseName:"code",type:"number",format:""},{name:"message",baseName:"message",type:"string",format:""},{name:"errors",baseName:"errors",type:"Array<ErrorObject>",format:""}],n}();t.ErrorResponse=r})),le=I((function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.Event=void 0;var r=function(){function n(){this.typ="Event"}return n.getAttributeTypeMap=function(){return n.attributeTypeMap},n.discriminator="typ",n.attributeTypeMap=[{name:"session_id",baseName:"session_id",type:"string",format:""},{name:"typ",baseName:"typ",type:"string",format:""}],n}();t.Event=r})),pe=I((function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.EventConfirmation=void 0;var r=function(){function n(){}return n.getAttributeTypeMap=function(){return n.attributeTypeMap},n.discriminator=void 0,n.attributeTypeMap=[{name:"status",baseName:"status",type:"EventConfirmationStatusEnum",format:""}],n}();t.EventConfirmation=r})),he=I((function(n,t){Object.defineProperty(t,"__esModule",{value:!0})})),me=I((function(n,t){var r,e=w&&w.__extends||(r=function(n,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])})(n,t)},function(n,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function e(){this.constructor=n}r(n,t),n.prototype=null===t?Object.create(t):(e.prototype=t.prototype,new e)});Object.defineProperty(t,"__esModule",{value:!0}),t.FilterEvent=void 0;var u=function(n){function t(){var t=n.call(this)||this;return t.typ="FilterEvent",t}return e(t,n),t.getAttributeTypeMap=function(){return n.getAttributeTypeMap.call(this).concat(t.attributeTypeMap)},t.discriminator=void 0,t.attributeTypeMap=[{name:"widget",baseName:"widget",type:"Widget",format:""},{name:"action",baseName:"action",type:"FilterAction",format:""},{name:"kind",baseName:"kind",type:"FilterKind",format:""}],t}(le.Event);t.FilterEvent=u})),be=I((function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.FilterEventAllOf=void 0;var r=function(){function n(){}return n.getAttributeTypeMap=function(){return n.attributeTypeMap},n.discriminator=void 0,n.attributeTypeMap=[{name:"widget",baseName:"widget",type:"Widget",format:""},{name:"action",baseName:"action",type:"FilterAction",format:""},{name:"kind",baseName:"kind",type:"FilterKind",format:""}],n}();t.FilterEventAllOf=r})),ye=I((function(n,t){Object.defineProperty(t,"__esModule",{value:!0})})),we=I((function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.Histogram=void 0;var r=function(){function n(){}return n.getAttributeTypeMap=function(){return n.attributeTypeMap},n.discriminator=void 0,n.attributeTypeMap=[{name:"summary",baseName:"summary",type:"HistogramSummary",format:""},{name:"intervals",baseName:"intervals",type:"Array<HistogramItem>",format:""}],n}();t.Histogram=r})),Ie=I((function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.HistogramItem=void 0;var r=function(){function n(){}return n.getAttributeTypeMap=function(){return n.attributeTypeMap},n.discriminator=void 0,n.attributeTypeMap=[{name:"interval",baseName:"interval",type:"Interval",format:""},{name:"frequency",baseName:"frequency",type:"number",format:""}],n}();t.HistogramItem=r})),ge=I((function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.HistogramSummary=void 0;var r=function(){function n(){}return n.getAttributeTypeMap=function(){return n.attributeTypeMap},n.discriminator=void 0,n.attributeTypeMap=[{name:"interval",baseName:"interval",type:"Interval",format:""},{name:"frequency",baseName:"frequency",type:"number",format:""}],n}();t.HistogramSummary=r})),Re=I((function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.InteractionReport=void 0;var r=function(){function n(){}return n.getAttributeTypeMap=function(){return n.attributeTypeMap},n.discriminator=void 0,n.attributeTypeMap=[{name:"interactions",baseName:"interactions",type:"Histogram",format:""},{name:"product_views",baseName:"product_views",type:"Histogram",format:""},{name:"product_clicks",baseName:"product_clicks",type:"Histogram",format:""},{name:"click_through_rate",baseName:"click_through_rate",type:"Rate",format:""}],n}();t.InteractionReport=r})),Oe=I((function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.Interval=void 0;var r=function(){function n(){}return n.getAttributeTypeMap=function(){return n.attributeTypeMap},n.discriminator=void 0,n.attributeTypeMap=[{name:"start_datetime",baseName:"start_datetime",type:"Date",format:"date-time"},{name:"end_datetime",baseName:"end_datetime",type:"Date",format:"date-time"}],n}();t.Interval=r})),je=I((function(n,t){var r,e=w&&w.__extends||(r=function(n,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])})(n,t)},function(n,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function e(){this.constructor=n}r(n,t),n.prototype=null===t?Object.create(t):(e.prototype=t.prototype,new e)});Object.defineProperty(t,"__esModule",{value:!0}),t.ProductClickEvent=void 0;var u=function(n){function t(){var t=n.call(this)||this;return t.typ="ProductClickEvent",t}return e(t,n),t.getAttributeTypeMap=function(){return n.getAttributeTypeMap.call(this).concat(t.attributeTypeMap)},t.discriminator=void 0,t.attributeTypeMap=[{name:"widget",baseName:"widget",type:"Widget",format:""},{name:"product",baseName:"product",type:"string",format:""},{name:"rank",baseName:"rank",type:"number",format:""}],t}(le.Event);t.ProductClickEvent=u})),_e=I((function(n,t){var r,e=w&&w.__extends||(r=function(n,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])})(n,t)},function(n,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function e(){this.constructor=n}r(n,t),n.prototype=null===t?Object.create(t):(e.prototype=t.prototype,new e)});Object.defineProperty(t,"__esModule",{value:!0}),t.ProductViewEvent=void 0;var u=function(n){function t(){var t=n.call(this)||this;return t.typ="ProductViewEvent",t}return e(t,n),t.getAttributeTypeMap=function(){return n.getAttributeTypeMap.call(this).concat(t.attributeTypeMap)},t.discriminator=void 0,t.attributeTypeMap=[{name:"widget",baseName:"widget",type:"Widget",format:""},{name:"product",baseName:"product",type:"string",format:""},{name:"rank",baseName:"rank",type:"number",format:""}],t}(le.Event);t.ProductViewEvent=u})),Ue=I((function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.ProductViewEventAllOf=void 0;var r=function(){function n(){}return n.getAttributeTypeMap=function(){return n.attributeTypeMap},n.discriminator=void 0,n.attributeTypeMap=[{name:"widget",baseName:"widget",type:"Widget",format:""},{name:"product",baseName:"product",type:"string",format:""},{name:"rank",baseName:"rank",type:"number",format:""}],n}();t.ProductViewEventAllOf=r})),Me=I((function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.Rate=void 0;var r=function(){function n(){}return n.getAttributeTypeMap=function(){return n.attributeTypeMap},n.discriminator=void 0,n.attributeTypeMap=[{name:"summary",baseName:"summary",type:"RateSummary",format:""},{name:"intervals",baseName:"intervals",type:"Array<RateItem>",format:""}],n}();t.Rate=r})),xe=I((function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.RateItem=void 0;var r=function(){function n(){}return n.getAttributeTypeMap=function(){return n.attributeTypeMap},n.discriminator=void 0,n.attributeTypeMap=[{name:"interval",baseName:"interval",type:"Interval",format:""},{name:"rate",baseName:"rate",type:"number",format:"float"}],n}();t.RateItem=r})),Ee=I((function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.RateSummary=void 0;var r=function(){function n(){}return n.getAttributeTypeMap=function(){return n.attributeTypeMap},n.discriminator=void 0,n.attributeTypeMap=[{name:"interval",baseName:"interval",type:"Interval",format:""},{name:"rate",baseName:"rate",type:"number",format:"float"}],n}();t.RateSummary=r})),Ae=I((function(n,t){Object.defineProperty(t,"__esModule",{value:!0})})),Ne=I((function(n,t){var r,e=w&&w.__extends||(r=function(n,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])})(n,t)},function(n,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function e(){this.constructor=n}r(n,t),n.prototype=null===t?Object.create(t):(e.prototype=t.prototype,new e)});Object.defineProperty(t,"__esModule",{value:!0}),t.SearchEvent=void 0;var u=function(n){function t(){var t=n.call(this)||this;return t.typ="SearchEvent",t}return e(t,n),t.getAttributeTypeMap=function(){return n.getAttributeTypeMap.call(this).concat(t.attributeTypeMap)},t.discriminator=void 0,t.attributeTypeMap=[{name:"widget",baseName:"widget",type:"Widget",format:""},{name:"source",baseName:"source",type:"SearchImageSource",format:""},{name:"search_area",baseName:"search_area",type:"SearchArea",format:""}],t}(le.Event);t.SearchEvent=u})),We=I((function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.SearchEventAllOf=void 0;var r=function(){function n(){}return n.getAttributeTypeMap=function(){return n.attributeTypeMap},n.discriminator=void 0,n.attributeTypeMap=[{name:"widget",baseName:"widget",type:"Widget",format:""},{name:"source",baseName:"source",type:"SearchImageSource",format:""},{name:"search_area",baseName:"search_area",type:"SearchArea",format:""}],n}();t.SearchEventAllOf=r})),Te=I((function(n,t){Object.defineProperty(t,"__esModule",{value:!0})})),Se=I((function(n,t){Object.defineProperty(t,"__esModule",{value:!0})})),ke=I((function(n,t){Object.defineProperty(t,"__esModule",{value:!0})})),Pe=I((function(n,t){var r,e=w&&w.__extends||(r=function(n,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])})(n,t)},function(n,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function e(){this.constructor=n}r(n,t),n.prototype=null===t?Object.create(t):(e.prototype=t.prototype,new e)});Object.defineProperty(t,"__esModule",{value:!0}),t.WidgetEvent=void 0;var u=function(n){function t(){var t=n.call(this)||this;return t.typ="WidgetEvent",t}return e(t,n),t.getAttributeTypeMap=function(){return n.getAttributeTypeMap.call(this).concat(t.attributeTypeMap)},t.discriminator=void 0,t.attributeTypeMap=[{name:"widget",baseName:"widget",type:"Widget",format:""},{name:"action",baseName:"action",type:"WidgetAction",format:""}],t}(le.Event);t.WidgetEvent=u})),Ce=I((function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.WidgetEventAllOf=void 0;var r=function(){function n(){}return n.getAttributeTypeMap=function(){return n.attributeTypeMap},n.discriminator=void 0,n.attributeTypeMap=[{name:"widget",baseName:"widget",type:"Widget",format:""},{name:"action",baseName:"action",type:"WidgetAction",format:""}],n}();t.WidgetEventAllOf=r})),qe=I((function(n,t){var r=w&&w.__createBinding||(Object.create?function(n,t,r,e){void 0===e&&(e=r);var u=Object.getOwnPropertyDescriptor(t,r);u&&!("get"in u?!t.__esModule:u.writable||u.configurable)||(u={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(n,e,u)}:function(n,t,r,e){void 0===e&&(e=r),n[e]=t[r]}),e=w&&w.__exportStar||function(n,t){for(var e in n)"default"===e||Object.prototype.hasOwnProperty.call(t,e)||r(t,n,e)};Object.defineProperty(t,"__esModule",{value:!0}),e(ae,t),e(se,t),e(ve,t),e(de,t),e(le,t),e(pe,t),e(he,t),e(me,t),e(be,t),e(ye,t),e(we,t),e(Ie,t),e(ge,t),e(Re,t),e(Oe,t),e(je,t),e(_e,t),e(Ue,t),e(Me,t),e(xe,t),e(Ee,t),e(Ae,t),e(Ne,t),e(We,t),e(Te,t),e(Se,t),e(ke,t),e(Pe,t),e(Ce,t)})),De=I((function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.PromiseMiddlewareWrapper=void 0;var r=function(){function n(n){this.middleware=n}return n.prototype.pre=function(n){return(0,kr.from)(this.middleware.pre(n))},n.prototype.post=function(n){return(0,kr.from)(this.middleware.post(n))},n}();t.PromiseMiddlewareWrapper=r})),ze=I((function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.servers=t.server2=t.server1=t.ServerConfiguration=void 0;var r=function(){function n(n,t){this.url=n,this.variableConfiguration=t}return n.prototype.setVariables=function(n){Object.assign(this.variableConfiguration,n)},n.prototype.getConfiguration=function(){return this.variableConfiguration},n.prototype.getUrl=function(){var n=this.url;for(var t in this.variableConfiguration){var r=new RegExp("{"+t+"}","g");n=n.replace(r,this.variableConfiguration[t])}return n},n.prototype.makeRequestContext=function(n,t){return new ce.RequestContext(this.getUrl()+n,t)},n}();t.ServerConfiguration=r,t.server1=new r("https://tracking.vviinn.com",{}),t.server2=new r("https://tracking.stage.vviinn.com",{}),t.servers=[t.server1,t.server2]})),Le=I((function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.createConfiguration=void 0,t.createConfiguration=function(n){void 0===n&&(n={});var t={baseServer:void 0!==n.baseServer?n.baseServer:ze.server1,httpApi:n.httpApi||new oe.IsomorphicFetchHttpLibrary,middleware:n.middleware||[],authMethods:(0,fe.configureAuthMethods)(n.authMethods)};return n.promiseMiddleware&&n.promiseMiddleware.forEach((function(n){return t.middleware.push(new De.PromiseMiddlewareWrapper(n))})),t}})),Fe=I((function(n,t){var r,e=w&&w.__extends||(r=function(n,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])})(n,t)},function(n,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function e(){this.constructor=n}r(n,t),n.prototype=null===t?Object.create(t):(e.prototype=t.prototype,new e)});Object.defineProperty(t,"__esModule",{value:!0}),t.ApiException=void 0;var u=function(n){function t(t,r,e,u){var i=n.call(this,"HTTP-Code: "+t+"\nMessage: "+r+"\nBody: "+JSON.stringify(e)+"\nHeaders: "+JSON.stringify(u))||this;return i.code=t,i.body=e,i.headers=u,i}return e(t,n),t}(Error);t.ApiException=u})),He=I((function(n,t){var r,e=w&&w.__extends||(r=function(n,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])})(n,t)},function(n,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function e(){this.constructor=n}r(n,t),n.prototype=null===t?Object.create(t):(e.prototype=t.prototype,new e)});Object.defineProperty(t,"__esModule",{value:!0}),t.RequiredError=t.BaseAPIRequestFactory=t.COLLECTION_FORMATS=void 0,t.COLLECTION_FORMATS={csv:",",ssv:" ",tsv:"\t",pipes:"|"},t.BaseAPIRequestFactory=function(n){this.configuration=n};var u=function(n){function t(t,r,e){var u=n.call(this,"Required parameter "+e+" was null or undefined when calling "+t+"."+r+".")||this;return u.api=t,u.method=r,u.field=e,u.name="RequiredError",u}return e(t,n),t}(Error);t.RequiredError=u})),Be=I((function(n,t){var r=w&&w.__createBinding||(Object.create?function(n,t,r,e){void 0===e&&(e=r);var u=Object.getOwnPropertyDescriptor(t,r);u&&!("get"in u?!t.__esModule:u.writable||u.configurable)||(u={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(n,e,u)}:function(n,t,r,e){void 0===e&&(e=r),n[e]=t[r]}),e=w&&w.__exportStar||function(n,t){for(var e in n)"default"===e||Object.prototype.hasOwnProperty.call(t,e)||r(t,n,e)};Object.defineProperty(t,"__esModule",{value:!0}),t.ObjectSerializer=void 0,e(ae,t),e(se,t),e(ve,t),e(de,t),e(le,t),e(pe,t),e(he,t),e(me,t),e(be,t),e(ye,t),e(we,t),e(Ie,t),e(ge,t),e(Re,t),e(Oe,t),e(je,t),e(_e,t),e(Ue,t),e(Me,t),e(xe,t),e(Ee,t),e(Ae,t),e(Ne,t),e(We,t),e(Te,t),e(Se,t),e(ke,t),e(Pe,t),e(Ce,t);var u=ae,i=se,o=ve,c=de,f=le,a=pe,s=me,v=be,d=we,l=Ie,p=ge,h=Re,m=Oe,b=je,y=_e,I=Ue,g=Me,R=xe,O=Ee,j=Ne,_=We,U=Pe,M=Ce,x=["string","boolean","double","integer","long","float","number","any"],E={"application/json":1/0,"application/octet-stream":0,"application/x-www-form-urlencoded":0},A=new Set(["EventConfirmationStatusEnum","FilterAction","FilterKind","SearchArea","SearchImageSource","Widget","WidgetAction"]),N={Acknowledgement:u.Acknowledgement,Config:i.Config,ErrorObject:o.ErrorObject,ErrorResponse:c.ErrorResponse,Event:f.Event,EventConfirmation:a.EventConfirmation,FilterEvent:s.FilterEvent,FilterEventAllOf:v.FilterEventAllOf,Histogram:d.Histogram,HistogramItem:l.HistogramItem,HistogramSummary:p.HistogramSummary,InteractionReport:h.InteractionReport,Interval:m.Interval,ProductClickEvent:b.ProductClickEvent,ProductViewEvent:y.ProductViewEvent,ProductViewEventAllOf:I.ProductViewEventAllOf,Rate:g.Rate,RateItem:R.RateItem,RateSummary:O.RateSummary,SearchEvent:j.SearchEvent,SearchEventAllOf:_.SearchEventAllOf,WidgetEvent:U.WidgetEvent,WidgetEventAllOf:M.WidgetEventAllOf},W=function(){function n(){}return n.findCorrectType=function(n,t){if(null==n)return t;if(-1!==x.indexOf(t.toLowerCase()))return t;if("Date"===t)return t;if(A.has(t))return t;if(!N[t])return t;var r=N[t].discriminator;if(null==r)return t;if(n[r]){var e=n[r];return N[e]?e:t}return t},n.serialize=function(t,r,e){if(null==t)return t;if(-1!==x.indexOf(r.toLowerCase()))return t;if(0===r.lastIndexOf("Array<",0)){var u=r.replace("Array<","");u=u.substring(0,u.length-1);var i=[];for(var o in t)i.push(n.serialize(t[o],u,e));return i}if("Date"===r){if("date"==e){var c=t.getMonth()+1;c=c<10?"0"+c.toString():c.toString();var f=t.getDate();return f=f<10?"0"+f.toString():f.toString(),t.getFullYear()+"-"+c+"-"+f}return t.toISOString()}if(A.has(r))return t;if(!N[r])return t;r=this.findCorrectType(t,r);var a=N[r].getAttributeTypeMap(),s={};for(var o in a){var v=a[o];s[v.baseName]=n.serialize(t[v.name],v.type,v.format)}return s},n.deserialize=function(t,r,e){if(r=n.findCorrectType(t,r),null==t)return t;if(-1!==x.indexOf(r.toLowerCase()))return t;if(0===r.lastIndexOf("Array<",0)){var u=r.replace("Array<","");u=u.substring(0,u.length-1);var i=[];for(var o in t)i.push(n.deserialize(t[o],u,e));return i}if("Date"===r)return new Date(t);if(A.has(r))return t;if(!N[r])return t;var c=new N[r],f=N[r].getAttributeTypeMap();for(var o in f){var a=f[o];c[a.name]=n.deserialize(t[a.baseName],a.type,a.format)}return c},n.normalizeMediaType=function(n){if(void 0!==n)return n.split(";")[0].trim().toLowerCase()},n.getPreferredMediaType=function(n){if(!n)return"application/json";for(var t=void 0,r=-1/0,e=0,u=n.map(this.normalizeMediaType);e<u.length;e++){var i=u[e];E[i]>r&&(t=i,r=E[i])}if(void 0===t)throw new Error("None of the given media types are supported: "+n.join(", "));return t},n.stringify=function(n,t){if("application/json"===t)return JSON.stringify(n);throw new Error("The mediaType "+t+" is not supported by ObjectSerializer.stringify.")},n.parse=function(n,t){if(void 0===t)throw new Error("Cannot parse content. No Content-Type defined.");if("application/json"===t)return JSON.parse(n);throw new Error("The mediaType "+t+" is not supported by ObjectSerializer.parse.")},n}();t.ObjectSerializer=W})),Ge=I((function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.canConsumeForm=t.isCodeInRange=void 0,t.isCodeInRange=function(n,t){if("0"===n)return!0;if(n==t.toString())return!0;var r=t.toString();if(r.length!=n.length)return!1;for(var e=0;e<r.length;e++)if("X"!=n.charAt(e)&&n.charAt(e)!=r.charAt(e))return!1;return!0},t.canConsumeForm=function(n){return-1!==n.indexOf("multipart/form-data")}})),Ve=I((function(n,t){var r,e=w&&w.__extends||(r=function(n,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])})(n,t)},function(n,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function e(){this.constructor=n}r(n,t),n.prototype=null===t?Object.create(t):(e.prototype=t.prototype,new e)}),u=w&&w.__awaiter||function(n,t,r,e){return new(r||(r=Promise))((function(u,i){function o(n){try{f(e.next(n))}catch(n){i(n)}}function c(n){try{f(e.throw(n))}catch(n){i(n)}}function f(n){var t;n.done?u(n.value):(t=n.value,t instanceof r?t:new r((function(n){n(t)}))).then(o,c)}f((e=e.apply(n,t||[])).next())}))},i=w&&w.__generator||function(n,t){var r,e,u,i,o={label:0,sent:function(){if(1&u[0])throw u[1];return u[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(i){return function(c){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;o;)try{if(r=1,e&&(u=2&i[0]?e.return:i[0]?e.throw||((u=e.return)&&u.call(e),0):e.next)&&!(u=u.call(e,i[1])).done)return u;switch(e=0,u&&(i=[2&i[0],u.value]),i[0]){case 0:case 1:u=i;break;case 4:return o.label++,{value:i[1],done:!1};case 5:o.label++,e=i[1],i=[0];continue;case 7:i=o.ops.pop(),o.trys.pop();continue;default:if(!((u=(u=o.trys).length>0&&u[u.length-1])||6!==i[0]&&2!==i[0])){o=0;continue}if(3===i[0]&&(!u||i[1]>u[0]&&i[1]<u[3])){o.label=i[1];break}if(6===i[0]&&o.label<u[1]){o.label=u[1],u=i;break}if(u&&o.label<u[2]){o.label=u[2],o.ops.push(i);break}u[2]&&o.ops.pop(),o.trys.pop();continue}i=t.call(n,o)}catch(n){i=[6,n],e=0}finally{r=u=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,c])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.DefaultApiResponseProcessor=t.DefaultApiRequestFactory=void 0;var o=function(n){function t(){return null!==n&&n.apply(this,arguments)||this}return e(t,n),t.prototype.applyConfiguration=function(n,t,r){var e,o,c;return u(this,void 0,void 0,(function(){var u,f,a,s,v,d,l;return i(this,(function(i){switch(i.label){case 0:if(u=r||this.configuration,null==n)throw new He.RequiredError("DefaultApi","applyConfiguration","site_id");return f="/site/{site_id}/configuration".replace("{site_id}",encodeURIComponent(String(n))),(a=u.baseServer.makeRequestContext(f,ce.HttpMethod.PUT)).setHeaderParam("Accept","application/json, */*;q=0.8"),s=Be.ObjectSerializer.getPreferredMediaType(["application/json"]),a.setHeaderParam("Content-Type",s),v=Be.ObjectSerializer.stringify(Be.ObjectSerializer.serialize(t,"Config",""),s),a.setBody(v),(null==(d=u.authMethods.bearerAuth)?void 0:d.applySecurityAuthentication)?[4,null==d?void 0:d.applySecurityAuthentication(a)]:[3,2];case 1:i.sent(),i.label=2;case 2:return(null==(l=(null===(e=null==r?void 0:r.authMethods)||void 0===e?void 0:e.default)||(null===(c=null===(o=this.configuration)||void 0===o?void 0:o.authMethods)||void 0===c?void 0:c.default))?void 0:l.applySecurityAuthentication)?[4,null==l?void 0:l.applySecurityAuthentication(a)]:[3,4];case 3:i.sent(),i.label=4;case 4:return[2,a]}}))}))},t.prototype.getConfiguration=function(n,t){var r,e,o;return u(this,void 0,void 0,(function(){var u,c,f,a,s;return i(this,(function(i){switch(i.label){case 0:if(u=t||this.configuration,null==n)throw new He.RequiredError("DefaultApi","getConfiguration","site_id");return c="/site/{site_id}/configuration".replace("{site_id}",encodeURIComponent(String(n))),(f=u.baseServer.makeRequestContext(c,ce.HttpMethod.GET)).setHeaderParam("Accept","application/json, */*;q=0.8"),(null==(a=u.authMethods.bearerAuth)?void 0:a.applySecurityAuthentication)?[4,null==a?void 0:a.applySecurityAuthentication(f)]:[3,2];case 1:i.sent(),i.label=2;case 2:return(null==(s=(null===(r=null==t?void 0:t.authMethods)||void 0===r?void 0:r.default)||(null===(o=null===(e=this.configuration)||void 0===e?void 0:e.authMethods)||void 0===o?void 0:o.default))?void 0:s.applySecurityAuthentication)?[4,null==s?void 0:s.applySecurityAuthentication(f)]:[3,4];case 3:i.sent(),i.label=4;case 4:return[2,f]}}))}))},t.prototype.getInteractions=function(n,t,r,e,o){var c,f,a;return u(this,void 0,void 0,(function(){var u,s,v,d,l;return i(this,(function(i){switch(i.label){case 0:if(u=o||this.configuration,null==n)throw new He.RequiredError("DefaultApi","getInteractions","site_id");if(null==t)throw new He.RequiredError("DefaultApi","getInteractions","start_datetime");if(null==r)throw new He.RequiredError("DefaultApi","getInteractions","end_datetime");return s="/site/{site_id}/interactions".replace("{site_id}",encodeURIComponent(String(n))),(v=u.baseServer.makeRequestContext(s,ce.HttpMethod.GET)).setHeaderParam("Accept","application/json, */*;q=0.8"),void 0!==t&&v.setQueryParam("start_datetime",Be.ObjectSerializer.serialize(t,"Date","date-time")),void 0!==r&&v.setQueryParam("end_datetime",Be.ObjectSerializer.serialize(r,"Date","date-time")),void 0!==e&&v.setQueryParam("widget",Be.ObjectSerializer.serialize(e,"Widget","")),(null==(d=u.authMethods.bearerAuth)?void 0:d.applySecurityAuthentication)?[4,null==d?void 0:d.applySecurityAuthentication(v)]:[3,2];case 1:i.sent(),i.label=2;case 2:return(null==(l=(null===(c=null==o?void 0:o.authMethods)||void 0===c?void 0:c.default)||(null===(a=null===(f=this.configuration)||void 0===f?void 0:f.authMethods)||void 0===a?void 0:a.default))?void 0:l.applySecurityAuthentication)?[4,null==l?void 0:l.applySecurityAuthentication(v)]:[3,4];case 3:i.sent(),i.label=4;case 4:return[2,v]}}))}))},t.prototype.openapi=function(n){var t,r,e;return u(this,void 0,void 0,(function(){var u,o,c,f;return i(this,(function(i){switch(i.label){case 0:return(o=(u=n||this.configuration).baseServer.makeRequestContext("/openapi.yaml",ce.HttpMethod.GET)).setHeaderParam("Accept","application/json, */*;q=0.8"),(null==(c=u.authMethods.bearerAuth)?void 0:c.applySecurityAuthentication)?[4,null==c?void 0:c.applySecurityAuthentication(o)]:[3,2];case 1:i.sent(),i.label=2;case 2:return(null==(f=(null===(t=null==n?void 0:n.authMethods)||void 0===t?void 0:t.default)||(null===(e=null===(r=this.configuration)||void 0===r?void 0:r.authMethods)||void 0===e?void 0:e.default))?void 0:f.applySecurityAuthentication)?[4,null==f?void 0:f.applySecurityAuthentication(o)]:[3,4];case 3:i.sent(),i.label=4;case 4:return[2,o]}}))}))},t.prototype.trackEvent=function(n,t){var r,e,o;return u(this,void 0,void 0,(function(){var u,c,f,a,s,v;return i(this,(function(i){switch(i.label){case 0:return(c=(u=t||this.configuration).baseServer.makeRequestContext("/event",ce.HttpMethod.POST)).setHeaderParam("Accept","application/json, */*;q=0.8"),f=Be.ObjectSerializer.getPreferredMediaType(["application/json"]),c.setHeaderParam("Content-Type",f),a=Be.ObjectSerializer.stringify(Be.ObjectSerializer.serialize(n,"ProductViewEvent | ProductClickEvent | WidgetEvent | FilterEvent | SearchEvent",""),f),c.setBody(a),(null==(s=u.authMethods.bearerAuth)?void 0:s.applySecurityAuthentication)?[4,null==s?void 0:s.applySecurityAuthentication(c)]:[3,2];case 1:i.sent(),i.label=2;case 2:return(null==(v=(null===(r=null==t?void 0:t.authMethods)||void 0===r?void 0:r.default)||(null===(o=null===(e=this.configuration)||void 0===e?void 0:e.authMethods)||void 0===o?void 0:o.default))?void 0:v.applySecurityAuthentication)?[4,null==v?void 0:v.applySecurityAuthentication(c)]:[3,4];case 3:i.sent(),i.label=4;case 4:return[2,c]}}))}))},t}(He.BaseAPIRequestFactory);t.DefaultApiRequestFactory=o;var c=function(){function n(){}return n.prototype.applyConfiguration=function(n){return u(this,void 0,void 0,(function(){var t,r,e,u,o,c,f;return i(this,(function(i){switch(i.label){case 0:return t=Be.ObjectSerializer.normalizeMediaType(n.headers["content-type"]),(0,Ge.isCodeInRange)("200",n.httpStatusCode)?[2]:n.httpStatusCode>=200&&n.httpStatusCode<=299?(e=(r=Be.ObjectSerializer).deserialize,o=(u=Be.ObjectSerializer).parse,[4,n.body.text()]):[3,2];case 1:return[2,e.apply(r,[o.apply(u,[i.sent(),t]),"void",""])];case 2:return c=Fe.ApiException.bind,f=[void 0,n.httpStatusCode,"Unknown API Status Code!"],[4,n.getBodyAsAny()];case 3:throw new(c.apply(Fe.ApiException,f.concat([i.sent(),n.headers])))}}))}))},n.prototype.getConfiguration=function(n){return u(this,void 0,void 0,(function(){var t,r,e,u,o,c,f;return i(this,(function(i){switch(i.label){case 0:return t=Be.ObjectSerializer.normalizeMediaType(n.headers["content-type"]),(0,Ge.isCodeInRange)("200",n.httpStatusCode)?[2]:n.httpStatusCode>=200&&n.httpStatusCode<=299?(e=(r=Be.ObjectSerializer).deserialize,o=(u=Be.ObjectSerializer).parse,[4,n.body.text()]):[3,2];case 1:return[2,e.apply(r,[o.apply(u,[i.sent(),t]),"void",""])];case 2:return c=Fe.ApiException.bind,f=[void 0,n.httpStatusCode,"Unknown API Status Code!"],[4,n.getBodyAsAny()];case 3:throw new(c.apply(Fe.ApiException,f.concat([i.sent(),n.headers])))}}))}))},n.prototype.getInteractions=function(n){return u(this,void 0,void 0,(function(){var t,r,e,u,o,c,f,a,s,v,d;return i(this,(function(i){switch(i.label){case 0:return t=Be.ObjectSerializer.normalizeMediaType(n.headers["content-type"]),(0,Ge.isCodeInRange)("200",n.httpStatusCode)?(e=(r=Be.ObjectSerializer).deserialize,o=(u=Be.ObjectSerializer).parse,[4,n.body.text()]):[3,2];case 1:return[2,e.apply(r,[o.apply(u,[i.sent(),t]),"InteractionReport",""])];case 2:return n.httpStatusCode>=200&&n.httpStatusCode<=299?(f=(c=Be.ObjectSerializer).deserialize,s=(a=Be.ObjectSerializer).parse,[4,n.body.text()]):[3,4];case 3:return[2,f.apply(c,[s.apply(a,[i.sent(),t]),"InteractionReport",""])];case 4:return v=Fe.ApiException.bind,d=[void 0,n.httpStatusCode,"Unknown API Status Code!"],[4,n.getBodyAsAny()];case 5:throw new(v.apply(Fe.ApiException,d.concat([i.sent(),n.headers])))}}))}))},n.prototype.openapi=function(n){return u(this,void 0,void 0,(function(){var t,r,e,u,o,c,f,a,s,v,d;return i(this,(function(i){switch(i.label){case 0:return t=Be.ObjectSerializer.normalizeMediaType(n.headers["content-type"]),(0,Ge.isCodeInRange)("200",n.httpStatusCode)?(e=(r=Be.ObjectSerializer).deserialize,o=(u=Be.ObjectSerializer).parse,[4,n.body.text()]):[3,2];case 1:return[2,e.apply(r,[o.apply(u,[i.sent(),t]),"string",""])];case 2:return n.httpStatusCode>=200&&n.httpStatusCode<=299?(f=(c=Be.ObjectSerializer).deserialize,s=(a=Be.ObjectSerializer).parse,[4,n.body.text()]):[3,4];case 3:return[2,f.apply(c,[s.apply(a,[i.sent(),t]),"string",""])];case 4:return v=Fe.ApiException.bind,d=[void 0,n.httpStatusCode,"Unknown API Status Code!"],[4,n.getBodyAsAny()];case 5:throw new(v.apply(Fe.ApiException,d.concat([i.sent(),n.headers])))}}))}))},n.prototype.trackEvent=function(n){return u(this,void 0,void 0,(function(){var t,r,e,u,o,c,f,a,s,v,d,l,p,h,m,b;return i(this,(function(i){switch(i.label){case 0:return t=Be.ObjectSerializer.normalizeMediaType(n.headers["content-type"]),(0,Ge.isCodeInRange)("200",n.httpStatusCode)?(e=(r=Be.ObjectSerializer).deserialize,o=(u=Be.ObjectSerializer).parse,[4,n.body.text()]):[3,2];case 1:return[2,v=e.apply(r,[o.apply(u,[i.sent(),t]),"EventConfirmation",""])];case 2:return(0,Ge.isCodeInRange)("502",n.httpStatusCode)?(f=(c=Be.ObjectSerializer).deserialize,s=(a=Be.ObjectSerializer).parse,[4,n.body.text()]):[3,4];case 3:throw v=f.apply(c,[s.apply(a,[i.sent(),t]),"ErrorResponse",""]),new Fe.ApiException(502,"an error occurred",v,n.headers);case 4:return n.httpStatusCode>=200&&n.httpStatusCode<=299?(l=(d=Be.ObjectSerializer).deserialize,h=(p=Be.ObjectSerializer).parse,[4,n.body.text()]):[3,6];case 5:return[2,v=l.apply(d,[h.apply(p,[i.sent(),t]),"EventConfirmation",""])];case 6:return m=Fe.ApiException.bind,b=[void 0,n.httpStatusCode,"Unknown API Status Code!"],[4,n.getBodyAsAny()];case 7:throw new(m.apply(Fe.ApiException,b.concat([i.sent(),n.headers])))}}))}))},n}();t.DefaultApiResponseProcessor=c})),Je=I((function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.ObservableDefaultApi=void 0;var r=kr,e=function(){function n(n,t,r){this.configuration=n,this.requestFactory=t||new Ve.DefaultApiRequestFactory(n),this.responseProcessor=r||new Ve.DefaultApiResponseProcessor}return n.prototype.applyConfiguration=function(n,t,e){for(var u=this,i=this.requestFactory.applyConfiguration(n,t,e),o=(0,kr.from)(i),c=function(n){o=o.pipe((0,r.mergeMap)((function(t){return n.pre(t)})))},f=0,a=this.configuration.middleware;f<a.length;f++)c(a[f]);return o.pipe((0,r.mergeMap)((function(n){return u.configuration.httpApi.send(n)}))).pipe((0,r.mergeMap)((function(n){for(var t=(0,kr.of)(n),e=function(n){t=t.pipe((0,r.mergeMap)((function(t){return n.post(t)})))},i=0,o=u.configuration.middleware;i<o.length;i++)e(o[i]);return t.pipe((0,r.map)((function(n){return u.responseProcessor.applyConfiguration(n)})))})))},n.prototype.getConfiguration=function(n,t){for(var e=this,u=this.requestFactory.getConfiguration(n,t),i=(0,kr.from)(u),o=function(n){i=i.pipe((0,r.mergeMap)((function(t){return n.pre(t)})))},c=0,f=this.configuration.middleware;c<f.length;c++)o(f[c]);return i.pipe((0,r.mergeMap)((function(n){return e.configuration.httpApi.send(n)}))).pipe((0,r.mergeMap)((function(n){for(var t=(0,kr.of)(n),u=function(n){t=t.pipe((0,r.mergeMap)((function(t){return n.post(t)})))},i=0,o=e.configuration.middleware;i<o.length;i++)u(o[i]);return t.pipe((0,r.map)((function(n){return e.responseProcessor.getConfiguration(n)})))})))},n.prototype.getInteractions=function(n,t,e,u,i){for(var o=this,c=this.requestFactory.getInteractions(n,t,e,u,i),f=(0,kr.from)(c),a=function(n){f=f.pipe((0,r.mergeMap)((function(t){return n.pre(t)})))},s=0,v=this.configuration.middleware;s<v.length;s++)a(v[s]);return f.pipe((0,r.mergeMap)((function(n){return o.configuration.httpApi.send(n)}))).pipe((0,r.mergeMap)((function(n){for(var t=(0,kr.of)(n),e=function(n){t=t.pipe((0,r.mergeMap)((function(t){return n.post(t)})))},u=0,i=o.configuration.middleware;u<i.length;u++)e(i[u]);return t.pipe((0,r.map)((function(n){return o.responseProcessor.getInteractions(n)})))})))},n.prototype.openapi=function(n){for(var t=this,e=this.requestFactory.openapi(n),u=(0,kr.from)(e),i=function(n){u=u.pipe((0,r.mergeMap)((function(t){return n.pre(t)})))},o=0,c=this.configuration.middleware;o<c.length;o++)i(c[o]);return u.pipe((0,r.mergeMap)((function(n){return t.configuration.httpApi.send(n)}))).pipe((0,r.mergeMap)((function(n){for(var e=(0,kr.of)(n),u=function(n){e=e.pipe((0,r.mergeMap)((function(t){return n.post(t)})))},i=0,o=t.configuration.middleware;i<o.length;i++)u(o[i]);return e.pipe((0,r.map)((function(n){return t.responseProcessor.openapi(n)})))})))},n.prototype.trackEvent=function(n,t){for(var e=this,u=this.requestFactory.trackEvent(n,t),i=(0,kr.from)(u),o=function(n){i=i.pipe((0,r.mergeMap)((function(t){return n.pre(t)})))},c=0,f=this.configuration.middleware;c<f.length;c++)o(f[c]);return i.pipe((0,r.mergeMap)((function(n){return e.configuration.httpApi.send(n)}))).pipe((0,r.mergeMap)((function(n){for(var t=(0,kr.of)(n),u=function(n){t=t.pipe((0,r.mergeMap)((function(t){return n.post(t)})))},i=0,o=e.configuration.middleware;i<o.length;i++)u(o[i]);return t.pipe((0,r.map)((function(n){return e.responseProcessor.trackEvent(n)})))})))},n}();t.ObservableDefaultApi=e})),$e=I((function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.PromiseDefaultApi=void 0;var r=function(){function n(n,t,r){this.api=new Je.ObservableDefaultApi(n,t,r)}return n.prototype.applyConfiguration=function(n,t,r){return this.api.applyConfiguration(n,t,r).toPromise()},n.prototype.getConfiguration=function(n,t){return this.api.getConfiguration(n,t).toPromise()},n.prototype.getInteractions=function(n,t,r,e,u){return this.api.getInteractions(n,t,r,e,u).toPromise()},n.prototype.openapi=function(n){return this.api.openapi(n).toPromise()},n.prototype.trackEvent=function(n,t){return this.api.trackEvent(n,t).toPromise()},n}();t.PromiseDefaultApi=r})),Ke=I((function(n,t){var r=w&&w.__createBinding||(Object.create?function(n,t,r,e){void 0===e&&(e=r);var u=Object.getOwnPropertyDescriptor(t,r);u&&!("get"in u?!t.__esModule:u.writable||u.configurable)||(u={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(n,e,u)}:function(n,t,r,e){void 0===e&&(e=r),n[e]=t[r]}),e=w&&w.__exportStar||function(n,t){for(var e in n)"default"===e||Object.prototype.hasOwnProperty.call(t,e)||r(t,n,e)};Object.defineProperty(t,"__esModule",{value:!0}),t.DefaultApi=t.createConfiguration=void 0,e(ce,t),e(fe,t),e(qe,t),Object.defineProperty(t,"createConfiguration",{enumerable:!0,get:function(){return Le.createConfiguration}}),e(Fe,t),e(ze,t),Object.defineProperty(t,"DefaultApi",{enumerable:!0,get:function(){return $e.PromiseDefaultApi}})}));const Xe=(n,t)=>{const r=(n=>(n=>!n.includes("stage"))(n)?Ke.servers[0]:Ke.servers[1])(n),e=(n=>({bearerAuth:{tokenProvider:{getToken:()=>new Promise((t=>t(n)))}}}))(t);return new Ke.DefaultApi(Ke.createConfiguration({baseServer:r,authMethods:e}))},Ze=n=>t=>Object.assign(Object.assign({},t),n),Ye=Ze({widget:"VPR",typ:"product_view_event"}),Qe=Ze({widget:"VPS",typ:"product_view_event"}),nu=Ze({widget:"VPR",typ:"widget_event"}),tu=Ze({widget:"VPS",typ:"widget_event"}),ru=Ze({widget:"VPS",typ:"search_event"}),eu=Ze({widget:"VPS",typ:"filter_event"});export{tu as A,Lt as B,An as C,et as D,Cn as E,_n as F,Xn as G,Qn as H,H as I,X as J,Ye as K,nu as L,Dt as N,P as O,W as S,Hn as T,g as _,h as a,er as b,yt as c,lt as d,wt as e,p as f,y as g,It as h,ir as i,st as j,Kt as k,cr as l,ht as m,nn as n,bt as o,i as p,Jt as q,Vt as r,Ut as s,mt as t,Bn as u,Qe as v,ru as w,eu as x,hr as y,Xe as z}