vviinn-widgets 2.5.2 → 2.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{app-globals-d15b4c2c.js → app-globals-047a582c.js} +1 -1
- package/dist/cjs/{highlight-box_22.cjs.entry.js → cropper-handler_27.cjs.entry.js} +473 -85
- package/dist/cjs/{customized-slots-0c0d0665.js → customized-slots-cb722e68.js} +1 -1
- package/dist/cjs/{index-0f5516a6.js → index-bd771524.js} +1 -1
- package/dist/cjs/{imageSearch.store-865c23f4.js → index-d07466b9.js} +14707 -11093
- package/dist/cjs/{index-31b9cb7a.js → index-fcafbfe5.js} +1 -1
- package/dist/cjs/loader.cjs.js +3 -3
- package/dist/cjs/{vviinn-carousel_3.cjs.entry.js → vviinn-carousel_2.cjs.entry.js} +35 -208
- package/dist/cjs/vviinn-recommendations-sidebar.cjs.entry.js +5 -3
- package/dist/cjs/vviinn-vpr-button.cjs.entry.js +7 -2
- package/dist/cjs/vviinn-vps-button.cjs.entry.js +4 -4
- package/dist/cjs/vviinn-widgets.cjs.js +3 -3
- package/dist/collection/campaign/VCSCampaignService.js +4 -2
- package/dist/collection/campaign/VPRCampaignService.js +4 -2
- package/dist/collection/components/vviinn-vpr-button/recommendations-sidebar/recommendations-sidebar.js +21 -1
- package/dist/collection/components/vviinn-vpr-button/stories/args.js +6 -0
- package/dist/collection/components/vviinn-vpr-button/stories/vviinn-vpr-button.stories.js +2 -0
- package/dist/collection/components/vviinn-vpr-button/vviinn-vpr-button.js +23 -0
- package/dist/collection/components/vviinn-vpr-widget/stories/args.js +7 -0
- package/dist/collection/components/vviinn-vpr-widget/stories/vviinn-vpr-widget.stories.js +12 -13
- package/dist/collection/components/vviinn-vpr-widget/vviinn-vpr-vidget.js +28 -1
- package/dist/collection/components/vviinn-vps-button/stories/vviinn-vps-button.stories.js +9 -5
- package/dist/collection/components/vviinn-vps-button/vviinn-vps-button.js +18 -1
- package/dist/collection/components/vviinn-vps-widget/stories/vviinn-vps-widget.stories.js +11 -7
- package/dist/collection/components/vviinn-vps-widget/vviinn-vps-widget.js +23 -0
- package/dist/collection/searchSession/searchSession.js +6 -1
- package/dist/collection/store/imageSearch.store.js +2 -7
- package/dist/esm/{app-globals-6f6aa89e.js → app-globals-68b1d848.js} +1 -1
- package/dist/esm/{highlight-box_22.entry.js → cropper-handler_27.entry.js} +404 -21
- package/dist/esm/{customized-slots-6b427dda.js → customized-slots-95a05ceb.js} +1 -1
- package/dist/esm/{imageSearch.store-0ae87235.js → index-33fe5a25.js} +14832 -11234
- package/dist/esm/{index-59f44eaa.js → index-75a1f589.js} +1 -1
- package/dist/esm/{index-ac05c460.js → index-f9df412f.js} +2 -2
- package/dist/esm/loader.js +3 -3
- package/dist/esm/{vviinn-carousel_3.entry.js → vviinn-carousel_2.entry.js} +15 -187
- package/dist/esm/vviinn-recommendations-sidebar.entry.js +5 -3
- package/dist/esm/vviinn-vpr-button.entry.js +7 -2
- package/dist/esm/vviinn-vps-button.entry.js +4 -4
- package/dist/esm/vviinn-widgets.js +3 -3
- package/dist/types/campaign/CampaignService.d.ts +1 -1
- package/dist/types/campaign/VCSCampaignService.d.ts +2 -1
- package/dist/types/campaign/VPRCampaignService.d.ts +2 -1
- package/dist/types/components/vviinn-vpr-button/recommendations-sidebar/recommendations-sidebar.d.ts +2 -0
- package/dist/types/components/vviinn-vpr-button/stories/args.d.ts +6 -0
- package/dist/types/components/vviinn-vpr-button/stories/vviinn-vpr-button.stories.d.ts +6 -0
- package/dist/types/components/vviinn-vpr-button/vviinn-vpr-button.d.ts +2 -0
- package/dist/types/components/vviinn-vpr-widget/stories/args.d.ts +6 -0
- package/dist/types/components/vviinn-vpr-widget/stories/vviinn-vpr-widget.stories.d.ts +6 -0
- package/dist/types/components/vviinn-vpr-widget/vviinn-vpr-vidget.d.ts +3 -0
- package/dist/types/components/vviinn-vps-button/vviinn-vps-button.d.ts +2 -0
- package/dist/types/components/vviinn-vps-widget/vviinn-vps-widget.d.ts +2 -0
- package/dist/types/components.d.ts +40 -0
- package/dist/types/searchSession/searchSession.d.ts +2 -1
- package/dist/types/store/imageSearch.store.d.ts +7 -6
- package/dist/vviinn-widgets/{p-bad1809f.js → p-4e55513e.js} +1 -1
- package/dist/vviinn-widgets/p-5358970c.entry.js +1 -0
- package/{www/build/p-c36546fa.js → dist/vviinn-widgets/p-66015ad7.js} +1 -1
- package/dist/vviinn-widgets/p-669a156c.entry.js +1 -0
- package/dist/vviinn-widgets/p-8080679b.entry.js +1 -0
- package/dist/vviinn-widgets/p-9de1b0e7.js +1 -0
- package/dist/vviinn-widgets/{p-ee46fc83.js → p-b254eee7.js} +1 -1
- package/dist/vviinn-widgets/p-c1cd51ef.entry.js +1 -0
- package/dist/vviinn-widgets/p-e32c30d4.entry.js +1 -0
- package/dist/vviinn-widgets/{p-118ac907.js → p-f6e59cb2.js} +1 -1
- package/dist/vviinn-widgets/vviinn-widgets.esm.js +1 -1
- package/package.json +3 -3
- package/www/build/{p-bad1809f.js → p-4e55513e.js} +1 -1
- package/www/build/p-5358970c.entry.js +1 -0
- package/{dist/vviinn-widgets/p-c36546fa.js → www/build/p-66015ad7.js} +1 -1
- package/www/build/p-669a156c.entry.js +1 -0
- package/www/build/p-8080679b.entry.js +1 -0
- package/www/build/p-9de1b0e7.js +1 -0
- package/www/build/{p-ee46fc83.js → p-b254eee7.js} +1 -1
- package/www/build/p-c1cd51ef.entry.js +1 -0
- package/www/build/p-e32c30d4.entry.js +1 -0
- package/www/build/p-eb8f77e4.js +1 -0
- package/www/build/{p-118ac907.js → p-f6e59cb2.js} +1 -1
- package/www/build/vviinn-widgets.esm.js +1 -1
- package/www/index.html +1 -1
- package/dist/cjs/Handler-176539c8.js +0 -331
- package/dist/cjs/cropper-handler.cjs.entry.js +0 -27
- package/dist/cjs/index-0eb3036a.js +0 -3235
- package/dist/cjs/vviinn-error.cjs.entry.js +0 -19
- package/dist/cjs/vviinn-preloader.cjs.entry.js +0 -26
- package/dist/cjs/vviinn-vps-widget.cjs.entry.js +0 -167
- package/dist/esm/Handler-f9b8735c.js +0 -309
- package/dist/esm/cropper-handler.entry.js +0 -23
- package/dist/esm/index-2e296af4.js +0 -3224
- package/dist/esm/vviinn-error.entry.js +0 -15
- package/dist/esm/vviinn-preloader.entry.js +0 -22
- package/dist/esm/vviinn-vps-widget.entry.js +0 -163
- package/dist/vviinn-widgets/p-11f61564.js +0 -1
- package/dist/vviinn-widgets/p-39fdc5c9.entry.js +0 -1
- package/dist/vviinn-widgets/p-762dc067.entry.js +0 -1
- package/dist/vviinn-widgets/p-7e2f542c.js +0 -1
- package/dist/vviinn-widgets/p-8d56e795.entry.js +0 -1
- package/dist/vviinn-widgets/p-8f955b15.entry.js +0 -1
- package/dist/vviinn-widgets/p-9654fe35.entry.js +0 -1
- package/dist/vviinn-widgets/p-9e5adc42.js +0 -1
- package/dist/vviinn-widgets/p-b3731705.entry.js +0 -1
- package/dist/vviinn-widgets/p-d991330b.entry.js +0 -1
- package/dist/vviinn-widgets/p-da9c933b.entry.js +0 -1
- package/dist/vviinn-widgets/p-f41e25f0.entry.js +0 -1
- package/www/build/p-11f61564.js +0 -1
- package/www/build/p-39fdc5c9.entry.js +0 -1
- package/www/build/p-762dc067.entry.js +0 -1
- package/www/build/p-7e2f542c.js +0 -1
- package/www/build/p-8d56e795.entry.js +0 -1
- package/www/build/p-8f955b15.entry.js +0 -1
- package/www/build/p-9654fe35.entry.js +0 -1
- package/www/build/p-9e5adc42.js +0 -1
- package/www/build/p-b3731705.entry.js +0 -1
- package/www/build/p-cfd998c1.js +0 -1
- package/www/build/p-d991330b.entry.js +0 -1
- package/www/build/p-da9c933b.entry.js +0 -1
- package/www/build/p-f41e25f0.entry.js +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as n,f as r}from"./p-bad1809f.js";import{h as t,t as u,i as e,l as o,r as i,a as c,b as f,p as a,n as v,s as d,f as p,c as s,d as l,e as m,g as h,H as I,j as b,k as R,m as U}from"./p-11f61564.js";var O="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function j(n,r,t){return n(t={path:r,exports:{},require:function(){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}()}},t.exports),t.exports}var g=j((function(n,r){function t(n){return n}function u(n){return function(){return n}}function e(n,r,t,u,e,o,i,c,f){switch(arguments.length){case 1:return n;case 2:return function(){return r(n.apply(this,arguments))};case 3:return function(){return t(r(n.apply(this,arguments)))};case 4:return function(){return u(t(r(n.apply(this,arguments))))};case 5:return function(){return e(u(t(r(n.apply(this,arguments)))))};case 6:return function(){return o(e(u(t(r(n.apply(this,arguments))))))};case 7:return function(){return i(o(e(u(t(r(n.apply(this,arguments)))))))};case 8:return function(){return c(i(o(e(u(t(r(n.apply(this,arguments))))))))};case 9:return function(){return f(c(i(o(e(u(t(r(n.apply(this,arguments)))))))))}}}function o(){throw new Error("Called `absurd` function which should be uncallable")}Object.defineProperty(r,"__esModule",{value:!0}),r.getEndomorphismMonoid=r.not=r.SK=r.hole=r.pipe=r.untupled=r.tupled=r.absurd=r.decrement=r.increment=r.tuple=r.flow=r.flip=r.constVoid=r.constUndefined=r.constNull=r.constFalse=r.constTrue=r.constant=r.unsafeCoerce=r.identity=r.apply=r.getRing=r.getSemiring=r.getMonoid=r.getSemigroup=r.getBooleanAlgebra=void 0,r.getBooleanAlgebra=function(n){return function(){return{meet:function(r,t){return function(u){return n.meet(r(u),t(u))}},join:function(r,t){return function(u){return n.join(r(u),t(u))}},zero:function(){return n.zero},one:function(){return n.one},implies:function(r,t){return function(u){return n.implies(r(u),t(u))}},not:function(r){return function(t){return n.not(r(t))}}}}},r.getSemigroup=function(n){return function(){return{concat:function(r,t){return function(u){return n.concat(r(u),t(u))}}}}},r.getMonoid=function(n){var t=(0,r.getSemigroup)(n);return function(){return{concat:t().concat,empty:function(){return n.empty}}}},r.getSemiring=function(n){return{add:function(r,t){return function(u){return n.add(r(u),t(u))}},zero:function(){return n.zero},mul:function(r,t){return function(u){return n.mul(r(u),t(u))}},one:function(){return n.one}}},r.getRing=function(n){var t=(0,r.getSemiring)(n);return{add:t.add,mul:t.mul,one:t.one,zero:t.zero,sub:function(r,t){return function(u){return n.sub(r(u),t(u))}}}},r.apply=function(n){return function(r){return r(n)}},r.identity=t,r.unsafeCoerce=t,r.constant=u,r.constTrue=u(!0),r.constFalse=u(!1),r.constNull=u(null),r.constUndefined=u(void 0),r.constVoid=r.constUndefined,r.flip=function(n){return function(r,t){return n(t,r)}},r.flow=e,r.tuple=function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return n},r.increment=function(n){return n+1},r.decrement=function(n){return n-1},r.absurd=o,r.tupled=function(n){return function(r){return n.apply(void 0,r)}},r.untupled=function(n){return function(){for(var r=[],t=0;t<arguments.length;t++)r[t]=arguments[t];return n(r)}},r.pipe=function(n,r,t,u,e,o,i,c,f){switch(arguments.length){case 1:return n;case 2:return r(n);case 3:return t(r(n));case 4:return u(t(r(n)));case 5:return e(u(t(r(n))));case 6:return o(e(u(t(r(n)))));case 7:return i(o(e(u(t(r(n))))));case 8:return c(i(o(e(u(t(r(n)))))));case 9:return f(c(i(o(e(u(t(r(n))))))));default:for(var a=arguments[0],v=1;v<arguments.length;v++)a=arguments[v](a);return a}},r.hole=o,r.SK=function(n,r){return r},r.not=function(n){return function(r){return!n(r)}},r.getEndomorphismMonoid=function(){return{concat:function(n,r){return e(n,r)},empty:t}}})),M=j((function(n,r){var t=O&&O.__spreadArray||function(n,r,t){if(t||2===arguments.length)for(var u,e=0,o=r.length;e<o;e++)!u&&e in r||(u||(u=Array.prototype.slice.call(r,0,e)),u[e]=r[e]);return n.concat(u||Array.prototype.slice.call(r))};Object.defineProperty(r,"__esModule",{value:!0}),r.fromReadonlyNonEmptyArray=r.has=r.emptyRecord=r.emptyReadonlyArray=r.tail=r.head=r.isNonEmpty=r.singleton=r.right=r.left=r.isRight=r.isLeft=r.some=r.none=r.isSome=r.isNone=void 0,r.isNone=function(n){return"None"===n._tag},r.isSome=function(n){return"Some"===n._tag},r.none={_tag:"None"},r.some=function(n){return{_tag:"Some",value:n}},r.isLeft=function(n){return"Left"===n._tag},r.isRight=function(n){return"Right"===n._tag},r.left=function(n){return{_tag:"Left",left:n}},r.right=function(n){return{_tag:"Right",right:n}},r.singleton=function(n){return[n]},r.isNonEmpty=function(n){return n.length>0},r.head=function(n){return n[0]},r.tail=function(n){return n.slice(1)},r.emptyReadonlyArray=[],r.emptyRecord={},r.has=Object.prototype.hasOwnProperty,r.fromReadonlyNonEmptyArray=function(n){return t([n[0]],n.slice(1),!0)}})),w=j((function(n,r){var t=O&&O.__createBinding||(Object.create?function(n,r,t,u){void 0===u&&(u=t);var e=Object.getOwnPropertyDescriptor(r,t);e&&!("get"in e?!r.__esModule:e.writable||e.configurable)||(e={enumerable:!0,get:function(){return r[t]}}),Object.defineProperty(n,u,e)}:function(n,r,t,u){void 0===u&&(u=t),n[u]=r[t]}),u=O&&O.__setModuleDefault||(Object.create?function(n,r){Object.defineProperty(n,"default",{enumerable:!0,value:r})}:function(n,r){n.default=r}),e=O&&O.__importStar||function(n){if(n&&n.__esModule)return n;var r={};if(null!=n)for(var e in n)"default"!==e&&Object.prototype.hasOwnProperty.call(n,e)&&t(r,n,e);return u(r,n),r};Object.defineProperty(r,"__esModule",{value:!0}),r.sequenceS=r.sequenceT=r.getApplySemigroup=r.apS=r.apSecond=r.apFirst=r.ap=void 0;var o=e(M);function i(n,r,t){return function(u){for(var e=Array(t.length+1),o=0;o<t.length;o++)e[o]=t[o];return e[t.length]=u,0===r?n.apply(null,e):i(n,r-1,e)}}r.ap=function(n,r){return function(t){return function(u){return n.ap(n.map(u,(function(n){return function(t){return r.ap(n,t)}})),t)}}},r.apFirst=function(n){return function(r){return function(t){return n.ap(n.map(t,(function(n){return function(){return n}})),r)}}},r.apSecond=function(n){return function(r){return function(t){return n.ap(n.map(t,(function(){return function(n){return n}})),r)}}},r.apS=function(n){return function(r,t){return function(u){return n.ap(n.map(u,(function(n){return function(t){var u;return Object.assign({},n,((u={})[r]=t,u))}})),t)}}},r.getApplySemigroup=function(n){return function(r){return{concat:function(t,u){return n.ap(n.map(t,(function(n){return function(t){return r.concat(n,t)}})),u)}}}};var c={1:function(n){return[n]},2:function(n){return function(r){return[n,r]}},3:function(n){return function(r){return function(t){return[n,r,t]}}},4:function(n){return function(r){return function(t){return function(u){return[n,r,t,u]}}}},5:function(n){return function(r){return function(t){return function(u){return function(e){return[n,r,t,u,e]}}}}}};function f(n){return o.has.call(c,n)||(c[n]=i(g.tuple,n-1,[])),c[n]}r.sequenceT=function(n){return function(){for(var r=[],t=0;t<arguments.length;t++)r[t]=arguments[t];for(var u=r.length,e=f(u),o=n.map(r[0],e),i=1;i<u;i++)o=n.ap(o,r[i]);return o}},r.sequenceS=function(n){return function(r){for(var t=Object.keys(r),u=t.length,e=function(n){var r=n.length;switch(r){case 1:return function(r){var t;return(t={})[n[0]]=r,t};case 2:return function(r){return function(t){var u;return(u={})[n[0]]=r,u[n[1]]=t,u}};case 3:return function(r){return function(t){return function(u){var e;return(e={})[n[0]]=r,e[n[1]]=t,e[n[2]]=u,e}}};case 4:return function(r){return function(t){return function(u){return function(e){var o;return(o={})[n[0]]=r,o[n[1]]=t,o[n[2]]=u,o[n[3]]=e,o}}}};case 5:return function(r){return function(t){return function(u){return function(e){return function(o){var i;return(i={})[n[0]]=r,i[n[1]]=t,i[n[2]]=u,i[n[3]]=e,i[n[4]]=o,i}}}}};default:return i((function(){for(var t=[],u=0;u<arguments.length;u++)t[u]=arguments[u];for(var e={},o=0;o<r;o++)e[n[o]]=t[o];return e}),r-1,[])}}(t),o=n.map(r[t[0]],e),c=1;c<u;c++)o=n.ap(o,r[t[c]]);return o}}})),y=j((function(n,r){Object.defineProperty(r,"__esModule",{value:!0}),r.bind=r.chainFirst=void 0,r.chainFirst=function(n){return function(r){return function(t){return n.chain(t,(function(t){return n.map(r(t),(function(){return t}))}))}}},r.bind=function(n){return function(r,t){return function(u){return n.chain(u,(function(u){return n.map(t(u),(function(n){var t;return Object.assign({},u,((t={})[r]=n,t))}))}))}}}})),x=j((function(n,r){var t=O&&O.__createBinding||(Object.create?function(n,r,t,u){void 0===u&&(u=t);var e=Object.getOwnPropertyDescriptor(r,t);e&&!("get"in e?!r.__esModule:e.writable||e.configurable)||(e={enumerable:!0,get:function(){return r[t]}}),Object.defineProperty(n,u,e)}:function(n,r,t,u){void 0===u&&(u=t),n[u]=r[t]}),u=O&&O.__setModuleDefault||(Object.create?function(n,r){Object.defineProperty(n,"default",{enumerable:!0,value:r})}:function(n,r){n.default=r}),e=O&&O.__importStar||function(n){if(n&&n.__esModule)return n;var r={};if(null!=n)for(var e in n)"default"!==e&&Object.prototype.hasOwnProperty.call(n,e)&&t(r,n,e);return u(r,n),r};Object.defineProperty(r,"__esModule",{value:!0}),r.filterOrElse=r.chainFirstEitherK=r.chainEitherK=r.fromEitherK=r.chainOptionK=r.fromOptionK=r.fromPredicate=r.fromOption=void 0;var o=e(M);function i(n){return function(r){return function(t){return n.fromEither(o.isNone(t)?o.left(r()):o.right(t.value))}}}function c(n){var r=i(n);return function(n){var t=r(n);return function(n){return(0,g.flow)(n,t)}}}function f(n){return function(r){return(0,g.flow)(r,n.fromEither)}}r.fromOption=i,r.fromPredicate=function(n){return function(r,t){return function(u){return n.fromEither(r(u)?o.right(u):o.left(t(u)))}}},r.fromOptionK=c,r.chainOptionK=function(n,r){var t=c(n);return function(n){var u=t(n);return function(n){return function(t){return r.chain(t,u(n))}}}},r.fromEitherK=f,r.chainEitherK=function(n,r){var t=f(n);return function(n){return function(u){return r.chain(u,t(n))}}},r.chainFirstEitherK=function(n,r){return(0,g.flow)(f(n),(0,y.chainFirst)(r))},r.filterOrElse=function(n,r){return function(t,u){return function(e){return r.chain(e,(function(r){return n.fromEither(t(r)?o.right(r):o.left(u(r)))}))}}}})),_=j((function(n,r){function t(n,r){return function(t){return function(u){return n.map(u,(function(n){return r.map(n,t)}))}}}Object.defineProperty(r,"__esModule",{value:!0}),r.getFunctorComposition=r.bindTo=r.flap=r.map=void 0,r.map=t,r.flap=function(n){return function(r){return function(t){return n.map(t,(function(n){return n(r)}))}}},r.bindTo=function(n){return function(r){return function(t){return n.map(t,(function(n){var t;return(t={})[r]=n,t}))}}},r.getFunctorComposition=function(n,r){var u=t(n,r);return{map:function(n,r){return(0,g.pipe)(n,u(r))}}}})),W=j((function(n,r){Object.defineProperty(r,"__esModule",{value:!0}),r.eqDate=r.eqNumber=r.eqString=r.eqBoolean=r.eq=r.strictEqual=r.getStructEq=r.getTupleEq=r.Contravariant=r.getMonoid=r.getSemigroup=r.eqStrict=r.URI=r.contramap=r.tuple=r.struct=r.fromEquals=void 0,r.fromEquals=function(n){return{equals:function(r,t){return r===t||n(r,t)}}},r.struct=function(n){return(0,r.fromEquals)((function(r,t){for(var u in n)if(!n[u].equals(r[u],t[u]))return!1;return!0}))},r.tuple=function(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];return(0,r.fromEquals)((function(r,t){return n.every((function(n,u){return n.equals(r[u],t[u])}))}))},r.contramap=function(n){return function(t){return(0,r.fromEquals)((function(r,u){return t.equals(n(r),n(u))}))}},r.URI="Eq",r.eqStrict={equals:function(n,r){return n===r}};var t={equals:function(){return!0}};r.getSemigroup=function(){return{concat:function(n,t){return(0,r.fromEquals)((function(r,u){return n.equals(r,u)&&t.equals(r,u)}))}}},r.getMonoid=function(){return{concat:(0,r.getSemigroup)().concat,empty:t}},r.Contravariant={URI:r.URI,contramap:function(n,t){return(0,g.pipe)(n,(0,r.contramap)(t))}},r.getTupleEq=r.tuple,r.getStructEq=r.struct,r.strictEqual=r.eqStrict.equals,r.eq=r.Contravariant,r.eqBoolean=r.eqStrict,r.eqString=r.eqStrict,r.eqNumber=r.eqStrict,r.eqDate={equals:function(n,r){return n.valueOf()===r.valueOf()}}})),E=j((function(n,r){Object.defineProperty(r,"__esModule",{value:!0}),r.ordDate=r.ordNumber=r.ordString=r.ordBoolean=r.ord=r.getDualOrd=r.getTupleOrd=r.between=r.clamp=r.max=r.min=r.geq=r.leq=r.gt=r.lt=r.equals=r.trivial=r.Contravariant=r.getMonoid=r.getSemigroup=r.URI=r.contramap=r.reverse=r.tuple=r.fromCompare=r.equalsDefault=void 0,r.equalsDefault=function(n){return function(r,t){return r===t||0===n(r,t)}},r.fromCompare=function(n){return{equals:(0,r.equalsDefault)(n),compare:function(r,t){return r===t?0:n(r,t)}}},r.tuple=function(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];return(0,r.fromCompare)((function(r,t){for(var u=0;u<n.length-1;u++){var e=n[u].compare(r[u],t[u]);if(0!==e)return e}return n[u].compare(r[u],t[u])}))},r.reverse=function(n){return(0,r.fromCompare)((function(r,t){return n.compare(t,r)}))},r.contramap=function(n){return function(t){return(0,r.fromCompare)((function(r,u){return t.compare(n(r),n(u))}))}},r.URI="Ord",r.getSemigroup=function(){return{concat:function(n,t){return(0,r.fromCompare)((function(r,u){var e=n.compare(r,u);return 0!==e?e:t.compare(r,u)}))}}},r.getMonoid=function(){return{concat:(0,r.getSemigroup)().concat,empty:(0,r.fromCompare)((function(){return 0}))}},r.Contravariant={URI:r.URI,contramap:function(n,t){return(0,g.pipe)(n,(0,r.contramap)(t))}},r.trivial={equals:g.constTrue,compare:(0,g.constant)(0)},r.equals=function(n){return function(r){return function(t){return t===r||0===n.compare(t,r)}}},r.lt=function(n){return function(r,t){return-1===n.compare(r,t)}},r.gt=function(n){return function(r,t){return 1===n.compare(r,t)}},r.leq=function(n){return function(r,t){return 1!==n.compare(r,t)}},r.geq=function(n){return function(r,t){return-1!==n.compare(r,t)}},r.min=function(n){return function(r,t){return r===t||n.compare(r,t)<1?r:t}},r.max=function(n){return function(r,t){return r===t||n.compare(r,t)>-1?r:t}},r.clamp=function(n){var t=(0,r.min)(n),u=(0,r.max)(n);return function(n,r){return function(e){return u(t(e,r),n)}}},r.between=function(n){var t=(0,r.lt)(n),u=(0,r.gt)(n);return function(n,r){return function(e){return!t(e,n)&&!u(e,r)}}},r.getTupleOrd=r.tuple,r.getDualOrd=r.reverse,r.ord=r.Contravariant;var t={equals:W.eqStrict.equals,compare:function(n,r){return n<r?-1:n>r?1:0}};r.ordBoolean=t,r.ordString=t,r.ordNumber=t,r.ordDate=(0,g.pipe)(r.ordNumber,(0,r.contramap)((function(n){return n.valueOf()})))})),k=j((function(n,r){Object.defineProperty(r,"__esModule",{value:!0}),r.concatAll=r.endo=r.filterSecond=r.filterFirst=r.reverse=void 0,r.reverse=function(n){return{concat:function(r,t){return n.concat(t,r)}}},r.filterFirst=function(n){return function(r){return{concat:function(t,u){return n(t)?r.concat(t,u):u}}}},r.filterSecond=function(n){return function(r){return{concat:function(t,u){return n(u)?r.concat(t,u):t}}}},r.endo=function(n){return function(r){return{concat:function(t,u){return r.concat(n(t),n(u))}}}},r.concatAll=function(n){return function(r){return function(t){return t.reduce((function(r,t){return n.concat(r,t)}),r)}}}})),q=j((function(n,r){var t=O&&O.__createBinding||(Object.create?function(n,r,t,u){void 0===u&&(u=t);var e=Object.getOwnPropertyDescriptor(r,t);e&&!("get"in e?!r.__esModule:e.writable||e.configurable)||(e={enumerable:!0,get:function(){return r[t]}}),Object.defineProperty(n,u,e)}:function(n,r,t,u){void 0===u&&(u=t),n[u]=r[t]}),u=O&&O.__setModuleDefault||(Object.create?function(n,r){Object.defineProperty(n,"default",{enumerable:!0,value:r})}:function(n,r){n.default=r}),e=O&&O.__importStar||function(n){if(n&&n.__esModule)return n;var r={};if(null!=n)for(var e in n)"default"!==e&&Object.prototype.hasOwnProperty.call(n,e)&&t(r,n,e);return u(r,n),r};Object.defineProperty(r,"__esModule",{value:!0}),r.semigroupProduct=r.semigroupSum=r.semigroupString=r.getFunctionSemigroup=r.semigroupAny=r.semigroupAll=r.fold=r.getIntercalateSemigroup=r.getMeetSemigroup=r.getJoinSemigroup=r.getDualSemigroup=r.getStructSemigroup=r.getTupleSemigroup=r.getFirstSemigroup=r.getLastSemigroup=r.getObjectSemigroup=r.semigroupVoid=r.concatAll=r.last=r.first=r.intercalate=r.tuple=r.struct=r.reverse=r.constant=r.max=r.min=void 0;var o=e(M),i=e(k),c=e(E);r.min=function(n){return{concat:c.min(n)}},r.max=function(n){return{concat:c.max(n)}},r.constant=function(n){return{concat:function(){return n}}},r.reverse=i.reverse,r.struct=function(n){return{concat:function(r,t){var u={};for(var e in n)o.has.call(n,e)&&(u[e]=n[e].concat(r[e],t[e]));return u}}},r.tuple=function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return{concat:function(r,t){return n.map((function(n,u){return n.concat(r[u],t[u])}))}}},r.intercalate=function(n){return function(r){return{concat:function(t,u){return r.concat(t,r.concat(n,u))}}}},r.first=function(){return{concat:g.identity}},r.last=function(){return{concat:function(n,r){return r}}},r.concatAll=i.concatAll,r.semigroupVoid=(0,r.constant)(void 0),r.getObjectSemigroup=function(){return{concat:function(n,r){return Object.assign({},n,r)}}},r.getLastSemigroup=r.last,r.getFirstSemigroup=r.first,r.getTupleSemigroup=r.tuple,r.getStructSemigroup=r.struct,r.getDualSemigroup=r.reverse,r.getJoinSemigroup=r.max,r.getMeetSemigroup=r.min,r.getIntercalateSemigroup=r.intercalate,r.fold=function(n){var t=(0,r.concatAll)(n);return function(n,r){return void 0===r?t(n):t(n)(r)}},r.semigroupAll={concat:function(n,r){return n&&r}},r.semigroupAny={concat:function(n,r){return n||r}},r.getFunctionSemigroup=g.getSemigroup,r.semigroupString={concat:function(n,r){return n+r}},r.semigroupSum={concat:function(n,r){return n+r}},r.semigroupProduct={concat:function(n,r){return n*r}}})),P=j((function(n,r){var t=O&&O.__createBinding||(Object.create?function(n,r,t,u){void 0===u&&(u=t);var e=Object.getOwnPropertyDescriptor(r,t);e&&!("get"in e?!r.__esModule:e.writable||e.configurable)||(e={enumerable:!0,get:function(){return r[t]}}),Object.defineProperty(n,u,e)}:function(n,r,t,u){void 0===u&&(u=t),n[u]=r[t]}),u=O&&O.__setModuleDefault||(Object.create?function(n,r){Object.defineProperty(n,"default",{enumerable:!0,value:r})}:function(n,r){n.default=r}),e=O&&O.__importStar||function(n){if(n&&n.__esModule)return n;var r={};if(null!=n)for(var e in n)"default"!==e&&Object.prototype.hasOwnProperty.call(n,e)&&t(r,n,e);return u(r,n),r},o=O&&O.__spreadArray||function(n,r,t){if(t||2===arguments.length)for(var u,e=0,o=r.length;e<o;e++)!u&&e in r||(u||(u=Array.prototype.slice.call(r,0,e)),u[e]=r[e]);return n.concat(u||Array.prototype.slice.call(r))};Object.defineProperty(r,"__esModule",{value:!0}),r.reduceRight=r.foldMap=r.reduce=r.mapWithIndex=r.map=r.flatten=r.duplicate=r.extend=r.chain=r.ap=r.alt=r.altW=r.of=r.chunksOf=r.splitAt=r.chop=r.chainWithIndex=r.intersperse=r.prependAll=r.unzip=r.zip=r.zipWith=r.modifyAt=r.updateAt=r.sort=r.groupBy=r.group=r.reverse=r.concat=r.concatW=r.fromArray=r.unappend=r.unprepend=r.range=r.replicate=r.makeBy=r.fromReadonlyArray=r.rotate=r.union=r.sortBy=r.uniq=r.unsafeUpdateAt=r.unsafeInsertAt=r.append=r.appendW=r.prepend=r.prependW=r.isOutOfBound=r.isNonEmpty=r.empty=void 0,r.filterWithIndex=r.filter=r.groupSort=r.intercalate=r.updateLast=r.modifyLast=r.updateHead=r.modifyHead=r.matchRight=r.matchLeft=r.concatAll=r.max=r.min=r.init=r.last=r.tail=r.head=r.apS=r.bind=r.bindTo=r.Do=r.Comonad=r.Alt=r.TraversableWithIndex=r.Traversable=r.FoldableWithIndex=r.Foldable=r.Monad=r.chainFirst=r.Chain=r.Applicative=r.apSecond=r.apFirst=r.Apply=r.FunctorWithIndex=r.Pointed=r.flap=r.Functor=r.getUnionSemigroup=r.getEq=r.getSemigroup=r.getShow=r.URI=r.extract=r.traverseWithIndex=r.sequence=r.traverse=r.reduceRightWithIndex=r.foldMapWithIndex=r.reduceWithIndex=void 0,r.readonlyNonEmptyArray=r.fold=r.prependToAll=r.insertAt=r.snoc=r.cons=r.unsnoc=r.uncons=void 0;var i=e(M),c=e(q);function f(n){return function(r){return r.concat(n)}}function a(n,r){return r?n.concat(r):function(r){return r.concat(n)}}function v(n){return function(t){var u=t.length;if(0===u)return r.empty;for(var e=[],o=t[0],i=[o],c=1;c<u;c++){var f=t[c];n.equals(f,o)?i.push(f):(e.push(i),i=[o=f])}return e.push(i),e}}r.empty=i.emptyReadonlyArray,r.isNonEmpty=i.isNonEmpty,r.isOutOfBound=function(n,r){return n<0||n>=r.length},r.prependW=function(n){return function(r){return o([n],r,!0)}},r.prepend=r.prependW,r.appendW=function(n){return function(r){return o(o([],r,!0),[n],!1)}},r.append=r.appendW,r.unsafeInsertAt=function(n,t,u){if((0,r.isNonEmpty)(u)){var e=i.fromReadonlyNonEmptyArray(u);return e.splice(n,0,t),e}return[t]},r.unsafeUpdateAt=function(n,r,t){if(t[n]===r)return t;var u=i.fromReadonlyNonEmptyArray(t);return u[n]=r,u},r.uniq=function(n){return function(t){if(1===t.length)return t;for(var u=[(0,r.head)(t)],e=function(r){u.every((function(t){return!n.equals(t,r)}))&&u.push(r)},o=0,i=(0,r.tail)(t);o<i.length;o++)e(i[o]);return u}},r.sortBy=function(n){if((0,r.isNonEmpty)(n)){var t=(0,E.getMonoid)();return(0,r.sort)(n.reduce(t.concat,t.empty))}return g.identity},r.union=function(n){var t=(0,r.uniq)(n);return function(n){return function(r){return t((0,g.pipe)(r,a(n)))}}},r.rotate=function(n){return function(t){var u=t.length,e=Math.round(n)%u;if((0,r.isOutOfBound)(Math.abs(e),t)||0===e)return t;if(e<0){var o=(0,r.splitAt)(-e)(t);return(0,g.pipe)(o[1],a(o[0]))}return(0,r.rotate)(e-u)(t)}},r.fromReadonlyArray=function(n){return(0,r.isNonEmpty)(n)?i.some(n):i.none},r.makeBy=function(n){return function(r){for(var t=Math.max(0,Math.floor(r)),u=[n(0)],e=1;e<t;e++)u.push(n(e));return u}},r.replicate=function(n){return(0,r.makeBy)((function(){return n}))},r.range=function(n,t){return n<=t?(0,r.makeBy)((function(r){return n+r}))(t-n+1):[n]},r.unprepend=function(n){return[(0,r.head)(n),(0,r.tail)(n)]},r.unappend=function(n){return[(0,r.init)(n),(0,r.last)(n)]},r.fromArray=function(n){return(0,r.fromReadonlyArray)(n.slice())},r.concatW=f,r.concat=a,r.reverse=function(n){return 1===n.length?n:o([(0,r.last)(n)],n.slice(0,-1).reverse(),!0)},r.group=v,r.groupBy=function(n){return function(r){for(var t={},u=0,e=r;u<e.length;u++){var o=e[u],c=n(o);i.has.call(t,c)?t[c].push(o):t[c]=[o]}return t}},r.sort=function(n){return function(r){return 1===r.length?r:r.slice().sort(n.compare)}},r.updateAt=function(n,t){return(0,r.modifyAt)(n,(function(){return t}))},r.modifyAt=function(n,t){return function(u){return(0,r.isOutOfBound)(n,u)?i.none:i.some((0,r.unsafeUpdateAt)(n,t(u[n]),u))}},r.zipWith=function(n,r,t){for(var u=[t(n[0],r[0])],e=Math.min(n.length,r.length),o=1;o<e;o++)u[o]=t(n[o],r[o]);return u},r.zip=function n(t,u){return void 0===u?function(r){return n(r,t)}:(0,r.zipWith)(t,u,(function(n,r){return[n,r]}))},r.unzip=function(n){for(var r=[n[0][0]],t=[n[0][1]],u=1;u<n.length;u++)r[u]=n[u][0],t[u]=n[u][1];return[r,t]},r.prependAll=function(n){return function(r){for(var t=[n,r[0]],u=1;u<r.length;u++)t.push(n,r[u]);return t}},r.intersperse=function(n){return function(t){var u=(0,r.tail)(t);return(0,r.isNonEmpty)(u)?(0,g.pipe)(u,(0,r.prependAll)(n),(0,r.prepend)((0,r.head)(t))):t}},r.chainWithIndex=function(n){return function(t){for(var u=i.fromReadonlyNonEmptyArray(n(0,(0,r.head)(t))),e=1;e<t.length;e++)u.push.apply(u,n(e,t[e]));return u}},r.chop=function(n){return function(t){for(var u=n(t),e=[u[0]],o=u[1];(0,r.isNonEmpty)(o);){var i=n(o),c=i[1];e.push(i[0]),o=c}return e}},r.splitAt=function(n){return function(t){var u=Math.max(1,n);return u>=t.length?[t,r.empty]:[(0,g.pipe)(t.slice(1,u),(0,r.prepend)((0,r.head)(t))),t.slice(u)]}},r.chunksOf=function(n){return(0,r.chop)((0,r.splitAt)(n))};var d=function(n,t){return(0,g.pipe)(n,(0,r.map)(t))},p=function(n,t){return(0,g.pipe)(n,(0,r.mapWithIndex)(t))},s=function(n,t){return(0,g.pipe)(n,(0,r.ap)(t))},l=function(n,t){return(0,g.pipe)(n,(0,r.chain)(t))},m=function(n,t){return(0,g.pipe)(n,(0,r.extend)(t))},h=function(n,t,u){return(0,g.pipe)(n,(0,r.reduce)(t,u))},I=function(n){var t=(0,r.foldMap)(n);return function(n,r){return(0,g.pipe)(n,t(r))}},b=function(n,t,u){return(0,g.pipe)(n,(0,r.reduceRight)(t,u))},R=function(n){var t=(0,r.traverse)(n);return function(n,r){return(0,g.pipe)(n,t(r))}},U=function(n,t){return(0,g.pipe)(n,(0,r.alt)(t))},j=function(n,t,u){return(0,g.pipe)(n,(0,r.reduceWithIndex)(t,u))},x=function(n){var t=(0,r.foldMapWithIndex)(n);return function(n,r){return(0,g.pipe)(n,t(r))}},k=function(n,t,u){return(0,g.pipe)(n,(0,r.reduceRightWithIndex)(t,u))},P=function(n){var t=(0,r.traverseWithIndex)(n);return function(n,r){return(0,g.pipe)(n,t(r))}};r.of=i.singleton,r.altW=function(n){return function(r){return(0,g.pipe)(r,f(n()))}},r.alt=r.altW,r.ap=function(n){return(0,r.chain)((function(t){return(0,g.pipe)(n,(0,r.map)(t))}))},r.chain=function(n){return(0,r.chainWithIndex)((function(r,t){return n(t)}))},r.extend=function(n){return function(t){for(var u=(0,r.tail)(t),e=[n(t)];(0,r.isNonEmpty)(u);)e.push(n(u)),u=(0,r.tail)(u);return e}},r.duplicate=(0,r.extend)(g.identity),r.flatten=(0,r.chain)(g.identity),r.map=function(n){return(0,r.mapWithIndex)((function(r,t){return n(t)}))},r.mapWithIndex=function(n){return function(t){for(var u=[n(0,(0,r.head)(t))],e=1;e<t.length;e++)u.push(n(e,t[e]));return u}},r.reduce=function(n,t){return(0,r.reduceWithIndex)(n,(function(n,r,u){return t(r,u)}))},r.foldMap=function(n){return function(r){return function(t){return t.slice(1).reduce((function(t,u){return n.concat(t,r(u))}),r(t[0]))}}},r.reduceRight=function(n,t){return(0,r.reduceRightWithIndex)(n,(function(n,r,u){return t(r,u)}))},r.reduceWithIndex=function(n,r){return function(t){return t.reduce((function(n,t,u){return r(u,n,t)}),n)}},r.foldMapWithIndex=function(n){return function(r){return function(t){return t.slice(1).reduce((function(t,u,e){return n.concat(t,r(e+1,u))}),r(0,t[0]))}}},r.reduceRightWithIndex=function(n,r){return function(t){return t.reduceRight((function(n,t,u){return r(u,t,n)}),n)}},r.traverse=function(n){var t=(0,r.traverseWithIndex)(n);return function(n){return t((function(r,t){return n(t)}))}},r.sequence=function(n){return(0,r.traverseWithIndex)(n)(g.SK)},r.traverseWithIndex=function(n){return function(t){return function(u){for(var e=n.map(t(0,(0,r.head)(u)),r.of),o=1;o<u.length;o++)e=n.ap(n.map(e,(function(n){return function(t){return(0,g.pipe)(n,(0,r.append)(t))}})),t(o,u[o]));return e}}},r.extract=i.head,r.URI="ReadonlyNonEmptyArray",r.getShow=function(n){return{show:function(r){return"[".concat(r.map(n.show).join(", "),"]")}}},r.getSemigroup=function(){return{concat:a}},r.getEq=function(n){return(0,W.fromEquals)((function(r,t){return r.length===t.length&&r.every((function(r,u){return n.equals(r,t[u])}))}))},r.getUnionSemigroup=function(n){var t=(0,r.union)(n);return{concat:function(n,r){return t(r)(n)}}},r.Functor={URI:r.URI,map:d},r.flap=(0,_.flap)(r.Functor),r.Pointed={URI:r.URI,of:r.of},r.FunctorWithIndex={URI:r.URI,map:d,mapWithIndex:p},r.Apply={URI:r.URI,map:d,ap:s},r.apFirst=(0,w.apFirst)(r.Apply),r.apSecond=(0,w.apSecond)(r.Apply),r.Applicative={URI:r.URI,map:d,ap:s,of:r.of},r.Chain={URI:r.URI,map:d,ap:s,chain:l},r.chainFirst=(0,y.chainFirst)(r.Chain),r.Monad={URI:r.URI,map:d,ap:s,of:r.of,chain:l},r.Foldable={URI:r.URI,reduce:h,foldMap:I,reduceRight:b},r.FoldableWithIndex={URI:r.URI,reduce:h,foldMap:I,reduceRight:b,reduceWithIndex:j,foldMapWithIndex:x,reduceRightWithIndex:k},r.Traversable={URI:r.URI,map:d,reduce:h,foldMap:I,reduceRight:b,traverse:R,sequence:r.sequence},r.TraversableWithIndex={URI:r.URI,map:d,mapWithIndex:p,reduce:h,foldMap:I,reduceRight:b,traverse:R,sequence:r.sequence,reduceWithIndex:j,foldMapWithIndex:x,reduceRightWithIndex:k,traverseWithIndex:P},r.Alt={URI:r.URI,map:d,alt:U},r.Comonad={URI:r.URI,map:d,extend:m,extract:r.extract},r.Do=(0,r.of)(i.emptyRecord),r.bindTo=(0,_.bindTo)(r.Functor),r.bind=(0,y.bind)(r.Chain),r.apS=(0,w.apS)(r.Apply),r.head=r.extract,r.tail=i.tail,r.last=function(n){return n[n.length-1]},r.init=function(n){return n.slice(0,-1)},r.min=function(n){var r=c.min(n);return function(n){return n.reduce(r.concat)}},r.max=function(n){var r=c.max(n);return function(n){return n.reduce(r.concat)}},r.concatAll=function(n){return function(r){return r.reduce(n.concat)}},r.matchLeft=function(n){return function(t){return n((0,r.head)(t),(0,r.tail)(t))}},r.matchRight=function(n){return function(t){return n((0,r.init)(t),(0,r.last)(t))}},r.modifyHead=function(n){return function(t){return o([n((0,r.head)(t))],(0,r.tail)(t),!0)}},r.updateHead=function(n){return(0,r.modifyHead)((function(){return n}))},r.modifyLast=function(n){return function(t){return(0,g.pipe)((0,r.init)(t),(0,r.append)(n((0,r.last)(t))))}},r.updateLast=function(n){return(0,r.modifyLast)((function(){return n}))},r.intercalate=function(n){var t=(0,r.concatAll)(n);return function(n){return(0,g.flow)((0,r.intersperse)(n),t)}},r.groupSort=function(n){var t=(0,r.sort)(n),u=v(n);return function(n){return(0,r.isNonEmpty)(n)?u(t(n)):r.empty}},r.filter=function(n){return(0,r.filterWithIndex)((function(r,t){return n(t)}))},r.filterWithIndex=function(n){return function(t){return(0,r.fromReadonlyArray)(t.filter((function(r,t){return n(t,r)})))}},r.uncons=r.unprepend,r.unsnoc=r.unappend,r.cons=function(n,t){return void 0===t?(0,r.prepend)(n):(0,g.pipe)(t,(0,r.prepend)(n))},r.snoc=function(n,r){return(0,g.pipe)(n,a([r]))},r.insertAt=function(n,t){return function(u){return n<0||n>u.length?i.none:i.some((0,r.unsafeInsertAt)(n,t,u))}},r.prependToAll=r.prependAll,r.fold=r.concatAll,r.readonlyNonEmptyArray={URI:r.URI,of:r.of,map:d,mapWithIndex:p,ap:s,chain:l,extend:m,extract:r.extract,reduce:h,foldMap:I,reduceRight:b,traverse:R,sequence:r.sequence,reduceWithIndex:j,foldMapWithIndex:x,reduceRightWithIndex:k,traverseWithIndex:P,alt:U}})),T=j((function(n,r){var t=O&&O.__createBinding||(Object.create?function(n,r,t,u){void 0===u&&(u=t);var e=Object.getOwnPropertyDescriptor(r,t);e&&!("get"in e?!r.__esModule:e.writable||e.configurable)||(e={enumerable:!0,get:function(){return r[t]}}),Object.defineProperty(n,u,e)}:function(n,r,t,u){void 0===u&&(u=t),n[u]=r[t]}),u=O&&O.__setModuleDefault||(Object.create?function(n,r){Object.defineProperty(n,"default",{enumerable:!0,value:r})}:function(n,r){n.default=r}),e=O&&O.__importStar||function(n){if(n&&n.__esModule)return n;var r={};if(null!=n)for(var e in n)"default"!==e&&Object.prototype.hasOwnProperty.call(n,e)&&t(r,n,e);return u(r,n),r},o=O&&O.__spreadArray||function(n,r,t){if(t||2===arguments.length)for(var u,e=0,o=r.length;e<o;e++)!u&&e in r||(u||(u=Array.prototype.slice.call(r,0,e)),u[e]=r[e]);return n.concat(u||Array.prototype.slice.call(r))};Object.defineProperty(r,"__esModule",{value:!0}),r.mapWithIndex=r.map=r.flatten=r.duplicate=r.extend=r.chain=r.ap=r.alt=r.altW=r.chunksOf=r.splitAt=r.chop=r.chainWithIndex=r.foldMap=r.foldMapWithIndex=r.intersperse=r.prependAll=r.unzip=r.zip=r.zipWith=r.of=r.copy=r.modifyAt=r.updateAt=r.insertAt=r.sort=r.groupBy=r.group=r.reverse=r.concat=r.concatW=r.unappend=r.unprepend=r.range=r.replicate=r.makeBy=r.fromArray=r.fromReadonlyNonEmptyArray=r.rotate=r.union=r.sortBy=r.uniq=r.unsafeUpdateAt=r.unsafeInsertAt=r.append=r.appendW=r.prepend=r.prependW=r.isOutOfBound=r.isNonEmpty=void 0,r.filter=r.groupSort=r.intercalate=r.updateLast=r.modifyLast=r.updateHead=r.modifyHead=r.matchRight=r.matchLeft=r.concatAll=r.max=r.min=r.init=r.last=r.tail=r.head=r.apS=r.bind=r.bindTo=r.Do=r.Comonad=r.Alt=r.TraversableWithIndex=r.Traversable=r.FoldableWithIndex=r.Foldable=r.Monad=r.chainFirst=r.Chain=r.Applicative=r.apSecond=r.apFirst=r.Apply=r.FunctorWithIndex=r.Pointed=r.flap=r.Functor=r.getUnionSemigroup=r.getEq=r.getSemigroup=r.getShow=r.URI=r.extract=r.traverseWithIndex=r.sequence=r.traverse=r.reduceRightWithIndex=r.reduceRight=r.reduceWithIndex=r.reduce=void 0,r.nonEmptyArray=r.fold=r.prependToAll=r.snoc=r.cons=r.unsnoc=r.uncons=r.filterWithIndex=void 0;var i=e(M),c=e(P);function f(n){return function(r){return r.concat(n)}}function a(n,r){return r?n.concat(r):function(r){return r.concat(n)}}function v(n){return function(r){var t=r.length;if(0===t)return[];for(var u=[],e=r[0],o=[e],i=1;i<t;i++){var c=r[i];n.equals(c,e)?o.push(c):(u.push(o),o=[e=c])}return u.push(o),u}}r.isNonEmpty=function(n){return n.length>0},r.isOutOfBound=function(n,r){return n<0||n>=r.length},r.prependW=function(n){return function(r){return o([n],r,!0)}},r.prepend=r.prependW,r.appendW=function(n){return function(r){return o(o([],r,!0),[n],!1)}},r.append=r.appendW,r.unsafeInsertAt=function(n,t,u){if((0,r.isNonEmpty)(u)){var e=(0,r.fromReadonlyNonEmptyArray)(u);return e.splice(n,0,t),e}return[t]},r.unsafeUpdateAt=function(n,t,u){var e=(0,r.fromReadonlyNonEmptyArray)(u);return e[n]=t,e},r.uniq=function(n){return function(t){if(1===t.length)return(0,r.copy)(t);for(var u=[(0,r.head)(t)],e=function(r){u.every((function(t){return!n.equals(t,r)}))&&u.push(r)},o=0,i=(0,r.tail)(t);o<i.length;o++)e(i[o]);return u}},r.sortBy=function(n){if((0,r.isNonEmpty)(n)){var t=(0,E.getMonoid)();return(0,r.sort)(n.reduce(t.concat,t.empty))}return r.copy},r.union=function(n){var t=(0,r.uniq)(n);return function(n){return function(r){return t((0,g.pipe)(r,a(n)))}}},r.rotate=function(n){return function(t){var u=t.length,e=Math.round(n)%u;if((0,r.isOutOfBound)(Math.abs(e),t)||0===e)return(0,r.copy)(t);if(e<0){var o=(0,r.splitAt)(-e)(t);return(0,g.pipe)(o[1],a(o[0]))}return(0,r.rotate)(e-u)(t)}},r.fromReadonlyNonEmptyArray=i.fromReadonlyNonEmptyArray,r.fromArray=function(n){return(0,r.isNonEmpty)(n)?i.some(n):i.none},r.makeBy=function(n){return function(r){for(var t=Math.max(0,Math.floor(r)),u=[n(0)],e=1;e<t;e++)u.push(n(e));return u}},r.replicate=function(n){return(0,r.makeBy)((function(){return n}))},r.range=function(n,t){return n<=t?(0,r.makeBy)((function(r){return n+r}))(t-n+1):[n]},r.unprepend=function(n){return[(0,r.head)(n),(0,r.tail)(n)]},r.unappend=function(n){return[(0,r.init)(n),(0,r.last)(n)]},r.concatW=f,r.concat=a,r.reverse=function(n){return o([(0,r.last)(n)],n.slice(0,-1).reverse(),!0)},r.group=v,r.groupBy=function(n){return function(r){for(var t={},u=0,e=r;u<e.length;u++){var o=e[u],c=n(o);i.has.call(t,c)?t[c].push(o):t[c]=[o]}return t}},r.sort=function(n){return function(r){return r.slice().sort(n.compare)}},r.insertAt=function(n,t){return function(u){return n<0||n>u.length?i.none:i.some((0,r.unsafeInsertAt)(n,t,u))}},r.updateAt=function(n,t){return(0,r.modifyAt)(n,(function(){return t}))},r.modifyAt=function(n,t){return function(u){return(0,r.isOutOfBound)(n,u)?i.none:i.some((0,r.unsafeUpdateAt)(n,t(u[n]),u))}},r.copy=r.fromReadonlyNonEmptyArray,r.of=function(n){return[n]},r.zipWith=function(n,r,t){for(var u=[t(n[0],r[0])],e=Math.min(n.length,r.length),o=1;o<e;o++)u[o]=t(n[o],r[o]);return u},r.zip=function n(t,u){return void 0===u?function(r){return n(r,t)}:(0,r.zipWith)(t,u,(function(n,r){return[n,r]}))},r.unzip=function(n){for(var r=[n[0][0]],t=[n[0][1]],u=1;u<n.length;u++)r[u]=n[u][0],t[u]=n[u][1];return[r,t]},r.prependAll=function(n){return function(r){for(var t=[n,r[0]],u=1;u<r.length;u++)t.push(n,r[u]);return t}},r.intersperse=function(n){return function(t){var u=(0,r.tail)(t);return(0,r.isNonEmpty)(u)?(0,g.pipe)(u,(0,r.prependAll)(n),(0,r.prepend)((0,r.head)(t))):(0,r.copy)(t)}},r.foldMapWithIndex=c.foldMapWithIndex,r.foldMap=c.foldMap,r.chainWithIndex=function(n){return function(t){for(var u=(0,r.fromReadonlyNonEmptyArray)(n(0,(0,r.head)(t))),e=1;e<t.length;e++)u.push.apply(u,n(e,t[e]));return u}},r.chop=function(n){return function(t){for(var u=n(t),e=[u[0]],o=u[1];(0,r.isNonEmpty)(o);){var i=n(o),c=i[1];e.push(i[0]),o=c}return e}},r.splitAt=function(n){return function(t){var u=Math.max(1,n);return u>=t.length?[(0,r.copy)(t),[]]:[(0,g.pipe)(t.slice(1,u),(0,r.prepend)((0,r.head)(t))),t.slice(u)]}},r.chunksOf=function(n){return(0,r.chop)((0,r.splitAt)(n))};var d=function(n,t){return(0,g.pipe)(n,(0,r.map)(t))},p=function(n,t){return(0,g.pipe)(n,(0,r.mapWithIndex)(t))},s=function(n,t){return(0,g.pipe)(n,(0,r.ap)(t))},l=function(n,t){return(0,g.pipe)(n,(0,r.chain)(t))},m=function(n,t){return(0,g.pipe)(n,(0,r.extend)(t))},h=function(n,t,u){return(0,g.pipe)(n,(0,r.reduce)(t,u))},I=function(n){var t=(0,r.foldMap)(n);return function(n,r){return(0,g.pipe)(n,t(r))}},b=function(n,t,u){return(0,g.pipe)(n,(0,r.reduceRight)(t,u))},R=function(n){var t=(0,r.traverse)(n);return function(n,r){return(0,g.pipe)(n,t(r))}},U=function(n,t){return(0,g.pipe)(n,(0,r.alt)(t))},j=function(n,t,u){return(0,g.pipe)(n,(0,r.reduceWithIndex)(t,u))},x=function(n){var t=(0,r.foldMapWithIndex)(n);return function(n,r){return(0,g.pipe)(n,t(r))}},W=function(n,t,u){return(0,g.pipe)(n,(0,r.reduceRightWithIndex)(t,u))},k=function(n){var t=(0,r.traverseWithIndex)(n);return function(n,r){return(0,g.pipe)(n,t(r))}};r.altW=function(n){return function(r){return(0,g.pipe)(r,f(n()))}},r.alt=r.altW,r.ap=function(n){return(0,r.chain)((function(t){return(0,g.pipe)(n,(0,r.map)(t))}))},r.chain=function(n){return(0,r.chainWithIndex)((function(r,t){return n(t)}))},r.extend=function(n){return function(t){for(var u=(0,r.tail)(t),e=[n(t)];(0,r.isNonEmpty)(u);)e.push(n(u)),u=(0,r.tail)(u);return e}},r.duplicate=(0,r.extend)(g.identity),r.flatten=(0,r.chain)(g.identity),r.map=function(n){return(0,r.mapWithIndex)((function(r,t){return n(t)}))},r.mapWithIndex=function(n){return function(t){for(var u=[n(0,(0,r.head)(t))],e=1;e<t.length;e++)u.push(n(e,t[e]));return u}},r.reduce=c.reduce,r.reduceWithIndex=c.reduceWithIndex,r.reduceRight=c.reduceRight,r.reduceRightWithIndex=c.reduceRightWithIndex,r.traverse=function(n){var t=(0,r.traverseWithIndex)(n);return function(n){return t((function(r,t){return n(t)}))}},r.sequence=function(n){return(0,r.traverseWithIndex)(n)((function(n,r){return r}))},r.traverseWithIndex=function(n){return function(t){return function(u){for(var e=n.map(t(0,(0,r.head)(u)),r.of),o=1;o<u.length;o++)e=n.ap(n.map(e,(function(n){return function(t){return(0,g.pipe)(n,(0,r.append)(t))}})),t(o,u[o]));return e}}},r.extract=c.head,r.URI="NonEmptyArray",r.getShow=c.getShow,r.getSemigroup=function(){return{concat:a}},r.getEq=c.getEq,r.getUnionSemigroup=function(n){var t=(0,r.union)(n);return{concat:function(n,r){return t(r)(n)}}},r.Functor={URI:r.URI,map:d},r.flap=(0,_.flap)(r.Functor),r.Pointed={URI:r.URI,of:r.of},r.FunctorWithIndex={URI:r.URI,map:d,mapWithIndex:p},r.Apply={URI:r.URI,map:d,ap:s},r.apFirst=(0,w.apFirst)(r.Apply),r.apSecond=(0,w.apSecond)(r.Apply),r.Applicative={URI:r.URI,map:d,ap:s,of:r.of},r.Chain={URI:r.URI,map:d,ap:s,chain:l},r.chainFirst=(0,y.chainFirst)(r.Chain),r.Monad={URI:r.URI,map:d,ap:s,of:r.of,chain:l},r.Foldable={URI:r.URI,reduce:h,foldMap:I,reduceRight:b},r.FoldableWithIndex={URI:r.URI,reduce:h,foldMap:I,reduceRight:b,reduceWithIndex:j,foldMapWithIndex:x,reduceRightWithIndex:W},r.Traversable={URI:r.URI,map:d,reduce:h,foldMap:I,reduceRight:b,traverse:R,sequence:r.sequence},r.TraversableWithIndex={URI:r.URI,map:d,mapWithIndex:p,reduce:h,foldMap:I,reduceRight:b,traverse:R,sequence:r.sequence,reduceWithIndex:j,foldMapWithIndex:x,reduceRightWithIndex:W,traverseWithIndex:k},r.Alt={URI:r.URI,map:d,alt:U},r.Comonad={URI:r.URI,map:d,extend:m,extract:r.extract},r.Do=(0,r.of)(i.emptyRecord),r.bindTo=(0,_.bindTo)(r.Functor),r.bind=(0,y.bind)(r.Chain),r.apS=(0,w.apS)(r.Apply),r.head=c.head,r.tail=function(n){return n.slice(1)},r.last=c.last,r.init=function(n){return n.slice(0,-1)},r.min=c.min,r.max=c.max,r.concatAll=function(n){return function(r){return r.reduce(n.concat)}},r.matchLeft=function(n){return function(t){return n((0,r.head)(t),(0,r.tail)(t))}},r.matchRight=function(n){return function(t){return n((0,r.init)(t),(0,r.last)(t))}},r.modifyHead=function(n){return function(t){return o([n((0,r.head)(t))],(0,r.tail)(t),!0)}},r.updateHead=function(n){return(0,r.modifyHead)((function(){return n}))},r.modifyLast=function(n){return function(t){return(0,g.pipe)((0,r.init)(t),(0,r.append)(n((0,r.last)(t))))}},r.updateLast=function(n){return(0,r.modifyLast)((function(){return n}))},r.intercalate=c.intercalate,r.groupSort=function(n){var t=(0,r.sort)(n),u=v(n);return function(n){return(0,r.isNonEmpty)(n)?u(t(n)):[]}},r.filter=function(n){return(0,r.filterWithIndex)((function(r,t){return n(t)}))},r.filterWithIndex=function(n){return function(t){return(0,r.fromArray)(t.filter((function(r,t){return n(t,r)})))}},r.uncons=r.unprepend,r.unsnoc=r.unappend,r.cons=function(n,t){return void 0===t?(0,r.prepend)(n):(0,g.pipe)(t,(0,r.prepend)(n))},r.snoc=function(n,t){return(0,g.pipe)(n,(0,r.append)(t))},r.prependToAll=r.prependAll,r.fold=c.concatAll,r.nonEmptyArray={URI:r.URI,of:r.of,map:d,mapWithIndex:p,ap:s,chain:l,extend:m,extract:r.extract,reduce:h,foldMap:I,reduceRight:b,traverse:R,sequence:r.sequence,reduceWithIndex:j,foldMapWithIndex:x,reduceRightWithIndex:W,traverseWithIndex:k,alt:U}})),A=j((function(n,r){Object.defineProperty(r,"__esModule",{value:!0}),r.Field=r.MonoidProduct=r.MonoidSum=r.SemigroupProduct=r.SemigroupSum=r.MagmaSub=r.Show=r.Bounded=r.Ord=r.Eq=r.isNumber=void 0,r.isNumber=function(n){return"number"==typeof n},r.Eq={equals:function(n,r){return n===r}},r.Ord={equals:r.Eq.equals,compare:function(n,r){return n<r?-1:n>r?1:0}},r.Bounded={equals:r.Eq.equals,compare:r.Ord.compare,top:1/0,bottom:-1/0},r.Show={show:function(n){return JSON.stringify(n)}},r.MagmaSub={concat:function(n,r){return n-r}},r.SemigroupSum={concat:function(n,r){return n+r}},r.SemigroupProduct={concat:function(n,r){return n*r}},r.MonoidSum={concat:r.SemigroupSum.concat,empty:0},r.MonoidProduct={concat:r.SemigroupProduct.concat,empty:1},r.Field={add:r.SemigroupSum.concat,zero:0,mul:r.SemigroupProduct.concat,one:1,sub:r.MagmaSub.concat,degree:function(){return 1},div:function(n,r){return n/r},mod:function(n,r){return n%r}}})),z=j((function(n,r){Object.defineProperty(r,"__esModule",{value:!0}),r.right=r.left=r.flap=r.Functor=r.Bifunctor=r.URI=r.bimap=r.mapLeft=r.map=r.separated=void 0,r.separated=function(n,r){return{left:n,right:r}},r.map=function(n){return function(t){return(0,r.separated)((0,r.left)(t),n((0,r.right)(t)))}},r.mapLeft=function(n){return function(t){return(0,r.separated)(n((0,r.left)(t)),(0,r.right)(t))}},r.bimap=function(n,t){return function(u){return(0,r.separated)(n((0,r.left)(u)),t((0,r.right)(u)))}},r.URI="Separated",r.Bifunctor={URI:r.URI,mapLeft:function(n,t){return(0,g.pipe)(n,(0,r.mapLeft)(t))},bimap:function(n,t,u){return(0,g.pipe)(n,(0,r.bimap)(t,u))}},r.Functor={URI:r.URI,map:function(n,t){return(0,g.pipe)(n,(0,r.map)(t))}},r.flap=(0,_.flap)(r.Functor),r.left=function(n){return n.left},r.right=function(n){return n.right}})),L=j((function(n,r){var t=O&&O.__createBinding||(Object.create?function(n,r,t,u){void 0===u&&(u=t);var e=Object.getOwnPropertyDescriptor(r,t);e&&!("get"in e?!r.__esModule:e.writable||e.configurable)||(e={enumerable:!0,get:function(){return r[t]}}),Object.defineProperty(n,u,e)}:function(n,r,t,u){void 0===u&&(u=t),n[u]=r[t]}),u=O&&O.__setModuleDefault||(Object.create?function(n,r){Object.defineProperty(n,"default",{enumerable:!0,value:r})}:function(n,r){n.default=r}),e=O&&O.__importStar||function(n){if(n&&n.__esModule)return n;var r={};if(null!=n)for(var e in n)"default"!==e&&Object.prototype.hasOwnProperty.call(n,e)&&t(r,n,e);return u(r,n),r};Object.defineProperty(r,"__esModule",{value:!0}),r.filterE=r.witherDefault=r.wiltDefault=void 0;var o=e(M);r.wiltDefault=function(n,r){return function(t){var u=n.traverse(t);return function(n,e){return t.map(u(n,e),r.separate)}}},r.witherDefault=function(n,r){return function(t){var u=n.traverse(t);return function(n,e){return t.map(u(n,e),r.compact)}}},r.filterE=function(n){return function(r){var t=n.wither(r);return function(n){return function(u){return t(u,(function(t){return r.map(n(t),(function(n){return n?o.some(t):o.none}))}))}}}}})),N=j((function(n,r){Object.defineProperty(r,"__esModule",{value:!0}),r.guard=void 0,r.guard=function(n,r){return function(t){return t?r.of(void 0):n.zero()}}})),S=j((function(n,r){var t=O&&O.__createBinding||(Object.create?function(n,r,t,u){void 0===u&&(u=t);var e=Object.getOwnPropertyDescriptor(r,t);e&&!("get"in e?!r.__esModule:e.writable||e.configurable)||(e={enumerable:!0,get:function(){return r[t]}}),Object.defineProperty(n,u,e)}:function(n,r,t,u){void 0===u&&(u=t),n[u]=r[t]}),u=O&&O.__setModuleDefault||(Object.create?function(n,r){Object.defineProperty(n,"default",{enumerable:!0,value:r})}:function(n,r){n.default=r}),e=O&&O.__importStar||function(n){if(n&&n.__esModule)return n;var r={};if(null!=n)for(var e in n)"default"!==e&&Object.prototype.hasOwnProperty.call(n,e)&&t(r,n,e);return u(r,n),r},o=O&&O.__spreadArray||function(n,r,t){if(t||2===arguments.length)for(var u,e=0,o=r.length;e<o;e++)!u&&e in r||(u||(u=Array.prototype.slice.call(r,0,e)),u[e]=r[e]);return n.concat(u||Array.prototype.slice.call(r))};Object.defineProperty(r,"__esModule",{value:!0}),r.sort=r.lefts=r.rights=r.reverse=r.modifyAt=r.deleteAt=r.updateAt=r.insertAt=r.findLastIndex=r.findLastMap=r.findLast=r.findFirstMap=r.findFirst=r.findIndex=r.dropLeftWhile=r.dropRight=r.dropLeft=r.spanLeft=r.takeLeftWhile=r.takeRight=r.takeLeft=r.init=r.tail=r.last=r.head=r.lookup=r.isOutOfBound=r.size=r.scanRight=r.scanLeft=r.chainWithIndex=r.foldRight=r.matchRight=r.matchRightW=r.foldLeft=r.matchLeft=r.matchLeftW=r.match=r.matchW=r.fromEither=r.fromOption=r.fromPredicate=r.replicate=r.makeBy=r.appendW=r.append=r.prependW=r.prepend=r.isNonEmpty=r.isEmpty=void 0,r.sequence=r.traverse=r.reduceRightWithIndex=r.reduceRight=r.reduceWithIndex=r.foldMap=r.reduce=r.foldMapWithIndex=r.duplicate=r.extend=r.filterWithIndex=r.partitionMapWithIndex=r.partitionMap=r.partitionWithIndex=r.partition=r.compact=r.filterMap=r.filterMapWithIndex=r.filter=r.separate=r.mapWithIndex=r.map=r.flatten=r.chain=r.ap=r.alt=r.altW=r.zero=r.of=r._chainRecBreadthFirst=r._chainRecDepthFirst=r.difference=r.intersection=r.union=r.concat=r.concatW=r.comprehension=r.fromOptionK=r.chunksOf=r.splitAt=r.chop=r.sortBy=r.uniq=r.elem=r.rotate=r.intersperse=r.prependAll=r.unzip=r.zip=r.zipWith=void 0,r.toArray=r.unsafeDeleteAt=r.unsafeUpdateAt=r.unsafeInsertAt=r.fromEitherK=r.FromEither=r.filterE=r.Witherable=r.ChainRecBreadthFirst=r.chainRecBreadthFirst=r.ChainRecDepthFirst=r.chainRecDepthFirst=r.TraversableWithIndex=r.Traversable=r.FoldableWithIndex=r.Foldable=r.FilterableWithIndex=r.Filterable=r.Compactable=r.Extend=r.Alternative=r.guard=r.Zero=r.Alt=r.Unfoldable=r.chainFirst=r.Monad=r.Chain=r.Applicative=r.apSecond=r.apFirst=r.Apply=r.FunctorWithIndex=r.Pointed=r.flap=r.Functor=r.getDifferenceMagma=r.getIntersectionSemigroup=r.getUnionMonoid=r.getUnionSemigroup=r.getOrd=r.getEq=r.getMonoid=r.getSemigroup=r.getShow=r.URI=r.unfold=r.wilt=r.wither=r.traverseWithIndex=void 0,r.readonlyArray=r.prependToAll=r.snoc=r.cons=r.range=r.apS=r.bind=r.bindTo=r.Do=r.intercalate=r.exists=r.some=r.every=r.empty=r.fromArray=void 0;var i=e(M),c=e(A),f=e(P);r.isEmpty=function(n){return 0===n.length},r.isNonEmpty=f.isNonEmpty,r.prepend=f.prepend,r.prependW=f.prependW,r.append=f.append,r.appendW=f.appendW,r.makeBy=function(n,t){return n<=0?r.empty:f.makeBy(t)(n)},r.replicate=function(n,t){return(0,r.makeBy)(n,(function(){return t}))},r.fromPredicate=function(n){return function(t){return n(t)?[t]:r.empty}},r.fromOption=function(n){return i.isNone(n)?r.empty:[n.value]},r.fromEither=function(n){return i.isLeft(n)?r.empty:[n.right]},r.matchW=function(n,t){return function(u){return(0,r.isNonEmpty)(u)?t(u):n()}},r.match=r.matchW,r.matchLeftW=function(n,t){return function(u){return(0,r.isNonEmpty)(u)?t(f.head(u),f.tail(u)):n()}},r.matchLeft=r.matchLeftW,r.foldLeft=r.matchLeft,r.matchRightW=function(n,t){return function(u){return(0,r.isNonEmpty)(u)?t(f.init(u),f.last(u)):n()}},r.matchRight=r.matchRightW,r.foldRight=r.matchRight,r.chainWithIndex=function(n){return function(t){if((0,r.isEmpty)(t))return r.empty;for(var u=[],e=0;e<t.length;e++)u.push.apply(u,n(e,t[e]));return u}},r.scanLeft=function(n,r){return function(t){var u=t.length,e=new Array(u+1);e[0]=n;for(var o=0;o<u;o++)e[o+1]=r(e[o],t[o]);return e}},r.scanRight=function(n,r){return function(t){var u=t.length,e=new Array(u+1);e[u]=n;for(var o=u-1;o>=0;o--)e[o]=r(t[o],e[o+1]);return e}},r.size=function(n){return n.length},r.isOutOfBound=f.isOutOfBound,r.lookup=function n(t,u){return void 0===u?function(r){return n(t,r)}:(0,r.isOutOfBound)(t,u)?i.none:i.some(u[t])},r.head=function(n){return(0,r.isNonEmpty)(n)?i.some(f.head(n)):i.none},r.last=function(n){return(0,r.isNonEmpty)(n)?i.some(f.last(n)):i.none},r.tail=function(n){return(0,r.isNonEmpty)(n)?i.some(f.tail(n)):i.none},r.init=function(n){return(0,r.isNonEmpty)(n)?i.some(f.init(n)):i.none},r.takeLeft=function(n){return function(t){return(0,r.isOutOfBound)(n,t)?t:0===n?r.empty:t.slice(0,n)}},r.takeRight=function(n){return function(t){return(0,r.isOutOfBound)(n,t)?t:0===n?r.empty:t.slice(-n)}},r.takeLeftWhile=function(n){return function(t){for(var u=[],e=0,o=t;e<o.length;e++){var i=o[e];if(!n(i))break;u.push(i)}var c=u.length;return c===t.length?t:0===c?r.empty:u}};var a=function(n,r){for(var t=n.length,u=0;u<t&&r(n[u]);u++);return u};function v(n){return function(r,t){if(void 0===t){var u=v(n);return function(n){return u(r,n)}}for(var e=0;e<t.length;e++)if(n.equals(t[e],r))return!0;return!1}}function d(n){var t=f.union(n);return function(u,e){if(void 0===e){var o=d(n);return function(n){return o(n,u)}}return(0,r.isNonEmpty)(u)&&(0,r.isNonEmpty)(e)?t(e)(u):(0,r.isNonEmpty)(u)?u:e}}function p(n){var r=v(n);return function(t,u){if(void 0===u){var e=p(n);return function(n){return e(n,t)}}return t.filter((function(n){return r(n,u)}))}}function s(n){var r=v(n);return function(t,u){if(void 0===u){var e=s(n);return function(n){return e(n,t)}}return t.filter((function(n){return!r(n,u)}))}}r.spanLeft=function(n){return function(t){var u=(0,r.splitAt)(a(t,n))(t);return{init:u[0],rest:u[1]}}},r.dropLeft=function(n){return function(t){return n<=0||(0,r.isEmpty)(t)?t:n>=t.length?r.empty:t.slice(n,t.length)}},r.dropRight=function(n){return function(t){return n<=0||(0,r.isEmpty)(t)?t:n>=t.length?r.empty:t.slice(0,t.length-n)}},r.dropLeftWhile=function(n){return function(t){var u=a(t,n);return 0===u?t:u===t.length?r.empty:t.slice(u)}},r.findIndex=function(n){return function(r){for(var t=0;t<r.length;t++)if(n(r[t]))return i.some(t);return i.none}},r.findFirst=function(n){return function(r){for(var t=0;t<r.length;t++)if(n(r[t]))return i.some(r[t]);return i.none}},r.findFirstMap=function(n){return function(r){for(var t=0;t<r.length;t++){var u=n(r[t]);if(i.isSome(u))return u}return i.none}},r.findLast=function(n){return function(r){for(var t=r.length-1;t>=0;t--)if(n(r[t]))return i.some(r[t]);return i.none}},r.findLastMap=function(n){return function(r){for(var t=r.length-1;t>=0;t--){var u=n(r[t]);if(i.isSome(u))return u}return i.none}},r.findLastIndex=function(n){return function(r){for(var t=r.length-1;t>=0;t--)if(n(r[t]))return i.some(t);return i.none}},r.insertAt=function(n,r){return function(t){return n<0||n>t.length?i.none:i.some(f.unsafeInsertAt(n,r,t))}},r.updateAt=function(n,t){return(0,r.modifyAt)(n,(function(){return t}))},r.deleteAt=function(n){return function(t){return(0,r.isOutOfBound)(n,t)?i.none:i.some((0,r.unsafeDeleteAt)(n,t))}},r.modifyAt=function(n,t){return function(u){return(0,r.isOutOfBound)(n,u)?i.none:i.some((0,r.unsafeUpdateAt)(n,t(u[n]),u))}},r.reverse=function(n){return n.length<=1?n:n.slice().reverse()},r.rights=function(n){for(var r=[],t=0;t<n.length;t++){var u=n[t];"Right"===u._tag&&r.push(u.right)}return r},r.lefts=function(n){for(var r=[],t=0;t<n.length;t++){var u=n[t];"Left"===u._tag&&r.push(u.left)}return r},r.sort=function(n){return function(r){return r.length<=1?r:r.slice().sort(n.compare)}},r.zipWith=function(n,r,t){for(var u=[],e=Math.min(n.length,r.length),o=0;o<e;o++)u[o]=t(n[o],r[o]);return u},r.zip=function n(t,u){return void 0===u?function(r){return n(r,t)}:(0,r.zipWith)(t,u,(function(n,r){return[n,r]}))},r.unzip=function(n){for(var r=[],t=[],u=0;u<n.length;u++)r[u]=n[u][0],t[u]=n[u][1];return[r,t]},r.prependAll=function(n){var t=f.prependAll(n);return function(n){return(0,r.isNonEmpty)(n)?t(n):n}},r.intersperse=function(n){var t=f.intersperse(n);return function(n){return(0,r.isNonEmpty)(n)?t(n):n}},r.rotate=function(n){var t=f.rotate(n);return function(n){return(0,r.isNonEmpty)(n)?t(n):n}},r.elem=v,r.uniq=function(n){var t=f.uniq(n);return function(n){return(0,r.isNonEmpty)(n)?t(n):n}},r.sortBy=function(n){var t=f.sortBy(n);return function(n){return(0,r.isNonEmpty)(n)?t(n):n}},r.chop=function(n){var t=f.chop(n);return function(n){return(0,r.isNonEmpty)(n)?t(n):r.empty}},r.splitAt=function(n){return function(t){return n>=1&&(0,r.isNonEmpty)(t)?f.splitAt(n)(t):(0,r.isEmpty)(t)?[t,r.empty]:[r.empty,t]}},r.chunksOf=function(n){var t=f.chunksOf(n);return function(n){return(0,r.isNonEmpty)(n)?t(n):r.empty}},r.fromOptionK=function(n){return function(){for(var t=[],u=0;u<arguments.length;u++)t[u]=arguments[u];return(0,r.fromOption)(n.apply(void 0,t))}},r.comprehension=function(n,t,u){void 0===u&&(u=function(){return!0});var e=function(n,o){return(0,r.isNonEmpty)(o)?(0,g.pipe)(f.head(o),(0,r.chain)((function(t){return e((0,g.pipe)(n,(0,r.append)(t)),f.tail(o))}))):u.apply(void 0,n)?[t.apply(void 0,n)]:r.empty};return e(r.empty,n)},r.concatW=function(n){return function(t){return(0,r.isEmpty)(t)?n:(0,r.isEmpty)(n)?t:t.concat(n)}},r.concat=r.concatW,r.union=d,r.intersection=p,r.difference=s;var l=function(n,t){return(0,g.pipe)(n,(0,r.map)(t))},m=function(n,t){return(0,g.pipe)(n,(0,r.mapWithIndex)(t))},h=function(n,t){return(0,g.pipe)(n,(0,r.ap)(t))},I=function(n,t){return(0,g.pipe)(n,(0,r.chain)(t))},b=function(n,t){return(0,g.pipe)(n,(0,r.filter)(t))},R=function(n,t){return(0,g.pipe)(n,(0,r.filterMap)(t))},U=function(n,t){return(0,g.pipe)(n,(0,r.partition)(t))},j=function(n,t){return(0,g.pipe)(n,(0,r.partitionMap)(t))},k=function(n,t){return(0,g.pipe)(n,(0,r.partitionWithIndex)(t))},q=function(n,t){return(0,g.pipe)(n,(0,r.partitionMapWithIndex)(t))},T=function(n,t){return(0,g.pipe)(n,(0,r.alt)(t))},S=function(n,t,u){return(0,g.pipe)(n,(0,r.reduce)(t,u))},C=function(n){var t=(0,r.foldMap)(n);return function(n,r){return(0,g.pipe)(n,t(r))}},D=function(n,t,u){return(0,g.pipe)(n,(0,r.reduceRight)(t,u))},F=function(n,t,u){return(0,g.pipe)(n,(0,r.reduceWithIndex)(t,u))},H=function(n){var t=(0,r.foldMapWithIndex)(n);return function(n,r){return(0,g.pipe)(n,t(r))}},G=function(n,t,u){return(0,g.pipe)(n,(0,r.reduceRightWithIndex)(t,u))},J=function(n,t){return(0,g.pipe)(n,(0,r.filterMapWithIndex)(t))},$=function(n,t){return(0,g.pipe)(n,(0,r.filterWithIndex)(t))},B=function(n,t){return(0,g.pipe)(n,(0,r.extend)(t))},K=function(n){var t=(0,r.traverse)(n);return function(n,r){return(0,g.pipe)(n,t(r))}},Q=function(n){var t=(0,r.traverseWithIndex)(n);return function(n,r){return(0,g.pipe)(n,t(r))}};r._chainRecDepthFirst=function(n,t){return(0,g.pipe)(n,(0,r.chainRecDepthFirst)(t))},r._chainRecBreadthFirst=function(n,t){return(0,g.pipe)(n,(0,r.chainRecBreadthFirst)(t))},r.of=f.of,r.zero=function(){return r.empty},r.altW=function(n){return function(r){return r.concat(n())}},r.alt=r.altW,r.ap=function(n){return(0,r.chain)((function(t){return(0,g.pipe)(n,(0,r.map)(t))}))},r.chain=function(n){return function(t){return(0,g.pipe)(t,(0,r.chainWithIndex)((function(r,t){return n(t)})))}},r.flatten=(0,r.chain)(g.identity),r.map=function(n){return function(r){return r.map((function(r){return n(r)}))}},r.mapWithIndex=function(n){return function(r){return r.map((function(r,t){return n(t,r)}))}},r.separate=function(n){for(var r=[],t=[],u=0,e=n;u<e.length;u++){var o=e[u];"Left"===o._tag?r.push(o.left):t.push(o.right)}return(0,z.separated)(r,t)},r.filter=function(n){return function(r){return r.filter(n)}},r.filterMapWithIndex=function(n){return function(r){for(var t=[],u=0;u<r.length;u++){var e=n(u,r[u]);i.isSome(e)&&t.push(e.value)}return t}},r.filterMap=function(n){return(0,r.filterMapWithIndex)((function(r,t){return n(t)}))},r.compact=(0,r.filterMap)(g.identity),r.partition=function(n){return(0,r.partitionWithIndex)((function(r,t){return n(t)}))},r.partitionWithIndex=function(n){return function(r){for(var t=[],u=[],e=0;e<r.length;e++){var o=r[e];n(e,o)?u.push(o):t.push(o)}return(0,z.separated)(t,u)}},r.partitionMap=function(n){return(0,r.partitionMapWithIndex)((function(r,t){return n(t)}))},r.partitionMapWithIndex=function(n){return function(r){for(var t=[],u=[],e=0;e<r.length;e++){var o=n(e,r[e]);"Left"===o._tag?t.push(o.left):u.push(o.right)}return(0,z.separated)(t,u)}},r.filterWithIndex=function(n){return function(r){return r.filter((function(r,t){return n(t,r)}))}},r.extend=function(n){return function(r){return r.map((function(t,u){return n(r.slice(u))}))}},r.duplicate=(0,r.extend)(g.identity),r.foldMapWithIndex=function(n){return function(r){return function(t){return t.reduce((function(t,u,e){return n.concat(t,r(e,u))}),n.empty)}}},r.reduce=function(n,t){return(0,r.reduceWithIndex)(n,(function(n,r,u){return t(r,u)}))},r.foldMap=function(n){var t=(0,r.foldMapWithIndex)(n);return function(n){return t((function(r,t){return n(t)}))}},r.reduceWithIndex=function(n,r){return function(t){for(var u=t.length,e=n,o=0;o<u;o++)e=r(o,e,t[o]);return e}},r.reduceRight=function(n,t){return(0,r.reduceRightWithIndex)(n,(function(n,r,u){return t(r,u)}))},r.reduceRightWithIndex=function(n,r){return function(t){return t.reduceRight((function(n,t,u){return r(u,t,n)}),n)}},r.traverse=function(n){var t=(0,r.traverseWithIndex)(n);return function(n){return t((function(r,t){return n(t)}))}},r.sequence=function(n){return function(t){return S(t,n.of((0,r.zero)()),(function(t,u){return n.ap(n.map(t,(function(n){return function(t){return(0,g.pipe)(n,(0,r.append)(t))}})),u)}))}},r.traverseWithIndex=function(n){return function(t){return(0,r.reduceWithIndex)(n.of((0,r.zero)()),(function(u,e,o){return n.ap(n.map(e,(function(n){return function(t){return(0,g.pipe)(n,(0,r.append)(t))}})),t(u,o))}))}},r.wither=function(n){var r=V(n);return function(n){return function(t){return r(t,n)}}},r.wilt=function(n){var r=X(n);return function(n){return function(t){return r(t,n)}}},r.unfold=function(n,r){for(var t=[],u=n;;){var e=r(u);if(!i.isSome(e))break;var o=e.value,c=o[1];t.push(o[0]),u=c}return t},r.URI="ReadonlyArray",r.getShow=function(n){return{show:function(r){return"[".concat(r.map(n.show).join(", "),"]")}}},r.getSemigroup=function(){return{concat:function(n,t){return(0,r.isEmpty)(n)?t:(0,r.isEmpty)(t)?n:n.concat(t)}}},r.getMonoid=function(){return{concat:(0,r.getSemigroup)().concat,empty:r.empty}},r.getEq=function(n){return(0,W.fromEquals)((function(r,t){return r.length===t.length&&r.every((function(r,u){return n.equals(r,t[u])}))}))},r.getOrd=function(n){return(0,E.fromCompare)((function(r,t){for(var u=r.length,e=t.length,o=Math.min(u,e),i=0;i<o;i++){var f=n.compare(r[i],t[i]);if(0!==f)return f}return c.Ord.compare(u,e)}))},r.getUnionSemigroup=function(n){var r=d(n);return{concat:function(n,t){return r(t)(n)}}},r.getUnionMonoid=function(n){return{concat:(0,r.getUnionSemigroup)(n).concat,empty:r.empty}},r.getIntersectionSemigroup=function(n){var r=p(n);return{concat:function(n,t){return r(t)(n)}}},r.getDifferenceMagma=function(n){var r=s(n);return{concat:function(n,t){return r(t)(n)}}},r.Functor={URI:r.URI,map:l},r.flap=(0,_.flap)(r.Functor),r.Pointed={URI:r.URI,of:r.of},r.FunctorWithIndex={URI:r.URI,map:l,mapWithIndex:m},r.Apply={URI:r.URI,map:l,ap:h},r.apFirst=(0,w.apFirst)(r.Apply),r.apSecond=(0,w.apSecond)(r.Apply),r.Applicative={URI:r.URI,map:l,ap:h,of:r.of},r.Chain={URI:r.URI,map:l,ap:h,chain:I},r.Monad={URI:r.URI,map:l,ap:h,of:r.of,chain:I},r.chainFirst=(0,y.chainFirst)(r.Chain),r.Unfoldable={URI:r.URI,unfold:r.unfold},r.Alt={URI:r.URI,map:l,alt:T},r.Zero={URI:r.URI,zero:r.zero},r.guard=(0,N.guard)(r.Zero,r.Pointed),r.Alternative={URI:r.URI,map:l,ap:h,of:r.of,alt:T,zero:r.zero},r.Extend={URI:r.URI,map:l,extend:B},r.Compactable={URI:r.URI,compact:r.compact,separate:r.separate},r.Filterable={URI:r.URI,map:l,compact:r.compact,separate:r.separate,filter:b,filterMap:R,partition:U,partitionMap:j},r.FilterableWithIndex={URI:r.URI,map:l,mapWithIndex:m,compact:r.compact,separate:r.separate,filter:b,filterMap:R,partition:U,partitionMap:j,partitionMapWithIndex:q,partitionWithIndex:k,filterMapWithIndex:J,filterWithIndex:$},r.Foldable={URI:r.URI,reduce:S,foldMap:C,reduceRight:D},r.FoldableWithIndex={URI:r.URI,reduce:S,foldMap:C,reduceRight:D,reduceWithIndex:F,foldMapWithIndex:H,reduceRightWithIndex:G},r.Traversable={URI:r.URI,map:l,reduce:S,foldMap:C,reduceRight:D,traverse:K,sequence:r.sequence},r.TraversableWithIndex={URI:r.URI,map:l,mapWithIndex:m,reduce:S,foldMap:C,reduceRight:D,reduceWithIndex:F,foldMapWithIndex:H,reduceRightWithIndex:G,traverse:K,sequence:r.sequence,traverseWithIndex:Q},r.chainRecDepthFirst=function(n){return function(r){for(var t=o([],n(r),!0),u=[];t.length>0;){var e=t.shift();i.isLeft(e)?t.unshift.apply(t,n(e.left)):u.push(e.right)}return u}},r.ChainRecDepthFirst={URI:r.URI,map:l,ap:h,chain:I,chainRec:r._chainRecDepthFirst},r.chainRecBreadthFirst=function(n){return function(r){var t=n(r),u=[],e=[];function o(r){i.isLeft(r)?n(r.left).forEach((function(n){return u.push(n)})):e.push(r.right)}for(var c=0,f=t;c<f.length;c++)o(f[c]);for(;u.length>0;)o(u.shift());return e}},r.ChainRecBreadthFirst={URI:r.URI,map:l,ap:h,chain:I,chainRec:r._chainRecBreadthFirst};var V=(0,L.witherDefault)(r.Traversable,r.Compactable),X=(0,L.wiltDefault)(r.Traversable,r.Compactable);r.Witherable={URI:r.URI,map:l,compact:r.compact,separate:r.separate,filter:b,filterMap:R,partition:U,partitionMap:j,reduce:S,foldMap:C,reduceRight:D,traverse:K,sequence:r.sequence,wither:V,wilt:X},r.filterE=(0,L.filterE)(r.Witherable),r.FromEither={URI:r.URI,fromEither:r.fromEither},r.fromEitherK=(0,x.fromEitherK)(r.FromEither),r.unsafeInsertAt=f.unsafeInsertAt,r.unsafeUpdateAt=function(n,t,u){return(0,r.isNonEmpty)(u)?f.unsafeUpdateAt(n,t,u):u},r.unsafeDeleteAt=function(n,r){var t=r.slice();return t.splice(n,1),t},r.toArray=function(n){return n.slice()},r.fromArray=function(n){return(0,r.isEmpty)(n)?r.empty:n.slice()},r.empty=f.empty,r.every=function(n){return function(r){return r.every(n)}},r.some=function(n){return function(r){return r.some(n)}},r.exists=r.some,r.intercalate=function(n){var t=f.intercalate(n);return function(u){return(0,r.match)((function(){return n.empty}),t(u))}},r.Do=(0,r.of)(i.emptyRecord),r.bindTo=(0,_.bindTo)(r.Functor),r.bind=(0,y.bind)(r.Chain),r.apS=(0,w.apS)(r.Apply),r.range=f.range,r.cons=f.cons,r.snoc=f.snoc,r.prependToAll=r.prependAll,r.readonlyArray={URI:r.URI,compact:r.compact,separate:r.separate,map:l,ap:h,of:r.of,chain:I,filter:b,filterMap:R,partition:U,partitionMap:j,mapWithIndex:m,partitionMapWithIndex:q,partitionWithIndex:k,filterMapWithIndex:J,filterWithIndex:$,alt:T,zero:r.zero,unfold:r.unfold,reduce:S,foldMap:C,reduceRight:D,traverse:K,sequence:r.sequence,reduceWithIndex:F,foldMapWithIndex:H,reduceRightWithIndex:G,traverseWithIndex:Q,extend:B,wither:V,wilt:X}})),C=j((function(n,r){var t=O&&O.__createBinding||(Object.create?function(n,r,t,u){void 0===u&&(u=t);var e=Object.getOwnPropertyDescriptor(r,t);e&&!("get"in e?!r.__esModule:e.writable||e.configurable)||(e={enumerable:!0,get:function(){return r[t]}}),Object.defineProperty(n,u,e)}:function(n,r,t,u){void 0===u&&(u=t),n[u]=r[t]}),u=O&&O.__setModuleDefault||(Object.create?function(n,r){Object.defineProperty(n,"default",{enumerable:!0,value:r})}:function(n,r){n.default=r}),e=O&&O.__importStar||function(n){if(n&&n.__esModule)return n;var r={};if(null!=n)for(var e in n)"default"!==e&&Object.prototype.hasOwnProperty.call(n,e)&&t(r,n,e);return u(r,n),r};Object.defineProperty(r,"__esModule",{value:!0}),r.lefts=r.rights=r.reverse=r.modifyAt=r.deleteAt=r.updateAt=r.insertAt=r.copy=r.findLastIndex=r.findLastMap=r.findLast=r.findFirstMap=r.findFirst=r.findIndex=r.dropLeftWhile=r.dropRight=r.dropLeft=r.spanLeft=r.takeLeftWhile=r.takeRight=r.takeLeft=r.init=r.tail=r.last=r.head=r.lookup=r.isOutOfBound=r.size=r.scanRight=r.scanLeft=r.chainWithIndex=r.foldRight=r.matchRight=r.matchRightW=r.foldLeft=r.matchLeft=r.matchLeftW=r.match=r.matchW=r.fromEither=r.fromOption=r.fromPredicate=r.replicate=r.makeBy=r.appendW=r.append=r.prependW=r.prepend=r.isNonEmpty=r.isEmpty=void 0,r.traverseWithIndex=r.sequence=r.traverse=r.reduceRightWithIndex=r.reduceRight=r.reduceWithIndex=r.reduce=r.foldMapWithIndex=r.foldMap=r.duplicate=r.extend=r.filterWithIndex=r.alt=r.altW=r.partitionMapWithIndex=r.partitionMap=r.partitionWithIndex=r.partition=r.filter=r.separate=r.compact=r.filterMap=r.filterMapWithIndex=r.mapWithIndex=r.flatten=r.chain=r.ap=r.map=r.zero=r.of=r.difference=r.intersection=r.union=r.concat=r.concatW=r.comprehension=r.fromOptionK=r.chunksOf=r.splitAt=r.chop=r.sortBy=r.uniq=r.elem=r.rotate=r.intersperse=r.prependAll=r.unzip=r.zip=r.zipWith=r.sort=void 0,r.some=r.every=r.unsafeDeleteAt=r.unsafeUpdateAt=r.unsafeInsertAt=r.fromEitherK=r.FromEither=r.filterE=r.ChainRecBreadthFirst=r.chainRecBreadthFirst=r.ChainRecDepthFirst=r.chainRecDepthFirst=r.Witherable=r.TraversableWithIndex=r.Traversable=r.FoldableWithIndex=r.Foldable=r.FilterableWithIndex=r.Filterable=r.Compactable=r.Extend=r.Alternative=r.guard=r.Zero=r.Alt=r.Unfoldable=r.Monad=r.chainFirst=r.Chain=r.Applicative=r.apSecond=r.apFirst=r.Apply=r.FunctorWithIndex=r.Pointed=r.flap=r.Functor=r.getDifferenceMagma=r.getIntersectionSemigroup=r.getUnionMonoid=r.getUnionSemigroup=r.getOrd=r.getEq=r.getMonoid=r.getSemigroup=r.getShow=r.URI=r.unfold=r.wilt=r.wither=void 0,r.array=r.prependToAll=r.snoc=r.cons=r.empty=r.range=r.apS=r.bind=r.bindTo=r.Do=r.intercalate=r.exists=void 0;var o=e(M),i=e(T),c=e(S);r.isEmpty=function(n){return 0===n.length},r.isNonEmpty=i.isNonEmpty,r.prepend=i.prepend,r.prependW=i.prependW,r.append=i.append,r.appendW=i.appendW,r.makeBy=function(n,r){return n<=0?[]:i.makeBy(r)(n)},r.replicate=function(n,t){return(0,r.makeBy)(n,(function(){return t}))},r.fromPredicate=function(n){return function(r){return n(r)?[r]:[]}},r.fromOption=function(n){return o.isNone(n)?[]:[n.value]},r.fromEither=function(n){return o.isLeft(n)?[]:[n.right]},r.matchW=function(n,t){return function(u){return(0,r.isNonEmpty)(u)?t(u):n()}},r.match=r.matchW,r.matchLeftW=function(n,t){return function(u){return(0,r.isNonEmpty)(u)?t(i.head(u),i.tail(u)):n()}},r.matchLeft=r.matchLeftW,r.foldLeft=r.matchLeft,r.matchRightW=function(n,t){return function(u){return(0,r.isNonEmpty)(u)?t(i.init(u),i.last(u)):n()}},r.matchRight=r.matchRightW,r.foldRight=r.matchRight,r.chainWithIndex=function(n){return function(r){for(var t=[],u=0;u<r.length;u++)t.push.apply(t,n(u,r[u]));return t}},r.scanLeft=function(n,r){return function(t){var u=t.length,e=new Array(u+1);e[0]=n;for(var o=0;o<u;o++)e[o+1]=r(e[o],t[o]);return e}},r.scanRight=function(n,r){return function(t){var u=t.length,e=new Array(u+1);e[u]=n;for(var o=u-1;o>=0;o--)e[o]=r(t[o],e[o+1]);return e}},r.size=function(n){return n.length},r.isOutOfBound=i.isOutOfBound,r.lookup=c.lookup,r.head=c.head,r.last=c.last,r.tail=function(n){return(0,r.isNonEmpty)(n)?o.some(i.tail(n)):o.none},r.init=function(n){return(0,r.isNonEmpty)(n)?o.some(i.init(n)):o.none},r.takeLeft=function(n){return function(t){return(0,r.isOutOfBound)(n,t)?(0,r.copy)(t):t.slice(0,n)}},r.takeRight=function(n){return function(t){return(0,r.isOutOfBound)(n,t)?(0,r.copy)(t):0===n?[]:t.slice(-n)}},r.takeLeftWhile=function(n){return function(r){for(var t=[],u=0,e=r;u<e.length;u++){var o=e[u];if(!n(o))break;t.push(o)}return t}};var f=function(n,r){for(var t=n.length,u=0;u<t&&r(n[u]);u++);return u};function a(n){var t=i.union(n);return function(u,e){if(void 0===e){var o=a(n);return function(n){return o(n,u)}}return(0,r.isNonEmpty)(u)&&(0,r.isNonEmpty)(e)?t(e)(u):(0,r.isNonEmpty)(u)?(0,r.copy)(u):(0,r.copy)(e)}}function v(n){var t=(0,r.elem)(n);return function(r,u){if(void 0===u){var e=v(n);return function(n){return e(n,r)}}return r.filter((function(n){return t(n,u)}))}}function d(n){var t=(0,r.elem)(n);return function(r,u){if(void 0===u){var e=d(n);return function(n){return e(n,r)}}return r.filter((function(n){return!t(n,u)}))}}r.spanLeft=function(n){return function(t){var u=(0,r.splitAt)(f(t,n))(t);return{init:u[0],rest:u[1]}}},r.dropLeft=function(n){return function(t){return n<=0||(0,r.isEmpty)(t)?(0,r.copy)(t):n>=t.length?[]:t.slice(n,t.length)}},r.dropRight=function(n){return function(t){return n<=0||(0,r.isEmpty)(t)?(0,r.copy)(t):n>=t.length?[]:t.slice(0,t.length-n)}},r.dropLeftWhile=function(n){return function(r){return r.slice(f(r,n))}},r.findIndex=c.findIndex,r.findFirst=function(n){return c.findFirst(n)},r.findFirstMap=c.findFirstMap,r.findLast=function(n){return c.findLast(n)},r.findLastMap=c.findLastMap,r.findLastIndex=c.findLastIndex,r.copy=function(n){return n.slice()},r.insertAt=function(n,t){return function(u){return n<0||n>u.length?o.none:o.some((0,r.unsafeInsertAt)(n,t,u))}},r.updateAt=function(n,t){return(0,r.modifyAt)(n,(function(){return t}))},r.deleteAt=function(n){return function(t){return(0,r.isOutOfBound)(n,t)?o.none:o.some((0,r.unsafeDeleteAt)(n,t))}},r.modifyAt=function(n,t){return function(u){return(0,r.isOutOfBound)(n,u)?o.none:o.some((0,r.unsafeUpdateAt)(n,t(u[n]),u))}},r.reverse=function(n){return(0,r.isEmpty)(n)?[]:n.slice().reverse()},r.rights=function(n){for(var r=[],t=0;t<n.length;t++){var u=n[t];"Right"===u._tag&&r.push(u.right)}return r},r.lefts=function(n){for(var r=[],t=0;t<n.length;t++){var u=n[t];"Left"===u._tag&&r.push(u.left)}return r},r.sort=function(n){return function(t){return t.length<=1?(0,r.copy)(t):t.slice().sort(n.compare)}},r.zipWith=function(n,r,t){for(var u=[],e=Math.min(n.length,r.length),o=0;o<e;o++)u[o]=t(n[o],r[o]);return u},r.zip=function n(t,u){return void 0===u?function(r){return n(r,t)}:(0,r.zipWith)(t,u,(function(n,r){return[n,r]}))},r.unzip=function(n){for(var r=[],t=[],u=0;u<n.length;u++)r[u]=n[u][0],t[u]=n[u][1];return[r,t]},r.prependAll=function(n){var t=i.prependAll(n);return function(n){return(0,r.isNonEmpty)(n)?t(n):[]}},r.intersperse=function(n){var t=i.intersperse(n);return function(n){return(0,r.isNonEmpty)(n)?t(n):(0,r.copy)(n)}},r.rotate=function(n){var t=i.rotate(n);return function(n){return(0,r.isNonEmpty)(n)?t(n):(0,r.copy)(n)}},r.elem=c.elem,r.uniq=function(n){var t=i.uniq(n);return function(n){return(0,r.isNonEmpty)(n)?t(n):(0,r.copy)(n)}},r.sortBy=function(n){var t=i.sortBy(n);return function(n){return(0,r.isNonEmpty)(n)?t(n):(0,r.copy)(n)}},r.chop=function(n){var t=i.chop(n);return function(n){return(0,r.isNonEmpty)(n)?t(n):[]}},r.splitAt=function(n){return function(t){return n>=1&&(0,r.isNonEmpty)(t)?i.splitAt(n)(t):(0,r.isEmpty)(t)?[(0,r.copy)(t),[]]:[[],(0,r.copy)(t)]}},r.chunksOf=function(n){var t=i.chunksOf(n);return function(n){return(0,r.isNonEmpty)(n)?t(n):[]}},r.fromOptionK=function(n){return function(){for(var t=[],u=0;u<arguments.length;u++)t[u]=arguments[u];return(0,r.fromOption)(n.apply(void 0,t))}},r.comprehension=function(n,t,u){void 0===u&&(u=function(){return!0});var e=function(n,o){return(0,r.isNonEmpty)(o)?(0,g.pipe)(i.head(o),(0,r.chain)((function(t){return e((0,g.pipe)(n,(0,r.append)(t)),i.tail(o))}))):u.apply(void 0,n)?[t.apply(void 0,n)]:[]};return e([],n)},r.concatW=function(n){return function(t){return(0,r.isEmpty)(t)?(0,r.copy)(n):(0,r.isEmpty)(n)?(0,r.copy)(t):t.concat(n)}},r.concat=r.concatW,r.union=a,r.intersection=v,r.difference=d;var p=function(n,t){return(0,g.pipe)(n,(0,r.map)(t))},s=function(n,t){return(0,g.pipe)(n,(0,r.mapWithIndex)(t))},l=function(n,t){return(0,g.pipe)(n,(0,r.ap)(t))},m=function(n,t){return(0,g.pipe)(n,(0,r.chain)(t))},h=function(n,t){return(0,g.pipe)(n,(0,r.filter)(t))},I=function(n,t){return(0,g.pipe)(n,(0,r.filterMap)(t))},b=function(n,t){return(0,g.pipe)(n,(0,r.partition)(t))},R=function(n,t){return(0,g.pipe)(n,(0,r.partitionMap)(t))},U=function(n,t){return(0,g.pipe)(n,(0,r.partitionWithIndex)(t))},j=function(n,t){return(0,g.pipe)(n,(0,r.partitionMapWithIndex)(t))},W=function(n,t){return(0,g.pipe)(n,(0,r.alt)(t))},E=function(n,t,u){return(0,g.pipe)(n,(0,r.reduce)(t,u))},k=function(n){var t=(0,r.foldMap)(n);return function(n,r){return(0,g.pipe)(n,t(r))}},q=function(n,t,u){return(0,g.pipe)(n,(0,r.reduceRight)(t,u))},P=function(n,t,u){return(0,g.pipe)(n,(0,r.reduceWithIndex)(t,u))},A=function(n){var t=(0,r.foldMapWithIndex)(n);return function(n,r){return(0,g.pipe)(n,t(r))}},C=function(n,t,u){return(0,g.pipe)(n,(0,r.reduceRightWithIndex)(t,u))},D=function(n,t){return(0,g.pipe)(n,(0,r.filterMapWithIndex)(t))},F=function(n,t){return(0,g.pipe)(n,(0,r.filterWithIndex)(t))},H=function(n,t){return(0,g.pipe)(n,(0,r.extend)(t))},G=function(n){var t=(0,r.traverse)(n);return function(n,r){return(0,g.pipe)(n,t(r))}},J=function(n){var t=(0,r.traverseWithIndex)(n);return function(n,r){return(0,g.pipe)(n,t(r))}},$=c._chainRecDepthFirst,B=c._chainRecBreadthFirst;r.of=i.of,r.zero=function(){return[]},r.map=function(n){return function(r){return r.map((function(r){return n(r)}))}},r.ap=function(n){return(0,r.chain)((function(t){return(0,g.pipe)(n,(0,r.map)(t))}))},r.chain=function(n){return function(t){return(0,g.pipe)(t,(0,r.chainWithIndex)((function(r,t){return n(t)})))}},r.flatten=(0,r.chain)(g.identity),r.mapWithIndex=function(n){return function(r){return r.map((function(r,t){return n(t,r)}))}},r.filterMapWithIndex=function(n){return function(r){for(var t=[],u=0;u<r.length;u++){var e=n(u,r[u]);o.isSome(e)&&t.push(e.value)}return t}},r.filterMap=function(n){return(0,r.filterMapWithIndex)((function(r,t){return n(t)}))},r.compact=(0,r.filterMap)(g.identity),r.separate=function(n){for(var r=[],t=[],u=0,e=n;u<e.length;u++){var o=e[u];"Left"===o._tag?r.push(o.left):t.push(o.right)}return(0,z.separated)(r,t)},r.filter=function(n){return function(r){return r.filter(n)}},r.partition=function(n){return(0,r.partitionWithIndex)((function(r,t){return n(t)}))},r.partitionWithIndex=function(n){return function(r){for(var t=[],u=[],e=0;e<r.length;e++){var o=r[e];n(e,o)?u.push(o):t.push(o)}return(0,z.separated)(t,u)}},r.partitionMap=function(n){return(0,r.partitionMapWithIndex)((function(r,t){return n(t)}))},r.partitionMapWithIndex=function(n){return function(r){for(var t=[],u=[],e=0;e<r.length;e++){var o=n(e,r[e]);"Left"===o._tag?t.push(o.left):u.push(o.right)}return(0,z.separated)(t,u)}},r.altW=function(n){return function(r){return r.concat(n())}},r.alt=r.altW,r.filterWithIndex=function(n){return function(r){return r.filter((function(r,t){return n(t,r)}))}},r.extend=function(n){return function(r){return r.map((function(t,u){return n(r.slice(u))}))}},r.duplicate=(0,r.extend)(g.identity),r.foldMap=c.foldMap,r.foldMapWithIndex=c.foldMapWithIndex,r.reduce=c.reduce,r.reduceWithIndex=c.reduceWithIndex,r.reduceRight=c.reduceRight,r.reduceRightWithIndex=c.reduceRightWithIndex,r.traverse=function(n){var t=(0,r.traverseWithIndex)(n);return function(n){return t((function(r,t){return n(t)}))}},r.sequence=function(n){return function(t){return E(t,n.of((0,r.zero)()),(function(t,u){return n.ap(n.map(t,(function(n){return function(t){return(0,g.pipe)(n,(0,r.append)(t))}})),u)}))}},r.traverseWithIndex=function(n){return function(t){return(0,r.reduceWithIndex)(n.of((0,r.zero)()),(function(u,e,o){return n.ap(n.map(e,(function(n){return function(t){return(0,g.pipe)(n,(0,r.append)(t))}})),t(u,o))}))}},r.wither=function(n){var r=K(n);return function(n){return function(t){return r(t,n)}}},r.wilt=function(n){var r=Q(n);return function(n){return function(t){return r(t,n)}}},r.unfold=function(n,r){for(var t=[],u=n;;){var e=r(u);if(!o.isSome(e))break;var i=e.value,c=i[1];t.push(i[0]),u=c}return t},r.URI="Array",r.getShow=c.getShow,r.getSemigroup=function(){return{concat:function(n,r){return n.concat(r)}}},r.getMonoid=function(){return{concat:(0,r.getSemigroup)().concat,empty:[]}},r.getEq=c.getEq,r.getOrd=c.getOrd,r.getUnionSemigroup=function(n){var r=a(n);return{concat:function(n,t){return r(t)(n)}}},r.getUnionMonoid=function(n){return{concat:(0,r.getUnionSemigroup)(n).concat,empty:[]}},r.getIntersectionSemigroup=function(n){var r=v(n);return{concat:function(n,t){return r(t)(n)}}},r.getDifferenceMagma=function(n){var r=d(n);return{concat:function(n,t){return r(t)(n)}}},r.Functor={URI:r.URI,map:p},r.flap=(0,_.flap)(r.Functor),r.Pointed={URI:r.URI,of:r.of},r.FunctorWithIndex={URI:r.URI,map:p,mapWithIndex:s},r.Apply={URI:r.URI,map:p,ap:l},r.apFirst=(0,w.apFirst)(r.Apply),r.apSecond=(0,w.apSecond)(r.Apply),r.Applicative={URI:r.URI,map:p,ap:l,of:r.of},r.Chain={URI:r.URI,map:p,ap:l,chain:m},r.chainFirst=(0,y.chainFirst)(r.Chain),r.Monad={URI:r.URI,map:p,ap:l,of:r.of,chain:m},r.Unfoldable={URI:r.URI,unfold:r.unfold},r.Alt={URI:r.URI,map:p,alt:W},r.Zero={URI:r.URI,zero:r.zero},r.guard=(0,N.guard)(r.Zero,r.Pointed),r.Alternative={URI:r.URI,map:p,ap:l,of:r.of,alt:W,zero:r.zero},r.Extend={URI:r.URI,map:p,extend:H},r.Compactable={URI:r.URI,compact:r.compact,separate:r.separate},r.Filterable={URI:r.URI,map:p,compact:r.compact,separate:r.separate,filter:h,filterMap:I,partition:b,partitionMap:R},r.FilterableWithIndex={URI:r.URI,map:p,mapWithIndex:s,compact:r.compact,separate:r.separate,filter:h,filterMap:I,partition:b,partitionMap:R,partitionMapWithIndex:j,partitionWithIndex:U,filterMapWithIndex:D,filterWithIndex:F},r.Foldable={URI:r.URI,reduce:E,foldMap:k,reduceRight:q},r.FoldableWithIndex={URI:r.URI,reduce:E,foldMap:k,reduceRight:q,reduceWithIndex:P,foldMapWithIndex:A,reduceRightWithIndex:C},r.Traversable={URI:r.URI,map:p,reduce:E,foldMap:k,reduceRight:q,traverse:G,sequence:r.sequence},r.TraversableWithIndex={URI:r.URI,map:p,mapWithIndex:s,reduce:E,foldMap:k,reduceRight:q,reduceWithIndex:P,foldMapWithIndex:A,reduceRightWithIndex:C,traverse:G,sequence:r.sequence,traverseWithIndex:J};var K=(0,L.witherDefault)(r.Traversable,r.Compactable),Q=(0,L.wiltDefault)(r.Traversable,r.Compactable);r.Witherable={URI:r.URI,map:p,compact:r.compact,separate:r.separate,filter:h,filterMap:I,partition:b,partitionMap:R,reduce:E,foldMap:k,reduceRight:q,traverse:G,sequence:r.sequence,wither:K,wilt:Q},r.chainRecDepthFirst=c.chainRecDepthFirst,r.ChainRecDepthFirst={URI:r.URI,map:p,ap:l,chain:m,chainRec:$},r.chainRecBreadthFirst=c.chainRecBreadthFirst,r.ChainRecBreadthFirst={URI:r.URI,map:p,ap:l,chain:m,chainRec:B},r.filterE=(0,L.filterE)(r.Witherable),r.FromEither={URI:r.URI,fromEither:r.fromEither},r.fromEitherK=(0,x.fromEitherK)(r.FromEither),r.unsafeInsertAt=i.unsafeInsertAt,r.unsafeUpdateAt=function(n,t,u){return(0,r.isNonEmpty)(u)?i.unsafeUpdateAt(n,t,u):[]},r.unsafeDeleteAt=function(n,r){var t=r.slice();return t.splice(n,1),t},r.every=c.every,r.some=function(n){return function(r){return r.some(n)}},r.exists=r.some,r.intercalate=c.intercalate,r.Do=(0,r.of)(o.emptyRecord),r.bindTo=(0,_.bindTo)(r.Functor),r.bind=(0,y.bind)(r.Chain),r.apS=(0,w.apS)(r.Apply),r.range=i.range,r.empty=[],r.cons=i.cons,r.snoc=i.snoc,r.prependToAll=r.prependAll,r.array={URI:r.URI,compact:r.compact,separate:r.separate,map:p,ap:l,of:r.of,chain:m,filter:h,filterMap:I,partition:b,partitionMap:R,mapWithIndex:s,partitionMapWithIndex:j,partitionWithIndex:U,filterMapWithIndex:D,filterWithIndex:F,alt:W,zero:r.zero,unfold:r.unfold,reduce:E,foldMap:k,reduceRight:q,traverse:G,sequence:r.sequence,reduceWithIndex:P,foldMapWithIndex:A,reduceRightWithIndex:C,traverseWithIndex:J,extend:H,wither:K,wilt:Q}})),D=j((function(n,r){Object.defineProperty(r,"__esModule",{value:!0}),r.getApplicativeComposition=r.getApplicativeMonoid=void 0,r.getApplicativeMonoid=function(n){var r=(0,w.getApplySemigroup)(n);return function(t){return{concat:r(t).concat,empty:n.of(t.empty)}}},r.getApplicativeComposition=function(n,r){var t=(0,_.getFunctorComposition)(n,r).map,u=(0,w.ap)(n,r);return{map:t,of:function(t){return n.of(r.of(t))},ap:function(n,r){return(0,g.pipe)(n,u(r))}}}})),F=j((function(n,r){Object.defineProperty(r,"__esModule",{value:!0}),r.and=r.or=r.not=r.Contravariant=r.getMonoidAll=r.getSemigroupAll=r.getMonoidAny=r.getSemigroupAny=r.URI=r.contramap=void 0,r.contramap=function(n){return function(r){return(0,g.flow)(n,r)}},r.URI="Predicate",r.getSemigroupAny=function(){return{concat:function(n,t){return(0,g.pipe)(n,(0,r.or)(t))}}},r.getMonoidAny=function(){return{concat:(0,r.getSemigroupAny)().concat,empty:g.constFalse}},r.getSemigroupAll=function(){return{concat:function(n,t){return(0,g.pipe)(n,(0,r.and)(t))}}},r.getMonoidAll=function(){return{concat:(0,r.getSemigroupAll)().concat,empty:g.constTrue}},r.Contravariant={URI:r.URI,contramap:function(n,t){return(0,g.pipe)(n,(0,r.contramap)(t))}},r.not=function(n){return function(r){return!n(r)}},r.or=function(n){return function(r){return function(t){return r(t)||n(t)}}},r.and=function(n){return function(r){return function(t){return r(t)&&n(t)}}}})),H=j((function(n,r){var t=O&&O.__createBinding||(Object.create?function(n,r,t,u){void 0===u&&(u=t);var e=Object.getOwnPropertyDescriptor(r,t);e&&!("get"in e?!r.__esModule:e.writable||e.configurable)||(e={enumerable:!0,get:function(){return r[t]}}),Object.defineProperty(n,u,e)}:function(n,r,t,u){void 0===u&&(u=t),n[u]=r[t]}),u=O&&O.__setModuleDefault||(Object.create?function(n,r){Object.defineProperty(n,"default",{enumerable:!0,value:r})}:function(n,r){n.default=r}),e=O&&O.__importStar||function(n){if(n&&n.__esModule)return n;var r={};if(null!=n)for(var e in n)"default"!==e&&Object.prototype.hasOwnProperty.call(n,e)&&t(r,n,e);return u(r,n),r};Object.defineProperty(r,"__esModule",{value:!0}),r.fromEither=r.MonadThrow=r.throwError=r.Witherable=r.wilt=r.wither=r.Traversable=r.sequence=r.traverse=r.Filterable=r.partitionMap=r.partition=r.filterMap=r.filter=r.Compactable=r.separate=r.compact=r.Extend=r.extend=r.Alternative=r.guard=r.Zero=r.zero=r.Alt=r.alt=r.altW=r.Foldable=r.reduceRight=r.foldMap=r.reduce=r.Monad=r.Chain=r.chain=r.Applicative=r.Apply=r.ap=r.Pointed=r.of=r.Functor=r.map=r.getMonoid=r.getOrd=r.getEq=r.getShow=r.URI=r.getRight=r.getLeft=r.fromPredicate=r.some=r.none=void 0,r.getLastMonoid=r.getFirstMonoid=r.getApplyMonoid=r.getApplySemigroup=r.option=r.mapNullable=r.getRefinement=r.sequenceArray=r.traverseArray=r.traverseArrayWithIndex=r.traverseReadonlyArrayWithIndex=r.traverseReadonlyNonEmptyArrayWithIndex=r.ApT=r.apS=r.bind=r.bindTo=r.Do=r.exists=r.elem=r.toUndefined=r.toNullable=r.chainNullableK=r.fromNullableK=r.tryCatchK=r.tryCatch=r.fromNullable=r.chainFirstEitherK=r.chainEitherK=r.fromEitherK=r.duplicate=r.chainFirst=r.flatten=r.apSecond=r.apFirst=r.flap=r.getOrElse=r.getOrElseW=r.fold=r.match=r.foldW=r.matchW=r.isNone=r.isSome=r.FromEither=void 0;var o=e(M);r.none=o.none,r.some=o.some,r.fromPredicate=function(n){return function(t){return n(t)?(0,r.some)(t):r.none}},r.getLeft=function(n){return"Right"===n._tag?r.none:(0,r.some)(n.left)},r.getRight=function(n){return"Left"===n._tag?r.none:(0,r.some)(n.right)};var i=function(n,t){return(0,g.pipe)(n,(0,r.map)(t))},c=function(n,t){return(0,g.pipe)(n,(0,r.ap)(t))},f=function(n,t){return(0,g.pipe)(n,(0,r.chain)(t))},a=function(n,t,u){return(0,g.pipe)(n,(0,r.reduce)(t,u))},v=function(n){var t=(0,r.foldMap)(n);return function(n,r){return(0,g.pipe)(n,t(r))}},d=function(n,t,u){return(0,g.pipe)(n,(0,r.reduceRight)(t,u))},p=function(n){var t=(0,r.traverse)(n);return function(n,r){return(0,g.pipe)(n,t(r))}},s=function(n,t){return(0,g.pipe)(n,(0,r.alt)(t))},l=function(n,t){return(0,g.pipe)(n,(0,r.filter)(t))},m=function(n,t){return(0,g.pipe)(n,(0,r.filterMap)(t))},h=function(n,t){return(0,g.pipe)(n,(0,r.extend)(t))},I=function(n,t){return(0,g.pipe)(n,(0,r.partition)(t))},b=function(n,t){return(0,g.pipe)(n,(0,r.partitionMap)(t))};r.URI="Option",r.getShow=function(n){return{show:function(t){return(0,r.isNone)(t)?"none":"some(".concat(n.show(t.value),")")}}},r.getEq=function(n){return{equals:function(t,u){return t===u||((0,r.isNone)(t)?(0,r.isNone)(u):!(0,r.isNone)(u)&&n.equals(t.value,u.value))}}},r.getOrd=function(n){return{equals:(0,r.getEq)(n).equals,compare:function(t,u){return t===u?0:(0,r.isSome)(t)?(0,r.isSome)(u)?n.compare(t.value,u.value):1:-1}}},r.getMonoid=function(n){return{concat:function(t,u){return(0,r.isNone)(t)?u:(0,r.isNone)(u)?t:(0,r.some)(n.concat(t.value,u.value))},empty:r.none}},r.map=function(n){return function(t){return(0,r.isNone)(t)?r.none:(0,r.some)(n(t.value))}},r.Functor={URI:r.URI,map:i},r.of=r.some,r.Pointed={URI:r.URI,of:r.of},r.ap=function(n){return function(t){return(0,r.isNone)(t)||(0,r.isNone)(n)?r.none:(0,r.some)(t.value(n.value))}},r.Apply={URI:r.URI,map:i,ap:c},r.Applicative={URI:r.URI,map:i,ap:c,of:r.of},r.chain=function(n){return function(t){return(0,r.isNone)(t)?r.none:n(t.value)}},r.Chain={URI:r.URI,map:i,ap:c,chain:f},r.Monad={URI:r.URI,map:i,ap:c,of:r.of,chain:f},r.reduce=function(n,t){return function(u){return(0,r.isNone)(u)?n:t(n,u.value)}},r.foldMap=function(n){return function(t){return function(u){return(0,r.isNone)(u)?n.empty:t(u.value)}}},r.reduceRight=function(n,t){return function(u){return(0,r.isNone)(u)?n:t(u.value,n)}},r.Foldable={URI:r.URI,reduce:a,foldMap:v,reduceRight:d},r.altW=function(n){return function(t){return(0,r.isNone)(t)?n():t}},r.alt=r.altW,r.Alt={URI:r.URI,map:i,alt:s},r.zero=function(){return r.none},r.Zero={URI:r.URI,zero:r.zero},r.guard=(0,N.guard)(r.Zero,r.Pointed),r.Alternative={URI:r.URI,map:i,ap:c,of:r.of,alt:s,zero:r.zero},r.extend=function(n){return function(t){return(0,r.isNone)(t)?r.none:(0,r.some)(n(t))}},r.Extend={URI:r.URI,map:i,extend:h},r.compact=(0,r.chain)(g.identity);var R=(0,z.separated)(r.none,r.none);r.separate=function(n){return(0,r.isNone)(n)?R:(0,z.separated)((0,r.getLeft)(n.value),(0,r.getRight)(n.value))},r.Compactable={URI:r.URI,compact:r.compact,separate:r.separate},r.filter=function(n){return function(t){return(0,r.isNone)(t)?r.none:n(t.value)?t:r.none}},r.filterMap=function(n){return function(t){return(0,r.isNone)(t)?r.none:n(t.value)}},r.partition=function(n){return function(r){return(0,z.separated)(l(r,(0,F.not)(n)),l(r,n))}},r.partitionMap=function(n){return(0,g.flow)((0,r.map)(n),r.separate)},r.Filterable={URI:r.URI,map:i,compact:r.compact,separate:r.separate,filter:l,filterMap:m,partition:I,partitionMap:b},r.traverse=function(n){return function(t){return function(u){return(0,r.isNone)(u)?n.of(r.none):n.map(t(u.value),r.some)}}},r.sequence=function(n){return function(t){return(0,r.isNone)(t)?n.of(r.none):n.map(t.value,r.some)}},r.Traversable={URI:r.URI,map:i,reduce:a,foldMap:v,reduceRight:d,traverse:p,sequence:r.sequence};var U=(0,L.witherDefault)(r.Traversable,r.Compactable),j=(0,L.wiltDefault)(r.Traversable,r.Compactable);r.wither=function(n){var r=U(n);return function(n){return function(t){return r(t,n)}}},r.wilt=function(n){var r=j(n);return function(n){return function(t){return r(t,n)}}},r.Witherable={URI:r.URI,map:i,reduce:a,foldMap:v,reduceRight:d,traverse:p,sequence:r.sequence,compact:r.compact,separate:r.separate,filter:l,filterMap:m,partition:I,partitionMap:b,wither:U,wilt:j},r.throwError=function(){return r.none},r.MonadThrow={URI:r.URI,map:i,ap:c,of:r.of,chain:f,throwError:r.throwError},r.fromEither=r.getRight,r.FromEither={URI:r.URI,fromEither:r.fromEither},r.isSome=o.isSome,r.isNone=function(n){return"None"===n._tag},r.matchW=function(n,t){return function(u){return(0,r.isNone)(u)?n():t(u.value)}},r.foldW=r.matchW,r.match=r.matchW,r.fold=r.match,r.getOrElseW=function(n){return function(t){return(0,r.isNone)(t)?n():t.value}},r.getOrElse=r.getOrElseW,r.flap=(0,_.flap)(r.Functor),r.apFirst=(0,w.apFirst)(r.Apply),r.apSecond=(0,w.apSecond)(r.Apply),r.flatten=r.compact,r.chainFirst=(0,y.chainFirst)(r.Chain),r.duplicate=(0,r.extend)(g.identity),r.fromEitherK=(0,x.fromEitherK)(r.FromEither),r.chainEitherK=(0,x.chainEitherK)(r.FromEither,r.Chain),r.chainFirstEitherK=(0,x.chainFirstEitherK)(r.FromEither,r.Chain),r.fromNullable=function(n){return null==n?r.none:(0,r.some)(n)},r.tryCatch=function(n){try{return(0,r.some)(n())}catch(n){return r.none}},r.tryCatchK=function(n){return function(){for(var t=[],u=0;u<arguments.length;u++)t[u]=arguments[u];return(0,r.tryCatch)((function(){return n.apply(void 0,t)}))}},r.fromNullableK=function(n){return(0,g.flow)(n,r.fromNullable)},r.chainNullableK=function(n){return function(t){return(0,r.isNone)(t)?r.none:(0,r.fromNullable)(n(t.value))}},r.toNullable=(0,r.match)(g.constNull,g.identity),r.toUndefined=(0,r.match)(g.constUndefined,g.identity),r.elem=function n(t){return function(u,e){if(void 0===e){var o=n(t);return function(n){return o(u,n)}}return!(0,r.isNone)(e)&&t.equals(u,e.value)}},r.exists=function(n){return function(t){return!(0,r.isNone)(t)&&n(t.value)}},r.Do=(0,r.of)(o.emptyRecord),r.bindTo=(0,_.bindTo)(r.Functor),r.bind=(0,y.bind)(r.Chain),r.apS=(0,w.apS)(r.Apply),r.ApT=(0,r.of)(o.emptyReadonlyArray),r.traverseReadonlyNonEmptyArrayWithIndex=function(n){return function(t){var u=n(0,o.head(t));if((0,r.isNone)(u))return r.none;for(var e=[u.value],i=1;i<t.length;i++){var c=n(i,t[i]);if((0,r.isNone)(c))return r.none;e.push(c.value)}return(0,r.some)(e)}},r.traverseReadonlyArrayWithIndex=function(n){var t=(0,r.traverseReadonlyNonEmptyArrayWithIndex)(n);return function(n){return o.isNonEmpty(n)?t(n):r.ApT}},r.traverseArrayWithIndex=r.traverseReadonlyArrayWithIndex,r.traverseArray=function(n){return(0,r.traverseReadonlyArrayWithIndex)((function(r,t){return n(t)}))},r.sequenceArray=(0,r.traverseArray)(g.identity),r.getRefinement=function(n){return function(t){return(0,r.isSome)(n(t))}},r.mapNullable=r.chainNullableK,r.option={URI:r.URI,map:i,of:r.of,ap:c,chain:f,reduce:a,foldMap:v,reduceRight:d,traverse:p,sequence:r.sequence,zero:r.zero,alt:s,extend:h,compact:r.compact,separate:r.separate,filter:l,filterMap:m,partition:I,partitionMap:b,wither:U,wilt:j,throwError:r.throwError},r.getApplySemigroup=(0,w.getApplySemigroup)(r.Apply),r.getApplyMonoid=(0,D.getApplicativeMonoid)(r.Applicative),r.getFirstMonoid=function(){return(0,r.getMonoid)((0,q.first)())},r.getLastMonoid=function(){return(0,r.getMonoid)((0,q.last)())}}));const G=n=>!("isConnected"in n)||n.isConnected,J=(()=>{let n;return(...r)=>{n&&clearTimeout(n),n=setTimeout((()=>{n=0,(n=>{for(let r of n.keys())n.set(r,n.get(r).filter(G))})(...r)}),2e3)}})(),$=(t,u)=>{const e=((n,r=((n,r)=>n!==r))=>{let t=new Map(Object.entries(null!=n?n:{}));const u={dispose:[],get:[],set:[],reset:[]},e=()=>{t=new Map(Object.entries(null!=n?n:{})),u.reset.forEach((n=>n()))},o=n=>(u.get.forEach((r=>r(n))),t.get(n)),i=(n,e)=>{const o=t.get(n);r(e,o,n)&&(t.set(n,e),u.set.forEach((r=>r(n,e,o))))},c="undefined"==typeof Proxy?{}:new Proxy(n,{get:(n,r)=>o(r),ownKeys:()=>Array.from(t.keys()),getOwnPropertyDescriptor:()=>({enumerable:!0,configurable:!0}),has:(n,r)=>t.has(r),set:(n,r,t)=>(i(r,t),!0)}),f=(n,r)=>(u[n].push(r),()=>{((n,r)=>{const t=n.indexOf(r);t>=0&&(n[t]=n[n.length-1],n.length--)})(u[n],r)});return{state:c,get:o,set:i,on:f,onChange:(r,t)=>{const u=f("set",((n,u)=>{n===r&&t(u)})),e=f("reset",(()=>t(n[r])));return()=>{u(),e()}},use:(...n)=>{const r=n.reduce(((n,r)=>(r.set&&n.push(f("set",r.set)),r.get&&n.push(f("get",r.get)),r.reset&&n.push(f("reset",r.reset)),r.dispose&&n.push(f("dispose",r.dispose)),n)),[]);return()=>r.forEach((n=>n()))},dispose:()=>{u.dispose.forEach((n=>n())),e()},reset:e,forceUpdate:n=>{const r=t.get(n);u.set.forEach((t=>t(n,r,r)))}}})(t,u);return e.use((()=>{if("function"!=typeof n)return{};const t=new Map;return{dispose:()=>t.clear(),get:r=>{const u=n();u&&((n,r,t)=>{const u=n.get(r);u?u.includes(t)||u.push(t):n.set(r,[t])})(t,r,u)},set:n=>{const u=t.get(n);u&&t.set(n,u.filter(r)),J(t)},reset:()=>{t.forEach((n=>n.forEach(r))),J(t)}}})()),e},{state:B}=$(Object.assign({fallbackStyles:"",pricePrefix:null,currencySign:null,apiPath:null,token:null,locale:"de-DE"},{trackingEnabled:!0}));function K(n,r,t){return function(u){for(var e=Array(t.length+1),o=0;o<t.length;o++)e[o]=t[o];return e[t.length]=u,0===r?n.apply(null,e):K(n,r-1,e)}}var Q={1:function(n){return[n]},2:function(n){return function(r){return[n,r]}},3:function(n){return function(r){return function(t){return[n,r,t]}}},4:function(n){return function(r){return function(t){return function(u){return[n,r,t,u]}}}},5:function(n){return function(r){return function(t){return function(u){return function(e){return[n,r,t,u,e]}}}}}};function V(n){return t.call(Q,n)||(Q[n]=K(u,n-1,[])),Q[n]}function X(n){return function(){for(var r=[],t=0;t<arguments.length;t++)r[t]=arguments[t];for(var u=r.length,e=V(u),o=n.map(r[0],e),i=1;i<u;i++)o=n.ap(o,r[i]);return o}}function Y(n){return function(r){return function(t){return n.fromEither(e(t)?o(r()):i(t.value))}}}var Z=o,nn=i,rn=function(n,r){return a(n,tn(r))},tn=function(n){return function(r){return fn(r)?r:nn(n(r.right))}},un={URI:"Either",map:rn},en={URI:"Either",map:rn,ap:function(n,r){return a(n,function(n){return function(r){return fn(r)?r:fn(n)?n:nn(r.right(n.right))}}(r))}},on=function(n){return function(r){return fn(r)?Z(n(r.left)):r}},cn=Y({URI:"Either",fromEither:f}),fn=c,an=function(n,r){return function(t){return fn(t)?n(t.left):r(t.right)}},vn=v,dn=d,pn=function(n){return{concat:function(r,t){return sn(r)?t:sn(t)?r:dn(n.concat(r.value,t.value))},empty:vn}},sn=function(n){return"None"===n._tag},ln=function(n){return null==n?vn:dn(n)};function mn(n){return function(r){return n.map(r,nn)}}function hn(n){return function(n,r){return function(t){return function(u){return n.map(u,(function(n){return r.map(n,t)}))}}}(n,un)}function In(n){return function(n,r){return function(t){return function(u){return n.ap(n.map(u,(function(n){return function(t){return r.ap(n,t)}})),t)}}}(n,en)}function bn(n){return function(r){return function(t){return n.chain(t,(function(t){return fn(t)?n.of(t):r(t.right)}))}}}function Rn(n){return function(r){return function(t){return n.map(t,on(r))}}}function Un(n,r){return function(t){var u=s(t,n.fromTask);return function(n){return r.chain(n,u)}}}var On=function(n){return function(){return Promise.resolve().then(n)}},jn=function(n,r){return a(n,Mn(r))},gn=function(n,r){return a(n,wn(r))},Mn=function(n){return function(r){return function(){return Promise.resolve().then(r).then(n)}}},wn=function(n){return function(r){return function(){return Promise.all([Promise.resolve().then(r),Promise.resolve().then(n)]).then((function(n){return(0,n[0])(n[1])}))}}},yn=function(n){return function(){return Promise.resolve(n)}},xn={URI:"Task",map:jn},_n={URI:"Task",map:jn,ap:gn},Wn={URI:"Task",map:jn,of:yn,ap:gn,chain:function(n,r){return a(n,function(n){return function(r){return function(){return Promise.resolve().then(r).then((function(r){return n(r)()}))}}}(r))}},En=mn(xn),kn=s(On,En),qn=En,Pn=yn,Tn=hn(xn),An=Rn(xn),zn=In(_n),Ln=bn(Wn),Nn=Ln,Sn="TaskEither",Cn={URI:Sn,map:function(n,r){return a(n,Tn(r))},ap:function(n,r){return a(n,zn(r))},chain:function(n,r){return a(n,Ln(r))}},Dn=Y({URI:Sn,fromEither:Pn}),Fn=Un({URI:Sn,fromIO:kn,fromTask:qn},Cn),Hn=j((function(n,r){var t=O&&O.__createBinding||(Object.create?function(n,r,t,u){void 0===u&&(u=t);var e=Object.getOwnPropertyDescriptor(r,t);e&&!("get"in e?!r.__esModule:e.writable||e.configurable)||(e={enumerable:!0,get:function(){return r[t]}}),Object.defineProperty(n,u,e)}:function(n,r,t,u){void 0===u&&(u=t),n[u]=r[t]}),u=O&&O.__setModuleDefault||(Object.create?function(n,r){Object.defineProperty(n,"default",{enumerable:!0,value:r})}:function(n,r){n.default=r}),e=O&&O.__importStar||function(n){if(n&&n.__esModule)return n;var r={};if(null!=n)for(var e in n)"default"!==e&&Object.prototype.hasOwnProperty.call(n,e)&&t(r,n,e);return u(r,n),r};Object.defineProperty(r,"__esModule",{value:!0}),r.getCompactableComposition=r.separate=r.compact=void 0;var o=e(z);function i(n,r){return function(t){return n.map(t,r.compact)}}function c(n,r,t){var u=i(n,r),e=(0,_.map)(n,t);return function(n){return o.separated(u((0,g.pipe)(n,e(H.getLeft))),u((0,g.pipe)(n,e(H.getRight))))}}r.compact=i,r.separate=c,r.getCompactableComposition=function(n,r){return{map:(0,_.getFunctorComposition)(n,r).map,compact:i(n,r),separate:c(n,r,r)}}})),Gn=j((function(n,r){Object.defineProperty(r,"__esModule",{value:!0}),r.tailRec=void 0,r.tailRec=function(n,r){for(var t=r(n);"Left"===t._tag;)t=r(t.left);return t.right}})),Jn=j((function(n,r){var t=O&&O.__createBinding||(Object.create?function(n,r,t,u){void 0===u&&(u=t);var e=Object.getOwnPropertyDescriptor(r,t);e&&!("get"in e?!r.__esModule:e.writable||e.configurable)||(e={enumerable:!0,get:function(){return r[t]}}),Object.defineProperty(n,u,e)}:function(n,r,t,u){void 0===u&&(u=t),n[u]=r[t]}),u=O&&O.__setModuleDefault||(Object.create?function(n,r){Object.defineProperty(n,"default",{enumerable:!0,value:r})}:function(n,r){n.default=r}),e=O&&O.__importStar||function(n){if(n&&n.__esModule)return n;var r={};if(null!=n)for(var e in n)"default"!==e&&Object.prototype.hasOwnProperty.call(n,e)&&t(r,n,e);return u(r,n),r};Object.defineProperty(r,"__esModule",{value:!0}),r.fold=r.match=r.foldW=r.matchW=r.isRight=r.isLeft=r.fromOption=r.fromPredicate=r.FromEither=r.MonadThrow=r.throwError=r.ChainRec=r.Extend=r.extend=r.Alt=r.alt=r.altW=r.Bifunctor=r.mapLeft=r.bimap=r.Traversable=r.sequence=r.traverse=r.Foldable=r.reduceRight=r.foldMap=r.reduce=r.Monad=r.Chain=r.chain=r.chainW=r.Applicative=r.Apply=r.ap=r.apW=r.Pointed=r.of=r.Functor=r.map=r.getAltValidation=r.getApplicativeValidation=r.getWitherable=r.getFilterable=r.getCompactable=r.getSemigroup=r.getEq=r.getShow=r.URI=r.right=r.left=void 0,r.getValidation=r.getValidationMonoid=r.getValidationSemigroup=r.getApplyMonoid=r.getApplySemigroup=r.either=r.stringifyJSON=r.parseJSON=r.sequenceArray=r.traverseArray=r.traverseArrayWithIndex=r.traverseReadonlyArrayWithIndex=r.traverseReadonlyNonEmptyArrayWithIndex=r.ApT=r.apSW=r.apS=r.bindW=r.bind=r.bindTo=r.Do=r.exists=r.elem=r.toError=r.toUnion=r.chainNullableK=r.fromNullableK=r.tryCatchK=r.tryCatch=r.fromNullable=r.orElse=r.orElseW=r.swap=r.filterOrElseW=r.filterOrElse=r.chainOptionK=r.fromOptionK=r.duplicate=r.flatten=r.flattenW=r.chainFirstW=r.chainFirst=r.apSecondW=r.apSecond=r.apFirstW=r.apFirst=r.flap=r.getOrElse=r.getOrElseW=void 0;var o=e(M);r.left=o.left,r.right=o.right;var i=function(n,t){return(0,g.pipe)(n,(0,r.map)(t))},c=function(n,t){return(0,g.pipe)(n,(0,r.ap)(t))},f=function(n,t){return(0,g.pipe)(n,(0,r.chain)(t))},a=function(n,t,u){return(0,g.pipe)(n,(0,r.reduce)(t,u))},v=function(n){return function(t,u){var e=(0,r.foldMap)(n);return(0,g.pipe)(t,e(u))}},d=function(n,t,u){return(0,g.pipe)(n,(0,r.reduceRight)(t,u))},p=function(n){var t=(0,r.traverse)(n);return function(n,r){return(0,g.pipe)(n,t(r))}},s=function(n,t,u){return(0,g.pipe)(n,(0,r.bimap)(t,u))},l=function(n,t){return(0,g.pipe)(n,(0,r.mapLeft)(t))},m=function(n,t){return(0,g.pipe)(n,(0,r.alt)(t))},h=function(n,t){return(0,g.pipe)(n,(0,r.extend)(t))},I=function(n,t){return(0,Gn.tailRec)(t(n),(function(n){return(0,r.isLeft)(n)?(0,r.right)((0,r.left)(n.left)):(0,r.isLeft)(n.right)?(0,r.left)(t(n.right.left)):(0,r.right)((0,r.right)(n.right.right))}))};r.URI="Either",r.getShow=function(n,t){return{show:function(u){return(0,r.isLeft)(u)?"left(".concat(n.show(u.left),")"):"right(".concat(t.show(u.right),")")}}},r.getEq=function(n,t){return{equals:function(u,e){return u===e||((0,r.isLeft)(u)?(0,r.isLeft)(e)&&n.equals(u.left,e.left):(0,r.isRight)(e)&&t.equals(u.right,e.right))}}},r.getSemigroup=function(n){return{concat:function(t,u){return(0,r.isLeft)(u)?t:(0,r.isLeft)(t)?u:(0,r.right)(n.concat(t.right,u.right))}}},r.getCompactable=function(n){var t=(0,r.left)(n.empty);return{URI:r.URI,_E:void 0,compact:function(n){return(0,r.isLeft)(n)?n:"None"===n.right._tag?t:(0,r.right)(n.right.value)},separate:function(n){return(0,r.isLeft)(n)?(0,z.separated)(n,n):(0,r.isLeft)(n.right)?(0,z.separated)((0,r.right)(n.right.left),t):(0,z.separated)(t,(0,r.right)(n.right.right))}}},r.getFilterable=function(n){var t=(0,r.left)(n.empty),u=(0,r.getCompactable)(n);return{URI:r.URI,_E:void 0,map:i,compact:u.compact,separate:u.separate,filter:function(n,u){return(0,r.isLeft)(n)||u(n.right)?n:t},filterMap:function(n,u){if((0,r.isLeft)(n))return n;var e=u(n.right);return"None"===e._tag?t:(0,r.right)(e.value)},partition:function(n,u){return(0,r.isLeft)(n)?(0,z.separated)(n,n):u(n.right)?(0,z.separated)(t,(0,r.right)(n.right)):(0,z.separated)((0,r.right)(n.right),t)},partitionMap:function(n,u){if((0,r.isLeft)(n))return(0,z.separated)(n,n);var e=u(n.right);return(0,r.isLeft)(e)?(0,z.separated)((0,r.right)(e.left),t):(0,z.separated)(t,(0,r.right)(e.right))}}},r.getWitherable=function(n){var t=(0,r.getFilterable)(n),u=(0,r.getCompactable)(n);return{URI:r.URI,_E:void 0,map:i,compact:t.compact,separate:t.separate,filter:t.filter,filterMap:t.filterMap,partition:t.partition,partitionMap:t.partitionMap,traverse:p,sequence:r.sequence,reduce:a,foldMap:v,reduceRight:d,wither:(0,L.witherDefault)(r.Traversable,u),wilt:(0,L.wiltDefault)(r.Traversable,u)}},r.getApplicativeValidation=function(n){return{URI:r.URI,_E:void 0,map:i,ap:function(t,u){return(0,r.isLeft)(t)?(0,r.isLeft)(u)?(0,r.left)(n.concat(t.left,u.left)):t:(0,r.isLeft)(u)?u:(0,r.right)(t.right(u.right))},of:r.of}},r.getAltValidation=function(n){return{URI:r.URI,_E:void 0,map:i,alt:function(t,u){if((0,r.isRight)(t))return t;var e=u();return(0,r.isLeft)(e)?(0,r.left)(n.concat(t.left,e.left)):e}}},r.map=function(n){return function(t){return(0,r.isLeft)(t)?t:(0,r.right)(n(t.right))}},r.Functor={URI:r.URI,map:i},r.of=r.right,r.Pointed={URI:r.URI,of:r.of},r.apW=function(n){return function(t){return(0,r.isLeft)(t)?t:(0,r.isLeft)(n)?n:(0,r.right)(t.right(n.right))}},r.ap=r.apW,r.Apply={URI:r.URI,map:i,ap:c},r.Applicative={URI:r.URI,map:i,ap:c,of:r.of},r.chainW=function(n){return function(t){return(0,r.isLeft)(t)?t:n(t.right)}},r.chain=r.chainW,r.Chain={URI:r.URI,map:i,ap:c,chain:f},r.Monad={URI:r.URI,map:i,ap:c,of:r.of,chain:f},r.reduce=function(n,t){return function(u){return(0,r.isLeft)(u)?n:t(n,u.right)}},r.foldMap=function(n){return function(t){return function(u){return(0,r.isLeft)(u)?n.empty:t(u.right)}}},r.reduceRight=function(n,t){return function(u){return(0,r.isLeft)(u)?n:t(u.right,n)}},r.Foldable={URI:r.URI,reduce:a,foldMap:v,reduceRight:d},r.traverse=function(n){return function(t){return function(u){return(0,r.isLeft)(u)?n.of((0,r.left)(u.left)):n.map(t(u.right),r.right)}}},r.sequence=function(n){return function(t){return(0,r.isLeft)(t)?n.of((0,r.left)(t.left)):n.map(t.right,r.right)}},r.Traversable={URI:r.URI,map:i,reduce:a,foldMap:v,reduceRight:d,traverse:p,sequence:r.sequence},r.bimap=function(n,t){return function(u){return(0,r.isLeft)(u)?(0,r.left)(n(u.left)):(0,r.right)(t(u.right))}},r.mapLeft=function(n){return function(t){return(0,r.isLeft)(t)?(0,r.left)(n(t.left)):t}},r.Bifunctor={URI:r.URI,bimap:s,mapLeft:l},r.altW=function(n){return function(t){return(0,r.isLeft)(t)?n():t}},r.alt=r.altW,r.Alt={URI:r.URI,map:i,alt:m},r.extend=function(n){return function(t){return(0,r.isLeft)(t)?t:(0,r.right)(n(t))}},r.Extend={URI:r.URI,map:i,extend:h},r.ChainRec={URI:r.URI,map:i,ap:c,chain:f,chainRec:I},r.throwError=r.left,r.MonadThrow={URI:r.URI,map:i,ap:c,of:r.of,chain:f,throwError:r.throwError},r.FromEither={URI:r.URI,fromEither:g.identity},r.fromPredicate=(0,x.fromPredicate)(r.FromEither),r.fromOption=(0,x.fromOption)(r.FromEither),r.isLeft=o.isLeft,r.isRight=o.isRight,r.matchW=function(n,t){return function(u){return(0,r.isLeft)(u)?n(u.left):t(u.right)}},r.foldW=r.matchW,r.match=r.matchW,r.fold=r.match,r.getOrElseW=function(n){return function(t){return(0,r.isLeft)(t)?n(t.left):t.right}},r.getOrElse=r.getOrElseW,r.flap=(0,_.flap)(r.Functor),r.apFirst=(0,w.apFirst)(r.Apply),r.apFirstW=r.apFirst,r.apSecond=(0,w.apSecond)(r.Apply),r.apSecondW=r.apSecond,r.chainFirst=(0,y.chainFirst)(r.Chain),r.chainFirstW=r.chainFirst,r.flattenW=(0,r.chainW)(g.identity),r.flatten=r.flattenW,r.duplicate=(0,r.extend)(g.identity),r.fromOptionK=(0,x.fromOptionK)(r.FromEither),r.chainOptionK=(0,x.chainOptionK)(r.FromEither,r.Chain),r.filterOrElse=(0,x.filterOrElse)(r.FromEither,r.Chain),r.filterOrElseW=r.filterOrElse,r.swap=function(n){return(0,r.isLeft)(n)?(0,r.right)(n.left):(0,r.left)(n.right)},r.orElseW=function(n){return function(t){return(0,r.isLeft)(t)?n(t.left):t}},r.orElse=r.orElseW,r.fromNullable=function(n){return function(t){return null==t?(0,r.left)(n):(0,r.right)(t)}},r.tryCatch=function(n,t){try{return(0,r.right)(n())}catch(n){return(0,r.left)(t(n))}},r.tryCatchK=function(n,t){return function(){for(var u=[],e=0;e<arguments.length;e++)u[e]=arguments[e];return(0,r.tryCatch)((function(){return n.apply(void 0,u)}),t)}},r.fromNullableK=function(n){var t=(0,r.fromNullable)(n);return function(n){return(0,g.flow)(n,t)}},r.chainNullableK=function(n){var t=(0,r.fromNullableK)(n);return function(n){return(0,r.chain)(t(n))}},r.toUnion=(0,r.foldW)(g.identity,g.identity),r.toError=function(n){return n instanceof Error?n:new Error(String(n))},r.elem=function n(t){return function(u,e){if(void 0===e){var o=n(t);return function(n){return o(u,n)}}return!(0,r.isLeft)(e)&&t.equals(u,e.right)}},r.exists=function(n){return function(t){return!(0,r.isLeft)(t)&&n(t.right)}},r.Do=(0,r.of)(o.emptyRecord),r.bindTo=(0,_.bindTo)(r.Functor),r.bind=(0,y.bind)(r.Chain),r.bindW=r.bind,r.apS=(0,w.apS)(r.Apply),r.apSW=r.apS,r.ApT=(0,r.of)(o.emptyReadonlyArray),r.traverseReadonlyNonEmptyArrayWithIndex=function(n){return function(t){var u=n(0,o.head(t));if((0,r.isLeft)(u))return u;for(var e=[u.right],i=1;i<t.length;i++){var c=n(i,t[i]);if((0,r.isLeft)(c))return c;e.push(c.right)}return(0,r.right)(e)}},r.traverseReadonlyArrayWithIndex=function(n){var t=(0,r.traverseReadonlyNonEmptyArrayWithIndex)(n);return function(n){return o.isNonEmpty(n)?t(n):r.ApT}},r.traverseArrayWithIndex=r.traverseReadonlyArrayWithIndex,r.traverseArray=function(n){return(0,r.traverseReadonlyArrayWithIndex)((function(r,t){return n(t)}))},r.sequenceArray=(0,r.traverseArray)(g.identity),r.parseJSON=function(n,t){return(0,r.tryCatch)((function(){return JSON.parse(n)}),t)},r.stringifyJSON=function(n,t){return(0,r.tryCatch)((function(){var r=JSON.stringify(n);if("string"!=typeof r)throw new Error("Converting unsupported structure to JSON");return r}),t)},r.either={URI:r.URI,map:i,of:r.of,ap:c,chain:f,reduce:a,foldMap:v,reduceRight:d,traverse:p,sequence:r.sequence,bimap:s,mapLeft:l,alt:m,extend:h,chainRec:I,throwError:r.throwError},r.getApplySemigroup=(0,w.getApplySemigroup)(r.Apply),r.getApplyMonoid=(0,D.getApplicativeMonoid)(r.Applicative),r.getValidationSemigroup=function(n,t){return(0,w.getApplySemigroup)((0,r.getApplicativeValidation)(n))(t)},r.getValidationMonoid=function(n,t){return(0,D.getApplicativeMonoid)((0,r.getApplicativeValidation)(n))(t)},r.getValidation=function(n){var t=(0,r.getApplicativeValidation)(n).ap,u=(0,r.getAltValidation)(n).alt;return{URI:r.URI,_E:void 0,map:i,of:r.of,chain:f,bimap:s,mapLeft:l,reduce:a,foldMap:v,reduceRight:d,extend:h,traverse:p,sequence:r.sequence,chainRec:I,throwError:r.throwError,ap:t,alt:u}}})),$n=j((function(n,r){var t=O&&O.__createBinding||(Object.create?function(n,r,t,u){void 0===u&&(u=t);var e=Object.getOwnPropertyDescriptor(r,t);e&&!("get"in e?!r.__esModule:e.writable||e.configurable)||(e={enumerable:!0,get:function(){return r[t]}}),Object.defineProperty(n,u,e)}:function(n,r,t,u){void 0===u&&(u=t),n[u]=r[t]}),u=O&&O.__setModuleDefault||(Object.create?function(n,r){Object.defineProperty(n,"default",{enumerable:!0,value:r})}:function(n,r){n.default=r}),e=O&&O.__importStar||function(n){if(n&&n.__esModule)return n;var r={};if(null!=n)for(var e in n)"default"!==e&&Object.prototype.hasOwnProperty.call(n,e)&&t(r,n,e);return u(r,n),r};Object.defineProperty(r,"__esModule",{value:!0}),r.getEitherM=r.toUnion=r.swap=r.orLeft=r.orElseFirst=r.orElse=r.getOrElse=r.matchE=r.match=r.altValidation=r.mapLeft=r.bimap=r.alt=r.chain=r.ap=r.map=r.chainNullableK=r.fromNullableK=r.fromNullable=r.leftF=r.rightF=r.left=r.right=void 0;var o=e(Jn);function i(n){return(0,g.flow)(o.right,n.of)}function c(n){return(0,g.flow)(o.left,n.of)}function f(n){return function(r){return n.map(r,o.right)}}function a(n){return function(r){return n.map(r,o.left)}}function v(n){return function(r){return(0,g.flow)(o.fromNullable(r),n.of)}}function d(n){var r=v(n);return function(n){var t=r(n);return function(n){return(0,g.flow)(n,t)}}}function p(n){return(0,_.map)(n,o.Functor)}function s(n){return(0,w.ap)(n,o.Apply)}function l(n){return function(r){return function(t){return n.chain(t,(function(t){return o.isLeft(t)?n.of(t):r(t.right)}))}}}function m(n){return function(r){return function(t){return n.chain(t,(function(t){return o.isLeft(t)?r():n.of(t)}))}}}function h(n){return function(r,t){return function(u){return n.map(u,o.bimap(r,t))}}}function I(n){return function(r){return function(t){return n.map(t,o.mapLeft(r))}}}function b(n){return function(r,t){return function(u){return n.chain(u,o.match(r,t))}}}function R(n){return function(r){return function(t){return n.chain(t,o.match(r,n.of))}}}function U(n){return function(r){return function(t){return n.chain(t,(function(t){return o.isLeft(t)?r(t.left):n.of(t)}))}}}function j(n){return function(r){return n.map(r,o.swap)}}r.right=i,r.left=c,r.rightF=f,r.leftF=a,r.fromNullable=v,r.fromNullableK=d,r.chainNullableK=function(n){var r=l(n),t=d(n);return function(n){var u=t(n);return function(n){return r(u(n))}}},r.map=p,r.ap=s,r.chain=l,r.alt=m,r.bimap=h,r.mapLeft=I,r.altValidation=function(n,r){return function(t){return function(u){return n.chain(u,o.match((function(u){return n.map(t(),o.mapLeft((function(n){return r.concat(u,n)})))}),i(n)))}}},r.match=function(n){return function(r,t){return function(u){return n.map(u,o.match(r,t))}}},r.matchE=b,r.getOrElse=R,r.orElse=U,r.orElseFirst=function(n){var r=U(n);return function(t){return r((function(r){return n.map(t(r),(function(n){return o.isLeft(n)?n:o.left(r)}))}))}},r.orLeft=function(n){return function(r){return function(t){return n.chain(t,o.match((function(t){return n.map(r(t),o.left)}),(function(r){return n.of(o.right(r))})))}}},r.swap=j,r.toUnion=function(n){return function(r){return n.map(r,o.toUnion)}},r.getEitherM=function(n){var r=s(n),t=p(n),u=l(n),e=m(n),o=h(n),v=I(n),d=b(n),O=R(n),M=U(n);return{map:function(n,r){return(0,g.pipe)(n,t(r))},ap:function(n,t){return(0,g.pipe)(n,r(t))},of:i(n),chain:function(n,r){return(0,g.pipe)(n,u(r))},alt:function(n,r){return(0,g.pipe)(n,e(r))},bimap:function(n,r,t){return(0,g.pipe)(n,o(r,t))},mapLeft:function(n,r){return(0,g.pipe)(n,v(r))},fold:function(n,r,t){return(0,g.pipe)(n,d(r,t))},getOrElse:function(n,r){return(0,g.pipe)(n,O(r))},orElse:function(n,r){return(0,g.pipe)(n,M(r))},swap:j(n),rightM:f(n),leftM:a(n),left:c(n)}}})),Bn=j((function(n,r){function t(n,r){return function(t){return function(u){return n.map(u,(function(n){return r.filter(n,t)}))}}}function u(n,r){return function(t){return function(u){return n.map(u,(function(n){return r.filterMap(n,t)}))}}}function e(n,r){var u=t(n,r);return function(n){var r=u((0,F.not)(n)),t=u(n);return function(n){return(0,z.separated)(r(n),t(n))}}}function o(n,r){var t=u(n,r);return function(n){return function(r){return(0,z.separated)((0,g.pipe)(r,t((function(r){return(0,H.getLeft)(n(r))}))),(0,g.pipe)(r,t((function(r){return(0,H.getRight)(n(r))}))))}}}Object.defineProperty(r,"__esModule",{value:!0}),r.getFilterableComposition=r.partitionMap=r.partition=r.filterMap=r.filter=void 0,r.filter=t,r.filterMap=u,r.partition=e,r.partitionMap=o,r.getFilterableComposition=function(n,r){var i=(0,_.getFunctorComposition)(n,r).map,c=(0,Hn.compact)(n,r),f=(0,Hn.separate)(n,r,r),a=t(n,r),v=u(n,r),d=e(n,r),p=o(n,r);return{map:i,compact:c,separate:f,filter:function(n,r){return(0,g.pipe)(n,a(r))},filterMap:function(n,r){return(0,g.pipe)(n,v(r))},partition:function(n,r){return(0,g.pipe)(n,d(r))},partitionMap:function(n,r){return(0,g.pipe)(n,p(r))}}}})),Kn=j((function(n,r){Object.defineProperty(r,"__esModule",{value:!0}),r.chainFirstIOK=r.chainIOK=r.fromIOK=void 0,r.fromIOK=function(n){return function(r){return(0,g.flow)(r,n.fromIO)}},r.chainIOK=function(n,r){return function(t){var u=(0,g.flow)(t,n.fromIO);return function(n){return r.chain(n,u)}}},r.chainFirstIOK=function(n,r){var t=(0,y.chainFirst)(r);return function(r){return t((0,g.flow)(r,n.fromIO))}}})),Qn=j((function(n,r){Object.defineProperty(r,"__esModule",{value:!0}),r.chainFirstTaskK=r.chainTaskK=r.fromTaskK=void 0,r.fromTaskK=function(n){return function(r){return(0,g.flow)(r,n.fromTask)}},r.chainTaskK=function(n,r){return function(t){var u=(0,g.flow)(t,n.fromTask);return function(n){return r.chain(n,u)}}},r.chainFirstTaskK=function(n,r){var t=(0,y.chainFirst)(r);return function(r){return t((0,g.flow)(r,n.fromTask))}}})),Vn=j((function(n,r){var t=O&&O.__createBinding||(Object.create?function(n,r,t,u){void 0===u&&(u=t);var e=Object.getOwnPropertyDescriptor(r,t);e&&!("get"in e?!r.__esModule:e.writable||e.configurable)||(e={enumerable:!0,get:function(){return r[t]}}),Object.defineProperty(n,u,e)}:function(n,r,t,u){void 0===u&&(u=t),n[u]=r[t]}),u=O&&O.__setModuleDefault||(Object.create?function(n,r){Object.defineProperty(n,"default",{enumerable:!0,value:r})}:function(n,r){n.default=r}),e=O&&O.__importStar||function(n){if(n&&n.__esModule)return n;var r={};if(null!=n)for(var e in n)"default"!==e&&Object.prototype.hasOwnProperty.call(n,e)&&t(r,n,e);return u(r,n),r};Object.defineProperty(r,"__esModule",{value:!0}),r.getMonoid=r.getSemigroup=r.taskSeq=r.task=r.sequenceSeqArray=r.traverseSeqArray=r.traverseSeqArrayWithIndex=r.sequenceArray=r.traverseArray=r.traverseArrayWithIndex=r.traverseReadonlyArrayWithIndexSeq=r.traverseReadonlyNonEmptyArrayWithIndexSeq=r.traverseReadonlyArrayWithIndex=r.traverseReadonlyNonEmptyArrayWithIndex=r.ApT=r.apS=r.bind=r.bindTo=r.Do=r.never=r.FromTask=r.chainFirstIOK=r.chainIOK=r.fromIOK=r.FromIO=r.chainFirst=r.MonadTask=r.fromTask=r.MonadIO=r.Monad=r.Chain=r.ApplicativeSeq=r.ApplySeq=r.ApplicativePar=r.apSecond=r.apFirst=r.ApplyPar=r.Pointed=r.flap=r.Functor=r.getRaceMonoid=r.URI=r.flatten=r.chain=r.of=r.ap=r.map=r.delay=r.fromIO=void 0;var o=e(M);r.fromIO=function(n){return function(){return Promise.resolve().then(n)}},r.delay=function(n){return function(r){return function(){return new Promise((function(t){setTimeout((function(){Promise.resolve().then(r).then(t)}),n)}))}}};var i=function(n,t){return(0,g.pipe)(n,(0,r.map)(t))},c=function(n,t){return(0,g.pipe)(n,(0,r.ap)(t))},f=function(n,t){return(0,g.pipe)(n,(0,r.chain)((function(n){return(0,g.pipe)(t,(0,r.map)(n))})))},a=function(n,t){return(0,g.pipe)(n,(0,r.chain)(t))};r.map=function(n){return function(r){return function(){return Promise.resolve().then(r).then(n)}}},r.ap=function(n){return function(r){return function(){return Promise.all([Promise.resolve().then(r),Promise.resolve().then(n)]).then((function(n){return(0,n[0])(n[1])}))}}},r.of=function(n){return function(){return Promise.resolve(n)}},r.chain=function(n){return function(r){return function(){return Promise.resolve().then(r).then((function(r){return n(r)()}))}}},r.flatten=(0,r.chain)(g.identity),r.URI="Task",r.getRaceMonoid=function(){return{concat:function(n,r){return function(){return Promise.race([Promise.resolve().then(n),Promise.resolve().then(r)])}},empty:r.never}},r.Functor={URI:r.URI,map:i},r.flap=(0,_.flap)(r.Functor),r.Pointed={URI:r.URI,of:r.of},r.ApplyPar={URI:r.URI,map:i,ap:c},r.apFirst=(0,w.apFirst)(r.ApplyPar),r.apSecond=(0,w.apSecond)(r.ApplyPar),r.ApplicativePar={URI:r.URI,map:i,ap:c,of:r.of},r.ApplySeq={URI:r.URI,map:i,ap:f},r.ApplicativeSeq={URI:r.URI,map:i,ap:f,of:r.of},r.Chain={URI:r.URI,map:i,ap:c,chain:a},r.Monad={URI:r.URI,map:i,of:r.of,ap:c,chain:a},r.MonadIO={URI:r.URI,map:i,of:r.of,ap:c,chain:a,fromIO:r.fromIO},r.fromTask=g.identity,r.MonadTask={URI:r.URI,map:i,of:r.of,ap:c,chain:a,fromIO:r.fromIO,fromTask:r.fromTask},r.chainFirst=(0,y.chainFirst)(r.Chain),r.FromIO={URI:r.URI,fromIO:r.fromIO},r.fromIOK=(0,Kn.fromIOK)(r.FromIO),r.chainIOK=(0,Kn.chainIOK)(r.FromIO,r.Chain),r.chainFirstIOK=(0,Kn.chainFirstIOK)(r.FromIO,r.Chain),r.FromTask={URI:r.URI,fromIO:r.fromIO,fromTask:r.fromTask},r.never=function(){return new Promise((function(){}))},r.Do=(0,r.of)(o.emptyRecord),r.bindTo=(0,_.bindTo)(r.Functor),r.bind=(0,y.bind)(r.Chain),r.apS=(0,w.apS)(r.ApplyPar),r.ApT=(0,r.of)(o.emptyReadonlyArray),r.traverseReadonlyNonEmptyArrayWithIndex=function(n){return function(r){return function(){return Promise.all(r.map((function(r,t){return Promise.resolve().then((function(){return n(t,r)()}))})))}}},r.traverseReadonlyArrayWithIndex=function(n){var t=(0,r.traverseReadonlyNonEmptyArrayWithIndex)(n);return function(n){return o.isNonEmpty(n)?t(n):r.ApT}},r.traverseReadonlyNonEmptyArrayWithIndexSeq=function(n){return function(r){return function(){return o.tail(r).reduce((function(r,t,u){return r.then((function(r){return Promise.resolve().then(n(u+1,t)).then((function(n){return r.push(n),r}))}))}),Promise.resolve().then(n(0,o.head(r))).then(o.singleton))}}},r.traverseReadonlyArrayWithIndexSeq=function(n){var t=(0,r.traverseReadonlyNonEmptyArrayWithIndexSeq)(n);return function(n){return o.isNonEmpty(n)?t(n):r.ApT}},r.traverseArrayWithIndex=r.traverseReadonlyArrayWithIndex,r.traverseArray=function(n){return(0,r.traverseReadonlyArrayWithIndex)((function(r,t){return n(t)}))},r.sequenceArray=(0,r.traverseArray)(g.identity),r.traverseSeqArrayWithIndex=r.traverseReadonlyArrayWithIndexSeq,r.traverseSeqArray=function(n){return(0,r.traverseReadonlyArrayWithIndexSeq)((function(r,t){return n(t)}))},r.sequenceSeqArray=(0,r.traverseSeqArray)(g.identity),r.task={URI:r.URI,map:i,of:r.of,ap:c,chain:a,fromIO:r.fromIO,fromTask:r.fromTask},r.taskSeq={URI:r.URI,map:i,of:r.of,ap:f,chain:a,fromIO:r.fromIO,fromTask:r.fromTask},r.getSemigroup=(0,w.getApplySemigroup)(r.ApplySeq),r.getMonoid=(0,D.getApplicativeMonoid)(r.ApplicativeSeq)})),Xn=j((function(n,r){var t=O&&O.__createBinding||(Object.create?function(n,r,t,u){void 0===u&&(u=t);var e=Object.getOwnPropertyDescriptor(r,t);e&&!("get"in e?!r.__esModule:e.writable||e.configurable)||(e={enumerable:!0,get:function(){return r[t]}}),Object.defineProperty(n,u,e)}:function(n,r,t,u){void 0===u&&(u=t),n[u]=r[t]}),u=O&&O.__setModuleDefault||(Object.create?function(n,r){Object.defineProperty(n,"default",{enumerable:!0,value:r})}:function(n,r){n.default=r}),e=O&&O.__importStar||function(n){if(n&&n.__esModule)return n;var r={};if(null!=n)for(var e in n)"default"!==e&&Object.prototype.hasOwnProperty.call(n,e)&&t(r,n,e);return u(r,n),r},o=O&&O.__awaiter||function(n,r,t,u){return new(t||(t=Promise))((function(e,o){function i(n){try{f(u.next(n))}catch(n){o(n)}}function c(n){try{f(u.throw(n))}catch(n){o(n)}}function f(n){var r;n.done?e(n.value):(r=n.value,r instanceof t?r:new t((function(n){n(r)}))).then(i,c)}f((u=u.apply(n,r||[])).next())}))},i=O&&O.__generator||function(n,r){var t,u,e,o,i={label:0,sent:function(){if(1&e[0])throw e[1];return e[1]},trys:[],ops:[]};return o={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function c(o){return function(c){return function(o){if(t)throw new TypeError("Generator is already executing.");for(;i;)try{if(t=1,u&&(e=2&o[0]?u.return:o[0]?u.throw||((e=u.return)&&e.call(u),0):u.next)&&!(e=e.call(u,o[1])).done)return e;switch(u=0,e&&(o=[2&o[0],e.value]),o[0]){case 0:case 1:e=o;break;case 4:return i.label++,{value:o[1],done:!1};case 5:i.label++,u=o[1],o=[0];continue;case 7:o=i.ops.pop(),i.trys.pop();continue;default:if(!((e=(e=i.trys).length>0&&e[e.length-1])||6!==o[0]&&2!==o[0])){i=0;continue}if(3===o[0]&&(!e||o[1]>e[0]&&o[1]<e[3])){i.label=o[1];break}if(6===o[0]&&i.label<e[1]){i.label=e[1],e=o;break}if(e&&i.label<e[2]){i.label=e[2],i.ops.push(o);break}e[2]&&i.ops.pop(),i.trys.pop();continue}o=r.call(n,i)}catch(n){o=[6,n],u=0}finally{t=e=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,c])}}};Object.defineProperty(r,"__esModule",{value:!0}),r.altW=r.alt=r.flatten=r.flattenW=r.chainW=r.chain=r.apW=r.ap=r.mapLeft=r.bimap=r.map=r.chainIOEitherK=r.chainIOEitherKW=r.fromIOEitherK=r.chainTaskOptionK=r.chainTaskOptionKW=r.fromTaskOptionK=r.swap=r.orLeft=r.orElseFirstTaskK=r.orElseFirstIOK=r.orElseFirstW=r.orElseFirst=r.orElseW=r.orElse=r.chainNullableK=r.fromNullableK=r.fromNullable=r.toUnion=r.tryCatchK=r.tryCatch=r.getOrElseW=r.getOrElse=r.foldW=r.matchEW=r.fold=r.matchE=r.matchW=r.match=r.fromTaskOption=r.fromIOEither=r.fromEither=r.fromTask=r.fromIO=r.leftIO=r.rightIO=r.leftTask=r.rightTask=r.right=r.left=void 0,r.bracketW=r.bracket=r.taskify=r.chainFirstTaskK=r.chainTaskK=r.fromTaskK=r.FromTask=r.chainFirstIOK=r.chainIOK=r.fromIOK=r.FromIO=r.fromEitherK=r.filterOrElseW=r.filterOrElse=r.fromPredicate=r.chainFirstEitherKW=r.chainFirstEitherK=r.chainEitherKW=r.chainEitherK=r.chainOptionK=r.fromOptionK=r.fromOption=r.FromEither=r.Alt=r.Bifunctor=r.chainFirstW=r.chainFirst=r.MonadThrow=r.MonadTask=r.MonadIO=r.Monad=r.Chain=r.ApplicativeSeq=r.ApplySeq=r.ApplicativePar=r.apSecondW=r.apSecond=r.apFirstW=r.apFirst=r.ApplyPar=r.Pointed=r.flap=r.Functor=r.getFilterable=r.getCompactable=r.getAltTaskValidation=r.getApplicativeTaskValidation=r.URI=r.throwError=r.of=void 0,r.getTaskValidation=r.getSemigroup=r.getApplyMonoid=r.getApplySemigroup=r.taskEitherSeq=r.taskEither=r.sequenceSeqArray=r.traverseSeqArray=r.traverseSeqArrayWithIndex=r.sequenceArray=r.traverseArray=r.traverseArrayWithIndex=r.traverseReadonlyArrayWithIndexSeq=r.traverseReadonlyNonEmptyArrayWithIndexSeq=r.traverseReadonlyArrayWithIndex=r.traverseReadonlyNonEmptyArrayWithIndex=r.ApT=r.apSW=r.apS=r.bindW=r.bind=r.bindTo=r.Do=void 0;var c=e(Jn),f=e($n),a=e(M),v=e(Vn);r.left=f.left(v.Pointed),r.right=f.right(v.Pointed),r.rightTask=f.rightF(v.Functor),r.leftTask=f.leftF(v.Functor),r.rightIO=(0,g.flow)(v.fromIO,r.rightTask),r.leftIO=(0,g.flow)(v.fromIO,r.leftTask),r.fromIO=r.rightIO,r.fromTask=r.rightTask,r.fromEither=v.of,r.fromIOEither=v.fromIO,r.fromTaskOption=function(n){return v.map(c.fromOption(n))},r.match=f.match(v.Functor),r.matchW=r.match,r.matchE=f.matchE(v.Monad),r.fold=r.matchE,r.matchEW=r.matchE,r.foldW=r.matchEW,r.getOrElse=f.getOrElse(v.Monad),r.getOrElseW=r.getOrElse,r.tryCatch=function(n,r){return function(){return o(void 0,void 0,void 0,(function(){var t;return i(this,(function(u){switch(u.label){case 0:return u.trys.push([0,2,,3]),[4,n().then(a.right)];case 1:return[2,u.sent()];case 2:return t=u.sent(),[2,a.left(r(t))];case 3:return[2]}}))}))}},r.tryCatchK=function(n,t){return function(){for(var u=[],e=0;e<arguments.length;e++)u[e]=arguments[e];return(0,r.tryCatch)((function(){return n.apply(void 0,u)}),t)}},r.toUnion=f.toUnion(v.Functor),r.fromNullable=f.fromNullable(v.Pointed),r.fromNullableK=f.fromNullableK(v.Pointed),r.chainNullableK=f.chainNullableK(v.Monad),r.orElse=f.orElse(v.Monad),r.orElseW=r.orElse,r.orElseFirst=f.orElseFirst(v.Monad),r.orElseFirstW=r.orElseFirst,r.orElseFirstIOK=function(n){return(0,r.orElseFirst)((0,r.fromIOK)(n))},r.orElseFirstTaskK=function(n){return(0,r.orElseFirst)((0,r.fromTaskK)(n))},r.orLeft=f.orLeft(v.Monad),r.swap=f.swap(v.Functor),r.fromTaskOptionK=function(n){var t=(0,r.fromTaskOption)(n);return function(n){return(0,g.flow)(n,t)}},r.chainTaskOptionKW=function(n){return function(t){return function(u){return(0,g.pipe)(u,(0,r.chain)((0,r.fromTaskOptionK)(n)(t)))}}},r.chainTaskOptionK=r.chainTaskOptionKW,r.fromIOEitherK=function(n){return(0,g.flow)(n,r.fromIOEither)},r.chainIOEitherKW=function(n){return(0,r.chainW)((0,r.fromIOEitherK)(n))},r.chainIOEitherK=r.chainIOEitherKW;var d=function(n,t){return(0,g.pipe)(n,(0,r.map)(t))},p=function(n,t){return(0,g.pipe)(n,(0,r.ap)(t))},s=function(n,t){return(0,g.pipe)(n,(0,r.chain)((function(n){return(0,g.pipe)(t,(0,r.map)(n))})))},l=function(n,t){return(0,g.pipe)(n,(0,r.chain)(t))},m=function(n,t,u){return(0,g.pipe)(n,(0,r.bimap)(t,u))},h=function(n,t){return(0,g.pipe)(n,(0,r.mapLeft)(t))},I=function(n,t){return(0,g.pipe)(n,(0,r.alt)(t))};function b(n,t){var u=(0,w.ap)(n,c.getApplicativeValidation(t));return{URI:r.URI,_E:void 0,map:d,ap:function(n,r){return(0,g.pipe)(n,u(r))},of:r.of}}function R(n){var t=f.altValidation(v.Monad,n);return{URI:r.URI,_E:void 0,map:d,alt:function(n,r){return(0,g.pipe)(n,t(r))}}}r.map=f.map(v.Functor),r.bimap=f.bimap(v.Functor),r.mapLeft=f.mapLeft(v.Functor),r.ap=f.ap(v.ApplyPar),r.apW=r.ap,r.chain=f.chain(v.Monad),r.chainW=r.chain,r.flattenW=(0,r.chainW)(g.identity),r.flatten=r.flattenW,r.alt=f.alt(v.Monad),r.altW=r.alt,r.of=r.right,r.throwError=r.left,r.URI="TaskEither",r.getApplicativeTaskValidation=b,r.getAltTaskValidation=R,r.getCompactable=function(n){var t=c.getCompactable(n);return{URI:r.URI,_E:void 0,compact:(0,Hn.compact)(v.Functor,t),separate:(0,Hn.separate)(v.Functor,t,c.Functor)}},r.getFilterable=function(n){var t=c.getFilterable(n),u=(0,r.getCompactable)(n),e=(0,Bn.filter)(v.Functor,t),o=(0,Bn.filterMap)(v.Functor,t),i=(0,Bn.partition)(v.Functor,t),f=(0,Bn.partitionMap)(v.Functor,t);return{URI:r.URI,_E:void 0,map:d,compact:u.compact,separate:u.separate,filter:function(n,r){return(0,g.pipe)(n,e(r))},filterMap:function(n,r){return(0,g.pipe)(n,o(r))},partition:function(n,r){return(0,g.pipe)(n,i(r))},partitionMap:function(n,r){return(0,g.pipe)(n,f(r))}}},r.Functor={URI:r.URI,map:d},r.flap=(0,_.flap)(r.Functor),r.Pointed={URI:r.URI,of:r.of},r.ApplyPar={URI:r.URI,map:d,ap:p},r.apFirst=(0,w.apFirst)(r.ApplyPar),r.apFirstW=r.apFirst,r.apSecond=(0,w.apSecond)(r.ApplyPar),r.apSecondW=r.apSecond,r.ApplicativePar={URI:r.URI,map:d,ap:p,of:r.of},r.ApplySeq={URI:r.URI,map:d,ap:s},r.ApplicativeSeq={URI:r.URI,map:d,ap:s,of:r.of},r.Chain={URI:r.URI,map:d,ap:p,chain:l},r.Monad={URI:r.URI,map:d,ap:p,chain:l,of:r.of},r.MonadIO={URI:r.URI,map:d,ap:p,chain:l,of:r.of,fromIO:r.fromIO},r.MonadTask={URI:r.URI,map:d,ap:p,chain:l,of:r.of,fromIO:r.fromIO,fromTask:r.fromTask},r.MonadThrow={URI:r.URI,map:d,ap:p,chain:l,of:r.of,throwError:r.throwError},r.chainFirst=(0,y.chainFirst)(r.Chain),r.chainFirstW=r.chainFirst,r.Bifunctor={URI:r.URI,bimap:m,mapLeft:h},r.Alt={URI:r.URI,map:d,alt:I},r.FromEither={URI:r.URI,fromEither:r.fromEither},r.fromOption=(0,x.fromOption)(r.FromEither),r.fromOptionK=(0,x.fromOptionK)(r.FromEither),r.chainOptionK=(0,x.chainOptionK)(r.FromEither,r.Chain),r.chainEitherK=(0,x.chainEitherK)(r.FromEither,r.Chain),r.chainEitherKW=r.chainEitherK,r.chainFirstEitherK=(0,x.chainFirstEitherK)(r.FromEither,r.Chain),r.chainFirstEitherKW=r.chainFirstEitherK,r.fromPredicate=(0,x.fromPredicate)(r.FromEither),r.filterOrElse=(0,x.filterOrElse)(r.FromEither,r.Chain),r.filterOrElseW=r.filterOrElse,r.fromEitherK=(0,x.fromEitherK)(r.FromEither),r.FromIO={URI:r.URI,fromIO:r.fromIO},r.fromIOK=(0,Kn.fromIOK)(r.FromIO),r.chainIOK=(0,Kn.chainIOK)(r.FromIO,r.Chain),r.chainFirstIOK=(0,Kn.chainFirstIOK)(r.FromIO,r.Chain),r.FromTask={URI:r.URI,fromIO:r.fromIO,fromTask:r.fromTask},r.fromTaskK=(0,Qn.fromTaskK)(r.FromTask),r.chainTaskK=(0,Qn.chainTaskK)(r.FromTask,r.Chain),r.chainFirstTaskK=(0,Qn.chainFirstTaskK)(r.FromTask,r.Chain),r.taskify=function(n){return function(){var r=Array.prototype.slice.call(arguments);return function(){return new Promise((function(t){n.apply(null,r.concat((function(n,r){return t(null!=n?a.left(n):a.right(r))})))}))}}},r.bracket=function(n,t,u){return(0,r.bracketW)(n,t,u)},r.bracketW=function(n,t,u){return(0,g.pipe)(n,(0,r.chainW)((function(n){return(0,g.pipe)(t(n),v.chain((function(t){return(0,g.pipe)(u(n,t),(0,r.chainW)((function(){return v.of(t)})))})))})))},r.Do=(0,r.of)(a.emptyRecord),r.bindTo=(0,_.bindTo)(r.Functor),r.bind=(0,y.bind)(r.Chain),r.bindW=r.bind,r.apS=(0,w.apS)(r.ApplyPar),r.apSW=r.apS,r.ApT=(0,r.of)(a.emptyReadonlyArray),r.traverseReadonlyNonEmptyArrayWithIndex=function(n){return(0,g.flow)(v.traverseReadonlyNonEmptyArrayWithIndex(n),v.map(c.traverseReadonlyNonEmptyArrayWithIndex(g.SK)))},r.traverseReadonlyArrayWithIndex=function(n){var t=(0,r.traverseReadonlyNonEmptyArrayWithIndex)(n);return function(n){return a.isNonEmpty(n)?t(n):r.ApT}},r.traverseReadonlyNonEmptyArrayWithIndexSeq=function(n){return function(r){return function(){return a.tail(r).reduce((function(r,t,u){return r.then((function(e){return a.isLeft(e)?r:n(u+1,t)().then((function(n){return a.isLeft(n)?n:(e.right.push(n.right),e)}))}))}),n(0,a.head(r))().then(c.map(a.singleton)))}}},r.traverseReadonlyArrayWithIndexSeq=function(n){var t=(0,r.traverseReadonlyNonEmptyArrayWithIndexSeq)(n);return function(n){return a.isNonEmpty(n)?t(n):r.ApT}},r.traverseArrayWithIndex=r.traverseReadonlyArrayWithIndex,r.traverseArray=function(n){return(0,r.traverseReadonlyArrayWithIndex)((function(r,t){return n(t)}))},r.sequenceArray=(0,r.traverseArray)(g.identity),r.traverseSeqArrayWithIndex=r.traverseReadonlyArrayWithIndexSeq,r.traverseSeqArray=function(n){return(0,r.traverseReadonlyArrayWithIndexSeq)((function(r,t){return n(t)}))},r.sequenceSeqArray=(0,r.traverseSeqArray)(g.identity),r.taskEither={URI:r.URI,bimap:m,mapLeft:h,map:d,of:r.of,ap:p,chain:l,alt:I,fromIO:r.fromIO,fromTask:r.fromTask,throwError:r.throwError},r.taskEitherSeq={URI:r.URI,bimap:m,mapLeft:h,map:d,of:r.of,ap:s,chain:l,alt:I,fromIO:r.fromIO,fromTask:r.fromTask,throwError:r.throwError},r.getApplySemigroup=(0,w.getApplySemigroup)(r.ApplySeq),r.getApplyMonoid=(0,D.getApplicativeMonoid)(r.ApplicativeSeq),r.getSemigroup=function(n){return(0,w.getApplySemigroup)(v.ApplySeq)(c.getSemigroup(n))},r.getTaskValidation=function(n){var t=b(v.ApplicativePar,n),u=R(n);return{URI:r.URI,_E:void 0,map:d,ap:t.ap,of:r.of,chain:l,bimap:m,mapLeft:h,alt:u.alt,fromIO:r.fromIO,fromTask:r.fromTask,throwError:r.throwError}}}));const Yn=n=>({kind:"server",inner:n}),Zn={kind:"client",inner:"Token not exist or empty"},nr={kind:"client",inner:"Api path empty or missing"},rr=pn({concat:function(n,r){return n+r},empty:""}),tr=()=>a(pn(p()).concat(ln(B.apiPath),ln("https://api.vviinn.com")),cn((()=>nr))),ur={concat:(n,r)=>{const t=new Headers;return void 0!==n&&n.forEach(((n,r)=>t.append(r,n))),void 0!==r&&r.forEach(((n,r)=>t.append(r,n))),t}},er=l({method:{concat:(n,r)=>{const t=rr.concat(ln(n),ln(r));return a(t,(u=()=>"GET",function(n){return sn(n)?u():n.value}));var u}},body:m(),headers:ur}),or=n=>({method:n}),ir=nn(or("GET")),cr=nn(or("POST")),fr=n=>n.status>=200&&n.status<300?Xn.right(n):Xn.left(n),ar=er,vr=(n,r)=>([t,u])=>{const e=new URL(n,t),o=ar.concat(u,r);return g.pipe(((n,r={})=>g.pipe(((n,r={method:"GET"})=>Xn.tryCatch((()=>fetch(n,r)),(n=>n)))(n,r),Xn.chain(fr),Xn.chain((n=>function(n){return Xn.fromTask((()=>n.json()))}(n)))))(e.toString(),o),Xn.mapLeft(Yn))},dr=n=>(n=>0===n.length)(n)?Z("entity is empty"):nn(n),pr=n=>{return a(n,("entity not exist",function(n){return null==n?Z("entity not exist"):nn(n)}),(r=dr,function(n){return fn(n)?n:r(n.right)}));var r},sr=n=>new Headers({Authorization:`Bearer ${n}`}),lr=n=>a(n,pr,Jn.mapLeft((()=>Zn))),mr=n=>a(n,lr,Jn.map(sr)),hr=w.sequenceT(Jn.Apply),Ir={equals:(n,r)=>n.class===r.class&&n.score===r.score&&n.rectangle.left===r.rectangle.left&&n.rectangle.top===r.rectangle.top&&n.rectangle.height===r.rectangle.height&&n.rectangle.width===r.rectangle.width},br=n=>g.pipe(hr(tr(),cr),Pn,Nn(vr("search/session",n)));var Rr;!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"}(Rr||(Rr={}));const Ur=n=>{switch(n.type){case"array":return n.value.map(Ur);default:return n.value}},Or=n=>r=>a(hr(tr(),nn(or(n.method))),Pn,Nn(vr(n.href,r))),jr=(n,r)=>{const t=b(n),u=h.concat(t,r);return Object.assign(Object.assign({},u),{width:n.width,height:n.height})},gr=(n,r)=>{switch(r.direction){case I.NorthEast:return((n,r)=>{const t=h.concat(b(n),{x:0,y:r.position.y});return Object.assign(Object.assign({},t),{width:n.width+r.position.x,height:n.height-r.position.y})})(n,r);case I.NorthWest:return((n,r)=>{const t=h.concat(b(n),r.position);return Object.assign(Object.assign({},t),{width:n.width-r.position.x,height:n.height-r.position.y})})(n,r);case I.SouthEast:return((n,r)=>Object.assign(Object.assign({},n),{width:n.width+r.position.x,height:n.height+r.position.y}))(n,r);case I.SouthWest:return((n,r)=>{const t=h.concat(b(n),{x:r.position.x,y:0});return Object.assign(Object.assign({},t),{width:n.width-r.position.x,height:n.height+r.position.y})})(n,r)}},Mr=n=>({x:0,y:0,width:n.width,height:n.height}),wr=n=>Object.assign({x:n.left,y:n.top},n),yr=n=>r=>({x:r.x*n.width,y:r.y*n.height,width:r.width*n.width,height:r.height*n.height}),xr=n=>({x:n.x+.5*n.width,y:n.y+.5*n.height});var _r;!function(n){n.desc="desc",n.eform="eform",n.enabled="enabled",n.etype="etype",n.form="form",n.label="label",n.max="max",n.maxlength="maxlength",n.maxsize="maxsize",n.min="min",n.minlength="minlength",n.minsize="minsize",n.mutable="mutable",n.name="name",n.options="options",n.pattern="pattern",n.placeholder="placeholder",n.required="required",n.secret="secret",n.type="type",n.value="value",n.visible="visible"}(_r||(_r={}));const Wr=(n,r)=>{const t=new URLSearchParams(Object.entries(r));return[`${n.href}?${t.toString()}`,{method:"GET"}]},Er=(n,r)=>[n.href,{body:JSON.stringify(r),method:n.method,headers:new Headers({"Content-Type":"application/ion+json"})}],kr=(n,r={})=>t=>g.pipe(hr(tr(),g.pipe(((n,r)=>g.pipe(((n,r)=>{const t=n.map((n=>n.name)),u=Object.keys(r),e=t.filter((n=>!u.includes(n)));return 0===e.length?nn(r):Z(`Data should contains fields: ${e.join(", ")}`)})(n.value,r),tn((r=>n.rel.includes("query-form")?Wr(n,r):Er(n,r)))))(n,r),on((n=>({kind:"app",inner:n}))))),Pn,Nn((n=>{const r=n[0],[u,e]=n[1];return vr(u,e)([r,t])}))),qr=async n=>new Promise((r=>{const t=new FileReader;t.addEventListener("load",(()=>{r(t.result)})),t.readAsDataURL(n)})),Pr=w.sequenceT(H.Apply);const Tr=["jpg","jpeg","png","webp"],Ar={kind:"client",inner:"File format not supported"},zr=n=>{const r=n.type.split("/")[1],t=(u=t=>t===r?H.some(n):H.none,function(n){for(var r=0;r<n.length;r++){var t=u(n[r]);if(R(t))return t}return v})(Tr);var u;return g.pipe(t,Jn.fromOption((()=>Ar)))},Lr={kind:"app",inner:"File doesnt exist"},Nr=n=>()=>new Promise((r=>{const t=new FileReader,u=new Image;t.onload=n=>{u.src=n.target.result},u.onload=()=>r(u),t.readAsDataURL(n)}));var Sr=j((function(n,r){Object.defineProperty(r,"__esModule",{value:!0}),r.copy=void 0,r.copy=(n,r,t=0,u=0,e=n.width-t,o=n.height-u,i=0,c=0)=>{if(t|=0,u|=0,o|=0,i|=0,c|=0,(e|=0)<=0||o<=0)return;const f=new Uint32Array(n.data.buffer),a=new Uint32Array(r.data.buffer);for(let v=0;v<o;v++){const o=u+v;if(o<0||o>=n.height)continue;const d=c+v;if(!(d<0||d>=r.height))for(let u=0;u<e;u++){const e=t+u;if(e<0||e>=n.width)continue;const c=i+u;c<0||c>=r.width||(a[d*r.width+c]=f[o*n.width+e])}}}})),Cr=j((function(n,r){Object.defineProperty(r,"__esModule",{value:!0}),r.CreateImageFactory=(n=[0,0,0,0],r=4)=>{if(r=Math.floor(r),isNaN(r)||r<1)throw TypeError("channels should be a positive non-zero number");if(!("length"in n)||n.length<r)throw TypeError(`fill should be iterable with at least ${r} members`);const t=(n=new Uint8ClampedArray(n).slice(0,r)).every((n=>0===n));return(u,e,o)=>{if(void 0===u||void 0===e)throw TypeError("Not enough arguments");if(u=Math.floor(u),e=Math.floor(e),isNaN(u)||u<1||isNaN(e)||e<1)throw TypeError("Index or size is negative or greater than the allowed amount");const i=u*e*r;if(void 0===o&&(o=new Uint8ClampedArray(i)),o instanceof Uint8ClampedArray){if(o.length!==i)throw TypeError("Index or size is negative or greater than the allowed amount");if(!t)for(let t=0;t<e;t++)for(let e=0;e<u;e++){const i=(t*u+e)*r;for(let t=0;t<r;t++)o[i+t]=n[t]}return{get width(){return u},get height(){return e},get data(){return o}}}throw TypeError("Expected data to be Uint8ClampedArray or undefined")}},r.createImage=r.CreateImageFactory()})),Dr=j((function(n,r){Object.defineProperty(r,"__esModule",{value:!0}),r.filters=void 0;const t=(n,r)=>{if(n<=-r||n>=r)return 0;if(0==n)return 0;const t=n*Math.PI;return Math.sin(t)/t*Math.sin(t/r)/(t/r)},u=n=>Math.round(16383*n);r.filters=(n,r,e,o,i)=>{const c=i?2:3,f=1/e,a=Math.min(1,e),v=c/a,d=Math.floor(2*(v+1)),p=new Int16Array((d+2)*r);let s=0;for(let e=0;e<r;e++){const i=(e+.5)*f+o,d=Math.max(0,Math.floor(i-v)),l=Math.min(n-1,Math.ceil(i+v)),m=l-d+1,h=new Float32Array(m),I=new Int16Array(m);let b=0,R=0;for(let n=d;n<=l;n++){const r=t((n+.5-i)*a,c);b+=r,h[R]=r,R++}let U=0;for(let n=0;n<h.length;n++){const r=h[n]/b;U+=r,I[n]=u(r)}I[r>>1]+=u(1-U);let O=0;for(;O<I.length&&0===I[O];)O++;let j=I.length-1;for(;j>0&&0===I[j];)j--;const g=j-O+1;p[s++]=d+O,p[s++]=g,p.set(I.subarray(O,j+1),s),s+=g}return p}})),Fr=j((function(n,r){Object.defineProperty(r,"__esModule",{value:!0}),r.convolve=void 0,r.convolve=(n,r,t,u,e,o)=>{let i=0,c=0;for(let f=0;f<u;f++){let a=0;for(let t=0;t<e;t++){let t=i+4*o[a++]|0,e=0,f=0,v=0,d=0;for(let r=o[a++];r>0;r--){const r=o[a++];e=e+r*n[t]|0,f=f+r*n[t+1]|0,v=v+r*n[t+2]|0,d=d+r*n[t+3]|0,t=t+4|0}r[c]=e+8192>>14,r[c+1]=f+8192>>14,r[c+2]=v+8192>>14,r[c+3]=d+8192>>14,c=c+4*u|0}c=4*(f+1)|0,i=(f+1)*t*4|0}}})),Hr=j((function(n,r){Object.defineProperty(r,"__esModule",{value:!0}),r.lanczos2=r.lanczos=void 0;const t=(n,r,t=!1)=>{const u=r.height/n.height,e=Dr.filters(n.width,r.width,r.width/n.width,0,t),o=Dr.filters(n.height,r.height,u,0,t),i=new Uint8ClampedArray(r.width*n.height*4);Fr.convolve(n.data,i,n.width,n.height,r.width,e),Fr.convolve(i,r.data,n.height,r.width,r.height,o)};r.lanczos=(n,r,u=0,e=0,o=n.width-u,i=n.height-e,c=0,f=0,a=r.width-c,v=r.height-f)=>{if(e|=0,i|=0,c|=0,f|=0,a|=0,v|=0,(o|=0)<=0||i<=0||a<=0||v<=0)return;if(0==(u|=0)&&0===e&&o===n.width&&i===n.height&&0===c&&0===f&&a===r.width&&v===r.height)return void t(n,r);const d=Cr.createImage(o,i),p=Cr.createImage(a,v);Sr.copy(n,d,u,e),t(d,p),Sr.copy(p,r,0,0,p.width,p.height,c,f)},r.lanczos2=(n,r,u=0,e=0,o=n.width-u,i=n.height-e,c=0,f=0,a=r.width-c,v=r.height-f)=>{if(e|=0,i|=0,c|=0,f|=0,a|=0,v|=0,(o|=0)<=0||i<=0||a<=0||v<=0)return;if(0==(u|=0)&&0===e&&o===n.width&&i===n.height&&0===c&&0===f&&a===r.width&&v===r.height)return void t(n,r,!0);const d=Cr.createImage(o,i),p=Cr.createImage(a,v);Sr.copy(n,d,u,e),t(d,p,!0),Sr.copy(p,r,0,0,p.width,p.height,c,f)}}));const Gr=n=>({kind:"height",size:n}),Jr=E.contramap((n=>n.size))(A.Ord),$r=C.sort(Jr),Br=C.sort({equals:(n,r)=>n.kind===r.kind,compare:(n,r)=>n.kind===r.kind?0:"width"===n.kind?-1:1}),Kr=n=>r=>{const t=$r(r),u=(n=>{const[r,t]=n;return r.size/t.size})(t),e=Object.assign(Object.assign({},t[0]),{size:n*u}),o=Object.assign(Object.assign({},t[1]),{size:n});return Br([o,e])},Qr=n=>{const{naturalWidth:r,naturalHeight:t}=n;return[(u=r,{kind:"width",size:u}),Gr(t)];var u},Vr=()=>{const n=document.createElement("canvas"),r=n.getContext("2d");return[n,r]},Xr=async n=>{const r=await fetch(n),t=await r.blob();return new File([t],"image",{type:t.type,lastModified:Date.now()})},Yr=n=>()=>new Promise((async r=>{const t=await fetch(n),u=await t.blob();r(new File([u],"image",{type:u.type,lastModified:Date.now()}))})),Zr=(n,r)=>n.naturalWidth>r?((n,r)=>{const t=Kr(n),[u,e]=Vr(),o=Qr(r),[i,c]=t(o).map((n=>n.size)),f=new ImageData(i,c),a=(n=>{const{naturalWidth:r,naturalHeight:t}=n,[u,e]=Vr();return u.width=r,u.height=t,e.drawImage(n,0,0),e.getImageData(0,0,r,t)})(r);return u.width=i,u.height=c,Hr.lanczos(a,f),e.putImageData(f,0,0),u.toDataURL()})(r,n):(n=>{const r=document.createElement("canvas"),{naturalWidth:t,naturalHeight:u}=n,e=r.getContext("2d");return r.width=t,r.height=u,e.drawImage(n,0,0,t,u),r.toDataURL()})(n),nt=n=>a(n,mr,tn((n=>({headers:n})))),{state:rt,onChange:tt}=$({token:void 0,results:[],filters:[],resetCategoryLink:void 0,activeIonLink:void 0,cropperHandlers:[],selectedCropper:void 0,rectangleSearchForm:void 0,detectedObjects:[],detectedObject:void 0,objectDetectionInProgress:!1,imageWidth:500,image:H.none,imageUrl:H.none,imageBounds:H.none,searchArea:H.none,resultsComponents:[],serverError:!1,loading:!1}),ut=async n=>{var r,t;rt.results=n.value,rt.filters=(t=Ur(n.filters),Object.entries(t).map((([n,r])=>({name:n,filters:r})))),rt.rectangleSearchForm=n.searchArea,rt.resetCategoryLink=null===(r=n.links)||void 0===r?void 0:r.clearFilters,rt.loading=!1},et=n=>a(nt(rt.token),Pn,Nn(Or(n))),ot=async()=>{rt.loading=!0,a(Pr(rt.imageBounds,rt.searchArea),H.map((async([n,r])=>{const t=(u=n,n=>({x:n.x/u.width,y:n.y/u.height,width:n.width/u.width,height:n.height/u.height}))(r);var u;const e={width:t.width,height:t.height,left:t.x,top:t.y};return await a(nt(rt.token),Pn,Nn(kr(rt.rectangleSearchForm,e)),Tn(ut))()})))},it=n=>{rt.loading=!0;const r=(n=>{const r=new FormData;return r.append("image",n),r})(n),t=hr(mr(rt.token),nn(r));return a(t,tn((([n,r])=>({headers:n,body:r}))),Pn,Ln(br),Tn((n=>(ut(n),(async n=>{rt.objectDetectionInProgress=!0;const r={kind:"server",inner:"Can not get a link for objects detection"};var t,u,e;await a((t=n,u="detectedObjects",a(t.links,ln,(e=n=>ln(n[u]),function(n){return sn(n)?vn:e(n.value)}))),Dn((()=>r)),Ln(et),Tn((n=>rt.detectedObjects=Ur(n))))(),rt.objectDetectionInProgress=!1})(n),rt.loading=!1,n))),An((n=>(rt.serverError=!0,rt.loading=!1,n))))},ct=rt;tt("activeIonLink",(async n=>{rt.loading=!0;const r=n||rt.resetCategoryLink;await a(nt(rt.token),Pn,Nn(Or(r)),Tn(ut),An((n=>({kind:"network error",inner:n}))))()})),tt("searchArea",(n=>{a(n,H.map((n=>{rt.cropperHandlers=U(n)})))})),tt("serverError",(()=>{rt.loading=!1}));const ft=n=>{ct.image=H.some(n),ct.imageUrl=H.some(n.src)},at=async n=>{const r=(n=>g.pipe(n,H.fromNullable,Jn.fromOption((()=>Lr)),Jn.chain(zr)))(n),t=(500,n=>g.pipe(n,Nr,Vn.map((n=>Zr(n,500))),Vn.chain(Yr)));const u=a(r,Pn,Fn(t)),e=await a(u,Ln(it))();return a(hr(e,r),tn((([n,r])=>(async(n,r)=>{const t={image:await(async n=>({name:n.name,mediaType:n.type,value:await qr(n)}))(r)},u=n.uploadHighResolutionImage;await a(nt(rt.token),Pn,Nn(kr(u,t)))()})(n,r)))),await a(u,Fn(Nr),Tn(ft))(),e};export{en as A,Jn as E,T as N,H as O,q as S,Xn as T,C as _,g as a,ir as b,Nn as c,X as d,O as e,Pn as f,tr as g,j as h,ct as i,Pr as j,jr as k,ot as l,vr as m,wr as n,Ur as o,yr as p,xr as q,Ir as r,B as s,gr as t,Xr as u,at as v,an as w,Mr as x,Qr as y,Kr as z}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as e,h as t,H as n}from"./p-bad1809f.js";let r=class{constructor(t){e(this,t)}render(){return t(n,null,t("slot",{name:"icon"}),t("slot",{name:"title"}),t("slot",{name:"text"}),t("slot",{name:"action"}))}};r.style=":host{background:#F4F4F4;border-radius:8px;display:grid;grid-gap:20px;padding:24px;text-align:center}::slotted(svg){display:grid;align-self:center}::slotted(h4){margin:unset;font-weight:600;font-size:18px;line-height:24px}::slotted(span){font-size:14px;line-height:20px}::slotted(button){-webkit-appearance:none;-moz-appearance:none;appearance:none;border:none;background:transparent;color:var(--color-primary, var(--color-primary-system));font-weight:600;font-size:16px;line-height:20px;cursor:pointer}";export{r as vviinn_error}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as e,h as o,H as t}from"./p-bad1809f.js";import{u as r}from"./p-11f61564.js";let s=class{constructor(o){e(this,o),this.disabled=!1}render(){return o(t,{part:`handle ${r(this.handler.direction)}`,class:{disabled:this.disabled,[r(this.handler.direction)]:!0},style:{"--size":"20px",cursor:r(this.handler.direction)},draggable:!1})}};s.style=":host{--size:20px;background:transparent;border:4px solid white;box-sizing:content-box;display:block;height:var(--size);touch-action:none;position:absolute;width:var(--size);z-index:4;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}:host(.disabled){opacity:0.25}:host(.nw-resize){border-bottom:none;border-right:none;top:0;left:0}:host(.ne-resize){border-left:none;border-bottom:none;right:0;top:0}:host(.sw-resize){border-right:none;border-top:none;left:0;bottom:0}:host(.se-resize){border-left:none;border-top:none;bottom:0;right:0}";export{s as cropper_handler}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r,h as e,H as t}from"./p-bad1809f.js";import{i as o}from"./p-7e2f542c.js";import"./p-11f61564.js";let a=class{constructor(e){r(this,e)}isActive(){return o.loading||o.objectDetectionInProgress}render(){return e(t,{class:{active:this.isActive()}})}};a.style=":host{--preloader-size:24px;--preloader-width:calc(var(--preloader-size) / 6);transform-origin:center;-webkit-animation:rotate 3s linear infinite;animation:rotate 3s linear infinite;border:var(--preloader-width) solid white;border-radius:50%;border-top-color:transparent;display:none;outline:0;width:var(--preloader-size);height:var(--preloader-size);box-sizing:border-box}:host(.active){display:flex}@-webkit-keyframes rotate{from{transform:rotate(-360deg)}to{transform:rotate(360deg)}}@keyframes rotate{from{transform:rotate(-360deg)}to{transform:rotate(360deg)}}";export{a as vviinn_preloader}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{e as t,h as n}from"./p-7e2f542c.js";var e,r=new Uint8Array(16);function i(){if(!e&&!(e="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 e(r)}const o=/^(?:[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 u(t){return"string"==typeof t&&o.test(t)}for(var a=[],c=0;c<256;++c)a.push((c+256).toString(16).substr(1));function f(t,n,e){var r=(t=t||{}).random||(t.rng||i)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,n){e=e||0;for(var o=0;o<16;++o)n[e+o]=r[o];return n}return function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,e=(a[t[n+0]]+a[t[n+1]]+a[t[n+2]]+a[t[n+3]]+"-"+a[t[n+4]]+a[t[n+5]]+"-"+a[t[n+6]]+a[t[n+7]]+"-"+a[t[n+8]]+a[t[n+9]]+"-"+a[t[n+10]]+a[t[n+11]]+a[t[n+12]]+a[t[n+13]]+a[t[n+14]]+a[t[n+15]]).toLowerCase();if(!u(e))throw TypeError("Stringified UUID is invalid");return e}(r)}var s=function(t,n){if(n=n.split(":")[0],!(t=+t))return!1;switch(n){case"http":case"ws":return 80!==t;case"https":case"wss":return 443!==t;case"ftp":return 21!==t;case"gopher":return 70!==t;case"file":return!1}return 0!==t},h=Object.prototype.hasOwnProperty;function l(t){try{return decodeURIComponent(t.replace(/\+/g," "))}catch(t){return null}}function v(t){try{return encodeURIComponent(t)}catch(t){return null}}var d={stringify:function(t,n){n=n||"";var e,r,i=[];for(r in"string"!=typeof n&&(n="?"),t)if(h.call(t,r)){if((e=t[r])||null!=e&&!isNaN(e)||(e=""),r=v(r),e=v(e),null===r||null===e)continue;i.push(r+"="+e)}return i.length?n+i.join("&"):""},parse:function(t){for(var n,e=/([^=?#&]+)=?([^&]*)/g,r={};n=e.exec(t);){var i=l(n[1]),o=l(n[2]);null===i||null===o||i in r||(r[i]=o)}return r}},p=/^[\x00-\x20\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/,m=/[\n\r\t]/g,b=/^[A-Za-z][A-Za-z0-9+-.]*:\/\//,y=/:\d+$/,w=/^([a-z][a-z0-9.+-]*:)?(\/\/)?([\\/]+)?([\S\s]*)/i,g=/^[a-zA-Z]:/;function _(t){return(t||"").toString().replace(p,"")}var j=[["#","hash"],["?","query"],function(t,n){return A(n.protocol)?t.replace(/\\/g,"/"):t},["/","pathname"],["@","auth",1],[NaN,"host",void 0,1,1],[/:(\d*)$/,"port",void 0,1],[NaN,"hostname",void 0,1,1]],O={hash:1,query:1};function E(n){var e;e="undefined"!=typeof window?window:void 0!==t?t:"undefined"!=typeof self?self:{};var r,i={},o=typeof(n=n||e.location||{});if("blob:"===n.protocol)i=new T(unescape(n.pathname),{});else if("string"===o)for(r in i=new T(n,{}),O)delete i[r];else if("object"===o){for(r in n)r in O||(i[r]=n[r]);void 0===i.slashes&&(i.slashes=b.test(n.href))}return i}function A(t){return"file:"===t||"ftp:"===t||"http:"===t||"https:"===t||"ws:"===t||"wss:"===t}function S(t,n){t=(t=_(t)).replace(m,""),n=n||{};var e,r=w.exec(t),i=r[1]?r[1].toLowerCase():"",o=!!r[2],u=!!r[3],a=0;return o?u?(e=r[2]+r[3]+r[4],a=r[2].length+r[3].length):(e=r[2]+r[4],a=r[2].length):u?(e=r[3]+r[4],a=r[3].length):e=r[4],"file:"===i?a>=2&&(e=e.slice(2)):A(i)?e=r[4]:i?o&&(e=e.slice(2)):a>=2&&A(n.protocol)&&(e=r[4]),{protocol:i,slashes:o||A(i),slashesCount:a,rest:e}}function T(t,n,e){if(t=(t=_(t)).replace(m,""),!(this instanceof T))return new T(t,n,e);var r,i,o,u,a,c,f=j.slice(),h=typeof n,l=this,v=0;for("object"!==h&&"string"!==h&&(e=n,n=null),e&&"function"!=typeof e&&(e=d.parse),r=!(i=S(t||"",n=E(n))).protocol&&!i.slashes,l.slashes=i.slashes||r&&n.slashes,l.protocol=i.protocol||n.protocol||"",t=i.rest,("file:"===i.protocol&&(2!==i.slashesCount||g.test(t))||!i.slashes&&(i.protocol||i.slashesCount<2||!A(l.protocol)))&&(f[3]=[/(.*)/,"pathname"]);v<f.length;v++)"function"!=typeof(u=f[v])?(c=u[1],(o=u[0])!=o?l[c]=t:"string"==typeof o?~(a="@"===o?t.lastIndexOf(o):t.indexOf(o))&&("number"==typeof u[2]?(l[c]=t.slice(0,a),t=t.slice(a+u[2])):(l[c]=t.slice(a),t=t.slice(0,a))):(a=o.exec(t))&&(l[c]=a[1],t=t.slice(0,a.index)),l[c]=l[c]||r&&u[3]&&n[c]||"",u[4]&&(l[c]=l[c].toLowerCase())):t=u(t,l);e&&(l.query=e(l.query)),r&&n.slashes&&"/"!==l.pathname.charAt(0)&&(""!==l.pathname||""!==n.pathname)&&(l.pathname=function(t,n){if(""===t)return n;for(var e=(n||"/").split("/").slice(0,-1).concat(t.split("/")),r=e.length,i=e[r-1],o=!1,u=0;r--;)"."===e[r]?e.splice(r,1):".."===e[r]?(e.splice(r,1),u++):u&&(0===r&&(o=!0),e.splice(r,1),u--);return o&&e.unshift(""),"."!==i&&".."!==i||e.push(""),e.join("/")}(l.pathname,n.pathname)),"/"!==l.pathname.charAt(0)&&A(l.protocol)&&(l.pathname="/"+l.pathname),s(l.port,l.protocol)||(l.host=l.hostname,l.port=""),l.username=l.password="",l.auth&&(~(a=l.auth.indexOf(":"))?(l.username=l.auth.slice(0,a),l.username=encodeURIComponent(decodeURIComponent(l.username)),l.password=l.auth.slice(a+1),l.password=encodeURIComponent(decodeURIComponent(l.password))):l.username=encodeURIComponent(decodeURIComponent(l.auth)),l.auth=l.password?l.username+":"+l.password:l.username),l.origin="file:"!==l.protocol&&A(l.protocol)&&l.host?l.protocol+"//"+l.host:"null",l.href=l.toString()}T.prototype={set:function(t,n,e){var r=this;switch(t){case"query":"string"==typeof n&&n.length&&(n=(e||d.parse)(n)),r[t]=n;break;case"port":r[t]=n,s(n,r.protocol)?n&&(r.host=r.hostname+":"+n):(r.host=r.hostname,r[t]="");break;case"hostname":r[t]=n,r.port&&(n+=":"+r.port),r.host=n;break;case"host":r[t]=n,y.test(n)?(n=n.split(":"),r.port=n.pop(),r.hostname=n.join(":")):(r.hostname=n,r.port="");break;case"protocol":r.protocol=n.toLowerCase(),r.slashes=!e;break;case"pathname":case"hash":if(n){var i="pathname"===t?"/":"#";r[t]=n.charAt(0)!==i?i+n:n}else r[t]=n;break;case"username":case"password":r[t]=encodeURIComponent(n);break;case"auth":var o=n.indexOf(":");~o?(r.username=n.slice(0,o),r.username=encodeURIComponent(decodeURIComponent(r.username)),r.password=n.slice(o+1),r.password=encodeURIComponent(decodeURIComponent(r.password))):r.username=encodeURIComponent(decodeURIComponent(n))}for(var u=0;u<j.length;u++){var a=j[u];a[4]&&(r[a[1]]=r[a[1]].toLowerCase())}return r.auth=r.password?r.username+":"+r.password:r.username,r.origin="file:"!==r.protocol&&A(r.protocol)&&r.host?r.protocol+"//"+r.host:"null",r.href=r.toString(),r},toString:function(t){t&&"function"==typeof t||(t=d.stringify);var n,e=this,r=e.host,i=e.protocol;i&&":"!==i.charAt(i.length-1)&&(i+=":");var o=i+(e.protocol&&e.slashes||A(e.protocol)?"//":"");return e.username?(o+=e.username,e.password&&(o+=":"+e.password),o+="@"):e.password?(o+=":"+e.password,o+="@"):"file:"!==e.protocol&&A(e.protocol)&&!r&&"/"!==e.pathname&&(o+="@"),(":"===r[r.length-1]||y.test(e.hostname)&&!e.port)&&(r+=":"),o+=r+e.pathname,(n="object"==typeof e.query?t(e.query):e.query)&&(o+="?"!==n.charAt(0)?"?"+n:n),e.hash&&(o+=e.hash),o}},T.extractProtocol=S,T.location=E,T.trimLeft=_,T.qs=d;var N=T,C=n((function(t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.map=n.mergeMap=n.of=n.from=n.Observable=void 0;var e=function(){function t(t){this.promise=t}return t.prototype.toPromise=function(){return this.promise},t.prototype.pipe=function(n){return new t(this.promise.then(n))},t}();n.Observable=e,n.from=function(t){return new e(t)},n.of=function(t){return new e(Promise.resolve(t))},n.mergeMap=function(t){return function(n){return t(n).toPromise()}},n.map=function(t){return t}})),P="undefined"!=typeof globalThis&&globalThis||"undefined"!=typeof self&&self||void 0!==P&&P,k="URLSearchParams"in P,M="Symbol"in P&&"iterator"in Symbol,R="FileReader"in P&&"Blob"in P&&function(){try{return new Blob,!0}catch(t){return!1}}(),U="FormData"in P,x="ArrayBuffer"in P;if(x)var I=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],F=ArrayBuffer.isView||function(t){return t&&I.indexOf(Object.prototype.toString.call(t))>-1};function D(t){if("string"!=typeof t&&(t=String(t)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(t)||""===t)throw new TypeError('Invalid character in header field name: "'+t+'"');return t.toLowerCase()}function W(t){return"string"!=typeof t&&(t=String(t)),t}function V(t){var n={next:function(){var n=t.shift();return{done:void 0===n,value:n}}};return M&&(n[Symbol.iterator]=function(){return n}),n}function B(t){this.map={},t instanceof B?t.forEach((function(t,n){this.append(n,t)}),this):Array.isArray(t)?t.forEach((function(t){this.append(t[0],t[1])}),this):t&&Object.getOwnPropertyNames(t).forEach((function(n){this.append(n,t[n])}),this)}function q(t){if(t.bodyUsed)return Promise.reject(new TypeError("Already read"));t.bodyUsed=!0}function z(t){return new Promise((function(n,e){t.onload=function(){n(t.result)},t.onerror=function(){e(t.error)}}))}function G(t){var n=new FileReader,e=z(n);return n.readAsArrayBuffer(t),e}function H(t){if(t.slice)return t.slice(0);var n=new Uint8Array(t.byteLength);return n.set(new Uint8Array(t)),n.buffer}function L(){return this.bodyUsed=!1,this._initBody=function(t){var n;this.bodyUsed=this.bodyUsed,this._bodyInit=t,t?"string"==typeof t?this._bodyText=t:R&&Blob.prototype.isPrototypeOf(t)?this._bodyBlob=t:U&&FormData.prototype.isPrototypeOf(t)?this._bodyFormData=t:k&&URLSearchParams.prototype.isPrototypeOf(t)?this._bodyText=t.toString():x&&R&&(n=t)&&DataView.prototype.isPrototypeOf(n)?(this._bodyArrayBuffer=H(t.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):x&&(ArrayBuffer.prototype.isPrototypeOf(t)||F(t))?this._bodyArrayBuffer=H(t):this._bodyText=t=Object.prototype.toString.call(t):this._bodyText="",this.headers.get("content-type")||("string"==typeof t?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):k&&URLSearchParams.prototype.isPrototypeOf(t)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},R&&(this.blob=function(){var t=q(this);if(t)return t;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?q(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(G)}),this.text=function(){var t,n,e,r=q(this);if(r)return r;if(this._bodyBlob)return t=this._bodyBlob,e=z(n=new FileReader),n.readAsText(t),e;if(this._bodyArrayBuffer)return Promise.resolve(function(t){for(var n=new Uint8Array(t),e=new Array(n.length),r=0;r<n.length;r++)e[r]=String.fromCharCode(n[r]);return e.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},U&&(this.formData=function(){return this.text().then(K)}),this.json=function(){return this.text().then(JSON.parse)},this}B.prototype.append=function(t,n){t=D(t),n=W(n);var e=this.map[t];this.map[t]=e?e+", "+n:n},B.prototype.delete=function(t){delete this.map[D(t)]},B.prototype.get=function(t){return t=D(t),this.has(t)?this.map[t]:null},B.prototype.has=function(t){return this.map.hasOwnProperty(D(t))},B.prototype.set=function(t,n){this.map[D(t)]=W(n)},B.prototype.forEach=function(t,n){for(var e in this.map)this.map.hasOwnProperty(e)&&t.call(n,this.map[e],e,this)},B.prototype.keys=function(){var t=[];return this.forEach((function(n,e){t.push(e)})),V(t)},B.prototype.values=function(){var t=[];return this.forEach((function(n){t.push(n)})),V(t)},B.prototype.entries=function(){var t=[];return this.forEach((function(n,e){t.push([e,n])})),V(t)},M&&(B.prototype[Symbol.iterator]=B.prototype.entries);var J=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function $(t,n){if(!(this instanceof $))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');var e,r,i=(n=n||{}).body;if(t instanceof $){if(t.bodyUsed)throw new TypeError("Already read");this.url=t.url,this.credentials=t.credentials,n.headers||(this.headers=new B(t.headers)),this.method=t.method,this.mode=t.mode,this.signal=t.signal,i||null==t._bodyInit||(i=t._bodyInit,t.bodyUsed=!0)}else this.url=String(t);if(this.credentials=n.credentials||this.credentials||"same-origin",!n.headers&&this.headers||(this.headers=new B(n.headers)),this.method=(r=(e=n.method||this.method||"GET").toUpperCase(),J.indexOf(r)>-1?r:e),this.mode=n.mode||this.mode||null,this.signal=n.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&i)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(i),!("GET"!==this.method&&"HEAD"!==this.method||"no-store"!==n.cache&&"no-cache"!==n.cache)){var o=/([?&])_=[^&]*/;o.test(this.url)?this.url=this.url.replace(o,"$1_="+(new Date).getTime()):this.url+=(/\?/.test(this.url)?"&":"?")+"_="+(new Date).getTime()}}function K(t){var n=new FormData;return t.trim().split("&").forEach((function(t){if(t){var e=t.split("="),r=e.shift().replace(/\+/g," "),i=e.join("=").replace(/\+/g," ");n.append(decodeURIComponent(r),decodeURIComponent(i))}})),n}function X(t,n){if(!(this instanceof X))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');n||(n={}),this.type="default",this.status=void 0===n.status?200:n.status,this.ok=this.status>=200&&this.status<300,this.statusText=void 0===n.statusText?"":""+n.statusText,this.headers=new B(n.headers),this.url=n.url||"",this._initBody(t)}$.prototype.clone=function(){return new $(this,{body:this._bodyInit})},L.call($.prototype),L.call(X.prototype),X.prototype.clone=function(){return new X(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new B(this.headers),url:this.url})},X.error=function(){var t=new X(null,{status:0,statusText:""});return t.type="error",t};var Z=[301,302,303,307,308];X.redirect=function(t,n){if(-1===Z.indexOf(n))throw new RangeError("Invalid status code");return new X(null,{status:n,headers:{location:t}})};var Q=P.DOMException;try{new Q}catch(t){(Q=function(t,n){this.message=t,this.name=n;var e=Error(t);this.stack=e.stack}).prototype=Object.create(Error.prototype),Q.prototype.constructor=Q}function Y(t,n){return new Promise((function(e,r){var i=new $(t,n);if(i.signal&&i.signal.aborted)return r(new Q("Aborted","AbortError"));var o=new XMLHttpRequest;function u(){o.abort()}o.onload=function(){var t,n,r={status:o.status,statusText:o.statusText,headers:(t=o.getAllResponseHeaders()||"",n=new B,t.replace(/\r?\n[\t ]+/g," ").split("\r").map((function(t){return 0===t.indexOf("\n")?t.substr(1,t.length):t})).forEach((function(t){var e=t.split(":"),r=e.shift().trim();if(r){var i=e.join(":").trim();n.append(r,i)}})),n)};r.url="responseURL"in o?o.responseURL:r.headers.get("X-Request-URL");var i="response"in o?o.response:o.responseText;setTimeout((function(){e(new X(i,r))}),0)},o.onerror=function(){setTimeout((function(){r(new TypeError("Network request failed"))}),0)},o.ontimeout=function(){setTimeout((function(){r(new TypeError("Network request failed"))}),0)},o.onabort=function(){setTimeout((function(){r(new Q("Aborted","AbortError"))}),0)},o.open(i.method,function(t){try{return""===t&&P.location.href?P.location.href:t}catch(n){return t}}(i.url),!0),"include"===i.credentials?o.withCredentials=!0:"omit"===i.credentials&&(o.withCredentials=!1),"responseType"in o&&(R?o.responseType="blob":x&&i.headers.get("Content-Type")&&-1!==i.headers.get("Content-Type").indexOf("application/octet-stream")&&(o.responseType="arraybuffer")),!n||"object"!=typeof n.headers||n.headers instanceof B?i.headers.forEach((function(t,n){o.setRequestHeader(n,t)})):Object.getOwnPropertyNames(n.headers).forEach((function(t){o.setRequestHeader(t,W(n.headers[t]))})),i.signal&&(i.signal.addEventListener("abort",u),o.onreadystatechange=function(){4===o.readyState&&i.signal.removeEventListener("abort",u)}),o.send(void 0===i._bodyInit?null:i._bodyInit)}))}Y.polyfill=!0,P.fetch||(P.fetch=Y,P.Headers=B,P.Request=$,P.Response=X);var tt=n((function(t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.IsomorphicFetchHttpLibrary=void 0;var e=function(){function t(){}return t.prototype.send=function(t){var n=t.getHttpMethod().toString(),e=t.getBody(),r=fetch(t.getUrl(),{method:n,body:e,headers:t.getHeaders(),credentials:"same-origin"}).then((function(t){var n={};t.headers.forEach((function(t,e){n[e]=t}));var e={text:function(){return t.text()},binary:function(){return t.blob()}};return new nt.ResponseContext(t.status,n,e)}));return(0,C.from)(r)},t}();n.IsomorphicFetchHttpLibrary=e})),nt=n((function(n,e){var r,i,o=t&&t.__extends||(r=function(t,n){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(t,n)},function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function e(){this.constructor=t}r(t,n),t.prototype=null===n?Object.create(n):(e.prototype=n.prototype,new e)}),u=t&&t.__createBinding||(Object.create?function(t,n,e,r){void 0===r&&(r=e);var i=Object.getOwnPropertyDescriptor(n,e);i&&!("get"in i?!n.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return n[e]}}),Object.defineProperty(t,r,i)}:function(t,n,e,r){void 0===r&&(r=e),t[r]=n[e]}),a=t&&t.__exportStar||function(t,n){for(var e in t)"default"===e||Object.prototype.hasOwnProperty.call(n,e)||u(n,t,e)},c=t&&t.__awaiter||function(t,n,e,r){return new(e||(e=Promise))((function(i,o){function u(t){try{c(r.next(t))}catch(t){o(t)}}function a(t){try{c(r.throw(t))}catch(t){o(t)}}function c(t){var n;t.done?i(t.value):(n=t.value,n instanceof e?n:new e((function(t){t(n)}))).then(u,a)}c((r=r.apply(t,n||[])).next())}))},f=t&&t.__generator||function(t,n){var e,r,i,o,u={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(e)throw new TypeError("Generator is already executing.");for(;u;)try{if(e=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return u.label++,{value:o[1],done:!1};case 5:u.label++,r=o[1],o=[0];continue;case 7:o=u.ops.pop(),u.trys.pop();continue;default:if(!((i=(i=u.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){u=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){u.label=o[1];break}if(6===o[0]&&u.label<i[1]){u.label=i[1],i=o;break}if(i&&u.label<i[2]){u.label=i[2],u.ops.push(o);break}i[2]&&u.ops.pop(),u.trys.pop();continue}o=n.call(t,u)}catch(t){o=[6,t],r=0}finally{e=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}};Object.defineProperty(e,"__esModule",{value:!0}),e.wrapHttpLibrary=e.ResponseContext=e.SelfDecodingBody=e.RequestContext=e.HttpException=e.HttpMethod=void 0,a(tt,e),(i=e.HttpMethod||(e.HttpMethod={})).GET="GET",i.HEAD="HEAD",i.POST="POST",i.PUT="PUT",i.DELETE="DELETE",i.CONNECT="CONNECT",i.OPTIONS="OPTIONS",i.TRACE="TRACE",i.PATCH="PATCH";var s=function(t){function n(n){return t.call(this,n)||this}return o(n,t),n}(Error);e.HttpException=s;var h=function(){function t(t,n){this.httpMethod=n,this.headers={},this.body=void 0,this.url=new N(t,!0)}return t.prototype.getUrl=function(){return this.url.toString()},t.prototype.setUrl=function(t){this.url=new N(t,!0)},t.prototype.setBody=function(t){this.body=t},t.prototype.getHttpMethod=function(){return this.httpMethod},t.prototype.getHeaders=function(){return this.headers},t.prototype.getBody=function(){return this.body},t.prototype.setQueryParam=function(t,n){var e=this.url.query;e[t]=n,this.url.set("query",e)},t.prototype.addCookie=function(t,n){this.headers.Cookie||(this.headers.Cookie=""),this.headers.Cookie+=t+"="+n+"; "},t.prototype.setHeaderParam=function(t,n){this.headers[t]=n},t}();e.RequestContext=h;var l=function(){function t(t){this.dataSource=t}return t.prototype.binary=function(){return this.dataSource},t.prototype.text=function(){return c(this,void 0,void 0,(function(){var t;return f(this,(function(n){switch(n.label){case 0:return[4,this.dataSource];case 1:return(t=n.sent()).text?[2,t.text()]:[2,new Promise((function(n,e){var r=new FileReader;r.addEventListener("load",(function(){return n(r.result)})),r.addEventListener("error",(function(){return e(r.error)})),r.readAsText(t)}))]}}))}))},t}();e.SelfDecodingBody=l;var v=function(){function t(t,n,e){this.httpStatusCode=t,this.headers=n,this.body=e}return t.prototype.getParsedHeader=function(t){var n={};if(!this.headers[t])return n;for(var e=0,r=this.headers[t].split(";");e<r.length;e++){var i=r[e].split("=",2),o=i[0],u=i[1];o=o.toLowerCase().trim(),void 0===u?n[""]=o:((u=u.trim()).startsWith('"')&&u.endsWith('"')&&(u=u.substring(1,u.length-1)),n[o]=u)}return n},t.prototype.getBodyAsFile=function(){return c(this,void 0,void 0,(function(){var t,n,e;return f(this,(function(r){switch(r.label){case 0:return[4,this.body.binary()];case 1:t=r.sent(),n=this.getParsedHeader("content-disposition").filename||"",e=this.headers["content-type"]||"";try{return[2,new File([t],n,{type:e})]}catch(r){return[2,Object.assign(t,{name:n,type:e})]}return[2]}}))}))},t.prototype.getBodyAsAny=function(){try{return this.body.text()}catch(t){}try{return this.body.binary()}catch(t){}return Promise.resolve(void 0)},t}();e.ResponseContext=v,e.wrapHttpLibrary=function(t){return{send:function(n){return(0,C.from)(t.send(n))}}}})),et=n((function(n,e){var r=t&&t.__awaiter||function(t,n,e,r){return new(e||(e=Promise))((function(i,o){function u(t){try{c(r.next(t))}catch(t){o(t)}}function a(t){try{c(r.throw(t))}catch(t){o(t)}}function c(t){var n;t.done?i(t.value):(n=t.value,n instanceof e?n:new e((function(t){t(n)}))).then(u,a)}c((r=r.apply(t,n||[])).next())}))},i=t&&t.__generator||function(t,n){var e,r,i,o,u={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(e)throw new TypeError("Generator is already executing.");for(;u;)try{if(e=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return u.label++,{value:o[1],done:!1};case 5:u.label++,r=o[1],o=[0];continue;case 7:o=u.ops.pop(),u.trys.pop();continue;default:if(!((i=(i=u.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){u=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){u.label=o[1];break}if(6===o[0]&&u.label<i[1]){u.label=i[1],i=o;break}if(i&&u.label<i[2]){u.label=i[2],u.ops.push(o);break}i[2]&&u.ops.pop(),u.trys.pop();continue}o=n.call(t,u)}catch(t){o=[6,t],r=0}finally{e=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}};Object.defineProperty(e,"__esModule",{value:!0}),e.configureAuthMethods=e.BearerAuthAuthentication=void 0;var o=function(){function t(t){this.tokenProvider=t}return t.prototype.getName=function(){return"bearerAuth"},t.prototype.applySecurityAuthentication=function(t){return r(this,void 0,void 0,(function(){var n,e,r,o;return i(this,(function(i){switch(i.label){case 0:return e=(n=t).setHeaderParam,r=["Authorization"],o="Bearer ",[4,this.tokenProvider.getToken()];case 1:return e.apply(n,r.concat([o+i.sent()])),[2]}}))}))},t}();e.BearerAuthAuthentication=o,e.configureAuthMethods=function(t){var n={};return t?(n.default=t.default,t.bearerAuth&&(n.bearerAuth=new o(t.bearerAuth.tokenProvider)),n):n}})),rt=n((function(t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.ErrorObject=void 0;var e=function(){function t(){}return t.getAttributeTypeMap=function(){return t.attributeTypeMap},t.discriminator=void 0,t.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:""}],t}();n.ErrorObject=e})),it=n((function(t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.ErrorResponse=void 0;var e=function(){function t(){}return t.getAttributeTypeMap=function(){return t.attributeTypeMap},t.discriminator=void 0,t.attributeTypeMap=[{name:"code",baseName:"code",type:"number",format:""},{name:"message",baseName:"message",type:"string",format:""},{name:"errors",baseName:"errors",type:"Array<ErrorObject>",format:""}],t}();n.ErrorResponse=e})),ot=n((function(t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.Event=void 0;var e=function(){function t(){this.typ="Event"}return t.getAttributeTypeMap=function(){return t.attributeTypeMap},t.discriminator="typ",t.attributeTypeMap=[{name:"session_id",baseName:"session_id",type:"string",format:""},{name:"typ",baseName:"typ",type:"string",format:""}],t}();n.Event=e})),ut=n((function(t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.EventConfirmation=void 0;var e=function(){function t(){}return t.getAttributeTypeMap=function(){return t.attributeTypeMap},t.discriminator=void 0,t.attributeTypeMap=[{name:"status",baseName:"status",type:"EventConfirmationStatusEnum",format:""}],t}();n.EventConfirmation=e})),at=n((function(t,n){Object.defineProperty(n,"__esModule",{value:!0})})),ct=n((function(n,e){var r,i=t&&t.__extends||(r=function(t,n){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(t,n)},function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function e(){this.constructor=t}r(t,n),t.prototype=null===n?Object.create(n):(e.prototype=n.prototype,new e)});Object.defineProperty(e,"__esModule",{value:!0}),e.FilterEvent=void 0;var o=function(t){function n(){var n=t.call(this)||this;return n.typ="FilterEvent",n}return i(n,t),n.getAttributeTypeMap=function(){return t.getAttributeTypeMap.call(this).concat(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}(ot.Event);e.FilterEvent=o})),ft=n((function(t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.FilterEventAllOf=void 0;var e=function(){function t(){}return t.getAttributeTypeMap=function(){return 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}();n.FilterEventAllOf=e})),st=n((function(t,n){Object.defineProperty(n,"__esModule",{value:!0})})),ht=n((function(n,e){var r,i=t&&t.__extends||(r=function(t,n){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(t,n)},function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function e(){this.constructor=t}r(t,n),t.prototype=null===n?Object.create(n):(e.prototype=n.prototype,new e)});Object.defineProperty(e,"__esModule",{value:!0}),e.ProductClickEvent=void 0;var o=function(t){function n(){var n=t.call(this)||this;return n.typ="ProductClickEvent",n}return i(n,t),n.getAttributeTypeMap=function(){return t.getAttributeTypeMap.call(this).concat(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}(ot.Event);e.ProductClickEvent=o})),lt=n((function(n,e){var r,i=t&&t.__extends||(r=function(t,n){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(t,n)},function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function e(){this.constructor=t}r(t,n),t.prototype=null===n?Object.create(n):(e.prototype=n.prototype,new e)});Object.defineProperty(e,"__esModule",{value:!0}),e.ProductViewEvent=void 0;var o=function(t){function n(){var n=t.call(this)||this;return n.typ="ProductViewEvent",n}return i(n,t),n.getAttributeTypeMap=function(){return t.getAttributeTypeMap.call(this).concat(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}(ot.Event);e.ProductViewEvent=o})),vt=n((function(t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.ProductViewEventAllOf=void 0;var e=function(){function t(){}return t.getAttributeTypeMap=function(){return 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}();n.ProductViewEventAllOf=e})),dt=n((function(t,n){Object.defineProperty(n,"__esModule",{value:!0})})),pt=n((function(n,e){var r,i=t&&t.__extends||(r=function(t,n){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(t,n)},function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function e(){this.constructor=t}r(t,n),t.prototype=null===n?Object.create(n):(e.prototype=n.prototype,new e)});Object.defineProperty(e,"__esModule",{value:!0}),e.SearchEvent=void 0;var o=function(t){function n(){var n=t.call(this)||this;return n.typ="SearchEvent",n}return i(n,t),n.getAttributeTypeMap=function(){return t.getAttributeTypeMap.call(this).concat(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}(ot.Event);e.SearchEvent=o})),mt=n((function(t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.SearchEventAllOf=void 0;var e=function(){function t(){}return t.getAttributeTypeMap=function(){return 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}();n.SearchEventAllOf=e})),bt=n((function(t,n){Object.defineProperty(n,"__esModule",{value:!0})})),yt=n((function(t,n){Object.defineProperty(n,"__esModule",{value:!0})})),wt=n((function(t,n){Object.defineProperty(n,"__esModule",{value:!0})})),gt=n((function(n,e){var r,i=t&&t.__extends||(r=function(t,n){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(t,n)},function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function e(){this.constructor=t}r(t,n),t.prototype=null===n?Object.create(n):(e.prototype=n.prototype,new e)});Object.defineProperty(e,"__esModule",{value:!0}),e.WidgetEvent=void 0;var o=function(t){function n(){var n=t.call(this)||this;return n.typ="WidgetEvent",n}return i(n,t),n.getAttributeTypeMap=function(){return t.getAttributeTypeMap.call(this).concat(n.attributeTypeMap)},n.discriminator=void 0,n.attributeTypeMap=[{name:"widget",baseName:"widget",type:"Widget",format:""},{name:"action",baseName:"action",type:"WidgetAction",format:""}],n}(ot.Event);e.WidgetEvent=o})),_t=n((function(t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.WidgetEventAllOf=void 0;var e=function(){function t(){}return t.getAttributeTypeMap=function(){return t.attributeTypeMap},t.discriminator=void 0,t.attributeTypeMap=[{name:"widget",baseName:"widget",type:"Widget",format:""},{name:"action",baseName:"action",type:"WidgetAction",format:""}],t}();n.WidgetEventAllOf=e})),jt=n((function(n,e){var r=t&&t.__createBinding||(Object.create?function(t,n,e,r){void 0===r&&(r=e);var i=Object.getOwnPropertyDescriptor(n,e);i&&!("get"in i?!n.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return n[e]}}),Object.defineProperty(t,r,i)}:function(t,n,e,r){void 0===r&&(r=e),t[r]=n[e]}),i=t&&t.__exportStar||function(t,n){for(var e in t)"default"===e||Object.prototype.hasOwnProperty.call(n,e)||r(n,t,e)};Object.defineProperty(e,"__esModule",{value:!0}),i(rt,e),i(it,e),i(ot,e),i(ut,e),i(at,e),i(ct,e),i(ft,e),i(st,e),i(ht,e),i(lt,e),i(vt,e),i(dt,e),i(pt,e),i(mt,e),i(bt,e),i(yt,e),i(wt,e),i(gt,e),i(_t,e)})),Ot=n((function(t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.PromiseMiddlewareWrapper=void 0;var e=function(){function t(t){this.middleware=t}return t.prototype.pre=function(t){return(0,C.from)(this.middleware.pre(t))},t.prototype.post=function(t){return(0,C.from)(this.middleware.post(t))},t}();n.PromiseMiddlewareWrapper=e})),Et=n((function(t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.servers=n.server2=n.server1=n.ServerConfiguration=void 0;var e=function(){function t(t,n){this.url=t,this.variableConfiguration=n}return t.prototype.setVariables=function(t){Object.assign(this.variableConfiguration,t)},t.prototype.getConfiguration=function(){return this.variableConfiguration},t.prototype.getUrl=function(){var t=this.url;for(var n in this.variableConfiguration){var e=new RegExp("{"+n+"}","g");t=t.replace(e,this.variableConfiguration[n])}return t},t.prototype.makeRequestContext=function(t,n){return new nt.RequestContext(this.getUrl()+t,n)},t}();n.ServerConfiguration=e,n.server1=new e("https://tracking.vviinn.com",{}),n.server2=new e("https://tracking.stage.vviinn.com",{}),n.servers=[n.server1,n.server2]})),At=n((function(t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.createConfiguration=void 0,n.createConfiguration=function(t){void 0===t&&(t={});var n={baseServer:void 0!==t.baseServer?t.baseServer:Et.server1,httpApi:t.httpApi||new tt.IsomorphicFetchHttpLibrary,middleware:t.middleware||[],authMethods:(0,et.configureAuthMethods)(t.authMethods)};return t.promiseMiddleware&&t.promiseMiddleware.forEach((function(t){return n.middleware.push(new Ot.PromiseMiddlewareWrapper(t))})),n}})),St=n((function(n,e){var r,i=t&&t.__extends||(r=function(t,n){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(t,n)},function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function e(){this.constructor=t}r(t,n),t.prototype=null===n?Object.create(n):(e.prototype=n.prototype,new e)});Object.defineProperty(e,"__esModule",{value:!0}),e.ApiException=void 0;var o=function(t){function n(n,e,r,i){var o=t.call(this,"HTTP-Code: "+n+"\nMessage: "+e+"\nBody: "+JSON.stringify(r)+"\nHeaders: "+JSON.stringify(i))||this;return o.code=n,o.body=r,o.headers=i,o}return i(n,t),n}(Error);e.ApiException=o})),Tt=n((function(n,e){var r,i=t&&t.__extends||(r=function(t,n){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(t,n)},function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function e(){this.constructor=t}r(t,n),t.prototype=null===n?Object.create(n):(e.prototype=n.prototype,new e)});Object.defineProperty(e,"__esModule",{value:!0}),e.RequiredError=e.BaseAPIRequestFactory=e.COLLECTION_FORMATS=void 0,e.COLLECTION_FORMATS={csv:",",ssv:" ",tsv:"\t",pipes:"|"},e.BaseAPIRequestFactory=function(t){this.configuration=t};var o=function(t){function n(n,e,r){var i=t.call(this,"Required parameter "+r+" was null or undefined when calling "+n+"."+e+".")||this;return i.api=n,i.method=e,i.field=r,i.name="RequiredError",i}return i(n,t),n}(Error);e.RequiredError=o})),Nt=n((function(n,e){var r=t&&t.__createBinding||(Object.create?function(t,n,e,r){void 0===r&&(r=e);var i=Object.getOwnPropertyDescriptor(n,e);i&&!("get"in i?!n.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return n[e]}}),Object.defineProperty(t,r,i)}:function(t,n,e,r){void 0===r&&(r=e),t[r]=n[e]}),i=t&&t.__exportStar||function(t,n){for(var e in t)"default"===e||Object.prototype.hasOwnProperty.call(n,e)||r(n,t,e)};Object.defineProperty(e,"__esModule",{value:!0}),e.ObjectSerializer=void 0,i(rt,e),i(it,e),i(ot,e),i(ut,e),i(at,e),i(ct,e),i(ft,e),i(st,e),i(ht,e),i(lt,e),i(vt,e),i(dt,e),i(pt,e),i(mt,e),i(bt,e),i(yt,e),i(wt,e),i(gt,e),i(_t,e);var o=rt,u=it,a=ot,c=ut,f=ct,s=ft,h=ht,l=lt,v=vt,d=pt,p=mt,m=gt,b=_t,y=["string","boolean","double","integer","long","float","number","any"],w={"application/json":1/0,"application/octet-stream":0,"application/x-www-form-urlencoded":0},g=new Set(["EventConfirmationStatusEnum","FilterAction","FilterKind","SearchArea","SearchImageSource","Widget","WidgetAction"]),_={ErrorObject:o.ErrorObject,ErrorResponse:u.ErrorResponse,Event:a.Event,EventConfirmation:c.EventConfirmation,FilterEvent:f.FilterEvent,FilterEventAllOf:s.FilterEventAllOf,ProductClickEvent:h.ProductClickEvent,ProductViewEvent:l.ProductViewEvent,ProductViewEventAllOf:v.ProductViewEventAllOf,SearchEvent:d.SearchEvent,SearchEventAllOf:p.SearchEventAllOf,WidgetEvent:m.WidgetEvent,WidgetEventAllOf:b.WidgetEventAllOf},j=function(){function t(){}return t.findCorrectType=function(t,n){if(null==t)return n;if(-1!==y.indexOf(n.toLowerCase()))return n;if("Date"===n)return n;if(g.has(n))return n;if(!_[n])return n;var e=_[n].discriminator;if(null==e)return n;if(t[e]){var r=t[e];return _[r]?r:n}return n},t.serialize=function(n,e,r){if(null==n)return n;if(-1!==y.indexOf(e.toLowerCase()))return n;if(0===e.lastIndexOf("Array<",0)){var i=e.replace("Array<","");i=i.substring(0,i.length-1);var o=[];for(var u in n)o.push(t.serialize(n[u],i,r));return o}if("Date"===e){if("date"==r){var a=n.getMonth()+1;a=a<10?"0"+a.toString():a.toString();var c=n.getDate();return c=c<10?"0"+c.toString():c.toString(),n.getFullYear()+"-"+a+"-"+c}return n.toISOString()}if(g.has(e))return n;if(!_[e])return n;e=this.findCorrectType(n,e);var f=_[e].getAttributeTypeMap(),s={};for(var u in f){var h=f[u];s[h.baseName]=t.serialize(n[h.name],h.type,h.format)}return s},t.deserialize=function(n,e,r){if(e=t.findCorrectType(n,e),null==n)return n;if(-1!==y.indexOf(e.toLowerCase()))return n;if(0===e.lastIndexOf("Array<",0)){var i=e.replace("Array<","");i=i.substring(0,i.length-1);var o=[];for(var u in n)o.push(t.deserialize(n[u],i,r));return o}if("Date"===e)return new Date(n);if(g.has(e))return n;if(!_[e])return n;var a=new _[e],c=_[e].getAttributeTypeMap();for(var u in c){var f=c[u];a[f.name]=t.deserialize(n[f.baseName],f.type,f.format)}return a},t.normalizeMediaType=function(t){if(void 0!==t)return t.split(";")[0].trim().toLowerCase()},t.getPreferredMediaType=function(t){if(!t)return"application/json";for(var n=void 0,e=-1/0,r=0,i=t.map(this.normalizeMediaType);r<i.length;r++){var o=i[r];w[o]>e&&(n=o,e=w[o])}if(void 0===n)throw new Error("None of the given media types are supported: "+t.join(", "));return n},t.stringify=function(t,n){if("application/json"===n)return JSON.stringify(t);throw new Error("The mediaType "+n+" is not supported by ObjectSerializer.stringify.")},t.parse=function(t,n){if(void 0===n)throw new Error("Cannot parse content. No Content-Type defined.");if("application/json"===n)return JSON.parse(t);throw new Error("The mediaType "+n+" is not supported by ObjectSerializer.parse.")},t}();e.ObjectSerializer=j})),Ct=n((function(t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.canConsumeForm=n.isCodeInRange=void 0,n.isCodeInRange=function(t,n){if("0"===t)return!0;if(t==n.toString())return!0;var e=n.toString();if(e.length!=t.length)return!1;for(var r=0;r<e.length;r++)if("X"!=t.charAt(r)&&t.charAt(r)!=e.charAt(r))return!1;return!0},n.canConsumeForm=function(t){return-1!==t.indexOf("multipart/form-data")}})),Pt=n((function(n,e){var r,i=t&&t.__extends||(r=function(t,n){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(t,n)},function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function e(){this.constructor=t}r(t,n),t.prototype=null===n?Object.create(n):(e.prototype=n.prototype,new e)}),o=t&&t.__awaiter||function(t,n,e,r){return new(e||(e=Promise))((function(i,o){function u(t){try{c(r.next(t))}catch(t){o(t)}}function a(t){try{c(r.throw(t))}catch(t){o(t)}}function c(t){var n;t.done?i(t.value):(n=t.value,n instanceof e?n:new e((function(t){t(n)}))).then(u,a)}c((r=r.apply(t,n||[])).next())}))},u=t&&t.__generator||function(t,n){var e,r,i,o,u={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(e)throw new TypeError("Generator is already executing.");for(;u;)try{if(e=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return u.label++,{value:o[1],done:!1};case 5:u.label++,r=o[1],o=[0];continue;case 7:o=u.ops.pop(),u.trys.pop();continue;default:if(!((i=(i=u.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){u=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){u.label=o[1];break}if(6===o[0]&&u.label<i[1]){u.label=i[1],i=o;break}if(i&&u.label<i[2]){u.label=i[2],u.ops.push(o);break}i[2]&&u.ops.pop(),u.trys.pop();continue}o=n.call(t,u)}catch(t){o=[6,t],r=0}finally{e=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}};Object.defineProperty(e,"__esModule",{value:!0}),e.DefaultApiResponseProcessor=e.DefaultApiRequestFactory=void 0;var a=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return i(n,t),n.prototype.trackEvent=function(t,n){var e,r,i;return o(this,void 0,void 0,(function(){var o,a,c,f,s,h;return u(this,(function(u){switch(u.label){case 0:return(a=(o=n||this.configuration).baseServer.makeRequestContext("/event",nt.HttpMethod.POST)).setHeaderParam("Accept","application/json, */*;q=0.8"),c=Nt.ObjectSerializer.getPreferredMediaType(["application/json"]),a.setHeaderParam("Content-Type",c),f=Nt.ObjectSerializer.stringify(Nt.ObjectSerializer.serialize(t,"ProductViewEvent | ProductClickEvent | WidgetEvent | FilterEvent | SearchEvent",""),c),a.setBody(f),(null==(s=o.authMethods.bearerAuth)?void 0:s.applySecurityAuthentication)?[4,null==s?void 0:s.applySecurityAuthentication(a)]:[3,2];case 1:u.sent(),u.label=2;case 2:return(null==(h=(null===(e=null==n?void 0:n.authMethods)||void 0===e?void 0:e.default)||(null===(i=null===(r=this.configuration)||void 0===r?void 0:r.authMethods)||void 0===i?void 0:i.default))?void 0:h.applySecurityAuthentication)?[4,null==h?void 0:h.applySecurityAuthentication(a)]:[3,4];case 3:u.sent(),u.label=4;case 4:return[2,a]}}))}))},n}(Tt.BaseAPIRequestFactory);e.DefaultApiRequestFactory=a;var c=function(){function t(){}return t.prototype.trackEvent=function(t){return o(this,void 0,void 0,(function(){var n,e,r,i,o,a,c,f,s,h,l,v,d,p,m,b;return u(this,(function(u){switch(u.label){case 0:return n=Nt.ObjectSerializer.normalizeMediaType(t.headers["content-type"]),(0,Ct.isCodeInRange)("200",t.httpStatusCode)?(r=(e=Nt.ObjectSerializer).deserialize,o=(i=Nt.ObjectSerializer).parse,[4,t.body.text()]):[3,2];case 1:return[2,h=r.apply(e,[o.apply(i,[u.sent(),n]),"EventConfirmation",""])];case 2:return(0,Ct.isCodeInRange)("502",t.httpStatusCode)?(c=(a=Nt.ObjectSerializer).deserialize,s=(f=Nt.ObjectSerializer).parse,[4,t.body.text()]):[3,4];case 3:throw h=c.apply(a,[s.apply(f,[u.sent(),n]),"ErrorResponse",""]),new St.ApiException(502,"an error occurred",h,t.headers);case 4:return t.httpStatusCode>=200&&t.httpStatusCode<=299?(v=(l=Nt.ObjectSerializer).deserialize,p=(d=Nt.ObjectSerializer).parse,[4,t.body.text()]):[3,6];case 5:return[2,h=v.apply(l,[p.apply(d,[u.sent(),n]),"EventConfirmation",""])];case 6:return m=St.ApiException.bind,b=[void 0,t.httpStatusCode,"Unknown API Status Code!"],[4,t.getBodyAsAny()];case 7:throw new(m.apply(St.ApiException,b.concat([u.sent(),t.headers])))}}))}))},t}();e.DefaultApiResponseProcessor=c})),kt=n((function(t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.ObservableDefaultApi=void 0;var e=C,r=function(){function t(t,n,e){this.configuration=t,this.requestFactory=n||new Pt.DefaultApiRequestFactory(t),this.responseProcessor=e||new Pt.DefaultApiResponseProcessor}return t.prototype.trackEvent=function(t,n){for(var r=this,i=this.requestFactory.trackEvent(t,n),o=(0,C.from)(i),u=function(t){o=o.pipe((0,e.mergeMap)((function(n){return t.pre(n)})))},a=0,c=this.configuration.middleware;a<c.length;a++)u(c[a]);return o.pipe((0,e.mergeMap)((function(t){return r.configuration.httpApi.send(t)}))).pipe((0,e.mergeMap)((function(t){for(var n=(0,C.of)(t),i=function(t){n=n.pipe((0,e.mergeMap)((function(n){return t.post(n)})))},o=0,u=r.configuration.middleware;o<u.length;o++)i(u[o]);return n.pipe((0,e.map)((function(t){return r.responseProcessor.trackEvent(t)})))})))},t}();n.ObservableDefaultApi=r})),Mt=n((function(t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.PromiseDefaultApi=void 0;var e=function(){function t(t,n,e){this.api=new kt.ObservableDefaultApi(t,n,e)}return t.prototype.trackEvent=function(t,n){return this.api.trackEvent(t,n).toPromise()},t}();n.PromiseDefaultApi=e})),Rt=n((function(n,e){var r=t&&t.__createBinding||(Object.create?function(t,n,e,r){void 0===r&&(r=e);var i=Object.getOwnPropertyDescriptor(n,e);i&&!("get"in i?!n.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return n[e]}}),Object.defineProperty(t,r,i)}:function(t,n,e,r){void 0===r&&(r=e),t[r]=n[e]}),i=t&&t.__exportStar||function(t,n){for(var e in t)"default"===e||Object.prototype.hasOwnProperty.call(n,e)||r(n,t,e)};Object.defineProperty(e,"__esModule",{value:!0}),e.DefaultApi=e.createConfiguration=void 0,i(nt,e),i(et,e),i(jt,e),Object.defineProperty(e,"createConfiguration",{enumerable:!0,get:function(){return At.createConfiguration}}),i(St,e),i(Et,e),Object.defineProperty(e,"DefaultApi",{enumerable:!0,get:function(){return Mt.PromiseDefaultApi}})}));const Ut=(t,n)=>{const e=(t=>(t=>!t.includes("stage"))(t)?Rt.servers[0]:Rt.servers[1])(t),r=(t=>({bearerAuth:{tokenProvider:{getToken:()=>new Promise((n=>n(t)))}}}))(n);return new Rt.DefaultApi(Rt.createConfiguration({baseServer:e,authMethods:r}))},xt=t=>n=>Object.assign(Object.assign({},n),t),It=xt({widget:"VPR",typ:"product_view_event"}),Ft=xt({widget:"VPS",typ:"product_view_event"}),Dt=xt({widget:"VPR",typ:"product_click_event"}),Wt=xt({widget:"VPS",typ:"product_click_event"}),Vt=xt({widget:"VPR",typ:"widget_event"}),Bt=xt({widget:"VPS",typ:"widget_event"}),qt=xt({widget:"VPS",typ:"search_event"}),zt=xt({widget:"VPS",typ:"filter_event"});export{Dt as a,Ut as b,It as c,Vt as d,Ft as e,Wt as f,qt as g,zt as h,Bt as i,f as v}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t,h as o,H as s}from"./p-bad1809f.js";import{V as i}from"./p-118ac907.js";let n=class{constructor(o){t(this,o),this.position="bottom",this.sourceImage=null,this.sidebarTitle="Visually similar products",this.modalScrollbar=!1,this.sidebar=null,this.sidebarCloseListener=()=>{document.body.removeChild(this.sidebar)}}render(){return o(s,null,o("button",{class:"open-button",part:"button",onClick:()=>this.handleClick()},o("slot",null,o(i,null))))}handleClick(){const t=document.createElement("vviinn-recommendations-sidebar");t.sidebarTitle=this.sidebarTitle,t.productId=this.productId,t.token=this.token,t.position=this.position,t.sourceImage=this.sourceImage,t.widgetScrollbar=this.modalScrollbar,this.sidebar=t,t.addEventListener("modalClosed",this.sidebarCloseListener),document.body.append(this.sidebar)}disconnectedCallback(){this.sidebar.removeEventListener("modalCLosed",this.sidebarCloseListener),document.body.removeChild(this.sidebar)}};n.style=":host{display:block}.open-button{align-items:center;background:rgba(255, 255, 255, 0.8);border-radius:50%;border:none;box-shadow:0px 2px 6px rgba(0, 0, 0, 0.15);box-sizing:border-box;cursor:pointer;display:grid;height:40px;justify-items:center;padding:0;width:40px;transition:all 0.25s ease-in-out}.open-button:hover{box-shadow:0px 2px 6px rgba(0, 0, 0, 0.25)}.open-button:focus{border:2px solid rgba(15, 98, 254, 0.5);outline:none}.open-button:active{background:#F4F4F4;outline:none}";export{n as vviinn_vpr_button}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as i,h as t,H as e,g as r}from"./p-bad1809f.js";import{i as o,s,O as a}from"./p-7e2f542c.js";import{s as n}from"./p-ee46fc83.js";import{e as d,f as l,g as p,h as c,v as g,b as h,i as m}from"./p-9e5adc42.js";import"./p-11f61564.js";let v=class{constructor(t){i(this,t),this.apiPath="https://api.vviinn.com",this.active=!1,this.currencySign="€",this.locale="de-DE",this.slidePosition=0,this.width=0,this.wrongImageFormat=!1,this.imageSource=null}activeWatcher(i){i?(this.overflow=document.body.style.overflow,document.body.style.overflow="hidden",this.trackOpenEvent()):document.body.style.overflow=this.overflow}trackRecommendationView({detail:i}){const t=d(Object.assign({session_id:this.uiSessionId},i));this.trackingApi.trackEvent(t)}trackRecommendationClick({detail:i}){const t=l(Object.assign({sessionId:this.uiSessionId},i));this.trackingApi.trackEvent(t).finally((()=>{const t=o.results.find((t=>t.productId===i.product));t&&t.deeplink&&(window.location.href=t.deeplink)}))}trachSearchAreaChanges(){const i=p({session_id:this.uiSessionId,source:this.imageSource,search_area:"manual-selection"});this.trackingApi.trackEvent(i)}trackDetectedObject(){const i=p({session_id:this.uiSessionId,source:this.imageSource,search_area:"attention-point"});this.trackingApi.trackEvent(i)}trackFilter({detail:i}){const t=c({session_id:this.uiSessionId,source:this.imageSource,kind:"category",action:i});this.trackingApi.trackEvent(t)}componentWillLoad(){n(this,this.el)}connectedCallback(){s.apiPath=this.apiPath,s.currencySign=this.currencySign,s.locale=this.locale,o.token=this.token,this.uiSessionId=g()}trackOpenEvent(){this.trackingApi=h(this.apiPath,this.token);const i=m({action:"open",session_id:this.uiSessionId});this.trackingApi.trackEvent(i)}handleImageSelection(i){this.imageSource=i,this.slidePosition=1,this.el.shadowRoot.querySelector("vviinn-overlayed-modal").shadowRoot.querySelector("vviinn-overlay").querySelector("vviinn-modal").shadowRoot.querySelector(".body").scrollTop=0,this.trackInitialSearch()}trackInitialSearch(){const i=p({session_id:this.uiSessionId,source:this.imageSource,search_area:"full"});this.trackingApi.trackEvent(i)}resetState(){this.resetScroll("onboarding-block"),this.slidePosition=0,o.image=a.none,o.imageUrl=a.none,o.imageBounds=a.none,o.searchArea=a.none,o.results=[],o.filters=[],o.detectedObjects=[],o.activeIonLink=void 0,o.rectangleSearchForm=void 0,this.resetScroll("results-block")}haveErrors(){return this.wrongImageFormat||o.serverError}resetScroll(i,t="auto"){this.el.shadowRoot.getElementById(i).scroll({top:0,left:0,behavior:t})}handleModalClose(){this.active=!1,this.resetState(),["onboarding-block","results-block"].forEach((i=>this.resetScroll(i)));const i=m({action:"close",session_id:this.uiSessionId});this.trackingApi.trackEvent(i)}render(){return t(e,null,t("vviinn-overlayed-modal",{class:{"first-screen":0===this.slidePosition},active:this.active,onSecondaryActionClicked:()=>this.resetState(),onModalClosed:()=>this.handleModalClose(),exportparts:"secondary-action, title, close-button, example-images"},t("vviinn-slider",{showBullets:!1,position:this.slidePosition},t("vviinn-slide",{class:{"start-page":!0}},t("div",{class:{error:this.haveErrors(),"start-page_block":!0}},t("vviinn-wrong-format",{class:{hidden:!this.wrongImageFormat},onActionClick:()=>this.wrongImageFormat=!1}),t("vviinn-server-error",{class:{hidden:!o.serverError},onActionClick:()=>o.serverError=!1}),t("vviinn-teaser",{class:{hidden:this.haveErrors()}}),t("vviinn-image-selector",{class:{hidden:this.haveErrors()},onImageSelected:()=>this.handleImageSelection("upload"),onImageSelectedError:()=>this.wrongImageFormat=!0,part:"select-image_button"},t("span",{slot:"upload-button-text",class:"upload-button-content"},t("svg",{xmlns:"http://www.w3.org/2000/svg",width:"29",height:"28",fill:"none"},t("defs",null),t("path",{fill:"#fff","fill-rule":"evenodd",d:"M10.271 3.89A.875.875 0 0111 3.5h7c.293 0 .566.146.728.39l1.49 2.235h3.033a2.625 2.625 0 012.625 2.625V21a2.625 2.625 0 01-2.625 2.625H5.75A2.625 2.625 0 013.125 21V8.75A2.625 2.625 0 015.75 6.125h3.031l1.49-2.235zm1.197 1.36l-1.49 2.235a.875.875 0 01-.729.39H5.75a.875.875 0 00-.875.875V21a.875.875 0 00.875.875h17.5a.875.875 0 00.875-.875V8.75a.875.875 0 00-.875-.875h-3.5a.875.875 0 01-.729-.39l-1.49-2.235h-6.063z","clip-rule":"evenodd"}),t("path",{fill:"#fff","fill-rule":"evenodd",d:"M14.5 11.375a3.062 3.062 0 100 6.125 3.062 3.062 0 000-6.125zm-4.813 3.063a4.812 4.812 0 119.625 0 4.812 4.812 0 01-9.625 0z","clip-rule":"evenodd"})),t("slot",{name:"vviinn-image-upload-button-text"},t("span",null,"Kamera oder Bild auswählen")))),t("vviinn-privacy-badge",{class:{hidden:this.haveErrors()}})),t("div",{id:"onboarding-block",class:"start-page_block"},t("div",{class:"onboarding-wrapper"},t("vviinn-onboarding",null),t("vviinn-example-images",{part:"example-images",onImageSelected:()=>this.handleImageSelection("example"),onImageSelectedError:()=>this.resetScroll("onboarding-block","smooth")})))),t("vviinn-slide",{class:{"results-page":!0,active:1==this.slidePosition}},t("div",{class:"image-wrapper"},t("vviinn-image-view",null),t("div",{class:"filters-wrapper"},t("div",{class:"filters"},o.filters.map((i=>t("search-filters",{filter:i})))))),t("div",{id:"results-block",class:"products-wrapper"},t("div",{class:{"nothing-found":!0,hidden:o.results.length>0}},t("vviinn-empty-results",null),t("vviinn-onboarding",null)),t("div",{class:{hidden:o.results.length<=0,products:!0}},o.results.map(((i,e)=>{var r;return t("vviinn-product-card",{hidden:!0,productTitle:i.title,productId:i.productId,brand:i.brand,deeplink:i.deeplink,price:i.price.actual,salePrice:i.price.sale,imageWidth:160,image:null!==(r=i.image.thumbnail)&&void 0!==r?r:i.image.original,part:"product-card",index:e})}))))))))}get el(){return r(this)}static get watchers(){return{active:["activeWatcher"]}}};v.style=":host{--color-primary-system:#0F62FE;--color-primary-hover-system:#014CDA;--color-icons-system:#2F8EDF;--spacer:8px}:host{display:block}.hidden{visibility:hidden;height:1px}vviinn-overlayed-modal.first-screen::part(title),vviinn-overlayed-modal.first-screen::part(secondary-action){visibility:hidden}.start-page{display:grid;grid-template-columns:repeat(2, 1fr);min-height:580px}.start-page_block{align-content:start;border-right:1px solid #F4F4F4;display:grid;padding:48px}.start-page_block.error{align-content:center}#onboarding-block{border-right:unset;box-sizing:border-box;grid-gap:24px;overflow-y:auto;position:relative;width:100%}vviinn-teaser{margin-bottom:32px;margin-top:-24px}vviinn-image-selector{align-items:center;background:var(--color-primary, var(--color-primary-system));border-color:var(--color-primary, var(--color-primary-system));border-radius:2px;color:white;display:grid;font-size:16px;font-weight:600;height:56px;justify-items:center;margin-bottom:16px;transition:background 0.1s ease-in-out}vviinn-image-selector:hover{background:var(--color-primary-hover, var(--color-primary-hover-system));border-color:var(--color-primary-hover, var(--color-primary-hover-system))}vviinn-image-selector:active{border-color:black}.upload-button-content{display:grid;align-items:center;justify-items:start;justify-content:center;grid-template-columns:-webkit-max-content auto;grid-template-columns:max-content auto;grid-gap:16px}.results-page{display:grid;grid-template-columns:336px auto;box-sizing:border-box}.results-page>*{padding:24px;box-sizing:border-box}.products{align-content:center;align-items:start;box-sizing:border-box;display:grid;grid-gap:32px 16px;grid-template-columns:repeat(auto-fill, minmax(152px, 1fr));justify-items:center;padding:24px;padding-right:0;position:absolute;width:calc(100% - 16px)}.products.hidden{display:none}vviinn-empty-results{width:280px;align-self:center;justify-self:center}.products-wrapper{display:grid;overflow-y:auto;overflow-x:hidden;padding:unset;position:relative;width:100%}.image-wrapper{border-right:1px solid #F4F4F4;display:grid;grid-template-rows:-webkit-min-content 170px;grid-template-rows:min-content 170px;grid-gap:24px;min-width:100%}.onboarding-wrapper{position:absolute;width:100%;padding:48px;box-sizing:border-box;display:grid;grid-gap:64px;padding-bottom:24px}vviinn-product-card{gap:0;width:100%}vviinn-product-card::part(image){border:1px solid #eaeaea;margin-bottom:8px}vviinn-product-card::part(price-container),vviinn-product-card::part(deeplink),vviinn-product-card::part(title){align-self:start}search-filters span{display:none}search-filters::part(filter){background:#F4F4F4;border-radius:4px;border:1px solid #F4F4F4;box-sizing:border-box;color:#161616;font-size:14px;font-weight:600;line-height:20px}search-filters::part(show-more-filters){border:1px solid #f4f4f4;border-radius:4px;box-sizing:border-box;color:#161616;font-size:14px;font-weight:600;line-height:20px;padding:6px 16px}search-filters::part(show-more-filters):hover{background:#EAEAEA}search-filters::part(filter):hover{background:#EAEAEA}search-filters::part(filter):focus{outline:none;border:1px solid var(--color-primary, var(--color-primary-system))}search-filters::part(filter active){background:rgba(15, 98, 254, 0.15);color:var(--color-primary, var(--color-primary-system))}.filters-wrapper{overflow:auto}.results-page:not(.active){display:none}.nothing-found{display:grid;grid-gap:64px;justify-self:center;padding-top:64px;padding-bottom:16px;position:absolute;width:60%}@media (max-width: 768px){.start-page_block{padding:24px}.onboarding-wrapper{padding:24px}}@media (max-width: 640px){.start-page{grid-template-rows:-webkit-min-content;grid-template-rows:min-content;grid-template-columns:unset;grid-gap:48px;padding:24px 0 48px 0}}@media (max-width: 640px) and (min-width: 415px){.onboarding-wrapper{position:unset}#onboarding-block{overflow:unset}.start-page.active{height:1px;overflow:auto}}@media (max-width: 415px){.results-page>*{box-sizing:border-box;padding:24px}vviinn-slide{padding-bottom:48px}.start-page_block:last-of-type{border-right:unset;overflow-y:unset;position:static;box-sizing:border-box;width:unset}.start-page_block{padding:0 24px}vviinn-teaser{margin-top:24px}.onboarding-wrapper{position:static;width:unset;padding:unset;box-sizing:border-box}.results-page{grid-template-columns:unset;grid-template-rows:-webkit-min-content auto;grid-template-rows:min-content auto}.image{margin-bottom:8px}.image-wrapper{grid-template-rows:-webkit-min-content auto;grid-template-rows:min-content auto;width:100%}.products-wrapper{align-content:start;position:static;overflow-y:unset;width:100%;padding-top:0}.products{position:static;padding:0;width:unset;grid-gap:32px 16px;justify-content:center}.nothing-found{position:static;grid-gap:64px;padding:unset;align-content:start;width:unset}}@media (max-width: 320px){.products{grid-template-columns:unset}}vviinn-wrong-format,vviinn-server-error{width:280px;align-self:center;justify-self:center}";export{v as vviinn_vps_widget}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t,h as i,H as e,g as s,c as r}from"./p-bad1809f.js";import{_ as n,O as o,S as a,a as c,E as h,i as l,s as d,c as u,m as p,f as m,g as v,b as g,d as f,A as b,T as w}from"./p-7e2f542c.js";import{C as y}from"./p-118ac907.js";import{p as x}from"./p-11f61564.js";import{c as k,a as C,v as _,b as P,d as R}from"./p-9e5adc42.js";let S=class{constructor(i){t(this,i),this.moveDirection="right",this.contentGroups=[],this.activeContentGroup=0,this.mode="continuity",this.imageWidth=140,this.showScroll=!0,this.recommendations=[],this.columns=0,this.resizeObserver=new ResizeObserver((()=>this.handleResize())),this.mutationObserver=new MutationObserver((()=>this.cloneSlottedContent()))}connectedCallback(){this.setItemWidth()}disconnectedCallback(){this.resizeObserver.disconnect()}componentDidLoad(){this.setWidth(),this.processScrollbarWidth(),this.columns=this.getColumnsNumber();const t=this.el.querySelector(".content");this.mutationObserver.observe(t,{subtree:!0,childList:!0}),this.resizeObserver.observe(this.getHostParent())}getItemWidthFromDocument(){return parseInt(getComputedStyle(document.body).getPropertyValue("--vviinn-carousel-image-width"))}setItemWidth(){const t=this.getItemWidthFromDocument(),i=isNaN(t)?this.imageWidth:t;this.el.style.setProperty("--vviinn-carousel-image-width",`${i}px`)}getContentClassMap(){return{content:!0,[this.moveDirection]:!0,[this.mode]:!0,"show-scrollbar":this.showScroll}}handleResize(){this.setWidth(),this.processScrollbarWidth(),this.setItemWidth();const t=this.getColumnsNumber();t!==this.columns&&(this.columns=t)}calculateMoveStep(){const t=this.getContent().map((t=>t.getBoundingClientRect().width));return t.reduce(((t,i)=>t+i),0)/t.length}getHostParent(){return this.el.parentNode.host.parentElement}setWidth(){const t=this.getHostParent();if(!t)return;const i=getComputedStyle(t),e=t.getBoundingClientRect().width-(parseInt(i["padding-right"])+parseInt(i["padding-left"]));this.el.style.setProperty("--vviinn-carousel-content-width",`${e}px`)}getParent(){return this.el.parentNode.host.parentElement}cloneSlottedContent(){this.setWidth()}getActiveGroupIndex(){var t,i;if(!(null===(i=null===(t=this.getContentNode())||void 0===t?void 0:t.getBoundingClientRect())||void 0===i?void 0:i.left))return 0;const e=this.getContentGroups().map((t=>t.getBoundingClientRect().left)).map(((t,i)=>[t,i])).filter((t=>t[0]>=0));return e.length>0?e[0][1]:0}getContentNode(){return this.el.querySelector(".content")}getContent(){const t=this.getContentNode().children;return Array.from(t).map((t=>t))}getColumnsNumber(){const t=getComputedStyle(this.el).getPropertyValue("--vviinn-carousel-columns-internal");return parseInt(t)}getContentGroups(){return Array.from(this.el.querySelectorAll(".items-group"))}showNext(){this.moveDirection="right";const t=this.getContentNode();requestAnimationFrame((()=>{t.scrollTo({top:0,left:t.scrollLeft+this.calculateMoveStep(),behavior:"smooth"})}))}showPrev(){this.moveDirection="left";const t=this.getContentNode();requestAnimationFrame((()=>{t.scrollTo({top:0,left:t.scrollLeft-this.calculateMoveStep(),behavior:"smooth"})}))}scroll(t){const i=this.getContentNode();requestAnimationFrame((()=>{i.scrollTo({top:0,left:this.calculateMoveStep()*t,behavior:"smooth"})}))}processScrollbarWidth(){const t=this.getContentNode();this.el.style.setProperty("--vviinn-progressbar-width",t.clientWidth*((t.scrollLeft+t.clientWidth)/t.scrollWidth)+"px"),this.activeContentGroup=this.getActiveGroupIndex()}showBullets(){return"grid"===this.mode&&this.showScroll}showScrollbar(){return"continuity"===this.mode&&this.showScroll}getClassMap(){return{[this.mode]:!0,"show-scrollbar":this.showScrollbar()}}renderRecommendation(t,e){return i("vviinn-product-card",{part:"product-part",productId:t.productId,productTitle:t.title,deeplink:t.deeplink,image:t.image.thumbnail,brand:t.brand,imageWidth:this.imageWidth,imageRatio:1,price:t.price.actual,salePrice:t.price.sale,responsive:"grid"===this.mode,dimmedBackground:"continuity"===this.mode,index:e})}renderRecommendationGroup(t){return i("div",{class:"items-group"},t)}renderRecommendationGroups(t){return t.map((t=>this.renderRecommendationGroup(t)))}renderRecommendations(){return"grid"===this.mode?this.renderGrid():this.renderRecommendationsElements()}renderRecommendationsElements(){return this.recommendations.map(((t,i)=>this.renderRecommendation(t,i)))}renderGrid(){const t=this.renderRecommendationsElements(),i=n.chunksOf(this.getColumnsNumber())(t);return this.renderRecommendationGroups(i)}renderBullets(){const t=Math.ceil(this.recommendations.length/this.getColumnsNumber());return Array.from(Array(t).keys()).map((t=>i("div",{class:{bullet:!0,active:this.activeContentGroup===t},onClick:()=>this.scroll(t)})))}render(){return i(e,{class:this.getClassMap()},i("div",{class:Object.assign({body:!0},this.getClassMap())},i("button",{class:"prev",onClick:()=>this.showPrev(),part:"carousel-button"},i(y,null)),i("div",{class:this.getContentClassMap(),onScroll:()=>this.processScrollbarWidth()},this.renderRecommendations()),i("button",{class:"next",onClick:()=>this.showNext(),part:"carousel-button"},i(y,null))),this.showBullets()?i("div",{class:"bullets"},this.renderBullets()):"")}get el(){return s(this)}};S.style=":host{--vviinn-progressbar-width:0;--vviinn-carousel-item-width:150px;--vviinn-carousel-columns-internal:var(--vviinn-carousel-columns, 4);--vviinn-carousel-image-width-system:140px}.body{display:flex;position:relative;width:var(--vviinn-carousel-content-width);flex-direction:column}.content-wrapper *{box-sizing:border-box}.content-wrapper{overflow-y:hidden;overflow-x:auto;flex-grow:1}.bullets{margin-top:16px;display:flex;flex-direction:row;grid-gap:24px;justify-content:center}.bullet{width:10px;height:10px;background:#E0E0E0;border-radius:50%;cursor:pointer}.bullet.active{background:#161616}.content:not(.show-scrollbar),.content.grid{scrollbar-color:#fff0 #fff0}.content:not(.show-scrollbar)::-webkit-scrollbar,.content.grid::-webkit-scrollbar{opacity:0}.content{display:flex;flex-direction:row;grid-gap:8px;-ms-scroll-snap-type:x mandatory;scroll-snap-type:x mandatory;overflow-y:hidden;overflow-x:auto;flex-grow:1;padding-bottom:16px}.content.left>*{scroll-snap-align:start}.content.right>*{scroll-snap-align:end}:host(.continuity) button{border-radius:2px}:host(.grid) button{border-radius:50%}button{align-items:center;background-color:white;border:none;box-shadow:0px 2px 6px rgba(0, 0, 0, 0.15);cursor:pointer;display:grid;height:40px;justify-items:center;position:absolute;top:calc(50% - 20px);width:40px;z-index:1;padding:0;margin:0}button{fill:#525252}button.prev svg{transform:rotate(180deg);margin-left:-5px}.prev{left:0}.next{right:0}.items-group{display:grid;grid-gap:16px;grid-template-columns:repeat(var(--vviinn-carousel-columns-internal), 1fr);min-width:100%}vviinn-product-card::part(price-container){text-align:center}:host(.classic) vviinn-product-card::part(title),:host(.classic) vviinn-product-card::part(brand),:host(.classic) vviinn-product-card::part(type){text-align:center}@media (max-width: 480px){:host(.modern) button{display:none}.items-group{grid-template-columns:repeat(2, 1fr)}}";class I{sendImpression(t){var i,e,s;gtag("event","view_item_list",{items:[{id:t.productId,name:t.title,brand:null!==(i=t.brand)&&void 0!==i?i:"",category:null!==(e=t.productType)&&void 0!==e?e:"",list_name:"VI VPR View",price:Math.min(t.price.actual,null!==(s=t.price.sale)&&void 0!==s?s:1/0)}]})}sendClick(t){var i,e,s;gtag("event","select_content",{content_type:"product",items:[{id:t.productId,name:t.title,brand:null!==(i=t.brand)&&void 0!==i?i:"",category:null!==(e=t.productType)&&void 0!==e?e:"",list_name:"VI VPR View",price:Math.min(t.price.actual,null!==(s=t.price.sale)&&void 0!==s?s:1/0)}]})}}class E{constructor(){ga("require","ec")}convertProduct(t){var i,e,s;return{id:t.productId,name:t.title,brand:null!==(i=t.brand)&&void 0!==i?i:"",category:null!==(e=t.productType)&&void 0!==e?e:"",list:"VI VPR View",price:Math.min(t.price.actual,null!==(s=t.price.sale)&&void 0!==s?s:1/0)}}sendImpression(t){ga("ec:addImpression",this.convertProduct(t))}sendClick(t){var i,e,s;ga("ec:addProduct",{id:t.productId,name:t.title,brand:null!==(i=t.brand)&&void 0!==i?i:"",category:null!==(e=t.productType)&&void 0!==e?e:"",price:Math.min(t.price.actual,null!==(s=t.price.sale)&&void 0!==s?s:1/0)}),ga("ec:setAction","click",{list:"VI VPR View"})}}const V=o.getMonoid(a.first()).concat(c.pipe(o.fromNullable(window.gtag),o.map((()=>new I))),c.pipe(o.fromNullable(window.ga),o.map((()=>new E)))),j=/fit\/\d+\//,A=(t,i)=>c.pipe((t=>c.pipe(t.match(j),h.fromNullable(t),h.map((()=>t))))(t),h.map((t=>t.replace(j,`fit/${i}/`))),h.getOrElse((()=>t))),z=(t,e)=>t.deeplink?i("a",{class:t.part,part:t.part,href:t.deeplink},e):e,O=t=>{var e;const s=new Intl.NumberFormat(t.locale,{minimumFractionDigits:2}).format(t.price),r=`${null!==(e=t.prefix)&&void 0!==e?e:""} ${s} ${t.currency}`;return i("span",{class:"price-amount",part:"price-amount"},r)},D=t=>{const e=i(O,{prefix:t.prefix,currency:t.currency,price:t.price,locale:t.locale});return i("span",{class:"price-container",part:"price-container"},t.salePrice?[i("span",{class:"price-sale",part:"price-sale"},i(O,{prefix:t.prefix,currency:t.currency,price:t.salePrice,locale:t.locale})),i("span",{class:"price-outdated",part:"price-outdated"},e)]:i("span",{class:"price-regular",part:"price-regular"},e))};let $=class{constructor(i){t(this,i),this.recommendationLoad=r(this,"recommendationLoad",7),this.recommendationView=r(this,"recommendationView",7),this.recommendationClick=r(this,"recommendationClick",7),this.productImageLoaded=r(this,"productImageLoaded",7),this.currency=void 0,this.imageRatio=1,this.imageWidth=200,this.locale=void 0,this.pricePrefix=void 0,this.responsive=!1,this.dimmedBackground=!1,this.index=0,this.imageLoaded=!1,this.productData=null,this.intersectionObserver=new IntersectionObserver(this.intersectionCallback.bind(this),{threshold:1})}connectedCallback(){this.productData={product:this.productId,rank:this.index}}intersectionCallback(t){t.some((t=>t.isIntersecting))&&(c.pipe(V,o.map((t=>t.sendImpression(this.getProduct())))),this.recommendationView.emit(this.productData),this.intersectionObserver.disconnect())}componentDidLoad(){this.recommendationLoad.emit(this.productData),this.intersectionObserver.observe(this.el),this.el.shadowRoot.querySelectorAll("a").forEach((t=>t.addEventListener("click",(t=>{t.preventDefault(),t.stopImmediatePropagation(),this.recommendationClick.emit(this.productData),c.pipe(V,o.match((()=>null),(t=>t.sendClick(this.getProduct()))))}))))}getProduct(){return l.results.find((t=>t.productId===this.productId))}renderImage(){const t={width:this.imageWidth,height:this.imageWidth*this.imageRatio,src:this.image,title:this.productTitle,lazy:!1};return this.responsive?((t,e=(()=>{}))=>i("picture",null,i("img",{loading:t.lazy?"lazy":"eager",part:"image",class:"image responsive",src:A(t.src,t.width),alt:t.title,onLoad:e})))(t,(()=>this.kek())):((t,e=(()=>{}))=>i("picture",null,i("img",{loading:t.lazy?"lazy":"eager",part:"image",class:"image",width:t.width,height:t.height,src:A(t.src,t.width),alt:t.title,onLoad:e})))(t,(()=>this.kek()))}kek(){this.productImageLoaded.emit(this.productId)}render(){var t,s,r;return i(e,{part:"product-card",class:{dimmed:this.dimmedBackground},exportparts:"brand, currency, deeplink, image, image-link, price-amount, price-container, price-outdated, price-prefix, price-regular, price-sale, title"},i(z,{deeplink:this.deeplink,part:"image-link"},this.renderImage()),i(z,{deeplink:this.deeplink,part:"deeplink"},i("span",{class:"title",part:"title"},this.productTitle)),i("span",{class:"brand",part:"brand"},this.brand),i("span",{class:"type",part:"type"},this.productType),i(D,{prefix:null!==(t=this.pricePrefix)&&void 0!==t?t:d.pricePrefix,currency:null!==(s=this.currency)&&void 0!==s?s:d.currencySign,price:this.price,salePrice:this.salePrice,locale:null!==(r=this.locale)&&void 0!==r?r:d.locale}))}get el(){return s(this)}};$.style=':host{align-items:center;display:flex;flex-direction:column;gap:8px;height:100%}.price-container{display:flex;flex-direction:column}.price-sale,.price-regular{font-style:normal;font-weight:normal;font-size:16px;line-height:24px;color:#161616}.price-outdated{font-style:normal;font-weight:normal;font-size:16px;line-height:24px;color:#757575;text-decoration:line-through}.product-type{word-wrap:anywhere}.image{display:grid;align-content:center;-o-object-position:50% 50%;object-position:50% 50%;-o-object-fit:contain;object-fit:contain;text-align:center;box-sizing:border-box}img.responsive{width:100%;height:auto;aspect-ratio:1}.brand,.type{display:none}.title{-webkit-box-orient:vertical;-webkit-line-clamp:2;color:#161616;display:-webkit-box;font-size:16px;font-style:normal;font-weight:500;line-height:24px;margin-bottom:8px;overflow:hidden}.deeplink{text-decoration:none}.image-link{display:contents}picture{position:relative;width:100%}:host(.dimmed) picture::before{content:"";width:100%;height:100%;box-sizing:border-box;background:#f7f7f7;display:block;top:0;left:0;position:absolute;mix-blend-mode:multiply}';const T=c.flow((t=>`Bearer ${t}`),(t=>new Headers({Authorization:t})),(t=>({headers:t}))),L=f(b),M=(t,i={})=>x(L(v(),g),m,u(p(t,i))),N=t=>i=>M(`product/${t}/similar-products`,i),W=t=>i=>M(`product/${t}/cross-selling-products`,i);function F(t){return"function"==typeof t}function B(t){const i=t((t=>{Error.call(t),t.stack=(new Error).stack}));return i.prototype=Object.create(Error.prototype),i.prototype.constructor=i,i}const G=B((t=>function(i){t(this),this.message=i?`${i.length} errors occurred during unsubscription:\n${i.map(((t,i)=>`${i+1}) ${t.toString()}`)).join("\n ")}`:"",this.name="UnsubscriptionError",this.errors=i}));function q(t,i){if(t){const e=t.indexOf(i);0<=e&&t.splice(e,1)}}class H{constructor(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}unsubscribe(){let t;if(!this.closed){this.closed=!0;const{_parentage:i}=this;if(i)if(this._parentage=null,Array.isArray(i))for(const t of i)t.remove(this);else i.remove(this);const{initialTeardown:e}=this;if(F(e))try{e()}catch(i){t=i instanceof G?i.errors:[i]}const{_finalizers:s}=this;if(s){this._finalizers=null;for(const i of s)try{K(i)}catch(i){t=null!=t?t:[],i instanceof G?t=[...t,...i.errors]:t.push(i)}}if(t)throw new G(t)}}add(t){var i;if(t&&t!==this)if(this.closed)K(t);else{if(t instanceof H){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=null!==(i=this._finalizers)&&void 0!==i?i:[]).push(t)}}_hasParent(t){const{_parentage:i}=this;return i===t||Array.isArray(i)&&i.includes(t)}_addParent(t){const{_parentage:i}=this;this._parentage=Array.isArray(i)?(i.push(t),i):i?[i,t]:t}_removeParent(t){const{_parentage:i}=this;i===t?this._parentage=null:Array.isArray(i)&&q(i,t)}remove(t){const{_finalizers:i}=this;i&&q(i,t),t instanceof H&&t._removeParent(this)}}H.EMPTY=(()=>{const t=new H;return t.closed=!0,t})();const U=H.EMPTY;function J(t){return t instanceof H||t&&"closed"in t&&F(t.remove)&&F(t.add)&&F(t.unsubscribe)}function K(t){F(t)?t():t.unsubscribe()}const Q={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},X={setTimeout(t,i,...e){const{delegate:s}=X;return(null==s?void 0:s.setTimeout)?s.setTimeout(t,i,...e):setTimeout(t,i,...e)},clearTimeout(t){const{delegate:i}=X;return((null==i?void 0:i.clearTimeout)||clearTimeout)(t)},delegate:void 0};function Y(){}const Z=tt("C",void 0,void 0);function tt(t,i,e){return{kind:t,value:i,error:e}}function it(t){t()}class et extends H{constructor(t){super(),this.isStopped=!1,t?(this.destination=t,J(t)&&t.add(this)):this.destination=ht}static create(t,i,e){return new ot(t,i,e)}next(t){this.isStopped?ct(function(t){return tt("N",t,void 0)}(t),this):this._next(t)}error(t){this.isStopped?ct(tt("E",void 0,t),this):(this.isStopped=!0,this._error(t))}complete(){this.isStopped?ct(Z,this):(this.isStopped=!0,this._complete())}unsubscribe(){this.closed||(this.isStopped=!0,super.unsubscribe(),this.destination=null)}_next(t){this.destination.next(t)}_error(t){try{this.destination.error(t)}finally{this.unsubscribe()}}_complete(){try{this.destination.complete()}finally{this.unsubscribe()}}}const st=Function.prototype.bind;function rt(t,i){return st.call(t,i)}class nt{constructor(t){this.partialObserver=t}next(t){const{partialObserver:i}=this;if(i.next)try{i.next(t)}catch(t){at(t)}}error(t){const{partialObserver:i}=this;if(i.error)try{i.error(t)}catch(t){at(t)}else at(t)}complete(){const{partialObserver:t}=this;if(t.complete)try{t.complete()}catch(t){at(t)}}}class ot extends et{constructor(t,i,e){let s;if(super(),F(t)||!t)s={next:null!=t?t:void 0,error:null!=i?i:void 0,complete:null!=e?e:void 0};else{let i;this&&Q.useDeprecatedNextContext?(i=Object.create(t),i.unsubscribe=()=>this.unsubscribe(),s={next:t.next&&rt(t.next,i),error:t.error&&rt(t.error,i),complete:t.complete&&rt(t.complete,i)}):s=t}this.destination=new nt(s)}}function at(t){var i;i=t,X.setTimeout((()=>{const{onUnhandledError:t}=Q;if(!t)throw i;t(i)}))}function ct(t,i){const{onStoppedNotification:e}=Q;e&&X.setTimeout((()=>e(t,i)))}const ht={closed:!0,next:Y,error:function(t){throw t},complete:Y},lt="function"==typeof Symbol&&Symbol.observable||"@@observable";function dt(t){return t}class ut{constructor(t){t&&(this._subscribe=t)}lift(t){const i=new ut;return i.source=this,i.operator=t,i}subscribe(t,i,e){const s=(r=t)&&r instanceof et||function(t){return t&&F(t.next)&&F(t.error)&&F(t.complete)}(r)&&J(r)?t:new ot(t,i,e);var r;return it((()=>{const{operator:t,source:i}=this;s.add(t?t.call(s,i):i?this._subscribe(s):this._trySubscribe(s))})),s}_trySubscribe(t){try{return this._subscribe(t)}catch(i){t.error(i)}}forEach(t,i){return new(i=pt(i))(((i,e)=>{const s=new ot({next:i=>{try{t(i)}catch(t){e(t),s.unsubscribe()}},error:e,complete:i});this.subscribe(s)}))}_subscribe(t){var i;return null===(i=this.source)||void 0===i?void 0:i.subscribe(t)}[lt](){return this}pipe(...t){return(0===(i=t).length?dt:1===i.length?i[0]:function(t){return i.reduce(((t,i)=>i(t)),t)})(this);var i}toPromise(t){return new(t=pt(t))(((t,i)=>{let e;this.subscribe((t=>e=t),(t=>i(t)),(()=>t(e)))}))}}function pt(t){var i;return null!==(i=null!=t?t:Q.Promise)&&void 0!==i?i:Promise}ut.create=t=>new ut(t);const mt=B((t=>function(){t(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}));class vt extends ut{constructor(){super(),this.closed=!1,this.currentObservers=null,this.observers=[],this.isStopped=!1,this.hasError=!1,this.thrownError=null}lift(t){const i=new gt(this,this);return i.operator=t,i}_throwIfClosed(){if(this.closed)throw new mt}next(t){it((()=>{if(this._throwIfClosed(),!this.isStopped){this.currentObservers||(this.currentObservers=Array.from(this.observers));for(const i of this.currentObservers)i.next(t)}}))}error(t){it((()=>{if(this._throwIfClosed(),!this.isStopped){this.hasError=this.isStopped=!0,this.thrownError=t;const{observers:i}=this;for(;i.length;)i.shift().error(t)}}))}complete(){it((()=>{if(this._throwIfClosed(),!this.isStopped){this.isStopped=!0;const{observers:t}=this;for(;t.length;)t.shift().complete()}}))}unsubscribe(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null}get observed(){var t;return(null===(t=this.observers)||void 0===t?void 0:t.length)>0}_trySubscribe(t){return this._throwIfClosed(),super._trySubscribe(t)}_subscribe(t){return this._throwIfClosed(),this._checkFinalizedStatuses(t),this._innerSubscribe(t)}_innerSubscribe(t){const{hasError:i,isStopped:e,observers:s}=this;return i||e?U:(this.currentObservers=null,s.push(t),new H((()=>{this.currentObservers=null,q(s,t)})))}_checkFinalizedStatuses(t){const{hasError:i,thrownError:e,isStopped:s}=this;i?t.error(e):s&&t.complete()}asObservable(){const t=new ut;return t.source=this,t}}vt.create=(t,i)=>new gt(t,i);class gt extends vt{constructor(t,i){super(),this.destination=t,this.source=i}next(t){var i,e;null===(e=null===(i=this.destination)||void 0===i?void 0:i.next)||void 0===e||e.call(i,t)}error(t){var i,e;null===(e=null===(i=this.destination)||void 0===i?void 0:i.error)||void 0===e||e.call(i,t)}complete(){var t,i;null===(i=null===(t=this.destination)||void 0===t?void 0:t.complete)||void 0===i||i.call(t)}_subscribe(t){var i,e;return null!==(e=null===(i=this.source)||void 0===i?void 0:i.subscribe(t))&&void 0!==e?e:U}}let ft=class{constructor(i){t(this,i),this.recommendationsLoaded=r(this,"recommendationsLoaded",7),this.blockTitle="Recommended products",this.imageRatio=1,this.imageWidth=300,this.currencySign="€",this.mode="continuity",this.campaignType="VPR",this.locale="de-DE",this.apiPath="https://api.vviinn.com",this.useCarousel=!0,this.showScroll=!0,this.cssUrl=null,this.recommendations=[],this.loaded=!1,this.productImageLoadedSubject=new vt}handleProductIdChange(){this.getRecommendations()}handleCampaignTypeChange(){this.getRecommendations()}handleApiPathChange(t){d.apiPath=t,this.getRecommendations()}handleImageLoading({detail:t}){this.productImageLoadedSubject.next(t)}trackRecommendationView({detail:t}){const i=k(Object.assign({session_id:this.uiSessionId},t));this.trackingApi.trackEvent(i)}trackRecommendationClick({detail:t}){const i=C(Object.assign({session_id:this.uiSessionId},t));this.trackingApi.trackEvent(i).finally((()=>{const i=this.recommendations.find((i=>i.productId===t.product));i&&i.deeplink&&(window.location.href=i.deeplink)}))}connectedCallback(){d.apiPath=this.apiPath,d.currencySign=this.currencySign,d.locale=this.locale,this.uiSessionId=_(),this.trackingApi=P(this.apiPath,this.token);const t=R({action:"open",session_id:this.uiSessionId});this.trackingApi.trackEvent(t)}disconnectedCallback(){const t=R({action:"close",session_id:this.uiSessionId});this.trackingApi.trackEvent(t)}async componentWillLoad(){d.pricePrefix=this.pricePrefix,d.currencySign=this.currencySign,this.getRecommendations()}async getRecommendations(){if(void 0===this.productId||void 0===this.token)return;const t=this.campaignType.length>0?this.campaignType:"VPR",i=T(this.token),e=c.pipe(w.of((t=>{return c.pipe("VPR"===t?{_tag:"VPR"}:{_tag:"VCS"},(i=()=>N,e=()=>W,t=>(t=>"VPR"===t._tag)(t)?i():e()));var i,e})(t)),w.ap(w.of(this.productId)),w.ap(w.of(i)),w.flatten),s=await e();c.pipe(s,h.fold((t=>this.handleError(t)),(t=>this.handleRecommendationsSucces(t))))}handleError(t){console.log("ERROR:",t)}handleRecommendationsSucces(t){var i;this.recommendations=null!==(i=null==t?void 0:t.extended)&&void 0!==i?i:t,l.results=this.recommendations,this.loaded=!0,this.productIds=this.recommendations.map((t=>t.productId)),this.productImageLoadedSubject.subscribe((t=>{this.productIds=this.productIds.filter((i=>i!==t)),0===this.productIds.length&&this.recommendationsLoaded.emit()}))}isExternalCSS(){return this.cssUrl&&this.cssUrl.length>0}renderExternalCSS(){return this.isExternalCSS()?i("link",{href:this.cssUrl,rel:"stylesheet"}):""}render(){return i(e,{class:{loaded:this.loaded,empty:0==this.recommendations.length,[this.mode]:!0},"aria-hidden":this.loaded?"false":"true"},this.renderExternalCSS(),i("style",null,d.fallbackStyles),i("h2",{part:"recommendations-title"},this.blockTitle),this.useCarousel?this.renderCarousel():this.renderResults())}renderRecommendation(t,e){return i("vviinn-product-card",{part:"product-part",productId:t.productId,productTitle:t.title,deeplink:t.deeplink,image:t.image.thumbnail,brand:t.brand,imageWidth:this.imageWidth,imageRatio:1,price:t.price.actual,salePrice:t.price.sale,responsive:"grid"===this.mode,dimmedBackground:this.useDimmedBackgroundInCard(),index:e})}useDimmedBackgroundInCard(){return"continuity"===this.mode||!this.useCarousel}renderResults(){return i("div",{class:"recommendations-grid",part:"recommendations-grid"},this.recommendations.map(((t,i)=>this.renderRecommendation(t,i))))}renderCarousel(){return i("vviinn-carousel",{mode:this.mode,imageWidth:this.imageWidth,showScroll:this.showScroll,recommendations:this.recommendations})}get el(){return s(this)}static get watchers(){return{productId:["handleProductIdChange"],campaignType:["handleCampaignTypeChange"],apiPath:["handleApiPathChange"]}}};ft.style=":host{display:grid;grid-gap:1rem;width:100%}:host(:not(.loaded)){position:absolute;visibility:hidden}:host(.grid) vviinn-product-card::part(image){border:1px solid #DDDDDD;width:100%}h2{margin:0}vviinn-product-card::part(price-container){align-self:flex-start;text-align:left;display:flex}.results{display:grid;grid-gap:1rem}.visually-hidden{position:absolute;top:0;left:0;z-index:-1;height:0;width:0}h2{margin:0}:host(.grid) h2{justify-content:center}:host(.grid) vviinn-product-card::part(image){min-width:100%}:host(.grid) vviinn-product-card::part(image-link){width:100%}:host(.grid) vviinn-product-card::part(title),:host(.grid) vviinn-product-card::part(brand),:host(.grid) vviinn-product-card::part(type){text-align:center}:host(.grid) vviinn-product-card::part(price-container){align-self:center}:host(.continuity) vviinn-product-card::part(title),:host(.continuity) vviinn-product-card::part(brand),:host(.continuity) vviinn-product-card::part(type),:host(.continuity) vviinn-product-card::part(deeplink){text-align:left;max-width:unset;align-self:start}";export{S as vviinn_carousel,$ as vviinn_product_card,ft as vviinn_vpr_widget}
|