@omer-x/buttler 0.4.1 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (130) hide show
  1. package/drizzle/{0000_illegal_mattie_franklin.sql → 0000_bored_night_thrasher.sql} +31 -5
  2. package/drizzle/meta/0000_snapshot.json +190 -12
  3. package/drizzle/meta/_journal.json +2 -2
  4. package/package.json +28 -24
  5. package/ui/.next/BUILD_ID +1 -1
  6. package/ui/.next/app-build-manifest.json +67 -50
  7. package/ui/.next/app-path-routes-manifest.json +1 -1
  8. package/ui/.next/build-manifest.json +15 -15
  9. package/ui/.next/prerender-manifest.json +1 -1
  10. package/ui/.next/react-loadable-manifest.json +1886 -1
  11. package/ui/.next/required-server-files.json +1 -1
  12. package/ui/.next/routes-manifest.json +1 -1
  13. package/ui/.next/server/app/_not-found/page.js +1 -1
  14. package/ui/.next/server/app/_not-found/page.js.nft.json +1 -1
  15. package/ui/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  16. package/ui/.next/server/app/_not-found.html +1 -1
  17. package/ui/.next/server/app/_not-found.rsc +9 -9
  18. package/ui/.next/server/app/api/db/backup/route.js +1 -0
  19. package/ui/.next/server/app/api/db/backup/route.js.nft.json +1 -0
  20. package/ui/.next/server/app/api/logs/route.js +1 -0
  21. package/ui/.next/server/app/api/logs/route.js.nft.json +1 -0
  22. package/ui/.next/server/app/index.html +1 -1
  23. package/ui/.next/server/app/index.rsc +9 -9
  24. package/ui/.next/server/app/page.js +1 -1
  25. package/ui/.next/server/app/page.js.nft.json +1 -1
  26. package/ui/.next/server/app/page_client-reference-manifest.js +1 -1
  27. package/ui/.next/server/app/services/[id]/databases/page.js +1 -0
  28. package/ui/.next/server/app/services/[id]/databases/page.js.nft.json +1 -0
  29. package/ui/.next/server/app/services/[id]/databases/page_client-reference-manifest.js +1 -0
  30. package/ui/.next/server/app/services/[id]/edit/page.js +1 -22
  31. package/ui/.next/server/app/services/[id]/edit/page.js.nft.json +1 -1
  32. package/ui/.next/server/app/services/[id]/edit/page_client-reference-manifest.js +1 -1
  33. package/ui/.next/server/app/services/[id]/page.js +1 -1
  34. package/ui/.next/server/app/services/[id]/page.js.nft.json +1 -1
  35. package/ui/.next/server/app/services/[id]/page_client-reference-manifest.js +1 -1
  36. package/ui/.next/server/app/services/page.js +1 -1
  37. package/ui/.next/server/app/services/page.js.nft.json +1 -1
  38. package/ui/.next/server/app/services/page_client-reference-manifest.js +1 -1
  39. package/ui/.next/server/app/settings/page.js +1 -1
  40. package/ui/.next/server/app/settings/page.js.nft.json +1 -1
  41. package/ui/.next/server/app/settings/page_client-reference-manifest.js +1 -1
  42. package/ui/.next/server/app/settings.html +1 -1
  43. package/ui/.next/server/app/settings.rsc +19 -13
  44. package/ui/.next/server/app/webhook/route.js +1 -1
  45. package/ui/.next/server/app/webhook/route.js.nft.json +1 -1
  46. package/ui/.next/server/app-paths-manifest.json +3 -0
  47. package/ui/.next/server/chunks/116.js +13 -0
  48. package/ui/.next/server/chunks/269.js +2 -0
  49. package/ui/.next/server/chunks/361.js +1 -0
  50. package/ui/.next/server/chunks/397.js +1 -6
  51. package/ui/.next/server/chunks/549.js +1 -0
  52. package/ui/.next/server/chunks/659.js +1 -0
  53. package/ui/.next/server/chunks/681.js +1 -0
  54. package/ui/.next/server/chunks/682.js +1 -1
  55. package/ui/.next/server/chunks/719.js +1 -0
  56. package/ui/.next/server/chunks/863.js +1 -0
  57. package/ui/.next/server/chunks/871.js +2 -0
  58. package/ui/.next/server/chunks/902.js +13 -0
  59. package/ui/.next/server/chunks/948.js +2 -2
  60. package/ui/.next/server/edge-instrumentation.js +1 -1
  61. package/ui/.next/server/instrumentation.js +1 -1
  62. package/ui/.next/server/middleware-build-manifest.js +1 -1
  63. package/ui/.next/server/middleware-react-loadable-manifest.js +1 -1
  64. package/ui/.next/server/pages/404.html +1 -1
  65. package/ui/.next/server/pages/500.html +1 -1
  66. package/ui/.next/server/pages/_document.js +1 -1
  67. package/ui/.next/server/pages/_error.js +1 -1
  68. package/ui/.next/server/server-reference-manifest.js +1 -1
  69. package/ui/.next/server/server-reference-manifest.json +1 -1
  70. package/ui/.next/static/chunks/117-3b8d34fa94485032.js +2 -0
  71. package/ui/.next/static/chunks/146-5b9462531053a4c5.js +1 -0
  72. package/ui/.next/static/chunks/303-c65efd1cc09d56fd.js +1 -0
  73. package/ui/.next/static/chunks/355-1e51ac955ff8955f.js +1 -0
  74. package/ui/.next/static/chunks/391-496467ca6f95afde.js +1 -0
  75. package/ui/.next/static/chunks/392-27b37c7f04898266.js +1 -0
  76. package/ui/.next/static/chunks/581-2e3e69ca13e0474f.js +1 -0
  77. package/ui/.next/static/chunks/734-02b6331f3bd9c318.js +1 -0
  78. package/ui/.next/static/chunks/857-f888440b100832b8.js +1 -0
  79. package/ui/.next/static/chunks/app/_not-found/page-31d3ea3db635cbc2.js +1 -0
  80. package/ui/.next/static/chunks/app/layout-dd91aec6218093d2.js +1 -0
  81. package/ui/.next/static/chunks/app/page-6b7dd63af3dd45de.js +1 -0
  82. package/ui/.next/static/chunks/app/services/[id]/databases/page-0ab83677f41e4872.js +1 -0
  83. package/ui/.next/static/chunks/app/services/[id]/edit/page-4e855fc95079d3b0.js +1 -0
  84. package/ui/.next/static/chunks/app/services/[id]/page-91c945af4fe4b38f.js +1 -0
  85. package/ui/.next/static/chunks/app/services/page-e1eb6d0670544d2c.js +1 -0
  86. package/ui/.next/static/chunks/app/settings/page-972e8f623bc80dde.js +1 -0
  87. package/ui/.next/static/chunks/fd9d1056-2fd070b6bf76421a.js +1 -0
  88. package/ui/.next/static/chunks/framework-00a8ba1a63cfdc9e.js +1 -0
  89. package/ui/.next/static/chunks/main-003047948bd01e37.js +1 -0
  90. package/ui/.next/static/chunks/main-app-65b07a3d5b8df539.js +1 -0
  91. package/ui/.next/static/chunks/pages/_app-15e2daefa259f0b5.js +1 -0
  92. package/ui/.next/static/chunks/pages/_error-28b803cb2479b966.js +1 -0
  93. package/ui/.next/static/chunks/polyfills-42372ed130431b0a.js +1 -0
  94. package/ui/.next/static/chunks/{webpack-a69de51c95087569.js → webpack-87d7cc477c47986b.js} +1 -1
  95. package/ui/.next/static/css/59996bdb2e04e5fb.css +1 -0
  96. package/ui/.next/static/css/ec6ebd6699fb7dbb.css +1 -0
  97. package/ui/.next/static/iPuJc_dz0G66oW0IF7CF9/_buildManifest.js +1 -0
  98. package/ui/package.json +28 -24
  99. package/ui/server.js +1 -1
  100. package/ui/.next/prerender-manifest.js +0 -1
  101. package/ui/.next/server/chunks/128.js +0 -6
  102. package/ui/.next/server/chunks/227.js +0 -13
  103. package/ui/.next/server/chunks/600.js +0 -1
  104. package/ui/.next/server/chunks/714.js +0 -13
  105. package/ui/.next/server/chunks/827.js +0 -1
  106. package/ui/.next/static/_Zi7qFoieimeI2cFtnG1C/_buildManifest.js +0 -1
  107. package/ui/.next/static/chunks/23-bb15da2f9712f1ee.js +0 -2
  108. package/ui/.next/static/chunks/501-8a347119a0299ef2.js +0 -22
  109. package/ui/.next/static/chunks/508-cd606e43a654c84c.js +0 -1
  110. package/ui/.next/static/chunks/639-5a16d1a387d3d90a.js +0 -5
  111. package/ui/.next/static/chunks/824-abddc9fde212a017.js +0 -1
  112. package/ui/.next/static/chunks/847-25f57fbfdbf40943.js +0 -1
  113. package/ui/.next/static/chunks/app/_not-found/page-dea2b9568f6e4d73.js +0 -1
  114. package/ui/.next/static/chunks/app/layout-3c41fcd8af4993e8.js +0 -1
  115. package/ui/.next/static/chunks/app/page-ffc06cd4473239c6.js +0 -1
  116. package/ui/.next/static/chunks/app/services/[id]/edit/page-d6a51117ff0f3181.js +0 -1
  117. package/ui/.next/static/chunks/app/services/[id]/page-33c71f6c45d4f629.js +0 -1
  118. package/ui/.next/static/chunks/app/services/page-b9fbb200ff18c8aa.js +0 -1
  119. package/ui/.next/static/chunks/app/settings/page-b8301bc5f37b7c4a.js +0 -5
  120. package/ui/.next/static/chunks/fd9d1056-f761286b613acfb1.js +0 -1
  121. package/ui/.next/static/chunks/framework-f66176bb897dc684.js +0 -33
  122. package/ui/.next/static/chunks/main-app-550ee52788cc088b.js +0 -1
  123. package/ui/.next/static/chunks/main-bc817a05693febb1.js +0 -1
  124. package/ui/.next/static/chunks/pages/_app-6a626577ffa902a4.js +0 -1
  125. package/ui/.next/static/chunks/pages/_error-1be831200e60c5c0.js +0 -1
  126. package/ui/.next/static/chunks/polyfills-78c92fac7aa8fdd8.js +0 -1
  127. package/ui/.next/static/css/294dd07620d1a861.css +0 -1
  128. package/ui/.next/static/css/475865983e61b131.css +0 -1
  129. package/ui/.next/static/css/ce0509a911764719.css +0 -1
  130. /package/ui/.next/static/{_Zi7qFoieimeI2cFtnG1C → iPuJc_dz0G66oW0IF7CF9}/_ssgManifest.js +0 -0
@@ -0,0 +1 @@
1
+ "use strict";exports.id=659,exports.ids=[659],exports.modules={69766:(e,t)=>{t.DF={prefix:"fas",iconName:"check",icon:[448,512,[10003,10004],"f00c","M438.6 105.4c12.5 12.5 12.5 32.8 0 45.3l-256 256c-12.5 12.5-32.8 12.5-45.3 0l-128-128c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0L160 338.7 393.4 105.4c12.5-12.5 32.8-12.5 45.3 0z"]},t.LE=t.DF},96300:(e,t)=>{t.DF={prefix:"fas",iconName:"spinner",icon:[512,512,[],"f110","M304 48a48 48 0 1 0 -96 0 48 48 0 1 0 96 0zm0 416a48 48 0 1 0 -96 0 48 48 0 1 0 96 0zM48 304a48 48 0 1 0 0-96 48 48 0 1 0 0 96zm464-48a48 48 0 1 0 -96 0 48 48 0 1 0 96 0zM142.9 437A48 48 0 1 0 75 369.1 48 48 0 1 0 142.9 437zm0-294.2A48 48 0 1 0 75 75a48 48 0 1 0 67.9 67.9zM369.1 437A48 48 0 1 0 437 369.1 48 48 0 1 0 369.1 437z"]},t.LM=t.DF},10992:(e,t,n)=>{n.d(t,{Z:()=>o});var r=n(17577);let i=function(e){let t=(0,r.useRef)(e);return(0,r.useEffect)(()=>{t.current=e},[e]),t};function o(e){let t=i(e);return(0,r.useCallback)(function(...e){return t.current&&t.current(...e)},[t])}},53171:(e,t,n)=>{n.d(t,{Z:()=>o});var r=n(17577);let i=e=>e&&"function"!=typeof e?t=>{e.current=t}:e,o=function(e,t){return(0,r.useMemo)(()=>(function(e,t){let n=i(e),r=i(t);return e=>{n&&n(e),r&&r(e)}})(e,t),[e,t])}},77225:(e,t,n)=>{n.d(t,{Z:()=>i});var r=n(17577);function i(e){let t=function(e){let t=(0,r.useRef)(e);return t.current=e,t}(e);(0,r.useEffect)(()=>()=>t.current(),[])}},51048:(e,t,n)=>{t.__esModule=!0,t.default=p,t.renderTransition=function(e,t,n){return e?(0,l.jsx)(u.default,Object.assign({},n,{component:e})):t?(0,l.jsx)(p,Object.assign({},n,{transition:t})):(0,l.jsx)(s.default,Object.assign({},n))},t.useTransition=f;var r=d(n(32198)),i=d(n(55183)),o=d(n(24044)),a=function(e,t){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=c(void 0);if(n&&n.has(e))return n.get(e);var r={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&({}).hasOwnProperty.call(e,o)){var a=i?Object.getOwnPropertyDescriptor(e,o):null;a&&(a.get||a.set)?Object.defineProperty(r,o,a):r[o]=e[o]}return r.default=e,n&&n.set(e,r),r}(n(17577)),s=d(n(91339)),u=d(n(52001)),l=n(10326);function c(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(c=function(e){return e?n:t})(e)}function d(e){return e&&e.__esModule?e:{default:e}}function f({in:e,onTransition:t}){let n=(0,a.useRef)(null),r=(0,a.useRef)(!0),s=(0,i.default)(t);return(0,o.default)(()=>{if(!n.current)return;let t=!1;return s({in:e,element:n.current,initial:r.current,isStale:()=>t}),()=>{t=!0}},[e,s]),(0,o.default)(()=>(r.current=!1,()=>{r.current=!0}),[]),n}function p({children:e,in:t,onExited:n,onEntered:i,transition:o}){let[s,u]=(0,a.useState)(!t);t&&s&&u(!1);let l=f({in:!!t,onTransition:e=>{Promise.resolve(o(e)).then(()=>{e.isStale()||(e.in?null==i||i(e.element,e.initial):(u(!0),null==n||n(e.element)))},t=>{throw e.in||u(!0),t})}}),c=(0,r.default)(l,e.ref);return s&&!t?null:(0,a.cloneElement)(e,{ref:c})}},91339:(e,t,n)=>{t.__esModule=!0,t.default=void 0;var r=a(n(55183)),i=a(n(32198)),o=n(17577);function a(e){return e&&e.__esModule?e:{default:e}}t.default=function({children:e,in:t,onExited:n,mountOnEnter:a,unmountOnExit:s}){let u=(0,o.useRef)(null),l=(0,o.useRef)(t),c=(0,r.default)(n);(0,o.useEffect)(()=>{t?l.current=!0:c(u.current)},[t,c]);let d=(0,i.default)(u,e.ref),f=(0,o.cloneElement)(e,{ref:d});return t?f:s||!l.current&&a?null:f}},52001:(e,t,n)=>{t.__esModule=!0,t.default=void 0;var r=function(e,t){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=s(void 0);if(n&&n.has(e))return n.get(e);var r={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&({}).hasOwnProperty.call(e,o)){var a=i?Object.getOwnPropertyDescriptor(e,o):null;a&&(a.get||a.set)?Object.defineProperty(r,o,a):r[o]=e[o]}return r.default=e,n&&n.set(e,r),r}(n(17577)),i=function(e){return e&&e.__esModule?e:{default:e}}(n(77957)),o=n(10326);let a=["component"];function s(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(s=function(e){return e?n:t})(e)}let u=r.forwardRef((e,t)=>{let{component:n}=e,r=function(e,t){if(null==e)return{};var n={};for(var r in e)if(({}).hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}(e,a),s=(0,i.default)(r);return(0,o.jsx)(n,Object.assign({ref:t},s))});t.default=u},77957:(e,t,n)=>{t.__esModule=!0,t.default=function(e){let{onEnter:t,onEntering:n,onEntered:s,onExit:u,onExiting:l,onExited:c,addEndListener:d,children:f}=e,p=function(e,t){if(null==e)return{};var n={};for(var r in e)if(({}).hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}(e,a),h=(0,r.useRef)(null),m=(0,i.default)(h,(0,o.getChildRef)(f)),g=e=>t=>{e&&h.current&&e(h.current,t)},y=(0,r.useCallback)(g(t),[t]),v=(0,r.useCallback)(g(n),[n]),b=(0,r.useCallback)(g(s),[s]),E=(0,r.useCallback)(g(u),[u]),x=(0,r.useCallback)(g(l),[l]),_=(0,r.useCallback)(g(c),[c]),O=(0,r.useCallback)(g(d),[d]);return Object.assign({},p,{nodeRef:h},t&&{onEnter:y},n&&{onEntering:v},s&&{onEntered:b},u&&{onExit:E},l&&{onExiting:x},c&&{onExited:_},d&&{addEndListener:O},{children:"function"==typeof f?(e,t)=>f(e,Object.assign({},t,{ref:m})):(0,r.cloneElement)(f,{ref:m})})};var r=n(17577),i=function(e){return e&&e.__esModule?e:{default:e}}(n(32198)),o=n(25513);let a=["onEnter","onEntering","onEntered","onExit","onExiting","onExited","addEndListener","children"]},56395:(e,t,n)=>{t.__esModule=!0,t.default=function(e,t){let n=(0,a.default)(),[r,i]=(0,o.useState)(()=>u(e,null==n?void 0:n.document));if(!r){let t=u(e);t&&i(t)}return(0,o.useEffect)(()=>{t&&r&&t(r)},[t,r]),(0,o.useEffect)(()=>{let t=u(e);t!==r&&i(t)},[e,r]),r},t.resolveContainerRef=void 0;var r=s(n(59816)),i=s(n(41051)),o=n(17577),a=s(n(96085));function s(e){return e&&e.__esModule?e:{default:e}}let u=(e,t)=>i.default?null==e?(t||(0,r.default)()).body:("function"==typeof e&&(e=e()),e&&"current"in e&&(e=e.current),e&&("nodeType"in e||e.getBoundingClientRect))?e:null:null;t.resolveContainerRef=u},96085:(e,t,n)=>{t.__esModule=!0,t.WindowProvider=void 0,t.default=function(){return(0,r.useContext)(o)};var r=n(17577),i=function(e){return e&&e.__esModule?e:{default:e}}(n(41051));let o=(0,r.createContext)(i.default?window:void 0);t.WindowProvider=o.Provider},25513:(e,t,n)=>{t.__esModule=!0,t.getChildRef=function(e){if(!e||"function"==typeof e)return null;let{major:t}=o();return t>=19?e.props.ref:e.ref},t.getReactVersion=o,t.isEscKey=function(e){return"Escape"===e.code||27===e.keyCode};var r=function(e,t){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=i(void 0);if(n&&n.has(e))return n.get(e);var r={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&({}).hasOwnProperty.call(e,a)){var s=o?Object.getOwnPropertyDescriptor(e,a):null;s&&(s.get||s.set)?Object.defineProperty(r,a,s):r[a]=e[a]}return r.default=e,n&&n.set(e,r),r}(n(17577));function i(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(i=function(e){return e?n:t})(e)}function o(){let e=r.version.split(".");return{major:+e[0],minor:+e[1],patch:+e[2]}}},98120:(e,t,n)=>{n.d(t,{ZP:()=>s});var r=n(41051),i=!1,o=!1;try{var a={get passive(){return i=!0},get once(){return o=i=!0}};r.default&&(window.addEventListener("test",a,a),window.removeEventListener("test",a,!0))}catch(e){}let s=function(e,t,n,r){if(r&&"boolean"!=typeof r&&!o){var a=r.once,s=r.capture,u=n;!o&&a&&(u=n.__once||function e(r){this.removeEventListener(t,e,s),n.call(this,r)},n.__once=u),e.addEventListener(t,u,i?r:s)}e.addEventListener(t,n,r)}},41051:(e,t,n)=>{n.r(t),n.d(t,{default:()=>r});let r=!!("undefined"!=typeof window&&window.document&&window.document.createElement)},13689:(e,t,n)=>{function r(e,t){return e.contains?e.contains(t):e.compareDocumentPosition?e===t||!!(16&e.compareDocumentPosition(t)):void 0}n.r(t),n.d(t,{default:()=>r})},97575:(e,t,n)=>{n.r(t),n.d(t,{default:()=>u});var r=n(59816),i=/([A-Z])/g,o=/^ms-/;function a(e){return e.replace(i,"-$1").toLowerCase().replace(o,"-ms-")}var s=/^((translate|rotate|scale)(X|Y|Z|3d)?|matrix(3d)?|perspective|skew(X|Y)?)$/i;let u=function(e,t){var n,i="",o="";if("string"==typeof t)return e.style.getPropertyValue(a(t))||((n=(0,r.default)(e))&&n.defaultView||window).getComputedStyle(e,void 0).getPropertyValue(a(t));Object.keys(t).forEach(function(n){var r=t[n];r||0===r?n&&s.test(n)?o+=n+"("+r+") ":i+=a(n)+": "+r+";":e.style.removeProperty(a(n))}),o&&(i+="transform: "+o+";"),e.style.cssText+=";"+i}},7032:(e,t,n)=>{n.d(t,{Z:()=>r});function r(e,t){return e.classList?!!t&&e.classList.contains(t):-1!==(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")}},10995:(e,t,n)=>{n.r(t),n.d(t,{default:()=>o});var r=n(98120),i=n(26460);let o=function(e,t,n,o){return(0,r.ZP)(e,t,n,o),function(){(0,i.Z)(e,t,n,o)}}},59816:(e,t,n)=>{function r(e){return e&&e.ownerDocument||document}n.r(t),n.d(t,{default:()=>r})},26460:(e,t,n)=>{n.d(t,{Z:()=>r});let r=function(e,t,n,r){var i=r&&"boolean"!=typeof r?r.capture:r;e.removeEventListener(t,n,i),n.__once&&e.removeEventListener(t,n.__once,i)}},69749:(e,t,n)=>{n.d(t,{Z:()=>o});var r=n(97575),i=n(10995);function o(e,t,n,o){null==n&&(s=-1===(a=(0,r.default)(e,"transitionDuration")||"").indexOf("ms")?1e3:1,n=parseFloat(a)*s||0);var a,s,u,l,c,d,f,p=(u=n,void 0===(l=o)&&(l=5),c=!1,d=setTimeout(function(){c||function(e,t,n,r){if(void 0===n&&(n=!1),void 0===r&&(r=!0),e){var i=document.createEvent("HTMLEvents");i.initEvent(t,n,r),e.dispatchEvent(i)}}(e,"transitionend",!0)},u+l),f=(0,i.default)(e,"transitionend",function(){c=!0},{once:!0}),function(){clearTimeout(d),f()}),h=(0,i.default)(e,"transitionend",t);return function(){p(),h()}}},54854:(e,t,n)=>{n.d(t,{default:()=>c});var r=n(48029),i=n.n(r),o=n(17577),a=n(81992),s=n(42227),u=n(10326);let l=o.forwardRef(({as:e,bsPrefix:t,variant:n="primary",size:r,active:o=!1,disabled:l=!1,className:c,...d},f)=>{let p=(0,s.vE)(t,"btn"),[h,{tagName:m}]=(0,a.useButtonProps)({tagName:e,disabled:l,...d});return(0,u.jsx)(m,{...h,...d,ref:f,disabled:l,className:i()(c,p,o&&"active",n&&`${p}-${n}`,r&&`${p}-${r}`,d.href&&l&&"disabled")})});l.displayName="Button";let c=l},57631:(e,t,n)=>{n.d(t,{Z:()=>d});var r=n(78439),i=n.n(r),o=n(17577),a=n(48029),s=n.n(a),u=n(10326);let l={"aria-label":i().string,onClick:i().func,variant:i().oneOf(["white"])},c=o.forwardRef(({className:e,variant:t,"aria-label":n="Close",...r},i)=>(0,u.jsx)("button",{ref:i,type:"button",className:s()("btn-close",t&&`btn-close-${t}`,e),"aria-label":n,...r}));c.displayName="CloseButton",c.propTypes=l;let d=c},14177:(e,t,n)=>{n.d(t,{Z:()=>N});var r=n(48029),i=n.n(r),o=n(17577),a=n.n(o),s=n(91367);function u(e,t){return(u=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}var l=n(60962),c=n.n(l);let d={disabled:!1},f=a().createContext(null);var p="unmounted",h="exited",m="entering",g="entered",y="exiting",v=function(e){function t(t,n){r=e.call(this,t,n)||this;var r,i,o=n&&!n.isMounting?t.enter:t.appear;return r.appearStatus=null,t.in?o?(i=h,r.appearStatus=m):i=g:i=t.unmountOnExit||t.mountOnEnter?p:h,r.state={status:i},r.nextCallback=null,r}t.prototype=Object.create(e.prototype),t.prototype.constructor=t,u(t,e),t.getDerivedStateFromProps=function(e,t){return e.in&&t.status===p?{status:h}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(e){var t=null;if(e!==this.props){var n=this.state.status;this.props.in?n!==m&&n!==g&&(t=m):(n===m||n===g)&&(t=y)}this.updateStatus(!1,t)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var e,t,n,r=this.props.timeout;return e=t=n=r,null!=r&&"number"!=typeof r&&(e=r.exit,t=r.enter,n=void 0!==r.appear?r.appear:t),{exit:e,enter:t,appear:n}},n.updateStatus=function(e,t){if(void 0===e&&(e=!1),null!==t){if(this.cancelNextCallback(),t===m){if(this.props.unmountOnExit||this.props.mountOnEnter){var n=this.props.nodeRef?this.props.nodeRef.current:c().findDOMNode(this);n&&n.scrollTop}this.performEnter(e)}else this.performExit()}else this.props.unmountOnExit&&this.state.status===h&&this.setState({status:p})},n.performEnter=function(e){var t=this,n=this.props.enter,r=this.context?this.context.isMounting:e,i=this.props.nodeRef?[r]:[c().findDOMNode(this),r],o=i[0],a=i[1],s=this.getTimeouts(),u=r?s.appear:s.enter;if(!e&&!n||d.disabled){this.safeSetState({status:g},function(){t.props.onEntered(o)});return}this.props.onEnter(o,a),this.safeSetState({status:m},function(){t.props.onEntering(o,a),t.onTransitionEnd(u,function(){t.safeSetState({status:g},function(){t.props.onEntered(o,a)})})})},n.performExit=function(){var e=this,t=this.props.exit,n=this.getTimeouts(),r=this.props.nodeRef?void 0:c().findDOMNode(this);if(!t||d.disabled){this.safeSetState({status:h},function(){e.props.onExited(r)});return}this.props.onExit(r),this.safeSetState({status:y},function(){e.props.onExiting(r),e.onTransitionEnd(n.exit,function(){e.safeSetState({status:h},function(){e.props.onExited(r)})})})},n.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},n.setNextCallback=function(e){var t=this,n=!0;return this.nextCallback=function(r){n&&(n=!1,t.nextCallback=null,e(r))},this.nextCallback.cancel=function(){n=!1},this.nextCallback},n.onTransitionEnd=function(e,t){this.setNextCallback(t);var n=this.props.nodeRef?this.props.nodeRef.current:c().findDOMNode(this),r=null==e&&!this.props.addEndListener;if(!n||r){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var i=this.props.nodeRef?[this.nextCallback]:[n,this.nextCallback],o=i[0],a=i[1];this.props.addEndListener(o,a)}null!=e&&setTimeout(this.nextCallback,e)},n.render=function(){var e=this.state.status;if(e===p)return null;var t=this.props,n=t.children,r=(t.in,t.mountOnEnter,t.unmountOnExit,t.appear,t.enter,t.exit,t.timeout,t.addEndListener,t.onEnter,t.onEntering,t.onEntered,t.onExit,t.onExiting,t.onExited,t.nodeRef,(0,s.Z)(t,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]));return a().createElement(f.Provider,{value:null},"function"==typeof n?n(e,r):a().cloneElement(a().Children.only(n),r))},t}(a().Component);function b(){}v.contextType=f,v.propTypes={},v.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:b,onEntering:b,onEntered:b,onExit:b,onExiting:b,onExited:b},v.UNMOUNTED=p,v.EXITED=h,v.ENTERING=m,v.ENTERED=g,v.EXITING=y;var E=n(25513),x=n(97575),_=n(69749);function O(e,t){let n=(0,x.default)(e,t)||"",r=-1===n.indexOf("ms")?1e3:1;return parseFloat(n)*r}function j(e,t){let n=O(e,"transitionDuration"),r=O(e,"transitionDelay"),i=(0,_.Z)(e,n=>{n.target===e&&(i(),t(n))},n+r)}var C=n(53171),w=n(19925),S=n(10326);let M=a().forwardRef(({onEnter:e,onEntering:t,onEntered:n,onExit:r,onExiting:i,onExited:s,addEndListener:u,children:l,childRef:c,...d},f)=>{let p=(0,o.useRef)(null),h=(0,C.Z)(p,c),m=e=>{h((0,w.Z)(e))},g=e=>t=>{e&&p.current&&e(p.current,t)},y=(0,o.useCallback)(g(e),[e]),b=(0,o.useCallback)(g(t),[t]),E=(0,o.useCallback)(g(n),[n]),x=(0,o.useCallback)(g(r),[r]),_=(0,o.useCallback)(g(i),[i]),O=(0,o.useCallback)(g(s),[s]),j=(0,o.useCallback)(g(u),[u]);return(0,S.jsx)(v,{ref:f,...d,onEnter:y,onEntered:E,onEntering:b,onExit:x,onExited:O,onExiting:_,addEndListener:j,nodeRef:p,children:"function"==typeof l?(e,t)=>l(e,{...t,ref:m}):a().cloneElement(l,{ref:m})})}),R={[m]:"show",[g]:"show"},P=o.forwardRef(({className:e,children:t,transitionClasses:n={},onEnter:r,...a},s)=>{let u={in:!1,timeout:300,mountOnEnter:!1,unmountOnExit:!1,appear:!1,...a},l=(0,o.useCallback)((e,t)=>{e.offsetHeight,null==r||r(e,t)},[r]);return(0,S.jsx)(M,{ref:s,addEndListener:j,...u,onEnter:l,childRef:(0,E.getChildRef)(t),children:(r,a)=>o.cloneElement(t,{...a,className:i()("fade",e,t.props.className,R[r],n[r])})})});P.displayName="Fade";let N=P},43480:(e,t,n)=>{n.d(t,{Z:()=>s});var r=n(17577),i=n(48029),o=n.n(i),a=n(10326);let s=e=>r.forwardRef((t,n)=>(0,a.jsx)("div",{...t,ref:n,className:o()(t.className,e)}))},19925:(e,t,n)=>{n.d(t,{Z:()=>o});var r=n(60962),i=n.n(r);function o(e){return e&&"setState"in e?i().findDOMNode(e):null!=e?e:null}},58585:(e,t,n)=>{var r=n(61085);n.o(r,"notFound")&&n.d(t,{notFound:function(){return r.notFound}}),n.o(r,"redirect")&&n.d(t,{redirect:function(){return r.redirect}})},61085:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{ReadonlyURLSearchParams:function(){return a},RedirectType:function(){return r.RedirectType},notFound:function(){return i.notFound},permanentRedirect:function(){return r.permanentRedirect},redirect:function(){return r.redirect}});let r=n(83953),i=n(16399);class o extends Error{constructor(){super("Method unavailable on `ReadonlyURLSearchParams`. Read more: https://nextjs.org/docs/app/api-reference/functions/use-search-params#updating-searchparams")}}class a extends URLSearchParams{append(){throw new o}delete(){throw new o}set(){throw new o}sort(){throw new o}}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},16399:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{isNotFoundError:function(){return i},notFound:function(){return r}});let n="NEXT_NOT_FOUND";function r(){let e=Error(n);throw e.digest=n,e}function i(e){return"object"==typeof e&&null!==e&&"digest"in e&&e.digest===n}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},8586:(e,t)=>{var n;Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"RedirectStatusCode",{enumerable:!0,get:function(){return n}}),function(e){e[e.SeeOther=303]="SeeOther",e[e.TemporaryRedirect=307]="TemporaryRedirect",e[e.PermanentRedirect=308]="PermanentRedirect"}(n||(n={})),("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},83953:(e,t,n)=>{var r;Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{RedirectType:function(){return r},getRedirectError:function(){return u},getRedirectStatusCodeFromError:function(){return h},getRedirectTypeFromError:function(){return p},getURLFromRedirectError:function(){return f},isRedirectError:function(){return d},permanentRedirect:function(){return c},redirect:function(){return l}});let i=n(54580),o=n(72934),a=n(8586),s="NEXT_REDIRECT";function u(e,t,n){void 0===n&&(n=a.RedirectStatusCode.TemporaryRedirect);let r=Error(s);r.digest=s+";"+t+";"+e+";"+n+";";let o=i.requestAsyncStorage.getStore();return o&&(r.mutableCookies=o.mutableCookies),r}function l(e,t){void 0===t&&(t="replace");let n=o.actionAsyncStorage.getStore();throw u(e,t,(null==n?void 0:n.isAction)?a.RedirectStatusCode.SeeOther:a.RedirectStatusCode.TemporaryRedirect)}function c(e,t){void 0===t&&(t="replace");let n=o.actionAsyncStorage.getStore();throw u(e,t,(null==n?void 0:n.isAction)?a.RedirectStatusCode.SeeOther:a.RedirectStatusCode.PermanentRedirect)}function d(e){if("object"!=typeof e||null===e||!("digest"in e)||"string"!=typeof e.digest)return!1;let[t,n,r,i]=e.digest.split(";",4),o=Number(i);return t===s&&("replace"===n||"push"===n)&&"string"==typeof r&&!isNaN(o)&&o in a.RedirectStatusCode}function f(e){return d(e)?e.digest.split(";",3)[2]:null}function p(e){if(!d(e))throw Error("Not a redirect error");return e.digest.split(";",2)[1]}function h(e){if(!d(e))throw Error("Not a redirect error");return Number(e.digest.split(";",4)[3])}(function(e){e.push="push",e.replace="replace"})(r||(r={})),("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},46395:(e,t,n)=>{n.d(t,{Z:()=>u});var r=n(10326),i=n(96300),o=n(29497),a=n(48029),s=n(54854);let u=({type:e="button",text:t,icon:n,variant:u="primary",size:l,onClick:c,disabled:d=!1,spinning:f=!1,className:p,stretched:h=!1})=>(0,r.jsxs)(s.default,{type:e,size:l,variant:u,className:p,onClick:c,disabled:d||f,children:[n?(0,r.jsx)(o.G,{size:"lg",icon:f?i.LM:n,className:a("fa-fw",{"fa-spin":f})}):f&&(0,r.jsx)(o.G,{size:"lg",icon:i.LM,className:"fa-fw fa-spin"}),t&&(0,r.jsx)("span",{className:n?a("ms-2",h?"me-4":"me-2"):void 0,children:t})]})},44316:(e,t,n)=>{n.d(t,{default:()=>s});var r=n(10326),i=n(69766),o=n(60962),a=n(46395);let s=({icon:e=i.LE,text:t,variant:n="primary",size:s,stretched:u=!1,className:l})=>{let{pending:c}=(0,o.useFormStatus)();return(0,r.jsx)(a.Z,{type:"submit",icon:e,text:t,variant:n,size:s,spinning:c,stretched:u,className:l})}},58913:(e,t,n)=>{n.d(t,{Z:()=>o});var r=n(19510);let i=({name:e,secondary:t=!1,children:n})=>(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{className:"d-flex justify-content-between align-items-center",children:[t?(0,r.jsx)("h2",{className:"m-0",children:e}):(0,r.jsx)("h1",{className:"fs-2 m-0",children:e}),(0,r.jsx)("div",{className:"d-flex gap-3 text-nowrap",children:n})]}),(0,r.jsx)("hr",{className:"mt-2 mb-3"})]}),o=({title:e,toolbar:t,secondary:n=!1,children:o})=>(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i,{name:e,secondary:n,children:t}),(0,r.jsx)("section",{children:o})]})},11931:(e,t,n)=>{n.d(t,{fC:()=>z});var r=n(49237),i=n(19326),o=n(35418),a=n(83596),s=n(18933);class u{static [i.Q]="MySqlForeignKeyBuilder";reference;_onUpdate;_onDelete;constructor(e,t){this.reference=()=>{let{name:t,columns:n,foreignColumns:r}=e();return{name:t,columns:n,foreignTable:r[0].table,foreignColumns:r}},t&&(this._onUpdate=t.onUpdate,this._onDelete=t.onDelete)}onUpdate(e){return this._onUpdate=e,this}onDelete(e){return this._onDelete=e,this}build(e){return new l(e,this)}}class l{constructor(e,t){this.table=e,this.reference=t.reference,this.onUpdate=t._onUpdate,this.onDelete=t._onDelete}static [i.Q]="MySqlForeignKey";reference;onUpdate;onDelete;getName(){let{name:e,columns:t,foreignColumns:n}=this.reference(),r=t.map(e=>e.name),i=n.map(e=>e.name),o=[this.table[s.m],...r,n[0].table[s.m],...i];return e??`${o.join("_")}_fk`}}function c(e,t){return`${e[s.m]}_${t.join("_")}_unique`}class d{constructor(e,t){this.name=t,this.columns=e}static [i.Q]=null;columns;build(e){return new p(e,this.columns,this.name)}}class f{static [i.Q]=null;name;constructor(e){this.name=e}on(...e){return new d(e,this.name)}}class p{constructor(e,t,n){this.table=e,this.columns=t,this.name=n??c(this.table,this.columns.map(e=>e.name))}static [i.Q]=null;columns;name;nullsNotDistinct=!1;getName(){return this.name}}class h extends o.L{static [i.Q]="MySqlColumnBuilder";foreignKeyConfigs=[];references(e,t={}){return this.foreignKeyConfigs.push({ref:e,actions:t}),this}unique(e){return this.config.isUnique=!0,this.config.uniqueName=e,this}generatedAlwaysAs(e,t){return this.config.generated={as:e,type:"always",mode:t?.mode??"virtual"},this}buildForeignKeys(e,t){return this.foreignKeyConfigs.map(({ref:n,actions:r})=>((n,r)=>{let i=new u(()=>({columns:[e],foreignColumns:[n()]}));return r.onUpdate&&i.onUpdate(r.onUpdate),r.onDelete&&i.onDelete(r.onDelete),i.build(t)})(n,r))}}class m extends a.s{constructor(e,t){t.uniqueName||(t.uniqueName=c(e,[t.name])),super(e,t),this.table=e}static [i.Q]="MySqlColumn"}class g extends h{static [i.Q]="MySqlColumnBuilderWithAutoIncrement";constructor(e,t,n){super(e,t,n),this.config.autoIncrement=!1}autoincrement(){return this.config.autoIncrement=!0,this.config.hasDefault=!0,this}}class y extends null{static [i.Q]=null;autoIncrement=this.config.autoIncrement}class v extends h{static [i.Q]="MySqlVarCharBuilder";constructor(e,t){super(e,"string","MySqlVarChar"),this.config.length=t.length,this.config.enum=t.enum}build(e){return new b(e,this.config)}}class b extends m{static [i.Q]="MySqlVarChar";length=this.config.length;enumValues=this.config.enum;getSQLType(){return void 0===this.length?"varchar":`varchar(${this.length})`}}class E extends h{static [i.Q]="MySqlVarBinaryBuilder";constructor(e,t){super(e,"string","MySqlVarBinary"),this.config.length=t?.length}build(e){return new x(e,this.config)}}class x extends m{static [i.Q]="MySqlVarBinary";length=this.config.length;getSQLType(){return void 0===this.length?"varbinary":`varbinary(${this.length})`}}class _ extends h{static [i.Q]="MySqlCharBuilder";constructor(e,t){super(e,"string","MySqlChar"),this.config.length=t.length,this.config.enum=t.enum}build(e){return new O(e,this.config)}}class O extends m{static [i.Q]="MySqlChar";length=this.config.length;enumValues=this.config.enum;getSQLType(){return void 0===this.length?"char":`char(${this.length})`}}var j=n(49695),C=n(12596);class w extends C.b1{static [i.Q]="PgUUIDBuilder";constructor(e){super(e,"string","PgUUID")}defaultRandom(){return this.default((0,j.i6)`gen_random_uuid()`)}build(e){return new S(e,this.config)}}class S extends C.df{static [i.Q]="PgUUID";getSQLType(){return"uuid"}}class M extends C.b1{static [i.Q]="PgCharBuilder";constructor(e,t){super(e,"string","PgChar"),this.config.length=t.length,this.config.enumValues=t.enum}build(e){return new R(e,this.config)}}class R extends C.df{static [i.Q]="PgChar";length=this.config.length;enumValues=this.config.enumValues;getSQLType(){return void 0===this.length?"char":`char(${this.length})`}}class P extends C.b1{static [i.Q]="PgVarcharBuilder";constructor(e,t){super(e,"string","PgVarchar"),this.config.length=t.length,this.config.enumValues=t.enum}build(e){return new N(e,this.config)}}class N extends C.df{static [i.Q]="PgVarchar";length=this.config.length;enumValues=this.config.enumValues;getSQLType(){return void 0===this.length?"varchar":`varchar(${this.length})`}}var k=n(53586),T=n(7410);let D=T.z.union([T.z.string(),T.z.number(),T.z.boolean(),T.z.null()]),L=T.z.lazy(()=>T.z.union([D,T.z.array(L),T.z.record(L)]));function z(e,t){let n=Object.entries((0,r.SS)(e)),o=Object.fromEntries(n.map(([e,t])=>[e,function e(t){let n;if("enumValues"in t&&Array.isArray(t.enumValues)&&t.enumValues.length>0&&(n=t.enumValues.length?T.z.enum(t.enumValues):T.z.string()),!n){if((0,i.is)(t,S))n=T.z.string().uuid();else if("custom"===t.dataType)n=T.z.any();else if("json"===t.dataType)n=L;else if("array"===t.dataType)n=T.z.array(e(t.baseColumn));else if("number"===t.dataType)n=T.z.number();else if("bigint"===t.dataType)n=T.z.bigint();else if("boolean"===t.dataType)n=T.z.boolean();else if("date"===t.dataType)n=T.z.date();else if("string"===t.dataType){let e=T.z.string();((0,i.is)(t,R)||(0,i.is)(t,N)||(0,i.is)(t,b)||(0,i.is)(t,x)||(0,i.is)(t,O)||(0,i.is)(t,k.ts))&&"number"==typeof t.length&&(e=e.max(t.length)),n=e}}return n||(n=T.z.any()),n}(t)]));for(let[e,r]of(t&&(o=Object.assign(o,Object.fromEntries(Object.entries(t).map(([e,t])=>[e,"function"==typeof t?t(o):t])))),n))r.notNull?r.hasDefault&&(o[e]=o[e].optional()):o[e]=o[e].nullable().optional();return T.z.object(o)}}};
@@ -0,0 +1 @@
1
+ exports.id=681,exports.ids=[681],exports.modules={54769:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(4384);class AbortSignal extends n.EventTarget{constructor(){throw super(),TypeError("AbortSignal cannot be constructed directly")}get aborted(){let e=i.get(this);if("boolean"!=typeof e)throw TypeError(`Expected 'this' to be an 'AbortSignal' object, but got ${this===null?"null":typeof this}`);return e}}n.defineEventAttribute(AbortSignal.prototype,"abort");let i=new WeakMap;Object.defineProperties(AbortSignal.prototype,{aborted:{enumerable:!0}}),"function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag&&Object.defineProperty(AbortSignal.prototype,Symbol.toStringTag,{configurable:!0,value:"AbortSignal"});class o{constructor(){s.set(this,function(){let e=Object.create(AbortSignal.prototype);return n.EventTarget.call(e),i.set(e,!1),e}())}get signal(){return a(this)}abort(){var e;e=a(this),!1===i.get(e)&&(i.set(e,!0),e.dispatchEvent({type:"abort"}))}}let s=new WeakMap;function a(e){let t=s.get(e);if(null==t)throw TypeError(`Expected 'this' to be an 'AbortController' object, but got ${null===e?"null":typeof e}`);return t}Object.defineProperties(o.prototype,{signal:{enumerable:!0},abort:{enumerable:!0}}),"function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag&&Object.defineProperty(o.prototype,Symbol.toStringTag,{configurable:!0,value:"AbortController"}),t.AbortController=o,t.AbortSignal=AbortSignal,t.default=o,e.exports=o,e.exports.AbortController=e.exports.default=o,e.exports.AbortSignal=AbortSignal},94697:(e,t,r)=>{var n=r(28992),i=r(14949),o=r(84874),s=r(34987),a=Buffer.from&&Buffer.from!==Uint8Array.from?Buffer.from([0]):new Buffer([0]),l=function(e,t){e._corked?e.once("uncork",t):t()},u=function(e,t){e._autoDestroy&&e.destroy(t)},h=function(e,t){return function(r){r?u(e,"premature close"===r.message?null:r):t&&!e._ended&&e.end()}},f=function(){},d=function(e,t,r){if(!(this instanceof d))return new d(e,t,r);n.Duplex.call(this,r),this._writable=null,this._readable=null,this._readable2=null,this._autoDestroy=!r||!1!==r.autoDestroy,this._forwardDestroy=!r||!1!==r.destroy,this._forwardEnd=!r||!1!==r.end,this._corked=1,this._ondrain=null,this._drained=!1,this._forwarding=!1,this._unwrite=null,this._unread=null,this._ended=!1,this.destroyed=!1,e&&this.setWritable(e),t&&this.setReadable(t)};o(d,n.Duplex),d.obj=function(e,t,r){return r||(r={}),r.objectMode=!0,r.highWaterMark=16,new d(e,t,r)},d.prototype.cork=function(){1==++this._corked&&this.emit("cork")},d.prototype.uncork=function(){this._corked&&0==--this._corked&&this.emit("uncork")},d.prototype.setWritable=function(e){if(this._unwrite&&this._unwrite(),this.destroyed){e&&e.destroy&&e.destroy();return}if(null===e||!1===e){this.end();return}var t=this,r=i(e,{writable:!0,readable:!1},h(this,this._forwardEnd)),n=function(){var e=t._ondrain;t._ondrain=null,e&&e()};this._unwrite&&process.nextTick(n),this._writable=e,this._writable.on("drain",n),this._unwrite=function(){t._writable.removeListener("drain",n),r()},this.uncork()},d.prototype.setReadable=function(e){if(this._unread&&this._unread(),this.destroyed){e&&e.destroy&&e.destroy();return}if(null===e||!1===e){this.push(null),this.resume();return}var t=this,r=i(e,{writable:!1,readable:!0},h(this)),o=function(){t._forward()},s=function(){t.push(null)};this._drained=!0,this._readable=e,this._readable2=e._readableState?e:new n.Readable({objectMode:!0,highWaterMark:16}).wrap(e),this._readable2.on("readable",o),this._readable2.on("end",s),this._unread=function(){t._readable2.removeListener("readable",o),t._readable2.removeListener("end",s),r()},this._forward()},d.prototype._read=function(){this._drained=!0,this._forward()},d.prototype._forward=function(){var e;if(!this._forwarding&&this._readable2&&this._drained){for(this._forwarding=!0;this._drained&&null!==(e=s(this._readable2));)this.destroyed||(this._drained=this.push(e));this._forwarding=!1}},d.prototype.destroy=function(e,t){if(t||(t=f),this.destroyed)return t(null);this.destroyed=!0;var r=this;process.nextTick(function(){r._destroy(e),t(null)})},d.prototype._destroy=function(e){if(e){var t=this._ondrain;this._ondrain=null,t?t(e):this.emit("error",e)}this._forwardDestroy&&(this._readable&&this._readable.destroy&&this._readable.destroy(),this._writable&&this._writable.destroy&&this._writable.destroy()),this.emit("close")},d.prototype._write=function(e,t,r){if(!this.destroyed){if(this._corked)return l(this,this._write.bind(this,e,t,r));if(e===a)return this._finish(r);if(!this._writable)return r();!1===this._writable.write(e)?this._ondrain=r:this.destroyed||r()}},d.prototype._finish=function(e){var t=this;this.emit("preend"),l(this,function(){var r,n;r=t._forwardEnd&&t._writable,n=function(){!1===t._writableState.prefinished&&(t._writableState.prefinished=!0),t.emit("prefinish"),l(t,e)},!r||r._writableState&&r._writableState.finished?n():r._writableState?r.end(n):(r.end(),n())})},d.prototype.end=function(e,t,r){return"function"==typeof e?this.end(null,null,e):"function"==typeof t?this.end(e,null,t):(this._ended=!0,e&&this.write(e),this._writableState.ending||this._writableState.destroyed||this.write(a),n.Writable.prototype.end.call(this,r))},e.exports=d},4384:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});let r=new WeakMap,n=new WeakMap;function i(e){let t=r.get(e);return console.assert(null!=t,"'this' is expected an Event object, but got",e),t}function o(e){if(null!=e.passiveListener){"undefined"!=typeof console&&"function"==typeof console.error&&console.error("Unable to preventDefault inside passive event listener invocation.",e.passiveListener);return}e.event.cancelable&&(e.canceled=!0,"function"==typeof e.event.preventDefault&&e.event.preventDefault())}function s(e,t){r.set(this,{eventTarget:e,event:t,eventPhase:2,currentTarget:e,canceled:!1,stopped:!1,immediateStopped:!1,passiveListener:null,timeStamp:t.timeStamp||Date.now()}),Object.defineProperty(this,"isTrusted",{value:!1,enumerable:!0});let n=Object.keys(t);for(let e=0;e<n.length;++e){let t=n[e];t in this||Object.defineProperty(this,t,a(t))}}function a(e){return{get(){return i(this).event[e]},set(t){i(this).event[e]=t},configurable:!0,enumerable:!0}}function l(e,t){i(e).passiveListener=t}s.prototype={get type(){return i(this).event.type},get target(){return i(this).eventTarget},get currentTarget(){return i(this).currentTarget},composedPath(){let e=i(this).currentTarget;return null==e?[]:[e]},get NONE(){return 0},get CAPTURING_PHASE(){return 1},get AT_TARGET(){return 2},get BUBBLING_PHASE(){return 3},get eventPhase(){return i(this).eventPhase},stopPropagation(){let e=i(this);e.stopped=!0,"function"==typeof e.event.stopPropagation&&e.event.stopPropagation()},stopImmediatePropagation(){let e=i(this);e.stopped=!0,e.immediateStopped=!0,"function"==typeof e.event.stopImmediatePropagation&&e.event.stopImmediatePropagation()},get bubbles(){return!!i(this).event.bubbles},get cancelable(){return!!i(this).event.cancelable},preventDefault(){o(i(this))},get defaultPrevented(){return i(this).canceled},get composed(){return!!i(this).event.composed},get timeStamp(){return i(this).timeStamp},get srcElement(){return i(this).eventTarget},get cancelBubble(){return i(this).stopped},set cancelBubble(value){if(!value)return;let e=i(this);e.stopped=!0,"boolean"==typeof e.event.cancelBubble&&(e.event.cancelBubble=!0)},get returnValue(){return!i(this).canceled},set returnValue(value){value||o(i(this))},initEvent(){}},Object.defineProperty(s.prototype,"constructor",{value:s,configurable:!0,writable:!0}),"undefined"!=typeof window&&void 0!==window.Event&&(Object.setPrototypeOf(s.prototype,window.Event.prototype),n.set(window.Event.prototype,s));let u=new WeakMap;function h(e){return null!==e&&"object"==typeof e}function f(e){let t=u.get(e);if(null==t)throw TypeError("'this' is expected an EventTarget object, but got another value.");return t}function d(e,t){Object.defineProperty(e,`on${t}`,{get(){let e=f(this).get(t);for(;null!=e;){if(3===e.listenerType)return e.listener;e=e.next}return null},set(e){"function"==typeof e||h(e)||(e=null);let r=f(this),n=null,i=r.get(t);for(;null!=i;)3===i.listenerType?null!==n?n.next=i.next:null!==i.next?r.set(t,i.next):r.delete(t):n=i,i=i.next;if(null!==e){let i={listener:e,listenerType:3,passive:!1,once:!1,next:null};null===n?r.set(t,i):n.next=i}},configurable:!0,enumerable:!0})}function c(e){function t(){p.call(this)}t.prototype=Object.create(p.prototype,{constructor:{value:t,configurable:!0,writable:!0}});for(let r=0;r<e.length;++r)d(t.prototype,e[r]);return t}function p(){if(this instanceof p){u.set(this,new Map);return}if(1==arguments.length&&Array.isArray(arguments[0]))return c(arguments[0]);if(arguments.length>0){let e=Array(arguments.length);for(let t=0;t<arguments.length;++t)e[t]=arguments[t];return c(e)}throw TypeError("Cannot call a class as a function")}p.prototype={addEventListener(e,t,r){if(null==t)return;if("function"!=typeof t&&!h(t))throw TypeError("'listener' should be a function or an object.");let n=f(this),i=h(r),o=(i?r.capture:r)?1:2,s={listener:t,listenerType:o,passive:i&&!!r.passive,once:i&&!!r.once,next:null},a=n.get(e);if(void 0===a){n.set(e,s);return}let l=null;for(;null!=a;){if(a.listener===t&&a.listenerType===o)return;l=a,a=a.next}l.next=s},removeEventListener(e,t,r){if(null==t)return;let n=f(this),i=(h(r)?r.capture:r)?1:2,o=null,s=n.get(e);for(;null!=s;){if(s.listener===t&&s.listenerType===i){null!==o?o.next=s.next:null!==s.next?n.set(e,s.next):n.delete(e);return}o=s,s=s.next}},dispatchEvent(e){if(null==e||"string"!=typeof e.type)throw TypeError('"event.type" should be a string.');let t=f(this),r=e.type,o=t.get(r);if(null==o)return!0;let u=new(function e(t){if(null==t||t===Object.prototype)return s;let r=n.get(t);return null==r&&(r=function(e,t){let r=Object.keys(t);if(0===r.length)return e;function n(t,r){e.call(this,t,r)}n.prototype=Object.create(e.prototype,{constructor:{value:n,configurable:!0,writable:!0}});for(let o=0;o<r.length;++o){let s=r[o];if(!(s in e.prototype)){let e="function"==typeof Object.getOwnPropertyDescriptor(t,s).value;Object.defineProperty(n.prototype,s,e?function(e){return{value(){let t=i(this).event;return t[e].apply(t,arguments)},configurable:!0,enumerable:!0}}(s):a(s))}}return n}(e(Object.getPrototypeOf(t)),t),n.set(t,r)),r}(Object.getPrototypeOf(e)))(this,e),h=null;for(;null!=o;){if(o.once?null!==h?h.next=o.next:null!==o.next?t.set(r,o.next):t.delete(r):h=o,l(u,o.passive?o.listener:null),"function"==typeof o.listener)try{o.listener.call(this,u)}catch(e){"undefined"!=typeof console&&"function"==typeof console.error&&console.error(e)}else 3!==o.listenerType&&"function"==typeof o.listener.handleEvent&&o.listener.handleEvent(u);if(i(u).immediateStopped)break;o=o.next}return l(u,null),i(u).eventPhase=0,i(u).currentTarget=null,!u.defaultPrevented}},Object.defineProperty(p.prototype,"constructor",{value:p,configurable:!0,writable:!0}),"undefined"!=typeof window&&void 0!==window.EventTarget&&Object.setPrototypeOf(p.prototype,window.EventTarget.prototype),t.defineEventAttribute=d,t.EventTarget=p,t.default=p,e.exports=p,e.exports.EventTarget=e.exports.default=p,e.exports.defineEventAttribute=d},84874:(e,t,r)=>{try{var n=r(21764);if("function"!=typeof n.inherits)throw"";e.exports=n.inherits}catch(t){e.exports=r(17141)}},17141:e=>{"function"==typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}}},10930:(e,t,r)=>{var n=r(98597),i=r(84874),o=r(94697),s=function(e){return e.length?Array.isArray(e[0])?e[0]:Array.prototype.slice.call(e):[]},a=function(e){var t=function(){var r=s(arguments);if(!(this instanceof t))return new t(r);o.call(this,null,null,e),r.length&&this.setPipeline(r)};return i(t,o),t.prototype.setPipeline=function(){var e=s(arguments),t=this,r=!1,i=e[0],o=e[e.length-1];o=o.readable?o:null,i=i.writable?i:null;var a=function(){e[0].emit("error",Error("stream was destroyed"))};if(this.on("close",a),this.on("prefinish",function(){r||t.cork()}),n(e,function(e){if(t.removeListener("close",a),e)return t.destroy("premature close"===e.message?null:e);r=!0,!1===t._autoDestroy&&(t._autoDestroy=!0),t.uncork()}),this.destroyed)return a();this.setWritable(i),this.setReadable(o)},t};e.exports=a({autoDestroy:!1,destroy:!1}),e.exports.obj=a({autoDestroy:!1,destroy:!1,objectMode:!0,highWaterMark:16}),e.exports.ctor=a},40228:e=>{"use strict";let t={};function r(e,r,n){n||(n=Error);class i extends n{constructor(e,t,n){super("string"==typeof r?r:r(e,t,n))}}i.prototype.name=n.name,i.prototype.code=e,t[e]=i}function n(e,t){if(!Array.isArray(e))return`of ${t} ${String(e)}`;{let r=e.length;return(e=e.map(e=>String(e)),r>2)?`one of ${t} ${e.slice(0,r-1).join(", ")}, or `+e[r-1]:2===r?`one of ${t} ${e[0]} or ${e[1]}`:`of ${t} ${e[0]}`}}r("ERR_INVALID_OPT_VALUE",function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'},TypeError),r("ERR_INVALID_ARG_TYPE",function(e,t,r){var i,o,s,a;let l,u;if("string"==typeof t&&(i="not ",t.substr(0,i.length)===i)?(l="must not be",t=t.replace(/^not /,"")):l="must be",o=" argument",(void 0===s||s>e.length)&&(s=e.length),e.substring(s-o.length,s)===o)u=`The ${e} ${l} ${n(t,"type")}`;else{let r=("number"!=typeof a&&(a=0),a+1>e.length||-1===e.indexOf(".",a))?"argument":"property";u=`The "${e}" ${r} ${l} ${n(t,"type")}`}return u+`. Received type ${typeof r}`},TypeError),r("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),r("ERR_METHOD_NOT_IMPLEMENTED",function(e){return"The "+e+" method is not implemented"}),r("ERR_STREAM_PREMATURE_CLOSE","Premature close"),r("ERR_STREAM_DESTROYED",function(e){return"Cannot call "+e+" after a stream was destroyed"}),r("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),r("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),r("ERR_STREAM_WRITE_AFTER_END","write after end"),r("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),r("ERR_UNKNOWN_ENCODING",function(e){return"Unknown encoding: "+e},TypeError),r("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),e.exports.q=t},11175:(e,t,r)=>{"use strict";var n=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};e.exports=u;var i=r(11733),o=r(87390);r(84874)(u,i);for(var s=n(o.prototype),a=0;a<s.length;a++){var l=s[a];u.prototype[l]||(u.prototype[l]=o.prototype[l])}function u(e){if(!(this instanceof u))return new u(e);i.call(this,e),o.call(this,e),this.allowHalfOpen=!0,e&&(!1===e.readable&&(this.readable=!1),!1===e.writable&&(this.writable=!1),!1===e.allowHalfOpen&&(this.allowHalfOpen=!1,this.once("end",h)))}function h(){this._writableState.ended||process.nextTick(f,this)}function f(e){e.end()}Object.defineProperty(u.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(u.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(u.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(u.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&this._readableState.destroyed&&this._writableState.destroyed},set:function(e){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}})},67003:(e,t,r)=>{"use strict";e.exports=i;var n=r(55564);function i(e){if(!(this instanceof i))return new i(e);n.call(this,e)}r(84874)(i,n),i.prototype._transform=function(e,t,r){r(null,e)}},11733:(e,t,r)=>{"use strict";e.exports=k,k.ReadableState=S,r(17702).EventEmitter;var n,i,o,s,a,l=function(e,t){return e.listeners(t).length},u=r(22539),h=r(78893).Buffer,f=("undefined"!=typeof global?global:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){},d=r(21764);i=d&&d.debuglog?d.debuglog("stream"):function(){};var c=r(7726),p=r(63346),y=r(70301).getHighWaterMark,g=r(40228).q,b=g.ERR_INVALID_ARG_TYPE,m=g.ERR_STREAM_PUSH_AFTER_EOF,w=g.ERR_METHOD_NOT_IMPLEMENTED,v=g.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;r(84874)(k,u);var _=p.errorOrDestroy,E=["error","close","destroy","pause","resume"];function S(e,t,i){n=n||r(11175),e=e||{},"boolean"!=typeof i&&(i=t instanceof n),this.objectMode=!!e.objectMode,i&&(this.objectMode=this.objectMode||!!e.readableObjectMode),this.highWaterMark=y(this,e,"readableHighWaterMark",i),this.buffer=new c,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=!1!==e.emitClose,this.autoDestroy=!!e.autoDestroy,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(o||(o=r(80985).s),this.decoder=new o(e.encoding),this.encoding=e.encoding)}function k(e){if(n=n||r(11175),!(this instanceof k))return new k(e);var t=this instanceof n;this._readableState=new S(e,this,t),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy)),u.call(this)}function R(e,t,r,n,o){i("readableAddChunk",t);var s,a,l,u,d,c=e._readableState;if(null===t)c.reading=!1,function(e,t){if(i("onEofChunk"),!t.ended){if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,t.sync?x(e):(t.needReadable=!1,t.emittedReadable||(t.emittedReadable=!0,O(e)))}}(e,c);else{if(o||(s=c,a=t,h.isBuffer(a)||a instanceof f||"string"==typeof a||void 0===a||s.objectMode||(l=new b("chunk",["string","Buffer","Uint8Array"],a)),d=l),d)_(e,d);else if(c.objectMode||t&&t.length>0){if("string"==typeof t||c.objectMode||Object.getPrototypeOf(t)===h.prototype||(u=t,t=h.from(u)),n)c.endEmitted?_(e,new v):A(e,c,t,!0);else if(c.ended)_(e,new m);else{if(c.destroyed)return!1;c.reading=!1,c.decoder&&!r?(t=c.decoder.write(t),c.objectMode||0!==t.length?A(e,c,t,!1):C(e,c)):A(e,c,t,!1)}}else n||(c.reading=!1,C(e,c))}return!c.ended&&(c.length<c.highWaterMark||0===c.length)}function A(e,t,r,n){t.flowing&&0===t.length&&!t.sync?(t.awaitDrain=0,e.emit("data",r)):(t.length+=t.objectMode?1:r.length,n?t.buffer.unshift(r):t.buffer.push(r),t.needReadable&&x(e)),C(e,t)}function T(e,t){if(e<=0||0===t.length&&t.ended)return 0;if(t.objectMode)return 1;if(e!=e)return t.flowing&&t.length?t.buffer.head.data.length:t.length;if(e>t.highWaterMark){var r;t.highWaterMark=((r=e)>=1073741824?r=1073741824:(r--,r|=r>>>1,r|=r>>>2,r|=r>>>4,r|=r>>>8,r|=r>>>16,r++),r)}return e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0)}function x(e){var t=e._readableState;i("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(i("emitReadable",t.flowing),t.emittedReadable=!0,process.nextTick(O,e))}function O(e){var t=e._readableState;i("emitReadable_",t.destroyed,t.length,t.ended),!t.destroyed&&(t.length||t.ended)&&(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,j(e)}function C(e,t){t.readingMore||(t.readingMore=!0,process.nextTick(M,e,t))}function M(e,t){for(;!t.reading&&!t.ended&&(t.length<t.highWaterMark||t.flowing&&0===t.length);){var r=t.length;if(i("maybeReadMore read 0"),e.read(0),r===t.length)break}t.readingMore=!1}function P(e){var t=e._readableState;t.readableListening=e.listenerCount("readable")>0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume()}function I(e){i("readable nexttick read 0"),e.read(0)}function B(e,t){i("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),j(e),t.flowing&&!t.reading&&e.read(0)}function j(e){var t=e._readableState;for(i("flow",t.flowing);t.flowing&&null!==e.read(););}function L(e,t){var r;return 0===t.length?null:(t.objectMode?r=t.buffer.shift():!e||e>=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):r=t.buffer.consume(e,t.decoder),r)}function N(e){var t=e._readableState;i("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,process.nextTick(D,t,e))}function D(e,t){if(i("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&0===e.length&&(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy)){var r=t._writableState;(!r||r.autoDestroy&&r.finished)&&t.destroy()}}function U(e,t){for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return -1}Object.defineProperty(k.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),k.prototype.destroy=p.destroy,k.prototype._undestroy=p.undestroy,k.prototype._destroy=function(e,t){t(e)},k.prototype.push=function(e,t){var r,n=this._readableState;return n.objectMode?r=!0:"string"==typeof e&&((t=t||n.defaultEncoding)!==n.encoding&&(e=h.from(e,t),t=""),r=!0),R(this,e,t,!1,r)},k.prototype.unshift=function(e){return R(this,e,null,!0,!1)},k.prototype.isPaused=function(){return!1===this._readableState.flowing},k.prototype.setEncoding=function(e){o||(o=r(80985).s);var t=new o(e);this._readableState.decoder=t,this._readableState.encoding=this._readableState.decoder.encoding;for(var n=this._readableState.buffer.head,i="";null!==n;)i+=t.write(n.data),n=n.next;return this._readableState.buffer.clear(),""!==i&&this._readableState.buffer.push(i),this._readableState.length=i.length,this},k.prototype.read=function(e){i("read",e),e=parseInt(e,10);var t,r=this._readableState,n=e;if(0!==e&&(r.emittedReadable=!1),0===e&&r.needReadable&&((0!==r.highWaterMark?r.length>=r.highWaterMark:r.length>0)||r.ended))return i("read: emitReadable",r.length,r.ended),0===r.length&&r.ended?N(this):x(this),null;if(0===(e=T(e,r))&&r.ended)return 0===r.length&&N(this),null;var o=r.needReadable;return i("need readable",o),(0===r.length||r.length-e<r.highWaterMark)&&i("length less than watermark",o=!0),r.ended||r.reading?i("reading or ended",o=!1):o&&(i("do read"),r.reading=!0,r.sync=!0,0===r.length&&(r.needReadable=!0),this._read(r.highWaterMark),r.sync=!1,r.reading||(e=T(n,r))),null===(t=e>0?L(e,r):null)?(r.needReadable=r.length<=r.highWaterMark,e=0):(r.length-=e,r.awaitDrain=0),0===r.length&&(r.ended||(r.needReadable=!0),n!==e&&r.ended&&N(this)),null!==t&&this.emit("data",t),t},k.prototype._read=function(e){_(this,new w("_read()"))},k.prototype.pipe=function(e,t){var r=this,n=this._readableState;switch(n.pipesCount){case 0:n.pipes=e;break;case 1:n.pipes=[n.pipes,e];break;default:n.pipes.push(e)}n.pipesCount+=1,i("pipe count=%d opts=%j",n.pipesCount,t);var o=t&&!1===t.end||e===process.stdout||e===process.stderr?p:s;function s(){i("onend"),e.end()}n.endEmitted?process.nextTick(o):r.once("end",o),e.on("unpipe",function t(o,l){i("onunpipe"),o===r&&l&&!1===l.hasUnpiped&&(l.hasUnpiped=!0,i("cleanup"),e.removeListener("close",d),e.removeListener("finish",c),e.removeListener("drain",a),e.removeListener("error",f),e.removeListener("unpipe",t),r.removeListener("end",s),r.removeListener("end",p),r.removeListener("data",h),u=!0,n.awaitDrain&&(!e._writableState||e._writableState.needDrain)&&a())});var a=function(){var e=r._readableState;i("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&l(r,"data")&&(e.flowing=!0,j(r))};e.on("drain",a);var u=!1;function h(t){i("ondata");var o=e.write(t);i("dest.write",o),!1===o&&((1===n.pipesCount&&n.pipes===e||n.pipesCount>1&&-1!==U(n.pipes,e))&&!u&&(i("false write response, pause",n.awaitDrain),n.awaitDrain++),r.pause())}function f(t){i("onerror",t),p(),e.removeListener("error",f),0===l(e,"error")&&_(e,t)}function d(){e.removeListener("finish",c),p()}function c(){i("onfinish"),e.removeListener("close",d),p()}function p(){i("unpipe"),r.unpipe(e)}return r.on("data",h),function(e,t,r){if("function"==typeof e.prependListener)return e.prependListener(t,r);e._events&&e._events[t]?Array.isArray(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)}(e,"error",f),e.once("close",d),e.once("finish",c),e.emit("pipe",r),n.flowing||(i("pipe resume"),r.resume()),e},k.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r)),this;if(!e){var n=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var o=0;o<i;o++)n[o].emit("unpipe",this,{hasUnpiped:!1});return this}var s=U(t.pipes,e);return -1===s||(t.pipes.splice(s,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,r)),this},k.prototype.on=function(e,t){var r=u.prototype.on.call(this,e,t),n=this._readableState;return"data"===e?(n.readableListening=this.listenerCount("readable")>0,!1!==n.flowing&&this.resume()):"readable"!==e||n.endEmitted||n.readableListening||(n.readableListening=n.needReadable=!0,n.flowing=!1,n.emittedReadable=!1,i("on readable",n.length,n.reading),n.length?x(this):n.reading||process.nextTick(I,this)),r},k.prototype.addListener=k.prototype.on,k.prototype.removeListener=function(e,t){var r=u.prototype.removeListener.call(this,e,t);return"readable"===e&&process.nextTick(P,this),r},k.prototype.removeAllListeners=function(e){var t=u.prototype.removeAllListeners.apply(this,arguments);return("readable"===e||void 0===e)&&process.nextTick(P,this),t},k.prototype.resume=function(){var e=this._readableState;return e.flowing||(i("resume"),e.flowing=!e.readableListening,e.resumeScheduled||(e.resumeScheduled=!0,process.nextTick(B,this,e))),e.paused=!1,this},k.prototype.pause=function(){return i("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(i("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},k.prototype.wrap=function(e){var t=this,r=this._readableState,n=!1;for(var o in e.on("end",function(){if(i("wrapped end"),r.decoder&&!r.ended){var e=r.decoder.end();e&&e.length&&t.push(e)}t.push(null)}),e.on("data",function(o){i("wrapped data"),r.decoder&&(o=r.decoder.write(o)),(!r.objectMode||null!=o)&&(r.objectMode||o&&o.length)&&(t.push(o)||(n=!0,e.pause()))}),e)void 0===this[o]&&"function"==typeof e[o]&&(this[o]=function(t){return function(){return e[t].apply(e,arguments)}}(o));for(var s=0;s<E.length;s++)e.on(E[s],this.emit.bind(this,E[s]));return this._read=function(t){i("wrapped _read",t),n&&(n=!1,e.resume())},this},"function"==typeof Symbol&&(k.prototype[Symbol.asyncIterator]=function(){return void 0===s&&(s=r(25837)),s(this)}),Object.defineProperty(k.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(k.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(k.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(e){this._readableState&&(this._readableState.flowing=e)}}),k._fromList=L,Object.defineProperty(k.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),"function"==typeof Symbol&&(k.from=function(e,t){return void 0===a&&(a=r(18042)),a(k,e,t)})},55564:(e,t,r)=>{"use strict";e.exports=h;var n=r(40228).q,i=n.ERR_METHOD_NOT_IMPLEMENTED,o=n.ERR_MULTIPLE_CALLBACK,s=n.ERR_TRANSFORM_ALREADY_TRANSFORMING,a=n.ERR_TRANSFORM_WITH_LENGTH_0,l=r(11175);function u(e,t){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(null===n)return this.emit("error",new o);r.writechunk=null,r.writecb=null,null!=t&&this.push(t),n(e);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function h(e){if(!(this instanceof h))return new h(e);l.call(this,e),this._transformState={afterTransform:u.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.on("prefinish",f)}function f(){var e=this;"function"!=typeof this._flush||this._readableState.destroyed?d(this,null,null):this._flush(function(t,r){d(e,t,r)})}function d(e,t,r){if(t)return e.emit("error",t);if(null!=r&&e.push(r),e._writableState.length)throw new a;if(e._transformState.transforming)throw new s;return e.push(null)}r(84874)(h,l),h.prototype.push=function(e,t){return this._transformState.needTransform=!1,l.prototype.push.call(this,e,t)},h.prototype._transform=function(e,t,r){r(new i("_transform()"))},h.prototype._write=function(e,t,r){var n=this._transformState;if(n.writecb=r,n.writechunk=e,n.writeencoding=t,!n.transforming){var i=this._readableState;(n.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},h.prototype._read=function(e){var t=this._transformState;null===t.writechunk||t.transforming?t.needTransform=!0:(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform))},h.prototype._destroy=function(e,t){l.prototype._destroy.call(this,e,function(e){t(e)})}},87390:(e,t,r)=>{"use strict";function n(e){var t=this;this.next=null,this.entry=null,this.finish=function(){(function(e,t,r){var n=e.entry;for(e.entry=null;n;){var i=n.callback;t.pendingcb--,i(void 0),n=n.next}t.corkedRequestsFree.next=e})(t,e)}}e.exports=k,k.WritableState=S;var i,o,s={deprecate:r(1152)},a=r(22539),l=r(78893).Buffer,u=("undefined"!=typeof global?global:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){},h=r(63346),f=r(70301).getHighWaterMark,d=r(40228).q,c=d.ERR_INVALID_ARG_TYPE,p=d.ERR_METHOD_NOT_IMPLEMENTED,y=d.ERR_MULTIPLE_CALLBACK,g=d.ERR_STREAM_CANNOT_PIPE,b=d.ERR_STREAM_DESTROYED,m=d.ERR_STREAM_NULL_VALUES,w=d.ERR_STREAM_WRITE_AFTER_END,v=d.ERR_UNKNOWN_ENCODING,_=h.errorOrDestroy;function E(){}function S(e,t,o){i=i||r(11175),e=e||{},"boolean"!=typeof o&&(o=t instanceof i),this.objectMode=!!e.objectMode,o&&(this.objectMode=this.objectMode||!!e.writableObjectMode),this.highWaterMark=f(this,e,"writableHighWaterMark",o),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var s=!1===e.decodeStrings;this.decodeStrings=!s,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){(function(e,t){var r=e._writableState,n=r.sync,i=r.writecb;if("function"!=typeof i)throw new y;if(r.writing=!1,r.writecb=null,r.length-=r.writelen,r.writelen=0,t)--r.pendingcb,n?(process.nextTick(i,t),process.nextTick(C,e,r),e._writableState.errorEmitted=!0,_(e,t)):(i(t),e._writableState.errorEmitted=!0,_(e,t),C(e,r));else{var o=x(r)||e.destroyed;o||r.corked||r.bufferProcessing||!r.bufferedRequest||T(e,r),n?process.nextTick(A,e,r,o,i):A(e,r,o,i)}})(t,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==e.emitClose,this.autoDestroy=!!e.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new n(this)}function k(e){var t=this instanceof(i=i||r(11175));if(!t&&!o.call(k,this))return new k(e);this._writableState=new S(e,this,t),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final)),a.call(this)}function R(e,t,r,n,i,o,s){t.writelen=n,t.writecb=s,t.writing=!0,t.sync=!0,t.destroyed?t.onwrite(new b("write")):r?e._writev(i,t.onwrite):e._write(i,o,t.onwrite),t.sync=!1}function A(e,t,r,n){r||0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain")),t.pendingcb--,n(),C(e,t)}function T(e,t){t.bufferProcessing=!0;var r=t.bufferedRequest;if(e._writev&&r&&r.next){var i=Array(t.bufferedRequestCount),o=t.corkedRequestsFree;o.entry=r;for(var s=0,a=!0;r;)i[s]=r,r.isBuf||(a=!1),r=r.next,s+=1;i.allBuffers=a,R(e,t,!0,t.length,i,"",o.finish),t.pendingcb++,t.lastBufferedRequest=null,o.next?(t.corkedRequestsFree=o.next,o.next=null):t.corkedRequestsFree=new n(t),t.bufferedRequestCount=0}else{for(;r;){var l=r.chunk,u=r.encoding,h=r.callback,f=t.objectMode?1:l.length;if(R(e,t,!1,f,l,u,h),r=r.next,t.bufferedRequestCount--,t.writing)break}null===r&&(t.lastBufferedRequest=null)}t.bufferedRequest=r,t.bufferProcessing=!1}function x(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function O(e,t){e._final(function(r){t.pendingcb--,r&&_(e,r),t.prefinished=!0,e.emit("prefinish"),C(e,t)})}function C(e,t){var r=x(t);if(r&&(t.prefinished||t.finalCalled||("function"!=typeof e._final||t.destroyed?(t.prefinished=!0,e.emit("prefinish")):(t.pendingcb++,t.finalCalled=!0,process.nextTick(O,e,t))),0===t.pendingcb&&(t.finished=!0,e.emit("finish"),t.autoDestroy))){var n=e._readableState;(!n||n.autoDestroy&&n.endEmitted)&&e.destroy()}return r}r(84874)(k,a),S.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(S.prototype,"buffer",{get:s.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(o=Function.prototype[Symbol.hasInstance],Object.defineProperty(k,Symbol.hasInstance,{value:function(e){return!!o.call(this,e)||this===k&&e&&e._writableState instanceof S}})):o=function(e){return e instanceof this},k.prototype.pipe=function(){_(this,new g)},k.prototype.write=function(e,t,r){var n,i,o,s,a,h,f,d=this._writableState,p=!1,y=!d.objectMode&&(n=e,l.isBuffer(n)||n instanceof u);return y&&!l.isBuffer(e)&&(i=e,e=l.from(i)),("function"==typeof t&&(r=t,t=null),y?t="buffer":t||(t=d.defaultEncoding),"function"!=typeof r&&(r=E),d.ending)?(o=r,_(this,s=new w),process.nextTick(o,s)):(y||(a=e,h=r,null===a?f=new m:"string"==typeof a||d.objectMode||(f=new c("chunk",["string","Buffer"],a)),!f||(_(this,f),process.nextTick(h,f),0)))&&(d.pendingcb++,p=function(e,t,r,n,i,o){if(!r){var s,a,u=(s=n,a=i,t.objectMode||!1===t.decodeStrings||"string"!=typeof s||(s=l.from(s,a)),s);n!==u&&(r=!0,i="buffer",n=u)}var h=t.objectMode?1:n.length;t.length+=h;var f=t.length<t.highWaterMark;if(f||(t.needDrain=!0),t.writing||t.corked){var d=t.lastBufferedRequest;t.lastBufferedRequest={chunk:n,encoding:i,isBuf:r,callback:o,next:null},d?d.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else R(e,t,!1,h,n,i,o);return f}(this,d,y,e,t,r)),p},k.prototype.cork=function(){this._writableState.corked++},k.prototype.uncork=function(){var e=this._writableState;!e.corked||(e.corked--,e.writing||e.corked||e.bufferProcessing||!e.bufferedRequest||T(this,e))},k.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new v(e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(k.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(k.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),k.prototype._write=function(e,t,r){r(new p("_write()"))},k.prototype._writev=null,k.prototype.end=function(e,t,r){var n,i=this._writableState;return"function"==typeof e?(r=e,e=null,t=null):"function"==typeof t&&(r=t,t=null),null!=e&&this.write(e,t),i.corked&&(i.corked=1,this.uncork()),i.ending||(n=r,i.ending=!0,C(this,i),n&&(i.finished?process.nextTick(n):this.once("finish",n)),i.ended=!0,this.writable=!1),this},Object.defineProperty(k.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(k.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),k.prototype.destroy=h.destroy,k.prototype._undestroy=h.undestroy,k.prototype._destroy=function(e,t){t(e)}},25837:(e,t,r)=>{"use strict";function n(e,t,r){var n;return(t="symbol"==typeof(n=function(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(t,"string"))?n:String(n))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var i,o=r(90920),s=Symbol("lastResolve"),a=Symbol("lastReject"),l=Symbol("error"),u=Symbol("ended"),h=Symbol("lastPromise"),f=Symbol("handlePromise"),d=Symbol("stream");function c(e,t){return{value:e,done:t}}function p(e){var t=e[s];if(null!==t){var r=e[d].read();null!==r&&(e[h]=null,e[s]=null,e[a]=null,t(c(r,!1)))}}function y(e){process.nextTick(p,e)}var g=Object.getPrototypeOf(function(){}),b=Object.setPrototypeOf((n(i={get stream(){return this[d]},next:function(){var e,t,r=this,n=this[l];if(null!==n)return Promise.reject(n);if(this[u])return Promise.resolve(c(void 0,!0));if(this[d].destroyed)return new Promise(function(e,t){process.nextTick(function(){r[l]?t(r[l]):e(c(void 0,!0))})});var i=this[h];if(i)t=new Promise((e=this,function(t,r){i.then(function(){if(e[u]){t(c(void 0,!0));return}e[f](t,r)},r)}));else{var o=this[d].read();if(null!==o)return Promise.resolve(c(o,!1));t=new Promise(this[f])}return this[h]=t,t}},Symbol.asyncIterator,function(){return this}),n(i,"return",function(){var e=this;return new Promise(function(t,r){e[d].destroy(null,function(e){if(e){r(e);return}t(c(void 0,!0))})})}),i),g);e.exports=function(e){var t,r=Object.create(b,(n(t={},d,{value:e,writable:!0}),n(t,s,{value:null,writable:!0}),n(t,a,{value:null,writable:!0}),n(t,l,{value:null,writable:!0}),n(t,u,{value:e._readableState.endEmitted,writable:!0}),n(t,f,{value:function(e,t){var n=r[d].read();n?(r[h]=null,r[s]=null,r[a]=null,e(c(n,!1))):(r[s]=e,r[a]=t)},writable:!0}),t));return r[h]=null,o(e,function(e){if(e&&"ERR_STREAM_PREMATURE_CLOSE"!==e.code){var t=r[a];null!==t&&(r[h]=null,r[s]=null,r[a]=null,t(e)),r[l]=e;return}var n=r[s];null!==n&&(r[h]=null,r[s]=null,r[a]=null,n(c(void 0,!0))),r[u]=!0}),e.on("readable",y.bind(null,r)),r}},7726:(e,t,r)=>{"use strict";function n(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function i(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?n(Object(r),!0).forEach(function(t){var n,i;n=t,i=r[t],(n=o(n))in e?Object.defineProperty(e,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[n]=i}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):n(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function o(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}var s=r(78893).Buffer,a=r(21764).inspect,l=a&&a.custom||"inspect";e.exports=function(){var e;function t(){(function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")})(this,t),this.head=null,this.tail=null,this.length=0}return e=[{key:"push",value:function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length}},{key:"unshift",value:function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length}},{key:"shift",value:function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(e){if(0===this.length)return"";for(var t=this.head,r=""+t.data;t=t.next;)r+=e+t.data;return r}},{key:"concat",value:function(e){if(0===this.length)return s.alloc(0);for(var t,r,n=s.allocUnsafe(e>>>0),i=this.head,o=0;i;)t=i.data,r=o,s.prototype.copy.call(t,n,r),o+=i.data.length,i=i.next;return n}},{key:"consume",value:function(e,t){var r;return e<this.head.data.length?(r=this.head.data.slice(0,e),this.head.data=this.head.data.slice(e)):r=e===this.head.data.length?this.shift():t?this._getString(e):this._getBuffer(e),r}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(e){var t=this.head,r=1,n=t.data;for(e-=n.length;t=t.next;){var i=t.data,o=e>i.length?i.length:e;if(o===i.length?n+=i:n+=i.slice(0,e),0==(e-=o)){o===i.length?(++r,t.next?this.head=t.next:this.head=this.tail=null):(this.head=t,t.data=i.slice(o));break}++r}return this.length-=r,n}},{key:"_getBuffer",value:function(e){var t=s.allocUnsafe(e),r=this.head,n=1;for(r.data.copy(t),e-=r.data.length;r=r.next;){var i=r.data,o=e>i.length?i.length:e;if(i.copy(t,t.length-e,0,o),0==(e-=o)){o===i.length?(++n,r.next?this.head=r.next:this.head=this.tail=null):(this.head=r,r.data=i.slice(o));break}++n}return this.length-=n,t}},{key:l,value:function(e,t){return a(this,i(i({},t),{},{depth:0,customInspect:!1}))}}],function(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,o(n.key),n)}}(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}()},63346:e=>{"use strict";function t(e,t){n(e,t),r(e)}function r(e){(!e._writableState||e._writableState.emitClose)&&(!e._readableState||e._readableState.emitClose)&&e.emit("close")}function n(e,t){e.emit("error",t)}e.exports={destroy:function(e,i){var o=this,s=this._readableState&&this._readableState.destroyed,a=this._writableState&&this._writableState.destroyed;return s||a?i?i(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(n,this,e)):process.nextTick(n,this,e)):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,function(e){!i&&e?o._writableState?o._writableState.errorEmitted?process.nextTick(r,o):(o._writableState.errorEmitted=!0,process.nextTick(t,o,e)):process.nextTick(t,o,e):i?(process.nextTick(r,o),i(e)):process.nextTick(r,o)})),this},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function(e,t){var r=e._readableState,n=e._writableState;r&&r.autoDestroy||n&&n.autoDestroy?e.destroy(t):e.emit("error",t)}}},90920:(e,t,r)=>{"use strict";var n=r(40228).q.ERR_STREAM_PREMATURE_CLOSE;function i(){}e.exports=function e(t,r,o){if("function"==typeof r)return e(t,null,r);r||(r={}),s=o||i,a=!1,o=function(){if(!a){a=!0;for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];s.apply(this,t)}};var s,a,l=r.readable||!1!==r.readable&&t.readable,u=r.writable||!1!==r.writable&&t.writable,h=function(){t.writable||d()},f=t._writableState&&t._writableState.finished,d=function(){u=!1,f=!0,l||o.call(t)},c=t._readableState&&t._readableState.endEmitted,p=function(){l=!1,c=!0,u||o.call(t)},y=function(e){o.call(t,e)},g=function(){var e;return l&&!c?(t._readableState&&t._readableState.ended||(e=new n),o.call(t,e)):u&&!f?(t._writableState&&t._writableState.ended||(e=new n),o.call(t,e)):void 0},b=function(){t.req.on("finish",d)};return t.setHeader&&"function"==typeof t.abort?(t.on("complete",d),t.on("abort",g),t.req?b():t.on("request",b)):u&&!t._writableState&&(t.on("end",h),t.on("close",h)),t.on("end",p),t.on("finish",d),!1!==r.error&&t.on("error",y),t.on("close",g),function(){t.removeListener("complete",d),t.removeListener("abort",g),t.removeListener("request",b),t.req&&t.req.removeListener("finish",d),t.removeListener("end",h),t.removeListener("close",h),t.removeListener("finish",d),t.removeListener("end",p),t.removeListener("error",y),t.removeListener("close",g)}}},18042:(e,t,r)=>{"use strict";function n(e,t,r,n,i,o,s){try{var a=e[o](s),l=a.value}catch(e){r(e);return}a.done?t(l):Promise.resolve(l).then(n,i)}function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}var o=r(40228).q.ERR_INVALID_ARG_TYPE;e.exports=function(e,t,r){if(t&&"function"==typeof t.next)s=t;else if(t&&t[Symbol.asyncIterator])s=t[Symbol.asyncIterator]();else if(t&&t[Symbol.iterator])s=t[Symbol.iterator]();else throw new o("iterable",["Iterable"],t);var s,a=new e(function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?i(Object(r),!0).forEach(function(t){var n,i;n=t,i=r[t],(n=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(n))in e?Object.defineProperty(e,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[n]=i}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):i(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}({objectMode:!0},r)),l=!1;function u(){return h.apply(this,arguments)}function h(){var e;return e=function*(){try{var e=yield s.next(),t=e.value;e.done?a.push(null):a.push((yield t))?u():l=!1}catch(e){a.destroy(e)}},(h=function(){var t=this,r=arguments;return new Promise(function(i,o){var s=e.apply(t,r);function a(e){n(s,i,o,a,l,"next",e)}function l(e){n(s,i,o,a,l,"throw",e)}a(void 0)})}).apply(this,arguments)}return a._read=function(){l||(l=!0,u())},a}},89121:(e,t,r)=>{"use strict";var n,i=r(40228).q,o=i.ERR_MISSING_ARGS,s=i.ERR_STREAM_DESTROYED;function a(e){if(e)throw e}function l(e){e()}function u(e,t){return e.pipe(t)}e.exports=function(){for(var e,t,i=arguments.length,h=Array(i),f=0;f<i;f++)h[f]=arguments[f];var d=(e=h).length&&"function"==typeof e[e.length-1]?e.pop():a;if(Array.isArray(h[0])&&(h=h[0]),h.length<2)throw new o("streams");var c=h.map(function(e,i){var o,a,u,f,p,y,g=i<h.length-1;return o=i>0,u=a=function(e){t||(t=e),e&&c.forEach(l),g||(c.forEach(l),d(t))},f=!1,a=function(){f||(f=!0,u.apply(void 0,arguments))},p=!1,e.on("close",function(){p=!0}),void 0===n&&(n=r(90920)),n(e,{readable:g,writable:o},function(e){if(e)return a(e);p=!0,a()}),y=!1,function(t){if(!p&&!y){if(y=!0,e.setHeader&&"function"==typeof e.abort)return e.abort();if("function"==typeof e.destroy)return e.destroy();a(t||new s("pipe"))}}});return h.reduce(u)}},70301:(e,t,r)=>{"use strict";var n=r(40228).q.ERR_INVALID_OPT_VALUE;e.exports={getHighWaterMark:function(e,t,r,i){var o=null!=t.highWaterMark?t.highWaterMark:i?t[r]:null;if(null!=o){if(!(isFinite(o)&&Math.floor(o)===o)||o<0)throw new n(i?r:"highWaterMark",o);return Math.floor(o)}return e.objectMode?16:16384}}},22539:(e,t,r)=>{e.exports=r(76162)},28992:(e,t,r)=>{var n=r(76162);"disable"===process.env.READABLE_STREAM&&n?(e.exports=n.Readable,Object.assign(e.exports,n),e.exports.Stream=n):((t=e.exports=r(11733)).Stream=n||t,t.Readable=t,t.Writable=r(87390),t.Duplex=r(11175),t.Transform=r(55564),t.PassThrough=r(67003),t.finished=r(90920),t.pipeline=r(89121))},18243:(e,t,r)=>{var n=r(78893),i=n.Buffer;function o(e,t){for(var r in e)t[r]=e[r]}function s(e,t,r){return i(e,t,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?e.exports=n:(o(n,t),t.Buffer=s),s.prototype=Object.create(i.prototype),o(i,s),s.from=function(e,t,r){if("number"==typeof e)throw TypeError("Argument must not be a number");return i(e,t,r)},s.alloc=function(e,t,r){if("number"!=typeof e)throw TypeError("Argument must be a number");var n=i(e);return void 0!==t?"string"==typeof r?n.fill(t,r):n.fill(t):n.fill(0),n},s.allocUnsafe=function(e){if("number"!=typeof e)throw TypeError("Argument must be a number");return i(e)},s.allocUnsafeSlow=function(e){if("number"!=typeof e)throw TypeError("Argument must be a number");return n.SlowBuffer(e)}},34987:e=>{e.exports=function(e){var t=e._readableState;return t?t.objectMode||"number"==typeof e._duplexState?e.read():e.read(function(e){if(e.buffer.length){var t=e.bufferIndex||0;if(e.buffer.head)return e.buffer.head.data.length;if(e.buffer.length-t>0&&e.buffer[t])return e.buffer[t].length}return e.length}(t)):null}},81767:(e,t,r)=>{var n=r(76162),i=r(21764),o=n.Transform;function s(e){if(!(this instanceof s))return new s(e);this._toSkip=e.skip,o.call(this,e)}i.inherits(s,o),s.prototype._transform=function(e,t,r){0==this._toSkip?this.push(e):this._toSkip>e.length?this._toSkip-=e.length:(this._toSkip!==e.length&&this.push(e.slice(this._toSkip)),this._toSkip=0),r()},e.exports=s},80985:(e,t,r)=>{"use strict";var n=r(18243).Buffer,i=n.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function o(e){var t;switch(this.encoding=function(e){var t=function(e){var t;if(!e)return"utf8";for(;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"!=typeof t&&(n.isEncoding===i||!i(e)))throw Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=l,this.end=u,t=4;break;case"utf8":this.fillLast=a,t=4;break;case"base64":this.text=h,this.end=f,t=3;break;default:this.write=d,this.end=c;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(t)}function s(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function a(e){var t=this.lastTotal-this.lastNeed,r=function(e,t,r){if((192&t[0])!=128)return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if((192&t[1])!=128)return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&(192&t[2])!=128)return e.lastNeed=2,"�"}}(this,e,0);return void 0!==r?r:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):void(e.copy(this.lastChar,t,0,e.length),this.lastNeed-=e.length)}function l(e,t){if((e.length-t)%2==0){var r=e.toString("utf16le",t);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function u(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function h(e,t){var r=(e.length-t)%3;return 0===r?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}function f(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function d(e){return e.toString(this.encoding)}function c(e){return e&&e.length?this.write(e):""}t.s=o,o.prototype.write=function(e){var t,r;if(0===e.length)return"";if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<e.length?t?t+this.text(e,r):this.text(e,r):t||""},o.prototype.end=function(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"�":t},o.prototype.text=function(e,t){var r=function(e,t,r){var n=t.length-1;if(n<r)return 0;var i=s(t[n]);return i>=0?(i>0&&(e.lastNeed=i-1),i):--n<r||-2===i?0:(i=s(t[n]))>=0?(i>0&&(e.lastNeed=i-2),i):--n<r||-2===i?0:(i=s(t[n]))>=0?(i>0&&(2===i?i=0:e.lastNeed=i-3),i):0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var n=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,n),e.toString("utf8",t,n)},o.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}},1152:(e,t,r)=>{e.exports=r(21764).deprecate},50681:(e,t,r)=>{"use strict";r.d(t,{Ke:()=>Y});var n=r(76162),i=r(10930),o=r(84770),s=r(17702),a=r(32615),l=r(35240),u=r(54769),h=r(81767);function f(e,t){let r;let n=[];e.on("data",e=>n.push(e)),e.on("end",()=>{r||(r=!0,t(null,Buffer.concat(n)))}),e.on("error",e=>{r||(r=!0,t(e))})}function d(e){let t;return new n.Transform({transform(r,n,i){t&&(r=Buffer.concat([t,r]));let o=Math.floor(r.length/e)*e;o?r.length>o?(t=r.slice(o),this.push(r.slice(0,o))):(t=void 0,this.push(r)):t=t?Buffer.concat([t,r]):r,i()},flush(e){t&&this.push(t),e()}})}function c(e){let t;let r=new Promise((e,r)=>{t=(t,n)=>{t?r(t):e(n)}});return e&&r.then(t=>e(null,t),e),[t,r]}var p=class{constructor(e){if(16!==e.length)throw Error("Wrong key length. Key must be 128bit.");this.key=e}encryptCBC(e){let t=Buffer.alloc(16,0),r=o.createCipheriv("aes-128-cbc",this.key,t).setAutoPadding(!1),n=Buffer.concat([r.update(e),r.final()]);return n.copy(e),n}decryptCBC(e){let t=Buffer.alloc(16,0),r=o.createDecipheriv("aes-128-cbc",this.key,t).setAutoPadding(!1),n=Buffer.concat([r.update(e),r.final()]);return n.copy(e),n}stringhash(e){let t=[0,0,0,0];for(let r=0;r<e.length;r+=4)if(e.length-r<4){let n=e.length-r;t[r/4&3]^=e.readIntBE(r,n)<<(4-n)*8}else t[r/4&3]^=e.readInt32BE(r);let r=Buffer.allocUnsafe(16);for(let e=0;e<4;e++)r.writeInt32BE(t[e],4*e,!0);let n=o.createCipheriv("aes-128-ecb",this.key,Buffer.alloc(0));for(let e=16384;e--;)r=n.update(r);let i=Buffer.allocUnsafe(8);return r.copy(i,0,0,4),r.copy(i,4,8,12),i}encryptECB(e){let t=o.createCipheriv("aes-128-ecb",this.key,Buffer.alloc(0)).setAutoPadding(!1).update(e);return t.copy(e),t}decryptECB(e){let t=o.createDecipheriv("aes-128-ecb",this.key,Buffer.alloc(0)).setAutoPadding(!1).update(e);return t.copy(e),t}},y=class{constructor(e,t,r=0){this.key=e.key,this.nonce=t.slice(0,8);let n=Buffer.alloc(16);this.nonce.copy(n,0),0!==r&&this.incrementCTRBuffer(n,r/16),this.encrypt=e=>(this.encryptCipher=o.createCipheriv("aes-128-ctr",this.key,n),this.encrypt=this._encrypt,this.encrypt(e)),this.decrypt=e=>(this.decryptCipher=o.createDecipheriv("aes-128-ctr",this.key,n),this.decrypt=this._decrypt,this.decrypt(e))}_encrypt(e){return this.encryptCipher.update(e).copy(e),e}_decrypt(e){return this.decryptCipher.update(e).copy(e),e}incrementCTRBuffer(e,t){let r;let n=e.length,i=n-1;for(;0!==t;)r=(t+e[i])%256,t=Math.floor((t+e[i])/256),e[i]=r,(i-=1)<0&&(i=n-1)}},g=class{constructor(e,t){this.key=e.key,this.nonce=t.slice(0,8),this.macCipher=o.createCipheriv("aes-128-ecb",this.key,Buffer.alloc(0)),this.posNext=this.increment=131072,this.pos=0,this.macs=[],this.mac=Buffer.alloc(16),this.nonce.copy(this.mac,0),this.nonce.copy(this.mac,8)}condense(){this.mac&&(this.macs.push(this.mac),this.mac=void 0);let e=Buffer.alloc(16,0);for(let t of this.macs){for(let r=0;r<16;r++)e[r]^=t[r];e=this.macCipher.update(e)}let t=Buffer.allocUnsafe(8);return t.writeInt32BE(e.readInt32BE(0)^e.readInt32BE(4),0),t.writeInt32BE(e.readInt32BE(8)^e.readInt32BE(12),4),t}update(e){for(let t=0;t<e.length;t+=16){for(let r=0;r<16;r++)this.mac[r]^=e[t+r];this.mac=this.macCipher.update(this.mac),this.checkBounding()}}checkBounding(){this.pos+=16,this.pos>=this.posNext&&(this.macs.push(Buffer.from(this.mac)),this.nonce.copy(this.mac,0),this.nonce.copy(this.mac,8),this.increment<1048576&&(this.increment+=131072),this.posNext+=this.increment)}};function b(e){return"string"==typeof e?w(e):e}function m(e){return e.toString("base64").replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function w(e){return Buffer.from(e,"base64")}function v(e){return new p(_(e).slice(0,16))}function _(e){let t=Buffer.alloc(32);e.copy(t);for(let e=0;e<16;e++)t.writeUInt8(t.readUInt8(e)^t.readUInt8(16+e,!0),e);return t}var E={},S=Math.log(2);function k(e){let t=[];for(;e-- >0;)t[e]=0;return t}function R(e){let t=e.length;if(e[t-1])return e;for(;t>1&&0===e[t-1];)t--;return e.slice(0,t)}function A(e,t){let r;let n=e.length,i=t.length;if(i>n)return[];if(i===n){if(t[i-1]>e[i-1])return[];if(1===i)return[e[0]-t[0]]}let o=[],s=0;for(r=0;r<i;r++)s+=e[r]-t[r],o[r]=268435455&s,s>>=28;for(;r<n;r++)s+=e[r],o[r]=268435455&s,s>>=28;return s?[]:R(o)}function T(e,t,r,n,i){let o=16383&r,s=r>>14,a=16383&n,l=n>>14,u=s*a+l*o,h=o*a+((16383&u)<<14)+e[t]+i;return e[t]=268435455&h,i=s*l+(u>>14)+(h>>28)}function x(e,t){let r,n,i;let o=e.length,s=t.length,a=k(o+s-1);for(n=0;n<s;n++){for(i=0,r=0;i<o;i++)r=T(a,n+i,e[i],t[n],r);a[n+o]=r}return R(a)}function O(e,t,r){let n=0;for(;t>=0&&r-- >0;)n=268435456*n+e[t--];return n}function C(e,t){let r,n,i,o,s,a,l=e.length-1,u=t.length-1,h=l-u;if(l<u||l===u&&(e[l]<t[l]||l>0&&e[l]===t[l]&&e[l-1]<t[l-1]))return E.q=[0],E.mod=e,E;if(l===u&&O(e,u,2)/O(t,u,2)<4){for(r=e.concat(),n=0;0!==(i=A(r,t)).length;)r=i,n++;return E.q=[n],E.mod=r,E}let f=Math.floor(Math.log(t[u])/S)+1,d=28-f;r=e.concat();let c=t.concat();if(d){for(o=u;o>0;o--)c[o]=c[o]<<d&268435455|c[o-1]>>f;for(c[0]=c[0]<<d&268435455,r[l]&(268435455<<f&268435455)&&(r[++l]=0,h++),o=l;o>0;o--)r[o]=r[o]<<d&268435455|r[o-1]>>f;r[0]=r[0]<<d&268435455}let p=k(h+1),y=k(h).concat(c);for(;0!==(s=A(r,y)).length;)p[h]++,r=s;let g=c[u],b=O(c,u,2);for(o=l;o>u;o--){a=o-u-1,o>=r.length?p[a]=1:r[o]===g?p[a]=268435455:p[a]=Math.floor(O(r,o,2)/g);let e=O(r,o,3);for(;p[a]*b>e;)p[a]--;y=y.slice(1),0===(s=A(r,x([p[a]],y))).length&&(p[a]--,s=A(r,x([p[a]],y))),r=s}if(d){for(o=0;o<r.length-1;o++)r[o]=r[o]>>d|r[o+1]<<f&268435455;r[r.length-1]>>=d}return E.q=R(p),E.mod=R(r),E}function M(e,t){if(1===t.length){if(1===e.length)return[e[0]%t[0]];if(t[0]<16383)return[function(e,t){let r,n=0;for(let i=e.length-1;i>=0;i--)n=(((r=e[i])>>14)+(n<<14))%t,n=((16383&r)+(n<<14))%t;return n}(e,t[0])]}return C(e,t).mod}function P(e,t,r){let n;let i=e.length-(t.length<<1);if(i>0)return P(e.slice(0,i).concat(P(e.slice(i),t,r)),t,r);let o=t.length+1,s=t.length-1,a=x(e.slice(s),r).slice(o),l=e.slice(0,o),u=x(a,t).slice(0,o),h=A(l,u);0===h.length&&(l[o]=1,h=A(l,u));for(let e=0;0!==(n=A(h,t)).length;e++)if(h=n,e>=3)return P(h,t,r);return h}function I(e,t,r){var n;let i,o,s=e.concat(),a=t.length-1,l=2*r.length,u=k(l+1);for(u[l]=1,u=C(u,r).q,n=t[a],o=1,0!=(i=n>>>16)&&(n=i,o+=16),0!=(i=n>>8)&&(n=i,o+=8),0!=(i=n>>4)&&(n=i,o+=4),0!=(i=n>>2)&&(n=i,o+=2),0!=(i=n>>1)&&(n=i,o+=1),l=o-2;a>=0;a--){for(;l>=0;l-=1)s=P(function(e){let t,r;let n=e.length,i=k(2*n),o=0;for(t=0;t<n;t++){for(o=T(i,2*t,e[t],e[t],0),r=t+1;r<n;r++)o=T(i,t+r,2*e[r],e[t],o);i[t+n]=o}return R(i)}(s),r,u),t[a]&1<<l&&(s=P(x(s,e),r,u));l=27}return s}function B(e){let t,r=1,n=[0],i=0,o=256,s=e.length;if(s<2)return 0;let a=(s-2)*8,l=256*e.charCodeAt(0)+e.charCodeAt(1);if(l>a||l<a-8)return 0;for(let l=0;l<a;l++)(o<<=1)>255&&(o=1,t=e.charCodeAt(--s)),r>268435455&&(r=1,n[++i]=0),t&o&&(n[i]|=r),r<<=1;return n}function j(e,t){let r=function(e){let t,r=1,n=0,i=[0],o=1,s=0,a=28*e.length,l="";for(t=0;t<a;t++)e[n]&r&&(i[s]|=o),(o<<=1)>255&&(o=1,i[++s]=0),(r<<=1)>268435455&&(r=1,n++);for(;s>=0&&0===i[s];)s--;for(t=0;t<=s;t++)l=String.fromCharCode(i[t])+l;return l}(function(e,t,r,n,i){let o=I(M(e,r),M(t,A(r,[1])),r),s=I(M(e,n),M(t,A(n,[1])),n),a=A(s,o);return 0===a.length?(a=M(x(a=A(o,s),i),n),a=A(n,a)):a=M(x(a,i),n),function e(t,r){let n=t.length,i=r.length;if(n<i)return e(r,t);let o=[],s=0,a=0;for(;a<i;a++)s+=t[a]+r[a],o[a]=268435455&s,s>>>=28;for(;a<n;a++)s+=t[a],o[a]=268435455&s,s>>>=28;return s&&(o[a]=s),o}(x(a,r),o)}(B(e.toString("binary")),t[2],t[0],t[1],t[3]));return Buffer.from(r,"binary")}var L=globalThis.AbortController||u,N={1:"EINTERNAL (-1): An internal error has occurred. Please submit a bug report, detailing the exact circumstances in which this error occurred.",2:"EARGS (-2): You have passed invalid arguments to this command.",3:"EAGAIN (-3): A temporary congestion or server malfunction prevented your request from being processed. No data was altered. Retried 4 times.",4:"ERATELIMIT (-4): You have exceeded your command weight per time quota. Please wait a few seconds, then try again (this should never happen in sane real-life applications).",5:"EFAILED (-5): The upload failed. Please restart it from scratch.",6:"ETOOMANY (-6): Too many concurrent IP addresses are accessing this upload target URL.",7:"ERANGE (-7): The upload file packet is out of range or not starting and ending on a chunk boundary.",8:"EEXPIRED (-8): The upload target URL you are trying to access has expired. Please request a fresh one.",9:"ENOENT (-9): Object (typically, node or user) not found. Wrong password?",10:"ECIRCULAR (-10): Circular linkage attempted",11:"EACCESS (-11): Access violation (e.g., trying to write to a read-only share)",12:"EEXIST (-12): Trying to create an object that already exists",13:"EINCOMPLETE (-13): Trying to access an incomplete resource",14:"EKEY (-14): A decryption operation failed (never returned by the API)",15:"ESID (-15): Invalid or expired user session, please relogin",16:"EBLOCKED (-16): User blocked",17:"EOVERQUOTA (-17): Request over quota",18:"ETEMPUNAVAIL (-18): Resource temporarily not available, please try again later",19:"ETOOMANYCONNECTIONS (-19)",24:"EGOINGOVERQUOTA (-24)",25:"EROLLEDBACK (-25)",26:"EMFAREQUIRED (-26): Multi-Factor Authentication Required",27:"EMASTERONLY (-27)",28:"EBUSINESSPASTDUE (-28)",29:"EPAYWALL (-29): ODQ paywall state",400:"ETOOERR (-400)",401:"ESHAREROVERQUOTA (-401)"},D=new a.Agent({keepAlive:!0}),U=new l.Agent({keepAlive:!0}),q=class e extends s.EventEmitter{constructor(t,r={}){super(),this.keepalive=t,this.counterId=Math.random().toString().substr(2,10),this.gateway=r.gateway||"https://g.api.mega.co.nz/";let n=e.getShouldAvoidUA();this.userAgent=null===r.userAgent||n?null:`${r.userAgent||""} megajs/1.3.3`.trim(),this.httpAgent=r.httpAgent||D,this.httpsAgent=r.httpsAgent||U,this.fetch=r.fetch||this.defaultFetch.bind(this),this.closed=!1}async defaultFetch(t,r){if(r||(r={}),r.agent||(r.agent=e=>"http:"===e.protocol?this.httpAgent:this.httpsAgent),this.userAgent&&(r.headers||(r.headers={}),r.headers["user-agent"]||(r.headers["user-agent"]=this.userAgent)),!e.fetchModule){if("function"==typeof globalThis.fetch)e.fetchModule=globalThis.fetch.bind(globalThis);else throw Error("globalThis.fetch not found!")}return e.fetchModule(t,r)}request(e,t,r=0){let n="sml"===e.a;if(this.closed&&!n)throw Error("API is closed");let[i,o]=c(t),s={id:(this.counterId++).toString()};return this.sid&&(s.sid=this.sid),"object"==typeof e._querystring&&(Object.assign(s,e._querystring),delete e._querystring),this.fetch(`${this.gateway}cs?${new URLSearchParams(s)}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify([e])}).then(F).then(t=>{let o;if(!this.closed||n){if(!t)return i(Error("Empty response"));if(t.length&&(t=t[0]),"number"==typeof t&&t<0){if(-3===t&&r<4)return setTimeout(()=>{this.request(e,i,r+1)},1e3*Math.pow(2,r+1));o=Error(N[-t])}else this.keepalive&&t&&t.sn&&this.pull(t.sn);i(o,t)}}).catch(e=>{i(e)}),o}pull(t,r=0){let n=new L,i=e.handleForceHttps()?1:0;this.sn=n,this.fetch(`${this.gateway}sc?${new URLSearchParams({sn:t,ssl:i,sid:this.sid})}`,{method:"POST",signal:n.signal}).then(F).then(e=>{if(this.sn=void 0,!this.closed){if("number"==typeof e&&e<0){if(-3===e&&r<4)return setTimeout(()=>{this.pull(t,r+1)},1e3*Math.pow(2,r+1));this.emit("error",Error(N[-e]))}e.w?this.wait(e.w,t):e.sn&&(e.a&&this.emit("sc",e.a),this.pull(e.sn))}}).catch(W).catch(e=>{this.emit("error",e)})}wait(e,t){let r=new L;this.sn=r,this.fetch(e,{method:"POST",signal:r.signal}).catch(()=>{}).then(()=>{this.sn=void 0,this.pull(t)})}close(){this.sn&&this.sn.abort(),this.closed=!0}static getGlobalApi(){return e.globalApi||(e.globalApi=new e),e.globalApi}static handleForceHttps(e){return null!=e?e:!!globalThis.isSecureContext}static getShouldAvoidUA(){let e;try{globalThis.Headers()}catch(t){e=t.message}return!(38===(globalThis.fetch+"").length&&e.includes("Headers"))}};function F(e){if("Server Too Busy"===e.statusText)return -3;if(!e.ok)throw Error(`Server returned error: ${e.statusText}`);return e.json()}function W(e){if("AbortError"!==e.name)throw e}var $=["","red","orange","yellow","green","blue","purple","grey"],H=class e extends s.EventEmitter{constructor(e){if(super(),this.checkConstructorArgument(e.downloadId),this.checkConstructorArgument(e.key),this.checkConstructorArgument(e.loadedFile),this.downloadId=e.downloadId,this.key=e.key?b(e.key):null,this.type=e.directory?1:0,this.directory=!!e.directory,this.directory&&!this.children&&(this.children=[]),this.api=e.api||q.getGlobalApi(),!(this.api instanceof q))throw Error("api must be a instance of API");this.loadedFile=e.loadedFile}get createdAt(){if(void 0!==this.timestamp)return 1e3*this.timestamp}checkConstructorArgument(e){if("string"==typeof e&&!/^[\w-]+$/.test(e))throw Error(`Invalid argument: "${e}"`)}loadMetadata(e,t){if(this.size=t.s||0,this.timestamp=t.ts||0,this.type=t.t,this.directory=!!t.t,this.owner=t.u,this.name=null,this.directory&&this.children&&(this.children=[]),!e||!t.k)return;let r=t.k.split(":");this.key=b(r[r.length-1]),this.key.length<=32?e.decryptECB(this.key):this.storage?this.key=this.storage.decryptRsaKey(this.key).slice(0,this.directory?16:32):this.key=null,t.a&&this.decryptAttributes(t.a)}decryptAttributes(t){if(!this.key)return this;t=w(t),v(this.key).decryptCBC(t);let r=e.unpackAttributes(t);r&&this.parseAttributes(r)}parseAttributes(e){this.attributes=e,this.name=e.n,this.label=$[e.lbl||0],this.favorited=!!e.fav}loadAttributes(t){let[r,n]=c(t),i=this.directory?{a:"f",c:1,ca:1,r:1,_querystring:{n:this.downloadId}}:{a:"g",p:this.downloadId};return this.api.request(i,(t,n)=>{if(t)return r(t);if(this.directory){let t=Object.create(null),i=n.f,o=i.find(e=>e.k&&e.h===e.k.split(":")[0]),s=this.key?new p(this.key):null;for(let r of(this.nodeId=o.h,this.timestamp=o.ts,t[o.h]=this,i)){if(r===o)continue;let n=new e(r,this.storage);n.loadMetadata(s,r),n.downloadId=[this.downloadId,r.h],t[r.h]=n}for(let e of i){let r=t[e.p];if(r){let n=t[e.h];r.children.push(n),n.parent=r}}if(this.loadMetadata(s,o),this.key&&!this.attributes)return r(Error("Attributes could not be decrypted with provided key."));if(this.loadedFile){let e=t[this.loadedFile];void 0===e?r(Error("Node (file or folder) not found in folder")):r(null,e)}else r(null,this)}else{if(this.size=n.s,this.decryptAttributes(n.at),this.key&&!this.attributes)return r(Error("Attributes could not be decrypted with provided key."));r(null,this)}}),n}download(t,r){"function"==typeof t&&(r=t,t={}),t||(t={});let o=t.start||0,s=t.returnCiphertext?o:o-o%16,a=t.end||null,l=t.maxConnections||4,u=t.initialChunkSize||131072,c=t.chunkSizeIncrement||131072,p=t.maxChunkSize||1048576,m={a:"g",g:1,ssl:q.handleForceHttps(t.forceHttps)?2:0};if(this.nodeId?m.n=this.nodeId:Array.isArray(this.downloadId)?(m._querystring={n:this.downloadId[0]},m.n=this.downloadId[1]):m.p=this.downloadId,this.directory)throw Error("Can't download: folder download isn't supported");if(!this.key&&!t.returnCiphertext)throw Error("Can't download: key isn't defined");let w=this.key&&!t.returnCiphertext?function(e,t={}){let r=t.start||0;if(0!==r&&(t.disableVerification=!0),r%16!=0)throw Error("start argument of megaDecrypt must be a multiple of 16");(e=b(e))instanceof Buffer||(e=Buffer.from(e));let o=v(e),s=new y(o,e.slice(16),r),a=!t.disableVerification&&new g(o,e.slice(16)),l=new n.Transform({transform(e,t,r){let n=s.decrypt(e);a&&a.update(n),r(null,Buffer.from(n))},flush(r){if(a&&(l.mac=a.condense()),!t.disableVerification&&!l.mac.equals(e.slice(24))){r(Error("MAC verification failed"));return}r()}});return l=i(d(16),l)}(this.key,{start:s,disableVerification:0!==s||null!==a}):new n.PassThrough,_=s===o?w:w.pipe(new h({skip:o-s})),E=t.handleRetries||e.defaultHandleRetries;return this.api.request(m,(e,t)=>{if(e)return _.emit("error",e);if("string"!=typeof t.g||"http"!==t.g.substr(0,4))return _.emit("error",Error("MEGA servers returned an invalid response, maybe caused by rate limit"));if(0===t.s)return _.end();if(a||(a=t.s-1),o>a)return _.emit("error",Error("You can't download past the end of the file."));function r(e){if(200!==e.status){if(509===e.status){let t=e.headers.get("x-mega-time-left"),r=Error("Bandwidth limit reached: "+t+" seconds until it resets");r.timeLimit=t,_.emit("error",r);return}_.emit("error",Error("MEGA returned a "+e.status+" status code"))}}function n(e){_.emit("error",e)}let i=0;if(_.on("data",e=>{i+=e.length,_.emit("progress",{bytesLoaded:i,bytesTotal:t.s})}),1===l){let e=new L;_.on("close",()=>{e.abort()}),this.api.fetch(t.g+"/"+s+"-"+a,{signal:e.signal}).then(e=>{r(e);let t=e.body;if(t){if(t.pipe)e.body.pipe(w);else if(t.getReader){let e=t.getReader(),r=({done:t,value:n})=>{if(!t)return w.write(n),e.read().then(r);w.end()};e.read().then(r)}else throw Error("Single connection streaming not supported by fetch")}else throw Error("Missing response body")}).catch(n);return}let h={},f=0,d=0,y=!1,g=s,b=u;_.on("error",()=>{y=!0}),_.on("close",()=>{y=!0});let m=()=>{if(g>a){y=!0,f===d&&w.end();return}let e=g,i=Math.min(a,e+b-1),o=f++,s=0,l=()=>{s++,this.api.fetch(t.g+"/"+e+"-"+i).then(e=>(r(e),e.arrayBuffer())).then(e=>{let t=Buffer.from(e);h[o]=t,d===o&&v()},e=>{E(s,e,e=>{e?n(e):l()})})};l(),g=i+1,b<p&&(b+=c)},v=()=>{let e;for(;;){let t=h[d];if(!t||(e=!w.write(t),delete h[d],d++,e))break}y&&f===d&&w.end(),e?w.once("drain",v):m()};for(let e=0;e<l;e++)m()}),r&&f(_,r),_}downloadBuffer(e,t){let[r,n]=c(t);return this.download(e,r),n}link(e,t){1==arguments.length&&"function"==typeof e&&(t=e,e={noKey:!1});let[r,n]=c(t);"boolean"==typeof e&&(e={noKey:e});let i=`https://mega.nz/${this.directory?"folder":"file"}/${this.downloadId}`;return!e.noKey&&this.key&&(i+=`#${m(this.key)}`),!e.noKey&&this.loadedFile&&(i+=`/file/${this.loadedFile}`),r(null,i),n}find(e,t){if(!this.children)throw Error("You can only call .find on directories");if("string"==typeof e){let t=e;e=e=>e.name===t}else if(Array.isArray(e)){let t=e;e=e=>t.includes(e.name)}if("function"!=typeof e)throw Error("Query must be a file matching function, an array of valid file names or a string with a file name");return this.children.reduce((r,n)=>r||(e(n)?n:n.children&&t?n.find(e,t):null),null)}filter(e,t){if(!this.children)throw Error("You can only call .filter on directories");if("string"==typeof e){let t=e;e=e=>e.name===t}else if(Array.isArray(e)){let t=e;e=e=>t.includes(e.name)}if("function"!=typeof e)throw Error("Query must be a file matching function, an array of valid file names or a string with a file name");return this.children.reduce((r,n)=>(e(n)&&r.push(n),n.children&&t)?r.concat(n.filter(e,t)):r,[])}navigate(e){if(!this.children)throw Error("You can only call .navigate on directories");if("string"==typeof e)e=e.split("/");else if(!Array.isArray(e))throw Error("Query must be an array or a string");return e.reduce((e,t)=>e&&e.children&&e.children.find(e=>e.name===t),this)}static fromURL(t,r={}){if("object"==typeof t)return new e(t);let n=new URL(t);if("mega.nz"!==n.hostname&&"mega.co.nz"!==n.hostname)throw Error("Invalid URL: wrong hostname");if(!n.hash)throw Error("Invalid URL: no hash");if(null!==n.pathname.match(/\/(file|folder)\//)){let t=n.hash.substr(1).split("/file/"),i=n.pathname.substring(n.pathname.lastIndexOf("/")+1,n.pathname.length+1),o=t[0];if(i&&!o||!i&&o)throw Error("Invalid URL: too few arguments");return new e({downloadId:i,key:o,directory:n.pathname.indexOf("/folder/")>=0,loadedFile:t[1],...r})}{let t=n.hash.split("!");if("#"!==t[0]&&"#F"!==t[0])throw Error("Invalid URL: format not recognized");if(t.length<=1)throw Error("Invalid URL: too few arguments");if(t.length>=("#"===t[0]?4:5))throw Error("Invalid URL: too many arguments");return new e({downloadId:t[1],key:t[2],directory:"#F"===t[0],loadedFile:t[3],...r})}}static unpackAttributes(e){let t=0;for(;t<e.length&&e.readUInt8(t);)t++;if('MEGA{"'===(e=e.slice(0,t).toString()).substr(0,6))try{return JSON.parse(e.substr(4))}catch(e){}}static defaultHandleRetries(e,t,r){e>8?r(t):setTimeout(r,1e3*Math.pow(2,e))}},K={},V=class e extends H{constructor(e,t){if(super(e),this.storage=t,this.api=t.api,this.nodeId=e.h,this.timestamp=e.ts,this.type=e.t,this.directory=!!this.type,this.directory&&!this.children&&(this.children=[]),e.k){let r=e.k.split("/"),n=t.aes;for(let i of r){let r=i.split(":")[0];if(r===t.user){e.k=i;break}let o=t.shareKeys[r];if(o){e.k=i,(n=K[r])||(n=K[r]=new p(o));break}}this.loadMetadata(n,e)}}loadAttributes(){throw Error("This is not needed for files loaded from logged in sessions")}mkdir(t,r){if(!this.directory)throw Error("node isn't a directory");let[n,i]=c(r);if("string"==typeof t&&(t={name:t}),t.attributes||(t.attributes={}),t.name&&(t.attributes.n=t.name),!t.attributes.n)throw Error("file name is required");if(t.target||(t.target=this),t.key||(t.key=Buffer.from(globalThis.crypto.getRandomValues(new Uint8Array(16)))),16!==t.key.length)throw Error("wrong key length, must be 128bit");let o=t.key,s=e.packAttributes(t.attributes);v(o).encryptCBC(s);let a=Buffer.from(o);this.storage.aes.encryptECB(a);let l={a:"p",t:t.target.nodeId?t.target.nodeId:t.target,n:[{h:"xxxxxxxx",t:1,a:m(s),k:m(a)}]},u=z(this.storage.shareKeys,this);return u.length>0&&(l.cr=G(this.storage,[{nodeId:"xxxxxxxx",key:o}],u)),this.api.request(l,(e,t)=>{if(e)return n(e);let r=this.storage._importFile(t.f[0]);this.storage.emit("add",r),n(null,r)}),i}upload(t,r,n){let i;if(!this.directory)throw Error("node is not a directory");2==arguments.length&&"function"==typeof r&&([n,r]=[r,null]);let[o,s]=c(n);if("string"==typeof t&&(t={name:t}),t.attributes||(t.attributes={}),t.name&&(t.attributes.n=t.name),!t.attributes.n)throw Error("File name is required.");if(!("number"==typeof t.size&&t.size>=0)&&!(r&&"function"!=typeof r.pipe&&"number"==typeof r.length)&&!t.allowUploadBuffering)throw Error("Specify a file size or set allowUploadBuffering to true");t.target||(t.target=this);let a=b(t.key);a||(a=globalThis.crypto.getRandomValues(new Uint8Array(24))),a instanceof Buffer||(a=Buffer.from(a));let l=t.uploadCiphertext?32:24;if(a.length!==l)throw Error("Wrong key length. Key must be 192bit");t.uploadCiphertext&&(i=a,a=_(a).slice(0,24)),t.key=a;let u=[],h=(r,n,s,a)=>{if(r)return d(r);if(!s||0===s.length){d(Error("Server returned a invalid response while uploading"));return}let l=Number(s.toString());if(l<0){d(Error("Server returned error "+l+" while uploading"));return}if(u[n]=s,0!==n||i||(i=a.key),t.thumbnailImage&&!u[1]||t.previewImage&&!u[2]||!u[0])return;let h=e.packAttributes(t.attributes);v(i).encryptCBC(h);let c=Buffer.from(i);this.storage.aes.encryptECB(c);let p={h:m(u[0]),t:0,a:m(h),k:m(c)};1!==u.length&&(p.fa=u.slice(1).map((e,t)=>t+"*"+m(e)).filter(e=>e).join("/"));let y={a:"p",t:t.target.nodeId?t.target.nodeId:t.target,n:[p]},g=z(this.storage.shareKeys,this);g.length>0&&(y.cr=G(this.storage,[{nodeId:p.h,key:i}],g)),this.api.request(y,(e,t)=>{if(e)return d(e);let r=this.storage._importFile(t.f[0]);this.storage.emit("add",r),f.emit("complete",r),o&&o(null,r)})};t.thumbnailImage&&this._uploadAttribute(t,t.thumbnailImage,1,h),t.previewImage&&this._uploadAttribute(t,t.previewImage,2,h);let f=this._upload(t,r,0,h);function d(e){f.listenerCount("error")?f.emit("error",e):o(e)}return f.complete=s,f}_upload(e,t,r,o){let s=e.uploadCiphertext?new n.PassThrough:function(e,t={}){let r=t.start||0;if(0!==r)throw Error("Encryption cannot start midstream otherwise MAC verification will fail.");(e=b(e))||(e=globalThis.crypto.getRandomValues(new Uint8Array(24))),e instanceof Buffer||(e=Buffer.from(e));let o=new n.Transform({transform(e,t,r){l.update(e);let n=a.encrypt(e);r(null,Buffer.from(n))},flush(t){o.mac=l.condense(),o.key=function(e,t){let r=Buffer.alloc(32);e.copy(r),t.copy(r,24);for(let e=0;e<16;e++)r.writeUInt8(r.readUInt8(e)^r.readUInt8(16+e),e);return r}(e,o.mac),t()}});if(24!==e.length)throw Error("Wrong key length. Key must be 192bit.");let s=new p(e.slice(0,16)),a=new y(s,e.slice(16),r),l=new g(s,e.slice(16));return o=i(d(16),o)}(e.key),a=s,l=e.size;return t&&"function"!=typeof t.pipe&&(l=t.length,a.end(t)),null!=l?(0===l&&s.end(),this._uploadWithSize(a,l,s,r,e,o)):a=function(e,t){let r=[],i=0;return new n.Transform({transform(e,t,n){r.push(e),i+=e.length,n()},flush(n){t(i),function t(){for(;r.length;)if(!e.write(r.shift()))return e.once("drain",t);e.end(),n()}()}})}(a,t=>{this._uploadWithSize(a,t,s,r,e,o)}),t&&"function"==typeof t.pipe&&t.pipe(a),a}_uploadAttribute(e,t,r,i){let o=(t,o)=>{if(t)return i(t);let s=o.length,a=16*Math.ceil(s/16)-s;0!==a&&(o=Buffer.concat([o,Buffer.alloc(a)])),(e.handle?v(e.key):new p(e.key.slice(0,16))).encryptCBC(o);let l=new n.PassThrough;l.end(o),this._uploadWithSize(l,o.length,l,r,e,i)};if(t instanceof Buffer){o(null,t);return}f(t,o)}_uploadWithSize(e,t,r,n,i,o){let s,a,l,u,h;let f=q.handleForceHttps(i.forceHttps)?2:0,d=0===n?{a:"u",ssl:f,s:t,ms:0,r:0,e:0,v:2}:{a:"ufa",ssl:f,s:t};i.handle&&(d.h=i.handle);let c=0===n?i.initialChunkSize||131072:t,p=i.chunkSizeIncrement||131072,y=i.maxChunkSize||1048576,g=i.maxConnections||4,b=i.handleRetries||H.defaultHandleRetries,m=c,w=0,v=!1,_=0,E=0,S=()=>{u=Math.min(m,t-_),a=Buffer.alloc(u),w++,m<y&&(m+=p),h=0,s&&(s.copy(a),h=Math.min(s.length,u),s=s.length>u?s.slice(u):null),h===u?k():(v=!0,A())},k=()=>{let i=_,s=a,h=0,f=()=>{h++,this.api.fetch(l+"/"+(0===n?i:n-1),{method:"POST",body:s,headers:{"content-length":s.length}}).then(e=>{if(200!==e.status)throw Error("MEGA returned a "+e.status+" status code");return e.arrayBuffer()}).then(i=>{E+=s.length,e.emit("progress",{bytesLoaded:R,bytesUploaded:E,bytesTotal:t});let a=Buffer.from(i);a.length>0?(r.end(),process.nextTick(()=>{o(null,n,a,r)})):_<t&&!v&&S()},t=>{b(h,t,t=>{t?e.emit("error",t):f()})})};f(),a=null,(_+=u)<t&&!v&&w<g&&S()},R=0,A=()=>{for(;;){let e=r.read();if(null===e){r.once("readable",A);break}if(R+=e.length,e.copy(a,h),(h+=e.length)>=u){v=!1,s=e.slice(e.length-(h-u)),k();break}}};r.on("end",()=>{t&&R!==t&&e.emit("error",Error("Specified data size does not match: "+t+" !== "+R))}),this.api.request(d,(e,t)=>{if(e)return o(e);l=t.p,S()})}uploadAttribute(e,t,r){let[n,i]=c(r);if("string"==typeof e&&(e=["thumbnail","preview"].indexOf(e)),0!==e&&1!==e)throw Error("Invalid attribute type");return this._uploadAttribute({key:this.key,handle:this.nodeId},t,e+1,(t,r,i,o)=>{if(t)return n(t);let s={a:"pfa",n:this.nodeId,fa:e+"*"+m(i)};this.api.request(s,(e,t)=>{if(e)return n(e);n(null,this)})}),i}delete(e,t){return("function"==typeof e&&(t=e,e=void 0),void 0===e&&(e=this.parent===this.storage.trash),e)?this.api.request({a:"d",n:this.nodeId},t):this.moveTo(this.storage.trash,t)}moveTo(e,t){if("string"==typeof e&&(e=this.storage.files[e]),!(e instanceof H))throw Error("target must be a folder or a nodeId");let r={a:"m",n:this.nodeId,t:e.nodeId},n=z(this.storage.shareKeys,e);return n.length>0&&(r.cr=G(this.storage,[this],n)),this.api.request(r,t)}setAttributes(t,r){let[n,i]=c(r);Object.assign(this.attributes,t);let o=e.packAttributes(this.attributes);return v(this.key).encryptCBC(o),this.api.request({a:"a",n:this.nodeId,at:m(o)},e=>{this.parseAttributes(this.attributes),n(e)}),i}rename(e,t){return this.setAttributes({n:e},t)}setLabel(e,t){if("string"==typeof e&&(e=$.indexOf(e)),"number"!=typeof e||Math.floor(e)!==e||e<0||e>7)throw Error("label must be a integer between 0 and 7 or a valid label name");return this.setAttributes({lbl:e},t)}setFavorite(e,t){return this.setAttributes({fav:e?1:0},t)}link(e,t){1==arguments.length&&"function"==typeof e&&(t=e,e={noKey:!1}),"boolean"==typeof e&&(e={noKey:e}),e||(e={});let r=e.__folderKey;if(this.directory&&!r)return this.shareFolder(e,t);let[n,i]=c(t);return this.api.request({a:"l",n:this.nodeId},(t,i)=>{if(t)return n(t);let o=`https://mega.nz/${r?"folder":"file"}/${i}`;!e.noKey&&this.key&&(o+=`#${m(r||this.key)}`),n(null,o)}),i}shareFolder(e,t){if(!this.directory)throw Error("node isn't a folder");let r=this.nodeId,n=this.storage.shareKeys[r];if(n)return this.link(Object.assign({__folderKey:n},e),t);let i=b(e.key);i||(i=globalThis.crypto.getRandomValues(new Uint8Array(16))),i instanceof Buffer||(i=Buffer.from(i));let[o,s]=c(t);if(16!==i.length)return o(Error("share key must be 16 byte / 22 characters")),s;this.storage.shareKeys[r]=i;let a=Buffer.from(r+r);this.storage.aes.encryptECB(a);let l={a:"s2",n:r,s:[{u:"EXP",r:0}],ok:m(this.storage.aes.encryptECB(Buffer.from(i))),ha:m(a),cr:G(this.storage,this)};return this.api.request(l,t=>{if(t)return o(t);this.link(Object.assign({__folderKey:i},e),o)}),s}unshare(e){return this.directory?this.unshareFolder(e):this.api.request({a:"l",n:this.nodeId,d:1},e)}unshareFolder(e){if(!this.directory)throw Error("node isn't a folder");return delete this.storage.shareKeys[this.nodeId],this.api.request({a:"s2",n:this.nodeId,s:[{u:"EXP",r:""}]},e)}importFile(t,r){let[n,i]=c(r);if(!this.directory)throw Error("importFile can only be called on directories");if("string"==typeof t&&(t=H.fromURL(t)),!(t instanceof H))throw Error("First argument of importFile should be a File or a URL string");if(!t.key)return n(Error("Can't import files without encryption keys")),i;let o=(t,r)=>{if(t)return n(t);let i=e.packAttributes(r.attributes);v(r.key).encryptCBC(i);let o=Array.isArray(r.downloadId)?r.downloadId[1]:r.downloadId,s={a:"p",t:this.nodeId,n:[{ph:o,t:0,a:m(i),k:m(this.storage.aes.encryptECB(r.key))}]};this.api.request(s,(e,t)=>{if(e)return n(e);let r=this.storage._importFile(t.f[0]);this.storage.emit("add",r),n(null,r)})};return t.attributes?o(null,t):t.loadAttributes(o),i}static packAttributes(e){let t=JSON.stringify(e);t=Buffer.from(`MEGA${t}`);let r=Buffer.alloc(16*Math.ceil(t.length/16));return t.copy(r),r}};function G(e,t,r){let n=e.shareKeys;Array.isArray(t)||(t=function e(t){return[t].concat((t.children||[]).map(e).reduce((e,t)=>e.concat(t),[]))}(t)),r||(r=t.map(e=>z(n,e)).reduce((e,t)=>e.concat(t)).filter((e,t,r)=>t===r.indexOf(e)));let i=[r,t.map(e=>e.nodeId),[]];for(let e=r.length;e--;){let o=new p(n[r[e]]);for(let r=t.length;r--;){let n=Buffer.from(t[r].key);n&&(32===n.length||16===n.length)&&i[2].push(e,r,m(o.encryptECB(n)))}}return i}function z(e,t){let r=t.nodeId,n=t.parent,i=[];return e[r]&&i.push(r),n?i.concat(z(e,n)):i}var Y=class e extends s.EventEmitter{constructor(e,t){super(),1==arguments.length&&"function"==typeof e&&(t=e,e={});let[r,n]=c(t);this.ready=n,e.keepalive=void 0===e.keepalive||!!e.keepalive,e.autoload=void 0===e.autoload||!!e.autoload,e.autologin=void 0===e.autologin||!!e.autologin,this.api=new q(e.keepalive,e),this.files={},this.options=e,this.status="closed",e.autologin?this.login(r):process.nextTick(()=>{r(null,this)})}login(e){let[t,r]=c(e);if("string"!=typeof this.options.email)return process.nextTick(()=>{t(Error("starting a session without credentials isn't supported"))}),r;let n=()=>{this.status="ready",t(null,this),this.emit("ready",this)},i=e=>{this.api.request({a:"ug"},(t,r)=>{if(t)return e(t);this.name=r.name,this.user=r.u,this.options.autoload?this.reload(!0,t=>{if(t)return e(t);n()}):n()})};this.email=this.options.email.toLowerCase();let s=()=>{let e=new p(function(e){let t,r,n;let i=Buffer.from([147,196,103,227,125,176,199,164,209,190,63,129,1,82,203,86]);for(n=65536;n--;)for(r=0;r<e.length;r+=16){let n=Buffer.alloc(16);for(t=0;t<16;t+=4)t+r<e.length&&e.copy(n,t,t+r,t+r+4);i=o.createCipheriv("aes-128-ecb",n,Buffer.alloc(0)).setAutoPadding(!1).update(i)}return i}(Buffer.from(this.options.password))),t=m(e.stringhash(Buffer.from(this.email)));l({a:"us",user:this.email,uh:t},e)},a=e=>{!function(e,t,r){let n=Buffer.from(t.s,"base64");o.pbkdf2(e,n,1e5,32,"sha512",r)}(Buffer.from(this.options.password),e,(e,r)=>{if(e)return t(e);let n=new p(r.slice(0,16)),i=m(r.slice(16));l({a:"us",user:this.email,uh:i},n)})},l=(e,r)=>{delete this.options.password,this.options.secondFactorCode&&(e.mfa=this.options.secondFactorCode.toString()),this.api.request(e,(e,n)=>{if(e)return t(e);this.key=b(n.k),r.decryptECB(this.key),this.aes=new p(this.key);let o=b(n.csid),s=function(e){let t=[];for(let r=0;r<4;r++){let n=(256*e[0]+e[1]+7>>3)+2;if(t[r]=B(e.toString("binary").substr(0,n)),"number"==typeof t[r]){if(4!==r||e.length>=16)return!1;break}e=e.slice(n)}return t}(this.aes.decryptECB(b(n.privk)));if(!s)throw Error("invalid credentials");let a=m(j(o,s).slice(0,43));this.api.sid=this.sid=a,this.RSAPrivateKey=s,i(t)})};return this.api.request({a:"us0",user:this.email},(e,r)=>e?t(e):1===r.v?s():2===r.v?a(r):void t(Error("Account version not supported"))),this.status="connecting",r}reload(e,t){"function"==typeof e&&([e,t]=[t,e]);let[r,n]=c(t);return"connecting"!==this.status||e?(this.mounts=[],this.api.request({a:"f",c:1},(e,t)=>{if(e)return r(e);for(let e of(this.shareKeys=t.ok.reduce((e,t)=>{let r=t.h,n=this.aes.encryptECB(Buffer.from(r+r));return function(e,t){if(e.length!==t.length)return!1;let r=e.length,n=0;for(let i=0;i<r;i++)n|=e[i]^t[i];return 0===n}(b(t.ha),n)&&(e[r]=this.aes.decryptECB(b(t.k))),e},{}),t.f))if(e=this._importFile(e),void 0!==t.ph&&(e.shareId=t.ph.find(t=>t.h===e.nodeId)?.ph,e.shared=!!e.shareId,e.shared)){e.shareURL=`https://mega.nz/${e.directory?"folder":"file"}/${e.shareId}`;let t=e.directory?this.shareKeys[e.nodeId]:e.key;t&&(e.shareURL+="#"+m(t))}r(null,this.mounts)}),this.api.on("sc",e=>{let t={};e.forEach(e=>{if("u"===e.a){let t=this.files[e.n];t&&(t.timestamp=e.ts,t.decryptAttributes(e.at),t.emit("update"),this.emit("update",t))}else"d"===e.a?t[e.n]=!0:"t"===e.a&&e.t.f.forEach(e=>{let r=this.files[e.h];if(r){delete t[e.h];let n=r.parent;if(n.nodeId===e.p)return;n.children.splice(n.children.indexOf(r),1),r.parent=this.files[e.p],r.parent.children.push(r),r.emit("move",n),this.emit("move",r,n)}else this.emit("add",this._importFile(e))})}),Object.keys(t).forEach(e=>{let t=this.files[e],r=t.parent;r.children.splice(r.children.indexOf(t),1),this.emit("delete",t),t.emit("delete")})})):this.once("ready",()=>{this.reload(e,r)}),n}_importFile(e){if(!this.files[e.h]){let t=this.files[e.h]=new V(e,this);if(2===e.t&&(this.root=t,t.name="Cloud Drive"),4===e.t&&(this.trash=t,t.name="Rubbish Bin"),3===e.t&&(this.inbox=t,t.name="Inbox"),e.t>1&&this.mounts.push(t),e.p){let r=this.files[e.p];r&&(r.children.push(t),t.parent=r)}}return this.files[e.h]}mkdir(e,t){if("ready"!==this.status)throw Error("storage is not ready");return this.root.mkdir(e,t)}upload(e,t,r){if("ready"!==this.status)throw Error("storage is not ready");return this.root.upload(e,t,r)}find(e,t){if("ready"!==this.status)throw Error("storage is not ready");return this.root.find(e,t)}filter(e,t){if("ready"!==this.status)throw Error("storage is not ready");return this.root.filter(e,t)}navigate(e,t){if("ready"!==this.status)throw Error("storage is not ready");return this.root.navigate(e,t)}close(e){return this.status="closed",this.api.close(),this.api.request({a:"sml"},e)}getAccountInfo(e){let[t,r]=c(e);return this.api.request({a:"uq",strg:1,xfer:1,pro:1},(e,r)=>{e&&t(e);let n={};n.type=r.utype,n.spaceUsed=r.cstrg,n.spaceTotal=r.mstrg,n.downloadBandwidthTotal=r.mxfer||0x28000000000000,n.downloadBandwidthUsed=r.caxfer||0,n.sharedBandwidthUsed=r.csxfer||0,n.sharedBandwidthLimit=r.srvratio,t(null,n)}),r}toJSON(){return{key:m(this.key),sid:this.sid,name:this.name,user:this.user,options:this.options}}static fromJSON(t){let r=new e(Object.assign(t.options,{autoload:!1,autologin:!1}));return r.key=w(t.key),r.aes=new p(r.key),r.api.sid=r.sid=t.sid,r.name=t.name,r.user=t.user,r}decryptRsaKey(e){return j(e,this.RSAPrivateKey)}};H.fromURL}};
@@ -3,4 +3,4 @@
3
3
  lib: "${n}/_next/static/~partytown/"
4
4
  };
5
5
  `}}),(0,r.jsx)("script",{"data-partytown":"",dangerouslySetInnerHTML:{__html:e()}}),(o.worker||[]).map((e,n)=>{let{strategy:r,src:o,children:a,dangerouslySetInnerHTML:l,...u}=e,c={};if(o)c.src=o;else if(l&&l.__html)c.dangerouslySetInnerHTML={__html:l.__html};else if(a)c.dangerouslySetInnerHTML={__html:"string"==typeof a?a:Array.isArray(a)?a.join(""):""};else throw Error("Invalid usage of next/script. Did you forget to include a src attribute or an inline script? https://nextjs.org/docs/messages/invalid-script");return(0,i.createElement)("script",{...c,...u,type:"text/partytown",key:o||n,nonce:t.nonce,"data-nscript":"worker",crossOrigin:t.crossOrigin||s})})]})}catch(e){return(0,l.default)(e)&&"MODULE_NOT_FOUND"!==e.code&&console.warn(`Warning: ${e.message}`),null}}(e,t),u=(n.beforeInteractive||[]).filter(e=>e.src).map((e,n)=>{let{strategy:r,...a}=e;return(0,i.createElement)("script",{...a,key:a.src||n,defer:a.defer??!o,nonce:t.nonce,"data-nscript":"beforeInteractive",crossOrigin:t.crossOrigin||s})});return(0,r.jsxs)(r.Fragment,{children:[a,u]})}class y extends i.default.Component{static #e=this.contextType=u.HtmlContext;getCssLinks(e){let{assetPrefix:t,assetQueryString:n,dynamicImports:i,crossOrigin:o,optimizeCss:s,optimizeFonts:a}=this.context,l=e.allFiles.filter(e=>e.endsWith(".css")),u=new Set(e.sharedFiles),p=new Set([]),f=Array.from(new Set(i.filter(e=>e.endsWith(".css"))));if(f.length){let e=new Set(l);p=new Set(f=f.filter(t=>!(e.has(t)||u.has(t)))),l.push(...f)}let d=[];return l.forEach(e=>{let i=u.has(e);s||d.push((0,r.jsx)("link",{nonce:this.props.nonce,rel:"preload",href:`${t}/_next/${(0,c.encodeURIPath)(e)}${n}`,as:"style",crossOrigin:this.props.crossOrigin||o},`${e}-preload`));let a=p.has(e);d.push((0,r.jsx)("link",{nonce:this.props.nonce,rel:"stylesheet",href:`${t}/_next/${(0,c.encodeURIPath)(e)}${n}`,crossOrigin:this.props.crossOrigin||o,"data-n-g":a?void 0:i?"":void 0,"data-n-p":a?void 0:i?void 0:""},e))}),a&&(d=this.makeStylesheetInert(d)),0===d.length?null:d}getPreloadDynamicChunks(){let{dynamicImports:e,assetPrefix:t,assetQueryString:n,crossOrigin:i}=this.context;return e.map(e=>e.endsWith(".js")?(0,r.jsx)("link",{rel:"preload",href:`${t}/_next/${(0,c.encodeURIPath)(e)}${n}`,as:"script",nonce:this.props.nonce,crossOrigin:this.props.crossOrigin||i},e):null).filter(Boolean)}getPreloadMainLinks(e){let{assetPrefix:t,assetQueryString:n,scriptLoader:i,crossOrigin:o}=this.context,s=e.allFiles.filter(e=>e.endsWith(".js"));return[...(i.beforeInteractive||[]).map(e=>(0,r.jsx)("link",{nonce:this.props.nonce,rel:"preload",href:e.src,as:"script",crossOrigin:this.props.crossOrigin||o},e.src)),...s.map(e=>(0,r.jsx)("link",{nonce:this.props.nonce,rel:"preload",href:`${t}/_next/${(0,c.encodeURIPath)(e)}${n}`,as:"script",crossOrigin:this.props.crossOrigin||o},e))]}getBeforeInteractiveInlineScripts(){let{scriptLoader:e}=this.context,{nonce:t,crossOrigin:n}=this.props;return(e.beforeInteractive||[]).filter(e=>!e.src&&(e.dangerouslySetInnerHTML||e.children)).map((e,r)=>{let{strategy:o,children:s,dangerouslySetInnerHTML:a,src:l,...u}=e,c="";return a&&a.__html?c=a.__html:s&&(c="string"==typeof s?s:Array.isArray(s)?s.join(""):""),(0,i.createElement)("script",{...u,dangerouslySetInnerHTML:{__html:c},key:u.id||r,nonce:t,"data-nscript":"beforeInteractive",crossOrigin:n||void 0})})}getDynamicChunks(e){return _(this.context,this.props,e)}getPreNextScripts(){return E(this.context,this.props)}getScripts(e){return g(this.context,this.props,e)}getPolyfillScripts(){return h(this.context,this.props)}makeStylesheetInert(e){return i.default.Children.map(e,e=>{var t,n;if((null==e?void 0:e.type)==="link"&&(null==e?void 0:null==(t=e.props)?void 0:t.href)&&o.OPTIMIZED_FONT_PROVIDERS.some(({url:t})=>{var n,r;return null==e?void 0:null==(r=e.props)?void 0:null==(n=r.href)?void 0:n.startsWith(t)})){let t={...e.props||{},"data-href":e.props.href,href:void 0};return i.default.cloneElement(e,t)}if(null==e?void 0:null==(n=e.props)?void 0:n.children){let t={...e.props||{},children:this.makeStylesheetInert(e.props.children)};return i.default.cloneElement(e,t)}return e}).filter(Boolean)}render(){let{styles:e,ampPath:t,inAmpMode:o,hybridAmp:s,canonicalBase:a,__NEXT_DATA__:l,dangerousAsPath:u,headTags:p,unstable_runtimeJS:f,unstable_JsPreload:h,disableOptimizedLoading:_,optimizeCss:g,optimizeFonts:E,assetPrefix:y,nextFontManifest:S}=this.context,I=!1===f,T=!1===h||!_;this.context.docComponentsRendered.Head=!0;let{head:P}=this.context,O=[],x=[];P&&(P.forEach(e=>{let t;this.context.strictNextHead&&(t=i.default.createElement("meta",{name:"next-head",content:"1"})),e&&"link"===e.type&&"preload"===e.props.rel&&"style"===e.props.as?(t&&O.push(t),O.push(e)):e&&(t&&("meta"!==e.type||!e.props.charSet)&&x.push(t),x.push(e))}),P=O.concat(x));let b=i.default.Children.toArray(this.props.children).filter(Boolean);E&&!o&&(b=this.makeStylesheetInert(b));let N=!1,j=!1;P=i.default.Children.map(P||[],e=>{if(!e)return e;let{type:t,props:n}=e;if(o){let r="";if("meta"===t&&"viewport"===n.name?r='name="viewport"':"link"===t&&"canonical"===n.rel?j=!0:"script"===t&&(n.src&&-1>n.src.indexOf("ampproject")||n.dangerouslySetInnerHTML&&(!n.type||"text/javascript"===n.type))&&(r="<script",Object.keys(n).forEach(e=>{r+=` ${e}="${n[e]}"`}),r+="/>"),r)return console.warn(`Found conflicting amp tag "${e.type}" with conflicting prop ${r} in ${l.page}. https://nextjs.org/docs/messages/conflicting-amp-tag`),null}else"link"===t&&"amphtml"===n.rel&&(N=!0);return e});let v=d(this.context.buildManifest,this.context.__NEXT_DATA__.page,o),R=function(e,t,n=""){if(!e)return{preconnect:null,preload:null};let i=e.pages["/_app"],o=e.pages[t],s=Array.from(new Set([...i??[],...o??[]]));return{preconnect:0===s.length&&(i||o)?(0,r.jsx)("link",{"data-next-font":e.pagesUsingSizeAdjust?"size-adjust":"",rel:"preconnect",href:"/",crossOrigin:"anonymous"}):null,preload:s?s.map(e=>{let t=/\.(woff|woff2|eot|ttf|otf)$/.exec(e)[1];return(0,r.jsx)("link",{rel:"preload",href:`${n}/_next/${(0,c.encodeURIPath)(e)}`,as:"font",type:`font/${t}`,crossOrigin:"anonymous","data-next-font":e.includes("-s")?"size-adjust":""},e)}):null}}(S,u,y);return(0,r.jsxs)("head",{...function(e){let{crossOrigin:t,nonce:n,...r}=e;return r}(this.props),children:[this.context.isDevelopment&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("style",{"data-next-hide-fouc":!0,"data-ampdevmode":o?"true":void 0,dangerouslySetInnerHTML:{__html:"body{display:none}"}}),(0,r.jsx)("noscript",{"data-next-hide-fouc":!0,"data-ampdevmode":o?"true":void 0,children:(0,r.jsx)("style",{dangerouslySetInnerHTML:{__html:"body{display:block}"}})})]}),P,this.context.strictNextHead?null:(0,r.jsx)("meta",{name:"next-head-count",content:i.default.Children.count(P||[]).toString()}),b,E&&(0,r.jsx)("meta",{name:"next-font-preconnect"}),R.preconnect,R.preload,o&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("meta",{name:"viewport",content:"width=device-width,minimum-scale=1,initial-scale=1"}),!j&&(0,r.jsx)("link",{rel:"canonical",href:a+n(50733).cleanAmpPath(u)}),(0,r.jsx)("link",{rel:"preload",as:"script",href:"https://cdn.ampproject.org/v0.js"}),(0,r.jsx)(m,{styles:e}),(0,r.jsx)("style",{"amp-boilerplate":"",dangerouslySetInnerHTML:{__html:"body{-webkit-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-moz-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-ms-animation:-amp-start 8s steps(1,end) 0s 1 normal both;animation:-amp-start 8s steps(1,end) 0s 1 normal both}@-webkit-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-moz-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-ms-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-o-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}"}}),(0,r.jsx)("noscript",{children:(0,r.jsx)("style",{"amp-boilerplate":"",dangerouslySetInnerHTML:{__html:"body{-webkit-animation:none;-moz-animation:none;-ms-animation:none;animation:none}"}})}),(0,r.jsx)("script",{async:!0,src:"https://cdn.ampproject.org/v0.js"})]}),!o&&(0,r.jsxs)(r.Fragment,{children:[!N&&s&&(0,r.jsx)("link",{rel:"amphtml",href:a+(t||`${u}${u.includes("?")?"&":"?"}amp=1`)}),this.getBeforeInteractiveInlineScripts(),!g&&this.getCssLinks(v),!g&&(0,r.jsx)("noscript",{"data-n-css":this.props.nonce??""}),!I&&!T&&this.getPreloadDynamicChunks(),!I&&!T&&this.getPreloadMainLinks(v),!_&&!I&&this.getPolyfillScripts(),!_&&!I&&this.getPreNextScripts(),!_&&!I&&this.getDynamicChunks(v),!_&&!I&&this.getScripts(v),g&&this.getCssLinks(v),g&&(0,r.jsx)("noscript",{"data-n-css":this.props.nonce??""}),this.context.isDevelopment&&(0,r.jsx)("noscript",{id:"__next_css__DO_NOT_USE__"}),e||null]}),i.default.createElement(i.default.Fragment,{},...p||[])]})}}class S extends i.default.Component{static #e=this.contextType=u.HtmlContext;getDynamicChunks(e){return _(this.context,this.props,e)}getPreNextScripts(){return E(this.context,this.props)}getScripts(e){return g(this.context,this.props,e)}getPolyfillScripts(){return h(this.context,this.props)}static getInlineScriptSource(e){let{__NEXT_DATA__:t,largePageDataBytes:r}=e;try{let i=JSON.stringify(t);if(f.has(t.page))return(0,a.htmlEscapeJsonString)(i);let o=Buffer.from(i).byteLength,s=n(95955).Z;return r&&o>r&&(f.add(t.page),console.warn(`Warning: data for page "${t.page}"${t.page===e.dangerousAsPath?"":` (path "${e.dangerousAsPath}")`} is ${s(o)} which exceeds the threshold of ${s(r)}, this amount of data can reduce performance.
6
- See more info here: https://nextjs.org/docs/messages/large-page-data`)),(0,a.htmlEscapeJsonString)(i)}catch(e){if((0,l.default)(e)&&-1!==e.message.indexOf("circular structure"))throw Error(`Circular structure in "getInitialProps" result of page "${t.page}". https://nextjs.org/docs/messages/circular-structure`);throw e}}render(){let{assetPrefix:e,inAmpMode:t,buildManifest:n,unstable_runtimeJS:i,docComponentsRendered:o,assetQueryString:s,disableOptimizedLoading:a,crossOrigin:l}=this.context,u=!1===i;if(o.NextScript=!0,t)return null;let p=d(this.context.buildManifest,this.context.__NEXT_DATA__.page,t);return(0,r.jsxs)(r.Fragment,{children:[!u&&n.devFiles?n.devFiles.map(t=>(0,r.jsx)("script",{src:`${e}/_next/${(0,c.encodeURIPath)(t)}${s}`,nonce:this.props.nonce,crossOrigin:this.props.crossOrigin||l},t)):null,u?null:(0,r.jsx)("script",{id:"__NEXT_DATA__",type:"application/json",nonce:this.props.nonce,crossOrigin:this.props.crossOrigin||l,dangerouslySetInnerHTML:{__html:S.getInlineScriptSource(this.context)}}),a&&!u&&this.getPolyfillScripts(),a&&!u&&this.getPreNextScripts(),a&&!u&&this.getDynamicChunks(p),a&&!u&&this.getScripts(p)]})}}function I(e){let{inAmpMode:t,docComponentsRendered:n,locale:o,scriptLoader:s,__NEXT_DATA__:a}=(0,u.useHtmlContext)();return n.Html=!0,function(e,t,n){var r,o,s,a;if(!n.children)return;let l=[],u=Array.isArray(n.children)?n.children:[n.children],c=null==(o=u.find(e=>e.type===y))?void 0:null==(r=o.props)?void 0:r.children,p=null==(a=u.find(e=>"body"===e.type))?void 0:null==(s=a.props)?void 0:s.children,f=[...Array.isArray(c)?c:[c],...Array.isArray(p)?p:[p]];i.default.Children.forEach(f,t=>{var n;if(t&&(null==(n=t.type)?void 0:n.__nextScript)){if("beforeInteractive"===t.props.strategy){e.beforeInteractive=(e.beforeInteractive||[]).concat([{...t.props}]);return}if(["lazyOnload","afterInteractive","worker"].includes(t.props.strategy)){l.push(t.props);return}}}),t.scriptLoader=l}(s,a,e),(0,r.jsx)("html",{...e,lang:e.lang||o||void 0,amp:t?"":void 0,"data-ampdevmode":void 0})}function T(){let{docComponentsRendered:e}=(0,u.useHtmlContext)();return e.Main=!0,(0,r.jsx)("next-js-internal-body-render-target",{})}class P extends i.default.Component{static getInitialProps(e){return e.defaultGetInitialProps(e)}render(){return(0,r.jsxs)(I,{children:[(0,r.jsx)(y,{}),(0,r.jsxs)("body",{children:[(0,r.jsx)(T,{}),(0,r.jsx)(S,{})]})]})}}P[o.NEXT_BUILTIN_DOCUMENT]=function(){return(0,r.jsxs)(I,{children:[(0,r.jsx)(y,{}),(0,r.jsxs)("body",{children:[(0,r.jsx)(T,{}),(0,r.jsx)(S,{})]})]})}},45104:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{APP_BUILD_MANIFEST:function(){return E},APP_CLIENT_INTERNALS:function(){return K},APP_PATHS_MANIFEST:function(){return m},APP_PATH_ROUTES_MANIFEST:function(){return _},AUTOMATIC_FONT_OPTIMIZATION_MANIFEST:function(){return M},BARREL_OPTIMIZATION_PREFIX:function(){return B},BLOCKED_PAGES:function(){return F},BUILD_ID_FILE:function(){return w},BUILD_MANIFEST:function(){return g},CLIENT_PUBLIC_FILES_PATH:function(){return D},CLIENT_REFERENCE_MANIFEST:function(){return W},CLIENT_STATIC_FILES_PATH:function(){return U},CLIENT_STATIC_FILES_RUNTIME_AMP:function(){return q},CLIENT_STATIC_FILES_RUNTIME_MAIN:function(){return V},CLIENT_STATIC_FILES_RUNTIME_MAIN_APP:function(){return X},CLIENT_STATIC_FILES_RUNTIME_POLYFILLS:function(){return Q},CLIENT_STATIC_FILES_RUNTIME_POLYFILLS_SYMBOL:function(){return ee},CLIENT_STATIC_FILES_RUNTIME_REACT_REFRESH:function(){return Z},CLIENT_STATIC_FILES_RUNTIME_WEBPACK:function(){return J},COMPILER_INDEXES:function(){return o},COMPILER_NAMES:function(){return i},CONFIG_FILES:function(){return C},DEFAULT_RUNTIME_WEBPACK:function(){return et},DEFAULT_SANS_SERIF_FONT:function(){return el},DEFAULT_SERIF_FONT:function(){return ea},DEV_CLIENT_PAGES_MANIFEST:function(){return j},DEV_MIDDLEWARE_MANIFEST:function(){return R},EDGE_RUNTIME_WEBPACK:function(){return en},EDGE_UNSUPPORTED_NODE_APIS:function(){return ed},EXPORT_DETAIL:function(){return P},EXPORT_MARKER:function(){return T},FUNCTIONS_CONFIG_MANIFEST:function(){return y},GOOGLE_FONT_PROVIDER:function(){return eo},IMAGES_MANIFEST:function(){return b},INTERCEPTION_ROUTE_REWRITE_MANIFEST:function(){return Y},MIDDLEWARE_BUILD_MANIFEST:function(){return G},MIDDLEWARE_MANIFEST:function(){return v},MIDDLEWARE_REACT_LOADABLE_MANIFEST:function(){return z},MODERN_BROWSERSLIST_TARGET:function(){return r.default},NEXT_BUILTIN_DOCUMENT:function(){return $},NEXT_FONT_MANIFEST:function(){return I},OPTIMIZED_FONT_PROVIDERS:function(){return es},PAGES_MANIFEST:function(){return h},PHASE_DEVELOPMENT_SERVER:function(){return p},PHASE_EXPORT:function(){return l},PHASE_INFO:function(){return d},PHASE_PRODUCTION_BUILD:function(){return u},PHASE_PRODUCTION_SERVER:function(){return c},PHASE_TEST:function(){return f},PRERENDER_MANIFEST:function(){return O},REACT_LOADABLE_MANIFEST:function(){return A},ROUTES_MANIFEST:function(){return x},RSC_MODULE_TYPES:function(){return ef},SERVER_DIRECTORY:function(){return L},SERVER_FILES_MANIFEST:function(){return N},SERVER_PROPS_ID:function(){return ei},SERVER_REFERENCE_MANIFEST:function(){return H},STATIC_PROPS_ID:function(){return er},STATIC_STATUS_PAGES:function(){return eu},STRING_LITERAL_DROP_BUNDLE:function(){return k},SUBRESOURCE_INTEGRITY_MANIFEST:function(){return S},SYSTEM_ENTRYPOINTS:function(){return eh},TRACE_OUTPUT_VERSION:function(){return ec},TURBO_TRACE_DEFAULT_MEMORY_LIMIT:function(){return ep},UNDERSCORE_NOT_FOUND_ROUTE:function(){return s},UNDERSCORE_NOT_FOUND_ROUTE_ENTRY:function(){return a}});let r=n(50167)._(n(60979)),i={client:"client",server:"server",edgeServer:"edge-server"},o={[i.client]:0,[i.server]:1,[i.edgeServer]:2},s="/_not-found",a=""+s+"/page",l="phase-export",u="phase-production-build",c="phase-production-server",p="phase-development-server",f="phase-test",d="phase-info",h="pages-manifest.json",m="app-paths-manifest.json",_="app-path-routes-manifest.json",g="build-manifest.json",E="app-build-manifest.json",y="functions-config-manifest.json",S="subresource-integrity-manifest",I="next-font-manifest",T="export-marker.json",P="export-detail.json",O="prerender-manifest.json",x="routes-manifest.json",b="images-manifest.json",N="required-server-files.json",j="_devPagesManifest.json",v="middleware-manifest.json",R="_devMiddlewareManifest.json",A="react-loadable-manifest.json",M="font-manifest.json",L="server",C=["next.config.js","next.config.mjs"],w="BUILD_ID",F=["/_document","/_app","/_error"],D="public",U="static",k="__NEXT_DROP_CLIENT_FILE__",$="__NEXT_BUILTIN_DOCUMENT__",B="__barrel_optimize__",W="client-reference-manifest",H="server-reference-manifest",G="middleware-build-manifest",z="middleware-react-loadable-manifest",Y="interception-route-rewrite-manifest",V="main",X=""+V+"-app",K="app-pages-internals",Z="react-refresh",q="amp",J="webpack",Q="polyfills",ee=Symbol(Q),et="webpack-runtime",en="edge-runtime-webpack",er="__N_SSG",ei="__N_SSP",eo="https://fonts.googleapis.com/",es=[{url:eo,preconnect:"https://fonts.gstatic.com"},{url:"https://use.typekit.net",preconnect:"https://use.typekit.net"}],ea={name:"Times New Roman",xAvgCharWidth:821,azAvgWidth:854.3953488372093,unitsPerEm:2048},el={name:"Arial",xAvgCharWidth:904,azAvgWidth:934.5116279069767,unitsPerEm:2048},eu=["/500"],ec=1,ep=6e3,ef={client:"client",server:"server"},ed=["clearImmediate","setImmediate","BroadcastChannel","ByteLengthQueuingStrategy","CompressionStream","CountQueuingStrategy","DecompressionStream","DomException","MessageChannel","MessageEvent","MessagePort","ReadableByteStreamController","ReadableStreamBYOBRequest","ReadableStreamDefaultController","TransformStreamDefaultController","WritableStreamDefaultController"],eh=new Set([V,Z,q,X]);("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},8584:(e,t)=>{function n(e){return e.split("/").map(e=>encodeURIComponent(e)).join("/")}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"encodeURIPath",{enumerable:!0,get:function(){return n}})},58299:(e,t)=>{function n(e){return Object.prototype.toString.call(e)}function r(e){if("[object Object]"!==n(e))return!1;let t=Object.getPrototypeOf(e);return null===t||t.hasOwnProperty("isPrototypeOf")}Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{getObjectClassLabel:function(){return n},isPlainObject:function(){return r}})},60979:e=>{e.exports=["chrome 64","edge 79","firefox 67","opera 51","safari 12"]},75876:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"denormalizePagePath",{enumerable:!0,get:function(){return o}});let r=n(72189),i=n(24212);function o(e){let t=(0,i.normalizePathSep)(e);return t.startsWith("/index/")&&!(0,r.isDynamicRoute)(t)?t.slice(6):"/index"!==t?t:"/"}},75078:(e,t)=>{function n(e){return e.startsWith("/")?e:"/"+e}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"ensureLeadingSlash",{enumerable:!0,get:function(){return n}})},49431:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"normalizePagePath",{enumerable:!0,get:function(){return s}});let r=n(75078),i=n(72189),o=n(45782);function s(e){let t=/^\/index(\/|$)/.test(e)&&!(0,i.isDynamicRoute)(e)?"/index"+e:"/"===e?"/index":(0,r.ensureLeadingSlash)(e);{let{posix:e}=n(71017),r=e.normalize(t);if(r!==t)throw new o.NormalizeError("Requested and resolved page mismatch: "+t+" "+r)}return t}},24212:(e,t)=>{function n(e){return e.replace(/\\/g,"/")}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"normalizePathSep",{enumerable:!0,get:function(){return n}})},42340:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{normalizeAppPath:function(){return o},normalizeRscURL:function(){return s}});let r=n(75078),i=n(73737);function o(e){return(0,r.ensureLeadingSlash)(e.split("/").reduce((e,t,n,r)=>!t||(0,i.isGroupSegment)(t)||"@"===t[0]||("page"===t||"route"===t)&&n===r.length-1?e:e+"/"+t,""))}function s(e){return e.replace(/\.rsc($|\?)/,"$1")}},72189:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{getSortedRoutes:function(){return r.getSortedRoutes},isDynamicRoute:function(){return i.isDynamicRoute}});let r=n(317),i=n(31735)},31735:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"isDynamicRoute",{enumerable:!0,get:function(){return o}});let r=n(92407),i=/\/\[[^/]+?\](?=\/|$)/;function o(e){return(0,r.isInterceptionRouteAppPath)(e)&&(e=(0,r.extractInterceptionRouteInformation)(e).interceptedRoute),i.test(e)}},317:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getSortedRoutes",{enumerable:!0,get:function(){return r}});class n{insert(e){this._insert(e.split("/").filter(Boolean),[],!1)}smoosh(){return this._smoosh()}_smoosh(e){void 0===e&&(e="/");let t=[...this.children.keys()].sort();null!==this.slugName&&t.splice(t.indexOf("[]"),1),null!==this.restSlugName&&t.splice(t.indexOf("[...]"),1),null!==this.optionalRestSlugName&&t.splice(t.indexOf("[[...]]"),1);let n=t.map(t=>this.children.get(t)._smoosh(""+e+t+"/")).reduce((e,t)=>[...e,...t],[]);if(null!==this.slugName&&n.push(...this.children.get("[]")._smoosh(e+"["+this.slugName+"]/")),!this.placeholder){let t="/"===e?"/":e.slice(0,-1);if(null!=this.optionalRestSlugName)throw Error('You cannot define a route with the same specificity as a optional catch-all route ("'+t+'" and "'+t+"[[..."+this.optionalRestSlugName+']]").');n.unshift(t)}return null!==this.restSlugName&&n.push(...this.children.get("[...]")._smoosh(e+"[..."+this.restSlugName+"]/")),null!==this.optionalRestSlugName&&n.push(...this.children.get("[[...]]")._smoosh(e+"[[..."+this.optionalRestSlugName+"]]/")),n}_insert(e,t,r){if(0===e.length){this.placeholder=!1;return}if(r)throw Error("Catch-all must be the last part of the URL.");let i=e[0];if(i.startsWith("[")&&i.endsWith("]")){let n=i.slice(1,-1),s=!1;if(n.startsWith("[")&&n.endsWith("]")&&(n=n.slice(1,-1),s=!0),n.startsWith("...")&&(n=n.substring(3),r=!0),n.startsWith("[")||n.endsWith("]"))throw Error("Segment names may not start or end with extra brackets ('"+n+"').");if(n.startsWith("."))throw Error("Segment names may not start with erroneous periods ('"+n+"').");function o(e,n){if(null!==e&&e!==n)throw Error("You cannot use different slug names for the same dynamic path ('"+e+"' !== '"+n+"').");t.forEach(e=>{if(e===n)throw Error('You cannot have the same slug name "'+n+'" repeat within a single dynamic path');if(e.replace(/\W/g,"")===i.replace(/\W/g,""))throw Error('You cannot have the slug names "'+e+'" and "'+n+'" differ only by non-word symbols within a single dynamic path')}),t.push(n)}if(r){if(s){if(null!=this.restSlugName)throw Error('You cannot use both an required and optional catch-all route at the same level ("[...'+this.restSlugName+']" and "'+e[0]+'" ).');o(this.optionalRestSlugName,n),this.optionalRestSlugName=n,i="[[...]]"}else{if(null!=this.optionalRestSlugName)throw Error('You cannot use both an optional and required catch-all route at the same level ("[[...'+this.optionalRestSlugName+']]" and "'+e[0]+'").');o(this.restSlugName,n),this.restSlugName=n,i="[...]"}}else{if(s)throw Error('Optional route parameters are not yet supported ("'+e[0]+'").');o(this.slugName,n),this.slugName=n,i="[]"}}this.children.has(i)||this.children.set(i,new n),this.children.get(i)._insert(e.slice(1),t,r)}constructor(){this.placeholder=!0,this.children=new Map,this.slugName=null,this.restSlugName=null,this.optionalRestSlugName=null}}function r(e){let t=new n;return e.forEach(e=>t.insert(e)),t.smoosh()}},73737:(e,t)=>{function n(e){return"("===e[0]&&e.endsWith(")")}Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{DEFAULT_SEGMENT_KEY:function(){return i},PAGE_SEGMENT_KEY:function(){return r},isGroupSegment:function(){return n}});let r="__PAGE__",i="__DEFAULT__"},45782:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{DecodeError:function(){return h},MiddlewareNotFoundError:function(){return E},MissingStaticPage:function(){return g},NormalizeError:function(){return m},PageNotFoundError:function(){return _},SP:function(){return f},ST:function(){return d},WEB_VITALS:function(){return n},execOnce:function(){return r},getDisplayName:function(){return l},getLocationOrigin:function(){return s},getURL:function(){return a},isAbsoluteUrl:function(){return o},isResSent:function(){return u},loadGetInitialProps:function(){return p},normalizeRepeatedSlashes:function(){return c},stringifyError:function(){return y}});let n=["CLS","FCP","FID","INP","LCP","TTFB"];function r(e){let t,n=!1;return function(){for(var r=arguments.length,i=Array(r),o=0;o<r;o++)i[o]=arguments[o];return n||(n=!0,t=e(...i)),t}}let i=/^[a-zA-Z][a-zA-Z\d+\-.]*?:/,o=e=>i.test(e);function s(){let{protocol:e,hostname:t,port:n}=window.location;return e+"//"+t+(n?":"+n:"")}function a(){let{href:e}=window.location,t=s();return e.substring(t.length)}function l(e){return"string"==typeof e?e:e.displayName||e.name||"Unknown"}function u(e){return e.finished||e.headersSent}function c(e){let t=e.split("?");return t[0].replace(/\\/g,"/").replace(/\/\/+/g,"/")+(t[1]?"?"+t.slice(1).join("?"):"")}async function p(e,t){let n=t.res||t.ctx&&t.ctx.res;if(!e.getInitialProps)return t.ctx&&t.Component?{pageProps:await p(t.Component,t.ctx)}:{};let r=await e.getInitialProps(t);if(n&&u(n))return r;if(!r)throw Error('"'+l(e)+'.getInitialProps()" should resolve to an object. But found "'+r+'" instead.');return r}let f="undefined"!=typeof performance,d=f&&["mark","measure","getEntriesByName"].every(e=>"function"==typeof performance[e]);class h extends Error{}class m extends Error{}class _ extends Error{constructor(e){super(),this.code="ENOENT",this.name="PageNotFoundError",this.message="Cannot find module for page: "+e}}class g extends Error{constructor(e,t){super(),this.message="Failed to load static file for page: "+e+" "+t}}class E extends Error{constructor(){super(),this.code="ENOENT",this.message="Cannot find the middleware module"}}function y(e){return JSON.stringify({message:e.message,stack:e.stack})}},80676:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{default:function(){return i},getProperError:function(){return o}});let r=n(58299);function i(e){return"object"==typeof e&&null!==e&&"name"in e&&"message"in e}function o(e){return i(e)?e:Error((0,r.isPlainObject)(e)?JSON.stringify(e):e+"")}},95955:(e,t)=>{Object.defineProperty(t,"Z",{enumerable:!0,get:function(){return i}});let n=["B","kB","MB","GB","TB","PB","EB","ZB","YB"],r=(e,t)=>{let n=e;return"string"==typeof t?n=e.toLocaleString(t):!0===t&&(n=e.toLocaleString()),n};function i(e,t){if(!Number.isFinite(e))throw TypeError(`Expected a finite number, got ${typeof e}: ${e}`);if((t=Object.assign({},t)).signed&&0===e)return" 0 B";let i=e<0,o=i?"-":t.signed?"+":"";if(i&&(e=-e),e<1)return o+r(e,t.locale)+" B";let s=Math.min(Math.floor(Math.log10(e)/3),n.length-1);return o+r(e=Number((e/Math.pow(1e3,s)).toPrecision(3)),t.locale)+" "+n[s]}},92407:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{INTERCEPTION_ROUTE_MARKERS:function(){return i},extractInterceptionRouteInformation:function(){return s},isInterceptionRouteAppPath:function(){return o}});let r=n(42340),i=["(..)(..)","(.)","(..)","(...)"];function o(e){return void 0!==e.split("/").find(e=>i.find(t=>e.startsWith(t)))}function s(e){let t,n,o;for(let r of e.split("/"))if(n=i.find(e=>r.startsWith(e))){[t,o]=e.split(n,2);break}if(!t||!n||!o)throw Error(`Invalid interception route: ${e}. Must be in the format /<intercepting route>/(..|...|..)(..)/<intercepted route>`);switch(t=(0,r.normalizeAppPath)(t),n){case"(.)":o="/"===t?`/${o}`:t+"/"+o;break;case"(..)":if("/"===t)throw Error(`Invalid interception route: ${e}. Cannot use (..) marker at the root level, use (.) instead.`);o=t.split("/").slice(0,-1).concat(o).join("/");break;case"(...)":o="/"+o;break;case"(..)(..)":let s=t.split("/");if(s.length<=2)throw Error(`Invalid interception route: ${e}. Cannot use (..)(..) marker at the root level or one level up.`);o=s.slice(0,-2).concat(o).join("/");break;default:throw Error("Invariant: unexpected marker")}return{interceptingRoute:t,interceptedRoute:o}}},87093:(e,t,n)=>{e.exports=n(62785)},3112:(e,t,n)=>{e.exports=n(87093).vendored.contexts.HtmlContext},75778:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getPageFiles",{enumerable:!0,get:function(){return o}});let r=n(75876),i=n(49431);function o(e,t){let n=(0,r.denormalizePagePath)((0,i.normalizePagePath)(t));return e.pages[n]||(console.warn(`Could not find files for ${n} in .next/build-manifest.json`),[])}},79630:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{ESCAPE_REGEX:function(){return r},htmlEscapeJsonString:function(){return i}});let n={"&":"\\u0026",">":"\\u003e","<":"\\u003c","\u2028":"\\u2028","\u2029":"\\u2029"},r=/[&><\u2028\u2029]/g;function i(e){return e.replace(r,e=>n[e])}},50733:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{cleanAmpPath:function(){return o},debounce:function(){return s},isBlockedPage:function(){return i}});let r=n(45104);function i(e){return r.BLOCKED_PAGES.includes(e)}function o(e){return e.match(/\?amp=(y|yes|true|1)/)&&(e=e.replace(/\?amp=(y|yes|true|1)&?/,"?")),e.match(/&amp=(y|yes|true|1)/)&&(e=e.replace(/&amp=(y|yes|true|1)/,"")),e=e.replace(/\?$/,"")}function s(e,t,n=1/0){let r,i,o;let s=0,a=0;function l(){let u=Date.now(),c=a+t-u;c<=0||s+n>=u?(r=void 0,e.apply(o,i)):r=setTimeout(l,c)}return function(...e){i=e,o=this,a=Date.now(),void 0===r&&(s=a,r=setTimeout(l,t))}}},50167:(e,t)=>{t._=t._interop_require_default=function(e){return e&&e.__esModule?e:{default:e}}}};
6
+ See more info here: https://nextjs.org/docs/messages/large-page-data`)),(0,a.htmlEscapeJsonString)(i)}catch(e){if((0,l.default)(e)&&-1!==e.message.indexOf("circular structure"))throw Error(`Circular structure in "getInitialProps" result of page "${t.page}". https://nextjs.org/docs/messages/circular-structure`);throw e}}render(){let{assetPrefix:e,inAmpMode:t,buildManifest:n,unstable_runtimeJS:i,docComponentsRendered:o,assetQueryString:s,disableOptimizedLoading:a,crossOrigin:l}=this.context,u=!1===i;if(o.NextScript=!0,t)return null;let p=d(this.context.buildManifest,this.context.__NEXT_DATA__.page,t);return(0,r.jsxs)(r.Fragment,{children:[!u&&n.devFiles?n.devFiles.map(t=>(0,r.jsx)("script",{src:`${e}/_next/${(0,c.encodeURIPath)(t)}${s}`,nonce:this.props.nonce,crossOrigin:this.props.crossOrigin||l},t)):null,u?null:(0,r.jsx)("script",{id:"__NEXT_DATA__",type:"application/json",nonce:this.props.nonce,crossOrigin:this.props.crossOrigin||l,dangerouslySetInnerHTML:{__html:S.getInlineScriptSource(this.context)}}),a&&!u&&this.getPolyfillScripts(),a&&!u&&this.getPreNextScripts(),a&&!u&&this.getDynamicChunks(p),a&&!u&&this.getScripts(p)]})}}function I(e){let{inAmpMode:t,docComponentsRendered:n,locale:o,scriptLoader:s,__NEXT_DATA__:a}=(0,u.useHtmlContext)();return n.Html=!0,function(e,t,n){var r,o,s,a;if(!n.children)return;let l=[],u=Array.isArray(n.children)?n.children:[n.children],c=null==(o=u.find(e=>e.type===y))?void 0:null==(r=o.props)?void 0:r.children,p=null==(a=u.find(e=>"body"===e.type))?void 0:null==(s=a.props)?void 0:s.children,f=[...Array.isArray(c)?c:[c],...Array.isArray(p)?p:[p]];i.default.Children.forEach(f,t=>{var n;if(t&&(null==(n=t.type)?void 0:n.__nextScript)){if("beforeInteractive"===t.props.strategy){e.beforeInteractive=(e.beforeInteractive||[]).concat([{...t.props}]);return}if(["lazyOnload","afterInteractive","worker"].includes(t.props.strategy)){l.push(t.props);return}}}),t.scriptLoader=l}(s,a,e),(0,r.jsx)("html",{...e,lang:e.lang||o||void 0,amp:t?"":void 0,"data-ampdevmode":void 0})}function T(){let{docComponentsRendered:e}=(0,u.useHtmlContext)();return e.Main=!0,(0,r.jsx)("next-js-internal-body-render-target",{})}class P extends i.default.Component{static getInitialProps(e){return e.defaultGetInitialProps(e)}render(){return(0,r.jsxs)(I,{children:[(0,r.jsx)(y,{}),(0,r.jsxs)("body",{children:[(0,r.jsx)(T,{}),(0,r.jsx)(S,{})]})]})}}P[o.NEXT_BUILTIN_DOCUMENT]=function(){return(0,r.jsxs)(I,{children:[(0,r.jsx)(y,{}),(0,r.jsxs)("body",{children:[(0,r.jsx)(T,{}),(0,r.jsx)(S,{})]})]})}},45104:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{APP_BUILD_MANIFEST:function(){return E},APP_CLIENT_INTERNALS:function(){return K},APP_PATHS_MANIFEST:function(){return m},APP_PATH_ROUTES_MANIFEST:function(){return _},AUTOMATIC_FONT_OPTIMIZATION_MANIFEST:function(){return M},BARREL_OPTIMIZATION_PREFIX:function(){return B},BLOCKED_PAGES:function(){return F},BUILD_ID_FILE:function(){return w},BUILD_MANIFEST:function(){return g},CLIENT_PUBLIC_FILES_PATH:function(){return D},CLIENT_REFERENCE_MANIFEST:function(){return W},CLIENT_STATIC_FILES_PATH:function(){return U},CLIENT_STATIC_FILES_RUNTIME_AMP:function(){return q},CLIENT_STATIC_FILES_RUNTIME_MAIN:function(){return V},CLIENT_STATIC_FILES_RUNTIME_MAIN_APP:function(){return X},CLIENT_STATIC_FILES_RUNTIME_POLYFILLS:function(){return Q},CLIENT_STATIC_FILES_RUNTIME_POLYFILLS_SYMBOL:function(){return ee},CLIENT_STATIC_FILES_RUNTIME_REACT_REFRESH:function(){return Z},CLIENT_STATIC_FILES_RUNTIME_WEBPACK:function(){return J},COMPILER_INDEXES:function(){return o},COMPILER_NAMES:function(){return i},CONFIG_FILES:function(){return C},DEFAULT_RUNTIME_WEBPACK:function(){return et},DEFAULT_SANS_SERIF_FONT:function(){return el},DEFAULT_SERIF_FONT:function(){return ea},DEV_CLIENT_PAGES_MANIFEST:function(){return j},DEV_MIDDLEWARE_MANIFEST:function(){return R},EDGE_RUNTIME_WEBPACK:function(){return en},EDGE_UNSUPPORTED_NODE_APIS:function(){return ed},EXPORT_DETAIL:function(){return P},EXPORT_MARKER:function(){return T},FUNCTIONS_CONFIG_MANIFEST:function(){return y},GOOGLE_FONT_PROVIDER:function(){return eo},IMAGES_MANIFEST:function(){return b},INTERCEPTION_ROUTE_REWRITE_MANIFEST:function(){return Y},MIDDLEWARE_BUILD_MANIFEST:function(){return G},MIDDLEWARE_MANIFEST:function(){return v},MIDDLEWARE_REACT_LOADABLE_MANIFEST:function(){return z},MODERN_BROWSERSLIST_TARGET:function(){return r.default},NEXT_BUILTIN_DOCUMENT:function(){return $},NEXT_FONT_MANIFEST:function(){return I},OPTIMIZED_FONT_PROVIDERS:function(){return es},PAGES_MANIFEST:function(){return h},PHASE_DEVELOPMENT_SERVER:function(){return p},PHASE_EXPORT:function(){return l},PHASE_INFO:function(){return d},PHASE_PRODUCTION_BUILD:function(){return u},PHASE_PRODUCTION_SERVER:function(){return c},PHASE_TEST:function(){return f},PRERENDER_MANIFEST:function(){return O},REACT_LOADABLE_MANIFEST:function(){return A},ROUTES_MANIFEST:function(){return x},RSC_MODULE_TYPES:function(){return ef},SERVER_DIRECTORY:function(){return L},SERVER_FILES_MANIFEST:function(){return N},SERVER_PROPS_ID:function(){return ei},SERVER_REFERENCE_MANIFEST:function(){return H},STATIC_PROPS_ID:function(){return er},STATIC_STATUS_PAGES:function(){return eu},STRING_LITERAL_DROP_BUNDLE:function(){return k},SUBRESOURCE_INTEGRITY_MANIFEST:function(){return S},SYSTEM_ENTRYPOINTS:function(){return eh},TRACE_OUTPUT_VERSION:function(){return ec},TURBO_TRACE_DEFAULT_MEMORY_LIMIT:function(){return ep},UNDERSCORE_NOT_FOUND_ROUTE:function(){return s},UNDERSCORE_NOT_FOUND_ROUTE_ENTRY:function(){return a}});let r=n(50167)._(n(60979)),i={client:"client",server:"server",edgeServer:"edge-server"},o={[i.client]:0,[i.server]:1,[i.edgeServer]:2},s="/_not-found",a=""+s+"/page",l="phase-export",u="phase-production-build",c="phase-production-server",p="phase-development-server",f="phase-test",d="phase-info",h="pages-manifest.json",m="app-paths-manifest.json",_="app-path-routes-manifest.json",g="build-manifest.json",E="app-build-manifest.json",y="functions-config-manifest.json",S="subresource-integrity-manifest",I="next-font-manifest",T="export-marker.json",P="export-detail.json",O="prerender-manifest.json",x="routes-manifest.json",b="images-manifest.json",N="required-server-files.json",j="_devPagesManifest.json",v="middleware-manifest.json",R="_devMiddlewareManifest.json",A="react-loadable-manifest.json",M="font-manifest.json",L="server",C=["next.config.js","next.config.mjs"],w="BUILD_ID",F=["/_document","/_app","/_error"],D="public",U="static",k="__NEXT_DROP_CLIENT_FILE__",$="__NEXT_BUILTIN_DOCUMENT__",B="__barrel_optimize__",W="client-reference-manifest",H="server-reference-manifest",G="middleware-build-manifest",z="middleware-react-loadable-manifest",Y="interception-route-rewrite-manifest",V="main",X=""+V+"-app",K="app-pages-internals",Z="react-refresh",q="amp",J="webpack",Q="polyfills",ee=Symbol(Q),et="webpack-runtime",en="edge-runtime-webpack",er="__N_SSG",ei="__N_SSP",eo="https://fonts.googleapis.com/",es=[{url:eo,preconnect:"https://fonts.gstatic.com"},{url:"https://use.typekit.net",preconnect:"https://use.typekit.net"}],ea={name:"Times New Roman",xAvgCharWidth:821,azAvgWidth:854.3953488372093,unitsPerEm:2048},el={name:"Arial",xAvgCharWidth:904,azAvgWidth:934.5116279069767,unitsPerEm:2048},eu=["/500"],ec=1,ep=6e3,ef={client:"client",server:"server"},ed=["clearImmediate","setImmediate","BroadcastChannel","ByteLengthQueuingStrategy","CompressionStream","CountQueuingStrategy","DecompressionStream","DomException","MessageChannel","MessageEvent","MessagePort","ReadableByteStreamController","ReadableStreamBYOBRequest","ReadableStreamDefaultController","TransformStreamDefaultController","WritableStreamDefaultController"],eh=new Set([V,Z,q,X]);("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},8584:(e,t)=>{function n(e){return e.split("/").map(e=>encodeURIComponent(e)).join("/")}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"encodeURIPath",{enumerable:!0,get:function(){return n}})},58299:(e,t)=>{function n(e){return Object.prototype.toString.call(e)}function r(e){if("[object Object]"!==n(e))return!1;let t=Object.getPrototypeOf(e);return null===t||t.hasOwnProperty("isPrototypeOf")}Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{getObjectClassLabel:function(){return n},isPlainObject:function(){return r}})},60979:e=>{e.exports=["chrome 64","edge 79","firefox 67","opera 51","safari 12"]},75876:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"denormalizePagePath",{enumerable:!0,get:function(){return o}});let r=n(72189),i=n(24212);function o(e){let t=(0,i.normalizePathSep)(e);return t.startsWith("/index/")&&!(0,r.isDynamicRoute)(t)?t.slice(6):"/index"!==t?t:"/"}},75078:(e,t)=>{function n(e){return e.startsWith("/")?e:"/"+e}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"ensureLeadingSlash",{enumerable:!0,get:function(){return n}})},49431:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"normalizePagePath",{enumerable:!0,get:function(){return s}});let r=n(75078),i=n(72189),o=n(45782);function s(e){let t=/^\/index(\/|$)/.test(e)&&!(0,i.isDynamicRoute)(e)?"/index"+e:"/"===e?"/index":(0,r.ensureLeadingSlash)(e);{let{posix:e}=n(55315),r=e.normalize(t);if(r!==t)throw new o.NormalizeError("Requested and resolved page mismatch: "+t+" "+r)}return t}},24212:(e,t)=>{function n(e){return e.replace(/\\/g,"/")}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"normalizePathSep",{enumerable:!0,get:function(){return n}})},42340:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{normalizeAppPath:function(){return o},normalizeRscURL:function(){return s}});let r=n(75078),i=n(73737);function o(e){return(0,r.ensureLeadingSlash)(e.split("/").reduce((e,t,n,r)=>!t||(0,i.isGroupSegment)(t)||"@"===t[0]||("page"===t||"route"===t)&&n===r.length-1?e:e+"/"+t,""))}function s(e){return e.replace(/\.rsc($|\?)/,"$1")}},72189:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{getSortedRoutes:function(){return r.getSortedRoutes},isDynamicRoute:function(){return i.isDynamicRoute}});let r=n(317),i=n(31735)},31735:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"isDynamicRoute",{enumerable:!0,get:function(){return o}});let r=n(92407),i=/\/\[[^/]+?\](?=\/|$)/;function o(e){return(0,r.isInterceptionRouteAppPath)(e)&&(e=(0,r.extractInterceptionRouteInformation)(e).interceptedRoute),i.test(e)}},317:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getSortedRoutes",{enumerable:!0,get:function(){return r}});class n{insert(e){this._insert(e.split("/").filter(Boolean),[],!1)}smoosh(){return this._smoosh()}_smoosh(e){void 0===e&&(e="/");let t=[...this.children.keys()].sort();null!==this.slugName&&t.splice(t.indexOf("[]"),1),null!==this.restSlugName&&t.splice(t.indexOf("[...]"),1),null!==this.optionalRestSlugName&&t.splice(t.indexOf("[[...]]"),1);let n=t.map(t=>this.children.get(t)._smoosh(""+e+t+"/")).reduce((e,t)=>[...e,...t],[]);if(null!==this.slugName&&n.push(...this.children.get("[]")._smoosh(e+"["+this.slugName+"]/")),!this.placeholder){let t="/"===e?"/":e.slice(0,-1);if(null!=this.optionalRestSlugName)throw Error('You cannot define a route with the same specificity as a optional catch-all route ("'+t+'" and "'+t+"[[..."+this.optionalRestSlugName+']]").');n.unshift(t)}return null!==this.restSlugName&&n.push(...this.children.get("[...]")._smoosh(e+"[..."+this.restSlugName+"]/")),null!==this.optionalRestSlugName&&n.push(...this.children.get("[[...]]")._smoosh(e+"[[..."+this.optionalRestSlugName+"]]/")),n}_insert(e,t,r){if(0===e.length){this.placeholder=!1;return}if(r)throw Error("Catch-all must be the last part of the URL.");let i=e[0];if(i.startsWith("[")&&i.endsWith("]")){let n=i.slice(1,-1),s=!1;if(n.startsWith("[")&&n.endsWith("]")&&(n=n.slice(1,-1),s=!0),n.startsWith("...")&&(n=n.substring(3),r=!0),n.startsWith("[")||n.endsWith("]"))throw Error("Segment names may not start or end with extra brackets ('"+n+"').");if(n.startsWith("."))throw Error("Segment names may not start with erroneous periods ('"+n+"').");function o(e,n){if(null!==e&&e!==n)throw Error("You cannot use different slug names for the same dynamic path ('"+e+"' !== '"+n+"').");t.forEach(e=>{if(e===n)throw Error('You cannot have the same slug name "'+n+'" repeat within a single dynamic path');if(e.replace(/\W/g,"")===i.replace(/\W/g,""))throw Error('You cannot have the slug names "'+e+'" and "'+n+'" differ only by non-word symbols within a single dynamic path')}),t.push(n)}if(r){if(s){if(null!=this.restSlugName)throw Error('You cannot use both an required and optional catch-all route at the same level ("[...'+this.restSlugName+']" and "'+e[0]+'" ).');o(this.optionalRestSlugName,n),this.optionalRestSlugName=n,i="[[...]]"}else{if(null!=this.optionalRestSlugName)throw Error('You cannot use both an optional and required catch-all route at the same level ("[[...'+this.optionalRestSlugName+']]" and "'+e[0]+'").');o(this.restSlugName,n),this.restSlugName=n,i="[...]"}}else{if(s)throw Error('Optional route parameters are not yet supported ("'+e[0]+'").');o(this.slugName,n),this.slugName=n,i="[]"}}this.children.has(i)||this.children.set(i,new n),this.children.get(i)._insert(e.slice(1),t,r)}constructor(){this.placeholder=!0,this.children=new Map,this.slugName=null,this.restSlugName=null,this.optionalRestSlugName=null}}function r(e){let t=new n;return e.forEach(e=>t.insert(e)),t.smoosh()}},73737:(e,t)=>{function n(e){return"("===e[0]&&e.endsWith(")")}Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{DEFAULT_SEGMENT_KEY:function(){return i},PAGE_SEGMENT_KEY:function(){return r},isGroupSegment:function(){return n}});let r="__PAGE__",i="__DEFAULT__"},45782:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{DecodeError:function(){return h},MiddlewareNotFoundError:function(){return E},MissingStaticPage:function(){return g},NormalizeError:function(){return m},PageNotFoundError:function(){return _},SP:function(){return f},ST:function(){return d},WEB_VITALS:function(){return n},execOnce:function(){return r},getDisplayName:function(){return l},getLocationOrigin:function(){return s},getURL:function(){return a},isAbsoluteUrl:function(){return o},isResSent:function(){return u},loadGetInitialProps:function(){return p},normalizeRepeatedSlashes:function(){return c},stringifyError:function(){return y}});let n=["CLS","FCP","FID","INP","LCP","TTFB"];function r(e){let t,n=!1;return function(){for(var r=arguments.length,i=Array(r),o=0;o<r;o++)i[o]=arguments[o];return n||(n=!0,t=e(...i)),t}}let i=/^[a-zA-Z][a-zA-Z\d+\-.]*?:/,o=e=>i.test(e);function s(){let{protocol:e,hostname:t,port:n}=window.location;return e+"//"+t+(n?":"+n:"")}function a(){let{href:e}=window.location,t=s();return e.substring(t.length)}function l(e){return"string"==typeof e?e:e.displayName||e.name||"Unknown"}function u(e){return e.finished||e.headersSent}function c(e){let t=e.split("?");return t[0].replace(/\\/g,"/").replace(/\/\/+/g,"/")+(t[1]?"?"+t.slice(1).join("?"):"")}async function p(e,t){let n=t.res||t.ctx&&t.ctx.res;if(!e.getInitialProps)return t.ctx&&t.Component?{pageProps:await p(t.Component,t.ctx)}:{};let r=await e.getInitialProps(t);if(n&&u(n))return r;if(!r)throw Error('"'+l(e)+'.getInitialProps()" should resolve to an object. But found "'+r+'" instead.');return r}let f="undefined"!=typeof performance,d=f&&["mark","measure","getEntriesByName"].every(e=>"function"==typeof performance[e]);class h extends Error{}class m extends Error{}class _ extends Error{constructor(e){super(),this.code="ENOENT",this.name="PageNotFoundError",this.message="Cannot find module for page: "+e}}class g extends Error{constructor(e,t){super(),this.message="Failed to load static file for page: "+e+" "+t}}class E extends Error{constructor(){super(),this.code="ENOENT",this.message="Cannot find the middleware module"}}function y(e){return JSON.stringify({message:e.message,stack:e.stack})}},80676:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{default:function(){return i},getProperError:function(){return o}});let r=n(58299);function i(e){return"object"==typeof e&&null!==e&&"name"in e&&"message"in e}function o(e){return i(e)?e:Error((0,r.isPlainObject)(e)?JSON.stringify(e):e+"")}},95955:(e,t)=>{Object.defineProperty(t,"Z",{enumerable:!0,get:function(){return i}});let n=["B","kB","MB","GB","TB","PB","EB","ZB","YB"],r=(e,t)=>{let n=e;return"string"==typeof t?n=e.toLocaleString(t):!0===t&&(n=e.toLocaleString()),n};function i(e,t){if(!Number.isFinite(e))throw TypeError(`Expected a finite number, got ${typeof e}: ${e}`);if((t=Object.assign({},t)).signed&&0===e)return" 0 B";let i=e<0,o=i?"-":t.signed?"+":"";if(i&&(e=-e),e<1)return o+r(e,t.locale)+" B";let s=Math.min(Math.floor(Math.log10(e)/3),n.length-1);return o+r(e=Number((e/Math.pow(1e3,s)).toPrecision(3)),t.locale)+" "+n[s]}},92407:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{INTERCEPTION_ROUTE_MARKERS:function(){return i},extractInterceptionRouteInformation:function(){return s},isInterceptionRouteAppPath:function(){return o}});let r=n(42340),i=["(..)(..)","(.)","(..)","(...)"];function o(e){return void 0!==e.split("/").find(e=>i.find(t=>e.startsWith(t)))}function s(e){let t,n,o;for(let r of e.split("/"))if(n=i.find(e=>r.startsWith(e))){[t,o]=e.split(n,2);break}if(!t||!n||!o)throw Error(`Invalid interception route: ${e}. Must be in the format /<intercepting route>/(..|...|..)(..)/<intercepted route>`);switch(t=(0,r.normalizeAppPath)(t),n){case"(.)":o="/"===t?`/${o}`:t+"/"+o;break;case"(..)":if("/"===t)throw Error(`Invalid interception route: ${e}. Cannot use (..) marker at the root level, use (.) instead.`);o=t.split("/").slice(0,-1).concat(o).join("/");break;case"(...)":o="/"+o;break;case"(..)(..)":let s=t.split("/");if(s.length<=2)throw Error(`Invalid interception route: ${e}. Cannot use (..)(..) marker at the root level or one level up.`);o=s.slice(0,-2).concat(o).join("/");break;default:throw Error("Invariant: unexpected marker")}return{interceptingRoute:t,interceptedRoute:o}}},87093:(e,t,n)=>{e.exports=n(62785)},3112:(e,t,n)=>{e.exports=n(87093).vendored.contexts.HtmlContext},75778:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getPageFiles",{enumerable:!0,get:function(){return o}});let r=n(75876),i=n(49431);function o(e,t){let n=(0,r.denormalizePagePath)((0,i.normalizePagePath)(t));return e.pages[n]||(console.warn(`Could not find files for ${n} in .next/build-manifest.json`),[])}},79630:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{ESCAPE_REGEX:function(){return r},htmlEscapeJsonString:function(){return i}});let n={"&":"\\u0026",">":"\\u003e","<":"\\u003c","\u2028":"\\u2028","\u2029":"\\u2029"},r=/[&><\u2028\u2029]/g;function i(e){return e.replace(r,e=>n[e])}},50733:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{cleanAmpPath:function(){return o},debounce:function(){return s},isBlockedPage:function(){return i}});let r=n(45104);function i(e){return r.BLOCKED_PAGES.includes(e)}function o(e){return e.match(/\?amp=(y|yes|true|1)/)&&(e=e.replace(/\?amp=(y|yes|true|1)&?/,"?")),e.match(/&amp=(y|yes|true|1)/)&&(e=e.replace(/&amp=(y|yes|true|1)/,"")),e=e.replace(/\?$/,"")}function s(e,t,n=1/0){let r,i,o;let s=0,a=0;function l(){let u=Date.now(),c=a+t-u;c<=0||s+n>=u?(r=void 0,e.apply(o,i)):r=setTimeout(l,c)}return function(...e){i=e,o=this,a=Date.now(),void 0===r&&(s=a,r=setTimeout(l,t))}}},50167:(e,t)=>{t._=t._interop_require_default=function(e){return e&&e.__esModule?e:{default:e}}}};
@@ -0,0 +1 @@
1
+ exports.id=719,exports.ids=[719],exports.modules={42906:(e,t,a)=>{Promise.resolve().then(a.bind(a,56580)),Promise.resolve().then(a.t.bind(a,92481,23)),Promise.resolve().then(a.t.bind(a,79404,23)),Promise.resolve().then(a.bind(a,13504)),Promise.resolve().then(a.bind(a,40959)),Promise.resolve().then(a.bind(a,16043)),Promise.resolve().then(a.bind(a,47676))},45184:(e,t,a)=>{Promise.resolve().then(a.t.bind(a,12994,23)),Promise.resolve().then(a.t.bind(a,96114,23)),Promise.resolve().then(a.t.bind(a,9727,23)),Promise.resolve().then(a.t.bind(a,79671,23)),Promise.resolve().then(a.t.bind(a,41868,23)),Promise.resolve().then(a.t.bind(a,84759,23))},47676:(e,t,a)=>{"use strict";a.d(t,{default:()=>A});var i=a(10326),r=a(44553),n=a(16122),s=a(29497),d=a(90434),c=a(35047),l=a(42746),o=a(97050),u=a(58974);let A=()=>{let e=(0,c.usePathname)();return(0,i.jsxs)(l.Z,{variant:"tabs",defaultActiveKey:e,children:[i.jsx(o.Z,{children:i.jsx(u.Z,{as:d.default,href:"/services",children:i.jsx(s.G,{icon:n.xf,size:"xl",className:"fa-fw"})})}),i.jsx(o.Z,{children:i.jsx(u.Z,{as:d.default,href:"/settings",children:i.jsx(s.G,{icon:r.Ob,size:"xl",className:"fa-fw"})})})]})}},28329:(e,t,a)=>{"use strict";a.r(t),a.d(t,{attachDatabase:()=>_,build:()=>N,create:()=>E,destroy:()=>G,detachDatabase:()=>V,start:()=>q,stop:()=>F,update:()=>C});var i=a(24330);a(60166);var r=a(6005),n=a.n(r),s=a(75898),d=a(58585),c=a(5930),l=a(12613),o=a(86936),u=a(82314),A=a(70761),f=a(41935);async function b(e,t){let[a]=await e.insert(f.Q).values({id:n().randomUUID(),serviceId:t}).returning({id:f.Q.id});return a}var v=a(54330);async function h(e,t){let[a]=await e.insert(v.u).values({id:crypto.randomUUID(),...t}).returning({id:v.u.id});return a}var w=a(90277);async function g(e,t,a){await e.insert(w.t).values({clientId:t,providerId:a})}var m=a(11931),p=a(81221);async function y(e,t){let[a]=await e.insert(p.D).values({id:n().randomUUID(),...t}).returning({id:p.D.id});return a}(0,m.fC)(p.D,{id:e=>e.id.readonly().describe("Unique identifier of the volume"),serviceId:e=>e.serviceId.describe("Service ID of the volume"),containerPath:e=>e.containerPath.describe("Container path of the volume")}).omit({id:!0}).describe("Data Transfer Object for creating a new volume");var I=a(57745);async function O(e,t){return(await e.delete(v.u).where((0,I.eq)(v.u.id,t)).returning({id:v.u.id})).shift()}async function x(e,t,a){await e.delete(w.t).where((0,I.xD)((0,I.eq)(w.t.clientId,t),(0,I.eq)(w.t.providerId,a)))}var S=a(26485),P=a(692),Z=a(49695),D=a(86075);async function R(e,t,a){let i=[(0,I.eq)(D.w.serviceId,t)];Object.keys(a).length&&i.push((0,I.Nl)(D.w.key,Object.keys(a))),await e.delete(D.w).where((0,I.xD)(...i)),Object.keys(a).length&&await e.insert(D.w).values(Object.keys(a).map(e=>({serviceId:t,key:e,value:a[e]}))).onConflictDoUpdate({target:[D.w.serviceId,D.w.key],set:{value:(0,Z.i6)`excluded.value`}})}var j=a(10710);async function U(e,t,a){let i=[(0,I.eq)(j.T.serviceId,t)];Object.keys(a).length&&i.push((0,I.Nl)(j.T.external,Object.keys(a).map(e=>parseInt(e)))),await e.delete(j.T).where((0,I.xD)(...i)),Object.keys(a).length&&await e.insert(j.T).values(Object.keys(a).map(e=>({serviceId:t,external:parseInt(e),internal:parseInt(a[e])}))).onConflictDoUpdate({target:[j.T.serviceId,j.T.external],set:{internal:(0,Z.i6)`excluded.internal`}})}var T=a(74487);function k(e){return Array.from(e.keys()).reduce((t,a)=>({...t,[a.replace(/\[\]$/,"").replace(/-([a-z])/g,(e,t)=>t.toUpperCase())]:a.endsWith("[]")?e.getAll(a):e.get(a)}),{})}async function E(e){let t=A.nv.parse(k(e));await u.Z.transaction(async e=>{let a=await h(e,t);if("database"===t.kind){let i=[],r=[];if("postgres"===t.repo){i.push(["POSTGRES_PASSWORD",n().randomUUID()]);let t=await y(e,{containerPath:"/var/lib/postgresql/data",serviceId:a.id});await (0,l.rL)(t.id)}if("mysql"===t.repo){i.push(["MYSQL_ROOT_PASSWORD","example"]),r.push(["3306","3306"]);let t=await y(e,{containerPath:"/var/lib/mysql",serviceId:a.id});await (0,l.rL)(t.id)}if("mongo"===t.repo){i.push(["MONGO_INITDB_ROOT_USERNAME","root"]),i.push(["MONGO_INITDB_ROOT_PASSWORD","example"]),r.push(["27017","27017"]);let t=await y(e,{containerPath:"/data/db",serviceId:a.id});await (0,l.rL)(t.id)}if("redis"===t.repo){i.push(["REDIS_ARGS","--appendonly yes"]),r.push(["6379","6379"]);let t=await y(e,{containerPath:"/data",serviceId:a.id});await (0,l.rL)(t.id)}i.length&&await R(e,a.id,Object.fromEntries(i)),r.length&&await U(e,a.id,Object.fromEntries(r));let s=await b(e,a.id);await (0,l.XY)(s.id)}}),(0,d.redirect)("/services")}async function C(e,t,a){let i=JSON.parse(a.get("env")),r=JSON.parse(a.get("ports")),n=A.$2.omit({repo:!0}).parse(k(a)),s=await (0,P.Z)(u.Z,e);if(!s)throw Error("Invalid Service");s.containerId&&(await (0,l.sc)(s.containerId),n.containerId=null,n.imageId=null),"running"===s.status&&(n.status="idle"),await u.Z.transaction(async t=>{await (0,T.Z)(t,e,n),await R(t,e,i),await U(t,e,r)}),(0,d.redirect)("/services")}async function G(e,t){let a=await (0,P.Z)(u.Z,e);a&&await Promise.all(a.networkIds.map(l.s4)),await O(u.Z,e),(0,d.redirect)("/services")}async function q(e,t){let a=await (0,P.Z)(u.Z,e);if(!a)throw Error("Invalid Service");let i=async()=>{let t=await (0,S.Z)(u.Z,e,["id","createdAt"]);return t.reduce((e,t)=>{let a=new Date(e.createdAt).getTime();return new Date(t.createdAt).getTime()>a?t:e},t[0]).id},r=async()=>{switch(a.kind){case"git":return await i();case"database":return a.repo}},n=await r(),c=a.providers.map(e=>(0,o.V)(a.name,e.name,e.variables)).reduce((e,t)=>Object.assign(e,t),{}),A=await (0,l.fH)((0,s.GL)(a.name),n,{...c,...a.environmentVariables},a.ports,a.volumes,[...a.networkIds,...a.providers.map(e=>e.networkIds).flat()]);await (0,T.Z)(u.Z,a.id,{status:"running",containerId:A,imageId:n}),(0,d.redirect)(`/services/${e}`)}async function F(e,t,a){if(t)try{await (0,l.sc)(t)}catch(e){}finally{await (0,T.Z)(u.Z,e,{status:"idle",containerId:null,imageId:null})}(0,d.redirect)(`/services/${e}`)}async function N(e,t){let a=await (0,P.Z)(u.Z,e);a&&await (0,c.Y)(a),(0,d.redirect)(`/services/${e}`)}async function _(e,t,a){await g(u.Z,e,t),(0,d.redirect)(`/services/${e}/databases`)}async function V(e,t,a){await x(u.Z,e,t),(0,d.redirect)(`/services/${e}/databases`)}(0,a(40618).h)([E,C,G,q,F,N,_,V]),(0,i.j)("8c5bf21f1ecf2a50f8bd7b50e9c4610cdf0dd139",E),(0,i.j)("a5766bcaff8716b36d5e7e396ae4037fec59c03a",C),(0,i.j)("eb4807d8bbe0fe96b423cf5b5af180170a5cc895",G),(0,i.j)("3cad7bc3c3dc9bc7a004006bb342441fc7f5fd23",q),(0,i.j)("dc9bf784fc13095d2e0cd2d0c69cff92b8306dc4",F),(0,i.j)("34c731a9cce0dd0400778c3b88cb7ca507920248",N),(0,i.j)("98d0d4b1553acaa8a561a4d29ceef670d8d22637",_),(0,i.j)("7d1e008a3195e231bf8e80698f5a8e733e835ad8",V)},98548:(e,t,a)=>{"use strict";a.r(t),a.d(t,{default:()=>f,metadata:()=>A});var i=a(19510);a(44444),a(99175);var r=a(37010),n=a(47840),s=a(17710),d=a(57371);a(71159);var c=a(11381),l=a(56517);let o={src:"/_next/static/media/logo.d9d22550.png",height:800,width:800,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAMAAADz0U65AAAAPFBMVEUhISF5eXmBgYHg4OCFhYVFRUWDg4Py8vKVlZWRkZGdnZ2enp4kJCTIyMjNzc3Ly8tbW1upqamJiYnR0dGlFBWWAAAAEHRSTlMEY2X9tvxr/bCqa2z6/P/+Dds3xgAAAAlwSFlzAAALEwAACxMBAJqcGAAAAD1JREFUeJwVy0kSwCAIAMFRQTALLvn/X1Pc+tJAF+kAPlubDiVsvhaFYba32Uick6ifqj5RwZeu5dlukQt+P+AB1c1OZ/YAAAAASUVORK5CYII=",blurWidth:8,blurHeight:8},u=(0,a(68570).createProxy)(String.raw`/home/runner/work/buttler/buttler/src/components/Tabs.tsx#default`);r.vc.autoAddCss=!1;let A={title:"Buttler",description:"makes your life easier",icons:{icon:[{url:"/favicon-16x16.png",sizes:"16x16",type:"image/png"},{url:"/favicon-32x32.png",sizes:"32x32",type:"image/png"},{url:"/favicon-96x96.png",sizes:"96x96",type:"image/png"},{url:"/favicon-192x192.png",sizes:"192x192",type:"image/png"}]}},f=({children:e})=>i.jsx("html",{lang:"en",children:i.jsx(n.Z,{children:(0,i.jsxs)(l.Z,{as:"main",className:"py-3",children:[i.jsx("div",{className:"d-flex justify-content-center mb-3",children:i.jsx(d.default,{href:"/",children:i.jsx(s.default,{src:o,alt:"logo",width:80,height:80,style:{marginBottom:-40}})})}),i.jsx(u,{}),i.jsx("div",{className:"rounded-bottom border-start border-end border-bottom shadow p-3",children:i.jsx(c.Z,{style:{minHeight:"calc(100vh - 163px)"},children:e})})]})})})},5930:(e,t,a)=>{"use strict";a.d(t,{Y:()=>x});var i=a(75898),r=a(12613),n=a(93977),s=a.n(n),d=a(49411),c=a.n(d),l=a(14564),o=a(67921);function u(e){return c().resolve(o.Z.CURRENT_WORKING_DIRECTORY,"storage/repos",e)}async function A(e,t){await f(t);let a=u(t);await s().mkdir(a,{recursive:!0});let i=(0,l.ZP)({baseDir:a,binary:"git",maxConcurrentProcesses:6});return await i.clone(e,a,{"--depth":"1","--single-branch":null,"--branch":"main"}),a}async function f(e){await s().rm(u(e),{recursive:!0,force:!0})}var b=a(82314),v=a(6005),h=a.n(v),w=a(94407);async function g(e,t){let[a]=await e.insert(w.g).values({id:h().randomUUID(),...t}).returning({id:w.g.id});return a}var m=a(57745);async function p(e,t,a){return(await e.update(w.g).set(a).where((0,m.eq)(w.g.id,t)).returning()).shift()}var y=a(74487),I=a(86936);async function O(e,t){let a=await A(e.repo,e.id),n=await (0,r.D2)(t,a,!1);if(await f(e.id),await p(b.Z,t,{status:n?"ready":"failed"}),e.containerId){await (0,r.sc)(e.containerId),await (0,y.Z)(b.Z,e.id,{status:"idle",containerId:null,imageId:null});let a=e.providers.map(t=>(0,I.V)(e.name,t.name,t.variables)).reduce((e,t)=>Object.assign(e,t),{}),n=await (0,r.fH)((0,i.GL)(e.name),t,{...a,...e.environmentVariables},e.ports,e.volumes,e.providers.map(e=>e.networkIds).flat());await (0,y.Z)(b.Z,e.id,{status:"running",containerId:n,imageId:t})}}async function x(e){let t=await g(b.Z,{serviceId:e.id});return O(e,t.id),t}},86936:(e,t,a)=>{"use strict";a.d(t,{V:()=>r});var i=a(75898);function r(e,t,a){return{POSTGRES_HOST:(0,i.GL)(t),POSTGRES_PORT:"5432",POSTGRES_USER:"postgres",POSTGRES_PASSWORD:a.POSTGRES_PASSWORD,POSTGRES_DATABASE:(0,i.fu)(e)}}},26485:(e,t,a)=>{"use strict";a.d(t,{Z:()=>c});var i=a(11931),r=a(94407);let n=(0,i.fC)(r.g,{id:e=>e.id.readonly().describe("Unique identifier of the build image"),serviceId:e=>e.serviceId.describe("ID of the service associated with this build image"),status:e=>e.status.describe("Current status of the build image"),createdAt:e=>e.createdAt.readonly().describe("Creation date of the build image as an ISO 8601 date string"),updatedAt:e=>e.updatedAt.readonly().describe("Modification date of the build image as an ISO 8601 date string")}),s=n.required().describe("Represents a build image definition");n.omit({id:!0,createdAt:!0,updatedAt:!0}).describe("Data Transfer Object for creating a new build image").partial().omit({}).describe("Data Transfer Object for updating an existing build image");var d=a(38742);function c(e,t,a){return e.query.buildImages.findMany({columns:(0,d.e)(a),where:(e,{eq:a})=>a(e.serviceId,t),orderBy:(e,{desc:t})=>[t(e.createdAt)]})}s.keyof().array().default([])},74487:(e,t,a)=>{"use strict";a.d(t,{Z:()=>n});var i=a(57745),r=a(54330);async function n(e,t,a){return(await e.update(r.u).set({...a,updatedAt:new Date().toISOString()}).where((0,i.eq)(r.u.id,t)).returning()).shift()}},16043:(e,t,a)=>{"use strict";a.r(t),a.d(t,{default:()=>i});let i={src:"/_next/static/media/logo.d9d22550.png",height:800,width:800,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAMAAADz0U65AAAAPFBMVEUhISF5eXmBgYHg4OCFhYVFRUWDg4Py8vKVlZWRkZGdnZ2enp4kJCTIyMjNzc3Ly8tbW1upqamJiYnR0dGlFBWWAAAAEHRSTlMEY2X9tvxr/bCqa2z6/P/+Dds3xgAAAAlwSFlzAAALEwAACxMBAJqcGAAAAD1JREFUeJwVy0kSwCAIAMFRQTALLvn/X1Pc+tJAF+kAPlubDiVsvhaFYba32Uick6ifqj5RwZeu5dlukQt+P+AB1c1OZ/YAAAAASUVORK5CYII=",blurWidth:8,blurHeight:8}},44444:()=>{}};
@@ -0,0 +1 @@
1
+ exports.id=863,exports.ids=[863],exports.modules={43984:(e,t,r)=>{"use strict";let n;t.Z=void 0;var a=O(r(64918)),l=O(r(13689)),s=O(r(41051)),o=O(r(10995)),i=function(e,t){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=j(void 0);if(r&&r.has(e))return r.get(e);var n={__proto__:null},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var l in e)if("default"!==l&&({}).hasOwnProperty.call(e,l)){var s=a?Object.getOwnPropertyDescriptor(e,l):null;s&&(s.get||s.set)?Object.defineProperty(n,l,s):n[l]=e[l]}return n.default=e,r&&r.set(e,n),n}(r(17577)),c=O(r(60962)),u=O(r(87842)),d=O(r(38199)),f=O(r(64844)),p=O(r(55183)),m=O(r(81362)),b=O(r(56395)),h=O(r(96085)),y=r(51048),g=r(25513),v=r(10326);let x=["show","role","className","style","children","backdrop","keyboard","onBackdropClick","onEscapeKeyDown","transition","runTransition","backdropTransition","runBackdropTransition","autoFocus","enforceFocus","restoreFocus","restoreFocusOptions","renderDialog","renderBackdrop","manager","container","onShow","onHide","onExit","onExited","onExiting","onEnter","onEntering","onEntered"];function j(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(j=function(e){return e?r:t})(e)}function O(e){return e&&e.__esModule?e:{default:e}}let w=(0,i.forwardRef)((e,t)=>{let{show:r=!1,role:j="dialog",className:O,style:w,children:N,backdrop:T=!0,keyboard:E=!0,onBackdropClick:k,onEscapeKeyDown:_,transition:R,runTransition:S,backdropTransition:C,runBackdropTransition:A,autoFocus:M=!0,enforceFocus:z=!0,restoreFocus:P=!0,restoreFocusOptions:I,renderDialog:L,renderBackdrop:Z=e=>(0,v.jsx)("div",Object.assign({},e)),manager:D,container:$,onShow:F,onHide:B=()=>{},onExit:W,onExited:H,onExiting:V,onEnter:G,onEntering:U,onEntered:K}=e,Y=function(e,t){if(null==e)return{};var r={};for(var n in e)if(({}).hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}(e,x),Q=(0,h.default)(),X=(0,b.default)($),q=function(e){let t=(0,h.default)(),r=e||(n||(n=new m.default({ownerDocument:null==t?void 0:t.document})),n),a=(0,i.useRef)({dialog:null,backdrop:null});return Object.assign(a.current,{add:()=>r.add(a.current),remove:()=>r.remove(a.current),isTopModal:()=>r.isTopModal(a.current),setDialogRef:(0,i.useCallback)(e=>{a.current.dialog=e},[]),setBackdropRef:(0,i.useCallback)(e=>{a.current.backdrop=e},[])})}(D),J=(0,u.default)(),ee=(0,f.default)(r),[et,er]=(0,i.useState)(!r),en=(0,i.useRef)(null);(0,i.useImperativeHandle)(t,()=>q,[q]),s.default&&!ee&&r&&(en.current=(0,a.default)(null==Q?void 0:Q.document)),r&&et&&er(!1);let ea=(0,p.default)(()=>{if(q.add(),eu.current=(0,o.default)(document,"keydown",ei),ec.current=(0,o.default)(document,"focus",()=>setTimeout(es),!0),F&&F(),M){var e,t;let r=(0,a.default)(null!=(e=null==(t=q.dialog)?void 0:t.ownerDocument)?e:null==Q?void 0:Q.document);q.dialog&&r&&!(0,l.default)(q.dialog,r)&&(en.current=r,q.dialog.focus())}}),el=(0,p.default)(()=>{if(q.remove(),null==eu.current||eu.current(),null==ec.current||ec.current(),P){var e;null==(e=en.current)||null==e.focus||e.focus(I),en.current=null}});(0,i.useEffect)(()=>{r&&X&&ea()},[r,X,ea]),(0,i.useEffect)(()=>{et&&el()},[et,el]),(0,d.default)(()=>{el()});let es=(0,p.default)(()=>{if(!z||!J()||!q.isTopModal())return;let e=(0,a.default)(null==Q?void 0:Q.document);q.dialog&&e&&!(0,l.default)(q.dialog,e)&&q.dialog.focus()}),eo=(0,p.default)(e=>{e.target===e.currentTarget&&(null==k||k(e),!0===T&&B())}),ei=(0,p.default)(e=>{E&&(0,g.isEscKey)(e)&&q.isTopModal()&&(null==_||_(e),e.defaultPrevented||B())}),ec=(0,i.useRef)(),eu=(0,i.useRef)();if(!X)return null;let ed=Object.assign({role:j,ref:q.setDialogRef,"aria-modal":"dialog"===j||void 0},Y,{style:w,className:O,tabIndex:-1}),ef=L?L(ed):(0,v.jsx)("div",Object.assign({},ed,{children:i.cloneElement(N,{role:"document"})}));ef=(0,y.renderTransition)(R,S,{unmountOnExit:!0,mountOnEnter:!0,appear:!0,in:!!r,onExit:W,onExiting:V,onExited:(...e)=>{er(!0),null==H||H(...e)},onEnter:G,onEntering:U,onEntered:K,children:ef});let ep=null;return T&&(ep=Z({ref:q.setBackdropRef,onClick:eo}),ep=(0,y.renderTransition)(C,A,{in:!!r,appear:!0,mountOnEnter:!0,unmountOnExit:!0,children:ep})),(0,v.jsx)(v.Fragment,{children:c.default.createPortal((0,v.jsxs)(v.Fragment,{children:[ep,ef]}),X)})});w.displayName="Modal",t.Z=Object.assign(w,{Manager:m.default})},81362:(e,t,r)=>{"use strict";t.__esModule=!0,t.default=t.OPEN_DATA_ATTRIBUTE=void 0;var n=s(r(97575)),a=r(56363),l=s(r(51694));function s(e){return e&&e.__esModule?e:{default:e}}let o=t.OPEN_DATA_ATTRIBUTE=(0,a.dataAttr)("modal-open");class i{constructor({ownerDocument:e,handleContainerOverflow:t=!0,isRTL:r=!1}={}){this.handleContainerOverflow=t,this.isRTL=r,this.modals=[],this.ownerDocument=e}getScrollbarWidth(){return(0,l.default)(this.ownerDocument)}getElement(){return(this.ownerDocument||document).body}setModalAttributes(e){}removeModalAttributes(e){}setContainerStyle(e){let t={overflow:"hidden"},r=this.isRTL?"paddingLeft":"paddingRight",a=this.getElement();e.style={overflow:a.style.overflow,[r]:a.style[r]},e.scrollBarWidth&&(t[r]=`${parseInt((0,n.default)(a,r)||"0",10)+e.scrollBarWidth}px`),a.setAttribute(o,""),(0,n.default)(a,t)}reset(){[...this.modals].forEach(e=>this.remove(e))}removeContainerStyle(e){let t=this.getElement();t.removeAttribute(o),Object.assign(t.style,e.style)}add(e){let t=this.modals.indexOf(e);return -1!==t||(t=this.modals.length,this.modals.push(e),this.setModalAttributes(e),0!==t||(this.state={scrollBarWidth:this.getScrollbarWidth(),style:{}},this.handleContainerOverflow&&this.setContainerStyle(this.state))),t}remove(e){let t=this.modals.indexOf(e);-1!==t&&(this.modals.splice(t,1),!this.modals.length&&this.handleContainerOverflow&&this.removeContainerStyle(this.state),this.removeModalAttributes(e))}isTopModal(e){return!!this.modals.length&&this.modals[this.modals.length-1]===e}}t.default=i},51694:(e,t)=>{"use strict";t.__esModule=!0,t.default=function(e=document){return Math.abs(e.defaultView.innerWidth-e.documentElement.clientWidth)}},78575:(e,t,r)=>{"use strict";t.__esModule=!0,t.default=function(e){let t=(0,n.useRef)(e);return t.current=e,t};var n=r(17577)},38199:(e,t,r)=>{"use strict";t.__esModule=!0,t.default=function(e){let t=(0,n.default)(e);(0,a.useEffect)(()=>()=>t.current(),[])};var n=function(e){return e&&e.__esModule?e:{default:e}}(r(78575)),a=r(17577)},64918:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>a});var n=r(59816);function a(e){void 0===e&&(e=(0,n.default)());try{var t=e.activeElement;if(!t||!t.nodeName)return null;return t}catch(t){return e.body}}},61959:(e,t,r)=>{"use strict";let n;r.d(t,{Z:()=>F});var a,l=r(48029),s=r.n(l),o=r(98120),i=r(41051),c=r(59816),u=r(26460);function d(e){if((!a&&0!==a||e)&&i.default){var t=document.createElement("div");t.style.position="absolute",t.style.top="-9999px",t.style.width="50px",t.style.height="50px",t.style.overflow="scroll",document.body.appendChild(t),a=t.offsetWidth-t.clientWidth,document.body.removeChild(t)}return a}var f=r(17577),p=r(10992),m=r(53171),b=r(77225),h=r(69749),y=r(43984),g=r(7032),v=r(97575),x=r(73159);function j(e,t){return e.replace(RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}var O=r(81362);let w={FIXED_CONTENT:".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",STICKY_CONTENT:".sticky-top",NAVBAR_TOGGLER:".navbar-toggler"};class N extends O.default{adjustAndStore(e,t,r){let n=t.style[e];t.dataset[e]=n,(0,v.default)(t,{[e]:`${parseFloat((0,v.default)(t,e))+r}px`})}restore(e,t){let r=t.dataset[e];void 0!==r&&(delete t.dataset[e],(0,v.default)(t,{[e]:r}))}setContainerStyle(e){var t;super.setContainerStyle(e);let r=this.getElement();if(t="modal-open",r.classList?r.classList.add(t):(0,g.Z)(r,t)||("string"==typeof r.className?r.className=r.className+" "+t:r.setAttribute("class",(r.className&&r.className.baseVal||"")+" "+t)),!e.scrollBarWidth)return;let n=this.isRTL?"paddingLeft":"paddingRight",a=this.isRTL?"marginLeft":"marginRight";(0,x.default)(r,w.FIXED_CONTENT).forEach(t=>this.adjustAndStore(n,t,e.scrollBarWidth)),(0,x.default)(r,w.STICKY_CONTENT).forEach(t=>this.adjustAndStore(a,t,-e.scrollBarWidth)),(0,x.default)(r,w.NAVBAR_TOGGLER).forEach(t=>this.adjustAndStore(a,t,e.scrollBarWidth))}removeContainerStyle(e){var t;super.removeContainerStyle(e);let r=this.getElement();t="modal-open",r.classList?r.classList.remove(t):"string"==typeof r.className?r.className=j(r.className,t):r.setAttribute("class",j(r.className&&r.className.baseVal||"",t));let n=this.isRTL?"paddingLeft":"paddingRight",a=this.isRTL?"marginLeft":"marginRight";(0,x.default)(r,w.FIXED_CONTENT).forEach(e=>this.restore(n,e)),(0,x.default)(r,w.STICKY_CONTENT).forEach(e=>this.restore(a,e)),(0,x.default)(r,w.NAVBAR_TOGGLER).forEach(e=>this.restore(a,e))}}var T=r(14177),E=r(42227),k=r(10326);let _=f.forwardRef(({className:e,bsPrefix:t,as:r="div",...n},a)=>(t=(0,E.vE)(t,"modal-body"),(0,k.jsx)(r,{ref:a,className:s()(e,t),...n})));_.displayName="ModalBody";let R=f.createContext({onHide(){}}),S=f.forwardRef(({bsPrefix:e,className:t,contentClassName:r,centered:n,size:a,fullscreen:l,children:o,scrollable:i,...c},u)=>{e=(0,E.vE)(e,"modal");let d=`${e}-dialog`,f="string"==typeof l?`${e}-fullscreen-${l}`:`${e}-fullscreen`;return(0,k.jsx)("div",{...c,ref:u,className:s()(d,t,a&&`${e}-${a}`,n&&`${d}-centered`,i&&`${d}-scrollable`,l&&f),children:(0,k.jsx)("div",{className:s()(`${e}-content`,r),children:o})})});S.displayName="ModalDialog";let C=S,A=f.forwardRef(({className:e,bsPrefix:t,as:r="div",...n},a)=>(t=(0,E.vE)(t,"modal-footer"),(0,k.jsx)(r,{ref:a,className:s()(e,t),...n})));A.displayName="ModalFooter";var M=r(57631);let z=f.forwardRef(({closeLabel:e="Close",closeVariant:t,closeButton:r=!1,onHide:n,children:a,...l},s)=>{let o=(0,f.useContext)(R),i=(0,p.Z)(()=>{null==o||o.onHide(),null==n||n()});return(0,k.jsxs)("div",{ref:s,...l,children:[a,r&&(0,k.jsx)(M.Z,{"aria-label":e,variant:t,onClick:i})]})}),P=f.forwardRef(({bsPrefix:e,className:t,closeLabel:r="Close",closeButton:n=!1,...a},l)=>(e=(0,E.vE)(e,"modal-header"),(0,k.jsx)(z,{ref:l,...a,className:s()(t,e),closeLabel:r,closeButton:n})));P.displayName="ModalHeader";let I=(0,r(43480).Z)("h4"),L=f.forwardRef(({className:e,bsPrefix:t,as:r=I,...n},a)=>(t=(0,E.vE)(t,"modal-title"),(0,k.jsx)(r,{ref:a,className:s()(e,t),...n})));function Z(e){return(0,k.jsx)(T.Z,{...e,timeout:null})}function D(e){return(0,k.jsx)(T.Z,{...e,timeout:null})}L.displayName="ModalTitle";let $=f.forwardRef(({bsPrefix:e,className:t,style:r,dialogClassName:a,contentClassName:l,children:g,dialogAs:v=C,"data-bs-theme":x,"aria-labelledby":j,"aria-describedby":O,"aria-label":w,show:T=!1,animation:_=!0,backdrop:S=!0,keyboard:A=!0,onEscapeKeyDown:M,onShow:z,onHide:P,container:I,autoFocus:L=!0,enforceFocus:$=!0,restoreFocus:F=!0,restoreFocusOptions:B,onEntered:W,onExit:H,onExiting:V,onEnter:G,onEntering:U,onExited:K,backdropClassName:Y,manager:Q,...X},q)=>{let[J,ee]=(0,f.useState)({}),[et,er]=(0,f.useState)(!1),en=(0,f.useRef)(!1),ea=(0,f.useRef)(!1),el=(0,f.useRef)(null),[es,eo]=(0,f.useState)(null),ei=(0,m.Z)(q,eo),ec=(0,p.Z)(P),eu=(0,E.SC)();e=(0,E.vE)(e,"modal");let ed=(0,f.useMemo)(()=>({onHide:ec}),[ec]);function ef(){var e;return Q||(e={isRTL:eu},n||(n=new N(e)),n)}function ep(e){if(!i.default)return;let t=ef().getScrollbarWidth()>0,r=e.scrollHeight>(0,c.default)(e).documentElement.clientHeight;ee({paddingRight:t&&!r?d():void 0,paddingLeft:!t&&r?d():void 0})}let em=(0,p.Z)(()=>{es&&ep(es.dialog)});(0,b.Z)(()=>{(0,u.Z)(window,"resize",em),null==el.current||el.current()});let eb=()=>{en.current=!0},eh=e=>{en.current&&es&&e.target===es.dialog&&(ea.current=!0),en.current=!1},ey=()=>{er(!0),el.current=(0,h.Z)(es.dialog,()=>{er(!1)})},eg=e=>{e.target===e.currentTarget&&ey()},ev=e=>{if("static"===S){eg(e);return}if(ea.current||e.target!==e.currentTarget){ea.current=!1;return}null==P||P()},ex=(0,f.useCallback)(t=>(0,k.jsx)("div",{...t,className:s()(`${e}-backdrop`,Y,!_&&"show")}),[_,Y,e]),ej={...r,...J};return ej.display="block",(0,k.jsx)(R.Provider,{value:ed,children:(0,k.jsx)(y.Z,{show:T,ref:ei,backdrop:S,container:I,keyboard:!0,autoFocus:L,enforceFocus:$,restoreFocus:F,restoreFocusOptions:B,onEscapeKeyDown:e=>{A?null==M||M(e):(e.preventDefault(),"static"===S&&ey())},onShow:z,onHide:P,onEnter:(e,t)=>{e&&ep(e),null==G||G(e,t)},onEntering:(e,t)=>{null==U||U(e,t),(0,o.ZP)(window,"resize",em)},onEntered:W,onExit:e=>{null==el.current||el.current(),null==H||H(e)},onExiting:V,onExited:e=>{e&&(e.style.display=""),null==K||K(e),(0,u.Z)(window,"resize",em)},manager:ef(),transition:_?Z:void 0,backdropTransition:_?D:void 0,renderBackdrop:ex,renderDialog:r=>(0,k.jsx)("div",{role:"dialog",...r,style:ej,className:s()(t,e,et&&`${e}-static`,!_&&"show"),onClick:S?ev:void 0,onMouseUp:eh,"data-bs-theme":x,"aria-label":w,"aria-labelledby":j,"aria-describedby":O,children:(0,k.jsx)(v,{...X,onMouseDown:eb,className:a,contentClassName:l,children:g})})})})});$.displayName="Modal";let F=Object.assign($,{Body:_,Header:P,Title:L,Footer:A,Dialog:C,TRANSITION_DURATION:300,BACKDROP_TRANSITION_DURATION:150})},35681:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>i});var n=r(48029),a=r.n(n),l=r(17577),s=r(42227),o=r(10326);let i=l.forwardRef(({bsPrefix:e,className:t,striped:r,bordered:n,borderless:l,hover:i,size:c,variant:u,responsive:d,...f},p)=>{let m=(0,s.vE)(e,"table"),b=a()(t,m,u&&`${m}-${u}`,c&&`${m}-${c}`,r&&`${m}-${"string"==typeof r?`striped-${r}`:"striped"}`,n&&`${m}-bordered`,l&&`${m}-borderless`,i&&`${m}-hover`),h=(0,o.jsx)("table",{...f,className:b,ref:p});if(d){let e=`${m}-responsive`;return"string"==typeof d&&(e=`${e}-${d}`),(0,o.jsx)("div",{className:e,children:h})}return h})},96980:e=>{e.exports={ellipsis:"ellipsis_ellipsis__eHH5P"}},49554:e=>{e.exports={table:"data-table_table__keg0p",actions:"data-table_actions__Zfa1g"}},95262:(e,t)=>{"use strict";t.DF={prefix:"fas",iconName:"pencil",icon:[512,512,[9999,61504,"pencil-alt"],"f303","M410.3 231l11.3-11.3-33.9-33.9-62.1-62.1L291.7 89.8l-11.3 11.3-22.6 22.6L58.6 322.9c-10.4 10.4-18 23.3-22.2 37.4L1 480.7c-2.5 8.4-.2 17.5 6.1 23.7s15.3 8.5 23.7 6.1l120.3-35.4c14.1-4.2 27-11.8 37.4-22.2L387.7 253.7 410.3 231zM160 399.4l-9.1 22.7c-4 3.1-8.5 5.4-13.3 6.9L59.4 452l23-78.1c1.4-4.9 3.8-9.4 6.9-13.3l22.7-9.1 0 32c0 8.8 7.2 16 16 16l32 0zM362.7 18.7L348.3 33.2 325.7 55.8 314.3 67.1l33.9 33.9 62.1 62.1 33.9 33.9 11.3-11.3 22.6-22.6 14.5-14.5c25-25 25-65.5 0-90.5L453.3 18.7c-25-25-65.5-25-90.5 0zm-47.4 168l-144 144c-6.2 6.2-16.4 6.2-22.6 0s-6.2-16.4 0-22.6l144-144c6.2-6.2 16.4-6.2 22.6 0s6.2 16.4 0 22.6z"]},t.Tz=t.DF},67666:(e,t)=>{"use strict";t.DF={prefix:"fas",iconName:"spinner",icon:[512,512,[],"f110","M304 48a48 48 0 1 0 -96 0 48 48 0 1 0 96 0zm0 416a48 48 0 1 0 -96 0 48 48 0 1 0 96 0zM48 304a48 48 0 1 0 0-96 48 48 0 1 0 0 96zm464-48a48 48 0 1 0 -96 0 48 48 0 1 0 96 0zM142.9 437A48 48 0 1 0 75 369.1 48 48 0 1 0 142.9 437zm0-294.2A48 48 0 1 0 75 75a48 48 0 1 0 67.9 67.9zM369.1 437A48 48 0 1 0 437 369.1 48 48 0 1 0 369.1 437z"]},t.LM=t.DF},62872:(e,t)=>{"use strict";t.DF={prefix:"fas",iconName:"trash-can",icon:[448,512,[61460,"trash-alt"],"f2ed","M135.2 17.7C140.6 6.8 151.7 0 163.8 0L284.2 0c12.1 0 23.2 6.8 28.6 17.7L320 32l96 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 96C14.3 96 0 81.7 0 64S14.3 32 32 32l96 0 7.2-14.3zM32 128l384 0 0 320c0 35.3-28.7 64-64 64L96 512c-35.3 0-64-28.7-64-64l0-320zm96 64c-8.8 0-16 7.2-16 16l0 224c0 8.8 7.2 16 16 16s16-7.2 16-16l0-224c0-8.8-7.2-16-16-16zm96 0c-8.8 0-16 7.2-16 16l0 224c0 8.8 7.2 16 16 16s16-7.2 16-16l0-224c0-8.8-7.2-16-16-16zm96 0c-8.8 0-16 7.2-16 16l0 224c0 8.8 7.2 16 16 16s16-7.2 16-16l0-224c0-8.8-7.2-16-16-16z"]},t.Vu=t.DF},71839:(e,t,r)=>{"use strict";r.d(t,{G:()=>x});var n=r(37010),a=r(3183),l=r.n(a),s=r(71159),o=r.n(s);function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function c(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?i(Object(r),!0).forEach(function(t){d(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):i(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function u(e){return(u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function d(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function f(e){return function(e){if(Array.isArray(e))return p(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return p(e,void 0);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return p(e,void 0)}}(e)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function p(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function m(e){var t;return(t=e-0)==t?e:(e=e.replace(/[\-_\s]+(.)?/g,function(e,t){return t?t.toUpperCase():""})).substr(0,1).toLowerCase()+e.substr(1)}var b=["style"],h=!1;try{h=!0}catch(e){}function y(e){return e&&"object"===u(e)&&e.prefix&&e.iconName&&e.icon?e:n.Qc.icon?n.Qc.icon(e):null===e?null:e&&"object"===u(e)&&e.prefix&&e.iconName?e:Array.isArray(e)&&2===e.length?{prefix:e[0],iconName:e[1]}:"string"==typeof e?{prefix:"fas",iconName:e}:void 0}function g(e,t){return Array.isArray(t)&&t.length>0||!Array.isArray(t)&&t?d({},e,t):{}}var v={border:!1,className:"",mask:null,maskId:null,fixedWidth:!1,inverse:!1,flip:!1,icon:null,listItem:!1,pull:null,pulse:!1,rotation:null,size:null,spin:!1,spinPulse:!1,spinReverse:!1,beat:!1,fade:!1,beatFade:!1,bounce:!1,shake:!1,symbol:!1,title:"",titleId:null,transform:null,swapOpacity:!1},x=o().forwardRef(function(e,t){var r,a,l,s,o,i,u,p,m,b,x,O,w,N,T,E,k,_,R,S=c(c({},v),e),C=S.icon,A=S.mask,M=S.symbol,z=S.className,P=S.title,I=S.titleId,L=S.maskId,Z=y(C),D=g("classes",[].concat(f((a=S.beat,l=S.fade,s=S.beatFade,o=S.bounce,i=S.shake,u=S.flash,p=S.spin,m=S.spinPulse,b=S.spinReverse,x=S.pulse,O=S.fixedWidth,w=S.inverse,N=S.border,T=S.listItem,E=S.flip,k=S.size,_=S.rotation,R=S.pull,Object.keys((d(r={"fa-beat":a,"fa-fade":l,"fa-beat-fade":s,"fa-bounce":o,"fa-shake":i,"fa-flash":u,"fa-spin":p,"fa-spin-reverse":b,"fa-spin-pulse":m,"fa-pulse":x,"fa-fw":O,"fa-inverse":w,"fa-border":N,"fa-li":T,"fa-flip":!0===E,"fa-flip-horizontal":"horizontal"===E||"both"===E,"fa-flip-vertical":"vertical"===E||"both"===E},"fa-".concat(k),null!=k),d(r,"fa-rotate-".concat(_),null!=_&&0!==_),d(r,"fa-pull-".concat(R),null!=R),d(r,"fa-swap-opacity",S.swapOpacity),r)).map(function(e){return r[e]?e:null}).filter(function(e){return e}))),f((z||"").split(" ")))),$=g("transform","string"==typeof S.transform?n.Qc.transform(S.transform):S.transform),F=g("mask",y(A)),B=(0,n.qv)(Z,c(c(c(c({},D),$),F),{},{symbol:M,title:P,titleId:I,maskId:L}));if(!B)return function(){if(!h&&console&&"function"==typeof console.error){var e;(e=console).error.apply(e,arguments)}}("Could not find icon",Z),null;var W=B.abstract,H={ref:t};return Object.keys(S).forEach(function(e){v.hasOwnProperty(e)||(H[e]=S[e])}),j(W[0],H)});x.displayName="FontAwesomeIcon",x.propTypes={beat:l().bool,border:l().bool,beatFade:l().bool,bounce:l().bool,className:l().string,fade:l().bool,flash:l().bool,mask:l().oneOfType([l().object,l().array,l().string]),maskId:l().string,fixedWidth:l().bool,inverse:l().bool,flip:l().oneOf([!0,!1,"horizontal","vertical","both"]),icon:l().oneOfType([l().object,l().array,l().string]),listItem:l().bool,pull:l().oneOf(["right","left"]),pulse:l().bool,rotation:l().oneOf([0,90,180,270]),shake:l().bool,size:l().oneOf(["2xs","xs","sm","lg","xl","2xl","1x","2x","3x","4x","5x","6x","7x","8x","9x","10x"]),spin:l().bool,spinPulse:l().bool,spinReverse:l().bool,symbol:l().oneOfType([l().bool,l().string]),title:l().string,titleId:l().string,transform:l().oneOfType([l().string,l().object]),swapOpacity:l().bool};var j=(function e(t,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if("string"==typeof r)return r;var a=(r.children||[]).map(function(r){return e(t,r)}),l=Object.keys(r.attributes||{}).reduce(function(e,t){var n=r.attributes[t];switch(t){case"class":e.attrs.className=n,delete r.attributes.class;break;case"style":e.attrs.style=n.split(";").map(function(e){return e.trim()}).filter(function(e){return e}).reduce(function(e,t){var r=t.indexOf(":"),n=m(t.slice(0,r)),a=t.slice(r+1).trim();return n.startsWith("webkit")?e[n.charAt(0).toUpperCase()+n.slice(1)]=a:e[n]=a,e},{});break;default:0===t.indexOf("aria-")||0===t.indexOf("data-")?e.attrs[t.toLowerCase()]=n:e.attrs[m(t)]=n}return e},{attrs:{}}),s=n.style,o=function(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},l=Object.keys(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(n,b);return l.attrs.style=c(c({},l.attrs.style),void 0===s?{}:s),t.apply(void 0,[r.tag,c(c({},l.attrs),o)].concat(f(a)))}).bind(null,o().createElement)},29692:(e,t,r)=>{"use strict";var n=r(47290);function a(){}function l(){}l.resetWarningCache=a,e.exports=function(){function e(e,t,r,a,l,s){if(s!==n){var o=Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw o.name="Invariant Violation",o}}function t(){return e}e.isRequired=e;var r={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:l,resetWarningCache:a};return r.PropTypes=r,r}},3183:(e,t,r)=>{e.exports=r(29692)()},47290:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},16500:(e,t,r)=>{"use strict";r.d(t,{Z:()=>n});let n=(0,r(68570).createProxy)(String.raw`/home/runner/work/buttler/buttler/node_modules/react-bootstrap/esm/Table.js#default`)},67815:(e,t)=>{var r;!function(){"use strict";var n={}.hasOwnProperty;function a(){for(var e="",t=0;t<arguments.length;t++){var r=arguments[t];r&&(e=l(e,function(e){if("string"==typeof e||"number"==typeof e)return e;if("object"!=typeof e)return"";if(Array.isArray(e))return a.apply(null,e);if(e.toString!==Object.prototype.toString&&!e.toString.toString().includes("[native code]"))return e.toString();var t="";for(var r in e)n.call(e,r)&&e[r]&&(t=l(t,r));return t}(r)))}return e}function l(e,t){return t?e?e+" "+t:e+t:e}e.exports?(a.default=a,e.exports=a):void 0!==(r=(function(){return a}).apply(t,[]))&&(e.exports=r)}()},4776:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>d});var n=r(10326),a=r(17577),l=r(54854),s=r(20936),o=r(61959),i=r(46395),c=r(24772),u=r(44316);let d=({buttonVariant:e="primary",buttonStretched:t=!1,buttonSize:r,buttonIcon:d,buttonText:f,disabled:p=!1,title:m,action:b,confirmVariant:h="primary",confirmText:y,cancelText:g,children:v})=>{let[x,j]=(0,a.useState)(!1);return(0,n.jsxs)(n.Fragment,{children:[d?(0,n.jsx)(i.Z,{icon:d,text:f,variant:e,size:r,onClick:()=>j(!0),disabled:p,stretched:t}):(0,n.jsx)(l.default,{variant:e,onClick:()=>j(!0),children:f}),(0,n.jsx)(o.Z,{show:x,backdrop:"static",onHide:()=>j(!1),children:(0,n.jsxs)(s.Z,{action:b,children:[(0,n.jsx)(c.Z,{onComplete:()=>j(!1)}),(0,n.jsx)(o.Z.Header,{closeButton:!0,children:(0,n.jsx)(o.Z.Title,{children:m})}),(0,n.jsx)(o.Z.Body,{className:"d-flex flex-column gap-3",children:v}),(0,n.jsxs)(o.Z.Footer,{children:[(0,n.jsx)(u.default,{variant:h,text:y}),(0,n.jsx)(i.Z,{variant:"secondary",text:g,onClick:()=>j(!1)})]})]})})]})}},24772:(e,t,r)=>{"use strict";r.d(t,{Z:()=>s});var n=r(10326),a=r(17577),l=r(60962);let s=({onComplete:e})=>{let{pending:t}=(0,l.useFormStatus)(),r=(0,a.useRef)(!1);return(0,a.useEffect)(()=>{r.current&&!t&&e(),r.current=t},[t]),(0,n.jsx)(n.Fragment,{})}},21266:(e,t,r)=>{"use strict";r.d(t,{Z:()=>p});var n=r(19510),a=r(95262),l=r(67815),s=r(16500),o=r(49554),i=r(62872),c=r(54045);let u=({title:e,description:t,action:r,confirmText:a,cancelText:l,disabled:s=!1})=>(0,n.jsx)(c.Z,{buttonIcon:i.Vu,buttonSize:"sm",buttonVariant:"outline-danger",disabled:s,title:e,action:r,confirmVariant:"danger",confirmText:a,cancelText:l,children:t});var d=r(94544),f=r(15452);let p=({link:e,collection:t,primaryKey:r,bodyWrap:i=!1,schema:c,editLink:p,destroyAction:m,destroyWarningTitle:b,destroyWarningDescription:h,destroyConfirmText:y,destroyCancelText:g,destroyDisabled:v=!1})=>{function x(e,t){return"string"==typeof e?`${e.slice(0,t)}${e.length>t?"...":""}`:e}return(0,n.jsxs)(s.Z,{striped:!0,hover:!0,className:l(o.table,"mb-0"),children:[(0,n.jsx)("thead",{className:"text-nowrap",children:(0,n.jsxs)("tr",{children:[Object.entries(c).map(([e,t])=>(0,n.jsx)("th",{className:l("pt-0",{"d-none":!!t.size,"d-sm-table-cell":"sm"===t.size,"d-md-table-cell":"md"===t.size}),children:t.header},e)),(0,n.jsx)("th",{className:"pt-0",children:"\xa0"})]})}),(0,n.jsx)("tbody",{className:l({"text-nowrap":!i}),children:t.map(t=>(0,n.jsxs)("tr",{children:[Object.entries(c).map(([e,a])=>(0,n.jsx)(f.Z,{className:l({"d-none":!!a.size,"d-sm-table-cell":"sm"===a.size,"d-md-table-cell":"md"===a.size}),disabled:!a.long,children:a.wrapper?a.wrapper(x(t[e],120),t[r],t):x(t[e],120)},e)),(0,n.jsx)("td",{className:o.actions,children:(0,n.jsxs)("div",{className:"d-flex justify-content-end gap-2",children:[p&&(0,n.jsx)(d.Z,{as:e,variant:"outline-secondary",icon:a.Tz,href:p(t[r]),size:"sm"}),m&&(0,n.jsx)(u,{title:b,description:h,action:m.bind(null,t[r]),confirmText:y,cancelText:g,disabled:"function"==typeof v?v(t[r]):v})]})})]},t[r]))})]})}},94544:(e,t,r)=>{"use strict";r.d(t,{Z:()=>c});var n=r(19510),a=r(71839),l=r(67815),s=r(67666);let o=(0,r(68570).createProxy)(String.raw`/home/runner/work/buttler/buttler/node_modules/react-bootstrap/esm/Button.js#default`),i=({type:e="button",text:t,icon:r,variant:i="primary",size:c,onClick:u,disabled:d=!1,spinning:f=!1,className:p,stretched:m=!1})=>(0,n.jsxs)(o,{type:e,size:c,variant:i,className:p,onClick:u,disabled:d||f,children:[r?(0,n.jsx)(a.G,{size:"lg",icon:f?s.LM:r,className:l("fa-fw",{"fa-spin":f})}):f&&(0,n.jsx)(a.G,{size:"lg",icon:s.LM,className:"fa-fw fa-spin"}),t&&(0,n.jsx)("span",{className:r?l("ms-2",m?"me-4":"me-2"):void 0,children:t})]}),c=({as:e,variant:t="primary",size:r,icon:s,href:o,text:c,disabled:u=!1,stretched:d=!1})=>u?(0,n.jsx)(i,{variant:t,size:r,icon:s,text:c,disabled:u,stretched:d}):(0,n.jsxs)(e,{href:o,className:l("btn",`btn-${t}`,{"btn-sm":"sm"===r,"btn-lg":"lg"===r}),children:[s&&(0,n.jsx)(a.G,{size:"lg",icon:s,className:"fa-fw"}),c&&(0,n.jsx)("span",{className:s?l("ms-2",d?"me-4":"me-2"):void 0,children:c})]})},15452:(e,t,r)=>{"use strict";r.d(t,{Z:()=>s});var n=r(19510),a=r(67815),l=r(96980);let s=({className:e,disabled:t=!1,children:r})=>(0,n.jsx)("td",{className:a(!t&&l.ellipsis,e),children:t?r:(0,n.jsx)("div",{children:(0,n.jsx)("span",{children:r})})})},54045:(e,t,r)=>{"use strict";r.d(t,{Z:()=>n});let n=(0,r(68570).createProxy)(String.raw`/home/runner/work/buttler/buttler/node_modules/@omer-x/bs-ui-kit/dist/components/form/ModalForm.js#default`)}};