slice-machine-ui 2.2.2-alpha.lg-nested-group-snippets.2 → 2.2.2-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (80) hide show
  1. package/out/404.html +1 -1
  2. package/out/_next/static/JGphUg6eFq0-W11Pa7cMU/_buildManifest.js +1 -0
  3. package/out/_next/static/chunks/18539003-eda642ad962ef598.js +22 -0
  4. package/out/_next/static/chunks/212-cbaa35389c0aacf1.js +1 -0
  5. package/out/_next/static/chunks/264-4bb6f3fb14863ef3.js +1 -0
  6. package/out/_next/static/chunks/465-47a6d2a5f66f521e.js +1 -0
  7. package/out/_next/static/chunks/574-6039c48fbc93b4a8.js +1 -0
  8. package/out/_next/static/chunks/{210-565d01ee9777d1a1.js → 66-d37d30551288858b.js} +2 -2
  9. package/out/_next/static/chunks/756-1e44fe84bedc262b.js +10 -0
  10. package/out/_next/static/chunks/816-68d4db26c0adab2e.js +1 -0
  11. package/out/_next/static/chunks/pages/_app-05ac13d573829b68.js +532 -0
  12. package/out/_next/static/chunks/pages/changelog-d309ea186a0e56bf.js +1 -0
  13. package/out/_next/static/chunks/pages/changes-1bb1a7b784a22151.js +1 -0
  14. package/out/_next/static/chunks/pages/custom-types/{[customTypeId]-a6ff1618238b3510.js → [customTypeId]-74be2c0ac9c854c7.js} +1 -1
  15. package/out/_next/static/chunks/pages/index-785a0ab6e2a4fc27.js +1 -0
  16. package/out/_next/static/chunks/pages/labs-2e4f3a5f68e65b93.js +1 -0
  17. package/out/_next/static/chunks/pages/page-types/{[pageTypeId]-c300f963db847451.js → [pageTypeId]-d35c87b9aaec445a.js} +1 -1
  18. package/out/_next/static/chunks/pages/settings-25eb02893ed871b7.js +1 -0
  19. package/out/_next/static/chunks/pages/slices/[lib]/[sliceName]/[variation]/simulator-b47a72d5e94bd946.js +1 -0
  20. package/out/_next/static/chunks/pages/slices/[lib]/[sliceName]/[variation]-996e20b9b295a912.js +1 -0
  21. package/out/_next/static/chunks/pages/slices-cc44eeccd58d23a9.js +1 -0
  22. package/out/_next/static/css/b3bb731ce567d63f.css +1 -0
  23. package/out/changelog.html +1 -1
  24. package/out/changes.html +1 -1
  25. package/out/custom-types/[customTypeId].html +1 -1
  26. package/out/custom-types.html +1 -1
  27. package/out/index.html +1 -1
  28. package/out/labs.html +1 -1
  29. package/out/page-types/[pageTypeId].html +1 -1
  30. package/out/settings.html +1 -1
  31. package/out/slices/[lib]/[sliceName]/[variation]/simulator.html +1 -1
  32. package/out/slices/[lib]/[sliceName]/[variation].html +1 -1
  33. package/out/slices.html +1 -1
  34. package/package.json +7 -7
  35. package/src/legacy/components/ListItem/index.tsx +1 -1
  36. package/src/legacy/lib/builders/CustomTypeBuilder/TabZone/index.tsx +3 -21
  37. package/src/legacy/lib/builders/SliceBuilder/FieldZones/index.tsx +6 -23
  38. package/src/legacy/lib/builders/SliceBuilder/VariationsList/index.tsx +2 -4
  39. package/src/legacy/lib/builders/SliceBuilder/index.tsx +1 -1
  40. package/src/legacy/lib/builders/common/EditModal/index.jsx +1 -1
  41. package/src/legacy/lib/builders/common/Zone/Card/components/Hints/index.tsx +1 -8
  42. package/src/legacy/lib/builders/common/Zone/Card/components/NewField.tsx +1 -1
  43. package/src/legacy/lib/builders/common/Zone/Card/index.jsx +1 -3
  44. package/src/legacy/lib/builders/utils/index.ts +0 -8
  45. package/src/legacy/lib/models/common/Group.ts +28 -51
  46. package/src/legacy/lib/models/common/widgets/Group/ListItem/index.jsx +8 -22
  47. package/src/legacy/lib/models/common/widgets/Group/index.ts +44 -0
  48. package/src/legacy/lib/models/common/widgets/Widget.ts +1 -10
  49. package/src/legacy/lib/models/common/widgets/ctBuilderArray.ts +20 -0
  50. package/src/legacy/lib/models/common/widgets/groupBuilderArray.ts +18 -0
  51. package/src/legacy/lib/models/common/widgets/index.ts +31 -7
  52. package/src/legacy/lib/models/common/widgets/sliceBuilderArray.ts +19 -0
  53. package/src/legacy/lib/models/common/widgets/withGroup.ts +2 -0
  54. package/test/lib/builders/buildersUtils.test.ts +1 -1
  55. package/test/lib/models/common/widgets/index.test.ts +1 -1
  56. package/out/_next/static/chunks/18539003-a6ba9867be2b3472.js +0 -22
  57. package/out/_next/static/chunks/212-58a99ab312f8a03b.js +0 -1
  58. package/out/_next/static/chunks/448-7a6843206737d199.js +0 -1
  59. package/out/_next/static/chunks/465-695ac5fedef986eb.js +0 -1
  60. package/out/_next/static/chunks/574-dfeb0e6aa3079da1.js +0 -1
  61. package/out/_next/static/chunks/756-31b94074da5d5a1c.js +0 -10
  62. package/out/_next/static/chunks/816-96fc9a79308019c7.js +0 -1
  63. package/out/_next/static/chunks/pages/_app-9b295100b552a8bd.js +0 -532
  64. package/out/_next/static/chunks/pages/changelog-f0cd26a9ae095e9e.js +0 -1
  65. package/out/_next/static/chunks/pages/changes-1a57f90433a0b5e2.js +0 -1
  66. package/out/_next/static/chunks/pages/index-a0530bd55c7e1872.js +0 -1
  67. package/out/_next/static/chunks/pages/labs-7b0abeef69494aec.js +0 -1
  68. package/out/_next/static/chunks/pages/settings-f82286dde10f624c.js +0 -1
  69. package/out/_next/static/chunks/pages/slices/[lib]/[sliceName]/[variation]/simulator-453f946e8879c829.js +0 -1
  70. package/out/_next/static/chunks/pages/slices/[lib]/[sliceName]/[variation]-b530a5e0ac9d0391.js +0 -1
  71. package/out/_next/static/chunks/pages/slices-7411822d74f1f6c1.js +0 -1
  72. package/out/_next/static/css/3c76d732d00eda61.css +0 -1
  73. package/out/_next/static/lLr-7N4Y19auzsORnpwN-/_buildManifest.js +0 -1
  74. package/src/hooks/useNestedGroupExperiment.ts +0 -8
  75. package/src/legacy/lib/models/common/widgets/Group/createGroupWidget.ts +0 -83
  76. package/src/legacy/lib/models/common/widgets/Group/index.tsx +0 -72
  77. package/src/legacy/lib/models/common/widgets/NestedGroup/index.tsx +0 -40
  78. package/src/legacy/lib/models/common/widgets/groupWidgets.ts +0 -7
  79. package/src/legacy/lib/models/common/widgets/nonGroupWidgets.ts +0 -33
  80. /package/out/_next/static/{lLr-7N4Y19auzsORnpwN- → JGphUg6eFq0-W11Pa7cMU}/_ssgManifest.js +0 -0
@@ -1,22 +0,0 @@
1
- "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[851],{71463:function(e,t,n){n.d(t,{kS:function(){return elS}});var r,i,o,a,u,s,l=n(77252),c=n(2784),d=n(98863),f=n(7729),p=n(74217),A=n(50054),h=n(86579),m=n(18566),g=n(87322),y=n(1611),v=n(52393),x=n(47124),b=n(50002),C=n(89095),S=n(28316),w=n(87598),I=Object.defineProperty,_=(e,t,n)=>t in e?I(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,T=(e,t,n)=>(_(e,"symbol"!=typeof t?t+"":t,n),n),O="u">typeof globalThis?globalThis:"u">typeof window?window:"u">typeof n.g?n.g:"u">typeof self?self:{};function R(e){if(e.__esModule)return e;var t=e.default;if("function"==typeof t){var n=function e(){return this instanceof e?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(t){var r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:function(){return e[t]}})}),n}var k={},E=function(e,t){return(E=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},M=function(){return(M=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},F=Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]};function j(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function U(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(u){i={error:u}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}function K(e){return this instanceof K?(this.v=e,this):new K(e)}var L=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t};let B=Object.freeze(Object.defineProperty({__proto__:null,get __assign(){return M},__asyncDelegator:function(e){var t,n;return t={},r("next"),r("throw",function(e){throw e}),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,i){t[r]=e[r]?function(t){return(n=!n)?{value:K(e[r](t)),done:!1}:i?i(t):t}:i}},__asyncGenerator:function(e,t,n){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var r,i=n.apply(e,t||[]),o=[];return r={},a("next"),a("throw"),a("return"),r[Symbol.asyncIterator]=function(){return this},r;function a(e){i[e]&&(r[e]=function(t){return new Promise(function(n,r){o.push([e,t,n,r])>1||u(e,t)})})}function u(e,t){try{var n;n=i[e](t),n.value instanceof K?Promise.resolve(n.value.v).then(s,l):c(o[0][2],n)}catch(r){c(o[0][3],r)}}function s(e){u("next",e)}function l(e){u("throw",e)}function c(e,t){e(t),o.shift(),o.length&&u(o[0][0],o[0][1])}},__asyncValues:function(e){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=j(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise(function(r,i){!function(e,t,n,r){Promise.resolve(r).then(function(t){e({value:t,done:n})},t)}(r,i,(t=e[n](t)).done,t.value)})}}},__await:K,__awaiter:function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function a(e){try{s(r.next(e))}catch(t){o(t)}}function u(e){try{s(r.throw(e))}catch(t){o(t)}}function s(e){var t;e.done?i(e.value):((t=e.value)instanceof n?t:new n(function(e){e(t)})).then(a,u)}s((r=r.apply(e,t||[])).next())})},__classPrivateFieldGet:function(e,t,n,r){if("a"===n&&!r)throw TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)},__classPrivateFieldIn:function(e,t){if(null===t||"object"!=typeof t&&"function"!=typeof t)throw TypeError("Cannot use 'in' operator on non-object");return"function"==typeof e?t===e:e.has(t)},__classPrivateFieldSet:function(e,t,n,r,i){if("m"===r)throw TypeError("Private method is not writable");if("a"===r&&!i)throw TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?i.call(e,n):i?i.value=n:t.set(e,n),n},__createBinding:F,__decorate:function(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var u=e.length-1;u>=0;u--)(i=e[u])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},__esDecorate:function(e,t,n,r,i,o){function a(e){if(void 0!==e&&"function"!=typeof e)throw TypeError("Function expected");return e}for(var u,s=r.kind,l="getter"===s?"get":"setter"===s?"set":"value",c=!t&&e?r.static?e:e.prototype:null,d=t||(c?Object.getOwnPropertyDescriptor(c,r.name):{}),f=!1,p=n.length-1;p>=0;p--){var A={};for(var h in r)A[h]="access"===h?{}:r[h];for(var h in r.access)A.access[h]=r.access[h];A.addInitializer=function(e){if(f)throw TypeError("Cannot add initializers after decoration has completed");o.push(a(e||null))};var m=(0,n[p])("accessor"===s?{get:d.get,set:d.set}:d[l],A);if("accessor"===s){if(void 0===m)continue;if(null===m||"object"!=typeof m)throw TypeError("Object expected");(u=a(m.get))&&(d.get=u),(u=a(m.set))&&(d.set=u),(u=a(m.init))&&i.push(u)}else(u=a(m))&&("field"===s?i.push(u):d[l]=u)}c&&Object.defineProperty(c,r.name,d),f=!0},__exportStar:function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||F(t,e,n)},__extends:function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}E(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},__generator:function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function u(u){return function(s){return function(u){if(n)throw TypeError("Generator is already executing.");for(;o&&(o=0,u[0]&&(a=0)),a;)try{if(n=1,r&&(i=2&u[0]?r.return:u[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,u[1])).done)return i;switch(r=0,i&&(u=[2&u[0],i.value]),u[0]){case 0:case 1:i=u;break;case 4:return a.label++,{value:u[1],done:!1};case 5:a.label++,r=u[1],u=[0];continue;case 7:u=a.ops.pop(),a.trys.pop();continue;default:if(!(i=(i=a.trys).length>0&&i[i.length-1])&&(6===u[0]||2===u[0])){a=0;continue}if(3===u[0]&&(!i||u[1]>i[0]&&u[1]<i[3])){a.label=u[1];break}if(6===u[0]&&a.label<i[1]){a.label=i[1],i=u;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(u);break}i[2]&&a.ops.pop(),a.trys.pop();continue}u=t.call(e,a)}catch(s){u=[6,s],r=0}finally{n=i=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}([u,s])}}},__importDefault:function(e){return e&&e.__esModule?e:{default:e}},__importStar:function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&F(t,e,n);return L(t,e),t},__makeTemplateObject:function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e},__metadata:function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},__param:function(e,t){return function(n,r){t(n,r,e)}},__propKey:function(e){return"symbol"==typeof e?e:"".concat(e)},__read:U,__rest:function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)0>t.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},__runInitializers:function(e,t,n){for(var r=arguments.length>2,i=0;i<t.length;i++)n=r?t[i].call(e,n):t[i].call(e);return r?n:void 0},__setFunctionName:function(e,t,n){return"symbol"==typeof t&&(t=t.description?"[".concat(t.description,"]"):""),Object.defineProperty(e,"name",{configurable:!0,value:n?"".concat(n," ",t):t})},__spread:function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(U(arguments[t]));return e},__spreadArray:function(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))},__spreadArrays:function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;for(var r=Array(e),i=0,t=0;t<n;t++)for(var o=arguments[t],a=0,u=o.length;a<u;a++,i++)r[i]=o[a];return r},__values:j},Symbol.toStringTag,{value:"Module"})),P=R(B);var W={};function D(e){return function(t){return function(n){return n.reduce(function(t,n){return e.alt(t,function(){return n})},t)}}}let N=Object.freeze(Object.defineProperty({__proto__:null,altAll:D},Symbol.toStringTag,{value:"Module"})),q=Object.freeze(Object.defineProperty({__proto__:null,altAll:function(e){return D(e)(e.zero())}},Symbol.toStringTag,{value:"Module"}));var Q=function(e){return function(){return{meet:function(t,n){return function(r){return e.meet(t(r),n(r))}},join:function(t,n){return function(r){return e.join(t(r),n(r))}},zero:function(){return e.zero},one:function(){return e.one},implies:function(t,n){return function(r){return e.implies(t(r),n(r))}},not:function(t){return function(n){return e.not(t(n))}}}}},V=function(e){return function(){return{concat:function(t,n){return function(r){return e.concat(t(r),n(r))}}}}},z=function(e){var t=V(e);return function(){return{concat:t().concat,empty:function(){return e.empty}}}},Y=function(e){return{add:function(t,n){return function(r){return e.add(t(r),n(r))}},zero:function(){return e.zero},mul:function(t,n){return function(r){return e.mul(t(r),n(r))}},one:function(){return e.one}}},H=function(e){var t=Y(e);return{add:t.add,mul:t.mul,one:t.one,zero:t.zero,sub:function(t,n){return function(r){return e.sub(t(r),n(r))}}}},Z=function(e){return function(t){return t(e)}};function J(e){return e}function G(e){return function(){return e}}var $=G(!0),X=G(!1),ee=G(null),et=G(void 0);function en(e,t,n,r,i,o,a,u,s){switch(arguments.length){case 1:return e;case 2:return function(){return t(e.apply(this,arguments))};case 3:return function(){return n(t(e.apply(this,arguments)))};case 4:return function(){return r(n(t(e.apply(this,arguments))))};case 5:return function(){return i(r(n(t(e.apply(this,arguments)))))};case 6:return function(){return o(i(r(n(t(e.apply(this,arguments))))))};case 7:return function(){return a(o(i(r(n(t(e.apply(this,arguments)))))))};case 8:return function(){return u(a(o(i(r(n(t(e.apply(this,arguments))))))))};case 9:return function(){return s(u(a(o(i(r(n(t(e.apply(this,arguments)))))))))}}}function er(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e}function ei(e){return e+1}function eo(e){return e-1}function ea(e){throw Error("Called `absurd` function which should be uncallable")}function eu(e,t,n,r,i,o,a,u,s){switch(arguments.length){case 1:return e;case 2:return t(e);case 3:return n(t(e));case 4:return r(n(t(e)));case 5:return i(r(n(t(e))));case 6:return o(i(r(n(t(e)))));case 7:return a(o(i(r(n(t(e))))));case 8:return u(a(o(i(r(n(t(e)))))));case 9:return s(u(a(o(i(r(n(t(e))))))));default:for(var l=arguments[0],c=1;c<arguments.length;c++)l=arguments[c](l);return l}}var es=function(e,t){return t},el=function(){return{concat:function(e,t){return en(e,t)},empty:J}};let ec=Object.freeze(Object.defineProperty({__proto__:null,SK:es,absurd:ea,apply:Z,constFalse:X,constNull:ee,constTrue:$,constUndefined:et,constVoid:et,constant:G,decrement:eo,flip:function(e){return function(t,n){return e(n,t)}},flow:en,getBooleanAlgebra:Q,getEndomorphismMonoid:el,getMonoid:z,getRing:H,getSemigroup:V,getSemiring:Y,hole:ea,identity:J,increment:ei,not:function(e){return function(t){return!e(t)}},pipe:eu,tuple:er,tupled:function(e){return function(t){return e.apply(void 0,t)}},unsafeCoerce:J,untupled:function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return e(t)}}},Symbol.toStringTag,{value:"Module"}));var ed=function(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))},ef=function(e){return"None"===e._tag},ep=function(e){return"Some"===e._tag},eA={_tag:"None"},eh=function(e){return{_tag:"Some",value:e}},em=function(e){return"Left"===e._tag},eg=function(e){return"Right"===e._tag},ey=function(e){return{_tag:"Left",left:e}},ev=function(e){return{_tag:"Right",right:e}},ex=function(e){return[e]},eb=function(e){return e.length>0},eC=function(e){return e[0]},eS=function(e){return e.slice(1)},ew=[],eI={},e_=Object.prototype.hasOwnProperty,eT=function(e){return ed([e[0]],e.slice(1),!0)};function eO(e,t){return function(n){return function(r){return e.ap(e.map(r,function(e){return function(n){return t.ap(e,n)}}),n)}}}function eR(e){return function(t){return function(n){return e.ap(e.map(n,function(e){return function(){return e}}),t)}}}function ek(e){return function(t){return function(n){return e.ap(e.map(n,function(){return function(e){return e}}),t)}}}function eE(e){return function(t,n){return function(r){return e.ap(e.map(r,function(e){return function(n){var r;return Object.assign({},e,((r={})[t]=n,r))}}),n)}}}function eM(e){return function(t){return{concat:function(n,r){return e.ap(e.map(n,function(e){return function(n){return t.concat(e,n)}}),r)}}}}function eF(e,t,n){return function(r){for(var i=Array(n.length+1),o=0;o<n.length;o++)i[o]=n[o];return i[n.length]=r,0===t?e.apply(null,i):eF(e,t-1,i)}}var ej={1:function(e){return[e]},2:function(e){return function(t){return[e,t]}},3:function(e){return function(t){return function(n){return[e,t,n]}}},4:function(e){return function(t){return function(n){return function(r){return[e,t,n,r]}}}},5:function(e){return function(t){return function(n){return function(r){return function(i){return[e,t,n,r,i]}}}}}};function eU(e){return e_.call(ej,e)||(ej[e]=eF(er,e-1,[])),ej[e]}function eK(e){var t=e.length;switch(t){case 1:return function(t){var n;return(n={})[e[0]]=t,n};case 2:return function(t){return function(n){var r;return(r={})[e[0]]=t,r[e[1]]=n,r}};case 3:return function(t){return function(n){return function(r){var i;return(i={})[e[0]]=t,i[e[1]]=n,i[e[2]]=r,i}}};case 4:return function(t){return function(n){return function(r){return function(i){var o;return(o={})[e[0]]=t,o[e[1]]=n,o[e[2]]=r,o[e[3]]=i,o}}}};case 5:return function(t){return function(n){return function(r){return function(i){return function(o){var a;return(a={})[e[0]]=t,a[e[1]]=n,a[e[2]]=r,a[e[3]]=i,a[e[4]]=o,a}}}}};default:return eF(function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];for(var i={},o=0;o<t;o++)i[e[o]]=n[o];return i},t-1,[])}}let eL=Object.freeze(Object.defineProperty({__proto__:null,ap:eO,apFirst:eR,apS:eE,apSecond:ek,getApplySemigroup:eM,sequenceS:function(e){return function(t){for(var n=Object.keys(t),r=n.length,i=eK(n),o=e.map(t[n[0]],i),a=1;a<r;a++)o=e.ap(o,t[n[a]]);return o}},sequenceT:function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];for(var r=t.length,i=eU(r),o=e.map(t[0],i),a=1;a<r;a++)o=e.ap(o,t[a]);return o}}},Symbol.toStringTag,{value:"Module"}));function eB(e,t){return function(n){return function(r){return e.map(r,function(e){return t.map(e,n)})}}}function eP(e){return function(t){return function(n){return e.map(n,function(e){return e(t)})}}}function eW(e){return function(t){return function(n){return e.map(n,function(e){var n;return(n={})[t]=e,n})}}}function eD(e,t){var n=eB(e,t);return{map:function(e,t){return eu(e,n(t))}}}let eN=Object.freeze(Object.defineProperty({__proto__:null,bindTo:eW,flap:eP,getFunctorComposition:eD,map:eB},Symbol.toStringTag,{value:"Module"}));function eq(e){var t=eM(e);return function(n){return{concat:t(n).concat,empty:e.of(n.empty)}}}function eQ(e,t){var n=eD(e,t).map,r=eO(e,t);return{map:n,of:function(n){return e.of(t.of(n))},ap:function(e,t){return eu(e,r(t))}}}let eV=Object.freeze(Object.defineProperty({__proto__:null,getApplicativeComposition:eQ,getApplicativeMonoid:eq},Symbol.toStringTag,{value:"Module"}));function ez(e){return function(t){return function(n){return e.chain(n,function(n){return e.map(t(n),function(){return n})})}}}function eY(e){return function(t,n){return function(r){return e.chain(r,function(r){return e.map(n(r),function(e){var n;return Object.assign({},r,((n={})[t]=e,n))})})}}}let eH=Object.freeze(Object.defineProperty({__proto__:null,bind:eY,chainFirst:ez},Symbol.toStringTag,{value:"Module"}));function eZ(e){return function(t){return function(n){return e.fromEither(ef(n)?ey(t()):ev(n.value))}}}function eJ(e){return function(t,n){return function(r){return e.fromEither(t(r)?ev(r):ey(n(r)))}}}function eG(e){var t=eZ(e);return function(e){var n=t(e);return function(e){return en(e,n)}}}function e$(e,t){var n=eG(e);return function(e){var r=n(e);return function(e){return function(n){return t.chain(n,r(e))}}}}function eX(e){return function(t){return en(t,e.fromEither)}}function e0(e,t){var n=eX(e);return function(e){return function(r){return t.chain(r,n(e))}}}function e1(e,t){return en(eX(e),ez(t))}function e2(e,t){return function(n,r){return function(i){return t.chain(i,function(t){return e.fromEither(n(t)?ev(t):ey(r(t)))})}}}let e6=Object.freeze(Object.defineProperty({__proto__:null,chainEitherK:e0,chainFirstEitherK:e1,chainOptionK:e$,filterOrElse:e2,fromEitherK:eX,fromOption:eZ,fromOptionK:eG,fromPredicate:eJ},Symbol.toStringTag,{value:"Module"}));var e5=function(e){return{equals:function(t,n){return t===n||e(t,n)}}},e3=function(e){return e5(function(t,n){for(var r in e)if(!e[r].equals(t[r],n[r]))return!1;return!0})},e9=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e5(function(t,n){return e.every(function(e,r){return e.equals(t[r],n[r])})})},e4=function(e){return function(t){return e5(function(n,r){return t.equals(e(n),e(r))})}},e7={equals:function(e,t){return e===t}},e8={equals:function(){return!0}},te=function(){return{concat:function(e,t){return e5(function(n,r){return e.equals(n,r)&&t.equals(n,r)})}}},tt=function(){return{concat:te().concat,empty:e8}},tn={URI:"Eq",contramap:function(e,t){return eu(e,e4(t))}},tr=e7.equals;let ti=Object.freeze(Object.defineProperty({__proto__:null,Contravariant:tn,URI:"Eq",contramap:e4,eq:tn,eqBoolean:e7,eqDate:{equals:function(e,t){return e.valueOf()===t.valueOf()}},eqNumber:e7,eqStrict:e7,eqString:e7,fromEquals:e5,getMonoid:tt,getSemigroup:te,getStructEq:e3,getTupleEq:e9,strictEqual:tr,struct:e3,tuple:e9},Symbol.toStringTag,{value:"Module"}));var to=function(e){return function(t,n){return t===n||0===e(t,n)}},ta=function(e){return{equals:to(e),compare:function(t,n){return t===n?0:e(t,n)}}},tu=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return ta(function(t,n){for(var r=0;r<e.length-1;r++){var i=e[r].compare(t[r],n[r]);if(0!==i)return i}return e[r].compare(t[r],n[r])})},ts=function(e){return ta(function(t,n){return e.compare(n,t)})},tl=function(e){return function(t){return ta(function(n,r){return t.compare(e(n),e(r))})}},tc=function(){return{concat:function(e,t){return ta(function(n,r){var i=e.compare(n,r);return 0!==i?i:t.compare(n,r)})}}},td=function(){return{concat:tc().concat,empty:ta(function(){return 0})}},tf={URI:"Ord",contramap:function(e,t){return eu(e,tl(t))}},tp={equals:$,compare:G(0)},tA=function(e){return function(t){return function(n){return n===t||0===e.compare(n,t)}}},th=function(e){return function(t,n){return -1===e.compare(t,n)}},tm=function(e){return function(t,n){return 1===e.compare(t,n)}},tg=function(e){return function(t,n){return 1!==e.compare(t,n)}},ty=function(e){return function(t,n){return -1!==e.compare(t,n)}},tv=function(e){return function(t,n){return t===n||1>e.compare(t,n)?t:n}},tx=function(e){return function(t,n){return t===n||e.compare(t,n)>-1?t:n}},tb=function(e){var t=tv(e),n=tx(e);return function(e,r){return function(i){return n(t(i,r),e)}}},tC=function(e){var t=th(e),n=tm(e);return function(e,r){return function(i){return!(t(i,e)||n(i,r))}}},tS={equals:e7.equals,compare:function(e,t){return e<t?-1:e>t?1:0}},tw=eu(tS,tl(function(e){return e.valueOf()}));let tI=Object.freeze(Object.defineProperty({__proto__:null,Contravariant:tf,URI:"Ord",between:tC,clamp:tb,contramap:tl,equals:tA,equalsDefault:to,fromCompare:ta,geq:ty,getDualOrd:ts,getMonoid:td,getSemigroup:tc,getTupleOrd:tu,gt:tm,leq:tg,lt:th,max:tx,min:tv,ord:tf,ordBoolean:tS,ordDate:tw,ordNumber:tS,ordString:tS,reverse:ts,trivial:tp,tuple:tu},Symbol.toStringTag,{value:"Module"}));var t_=function(e){return{concat:function(t,n){return e.concat(n,t)}}},tT=function(e){return function(t){return{concat:function(n,r){return e(n)?t.concat(n,r):r}}}},tO=function(e){return function(t){return{concat:function(n,r){return e(r)?t.concat(n,r):n}}}},tR=function(e){return function(t){return{concat:function(n,r){return t.concat(e(n),e(r))}}}},tk=function(e){return function(t){return function(n){return n.reduce(function(t,n){return e.concat(t,n)},t)}}};let tE=Object.freeze(Object.defineProperty({__proto__:null,concatAll:tk,endo:tR,filterFirst:tT,filterSecond:tO,reverse:t_},Symbol.toStringTag,{value:"Module"}));var tM=function(e){return{concat:tv(e)}},tF=function(e){return{concat:tx(e)}},tj=function(e){return{concat:function(){return e}}},tU=function(e){return{concat:function(t,n){var r={};for(var i in e)e_.call(e,i)&&(r[i]=e[i].concat(t[i],n[i]));return r}}},tK=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return{concat:function(t,n){return e.map(function(e,r){return e.concat(t[r],n[r])})}}},tL=function(e){return function(t){return{concat:function(n,r){return t.concat(n,t.concat(e,r))}}}},tB=function(){return{concat:J}},tP=function(){return{concat:function(e,t){return t}}},tW=tj(void 0),tD=function(){return{concat:function(e,t){return Object.assign({},e,t)}}},tN={concat:function(e,t){return e&&t}},tq={concat:function(e,t){return e||t}},tQ={concat:function(e,t){return e+t}},tV={concat:function(e,t){return e+t}},tz={concat:function(e,t){return e*t}};let tY=Object.freeze(Object.defineProperty({__proto__:null,concatAll:tk,constant:tj,first:tB,fold:function(e){var t=tk(e);return function(e,n){return void 0===n?t(e):t(e)(n)}},getDualSemigroup:t_,getFirstSemigroup:tB,getFunctionSemigroup:V,getIntercalateSemigroup:tL,getJoinSemigroup:tF,getLastSemigroup:tP,getMeetSemigroup:tM,getObjectSemigroup:tD,getStructSemigroup:tU,getTupleSemigroup:tK,intercalate:tL,last:tP,max:tF,min:tM,reverse:t_,semigroupAll:tN,semigroupAny:tq,semigroupProduct:tz,semigroupString:tQ,semigroupSum:tV,semigroupVoid:tW,struct:tU,tuple:tK},Symbol.toStringTag,{value:"Module"}));var tH=function(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))},tZ=function(e,t){return e<0||e>=t.length},tJ=function(e){return function(t){return tH([e],t,!0)}},tG=function(e){return function(t){return tH(tH([],t,!0),[e],!1)}},t$=function(e,t,n){if(eb(n)){var r=eT(n);return r.splice(e,0,t),r}return[t]},tX=function(e,t,n){if(n[e]===t)return n;var r=eT(n);return r[e]=t,r},t0=function(e){return function(t){if(1===t.length)return t;for(var n=[rt(t)],r=rn(t),i=function(t){n.every(function(n){return!e.equals(n,t)})&&n.push(t)},o=0;o<r.length;o++)i(r[o]);return n}},t1=function(e){if(eb(e)){var t=td();return na(e.reduce(t.concat,t.empty))}return J},t2=function(e){var t=t0(e);return function(e){return function(n){return t(eu(n,nn(e)))}}},t6=function(e){return function(t){var n=t.length,r=Math.round(e)%n;if(tZ(Math.abs(r),t)||0===r)return t;if(!(r<0))return t6(r-n)(t);var i=nh(-r)(t),o=i[0];return eu(i[1],nn(o))}},t5=function(e){return eb(e)?eh(e):eA},t3=function(e){return function(t){for(var n=Math.max(0,Math.floor(t)),r=[e(0)],i=1;i<n;i++)r.push(e(i));return r}},t9=function(e){return t3(function(){return e})},t4=function(e,t){return e<=t?t3(function(t){return e+t})(t-e+1):[e]},t7=function(e){return[rt(e),rn(e)]},t8=function(e){return[ri(e),rr(e)]},ne=function(e){return t5(e.slice())};function nt(e){return function(t){return t.concat(e)}}function nn(e,t){return t?e.concat(t):function(t){return t.concat(e)}}var nr=function(e){return 1===e.length?e:tH([rr(e)],e.slice(0,-1).reverse(),!0)};function ni(e){return function(t){var n=t.length;if(0===n)return ew;for(var r=[],i=t[0],o=[i],a=1;a<n;a++){var u=t[a];e.equals(u,i)?o.push(u):(r.push(o),o=[i=u])}return r.push(o),r}}var no=function(e){return function(t){for(var n={},r=0;r<t.length;r++){var i=t[r],o=e(i);e_.call(n,o)?n[o].push(i):n[o]=[i]}return n}},na=function(e){return function(t){return 1===t.length?t:t.slice().sort(e.compare)}},nu=function(e,t){return ns(e,function(){return t})},ns=function(e,t){return function(n){return tZ(e,n)?eA:eh(tX(e,t(n[e]),n))}},nl=function(e,t,n){for(var r=[n(e[0],t[0])],i=Math.min(e.length,t.length),o=1;o<i;o++)r[o]=n(e[o],t[o]);return r},nc=function(e){for(var t=[e[0][0]],n=[e[0][1]],r=1;r<e.length;r++)t[r]=e[r][0],n[r]=e[r][1];return[t,n]},nd=function(e){return function(t){for(var n=[e,t[0]],r=1;r<t.length;r++)n.push(e,t[r]);return n}},nf=function(e){return function(t){var n=rn(t);return eb(n)?eu(n,nd(e),tJ(rt(t))):t}},np=function(e){return function(t){for(var n=eT(e(0,rt(t))),r=1;r<t.length;r++)n.push.apply(n,e(r,t[r]));return n}},nA=function(e){return function(t){for(var n=e(t),r=n[0],i=n[1],o=[r],a=i;eb(a);){var u=e(a),s=u[0],l=u[1];o.push(s),a=l}return o}},nh=function(e){return function(t){var n=Math.max(1,e);return n>=t.length?[t,ew]:[eu(t.slice(1,n),tJ(rt(t))),t.slice(n)]}},nm=function(e){return nA(nh(e))},ng=function(e,t){return eu(e,nB(t))},ny=function(e,t){return eu(e,nP(t))},nv=function(e,t){return eu(e,nF(t))},nx=function(e,t){return eu(e,nj(t))},nb=function(e,t){return eu(e,nU(t))},nC=function(e,t,n){return eu(e,nW(t,n))},nS=function(e){var t=nD(e);return function(e,n){return eu(e,t(n))}},nw=function(e,t,n){return eu(e,nN(t,n))},nI=function(e){var t=nz(e);return function(e,n){return eu(e,t(n))}},n_=function(e,t){return eu(e,nM(t))},nT=function(e,t,n){return eu(e,nq(t,n))},nO=function(e){var t=nQ(e);return function(e,n){return eu(e,t(n))}},nR=function(e,t,n){return eu(e,nV(t,n))},nk=function(e){var t=nH(e);return function(e,n){return eu(e,t(n))}},nE=function(e){return function(t){return eu(t,nt(e()))}},nM=nE,nF=function(e){return nj(function(t){return eu(e,nB(t))})},nj=function(e){return np(function(t,n){return e(n)})},nU=function(e){return function(t){for(var n=rn(t),r=[e(t)];eb(n);)r.push(e(n)),n=rn(n);return r}},nK=nU(J),nL=nj(J),nB=function(e){return nP(function(t,n){return e(n)})},nP=function(e){return function(t){for(var n=[e(0,rt(t))],r=1;r<t.length;r++)n.push(e(r,t[r]));return n}},nW=function(e,t){return nq(e,function(e,n,r){return t(n,r)})},nD=function(e){return function(t){return function(n){return n.slice(1).reduce(function(n,r){return e.concat(n,t(r))},t(n[0]))}}},nN=function(e,t){return nV(e,function(e,n,r){return t(n,r)})},nq=function(e,t){return function(n){return n.reduce(function(e,n,r){return t(r,e,n)},e)}},nQ=function(e){return function(t){return function(n){return n.slice(1).reduce(function(n,r,i){return e.concat(n,t(i+1,r))},t(0,n[0]))}}},nV=function(e,t){return function(n){return n.reduceRight(function(e,n,r){return t(r,n,e)},e)}},nz=function(e){var t=nH(e);return function(e){return t(function(t,n){return e(n)})}},nY=function(e){return nH(e)(es)},nH=function(e){return function(t){return function(n){for(var r=e.map(t(0,rt(n)),ex),i=1;i<n.length;i++)r=e.ap(e.map(r,function(e){return function(t){return eu(e,tG(t))}}),t(i,n[i]));return r}}},nZ="ReadonlyNonEmptyArray",nJ=function(e){return{show:function(t){return"[".concat(t.map(e.show).join(", "),"]")}}},nG=function(){return{concat:nn}},n$=function(e){return e5(function(t,n){return t.length===n.length&&t.every(function(t,r){return e.equals(t,n[r])})})},nX=function(e){var t=t2(e);return{concat:function(e,n){return t(n)(e)}}},n0={URI:nZ,map:ng},n1=eP(n0),n2={URI:nZ,map:ng,ap:nv},n6=eR(n2),n5=ek(n2),n3={URI:nZ,map:ng,ap:nv,chain:nx},n9=ez(n3),n4=ex(eI),n7=eW(n0),n8=eY(n3),re=eE(n2),rt=eC,rn=eS,rr=function(e){return e[e.length-1]},ri=function(e){return e.slice(0,-1)},ro=function(e){var t=tM(e);return function(e){return e.reduce(t.concat)}},ra=function(e){var t=tF(e);return function(e){return e.reduce(t.concat)}},ru=function(e){return function(t){return t.reduce(e.concat)}},rs=function(e){return function(t){return e(rt(t),rn(t))}},rl=function(e){return function(t){return e(ri(t),rr(t))}},rc=function(e){return function(t){return tH([e(rt(t))],rn(t),!0)}},rd=function(e){return rc(function(){return e})},rf=function(e){return function(t){return eu(ri(t),tG(e(rr(t))))}},rp=function(e){return rf(function(){return e})},rA=function(e){var t=ru(e);return function(e){return en(nf(e),t)}},rh=function(e){return function(t){return t5(t.filter(function(t,n){return e(n,t)}))}};function rm(e,t){return void 0===t?tJ(e):eu(t,tJ(e))}var rg=function(e,t){return eu(e,nn([t]))},ry=function(e,t){return function(n){return e<0||e>n.length?eA:eh(t$(e,t,n))}};let rv=Object.freeze(Object.defineProperty({__proto__:null,Alt:{URI:nZ,map:ng,alt:n_},Applicative:{URI:nZ,map:ng,ap:nv,of:ex},Apply:n2,Chain:n3,Comonad:{URI:nZ,map:ng,extend:nb,extract:eC},Do:n4,Foldable:{URI:nZ,reduce:nC,foldMap:nS,reduceRight:nw},FoldableWithIndex:{URI:nZ,reduce:nC,foldMap:nS,reduceRight:nw,reduceWithIndex:nT,foldMapWithIndex:nO,reduceRightWithIndex:nR},Functor:n0,FunctorWithIndex:{URI:nZ,map:ng,mapWithIndex:ny},Monad:{URI:nZ,map:ng,ap:nv,of:ex,chain:nx},Pointed:{URI:nZ,of:ex},Traversable:{URI:nZ,map:ng,reduce:nC,foldMap:nS,reduceRight:nw,traverse:nI,sequence:nY},TraversableWithIndex:{URI:nZ,map:ng,mapWithIndex:ny,reduce:nC,foldMap:nS,reduceRight:nw,traverse:nI,sequence:nY,reduceWithIndex:nT,foldMapWithIndex:nO,reduceRightWithIndex:nR,traverseWithIndex:nk},URI:nZ,alt:nM,altW:nE,ap:nF,apFirst:n6,apS:re,apSecond:n5,append:tG,appendW:tG,bind:n8,bindTo:n7,chain:nj,chainFirst:n9,chainWithIndex:np,chop:nA,chunksOf:nm,concat:nn,concatAll:ru,concatW:nt,cons:rm,duplicate:nK,empty:ew,extend:nU,extract:eC,filter:function(e){return rh(function(t,n){return e(n)})},filterWithIndex:rh,flap:n1,flatten:nL,fold:ru,foldMap:nD,foldMapWithIndex:nQ,fromArray:ne,fromReadonlyArray:t5,getEq:n$,getSemigroup:nG,getShow:nJ,getUnionSemigroup:nX,group:ni,groupBy:no,groupSort:function(e){var t=na(e),n=ni(e);return function(e){return eb(e)?n(t(e)):ew}},head:rt,init:ri,insertAt:ry,intercalate:rA,intersperse:nf,isNonEmpty:eb,isOutOfBound:tZ,last:rr,makeBy:t3,map:nB,mapWithIndex:nP,matchLeft:rs,matchRight:rl,max:ra,min:ro,modifyAt:ns,modifyHead:rc,modifyLast:rf,of:ex,prepend:tJ,prependAll:nd,prependToAll:nd,prependW:tJ,range:t4,readonlyNonEmptyArray:{URI:nZ,of:ex,map:ng,mapWithIndex:ny,ap:nv,chain:nx,extend:nb,extract:eC,reduce:nC,foldMap:nS,reduceRight:nw,traverse:nI,sequence:nY,reduceWithIndex:nT,foldMapWithIndex:nO,reduceRightWithIndex:nR,traverseWithIndex:nk,alt:n_},reduce:nW,reduceRight:nN,reduceRightWithIndex:nV,reduceWithIndex:nq,replicate:t9,reverse:nr,rotate:t6,sequence:nY,snoc:rg,sort:na,sortBy:t1,splitAt:nh,tail:rn,traverse:nz,traverseWithIndex:nH,unappend:t8,uncons:t7,union:t2,uniq:t0,unprepend:t7,unsafeInsertAt:t$,unsafeUpdateAt:tX,unsnoc:t8,unzip:nc,updateAt:nu,updateHead:rd,updateLast:rp,zip:function e(t,n){return void 0===n?function(n){return e(n,t)}:nl(t,n,function(e,t){return[e,t]})},zipWith:nl},Symbol.toStringTag,{value:"Module"}));var rx=function(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))},rb=function(e){return e.length>0},rC=function(e,t){return e<0||e>=t.length},rS=function(e){return function(t){return rx([e],t,!0)}},rw=function(e){return function(t){return rx(rx([],t,!0),[e],!1)}},rI=function(e,t,n){if(rb(n)){var r=rE(n);return r.splice(e,0,t),r}return[t]},r_=function(e,t,n){var r=rE(n);return r[e]=t,r},rT=function(e){return function(t){if(1===t.length)return rY(t);for(var n=[iP(t)],r=iW(t),i=function(t){n.every(function(n){return!e.equals(n,t)})&&n.push(t)},o=0;o<r.length;o++)i(r[o]);return n}},rO=function(e){if(rb(e)){var t=td();return rq(e.reduce(t.concat,t.empty))}return rY},rR=function(e){var t=rT(e);return function(e){return function(n){return t(eu(n,rP(e)))}}},rk=function(e){return function(t){var n=t.length,r=Math.round(e)%n;if(rC(Math.abs(r),t)||0===r)return rY(t);if(!(r<0))return rk(r-n)(t);var i=r1(-r)(t),o=i[0];return eu(i[1],rP(o))}},rE=eT,rM=function(e){return rb(e)?eh(e):eA},rF=function(e){return function(t){for(var n=Math.max(0,Math.floor(t)),r=[e(0)],i=1;i<n;i++)r.push(e(i));return r}},rj=function(e){return rF(function(){return e})},rU=function(e,t){return e<=t?rF(function(t){return e+t})(t-e+1):[e]},rK=function(e){return[iP(e),iW(e)]},rL=function(e){return[iN(e),iD(e)]};function rB(e){return function(t){return t.concat(e)}}function rP(e,t){return t?e.concat(t):function(t){return t.concat(e)}}var rW=function(e){return rx([iD(e)],e.slice(0,-1).reverse(),!0)};function rD(e){return function(t){var n=t.length;if(0===n)return[];for(var r=[],i=t[0],o=[i],a=1;a<n;a++){var u=t[a];e.equals(u,i)?o.push(u):(r.push(o),o=[i=u])}return r.push(o),r}}var rN=function(e){return function(t){for(var n={},r=0;r<t.length;r++){var i=t[r],o=e(i);e_.call(n,o)?n[o].push(i):n[o]=[i]}return n}},rq=function(e){return function(t){return t.slice().sort(e.compare)}},rQ=function(e,t){return function(n){return e<0||e>n.length?eA:eh(rI(e,t,n))}},rV=function(e,t){return rz(e,function(){return t})},rz=function(e,t){return function(n){return rC(e,n)?eA:eh(r_(e,t(n[e]),n))}},rY=rE,rH=function(e){return[e]},rZ=function(e,t,n){for(var r=[n(e[0],t[0])],i=Math.min(e.length,t.length),o=1;o<i;o++)r[o]=n(e[o],t[o]);return r},rJ=function(e){for(var t=[e[0][0]],n=[e[0][1]],r=1;r<e.length;r++)t[r]=e[r][0],n[r]=e[r][1];return[t,n]},rG=function(e){return function(t){for(var n=[e,t[0]],r=1;r<t.length;r++)n.push(e,t[r]);return n}},r$=function(e){return function(t){var n=iW(t);return rb(n)?eu(n,rG(e),rS(iP(t))):rY(t)}},rX=function(e){return function(t){for(var n=rE(e(0,iP(t))),r=1;r<t.length;r++)n.push.apply(n,e(r,t[r]));return n}},r0=function(e){return function(t){for(var n=e(t),r=n[0],i=n[1],o=[r],a=i;rb(a);){var u=e(a),s=u[0],l=u[1];o.push(s),a=l}return o}},r1=function(e){return function(t){var n=Math.max(1,e);return n>=t.length?[rY(t),[]]:[eu(t.slice(1,n),rS(iP(t))),t.slice(n)]}},r2=function(e){return r0(r1(e))},r6=function(e,t){return eu(e,im(t))},r5=function(e,t){return eu(e,ig(t))},r3=function(e,t){return eu(e,ic(t))},r9=function(e,t){return eu(e,id(t))},r4=function(e,t){return eu(e,ip(t))},r7=function(e,t,n){return eu(e,iy(t,n))},r8=function(e){var t=nD(e);return function(e,n){return eu(e,t(n))}},ie=function(e,t,n){return eu(e,ix(t,n))},it=function(e){var t=iC(e);return function(e,n){return eu(e,t(n))}},ir=function(e,t){return eu(e,il(t))},ii=function(e,t,n){return eu(e,iv(t,n))},io=function(e){var t=nQ(e);return function(e,n){return eu(e,t(n))}},ia=function(e,t,n){return eu(e,ib(t,n))},iu=function(e){var t=iw(e);return function(e,n){return eu(e,t(n))}},is=function(e){return function(t){return eu(t,rB(e()))}},il=is,ic=function(e){return id(function(t){return eu(e,im(t))})},id=function(e){return rX(function(t,n){return e(n)})},ip=function(e){return function(t){for(var n=iW(t),r=[e(t)];rb(n);)r.push(e(n)),n=iW(n);return r}},iA=ip(J),ih=id(J),im=function(e){return ig(function(t,n){return e(n)})},ig=function(e){return function(t){for(var n=[e(0,iP(t))],r=1;r<t.length;r++)n.push(e(r,t[r]));return n}},iy=nW,iv=nq,ix=nN,ib=nV,iC=function(e){var t=iw(e);return function(e){return t(function(t,n){return e(n)})}},iS=function(e){return iw(e)(function(e,t){return t})},iw=function(e){return function(t){return function(n){for(var r=e.map(t(0,iP(n)),rH),i=1;i<n.length;i++)r=e.ap(e.map(r,function(e){return function(t){return eu(e,rw(t))}}),t(i,n[i]));return r}}},iI="NonEmptyArray",i_=function(){return{concat:rP}},iT=function(e){var t=rR(e);return{concat:function(e,n){return t(n)(e)}}},iO={URI:iI,map:r6},iR=eP(iO),ik={URI:iI,map:r6,ap:r3},iE=eR(ik),iM=ek(ik),iF={URI:iI,map:r6,ap:r3,chain:r9},ij=ez(iF),iU=rH(eI),iK=eW(iO),iL=eY(iF),iB=eE(ik),iP=rt,iW=function(e){return e.slice(1)},iD=rr,iN=function(e){return e.slice(0,-1)},iq=function(e){return function(t){return t.reduce(e.concat)}},iQ=function(e){return function(t){return e(iP(t),iW(t))}},iV=function(e){return function(t){return e(iN(t),iD(t))}},iz=function(e){return function(t){return rx([e(iP(t))],iW(t),!0)}},iY=function(e){return iz(function(){return e})},iH=function(e){return function(t){return eu(iN(t),rw(e(iD(t))))}},iZ=function(e){return iH(function(){return e})},iJ=function(e){return function(t){return rM(t.filter(function(t,n){return e(n,t)}))}};function iG(e,t){return void 0===t?rS(e):eu(t,rS(e))}var i$=function(e,t){return eu(e,rw(t))};let iX=Object.freeze(Object.defineProperty({__proto__:null,Alt:{URI:iI,map:r6,alt:ir},Applicative:{URI:iI,map:r6,ap:r3,of:rH},Apply:ik,Chain:iF,Comonad:{URI:iI,map:r6,extend:r4,extract:rt},Do:iU,Foldable:{URI:iI,reduce:r7,foldMap:r8,reduceRight:ie},FoldableWithIndex:{URI:iI,reduce:r7,foldMap:r8,reduceRight:ie,reduceWithIndex:ii,foldMapWithIndex:io,reduceRightWithIndex:ia},Functor:iO,FunctorWithIndex:{URI:iI,map:r6,mapWithIndex:r5},Monad:{URI:iI,map:r6,ap:r3,of:rH,chain:r9},Pointed:{URI:iI,of:rH},Traversable:{URI:iI,map:r6,reduce:r7,foldMap:r8,reduceRight:ie,traverse:it,sequence:iS},TraversableWithIndex:{URI:iI,map:r6,mapWithIndex:r5,reduce:r7,foldMap:r8,reduceRight:ie,traverse:it,sequence:iS,reduceWithIndex:ii,foldMapWithIndex:io,reduceRightWithIndex:ia,traverseWithIndex:iu},URI:iI,alt:il,altW:is,ap:ic,apFirst:iE,apS:iB,apSecond:iM,append:rw,appendW:rw,bind:iL,bindTo:iK,chain:id,chainFirst:ij,chainWithIndex:rX,chop:r0,chunksOf:r2,concat:rP,concatAll:iq,concatW:rB,cons:iG,copy:rY,duplicate:iA,extend:ip,extract:rt,filter:function(e){return iJ(function(t,n){return e(n)})},filterWithIndex:iJ,flap:iR,flatten:ih,fold:ru,foldMap:nD,foldMapWithIndex:nQ,fromArray:rM,fromReadonlyNonEmptyArray:rE,getEq:n$,getSemigroup:i_,getShow:nJ,getUnionSemigroup:iT,group:rD,groupBy:rN,groupSort:function(e){var t=rq(e),n=rD(e);return function(e){return rb(e)?n(t(e)):[]}},head:iP,init:iN,insertAt:rQ,intercalate:rA,intersperse:r$,isNonEmpty:rb,isOutOfBound:rC,last:iD,makeBy:rF,map:im,mapWithIndex:ig,matchLeft:iQ,matchRight:iV,max:ra,min:ro,modifyAt:rz,modifyHead:iz,modifyLast:iH,nonEmptyArray:{URI:iI,of:rH,map:r6,mapWithIndex:r5,ap:r3,chain:r9,extend:r4,extract:rt,reduce:r7,foldMap:r8,reduceRight:ie,traverse:it,sequence:iS,reduceWithIndex:ii,foldMapWithIndex:io,reduceRightWithIndex:ia,traverseWithIndex:iu,alt:ir},of:rH,prepend:rS,prependAll:rG,prependToAll:rG,prependW:rS,range:rU,reduce:iy,reduceRight:ix,reduceRightWithIndex:ib,reduceWithIndex:iv,replicate:rj,reverse:rW,rotate:rk,sequence:iS,snoc:i$,sort:rq,sortBy:rO,splitAt:r1,tail:iW,traverse:iC,traverseWithIndex:iw,unappend:rL,uncons:rK,union:rR,uniq:rT,unprepend:rK,unsafeInsertAt:rI,unsafeUpdateAt:r_,unsnoc:rL,unzip:rJ,updateAt:rV,updateHead:iY,updateLast:iZ,zip:function e(t,n){return void 0===n?function(n){return e(n,t)}:rZ(t,n,function(e,t){return[e,t]})},zipWith:rZ},Symbol.toStringTag,{value:"Module"}));var i0=function(e){return"number"==typeof e},i1={equals:function(e,t){return e===t}},i2={equals:i1.equals,compare:function(e,t){return e<t?-1:e>t?1:0}},i6={equals:i1.equals,compare:i2.compare,top:1/0,bottom:-1/0},i5={concat:function(e,t){return e-t}},i3={concat:function(e,t){return e+t}},i9={concat:function(e,t){return e*t}},i4={concat:i3.concat,empty:0},i7={concat:i9.concat,empty:1},i8={add:i3.concat,zero:0,mul:i9.concat,one:1,sub:i5.concat,degree:function(e){return 1},div:function(e,t){return e/t},mod:function(e,t){return e%t}};let oe=Object.freeze(Object.defineProperty({__proto__:null,Bounded:i6,Eq:i1,Field:i8,MagmaSub:i5,MonoidProduct:i7,MonoidSum:i4,Ord:i2,SemigroupProduct:i9,SemigroupSum:i3,Show:{show:function(e){return JSON.stringify(e)}},isNumber:i0},Symbol.toStringTag,{value:"Module"}));var ot=function(e,t){return{left:e,right:t}},on=function(e,t){return eu(e,oo(t))},or=function(e,t,n){return eu(e,oa(t,n))},oi=function(e){return function(t){return ot(od(t),e(of(t)))}},oo=function(e){return function(t){return ot(e(od(t)),of(t))}},oa=function(e,t){return function(n){return ot(e(od(n)),t(of(n)))}},ou="Separated",ol={URI:ou,map:function(e,t){return eu(e,oi(t))}},oc=eP(ol),od=function(e){return e.left},of=function(e){return e.right};let op=Object.freeze(Object.defineProperty({__proto__:null,Bifunctor:{URI:ou,mapLeft:on,bimap:or},Functor:ol,URI:ou,bimap:oa,flap:oc,left:od,map:oi,mapLeft:oo,right:of,separated:ot},Symbol.toStringTag,{value:"Module"}));function oA(e,t){return function(n){var r=e.traverse(n);return function(e,i){return n.map(r(e,i),t.separate)}}}function oh(e,t){return function(n){var r=e.traverse(n);return function(e,i){return n.map(r(e,i),t.compact)}}}function om(e){return function(t){var n=e.wither(t);return function(e){return function(r){return n(r,function(n){return t.map(e(n),function(e){return e?eh(n):eA})})}}}}let og=Object.freeze(Object.defineProperty({__proto__:null,filterE:om,wiltDefault:oA,witherDefault:oh},Symbol.toStringTag,{value:"Module"}));function oy(e,t){return function(n){return n?t.of(void 0):e.zero()}}let ov=Object.freeze(Object.defineProperty({__proto__:null,guard:oy},Symbol.toStringTag,{value:"Module"}));var ox=function(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))},ob=function(e){return 0===e.length},oC=function(e,t){return e<=0?uU:t3(t)(e)},oS=function(e,t){return oC(e,function(){return t})},ow=function(e){return ef(e)?uU:[e.value]},oI=function(e){return em(e)?uU:[e.right]},o_=function(e,t){return function(n){return eb(n)?t(n):e()}},oT=function(e,t){return function(n){return eb(n)?t(rt(n),rn(n)):e()}},oO=function(e,t){return function(n){return eb(n)?t(ri(n),rr(n)):e()}},oR=function(e){return function(t){if(ob(t))return uU;for(var n=[],r=0;r<t.length;r++)n.push.apply(n,e(r,t[r]));return n}},ok=function(e,t){return function(n){var r=n.length,i=Array(r+1);i[0]=e;for(var o=0;o<r;o++)i[o+1]=t(i[o],n[o]);return i}},oE=function(e,t){return function(n){var r=n.length,i=Array(r+1);i[r]=e;for(var o=r-1;o>=0;o--)i[o]=t(n[o],i[o+1]);return i}},oM=function(e){return e.length};function oF(e,t){return void 0===t?function(t){return oF(e,t)}:tZ(e,t)?eA:eh(t[e])}var oj=function(e){return eb(e)?eh(rt(e)):eA},oU=function(e){return eb(e)?eh(rr(e)):eA},oK=function(e){return eb(e)?eh(rn(e)):eA},oL=function(e){return eb(e)?eh(ri(e)):eA},oB=function(e){return function(t){return tZ(e,t)?t:0===e?uU:t.slice(0,e)}},oP=function(e){return function(t){return tZ(e,t)?t:0===e?uU:t.slice(-e)}},oW=function(e,t){for(var n=e.length,r=0;r<n&&t(e[r]);r++);return r},oD=function(e){return function(t){return e<=0||ob(t)?t:e>=t.length?uU:t.slice(e,t.length)}},oN=function(e){return function(t){return e<=0||ob(t)?t:e>=t.length?uU:t.slice(0,t.length-e)}},oq=function(e){return function(t){for(var n=0;n<t.length;n++)if(e(t[n]))return eh(n);return eA}};function oQ(e){return function(t){for(var n=0;n<t.length;n++)if(e(t[n]))return eh(t[n]);return eA}}var oV=function(e){return function(t){for(var n=0;n<t.length;n++){var r=e(t[n]);if(ep(r))return r}return eA}};function oz(e){return function(t){for(var n=t.length-1;n>=0;n--)if(e(t[n]))return eh(t[n]);return eA}}var oY=function(e){return function(t){for(var n=t.length-1;n>=0;n--){var r=e(t[n]);if(ep(r))return r}return eA}},oH=function(e){return function(t){for(var n=t.length-1;n>=0;n--)if(e(t[n]))return eh(n);return eA}},oZ=function(e,t){return function(n){return e<0||e>n.length?eA:eh(t$(e,t,n))}},oJ=function(e,t){return o$(e,function(){return t})},oG=function(e){return function(t){return tZ(e,t)?eA:eh(uM(e,t))}},o$=function(e,t){return function(n){return tZ(e,n)?eA:eh(uE(e,t(n[e]),n))}},oX=function(e){return e.length<=1?e:e.slice().reverse()},o0=function(e){for(var t=[],n=0;n<e.length;n++){var r=e[n];"Right"===r._tag&&t.push(r.right)}return t},o1=function(e){for(var t=[],n=0;n<e.length;n++){var r=e[n];"Left"===r._tag&&t.push(r.left)}return t},o2=function(e){return function(t){return t.length<=1?t:t.slice().sort(e.compare)}},o6=function(e,t,n){for(var r=[],i=Math.min(e.length,t.length),o=0;o<i;o++)r[o]=n(e[o],t[o]);return r},o5=function(e){for(var t=[],n=[],r=0;r<e.length;r++)t[r]=e[r][0],n[r]=e[r][1];return[t,n]},o3=function(e){var t=nd(e);return function(e){return eb(e)?t(e):e}},o9=function(e){var t=nf(e);return function(e){return eb(e)?t(e):e}},o4=function(e){var t=t6(e);return function(e){return eb(e)?t(e):e}};function o7(e){return function(t,n){if(void 0===n){var r,i=o7(e);return function(e){return i(t,e)}}for(var o=0;o<n.length;o++)if(r=n[o],e.equals(r,t))return!0;return!1}}var o8=function(e){var t=t0(e);return function(e){return eb(e)?t(e):e}},ae=function(e){var t=t1(e);return function(e){return eb(e)?t(e):e}},at=function(e){var t=nA(e);return function(e){return eb(e)?t(e):uU}},an=function(e){return function(t){return e>=1&&eb(t)?nh(e)(t):ob(t)?[t,uU]:[uU,t]}},ar=function(e){var t=nm(e);return function(e){return eb(e)?t(e):uU}},ai=function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return ow(e.apply(void 0,t))}},ao=function(e){return function(t){return ob(t)?e:ob(e)?t:t.concat(e)}};function aa(e){var t=t2(e);return function(n,r){if(void 0===r){var i=aa(e);return function(e){return i(e,n)}}return eb(n)&&eb(r)?t(r)(n):eb(n)?n:r}}function au(e){var t=o7(e);return function(n,r){if(void 0===r){var i=au(e);return function(e){return i(e,n)}}return n.filter(function(e){return t(e,r)})}}function as(e){var t=o7(e);return function(n,r){if(void 0===r){var i=as(e);return function(e){return i(e,n)}}return n.filter(function(e){return!t(e,r)})}}var al=function(e,t){return eu(e,aP(t))},ac=function(e,t){return eu(e,aW(t))},ad=function(e,t){return eu(e,aK(t))},af=function(e,t){return eu(e,aL(t))},ap=function(e,t){return eu(e,aN(t))},aA=function(e,t){return eu(e,aQ(t))},ah=function(e,t){return eu(e,az(t))},am=function(e,t){return eu(e,aH(t))},ag=function(e,t){return eu(e,aY(t))},ay=function(e,t){return eu(e,aZ(t))},av=function(e,t){return eu(e,aU(t))},ax=function(e,t,n){return eu(e,a0(t,n))},ab=function(e){var t=a1(e);return function(e,n){return eu(e,t(n))}},aC=function(e,t,n){return eu(e,a6(t,n))},aS=function(e,t,n){return eu(e,a2(t,n))},aw=function(e){var t=aX(e);return function(e,n){return eu(e,t(n))}},aI=function(e,t,n){return eu(e,a5(t,n))},a_=function(e,t){return eu(e,aq(t))},aT=function(e,t){return eu(e,aJ(t))},aO=function(e,t){return eu(e,aG(t))},aR=function(e){var t=a3(e);return function(e,n){return eu(e,t(n))}},ak=function(e){var t=a4(e);return function(e,n){return eu(e,t(n))}},aE=function(e,t){return eu(e,uS(t))},aM=function(e,t){return eu(e,uw(t))},aF=function(){return uU},aj=function(e){return function(t){return t.concat(e())}},aU=aj,aK=function(e){return aL(function(t){return eu(e,aP(t))})},aL=function(e){return function(t){return eu(t,oR(function(t,n){return e(n)}))}},aB=aL(J),aP=function(e){return function(t){return t.map(function(t){return e(t)})}},aW=function(e){return function(t){return t.map(function(t,n){return e(n,t)})}},aD=function(e){for(var t=[],n=[],r=0;r<e.length;r++){var i=e[r];"Left"===i._tag?t.push(i.left):n.push(i.right)}return ot(t,n)},aN=function(e){return function(t){return t.filter(e)}},aq=function(e){return function(t){for(var n=[],r=0;r<t.length;r++){var i=e(r,t[r]);ep(i)&&n.push(i.value)}return n}},aQ=function(e){return aq(function(t,n){return e(n)})},aV=aQ(J),az=function(e){return aY(function(t,n){return e(n)})},aY=function(e){return function(t){for(var n=[],r=[],i=0;i<t.length;i++){var o=t[i];e(i,o)?r.push(o):n.push(o)}return ot(n,r)}},aH=function(e){return aZ(function(t,n){return e(n)})},aZ=function(e){return function(t){for(var n=[],r=[],i=0;i<t.length;i++){var o=e(i,t[i]);"Left"===o._tag?n.push(o.left):r.push(o.right)}return ot(n,r)}},aJ=function(e){return function(t){return t.filter(function(t,n){return e(n,t)})}},aG=function(e){return function(t){return t.map(function(n,r){return e(t.slice(r))})}},a$=aG(J),aX=function(e){return function(t){return function(n){return n.reduce(function(n,r,i){return e.concat(n,t(i,r))},e.empty)}}},a0=function(e,t){return a2(e,function(e,n,r){return t(n,r)})},a1=function(e){var t=aX(e);return function(e){return t(function(t,n){return e(n)})}},a2=function(e,t){return function(n){for(var r=n.length,i=e,o=0;o<r;o++)i=t(o,i,n[o]);return i}},a6=function(e,t){return a5(e,function(e,n,r){return t(n,r)})},a5=function(e,t){return function(n){return n.reduceRight(function(e,n,r){return t(r,n,e)},e)}},a3=function(e){var t=a4(e);return function(e){return t(function(t,n){return e(n)})}},a9=function(e){return function(t){return ax(t,e.of(aF()),function(t,n){return e.ap(e.map(t,function(e){return function(t){return eu(e,tG(t))}}),n)})}},a4=function(e){return function(t){return a2(e.of(aF()),function(n,r,i){return e.ap(e.map(r,function(e){return function(t){return eu(e,tG(t))}}),t(n,i))})}},a7=function(e){var t=uI(e);return function(e){return function(n){return t(n,e)}}},a8=function(e){var t=u_(e);return function(e){return function(n){return t(n,e)}}},ue=function(e,t){for(var n=[],r=e;;){var i=t(r);if(ep(i)){var o=i.value,a=o[0],u=o[1];n.push(a),r=u}else break}return n},ut="ReadonlyArray",un=function(e){return{show:function(t){return"[".concat(t.map(e.show).join(", "),"]")}}},ur=function(){return{concat:function(e,t){return ob(e)?t:ob(t)?e:e.concat(t)}}},ui=function(){return{concat:ur().concat,empty:uU}},uo=function(e){return e5(function(t,n){return t.length===n.length&&t.every(function(t,r){return e.equals(t,n[r])})})},ua=function(e){return ta(function(t,n){for(var r=t.length,i=n.length,o=Math.min(r,i),a=0;a<o;a++){var u=e.compare(t[a],n[a]);if(0!==u)return u}return i2.compare(r,i)})},uu=function(e){var t=aa(e);return{concat:function(e,n){return t(n)(e)}}},us=function(e){return{concat:uu(e).concat,empty:uU}},ul=function(e){var t=au(e);return{concat:function(e,n){return t(n)(e)}}},uc=function(e){var t=as(e);return{concat:function(e,n){return t(n)(e)}}},ud={URI:ut,map:al},uf=eP(ud),up={URI:ut,of:ex},uA={URI:ut,map:al,ap:ad},uh=eR(uA),um=ek(uA),ug={URI:ut,map:al,ap:ad,chain:af},uy=ez(ug),uv={URI:ut,zero:aF},ux=oy(uv,up),ub={URI:ut,compact:aV,separate:aD},uC={URI:ut,map:al,reduce:ax,foldMap:ab,reduceRight:aC,traverse:aR,sequence:a9},uS=function(e){return function(t){for(var n=ox([],e(t),!0),r=[];n.length>0;){var i=n.shift();em(i)?n.unshift.apply(n,e(i.left)):r.push(i.right)}return r}},uw=function(e){return function(t){var n=e(t),r=[],i=[];function o(t){em(t)?e(t.left).forEach(function(e){return r.push(e)}):i.push(t.right)}for(var a=0;a<n.length;a++)o(n[a]);for(;r.length>0;)o(r.shift());return i}},uI=oh(uC,ub),u_=oA(uC,ub),uT={URI:ut,map:al,compact:aV,separate:aD,filter:ap,filterMap:aA,partition:ah,partitionMap:am,reduce:ax,foldMap:ab,reduceRight:aC,traverse:aR,sequence:a9,wither:uI,wilt:u_},uO=om(uT),uR={URI:ut,fromEither:oI},uk=eX(uR),uE=function(e,t,n){return eb(n)?tX(e,t,n):n},uM=function(e,t){var n=t.slice();return n.splice(e,1),n},uF=function(e){return e.slice()},uj=function(e){return ob(e)?uU:e.slice()},uU=ew;function uK(e){return function(t){return t.every(e)}}var uL=function(e){return function(t){return t.some(e)}},uB=function(e){var t=rA(e);return function(n){return o_(function(){return e.empty},t(n))}},uP=ex(eI),uW=eW(ud),uD=eY(ug),uN=eE(uA);let uq=Object.freeze(Object.defineProperty({__proto__:null,Alt:{URI:ut,map:al,alt:av},Alternative:{URI:ut,map:al,ap:ad,of:ex,alt:av,zero:aF},Applicative:{URI:ut,map:al,ap:ad,of:ex},Apply:uA,Chain:ug,ChainRecBreadthFirst:{URI:ut,map:al,ap:ad,chain:af,chainRec:aM},ChainRecDepthFirst:{URI:ut,map:al,ap:ad,chain:af,chainRec:aE},Compactable:ub,Do:uP,Extend:{URI:ut,map:al,extend:aO},Filterable:{URI:ut,map:al,compact:aV,separate:aD,filter:ap,filterMap:aA,partition:ah,partitionMap:am},FilterableWithIndex:{URI:ut,map:al,mapWithIndex:ac,compact:aV,separate:aD,filter:ap,filterMap:aA,partition:ah,partitionMap:am,partitionMapWithIndex:ay,partitionWithIndex:ag,filterMapWithIndex:a_,filterWithIndex:aT},Foldable:{URI:ut,reduce:ax,foldMap:ab,reduceRight:aC},FoldableWithIndex:{URI:ut,reduce:ax,foldMap:ab,reduceRight:aC,reduceWithIndex:aS,foldMapWithIndex:aw,reduceRightWithIndex:aI},FromEither:uR,Functor:ud,FunctorWithIndex:{URI:ut,map:al,mapWithIndex:ac},Monad:{URI:ut,map:al,ap:ad,of:ex,chain:af},Pointed:up,Traversable:uC,TraversableWithIndex:{URI:ut,map:al,mapWithIndex:ac,reduce:ax,foldMap:ab,reduceRight:aC,reduceWithIndex:aS,foldMapWithIndex:aw,reduceRightWithIndex:aI,traverse:aR,sequence:a9,traverseWithIndex:ak},URI:ut,Unfoldable:{URI:ut,unfold:ue},Witherable:uT,Zero:uv,_chainRecBreadthFirst:aM,_chainRecDepthFirst:aE,alt:aU,altW:aj,ap:aK,apFirst:uh,apS:uN,apSecond:um,append:tG,appendW:tG,bind:uD,bindTo:uW,chain:aL,chainFirst:uy,chainRecBreadthFirst:uw,chainRecDepthFirst:uS,chainWithIndex:oR,chop:at,chunksOf:ar,compact:aV,comprehension:function(e,t,n){void 0===n&&(n=function(){return!0});var r=function(e,i){return eb(i)?eu(rt(i),aL(function(t){return r(eu(e,tG(t)),rn(i))})):n.apply(void 0,e)?[t.apply(void 0,e)]:uU};return r(uU,e)},concat:ao,concatW:ao,cons:rm,deleteAt:oG,difference:as,dropLeft:oD,dropLeftWhile:function(e){return function(t){var n=oW(t,e);return 0===n?t:n===t.length?uU:t.slice(n)}},dropRight:oN,duplicate:a$,elem:o7,empty:uU,every:uK,exists:uL,extend:aG,filter:aN,filterE:uO,filterMap:aQ,filterMapWithIndex:aq,filterWithIndex:aJ,findFirst:oQ,findFirstMap:oV,findIndex:oq,findLast:oz,findLastIndex:oH,findLastMap:oY,flap:uf,flatten:aB,foldLeft:oT,foldMap:a1,foldMapWithIndex:aX,foldRight:oO,fromArray:uj,fromEither:oI,fromEitherK:uk,fromOption:ow,fromOptionK:ai,fromPredicate:function(e){return function(t){return e(t)?[t]:uU}},getDifferenceMagma:uc,getEq:uo,getIntersectionSemigroup:ul,getMonoid:ui,getOrd:ua,getSemigroup:ur,getShow:un,getUnionMonoid:us,getUnionSemigroup:uu,guard:ux,head:oj,init:oL,insertAt:oZ,intercalate:uB,intersection:au,intersperse:o9,isEmpty:ob,isNonEmpty:eb,isOutOfBound:tZ,last:oU,lefts:o1,lookup:oF,makeBy:oC,map:aP,mapWithIndex:aW,match:o_,matchLeft:oT,matchLeftW:oT,matchRight:oO,matchRightW:oO,matchW:o_,modifyAt:o$,of:ex,partition:az,partitionMap:aH,partitionMapWithIndex:aZ,partitionWithIndex:aY,prepend:tJ,prependAll:o3,prependToAll:o3,prependW:tJ,range:t4,readonlyArray:{URI:ut,compact:aV,separate:aD,map:al,ap:ad,of:ex,chain:af,filter:ap,filterMap:aA,partition:ah,partitionMap:am,mapWithIndex:ac,partitionMapWithIndex:ay,partitionWithIndex:ag,filterMapWithIndex:a_,filterWithIndex:aT,alt:av,zero:aF,unfold:ue,reduce:ax,foldMap:ab,reduceRight:aC,traverse:aR,sequence:a9,reduceWithIndex:aS,foldMapWithIndex:aw,reduceRightWithIndex:aI,traverseWithIndex:ak,extend:aO,wither:uI,wilt:u_},reduce:a0,reduceRight:a6,reduceRightWithIndex:a5,reduceWithIndex:a2,replicate:oS,reverse:oX,rights:o0,rotate:o4,scanLeft:ok,scanRight:oE,separate:aD,sequence:a9,size:oM,snoc:rg,some:uL,sort:o2,sortBy:ae,spanLeft:function(e){return function(t){var n,r=an(oW(t,e))(t);return{init:r[0],rest:r[1]}}},splitAt:an,tail:oK,takeLeft:oB,takeLeftWhile:function(e){return function(t){for(var n=[],r=0;r<t.length;r++){var i=t[r];if(!e(i))break;n.push(i)}var o=n.length;return o===t.length?t:0===o?uU:n}},takeRight:oP,toArray:uF,traverse:a3,traverseWithIndex:a4,unfold:ue,union:aa,uniq:o8,unsafeDeleteAt:uM,unsafeInsertAt:t$,unsafeUpdateAt:uE,unzip:o5,updateAt:oJ,wilt:a8,wither:a7,zero:aF,zip:function e(t,n){return void 0===n?function(n){return e(n,t)}:o6(t,n,function(e,t){return[e,t]})},zipWith:o6},Symbol.toStringTag,{value:"Module"}));var uQ=function(e){return 0===e.length},uV=function(e,t){return e<=0?[]:rF(t)(e)},uz=function(e,t){return uV(e,function(){return t})},uY=function(e){return ef(e)?[]:[e.value]},uH=function(e){return em(e)?[]:[e.right]},uZ=function(e,t){return function(n){return rb(n)?t(n):e()}},uJ=function(e,t){return function(n){return rb(n)?t(iP(n),iW(n)):e()}},uG=function(e,t){return function(n){return rb(n)?t(iN(n),iD(n)):e()}},u$=function(e){return function(t){for(var n=[],r=0;r<t.length;r++)n.push.apply(n,e(r,t[r]));return n}},uX=function(e,t){return function(n){var r=n.length,i=Array(r+1);i[0]=e;for(var o=0;o<r;o++)i[o+1]=t(i[o],n[o]);return i}},u0=function(e,t){return function(n){var r=n.length,i=Array(r+1);i[r]=e;for(var o=r-1;o>=0;o--)i[o]=t(n[o],i[o+1]);return i}},u1=function(e){return e.length},u2=function(e){return rb(e)?eh(iW(e)):eA},u6=function(e){return rb(e)?eh(iN(e)):eA},u5=function(e){return function(t){return rC(e,t)?st(t):t.slice(0,e)}},u3=function(e){return function(t){return rC(e,t)?st(t):0===e?[]:t.slice(-e)}},u9=function(e,t){for(var n=e.length,r=0;r<n&&t(e[r]);r++);return r},u4=function(e){return function(t){return e<=0||uQ(t)?st(t):e>=t.length?[]:t.slice(e,t.length)}},u7=function(e){return function(t){return e<=0||uQ(t)?st(t):e>=t.length?[]:t.slice(0,t.length-e)}};function u8(e){return oQ(e)}function se(e){return oz(e)}var st=function(e){return e.slice()},sn=function(e,t){return function(n){return e<0||e>n.length?eA:eh(lD(e,t,n))}},sr=function(e,t){return so(e,function(){return t})},si=function(e){return function(t){return rC(e,t)?eA:eh(lq(e,t))}},so=function(e,t){return function(n){return rC(e,n)?eA:eh(lN(e,t(n[e]),n))}},sa=function(e){return uQ(e)?[]:e.slice().reverse()},su=function(e){for(var t=[],n=0;n<e.length;n++){var r=e[n];"Right"===r._tag&&t.push(r.right)}return t},ss=function(e){for(var t=[],n=0;n<e.length;n++){var r=e[n];"Left"===r._tag&&t.push(r.left)}return t},sl=function(e){return function(t){return t.length<=1?st(t):t.slice().sort(e.compare)}},sc=function(e,t,n){for(var r=[],i=Math.min(e.length,t.length),o=0;o<i;o++)r[o]=n(e[o],t[o]);return r},sd=function(e){for(var t=[],n=[],r=0;r<e.length;r++)t[r]=e[r][0],n[r]=e[r][1];return[t,n]},sf=function(e){var t=rG(e);return function(e){return rb(e)?t(e):[]}},sp=function(e){var t=r$(e);return function(e){return rb(e)?t(e):st(e)}},sA=function(e){var t=rk(e);return function(e){return rb(e)?t(e):st(e)}},sh=function(e){var t=rT(e);return function(e){return rb(e)?t(e):st(e)}},sm=function(e){var t=rO(e);return function(e){return rb(e)?t(e):st(e)}},sg=function(e){var t=r0(e);return function(e){return rb(e)?t(e):[]}},sy=function(e){return function(t){return e>=1&&rb(t)?r1(e)(t):uQ(t)?[st(t),[]]:[[],st(t)]}},sv=function(e){var t=r2(e);return function(e){return rb(e)?t(e):[]}},sx=function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return uY(e.apply(void 0,t))}},sb=function(e){return function(t){return uQ(t)?st(e):uQ(e)?st(t):t.concat(e)}};function sC(e){var t=rR(e);return function(n,r){if(void 0===r){var i=sC(e);return function(e){return i(e,n)}}return rb(n)&&rb(r)?t(r)(n):rb(n)?st(n):st(r)}}function sS(e){var t=o7(e);return function(n,r){if(void 0===r){var i=sS(e);return function(e){return i(e,n)}}return n.filter(function(e){return t(e,r)})}}function sw(e){var t=o7(e);return function(n,r){if(void 0===r){var i=sw(e);return function(e){return i(e,n)}}return n.filter(function(e){return!t(e,r)})}}var sI=function(e,t){return eu(e,sH(t))},s_=function(e,t){return eu(e,s$(t))},sT=function(e,t){return eu(e,sZ(t))},sO=function(e,t){return eu(e,sJ(t))},sR=function(e,t){return eu(e,s6(t))},sk=function(e,t){return eu(e,s0(t))},sE=function(e,t){return eu(e,s5(t))},sM=function(e,t){return eu(e,s9(t))},sF=function(e,t){return eu(e,s3(t))},sj=function(e,t){return eu(e,s4(t))},sU=function(e,t){return eu(e,s8(t))},sK=function(e,t,n){return eu(e,lo(t,n))},sL=function(e){var t=lr(e);return function(e,n){return eu(e,t(n))}},sB=function(e,t,n){return eu(e,lu(t,n))},sP=function(e,t,n){return eu(e,la(t,n))},sW=function(e){var t=li(e);return function(e,n){return eu(e,t(n))}},sD=function(e,t,n){return eu(e,ls(t,n))},sN=function(e,t){return eu(e,sX(t))},sq=function(e,t){return eu(e,le(t))},sQ=function(e,t){return eu(e,lt(t))},sV=function(e){var t=ll(e);return function(e,n){return eu(e,t(n))}},sz=function(e){var t=ld(e);return function(e,n){return eu(e,t(n))}},sY=function(){return[]},sH=function(e){return function(t){return t.map(function(t){return e(t)})}},sZ=function(e){return sJ(function(t){return eu(e,sH(t))})},sJ=function(e){return function(t){return eu(t,u$(function(t,n){return e(n)}))}},sG=sJ(J),s$=function(e){return function(t){return t.map(function(t,n){return e(n,t)})}},sX=function(e){return function(t){for(var n=[],r=0;r<t.length;r++){var i=e(r,t[r]);ep(i)&&n.push(i.value)}return n}},s0=function(e){return sX(function(t,n){return e(n)})},s1=s0(J),s2=function(e){for(var t=[],n=[],r=0;r<e.length;r++){var i=e[r];"Left"===i._tag?t.push(i.left):n.push(i.right)}return ot(t,n)},s6=function(e){return function(t){return t.filter(e)}},s5=function(e){return s3(function(t,n){return e(n)})},s3=function(e){return function(t){for(var n=[],r=[],i=0;i<t.length;i++){var o=t[i];e(i,o)?r.push(o):n.push(o)}return ot(n,r)}},s9=function(e){return s4(function(t,n){return e(n)})},s4=function(e){return function(t){for(var n=[],r=[],i=0;i<t.length;i++){var o=e(i,t[i]);"Left"===o._tag?n.push(o.left):r.push(o.right)}return ot(n,r)}},s7=function(e){return function(t){return t.concat(e())}},s8=s7,le=function(e){return function(t){return t.filter(function(t,n){return e(n,t)})}},lt=function(e){return function(t){return t.map(function(n,r){return e(t.slice(r))})}},ln=lt(J),lr=a1,li=aX,lo=a0,la=a2,lu=a6,ls=a5,ll=function(e){var t=ld(e);return function(e){return t(function(t,n){return e(n)})}},lc=function(e){return function(t){return sK(t,e.of(sY()),function(t,n){return e.ap(e.map(t,function(e){return function(t){return eu(e,rw(t))}}),n)})}},ld=function(e){return function(t){return la(e.of(sY()),function(n,r,i){return e.ap(e.map(r,function(e){return function(t){return eu(e,rw(t))}}),t(n,i))})}},lf=function(e){var t=lU(e);return function(e){return function(n){return t(n,e)}}},lp=function(e){var t=lK(e);return function(e){return function(n){return t(n,e)}}},lA=function(e,t){for(var n=[],r=e;;){var i=t(r);if(ep(i)){var o=i.value,a=o[0],u=o[1];n.push(a),r=u}else break}return n},lh="Array",lm=function(){return{concat:function(e,t){return e.concat(t)}}},lg=function(){return{concat:lm().concat,empty:[]}},ly=function(e){var t=sC(e);return{concat:function(e,n){return t(n)(e)}}},lv=function(e){return{concat:ly(e).concat,empty:[]}},lx=function(e){var t=sS(e);return{concat:function(e,n){return t(n)(e)}}},lb=function(e){var t=sw(e);return{concat:function(e,n){return t(n)(e)}}},lC={URI:lh,map:sI},lS=eP(lC),lw={URI:lh,of:rH},lI={URI:lh,map:sI,ap:sT},l_=eR(lI),lT=ek(lI),lO={URI:lh,map:sI,ap:sT,chain:sO},lR=ez(lO),lk={URI:lh,zero:sY},lE=oy(lk,lw),lM={URI:lh,compact:s1,separate:s2},lF={URI:lh,reduce:sK,foldMap:sL,reduceRight:sB},lj={URI:lh,map:sI,reduce:sK,foldMap:sL,reduceRight:sB,traverse:sV,sequence:lc},lU=oh(lj,lM),lK=oA(lj,lM),lL={URI:lh,map:sI,compact:s1,separate:s2,filter:sR,filterMap:sk,partition:sE,partitionMap:sM,reduce:sK,foldMap:sL,reduceRight:sB,traverse:sV,sequence:lc,wither:lU,wilt:lK},lB=om(lL),lP={URI:lh,fromEither:uH},lW=eX(lP),lD=rI,lN=function(e,t,n){return rb(n)?r_(e,t,n):[]},lq=function(e,t){var n=t.slice();return n.splice(e,1),n},lQ=function(e){return function(t){return t.some(e)}},lV=rH(eI),lz=eW(lC),lY=eY(lO),lH=eE(lI);let lZ=Object.freeze(Object.defineProperty({__proto__:null,Alt:{URI:lh,map:sI,alt:sU},Alternative:{URI:lh,map:sI,ap:sT,of:rH,alt:sU,zero:sY},Applicative:{URI:lh,map:sI,ap:sT,of:rH},Apply:lI,Chain:lO,ChainRecBreadthFirst:{URI:lh,map:sI,ap:sT,chain:sO,chainRec:aM},ChainRecDepthFirst:{URI:lh,map:sI,ap:sT,chain:sO,chainRec:aE},Compactable:lM,Do:lV,Extend:{URI:lh,map:sI,extend:sQ},Filterable:{URI:lh,map:sI,compact:s1,separate:s2,filter:sR,filterMap:sk,partition:sE,partitionMap:sM},FilterableWithIndex:{URI:lh,map:sI,mapWithIndex:s_,compact:s1,separate:s2,filter:sR,filterMap:sk,partition:sE,partitionMap:sM,partitionMapWithIndex:sj,partitionWithIndex:sF,filterMapWithIndex:sN,filterWithIndex:sq},Foldable:lF,FoldableWithIndex:{URI:lh,reduce:sK,foldMap:sL,reduceRight:sB,reduceWithIndex:sP,foldMapWithIndex:sW,reduceRightWithIndex:sD},FromEither:lP,Functor:lC,FunctorWithIndex:{URI:lh,map:sI,mapWithIndex:s_},Monad:{URI:lh,map:sI,ap:sT,of:rH,chain:sO},Pointed:lw,Traversable:lj,TraversableWithIndex:{URI:lh,map:sI,mapWithIndex:s_,reduce:sK,foldMap:sL,reduceRight:sB,reduceWithIndex:sP,foldMapWithIndex:sW,reduceRightWithIndex:sD,traverse:sV,sequence:lc,traverseWithIndex:sz},URI:lh,Unfoldable:{URI:lh,unfold:lA},Witherable:lL,Zero:lk,alt:s8,altW:s7,ap:sZ,apFirst:l_,apS:lH,apSecond:lT,append:rw,appendW:rw,array:{URI:lh,compact:s1,separate:s2,map:sI,ap:sT,of:rH,chain:sO,filter:sR,filterMap:sk,partition:sE,partitionMap:sM,mapWithIndex:s_,partitionMapWithIndex:sj,partitionWithIndex:sF,filterMapWithIndex:sN,filterWithIndex:sq,alt:sU,zero:sY,unfold:lA,reduce:sK,foldMap:sL,reduceRight:sB,traverse:sV,sequence:lc,reduceWithIndex:sP,foldMapWithIndex:sW,reduceRightWithIndex:sD,traverseWithIndex:sz,extend:sQ,wither:lU,wilt:lK},bind:lY,bindTo:lz,chain:sJ,chainFirst:lR,chainRecBreadthFirst:uw,chainRecDepthFirst:uS,chainWithIndex:u$,chop:sg,chunksOf:sv,compact:s1,comprehension:function(e,t,n){void 0===n&&(n=function(){return!0});var r=function(e,i){return rb(i)?eu(iP(i),sJ(function(t){return r(eu(e,rw(t)),iW(i))})):n.apply(void 0,e)?[t.apply(void 0,e)]:[]};return r([],e)},concat:sb,concatW:sb,cons:iG,copy:st,deleteAt:si,difference:sw,dropLeft:u4,dropLeftWhile:function(e){return function(t){return t.slice(u9(t,e))}},dropRight:u7,duplicate:ln,elem:o7,empty:[],every:uK,exists:lQ,extend:lt,filter:s6,filterE:lB,filterMap:s0,filterMapWithIndex:sX,filterWithIndex:le,findFirst:u8,findFirstMap:oV,findIndex:oq,findLast:se,findLastIndex:oH,findLastMap:oY,flap:lS,flatten:sG,foldLeft:uJ,foldMap:lr,foldMapWithIndex:li,foldRight:uG,fromEither:uH,fromEitherK:lW,fromOption:uY,fromOptionK:sx,fromPredicate:function(e){return function(t){return e(t)?[t]:[]}},getDifferenceMagma:lb,getEq:uo,getIntersectionSemigroup:lx,getMonoid:lg,getOrd:ua,getSemigroup:lm,getShow:un,getUnionMonoid:lv,getUnionSemigroup:ly,guard:lE,head:oj,init:u6,insertAt:sn,intercalate:uB,intersection:sS,intersperse:sp,isEmpty:uQ,isNonEmpty:rb,isOutOfBound:rC,last:oU,lefts:ss,lookup:oF,makeBy:uV,map:sH,mapWithIndex:s$,match:uZ,matchLeft:uJ,matchLeftW:uJ,matchRight:uG,matchRightW:uG,matchW:uZ,modifyAt:so,of:rH,partition:s5,partitionMap:s9,partitionMapWithIndex:s4,partitionWithIndex:s3,prepend:rS,prependAll:sf,prependToAll:sf,prependW:rS,range:rU,reduce:lo,reduceRight:lu,reduceRightWithIndex:ls,reduceWithIndex:la,replicate:uz,reverse:sa,rights:su,rotate:sA,scanLeft:uX,scanRight:u0,separate:s2,sequence:lc,size:u1,snoc:i$,some:lQ,sort:sl,sortBy:sm,spanLeft:function(e){return function(t){var n,r=sy(u9(t,e))(t);return{init:r[0],rest:r[1]}}},splitAt:sy,tail:u2,takeLeft:u5,takeLeftWhile:function(e){return function(t){for(var n=[],r=0;r<t.length;r++){var i=t[r];if(!e(i))break;n.push(i)}return n}},takeRight:u3,traverse:ll,traverseWithIndex:ld,unfold:lA,union:sC,uniq:sh,unsafeDeleteAt:lq,unsafeInsertAt:lD,unsafeUpdateAt:lN,unzip:sd,updateAt:sr,wilt:lp,wither:lf,zero:sY,zip:function e(t,n){return void 0===n?function(n){return e(n,t)}:sc(t,n,function(e,t){return[e,t]})},zipWith:sc},Symbol.toStringTag,{value:"Module"})),lJ=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));var lG=function(e){return"boolean"==typeof e},l$=function(e,t){return function(n){return n?t():e()}},lX={equals:function(e,t){return e===t}},l0={concat:function(e,t){return e&&t}},l1={concat:function(e,t){return e||t}},l2={concat:l0.concat,empty:!0},l6={concat:l1.concat,empty:!1},l5={equals:lX.equals,compare:function(e,t){return e<t?-1:e>t?1:0}};let l3=Object.freeze(Object.defineProperty({__proto__:null,BooleanAlgebra:{meet:function(e,t){return e&&t},join:function(e,t){return e||t},zero:!1,one:!0,implies:function(e,t){return!e||t},not:function(e){return!e}},Eq:lX,MonoidAll:l2,MonoidAny:l6,Ord:l5,SemigroupAll:l0,SemigroupAny:l1,Show:{show:function(e){return JSON.stringify(e)}},fold:l$,foldW:l$,isBoolean:lG,match:l$,matchW:l$},Symbol.toStringTag,{value:"Module"}));var l9=function(e){return{meet:function(t,n){return e.join(t,n)},join:function(t,n){return e.meet(t,n)},zero:e.one,one:e.zero,implies:function(t,n){return e.join(e.not(t),n)},not:e.not}};let l4=Object.freeze(Object.defineProperty({__proto__:null,booleanAlgebraBoolean:{meet:function(e,t){return e&&t},join:function(e,t){return e||t},zero:!1,one:!0,implies:function(e,t){return!e||t},not:function(e){return!e}},booleanAlgebraVoid:{meet:function(){},join:function(){},zero:void 0,one:void 0,implies:function(){},not:function(){}},getDualBooleanAlgebra:l9,getFunctionBooleanAlgebra:Q,reverse:l9},Symbol.toStringTag,{value:"Module"}));var l7=function(e){return tb(e)(e.bottom,e.top)},l8=function(e){var t=ts(e);return{equals:t.equals,compare:t.compare,top:e.bottom,bottom:e.top}},ce={equals:tS.equals,compare:tS.compare,top:1/0,bottom:-1/0};let ct=Object.freeze(Object.defineProperty({__proto__:null,boundedNumber:ce,clamp:l7,reverse:l8},Symbol.toStringTag,{value:"Module"}));function cn(e){return{meet:tv(e),join:tx(e)}}let cr=Object.freeze(Object.defineProperty({__proto__:null,getMinMaxDistributiveLattice:cn},Symbol.toStringTag,{value:"Module"})),ci=Object.freeze(Object.defineProperty({__proto__:null,getMinMaxBoundedDistributiveLattice:function(e){var t=cn(e);return function(e,n){return{join:t.join,meet:t.meet,zero:e,one:n}}}},Symbol.toStringTag,{value:"Module"})),co=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),ca=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),cu=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),cs=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));var cl=function(e,t){for(var n=t(e);"Left"===n._tag;)n=t(n.left);return n.right};let cc=Object.freeze(Object.defineProperty({__proto__:null,tailRec:cl},Symbol.toStringTag,{value:"Module"}));function cd(e,t){return function(n,r){return t.compose(e.right(r),e.left(n))}}function cf(e,t){var n=cd(e,t);return function(r,i){return t.compose(e.promap(t.id(),function(e){return"Left"===e._tag?e.left:e.right},J),n(r,i))}}let cp=Object.freeze(Object.defineProperty({__proto__:null,fanIn:cf,fanin:function(e){return cf(e,e)},split:cd,splitChoice:function(e){return cd(e,e)}},Symbol.toStringTag,{value:"Module"})),cA=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));var ch=function(e,t){return eu(e,cm(t))},cm=function(e){return function(t){return en(e,t)}},cg="Predicate",cy=function(){return{concat:function(e,t){return eu(e,cS(t))}}},cv=function(){return{concat:cy().concat,empty:X}},cx=function(){return{concat:function(e,t){return eu(e,cw(t))}}},cb=function(){return{concat:cx().concat,empty:$}},cC=function(e){return function(t){return!e(t)}},cS=function(e){return function(t){return function(n){return t(n)||e(n)}}},cw=function(e){return function(t){return function(n){return t(n)&&e(n)}}};let cI=Object.freeze(Object.defineProperty({__proto__:null,Contravariant:{URI:cg,contramap:ch},URI:cg,and:cw,contramap:cm,getMonoidAll:cb,getMonoidAny:cv,getSemigroupAll:cx,getSemigroupAny:cy,not:cC,or:cS},Symbol.toStringTag,{value:"Module"}));function c_(e){return function(t){return e(t)?eh(t):eA}}var cT=function(e){return"Right"===e._tag?eA:eh(e.left)},cO=function(e){return"Left"===e._tag?eA:eh(e.right)},cR=function(e,t){return eu(e,cY(t))},ck=function(e,t){return eu(e,cJ(t))},cE=function(e,t){return eu(e,cX(t))},cM=function(e,t,n){return eu(e,c1(t,n))},cF=function(e){var t=c2(e);return function(e,n){return eu(e,t(n))}},cj=function(e,t,n){return eu(e,c6(t,n))},cU=function(e){var t=dc(e);return function(e,n){return eu(e,t(n))}},cK=function(e,t){return eu(e,c3(t))},cL=function(e,t){return eu(e,di(t))},cB=function(e,t){return eu(e,da(t))},cP=function(e,t){return eu(e,c8(t))},cW=function(e,t){return eu(e,du(t))},cD=function(e,t){return eu(e,ds(t))},cN="Option",cq=function(e){return{show:function(t){return dx(t)?"none":"some(".concat(e.show(t.value),")")}}},cQ=function(e){return{equals:function(t,n){return t===n||(dx(t)?dx(n):!dx(n)&&e.equals(t.value,n.value))}}},cV=function(e){return{equals:cQ(e).equals,compare:function(t,n){return t===n?0:dv(t)?dv(n)?e.compare(t.value,n.value):1:-1}}},cz=function(e){return{concat:function(t,n){return dx(t)?n:dx(n)?t:eh(e.concat(t.value,n.value))},empty:eA}},cY=function(e){return function(t){return dx(t)?eA:eh(e(t.value))}},cH={URI:cN,map:cR},cZ={URI:cN,of:eh},cJ=function(e){return function(t){return dx(t)||dx(e)?eA:eh(t.value(e.value))}},cG={URI:cN,map:cR,ap:ck},c$={URI:cN,map:cR,ap:ck,of:eh},cX=function(e){return function(t){return dx(t)?eA:e(t.value)}},c0={URI:cN,map:cR,ap:ck,chain:cE},c1=function(e,t){return function(n){return dx(n)?e:t(e,n.value)}},c2=function(e){return function(t){return function(n){return dx(n)?e.empty:t(n.value)}}},c6=function(e,t){return function(n){return dx(n)?e:t(n.value,e)}},c5=function(e){return function(t){return dx(t)?e():t}},c3=c5,c9=function(){return eA},c4={URI:cN,zero:c9},c7=oy(c4,cZ),c8=function(e){return function(t){return dx(t)?eA:eh(e(t))}},de=cX(J),dt=ot(eA,eA),dn=function(e){return dx(e)?dt:ot(cT(e.value),cO(e.value))},dr={URI:cN,compact:de,separate:dn},di=function(e){return function(t){return dx(t)?eA:e(t.value)?t:eA}},da=function(e){return function(t){return dx(t)?eA:e(t.value)}},du=function(e){return function(t){return ot(cL(t,cC(e)),cL(t,e))}},ds=function(e){return en(cY(e),dn)},dl={URI:cN,map:cR,compact:de,separate:dn,filter:cL,filterMap:cB,partition:cW,partitionMap:cD},dc=function(e){return function(t){return function(n){return dx(n)?e.of(eA):e.map(t(n.value),eh)}}},dd=function(e){return function(t){return dx(t)?e.of(eA):e.map(t.value,eh)}},df={URI:cN,map:cR,reduce:cM,foldMap:cF,reduceRight:cj,traverse:cU,sequence:dd},dp=oh(df,dr),dA=oA(df,dr),dh=function(e){var t=dp(e);return function(e){return function(n){return t(n,e)}}},dm=function(e){var t=dA(e);return function(e){return function(n){return t(n,e)}}},dg=function(){return eA},dy={URI:cN,fromEither:cO},dv=ep,dx=function(e){return"None"===e._tag},db=function(e,t){return function(n){return dx(n)?e():t(n.value)}},dC=function(e){return function(t){return dx(t)?e():t.value}},dS=eP(cH),dw=eR(cG),dI=ek(cG),d_=ez(c0),dT=c8(J),dO=eX(dy),dR=e0(dy,c0),dk=e1(dy,c0),dE=function(e){return null==e?eA:eh(e)},dM=function(e){try{return eh(e())}catch{return eA}},dF=function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return dM(function(){return e.apply(void 0,t)})}},dj=function(e){return en(e,dE)},dU=function(e){return function(t){return dx(t)?eA:dE(e(t.value))}},dK=db(ee,J),dL=db(et,J),dB=function(e){return function(t){return!dx(t)&&e(t.value)}},dP=eh(eI),dW=eW(cH),dD=eY(c0),dN=eE(cG),dq=eh(ew),dQ=function(e){return function(t){var n=e(0,eC(t));if(dx(n))return eA;for(var r=[n.value],i=1;i<t.length;i++){var o=e(i,t[i]);if(dx(o))return eA;r.push(o.value)}return eh(r)}},dV=function(e){var t=dQ(e);return function(e){return eb(e)?t(e):dq}},dz=function(e){return dV(function(t,n){return e(n)})},dY=dz(J),dH={URI:cN,map:cR,of:eh,ap:ck,chain:cE,reduce:cM,foldMap:cF,reduceRight:cj,traverse:cU,sequence:dd,zero:c9,alt:cK,extend:cP,compact:de,separate:dn,filter:cL,filterMap:cB,partition:cW,partitionMap:cD,wither:dp,wilt:dA,throwError:dg},dZ=eM(cG),dJ=eq(c$),dG=function(){return cz(tB())},d$=function(){return cz(tP())};let dX=Object.freeze(Object.defineProperty({__proto__:null,Alt:{URI:cN,map:cR,alt:cK},Alternative:{URI:cN,map:cR,ap:ck,of:eh,alt:cK,zero:c9},ApT:dq,Applicative:c$,Apply:cG,Chain:c0,Compactable:dr,Do:dP,Extend:{URI:cN,map:cR,extend:cP},Filterable:dl,Foldable:{URI:cN,reduce:cM,foldMap:cF,reduceRight:cj},FromEither:dy,Functor:cH,Monad:{URI:cN,map:cR,ap:ck,of:eh,chain:cE},MonadThrow:{URI:cN,map:cR,ap:ck,of:eh,chain:cE,throwError:dg},Pointed:cZ,Traversable:df,URI:cN,Witherable:{URI:cN,map:cR,reduce:cM,foldMap:cF,reduceRight:cj,traverse:cU,sequence:dd,compact:de,separate:dn,filter:cL,filterMap:cB,partition:cW,partitionMap:cD,wither:dp,wilt:dA},Zero:c4,alt:c3,altW:c5,ap:cJ,apFirst:dw,apS:dN,apSecond:dI,bind:dD,bindTo:dW,chain:cX,chainEitherK:dR,chainFirst:d_,chainFirstEitherK:dk,chainNullableK:dU,compact:de,duplicate:dT,elem:function e(t){return function(n,r){if(void 0===r){var i=e(t);return function(e){return i(n,e)}}return!dx(r)&&t.equals(n,r.value)}},exists:dB,extend:c8,filter:di,filterMap:da,flap:dS,flatten:de,fold:db,foldMap:c2,foldW:db,fromEither:cO,fromEitherK:dO,fromNullable:dE,fromNullableK:dj,fromPredicate:c_,getApplyMonoid:dJ,getApplySemigroup:dZ,getEq:cQ,getFirstMonoid:dG,getLastMonoid:d$,getLeft:cT,getMonoid:cz,getOrElse:dC,getOrElseW:dC,getOrd:cV,getRefinement:function(e){return function(t){return dv(e(t))}},getRight:cO,getShow:cq,guard:c7,isNone:dx,isSome:dv,map:cY,mapNullable:dU,match:db,matchW:db,none:eA,of:eh,option:dH,partition:du,partitionMap:ds,reduce:c1,reduceRight:c6,separate:dn,sequence:dd,sequenceArray:dY,some:eh,throwError:dg,toNullable:dK,toUndefined:dL,traverse:dc,traverseArray:dz,traverseArrayWithIndex:dV,traverseReadonlyArrayWithIndex:dV,traverseReadonlyNonEmptyArrayWithIndex:dQ,tryCatch:dM,tryCatchK:dF,wilt:dm,wither:dh,zero:c9},Symbol.toStringTag,{value:"Module"}));function d0(e,t){return function(n){return e.map(n,t.compact)}}function d1(e,t,n){var r=d0(e,t),i=eB(e,n);return function(e){return ot(r(eu(e,i(cT))),r(eu(e,i(cO))))}}let d2=Object.freeze(Object.defineProperty({__proto__:null,compact:d0,getCompactableComposition:function(e,t){return{map:eD(e,t).map,compact:d0(e,t),separate:d1(e,t,t)}},separate:d1},Symbol.toStringTag,{value:"Module"}));var d6=function(e){return function(){return console.log(e)}},d5=function(e){return function(){return console.warn(e)}},d3=function(e){return function(){return console.error(e)}},d9=function(e){return function(){return console.info(e)}};let d4=Object.freeze(Object.defineProperty({__proto__:null,error:d3,info:d9,log:d6,warn:d5},Symbol.toStringTag,{value:"Module"}));function d7(e){return{URI:fs,_E:void 0,map:ft,ap:function(t,n){return J(e.concat(t,n))}}}function d8(e){var t=d7(e);return{URI:fs,_E:void 0,map:t.map,ap:t.ap,of:function(){return J(e.empty)}}}var fe=function(e,t){return eu(e,fi())},ft=function(e,t){return eu(e,fo())},fn=function(e,t,n){return eu(e,fa(t))},fr=function(e,t){return eu(e,fu(t))},fi=function(){return J},fo=function(){return J},fa=function(e){return function(t){return J(e(t))}},fu=function(e){return function(t){return J(e(t))}},fs="Const",fl={URI:fs,map:ft},fc=eP(fl);let fd=Object.freeze(Object.defineProperty({__proto__:null,Bifunctor:{URI:fs,bimap:fn,mapLeft:fr},Contravariant:{URI:fs,contramap:fe},Functor:fl,URI:fs,bimap:fa,const_:{URI:fs,map:ft,contramap:fe,bimap:fn,mapLeft:fr},contramap:fi,flap:fc,getApplicative:d8,getApply:d7,getBooleanAlgebra:J,getBounded:J,getEq:J,getHeytingAlgebra:J,getMonoid:J,getOrd:J,getRing:J,getSemigroup:J,getSemiring:J,getShow:function(e){return{show:function(t){return"make(".concat(e.show(t),")")}}},make:J,map:fo,mapLeft:fu},Symbol.toStringTag,{value:"Module"})),ff=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));var fp=eu(i2,tl(function(e){return e.valueOf()})),fA=function(){return new Date},fh=function(){return new Date().getTime()};let fm=Object.freeze(Object.defineProperty({__proto__:null,Eq:{equals:function(e,t){return e.valueOf()===t.valueOf()}},Ord:fp,create:fA,eqDate:{equals:function(e,t){return e.getDate()===t.getDate()}},eqMonth:{equals:function(e,t){return e.getMonth()===t.getMonth()}},eqYear:{equals:function(e,t){return e.getFullYear()===t.getFullYear()}},now:fh},Symbol.toStringTag,{value:"Module"}));var fg=function(e,t){return eu(e,fB(t))},fy=function(e,t){return eu(e,fN(t))},fv=function(e,t){return eu(e,fz(t))},fx=function(e,t,n){return eu(e,fH(t,n))},fb=function(e){return function(t,n){var r=fZ(e);return eu(t,r(n))}},fC=function(e,t,n){return eu(e,fJ(t,n))},fS=function(e){var t=fG(e);return function(e,n){return eu(e,t(n))}},fw=function(e,t,n){return eu(e,f0(t,n))},fI=function(e,t){return eu(e,f1(t))},f_=function(e,t){return eu(e,f6(t))},fT=function(e,t){return eu(e,f5(t))},fO=function(e,t){return cl(t(e),function(e){return f7(e)?ev(ey(e.left)):f7(e.right)?ey(t(e.right.left)):ev(ev(e.right.right))})},fR="Either",fk=function(e,t){return{show:function(n){return f7(n)?"left(".concat(e.show(n.left),")"):"right(".concat(t.show(n.right),")")}}},fE=function(e,t){return{equals:function(n,r){return n===r||(f7(n)?f7(r)&&e.equals(n.left,r.left):f8(r)&&t.equals(n.right,r.right))}}},fM=function(e){return{concat:function(t,n){return f7(n)?t:f7(t)?n:ev(e.concat(t.right,n.right))}}},fF=function(e){var t=ey(e.empty);return{URI:fR,_E:void 0,compact:function(e){return f7(e)?e:"None"===e.right._tag?t:ev(e.right.value)},separate:function(e){return f7(e)?ot(e,e):f7(e.right)?ot(ev(e.right.left),t):ot(t,ev(e.right.right))}}},fj=function(e){var t,n=ey(e.empty),r=fF(e),i=r.compact;return{URI:fR,_E:void 0,map:fg,compact:i,separate:r.separate,filter:function(e,t){return f7(e)||t(e.right)?e:n},filterMap:function(e,t){if(f7(e))return e;var r=t(e.right);return"None"===r._tag?n:ev(r.value)},partition:function(e,t){return f7(e)?ot(e,e):t(e.right)?ot(n,ev(e.right)):ot(ev(e.right),n)},partitionMap:function(e,t){if(f7(e))return ot(e,e);var r=t(e.right);return f7(r)?ot(ev(r.left),n):ot(n,ev(r.right))}}},fU=function(e){var t=fj(e),n=fF(e);return{URI:fR,_E:void 0,map:fg,compact:t.compact,separate:t.separate,filter:t.filter,filterMap:t.filterMap,partition:t.partition,partitionMap:t.partitionMap,traverse:fS,sequence:f$,reduce:fx,foldMap:fb,reduceRight:fC,wither:oh(fX,n),wilt:oA(fX,n)}},fK=function(e){return{URI:fR,_E:void 0,map:fg,ap:function(t,n){return f7(t)?f7(n)?ey(e.concat(t.left,n.left)):t:f7(n)?n:ev(t.right(n.right))},of:fW}},fL=function(e){return{URI:fR,_E:void 0,map:fg,alt:function(t,n){if(f8(t))return t;var r=n();return f7(r)?ey(e.concat(t.left,r.left)):r}}},fB=function(e){return function(t){return f7(t)?t:ev(e(t.right))}},fP={URI:fR,map:fg},fW=ev,fD=function(e){return function(t){return f7(t)?t:f7(e)?e:ev(t.right(e.right))}},fN=fD,fq={URI:fR,map:fg,ap:fy},fQ={URI:fR,map:fg,ap:fy,of:fW},fV=function(e){return function(t){return f7(t)?t:e(t.right)}},fz=fV,fY={URI:fR,map:fg,ap:fy,chain:fv},fH=function(e,t){return function(n){return f7(n)?e:t(e,n.right)}},fZ=function(e){return function(t){return function(n){return f7(n)?e.empty:t(n.right)}}},fJ=function(e,t){return function(n){return f7(n)?e:t(n.right,e)}},fG=function(e){return function(t){return function(n){return f7(n)?e.of(ey(n.left)):e.map(t(n.right),ev)}}},f$=function(e){return function(t){return f7(t)?e.of(ey(t.left)):e.map(t.right,ev)}},fX={URI:fR,map:fg,reduce:fx,foldMap:fb,reduceRight:fC,traverse:fS,sequence:f$},f0=function(e,t){return function(n){return f7(n)?ey(e(n.left)):ev(t(n.right))}},f1=function(e){return function(t){return f7(t)?ey(e(t.left)):t}},f2=function(e){return function(t){return f7(t)?e():t}},f6=f2,f5=function(e){return function(t){return f7(t)?t:ev(e(t))}},f3={URI:fR,fromEither:J},f9=eJ(f3),f4=eZ(f3),f7=em,f8=eg,pe=function(e,t){return function(n){return f7(n)?e(n.left):t(n.right)}},pt=function(e){return function(t){return f7(t)?e(t.left):t.right}},pn=eP(fP),pr=eR(fq),pi=ek(fq),po=ez(fY),pa=fV(J),pu=f5(J),ps=eG(f3),pl=e$(f3,fY),pc=e2(f3,fY),pd=function(e){return f7(e)?ev(e.left):ey(e.right)},pf=function(e){return function(t){return f7(t)?e(t.left):t}},pp=function(e){return function(t){return null==t?ey(e):ev(t)}},pA=function(e,t){try{return ev(e())}catch(n){return ey(t(n))}},ph=function(e,t){return function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return pA(function(){return e.apply(void 0,n)},t)}},pm=function(e){var t=pp(e);return function(e){return en(e,t)}},pg=function(e){var t=pm(e);return function(e){return fz(t(e))}},py=pe(J,J),pv=function(e){return function(t){return!f7(t)&&e(t.right)}},px=fW(eI),pb=eW(fP),pC=eY(fY),pS=eE(fq),pw=fW(ew),pI=function(e){return function(t){var n=e(0,eC(t));if(f7(n))return n;for(var r=[n.right],i=1;i<t.length;i++){var o=e(i,t[i]);if(f7(o))return o;r.push(o.right)}return ev(r)}},p_=function(e){var t=pI(e);return function(e){return eb(e)?t(e):pw}},pT=function(e){return p_(function(t,n){return e(n)})},pO=pT(J),pR=function(e,t){return pA(function(){var t=JSON.stringify(e);if("string"!=typeof t)throw Error("Converting unsupported structure to JSON");return t},t)},pk=eM(fq),pE=eq(fQ),pM=function(e,t){return eM(fK(e))(t)},pF=function(e,t){return eq(fK(e))(t)};let pj=Object.freeze(Object.defineProperty({__proto__:null,Alt:{URI:fR,map:fg,alt:f_},ApT:pw,Applicative:fQ,Apply:fq,Bifunctor:{URI:fR,bimap:fw,mapLeft:fI},Chain:fY,ChainRec:{URI:fR,map:fg,ap:fy,chain:fv,chainRec:fO},Do:px,Extend:{URI:fR,map:fg,extend:fT},Foldable:{URI:fR,reduce:fx,foldMap:fb,reduceRight:fC},FromEither:f3,Functor:fP,Monad:{URI:fR,map:fg,ap:fy,of:fW,chain:fv},MonadThrow:{URI:fR,map:fg,ap:fy,of:fW,chain:fv,throwError:ey},Pointed:{URI:fR,of:fW},Traversable:fX,URI:fR,alt:f6,altW:f2,ap:fN,apFirst:pr,apFirstW:pr,apS:pS,apSW:pS,apSecond:pi,apSecondW:pi,apW:fD,bimap:f0,bind:pC,bindTo:pb,bindW:pC,chain:fz,chainFirst:po,chainFirstW:po,chainNullableK:pg,chainOptionK:pl,chainW:fV,duplicate:pu,either:{URI:fR,map:fg,of:fW,ap:fy,chain:fv,reduce:fx,foldMap:fb,reduceRight:fC,traverse:fS,sequence:f$,bimap:fw,mapLeft:fI,alt:f_,extend:fT,chainRec:fO,throwError:ey},elem:function e(t){return function(n,r){if(void 0===r){var i=e(t);return function(e){return i(n,e)}}return!f7(r)&&t.equals(n,r.right)}},exists:pv,extend:f5,filterOrElse:pc,filterOrElseW:pc,flap:pn,flatten:pa,flattenW:pa,fold:pe,foldMap:fZ,foldW:pe,fromNullable:pp,fromNullableK:pm,fromOption:f4,fromOptionK:ps,fromPredicate:f9,getAltValidation:fL,getApplicativeValidation:fK,getApplyMonoid:pE,getApplySemigroup:pk,getCompactable:fF,getEq:fE,getFilterable:fj,getOrElse:pt,getOrElseW:pt,getSemigroup:fM,getShow:fk,getValidation:function(e){var t=fK(e).ap,n=fL(e).alt;return{URI:fR,_E:void 0,map:fg,of:fW,chain:fv,bimap:fw,mapLeft:fI,reduce:fx,foldMap:fb,reduceRight:fC,extend:fT,traverse:fS,sequence:f$,chainRec:fO,throwError:ey,ap:t,alt:n}},getValidationMonoid:pF,getValidationSemigroup:pM,getWitherable:fU,isLeft:f7,isRight:f8,left:ey,map:fB,mapLeft:f1,match:pe,matchW:pe,of:fW,orElse:pf,orElseW:pf,parseJSON:function(e,t){return pA(function(){return JSON.parse(e)},t)},reduce:fH,reduceRight:fJ,right:ev,sequence:f$,sequenceArray:pO,stringifyJSON:pR,swap:pd,throwError:ey,toError:function(e){return e instanceof Error?e:Error(String(e))},toUnion:py,traverse:fG,traverseArray:pT,traverseArrayWithIndex:p_,traverseReadonlyArrayWithIndex:p_,traverseReadonlyNonEmptyArrayWithIndex:pI,tryCatch:pA,tryCatchK:ph},Symbol.toStringTag,{value:"Module"}));function pU(e){return en(ev,e.of)}function pK(e){return en(ey,e.of)}function pL(e){return function(t){return e.map(t,ev)}}function pB(e){return function(t){return e.map(t,ey)}}function pP(e){return function(t){return en(pp(t),e.of)}}function pW(e){var t=pP(e);return function(e){var n=t(e);return function(e){return en(e,n)}}}function pD(e){var t=pQ(e),n=pW(e);return function(e){var r=n(e);return function(e){return t(r(e))}}}function pN(e){return eB(e,fP)}function pq(e){return eO(e,fq)}function pQ(e){return function(t){return function(n){return e.chain(n,function(n){return f7(n)?e.of(n):t(n.right)})}}}function pV(e){return function(t){return function(n){return e.chain(n,function(n){return f7(n)?t():e.of(n)})}}}function pz(e){return function(t,n){return function(r){return e.map(r,f0(t,n))}}}function pY(e){return function(t){return function(n){return e.map(n,f1(t))}}}function pH(e,t){return function(n){return function(r){return e.chain(r,pe(function(r){return e.map(n(),f1(function(e){return t.concat(r,e)}))},pU(e)))}}}function pZ(e){return function(t,n){return function(r){return e.map(r,pe(t,n))}}}function pJ(e){return function(t,n){return function(r){return e.chain(r,pe(t,n))}}}function pG(e){return function(t){return function(n){return e.chain(n,pe(t,e.of))}}}function p$(e){return function(t){return function(n){return e.chain(n,function(n){return f7(n)?t(n.left):e.of(n)})}}}function pX(e){var t=p$(e);return function(n){return t(function(t){return e.map(n(t),function(e){return f7(e)?e:ey(t)})})}}function p0(e){return function(t){return function(n){return e.chain(n,pe(function(n){return e.map(t(n),ey)},function(t){return e.of(ev(t))}))}}}function p1(e){return function(t){return e.map(t,pd)}}function p2(e){return function(t){return e.map(t,py)}}let p6=Object.freeze(Object.defineProperty({__proto__:null,alt:pV,altValidation:pH,ap:pq,bimap:pz,chain:pQ,chainNullableK:pD,fromNullable:pP,fromNullableK:pW,getEitherM:function(e){var t=pq(e),n=pN(e),r=pQ(e),i=pV(e),o=pz(e),a=pY(e),u=pJ(e),s=pG(e),l=p$(e);return{map:function(e,t){return eu(e,n(t))},ap:function(e,n){return eu(e,t(n))},of:pU(e),chain:function(e,t){return eu(e,r(t))},alt:function(e,t){return eu(e,i(t))},bimap:function(e,t,n){return eu(e,o(t,n))},mapLeft:function(e,t){return eu(e,a(t))},fold:function(e,t,n){return eu(e,u(t,n))},getOrElse:function(e,t){return eu(e,s(t))},orElse:function(e,t){return eu(e,l(t))},swap:p1(e),rightM:pL(e),leftM:pB(e),left:pK(e)}},getOrElse:pG,left:pK,leftF:pB,map:pN,mapLeft:pY,match:pZ,matchE:pJ,orElse:p$,orElseFirst:pX,orLeft:p0,right:pU,rightF:pL,swap:p1,toUnion:p2},Symbol.toStringTag,{value:"Module"}));var p5=function(){return{concat:function(e,t){return en(e,t)}}},p3=function(){return{concat:p5().concat,empty:J}};let p9=Object.freeze(Object.defineProperty({__proto__:null,URI:"Endomorphism",getMonoid:p3,getSemigroup:p5},Symbol.toStringTag,{value:"Module"})),p4=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));function p7(e,t){var n=t.zero,r=function(i,o){return e.equals(o,n)?i:r(o,t.mod(i,o))};return r}let p8=Object.freeze(Object.defineProperty({__proto__:null,fieldNumber:{add:function(e,t){return e+t},zero:0,mul:function(e,t){return e*t},one:1,sub:function(e,t){return e-t},degree:function(e){return 1},div:function(e,t){return e/t},mod:function(e,t){return e%t}},gcd:p7,lcm:function(e,t){var n=t.zero,r=p7(e,t);return function(i,o){return e.equals(i,n)||e.equals(o,n)?n:t.div(t.mul(i,o),r(i,o))}}},Symbol.toStringTag,{value:"Module"}));function Ae(e,t){return function(n){return function(r){return e.map(r,function(e){return t.filter(e,n)})}}}function At(e,t){return function(n){return function(r){return e.map(r,function(e){return t.filterMap(e,n)})}}}function An(e,t){var n=Ae(e,t);return function(e){var t=n(cC(e)),r=n(e);return function(e){return ot(t(e),r(e))}}}function Ar(e,t){var n=At(e,t);return function(e){return function(t){return ot(eu(t,n(function(t){return cT(e(t))})),eu(t,n(function(t){return cO(e(t))})))}}}let Ai=Object.freeze(Object.defineProperty({__proto__:null,filter:Ae,filterMap:At,getFilterableComposition:function(e,t){var n=eD(e,t).map,r=d0(e,t),i=d1(e,t,t),o=Ae(e,t),a=At(e,t),u=An(e,t),s=Ar(e,t);return{map:n,compact:r,separate:i,filter:function(e,t){return eu(e,o(t))},filterMap:function(e,t){return eu(e,a(t))},partition:function(e,t){return eu(e,u(t))},partitionMap:function(e,t){return eu(e,s(t))}}},partition:An,partitionMap:Ar},Symbol.toStringTag,{value:"Module"})),Ao=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));function Aa(e,t){return function(n,r){return function(i){return e.reduce(i,n,function(e,n){return t.reduce(n,e,r)})}}}function Au(e,t){return function(n){var r=e.foldMap(n),i=t.foldMap(n);return function(e){return function(t){return r(t,function(t){return i(t,e)})}}}}function As(e,t){return function(n,r){return function(i){return e.reduceRight(i,n,function(e,n){return t.reduceRight(e,n,r)})}}}function Al(e){return function(t){return e.reduce(t,[],function(e,t){return e.push(t),e})}}function Ac(e,t){var n=Aa(e,t),r=Au(e,t),i=As(e,t);return{reduce:function(e,t,r){return eu(e,n(t,r))},foldMap:function(e){var t=r(e);return function(e,n){return eu(e,t(n))}},reduceRight:function(e,t,n){return eu(e,i(t,n))}}}let Ad=Object.freeze(Object.defineProperty({__proto__:null,foldM:function(e,t){return function(n,r,i){return t.reduce(n,e.of(r),function(t,n){return e.chain(t,function(e){return i(e,n)})})}},foldMap:Au,getFoldableComposition:Ac,intercalate:function(e,t){return function(n,r){var i=function(t,r){var i=t.init,o=t.acc;return i?{init:!1,acc:r}:{init:!1,acc:e.concat(e.concat(o,n),r)}};return t.reduce(r,{init:!0,acc:e.empty},i).acc}},reduce:Aa,reduceM:function(e,t){return function(n,r){return function(i){return t.reduce(i,e.of(n),function(t,n){return e.chain(t,function(e){return r(e,n)})})}}},reduceRight:As,toArray:Al,toReadonlyArray:Al,traverse_:function(e,t){var n=e.of(void 0);return function(r,i){return t.reduce(r,n,function(t,n){var r,o;return o=i(n),e.ap(e.map(t,G),o)})}}},Symbol.toStringTag,{value:"Module"}));function Af(e,t){return function(n,r){return function(i){return e.reduceWithIndex(i,n,function(e,n,i){return t.reduceWithIndex(i,n,function(t,n,i){return r([e,t],n,i)})})}}}function Ap(e,t){return function(n){var r=e.foldMapWithIndex(n),i=t.foldMapWithIndex(n);return function(e){return function(t){return r(t,function(t,n){return i(n,function(n,r){return e([t,n],r)})})}}}}function AA(e,t){return function(n,r){return function(i){return e.reduceRightWithIndex(i,n,function(e,n,i){return t.reduceRightWithIndex(n,i,function(t,n,i){return r([e,t],n,i)})})}}}let Ah=Object.freeze(Object.defineProperty({__proto__:null,foldMapWithIndex:Ap,getFoldableWithIndexComposition:function(e,t){var n=Ac(e,t),r=Af(e,t),i=Ap(e,t),o=AA(e,t);return{reduce:n.reduce,foldMap:n.foldMap,reduceRight:n.reduceRight,reduceWithIndex:function(e,t,n){return eu(e,r(t,n))},foldMapWithIndex:function(e){var t=i(e);return function(e,n){return eu(e,t(n))}},reduceRightWithIndex:function(e,t,n){return eu(e,o(t,n))}}},reduceRightWithIndex:AA,reduceWithIndex:Af},Symbol.toStringTag,{value:"Module"}));function Am(e){return function(t){return en(t,e.fromIO)}}function Ag(e,t){return function(n){var r=en(n,e.fromIO);return function(e){return t.chain(e,r)}}}function Ay(e,t){var n=ez(t);return function(t){return n(en(t,e.fromIO))}}let Av=Object.freeze(Object.defineProperty({__proto__:null,chainFirstIOK:Ay,chainIOK:Ag,fromIOK:Am},Symbol.toStringTag,{value:"Module"}));var Ax=function(){return J},Ab=function(e){return function(t){return function(n){return t(e(n))}}},AC=function(e){return function(t){return e(t)(t)}},AS=function(e,t){return eu(e,AO(t))},Aw=function(e,t){return eu(e,Ak(t))},AI=function(e,t){return eu(e,AM(t))},A_=function(e,t){return eu(e,Aj(t))},AT=function(e,t,n){return eu(e,AU(t,n))},AO=function(e){return function(t){return function(n){return e(t(n))}}},AR=function(e){return function(t){return function(n){return t(n)(e(n))}}},Ak=AR,AE=function(e){return function(t){return function(n){return e(t(n))(n)}}},AM=AE,AF=AE(J),Aj=function(e){return function(t){return en(e,t)}},AU=function(e,t){return function(n){return function(r){return t(n(e(r)))}}},AK=function(){return J},AL=function(e){return function(t){var n=t[0],r=t[1];return[e(n),r]}},AB=function(e){return function(t){var n;return[t[0],e(t[1])]}},AP=function(e){return pe(function(t){return ey(e(t))},ev)},AW=function(e){return pe(ey,function(t){return ev(e(t))})},AD="Reader",AN={URI:AD,map:AS},Aq=eP(AN),AQ={URI:AD,of:G},AV={URI:AD,map:AS,ap:Aw},Az=eR(AV),AY=ek(AV),AH={URI:AD,map:AS,ap:Aw,of:G},AZ={URI:AD,map:AS,ap:Aw,chain:AI},AJ={URI:AD,map:AS,of:G,ap:Aw,chain:AI},AG=ez(AZ),A$=eW(AN),AX=eY(AZ),A0=G(eI),A1=eE(AV),A2=G(ew),A6=function(e){return function(t){return function(n){for(var r=[e(0,eC(t))(n)],i=1;i<t.length;i++)r.push(e(i,t[i])(n));return r}}},A5=function(e){var t=A6(e);return function(e){return eb(e)?t(e):A2}},A3=function(e){return A5(function(t,n){return e(n)})},A9=A3(J),A4=eM(AV),A7=eq(AH);let A8=Object.freeze(Object.defineProperty({__proto__:null,ApT:A2,Applicative:AH,Apply:AV,Category:{URI:AD,compose:A_,id:AK},Chain:AZ,Choice:{URI:AD,map:AS,promap:AT,left:AP,right:AW},Do:A0,Functor:AN,Monad:AJ,Pointed:AQ,Profunctor:{URI:AD,map:AS,promap:AT},Strong:{URI:AD,map:AS,promap:AT,first:AL,second:AB},URI:AD,ap:Ak,apFirst:Az,apFirstW:Az,apS:A1,apSW:A1,apSecond:AY,apSecondW:AY,apW:AR,ask:Ax,asks:J,asksReader:AC,asksReaderW:AC,bind:AX,bindTo:A$,bindW:AX,chain:AM,chainFirst:AG,chainFirstW:AG,chainW:AE,compose:Aj,first:AL,flap:Aq,flatten:AF,flattenW:AF,getMonoid:A7,getSemigroup:A4,id:AK,left:AP,local:Ab,map:AO,of:G,promap:AU,reader:{URI:AD,map:AS,of:G,ap:Aw,chain:AI,promap:AT,compose:A_,id:AK,first:AL,second:AB,left:AP,right:AW},right:AW,second:AB,sequenceArray:A9,traverseArray:A3,traverseArrayWithIndex:A5,traverseReadonlyArrayWithIndex:A5,traverseReadonlyNonEmptyArrayWithIndex:A6},Symbol.toStringTag,{value:"Module"}));function he(e){return function(){return e.fromReader(Ax())}}function ht(e){return e.fromReader}function hn(e){return function(t){return en(t,e.fromReader)}}function hr(e,t){var n=hn(e);return function(e){return function(r){return t.chain(r,n(e))}}}function hi(e,t){return en(hn(e),ez(t))}let ho=Object.freeze(Object.defineProperty({__proto__:null,ask:he,asks:ht,chainFirstReaderK:hi,chainReaderK:hr,fromReaderK:hn},Symbol.toStringTag,{value:"Module"}));var ha=function(){return function(e){return[e,e]}},hu=function(e){return function(){return[void 0,e]}},hs=function(e){return function(t){return[void 0,e(t)]}},hl=function(e){return function(t){return[e(t),t]}},hc=function(e,t){return eu(e,hp(t))},hd=function(e,t){return eu(e,hA(t))},hf=function(e,t){return eu(e,hm(t))},hp=function(e){return function(t){return function(n){var r=t(n),i=r[0],o=r[1];return[e(i),o]}}},hA=function(e){return function(t){return function(n){var r=t(n),i=r[0],o=e(r[1]),a=o[0],u=o[1];return[i(a),u]}}},hh=function(e){return function(t){return[e,t]}},hm=function(e){return function(t){return function(n){var r=t(n),i=r[0],o=r[1];return e(i)(o)}}},hg=hm(J),hy="State",hv={URI:hy,map:hc},hx=eP(hv),hb={URI:hy,map:hc,ap:hd},hC=eR(hb),hS=ek(hb),hw={URI:hy,map:hc,ap:hd,chain:hf},hI={URI:hy,map:hc,ap:hd,of:hh,chain:hf},h_=ez(hw),hT=function(e){return function(t){return t(e)[0]}},hO=function(e){return function(t){return t(e)[1]}},hR=eW(hv),hk=eY(hw),hE=eE(hb),hM=function(e){return function(t){return function(n){for(var r=e(0,eC(t))(n),i=r[0],o=r[1],a=[i],u=o,s=1;s<t.length;s++){var l=e(s,t[s])(u),c=l[0],d=l[1];a.push(c),u=d}return[a,u]}}},hF=function(e){var t=hM(e);return function(e){return eb(e)?t(e):hh(ew)}},hj=function(e){return hF(function(t,n){return e(n)})},hU=hj(J),hK=function(e,t){return e(t)[0]},hL=function(e,t){return e(t)[1]};let hB=Object.freeze(Object.defineProperty({__proto__:null,Applicative:{URI:hy,map:hc,ap:hd,of:hh},Apply:hb,Chain:hw,FromState:{URI:hy,fromState:J},Functor:hv,Monad:hI,Pointed:{URI:hy,of:hh},URI:hy,ap:hA,apFirst:hC,apS:hE,apSecond:hS,bind:hk,bindTo:hR,chain:hm,chainFirst:h_,evalState:hK,evaluate:hT,execState:hL,execute:hO,flap:hx,flatten:hg,get:ha,gets:hl,map:hp,modify:hs,of:hh,put:hu,sequenceArray:hU,state:hI,traverseArray:hj,traverseArrayWithIndex:hF,traverseReadonlyArrayWithIndex:hF,traverseReadonlyNonEmptyArrayWithIndex:hM},Symbol.toStringTag,{value:"Module"}));function hP(e){return function(){return e.fromState(ha())}}function hW(e){return function(t){return e.fromState(hu(t))}}function hD(e){return en(hs,e.fromState)}function hN(e){return en(hl,e.fromState)}function hq(e){return function(t){return en(t,e.fromState)}}function hQ(e,t){var n=hq(e);return function(e){return function(r){return t.chain(r,n(e))}}}let hV=Object.freeze(Object.defineProperty({__proto__:null,chainStateK:hQ,fromStateK:hq,get:hP,gets:hN,modify:hD,put:hW},Symbol.toStringTag,{value:"Module"}));function hz(e){return function(t){return en(t,e.fromTask)}}function hY(e,t){return function(n){var r=en(n,e.fromTask);return function(e){return t.chain(e,r)}}}function hH(e,t){var n=ez(t);return function(t){return n(en(t,e.fromTask))}}let hZ=Object.freeze(Object.defineProperty({__proto__:null,chainFirstTaskK:hH,chainTaskK:hY,fromTaskK:hz},Symbol.toStringTag,{value:"Module"}));function hJ(e){return function(t){return en(t,e.fromThese)}}let hG=Object.freeze(Object.defineProperty({__proto__:null,fromTheseK:hJ},Symbol.toStringTag,{value:"Module"}));function h$(e,t){return function(n){return function(r){return e.mapWithIndex(r,function(e,r){return t.mapWithIndex(r,function(t,r){return n([e,t],r)})})}}}let hX=Object.freeze(Object.defineProperty({__proto__:null,getFunctorWithIndexComposition:function(e,t){var n=eD(e,t).map,r=h$(e,t);return{map:n,mapWithIndex:function(e,t){return eu(e,r(t))}}},mapWithIndex:h$},Symbol.toStringTag,{value:"Module"})),h0=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),h1=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),h2=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));var h6=function(e,t){return eu(e,mn(t))},h5=function(e,t){return eu(e,mr(t))},h3=function(e,t){return eu(e,mi(t))},h9=function(e,t,n){return eu(e,ms(t,n))},h4=function(e){return function(e,t){return eu(e,ml()(t))}},h7=function(e,t,n){return eu(e,mc(t,n))},h8=function(e,t){return eu(e,mA())},me=function(e,t){return eu(e,mo(t))},mt=function(e){var t=md(e);return function(e,n){return eu(e,t(n))}},mn=function(e){return function(t){return e(t)}},mr=function(e){return function(t){return t(e)}},mi=function(e){return function(t){return e(t)}},mo=function(e){return function(t){return e(t)}},ma=mo(J),mu=mi(J),ms=function(e,t){return function(n){return t(e,n)}},ml=function(){return function(e){return function(t){return e(t)}}},mc=function(e,t){return function(n){return t(n,e)}},md=function(e){return function(t){return function(n){return e.map(t(n),J)}}},mf=function(e){return function(t){return e.map(t,J)}},mp=function(){return J},mA=mp,mh="Identity",mm={URI:mh,map:h6},mg=eP(mm),my={URI:mh,map:h6,ap:h5},mv=eR(my),mx=ek(my),mb={URI:mh,map:h6,ap:h5,chain:h3},mC=ez(mb),mS=J(eI),mw=eW(mm),mI=eY(mb),m_=eE(my);let mT=Object.freeze(Object.defineProperty({__proto__:null,Alt:{URI:mh,map:h6,alt:h8},Applicative:{URI:mh,map:h6,ap:h5,of:J},Apply:my,Chain:mb,ChainRec:{URI:mh,map:h6,ap:h5,chain:h3,chainRec:cl},Comonad:{URI:mh,map:h6,extend:me,extract:J},Do:mS,Foldable:{URI:mh,reduce:h9,foldMap:h4,reduceRight:h7},Functor:mm,Monad:{URI:mh,map:h6,ap:h5,of:J,chain:h3},Pointed:{URI:mh,of:J},Traversable:{URI:mh,map:h6,reduce:h9,foldMap:h4,reduceRight:h7,traverse:mt,sequence:mf},URI:mh,alt:mA,altW:mp,ap:mr,apFirst:mv,apS:m_,apSecond:mx,bind:mI,bindTo:mw,chain:mi,chainFirst:mC,duplicate:ma,extend:mo,extract:J,flap:mg,flatten:mu,foldMap:ml,getEq:J,getShow:J,identity:{URI:mh,map:h6,ap:h5,of:J,chain:h3,reduce:h9,foldMap:h4,reduceRight:h7,traverse:mt,sequence:mf,alt:h8,extract:J,extend:me,chainRec:cl},map:mn,of:J,reduce:ms,reduceRight:mc,sequence:mf,traverse:md},Symbol.toStringTag,{value:"Module"})),mO=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));var mR=function(e,t){return function(){return t(e())}},mk=function(e,t){return function(){return e()(t())}},mE=function(e,t){return function(){return t(e())()}},mM=function(e,t){return function(){for(var n=t(e)();"Left"===n._tag;)n=t(n.left)();return n.right}},mF=function(e){return function(t){return mR(t,e)}},mj=function(e){return function(t){return mk(t,e)}},mU=function(e){return function(t){return mE(t,e)}},mK=mU(J),mL={URI:"IO",map:mR},mB=eP(mL),mP={URI:"IO",of:G},mW={URI:"IO",map:mR,ap:mk},mD=eR(mW),mN=ek(mW),mq={URI:"IO",map:mR,ap:mk,of:G},mQ={URI:"IO",map:mR,ap:mk,chain:mE},mV={URI:"IO",map:mR,ap:mk,of:G,chain:mE},mz=ez(mQ),mY=G(eI),mH=eW(mL),mZ=eY(mQ),mJ=eE(mW),mG=G(ew),m$=function(e){return function(t){return function(){for(var n=[e(0,eC(t))()],r=1;r<t.length;r++)n.push(e(r,t[r])());return n}}},mX=function(e){var t=m$(e);return function(e){return eb(e)?t(e):mG}},m0=function(e){return mX(function(t,n){return e(n)})},m1=m0(J),m2=eM(mW),m6=eq(mq);let m5=Object.freeze(Object.defineProperty({__proto__:null,ApT:mG,Applicative:mq,Apply:mW,Chain:mQ,ChainRec:{URI:"IO",map:mR,ap:mk,chain:mE,chainRec:mM},Do:mY,FromIO:{URI:"IO",fromIO:J},Functor:mL,Monad:mV,MonadIO:{URI:"IO",map:mR,ap:mk,of:G,chain:mE,fromIO:J},Pointed:mP,URI:"IO",ap:mj,apFirst:mD,apS:mJ,apSecond:mN,bind:mZ,bindTo:mH,chain:mU,chainFirst:mz,flap:mB,flatten:mK,fromIO:J,getMonoid:m6,getSemigroup:m2,io:{URI:"IO",map:mR,of:G,ap:mk,chain:mE,fromIO:J,chainRec:mM},map:mF,of:G,sequenceArray:m1,traverseArray:m0,traverseArrayWithIndex:mX,traverseReadonlyArrayWithIndex:mX,traverseReadonlyNonEmptyArrayWithIndex:m$},Symbol.toStringTag,{value:"Module"}));var m3=pK(mP),m9=pU(mP),m4=pL(mL),m7=pB(mL),m8=pZ(mL),ge=pJ(mV),gt=pG(mV),gn=function(e,t){return function(){return pA(e,t)}},gr=function(e,t){return function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return gn(function(){return e.apply(void 0,n)},t)}},gi=p2(mL),go=p$(mV),ga=pX(mV),gu=function(e){return ga(gL(e))},gs=p0(mV),gl=p1(mL),gc=function(e,t){return eu(e,gg(t))},gd=function(e,t){return eu(e,gx(t))},gf=function(e,t){return eu(e,gb(function(e){return eu(t,gg(e))}))},gp=function(e,t){return eu(e,gb(t))},gA=function(e,t,n){return eu(e,gy(t,n))},gh=function(e,t){return eu(e,gv(t))},gm=function(e,t){return eu(e,gS(t))},gg=pN(mL),gy=pz(mL),gv=pY(mL),gx=pq(mW),gb=pQ(mV),gC=gb(J),gS=pV(mV),gw="IOEither";function gI(e){var t=eO(mW,fK(e));return{URI:gw,_E:void 0,map:gc,ap:function(e,n){return eu(e,t(n))},of:m9}}function g_(e){var t=pH(mV,e);return{URI:gw,_E:void 0,map:gc,alt:function(e,n){return eu(e,t(n))}}}var gT=function(e){var t=fF(e);return{URI:gw,_E:void 0,compact:d0(mL,t),separate:d1(mL,t,fP)}},gO={URI:gw,map:gc},gR=eP(gO),gk={URI:gw,map:gc,ap:gd},gE=eR(gk),gM=ek(gk),gF={URI:gw,map:gc,ap:gd,of:m9},gj={URI:gw,map:gc,ap:gd,chain:gp},gU=ez(gj),gK={URI:gw,fromIO:m4},gL=Am(gK),gB=Ag(gK,gj),gP=Ay(gK,gj),gW={URI:gw,fromEither:G},gD=eZ(gW),gN=eG(gW),gq=e$(gW,gj),gQ=e0(gW,gj),gV=e1(gW,gj),gz=eJ(gW),gY=e2(gW,gj),gH=eX(gW),gZ=function(e,t,n){return gJ(e,t,n)},gJ=function(e,t,n){return eu(e,gb(function(e){return eu(t(e),mU(function(t){return eu(n(e,t),gb(function(){return G(t)}))}))}))},gG=m9(eI),g$=eW(gO),gX=eY(gj),g0=eE(gk),g1=m9(ew),g2=function(e){return en(m$(e),mF(pI(es)))},g6=function(e){var t=g2(e);return function(e){return eb(e)?t(e):g1}},g5=function(e){return function(t){return function(){var n=e(0,eC(t))();if(em(n))return n;for(var r=[n.right],i=1;i<t.length;i++){var o=e(i,t[i])();if(em(o))return o;r.push(o.right)}return ev(r)}}},g3=function(e){var t=g5(e);return function(e){return eb(e)?t(e):g1}},g9=function(e){return g6(function(t,n){return e(n)})},g4=g9(J),g7=function(e){return g3(function(t,n){return e(n)})},g8=g7(J),ye=eM(gk),yt=eq(gF),yn=function(e){return eM(mW)(fM(e))};let yr=Object.freeze(Object.defineProperty({__proto__:null,Alt:{URI:gw,map:gc,alt:gm},ApT:g1,Applicative:gF,ApplicativePar:gF,ApplicativeSeq:{URI:gw,map:gc,ap:gf,of:m9},ApplyPar:gk,Bifunctor:{URI:gw,bimap:gA,mapLeft:gh},Chain:gj,Do:gG,FromEither:gW,FromIO:gK,Functor:gO,Monad:{URI:gw,map:gc,ap:gd,of:m9,chain:gp},MonadIO:{URI:gw,map:gc,ap:gd,of:m9,chain:gp,fromIO:m4},MonadThrow:{URI:gw,map:gc,ap:gd,of:m9,chain:gp,throwError:m3},Pointed:{URI:gw,of:m9},URI:gw,alt:gS,altW:gS,ap:gx,apFirst:gE,apFirstW:gE,apS:g0,apSW:g0,apSecond:gM,apSecondW:gM,apW:gx,bimap:gy,bind:gX,bindTo:g$,bindW:gX,bracket:gZ,bracketW:gJ,chain:gb,chainEitherK:gQ,chainEitherKW:gQ,chainFirst:gU,chainFirstEitherK:gV,chainFirstEitherKW:gV,chainFirstIOK:gP,chainFirstW:gU,chainIOK:gB,chainOptionK:gq,chainW:gb,filterOrElse:gY,filterOrElseW:gY,flap:gR,flatten:gC,flattenW:gC,fold:ge,foldW:ge,fromEither:G,fromEitherK:gH,fromIO:m4,fromIOK:gL,fromOption:gD,fromOptionK:gN,fromPredicate:gz,getAltIOValidation:g_,getApplicativeIOValidation:gI,getApplyMonoid:yt,getApplySemigroup:ye,getCompactable:gT,getFilterable:function(e){var t=fj(e),n=gT(e),r=Ae(mL,t),i=At(mL,t),o=An(mL,t),a=Ar(mL,t);return{URI:gw,_E:void 0,map:gc,compact:n.compact,separate:n.separate,filter:function(e,t){return eu(e,r(t))},filterMap:function(e,t){return eu(e,i(t))},partition:function(e,t){return eu(e,o(t))},partitionMap:function(e,t){return eu(e,a(t))}}},getIOValidation:function(e){var t=gI(e),n=g_(e);return{URI:gw,_E:void 0,map:gc,ap:t.ap,of:m9,chain:gp,bimap:gA,mapLeft:gh,alt:n.alt,fromIO:m4,throwError:m3}},getOrElse:gt,getOrElseW:gt,getSemigroup:yn,ioEither:{URI:gw,bimap:gA,mapLeft:gh,map:gc,of:m9,ap:gd,chain:gp,alt:gm,fromIO:m4,throwError:m3},left:m3,leftIO:m7,map:gg,mapLeft:gv,match:m8,matchE:ge,matchEW:ge,matchW:m8,of:m9,orElse:go,orElseFirst:ga,orElseFirstIOK:gu,orElseFirstW:ga,orElseW:go,orLeft:gs,right:m9,rightIO:m4,sequenceArray:g4,sequenceSeqArray:g8,swap:gl,throwError:m3,toUnion:gi,traverseArray:g9,traverseArrayWithIndex:g6,traverseReadonlyArrayWithIndex:g6,traverseReadonlyArrayWithIndexSeq:g3,traverseReadonlyNonEmptyArrayWithIndex:g2,traverseReadonlyNonEmptyArrayWithIndexSeq:g5,traverseSeqArray:g7,traverseSeqArrayWithIndex:g3,tryCatch:gn,tryCatchK:gr},Symbol.toStringTag,{value:"Module"}));function yi(e){return en(eh,e.of)}function yo(e){return G(e.of(eA))}function ya(e){return function(t){return e.map(t,eh)}}function yu(e){return en(dE,e.of)}function ys(e){var t=yu(e);return function(e){return en(e,t)}}function yl(e){var t=yv(e),n=ys(e);return function(e){return t(n(e))}}function yc(e){return function(t){return en(t,e.of)}}function yd(e){var t=yv(e),n=yc(e);return function(e){return t(n(e))}}function yf(e){return function(t){return function(n){return e.of(c_(t)(n))}}}function yp(e){return en(cO,e.of)}function yA(e){return function(t,n){return function(r){return e.map(r,db(t,n))}}}function yh(e){return function(t,n){return function(r){return e.chain(r,db(t,n))}}}function ym(e){return function(t){return function(n){return e.chain(n,db(t,e.of))}}}function yg(e){return eB(e,cH)}function yy(e){return eO(e,cG)}function yv(e){var t=yo(e);return function(n){return function(r){return e.chain(r,db(function(){return t()},n))}}}function yx(e){var t=yi(e);return function(n){return function(r){return e.chain(r,db(n,t))}}}let yb=Object.freeze(Object.defineProperty({__proto__:null,alt:yx,ap:yy,chain:yv,chainNullableK:yl,chainOptionK:yd,fromEither:yp,fromF:ya,fromNullable:yu,fromNullableK:ys,fromOptionK:yc,fromPredicate:yf,getOptionM:function(e){var t=yy(e),n=yg(e),r=yv(e),i=yx(e),o=yh(e),a=ym(e),u=yo(e);return{map:function(e,t){return eu(e,n(t))},ap:function(e,n){return eu(e,t(n))},of:yi(e),chain:function(e,t){return eu(e,r(t))},alt:function(e,t){return eu(e,i(t))},fold:function(e,t,n){return eu(e,o(t,n))},getOrElse:function(e,t){return eu(e,a(t))},fromM:ya(e),none:function(){return u()}}},getOrElse:ym,map:yg,match:yA,matchE:yh,some:yi,zero:yo},Symbol.toStringTag,{value:"Module"}));var yC=yi(mP),yS=yf(mP),yw=yp(mP),yI=ya(mL),y_=mF(cO),yT=yA(mL),yO=yh(mQ),yR=ym(mV),yk=mF(dL),yE=mF(dK),yM=yu(mP),yF=ys(mP),yj=yl(mV),yU=yc(mP),yK=yd(mV),yL=yg(mL),yB=yy(mW),yP=yv(mV),yW=yP(J),yD=yx(mV),yN=yo(mP),yq=yN(),yQ=d0(mL,dr),yV=d1(mL,dr,cH),yz=Ae(mL,dl),yY=At(mL,dl),yH=An(mL,dl),yZ=Ar(mL,dl),yJ=function(e,t){return eu(e,yL(t))},yG=function(e,t){return eu(e,yB(t))},y$=function(e,t){return eu(e,yP(t))},yX=function(e,t){return eu(e,yD(t))},y0=function(e,t){return eu(e,yz(t))},y1=function(e,t){return eu(e,yY(t))},y2=function(e,t){return eu(e,yH(t))},y6=function(e,t){return eu(e,yZ(t))},y5="IOOption",y3={URI:y5,map:yJ},y9=eP(y3),y4={URI:y5,of:yC},y7={URI:y5,map:yJ,ap:yG},y8=eR(y7),ve=ek(y7),vt={URI:y5,map:yJ,ap:yG,chain:y$},vn=ez(vt),vr={URI:y5,zero:yN},vi=oy(vr,y4),vo={URI:y5,fromIO:yI},va=Am(vo),vu=Ag(vo,vt),vs=Ay(vo,vt),vl={URI:y5,fromEither:yw},vc=eX(vl),vd=e0(vl,vt),vf=e1(vl,vt),vp=yC(eI),vA=eW(y3),vh=eY(vt),vm=eE(y7),vg=yC(ew),vy=function(e){return en(m$(e),mF(dQ(es)))},vv=function(e){var t=vy(e);return function(e){return eb(e)?t(e):vg}};let vx=Object.freeze(Object.defineProperty({__proto__:null,Alt:{URI:y5,map:yJ,alt:yX},Alternative:{URI:y5,map:yJ,ap:yG,of:yC,alt:yX,zero:yN},ApT:vg,Applicative:{URI:y5,map:yJ,ap:yG,of:yC},Apply:y7,Chain:vt,Compactable:{URI:y5,compact:yQ,separate:yV},Do:vp,Filterable:{URI:y5,map:yJ,compact:yQ,separate:yV,filter:y0,filterMap:y1,partition:y2,partitionMap:y6},FromEither:vl,FromIO:vo,Functor:y3,Monad:{URI:y5,map:yJ,ap:yG,of:yC,chain:y$},MonadIO:{URI:y5,map:yJ,ap:yG,of:yC,chain:y$,fromIO:yI},Pointed:y4,Zero:vr,alt:yD,altW:yD,ap:yB,apFirst:y8,apS:vm,apSecond:ve,bind:vh,bindTo:vA,chain:yP,chainEitherK:vd,chainFirst:vn,chainFirstEitherK:vf,chainFirstIOK:vs,chainIOK:vu,chainNullableK:yj,chainOptionK:yK,compact:yQ,filter:yz,filterMap:yY,flap:y9,flatten:yW,fold:yO,fromEither:yw,fromEitherK:vc,fromIO:yI,fromIOEither:y_,fromIOK:va,fromNullable:yM,fromNullableK:yF,fromOption:G,fromOptionK:yU,fromPredicate:yS,getOrElse:yR,getOrElseW:yR,guard:vi,map:yL,match:yT,matchE:yO,matchEW:yO,matchW:yT,none:yq,of:yC,partition:yH,partitionMap:yZ,separate:yV,some:yC,toNullable:yE,toUndefined:yk,traverseReadonlyArrayWithIndex:vv,traverseReadonlyNonEmptyArrayWithIndex:vy,zero:yN},Symbol.toStringTag,{value:"Module"}));var vb=function(){function e(e){var t=this;this.value=e,this.read=function(){return t.value},this.write=this.write.bind(this),this.modify=this.modify.bind(this)}return e.prototype.write=function(e){var t=this;return function(){t.value=e}},e.prototype.modify=function(e){var t=this;return function(){t.value=e(t.value)}},e}();let vC=Object.freeze(Object.defineProperty({__proto__:null,IORef:vb,newIORef:function(e){return function(){return new vb(e)}}},Symbol.toStringTag,{value:"Module"})),vS=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));var vw=function(e){return pA(function(){return JSON.parse(e)},J)},vI=function(e){return pA(function(){var t=JSON.stringify(e);if("string"!=typeof t)throw Error("Converting unsupported structure to JSON");return t},J)};let v_=Object.freeze(Object.defineProperty({__proto__:null,parse:vw,stringify:vI},Symbol.toStringTag,{value:"Module"})),vT=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));var vO=function(e){return new Map(e)};function vR(e,t){return{show:function(n){var r=[];return n.forEach(function(n,i){r.push("[".concat(e.show(i),", ").concat(t.show(n),"]"))}),"new Map([".concat(r.sort().join(", "),"])")}}}var vk=function(e){return e.size},vE=function(e){return 0===e.size};function vM(e){var t=vq(e);return function(n,r){if(void 0===r){var i=vM(e);return function(e){return i(n,e)}}return ep(t(n,r))}}function vF(e){return function(t,n){if(void 0===n){var r=vF(e);return function(e){return r(t,e)}}for(var i,o=n.values();!(i=o.next()).done;){var a=i.value;if(e.equals(t,a))return!0}return!1}}var vj=function(e){return function(t){return Array.from(t.keys()).sort(e.compare)}},vU=function(e){return function(t){return Array.from(t.values()).sort(e.compare)}};function vK(e){var t=vj(e);return function(e){return function(n){for(var r=[],i=t(n),o=0;o<i.length;o++){var a=i[o];r.push(e(a,n.get(a)))}return r}}}var vL=function(e){return vK(e)(function(e,t){return[e,t]})},vB=function(e){var t=vN(e);return function(e,n){var r=t(e);return function(t){var i=r(t);if(ef(i)){var o=new Map(t);return o.set(e,n),o}if(i.value[1]!==n){var o=new Map(t);return o.set(i.value[0],n),o}return t}}},vP=function(e){var t=vN(e);return function(e){return function(n){var r=t(e,n);if(ep(r)){var i=new Map(n);return i.delete(r.value[0]),i}return n}}},vW=function(e){var t=vD(e);return function(e,n){return t(e,function(){return n})}},vD=function(e){var t=vN(e);return function(e,n){return function(r){var i=t(e,r);if(ef(i))return eA;var o=i.value,a=o[0],u=o[1],s=n(u);if(s===u)return eh(r);var l=new Map(r);return l.set(a,s),eh(l)}}};function vN(e){return function(t,n){if(void 0===n){var r=vN(e);return function(e){return r(t,e)}}for(var i,o=n.entries();!(i=o.next()).done;){var a=i.value,u=a[0],s=a[1];if(e.equals(u,t))return eh([u,s])}return eA}}function vq(e){var t=vN(e);return function(n,r){if(void 0===r){var i=vq(e);return function(e){return i(n,e)}}return eu(t(n,r),cY(function(e){return e[0],e[1]}))}}function vQ(e,t){var n=vN(e);return function(r,i){if(void 0===i){var o=vQ(e,t);return function(e){return o(e,r)}}for(var a,u=r.entries();!(a=u.next()).done;){var s=a.value,l=s[0],c=s[1],d=n(l,i);if(ef(d)||!e.equals(l,d.value[0])||!t.equals(c,d.value[1]))return!1}return!0}}var vV=new Map;function vz(e,t){var n=vQ(e,t);return e5(function(e,t){return n(e,t)&&n(t,e)})}var vY=function(e,t){return new Map([[e,t]])},vH=function(e,t){for(var n,r=new Map,i=e.entries();!(n=i.next()).done;){var o=n.value,a=o[0],u=o[1];r.set(a,t(a,u))}return r},vZ=function(e){return function(t){for(var n,r=new Map,i=new Map,o=t.entries();!(n=o.next()).done;){var a=n.value,u=a[0],s=e(u,a[1]);em(s)?r.set(u,s.left):i.set(u,s.right)}return ot(r,i)}};function vJ(e){return function(t){for(var n,r=new Map,i=new Map,o=t.entries();!(n=o.next()).done;){var a=n.value,u=a[0],s=a[1];e(u,s)?i.set(u,s):r.set(u,s)}return ot(r,i)}}var vG=function(e){return function(t){for(var n,r=new Map,i=t.entries();!(n=i.next()).done;){var o=n.value,a=o[0],u=e(a,o[1]);ep(u)&&r.set(a,u.value)}return r}};function v$(e){return function(t){for(var n,r=new Map,i=t.entries();!(n=i.next()).done;){var o=n.value,a=o[0],u=o[1];e(a,u)&&r.set(a,u)}return r}}var vX=function(e,t){return vH(e,function(e,n){return t(n)})},v0=function(e,t){return v5(e,function(e,n){return t(n)})},v1=function(e,t){return v3(e,function(e,n){return t(n)})},v2=function(e,t){return v9(e,function(e,n){return t(n)})},v6=function(e,t){return v4(e,function(e,n){return t(n)})},v5=function(e,t){return eu(e,v$(t))},v3=function(e,t){return eu(e,vG(t))},v9=function(e,t){return eu(e,vJ(t))},v4=function(e,t){return eu(e,vZ(t))},v7=function(e){for(var t,n=new Map,r=e.entries();!(t=r.next()).done;){var i=t.value,o=i[0],a=i[1];ep(a)&&n.set(o,a.value)}return n},v8=function(e){return function(t){return v0(t,e)}},xe=function(e){return function(t){return v1(t,e)}},xt=function(e){return function(t){return vX(t,e)}},xn=function(e){return function(t){return vH(t,e)}},xr=function(e){return function(t){return v2(t,e)}},xi=function(e){return function(t){return v6(t,e)}},xo=function(e){for(var t,n=new Map,r=new Map,i=e.entries();!(t=i.next()).done;){var o=t.value,a=o[0],u=o[1];em(u)?n.set(a,u.left):r.set(a,u.right)}return ot(n,r)},xa="ReadonlyMap",xu=function(e,t){var n=xI(e,t);return{concat:function(e,t){return n(t)(e)}}},xs=function(e,t){return{concat:xu(e,t).concat,empty:vV}},xl=function(e,t){var n=x_(e,t);return{concat:function(e,t){return n(t)(e)}}},xc=function(e){return function(){var t=xT(e);return{concat:function(e,n){return t(n)(e)}}}},xd={URI:xa,map:vX},xf=eP(xd),xp=function(){return{URI:xa,_E:void 0,map:vX,mapWithIndex:vH}},xA={URI:xa,compact:v7,separate:xo},xh=function(e){var t=xv(e);return function(e,n){return t(e,function(e,t,r){return n(t,r)})}},xm=function(e){var t=xx(e);return function(e){var n=t(e);return function(e){return n(function(t,n){return e(n)})}}},xg=function(e){var t=xb(e);return function(e,n){return t(e,function(e,t,r){return n(t,r)})}},xy=function(e){var t=xh(e),n=xm(e),r=xg(e);return{URI:xa,_E:void 0,reduce:function(e,n,r){return eu(e,t(n,r))},foldMap:function(e){var t=n(e);return function(e,n){return eu(e,t(n))}},reduceRight:function(e,t,n){return eu(e,r(t,n))}}},xv=function(e){var t=vj(e);return function(e,n){return function(r){for(var i=e,o=0,a=t(r);o<a.length;o++){var u=a[o];i=n(u,i,r.get(u))}return i}}},xx=function(e){var t=vj(e);return function(e){return function(n){return function(r){for(var i=e.empty,o=0,a=t(r);o<a.length;o++){var u=a[o];i=e.concat(i,n(u,r.get(u)))}return i}}}},xb=function(e){var t=vj(e);return function(e,n){return function(r){for(var i=e,o=t(r),a=o.length,u=a-1;u>=0;u--){var s=o[u];i=n(s,r.get(s),i)}return i}}},xC=function(e){var t=xy(e),n=xv(e),r=xx(e),i=xb(e);return{URI:xa,_E:void 0,reduce:t.reduce,foldMap:t.foldMap,reduceRight:t.reduceRight,reduceWithIndex:function(e,t,r){return eu(e,n(t,r))},foldMapWithIndex:function(e){var t=r(e);return function(e,n){return eu(e,t(n))}},reduceRightWithIndex:function(e,t,n){return eu(e,i(t,n))}}},xS=function(e){var t=xw(e),n=xy(e);return{URI:xa,_E:void 0,map:vX,reduce:n.reduce,foldMap:n.foldMap,reduceRight:n.reduceRight,traverse:t.traverse,sequence:t.sequence}},xw=function(e){var t=xC(e),n=vj(e),r=function(e){return function(t,r){for(var i=e.of(new Map),o=n(t),a=o.length,u=0;u<a;u++)!function(n){var a=o[n],u=t.get(a);i=e.ap(e.map(i,function(e){return function(t){return e.set(a,t)}}),r(a,u))}(u);return i}},i=function(e){var t=r(e);return function(e,n){return t(e,function(e,t){return n(t)})}},o=function(e){var t=r(e);return function(e){return t(e,es)}};return{URI:xa,_E:void 0,map:vX,mapWithIndex:vH,reduce:t.reduce,foldMap:t.foldMap,reduceRight:t.reduceRight,reduceWithIndex:t.reduceWithIndex,foldMapWithIndex:t.foldMapWithIndex,reduceRightWithIndex:t.reduceRightWithIndex,traverse:i,sequence:o,traverseWithIndex:r}},xI=function(e,t){var n=vq(e);return function(e){return function(r){if(vE(r))return e;if(vE(e))return r;for(var i,o=new Map,a=r.entries();!(i=a.next()).done;){var u=i.value,s=u[0],l=u[1],c=n(s)(e);ep(c)?o.set(s,t.concat(l,c.value)):o.set(s,l)}for(var d=e.entries();!(i=d.next()).done;){var f=i.value,s=f[0],l=f[1],c=n(s)(o);ef(c)&&o.set(s,l)}return o}}},x_=function(e,t){var n=vq(e);return function(e){return function(r){if(vE(r)||vE(e))return vV;for(var i,o=new Map,a=r.entries();!(i=a.next()).done;){var u=i.value,s=u[0],l=u[1],c=n(s)(e);ep(c)&&o.set(s,t.concat(l,c.value))}return o}}},xT=function(e){var t=vM(e);return function(e){return function(n){if(vE(n))return e;if(vE(e))return n;for(var r,i=new Map,o=n.entries();!(r=o.next()).done;){var a=r.value,u=a[0],s=a[1];t(u)(e)||i.set(u,s)}for(var l=e.entries();!(r=l.next()).done;){var c=r.value,u=c[0],s=c[1];t(u)(n)||i.set(u,s)}return i}}};let xO=Object.freeze(Object.defineProperty({__proto__:null,Compactable:xA,Filterable:{URI:xa,map:vX,compact:v7,separate:xo,filter:v0,filterMap:v1,partition:v2,partitionMap:v6},Functor:xd,URI:xa,collect:vK,compact:v7,deleteAt:vP,difference:xT,elem:vF,empty:vV,filter:v8,filterMap:xe,filterMapWithIndex:vG,filterWithIndex:v$,flap:xf,foldMap:xm,foldMapWithIndex:xx,fromFoldable:function(e,t,n){return function(r){var i=vN(e);return n.reduce(r,new Map,function(e,n){var r=n[0],o=n[1],a=i(r,e);return ep(a)?e.set(a.value[0],t.concat(a.value[1],o)):e.set(r,o),e})}},fromMap:vO,getDifferenceMagma:xc,getEq:vz,getFilterableWithIndex:function(){return{URI:xa,_E:void 0,map:vX,mapWithIndex:vH,compact:v7,separate:xo,filter:v0,filterMap:v1,partition:v2,partitionMap:v6,partitionMapWithIndex:v4,partitionWithIndex:v9,filterMapWithIndex:v3,filterWithIndex:v5}},getFoldable:xy,getFoldableWithIndex:xC,getFunctorWithIndex:xp,getIntersectionSemigroup:xl,getMonoid:function(e,t){var n=vN(e);return{concat:function(e,r){if(vE(e))return r;if(vE(r))return e;for(var i,o=new Map(e),a=r.entries();!(i=a.next()).done;){var u=i.value,s=u[0],l=u[1],c=n(s,e);ep(c)?o.set(c.value[0],t.concat(c.value[1],l)):o.set(s,l)}return o},empty:vV}},getShow:vR,getTraversable:xS,getTraversableWithIndex:xw,getUnionMonoid:xs,getUnionSemigroup:xu,getWitherable:function(e){var t=xw(e);return{URI:xa,_E:void 0,map:vX,compact:v7,separate:xo,filter:v0,filterMap:v1,partition:v2,partitionMap:v6,reduce:t.reduce,foldMap:t.foldMap,reduceRight:t.reduceRight,traverse:t.traverse,sequence:t.sequence,mapWithIndex:vH,reduceWithIndex:t.reduceWithIndex,foldMapWithIndex:t.foldMapWithIndex,reduceRightWithIndex:t.reduceRightWithIndex,traverseWithIndex:t.traverseWithIndex,wilt:oA(t,xA),wither:oh(t,xA)}},insertAt:vB,intersection:x_,isEmpty:vE,isSubmap:vQ,keys:vj,lookup:vq,lookupWithKey:vN,map:xt,mapWithIndex:xn,member:vM,modifyAt:vD,partition:xr,partitionMap:xi,partitionMapWithIndex:vZ,partitionWithIndex:vJ,pop:function(e){var t=vq(e),n=vP(e);return function(e){var r=n(e);return function(n){return eu(t(e,n),cY(function(e){return[e,r(n)]}))}}},readonlyMap:{URI:xa,map:vX,compact:v7,separate:xo,filter:v0,filterMap:v1,partition:v2,partitionMap:v6},reduce:xh,reduceRight:xg,reduceRightWithIndex:xb,reduceWithIndex:xv,separate:xo,singleton:vY,size:vk,toMap:function(e){return new Map(e)},toReadonlyArray:vL,toUnfoldable:function(e,t){var n=vL(e);return function(e){var r=n(e),i=r.length;return t.unfold(0,function(e){return e<i?eh([r[e],e+1]):eA})}},union:xI,updateAt:vW,upsertAt:vB,values:vU},Symbol.toStringTag,{value:"Module"}));var xR=function(){return(xR=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},xk=function(e){return function(t){return Array.from(t.keys()).sort(e.compare)}},xE=function(e){return function(t){return Array.from(t.values()).sort(e.compare)}};function xM(e){var t=xk(e);return function(e){return function(n){for(var r=[],i=t(n),o=0;o<i.length;o++){var a=i[o];r.push(e(a,n.get(a)))}return r}}}function xF(e){return xM(e)(function(e,t){return[e,t]})}var xj=function(e){var t=xB(e);return function(e,n){var r=t(e);return function(t){var i=r(t);if(ef(i)){var o=new Map(t);return o.set(e,n),o}if(i.value[1]!==n){var o=new Map(t);return o.set(i.value[0],n),o}return t}}},xU=function(e){var t=xB(e);return function(e){return function(n){var r=t(e,n);if(ep(r)){var i=new Map(n);return i.delete(r.value[0]),i}return n}}},xK=function(e){var t=xL(e);return function(e,n){return t(e,function(){return n})}},xL=function(e){var t=xB(e);return function(e,n){return function(r){var i=t(e,r);if(ef(i))return eA;var o=new Map(r);return o.set(i.value[0],n(i.value[1])),eh(o)}}};function xB(e){return function(t,n){if(void 0===n){var r=xB(e);return function(e){return r(t,e)}}for(var i,o=n.entries();!(i=o.next()).done;){var a=i.value,u=a[0],s=a[1];if(e.equals(u,t))return eh([u,s])}return eA}}var xP=function(e,t){return new Map([[e,t]])},xW=function(e,t){for(var n,r=new Map,i=e.entries();!(n=i.next()).done;){var o=n.value,a=o[0],u=o[1];r.set(a,t(a,u))}return r},xD=function(e){return function(t){for(var n,r=new Map,i=new Map,o=t.entries();!(n=o.next()).done;){var a=n.value,u=a[0],s=e(u,a[1]);em(s)?r.set(u,s.left):i.set(u,s.right)}return ot(r,i)}};function xN(e){return function(t){for(var n,r=new Map,i=new Map,o=t.entries();!(n=o.next()).done;){var a=n.value,u=a[0],s=a[1];e(u,s)?i.set(u,s):r.set(u,s)}return ot(r,i)}}var xq=function(e){return function(t){for(var n,r=new Map,i=t.entries();!(n=i.next()).done;){var o=n.value,a=o[0],u=e(a,o[1]);ep(u)&&r.set(a,u.value)}return r}};function xQ(e){return function(t){for(var n,r=new Map,i=t.entries();!(n=i.next()).done;){var o=n.value,a=o[0],u=o[1];e(a,u)&&r.set(a,u)}return r}}var xV=function(e,t){return xW(e,function(e,n){return t(n)})},xz=function(e,t){return xJ(e,function(e,n){return t(n)})},xY=function(e,t){return xG(e,function(e,n){return t(n)})},xH=function(e,t){return x$(e,function(e,n){return t(n)})},xZ=function(e,t){return xX(e,function(e,n){return t(n)})},xJ=function(e,t){return eu(e,xQ(t))},xG=function(e,t){return eu(e,xq(t))},x$=function(e,t){return eu(e,xN(t))},xX=function(e,t){return eu(e,xD(t))},x0=function(e){for(var t,n=new Map,r=e.entries();!(t=r.next()).done;){var i=t.value,o=i[0],a=i[1];ep(a)&&n.set(o,a.value)}return n},x1=function(e){return function(t){return xz(t,e)}},x2=function(e){return function(t){return xY(t,e)}},x6=function(e){return function(t){return xV(t,e)}},x5=function(e){return function(t){return xW(t,e)}},x3=function(e){return function(t){return xH(t,e)}},x9=function(e){return function(t){return xZ(t,e)}},x4=function(e){for(var t,n=new Map,r=new Map,i=e.entries();!(t=i.next()).done;){var o=t.value,a=o[0],u=o[1];em(u)?n.set(a,u.left):r.set(a,u.right)}return ot(n,r)},x7=function(e,t){var n=bc(e,t);return{concat:function(e,t){return n(t)(e)}}},x8=function(e,t){return{concat:x7(e,t).concat,empty:new Map}},be=function(e,t){var n=bd(e,t);return{concat:function(e,t){return n(t)(e)}}},bt=function(e){return function(){var t=bf(e);return{concat:function(e,n){return t(n)(e)}}}},bn=function(e){return xR(xR({},xy(e)),{URI:"Map"})},br=function(e){return xR(xR({},xC(e)),{URI:"Map"})},bi=function(e){var t=br(e),n=xk(e),r=function(e){return function(t,r){for(var i=e.of(new Map),o=n(t),a=o.length,u=0;u<a;u++)!function(n){var a=o[n],u=t.get(a);i=e.ap(e.map(i,function(e){return function(t){return e.set(a,t)}}),r(a,u))}(u);return i}},i=function(e){var t=r(e);return function(e,n){return t(e,function(e,t){return n(t)})}},o=function(e){var t=r(e);return function(e){return t(e,function(e,t){return t})}};return{URI:"Map",_E:void 0,map:xV,mapWithIndex:xW,reduce:t.reduce,foldMap:t.foldMap,reduceRight:t.reduceRight,reduceWithIndex:t.reduceWithIndex,foldMapWithIndex:t.foldMapWithIndex,reduceRightWithIndex:t.reduceRightWithIndex,traverse:i,sequence:o,traverseWithIndex:r}},bo={URI:"Map",map:xV},ba=eP(bo),bu={URI:"Map",compact:x0,separate:x4},bs={URI:"Map",map:xV,compact:x0,separate:x4,filter:xz,filterMap:xY,partition:xH,partitionMap:xZ},bl=function(e){return new Map(e)},bc=function(e,t){var n=xI(e,t);return function(e){return function(t){return vE(t)?bl(e):vE(e)?bl(t):n(e)(t)}}},bd=function(e,t){var n=x_(e,t);return function(e){return function(t){return vE(t)||vE(e)?new Map:n(e)(t)}}},bf=function(e){var t=xT(e);return function(e){return function(n){return vE(n)?bl(e):vE(e)?bl(n):t(e)(n)}}},bp=new Map;let bA=Object.freeze(Object.defineProperty({__proto__:null,Compactable:bu,Filterable:bs,Functor:bo,URI:"Map",collect:xM,compact:x0,deleteAt:xU,difference:bf,elem:vF,empty:bp,filter:x1,filterMap:x2,filterMapWithIndex:xq,filterWithIndex:xQ,flap:ba,foldMap:xm,foldMapWithIndex:xx,fromFoldable:function(e,t,n){return function(r){var i=xB(e);return n.reduce(r,new Map,function(e,n){var r=n[0],o=n[1],a=i(r,e);return ep(a)?e.set(a.value[0],t.concat(a.value[1],o)):e.set(r,o),e})}},getDifferenceMagma:bt,getEq:vz,getFilterableWithIndex:function(){return{URI:"Map",_E:void 0,map:xV,mapWithIndex:xW,compact:x0,separate:x4,filter:xz,filterMap:xY,partition:xH,partitionMap:xZ,partitionMapWithIndex:xX,partitionWithIndex:x$,filterMapWithIndex:xG,filterWithIndex:xJ}},getFoldable:bn,getFoldableWithIndex:br,getIntersectionSemigroup:be,getMonoid:function(e,t){var n=xB(e);return{concat:function(e,r){if(vE(e))return r;if(vE(r))return e;for(var i,o=new Map(e),a=r.entries();!(i=a.next()).done;){var u=i.value,s=u[0],l=u[1],c=n(s,e);ep(c)?o.set(c.value[0],t.concat(c.value[1],l)):o.set(s,l)}return o},empty:new Map}},getShow:vR,getTraversableWithIndex:bi,getUnionMonoid:x8,getUnionSemigroup:x7,getWitherable:function(e){var t=bi(e);return{URI:"Map",_E:void 0,map:xV,compact:x0,separate:x4,filter:xz,filterMap:xY,partition:xH,partitionMap:xZ,reduce:t.reduce,foldMap:t.foldMap,reduceRight:t.reduceRight,traverse:t.traverse,sequence:t.sequence,mapWithIndex:xW,reduceWithIndex:t.reduceWithIndex,foldMapWithIndex:t.foldMapWithIndex,reduceRightWithIndex:t.reduceRightWithIndex,traverseWithIndex:t.traverseWithIndex,wilt:oA(t,bu),wither:oh(t,bu)}},insertAt:xj,intersection:bd,isEmpty:vE,isSubmap:vQ,keys:xk,lookup:vq,lookupWithKey:xB,map:x6,mapWithIndex:x5,map_:bs,member:vM,modifyAt:xL,partition:x3,partitionMap:x9,partitionMapWithIndex:xD,partitionWithIndex:xN,pop:function(e){var t=vq(e),n=xU(e);return function(e){var r=n(e);return function(n){return eu(t(e,n),cY(function(e){return[e,r(n)]}))}}},reduce:xh,reduceRight:xg,reduceRightWithIndex:xb,reduceWithIndex:xv,separate:x4,singleton:xP,size:vk,toArray:xF,toUnfoldable:function(e,t){var n=xF(e);return function(e){var r=n(e),i=r.length;return t.unfold(0,function(e){return e<i?eh([r[e],e+1]):eA})}},union:bc,updateAt:xK,upsertAt:xj,values:xE},Symbol.toStringTag,{value:"Module"})),bh=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),bm=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),bg=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),by=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),bv=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));var bx=function(e){return{concat:tM(e).concat,empty:e.top}},bb=function(e){return{concat:tF(e).concat,empty:e.bottom}},bC=function(e){return{concat:t_(e).concat,empty:e.empty}},bS=function(e){var t={};for(var n in e)e_.call(e,n)&&(t[n]=e[n].empty);return{concat:tU(e).concat,empty:t}},bw=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return{concat:tK.apply(tY,e).concat,empty:e.map(function(e){return e.empty})}},bI=function(e){return tk(e)(e.empty)},b_={concat:tW.concat,empty:void 0},bT={concat:tN.concat,empty:!0},bO={concat:tq.concat,empty:!1},bR=function(){return bC(p3())},bk={concat:tQ.concat,empty:""},bE={concat:tV.concat,empty:0},bM={concat:tz.concat,empty:1};let bF=Object.freeze(Object.defineProperty({__proto__:null,concatAll:bI,fold:bI,getDualMonoid:bC,getEndomorphismMonoid:bR,getFunctionMonoid:z,getJoinMonoid:bb,getMeetMonoid:bx,getStructMonoid:bS,getTupleMonoid:bw,max:bb,min:bx,monoidAll:bT,monoidAny:bO,monoidProduct:bM,monoidString:bk,monoidSum:bE,monoidVoid:b_,reverse:bC,struct:bS,tuple:bw},Symbol.toStringTag,{value:"Module"})),bj=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));var bU=function(e,t,n){return function(r){return -1===r?e():0===r?t():n()}},bK=function(e){return -1===e?1:1===e?-1:0},bL={equals:function(e,t){return e===t}},bB={concat:function(e,t){return 0!==e?e:t}},bP={concat:bB.concat,empty:0},bW=function(e){return e<=-1?-1:e>=1?1:0};let bD=Object.freeze(Object.defineProperty({__proto__:null,Eq:bL,Monoid:bP,Semigroup:bB,eqOrdering:bL,invert:bK,match:bU,matchW:bU,monoidOrdering:bP,reverse:bK,semigroupOrdering:bB,sign:bW},Symbol.toStringTag,{value:"Module"})),bN=Object.freeze(Object.defineProperty({__proto__:null,pipe:eu,pipeable:function(e){var t,n,r,i,o,a,u,s,l,c,d,f,p,A,h,m={};if("function"==typeof e.map){var g=function(t){return function(n){return e.map(n,t)}};m.map=g}if("function"==typeof e.contramap){var y=function(t){return function(n){return e.contramap(n,t)}};m.contramap=y}if("function"==typeof e.mapWithIndex){var v=function(t){return function(n){return e.mapWithIndex(n,t)}};m.mapWithIndex=v}if("function"==typeof e.ap){var x=function(t){return function(n){return e.ap(n,t)}},b=function(t){return function(n){return e.ap(e.map(n,function(e){return function(){return e}}),t)}};m.ap=x,m.apFirst=b,m.apSecond=function(t){return function(n){return e.ap(e.map(n,function(){return function(e){return e}}),t)}}}if("function"==typeof e.chain){var C=function(t){return function(n){return e.chain(n,t)}},S=function(t){return function(n){return e.chain(n,function(n){return e.map(t(n),function(){return n})})}},w=function(t){return e.chain(t,J)};m.chain=C,m.chainFirst=S,m.flatten=w}if("function"==typeof e.bimap){var I=function(t,n){return function(r){return e.bimap(r,t,n)}},_=function(t){return function(n){return e.mapLeft(n,t)}};m.bimap=I,m.mapLeft=_}if("function"==typeof e.extend){var T=function(t){return function(n){return e.extend(n,t)}},O=function(t){return e.extend(t,J)};m.extend=T,m.duplicate=O}if("function"==typeof e.reduce){var R=function(t,n){return function(r){return e.reduce(r,t,n)}},k=function(t){var n=e.foldMap(t);return function(e){return function(t){return n(t,e)}}},E=function(t,n){return function(r){return e.reduceRight(r,t,n)}};m.reduce=R,m.foldMap=k,m.reduceRight=E}if("function"==typeof e.reduceWithIndex){var M=function(t,n){return function(r){return e.reduceWithIndex(r,t,n)}},F=function(t){var n=e.foldMapWithIndex(t);return function(e){return function(t){return n(t,e)}}},j=function(t,n){return function(r){return e.reduceRightWithIndex(r,t,n)}};m.reduceWithIndex=M,m.foldMapWithIndex=F,m.reduceRightWithIndex=j}if("function"==typeof e.alt){var U=function(t){return function(n){return e.alt(n,t)}};m.alt=U}if("function"==typeof e.compact&&(m.compact=e.compact,m.separate=e.separate),"function"==typeof e.filter){var K=function(t){return function(n){return e.filter(n,t)}},L=function(t){return function(n){return e.filterMap(n,t)}},B=function(t){return function(n){return e.partition(n,t)}},P=function(t){return function(n){return e.partitionMap(n,t)}};m.filter=K,m.filterMap=L,m.partition=B,m.partitionMap=P}if("function"==typeof e.filterWithIndex){var W=function(t){return function(n){return e.filterWithIndex(n,t)}},D=function(t){return function(n){return e.filterMapWithIndex(n,t)}},N=function(t){return function(n){return e.partitionWithIndex(n,t)}},q=function(t){return function(n){return e.partitionMapWithIndex(n,t)}};m.filterWithIndex=W,m.filterMapWithIndex=D,m.partitionWithIndex=N,m.partitionMapWithIndex=q}if("function"==typeof e.promap){var Q=function(t,n){return function(r){return e.promap(r,t,n)}};m.promap=Q}if("function"==typeof e.compose){var V=function(t){return function(n){return e.compose(n,t)}};m.compose=V}if("function"==typeof e.throwError){var z=function(t){return function(n){return"None"===n._tag?e.throwError(t()):e.of(n.value)}},Y=function(t){return"Left"===t._tag?e.throwError(t.left):e.of(t.right)},H=function(t,n){return function(r){return t(r)?e.of(r):e.throwError(n(r))}},Z=function(t,n){return function(r){return e.chain(r,function(r){return t(r)?e.of(r):e.throwError(n(r))})}};m.fromOption=z,m.fromEither=Y,m.fromPredicate=H,m.filterOrElse=Z}return m}},Symbol.toStringTag,{value:"Module"})),bq=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),bQ=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));var bV=function(){return Math.random()};function bz(e,t){return eu(bV,mF(function(n){return Math.floor((t-e+1)*n+e)}))}var bY=eu(bV,mF(function(e){return e<.5})),bH=function(e){return eu(bz(0,e.length-1),mF(function(t){return e[t]}))};let bZ=Object.freeze(Object.defineProperty({__proto__:null,random:bV,randomBool:bY,randomElem:bH,randomInt:bz,randomRange:function(e,t){return eu(bV,mF(function(n){return(t-e)*n+e}))}},Symbol.toStringTag,{value:"Module"}));var bJ=pK(AQ),bG=pU(AQ),b$=pL(AN),bX=pB(AN),b0=pZ(AN),b1=pJ(AJ),b2=pG(AJ),b6=p2(AN),b5=p$(AJ),b3=pX(AJ),b9=p0(AJ),b4=p1(AN),b7=function(e,t){return eu(e,Ci(t))},b8=function(e,t,n){return eu(e,Co(t,n))},Ce=function(e,t){return eu(e,Ca(t))},Ct=function(e,t){return eu(e,Cu(t))},Cn=function(e,t){return eu(e,Cs(t))},Cr=function(e,t){return eu(e,Cc(t))},Ci=pN(AN),Co=pz(AN),Ca=pY(AN),Cu=pq(AV),Cs=pQ(AJ),Cl=Cs(J),Cc=pV(AJ),Cd="ReaderEither",Cf=function(e){var t=fF(e);return{URI:Cd,_E:void 0,compact:d0(AN,t),separate:d1(AN,t,fP)}};function Cp(e){var t=eO(AV,fK(e));return{URI:Cd,_E:void 0,map:b7,ap:function(e,n){return eu(e,t(n))},of:bG}}function CA(e){var t=pH(AJ,e);return{URI:Cd,_E:void 0,map:b7,alt:function(e,n){return eu(e,t(n))}}}var Ch={URI:Cd,map:b7},Cm=eP(Ch),Cg={URI:Cd,map:b7,ap:Ct},Cy=eR(Cg),Cv=ek(Cg),Cx={URI:Cd,map:b7,ap:Ct,of:bG},Cb={URI:Cd,map:b7,ap:Ct,chain:Cn},CC=ez(Cb),CS={URI:Cd,fromReader:b$},Cw=he(CS),CI=ht(CS),C_=hn(CS),CT=hr(CS,Cb),CO=hi(CS,Cb),CR={URI:Cd,fromEither:G},Ck=eZ(CR),CE=eG(CR),CM=e$(CR,Cb),CF=e0(CR,Cb),Cj=e1(CR,Cb),CU=eJ(CR),CK=e2(CR,Cb),CL=eX(CR),CB=bG(eI),CP=eW(Ch),CW=eY(Cb),CD=eE(Cg),CN=bG(ew),Cq=function(e){return en(A6(e),AO(pI(es)))},CQ=function(e){var t=Cq(e);return function(e){return eb(e)?t(e):CN}},CV=function(e){return CQ(function(t,n){return e(n)})},Cz=CV(J),CY=eM(Cg),CH=eq(Cx),CZ=function(e){return eM(AV)(fM(e))};let CJ=Object.freeze(Object.defineProperty({__proto__:null,Alt:{URI:Cd,map:b7,alt:Cr},ApT:CN,Applicative:Cx,Apply:Cg,Bifunctor:{URI:Cd,bimap:b8,mapLeft:Ce},Chain:Cb,Do:CB,FromEither:CR,FromReader:CS,Functor:Ch,Monad:{URI:Cd,map:b7,ap:Ct,of:bG,chain:Cn},MonadThrow:{URI:Cd,map:b7,ap:Ct,of:bG,chain:Cn,throwError:bJ},Pointed:{URI:Cd,of:bG},URI:Cd,alt:Cc,altW:Cc,ap:Cu,apFirst:Cy,apFirstW:Cy,apS:CD,apSW:CD,apSecond:Cv,apSecondW:Cv,apW:Cu,ask:Cw,asks:CI,asksReaderEither:AC,asksReaderEitherW:AC,bimap:Co,bind:CW,bindTo:CP,bindW:CW,chain:Cs,chainEitherK:CF,chainEitherKW:CF,chainFirst:CC,chainFirstEitherK:Cj,chainFirstEitherKW:Cj,chainFirstReaderK:CO,chainFirstReaderKW:CO,chainFirstW:CC,chainOptionK:CM,chainReaderK:CT,chainReaderKW:CT,chainW:Cs,filterOrElse:CK,filterOrElseW:CK,flap:Cm,flatten:Cl,flattenW:Cl,fold:b1,foldW:b1,fromEither:G,fromEitherK:CL,fromOption:Ck,fromOptionK:CE,fromPredicate:CU,fromReader:b$,fromReaderK:C_,getAltReaderValidation:CA,getApplicativeReaderValidation:Cp,getApplyMonoid:CH,getApplySemigroup:CY,getCompactable:Cf,getFilterable:function(e){var t=fj(e),n=Cf(e),r=Ae(AN,t),i=At(AN,t),o=An(AN,t),a=Ar(AN,t);return{URI:Cd,_E:void 0,map:b7,compact:n.compact,separate:n.separate,filter:function(e,t){return eu(e,r(t))},filterMap:function(e,t){return eu(e,i(t))},partition:function(e,t){return eu(e,o(t))},partitionMap:function(e,t){return eu(e,a(t))}}},getOrElse:b2,getOrElseW:b2,getReaderValidation:function(e){var t=Cp(e),n=CA(e);return{URI:Cd,_E:void 0,map:b7,ap:t.ap,of:bG,chain:Cn,bimap:b8,mapLeft:Ce,alt:n.alt,throwError:bJ}},getSemigroup:CZ,left:bJ,leftReader:bX,local:Ab,map:Ci,mapLeft:Ca,match:b0,matchE:b1,matchEW:b1,matchW:b0,of:bG,orElse:b5,orElseFirst:b3,orElseFirstW:b3,orElseW:b5,orLeft:b9,readerEither:{URI:Cd,bimap:b8,mapLeft:Ce,map:b7,of:bG,ap:Ct,chain:Cn,alt:Cr,throwError:bJ},right:bG,rightReader:b$,sequenceArray:Cz,swap:b4,throwError:bJ,toUnion:b6,traverseArray:CV,traverseArrayWithIndex:CQ,traverseReadonlyArrayWithIndex:CQ,traverseReadonlyNonEmptyArrayWithIndex:Cq},Symbol.toStringTag,{value:"Module"}));function CG(e){return function(t){return function(){return e.of(t)}}}function C$(e){return function(t){return function(n){return function(r){return e.map(n(r),t)}}}}function CX(e){return function(t){return function(n){return function(r){return e.ap(n(r),t(r))}}}}function C0(e){return function(t){return function(n){return function(r){return e.chain(n(r),function(e){return t(e)(r)})}}}}function C1(e){return function(t){return en(t,e.of)}}let C2=Object.freeze(Object.defineProperty({__proto__:null,ap:CX,chain:C0,fromNaturalTransformation:function(e){return function(t){return en(t,e)}},fromReader:C1,getReaderM:function(e){var t=CX(e),n=C$(e),r=C0(e);return{map:function(e,t){return eu(e,n(t))},ap:function(e,n){return eu(e,t(n))},of:CG(e),chain:function(e,t){return eu(e,r(t))},ask:function(){return e.of},asks:function(t){return en(t,e.of)},local:function(e,t){return function(n){return e(t(n))}},fromReader:C1(e),fromM:function(e){return function(){return e}}}},map:C$,of:CG},Symbol.toStringTag,{value:"Module"}));var C6=function(e){return function(){return Promise.resolve().then(e)}},C5=function(e,t){return eu(e,C7(t))},C3=function(e,t){return eu(e,C8(t))},C9=function(e,t){return eu(e,St(function(e){return eu(t,C7(e))}))},C4=function(e,t){return eu(e,St(t))},C7=function(e){return function(t){return function(){return Promise.resolve().then(t).then(e)}}},C8=function(e){return function(t){return function(){return Promise.all([Promise.resolve().then(t),Promise.resolve().then(e)]).then(function(e){var t;return(0,e[0])(e[1])})}}},Se=function(e){return function(){return Promise.resolve(e)}},St=function(e){return function(t){return function(){return Promise.resolve().then(t).then(function(t){return e(t)()})}}},Sn=St(J),Sr="Task",Si={URI:Sr,map:C5},So=eP(Si),Sa={URI:Sr,of:Se},Su={URI:Sr,map:C5,ap:C3},Ss=eR(Su),Sl=ek(Su),Sc={URI:Sr,map:C5,ap:C3,of:Se},Sd={URI:Sr,map:C5,ap:C9},Sf={URI:Sr,map:C5,ap:C9,of:Se},Sp={URI:Sr,map:C5,ap:C3,chain:C4},SA={URI:Sr,map:C5,of:Se,ap:C3,chain:C4},Sh=ez(Sp),Sm={URI:Sr,fromIO:C6},Sg=Am(Sm),Sy=Ag(Sm,Sp),Sv=Ay(Sm,Sp),Sx=function(){return new Promise(function(e){})},Sb=Se(eI),SC=eW(Si),SS=eY(Sp),Sw=eE(Su),SI=Se(ew),S_=function(e){return function(t){return function(){return Promise.all(t.map(function(t,n){return Promise.resolve().then(function(){return e(n,t)()})}))}}},ST=function(e){var t=S_(e);return function(e){return eb(e)?t(e):SI}},SO=function(e){return function(t){return function(){return eS(t).reduce(function(t,n,r){return t.then(function(t){return Promise.resolve().then(e(r+1,n)).then(function(e){return t.push(e),t})})},Promise.resolve().then(e(0,eC(t))).then(ex))}}},SR=function(e){var t=SO(e);return function(e){return eb(e)?t(e):SI}},Sk=function(e){return ST(function(t,n){return e(n)})},SE=Sk(J),SM=function(e){return SR(function(t,n){return e(n)})},SF=SM(J),Sj=eM(Sd),SU=eq(Sf);let SK=Object.freeze(Object.defineProperty({__proto__:null,ApT:SI,ApplicativePar:Sc,ApplicativeSeq:Sf,ApplyPar:Su,ApplySeq:Sd,Chain:Sp,Do:Sb,FromIO:Sm,FromTask:{URI:Sr,fromIO:C6,fromTask:J},Functor:Si,Monad:SA,MonadIO:{URI:Sr,map:C5,of:Se,ap:C3,chain:C4,fromIO:C6},MonadTask:{URI:Sr,map:C5,of:Se,ap:C3,chain:C4,fromIO:C6,fromTask:J},Pointed:Sa,URI:Sr,ap:C8,apFirst:Ss,apS:Sw,apSecond:Sl,bind:SS,bindTo:SC,chain:St,chainFirst:Sh,chainFirstIOK:Sv,chainIOK:Sy,delay:function(e){return function(t){return function(){return new Promise(function(n){setTimeout(function(){Promise.resolve().then(t).then(n)},e)})}}},flap:So,flatten:Sn,fromIO:C6,fromIOK:Sg,fromTask:J,getMonoid:SU,getRaceMonoid:function(){return{concat:function(e,t){return function(){return Promise.race([Promise.resolve().then(e),Promise.resolve().then(t)])}},empty:Sx}},getSemigroup:Sj,map:C7,never:Sx,of:Se,sequenceArray:SE,sequenceSeqArray:SF,task:{URI:Sr,map:C5,of:Se,ap:C3,chain:C4,fromIO:C6,fromTask:J},taskSeq:{URI:Sr,map:C5,of:Se,ap:C9,chain:C4,fromIO:C6,fromTask:J},traverseArray:Sk,traverseArrayWithIndex:ST,traverseReadonlyArrayWithIndex:ST,traverseReadonlyArrayWithIndexSeq:SR,traverseReadonlyNonEmptyArrayWithIndex:S_,traverseReadonlyNonEmptyArrayWithIndexSeq:SO,traverseSeqArray:SM,traverseSeqArrayWithIndex:SR},Symbol.toStringTag,{value:"Module"}));var SL=C1(Sa),SB=en(C6,G),SP=function(e,t){return eu(e,Sq(t))},SW=function(e,t){return eu(e,SQ(t))},SD=function(e,t){return eu(e,Sz(function(e){return eu(t,Sq(e))}))},SN=function(e,t){return eu(e,Sz(t))},Sq=C$(Si),SQ=CX(Su),SV=CG(Sa),Sz=C0(SA),SY=Sz(J),SH="ReaderTask",SZ={URI:SH,map:SP},SJ=eP(SZ),SG={URI:SH,of:SV},S$={URI:SH,map:SP,ap:SW},SX=eR(S$),S0=ek(S$),S1={URI:SH,map:SP,ap:SD},S2={URI:SH,map:SP,ap:SD,of:SV},S6={URI:SH,map:SP,ap:SW,chain:SN},S5={URI:SH,map:SP,of:SV,ap:SW,chain:SN},S3=ez(S6),S9={URI:SH,fromIO:SB},S4=Am(S9),S7=Ag(S9,S6),S8=Ay(S9,S6),we={URI:SH,fromReader:SL},wt=he(we),wn=ht(we),wr=hn(we),wi=hr(we,S6),wo=hi(we,S6),wa={URI:SH,fromIO:SB,fromTask:G},wu=hz(wa),ws=hY(wa,S6),wl=hH(wa,S6),wc=SV(eI),wd=eW(SZ),wf=eY(S6),wp=eE(S$),wA=SV(ew),wh=function(e){return en(A6(e),AO(S_(es)))},wm=function(e){var t=wh(e);return function(e){return eb(e)?t(e):wA}},wg=function(e){return en(A6(e),AO(SO(es)))},wy=function(e){var t=wg(e);return function(e){return eb(e)?t(e):wA}},wv=function(e){return wm(function(t,n){return e(n)})},wx=wv(J),wb=function(e){return wy(function(t,n){return e(n)})},wC=wb(J),wS=eM(S1),ww=eq(S2);function wI(e,t){return e(t)()}let w_=Object.freeze(Object.defineProperty({__proto__:null,ApT:wA,ApplicativePar:{URI:SH,map:SP,ap:SW,of:SV},ApplicativeSeq:S2,ApplyPar:S$,ApplySeq:S1,Chain:S6,Do:wc,FromIO:S9,FromReader:we,FromTask:wa,Functor:SZ,Monad:S5,MonadIO:{URI:SH,map:SP,of:SV,ap:SW,chain:SN,fromIO:SB},MonadTask:{URI:SH,map:SP,of:SV,ap:SW,chain:SN,fromIO:SB,fromTask:G},Pointed:SG,URI:SH,ap:SQ,apFirst:SX,apS:wp,apSW:wp,apSecond:S0,apW:SQ,ask:wt,asks:wn,asksReaderTask:AC,asksReaderTaskW:AC,bind:wf,bindTo:wd,bindW:wf,chain:Sz,chainFirst:S3,chainFirstIOK:S8,chainFirstReaderK:wo,chainFirstReaderKW:wo,chainFirstTaskK:wl,chainFirstW:S3,chainIOK:S7,chainReaderK:wi,chainReaderKW:wi,chainTaskK:ws,chainW:Sz,flap:SJ,flatten:SY,flattenW:SY,fromIO:SB,fromIOK:S4,fromReader:SL,fromReaderK:wr,fromTask:G,fromTaskK:wu,getMonoid:ww,getSemigroup:wS,local:Ab,map:Sq,of:SV,readerTask:{URI:SH,map:SP,of:SV,ap:SW,chain:SN,fromIO:SB,fromTask:G},readerTaskSeq:{URI:SH,map:SP,of:SV,ap:SD,chain:SN,fromIO:SB,fromTask:G},run:wI,sequenceArray:wx,sequenceSeqArray:wC,traverseArray:wv,traverseArrayWithIndex:wm,traverseReadonlyArrayWithIndex:wm,traverseReadonlyArrayWithIndexSeq:wy,traverseReadonlyNonEmptyArrayWithIndex:wh,traverseReadonlyNonEmptyArrayWithIndexSeq:wg,traverseSeqArray:wb,traverseSeqArrayWithIndex:wy},Symbol.toStringTag,{value:"Module"}));var wT=function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function u(o){return function(u){return function(o){if(n)throw TypeError("Generator is already executing.");for(;a;)try{if(n=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 a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=(i=a.trys).length>0&&i[i.length-1])&&(6===o[0]||2===o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(u){o=[6,u],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}},wO=pK(Sa),wR=pU(Sa),wk=pL(Si),wE=pB(Si),wM=en(C6,wk),wF=en(C6,wE),wj=function(e){return C7(f4(e))},wU=pZ(Si),wK=pJ(SA),wL=pG(SA),wB=function(e,t){return function(){var n,r,i,o;return n=void 0,r=void 0,i=void 0,o=function(){var n;return wT(this,function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,e().then(ev)];case 1:return[2,n.sent()];case 2:return[2,ey(t(n.sent()))];case 3:return[2]}})},new(i||(i=Promise))(function(e,t){function a(e){try{s(o.next(e))}catch(n){t(n)}}function u(e){try{s(o.throw(e))}catch(n){t(n)}}function s(t){var n;t.done?e(t.value):((n=t.value)instanceof i?n:new i(function(e){e(n)})).then(a,u)}s((o=o.apply(n,r||[])).next())})}},wP=function(e,t){return function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return wB(function(){return e.apply(void 0,n)},t)}},wW=p2(Si),wD=pP(Sa),wN=pW(Sa),wq=pD(SA),wQ=p$(SA),wV=pX(SA),wz=function(e){return wV(IO(e))},wY=function(e){return wV(IM(e))},wH=p0(SA),wZ=p1(Si),wJ=function(e){var t=wj(e);return function(e){return en(e,t)}},wG=function(e){return function(t){return function(n){return eu(n,It(wJ(e)(t)))}}},w$=function(e){return en(e,C6)},wX=function(e){return In(w$(e))},w0=function(e,t){return eu(e,w4(t))},w1=function(e,t){return eu(e,Ie(t))},w2=function(e,t){return eu(e,It(function(e){return eu(t,w4(e))}))},w6=function(e,t){return eu(e,It(t))},w5=function(e,t,n){return eu(e,w7(t,n))},w3=function(e,t){return eu(e,w8(t))},w9=function(e,t){return eu(e,Ii(t))},w4=pN(Si),w7=pz(Si),w8=pY(Si),Ie=pq(Su),It=pQ(SA),In=It,Ir=In(J),Ii=pV(SA),Io="TaskEither";function Ia(e,t){var n=eO(e,fK(t));return{URI:Io,_E:void 0,map:w0,ap:function(e,t){return eu(e,n(t))},of:wR}}function Iu(e){var t=pH(SA,e);return{URI:Io,_E:void 0,map:w0,alt:function(e,n){return eu(e,t(n))}}}var Is=function(e){var t=fF(e);return{URI:Io,_E:void 0,compact:d0(Si,t),separate:d1(Si,t,fP)}},Il={URI:Io,map:w0},Ic=eP(Il),Id={URI:Io,map:w0,ap:w1},If=eR(Id),Ip=ek(Id),IA={URI:Io,map:w0,ap:w2},Ih={URI:Io,map:w0,ap:w2,of:wR},Im={URI:Io,map:w0,ap:w1,chain:w6},Ig=ez(Im),Iy={URI:Io,fromEither:Se},Iv=eZ(Iy),Ix=eG(Iy),Ib=e$(Iy,Im),IC=e0(Iy,Im),IS=e1(Iy,Im),Iw=eJ(Iy),II=e2(Iy,Im),I_=eX(Iy),IT={URI:Io,fromIO:wM},IO=Am(IT),IR=Ag(IT,Im),Ik=Ay(IT,Im),IE={URI:Io,fromIO:wM,fromTask:wk},IM=hz(IE),IF=hY(IE,Im),Ij=hH(IE,Im),IU=function(e,t,n){return IK(e,t,n)},IK=function(e,t,n){return eu(e,In(function(e){return eu(t(e),St(function(t){return eu(n(e,t),In(function(){return Se(t)}))}))}))},IL=wR(eI),IB=eW(Il),IP=eY(Im),IW=eE(Id),ID=wR(ew),IN=function(e){return en(S_(e),C7(pI(es)))},Iq=function(e){var t=IN(e);return function(e){return eb(e)?t(e):ID}},IQ=function(e){return function(t){return function(){return eS(t).reduce(function(t,n,r){return t.then(function(i){return em(i)?t:e(r+1,n)().then(function(e){return em(e)?e:(i.right.push(e.right),i)})})},e(0,eC(t))().then(fB(ex)))}}},IV=function(e){var t=IQ(e);return function(e){return eb(e)?t(e):ID}},Iz=function(e){return Iq(function(t,n){return e(n)})},IY=Iz(J),IH=function(e){return IV(function(t,n){return e(n)})},IZ=IH(J),IJ=eM(IA),IG=eq(Ih),I$=function(e){return eM(Sd)(fM(e))};let IX=Object.freeze(Object.defineProperty({__proto__:null,Alt:{URI:Io,map:w0,alt:w9},ApT:ID,ApplicativePar:{URI:Io,map:w0,ap:w1,of:wR},ApplicativeSeq:Ih,ApplyPar:Id,ApplySeq:IA,Bifunctor:{URI:Io,bimap:w5,mapLeft:w3},Chain:Im,Do:IL,FromEither:Iy,FromIO:IT,FromTask:IE,Functor:Il,Monad:{URI:Io,map:w0,ap:w1,chain:w6,of:wR},MonadIO:{URI:Io,map:w0,ap:w1,chain:w6,of:wR,fromIO:wM},MonadTask:{URI:Io,map:w0,ap:w1,chain:w6,of:wR,fromIO:wM,fromTask:wk},MonadThrow:{URI:Io,map:w0,ap:w1,chain:w6,of:wR,throwError:wO},Pointed:{URI:Io,of:wR},URI:Io,alt:Ii,altW:Ii,ap:Ie,apFirst:If,apFirstW:If,apS:IW,apSW:IW,apSecond:Ip,apSecondW:Ip,apW:Ie,bimap:w7,bind:IP,bindTo:IB,bindW:IP,bracket:IU,bracketW:IK,chain:It,chainEitherK:IC,chainEitherKW:IC,chainFirst:Ig,chainFirstEitherK:IS,chainFirstEitherKW:IS,chainFirstIOK:Ik,chainFirstTaskK:Ij,chainFirstW:Ig,chainIOEitherK:wX,chainIOEitherKW:wX,chainIOK:IR,chainNullableK:wq,chainOptionK:Ib,chainTaskK:IF,chainTaskOptionK:wG,chainTaskOptionKW:wG,chainW:In,filterOrElse:II,filterOrElseW:II,flap:Ic,flatten:Ir,flattenW:Ir,fold:wK,foldW:wK,fromEither:Se,fromEitherK:I_,fromIO:wM,fromIOEither:C6,fromIOEitherK:w$,fromIOK:IO,fromNullable:wD,fromNullableK:wN,fromOption:Iv,fromOptionK:Ix,fromPredicate:Iw,fromTask:wk,fromTaskK:IM,fromTaskOption:wj,fromTaskOptionK:wJ,getAltTaskValidation:Iu,getApplicativeTaskValidation:Ia,getApplyMonoid:IG,getApplySemigroup:IJ,getCompactable:Is,getFilterable:function(e){var t=fj(e),n=Is(e),r=Ae(Si,t),i=At(Si,t),o=An(Si,t),a=Ar(Si,t);return{URI:Io,_E:void 0,map:w0,compact:n.compact,separate:n.separate,filter:function(e,t){return eu(e,r(t))},filterMap:function(e,t){return eu(e,i(t))},partition:function(e,t){return eu(e,o(t))},partitionMap:function(e,t){return eu(e,a(t))}}},getOrElse:wL,getOrElseW:wL,getSemigroup:I$,getTaskValidation:function(e){var t=Ia(Sc,e),n=Iu(e);return{URI:Io,_E:void 0,map:w0,ap:t.ap,of:wR,chain:w6,bimap:w5,mapLeft:w3,alt:n.alt,fromIO:wM,fromTask:wk,throwError:wO}},left:wO,leftIO:wF,leftTask:wE,map:w4,mapLeft:w8,match:wU,matchE:wK,matchEW:wK,matchW:wU,of:wR,orElse:wQ,orElseFirst:wV,orElseFirstIOK:wz,orElseFirstTaskK:wY,orElseFirstW:wV,orElseW:wQ,orLeft:wH,right:wR,rightIO:wM,rightTask:wk,sequenceArray:IY,sequenceSeqArray:IZ,swap:wZ,taskEither:{URI:Io,bimap:w5,mapLeft:w3,map:w0,of:wR,ap:w1,chain:w6,alt:w9,fromIO:wM,fromTask:wk,throwError:wO},taskEitherSeq:{URI:Io,bimap:w5,mapLeft:w3,map:w0,of:wR,ap:w2,chain:w6,alt:w9,fromIO:wM,fromTask:wk,throwError:wO},taskify:function(e){return function(){var t=Array.prototype.slice.call(arguments);return function(){return new Promise(function(n){var r=function(e,t){return null!=e?n(ey(e)):n(ev(t))};e.apply(null,t.concat(r))})}}},throwError:wO,toUnion:wW,traverseArray:Iz,traverseArrayWithIndex:Iq,traverseReadonlyArrayWithIndex:Iq,traverseReadonlyArrayWithIndexSeq:IV,traverseReadonlyNonEmptyArrayWithIndex:IN,traverseReadonlyNonEmptyArrayWithIndexSeq:IQ,traverseSeqArray:IH,traverseSeqArrayWithIndex:IV,tryCatch:wB,tryCatchK:wP},Symbol.toStringTag,{value:"Module"}));var I0=pK(SG),I1=pU(SG),I2=en(wk,G),I6=en(wE,G),I5=function(e){return en(e,wR)},I3=function(e){return en(e,wO)},I9=pL(SZ),I4=pB(SZ),I7=en(wM,G),I8=en(wF,G),_e=en(C6,G),_t=function(e){return en(e,Se)},_n=pZ(SZ),_r=pJ(S6),_i=pG(S5),_o=p2(SZ),_a=pP(SG),_u=pW(SG),_s=pD(S5),_l=p$(S5),_c=pX(S5),_d=p0(S5),_f=p1(SZ),_p=function(e){return en(e,_e)},_A=function(e){return _F(_p(e))},_h=function(e){return en(e,G)},_m=function(e){return _F(_h(e))},_g=function(e){return _J(_h(e))},_y=function(e){return en(e,_t)},_v=function(e){return _F(_y(e))},_x=function(e){return _J(_y(e))},_b=function(e,t){return eu(e,_O(t))},_C=function(e,t){return eu(e,_E(t))},_S=function(e,t){return eu(e,_M(function(e){return eu(t,_O(e))}))},_w=function(e,t){return eu(e,_M(t))},_I=function(e,t){return eu(e,_U(t))},__=function(e,t,n){return eu(e,_R(t,n))},_T=function(e,t){return eu(e,_k(t))},_O=pN(SZ),_R=pz(SZ),_k=pY(SZ),_E=pq(S$),_M=pQ(S5),_F=_M,_j=_F(J),_U=pV(S5),_K="ReaderTaskEither",_L=function(e){var t=fF(e);return{URI:_K,_E:void 0,compact:d0(SZ,t),separate:d1(SZ,t,fP)}};function _B(e,t){var n=eO(AV,Ia(e,t));return{URI:_K,_E:void 0,map:_b,ap:function(e,t){return eu(e,n(t))},of:I1}}function _P(e){var t=pH(S5,e);return{URI:_K,_E:void 0,map:_b,alt:function(e,n){return eu(e,t(n))}}}var _W={URI:_K,map:_b},_D=eP(_W),_N={URI:_K,of:I1},_q={URI:_K,map:_b,ap:_C},_Q=eR(_q),_V=ek(_q),_z={URI:_K,map:_b,ap:_S},_Y={URI:_K,map:_b,ap:_S,of:I1},_H={URI:_K,map:_b,ap:_C,chain:_w},_Z=ez(_H),_J=_Z,_G={URI:_K,fromReader:I5},_$=he(_G),_X=ht(_G),_0=hn(_G),_1=hr(_G,_H),_2=hi(_G,_H),_6=function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return I9(e.apply(void 0,t))}},_5=function(e){return _F(_6(e))},_3=function(e){return _J(_6(e))},_9={URI:_K,fromEither:SV},_4=eZ(_9),_7=eG(_9),_8=e$(_9,_H),Te=e0(_9,_H),Tt=e1(_9,_H),Tn=eJ(_9),Tr=e2(_9,_H),Ti=eX(_9),To={URI:_K,fromIO:I7},Ta=Am(To),Tu=Ag(To,_H),Ts=Ay(To,_H),Tl={URI:_K,fromIO:I7,fromTask:I2},Tc=hz(Tl),Td=hY(Tl,_H),Tf=hH(Tl,_H);function Tp(e,t,n){return TA(e,t,n)}function TA(e,t,n){return function(r){return IK(e(r),function(e){return t(e)(r)},function(e,t){return n(e,t)(r)})}}var Th=I1(eI),Tm=eW(_W),Tg=eY(_H),Ty=eE(_q),Tv=I1(ew),Tx=function(e){return en(A6(e),AO(IN(es)))},Tb=function(e){var t=Tx(e);return function(e){return eb(e)?t(e):Tv}},TC=function(e){return en(A6(e),AO(IQ(es)))},TS=function(e){var t=TC(e);return function(e){return eb(e)?t(e):Tv}},Tw=function(e){return Tb(function(t,n){return e(n)})},TI=Tw(J),T_=function(e){return TS(function(t,n){return e(n)})},TT=T_(J),TO=eM(_z),TR=eq(_Y),Tk=function(e){return eM(S1)(fM(e))};function TE(e,t){return e(t)()}let TM=Object.freeze(Object.defineProperty({__proto__:null,Alt:{URI:_K,map:_b,alt:_I},ApT:Tv,ApplicativePar:{URI:_K,map:_b,ap:_C,of:I1},ApplicativeSeq:_Y,ApplyPar:_q,ApplySeq:_z,Bifunctor:{URI:_K,bimap:__,mapLeft:_T},Chain:_H,Do:Th,FromEither:_9,FromIO:To,FromReader:_G,FromTask:Tl,Functor:_W,Monad:{URI:_K,map:_b,ap:_C,chain:_w,of:I1},MonadIO:{URI:_K,map:_b,ap:_C,chain:_w,of:I1,fromIO:I7},MonadTask:{URI:_K,map:_b,ap:_C,chain:_w,of:I1,fromIO:I7,fromTask:I2},MonadThrow:{URI:_K,map:_b,ap:_C,chain:_w,of:I1,throwError:I0},Pointed:_N,URI:_K,alt:_U,altW:_U,ap:_E,apFirst:_Q,apFirstW:_Q,apS:Ty,apSW:Ty,apSecond:_V,apSecondW:_V,apW:_E,ask:_$,asks:_X,asksReaderTaskEither:AC,asksReaderTaskEitherW:AC,bimap:_R,bind:Tg,bindTo:Tm,bindW:Tg,bracket:Tp,bracketW:TA,chain:_M,chainEitherK:Te,chainEitherKW:Te,chainFirst:_Z,chainFirstEitherK:Tt,chainFirstEitherKW:Tt,chainFirstIOK:Ts,chainFirstReaderEitherK:_x,chainFirstReaderEitherKW:_x,chainFirstReaderK:_2,chainFirstReaderKW:_2,chainFirstReaderTaskK:_3,chainFirstReaderTaskKW:_3,chainFirstTaskEitherK:_g,chainFirstTaskEitherKW:_g,chainFirstTaskK:Tf,chainFirstW:_J,chainIOEitherK:_A,chainIOEitherKW:_A,chainIOK:Tu,chainNullableK:_s,chainOptionK:_8,chainReaderEitherK:_v,chainReaderEitherKW:_v,chainReaderK:_1,chainReaderKW:_1,chainReaderTaskK:_5,chainReaderTaskKW:_5,chainTaskEitherK:_m,chainTaskEitherKW:_m,chainTaskK:Td,chainW:_F,filterOrElse:Tr,filterOrElseW:Tr,flap:_D,flatten:_j,flattenW:_j,fold:_r,foldW:_r,fromEither:SV,fromEitherK:Ti,fromIO:I7,fromIOEither:_e,fromIOEitherK:_p,fromIOK:Ta,fromNullable:_a,fromNullableK:_u,fromOption:_4,fromOptionK:_7,fromPredicate:Tn,fromReader:I5,fromReaderEither:_t,fromReaderEitherK:_y,fromReaderK:_0,fromReaderTaskK:_6,fromTask:I2,fromTaskEither:G,fromTaskEitherK:_h,fromTaskK:Tc,getAltReaderTaskValidation:_P,getApplicativeReaderTaskValidation:_B,getApplyMonoid:TR,getApplySemigroup:TO,getCompactable:_L,getFilterable:function(e){var t=fj(e),n=_L(e),r=Ae(SZ,t),i=At(SZ,t),o=An(SZ,t),a=Ar(SZ,t);return{URI:_K,_E:void 0,map:_b,compact:n.compact,separate:n.separate,filter:function(e,t){return eu(e,r(t))},filterMap:function(e,t){return eu(e,i(t))},partition:function(e,t){return eu(e,o(t))},partitionMap:function(e,t){return eu(e,a(t))}}},getOrElse:_i,getOrElseW:_i,getReaderTaskValidation:function(e){var t=_B(Sc,e),n=_P(e);return{URI:_K,_E:void 0,map:_b,of:I1,chain:_w,bimap:__,mapLeft:_T,ap:t.ap,alt:n.alt,fromIO:I7,fromTask:I2,throwError:I0}},getSemigroup:Tk,left:I0,leftIO:I8,leftReader:I3,leftReaderTask:I4,leftTask:I6,local:Ab,map:_O,mapLeft:_k,match:_n,matchE:_r,matchEW:_r,matchW:_n,of:I1,orElse:_l,orElseFirst:_c,orElseFirstW:_c,orElseW:_l,orLeft:_d,readerTaskEither:{URI:_K,map:_b,of:I1,ap:_C,chain:_w,alt:_I,bimap:__,mapLeft:_T,fromIO:I7,fromTask:I2,throwError:I0},readerTaskEitherSeq:{URI:_K,map:_b,of:I1,ap:_S,chain:_w,alt:_I,bimap:__,mapLeft:_T,fromIO:I7,fromTask:I2,throwError:I0},right:I1,rightIO:I7,rightReader:I5,rightReaderTask:I9,rightTask:I2,run:TE,sequenceArray:TI,sequenceSeqArray:TT,swap:_f,throwError:I0,toUnion:_o,traverseArray:Tw,traverseArrayWithIndex:Tb,traverseReadonlyArrayWithIndex:Tb,traverseReadonlyArrayWithIndexSeq:TS,traverseReadonlyNonEmptyArrayWithIndex:Tx,traverseReadonlyNonEmptyArrayWithIndexSeq:TC,traverseSeqArray:T_,traverseSeqArrayWithIndex:TS},Symbol.toStringTag,{value:"Module"}));var TF={equals:function(e,t){return e===t}},Tj={concat:function(e,t){return e+t}},TU={concat:Tj.concat,empty:""},TK={equals:TF.equals,compare:function(e,t){return e<t?-1:e>t?1:0}},TL=function(e){return"string"==typeof e},TB=function(e){return e.toUpperCase()},TP=function(e){return e.toLowerCase()},TW=function(e,t){return function(n){return n.replace(e,t)}},TD=function(e){return e.trim()},TN=function(e){return e.trimLeft()},Tq=function(e){return e.trimRight()},TQ=function(e,t){return function(n){return n.slice(e,t)}},TV=function(e){return 0===e.length},Tz=function(e){return e.length},TY=function(e){return function(t){var n=t.split(e);return eb(n)?n:[t]}},TH=function(e,t){return function(n){return n.includes(e,t)}},TZ=function(e,t){return function(n){return n.startsWith(e,t)}},TJ=function(e,t){return function(n){return n.endsWith(e,t)}};let TG=Object.freeze(Object.defineProperty({__proto__:null,Eq:TF,Monoid:TU,Ord:TK,Semigroup:Tj,Show:{show:function(e){return JSON.stringify(e)}},empty:"",endsWith:TJ,includes:TH,isEmpty:TV,isString:TL,replace:TW,size:Tz,slice:TQ,split:TY,startsWith:TZ,toLowerCase:TP,toUpperCase:TB,trim:TD,trimLeft:TN,trimRight:Tq},Symbol.toStringTag,{value:"Module"}));var T$=function(e){return Object.assign({},e)},TX=function(e){return Object.assign({},e)},T0=function(e){return Object.keys(e).length},T1=function(e){for(var t in e)if(e_.call(e,t))return!1;return!0},T2=function(e){return function(t){return Object.keys(t).sort(e.compare)}},T6=T2(TK);function T5(e){if("function"==typeof e)return T5(TK)(e);var t=T2(e);return function(e){return function(n){for(var r=[],i=0,o=t(n);i<o.length;i++){var a=o[i];r.push(e(a,n[a]))}return r}}}var T3=T5(TK)(function(e,t){return[e,t]}),T9=function(e,t){return function(n){if(e_.call(n,e)&&n[e]===t)return n;var r=Object.assign({},n);return r[e]=t,r}},T4=function(e,t){return e_.call(t,e)};function T7(e){return function(t){if(!e_.call(t,e))return t;var n=Object.assign({},t);return delete n[e],n}}var T8=function(e,t){return function(n){if(!T4(e,n))return eA;if(n[e]===t)return eh(n);var r=Object.assign({},n);return r[e]=t,eh(r)}},Oe=function(e,t){return function(n){if(!T4(e,n))return eA;var r=t(n[e]);if(r===n[e])return eh(n);var i=Object.assign({},n);return i[e]=r,eh(i)}};function Ot(e){return function(t,n){if(void 0===n){var r=Ot(e);return function(e){return r(e,t)}}for(var i in t)if(!e_.call(n,i)||!e.equals(t[i],n[i]))return!1;return!0}}function On(e,t){return void 0===t?function(t){return On(e,t)}:e_.call(t,e)?eh(t[e]):eA}var Or={};function Oi(e){return function(t){var n={};for(var r in t)e_.call(t,r)&&(n[r]=e(r,t[r]));return n}}function Oo(e){return Oi(function(t,n){return e(n)})}function Oa(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(2===e.length)return Oa(TK).apply(void 0,e);var n=T2(e[0]);return function(e,t){return function(r){for(var i=e,o=n(r),a=o.length,u=0;u<a;u++){var s=o[u];i=t(s,i,r[s])}return i}}}function Ou(e){if("compare"in e){var t=T2(e);return function(e){return function(n){return function(r){for(var i=e.empty,o=t(r),a=o.length,u=0;u<a;u++){var s=o[u];i=e.concat(i,n(s,r[s]))}return i}}}}return Ou(TK)(e)}function Os(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(2===e.length)return Os(TK).apply(void 0,e);var n=T2(e[0]);return function(e,t){return function(r){for(var i=e,o=n(r),a=o.length,u=a-1;u>=0;u--){var s=o[u];i=t(s,r[s],i)}return i}}}var Ol=function(e,t){var n;return(n={})[e]=t,n};function Oc(e){var t=Oz(TK)(e);return function(e){return function(n){return t(n,e)}}}function Od(e){var t=OQ(TK)(e);return function(e){return function(n){return t(n,e)}}}function Of(e){return OV(TK)(e)}var Op=function(e){var t=Od(e);return function(n){return function(r){return e.map(eu(r,t(n)),O0)}}},OA=function(e){var t=Od(e);return function(n){return function(r){return e.map(eu(r,t(n)),O1)}}};function Oh(e){return function(t){var n={},r={};for(var i in t)if(e_.call(t,i)){var o=e(i,t[i]);switch(o._tag){case"Left":n[i]=o.left;break;case"Right":r[i]=o.right}}return ot(n,r)}}function Om(e){return function(t){var n={},r={};for(var i in t)if(e_.call(t,i)){var o=t[i];e(i,o)?r[i]=o:n[i]=o}return ot(n,r)}}function Og(e){return function(t){var n={};for(var r in t)if(e_.call(t,r)){var i=e(r,t[r]);ep(i)&&(n[r]=i.value)}return n}}function Oy(e){return function(t){var n={},r=!1;for(var i in t)if(e_.call(t,i)){var o=t[i];e(i,o)?n[i]=o:r=!0}return r?n:t}}function Ov(e,t){var n=Ox(e,t);return function(e){return n(e,J)}}function Ox(e,t){return function(n,r){return t.reduce(n,{},function(t,n){var i=r(n),o=i[0],a=i[1];return t[o]=e_.call(t,o)?e.concat(t[o],a):a,t})}}var Ob=function(e){for(var t={},n=0;n<e.length;n++){var r=e[n];t[r[0]]=r[1]}return t};function OC(e){return function(t){for(var n in t)if(!e(t[n]))return!1;return!0}}function OS(e){return function(t){for(var n in t)if(e(t[n]))return!0;return!1}}function Ow(e){return function(t,n){if(void 0===n){var r=Ow(e);return function(e){return r(t,e)}}for(var i in n)if(e.equals(n[i],t))return!0;return!1}}var OI=function(e){return function(t){return function(n){if(T1(n))return t;if(T1(t))return n;var r={};for(var i in n)T4(i,t)?r[i]=e.concat(n[i],t[i]):r[i]=n[i];for(var i in t)T4(i,r)||(r[i]=t[i]);return r}}},O_=function(e){return function(t){return function(n){if(T1(n)||T1(t))return Or;var r={};for(var i in n)T4(i,t)&&(r[i]=e.concat(n[i],t[i]));return r}}},OT=function(e){return function(t){if(T1(t))return e;if(T1(e))return t;var n={};for(var r in t)T4(r,e)||(n[r]=t[r]);for(var r in e)T4(r,t)||(n[r]=e[r]);return n}},OO=function(e,t){return eu(e,Oo(t))},OR=function(e,t){return eu(e,Oi(t))},Ok=function(e){var t=OG(e);return function(e,n,r){return eu(e,t(n,r))}},OE=function(e){return function(t){var n=O$(e)(t);return function(e,t){return eu(e,n(t))}}},OM=function(e){var t=OX(e);return function(e,n,r){return eu(e,t(n,r))}},OF=function(e,t){return eu(e,OY(t))},Oj=function(e,t){return eu(e,OH(t))},OU=function(e,t){return eu(e,OZ(t))},OK=function(e,t){return eu(e,OJ(t))},OL=function(e){var t=Oa(e);return function(e,n,r){return eu(e,t(n,r))}},OB=function(e){var t=Ou(e);return function(e){var n=t(e);return function(e,t){return eu(e,n(t))}}},OP=function(e){var t=Os(e);return function(e,n,r){return eu(e,t(n,r))}},OW=function(e,t){return eu(e,Oh(t))},OD=function(e,t){return eu(e,Om(t))},ON=function(e,t){return eu(e,Og(t))},Oq=function(e,t){return eu(e,Oy(t))},OQ=function(e){var t=Oz(e);return function(e){var n=t(e);return function(e,t){return n(e,en(es,t))}}},OV=function(e){var t=OQ(e);return function(e){var n=t(e);return function(e){return n(e,J)}}},Oz=function(e){return function(t){var n=T2(e);return function(e,r){var i=n(e);if(0===i.length)return t.of(Or);for(var o=t.of({}),a=function(n){o=t.ap(t.map(o,function(e){return function(t){var r;return Object.assign({},e,((r={})[n]=t,r))}}),r(n,e[n]))},u=0;u<i.length;u++)a(i[u]);return o}}},OY=function(e){return Oy(function(t,n){return e(n)})},OH=function(e){return Og(function(t,n){return e(n)})},OZ=function(e){return Om(function(t,n){return e(n)})},OJ=function(e){return Oh(function(t,n){return e(n)})};function OG(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(1===e.length){var n=Oa(e[0]);return function(e,t){return n(e,function(e,n,r){return t(n,r)})}}return OG(TK).apply(void 0,e)}function O$(e){if("compare"in e){var t=Ou(e);return function(e){var n=t(e);return function(e){return n(function(t,n){return e(n)})}}}return O$(TK)(e)}function OX(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(1===e.length){var n=Os(e[0]);return function(e,t){return n(e,function(e,n,r){return t(n,r)})}}return OX(TK).apply(void 0,e)}var O0=function(e){var t={};for(var n in e)if(e_.call(e,n)){var r=e[n];ep(r)&&(t[n]=r.value)}return t},O1=function(e){var t={},n={};for(var r in e)if(e_.call(e,r)){var i=e[r];em(i)?t[r]=i.left:n[r]=i.right}return ot(t,n)},O2="ReadonlyRecord";function O6(e){return"compare"in e?function(t){return{show:function(n){var r=T5(e)(function(e,n){return"".concat(JSON.stringify(e),": ").concat(t.show(n))})(n).join(", ");return""===r?"{}":"{ ".concat(r," }")}}}:O6(TK)(e)}function O5(e){var t=Ot(e);return e5(function(e,n){return t(e)(n)&&t(n)(e)})}function O3(e){return{concat:function(t,n){if(T1(t))return n;if(T1(n))return t;var r=Object.assign({},t);for(var i in n)e_.call(n,i)&&(r[i]=e_.call(t,i)?e.concat(t[i],n[i]):n[i]);return r},empty:Or}}var O9={URI:O2,map:OO},O4=eP(O9),O7=function(e){return{URI:O2,reduce:Ok(e),foldMap:OE(e),reduceRight:OM(e)}},O8=function(e){return{URI:O2,reduce:Ok(e),foldMap:OE(e),reduceRight:OM(e),reduceWithIndex:OL(e),foldMapWithIndex:OB(e),reduceRightWithIndex:OP(e)}},Re={URI:O2,compact:O0,separate:O1},Rt=function(e){return{URI:O2,map:OO,reduce:Ok(e),foldMap:OE(e),reduceRight:OM(e),traverse:OQ(e),sequence:OV(e)}},Rn=function(e){return{URI:O2,map:OO,mapWithIndex:OR,reduce:Ok(e),foldMap:OE(e),reduceRight:OM(e),reduceWithIndex:OL(e),foldMapWithIndex:OB(e),reduceRightWithIndex:OP(e),traverse:OQ(e),sequence:OV(e),traverseWithIndex:Oz(e)}},Rr=function(e){var t=Rt(e);return{URI:O2,map:OO,reduce:Ok(e),foldMap:OE(e),reduceRight:OM(e),traverse:t.traverse,sequence:t.sequence,compact:O0,separate:O1,filter:OF,filterMap:Oj,partition:OU,partitionMap:OK,wither:oh(t,Re),wilt:oA(t,Re)}},Ri=function(e){var t=OI(e);return{concat:function(e,n){return t(n)(e)}}},Ro=function(e){return{concat:Ri(e).concat,empty:Or}},Ra=function(e){var t=O_(e);return{concat:function(e,n){return t(n)(e)}}},Ru=function(){return{concat:function(e,t){return OT(t)(e)}}},Rs={URI:O2,reduce:Ok(TK),foldMap:OE(TK),reduceRight:OM(TK)},Rl={URI:O2,reduce:Ok(TK),foldMap:OE(TK),reduceRight:OM(TK),reduceWithIndex:OL(TK),foldMapWithIndex:OB(TK),reduceRightWithIndex:OP(TK)},Rc={URI:O2,map:OO,reduce:Ok(TK),foldMap:OE(TK),reduceRight:OM(TK),traverse:OQ(TK),sequence:Of},Rd={URI:O2,map:OO,mapWithIndex:OR,reduce:Ok(TK),foldMap:OE(TK),reduceRight:OM(TK),reduceWithIndex:OL(TK),foldMapWithIndex:OB(TK),reduceRightWithIndex:OP(TK),traverse:OQ(TK),sequence:Of,traverseWithIndex:Oz(TK)},Rf=oh(Rc,Re),Rp=oA(Rc,Re),RA={URI:O2,map:OO,reduce:Ok(TK),foldMap:OE(TK),reduceRight:OM(TK),traverse:OQ(TK),sequence:Of,compact:O0,separate:O1,filter:OF,filterMap:Oj,partition:OU,partitionMap:OK,wither:Rf,wilt:Rp};function Rh(e,t){return e_.call(void 0===t?this:t,e)}var Rm={URI:O2,map:OO,reduce:Ok(TK),foldMap:OE(TK),reduceRight:OM(TK),traverse:OQ(TK),sequence:Of,compact:O0,separate:O1,filter:OF,filterMap:Oj,partition:OU,partitionMap:OK,mapWithIndex:OR,reduceWithIndex:OL(TK),foldMapWithIndex:OB(TK),reduceRightWithIndex:OP(TK),filterMapWithIndex:ON,filterWithIndex:Oq,partitionMapWithIndex:OW,partitionWithIndex:OD,traverseWithIndex:Oz(TK),wither:Rf,wilt:Rp};let Rg=Object.freeze(Object.defineProperty({__proto__:null,Compactable:Re,Filterable:{URI:O2,map:OO,compact:O0,separate:O1,filter:OF,filterMap:Oj,partition:OU,partitionMap:OK},FilterableWithIndex:{URI:O2,map:OO,mapWithIndex:OR,compact:O0,separate:O1,filter:OF,filterMap:Oj,partition:OU,partitionMap:OK,filterMapWithIndex:ON,filterWithIndex:Oq,partitionMapWithIndex:OW,partitionWithIndex:OD},Foldable:Rs,FoldableWithIndex:Rl,Functor:O9,FunctorWithIndex:{URI:O2,map:OO,mapWithIndex:OR},Traversable:Rc,TraversableWithIndex:Rd,URI:O2,Witherable:RA,_filter:OF,_filterMap:Oj,_filterMapWithIndex:ON,_filterWithIndex:Oq,_foldMap:OE,_foldMapWithIndex:OB,_map:OO,_mapWithIndex:OR,_partition:OU,_partitionMap:OK,_partitionMapWithIndex:OW,_partitionWithIndex:OD,_reduce:Ok,_reduceRight:OM,_reduceRightWithIndex:OP,_reduceWithIndex:OL,_sequence:OV,_traverse:OQ,collect:T5,compact:O0,deleteAt:T7,difference:OT,elem:Ow,empty:Or,every:OC,filter:OY,filterMap:OH,filterMapWithIndex:Og,filterWithIndex:Oy,flap:O4,foldMap:O$,foldMapWithIndex:Ou,fromEntries:Ob,fromFoldable:Ov,fromFoldableMap:Ox,fromRecord:T$,getDifferenceMagma:Ru,getEq:O5,getFoldable:O7,getFoldableWithIndex:O8,getIntersectionSemigroup:Ra,getMonoid:O3,getShow:O6,getTraversable:Rt,getTraversableWithIndex:Rn,getUnionMonoid:Ro,getUnionSemigroup:Ri,getWitherable:Rr,has:T4,hasOwnProperty:Rh,insertAt:T9,intersection:O_,isEmpty:T1,isSubrecord:Ot,keys:T6,lookup:On,map:Oo,mapWithIndex:Oi,modifyAt:Oe,partition:OZ,partitionMap:OJ,partitionMapWithIndex:Oh,partitionWithIndex:Om,pop:function(e){var t=T7(e);return function(n){var r=On(e,n);return ef(r)?eA:eh([r.value,t(n)])}},readonlyRecord:Rm,reduce:OG,reduceRight:OX,reduceRightWithIndex:Os,reduceWithIndex:Oa,separate:O1,sequence:Of,singleton:Ol,size:T0,some:OS,toEntries:T3,toReadonlyArray:T3,toRecord:TX,toUnfoldable:function(e){return function(t){var n=T3(t),r=n.length;return e.unfold(0,function(e){return e<r?eh([n[e],e+1]):eA})}},traverse:Od,traverseWithIndex:Oc,union:OI,updateAt:T8,upsertAt:T9,wilt:OA,wither:Op},Symbol.toStringTag,{value:"Module"}));var Ry=function(e){return new Set(e)},Rv=function(e){return new Set([e])},Rx=function(e){return function(t){for(var n=t.length,r=new Set,i=RP(e),o=0;o<n;o++){var a=t[o];i(a,r)||r.add(a)}return r}};function Rb(e){return function(t){for(var n,r=t.values(),i=new Set;!(n=r.next()).done;){var o=n.value;e(o)&&i.add(o)}return i}}function RC(e){var t=RP(e);return function(n,r){if(void 0===r){var i=RC(e);return function(e){return i(n,e)}}if(Rj(n))return r;if(Rj(r))return n;var o=new Set(n);return r.forEach(function(e){t(e,o)||o.add(e)}),o}}function RS(e){var t=RP(e);return function(n,r){if(void 0===r){var i=RS(e);return function(e){return i(e,n)}}if(Rj(n)||Rj(r))return RF;var o=new Set;return n.forEach(function(e){t(e,r)&&o.add(e)}),o}}function Rw(e){var t=RP(e);return function(n,r){if(void 0===r){var i=Rw(e);return function(e){return i(e,n)}}return Rb(function(e){return!t(e,r)})(n)}}function RI(e){var t=RW(e);return function(e,n){return function(r){return t(r).reduce(n,e)}}}function R_(e,t){var n=RW(e);return function(e){return function(r){return n(r).reduce(function(n,r){return t.concat(n,e(r))},t.empty)}}}var RT=function(e){var t=RW(e);return function(e,n){return function(r){return t(r).reduceRight(function(e,t){return n(t,e)},e)}}};function RO(e){var t=RP(e);return function(e){return function(n){if(t(e)(n))return n;var r=new Set(n);return r.add(e),r}}}var RR=function(e){return function(t){return function(n){return Rb(function(n){return!e.equals(t,n)})(n)}}},Rk=function(e){var t=RP(e),n=RR(e),r=RO(e);return function(e){return function(i){return(t(e,i)?n:r)(e)(i)}}},RE=function(e){return RM(e)(J)};function RM(e){var t=RP(e);return function(e){return function(n){var r=new Set;return n.forEach(function(n){var i=e(n);"Some"!==i._tag||t(i.value,r)||r.add(i.value)}),r}}}var RF=new Set,Rj=function(e){return 0===e.size},RU=function(e){return e.size},RK=function(e){return function(t){for(var n,r=t.values(),i=!1;!i&&!(n=r.next()).done;)i=e(n.value);return i}};function RL(e){return cC(RK(cC(e)))}function RB(e){var t=RP(e);return function(n,r){if(void 0===r){var i=RB(e);return function(e){return i(e,n)}}return RL(function(e){return t(e,r)})(n)}}function RP(e){return function(t,n){if(void 0===n){var r=RP(e);return function(e){return r(t,e)}}for(var i,o=n.values(),a=!1;!a&&!(i=o.next()).done;)a=e.equals(t,i.value);return a}}var RW=function(e){return function(t){var n=[];return t.forEach(function(e){return n.push(e)}),n.sort(e.compare)}};function RD(e){return{show:function(t){var n=[];return t.forEach(function(t){n.push(e.show(t))}),"new Set([".concat(n.sort().join(", "),"])")}}}function RN(e){var t=RB(e);return e5(function(e,n){return t(e,n)&&t(n,e)})}var Rq=function(e){return{concat:RC(e)}},RQ=function(e){return{concat:Rq(e).concat,empty:RF}},RV=function(e){return{concat:RS(e)}},Rz=function(e){return{concat:Rw(e)}};let RY=Object.freeze(Object.defineProperty({__proto__:null,URI:"ReadonlySet",chain:function(e){var t=RP(e);return function(e){return function(n){var r=new Set;return n.forEach(function(n){e(n).forEach(function(e){t(e,r)||r.add(e)})}),r}}},compact:RE,difference:Rw,elem:RP,empty:RF,every:RL,filter:Rb,filterMap:RM,foldMap:R_,fromArray:Rx,fromReadonlyArray:Rx,fromSet:Ry,getDifferenceMagma:Rz,getEq:RN,getIntersectionSemigroup:RV,getShow:RD,getUnionMonoid:RQ,getUnionSemigroup:Rq,insert:RO,intersection:RS,isEmpty:Rj,isSubset:RB,map:function(e){var t=RP(e);return function(e){return function(n){var r=new Set;return n.forEach(function(n){var i=e(n);t(i,r)||r.add(i)}),r}}},partition:function(e){return function(t){for(var n,r=t.values(),i=new Set,o=new Set;!(n=r.next()).done;){var a=n.value;e(a)?i.add(a):o.add(a)}return ot(o,i)}},partitionMap:function(e,t){return function(n){return function(r){for(var i,o=r.values(),a=new Set,u=new Set,s=RP(e),l=RP(t);!(i=o.next()).done;){var c=n(i.value);switch(c._tag){case"Left":s(c.left,a)||a.add(c.left);break;case"Right":l(c.right,u)||u.add(c.right)}}return ot(a,u)}}},reduce:RI,reduceRight:RT,remove:RR,separate:function(e,t){return function(n){var r=RP(e),i=RP(t),o=new Set,a=new Set;return n.forEach(function(e){switch(e._tag){case"Left":r(e.left,o)||o.add(e.left);break;case"Right":i(e.right,a)||a.add(e.right)}}),ot(o,a)}},singleton:Rv,size:RU,some:RK,toReadonlyArray:RW,toSet:function(e){return new Set(e)},toggle:Rk,union:RC},Symbol.toStringTag,{value:"Module"}));function RH(e){return e[0]}function RZ(e){return e[1]}var RJ=function(e){var t;return[RZ(e),e[0]]};function RG(e){return{URI:kc,_E:void 0,map:R1,ap:function(t,n){var r,i;return[(0,t[0])(n[0]),e.concat(RZ(t),RZ(n))]}}}var R$=function(e){return function(t){return[t,e.empty]}};function RX(e){var t=RG(e);return{URI:kc,_E:void 0,map:t.map,ap:t.ap,chain:function(t,n){var r,i=n(t[0]),o=i[0],a=i[1];return[o,e.concat(RZ(t),a)]}}}var R0=function(e,t){return eu(e,kn(t))},R1=function(e,t){return eu(e,ke(t))},R2=function(e,t,n){return eu(e,R8(t,n))},R6=function(e,t){return eu(e,kt(t))},R5=function(e,t){return eu(e,kr(t))},R3=function(e,t,n){return eu(e,ko(t,n))},R9=function(e){var t=ka();return function(e,n){return eu(e,t(n))}},R4=function(e,t,n){return eu(e,ku(t,n))},R7=function(e){var t=ks(e);return function(e,n){return eu(e,t(n))}},R8=function(e,t){return function(n){var r;return[t(n[0]),e(RZ(n))]}},ke=function(e){return function(t){var n;return[e(t[0]),RZ(t)]}},kt=function(e){return function(t){var n;return[t[0],e(RZ(t))]}},kn=function(e){return function(t){var n;return[t[0],RZ(e)]}},kr=function(e){return function(t){return[e(t),RZ(t)]}},ki=kr(J),ko=function(e,t){return function(n){var r;return t(e,n[0])}},ka=function(){return function(e){return function(t){var n;return e(t[0])}}},ku=function(e,t){return function(n){var r;return t(n[0],e)}},ks=function(e){return function(t){return function(n){var r;return e.map(t(n[0]),function(e){return[e,RZ(n)]})}}},kl=function(e){return function(t){var n;return e.map(t[0],function(e){return[e,RZ(t)]})}},kc="ReadonlyTuple",kd={URI:kc,map:R1},kf=eP(kd);let kp=Object.freeze(Object.defineProperty({__proto__:null,Bifunctor:{URI:kc,bimap:R2,mapLeft:R6},Comonad:{URI:kc,map:R1,extend:R5,extract:RH},Foldable:{URI:kc,reduce:R3,foldMap:R9,reduceRight:R4},Functor:kd,Semigroupoid:{URI:kc,compose:R0},Traversable:{URI:kc,map:R1,reduce:R3,foldMap:R9,reduceRight:R4,traverse:R7,sequence:kl},URI:kc,bimap:R8,compose:kn,duplicate:ki,extend:kr,extract:RH,flap:kf,foldMap:ka,fst:RH,getApplicative:function(e){var t=RG(e);return{URI:kc,_E:void 0,map:t.map,ap:t.ap,of:R$(e)}},getApply:RG,getChain:RX,getChainRec:function(e){var t=function(t,n){for(var r,i,o=n(t),a=e.empty,u=(r=o)[0];"Left"===u._tag;)a=e.concat(a,RZ(o)),u=(o=n(u.left))[0];return[u.right,e.concat(a,RZ(o))]},n=RX(e);return{URI:kc,_E:void 0,map:n.map,ap:n.ap,chain:n.chain,chainRec:t}},getMonad:function(e){var t=RX(e);return{URI:kc,_E:void 0,map:t.map,ap:t.ap,chain:t.chain,of:R$(e)}},map:ke,mapFst:ke,mapLeft:kt,mapSnd:kt,readonlyTuple:{URI:kc,compose:R0,map:R1,bimap:R2,mapLeft:R6,extract:RH,extend:R5,reduce:R3,foldMap:R9,reduceRight:R4,traverse:R7,sequence:kl},reduce:ko,reduceRight:ku,sequence:kl,snd:RZ,swap:RJ,traverse:ks},Symbol.toStringTag,{value:"Module"}));var kA=function(){return(kA=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},kh=function(e){return function(t){return Object.keys(t).sort(e.compare)}},km=kh(TK);function kg(e){if("function"==typeof e)return kg(TK)(e);var t=kh(e);return function(e){return function(n){for(var r=[],i=0,o=t(n);i<o.length;i++){var a=o[i];r.push(e(a,n[a]))}return r}}}var ky=kg(TK)(function(e,t){return[e,t]});function kv(e){return function(t){if(!e_.call(t,e))return t;var n=Object.assign({},t);return delete n[e],n}}var kx=function(e,t){return kb(e,function(){return t})},kb=function(e,t){return function(n){if(!T4(e,n))return eA;var r=Object.assign({},n);return r[e]=t(n[e]),eh(r)}};function kC(e){return Oc(e)}function kS(e){return Od(e)}function kw(e){return Of(e)}var kI=function(e){var t,n=Od(e);return function(t){return function(r){return e.map(eu(r,n(t)),kK)}}},k_=function(e){var t,n=Od(e);return function(t){return function(r){return e.map(eu(r,n(t)),kL)}}};function kT(e){return Om(e)}function kO(e){return Oy(e)}function kR(e,t){return Ov(e,t)}var kk=function(e){var t,n;return(t=tP(),Ov(t,lF))(e)};function kE(e,t){return Ox(e,t)}var kM=function(e){var t=OI(e);return function(e){return function(n){return T1(n)?kA({},e):T1(e)?kA({},n):t(e)(n)}}},kF=function(e){return function(t){return function(n){return T1(n)||T1(t)?{}:O_(e)(t)(n)}}},kj=function(e){return function(t){return T1(t)?kA({},e):T1(e)?kA({},t):OT(e)(t)}},kU=function(e){return function(t){var n=kh(e);return function(e,r){var i=n(e);if(0===i.length)return t.of({});for(var o=t.of({}),a=function(n){o=t.ap(t.map(o,function(e){return function(t){return e[n]=t,e}}),r(n,e[n]))},u=0;u<i.length;u++)a(i[u]);return o}}},kK=O0,kL=O1,kB="Record",kP={URI:kB,map:OO},kW=eP(kP),kD=function(e){return{URI:kB,reduce:Ok(e),foldMap:OE(e),reduceRight:OM(e)}},kN=function(e){return{URI:kB,reduce:Ok(e),foldMap:OE(e),reduceRight:OM(e),reduceWithIndex:OL(e),foldMapWithIndex:OB(e),reduceRightWithIndex:OP(e)}},kq={URI:kB,compact:kK,separate:kL},kQ=function(e){return{URI:kB,map:OO,reduce:Ok(e),foldMap:OE(e),reduceRight:OM(e),traverse:OQ(e),sequence:OV(e)}},kV=function(e){return{URI:kB,map:OO,mapWithIndex:OR,reduce:Ok(e),foldMap:OE(e),reduceRight:OM(e),reduceWithIndex:OL(e),foldMapWithIndex:OB(e),reduceRightWithIndex:OP(e),traverse:OQ(e),sequence:OV(e),traverseWithIndex:kU(e)}},kz=function(e){var t=kQ(e);return{URI:kB,map:OO,reduce:Ok(e),foldMap:OE(e),reduceRight:OM(e),traverse:t.traverse,sequence:t.sequence,compact:kK,separate:kL,filter:OF,filterMap:Oj,partition:OU,partitionMap:OK,wither:oh(t,kq),wilt:oA(t,kq)}},kY=function(e){var t=kM(e);return{concat:function(e,n){return t(n)(e)}}},kH=function(e){return{concat:kY(e).concat,empty:{}}},kZ=function(e){var t=kF(e);return{concat:function(e,n){return t(n)(e)}}},kJ=function(){return{concat:function(e,t){return kj(t)(e)}}},kG={URI:kB,reduce:Ok(TK),foldMap:OE(TK),reduceRight:OM(TK)},k$={URI:kB,reduce:Ok(TK),foldMap:OE(TK),reduceRight:OM(TK),reduceWithIndex:OL(TK),foldMapWithIndex:OB(TK),reduceRightWithIndex:OP(TK)},kX={URI:kB,map:OO,reduce:Ok(TK),foldMap:OE(TK),reduceRight:OM(TK),traverse:OQ(TK),sequence:kw},k0={URI:kB,map:OO,mapWithIndex:OR,reduce:Ok(TK),foldMap:OE(TK),reduceRight:OM(TK),reduceWithIndex:OL(TK),foldMapWithIndex:OB(TK),reduceRightWithIndex:OP(TK),traverse:OQ(TK),sequence:kw,traverseWithIndex:kU(TK)},k1=oh(kX,kq),k2=oA(kX,kq),k6={URI:kB,map:OO,reduce:Ok(TK),foldMap:OE(TK),reduceRight:OM(TK),traverse:OQ(TK),sequence:kw,compact:kK,separate:kL,filter:OF,filterMap:Oj,partition:OU,partitionMap:OK,wither:k1,wilt:k2},k5={URI:kB,map:OO,reduce:Ok(TK),foldMap:OE(TK),reduceRight:OM(TK),traverse:OQ(TK),sequence:kw,compact:kK,separate:kL,filter:OF,filterMap:Oj,partition:OU,partitionMap:OK,mapWithIndex:OR,reduceWithIndex:OL(TK),foldMapWithIndex:OB(TK),reduceRightWithIndex:OP(TK),filterMapWithIndex:ON,filterWithIndex:Oq,partitionMapWithIndex:OW,partitionWithIndex:OD,traverseWithIndex:kU(TK),wither:k1,wilt:k2};let k3=Object.freeze(Object.defineProperty({__proto__:null,Compactable:kq,Filterable:{URI:kB,map:OO,compact:kK,separate:kL,filter:OF,filterMap:Oj,partition:OU,partitionMap:OK},FilterableWithIndex:{URI:kB,map:OO,mapWithIndex:OR,compact:kK,separate:kL,filter:OF,filterMap:Oj,partition:OU,partitionMap:OK,filterMapWithIndex:ON,filterWithIndex:Oq,partitionMapWithIndex:OW,partitionWithIndex:OD},Foldable:kG,FoldableWithIndex:k$,Functor:kP,FunctorWithIndex:{URI:kB,map:OO,mapWithIndex:OR},Traversable:kX,TraversableWithIndex:k0,URI:kB,Witherable:k6,collect:kg,compact:kK,deleteAt:kv,difference:kj,elem:Ow,empty:{},every:OC,filter:OY,filterMap:OH,filterMapWithIndex:Og,filterWithIndex:kO,flap:kW,foldMap:function(e){return"compare"in e?O$(e):O$(TK)(e)},foldMapWithIndex:function(e){return"compare"in e?Ou(e):Ou(TK)(e)},fromEntries:kk,fromFoldable:kR,fromFoldableMap:kE,getDifferenceMagma:kJ,getEq:O5,getFoldable:kD,getFoldableWithIndex:kN,getIntersectionSemigroup:kZ,getMonoid:O3,getShow:function(e){return"compare"in e?O6(e):O6(TK)(e)},getTraversable:kQ,getTraversableWithIndex:kV,getUnionMonoid:kH,getUnionSemigroup:kY,getWitherable:kz,has:T4,hasOwnProperty:Rh,insertAt:T9,intersection:kF,isEmpty:T1,isSubrecord:Ot,keys:km,lookup:On,map:Oo,mapWithIndex:Oi,modifyAt:kb,partition:OZ,partitionMap:OJ,partitionMapWithIndex:Oh,partitionWithIndex:kT,pop:function(e){var t=kv(e);return function(n){var r=On(e,n);return ef(r)?eA:eh([r.value,t(n)])}},record:k5,reduce:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return 1===e.length?OG(e[0]):OG(TK).apply(void 0,e)},reduceRight:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return 1===e.length?OX(e[0]):OX(TK).apply(void 0,e)},reduceRightWithIndex:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return 1===e.length?Os(e[0]):Os(TK).apply(void 0,e)},reduceWithIndex:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return 1===e.length?Oa(e[0]):Oa(TK).apply(void 0,e)},separate:kL,sequence:kw,singleton:Ol,size:T0,some:OS,toArray:ky,toEntries:ky,toUnfoldable:function(e){return function(t){var n=ky(t),r=n.length;return e.unfold(0,function(e){return e<r?eh([n[e],e+1]):eA})}},traverse:kS,traverseWithIndex:kC,union:kM,updateAt:kx,upsertAt:T9,wilt:k_,wither:kI},Symbol.toStringTag,{value:"Module"}));var k9=function(e){return function(t){return ep(e(t))}},k4=function(e){return function(t){return eg(e(t))}},k7=function(){return function(e){return!0}},k8=function(e){return function(t){return!e(t)}},Ee=function(e){return function(t){return function(n){return t(n)||e(n)}}},Et=function(e){return function(t){return function(n){return t(n)&&e(n)}}},En=function(){return function(e){return!1}},Er=function(e){return function(t){return function(n){return t(n)&&e(n)}}};let Ei=Object.freeze(Object.defineProperty({__proto__:null,and:Et,compose:Er,fromEitherK:k4,fromOptionK:k9,id:k7,not:k8,or:Ee,zero:En},Symbol.toStringTag,{value:"Module"}));var Eo=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return{add:function(t,n){return e.map(function(e,r){return e.add(t[r],n[r])})},zero:e.map(function(e){return e.zero}),mul:function(t,n){return e.map(function(e,r){return e.mul(t[r],n[r])})},one:e.map(function(e){return e.one}),sub:function(t,n){return e.map(function(e,r){return e.sub(t[r],n[r])})}}},Ea=function(e){return function(t){return e.sub(e.zero,t)}};let Eu=Object.freeze(Object.defineProperty({__proto__:null,getFunctionRing:H,getTupleRing:Eo,negate:Ea,tuple:Eo},Symbol.toStringTag,{value:"Module"})),Es=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),El=Object.freeze(Object.defineProperty({__proto__:null,getFunctionSemiring:Y},Symbol.toStringTag,{value:"Module"}));function Ec(e){return function(t){for(var n,r=t.values(),i=new Set;!(n=r.next()).done;){var o=n.value;e(o)&&i.add(o)}return i}}function Ed(e){var t=EO(e);return function(n,r){if(void 0===r){var i=Ed(e);return function(e){return i(n,e)}}if(E_(n))return r;if(E_(r))return n;var o=new Set(n);return r.forEach(function(e){t(e,o)||o.add(e)}),o}}function Ef(e){var t=EO(e);return function(n,r){if(void 0===r){var i=Ef(e);return function(e){return i(e,n)}}if(E_(n)||E_(r))return new Set;var o=new Set;return n.forEach(function(e){t(e,r)&&o.add(e)}),o}}function Ep(e){var t=EO(e);return function(n,r){if(void 0===r){var i=Ep(e);return function(e){return i(e,n)}}return Ec(function(e){return!t(e,r)})(n)}}var EA=function(e){return{concat:Ed(e)}},Eh=function(e){return{concat:EA(e).concat,empty:new Set}},Em=function(e){return{concat:Ef(e)}},Eg=function(e){return{concat:Ep(e)}},Ey=function(e){return new Set([e])};function Ev(e){var t=EO(e);return function(e){return function(n){if(t(e)(n))return n;var r=new Set(n);return r.add(e),r}}}var Ex=function(e){return function(t){return function(n){return Ec(function(n){return!e.equals(t,n)})(n)}}},Eb=function(e){var t=EO(e),n=Ex(e),r=Ev(e);return function(e){return function(i){return(t(e,i)?n:r)(e)(i)}}},EC=function(e){return function(t){for(var n=t.length,r=new Set,i=EO(e),o=0;o<n;o++){var a=t[o];i(a,r)||r.add(a)}return r}},ES=function(e){return Ew(e)(J)};function Ew(e){var t=EO(e);return function(e){return function(n){var r=new Set;return n.forEach(function(n){var i=e(n);"Some"!==i._tag||t(i.value,r)||r.add(i.value)}),r}}}var EI=new Set,E_=function(e){return 0===e.size},ET=function(e){return e.size},EO=RP,ER=function(e){return function(t){var n=[];return t.forEach(function(e){return n.push(e)}),n.sort(e.compare)}};let Ek=Object.freeze(Object.defineProperty({__proto__:null,chain:function(e){var t=EO(e);return function(e){return function(n){var r=new Set;return n.forEach(function(n){e(n).forEach(function(e){t(e,r)||r.add(e)})}),r}}},compact:ES,difference:Ep,elem:EO,empty:EI,every:RL,filter:Ec,filterMap:Ew,foldMap:R_,fromArray:EC,getDifferenceMagma:Eg,getEq:RN,getIntersectionSemigroup:Em,getShow:RD,getUnionMonoid:Eh,getUnionSemigroup:EA,insert:Ev,intersection:Ef,isEmpty:E_,isSubset:RB,map:function(e){var t=EO(e);return function(e){return function(n){var r=new Set;return n.forEach(function(n){var i=e(n);t(i,r)||r.add(i)}),r}}},partition:function(e){return function(t){for(var n,r=t.values(),i=new Set,o=new Set;!(n=r.next()).done;){var a=n.value;e(a)?i.add(a):o.add(a)}return ot(o,i)}},partitionMap:function(e,t){return function(n){return function(r){for(var i,o=r.values(),a=new Set,u=new Set,s=EO(e),l=EO(t);!(i=o.next()).done;){var c=n(i.value);switch(c._tag){case"Left":s(c.left,a)||a.add(c.left);break;case"Right":l(c.right,u)||u.add(c.right)}}return ot(a,u)}}},reduce:RI,reduceRight:RT,remove:Ex,separate:function(e,t){return function(n){var r=EO(e),i=EO(t),o=new Set,a=new Set;return n.forEach(function(e){switch(e._tag){case"Left":r(e.left,o)||o.add(e.left);break;case"Right":i(e.right,a)||a.add(e.right)}}),ot(o,a)}},singleton:Ey,size:ET,some:RK,subset:RB,toArray:ER,toggle:Eb,union:Ed},Symbol.toStringTag,{value:"Module"}));var EE=function(e){return{show:function(t){var n="{";for(var r in e)e_.call(e,r)&&(n+=" ".concat(r,": ").concat(e[r].show(t[r]),","));return n.length>1&&(n=n.slice(0,-1)+" "),n+="}"}}},EM=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return{show:function(t){return"[".concat(t.map(function(t,n){return e[n].show(t)}).join(", "),"]")}}};let EF=Object.freeze(Object.defineProperty({__proto__:null,getStructShow:EE,getTupleShow:EM,showBoolean:{show:function(e){return JSON.stringify(e)}},showNumber:{show:function(e){return JSON.stringify(e)}},showString:{show:function(e){return JSON.stringify(e)}},struct:EE,tuple:EM},Symbol.toStringTag,{value:"Module"}));function Ej(e){return function(t){return function(n){return e.of([t,n])}}}function EU(e){return function(t){return function(n){return function(r){return e.map(n(r),function(e){var n=e[0],r=e[1];return[t(n),r]})}}}}function EK(e){return function(t){return function(n){return function(r){return e.chain(n(r),function(n){var r=n[0],i=n[1];return e.map(t(i),function(e){var t=e[0],n=e[1];return[r(t),n]})})}}}}function EL(e){return function(t){return function(n){return function(r){return e.chain(n(r),function(e){var n=e[0],r=e[1];return t(n)(r)})}}}}function EB(e){return function(t){return function(n){return e.of(t(n))}}}function EP(e){return function(t){return function(n){return e.map(t,function(e){return[e,n]})}}}function EW(e){return function(t){return function(n){return e.map(n(t),function(e){return e[0]})}}}function ED(e){return function(t){return function(n){return e.map(n(t),RZ)}}}let EN=Object.freeze(Object.defineProperty({__proto__:null,ap:EK,chain:EL,evaluate:EW,execute:ED,fromF:EP,fromState:EB,getStateM:function(e){var t=EK(e),n=EU(e),r=EL(e),i=EW(e),o=ED(e);return{map:function(e,t){return eu(e,n(t))},ap:function(e,n){return eu(e,t(n))},of:Ej(e),chain:function(e,t){return eu(e,r(t))},get:function(){return function(t){return e.of([t,t])}},put:function(t){return function(){return e.of([void 0,t])}},modify:function(t){return function(n){return e.of([void 0,t(n)])}},gets:function(t){return function(n){return e.of([t(n),n])}},fromState:EB(e),fromM:EP(e),evalState:function(e,t){return eu(e,i(t))},execState:function(e,t){return eu(e,o(t))}}},map:EU,of:Ej},Symbol.toStringTag,{value:"Module"}));var Eq=function(e){return function(){return I0(e)}},EQ=Ej(_N);function EV(e){return E1(I2(e))}function Ez(e){return E1(I5(e))}function EY(e){return E1(I7(e))}var EH=function(e){return en(e,I1)},EZ=function(e){return function(t){return I0(e(t)[0])}},EJ=pe(function(e){return Eq(e)},EQ),EG=EB(_N),E$=function(e){return E1(G(e))},EX=function(e){return E1(_e(e))},E0=function(e){return E1(_t(e))},E1=EP(_W),E2=function(e){return function(t){return en(t,Ab(e))}},E6=function(e){return function(t){return function(n){return e(n)(t)(n)}}},E5=function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return EX(e.apply(void 0,t))}},E3=function(e){return function(t){return eu(t,Md(E5(e)))}},E9=function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return E$(e.apply(void 0,t))}},E4=function(e){return function(t){return eu(t,Md(E9(e)))}},E7=function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return E1(e.apply(void 0,t))}},E8=function(e){return function(t){return eu(t,Md(E7(e)))}},Me=function(e,t){return eu(e,Ma(t))},Mt=function(e,t){return eu(e,Ml(t))},Mn=function(e,t){return eu(e,Mc(t))},Mr=function(e,t){return function(n){return eu(e(n),_U(function(){return t()(n)}))}},Mi=function(e,t,n){return function(r){return eu(e(r),_R(t,function(e){var t=e[0],r=e[1];return[n(t),r]}))}},Mo=function(e,t){return function(n){return eu(e(n),_k(t))}},Ma=EU(_W),Mu=function(e,t){return function(n){return Mi(n,e,t)}},Ms=function(e){return function(t){return Mo(t,e)}},Ml=EK(_H),Mc=EL(_H),Md=Mc,Mf=Md(J),Mp=function(e){return function(t){return function(n){return eu(t(n),_U(function(){return e()(n)}))}}},MA="StateReaderTaskEither",Mh={URI:MA,map:Me},Mm=eP(Mh),Mg={URI:MA,map:Me,ap:Mt},My=eR(Mg),Mv=ek(Mg),Mx={URI:MA,map:Me,ap:Mt,chain:Mn},Mb={URI:MA,fromState:EG},MC=hP(Mb),MS=hW(Mb),Mw=hD(Mb),MI=hN(Mb),M_=hq(Mb),MT=hQ(Mb,Mx),MO=ez(Mx),MR={URI:MA,fromReader:Ez},Mk=he(MR),ME=ht(MR),MM=hn(MR),MF=hr(MR,Mx),Mj=hi(MR,Mx),MU={URI:MA,fromEither:EJ},MK=eZ(MU),ML=eG(MU),MB=e$(MU,Mx),MP=e0(MU,Mx),MW=e1(MU,Mx),MD=eJ(MU),MN=e2(MU,Mx),Mq=eX(MU),MQ={URI:MA,fromIO:EY},MV=Am(MQ),Mz=Ag(MQ,Mx),MY=Ay(MQ,Mx),MH={URI:MA,fromIO:EY,fromTask:EV},MZ=hz(MH),MJ=hY(MH,Mx),MG=hH(MH,Mx),M$=EW(_W),MX=ED(_W),M0=eW(Mh),M1=eY(Mx),M2=eE(Mg),M6=function(e){return function(t){return function(n){return function(r){return function(){return eS(t).reduce(function(t,n,i){return t.then(function(o){return em(o)?t:e(i+1,n)(o.right[1])(r)().then(function(e){if(em(e))return e;var t=e.right,n=t[0],r=t[1];return o.right[0].push(n),o.right[1]=r,o})})},e(0,eC(t))(n)(r)().then(fB(function(e){var t;return[[e[0]],e[1]]})))}}}}},M5=function(e){var t=M6(e);return function(e){return eb(e)?t(e):EQ(ew)}},M3=function(e){return M5(function(t,n){return e(n)})},M9=M3(J),M4=function(e,t){return eu(e(t),_O(function(e){return e[0]}))},M7=function(e,t){return eu(e(t),_O(function(e){return e[0],e[1]}))};let M8=Object.freeze(Object.defineProperty({__proto__:null,Alt:{URI:MA,map:Me,alt:Mr},Applicative:{URI:MA,map:Me,ap:Mt,of:EQ},Apply:Mg,Bifunctor:{URI:MA,bimap:Mi,mapLeft:Mo},Chain:Mx,FromEither:MU,FromIO:MQ,FromReader:MR,FromState:Mb,FromTask:MH,Functor:Mh,Monad:{URI:MA,map:Me,ap:Mt,of:EQ,chain:Mn},MonadIO:{URI:MA,map:Me,ap:Mt,of:EQ,chain:Mn,fromIO:EY},MonadTask:{URI:MA,map:Me,ap:Mt,of:EQ,chain:Mn,fromIO:EY,fromTask:EV},MonadThrow:{URI:MA,map:Me,ap:Mt,of:EQ,chain:Mn,throwError:Eq},Pointed:{URI:MA,of:EQ},URI:MA,alt:Mp,altW:Mp,ap:Ml,apFirst:My,apFirstW:My,apS:M2,apSW:M2,apSecond:Mv,apSecondW:Mv,apW:Ml,ask:Mk,asks:ME,asksStateReaderTaskEither:E6,asksStateReaderTaskEitherW:E6,bimap:Mu,bind:M1,bindTo:M0,bindW:M1,chain:Mc,chainEitherK:MP,chainEitherKW:MP,chainFirst:MO,chainFirstEitherK:MW,chainFirstEitherKW:MW,chainFirstIOK:MY,chainFirstReaderK:Mj,chainFirstReaderKW:Mj,chainFirstTaskK:MG,chainFirstW:MO,chainIOEitherK:E3,chainIOEitherKW:E3,chainIOK:Mz,chainOptionK:MB,chainReaderK:MF,chainReaderKW:MF,chainReaderTaskEitherK:E8,chainReaderTaskEitherKW:E8,chainStateK:MT,chainTaskEitherK:E4,chainTaskEitherKW:E4,chainTaskK:MJ,chainW:Md,evalState:M4,evaluate:M$,execState:M7,execute:MX,filterOrElse:MN,filterOrElseW:MN,flap:Mm,flatten:Mf,flattenW:Mf,fromEither:EJ,fromEitherK:Mq,fromIO:EY,fromIOEither:EX,fromIOEitherK:E5,fromIOK:MV,fromOption:MK,fromOptionK:ML,fromPredicate:MD,fromReader:Ez,fromReaderEither:E0,fromReaderK:MM,fromReaderTaskEither:E1,fromReaderTaskEitherK:E7,fromState:EG,fromStateK:M_,fromTask:EV,fromTaskEither:E$,fromTaskEitherK:E9,fromTaskK:MZ,get:MC,gets:MI,left:Eq,leftIO:function(e){return E1(I8(e))},leftReader:function(e){return E1(I3(e))},leftState:EZ,leftTask:function(e){return E1(I6(e))},local:E2,map:Ma,mapLeft:Ms,modify:Mw,of:EQ,put:MS,right:EQ,rightIO:EY,rightReader:Ez,rightState:EH,rightTask:EV,run:function(e,t,n){return e(t)(n)()},sequenceArray:M9,stateReaderTaskEither:{URI:MA,map:Me,of:EQ,ap:Mt,chain:Mn,bimap:Mi,mapLeft:Mo,alt:Mr,fromIO:EY,fromTask:EV,throwError:Eq},stateReaderTaskEitherSeq:{URI:MA,map:Me,of:EQ,ap:Mt,chain:Mn,bimap:Mi,mapLeft:Mo,alt:Mr,fromIO:EY,fromTask:EV,throwError:Eq},throwError:Eq,traverseArray:M3,traverseArrayWithIndex:M5,traverseReadonlyArrayWithIndex:M5,traverseReadonlyNonEmptyArrayWithIndex:M6},Symbol.toStringTag,{value:"Module"}));var Fe=function(e,t){return eu(e,Fo(t))},Ft=function(e,t){return eu(e,Fn(t))},Fn=function(e){return function(t){return{peek:function(n){return e({peek:t.peek,pos:n})},pos:t.pos}}},Fr=function(e){return e.peek(e.pos)},Fi=Fn(J),Fo=function(e){return function(t){return{peek:function(n){return e(t.peek(n))},pos:t.pos}}},Fa="Store",Fu={URI:Fa,map:Fe},Fs=eP(Fu),Fl={URI:Fa,map:Fe,extend:Ft,extract:Fr};let Fc=Object.freeze(Object.defineProperty({__proto__:null,Comonad:Fl,Functor:Fu,URI:Fa,duplicate:Fi,experiment:function(e){return function(t){return function(n){return e.map(t(n.pos),function(e){return n.peek(e)})}}},extend:Fn,extract:Fr,flap:Fs,map:Fo,peeks:function(e){return function(t){return t.peek(e(t.pos))}},seek:function(e){return function(t){return{peek:t.peek,pos:e}}},seeks:function(e){return function(t){return{peek:t.peek,pos:e(t.pos)}}},store:Fl},Symbol.toStringTag,{value:"Module"}));function Fd(e,t){return function(n,r){return t.compose(e.second(r),e.first(n))}}function Ff(e,t){var n=Fd(e,t);return function(r,i){return t.compose(n(r,i),e.promap(t.id(),J,function(e){return[e,e]}))}}let Fp=Object.freeze(Object.defineProperty({__proto__:null,fanOut:Ff,fanout:function(e){return Ff(e,e)},split:Fd,splitStrong:function(e){return Fd(e,e)}},Symbol.toStringTag,{value:"Module"}));var FA=function(){return{concat:function(e,t){return Object.assign({},e,t)}}},Fh=function(e){return function(t){var n={};for(var r in t)e_.call(t,r)&&(n[r]=e[r](t[r]));return n}};let Fm=Object.freeze(Object.defineProperty({__proto__:null,evolve:Fh,getAssignSemigroup:FA},Symbol.toStringTag,{value:"Module"}));var Fg=function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function u(o){return function(u){return function(o){if(n)throw TypeError("Generator is already executing.");for(;a;)try{if(n=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 a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=(i=a.trys).length>0&&i[i.length-1])&&(6===o[0]||2===o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(u){o=[6,u],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}},Fy=yi(Sa),Fv=yf(Sa),Fx=yp(Sa),Fb=function(e){return FC(C6(e))},FC=ya(Si),FS=C7(cO),Fw=yA(Si),FI=yh(Sp),F_=ym(SA),FT=yu(Sa),FO=function(e){return function(){var t,n,r,i;return t=void 0,n=void 0,r=void 0,i=function(){return Fg(this,function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),[4,e().then(eh)];case 1:return[2,t.sent()];case 2:return t.sent(),[2,eA];case 3:return[2]}})},new(r||(r=Promise))(function(e,o){function a(e){try{s(i.next(e))}catch(t){o(t)}}function u(e){try{s(i.throw(e))}catch(t){o(t)}}function s(t){var n;t.done?e(t.value):((n=t.value)instanceof r?n:new r(function(e){e(n)})).then(a,u)}s((i=i.apply(t,n||[])).next())})}},FR=function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return FO(function(){return e.apply(void 0,t)})}},Fk=ys(Sa),FE=yl(SA),FM=yc(Sa),FF=yd(SA),Fj=yg(Si),FU=yy(Su),FK=yv(SA),FL=FK(J),FB=yx(SA),FP=yo(Sa),FW=FP(),FD=d0(Si,dr),FN=d1(Si,dr,cH),Fq=Ae(Si,dl),FQ=At(Si,dl),FV=An(Si,dl),Fz=Ar(Si,dl),FY=function(e,t){return eu(e,Fj(t))},FH=function(e,t){return eu(e,FU(t))},FZ=function(e,t){return eu(e,FK(t))},FJ=function(e,t){return eu(e,FB(t))},FG=function(e,t){return eu(e,Fq(t))},F$=function(e,t){return eu(e,FQ(t))},FX=function(e,t){return eu(e,FV(t))},F0=function(e,t){return eu(e,Fz(t))},F1="TaskOption",F2={URI:F1,map:FY},F6=eP(F2),F5={URI:F1,of:Fy},F3={URI:F1,map:FY,ap:FH},F9=eR(F3),F4=ek(F3),F7=function(e,t){return eu(e,FK(function(e){return eu(t,Fj(e))}))},F8={URI:F1,map:FY,ap:FH,chain:FZ},je=ez(F8),jt={URI:F1,zero:FP},jn=oy(jt,F5),jr={URI:F1,fromIO:Fb},ji=Am(jr),jo=Ag(jr,F8),ja=Ay(jr,F8),ju={URI:F1,fromEither:Fx},js=eX(ju),jl=e0(ju,F8),jc=e1(ju,F8),jd={URI:F1,fromIO:Fb,fromTask:FC},jf=hz(jd),jp=hY(jd,F8),jA=hH(jd,F8),jh=Fy(eI),jm=eW(F2),jg=eY(F8),jy=eE(F3),jv=Fy(ew),jx=function(e){return en(S_(e),C7(dQ(es)))},jb=function(e){var t=jx(e);return function(e){return eb(e)?t(e):jv}},jC=function(e){return function(t){return function(){return eS(t).reduce(function(t,n,r){return t.then(function(i){return ef(i)?t:e(r+1,n)().then(function(e){return ef(e)?e:(i.value.push(e.value),i)})})},e(0,eC(t))().then(cY(ex)))}}},jS=function(e){var t=jC(e);return function(e){return eb(e)?t(e):jv}},jw=function(e){return jb(function(t,n){return e(n)})},jI=jw(J),j_=function(e){return jS(function(t,n){return e(n)})},jT=j_(J);let jO=Object.freeze(Object.defineProperty({__proto__:null,Alt:{URI:F1,map:FY,alt:FJ},Alternative:{URI:F1,map:FY,ap:FH,of:Fy,alt:FJ,zero:FP},ApT:jv,ApplicativePar:{URI:F1,map:FY,ap:FH,of:Fy},ApplicativeSeq:{URI:F1,map:FY,ap:F7,of:Fy},ApplyPar:F3,ApplySeq:{URI:F1,map:FY,ap:F7},Chain:F8,Compactable:{URI:F1,compact:FD,separate:FN},Do:jh,Filterable:{URI:F1,map:FY,compact:FD,separate:FN,filter:FG,filterMap:F$,partition:FX,partitionMap:F0},FromEither:ju,FromIO:jr,FromTask:jd,Functor:F2,Monad:{URI:F1,map:FY,ap:FH,of:Fy,chain:FZ},MonadIO:{URI:F1,map:FY,ap:FH,of:Fy,chain:FZ,fromIO:Fb},MonadTask:{URI:F1,map:FY,ap:FH,of:Fy,chain:FZ,fromIO:Fb,fromTask:FC},Pointed:F5,Zero:jt,alt:FB,altW:FB,ap:FU,apFirst:F9,apS:jy,apSecond:F4,bind:jg,bindTo:jm,chain:FK,chainEitherK:jl,chainFirst:je,chainFirstEitherK:jc,chainFirstIOK:ja,chainFirstTaskK:jA,chainIOK:jo,chainNullableK:FE,chainOptionK:FF,chainTaskK:jp,compact:FD,filter:Fq,filterMap:FQ,flap:F6,flatten:FL,fold:FI,foldW:FI,fromEither:Fx,fromEitherK:js,fromIO:Fb,fromIOK:ji,fromNullable:FT,fromNullableK:Fk,fromOption:Se,fromOptionK:FM,fromPredicate:Fv,fromTask:FC,fromTaskEither:FS,fromTaskK:jf,getOrElse:F_,getOrElseW:F_,guard:jn,map:Fj,match:Fw,matchE:FI,matchEW:FI,matchW:Fw,none:FW,of:Fy,partition:FV,partitionMap:Fz,separate:FN,sequenceArray:jI,sequenceSeqArray:jT,some:Fy,traverseArray:jw,traverseArrayWithIndex:jb,traverseReadonlyArrayWithIndex:jb,traverseReadonlyArrayWithIndexSeq:jS,traverseReadonlyNonEmptyArrayWithIndex:jx,traverseReadonlyNonEmptyArrayWithIndexSeq:jC,traverseSeqArray:j_,traverseSeqArrayWithIndex:jS,tryCatch:FO,tryCatchK:FR,zero:FP},Symbol.toStringTag,{value:"Module"}));var jR=function(e){return"Left"===e._tag},jk=function(e){return"Right"===e._tag};function jE(e){return"Both"===e._tag}function jM(e){return{_tag:"Left",left:e}}function jF(e){return{_tag:"Right",right:e}}function jj(e,t){return{_tag:"Both",left:e,right:t}}var jU=function(e,t,n){return function(r){switch(r._tag){case"Left":return e(r.left);case"Right":return t(r.right);case"Both":return n(r.left,r.right)}}},jK=jU(jF,jM,function(e,t){return jj(t,e)});function jL(e,t){return{concat:function(n,r){return jR(n)?jR(r)?jM(e.concat(n.left,r.left)):jk(r)?jj(n.left,r.right):jj(e.concat(n.left,r.left),r.right):jk(n)?jR(r)?jj(r.left,n.right):jk(r)?jF(t.concat(n.right,r.right)):jj(r.left,t.concat(n.right,r.right)):jR(r)?jj(e.concat(n.left,r.left),n.right):jk(r)?jj(n.left,t.concat(n.right,r.right)):jj(e.concat(n.left,r.left),t.concat(n.right,r.right))}}}var jB=function(e){return{URI:j2,_E:void 0,map:jD,ap:function(t,n){return jR(t)?jR(n)?jM(e.concat(t.left,n.left)):jk(n)?jM(t.left):jM(e.concat(t.left,n.left)):jk(t)?jR(n)?jM(n.left):jk(n)?jF(t.right(n.right)):jj(n.left,t.right(n.right)):jR(n)?jM(e.concat(t.left,n.left)):jk(n)?jj(t.left,t.right(n.right)):jj(e.concat(t.left,n.left),t.right(n.right))}}};function jP(e){var t=jB(e),n=function(t,n){if(jR(t))return t;if(jk(t))return n(t.right);var r=n(t.right);return jR(r)?jM(e.concat(t.left,r.left)):jk(r)?jj(t.left,r.right):jj(e.concat(t.left,r.left),r.right)};return{URI:j2,_E:void 0,map:jD,ap:t.ap,chain:n}}var jW=function(e,t){return ef(e)?ef(t)?eA:eh(jF(t.value)):ef(t)?eh(jM(e.value)):eh(jj(e.value,t.value))},jD=function(e,t){return eu(e,jJ(t))},jN=function(e,t,n){return eu(e,jH(t,n))},jq=function(e,t){return eu(e,jZ(t))},jQ=function(e,t,n){return eu(e,jG(t,n))},jV=function(e){var t=j$(e);return function(e,n){return eu(e,t(n))}},jz=function(e,t,n){return eu(e,jX(t,n))},jY=function(e){var t=j0(e);return function(e,n){return eu(e,t(n))}},jH=function(e,t){return function(n){return jR(n)?jM(e(n.left)):jk(n)?jF(t(n.right)):jj(e(n.left),t(n.right))}},jZ=function(e){return function(t){return jR(t)?jM(e(t.left)):jE(t)?jj(e(t.left),t.right):t}},jJ=function(e){return function(t){return jR(t)?t:jk(t)?jF(e(t.right)):jj(t.left,e(t.right))}},jG=function(e,t){return function(n){return jR(n)?e:t(e,n.right)}},j$=function(e){return function(t){return function(n){return jR(n)?e.empty:t(n.right)}}},jX=function(e,t){return function(n){return jR(n)?e:t(n.right,e)}},j0=function(e){return function(t){return function(n){return jR(n)?e.of(n):jk(n)?e.map(t(n.right),jF):e.map(t(n.right),function(e){return jj(n.left,e)})}}},j1=function(e){return function(t){return jR(t)?e.of(t):jk(t)?e.map(t.right,jF):e.map(t.right,function(e){return jj(t.left,e)})}},j2="These",j6={URI:j2,map:jD},j5=eP(j6),j3={URI:j2,fromEither:J},j9=eZ(j3),j4=eG(j3),j7=function(e){return function(t){return function(n){return!jR(n)&&e.equals(t,n.right)}}},j8=function(e){return function(t){return!jR(t)&&e(t.right)}},Ue=function(e,t){return function(n){return jR(n)?[n.left,t()]:jk(n)?[e(),n.right]:[n.left,n.right]}},Ut=function(e,t){return Ue(function(){return e},function(){return t})},Un=jF(ew),Ur=function(e){return function(t){return function(n){var r=eA,i=t(0,eC(n));if(jR(i))return i;jE(i)&&(r=eh(i.left));for(var o=[i.right],a=1;a<n.length;a++){var u=t(a,n[a]);if(jR(u))return u;jE(u)&&(r=ef(r)?eh(u.left):eh(e.concat(r.value,u.left))),o.push(u.right)}return ef(r)?jF(o):jj(r.value,o)}}},Ui=function(e){return function(t){var n=Ur(e)(t);return function(e){return eb(e)?n(e):Un}}};let Uo=Object.freeze(Object.defineProperty({__proto__:null,ApT:Un,Bifunctor:{URI:j2,bimap:jN,mapLeft:jq},Foldable:{URI:j2,reduce:jQ,foldMap:jV,reduceRight:jz},FromEither:j3,FromThese:{URI:j2,fromThese:J},Functor:j6,Pointed:{URI:j2,of:jF},Traversable:{URI:j2,map:jD,reduce:jQ,foldMap:jV,reduceRight:jz,traverse:jY,sequence:j1},URI:j2,bimap:jH,both:jj,elem:j7,exists:j8,flap:j5,fold:jU,foldMap:j$,foldW:jU,fromOption:j9,fromOptionK:j4,fromOptions:jW,getApplicative:function(e){var t=jB(e);return{URI:j2,_E:void 0,map:jD,ap:t.ap,of:jF}},getApply:jB,getChain:jP,getEq:function(e,t){return e5(function(n,r){return jR(n)?jR(r)&&e.equals(n.left,r.left):jk(n)?jk(r)&&t.equals(n.right,r.right):jE(r)&&e.equals(n.left,r.left)&&t.equals(n.right,r.right)})},getLeft:function(e){return jR(e)?eh(e.left):jk(e)?eA:eh(e.left)},getLeftOnly:function(e){return jR(e)?eh(e.left):eA},getMonad:function(e){var t=jP(e);return{URI:j2,_E:void 0,map:jD,of:jF,ap:t.ap,chain:t.chain,throwError:jM}},getRight:function(e){return jR(e)?eA:(jk(e),eh(e.right))},getRightOnly:function(e){return jk(e)?eh(e.right):eA},getSemigroup:jL,getShow:function(e,t){return{show:jU(function(t){return"left(".concat(e.show(t),")")},function(e){return"right(".concat(t.show(e),")")},function(n,r){return"both(".concat(e.show(n),", ").concat(t.show(r),")")})}},isBoth:jE,isLeft:jR,isRight:jk,left:jM,leftOrBoth:function(e){return function(t){return ef(t)?jM(e):jj(e,t.value)}},map:jJ,mapLeft:jZ,match:jU,matchW:jU,of:jF,reduce:jG,reduceRight:jX,right:jF,rightOrBoth:function(e){return function(t){return ef(t)?jF(e):jj(t.value,e)}},sequence:j1,swap:jK,these:{URI:j2,map:jD,bimap:jN,mapLeft:jq,reduce:jQ,foldMap:jV,reduceRight:jz,traverse:jY,sequence:j1},toTuple:Ut,toTuple2:Ue,traverse:j0,traverseReadonlyArrayWithIndex:Ui,traverseReadonlyNonEmptyArrayWithIndex:Ur},Symbol.toStringTag,{value:"Module"}));function Ua(e){return en(jF,e.of)}function Uu(e){return en(jM,e.of)}function Us(e){return en(jj,e.of)}function Ul(e){return function(t){return e.map(t,jF)}}function Uc(e){return function(t){return e.map(t,jM)}}function Ud(e){return eB(e,j6)}function Uf(e,t){return eO(e,jB(t))}function Up(e,t){var n=Uu(e);return function(r){return function(i){return e.chain(i,jU(n,r,function(n,i){return e.map(r(i),jU(function(e){return jM(t.concat(n,e))},function(e){return jj(n,e)},function(e,r){return jj(t.concat(n,e),r)}))}))}}}function UA(e){return function(t,n){return function(r){return e.map(r,jH(t,n))}}}function Uh(e){return function(t){return function(n){return e.map(n,jZ(t))}}}function Um(e){return function(t,n,r){return function(i){return e.map(i,jU(t,n,r))}}}function Ug(e){return function(t,n,r){return function(i){return e.chain(i,jU(t,n,r))}}}function Uy(e){return function(t){return e.map(t,jK)}}function Uv(e){return function(t,n){return function(r){return e.map(r,Ue(t,n))}}}let Ux=Object.freeze(Object.defineProperty({__proto__:null,ap:Uf,bimap:UA,both:Us,chain:Up,getTheseM:function(e){var t=Ud(e),n=UA(e),r=Uh(e),i=Ug(e),o=Uv(e),a=Ua(e),u=function(e,n){return eu(e,t(n))};return{map:u,bimap:function(e,t,r){return eu(e,n(t,r))},mapLeft:function(e,t){return eu(e,r(t))},fold:function(e,t,n,r){return eu(e,i(t,n,r))},swap:Uy(e),rightM:Ul(e),leftM:Uc(e),left:Uu(e),right:Ua(e),both:Us(e),toTuple:function(e,t,n){return eu(e,o(function(){return t},function(){return n}))},getMonad:function(t){var n=Uf(e,t),r=Up(e,t);return{_E:void 0,map:u,of:a,ap:function(e,t){return eu(e,n(t))},chain:function(e,t){return eu(e,r(t))}}}}},left:Uu,leftF:Uc,map:Ud,mapLeft:Uh,match:Um,matchE:Ug,right:Ua,rightF:Ul,swap:Uy,toTuple2:Uv},Symbol.toStringTag,{value:"Module"}));var Ub=Uu(Sa),UC=Ua(Sa),US=Us(Sa),Uw=Ul(Si),UI=Uc(Si),U_=en(C6,Uw),UT=en(C6,UI),UO=Um(Si),UR=Ug(SA),Uk=Uy(Si),UE=function(e,t){return eu(e,Uj(t))},UM=function(e,t,n){return eu(e,UU(t,n))},UF=function(e,t){return eu(e,UK(t))},Uj=Ud(Si),UU=UA(Si),UK=Uh(Si),UL="TaskThese",UB=function(e,t){var n=Uf(e,t);return{URI:UL,_E:void 0,map:UE,ap:function(e,t){return eu(e,n(t))}}};function UP(e,t){var n=UB(e,t).ap;return{URI:UL,_E:void 0,map:UE,ap:n,of:UC}}function UW(e){var t=UB(Sc,e),n=Up(SA,e);return{URI:UL,_E:void 0,map:UE,ap:t.ap,chain:function(e,t){return eu(e,n(t))}}}var UD={URI:UL,map:UE},UN=eP(UD),Uq={URI:UL,fromEither:Se},UQ=eZ(Uq),UV=eG(Uq),Uz=eJ(Uq),UY={URI:UL,fromThese:Se},UH=hJ(UY),UZ={URI:UL,fromIO:U_},UJ=Am(UZ),UG={URI:UL,fromIO:U_,fromTask:Uw},U$=hz(UG),UX=Uv(Si),U0=UC(ew),U1=function(e){var t=Ur(e);return function(e){return en(S_(e),C7(t(es)))}},U2=function(e){return function(t){var n=U1(e)(t);return function(e){return eb(e)?n(e):U0}}},U6=function(e){return function(t){return function(n){return function(){return eS(n).reduce(function(n,r,i){return n.then(function(o){return jR(o)?n:t(i+1,r)().then(function(t){if(jR(t))return t;if(jE(t)){var n=o.right;return n.push(t.right),jE(o)?jj(e.concat(o.left,t.left),n):jj(t.left,n)}return o.right.push(t.right),o})})},t(0,eC(n))().then(jJ(ex)))}}}},U5=function(e){return function(t){var n=U6(e)(t);return function(e){return eb(e)?n(e):U0}}},U3=function(e,t){return UX(function(){return e},function(){return t})},U9=function(e,t){return eM(Sd)(jL(e,t))};let U4=Object.freeze(Object.defineProperty({__proto__:null,ApT:U0,Bifunctor:{URI:UL,bimap:UM,mapLeft:UF},FromEither:Uq,FromIO:UZ,FromTask:UG,FromThese:UY,Functor:UD,Pointed:{URI:UL,of:UC},URI:UL,bifunctorTaskThese:{URI:UL,bimap:UM,mapLeft:UF},bimap:UU,both:US,flap:UN,fold:UR,foldW:UR,fromEither:Se,fromIO:U_,fromIOEither:C6,fromIOK:UJ,fromOption:UQ,fromOptionK:UV,fromPredicate:Uz,fromTask:Uw,fromTaskK:U$,fromThese:Se,fromTheseK:UH,functorTaskThese:{URI:UL,map:UE},getApplicative:UP,getApply:UB,getChain:UW,getMonad:function(e){var t=UP(Sc,e),n=UW(e);return{URI:UL,_E:void 0,map:UE,ap:t.ap,of:UC,chain:n.chain,fromIO:U_,fromTask:Uw}},getSemigroup:U9,left:Ub,leftIO:UT,leftTask:UI,map:Uj,mapLeft:UK,match:UO,matchE:UR,matchEW:UR,matchW:UO,of:UC,right:UC,rightIO:U_,rightTask:Uw,swap:Uk,taskThese:{URI:UL,map:UE,bimap:UM,mapLeft:UF},toTuple:U3,toTuple2:UX,traverseReadonlyArrayWithIndex:U2,traverseReadonlyArrayWithIndexSeq:U5,traverseReadonlyNonEmptyArrayWithIndex:U1,traverseReadonlyNonEmptyArrayWithIndexSeq:U6},Symbol.toStringTag,{value:"Module"}));var U7=function(e,t){return eu(e,U8(t))},U8=function(e){return function(t){return function(n){return e(t(n))}}},Ke="Traced",Kt={URI:Ke,map:U7},Kn=eP(Kt);let Kr=Object.freeze(Object.defineProperty({__proto__:null,Functor:Kt,URI:Ke,censor:function(e){return function(t){return function(n){return t(e(n))}}},flap:Kn,getComonad:function(e){return{URI:Ke,_E:void 0,map:U7,extend:function(t,n){return function(r){return n(function(n){return t(e.concat(r,n))})}},extract:function(t){return t(e.empty)}}},listen:function(e){return function(t){return[e(t),t]}},listens:function(e){return function(t){return function(n){return[t(n),e(n)]}}},map:U8,traced:Kt,tracks:function(e,t){return function(n){return n(t(n(e.empty)))}}},Symbol.toStringTag,{value:"Module"}));function Ki(e,t){return function(n){var r=e.traverse(n),i=t.traverse(n);return function(e){return function(t){return r(t,function(t){return i(t,e)})}}}}function Ko(e,t){return function(n){var r=e.sequence(n),i=t.sequence(n);return function(t){return r(e.map(t,i))}}}let Ka=Object.freeze(Object.defineProperty({__proto__:null,getTraversableComposition:function(e,t){var n=eD(e,t).map,r=Ac(e,t),i=Ki(e,t),o=Ko(e,t);return{map:n,reduce:r.reduce,foldMap:r.foldMap,reduceRight:r.reduceRight,traverse:function(e){var t=i(e);return function(e,n){return eu(e,t(n))}},sequence:function(e){var t=o(e);return function(e){return eu(e,t)}}}},sequence:Ko,traverse:Ki},Symbol.toStringTag,{value:"Module"})),Ku=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));function Ks(e,t){return void 0===t&&(t=[]),{value:e,forest:t}}var Kl=function(e,t){for(var n,r="",i=t.length,o=0;o<i;o++){n=t[o];var a=o===i-1;r+=e+(a?"└":"├")+"─ "+n.value,r+=Kl(e+(i>1&&!a?"│ ":" "),n.forest)}return r};function Kc(e){return Kl(`
2
- `,e)}function Kd(e,t){var n,r=t(e);return{value:r[0],forest:Kf(r[1],t)}}function Kf(e,t){return e.map(function(e){return Kd(e,t)})}function Kp(e){var t=KA(e);return function(n,r){return e.chain(r(n),function(n){var i=n[0],o=n[1];return e.map(t(o,r),function(e){return{value:i,forest:e}})})}}function KA(e){var t=ll(e);return function(n,r){return eu(n,t(function(t){return Kp(e)(t,r)}))}}var Kh=function(e,t){return eu(e,KO(t))},Km=function(e,t){return eu(e,Kw(function(e){return eu(t,KO(e))}))},Kg=function(e,t){return eu(e,Kw(t))},Ky=function(e,t,n){return eu(e,KR(t,n))},Kv=function(e){var t=Kk(e);return function(e,n){return eu(e,t(n))}},Kx=function(e,t,n){return eu(e,KE(t,n))},Kb=function(e,t){return eu(e,KI(t))},KC=function(e){var t=KF(e);return function(e,n){return eu(e,t(n))}},KS=function(e){return function(t){return Km(t,e)}},Kw=function(e){return function(t){var n=e(t.value),r=n.value,i=n.forest,o=lg().concat;return{value:r,forest:o(i,t.forest.map(Kw(e)))}}},KI=function(e){return function(t){return{value:e(t),forest:t.forest.map(KI(e))}}},K_=KI(J),KT=Kw(J),KO=function(e){return function(t){return{value:e(t.value),forest:t.forest.map(KO(e))}}},KR=function(e,t){return function(n){for(var r=t(e,n.value),i=n.forest.length,o=0;o<i;o++)r=eu(n.forest[o],KR(r,t));return r}},Kk=function(e){return function(t){return KR(e.empty,function(n,r){return e.concat(n,t(r))})}},KE=function(e,t){return function(n){for(var r=e,i=n.forest.length,o=i-1;o>=0;o--)r=eu(n.forest[o],KE(r,t));return t(n.value,r)}},KM=function(e){return e.value},KF=function(e){var t=ll(e),n=function(r){return function(i){return e.ap(e.map(r(i.value),function(e){return function(t){return{value:e,forest:t}}}),eu(i.forest,t(n(r))))}};return n},Kj=function(e){return KF(e)(J)},KU=function(e){return Ks(e)},KK="Tree",KL={URI:KK,map:Kh},KB=eP(KL),KP={URI:KK,map:Kh,ap:Km},KW=eR(KP),KD=ek(KP),KN={URI:KK,map:Kh,ap:Km,chain:Kg},Kq=ez(KN),KQ=KU(eI),KV=eW(KL),Kz=eY(KN),KY=eE(KP),KH=function(e){return function(t){return e(t.value)||t.forest.some(KH(e))}};let KZ=Object.freeze(Object.defineProperty({__proto__:null,Applicative:{URI:KK,map:Kh,ap:Km,of:KU},Apply:KP,Chain:KN,Comonad:{URI:KK,map:Kh,extend:Kb,extract:KM},Do:KQ,Foldable:{URI:KK,reduce:Ky,foldMap:Kv,reduceRight:Kx},Functor:KL,Monad:{URI:KK,map:Kh,ap:Km,of:KU,chain:Kg},Pointed:{URI:KK,of:KU},Traversable:{URI:KK,map:Kh,reduce:Ky,foldMap:Kv,reduceRight:Kx,traverse:KC,sequence:Kj},URI:KK,ap:KS,apFirst:KW,apS:KY,apSecond:KD,bind:Kz,bindTo:KV,chain:Kw,chainFirst:Kq,drawForest:Kc,drawTree:function(e){return e.value+Kc(e.forest)},duplicate:K_,elem:function(e){var t=function(n,r){return e.equals(n,r.value)||r.forest.some(function(e){return t(n,e)})};return t},exists:KH,extend:KI,extract:KM,flap:KB,flatten:KT,fold:function(e){var t=function(n){return e(n.value,n.forest.map(t))};return t},foldMap:Kk,getEq:function(e){var t,n=e5(function(n,r){return e.equals(n.value,r.value)&&t.equals(n.forest,r.forest)});return t=uo(n),n},getShow:function(e){var t=function(n){return uQ(n.forest)?"make(".concat(e.show(n.value),")"):"make(".concat(e.show(n.value),", [").concat(n.forest.map(t).join(", "),"])")};return{show:t}},make:Ks,map:KO,of:KU,reduce:KR,reduceRight:KE,sequence:Kj,traverse:KF,tree:{URI:KK,map:Kh,of:KU,ap:Km,chain:Kg,reduce:Ky,foldMap:Kv,reduceRight:Kx,traverse:KC,sequence:Kj,extract:KM,extend:Kb},unfoldForest:Kf,unfoldForestM:KA,unfoldTree:Kd,unfoldTreeM:Kp},Symbol.toStringTag,{value:"Module"}));var KJ=function(e){var t;return[RZ(e),(t=e,t[0])]};function KG(e){return{URI:Lc,_E:void 0,map:K1,ap:function(t,n){var r,i;return[(r=t,r[0])((i=n,i[0])),e.concat(RZ(t),RZ(n))]}}}var K$=function(e){return function(t){return[t,e.empty]}};function KX(e){var t=KG(e);return{URI:Lc,_E:void 0,map:t.map,ap:t.ap,chain:function(t,n){var r,i=n((r=t,r[0])),o=i[0],a=i[1];return[o,e.concat(RZ(t),a)]}}}var K0=function(e,t){return eu(e,Ln(t))},K1=function(e,t){return eu(e,Le(t))},K2=function(e,t,n){return eu(e,K8(t,n))},K6=function(e,t){return eu(e,Lt(t))},K5=function(e,t){return eu(e,Lr(t))},K3=function(e,t,n){return eu(e,La(t,n))},K9=function(e){var t=Lo();return function(e,n){return eu(e,t(n))}},K4=function(e,t,n){return eu(e,Lu(t,n))};function K7(e){var t=Ls(e);return function(e,n){return eu(e,t(n))}}var K8=function(e,t){return function(n){var r;return[t((r=n,r[0])),e(RZ(n))]}},Le=function(e){return function(t){var n;return[e((n=t,n[0])),RZ(t)]}},Lt=function(e){return function(t){var n;return[(n=t,n[0]),e(RZ(t))]}},Ln=function(e){return function(t){var n;return[(n=t,n[0]),RZ(e)]}},Lr=function(e){return function(t){return[e(t),RZ(t)]}},Li=Lr(J),Lo=ka,La=ko,Lu=ku,Ls=function(e){return function(t){return function(n){var r;return e.map(t((r=n,r[0])),function(e){return[e,RZ(n)]})}}},Ll=function(e){return function(t){var n;return e.map((n=t,n[0]),function(e){return[e,RZ(t)]})}},Lc="Tuple",Ld={URI:Lc,map:K1},Lf=eP(Ld);let Lp=Object.freeze(Object.defineProperty({__proto__:null,Bifunctor:{URI:Lc,bimap:K2,mapLeft:K6},Comonad:{URI:Lc,map:K1,extend:K5,extract:RH},Foldable:{URI:Lc,reduce:K3,foldMap:K9,reduceRight:K4},Functor:Ld,Semigroupoid:{URI:Lc,compose:K0},Traversable:{URI:Lc,map:K1,reduce:K3,foldMap:K9,reduceRight:K4,traverse:K7,sequence:Ll},URI:Lc,bimap:K8,compose:Ln,duplicate:Li,extend:Lr,extract:RH,flap:Lf,foldMap:Lo,fst:RH,getApplicative:function(e){var t=KG(e);return{URI:Lc,_E:void 0,map:t.map,ap:t.ap,of:K$(e)}},getApply:KG,getChain:KX,getChainRec:function(e){var t=function(t,n){for(var r,i,o=n(t),a=e.empty,u=(r=o,r[0]);"Left"===u._tag;){a=e.concat(a,RZ(o)),u=(i=o=n(u.left))[0]}return[u.right,e.concat(a,RZ(o))]},n=KX(e);return{URI:Lc,_E:void 0,map:n.map,ap:n.ap,chain:n.chain,chainRec:t}},getMonad:function(e){var t=KX(e);return{URI:Lc,_E:void 0,map:t.map,ap:t.ap,chain:t.chain,of:K$(e)}},map:Le,mapFst:Le,mapLeft:Lt,mapSnd:Lt,reduce:La,reduceRight:Lu,sequence:Ll,snd:RZ,swap:KJ,traverse:Ls,tuple:{URI:Lc,compose:K0,map:K1,bimap:K2,mapLeft:K6,extract:RH,extend:K5,reduce:K3,foldMap:K9,reduceRight:K4,traverse:K7,sequence:Ll}},Symbol.toStringTag,{value:"Module"})),LA=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),Lh=Object.freeze(Object.defineProperty({__proto__:null,getValidationM:function(e,t){var n=eQ(t,fK(e));return{map:n.map,ap:n.ap,of:n.of,chain:function(e,n){return t.chain(e,function(e){return em(e)?t.of(ey(e.left)):n(e.right)})},alt:function(n,r){return t.chain(n,function(n){return eg(n)?t.of(n):t.map(r(),function(t){return em(t)?ey(e.concat(n.left,t.left)):t})})}}}},Symbol.toStringTag,{value:"Module"}));var Lm=tj(void 0),Lg={concat:Lm.concat,empty:void 0};let Ly=Object.freeze(Object.defineProperty({__proto__:null,Monoid:Lg,Semigroup:Lm},Symbol.toStringTag,{value:"Module"}));var Lv=function(e){return function(){return[void 0,e]}},Lx=function(e){return function(){var t=e(),n=t[0],r=t[1];return[[n,r],r]}},Lb=function(e){return function(){var t,n=e(),r=n[0],i=r[0];return[i,(0,r[1])(n[1])]}},LC=function(e){return function(t){return function(){var n=t(),r=n[0],i=n[1];return[[r,e(i)],i]}}},LS=function(e){return function(t){return function(){var n,r=t();return[r[0],e(r[1])]}}},Lw=function(e,t){return eu(e,LI(t))},LI=function(e){return function(t){return function(){var n=t(),r=n[0],i=n[1];return[e(r),i]}}},L_="Writer",LT=function(e){return{URI:L_,_E:void 0,of:function(t){return function(){return[t,e.empty]}}}},LO=function(e){return{URI:L_,_E:void 0,map:Lw,ap:function(t,n){return function(){var r=t(),i=r[0],o=r[1],a=n(),u=a[0],s=a[1];return[i(u),e.concat(o,s)]}}}},LR=function(e){var t=LO(e),n=LT(e);return{URI:L_,_E:void 0,map:Lw,ap:t.ap,of:n.of}};function Lk(e){var t=LO(e);return{URI:L_,_E:void 0,map:Lw,ap:t.ap,chain:function(t,n){return function(){var r=t(),i=r[0],o=r[1],a=n(i)(),u=a[0],s=a[1];return[u,e.concat(o,s)]}}}}var LE={URI:L_,map:Lw},LM=eP(LE),LF=function(e){return e()[0]},Lj=function(e){return e()[1]},LU=function(e){return e()[0]},LK=function(e){return e()[1]};let LL=Object.freeze(Object.defineProperty({__proto__:null,Functor:LE,URI:L_,censor:LS,evalWriter:LU,evaluate:LF,execWriter:LK,execute:Lj,flap:LM,getApplicative:LR,getApply:LO,getChain:Lk,getMonad:function(e){var t=LR(e),n=Lk(e);return{URI:L_,_E:void 0,map:Lw,ap:t.ap,of:t.of,chain:n.chain}},getPointed:LT,listen:Lx,listens:LC,map:LI,pass:Lb,tell:Lv,writer:LE},Symbol.toStringTag,{value:"Module"})),LB=Object.freeze(Object.defineProperty({__proto__:null,getWriterM:function(e){var t=function(t,n){return function(){return e.map(t(),function(e){var t=e[0],r=e[1];return[n(t),r]})}};return{map:t,evalWriter:function(t){return e.map(t(),function(e){return e[0]})},execWriter:function(t){return e.map(t(),function(e){return e[0],e[1]})},tell:function(t){return function(){return e.of([void 0,t])}},listen:function(t){return function(){return e.map(t(),function(e){var t=e[0],n=e[1];return[[t,n],n]})}},pass:function(t){return function(){return e.map(t(),function(e){var t,n=e[0],r=n[0];return[r,(0,n[1])(e[1])]})}},listens:function(t,n){return function(){return e.map(t(),function(e){var t=e[0],r=e[1];return[[t,n(r)],r]})}},censor:function(t,n){return function(){return e.map(t(),function(e){var t;return[e[0],n(e[1])]})}},getMonad:function(n){return{_E:void 0,map:t,of:function(t){return function(){return e.of([t,n.empty])}},ap:function(t,r){return function(){return e.chain(t(),function(t){var i=t[0],o=t[1];return e.map(r(),function(e){var t=e[0],r=e[1];return[i(t),n.concat(o,r)]})})}},chain:function(t,r){return function(){return e.chain(t(),function(t){var i=t[0],o=t[1];return e.map(r(i)(),function(e){var t=e[0],r=e[1];return[t,n.concat(o,r)]})})}}}}}}},Symbol.toStringTag,{value:"Module"})),LP=Object.freeze(Object.defineProperty({__proto__:null,alt:N,alternative:q,applicative:eV,apply:eL,array:lZ,bifunctor:lJ,boolean:l3,booleanAlgebra:l4,bounded:ct,boundedDistributiveLattice:ci,boundedJoinSemilattice:co,boundedLattice:ca,boundedMeetSemilattice:cu,category:cs,chain:eH,chainRec:cc,choice:cp,comonad:cA,compactable:d2,console:d4,const:fd,contravariant:ff,date:fm,distributiveLattice:cr,either:pj,eitherT:p6,endomorphism:p9,eq:ti,extend:p4,field:p8,filterable:Ai,filterableWithIndex:Ao,foldable:Ad,foldableWithIndex:Ah,fromEither:e6,fromIO:Av,fromReader:ho,fromState:hV,fromTask:hZ,fromThese:hG,function:ec,functor:eN,functorWithIndex:hX,group:h0,heytingAlgebra:h1,hkt:h2,identity:mT,invariant:mO,io:m5,ioEither:yr,ioOption:vx,ioRef:vC,joinSemilattice:vS,json:v_,lattice:vT,magma:tE,map:bA,meetSemilattice:bh,monad:bm,monadIO:bg,monadTask:by,monadThrow:bv,monoid:bF,naturalTransformation:bj,nonEmptyArray:iX,number:oe,option:dX,optionT:yb,ord:tI,ordering:bD,pipeable:bN,pointed:bq,predicate:cI,profunctor:bQ,random:bZ,reader:A8,readerEither:CJ,readerT:C2,readerTask:w_,readerTaskEither:TM,readonlyArray:uq,readonlyMap:xO,readonlyNonEmptyArray:rv,readonlyRecord:Rg,readonlySet:RY,readonlyTuple:kp,record:k3,refinement:Ei,ring:Eu,semigroup:tY,semigroupoid:Es,semiring:El,separated:op,set:Ek,show:EF,state:hB,stateReaderTaskEither:M8,stateT:EN,store:Fc,string:TG,strong:Fp,struct:Fm,task:SK,taskEither:IX,taskOption:jO,taskThese:U4,these:Uo,theseT:Ux,traced:Kr,traversable:Ka,traversableWithIndex:Ku,tree:KZ,tuple:Lp,unfoldable:LA,validationT:Lh,void:Ly,witherable:og,writer:LL,writerT:LB,zero:ov},Symbol.toStringTag,{value:"Module"})),LW=R(LP);var LD={},LN={},Lq={},LQ={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getEndomorphismMonoid=e.not=e.SK=e.hole=e.pipe=e.untupled=e.tupled=e.absurd=e.decrement=e.increment=e.tuple=e.flow=e.flip=e.constVoid=e.constUndefined=e.constNull=e.constFalse=e.constTrue=e.constant=e.unsafeCoerce=e.identity=e.apply=e.getRing=e.getSemiring=e.getMonoid=e.getSemigroup=e.getBooleanAlgebra=void 0;var t=function(e){return function(){return{meet:function(t,n){return function(r){return e.meet(t(r),n(r))}},join:function(t,n){return function(r){return e.join(t(r),n(r))}},zero:function(){return e.zero},one:function(){return e.one},implies:function(t,n){return function(r){return e.implies(t(r),n(r))}},not:function(t){return function(n){return e.not(t(n))}}}}};e.getBooleanAlgebra=t;var n=function(e){return function(){return{concat:function(t,n){return function(r){return e.concat(t(r),n(r))}}}}};e.getSemigroup=n;var r=function(t){var n=(0,e.getSemigroup)(t);return function(){return{concat:n().concat,empty:function(){return t.empty}}}};e.getMonoid=r;var i=function(e){return{add:function(t,n){return function(r){return e.add(t(r),n(r))}},zero:function(){return e.zero},mul:function(t,n){return function(r){return e.mul(t(r),n(r))}},one:function(){return e.one}}};e.getSemiring=i;var o=function(t){var n=(0,e.getSemiring)(t);return{add:n.add,mul:n.mul,one:n.one,zero:n.zero,sub:function(e,n){return function(r){return t.sub(e(r),n(r))}}}};e.getRing=o;var a=function(e){return function(t){return t(e)}};function u(e){return e}function s(e){return function(){return e}}function l(e,t,n,r,i,o,a,u,s){switch(arguments.length){case 1:return e;case 2:return function(){return t(e.apply(this,arguments))};case 3:return function(){return n(t(e.apply(this,arguments)))};case 4:return function(){return r(n(t(e.apply(this,arguments))))};case 5:return function(){return i(r(n(t(e.apply(this,arguments)))))};case 6:return function(){return o(i(r(n(t(e.apply(this,arguments))))))};case 7:return function(){return a(o(i(r(n(t(e.apply(this,arguments)))))))};case 8:return function(){return u(a(o(i(r(n(t(e.apply(this,arguments))))))))};case 9:return function(){return s(u(a(o(i(r(n(t(e.apply(this,arguments)))))))))}}}function c(e){return e+1}function d(e){return e-1}function f(e){throw Error("Called `absurd` function which should be uncallable")}e.apply=a,e.identity=u,e.unsafeCoerce=u,e.constant=s,e.constTrue=s(!0),e.constFalse=s(!1),e.constNull=s(null),e.constUndefined=s(void 0),e.constVoid=e.constUndefined,e.flip=function(e){return function(t,n){return e(n,t)}},e.flow=l,e.tuple=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e},e.increment=c,e.decrement=d,e.absurd=f,e.tupled=function(e){return function(t){return e.apply(void 0,t)}},e.untupled=function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return e(t)}},e.pipe=function(e,t,n,r,i,o,a,u,s){switch(arguments.length){case 1:return e;case 2:return t(e);case 3:return n(t(e));case 4:return r(n(t(e)));case 5:return i(r(n(t(e))));case 6:return o(i(r(n(t(e)))));case 7:return a(o(i(r(n(t(e))))));case 8:return u(a(o(i(r(n(t(e)))))));case 9:return s(u(a(o(i(r(n(t(e))))))));default:for(var l=arguments[0],c=1;c<arguments.length;c++)l=arguments[c](l);return l}},e.hole=f;var p=function(e,t){return t};e.SK=p,e.not=function(e){return function(t){return!e(t)}};var A=function(){return{concat:function(e,t){return l(e,t)},empty:u}};e.getEndomorphismMonoid=A}(LQ);var LV={},Lz=O&&O.__spreadArray||function(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))};Object.defineProperty(LV,"__esModule",{value:!0}),LV.fromReadonlyNonEmptyArray=LV.has=LV.emptyRecord=LV.emptyReadonlyArray=LV.tail=LV.head=LV.isNonEmpty=LV.singleton=LV.right=LV.left=LV.isRight=LV.isLeft=LV.some=LV.none=LV.isSome=LV.isNone=void 0;var LY=function(e){return"None"===e._tag};LV.isNone=LY;var LH=function(e){return"Some"===e._tag};LV.isSome=LH,LV.none={_tag:"None"};var LZ=function(e){return{_tag:"Some",value:e}};LV.some=LZ;var LJ=function(e){return"Left"===e._tag};LV.isLeft=LJ;var LG=function(e){return"Right"===e._tag};LV.isRight=LG;var L$=function(e){return{_tag:"Left",left:e}};LV.left=L$;var LX=function(e){return{_tag:"Right",right:e}};LV.right=LX;var L0=function(e){return[e]};LV.singleton=L0;var L1=function(e){return e.length>0};LV.isNonEmpty=L1;var L2=function(e){return e[0]};LV.head=L2;var L6=function(e){return e.slice(1)};LV.tail=L6,LV.emptyReadonlyArray=[],LV.emptyRecord={},LV.has=Object.prototype.hasOwnProperty;var L5=function(e){return Lz([e[0]],e.slice(1),!0)};LV.fromReadonlyNonEmptyArray=L5;var L3=O&&O.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),L9=O&&O.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),L4=O&&O.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&L3(t,e,n);return L9(t,e),t};Object.defineProperty(Lq,"__esModule",{value:!0}),Lq.sequenceS=Lq.sequenceT=Lq.getApplySemigroup=Lq.apS=Lq.apSecond=Lq.apFirst=Lq.ap=void 0;var L7=L4(LV);function L8(e,t,n){return function(r){for(var i=Array(n.length+1),o=0;o<n.length;o++)i[o]=n[o];return i[n.length]=r,0===t?e.apply(null,i):L8(e,t-1,i)}}Lq.ap=function(e,t){return function(n){return function(r){return e.ap(e.map(r,function(e){return function(n){return t.ap(e,n)}}),n)}}},Lq.apFirst=function(e){return function(t){return function(n){return e.ap(e.map(n,function(e){return function(){return e}}),t)}}},Lq.apSecond=function(e){return function(t){return function(n){return e.ap(e.map(n,function(){return function(e){return e}}),t)}}},Lq.apS=function(e){return function(t,n){return function(r){return e.ap(e.map(r,function(e){return function(n){var r;return Object.assign({},e,((r={})[t]=n,r))}}),n)}}},Lq.getApplySemigroup=function(e){return function(t){return{concat:function(n,r){return e.ap(e.map(n,function(e){return function(n){return t.concat(e,n)}}),r)}}}};var Be={1:function(e){return[e]},2:function(e){return function(t){return[e,t]}},3:function(e){return function(t){return function(n){return[e,t,n]}}},4:function(e){return function(t){return function(n){return function(r){return[e,t,n,r]}}}},5:function(e){return function(t){return function(n){return function(r){return function(i){return[e,t,n,r,i]}}}}}};function Bt(e){return L7.has.call(Be,e)||(Be[e]=L8(LQ.tuple,e-1,[])),Be[e]}function Bn(e){var t=e.length;switch(t){case 1:return function(t){var n;return(n={})[e[0]]=t,n};case 2:return function(t){return function(n){var r;return(r={})[e[0]]=t,r[e[1]]=n,r}};case 3:return function(t){return function(n){return function(r){var i;return(i={})[e[0]]=t,i[e[1]]=n,i[e[2]]=r,i}}};case 4:return function(t){return function(n){return function(r){return function(i){var o;return(o={})[e[0]]=t,o[e[1]]=n,o[e[2]]=r,o[e[3]]=i,o}}}};case 5:return function(t){return function(n){return function(r){return function(i){return function(o){var a;return(a={})[e[0]]=t,a[e[1]]=n,a[e[2]]=r,a[e[3]]=i,a[e[4]]=o,a}}}}};default:return L8(function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];for(var i={},o=0;o<t;o++)i[e[o]]=n[o];return i},t-1,[])}}Lq.sequenceT=function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];for(var r=t.length,i=Bt(r),o=e.map(t[0],i),a=1;a<r;a++)o=e.ap(o,t[a]);return o}},Lq.sequenceS=function(e){return function(t){for(var n=Object.keys(t),r=n.length,i=Bn(n),o=e.map(t[n[0]],i),a=1;a<r;a++)o=e.ap(o,t[n[a]]);return o}};var Br={};function Bi(e,t){return function(n){return function(r){return e.map(r,function(e){return t.map(e,n)})}}}Object.defineProperty(Br,"__esModule",{value:!0}),Br.getFunctorComposition=Br.bindTo=Br.flap=Br.map=void 0,Br.map=Bi,Br.flap=function(e){return function(t){return function(n){return e.map(n,function(e){return e(t)})}}},Br.bindTo=function(e){return function(t){return function(n){return e.map(n,function(e){var n;return(n={})[t]=e,n})}}},Br.getFunctorComposition=function(e,t){var n=Bi(e,t);return{map:function(e,t){return(0,LQ.pipe)(e,n(t))}}},Object.defineProperty(LN,"__esModule",{value:!0}),LN.getApplicativeComposition=LN.getApplicativeMonoid=void 0,LN.getApplicativeMonoid=function(e){var t=(0,Lq.getApplySemigroup)(e);return function(n){return{concat:t(n).concat,empty:e.of(n.empty)}}},LN.getApplicativeComposition=function(e,t){var n=(0,Br.getFunctorComposition)(e,t).map,r=(0,Lq.ap)(e,t);return{map:n,of:function(n){return e.of(t.of(n))},ap:function(e,t){return(0,LQ.pipe)(e,r(t))}}};var Bo={};Object.defineProperty(Bo,"__esModule",{value:!0}),Bo.bind=Bo.chainFirst=void 0,Bo.chainFirst=function(e){return function(t){return function(n){return e.chain(n,function(n){return e.map(t(n),function(){return n})})}}},Bo.bind=function(e){return function(t,n){return function(r){return e.chain(r,function(r){return e.map(n(r),function(e){var n;return Object.assign({},r,((n={})[t]=e,n))})})}}};var Ba={};Object.defineProperty(Ba,"__esModule",{value:!0}),Ba.tailRec=void 0;var Bu=function(e,t){for(var n=t(e);"Left"===n._tag;)n=t(n.left);return n.right};Ba.tailRec=Bu;var Bs={},Bl=O&&O.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),Bc=O&&O.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),Bd=O&&O.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&Bl(t,e,n);return Bc(t,e),t};Object.defineProperty(Bs,"__esModule",{value:!0}),Bs.filterOrElse=Bs.chainFirstEitherK=Bs.chainEitherK=Bs.fromEitherK=Bs.chainOptionK=Bs.fromOptionK=Bs.fromPredicate=Bs.fromOption=void 0;var Bf=Bd(LV);function Bp(e){return function(t){return function(n){return e.fromEither(Bf.isNone(n)?Bf.left(t()):Bf.right(n.value))}}}function BA(e){var t=Bp(e);return function(e){var n=t(e);return function(e){return(0,LQ.flow)(e,n)}}}function Bh(e){return function(t){return(0,LQ.flow)(t,e.fromEither)}}Bs.fromOption=Bp,Bs.fromPredicate=function(e){return function(t,n){return function(r){return e.fromEither(t(r)?Bf.right(r):Bf.left(n(r)))}}},Bs.fromOptionK=BA,Bs.chainOptionK=function(e,t){var n=BA(e);return function(e){var r=n(e);return function(e){return function(n){return t.chain(n,r(e))}}}},Bs.fromEitherK=Bh,Bs.chainEitherK=function(e,t){var n=Bh(e);return function(e){return function(r){return t.chain(r,n(e))}}},Bs.chainFirstEitherK=function(e,t){return(0,LQ.flow)(Bh(e),(0,Bo.chainFirst)(t))},Bs.filterOrElse=function(e,t){return function(n,r){return function(i){return t.chain(i,function(t){return e.fromEither(n(t)?Bf.right(t):Bf.left(r(t)))})}}};var Bm,Bg,By,Bv,Bx,Bb,BC,BS,Bw,BI,B_={};Object.defineProperty(Bm=B_,"__esModule",{value:!0}),Bm.right=Bm.left=Bm.flap=Bm.Functor=Bm.Bifunctor=Bm.URI=Bm.bimap=Bm.mapLeft=Bm.map=Bm.separated=void 0,Bg=function(e,t){return{left:e,right:t}},Bm.separated=Bg,By=function(e,t){return(0,LQ.pipe)(e,(0,Bm.map)(t))},Bv=function(e,t){return(0,LQ.pipe)(e,(0,Bm.mapLeft)(t))},Bx=function(e,t,n){return(0,LQ.pipe)(e,(0,Bm.bimap)(t,n))},Bb=function(e){return function(t){return(0,Bm.separated)((0,Bm.left)(t),e((0,Bm.right)(t)))}},Bm.map=Bb,BC=function(e){return function(t){return(0,Bm.separated)(e((0,Bm.left)(t)),(0,Bm.right)(t))}},Bm.mapLeft=BC,BS=function(e,t){return function(n){return(0,Bm.separated)(e((0,Bm.left)(n)),t((0,Bm.right)(n)))}},Bm.bimap=BS,Bm.URI="Separated",Bm.Bifunctor={URI:Bm.URI,mapLeft:Bv,bimap:Bx},Bm.Functor={URI:Bm.URI,map:By},Bm.flap=(0,Br.flap)(Bm.Functor),Bw=function(e){return e.left},Bm.left=Bw,BI=function(e){return e.right},Bm.right=BI;var BT={},BO=O&&O.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),BR=O&&O.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),Bk=O&&O.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&BO(t,e,n);return BR(t,e),t};Object.defineProperty(BT,"__esModule",{value:!0}),BT.filterE=BT.witherDefault=BT.wiltDefault=void 0;var BE=Bk(LV);BT.wiltDefault=function(e,t){return function(n){var r=e.traverse(n);return function(e,i){return n.map(r(e,i),t.separate)}}},BT.witherDefault=function(e,t){return function(n){var r=e.traverse(n);return function(e,i){return n.map(r(e,i),t.compact)}}},BT.filterE=function(e){return function(t){var n=e.wither(t);return function(e){return function(r){return n(r,function(n){return t.map(e(n),function(e){return e?BE.some(n):BE.none})})}}}},Pb=LD,PC=O&&O.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),PS=O&&O.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),Pw=O&&O.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&PC(t,e,n);return PS(t,e),t},Object.defineProperty(Pb,"__esModule",{value:!0}),Pb.fold=Pb.match=Pb.foldW=Pb.matchW=Pb.isRight=Pb.isLeft=Pb.fromOption=Pb.fromPredicate=Pb.FromEither=Pb.MonadThrow=Pb.throwError=Pb.ChainRec=Pb.Extend=Pb.extend=Pb.Alt=Pb.alt=Pb.altW=Pb.Bifunctor=Pb.mapLeft=Pb.bimap=Pb.Traversable=Pb.sequence=Pb.traverse=Pb.Foldable=Pb.reduceRight=Pb.foldMap=Pb.reduce=Pb.Monad=Pb.Chain=Pb.chain=Pb.chainW=Pb.Applicative=Pb.Apply=Pb.ap=Pb.apW=Pb.Pointed=Pb.of=Pb.Functor=Pb.map=Pb.getAltValidation=Pb.getApplicativeValidation=Pb.getWitherable=Pb.getFilterable=Pb.getCompactable=Pb.getSemigroup=Pb.getEq=Pb.getShow=Pb.URI=Pb.right=Pb.left=void 0,Pb.getValidation=Pb.getValidationMonoid=Pb.getValidationSemigroup=Pb.getApplyMonoid=Pb.getApplySemigroup=Pb.either=Pb.stringifyJSON=Pb.parseJSON=Pb.sequenceArray=Pb.traverseArray=Pb.traverseArrayWithIndex=Pb.traverseReadonlyArrayWithIndex=Pb.traverseReadonlyNonEmptyArrayWithIndex=Pb.ApT=Pb.apSW=Pb.apS=Pb.bindW=Pb.bind=Pb.bindTo=Pb.Do=Pb.exists=Pb.elem=Pb.toError=Pb.toUnion=Pb.chainNullableK=Pb.fromNullableK=Pb.tryCatchK=Pb.tryCatch=Pb.fromNullable=Pb.orElse=Pb.orElseW=Pb.swap=Pb.filterOrElseW=Pb.filterOrElse=Pb.chainOptionK=Pb.fromOptionK=Pb.duplicate=Pb.flatten=Pb.flattenW=Pb.chainFirstW=Pb.chainFirst=Pb.apSecondW=Pb.apSecond=Pb.apFirstW=Pb.apFirst=Pb.flap=Pb.getOrElse=Pb.getOrElseW=void 0,PI=Pw(LV),Pb.left=PI.left,Pb.right=PI.right,P_=function(e,t){return(0,LQ.pipe)(e,(0,Pb.map)(t))},PT=function(e,t){return(0,LQ.pipe)(e,(0,Pb.ap)(t))},PO=function(e,t){return(0,LQ.pipe)(e,(0,Pb.chain)(t))},PR=function(e,t,n){return(0,LQ.pipe)(e,(0,Pb.reduce)(t,n))},Pk=function(e){return function(t,n){var r=(0,Pb.foldMap)(e);return(0,LQ.pipe)(t,r(n))}},PE=function(e,t,n){return(0,LQ.pipe)(e,(0,Pb.reduceRight)(t,n))},PM=function(e){var t=(0,Pb.traverse)(e);return function(e,n){return(0,LQ.pipe)(e,t(n))}},PF=function(e,t,n){return(0,LQ.pipe)(e,(0,Pb.bimap)(t,n))},Pj=function(e,t){return(0,LQ.pipe)(e,(0,Pb.mapLeft)(t))},PU=function(e,t){return(0,LQ.pipe)(e,(0,Pb.alt)(t))},PK=function(e,t){return(0,LQ.pipe)(e,(0,Pb.extend)(t))},PL=function(e,t){return(0,Ba.tailRec)(t(e),function(e){return(0,Pb.isLeft)(e)?(0,Pb.right)((0,Pb.left)(e.left)):(0,Pb.isLeft)(e.right)?(0,Pb.left)(t(e.right.left)):(0,Pb.right)((0,Pb.right)(e.right.right))})},Pb.URI="Either",PB=function(e,t){return{show:function(n){return(0,Pb.isLeft)(n)?"left(".concat(e.show(n.left),")"):"right(".concat(t.show(n.right),")")}}},Pb.getShow=PB,PP=function(e,t){return{equals:function(n,r){return n===r||((0,Pb.isLeft)(n)?(0,Pb.isLeft)(r)&&e.equals(n.left,r.left):(0,Pb.isRight)(r)&&t.equals(n.right,r.right))}}},Pb.getEq=PP,PW=function(e){return{concat:function(t,n){return(0,Pb.isLeft)(n)?t:(0,Pb.isLeft)(t)?n:(0,Pb.right)(e.concat(t.right,n.right))}}},Pb.getSemigroup=PW,PD=function(e){var t=(0,Pb.left)(e.empty);return{URI:Pb.URI,_E:void 0,compact:function(e){return(0,Pb.isLeft)(e)?e:"None"===e.right._tag?t:(0,Pb.right)(e.right.value)},separate:function(e){return(0,Pb.isLeft)(e)?(0,B_.separated)(e,e):(0,Pb.isLeft)(e.right)?(0,B_.separated)((0,Pb.right)(e.right.left),t):(0,B_.separated)(t,(0,Pb.right)(e.right.right))}}},Pb.getCompactable=PD,PN=function(e){var t=(0,Pb.left)(e.empty),n=(0,Pb.getCompactable)(e),r=n.compact,i=n.separate,o=function(e,n){return(0,Pb.isLeft)(e)||n(e.right)?e:t},a=function(e,n){return(0,Pb.isLeft)(e)?(0,B_.separated)(e,e):n(e.right)?(0,B_.separated)(t,(0,Pb.right)(e.right)):(0,B_.separated)((0,Pb.right)(e.right),t)};return{URI:Pb.URI,_E:void 0,map:P_,compact:r,separate:i,filter:o,filterMap:function(e,n){if((0,Pb.isLeft)(e))return e;var r=n(e.right);return"None"===r._tag?t:(0,Pb.right)(r.value)},partition:a,partitionMap:function(e,n){if((0,Pb.isLeft)(e))return(0,B_.separated)(e,e);var r=n(e.right);return(0,Pb.isLeft)(r)?(0,B_.separated)((0,Pb.right)(r.left),t):(0,B_.separated)(t,(0,Pb.right)(r.right))}}},Pb.getFilterable=PN,Pq=function(e){var t=(0,Pb.getFilterable)(e),n=(0,Pb.getCompactable)(e);return{URI:Pb.URI,_E:void 0,map:P_,compact:t.compact,separate:t.separate,filter:t.filter,filterMap:t.filterMap,partition:t.partition,partitionMap:t.partitionMap,traverse:PM,sequence:Pb.sequence,reduce:PR,foldMap:Pk,reduceRight:PE,wither:(0,BT.witherDefault)(Pb.Traversable,n),wilt:(0,BT.wiltDefault)(Pb.Traversable,n)}},Pb.getWitherable=Pq,PQ=function(e){return{URI:Pb.URI,_E:void 0,map:P_,ap:function(t,n){return(0,Pb.isLeft)(t)?(0,Pb.isLeft)(n)?(0,Pb.left)(e.concat(t.left,n.left)):t:(0,Pb.isLeft)(n)?n:(0,Pb.right)(t.right(n.right))},of:Pb.of}},Pb.getApplicativeValidation=PQ,PV=function(e){return{URI:Pb.URI,_E:void 0,map:P_,alt:function(t,n){if((0,Pb.isRight)(t))return t;var r=n();return(0,Pb.isLeft)(r)?(0,Pb.left)(e.concat(t.left,r.left)):r}}},Pb.getAltValidation=PV,Pz=function(e){return function(t){return(0,Pb.isLeft)(t)?t:(0,Pb.right)(e(t.right))}},Pb.map=Pz,Pb.Functor={URI:Pb.URI,map:P_},Pb.of=Pb.right,Pb.Pointed={URI:Pb.URI,of:Pb.of},PY=function(e){return function(t){return(0,Pb.isLeft)(t)?t:(0,Pb.isLeft)(e)?e:(0,Pb.right)(t.right(e.right))}},Pb.apW=PY,Pb.ap=Pb.apW,Pb.Apply={URI:Pb.URI,map:P_,ap:PT},Pb.Applicative={URI:Pb.URI,map:P_,ap:PT,of:Pb.of},PH=function(e){return function(t){return(0,Pb.isLeft)(t)?t:e(t.right)}},Pb.chainW=PH,Pb.chain=Pb.chainW,Pb.Chain={URI:Pb.URI,map:P_,ap:PT,chain:PO},Pb.Monad={URI:Pb.URI,map:P_,ap:PT,of:Pb.of,chain:PO},PZ=function(e,t){return function(n){return(0,Pb.isLeft)(n)?e:t(e,n.right)}},Pb.reduce=PZ,PJ=function(e){return function(t){return function(n){return(0,Pb.isLeft)(n)?e.empty:t(n.right)}}},Pb.foldMap=PJ,PG=function(e,t){return function(n){return(0,Pb.isLeft)(n)?e:t(n.right,e)}},Pb.reduceRight=PG,Pb.Foldable={URI:Pb.URI,reduce:PR,foldMap:Pk,reduceRight:PE},P$=function(e){return function(t){return function(n){return(0,Pb.isLeft)(n)?e.of((0,Pb.left)(n.left)):e.map(t(n.right),Pb.right)}}},Pb.traverse=P$,PX=function(e){return function(t){return(0,Pb.isLeft)(t)?e.of((0,Pb.left)(t.left)):e.map(t.right,Pb.right)}},Pb.sequence=PX,Pb.Traversable={URI:Pb.URI,map:P_,reduce:PR,foldMap:Pk,reduceRight:PE,traverse:PM,sequence:Pb.sequence},P0=function(e,t){return function(n){return(0,Pb.isLeft)(n)?(0,Pb.left)(e(n.left)):(0,Pb.right)(t(n.right))}},Pb.bimap=P0,P1=function(e){return function(t){return(0,Pb.isLeft)(t)?(0,Pb.left)(e(t.left)):t}},Pb.mapLeft=P1,Pb.Bifunctor={URI:Pb.URI,bimap:PF,mapLeft:Pj},P2=function(e){return function(t){return(0,Pb.isLeft)(t)?e():t}},Pb.altW=P2,Pb.alt=Pb.altW,Pb.Alt={URI:Pb.URI,map:P_,alt:PU},P6=function(e){return function(t){return(0,Pb.isLeft)(t)?t:(0,Pb.right)(e(t))}},Pb.extend=P6,Pb.Extend={URI:Pb.URI,map:P_,extend:PK},Pb.ChainRec={URI:Pb.URI,map:P_,ap:PT,chain:PO,chainRec:PL},Pb.throwError=Pb.left,Pb.MonadThrow={URI:Pb.URI,map:P_,ap:PT,of:Pb.of,chain:PO,throwError:Pb.throwError},Pb.FromEither={URI:Pb.URI,fromEither:LQ.identity},Pb.fromPredicate=(0,Bs.fromPredicate)(Pb.FromEither),Pb.fromOption=(0,Bs.fromOption)(Pb.FromEither),Pb.isLeft=PI.isLeft,Pb.isRight=PI.isRight,P5=function(e,t){return function(n){return(0,Pb.isLeft)(n)?e(n.left):t(n.right)}},Pb.matchW=P5,Pb.foldW=Pb.matchW,Pb.match=Pb.matchW,Pb.fold=Pb.match,P3=function(e){return function(t){return(0,Pb.isLeft)(t)?e(t.left):t.right}},Pb.getOrElseW=P3,Pb.getOrElse=Pb.getOrElseW,Pb.flap=(0,Br.flap)(Pb.Functor),Pb.apFirst=(0,Lq.apFirst)(Pb.Apply),Pb.apFirstW=Pb.apFirst,Pb.apSecond=(0,Lq.apSecond)(Pb.Apply),Pb.apSecondW=Pb.apSecond,Pb.chainFirst=(0,Bo.chainFirst)(Pb.Chain),Pb.chainFirstW=Pb.chainFirst,Pb.flattenW=(0,Pb.chainW)(LQ.identity),Pb.flatten=Pb.flattenW,Pb.duplicate=(0,Pb.extend)(LQ.identity),Pb.fromOptionK=(0,Bs.fromOptionK)(Pb.FromEither),Pb.chainOptionK=(0,Bs.chainOptionK)(Pb.FromEither,Pb.Chain),Pb.filterOrElse=(0,Bs.filterOrElse)(Pb.FromEither,Pb.Chain),Pb.filterOrElseW=Pb.filterOrElse,P9=function(e){return(0,Pb.isLeft)(e)?(0,Pb.right)(e.left):(0,Pb.left)(e.right)},Pb.swap=P9,P4=function(e){return function(t){return(0,Pb.isLeft)(t)?e(t.left):t}},Pb.orElseW=P4,Pb.orElse=Pb.orElseW,P7=function(e){return function(t){return null==t?(0,Pb.left)(e):(0,Pb.right)(t)}},Pb.fromNullable=P7,P8=function(e,t){try{return(0,Pb.right)(e())}catch(n){return(0,Pb.left)(t(n))}},Pb.tryCatch=P8,We=function(e,t){return function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return(0,Pb.tryCatch)(function(){return e.apply(void 0,n)},t)}},Pb.tryCatchK=We,Wt=function(e){var t=(0,Pb.fromNullable)(e);return function(e){return(0,LQ.flow)(e,t)}},Pb.fromNullableK=Wt,Wn=function(e){var t=(0,Pb.fromNullableK)(e);return function(e){return(0,Pb.chain)(t(e))}},Pb.chainNullableK=Wn,Pb.toUnion=(0,Pb.foldW)(LQ.identity,LQ.identity),Pb.toError=function(e){return e instanceof Error?e:Error(String(e))},Pb.elem=function e(t){return function(n,r){if(void 0===r){var i=e(t);return function(e){return i(n,e)}}return!(0,Pb.isLeft)(r)&&t.equals(n,r.right)}},Wr=function(e){return function(t){return!(0,Pb.isLeft)(t)&&e(t.right)}},Pb.exists=Wr,Pb.Do=(0,Pb.of)(PI.emptyRecord),Pb.bindTo=(0,Br.bindTo)(Pb.Functor),Pb.bind=(0,Bo.bind)(Pb.Chain),Pb.bindW=Pb.bind,Pb.apS=(0,Lq.apS)(Pb.Apply),Pb.apSW=Pb.apS,Pb.ApT=(0,Pb.of)(PI.emptyReadonlyArray),Wi=function(e){return function(t){var n=e(0,PI.head(t));if((0,Pb.isLeft)(n))return n;for(var r=[n.right],i=1;i<t.length;i++){var o=e(i,t[i]);if((0,Pb.isLeft)(o))return o;r.push(o.right)}return(0,Pb.right)(r)}},Pb.traverseReadonlyNonEmptyArrayWithIndex=Wi,Wo=function(e){var t=(0,Pb.traverseReadonlyNonEmptyArrayWithIndex)(e);return function(e){return PI.isNonEmpty(e)?t(e):Pb.ApT}},Pb.traverseReadonlyArrayWithIndex=Wo,Pb.traverseArrayWithIndex=Pb.traverseReadonlyArrayWithIndex,Wa=function(e){return(0,Pb.traverseReadonlyArrayWithIndex)(function(t,n){return e(n)})},Pb.traverseArray=Wa,Pb.sequenceArray=(0,Pb.traverseArray)(LQ.identity),Pb.parseJSON=function(e,t){return(0,Pb.tryCatch)(function(){return JSON.parse(e)},t)},Wu=function(e,t){return(0,Pb.tryCatch)(function(){var t=JSON.stringify(e);if("string"!=typeof t)throw Error("Converting unsupported structure to JSON");return t},t)},Pb.stringifyJSON=Wu,Pb.either={URI:Pb.URI,map:P_,of:Pb.of,ap:PT,chain:PO,reduce:PR,foldMap:Pk,reduceRight:PE,traverse:PM,sequence:Pb.sequence,bimap:PF,mapLeft:Pj,alt:PU,extend:PK,chainRec:PL,throwError:Pb.throwError},Pb.getApplySemigroup=(0,Lq.getApplySemigroup)(Pb.Apply),Pb.getApplyMonoid=(0,LN.getApplicativeMonoid)(Pb.Applicative),Ws=function(e,t){return(0,Lq.getApplySemigroup)((0,Pb.getApplicativeValidation)(e))(t)},Pb.getValidationSemigroup=Ws,Wl=function(e,t){return(0,LN.getApplicativeMonoid)((0,Pb.getApplicativeValidation)(e))(t)},Pb.getValidationMonoid=Wl,Pb.getValidation=function(e){var t=(0,Pb.getApplicativeValidation)(e).ap,n=(0,Pb.getAltValidation)(e).alt;return{URI:Pb.URI,_E:void 0,map:P_,of:Pb.of,chain:PO,bimap:PF,mapLeft:Pj,reduce:PR,foldMap:Pk,reduceRight:PE,extend:PK,traverse:PM,sequence:Pb.sequence,chainRec:PL,throwError:Pb.throwError,ap:t,alt:n}};var BM=(Wc=function(e,t){return(Wc=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}Wc(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),BF=function(){return(BF=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},Bj=function(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))},BU=function(e,t,n){return ey([{value:e,context:t,message:n}])},BK=function(){function e(e,t,n,r){this.name=e,this.is=t,this.validate=n,this.encode=r,this.decode=this.decode.bind(this)}return e.prototype.pipe=function(t,n){var r=this;return void 0===n&&(n="pipe(".concat(this.name,", ").concat(t.name,")")),new e(n,t.is,function(e,n){var i=r.validate(e,n);return f7(i)?i:t.validate(i.right,n)},this.encode===BL&&t.encode===BL?BL:function(e){return r.encode(t.encode(e))})},e.prototype.asDecoder=function(){return this},e.prototype.asEncoder=function(){return this},e.prototype.decode=function(e){return this.validate(e,[{key:"",type:this,actual:e}])},e}(),BL=function(e){return e};function BB(e){return e.displayName||e.name||"<function".concat(e.length,">")}function BP(e,t,n,r){for(var i=e.length,o=Array(i+1),a=0;a<i;a++)o[a]=e[a];return o[i]={key:t,type:n,actual:r},o}function BW(e,t){for(var n=t.length,r=0;r<n;r++)e.push(t[r])}var BD=Object.prototype.hasOwnProperty;function BN(e){return Object.keys(e).map(function(t){return"".concat(t,": ").concat(e[t].name)}).join(", ")}function Bq(e){for(var t=0;t<e.length;t++)if(e[t].encode!==BL)return!1;return!0}function BQ(e){return"{ ".concat(BN(e)," }")}function BV(e){return"Partial<".concat(e,">")}function Bz(e){if(B0(e)){var t,n,r=e.value;if(Po.is(r))return(t={})[r]=null,t}else{if(n=e,"KeyofType"===n._tag)return e.keys;if(B2(e)){var i=e.types.map(function(e){return Bz(e)});return i.some(B8.is)?void 0:Object.assign.apply(Object,Bj([{}],i,!1))}}}function BY(e){return"("+e.map(function(e){return e.name}).join(" | ")+")"}function BH(e,t){for(var n=!0,r=!0,i=!Ph.is(e),o=0;o<t.length;o++){var a=t[o];a!==e&&(n=!1),Ph.is(a)&&(r=!1)}if(n)return e;if(r)return t[t.length-1];for(var u={},s=0;s<t.length;s++){var a=t[s];for(var l in a)(!BD.call(u,l)||i||a[l]!==e[l])&&(u[l]=a[l])}return u}function BZ(e,t){for(var n=Object.getOwnPropertyNames(e),r=!1,i={},o=0;o<n.length;o++){var a=n[o];BD.call(t,a)?i[a]=e[a]:r=!0}return r?i:e}function BJ(e){return e.length>0}var BG={};function B$(e,t){for(var n=[],r=0;r<e.length;r++){var i=e[r];-1!==t.indexOf(i)&&n.push(i)}return n}function BX(e){return"AnyType"===e._tag}function B0(e){return"LiteralType"===e._tag}function B1(e){return"InterfaceType"===e._tag}function B2(e){return"UnionType"===e._tag}var B6=[];function B5(e){if(-1!==B6.indexOf(e))return BG;if(B1(e)||"StrictType"===(t=e)._tag){var t,n,r,i,o,a=BG;for(var u in e.props){var s=e.props[u];B0(s)&&(a===BG&&(a={}),a[u]=[s.value])}return a}if("ExactType"===e._tag||"RefinementType"===e._tag)return B5(e.type);if("IntersectionType"===e._tag)return e.types.reduce(function(e,t){return function(e,t){if(e===BG)return t;if(t===BG)return e;var n=Object.assign({},e);for(var r in t)if(BD.call(e,r)){var i=B$(e[r],t[r]);if(BJ(i))n[r]=i;else{n=BG;break}}else n[r]=t[r];return n}(e,B5(t))},BG);if(B2(e))return e.types.slice(1).reduce(function(e,t){return function(e,t){if(e===BG||t===BG)return BG;var n=BG;for(var r in e)BD.call(t,r)&&0===B$(e[r],t[r]).length&&(n===BG&&(n={}),n[r]=e[r].concat(t[r]));return n}(e,B5(t))},B5(e.types[0]));if("RecursiveType"===e._tag){B6.push(e);var l=B5(e.type);return B6.pop(),l}return BG}function B3(e){var t=B5(e[0]),n=Object.keys(t),r=e.length;e:for(var i=0;i<n.length;i++){var o=function(n){for(var i=t[n].slice(),o=[t[n]],a=1;a<r;a++){var u=B5(e[a])[n];if(void 0===u||u.some(function(e){return -1!==i.indexOf(e)}))return"continue-keys";i.push.apply(i,u),o.push(u)}return{value:[n,o]}}(n[i]);if("object"==typeof o)return o.value;if("continue-keys"===o)continue e}}var B9=function(e){function t(){var t=e.call(this,"null",function(e){return null===e},function(e,n){return t.is(e)?ev(e):BU(e,n)},BL)||this;return t._tag="NullType",t}return BM(t,e),t}(BK),B4=new B9,B7=function(e){function t(){var t=e.call(this,"undefined",function(e){return void 0===e},function(e,n){return t.is(e)?ev(e):BU(e,n)},BL)||this;return t._tag="UndefinedType",t}return BM(t,e),t}(BK),B8=new B7,Pe=function(e){function t(){var t=e.call(this,"void",B8.is,B8.validate,BL)||this;return t._tag="VoidType",t}return BM(t,e),t}(BK),Pt=new Pe,Pn=function(e){function t(){var t=e.call(this,"unknown",function(e){return!0},ev,BL)||this;return t._tag="UnknownType",t}return BM(t,e),t}(BK),Pr=new Pn,Pi=function(e){function t(){var t=e.call(this,"string",function(e){return"string"==typeof e},function(e,n){return t.is(e)?ev(e):BU(e,n)},BL)||this;return t._tag="StringType",t}return BM(t,e),t}(BK),Po=new Pi,Pa=function(e){function t(){var t=e.call(this,"number",function(e){return"number"==typeof e},function(e,n){return t.is(e)?ev(e):BU(e,n)},BL)||this;return t._tag="NumberType",t}return BM(t,e),t}(BK),Pu=new Pa,Ps=function(e){function t(){var t=e.call(this,"bigint",function(e){return"bigint"==typeof e},function(e,n){return t.is(e)?ev(e):BU(e,n)},BL)||this;return t._tag="BigIntType",t}return BM(t,e),t}(BK),Pl=new Ps,Pc=function(e){function t(){var t=e.call(this,"boolean",function(e){return"boolean"==typeof e},function(e,n){return t.is(e)?ev(e):BU(e,n)},BL)||this;return t._tag="BooleanType",t}return BM(t,e),t}(BK),Pd=new Pc,Pf=function(e){function t(){var t=e.call(this,"UnknownArray",Array.isArray,function(e,n){return t.is(e)?ev(e):BU(e,n)},BL)||this;return t._tag="AnyArrayType",t}return BM(t,e),t}(BK),Pp=new Pf,PA=function(e){function t(){var t=e.call(this,"UnknownRecord",function(e){var t=Object.prototype.toString.call(e);return"[object Object]"===t||"[object Window]"===t},function(e,n){return t.is(e)?ev(e):BU(e,n)},BL)||this;return t._tag="AnyDictionaryType",t}return BM(t,e),t}(BK),Ph=new PA,Pm=function(e){function t(t,n,r,i,o){var a=e.call(this,t,n,r,i)||this;return a.value=o,a._tag="LiteralType",a}return BM(t,e),t}(BK);function Pg(e,t){void 0===t&&(t=JSON.stringify(e));var n=function(t){return t===e};return new Pm(t,n,function(t,r){return n(t)?ev(e):BU(t,r)},BL,e)}var Py=function(e){function t(t,n,r,i,o){var a=e.call(this,t,n,r,i)||this;return a.keys=o,a._tag="KeyofType",a}return BM(t,e),t}(BK),Pv=function(e){function t(t,n,r,i,o,a){var u=e.call(this,t,n,r,i)||this;return u.type=o,u.predicate=a,u._tag="RefinementType",u}return BM(t,e),t}(BK);function Px(e,t,n){return WV(e,t,n)}var Pb,PC,PS,Pw,PI,P_,PT,PO,PR,Pk,PE,PM,PF,Pj,PU,PK,PL,PB,PP,PW,PD,PN,Pq,PQ,PV,Pz,PY,PH,PZ,PJ,PG,P$,PX,P0,P1,P2,P6,P5,P3,P9,P4,P7,P8,We,Wt,Wn,Wr,Wi,Wo,Wa,Wu,Ws,Wl,Wc,Wd,Wf,Wp=WV(Pu,Wf=function(e){return Number.isInteger(e)},"Int"),WA=function(e){function t(t,n,r,i,o){var a=e.call(this,t,n,r,i)||this;return a.runDefinition=o,a._tag="RecursiveType",a}return BM(t,e),t}(BK);function Wh(e,t){var n,r=function(){return n||((n=t(i)).name=e),n},i=new WA(e,function(e){return r().is(e)},function(e,t){return r().validate(e,t)},function(e){return r().encode(e)},r);return i}Object.defineProperty(WA.prototype,"type",{get:function(){return this.runDefinition()},enumerable:!0,configurable:!0});var Wm=function(e){function t(t,n,r,i,o){var a=e.call(this,t,n,r,i)||this;return a.type=o,a._tag="ArrayType",a}return BM(t,e),t}(BK);function Wg(e,t){return void 0===t&&(t="Array<".concat(e.name,">")),new Wm(t,function(t){return Pp.is(t)&&t.every(e.is)},function(t,n){var r=Pp.validate(t,n);if(f7(r))return r;for(var i=r.right,o=i.length,a=i,u=[],s=0;s<o;s++){var l=i[s],c=e.validate(l,BP(n,String(s),e,l));if(f7(c))BW(u,c.left);else{var d=c.right;d!==l&&(a===i&&(a=i.slice()),a[s]=d)}}return u.length>0?ey(u):ev(a)},e.encode===BL?BL:function(t){return t.map(e.encode)},e)}var Wy=function(e){function t(t,n,r,i,o){var a=e.call(this,t,n,r,i)||this;return a.props=o,a._tag="InterfaceType",a}return BM(t,e),t}(BK);function Wv(e,t){void 0===t&&(t=BQ(e));var n=Object.keys(e),r=n.map(function(t){return e[t]}),i=n.length;return new Wy(t,function(e){if(Ph.is(e)){for(var t=0;t<i;t++){var o=n[t],a=e[o];if(void 0===a&&!BD.call(e,o)||!r[t].is(a))return!1}return!0}return!1},function(e,t){var o=Ph.validate(e,t);if(f7(o))return o;for(var a=o.right,u=a,s=[],l=0;l<i;l++){var c=n[l],d=u[c],f=r[l],p=f.validate(d,BP(t,c,f,d));if(f7(p))BW(s,p.left);else{var A=p.right;A===d&&(void 0!==A||BD.call(u,c))||(u===a&&(u=BF({},a)),u[c]=A)}}return s.length>0?ey(s):ev(u)},Bq(r)?BL:function(e){for(var t=BF({},e),o=0;o<i;o++){var a=n[o],u=r[o].encode;u!==BL&&(t[a]=u(e[a]))}return t},e)}var Wx=function(e){function t(t,n,r,i,o){var a=e.call(this,t,n,r,i)||this;return a.props=o,a._tag="PartialType",a}return BM(t,e),t}(BK),Wb=function(e){function t(t,n,r,i,o,a){var u=e.call(this,t,n,r,i)||this;return u.domain=o,u.codomain=a,u._tag="DictionaryType",u}return BM(t,e),t}(BK);function WC(e,t,n){var r,i,o,a,u,s,l,c,d=Bz(e);return d?(r=Object.keys(d),void 0===(a=n)&&(a="{ [K in ".concat(e.name,"]: ").concat(t.name," }")),u=r.length,new Wb(a,function(e){return Ph.is(e)&&r.every(function(n){return t.is(e[n])})},function(e,n){var i=Ph.validate(e,n);if(f7(i))return i;for(var o=i.right,a={},s=[],l=!1,c=0;c<u;c++){var d=r[c],f=o[d],p=t.validate(f,BP(n,d,t,f));if(f7(p))BW(s,p.left);else{var A=p.right;l=l||A!==f,a[d]=A}}return s.length>0?ey(s):ev(l||Object.keys(o).length!==u?a:o)},t.encode===BL?BL:function(e){for(var n={},i=0;i<u;i++){var o=r[i];n[o]=t.encode(e[o])}return n},e,t)):(s=e,void 0===(c=n)&&(c="{ [K in ".concat(s.name,"]: ").concat(t.name," }")),new Wb(c,function(e){return Ph.is(e)?Object.keys(e).every(function(n){return s.is(n)&&t.is(e[n])}):BX(t)&&Array.isArray(e)},function(e,n){if(Ph.is(e)){for(var r={},i=[],o=Object.keys(e),a=o.length,u=!1,l=0;l<a;l++){var c=o[l],d=e[c],f=s.validate(c,BP(n,c,s,c));if(f7(f))BW(i,f.left);else{var p=f.right;u=u||p!==c,c=p;var A=t.validate(d,BP(n,c,t,d));if(f7(A))BW(i,A.left);else{var h=A.right;u=u||h!==d,r[c]=h}}}return i.length>0?ey(i):ev(u?r:e)}return BX(t)&&Array.isArray(e)?ev(e):BU(e,n)},s.encode===BL&&t.encode===BL?BL:function(e){for(var n={},r=Object.keys(e),i=r.length,o=0;o<i;o++){var a=r[o];n[String(s.encode(a))]=t.encode(e[a])}return n},s,t))}var WS=function(e){function t(t,n,r,i,o){var a=e.call(this,t,n,r,i)||this;return a.types=o,a._tag="UnionType",a}return BM(t,e),t}(BK);function Ww(e,t){void 0===t&&(t=BY(e));var n=B3(e);if(void 0===n||!(e.length>0))return new WS(t,function(t){return e.some(function(e){return e.is(t)})},function(t,n){for(var r=[],i=0;i<e.length;i++){var o=e[i],a=o.validate(t,BP(n,String(i),o,t));if(!f7(a))return ev(a.right);BW(r,a.left)}return ey(r)},Bq(e)?BL:function(n){for(var r=0;r<e.length;r++){var i=e[r];if(i.is(n))return i.encode(n)}throw Error("no codec found to encode value in union type ".concat(t))},e);var r=n[0],i=n[1],o=i.length,a=function(e){for(var t=0;t<o;t++)if(-1!==i[t].indexOf(e))return t};return new WU(t,function(t){if(Ph.is(t)){var n=a(t[r]);return void 0!==n&&e[n].is(t)}return!1},function(t,n){var i=Ph.validate(t,n);if(f7(i))return i;var o=i.right,u=a(o[r]);if(void 0===u)return BU(t,n);var s=e[u];return s.validate(o,BP(n,String(u),s,o))},Bq(e)?BL:function(n){var i=a(n[r]);if(void 0===i)throw Error("no codec found to encode value in union codec ".concat(t));return e[i].encode(n)},e,r)}var WI=function(e){function t(t,n,r,i,o){var a=e.call(this,t,n,r,i)||this;return a.types=o,a._tag="IntersectionType",a}return BM(t,e),t}(BK),W_=function(e){function t(t,n,r,i,o){var a=e.call(this,t,n,r,i)||this;return a.types=o,a._tag="TupleType",a}return BM(t,e),t}(BK),WT=function(e){function t(t,n,r,i,o){var a=e.call(this,t,n,r,i)||this;return a.type=o,a._tag="ReadonlyType",a}return BM(t,e),t}(BK),WO=function(e){function t(t,n,r,i,o){var a=e.call(this,t,n,r,i)||this;return a.type=o,a._tag="ReadonlyArrayType",a}return BM(t,e),t}(BK);function WR(e,t){void 0===t&&(t="ReadonlyArray<".concat(e.name,">"));var n=Wg(e);return new WO(t,n.is,n.validate,n.encode,e)}var Wk=function(e,t){return WM(Wv(e),t)},WE=function(e){function t(t,n,r,i,o){var a=e.call(this,t,n,r,i)||this;return a.type=o,a._tag="ExactType",a}return BM(t,e),t}(BK);function WM(e,t){void 0===t&&(t=B1(r=e)?"{| ".concat(BN(r.props)," |}"):(n=r,"PartialType"===n._tag)?BV("{| ".concat(BN(r.props)," |}")):"Exact<".concat(r.name,">"));var n,r,i=function e(t){switch(t._tag){case"RefinementType":case"ReadonlyType":return e(t.type);case"InterfaceType":case"StrictType":case"PartialType":return t.props;case"IntersectionType":return t.types.reduce(function(t,n){return Object.assign(t,e(n))},{})}}(e);return new WE(t,e.is,function(t,n){var r=Ph.validate(t,n);if(f7(r))return r;var o=e.validate(t,n);return f7(o)?o:ev(BZ(o.right,i))},function(t){return e.encode(BZ(t,i))},e)}var WF=function(e){function t(){var t=e.call(this,"Function",function(e){return"function"==typeof e},function(e,n){return t.is(e)?ev(e):BU(e,n)},BL)||this;return t._tag="FunctionType",t}return BM(t,e),t}(BK),Wj=new WF,WU=function(e){function t(t,n,r,i,o,a){var u=e.call(this,t,n,r,i,o)||this;return u.tag=a,u}return BM(t,e),t}(WS),WK=function(e,t,n){void 0===n&&(n=BY(t));var r=Ww(t,n);return r instanceof WU?r:(console.warn("[io-ts] Cannot build a tagged union for ".concat(n,", returning a de-optimized union")),new WU(n,r.is,r.validate,r.encode,t,e))},WL=function(e,t){return{value:e,context:t}},WB=function(e){return[{key:"",type:e}]},WP=function(e){function t(){var t=e.call(this,"never",function(e){return!1},function(e,t){return BU(e,t)},function(){throw Error("cannot encode never")})||this;return t._tag="NeverType",t}return BM(t,e),t}(BK),WW=new WP,WD=function(e){function t(){var t=e.call(this,"any",function(e){return!0},ev,BL)||this;return t._tag="AnyType",t}return BM(t,e),t}(BK),WN=new WD,Wq=function(e){function t(){var t=e.call(this,"object",function(e){return null!==e&&"object"==typeof e},function(e,n){return t.is(e)?ev(e):BU(e,n)},BL)||this;return t._tag="ObjectType",t}return BM(t,e),t}(BK),WQ=new Wq;function WV(e,t,n){return void 0===n&&(n="(".concat(e.name," | ").concat(BB(t),")")),new Pv(n,function(n){return e.is(n)&&t(n)},function(n,r){var i=e.validate(n,r);if(f7(i))return i;var o=i.right;return t(o)?ev(o):BU(o,r)},e.encode,e,t)}var Wz=WV(Pu,Number.isInteger,"Integer"),WY=function(e){function t(t,n,r,i,o){var a=e.call(this,t,n,r,i)||this;return a.props=o,a._tag="StrictType",a}return BM(t,e),t}(BK);function WH(e){return e}let WZ=Object.freeze(Object.defineProperty({__proto__:null,AnyArrayType:Pf,AnyDictionaryType:PA,AnyType:WD,Array:Pp,ArrayType:Wm,BigIntType:Ps,BooleanType:Pc,Dictionary:Ph,DictionaryType:Wb,ExactType:WE,Function:Wj,FunctionType:WF,Int:Wp,Integer:Wz,InterfaceType:Wy,IntersectionType:WI,KeyofType:Py,LiteralType:Pm,NeverType:WP,NullType:B9,NumberType:Pa,ObjectType:Wq,PartialType:Wx,ReadonlyArrayType:WO,ReadonlyType:WT,RecursiveType:WA,RefinementType:Pv,StrictType:WY,StringType:Pi,TaggedUnionType:WU,TupleType:W_,Type:BK,UndefinedType:B7,UnionType:WS,UnknownArray:Pp,UnknownRecord:Ph,UnknownType:Pn,VoidType:Pe,alias:function(e){return function(){return e}},any:WN,appendContext:BP,array:Wg,bigint:Pl,boolean:Pd,brand:Px,clean:WH,dictionary:WC,emptyTags:BG,exact:WM,failure:BU,failures:ey,getContextEntry:function(e,t){return{key:e,type:t}},getDefaultContext:WB,getDomainKeys:Bz,getFunctionName:BB,getIndex:B3,getTags:B5,getValidationError:WL,identity:BL,interface:Wv,intersection:function(e,t){void 0===t&&(t="(".concat(e.map(function(e){return e.name}).join(" & "),")"));var n=e.length;return new WI(t,function(t){return e.every(function(e){return e.is(t)})},0===e.length?ev:function(t,r){for(var i=[],o=[],a=0;a<n;a++){var u=e[a],s=u.validate(t,BP(r,String(a),u,t));f7(s)?BW(o,s.left):i.push(s.right)}return o.length>0?ey(o):ev(BH(t,i))},0===e.length?BL:function(t){return BH(t,e.map(function(e){return e.encode(t)}))},e)},keyof:function(e,t){void 0===t&&(t=Object.keys(e).map(function(e){return JSON.stringify(e)}).join(" | "));var n=function(t){return Po.is(t)&&BD.call(e,t)};return new Py(t,n,function(e,t){return n(e)?ev(e):BU(e,t)},BL,e)},literal:Pg,mergeAll:BH,never:WW,null:B4,nullType:B4,number:Pu,object:WQ,partial:function(e,t){void 0===t&&(t=BV(BQ(e)));var n=Object.keys(e),r=n.map(function(t){return e[t]}),i=n.length;return new Wx(t,function(t){if(Ph.is(t)){for(var r=0;r<i;r++){var o=n[r],a=t[o];if(void 0!==a&&!e[o].is(a))return!1}return!0}return!1},function(t,r){var o=Ph.validate(t,r);if(f7(o))return o;for(var a=o.right,u=a,s=[],l=0;l<i;l++){var c=n[l],d=u[c],f=e[c],p=f.validate(d,BP(r,c,f,d));if(f7(p))void 0!==d&&BW(s,p.left);else{var A=p.right;A!==d&&(u===a&&(u=BF({},a)),u[c]=A)}}return s.length>0?ey(s):ev(u)},Bq(r)?BL:function(e){for(var t=BF({},e),o=0;o<i;o++){var a=n[o],u=e[a];void 0!==u&&(t[a]=r[o].encode(u))}return t},e)},readonly:function(e,t){return void 0===t&&(t="Readonly<".concat(e.name,">")),new WT(t,e.is,e.validate,e.encode,e)},readonlyArray:WR,record:WC,recursion:Wh,refinement:WV,strict:Wk,string:Po,success:ev,taggedUnion:WK,tuple:function(e,t){void 0===t&&(t="[".concat(e.map(function(e){return e.name}).join(", "),"]"));var n=e.length;return new W_(t,function(t){return Pp.is(t)&&t.length===n&&e.every(function(e,n){return e.is(t[n])})},function(t,r){var i=Pp.validate(t,r);if(f7(i))return i;for(var o=i.right,a=o.length>n?o.slice(0,n):o,u=[],s=0;s<n;s++){var l=o[s],c=e[s],d=c.validate(l,BP(r,String(s),c,l));if(f7(d))BW(u,d.left);else{var f=d.right;f!==l&&(a===o&&(a=o.slice()),a[s]=f)}}return u.length>0?ey(u):ev(a)},Bq(e)?BL:function(t){return e.map(function(e,n){return e.encode(t[n])})},e)},type:Wv,undefined:B8,union:Ww,unknown:Pr,void:Pt,voidType:Pt},Symbol.toStringTag,{value:"Module"})),WJ=R(WZ);var WG={};Object.defineProperty(WG,"__esModule",{value:!0}),WG.ContentPath=void 0,WG.ContentPath={serialize:e=>e.map(e=>e.key).join("::"),current:e=>e[e.length-1],append:(e,t)=>e+"::"+t,make:e=>e.reduce((e,{key:t,type:n})=>t?e.concat({key:t,type:n}):e,[])};var W$={},WX={};Object.defineProperty(WX,"__esModule",{value:!0}),WX.getAssetOrThrow=void 0;let W0=e=>t=>{let n=e[t];if(!n)throw Error(`Missing asset with id '${t}'!`);return n};WX.getAssetOrThrow=W0;var W1={};Object.defineProperty(W1,"__esModule",{value:!0}),W1.getEmbedOrThrow=void 0;let W2=e=>t=>{let n=e[t];if(!n)throw Error(`Missing embed with url '${t}'`);return n};W1.getEmbedOrThrow=W2;var W6={},W5={};let W3=R(ec);function W9(e,t,n){return void 0===n&&(n=e.name),new BK(n,e.is,e.validate,function(n){return t(e.encode(n))})}let W4=Object.freeze(Object.defineProperty({__proto__:null,mapOutput:W9},Symbol.toStringTag,{value:"Module"}));var W7,W8,De,Dt=WV(Po,W8=function(e){return e.length>0},"NonEmptyString");function Dn(e,t){void 0===t&&(t="NonEmptyArray<"+e.name+">");var n=Wg(e);return new BK(t,function(e){return n.is(e)&&rb(e)},function(e,t){return eu(n.validate(e,t),fz(function(n){var r=rM(n);return dx(r)?BU(e,t):ev(r.value)}))},function(e){return n.encode(e)})}function Dr(e,t,n){void 0===n&&(n="Set<"+e.name+">");var r=Wg(e),i=ER(t),o=EC(t);return new BK(n,function(t){return t instanceof Set&&RL(e.is)(t)},function(e,t){return eu(r.validate(e,t),fz(function(n){var r=o(n);return r.size!==n.length?BU(e,t):ev(r)}))},function(e){return r.encode(i(e))})}function Di(e,t){return new BK(e,t,function(e,n){return t(e)?ev(e):BU(e,n)},BL)}var Do=Di("Date",function(e){return e instanceof Date}),Da=function(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))},Du=function(e,t){return{get:e,reverseGet:t}},Ds=function(e){return Df(e.get,en(e.reverseGet,G))},Dl=function(e){return DS(en(e.get,eh),e.reverseGet)},Dc=function(e){return DO(en(e.get,eh),en(e.reverseGet,G))},Dd=function(e){return Dj(function(t){return function(n){return function(r){return t.map(n(e.get(r)),function(t){return e.reverseGet(t)})}}})},Df=function(e,t){return{get:e,set:t}},Dp=function(e){return DO(en(e.get,eh),e.set)},DA=function(e){return Dj(function(t){return function(n){return function(r){return t.map(n(e.get(r)),function(t){return e.set(t)(r)})}}})},Dh=function(e){return function(t){return Df(function(n){return e.get(t.get(n))},function(n){return function(r){return t.set(e.set(n)(t.get(r)))(r)}})}},Dm=function(e){return function(t){return DS(en(t.getOption,cX(e.getOption)),en(e.reverseGet,t.reverseGet))}},Dg=function(e){return function(t){return DM(Dw(e))(Dp(t))}},Dy=function(){return Df(J,G)},Dv=function(e){return function(t){return Df(function(n){return t.get(n)[e]},function(n){return function(r){var i,o=t.get(r);return n===o[e]?r:t.set(Object.assign({},o,((i={})[e]=n,i)))(r)}})}},Dx=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t){return Df(function(n){for(var r=t.get(n),i={},o=0;o<e.length;o++){var a=e[o];i[a]=r[a]}return i},function(n){return function(r){for(var i=t.get(r),o=0;o<e.length;o++){var a=e[o];if(n[a]!==i[a])return t.set(Object.assign({},i,n))(r)}return r}})}},Db=function(e){return function(t){return Df(function(n){return t.get(n)[e]},function(n){return function(r){var i=t.get(r);if(n===i[e])return r;var o=i.slice();return o[e]=n,t.set(o)(r)}})}},DC=function(e){return function(t){var n;return eu(t,Dh(({at:n=function(e){return Df(function(t){return On(e,t)},db(function(){return T7(e)},function(t){return T9(e,t)}))}}).at(e)))}},DS=function(e,t){return{getOption:e,reverseGet:t}},Dw=function(e){return DO(e.getOption,function(t){return D_(t)(e)})},DI=function(e){return Dj(function(t){return function(n){return function(r){return eu(e.getOption(r),db(function(){return t.of(r)},function(i){return t.map(n(i),function(t){return D_(t)(e)(r)})}))}}})},D_=function(e){var t;return t=function(){return e},function(e){var n,r,i=(n=e,function(e){return eu(n.getOption(e),cY(function(r){var i=t(r);return i===r?e:n.reverseGet(i)}))});return function(e){return eu(i(e),dC(function(){return e}))}}},DT=function(e){return DS(c_(e),J)},DO=function(e,t){return{getOption:e,set:t}},DR=function(e){return Dj(function(t){return function(n){return function(r){return eu(e.getOption(r),db(function(){return t.of(r)},function(i){return t.map(n(i),function(t){return e.set(t)(r)})}))}}})},Dk=function(e){return function(t){return function(n){return eu(t.getOption(n),cY(function(r){var i=e(r);return i===r?n:t.set(i)(n)}))}}},DE=function(e){return function(t){var n=Dk(e)(t);return function(e){return eu(n(e),dC(function(){return e}))}}},DM=function(e){return function(t){return DO(en(t.getOption,cX(e.getOption)),function(n){return DE(e.set(n))(t)})}},DF=function(e,t,n){if(n[e]===t)return n;var r=Da([n[0]],n.slice(1),!0);return r[e]=t,r},Dj=function(e){return{modifyF:e}};function DU(e){return function(t){return Dj(function(n){return function(r){return t.modifyF(n)(e.modifyF(n)(r))}})}}var DK={URI:"Identity",map:function(e,t){return t(e)},of:J,ap:function(e,t){return e(t)}},DL=function(e){return{index:e}},DB=en(Ds,Dh),DP=function(e){return en(Dp,DM(e))},DW=function(e){return en(DA,DU(e))},DD=function(e){return function(t){return function(n){var r=t.get(n),i=e(r);return r===i?n:t.set(i)(n)}}},DN=function(e){return Dg(DS(dE,J))(e)},Dq=function(e){var t;return en(Dp,function(t){return eu(t,DM(DL(function(e){return DO(function(t){return oF(e,t)},function(t){return function(n){return eu(oF(e,n),db(function(){return n},function(){return uE(e,t,n)}))}})}).index(e)))})},DQ=function(e){var t;return en(Dp,function(t){return eu(t,DM(DL(function(e){return DO(function(t){return oF(e,t)},function(t){return function(n){return eu(oF(e,n),db(function(){return n},function(){return DF(e,t,n)}))}})}).index(e)))})},DV=function(e){var t;return en(Dp,function(t){return eu(t,DM(DL(function(e){return DO(function(t){return On(e,t)},function(t){return function(n){return n[e]===t||dx(On(e,n))?n:T9(e,t)(n)}})}).index(e)))})},Dz=Dg(DS(J,eh)),DY=Dg(DS(cO,ev)),DH=Dg(DS(function(e){return f7(e)?eh(e.left):eA},ey)),DZ=function(e,t){return function(n){return DJ(n,e,t)}},DJ=function(e,t,n){return Df(en(e.get,t),en(n,e.set))},DG="monocle-ts/Lens",D$={URI:DG,compose:function(e,t){return Dh(e)(t)}},DX={URI:DG,compose:D$.compose,id:Dy};let D0=Object.freeze(Object.defineProperty({__proto__:null,Category:DX,Invariant:{URI:DG,imap:DJ},Semigroupoid:D$,URI:DG,asOptional:Dp,asTraversal:DA,atKey:DC,component:Db,compose:Dh,composeIso:DB,composeLens:Dh,composeOptional:DP,composePrism:Dg,composeTraversal:DW,filter:function(e){return Dg(DT(e))},findFirst:function(e){var t;return DP(DO(oQ(e),function(t){return function(n){return eu(oq(e)(n),db(function(){return n},function(e){return uE(e,t,n)}))}}))},findFirstNonEmpty:function(e){var t;return DP(DO(oQ(e),function(t){return function(n){return eu(oq(e)(n),db(function(){return n},function(e){return DF(e,t,n)}))}}))},fromNullable:DN,id:Dy,imap:DZ,index:Dq,indexNonEmpty:DQ,key:DV,left:DH,lens:Df,modify:DD,modifyF:function(e){return function(t){return function(n){return function(r){return eu(n.get(r),t,function(t){return e.map(t,function(e){return n.set(e)(r)})})}}}},prop:Dv,props:Dx,right:DY,some:Dz,traverse:function(e){var t,n;return en(DA,DU(Dj(function(t){var n,r="Identity"===t.URI?e.map:e.traverse(t);return function(e){return function(t){return r(t,e)}}})))}},Symbol.toStringTag,{value:"Module"}));var D1=function(e){return function(t){return t.modifyF(DK)(e)}},D2=function(e){return new D7(e.get,e.reverseGet)},D6=function(e){return new D8(e.get,e.set)},D5=function(e){return new Ne(e.getOption,e.reverseGet)},D3=function(e){return new Nn(e.getOption,e.set)},D9=function(e){return new Nr(e.modifyF)},D4=function(e,t,n){var r;return n===e[t]?e:Object.assign({},e,((r={})[t]=n,r))},D7=function(){function e(e,t){this.get=e,this.reverseGet=t,this._tag="Iso",this.unwrap=this.get,this.to=this.get,this.wrap=this.reverseGet,this.from=this.reverseGet}return e.prototype.reverse=function(){var e;return D2(Du(this.reverseGet,this.get))},e.prototype.modify=function(e){var t,n;return n=this,function(t){return n.reverseGet(e(n.get(t)))}},e.prototype.asLens=function(){return D6(Ds(this))},e.prototype.asPrism=function(){return D5(Dl(this))},e.prototype.asOptional=function(){return D3(Dc(this))},e.prototype.asTraversal=function(){return D9(Dd(this))},e.prototype.asFold=function(){var e=this;return new No(function(){return function(t){return function(n){return t(e.get(n))}}})},e.prototype.asGetter=function(){var e=this;return new Ni(function(t){return e.get(t)})},e.prototype.asSetter=function(){var e=this;return new Na(function(t){return e.modify(t)})},e.prototype.compose=function(e){var t,n;return D2((n=this,Du(en(n.get,e.get),en(e.reverseGet,n.reverseGet))))},e.prototype.composeIso=function(e){return this.compose(e)},e.prototype.composeLens=function(e){return D6(eu(this,Ds,Dh(e)))},e.prototype.composePrism=function(e){return D5(eu(this,Dl,Dm(e)))},e.prototype.composeOptional=function(e){return D3(eu(this,Dc,DM(e)))},e.prototype.composeTraversal=function(e){return D9(eu(this,Dd,DU(e)))},e.prototype.composeFold=function(e){return this.asFold().compose(e)},e.prototype.composeGetter=function(e){return this.asGetter().compose(e)},e.prototype.composeSetter=function(e){return this.asSetter().compose(e)},e}(),D8=function(){function e(e,t){this.get=e,this.set=t,this._tag="Lens"}return e.fromPath=function(){var t=e.fromProp();return function(e){var n=t(e[0]);return e.slice(1).reduce(function(e,n){return e.compose(t(n))},n)}},e.fromProp=function(){return function(e){return D6(eu(Dy(),Dv(e)))}},e.fromProps=function(){return function(e){return D6(eu(Dy(),Dx.apply(D0,e)))}},e.fromNullableProp=function(){return function(t,n){return new e(function(e){var r=dE(e[t]);return dx(r)?n:r.value},function(e){return function(n){return D4(n,t,e)}})}},e.prototype.modify=function(e){return DD(e)(this)},e.prototype.asOptional=function(){return D3(Dp(this))},e.prototype.asTraversal=function(){return D9(DA(this))},e.prototype.asSetter=function(){var e=this;return new Na(function(t){return e.modify(t)})},e.prototype.asGetter=function(){var e=this;return new Ni(function(t){return e.get(t)})},e.prototype.asFold=function(){var e=this;return new No(function(){return function(t){return function(n){return t(e.get(n))}}})},e.prototype.compose=function(e){return D6(Dh(e)(this))},e.prototype.composeLens=function(e){return this.compose(e)},e.prototype.composeGetter=function(e){return this.asGetter().compose(e)},e.prototype.composeFold=function(e){return this.asFold().compose(e)},e.prototype.composeOptional=function(e){return D3(eu(this,Dp,DM(e)))},e.prototype.composeTraversal=function(e){return D9(eu(this,DA,DU(e)))},e.prototype.composeSetter=function(e){return this.asSetter().compose(e)},e.prototype.composeIso=function(e){return D6(eu(this,Dh(eu(e,Ds))))},e.prototype.composePrism=function(e){return D3(Dg(e)(this))},e}(),Ne=function(){function e(e,t){this.getOption=e,this.reverseGet=t,this._tag="Prism"}return e.fromPredicate=function(e){return D5(DT(e))},e.some=function(){return Nt},e.prototype.modify=function(e){var t=this;return function(n){var r=t.modifyOption(e)(n);return dx(r)?n:r.value}},e.prototype.modifyOption=function(e){var t=this;return function(n){return dH.map(t.getOption(n),function(r){var i=e(r);return i===r?n:t.reverseGet(i)})}},e.prototype.set=function(e){return this.modify(function(){return e})},e.prototype.asOptional=function(){return D3(Dw(this))},e.prototype.asTraversal=function(){return D9(DI(this))},e.prototype.asSetter=function(){var e=this;return new Na(function(t){return e.modify(t)})},e.prototype.asFold=function(){var e=this;return new No(function(t){return function(n){return function(r){var i=e.getOption(r);return dx(i)?t.empty:n(i.value)}}})},e.prototype.compose=function(e){return D5(Dm(e)(this))},e.prototype.composePrism=function(e){return this.compose(e)},e.prototype.composeOptional=function(e){return D3(eu(this,Dw,DM(e)))},e.prototype.composeTraversal=function(e){return D9(eu(this,DI,DU(e)))},e.prototype.composeFold=function(e){return this.asFold().compose(e)},e.prototype.composeSetter=function(e){return this.asSetter().compose(e)},e.prototype.composeIso=function(e){return D5(eu(this,Dm(eu(e,Dl))))},e.prototype.composeLens=function(e){var t;return D3((t=e,function(e){return DM(Dp(t))(Dw(e))})(this))},e.prototype.composeGetter=function(e){return this.asFold().compose(e.asFold())},e}(),Nt=new Ne(J,eh),Nn=function(){function e(e,t){this.getOption=e,this.set=t,this._tag="Optional"}return e.fromPath=function(){var t=e.fromNullableProp();return function(e){var n=t(e[0]);return e.slice(1).reduce(function(e,n){return e.compose(t(n))},n)}},e.fromNullableProp=function(){return function(t){return new e(function(e){return dE(e[t])},function(e){return function(n){return null==n[t]?n:D4(n,t,e)}})}},e.fromOptionProp=function(){var e=D8.fromProp();return function(t){return e(t).composePrism(Nt)}},e.prototype.modify=function(e){return DE(e)(this)},e.prototype.modifyOption=function(e){return Dk(e)(this)},e.prototype.asTraversal=function(){return D9(DR(this))},e.prototype.asFold=function(){var e=this;return new No(function(t){return function(n){return function(r){var i=e.getOption(r);return dx(i)?t.empty:n(i.value)}}})},e.prototype.asSetter=function(){var e=this;return new Na(function(t){return e.modify(t)})},e.prototype.compose=function(e){return D3(DM(e)(this))},e.prototype.composeOptional=function(e){return this.compose(e)},e.prototype.composeTraversal=function(e){return D9(eu(this,DR,DU(e)))},e.prototype.composeFold=function(e){return this.asFold().compose(e)},e.prototype.composeSetter=function(e){return this.asSetter().compose(e)},e.prototype.composeLens=function(e){return D3(eu(this,DM(eu(e,Dp))))},e.prototype.composePrism=function(e){return D3(eu(this,DM(eu(e,Dw))))},e.prototype.composeIso=function(e){return D3(eu(this,DM(eu(e,Dc))))},e.prototype.composeGetter=function(e){return this.asFold().compose(e.asFold())},e}(),Nr=function(){function e(e){this.modifyF=e,this._tag="Traversal"}return e.prototype.modify=function(e){return D1(e)(this)},e.prototype.set=function(e){var t;return D1(function(){return e})(this)},e.prototype.filter=function(e){var t;return D9(DU(DI(DT(e)))(this))},e.prototype.asFold=function(){var e=this;return new No(function(t){return function(n){return e.modifyF(d8(t))(function(e){return J(n(e))})}})},e.prototype.asSetter=function(){var e=this;return new Na(function(t){return e.modify(t)})},e.prototype.compose=function(e){return D9(DU(e)(this))},e.prototype.composeTraversal=function(e){return this.compose(e)},e.prototype.composeFold=function(e){return this.asFold().compose(e)},e.prototype.composeSetter=function(e){return this.asSetter().compose(e)},e.prototype.composeOptional=function(e){return this.compose(e.asTraversal())},e.prototype.composeLens=function(e){return D9(eu(this,DU(eu(e,DA))))},e.prototype.composePrism=function(e){return D9(eu(this,DU(eu(e,DI))))},e.prototype.composeIso=function(e){return D9(eu(this,DU(eu(e,Dd))))},e.prototype.composeGetter=function(e){return this.asFold().compose(e.asFold())},e}(),Ni=function(){function e(e){this.get=e,this._tag="Getter"}return e.prototype.asFold=function(){var e=this;return new No(function(){return function(t){return function(n){return t(e.get(n))}}})},e.prototype.compose=function(t){var n=this;return new e(function(e){return t.get(n.get(e))})},e.prototype.composeGetter=function(e){return this.compose(e)},e.prototype.composeFold=function(e){return this.asFold().compose(e)},e.prototype.composeLens=function(e){return this.compose(e.asGetter())},e.prototype.composeIso=function(e){return this.compose(e.asGetter())},e.prototype.composeTraversal=function(e){return this.asFold().compose(e.asFold())},e.prototype.composeOptional=function(e){return this.asFold().compose(e.asFold())},e.prototype.composePrism=function(e){return this.asFold().compose(e.asFold())},e}(),No=function(){function e(e){this.foldMap=e,this._tag="Fold",this.getAll=e(lg())(rH),this.exist=e(bO),this.all=e(bT),this.foldMapFirst=e(dG())}return e.prototype.compose=function(t){var n=this;return new e(function(e){return function(r){return n.foldMap(e)(t.foldMap(e)(r))}})},e.prototype.composeFold=function(e){return this.compose(e)},e.prototype.composeGetter=function(e){return this.compose(e.asFold())},e.prototype.composeTraversal=function(e){return this.compose(e.asFold())},e.prototype.composeOptional=function(e){return this.compose(e.asFold())},e.prototype.composeLens=function(e){return this.compose(e.asFold())},e.prototype.composePrism=function(e){return this.compose(e.asFold())},e.prototype.composeIso=function(e){return this.compose(e.asFold())},e.prototype.find=function(e){return this.foldMapFirst(c_(e))},e.prototype.headOption=function(e){return this.find(function(){return!0})(e)},e}(),Na=function(){function e(e){this.modify=e,this._tag="Setter"}return e.prototype.set=function(e){return this.modify(G(e))},e.prototype.compose=function(t){var n=this;return new e(function(e){return n.modify(t.modify(e))})},e.prototype.composeSetter=function(e){return this.compose(e)},e.prototype.composeTraversal=function(e){return this.compose(e.asSetter())},e.prototype.composeOptional=function(e){return this.compose(e.asSetter())},e.prototype.composeLens=function(e){return this.compose(e.asSetter())},e.prototype.composePrism=function(e){return this.compose(e.asSetter())},e.prototype.composeIso=function(e){return this.compose(e.asSetter())},e}(),Nu=new D7(J,J),Ns=Wk({_tag:Pg("None")}),Nl=Pg("Some");function Nc(e,t){return void 0===t&&(t="Option<"+e.name+">"),Ww([Ns,Wk({_tag:Nl,value:e},"Some<"+e.name+">")],t)}var Nd=new BK("DateFromISOString",function(e){return e instanceof Date},function(e,t){return eu(Po.validate(e,t),fz(function(n){var r=new Date(n);return isNaN(r.getTime())?BU(e,t):ev(r)}))},function(e){return e.toISOString()});function Nf(e){var t=Object.create(Object.getPrototypeOf(e));return Object.assign(t,e),t}var Np=new BK("DateFromNumber",function(e){return e instanceof Date},function(e,t){return eu(Pu.validate(e,t),fz(function(n){var r=new Date(n);return isNaN(r.getTime())?BU(e,t):ev(r)}))},function(e){return e.getTime()});function NA(e,t,n){void 0===n&&(n=e.name);var r=Nf(e);return r.validate=t,r.decode=function(e){return t(e,WB(r))},r.name=n,r}var Nh,Nm,Ng,Ny=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i,Nv=WV(Po,Nm=function(e){return Ny.test(e)},"UUID"),Nx=new BK("BooleanFromString",Pd.is,function(e,t){return eu(Po.validate(e,t),fz(function(n){return"true"===n?ev(!0):"false"===n?ev(!1):BU(e,t)}))},String);function Nb(e){switch(e._tag){case"InterfaceType":return e.props;case"ExactType":return Nb(e.type)}}var NC=D8.fromProp(),NS=Di("RegExp",function(e){return"[object RegExp]"===Object.prototype.toString.call(e)}),Nw=new BK("DateFromUnixTime",function(e){return e instanceof Date},function(e,t){return eu(Wp.validate(e,t),fz(function(n){var r=new Date(1e3*n);return isNaN(r.getTime())?BU(e,t):ev(r)}))},function(e){return Math.floor(e.getTime()/1e3)}),NI=new BK("NumberFromString",Pu.is,function(e,t){return eu(Po.validate(e,t),fz(function(n){var r=+n;return isNaN(r)||""===n.trim()?BU(e,t):ev(r)}))},String),N_=new BK("IntFromString",Wp.is,function(e,t){return eu(NI.validate(e,t),fz(function(n){return Wp.is(n)?ev(n):BU(e,t)}))},NI.encode),NT=Wh("JsonArray",function(){return WR(NR)}),NO=Wh("JsonRecord",function(){return WC(Po,NR)}),NR=Ww([Pd,Pu,Po,B4,NT,NO],"Json"),Nk=new BK("JsonFromString",NR.is,function(e,t){try{return ev(JSON.parse(e))}catch{return BU(e,t)}},function(e){return JSON.stringify(e)}),NE=Pg("Left"),NM=Pg("Right"),NF=new BK("BigIntFromString",function(e){return"bigint"==typeof e},function(e,t){return eu(Po.validate(e,t),fz(function(n){if(!Dt.is(n.trim()))return BU(e,t);try{return ev(BigInt(n))}catch{return BU(e,t)}}))},String),Nj=new BK("BooleanFromNumber",Pd.is,function(e,t){return eu(Pu.validate(e,t),fB(function(e){return 0!==e}))},Number);let NU=Object.freeze(Object.defineProperty({__proto__:null,BigIntFromString:NF,BooleanFromNumber:Nj,BooleanFromString:Nx,DateFromISOString:Nd,DateFromNumber:Np,DateFromUnixTime:Nw,IntFromString:N_,Json:NR,JsonArray:NT,JsonFromString:Nk,JsonRecord:NO,NonEmptyString:Dt,NumberFromString:NI,UUID:Nv,clone:Nf,date:Do,either:function(e,t,n){return void 0===n&&(n="Either<"+e.name+", "+t.name+">"),Ww([Wk({_tag:NE,left:e},"Left<"+e.name+">"),Wk({_tag:NM,right:t},"Right<"+e.name+">")],n)},fromNewtype:function(e,t){return void 0===t&&(t="fromNewtype("+e.name+")"),new BK(t,function(t){return e.is(t)},function(t,n){return eu(e.validate(t,n),fB(Nu.wrap))},function(t){return e.encode(Nu.unwrap(t))})},fromNullable:function(e,t,n){return void 0===n&&(n="fromNullable("+e.name+")"),NA(e,function(n,r){return null==n?ev(t):e.validate(n,r)},n)},fromRefinement:Di,getLenses:function(e){var t={};for(var n in Nb(e))t[n]=NC(n);return t},mapOutput:W9,nonEmptyArray:Dn,option:Nc,optionFromNullable:function(e,t){return void 0===t&&(t="Option<"+e.name+">"),new BK(t,Nc(e).is,function(t,n){return null==t?ev(eA):eu(e.validate(t,n),fB(eh))},function(t){return dK(eu(t,cY(e.encode)))})},readonlyNonEmptyArray:function(e,t){return void 0===t&&(t="ReadonlyNonEmptyArray<"+e.name+">"),Dn(e,t)},readonlySetFromArray:function(e,t,n){return void 0===n&&(n="ReadonlySet<"+e.name+">"),Dr(e,t,n)},regexp:NS,setFromArray:Dr,withEncode:function(e,t,n){return void 0===n&&(n=e.name),new BK(n,e.is,e.validate,t)},withFallback:function(e,t,n){return void 0===n&&(n="withFallback("+e.name+")"),NA(e,function(n,r){return pf(function(){return ev(t)})(e.validate(n,r))},n)},withMessage:function(e,t){return NA(e,function(n,r){return f1(function(){return[{value:n,context:r,message:t(n,r),actual:n}]})(e.validate(n,r))})},withValidate:NA},Symbol.toStringTag,{value:"Module"})),NK=R(NU),NL=R(W4);Object.defineProperty(W5,"__esModule",{value:!0}),W5.withCustomError=W5.addType=W5.isEmpty=W5.objectToMap=W5.grouped=W5.formatDate=W5.formatDateTime=W5.filterDouble=W5.refineType=W5.nullable=void 0;let NB=(0,P.__importStar)(WJ);W5.nullable=function(e){return NB.union([e,NB.null,NB.undefined])},W5.refineType=function(e,t,n){return new NB.Type(t,e.is,(t,r)=>(0,W3.pipe)(e.validate(t,r),LW.either.chain(e=>n(e)?NB.success(e):NB.failure(t,r))),e.encode)},W5.filterDouble=function(e){if(""===e)return null;let t=Number(e);return Number.isNaN(t)?null:t},W5.formatDateTime=function(e){return e.toISOString().replace(/\.\d{3}Z$/,"+0000")},W5.formatDate=function(e){return e.toISOString().replace(/T.*/,"")},W5.grouped=function(e,t){return e.reduce((e,n,r)=>(r%t==0?e.push([n]):e[Math.floor(r/t)].push(n),e),[])},W5.objectToMap=function(e){return new Map(Object.entries(e))},W5.isEmpty=function(e){for(let t in e)return!1;return!0},W5.addType=function(e,t){return(0,NL.mapOutput)(e,e=>({...e,__TYPE__:t}))},W5.withCustomError=function(e,t){return(0,NK.withValidate)(e,(n,r)=>LW.either.mapLeft(e=>e.find(e=>e.message)?e:[{value:n,context:r,message:t(n,r),actual:n}])(e.validate(n,r)))},Object.defineProperty(W6,"__esModule",{value:!0}),W6.WidgetKey=void 0;let NP=(0,P.__importStar)(WJ),NW=RegExp("^[^<>]+$");W6.WidgetKey=(0,W5.refineType)(NP.string,"WidgetKey",e=>0===e.length||NW.test(e)),Object.defineProperty(q2=W$,"__esModule",{value:!0}),(0,P.__exportStar)(WX,q2),(0,P.__exportStar)(W1,q2),(0,P.__exportStar)(W6,q2);var ND={},NN={},Nq={},NQ={},NV={};Object.defineProperty(NV,"__esModule",{value:!0}),NV.clone=void 0,NV.clone=function(e){var t=Object.create(Object.getPrototypeOf(e));return Object.assign(t,e),t};var Nz=O&&O.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),NY=O&&O.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),NH=O&&O.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&Nz(t,e,n);return NY(t,e),t};Object.defineProperty(NQ,"__esModule",{value:!0}),NQ.withValidate=void 0;var NZ=NH(WJ);NQ.withValidate=function(e,t,n){void 0===n&&(n=e.name);var r=NV.clone(e);return r.validate=t,r.decode=function(e){return t(e,NZ.getDefaultContext(r))},r.name=n,r};var NJ=O&&O.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),NG=O&&O.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),N$=O&&O.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&NJ(t,e,n);return NG(t,e),t};Object.defineProperty(Nq,"__esModule",{value:!0}),Nq.withFallback=void 0;var NX=N$(WJ);Nq.withFallback=function(e,t,n){return void 0===n&&(n="withFallback("+e.name+")"),NQ.withValidate(e,function(n,r){return LD.orElse(function(){return NX.success(t)})(e.validate(n,r))},n)};var N0={},N1={};Object.defineProperty(N1,"__esModule",{value:!0}),N1.EmptyArray=N1.EmptyObject=N1.Boolean=N1.NumberOrNull=N1.Number=N1.StringOrNull=N1.String=void 0;let N2=(0,P.__importStar)(WJ);N1.String=(0,W5.withCustomError)(N2.string,()=>"The value must be a string"),N1.StringOrNull=(0,W5.withCustomError)(N2.union([N2.string,N2.null]),()=>"The value must be a string or null"),N1.Number=(0,W5.withCustomError)(N2.number,()=>"The value must be a number"),N1.NumberOrNull=(0,W5.withCustomError)(N2.union([N2.number,N2.null]),()=>"The value must be a number or null"),N1.Boolean=(0,W5.withCustomError)(N2.boolean,()=>"The value must be a boolean"),N1.EmptyObject=N2.UnknownRecord.pipe(new N2.Type("emptyObject",e=>N2.UnknownRecord.is(e),(e,t)=>Object.keys(e).length>0?N2.failure(e,t,"The object is not empty."):N2.success({}),N2.identity)),N1.EmptyArray=new N2.Type("emptyArray",e=>N2.UnknownArray.is(e)&&0===e.length,(e,t)=>(0,LQ.pipe)(N2.UnknownArray.decode(e),LW.either.chain(n=>n.length>0?N2.failure(e,t,"The array is not empty."):N2.success([]))),()=>[]);var N6={};let N5=R(pj);var N3={};Object.defineProperty(N3,"__esModule",{value:!0});let N9=(0,P.__importStar)(WJ);N3.default=new N9.Type("dateFromStringOrNumber",e=>e instanceof Date,(e,t)=>(0,W3.pipe)(N9.union([N9.number,N9.string]).validate(e,t),(0,N5.chain)(n=>{let r=new Date(n);return isNaN(r.getTime())?N9.failure(e,t):N9.success(r)})),e=>e);var N4={};Object.defineProperty(N4,"__esModule",{value:!0});let N7=(0,P.__importStar)(WJ);N4.default=new N7.Type("dateFromTsMs",e=>e instanceof Date,(e,t)=>(0,W3.pipe)(N7.number.validate(e,t),(0,N5.chain)(n=>{let r=new Date(n);return isNaN(r.getTime())?N7.failure(e,t):N7.success(r)})),e=>e.getTime());var N8={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.EmptyArrayOrElse=e.EmptyObjectOrElse=e.NullOrElse=e.DefaultOrElse=void 0;let t=(0,P.__importStar)(WJ),n=e=>n=>new t.Type(`DefaultOrElse<${e.name}, ${n.name}>`,e=>null===e||n.is(e),(r,i)=>(0,LD.isRight)(e.validate(r,i))?t.success(null):n.validate(r,i),e=>e?n.encode(e):void 0);e.DefaultOrElse=n;let r=n=>(0,e.DefaultOrElse)(t.null)(n);e.NullOrElse=r;let i=t=>(0,e.DefaultOrElse)(N1.EmptyObject)(t);e.EmptyObjectOrElse=i;let o=t=>(0,e.DefaultOrElse)(N1.EmptyArray)(t);e.EmptyArrayOrElse=o}(N8);var qe={};Object.defineProperty(qe,"__esModule",{value:!0});let qt=(0,P.__importStar)(WJ);qe.default=new qt.Type("IntFromNumber",qt.Int.is,(e,t)=>(0,W3.pipe)(qt.number.validate(e,t),(0,N5.chain)(e=>qt.Int.is(e)?qt.success(e):qt.success(Math.round(e)))),qt.Int.encode);var qn={};Object.defineProperty(qn,"__esModule",{value:!0});let qr=(0,P.__importStar)(WJ),qi=/^([0-9]+)px$/;qn.default=new qr.Type("IntFromPixels",qr.Int.is,(e,t)=>(0,W3.pipe)(qr.string.validate(e,t),(0,N5.chain)(n=>{try{let r=n.match(qi);if(!r)return qr.failure(e,t);let i=parseInt(r[1]);return qr.success(i)}catch{return qr.failure(e,t)}})),String);var qo={};Object.defineProperty(qo,"__esModule",{value:!0});let qa=(0,P.__importStar)(WJ);qo.default=(0,W5.withCustomError)((0,W5.refineType)(qa.string,"nonEmptyString",e=>e.trim().length>0),()=>"The value must be a non-empty string");var qu={},qs={};Object.defineProperty(qs,"__esModule",{value:!0});let ql=(0,P.__importStar)(WJ);qs.default=(0,W5.nullable)(ql.string),Object.defineProperty(qu,"__esModule",{value:!0});let qc=(0,P.__importDefault)(qs);qu.default=new WJ.Type("nonEmptyStringOrNull",e=>"string"==typeof e||null===e,(e,t)=>(0,W3.pipe)(qc.default.validate(e,t),(0,N5.chain)(e=>"string"==typeof e&&e.length>0?(0,WJ.success)(e):(0,WJ.success)(null))),e=>e);var qd={};Object.defineProperty(qd,"__esModule",{value:!0});let qf=(0,P.__importStar)(WJ);qd.default=(0,W5.nullable)(qf.number);var qp={};Object.defineProperty(qp,"__esModule",{value:!0});let qA=(0,P.__importStar)(WJ);qp.default=(e,t,n)=>N1.Number.pipe(new qA.Type("numberInRange",e=>N1.Number.is(e),(r,i)=>r>t||r<e?qA.failure(r,i,`${n} must be a number between ${e} and ${t}`):qA.success(r),qA.identity));var qh={};Object.defineProperty(qh,"__esModule",{value:!0});let qm=(0,P.__importStar)(WJ);qh.default=new qm.Type("StringFromInt",qm.string.is,(e,t)=>(0,W3.pipe)(qm.boolean.validate(e,t),(0,N5.chain)(e=>qm.success(e.toString()))),e=>e);var qg={};Object.defineProperty(qg,"__esModule",{value:!0});let qy=(0,P.__importStar)(WJ);function qv(){var e,t;return QP||(QP=1,Object.defineProperty(e=N0,"__esModule",{value:!0}),e.StringOrNull=e.StringFromNumber=e.StringFromBoolean=e.NumberRange=e.NumberOrNull=e.NonEmptyStringOrNull=e.NonEmptyString=e.IntFromPixels=e.IntFromNumber=e.Function=e.DateFromTsMs=e.DateFromStringOrNumber=e.DateFromString=void 0,(0,P.__exportStar)(N1,e),t=function(){if(QB)return N6;QB=1,Object.defineProperty(N6,"__esModule",{value:!0});let e=(0,P.__importStar)(WJ),t=qv();return N6.default=new e.Type("dateFromString",e=>e instanceof Date,(n,r)=>(0,W3.pipe)(t.String.validate(n,r),(0,N5.chain)(t=>{let i=new Date(t);return isNaN(i.getTime())?e.failure(n,r):e.success(i)})),e=>e.toISOString()),N6}(),Object.defineProperty(e,"DateFromString",{enumerable:!0,get:function(){return(0,P.__importDefault)(t).default}}),Object.defineProperty(e,"DateFromStringOrNumber",{enumerable:!0,get:function(){return(0,P.__importDefault)(N3).default}}),Object.defineProperty(e,"DateFromTsMs",{enumerable:!0,get:function(){return(0,P.__importDefault)(N4).default}}),(0,P.__exportStar)(N8,e),e.Function=(0,P.__importStar)(W5),Object.defineProperty(e,"IntFromNumber",{enumerable:!0,get:function(){return(0,P.__importDefault)(qe).default}}),Object.defineProperty(e,"IntFromPixels",{enumerable:!0,get:function(){return(0,P.__importDefault)(qn).default}}),Object.defineProperty(e,"NonEmptyString",{enumerable:!0,get:function(){return(0,P.__importDefault)(qo).default}}),Object.defineProperty(e,"NonEmptyStringOrNull",{enumerable:!0,get:function(){return(0,P.__importDefault)(qu).default}}),Object.defineProperty(e,"NumberOrNull",{enumerable:!0,get:function(){return(0,P.__importDefault)(qd).default}}),Object.defineProperty(e,"NumberRange",{enumerable:!0,get:function(){return(0,P.__importDefault)(qp).default}}),Object.defineProperty(e,"StringFromBoolean",{enumerable:!0,get:function(){return(0,P.__importDefault)(qh).default}}),Object.defineProperty(e,"StringFromNumber",{enumerable:!0,get:function(){return(0,P.__importDefault)(qg).default}}),Object.defineProperty(e,"StringOrNull",{enumerable:!0,get:function(){return(0,P.__importDefault)(qs).default}})),N0}qg.default=new qy.Type("StringFromInt",qy.string.is,(e,t)=>(0,W3.pipe)(qy.number.validate(e,t),(0,N5.chain)(e=>qy.success(e.toString()))),e=>e);var qx={},qb={},qC={},qS={},qw={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.BooleanField=e.BooleanConfig=e.BooleanFieldType=void 0;let t=(0,P.__importStar)(WJ),n=qv();e.BooleanFieldType="Boolean",e.BooleanConfig=t.exact(t.partial({label:n.StringOrNull,default_value:t.boolean,placeholder_true:t.string,placeholder_false:t.string})),e.BooleanField=t.exact(t.intersection([t.type({type:t.literal(e.BooleanFieldType)}),t.partial({config:e.BooleanConfig})]))}(qw);var qI={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Color=e.ColorConfig=e.ColorFieldType=void 0;let t=(0,P.__importStar)(WJ),n=qv();e.ColorFieldType="Color",e.ColorConfig=t.exact(t.partial({label:n.StringOrNull,placeholder:t.string})),e.Color=t.exact(t.intersection([t.type({type:t.literal(e.ColorFieldType)}),t.partial({fieldset:n.StringOrNull,config:e.ColorConfig})]))}(qI);var q_={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Date=e.DateConfig=e.DateFieldType=void 0;let t=(0,P.__importStar)(WJ),n=qv();e.DateFieldType="Date",e.DateConfig=t.exact(t.partial({label:n.StringOrNull,placeholder:t.string,default:t.string})),e.Date=t.exact(t.intersection([t.type({type:t.literal(e.DateFieldType)}),t.partial({fieldset:n.StringOrNull,config:e.DateConfig})]))}(q_);var qT={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Embed=e.EmbedConfig=e.EmbedFieldType=void 0;let t=(0,P.__importStar)(WJ),n=qv();e.EmbedFieldType="Embed",e.EmbedConfig=t.exact(t.partial({label:n.StringOrNull,placeholder:t.string,useAsTitle:t.boolean})),e.Embed=t.exact(t.intersection([t.type({type:t.literal(e.EmbedFieldType)}),t.partial({fieldset:n.StringOrNull,config:e.EmbedConfig})]))}(qT);var qO={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.GeoPoint=e.GeoPointConfig=e.GeoPointFieldType=void 0;let t=(0,P.__importStar)(WJ),n=qv();e.GeoPointFieldType="GeoPoint",e.GeoPointConfig=t.exact(t.partial({label:n.StringOrNull})),e.GeoPoint=t.exact(t.intersection([t.type({type:t.literal(e.GeoPointFieldType)}),t.partial({fieldset:n.StringOrNull,config:e.GeoPointConfig})]))}(qO);var qR={},qk={},qE={},qM={},qF={};Object.defineProperty(qF,"__esModule",{value:!0}),qF.pipe=qF.pipeable=void 0,qF.pipeable=function(e){var t,n,r,i,o,a,u,s,l,c,d,f,p,A,h,m={};if("function"==typeof e.map){var g=function(t){return function(n){return e.map(n,t)}};m.map=g}if("function"==typeof e.contramap){var y=function(t){return function(n){return e.contramap(n,t)}};m.contramap=y}if("function"==typeof e.mapWithIndex){var v=function(t){return function(n){return e.mapWithIndex(n,t)}};m.mapWithIndex=v}if("function"==typeof e.ap){var x=function(t){return function(n){return e.ap(n,t)}},b=function(t){return function(n){return e.ap(e.map(n,function(e){return function(){return e}}),t)}};m.ap=x,m.apFirst=b,m.apSecond=function(t){return function(n){return e.ap(e.map(n,function(){return function(e){return e}}),t)}}}if("function"==typeof e.chain){var C=function(t){return function(n){return e.chain(n,t)}},S=function(t){return function(n){return e.chain(n,function(n){return e.map(t(n),function(){return n})})}},w=function(t){return e.chain(t,LQ.identity)};m.chain=C,m.chainFirst=S,m.flatten=w}if("function"==typeof e.bimap){var I=function(t,n){return function(r){return e.bimap(r,t,n)}},_=function(t){return function(n){return e.mapLeft(n,t)}};m.bimap=I,m.mapLeft=_}if("function"==typeof e.extend){var T=function(t){return function(n){return e.extend(n,t)}},O=function(t){return e.extend(t,LQ.identity)};m.extend=T,m.duplicate=O}if("function"==typeof e.reduce){var R=function(t,n){return function(r){return e.reduce(r,t,n)}},k=function(t){var n=e.foldMap(t);return function(e){return function(t){return n(t,e)}}},E=function(t,n){return function(r){return e.reduceRight(r,t,n)}};m.reduce=R,m.foldMap=k,m.reduceRight=E}if("function"==typeof e.reduceWithIndex){var M=function(t,n){return function(r){return e.reduceWithIndex(r,t,n)}},F=function(t){var n=e.foldMapWithIndex(t);return function(e){return function(t){return n(t,e)}}},j=function(t,n){return function(r){return e.reduceRightWithIndex(r,t,n)}};m.reduceWithIndex=M,m.foldMapWithIndex=F,m.reduceRightWithIndex=j}if("function"==typeof e.alt){var U=function(t){return function(n){return e.alt(n,t)}};m.alt=U}if("function"==typeof e.compact&&(m.compact=e.compact,m.separate=e.separate),"function"==typeof e.filter){var K=function(t){return function(n){return e.filter(n,t)}},L=function(t){return function(n){return e.filterMap(n,t)}},B=function(t){return function(n){return e.partition(n,t)}},P=function(t){return function(n){return e.partitionMap(n,t)}};m.filter=K,m.filterMap=L,m.partition=B,m.partitionMap=P}if("function"==typeof e.filterWithIndex){var W=function(t){return function(n){return e.filterWithIndex(n,t)}},D=function(t){return function(n){return e.filterMapWithIndex(n,t)}},N=function(t){return function(n){return e.partitionWithIndex(n,t)}},q=function(t){return function(n){return e.partitionMapWithIndex(n,t)}};m.filterWithIndex=W,m.filterMapWithIndex=D,m.partitionWithIndex=N,m.partitionMapWithIndex=q}if("function"==typeof e.promap){var Q=function(t,n){return function(r){return e.promap(r,t,n)}};m.promap=Q}if("function"==typeof e.compose){var V=function(t){return function(n){return e.compose(n,t)}};m.compose=V}if("function"==typeof e.throwError){var z=function(t){return function(n){return"None"===n._tag?e.throwError(t()):e.of(n.value)}},Y=function(t){return"Left"===t._tag?e.throwError(t.left):e.of(t.right)},H=function(t,n){return function(r){return t(r)?e.of(r):e.throwError(n(r))}},Z=function(t,n){return function(r){return e.chain(r,function(r){return t(r)?e.of(r):e.throwError(n(r))})}};m.fromOption=z,m.fromEither=Y,m.fromPredicate=H,m.filterOrElse=Z}return m},qF.pipe=LQ.pipe;var qj=O&&O.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),qU=O&&O.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),qK=O&&O.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&qj(t,e,n);return qU(t,e),t};Object.defineProperty(qM,"__esModule",{value:!0}),qM.NumberFromString=void 0;var qL=qK(WJ);qM.NumberFromString=new qL.Type("NumberFromString",qL.number.is,function(e,t){return qF.pipe(qL.string.validate(e,t),LD.chain(function(n){var r=+n;return isNaN(r)||""===n.trim()?qL.failure(e,t):qL.success(r)}))},String);var qB=O&&O.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),qP=O&&O.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),qW=O&&O.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&qB(t,e,n);return qP(t,e),t};Object.defineProperty(qE,"__esModule",{value:!0}),qE.IntFromString=void 0;var qD=qW(WJ);qE.IntFromString=new qD.Type("IntFromString",qD.Int.is,function(e,t){return qF.pipe(qM.NumberFromString.validate(e,t),LD.chain(function(n){return qD.Int.is(n)?qD.success(n):qD.failure(e,t)}))},qM.NumberFromString.encode),Object.defineProperty(qk,"__esModule",{value:!0});let qN=(0,P.__importStar)(WJ),qq=qv(),qQ=new qN.Type("SideConstraints",e=>!e||"number"==typeof e,(e,t)=>LD.either.chain(qN.union([qN.literal("auto"),qN.literal(""),qN.Int,qE.IntFromString,qq.IntFromNumber,qq.IntFromPixels,qN.null]).validate(e,t),e=>"auto"===e||""===e?qN.success(null):qN.success(e)),e=>e),qV=qN.partial({width:qQ,height:qQ});qk.default=qV,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Image=e.ImageConfig=e.Thumbnail=e.ImageFieldType=void 0;let t=(0,P.__importStar)(WJ),n=qv(),r=(0,P.__importDefault)(qk);e.ImageFieldType="Image",e.Thumbnail=t.exact(t.intersection([t.type({name:t.string}),r.default])),e.ImageConfig=t.exact(t.partial({label:n.StringOrNull,placeholder:t.string,constraint:r.default,thumbnails:t.readonlyArray(e.Thumbnail)})),e.Image=t.exact(t.intersection([t.type({type:t.literal(e.ImageFieldType)}),t.partial({fieldset:n.StringOrNull,config:e.ImageConfig})]))}(qR);var qz={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.IntegrationField=e.IntegrationFieldConfig=e.IntegrationFieldType=void 0;let t=(0,P.__importStar)(WJ),n=qv();e.IntegrationFieldType="IntegrationFields",e.IntegrationFieldConfig=t.exact(t.partial({label:n.StringOrNull,placeholder:t.string,catalog:t.string})),e.IntegrationField=t.exact(t.intersection([t.type({type:t.literal(e.IntegrationFieldType)}),t.partial({fieldset:n.StringOrNull,config:e.IntegrationFieldConfig})]))}(qz);var qY={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Link=e.LinkConfig=e.LinkFieldType=void 0;let t=(0,P.__importStar)(WJ),n=qv(),r=e=>{if(e instanceof Array&&e.reduce((e,t)=>e&&"string"==typeof t,!0))return t.success(e)},i=e=>{if("string"==typeof e)return t.success([e])},o=new t.Type("MasksArrayString",e=>e instanceof Array,(e,n)=>LD.either.chain(t.union([t.array(t.string),t.string]).validate(e,n),o=>r(o)||i(o)||t.failure(e,n)),e=>e);e.LinkFieldType="Link",e.LinkConfig=t.exact(t.partial({label:n.StringOrNull,useAsTitle:t.boolean,placeholder:t.string,select:(0,Nq.withFallback)(t.union([t.literal("media"),t.literal("document"),t.literal("web"),t.null]),null),customtypes:t.readonlyArray(t.string),masks:o,tags:o,allowTargetBlank:t.boolean})),e.Link=t.exact(t.intersection([t.type({type:t.literal(e.LinkFieldType)}),t.partial({fieldset:n.StringOrNull,config:e.LinkConfig})]))}(qY);var qH={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Number=e.NumberConfig=e.NumberFieldType=void 0;let t=(0,P.__importStar)(WJ),n=qv();e.NumberFieldType="Number",e.NumberConfig=t.exact(t.partial({label:n.StringOrNull,placeholder:t.string,min:t.union([t.number,qM.NumberFromString]),max:t.union([t.number,qM.NumberFromString]),step:t.union([t.number,qM.NumberFromString])})),e.Number=t.exact(t.intersection([t.type({type:t.literal(e.NumberFieldType)}),t.partial({fieldset:n.StringOrNull,config:e.NumberConfig})]))}(qH);var qZ={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Range=e.RangeConfig=e.RangeFieldType=void 0;let t=(0,P.__importStar)(WJ),n=qv();e.RangeFieldType="Range",e.RangeConfig=t.exact(t.partial({label:n.StringOrNull,placeholder:t.string,min:t.union([t.number,qM.NumberFromString]),max:t.union([t.number,qM.NumberFromString]),step:t.union([t.number,qM.NumberFromString])})),e.Range=t.exact(t.intersection([t.type({type:t.literal(e.RangeFieldType)}),t.partial({fieldset:n.StringOrNull,config:e.RangeConfig})]))}(qZ);var qJ={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.RichText=e.RichTextConfig=e.RichTextNodeTypeCodec=e.RichTextNodeType=e.DEFAULT_OPTION=e.RichTextFieldType=void 0;let t=(0,P.__importStar)(WJ),n=qv(),r=(0,P.__importDefault)(qk);e.RichTextFieldType="StructuredText",e.DEFAULT_OPTION="paragraph",e.RichTextNodeType={heading1:"heading1",heading2:"heading2",heading3:"heading3",heading4:"heading4",heading5:"heading5",heading6:"heading6",paragraph:"paragraph",strong:"strong",em:"em",preformatted:"preformatted",hyperlink:"hyperlink",image:"image",embed:"embed",list:"list-item",orderedList:"o-list-item",rtl:"rtl"},e.RichTextNodeTypeCodec=t.keyof({[e.RichTextNodeType.heading1]:null,[e.RichTextNodeType.heading2]:null,[e.RichTextNodeType.heading3]:null,[e.RichTextNodeType.heading4]:null,[e.RichTextNodeType.heading5]:null,[e.RichTextNodeType.heading6]:null,[e.RichTextNodeType.paragraph]:null,[e.RichTextNodeType.strong]:null,[e.RichTextNodeType.em]:null,[e.RichTextNodeType.preformatted]:null,[e.RichTextNodeType.hyperlink]:null,[e.RichTextNodeType.image]:null,[e.RichTextNodeType.embed]:null,[e.RichTextNodeType.list]:null,[e.RichTextNodeType.orderedList]:null,[e.RichTextNodeType.rtl]:null});let i=new t.Type("RichTextOptions",e=>"string"==typeof e,n=>(0,LQ.pipe)(t.union([t.string,t.null]).decode(n),LW.either.map(t=>{if(!t)return e.DEFAULT_OPTION;let n=t.split(",").map(e=>e.trim()).filter(t=>(0,LD.getOrElseW)(()=>{})(e.RichTextNodeTypeCodec.decode(t)));return n.length?n.join(","):e.DEFAULT_OPTION})),e=>e),o=e=>{if(!e)return t.success([])},a=e=>{if(e instanceof Object){if(!Object.entries(e).length)return t.success([]);if(e[""])return t.success(e[""].map(e=>e.name));let n=Object.entries(e).reduce((e,[,t])=>e.concat(t.map(e=>e.name)),[]).filter(Boolean);return t.success(n)}},u=e=>{if(e instanceof Array&&e.reduce((e,t)=>e&&"string"==typeof t,!0))return t.success(e)},s=e=>{if("string"==typeof e)return t.success([e])},l=new t.Type("RichTextLabels",e=>e instanceof Array,(e,n)=>{let r=t.record(t.string,t.readonlyArray(t.record(t.literal("name"),t.string))),i=t.readonlyArray(t.string);return(0,LQ.pipe)(t.union([r,i,t.string,t.null]).decode(e),LW.either.chain(r=>o(r)||u(r)||a(r)||s(r)||t.failure(e,n)))},e=>e);e.RichTextConfig=t.exact(t.partial({label:n.StringOrNull,placeholder:t.string,useAsTitle:t.boolean,single:i,multi:i,imageConstraint:r.default,labels:l,allowTargetBlank:t.boolean})),e.RichText=t.exact(t.intersection([t.type({type:t.literal(e.RichTextFieldType)}),t.partial({fieldset:n.StringOrNull,config:e.RichTextConfig})]))}(qJ);var qG={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Select=e.SelectConfig=e.SelectFieldType=void 0;let t=(0,P.__importStar)(WJ),n=qv();e.SelectFieldType="Select",e.SelectConfig=t.exact(t.partial({label:n.StringOrNull,placeholder:t.string,default_value:t.string,options:t.readonlyArray(t.union([t.string,n.StringFromNumber,n.StringFromBoolean]))})),e.Select=t.exact(t.intersection([t.type({type:t.literal(e.SelectFieldType)}),t.partial({fieldset:n.StringOrNull,config:e.SelectConfig})]))}(qG);var q$={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Separator=e.SeparatorConfig=e.SeparatorFieldType=void 0;let t=(0,P.__importStar)(WJ),n=qv();e.SeparatorFieldType="Separator",e.SeparatorConfig=t.exact(t.partial({label:n.StringOrNull})),e.Separator=t.exact(t.intersection([t.type({type:t.literal(e.SeparatorFieldType)}),t.partial({config:e.SeparatorConfig})]))}(q$);var qX={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Text=e.TextConfig=e.TextFieldType=void 0;let t=(0,P.__importStar)(WJ),n=qv();e.TextFieldType="Text",e.TextConfig=t.exact(t.partial({label:n.StringOrNull,useAsTitle:t.boolean,placeholder:t.string})),e.Text=t.exact(t.intersection([t.type({type:t.literal(e.TextFieldType)}),t.partial({fieldset:n.StringOrNull,config:e.TextConfig})]))}(qX);var q0={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Timestamp=e.TimestampConfig=e.TimestampFieldType=void 0;let t=(0,P.__importStar)(WJ),n=qv();e.TimestampFieldType="Timestamp",e.TimestampConfig=t.exact(t.partial({label:n.StringOrNull,placeholder:t.string,default:t.string})),e.Timestamp=t.exact(t.intersection([t.type({type:t.literal(e.TimestampFieldType)}),t.partial({fieldset:n.StringOrNull,config:e.TimestampConfig})]))}(q0),Object.defineProperty(qS,"__esModule",{value:!0}),qS.NestableWidget=void 0;let q1=(0,P.__importStar)(WJ);qS.NestableWidget=q1.union([qI.Color,qw.BooleanField,qT.Embed,qO.GeoPoint,q_.Date,qH.Number,qZ.Range,qJ.RichText,qG.Select,q$.Separator,qX.Text,q0.Timestamp,qY.Link,qR.Image,qz.IntegrationField]),function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Group=e.GroupConfig=e.GroupFieldType=void 0;let t=(0,P.__importStar)(WJ),n=qv();e.GroupFieldType="Group",e.GroupConfig=t.exact(t.partial({label:n.StringOrNull,repeat:t.boolean,fields:t.record(W$.WidgetKey,qS.NestableWidget)})),e.Group=t.exact(t.intersection([t.type({type:t.literal(e.GroupFieldType)}),t.partial({fieldset:n.StringOrNull,icon:t.string,description:t.string,config:e.GroupConfig})]))}(qC);var q2,q6,q5={};Object.defineProperty(q5,"__esModule",{value:!0}),(0,P.__exportStar)(qw,q5),(0,P.__exportStar)(qI,q5),(0,P.__exportStar)(q_,q5),(0,P.__exportStar)(qT,q5),(0,P.__exportStar)(qO,q5),(0,P.__exportStar)(qR,q5),(0,P.__exportStar)(qz,q5),(0,P.__exportStar)(qY,q5),(0,P.__exportStar)(qS,q5),(0,P.__exportStar)(qH,q5),(0,P.__exportStar)(qZ,q5),(0,P.__exportStar)(qJ,q5),(0,P.__exportStar)(qG,q5),(0,P.__exportStar)(q$,q5),(0,P.__exportStar)(qX,q5),(0,P.__exportStar)(q0,q5);var q3={},q9={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.isCompositeSlice=e.CompositeSlice=e.CompositeSliceConfig=e.CompositeSliceType=void 0;let t=(0,P.__importStar)(WJ),n=qv();e.CompositeSliceType="Slice",e.CompositeSliceConfig=t.exact(t.partial({label:n.StringOrNull})),e.CompositeSlice=t.exact(t.intersection([t.type({type:t.literal(e.CompositeSliceType)}),t.partial({fieldset:n.StringOrNull,description:t.string,icon:t.string,display:t.string,"non-repeat":t.record(W$.WidgetKey,qS.NestableWidget),repeat:t.record(W$.WidgetKey,qS.NestableWidget),config:e.CompositeSliceConfig})])),e.isCompositeSlice=function(e){return"Slice"===e.type}}(q9);var q4={};Object.defineProperty(q4,"__esModule",{value:!0}),q4.isLegacySlice=q4.LegacySlice=void 0;let q7=(0,P.__importStar)(WJ);q4.LegacySlice=q7.union([qS.NestableWidget,qC.Group]),q4.isLegacySlice=function(e){return"Slice"!==e.type&&"SharedSlice"!==e.type};var q8={},Qe={};Object.defineProperty(Qe,"__esModule",{value:!0}),Qe.isSlicePrimaryWidget=Qe.SlicePrimaryWidget=void 0;let Qt=(0,P.__importStar)(WJ);Qe.SlicePrimaryWidget=Qt.union([q5.NestableWidget,qC.Group]);let Qn=e=>q5.NestableWidget.is(e)||qC.Group.is(e);Qe.isSlicePrimaryWidget=Qn,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.isDynamicSharedSlice=e.isStaticSharedSlice=e.SharedSlice=e.SharedSliceType=e.Variation=void 0;let t=(0,P.__importStar)(WJ);e.Variation=t.exact(t.intersection([t.type({id:t.string,name:t.string,description:t.string,imageUrl:(0,Nq.withFallback)(t.string,"https://images.prismic.io/slice-machine/621a5ec4-0387-4bc5-9860-2dd46cbc07cd_default_ss.png?auto=compress,format"),docURL:t.string,version:t.string}),t.partial({display:t.string,primary:t.record(W$.WidgetKey,Qe.SlicePrimaryWidget),items:t.record(W$.WidgetKey,qS.NestableWidget)})])),e.SharedSliceType="SharedSlice";let n=t.string,r=t.string;e.SharedSlice=t.exact(t.intersection([t.type({id:t.string,type:t.literal(e.SharedSliceType),name:t.string,variations:t.readonlyArray(e.Variation)}),t.partial({description:t.string,legacyPaths:t.record(n,r)})])),e.isStaticSharedSlice=function(e){return"SharedSlice"===e.type},e.isDynamicSharedSlice=function(e){return"SharedSlice"===e.type}}(q8);var Qr={};Object.defineProperty(Qr,"__esModule",{value:!0}),Qr.SharedSliceRef=void 0;let Qi=(0,P.__importStar)(WJ);Qr.SharedSliceRef=Qi.exact(Qi.type({type:Qi.literal(q8.SharedSliceType)})),function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Slices=e.DynamicSlices=e.StaticSlices=e.slicesReader=e.DynamicSlicesConfig=e.StaticSlicesConfig=e.slicesConfigReader=e.SlicesLabels=e.SlicesFieldType=e.LegacySlicesFieldType=void 0;let t=(0,P.__importStar)(WJ),n=qv();function r(r){return t.exact(t.partial({label:n.StringOrNull,labels:e.SlicesLabels,choices:t.record(W$.WidgetKey,t.union([q4.LegacySlice,q9.CompositeSlice,r]))}))}e.LegacySlicesFieldType="Choice",e.SlicesFieldType="Slices",e.SlicesLabels=t.union([t.record(t.string,t.readonlyArray(t.exact(t.intersection([t.type({name:t.string}),t.partial({display:t.string})])))),t.null]),e.slicesConfigReader=r,e.StaticSlicesConfig=r(q8.SharedSlice),e.DynamicSlicesConfig=r(Qr.SharedSliceRef);let i={toStatic(e,t){let n=Object.entries(e.choices||{}).reduce((e,[n,r])=>{if("SharedSlice"!==r.type)return{...e,[n]:r};{let i=t.get(n);return i?{...e,[n]:i}:e}},{});return{...e,choices:n}}};function o(r){return t.exact(t.intersection([t.type({type:t.keyof({[e.SlicesFieldType]:null,[e.LegacySlicesFieldType]:null})}),t.partial({fieldset:n.StringOrNull,config:r})]))}e.slicesReader=o,e.StaticSlices=o(e.StaticSlicesConfig),e.DynamicSlices=o(e.DynamicSlicesConfig),e.Slices={toStatic:(e,t)=>e.config?{...e,config:i.toStatic(e.config,t)}:e}}(q3);var Qo={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.UID=e.UIDConfig=e.UIDFieldType=void 0;let t=(0,P.__importStar)(WJ),n=qv();e.UIDFieldType="UID",e.UIDConfig=t.exact(t.partial({label:n.StringOrNull,useAsTitle:t.boolean,placeholder:t.string})),e.UID=t.exact(t.intersection([t.type({type:t.literal(e.UIDFieldType)}),t.partial({fieldset:n.StringOrNull,config:e.UIDConfig})]))}(Qo),Object.defineProperty(qb,"__esModule",{value:!0}),qb.Widgets=qb.FieldType=qb.DynamicWidget=qb.StaticWidget=qb.widgetReader=void 0;let Qa=(0,P.__importStar)(WJ);function Qu(e){return Qa.union([Qo.UID,qS.NestableWidget,qC.Group,e])}qb.widgetReader=Qu,qb.StaticWidget=Qu(q3.StaticSlices),qb.DynamicWidget=Qu(q3.DynamicSlices),qb.FieldType=Qa.keyof({[q5.ColorFieldType]:null,[q5.BooleanFieldType]:null,[q5.NumberFieldType]:null,[q5.EmbedFieldType]:null,[q5.GeoPointFieldType]:null,[q5.DateFieldType]:null,[q5.RangeFieldType]:null,[q5.RichTextFieldType]:null,[q5.SelectFieldType]:null,[q5.SeparatorFieldType]:null,[q5.TextFieldType]:null,[q5.TimestampFieldType]:null,[q5.LinkFieldType]:null,[q5.ImageFieldType]:null,[q5.IntegrationFieldType]:null,[Qo.UIDFieldType]:null,[qC.GroupFieldType]:null,[q3.SlicesFieldType]:null,[q3.LegacySlicesFieldType]:null}),qb.Widgets={toStatic(e,t){switch(e.type){case"Choice":case"Slices":return q3.Slices.toStatic(e,t);default:return e}}},Object.defineProperty(qx,"__esModule",{value:!0}),qx.Sections=qx.DynamicSection=qx.StaticSection=qx.sectionReader=void 0;let Qs=(0,P.__importStar)(WJ);function Ql(e){return Qs.record(W$.WidgetKey,e)}qx.sectionReader=Ql,qx.StaticSection=Ql(qb.StaticWidget),qx.DynamicSection=Ql(qb.DynamicWidget),qx.Sections={toStatic:(e,t)=>Object.entries(e).reduce((e,[n,r])=>({...e,[n]:qb.Widgets.toStatic(r,t)}),{})},function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.collectSharedSlices=e.flattenCustomTypeFields=e.filterMissingSharedSlices=e.collectWidgets=e.validateSlices=e.toStatic=e.flattenSections=e.flattenWidgets=e.CustomType=e.StaticCustomType=e.CustomTypeFormat=void 0;let t=(0,P.__importStar)(WJ),n=qv();e.CustomTypeFormat={page:"page",custom:"custom"};class r extends Error{constructor(e){super(),Object.defineProperty(this,"slices",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"message",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.slices=e,this.message=this._formatError(e)}_formatError(e){return`The following slices doesn't exists in your Prismic repository:
3
- ${e.map(e=>` - ${e}`).join(`
4
- `)}
5
- `}}function i(r){return t.exact(t.intersection([t.type({id:t.string,label:n.StringOrNull,repeatable:(0,Nq.withFallback)(t.boolean,!0),json:t.record(t.string,r),status:(0,Nq.withFallback)(t.boolean,!0)}),t.partial({hash:t.string,format:(0,Nq.withFallback)(t.keyof(e.CustomTypeFormat),"custom")})]))}function o(e){return Object.entries(e.json).reduce((e,[,t])=>{let n=Object.entries(t);return e.concat(n)},[])}function a(e,t){let n=Object.entries(e.json).reduce((e,[n,r])=>{let i=Object.entries(r).reduce((e,[n,r])=>{let i=t(n,r);return i?{...e,[n]:i}:e},{});return{...e,[n]:i}},{});return{...e,json:n}}e.StaticCustomType=i(qx.StaticSection),e.CustomType=i(qx.DynamicSection),e.flattenWidgets=o,e.flattenSections=function(e){return Object.entries(e.json).reduce((e,[,t])=>{let n=Object.entries(t);return e.concat(n)},[])},e.toStatic=function(e,t){let n=Object.entries(e.json).reduce((e,[n,r])=>({...e,[n]:qx.Sections.toStatic(r,t)}),{});return{...e,json:n}},e.validateSlices=function(e,t){let n=(function(e){var t;let n=o(e).filter(([,e])=>"Slices"===e.type).reduce((e,[,t])=>{let n=Object.entries(t.config&&t.config.choices?t.config.choices:{}).filter(([,e])=>"SharedSlice"===e.type).map(([e])=>e);return e.concat(n)},[]);return function(e){return n.map(e)}})(e)(e=>{if(!t.get(e))return e}).filter(Boolean);return n.length>0?(0,LD.left)(new r(n)):(0,LD.right)(e)},e.collectWidgets=a,e.filterMissingSharedSlices=function(e,t){return a(e,(e,n)=>{if("Slices"===n.type){if(!n.config||!n.config.choices)return n;let r=Object.entries(n.config.choices).reduce((e,[n,r])=>"SharedSlice"!==r.type||t.get(n)?{...e,[n]:r}:e,{}),i={...n.config,choices:r};return{...n,config:i}}return n})},e.flattenCustomTypeFields=function(e){return Object.values(e.json).reduce((e,t)=>({...e,...t}),{})},e.collectSharedSlices=function(e){return Object.entries(e.fields).reduce((e,[,t])=>{var n;return"Slices"===t.type||"Choice"===t.type?{...e,...Object.entries((null===(n=t.config)||void 0===n?void 0:n.choices)||{}).reduce((e,[t,n])=>"SharedSlice"===n.type?{...e,[t]:n}:e,{})}:e},{})}}(NN);var Qc,Qd,Qf={},Qp={};Object.defineProperty(Qc=Qp,"__esModule",{value:!0}),Qc.DiffOperation=void 0,(Qd=Qc.DiffOperation||(Qc.DiffOperation={})).Added="added",Qd.Removed="removed",Qd.Updated="updated";var QA={},Qh={},Qm={};Object.defineProperty(Qm,"__esModule",{value:!0}),Qm.HexaColor=void 0;let Qg=/^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/;Qm.HexaColor={is:e=>Qg.test(e)};var Qy={};Object.defineProperty(Qy,"__esModule",{value:!0}),Qy.toRecord=void 0,Qy.toRecord=function(e,t){return e.reduce((e,n)=>{let r=t(n);return{...e,[r]:n}},{})};var Qv={};Object.defineProperty(Qv,"__esModule",{value:!0}),Qv.mapValues=Qv.isObject=Qv.withOptionals=Qv.isNotEmpty=Qv.zipObjects=void 0;let Qx=(0,P.__importStar)(WJ);Qv.zipObjects=function(e,t){return[...new Set(Object.keys(e||{}).concat(Object.keys(t||{})))].reduce((n,r)=>{let i=null==e?void 0:e[r],o=null==t?void 0:t[r];return{...n,[r]:{left:i,right:o}}},{})},Qv.isNotEmpty=function(e){return!!Object.keys(e).length},Qv.withOptionals=function(e,t){return{...e,...t.reduce((e,[t,n])=>n?{...e,[t]:n}:e,{})}};let Qb=Qx.record(Qx.string,Qx.unknown);Qv.isObject=function(e){return(0,LD.isRight)(Qb.decode(e))},Qv.mapValues=function(e,t){return Object.entries(e).reduce((e,[n,r])=>({...e,[n]:t(r,n)}),{})},Object.defineProperty(Qh,"__esModule",{value:!0}),Qh.Objects=Qh.Arrays=Qh.HexaColorCode=void 0,Qh.HexaColorCode=(0,P.__importStar)(Qm),Qh.Arrays=(0,P.__importStar)(Qy),Qh.Objects=(0,P.__importStar)(Qv);var QC={};function QS(e,t){let n=Qh.Objects.zipObjects(e,t),r=Object.entries(n).reduce((e,[t,n])=>{if(JSON.stringify(null==n?void 0:n.left)===JSON.stringify(null==n?void 0:n.right))return e;let r=(()=>{var e,t,r,i,o,a,u;if(!(!(null!=n&&n.left)&&!(null!=n&&n.right))){if(null!=n&&n.left&&!n.right)return{op:Qp.DiffOperation.Removed};if(!(null!=n&&n.left)&&null!=n&&n.right){if((null===(e=n.right)||void 0===e?void 0:e.type)===qC.GroupFieldType){let s={...n.right,config:{...n.right.config,fields:{}}};return s.config.fields=QS(void 0,null===(t=n.right.config)||void 0===t?void 0:t.fields)||{},{op:Qp.DiffOperation.Added,value:s}}return{op:Qp.DiffOperation.Added,value:n.right}}if((null===(r=n.right)||void 0===r?void 0:r.type)===qC.GroupFieldType){let l={...n.right,config:{...n.right.config,fields:{}}};return l.config.fields=QS((null===(i=n.left)||void 0===i?void 0:i.type)===qC.GroupFieldType?null===(a=null===(o=n.left)||void 0===o?void 0:o.config)||void 0===a?void 0:a.fields:void 0,null===(u=n.right.config)||void 0===u?void 0:u.fields)||{},{op:Qp.DiffOperation.Updated,value:l}}return{op:Qp.DiffOperation.Updated,value:n.right}}})();return r?{...e,[t]:r}:e},{});return Qh.Objects.isNotEmpty(r)?r:void 0}Object.defineProperty(QC,"__esModule",{value:!0}),QC.VariationComparator=void 0,QC.VariationComparator={compare(e,t){if(e&&!t)return{op:Qp.DiffOperation.Removed};if(!e&&t)return{op:Qp.DiffOperation.Added,value:t};let n=function(e,t){let n=Qh.Objects.zipObjects(e,t);return Object.entries(n).reduce((e,[t,n])=>"primary"===t||"items"===t||(null==n?void 0:n.left)===(null==n?void 0:n.right)?e:{...e,[t]:null==n?void 0:n.right},{})}(e,t),r=QS(null==e?void 0:e.primary,null==t?void 0:t.primary),i=QS(null==e?void 0:e.items,null==t?void 0:t.items),o={...n,...r?{primary:r}:{},...i?{items:i}:{}};if(Qh.Objects.isNotEmpty(o))return{op:Qp.DiffOperation.Updated,value:o}}},Object.defineProperty(QA,"__esModule",{value:!0}),QA.SliceComparator=void 0,QA.SliceComparator={compare(e,t){if(!e&&t)return{op:Qp.DiffOperation.Added,value:t};if(e&&!t)return{op:Qp.DiffOperation.Removed};let n=function(e,t){let n=Qh.Objects.zipObjects(e,t);return Object.entries(n).reduce((e,[t,n])=>"variations"===t||(null==n?void 0:n.left)===(null==n?void 0:n.right)?e:{...e,[t]:null==n?void 0:n.right},{})}(e,t),r=Qh.Objects.zipObjects(e&&Qh.Arrays.toRecord(e.variations,e=>e.id),t&&Qh.Arrays.toRecord(t.variations,e=>e.id)),i=Object.entries(r).reduce((e,[t,n])=>{if(!n)return e;let r=QC.VariationComparator.compare(n.left,n.right);return r?{...e,[t]:r}:e},{}),o={...n,...Qh.Objects.isNotEmpty(i)?{variations:i}:{}};if(Qh.Objects.isNotEmpty(o))return{op:Qp.DiffOperation.Updated,value:o}}};var Qw,QI={};Object.defineProperty(QI,"__esModule",{value:!0}),Object.defineProperty(Qf,"__esModule",{value:!0}),(0,P.__exportStar)(Qp,Qf),(0,P.__exportStar)(QA,Qf),(0,P.__exportStar)(QC,Qf),(0,P.__exportStar)(QI,Qf);var Q_,QT,QO={},QR={};Q_=QR,QT=O&&O.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Object.defineProperty(Q_,"__esModule",{value:!0}),Q_.ImageConstraint=void 0,Object.defineProperty(Q_,"ImageConstraint",{enumerable:!0,get:function(){return QT(qk).default}});var Qk={},QE={};Object.defineProperty(QE,"__esModule",{value:!0});var QM={};Object.defineProperty(QM,"__esModule",{value:!0}),QM.SlicesTypes=void 0;let QF=(0,P.__importStar)(WJ);QM.SlicesTypes=QF.keyof({[q9.CompositeSliceType]:null,[q8.SharedSliceType]:null}),Object.defineProperty(Qj=Qk,"__esModule",{value:!0}),(0,P.__exportStar)(q9,Qj),(0,P.__exportStar)(q4,Qj),(0,P.__exportStar)(q8,Qj),(0,P.__exportStar)(Qr,Qj),(0,P.__exportStar)(QE,Qj),(0,P.__exportStar)(Qe,Qj),(0,P.__exportStar)(q3,Qj),(0,P.__exportStar)(QM,Qj),Object.defineProperty(QU=QO,"__esModule",{value:!0}),(0,P.__exportStar)(qC,QU),(0,P.__exportStar)(q5,QU),(0,P.__exportStar)(QR,QU),(0,P.__exportStar)(Qk,QU),(0,P.__exportStar)(Qo,QU),(0,P.__exportStar)(qb,QU),Object.defineProperty(QK=ND,"__esModule",{value:!0}),(0,P.__exportStar)(NN,QK),(0,P.__exportStar)(Qf,QK),(0,P.__exportStar)(qx,QK),(0,P.__exportStar)(QO,QK);var Qj,QU,QK,QL,QB,QP,QW,QD={},QN={},Qq={};function QQ(){if(QW)return Qq;QW=1,Object.defineProperty(Qq,"__esModule",{value:!0}),Qq.hasContentType=Qq.hasFieldContentType=void 0;let e=zy();function t(e){return"object"==typeof e&&null!==e&&"__TYPE__"in e}return Qq.hasFieldContentType=function(n){return t(n)&&n.__TYPE__===e.FieldContentType&&(null==n?void 0:n.type)!==void 0&&"string"==typeof n.type&&(0,LD.isRight)(e.FieldType.decode(n.type))},Qq.hasContentType=t,Qq}function QV(){return QJ||(QJ=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.EmptyContent=e.EmptyLegacy=e.isEmptyContent=e.EmptyContentType=void 0;let t=(0,P.__importStar)(WJ),n=QQ();e.EmptyContentType="EmptyContent";let r=t=>(0,n.hasContentType)(t)&&t.__TYPE__===e.EmptyContentType;e.isEmptyContent=r;let i=t.union([t.null,t.type({value:t.null})]),o=n=>new t.Type("EmptyLegacy",e.isEmptyContent,t=>(0,LQ.pipe)(i.decode(t),LW.either.map(()=>({type:n,__TYPE__:e.EmptyContentType}))),()=>null);e.EmptyLegacy=o,e.EmptyContent=t.strict({type:t.string,__TYPE__:t.literal(e.EmptyContentType)})}(QN)),QN}var Qz={},QY={};Object.defineProperty(QY,"__esModule",{value:!0}),QY.defaultCtx=QY.getFieldCtx=QY.LegacyContentCtx=QY.FieldOrSliceType=void 0;let QH=(0,P.__importStar)(WJ);QY.FieldOrSliceType=QH.union([QO.FieldType,QO.SlicesTypes]);class QZ{constructor(e,t,n){Object.defineProperty(this,"fieldKey",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"prefixedKey",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"keyOfType",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"fieldPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"fieldType",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"allTypes",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.fieldKey=e,this.fieldPath=t||[],this.allTypes=n||new Map;let r=Array.of(this.fieldPath,[this.fieldKey]).flat().join(".");this.prefixedKey=r,this.keyOfType=`${r}_TYPE`,this.fieldType=this.allTypes.get(this.prefixedKey)}}QY.LegacyContentCtx=QZ,QY.getFieldCtx=function(e,t,n){return new QZ(e,[...t.fieldPath,t.fieldKey,...n||[]],t.allTypes)},QY.defaultCtx=function(e,t=new Map){return new QZ(e,[],t)};var QJ,QG,Q$={},QX={};function Q0(){return QG||(QG=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.BooleanContentDefaultValue=e.BooleanContent=e.BooleanLegacy=e.isBooleanContent=e.BooleanContentType=void 0;let t=(0,P.__importStar)(WJ),n=QQ();e.BooleanContentType="BooleanContent";let r=t=>(0,n.hasContentType)(t)&&t.__TYPE__===e.BooleanContentType;e.isBooleanContent=r;let i=n=>new t.Type("BooleanLegacy",e.isBooleanContent,n=>(0,LQ.pipe)(t.boolean.decode(n),LW.either.map(t=>e.BooleanContent.encode({value:t,__TYPE__:e.BooleanContentType}))),e=>({content:e.value,types:{[n.keyOfType]:"Boolean"}}));e.BooleanLegacy=i,e.BooleanContent=t.strict({__TYPE__:t.literal(e.BooleanContentType),value:t.boolean});let o=t=>{var n;return(null===(n=t.config)||void 0===n?void 0:n.default_value)!==void 0?{__TYPE__:e.BooleanContentType,value:t.config.default_value||!1}:void 0};e.BooleanContentDefaultValue=o}(QX)),QX}var Q1,Q2={};function Q6(){return Q1||(Q1=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.EmbedContent=e.EmbedLegacy=e.EmbedContentLegacy=e.isEmbedContent=e.EmbedContentType=void 0;let t=(0,P.__importStar)(WJ),n=qv(),r=QQ();e.EmbedContentType="EmbedContent";let i=t=>(0,r.hasContentType)(t)&&t.__TYPE__===e.EmbedContentType;e.isEmbedContent=i,e.EmbedContentLegacy=t.exact(t.intersection([t.type({embed_url:t.string,type:t.string}),t.partial({version:t.union([t.string,t.number,t.null]),title:n.StringOrNull,author_name:n.StringOrNull,author_url:n.StringOrNull,provider_name:n.StringOrNull,provider_url:n.StringOrNull,cache_age:t.union([t.string,t.number,t.null]),thumbnail_url:n.StringOrNull,thumbnail_width:n.NumberOrNull,thumbnail_height:n.NumberOrNull,html:n.StringOrNull})]));let o=n=>new t.Type("EmbedLegacy",e.isEmbedContent,t=>(0,LQ.pipe)(e.EmbedContentLegacy.decode(t),LW.either.map(n=>({...n,all:t,__TYPE__:e.EmbedContentType}))),e=>({content:e.all,types:{[n.keyOfType]:"Embed"}}));e.EmbedLegacy=o,e.EmbedContent=t.intersection([e.EmbedContentLegacy,t.strict({__TYPE__:t.literal(e.EmbedContentType),all:t.unknown})])}(Q2)),Q2}var Q5={},Q3={},Q9={};Object.defineProperty(Q9,"__esModule",{value:!0});let Q4=(0,P.__importStar)(WJ);Q9.default=new Q4.Type("TrimmedString",Q4.string.is,(e,t)=>(0,W3.pipe)(Q4.string.validate(e,t),(0,N5.chain)(e=>Q4.success(function(e){let t=0;for(;t<e.length&&e[t]<=" ";)t++;let n=e.length;for(;t<n&&e[n-1]<=" ";)n--;return e.substring(t,n)}(e)))),e=>e);var Q7={};function Q8(){return Ve||(Ve=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ColorContent=e.ColorLegacy=e.isColorContent=void 0;let t=(0,P.__importStar)(WJ),n=(0,P.__importDefault)(Q9),r=QQ(),i=e=>(0,r.hasContentType)(e)&&e.__TYPE__===Q7.FieldContentType&&(0,r.hasFieldContentType)(e)&&"Color"===e.type;e.isColorContent=i;let o=r=>new t.Type("ColorLegacy",e.isColorContent,t=>(0,LQ.pipe)(n.default.decode(t),LW.either.map(t=>e.ColorContent.encode({value:t,type:QO.ColorFieldType,__TYPE__:Q7.FieldContentType}))),e=>({content:e.value,types:{[r.keyOfType]:QO.ColorFieldType}}));e.ColorLegacy=o,e.ColorContent=t.strict({type:t.literal(QO.ColorFieldType),value:n.default,__TYPE__:t.literal(Q7.FieldContentType)})}(Q3)),Q3}Object.defineProperty(Q7,"__esModule",{value:!0}),Q7.FieldContentType=void 0,Q7.FieldContentType="FieldContent";var Ve,Vt,Vn={};function Vr(){return Vt||(Vt=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.DateContent=e.DateLegacy=e.isDateContent=void 0;let t=(0,P.__importStar)(WJ),n=(0,P.__importDefault)(Q9),r=QQ(),i=e=>(0,r.hasContentType)(e)&&e.__TYPE__===Q7.FieldContentType&&(0,r.hasFieldContentType)(e)&&"Date"===e.type;e.isDateContent=i;let o=r=>new t.Type("DateLegacy",e.isDateContent,t=>(0,LQ.pipe)(n.default.decode(t),LW.either.map(t=>e.DateContent.encode({value:t,type:QO.DateFieldType,__TYPE__:Q7.FieldContentType}))),e=>({content:e.value,types:{[r.keyOfType]:QO.DateFieldType}}));e.DateLegacy=o,e.DateContent=t.strict({type:t.literal(QO.DateFieldType),value:n.default,__TYPE__:t.literal(Q7.FieldContentType)})}(Vn)),Vn}var Vi,Vo={};function Va(){return Vi||(Vi=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.NumberContent=e.NumberLegacy=e.isNumberContent=void 0;let t=(0,P.__importStar)(WJ),n=(0,P.__importDefault)(Q9),r=QQ(),i=e=>(0,r.hasContentType)(e)&&e.__TYPE__===Q7.FieldContentType&&(0,r.hasFieldContentType)(e)&&"Number"===e.type;e.isNumberContent=i;let o=r=>new t.Type("NumberLegacy",e.isNumberContent,t=>(0,LQ.pipe)(n.default.decode(t),LW.either.map(t=>e.NumberContent.encode({value:t,type:QO.NumberFieldType,__TYPE__:Q7.FieldContentType}))),e=>({content:e.value,types:{[r.keyOfType]:QO.NumberFieldType}}));e.NumberLegacy=o,e.NumberContent=t.strict({type:t.literal(QO.NumberFieldType),value:n.default,__TYPE__:t.literal(Q7.FieldContentType)})}(Vo)),Vo}var Vu,Vs={};function Vl(){return Vu||(Vu=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.RangeContent=e.RangeLegacy=e.isRangeContent=void 0;let t=(0,P.__importStar)(WJ),n=(0,P.__importDefault)(Q9),r=QQ(),i=e=>(0,r.hasContentType)(e)&&e.__TYPE__===Q7.FieldContentType&&(0,r.hasFieldContentType)(e)&&"Range"===e.type;e.isRangeContent=i;let o=r=>new t.Type("RangeLegacy",e.isRangeContent,t=>(0,LQ.pipe)(n.default.decode(t),LW.either.map(t=>e.RangeContent.encode({value:t,type:QO.RangeFieldType,__TYPE__:Q7.FieldContentType}))),e=>({content:e.value,types:{[r.keyOfType]:QO.RangeFieldType}}));e.RangeLegacy=o,e.RangeContent=t.strict({type:t.literal(QO.RangeFieldType),value:n.default,__TYPE__:t.literal(Q7.FieldContentType)})}(Vs)),Vs}var Vc,Vd={};function Vf(){return Vc||(Vc=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SelectContentDefaultValue=e.SelectContent=e.SelectLegacy=e.isSelectContent=void 0;let t=(0,P.__importStar)(WJ),n=(0,P.__importDefault)(Q9),r=QQ(),i=e=>(0,r.hasContentType)(e)&&e.__TYPE__===Q7.FieldContentType&&(0,r.hasFieldContentType)(e)&&"Select"===e.type;e.isSelectContent=i;let o=r=>new t.Type("SelectLegacy",e.isSelectContent,t=>(0,LQ.pipe)(n.default.decode(t),LW.either.map(t=>e.SelectContent.encode({value:t,type:QO.SelectFieldType,__TYPE__:Q7.FieldContentType}))),e=>({content:e.value,types:{[r.keyOfType]:QO.SelectFieldType}}));e.SelectLegacy=o,e.SelectContent=t.strict({type:t.literal(QO.SelectFieldType),value:n.default,__TYPE__:t.literal(Q7.FieldContentType)});let a=e=>{var t;return!(null===(t=e.config)||void 0===t)&&t.default_value?{__TYPE__:Q7.FieldContentType,type:QO.SelectFieldType,value:e.config.default_value||""}:void 0};e.SelectContentDefaultValue=a}(Vd)),Vd}var Vp,VA={};function Vh(){return Vp||(Vp=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.TextContent=e.TextLegacy=e.isTextContent=void 0;let t=(0,P.__importStar)(WJ),n=(0,P.__importDefault)(Q9),r=QQ(),i=e=>(0,r.hasContentType)(e)&&e.__TYPE__===Q7.FieldContentType&&(0,r.hasFieldContentType)(e)&&"Text"===e.type;e.isTextContent=i;let o=r=>new t.Type("TextLegacy",e.isTextContent,t=>(0,LQ.pipe)(n.default.decode(t),LW.either.map(t=>e.TextContent.encode({value:t,type:QO.TextFieldType,__TYPE__:Q7.FieldContentType}))),e=>({content:e.value,types:{[r.keyOfType]:QO.TextFieldType}}));e.TextLegacy=o,e.TextContent=t.strict({type:t.literal(QO.TextFieldType),value:n.default,__TYPE__:t.literal(Q7.FieldContentType)})}(VA)),VA}var Vm,Vg={};function Vy(){return Vm||(Vm=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.TimestampContent=e.TimestampLegacy=e.isTimestampContent=void 0;let t=(0,P.__importStar)(WJ),n=(0,P.__importDefault)(Q9),r=QQ(),i=e=>(0,r.hasContentType)(e)&&e.__TYPE__===Q7.FieldContentType&&(0,r.hasFieldContentType)(e)&&"Timestamp"===e.type;e.isTimestampContent=i;let o=r=>new t.Type("TimestampLegacy",e.isTimestampContent,t=>(0,LQ.pipe)(n.default.decode(t),LW.either.map(t=>e.TimestampContent.encode({value:t,type:QO.TimestampFieldType,__TYPE__:Q7.FieldContentType}))),e=>({content:e.value,types:{[r.keyOfType]:QO.TimestampFieldType}}));e.TimestampLegacy=o,e.TimestampContent=t.strict({type:t.literal(QO.TimestampFieldType),value:n.default,__TYPE__:t.literal(Q7.FieldContentType)})}(Vg)),Vg}function Vv(){return Vx||(Vx=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.FieldContent=e.FieldType=void 0;let t=(0,P.__importStar)(WJ),n=Q8(),r=Vr(),i=Va(),o=Vl(),a=Vf(),u=Vh(),s=Vy();e.FieldType=t.keyof({Text:null,Date:null,Timestamp:null,Color:null,Number:null,Range:null,Select:null}),e.FieldContent=t.union([r.DateContent,n.ColorContent,i.NumberContent,o.RangeContent,a.SelectContent,u.TextContent,s.TimestampContent]),(0,P.__exportStar)(Q8(),e),(0,P.__exportStar)(Q7,e),(0,P.__exportStar)(Vr(),e),(0,P.__exportStar)(Va(),e),(0,P.__exportStar)(Vl(),e),(0,P.__exportStar)(Vf(),e),(0,P.__exportStar)(Vh(),e),(0,P.__exportStar)(Vy(),e)}(Q5)),Q5}var Vx,Vb,VC={};function VS(){return Vb||(Vb=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.GeoPointContent=e.GeoPointLegacy=e.isGeoPointContent=e.GeoPointContentType=void 0;let t=(0,P.__importStar)(WJ),n=QQ();e.GeoPointContentType="GeoPointContent";let r=t=>(0,n.hasContentType)(t)&&t.__TYPE__===e.GeoPointContentType;e.isGeoPointContent=r;let i=t.strict({position:t.strict({lat:t.number,lng:t.number})}),o=n=>new t.Type("GeoPointLegacy",e.isGeoPointContent,t=>(0,W3.pipe)(i.decode(t),LW.either.map(t=>e.GeoPointContent.encode({...t,__TYPE__:e.GeoPointContentType}))),e=>({content:{position:e.position},types:{[n.keyOfType]:"GeoPoint"}}));e.GeoPointLegacy=o,e.GeoPointContent=t.intersection([i,t.strict({__TYPE__:t.literal(e.GeoPointContentType)})])}(VC)),VC}var Vw,VI={};function V_(){return Vw||(Vw=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ImageContent=e.ImageLegacy=e.ImageContentView=e.isImageContent=e.ImageContentType=void 0;let t=(0,P.__importStar)(WJ),n=qv(),r=QQ();e.ImageContentType="ImageContent";let i=t=>(0,r.hasContentType)(t)&&t.__TYPE__===e.ImageContentType;e.isImageContent=i;let o=t.exact(t.type({id:t.string,url:t.string,width:t.number,height:t.number}));e.ImageContentView=t.exact(t.intersection([t.type({origin:o,width:t.number,height:t.number,edit:t.type({zoom:t.number,crop:t.type({x:t.number,y:t.number}),background:t.string})}),t.partial({url:t.string,credits:n.NonEmptyStringOrNull,alt:n.NonEmptyStringOrNull,provider:n.StringOrNull})]));let a=t.intersection([e.ImageContentView,t.partial({thumbnails:t.record(t.string,e.ImageContentView)})]),u=n=>new t.Type("ImageLegacy",e.isImageContent,t=>(0,LQ.pipe)(a.decode(t),LW.either.map(t=>e.ImageContent.encode({...t,__TYPE__:e.ImageContentType}))),e=>({content:(0,Qv.withOptionals)({edit:e.edit,height:e.height,origin:e.origin,width:e.width},[["alt",e.alt],["credits",e.credits],["provider",e.provider],["thumbnails",e.thumbnails],["url",e.url]]),types:{[n.keyOfType]:"Image"}}));e.ImageLegacy=u,e.ImageContent=t.intersection([a,t.strict({__TYPE__:t.literal(e.ImageContentType)})])}(VI)),VI}var VT,VO={};function VR(){return VT||(VT=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.IntegrationFieldContent=e.IntegrationFieldLegacy=e.isIntegrationFieldContent=e.IntegrationFieldContentType=void 0;let t=(0,P.__importStar)(WJ),n=QQ();e.IntegrationFieldContentType="IntegrationFieldsContent";let r=t=>(0,n.hasContentType)(t)&&t.__TYPE__===e.IntegrationFieldContentType;e.isIntegrationFieldContent=r;let i=n=>new t.Type("IntegrationFieldLegacy",e.isIntegrationFieldContent,n=>(0,LQ.pipe)(t.string.decode(n),LW.either.map(t=>e.IntegrationFieldContent.encode({value:t,__TYPE__:e.IntegrationFieldContentType}))),e=>({content:e.value,types:{[n.keyOfType]:"IntegrationFields"}}));e.IntegrationFieldLegacy=i,e.IntegrationFieldContent=t.strict({__TYPE__:t.literal(e.IntegrationFieldContentType),value:t.string})}(VO)),VO}var Vk,VE={};function VM(){return Vk||(Vk=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.LinkContent=e.Link=e.LinkContentLegacy=e.LinkLegacy=e.isLinkContent=e.LinkContentType=e.ExternalLinkContent=e.ExternalLinkType=e.DocumentLinkContent=e.DocumentLinkType=e.FileLinkContent=e.FileLinkType=e.ImageLinkContent=e.ImageLinkType=void 0;let t=(0,P.__importStar)(WJ),n=qv(),r=QQ();e.ImageLinkType="ImageLink";let i=t.exact(t.intersection([t.type({id:t.string,url:t.string,height:t.string,width:t.string,size:t.string,name:t.string,kind:t.string}),t.partial({date:n.StringOrNull})])),o=new t.Type("ImageLink",t=>(0,r.hasContentType)(t)&&t.__TYPE__===e.ImageLinkType,t=>(0,LQ.pipe)(i.decode(t),LW.either.map(t=>e.ImageLinkContent.encode({...t,__TYPE__:e.ImageLinkType}))),e=>i.encode(e));e.ImageLinkContent=t.intersection([t.strict({__TYPE__:t.literal(e.ImageLinkType)}),i]),e.FileLinkType="FileLink";let a=t.exact(t.intersection([t.type({id:t.string,url:t.string,name:t.string,kind:t.string,size:(0,NK.withFallback)(t.string,"0")}),t.partial({date:(0,W5.nullable)(t.string)})])),u=new t.Type("FileLink",t=>(0,r.hasContentType)(t)&&t.__TYPE__===e.FileLinkType,t=>(0,LQ.pipe)(a.decode(t),LW.either.map(t=>e.FileLinkContent.encode({...t,__TYPE__:e.FileLinkType}))),e=>a.encode(e));e.FileLinkContent=t.intersection([a,t.exact(t.intersection([t.type({__TYPE__:t.literal(e.FileLinkType)}),t.partial({size:(0,NK.withFallback)(t.string,"0")})]))]),e.DocumentLinkType="DocumentLink";let s=t.strict({id:n.NonEmptyString}),l=new t.Type("DocumentLink",t=>(0,r.hasContentType)(t)&&t.__TYPE__===e.DocumentLinkType,t=>(0,LQ.pipe)(s.decode(t),LW.either.map(t=>e.DocumentLinkContent.encode({...t,__TYPE__:e.DocumentLinkType}))),e=>s.encode(e));e.DocumentLinkContent=t.intersection([t.strict({__TYPE__:t.literal(e.DocumentLinkType)}),s]),e.ExternalLinkType="ExternalLink";let c=t.exact(t.intersection([t.type({url:t.string}),t.partial({kind:t.literal("web"),target:n.StringOrNull,preview:(0,W5.nullable)(t.partial({title:t.string}))})])),d=new t.Type("ExternalLink",t=>(0,r.hasContentType)(t)&&t.__TYPE__===e.ExternalLinkType,t=>(0,LQ.pipe)(c.decode(t),LW.either.map(t=>e.ExternalLinkContent.encode({...t,__TYPE__:e.ExternalLinkType}))),e=>c.encode(e));e.ExternalLinkContent=t.intersection([t.strict({__TYPE__:t.literal(e.ExternalLinkType)}),c]),e.LinkContentType="LinkContent";let f=t=>(0,r.hasContentType)(t)&&t.__TYPE__===e.LinkContentType;e.isLinkContent=f,e.LinkLegacy=t.union([o,u,l,d]);let p=n=>new t.Type("LinkLegacy",e.isLinkContent,t=>(0,LQ.pipe)(e.LinkLegacy.decode(t),LW.either.map(t=>e.LinkContent.encode({value:t,__TYPE__:e.LinkContentType}))),t=>({content:e.LinkLegacy.encode(t.value),types:{[n.keyOfType]:"Link"}}));e.LinkContentLegacy=p,e.Link=t.union([e.ImageLinkContent,e.FileLinkContent,e.DocumentLinkContent,e.ExternalLinkContent]),e.LinkContent=t.strict({__TYPE__:t.literal(e.LinkContentType),value:e.Link})}(VE)),VE}var VF,Vj={},VU={},VK={};function VL(){return VF||(VF=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Block=e.BlockLegacy=e.TextBlock=e.checkEmbedBlock=e.EmbedBlock=e.checkImageBlock=e.ImageBlock=e.ValidatedSpans=e.SpanLegacy=e.Span=void 0;let t=(0,P.__importStar)(WJ),n=qv(),r=Q6(),i=V_(),o=VM(),a=e=>t.strict({data:e,start:t.number,end:t.number,type:t.literal(q5.RichTextNodeType.hyperlink)}),u=t.strict({data:(0,NK.withFallback)(t.string,""),start:t.number,end:t.number,type:t.literal("label")}),s=t.strict({start:t.number,end:t.number,type:t.keyof({[q5.RichTextNodeType.strong]:null,[q5.RichTextNodeType.em]:null,"list-item":null})});e.Span=t.union([a(o.Link),u,s]),e.SpanLegacy=t.union([a(o.LinkLegacy),u,s]);let l=e=>new t.Type("ValidatedSpans",t=>Array.isArray(t)&&t.every(e.is),(n,r)=>{if(!Array.isArray(n))return t.failure(n,r);{let i=n.reduce((t,n)=>{let r=e.decode(n);return(0,LD.isLeft)(r)?t:[...t,r.right]},[]).sort((e,t)=>e.start-t.start);return t.success(i)}},t=>t.reduce((t,n)=>{let r=e.encode(n);return[...t,r]},[]));e.ValidatedSpans=l;let c=e=>t.exact(t.intersection([t.type({type:t.literal(q5.RichTextNodeType.image),data:t.intersection([i.ImageContentView,t.partial({linkTo:(0,W5.nullable)(e)})])}),t.partial({label:n.StringOrNull,direction:n.StringOrNull})]));e.ImageBlock=c(o.Link);let d=c(o.LinkLegacy);e.checkImageBlock=function(e){return e.type===q5.RichTextNodeType.image};let f=t.exact(t.intersection([t.type({type:t.literal(q5.RichTextNodeType.embed),data:t.unknown}),t.partial({label:n.StringOrNull,direction:n.StringOrNull})])),p=new t.Type("EmbedBlockLegacy",e=>"embed"===e.type,t=>(0,LQ.pipe)(f.decode(t),LW.either.chain(e=>LW.either.map(t=>[e,t])(r.EmbedContentLegacy.decode(e.data))),LW.either.map(([t,n])=>e.EmbedBlock.encode({...t,data:{...n,__TYPE__:r.EmbedContentType,all:t.data}}))),e=>({...f.encode(e),data:r.EmbedContentLegacy.encode(e.data)}));e.EmbedBlock=t.exact(t.intersection([t.type({type:t.literal(q5.RichTextNodeType.embed),data:r.EmbedContent}),t.partial({label:n.StringOrNull,direction:n.StringOrNull})])),e.checkEmbedBlock=function(e){return e.type===q5.RichTextNodeType.embed};let A=n=>t.exact(t.intersection([t.type({type:(0,W5.refineType)(q5.RichTextNodeTypeCodec,`string which isn't ${q5.RichTextNodeType.image} ${q5.RichTextNodeType.embed}`,e=>e!==q5.RichTextNodeType.image&&e!==q5.RichTextNodeType.embed),content:t.intersection([t.type({text:t.string}),t.partial({spans:(0,e.ValidatedSpans)(n)})])}),t.partial({label:t.string,direction:t.string})]));e.TextBlock=A(e.Span);let h=A(e.SpanLegacy),m=t.union([p,d,h]);e.BlockLegacy=new t.Type("BlockLegacy",e=>p.is(e)||d.is(e)||h.is(e),e=>m.decode(e),t=>e.ImageBlock.is(t)?d.encode(t):e.EmbedBlock.is(t)?p.encode(t):h.encode(t)),e.Block=t.union([e.ImageBlock,e.EmbedBlock,e.TextBlock])}(VK)),VK}function VB(){return VP||(VP=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.RichTextLegacy=e.RichTextContent=e.isRichTextContent=e.RichTextContentType=void 0;let t=(0,P.__importStar)(WJ),n=QQ(),r=VL();e.RichTextContentType="StructuredTextContent";let i=t=>(0,n.hasContentType)(t)&&t.__TYPE__===e.RichTextContentType;e.isRichTextContent=i;let o=t.array(r.BlockLegacy);e.RichTextContent=t.strict({__TYPE__:t.literal(e.RichTextContentType),value:t.array(r.Block)}),(0,P.__exportStar)(VL(),e);let a=n=>new t.Type("RichTextLegacy",e.isRichTextContent,t=>(0,LQ.pipe)(o.decode(t),LW.either.map(t=>({value:t,__TYPE__:e.RichTextContentType}))),e=>({content:o.encode(e.value),types:{[n.keyOfType]:"StructuredText"}}));e.RichTextLegacy=a}(VU)),VU}var VP,VW,VD={};function VN(){return VW||(VW=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SeparatorContent=e.SeparatorLegacy=e.isSeparatorContent=e.SeparatorContentType=void 0;let t=(0,P.__importStar)(WJ),n=QQ();e.SeparatorContentType="SeparatorContent";let r=t=>(0,n.hasContentType)(t)&&t.__TYPE__===e.SeparatorContentType;e.isSeparatorContent=r;let i=n=>new t.Type("SeparatorLegacy",e.isSeparatorContent,()=>t.success(e.SeparatorContent.encode({__TYPE__:e.SeparatorContentType})),()=>({content:{},types:{[n.keyOfType]:"Separator"}}));e.SeparatorLegacy=i,e.SeparatorContent=t.strict({__TYPE__:t.literal(e.SeparatorContentType)})}(VD)),VD}function Vq(){var e;return VV||(VV=1,Object.defineProperty(Q$,"__esModule",{value:!0}),(0,P.__exportStar)(Q0(),Q$),(0,P.__exportStar)(Q6(),Q$),(0,P.__exportStar)(Vv(),Q$),(0,P.__exportStar)(VS(),Q$),(0,P.__exportStar)(V_(),Q$),(0,P.__exportStar)(VR(),Q$),(0,P.__exportStar)(VM(),Q$),(0,P.__exportStar)(function(){if(VQ)return Vj;VQ=1,Object.defineProperty(Vj,"__esModule",{value:!0}),Vj.NestableLegacy=Vj.isNestableContent=Vj.NestableContentDefaultValue=Vj.NestableContent=void 0;let e=(0,P.__importStar)(WJ),t=QV(),n=Q0(),r=Q6(),i=Vv(),o=VS(),a=V_(),u=VR(),s=VM(),l=VB(),c=VN();Vj.NestableContent=e.union([t.EmptyContent,n.BooleanContent,r.EmbedContent,i.TextContent,i.TimestampContent,i.SelectContent,i.RangeContent,i.NumberContent,i.DateContent,i.ColorContent,o.GeoPointContent,a.ImageContent,u.IntegrationFieldContent,s.LinkContent,l.RichTextContent,c.SeparatorContent]);let d=e=>{switch(e.type){case"Boolean":return(0,n.BooleanContentDefaultValue)(e);case"Select":return(0,i.SelectContentDefaultValue)(e);default:return}};Vj.NestableContentDefaultValue=d;let f=e=>(0,i.isTextContent)(e)||(0,i.isColorContent)(e)||(0,i.isDateContent)(e)||(0,i.isTimestampContent)(e)||(0,i.isNumberContent)(e)||(0,i.isRangeContent)(e)||(0,i.isSelectContent)(e)||(0,o.isGeoPointContent)(e)||(0,l.isRichTextContent)(e)||(0,n.isBooleanContent)(e)||(0,r.isEmbedContent)(e)||(0,a.isImageContent)(e)||(0,u.isIntegrationFieldContent)(e)||(0,s.isLinkContent)(e)||(0,c.isSeparatorContent)(e)||(0,t.isEmptyContent)(e);Vj.isNestableContent=f;let p=e=>({decode(d){if(!e.fieldType)return;let f=(0,t.EmptyLegacy)(e.fieldType).decode(d);if((0,LD.isRight)(f))return f;let p=(()=>{switch(e.fieldType){case"Text":return(0,i.TextLegacy)(e);case"Color":return(0,i.ColorLegacy)(e);case"Date":return(0,i.DateLegacy)(e);case"Timestamp":return(0,i.TimestampLegacy)(e);case"Number":return(0,i.NumberLegacy)(e);case"Range":return(0,i.RangeLegacy)(e);case"Select":return(0,i.SelectLegacy)(e);case"GeoPoint":return(0,o.GeoPointLegacy)(e);case"StructuredText":return(0,l.RichTextLegacy)(e);case"Boolean":return(0,n.BooleanLegacy)(e);case"Embed":return(0,r.EmbedLegacy)(e);case"Image":return(0,a.ImageLegacy)(e);case"IntegrationFields":return(0,u.IntegrationFieldLegacy)(e);case"Link":return(0,s.LinkContentLegacy)(e);case"Separator":return(0,c.SeparatorLegacy)(e);default:return}})();if(p)return p.decode(d)},encode(t){switch(t.__TYPE__){case Q7.FieldContentType:return"Text"===t.type?(0,i.TextLegacy)(e).encode(t):"Color"===t.type?(0,i.ColorLegacy)(e).encode(t):"Range"===t.type?(0,i.RangeLegacy)(e).encode(t):"Date"===t.type?(0,i.DateLegacy)(e).encode(t):"Number"===t.type?(0,i.NumberLegacy)(e).encode(t):"Timestamp"===t.type?(0,i.TimestampLegacy)(e).encode(t):"Select"===t.type?(0,i.SelectLegacy)(e).encode(t):void 0;case o.GeoPointContentType:return(0,o.GeoPointLegacy)(e).encode(t);case l.RichTextContentType:return(0,l.RichTextLegacy)(e).encode(t);case r.EmbedContentType:return(0,r.EmbedLegacy)(e).encode(t);case n.BooleanContentType:return(0,n.BooleanLegacy)(e).encode(t);case a.ImageContentType:return(0,a.ImageLegacy)(e).encode(t);case u.IntegrationFieldContentType:return(0,u.IntegrationFieldLegacy)(e).encode(t);case s.LinkContentType:return(0,s.LinkContentLegacy)(e).encode(t);case c.SeparatorContentType:return(0,c.SeparatorLegacy)(e).encode(t);default:return}}});return Vj.NestableLegacy=p,Vj}(),Q$),(0,P.__exportStar)(VB(),Q$),(0,P.__exportStar)(VN(),Q$)),Q$}var VQ,VV,Vz,VY={};function VH(){if(Vz)return VY;Vz=1,Object.defineProperty(VY,"__esModule",{value:!0}),VY.repeatableContentWithDefaultNestableContentValues=VY.withDefaultNestableContentValues=VY.withDefaultSlicePrimaryContentValues=void 0;let e=VZ(),t=Vq();return VY.withDefaultSlicePrimaryContentValues=function(n,r){let i=r;for(let[o,a]of Object.entries(n)){let u=r[o];if(void 0===u){if(a.type===ND.GroupFieldType)i[o]=(0,e.groupContentWithDefaultValues)(a,e.GroupContentDefaultValue);else{let s=(0,t.NestableContentDefaultValue)(a);s&&(i[o]=s)}continue}a.type===ND.GroupFieldType&&(0,e.isGroupContent)(u)&&(i[o]=(0,e.groupContentWithDefaultValues)(a,u))}return i},VY.withDefaultNestableContentValues=function(e,n){return Object.entries(e).reduce((e,[r,i])=>{if(void 0===n[r]){let o=(0,t.NestableContentDefaultValue)(i);return void 0!==o?{...e,[r]:o}:e}return e},n)},VY.repeatableContentWithDefaultNestableContentValues=function(e,n){let r=Object.entries(e);return n.map(e=>r.reduce((n,[r,i])=>{if(!e.value.find(([e])=>e===r)){let o=(0,t.NestableContentDefaultValue)(i);return{...n,value:[...n.value,...o?[[r,o]]:[]]}}return n},e))},VY}function VZ(){return VJ||(VJ=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.traverseGroupItemsContent=e.traverseGroupContent=e.groupContentWithDefaultValues=e.GroupContentDefaultValue=e.GroupContent=e.isGroupContent=e.GroupContentType=e.GroupLegacy=e.GroupItemLegacy=e.GroupItemContent=e.GroupItemContentType=void 0;let t=(0,P.__importStar)(WJ),n=QQ(),r=Vq(),i=VH();e.GroupItemContentType="GroupItemContent",e.GroupItemContent=t.strict({__TYPE__:t.literal(e.GroupItemContentType),value:t.array(t.tuple([t.string,r.NestableContent]))});let o=t.record(t.string,t.unknown),a=i=>new t.Type("GroupItemLegacy",t=>(0,n.hasContentType)(t)&&t.__TYPE__===e.GroupItemContentType,t=>(0,LQ.pipe)(o.decode(t),LW.either.map(t=>({value:Object.entries(t).reduce((e,[t,n])=>{let o=(0,QY.getFieldCtx)(t,i),a=(0,r.NestableLegacy)(o).decode(n);return!a||(0,LD.isLeft)(a)?e:[...e,[t,a.right]]},[]),__TYPE__:e.GroupItemContentType}))),e=>e.value.reduce((e,[t,n])=>{let o=(0,QY.getFieldCtx)(t,i),a=(0,r.NestableLegacy)(o).encode(n);return a?{content:{...e.content,[t]:a.content},types:{...e.types,...a.types}}:e},{content:{},types:{}}));e.GroupItemLegacy=a;let u=n=>{let r=t.array(t.union([t.null,(0,e.GroupItemLegacy)(n)])),i=t.array((0,e.GroupItemLegacy)(n));return new t.Type("GroupLegacy",e.isGroupContent,t=>(0,LQ.pipe)(r.decode(t),LW.either.map(t=>({value:t.map(t=>null===t?{__TYPE__:e.GroupItemContentType,value:[]}:t),__TYPE__:e.GroupContentType}))),e=>{let t=i.encode(e.value);return{content:t.map(e=>e.content),types:t.reduce((e,t)=>({...e,...t.types}),{[n.keyOfType]:"Group"})}})};e.GroupLegacy=u,e.GroupContentType="GroupContentType";let s=t=>(0,n.hasContentType)(t)&&t.__TYPE__===e.GroupContentType;function l({path:e,model:t,content:n}){return i=>n.map((n,o)=>{let a=e.concat([{key:o.toString(),type:"GroupItem"}]),u=n.value.reduce((e,[n,o])=>{let u=null==t?void 0:t[n],s=i({path:a.concat([{key:n,type:"Widget"}]),key:n,apiId:n,model:u,content:o});return s&&(0,r.isNestableContent)(s)?e.concat([[n,s]]):e},[]);return{__TYPE__:n.__TYPE__,value:u}})}e.isGroupContent=s,e.GroupContent=t.strict({__TYPE__:t.literal(e.GroupContentType),value:t.array(e.GroupItemContent)}),e.GroupContentDefaultValue={__TYPE__:e.GroupContentType,value:[]},e.groupContentWithDefaultValues=function(e,t){var n;let r=null===(n=e.config)||void 0===n?void 0:n.fields;return r?{...t,value:(0,i.repeatableContentWithDefaultNestableContentValues)(r,t.value)}:t},e.traverseGroupContent=function({path:e,key:t,apiId:n,model:r,content:i}){return o=>{var a;let u=l({path:e,model:null===(a=null==r?void 0:r.config)||void 0===a?void 0:a.fields,content:i.value})(o);return o({path:e,key:t,apiId:n,model:r,content:{__TYPE__:i.__TYPE__,value:u}})}},e.traverseGroupItemsContent=l}(Qz)),Qz}var VJ,VG,V$={},VX={},V0={},V1={};function V2(){if(VG)return V1;VG=1,Object.defineProperty(V1,"__esModule",{value:!0}),V1.RepeatableWidgets=V1.RepeatableWidgetsLegacy=void 0;let e=(0,P.__importStar)(WJ),t=VZ(),n=Vq(),r=n=>e.array((0,t.GroupItemLegacy)(n));V1.RepeatableWidgetsLegacy=r;let i=e.tuple([e.string,n.NestableContent]),o=e.strict({__TYPE__:e.literal(t.GroupItemContentType),value:e.array(i)});return V1.RepeatableWidgets=e.array(o),V1}function V6(){return V5||(V5=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.migrateCompositeSlice=e.traverseCompositeSliceContent=e.compositeSliceContentWithDefaultValues=e.CompositeSliceContent=e.CompositeSliceLegacy=e.isCompositeSliceContent=e.CompositeSliceContentType=void 0;let t=(0,P.__importStar)(WJ),n=QQ(),r=VZ(),i=Vq(),o=VH(),a=V2();e.CompositeSliceContentType="CompositeSliceContent";let u=t=>(0,n.hasContentType)(t)&&t.__TYPE__===e.CompositeSliceContentType;e.isCompositeSliceContent=u;let s=t.exact(t.partial({repeat:t.array(t.unknown),"non-repeat":t.UnknownRecord})),l=n=>new t.Type("CompositeSliceLegacy",e.isCompositeSliceContent,t=>(0,LQ.pipe)(s.decode(t),LW.either.map(t=>{let r=(()=>{let e=(0,QY.getFieldCtx)("repeat",n),r=(0,a.RepeatableWidgetsLegacy)(e).decode(t.repeat);if(!(!r||(0,LD.isLeft)(r)))return r.right})()||[];return{nonRepeat:Object.entries(t["non-repeat"]||{}).reduce((e,[t,r])=>{let o=(0,QY.getFieldCtx)(t,n,["non-repeat"]);if(!o)return e;let a=(0,i.NestableLegacy)(o).decode(r);return!a||(0,LD.isLeft)(a)?e:{...e,[t]:a.right}},{}),repeat:r,__TYPE__:e.CompositeSliceContentType}})),e=>{let t=Object.entries(e.nonRepeat).reduce((e,[t,r])=>{let o=(0,QY.getFieldCtx)(t,n,["non-repeat"]),a=(0,i.NestableLegacy)(o).encode(r);return a?{content:{...e.content,[t]:a.content},types:{...e.types,...a.types}}:e},{content:{},types:{}}),r=(()=>{let t=(0,QY.getFieldCtx)("repeat",n);return(0,a.RepeatableWidgetsLegacy)(t).encode(e.repeat)})()||[];return{content:{"non-repeat":t.content,repeat:r.map(e=>e.content)},types:{[n.keyOfType]:"Slice",...t.types,...r.reduce((e,t)=>({...e,...t.types}),{})}}});e.CompositeSliceLegacy=l,e.CompositeSliceContent=t.strict({__TYPE__:t.literal(e.CompositeSliceContentType),nonRepeat:t.record(t.string,i.NestableContent),repeat:a.RepeatableWidgets}),e.compositeSliceContentWithDefaultValues=function(e,t){var n,r;let i=(0,o.withDefaultNestableContentValues)(null!==(n=e["non-repeat"])&&void 0!==n?n:{},t.nonRepeat),a=(0,o.repeatableContentWithDefaultNestableContentValues)(null!==(r=e.repeat)&&void 0!==r?r:{},t.repeat);return{...t,nonRepeat:i,repeat:a}},e.traverseCompositeSliceContent=function({path:e,sliceKey:t,sliceName:n,model:o,content:a}){return(u,s)=>{let l=Object.entries(a.widget.nonRepeat).reduce((r,[a,s])=>{var l,c,d;let f=(null==o?void 0:o.type)==="SharedSlice"?null===(c=null===(l=null==o?void 0:o.fields)||void 0===l?void 0:l.primary)||void 0===c?void 0:c[a]:null===(d=null==o?void 0:o["non-repeat"])||void 0===d?void 0:d[a],p=u({path:e.concat([{key:"non-repeat",type:"primary"},{key:a,type:"Widget"}]),key:a,apiId:n,model:f,content:s});return p?(0,i.isNestableContent)(p)?{...r,[a]:p}:(console.warn(`Warn: Non nestable content with key [${a}] detected in a composite slice [${n}] with key [${t}]`),r):r},{}),c=(0,r.traverseGroupItemsContent)({path:e.concat([{key:"repeat",type:"items"}]),model:(null==o?void 0:o.type)==="SharedSlice"?null==o?void 0:o.fields.items:null==o?void 0:o.repeat,content:a.widget.repeat})(u);return s({key:t,apiId:n,path:e,model:o,content:{...a,widget:{__TYPE__:"CompositeSliceContent",repeat:c,nonRepeat:l}}})}},e.migrateCompositeSlice=function(e,t){let[,n]=t.key.split("$");return{key:`${e.sliceName}$${n}`,name:e.sliceName,maybeLabel:t.maybeLabel,widget:{__TYPE__:"SharedSliceContent",variation:e.variationId,primary:Object.entries(t.widget.nonRepeat).reduce((n,[r,i])=>{var o;return!(null===(o=e.fields.primary)||void 0===o)&&o[r]?{...n,[r]:i}:(console.warn(`The widget ${r} in the non-repeat zone of the composite slice [${e.sliceName}] with key [${t.key}] doesn't exist in the model.`),n)},{}),items:t.widget.repeat.map(n=>({__TYPE__:"GroupItemContent",value:n.value.reduce((n,[r,i])=>{var o;return!(null===(o=e.fields.items)||void 0===o)&&o[r]?n.concat([[r,i]]):(console.warn(`The widget ${r} in the repeat zone of the composite slice [${e.sliceName}] with key [${t.key}] doesn't exist in the model.`),n)},[])}),[])}}}}(V0)),V0}var V5,V3,V9={},V4={};function V7(){if(V3)return V4;V3=1,Object.defineProperty(V4,"__esModule",{value:!0}),V4.isSlicePrimaryContent=V4.SlicePrimaryLegacy=V4.SlicePrimaryContent=void 0;let e=(0,P.__importStar)(WJ),t=VZ(),n=Vq();V4.SlicePrimaryContent=e.union([n.NestableContent,t.GroupContent]);let r=e=>{let r=(0,t.GroupLegacy)(e),i=(0,n.NestableLegacy)(e);return{decode:t=>e.fieldType===ND.GroupFieldType?r.decode(t):i.decode(t),encode:e=>(0,t.isGroupContent)(e)?r.encode(e):i.encode(e)}};V4.SlicePrimaryLegacy=r;let i=e=>(0,n.isNestableContent)(e)||(0,t.isGroupContent)(e);return V4.isSlicePrimaryContent=i,V4}function V8(){return ze||(ze=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.traverseSharedSliceContent=e.sharedSliceContentWithDefaultValues=e.SharedSliceContent=e.SharedSliceLegacy=e.isSharedSliceContent=e.SharedSliceContentType=void 0;let t=(0,P.__importStar)(WJ),n=QQ(),r=VZ(),i=Vq(),o=VH(),a=V2(),u=V7();e.SharedSliceContentType="SharedSliceContent";let s=t=>(0,n.hasContentType)(t)&&t.__TYPE__===e.SharedSliceContentType;e.isSharedSliceContent=s;let l=t.exact(t.type({variation:t.string,items:(0,NK.withFallback)(t.array(t.unknown),[]),primary:(0,NK.withFallback)(t.UnknownRecord,{})})),c=n=>new t.Type("SharedSliceLegacy",e.isSharedSliceContent,t=>(0,LQ.pipe)(l.decode(t),LW.either.map(t=>{let r=(()=>{let e=(0,QY.getFieldCtx)("items",n,["variations",t.variation]),r=(0,a.RepeatableWidgetsLegacy)(e).decode(t.items);if(!(!r||(0,LD.isLeft)(r)))return r.right})()||[],i=Object.entries(t.primary).reduce((e,[r,i])=>{let o=(0,QY.getFieldCtx)(r,n,["variations",t.variation,"primary"]),a=(0,u.SlicePrimaryLegacy)(o).decode(i);return!a||(0,LD.isLeft)(a)?e:{...e,[r]:a.right}},{});return{variation:t.variation,primary:i,items:r,__TYPE__:e.SharedSliceContentType}})),e=>{let t=Object.entries(e.primary).reduce((t,[r,i])=>{let o=(0,QY.getFieldCtx)(r,n,["variations",e.variation,"primary"]),a=(0,u.SlicePrimaryLegacy)(o).encode(i);return a?{content:{...t.content,[r]:a.content},types:{...t.types,...a.types}}:t},{content:{},types:{}}),r=(()=>{let t=(0,QY.getFieldCtx)("items",n,["variations",e.variation]);return(0,a.RepeatableWidgetsLegacy)(t).encode(e.items)})()||[];return{content:{primary:t.content,items:r.map(e=>e.content),variation:e.variation},types:{[n.keyOfType]:"SharedSlice",...t.types,...r.reduce((e,t)=>({...e,...t.types}),{})}}});e.SharedSliceLegacy=c,e.SharedSliceContent=t.strict({__TYPE__:t.literal(e.SharedSliceContentType),variation:t.string,primary:t.record(t.string,u.SlicePrimaryContent),items:a.RepeatableWidgets}),e.sharedSliceContentWithDefaultValues=function(e,t){var n,r;let i=e.variations.find(e=>e.id===t.variation),a=null!==(n=null==i?void 0:i.primary)&&void 0!==n?n:{},u=null!==(r=null==i?void 0:i.items)&&void 0!==r?r:{},s=(0,o.withDefaultSlicePrimaryContentValues)(a,t.primary),l=(0,o.repeatableContentWithDefaultNestableContentValues)(u,t.items);return{...t,primary:s,items:l}},e.traverseSharedSliceContent=function({path:e,sliceKey:t,sliceName:n,model:o,content:a}){return(s,l)=>{let c=Object.entries(a.widget.primary).reduce((a,[l,c])=>{var d,f;let p=null===(f=null===(d=null==o?void 0:o.fields)||void 0===d?void 0:d.primary)||void 0===f?void 0:f[l],A=(0,r.isGroupContent)(c)?(0,r.traverseGroupContent)({path:e.concat([{key:"primary",type:"primary"},{key:l,type:"Widget"}]),key:l,apiId:l,content:c,model:(null==p?void 0:p.type)===ND.GroupFieldType?p:void 0})(s):(0,i.isNestableContent)(c)?s({path:e.concat([{key:"primary",type:"primary"},{key:l,type:"Widget"}]),key:l,apiId:l,model:p,content:c}):void 0;return A?((0,u.isSlicePrimaryContent)(A)||console.warn(`Warn: Non nestable or group content with key [${l}] detected in a shared slice [${n}] with key [${t}]`),{...a,[l]:A}):a},{}),d=(0,r.traverseGroupItemsContent)({path:e.concat([{key:"items",type:"items"}]),model:null==o?void 0:o.fields.items,content:a.widget.items})(s);return l({key:t,apiId:n,path:e,model:o,content:{...a,widget:{__TYPE__:"SharedSliceContent",variation:a.widget.variation,primary:c,items:d}}})}}}(V9)),V9}var ze,zt,zn={};function zr(){if(zt)return zn;zt=1,Object.defineProperty(zn,"__esModule",{value:!0}),zn.migrateSimpleSlice=zn.traverseSimpleSliceContent=zn.SimpleSliceLegacy=zn.isSimpleSliceContent=zn.SimpleSliceContent=void 0;let e=(0,P.__importStar)(WJ),t=VZ(),n=Vq();zn.SimpleSliceContent=e.union([n.NestableContent,t.GroupContent]);let r=e=>(0,n.isNestableContent)(e)||(0,t.isGroupContent)(e);zn.isSimpleSliceContent=r;let i=e=>({decode:"Group"===e.fieldType?(0,t.GroupLegacy)(e).decode.bind(null):(0,n.NestableLegacy)(e).decode.bind(null),encode:r=>"GroupContentType"===r.__TYPE__?(0,t.GroupLegacy)(e).encode(r):(0,n.NestableLegacy)(e).encode(r)});return zn.SimpleSliceLegacy=i,zn.traverseSimpleSliceContent=function({path:e,sliceKey:n,sliceName:r,model:i,content:o}){return(a,u)=>{var s;if((0,t.isGroupContent)(o.widget)){let l=(0,t.traverseGroupContent)({path:e,key:o.key,apiId:o.name,model:(null==i?void 0:i.type)==="Group"?i:(null==i?void 0:i.type)==="SharedSlice"?{type:"Group",config:{fields:i.fields.items||{}}}:void 0,content:o.widget})(a);return l&&u({key:o.key,apiId:o.name,path:e,model:i,content:{...o,widget:l}})}let c=a({key:o.key,apiId:o.name,path:e,model:(null==i?void 0:i.type)==="SharedSlice"?null===(s=i.fields.primary)||void 0===s?void 0:s[o.name]:(null==i?void 0:i.type)!=="Group"?i:void 0,content:o.widget});return c&&u({key:n,apiId:r,path:e,model:i,content:{...o,widget:c}})}},zn.migrateSimpleSlice=function(e,t){var n;let[,r]=t.key.split("$"),i=`${e.sliceName}$${r}`;return"GroupContentType"===t.widget.__TYPE__?{key:i,name:e.sliceName,maybeLabel:t.maybeLabel,widget:{__TYPE__:"SharedSliceContent",variation:e.variationId,primary:{},items:t.widget.value.map(t=>({__TYPE__:"GroupItemContent",value:t.value.reduce((t,[n,r])=>{var i;return!(null===(i=e.fields.items)||void 0===i)&&i[n]?t.concat([[n,r]]):t},[])}),[])}}:{key:i,name:e.sliceName,maybeLabel:t.maybeLabel,widget:{__TYPE__:"SharedSliceContent",variation:e.variationId,primary:!(null===(n=e.fields.primary)||void 0===n)&&n[t.name]?{[t.name]:t.widget}:{},items:[]}}},zn}function zi(){return zo||(zo=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SliceContent=e.SliceLegacy=void 0;let t=(0,P.__importStar)(WJ),n=V6(),r=V8(),i=zr(),o=e=>({decode:t=>(()=>{switch(e.fieldType){case"Slice":return(0,n.CompositeSliceLegacy)(e);case"SharedSlice":return(0,r.SharedSliceLegacy)(e);default:return(0,i.SimpleSliceLegacy)(e)}})().decode(t),encode(t){switch(t.__TYPE__){case"SharedSliceContent":return(0,r.SharedSliceLegacy)(e).encode(t);case"CompositeSliceContent":return(0,n.CompositeSliceLegacy)(e).encode(t);default:return(0,i.SimpleSliceLegacy)(e).encode(t)}}});e.SliceLegacy=o,e.SliceContent=t.union([n.CompositeSliceContent,r.SharedSliceContent,i.SimpleSliceContent]),(0,P.__exportStar)(V6(),e),(0,P.__exportStar)(V8(),e),(0,P.__exportStar)(zr(),e),(0,P.__exportStar)(V7(),e)}(VX)),VX}var zo,za,zu={};function zs(){if(za)return zu;za=1,Object.defineProperty(zu,"__esModule",{value:!0}),zu.migrateSliceItem=zu.SlicesItemLegacy=zu.sliceItemContentWithDefaultValues=zu.isSimpleSliceItemContent=zu.isCompositeSliceItemContent=zu.isSharedSliceItemContent=zu.SliceItemContent=void 0;let e=(0,P.__importStar)(WJ),t=VZ(),n=Vq(),r=VH(),i=zi(),o=V6(),a=V8(),u=zr();function s(e){return(0,o.isCompositeSliceContent)(e.widget)}function l(e){return(0,t.isGroupContent)(e.widget)||(0,n.isNestableContent)(e.widget)}zu.SliceItemContent=e.type({key:e.string,name:e.string,maybeLabel:e.union([e.string,e.undefined]),widget:i.SliceContent}),zu.isSharedSliceItemContent=function(e){return(0,a.isSharedSliceContent)(e.widget)},zu.isCompositeSliceItemContent=s,zu.isSimpleSliceItemContent=l,zu.sliceItemContentWithDefaultValues=function(e,n){var u;if("SharedSlice"===e.type&&(0,a.isSharedSliceContent)(n))return(0,i.sharedSliceContentWithDefaultValues)(e,n);if("Slice"===e.type&&(0,o.isCompositeSliceContent)(n))return(0,i.compositeSliceContentWithDefaultValues)(e,n);if("Group"===e.type&&(0,t.isGroupContent)(n)&&!(null===(u=e.config)||void 0===u)&&u.fields){let s=(0,r.repeatableContentWithDefaultNestableContentValues)(e.config.fields,n.value);return{...n,value:s}}return n};let c=e.exact(e.intersection([e.type({key:e.string,value:e.unknown}),e.partial({label:(0,W5.nullable)(e.string)})])),d=t=>new e.Type("SlicesItemLegacy",e=>((0,a.isSharedSliceContent)(e.widget),(0,o.isCompositeSliceContent)(e.widget),(0,u.isSimpleSliceContent)(e.widget)),(n,r)=>(0,LQ.pipe)(c.decode(n),LW.either.chain(o=>{var a;let u=o.key.indexOf("$"),s=o.key.substring(0,u>0?u:void 0),l=(0,QY.getFieldCtx)(s,t),c=(0,i.SliceLegacy)(l).decode(o.value);return!c||(0,LD.isLeft)(c)?e.failure(n,r):e.success({key:o.key,name:s,maybeLabel:null!==(a=o.label)&&void 0!==a?a:void 0,widget:c.right})})),e=>{let n=(0,QY.getFieldCtx)(e.name,t),r=(0,i.SliceLegacy)(n).encode(e.widget);return{content:{key:e.key,label:e.maybeLabel,value:(null==r?void 0:r.content)||{}},types:(null==r?void 0:r.types)||{}}});zu.SlicesItemLegacy=d;let f=({model:e,content:t})=>s(t)&&(null==e?void 0:e.type)==="SharedSlice"?(0,o.migrateCompositeSlice)(e,t):l(t)&&(null==e?void 0:e.type)==="SharedSlice"?(0,u.migrateSimpleSlice)(e,t):t;return zu.migrateSliceItem=f,zu}var zl,zc={};function zd(){var e;return zf||(zf=1,Object.defineProperty(V$,"__esModule",{value:!0}),(0,P.__exportStar)(zi(),V$),(0,P.__exportStar)(zs(),V$),(0,P.__exportStar)((zl||(zl=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.traverseSlices=e.slicesContentWithDefaultValues=e.SlicesContent=e.SlicesLegacy=e.isSlicesContent=e.SlicesContentType=void 0;let t=(0,P.__importStar)(WJ),n=QQ(),r=V6(),i=V8(),o=zr(),a=zs();e.SlicesContentType="SliceContentType";let u=t=>(0,n.hasContentType)(t)&&t.__TYPE__===e.SlicesContentType;e.isSlicesContent=u;let s=n=>{let r=t.array((0,a.SlicesItemLegacy)(n));return new t.Type("SlicesLegacy",e.isSlicesContent,t=>(0,LQ.pipe)(r.decode(t),LW.either.map(t=>({__TYPE__:e.SlicesContentType,value:t}))),e=>{let t=r.encode(e.value);return{content:t.map(e=>e.content),types:t.reduce((e,t)=>({...e,...t.types}),{[n.keyOfType]:"Slices"})}})};e.SlicesLegacy=s,e.SlicesContent=t.type({__TYPE__:t.literal(e.SlicesContentType),value:t.array(a.SliceItemContent)}),e.slicesContentWithDefaultValues=function(e,t){var n;let r=null===(n=null==e?void 0:e.config)||void 0===n?void 0:n.choices;if(void 0===r)return t;let i=t.value.map(e=>{let t=r[e.name];if(t){let n=(0,a.sliceItemContentWithDefaultValues)(t,e.widget);return{...e,widget:n}}return e});return{...t,value:i}},e.traverseSlices=function({path:e,key:t,model:n,content:u}){return({transformWidget:s=({content:e})=>e,transformSlice:l=({content:e})=>e})=>{let c=u.value.reduce((t,u)=>{let c=n&&function(e,t,n){var r,i;let o=null===(i=null===(r=null==t?void 0:t.config)||void 0===r?void 0:r.choices)||void 0===i?void 0:i[n.name];return(()=>{if((0,a.isSharedSliceItemContent)(n)&&o&&(0,ND.isStaticSharedSlice)(o)){let e=o.variations.find(e=>e.id===n.widget.variation);return e?{type:"SharedSlice",sliceName:o.id,variationId:e.id,fields:{primary:e.primary||{},items:e.items||{}}}:void 0}})()||(()=>{var r;let i=WG.ContentPath.append(WG.ContentPath.serialize(e),n.name),o=Object.values((null===(r=null==t?void 0:t.config)||void 0===r?void 0:r.choices)||{}).find(e=>{var t;return!!(0,ND.isStaticSharedSlice)(e)&&!!(!(null===(t=e.legacyPaths)||void 0===t)&&t[i])});if(!o)return;let a=null==o?void 0:o.variations.find(e=>{var t;return e.id===(null===(t=o.legacyPaths)||void 0===t?void 0:t[i])});if(a)return{type:"SharedSlice",sliceName:o.id,variationId:a.id,fields:{primary:a.primary||{},items:a.items||{}}}})()||(()=>{if(o){if((0,ND.isCompositeSlice)(o))return{type:"Slice","non-repeat":o["non-repeat"]||{},repeat:o.repeat||{}};if((0,ND.isLegacySlice)(o))return o}})()}(e,n,u),d=(0,a.isSharedSliceItemContent)(u)?(0,i.traverseSharedSliceContent)({path:e.concat({key:u.key,type:"SharedSlice"}),sliceKey:u.key,sliceName:u.name,model:(null==c?void 0:c.type)==="SharedSlice"?c:void 0,content:u})(s,l):(0,a.isCompositeSliceItemContent)(u)?(0,r.traverseCompositeSliceContent)({path:e.concat({key:u.key,type:"Slice"}),sliceKey:u.key,sliceName:u.name,model:(null==c?void 0:c.type)==="Slice"||(null==c?void 0:c.type)==="SharedSlice"?c:void 0,content:u})(s,l):(0,a.isSimpleSliceItemContent)(u)?(0,o.traverseSimpleSliceContent)({path:e.concat({key:u.key,type:"LegacySlice"}),sliceKey:u.key,sliceName:u.name,model:c&&(null==c?void 0:c.type)!=="Slice"?c:void 0,content:u})(s,l):void 0;return d?t.concat(d):t},[]);return s({path:e,key:t,apiId:t,model:n,content:{__TYPE__:u.__TYPE__,value:c}})}}}(zc)),zc),V$)),V$}var zf,zp,zA={};function zh(){return zp||(zp=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.UIDContent=e.UIDLegacy=e.isUIDContent=e.UIDContentType=void 0;let t=(0,P.__importStar)(WJ),n=QQ();e.UIDContentType="UIDContent";let r=t=>(0,n.hasContentType)(t)&&t.__TYPE__===e.UIDContentType;e.isUIDContent=r;let i=n=>new t.Type("UIDLegacy",e.isUIDContent,n=>(0,LQ.pipe)(t.string.decode(n),LW.either.map(t=>e.UIDContent.encode({value:t,__TYPE__:e.UIDContentType}))),e=>({content:e.value,types:{[n.keyOfType]:"UID"}}));e.UIDLegacy=i,e.UIDContent=t.type({__TYPE__:t.literal(e.UIDContentType),value:t.string})}(zA)),zA}var zm,zg={};function zy(){var e;return r||(r=1,Object.defineProperty(QD,"__esModule",{value:!0}),(0,P.__exportStar)(QV(),QD),(0,P.__exportStar)(VZ(),QD),(0,P.__exportStar)(Vq(),QD),(0,P.__exportStar)(zd(),QD),(0,P.__exportStar)(zh(),QD),(0,P.__exportStar)(function(){if(zm)return zg;zm=1,Object.defineProperty(zg,"__esModule",{value:!0}),zg.WidgetLegacy=zg.isWidgetContent=zg.WidgetContent=void 0;let e=(0,P.__importStar)(WJ),t=VZ(),n=Vq(),r=zd(),i=zh();zg.WidgetContent=e.union([t.GroupContent,n.NestableContent,i.UIDContent,r.SlicesContent]);let o=e=>(0,t.isGroupContent)(e)||(0,n.isNestableContent)(e)||(0,i.isUIDContent)(e)||(0,r.isSlicesContent)(e);zg.isWidgetContent=o;let a=e=>({decode(o){if(!e.fieldType)return;let a=(()=>{switch(e.fieldType){case"UID":return(0,i.UIDLegacy)(e);case"Group":return(0,t.GroupLegacy)(e);case"Choice":case"Slices":return(0,r.SlicesLegacy)(e);default:return(0,n.NestableLegacy)(e)}})();if(a)return a.decode(o)},encode(o){switch(o.__TYPE__){case i.UIDContentType:return(0,i.UIDLegacy)(e).encode(o);case t.GroupContentType:return(0,t.GroupLegacy)(e).encode(o);case r.SlicesContentType:return(0,r.SlicesLegacy)(e).encode(o);default:return(0,n.NestableLegacy)(e).encode(o)}}});return zg.WidgetLegacy=a,zg}(),QD)),QD}Object.defineProperty(W,"__esModule",{value:!0}),W.migrateDocument=W.collectWidgets=W.traverseDocument=W.fillDocumentWithDefaultValues=W.DocumentLegacy=W.Document=void 0;let zv=(0,P.__importStar)(WJ),zx=zy();W.Document=zv.record(W$.WidgetKey,zx.WidgetContent);let zb=zv.record(W$.WidgetKey,zv.unknown),zC=e=>new zv.Type("Document",e=>!!e&&"object"==typeof e,t=>(0,LQ.pipe)(zb.decode(t),LW.either.map(t=>Object.entries(t).reduce((t,[n,r])=>{let i=(0,QY.defaultCtx)(n,e),o=(0,zx.WidgetLegacy)(i).decode(r);return!o||(0,LD.isLeft)(o)?t:{...t,[n]:o.right}},{}))),t=>Object.entries(t).reduce((t,[n,r])=>{let i=(0,QY.defaultCtx)(n,e),o=(0,zx.WidgetLegacy)(i).encode(r);return o?{content:{...t.content,[n]:o.content},types:{...t.types,...o.types}}:t},{content:{},types:{}}));function zS(e){let t=Object.entries(e),{types:n,widgets:r}=t.reduce((e,[t,n])=>{if(t.endsWith("_TYPE")){let r=QY.FieldOrSliceType.decode(n);if((0,LD.isRight)(r))return{...e,types:e.types.set(t.substring(0,t.length-5),r.right)}}return t.endsWith("_POSITION")||t.endsWith("_TYPE")?e:{...e,widgets:{...e.widgets,[t]:n}}},{types:new Map,widgets:{}}),i=e.slugs_INTERNAL||[],o=e.uid;return{widgets:r,types:n,uid:o,slugs:i}}function zw(e){return{customTypeId:null==e?void 0:e.id,fields:Object.fromEntries((0,ND.flattenSections)(e))}}function zI({document:e,customType:t}){let n=t&&ND.StaticCustomType.is(t)?zw(t):t;return({transformWidget:t=({content:e})=>e,transformSlice:r=({content:e})=>e})=>{let i=n&&Object.entries(n.fields).reduce((e,[t,n])=>({...e,[t]:n}),{});return Object.entries(e).reduce((e,[o,a])=>{let u=i&&i[o],s=WG.ContentPath.make([{key:null==n?void 0:n.customTypeId,type:"CustomType"},{key:o,type:"Widget"}]),l=(()=>{switch(a.__TYPE__){case"SliceContentType":return(0,zx.traverseSlices)({path:s,key:o,model:(null==u?void 0:u.type)==="Slices"||(null==u?void 0:u.type)==="Choice"?u:void 0,content:a})({transformWidget:t,transformSlice:r});case"GroupContentType":return(0,zx.traverseGroupContent)({path:s,key:o,apiId:o,model:(null==u?void 0:u.type)==="Group"?u:void 0,content:a})(t);default:return t({path:s,key:o,apiId:o,model:(null==u?void 0:u.type)!=="Group"&&(null==u?void 0:u.type)!=="Slices"&&(null==u?void 0:u.type)!=="Choice"?u:void 0,content:a})}})();return{...e,...l?{[o]:l}:{}}},{})}}function z_(e,t){let n=ND.StaticCustomType.is(t)?zw(t):t;return Object.values((0,ND.collectSharedSlices)(n)).some(e=>!!e.legacyPaths)?zI({document:e,customType:t})({transformSlice:zx.migrateSliceItem}):e}W.DocumentLegacy={_codec:zC,extractMetadata:zS,parse:function(e,t){let n=(0,LQ.pipe)(zv.record(W$.WidgetKey,zv.unknown).decode(e),LW.either.chain(e=>{let{types:t,widgets:n}=zS(e);return zC(t).decode(n)}));return(0,LD.isLeft)(n)?void 0:z_(n.right,t)},encode:function(e){let t=zC().encode(e);return{...t.content,...t.types}}},W.fillDocumentWithDefaultValues=function(e,t){let{fields:n}=e&&ND.StaticCustomType.is(e)?zw(e):e;return Object.entries(n).reduce((e,[n,r])=>{let i=t[n],o=(()=>{switch(r.type){case"Group":return(0,zx.isGroupContent)(i)?(0,zx.groupContentWithDefaultValues)(r,i):i;case"Choice":case"Slices":return(0,zx.isSlicesContent)(i)?(0,zx.slicesContentWithDefaultValues)(r,i):i;default:return void 0===i&&ND.NestableWidget.is(r)?(0,zx.NestableContentDefaultValue)(r):i}})();return o?{...e,[n]:o}:e},t)},W.traverseDocument=zI,W.collectWidgets=function(e,t){let n={};return zI({document:e})({transformWidget({content:e,path:r}){let i=WG.ContentPath.serialize(r);return t(e,r)&&(n[i]=e),e}}),n},W.migrateDocument=z_,Object.defineProperty(eiM=k,"__esModule",{value:!0}),(0,P.__exportStar)(W,eiM),(0,P.__exportStar)(zy(),eiM),(0,P.__exportStar)(QY,eiM);let zT={unclassified:{title:"Draft",color:"amber"},published:{title:"Live",color:"green"},release:{title:"Planned",color:"purple"},archived:{title:"Archived",color:"grey"}},zO={unclassified:["unclassified","published"],archived:["unclassified","published"],release:["release","published"],published:["published"]};function zR(e){let{documentId:t,versionId:n,baseUrl:r,status:i,releaseId:o}=e,a=(0,l.aO)({params:{s:i,v:n,r:o}}),u=new URLSearchParams(a).toString();return new URL(`pages/${t}?${u}`,r)}var zk={exports:{}},zE={};zk.exports=function(){if(i)return zE;i=1;var e=Symbol.for("react.element"),t=Symbol.for("react.fragment"),n=Object.prototype.hasOwnProperty,r=c.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,o={key:!0,ref:!0,__self:!0,__source:!0};function a(t,i,a){var u,s={},l=null,c=null;for(u in void 0!==a&&(l=""+a),void 0!==i.key&&(l=""+i.key),void 0!==i.ref&&(c=i.ref),i)n.call(i,u)&&!o.hasOwnProperty(u)&&(s[u]=i[u]);if(t&&t.defaultProps)for(u in i=t.defaultProps)void 0===s[u]&&(s[u]=i[u]);return{$$typeof:e,type:t,key:l,ref:c,props:s,_owner:r.current}}return zE.Fragment=t,zE.jsx=a,zE.jsxs=a,zE}();var zM=zk.exports;let zF="media-library-newMediaLibraryFeaturesBannerClosed";function zj(e){let{maxWidth:t}=e,[n,r]=(0,c.useState)(()=>!(b.Xb.isAvailable()&&b.Xb.read(zF)));return n?zM.jsx(f.xu,{justifyContent:"center",padding:{inline:16,block:12},backgroundColor:"purple9",children:zM.jsxs(f.xu,{maxWidth:t,width:"100%",alignItems:"center",gap:8,children:[zM.jsx(f.xu,{borderRadius:"100%",alignItems:"center",justifyContent:"center",width:28,height:28,border:!0,borderColor:"purple8",flexShrink:0,children:zM.jsx(f.I5,{name:"autoFixHigh",color:"white",size:"small"})}),zM.jsxs("div",{children:[zM.jsx(f.xv,{color:"white",variant:"bold",children:"New features on the Media Library now available!"}),zM.jsxs(f.xu,{gap:4,flexWrap:"wrap",children:[zM.jsx(f.xv,{color:"white",children:"Media Tagging, Filtering, Improved Search & Bulk Deletion"}),zM.jsx(f.xv,{color:"white",variant:"bold",href:"https://prismic.io/lp/new-media-library",target:"_blank",rel:"noopener noreferrer",underline:!0,children:"Find out More →"})]})]}),zM.jsx(f.zx,{invisible:!0,color:"white",sx:{marginLeft:"auto",marginBottom:"auto",flexShrink:0},underline:!0,onClick:function(){r(!1),b.Xb.isAvailable()&&b.Xb.write(zF,String(Date.now()))},children:"Close"})]})}):null}function zU(){return zM.jsx(f.xu,{justifyContent:"center",flexDirection:"column",height:"100%",backgroundColor:"grey3",children:zM.jsxs(f.R$,{children:[zM.jsx(f.av,{name:"close",lineColor:"purple10",backgroundColor:"purple3",borderColor:"purple6",borderStyle:"dashed",size:"xlarge"}),zM.jsx(f._T,{size:"big",children:'"Oops!"'}),zM.jsx(f.nf,{width:360,children:'"We can\'t find any items with that name"'})]})})}let zK={warning:{uploadWhileUploading:{title:"Hang tight!",description:"Your current images are still being uploaded. Once they're all set, you'll be free to upload more."}}},zL=(0,c.createContext)(void 0);function zB(){let e=(0,c.useContext)(zL);if(!e)throw Error("Missing EditorConfigContext.Provider");return e}class zP extends Error{}function zW(e){throw new zP(`Missing EditorConfig.${e}`)}(eiF=o||(o={})).assertEqual=e=>e,eiF.assertIs=function(e){},eiF.assertNever=function(e){throw Error()},eiF.arrayToEnum=e=>{let t={};for(let n of e)t[n]=n;return t},eiF.getValidEnumValues=e=>{let t=eiF.objectKeys(e).filter(t=>"number"!=typeof e[e[t]]),n={};for(let r of t)n[r]=e[r];return eiF.objectValues(n)},eiF.objectValues=e=>eiF.objectKeys(e).map(function(t){return e[t]}),eiF.objectKeys="function"==typeof Object.keys?e=>Object.keys(e):e=>{let t=[];for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.push(n);return t},eiF.find=(e,t)=>{for(let n of e)if(t(n))return n},eiF.isInteger="function"==typeof Number.isInteger?e=>Number.isInteger(e):e=>"number"==typeof e&&isFinite(e)&&Math.floor(e)===e,eiF.joinValues=function(e,t=" | "){return e.map(e=>"string"==typeof e?`'${e}'`:e).join(t)},eiF.jsonStringifyReplacer=(e,t)=>"bigint"==typeof t?t.toString():t,(eij=a||(a={})).mergeShapes=(e,t)=>({...e,...t});let zD=o.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),zN=e=>{switch(typeof e){case"undefined":return zD.undefined;case"string":return zD.string;case"number":return isNaN(e)?zD.nan:zD.number;case"boolean":return zD.boolean;case"function":return zD.function;case"bigint":return zD.bigint;case"symbol":return zD.symbol;case"object":return Array.isArray(e)?zD.array:null===e?zD.null:e.then&&"function"==typeof e.then&&e.catch&&"function"==typeof e.catch?zD.promise:"u">typeof Map&&e instanceof Map?zD.map:"u">typeof Set&&e instanceof Set?zD.set:"u">typeof Date&&e instanceof Date?zD.date:zD.object;default:return zD.unknown}},zq=o.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),zQ=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:");class zV extends Error{constructor(e){super(),this.issues=[],this.addIssue=e=>{this.issues=[...this.issues,e]},this.addIssues=(e=[])=>{this.issues=[...this.issues,...e]};let t=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,t):this.__proto__=t,this.name="ZodError",this.issues=e}get errors(){return this.issues}format(e){let t=e||function(e){return e.message},n={_errors:[]},r=e=>{for(let i of e.issues)if("invalid_union"===i.code)i.unionErrors.map(r);else if("invalid_return_type"===i.code)r(i.returnTypeError);else if("invalid_arguments"===i.code)r(i.argumentsError);else if(0===i.path.length)n._errors.push(t(i));else{let o=n,a=0;for(;a<i.path.length;){let u=i.path[a];a===i.path.length-1?(o[u]=o[u]||{_errors:[]},o[u]._errors.push(t(i))):o[u]=o[u]||{_errors:[]},o=o[u],a++}}};return r(this),n}toString(){return this.message}get message(){return JSON.stringify(this.issues,o.jsonStringifyReplacer,2)}get isEmpty(){return 0===this.issues.length}flatten(e=e=>e.message){let t={},n=[];for(let r of this.issues)r.path.length>0?(t[r.path[0]]=t[r.path[0]]||[],t[r.path[0]].push(e(r))):n.push(e(r));return{formErrors:n,fieldErrors:t}}get formErrors(){return this.flatten()}}zV.create=e=>new zV(e);let zz=(e,t)=>{let n;switch(e.code){case zq.invalid_type:n=e.received===zD.undefined?"Required":`Expected ${e.expected}, received ${e.received}`;break;case zq.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,o.jsonStringifyReplacer)}`;break;case zq.unrecognized_keys:n=`Unrecognized key(s) in object: ${o.joinValues(e.keys,", ")}`;break;case zq.invalid_union:n="Invalid input";break;case zq.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${o.joinValues(e.options)}`;break;case zq.invalid_enum_value:n=`Invalid enum value. Expected ${o.joinValues(e.options)}, received '${e.received}'`;break;case zq.invalid_arguments:n="Invalid function arguments";break;case zq.invalid_return_type:n="Invalid function return type";break;case zq.invalid_date:n="Invalid date";break;case zq.invalid_string:"object"==typeof e.validation?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,"number"==typeof e.validation.position&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:o.assertNever(e.validation):n="regex"!==e.validation?`Invalid ${e.validation}`:"Invalid";break;case zq.too_small:n="array"===e.type?`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:"string"===e.type?`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:"number"===e.type?`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:"date"===e.type?`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:"Invalid input";break;case zq.too_big:n="array"===e.type?`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:"string"===e.type?`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:"number"===e.type?`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:"bigint"===e.type?`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:"date"===e.type?`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:"Invalid input";break;case zq.custom:n="Invalid input";break;case zq.invalid_intersection_types:n="Intersection results could not be merged";break;case zq.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case zq.not_finite:n="Number must be finite";break;default:n=t.defaultError,o.assertNever(e)}return{message:n}},zY=zz;function zH(e){zY=e}function zZ(){return zY}let zJ=e=>{let{data:t,path:n,errorMaps:r,issueData:i}=e,o=[...n,...i.path||[]],a={...i,path:o},u="",s=r.filter(e=>!!e).slice().reverse();for(let l of s)u=l(a,{data:t,defaultError:u}).message;return{...i,path:o,message:i.message||u}};function zG(e,t){let n=zJ({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,zY,zz].filter(e=>!!e)});e.common.issues.push(n)}class z${constructor(){this.value="valid"}dirty(){"valid"===this.value&&(this.value="dirty")}abort(){"aborted"!==this.value&&(this.value="aborted")}static mergeArray(e,t){let n=[];for(let r of t){if("aborted"===r.status)return zX;"dirty"===r.status&&e.dirty(),n.push(r.value)}return{status:e.value,value:n}}static async mergeObjectAsync(e,t){let n=[];for(let r of t)n.push({key:await r.key,value:await r.value});return z$.mergeObjectSync(e,n)}static mergeObjectSync(e,t){let n={};for(let r of t){let{key:i,value:o}=r;if("aborted"===i.status||"aborted"===o.status)return zX;"dirty"===i.status&&e.dirty(),"dirty"===o.status&&e.dirty(),("u">typeof o.value||r.alwaysSet)&&(n[i.value]=o.value)}return{status:e.value,value:n}}}let zX=Object.freeze({status:"aborted"}),z0=e=>({status:"dirty",value:e}),z1=e=>({status:"valid",value:e}),z2=e=>"aborted"===e.status,z6=e=>"dirty"===e.status,z5=e=>"valid"===e.status,z3=e=>"u">typeof Promise&&e instanceof Promise;(eiU=u||(u={})).errToObj=e=>"string"==typeof e?{message:e}:e||{},eiU.toString=e=>"string"==typeof e?e:null==e?void 0:e.message;class z9{constructor(e,t,n,r){this._cachedPath=[],this.parent=e,this.data=t,this._path=n,this._key=r}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}let z4=(e,t)=>{if(z5(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;let n=new zV(e.common.issues);return this._error=n,this._error}}};function z7(e){if(!e)return{};let{errorMap:t,invalid_type_error:n,required_error:r,description:i}=e;if(t&&(n||r))throw Error('Can\'t use "invalid_type_error" or "required_error" in conjunction with custom error map.');return t?{errorMap:t,description:i}:{errorMap:(e,t)=>"invalid_type"!==e.code?{message:t.defaultError}:typeof t.data>"u"?{message:r??t.defaultError}:{message:n??t.defaultError},description:i}}class z8{constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(e){return zN(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:zN(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new z$,ctx:{common:e.parent.common,data:e.data,parsedType:zN(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){let t=this._parse(e);if(z3(t))throw Error("Synchronous parse encountered promise.");return t}_parseAsync(e){let t=this._parse(e);return Promise.resolve(t)}parse(e,t){let n=this.safeParse(e,t);if(n.success)return n.data;throw n.error}safeParse(e,t){var n;let r={common:{issues:[],async:null!==(n=null==t?void 0:t.async)&&void 0!==n&&n,contextualErrorMap:null==t?void 0:t.errorMap},path:(null==t?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:zN(e)},i=this._parseSync({data:e,path:r.path,parent:r});return z4(r,i)}async parseAsync(e,t){let n=await this.safeParseAsync(e,t);if(n.success)return n.data;throw n.error}async safeParseAsync(e,t){let n={common:{issues:[],contextualErrorMap:null==t?void 0:t.errorMap,async:!0},path:(null==t?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:zN(e)},r=this._parse({data:e,path:n.path,parent:n}),i=await (z3(r)?r:Promise.resolve(r));return z4(n,i)}refine(e,t){let n=e=>"string"==typeof t||typeof t>"u"?{message:t}:"function"==typeof t?t(e):t;return this._refinement((t,r)=>{let i=e(t),o=()=>r.addIssue({code:zq.custom,...n(t)});return"u">typeof Promise&&i instanceof Promise?i.then(e=>!!e||(o(),!1)):!!i||(o(),!1)})}refinement(e,t){return this._refinement((n,r)=>!!e(n)||(r.addIssue("function"==typeof t?t(n,r):t),!1))}_refinement(e){return new YW({schema:this,typeName:s.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}optional(){return YD.create(this,this._def)}nullable(){return YN.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return YS.create(this,this._def)}promise(){return YP.create(this,this._def)}or(e){return YI.create([this,e],this._def)}and(e){return YO.create(this,e,this._def)}transform(e){return new YW({...z7(this._def),schema:this,typeName:s.ZodEffects,effect:{type:"transform",transform:e}})}default(e){return new Yq({...z7(this._def),innerType:this,defaultValue:"function"==typeof e?e:()=>e,typeName:s.ZodDefault})}brand(){return new YY({typeName:s.ZodBranded,type:this,...z7(this._def)})}catch(e){return new YQ({...z7(this._def),innerType:this,catchValue:"function"==typeof e?e:()=>e,typeName:s.ZodCatch})}describe(e){let t=this.constructor;return new t({...this._def,description:e})}pipe(e){return YH.create(this,e)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}let Ye=/^c[^\s-]{8,}$/i,Yt=/^[a-z][a-z0-9]*$/,Yn=/[0-9A-HJKMNP-TV-Z]{26}/,Yr=/^([a-f0-9]{8}-[a-f0-9]{4}-[1-5][a-f0-9]{3}-[a-f0-9]{4}-[a-f0-9]{12}|00000000-0000-0000-0000-000000000000)$/i,Yi=/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\])|(\[IPv6:(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))\])|([A-Za-z0-9]([A-Za-z0-9-]*[A-Za-z0-9])*(\.[A-Za-z]{2,})+))$/,Yo=RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u"),Ya=/^(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))$/,Yu=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,Ys=e=>e.precision?e.offset?RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${e.precision}}(([+-]\\d{2}(:?\\d{2})?)|Z)$`):RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${e.precision}}Z$`):0===e.precision?e.offset?RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(([+-]\\d{2}(:?\\d{2})?)|Z)$"):RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$"):e.offset?RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(([+-]\\d{2}(:?\\d{2})?)|Z)$"):RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$");function Yl(e,t){return!!(("v4"===t||!t)&&Ya.test(e)||("v6"===t||!t)&&Yu.test(e))}class Yc extends z8{constructor(){super(...arguments),this._regex=(e,t,n)=>this.refinement(t=>e.test(t),{validation:t,code:zq.invalid_string,...u.errToObj(n)}),this.nonempty=e=>this.min(1,u.errToObj(e)),this.trim=()=>new Yc({...this._def,checks:[...this._def.checks,{kind:"trim"}]}),this.toLowerCase=()=>new Yc({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]}),this.toUpperCase=()=>new Yc({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==zD.string){let t=this._getOrReturnCtx(e);return zG(t,{code:zq.invalid_type,expected:zD.string,received:t.parsedType}),zX}let n=new z$,r;for(let i of this._def.checks)if("min"===i.kind)e.data.length<i.value&&(zG(r=this._getOrReturnCtx(e,r),{code:zq.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),n.dirty());else if("max"===i.kind)e.data.length>i.value&&(zG(r=this._getOrReturnCtx(e,r),{code:zq.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),n.dirty());else if("length"===i.kind){let a=e.data.length>i.value,u=e.data.length<i.value;(a||u)&&(r=this._getOrReturnCtx(e,r),a?zG(r,{code:zq.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):u&&zG(r,{code:zq.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),n.dirty())}else if("email"===i.kind)Yi.test(e.data)||(zG(r=this._getOrReturnCtx(e,r),{validation:"email",code:zq.invalid_string,message:i.message}),n.dirty());else if("emoji"===i.kind)Yo.test(e.data)||(zG(r=this._getOrReturnCtx(e,r),{validation:"emoji",code:zq.invalid_string,message:i.message}),n.dirty());else if("uuid"===i.kind)Yr.test(e.data)||(zG(r=this._getOrReturnCtx(e,r),{validation:"uuid",code:zq.invalid_string,message:i.message}),n.dirty());else if("cuid"===i.kind)Ye.test(e.data)||(zG(r=this._getOrReturnCtx(e,r),{validation:"cuid",code:zq.invalid_string,message:i.message}),n.dirty());else if("cuid2"===i.kind)Yt.test(e.data)||(zG(r=this._getOrReturnCtx(e,r),{validation:"cuid2",code:zq.invalid_string,message:i.message}),n.dirty());else if("ulid"===i.kind)Yn.test(e.data)||(zG(r=this._getOrReturnCtx(e,r),{validation:"ulid",code:zq.invalid_string,message:i.message}),n.dirty());else if("url"===i.kind)try{new URL(e.data)}catch{zG(r=this._getOrReturnCtx(e,r),{validation:"url",code:zq.invalid_string,message:i.message}),n.dirty()}else"regex"===i.kind?(i.regex.lastIndex=0,i.regex.test(e.data)||(zG(r=this._getOrReturnCtx(e,r),{validation:"regex",code:zq.invalid_string,message:i.message}),n.dirty())):"trim"===i.kind?e.data=e.data.trim():"includes"===i.kind?e.data.includes(i.value,i.position)||(zG(r=this._getOrReturnCtx(e,r),{code:zq.invalid_string,validation:{includes:i.value,position:i.position},message:i.message}),n.dirty()):"toLowerCase"===i.kind?e.data=e.data.toLowerCase():"toUpperCase"===i.kind?e.data=e.data.toUpperCase():"startsWith"===i.kind?e.data.startsWith(i.value)||(zG(r=this._getOrReturnCtx(e,r),{code:zq.invalid_string,validation:{startsWith:i.value},message:i.message}),n.dirty()):"endsWith"===i.kind?e.data.endsWith(i.value)||(zG(r=this._getOrReturnCtx(e,r),{code:zq.invalid_string,validation:{endsWith:i.value},message:i.message}),n.dirty()):"datetime"===i.kind?Ys(i).test(e.data)||(zG(r=this._getOrReturnCtx(e,r),{code:zq.invalid_string,validation:"datetime",message:i.message}),n.dirty()):"ip"===i.kind?Yl(e.data,i.version)||(zG(r=this._getOrReturnCtx(e,r),{validation:"ip",code:zq.invalid_string,message:i.message}),n.dirty()):o.assertNever(i);return{status:n.value,value:e.data}}_addCheck(e){return new Yc({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...u.errToObj(e)})}url(e){return this._addCheck({kind:"url",...u.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...u.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...u.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...u.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...u.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...u.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...u.errToObj(e)})}datetime(e){var t;return"string"==typeof e?this._addCheck({kind:"datetime",precision:null,offset:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof(null==e?void 0:e.precision)>"u"?null:null==e?void 0:e.precision,offset:null!==(t=null==e?void 0:e.offset)&&void 0!==t&&t,...u.errToObj(null==e?void 0:e.message)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,...u.errToObj(t)})}includes(e,t){return this._addCheck({kind:"includes",value:e,position:null==t?void 0:t.position,...u.errToObj(null==t?void 0:t.message)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,...u.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,...u.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,...u.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,...u.errToObj(t)})}length(e,t){return this._addCheck({kind:"length",value:e,...u.errToObj(t)})}get isDatetime(){return!!this._def.checks.find(e=>"datetime"===e.kind)}get isEmail(){return!!this._def.checks.find(e=>"email"===e.kind)}get isURL(){return!!this._def.checks.find(e=>"url"===e.kind)}get isEmoji(){return!!this._def.checks.find(e=>"emoji"===e.kind)}get isUUID(){return!!this._def.checks.find(e=>"uuid"===e.kind)}get isCUID(){return!!this._def.checks.find(e=>"cuid"===e.kind)}get isCUID2(){return!!this._def.checks.find(e=>"cuid2"===e.kind)}get isULID(){return!!this._def.checks.find(e=>"ulid"===e.kind)}get isIP(){return!!this._def.checks.find(e=>"ip"===e.kind)}get minLength(){let e=null;for(let t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(let t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}}function Yd(e,t){let n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,i=n>r?n:r,o=parseInt(e.toFixed(i).replace(".","")),a=parseInt(t.toFixed(i).replace(".",""));return o%a/Math.pow(10,i)}Yc.create=e=>{var t;return new Yc({checks:[],typeName:s.ZodString,coerce:null!==(t=null==e?void 0:e.coerce)&&void 0!==t&&t,...z7(e)})};class Yf extends z8{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==zD.number){let t=this._getOrReturnCtx(e);return zG(t,{code:zq.invalid_type,expected:zD.number,received:t.parsedType}),zX}let n,r=new z$;for(let i of this._def.checks)"int"===i.kind?o.isInteger(e.data)||(zG(n=this._getOrReturnCtx(e,n),{code:zq.invalid_type,expected:"integer",received:"float",message:i.message}),r.dirty()):"min"===i.kind?(i.inclusive?e.data<i.value:e.data<=i.value)&&(zG(n=this._getOrReturnCtx(e,n),{code:zq.too_small,minimum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),r.dirty()):"max"===i.kind?(i.inclusive?e.data>i.value:e.data>=i.value)&&(zG(n=this._getOrReturnCtx(e,n),{code:zq.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),r.dirty()):"multipleOf"===i.kind?0!==Yd(e.data,i.value)&&(zG(n=this._getOrReturnCtx(e,n),{code:zq.not_multiple_of,multipleOf:i.value,message:i.message}),r.dirty()):"finite"===i.kind?Number.isFinite(e.data)||(zG(n=this._getOrReturnCtx(e,n),{code:zq.not_finite,message:i.message}),r.dirty()):o.assertNever(i);return{status:r.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,u.toString(t))}gt(e,t){return this.setLimit("min",e,!1,u.toString(t))}lte(e,t){return this.setLimit("max",e,!0,u.toString(t))}lt(e,t){return this.setLimit("max",e,!1,u.toString(t))}setLimit(e,t,n,r){return new Yf({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:n,message:u.toString(r)}]})}_addCheck(e){return new Yf({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:u.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:u.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:u.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:u.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:u.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:u.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:u.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:u.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:u.toString(e)})}get minValue(){let e=null;for(let t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(let t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}get isInt(){return!!this._def.checks.find(e=>"int"===e.kind||"multipleOf"===e.kind&&o.isInteger(e.value))}get isFinite(){let e=null,t=null;for(let n of this._def.checks){if("finite"===n.kind||"int"===n.kind||"multipleOf"===n.kind)return!0;"min"===n.kind?(null===t||n.value>t)&&(t=n.value):"max"===n.kind&&(null===e||n.value<e)&&(e=n.value)}return Number.isFinite(t)&&Number.isFinite(e)}}Yf.create=e=>new Yf({checks:[],typeName:s.ZodNumber,coerce:(null==e?void 0:e.coerce)||!1,...z7(e)});class Yp extends z8{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce&&(e.data=BigInt(e.data)),this._getType(e)!==zD.bigint){let t=this._getOrReturnCtx(e);return zG(t,{code:zq.invalid_type,expected:zD.bigint,received:t.parsedType}),zX}let n,r=new z$;for(let i of this._def.checks)"min"===i.kind?(i.inclusive?e.data<i.value:e.data<=i.value)&&(zG(n=this._getOrReturnCtx(e,n),{code:zq.too_small,type:"bigint",minimum:i.value,inclusive:i.inclusive,message:i.message}),r.dirty()):"max"===i.kind?(i.inclusive?e.data>i.value:e.data>=i.value)&&(zG(n=this._getOrReturnCtx(e,n),{code:zq.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),r.dirty()):"multipleOf"===i.kind?e.data%i.value!==BigInt(0)&&(zG(n=this._getOrReturnCtx(e,n),{code:zq.not_multiple_of,multipleOf:i.value,message:i.message}),r.dirty()):o.assertNever(i);return{status:r.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,u.toString(t))}gt(e,t){return this.setLimit("min",e,!1,u.toString(t))}lte(e,t){return this.setLimit("max",e,!0,u.toString(t))}lt(e,t){return this.setLimit("max",e,!1,u.toString(t))}setLimit(e,t,n,r){return new Yp({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:n,message:u.toString(r)}]})}_addCheck(e){return new Yp({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:u.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:u.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:u.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:u.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:u.toString(t)})}get minValue(){let e=null;for(let t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(let t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}}Yp.create=e=>{var t;return new Yp({checks:[],typeName:s.ZodBigInt,coerce:null!==(t=null==e?void 0:e.coerce)&&void 0!==t&&t,...z7(e)})};class YA extends z8{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==zD.boolean){let t=this._getOrReturnCtx(e);return zG(t,{code:zq.invalid_type,expected:zD.boolean,received:t.parsedType}),zX}return z1(e.data)}}YA.create=e=>new YA({typeName:s.ZodBoolean,coerce:(null==e?void 0:e.coerce)||!1,...z7(e)});class Yh extends z8{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==zD.date){let t=this._getOrReturnCtx(e);return zG(t,{code:zq.invalid_type,expected:zD.date,received:t.parsedType}),zX}if(isNaN(e.data.getTime())){let n=this._getOrReturnCtx(e);return zG(n,{code:zq.invalid_date}),zX}let r=new z$,i;for(let a of this._def.checks)"min"===a.kind?e.data.getTime()<a.value&&(zG(i=this._getOrReturnCtx(e,i),{code:zq.too_small,message:a.message,inclusive:!0,exact:!1,minimum:a.value,type:"date"}),r.dirty()):"max"===a.kind?e.data.getTime()>a.value&&(zG(i=this._getOrReturnCtx(e,i),{code:zq.too_big,message:a.message,inclusive:!0,exact:!1,maximum:a.value,type:"date"}),r.dirty()):o.assertNever(a);return{status:r.value,value:new Date(e.data.getTime())}}_addCheck(e){return new Yh({...this._def,checks:[...this._def.checks,e]})}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:u.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:u.toString(t)})}get minDate(){let e=null;for(let t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return null!=e?new Date(e):null}get maxDate(){let e=null;for(let t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return null!=e?new Date(e):null}}Yh.create=e=>new Yh({checks:[],coerce:(null==e?void 0:e.coerce)||!1,typeName:s.ZodDate,...z7(e)});class Ym extends z8{_parse(e){if(this._getType(e)!==zD.symbol){let t=this._getOrReturnCtx(e);return zG(t,{code:zq.invalid_type,expected:zD.symbol,received:t.parsedType}),zX}return z1(e.data)}}Ym.create=e=>new Ym({typeName:s.ZodSymbol,...z7(e)});class Yg extends z8{_parse(e){if(this._getType(e)!==zD.undefined){let t=this._getOrReturnCtx(e);return zG(t,{code:zq.invalid_type,expected:zD.undefined,received:t.parsedType}),zX}return z1(e.data)}}Yg.create=e=>new Yg({typeName:s.ZodUndefined,...z7(e)});class Yy extends z8{_parse(e){if(this._getType(e)!==zD.null){let t=this._getOrReturnCtx(e);return zG(t,{code:zq.invalid_type,expected:zD.null,received:t.parsedType}),zX}return z1(e.data)}}Yy.create=e=>new Yy({typeName:s.ZodNull,...z7(e)});class Yv extends z8{constructor(){super(...arguments),this._any=!0}_parse(e){return z1(e.data)}}Yv.create=e=>new Yv({typeName:s.ZodAny,...z7(e)});class Yx extends z8{constructor(){super(...arguments),this._unknown=!0}_parse(e){return z1(e.data)}}Yx.create=e=>new Yx({typeName:s.ZodUnknown,...z7(e)});class Yb extends z8{_parse(e){let t=this._getOrReturnCtx(e);return zG(t,{code:zq.invalid_type,expected:zD.never,received:t.parsedType}),zX}}Yb.create=e=>new Yb({typeName:s.ZodNever,...z7(e)});class YC extends z8{_parse(e){if(this._getType(e)!==zD.undefined){let t=this._getOrReturnCtx(e);return zG(t,{code:zq.invalid_type,expected:zD.void,received:t.parsedType}),zX}return z1(e.data)}}YC.create=e=>new YC({typeName:s.ZodVoid,...z7(e)});class YS extends z8{_parse(e){let{ctx:t,status:n}=this._processInputParams(e),r=this._def;if(t.parsedType!==zD.array)return zG(t,{code:zq.invalid_type,expected:zD.array,received:t.parsedType}),zX;if(null!==r.exactLength){let i=t.data.length>r.exactLength.value,o=t.data.length<r.exactLength.value;(i||o)&&(zG(t,{code:i?zq.too_big:zq.too_small,minimum:o?r.exactLength.value:void 0,maximum:i?r.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:r.exactLength.message}),n.dirty())}if(null!==r.minLength&&t.data.length<r.minLength.value&&(zG(t,{code:zq.too_small,minimum:r.minLength.value,type:"array",inclusive:!0,exact:!1,message:r.minLength.message}),n.dirty()),null!==r.maxLength&&t.data.length>r.maxLength.value&&(zG(t,{code:zq.too_big,maximum:r.maxLength.value,type:"array",inclusive:!0,exact:!1,message:r.maxLength.message}),n.dirty()),t.common.async)return Promise.all([...t.data].map((e,n)=>r.type._parseAsync(new z9(t,e,t.path,n)))).then(e=>z$.mergeArray(n,e));let a=[...t.data].map((e,n)=>r.type._parseSync(new z9(t,e,t.path,n)));return z$.mergeArray(n,a)}get element(){return this._def.type}min(e,t){return new YS({...this._def,minLength:{value:e,message:u.toString(t)}})}max(e,t){return new YS({...this._def,maxLength:{value:e,message:u.toString(t)}})}length(e,t){return new YS({...this._def,exactLength:{value:e,message:u.toString(t)}})}nonempty(e){return this.min(1,e)}}YS.create=(e,t)=>new YS({type:e,minLength:null,maxLength:null,exactLength:null,typeName:s.ZodArray,...z7(t)});class Yw extends z8{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(null!==this._cached)return this._cached;let e=this._def.shape(),t=o.objectKeys(e);return this._cached={shape:e,keys:t}}_parse(e){if(this._getType(e)!==zD.object){let t=this._getOrReturnCtx(e);return zG(t,{code:zq.invalid_type,expected:zD.object,received:t.parsedType}),zX}let{status:n,ctx:r}=this._processInputParams(e),{shape:i,keys:o}=this._getCached(),a=[];if(!(this._def.catchall instanceof Yb&&"strip"===this._def.unknownKeys))for(let u in r.data)o.includes(u)||a.push(u);let s=[];for(let l of o){let c=i[l],d=r.data[l];s.push({key:{status:"valid",value:l},value:c._parse(new z9(r,d,r.path,l)),alwaysSet:l in r.data})}if(this._def.catchall instanceof Yb){let f=this._def.unknownKeys;if("passthrough"===f)for(let p of a)s.push({key:{status:"valid",value:p},value:{status:"valid",value:r.data[p]}});else if("strict"===f)a.length>0&&(zG(r,{code:zq.unrecognized_keys,keys:a}),n.dirty());else if("strip"!==f)throw Error("Internal ZodObject error: invalid unknownKeys value.")}else{let A=this._def.catchall;for(let h of a){let m=r.data[h];s.push({key:{status:"valid",value:h},value:A._parse(new z9(r,m,r.path,h)),alwaysSet:h in r.data})}}return r.common.async?Promise.resolve().then(async()=>{let e=[];for(let t of s){let n=await t.key;e.push({key:n,value:await t.value,alwaysSet:t.alwaysSet})}return e}).then(e=>z$.mergeObjectSync(n,e)):z$.mergeObjectSync(n,s)}get shape(){return this._def.shape()}strict(e){return u.errToObj,new Yw({...this._def,unknownKeys:"strict",...void 0!==e?{errorMap:(t,n)=>{var r,i,o,a;let s=null!==(o=null===(i=(r=this._def).errorMap)||void 0===i?void 0:i.call(r,t,n).message)&&void 0!==o?o:n.defaultError;return"unrecognized_keys"===t.code?{message:null!==(a=u.errToObj(e).message)&&void 0!==a?a:s}:{message:s}}}:{}})}strip(){return new Yw({...this._def,unknownKeys:"strip"})}passthrough(){return new Yw({...this._def,unknownKeys:"passthrough"})}extend(e){return new Yw({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new Yw({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:s.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new Yw({...this._def,catchall:e})}pick(e){let t={};return o.objectKeys(e).forEach(n=>{e[n]&&this.shape[n]&&(t[n]=this.shape[n])}),new Yw({...this._def,shape:()=>t})}omit(e){let t={};return o.objectKeys(this.shape).forEach(n=>{e[n]||(t[n]=this.shape[n])}),new Yw({...this._def,shape:()=>t})}deepPartial(){return function e(t){if(!(t instanceof Yw))return t instanceof YS?new YS({...t._def,type:e(t.element)}):t instanceof YD?YD.create(e(t.unwrap())):t instanceof YN?YN.create(e(t.unwrap())):t instanceof YR?YR.create(t.items.map(t=>e(t))):t;{let n={};for(let r in t.shape){let i=t.shape[r];n[r]=YD.create(e(i))}return new Yw({...t._def,shape:()=>n})}}(this)}partial(e){let t={};return o.objectKeys(this.shape).forEach(n=>{let r=this.shape[n];e&&!e[n]?t[n]=r:t[n]=r.optional()}),new Yw({...this._def,shape:()=>t})}required(e){let t={};return o.objectKeys(this.shape).forEach(n=>{if(e&&!e[n])t[n]=this.shape[n];else{let r=this.shape[n];for(;r instanceof YD;)r=r._def.innerType;t[n]=r}}),new Yw({...this._def,shape:()=>t})}keyof(){return YK(o.objectKeys(this.shape))}}Yw.create=(e,t)=>new Yw({shape:()=>e,unknownKeys:"strip",catchall:Yb.create(),typeName:s.ZodObject,...z7(t)}),Yw.strictCreate=(e,t)=>new Yw({shape:()=>e,unknownKeys:"strict",catchall:Yb.create(),typeName:s.ZodObject,...z7(t)}),Yw.lazycreate=(e,t)=>new Yw({shape:e,unknownKeys:"strip",catchall:Yb.create(),typeName:s.ZodObject,...z7(t)});class YI extends z8{_parse(e){let{ctx:t}=this._processInputParams(e),n=this._def.options;if(t.common.async)return Promise.all(n.map(async e=>{let n={...t,common:{...t.common,issues:[]},parent:null};return{result:await e._parseAsync({data:t.data,path:t.path,parent:n}),ctx:n}})).then(function(e){for(let n of e)if("valid"===n.result.status)return n.result;for(let r of e)if("dirty"===r.result.status)return t.common.issues.push(...r.ctx.common.issues),r.result;let i=e.map(e=>new zV(e.ctx.common.issues));return zG(t,{code:zq.invalid_union,unionErrors:i}),zX});{let r,i=[];for(let o of n){let a={...t,common:{...t.common,issues:[]},parent:null},u=o._parseSync({data:t.data,path:t.path,parent:a});if("valid"===u.status)return u;"dirty"!==u.status||r||(r={result:u,ctx:a}),a.common.issues.length&&i.push(a.common.issues)}if(r)return t.common.issues.push(...r.ctx.common.issues),r.result;let s=i.map(e=>new zV(e));return zG(t,{code:zq.invalid_union,unionErrors:s}),zX}}get options(){return this._def.options}}YI.create=(e,t)=>new YI({options:e,typeName:s.ZodUnion,...z7(t)});let Y_=e=>e instanceof Yj?Y_(e.schema):e instanceof YW?Y_(e.innerType()):e instanceof YU?[e.value]:e instanceof YL?e.options:e instanceof YB?Object.keys(e.enum):e instanceof Yq?Y_(e._def.innerType):e instanceof Yg?[void 0]:e instanceof Yy?[null]:null;class YT extends z8{_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==zD.object)return zG(t,{code:zq.invalid_type,expected:zD.object,received:t.parsedType}),zX;let n=this.discriminator,r=t.data[n],i=this.optionsMap.get(r);return i?t.common.async?i._parseAsync({data:t.data,path:t.path,parent:t}):i._parseSync({data:t.data,path:t.path,parent:t}):(zG(t,{code:zq.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),zX)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,t,n){let r=new Map;for(let i of t){let o=Y_(i.shape[e]);if(!o)throw Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(let a of o){if(r.has(a))throw Error(`Discriminator property ${String(e)} has duplicate value ${String(a)}`);r.set(a,i)}}return new YT({typeName:s.ZodDiscriminatedUnion,discriminator:e,options:t,optionsMap:r,...z7(n)})}}class YO extends z8{_parse(e){let{status:t,ctx:n}=this._processInputParams(e),r=(e,r)=>{if(z2(e)||z2(r))return zX;let i=function e(t,n){let r=zN(t),i=zN(n);if(t===n)return{valid:!0,data:t};if(r===zD.object&&i===zD.object){let a=o.objectKeys(n),u=o.objectKeys(t).filter(e=>-1!==a.indexOf(e)),s={...t,...n};for(let l of u){let c=e(t[l],n[l]);if(!c.valid)return{valid:!1};s[l]=c.data}return{valid:!0,data:s}}if(r!==zD.array||i!==zD.array)return r===zD.date&&i===zD.date&&+t==+n?{valid:!0,data:t}:{valid:!1};{if(t.length!==n.length)return{valid:!1};let d=[];for(let f=0;f<t.length;f++){let p=t[f],A=n[f],h=e(p,A);if(!h.valid)return{valid:!1};d.push(h.data)}return{valid:!0,data:d}}}(e.value,r.value);return i.valid?((z6(e)||z6(r))&&t.dirty(),{status:t.value,value:i.data}):(zG(n,{code:zq.invalid_intersection_types}),zX)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then(([e,t])=>r(e,t)):r(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}}YO.create=(e,t,n)=>new YO({left:e,right:t,typeName:s.ZodIntersection,...z7(n)});class YR extends z8{_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==zD.array)return zG(n,{code:zq.invalid_type,expected:zD.array,received:n.parsedType}),zX;if(n.data.length<this._def.items.length)return zG(n,{code:zq.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),zX;!this._def.rest&&n.data.length>this._def.items.length&&(zG(n,{code:zq.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),t.dirty());let r=[...n.data].map((e,t)=>{let r=this._def.items[t]||this._def.rest;return r?r._parse(new z9(n,e,n.path,t)):null}).filter(e=>!!e);return n.common.async?Promise.all(r).then(e=>z$.mergeArray(t,e)):z$.mergeArray(t,r)}get items(){return this._def.items}rest(e){return new YR({...this._def,rest:e})}}YR.create=(e,t)=>{if(!Array.isArray(e))throw Error("You must pass an array of schemas to z.tuple([ ... ])");return new YR({items:e,typeName:s.ZodTuple,rest:null,...z7(t)})};class Yk extends z8{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==zD.object)return zG(n,{code:zq.invalid_type,expected:zD.object,received:n.parsedType}),zX;let r=[],i=this._def.keyType,o=this._def.valueType;for(let a in n.data)r.push({key:i._parse(new z9(n,a,n.path,a)),value:o._parse(new z9(n,n.data[a],n.path,a))});return n.common.async?z$.mergeObjectAsync(t,r):z$.mergeObjectSync(t,r)}get element(){return this._def.valueType}static create(e,t,n){return new Yk(t instanceof z8?{keyType:e,valueType:t,typeName:s.ZodRecord,...z7(n)}:{keyType:Yc.create(),valueType:e,typeName:s.ZodRecord,...z7(t)})}}class YE extends z8{_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==zD.map)return zG(n,{code:zq.invalid_type,expected:zD.map,received:n.parsedType}),zX;let r=this._def.keyType,i=this._def.valueType,o=[...n.data.entries()].map(([e,t],o)=>({key:r._parse(new z9(n,e,n.path,[o,"key"])),value:i._parse(new z9(n,t,n.path,[o,"value"]))}));if(n.common.async){let a=new Map;return Promise.resolve().then(async()=>{for(let e of o){let n=await e.key,r=await e.value;if("aborted"===n.status||"aborted"===r.status)return zX;("dirty"===n.status||"dirty"===r.status)&&t.dirty(),a.set(n.value,r.value)}return{status:t.value,value:a}})}{let u=new Map;for(let s of o){let l=s.key,c=s.value;if("aborted"===l.status||"aborted"===c.status)return zX;("dirty"===l.status||"dirty"===c.status)&&t.dirty(),u.set(l.value,c.value)}return{status:t.value,value:u}}}}YE.create=(e,t,n)=>new YE({valueType:t,keyType:e,typeName:s.ZodMap,...z7(n)});class YM extends z8{_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==zD.set)return zG(n,{code:zq.invalid_type,expected:zD.set,received:n.parsedType}),zX;let r=this._def;null!==r.minSize&&n.data.size<r.minSize.value&&(zG(n,{code:zq.too_small,minimum:r.minSize.value,type:"set",inclusive:!0,exact:!1,message:r.minSize.message}),t.dirty()),null!==r.maxSize&&n.data.size>r.maxSize.value&&(zG(n,{code:zq.too_big,maximum:r.maxSize.value,type:"set",inclusive:!0,exact:!1,message:r.maxSize.message}),t.dirty());let i=this._def.valueType;function o(e){let n=new Set;for(let r of e){if("aborted"===r.status)return zX;"dirty"===r.status&&t.dirty(),n.add(r.value)}return{status:t.value,value:n}}let a=[...n.data.values()].map((e,t)=>i._parse(new z9(n,e,n.path,t)));return n.common.async?Promise.all(a).then(e=>o(e)):o(a)}min(e,t){return new YM({...this._def,minSize:{value:e,message:u.toString(t)}})}max(e,t){return new YM({...this._def,maxSize:{value:e,message:u.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}}YM.create=(e,t)=>new YM({valueType:e,minSize:null,maxSize:null,typeName:s.ZodSet,...z7(t)});class YF extends z8{constructor(){super(...arguments),this.validate=this.implement}_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==zD.function)return zG(t,{code:zq.invalid_type,expected:zD.function,received:t.parsedType}),zX;function n(e,n){return zJ({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,zY,zz].filter(e=>!!e),issueData:{code:zq.invalid_arguments,argumentsError:n}})}function r(e,n){return zJ({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,zY,zz].filter(e=>!!e),issueData:{code:zq.invalid_return_type,returnTypeError:n}})}let i={errorMap:t.common.contextualErrorMap},o=t.data;return this._def.returns instanceof YP?z1(async(...e)=>{let t=new zV([]),a=await this._def.args.parseAsync(e,i).catch(r=>{throw t.addIssue(n(e,r)),t}),u=await o(...a);return await this._def.returns._def.type.parseAsync(u,i).catch(e=>{throw t.addIssue(r(u,e)),t})}):z1((...e)=>{let t=this._def.args.safeParse(e,i);if(!t.success)throw new zV([n(e,t.error)]);let a=o(...t.data),u=this._def.returns.safeParse(a,i);if(!u.success)throw new zV([r(a,u.error)]);return u.data})}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new YF({...this._def,args:YR.create(e).rest(Yx.create())})}returns(e){return new YF({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,t,n){return new YF({args:e||YR.create([]).rest(Yx.create()),returns:t||Yx.create(),typeName:s.ZodFunction,...z7(n)})}}class Yj extends z8{get schema(){return this._def.getter()}_parse(e){let{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}}Yj.create=(e,t)=>new Yj({getter:e,typeName:s.ZodLazy,...z7(t)});class YU extends z8{_parse(e){if(e.data!==this._def.value){let t=this._getOrReturnCtx(e);return zG(t,{received:t.data,code:zq.invalid_literal,expected:this._def.value}),zX}return{status:"valid",value:e.data}}get value(){return this._def.value}}function YK(e,t){return new YL({values:e,typeName:s.ZodEnum,...z7(t)})}YU.create=(e,t)=>new YU({value:e,typeName:s.ZodLiteral,...z7(t)});class YL extends z8{_parse(e){if("string"!=typeof e.data){let t=this._getOrReturnCtx(e),n=this._def.values;return zG(t,{expected:o.joinValues(n),received:t.parsedType,code:zq.invalid_type}),zX}if(-1===this._def.values.indexOf(e.data)){let r=this._getOrReturnCtx(e),i=this._def.values;return zG(r,{received:r.data,code:zq.invalid_enum_value,options:i}),zX}return z1(e.data)}get options(){return this._def.values}get enum(){let e={};for(let t of this._def.values)e[t]=t;return e}get Values(){let e={};for(let t of this._def.values)e[t]=t;return e}get Enum(){let e={};for(let t of this._def.values)e[t]=t;return e}extract(e){return YL.create(e)}exclude(e){return YL.create(this.options.filter(t=>!e.includes(t)))}}YL.create=YK;class YB extends z8{_parse(e){let t=o.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(e);if(n.parsedType!==zD.string&&n.parsedType!==zD.number){let r=o.objectValues(t);return zG(n,{expected:o.joinValues(r),received:n.parsedType,code:zq.invalid_type}),zX}if(-1===t.indexOf(e.data)){let i=o.objectValues(t);return zG(n,{received:n.data,code:zq.invalid_enum_value,options:i}),zX}return z1(e.data)}get enum(){return this._def.values}}YB.create=(e,t)=>new YB({values:e,typeName:s.ZodNativeEnum,...z7(t)});class YP extends z8{unwrap(){return this._def.type}_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==zD.promise&&!1===t.common.async)return zG(t,{code:zq.invalid_type,expected:zD.promise,received:t.parsedType}),zX;let n=t.parsedType===zD.promise?t.data:Promise.resolve(t.data);return z1(n.then(e=>this._def.type.parseAsync(e,{path:t.path,errorMap:t.common.contextualErrorMap})))}}YP.create=(e,t)=>new YP({type:e,typeName:s.ZodPromise,...z7(t)});class YW extends z8{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===s.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){let{status:t,ctx:n}=this._processInputParams(e),r=this._def.effect||null;if("preprocess"===r.type){let i=r.transform(n.data);return n.common.async?Promise.resolve(i).then(e=>this._def.schema._parseAsync({data:e,path:n.path,parent:n})):this._def.schema._parseSync({data:i,path:n.path,parent:n})}let a={addIssue(e){zG(n,e),e.fatal?t.abort():t.dirty()},get path(){return n.path}};if(a.addIssue=a.addIssue.bind(a),"refinement"===r.type){let u=e=>{let t=r.refinement(e,a);if(n.common.async)return Promise.resolve(t);if(t instanceof Promise)throw Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return e};if(!1!==n.common.async)return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(e=>"aborted"===e.status?zX:("dirty"===e.status&&t.dirty(),u(e.value).then(()=>({status:t.value,value:e.value}))));{let s=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return"aborted"===s.status?zX:("dirty"===s.status&&t.dirty(),u(s.value),{status:t.value,value:s.value})}}if("transform"===r.type){if(!1!==n.common.async)return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(e=>z5(e)?Promise.resolve(r.transform(e.value,a)).then(e=>({status:t.value,value:e})):e);{let l=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!z5(l))return l;let c=r.transform(l.value,a);if(c instanceof Promise)throw Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:t.value,value:c}}}o.assertNever(r)}}YW.create=(e,t,n)=>new YW({schema:e,typeName:s.ZodEffects,effect:t,...z7(n)}),YW.createWithPreprocess=(e,t,n)=>new YW({schema:t,effect:{type:"preprocess",transform:e},typeName:s.ZodEffects,...z7(n)});class YD extends z8{_parse(e){return this._getType(e)===zD.undefined?z1(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}YD.create=(e,t)=>new YD({innerType:e,typeName:s.ZodOptional,...z7(t)});class YN extends z8{_parse(e){return this._getType(e)===zD.null?z1(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}YN.create=(e,t)=>new YN({innerType:e,typeName:s.ZodNullable,...z7(t)});class Yq extends z8{_parse(e){let{ctx:t}=this._processInputParams(e),n=t.data;return t.parsedType===zD.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:t.path,parent:t})}removeDefault(){return this._def.innerType}}Yq.create=(e,t)=>new Yq({innerType:e,typeName:s.ZodDefault,defaultValue:"function"==typeof t.default?t.default:()=>t.default,...z7(t)});class YQ extends z8{_parse(e){let{ctx:t}=this._processInputParams(e),n={...t,common:{...t.common,issues:[]}},r=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return z3(r)?r.then(e=>({status:"valid",value:"valid"===e.status?e.value:this._def.catchValue({get error(){return new zV(n.common.issues)},input:n.data})})):{status:"valid",value:"valid"===r.status?r.value:this._def.catchValue({get error(){return new zV(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}}YQ.create=(e,t)=>new YQ({innerType:e,typeName:s.ZodCatch,catchValue:"function"==typeof t.catch?t.catch:()=>t.catch,...z7(t)});class YV extends z8{_parse(e){if(this._getType(e)!==zD.nan){let t=this._getOrReturnCtx(e);return zG(t,{code:zq.invalid_type,expected:zD.nan,received:t.parsedType}),zX}return{status:"valid",value:e.data}}}YV.create=e=>new YV({typeName:s.ZodNaN,...z7(e)});let Yz=Symbol("zod_brand");class YY extends z8{_parse(e){let{ctx:t}=this._processInputParams(e),n=t.data;return this._def.type._parse({data:n,path:t.path,parent:t})}unwrap(){return this._def.type}}class YH extends z8{_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.common.async)return(async()=>{let e=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return"aborted"===e.status?zX:"dirty"===e.status?(t.dirty(),z0(e.value)):this._def.out._parseAsync({data:e.value,path:n.path,parent:n})})();{let r=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return"aborted"===r.status?zX:"dirty"===r.status?(t.dirty(),{status:"dirty",value:r.value}):this._def.out._parseSync({data:r.value,path:n.path,parent:n})}}static create(e,t){return new YH({in:e,out:t,typeName:s.ZodPipeline})}}let YZ=(e,t={},n)=>e?Yv.create().superRefine((r,i)=>{var o,a;if(!e(r)){let u="function"==typeof t?t(r):"string"==typeof t?{message:t}:t,s=null===(a=null!==(o=u.fatal)&&void 0!==o?o:n)||void 0===a||a;i.addIssue({code:"custom",..."string"==typeof u?{message:u}:u,fatal:s})}}):Yv.create(),YJ={object:Yw.lazycreate};(eiK=s||(s={})).ZodString="ZodString",eiK.ZodNumber="ZodNumber",eiK.ZodNaN="ZodNaN",eiK.ZodBigInt="ZodBigInt",eiK.ZodBoolean="ZodBoolean",eiK.ZodDate="ZodDate",eiK.ZodSymbol="ZodSymbol",eiK.ZodUndefined="ZodUndefined",eiK.ZodNull="ZodNull",eiK.ZodAny="ZodAny",eiK.ZodUnknown="ZodUnknown",eiK.ZodNever="ZodNever",eiK.ZodVoid="ZodVoid",eiK.ZodArray="ZodArray",eiK.ZodObject="ZodObject",eiK.ZodUnion="ZodUnion",eiK.ZodDiscriminatedUnion="ZodDiscriminatedUnion",eiK.ZodIntersection="ZodIntersection",eiK.ZodTuple="ZodTuple",eiK.ZodRecord="ZodRecord",eiK.ZodMap="ZodMap",eiK.ZodSet="ZodSet",eiK.ZodFunction="ZodFunction",eiK.ZodLazy="ZodLazy",eiK.ZodLiteral="ZodLiteral",eiK.ZodEnum="ZodEnum",eiK.ZodEffects="ZodEffects",eiK.ZodNativeEnum="ZodNativeEnum",eiK.ZodOptional="ZodOptional",eiK.ZodNullable="ZodNullable",eiK.ZodDefault="ZodDefault",eiK.ZodCatch="ZodCatch",eiK.ZodPromise="ZodPromise",eiK.ZodBranded="ZodBranded",eiK.ZodPipeline="ZodPipeline";let YG=(e,t={message:`Input not instance of ${e.name}`})=>YZ(t=>t instanceof e,t),Y$=Yc.create,YX=Yf.create,Y0=YV.create,Y1=Yp.create,Y2=YA.create,Y6=Yh.create,Y5=Ym.create,Y3=Yg.create,Y9=Yy.create,Y4=Yv.create,Y7=Yx.create,Y8=Yb.create,He=YC.create,Ht=YS.create,Hn=Yw.create,Hr=Yw.strictCreate,Hi=YI.create,Ho=YT.create,Ha=YO.create,Hu=YR.create,Hs=Yk.create,Hl=YE.create,Hc=YM.create,Hd=YF.create,Hf=Yj.create,Hp=YU.create,HA=YL.create,Hh=YB.create,Hm=YP.create,Hg=YW.create,Hy=YD.create,Hv=YN.create,Hx=YW.createWithPreprocess,Hb=YH.create,HC=()=>Y$().optional(),HS=()=>YX().optional(),Hw=()=>Y2().optional();var HI=Object.freeze({__proto__:null,defaultErrorMap:zz,setErrorMap:zH,getErrorMap:zZ,makeIssue:zJ,EMPTY_PATH:[],addIssueToContext:zG,ParseStatus:z$,INVALID:zX,DIRTY:z0,OK:z1,isAborted:z2,isDirty:z6,isValid:z5,isAsync:z3,get util(){return o},get objectUtil(){return a},ZodParsedType:zD,getParsedType:zN,ZodType:z8,ZodString:Yc,ZodNumber:Yf,ZodBigInt:Yp,ZodBoolean:YA,ZodDate:Yh,ZodSymbol:Ym,ZodUndefined:Yg,ZodNull:Yy,ZodAny:Yv,ZodUnknown:Yx,ZodNever:Yb,ZodVoid:YC,ZodArray:YS,ZodObject:Yw,ZodUnion:YI,ZodDiscriminatedUnion:YT,ZodIntersection:YO,ZodTuple:YR,ZodRecord:Yk,ZodMap:YE,ZodSet:YM,ZodFunction:YF,ZodLazy:Yj,ZodLiteral:YU,ZodEnum:YL,ZodNativeEnum:YB,ZodPromise:YP,ZodEffects:YW,ZodTransformer:YW,ZodOptional:YD,ZodNullable:YN,ZodDefault:Yq,ZodCatch:YQ,ZodNaN:YV,BRAND:Yz,ZodBranded:YY,ZodPipeline:YH,custom:YZ,Schema:z8,ZodSchema:z8,late:YJ,get ZodFirstPartyTypeKind(){return s},coerce:{string:e=>Yc.create({...e,coerce:!0}),number:e=>Yf.create({...e,coerce:!0}),boolean:e=>YA.create({...e,coerce:!0}),bigint:e=>Yp.create({...e,coerce:!0}),date:e=>Yh.create({...e,coerce:!0})},any:Y4,array:Ht,bigint:Y1,boolean:Y2,date:Y6,discriminatedUnion:Ho,effect:Hg,enum:HA,function:Hd,instanceof:YG,intersection:Ha,lazy:Hf,literal:Hp,map:Hl,nan:Y0,nativeEnum:Hh,never:Y8,null:Y9,nullable:Hv,number:YX,object:Hn,oboolean:Hw,onumber:HS,optional:Hy,ostring:HC,pipeline:Hb,preprocess:Hx,promise:Hm,record:Hs,set:Hc,strictObject:Hr,string:Y$,symbol:Y5,transformer:Hg,tuple:Hu,undefined:Y3,union:Hi,unknown:Y7,void:He,NEVER:zX,ZodIssueCode:zq,quotelessJson:zQ,ZodError:zV});let H_=HI.object({id:HI.string(),label:HI.string(),repeatable:HI.boolean(),status:HI.boolean()}),HT=HI.array(H_);function HO(e,t,n){return(0,y.WY)(new URL("customtypes",e),{headers:{repository:t},credentials:(0,y.xb)(n),okType:HT})}let HR=HI.object({first_name:HI.string().optional(),last_name:HI.string().optional(),email:HI.string().email().optional()}),Hk=HI.object({id:HI.string(),name:HI.string(),is_master:HI.boolean().optional()}),HE=HI.discriminatedUnion("status",[HI.object({status:HI.literal("unclassified")}),HI.object({status:HI.literal("published")}),HI.object({status:HI.literal("release"),release_id:HI.string()}),HI.object({status:HI.literal("archived")})]).and(HI.object({version_id:HI.string(),tags:HI.array(HI.string()),custom_type_label:HI.string(),preview_summary:HI.string().optional(),preview_image:HI.string().optional(),last_modified_date:HI.coerce.date(),author:HR,uid:HI.string().optional()})),HM=HI.object({id:HI.string(),title:HI.string().nullish().transform(e=>e??"Untitled"),custom_type_id:HI.string(),group_lang_id:HI.string(),language:Hk,versions:HI.array(HE)}),HF=HI.object({total:HI.number(),cursor:HI.string().optional(),results:HI.array(HM)});function Hj(e){return e.reduce((e,t)=>{if(t.values.every(e=>""===e))return e;let n=t.values.map(e=>[t.name,e]);return e.concat(n)},[])}function HU(e,t,n){return(0,y.WY)(new URL(`documents/${n}`,e),{credentials:(0,y.xb)(t),okType:HM})}HI.custom().transform((e,t)=>{let n=k.Document.decode(e);return"Left"===n._tag?(t.addIssue({code:HI.ZodIssueCode.custom,message:"Invalid document."}),HI.NEVER):n.right});let HK=HI.object({id:HI.string(),firstname:HI.string().optional(),lastname:HI.string().optional(),email:HI.string()}),HL=HI.array(HK),HB=HI.object({simulator_url:HI.string().url().nullish(),languages:HI.array(Hk).transform(e=>(0,g.DY)(e,e=>e.name)),authors:HL.optional().default([])}).transform(({simulator_url:e,...t})=>{let n=e&&function(e){let t=(0,l.ju)(e);return!!t&&t.pathname.endsWith("/slice-simulator")}(e)?e:void 0;return{...t,simulatorUrl:n}});function HP(e,t){return(0,y.WY)(new URL("repository",e),{credentials:(0,y.xb)(t),okType:HB})}let HW=HI.object({results:HI.array(HI.string())});function HD(e,t){return(0,y.WY)(new URL("repository/tags",e),{credentials:(0,y.xb)(t),okType:HW})}function HN(){let e=zB();e.mediaLibrary||zW("mediaLibrary");let{assetsApiBaseUrl:t,authStrategy:n,repository:r}=e,{items:i}=(0,m.QT)(Hq,[t,r,n]);return{tags:i}}function Hq(e,t,n){return(0,y.WY)(new URL("tags",e),{credentials:(0,y.xb)(n),okType:Hz,headers:{repository:t}})}let HQ=HI.string().min(3).max(20),HV=HI.object({id:HI.string(),name:HQ,uploader_id:HI.string().optional(),created_at:HI.number(),last_modified:HI.number(),count:HI.number().optional().default(0)}),Hz=HI.object({items:HI.array(HV)});function HY(e){(0,m.YC)(Hq,t=>{let{items:n}=t,r=e(n);if(r)return{items:r}})}let HH=HI.array(HI.string()).optional().transform(e=>null==e?void 0:e[0]),HZ=HI.object({id:HI.string(),kind:HI.string(),extension:HI.string().optional(),filename:HI.string(),width:HI.number().optional(),height:HI.number().optional(),last_modified:HI.number(),url:HI.string(),alt:HI.string().optional(),size:HI.number(),notes:HI.string().optional(),credits:HI.string().optional(),search_highlight:HI.object({filename:HH,alt:HH,notes:HH,credits:HH}).optional(),tags:HI.array(HV)}),HJ={"X-Prismic-Source":"Wroom"},HG=HI.object({total:HI.number(),cursor:HI.string().optional(),items:HI.array(HZ)});function H$(e,t,n,r,i,o,a,u,s){let l=e?new URL("assets",e):void 0,c=new URLSearchParams(Hj([{name:"limit",values:["30"]},{name:"cursor",values:[s??""]},{name:"keyword",values:[i]},{name:"tags",values:o.split(",")},{name:"assetType",values:[r]},{name:"opensearch",values:a?["true"]:[]}])).toString(),d=HG.transform(e=>({...e,assetType:r,keyword:i,page:u,tags:o})),f=performance.now();return(0,y.WY)(`${(null==l?void 0:l.href)??""}?${c}`,{headers:{repository:t,...HJ},credentials:(0,y.xb)(n),okType:d}).then(e=>({...e,time:(performance.now()-f).toFixed(0)}))}function HX(e){H6(t=>t.flatMap(t=>{let n=e.find(e=>e.id===t.id);return n?void 0===n.response?[]:{...t,...n.response}:t}))}function H0(e){H6(t=>t.filter(t=>!e.includes(t.id)))}function H1(e){let{keyword:t,tagIds:n}=e,r=null==n?void 0:n.join(",");(0,m.YC)(H$,e=>{if(!(t&&e.keyword===t)&&!(r&&e.tags===r))return e})}function H2(e,t,n,r){let i=e.filter(e=>e.assetType===t&&e.keyword===n&&e.tags===r),o=(0,g.DY)(i,e=>e.page).flatMap(e=>e.items);return n?(0,g.mN)(o,e=>e.id):o}function H6(e){(0,m.YC)(H$,t=>{let{items:n,total:r}=t,i=e(n,t);if(i)return{...t,total:r+(i.length-n.length),items:i}})}function H5(e){let{config:t,assetType:n}=e;if(!t.mediaLibrary)throw Error("media library is not configured");let{assetsApiBaseUrl:r,authStrategy:i,repository:o}=t;(0,m.gw)(H$,H9({assetsApiBaseUrl:r,repository:o,authStrategy:i,assetType:n,keyword:"",tagIds:[],useOpenSearch:!1,page:0}))}function H3(e){let{config:t,assetType:n}=e;if(!t.mediaLibrary)throw Error("media library is not configured");(0,m.YC)(H$,e=>0===e.page?e:void 0),H5({config:t,assetType:n})}function H9(e){return[e.assetsApiBaseUrl,e.repository,e.authStrategy,e.assetType,e.keyword,e.tagIds.join(","),e.useOpenSearch,e.page,e.cursor]}m.Fs.registerFetcherConfig(H$,{revalidationStrategy:{type:"never"}});let H4,H7=new Uint8Array(16);function H8(){if(!H4&&!(H4="u">typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)))throw Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return H4(H7)}let Ze=[];for(let Zt=0;Zt<256;++Zt)Ze.push((Zt+256).toString(16).slice(1));let Zn="u">typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),Zr={randomUUID:Zn},Zi=(0,c.createContext)(void 0);function Zo(e){let{children:t,assetType:n="all",onSelectedChange:r,actionContainerRef:i}=e,[o,a]=(0,c.useState)(new Set),[u,s]=(0,c.useTransition)(),[l,d]=(0,c.useTransition)(),p=zB(),{showAlert:A}=(0,f.VY)(),{keyword:h,setKeyword:g,tagIds:b,setTagIds:C,media:S,fetchNextPage:w,hasNextPage:I,updateMedia:_,unshiftMedia:T,deleteMedia:O,mediaTotal:R,deleteSearchData:k,revalidateFirstPage:E}=function(e){let{assetType:t="all",mode:n}=e,r=zB(),[i,o]=(0,c.useState)({keyword:"",page:0,tagIds:[]});r.mediaLibrary||zW("mediaLibrary");let{assetsApiBaseUrl:a,authStrategy:u,repository:s,useOpenSearch:l}=r,{keyword:d,page:f,cursor:p,tagIds:A}=i,h=(0,m.QT)(H$,H9({assetsApiBaseUrl:a,authStrategy:u,repository:s,assetType:t,keyword:d,tagIds:A,useOpenSearch:l&&!!d,page:f,cursor:p}));!function(e){let{assetType:t,keyword:n,mode:r,tagIds:i}=e,o=zB();o.mediaLibrary||zW("mediaLibrary");let{useOpenSearch:a,onAnalyticsEvent:u}=o,s=(0,m.q_)(H$),l=s[s.length-1],d=(0,c.useRef)(l);d.current=l,(0,c.useEffect)(()=>{if(!u||!n||!d.current||d.current.keyword!==n)return;let e=String(n.split(" ").length),o=String(d.current.total),s=i.join(",");u("Media Library Search",{searchQuery:n,numberOfWords:e,numberOfResults:o,timeToGetResults:d.current.time,useOpenSearch:a&&n?"1":"0",assetType:t,mode:r,tags:s})},[n,a,t,r,u,i])}({assetType:t,keyword:d,tagIds:A,mode:n});let g=function(e,t,n){let r=(0,m.q_)(H$);return H2(r,e,t,n.join(","))}(t,d,A),y=h.total!==g.length;return{keyword:d,setKeyword:function(e){o(t=>({...t,keyword:e,page:0,cursor:void 0}))},tagIds:A,setTagIds:function(e){o(t=>({...t,tagIds:e,page:0,cursor:void 0}))},media:g,mediaTotal:h.total,limit:30,hasNextPage:y,fetchNextPage:function(){void 0!==h.cursor&&o(e=>({...e,page:e.page+1,cursor:h.cursor}))},updateMedia:HX,unshiftMedia:function(e){o(e=>({...e,page:0,cursor:void 0})),H6((t,n)=>{if(0===n.page)return[...e,...t]})},deleteMedia:H0,deleteSearchData:H1,revalidateFirstPage:H5}}({assetType:n,mode:r?"select":"browse"}),[M,F]=(0,c.useState)(),{isMediaRevalidationInProgress:j,isMediaCacheInvalid:U,revalidateMedia:K}=function(e){let{revalidate:t,config:n,assetType:r}=e,{assetsApiBaseUrl:i,repository:o="",authStrategy:a="token"}=n.mediaLibrary?n:{},[u,s]=(0,c.useState)(!1),[l,d]=(0,c.useState)(!1);return(0,m.NN)({fetcher:H$,requestParams:H9({assetsApiBaseUrl:i,repository:o,authStrategy:a,assetType:r,keyword:"",tagIds:[],useOpenSearch:!1,page:0}),validator(e,t){var n,r,i,o;let a=(null==(n=e.items[0])?void 0:n.id)??"",u=(null==(i=null==(r=t[0])?void 0:r.items[0])?void 0:i.id)??"";return a!==u||e.total!==(null==(o=t[0])?void 0:o.total)},onCacheInvalidated:()=>d(!0),every:6e4}),(0,c.useEffect)(()=>{u&&(d(!1),s(!1))},[u]),{isMediaRevalidationInProgress:u,isMediaCacheInvalid:l,revalidateMedia:function(){s(!0),t()}}}({assetType:n,config:p,revalidate:function(){g(""),H3({config:p,assetType:n})}}),{isUploading:L,onFilesSelected:B,uploadingFiles:P,onRetry:W}=function(e){let{onBeforeUpload:t,onComplete:n}=e,[r,i]=(0,c.useState)([]),o=r.some(e=>"idle"===e.status||"uploading"===e.status),a=zB(),u=(0,c.useCallback)(e=>{let n=[{...e,status:"idle"},...r.filter(t=>t.id!==e.id)];i(n),t(n)},[t,r]);return(0,c.useEffect)(function(){if(!r.length||r.some(e=>"uploading"===e.status)||r.every(e=>"error"===e.status))return;let e=r.find(e=>"idle"===e.status);if(!e)return;let t=r;function o(e){t=e(t),i(t),t.every(e=>"success"===e.status||"error"===e.status)&&setTimeout(()=>{i([]),null==n||n(t)},1500)}o(t=>t.map(t=>t.id===e.id?{...t,status:"uploading"}:t)),(function(e){let{file:t,config:n}=e;if(!n.mediaLibrary)throw Error("Media Library not configured.");let{assetsApiBaseUrl:r,repository:i,authStrategy:o}=n,a=new FormData;return a.append(t.name,t),(0,y.WY)(new URL("assets",r),{headers:{repository:i,"Content-Type":"multipart/form-data",...HJ},method:"POST",body:a,credentials:(0,y.xb)(o),okType:HZ})})({file:e.file,config:a}).then(t=>{o(n=>n.map(n=>n.id===e.id?{...n,status:"success",response:t}:n))}).catch(()=>{o(t=>t.map(t=>t.id===e.id?{...t,status:"error"}:t))})},[a,r,n]),{isUploading:o,uploadingFiles:r,onFilesSelected:function(e){let n=e.map(e=>({id:`temp-${function(e,t,n){if(Zr.randomUUID&&!t&&!e)return Zr.randomUUID();e=e||{};let r=e.random||(e.rng||H8)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(let i=0;i<16;++i)t[n+i]=r[i];return t}return function(e,t=0){return Ze[e[t+0]]+Ze[e[t+1]]+Ze[e[t+2]]+Ze[e[t+3]]+"-"+Ze[e[t+4]]+Ze[e[t+5]]+"-"+Ze[e[t+6]]+Ze[e[t+7]]+"-"+Ze[e[t+8]]+Ze[e[t+9]]+"-"+Ze[e[t+10]]+Ze[e[t+11]]+Ze[e[t+12]]+Ze[e[t+13]]+Ze[e[t+14]]+Ze[e[t+15]]}(r)}()}`,file:e,status:"idle"}));i(n),t(n)},onRetry:u}}({onBeforeUpload(e){g("");let t=e.filter(e=>"idle"===e.status).map(e=>({id:e.id,url:URL.createObjectURL(e.file),filename:e.file.name,size:e.file.size,extension:e.file.type,kind:e.file.type,last_modified:e.file.lastModified,tags:[]}));T(t);let[n]=t??[];n&&a(new Set([n.id]))},onComplete(e){let t=e.flatMap(e=>"success"===e.status?e:(function(e){let t=(0,x.tx)(e.file.name,30);A({id:e.id,title:`The specified file "${t}" could not be uploaded.`,subtitle:zM.jsxs(f.xv,{color:"inherit",children:["Read more about our"," ",zM.jsx(f.xv,{color:"tomato11",href:"https://prismic.io/docs/guides/manage-images#supported-media",underline:!0,children:"supported media"}),"."]}),buttons:{action:{text:"Retry upload",icon:"cloudUpload",onClick:()=>W(e)}}})}(e),{id:e.id,response:void 0}));_(t),E({config:p,assetType:n});let i=t[0];i&&i.response&&o.has(i.id)&&(a(e=>(0,v.IH)((0,v.Od)(e,i.id),i.response.id)),null==r||r(new Set([i.response.id])))}});function D(){null==r||r(new Set),a(new Set)}function N(e,t){let n=new Set(o),i=P.some(t=>t.id===e&&"success"!==t.status);if(Q(!1),"replace"===t)return a(new Set([e])),i||null==r?void 0:r(new Set([e]));n[t](e),a(n),"add"===t&&i||null==r||r(n)}let[q,Q]=(0,c.useState)(!1);return zM.jsx(Zi.Provider,{value:{isFetchingMedia:u,media:S,mediaTotal:R,onScrollToBottom:function(){I&&s(w)},selectedMediaIds:o,actionContainerRef:i,onFilesUpload:function(e){L||B(e)},isUploading:L,uploadingFiles:P,addMediaItemSelection:function(e){N(e,"add")},removeMediaItemSelection:function(e){N(e,"delete")},replaceMediaItemSelection:function(e){N(e,"replace")},isMediaRevalidationInProgress:j,isMediaCacheInvalid:U,revalidateMedia:K,deleteMedia:O,updateMedia:function(e,t){_([{id:e,response:t}])},keyword:h,onKeywordChange:function(e){e&&k({keyword:e}),d(()=>{g(e),D()})},isSearchingMedia:l,assetType:n,tagManagerOpen:q,setTagManagerOpen:Q,tagIds:b,onTagIdsChange:function(e){e.length&&k({tagIds:e}),d(()=>{C(e),D()})},openMediaSection:M,setOpenMediaSection:F},children:t})}function Za(){let e=(0,c.useContext)(Zi);if(!e)throw Error("useMediaLibrary must be used within a MediaLibraryProvider");return e}function Zu(){let{actionContainerRef:e,isUploading:t,onFilesUpload:n,assetType:r}=Za(),i=null==e?void 0:e.current;return zM.jsx(Zl,{actionContainerRef:e,children:zM.jsxs(f.xu,{width:"100%",gap:16,children:[zM.jsx(Zs,{}),zM.jsx(f.u,{title:zK.warning.uploadWhileUploading.title,content:zK.warning.uploadWhileUploading.description,visible:t,stableMount:!0,children:zM.jsx(f.KH,{disabled:t,onFilesSelected:n,startIcon:"cloudUpload",color:i?"purple":"grey",size:"large",assetType:r,children:"Upload media"})})]})})}function Zs(){let{keyword:e,onKeywordChange:t,isFetchingMedia:n}=Za(),[r,i]=(0,c.useState)(e);return(0,p.pQ)(e,()=>{""===e&&i("")}),(0,p.Nr)(r,300,(0,p.R9)(e=>t(e))),zM.jsx(f.xu,{width:"100%",flexDirection:"column",children:zM.jsx(f.CR,{value:r,placeholder:"Search",onValueChange:i,maxLength:200,isLoading:n&&e!==r})})}function Zl(e){let{children:t,actionContainerRef:n}=e,r=null==n?void 0:n.current,i=r?f.Uv:c.Fragment,o=r?{container:n.current,asChild:!0}:{};return zM.jsx(i,{...o,children:t})}function Zc(e){let{children:t}=e,{onFilesUpload:n,assetType:r}=Za();return zM.jsx(f.Zz,{overlay:zM.jsx(Zd,{}),onFilesSelected:n,assetType:r,children:t})}function Zd(){let{isUploading:e}=Za(),t=e?zK.warning.uploadWhileUploading.title:"Drop files here",n=e?zK.warning.uploadWhileUploading.description:"Drop your files to upload them instantly to the media library.";return zM.jsx(f.xu,{justifyContent:"center",flexDirection:"column",height:"100%",backgroundColor:"grey3",children:zM.jsxs(f.R$,{children:[zM.jsx(f.av,{name:e?"block":"cloudUpload",lineColor:e?"tomato11":"purple10",backgroundColor:e?"tomato2":"purple3",borderColor:e?"tomato6":"purple6",borderStyle:"dashed",size:"xlarge"}),zM.jsx(f._T,{size:"big",children:t}),zM.jsx(f.nf,{width:360,children:n})]})})}function Zf(){return zM.jsx(f.Iq,{title:"Oops! Something went wrong",description:"An error occurred while searching for your image.",errorImageSrc:f.Os,sx:{marginBlock:"auto",marginInline:"auto"}})}function Zp(e){let{mediaList:t,mediaActions:n,mediaToolbar:r,sidePane:i}=e,o=(0,f.ac)({min:"medium"});return zM.jsxs(f.xu,{display:"grid",gridTemplateRows:"auto auto 1fr",gridTemplateColumns:o?"1fr 380px":"1fr",width:"100%",height:"100%",children:[zM.jsxs(f.xu,{position:"relative",display:"grid",gap:16,gridColumn:"1",gridRow:"1",padding:{right:16,bottom:16},children:[n,r]}),zM.jsx(f.xu,{position:"relative",display:"grid",gridColumn:"1",gridRow:"2 / -1",children:t}),o&&i]})}function ZA(e){let{count:t}=e;return zM.jsxs(f.xv,{variant:"bold",children:[t," items"]})}function Zh(){var e;let{onScrollToBottom:t,media:n,selectedMediaIds:r,removeMediaItemSelection:i,addMediaItemSelection:o,replaceMediaItemSelection:a,isUploading:u,uploadingFiles:s,isSearchingMedia:l,isMediaRevalidationInProgress:d,setOpenMediaSection:p}=Za(),A=zB(),h=A.mediaLibrary&&A.mediaLibraryTagsEnabled,m=(0,c.useRef)(null);return(u||l||d)&&(null==(e=m.current)||e.scrollTo({top:0,behavior:"instant"})),zM.jsx(Zm,{onScrollToBottom:t,scrollAreaRef:m,children:n.map(e=>{var t,n;return zM.jsx(f.PB,{"aria-label":"media item",...e,filenameHighlight:null==(t=e.search_highlight)?void 0:t.filename,loading:l,status:null==(n=s.find(t=>t.id===e.id))?void 0:n.status,selected:r.has(e.id),onCardClick:()=>(function(e){if(1===r.size&&r.has(e)){i(e);return}a(e)})(e.id),onCheckedChange:()=>(function(e){if(r.has(e)){i(e);return}o(e)})(e.id),onAddTagClick:h?()=>{var t;a(t=e.id),p("tags")}:void 0},e.id)})})}function Zm(e){let{children:t,scrollAreaRef:n,onScrollToBottom:r}=e,i="calc((100% - 48px) / 4)";return zM.jsx(f.xr,{"aria-label":"Media list",ref:n,style:{display:"grid",gridTemplateColumns:`repeat(auto-fill, minmax(max(250px, ${i}), 1fr))`,gridTemplateRows:"1fr 1fr 1fr ",gap:16,paddingBottom:16,position:"relative"},onScrollToBottom:r,threshold:500,children:t})}function Zg(e){let{children:t,hasSelectedMedia:n}=e;return zM.jsx(f.xu,{overflow:"hidden",gridColumn:"2 / -1",gridRow:"1 / -1",children:zM.jsx(f.xr,{style:{display:"grid",height:"100%"},children:zM.jsx(f.xu,{flexGrow:1,borderRadius:{topRight:8,topLeft:8},borderStyle:n?"solid":"dashed",border:{top:!0,right:!0,left:!0,bottom:!1},minWidth:0,children:t})})})}function Zy(e){let{onFilesUpload:t,isUploading:n,isInitialLoad:r=!1}=e,i=r||n;return zM.jsxs(f.xu,{flexDirection:"column",justifyContent:"center",alignItems:"center",padding:16,gap:16,width:"100%",children:[zM.jsx(f.av,{name:"cloudUpload",lineColor:"purple11",backgroundColor:"purple5",size:"large"}),zM.jsx(f.xu,{flexDirection:"column",gap:4,children:zM.jsxs(f.xv,{align:"center",children:["Select or"," ",zM.jsx(f.KH,{disabled:i,onFilesSelected:t,renderButton:e=>zM.jsx(f.u,{title:zK.warning.uploadWhileUploading.title,content:zK.warning.uploadWhileUploading.description,visible:n,children:zM.jsx(f.xu,{display:"inline-flex",as:"span",children:zM.jsx(f.zx,{disabled:i,onClick:e,invisible:!0,children:"upload"})})})})," ","media."]})}),zM.jsx(f.KH,{disabled:i,onFilesSelected:t,color:"grey",children:"Upload media"})]})}function Zv(e){let{actionContainerRef:t}=e;return zM.jsx(Zp,{sidePane:zM.jsx(ZC,{}),mediaActions:zM.jsx(Zb,{actionContainerRef:t}),mediaToolbar:zM.jsx(f.Od,{color:"grey5",borderRadius:12,children:zM.jsx(ZA,{count:888})}),mediaList:zM.jsx(Zx,{})})}function Zx(){return zM.jsx(Zm,{children:(0,g.w6)(1,24).map(e=>zM.jsx(ZS,{},e))})}function Zb(e){let{actionContainerRef:t}=e,n=(0,p.NW)();return(0,c.useLayoutEffect)(()=>{n()},[n]),zM.jsx(Zl,{actionContainerRef:t,children:zM.jsxs(f.xu,{width:"100%",gap:16,children:[zM.jsx(f.xu,{width:"100%",flexDirection:"column",children:zM.jsx(f.CR,{placeholder:"Search",maxLength:200,value:"",disabled:!0,onValueChange(){}})}),zM.jsx(f.KH,{disabled:!0,onFilesSelected(){},startIcon:"cloudUpload",color:t?"purple":"grey",size:"large",children:"Upload media"})]})})}function ZC(){return zM.jsx(Zg,{hasSelectedMedia:!1,children:zM.jsx(Zy,{onFilesUpload(){},isUploading:!1,isInitialLoad:!0})})}function ZS(){return zM.jsxs(f.xu,{height:302,width:"100%",flexDirection:"column",padding:16,backgroundColor:"grey1",border:!0,borderStyle:"solid",borderRadius:6,children:[zM.jsx(f.Od,{height:164,width:"100%"}),zM.jsx(f.Od,{height:16,width:"100%",sx:{marginTop:12}}),zM.jsx(f.Od,{height:10,width:100,sx:{marginTop:8}}),zM.jsx(f.Od,{height:1,width:"100%",sx:{marginTop:20,marginBottom:16}}),zM.jsxs(f.xu,{flexDirection:"row",gap:8,children:[zM.jsx(f.Od,{height:24,width:54}),zM.jsx(f.Od,{height:24,width:45}),zM.jsx(f.Od,{height:24,width:62})]})]})}let Zw=(0,c.createContext)({showToast(){}});function ZI(e){let{children:t}=e,{isFetchingMedia:n}=Za(),[r,i]=(0,c.useState)({title:"",seconds:5}),[o,a]=(0,c.useState)(!1),{title:u,action:s,seconds:l=1,icon:d="check"}=r,p=(0,c.useMemo)(()=>({showToast(e){i({seconds:l,...e}),a(!0)}}),[l]);return zM.jsxs(zM.Fragment,{children:[zM.jsx(ZT,{open:n}),zM.jsx(ZO,{}),zM.jsx(f.FN,{anchor:zM.jsx(f.xu,{position:"absolute",justifyContent:"center",width:"100%",bottom:72}),open:o,onOpenChange:a,title:u,action:s,seconds:l,icon:d}),zM.jsx(Zw.Provider,{value:p,children:t})]})}function Z_(){return(0,c.useContext)(Zw)}function ZT(e){let{open:t}=e;return zM.jsx(f.FN,{anchor:zM.jsx(f.xu,{position:"absolute",justifyContent:"center",width:"100%",bottom:72}),loadingIndicator:!0,open:t,title:"Loading more items ...",seconds:1})}function ZO(){let{revalidateMedia:e,isMediaCacheInvalid:t}=Za(),[n,r]=(0,c.useState)(t);return(0,p.pQ)(t,r),zM.jsx(f.FN,{anchor:zM.jsx(f.xu,{position:"absolute",justifyContent:"center",width:"100%",bottom:72}),open:n,title:"There has been changes to your media library",action:{title:"Update",onClick:e},cancel:{onClick:()=>r(!1)}})}function ZR(){let{media:e,mediaTotal:t,tagIds:n}=Za(),r=zB(),i=r.mediaLibrary&&r.mediaLibraryTagsEnabled;return zM.jsxs(f.xu,{alignItems:"center",gap:16,children:[0!==e.length&&zM.jsx(ZA,{count:t}),i&&zM.jsxs(f.xu,{gap:8,alignItems:"center",children:[zM.jsx(f.xv,{children:"Filter:"}),zM.jsx(ZE,{}),n.length>0&&zM.jsx(f.SV,{children:zM.jsx(c.Suspense,{children:zM.jsx(Zk,{})})})]})]})}function Zk(){let{tagIds:e,onTagIdsChange:t}=Za(),{tags:n}=HN(),r=(0,c.useMemo)(()=>(0,C.vM)(n,e=>e.id),[n]);return zM.jsx(zM.Fragment,{children:e.map(n=>{var i;let o=null==(i=r.get(n))?void 0:i[0];return o?zM.jsx(f.Ct,{title:o.name,size:"medium",color:"purple",onClose:()=>(function(n){let r=e.filter(e=>e!==n.id);t(r)})(o),selected:!0},o.id):null})})}function ZE(){let{setTagManagerOpen:e,tagIds:t,onTagIdsChange:n}=Za(),[r,i]=(0,c.useState)(""),[o,a]=(0,c.useState)(!1);return zM.jsxs(f.h_,{open:o,onOpenChange:function(e){a(e),e||i("")},children:[zM.jsx(f.$F,{children:zM.jsx(f.zx,{startIcon:"label",endIcon:"arrowDropDown",size:"small",color:"grey",children:"Tags"})}),zM.jsx(f.AW,{minWidth:256,align:"start",border:!1,childrenFocusScope:!0,children:zM.jsxs(f.BC,{variant:"attached",children:[zM.jsx(f.Ie,{value:r,onValueChange:i,placeholder:"Search for a tag",autoFocus:!0}),zM.jsx(f.KV,{children:zM.jsx(f.SV,{renderError:()=>zM.jsx(f.xv,{color:"grey9",variant:"small",sx:{marginBlock:8,marginInline:8},children:"Error getting tags"}),children:zM.jsx(c.Suspense,{fallback:zM.jsx(f.xu,{padding:8,flexDirection:"column",gap:8,children:(0,g.w6)(1,6).map(e=>zM.jsx(f.Od,{height:24,width:85},e))}),children:zM.jsx(ZM,{searchTerm:r,setSearchTerm:i,onTagToggle:function(e){let r=t.includes(e.id)?t.filter(t=>t!==e.id):[...t,e.id];n(r),a(!1)}})})})}),zM.jsx(f.De,{children:zM.jsx(f.zx,{invisible:!0,startIcon:"edit",textWeight:"normal",color:"dark",onClick:function(){a(!1),e(!0)},children:"Manage tags"})})]})})]})}function ZM(e){let{onTagToggle:t,searchTerm:n}=e,{tagIds:r}=Za(),{tags:i}=HN(),o=(0,c.useMemo)(()=>{let e=n.toLowerCase();return i.filter(t=>t.name.toLowerCase().includes(e))},[i,n]);return zM.jsxs(zM.Fragment,{children:[!o.length&&zM.jsx(f.xv,{color:"grey9",variant:"small",sx:{marginBlock:8,marginInline:8},children:"No tags found"}),o.map((e,n)=>{let i=r.includes(e.id);return zM.jsx(f.c8,{value:e.id,onCheckedChange:()=>t(e),checked:i,children:zM.jsx(f.Ct,{title:e.name,color:"purple",sx:{marginLeft:8,marginBottom:n===o.length-1?8:4,marginTop:0===n?8:4},size:"medium"})},e.id)})]})}function ZF(){let{media:e,selectedMediaIds:t}=Za();return e.filter(({id:e})=>t.has(e))}function Zj(){let[e,t]=(0,c.useState)(!1),n=ZF(),r=(0,c.useMemo)(()=>n.some(({id:e})=>e.startsWith("temp")),[n]),[i]=n;return i?n.length>1?zM.jsxs(f.xu,{gap:8,alignItems:"center",children:[zM.jsxs(f.xv,{variant:"emphasized",noWrap:!0,sx:{flexGrow:1},children:[n.length," media selected"]}),zM.jsx(f.u,{content:"Open all selected media in new tabs",children:zM.jsx(f.hU,{icon:"openInFull",variant:"solid",size:"small",onClick:()=>n.forEach(e=>window.open(e.url,"_blank"))})}),zM.jsx(f.u,{content:"Remove selected media",children:zM.jsx(f.hU,{icon:"delete",variant:"solid",color:"tomato",size:"small",hiddenLabel:"Remove media",onClick:()=>t(!0),disabled:r})}),zM.jsx(ZU,{open:e,onOpenChange:t,media:n})]}):zM.jsxs(f.xu,{gap:8,alignItems:"center",children:[zM.jsx(f.xv,{variant:"emphasized",noWrap:!0,sx:{flexGrow:1},children:i.filename}),zM.jsxs(f.xu,{gap:8,children:[zM.jsx(f.u,{content:"Open media in new tab",children:zM.jsx(f.hU,{icon:"openInFull",variant:"solid",size:"small",hiddenLabel:"Open media in new tab",onClick:()=>window.open(i.url,"_blank"),disabled:r})}),zM.jsx(f.u,{content:"Copy media URL",children:zM.jsx(f.hU,{icon:"link",variant:"solid",size:"small",hiddenLabel:"Copy media URL",onClick:()=>navigator.clipboard.writeText(i.url),disabled:r})}),zM.jsx(f.u,{content:"Remove media",children:zM.jsx(f.hU,{icon:"delete",variant:"solid",color:"tomato",size:"small",hiddenLabel:"Remove media",onClick:()=>t(!0),disabled:r})}),zM.jsx(ZU,{open:e,onOpenChange:t,media:i})]})]}):null}function ZU(e){let{open:t,onOpenChange:n,media:r}=e,i=zB(),{showAlert:o}=(0,f.VY)(),{deleteMedia:a}=Za(),[u,s]=(0,c.useState)(!1),l=Array.isArray(r),d=l?"these items":"this item";return zM.jsxs(f.Vq,{onOpenChange:n,open:t,size:"small",children:[zM.jsx(f.fK,{icon:"alert",title:`Remove ${d} from your media library?`}),zM.jsx(f.cZ,{children:zM.jsx(f.xu,{padding:16,children:zM.jsxs(f.xv,{children:["You are about to delete ",d,": \xa0",l?zM.jsx(ZK,{media:r}):zM.jsx("b",{children:r.filename})]})})}),zM.jsx(f.kX,{asFooter:!0,ok:{onClick:function(){s(!0);let e=l?r.map(({id:e})=>e):[r.id];(function(e){let{ids:t,config:n}=e;if(!n.mediaLibrary)throw Error("Media Library not configured.");if(0===t.length)throw Error("No ids provided during media deletion");let{assetsApiBaseUrl:r,repository:i,authStrategy:o}=n;if(1===t.length){let[a]=t;return(0,y.WY)(new URL(`assets/${a}`,r),{headers:{repository:i},method:"DELETE",credentials:(0,y.xb)(o),okType:HI.unknown()})}return(0,y.WY)(new URL("assets/bulk-delete",r),{headers:{repository:i},method:"POST",credentials:(0,y.xb)(o),okType:HI.unknown(),body:{ids:t}})})({ids:e,config:i}).then(()=>{n(!1),a(e)}).catch(()=>{n(!1),o({title:"Error",subtitle:`Something went wrong when removing ${d}.`})}).finally(()=>{s(!1)})},text:`Yes, I want to remove ${d}`,color:"tomato",loading:u},cancel:{text:"Cancel"}})]})}function ZK({media:e}){let t=e.slice(0,15),n=e.length>15,r=n?e.length-15:0;return zM.jsxs("ul",{children:[t.map((e,t)=>zM.jsx("li",{children:zM.jsx("b",{children:e.filename})},t)),n&&zM.jsxs("span",{children:[zM.jsx("br",{}),"And ",zM.jsx("b",{children:r})," more ",1===r?"item":"items","..."]})]})}function ZL(){var e;let t=ZF(),{uploadingFiles:n}=Za(),[r]=t;if(!r)return null;if(2===t.length)return zM.jsx(ZB,{children:t.map((e,t)=>zM.jsx("div",{style:{position:"absolute",transform:0===t?"translateX(25%) rotate(15deg) ":"translateX(-25%) rotate(-15deg) "},children:zM.jsx(ZP,{media:e})},e.id))});if(t.length>2)return zM.jsx(ZB,{children:t.slice(-4).map((e,t)=>zM.jsx("div",{style:{position:"absolute",paddingRight:16*t},children:zM.jsx(ZP,{media:e})},e.id))});let i=null==(e=n.find(e=>e.id===r.id))?void 0:e.status,o=r.kind.startsWith("image");return zM.jsx(f.xu,{flexDirection:"column",children:zM.jsx(f.hM,{children:zM.jsx(ZB,{uploadStatus:i,hasImage:o,children:o?zM.jsx(f.Ee,{src:r.url,alt:r.alt,sizing:"contain"}):zM.jsx(f.Sp,{extension:r.extension,filename:r.filename})})})})}function ZB(e){let{children:t,uploadStatus:n,hasImage:r}=e;return zM.jsxs(f.xu,{flexDirection:"column",alignItems:"center",justifyContent:"center",position:"relative",height:200,width:"100%",backgroundColor:r?"transparent":"purple2",children:[t,n&&zM.jsx(f.xu,{position:"absolute",backgroundColor:"greyAlpha1",width:"100%",height:"100%",padding:{inline:16},justifyContent:"end",flexDirection:"column",children:zM.jsx(f.wI,{status:n})})]})}function ZP(e){let{media:t}=e;return zM.jsx(f.xu,{width:111,height:152,children:"image"===t.kind?zM.jsx(f.Ee,{borderRadius:8,src:t.url,alt:t.alt,sizing:"cover"}):zM.jsx(f.Sp,{extension:t.extension,filename:t.filename})})}let ZW="__MAIN_THUMBNAIL__";function ZD(e,t,n){let r=e.name===ZW?void 0:e.name,i;return[r,(i=t?(0,h.$)(n)?[n.width,n.height]:(0,h.$)(e.width)||(0,h.$)(e.height)?[e.width??void 0,e.height??void 0]:[t.origin.width,t.origin.height]:void 0)?`${i[0]??"auto"}x${i[1]??"auto"}px`:void 0]}function ZN(e){let t=new URL(e);return t.searchParams.delete("q"),t.searchParams.set("w","800"),t.searchParams.set("h","800"),t.searchParams.set("auto","compress,format"),t.searchParams.set("fit","max"),t.toString()}function Zq(e){return null!=e&&e.url?ZN(e.url):void 0}function ZQ(e,t){var n;let{width:r,height:i,rect:o}=function(e,t){let[n,r]=function(e,t){let{width:n,height:r}=t??{};return n&&r?[n,r]:n?[n,Math.round(e.height*(n/e.width))]:r?[Math.round(e.width*(r/e.height)),r]:[e.width,e.height]}(e,t),i=Math.max(n/e.width,r/e.height),o=Math.round((e.width-n/i)/2),a=Math.round((e.height-r/i)/2);return{width:n,height:r,rect:{x:o,y:a,width:Math.round(n/i),height:Math.round(r/i)}}}({...e,width:(null==e?void 0:e.width)??2e3,height:(null==e?void 0:e.height)??2e3},t),a=!!(null!=t&&t.width||null!=t&&t.height);return{url:function(e,t,n,r,i){let o=new URL(e);if(i){let{x:a,y:u,width:s,height:l}=t;o.searchParams.set("rect",[a,u,s,l].join(",")),o.searchParams.set("w",n.toString()),o.searchParams.set("h",r.toString())}return o.toString()}(e.url,o,r,i,a),alt:e.alt,..."kind"in e&&"extension"in e?{credits:e.credits}:{},origin:{id:e.id,url:e.url,width:e.width??2e3,height:e.height??2e3},width:r,height:i,edit:{background:"transparent",zoom:1,crop:{x:o.x,y:o.y}}}}function ZV(e){if(!e)return"";let{filename:t,extension:n}=e;if(!n)return t;let r=RegExp(`\\.${n}$`);return t.replace(r,"")}function Zz(){let{setTagManagerOpen:e,updateMedia:t}=Za(),[n]=ZF(),r=zB(),{showAlert:i}=(0,f.VY)(),{showToast:o}=Z_(),[a,u]=(0,c.useState)("");async function s(e){if(!n)return;let a=n.tags,s=a.some(t=>t.id===e.id),l=s?a.filter(t=>t.id!==e.id):[...a,e];t(n.id,{tags:l}),u("");try{await function(e){let{mediaId:t,config:n,tags:r}=e;if(!n.mediaLibrary)throw Error("Media Library not configured.");let{assetsApiBaseUrl:i,repository:o,authStrategy:a}=n;return(0,y.WY)(new URL(`assets/${t}`,i),{headers:{repository:o},body:{tags:r},method:"PATCH",credentials:(0,y.xb)(a),okType:HZ})}({mediaId:n.id,config:r,tags:l.map(e=>e.id)}),HY(t=>t.map(t=>t.id===e.id?{...t,count:t.count+(s?-1:1)}:t)),o({title:"Media tags were updated",seconds:3})}catch{t(n.id,{tags:a}),i({title:"Error",subtitle:"Something went wrong when updating media tags"})}}return n?zM.jsxs(f.xu,{flexDirection:"column",children:[zM.jsxs(f.xu,{justifyContent:"space-between",children:[zM.jsx(f.xv,{color:"grey12",variant:"bold",children:function(){if(!n)return null;let e=n.tags.length;return e>1?`${e} tags`:1===e?"1 tag":"Tags"}()}),zM.jsx(f.zx,{startIcon:"edit",invisible:!0,color:"dark",onClick:()=>e(!0),children:"Manage tags"})]}),zM.jsxs(f.BC,{sx:{marginTop:4,marginBottom:8},children:[zM.jsx(ZY,{searchTerm:a,setSearchTerm:u}),zM.jsx(f.KV,{children:zM.jsx(f.SV,{renderError:()=>zM.jsx(f.xv,{color:"grey9",variant:"small",sx:{marginBlock:8,marginInline:8},children:"Error getting tags"}),children:zM.jsx(c.Suspense,{fallback:zM.jsx(f.xu,{padding:8,flexDirection:"column",gap:8,children:(0,g.w6)(1,6).map(e=>zM.jsx(f.Od,{height:24,width:85},e))}),children:zM.jsx(ZH,{searchTerm:a,onToggleAssetTag:s})})})})]}),zM.jsx(f.xu,{flexDirection:"column",alignItems:"flex-start",gap:8,children:n.tags.map(e=>zM.jsx(f.Ct,{title:e.name,size:"medium",color:"purple",selected:!0,onClose:()=>s(e)},e.id))})]}):null}function ZY(e){let{searchTerm:t,setSearchTerm:n}=e,r=(0,c.useRef)(null),{openMediaSection:i,setOpenMediaSection:o}=Za();return(0,c.useEffect)(()=>{var e;"tags"===i&&(null==(e=r.current)||e.focus(),o(void 0))},[i,o]),zM.jsx(f.Ie,{value:t,onValueChange:n,placeholder:"Add or create a new tag",ref:r})}function ZH(e){let{searchTerm:t,onToggleAssetTag:n}=e,[r]=ZF(),i=zB(),{showAlert:o}=(0,f.VY)(),{tags:a}=HN(),u=(0,c.useMemo)(()=>{let e=t.toLowerCase();return a.filter(t=>t.name.toLowerCase().includes(e))},[a,t]),s=HQ.safeParse(t).success&&a.every(e=>e.name!==t);async function l(){if(!t||!r)return;let e;try{e=await function(e){let{name:t,config:n}=e;n.mediaLibrary||zW("mediaLibrary");let{assetsApiBaseUrl:r,repository:i,authStrategy:o}=n;return(0,y.WY)(new URL("tags",r),{headers:{repository:i},body:{name:t},method:"POST",credentials:(0,y.xb)(o),okType:HV})}({name:t,config:i}),HY(t=>[e,...t])}catch{o({title:"Error",subtitle:`Something went wrong when creating the tag ${t}`});return}await n(e)}return r?zM.jsxs(zM.Fragment,{children:[!u.length&&zM.jsx(f.xv,{color:"grey9",variant:"small",sx:{marginBlock:8,marginInline:8},children:"No tags found"}),u.map((e,t)=>zM.jsx(f.c8,{value:e.id,onCheckedChange:()=>n(e),checked:r.tags.some(t=>t.id===e.id),children:zM.jsx(f.Ct,{title:e.name,color:"purple",size:"medium",sx:{marginInline:8,marginBottom:t===u.length-1?8:4,marginTop:0===t?8:4}})},e.id)),s&&zM.jsx(f.c8,{value:"new",onCheckedChange:l,children:zM.jsxs(f.xu,{padding:8,flexDirection:"row",alignItems:"center",gap:4,children:[zM.jsx(f.I5,{name:"add",size:"small",color:"grey11"}),zM.jsxs(f.xv,{color:"grey12",children:['Create tag "',t,'"']})]})})]}):null}function ZZ(){let[e,t]=(0,c.useState)("description");if(1!==ZF().length)return null;let n="description"===e,r="more-info"===e;return zM.jsxs(zM.Fragment,{children:[zM.jsxs(f.xu,{border:!0,borderStyle:"solid",borderRadius:8,backgroundColor:"grey2",children:[zM.jsx(f.OK,{title:"Description",selected:n,onSelect:()=>t("description"),outline:n,background:n?void 0:"transparent",sx:{flexGrow:1,flexBasis:0}}),zM.jsx(f.OK,{title:"More info",selected:r,onSelect:()=>t("more-info"),outline:r,background:r?void 0:"transparent",sx:{flexGrow:1,flexBasis:0}})]}),zM.jsx(ZJ,{tab:e})]})}function ZJ(e){let{tab:t}=e;switch(t){case"description":return zM.jsx(ZG,{});case"more-info":return zM.jsx(Z$,{})}}function ZG(){let{title:e,alt:t,onBlur:n,isUploading:r,selectedMedia:i}=ZX(),o=zB(),a=o.mediaLibrary&&o.mediaLibraryTagsEnabled;if(!i)return null;let{extension:u}=i;return zM.jsxs(f.xu,{flexDirection:"column",gap:16,children:[zM.jsx(f.yt,{value:e.value,onValueChange:e.set,label:"Media title",placeholder:"Media title",onBlur:n,disabled:r,suffix:u?`.${u}`:void 0}),zM.jsx(f.Wi,{label:"Alternative text",children:zM.jsx(f.f$,{content:t.displayValue,contentVersion:t.version,readOnly:r,placeholder:"A short description of the media for accessibility",multiline:!0,decorations:{em:"highlight"},onChange:t.onChange,onBlur:n})}),a&&!r&&zM.jsx(Zz,{})]})}function Z$(){let{credits:e,notes:t,onBlur:n,isUploading:r,selectedMedia:i}=ZX();if(!i)return null;let o=function(e){let{width:t,height:n,last_modified:r,size:i,extension:o}=e,a=t&&n,u={label:"Date",value:(0,A._L)(new Date(r))},s={label:"File size",value:(0,x.td)(i)},l=a?{label:"Dimensions",value:`${t}x${n}`}:void 0,c=a?{label:"Ratio",value:((t??0)/(n??0)).toFixed(1)}:void 0,d=o?{label:"Extension",value:o.toUpperCase()}:void 0;return[u,s,l,c,d].filter(h.$)}(i);return zM.jsxs(f.xu,{gap:8,flexDirection:"column",children:[o.map(e=>zM.jsxs(f.xu,{gap:8,children:[zM.jsxs(f.xv,{color:"grey11",children:[e.label,":"]}),zM.jsx(f.xv,{children:e.value})]},e.label)),zM.jsx(f.Wi,{label:"Copyright",children:zM.jsx(f.f$,{content:e.displayValue,contentVersion:e.version,readOnly:r,placeholder:"Media copyrights or credits",multiline:!0,decorations:{em:"highlight"},onChange:e.onChange,onBlur:n})}),zM.jsx(f.Wi,{label:"Private notes",children:zM.jsx(f.f$,{content:t.displayValue,contentVersion:t.version,readOnly:r,placeholder:"Private notes are never shared publicly",multiline:!0,decorations:{em:"highlight"},onChange:t.onChange,onBlur:n})})]})}function ZX(){let[e]=ZF(),{updateMedia:t,uploadingFiles:n}=Za(),r=zB(),{showToast:i}=Z_(),o=(null==e?void 0:e.id)??"",a=Z0(e,"alt"),u=Z0(e,"notes"),s=Z0(e,"credits"),l=Z0(e,"filename",ZV),c=n.some(t=>t.id===(null==e?void 0:e.id)&&"success"!==t.status);return{selectedMedia:e,onBlur:function(){if(!e||!l.changed&&!a.changed&&!s.changed&&!u.changed)return;let{extension:n,search_highlight:c}=e,d=n?`${l.value}.${n}`:l.value;t(o,{filename:d,alt:a.value,credits:s.value,notes:u.value,search_highlight:{alt:a.changed||null==c?void 0:c.alt,credits:s.changed||null==c?void 0:c.credits,filename:l.changed||null==c?void 0:c.filename,notes:u.changed||null==c?void 0:c.notes}}),(function(e){let{id:t,config:n,metadata:r}=e;if(!n.mediaLibrary)throw Error("Media Library not configured.");let{assetsApiBaseUrl:i,repository:o,authStrategy:a}=n;return(0,y.WY)(new URL(`assets/${t}`,i),{headers:{repository:o},body:{...r},method:"PATCH",credentials:(0,y.xb)(a),okType:HZ})})({id:o,config:r,metadata:{filename:d,alt:a.value,credits:s.value,notes:u.value}}).then(()=>{i({title:"Media metadata has been saved.",seconds:3})}).catch(e=>{console.error(e)})},isUploading:c,title:l,alt:a,credits:s,notes:u,extension:null==e?void 0:e.extension}}function Z0(e,t,n=e=>null==e?void 0:e[t]){var r,i;let o=n(e)??"",[a,u]=(0,c.useState)(o);(0,p.pQ)(null==e?void 0:e.id,()=>u(o));let s=null==(r=null==e?void 0:e.search_highlight)?void 0:r[t];return{value:a,set:u,displayValue:(i=s??a,(null==i?void 0:i.replace(/\n/g,"<br>"))??""),onChange:function(e){let{from:t,to:n}=e.state.selection;e.commands.selectAll(),e.commands.unsetAllMarks(),e.commands.setTextSelection({from:t,to:n}),u(e.getText())},version:`${(null==e?void 0:e.id)??""}_${!!s}`,changed:a!==o}}function Z1(){let{setTagManagerOpen:e}=Za(),[t,n]=(0,c.useState)("");return zM.jsxs(f.xu,{gap:20,flexDirection:"column",height:"100%",children:[zM.jsxs(f.xu,{alignItems:"center",gap:4,children:[zM.jsx(f.hU,{icon:"close",size:"small",hasPadding:!1,onClick:()=>e(!1)}),zM.jsx(f.xv,{variant:"bold",children:"Tags management"})]}),zM.jsxs(f.xu,{gap:16,flexDirection:"column",height:"100%",children:[zM.jsx(f.CR,{value:t,onValueChange:n,placeholder:"Search for tags",endAdornment:!1,autoFocus:!0}),zM.jsx(f.SV,{renderError:()=>zM.jsx(Z3,{}),children:zM.jsx(c.Suspense,{fallback:zM.jsx(Z9,{}),children:zM.jsx(Z2,{searchTerm:t})})})]})]})}function Z2(e){let{searchTerm:t}=e,{tags:n}=HN(),r=n.filter(e=>e.name.toLowerCase().includes(t.toLowerCase()));return 0===r.length?zM.jsx(f.xv,{color:"grey9",variant:"small",children:"No tags found"}):zM.jsx(f._M,{ariaLabel:"Tags list",getItemKey:e=>e.id,gap:16,items:r,children:e=>zM.jsx(Z6,{tag:e})})}function Z6(e){let{tag:t}=e,[n,r]=(0,c.useState)(!1),i=zB(),{showAlert:o}=(0,f.VY)(),{showToast:a}=(0,f.pm)(),{tags:u}=HN();async function s(e){if(!HQ.safeParse(e).success){o({title:"Error",subtitle:`Failed to rename tag "${t.name}" to "${e}". Tag name must be at least 3 and at maximum 20 characters long.`});return}if(u.some(t=>t.name===e)){o({title:"Error",subtitle:`Failed to rename tag "${t.name}" to "${e}". Tag with name "${e}" already exists.`});return}try{await function(e){let{id:t,name:n,config:r}=e;r.mediaLibrary||zW("mediaLibrary");let{assetsApiBaseUrl:i,repository:o,authStrategy:a}=r;return(0,y.WY)(new URL(`tags/${t}`,i),{headers:{repository:o},method:"PATCH",credentials:(0,y.xb)(a),body:{name:n},okType:HI.unknown()})}({id:t.id,name:e,config:i}),HY(n=>n.map(n=>n.id===t.id?{...n,name:e}:n)),H6(n=>n.map(n=>{if(-1!==n.tags.findIndex(e=>e.id===t.id)){let r=n.tags.map(n=>n.id===t.id?{...n,name:e}:n);return{...n,tags:r}}return n})),a({title:`Tag "${t.name}" renamed to "${e}"`,seconds:3})}catch{o({title:"Error",subtitle:"Something went wrong when renaming the tag."})}}return zM.jsxs(zM.Fragment,{children:[zM.jsxs(f.xu,{justifyContent:"space-between",children:[zM.jsx(f.Ct,{title:t.name,color:"purple",size:"medium",onEdit:s}),zM.jsx(f.zx,{invisible:!0,color:"tomato",textWeight:"normal",onClick:()=>r(!0),children:"Delete"})]}),zM.jsx(Z5,{open:n,onOpenChange:r,tag:t})]})}function Z5(e){let{open:t,onOpenChange:n,tag:r}=e,{id:i,name:o,count:a}=r,u=zB(),{showAlert:s}=(0,f.VY)(),[l,d]=(0,c.useState)(!1);async function p(){d(!0);try{await function(e){let{id:t,config:n}=e;n.mediaLibrary||zW("mediaLibrary");let{assetsApiBaseUrl:r,repository:i,authStrategy:o}=n;return(0,y.WY)(new URL(`tags/${t}`,r),{headers:{repository:i},method:"DELETE",credentials:(0,y.xb)(o),okType:HI.unknown()})}({id:i,config:u}),HY(e=>e.filter(e=>e.id!==i)),H6(e=>e.map(e=>{if(-1!==e.tags.findIndex(e=>e.id===i)){let t=e.tags.filter(e=>e.id!==i);return{...e,tags:t}}return e}))}catch{s({title:"Error",subtitle:"Something went wrong when removing the tag."})}finally{d(!1),n(!1)}}return zM.jsxs(f.Vq,{onOpenChange:n,open:t,size:"small",children:[zM.jsx(f.fK,{title:`This tag is being used on ${a} media item${1===a?"":"s"}`}),zM.jsx(f.cZ,{padding:16,children:zM.jsxs(f.xv,{children:["You are about to delete the tag name ",zM.jsx("b",{children:o}),"."," ",a>0&&`This tag is being
6
- used on ${a} media item${1===a?"":"s"} and will be deleted
7
- from ${1===a?"it":"them"}.`]})}),zM.jsx(f.kX,{asFooter:!0,ok:{onClick:p,text:"Yes, I want to delete",color:"tomato",loading:l},cancel:{text:"Cancel"}})]})}function Z3(){let e=(0,c.useContext)(m.Nk);return zM.jsx(f.xu,{flexDirection:"column",children:zM.jsxs(f.R$,{children:[zM.jsx(f.av,{name:"close",lineColor:"purple10",backgroundColor:"purple3",borderColor:"purple6",borderStyle:"dashed"}),zM.jsx(f._T,{size:"big",children:"Oops!"}),zM.jsx(f.nf,{width:360,children:"We couldn't load your media tags."}),zM.jsx(f.Qj,{children:zM.jsx(f.zx,{onClick:null==e?void 0:e.reset,size:"medium",children:"Try again"})})]})})}function Z9(){return zM.jsx(f.xu,{flexDirection:"column",gap:16,children:(0,g.w6)(1,6).map(e=>zM.jsxs(f.xu,{justifyContent:"space-between",children:[zM.jsx(f.Od,{height:24,width:85}),zM.jsx(f.Od,{height:24,width:45})]},e))})}function Z4(){let e=ZF(),{onFilesUpload:t,isUploading:n,tagManagerOpen:r}=Za();return 0===e.length&&!1===r?zM.jsx(Zy,{onFilesUpload:t,isUploading:n}):zM.jsx(f.xu,{flexDirection:"column",backgroundColor:"grey1",width:"100%",padding:16,gap:16,borderRadius:{topLeft:8,topRight:8},children:r?zM.jsx(Z1,{}):zM.jsxs(zM.Fragment,{children:[zM.jsx(Zj,{}),zM.jsx(ZL,{}),zM.jsx(ZZ,{})]})})}function Z7(){let{selectedMediaIds:e}=Za(),t=e.size>0;return zM.jsx(Zg,{hasSelectedMedia:t,children:zM.jsx(Z4,{})})}function Z8(e){let{assetType:t,onSelectedChange:n,actionContainerRef:r}=e;return zM.jsx(f.SV,{renderError:()=>zM.jsx(Zf,{}),children:zM.jsx(c.Suspense,{fallback:zM.jsx(Zv,{actionContainerRef:r}),children:zM.jsx(Zo,{assetType:t,actionContainerRef:r,onSelectedChange:n,children:zM.jsx(Zc,{children:zM.jsx(Je,{})})})})})}function Je(){let{media:e}=Za();return zM.jsx(ZI,{children:zM.jsx(Zp,{sidePane:zM.jsx(Z7,{}),mediaActions:zM.jsx(Zu,{}),mediaToolbar:zM.jsx(ZR,{}),mediaList:0===e.length?zM.jsx(zU,{}):zM.jsx(Zh,{})})})}(0,c.createContext)({editedUID:{current:!1},onEditUID(){}});let Jt=(0,c.createContext)({update(){}});function Jn(e){var t;return(null==(t=e.config)?void 0:t.label)??("Boolean"===e.type||"Separator"===e.type?void 0:e.fieldset)??e.type}function Jr(e,t){var n,r,i;return"Boolean"===e.type?(t?null==(n=e.config)?void 0:n.placeholder_true:null==(r=e.config)?void 0:r.placeholder_false)||"...":(null==(i=e.config)?void 0:i.placeholder)||"..."}function Ji(e){var t;let{content:n,field:r,id:i,readOnly:o,onContentChange:a}=e,u=(null==n?void 0:n.value)??(null==(t=r.config)?void 0:t.default_value)??!1;return zM.jsxs(f.gN,{children:[zM.jsx(f.fw,{name:"biToggle"}),zM.jsx(f.Qy,{htmlFor:i,children:Jn(r)}),zM.jsxs(f.JO,{children:[zM.jsx(f.xu,{padding:4,alignItems:"center",children:zM.jsx(f.xv,{children:Jr(r,u)})}),zM.jsx(f.rs,{id:i,sx:{alignSelf:"center",marginLeft:"auto",marginRight:12},checked:u,onCheckedChange(e){var t;o||a((t=e,{__TYPE__:"BooleanContent",value:t}))}})]})]})}function Jo(e){let{id:t,field:n,content:r,onContentChange:i}=e;return zM.jsxs(f.gN,{children:[zM.jsx(f.fw,{name:"colorLens"}),zM.jsx(f.Qy,{id:t,children:Jn(n)}),zM.jsx(f.JO,{children:zM.jsx(f.xu,{padding:{left:4},alignItems:"center",children:zM.jsx(f.TC,{onValueChange(e){var t;return i((t=e,void 0===t?void 0:{__TYPE__:"FieldContent",type:"Color",value:t}))},value:null==r?void 0:r.value,"aria-labelledby":t,placeholder:Jr(n)})})})]})}function Ja(e){let{id:t,readOnly:n,field:r,content:i,onContentChange:o}=e,a=null!=i&&i.value?(0,A._O)(i.value):void 0;return zM.jsxs(f.gN,{children:[zM.jsx(f.fw,{name:"dateRange"}),zM.jsx(f.Qy,{id:t,children:Jn(r)}),zM.jsx(f.JO,{children:zM.jsx(f.xu,{padding:{left:4,right:12},width:"100%",flexDirection:"column",justifyContent:"center",children:zM.jsx(f.Wr,{mode:"date","aria-labelledby":t,disabled:n,value:a,onValueChange:e=>o(function(e){if(e)return{__TYPE__:"FieldContent",type:"Date",value:function(e){let t=`${e.getFullYear()}`.padStart(4,"0"),n=`${e.getMonth()+1}`.padStart(2,"0"),r=`${e.getDate()}`.padStart(2,"0");return`${t}-${n}-${r}`}(e)}}(e))})})})]})}let Ju=(0,c.forwardRef)(function(e,t){return zM.jsx(f.oi,{...e,padding:Js,ref:t,sx:{...e.sx,alignSelf:"stretch"}})}),Js={input:{inline:4},adornment:{inline:12}},Jl=({provider:e})=>Jc[e.toLowerCase()]??zM.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[zM.jsx("g",{clipPath:"url(#clip0_6524_22412)",children:zM.jsx("path",{d:"M7.99992 1.33333C4.31992 1.33333 1.33325 4.32 1.33325 8C1.33325 11.68 4.31992 14.6667 7.99992 14.6667C11.6799 14.6667 14.6666 11.68 14.6666 8C14.6666 4.32 11.6799 1.33333 7.99992 1.33333ZM2.66659 8C2.66659 7.59333 2.71992 7.19333 2.80659 6.81333L5.99325 10V10.6667C5.99325 11.4 6.59325 12 7.32658 12V13.2867C4.70658 12.9533 2.66659 10.7133 2.66659 8ZM11.9266 11.6C11.7533 11.06 11.2599 10.6667 10.6599 10.6667H9.99325V8.66667C9.99325 8.3 9.69325 8 9.32658 8H5.32658V6.66667H6.65992C7.02658 6.66667 7.32658 6.36667 7.32658 6V4.66667H8.65992C9.39325 4.66667 9.99325 4.06667 9.99325 3.33333V3.06C11.9466 3.84667 13.3333 5.76667 13.3333 8C13.3333 9.38667 12.7933 10.6533 11.9266 11.6Z",fill:"#6F6E77"})}),zM.jsx("defs",{children:zM.jsx("clipPath",{id:"clip0_6524_22412",children:zM.jsx("rect",{width:"16",height:"16",fill:"white"})})})]}),Jc={codepen:zM.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[zM.jsx("g",{clipPath:"url(#clip0_6523_22409)",children:zM.jsx("path",{d:"M15.9879 5.44292C15.9843 5.42352 15.981 5.40413 15.9759 5.38517C15.9726 5.37375 15.9688 5.36298 15.9651 5.35177C15.9597 5.33497 15.9541 5.31816 15.9474 5.30179C15.9427 5.29037 15.9373 5.27938 15.9321 5.26839C15.9248 5.25288 15.9173 5.23758 15.9086 5.22271C15.9026 5.21172 15.8957 5.20138 15.889 5.19082C15.8798 5.1766 15.8703 5.1626 15.8599 5.14902C15.8524 5.13889 15.8446 5.1292 15.8365 5.1195C15.8257 5.10657 15.8141 5.09429 15.8024 5.08223C15.7934 5.07318 15.7843 5.06413 15.7748 5.05529C15.7623 5.04387 15.7494 5.0331 15.7358 5.02276C15.7255 5.01479 15.7154 5.0066 15.7046 4.99927C15.7007 4.99647 15.6973 4.99324 15.6932 4.99065L8.38116 0.115543C8.15039 -0.0385144 7.84939 -0.0385144 7.61863 0.115543L0.306176 4.99044C0.302082 4.99302 0.29885 4.99626 0.294756 4.99906C0.283983 5.0066 0.273856 5.01457 0.263514 5.02254C0.250155 5.0331 0.237011 5.04387 0.224515 5.05486C0.215034 5.06348 0.205985 5.07253 0.19715 5.0818C0.185084 5.09386 0.17388 5.10614 0.162892 5.11907C0.154704 5.12877 0.146947 5.13846 0.139406 5.14924C0.129064 5.16281 0.119583 5.1766 0.110318 5.19104C0.103639 5.20159 0.0969593 5.21194 0.0907108 5.22293C0.0820922 5.23779 0.0745509 5.25309 0.0674405 5.26817C0.0622694 5.27916 0.0566673 5.29037 0.0521425 5.30157C0.0454631 5.31795 0.0396456 5.33475 0.0342589 5.35156C0.030596 5.36276 0.0267177 5.37375 0.0237011 5.38388C0.0187455 5.40284 0.0150825 5.42201 0.0116351 5.44162C0.00969592 5.45153 0.00732581 5.46123 0.00603302 5.47136C0.00215465 5.50109 0 5.53082 0 5.56121V10.4372C0 10.4673 0.00215465 10.4975 0.00646395 10.527C0.00797221 10.5378 0.0107733 10.5464 0.0129279 10.5568C0.0163753 10.5762 0.0193919 10.5955 0.0258558 10.6149C0.0288723 10.6257 0.0323198 10.6365 0.0366291 10.6483C0.0420157 10.6656 0.0474023 10.6828 0.0538662 10.6985C0.058391 10.7093 0.0646395 10.7201 0.0689488 10.7309C0.0760591 10.7459 0.0840314 10.761 0.09265 10.7768C0.098683 10.7875 0.105578 10.7983 0.112042 10.8082C0.121307 10.8233 0.131434 10.8362 0.142207 10.8491C0.149748 10.8599 0.157289 10.8685 0.165908 10.8789C0.176897 10.8918 0.187455 10.9047 0.200382 10.9162C0.209217 10.9248 0.21762 10.9355 0.228393 10.942C0.24089 10.9528 0.254249 10.9636 0.267177 10.9748C0.277519 10.9834 0.288723 10.9898 0.297342 10.9982C0.301436 11.0004 0.303806 11.0047 0.308115 11.0067L7.61863 15.8841C7.73412 15.9617 7.86641 16.0005 8 15.9998C8.13359 15.9992 8.26588 15.9611 8.38137 15.8841L15.6938 11.0092C15.6979 11.0067 15.7014 11.0036 15.7052 11.0008C15.716 10.9933 15.7261 10.9853 15.7365 10.9773C15.7498 10.9668 15.763 10.9558 15.7755 10.9446C15.785 10.9362 15.794 10.9269 15.8031 10.9179C15.8149 10.9058 15.8263 10.8935 15.8371 10.8806C15.8453 10.8709 15.8531 10.8612 15.8606 10.8509C15.8709 10.8373 15.8804 10.8233 15.8897 10.8091C15.8964 10.7987 15.903 10.7882 15.9093 10.7776C15.9179 10.7625 15.9254 10.7472 15.9328 10.7317C15.9379 10.7207 15.9433 10.7097 15.9481 10.6985C15.9548 10.6819 15.9604 10.6651 15.9657 10.6483C15.9694 10.6371 15.9733 10.6261 15.9765 10.6149C15.9815 10.596 15.9849 10.5766 15.9886 10.5572C15.9903 10.5473 15.9929 10.5376 15.994 10.5275C15.9978 10.4977 16 10.468 16 10.4376V5.5625C16 5.53212 15.9976 5.50238 15.994 5.47265C15.9922 5.46209 15.989 5.45347 15.9869 5.44292H15.9879ZM7.99978 9.62638L5.56826 8.00005L7.99978 6.37351L10.4315 8.00005L7.99978 9.62638ZM7.31245 5.17919L4.33171 7.17288L1.92561 5.56336L7.31245 1.97221V5.17919ZM3.09515 7.99984L1.37531 9.15021V6.84947L3.09515 7.99984ZM4.33171 8.82765L7.31245 10.8211V14.0281L1.92561 10.4365L4.33171 8.82722V8.82765ZM8.68733 10.8207L11.6681 8.82722L14.0744 10.4365L8.68733 14.0277V10.8207ZM12.9046 8.00027L14.6247 6.84969V9.15064L12.9046 7.99984V8.00027ZM11.6681 7.17288L8.68733 5.1794V1.97221L14.0744 5.56336L11.6681 7.17288Z",fill:"black"})}),zM.jsx("defs",{children:zM.jsx("clipPath",{id:"clip0_6523_22409",children:zM.jsx("rect",{width:"16",height:"16",fill:"white"})})})]}),codesandbox:zM.jsxs("svg",{width:"14",height:"16",viewBox:"0 0 14 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[zM.jsx("g",{clipPath:"url(#clip0_6523_22406)",children:zM.jsx("path",{d:"M6.24312 14.1129V8.35021L1.28724 5.49888V8.78388L3.55732 10.0999V12.5702L6.24312 14.1129ZM7.53036 14.1468L10.2658 12.571V10.0422L12.5506 8.71812V5.47426L7.53036 8.3727V14.1468ZM11.8904 4.36906L9.25164 2.83995L6.93472 4.18436L4.60022 2.8386L1.93795 4.38817L6.90626 7.24665L11.8904 4.36906ZM0 12.0115V4.02675L6.91821 0L13.8378 4.00984V11.9988L6.91805 15.985L0 12.0115Z",fill:"black"})}),zM.jsx("defs",{children:zM.jsx("clipPath",{id:"clip0_6523_22406",children:zM.jsx("rect",{width:"13.8378",height:"16",fill:"white"})})})]}),dailymotion:zM.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[zM.jsxs("g",{clipPath:"url(#clip0_6523_22345)",children:[zM.jsx("path",{d:"M16 0H0V16H16V0Z",fill:"white"}),zM.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8.73038 10.3003C8.40789 10.6268 8.00377 10.7901 7.51804 10.7901C7.04025 10.7901 6.64411 10.6308 6.32956 10.3122C6.01503 9.99367 5.85776 9.58351 5.85776 9.08176C5.85776 8.60389 6.01901 8.20766 6.3415 7.89306C6.66401 7.57847 7.06016 7.42118 7.52998 7.42118C7.84849 7.42118 8.13715 7.49484 8.39594 7.64219C8.65474 7.78953 8.8558 7.99063 8.99913 8.2455C9.14246 8.50034 9.21412 8.77908 9.21412 9.08176C9.21412 9.56757 9.05287 9.97376 8.73038 10.3003ZM9.10662 3.58632V6.35792C8.82791 6.07918 8.53131 5.87808 8.21678 5.75463C7.90223 5.63118 7.54988 5.56946 7.1597 5.56946C6.53062 5.56946 5.96527 5.72476 5.4636 6.03538C4.96193 6.34597 4.57176 6.77007 4.29305 7.30768C4.01435 7.84528 3.875 8.44062 3.875 9.09369C3.875 9.76269 4.01236 10.366 4.28708 10.9036C4.5618 11.4412 4.95197 11.8653 5.45763 12.1759C5.96328 12.4865 6.54258 12.6418 7.19553 12.6418C8.14312 12.6418 8.80403 12.3312 9.17831 11.71H9.20218V12.5595H11.0894V3.15625L9.10662 3.58632Z",fill:"#232323"})]}),zM.jsx("defs",{children:zM.jsx("clipPath",{id:"clip0_6523_22345",children:zM.jsx("rect",{width:"16",height:"16",fill:"white"})})})]}),flickr:zM.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[zM.jsx("rect",{width:"16",height:"16",fill:"white"}),zM.jsxs("g",{clipPath:"url(#clip0_6523_22379)",children:[zM.jsx("path",{d:"M8.43286 7.78387C8.43286 9.321 9.67925 10.5674 11.2166 10.5674C12.7538 10.5674 13.9999 9.321 13.9999 7.78387C13.9999 6.24675 12.7538 5.00061 11.2166 5.00061C9.67925 5.00061 8.43286 6.24675 8.43286 7.78387Z",fill:"#FF0084"}),zM.jsx("path",{d:"M2 7.78408C2 9.32121 3.24614 10.5676 4.78352 10.5676C6.32089 10.5676 7.56703 9.32121 7.56703 7.78408C7.56703 6.24695 6.32089 5.00081 4.78352 5.00081C3.24614 5.00081 2 6.24695 2 7.78408Z",fill:"#0063DC"})]}),zM.jsx("defs",{children:zM.jsx("clipPath",{id:"clip0_6523_22379",children:zM.jsx("rect",{width:"12",height:"5.568",fill:"white",transform:"translate(2 5)"})})})]}),giphy:zM.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[zM.jsx("rect",{width:"16",height:"16",fill:"#121212"}),zM.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4 3.38889V12.2778H5.11111V3.38889H4Z",fill:"#00FF99"}),zM.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.6663 5.61111V12.2778H11.7774V5.61111H10.6663Z",fill:"#9933FF"}),zM.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7.75 3H4V4.11111H8.83333V3H7.75Z",fill:"#FFF35C"}),zM.jsx("path",{d:"M9.00041 4.11111H7.33374H8.83374V3.77778L9.00041 4.11111Z",fill:"#999999"}),zM.jsx("path",{d:"M8.83374 4.11111H7.33374L8.44485 3L8.83374 3.77778V4.11111Z",fill:"#999237"}),zM.jsx("path",{d:"M10.6663 7.44444V5.77778L11.7774 6.33333L10.6663 7.44444Z",fill:"#5C1F99"}),zM.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.6667 11.8889H4V13H11.7778V11.8889H10.6667Z",fill:"#00CCFF"}),zM.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.6668 5.22222V4.11111H9.55569V3H8.44458V3.90739V5.0185V6.33333H9.55569H10.6668H11.7779V5.22222H10.6668Z",fill:"#FF6666"})]}),instagram:zM.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",children:[zM.jsxs("g",{clipPath:"url(#clip0_6523_22356)",children:[zM.jsx("mask",{id:"mask0_6523_22356",style:{maskType:"luminance"},maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"16",height:"16",children:zM.jsx("path",{d:"M4.70325 0.0949238C3.85627 0.1349 3.27778 0.270564 2.77227 0.468642C2.24897 0.672648 1.80537 0.946046 1.36408 1.38914C0.922279 1.83249 0.650958 2.27688 0.448504 2.8007C0.252489 3.3075 0.119662 3.88627 0.0822604 4.73377C0.045126 5.58283 0.0366102 5.85363 0.0407495 8.01522C0.0448729 10.1765 0.0544124 10.4479 0.0949012 11.2972C0.135388 12.1439 0.270546 12.7222 0.468623 13.2279C0.672886 13.7512 0.946004 14.1946 1.38935 14.6361C1.83245 15.0777 2.27708 15.3487 2.80115 15.5515C3.30744 15.7472 3.88644 15.8806 4.73369 15.9177C5.58273 15.9551 5.85379 15.9634 8.01483 15.9592C10.1769 15.9551 10.448 15.9456 11.297 15.9053C12.144 15.8648 12.722 15.7292 13.228 15.5316C13.7513 15.3268 14.1949 15.0542 14.6362 14.6109C15.0775 14.1678 15.3488 13.7231 15.5512 13.199C15.7473 12.6927 15.8806 12.1137 15.9175 11.267C15.9546 10.4174 15.9634 10.1461 15.9593 7.98478C15.9551 5.8232 15.9453 5.55239 15.9051 4.7036C15.8649 3.85609 15.7292 3.27811 15.5314 2.77208C15.3269 2.24877 15.054 1.80567 14.6109 1.36387C14.1678 0.922574 13.7232 0.650729 13.1991 0.448785C12.6926 0.252768 12.1138 0.119166 11.2666 0.0825425C10.4175 0.0448876 10.1465 0.0366393 7.98465 0.0407642C5.82336 0.0448892 5.5523 0.0541772 4.70325 0.0949238ZM4.79611 14.485C4.02004 14.4512 3.59863 14.3222 3.31776 14.2142C2.94585 14.0703 2.68046 13.8977 2.40114 13.6205C2.12234 13.3422 1.94928 13.0776 1.80408 12.7064C1.69497 12.4255 1.5637 12.0046 1.52734 11.2286C1.48788 10.3896 1.47886 10.1378 1.47498 8.01237C1.47086 5.88742 1.47859 5.63569 1.51522 4.79593C1.54848 4.02038 1.67822 3.59843 1.78602 3.31782C1.92993 2.94539 2.10196 2.68051 2.37973 2.4012C2.65801 2.12187 2.92263 1.94933 3.29402 1.80412C3.57463 1.69451 3.99555 1.56426 4.77134 1.52738C5.61084 1.48766 5.8623 1.47915 7.98723 1.47502C10.1127 1.47089 10.3644 1.47838 11.2042 1.51526C11.9797 1.54904 12.4016 1.67749 12.682 1.78607C13.0541 1.92998 13.3195 2.1015 13.5986 2.37979C13.8777 2.65808 14.0507 2.92218 14.1959 3.29435C14.3055 3.57418 14.4358 3.99562 14.4724 4.77117C14.5124 5.61068 14.5214 5.8624 14.5253 7.98736C14.5294 10.1128 14.5217 10.3646 14.4848 11.2038C14.451 11.9799 14.3223 12.4016 14.214 12.6827C14.0701 13.0543 13.898 13.3197 13.62 13.5991C13.342 13.8773 13.0774 14.0509 12.7057 14.1961C12.4256 14.3055 12.0042 14.436 11.2289 14.4729C10.3894 14.5123 10.1379 14.5214 8.01225 14.5252C5.88732 14.5294 5.63586 14.5214 4.79611 14.485ZM11.2854 3.74493C11.2864 4.27211 11.7151 4.69896 12.2422 4.69792C12.7697 4.69689 13.1965 4.2685 13.1957 3.74132C13.1947 3.21414 12.7661 2.78704 12.2386 2.78807C11.7112 2.7891 11.2844 3.21775 11.2854 3.74493ZM3.91277 8.00773C3.91714 10.2653 5.75063 12.0913 8.0076 12.0869C10.2648 12.0825 12.0919 10.2495 12.0875 7.99201C12.0831 5.73526 10.2494 3.90819 7.99188 3.91257C5.73489 3.91696 3.90837 5.75073 3.91277 8.00773ZM5.34648 8.0049C5.3439 6.53969 6.52978 5.34942 7.99471 5.34683C9.45991 5.344 10.6504 6.52937 10.6533 7.99484C10.6561 9.46031 9.47022 10.6503 8.00477 10.6532C6.53984 10.656 5.34932 9.47037 5.34648 8.0049Z",fill:"white"})}),zM.jsxs("g",{mask:"url(#mask0_6523_22356)",children:[zM.jsx("mask",{id:"mask1_6523_22356",style:{maskType:"luminance"},maskUnits:"userSpaceOnUse",x:"-1",y:"-1",width:"18",height:"18",children:zM.jsx("path",{d:"M16.5905 -0.583628H-0.603516V16.6106H16.5905V-0.583628Z",fill:"white"})}),zM.jsxs("g",{mask:"url(#mask1_6523_22356)",children:[zM.jsx("mask",{id:"mask2_6523_22356",style:{maskType:"luminance"},maskUnits:"userSpaceOnUse",x:"-1",y:"-1",width:"18",height:"18",children:zM.jsx("path",{d:"M16.6701 -0.663237H-0.683105V16.6902H16.6701V-0.663237Z",fill:"white"})}),zM.jsxs("g",{mask:"url(#mask2_6523_22356)",children:[zM.jsx("mask",{id:"mask3_6523_22356",style:{maskType:"luminance"},maskUnits:"userSpaceOnUse",x:"-1",y:"-1",width:"18",height:"18",children:zM.jsx("path",{d:"M16.6701 -0.663237H-0.683105V16.6902H16.6701V-0.663237Z",fill:"white"})}),zM.jsx("g",{mask:"url(#mask3_6523_22356)",children:zM.jsx("rect",{x:"-0.688721",y:"-0.665792",width:"17.3622",height:"17.3622",fill:"url(#pattern0)"})})]})]})]})]}),zM.jsxs("defs",{children:[zM.jsx("pattern",{id:"pattern0",patternContentUnits:"objectBoundingBox",width:"1",height:"1",children:zM.jsx("use",{xlinkHref:"#image0_6523_22356",transform:"scale(0.000439947)"})}),zM.jsx("clipPath",{id:"clip0_6523_22356",children:zM.jsx("rect",{width:"16",height:"16",fill:"white"})}),zM.jsx("image",{id:"image0_6523_22356",width:"2273",height:"2275",xlinkHref:"data:image/jpeg;base64,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Hbvsfww7d9j+GHbvsfww7d9j+GHbvsfww7d9j+GHbvsfww7d9j+GHbvsfww7d9j+GHbvsfww7d9j+GHbvsfww7d9j+GHbvsfww7d9j+GHbvsfww7d9j+GHbvsfww7d9j+GHbvsfww7d9j+GHbvsfww7d9j+GHbvsfww7d9j+GHbvsfww7d9j+GHbvsfww7d9j+GHbvsfww7d9j+GHbvsfww7d9j+GHbvsfww7d9j+GHbvsfww7d9j+GHbvsfww7d9j+GHbvsfww7d9j+GHbvsfww7d9j+GHbvsfww7d9j+GHbvsfww7d9j+GHbvsfww7d9j+GHbvsfww7d9j+GHbvsfw5h277H8MO3fY/hh277H8MO3fY/hh277H8MO3fY/hh277H8MO3fY/hh277H8MO3fY/hh277H8MO3fY/hh277H8MO3fY/hh277H8MO3fY/hh277H8MO3fY/hh277H8MO3fY/hh277H8MO3fY/hh277H8MO3fY/hh277H8MO3fY/hh277H8MO3fY/hh277H8MO3fY/hh277H8MO3fY/hh277H8MO3fY/hh277H8MO3fY/hh277H8MO3fY/hh277H8MO3fY/hh277H8MO3fY/hh277H8MO3fY/hh277H8MO3XY/hh26jfww7dRv4Yduo38MO3Ub+GHbqN/DDt1G/hh26jfww7dRv4Yduo38MO3Ub+GHbqN/DDt1G/hh26jfww7dRv4Yduo38MO3Ub+GHbqN/DDt1G/hh26jfww7dRv4Yduo38MO3Ub+GHbqN/DDt1G/hh26jfww7dRv4Yduo38MO3Ub+GHbqN/DDt1G/hh26j+GHbqP4Yduo38MO3Ub+GHbqP4Yduo/hh26j+GHbmP4YduY/hh25j+GHbmP4YduY/hh25j+GHbmP4YduY/hh25j+GHbmP4YduY/hh25j+GHbmP4YduY/hh25j+GHbmP4YduY/hh25j+GHbmNh25jYduY2HbmNh25jYduY2HbmNh24jYduI2HbiNh24jYduI2HbiNh24jYduI2HbiNh24jYduI2HbiNh24jYduI2HbiNh24jYduI2HbiNh24jYduI2HbiNh0+Nh0+Jh0+Jh0+Jh0+Jh0+Jh0+Jh0+Jh0+Jh0+Jh0+Jh0+Jh0+Jh0+Jh0+Jh0+Jh0+Jh0+Jh0+Jh0+Jh06Jh06Jh06Jh06Jh06Jh06Jh06Jh06Jh06Jh06Jh06Jh06Jh06Jh06Jh06Jh06Jh06Jh06Jh06Jh06Jh06Jh06Jh02Jh02Jh02Jh02Jh02Jh02Jh02Jh02Jh02Jh02Jh02Jh02Jh02Jh02Jh02Jh02Jh02Jh02Jh02Jh02Jh02Jh02Jh02Jh02Jh02Jh02Jh02Jh02Jh02Jh02Jh02Jh02Jh02Jh02Jh02Jh02Jh02Jh02Jh02Jhz+j7fweHn/AFd+fp9v6v8Ape79DDf1JLc930/LnmGfj9H0+v7/APAf6c32/wAQ/wCR+n/5f9383/iNaca041pxrTjWnGtONaca041pxrTjWnGtONaca041pxrTjWnGtONaca041pxrTjWnGtONaca041pxrTjWnGtONaca041pxrTjWnGtONaca041pxrTjWnGtONaca041pxrTjWnGtONaca0415xrzjXnGvONeca8415xrzjXnGvONeca8415xrzjXnGvONeca8415xrzjXnGvONeYa8w15hrzDXmGvMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMNeYa8w15hrzDXnGvONeca8415xrzjXnGvONeca041pxrTjWnGtONaca041pxrTjWnGtONacas41ZxqzjVnGrONWcas41ZxqzjVnGrONScak41JxqTjUUGooNRQaig1FBqKDTUGmoNNQaag01BpqDTUGmoNNQaag0lBpKDSUGkoNJQaSg0lBpKDSUGioNFQaKg0VBoqDRVGiqNFUaKo0FRoKjQVGgqNBUaCo0FRoKjQVGgqPXqj16o9eqPXqj16o9eqPXqj16o9eqPXqj1yo9cqPXKj1yo9cqPXLD1yw9csPXLD1yw9csPWrD1qw9asPWrD1qw9asPWrD1qw9asPWrD1qw9YsPWLD1iw9YsPWLD1iw9YsPWLD1iw9YsPWLD1iw9YsPWLD1iw9YsPWLD1iw9YsPWLD1iw9YsPWLD1aw9WsPVrD1aw9WsPVrD1aw9WsPVrD1aw9WsPVrB34/8Ay/z/AH/53yHY/wDU/E/0v+P7/wCz/9k="})]})]}),pinterest:zM.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[zM.jsxs("g",{clipPath:"url(#clip0_6570_25513)",children:[zM.jsx("rect",{width:"15.996",height:"16",rx:"2",fill:"#CC2127"}),zM.jsx("path",{d:"M7.999 2C4.68555 2 2 4.68555 2 7.999C2 10.5406 3.58174 12.7102 5.81336 13.5861C5.76137 13.1121 5.71338 12.3843 5.83336 11.8644C5.94134 11.3964 6.53724 8.88285 6.53724 8.88285C6.53724 8.88285 6.35727 8.52291 6.35727 7.993C6.35727 7.15914 6.84119 6.53524 7.44309 6.53524C7.95501 6.53524 8.20297 6.91918 8.20297 7.3811C8.20297 7.89502 7.87502 8.66489 7.70705 9.37877C7.56507 9.97667 8.007 10.4626 8.5949 10.4626C9.66072 10.4626 10.4806 9.33878 10.4806 7.71505C10.4806 6.27929 9.44876 5.27345 7.975 5.27345C6.26729 5.27345 5.26546 6.55324 5.26546 7.87702C5.26546 8.39293 5.46342 8.94484 5.71138 9.24679C5.75937 9.30678 5.76737 9.35877 5.75337 9.41876C5.70738 9.60873 5.6074 10.0167 5.5874 10.0987C5.56141 10.2086 5.50142 10.2326 5.38743 10.1786C4.63756 9.83069 4.16964 8.73488 4.16964 7.85502C4.16964 5.96334 5.54541 4.22563 8.13298 4.22563C10.2146 4.22563 11.8304 5.70938 11.8304 7.69105C11.8304 9.75871 10.5266 11.4224 8.71688 11.4224C8.10898 11.4224 7.53708 11.1065 7.34111 10.7345C7.34111 10.7345 7.04116 11.8804 6.96717 12.1603C6.83119 12.6822 6.46526 13.3341 6.2213 13.732C6.7832 13.906 7.3791 14 7.997 14C11.3104 14 13.996 11.3144 13.996 8.001C13.998 4.68555 11.3124 2 7.999 2Z",fill:"white"})]}),zM.jsx("defs",{children:zM.jsx("clipPath",{id:"clip0_6570_25513",children:zM.jsx("rect",{width:"16",height:"16",fill:"white"})})})]}),spotify:zM.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[zM.jsx("g",{clipPath:"url(#clip0_6523_22402)",children:zM.jsx("path",{d:"M12.6609 7.10585C10.121 5.59751 5.93158 5.45882 3.50697 6.1947C3.11759 6.31287 2.70584 6.09298 2.5879 5.70373C2.46988 5.31411 2.68945 4.90265 3.07911 4.78429C5.86241 3.93945 10.4892 4.1026 13.4132 5.83828C13.7634 6.04622 13.8782 6.49851 13.6707 6.84813C13.4629 7.19833 13.0103 7.31376 12.6609 7.10585ZM12.5777 9.33993C12.3995 9.62908 12.0215 9.71979 11.7327 9.54223C9.61522 8.24063 6.38637 7.86357 3.88123 8.624C3.55636 8.72218 3.21323 8.53899 3.11455 8.21475C3.01666 7.88989 3.19992 7.54738 3.5242 7.44859C6.38597 6.58018 9.9436 7.00081 12.3756 8.49536C12.6644 8.67322 12.7553 9.05146 12.5777 9.33993ZM11.6136 11.4855C11.472 11.7177 11.1697 11.7904 10.9383 11.6489C9.08801 10.518 6.75909 10.2627 4.01637 10.8891C3.75207 10.9497 3.48866 10.7841 3.42838 10.5198C3.36785 10.2556 3.53284 9.99217 3.79772 9.93186C6.79916 9.2457 9.37381 9.54101 11.4506 10.8101C11.6822 10.9515 11.7551 11.254 11.6136 11.4855ZM8.00002 0.120623C3.64839 0.120623 0.120605 3.64834 0.120605 7.99989C0.120605 12.352 3.64839 15.8794 8.00002 15.8794C12.3517 15.8794 15.8794 12.352 15.8794 7.99989C15.8794 3.64834 12.3517 0.120623 8.00002 0.120623Z",fill:"#1ED760"})}),zM.jsx("defs",{children:zM.jsx("clipPath",{id:"clip0_6523_22402",children:zM.jsx("rect",{width:"16",height:"16",fill:"white"})})})]}),twitter:zM.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:zM.jsx("path",{d:"M14.3193 4.31285C14.329 4.45301 14.329 4.59317 14.329 4.73462C14.329 9.04475 11.0516 14.0156 5.05865 14.0156V14.0131C3.28832 14.0156 1.55478 13.508 0.0644531 12.5507C0.321873 12.5817 0.580582 12.5972 0.839937 12.5979C2.30703 12.5992 3.7322 12.1063 4.88639 11.1988C3.4922 11.1724 2.26961 10.2623 1.84252 8.93366C2.3309 9.02796 2.83413 9.00858 3.31349 8.87746C1.79349 8.57001 0.699937 7.23299 0.699937 5.68023C0.699937 5.66602 0.699937 5.65246 0.699937 5.63889C1.15284 5.89144 1.65994 6.0316 2.17865 6.0471C0.747034 5.08923 0.305743 3.18251 1.17026 1.69176C2.82445 3.7296 5.2651 4.96844 7.8851 5.09956C7.62252 3.96664 7.98123 2.77947 8.82768 1.98307C10.1399 0.748096 12.2038 0.811395 13.4374 2.12452C14.167 1.98048 14.8664 1.71243 15.5064 1.33264C15.2632 2.0877 14.7541 2.72909 14.0741 3.13665C14.7199 3.06044 15.3509 2.88734 15.9451 2.62316C15.5077 3.2794 14.9567 3.85103 14.3193 4.31285Z",fill:"#1D9BF0"})}),vimeo:zM.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[zM.jsxs("g",{clipPath:"url(#clip0_6523_22340)",children:[zM.jsx("path",{d:"M16 14.4C16 15.28 15.28 16 14.4 16H1.6C0.72 16 0 15.28 0 14.4V1.6C0 0.72 0.72 0 1.6 0H14.4C15.28 0 16 0.72 16 1.6V14.4Z",fill:"#1AB7EA"}),zM.jsx("path",{d:"M13.9945 5.3084C13.9391 6.42815 13.1229 7.97447 11.5458 9.93402C9.91331 11.9736 8.52987 13 7.40928 13C6.70372 13 6.12267 12.3735 5.63846 11.1338C5.32027 9.98735 4.98824 8.85427 4.67005 7.70786C4.31036 6.46814 3.92299 5.84161 3.50796 5.84161C3.42495 5.84161 3.10676 6.02824 2.56721 6.38816L2 5.68165C2.59488 5.1751 3.17593 4.68187 3.75698 4.17532C4.54554 3.52214 5.14042 3.17555 5.54162 3.13556C6.46853 3.05557 7.04958 3.66877 7.27093 4.97514C7.50612 6.40149 7.67213 7.28129 7.75514 7.62788C8.01799 8.80095 8.32235 9.40081 8.64054 9.40081C8.88956 9.40081 9.26309 9.01423 9.77497 8.2544C10.273 7.49457 10.5497 6.90804 10.5774 6.50813C10.6465 5.85494 10.3837 5.52169 9.77497 5.52169C9.48444 5.52169 9.19392 5.58834 8.88956 5.70831C9.48444 3.84206 10.605 2.94893 12.2652 3.00225C13.4826 3.02891 14.0637 3.80207 13.9945 5.3084Z",fill:"white"})]}),zM.jsx("defs",{children:zM.jsx("clipPath",{id:"clip0_6523_22340",children:zM.jsx("rect",{width:"16",height:"16",fill:"white"})})})]}),youtube:zM.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[zM.jsx("path",{d:"M15.6656 3.75817C15.4816 3.06609 14.9395 2.5211 14.2511 2.33614C13.0034 2 8 2 8 2C8 2 2.99666 2 1.7489 2.33614C1.06051 2.5211 0.518324 3.06609 0.334339 3.75817C0 5.01251 0 7.62963 0 7.62963C0 7.62963 0 10.2467 0.334339 11.5012C0.518324 12.1932 1.06051 12.7381 1.7489 12.9232C2.99666 13.2593 8 13.2593 8 13.2593C8 13.2593 13.0034 13.2593 14.2511 12.9232C14.9395 12.7381 15.4816 12.1932 15.6656 11.5012C16 10.2467 16 7.62963 16 7.62963C16 7.62963 16 5.01251 15.6656 3.75817Z",fill:"#ED1D24"}),zM.jsx("path",{d:"M6.36353 10.0058L10.5453 7.62974L6.36353 5.25349V10.0058Z",fill:"white"})]})};function Jd(e){let{debouncedUrl:t,content:n,onContentChange:r,selected:i}=e,o=(0,c.useRef)(null),[a,u]=(0,c.useState)(!1);return(0,p.pQ)(t,()=>{var e;a&&(u(!1),null==(e=o.current)||e.reset())}),(0,l.ju)(t)?t===(null==n?void 0:n.embed_url)?zM.jsx(Jp,{content:n,selected:i}):zM.jsx(f.SV,{ref:o,renderError:Jf,onError:function(){u(!0),r(void 0)},children:zM.jsx(c.Suspense,{fallback:n&&zM.jsx(Jp,{content:n,selected:i}),children:zM.jsx(JA,{url:t,selected:i,onContentChange:r})})}):null}function Jf(){return zM.jsxs(f.xu,{backgroundColor:"grey2",borderRadius:6,padding:16,gap:4,children:[zM.jsx(f.I5,{name:"alert",size:"small",color:"grey11"}),zM.jsx(f.xv,{variant:"smallBold",color:"grey11",children:"There is no embed data available."})]})}function Jp(e){let{content:t,selected:n}=e,{thumbnail:r,provider:i,author:o,url:a,subtitle:u}=function(e){let t="";switch(e.type){case"video":t=e.title??"";break;case"photo":t=`View this post${e.provider_name?` on ${e.provider_name}`:""}`;break;default:t=`Open${e.provider_name?` on ${e.provider_name}`:""}`}return{url:e.embed_url,thumbnail:{url:e.thumbnail_url??"",aspectRatio:"video"===e.type?"16:9":"1:1"},provider:e.provider_name??"",author:e.author_name??"",subtitle:t}}(t);return zM.jsxs(f.oU,{selected:n,children:[zM.jsx(f.Sy,{src:r.url,aspectRatio:r.aspectRatio}),zM.jsxs(f.Tw,{children:[zM.jsxs(f.xu,{display:"flex",alignItems:"center",gap:4,children:[zM.jsx(Jl,{provider:i}),zM.jsx(f.xv,{variant:"smallBold",color:"grey12",noWrap:!0,children:i}),o&&zM.jsx(f.xv,{variant:"small",color:"grey11",noWrap:!0,children:o})]}),zM.jsx(f.xv,{variant:"smallBold",href:a,children:u})]})]})}function JA(e){let{url:t,onContentChange:n,selected:r}=e,i=function(e){let{url:t,onContentChange:n}=e,{embedApiEndpoint:r}=zB(),i=(0,m.QT)(Jh,[t,r]),o=(0,p.R9)(n);return(0,c.useEffect)(()=>{let e=(0,f.rI)(()=>o(i));return()=>{clearTimeout(e)}},[i,o]),i}({url:t,onContentChange:n});return zM.jsx(Jp,{content:i,selected:r})}function Jh(e,t){var n;let r=new URL(t);return r.searchParams.set("url",e),(0,y.WY)(r,{okType:(n=e,HI.object({type:HI.string(),version:HI.string().or(HI.number()).nullish(),title:HI.string().nullish(),author_name:HI.string().nullish(),author_url:HI.string().nullish(),provider_name:HI.string().nullish(),provider_url:HI.string().nullish(),cache_age:HI.string().or(HI.number()).nullish(),thumbnail_url:HI.string().nullish(),thumbnail_width:HI.number().nullish(),thumbnail_height:HI.number().nullish(),html:HI.string().nullish()}).passthrough().transform(e=>{let t={embed_url:n};return{...t,__TYPE__:"EmbedContent",type:e.type,version:e.version,title:e.title,author_name:e.author_name,author_url:e.author_url,provider_name:e.provider_name,provider_url:e.provider_url,cache_age:e.cache_age,thumbnail_url:e.thumbnail_url,thumbnail_width:e.thumbnail_width,thumbnail_height:e.thumbnail_height,html:e.html,all:{...t,...e}}}))})}function Jm(e){let{id:t,readOnly:n,field:r,content:i,onContentChange:o}=e,a=(0,p.$P)({initialState:(null==i?void 0:i.embed_url)??"",startTransition:c.startTransition});function u(e){a.set(e),(0,l.ju)(e)||o(void 0)}return zM.jsxs(f.gN,{footer:(0,l.ju)(a.value)&&zM.jsx(f.mS,{children:zM.jsx(Jd,{debouncedUrl:a.debouncedValue,content:i,onContentChange:o})}),children:[zM.jsx(f.fw,{name:"cloud"}),zM.jsx(f.Qy,{htmlFor:t,children:Jn(r)}),zM.jsx(f.JO,{children:zM.jsx(Ju,{id:t,readOnly:n,placeholder:Jr(r),value:a.value,onValueChange:u,variant:(0,l.ju)(a.value)?"link":"normal",endAdornment:zM.jsx(f.zx,{startIcon:"close",color:"grey",size:"small",disabled:!a,onClick:()=>u("")})})})]})}function Jg(e){return!(e.lat>85||e.lat<-85||e.lng>180||e.lng<-180)}function Jy(e){let t=e.match(/^.*@(-?\d+.\d+),(-?\d+.\d+).*$/);if(!t)return;let n=parseFloat(t[1]??""),r=parseFloat(t[2]??"");if(isNaN(n)||isNaN(r))return;let i={lat:n,lng:r};if(Jg(i))return i}function Jv(e){return e?`${e.lat}, ${e.lng}`:""}function Jx(e){let t=e.match(/\(?([\d|.|-]*)[\s+]*,[\s]*([\d|.|-]*)\)?/);if(!t)return Jy(e);let n=parseFloat(t[1]??""),r=parseFloat(t[2]??"");if(isNaN(n)||isNaN(r))return Jy(e);let i={lat:n,lng:r};return Jg(i)?i:Jy(e)}function Jb(e){let{field:t,id:n,readOnly:r,...i}=e,{onValueChange:o,displayedValue:a,onBlur:u,clearValue:s,isValidCoordinates:l}=function(e){let{content:t,onContentChange:n}=e,r=Jv(null==t?void 0:t.position),[i,o]=(0,c.useState)(r),a=!!Jx(i);return{displayedValue:i,isValidCoordinates:a,onValueChange:o,onBlur:function(){let e=Jx(i);if(!e)return o(""),n(void 0);let{lat:t,lng:r}=e;o(Jv({lat:t,lng:r})),n({__TYPE__:"GeoPointContent",position:{lat:t,lng:r}})},clearValue:function(){o(""),n(void 0)}}}(i);return zM.jsxs(f.gN,{children:[zM.jsx(f.fw,{name:"place"}),zM.jsx(f.Qy,{htmlFor:n,children:Jn(t)}),zM.jsx(f.JO,{children:zM.jsx(Ju,{id:n,onValueChange:o,placeholder:"...",readOnly:r,value:a,onBlur:u,variant:l?"link":"normal",endAdornment:zM.jsx(f.zx,{startIcon:"close",color:"grey",size:"small",disabled:!a,onClick:s})})})]})}let JC=Hn({id:Y$(),width:YX(),height:YX(),urls:Hn({full:Y$(),small:Y$().transform(function(e){let t=new URL(e);return t.searchParams.delete("q"),t.searchParams.delete("fm"),t.searchParams.set("w","300"),t.searchParams.set("auto","compress,format"),t.toString()})}),alt_description:Y$().optional(),description:Y$().nullable()}),JS=Hn({results:Ht(JC)}).transform(e=>e.results);function Jw(e,t){let n=new URL("search/photos",e);return n.searchParams.set("page","1"),n.searchParams.set("per_page","28"),n.searchParams.set("query",t),(0,y.WY)(n,{okType:JS})}function JI(e){let{onSelectedChange:t}=e,[n,r]=(0,c.useTransition)(),i=(0,p.$P)({initialState:"",ms:300,startTransition:r});return zM.jsxs(f.xu,{flexDirection:"column",gap:16,width:"100%",position:"relative",children:[zM.jsx(f.CR,{value:i.value,placeholder:"Search on Unsplash.com",onValueChange:i.set}),zM.jsx(f.SV,{renderError:()=>zM.jsx(Zf,{}),children:zM.jsx(c.Suspense,{fallback:zM.jsx(JO,{}),children:zM.jsx(J_,{term:i.debouncedValue,loading:n,onSelectedChange:t})})})]})}function J_(e){let{term:t,onSelectedChange:n,loading:r}=e,{media:i,toggleSelected:o,selectedImageId:a}=function(e){var t;let{term:n,onSelectedChange:r}=e,{unsplashApiBaseUrl:i}=zB(),o=function(e,t){let n=(0,c.useRef)(),r=zB(),i=(0,m.QT)(Jw,[e,t]);return(0,p.Nr)(t,1e3,()=>{var e;n.current&&t!==n.current&&(null==(e=r.onAnalyticsEvent)||e.call(r,"Unsplash Image Searched")),n.current=t}),i}(i,n||"citrus fruit"),a=null==(t=null==o?void 0:o[0])?void 0:t.id,[u,s]=(0,c.useState)();return(0,c.useEffect)(()=>{null==r||r([]),s(void 0)},[a,r]),{media:o,toggleSelected:function(e){if(e.id===u)return s(void 0),null==r?void 0:r([]);s(e.id),null==r||r([{...e,url:e.urls.full,alt:e.alt_description}])},selectedImageId:u}}({term:t,onSelectedChange:n});return zM.jsxs(zM.Fragment,{children:[zM.jsx(JT,{children:null==i?void 0:i.map(e=>{let t=new URL(e.urls.full).searchParams.get("fm")??"jpg";return zM.jsx(f.PB,{url:e.urls.small,filename:e.description??"Unsplash Image",selected:a===e.id,onCardClick:()=>o(e),onCheckedChange:()=>o(e),extension:t,width:e.width,height:e.height,loading:r},e.id)})}),0===i.length&&zM.jsx(zU,{})]})}function JT(e){let{children:t}=e;return zM.jsx(f.xr,{style:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(min(100%, 250px), 1fr))",gap:16,paddingBottom:16,position:"relative",width:"100%"},children:t})}function JO(){return zM.jsx(JT,{children:(0,g.w6)(1,24).map(e=>zM.jsx(ZS,{},e))})}function JR(e){let{open:t,onOpenChange:n,onMediaSelected:r,assetType:i}=e,o=zB(),a=o.mediaLibrary,[u,s]=(0,c.useState)(()=>a?"media":"unsplash"),[l,d]=(0,c.useState)(new Set),[A,h]=(0,c.useState)([]),g=l.size+A.length,y=(0,m.q_)(H$);function v(e){e||d(new Set),n(e)}(0,c.useEffect)(()=>{t&&a&&H3({config:o,assetType:i})},[t,o,i,a]);let x=function(e){let{assetType:t,mediaDialogOpen:n}=e,r=zB(),i=(0,m.q_)(H$),o=(0,c.useRef)(0);return(0,c.useEffect)(()=>{n&&(o.current=performance.now())},[n]),function(e){if(!r.onAnalyticsEvent||!r.mediaLibrary)return;let n=i[i.length-1];if(!n)return;let{keyword:a,tags:u}=n,s=H2(i,t,a,u),l=r.useOpenSearch&&a?"1":"0",c=String(a.split(" ").length),d=String(n.total),f=s.findIndex(t=>t.id===e),p=String(f+1),A=[e].join(","),h=(performance.now()-o.current).toFixed(0);r.onAnalyticsEvent("Media Added To Page",{useOpenSearch:l,assetType:t,searchQuery:a,numberOfWords:c,numberOfResults:d,searchPosition:p,mediaIds:A,timeToAddMediaToPage:h,tags:u})}}({assetType:i,mediaDialogOpen:t}),{containerRef:b}=(0,f.VY)();return zM.jsxs(f.Vq,{open:t,onOpenChange:v,size:{width:"min(calc(100% - 48px), 2000px)",height:"calc(100% - 30px)"},position:"center",onPointerDownOutside(e){b&&(0,p.DX)(b,e.target)&&e.preventDefault()},children:[zM.jsx(f.fK,{icon:"image",title:"Media library"}),zM.jsxs(f.Zp,{value:u,onValueChange:function(e){if("media"!==e&&"unsplash"!==e)throw Error(`Invalid option ${e}.`);s(e)},padding:"small",width:"auto",children:[a&&zM.jsx(f.T9,{value:"media",icon:"photo"}),zM.jsx(f.T9,{value:"unsplash",icon:"unsplash"})]}),zM.jsx(f.cZ,{children:zM.jsxs(f.xu,{flexDirection:"column",flexGrow:1,overflow:"hidden",children:[zM.jsx(zj,{}),zM.jsxs(f.xu,{overflow:"hidden",backgroundColor:"grey3",padding:{top:16,inline:16},flexGrow:1,children:["media"===u&&zM.jsx(Z8,{assetType:i,onSelectedChange:d}),"unsplash"===u&&zM.jsx(JI,{onSelectedChange:h})]})]})}),zM.jsx(f.kX,{asFooter:!0,ok:{text:"Add to page",onClick:function(){var e;if("unsplash"===u){let t=A[0];if(!t)return;r(t),null==(e=o.onAnalyticsEvent)||e.call(o,"Unsplash Image Added")}else if("media"===u){let n=y.flatMap(e=>e.items).filter(e=>l.has(e.id))[0];if(!n)return;r(n),x(n.id)}v(!1)},disabled:1!==g,disabledTooltip:0===g?"Select a media item to add to the page":g>1?"Only one media item can be added to the page":void 0},cancel:{text:"Cancel"}})]})}function Jk(e){let{onMediaSelected:t,readOnly:n,isUpdating:r}=e,[i,o]=(0,c.useState)(!1);return zM.jsxs(f.aY,{children:[zM.jsx(f.Zb,{color:"grey3",variant:"outlined",radius:4,children:zM.jsx(f.aY,{children:zM.jsx(f.xu,{padding:{block:48},flexDirection:"column",children:zM.jsxs(f.R$,{children:[zM.jsx(f.av,{name:"cloudUpload"}),zM.jsx(f._T,{children:r?"Preparing your image...":"You haven't selected an image"}),!n&&zM.jsx(f.Qj,{children:zM.jsx(f.zx,{disabled:r,onClick:()=>o(!0),children:"Select image"})})]})})})}),zM.jsx(JR,{open:i,onOpenChange:o,onMediaSelected:t,assetType:"image"})]})}function JE(e){let{id:t,readOnly:n,altText:r,onValueChange:i,selected:o}=e;return zM.jsxs(f.gN,{labelPosition:"side",selected:o,children:[zM.jsx(f.Qy,{htmlFor:t,children:"Alt text"}),zM.jsx(f.JO,{children:zM.jsx(f.oi,{id:t,placeholder:"Short description for the visually impaired",readOnly:n,padding:{input:{inline:16}},value:r,onValueChange:i})})]})}function JM(e){let{contentView:t,croppedImage:n}=e,{width:r,height:i,x:o,y:a,zoom:u}=n,s=function(e){let{origin:t,croppedImage:n}=e,{x:r,y:i,width:o,height:a,cropHeight:u,cropWidth:s}=n,l=new URL(t.url),c=t.height!==a||t.width!==o;if(0!==r||0!==i||u!==t.height||s!==t.width){let d=[r,i,s,u].map(Math.round).join(",");l.searchParams.set("rect",d),l.searchParams.set("w",o.toString()),l.searchParams.set("h",a.toString())}return c&&(l.searchParams.set("w",o.toString()),l.searchParams.set("h",a.toString())),l.toString()}({origin:t.origin,croppedImage:n});return{...t,width:r,height:i,url:s,edit:{...t.edit,zoom:u,crop:{x:o,y:a}}}}function JF(e){var t,n,r;let{field:i,content:o,thumbnail:a,croppedImage:u}=e;if(a===ZW){let s=JM({contentView:o,croppedImage:u});return s.url===o.url?o:{...o,...s}}let l=null==(n=null==(t=null==i?void 0:i.config)?void 0:t.thumbnails)?void 0:n.find(e=>e.name===a),c=null==(r=o.thumbnails)?void 0:r[a];if(!l||!c)return o;let d=JM({contentView:c,croppedImage:u});return d.url===c.url?o:{...o,thumbnails:{...o.thumbnails,[a]:d}}}function Jj(e){let{selectedImage:t,imageCrop:n,setImageCrop:r}=e,{width:i,height:o,zoom:a,cropHeight:u,cropWidth:s}=n,l=t.contentView,d={x:n.x,y:n.y,width:s,height:u},[p,A]=(0,c.useState)(),h=(null==l?void 0:l.origin.url)??"",m=!(null!=t&&t.thumbnail.height&&null!=t&&t.thumbnail.width);function g(e,t){let i=parseInt(t);isNaN(i)||i<=0||!m||r({...n,[e]:i})}function y(e){r({...n,zoom:e})}return zM.jsxs(f.xu,{padding:{inline:24,block:16},flexDirection:"column",gap:16,height:"100%",overflowY:"auto",alignItems:"center",children:[zM.jsxs(f.xu,{gap:8,height:32,alignItems:"flex-start",width:"100%",children:[zM.jsx(f.u,{content:"Center",children:zM.jsx(f.zx,{color:"grey",size:"medium",startIcon:"centerFocusWeak",onClick:function(){A(JU),r({...n,...JU})}})}),zM.jsx(f.u,{content:"Cover",children:zM.jsx(f.zx,{color:"grey",size:"medium",startIcon:"zoomOutMap",onClick:function(){l&&(A(JU),r({...n,...JU,zoom:1,cropWidth:l.width,cropHeight:l.height}))}})}),zM.jsx(f.Z0,{orientation:"vertical"}),zM.jsx(f.yt,{prefix:"W",prefixTooltip:"Width",placeholder:"width",type:"number",size:"medium",value:String(i),onValueChange:e=>g("width",e),sx:{width:100},disabled:!m}),zM.jsx(f.yt,{prefix:"H",prefixTooltip:"Height",placeholder:"height",type:"number",size:"medium",value:String(o),onValueChange:e=>g("height",e),sx:{width:100},disabled:!m})]}),zM.jsx(f.fl,{image:h,aspect:i/o,crop:p??{x:0,y:0},onCropChange:A,zoom:a,onZoomChange:y,onCropAreaChange(e,t){var i;r({...n,cropWidth:t.width,cropHeight:t.height,x:t.x,y:t.y})},initialCroppedAreaPixels:d}),zM.jsx(f.xu,{width:"100%",maxWidth:320,children:zM.jsx(f.iR,{min:1,max:3,step:.01,value:[a],onValueChange:([e])=>y(e??1)})})]})}m.Fs.registerFetcherConfig(Jw,{cacheCapacity:5,revalidationStrategy:{type:"never"}});let JU={x:0,y:0};function JK(e){let{trigger:t,initialImages:n}=e,{open:r,onOpenChange:i,ready:o,option:a,selectedImage:u,croppedImage:s,setCroppedImage:l,setReady:d,setOption:p}=function(e){let{initialImages:t,initialOption:n,onClose:r}=e,[i,o]=(0,c.useState)(h),[a,u]=(0,c.useState)(!1),[s,l]=(0,c.useState)(!1),[d,f]=(0,c.useState)(n),p=t[d],A=i[(null==p?void 0:p.thumbnail.name)??""];function h(){return t.reduce((e,t)=>(t.contentView&&(e[t.thumbnail.name]=function(e){let{x:t,y:n}=e.edit.crop,r=e.edit.zoom,{width:i,height:o}=e,{width:a,height:u}=e.origin,s=i/o,l=Math.min(a,u*s/r);return{x:t,y:n,width:i,height:o,zoom:r,cropWidth:l,cropHeight:l/s}}(t.contentView)),e),{})}return{open:a,ready:s,option:d,selectedImage:p,croppedImage:A,setCroppedImage:function(e){if(!p)return;let t=p.thumbnail.name;o({...i,[t]:e})},setReady:l,setOption:f,onClose:r,onOpenChange:function(e){e?(f(n),o(h())):(l(!1),r({option:d,croppedImages:i})),u(e)}}}(e);return zM.jsxs(f.Vq,{trigger:t,onAnimationEnd:()=>d(!0),open:r,onOpenChange:i,children:[zM.jsx(f.fK,{icon:"photo",title:"Image editor"}),zM.jsx(f.Zp,{value:String(a),onValueChange:e=>p(Number(e)),children:n.map((e,t)=>zM.jsx(f.T9,{value:String(t),icon:"photo",title:e.labels[0]??"Main",subtitle:e.labels[1]??""},e.thumbnail.name))}),u&&zM.jsx(f.cZ,{children:o&&s&&zM.jsx(Jj,{selectedImage:u,imageCrop:s,setImageCrop:l},u.thumbnail.name)})]})}function JL(e){var t,n;let{content:r,selected:i,fieldLabel:o,readOnly:a,imageLabel:u,onMediaSelected:s,initialImages:l,initialOption:d=0,onCropperDialogClose:p,onClear:A,children:h}=e,[m,g]=(0,c.useState)(!1),y=(null==(n=null==(t=null==r?void 0:r.url)?void 0:t.split("?")[0])?void 0:n.slice(-4))===".svg",v=null!=r&&r.url&&!a?"visible":"hidden";return zM.jsxs(f.Zb,{color:i?"indigo2":"grey2",variant:i?"selected":"dashed",radius:4,children:[zM.jsxs(f.Ol,{sx:{flexWrap:"wrap"},children:[zM.jsxs(f.wP,{children:[zM.jsx(f.xv,{noWrap:!0,children:(0,x.tx)(o,30)}),0!==u.length&&zM.jsx(f.xv,{color:"grey11",noSelect:!0,children:` • ${u.join(" • ")}`})]}),zM.jsxs(f.Pf,{sx:{visibility:v},children:[zM.jsx(JK,{trigger:zM.jsx(f.zx,{startIcon:"crop",disabled:y,children:"Crop & Resize"}),initialImages:l,initialOption:d,onClose:p}),zM.jsx(f.zx,{startIcon:"imageSearch",onClick:()=>g(!0),children:"Replace"}),zM.jsx(f.zx,{onClick:A,startIcon:"delete",children:"Clear"})]})]}),h,zM.jsx(JR,{open:m,onOpenChange:g,onMediaSelected:s,assetType:"image"})]})}function JB(e){let{content:t,field:n,id:r,onContentChange:i,readOnly:o}=e,a=t&&t.origin.url.length>0,{onCropperDialogClose:u,onPageChange:s,onMediaSelected:l,isUpdating:f,page:p,thumbnail:A,allThumbnails:m,allContentViews:g,contentView:y,onClear:v}=function(e){var t;let{content:n,onContentChange:r,field:i}=e,[o,a]=(0,c.useState)(0),[u,s]=(0,c.useTransition)(),l=(t=i,(0,c.useMemo)(()=>{var e,n,r;return[{...null==(n=t.config)?void 0:n.constraint,name:ZW}].concat((null==(r=t.config)?void 0:r.thumbnails)??[])},[t])),f=l[o],p=n?function(e,t){var n,r;let{__TYPE__:i,thumbnails:o,...a}=t,u=null==(r=null==(n=e.config)?void 0:n.thumbnails)?void 0:r.map(({name:e})=>null==o?void 0:o[e]);return[a,...u??[]]}(i,n):void 0,A=null==p?void 0:p[o];return{onCropperDialogClose:function({option:e,croppedImages:t}){if(a(e),!n)return;let o=Object.entries(t).reduce((e,[t,n])=>JF({field:i,content:e,thumbnail:t,croppedImage:n}),n);o!==n&&s(()=>r(o))},onPageChange:function(e){s(()=>a(e))},onMediaSelected:function(e){if(!f)return;let t=function(e,t,n,r){var i,o,a,u,s;if(!n||e===ZW){let l=null==(i=t.config)?void 0:i.thumbnails,c=l&&Object.fromEntries(l.map(e=>[e.name,ZQ(r,e)]));return{__TYPE__:"ImageContent",...ZQ(r,null==(o=t.config)?void 0:o.constraint),thumbnails:c}}let f=null==(u=null==(a=t.config)?void 0:a.thumbnails)?void 0:u.find(t=>t.name===e);if(!f)return n;let p=null==(s=n.thumbnails)?void 0:s[e],A=ZQ(r,f);return A.url===(null==p?void 0:p.url)?n:{...n,thumbnails:(0,d.Q8)(n.thumbnails??{},(t,n)=>n===e?A:t)}}(f.name,i,n,e);t!==n&&s(()=>r(t))},isUpdating:u,page:o,thumbnail:f,allThumbnails:l,allContentViews:p,contentView:A,onClear:function(){null==a||a(0),r(void 0)}}}({field:n,content:t,onContentChange:i}),x=Jn(n),b=m.map((e,n)=>{let r=null==g?void 0:g[n];return{thumbnail:e,contentView:r,labels:ZD(e,t,r)}}),C=A&&a?ZD(A,t,y).filter(h.$):[];return zM.jsx(JL,{content:t,fieldLabel:x,imageLabel:C,initialOption:p,initialImages:b,readOnly:o,onMediaSelected:l,onCropperDialogClose:u,onClear:v,children:zM.jsx(c.Suspense,{fallback:zM.jsx("div",{style:{height:466}}),children:A&&t&&a&&g?zM.jsx(JP,{allContentViews:g,content:t,contentView:y,id:r,onContentChange:i,onPageChange:s,page:p,readOnly:o,thumbnailName:A.name,isUpdating:f}):zM.jsx(Jk,{onMediaSelected:l,readOnly:o,isUpdating:f})})})}function JP(e){let{allContentViews:t,content:n,contentView:r,id:i,onContentChange:o,onPageChange:a,page:u,readOnly:s,thumbnailName:l,isUpdating:c}=e;return zM.jsxs(f.aY,{children:[zM.jsx(f.lr,{getItemSource:Zq,items:t,onPageChange:a,page:u,style:{height:400},children:e=>(null==e?void 0:e.url)&&zM.jsx(f.d$,{"aria-label":"Image Field Item",src:ZN(e.url),alt:e.alt??void 0,isUpdating:c},`${l}_${e.url}`)}),zM.jsx(JE,{id:i,readOnly:s||!r,altText:(null==r?void 0:r.alt)??"",onValueChange(e){r&&o(function(e,t,n,r){let i=0===r.length?void 0:r;return e===ZW?{...t,alt:i}:{...t,thumbnails:{...t.thumbnails,[e]:{...n,alt:i}}}}(l,n,r,e))}})]})}function JW(e,t,n,r,i,o=1,a=30){let u=new URL(`if/search/${r}`,e);return u.searchParams.set("searchTerm",i),u.searchParams.set("limit",a.toString()),u.searchParams.set("page",o.toString()),(0,y.WY)(u,{headers:{repository:n},credentials:(0,y.xb)(t),okType:JN})}let JD=HI.object({id:HI.string(),title:HI.string(),imageURL:HI.string().optional().nullable()}),JN=HI.object({items:HI.array(JD),totalPages:HI.number(),page:HI.number()});function Jq(e){let{itemId:t,catalogId:n}=e,r=zB();r.integrationFields||zW("integrationFields");let{integrationFieldsApiBaseUrl:i,repository:o,authStrategy:a}=r,u=(0,m.QT)(JQ,[i,a,o,n,t]).items[0];if(!u)throw Error("Item not found");return{item:u}}function JQ(e,t,n,r,i){let o=new URL(`if/read/${r}`,e);return o.searchParams.set("ids",[i].toString()),(0,y.WY)(o,{headers:{repository:n},credentials:(0,y.xb)(t),okType:JV})}let JV=HI.object({items:HI.array(JD)});function Jz(e){let{item:t,onClick:n,catalogId:r}=e;return zM.jsxs(f.oU,{variant:"large",onClick:n,children:[zM.jsx(JY,{src:t.imageURL??"",alt:t.title}),zM.jsxs(f.Tw,{children:[zM.jsx(f.Ct,{title:`Catalog: ${r}`,icon:"multipleStop",size:"medium"}),zM.jsx(f.xv,{variant:"bold",color:"grey12",sx:{marginTop:4},children:t.title}),zM.jsxs(f.xv,{variant:"small",color:"grey11",children:["Product code: ",t.id]})]})]})}function JY(e){let{src:t,alt:n}=e;return t?zM.jsx(f.Sy,{src:t,alt:n,width:76,height:76,framed:!0}):zM.jsxs(f.xu,{borderRadius:6,backgroundColor:"grey2",height:76,width:76,flexDirection:"column",alignItems:"center",justifyContent:"center",border:!0,padding:{inline:4,block:8},children:[zM.jsx(f.I5,{name:"hideImage",size:"large",color:"grey11"}),zM.jsx(f.xv,{color:"grey11",variant:"small",noSelect:!0,align:"center",children:"No preview image"})]})}function JH(){return zM.jsxs(f.oU,{variant:"large",children:[zM.jsx(f.Od,{height:76,width:76}),zM.jsxs(f.Tw,{children:[zM.jsx(f.Od,{height:24,width:168}),zM.jsx(f.Od,{height:24,width:240,sx:{marginTop:4}}),zM.jsx(f.Od,{height:16,width:144})]})]})}function JZ(e){let{open:t,onOpenChange:n,catalogId:r,onSelectItem:i}=e,o=(0,p.$P)({initialState:""}),a=zB();return zM.jsx(f.Vq,{open:t,onOpenChange:n,hasClose:!1,size:{width:612,height:724},children:zM.jsx(f.cZ,{children:zM.jsxs(f.xu,{flexDirection:"column",height:"100%",children:[zM.jsxs(f.xu,{padding:{top:16,inline:16},flexDirection:"column",gap:8,children:[zM.jsx(f.CR,{value:o.value,onValueChange:o.set,placeholder:"Search in your catalog"}),zM.jsx(f.xv,{variant:"smallBold",color:"grey11",children:"Select an item"})]}),a.integrationFields?zM.jsx(f.SV,{renderError:()=>zM.jsx(J$,{message:"There was an error while fetching your catalog items."}),children:zM.jsx(c.Suspense,{fallback:zM.jsxs(f.xu,{flexDirection:"column",gap:12,padding:{top:10,inline:16,bottom:16},children:[zM.jsx(JH,{}),zM.jsx(JH,{}),zM.jsx(JH,{}),zM.jsx(JH,{}),zM.jsx(JH,{})]}),children:zM.jsx(JG,{searchTerm:o.debouncedValue,catalogId:r,onItemClick:i})})}):zM.jsx(J$,{message:"Slice Machine does not yet support mock data for integration field in the simulator."})]})})})}function JJ(e){let{isLoading:t}=e;return zM.jsx(f.FN,{anchor:zM.jsx(f.xu,{position:"relative",width:"100%",justifyContent:"center",bottom:72}),loadingIndicator:!0,open:t,title:"Loading more results ...",seconds:1})}function JG(e){let{catalogId:t,searchTerm:n,onItemClick:r}=e,[i,o]=(0,c.useTransition)(),{items:a,hasNextPage:u,fetchNextPage:s}=function(e){var t,n;let{searchTerm:r,catalogId:i}=e,o=zB();o.integrationFields||zW("integrationFields");let{integrationFieldsApiBaseUrl:a,repository:u,authStrategy:s}=o,[l,d]=(0,c.useState)(1),[f,p]=(0,c.useState)([]),[A,h]=(0,c.useState)(""),y=(0,m.QT)(JW,[a,s,u,i,r,r===A?l:1]);r!==A?(h(r),d(1),p(y.items)):y.items.length>0&&(null==(t=(0,g.Z$)(f))?void 0:t.id)!==(null==(n=(0,g.Z$)(y.items))?void 0:n.id)&&p(e=>e.concat(y.items));let v=l<y.totalPages;return{items:f,response:y,fetchNextPage:function(){v&&d(e=>e+1)},hasNextPage:v}}({catalogId:t,searchTerm:n});return zM.jsxs(zM.Fragment,{children:[zM.jsx(f.xr,{onScrollToBottom:()=>u&&o(s),style:{flexGrow:1,paddingTop:f.rS.space[10],paddingBottom:f.rS.space[16],paddingInline:f.rS.space[16],display:"flex",flexDirection:"column",gap:f.rS.space[12]},threshold:252,children:0===a.length?zM.jsx(J$,{}):a.map(e=>zM.jsx(Jz,{item:e,catalogId:t,onClick:()=>r(e)},e.id))}),zM.jsx(JJ,{isLoading:i})]})}function J$(e){let{message:t="We can't find any items matching your search"}=e;return zM.jsx(f.xu,{justifyContent:"center",flexDirection:"column",height:"100%",children:zM.jsxs(f.R$,{children:[zM.jsx(f.av,{name:"close",lineColor:"purple10",backgroundColor:"purple3",borderColor:"purple6",borderStyle:"dashed",size:"xlarge"}),zM.jsx(f._T,{size:"big",children:"Oops!"}),zM.jsx(f.nf,{width:360,children:t})]})})}function JX(e){let{itemId:t,item:n}=e,r=zB();return t&&n&&n.id===t?zM.jsx(J2,{...e,value:n.title}):t&&r.integrationFields?zM.jsx(f.SV,{renderError:()=>zM.jsx(J2,{...e,value:t}),children:zM.jsx(c.Suspense,{fallback:zM.jsx(J2,{...e,value:t}),children:zM.jsx(J6,{...e,itemId:t})},t)},t):t&&!r.integrationFields?zM.jsx(J2,{...e,value:t}):zM.jsx(J2,{...e,value:""})}function J0(e){let{catalogId:t,itemId:n,item:r}=e,i=zB();return n&&r&&r.id===n?zM.jsx(f.mS,{children:zM.jsx(Jz,{catalogId:t,item:r})}):n&&i.integrationFields?zM.jsx(f.SV,{renderError:()=>null,children:zM.jsx(f.mS,{children:zM.jsx(c.Suspense,{fallback:zM.jsx(JH,{}),children:zM.jsx(J1,{catalogId:t,itemId:n})},n)})},n):null}function J1(e){let{itemId:t,catalogId:n}=e,{item:r}=Jq({catalogId:n,itemId:t});return zM.jsx(Jz,{catalogId:n,item:r})}function J2(e){let{id:t,field:n,readOnly:r,value:i,onFocus:o,onClearItem:a}=e;return zM.jsx(Ju,{id:t,placeholder:Jr(n),readOnly:!0,variant:"link",value:i,...!r&&{cursor:"pointer",onFocus:o},endAdornment:zM.jsx(f.zx,{startIcon:"close",color:"grey",size:"small",disabled:!i,onClick:a})})}function J6(e){let{itemId:t,catalogId:n}=e,{item:r}=Jq({catalogId:n,itemId:t});return zM.jsx(J2,{...e,value:r.title})}function J5(e){var t;let{id:n,field:r,content:i,readOnly:o,onContentChange:a}=e,[u,s]=(0,c.useState)(!1),[l,d]=(0,c.useState)(),p=null==(t=r.config)?void 0:t.catalog;return p?zM.jsxs(zM.Fragment,{children:[zM.jsxs(f.gN,{footer:zM.jsx(J0,{catalogId:p,item:l,itemId:null==i?void 0:i.value}),children:[zM.jsx(f.fw,{name:"multipleStop"}),zM.jsx(f.Qy,{htmlFor:n,children:Jn(r)}),zM.jsx(f.JO,{children:zM.jsx(JX,{id:n,field:r,readOnly:o,catalogId:p,item:l,itemId:null==i?void 0:i.value,onFocus:()=>s(!0),onClearItem:function(){a(void 0),d(void 0)}})})]}),zM.jsx(JZ,{open:u,onOpenChange:s,catalogId:p,onSelectItem:function(e){a({value:e.id,__TYPE__:"IntegrationFieldsContent"}),d(e),s(!1)}})]}):null}function J3(e){let{content:t,field:n,id:r,onContentChange:i,readOnly:o}=e;return zM.jsxs(f.gN,{children:[zM.jsx(f.fw,{name:"notes"}),zM.jsx(f.Qy,{htmlFor:r,children:Jn(n)}),zM.jsx(f.JO,{children:zM.jsx(f.Kx,{id:r,placeholder:Jr(n),readOnly:o,paddingLeft:4,paddingRight:12,sx:{flexGrow:1},value:(null==t?void 0:t.value)??"",onChange(e){var t;i((t=e,0===t.length?void 0:{__TYPE__:"FieldContent",type:"Text",value:t}))}})})]})}function J9(e){let{documentType:t,documentUrl:n,title:r,statusColor:i,description:o,tags:a,tagsFilter:u,previewImageUrl:s,onSelect:l}=e;return zM.jsxs(f.Zb,{paddingBlock:16,onSelect:function(e){return e.nativeEvent instanceof MouseEvent&&(e.metaKey||e.ctrlKey)?window.open(n,"_blank"):l()},children:[zM.jsx(f.aY,{children:zM.jsxs(f.xu,{justifyContent:"space-between",children:[zM.jsxs(f.xu,{flexDirection:"column",gap:4,alignItems:"flex-start",flexGrow:1,children:[zM.jsx(J4,{documentType:t}),zM.jsx(J7,{title:r,statusColor:i}),zM.jsx(J8,{description:o})]}),zM.jsx(Ge,{previewImageUrl:s})]})}),a.length>0&&zM.jsx(Gt,{tags:a,tagsFilter:u})]})}function J4(e){let{documentType:t}=e;return zM.jsx(f.Ct,{maxWidth:150,size:"medium",title:`Type: ${t}`,icon:"description"})}function J7(e){let{title:t,statusColor:n}=e;return zM.jsxs(f.xu,{gap:8,alignItems:"center",children:[zM.jsx(f.oT,{color:n}),zM.jsx(f.xv,{variant:"bold",children:t})]})}function J8(e){let{description:t}=e,n=null==t?void 0:t.substring(0,150);return n?zM.jsx(f.xv,{variant:"small",color:"grey11",children:`${n}${n!==t?"...":""}`}):zM.jsx(f.xv,{variant:"smallItalic",color:"grey11",children:"No description available"})}function Ge(e){let{previewImageUrl:t}=e;return zM.jsx(f.xu,{width:142,height:90,backgroundColor:"grey2",border:!0,borderRadius:6,flexDirection:"column",alignItems:"center",justifyContent:"center",gap:4,flexShrink:0,padding:8,children:t?zM.jsx(f.Ee,{src:t,sizing:"cover"}):zM.jsxs(zM.Fragment,{children:[zM.jsx(f.I5,{name:"hideImage",size:"large",color:"grey11"}),zM.jsx(f.xv,{color:"grey11",variant:"small",children:"No preview available"})]})})}function Gt(e){let{tags:t}=e;return zM.jsxs(f.eW,{children:[zM.jsxs(f.xu,{gap:4,alignItems:"center",children:[zM.jsx(f.I5,{name:"label",size:"small",color:"grey11"}),zM.jsx(f.xv,{variant:"small",color:"grey11",children:"Tags:"})]}),zM.jsx(f.lG,{children:t.map(e=>zM.jsx(f.Ct,{size:"medium",title:e,sx:{marginRight:8}},e))})]})}function Gn(e,t,n,r){return function(e,t,n,r,i){let o=new URL("documents",e);return r&&o.searchParams.set("limit",r.toString()),i&&o.searchParams.set("cursor",i),o.search+=`&${n}`,(0,y.WY)(o,{credentials:(0,y.xb)(t),okType:HF})}(e,n,r,30,t)}function Gr(){let e=zB();e.searchDocuments||zW("searchDocuments");let{coreApiBaseUrl:t,authStrategy:n}=e,r=(0,m.QT)(HP,[t,n]);return new Set(r.languages.map(e=>({id:e.id,label:e.name})))}function Gi(){let e=zB();e.searchDocuments||zW("searchDocuments");let{coreApiBaseUrl:t,authStrategy:n}=e,r=(0,m.QT)(HD,[t,n]);return new Set(r.results.map(e=>({id:e,label:e})))}function Go(){let e=zB();e.searchDocuments||zW("searchDocuments");let{customTypesApiBaseUrl:t,repository:n,authStrategy:r}=e,i=(0,m.QT)(HO,[t,n,r]);return new Set(i)}function Ga(e){return e?(0,v.UI)(e,e=>({id:e,label:e})):new Set}function Gu(e){let{filteredLocales:t,setFilteredLocales:n,filteredTags:r,setFilteredTags:i,filteredCustomTypes:o,setFilteredCustomTypes:a,fixedTags:u,fixedCustomTypes:s}=e;return zM.jsxs(zM.Fragment,{children:[zM.jsx(Gc,{selectedValues:t,onSelectedValuesChange:n}),zM.jsx(Gs,{selectedValues:r,fixedSelectedValues:Ga(u),onSelectedValuesChange:i,label:"Tags",icon:"label",fetchFilters:Gi}),zM.jsx(Gs,{selectedValues:o,fixedSelectedValues:Ga(s),onSelectedValuesChange:a,label:"Type",icon:"description",fetchFilters:Go})]})}function Gs(e){let[t,n]=(0,c.useState)(!1),r=(0,c.useRef)(null);return zM.jsx(f.SV,{ref:r,renderError(){var i;return zM.jsx(f.R0,{mode:"error",onErrorRetry:null==(i=r.current)?void 0:i.reset,open:t,setOpen:n,values:new Set,...e})},children:zM.jsx(c.Suspense,{fallback:zM.jsx(f.R0,{mode:"loading",open:t,setOpen:n,values:new Set,...e}),children:zM.jsx(Gl,{open:t,setOpen:n,...e})})})}function Gl(e){let{open:t,setOpen:n,onSelectedValuesChange:r,fixedSelectedValues:i,selectedValues:o,label:a,icon:u,fetchFilters:s,multiple:l}=e,c=s();return zM.jsx(f.R0,{open:t,setOpen:n,label:a,icon:u,selectedValues:o,values:new Set(c),fixedSelectedValues:i,onSelectedValuesChange:r,multiple:l})}function Gc(e){let{selectedValues:t,onSelectedValuesChange:n}=e,[r,i]=(0,c.useState)((0,v.Ps)(t)),o=(0,v.sE)(Gr(),e=>{var n;return e.id===(null==(n=(0,v.Ps)(t))?void 0:n.id)});return(null==o?void 0:o.label)!==(null==r?void 0:r.label)&&i(o),zM.jsx(Gs,{selectedValues:new Set(r?[r]:[]),onSelectedValuesChange:function(e){n(e),i((0,v.Ps)(e))},label:"Locale",icon:"public",fetchFilters:Gr,multiple:!1})}function Gd(e){let{onSelectDocument:t,fixedCustomTypes:n,fixedTags:r,...i}=e,o=zB(),{searchTerm:a,filteredTags:u,setFilteredTags:s,filteredCustomTypes:l,setFilteredCustomTypes:d,filteredLocales:A,setFilteredLocales:h,typesFilter:m,tagsFilter:g}=function(e,t){let n=zB(),r=(0,p.$P)({initialState:""}),[i,o]=(0,c.useState)(new Set),[a,u]=(0,c.useState)(new Set),[s,l]=(0,c.useState)(function(){return n.searchDocuments&&n.localeId?new Set([{id:n.localeId,label:n.localeId}]):new Set}),d=(0,v.G0)(a,Ga(e)),f=(0,v.G0)(i,Ga(t));return{searchTerm:r,filteredTags:i,setFilteredTags:o,filteredCustomTypes:a,setFilteredCustomTypes:u,filteredLocales:s,setFilteredLocales:l,typesFilter:d,tagsFilter:f}}(n,r),[y,x]=(0,c.useTransition)();return zM.jsx(f.Vq,{size:{height:727,width:656},hasClose:!1,...i,children:zM.jsx(f.cZ,{children:zM.jsxs(f.xu,{flexDirection:"column",height:"100%",children:[zM.jsxs(f.xu,{padding:{top:16,inline:16,bottom:8},flexDirection:"column",gap:12,children:[zM.jsx(f.yt,{value:a.value,onValueChange:a.set,placeholder:"Search a page",icon:"search"}),o.searchDocuments&&zM.jsx(Gu,{filteredTags:u,setFilteredTags:s,filteredCustomTypes:l,setFilteredCustomTypes:d,filteredLocales:A,setFilteredLocales:h,fixedTags:r,fixedCustomTypes:n}),zM.jsx(f.xv,{variant:"smallBold",color:"grey11",children:"Link to a document"})]}),o.searchDocuments?zM.jsx(f.SV,{renderError:Gp,children:zM.jsx(c.Suspense,{fallback:zM.jsx(Gm,{}),children:zM.jsx(GA,{searchTerm:a.debouncedValue,tagsFilter:g,typesFilter:m,localesFilter:A,startTransition:x,onSelectDocument:t})})}):zM.jsx(Gh,{message:"Slice Machine does not yet support mock data for linked documents in the simulator."}),zM.jsx(Gf,{isLoading:y})]})})})}function Gf(e){let{isLoading:t}=e;return zM.jsx(f.FN,{anchor:zM.jsx(f.xu,{position:"relative",width:"100%",justifyContent:"center",bottom:72}),loadingIndicator:!0,open:t,title:"Loading more results ...",seconds:1})}function Gp(){return zM.jsx(f.xu,{height:"100%",flexDirection:"column",alignItems:"center",justifyContent:"center",children:zM.jsx(f.Iq,{title:"Request failed",description:"An error occurred while fetching documents.",errorImageSrc:f.Os})})}function GA(e){let{searchTerm:t,tagsFilter:n,typesFilter:r,localesFilter:i,startTransition:o,onSelectDocument:a}=e,{documents:u,hasNextPage:s,fetchNextPage:l}=function(e){var t,n;let{searchTerm:r,tagsFilter:i,typesFilter:o,localesFilter:a}=e,u=zB();u.searchDocuments||zW("searchDocuments");let{coreApiBaseUrl:s,authStrategy:l,status:d}=u,[f,p]=(0,c.useState)(""),[A,h]=(0,c.useState)([]),[y,x]=(0,c.useState)(""),b=new URLSearchParams(Hj([{name:"tags",values:[...(0,v.UI)(i,e=>e.id)]},{name:"customTypes",values:[...(0,v.UI)(o,e=>e.id)]},{name:"language",values:[...(0,v.UI)(a,e=>e.id)]},{name:"status",values:zO[d]},{name:"term",values:[r]}])).toString(),C=(0,m.QT)(Gn,[s,b===y?f:"",l,b]);b!==y?(x(b),p(""),h(C.results)):C.results.length>0&&(null==(t=(0,g.Z$)(A))?void 0:t.id)!==(null==(n=(0,g.Z$)(C.results))?void 0:n.id)&&h(e=>e.concat(C.results));let S=C.total!==A.length;return{documents:A,hasNextPage:S,fetchNextPage:function(){void 0!==C.cursor&&p(C.cursor)},response:C}}({searchTerm:t,tagsFilter:n,localesFilter:i,typesFilter:r}),d=zB();return zM.jsxs(f.xr,{onScrollToBottom:()=>s&&o(l),style:{flexGrow:1,paddingTop:f.rS.space[10],paddingBottom:f.rS.space[16],paddingInline:f.rS.space[16],display:"flex",flexDirection:"column",gap:f.rS.space[12]},children:[0===u.length&&zM.jsx(Gh,{}),u.map(e=>{let t=e.versions[0];if(!t)return null;let r=zR({documentId:e.id,versionId:"archived"===t.status?t.version_id:void 0,releaseId:"release"===t.status?t.release_id:void 0,status:t.status,baseUrl:d.baseUrl}),i=function(e){let{tags:t,tagsFilter:n}=e,r=[...n].map(e=>e.label).reverse();return(0,g.DY)(t,e=>-r.indexOf(e))}({tags:t.tags,tagsFilter:n});return zM.jsx(J9,{documentType:t.custom_type_label,documentUrl:r,description:t.preview_summary,tags:i,title:e.title,previewImageUrl:t.preview_image,onSelect:()=>a(e.id),statusColor:zT[t.status].color},`${e.id}-${t.status}`)})]})}function Gh(e){let{message:t="We can't find any versions matching this request"}=e;return zM.jsx(f.xu,{justifyContent:"center",flexDirection:"column",height:"100%",children:zM.jsxs(f.R$,{children:[zM.jsx(f.av,{name:"close",lineColor:"purple10",backgroundColor:"purple3",borderColor:"purple6",borderStyle:"dashed",size:"xlarge"}),zM.jsx(f._T,{size:"big",children:"Oops!"}),zM.jsx(f.nf,{width:360,children:t})]})})}function Gm(){return zM.jsx(f.xu,{flexDirection:"column",gap:12,padding:{top:10,inline:16,bottom:16},children:(0,g.w6)(1,5).map(e=>zM.jsx(f.Od,{height:150},e))})}function Gg(e){let{hasLink:t,onUnlink:n,selectEnabled:r,selectedType:i,onValueChange:o,openInNewTab:a=!0,setOpenInNewTab:u}=e;return zM.jsxs(zM.Fragment,{children:[u&&"web"===i&&zM.jsx(f.zx,{startIcon:a?"checkBox":"checkBoxOutlinedBlank",color:"grey",size:"small",onClick:()=>u(!a),children:"Open in new tab"}),zM.jsxs(f.Ph,{value:i,color:"grey",size:"small",boldTriggerText:!0,startIcon:function(e){if(e)switch(e){case"document":return"description";case"web":return"public";case"media":return"image"}}(i),disabled:!r,onValueChange:o,placeholder:"Choose link type",children:[zM.jsx(f.Ql,{value:"web",icon:"public",children:"Link to web page"}),zM.jsx(f.Ql,{value:"document",icon:"description",children:"Link to Prismic page"}),zM.jsx(f.Ql,{value:"media",icon:"image",children:"Link to media"})]}),zM.jsx(f.zx,{startIcon:"close",color:"grey",size:"small",disabled:!t,onClick:n})]})}m.Fs.registerFetcherConfig(Gn,{cacheCapacity:500,revalidationStrategy:{type:"never"}});let Gy={DocumentLink:"document",ExternalLink:"web",FileLink:"media",ImageLink:"media"},Gv={document:"DocumentLink",web:"ExternalLink",media:"FileLink"},Gx=Hn({id:Y$(),title:Y$()});function Gb(e,t,n){return(0,y.WY)(new URL(`documents/${n}`,e),{credentials:(0,y.xb)(t),okType:Gx})}function GC(e){var t,n,r,i,o,a;let{media:u}=e,s="kind"in u;return s&&"image"===u.kind?{__TYPE__:"LinkContent",value:{__TYPE__:"ImageLink",id:u.id,name:u.filename,url:u.url,kind:u.kind,size:u.size.toString(),height:(null==(t=u.height)?void 0:t.toString())??"2000",width:(null==(n=u.width)?void 0:n.toString())??"2000",date:(null==(r=u.last_modified)?void 0:r.toString())??""}}:s?{__TYPE__:"LinkContent",value:{__TYPE__:"FileLink",id:u.id,name:u.filename,kind:u.kind,url:u.url,size:u.size.toString(),date:(null==(i=u.last_modified)?void 0:i.toString())??""}}:{__TYPE__:"LinkContent",value:{__TYPE__:"ImageLink",id:u.id,name:(null==u?void 0:u.alt)??u.url,kind:"image",url:u.url,size:"0",height:(null==(o=u.height)?void 0:o.toString())??"2000",width:(null==(a=u.width)?void 0:a.toString())??"2000"}}}function GS(e){var t,n;let{content:r,field:i,id:o,onContentChange:a,readOnly:u}=e,[s,d]=(0,c.useState)(!1),[A,h]=(0,c.useState)(!1),[m,g]=(0,c.useState)(!1),[y,v]=(0,c.useState)(!1),{contentType:x,fieldValue:b,errorBoundaryRef:C,onDocumentSelected:S,onError:w,onMediaSelected:I,..._}=function(e){var t;let{field:n,content:r,onContentChange:i}=e,o=r?"DocumentLink"===r.value.__TYPE__?r.value.id:"ExternalLink"===r.value.__TYPE__?r.value.url:r.value.name:"",[a,u]=(0,c.useState)(function(){var e,t;return!(null!=(e=n.config)&&e.select)||null!=r&&r.value.__TYPE__?null==r?void 0:r.value.__TYPE__:Gv[null==(t=n.config)?void 0:t.select]}),[s,l]=(0,c.useState)(()=>(null==r?void 0:r.value.__TYPE__)==="ExternalLink"?r.value.target:""),[d,f]=(0,c.useState)(!1),A=(0,c.useRef)(null);(0,p.pQ)(o,function(){var e;d&&(f(!1),null==(e=A.current)||e.reset())});let h=a?Gy[a]:void 0;function m(e){if(!e)return i(void 0);switch(a){case"ExternalLink":return i({__TYPE__:"LinkContent",value:{__TYPE__:"ExternalLink",url:e,target:s}});case"DocumentLink":return i({__TYPE__:"LinkContent",value:{__TYPE__:"DocumentLink",id:e}});case"FileLink":case"ImageLink":case void 0:return i(void 0)}}function g(e){m(e)}return{contentType:a,selectType:h,fieldValue:o,onValueChange:m,onTypeChange:function(e){u(Gv[e]),m("")},placeholder:Jr(n),isTypeSelectEnabled:!(null!=(t=n.config)&&t.select),onDocumentSelected:g,onError:function(){f(!0)},errorBoundaryRef:A,isTargetNewTab:"_blank"===s,updateWebLinkTarget:function(e){let t=e?"_blank":null;l(t),i({__TYPE__:"LinkContent",value:{__TYPE__:"ExternalLink",url:o,target:t}})},onMediaSelected:function(e){i(GC({media:e}))}}}({content:r,field:i,onContentChange:a}),T="ExternalLink"===x&&(0,l.ju)(b),O={id:o,contentType:x,onBlur:()=>d(!1),onFocus(){d(!0),"DocumentLink"===x&&g(!0),"FileLink"===x&&v(!0),"ImageLink"===x&&v(!0)},readOnly:u||!x,textType:T||"ImageLink"===x||"FileLink"===x?"link":"normal",value:b,..._},{searchDocuments:R}=zB();return zM.jsxs(zM.Fragment,{children:[zM.jsxs(f.J2,{onMouseOverChange:h,open:s||A,align:"start",sideOffset:-3,openDelay:100,closeDelay:200,focusOnEnter:!1,anchor:zM.jsxs(f.gN,{onMouseOverChange:d,children:[zM.jsx(f.fw,{name:"link"}),zM.jsx(f.Qy,{htmlFor:o,children:Jn(i)}),zM.jsx(f.JO,{children:"DocumentLink"===x&&""!==b&&R?zM.jsx(G_,{errorBoundaryRef:C,onError:w,fallback:zM.jsx(Gw,{...O,value:"..."}),renderError(){var e;return e=O,zM.jsx(Gw,{...e,textType:"link"})},children:zM.jsx(GI,{...O,documentId:b,openDocumentListModal:()=>g(!0)})}):zM.jsx(Gw,{...O})})]}),children:[T&&zM.jsx(f.oZ,{url:T,title:(0,l.S$)(T)??"",subTitle:T.toString()}),(null==r?void 0:r.value.__TYPE__)==="ImageLink"&&zM.jsx(f.Qi,{url:r.value.url,title:r.value.name,subTitle:`${r.value.width} x ${r.value.height} pixels`})]}),zM.jsx(JR,{open:y,onOpenChange:v,onMediaSelected:I,assetType:"all"}),zM.jsx(Gd,{open:m,onOpenChange:g,onSelectDocument(e){g(!1),S(e)},fixedCustomTypes:new Set(null==(t=i.config)?void 0:t.customtypes),fixedTags:new Set(null==(n=i.config)?void 0:n.tags)})]})}function Gw(e){let{id:t,onValueChange:n,placeholder:r,readOnly:i,value:o,textType:a,onFocus:u,onBlur:s,contentType:l,isTypeSelectEnabled:c,selectType:d,onTypeChange:f,isTargetNewTab:p,updateWebLinkTarget:A}=e,h="DocumentLink"===l||"ImageLink"===l||"FileLink"===l;return zM.jsx(Ju,{id:t,onValueChange:n,placeholder:r,readOnly:i||h,value:o,variant:a,onFocus:u,onBlur:s,cursor:h?"pointer":"text",endAdornment:zM.jsx(Gg,{hasLink:!!o,onUnlink:()=>n(""),selectEnabled:c,selectedType:d,onValueChange:f,openInNewTab:p,setOpenInNewTab:A})})}function GI(e){let{id:t,documentId:n,openDocumentListModal:r,onValueChange:i,isTypeSelectEnabled:o,selectType:a,onTypeChange:u}=e,s=function(e){let t=zB();t.searchDocuments||zW("searchDocuments");let{coreApiBaseUrl:n,authStrategy:r}=t;return(0,m.QT)(Gb,[n,r,e]).title}(n);return zM.jsx(Ju,{id:t,readOnly:!0,value:s,variant:"link",onFocus:r,cursor:"pointer",endAdornment:zM.jsx(Gg,{hasLink:!0,onUnlink:()=>i(""),selectEnabled:o,selectedType:a,onValueChange:u})})}function G_(e){let{errorBoundaryRef:t,onError:n,children:r,fallback:i,renderError:o}=e;return zM.jsx(f.SV,{ref:t,onError:n,renderError:o,children:zM.jsx(c.Suspense,{fallback:i,children:r})})}m.Fs.registerFetcherConfig(Gb,{concurrency:2});let GT=({content:e,field:t,id:n,onContentChange:r,readOnly:i})=>{var o,a;let u=Number(null==e?void 0:e.value),s=Number.isFinite(u)?u:void 0;return zM.jsxs(f.gN,{children:[zM.jsx(f.fw,{name:"pin"}),zM.jsx(f.Qy,{htmlFor:n,children:Jn(t)}),zM.jsx(f.JO,{children:zM.jsx(f.Y2,{id:n,value:s,min:null==(o=t.config)?void 0:o.min,max:null==(a=t.config)?void 0:a.max,padding:Js,placeholder:Jr(t),readOnly:i,onValueChange(e){var t;return r((t=e,void 0===t?void 0:{__TYPE__:"FieldContent",type:"Number",value:String(t)}))}})})]})};function GO(e){this.content=e}GO.prototype={constructor:GO,find:function(e){for(var t=0;t<this.content.length;t+=2)if(this.content[t]===e)return t;return -1},get:function(e){var t=this.find(e);return -1==t?void 0:this.content[t+1]},update:function(e,t,n){var r=n&&n!=e?this.remove(n):this,i=r.find(e),o=r.content.slice();return -1==i?o.push(n||e,t):(o[i+1]=t,n&&(o[i]=n)),new GO(o)},remove:function(e){var t=this.find(e);if(-1==t)return this;var n=this.content.slice();return n.splice(t,2),new GO(n)},addToStart:function(e,t){return new GO([e,t].concat(this.remove(e).content))},addToEnd:function(e,t){var n=this.remove(e).content.slice();return n.push(e,t),new GO(n)},addBefore:function(e,t,n){var r=this.remove(t),i=r.content.slice(),o=r.find(e);return i.splice(-1==o?i.length:o,0,t,n),new GO(i)},forEach:function(e){for(var t=0;t<this.content.length;t+=2)e(this.content[t],this.content[t+1])},prepend:function(e){return(e=GO.from(e)).size?new GO(e.content.concat(this.subtract(e).content)):this},append:function(e){return(e=GO.from(e)).size?new GO(this.subtract(e).content.concat(e.content)):this},subtract:function(e){var t=this;e=GO.from(e);for(var n=0;n<e.content.length;n+=2)t=t.remove(e.content[n]);return t},toObject:function(){var e={};return this.forEach(function(t,n){e[t]=n}),e},get size(){return this.content.length>>1}},GO.from=function(e){if(e instanceof GO)return e;var t=[];if(e)for(var n in e)t.push(n,e[n]);return new GO(t)};class GR{constructor(e,t){if(this.content=e,this.size=t||0,null==t)for(let n=0;n<e.length;n++)this.size+=e[n].nodeSize}nodesBetween(e,t,n,r=0,i){for(let o=0,a=0;a<t;o++){let u=this.content[o],s=a+u.nodeSize;if(s>e&&!1!==n(u,r+a,i||null,o)&&u.content.size){let l=a+1;u.nodesBetween(Math.max(0,e-l),Math.min(u.content.size,t-l),n,r+l)}a=s}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,t,n,r){let i="",o=!0;return this.nodesBetween(e,t,(a,u)=>{a.isText?(i+=a.text.slice(Math.max(e,u)-u,t-u),o=!n):a.isLeaf?(r?i+="function"==typeof r?r(a):r:a.type.spec.leafText&&(i+=a.type.spec.leafText(a)),o=!n):!o&&a.isBlock&&(i+=n,o=!0)},0),i}append(e){if(!e.size)return this;if(!this.size)return e;let t=this.lastChild,n=e.firstChild,r=this.content.slice(),i=0;for(t.isText&&t.sameMarkup(n)&&(r[r.length-1]=t.withText(t.text+n.text),i=1);i<e.content.length;i++)r.push(e.content[i]);return new GR(r,this.size+e.size)}cut(e,t=this.size){if(0==e&&t==this.size)return this;let n=[],r=0;if(t>e)for(let i=0,o=0;o<t;i++){let a=this.content[i],u=o+a.nodeSize;u>e&&((o<e||u>t)&&(a=a.isText?a.cut(Math.max(0,e-o),Math.min(a.text.length,t-o)):a.cut(Math.max(0,e-o-1),Math.min(a.content.size,t-o-1))),n.push(a),r+=a.nodeSize),o=u}return new GR(n,r)}cutByIndex(e,t){return e==t?GR.empty:0==e&&t==this.content.length?this:new GR(this.content.slice(e,t))}replaceChild(e,t){let n=this.content[e];if(n==t)return this;let r=this.content.slice(),i=this.size+t.nodeSize-n.nodeSize;return r[e]=t,new GR(r,i)}addToStart(e){return new GR([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new GR(this.content.concat(e),this.size+e.nodeSize)}eq(e){if(this.content.length!=e.content.length)return!1;for(let t=0;t<this.content.length;t++)if(!this.content[t].eq(e.content[t]))return!1;return!0}get firstChild(){return this.content.length?this.content[0]:null}get lastChild(){return this.content.length?this.content[this.content.length-1]:null}get childCount(){return this.content.length}child(e){let t=this.content[e];if(!t)throw RangeError("Index "+e+" out of range for "+this);return t}maybeChild(e){return this.content[e]||null}forEach(e){for(let t=0,n=0;t<this.content.length;t++){let r=this.content[t];e(r,n,t),n+=r.nodeSize}}findDiffStart(e,t=0){return function e(t,n,r){for(let i=0;;i++){if(i==t.childCount||i==n.childCount)return t.childCount==n.childCount?null:r;let o=t.child(i),a=n.child(i);if(o==a){r+=o.nodeSize;continue}if(!o.sameMarkup(a))return r;if(o.isText&&o.text!=a.text){for(let u=0;o.text[u]==a.text[u];u++)r++;return r}if(o.content.size||a.content.size){let s=e(o.content,a.content,r+1);if(null!=s)return s}r+=o.nodeSize}}(this,e,t)}findDiffEnd(e,t=this.size,n=e.size){return function e(t,n,r,i){for(let o=t.childCount,a=n.childCount;;){if(0==o||0==a)return o==a?null:{a:r,b:i};let u=t.child(--o),s=n.child(--a),l=u.nodeSize;if(u==s){r-=l,i-=l;continue}if(!u.sameMarkup(s))return{a:r,b:i};if(u.isText&&u.text!=s.text){let c=0,d=Math.min(u.text.length,s.text.length);for(;c<d&&u.text[u.text.length-c-1]==s.text[s.text.length-c-1];)c++,r--,i--;return{a:r,b:i}}if(u.content.size||s.content.size){let f=e(u.content,s.content,r-1,i-1);if(f)return f}r-=l,i-=l}}(this,e,t,n)}findIndex(e,t=-1){if(0==e)return GE(0,e);if(e==this.size)return GE(this.content.length,e);if(e>this.size||e<0)throw RangeError(`Position ${e} outside of fragment (${this})`);for(let n=0,r=0;;n++){let i=r+this.child(n).nodeSize;if(i>=e)return i==e||t>0?GE(n+1,i):GE(n,r);r=i}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(e=>e.toJSON()):null}static fromJSON(e,t){if(!t)return GR.empty;if(!Array.isArray(t))throw RangeError("Invalid input for Fragment.fromJSON");return new GR(t.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return GR.empty;let t,n=0;for(let r=0;r<e.length;r++){let i=e[r];n+=i.nodeSize,r&&i.isText&&e[r-1].sameMarkup(i)?(t||(t=e.slice(0,r)),t[t.length-1]=i.withText(t[t.length-1].text+i.text)):t&&t.push(i)}return new GR(t||e,n)}static from(e){if(!e)return GR.empty;if(e instanceof GR)return e;if(Array.isArray(e))return this.fromArray(e);if(e.attrs)return new GR([e],e.nodeSize);throw RangeError("Can not convert "+e+" to a Fragment"+(e.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}GR.empty=new GR([],0);let Gk={index:0,offset:0};function GE(e,t){return Gk.index=e,Gk.offset=t,Gk}function GM(e,t){if(e===t)return!0;if(!(e&&"object"==typeof e)||!(t&&"object"==typeof t))return!1;let n=Array.isArray(e);if(Array.isArray(t)!=n)return!1;if(n){if(e.length!=t.length)return!1;for(let r=0;r<e.length;r++)if(!GM(e[r],t[r]))return!1}else{for(let i in e)if(!(i in t)||!GM(e[i],t[i]))return!1;for(let o in t)if(!(o in e))return!1}return!0}let GF=class e{constructor(e,t){this.type=e,this.attrs=t}addToSet(e){let t,n=!1;for(let r=0;r<e.length;r++){let i=e[r];if(this.eq(i))return e;if(this.type.excludes(i.type))t||(t=e.slice(0,r));else{if(i.type.excludes(this.type))return e;!n&&i.type.rank>this.type.rank&&(t||(t=e.slice(0,r)),t.push(this),n=!0),t&&t.push(i)}}return t||(t=e.slice()),n||t.push(this),t}removeFromSet(e){for(let t=0;t<e.length;t++)if(this.eq(e[t]))return e.slice(0,t).concat(e.slice(t+1));return e}isInSet(e){for(let t=0;t<e.length;t++)if(this.eq(e[t]))return!0;return!1}eq(e){return this==e||this.type==e.type&&GM(this.attrs,e.attrs)}toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return e}static fromJSON(e,t){if(!t)throw RangeError("Invalid input for Mark.fromJSON");let n=e.marks[t.type];if(!n)throw RangeError(`There is no mark type ${t.type} in this schema`);return n.create(t.attrs)}static sameSet(e,t){if(e==t)return!0;if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++)if(!e[n].eq(t[n]))return!1;return!0}static setFrom(t){if(!t||Array.isArray(t)&&0==t.length)return e.none;if(t instanceof e)return[t];let n=t.slice();return n.sort((e,t)=>e.type.rank-t.type.rank),n}};GF.none=[];class Gj extends Error{}class GU{constructor(e,t,n){this.content=e,this.openStart=t,this.openEnd=n}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(e,t){let n=function e(t,n,r,i){let{index:o,offset:a}=t.findIndex(n),u=t.maybeChild(o);if(a==n||u.isText)return i&&!i.canReplace(o,o,r)?null:t.cut(0,n).append(r).append(t.cut(n));let s=e(u.content,n-a-1,r);return s&&t.replaceChild(o,u.copy(s))}(this.content,e+this.openStart,t);return n&&new GU(n,this.openStart,this.openEnd)}removeBetween(e,t){return new GU(function e(t,n,r){let{index:i,offset:o}=t.findIndex(n),a=t.maybeChild(i),{index:u,offset:s}=t.findIndex(r);if(o==n||a.isText){if(s!=r&&!t.child(u).isText)throw RangeError("Removing non-flat range");return t.cut(0,n).append(t.cut(r))}if(i!=u)throw RangeError("Removing non-flat range");return t.replaceChild(i,a.copy(e(a.content,n-o-1,r-o-1)))}(this.content,e+this.openStart,t+this.openStart),this.openStart,this.openEnd)}eq(e){return this.content.eq(e.content)&&this.openStart==e.openStart&&this.openEnd==e.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let e={content:this.content.toJSON()};return this.openStart>0&&(e.openStart=this.openStart),this.openEnd>0&&(e.openEnd=this.openEnd),e}static fromJSON(e,t){if(!t)return GU.empty;let n=t.openStart||0,r=t.openEnd||0;if("number"!=typeof n||"number"!=typeof r)throw RangeError("Invalid input for Slice.fromJSON");return new GU(GR.fromJSON(e,t.content),n,r)}static maxOpen(e,t=!0){let n=0,r=0;for(let i=e.firstChild;i&&!i.isLeaf&&(t||!i.type.spec.isolating);i=i.firstChild)n++;for(let o=e.lastChild;o&&!o.isLeaf&&(t||!o.type.spec.isolating);o=o.lastChild)r++;return new GU(e,n,r)}}function GK(e,t){if(!t.type.compatibleContent(e.type))throw new Gj("Cannot join "+t.type.name+" onto "+e.type.name)}function GL(e,t,n){let r=e.node(n);return GK(r,t.node(n)),r}function GB(e,t){let n=t.length-1;n>=0&&e.isText&&e.sameMarkup(t[n])?t[n]=e.withText(t[n].text+e.text):t.push(e)}function GP(e,t,n,r){let i=(t||e).node(n),o=0,a=t?t.index(n):i.childCount;e&&(o=e.index(n),e.depth>n?o++:e.textOffset&&(GB(e.nodeAfter,r),o++));for(let u=o;u<a;u++)GB(i.child(u),r);t&&t.depth==n&&t.textOffset&&GB(t.nodeBefore,r)}function GW(e,t){return e.type.checkContent(t),e.copy(t)}function GD(e,t,n){let r=[];return GP(null,e,n,r),e.depth>n&&GB(GW(GL(e,t,n+1),GD(e,t,n+1)),r),GP(t,null,n,r),new GR(r)}GU.empty=new GU(GR.empty,0,0);class GN{constructor(e,t,n){this.pos=e,this.path=t,this.parentOffset=n,this.depth=t.length/3-1}resolveDepth(e){return null==e?this.depth:e<0?this.depth+e:e}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(e){return this.path[3*this.resolveDepth(e)]}index(e){return this.path[3*this.resolveDepth(e)+1]}indexAfter(e){return e=this.resolveDepth(e),this.index(e)+(e!=this.depth||this.textOffset?1:0)}start(e){return 0==(e=this.resolveDepth(e))?0:this.path[3*e-1]+1}end(e){return e=this.resolveDepth(e),this.start(e)+this.node(e).content.size}before(e){if(!(e=this.resolveDepth(e)))throw RangeError("There is no position before the top-level node");return e==this.depth+1?this.pos:this.path[3*e-1]}after(e){if(!(e=this.resolveDepth(e)))throw RangeError("There is no position after the top-level node");return e==this.depth+1?this.pos:this.path[3*e-1]+this.path[3*e].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let e=this.parent,t=this.index(this.depth);if(t==e.childCount)return null;let n=this.pos-this.path[this.path.length-1],r=e.child(t);return n?e.child(t).cut(n):r}get nodeBefore(){let e=this.index(this.depth),t=this.pos-this.path[this.path.length-1];return t?this.parent.child(e).cut(0,t):0==e?null:this.parent.child(e-1)}posAtIndex(e,t){t=this.resolveDepth(t);let n=this.path[3*t],r=0==t?0:this.path[3*t-1]+1;for(let i=0;i<e;i++)r+=n.child(i).nodeSize;return r}marks(){let e=this.parent,t=this.index();if(0==e.content.size)return GF.none;if(this.textOffset)return e.child(t).marks;let n=e.maybeChild(t-1),r=e.maybeChild(t);if(!n){let i=n;n=r,r=i}let o=n.marks;for(var a=0;a<o.length;a++)!1!==o[a].type.spec.inclusive||r&&o[a].isInSet(r.marks)||(o=o[a--].removeFromSet(o));return o}marksAcross(e){let t=this.parent.maybeChild(this.index());if(!t||!t.isInline)return null;let n=t.marks,r=e.parent.maybeChild(e.index());for(var i=0;i<n.length;i++)!1!==n[i].type.spec.inclusive||r&&n[i].isInSet(r.marks)||(n=n[i--].removeFromSet(n));return n}sharedDepth(e){for(let t=this.depth;t>0;t--)if(this.start(t)<=e&&this.end(t)>=e)return t;return 0}blockRange(e=this,t){if(e.pos<this.pos)return e.blockRange(this);for(let n=this.depth-(this.parent.inlineContent||this.pos==e.pos?1:0);n>=0;n--)if(e.pos<=this.end(n)&&(!t||t(this.node(n))))return new Gz(this,e,n);return null}sameParent(e){return this.pos-this.parentOffset==e.pos-e.parentOffset}max(e){return e.pos>this.pos?e:this}min(e){return e.pos<this.pos?e:this}toString(){let e="";for(let t=1;t<=this.depth;t++)e+=(e?"/":"")+this.node(t).type.name+"_"+this.index(t-1);return e+":"+this.parentOffset}static resolve(e,t){if(!(t>=0&&t<=e.content.size))throw RangeError("Position "+t+" out of range");let n=[],r=0,i=t;for(let o=e;;){let{index:a,offset:u}=o.content.findIndex(i),s=i-u;if(n.push(o,a,r+u),!s||(o=o.child(a)).isText)break;i=s-1,r+=u+1}return new GN(t,n,i)}static resolveCached(e,t){for(let n=0;n<Gq.length;n++){let r=Gq[n];if(r.pos==t&&r.doc==e)return r}let i=Gq[GQ]=GN.resolve(e,t);return GQ=(GQ+1)%GV,i}}let Gq=[],GQ=0,GV=12;class Gz{constructor(e,t,n){this.$from=e,this.$to=t,this.depth=n}get start(){return this.$from.before(this.depth+1)}get end(){return this.$to.after(this.depth+1)}get parent(){return this.$from.node(this.depth)}get startIndex(){return this.$from.index(this.depth)}get endIndex(){return this.$to.indexAfter(this.depth)}}let GY=Object.create(null),GH=class e{constructor(e,t,n,r=GF.none){this.type=e,this.attrs=t,this.marks=r,this.content=n||GR.empty}get nodeSize(){return this.isLeaf?1:2+this.content.size}get childCount(){return this.content.childCount}child(e){return this.content.child(e)}maybeChild(e){return this.content.maybeChild(e)}forEach(e){this.content.forEach(e)}nodesBetween(e,t,n,r=0){this.content.nodesBetween(e,t,n,r,this)}descendants(e){this.nodesBetween(0,this.content.size,e)}get textContent(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,"")}textBetween(e,t,n,r){return this.content.textBetween(e,t,n,r)}get firstChild(){return this.content.firstChild}get lastChild(){return this.content.lastChild}eq(e){return this==e||this.sameMarkup(e)&&this.content.eq(e.content)}sameMarkup(e){return this.hasMarkup(e.type,e.attrs,e.marks)}hasMarkup(e,t,n){return this.type==e&&GM(this.attrs,t||e.defaultAttrs||GY)&&GF.sameSet(this.marks,n||GF.none)}copy(t=null){return t==this.content?this:new e(this.type,this.attrs,t,this.marks)}mark(t){return t==this.marks?this:new e(this.type,this.attrs,this.content,t)}cut(e,t=this.content.size){return 0==e&&t==this.content.size?this:this.copy(this.content.cut(e,t))}slice(e,t=this.content.size,n=!1){if(e==t)return GU.empty;let r=this.resolve(e),i=this.resolve(t),o=n?0:r.sharedDepth(t),a=r.start(o),u=r.node(o).content.cut(r.pos-a,i.pos-a);return new GU(u,r.depth-o,i.depth-o)}replace(e,t,n){return function(e,t,n){if(n.openStart>e.depth)throw new Gj("Inserted content deeper than insertion position");if(e.depth-n.openStart!=t.depth-n.openEnd)throw new Gj("Inconsistent open depths");return function e(t,n,r,i){let o=t.index(i),a=t.node(i);if(o==n.index(i)&&i<t.depth-r.openStart){let u=e(t,n,r,i+1);return a.copy(a.content.replaceChild(o,u))}if(!r.content.size)return GW(a,GD(t,n,i));if(r.openStart||r.openEnd||t.depth!=i||n.depth!=i){let{start:s,end:l}=function(e,t){let n=t.depth-e.openStart,r=t.node(n).copy(e.content);for(let i=n-1;i>=0;i--)r=t.node(i).copy(GR.from(r));return{start:r.resolveNoCache(e.openStart+n),end:r.resolveNoCache(r.content.size-e.openEnd-n)}}(r,t);return GW(a,function e(t,n,r,i,o){let a=t.depth>o&&GL(t,n,o+1),u=i.depth>o&&GL(r,i,o+1),s=[];return GP(null,t,o,s),a&&u&&n.index(o)==r.index(o)?(GK(a,u),GB(GW(a,e(t,n,r,i,o+1)),s)):(a&&GB(GW(a,GD(t,n,o+1)),s),GP(n,r,o,s),u&&GB(GW(u,GD(r,i,o+1)),s)),GP(i,null,o,s),new GR(s)}(t,s,l,n,i))}{let c=t.parent,d=c.content;return GW(c,d.cut(0,t.parentOffset).append(r.content).append(d.cut(n.parentOffset)))}}(e,t,n,0)}(this.resolve(e),this.resolve(t),n)}nodeAt(e){for(let t=this;;){let{index:n,offset:r}=t.content.findIndex(e);if(!(t=t.maybeChild(n)))return null;if(r==e||t.isText)return t;e-=r+1}}childAfter(e){let{index:t,offset:n}=this.content.findIndex(e);return{node:this.content.maybeChild(t),index:t,offset:n}}childBefore(e){if(0==e)return{node:null,index:0,offset:0};let{index:t,offset:n}=this.content.findIndex(e);if(n<e)return{node:this.content.child(t),index:t,offset:n};let r=this.content.child(t-1);return{node:r,index:t-1,offset:n-r.nodeSize}}resolve(e){return GN.resolveCached(this,e)}resolveNoCache(e){return GN.resolve(this,e)}rangeHasMark(e,t,n){let r=!1;return t>e&&this.nodesBetween(e,t,e=>(n.isInSet(e.marks)&&(r=!0),!r)),r}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let e=this.type.name;return this.content.size&&(e+="("+this.content.toStringInner()+")"),GJ(this.marks,e)}contentMatchAt(e){let t=this.type.contentMatch.matchFragment(this.content,0,e);if(!t)throw Error("Called contentMatchAt on a node with invalid content");return t}canReplace(e,t,n=GR.empty,r=0,i=n.childCount){let o=this.contentMatchAt(e).matchFragment(n,r,i),a=o&&o.matchFragment(this.content,t);if(!a||!a.validEnd)return!1;for(let u=r;u<i;u++)if(!this.type.allowsMarks(n.child(u).marks))return!1;return!0}canReplaceWith(e,t,n,r){if(r&&!this.type.allowsMarks(r))return!1;let i=this.contentMatchAt(e).matchType(n),o=i&&i.matchFragment(this.content,t);return!!o&&o.validEnd}canAppend(e){return e.content.size?this.canReplace(this.childCount,this.childCount,e.content):this.type.compatibleContent(e.type)}check(){this.type.checkContent(this.content);let e=GF.none;for(let t=0;t<this.marks.length;t++)e=this.marks[t].addToSet(e);if(!GF.sameSet(e,this.marks))throw RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(e=>e.type.name)}`);this.content.forEach(e=>e.check())}toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return this.content.size&&(e.content=this.content.toJSON()),this.marks.length&&(e.marks=this.marks.map(e=>e.toJSON())),e}static fromJSON(e,t){if(!t)throw RangeError("Invalid input for Node.fromJSON");let n=null;if(t.marks){if(!Array.isArray(t.marks))throw RangeError("Invalid mark data for Node.fromJSON");n=t.marks.map(e.markFromJSON)}if("text"==t.type){if("string"!=typeof t.text)throw RangeError("Invalid text node in JSON");return e.text(t.text,n)}let r=GR.fromJSON(e,t.content);return e.nodeType(t.type).create(t.attrs,r,n)}};GH.prototype.text=void 0;class GZ extends GH{constructor(e,t,n,r){if(super(e,t,null,r),!n)throw RangeError("Empty text nodes are not allowed");this.text=n}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):GJ(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(e,t){return this.text.slice(e,t)}get nodeSize(){return this.text.length}mark(e){return e==this.marks?this:new GZ(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new GZ(this.type,this.attrs,e,this.marks)}cut(e=0,t=this.text.length){return 0==e&&t==this.text.length?this:this.withText(this.text.slice(e,t))}eq(e){return this.sameMarkup(e)&&this.text==e.text}toJSON(){let e=super.toJSON();return e.text=this.text,e}}function GJ(e,t){for(let n=e.length-1;n>=0;n--)t=e[n].type.name+"("+t+")";return t}class GG{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,t){var n;let r=new G$(e,t);if(null==r.next)return GG.empty;let i=GX(r);r.next&&r.err("Unexpected trailing text");let o,a=(n=function(e){let t=[[]];return i(o(e,0),n()),t;function n(){return t.push([])-1}function r(e,n,r){let i={term:r,to:n};return t[e].push(i),i}function i(e,t){e.forEach(e=>e.to=t)}function o(e,t){if("choice"==e.type)return e.exprs.reduce((e,n)=>e.concat(o(n,t)),[]);if("seq"==e.type)for(let a=0;;a++){let u=o(e.exprs[a],t);if(a==e.exprs.length-1)return u;i(u,t=n())}else if("star"==e.type){let s=n();return r(t,s),i(o(e.expr,s),s),[r(s)]}else if("plus"==e.type){let l=n();return i(o(e.expr,t),l),i(o(e.expr,l),l),[r(l)]}else{if("opt"==e.type)return[r(t)].concat(o(e.expr,t));if("range"==e.type){let c=t;for(let d=0;d<e.min;d++){let f=n();i(o(e.expr,c),f),c=f}if(-1==e.max)i(o(e.expr,c),c);else for(let p=e.min;p<e.max;p++){let A=n();r(c,A),i(o(e.expr,c),A),c=A}return[r(c)]}if("name"==e.type)return[r(t,void 0,e.value)];throw Error("Unknown expr type")}}}(i),o=Object.create(null),function e(t){let r=[];t.forEach(e=>{n[e].forEach(({term:e,to:t})=>{if(!e)return;let i;for(let o=0;o<r.length;o++)r[o][0]==e&&(i=r[o][1]);G9(n,t).forEach(t=>{i||r.push([e,i=[]]),-1==i.indexOf(t)&&i.push(t)})})});let i=o[t.join(",")]=new GG(t.indexOf(n.length-1)>-1);for(let a=0;a<r.length;a++){let u=r[a][1].sort(G3);i.next.push({type:r[a][0],next:o[u.join(",")]||e(u)})}return i}(G9(n,0)));return function(e,t){for(let n=0,r=[e];n<r.length;n++){let i=r[n],o=!i.validEnd,a=[];for(let u=0;u<i.next.length;u++){let{type:s,next:l}=i.next[u];a.push(s.name),o&&!(s.isText||s.hasRequiredAttrs())&&(o=!1),-1==r.indexOf(l)&&r.push(l)}o&&t.err("Only non-generatable nodes ("+a.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}(a,r),a}matchType(e){for(let t=0;t<this.next.length;t++)if(this.next[t].type==e)return this.next[t].next;return null}matchFragment(e,t=0,n=e.childCount){let r=this;for(let i=t;r&&i<n;i++)r=r.matchType(e.child(i).type);return r}get inlineContent(){return 0!=this.next.length&&this.next[0].type.isInline}get defaultType(){for(let e=0;e<this.next.length;e++){let{type:t}=this.next[e];if(!(t.isText||t.hasRequiredAttrs()))return t}return null}compatible(e){for(let t=0;t<this.next.length;t++)for(let n=0;n<e.next.length;n++)if(this.next[t].type==e.next[n].type)return!0;return!1}fillBefore(e,t=!1,n=0){let r=[this];return function i(o,a){let u=o.matchFragment(e,n);if(u&&(!t||u.validEnd))return GR.from(a.map(e=>e.createAndFill()));for(let s=0;s<o.next.length;s++){let{type:l,next:c}=o.next[s];if(!(l.isText||l.hasRequiredAttrs())&&-1==r.indexOf(c)){r.push(c);let d=i(c,a.concat(l));if(d)return d}}return null}(this,[])}findWrapping(e){for(let t=0;t<this.wrapCache.length;t+=2)if(this.wrapCache[t]==e)return this.wrapCache[t+1];let n=this.computeWrapping(e);return this.wrapCache.push(e,n),n}computeWrapping(e){let t=Object.create(null),n=[{match:this,type:null,via:null}];for(;n.length;){let r=n.shift(),i=r.match;if(i.matchType(e)){let o=[];for(let a=r;a.type;a=a.via)o.push(a.type);return o.reverse()}for(let u=0;u<i.next.length;u++){let{type:s,next:l}=i.next[u];s.isLeaf||s.hasRequiredAttrs()||s.name in t||r.type&&!l.validEnd||(n.push({match:s.contentMatch,type:s,via:r}),t[s.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(e){if(e>=this.next.length)throw RangeError(`There's no ${e}th edge in this content match`);return this.next[e]}toString(){let e=[];return function t(n){e.push(n);for(let r=0;r<n.next.length;r++)-1==e.indexOf(n.next[r].next)&&t(n.next[r].next)}(this),e.map((t,n)=>{let r=n+(t.validEnd?"*":" ")+" ";for(let i=0;i<t.next.length;i++)r+=(i?", ":"")+t.next[i].type.name+"->"+e.indexOf(t.next[i].next);return r}).join(`
8
- `)}}GG.empty=new GG(!0);class G${constructor(e,t){this.string=e,this.nodeTypes=t,this.inline=null,this.pos=0,this.tokens=e.split(/\s*(?=\b|\W|$)/),""==this.tokens[this.tokens.length-1]&&this.tokens.pop(),""==this.tokens[0]&&this.tokens.shift()}get next(){return this.tokens[this.pos]}eat(e){return this.next==e&&(this.pos++||!0)}err(e){throw SyntaxError(e+" (in content expression '"+this.string+"')")}}function GX(e){let t=[];do t.push(G0(e));while(e.eat("|"));return 1==t.length?t[0]:{type:"choice",exprs:t}}function G0(e){let t=[];do t.push(G1(e));while(e.next&&")"!=e.next&&"|"!=e.next);return 1==t.length?t[0]:{type:"seq",exprs:t}}function G1(e){let t=G5(e);for(;;)if(e.eat("+"))t={type:"plus",expr:t};else if(e.eat("*"))t={type:"star",expr:t};else if(e.eat("?"))t={type:"opt",expr:t};else if(e.eat("{"))t=G6(e,t);else break;return t}function G2(e){/\D/.test(e.next)&&e.err("Expected number, got '"+e.next+"'");let t=Number(e.next);return e.pos++,t}function G6(e,t){let n=G2(e),r=n;return e.eat(",")&&(r="}"!=e.next?G2(e):-1),e.eat("}")||e.err("Unclosed braced range"),{type:"range",min:n,max:r,expr:t}}function G5(e){if(e.eat("(")){let t=GX(e);return e.eat(")")||e.err("Missing closing paren"),t}if(/\W/.test(e.next))e.err("Unexpected token '"+e.next+"'");else{let n=(function(e,t){let n=e.nodeTypes,r=n[t];if(r)return[r];let i=[];for(let o in n){let a=n[o];a.groups.indexOf(t)>-1&&i.push(a)}return 0==i.length&&e.err("No node type or group '"+t+"' found"),i})(e,e.next).map(t=>(null==e.inline?e.inline=t.isInline:e.inline!=t.isInline&&e.err("Mixing inline and block content"),{type:"name",value:t}));return e.pos++,1==n.length?n[0]:{type:"choice",exprs:n}}}function G3(e,t){return t-e}function G9(e,t){let n=[];return function t(r){let i=e[r];if(1==i.length&&!i[0].term)return t(i[0].to);n.push(r);for(let o=0;o<i.length;o++){let{term:a,to:u}=i[o];a||-1!=n.indexOf(u)||t(u)}}(t),n.sort(G3)}function G4(e){let t=Object.create(null);for(let n in e){let r=e[n];if(!r.hasDefault)return null;t[n]=r.default}return t}function G7(e,t){let n=Object.create(null);for(let r in e){let i=t&&t[r];if(void 0===i){let o=e[r];if(o.hasDefault)i=o.default;else throw RangeError("No value supplied for attribute "+r)}n[r]=i}return n}function G8(e){let t=Object.create(null);if(e)for(let n in e)t[n]=new $t(e[n]);return t}let $e=class e{constructor(e,t,n){this.name=e,this.schema=t,this.spec=n,this.markSet=null,this.groups=n.group?n.group.split(" "):[],this.attrs=G8(n.attrs),this.defaultAttrs=G4(this.attrs),this.contentMatch=null,this.inlineContent=null,this.isBlock=!(n.inline||"text"==e),this.isText="text"==e}get isInline(){return!this.isBlock}get isTextblock(){return this.isBlock&&this.inlineContent}get isLeaf(){return this.contentMatch==GG.empty}get isAtom(){return this.isLeaf||!!this.spec.atom}get whitespace(){return this.spec.whitespace||(this.spec.code?"pre":"normal")}hasRequiredAttrs(){for(let e in this.attrs)if(this.attrs[e].isRequired)return!0;return!1}compatibleContent(e){return this==e||this.contentMatch.compatible(e.contentMatch)}computeAttrs(e){return!e&&this.defaultAttrs?this.defaultAttrs:G7(this.attrs,e)}create(e=null,t,n){if(this.isText)throw Error("NodeType.create can't construct text nodes");return new GH(this,this.computeAttrs(e),GR.from(t),GF.setFrom(n))}createChecked(e=null,t,n){return t=GR.from(t),this.checkContent(t),new GH(this,this.computeAttrs(e),t,GF.setFrom(n))}createAndFill(e=null,t,n){if(e=this.computeAttrs(e),(t=GR.from(t)).size){let r=this.contentMatch.fillBefore(t);if(!r)return null;t=r.append(t)}let i=this.contentMatch.matchFragment(t),o=i&&i.fillBefore(GR.empty,!0);return o?new GH(this,e,t.append(o),GF.setFrom(n)):null}validContent(e){let t=this.contentMatch.matchFragment(e);if(!t||!t.validEnd)return!1;for(let n=0;n<e.childCount;n++)if(!this.allowsMarks(e.child(n).marks))return!1;return!0}checkContent(e){if(!this.validContent(e))throw RangeError(`Invalid content for node ${this.name}: ${e.toString().slice(0,50)}`)}allowsMarkType(e){return null==this.markSet||this.markSet.indexOf(e)>-1}allowsMarks(e){if(null==this.markSet)return!0;for(let t=0;t<e.length;t++)if(!this.allowsMarkType(e[t].type))return!1;return!0}allowedMarks(e){if(null==this.markSet)return e;let t;for(let n=0;n<e.length;n++)this.allowsMarkType(e[n].type)?t&&t.push(e[n]):t||(t=e.slice(0,n));return t?t.length?t:GF.none:e}static compile(t,n){let r=Object.create(null);t.forEach((t,i)=>r[t]=new e(t,n,i));let i=n.spec.topNode||"doc";if(!r[i])throw RangeError("Schema is missing its top node type ('"+i+"')");if(!r.text)throw RangeError("Every schema needs a 'text' type");for(let o in r.text.attrs)throw RangeError("The text node type should not have attributes");return r}};class $t{constructor(e){this.hasDefault=Object.prototype.hasOwnProperty.call(e,"default"),this.default=e.default}get isRequired(){return!this.hasDefault}}class $n{constructor(e,t,n,r){this.name=e,this.rank=t,this.schema=n,this.spec=r,this.attrs=G8(r.attrs),this.excluded=null;let i=G4(this.attrs);this.instance=i?new GF(this,i):null}create(e=null){return!e&&this.instance?this.instance:new GF(this,G7(this.attrs,e))}static compile(e,t){let n=Object.create(null),r=0;return e.forEach((e,i)=>n[e]=new $n(e,r++,t,i)),n}removeFromSet(e){for(var t=0;t<e.length;t++)e[t].type==this&&(e=e.slice(0,t).concat(e.slice(t+1)),t--);return e}isInSet(e){for(let t=0;t<e.length;t++)if(e[t].type==this)return e[t]}excludes(e){return this.excluded.indexOf(e)>-1}}class $r{constructor(e){this.cached=Object.create(null);let t=this.spec={};for(let n in e)t[n]=e[n];t.nodes=GO.from(e.nodes),t.marks=GO.from(e.marks||{}),this.nodes=$e.compile(this.spec.nodes,this),this.marks=$n.compile(this.spec.marks,this);let r=Object.create(null);for(let i in this.nodes){if(i in this.marks)throw RangeError(i+" can not be both a node and a mark");let o=this.nodes[i],a=o.spec.content||"",u=o.spec.marks;o.contentMatch=r[a]||(r[a]=GG.parse(a,this.nodes)),o.inlineContent=o.contentMatch.inlineContent,o.markSet="_"==u?null:u?$i(this,u.split(" ")):""!=u&&o.inlineContent?null:[]}for(let s in this.marks){let l=this.marks[s],c=l.spec.excludes;l.excluded=null==c?[l]:""==c?[]:$i(this,c.split(" "))}this.nodeFromJSON=this.nodeFromJSON.bind(this),this.markFromJSON=this.markFromJSON.bind(this),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(e,t=null,n,r){if("string"==typeof e)e=this.nodeType(e);else if(e instanceof $e){if(e.schema!=this)throw RangeError("Node type from different schema used ("+e.name+")")}else throw RangeError("Invalid node type: "+e);return e.createChecked(t,n,r)}text(e,t){let n=this.nodes.text;return new GZ(n,n.defaultAttrs,e,GF.setFrom(t))}mark(e,t){return"string"==typeof e&&(e=this.marks[e]),e.create(t)}nodeFromJSON(e){return GH.fromJSON(this,e)}markFromJSON(e){return GF.fromJSON(this,e)}nodeType(e){let t=this.nodes[e];if(!t)throw RangeError("Unknown node type: "+e);return t}}function $i(e,t){let n=[];for(let r=0;r<t.length;r++){let i=t[r],o=e.marks[i],a=o;if(o)n.push(o);else for(let u in e.marks){let s=e.marks[u];("_"==i||s.spec.group&&s.spec.group.split(" ").indexOf(i)>-1)&&n.push(a=s)}if(!a)throw SyntaxError("Unknown mark type: '"+t[r]+"'")}return n}class $o{constructor(e,t){this.schema=e,this.rules=t,this.tags=[],this.styles=[],t.forEach(e=>{e.tag?this.tags.push(e):e.style&&this.styles.push(e)}),this.normalizeLists=!this.tags.some(t=>{if(!/^(ul|ol)\b/.test(t.tag)||!t.node)return!1;let n=e.nodes[t.node];return n.contentMatch.matchType(n)})}parse(e,t={}){let n=new $d(this,t,!1);return n.addAll(e,t.from,t.to),n.finish()}parseSlice(e,t={}){let n=new $d(this,t,!0);return n.addAll(e,t.from,t.to),GU.maxOpen(n.finish())}matchTag(e,t,n){for(let r=n?this.tags.indexOf(n)+1:0;r<this.tags.length;r++){let i=this.tags[r];if($f(e,i.tag)&&(void 0===i.namespace||e.namespaceURI==i.namespace)&&(!i.context||t.matchesContext(i.context))){if(i.getAttrs){let o=i.getAttrs(e);if(!1===o)continue;i.attrs=o||void 0}return i}}}matchStyle(e,t,n,r){for(let i=r?this.styles.indexOf(r)+1:0;i<this.styles.length;i++){let o=this.styles[i],a=o.style;if(!(0!=a.indexOf(e)||o.context&&!n.matchesContext(o.context)||a.length>e.length&&(61!=a.charCodeAt(e.length)||a.slice(e.length+1)!=t))){if(o.getAttrs){let u=o.getAttrs(t);if(!1===u)continue;o.attrs=u||void 0}return o}}}static schemaRules(e){let t=[];function n(e){let n=null==e.priority?50:e.priority,r=0;for(;r<t.length;r++){let i=t[r];if((null==i.priority?50:i.priority)<n)break}t.splice(r,0,e)}for(let r in e.marks){let i=e.marks[r].spec.parseDOM;i&&i.forEach(e=>{n(e=$p(e)),e.mark||e.ignore||e.clearMark||(e.mark=r)})}for(let o in e.nodes){let a=e.nodes[o].spec.parseDOM;a&&a.forEach(e=>{n(e=$p(e)),e.node||e.ignore||e.mark||(e.node=o)})}return t}static fromSchema(e){return e.cached.domParser||(e.cached.domParser=new $o(e,$o.schemaRules(e)))}}let $a={address:!0,article:!0,aside:!0,blockquote:!0,canvas:!0,dd:!0,div:!0,dl:!0,fieldset:!0,figcaption:!0,figure:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,li:!0,noscript:!0,ol:!0,output:!0,p:!0,pre:!0,section:!0,table:!0,tfoot:!0,ul:!0},$u={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},$s={ol:!0,ul:!0};function $l(e,t,n){return null!=t?(t?1:0)|("full"===t?2:0):e&&"pre"==e.whitespace?3:-5&n}class $c{constructor(e,t,n,r,i,o,a){this.type=e,this.attrs=t,this.marks=n,this.pendingMarks=r,this.solid=i,this.options=a,this.content=[],this.activeMarks=GF.none,this.stashMarks=[],this.match=o||(4&a?null:e.contentMatch)}findWrapping(e){if(!this.match){if(!this.type)return[];let t=this.type.contentMatch.fillBefore(GR.from(e));if(t)this.match=this.type.contentMatch.matchFragment(t);else{let n=this.type.contentMatch,r;return(r=n.findWrapping(e.type))?(this.match=n,r):null}}return this.match.findWrapping(e.type)}finish(e){if(!(1&this.options)){let t=this.content[this.content.length-1],n;t&&t.isText&&(n=/[ \t\r\n\u000c]+$/.exec(t.text))&&(t.text.length==n[0].length?this.content.pop():this.content[this.content.length-1]=t.withText(t.text.slice(0,t.text.length-n[0].length)))}let r=GR.from(this.content);return!e&&this.match&&(r=r.append(this.match.fillBefore(GR.empty,!0))),this.type?this.type.create(this.attrs,r,this.marks):r}popFromStashMark(e){for(let t=this.stashMarks.length-1;t>=0;t--)if(e.eq(this.stashMarks[t]))return this.stashMarks.splice(t,1)[0]}applyPending(e){for(let t=0,n=this.pendingMarks;t<n.length;t++){let r=n[t];(this.type?this.type.allowsMarkType(r.type):$A(r.type,e))&&!r.isInSet(this.activeMarks)&&(this.activeMarks=r.addToSet(this.activeMarks),this.pendingMarks=r.removeFromSet(this.pendingMarks))}}inlineContext(e){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:e.parentNode&&!$a.hasOwnProperty(e.parentNode.nodeName.toLowerCase())}}class $d{constructor(e,t,n){this.parser=e,this.options=t,this.isOpen=n,this.open=0;let r=t.topNode,i,o=$l(null,t.preserveWhitespace,0)|(n?4:0);i=r?new $c(r.type,r.attrs,GF.none,GF.none,!0,t.topMatch||r.type.contentMatch,o):n?new $c(null,null,GF.none,GF.none,!0,null,o):new $c(e.schema.topNodeType,null,GF.none,GF.none,!0,null,o),this.nodes=[i],this.find=t.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(e){if(3==e.nodeType)this.addTextNode(e);else if(1==e.nodeType){let t=e.getAttribute("style");if(t){let n=this.readStyles(function(e){let t=/\s*([\w-]+)\s*:\s*([^;]+)/g,n,r=[];for(;n=t.exec(e);)r.push(n[1],n[2].trim());return r}(t));if(!n)return;let[r,i]=n,o=this.top;for(let a=0;a<i.length;a++)this.removePendingMark(i[a],o);for(let u=0;u<r.length;u++)this.addPendingMark(r[u]);this.addElement(e);for(let s=0;s<r.length;s++)this.removePendingMark(r[s],o);for(let l=0;l<i.length;l++)this.addPendingMark(i[l])}else this.addElement(e)}}addTextNode(e){let t=e.nodeValue,n=this.top;if(2&n.options||n.inlineContext(e)||/[^ \t\r\n\u000c]/.test(t)){if(1&n.options)t=2&n.options?t.replace(/\r\n?/g,`
9
- `):t.replace(/\r?\n|\r/g," ");else if(t=t.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(t)&&this.open==this.nodes.length-1){let r=n.content[n.content.length-1],i=e.previousSibling;(!r||i&&"BR"==i.nodeName||r.isText&&/[ \t\r\n\u000c]$/.test(r.text))&&(t=t.slice(1))}t&&this.insertNode(this.parser.schema.text(t)),this.findInText(e)}else this.findInside(e)}addElement(e,t){let n=e.nodeName.toLowerCase(),r;$s.hasOwnProperty(n)&&this.parser.normalizeLists&&function(e){for(let t=e.firstChild,n=null;t;t=t.nextSibling){let r=1==t.nodeType?t.nodeName.toLowerCase():null;r&&$s.hasOwnProperty(r)&&n?(n.appendChild(t),t=n):"li"==r?n=t:r&&(n=null)}}(e);let i=this.options.ruleFromNode&&this.options.ruleFromNode(e)||(r=this.parser.matchTag(e,this,t));if(i?i.ignore:$u.hasOwnProperty(n))this.findInside(e),this.ignoreFallback(e);else if(!i||i.skip||i.closeParent){i&&i.closeParent?this.open=Math.max(0,this.open-1):i&&i.skip.nodeType&&(e=i.skip);let o,a=this.top,u=this.needsBlock;if($a.hasOwnProperty(n))a.content.length&&a.content[0].isInline&&this.open&&(this.open--,a=this.top),o=!0,a.type||(this.needsBlock=!0);else if(!e.firstChild){this.leafFallback(e);return}this.addAll(e),o&&this.sync(a),this.needsBlock=u}else this.addElementByRule(e,i,!1===i.consuming?r:void 0)}leafFallback(e){"BR"==e.nodeName&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(e.ownerDocument.createTextNode(`
10
- `))}ignoreFallback(e){"BR"!=e.nodeName||this.top.type&&this.top.type.inlineContent||this.findPlace(this.parser.schema.text("-"))}readStyles(e){let t=GF.none,n=GF.none;e:for(let r=0;r<e.length;r+=2)for(let i;;){let o=this.parser.matchStyle(e[r],e[r+1],this,i);if(!o)continue e;if(o.ignore)return null;if(o.clearMark?this.top.pendingMarks.forEach(e=>{o.clearMark(e)&&(n=e.addToSet(n))}):t=this.parser.schema.marks[o.mark].create(o.attrs).addToSet(t),!1===o.consuming)i=o;else break}return[t,n]}addElementByRule(e,t,n){let r,i,o;t.node?(i=this.parser.schema.nodes[t.node]).isLeaf?this.insertNode(i.create(t.attrs))||this.leafFallback(e):r=this.enter(i,t.attrs||null,t.preserveWhitespace):(o=this.parser.schema.marks[t.mark].create(t.attrs),this.addPendingMark(o));let a=this.top;if(i&&i.isLeaf)this.findInside(e);else if(n)this.addElement(e,n);else if(t.getContent)this.findInside(e),t.getContent(e,this.parser.schema).forEach(e=>this.insertNode(e));else{let u=e;"string"==typeof t.contentElement?u=e.querySelector(t.contentElement):"function"==typeof t.contentElement?u=t.contentElement(e):t.contentElement&&(u=t.contentElement),this.findAround(e,u,!0),this.addAll(u)}r&&this.sync(a)&&this.open--,o&&this.removePendingMark(o,a)}addAll(e,t,n){let r=t||0;for(let i=t?e.childNodes[t]:e.firstChild,o=null==n?null:e.childNodes[n];i!=o;i=i.nextSibling,++r)this.findAtPoint(e,r),this.addDOM(i);this.findAtPoint(e,r)}findPlace(e){let t,n;for(let r=this.open;r>=0;r--){let i=this.nodes[r],o=i.findWrapping(e);if(o&&(!t||t.length>o.length)&&(t=o,n=i,!o.length)||i.solid)break}if(!t)return!1;this.sync(n);for(let a=0;a<t.length;a++)this.enterInner(t[a],null,!1);return!0}insertNode(e){if(e.isInline&&this.needsBlock&&!this.top.type){let t=this.textblockFromContext();t&&this.enterInner(t)}if(this.findPlace(e)){this.closeExtra();let n=this.top;n.applyPending(e.type),n.match&&(n.match=n.match.matchType(e.type));let r=n.activeMarks;for(let i=0;i<e.marks.length;i++)(!n.type||n.type.allowsMarkType(e.marks[i].type))&&(r=e.marks[i].addToSet(r));return n.content.push(e.mark(r)),!0}return!1}enter(e,t,n){let r=this.findPlace(e.create(t));return r&&this.enterInner(e,t,!0,n),r}enterInner(e,t=null,n=!1,r){this.closeExtra();let i=this.top;i.applyPending(e),i.match=i.match&&i.match.matchType(e);let o=$l(e,r,i.options);4&i.options&&0==i.content.length&&(o|=4),this.nodes.push(new $c(e,t,i.activeMarks,i.pendingMarks,n,null,o)),this.open++}closeExtra(e=!1){let t=this.nodes.length-1;if(t>this.open){for(;t>this.open;t--)this.nodes[t-1].content.push(this.nodes[t].finish(e));this.nodes.length=this.open+1}}finish(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(this.isOpen||this.options.topOpen)}sync(e){for(let t=this.open;t>=0;t--)if(this.nodes[t]==e)return this.open=t,!0;return!1}get currentPos(){this.closeExtra();let e=0;for(let t=this.open;t>=0;t--){let n=this.nodes[t].content;for(let r=n.length-1;r>=0;r--)e+=n[r].nodeSize;t&&e++}return e}findAtPoint(e,t){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].node==e&&this.find[n].offset==t&&(this.find[n].pos=this.currentPos)}findInside(e){if(this.find)for(let t=0;t<this.find.length;t++)null==this.find[t].pos&&1==e.nodeType&&e.contains(this.find[t].node)&&(this.find[t].pos=this.currentPos)}findAround(e,t,n){if(e!=t&&this.find)for(let r=0;r<this.find.length;r++)null==this.find[r].pos&&1==e.nodeType&&e.contains(this.find[r].node)&&t.compareDocumentPosition(this.find[r].node)&(n?2:4)&&(this.find[r].pos=this.currentPos)}findInText(e){if(this.find)for(let t=0;t<this.find.length;t++)this.find[t].node==e&&(this.find[t].pos=this.currentPos-(e.nodeValue.length-this.find[t].offset))}matchesContext(e){if(e.indexOf("|")>-1)return e.split(/\s*\|\s*/).some(this.matchesContext,this);let t=e.split("/"),n=this.options.context,r=!this.isOpen&&(!n||n.parent.type==this.nodes[0].type),i=-(n?n.depth+1:0)+(r?0:1),o=(e,a)=>{for(;e>=0;e--){let u=t[e];if(""==u){if(e==t.length-1||0==e)continue;for(;a>=i;a--)if(o(e-1,a))return!0;return!1}{let s=a>0||0==a&&r?this.nodes[a].type:n&&a>=i?n.node(a-i).type:null;if(!s||s.name!=u&&-1==s.groups.indexOf(u))return!1;a--}}return!0};return o(t.length-1,this.open)}textblockFromContext(){let e=this.options.context;if(e)for(let t=e.depth;t>=0;t--){let n=e.node(t).contentMatchAt(e.indexAfter(t)).defaultType;if(n&&n.isTextblock&&n.defaultAttrs)return n}for(let r in this.parser.schema.nodes){let i=this.parser.schema.nodes[r];if(i.isTextblock&&i.defaultAttrs)return i}}addPendingMark(e){let t=function(e,t){for(let n=0;n<t.length;n++)if(e.eq(t[n]))return t[n]}(e,this.top.pendingMarks);t&&this.top.stashMarks.push(t),this.top.pendingMarks=e.addToSet(this.top.pendingMarks)}removePendingMark(e,t){for(let n=this.open;n>=0;n--){let r=this.nodes[n];if(r.pendingMarks.lastIndexOf(e)>-1)r.pendingMarks=e.removeFromSet(r.pendingMarks);else{r.activeMarks=e.removeFromSet(r.activeMarks);let i=r.popFromStashMark(e);i&&r.type&&r.type.allowsMarkType(i.type)&&(r.activeMarks=i.addToSet(r.activeMarks))}if(r==t)break}}}function $f(e,t){return(e.matches||e.msMatchesSelector||e.webkitMatchesSelector||e.mozMatchesSelector).call(e,t)}function $p(e){let t={};for(let n in e)t[n]=e[n];return t}function $A(e,t){let n=t.schema.nodes;for(let r in n){let i=n[r];if(!i.allowsMarkType(e))continue;let o=[],a=e=>{o.push(e);for(let n=0;n<e.edgeCount;n++){let{type:r,next:i}=e.edge(n);if(r==t||0>o.indexOf(i)&&a(i))return!0}};if(a(i.contentMatch))return!0}}class $h{constructor(e,t){this.nodes=e,this.marks=t}serializeFragment(e,t={},n){n||(n=$g(t).createDocumentFragment());let r=n,i=[];return e.forEach(e=>{if(i.length||e.marks.length){let n=0,o=0;for(;n<i.length&&o<e.marks.length;){let a=e.marks[o];if(!this.marks[a.type.name]){o++;continue}if(!a.eq(i[n][0])||!1===a.type.spec.spanning)break;n++,o++}for(;n<i.length;)r=i.pop()[1];for(;o<e.marks.length;){let u=e.marks[o++],s=this.serializeMark(u,e.isInline,t);s&&(i.push([u,r]),r.appendChild(s.dom),r=s.contentDOM||s.dom)}}r.appendChild(this.serializeNodeInner(e,t))}),n}serializeNodeInner(e,t){let{dom:n,contentDOM:r}=$h.renderSpec($g(t),this.nodes[e.type.name](e));if(r){if(e.isLeaf)throw RangeError("Content hole not allowed in a leaf node spec");this.serializeFragment(e.content,t,r)}return n}serializeNode(e,t={}){let n=this.serializeNodeInner(e,t);for(let r=e.marks.length-1;r>=0;r--){let i=this.serializeMark(e.marks[r],e.isInline,t);i&&((i.contentDOM||i.dom).appendChild(n),n=i.dom)}return n}serializeMark(e,t,n={}){let r=this.marks[e.type.name];return r&&$h.renderSpec($g(n),r(e,t))}static renderSpec(e,t,n=null){if("string"==typeof t)return{dom:e.createTextNode(t)};if(null!=t.nodeType)return{dom:t};if(t.dom&&null!=t.dom.nodeType)return t;let r=t[0],i=r.indexOf(" ");i>0&&(n=r.slice(0,i),r=r.slice(i+1));let o,a=n?e.createElementNS(n,r):e.createElement(r),u=t[1],s=1;if(u&&"object"==typeof u&&null==u.nodeType&&!Array.isArray(u)){for(let l in s=2,u)if(null!=u[l]){let c=l.indexOf(" ");c>0?a.setAttributeNS(l.slice(0,c),l.slice(c+1),u[l]):a.setAttribute(l,u[l])}}for(let d=s;d<t.length;d++){let f=t[d];if(0===f){if(d<t.length-1||d>s)throw RangeError("Content hole must be the only child of its parent node");return{dom:a,contentDOM:a}}{let{dom:p,contentDOM:A}=$h.renderSpec(e,f,n);if(a.appendChild(p),A){if(o)throw RangeError("Multiple content holes");o=A}}}return{dom:a,contentDOM:o}}static fromSchema(e){return e.cached.domSerializer||(e.cached.domSerializer=new $h(this.nodesFromSchema(e),this.marksFromSchema(e)))}static nodesFromSchema(e){let t=$m(e.nodes);return t.text||(t.text=e=>e.text),t}static marksFromSchema(e){return $m(e.marks)}}function $m(e){let t={};for(let n in e){let r=e[n].spec.toDOM;r&&(t[n]=r)}return t}function $g(e){return e.document||window.document}function $y(e,t){return e+65536*t}function $v(e){return 65535&e}let $x=class{constructor(e,t,n){this.pos=e,this.delInfo=t,this.recover=n}get deleted(){return(8&this.delInfo)>0}get deletedBefore(){return(5&this.delInfo)>0}get deletedAfter(){return(6&this.delInfo)>0}get deletedAcross(){return(4&this.delInfo)>0}},$b=class e{constructor(t,n=!1){if(this.ranges=t,this.inverted=n,!t.length&&e.empty)return e.empty}recover(e){var t;let n=0,r=$v(e);if(!this.inverted)for(let i=0;i<r;i++)n+=this.ranges[3*i+2]-this.ranges[3*i+1];return this.ranges[3*r]+n+(e-(65535&e))/65536}mapResult(e,t=1){return this._map(e,t,!1)}map(e,t=1){return this._map(e,t,!0)}_map(e,t,n){let r=0,i=this.inverted?2:1,o=this.inverted?1:2;for(let a=0;a<this.ranges.length;a+=3){let u=this.ranges[a]-(this.inverted?r:0);if(u>e)break;let s=this.ranges[a+i],l=this.ranges[a+o],c=u+s;if(e<=c){let d=s?e==u?-1:e==c?1:t:t,f=u+r+(d<0?0:l);if(n)return f;let p=e==(t<0?u:c)?null:$y(a/3,e-u),A=e==u?2:e==c?1:4;return(t<0?e!=u:e!=c)&&(A|=8),new $x(f,A,p)}r+=l-s}return n?e+r:new $x(e+r,0,null)}touches(e,t){let n=0,r=$v(t),i=this.inverted?2:1,o=this.inverted?1:2;for(let a=0;a<this.ranges.length;a+=3){let u=this.ranges[a]-(this.inverted?n:0);if(u>e)break;let s=this.ranges[a+i];if(e<=u+s&&a==3*r)return!0;n+=this.ranges[a+o]-s}return!1}forEach(e){let t=this.inverted?2:1,n=this.inverted?1:2;for(let r=0,i=0;r<this.ranges.length;r+=3){let o=this.ranges[r],a=o-(this.inverted?i:0),u=o+(this.inverted?0:i),s=this.ranges[r+t],l=this.ranges[r+n];e(a,a+s,u,u+l),i+=l-s}}invert(){return new e(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(t){return 0==t?e.empty:new e(t<0?[0,-t,0]:[0,0,t])}};$b.empty=new $b([]);class $C{constructor(e=[],t,n=0,r=e.length){this.maps=e,this.mirror=t,this.from=n,this.to=r}slice(e=0,t=this.maps.length){return new $C(this.maps,this.mirror,e,t)}copy(){return new $C(this.maps.slice(),this.mirror&&this.mirror.slice(),this.from,this.to)}appendMap(e,t){this.to=this.maps.push(e),null!=t&&this.setMirror(this.maps.length-1,t)}appendMapping(e){for(let t=0,n=this.maps.length;t<e.maps.length;t++){let r=e.getMirror(t);this.appendMap(e.maps[t],null!=r&&r<t?n+r:void 0)}}getMirror(e){if(this.mirror){for(let t=0;t<this.mirror.length;t++)if(this.mirror[t]==e)return this.mirror[t+(t%2?-1:1)]}}setMirror(e,t){this.mirror||(this.mirror=[]),this.mirror.push(e,t)}appendMappingInverted(e){for(let t=e.maps.length-1,n=this.maps.length+e.maps.length;t>=0;t--){let r=e.getMirror(t);this.appendMap(e.maps[t].invert(),null!=r&&r>t?n-r-1:void 0)}}invert(){let e=new $C;return e.appendMappingInverted(this),e}map(e,t=1){if(this.mirror)return this._map(e,t,!0);for(let n=this.from;n<this.to;n++)e=this.maps[n].map(e,t);return e}mapResult(e,t=1){return this._map(e,t,!1)}_map(e,t,n){let r=0;for(let i=this.from;i<this.to;i++){let o=this.maps[i].mapResult(e,t);if(null!=o.recover){let a=this.getMirror(i);if(null!=a&&a>i&&a<this.to){i=a,e=this.maps[a].recover(o.recover);continue}}r|=o.delInfo,e=o.pos}return n?e:new $x(e,r,null)}}let $S=Object.create(null),$w=class{getMap(){return $b.empty}merge(e){return null}static fromJSON(e,t){if(!t||!t.stepType)throw RangeError("Invalid input for Step.fromJSON");let n=$S[t.stepType];if(!n)throw RangeError(`No step type ${t.stepType} defined`);return n.fromJSON(e,t)}static jsonID(e,t){if(e in $S)throw RangeError("Duplicate use of step JSON ID "+e);return $S[e]=t,t.prototype.jsonID=e,t}},$I=class e{constructor(e,t){this.doc=e,this.failed=t}static ok(t){return new e(t,null)}static fail(t){return new e(null,t)}static fromReplace(t,n,r,i){try{return e.ok(t.replace(n,r,i))}catch(o){if(o instanceof Gj)return e.fail(o.message);throw o}}};function $_(e,t,n){let r=[];for(let i=0;i<e.childCount;i++){let o=e.child(i);o.content.size&&(o=o.copy($_(o.content,t,o))),o.isInline&&(o=t(o,n,i)),r.push(o)}return GR.fromArray(r)}let $T=class e extends $w{constructor(e,t,n){super(),this.from=e,this.to=t,this.mark=n}apply(e){let t=e.slice(this.from,this.to),n=e.resolve(this.from),r=n.node(n.sharedDepth(this.to)),i=new GU($_(t.content,(e,t)=>e.isAtom&&t.type.allowsMarkType(this.mark.type)?e.mark(this.mark.addToSet(e.marks)):e,r),t.openStart,t.openEnd);return $I.fromReplace(e,this.from,this.to,i)}invert(){return new $O(this.from,this.to,this.mark)}map(t){let n=t.mapResult(this.from,1),r=t.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new e(n.pos,r.pos,this.mark)}merge(t){return t instanceof e&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from?new e(Math.min(this.from,t.from),Math.max(this.to,t.to),this.mark):null}toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(t,n){if("number"!=typeof n.from||"number"!=typeof n.to)throw RangeError("Invalid input for AddMarkStep.fromJSON");return new e(n.from,n.to,t.markFromJSON(n.mark))}};$w.jsonID("addMark",$T);let $O=class e extends $w{constructor(e,t,n){super(),this.from=e,this.to=t,this.mark=n}apply(e){let t=e.slice(this.from,this.to),n=new GU($_(t.content,e=>e.mark(this.mark.removeFromSet(e.marks)),e),t.openStart,t.openEnd);return $I.fromReplace(e,this.from,this.to,n)}invert(){return new $T(this.from,this.to,this.mark)}map(t){let n=t.mapResult(this.from,1),r=t.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new e(n.pos,r.pos,this.mark)}merge(t){return t instanceof e&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from?new e(Math.min(this.from,t.from),Math.max(this.to,t.to),this.mark):null}toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(t,n){if("number"!=typeof n.from||"number"!=typeof n.to)throw RangeError("Invalid input for RemoveMarkStep.fromJSON");return new e(n.from,n.to,t.markFromJSON(n.mark))}};$w.jsonID("removeMark",$O);let $R=class e extends $w{constructor(e,t){super(),this.pos=e,this.mark=t}apply(e){let t=e.nodeAt(this.pos);if(!t)return $I.fail("No node at mark step's position");let n=t.type.create(t.attrs,null,this.mark.addToSet(t.marks));return $I.fromReplace(e,this.pos,this.pos+1,new GU(GR.from(n),0,t.isLeaf?0:1))}invert(t){let n=t.nodeAt(this.pos);if(n){let r=this.mark.addToSet(n.marks);if(r.length==n.marks.length){for(let i=0;i<n.marks.length;i++)if(!n.marks[i].isInSet(r))return new e(this.pos,n.marks[i]);return new e(this.pos,this.mark)}}return new $k(this.pos,this.mark)}map(t){let n=t.mapResult(this.pos,1);return n.deletedAfter?null:new e(n.pos,this.mark)}toJSON(){return{stepType:"addNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(t,n){if("number"!=typeof n.pos)throw RangeError("Invalid input for AddNodeMarkStep.fromJSON");return new e(n.pos,t.markFromJSON(n.mark))}};$w.jsonID("addNodeMark",$R);let $k=class e extends $w{constructor(e,t){super(),this.pos=e,this.mark=t}apply(e){let t=e.nodeAt(this.pos);if(!t)return $I.fail("No node at mark step's position");let n=t.type.create(t.attrs,null,this.mark.removeFromSet(t.marks));return $I.fromReplace(e,this.pos,this.pos+1,new GU(GR.from(n),0,t.isLeaf?0:1))}invert(e){let t=e.nodeAt(this.pos);return t&&this.mark.isInSet(t.marks)?new $R(this.pos,this.mark):this}map(t){let n=t.mapResult(this.pos,1);return n.deletedAfter?null:new e(n.pos,this.mark)}toJSON(){return{stepType:"removeNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(t,n){if("number"!=typeof n.pos)throw RangeError("Invalid input for RemoveNodeMarkStep.fromJSON");return new e(n.pos,t.markFromJSON(n.mark))}};$w.jsonID("removeNodeMark",$k);let $E=class e extends $w{constructor(e,t,n,r=!1){super(),this.from=e,this.to=t,this.slice=n,this.structure=r}apply(e){return this.structure&&$F(e,this.from,this.to)?$I.fail("Structure replace would overwrite content"):$I.fromReplace(e,this.from,this.to,this.slice)}getMap(){return new $b([this.from,this.to-this.from,this.slice.size])}invert(t){return new e(this.from,this.from+this.slice.size,t.slice(this.from,this.to))}map(t){let n=t.mapResult(this.from,1),r=t.mapResult(this.to,-1);return n.deletedAcross&&r.deletedAcross?null:new e(n.pos,Math.max(n.pos,r.pos),this.slice)}merge(t){if(!(t instanceof e)||t.structure||this.structure)return null;if(this.from+this.slice.size!=t.from||this.slice.openEnd||t.slice.openStart){if(t.to!=this.from||this.slice.openStart||t.slice.openEnd)return null;{let n=this.slice.size+t.slice.size==0?GU.empty:new GU(t.slice.content.append(this.slice.content),t.slice.openStart,this.slice.openEnd);return new e(t.from,this.to,n,this.structure)}}{let r=this.slice.size+t.slice.size==0?GU.empty:new GU(this.slice.content.append(t.slice.content),this.slice.openStart,t.slice.openEnd);return new e(this.from,this.to+(t.to-t.from),r,this.structure)}}toJSON(){let e={stepType:"replace",from:this.from,to:this.to};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(t,n){if("number"!=typeof n.from||"number"!=typeof n.to)throw RangeError("Invalid input for ReplaceStep.fromJSON");return new e(n.from,n.to,GU.fromJSON(t,n.slice),!!n.structure)}};$w.jsonID("replace",$E);let $M=class e extends $w{constructor(e,t,n,r,i,o,a=!1){super(),this.from=e,this.to=t,this.gapFrom=n,this.gapTo=r,this.slice=i,this.insert=o,this.structure=a}apply(e){if(this.structure&&($F(e,this.from,this.gapFrom)||$F(e,this.gapTo,this.to)))return $I.fail("Structure gap-replace would overwrite content");let t=e.slice(this.gapFrom,this.gapTo);if(t.openStart||t.openEnd)return $I.fail("Gap is not a flat range");let n=this.slice.insertAt(this.insert,t.content);return n?$I.fromReplace(e,this.from,this.to,n):$I.fail("Content does not fit in gap")}getMap(){return new $b([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])}invert(t){let n=this.gapTo-this.gapFrom;return new e(this.from,this.from+this.slice.size+n,this.from+this.insert,this.from+this.insert+n,t.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)}map(t){let n=t.mapResult(this.from,1),r=t.mapResult(this.to,-1),i=t.map(this.gapFrom,-1),o=t.map(this.gapTo,1);return n.deletedAcross&&r.deletedAcross||i<n.pos||o>r.pos?null:new e(n.pos,r.pos,i,o,this.slice,this.insert,this.structure)}toJSON(){let e={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(t,n){if("number"!=typeof n.from||"number"!=typeof n.to||"number"!=typeof n.gapFrom||"number"!=typeof n.gapTo||"number"!=typeof n.insert)throw RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new e(n.from,n.to,n.gapFrom,n.gapTo,GU.fromJSON(t,n.slice),n.insert,!!n.structure)}};function $F(e,t,n){let r=e.resolve(t),i=n-t,o=r.depth;for(;i>0&&o>0&&r.indexAfter(o)==r.node(o).childCount;)o--,i--;if(i>0){let a=r.node(o).maybeChild(r.indexAfter(o));for(;i>0;){if(!a||a.isLeaf)return!0;a=a.firstChild,i--}}return!1}function $j(e,t,n){return(0==t||e.canReplace(t,e.childCount))&&(n==e.childCount||e.canReplace(0,n))}function $U(e){let t=e.parent.content.cutByIndex(e.startIndex,e.endIndex);for(let n=e.depth;;--n){let r=e.$from.node(n),i=e.$from.index(n),o=e.$to.indexAfter(n);if(n<e.depth&&r.canReplace(i,o,t))return n;if(0==n||r.type.spec.isolating||!$j(r,i,o))break}return null}function $K(e,t,n=null,r=e){let i=function(e,t){let{parent:n,startIndex:r,endIndex:i}=e,o=n.contentMatchAt(r).findWrapping(t);if(!o)return null;let a=o.length?o[0]:t;return n.canReplaceWith(r,i,a)?o:null}(e,t),o=i&&function(e,t){let{parent:n,startIndex:r,endIndex:i}=e,o=n.child(r),a=t.contentMatch.findWrapping(o.type);if(!a)return null;let u=(a.length?a[a.length-1]:t).contentMatch;for(let s=r;u&&s<i;s++)u=u.matchType(n.child(s).type);return u&&u.validEnd?a:null}(r,t);return o?i.map($L).concat({type:t,attrs:n}).concat(o.map($L)):null}function $L(e){return{type:e,attrs:null}}function $B(e,t,n=1,r){let i=e.resolve(t),o=i.depth-n,a=r&&r[r.length-1]||i.parent;if(o<0||i.parent.type.spec.isolating||!i.parent.canReplace(i.index(),i.parent.childCount)||!a.type.validContent(i.parent.content.cutByIndex(i.index(),i.parent.childCount)))return!1;for(let u=i.depth-1,s=n-2;u>o;u--,s--){let l=i.node(u),c=i.index(u);if(l.type.spec.isolating)return!1;let d=l.content.cutByIndex(c,l.childCount),f=r&&r[s+1];f&&(d=d.replaceChild(0,f.type.create(f.attrs)));let p=r&&r[s]||l;if(!l.canReplace(c+1,l.childCount)||!p.type.validContent(d))return!1}let A=i.indexAfter(o),h=r&&r[0];return i.node(o).canReplaceWith(A,A,h?h.type:i.node(o+1).type)}function $P(e,t){let n=e.resolve(t),r=n.index();return $W(n.nodeBefore,n.nodeAfter)&&n.parent.canReplace(r,r+1)}function $W(e,t){return!!(e&&t&&!e.isLeaf&&e.canAppend(t))}function $D(e,t,n=-1){let r=e.resolve(t);for(let i=r.depth;;i--){let o,a,u=r.index(i);if(i==r.depth?(o=r.nodeBefore,a=r.nodeAfter):n>0?(o=r.node(i+1),u++,a=r.node(i).maybeChild(u)):(o=r.node(i).maybeChild(u-1),a=r.node(i+1)),o&&!o.isTextblock&&$W(o,a)&&r.node(i).canReplace(u,u+1))return t;if(0==i)break;t=n<0?r.before(i):r.after(i)}}function $N(e,t,n=t,r=GU.empty){var i,o,a;if(t==n&&!r.size)return null;let u=e.resolve(t),s=e.resolve(n);return(i=u,o=s,a=r,!a.openStart&&!a.openEnd&&i.start()==o.start()&&i.parent.canReplace(i.index(),o.index(),a.content))?new $E(t,n,r):new $q(u,s,r).fit()}$w.jsonID("replaceAround",$M);class $q{constructor(e,t,n){this.$from=e,this.$to=t,this.unplaced=n,this.frontier=[],this.placed=GR.empty;for(let r=0;r<=e.depth;r++){let i=e.node(r);this.frontier.push({type:i.type,match:i.contentMatchAt(e.indexAfter(r))})}for(let o=e.depth;o>0;o--)this.placed=GR.from(e.node(o).copy(this.placed))}get depth(){return this.frontier.length-1}fit(){for(;this.unplaced.size;){let e=this.findFittable();e?this.placeNodes(e):this.openMore()||this.dropNode()}let t=this.mustMoveInline(),n=this.placed.size-this.depth-this.$from.depth,r=this.$from,i=this.close(t<0?this.$to:r.doc.resolve(t));if(!i)return null;let o=this.placed,a=r.depth,u=i.depth;for(;a&&u&&1==o.childCount;)o=o.firstChild.content,a--,u--;let s=new GU(o,a,u);return t>-1?new $M(r.pos,t,this.$to.pos,this.$to.end(),s,n):s.size||r.pos!=this.$to.pos?new $E(r.pos,i.pos,s):null}findFittable(){let e=this.unplaced.openStart;for(let t=this.unplaced.content,n=0,r=this.unplaced.openEnd;n<e;n++){let i=t.firstChild;if(t.childCount>1&&(r=0),i.type.spec.isolating&&r<=n){e=n;break}t=i.content}for(let o=1;o<=2;o++)for(let a=1==o?e:this.unplaced.openStart;a>=0;a--){let u,s=null,l=(a?(s=$z(this.unplaced.content,a-1).firstChild).content:this.unplaced.content).firstChild;for(let c=this.depth;c>=0;c--){let{type:d,match:f}=this.frontier[c],p,A=null;if(1==o&&(l?f.matchType(l.type)||(A=f.fillBefore(GR.from(l),!1)):s&&d.compatibleContent(s.type)))return{sliceDepth:a,frontierDepth:c,parent:s,inject:A};if(2==o&&l&&(p=f.findWrapping(l.type)))return{sliceDepth:a,frontierDepth:c,parent:s,wrap:p};if(s&&f.matchType(s.type))break}}}openMore(){let{content:e,openStart:t,openEnd:n}=this.unplaced,r=$z(e,t);return!!r.childCount&&!r.firstChild.isLeaf&&(this.unplaced=new GU(e,t+1,Math.max(n,r.size+t>=e.size-n?t+1:0)),!0)}dropNode(){let{content:e,openStart:t,openEnd:n}=this.unplaced,r=$z(e,t);if(r.childCount<=1&&t>0){let i=e.size-t<=t+r.size;this.unplaced=new GU($Q(e,t-1,1),t-1,i?t-1:n)}else this.unplaced=new GU($Q(e,t,1),t,n)}placeNodes({sliceDepth:e,frontierDepth:t,parent:n,inject:r,wrap:i}){for(;this.depth>t;)this.closeFrontierNode();if(i)for(let o=0;o<i.length;o++)this.openFrontierNode(i[o]);let a=this.unplaced,u=n?n.content:a.content,s=a.openStart-e,l=0,c=[],{match:d,type:f}=this.frontier[t];if(r){for(let p=0;p<r.childCount;p++)c.push(r.child(p));d=d.matchFragment(r)}let A=u.size+e-(a.content.size-a.openEnd);for(;l<u.childCount;){let h=u.child(l),m=d.matchType(h.type);if(!m)break;(++l>1||0==s||h.content.size)&&(d=m,c.push($Y(h.mark(f.allowedMarks(h.marks)),1==l?s:0,l==u.childCount?A:-1)))}let g=l==u.childCount;g||(A=-1),this.placed=$V(this.placed,t,GR.from(c)),this.frontier[t].match=d,g&&A<0&&n&&n.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(let y=0,v=u;y<A;y++){let x=v.lastChild;this.frontier.push({type:x.type,match:x.contentMatchAt(x.childCount)}),v=x.content}this.unplaced=g?0==e?GU.empty:new GU($Q(a.content,e-1,1),e-1,A<0?a.openEnd:e-1):new GU($Q(a.content,e,l),a.openStart,a.openEnd)}mustMoveInline(){if(!this.$to.parent.isTextblock)return -1;let e=this.frontier[this.depth],t;if(!e.type.isTextblock||!$H(this.$to,this.$to.depth,e.type,e.match,!1)||this.$to.depth==this.depth&&(t=this.findCloseLevel(this.$to))&&t.depth==this.depth)return -1;let{depth:n}=this.$to,r=this.$to.after(n);for(;n>1&&r==this.$to.end(--n);)++r;return r}findCloseLevel(e){e:for(let t=Math.min(this.depth,e.depth);t>=0;t--){let{match:n,type:r}=this.frontier[t],i=t<e.depth&&e.end(t+1)==e.pos+(e.depth-(t+1)),o=$H(e,t,r,n,i);if(o){for(let a=t-1;a>=0;a--){let{match:u,type:s}=this.frontier[a],l=$H(e,a,s,u,!0);if(!l||l.childCount)continue e}return{depth:t,fit:o,move:i?e.doc.resolve(e.after(t+1)):e}}}}close(e){let t=this.findCloseLevel(e);if(!t)return null;for(;this.depth>t.depth;)this.closeFrontierNode();t.fit.childCount&&(this.placed=$V(this.placed,t.depth,t.fit)),e=t.move;for(let n=t.depth+1;n<=e.depth;n++){let r=e.node(n),i=r.type.contentMatch.fillBefore(r.content,!0,e.index(n));this.openFrontierNode(r.type,r.attrs,i)}return e}openFrontierNode(e,t=null,n){let r=this.frontier[this.depth];r.match=r.match.matchType(e),this.placed=$V(this.placed,this.depth,GR.from(e.create(t,n))),this.frontier.push({type:e,match:e.contentMatch})}closeFrontierNode(){let e=this.frontier.pop().match.fillBefore(GR.empty,!0);e.childCount&&(this.placed=$V(this.placed,this.frontier.length,e))}}function $Q(e,t,n){return 0==t?e.cutByIndex(n,e.childCount):e.replaceChild(0,e.firstChild.copy($Q(e.firstChild.content,t-1,n)))}function $V(e,t,n){return 0==t?e.append(n):e.replaceChild(e.childCount-1,e.lastChild.copy($V(e.lastChild.content,t-1,n)))}function $z(e,t){for(let n=0;n<t;n++)e=e.firstChild.content;return e}function $Y(e,t,n){if(t<=0)return e;let r=e.content;return t>1&&(r=r.replaceChild(0,$Y(r.firstChild,t-1,1==r.childCount?n-1:0))),t>0&&(r=e.type.contentMatch.fillBefore(r).append(r),n<=0&&(r=r.append(e.type.contentMatch.matchFragment(r).fillBefore(GR.empty,!0)))),e.copy(r)}function $H(e,t,n,r,i){let o=e.node(t),a=i?e.indexAfter(t):e.index(t);if(a==o.childCount&&!n.compatibleContent(o.type))return null;let u=r.fillBefore(o.content,!0,a);return u&&!function(e,t,n){for(let r=n;r<t.childCount;r++)if(!e.allowsMarks(t.child(r).marks))return!0;return!1}(n,o.content,a)?u:null}let $Z=class e extends $w{constructor(e,t,n){super(),this.pos=e,this.attr=t,this.value=n}apply(e){let t=e.nodeAt(this.pos);if(!t)return $I.fail("No node at attribute step's position");let n=Object.create(null);for(let r in t.attrs)n[r]=t.attrs[r];n[this.attr]=this.value;let i=t.type.create(n,null,t.marks);return $I.fromReplace(e,this.pos,this.pos+1,new GU(GR.from(i),0,t.isLeaf?0:1))}getMap(){return $b.empty}invert(t){return new e(this.pos,this.attr,t.nodeAt(this.pos).attrs[this.attr])}map(t){let n=t.mapResult(this.pos,1);return n.deletedAfter?null:new e(n.pos,this.attr,this.value)}toJSON(){return{stepType:"attr",pos:this.pos,attr:this.attr,value:this.value}}static fromJSON(t,n){if("number"!=typeof n.pos||"string"!=typeof n.attr)throw RangeError("Invalid input for AttrStep.fromJSON");return new e(n.pos,n.attr,n.value)}};$w.jsonID("attr",$Z);let $J=class extends Error{};($J=function e(t){let n=Error.call(this,t);return n.__proto__=e.prototype,n}).prototype=Object.create(Error.prototype),$J.prototype.constructor=$J,$J.prototype.name="TransformError";let $G=Object.create(null);class $${constructor(e,t,n){this.$anchor=e,this.$head=t,this.ranges=n||[new $X(e.min(t),e.max(t))]}get anchor(){return this.$anchor.pos}get head(){return this.$head.pos}get from(){return this.$from.pos}get to(){return this.$to.pos}get $from(){return this.ranges[0].$from}get $to(){return this.ranges[0].$to}get empty(){let e=this.ranges;for(let t=0;t<e.length;t++)if(e[t].$from.pos!=e[t].$to.pos)return!1;return!0}content(){return this.$from.doc.slice(this.from,this.to,!0)}replace(e,t=GU.empty){let n=t.content.lastChild,r=null;for(let i=0;i<t.openEnd;i++)r=n,n=n.lastChild;let o=e.steps.length,a=this.ranges;for(let u=0;u<a.length;u++){let{$from:s,$to:l}=a[u],c=e.mapping.slice(o);e.replaceRange(c.map(s.pos),c.map(l.pos),u?GU.empty:t),0==u&&$8(e,o,(n?n.isInline:r&&r.isTextblock)?-1:1)}}replaceWith(e,t){let n=e.steps.length,r=this.ranges;for(let i=0;i<r.length;i++){let{$from:o,$to:a}=r[i],u=e.mapping.slice(n),s=u.map(o.pos),l=u.map(a.pos);i?e.deleteRange(s,l):(e.replaceRangeWith(s,l,t),$8(e,n,t.isInline?-1:1))}}static findFrom(e,t,n=!1){let r=e.parent.inlineContent?new $2(e):$7(e.node(0),e.parent,e.pos,e.index(),t,n);if(r)return r;for(let i=e.depth-1;i>=0;i--){let o=t<0?$7(e.node(0),e.node(i),e.before(i+1),e.index(i),t,n):$7(e.node(0),e.node(i),e.after(i+1),e.index(i)+1,t,n);if(o)return o}return null}static near(e,t=1){return this.findFrom(e,t)||this.findFrom(e,-t)||new $9(e.node(0))}static atStart(e){return $7(e,e,0,0,1)||new $9(e)}static atEnd(e){return $7(e,e,e.content.size,e.childCount,-1)||new $9(e)}static fromJSON(e,t){if(!t||!t.type)throw RangeError("Invalid input for Selection.fromJSON");let n=$G[t.type];if(!n)throw RangeError(`No selection type ${t.type} defined`);return n.fromJSON(e,t)}static jsonID(e,t){if(e in $G)throw RangeError("Duplicate use of selection JSON ID "+e);return $G[e]=t,t.prototype.jsonID=e,t}getBookmark(){return $2.between(this.$anchor,this.$head).getBookmark()}}$$.prototype.visible=!0;class $X{constructor(e,t){this.$from=e,this.$to=t}}let $0=!1;function $1(e){$0||e.parent.inlineContent||($0=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+e.parent.type.name+")"))}class $2 extends $${constructor(e,t=e){$1(e),$1(t),super(e,t)}get $cursor(){return this.$anchor.pos==this.$head.pos?this.$head:null}map(e,t){let n=e.resolve(t.map(this.head));if(!n.parent.inlineContent)return $$.near(n);let r=e.resolve(t.map(this.anchor));return new $2(r.parent.inlineContent?r:n,n)}replace(e,t=GU.empty){if(super.replace(e,t),t==GU.empty){let n=this.$from.marksAcross(this.$to);n&&e.ensureMarks(n)}}eq(e){return e instanceof $2&&e.anchor==this.anchor&&e.head==this.head}getBookmark(){return new $6(this.anchor,this.head)}toJSON(){return{type:"text",anchor:this.anchor,head:this.head}}static fromJSON(e,t){if("number"!=typeof t.anchor||"number"!=typeof t.head)throw RangeError("Invalid input for TextSelection.fromJSON");return new $2(e.resolve(t.anchor),e.resolve(t.head))}static create(e,t,n=t){let r=e.resolve(t);return new this(r,n==t?r:e.resolve(n))}static between(e,t,n){let r=e.pos-t.pos;if((!n||r)&&(n=r>=0?1:-1),!t.parent.inlineContent){let i=$$.findFrom(t,n,!0)||$$.findFrom(t,-n,!0);if(!i)return $$.near(t,n);t=i.$head}return e.parent.inlineContent||(0==r?e=t:(e=($$.findFrom(e,-n,!0)||$$.findFrom(e,n,!0)).$anchor).pos<t.pos!=r<0&&(e=t)),new $2(e,t)}}$$.jsonID("text",$2);class $6{constructor(e,t){this.anchor=e,this.head=t}map(e){return new $6(e.map(this.anchor),e.map(this.head))}resolve(e){return $2.between(e.resolve(this.anchor),e.resolve(this.head))}}class $5 extends $${constructor(e){let t=e.nodeAfter;super(e,e.node(0).resolve(e.pos+t.nodeSize)),this.node=t}map(e,t){let{deleted:n,pos:r}=t.mapResult(this.anchor),i=e.resolve(r);return n?$$.near(i):new $5(i)}content(){return new GU(GR.from(this.node),0,0)}eq(e){return e instanceof $5&&e.anchor==this.anchor}toJSON(){return{type:"node",anchor:this.anchor}}getBookmark(){return new $3(this.anchor)}static fromJSON(e,t){if("number"!=typeof t.anchor)throw RangeError("Invalid input for NodeSelection.fromJSON");return new $5(e.resolve(t.anchor))}static create(e,t){return new $5(e.resolve(t))}static isSelectable(e){return!e.isText&&!1!==e.type.spec.selectable}}$5.prototype.visible=!1,$$.jsonID("node",$5);class $3{constructor(e){this.anchor=e}map(e){let{deleted:t,pos:n}=e.mapResult(this.anchor);return t?new $6(n,n):new $3(n)}resolve(e){let t=e.resolve(this.anchor),n=t.nodeAfter;return n&&$5.isSelectable(n)?new $5(t):$$.near(t)}}class $9 extends $${constructor(e){super(e.resolve(0),e.resolve(e.content.size))}replace(e,t=GU.empty){if(t==GU.empty){e.delete(0,e.doc.content.size);let n=$$.atStart(e.doc);n.eq(e.selection)||e.setSelection(n)}else super.replace(e,t)}toJSON(){return{type:"all"}}static fromJSON(e){return new $9(e)}map(e){return new $9(e)}eq(e){return e instanceof $9}getBookmark(){return $4}}$$.jsonID("all",$9);let $4={map(){return this},resolve:e=>new $9(e)};function $7(e,t,n,r,i,o=!1){if(t.inlineContent)return $2.create(e,n);for(let a=r-(i>0?0:1);i>0?a<t.childCount:a>=0;a+=i){let u=t.child(a);if(u.isAtom){if(!o&&$5.isSelectable(u))return $5.create(e,n-(i<0?u.nodeSize:0))}else{let s=$7(e,u,n+i,i<0?u.childCount:0,i,o);if(s)return s}n+=u.nodeSize*i}return null}function $8(e,t,n){let r=e.steps.length-1;if(r<t)return;let i=e.steps[r];if(!(i instanceof $E||i instanceof $M))return;let o;e.mapping.maps[r].forEach((e,t,n,r)=>{null==o&&(o=r)}),e.setSelection($$.near(e.doc.resolve(o),n))}function Xe(e,t){return t&&e?e.bind(t):e}class Xt{constructor(e,t,n){this.name=e,this.init=Xe(t.init,n),this.apply=Xe(t.apply,n)}}new Xt("doc",{init:e=>e.doc||e.schema.topNodeType.createAndFill(),apply:e=>e.doc}),new Xt("selection",{init:(e,t)=>e.selection||$$.atStart(t.doc),apply:e=>e.selection}),new Xt("storedMarks",{init:e=>e.storedMarks||null,apply:(e,t,n,r)=>r.selection.$cursor?e.storedMarks:null}),new Xt("scrollToSelection",{init:()=>0,apply:(e,t)=>e.scrolledIntoView?t+1:t});class Xn{constructor(e){this.spec=e,this.props={},e.props&&function e(t,n,r){for(let i in t){let o=t[i];o instanceof Function?o=o.bind(n):"handleDOMEvents"==i&&(o=e(o,n,{})),r[i]=o}return r}(e.props,this,this.props),this.key=e.key?e.key.key:Xi("plugin")}getState(e){return e[this.key]}}let Xr=Object.create(null);function Xi(e){return e in Xr?e+"$"+ ++Xr[e]:(Xr[e]=0,e+"$")}class Xo{constructor(e="key"){this.key=Xi(e)}get(e){return e.config.pluginsByKey[this.key]}getState(e){return e[this.key]}}let Xa=function(e){for(var t=0;;t++)if(!(e=e.previousSibling))return t},Xu=function(e,t,n,r){return n&&(Xl(e,t,n,r,-1)||Xl(e,t,n,r,1))},Xs=/^(img|br|input|textarea|hr)$/i;function Xl(e,t,n,r,i){for(;;){if(e==n&&t==r)return!0;if(t==(i<0?0:Xc(e))){let o=e.parentNode;if(!o||1!=o.nodeType||Xd(e)||Xs.test(e.nodeName)||"false"==e.contentEditable)return!1;t=Xa(e)+(i<0?0:1),e=o}else{if(1!=e.nodeType||"false"==(e=e.childNodes[t+(i<0?-1:0)]).contentEditable)return!1;t=i<0?Xc(e):0}}}function Xc(e){return 3==e.nodeType?e.nodeValue.length:e.childNodes.length}function Xd(e){let t;for(let n=e;n&&!(t=n.pmViewDesc);n=n.parentNode);return t&&t.node&&t.node.isBlock&&(t.dom==e||t.contentDOM==e)}let Xf=function(e){return e.focusNode&&Xu(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset)};function Xp(e,t){let n=document.createEvent("Event");return n.initEvent("keydown",!0,!0),n.keyCode=e,n.key=n.code=t,n}let XA="u">typeof navigator?navigator:null,Xh="u">typeof document?document:null,Xm=XA&&XA.userAgent||"",Xg=/Edge\/(\d+)/.exec(Xm),Xy=/MSIE \d/.exec(Xm),Xv=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Xm),Xx=!!(Xy||Xv||Xg),Xb=Xy?document.documentMode:Xv?+Xv[1]:Xg?+Xg[1]:0,XC=!Xx&&/gecko\/(\d+)/i.test(Xm);XC&&(/Firefox\/(\d+)/.exec(Xm)||[0,0])[1];let XS=!Xx&&/Chrome\/(\d+)/.exec(Xm),Xw=!!XS,XI=XS?+XS[1]:0,X_=!Xx&&!!XA&&/Apple Computer/.test(XA.vendor),XT=X_&&(/Mobile\/\w+/.test(Xm)||!!XA&&XA.maxTouchPoints>2),XO=XT||!!XA&&/Mac/.test(XA.platform),XR=!!XA&&/Win/.test(XA.platform),Xk=/Android \d/.test(Xm),XE=!!Xh&&"webkitFontSmoothing"in Xh.documentElement.style,XM=XE?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;function XF(e){return e.editable?e.hasFocus():function(e){let t=e.domSelectionRange();if(!t.anchorNode)return!1;try{return e.dom.contains(3==t.anchorNode.nodeType?t.anchorNode.parentNode:t.anchorNode)&&(e.editable||e.dom.contains(3==t.focusNode.nodeType?t.focusNode.parentNode:t.focusNode))}catch{return!1}}(e)&&document.activeElement&&document.activeElement.contains(e.dom)}function Xj(e,t=!1){let n=e.state.selection;if(function(e,t){if(t instanceof $5){let n=e.docView.descAt(t.from);n!=e.lastSelectedViewDesc&&(XP(e),n&&n.selectNode(),e.lastSelectedViewDesc=n)}else XP(e)}(e,n),XF(e)){var r,i;if(!t&&e.input.mouseDown&&e.input.mouseDown.allowDefault&&Xw){let o=e.domSelectionRange(),a=e.domObserver.currentSelection;if(o.anchorNode&&a.anchorNode&&Xu(o.anchorNode,o.anchorOffset,a.anchorNode,a.anchorOffset)){e.input.mouseDown.delayedSelectionSync=!0,e.domObserver.setCurSelection();return}}if(e.domObserver.disconnectSelection(),e.cursorWrapper){let u,s,l,c;r=e,u=r.domSelection(),s=document.createRange(),l=r.cursorWrapper.dom,c="IMG"==l.nodeName,c?s.setEnd(l.parentNode,Xa(l)+1):s.setEnd(l,0),s.collapse(!1),u.removeAllRanges(),u.addRange(s),!c&&!r.state.selection.visible&&Xx&&Xb<=11&&(l.disabled=!0,l.disabled=!1)}else{let{anchor:d,head:f}=n,p,A,h,m,g,y;!XU||n instanceof $2||(n.$from.parent.inlineContent||(p=XK(e,n.from)),n.empty||n.$from.parent.inlineContent||(A=XK(e,n.to))),e.docView.setSelection(d,f,e.root,t),XU&&(p&&XB(p),A&&XB(A)),n.visible?e.dom.classList.remove("ProseMirror-hideselection"):(e.dom.classList.add("ProseMirror-hideselection"),"onselectionchange"in document&&(i=e,h=i.dom.ownerDocument,h.removeEventListener("selectionchange",i.input.hideSelectionGuard),m=i.domSelectionRange(),g=m.anchorNode,y=m.anchorOffset,h.addEventListener("selectionchange",i.input.hideSelectionGuard=()=>{(m.anchorNode!=g||m.anchorOffset!=y)&&(h.removeEventListener("selectionchange",i.input.hideSelectionGuard),setTimeout(()=>{(!XF(i)||i.state.selection.visible)&&i.dom.classList.remove("ProseMirror-hideselection")},20))})))}e.domObserver.setCurSelection(),e.domObserver.connectSelection()}}let XU=X_||Xw&&XI<63;function XK(e,t){let{node:n,offset:r}=e.docView.domFromPos(t,0),i=r<n.childNodes.length?n.childNodes[r]:null,o=r?n.childNodes[r-1]:null;if(X_&&i&&"false"==i.contentEditable)return XL(i);if((!i||"false"==i.contentEditable)&&(!o||"false"==o.contentEditable)){if(i)return XL(i);if(o)return XL(o)}}function XL(e){return e.contentEditable="true",X_&&e.draggable&&(e.draggable=!1,e.wasDraggable=!0),e}function XB(e){e.contentEditable="false",e.wasDraggable&&(e.draggable=!0,e.wasDraggable=null)}function XP(e){e.lastSelectedViewDesc&&(e.lastSelectedViewDesc.parent&&e.lastSelectedViewDesc.deselectNode(),e.lastSelectedViewDesc=void 0)}function XW(e,t,n,r){return e.someProp("createSelectionBetween",r=>r(e,t,n))||$2.between(t,n,r)}function XD(e,t){let{$anchor:n,$head:r}=e.selection,i=t>0?n.max(r):n.min(r),o=i.parent.inlineContent?i.depth?e.doc.resolve(t>0?i.after():i.before()):null:i;return o&&$$.findFrom(o,t)}function XN(e,t){return e.dispatch(e.state.tr.setSelection(t).scrollIntoView()),!0}function Xq(e,t,n){let r=e.state.selection;if(r instanceof $2){if(n.indexOf("s")>-1){let{$head:i}=r,o=i.textOffset?null:t<0?i.nodeBefore:i.nodeAfter;if(!o||o.isText||!o.isLeaf)return!1;let a=e.state.doc.resolve(i.pos+o.nodeSize*(t<0?-1:1));return XN(e,new $2(r.$anchor,a))}if(!r.empty)return!1;if(e.endOfTextblock(t>0?"forward":"backward")){let u=XD(e.state,t);return!!u&&u instanceof $5&&XN(e,u)}if(!(XO&&n.indexOf("m")>-1)){let s=r.$head,l=s.textOffset?null:t<0?s.nodeBefore:s.nodeAfter,c;if(!l||l.isText)return!1;let d=t<0?s.pos-l.nodeSize:s.pos;return!!(l.isAtom||(c=e.docView.descAt(d))&&!c.contentDOM)&&($5.isSelectable(l)?XN(e,new $5(t<0?e.state.doc.resolve(s.pos-l.nodeSize):s)):!!XE&&XN(e,new $2(e.state.doc.resolve(t<0?d:d+l.nodeSize))))}}else{if(r instanceof $5&&r.node.isInline)return XN(e,new $2(t>0?r.$to:r.$from));{let f=XD(e.state,t);return!!f&&XN(e,f)}}}function XQ(e){return 3==e.nodeType?e.nodeValue.length:e.childNodes.length}function XV(e,t){let n=e.pmViewDesc;return n&&0==n.size&&(t<0||e.nextSibling||"BR"!=e.nodeName)}function Xz(e,t){return t<0?function(e){let t=e.domSelectionRange(),n=t.focusNode,r=t.focusOffset;if(!n)return;let i,o,a=!1;for(XC&&1==n.nodeType&&r<XQ(n)&&XV(n.childNodes[r],-1)&&(a=!0);;)if(r>0){if(1!=n.nodeType)break;{let u=n.childNodes[r-1];if(XV(u,-1))i=n,o=--r;else if(3==u.nodeType)r=(n=u).nodeValue.length;else break}}else{if(XY(n))break;{let s=n.previousSibling;for(;s&&XV(s,-1);)i=n.parentNode,o=Xa(s),s=s.previousSibling;if(s)r=XQ(n=s);else{if((n=n.parentNode)==e.dom)break;r=0}}}a?XH(e,n,r):i&&XH(e,i,o)}(e):function(e){let t=e.domSelectionRange(),n=t.focusNode,r=t.focusOffset;if(!n)return;let i=XQ(n),o,a;for(;;)if(r<i){if(1!=n.nodeType)break;if(XV(n.childNodes[r],1))o=n,a=++r;else break}else{if(XY(n))break;{let u=n.nextSibling;for(;u&&XV(u,1);)o=u.parentNode,a=Xa(u)+1,u=u.nextSibling;if(u)r=0,i=XQ(n=u);else{if((n=n.parentNode)==e.dom)break;r=i=0}}}o&&XH(e,o,a)}(e)}function XY(e){let t=e.pmViewDesc;return t&&t.node&&t.node.isBlock}function XH(e,t,n){if(3!=t.nodeType){let r,i;(i=function(e,t){for(;e&&t==e.childNodes.length&&!Xd(e);)t=Xa(e)+1,e=e.parentNode;for(;e&&t<e.childNodes.length;){let n=e.childNodes[t];if(3==n.nodeType)return n;if(1==n.nodeType&&"false"==n.contentEditable)break;e=n,t=0}}(t,n))?(t=i,n=0):(r=function(e,t){for(;e&&!t&&!Xd(e);)t=Xa(e),e=e.parentNode;for(;e&&t;){let n=e.childNodes[t-1];if(3==n.nodeType)return n;if(1==n.nodeType&&"false"==n.contentEditable)break;t=(e=n).childNodes.length}}(t,n))&&(t=r,n=r.nodeValue.length)}let o=e.domSelection();if(Xf(o)){let a=document.createRange();a.setEnd(t,n),a.setStart(t,n),o.removeAllRanges(),o.addRange(a)}else o.extend&&o.extend(t,n);e.domObserver.setCurSelection();let{state:u}=e;setTimeout(()=>{e.state==u&&Xj(e)},50)}function XZ(e,t){let n=e.state.doc.resolve(t);if(!(Xw||XR)&&n.parent.inlineContent){let r=e.coordsAtPos(t);if(t>n.start()){let i=e.coordsAtPos(t-1),o=(i.top+i.bottom)/2;if(o>r.top&&o<r.bottom&&Math.abs(i.left-r.left)>1)return i.left<r.left?"ltr":"rtl"}if(t<n.end()){let a=e.coordsAtPos(t+1),u=(a.top+a.bottom)/2;if(u>r.top&&u<r.bottom&&Math.abs(a.left-r.left)>1)return a.left>r.left?"ltr":"rtl"}}return"rtl"==getComputedStyle(e.dom).direction?"rtl":"ltr"}function XJ(e,t,n){let r=e.state.selection;if(r instanceof $2&&!r.empty||n.indexOf("s")>-1||XO&&n.indexOf("m")>-1)return!1;let{$from:i,$to:o}=r;if(!i.parent.inlineContent||e.endOfTextblock(t<0?"up":"down")){let a=XD(e.state,t);if(a&&a instanceof $5)return XN(e,a)}if(!i.parent.inlineContent){let u=t<0?i:o,s=r instanceof $9?$$.near(u,t):$$.findFrom(u,t);return!!s&&XN(e,s)}return!1}function XG(e,t){if(!(e.state.selection instanceof $2))return!0;let{$head:n,$anchor:r,empty:i}=e.state.selection;if(!n.sameParent(r))return!0;if(!i)return!1;if(e.endOfTextblock(t>0?"forward":"backward"))return!0;let o=!n.textOffset&&(t<0?n.nodeBefore:n.nodeAfter);if(o&&!o.isText){let a=e.state.tr;return t<0?a.delete(n.pos-o.nodeSize,n.pos):a.delete(n.pos,n.pos+o.nodeSize),e.dispatch(a),!0}return!1}function X$(e,t,n){e.domObserver.stop(),t.contentEditable=n,e.domObserver.start()}function XX(e,t){e.someProp("transformCopied",n=>{t=n(t,e)});let n=[],{content:r,openStart:i,openEnd:o}=t;for(;i>1&&o>1&&1==r.childCount&&1==r.firstChild.childCount;){i--,o--;let a=r.firstChild;n.push(a.type.name,a.attrs!=a.type.defaultAttrs?a.attrs:null),r=a.content}let u=e.someProp("clipboardSerializer")||$h.fromSchema(e.state.schema),s=X8(),l=s.createElement("div");l.appendChild(u.serializeFragment(r,{document:s}));let c=l.firstChild,d,f=0;for(;c&&1==c.nodeType&&(d=X4[c.nodeName.toLowerCase()]);){for(let p=d.length-1;p>=0;p--){let A=s.createElement(d[p]);for(;l.firstChild;)A.appendChild(l.firstChild);l.appendChild(A),f++}c=l.firstChild}return c&&1==c.nodeType&&c.setAttribute("data-pm-slice",`${i} ${o}${f?` -${f}`:""} ${JSON.stringify(n)}`),{dom:l,text:e.someProp("clipboardTextSerializer",n=>n(t,e))||t.content.textBetween(0,t.content.size,`
11
-
12
- `)}}function X0(e,t,n,r,i){let o=i.parent.type.spec.code,a,u;if(!n&&!t)return null;let s=t&&(r||o||!n);if(s){if(e.someProp("transformPastedText",n=>{t=n(t,o||r,e)}),o)return t?new GU(GR.from(e.state.schema.text(t.replace(/\r\n?/g,`
13
- `))),0,0):GU.empty;let l=e.someProp("clipboardTextParser",n=>n(t,i,r,e));if(l)u=l;else{let c=i.marks(),{schema:d}=e.state,f=$h.fromSchema(d);a=document.createElement("div"),t.split(/(?:\r\n?|\n)+/).forEach(e=>{let t=a.appendChild(document.createElement("p"));e&&t.appendChild(f.serializeNode(d.text(e,c)))})}}else e.someProp("transformPastedHTML",t=>{n=t(n,e)}),a=function(e){let t=/^(\s*<meta [^>]*>)*/.exec(e);t&&(e=e.slice(t[0].length));let n=X8().createElement("div"),r=/<([a-z][^>\s]+)/i.exec(e),i;if((i=r&&X4[r[1].toLowerCase()])&&(e=i.map(e=>"<"+e+">").join("")+e+i.map(e=>"</"+e+">").reverse().join("")),n.innerHTML=e,i)for(let o=0;o<i.length;o++)n=n.querySelector(i[o])||n;return n}(n),XE&&function(e){let t=e.querySelectorAll(Xw?"span:not([class]):not([style])":"span.Apple-converted-space");for(let n=0;n<t.length;n++){let r=t[n];1==r.childNodes.length&&"\xa0"==r.textContent&&r.parentNode&&r.parentNode.replaceChild(e.ownerDocument.createTextNode(" "),r)}}(a);let p=a&&a.querySelector("[data-pm-slice]"),A=p&&/^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(p.getAttribute("data-pm-slice")||"");if(A&&A[3])for(let h=+A[3];h>0;h--){let m=a.firstChild;for(;m&&1!=m.nodeType;)m=m.nextSibling;if(!m)break;a=m}if(u||(u=(e.someProp("clipboardParser")||e.someProp("domParser")||$o.fromSchema(e.state.schema)).parseSlice(a,{preserveWhitespace:!!(s||A),context:i,ruleFromNode:e=>"BR"!=e.nodeName||e.nextSibling||!e.parentNode||X1.test(e.parentNode.nodeName)?null:{ignore:!0}})),A)u=function(e,t){if(!e.size)return e;let n=e.content.firstChild.type.schema,r;try{r=JSON.parse(t)}catch{return e}let{content:i,openStart:o,openEnd:a}=e;for(let u=r.length-2;u>=0;u-=2){let s=n.nodes[r[u]];if(!s||s.hasRequiredAttrs())break;i=GR.from(s.create(r[u+1],i)),o++,a++}return new GU(i,o,a)}(X9(u,+A[1],+A[2]),A[4]);else if((u=GU.maxOpen(function(e,t){if(e.childCount<2)return e;for(let n=t.depth;n>=0;n--){let r=t.node(n).contentMatchAt(t.index(n)),i,o=[];if(e.forEach(e=>{if(!o)return;let t=r.findWrapping(e.type),n;if(!t)return o=null;if(n=o.length&&i.length&&X6(t,i,e,o[o.length-1],0))o[o.length-1]=n;else{o.length&&(o[o.length-1]=X5(o[o.length-1],i.length));let a=X2(e,t);o.push(a),r=r.matchType(a.type),i=t}}),o)return GR.from(o)}return e}(u.content,i),!0)).openStart||u.openEnd){let g=0,y=0;for(let v=u.content.firstChild;g<u.openStart&&!v.type.spec.isolating;g++,v=v.firstChild);for(let x=u.content.lastChild;y<u.openEnd&&!x.type.spec.isolating;y++,x=x.lastChild);u=X9(u,g,y)}return e.someProp("transformPasted",t=>{u=t(u,e)}),u}let X1=/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var)$/i;function X2(e,t,n=0){for(let r=t.length-1;r>=n;r--)e=t[r].create(null,GR.from(e));return e}function X6(e,t,n,r,i){if(i<e.length&&i<t.length&&e[i]==t[i]){let o=X6(e,t,n,r.lastChild,i+1);if(o)return r.copy(r.content.replaceChild(r.childCount-1,o));if(r.contentMatchAt(r.childCount).matchType(i==e.length-1?n.type:e[i+1]))return r.copy(r.content.append(GR.from(X2(n,e,i+1))))}}function X5(e,t){if(0==t)return e;let n=e.content.replaceChild(e.childCount-1,X5(e.lastChild,t-1)),r=e.contentMatchAt(e.childCount).fillBefore(GR.empty,!0);return e.copy(n.append(r))}function X3(e,t,n,r,i,o){let a=t<0?e.firstChild:e.lastChild,u=a.content;return e.childCount>1&&(o=0),i<r-1&&(u=X3(u,t,n,r,i+1,o)),i>=n&&(u=t<0?a.contentMatchAt(0).fillBefore(u,o<=i).append(u):u.append(a.contentMatchAt(a.childCount).fillBefore(GR.empty,!0))),e.replaceChild(t<0?0:e.childCount-1,a.copy(u))}function X9(e,t,n){return t<e.openStart&&(e=new GU(X3(e.content,-1,t,e.openStart,0,e.openEnd),t,e.openEnd)),n<e.openEnd&&(e=new GU(X3(e.content,1,n,e.openEnd,0,0),e.openStart,n)),e}let X4={thead:["table"],tbody:["table"],tfoot:["table"],caption:["table"],colgroup:["table"],col:["table","colgroup"],tr:["table","tbody"],td:["table","tbody","tr"],th:["table","tbody","tr"]},X7=null;function X8(){return X7||(X7=document.implementation.createHTMLDocument("title"))}let eee={},eet={};function een(e,t){e.input.lastSelectionOrigin=t,e.input.lastSelectionTime=Date.now()}function eer(e){return{left:e.clientX,top:e.clientY}}function eei(e,t,n,r,i){if(-1==r)return!1;let o=e.state.doc.resolve(r);for(let a=o.depth+1;a>0;a--)if(e.someProp(t,t=>a>o.depth?t(e,n,o.nodeAfter,o.before(a),i,!0):t(e,n,o.node(a),o.before(a),i,!1)))return!0;return!1}function eeo(e,t,n){e.focused||e.focus();let r=e.state.tr.setSelection(t);"pointer"==n&&r.setMeta("pointer",!0),e.dispatch(r)}function eea(e,t,n,r){return eei(e,"handleDoubleClickOn",t,n,r)||e.someProp("handleDoubleClick",n=>n(e,t,r))}function eeu(e,t,n,r){return eei(e,"handleTripleClickOn",t,n,r)||e.someProp("handleTripleClick",n=>n(e,t,r))||function(e,t,n){if(0!=n.button)return!1;let r=e.state.doc;if(-1==t)return!!r.inlineContent&&(eeo(e,$2.create(r,0,r.content.size),"pointer"),!0);let i=r.resolve(t);for(let o=i.depth+1;o>0;o--){let a=o>i.depth?i.nodeAfter:i.node(o),u=i.before(o);if(a.inlineContent)eeo(e,$2.create(r,u+1,u+1+a.content.size),"pointer");else{if(!$5.isSelectable(a))continue;eeo(e,$5.create(r,u),"pointer")}return!0}}(e,n,r)}eet.keydown=(e,t)=>{if(e.input.shiftKey=16==t.keyCode||t.shiftKey,!eec(e,t)&&(e.input.lastKeyCode=t.keyCode,e.input.lastKeyCodeTime=Date.now(),!(Xk&&Xw&&13==t.keyCode))){if(229!=t.keyCode&&e.domObserver.forceFlush(),!XT||13!=t.keyCode||t.ctrlKey||t.altKey||t.metaKey)e.someProp("handleKeyDown",n=>n(e,t))||function(e,t){var n;let r,i=t.keyCode,o=(r="",t.ctrlKey&&(r+="c"),t.metaKey&&(r+="m"),t.altKey&&(r+="a"),t.shiftKey&&(r+="s"),r);if(8==i||XO&&72==i&&"c"==o)return XG(e,-1)||Xz(e,-1);if(46==i&&!t.shiftKey||XO&&68==i&&"c"==o)return XG(e,1)||Xz(e,1);if(13==i||27==i)return!0;if(37==i||XO&&66==i&&"c"==o){let a=37==i?"ltr"==XZ(e,e.state.selection.from)?-1:1:-1;return Xq(e,a,o)||Xz(e,a)}if(39==i||XO&&70==i&&"c"==o){let u=39==i?"ltr"==XZ(e,e.state.selection.from)?1:-1:1;return Xq(e,u,o)||Xz(e,u)}return 38==i||XO&&80==i&&"c"==o?XJ(e,-1,o)||Xz(e,-1):40==i||XO&&78==i&&"c"==o?function(e){if(!X_||e.state.selection.$head.parentOffset>0)return!1;let{focusNode:t,focusOffset:n}=e.domSelectionRange();if(t&&1==t.nodeType&&0==n&&t.firstChild&&"false"==t.firstChild.contentEditable){let r=t.firstChild;X$(e,r,"true"),setTimeout(()=>X$(e,r,"false"),20)}return!1}(e)||XJ(e,1,o)||Xz(e,1):o==(XO?"m":"c")&&(66==i||73==i||89==i||90==i)}(e,t)?t.preventDefault():een(e,"key");else{let n=Date.now();e.input.lastIOSEnter=n,e.input.lastIOSEnterFallbackTimeout=setTimeout(()=>{e.input.lastIOSEnter==n&&(e.someProp("handleKeyDown",t=>t(e,Xp(13,"Enter"))),e.input.lastIOSEnter=0)},200)}}},eet.keyup=(e,t)=>{16==t.keyCode&&(e.input.shiftKey=!1)},eet.keypress=(e,t)=>{if(eec(e,t)||!t.charCode||t.ctrlKey&&!t.altKey||XO&&t.metaKey)return;if(e.someProp("handleKeyPress",n=>n(e,t))){t.preventDefault();return}let n=e.state.selection;if(!(n instanceof $2)||!n.$from.sameParent(n.$to)){let r=String.fromCharCode(t.charCode);/[\r\n]/.test(r)||e.someProp("handleTextInput",t=>t(e,n.$from.pos,n.$to.pos,r))||e.dispatch(e.state.tr.insertText(r).scrollIntoView()),t.preventDefault()}};let ees=XO?"metaKey":"ctrlKey";eee.mousedown=(e,t)=>{var n,r,i;e.input.shiftKey=t.shiftKey;let o=eep(e),a=Date.now(),u="singleClick",s,l;a-e.input.lastClick.time<500&&(s=(i=e.input.lastClick).x-t.clientX,s*s+(l=i.y-t.clientY)*l<100)&&!t[ees]&&("singleClick"==e.input.lastClick.type?u="doubleClick":"doubleClick"==e.input.lastClick.type&&(u="tripleClick")),e.input.lastClick={time:a,x:t.clientX,y:t.clientY,type:u};let c=e.posAtCoords(eer(t));c&&("singleClick"==u?(e.input.mouseDown&&e.input.mouseDown.done(),e.input.mouseDown=new eel(e,c,t,!!o)):("doubleClick"==u?eea:eeu)(e,c.pos,c.inside,t)?t.preventDefault():een(e,"pointer"))};class eel{constructor(e,t,n,r){this.view=e,this.pos=t,this.event=n,this.flushed=r,this.delayedSelectionSync=!1,this.mightDrag=null,this.startDoc=e.state.doc,this.selectNode=!!n[ees],this.allowDefault=n.shiftKey;let i,o;if(t.inside>-1)i=e.state.doc.nodeAt(t.inside),o=t.inside;else{let a=e.state.doc.resolve(t.pos);i=a.parent,o=a.depth?a.before():0}let u=r?null:n.target,s=u?e.docView.nearestDesc(u,!0):null;this.target=s?s.dom:null;let{selection:l}=e.state;(0==n.button&&i.type.spec.draggable&&!1!==i.type.spec.selectable||l instanceof $5&&l.from<=o&&l.to>o)&&(this.mightDrag={node:i,pos:o,addAttr:!!(this.target&&!this.target.draggable),setUneditable:!!(this.target&&XC&&!this.target.hasAttribute("contentEditable"))}),this.target&&this.mightDrag&&(this.mightDrag.addAttr||this.mightDrag.setUneditable)&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&(this.target.draggable=!0),this.mightDrag.setUneditable&&setTimeout(()=>{this.view.input.mouseDown==this&&this.target.setAttribute("contentEditable","false")},20),this.view.domObserver.start()),e.root.addEventListener("mouseup",this.up=this.up.bind(this)),e.root.addEventListener("mousemove",this.move=this.move.bind(this)),een(e,"pointer")}done(){this.view.root.removeEventListener("mouseup",this.up),this.view.root.removeEventListener("mousemove",this.move),this.mightDrag&&this.target&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&this.target.removeAttribute("draggable"),this.mightDrag.setUneditable&&this.target.removeAttribute("contentEditable"),this.view.domObserver.start()),this.delayedSelectionSync&&setTimeout(()=>Xj(this.view)),this.view.input.mouseDown=null}up(e){var t,n,r,i,o;if(this.done(),!this.view.dom.contains(e.target))return;let a=this.pos;this.view.state.doc!=this.startDoc&&(a=this.view.posAtCoords(eer(e))),this.updateAllowDefault(e),this.allowDefault||!a?een(this.view,"pointer"):(t=this.view,n=a.pos,r=a.inside,o=this.selectNode,eei(t,"handleClickOn",n,r,e)||t.someProp("handleClick",r=>r(t,n,e))||(o?function(e,t){if(-1==t)return!1;let n=e.state.selection,r,i;n instanceof $5&&(r=n.node);let o=e.state.doc.resolve(t);for(let a=o.depth+1;a>0;a--){let u=a>o.depth?o.nodeAfter:o.node(a);if($5.isSelectable(u)){i=r&&n.$from.depth>0&&a>=n.$from.depth&&o.before(n.$from.depth+1)==n.$from.pos?o.before(n.$from.depth):o.before(a);break}}return null!=i&&(eeo(e,$5.create(e.state.doc,i),"pointer"),!0)}(t,r):function(e,t){if(-1==t)return!1;let n=e.state.doc.resolve(t),r=n.nodeAfter;return!!(r&&r.isAtom&&$5.isSelectable(r))&&(eeo(e,new $5(n),"pointer"),!0)}(t,r)))?e.preventDefault():0==e.button&&(this.flushed||X_&&this.mightDrag&&!this.mightDrag.node.isAtom||Xw&&!this.view.state.selection.visible&&2>=Math.min(Math.abs(a.pos-this.view.state.selection.from),Math.abs(a.pos-this.view.state.selection.to)))?(eeo(this.view,$$.near(this.view.state.doc.resolve(a.pos)),"pointer"),e.preventDefault()):een(this.view,"pointer")}move(e){this.updateAllowDefault(e),een(this.view,"pointer"),0==e.buttons&&this.done()}updateAllowDefault(e){!this.allowDefault&&(Math.abs(this.event.x-e.clientX)>4||Math.abs(this.event.y-e.clientY)>4)&&(this.allowDefault=!0)}}function eec(e,t){return!!e.composing||!!(X_&&500>Math.abs(t.timeStamp-e.input.compositionEndedAt))&&(e.input.compositionEndedAt=-2e8,!0)}eee.touchstart=e=>{e.input.lastTouch=Date.now(),eep(e),een(e,"pointer")},eee.touchmove=e=>{e.input.lastTouch=Date.now(),een(e,"pointer")},eee.contextmenu=e=>{var t;return eep(e)};let eed=Xk?5e3:-1;function eef(e,t){clearTimeout(e.input.composingTimeout),t>-1&&(e.input.composingTimeout=setTimeout(()=>eep(e),t))}function eep(e,t=!1){if(!(Xk&&e.domObserver.flushingSoon>=0)){if(e.domObserver.forceFlush(),function(e){let t;for(e.composing&&(e.input.composing=!1,e.input.compositionEndedAt=(t=document.createEvent("Event"),t.initEvent("event",!0,!0),t.timeStamp));e.input.compositionNodes.length>0;)e.input.compositionNodes.pop().markParentsDirty()}(e),t||e.docView&&e.docView.dirty){let n=function(e,t=null){let n=e.domSelectionRange(),r=e.state.doc;if(!n.focusNode)return null;let i=e.docView.nearestDesc(n.focusNode),o=i&&0==i.size,a=e.docView.posFromDOM(n.focusNode,n.focusOffset,1);if(a<0)return null;let u=r.resolve(a),s,l;if(Xf(n)){for(s=u;i&&!i.node;)i=i.parent;let c=i.node;if(i&&c.isAtom&&$5.isSelectable(c)&&i.parent&&!(c.isInline&&function(e,t,n){for(let r=0==t,i=t==Xc(e);r||i;){if(e==n)return!0;let o=Xa(e);if(!(e=e.parentNode))return!1;r=r&&0==o,i=i&&o==Xc(e)}}(n.focusNode,n.focusOffset,i.dom))){let d=i.posBefore;l=new $5(a==d?u:r.resolve(d))}}else{let f=e.docView.posFromDOM(n.anchorNode,n.anchorOffset,1);if(f<0)return null;s=r.resolve(f)}if(!l){let p="pointer"==t||e.state.selection.head<u.pos&&!o?1:-1;l=XW(e,s,u,p)}return l}(e);return n&&!n.eq(e.state.selection)?e.dispatch(e.state.tr.setSelection(n)):e.updateState(e.state),!0}return!1}}eet.compositionstart=eet.compositionupdate=e=>{if(!e.composing){e.domObserver.flush();let{state:t}=e,n=t.selection.$from;if(t.selection.empty&&(t.storedMarks||!n.textOffset&&n.parentOffset&&n.nodeBefore.marks.some(e=>!1===e.type.spec.inclusive)))e.markCursor=e.state.storedMarks||n.marks(),eep(e,!0),e.markCursor=null;else if(eep(e),XC&&t.selection.empty&&n.parentOffset&&!n.textOffset&&n.nodeBefore.marks.length){let r=e.domSelectionRange();for(let i=r.focusNode,o=r.focusOffset;i&&1==i.nodeType&&0!=o;){let a=o<0?i.lastChild:i.childNodes[o-1];if(!a)break;if(3==a.nodeType){e.domSelection().collapse(a,a.nodeValue.length);break}i=a,o=-1}}e.input.composing=!0}eef(e,eed)},eet.compositionend=(e,t)=>{e.composing&&(e.input.composing=!1,e.input.compositionEndedAt=t.timeStamp,e.input.compositionPendingChanges=e.domObserver.pendingRecords().length?e.input.compositionID:0,e.input.compositionPendingChanges&&Promise.resolve().then(()=>e.domObserver.flush()),e.input.compositionID++,eef(e,20))};let eeA=Xx&&Xb<15||XT&&XM<604;function eeh(e,t,n,r,i){var o;let a=X0(e,t,n,r,e.state.selection.$from);if(e.someProp("handlePaste",t=>t(e,i,a||GU.empty)))return!0;if(!a)return!1;let u=0==a.openStart&&0==a.openEnd&&1==a.content.childCount?a.content.firstChild:null,s=u?e.state.tr.replaceSelectionWith(u,r):e.state.tr.replaceSelection(a);return e.dispatch(s.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste")),!0}function eem(e){let t=e.getData("text/plain")||e.getData("Text");if(t)return t;let n=e.getData("text/uri-list");return n?n.replace(/\r?\n/g," "):""}eee.copy=eet.cut=(e,t)=>{let n=e.state.selection,r="cut"==t.type;if(n.empty)return;let i=eeA?null:t.clipboardData,{dom:o,text:a}=XX(e,n.content());i?(t.preventDefault(),i.clearData(),i.setData("text/html",o.innerHTML),i.setData("text/plain",a)):function(e,t){if(!e.dom.parentNode)return;let n=e.dom.parentNode.appendChild(document.createElement("div"));n.appendChild(t),n.style.cssText="position: fixed; left: -10000px; top: 10px";let r=getSelection(),i=document.createRange();i.selectNodeContents(t),e.dom.blur(),r.removeAllRanges(),r.addRange(i),setTimeout(()=>{n.parentNode&&n.parentNode.removeChild(n),e.focus()},50)}(e,o),r&&e.dispatch(e.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))},eet.paste=(e,t)=>{if(e.composing&&!Xk)return;let n=eeA?null:t.clipboardData,r=e.input.shiftKey&&45!=e.input.lastKeyCode;n&&eeh(e,eem(n),n.getData("text/html"),r,t)?t.preventDefault():function(e,t){if(!e.dom.parentNode)return;let n=e.input.shiftKey||e.state.selection.$from.parent.type.spec.code,r=e.dom.parentNode.appendChild(document.createElement(n?"textarea":"div"));n||(r.contentEditable="true"),r.style.cssText="position: fixed; left: -10000px; top: 10px",r.focus();let i=e.input.shiftKey&&45!=e.input.lastKeyCode;setTimeout(()=>{e.focus(),r.parentNode&&r.parentNode.removeChild(r),n?eeh(e,r.value,null,i,t):eeh(e,r.textContent,r.innerHTML,i,t)},50)}(e,t)};class eeg{constructor(e,t,n){this.slice=e,this.move=t,this.node=n}}let eey=XO?"altKey":"ctrlKey";for(let eev in eee.dragstart=(e,t)=>{let n=t,r=e.input.mouseDown;if(r&&r.done(),!n.dataTransfer)return;let i=e.state.selection,o=i.empty?null:e.posAtCoords(eer(n)),a;if(!(o&&o.pos>=i.from&&o.pos<=(i instanceof $5?i.to-1:i.to))){if(r&&r.mightDrag)a=$5.create(e.state.doc,r.mightDrag.pos);else if(n.target&&1==n.target.nodeType){let u=e.docView.nearestDesc(n.target,!0);u&&u.node.type.spec.draggable&&u!=e.docView&&(a=$5.create(e.state.doc,u.posBefore))}}let s=(a||e.state.selection).content(),{dom:l,text:c}=XX(e,s);n.dataTransfer.clearData(),n.dataTransfer.setData(eeA?"Text":"text/html",l.innerHTML),n.dataTransfer.effectAllowed="copyMove",eeA||n.dataTransfer.setData("text/plain",c),e.dragging=new eeg(s,!n[eey],a)},eee.dragend=e=>{let t=e.dragging;window.setTimeout(()=>{e.dragging==t&&(e.dragging=null)},50)},eet.dragover=eet.dragenter=(e,t)=>t.preventDefault(),eet.drop=(e,t)=>{let n=e.dragging;if(e.dragging=null,!t.dataTransfer)return;let r=e.posAtCoords(eer(t));if(!r)return;let i=e.state.doc.resolve(r.pos),o=n&&n.slice;o?e.someProp("transformPasted",t=>{o=t(o,e)}):o=X0(e,eem(t.dataTransfer),eeA?null:t.dataTransfer.getData("text/html"),!1,i);let a=!!(n&&!t[eey]);if(e.someProp("handleDrop",n=>n(e,t,o||GU.empty,a))){t.preventDefault();return}if(!o)return;t.preventDefault();let u=o?function(e,t,n){let r=e.resolve(t);if(!n.content.size)return t;let i=n.content;for(let o=0;o<n.openStart;o++)i=i.firstChild.content;for(let a=1;a<=(0==n.openStart&&n.size?2:1);a++)for(let u=r.depth;u>=0;u--){let s=u==r.depth?0:r.pos<=(r.start(u+1)+r.end(u+1))/2?-1:1,l=r.index(u)+(s>0?1:0),c=r.node(u),d=!1;if(1==a)d=c.canReplace(l,l,i);else{let f=c.contentMatchAt(l).findWrapping(i.firstChild.type);d=f&&c.canReplaceWith(l,l,f[0])}if(d)return 0==s?r.pos:s<0?r.before(u+1):r.after(u+1)}return null}(e.state.doc,i.pos,o):i.pos;null==u&&(u=i.pos);let s=e.state.tr;if(a){let{node:l}=n;l?l.replace(s):s.deleteSelection()}let c=s.mapping.map(u),d=0==o.openStart&&0==o.openEnd&&1==o.content.childCount,f=s.doc;if(d?s.replaceRangeWith(c,c,o.content.firstChild):s.replaceRange(c,c,o),s.doc.eq(f))return;let p=s.doc.resolve(c);if(d&&$5.isSelectable(o.content.firstChild)&&p.nodeAfter&&p.nodeAfter.sameMarkup(o.content.firstChild))s.setSelection(new $5(p));else{let A=s.mapping.map(u);s.mapping.maps[s.mapping.maps.length-1].forEach((e,t,n,r)=>A=r),s.setSelection(XW(e,p,s.doc.resolve(A)))}e.focus(),e.dispatch(s.setMeta("uiEvent","drop"))},eee.focus=e=>{e.input.lastFocus=Date.now(),e.focused||(e.domObserver.stop(),e.dom.classList.add("ProseMirror-focused"),e.domObserver.start(),e.focused=!0,setTimeout(()=>{e.docView&&e.hasFocus()&&!e.domObserver.currentSelection.eq(e.domSelectionRange())&&Xj(e)},20))},eee.blur=(e,t)=>{e.focused&&(e.domObserver.stop(),e.dom.classList.remove("ProseMirror-focused"),e.domObserver.start(),t.relatedTarget&&e.dom.contains(t.relatedTarget)&&e.domObserver.currentSelection.clear(),e.focused=!1)},eee.beforeinput=(e,t)=>{if(Xw&&Xk&&"deleteContentBackward"==t.inputType){e.domObserver.flushSoon();let{domChangeCount:n}=e.input;setTimeout(()=>{if(e.input.domChangeCount!=n||(e.dom.blur(),e.focus(),e.someProp("handleKeyDown",t=>t(e,Xp(8,"Backspace")))))return;let{$cursor:t}=e.state.selection;t&&t.pos>0&&e.dispatch(e.state.tr.delete(t.pos-1,t.pos).scrollIntoView())},50)}},eet)eee[eev]=eet[eev];function eex(e,t){if(e==t)return!0;for(let n in e)if(e[n]!==t[n])return!1;for(let r in t)if(!(r in e))return!1;return!0}class eeb{constructor(e,t){this.toDOM=e,this.spec=t||ee_,this.side=this.spec.side||0}map(e,t,n,r){let{pos:i,deleted:o}=e.mapResult(t.from+r,this.side<0?-1:1);return o?null:new eew(i-n,i-n,this)}valid(){return!0}eq(e){return this==e||e instanceof eeb&&(this.spec.key&&this.spec.key==e.spec.key||this.toDOM==e.toDOM&&eex(this.spec,e.spec))}destroy(e){this.spec.destroy&&this.spec.destroy(e)}}class eeC{constructor(e,t){this.attrs=e,this.spec=t||ee_}map(e,t,n,r){let i=e.map(t.from+r,this.spec.inclusiveStart?-1:1)-n,o=e.map(t.to+r,this.spec.inclusiveEnd?1:-1)-n;return i>=o?null:new eew(i,o,this)}valid(e,t){return t.from<t.to}eq(e){return this==e||e instanceof eeC&&eex(this.attrs,e.attrs)&&eex(this.spec,e.spec)}static is(e){return e.type instanceof eeC}destroy(){}}let eeS=class e{constructor(e,t){this.attrs=e,this.spec=t||ee_}map(e,t,n,r){let i=e.mapResult(t.from+r,1);if(i.deleted)return null;let o=e.mapResult(t.to+r,-1);return o.deleted||o.pos<=i.pos?null:new eew(i.pos-n,o.pos-n,this)}valid(e,t){let{index:n,offset:r}=e.content.findIndex(t.from),i;return r==t.from&&!(i=e.child(n)).isText&&r+i.nodeSize==t.to}eq(t){return this==t||t instanceof e&&eex(this.attrs,t.attrs)&&eex(this.spec,t.spec)}destroy(){}};class eew{constructor(e,t,n){this.from=e,this.to=t,this.type=n}copy(e,t){return new eew(e,t,this.type)}eq(e,t=0){return this.type.eq(e.type)&&this.from+t==e.from&&this.to+t==e.to}map(e,t,n){return this.type.map(e,this,t,n)}static widget(e,t,n){return new eew(e,e,new eeb(t,n))}static inline(e,t,n,r){return new eew(e,t,new eeC(n,r))}static node(e,t,n,r){return new eew(e,t,new eeS(n,r))}get spec(){return this.type.spec}get inline(){return this.type instanceof eeC}get widget(){return this.type instanceof eeb}}let eeI=[],ee_={};class eeT{constructor(e,t){this.local=e.length?e:eeI,this.children=t.length?t:eeI}static create(e,t){return t.length?eeF(t,e,0,ee_):eeO}find(e,t,n){let r=[];return this.findInner(e??0,t??1e9,r,0,n),r}findInner(e,t,n,r,i){for(let o=0;o<this.local.length;o++){let a=this.local[o];a.from<=t&&a.to>=e&&(!i||i(a.spec))&&n.push(a.copy(a.from+r,a.to+r))}for(let u=0;u<this.children.length;u+=3)if(this.children[u]<t&&this.children[u+1]>e){let s=this.children[u]+1;this.children[u+2].findInner(e-s,t-s,n,r+s,i)}}map(e,t,n){return this==eeO||0==e.maps.length?this:this.mapInner(e,t,0,0,n||ee_)}mapInner(e,t,n,r,i){let o;for(let a=0;a<this.local.length;a++){let u=this.local[a].map(e,n,r);u&&u.type.valid(t,u)?(o||(o=[])).push(u):i.onRemove&&i.onRemove(this.local[a].spec)}return this.children.length?function(e,t,n,r,i,o,a){let u=e.slice();for(let s=0,l=o;s<n.maps.length;s++){let c=0;n.maps[s].forEach((e,t,n,r)=>{let i=r-n-(t-e);for(let o=0;o<u.length;o+=3){let a=u[o+1];if(a<0||e>a+l-c)continue;let s=u[o]+l-c;t>=s?u[o+1]=e<=s?-2:-1:e>=l&&i&&(u[o]+=i,u[o+1]+=i)}c+=i}),l=n.maps[s].map(l,-1)}let d=!1;for(let f=0;f<u.length;f+=3)if(u[f+1]<0){if(-2==u[f+1]){d=!0,u[f+1]=-1;continue}let p=n.map(e[f]+o),A=p-i;if(A<0||A>=r.content.size){d=!0;continue}let h=n.map(e[f+1]+o,-1)-i,{index:m,offset:g}=r.content.findIndex(A),y=r.maybeChild(m);if(y&&g==A&&g+y.nodeSize==h){let v=u[f+2].mapInner(n,y,p+1,e[f]+o+1,a);v!=eeO?(u[f]=A,u[f+1]=h,u[f+2]=v):(u[f+1]=-2,d=!0)}else d=!0}if(d){let x=function(e,t,n,r,i,o,a){function u(e,t){for(let o=0;o<e.local.length;o++){let s=e.local[o].map(r,i,t);s?n.push(s):a.onRemove&&a.onRemove(e.local[o].spec)}for(let l=0;l<e.children.length;l+=3)u(e.children[l+2],e.children[l]+t+1)}for(let s=0;s<e.length;s+=3)-1==e[s+1]&&u(e[s+2],t[s]+o+1);return n}(u,e,t,n,i,o,a),b=eeF(x,r,0,a);t=b.local;for(let C=0;C<u.length;C+=3)u[C+1]<0&&(u.splice(C,3),C-=3);for(let S=0,w=0;S<b.children.length;S+=3){let I=b.children[S];for(;w<u.length&&u[w]<I;)w+=3;u.splice(w,0,b.children[S],b.children[S+1],b.children[S+2])}}return new eeT(t.sort(eej),u)}(this.children,o||[],e,t,n,r,i):o?new eeT(o.sort(eej),eeI):eeO}add(e,t){return t.length?this==eeO?eeT.create(e,t):this.addInner(e,t,0):this}addInner(e,t,n){let r,i=0;e.forEach((e,o)=>{let a=o+n,u;if(u=eeE(t,e,a)){for(r||(r=this.children.slice());i<r.length&&r[i]<o;)i+=3;r[i]==o?r[i+2]=r[i+2].addInner(e,u,a+1):r.splice(i,0,o,o+e.nodeSize,eeF(u,e,a+1,ee_)),i+=3}});let o=eek(i?eeM(t):t,-n);for(let a=0;a<o.length;a++)o[a].type.valid(e,o[a])||o.splice(a--,1);return new eeT(o.length?this.local.concat(o).sort(eej):this.local,r||this.children)}remove(e){return 0==e.length||this==eeO?this:this.removeInner(e,0)}removeInner(e,t){let n=this.children,r=this.local;for(let i=0;i<n.length;i+=3){let o,a=n[i]+t,u=n[i+1]+t;for(let s=0,l;s<e.length;s++)(l=e[s])&&l.from>a&&l.to<u&&(e[s]=null,(o||(o=[])).push(l));if(!o)continue;n==this.children&&(n=this.children.slice());let c=n[i+2].removeInner(o,a+1);c!=eeO?n[i+2]=c:(n.splice(i,3),i-=3)}if(r.length){for(let d=0,f;d<e.length;d++)if(f=e[d])for(let p=0;p<r.length;p++)r[p].eq(f,t)&&(r==this.local&&(r=this.local.slice()),r.splice(p--,1))}return n==this.children&&r==this.local?this:r.length||n.length?new eeT(r,n):eeO}forChild(e,t){if(this==eeO)return this;if(t.isLeaf)return eeT.empty;let n,r;for(let i=0;i<this.children.length;i+=3)if(this.children[i]>=e){this.children[i]==e&&(n=this.children[i+2]);break}let o=e+1,a=o+t.content.size;for(let u=0;u<this.local.length;u++){let s=this.local[u];if(s.from<a&&s.to>o&&s.type instanceof eeC){let l=Math.max(o,s.from)-o,c=Math.min(a,s.to)-o;l<c&&(r||(r=[])).push(s.copy(l,c))}}if(r){let d=new eeT(r.sort(eej),eeI);return n?new eeR([d,n]):d}return n||eeO}eq(e){if(this==e)return!0;if(!(e instanceof eeT)||this.local.length!=e.local.length||this.children.length!=e.children.length)return!1;for(let t=0;t<this.local.length;t++)if(!this.local[t].eq(e.local[t]))return!1;for(let n=0;n<this.children.length;n+=3)if(this.children[n]!=e.children[n]||this.children[n+1]!=e.children[n+1]||!this.children[n+2].eq(e.children[n+2]))return!1;return!0}locals(e){return eeU(this.localsInner(e))}localsInner(e){if(this==eeO)return eeI;if(e.inlineContent||!this.local.some(eeC.is))return this.local;let t=[];for(let n=0;n<this.local.length;n++)this.local[n].type instanceof eeC||t.push(this.local[n]);return t}}eeT.empty=new eeT([],[]),eeT.removeOverlap=eeU;let eeO=eeT.empty;class eeR{constructor(e){this.members=e}map(e,t){let n=this.members.map(n=>n.map(e,t,ee_));return eeR.from(n)}forChild(e,t){if(t.isLeaf)return eeT.empty;let n=[];for(let r=0;r<this.members.length;r++){let i=this.members[r].forChild(e,t);i!=eeO&&(i instanceof eeR?n=n.concat(i.members):n.push(i))}return eeR.from(n)}eq(e){if(!(e instanceof eeR)||e.members.length!=this.members.length)return!1;for(let t=0;t<this.members.length;t++)if(!this.members[t].eq(e.members[t]))return!1;return!0}locals(e){let t,n=!0;for(let r=0;r<this.members.length;r++){let i=this.members[r].localsInner(e);if(i.length){if(t){n&&(t=t.slice(),n=!1);for(let o=0;o<i.length;o++)t.push(i[o])}else t=i}}return t?eeU(n?t:t.sort(eej)):eeI}static from(e){switch(e.length){case 0:return eeO;case 1:return e[0];default:return new eeR(e.every(e=>e instanceof eeT)?e:e.reduce((e,t)=>e.concat(t instanceof eeT?t:t.members),[]))}}}function eek(e,t){if(!t||!e.length)return e;let n=[];for(let r=0;r<e.length;r++){let i=e[r];n.push(new eew(i.from+t,i.to+t,i.type))}return n}function eeE(e,t,n){if(t.isLeaf)return null;let r=n+t.nodeSize,i=null;for(let o=0,a;o<e.length;o++)(a=e[o])&&a.from>n&&a.to<r&&((i||(i=[])).push(a),e[o]=null);return i}function eeM(e){let t=[];for(let n=0;n<e.length;n++)null!=e[n]&&t.push(e[n]);return t}function eeF(e,t,n,r){let i=[],o=!1;t.forEach((t,a)=>{let u=eeE(e,t,a+n);if(u){o=!0;let s=eeF(u,t,n+a+1,r);s!=eeO&&i.push(a,a+t.nodeSize,s)}});let a=eek(o?eeM(e):e,-n).sort(eej);for(let u=0;u<a.length;u++)a[u].type.valid(t,a[u])||(r.onRemove&&r.onRemove(a[u].spec),a.splice(u--,1));return a.length||i.length?new eeT(a,i):eeO}function eej(e,t){return e.from-t.from||e.to-t.to}function eeU(e){let t=e;for(let n=0;n<t.length-1;n++){let r=t[n];if(r.from!=r.to)for(let i=n+1;i<t.length;i++){let o=t[i];if(o.from==r.from){o.to!=r.to&&(t==e&&(t=e.slice()),t[i]=o.copy(o.from,r.to),eeK(t,i+1,o.copy(r.to,o.to)));continue}o.from<r.to&&(t==e&&(t=e.slice()),t[n]=r.copy(r.from,o.from),eeK(t,i,r.copy(o.from,r.to)));break}}return t}function eeK(e,t,n){for(;t<e.length&&eej(n,e[t])>0;)t++;e.splice(t,0,n)}for(var eeL={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},eeB={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},eeP="u">typeof navigator&&/Mac/.test(navigator.platform),eeW="u">typeof navigator&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),eeD=0;eeD<10;eeD++)eeL[48+eeD]=eeL[96+eeD]=String(eeD);for(var eeD=1;eeD<=24;eeD++)eeL[eeD+111]="F"+eeD;for(var eeD=65;eeD<=90;eeD++)eeL[eeD]=String.fromCharCode(eeD+32),eeB[eeD]=String.fromCharCode(eeD);for(var eeN in eeL)eeB.hasOwnProperty(eeN)||(eeB[eeN]=eeL[eeN]);let eeq="u">typeof navigator&&/Mac|iP(hone|[oa]d)/.test(navigator.platform);function eeQ(e){let t=e.split(/-(?!$)/),n=t[t.length-1];"Space"==n&&(n=" ");let r,i,o,a;for(let u=0;u<t.length-1;u++){let s=t[u];if(/^(cmd|meta|m)$/i.test(s))a=!0;else if(/^a(lt)?$/i.test(s))r=!0;else if(/^(c|ctrl|control)$/i.test(s))i=!0;else if(/^s(hift)?$/i.test(s))o=!0;else if(/^mod$/i.test(s))eeq?a=!0:i=!0;else throw Error("Unrecognized modifier name: "+s)}return r&&(n="Alt-"+n),i&&(n="Ctrl-"+n),a&&(n="Meta-"+n),o&&(n="Shift-"+n),n}function eeV(e,t,n=!0){return t.altKey&&(e="Alt-"+e),t.ctrlKey&&(e="Ctrl-"+e),t.metaKey&&(e="Meta-"+e),n&&t.shiftKey&&(e="Shift-"+e),e}function eez(e,t){return e+65536*t}function eeY(e){return 65535&e}class eeH{constructor(e,t,n){this.pos=e,this.delInfo=t,this.recover=n}get deleted(){return(8&this.delInfo)>0}get deletedBefore(){return(5&this.delInfo)>0}get deletedAfter(){return(6&this.delInfo)>0}get deletedAcross(){return(4&this.delInfo)>0}}class eeZ{constructor(e,t=!1){if(this.ranges=e,this.inverted=t,!e.length&&eeZ.empty)return eeZ.empty}recover(e){var t;let n=0,r=eeY(e);if(!this.inverted)for(let i=0;i<r;i++)n+=this.ranges[3*i+2]-this.ranges[3*i+1];return this.ranges[3*r]+n+(e-(65535&e))/65536}mapResult(e,t=1){return this._map(e,t,!1)}map(e,t=1){return this._map(e,t,!0)}_map(e,t,n){let r=0,i=this.inverted?2:1,o=this.inverted?1:2;for(let a=0;a<this.ranges.length;a+=3){let u=this.ranges[a]-(this.inverted?r:0);if(u>e)break;let s=this.ranges[a+i],l=this.ranges[a+o],c=u+s;if(e<=c){let d=s?e==u?-1:e==c?1:t:t,f=u+r+(d<0?0:l);if(n)return f;let p=e==(t<0?u:c)?null:eez(a/3,e-u),A=e==u?2:e==c?1:4;return(t<0?e!=u:e!=c)&&(A|=8),new eeH(f,A,p)}r+=l-s}return n?e+r:new eeH(e+r,0,null)}touches(e,t){let n=0,r=eeY(t),i=this.inverted?2:1,o=this.inverted?1:2;for(let a=0;a<this.ranges.length;a+=3){let u=this.ranges[a]-(this.inverted?n:0);if(u>e)break;let s=this.ranges[a+i];if(e<=u+s&&a==3*r)return!0;n+=this.ranges[a+o]-s}return!1}forEach(e){let t=this.inverted?2:1,n=this.inverted?1:2;for(let r=0,i=0;r<this.ranges.length;r+=3){let o=this.ranges[r],a=o-(this.inverted?i:0),u=o+(this.inverted?0:i),s=this.ranges[r+t],l=this.ranges[r+n];e(a,a+s,u,u+l),i+=l-s}}invert(){return new eeZ(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(e){return 0==e?eeZ.empty:new eeZ(e<0?[0,-e,0]:[0,0,e])}}eeZ.empty=new eeZ([]);let eeJ=Object.create(null);class eeG{getMap(){return eeZ.empty}merge(e){return null}static fromJSON(e,t){if(!t||!t.stepType)throw RangeError("Invalid input for Step.fromJSON");let n=eeJ[t.stepType];if(!n)throw RangeError(`No step type ${t.stepType} defined`);return n.fromJSON(e,t)}static jsonID(e,t){if(e in eeJ)throw RangeError("Duplicate use of step JSON ID "+e);return eeJ[e]=t,t.prototype.jsonID=e,t}}class ee${constructor(e,t){this.doc=e,this.failed=t}static ok(e){return new ee$(e,null)}static fail(e){return new ee$(null,e)}static fromReplace(e,t,n,r){try{return ee$.ok(e.replace(t,n,r))}catch(i){if(i instanceof Gj)return ee$.fail(i.message);throw i}}}function eeX(e,t,n){let r=[];for(let i=0;i<e.childCount;i++){let o=e.child(i);o.content.size&&(o=o.copy(eeX(o.content,t,o))),o.isInline&&(o=t(o,n,i)),r.push(o)}return GR.fromArray(r)}class ee0 extends eeG{constructor(e,t,n){super(),this.from=e,this.to=t,this.mark=n}apply(e){let t=e.slice(this.from,this.to),n=e.resolve(this.from),r=n.node(n.sharedDepth(this.to)),i=new GU(eeX(t.content,(e,t)=>e.isAtom&&t.type.allowsMarkType(this.mark.type)?e.mark(this.mark.addToSet(e.marks)):e,r),t.openStart,t.openEnd);return ee$.fromReplace(e,this.from,this.to,i)}invert(){return new ee1(this.from,this.to,this.mark)}map(e){let t=e.mapResult(this.from,1),n=e.mapResult(this.to,-1);return t.deleted&&n.deleted||t.pos>=n.pos?null:new ee0(t.pos,n.pos,this.mark)}merge(e){return e instanceof ee0&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new ee0(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,t){if("number"!=typeof t.from||"number"!=typeof t.to)throw RangeError("Invalid input for AddMarkStep.fromJSON");return new ee0(t.from,t.to,e.markFromJSON(t.mark))}}eeG.jsonID("addMark",ee0);class ee1 extends eeG{constructor(e,t,n){super(),this.from=e,this.to=t,this.mark=n}apply(e){let t=e.slice(this.from,this.to),n=new GU(eeX(t.content,e=>e.mark(this.mark.removeFromSet(e.marks)),e),t.openStart,t.openEnd);return ee$.fromReplace(e,this.from,this.to,n)}invert(){return new ee0(this.from,this.to,this.mark)}map(e){let t=e.mapResult(this.from,1),n=e.mapResult(this.to,-1);return t.deleted&&n.deleted||t.pos>=n.pos?null:new ee1(t.pos,n.pos,this.mark)}merge(e){return e instanceof ee1&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new ee1(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,t){if("number"!=typeof t.from||"number"!=typeof t.to)throw RangeError("Invalid input for RemoveMarkStep.fromJSON");return new ee1(t.from,t.to,e.markFromJSON(t.mark))}}eeG.jsonID("removeMark",ee1);class ee2 extends eeG{constructor(e,t){super(),this.pos=e,this.mark=t}apply(e){let t=e.nodeAt(this.pos);if(!t)return ee$.fail("No node at mark step's position");let n=t.type.create(t.attrs,null,this.mark.addToSet(t.marks));return ee$.fromReplace(e,this.pos,this.pos+1,new GU(GR.from(n),0,t.isLeaf?0:1))}invert(e){let t=e.nodeAt(this.pos);if(t){let n=this.mark.addToSet(t.marks);if(n.length==t.marks.length){for(let r=0;r<t.marks.length;r++)if(!t.marks[r].isInSet(n))return new ee2(this.pos,t.marks[r]);return new ee2(this.pos,this.mark)}}return new ee6(this.pos,this.mark)}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new ee2(t.pos,this.mark)}toJSON(){return{stepType:"addNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,t){if("number"!=typeof t.pos)throw RangeError("Invalid input for AddNodeMarkStep.fromJSON");return new ee2(t.pos,e.markFromJSON(t.mark))}}eeG.jsonID("addNodeMark",ee2);class ee6 extends eeG{constructor(e,t){super(),this.pos=e,this.mark=t}apply(e){let t=e.nodeAt(this.pos);if(!t)return ee$.fail("No node at mark step's position");let n=t.type.create(t.attrs,null,this.mark.removeFromSet(t.marks));return ee$.fromReplace(e,this.pos,this.pos+1,new GU(GR.from(n),0,t.isLeaf?0:1))}invert(e){let t=e.nodeAt(this.pos);return t&&this.mark.isInSet(t.marks)?new ee2(this.pos,this.mark):this}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new ee6(t.pos,this.mark)}toJSON(){return{stepType:"removeNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,t){if("number"!=typeof t.pos)throw RangeError("Invalid input for RemoveNodeMarkStep.fromJSON");return new ee6(t.pos,e.markFromJSON(t.mark))}}eeG.jsonID("removeNodeMark",ee6);class ee5 extends eeG{constructor(e,t,n,r=!1){super(),this.from=e,this.to=t,this.slice=n,this.structure=r}apply(e){return this.structure&&ee9(e,this.from,this.to)?ee$.fail("Structure replace would overwrite content"):ee$.fromReplace(e,this.from,this.to,this.slice)}getMap(){return new eeZ([this.from,this.to-this.from,this.slice.size])}invert(e){return new ee5(this.from,this.from+this.slice.size,e.slice(this.from,this.to))}map(e){let t=e.mapResult(this.from,1),n=e.mapResult(this.to,-1);return t.deletedAcross&&n.deletedAcross?null:new ee5(t.pos,Math.max(t.pos,n.pos),this.slice)}merge(e){if(!(e instanceof ee5)||e.structure||this.structure)return null;if(this.from+this.slice.size!=e.from||this.slice.openEnd||e.slice.openStart){if(e.to!=this.from||this.slice.openStart||e.slice.openEnd)return null;{let t=this.slice.size+e.slice.size==0?GU.empty:new GU(e.slice.content.append(this.slice.content),e.slice.openStart,this.slice.openEnd);return new ee5(e.from,this.to,t,this.structure)}}{let n=this.slice.size+e.slice.size==0?GU.empty:new GU(this.slice.content.append(e.slice.content),this.slice.openStart,e.slice.openEnd);return new ee5(this.from,this.to+(e.to-e.from),n,this.structure)}}toJSON(){let e={stepType:"replace",from:this.from,to:this.to};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,t){if("number"!=typeof t.from||"number"!=typeof t.to)throw RangeError("Invalid input for ReplaceStep.fromJSON");return new ee5(t.from,t.to,GU.fromJSON(e,t.slice),!!t.structure)}}eeG.jsonID("replace",ee5);class ee3 extends eeG{constructor(e,t,n,r,i,o,a=!1){super(),this.from=e,this.to=t,this.gapFrom=n,this.gapTo=r,this.slice=i,this.insert=o,this.structure=a}apply(e){if(this.structure&&(ee9(e,this.from,this.gapFrom)||ee9(e,this.gapTo,this.to)))return ee$.fail("Structure gap-replace would overwrite content");let t=e.slice(this.gapFrom,this.gapTo);if(t.openStart||t.openEnd)return ee$.fail("Gap is not a flat range");let n=this.slice.insertAt(this.insert,t.content);return n?ee$.fromReplace(e,this.from,this.to,n):ee$.fail("Content does not fit in gap")}getMap(){return new eeZ([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])}invert(e){let t=this.gapTo-this.gapFrom;return new ee3(this.from,this.from+this.slice.size+t,this.from+this.insert,this.from+this.insert+t,e.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)}map(e){let t=e.mapResult(this.from,1),n=e.mapResult(this.to,-1),r=e.map(this.gapFrom,-1),i=e.map(this.gapTo,1);return t.deletedAcross&&n.deletedAcross||r<t.pos||i>n.pos?null:new ee3(t.pos,n.pos,r,i,this.slice,this.insert,this.structure)}toJSON(){let e={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,t){if("number"!=typeof t.from||"number"!=typeof t.to||"number"!=typeof t.gapFrom||"number"!=typeof t.gapTo||"number"!=typeof t.insert)throw RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new ee3(t.from,t.to,t.gapFrom,t.gapTo,GU.fromJSON(e,t.slice),t.insert,!!t.structure)}}function ee9(e,t,n){let r=e.resolve(t),i=n-t,o=r.depth;for(;i>0&&o>0&&r.indexAfter(o)==r.node(o).childCount;)o--,i--;if(i>0){let a=r.node(o).maybeChild(r.indexAfter(o));for(;i>0;){if(!a||a.isLeaf)return!0;a=a.firstChild,i--}}return!1}function ee4(e,t,n){return(0==t||e.canReplace(t,e.childCount))&&(n==e.childCount||e.canReplace(0,n))}function ee7(e){return{type:e,attrs:null}}function ee8(e,t,n=1,r){let i=e.resolve(t),o=i.depth-n,a=r&&r[r.length-1]||i.parent;if(o<0||i.parent.type.spec.isolating||!i.parent.canReplace(i.index(),i.parent.childCount)||!a.type.validContent(i.parent.content.cutByIndex(i.index(),i.parent.childCount)))return!1;for(let u=i.depth-1,s=n-2;u>o;u--,s--){let l=i.node(u),c=i.index(u);if(l.type.spec.isolating)return!1;let d=l.content.cutByIndex(c,l.childCount),f=r&&r[s+1];f&&(d=d.replaceChild(0,f.type.create(f.attrs)));let p=r&&r[s]||l;if(!l.canReplace(c+1,l.childCount)||!p.type.validContent(d))return!1}let A=i.indexAfter(o),h=r&&r[0];return i.node(o).canReplaceWith(A,A,h?h.type:i.node(o+1).type)}function ete(e,t){let n=e.resolve(t),r=n.index();return ett(n.nodeBefore,n.nodeAfter)&&n.parent.canReplace(r,r+1)}function ett(e,t){return!!(e&&t&&!e.isLeaf&&e.canAppend(t))}function etn(e,t,n=-1){let r=e.resolve(t);for(let i=r.depth;;i--){let o,a,u=r.index(i);if(i==r.depth?(o=r.nodeBefore,a=r.nodeAfter):n>0?(o=r.node(i+1),u++,a=r.node(i).maybeChild(u)):(o=r.node(i).maybeChild(u-1),a=r.node(i+1)),o&&!o.isTextblock&&ett(o,a)&&r.node(i).canReplace(u,u+1))return t;if(0==i)break;t=n<0?r.before(i):r.after(i)}}eeG.jsonID("replaceAround",ee3);class etr extends eeG{constructor(e,t,n){super(),this.pos=e,this.attr=t,this.value=n}apply(e){let t=e.nodeAt(this.pos);if(!t)return ee$.fail("No node at attribute step's position");let n=Object.create(null);for(let r in t.attrs)n[r]=t.attrs[r];n[this.attr]=this.value;let i=t.type.create(n,null,t.marks);return ee$.fromReplace(e,this.pos,this.pos+1,new GU(GR.from(i),0,t.isLeaf?0:1))}getMap(){return eeZ.empty}invert(e){return new etr(this.pos,this.attr,e.nodeAt(this.pos).attrs[this.attr])}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new etr(t.pos,this.attr,this.value)}toJSON(){return{stepType:"attr",pos:this.pos,attr:this.attr,value:this.value}}static fromJSON(e,t){if("number"!=typeof t.pos||"string"!=typeof t.attr)throw RangeError("Invalid input for AttrStep.fromJSON");return new etr(t.pos,t.attr,t.value)}}eeG.jsonID("attr",etr);class eti extends eeG{constructor(e,t){super(),this.attr=e,this.value=t}apply(e){let t=Object.create(null);for(let n in e.attrs)t[n]=e.attrs[n];t[this.attr]=this.value;let r=e.type.create(t,e.content,e.marks);return ee$.ok(r)}getMap(){return eeZ.empty}invert(e){return new eti(this.attr,e.attrs[this.attr])}map(e){return this}toJSON(){return{stepType:"docAttr",attr:this.attr,value:this.value}}static fromJSON(e,t){if("string"!=typeof t.attr)throw RangeError("Invalid input for DocAttrStep.fromJSON");return new eti(t.attr,t.value)}}eeG.jsonID("docAttr",eti);let eto=class extends Error{};(eto=function e(t){let n=Error.call(this,t);return n.__proto__=e.prototype,n}).prototype=Object.create(Error.prototype),eto.prototype.constructor=eto,eto.prototype.name="TransformError";let eta=(e,t)=>!e.selection.empty&&(t&&t(e.tr.deleteSelection().scrollIntoView()),!0);function etu(e,t){let{$cursor:n}=e.selection;return n&&(t?t.endOfTextblock("backward",e):!(n.parentOffset>0))?n:null}let ets=(e,t,n)=>{let r=etu(e,n);if(!r)return!1;let i=etA(r);if(!i){let o=r.blockRange(),a=o&&$U(o);return null!=a&&(t&&t(e.tr.lift(o,a).scrollIntoView()),!0)}let u=i.nodeBefore;if(!u.type.spec.isolating&&etO(e,i,t))return!0;if(0==r.parent.content.size&&(etf(u,"end")||$5.isSelectable(u))){let s=$N(e.doc,r.before(),r.after(),GU.empty);if(s&&s.slice.size<s.to-s.from){if(t){let l=e.tr.step(s);l.setSelection(etf(u,"end")?$$.findFrom(l.doc.resolve(l.mapping.map(i.pos,-1)),-1):$5.create(l.doc,i.pos-u.nodeSize)),t(l.scrollIntoView())}return!0}}return!!u.isAtom&&i.depth==r.depth-1&&(t&&t(e.tr.delete(i.pos-u.nodeSize,i.pos).scrollIntoView()),!0)},etl=(e,t,n)=>{let r=etu(e,n);if(!r)return!1;let i=etA(r);return!!i&&etd(e,i,t)},etc=(e,t,n)=>{let r=eth(e,n);if(!r)return!1;let i=ety(r);return!!i&&etd(e,i,t)};function etd(e,t,n){let r=t.nodeBefore,i=t.pos-1;for(;!r.isTextblock;i--){if(r.type.spec.isolating)return!1;let o=r.lastChild;if(!o)return!1;r=o}let a=t.nodeAfter,u=t.pos+1;for(;!a.isTextblock;u++){if(a.type.spec.isolating)return!1;let s=a.firstChild;if(!s)return!1;a=s}let l=$N(e.doc,i,u,GU.empty);if(!l||l.from!=i||l instanceof $E&&l.slice.size>=u-i)return!1;if(n){let c=e.tr.step(l);c.setSelection($2.create(c.doc,i)),n(c.scrollIntoView())}return!0}function etf(e,t,n=!1){for(let r=e;r;r="start"==t?r.firstChild:r.lastChild){if(r.isTextblock)return!0;if(n&&1!=r.childCount)break}return!1}let etp=(e,t,n)=>{let{$head:r,empty:i}=e.selection,o=r;if(!i)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("backward",e):r.parentOffset>0)return!1;o=etA(r)}let a=o&&o.nodeBefore;return!!(a&&$5.isSelectable(a))&&(t&&t(e.tr.setSelection($5.create(e.doc,o.pos-a.nodeSize)).scrollIntoView()),!0)};function etA(e){if(!e.parent.type.spec.isolating)for(let t=e.depth-1;t>=0;t--){if(e.index(t)>0)return e.doc.resolve(e.before(t+1));if(e.node(t).type.spec.isolating)break}return null}function eth(e,t){let{$cursor:n}=e.selection;return n&&(t?t.endOfTextblock("forward",e):!(n.parentOffset<n.parent.content.size))?n:null}let etm=(e,t,n)=>{let r=eth(e,n);if(!r)return!1;let i=ety(r);if(!i)return!1;let o=i.nodeAfter;if(etO(e,i,t))return!0;if(0==r.parent.content.size&&(etf(o,"start")||$5.isSelectable(o))){let a=$N(e.doc,r.before(),r.after(),GU.empty);if(a&&a.slice.size<a.to-a.from){if(t){let u=e.tr.step(a);u.setSelection(etf(o,"start")?$$.findFrom(u.doc.resolve(u.mapping.map(i.pos)),1):$5.create(u.doc,u.mapping.map(i.pos))),t(u.scrollIntoView())}return!0}}return!!o.isAtom&&i.depth==r.depth-1&&(t&&t(e.tr.delete(i.pos,i.pos+o.nodeSize).scrollIntoView()),!0)},etg=(e,t,n)=>{let{$head:r,empty:i}=e.selection,o=r;if(!i)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("forward",e):r.parentOffset<r.parent.content.size)return!1;o=ety(r)}let a=o&&o.nodeAfter;return!!(a&&$5.isSelectable(a))&&(t&&t(e.tr.setSelection($5.create(e.doc,o.pos)).scrollIntoView()),!0)};function ety(e){if(!e.parent.type.spec.isolating)for(let t=e.depth-1;t>=0;t--){let n=e.node(t);if(e.index(t)+1<n.childCount)return e.doc.resolve(e.after(t+1));if(n.type.spec.isolating)break}return null}let etv=(e,t)=>{let n=e.selection,r=n instanceof $5,i;if(r){if(n.node.isTextblock||!$P(e.doc,n.from))return!1;i=n.from}else if(null==(i=$D(e.doc,n.from,-1)))return!1;if(t){let o=e.tr.join(i);r&&o.setSelection($5.create(o.doc,i-e.doc.resolve(i).nodeBefore.nodeSize)),t(o.scrollIntoView())}return!0},etx=(e,t)=>{let n=e.selection,r;if(n instanceof $5){if(n.node.isTextblock||!$P(e.doc,n.to))return!1;r=n.to}else if(null==(r=$D(e.doc,n.to,1)))return!1;return t&&t(e.tr.join(r).scrollIntoView()),!0},etb=(e,t)=>{let{$from:n,$to:r}=e.selection,i=n.blockRange(r),o=i&&$U(i);return null!=o&&(t&&t(e.tr.lift(i,o).scrollIntoView()),!0)},etC=(e,t)=>{let{$head:n,$anchor:r}=e.selection;return!!(n.parent.type.spec.code&&n.sameParent(r))&&(t&&t(e.tr.insertText(`
14
- `).scrollIntoView()),!0)};function etS(e){for(let t=0;t<e.edgeCount;t++){let{type:n}=e.edge(t);if(n.isTextblock&&!n.hasRequiredAttrs())return n}return null}let etw=(e,t)=>{let{$head:n,$anchor:r}=e.selection;if(!n.parent.type.spec.code||!n.sameParent(r))return!1;let i=n.node(-1),o=n.indexAfter(-1),a=etS(i.contentMatchAt(o));if(!a||!i.canReplaceWith(o,o,a))return!1;if(t){let u=n.after(),s=e.tr.replaceWith(u,u,a.createAndFill());s.setSelection($$.near(s.doc.resolve(u),1)),t(s.scrollIntoView())}return!0},etI=(e,t)=>{let n=e.selection,{$from:r,$to:i}=n;if(n instanceof $9||r.parent.inlineContent||i.parent.inlineContent)return!1;let o=etS(i.parent.contentMatchAt(i.indexAfter()));if(!o||!o.isTextblock)return!1;if(t){let a=(!r.parentOffset&&i.index()<i.parent.childCount?r:i).pos,u=e.tr.insert(a,o.createAndFill());u.setSelection($2.create(u.doc,a+1)),t(u.scrollIntoView())}return!0},et_=(e,t)=>{let{$cursor:n}=e.selection;if(!n||n.parent.content.size)return!1;if(n.depth>1&&n.after()!=n.end(-1)){let r=n.before();if($B(e.doc,r))return t&&t(e.tr.split(r).scrollIntoView()),!0}let i=n.blockRange(),o=i&&$U(i);return null!=o&&(t&&t(e.tr.lift(i,o).scrollIntoView()),!0)},etT=(e,t)=>{let{$from:n,to:r}=e.selection,i,o=n.sharedDepth(r);return 0!=o&&(i=n.before(o),t&&t(e.tr.setSelection($5.create(e.doc,i))),!0)};function etO(e,t,n){var r,i,o;let a=t.nodeBefore,u=t.nodeAfter,s,l;if(a.type.spec.isolating||u.type.spec.isolating)return!1;let c,d,f;if(c=t.nodeBefore,d=t.nodeAfter,f=t.index(),c&&d&&c.type.compatibleContent(d.type)&&(!c.content.size&&t.parent.canReplace(f-1,f)?(n&&n(e.tr.delete(t.pos-c.nodeSize,t.pos).scrollIntoView()),!0):!!(t.parent.canReplace(f,f+1)&&(d.isTextblock||$P(e.doc,t.pos)))&&(n&&n(e.tr.clearIncompatible(t.pos,c.type,c.contentMatchAt(c.childCount)).join(t.pos).scrollIntoView()),!0)))return!0;let p=t.parent.canReplace(t.index(),t.index()+1);if(p&&(s=(l=a.contentMatchAt(a.childCount)).findWrapping(u.type))&&l.matchType(s[0]||u.type).validEnd){if(n){let A=t.pos+u.nodeSize,h=GR.empty;for(let m=s.length-1;m>=0;m--)h=GR.from(s[m].create(null,h));h=GR.from(a.copy(h));let g=e.tr.step(new $M(t.pos-1,A,t.pos,A,new GU(h,1,0),s.length,!0)),y=A+2*s.length;$P(g.doc,y)&&g.join(y),n(g.scrollIntoView())}return!0}let v=$$.findFrom(t,1),x=v&&v.$from.blockRange(v.$to),b=x&&$U(x);if(null!=b&&b>=t.depth)return n&&n(e.tr.lift(x,b).scrollIntoView()),!0;if(p&&etf(u,"start",!0)&&etf(a,"end")){let C=a,S=[];for(;S.push(C),!C.isTextblock;)C=C.lastChild;let w=u,I=1;for(;!w.isTextblock;w=w.firstChild)I++;if(C.canReplace(C.childCount,C.childCount,w.content)){if(n){let _=GR.empty;for(let T=S.length-1;T>=0;T--)_=GR.from(S[T].copy(_));let O=e.tr.step(new $M(t.pos-S.length,t.pos+u.nodeSize,t.pos+I,t.pos+u.nodeSize-I,new GU(_,S.length,0),0,!0));n(O.scrollIntoView())}return!0}}return!1}function etR(e){return function(t,n){let r=t.selection,i=e<0?r.$from:r.$to,o=i.depth;for(;i.node(o).isInline;){if(!o)return!1;o--}return!!i.node(o).isTextblock&&(n&&n(t.tr.setSelection($2.create(t.doc,e<0?i.start(o):i.end(o)))),!0)}}let etk=etR(-1),etE=etR(1);function etM(e,t=null){return function(n,r){let i=!1;for(let o=0;o<n.selection.ranges.length&&!i;o++){let{$from:{pos:a},$to:{pos:u}}=n.selection.ranges[o];n.doc.nodesBetween(a,u,(r,o)=>{if(i)return!1;if(!(!r.isTextblock||r.hasMarkup(e,t))){if(r.type==e)i=!0;else{let a=n.doc.resolve(o),u=a.index();i=a.parent.canReplaceWith(u,u+1,e)}}})}if(!i)return!1;if(r){let s=n.tr;for(let l=0;l<n.selection.ranges.length;l++){let{$from:{pos:c},$to:{pos:d}}=n.selection.ranges[l];s.setBlockType(c,d,e,t)}r(s.scrollIntoView())}return!0}}function etF(e){let{state:t,transaction:n}=e,{selection:r}=n,{doc:i}=n,{storedMarks:o}=n;return{...t,apply:t.apply.bind(t),applyTransaction:t.applyTransaction.bind(t),plugins:t.plugins,schema:t.schema,reconfigure:t.reconfigure.bind(t),toJSON:t.toJSON.bind(t),get storedMarks(){return o},get selection(){return r},get doc(){return i},get tr(){return r=n.selection,i=n.doc,o=n.storedMarks,n}}}"u">typeof navigator?/Mac|iP(hone|[oa]d)/.test(navigator.platform):"u">typeof os&&os.platform&&os.platform();class etj{constructor(e){this.editor=e.editor,this.rawCommands=this.editor.extensionManager.commands,this.customState=e.state}get hasCustomState(){return!!this.customState}get state(){return this.customState||this.editor.state}get commands(){let{rawCommands:e,editor:t,state:n}=this,{view:r}=t,{tr:i}=n,o=this.buildProps(i);return Object.fromEntries(Object.entries(e).map(([e,t])=>[e,(...e)=>{let n=t(...e)(o);return i.getMeta("preventDispatch")||this.hasCustomState||r.dispatch(i),n}]))}get chain(){return()=>this.createChain()}get can(){return()=>this.createCan()}createChain(e,t=!0){let{rawCommands:n,editor:r,state:i}=this,{view:o}=r,a=[],u=!!e,s=e||i.tr,l=()=>(u||!t||s.getMeta("preventDispatch")||this.hasCustomState||o.dispatch(s),a.every(e=>!0===e)),c={...Object.fromEntries(Object.entries(n).map(([e,n])=>[e,(...e)=>{let r=this.buildProps(s,t),i=n(...e)(r);return a.push(i),c}])),run:l};return c}createCan(e){let{rawCommands:t,state:n}=this,r=e||n.tr,i=this.buildProps(r,!1);return{...Object.fromEntries(Object.entries(t).map(([e,t])=>[e,(...e)=>t(...e)({...i,dispatch:void 0})])),chain:()=>this.createChain(r,!1)}}buildProps(e,t=!0){let{rawCommands:n,editor:r,state:i}=this,{view:o}=r,a={tr:e,editor:r,view:o,state:etF({state:i,transaction:e}),dispatch:t?()=>{}:void 0,chain:()=>this.createChain(e,t),can:()=>this.createCan(e),get commands(){return Object.fromEntries(Object.entries(n).map(([e,t])=>[e,(...e)=>t(...e)(a)]))}};return a}}function etU(e,t,n){return void 0===e.config[t]&&e.parent?etU(e.parent,t,n):"function"==typeof e.config[t]?e.config[t].bind({...n,parent:e.parent?etU(e.parent,t,n):null}):e.config[t]}function etK(e){let t=e.filter(e=>"extension"===e.type),n=e.filter(e=>"node"===e.type),r=e.filter(e=>"mark"===e.type);return{baseExtensions:t,nodeExtensions:n,markExtensions:r}}function etL(e){let t=[],{nodeExtensions:n,markExtensions:r}=etK(e),i={default:null,rendered:!0,renderHTML:null,parseHTML:null,keepOnSplit:!0,isRequired:!1};return e.forEach(e=>{let n={name:e.name,options:e.options,storage:e.storage},r=etU(e,"addGlobalAttributes",n);r&&r().forEach(e=>{e.types.forEach(n=>{Object.entries(e.attributes).forEach(([e,r])=>{t.push({type:n,name:e,attribute:{...i,...r}})})})})}),[...n,...r].forEach(e=>{let n={name:e.name,options:e.options,storage:e.storage},r=etU(e,"addAttributes",n);if(!r)return;let o=r();Object.entries(o).forEach(([n,r])=>{let o={...i,...r};"function"==typeof(null==o?void 0:o.default)&&(o.default=o.default()),null!=o&&o.isRequired&&(null==o?void 0:o.default)===void 0&&delete o.default,t.push({type:e.name,name:n,attribute:o})})}),t}function etB(e,t){if("string"==typeof e){if(!t.nodes[e])throw Error(`There is no node type named '${e}'. Maybe you forgot to add the extension?`);return t.nodes[e]}return e}function etP(...e){return e.filter(e=>!!e).reduce((e,t)=>{let n={...e};return Object.entries(t).forEach(([e,t])=>{if(!n[e]){n[e]=t;return}if("class"===e){let r=t?t.split(" "):[],i=n[e]?n[e].split(" "):[],o=r.filter(e=>!i.includes(e));n[e]=[...i,...o].join(" ")}else"style"===e?n[e]=[n[e],t].join("; "):n[e]=t}),n},{})}function etW(e,t){return t.filter(e=>e.attribute.rendered).map(t=>t.attribute.renderHTML?t.attribute.renderHTML(e.attrs)||{}:{[t.name]:e.attrs[t.name]}).reduce((e,t)=>etP(e,t),{})}function etD(e,t,...n){var r;return"function"==typeof e?t?e.bind(t)(...n):e(...n):e}function etN(e,t){return e.style?e:{...e,getAttrs(n){let r=e.getAttrs?e.getAttrs(n):e.attrs;if(!1===r)return!1;let i=t.reduce((e,t)=>{var r;let i=t.attribute.parseHTML?t.attribute.parseHTML(n):"string"!=typeof(r=n.getAttribute(t.name))?r:r.match(/^[+-]?(?:\d*\.)?\d+$/)?Number(r):"true"===r||"false"!==r&&r;return null==i?e:{...e,[t.name]:i}},{});return{...r,...i}}}}function etq(e){return Object.fromEntries(Object.entries(e).filter(([e,t])=>!("attrs"===e&&function(e={}){return 0===Object.keys(e).length&&e.constructor===Object}(t))&&null!=t))}function etQ(e,t){var n;let r=etL(e),{nodeExtensions:i,markExtensions:o}=etK(e),a=null===(n=i.find(e=>etU(e,"topNode")))||void 0===n?void 0:n.name,u=Object.fromEntries(i.map(n=>{let i=r.filter(e=>e.type===n.name),o={name:n.name,options:n.options,storage:n.storage,editor:t},a=e.reduce((e,t)=>{let r=etU(t,"extendNodeSchema",o);return{...e,...r?r(n):{}}},{}),u=etq({...a,content:etD(etU(n,"content",o)),marks:etD(etU(n,"marks",o)),group:etD(etU(n,"group",o)),inline:etD(etU(n,"inline",o)),atom:etD(etU(n,"atom",o)),selectable:etD(etU(n,"selectable",o)),draggable:etD(etU(n,"draggable",o)),code:etD(etU(n,"code",o)),defining:etD(etU(n,"defining",o)),isolating:etD(etU(n,"isolating",o)),attrs:Object.fromEntries(i.map(e=>{var t;return[e.name,{default:null===(t=null==e?void 0:e.attribute)||void 0===t?void 0:t.default}]}))}),s=etD(etU(n,"parseHTML",o));s&&(u.parseDOM=s.map(e=>etN(e,i)));let l=etU(n,"renderHTML",o);l&&(u.toDOM=e=>l({node:e,HTMLAttributes:etW(e,i)}));let c=etU(n,"renderText",o);return c&&(u.toText=c),[n.name,u]})),s=Object.fromEntries(o.map(n=>{let i=r.filter(e=>e.type===n.name),o={name:n.name,options:n.options,storage:n.storage,editor:t},a=e.reduce((e,t)=>{let r=etU(t,"extendMarkSchema",o);return{...e,...r?r(n):{}}},{}),u=etq({...a,inclusive:etD(etU(n,"inclusive",o)),excludes:etD(etU(n,"excludes",o)),group:etD(etU(n,"group",o)),spanning:etD(etU(n,"spanning",o)),code:etD(etU(n,"code",o)),attrs:Object.fromEntries(i.map(e=>{var t;return[e.name,{default:null===(t=null==e?void 0:e.attribute)||void 0===t?void 0:t.default}]}))}),s=etD(etU(n,"parseHTML",o));s&&(u.parseDOM=s.map(e=>etN(e,i)));let l=etU(n,"renderHTML",o);return l&&(u.toDOM=e=>l({mark:e,HTMLAttributes:etW(e,i)})),[n.name,u]}));return new $r({topNode:a,nodes:u,marks:s})}function etV(e,t){return t.nodes[e]||t.marks[e]||null}function etz(e,t){return Array.isArray(t)?t.some(t=>("string"==typeof t?t:t.name)===e.name):t}let etY=(e,t=500)=>{let n="",r=e.parentOffset;return e.parent.nodesBetween(Math.max(0,r-t),r,(e,t,i,o)=>{var a,u;let s=(null===(u=(a=e.type.spec).toText)||void 0===u?void 0:u.call(a,{node:e,pos:t,parent:i,index:o}))||e.textContent||"%leaf%";n+=s.slice(0,Math.max(0,r-t))}),n};function etH(e){return"[object RegExp]"===Object.prototype.toString.call(e)}class etZ{constructor(e){this.find=e.find,this.handler=e.handler}}let etJ=(e,t)=>{if(etH(t))return t.exec(e);let n=t(e);if(!n)return null;let r=[n.text];return r.index=n.index,r.input=e,r.data=n.data,n.replaceWith&&(n.text.includes(n.replaceWith)||console.warn('[tiptap warn]: "inputRuleMatch.replaceWith" must be part of "inputRuleMatch.text".'),r.push(n.replaceWith)),r};function etG(e){var t;let{editor:n,from:r,to:i,text:o,rules:a,plugin:u}=e,{view:s}=n;if(s.composing)return!1;let l=s.state.doc.resolve(r);if(l.parent.type.spec.code||!(null===(t=l.nodeBefore||l.nodeAfter)||void 0===t)&&t.marks.find(e=>e.type.spec.code))return!1;let c=!1,d=etY(l)+o;return a.forEach(e=>{if(c)return;let t=etJ(d,e.find);if(!t)return;let a=s.state.tr,l=etF({state:s.state,transaction:a}),f={from:r-(t[0].length-o.length),to:i},{commands:p,chain:A,can:h}=new etj({editor:n,state:l});null!==e.handler({state:l,range:f,match:t,commands:p,chain:A,can:h})&&a.steps.length&&(a.setMeta(u,{transform:a,from:r,to:i,text:o}),s.dispatch(a),c=!0)}),c}class et${constructor(e){this.find=e.find,this.handler=e.handler}}let etX=(e,t,n)=>{if(etH(t))return[...e.matchAll(t)];let r=t(e,n);return r?r.map(t=>{let n=[t.text];return n.index=t.index,n.input=e,n.data=t.data,t.replaceWith&&(t.text.includes(t.replaceWith)||console.warn('[tiptap warn]: "pasteRuleMatch.replaceWith" must be part of "pasteRuleMatch.text".'),n.push(t.replaceWith)),n}):[]},et0=e=>{var t;let n=new ClipboardEvent("paste",{clipboardData:new DataTransfer});return null===(t=n.clipboardData)||void 0===t||t.setData("text/html",e),n};class et1{constructor(e,t){this.splittableMarks=[],this.editor=t,this.extensions=et1.resolve(e),this.schema=etQ(this.extensions,t),this.extensions.forEach(e=>{var t;this.editor.extensionStorage[e.name]=e.storage;let n={name:e.name,options:e.options,storage:e.storage,editor:this.editor,type:etV(e.name,this.schema)};"mark"===e.type&&(!(null!==(t=etD(etU(e,"keepOnSplit",n)))&&void 0!==t)||t)&&this.splittableMarks.push(e.name);let r=etU(e,"onBeforeCreate",n);r&&this.editor.on("beforeCreate",r);let i=etU(e,"onCreate",n);i&&this.editor.on("create",i);let o=etU(e,"onUpdate",n);o&&this.editor.on("update",o);let a=etU(e,"onSelectionUpdate",n);a&&this.editor.on("selectionUpdate",a);let u=etU(e,"onTransaction",n);u&&this.editor.on("transaction",u);let s=etU(e,"onFocus",n);s&&this.editor.on("focus",s);let l=etU(e,"onBlur",n);l&&this.editor.on("blur",l);let c=etU(e,"onDestroy",n);c&&this.editor.on("destroy",c)})}static resolve(e){let t=et1.sort(et1.flatten(e)),n=function(e){let t=e.filter((t,n)=>e.indexOf(t)!==n);return[...new Set(t)]}(t.map(e=>e.name));return n.length&&console.warn(`[tiptap warn]: Duplicate extension names found: [${n.map(e=>`'${e}'`).join(", ")}]. This can lead to issues.`),t}static flatten(e){return e.map(e=>{let t={name:e.name,options:e.options,storage:e.storage},n=etU(e,"addExtensions",t);return n?[e,...this.flatten(n())]:e}).flat(10)}static sort(e){return e.sort((e,t)=>{let n=etU(e,"priority")||100,r=etU(t,"priority")||100;return n>r?-1:n<r?1:0})}get commands(){return this.extensions.reduce((e,t)=>{let n={name:t.name,options:t.options,storage:t.storage,editor:this.editor,type:etV(t.name,this.schema)},r=etU(t,"addCommands",n);return r?{...e,...r()}:e},{})}get plugins(){let{editor:e}=this,t=et1.sort([...this.extensions].reverse()),n=[],r=[],i=t.map(t=>{var i,o;let a={name:t.name,options:t.options,storage:t.storage,editor:e,type:etV(t.name,this.schema)},u=[],s=etU(t,"addKeyboardShortcuts",a),l={};if("mark"===t.type&&t.config.exitable&&(l.ArrowRight=()=>erg.handleExit({editor:e,mark:t})),s){let c=Object.fromEntries(Object.entries(s()).map(([t,n])=>[t,()=>n({editor:e})]));l={...l,...c}}let d,f=(i=l,new Xn({props:{handleKeyDown:(o=i,d=function(e){let t=Object.create(null);for(let n in e)t[eeQ(n)]=e[n];return t}(o),function(e,t){var n,r;let i=("Esc"==(r=!(eeP&&t.metaKey&&t.shiftKey&&!t.ctrlKey&&!t.altKey||eeW&&t.shiftKey&&t.key&&1==t.key.length||"Unidentified"==t.key)&&t.key||(t.shiftKey?eeB:eeL)[t.keyCode]||t.key||"Unidentified")&&(r="Escape"),"Del"==r&&(r="Delete"),"Left"==r&&(r="ArrowLeft"),"Up"==r&&(r="ArrowUp"),"Right"==r&&(r="ArrowRight"),"Down"==r&&(r="ArrowDown"),r),o,a=d[eeV(i,t)];if(a&&a(e.state,e.dispatch,e))return!0;if(1==i.length&&" "!=i){if(t.shiftKey){let u=d[eeV(i,t,!1)];if(u&&u(e.state,e.dispatch,e))return!0}if((t.shiftKey||t.altKey||t.metaKey||i.charCodeAt(0)>127)&&(o=eeL[t.keyCode])&&o!=i){let s=d[eeV(o,t)];if(s&&s(e.state,e.dispatch,e))return!0}}return!1})}}));u.push(f);let p=etU(t,"addInputRules",a);etz(t,e.options.enableInputRules)&&p&&n.push(...p());let A=etU(t,"addPasteRules",a);etz(t,e.options.enablePasteRules)&&A&&r.push(...A());let h=etU(t,"addProseMirrorPlugins",a);if(h){let m=h();u.push(...m)}return u}).flat();return[function(e){let{editor:t,rules:n}=e,r=new Xn({state:{init:()=>null,apply(e,i){let o=e.getMeta(r);if(o)return o;let a=e.getMeta("applyInputRules");return a&&setTimeout(()=>{let{from:e,text:i}=a,o=e+i.length;etG({editor:t,from:e,to:o,text:i,rules:n,plugin:r})}),e.selectionSet||e.docChanged?null:i}},props:{handleTextInput:(e,i,o,a)=>etG({editor:t,from:i,to:o,text:a,rules:n,plugin:r}),handleDOMEvents:{compositionend:e=>(setTimeout(()=>{let{$cursor:i}=e.state.selection;i&&etG({editor:t,from:i.pos,to:i.pos,text:"",rules:n,plugin:r})}),!1)},handleKeyDown(e,i){if("Enter"!==i.key)return!1;let{$cursor:o}=e.state.selection;return!!o&&etG({editor:t,from:o.pos,to:o.pos,text:`
15
- `,rules:n,plugin:r})}},isInputRules:!0});return r}({editor:e,rules:n}),...function(e){let{editor:t,rules:n}=e,r=null,i=!1,o=!1,a="u">typeof ClipboardEvent?new ClipboardEvent("paste"):null,u="u">typeof DragEvent?new DragEvent("drop"):null,s=({state:e,from:n,to:r,rule:i,pasteEvt:o})=>{let s=e.tr,l=etF({state:e,transaction:s});if(!(!function(e){let{editor:t,state:n,from:r,to:i,rule:o,pasteEvent:a,dropEvent:u}=e,{commands:s,chain:l,can:c}=new etj({editor:t,state:n}),d=[];return n.doc.nodesBetween(r,i,(e,t)=>{if(!e.isTextblock||e.type.spec.code)return;let f=Math.max(r,t),p=Math.min(i,t+e.content.size),A=e.textBetween(f-t,p-t,void 0,"");etX(A,o.find,a).forEach(e=>{if(void 0===e.index)return;let t=f+e.index+1,r=t+e[0].length,i={from:n.tr.mapping.map(t),to:n.tr.mapping.map(r)},p=o.handler({state:n,range:i,match:e,commands:s,chain:l,can:c,pasteEvent:a,dropEvent:u});d.push(p)})}),d.every(e=>null!==e)}({editor:t,state:l,from:Math.max(n-1,0),to:r.b-1,rule:i,pasteEvent:o,dropEvent:u})||!s.steps.length))return u="u">typeof DragEvent?new DragEvent("drop"):null,a="u">typeof ClipboardEvent?new ClipboardEvent("paste"):null,s};return n.map(e=>new Xn({view(e){let t=t=>{var n;r=!(null===(n=e.dom.parentElement)||void 0===n)&&n.contains(t.target)?e.dom.parentElement:null};return window.addEventListener("dragstart",t),{destroy(){window.removeEventListener("dragstart",t)}}},props:{handleDOMEvents:{drop:(e,t)=>(o=r===e.dom.parentElement,u=t,!1),paste(e,t){var n;let r=null===(n=t.clipboardData)||void 0===n?void 0:n.getData("text/html");return a=t,i=!!(null!=r&&r.includes("data-pm-slice")),!1}}},appendTransaction(t,n,r){var u;let l=t[0],c="paste"===l.getMeta("uiEvent")&&!i,d="drop"===l.getMeta("uiEvent")&&!o,f=l.getMeta("applyPasteRules"),p=!!f;if(!c&&!d&&!p)return;if(p){let{from:A,text:h}=f,m=A+h.length,g=et0(h);return s({rule:e,state:r,from:A,to:{b:m},pasteEvt:g})}let y=n.doc.content.findDiffStart(r.doc.content),v=n.doc.content.findDiffEnd(r.doc.content);if("number"==typeof y&&v&&y!==v.b)return s({rule:e,state:r,from:y,to:v,pasteEvt:a})}}))}({editor:e,rules:r}),...i]}get attributes(){return etL(this.extensions)}get nodeViews(){let{editor:e}=this,{nodeExtensions:t}=etK(this.extensions);return Object.fromEntries(t.filter(e=>!!etU(e,"addNodeView")).map(t=>{let n=this.attributes.filter(e=>e.type===t.name),r={name:t.name,options:t.options,storage:t.storage,editor:e,type:etB(t.name,this.schema)},i=etU(t,"addNodeView",r);if(!i)return[];let o=(r,o,a,u)=>{let s=etW(r,n);return i()({editor:e,node:r,getPos:a,decorations:u,HTMLAttributes:s,extension:t})};return[t.name,o]}))}}function et2(e){var t;return"Object"===Object.prototype.toString.call(e).slice(8,-1)&&e.constructor===Object&&Object.getPrototypeOf(e)===Object.prototype}function et6(e,t){let n={...e};return et2(e)&&et2(t)&&Object.keys(t).forEach(r=>{et2(t[r])&&r in e?n[r]=et6(e[r],t[r]):Object.assign(n,{[r]:t[r]})}),n}class et5{constructor(e={}){this.type="extension",this.name="extension",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...e},this.name=this.config.name,e.defaultOptions&&Object.keys(e.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=etD(etU(this,"addOptions",{name:this.name}))),this.storage=etD(etU(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(e={}){return new et5(e)}configure(e={}){let t=this.extend();return t.options=et6(this.options,e),t.storage=etD(etU(t,"addStorage",{name:t.name,options:t.options})),t}extend(e={}){let t=new et5({...this.config,...e});return t.parent=this,this.child=t,t.name=e.name?e.name:t.parent.name,e.defaultOptions&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${t.name}".`),t.options=etD(etU(t,"addOptions",{name:t.name})),t.storage=etD(etU(t,"addStorage",{name:t.name,options:t.options})),t}}et5.create({name:"clipboardTextSerializer",addOptions:()=>({blockSeparator:void 0}),addProseMirrorPlugins(){return[new Xn({key:new Xo("clipboardTextSerializer"),props:{clipboardTextSerializer:()=>{var e;let{editor:t}=this,{state:n,schema:r}=t,{doc:i,selection:o}=n,{ranges:a}=o,u=Math.min(...a.map(e=>e.$from.pos)),s=Math.max(...a.map(e=>e.$to.pos)),l=Object.fromEntries(Object.entries(r.nodes).filter(([,e])=>e.spec.toText).map(([e,t])=>[e,t.spec.toText]));return function(e,t,n){let{from:r,to:i}=t,{blockSeparator:o=`
16
-
17
- `,textSerializers:a={}}=n||{},u="",s=!0;return e.nodesBetween(r,i,(e,n,l,c)=>{var d;let f=null==a?void 0:a[e.type.name];if(f)return e.isBlock&&!s&&(u+=o,s=!0),l&&(u+=f({node:e,pos:n,parent:l,index:c,range:t})),!1;e.isText?(u+=null===(d=null==e?void 0:e.text)||void 0===d?void 0:d.slice(Math.max(r,n)-n,i-n),s=!1):e.isBlock&&!s&&(u+=o,s=!0)}),u}(i,{from:u,to:s},{...void 0!==this.options.blockSeparator?{blockSeparator:this.options.blockSeparator}:{},textSerializers:l})}}})]}});let et3=()=>({editor:e,view:t})=>(requestAnimationFrame(()=>{var n;e.isDestroyed||(t.dom.blur(),null===(n=null==window?void 0:window.getSelection())||void 0===n||n.removeAllRanges())}),!0),et9=(e=!1)=>({commands:t})=>t.setContent("",e),et4=()=>({state:e,tr:t,dispatch:n})=>{let{selection:r}=t,{ranges:i}=r;return n&&i.forEach(({$from:n,$to:r})=>{e.doc.nodesBetween(n.pos,r.pos,(e,n)=>{if(e.type.isText)return;let{doc:r,mapping:i}=t,o=r.resolve(i.map(n)),a=r.resolve(i.map(n+e.nodeSize)),u=o.blockRange(a);if(!u)return;let s=function(e){let t=e.parent.content.cutByIndex(e.startIndex,e.endIndex);for(let n=e.depth;;--n){let r=e.$from.node(n),i=e.$from.index(n),o=e.$to.indexAfter(n);if(n<e.depth&&r.canReplace(i,o,t))return n;if(0==n||r.type.spec.isolating||!ee4(r,i,o))break}return null}(u);if(e.type.isTextblock){let{defaultType:l}=o.parent.contentMatchAt(o.index());t.setNodeMarkup(u.start,l)}(s||0===s)&&t.lift(u,s)})}),!0},et7=e=>t=>e(t),et8=()=>({state:e,dispatch:t})=>etI(e,t),ene=(e,t)=>({editor:n,tr:r})=>{let{state:i}=n,o=i.doc.slice(e.from,e.to);r.deleteRange(e.from,e.to);let a=r.mapping.map(t);return r.insert(a,o.content),r.setSelection(new $2(r.doc.resolve(a-1))),!0},ent=()=>({tr:e,dispatch:t})=>{let{selection:n}=e,r=n.$anchor.node();if(r.content.size>0)return!1;let i=e.selection.$anchor;for(let o=i.depth;o>0;o-=1)if(i.node(o).type===r.type){if(t){let a=i.before(o),u=i.after(o);e.delete(a,u).scrollIntoView()}return!0}return!1},enn=e=>({tr:t,state:n,dispatch:r})=>{let i=etB(e,n.schema),o=t.selection.$anchor;for(let a=o.depth;a>0;a-=1)if(o.node(a).type===i){if(r){let u=o.before(a),s=o.after(a);t.delete(u,s).scrollIntoView()}return!0}return!1},enr=e=>({tr:t,dispatch:n})=>{let{from:r,to:i}=e;return n&&t.delete(r,i),!0},eni=()=>({state:e,dispatch:t})=>eta(e,t),eno=()=>({commands:e})=>e.keyboardShortcut("Enter"),ena=()=>({state:e,dispatch:t})=>etw(e,t);function enu(e,t,n={strict:!0}){let r=Object.keys(t);return!r.length||r.every(r=>n.strict?t[r]===e[r]:etH(t[r])?t[r].test(e[r]):t[r]===e[r])}function ens(e,t,n={}){return e.find(e=>e.type===t&&enu(e.attrs,n))}function enl(e,t,n={}){return!!ens(e,t,n)}function enc(e,t,n={}){if(!e||!t)return;let r=e.parent.childAfter(e.parentOffset);if(e.parentOffset===r.offset&&0!==r.offset&&(r=e.parent.childBefore(e.parentOffset)),!r.node)return;let i=ens([...r.node.marks],t,n);if(!i)return;let o=r.index,a=e.start()+r.offset,u=o+1,s=a+r.node.nodeSize;for(ens([...r.node.marks],t,n);o>0&&i.isInSet(e.parent.child(o-1).marks);)o-=1,a-=e.parent.child(o).nodeSize;for(;u<e.parent.childCount&&enl([...e.parent.child(u).marks],t,n);)s+=e.parent.child(u).nodeSize,u+=1;return{from:a,to:s}}function end(e,t){if("string"==typeof e){if(!t.marks[e])throw Error(`There is no mark type named '${e}'. Maybe you forgot to add the extension?`);return t.marks[e]}return e}let enf=(e,t={})=>({tr:n,state:r,dispatch:i})=>{let o=end(e,r.schema),{doc:a,selection:u}=n,{$from:s,from:l,to:c}=u;if(i){let d=enc(s,o,t);if(d&&d.from<=l&&d.to>=c){let f=$2.create(a,d.from,d.to);n.setSelection(f)}}return!0},enp=e=>t=>{let n="function"==typeof e?e(t):e;for(let r=0;r<n.length;r+=1)if(n[r](t))return!0;return!1};function enA(e){return e instanceof $2}function enh(e=0,t=0,n=0){return Math.min(Math.max(e,t),n)}function enm(){return["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(navigator.platform)||navigator.userAgent.includes("Mac")&&"ontouchend"in document}let eng=(e=null,t={})=>({editor:n,view:r,tr:i,dispatch:o})=>{t={scrollIntoView:!0,...t};let a=()=>{enm()&&r.dom.focus(),requestAnimationFrame(()=>{n.isDestroyed||(r.focus(),null!=t&&t.scrollIntoView&&n.commands.scrollIntoView())})};if(r.hasFocus()&&null===e||!1===e)return!0;if(o&&null===e&&!enA(n.state.selection))return a(),!0;let u=function(e,t=null){if(!t)return null;let n=$$.atStart(e),r=$$.atEnd(e);if("start"===t||!0===t)return n;if("end"===t)return r;let i=n.from,o=r.to;return"all"===t?$2.create(e,enh(0,i,o),enh(e.content.size,i,o)):$2.create(e,enh(t,i,o),enh(t,i,o))}(i.doc,e)||n.state.selection,s=n.state.selection.eq(u);return o&&(s||i.setSelection(u),s&&i.storedMarks&&i.setStoredMarks(i.storedMarks),a()),!0},eny=(e,t)=>n=>e.every((e,r)=>t(e,{...n,index:r})),env=(e,t)=>({tr:n,commands:r})=>r.insertContentAt({from:n.selection.from,to:n.selection.to},e,t),enx=e=>{let t=e.childNodes;for(let n=t.length-1;n>=0;n-=1){let r=t[n];3===r.nodeType&&r.nodeValue&&/^(\n\s\s|\n)$/.test(r.nodeValue)?e.removeChild(r):1===r.nodeType&&enx(r)}return e};function enb(e){let t=`<body>${e}</body>`,n=new window.DOMParser().parseFromString(t,"text/html").body;return enx(n)}function enC(e,t,n){if(n={slice:!0,parseOptions:{},...n},"object"==typeof e&&null!==e)try{return Array.isArray(e)&&e.length>0?GR.fromArray(e.map(e=>t.nodeFromJSON(e))):t.nodeFromJSON(e)}catch(r){return console.warn("[tiptap warn]: Invalid content.","Passed value:",e,"Error:",r),enC("",t,n)}if("string"==typeof e){let i=$o.fromSchema(t);return n.slice?i.parseSlice(enb(e),n.parseOptions).content:i.parse(enb(e),n.parseOptions)}return enC("",t,n)}let enS=e=>e.toString().startsWith("<"),enw=(e,t,n)=>({tr:r,dispatch:i,editor:o})=>{if(i){n={parseOptions:{},updateSelection:!0,applyInputRules:!1,applyPasteRules:!1,...n};let a=enC(t,o.schema,{parseOptions:{preserveWhitespace:"full",...n.parseOptions}});if("<>"===a.toString())return!0;let{from:u,to:s}="number"==typeof e?{from:e,to:e}:{from:e.from,to:e.to},l=!0,c=!0;if((enS(a)?a:[a]).forEach(e=>{e.check(),l=!!l&&e.isText&&0===e.marks.length,c=!!c&&e.isBlock}),u===s&&c){let{parent:d}=r.doc.resolve(u);!d.isTextblock||d.type.spec.code||d.childCount||(u-=1,s+=1)}let f;l?(f=Array.isArray(t)?t.map(e=>e.text||"").join(""):"object"==typeof t&&t&&t.text?t.text:t,r.insertText(f,u,s)):(f=a,r.replaceWith(u,s,f)),n.updateSelection&&function(e,t,n){let r=e.steps.length-1;if(r<t)return;let i=e.steps[r];if(!(i instanceof ee5||i instanceof ee3))return;let o=e.mapping.maps[r],a=0;o.forEach((e,t,n,r)=>{0===a&&(a=r)}),e.setSelection($$.near(e.doc.resolve(a),-1))}(r,r.steps.length-1,-1),n.applyInputRules&&r.setMeta("applyInputRules",{from:u,text:f}),n.applyPasteRules&&r.setMeta("applyPasteRules",{from:u,text:f})}return!0},enI=()=>({state:e,dispatch:t})=>etv(e,t),en_=()=>({state:e,dispatch:t})=>etx(e,t),enT=()=>({state:e,dispatch:t})=>ets(e,t),enO=()=>({state:e,dispatch:t})=>etm(e,t),enR=()=>({tr:e,state:t,dispatch:n})=>{try{let r=etn(t.doc,t.selection.$from.pos,-1);return null!=r&&(e.join(r,2),n&&n(e),!0)}catch{return!1}},enk=()=>({state:e,dispatch:t,tr:n})=>{try{let r=etn(e.doc,e.selection.$from.pos,1);return null!=r&&(n.join(r,2),t&&t(n),!0)}catch{return!1}},enE=()=>({state:e,dispatch:t})=>etl(e,t),enM=()=>({state:e,dispatch:t})=>etc(e,t);function enF(){return"u">typeof navigator&&/Mac/.test(navigator.platform)}let enj=e=>({editor:t,view:n,tr:r,dispatch:i})=>{let o=(function(e){let t=e.split(/-(?!$)/),n=t[t.length-1];"Space"===n&&(n=" ");let r,i,o,a;for(let u=0;u<t.length-1;u+=1){let s=t[u];if(/^(cmd|meta|m)$/i.test(s))a=!0;else if(/^a(lt)?$/i.test(s))r=!0;else if(/^(c|ctrl|control)$/i.test(s))i=!0;else if(/^s(hift)?$/i.test(s))o=!0;else if(/^mod$/i.test(s))enm()||enF()?a=!0:i=!0;else throw Error(`Unrecognized modifier name: ${s}`)}return r&&(n=`Alt-${n}`),i&&(n=`Ctrl-${n}`),a&&(n=`Meta-${n}`),o&&(n=`Shift-${n}`),n})(e).split(/-(?!$)/),a=o.find(e=>!["Alt","Ctrl","Meta","Shift"].includes(e)),u=new KeyboardEvent("keydown",{key:"Space"===a?" ":a,altKey:o.includes("Alt"),ctrlKey:o.includes("Ctrl"),metaKey:o.includes("Meta"),shiftKey:o.includes("Shift"),bubbles:!0,cancelable:!0}),s=t.captureTransaction(()=>{n.someProp("handleKeyDown",e=>e(n,u))});return null==s||s.steps.forEach(e=>{let t=e.map(r.mapping);t&&i&&r.maybeStep(t)}),!0};function enU(e,t,n={}){let{from:r,to:i,empty:o}=e.selection,a=t?etB(t,e.schema):null,u=[];e.doc.nodesBetween(r,i,(e,t)=>{if(e.isText)return;let n=Math.min(i,t+e.nodeSize);u.push({node:e,from:Math.max(r,t),to:n})});let s=u.filter(e=>!a||a.name===e.node.type.name).filter(e=>enu(e.node.attrs,n,{strict:!1}));return o?!!s.length:s.reduce((e,t)=>e+t.to-t.from,0)>=i-r}let enK=(e,t={})=>({state:n,dispatch:r})=>{let i=etB(e,n.schema);return!!enU(n,i,t)&&etb(n,r)},enL=()=>({state:e,dispatch:t})=>et_(e,t),enB=e=>({state:t,dispatch:n})=>{var r;let i=etB(e,t.schema);return function(e,t){let{$from:n,$to:r}=e.selection,o=n.blockRange(r,e=>e.childCount>0&&e.firstChild.type==i);return!!o&&(!t||(n.node(o.depth-1).type==i?function(e,t,n,r){let i=e.tr,o=r.end,a=r.$to.end(r.depth);o<a&&(i.step(new $M(o-1,a,o,a,new GU(GR.from(n.create(null,r.parent.copy())),1,0),1,!0)),r=new Gz(i.doc.resolve(r.$from.pos),i.doc.resolve(a),r.depth));let u=$U(r);if(null==u)return!1;i.lift(r,u);let s=i.mapping.map(o,-1)-1;return $P(i.doc,s)&&i.join(s),t(i.scrollIntoView()),!0}(e,t,i,o):function(e,t,n){let r=e.tr,i=n.parent;for(let o=n.end,a=n.endIndex-1,u=n.startIndex;a>u;a--)o-=i.child(a).nodeSize,r.delete(o-1,o+1);let s=r.doc.resolve(n.start),l=s.nodeAfter;if(r.mapping.map(n.end)!=n.start+s.nodeAfter.nodeSize)return!1;let c=0==n.startIndex,d=n.endIndex==i.childCount,f=s.node(-1),p=s.index(-1);if(!f.canReplace(p+(c?0:1),p+1,l.content.append(d?GR.empty:GR.from(i))))return!1;let A=s.pos,h=A+l.nodeSize;return r.step(new $M(A-(c?1:0),h+(d?1:0),A+1,h-1,new GU((c?GR.empty:GR.from(i.copy(GR.empty))).append(d?GR.empty:GR.from(i.copy(GR.empty))),c?0:1,d?0:1),c?0:1)),t(r.scrollIntoView()),!0}(e,t,o)))}(t,n)},enP=()=>({state:e,dispatch:t})=>etC(e,t);function enW(e,t){return t.nodes[e]?"node":t.marks[e]?"mark":null}function enD(e,t){let n="string"==typeof t?[t]:t;return Object.keys(e).reduce((t,r)=>(n.includes(r)||(t[r]=e[r]),t),{})}let enN=(e,t)=>({tr:n,state:r,dispatch:i})=>{let o=null,a=null,u=enW("string"==typeof e?e:e.name,r.schema);return!!u&&("node"===u&&(o=etB(e,r.schema)),"mark"===u&&(a=end(e,r.schema)),i&&n.selection.ranges.forEach(e=>{r.doc.nodesBetween(e.$from.pos,e.$to.pos,(e,r)=>{o&&o===e.type&&n.setNodeMarkup(r,void 0,enD(e.attrs,t)),a&&e.marks.length&&e.marks.forEach(i=>{a===i.type&&n.addMark(r,r+e.nodeSize,a.create(enD(i.attrs,t)))})})}),!0)},enq=()=>({tr:e,dispatch:t})=>(t&&e.scrollIntoView(),!0),enQ=()=>({tr:e,commands:t})=>t.setTextSelection({from:0,to:e.doc.content.size}),enV=()=>({state:e,dispatch:t})=>etp(e,t),enz=()=>({state:e,dispatch:t})=>etg(e,t),enY=()=>({state:e,dispatch:t})=>etT(e,t),enH=()=>({state:e,dispatch:t})=>etE(e,t),enZ=()=>({state:e,dispatch:t})=>etk(e,t),enJ=(e,t=!1,n={})=>({tr:r,editor:i,dispatch:o})=>{let{doc:a}=r,u=function(e,t,n={}){return enC(e,t,{slice:!1,parseOptions:n})}(e,i.schema,n);return o&&r.replaceWith(0,a.content.size,u).setMeta("preventUpdate",!t),!0};function enG(e,t){let n=end(t,e.schema),{from:r,to:i,empty:o}=e.selection,a=[];o?(e.storedMarks&&a.push(...e.storedMarks),a.push(...e.selection.$head.marks())):e.doc.nodesBetween(r,i,e=>{a.push(...e.marks)});let u=a.find(e=>e.type.name===n.name);return u?{...u.attrs}:{}}function en$(e){return t=>(function(e,t){for(let n=e.depth;n>0;n-=1){let r=e.node(n);if(t(r))return{pos:n>0?e.before(n):0,start:e.start(n),depth:n,node:r}}})(t.$from,e)}function enX(e,t,n){let r=[];return e===t?n.resolve(e).marks().forEach(t=>{let i=n.resolve(e-1),o=enc(i,t.type);o&&r.push({mark:t,...o})}):n.nodesBetween(e,t,(e,t)=>{e&&(null==e?void 0:e.nodeSize)!==void 0&&r.push(...e.marks.map(n=>({from:t,to:t+e.nodeSize,mark:n})))}),r}function en0(e,t,n){return Object.fromEntries(Object.entries(n).filter(([n])=>{let r=e.find(e=>e.type===t&&e.name===n);return!!r&&r.attribute.keepOnSplit}))}function en1(e,t){let{nodeExtensions:n}=etK(t),r=n.find(t=>t.name===e);if(!r)return!1;let i={name:r.name,options:r.options,storage:r.storage},o=etD(etU(r,"group",i));return"string"==typeof o&&o.split(" ").includes("list")}let en2=(e,t={})=>({tr:n,state:r,dispatch:i})=>{let{selection:o}=n,{empty:a,ranges:u}=o,s=end(e,r.schema);if(i){if(a){let l=enG(r,s);n.addStoredMark(s.create({...l,...t}))}else u.forEach(e=>{let i=e.$from.pos,o=e.$to.pos;r.doc.nodesBetween(i,o,(e,r)=>{let a=Math.max(r,i),u=Math.min(r+e.nodeSize,o);e.marks.find(e=>e.type===s)?e.marks.forEach(e=>{s===e.type&&n.addMark(a,u,s.create({...e.attrs,...t}))}):n.addMark(a,u,s.create(t))})})}return function(e,t,n){var r;let{selection:i}=t,o=null;if(enA(i)&&(o=i.$cursor),o){let a=null!==(r=e.storedMarks)&&void 0!==r?r:o.marks();return!!n.isInSet(a)||!a.some(e=>e.type.excludes(n))}let{ranges:u}=i;return u.some(({$from:t,$to:r})=>{let i=0===t.depth&&e.doc.inlineContent&&e.doc.type.allowsMarkType(n);return e.doc.nodesBetween(t.pos,r.pos,(e,t,r)=>{if(i)return!1;if(e.isInline){let o=!r||r.type.allowsMarkType(n),a=!!n.isInSet(e.marks)||!e.marks.some(e=>e.type.excludes(n));i=o&&a}return!i}),i})}(r,n,s)},en6=(e,t)=>({tr:n})=>(n.setMeta(e,t),!0),en5=(e,t={})=>({state:n,dispatch:r,chain:i})=>{let o=etB(e,n.schema);return o.isTextblock?i().command(({commands:e})=>!!etM(o,t)(n)||e.clearNodes()).command(({state:e})=>etM(o,t)(e,r)).run():(console.warn('[tiptap warn]: Currently "setNode()" only supports text block nodes.'),!1)},en3=e=>({tr:t,dispatch:n})=>{if(n){let{doc:r}=t,i=enh(e,0,r.content.size),o=$5.create(r,i);t.setSelection(o)}return!0},en9=e=>({tr:t,dispatch:n})=>{if(n){let{doc:r}=t,{from:i,to:o}="number"==typeof e?{from:e,to:e}:e,a=$2.atStart(r).from,u=$2.atEnd(r).to,s=enh(i,a,u),l=enh(o,a,u),c=$2.create(r,s,l);t.setSelection(c)}return!0},en4=e=>({state:t,dispatch:n})=>{var r;let i=etB(e,t.schema);return function(e,t){let{$from:n,$to:r}=e.selection,o=n.blockRange(r,e=>e.childCount>0&&e.firstChild.type==i);if(!o)return!1;let a=o.startIndex;if(0==a)return!1;let u=o.parent,s=u.child(a-1);if(s.type!=i)return!1;if(t){let l=s.lastChild&&s.lastChild.type==u.type,c=GR.from(l?i.create():null),d=new GU(GR.from(i.create(null,GR.from(u.type.create(null,c)))),l?3:1,0),f=o.start,p=o.end;t(e.tr.step(new $M(f-(l?3:1),p,f,p,d,1,!0)).scrollIntoView())}return!0}(t,n)};function en7(e,t){let n=e.storedMarks||e.selection.$to.parentOffset&&e.selection.$from.marks();if(n){let r=n.filter(e=>null==t?void 0:t.includes(e.type.name));e.tr.ensureMarks(r)}}let en8=({keepMarks:e=!0}={})=>({tr:t,state:n,dispatch:r,editor:i})=>{let{selection:o,doc:a}=t,{$from:u,$to:s}=o,l=i.extensionManager.attributes,c=en0(l,u.node().type.name,u.node().attrs);if(o instanceof $5&&o.node.isBlock)return!!(u.parentOffset&&ee8(a,u.pos))&&(r&&(e&&en7(n,i.extensionManager.splittableMarks),t.split(u.pos).scrollIntoView()),!0);if(!u.parent.isBlock)return!1;if(r){let d=s.parentOffset===s.parent.content.size;o instanceof $2&&t.deleteSelection();let f=0===u.depth?void 0:function(e){for(let t=0;t<e.edgeCount;t+=1){let{type:n}=e.edge(t);if(n.isTextblock&&!n.hasRequiredAttrs())return n}return null}(u.node(-1).contentMatchAt(u.indexAfter(-1))),p=d&&f?[{type:f,attrs:c}]:void 0,A=ee8(t.doc,t.mapping.map(u.pos),1,p);if(!p&&!A&&ee8(t.doc,t.mapping.map(u.pos),1,f?[{type:f}]:void 0)&&(A=!0,p=f?[{type:f,attrs:c}]:void 0),A&&(t.split(t.mapping.map(u.pos),1,p),f&&!d&&!u.parentOffset&&u.parent.type!==f)){let h=t.mapping.map(u.before()),m=t.doc.resolve(h);u.node(-1).canReplaceWith(m.index(),m.index()+1,f)&&t.setNodeMarkup(t.mapping.map(u.before()),f)}e&&en7(n,i.extensionManager.splittableMarks),t.scrollIntoView()}return!0},ere=e=>({tr:t,state:n,dispatch:r,editor:i})=>{var o;let a=etB(e,n.schema),{$from:u,$to:s}=n.selection,l=n.selection.node;if(l&&l.isBlock||u.depth<2||!u.sameParent(s))return!1;let c=u.node(-1);if(c.type!==a)return!1;let d=i.extensionManager.attributes;if(0===u.parent.content.size&&u.node(-1).childCount===u.indexAfter(-1)){if(2===u.depth||u.node(-3).type!==a||u.index(-2)!==u.node(-2).childCount-1)return!1;if(r){let f=GR.empty,p=u.index(-1)?1:u.index(-2)?2:3;for(let A=u.depth-p;A>=u.depth-3;A-=1)f=GR.from(u.node(A).copy(f));let h=u.indexAfter(-1)<u.node(-2).childCount?1:u.indexAfter(-2)<u.node(-3).childCount?2:3,m=en0(d,u.node().type.name,u.node().attrs),g=(null===(o=a.contentMatch.defaultType)||void 0===o?void 0:o.createAndFill(m))||void 0;f=f.append(GR.from(a.createAndFill(null,g)||void 0));let y=u.before(u.depth-(p-1));t.replace(y,u.after(-h),new GU(f,4-p,0));let v=-1;t.doc.nodesBetween(y,t.doc.content.size,(e,t)=>{if(v>-1)return!1;e.isTextblock&&0===e.content.size&&(v=t+1)}),v>-1&&t.setSelection($2.near(t.doc.resolve(v))),t.scrollIntoView()}return!0}let x=s.pos===u.end()?c.contentMatchAt(0).defaultType:null,b=en0(d,c.type.name,c.attrs),C=en0(d,u.node().type.name,u.node().attrs);if(t.delete(u.pos,s.pos),!ee8(t.doc,u.pos,2))return!1;if(r){let{selection:S,storedMarks:w}=n,{splittableMarks:I}=i.extensionManager,_=w||S.$to.parentOffset&&S.$from.marks();if(t.split(u.pos,2,x?[{type:a,attrs:b},{type:x,attrs:C}]:[{type:a,attrs:b}]).scrollIntoView(),!_||!r)return!0;let T=_.filter(e=>I.includes(e.type.name));t.ensureMarks(T)}return!0},ert=(e,t)=>{let n=en$(e=>e.type===t)(e.selection);if(!n)return!0;let r=e.doc.resolve(Math.max(0,n.pos-1)).before(n.depth);if(void 0===r)return!0;let i=e.doc.nodeAt(r);return n.node.type===(null==i?void 0:i.type)&&ete(e.doc,n.pos)&&e.join(n.pos),!0},ern=(e,t)=>{let n=en$(e=>e.type===t)(e.selection);if(!n)return!0;let r=e.doc.resolve(n.start).after(n.depth);if(void 0===r)return!0;let i=e.doc.nodeAt(r);return n.node.type===(null==i?void 0:i.type)&&ete(e.doc,r)&&e.join(r),!0},err=(e,t,n,r={})=>({editor:i,tr:o,state:a,dispatch:u,chain:s,commands:l,can:c})=>{let{extensions:d,splittableMarks:f}=i.extensionManager,p=etB(e,a.schema),A=etB(t,a.schema),{selection:h,storedMarks:m}=a,{$from:g,$to:y}=h,v=g.blockRange(y),x=m||h.$to.parentOffset&&h.$from.marks();if(!v)return!1;let b=en$(e=>en1(e.type.name,d))(h);if(v.depth>=1&&b&&v.depth-b.depth<=1){if(b.node.type===p)return l.liftListItem(A);if(en1(b.node.type.name,d)&&p.validContent(b.node.content)&&u)return s().command(()=>(o.setNodeMarkup(b.pos,p),!0)).command(()=>ert(o,p)).command(()=>ern(o,p)).run()}return n&&x&&u?s().command(()=>{let e=c().wrapInList(p,r),t=x.filter(e=>f.includes(e.type.name));return o.ensureMarks(t),!!e||l.clearNodes()}).wrapInList(p,r).command(()=>ert(o,p)).command(()=>ern(o,p)).run():s().command(()=>!!c().wrapInList(p,r)||l.clearNodes()).wrapInList(p,r).command(()=>ert(o,p)).command(()=>ern(o,p)).run()},eri=(e,t={},n={})=>({state:r,commands:i})=>{let{extendEmptyMarkRange:o=!1}=n,a=end(e,r.schema);return!function(e,t,n={}){let{empty:r,ranges:i}=e.selection,o=t?end(t,e.schema):null;if(r)return!!(e.storedMarks||e.selection.$from.marks()).filter(e=>!o||o.name===e.type.name).find(e=>enu(e.attrs,n,{strict:!1}));let a=0,u=[];if(i.forEach(({$from:t,$to:n})=>{let r=t.pos,i=n.pos;e.doc.nodesBetween(r,i,(e,t)=>{if(!e.isText&&!e.marks.length)return;let n=Math.max(r,t),o=Math.min(i,t+e.nodeSize);a+=o-n,u.push(...e.marks.map(e=>({mark:e,from:n,to:o})))})}),0===a)return!1;let s=u.filter(e=>!o||o.name===e.mark.type.name).filter(e=>enu(e.mark.attrs,n,{strict:!1})).reduce((e,t)=>e+t.to-t.from,0),l=u.filter(e=>!o||e.mark.type!==o&&e.mark.type.excludes(o)).reduce((e,t)=>e+t.to-t.from,0);return(s>0?s+l:s)>=a}(r,a,t)?i.setMark(a,t):i.unsetMark(a,{extendEmptyMarkRange:o})},ero=(e,t,n={})=>({state:r,commands:i})=>{let o=etB(e,r.schema),a=etB(t,r.schema);return enU(r,o,n)?i.setNode(a):i.setNode(o,n)},era=(e,t={})=>({state:n,commands:r})=>{let i=etB(e,n.schema);return enU(n,i,t)?r.lift(i):r.wrapIn(i,t)},eru=()=>({state:e,dispatch:t})=>{let n=e.plugins;for(let r=0;r<n.length;r+=1){let i=n[r],o;if(i.spec.isInputRules&&(o=i.getState(e))){if(t){let a=e.tr,u=o.transform;for(let s=u.steps.length-1;s>=0;s-=1)a.step(u.steps[s].invert(u.docs[s]));if(o.text){let l=a.doc.resolve(o.from).marks();a.replaceWith(o.from,o.to,e.schema.text(o.text,l))}else a.delete(o.from,o.to)}return!0}}return!1},ers=()=>({tr:e,dispatch:t})=>{let{selection:n}=e,{empty:r,ranges:i}=n;return r||t&&i.forEach(t=>{e.removeMark(t.$from.pos,t.$to.pos)}),!0},erl=(e,t={})=>({tr:n,state:r,dispatch:i})=>{var o;let{extendEmptyMarkRange:a=!1}=t,{selection:u}=n,s=end(e,r.schema),{$from:l,empty:c,ranges:d}=u;if(!i)return!0;if(c&&a){let{from:f,to:p}=u,A=null===(o=l.marks().find(e=>e.type===s))||void 0===o?void 0:o.attrs,h=enc(l,s,A);h&&(f=h.from,p=h.to),n.removeMark(f,p,s)}else d.forEach(e=>{n.removeMark(e.$from.pos,e.$to.pos,s)});return n.removeStoredMark(s),!0},erc=(e,t={})=>({tr:n,state:r,dispatch:i})=>{let o=null,a=null,u=enW("string"==typeof e?e:e.name,r.schema);return!!u&&("node"===u&&(o=etB(e,r.schema)),"mark"===u&&(a=end(e,r.schema)),i&&n.selection.ranges.forEach(e=>{let i=e.$from.pos,u=e.$to.pos;r.doc.nodesBetween(i,u,(e,r)=>{o&&o===e.type&&n.setNodeMarkup(r,void 0,{...e.attrs,...t}),a&&e.marks.length&&e.marks.forEach(o=>{if(a===o.type){let s=Math.min(r+e.nodeSize,u);n.addMark(Math.max(r,i),s,a.create({...o.attrs,...t}))}})})}),!0)},erd=(e,t={})=>({state:n,dispatch:r})=>{let i=etB(e,n.schema);return(function(e,t=null){return function(n,r){let{$from:i,$to:o}=n.selection,a=i.blockRange(o),u=a&&$K(a,e,t);return!!u&&(r&&r(n.tr.wrap(a,u).scrollIntoView()),!0)}})(i,t)(n,r)},erf=(e,t={})=>({state:n,dispatch:r})=>{let i=etB(e,n.schema);return(function(e,t=null){return function(n,r){let{$from:i,$to:o}=n.selection,a=i.blockRange(o),u=!1,s=a;if(!a)return!1;if(a.depth>=2&&i.node(a.depth-1).type.compatibleContent(e)&&0==a.startIndex){if(0==i.index(a.depth-1))return!1;let l=n.doc.resolve(a.start-2);s=new Gz(l,l,a.depth),a.endIndex<a.parent.childCount&&(a=new Gz(i,n.doc.resolve(o.end(a.depth)),a.depth)),u=!0}let c=$K(s,e,t,a);return!!c&&(r&&r((function(e,t,n,r,i){let o=GR.empty;for(let a=n.length-1;a>=0;a--)o=GR.from(n[a].type.create(n[a].attrs,o));e.step(new $M(t.start-(r?2:0),t.end,t.start,t.end,new GU(o,0,0),n.length,!0));let u=0;for(let s=0;s<n.length;s++)n[s].type==i&&(u=s+1);let l=n.length-u,c=t.start+n.length-(r?2:0),d=t.parent;for(let f=t.startIndex,p=t.endIndex,A=!0;f<p;f++,A=!1)!A&&$B(e.doc,c,l)&&(e.split(c,l),c+=2*l),c+=d.child(f).nodeSize;return e})(n.tr,a,c,u,e).scrollIntoView()),!0)}})(i,t)(n,r)};var erp=Object.freeze({__proto__:null,blur:et3,clearContent:et9,clearNodes:et4,command:et7,createParagraphNear:et8,cut:ene,deleteCurrentNode:ent,deleteNode:enn,deleteRange:enr,deleteSelection:eni,enter:eno,exitCode:ena,extendMarkRange:enf,first:enp,focus:eng,forEach:eny,insertContent:env,insertContentAt:enw,joinUp:enI,joinDown:en_,joinBackward:enT,joinForward:enO,joinItemBackward:enR,joinItemForward:enk,joinTextblockBackward:enE,joinTextblockForward:enM,keyboardShortcut:enj,lift:enK,liftEmptyBlock:enL,liftListItem:enB,newlineInCode:enP,resetAttributes:enN,scrollIntoView:enq,selectAll:enQ,selectNodeBackward:enV,selectNodeForward:enz,selectParentNode:enY,selectTextblockEnd:enH,selectTextblockStart:enZ,setContent:enJ,setMark:en2,setMeta:en6,setNode:en5,setNodeSelection:en3,setTextSelection:en9,sinkListItem:en4,splitBlock:en8,splitListItem:ere,toggleList:err,toggleMark:eri,toggleNode:ero,toggleWrap:era,undoInputRule:eru,unsetAllMarks:ers,unsetMark:erl,updateAttributes:erc,wrapIn:erd,wrapInList:erf});function erA(e){return new etZ({find:e.find,handler({state:t,range:n,match:r}){let i=etD(e.getAttributes,void 0,r);if(!1===i||null===i)return null;let{tr:o}=t,a=r[r.length-1],u=r[0];if(a){let s=u.search(/\S/),l=n.from+u.indexOf(a),c=l+a.length;if(enX(n.from,n.to,t.doc).filter(t=>t.mark.type.excluded.find(n=>n===e.type&&n!==t.mark.type)).filter(e=>e.to>l).length)return null;c<n.to&&o.delete(c,n.to),l>n.from&&o.delete(n.from+s,l);let d=n.from+s+a.length;o.addMark(n.from+s,d,e.type.create(i||{})),o.removeStoredMark(e.type)}}})}function erh(e){return new etZ({find:e.find,handler({state:t,range:n,match:r}){let i=t.doc.resolve(n.from),o=etD(e.getAttributes,void 0,r)||{};if(!i.node(-1).canReplaceWith(i.index(-1),i.indexAfter(-1),e.type))return null;t.tr.delete(n.from,n.to).setBlockType(n.from,n.from,e.type,o)}})}function erm(e){return new etZ({find:e.find,handler({state:t,range:n,match:r,chain:i}){let o=etD(e.getAttributes,void 0,r)||{},a=t.tr.delete(n.from,n.to),u=a.doc.resolve(n.from).blockRange(),s=u&&function(e,t,n=null,r=e){let i=function(e,t){let{parent:n,startIndex:r,endIndex:i}=e,o=n.contentMatchAt(r).findWrapping(t);if(!o)return null;let a=o.length?o[0]:t;return n.canReplaceWith(r,i,a)?o:null}(e,t),o=i&&function(e,t){let{parent:n,startIndex:r,endIndex:i}=e,o=n.child(r),a=t.contentMatch.findWrapping(o.type);if(!a)return null;let u=(a.length?a[a.length-1]:t).contentMatch;for(let s=r;u&&s<i;s++)u=u.matchType(n.child(s).type);return u&&u.validEnd?a:null}(r,t);return o?i.map(ee7).concat({type:t,attrs:n}).concat(o.map(ee7)):null}(u,e.type,o);if(!s)return null;if(a.wrap(u,s),e.keepMarks&&e.editor){let{selection:l,storedMarks:c}=t,{splittableMarks:d}=e.editor.extensionManager,f=c||l.$to.parentOffset&&l.$from.marks();if(f){let p=f.filter(e=>d.includes(e.type.name));a.ensureMarks(p)}}if(e.keepAttributes){let A="bulletList"===e.type.name||"orderedList"===e.type.name?"listItem":"taskList";i().updateAttributes(A,o).run()}let h=a.doc.resolve(n.from-1).nodeBefore;h&&h.type===e.type&&ete(a.doc,n.from-1)&&(!e.joinPredicate||e.joinPredicate(r,h))&&a.join(n.from-1)}})}et5.create({name:"commands",addCommands:()=>({...erp})}),et5.create({name:"editable",addProseMirrorPlugins(){return[new Xn({key:new Xo("editable"),props:{editable:()=>this.editor.options.editable}})]}}),et5.create({name:"focusEvents",addProseMirrorPlugins(){let{editor:e}=this;return[new Xn({key:new Xo("focusEvents"),props:{handleDOMEvents:{focus(t,n){e.isFocused=!0;let r=e.state.tr.setMeta("focus",{event:n}).setMeta("addToHistory",!1);return t.dispatch(r),!1},blur(t,n){e.isFocused=!1;let r=e.state.tr.setMeta("blur",{event:n}).setMeta("addToHistory",!1);return t.dispatch(r),!1}}}})]}}),et5.create({name:"keymap",addKeyboardShortcuts(){let e=()=>this.editor.commands.first(({commands:e})=>[()=>e.undoInputRule(),()=>e.command(({tr:t})=>{let{selection:n,doc:r}=t,{empty:i,$anchor:o}=n,{pos:a,parent:u}=o,s=o.parent.isTextblock&&a>0?t.doc.resolve(a-1):o,l=s.parent.type.spec.isolating,c=o.pos-o.parentOffset,d=l&&1===s.parent.childCount?c===o.pos:$$.atStart(r).from===a;return!!i&&!!d&&!!u.type.isTextblock&&!u.textContent.length&&e.clearNodes()}),()=>e.deleteSelection(),()=>e.joinBackward(),()=>e.selectNodeBackward()]),t=()=>this.editor.commands.first(({commands:e})=>[()=>e.deleteSelection(),()=>e.deleteCurrentNode(),()=>e.joinForward(),()=>e.selectNodeForward()]),n={Enter:()=>this.editor.commands.first(({commands:e})=>[()=>e.newlineInCode(),()=>e.createParagraphNear(),()=>e.liftEmptyBlock(),()=>e.splitBlock()]),"Mod-Enter":()=>this.editor.commands.exitCode(),Backspace:e,"Mod-Backspace":e,"Shift-Backspace":e,Delete:t,"Mod-Delete":t,"Mod-a":()=>this.editor.commands.selectAll()},r={...n},i={...n,"Ctrl-h":e,"Alt-Backspace":e,"Ctrl-d":t,"Ctrl-Alt-Backspace":t,"Alt-Delete":t,"Alt-d":t,"Ctrl-a":()=>this.editor.commands.selectTextblockStart(),"Ctrl-e":()=>this.editor.commands.selectTextblockEnd()};return enm()||enF()?i:r},addProseMirrorPlugins(){return[new Xn({key:new Xo("clearDocument"),appendTransaction:(e,t,n)=>{if(!(e.some(e=>e.docChanged)&&!t.doc.eq(n.doc)))return;let{empty:r,from:i,to:o}=t.selection,a=$$.atStart(t.doc).from,u=$$.atEnd(t.doc).to;if(r||!(i===a&&o===u)||0!==n.doc.textBetween(0,n.doc.content.size," "," ").length)return;let s=n.tr,l=etF({state:n,transaction:s}),{commands:c}=new etj({editor:this.editor,state:l});if(c.clearNodes(),s.steps.length)return s}})]}}),et5.create({name:"tabindex",addProseMirrorPlugins(){return[new Xn({key:new Xo("tabindex"),props:{attributes:this.editor.isEditable?{tabindex:"0"}:{}}})]}});let erg=class e{constructor(e={}){this.type="mark",this.name="mark",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...e},this.name=this.config.name,e.defaultOptions&&Object.keys(e.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=etD(etU(this,"addOptions",{name:this.name}))),this.storage=etD(etU(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(t={}){return new e(t)}configure(e={}){let t=this.extend();return t.options=et6(this.options,e),t.storage=etD(etU(t,"addStorage",{name:t.name,options:t.options})),t}extend(t={}){let n=new e({...this.config,...t});return n.parent=this,this.child=n,n.name=t.name?t.name:n.parent.name,t.defaultOptions&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${n.name}".`),n.options=etD(etU(n,"addOptions",{name:n.name})),n.storage=etD(etU(n,"addStorage",{name:n.name,options:n.options})),n}static handleExit({editor:e,mark:t}){let{tr:n}=e.state,r=e.state.selection.$from;if(r.pos===r.end()){let i=r.marks();if(!i.find(e=>(null==e?void 0:e.type.name)===t.name))return!1;let o=i.find(e=>(null==e?void 0:e.type.name)===t.name);return o&&n.removeStoredMark(o),n.insertText(" ",r.pos),e.view.dispatch(n),!0}return!1}};class ery{constructor(e={}){this.type="node",this.name="node",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...e},this.name=this.config.name,e.defaultOptions&&Object.keys(e.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=etD(etU(this,"addOptions",{name:this.name}))),this.storage=etD(etU(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(e={}){return new ery(e)}configure(e={}){let t=this.extend();return t.options=et6(this.options,e),t.storage=etD(etU(t,"addStorage",{name:t.name,options:t.options})),t}extend(e={}){let t=new ery({...this.config,...e});return t.parent=this,this.child=t,t.name=e.name?e.name:t.parent.name,e.defaultOptions&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${t.name}".`),t.options=etD(etU(t,"addOptions",{name:t.name})),t.storage=etD(etU(t,"addStorage",{name:t.name,options:t.options})),t}}class erv{constructor(e,t,n){this.isDragging=!1,this.component=e,this.editor=t.editor,this.options={stopEvent:null,ignoreMutation:null,...n},this.extension=t.extension,this.node=t.node,this.decorations=t.decorations,this.getPos=t.getPos,this.mount()}mount(){}get dom(){return this.editor.view.dom}get contentDOM(){return null}onDragStart(e){var t,n,r,i,o,a,u;let{view:s}=this.editor,l=e.target,c=3===l.nodeType?null===(t=l.parentElement)||void 0===t?void 0:t.closest("[data-drag-handle]"):l.closest("[data-drag-handle]");if(!this.dom||!(null===(n=this.contentDOM)||void 0===n)&&n.contains(l)||!c)return;let d=0,f=0;if(this.dom!==c){let p=this.dom.getBoundingClientRect(),A=c.getBoundingClientRect(),h=null!==(r=e.offsetX)&&void 0!==r?r:null===(i=e.nativeEvent)||void 0===i?void 0:i.offsetX,m=null!==(o=e.offsetY)&&void 0!==o?o:null===(a=e.nativeEvent)||void 0===a?void 0:a.offsetY;d=A.x-p.x+h,f=A.y-p.y+m}null===(u=e.dataTransfer)||void 0===u||u.setDragImage(this.dom,d,f);let g=$5.create(s.state.doc,this.getPos()),y=s.state.tr.setSelection(g);s.dispatch(y)}stopEvent(e){var t;if(!this.dom)return!1;if("function"==typeof this.options.stopEvent)return this.options.stopEvent({event:e});let n=e.target;if(!(this.dom.contains(n)&&!(!(null===(t=this.contentDOM)||void 0===t)&&t.contains(n))))return!1;let r=e.type.startsWith("drag"),i="drop"===e.type;if((["INPUT","BUTTON","SELECT","TEXTAREA"].includes(n.tagName)||n.isContentEditable)&&!i&&!r)return!0;let{isEditable:o}=this.editor,{isDragging:a}=this,u=!!this.node.type.spec.draggable,s=$5.isSelectable(this.node),l="copy"===e.type,c="paste"===e.type,d="cut"===e.type,f="mousedown"===e.type;if(!u&&s&&r&&e.preventDefault(),u&&r&&!a)return e.preventDefault(),!1;if(u&&o&&!a&&f){let p=n.closest("[data-drag-handle]");p&&(this.dom===p||this.dom.contains(p))&&(this.isDragging=!0,document.addEventListener("dragend",()=>{this.isDragging=!1},{once:!0}),document.addEventListener("drop",()=>{this.isDragging=!1},{once:!0}),document.addEventListener("mouseup",()=>{this.isDragging=!1},{once:!0}))}return!(a||i||l||c||d||f&&s)}ignoreMutation(e){return!this.dom||!this.contentDOM||("function"==typeof this.options.ignoreMutation?this.options.ignoreMutation({mutation:e}):!!this.node.isLeaf||!!this.node.isAtom||!("selection"===e.type||this.dom.contains(e.target)&&"childList"===e.type&&(enm()||"Android"===navigator.platform||/android/i.test(navigator.userAgent))&&this.editor.isFocused&&[...Array.from(e.addedNodes),...Array.from(e.removedNodes)].every(e=>e.isContentEditable))&&(this.contentDOM===e.target&&"attributes"===e.type||!this.contentDOM.contains(e.target)))}updateAttributes(e){this.editor.commands.command(({tr:t})=>{let n=this.getPos();return t.setNodeMarkup(n,void 0,{...this.node.attrs,...e}),!0})}deleteNode(){let e=this.getPos(),t=e+this.node.nodeSize;this.editor.commands.deleteRange({from:e,to:t})}}function erx(e){return new et$({find:e.find,handler({state:t,range:n,match:r,pasteEvent:i}){let o=etD(e.getAttributes,void 0,r,i);if(!1===o||null===o)return null;let{tr:a}=t,u=r[r.length-1],s=r[0],l=n.to;if(u){let c=s.search(/\S/),d=n.from+s.indexOf(u),f=d+u.length;if(enX(n.from,n.to,t.doc).filter(t=>t.mark.type.excluded.find(n=>n===e.type&&n!==t.mark.type)).filter(e=>e.to>d).length)return null;f<n.to&&a.delete(f,n.to),d>n.from&&a.delete(n.from+c,d),l=n.from+c+u.length,a.addMark(n.from+c,l,e.type.create(o||{})),a.removeStoredMark(e.type)}}})}var erb=function(){};erb.prototype.append=function(e){return e.length?(e=erb.from(e),!this.length&&e||e.length<200&&this.leafAppend(e)||this.length<200&&e.leafPrepend(this)||this.appendInner(e)):this},erb.prototype.prepend=function(e){return e.length?erb.from(e).append(this):this},erb.prototype.appendInner=function(e){return new erS(this,e)},erb.prototype.slice=function(e,t){return void 0===e&&(e=0),void 0===t&&(t=this.length),e>=t?erb.empty:this.sliceInner(Math.max(0,e),Math.min(this.length,t))},erb.prototype.get=function(e){if(!(e<0||e>=this.length))return this.getInner(e)},erb.prototype.forEach=function(e,t,n){void 0===t&&(t=0),void 0===n&&(n=this.length),t<=n?this.forEachInner(e,t,n,0):this.forEachInvertedInner(e,t,n,0)},erb.prototype.map=function(e,t,n){void 0===t&&(t=0),void 0===n&&(n=this.length);var r=[];return this.forEach(function(t,n){return r.push(e(t,n))},t,n),r},erb.from=function(e){return e instanceof erb?e:e&&e.length?new erC(e):erb.empty};var erC=function(e){function t(t){e.call(this),this.values=t}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={length:{configurable:!0},depth:{configurable:!0}};return t.prototype.flatten=function(){return this.values},t.prototype.sliceInner=function(e,n){return 0==e&&n==this.length?this:new t(this.values.slice(e,n))},t.prototype.getInner=function(e){return this.values[e]},t.prototype.forEachInner=function(e,t,n,r){for(var i=t;i<n;i++)if(!1===e(this.values[i],r+i))return!1},t.prototype.forEachInvertedInner=function(e,t,n,r){for(var i=t-1;i>=n;i--)if(!1===e(this.values[i],r+i))return!1},t.prototype.leafAppend=function(e){if(this.length+e.length<=200)return new t(this.values.concat(e.flatten()))},t.prototype.leafPrepend=function(e){if(this.length+e.length<=200)return new t(e.flatten().concat(this.values))},n.length.get=function(){return this.values.length},n.depth.get=function(){return 0},Object.defineProperties(t.prototype,n),t}(erb);erb.empty=new erC([]);var erS=function(e){function t(t,n){e.call(this),this.left=t,this.right=n,this.length=t.length+n.length,this.depth=Math.max(t.depth,n.depth)+1}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},t.prototype.getInner=function(e){return e<this.left.length?this.left.get(e):this.right.get(e-this.left.length)},t.prototype.forEachInner=function(e,t,n,r){var i=this.left.length;if(t<i&&!1===this.left.forEachInner(e,t,Math.min(n,i),r)||n>i&&!1===this.right.forEachInner(e,Math.max(t-i,0),Math.min(this.length,n)-i,r+i))return!1},t.prototype.forEachInvertedInner=function(e,t,n,r){var i=this.left.length;if(t>i&&!1===this.right.forEachInvertedInner(e,t-i,Math.max(n,i)-i,r+i)||n<i&&!1===this.left.forEachInvertedInner(e,Math.min(t,i),n,r))return!1},t.prototype.sliceInner=function(e,t){if(0==e&&t==this.length)return this;var n=this.left.length;return t<=n?this.left.slice(e,t):e>=n?this.right.slice(e-n,t-n):this.left.slice(e,n).append(this.right.slice(0,t-n))},t.prototype.leafAppend=function(e){var n=this.right.leafAppend(e);if(n)return new t(this.left,n)},t.prototype.leafPrepend=function(e){var n=this.left.leafPrepend(e);if(n)return new t(n,this.right)},t.prototype.appendInner=function(e){return this.left.depth>=Math.max(this.right.depth,e.depth)+1?new t(this.left,new t(this.right,e)):new t(this,e)},t}(erb);class erw{constructor(e,t){this.items=e,this.eventCount=t}popEvent(e,t){if(0==this.eventCount)return null;let n=this.items.length;for(;;n--)if(this.items.get(n-1).selection){--n;break}let r,i;t&&(i=(r=this.remapping(n,this.items.length)).maps.length);let o=e.tr,a,u,s=[],l=[];return this.items.forEach((e,t)=>{if(!e.step){r||(i=(r=this.remapping(n,t+1)).maps.length),i--,l.push(e);return}if(r){l.push(new erI(e.map));let c=e.step.map(r.slice(i)),d;c&&o.maybeStep(c).doc&&(d=o.mapping.maps[o.mapping.maps.length-1],s.push(new erI(d,void 0,void 0,s.length+l.length))),i--,d&&r.appendMap(d,i)}else o.maybeStep(e.step);if(e.selection)return a=r?e.selection.map(r.slice(i)):e.selection,u=new erw(this.items.slice(0,n).append(l.reverse().concat(s)),this.eventCount-1),!1},this.items.length,0),{remaining:u,transform:o,selection:a}}addTransform(e,t,n,r){var i,o;let a=[],u=this.eventCount,s=this.items,l=!r&&s.length?s.get(s.length-1):null;for(let c=0;c<e.steps.length;c++){let d=e.steps[c].invert(e.docs[c]),f=new erI(e.mapping.maps[c],d,t),p;(p=l&&l.merge(f))&&(f=p,c?a.pop():s=s.slice(0,s.length-1)),a.push(f),t&&(u++,t=void 0),r||(l=f)}let A=u-n.depth,h;return A>erT&&(i=s,o=A,s=(i.forEach((e,t)=>{if(e.selection&&0==o--)return h=t,!1}),i.slice(h)),u-=A),new erw(s.append(a),u)}remapping(e,t){let n=new $C;return this.items.forEach((t,r)=>{let i=null!=t.mirrorOffset&&r-t.mirrorOffset>=e?n.maps.length-t.mirrorOffset:void 0;n.appendMap(t.map,i)},e,t),n}addMaps(e){return 0==this.eventCount?this:new erw(this.items.append(e.map(e=>new erI(e))),this.eventCount)}rebased(e,t){if(!this.eventCount)return this;let n=[],r=Math.max(0,this.items.length-t),i=e.mapping,o=e.steps.length,a=this.eventCount;this.items.forEach(e=>{e.selection&&a--},r);let u=t;this.items.forEach(t=>{let r=i.getMirror(--u);if(null==r)return;o=Math.min(o,r);let s=i.maps[r];if(t.step){let l=e.steps[r].invert(e.docs[r]),c=t.selection&&t.selection.map(i.slice(u+1,r));c&&a++,n.push(new erI(s,l,c))}else n.push(new erI(s))},r);let s=[];for(let l=t;l<o;l++)s.push(new erI(i.maps[l]));let c=this.items.slice(0,r).append(s).append(n),d=new erw(c,a);return d.emptyItemCount()>500&&(d=d.compress(this.items.length-n.length)),d}emptyItemCount(){let e=0;return this.items.forEach(t=>{t.step||e++}),e}compress(e=this.items.length){let t=this.remapping(0,e),n=t.maps.length,r=[],i=0;return this.items.forEach((o,a)=>{if(a>=e)r.push(o),o.selection&&i++;else if(o.step){let u=o.step.map(t.slice(n)),s=u&&u.getMap();if(n--,s&&t.appendMap(s,n),u){let l=o.selection&&o.selection.map(t.slice(n));l&&i++;let c=new erI(s.invert(),u,l),d,f=r.length-1;(d=r.length&&r[f].merge(c))?r[f]=d:r.push(c)}}else o.map&&n--},this.items.length,0),new erw(erb.from(r.reverse()),i)}}erw.empty=new erw(erb.empty,0);class erI{constructor(e,t,n,r){this.map=e,this.step=t,this.selection=n,this.mirrorOffset=r}merge(e){if(this.step&&e.step&&!e.selection){let t=e.step.merge(this.step);if(t)return new erI(t.getMap().invert(),t,this.selection)}}}class er_{constructor(e,t,n,r,i){this.done=e,this.undone=t,this.prevRanges=n,this.prevTime=r,this.prevComposition=i}}let erT=20;function erO(e){let t=[];return e.forEach((e,n,r,i)=>t.push(r,i)),t}function erR(e,t){if(!e)return null;let n=[];for(let r=0;r<e.length;r+=2){let i=t.map(e[r],1),o=t.map(e[r+1],-1);i<=o&&n.push(i,o)}return n}function erk(e,t,n,r){let i=erF(t),o=erj.get(t).spec.config,a=(r?e.undone:e.done).popEvent(t,i);if(!a)return;let u=a.selection.resolve(a.transform.doc),s=(r?e.done:e.undone).addTransform(a.transform,t.selection.getBookmark(),o,i),l=new er_(r?s:a.remaining,r?a.remaining:s,null,0,-1);n(a.transform.setSelection(u).setMeta(erj,{redo:r,historyState:l}).scrollIntoView())}let erE=!1,erM=null;function erF(e){let t=e.plugins;if(erM!=t){erE=!1,erM=t;for(let n=0;n<t.length;n++)if(t[n].spec.historyPreserveItems){erE=!0;break}}return erE}let erj=new Xo("history"),erU=new Xo("closeHistory"),erK=(e,t)=>{let n=erj.getState(e);return!!n&&0!=n.done.eventCount&&(t&&erk(n,e,t,!1),!0)},erL=(e,t)=>{let n=erj.getState(e);return!!n&&0!=n.undone.eventCount&&(t&&erk(n,e,t,!0),!0)},erB=et5.create({name:"history",addOptions:()=>({depth:100,newGroupDelay:500}),addCommands:()=>({undo:()=>({state:e,dispatch:t})=>erK(e,t),redo:()=>({state:e,dispatch:t})=>erL(e,t)}),addProseMirrorPlugins(){return[function(e={}){return e={depth:e.depth||100,newGroupDelay:e.newGroupDelay||500},new Xn({key:erj,state:{init:()=>new er_(erw.empty,erw.empty,null,0,-1),apply:(t,n,r)=>(function(e,t,n,r){let i=n.getMeta(erj),o;if(i)return i.historyState;n.getMeta(erU)&&(e=new er_(e.done,e.undone,null,0,-1));let a=n.getMeta("appendedTransaction");if(0==n.steps.length)return e;if(a&&a.getMeta(erj))return a.getMeta(erj).redo?new er_(e.done.addTransform(n,void 0,r,erF(t)),e.undone,erO(n.mapping.maps[n.steps.length-1]),e.prevTime,e.prevComposition):new er_(e.done,e.undone.addTransform(n,void 0,r,erF(t)),null,e.prevTime,e.prevComposition);if(!1===n.getMeta("addToHistory")||a&&!1===a.getMeta("addToHistory"))return(o=n.getMeta("rebased"))?new er_(e.done.rebased(n,o),e.undone.rebased(n,o),erR(e.prevRanges,n.mapping),e.prevTime,e.prevComposition):new er_(e.done.addMaps(n.mapping.maps),e.undone.addMaps(n.mapping.maps),erR(e.prevRanges,n.mapping),e.prevTime,e.prevComposition);{let u=n.getMeta("composition"),s=0==e.prevTime||!a&&e.prevComposition!=u&&(e.prevTime<(n.time||0)-r.newGroupDelay||!function(e,t){if(!t)return!1;if(!e.docChanged)return!0;let n=!1;return e.mapping.maps[0].forEach((e,r)=>{for(let i=0;i<t.length;i+=2)e<=t[i+1]&&r>=t[i]&&(n=!0)}),n}(n,e.prevRanges)),l=a?erR(e.prevRanges,n.mapping):erO(n.mapping.maps[n.steps.length-1]);return new er_(e.done.addTransform(n,s?t.selection.getBookmark():void 0,r,erF(t)),erw.empty,l,n.time,u??e.prevComposition)}})(n,r,t,e)},config:e,props:{handleDOMEvents:{beforeinput(e,t){let n=t.inputType,r="historyUndo"==n?erK:"historyRedo"==n?erL:null;return!!r&&(t.preventDefault(),r(e.state,e.dispatch))}}}})}(this.options)]},addKeyboardShortcuts(){return{"Mod-z":()=>this.editor.commands.undo(),"Shift-Mod-z":()=>this.editor.commands.redo(),"Mod-y":()=>this.editor.commands.redo(),"Mod-я":()=>this.editor.commands.undo(),"Shift-Mod-я":()=>this.editor.commands.redo()}}});var erP="bottom",erW="right",erD="left",erN="auto",erq=["top",erP,erW,erD],erQ="start",erV="viewport",erz="popper",erY=erq.reduce(function(e,t){return e.concat([t+"-"+erQ,t+"-end"])},[]),erH=[].concat(erq,[erN]).reduce(function(e,t){return e.concat([t,t+"-"+erQ,t+"-end"])},[]),erZ=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function erJ(e){return e?(e.nodeName||"").toLowerCase():null}function erG(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function er$(e){var t=erG(e).Element;return e instanceof t||e instanceof Element}function erX(e){var t=erG(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function er0(e){if(typeof ShadowRoot>"u")return!1;var t=erG(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}let er1={name:"applyStyles",enabled:!0,phase:"write",fn:function(e){var t=e.state;Object.keys(t.elements).forEach(function(e){var n=t.styles[e]||{},r=t.attributes[e]||{},i=t.elements[e];erX(i)&&erJ(i)&&(Object.assign(i.style,n),Object.keys(r).forEach(function(e){var t=r[e];!1===t?i.removeAttribute(e):i.setAttribute(e,!0===t?"":t)}))})},effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(e){var r=t.elements[e],i=t.attributes[e]||{},o=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:n[e]).reduce(function(e,t){return e[t]="",e},{});erX(r)&&erJ(r)&&(Object.assign(r.style,o),Object.keys(i).forEach(function(e){r.removeAttribute(e)}))})}},requires:["computeStyles"]};function er2(e){return e.split("-")[0]}var er6=Math.max,er5=Math.min,er3=Math.round;function er9(){var e=navigator.userAgentData;return null!=e&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(e){return e.brand+"/"+e.version}).join(" "):navigator.userAgent}function er4(){return!/^((?!chrome|android).)*safari/i.test(er9())}function er7(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=!1);var r=e.getBoundingClientRect(),i=1,o=1;t&&erX(e)&&(i=e.offsetWidth>0&&er3(r.width)/e.offsetWidth||1,o=e.offsetHeight>0&&er3(r.height)/e.offsetHeight||1);var a=(er$(e)?erG(e):window).visualViewport,u=!er4()&&n,s=(r.left+(u&&a?a.offsetLeft:0))/i,l=(r.top+(u&&a?a.offsetTop:0))/o,c=r.width/i,d=r.height/o;return{width:c,height:d,top:l,right:s+c,bottom:l+d,left:s,x:s,y:l}}function er8(e){var t=er7(e),n=e.offsetWidth,r=e.offsetHeight;return 1>=Math.abs(t.width-n)&&(n=t.width),1>=Math.abs(t.height-r)&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function eie(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&er0(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function eit(e){return erG(e).getComputedStyle(e)}function ein(e){return["table","td","th"].indexOf(erJ(e))>=0}function eir(e){return((er$(e)?e.ownerDocument:e.document)||window.document).documentElement}function eii(e){return"html"===erJ(e)?e:e.assignedSlot||e.parentNode||(er0(e)?e.host:null)||eir(e)}function eio(e){return erX(e)&&"fixed"!==eit(e).position?e.offsetParent:null}function eia(e){for(var t=erG(e),n=eio(e);n&&ein(n)&&"static"===eit(n).position;)n=eio(n);return n&&("html"===erJ(n)||"body"===erJ(n)&&"static"===eit(n).position)?t:n||function(e){var t=/firefox/i.test(er9());if(/Trident/i.test(er9())&&erX(e)&&"fixed"===eit(e).position)return null;var n=eii(e);for(er0(n)&&(n=n.host);erX(n)&&0>["html","body"].indexOf(erJ(n));){var r=eit(n);if("none"!==r.transform||"none"!==r.perspective||"paint"===r.contain||-1!==["transform","perspective"].indexOf(r.willChange)||t&&"filter"===r.willChange||t&&r.filter&&"none"!==r.filter)return n;n=n.parentNode}return null}(e)||t}function eiu(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function eis(e,t,n){return er6(e,er5(t,n))}function eil(){return{top:0,right:0,bottom:0,left:0}}function eic(e){return Object.assign({},eil(),e)}function eid(e,t){return t.reduce(function(t,n){return t[n]=e,t},{})}function eif(e){return e.split("-")[1]}var eip={top:"auto",right:"auto",bottom:"auto",left:"auto"};function eiA(e){var t,n,r=e.popper,i=e.popperRect,o=e.placement,a=e.variation,u=e.offsets,s=e.position,l=e.gpuAcceleration,c=e.adaptive,d=e.roundOffsets,f=e.isFixed,p=u.x,A=void 0===p?0:p,h=u.y,m=void 0===h?0:h,g="function"==typeof d?d({x:A,y:m}):{x:A,y:m};A=g.x,m=g.y;var y=u.hasOwnProperty("x"),v=u.hasOwnProperty("y"),x=erD,b="top",C=window;if(c){var S=eia(r),w="clientHeight",I="clientWidth";S===erG(r)&&(S=eir(r),"static"!==eit(S).position&&"absolute"===s&&(w="scrollHeight",I="scrollWidth")),("top"===o||(o===erD||o===erW)&&"end"===a)&&(b=erP,m-=(f&&S===C&&C.visualViewport?C.visualViewport.height:S[w])-i.height,m*=l?1:-1),(o===erD||("top"===o||o===erP)&&"end"===a)&&(x=erW,A-=(f&&S===C&&C.visualViewport?C.visualViewport.width:S[I])-i.width,A*=l?1:-1)}var _,T,O,R,k,E=Object.assign({position:s},c&&eip),M=!0===d?(_={x:A,y:m},T=erG(r),O=_.x,R=_.y,{x:er3(O*(k=T.devicePixelRatio||1))/k||0,y:er3(R*k)/k||0}):{x:A,y:m};return(A=M.x,m=M.y,l)?Object.assign({},E,((t={})[b]=v?"0":"",t[x]=y?"0":"",t.transform=1>=(C.devicePixelRatio||1)?"translate("+A+"px, "+m+"px)":"translate3d("+A+"px, "+m+"px, 0)",t)):Object.assign({},E,((n={})[b]=v?m+"px":"",n[x]=y?A+"px":"",n.transform="",n))}var eih={passive:!0},eim={left:"right",right:"left",bottom:"top",top:"bottom"};function eig(e){return e.replace(/left|right|bottom|top/g,function(e){return eim[e]})}var eiy={start:"end",end:"start"};function eiv(e){return e.replace(/start|end/g,function(e){return eiy[e]})}function eix(e){var t,n=erG(e);return{scrollLeft:n.pageXOffset,scrollTop:n.pageYOffset}}function eib(e){return er7(eir(e)).left+eix(e).scrollLeft}function eiC(e){var t=eit(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function eiS(e,t){void 0===t&&(t=[]);var n,r=function e(t){return["html","body","#document"].indexOf(erJ(t))>=0?t.ownerDocument.body:erX(t)&&eiC(t)?t:e(eii(t))}(e),i=r===(null==(n=e.ownerDocument)?void 0:n.body),o=erG(r),a=i?[o].concat(o.visualViewport||[],eiC(r)?r:[]):r,u=t.concat(a);return i?u:u.concat(eiS(eii(a)))}function eiw(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function eiI(e,t,n){var r,i,o,a,u,s,l,c,d,f,p,A;return t===erV?eiw(function(e,t){var n=erG(e),r=eir(e),i=n.visualViewport,o=r.clientWidth,a=r.clientHeight,u=0,s=0;if(i){o=i.width,a=i.height;var l=er4();(l||!l&&"fixed"===t)&&(u=i.offsetLeft,s=i.offsetTop)}return{width:o,height:a,x:u+eib(e),y:s}}(e,n)):er$(t)?((o=er7(t,!1,"fixed"===n)).top=o.top+t.clientTop,o.left=o.left+t.clientLeft,o.bottom=o.top+t.clientHeight,o.right=o.left+t.clientWidth,o.width=t.clientWidth,o.height=t.clientHeight,o.x=o.left,o.y=o.top,o):eiw((a=eir(e),s=eir(a),l=eix(a),c=null==(u=a.ownerDocument)?void 0:u.body,d=er6(s.scrollWidth,s.clientWidth,c?c.scrollWidth:0,c?c.clientWidth:0),f=er6(s.scrollHeight,s.clientHeight,c?c.scrollHeight:0,c?c.clientHeight:0),p=-l.scrollLeft+eib(a),A=-l.scrollTop,"rtl"===eit(c||s).direction&&(p+=er6(s.clientWidth,c?c.clientWidth:0)-d),{width:d,height:f,x:p,y:A}))}function ei_(e){var t,n=e.reference,r=e.element,i=e.placement,o=i?er2(i):null,a=i?eif(i):null,u=n.x+n.width/2-r.width/2,s=n.y+n.height/2-r.height/2;switch(o){case"top":t={x:u,y:n.y-r.height};break;case erP:t={x:u,y:n.y+n.height};break;case erW:t={x:n.x+n.width,y:s};break;case erD:t={x:n.x-r.width,y:s};break;default:t={x:n.x,y:n.y}}var l=o?eiu(o):null;if(null!=l){var c="y"===l?"height":"width";switch(a){case erQ:t[l]=t[l]-(n[c]/2-r[c]/2);break;case"end":t[l]=t[l]+(n[c]/2-r[c]/2)}}return t}function eiT(e,t){void 0===t&&(t={});var n,r,i,o,a,u,s,l,c,d,f=t,p=f.placement,A=void 0===p?e.placement:p,h=f.strategy,m=void 0===h?e.strategy:h,g=f.boundary,y=f.rootBoundary,v=f.elementContext,x=void 0===v?erz:v,b=f.altBoundary,C=f.padding,S=void 0===C?0:C,w=eic("number"!=typeof S?S:eid(S,erq)),I=e.rects.popper,_=e.elements[void 0!==b&&b?x===erz?"reference":erz:x],T=(n=er$(_)?_:_.contextElement||eir(e.elements.popper),c=(l=[].concat("clippingParents"===(r=void 0===g?"clippingParents":g)?(u=eiS(eii(n)),s=["absolute","fixed"].indexOf(eit(n).position)>=0&&erX(n)?eia(n):n,er$(s)?u.filter(function(e){return er$(e)&&eie(e,s)&&"body"!==erJ(e)}):[]):[].concat(r),[void 0===y?erV:y]))[0],(d=l.reduce(function(e,t){var r=eiI(n,t,m);return e.top=er6(r.top,e.top),e.right=er5(r.right,e.right),e.bottom=er5(r.bottom,e.bottom),e.left=er6(r.left,e.left),e},eiI(n,c,m))).width=d.right-d.left,d.height=d.bottom-d.top,d.x=d.left,d.y=d.top,d),O=er7(e.elements.reference),R=ei_({reference:O,element:I,strategy:"absolute",placement:A}),k=eiw(Object.assign({},I,R)),E=x===erz?k:O,M={top:T.top-E.top+w.top,bottom:E.bottom-T.bottom+w.bottom,left:T.left-E.left+w.left,right:E.right-T.right+w.right},F=e.modifiersData.offset;if(x===erz&&F){var j=F[A];Object.keys(M).forEach(function(e){var t=[erW,erP].indexOf(e)>=0?1:-1,n=["top",erP].indexOf(e)>=0?"y":"x";M[e]+=j[n]*t})}return M}function eiO(e,t,n){return void 0===n&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function eiR(e){return["top",erW,erP,erD].some(function(t){return e[t]>=0})}var eik={placement:"bottom",modifiers:[],strategy:"absolute"};function eiE(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some(function(e){return!(e&&"function"==typeof e.getBoundingClientRect)})}var eiM,eiF,eij,eiU,eiK,eiL,eiB,eiP,eiW,eiD,eiN,eiq=(eiL={defaultModifiers:[{name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var t=e.state,n=e.instance,r=e.options,i=r.scroll,o=void 0===i||i,a=r.resize,u=void 0===a||a,s=erG(t.elements.popper),l=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&l.forEach(function(e){e.addEventListener("scroll",n.update,eih)}),u&&s.addEventListener("resize",n.update,eih),function(){o&&l.forEach(function(e){e.removeEventListener("scroll",n.update,eih)}),u&&s.removeEventListener("resize",n.update,eih)}},data:{}},{name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,n=e.name;t.modifiersData[n]=ei_({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}},{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,n=e.options,r=n.gpuAcceleration,i=n.adaptive,o=n.roundOffsets,a=void 0===o||o,u={placement:er2(t.placement),variation:eif(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:void 0===r||r,isFixed:"fixed"===t.options.strategy};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,eiA(Object.assign({},u,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:void 0===i||i,roundOffsets:a})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,eiA(Object.assign({},u,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:a})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}},er1,{name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,n=e.options,r=e.name,i=n.offset,o=void 0===i?[0,0]:i,a=erH.reduce(function(e,n){var r,i,a,u,s,l,c,d;return e[n]=(i=t.rects,s=[erD,"top"].indexOf(u=er2(n))>=0?-1:1,c=(l="function"==typeof o?o(Object.assign({},i,{placement:n})):o)[0],d=l[1],c=c||0,d=(d||0)*s,[erD,erW].indexOf(u)>=0?{x:d,y:c}:{x:c,y:d}),e},{}),u=a[t.placement],s=u.x,l=u.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=s,t.modifiersData.popperOffsets.y+=l),t.modifiersData[r]=a}},{name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var i=n.mainAxis,o=void 0===i||i,a=n.altAxis,u=void 0===a||a,s=n.fallbackPlacements,l=n.padding,c=n.boundary,d=n.rootBoundary,f=n.altBoundary,p=n.flipVariations,A=void 0===p||p,h=n.allowedAutoPlacements,m=t.options.placement,g=er2(m),y=s||(g!==m&&A?function(e){if(er2(e)===erN)return[];var t=eig(e);return[eiv(e),t,eiv(t)]}(m):[eig(m)]),v=[m].concat(y).reduce(function(e,n){var r,i,o,a,u,s,f,p,m,g,y,v,x,b;return e.concat(er2(n)===erN?(i={placement:n,boundary:c,rootBoundary:d,padding:l,flipVariations:A,allowedAutoPlacements:h},a=(o=i).placement,u=o.boundary,s=o.rootBoundary,f=o.padding,p=o.flipVariations,g=void 0===(m=o.allowedAutoPlacements)?erH:m,0===(x=(v=(y=eif(a))?p?erY:erY.filter(function(e){return eif(e)===y}):erq).filter(function(e){return g.indexOf(e)>=0})).length&&(x=v),Object.keys(b=x.reduce(function(e,n){return e[n]=eiT(t,{placement:n,boundary:u,rootBoundary:s,padding:f})[er2(n)],e},{})).sort(function(e,t){return b[e]-b[t]})):n)},[]),x=t.rects.reference,b=t.rects.popper,C=new Map,S=!0,w=v[0],I=0;I<v.length;I++){var _=v[I],T=er2(_),O=eif(_)===erQ,R=["top",erP].indexOf(T)>=0,k=R?"width":"height",E=eiT(t,{placement:_,boundary:c,rootBoundary:d,altBoundary:f,padding:l}),M=R?O?erW:erD:O?erP:"top";x[k]>b[k]&&(M=eig(M));var F=eig(M),j=[];if(o&&j.push(E[T]<=0),u&&j.push(E[M]<=0,E[F]<=0),j.every(function(e){return e})){w=_,S=!1;break}C.set(_,j)}if(S)for(var U=A?3:1,K=function(e){var t=v.find(function(t){var n=C.get(t);if(n)return n.slice(0,e).every(function(e){return e})});if(t)return w=t,"break"},L=U;L>0&&"break"!==K(L);L--);t.placement!==w&&(t.modifiersData[r]._skip=!0,t.placement=w,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}},{name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t,n=e.state,r=e.options,i=e.name,o=r.mainAxis,a=r.altAxis,u=r.boundary,s=r.rootBoundary,l=r.altBoundary,c=r.padding,d=r.tether,f=void 0===d||d,p=r.tetherOffset,A=void 0===p?0:p,h=eiT(n,{boundary:u,rootBoundary:s,padding:c,altBoundary:l}),m=er2(n.placement),g=eif(n.placement),y=!g,v=eiu(m),x="x"===v?"y":"x",b=n.modifiersData.popperOffsets,C=n.rects.reference,S=n.rects.popper,w="function"==typeof A?A(Object.assign({},n.rects,{placement:n.placement})):A,I="number"==typeof w?{mainAxis:w,altAxis:w}:Object.assign({mainAxis:0,altAxis:0},w),_=n.modifiersData.offset?n.modifiersData.offset[n.placement]:null,T={x:0,y:0};if(b){if(void 0===o||o){var O,R="y"===v?"top":erD,k="y"===v?erP:erW,E="y"===v?"height":"width",M=b[v],F=M+h[R],j=M-h[k],U=f?-S[E]/2:0,K=g===erQ?C[E]:S[E],L=g===erQ?-S[E]:-C[E],B=n.elements.arrow,P=f&&B?er8(B):{width:0,height:0},W=n.modifiersData["arrow#persistent"]?n.modifiersData["arrow#persistent"].padding:eil(),D=W[R],N=W[k],q=eis(0,C[E],P[E]),Q=y?C[E]/2-U-q-D-I.mainAxis:K-q-D-I.mainAxis,V=y?-C[E]/2+U+q+N+I.mainAxis:L+q+N+I.mainAxis,z=n.elements.arrow&&eia(n.elements.arrow),Y=z?"y"===v?z.clientTop||0:z.clientLeft||0:0,H=null!=(O=null==_?void 0:_[v])?O:0,Z=eis(f?er5(F,M+Q-H-Y):F,M,f?er6(j,M+V-H):j);b[v]=Z,T[v]=Z-M}if(void 0!==a&&a){var J,G,$,X,ee,et=b[x],en="y"===x?"height":"width",er=et+h["x"===v?"top":erD],ei=et-h["x"===v?erP:erW],eo=-1!==["top",erD].indexOf(m),ea=null!=(ee=null==_?void 0:_[x])?ee:0,eu=eo?er:et-C[en]-S[en]-ea+I.altAxis,es=eo?et+C[en]+S[en]-ea-I.altAxis:ei,el=f&&eo?(X=eis(eu,et,es))>es?es:X:eis(f?eu:er,et,f?es:ei);b[x]=el,T[x]=el-et}n.modifiersData[i]=T}},requiresIfExists:["offset"]},{name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,n=e.state,r=e.name,i=e.options,o=n.elements.arrow,a=n.modifiersData.popperOffsets,u=er2(n.placement),s=eiu(u),l=[erD,erW].indexOf(u)>=0?"height":"width";if(!(!o||!a)){var c,d,f=eic("number"!=typeof(c="function"==typeof(c=i.padding)?c(Object.assign({},n.rects,{placement:n.placement})):c)?c:eid(c,erq)),p=er8(o),A=n.rects.reference[l]+n.rects.reference[s]-a[s]-n.rects.popper[l],h=a[s]-n.rects.reference[s],m=eia(o),g=m?"y"===s?m.clientHeight||0:m.clientWidth||0:0,y=f["y"===s?"top":erD],v=g-p[l]-f["y"===s?erP:erW],x=g/2-p[l]/2+(A/2-h/2),b=eis(y,x,v);n.modifiersData[r]=((t={})[s]=b,t.centerOffset=b-x,t)}},effect:function(e){var t=e.state,n=e.options.element,r=void 0===n?"[data-popper-arrow]":n;null==r||("string"!=typeof r||(r=t.elements.popper.querySelector(r)))&&eie(t.elements.popper,r)&&(t.elements.arrow=r)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]},{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,n=e.name,r=t.rects.reference,i=t.rects.popper,o=t.modifiersData.preventOverflow,a=eiT(t,{elementContext:"reference"}),u=eiT(t,{altBoundary:!0}),s=eiO(a,r),l=eiO(u,i,o),c=eiR(s),d=eiR(l);t.modifiersData[n]={referenceClippingOffsets:s,popperEscapeOffsets:l,isReferenceHidden:c,hasPopperEscaped:d},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":c,"data-popper-escaped":d})}}]},eiW=void 0===(eiP=(eiB=eiL).defaultModifiers)?[]:eiP,eiN=void 0===(eiD=eiB.defaultOptions)?eik:eiD,function(e,t,n){void 0===n&&(n=eiN);var r,i,o={placement:"bottom",orderedModifiers:[],options:Object.assign({},eik,eiN),modifiersData:{},elements:{reference:e,popper:t},attributes:{},styles:{}},a=[],u=!1,s={state:o,setOptions:function(n){var r,i,u,c,d,f,p,A,h="function"==typeof n?n(o.options):n;l(),o.options=Object.assign({},eiN,o.options,h),o.scrollParents={reference:er$(e)?eiS(e):e.contextElement?eiS(e.contextElement):[],popper:eiS(t)};var m=(u=Object.keys(i=(r=[].concat(eiW,o.options.modifiers)).reduce(function(e,t){var n=e[t.name];return e[t.name]=n?Object.assign({},n,t,{options:Object.assign({},n.options,t.options),data:Object.assign({},n.data,t.data)}):t,e},{})).map(function(e){return i[e]}),d=new Map,f=new Set,p=[],u.forEach(function(e){d.set(e.name,e)}),u.forEach(function(e){f.has(e.name)||function e(t){f.add(t.name),[].concat(t.requires||[],t.requiresIfExists||[]).forEach(function(t){if(!f.has(t)){var n=d.get(t);n&&e(n)}}),p.push(t)}(e)}),erZ.reduce(function(e,t){return e.concat(p.filter(function(e){return e.phase===t}))},[]));return o.orderedModifiers=m.filter(function(e){return e.enabled}),o.orderedModifiers.forEach(function(e){var t=e.name,n=e.options,r=e.effect;if("function"==typeof r){var i=r({state:o,name:t,instance:s,options:void 0===n?{}:n}),u=function(){};a.push(i||u)}}),s.update()},forceUpdate:function(){if(!u){var e,t,n,r,i,a,l,c,d,f,p,A,h,m,g,y=o.elements,v=y.reference,x=y.popper;if(eiE(v,x)){o.rects={reference:(e=v,t=eia(x),n="fixed"===o.options.strategy,c=erX(t),d=erX(t)&&(a=er3((i=(r=t).getBoundingClientRect()).width)/r.offsetWidth||1,l=er3(i.height)/r.offsetHeight||1,1!==a||1!==l),f=eir(t),p=er7(e,d,n),A={scrollLeft:0,scrollTop:0},h={x:0,y:0},(c||!c&&!n)&&(("body"!==erJ(t)||eiC(f))&&(A=(m=t)!==erG(m)&&erX(m)?{scrollLeft:(g=m).scrollLeft,scrollTop:g.scrollTop}:eix(m)),erX(t)?(h=er7(t,!0),h.x+=t.clientLeft,h.y+=t.clientTop):f&&(h.x=eib(f))),{x:p.left+A.scrollLeft-h.x,y:p.top+A.scrollTop-h.y,width:p.width,height:p.height}),popper:er8(x)},o.reset=!1,o.placement=o.options.placement,o.orderedModifiers.forEach(function(e){return o.modifiersData[e.name]=Object.assign({},e.data)});for(var b=0;b<o.orderedModifiers.length;b++){if(!0===o.reset){o.reset=!1,b=-1;continue}var C=o.orderedModifiers[b],S=C.fn,w=C.options,I=void 0===w?{}:w,_=C.name;"function"==typeof S&&(o=S({state:o,options:I,name:_,instance:s})||o)}}}},update:function(){return i||(i=new Promise(function(e){Promise.resolve().then(function(){i=void 0,e(new Promise(function(e){s.forceUpdate(),e(o)}))})})),i},destroy:function(){l(),u=!0}};if(!eiE(e,t))return s;function l(){a.forEach(function(e){return e()}),a=[]}return s.setOptions(n).then(function(e){!u&&n.onFirstUpdate&&n.onFirstUpdate(e)}),s}),eiQ="tippy-content",eiV="tippy-arrow",eiz="tippy-svg-arrow",eiY={passive:!0,capture:!0},eiH=function(){return document.body};function eiZ(e,t,n){return Array.isArray(e)?e[t]??(Array.isArray(n)?n[t]:n):e}function eiJ(e,t){var n=({}).toString.call(e);return 0===n.indexOf("[object")&&n.indexOf(t+"]")>-1}function eiG(e,t){return"function"==typeof e?e.apply(void 0,t):e}function ei$(e,t){var n;return 0===t?e:function(r){clearTimeout(n),n=setTimeout(function(){e(r)},t)}}function eiX(e){return[].concat(e)}function ei0(e,t){-1===e.indexOf(t)&&e.push(t)}function ei1(e){return[].slice.call(e)}function ei2(e){return Object.keys(e).reduce(function(t,n){return void 0!==e[n]&&(t[n]=e[n]),t},{})}function ei6(){return document.createElement("div")}function ei5(e){return["Element","Fragment"].some(function(t){return eiJ(e,t)})}function ei3(e,t){e.forEach(function(e){e&&(e.style.transitionDuration=t+"ms")})}function ei9(e,t){e.forEach(function(e){e&&e.setAttribute("data-state",t)})}function ei4(e,t,n){var r=t+"EventListener";["transitionend","webkitTransitionEnd"].forEach(function(t){e[r](t,n)})}function ei7(e,t){for(var n,r=t;r;){if(e.contains(r))return!0;r=null==r.getRootNode||null==(n=r.getRootNode())?void 0:n.host}return!1}var ei8={isTouch:!1},eoe=0;function eot(){ei8.isTouch||(ei8.isTouch=!0,window.performance&&document.addEventListener("mousemove",eon))}function eon(){var e=performance.now();e-eoe<20&&(ei8.isTouch=!1,document.removeEventListener("mousemove",eon)),eoe=e}function eor(){var e,t=document.activeElement;if(t&&t._tippy&&t._tippy.reference===t){var n=t._tippy;t.blur&&!n.state.isVisible&&t.blur()}}var eoi=!!("u">typeof window&&"u">typeof document)&&!!window.msCrypto,eoo=Object.assign({appendTo:eiH,aria:{content:"auto",expanded:"auto"},delay:0,duration:[300,250],getReferenceClientRect:null,hideOnClick:!0,ignoreAttributes:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,moveTransition:"",offset:[0,10],onAfterUpdate:function(){},onBeforeUpdate:function(){},onCreate:function(){},onDestroy:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},onClickOutside:function(){},placement:"top",plugins:[],popperOptions:{},render:null,showOnCreate:!1,touch:!0,trigger:"mouseenter focus",triggerTarget:null},{animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},{allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999}),eoa=Object.keys(eoo),eou=function(e){Object.keys(e).forEach(function(t){eoo[t]=e[t]})};function eos(e){var t=(e.plugins||[]).reduce(function(t,n){var r,i=n.name,o=n.defaultValue;return i&&(t[i]=void 0!==e[i]?e[i]:null!=(r=eoo[i])?r:o),t},{});return Object.assign({},e,t)}function eol(e,t){var n,r,i=Object.assign({},t,{content:eiG(t.content,[e])},t.ignoreAttributes?{}:((r=t.plugins)?Object.keys(eos(Object.assign({},eoo,{plugins:r}))):eoa).reduce(function(t,n){var r=(e.getAttribute("data-tippy-"+n)||"").trim();if(!r)return t;if("content"===n)t[n]=r;else try{t[n]=JSON.parse(r)}catch{t[n]=r}return t},{}));return i.aria=Object.assign({},eoo.aria,i.aria),i.aria={expanded:"auto"===i.aria.expanded?t.interactive:i.aria.expanded,content:"auto"===i.aria.content?t.interactive?null:"describedby":i.aria.content},i}var eoc=function(){return"innerHTML"};function eod(e,t){e[eoc()]=t}function eof(e){var t=ei6();return!0===e?t.className=eiV:(t.className=eiz,ei5(e)?t.appendChild(e):eod(t,e)),t}function eop(e,t){ei5(t.content)?(eod(e,""),e.appendChild(t.content)):"function"!=typeof t.content&&(t.allowHTML?eod(e,t.content):e.textContent=t.content)}function eoA(e){var t=e.firstElementChild,n=ei1(t.children);return{box:t,content:n.find(function(e){return e.classList.contains(eiQ)}),arrow:n.find(function(e){return e.classList.contains(eiV)||e.classList.contains(eiz)}),backdrop:n.find(function(e){return e.classList.contains("tippy-backdrop")})}}function eoh(e){var t=ei6(),n=ei6();n.className="tippy-box",n.setAttribute("data-state","hidden"),n.setAttribute("tabindex","-1");var r=ei6();function i(n,r){var i=eoA(t),o=i.box,a=i.content,u=i.arrow;r.theme?o.setAttribute("data-theme",r.theme):o.removeAttribute("data-theme"),"string"==typeof r.animation?o.setAttribute("data-animation",r.animation):o.removeAttribute("data-animation"),r.inertia?o.setAttribute("data-inertia",""):o.removeAttribute("data-inertia"),o.style.maxWidth="number"==typeof r.maxWidth?r.maxWidth+"px":r.maxWidth,r.role?o.setAttribute("role",r.role):o.removeAttribute("role"),(n.content!==r.content||n.allowHTML!==r.allowHTML)&&eop(a,e.props),r.arrow?u?n.arrow!==r.arrow&&(o.removeChild(u),o.appendChild(eof(r.arrow))):o.appendChild(eof(r.arrow)):u&&o.removeChild(u)}return r.className=eiQ,r.setAttribute("data-state","hidden"),eop(r,e.props),t.appendChild(n),n.appendChild(r),i(e.props,e.props),{popper:t,onUpdate:i}}eoh.$$tippy=!0;var eom=1,eog=[],eoy=[];function eov(e,t){void 0===t&&(t={});var n,r,i=eoo.plugins.concat(t.plugins||[]);document.addEventListener("touchstart",eot,eiY),window.addEventListener("blur",eor);var o,a=Object.assign({},t,{plugins:i}),u=(ei5(e)?[e]:eiJ(e,"NodeList")?ei1(e):Array.isArray(e)?e:ei1(document.querySelectorAll(e))).reduce(function(e,t){var n=t&&function(e,t){var n,r,i,o,a,u,s,l,c=eol(e,Object.assign({},eoo,eos(ei2(t)))),d=!1,f=!1,p=!1,A=!1,h=[],m=ei$(Y,c.interactiveDebounce),g=eom++,y=(n=c.plugins).filter(function(e,t){return n.indexOf(e)===t}),v={id:g,reference:e,popper:ei6(),popperInstance:null,props:c,state:{isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},plugins:y,clearDelayTimeouts:function(){clearTimeout(r),clearTimeout(i),cancelAnimationFrame(o)},setProps:function(t){if(!v.state.isDestroyed){F("onBeforeUpdate",[v,t]),V();var n=v.props,r=eol(e,Object.assign({},n,ei2(t),{ignoreAttributes:!0}));v.props=r,Q(),n.interactiveDebounce!==r.interactiveDebounce&&(K(),m=ei$(Y,r.interactiveDebounce)),n.triggerTarget&&!r.triggerTarget?eiX(n.triggerTarget).forEach(function(e){e.removeAttribute("aria-expanded")}):r.triggerTarget&&e.removeAttribute("aria-expanded"),U(),M(),C&&C(n,r),v.popperInstance&&(G(),X().forEach(function(e){requestAnimationFrame(e._tippy.popperInstance.forceUpdate)})),F("onAfterUpdate",[v,t])}},setContent:function(e){v.setProps({content:e})},show:function(){var e=v.state.isVisible,t=v.state.isDestroyed,n=!v.state.isEnabled,r=ei8.isTouch&&!v.props.touch,i=eiZ(v.props.duration,0,eoo.duration);if(!(e||t||n||r)&&!O().hasAttribute("disabled")&&(F("onShow",[v],!1),!1!==v.props.onShow(v))){if(v.state.isVisible=!0,T()&&(b.style.visibility="visible"),M(),W(),v.state.isMounted||(b.style.transition="none"),T()){var o,a,u,l,c=k();ei3([c.box,c.content],0)}s=function(){var e;if(!(!v.state.isVisible||A)){if(A=!0,b.offsetHeight,b.style.transition=v.props.moveTransition,T()&&v.props.animation){var t,n,r=k(),o=r.box,a=r.content;ei3([o,a],i),ei9([o,a],"visible")}j(),U(),ei0(eoy,v),null==(e=v.popperInstance)||e.forceUpdate(),F("onMount",[v]),v.props.animation&&T()&&N(i,n=function(){v.state.isShown=!0,F("onShown",[v])})}},a=v.props.appendTo,u=O(),(o=v.props.interactive&&a===eiH||"parent"===a?u.parentNode:eiG(a,[u])).contains(b)||o.appendChild(b),v.state.isMounted=!0,G()}},hide:function(){var e=!v.state.isVisible,t=v.state.isDestroyed,n=!v.state.isEnabled,r=eiZ(v.props.duration,1,eoo.duration);if(!(e||t||n)&&(F("onHide",[v],!1),!1!==v.props.onHide(v))){if(v.state.isVisible=!1,v.state.isShown=!1,A=!1,d=!1,T()&&(b.style.visibility="hidden"),K(),D(),M(!0),T()){var i,o,a=k(),u=a.box,s=a.content;v.props.animation&&(ei3([u,s],r),ei9([u,s],"hidden"))}j(),U(),v.props.animation?T()&&(o=v.unmount,N(r,function(){!v.state.isVisible&&b.parentNode&&b.parentNode.contains(b)&&o()})):v.unmount()}},hideWithInteractivity:function(e){R().addEventListener("mousemove",m),ei0(eog,m),m(e)},enable:function(){v.state.isEnabled=!0},disable:function(){v.hide(),v.state.isEnabled=!1},unmount:function(){v.state.isVisible&&v.hide(),v.state.isMounted&&($(),X().forEach(function(e){e._tippy.unmount()}),b.parentNode&&b.parentNode.removeChild(b),eoy=eoy.filter(function(e){return e!==v}),v.state.isMounted=!1,F("onHidden",[v]))},destroy:function(){v.state.isDestroyed||(v.clearDelayTimeouts(),v.unmount(),V(),delete e._tippy,v.state.isDestroyed=!0,F("onDestroy",[v]))}};if(!c.render)return v;var x=c.render(v),b=x.popper,C=x.onUpdate;b.setAttribute("data-tippy-root",""),b.id="tippy-"+v.id,v.popper=b,e._tippy=v,b._tippy=v;var S=y.map(function(e){return e.fn(v)}),w=e.hasAttribute("aria-expanded");return Q(),U(),M(),F("onCreate",[v]),c.showOnCreate&&ee(),b.addEventListener("mouseenter",function(){v.props.interactive&&v.state.isVisible&&v.clearDelayTimeouts()}),b.addEventListener("mouseleave",function(){v.props.interactive&&v.props.trigger.indexOf("mouseenter")>=0&&R().addEventListener("mousemove",m)}),v;function I(){var e=v.props.touch;return Array.isArray(e)?e:[e,0]}function _(){return"hold"===I()[0]}function T(){var e;return!!(null!=(e=v.props.render)&&e.$$tippy)}function O(){return l||e}function R(){var e,t,n,r=O().parentNode;return r&&null!=(n=eiX(r)[0])&&null!=(t=n.ownerDocument)&&t.body?n.ownerDocument:document}function k(){return eoA(b)}function E(e){return v.state.isMounted&&!v.state.isVisible||ei8.isTouch||a&&"focus"===a.type?0:eiZ(v.props.delay,e?0:1,eoo.delay)}function M(e){void 0===e&&(e=!1),b.style.pointerEvents=v.props.interactive&&!e?"":"none",b.style.zIndex=""+v.props.zIndex}function F(e,t,n){if(void 0===n&&(n=!0),S.forEach(function(n){n[e]&&n[e].apply(n,t)}),n){var r;(r=v.props)[e].apply(r,t)}}function j(){var t=v.props.aria;if(t.content){var n="aria-"+t.content,r=b.id;eiX(v.props.triggerTarget||e).forEach(function(e){var t=e.getAttribute(n);if(v.state.isVisible)e.setAttribute(n,t?t+" "+r:r);else{var i=t&&t.replace(r,"").trim();i?e.setAttribute(n,i):e.removeAttribute(n)}})}}function U(){!(w||!v.props.aria.expanded)&&eiX(v.props.triggerTarget||e).forEach(function(e){v.props.interactive?e.setAttribute("aria-expanded",v.state.isVisible&&e===O()?"true":"false"):e.removeAttribute("aria-expanded")})}function K(){R().removeEventListener("mousemove",m),eog=eog.filter(function(e){return e!==m})}function L(t){if(!(ei8.isTouch&&(p||"mousedown"===t.type))){var n=t.composedPath&&t.composedPath()[0]||t.target;if(!(v.props.interactive&&ei7(b,n))){if(eiX(v.props.triggerTarget||e).some(function(e){return ei7(e,n)})){if(ei8.isTouch||v.state.isVisible&&v.props.trigger.indexOf("click")>=0)return}else F("onClickOutside",[v,t]);!0===v.props.hideOnClick&&(v.clearDelayTimeouts(),v.hide(),f=!0,setTimeout(function(){f=!1}),v.state.isMounted||D())}}}function B(){p=!0}function P(){p=!1}function W(){var e=R();e.addEventListener("mousedown",L,!0),e.addEventListener("touchend",L,eiY),e.addEventListener("touchstart",P,eiY),e.addEventListener("touchmove",B,eiY)}function D(){var e=R();e.removeEventListener("mousedown",L,!0),e.removeEventListener("touchend",L,eiY),e.removeEventListener("touchstart",P,eiY),e.removeEventListener("touchmove",B,eiY)}function N(e,t){var n=k().box;function r(e){e.target===n&&(ei4(n,"remove",r),t())}if(0===e)return t();ei4(n,"remove",u),ei4(n,"add",r),u=r}function q(t,n,r){void 0===r&&(r=!1),eiX(v.props.triggerTarget||e).forEach(function(e){e.addEventListener(t,n,r),h.push({node:e,eventType:t,handler:n,options:r})})}function Q(){var e;_()&&(q("touchstart",z,{passive:!0}),q("touchend",H,{passive:!0})),(e=v.props.trigger).split(/\s+/).filter(Boolean).forEach(function(e){if("manual"!==e)switch(q(e,z),e){case"mouseenter":q("mouseleave",H);break;case"focus":q(eoi?"focusout":"blur",Z);break;case"focusin":q("focusout",Z)}})}function V(){h.forEach(function(e){var t=e.node,n=e.eventType,r=e.handler,i=e.options;t.removeEventListener(n,r,i)}),h=[]}function z(e){var t,n=!1;if(!(!v.state.isEnabled||J(e)||f)){var r,i=(null==(t=a)?void 0:t.type)==="focus";a=e,l=e.currentTarget,U(),!v.state.isVisible&&eiJ(e,"MouseEvent")&&eog.forEach(function(t){return t(e)}),"click"===e.type&&(0>v.props.trigger.indexOf("mouseenter")||d)&&!1!==v.props.hideOnClick&&v.state.isVisible?n=!0:ee(e),"click"===e.type&&(d=!n),n&&!i&&et(e)}}function Y(e){var t,n,r,i,o=e.target,a=O().contains(o)||b.contains(o);!("mousemove"===e.type&&a)&&(t=X().concat(b).map(function(e){var t,n=null==(t=e._tippy.popperInstance)?void 0:t.state;return n?{popperRect:e.getBoundingClientRect(),popperState:n,props:c}:null}).filter(Boolean),r=(n=e).clientX,i=n.clientY,t.every(function(e){var t,n=e.popperRect,o=e.popperState,a=e.props.interactiveBorder,u=(t=o.placement).split("-")[0],s=o.modifiersData.offset;if(!s)return!0;var l="bottom"===u?s.top.y:0,c="top"===u?s.bottom.y:0,d="right"===u?s.left.x:0,f="left"===u?s.right.x:0,p=n.top-i+l>a,A=i-n.bottom-c>a,h=n.left-r+d>a,m=r-n.right-f>a;return p||A||h||m})&&(K(),et(e)))}function H(e){if(!(J(e)||v.props.trigger.indexOf("click")>=0&&d)){if(v.props.interactive){v.hideWithInteractivity(e);return}et(e)}}function Z(e){0>v.props.trigger.indexOf("focusin")&&e.target!==O()||v.props.interactive&&e.relatedTarget&&b.contains(e.relatedTarget)||et(e)}function J(e){return!!ei8.isTouch&&_()!==e.type.indexOf("touch")>=0}function G(){$();var t=v.props,n=t.popperOptions,r=t.placement,i=t.offset,o=t.getReferenceClientRect,a=t.moveTransition,u=T()?eoA(b).arrow:null,l=o?{getBoundingClientRect:o,contextElement:o.contextElement||O()}:e,c=[{name:"offset",options:{offset:i}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!a}},{name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(e){var t=e.state;if(T()){var n=k().box;["placement","reference-hidden","escaped"].forEach(function(e){"placement"===e?n.setAttribute("data-placement",t.placement):t.attributes.popper["data-popper-"+e]?n.setAttribute("data-"+e,""):n.removeAttribute("data-"+e)}),t.attributes.popper={}}}}];T()&&u&&c.push({name:"arrow",options:{element:u,padding:3}}),c.push.apply(c,(null==n?void 0:n.modifiers)||[]),v.popperInstance=eiq(l,b,Object.assign({},n,{placement:r,onFirstUpdate:s,modifiers:c}))}function $(){v.popperInstance&&(v.popperInstance.destroy(),v.popperInstance=null)}function X(){return ei1(b.querySelectorAll("[data-tippy-root]"))}function ee(e){v.clearDelayTimeouts(),e&&F("onTrigger",[v,e]),W();var t=E(!0),n=I(),i=n[0],o=n[1];ei8.isTouch&&"hold"===i&&o&&(t=o),t?r=setTimeout(function(){v.show()},t):v.show()}function et(e){if(v.clearDelayTimeouts(),F("onUntrigger",[v,e]),!v.state.isVisible){D();return}if(!(v.props.trigger.indexOf("mouseenter")>=0&&v.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(e.type)>=0&&d)){var t=E(!1);t?i=setTimeout(function(){v.state.isVisible&&v.hide()},t):o=requestAnimationFrame(function(){v.hide()})}}}(t,a);return n&&e.push(n),e},[]);return ei5(e)?u[0]:u}eov.defaultProps=eoo,eov.setDefaultProps=eou,eov.currentInput=ei8,Object.assign({},er1,{effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow)}}),eov.setDefaultProps({render:eoh});class eox{constructor({editor:e,element:t,view:n,tippyOptions:r={},updateDelay:i=250,shouldShow:o}){this.preventHide=!1,this.shouldShow=({view:e,state:t,from:n,to:r})=>{let{doc:i,selection:o}=t,{empty:a}=o,u=!i.textBetween(n,r).length&&enA(t.selection),s=this.element.contains(document.activeElement);return!(!(e.hasFocus()||s)||a||u||!this.editor.isEditable)},this.mousedownHandler=()=>{this.preventHide=!0},this.dragstartHandler=()=>{this.hide()},this.focusHandler=()=>{setTimeout(()=>this.update(this.editor.view))},this.blurHandler=({event:e})=>{var t;if(this.preventHide){this.preventHide=!1;return}null!=e&&e.relatedTarget&&!(null===(t=this.element.parentNode)||void 0===t)&&t.contains(e.relatedTarget)||this.hide()},this.tippyBlurHandler=e=>{this.blurHandler({event:e})},this.handleDebouncedUpdate=(e,t)=>{let n=!(null!=t&&t.selection.eq(e.state.selection)),r=!(null!=t&&t.doc.eq(e.state.doc));(n||r)&&(this.updateDebounceTimer&&clearTimeout(this.updateDebounceTimer),this.updateDebounceTimer=window.setTimeout(()=>{this.updateHandler(e,n,r,t)},this.updateDelay))},this.updateHandler=(e,t,n,r)=>{var i,o,a;let{state:u,composing:s}=e,{selection:l}=u;if(s||!t&&!n)return;this.createTooltip();let{ranges:c}=l,d=Math.min(...c.map(e=>e.$from.pos)),f=Math.max(...c.map(e=>e.$to.pos));if(!(null===(i=this.shouldShow)||void 0===i?void 0:i.call(this,{editor:this.editor,view:e,state:u,oldState:r,from:d,to:f}))){this.hide();return}null===(o=this.tippy)||void 0===o||o.setProps({getReferenceClientRect:(null===(a=this.tippyOptions)||void 0===a?void 0:a.getReferenceClientRect)||(()=>{var t;if((t=u.selection)instanceof $5){let n=e.nodeDOM(d),r=n.dataset.nodeViewWrapper?n:n.querySelector("[data-node-view-wrapper]");if(r&&(n=r.firstChild),n)return n.getBoundingClientRect()}return function(e,t,n){let r=e.state.doc.content.size,i=enh(t,0,r),o=enh(n,0,r),a=e.coordsAtPos(i),u=e.coordsAtPos(o,-1),s=Math.min(a.top,u.top),l=Math.max(a.bottom,u.bottom),c=Math.min(a.left,u.left),d=Math.max(a.right,u.right),f={top:s,bottom:l,left:c,right:d,width:d-c,height:l-s,x:c,y:s};return{...f,toJSON:()=>f}}(e,d,f)})}),this.show()},this.editor=e,this.element=t,this.view=n,this.updateDelay=i,o&&(this.shouldShow=o),this.element.addEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.view.dom.addEventListener("dragstart",this.dragstartHandler),this.editor.on("focus",this.focusHandler),this.editor.on("blur",this.blurHandler),this.tippyOptions=r,this.element.remove(),this.element.style.visibility="visible"}createTooltip(){let{element:e}=this.editor.options,t=!!e.parentElement;this.tippy||!t||(this.tippy=eov(e,{duration:0,getReferenceClientRect:null,content:this.element,interactive:!0,trigger:"manual",placement:"top",hideOnClick:"toggle",...this.tippyOptions}),this.tippy.popper.firstChild&&this.tippy.popper.firstChild.addEventListener("blur",this.tippyBlurHandler))}update(e,t){let{state:n}=e,r=n.selection.$from.pos!==n.selection.$to.pos;if(this.updateDelay>0&&r){this.handleDebouncedUpdate(e,t);return}let i=!(null!=t&&t.selection.eq(e.state.selection)),o=!(null!=t&&t.doc.eq(e.state.doc));this.updateHandler(e,i,o,t)}show(){var e;null===(e=this.tippy)||void 0===e||e.show()}hide(){var e;null===(e=this.tippy)||void 0===e||e.hide()}destroy(){var e,t;!(null===(e=this.tippy)||void 0===e)&&e.popper.firstChild&&this.tippy.popper.firstChild.removeEventListener("blur",this.tippyBlurHandler),null===(t=this.tippy)||void 0===t||t.destroy(),this.element.removeEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.view.dom.removeEventListener("dragstart",this.dragstartHandler),this.editor.off("focus",this.focusHandler),this.editor.off("blur",this.blurHandler)}}let eob=e=>new Xn({key:"string"==typeof e.pluginKey?new Xo(e.pluginKey):e.pluginKey,view:t=>new eox({view:t,...e})});et5.create({name:"bubbleMenu",addOptions:()=>({element:null,tippyOptions:{},pluginKey:"bubbleMenu",updateDelay:void 0,shouldShow:null}),addProseMirrorPlugins(){return this.options.element?[eob({pluginKey:this.options.pluginKey,editor:this.editor,element:this.options.element,tippyOptions:this.options.tippyOptions,updateDelay:this.options.updateDelay,shouldShow:this.options.shouldShow})]:[]}});let eoC=(...e)=>t=>{e.forEach(e=>{"function"==typeof e?e(t):e&&(e.current=t)})},eoS=({renderers:e})=>c.createElement(c.Fragment,null,Object.entries(e).map(([e,t])=>S.createPortal(t.reactElement,t.element,e)));class eow extends c.Component{constructor(e){super(e),this.editorContentRef=c.createRef(),this.initialized=!1,this.state={renderers:{}}}componentDidMount(){this.init()}componentDidUpdate(){this.init()}init(){let{editor:e}=this.props;if(e&&e.options.element){if(e.contentComponent)return;let t=this.editorContentRef.current;t.append(...e.options.element.childNodes),e.setOptions({element:t}),e.contentComponent=this,e.createNodeViews(),this.initialized=!0}}maybeFlushSync(e){this.initialized?(0,S.flushSync)(e):e()}setRenderer(e,t){this.maybeFlushSync(()=>{this.setState(({renderers:n})=>({renderers:{...n,[e]:t}}))})}removeRenderer(e){this.maybeFlushSync(()=>{this.setState(({renderers:t})=>{let n={...t};return delete n[e],{renderers:n}})})}componentWillUnmount(){let{editor:e}=this.props;if(!e||(this.initialized=!1,e.isDestroyed||e.view.setProps({nodeViews:{}}),e.contentComponent=null,!e.options.element.firstChild))return;let t=document.createElement("div");t.append(...e.options.element.childNodes),e.setOptions({element:t})}render(){let{editor:e,innerRef:t,...n}=this.props;return c.createElement(c.Fragment,null,c.createElement("div",{ref:eoC(t,this.editorContentRef),...n}),c.createElement(eoS,{renderers:this.state.renderers}))}}let eoI=(0,c.forwardRef)((e,t)=>{let n=c.useMemo(()=>Math.floor(4294967295*Math.random()).toString(),[e.editor]);return c.createElement(eow,{key:n,innerRef:t,...e})}),eo_=c.memo(eoI),eoT=(0,c.createContext)({editor:null});eoT.Consumer;let eoO=()=>(0,c.useContext)(eoT),eoR=e=>{let[t,n]=(0,c.useState)(null),{editor:r}=eoO();return(0,c.useEffect)(()=>{var n;if(!t||!(null===(n=e.editor)||void 0===n)&&n.isDestroyed||null!=r&&r.isDestroyed)return;let{pluginKey:i="bubbleMenu",editor:o,tippyOptions:a={},updateDelay:u,shouldShow:s=null}=e,l=o||r;if(!l){console.warn("BubbleMenu component is not rendered inside of an editor component or does not have editor prop.");return}let c=eob({updateDelay:u,editor:l,element:t,pluginKey:i,shouldShow:s,tippyOptions:a});return l.registerPlugin(c),()=>l.unregisterPlugin(i)},[e.editor,r,t]),c.createElement("div",{ref:n,className:e.className,style:{visibility:"hidden"}},e.children)},eok=(0,c.createContext)({onDragStart:void 0}),eoE=()=>(0,c.useContext)(eok),eoM=c.forwardRef((e,t)=>{let{onDragStart:n}=eoE(),r=e.as||"div";return c.createElement(r,{...e,ref:t,"data-node-view-wrapper":"",onDragStart:n,style:{whiteSpace:"normal",...e.style}})});class eoF{constructor(e,{editor:t,props:n={},as:r="div",className:i="",attrs:o}){this.ref=null,this.id=Math.floor(4294967295*Math.random()).toString(),this.component=e,this.editor=t,this.props=n,this.element=document.createElement(r),this.element.classList.add("react-renderer"),i&&this.element.classList.add(...i.split(" ")),o&&Object.keys(o).forEach(e=>{this.element.setAttribute(e,o[e])}),this.render()}render(){var e,t,n,r,i;let o=this.component,a=this.props;("function"==typeof o&&o.prototype&&o.prototype.isReactComponent||"object"==typeof o&&(null===(i=o.$$typeof)||void 0===i?void 0:i.toString())==="Symbol(react.forward_ref)")&&(a.ref=e=>{this.ref=e}),this.reactElement=c.createElement(o,{...a}),null===(t=null===(e=this.editor)||void 0===e?void 0:e.contentComponent)||void 0===t||t.setRenderer(this.id,this)}updateProps(e={}){this.props={...this.props,...e},this.render()}destroy(){var e,t;null===(t=null===(e=this.editor)||void 0===e?void 0:e.contentComponent)||void 0===t||t.removeRenderer(this.id)}}class eoj extends erv{mount(){let e={editor:this.editor,node:this.node,decorations:this.decorations,selected:!1,extension:this.extension,getPos:()=>this.getPos(),updateAttributes:(e={})=>this.updateAttributes(e),deleteNode:()=>this.deleteNode()};if(!this.component.displayName){var t;this.component.displayName=(t=this.extension.name).charAt(0).toUpperCase()+t.substring(1)}let n=e=>{let t=this.component,n=this.onDragStart.bind(this),r=e=>{e&&this.contentDOMElement&&e.firstChild!==this.contentDOMElement&&e.appendChild(this.contentDOMElement)};return c.createElement(c.Fragment,null,c.createElement(eok.Provider,{value:{onDragStart:n,nodeViewContentRef:r}},c.createElement(t,{...e})))};n.displayName="ReactNodeView",this.node.isLeaf?this.contentDOMElement=null:this.options.contentDOMElementTag?this.contentDOMElement=document.createElement(this.options.contentDOMElementTag):this.contentDOMElement=document.createElement(this.node.isInline?"span":"div"),this.contentDOMElement&&(this.contentDOMElement.style.whiteSpace="inherit");let r=this.node.isInline?"span":"div";this.options.as&&(r=this.options.as);let{className:i=""}=this.options;this.handleSelectionUpdate=this.handleSelectionUpdate.bind(this),this.editor.on("selectionUpdate",this.handleSelectionUpdate),this.renderer=new eoF(n,{editor:this.editor,props:e,as:r,className:`node-${this.node.type.name} ${i}`.trim(),attrs:this.options.attrs})}get dom(){var e;if(this.renderer.element.firstElementChild&&!(!(null===(e=this.renderer.element.firstElementChild)||void 0===e)&&e.hasAttribute("data-node-view-wrapper")))throw Error("Please use the NodeViewWrapper component for your node view.");return this.renderer.element}get contentDOM(){return this.node.isLeaf?null:this.contentDOMElement}handleSelectionUpdate(){let{from:e,to:t}=this.editor.state.selection;if(e<=this.getPos()&&t>=this.getPos()+this.node.nodeSize){if(this.renderer.props.selected)return;this.selectNode()}else{if(!this.renderer.props.selected)return;this.deselectNode()}}update(e,t){let n=e=>{this.renderer.updateProps(e)};if(e.type!==this.node.type)return!1;if("function"==typeof this.options.update){let r=this.node,i=this.decorations;return this.node=e,this.decorations=t,this.options.update({oldNode:r,oldDecorations:i,newNode:e,newDecorations:t,updateProps:()=>n({node:e,decorations:t})})}return e===this.node&&this.decorations===t||(this.node=e,this.decorations=t,n({node:e,decorations:t})),!0}selectNode(){this.renderer.updateProps({selected:!0}),this.renderer.element.classList.add("ProseMirror-selectednode")}deselectNode(){this.renderer.updateProps({selected:!1}),this.renderer.element.classList.remove("ProseMirror-selectednode")}destroy(){this.renderer.destroy(),this.editor.off("selectionUpdate",this.handleSelectionUpdate),this.contentDOMElement=null}}function eoU(e,t){return n=>n.editor.contentComponent?new eoj(e,n,t):{}}let eoK=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/,eoL=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))/g,eoB=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))$/,eoP=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))/g,eoW=erg.create({name:"bold",addOptions:()=>({HTMLAttributes:{}}),parseHTML:()=>[{tag:"strong"},{tag:"b",getAttrs:e=>"normal"!==e.style.fontWeight&&null},{style:"font-weight",getAttrs:e=>/^(bold(er)?|[5-9]\d{2,})$/.test(e)&&null}],renderHTML({HTMLAttributes:e}){return["strong",etP(this.options.HTMLAttributes,e),0]},addCommands(){return{setBold:()=>({commands:e})=>e.setMark(this.name),toggleBold:()=>({commands:e})=>e.toggleMark(this.name),unsetBold:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-b":()=>this.editor.commands.toggleBold(),"Mod-B":()=>this.editor.commands.toggleBold()}},addInputRules(){return[erA({find:eoK,type:this.type}),erA({find:eoB,type:this.type})]},addPasteRules(){return[erx({find:eoL,type:this.type}),erx({find:eoP,type:this.type})]}});var eoD,eoN,eoq=((eoD=eoq||{}).Document="document",eoD.Mark="mark",eoD.Node="node",eoD),eoQ=((eoN=eoQ||{}).Text="text",eoN.Embed="embed",eoN.Image="image",eoN);class eoV{constructor(e,t,n,r,i,o=!1){T(this,"extType","node"),T(this,"nodeType","text"),this.richTextNodeTypes=e,this.name=t,this.component=n,this.converter=r,this.placeholder=i,this.lockedFormat=o}}function eoz(e){return e instanceof eoV}class eoY extends eoV{constructor(e,t,n,r,i){super(e,"heading",t,r,i),this.levels=n}}class eoH extends eoV{constructor(e,t,n,r){super(e,t,n,r)}}function eoZ(e){return e instanceof eoH}let eoJ=ery.create({name:"hardBreak",addOptions:()=>({keepMarks:!0,HTMLAttributes:{}}),inline:!0,group:"inline",selectable:!1,parseHTML:()=>[{tag:"br"}],renderHTML({HTMLAttributes:e}){return["br",etP(this.options.HTMLAttributes,e)]},renderText:()=>`
18
- `,addCommands(){return{setHardBreak:()=>({commands:e,chain:t,state:n,editor:r})=>e.first([()=>e.exitCode(),()=>e.command(()=>{let{selection:e,storedMarks:i}=n;if(e.$from.parent.type.spec.isolating)return!1;let{keepMarks:o}=this.options,{splittableMarks:a}=r.extensionManager,u=i||e.$to.parentOffset&&e.$from.marks();return t().insertContent({type:this.name}).command(({tr:e,dispatch:t})=>{if(t&&u&&o){let n=u.filter(e=>a.includes(e.type.name));e.ensureMarks(n)}return!0}).run()})])}},addKeyboardShortcuts(){return{"Mod-Enter":()=>this.editor.commands.setHardBreak(),"Shift-Enter":()=>this.editor.commands.setHardBreak()}}}),eoG={isHardBreak:e=>e.type.name===eoJ.name,children:{reduce(e,t,n){let r=n;return e.forEach((e,n,i)=>{r=t(r,e,i)}),r},map(e,t){return this.reduce(e,(e,n)=>[...e,t(n)],[])},exists(e,t){return this.reduce(e,(e,n)=>e||t(n),!1)},filter(e,t){return this.reduce(e,(e,n)=>[...e,...t(n)?[n]:[]],[])}},marks:{reduce(e,t,n){let r=n;return e.marks.forEach((e,n)=>{r=t(r,e,n)}),r},map(e,t){return this.reduce(e,(e,n)=>[...e,t(n)],[])},filter(e,t){return this.reduce(e,(e,n)=>[...e,...t(n)?[n]:[]],[])}}};function eo$(){return{extensions:esH(),defaultTextConverter:void 0}}let eoX=eoW.extend({name:"bold"}),eo0=new class{constructor(e,t,n){T(this,"extType",eoq.Mark),T(this,"richTextNodeTypes",ND.RichTextNodeType.strong),this.name=e,this.component=t,this.converter=n}}(eoX.name,eoX,{fromPrismic:e=>function(){var t;return null==(t=e.marks[eoX.name])?void 0:t.create()},toPrismic(){}}),eo1=ery.create({name:"listItem",addOptions:()=>({HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}),content:"paragraph block*",defining:!0,parseHTML:()=>[{tag:"li"}],renderHTML({HTMLAttributes:e}){return["li",etP(this.options.HTMLAttributes,e),0]},addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}}),eo2=erg.create({name:"textStyle",addOptions:()=>({HTMLAttributes:{}}),parseHTML:()=>[{tag:"span",getAttrs:e=>!!e.hasAttribute("style")&&{}}],renderHTML({HTMLAttributes:e}){return["span",etP(this.options.HTMLAttributes,e),0]},addCommands(){return{removeEmptyTextStyle:()=>({state:e,commands:t})=>{let n=enG(e,this.type);return!!Object.entries(n).some(([,e])=>!!e)||t.unsetMark(this.name)}}}}),eo6=/^\s*([-+*])\s$/,eo5=ery.create({name:"bulletList",addOptions:()=>({itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}),group:"block list",content(){return`${this.options.itemTypeName}+`},parseHTML:()=>[{tag:"ul"}],renderHTML({HTMLAttributes:e}){return["ul",etP(this.options.HTMLAttributes,e),0]},addCommands(){return{toggleBulletList:()=>({commands:e,chain:t})=>this.options.keepAttributes?t().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(eo1.name,this.editor.getAttributes(eo2.name)).run():e.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-8":()=>this.editor.commands.toggleBulletList()}},addInputRules(){let e=erm({find:eo6,type:this.type});return(this.options.keepMarks||this.options.keepAttributes)&&(e=erm({find:eo6,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:()=>this.editor.getAttributes(eo2.name),editor:this.editor})),[e]}}),eo3=ery.create({name:"doc",topNode:!0,content:"block+"}),eo9=ery.create({name:"listItem",addOptions:()=>({HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}),content:"paragraph block*",defining:!0,parseHTML:()=>[{tag:"li"}],renderHTML({HTMLAttributes:e}){return["li",etP(this.options.HTMLAttributes,e),0]},addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}}),eo4=eo9.extend({name:"listItem",content:"paragraph*",addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name)}}}),eo7={component:eo4,converter:{fromPrismic:e=>function(t){var n;let r=eu5.converter.fromPrismic(e)(t);if(r)return null==(n=e.nodes[eo4.name])?void 0:n.create({},r)},toPrismic:(e,t)=>eoG.children.reduce(e,(e,n)=>{let r=eu5.converter.toPrismic(n),i=r instanceof Array?r.map(e=>({...e,type:t})):r?[{...r,type:t}]:[];return[...e,...i]},[])},placeholder:"List"},eo8="document",eae=e=>eo3.extend({name:eo8,content:e?"block+":"block"}),eat=e=>({fromPrismic(t,n){function r(e,t){return!t&&n&&k.TextBlock.is(e)?n(e):t}return function(n){var i;let o=n.value.reduce((n,i)=>{let o=e.find(e=>e.richTextNodeTypes.includes(i.type)),a=function(e){let{extension:t,block:n,schema:r}=e;if(t)switch(t.nodeType){case eoQ.Embed:return k.EmbedBlock.is(n)?t.converter.fromPrismic(r)(n):void 0;case eoQ.Text:return k.TextBlock.is(n)?t.converter.fromPrismic(r)(n):void 0;case eoQ.Image:return k.ImageBlock.is(n)?t.converter.fromPrismic(r)(n):void 0}}({extension:o,block:i,schema:t}),u=n.slice(0,n.length-1),s=(0,g.Z$)(n),l=function(e){var t,n;let{node:r,block:i,nodeWithDefault:o,previousNode:a}=e;return r&&a?r.type.name===a.type.name&&(r.type.name===esr.name||r.type.name===esz.name)?{merged:!0,updatedNode:a.copy(a.content.append(r.content))}:{merged:!1,updatedNode:o(i,r)}:{merged:!1,updatedNode:r}}({node:a,block:i,nodeWithDefault:r,previousNode:s});return l.updatedNode?[...l.merged?u:n,l.updatedNode]:n},[]);return null==(i=t.nodes[eo8])?void 0:i.create({},o)}},toPrismic:t=>({__TYPE__:"StructuredTextContent",value:[...eoG.children.reduce(t,(t,n)=>{let r=Object.values(e).find(e=>n.type.name===e.name),i=null==r?void 0:r.converter.toPrismic(n);return i||console.warn(`Cannot convert node of type '${n.type.name}'.`),i?[...t,...i instanceof Array?i:[i]]:t},[])]})}),ean=new class{constructor(e,t,n){T(this,"extType","document"),this.name=e,this.component=t,this.converter=n}}(eo8,eae,eat),ear=eoJ.extend({name:"hard_break"}),eai=`
19
- `,eao={fromPrismic:e=>function(t){var n;if(t===eai)return null==(n=e.nodes[ear.name])?void 0:n.create({})},toPrismic(e){if(e.type.name===ear.name)return eai}},eaa={isEmptyLine:e=>0===e.length,isFirst:e=>0===e},eau={name:ear.name,component:ear,converter:eao,splitTextToNodes:function(e,t){return function(n){let r=eao.fromPrismic(e)(eai);if(!r)return[n(t)];let i=t.split(eai);return 1===i.length?t.length?[n(t)]:[r]:i.reduce((e,t,i)=>eaa.isFirst(i)?eaa.isEmptyLine(t)?e:[...e,n(t)]:eaa.isEmptyLine(t)?[...e,r]:[...e,r,n(t)],[])}}},eas=et5.create({name:"placeholder",addOptions:()=>({emptyEditorClass:"is-editor-empty",emptyNodeClass:"is-empty",placeholder:"Write something …",showOnlyWhenEditable:!0,considerAnyAsEmpty:!1,showOnlyCurrent:!0,includeChildren:!1}),addProseMirrorPlugins(){return[new Xn({key:new Xo("placeholder"),props:{decorations:({doc:e,selection:t})=>{var n;let r=this.editor.isEditable||!this.options.showOnlyWhenEditable,{anchor:i}=t,o=[];if(!r)return null;let{firstChild:a}=e.content,u=a&&a.type.isLeaf,s=a&&a.isAtom,l=!!this.options.considerAnyAsEmpty||a&&a.type.name===(null===(n=e.type.contentMatch.defaultType)||void 0===n?void 0:n.name),c=e.content.childCount<=1&&a&&l&&a.nodeSize<=2&&(!u||!s);return e.descendants((e,t)=>{let n=i>=t&&i<=t+e.nodeSize,r=!e.isLeaf&&!e.childCount;if((n||!this.options.showOnlyCurrent)&&r){let a=[this.options.emptyNodeClass];c&&a.push(this.options.emptyEditorClass);let u=eew.node(t,t+e.nodeSize,{class:a.join(" "),"data-placeholder":"function"==typeof this.options.placeholder?this.options.placeholder({editor:this.editor,node:e,pos:t,hasAnchor:n}):this.options.placeholder});o.push(u)}return this.options.includeChildren}),eeT.create(e,o)}}})]}}),eal=e=>eas.configure({includeChildren:!0,placeholder:t=>(function({props:e,params:t}){var n;let{editor:r,hasAnchor:i,node:o}=e,{placeholderByNodeType:a,unfocusedPlaceholder:u,nodeExtensions:s}=t,l=!eoG.children.exists(r.state.doc,e=>e===o),c=r.isEditable,d=r.isFocused&&i,f=o.type.name!==eu5.name,p=d||f||l,A=s.length>1,h=function(){if(l)return eo7.placeholder;let e=a[o.type.name];return"string"==typeof e?e:null==e?void 0:e(o.attrs)}();return u&&!d&&r.isEmpty?u:("Type '/' for commands"===h?c&&p&&A:c&&p)&&h||""})({props:t,params:e}),showOnlyCurrent:!1,showOnlyWhenEditable:!1});function eac(e){return e.split("-")[1]}function ead(e){return"y"===e?"height":"width"}function eaf(e){return e.split("-")[0]}function eap(e){return["top","bottom"].includes(eaf(e))?"x":"y"}function eaA(e,t,n){let{reference:r,floating:i}=e,o=r.x+r.width/2-i.width/2,a=r.y+r.height/2-i.height/2,u=eap(t),s=ead(u),l=r[s]/2-i[s]/2,c="x"===u,d;switch(eaf(t)){case"top":d={x:o,y:r.y-i.height};break;case"bottom":d={x:o,y:r.y+r.height};break;case"right":d={x:r.x+r.width,y:a};break;case"left":d={x:r.x-i.width,y:a};break;default:d={x:r.x,y:r.y}}switch(eac(t)){case"start":d[u]-=l*(n&&c?-1:1);break;case"end":d[u]+=l*(n&&c?-1:1)}return d}let eah=async(e,t,n)=>{let{placement:r="bottom",strategy:i="absolute",middleware:o=[],platform:a}=n,u=o.filter(Boolean),s=await (null==a.isRTL?void 0:a.isRTL(t)),l=await a.getElementRects({reference:e,floating:t,strategy:i}),{x:c,y:d}=eaA(l,r,s),f=r,p={},A=0;for(let h=0;h<u.length;h++){let{name:m,fn:g}=u[h],{x:y,y:v,data:x,reset:b}=await g({x:c,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:p,rects:l,platform:a,elements:{reference:e,floating:t}});c=y??c,d=v??d,p={...p,[m]:{...p[m],...x}},b&&A<=50&&(A++,"object"==typeof b&&(b.placement&&(f=b.placement),b.rects&&(l=!0===b.rects?await a.getElementRects({reference:e,floating:t,strategy:i}):b.rects),{x:c,y:d}=eaA(l,f,s)),h=-1)}return{x:c,y:d,placement:f,strategy:i,middlewareData:p}};function eam(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}async function eag(e,t){var n,r,i;void 0===t&&(t={});let{x:o,y:a,platform:u,rects:s,elements:l,strategy:c}=e,{boundary:d="clippingAncestors",rootBoundary:f="viewport",elementContext:p="floating",altBoundary:A=!1,padding:h=0}=t,m="number"!=typeof h?{top:0,right:0,bottom:0,left:0,...h}:{top:h,right:h,bottom:h,left:h},g=l[A?"floating"===p?"reference":"floating":p],y=eam(await u.getClippingRect({element:null==(n=await (null==u.isElement?void 0:u.isElement(g)))||n?g:g.contextElement||await (null==u.getDocumentElement?void 0:u.getDocumentElement(l.floating)),boundary:d,rootBoundary:f,strategy:c})),v="floating"===p?{...s.floating,x:o,y:a}:s.reference,x=await (null==u.getOffsetParent?void 0:u.getOffsetParent(l.floating)),b=await (null==u.isElement?void 0:u.isElement(x))&&await (null==u.getScale?void 0:u.getScale(x))||{x:1,y:1},C=eam(u.convertOffsetParentRelativeRectToViewportRelativeRect?await u.convertOffsetParentRelativeRectToViewportRelativeRect({rect:v,offsetParent:x,strategy:c}):v);return{top:(y.top-C.top+m.top)/b.y,bottom:(C.bottom-y.bottom+m.bottom)/b.y,left:(y.left-C.left+m.left)/b.x,right:(C.right-y.right+m.right)/b.x}}let eay=Math.min,eav=Math.max;function eax(e,t,n){return eav(e,eay(t,n))}["top","right","bottom","left"].reduce((e,t)=>e.concat(t,t+"-start",t+"-end"),[]);let eab={left:"right",right:"left",bottom:"top",top:"bottom"};function eaC(e){return e.replace(/left|right|bottom|top/g,e=>eab[e])}let eaS={start:"end",end:"start"};function eaw(e){return e.replace(/start|end/g,e=>eaS[e])}function eaI(e){return"x"===e?"y":"x"}function ea_(e){var t;return(null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function eaT(e){return ea_(e).getComputedStyle(e)}let eaO=Math.min,eaR=Math.max,eak=Math.round;function eaE(e){let t=eaT(e),n=parseFloat(t.width),r=parseFloat(t.height),i=e.offsetWidth,o=e.offsetHeight,a=eak(n)!==i||eak(r)!==o;return a&&(n=i,r=o),{width:n,height:r,fallback:a}}function eaM(e){return eaL(e)?(e.nodeName||"").toLowerCase():""}let eaF;function eaj(){if(eaF)return eaF;let e=navigator.userAgentData;return e&&Array.isArray(e.brands)?eaF=e.brands.map(e=>e.brand+"/"+e.version).join(" "):navigator.userAgent}function eaU(e){return e instanceof ea_(e).HTMLElement}function eaK(e){return e instanceof ea_(e).Element}function eaL(e){return e instanceof ea_(e).Node}function eaB(e){return!(typeof ShadowRoot>"u")&&(e instanceof ea_(e).ShadowRoot||e instanceof ShadowRoot)}function eaP(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=eaT(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(i)}function eaW(e){return["table","td","th"].includes(eaM(e))}function eaD(e){let t=/firefox/i.test(eaj()),n=eaT(e),r=n.backdropFilter||n.WebkitBackdropFilter;return"none"!==n.transform||"none"!==n.perspective||!!r&&"none"!==r||t&&"filter"===n.willChange||t&&!!n.filter&&"none"!==n.filter||["transform","perspective"].some(e=>n.willChange.includes(e))||["paint","layout","strict","content"].some(e=>{let t=n.contain;return null!=t&&t.includes(e)})}function eaN(){return/^((?!chrome|android).)*safari/i.test(eaj())}function eaq(e){return["html","body","#document"].includes(eaM(e))}function eaQ(e){return eaK(e)?e:e.contextElement}let eaV={x:1,y:1};function eaz(e){let t=eaQ(e);if(!eaU(t))return eaV;let n=t.getBoundingClientRect(),{width:r,height:i,fallback:o}=eaE(t),a=(o?eak(n.width):n.width)/r,u=(o?eak(n.height):n.height)/i;return a&&Number.isFinite(a)||(a=1),u&&Number.isFinite(u)||(u=1),{x:a,y:u}}function eaY(e,t,n,r){var i,o;void 0===t&&(t=!1),void 0===n&&(n=!1);let a=e.getBoundingClientRect(),u=eaQ(e),s=eaV;t&&(r?eaK(r)&&(s=eaz(r)):s=eaz(e));let l=u?ea_(u):window,c=eaN()&&n,d=(a.left+(c&&(null==(i=l.visualViewport)?void 0:i.offsetLeft)||0))/s.x,f=(a.top+(c&&(null==(o=l.visualViewport)?void 0:o.offsetTop)||0))/s.y,p=a.width/s.x,A=a.height/s.y;if(u){let h=ea_(u),m=r&&eaK(r)?ea_(r):r,g=h.frameElement;for(;g&&r&&m!==h;){let y=eaz(g),v=g.getBoundingClientRect(),x=getComputedStyle(g);v.x+=(g.clientLeft+parseFloat(x.paddingLeft))*y.x,v.y+=(g.clientTop+parseFloat(x.paddingTop))*y.y,d*=y.x,f*=y.y,p*=y.x,A*=y.y,d+=v.x,f+=v.y,g=ea_(g).frameElement}}return{width:p,height:A,top:f,right:d+p,bottom:f+A,left:d,x:d,y:f}}function eaH(e){return((eaL(e)?e.ownerDocument:e.document)||window.document).documentElement}function eaZ(e){return eaK(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function eaJ(e){return eaY(eaH(e)).left+eaZ(e).scrollLeft}function eaG(e){if("html"===eaM(e))return e;let t=e.assignedSlot||e.parentNode||eaB(e)&&e.host||eaH(e);return eaB(t)?t.host:t}function ea$(e,t){var n;void 0===t&&(t=[]);let r=function e(t){let n=eaG(t);return eaq(n)?n.ownerDocument.body:eaU(n)&&eaP(n)?n:e(n)}(e),i=r===(null==(n=e.ownerDocument)?void 0:n.body),o=ea_(r);return i?t.concat(o,o.visualViewport||[],eaP(r)?r:[]):t.concat(r,ea$(r))}function eaX(e,t,n){let r;if("viewport"===t)r=function(e,t){let n=ea_(e),r=eaH(e),i=n.visualViewport,o=r.clientWidth,a=r.clientHeight,u=0,s=0;if(i){o=i.width,a=i.height;let l=eaN();(!l||l&&"fixed"===t)&&(u=i.offsetLeft,s=i.offsetTop)}return{width:o,height:a,x:u,y:s}}(e,n);else if("document"===t)r=function(e){let t=eaH(e),n=eaZ(e),r=e.ownerDocument.body,i=eaR(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),o=eaR(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),a=-n.scrollLeft+eaJ(e),u=-n.scrollTop;return"rtl"===eaT(r).direction&&(a+=eaR(t.clientWidth,r.clientWidth)-i),{width:i,height:o,x:a,y:u}}(eaH(e));else if(eaK(t))r=function(e,t){let n=eaY(e,!0,"fixed"===t),r=n.top+e.clientTop,i=n.left+e.clientLeft,o=eaU(e)?eaz(e):{x:1,y:1};return{width:e.clientWidth*o.x,height:e.clientHeight*o.y,x:i*o.x,y:r*o.y}}(t,n);else{let i={...t};if(eaN()){var o,a;let u=ea_(e);i.x-=(null==(o=u.visualViewport)?void 0:o.offsetLeft)||0,i.y-=(null==(a=u.visualViewport)?void 0:a.offsetTop)||0}r=i}return eam(r)}function ea0(e,t){return eaU(e)&&"fixed"!==eaT(e).position?t?t(e):e.offsetParent:null}function ea1(e,t){let n=ea_(e),r=ea0(e,t);for(;r&&eaW(r)&&"static"===eaT(r).position;)r=ea0(r,t);return r&&("html"===eaM(r)||"body"===eaM(r)&&"static"===eaT(r).position&&!eaD(r))?n:r||function(e){let t=eaG(e);for(;eaU(t)&&!eaq(t);){if(eaD(t))return t;t=eaG(t)}return null}(e)||n}let ea2={getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,o="clippingAncestors"===n?function(e,t){let n=t.get(e);if(n)return n;let r=ea$(e).filter(e=>eaK(e)&&"body"!==eaM(e)),i=null,o="fixed"===eaT(e).position,a=o?eaG(e):e;for(;eaK(a)&&!eaq(a);){let u=eaT(a),s=eaD(a);"fixed"===u.position?i=null:(o?s||i:s||"static"!==u.position||!i||!["absolute","fixed"].includes(i.position))?i=u:r=r.filter(e=>e!==a),a=eaG(a)}return t.set(e,r),r}(t,this._c):[].concat(n),a=[...o,r],u=a[0],s=a.reduce((e,n)=>{let r=eaX(t,n,i);return e.top=eaR(r.top,e.top),e.right=eaO(r.right,e.right),e.bottom=eaO(r.bottom,e.bottom),e.left=eaR(r.left,e.left),e},eaX(t,u,i));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}},convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{rect:t,offsetParent:n,strategy:r}=e,i=eaU(n),o=eaH(n);if(n===o)return t;let a={scrollLeft:0,scrollTop:0},u={x:1,y:1},s={x:0,y:0};if((i||!i&&"fixed"!==r)&&(("body"!==eaM(n)||eaP(o))&&(a=eaZ(n)),eaU(n))){let l=eaY(n);u=eaz(n),s.x=l.x+n.clientLeft,s.y=l.y+n.clientTop}return{width:t.width*u.x,height:t.height*u.y,x:t.x*u.x-a.scrollLeft*u.x+s.x,y:t.y*u.y-a.scrollTop*u.y+s.y}},isElement:eaK,getDimensions:function(e){return eaU(e)?eaE(e):e.getBoundingClientRect()},getOffsetParent:ea1,getDocumentElement:eaH,getScale:eaz,async getElementRects(e){let{reference:t,floating:n,strategy:r}=e,i=this.getOffsetParent||ea1,o=this.getDimensions;return{reference:function(e,t,n){let r=eaU(t),i=eaH(t),o=eaY(e,!0,"fixed"===n,t),a={scrollLeft:0,scrollTop:0},u={x:0,y:0};if(r||!r&&"fixed"!==n){if(("body"!==eaM(t)||eaP(i))&&(a=eaZ(t)),eaU(t)){let s=eaY(t,!0);u.x=s.x+t.clientLeft,u.y=s.y+t.clientTop}else i&&(u.x=eaJ(i))}return{x:o.left+a.scrollLeft-u.x,y:o.top+a.scrollTop-u.y,width:o.width,height:o.height}}(t,await i(n),r),floating:{x:0,y:0,...await o(n)}}},getClientRects:e=>Array.from(e.getClientRects()),isRTL:e=>"rtl"===eaT(e).direction};function ea6(e,t,n,r){void 0===r&&(r={});let{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:a=!0,animationFrame:u=!1}=r,s=i&&!u,l=s||o?[...eaK(e)?ea$(e):e.contextElement?ea$(e.contextElement):[],...ea$(t)]:[];l.forEach(e=>{s&&e.addEventListener("scroll",n,{passive:!0}),o&&e.addEventListener("resize",n)});let c,d=null;if(a){let f=!0;d=new ResizeObserver(()=>{f||n(),f=!1}),eaK(e)&&!u&&d.observe(e),eaK(e)||!e.contextElement||u||d.observe(e.contextElement),d.observe(t)}let p=u?eaY(e):null;return u&&function t(){let r=eaY(e);p&&(r.x!==p.x||r.y!==p.y||r.width!==p.width||r.height!==p.height)&&n(),p=r,c=requestAnimationFrame(t)}(),n(),()=>{var e;l.forEach(e=>{s&&e.removeEventListener("scroll",n),o&&e.removeEventListener("resize",n)}),null==(e=d)||e.disconnect(),d=null,u&&cancelAnimationFrame(c)}}let ea5=(e,t,n)=>{let r=new Map,i={platform:ea2,...n},o={...i.platform,_c:r};return eah(e,t,{...i,platform:o})};var ea3="u">typeof document?c.useLayoutEffect:c.useEffect;function ea9(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if((n=e.length)!=t.length)return!1;for(r=n;0!=r--;)if(!ea9(e[r],t[r]))return!1;return!0}if((n=(i=Object.keys(e)).length)!==Object.keys(t).length)return!1;for(r=n;0!=r--;)if(!Object.prototype.hasOwnProperty.call(t,i[r]))return!1;for(r=n;0!=r--;){let o=i[r];if(!("_owner"===o&&e.$$typeof)&&!ea9(e[o],t[o]))return!1}return!0}return e!=e&&t!=t}function ea4(e){let t=c.useRef(e);return ea3(()=>{t.current=e}),t}var ea7="u">typeof document?c.useLayoutEffect:c.useEffect;let ea8=!1,eue=0,eut=()=>"floating-ui-"+eue++,eun=(QL||(QL=n.t(c,2)))["useId".toString()],eur=eun??function(){let[e,t]=c.useState(()=>ea8?eut():void 0);return ea7(()=>{null==e&&t(eut())},[]),c.useEffect(()=>{ea8||(ea8=!0)},[]),e},eui=c.createContext(null),euo=c.createContext(null),eua=()=>{var e,t;return null!=(e=null==(t=c.useContext(eui))?void 0:t.id)?e:null},euu=()=>c.useContext(euo);function eus(e){var t;return null!=(t=null==e?void 0:e.ownerDocument)?t:document}function eul(e){var t;return null!=(t=eus(e).defaultView)?t:window}function euc(e){return!!e&&e instanceof eul(e).Element}let eud=(QL||(QL=n.t(c,2)))["useInsertionEffect".toString()];function euf(e){let t=c.useRef(()=>{});return eud?eud(()=>{t.current=e}):t.current=e,c.useCallback(function(){for(var e=arguments.length,n=Array(e),r=0;r<e;r++)n[r]=arguments[r];return null==t.current?void 0:t.current(...n)},[])}function eup(e,t,n){let r=new Map;return{..."floating"===n&&{tabIndex:-1},...e,...t.map(e=>e?e[n]:null).concat(e).reduce((e,t)=>(t&&Object.entries(t).forEach(t=>{let[n,i]=t;if(0===n.indexOf("on")){if(r.has(n)||r.set(n,[]),"function"==typeof i){var o;null==(o=r.get(n))||o.push(i),e[n]=function(){for(var e,t=arguments.length,i=Array(t),o=0;o<t;o++)i[o]=arguments[o];null==(e=r.get(n))||e.forEach(e=>e(...i))}}}else e[n]=i}),e),{})}}function euA(e,t){var n,r;let i=null!=(n=e.filter(e=>{var n;return e.parentId===t&&(null==(n=e.context)?void 0:n.open)}))?n:[],o=i;for(;o.length;)o=null!=(r=e.filter(e=>{var t;return null==(t=o)?void 0:t.some(t=>{var n;return e.parentId===t.id&&(null==(n=e.context)?void 0:n.open)})}))?r:[],i=i.concat(o);return i}function euh(e){let t=e.activeElement;for(;(null==(n=t)||null==(r=n.shadowRoot)?void 0:r.activeElement)!=null;){var n,r;t=t.shadowRoot.activeElement}return t}function eum(e){e.preventDefault(),e.stopPropagation()}function eug(e){let t=(0,c.useRef)();return ea7(()=>{t.current=e},[e]),t.current}let euy=function(e,t){let{open:n}=e,{enabled:r=!0,role:i="dialog"}=void 0===t?{}:t,o=eur(),a=eur(),u={id:o,role:i};return r?"tooltip"===i?{reference:{"aria-describedby":n?o:void 0},floating:u}:{reference:{"aria-expanded":n?"true":"false","aria-haspopup":"alertdialog"===i?"dialog":i,"aria-controls":n?o:void 0,..."listbox"===i&&{role:"combobox"},..."menu"===i&&{id:a}},floating:{...u,..."menu"===i&&{"aria-labelledby":a}}}:{}};function euv(e,t){return null!=t&&("composedPath"in e?e.composedPath().includes(t):null!=e.target&&t.contains(e.target))}let eux=function(e,t){let{open:n,onOpenChange:r,refs:i,events:o,nodeId:a}=e,{enabled:u=!0,escapeKey:s=!0,outsidePointerDown:l=!0,referencePointerDown:d=!1,ancestorScroll:f=!1,bubbles:p=!0}=void 0===t?{}:t,A=euu(),h=null!=eua(),m=c.useRef(!1);return c.useEffect(()=>{if(!n||!u)return;function e(e){"Escape"!==e.key||!p&&A&&euA(A.nodesRef.current,a).length>0||(o.emit("dismiss",{preventScroll:!1}),r(!1))}function t(e){var t,n;let u=m.current;if(m.current=!1,u)return;let s="composedPath"in e?e.composedPath()[0]:e.target;if(euc(s)&&i.floating.current){let l=null!=(n=i.floating.current.ownerDocument.defaultView)?n:window,c=s.scrollWidth>s.clientWidth,d=s.scrollHeight>s.clientHeight,f=d&&e.offsetX>s.clientWidth;if(d&&"rtl"===l.getComputedStyle(s).direction&&(f=e.offsetX<=s.offsetWidth-s.clientWidth),f||c&&e.offsetY>s.clientHeight)return}let g=A&&euA(A.nodesRef.current,a).some(t=>{var n;return euv(e,null==(n=t.context)?void 0:n.refs.floating.current)});euv(e,i.floating.current)||euv(e,i.domReference.current)||g||!p&&A&&euA(A.nodesRef.current,a).length>0||(o.emit("dismiss",!!h&&{preventScroll:!0}),r(!1))}function c(){r(!1)}let d=eus(i.floating.current);s&&d.addEventListener("keydown",e),l&&d.addEventListener("pointerdown",t);let g=(f?[...euc(i.reference.current)?ea$(i.reference.current):[],...euc(i.floating.current)?ea$(i.floating.current):[]]:[]).filter(e=>{var t;return e!==(null==(t=d.defaultView)?void 0:t.visualViewport)});return g.forEach(e=>e.addEventListener("scroll",c,{passive:!0})),()=>{s&&d.removeEventListener("keydown",e),l&&d.removeEventListener("pointerdown",t),g.forEach(e=>e.removeEventListener("scroll",c))}},[s,l,o,A,a,n,r,f,u,p,i,h]),u?{reference:{onPointerDown(){d&&(o.emit("dismiss"),r(!1))}},floating:{onPointerDownCapture(){m.current=!0}}}:{}},eub="ArrowUp",euC="ArrowDown",euS="ArrowLeft",euw="ArrowRight";function euI(e,t,n){return Math.floor(e/t)!==n}function eu_(e,t){return t<0||t>=e.current.length}function euT(e,t){let{startingIndex:n=-1,decrement:r=!1,disabledIndices:i,amount:o=1}=void 0===t?{}:t,a=e.current,u=n;do{var s,l;u+=r?-o:o}while(u>=0&&u<=a.length-1&&(i?i.includes(u):null==a[u]||null!=(s=a[u])&&s.hasAttribute("disabled")||(null==(l=a[u])?void 0:l.getAttribute("aria-disabled"))==="true"));return u}function euO(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function euR(e,t){return euO(t,e===eub||e===euC,e===euS||e===euw)}function euk(e,t,n){return euO(t,e===euC,n?e===euS:e===euw)||"Enter"===e||" "==e||""===e}function euE(e,t){return euT(e,{disabledIndices:t})}function euM(e,t){return euT(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}let euF=function(e,t){let{open:n,onOpenChange:r,refs:i}=e,{listRef:o,activeIndex:a,onNavigate:u=()=>{},enabled:s=!0,selectedIndex:l=null,allowEscape:d=!1,loop:f=!1,nested:p=!1,rtl:A=!1,virtual:h=!1,focusItemOnOpen:m="auto",focusItemOnHover:g=!0,openOnArrowKeyDown:y=!0,disabledIndices:v,orientation:x="vertical",cols:b=1}=void 0===t?{listRef:{current:[]},activeIndex:null,onNavigate(){}}:t,C=eua(),S=euu(),w=eug(n),I=euf(u),_=euf(eug(u)),T=c.useRef(m),O=c.useRef(l??-1),R=c.useRef(null),k=function(e){let t=(0,c.useRef)(e);return ea7(()=>{t.current=e}),t}(v),E=c.useRef(!1),M=c.useRef(-1),[F,j]=c.useState(),U=c.useCallback((e,t)=>{M.current=requestAnimationFrame(()=>{var n,r;h?j(null==(n=e.current[t.current])?void 0:n.id):null==(r=e.current[t.current])||r.focus({preventScroll:!0})})},[h]);function K(e){var t,a,u,s;if(E.current=!0,p&&(t=e.key,euO(x,A?t===euw:t===euS,t===eub))){eum(e),r(!1),(s=i.domReference.current)&&s instanceof eul(s).HTMLElement&&i.domReference.current.focus();return}let l=O.current,c=euE(o,v),m=euM(o,v);if("Home"===e.key&&(O.current=c,I(O.current)),"End"===e.key&&(O.current=m,I(O.current)),b>1){let g=O.current;if(e.key===eub){if(eum(e),-1===g)O.current=m;else if(O.current=euT(o,{startingIndex:g,amount:b,decrement:!0,disabledIndices:v}),f&&(g-b<c||O.current<0)){let y=g%b,C=m%b,S=m-(C-y);C===y?O.current=m:O.current=C>y?S:S-b}eu_(o,O.current)&&(O.current=g),I(O.current)}if(e.key===euC&&(eum(e),-1===g?O.current=c:(O.current=euT(o,{startingIndex:g,amount:b,disabledIndices:v}),f&&g+b>m&&(O.current=euT(o,{startingIndex:g%b-b,amount:b,disabledIndices:v}))),eu_(o,O.current)&&(O.current=g),I(O.current)),"both"===x){let w=Math.floor(g/b);e.key===euw&&(eum(e),g%b!=b-1?(O.current=euT(o,{startingIndex:g,disabledIndices:v}),f&&euI(O.current,b,w)&&(O.current=euT(o,{startingIndex:g-g%b-1,disabledIndices:v}))):f&&(O.current=euT(o,{startingIndex:g-g%b-1,disabledIndices:v})),euI(O.current,b,w)&&(O.current=g)),e.key===euS&&(eum(e),g%b!=0?(O.current=euT(o,{startingIndex:g,disabledIndices:v,decrement:!0}),f&&euI(O.current,b,w)&&(O.current=euT(o,{startingIndex:g+(b-g%b),decrement:!0,disabledIndices:v}))):f&&(O.current=euT(o,{startingIndex:g+(b-g%b),decrement:!0,disabledIndices:v})),euI(O.current,b,w)&&(O.current=g)),eu_(o,O.current)&&(f&&Math.floor(m/b)===w?O.current=e.key===euS?m:euT(o,{startingIndex:g-g%b-1,disabledIndices:v}):O.current=g),I(O.current);return}}if(euR(e.key,x)){if(eum(e),n&&!h&&euh(e.currentTarget.ownerDocument)===e.currentTarget){O.current=euk(e.key,x,A)?c:m,I(O.current);return}euk(e.key,x,A)?f?O.current=l>=m?d&&l!==o.current.length?-1:c:euT(o,{startingIndex:l,disabledIndices:v}):O.current=Math.min(m,euT(o,{startingIndex:l,disabledIndices:v})):f?O.current=l<=c?d&&-1!==l?o.current.length:m:euT(o,{startingIndex:l,decrement:!0,disabledIndices:v}):O.current=Math.max(c,euT(o,{startingIndex:l,decrement:!0,disabledIndices:v})),eu_(o,O.current)?I(null):I(O.current)}}return ea7(()=>{s&&(!w&&n&&T.current&&null!=l&&I(l),w&&!n&&(cancelAnimationFrame(M.current),O.current=-1,_(null)))},[n,w,l,o,U,s,I,_]),ea7(()=>{s&&n&&(null==a?null==l&&(w&&(O.current=-1,U(o,O)),!w&&T.current&&(null!=R.current||!0===T.current&&null==R.current)&&(O.current=null==R.current||euk(R.current,x,A)||p?euE(o,k.current):euM(o,k.current),I(O.current),U(o,O))):eu_(o,a)||(O.current=a,U(o,O)))},[n,w,a,l,p,o,I,U,s,d,x,A,h,k]),ea7(()=>{if(s&&!n&&w){var e,t;let r=null==S||null==(e=S.nodesRef.current.find(e=>e.id===C))||null==(t=e.context)?void 0:t.refs.floating.current;r&&!r.contains(euh(eus(r)))&&r.focus({preventScroll:!0})}},[s,n,w,S,C]),ea7(()=>{R.current=null}),s?{reference:{...h&&n&&null!=a&&{"aria-activedescendant":F},onKeyDown(e){if(E.current=!0,h&&n)return K(e);if((0===e.key.indexOf("Arrow")||"Enter"===e.key||" "===e.key||""===e.key)&&(R.current=e.key),p){var t,i,a;t=e.key,euO(x,A?t===euS:t===euw,t===euC)&&(eum(e),n?(O.current=euE(o,v),I(O.current)):r(!0));return}euR(e.key,x)&&(null!=l&&(O.current=l),eum(e),!n&&y?r(!0):K(e),n&&I(O.current))}},floating:{"aria-orientation":"both"===x?void 0:x,...h&&null!=a&&{"aria-activedescendant":F},onKeyDown:K,onPointerMove(){E.current=!1}},item:{onFocus(e){let{currentTarget:t}=e,n=o.current.indexOf(t);-1!==n&&I(n)},onClick(e){let{currentTarget:t}=e;return t.focus({preventScroll:!0})},...g&&{onMouseMove(e){let{currentTarget:t}=e;if(t){let n=o.current.indexOf(t);-1!==n&&I(n)}},onPointerLeave(){if(!E.current&&(O.current=-1,U(o,O),I(null),!h)){var e;null==(e=i.floating.current)||e.focus({preventScroll:!0})}}}}}:{}};function euj(e){var t,n;let{char:r,allowSpaces:i,allowedPrefixes:o,startOfLine:a,$position:u}=e,s=r.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&"),l=RegExp(`\\s${s}$`),c=a?"^":"",d=i?RegExp(`${c}${s}.*?(?=\\s${s}|$)`,"gm"):RegExp(`${c}(?:^)?${s}[^\\s${s}]*`,"gm"),f=(null===(t=u.nodeBefore)||void 0===t?void 0:t.isText)&&u.nodeBefore.text;if(!f)return null;let p=u.pos-f.length,A=Array.from(f.matchAll(d)).pop();if(!A||void 0===A.input||void 0===A.index)return null;let h=A.input.slice(Math.max(0,A.index-1),A.index),m=RegExp(`^[${null==o?void 0:o.join("")}\0]?$`).test(h);if(null!==o&&!m)return null;let g=p+A.index,y=g+A[0].length;return i&&l.test(f.slice(y-1,y+1))&&(A[0]+=" ",y+=1),g<u.pos&&y>=u.pos?{range:{from:g,to:y},query:A[0].slice(r.length),text:A[0]}:null}let euU=new Xo("suggestion"),euK=ery.create({name:"paragraph",priority:1e3,addOptions:()=>({HTMLAttributes:{}}),group:"block",content:"inline*",parseHTML:()=>[{tag:"p"}],renderHTML({HTMLAttributes:e}){return["p",etP(this.options.HTMLAttributes,e),0]},addCommands(){return{setParagraph:()=>({commands:e})=>e.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}}),euL={heading1:"heading1",heading2:"heading2",heading3:"heading3",heading4:"heading4",heading5:"heading5",heading6:"heading6",paragraph:"paragraph",preformatted:"preformatted",strong:"strong",em:"em",listItem:"list-item",oListItem:"o-list-item",list:"group-list-item",oList:"group-o-list-item",image:"image",embed:"embed",hyperlink:"hyperlink",label:"label",span:"span"},euB=()=>(++euB.i).toString();euB.i=0;let euP=e=>{let t=euN(e),n=[];for(let r=0;r<t.length;r++)n.push(euq(t[r]));return{key:euB(),children:n}},euW=(e,t=[])=>({key:euB(),type:e.type,text:"text"in e?e.text:void 0,node:e,children:t}),euD=e=>euW({type:euL.span,text:e,spans:[]}),euN=e=>{let t=e.slice(0);for(let n=0;n<t.length;n++){let r=t[n];if(r.type===euL.listItem||r.type===euL.oListItem){let i=[r];for(;t[n+1]&&t[n+1].type===r.type;)i.push(t[n+1]),t.splice(n,1);r.type===euL.listItem?t[n]={type:euL.list,items:i}:t[n]={type:euL.oList,items:i}}}return t},euq=e=>{if("text"in e)return euW(e,euQ(e.spans,e));if("items"in e){let t=[];for(let n=0;n<e.items.length;n++)t.push(euq(e.items[n]));return euW(e,t)}return euW(e)},euQ=(e,t,n)=>{if(!e.length)return[euD(t.text)];let r=e.slice(0);r.sort((e,t)=>e.start-t.start||t.end-e.end);let i=[];for(let o=0;o<r.length;o++){let a=r[o],u=n&&n.start||0,s=a.start-u,l=a.end-u,c=t.text.slice(s,l),d=[];for(let f=o;f<r.length;f++){let p=r[f];p!==a&&p.start>=a.start&&p.end<=a.end&&(d.push(p),r.splice(f,1),f--)}0===o&&s>0&&i.push(euD(t.text.slice(0,s)));let A={...a,text:c};i.push(euW(A,euQ(d,{...t,text:c},a))),l<t.text.length&&i.push(euD(t.text.slice(l,r[o+1]?r[o+1].start-u:void 0)))}return i},euV=(e,t)=>euz(euP(e).children,t),euz=(e,t)=>{let n=[];for(let r=0;r<e.length;r++){let i=e[r],o=t(i.type,i.node,i.text,euz(i.children,t),i.key);null!=o&&n.push(o)}return n},euY=ery.create({name:"text",group:"inline"});function euH(e){return e.sort((e,t)=>e.start-t.start)}let euZ={fromPrismic:e=>t=>{switch(t.type){case"hyperlink":return esL.converter.fromPrismic(e)(t);case"em":return esF.converter.fromPrismic(e)(t);case"strong":return eo0.converter.fromPrismic(e)(t);case"label":return esU.converter.fromPrismic(e)(t);case"list-item":return}},toPrismic(e,t,n){let r=esY.find(t=>e.type.name===t.name);if(!r)throw Error(`Invalid mark extension '${e.type.name}'.`);switch(r.richTextNodeTypes){case"hyperlink":return{type:"hyperlink",start:t,end:n,data:esL.converter.toPrismic(e)};case"strong":return{type:"strong",start:t,end:n};case"em":return{type:"em",start:t,end:n};case"paragraph":return{type:"label",start:t,end:n,data:esU.converter.toPrismic(e)}}}},euJ=euY.extend({name:"text"}),euG={name:euJ.name,component:euJ,converter:{fromPrismic:e=>function(t,n,r=!1){let i={type:t,text:n.content.text,spans:n.content.spans||[]};return euV([i],function(e,t=!1){return(n,r,i,o)=>{var a,u;if("span"===n&&i&&i.length)return t?[e.text(i)]:eau.splitTextToNodes(e,i)(t=>e.text(t));let s=euZ.fromPrismic(e)(r);return s?(a=s,u=o,u.flat().map(e=>{let t=[...e.marks,a].sort((e,t)=>e.type.name.localeCompare(t.type.name));return e.mark(t)})):o.flat()}}(e,r)).flatMap(e=>e)},toPrismic(e,t,n){let r=eoG.children.reduce(e,(e,t)=>{let n=t.type.name===eau.name?eau.converter.toPrismic(t):t.textContent,r=n?e.text+n:e.text,i=e.text.length,o=r.length,a=t.marks.length?eoG.marks.map(t,e=>euZ.toPrismic(e,i,o)):void 0;return{...e,text:r,spans:a?[...e.spans,...a]:e.spans}},{text:"",spans:[]});return{type:t,content:{text:r.text,spans:[...function(e){var t;let n=e.reduce((e,t)=>{let n=(e[t.type]||[]).concat(t);return{...e,[t.type]:n}},{}),r=Object.entries(n).map(([e,t])=>euH(t).reduce((e,t)=>{if(!e.length)return[t];let n=e.length-1,r=e[n];return r?r.end<t.start?[...e,t]:r.end>=t.end?e:[...e.slice(0,n),{...r,end:t.end}]:e},[])).flat();return euH(r)}(r.spans)].sort((e,t)=>e.type.localeCompare(t.type))},...n}}}},eu$=ND.RichTextNodeType.rtl,euX=et5.create({name:"textDirection",addOptions:()=>({supportedExtensionNames:[]}),addGlobalAttributes(){return[{types:this.options.supportedExtensionNames,attributes:{dir:{default:"ltr",parseHTML:e=>e.getAttribute("dir"),renderHTML:e=>({dir:eu1(e.dir)})}}}]},addCommands(){return{setDirection:e=>({commands:t})=>{switch(e){case"ltr":return t.setLeftToRight();case"rtl":return t.setRightToLeft()}},toggleDirection:e=>({commands:t})=>t.setDirection("rtl"===e?"ltr":"rtl"),setRightToLeft:()=>({commands:e})=>this.options.supportedExtensionNames.every(t=>e.updateAttributes(t,{dir:"rtl"})),setLeftToRight:()=>({commands:e})=>this.options.supportedExtensionNames.every(t=>e.resetAttributes(t,"dir"))}},addKeyboardShortcuts(){return{"Mod-Shift-r":()=>this.editor.commands.setRightToLeft(),"Mod-Shift-l":()=>this.editor.commands.setLeftToRight()}}}),eu0={parseNodeAttrsDirection:e=>eu1(e.dir),fromPrismic:e=>({dir:eu1(e.direction)}),toPrismic(e){return{direction:this.parseNodeAttrsDirection(e.attrs)}}};function eu1(e){return"rtl"===e?"rtl":"ltr"}let eu2=euK.extend({name:"paragraph",parseHTML:()=>[{tag:"p"}],renderHTML({HTMLAttributes:e}){return["p",etP(this.options.HTMLAttributes,e),0]}}),eu6=new eoV([ND.RichTextNodeType.paragraph],eu2.name,eu2,{fromPrismic:e=>function(t){var n;let r=euG.converter.fromPrismic(e)(eu2.name,t);return null==(n=e.nodes[eu2.name])?void 0:n.create(eu0.fromPrismic(t),r)},toPrismic:e=>euG.converter.toPrismic(e,ND.RichTextNodeType.paragraph,eu0.toPrismic(e))},"Type '/' for commands"),eu5=eu6,eu3=["ArrowDown","ArrowUp","End","Home"],eu9=["Enter"],eu4=["Escape",...eu3,...eu9],eu7=et5.create({name:"slash-commands",addOptions:()=>({nodeTypes:[]}),addProseMirrorPlugins(){let e=es0(esZ,this.options.nodeTypes);return e.length>1?[function({pluginKey:e=euU,editor:t,char:n="@",allowSpaces:r=!1,allowedPrefixes:i=[" "],startOfLine:o=!1,decorationTag:a="span",decorationClass:u="suggestion",command:s=()=>null,items:l=()=>[],render:c=()=>({}),allow:d=()=>!0,findSuggestionMatch:f=euj}){let p,A=null==c?void 0:c(),h=new Xn({key:e,view(){return{update:async(e,n)=>{var r,i,o,a,u,c,d;let f=null===(r=this.key)||void 0===r?void 0:r.getState(n),h=null===(i=this.key)||void 0===i?void 0:i.getState(e.state),m=f.active&&h.active&&f.range.from!==h.range.from,g=!f.active&&h.active,y=f.active&&!h.active,v=!g&&!y&&f.query!==h.query,x=g||m,b=v&&!m,C=y||m;if(!x&&!b&&!C)return;let S=C&&!x?f:h,w=e.dom.querySelector(`[data-decoration-id="${S.decorationId}"]`);p={editor:t,range:S.range,query:S.query,text:S.text,items:[],command:e=>s({editor:t,range:S.range,props:e}),decorationNode:w,clientRect:w?()=>{var n;let{decorationId:r}=null===(n=this.key)||void 0===n?void 0:n.getState(t.state),i=e.dom.querySelector(`[data-decoration-id="${r}"]`);return(null==i?void 0:i.getBoundingClientRect())||null}:null},x&&(null===(o=null==A?void 0:A.onBeforeStart)||void 0===o||o.call(A,p)),b&&(null===(a=null==A?void 0:A.onBeforeUpdate)||void 0===a||a.call(A,p)),(b||x)&&(p.items=await l({editor:t,query:S.query})),C&&(null===(u=null==A?void 0:A.onExit)||void 0===u||u.call(A,p)),b&&(null===(c=null==A?void 0:A.onUpdate)||void 0===c||c.call(A,p)),x&&(null===(d=null==A?void 0:A.onStart)||void 0===d||d.call(A,p))},destroy(){var e;p&&(null===(e=null==A?void 0:A.onExit)||void 0===e||e.call(A,p))}}},state:{init:()=>({active:!1,range:{from:0,to:0},query:null,text:null,composing:!1}),apply(e,a,u,s){let{isEditable:l}=t,{composing:c}=t.view,{selection:p}=e,{empty:A,from:h}=p,m={...a};if(m.composing=c,l&&(A||t.view.composing)){(h<a.range.from||h>a.range.to)&&!c&&!a.composing&&(m.active=!1);let g=f({char:n,allowSpaces:r,allowedPrefixes:i,startOfLine:o,$position:p.$from}),y=`id_${Math.floor(4294967295*Math.random())}`;g&&d({editor:t,state:s,range:g.range})?(m.active=!0,m.decorationId=a.decorationId?a.decorationId:y,m.range=g.range,m.query=g.query,m.text=g.text):m.active=!1}else m.active=!1;return m.active||(m.decorationId=null,m.range={from:0,to:0},m.query=null,m.text=null),m}},props:{handleKeyDown(e,t){var n;let{active:r,range:i}=h.getState(e.state);return r&&(null===(n=null==A?void 0:A.onKeyDown)||void 0===n?void 0:n.call(A,{view:e,event:t,range:i}))||!1},decorations(e){let{active:t,range:n,decorationId:r}=h.getState(e);return t?eeT.create(e.doc,[eew.inline(n.from,n.to,{nodeName:a,class:u,"data-decoration-id":r})]):null}}});return h}({allowSpaces:!0,char:"/",editor:this.editor,startOfLine:!0,allow({state:e}){let t=e.selection.$from;return t.parent.type.name===eu5.name&&1===t.depth},command({editor:e,props:t,range:n}){t.runCommands(e,{deleteRange:n})},items({query:t}){let n=t.toLocaleLowerCase().trim();return e.filter(e=>{var t,r;return(null==(t=e.shortText)?void 0:t.toLocaleLowerCase().includes(n))||(null==(r=e.text)?void 0:r.toLocaleLowerCase().includes(n))})},render(){let e;return{onStart(t){e=new eoF(eu8,{editor:t.editor,props:t}),document.body.appendChild(e.element)},onUpdate(t){null==e||e.updateProps(t)},onKeyDown({event:t}){var n;return!!(eu4.includes(t.key)&&null!=(n=null==e?void 0:e.ref)&&n.handleKeyDown(t))},onExit(){null==e||e.destroy(),null==e||e.element.remove()}}}})]:[]}}),eu8=(0,c.forwardRef)(function(e,t){var n,r,i,o,a;let{command:u,decorationNode:s,editor:l,items:d}=e,[A,h]=(0,c.useState)(!0),{context:m,floating:g,reference:y,x:v,y:x}=function(e){let{open:t=!1,onOpenChange:n,whileElementsMounted:r,placement:i,middleware:o,strategy:a,nodeId:u}=void 0===e?{}:e,[s,l]=c.useState(null),d=euu(),f=c.useRef(null),p=c.useRef({}),A=c.useState(()=>(function(){let e=new Map;return{emit(t,n){var r;null==(r=e.get(t))||r.forEach(e=>e(n))},on(t,n){e.set(t,[...e.get(t)||[],n])},off(t,n){e.set(t,(e.get(t)||[]).filter(e=>e!==n))}}})())[0],h=function(e){void 0===e&&(e={});let{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:i,whileElementsMounted:o,open:a}=e,[u,s]=c.useState({x:null,y:null,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[l,d]=c.useState(r);ea9(l,r)||d(r);let f=c.useRef(null),p=c.useRef(null),A=c.useRef(u),h=ea4(o),m=ea4(i),[g,y]=c.useState(null),[v,x]=c.useState(null),b=c.useCallback(e=>{f.current!==e&&(f.current=e,y(e))},[]),C=c.useCallback(e=>{p.current!==e&&(p.current=e,x(e))},[]),w=c.useCallback(()=>{if(!f.current||!p.current)return;let e={placement:t,strategy:n,middleware:l};m.current&&(e.platform=m.current),ea5(f.current,p.current,e).then(e=>{let t={...e,isPositioned:!0};I.current&&!ea9(A.current,t)&&(A.current=t,S.flushSync(()=>{s(t)}))})},[l,t,n,m]);ea3(()=>{!1===a&&A.current.isPositioned&&(A.current.isPositioned=!1,s(e=>({...e,isPositioned:!1})))},[a]);let I=c.useRef(!1);ea3(()=>(I.current=!0,()=>{I.current=!1}),[]),ea3(()=>{if(g&&v){if(h.current)return h.current(g,v,w);w()}},[g,v,w,h]);let _=c.useMemo(()=>({reference:f,floating:p,setReference:b,setFloating:C}),[b,C]),T=c.useMemo(()=>({reference:g,floating:v}),[g,v]);return c.useMemo(()=>({...u,update:w,refs:_,elements:T,reference:b,floating:C}),[u,w,_,T,b,C])}({placement:i,middleware:o,strategy:a,whileElementsMounted:r}),m=euf(n),g=c.useMemo(()=>({...h.refs,domReference:f}),[h.refs]),y=c.useMemo(()=>({...h,refs:g,dataRef:p,nodeId:u,events:A,open:t,onOpenChange:m,_:{domReference:s}}),[h,u,A,t,m,g,s]);ea7(()=>{let e=null==d?void 0:d.nodesRef.current.find(e=>e.id===u);e&&(e.context=y)});let{reference:v}=h,x=c.useCallback(e=>{(euc(e)||null===e)&&(y.refs.domReference.current=e,l(e)),v(e)},[v,y.refs]);return c.useMemo(()=>({...h,context:y,refs:g,reference:x}),[h,g,y,x])}({middleware:[(n=0,{name:"offset",options:n,async fn(e){let{x:t,y:r}=e,i=await async function(e,t){let{placement:n,platform:r,elements:i}=e,o=await (null==r.isRTL?void 0:r.isRTL(i.floating)),a=eaf(n),u=eac(n),s="x"===eap(n),l=["left","top"].includes(a)?-1:1,c=o&&s?-1:1,d="function"==typeof t?t(e):t,{mainAxis:f,crossAxis:p,alignmentAxis:A}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...d};return u&&"number"==typeof A&&(p="end"===u?-1*A:A),s?{x:p*c,y:f*l}:{x:f*l,y:p*c}}(e,n);return{x:t+i.x,y:r+i.y,data:i}}}),(void 0===r&&(r={}),{name:"flip",options:r,async fn(e){var t,n,i,o;let{placement:a,middlewareData:u,rects:s,initialPlacement:l,platform:c,elements:d}=e,{mainAxis:f=!0,crossAxis:p=!0,fallbackPlacements:A,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:g=!0,...y}=r,v=eaf(a),x=eaf(l)===l,b=await (null==c.isRTL?void 0:c.isRTL(d.floating)),C=A||(x||!g?[eaC(l)]:function(e){let t=eaC(e);return[eaw(e),t,eaw(t)]}(l));A||"none"===m||C.push(...function(e,t,n,r){let i=eac(e),o=function(e,t,n){let r=["left","right"],i=["right","left"];switch(e){case"top":case"bottom":return n?t?i:r:t?r:i;case"left":case"right":return t?["top","bottom"]:["bottom","top"];default:return[]}}(eaf(e),"start"===n,r);return i&&(o=o.map(e=>e+"-"+i),t&&(o=o.concat(o.map(eaw)))),o}(l,g,m,b));let S=await eag(e,y),w=[],I=(null==(t=u.flip)?void 0:t.overflows)||[];if(f&&w.push(S[v]),p){let{main:_,cross:T}=function(e,t,n){void 0===n&&(n=!1);let r=eac(e),i=eap(e),o=ead(i),a="x"===i?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[o]>t.floating[o]&&(a=eaC(a)),{main:a,cross:eaC(a)}}(a,s,b);w.push(S[_],S[T])}if(I=[...I,{placement:a,overflows:w}],!w.every(e=>e<=0)){let O=((null==(n=u.flip)?void 0:n.index)||0)+1,R=[l,...C][O];if(R)return{data:{index:O,overflows:I},reset:{placement:R}};let k=null==(i=I.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0])?void 0:i.placement;if(!k)switch(h){case"bestFit":{let E=null==(o=I.map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0])?void 0:o[0];E&&(k=E);break}case"initialPlacement":k=l}if(a!==k)return{reset:{placement:k}}}return{}}}),(o={limiter:(void 0===i&&(i={}),{options:i,fn(e){let{x:t,y:n,placement:r,rects:o,middlewareData:a}=e,{offset:u=0,mainAxis:s=!0,crossAxis:l=!0}=i,c={x:t,y:n},d=eap(r),f=eaI(d),p=c[d],A=c[f],h="function"==typeof u?u(e):u,m="number"==typeof h?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(s){let g="y"===d?"height":"width",y=o.reference[d]-o.floating[g]+m.mainAxis,v=o.reference[d]+o.reference[g]-m.mainAxis;p<y?p=y:p>v&&(p=v)}if(l){var x,b;let C="y"===d?"width":"height",S=["top","left"].includes(eaf(r)),w=o.reference[f]-o.floating[C]+(S&&(null==(x=a.offset)?void 0:x[f])||0)+(S?0:m.crossAxis),I=o.reference[f]+o.reference[C]+(S?0:(null==(b=a.offset)?void 0:b[f])||0)-(S?m.crossAxis:0);A<w?A=w:A>I&&(A=I)}return{[d]:p,[f]:A}}})},{name:"shift",options:o,async fn(e){let{x:t,y:n,placement:r}=e,{mainAxis:i=!0,crossAxis:a=!1,limiter:u={fn(e){let{x:t,y:n}=e;return{x:t,y:n}}},...s}=o,l={x:t,y:n},c=await eag(e,s),d=eap(eaf(r)),f=eaI(d),p=l[d],A=l[f];i&&(p=eax(p+c["y"===d?"top":"left"],p,p-c["y"===d?"bottom":"right"])),a&&(A=eax(A+c["y"===f?"top":"left"],A,A-c["y"===f?"bottom":"right"]));let h=u.fn({...e,[d]:p,[f]:A});return{...h,data:{x:h.x-t,y:h.y-n}}}})],onOpenChange:h,open:A,placement:"top-start",strategy:"fixed",whileElementsMounted:ea6});(0,c.useLayoutEffect)(()=>{y(s)},[y,s]),(0,c.useEffect)(()=>{let e,t=()=>{e=window.setTimeout(()=>{h(!0)})},n=()=>{h(!1)};return l.on("focus",t).on("blur",n),()=>{l.off("focus",t).off("blur",n),clearTimeout(e)}},[l]);let[b,C]=(0,c.useState)(0),w=(0,c.useRef)([]);(0,p.pQ)(d,()=>{C(0),w.current=[]});let{getFloatingProps:I,getItemProps:_,getReferenceProps:T}=(a=[eux(m,{outsidePointerDown:!1}),euF(m,{activeIndex:b,listRef:w,onNavigate(e){C(t=>e??t)},openOnArrowKeyDown:!1,virtual:!0}),euy(m,{role:"menu"})],{getReferenceProps:e=>eup(e,a,"reference"),getFloatingProps:e=>eup(e,a,"floating"),getItemProps:e=>eup(e,a,"item")}),O=T().onKeyDown;return(0,c.useImperativeHandle)(t,()=>({handleKeyDown(e){if(!A)return!1;if(eu3.includes(e.key)&&O(e),eu9.includes(e.key)){let t=d[b];void 0!==t&&u(t)}return!0}}),[b,u,d,O,A]),A?zM.jsx(f.xu,{...I(),minWidth:256,backgroundColor:"grey1",border:!0,borderStyle:"solid",borderRadius:6,flexDirection:"column",ref:g,top:0,left:0,position:"fixed",transform:null!==v&&null!==x?`translate3d(${Math.round(v)}px, ${Math.round(x)}px, 0)`:"translate3d(0, -200%, 0)",overflow:"hidden",children:zM.jsxs("div",{style:{boxShadow:"0px 2px 10px 0px hsla(0, 0%, 0%, 0.1)"},children:[d.map((e,t)=>{let n=_({onClick(){u(e)},onPointerDown(e){e.preventDefault()}});return(0,c.createElement)(ese,{...n,key:e.nodeType,ref(e){w.current[t]=e},active:t===b,isFirstItem:0===t,isLastItem:t===d.length-1,shortcut:`/${e.shortText??""}`},e.text)}),0===d.length&&zM.jsx(ese,{..._({onPointerDown(e){e.preventDefault()}}),disabled:!0,ref(e){w.current[0]=e},children:"No results"})]})}):null}),ese=(0,c.forwardRef)(function(e,t){let{children:n,disabled:r=!1,shortcut:i,active:o=!1,isFirstItem:a=!1,isLastItem:u=!1,...s}=e;return zM.jsx("div",{...s,role:"button",style:{cursor:r?"default":"pointer"},ref:t,children:zM.jsxs(f.xu,{alignItems:"center",height:32,flexDirection:"row",gap:8,padding:8,backgroundColor:o?"grey4":"inherit",justifyContent:"space-between",opacity:r?.5:1,children:[zM.jsx(f.xv,{color:"grey12",component:"span",children:n}),i&&zM.jsx(f.xv,{color:"inherit",component:"span",variant:"small",children:i})]})})}),est=eo5.extend({name:"bulletList",parseHTML:()=>[{tag:"ul"}],renderHTML({HTMLAttributes:e}){return["ul",etP(this.options.HTMLAttributes,e),0]}}).configure({itemTypeName:"listItem"}),esn=new eoH([ND.RichTextNodeType.list],est.name,est,{fromPrismic:e=>function(t){var n;let r=eo7.converter.fromPrismic(e)(t);if(r)return null==(n=e.nodes[est.name])?void 0:n.create(eu0.fromPrismic(t),r)},toPrismic:e=>eoG.children.map(e,e=>eo7.converter.toPrismic(e,ND.RichTextNodeType.list).filter(h.$)).flat()}),esr=esn,esi=/^```([a-z]+)?[\s\n]$/,eso=/^~~~([a-z]+)?[\s\n]$/,esa=ery.create({name:"codeBlock",addOptions:()=>({languageClassPrefix:"language-",exitOnTripleEnter:!0,exitOnArrowDown:!0,HTMLAttributes:{}}),content:"text*",marks:"",group:"block",code:!0,defining:!0,addAttributes(){return{language:{default:null,parseHTML:e=>{var t;let{languageClassPrefix:n}=this.options,r=[...(null===(t=e.firstElementChild)||void 0===t?void 0:t.classList)||[]].filter(e=>e.startsWith(n)).map(e=>e.replace(n,""))[0];return r||null},rendered:!1}}},parseHTML:()=>[{tag:"pre",preserveWhitespace:"full"}],renderHTML({node:e,HTMLAttributes:t}){return["pre",etP(this.options.HTMLAttributes,t),["code",{class:e.attrs.language?this.options.languageClassPrefix+e.attrs.language:null},0]]},addCommands(){return{setCodeBlock:e=>({commands:t})=>t.setNode(this.name,e),toggleCodeBlock:e=>({commands:t})=>t.toggleNode(this.name,"paragraph",e)}},addKeyboardShortcuts(){return{"Mod-Alt-c":()=>this.editor.commands.toggleCodeBlock(),Backspace:()=>{let{empty:e,$anchor:t}=this.editor.state.selection,n=1===t.pos;return!!e&&t.parent.type.name===this.name&&(!!n||!t.parent.textContent.length)&&this.editor.commands.clearNodes()},Enter:({editor:e})=>{if(!this.options.exitOnTripleEnter)return!1;let{state:t}=e,{selection:n}=t,{$from:r,empty:i}=n;if(!i||r.parent.type!==this.type)return!1;let o=r.parentOffset===r.parent.nodeSize-2,a=r.parent.textContent.endsWith(`
20
-
21
- `);return!!o&&!!a&&e.chain().command(({tr:e})=>(e.delete(r.pos-2,r.pos),!0)).exitCode().run()},ArrowDown:({editor:e})=>{if(!this.options.exitOnArrowDown)return!1;let{state:t}=e,{selection:n,doc:r}=t,{$from:i,empty:o}=n;if(!o||i.parent.type!==this.type||i.parentOffset!==i.parent.nodeSize-2)return!1;let a=i.after();return!(void 0===a||r.nodeAt(a))&&e.commands.exitCode()}}},addInputRules(){return[erh({find:esi,type:this.type,getAttributes:e=>({language:e[1]})}),erh({find:eso,type:this.type,getAttributes:e=>({language:e[1]})})]},addProseMirrorPlugins(){return[new Xn({key:new Xo("codeBlockVSCodeHandler"),props:{handlePaste:(e,t)=>{if(!t.clipboardData||this.editor.isActive(this.type.name))return!1;let n=t.clipboardData.getData("text/plain"),r=t.clipboardData.getData("vscode-editor-data"),i=r?JSON.parse(r):void 0,o=null==i?void 0:i.mode;if(!n||!o)return!1;let{tr:a}=e.state;return a.replaceSelectionWith(this.type.create({language:o})),a.setSelection($2.near(a.doc.resolve(Math.max(0,a.selection.from-2)))),a.insertText(n.replace(/\r\n?/g,`
22
- `)),a.setMeta("paste",!0),e.dispatch(a),!0}}})]}}),esu=esa.extend({name:"preformatted",addAttributes(){return{language:{default:null,parseHTML:e=>{var t;let{languageClassPrefix:n}=this.options,r=[...(null==(t=e.firstElementChild)?void 0:t.classList)||[]].filter(e=>e.startsWith(n)).map(e=>e.replace(n,""))[0];return r||null},renderHTML:e=>e.language?{class:this.options.languageClassPrefix+e.language}:null}}},parseHTML:()=>[{tag:"pre",preserveWhitespace:"full"}],renderHTML({HTMLAttributes:e}){return["pre",etP(this.options.HTMLAttributes),["code",e,0]]}}).configure({exitOnTripleEnter:!1}),ess=new eoV([ND.RichTextNodeType.preformatted],esu.name,esu,{fromPrismic:e=>function(t){var n;let r=euG.converter.fromPrismic(e)(esu.name,t,!0);return null==(n=e.nodes[esu.name])?void 0:n.create(eu0.fromPrismic(t),r)},toPrismic:e=>euG.converter.toPrismic(e,ND.RichTextNodeType.preformatted,eu0.toPrismic(e))},"",!0);function esl(e){let{editor:t,getPos:n,node:r}=e,[i,o]=(0,c.useState)(!1);return(0,c.useEffect)(()=>{function e(){let{from:e,to:i}=t.state.selection,a=n(),u=n()+r.nodeSize;o(e<=a&&i>=u)}function i(){o(!1)}return t.on("blur",i),t.on("selectionUpdate",e),()=>{t.off("blur",i),t.off("selectionUpdate",e)}},[t,n,r.nodeSize]),{selected:i}}function esc(e){let t=(0,c.useRef)(null),n=(0,c.useRef)(null),{onKeyDown:r,url:i,urlChanged:o,onContentChange:a,debouncedUrl:u,content:s}=function(e,t,n){let{node:r}=e,i=r.attrs.content,o=(0,p.R9)(e.updateAttributes),a=(0,p.$P)({initialState:(null==i?void 0:i.embed_url)??"",startTransition:c.startTransition});function u(e){o({content:e})}let{onKeyDown:s}=function(e,t,n,r){let{editor:i,getPos:o,node:a}=e,[u,s]=(0,c.useState)(!0);return(0,c.useEffect)(()=>{u&&e.editor.isFocused&&(0,f.rI)(()=>{var e;return null==(e=n.current)?void 0:e.focus()})},[n,u,e.editor.isFocused]),{containerRef:r,inputRef:n,onKeyDown:function(e){let n=o(),r=o()+a.nodeSize;"Enter"===e.code&&(s(!1),i.chain().insertContentAt(r,{type:"paragraph"}).focus(r+1).run()),"Backspace"===e.code&&""===t&&i.chain().deleteRange({from:n,to:r}).focus(r+1).run(),"ArrowUp"===e.code&&(s(!1),i.chain().focus(n-1).run()),"ArrowDown"===e.code&&(s(!1),i.chain().focus(r+1).run())}}}(e,a.value,t,n);return{inputRef:t,containerRef:n,onKeyDown:s,url:a.value,urlChanged:function(e){a.set(e),(0,l.ju)(e)||u(void 0)},onContentChange:u,debouncedUrl:a.debouncedValue,content:e.node.attrs.content}}(e,t,n),{selected:d}=esl(e);return zM.jsx(eoM,{className:"custom-embed",children:zM.jsxs("div",{contentEditable:"false",suppressContentEditableWarning:!0,children:[zM.jsxs(f.xu,{flexGrow:1,alignItems:"center",children:[zM.jsx(f.I5,{size:"small",name:"cloud",color:"grey11"}),zM.jsx(f.xu,{flexGrow:1,height:40,ref:n,children:zM.jsx(Ju,{id:"id",ref:t,value:i,variant:(0,l.ju)(i)?"link":"normal",placeholder:"Paste your link here",onValueChange:o,onKeyDown:r})})]}),(0,l.ju)(i)&&zM.jsx(Jd,{selected:d,debouncedUrl:u,onContentChange:a,content:s})]})})}let esd=ery.create({name:"embed",group:"block",atom:!0,content:"block*",marks:"",addAttributes:()=>({content:{default:void 0}}),addCommands(){return{setEmbed:()=>({tr:e,dispatch:t})=>{let n=this.type.create();return t&&e.replaceSelectionWith(n),!0}}},parseHTML:()=>[{tag:"embed"}],renderHTML:()=>["embed"],addNodeView:()=>eoU(esc)}),esf=new class{constructor(e,t,n,r){T(this,"extType","node"),T(this,"nodeType","embed"),this.richTextNodeTypes=e,this.name=t,this.component=n,this.converter=r}}([ND.RichTextNodeType.embed],esd.name,esd,{fromPrismic:e=>function(t){var n;return null==(n=e.nodes[esd.name])?void 0:n.create({content:t.data})},toPrismic:e=>void 0===e.attrs.content?{type:"embed",data:{type:"embed",embed_url:"",__TYPE__:"EmbedContent",all:[]}}:{type:"embed",data:{...e.attrs.content}}}),esp=ery.create({name:"heading",addOptions:()=>({levels:[1,2,3,4,5,6],HTMLAttributes:{}}),content:"inline*",group:"block",defining:!0,addAttributes:()=>({level:{default:1,rendered:!1}}),parseHTML(){return this.options.levels.map(e=>({tag:`h${e}`,attrs:{level:e}}))},renderHTML({node:e,HTMLAttributes:t}){return[`h${this.options.levels.includes(e.attrs.level)?e.attrs.level:this.options.levels[0]}`,etP(this.options.HTMLAttributes,t),0]},addCommands(){return{setHeading:e=>({commands:t})=>!!this.options.levels.includes(e.level)&&t.setNode(this.name,e),toggleHeading:e=>({commands:t})=>!!this.options.levels.includes(e.level)&&t.toggleNode(this.name,"paragraph",e)}},addKeyboardShortcuts(){return this.options.levels.reduce((e,t)=>({...e,[`Mod-Alt-${t}`]:()=>this.editor.commands.toggleHeading({level:t})}),{})},addInputRules(){return this.options.levels.map(e=>erh({find:RegExp(`^(#{1,${e}})\\s$`),type:this.type,getAttributes:{level:e}}))}}),esA="heading";function esh(e){switch(e){case 1:return ND.RichTextNodeType.heading1;case 2:return ND.RichTextNodeType.heading2;case 3:return ND.RichTextNodeType.heading3;case 4:return ND.RichTextNodeType.heading4;case 5:return ND.RichTextNodeType.heading5;case 6:return ND.RichTextNodeType.heading6}}function esm(e){return{fullName:esh(e),level:e}}let esg=[1,2,3,4,5,6];function esy(e,t=esg){let n=RegExp(`^heading([${t.join(",")}]){1}$`),r=e.match(n);if(!r||!r[1])return;let i=parseInt(r[1]);return{fullName:esh(i),level:i}}function esv(e,t){let n=e.level;if(t.includes(n))return{fullName:esh(n),level:n}}let esx=e=>{let t=e[0]??1;return{fromPrismic:n=>function(r){var i;let o=euG.converter.fromPrismic(n)(esA,r),a=esy(r.type,e)||esm(t);return null==(i=n.nodes[esA])?void 0:i.create({level:a.level,...eu0.fromPrismic(r)},o)},toPrismic(n){let{fullName:r}=esv(n.attrs,e)||esm(t);return euG.converter.toPrismic(n,r,eu0.toPrismic(n))}}},esb={name:esA,build(e){var t,n;let r=e?e.size?Array.from(e.values()).reduce((e,t)=>{let n=esy(t);return n?[...e,n.level]:e},[]).sort((e,t)=>e-t):[]:esg;if(!r)return;let i=r.map(e=>esh(e));return new eoY(i,esp.extend({name:"heading"}).configure({levels:r}),r,esx(r),e=>{let t=esv(e,r);return t&&`Heading ${t.level}`})}};function esC(e){let{node:t}=e,n=t.attrs.content,{selected:r}=esl(e),i={width:void 0,height:void 0,name:ZW},{onMediaSelected:o,onCropperDialogClose:a,isUpdating:u,updateContent:s,onClear:l}=function(e){let{content:t,thumbnail:n,imageViewProps:{getPos:r,updateAttributes:i,editor:o,node:a}}=e,[u,s]=(0,c.useTransition)();function l(e){s(()=>i({content:e}))}return{onMediaSelected:function(e){let n=ZQ(e),i=r()+a.nodeSize;l({__TYPE__:"ImageContent",...t,...n}),o.chain().focus(i+1).run()},onCropperDialogClose:function({croppedImages:e}){if(!t)return;let r=e[n.name];if(!r)return;let i=JF({content:t,thumbnail:n.name,croppedImage:r});i!==t&&l(i)},isUpdating:u,updateContent:l,onClear:function(){let e=r(),t=r()+a.nodeSize;o.chain().deleteRange({from:e,to:t}).focus(t).run()}}}({content:n,thumbnail:i,imageViewProps:e}),d=(null==n?void 0:n.width)===0&&(null==n?void 0:n.height)===0,p=n&&!d?[`${n.width}x${n.height}px`]:[],A=(null==n?void 0:n.alt)??"",h={thumbnail:i,contentView:n,labels:ZD(i,n,n)};return zM.jsx(eoM,{className:"custom-image",children:zM.jsx("div",{contentEditable:"false",suppressContentEditableWarning:!0,children:zM.jsx(JL,{content:n,selected:r,fieldLabel:"Feature image",imageLabel:p,initialImages:[h],readOnly:!1,onMediaSelected:o,onCropperDialogClose:a,onClear:l,children:zM.jsx(c.Suspense,{fallback:esS,children:null!=n&&n.url?zM.jsxs(f.aY,{children:[zM.jsx(f.hM,{children:zM.jsx(f.xu,{flexDirection:"column",alignItems:"center",position:"relative",height:400,children:zM.jsx(f.xu,{justifyContent:"center",flexGrow:1,maxHeight:"100%",maxWidth:"100%",children:zM.jsx(f.kg,{src:ZN(n.url),alt:A,sizing:"contain"})})})}),zM.jsx(JE,{onValueChange(e){s({...n,alt:e})},altText:A,readOnly:!n,selected:r})]}):zM.jsx(Jk,{isUpdating:u,readOnly:!1,onMediaSelected:o})})})})})}let esS=zM.jsx("div",{style:{height:468}}),esw=ery.create({name:"image",group:"block",atom:!0,addAttributes:()=>({content:{default:void 0}}),addCommands(){return{setImage:()=>e=>{let{dispatch:t,tr:n}=e,r=this.type.create();return t&&n.replaceSelectionWith(r),!0}}},parseHTML:()=>[{tag:"image"}],renderHTML:({HTMLAttributes:e})=>["image",etP(e)],addNodeView:()=>eoU(esC)}),esI=new class{constructor(e,t,n,r){T(this,"extType","node"),T(this,"nodeType","image"),this.richTextNodeTypes=e,this.name=t,this.component=n,this.converter=r}}([ND.RichTextNodeType.image],esw.name,esw,{fromPrismic:e=>function(t){var n;return null==(n=e.nodes[esw.name])?void 0:n.create({content:t.data})},toPrismic(e){if(void 0!==e.attrs.content)return{type:"image",data:{...e.attrs.content}}}}),es_=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))$/,esT=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))/g,esO=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))$/,esR=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))/g,esk=erg.create({name:"italic",addOptions:()=>({HTMLAttributes:{}}),parseHTML:()=>[{tag:"em"},{tag:"i",getAttrs:e=>"normal"!==e.style.fontStyle&&null},{style:"font-style=italic"}],renderHTML({HTMLAttributes:e}){return["em",etP(this.options.HTMLAttributes,e),0]},addCommands(){return{setItalic:()=>({commands:e})=>e.setMark(this.name),toggleItalic:()=>({commands:e})=>e.toggleMark(this.name),unsetItalic:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-i":()=>this.editor.commands.toggleItalic(),"Mod-I":()=>this.editor.commands.toggleItalic()}},addInputRules(){return[erA({find:es_,type:this.type}),erA({find:esO,type:this.type})]},addPasteRules(){return[erx({find:esT,type:this.type}),erx({find:esR,type:this.type})]}}),esE=esk.extend({name:"em"}),esM=new class{constructor(e,t,n){T(this,"extType",eoq.Mark),T(this,"richTextNodeTypes",ND.RichTextNodeType.em),this.name=e,this.component=t,this.converter=n}}(esE.name,esE,{fromPrismic:e=>function(){var t;return null==(t=e.marks[esE.name])?void 0:t.create()},toPrismic(){}}),esF=esM,esj=erg.create({name:"label",priority:1e3,keepOnSplit:!1,inclusive:!1,addOptions:()=>({htmlAttributes:{style:"background-color: hsl(251, 89%, 96%); border: 1px dashed rgba(68, 53, 146, 0.4); border-radius: 0px 2px 2px 2px"}}),addAttributes:()=>({label:{default:""}}),addCommands(){return{setLabel:e=>({chain:t})=>t().unsetMark(this.name,{extendEmptyMarkRange:!0}).setMark(this.name,e).run(),unsetLabel:()=>({chain:e})=>e().unsetMark(this.name,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()}},renderHTML({HTMLAttributes:e}){return["span",etP(this.options.htmlAttributes,e),0]}}),esU=new class{constructor(e,t,n){T(this,"extType",eoq.Mark),T(this,"richTextNodeTypes",ND.RichTextNodeType.paragraph),this.name=e,this.component=t,this.converter=n}}(esj.name,esj,{fromPrismic:e=>function(t){var n;let r=t.data,i={type:esj.name,label:r};return null==(n=e.marks[esj.name])?void 0:n.create(i)},toPrismic:e=>e.attrs.label}),esK=erg.create({name:"hyperlink",priority:1e3,keepOnSplit:!1,inclusive:!1,addOptions:()=>({openOnClick:!1,linkOnPaste:!0,autolink:!0,protocols:[],htmlAttributes:{target:"_blank",rel:"noopener noreferrer nofollow",class:null,id:""},validate:void 0}),addAttributes:()=>({href:{default:""},id:{default:""},target:{default:"_blank"},rel:{default:"noopener noreferrer nofollow"},class:{default:null},media:{default:null}}),parseHTML:()=>[{tag:'a[href]:not([href *= "javascript:" i])'}],renderHTML({HTMLAttributes:e}){return["a",etP(this.options.htmlAttributes,e),0]},addCommands(){return{setWebLink:e=>({chain:t})=>t().unsetMark(this.name,{extendEmptyMarkRange:!0}).setMark(this.name,e).setMeta("preventAutolink",!0).run(),setDocumentLink:e=>({chain:t})=>t().unsetMark(this.name,{extendEmptyMarkRange:!0}).setMark(this.name,e).setMeta("preventAutolink",!0).run(),setMediaLink:e=>({chain:t})=>{let n=esB(GC({media:e.media}).value);return t().unsetMark(this.name,{extendEmptyMarkRange:!0}).setMark(this.name,{media:n}).setMeta("preventAutolink",!0).run()},unsetLink:()=>({chain:e})=>e().unsetMark(this.name,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()}}}),esL=new class{constructor(e,t,n){T(this,"extType",eoq.Mark),T(this,"richTextNodeTypes",ND.RichTextNodeType.hyperlink),this.name=e,this.component=t,this.converter=n}}(esK.name,esK,{fromPrismic:e=>function(t){var n,r,i,o;let a=t.data;if("DocumentLink"===a.__TYPE__){let u={type:esK.name,id:a.id};return null==(n=e.marks[esK.name])?void 0:n.create(u)}if("ImageLink"===a.__TYPE__){let s={type:esK.name,media:esB(a)};return null==(r=e.marks[esK.name])?void 0:r.create(s)}if("FileLink"===a.__TYPE__){let l={type:esK.name,media:esB(a)};return null==(i=e.marks[esK.name])?void 0:i.create(l)}if("ExternalLink"===a.__TYPE__){let c={type:esK.name,url:a.url,href:a.url,target:a.target};return null==(o=e.marks[esK.name])?void 0:o.create(c)}},toPrismic:e=>e.attrs.media?esP(e.attrs.media):e.attrs.id?{__TYPE__:"DocumentLink",id:e.attrs.id}:{__TYPE__:"ExternalLink",url:e.attrs.href,target:e.attrs.target}});function esB(e){return JSON.stringify(e)}function esP(e){return JSON.parse(e)}let esW=ery.create({name:"listItem",addOptions:()=>({HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}),content:"paragraph block*",defining:!0,parseHTML:()=>[{tag:"li"}],renderHTML({HTMLAttributes:e}){return["li",etP(this.options.HTMLAttributes,e),0]},addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}}),esD=erg.create({name:"textStyle",addOptions:()=>({HTMLAttributes:{}}),parseHTML:()=>[{tag:"span",getAttrs:e=>!!e.hasAttribute("style")&&{}}],renderHTML({HTMLAttributes:e}){return["span",etP(this.options.HTMLAttributes,e),0]},addCommands(){return{removeEmptyTextStyle:()=>({state:e,commands:t})=>{let n=enG(e,this.type);return!!Object.entries(n).some(([,e])=>!!e)||t.unsetMark(this.name)}}}}),esN=/^(\d+)\.\s$/,esq=ery.create({name:"orderedList",addOptions:()=>({itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}),group:"block list",content(){return`${this.options.itemTypeName}+`},addAttributes:()=>({start:{default:1,parseHTML:e=>e.hasAttribute("start")?parseInt(e.getAttribute("start")||"",10):1}}),parseHTML:()=>[{tag:"ol"}],renderHTML({HTMLAttributes:e}){let{start:t,...n}=e;return 1===t?["ol",etP(this.options.HTMLAttributes,n),0]:["ol",etP(this.options.HTMLAttributes,e),0]},addCommands(){return{toggleOrderedList:()=>({commands:e,chain:t})=>this.options.keepAttributes?t().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(esW.name,this.editor.getAttributes(esD.name)).run():e.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-7":()=>this.editor.commands.toggleOrderedList()}},addInputRules(){let e=erm({find:esN,type:this.type,getAttributes:e=>({start:+e[1]}),joinPredicate:(e,t)=>t.childCount+t.attrs.start===+e[1]});return(this.options.keepMarks||this.options.keepAttributes)&&(e=erm({find:esN,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:e=>({start:+e[1],...this.editor.getAttributes(esD.name)}),joinPredicate:(e,t)=>t.childCount+t.attrs.start===+e[1],editor:this.editor})),[e]}}),esQ=esq.extend({name:"orderedList",addAttributes:()=>({start:{default:1,parseHTML:e=>e.hasAttribute("start")?parseInt(e.getAttribute("start")||"",10):1}}),renderHTML({HTMLAttributes:e}){let{start:t,...n}=e;return 1===t?["ol",etP(this.options.HTMLAttributes,n),0]:["ol",etP(this.options.HTMLAttributes,e),0]},addCommands(){return{toggleOrderedList:()=>({commands:e})=>e.toggleList(this.name,this.options.itemTypeName)}},addKeyboardShortcuts(){return{"Mod-Shift-7":()=>this.editor.commands.toggleOrderedList()}}}).configure({itemTypeName:"listItem"}),esV=new eoH([ND.RichTextNodeType.orderedList],esQ.name,esQ,{fromPrismic:e=>function(t){var n;let r=eo7.converter.fromPrismic(e)(t);if(r)return null==(n=e.nodes[esQ.name])?void 0:n.create(eu0.fromPrismic(t),r)},toPrismic:e=>eoG.children.map(e,e=>eo7.converter.toPrismic(e,ND.RichTextNodeType.orderedList).filter(h.$)).flat()}),esz=esV,esY=[eo0,esF,esL,esU];function esH(e){return[eu5,esr,esz,esb.build(e),ess,esf,esI,...esY].filter(h.$)}let esZ=[{nodeType:ND.RichTextNodeType.paragraph,icon:"textFields",isActive:e=>e.isActive(eu5.name)&&!e.isActive(esr.name)&&!e.isActive(esz.name),runCommands:es$((e,t)=>e.clearNodes().setDirection(esX(t))),shortText:"par",text:"Paragraph"},{nodeType:ND.RichTextNodeType.heading1,icon:"looks1",isActive:e=>e.isActive(esb.name,{level:1}),runCommands:es$((e,t)=>e.setHeading({level:1}).setDirection(esX(t))),shortText:"h1",text:"Heading 1"},{nodeType:ND.RichTextNodeType.heading2,icon:"looks2",isActive:e=>e.isActive(esb.name,{level:2}),runCommands:es$((e,t)=>e.setHeading({level:2}).setDirection(esX(t))),shortText:"h2",text:"Heading 2"},{nodeType:ND.RichTextNodeType.heading3,icon:"looks3",isActive:e=>e.isActive(esb.name,{level:3}),runCommands:es$((e,t)=>e.setHeading({level:3}).setDirection(esX(t))),shortText:"h3",text:"Heading 3"},{nodeType:ND.RichTextNodeType.heading4,icon:"looks4",isActive:e=>e.isActive(esb.name,{level:4}),runCommands:es$((e,t)=>e.setHeading({level:4}).setDirection(esX(t))),shortText:"h4",text:"Heading 4"},{nodeType:ND.RichTextNodeType.heading5,icon:"looks5",isActive:e=>e.isActive(esb.name,{level:5}),runCommands:es$((e,t)=>e.setHeading({level:5}).setDirection(esX(t))),shortText:"h5",text:"Heading 5"},{nodeType:ND.RichTextNodeType.heading6,icon:"looks6",isActive:e=>e.isActive(esb.name,{level:6}),runCommands:es$((e,t)=>e.setHeading({level:6}).setDirection(esX(t))),shortText:"h6",text:"Heading 6"},{nodeType:ND.RichTextNodeType.list,icon:"formatListBulleted",isActive:e=>e.isActive(esr.name),runCommands:es$((e,t)=>e.toggleBulletList().setDirection(esX(t))),shortText:"bull",text:"Bulleted list"},{nodeType:ND.RichTextNodeType.orderedList,icon:"formatListNumbered",isActive:e=>e.isActive(esz.name),runCommands:es$((e,t)=>e.toggleOrderedList().setDirection(esX(t))),shortText:"num",text:"Numbered list"},{nodeType:ND.RichTextNodeType.preformatted,icon:"dataObject",isActive:e=>e.isActive(ess.name),runCommands:es$((e,t)=>e.setCodeBlock().setDirection(esX(t))),shortText:"code",text:"Code"},{nodeType:ND.RichTextNodeType.embed,icon:"cloud",isActive:e=>e.isActive(esf.name),runCommands:es$(e=>e.setEmbed()),shortText:"emb",text:"Embed"},{nodeType:ND.RichTextNodeType.image,icon:"image",isActive:e=>e.isActive(esI.name),runCommands:es$(e=>e.setImage()),shortText:"img",text:"Image"}],esJ=[{nodeType:ND.RichTextNodeType.strong,icon:"formatBold",isActive:e=>e.isActive(eo0.name),runCommands:es$(e=>e.toggleBold())},{nodeType:ND.RichTextNodeType.em,icon:"formatItalic",isActive:e=>e.isActive(esF.name),runCommands:es$(e=>e.toggleItalic())}],esG=[{nodeType:ND.RichTextNodeType.rtl,icon:"formatTextDirectionRToL",isActive:e=>e.isActive({dir:"rtl"}),runCommands:es$((e,t)=>e.toggleDirection(esX(t)))}];function es$(e){return(t,n={})=>{let r=!0===n.can?t.can().chain():t.chain().focus();return void 0!==n.deleteRange&&(r=r.deleteRange(n.deleteRange)),n.can?function(e,t,n){try{return n(t,e).run()}catch{return!1}}(t,r,e):e(r,t).run()}}function esX(e){let t=e.state.selection.$from.parent.attrs;return eu0.parseNodeAttrsDirection(t)}function es0(e,t){return e.filter(e=>t.includes(e.nodeType))}function es1(e){let{items:t,editor:n}=e;return 0===t.length?null:zM.jsxs(zM.Fragment,{children:[zM.jsx(f.Jf,{}),t.map(e=>zM.jsx(f.r8,{disabled:!e.runCommands(n,{can:!0}),onPressedChange(){e.runCommands(n)},pressed:e.isActive(n),startIcon:e.icon},e.nodeType))]})}function es2(e){let{labels:t,editor:n}=e,r=n.getAttributes("label").label;return zM.jsxs(zM.Fragment,{children:[zM.jsx(f.Jf,{}),zM.jsxs(f.h_,{children:[zM.jsx(f.$F,{disabled:0===t.length,children:zM.jsx(f.zx,{endIcon:"arrowDropDown",size:"small",color:"grey",children:es6(r??"Labels")})}),zM.jsx(f.AW,{align:"start",asPortal:!1,maxHeight:256,avoidCollisions:!1,children:t.map((e,t)=>{let i=r===e;return zM.jsx(f.Xi,{onSelect:()=>i?n.commands.unsetLabel():function(e,t){es$(e=>e.setLabel({label:t}))(e)}(n,e),endIcon:i&&zM.jsx(f.I5,{name:"check",size:"extraSmall"}),children:es6(e)},`${e}-${t}`)})})]})]})}function es6(e){return(0,x.tx)(e,20)}function es5(e){let{editor:t}=e,n=t.getAttributes("label");if(!n.label)return null;let r=n.label;return zM.jsx(f.xu,{backgroundColor:"purple9",padding:{block:2,inline:4},alignItems:"center",borderRadius:{topLeft:2,topRight:2,bottomRight:2},maxWidth:125,children:zM.jsx(f.xv,{color:"white",variant:"small",noWrap:!0,children:r})})}function es3(e){let{disabled:t,showWebLinkModal:n,showDocumentsLinkModal:r,showMediaLinkModal:i}=function(e){let{editor:t,setModal:n}=e;return{disabled:!es$(e=>e.setWebLink({href:""}))(t,{can:!0}),showWebLinkModal:function(){n("webLink")},showDocumentsLinkModal:function(){n("documentLink")},showMediaLinkModal:function(){n("mediaLink")}}}(e);return zM.jsxs(zM.Fragment,{children:[zM.jsx(f.Jf,{}),zM.jsxs(f.yM,{density:"compact",children:[zM.jsx(f.hA,{disabled:t,startIcon:"link",onClick:n},ND.RichTextNodeType.hyperlink),zM.jsxs(f.h_,{children:[zM.jsx(f.$F,{children:zM.jsx(f.hA,{startIcon:"arrowDropDown"})}),zM.jsxs(f.AW,{align:"end",asPortal:!1,children:[zM.jsx(f.Xi,{startIcon:zM.jsx(f.I5,{name:"public"}),onSelect:n,children:"Link to web page"}),zM.jsx(f.Xi,{startIcon:zM.jsx(f.I5,{name:"description"}),onSelect:r,children:"Link to document"}),zM.jsx(f.Xi,{startIcon:zM.jsx(f.I5,{name:"image"}),onSelect:i,children:"Link to media"})]})]})]})]})}function es9(e){let{docId:t,onEdit:n,onUnlink:r}=e,i=function(e){let t=zB();t.searchDocuments||zW("searchDocuments");let{coreApiBaseUrl:n,authStrategy:r}=t;return(0,m.QT)(HU,[n,r,e])}(t),o=zB();if(!i)return null;let a=i.versions[0],u=zR({status:null==a?void 0:a.status,releaseId:(null==a?void 0:a.status)==="release"?a.release_id:void 0,documentId:i.id,versionId:null==a?void 0:a.version_id,baseUrl:o.baseUrl}),s=(null==a?void 0:a.preview_summary)??"",l=(null==a?void 0:a.custom_type_label)??"";return zM.jsx(f.oZ,{url:u,title:i.title,subTitle:l,description:s,onEdit:n,onUnlink:r,largeIconName:"description"})}function es4(e){let{editor:t}=e,{searchDocuments:n}=zB(),r=t.getAttributes(ND.RichTextNodeType.hyperlink);if(r.id&&n){let i=r.id;return zM.jsx(es7,{docId:i,...e})}if(r.href){let o=r.href;return zM.jsx(es8,{url:o,...e})}if(r.media){let a=esP(r.media);return zM.jsx(ele,{media:a,...e})}return null}function es7(e){let{editor:t,onEditDocumentLink:n,docId:r}=e;return zM.jsx(f.SV,{renderError:()=>zM.jsx(f.oZ,{url:"",title:"Failed to Load Linked Document Data",subTitle:"",error:!0,onEdit:n,onUnlink:()=>elt(t)}),children:zM.jsx(c.Suspense,{fallback:zM.jsx(f.oZ,{url:"",title:"",subTitle:"",loading:!0,onEdit:n,onUnlink:()=>elt(t)}),children:zM.jsx(es9,{docId:r,onEdit:n,onUnlink:()=>elt(t)})})})}function es8(e){let{url:t,editor:n,onEditWebLink:r}=e,i=(0,l.ju)(t);return i?zM.jsx(f.oZ,{url:t,title:(0,l.S$)(i),subTitle:t,onEdit:r,onUnlink:()=>elt(n)}):zM.jsx(f.oZ,{url:t,title:"",subTitle:t,onEdit:r,onUnlink:()=>elt(n)})}function ele(e){let{media:t,editor:n,onEditMediaLink:r}=e;return"ImageLink"===t.__TYPE__?zM.jsx(f.Qi,{url:t.url,title:t.name,subTitle:`${t.width} x ${t.height} pixels`,onEdit:r,onUnlink:()=>elt(n)}):"FileLink"===t.__TYPE__?zM.jsx(f.oZ,{url:t.url,title:t.name,subTitle:function(e){let{filename:t}=e,n=t.split(".").pop();return n?n.toLowerCase():""}({filename:t.name}),onEdit:r,onUnlink:()=>elt(n),largeIconName:"insertDriveFile"}):null}function elt(e){es$(e=>e.unsetLink())(e)}function eln(e){let{open:t}=e,{onOpenChange:n,onSelectDocument:r}=function(e){let{editor:t,setOpen:n}=e;function r(e){n(e)}return{onSelectDocument:function(e){es$(t=>t.extendMarkRange(ND.RichTextNodeType.hyperlink).setDocumentLink({id:e}))(t),n(!1)},onOpenChange:r}}(e);return zM.jsx(Gd,{open:t,onOpenChange:n,onSelectDocument:r})}function elr(e){let{open:t}=e,{onOpenChange:n,onMediaSelected:r}=function(e){let{editor:t,setOpen:n}=e;return{onMediaSelected:function(e){es$(t=>t.extendMarkRange(ND.RichTextNodeType.hyperlink).setMediaLink({media:e}))(t),n(!1)},onOpenChange:n}}(e);return zM.jsx(JR,{open:t,onOpenChange:n,onMediaSelected:r,assetType:"all"})}function eli(e){let{open:t}=e,{url:n,setUrl:r,onOpenChange:i,onKeyDown:o,openInNewTab:a,setOpenInNewTab:u,onSetUrl:s,selectionUrl:d,selectionUrlTitle:p}=function(e){var t;let{editor:n,setOpen:r}=e,[i,o]=(0,c.useState)(""),[a,u]=(0,c.useState)(!1),s=function(e){let t=e.getAttributes(ND.RichTextNodeType.hyperlink);return t.href?t.href:void 0}(n),d=(t=n,"_blank"===t.getAttributes(ND.RichTextNodeType.hyperlink).target);(0,c.useEffect)(()=>{o(s??"")},[s]),(0,c.useEffect)(()=>{u(d??!1)},[d]);let f=s?(0,l.ju)(s):void 0,p=f?(0,l.S$)(f):"";function A(e){let t=a?"_blank":"_self";es$(n=>n.extendMarkRange(ND.RichTextNodeType.hyperlink).setWebLink({href:e,target:t}))(n),r(!1)}return{url:i,setUrl:o,onSetUrl:A,selectionUrl:s,selectionUrlTitle:p,openInNewTab:a,selectionOpenInNewTab:d,setOpenInNewTab:u,onKeyDown:function(e){"Enter"===e.key&&A(i)},onOpenChange:function(e){o(""),u(!1),r(e)}}}(e);return zM.jsx(f.Vq,{open:t,onOpenChange:i,hasClose:!1,size:"small",children:zM.jsx(f.cZ,{children:zM.jsxs(f.xu,{flexDirection:"column",children:[zM.jsxs(f.xu,{flexDirection:"column",height:"100%",padding:16,gap:4,children:[zM.jsx(f.yt,{value:n,onValueChange:r,placeholder:"Paste URL",icon:"public",onKeyDown:o}),d&&zM.jsxs(f.xu,{flexDirection:"column",padding:{top:8},gap:4,children:[zM.jsx(f.xv,{variant:"smallBold",color:"grey11",children:"Linked to"}),zM.jsxs(f.xu,{backgroundColor:"grey4",borderRadius:6,padding:8,alignItems:"center",gap:8,children:[zM.jsx(f.pI,{largeIconName:"public",smallIconName:"link"}),zM.jsxs(f.xu,{flexDirection:"column",children:[zM.jsx(f.xv,{variant:"bold",color:"grey12",children:p}),zM.jsx(f.xv,{color:"grey11",variant:"small",children:"Web page"})]})]})]})]}),n&&zM.jsxs(f.xu,{flexDirection:"column",padding:{block:8},border:{top:!0},children:[zM.jsx(f.UN,{onSelect:()=>u(!a),icon:a?"checkBox":"checkBoxOutlinedBlank",textContent:"Open in new tab"}),zM.jsx(f.UN,{onSelect:()=>s(n),icon:"link",textContent:"Link to URL"})]})]})})})}function elo(e){let{items:t,editor:n}=e;return 0===t.length?null:zM.jsxs(zM.Fragment,{children:[zM.jsx(f.Jf,{}),zM.jsx(f.dV,{onValueChange(e){t.forEach(t=>{(t.isActive(n)&&!e.includes(t.nodeType)||!t.isActive(n)&&e.includes(t.nodeType))&&t.runCommands(n)})},type:"multiple",value:t.filter(e=>e.isActive(n)).map(e=>e.nodeType),children:t.map(e=>zM.jsx(f.nG,{disabled:!e.runCommands(n,{can:!0}),startIcon:e.icon,value:e.nodeType},e.nodeType))},"mark")]})}function ela(e){var t;let{items:n,editor:r}=e;return 0===n.length?null:zM.jsxs(f.h_,{children:[zM.jsx(f.$F,{disabled:1===n.length,children:zM.jsx(f.zx,{endIcon:"arrowDropDown",size:"small",color:"grey",children:(null==(t=n.find(e=>e.isActive(r)))?void 0:t.text)??""})}),zM.jsx(f.AW,{align:"start",asPortal:!1,maxHeight:256,avoidCollisions:!1,children:n.map(e=>zM.jsx(f.Xi,{onSelect(){e.runCommands(r)},children:e.text},e.nodeType))})]})}function elu(e){return{duration:100,hideOnClick:!0,offset:e,placement:"top-start",zIndex:30}}function els(e){let{editor:t,nodeTypes:n,labels:r}=e,[i,o]=(0,c.useState)(),a=n.includes(ND.RichTextNodeType.hyperlink),u=!i,{shouldShowBubbleMenu:s,shouldshowPopover:l}=function(e){let{editor:t}=e;return{shouldShowBubbleMenu:function(e){let{view:n,state:r,from:i,to:o}=e;if(!n.hasFocus())return!1;let{doc:a,selection:u}=r;return!(t.isActive(ND.RichTextNodeType.preformatted)||u.empty||0===a.textBetween(i,o).length)},shouldshowPopover:function(e,t){let{view:n,state:r,from:i,to:o}=e,a=n.state.doc.nodeAt(i),{doc:u,selection:s}=r;return!!s.empty&&!(u.textBetween(i,o).length>0)&&!!(null!=a&&a.marks.some(e=>e.type.name===t))}}}({editor:t}),[d,f]=(0,c.useState)(!0);return(0,c.useEffect)(()=>{f(!1)},[]),d?null:zM.jsxs(zM.Fragment,{children:[zM.jsx(eoR,{editor:t,tippyOptions:elu([-48,0]),shouldShow:s,children:u&&zM.jsx(ell,{editor:t,nodeTypes:n,labels:r,setModal:o})}),zM.jsx(eoR,{editor:t,tippyOptions:elu([-48,0]),shouldShow:e=>l(e,"hyperlink"),children:u&&zM.jsx(es4,{editor:t,onEditWebLink:()=>o("webLink"),onEditDocumentLink:()=>o("documentLink"),onEditMediaLink:()=>o("mediaLink")})}),zM.jsx(eoR,{editor:t,tippyOptions:elu([0,0]),shouldShow:e=>l(e,"label"),children:zM.jsx(es5,{editor:t})}),a&&zM.jsxs(zM.Fragment,{children:[zM.jsx(eli,{open:"webLink"===i,setOpen:function(e){o(e?"webLink":void 0)},editor:t}),zM.jsx(eln,{open:"documentLink"===i,setOpen:function(e){o(e?"documentLink":void 0)},editor:t}),zM.jsx(elr,{open:"mediaLink"===i,setOpen:function(e){o(e?"mediaLink":void 0)},editor:t})]})]})}function ell(e){let{editor:t,nodeTypes:n,labels:r,setModal:i}=e,o=n.includes("hyperlink"),a=r.length>0,u=es0(esZ,n),s=es0(esJ,n),l=es0(esG,n),c=u.length+s.length+l.length+Number(o);return 0===c?null:zM.jsxs(f.o8,{children:[zM.jsx(ela,{items:u,editor:t}),a&&zM.jsx(es2,{labels:r,editor:t}),zM.jsx(elo,{items:s,editor:t}),o&&zM.jsx(es3,{editor:t,setModal:i}),zM.jsx(es1,{items:l,editor:t}),c>1&&zM.jsxs(zM.Fragment,{children:[zM.jsx(f.Jf,{}),zM.jsx(f.hA,{onClick(){t.chain().focus().clearNodes().unsetAllMarks().run()},startIcon:"formatClear"},"clear")]})]})}function elc(e){var t;let{content:n,field:r,id:i,readOnly:o}=e,a=function(e){var t,n;let r=`${(null==(t=e.config)?void 0:t.multi)??""}-${(null==(n=e.config)?void 0:n.single)??""}`;return(0,c.useMemo)(()=>{var t,n;let{extensions:r,defaultTextConverter:i}=function(e){var t;if(!e||!(null!=e&&e.single)&&!(null!=e&&e.multi))return eo$();let n=function(e){let t=(e.single||e.multi||"").split(/\s*,\s*/).map(e=>{let t=ND.RichTextNodeTypeCodec.decode(e);return"Right"===t._tag?t.right:void 0}).filter(h.$);return new Set(t)}(e);if(!(null!=n&&n.size))return eo$();let r=(t=n,esH(t).filter(e=>(0,v.G)(t,t=>e.richTextNodeTypes.includes(t)))),i=function(e){let t=new Set(e);return(0,v.G)(t,eoZ)&&t.add(eu5),(0,v.G)(t,eoz)||t.add(eu5),[...t]}(r);return{extensions:i,defaultTextConverter:function(e){let t=e.find(eoz)??eu5;return function(e){return n=>t.converter.fromPrismic(e)({...n,type:t.richTextNodeTypes[0]??"heading1"})}}(i)}}(e.config),o=r.filter(eld),a=r.flatMap(e=>e.richTextNodeTypes),u=r.map(e=>e.component),s=r.filter(elf).map(e=>e.name),l=[...u,...function(e,t){var n,r,i;let o=t.map(e=>e.richTextNodeTypes).flat(),a={placeholderByNodeType:(i=t,i.reduce((e,t)=>(t.nodeType===eoQ.Text&&(e[t.name]=t.placeholder),e),{})),unfocusedPlaceholder:null==(n=e.config)?void 0:n.placeholder,nodeExtensions:t},u=o.includes(ND.RichTextNodeType.orderedList)||o.includes(ND.RichTextNodeType.list);return[ean.component((null==(r=e.config)?void 0:r.single)===void 0),euG.component,eau.component,eal(a),u?eo7.component:void 0,eu7.configure({nodeTypes:o})].filter(h.$)}(e,o),euX.configure({supportedExtensionNames:s}),erB],c=l.map(e=>e.name),d=function(e,t){let n=et1.resolve(e);return etQ(n,void 0)}(l),f=(n=null==(t=e.config)?void 0:t.labels,Array.from(n??[]));return{allComponents:l,extensionNames:c,defaultTextConverter:i,nodeExtensions:o,names:a,schema:d,labels:f}},[r])}(r),u=n&&ean.converter(a.nodeExtensions).fromPrismic(a.schema,null==(t=a.defaultTextConverter)?void 0:t.call(a,a.schema))(n),s=(0,p.R9)(e.onContentChange),l=(0,f.jE)({content:null==u?void 0:u.toJSON(),editable:!o,editorProps:{attributes:{class:`${f.rk} ${f.bN}`,id:i,tabIndex:"0"}},extensions:a.allComponents,injectCSS:!1,onUpdate({editor:e}){if(e.isEmpty)return s(void 0);let t=ean.converter(a.nodeExtensions).toPrismic(e.state.doc);s(t)}},[a,o]);return zM.jsxs(f.gN,{children:[zM.jsx(f.Qy,{htmlFor:i,children:Jn(r)}),zM.jsxs(f.JO,{children:[l.isEditable&&zM.jsx(els,{editor:l,nodeTypes:a.names.concat(eu$),labels:a.labels}),zM.jsx(eo_,{editor:l,style:{flexGrow:1}})]})]})}function eld(e){return e.extType===eoq.Node}function elf(e){return!(e.extType!==eoq.Node||e.nodeType!==eoQ.Text||e.lockedFormat)}function elp(e){var t,n,r,i,o;let{content:a,field:u,id:s,onContentChange:l,readOnly:c}=e,d=Jr(u),p=(r=u,(null==(i=r.config)?void 0:i.default_value)===void 0||null==(o=r.config.options)?void 0:o[0]),A=(null==a?void 0:a.value)??p;return zM.jsxs(f.gN,{children:[zM.jsx(f.fw,{name:"arrowDropDownCircle"}),zM.jsx(f.Qy,{htmlFor:s,children:Jn(u)}),zM.jsx(f.JO,{children:zM.jsxs(f.Ph,{id:s,size:"large",color:"grey",value:A,renderTrigger:()=>zM.jsx(f.JF,{id:s,placeholder:d}),onValueChange(e){c||l(function(e){if(!(0===e.length||e===d))return{__TYPE__:"FieldContent",type:"Select",value:e}}(e))},children:[!p&&d&&zM.jsx(f.Ql,{value:d,children:d},d),null==(n=null==(t=u.config)?void 0:t.options)?void 0:n.map(e=>zM.jsx(f.Ql,{value:e,children:e},e))]})})]})}function elA(e){let{id:t,readOnly:n,field:r,content:i,onContentChange:o}=e,a=null!=i&&i.value?(0,A._O)(i.value):void 0;return zM.jsxs(f.gN,{children:[zM.jsx(f.fw,{name:"event"}),zM.jsx(f.Qy,{id:t,children:Jn(r)}),zM.jsx(f.JO,{children:zM.jsx(f.xu,{padding:{left:4,right:12},width:"100%",flexDirection:"column",justifyContent:"center",children:zM.jsx(f.Wr,{mode:"date-time","aria-labelledby":t,disabled:n,value:a,onValueChange:e=>o(function(e){if(e)return{__TYPE__:"FieldContent",type:"Timestamp",value:function(e){let t=`${e.getUTCFullYear()}`.padStart(4,"0"),n=`${e.getUTCMonth()+1}`.padStart(2,"0"),r=`${e.getUTCDate()}`.padStart(2,"0"),i=`${e.getUTCHours()}`.padStart(2,"0"),o=`${e.getUTCMinutes()}`.padStart(2,"0");return`${t}-${n}-${r}T${i}:${o}:00+00:00`}(e)}}(e))})})})]})}function elh(e){let{id:t,readOnly:n,content:r,nestableWidget:i}=e,o=(0,p.R9)(e.onContentChange);return(0,c.useMemo)(()=>{let e={id:t,readOnly:n,onContentChange:o};return"Boolean"===i.type?zM.jsx(Ji,{...e,field:i,content:k.isBooleanContent(r)?r:void 0}):"Date"===i.type?zM.jsx(Ja,{...e,field:i,content:k.isDateContent(r)?r:void 0}):"Timestamp"===i.type?zM.jsx(elA,{...e,field:i,content:k.isTimestampContent(r)?r:void 0}):"Image"===i.type?zM.jsx(JB,{...e,field:i,content:k.isImageContent(r)?r:void 0}):"Link"===i.type?zM.jsx(GS,{...e,field:i,content:k.isLinkContent(r)?r:void 0}):"Number"===i.type?zM.jsx(GT,{...e,field:i,content:k.isNumberContent(r)?r:void 0}):"StructuredText"===i.type?zM.jsx(elc,{...e,field:i,content:k.isRichTextContent(r)?r:void 0}):"Select"===i.type?zM.jsx(elp,{...e,field:i,content:k.isSelectContent(r)?r:void 0}):"Text"===i.type?zM.jsx(J3,{...e,field:i,content:k.isTextContent(r)?r:void 0}):"Embed"===i.type?zM.jsx(Jm,{...e,field:i,content:k.isEmbedContent(r)?r:void 0}):"Color"===i.type?zM.jsx(Jo,{...e,field:i,content:k.isColorContent(r)?r:void 0}):"GeoPoint"===i.type?zM.jsx(Jb,{...e,field:i,content:k.isGeoPointContent(r)?r:void 0}):"IntegrationFields"===i.type?zM.jsx(J5,{...e,field:i,content:k.isIntegrationFieldContent(r)?r:void 0}):null},[r,t,i,o,n])}function elm(e){let{id:t,title:n,addItemButtonTitle:r,content:i,onContentChange:o,readOnly:a,repeatable:u=!0,repeatableZone:s}=e,l=Object.entries(s),d=i??[elg];!u&&d.length>1&&(d=d.slice(0,1));let p=(0,c.useRef)(new WeakMap);function A(e){return p.current.get(e)??"!bugged!"}function h(e){let{index:t,offset:n}=e;o((0,g.pB)(d,t,t+n))}function m(e){let{index:t}=e;o((0,g.$E)(d,t))}return!function(e,t){t.forEach(t=>{e.has(t)||e.set(t,(0,w.d)())})}(p.current,d),0===Object.keys(s).length?null:zM.jsx(f.ZA,{title:n??"Repeatable zone",addItemButtonTitle:r??"Add item in repeatable zone",items:d,maxItems:u?void 0:1,getItemKey:A,onAddItem:function(){o(d.concat(ely()))},children(e,n){let r=new Map(e.value),i=A(e);return zM.jsx(f.En,{keepLoaded:!0,children:zM.jsx(f.MN,{index:n,title:`${n+1} • Item`,onMove:h,onDelete:m,children:l.map(([u,s])=>{let l=r.get(u),c=k.isNestableContent(l)?l:void 0;return zM.jsx(elh,{id:`${t}[${i}].${u}`,content:c,nestableWidget:s,onContentChange:t=>(function(e,t,n,r){let i=function(e,t){let[n,r]=t;if(!r){let i=e.value.filter(([e])=>e!==n);return ely(i)}let o=Array.from(new Map(e.value).set(n,r));return ely(o)}(e,[n,r]),a=function(e,t){let[n,r]=t;return r?e.map((e,t)=>t===n?r:e):e.filter((e,t)=>t!==n)}(d,[t,i]);(function(e,t,n){let r=e.get(t);void 0!==r&&e.set(n,r)})(p.current,e,i),o(a)})(e,n,u,t),readOnly:a},u)})})})}})}let elg={__TYPE__:"GroupItemContent",value:[]};function ely(e=[]){return{__TYPE__:"GroupItemContent",value:e}}function elv(e){var t,n;let{group:r,content:i,onContentChange:o,...a}=e;return zM.jsx(elm,{...a,title:elx(r),addItemButtonTitle:`Add item in "${elx(r)}"`,repeatable:(null==(t=r.config)?void 0:t.repeat)!==!1,repeatableZone:(null==(n=r.config)?void 0:n.fields)??{},content:null==i?void 0:i.value,onContentChange(e){o({__TYPE__:"GroupContentType",value:e})}})}function elx(e){var t;return(null==(t=e.config)?void 0:t.label)??e.fieldset??e.type}function elb(e){let{id:t,readOnly:n,content:r,slicePrimaryWidget:i}=e,o=(0,p.R9)(e.onContentChange);return(0,c.useMemo)(()=>{let e={id:t,readOnly:n,onContentChange:o};return"Group"===i.type?zM.jsx(elv,{...e,group:i,content:k.isGroupContent(r)?r:void 0}):zM.jsx(elh,{...e,nestableWidget:i,content:k.isNestableContent(r)?r:void 0})},[r,t,i,o,n])}function elC(e){let{content:t,id:n,slicePrimaryZone:r,onContentChange:i,readOnly:o}=e,a=(0,c.useMemo)(()=>Object.entries(r),[r]);return zM.jsx(zM.Fragment,{children:a.map(([e,r])=>{let a=t[e];return zM.jsx(elb,{id:`${n}.${e}`,readOnly:o,slicePrimaryWidget:r,content:k.isSlicePrimaryContent(a)?a:void 0,onContentChange(n){var r,o,a;i((r=t,o=e,a=n,a?{...r,[o]:a}:(0,d.ud)(r,o)))}},e)})})}function elS(e){var t,n,r,i;let{config:o,content:a,sliceKey:u,readOnly:s=!1,sharedSlice:l,onContentChange:d,...p}=e,A=(t=l,n=a.variation,(0,c.useMemo)(()=>t.variations.find(e=>e.id===n),[t,n])),h=(0,c.useId)(),m={id:p.id??h,readOnly:s},{selected:g,selectionId:y,selection:v}=function(e){let{sliceKey:t}=e||{},n=(0,c.useContext)(Jt),r=function(e,t){if(t)return`${e}___${t}`}("sliceFieldSet",t),i=t===(null==n?void 0:n.id);return{selectionId:r,selected:i,selection:n}}({sliceKey:u});return void 0===A?null:zM.jsx(zL.Provider,{value:o,children:zM.jsx(f.C3,{id:y,selected:g,onFocus:function(){u&&v.update("sliceFieldSet",u)},legend:(r=l,i=A,[r.name,i.name].join(" • ")),children:zM.jsxs(f.En,{heightEstimate:400,gap:16,keepLoaded:!0,children:[zM.jsx(elC,{...m,slicePrimaryZone:A.primary??{},content:a.primary,onContentChange(e){d({...a,primary:e})}}),zM.jsx(elm,{...m,repeatableZone:A.items??{},content:a.items,onContentChange(e){d({...a,items:e})}})]})})})}}}]);