Files
aicyclingcoach-go/frontend/.next/static/chunks/436-767e2150291996f3.js
2025-09-11 13:17:45 -07:00

20 lines
22 KiB
JavaScript

(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[436],{325:function(e,t,r){"use strict";var n=r(968);function o(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?o(Object(r),!0).forEach(function(t){n(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):o(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{default:function(){return s},noSSR:function(){return c}});var u=r(8754);r(5893),r(7294);var a=u._(r(8809));function l(e){return{default:(null==e?void 0:e.default)||e}}function c(e,t){return delete t.webpack,delete t.modules,e(t)}function s(e,t){var r=a.default,n={loading:function(e){return e.error,e.isLoading,e.pastDelay,null}};e instanceof Promise?n.loader=function(){return e}:"function"==typeof e?n.loader=e:"object"==typeof e&&(n=i(i({},n),e));var o=(n=i(i({},n),t)).loader;return(n.loadableGenerated&&(n=i(i({},n),n.loadableGenerated),delete n.loadableGenerated),"boolean"!=typeof n.ssr||n.ssr)?r(i(i({},n),{},{loader:function(){return null!=o?o().then(l):Promise.resolve(l(function(){return null}))}})):(delete n.webpack,delete n.modules,c(r,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)},2362:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"LoadableContext",{enumerable:!0,get:function(){return n}});var n=r(8754)._(r(7294)).default.createContext(null)},8809:function(e,t,r){"use strict";/**
@copyright (c) 2017-present James Kyle <me@thejameskyle.com>
MIT License
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE
*/var n=r(968),o=r(3322),i=r(6089);function u(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 a(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?u(Object(r),!0).forEach(function(t){n(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):u(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function l(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}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return g}});var c=r(8754)._(r(7294)),s=r(2362),f=[],d=[],p=!1;function m(e){var t=e(),r={loading:!0,loaded:null,error:null};return r.promise=t.then(function(e){return r.loading=!1,r.loaded=e,e}).catch(function(e){throw r.loading=!1,r.error=e,e}),r}var y=function(){function e(t,r){o(this,e),this._loadFn=t,this._opts=r,this._callbacks=new Set,this._delay=null,this._timeout=null,this.retry()}return i(e,[{key:"promise",value:function(){return this._res.promise}},{key:"retry",value:function(){var e=this;this._clearTimeouts(),this._res=this._loadFn(this._opts.loader),this._state={pastDelay:!1,timedOut:!1};var t=this._res,r=this._opts;t.loading&&("number"==typeof r.delay&&(0===r.delay?this._state.pastDelay=!0:this._delay=setTimeout(function(){e._update({pastDelay:!0})},r.delay)),"number"==typeof r.timeout&&(this._timeout=setTimeout(function(){e._update({timedOut:!0})},r.timeout))),this._res.promise.then(function(){e._update({}),e._clearTimeouts()}).catch(function(t){e._update({}),e._clearTimeouts()}),this._update({})}},{key:"_update",value:function(e){this._state=a(a({},this._state),{},{error:this._res.error,loaded:this._res.loaded,loading:this._res.loading},e),this._callbacks.forEach(function(e){return e()})}},{key:"_clearTimeouts",value:function(){clearTimeout(this._delay),clearTimeout(this._timeout)}},{key:"getCurrentValue",value:function(){return this._state}},{key:"subscribe",value:function(e){var t=this;return this._callbacks.add(e),function(){t._callbacks.delete(e)}}}]),e}();function b(e){return function(e,t){var r=Object.assign({loader:null,loading:null,delay:200,timeout:null,webpack:null,modules:null},t),n=null;function o(){if(!n){var t=new y(e,r);n={getCurrentValue:t.getCurrentValue.bind(t),subscribe:t.subscribe.bind(t),retry:t.retry.bind(t),promise:t.promise.bind(t)}}return n.promise()}if(!p){var i=r.webpack?r.webpack():r.modules;i&&d.push(function(e){var t,r=function(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return l(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 l(e,void 0)}}(e))){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,u=!0,a=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return u=e.done,e},e:function(e){a=!0,i=e},f:function(){try{u||null==r.return||r.return()}finally{if(a)throw i}}}}(i);try{for(r.s();!(t=r.n()).done;){var n=t.value;if(e.includes(n))return o()}}catch(e){r.e(e)}finally{r.f()}})}function u(e,t){o(),(i=c.default.useContext(s.LoadableContext))&&Array.isArray(r.modules)&&r.modules.forEach(function(e){i(e)});var i,u=c.default.useSyncExternalStore(n.subscribe,n.getCurrentValue,n.getCurrentValue);return c.default.useImperativeHandle(t,function(){return{retry:n.retry}},[]),c.default.useMemo(function(){var t;return u.loading||u.error?c.default.createElement(r.loading,{isLoading:u.loading,pastDelay:u.pastDelay,timedOut:u.timedOut,error:u.error,retry:n.retry}):u.loaded?c.default.createElement((t=u.loaded)&&t.default?t.default:t,e):null},[e,u])}return u.preload=function(){return o()},u.displayName="LoadableComponent",c.default.forwardRef(u)}(m,e)}function h(e,t){for(var r=[];e.length;){var n=e.pop();r.push(n(t))}return Promise.all(r).then(function(){if(e.length)return h(e,t)})}b.preloadAll=function(){return new Promise(function(e,t){h(f).then(e,t)})},b.preloadReady=function(e){return void 0===e&&(e=[]),new Promise(function(t){var r=function(){return p=!0,t()};h(d,e).then(r,r)})},window.__NEXT_PRELOADREADY=b.preloadReady;var g=b},3454:function(e,t,r){"use strict";var n,o;e.exports=(null==(n=r.g.process)?void 0:n.env)&&"object"==typeof(null==(o=r.g.process)?void 0:o.env)?r.g.process:r(7663)},7663:function(e){!function(){var t={229:function(e){var t,r,n,o=e.exports={};function i(){throw Error("setTimeout has not been defined")}function u(){throw Error("clearTimeout has not been defined")}function a(e){if(t===setTimeout)return setTimeout(e,0);if((t===i||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(r){try{return t.call(null,e,0)}catch(r){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:i}catch(e){t=i}try{r="function"==typeof clearTimeout?clearTimeout:u}catch(e){r=u}}();var l=[],c=!1,s=-1;function f(){c&&n&&(c=!1,n.length?l=n.concat(l):s=-1,l.length&&d())}function d(){if(!c){var e=a(f);c=!0;for(var t=l.length;t;){for(n=l,l=[];++s<t;)n&&n[s].run();s=-1,t=l.length}n=null,c=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===u||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function p(e,t){this.fun=e,this.array=t}function m(){}o.nextTick=function(e){var t=Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];l.push(new p(e,t)),1!==l.length||c||a(d)},p.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=m,o.addListener=m,o.once=m,o.off=m,o.removeListener=m,o.removeAllListeners=m,o.emit=m,o.prependListener=m,o.prependOnceListener=m,o.listeners=function(e){return[]},o.binding=function(e){throw Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(e){throw Error("process.chdir is not supported")},o.umask=function(){return 0}}},r={};function n(e){var o=r[e];if(void 0!==o)return o.exports;var i=r[e]={exports:{}},u=!0;try{t[e](i,i.exports,n),u=!1}finally{u&&delete r[e]}return i.exports}n.ab="//";var o=n(229);e.exports=o}()},5152:function(e,t,r){e.exports=r(325)},5153:function(e,t,r){"use strict";var n,o;function i(e,t){return Array.from(e.getElementsByTagName(t))}function u(e){return e?.normalize(),e?.textContent||""}function a(e,t,r){let n=e.getElementsByTagName(t),o=n.length?n[0]:null;return o&&r&&r(o),o}function l(e,t,r){let n=u(a(e,t));return n&&r&&r(n)||{}}function c(e,t,r){let n=Number.parseFloat(u(a(e,t)));if(!Number.isNaN(n))return n&&r&&r(n)||{}}function s(e,t){let r={};for(let n of t)l(e,n,e=>{r[n]=e});return r}function f(e){let t=[Number.parseFloat(e.getAttribute("lon")||""),Number.parseFloat(e.getAttribute("lat")||"")];if(Number.isNaN(t[0])||Number.isNaN(t[1]))return null;!function(e,t,r){let n=Number.parseFloat(u(a(e,"ele")));!Number.isNaN(n)&&r&&r(n)}(e,0,e=>{t.push(e)});let r=a(e,"time");return{coordinates:t,time:r?u(r):null,extendedValues:function e(t){let r=[];if(null===t)return r;for(let o of Array.from(t.childNodes)){var n;if(o?.nodeType!==1)continue;let t=["heart","gpxtpx:hr","hr"].includes(n=o.nodeName)?"heart":n;if("gpxtpx:TrackPointExtension"===t)r=r.concat(e(o));else{let e=u(o);r.push([t,function(e){let t=Number.parseFloat(e);return Number.isNaN(t)?e:t}(e)])}}return r}(a(e,"extensions"))}}function d(e){return function(e,t,r){let n={};if(!e)return n;let o=e.getElementsByTagName(t),i=o.length?o[0]:null;return i&&r?r(i,n):n}(e,"line",e=>Object.assign({},l(e,"color",e=>({stroke:`#${e}`})),c(e,"opacity",e=>({"stroke-opacity":e})),c(e,"width",e=>({"stroke-width":96*e/25.4}))))}function p(e,t){let r=s(t,["name","cmt","desc","type","time","keywords"]);for(let[n,o]of e)for(let e of Array.from(t.getElementsByTagNameNS(o,"*")))r[e.tagName.replace(":","_")]=u(e)?.trim();let n=i(t,"link");return n.length&&(r.links=n.map(e=>Object.assign({href:e.getAttribute("href")},s(e,["text","type"])))),r}function m(e,t){let r=i(e,t),n=[],o=[],u={};for(let e=0;e<r.length;e++){let t=f(r[e]);if(t)for(let[i,a]of(n.push(t.coordinates),t.time&&o.push(t.time),t.extendedValues)){let t="heart"===i?i:`${i.replace("gpxtpx:","")}s`;u[t]||(u[t]=Array(r.length).fill(null)),u[t][e]=a}}if(!(n.length<2))return{line:n,times:o,extendedValues:u}}function y(e){return{type:"FeatureCollection",features:Array.from(function*(e){let t="http://www.garmin.com/xmlschemas/GpxExtensions/v3",r=[["gpxx",t]],n=e.getElementsByTagName("gpx")[0]?.attributes;if(n)for(let e of Array.from(n))e.name?.startsWith("xmlns:")&&e.value!==t&&r.push([e.name,e.value]);for(let t of i(e,"trk")){let e=function(e,t){let r=i(t,"trkseg"),n=[],o=[],u=[];for(let e of r){let t=m(e,"trkpt");t&&(u.push(t),t.times?.length&&o.push(t.times))}if(0===u.length)return null;let l=u.length>1,c=Object.assign({_gpxType:"trk"},p(e,t),d(a(t,"extensions")),o.length?{coordinateProperties:{times:l?o:o[0]}}:{});for(let e=0;e<u.length;e++){let t=u[e];n.push(t.line),c.coordinateProperties||(c.coordinateProperties={});let r=c.coordinateProperties;for(let[n,o]of Object.entries(t.extendedValues))l?(r[n]||(r[n]=u.map(e=>Array(e.line.length).fill(null))),r[n][e]=o):r[n]=o}return{type:"Feature",properties:c,geometry:l?{type:"MultiLineString",coordinates:n}:{type:"LineString",coordinates:n[0]}}}(r,t);e&&(yield e)}for(let t of i(e,"rte")){let e=function(e,t){let r=m(t,"rtept");if(r)return{type:"Feature",properties:Object.assign({_gpxType:"rte"},p(e,t),d(a(t,"extensions"))),geometry:{type:"LineString",coordinates:r.line}}}(r,t);e&&(yield e)}for(let t of i(e,"wpt")){let e=function(e,t){let r=Object.assign(p(e,t),s(t,["sym"])),n=f(t);return n?{type:"Feature",properties:r,geometry:{type:"Point",coordinates:n.coordinates}}:null}(r,t);e&&(yield e)}}(e))}}r.d(t,{ng:function(){return y}}),(o=n||(n={})).ABSOLUTE="absolute",o.RELATIVE_TO_GROUND="relativeToGround",o.CLAMP_TO_GROUND="clampToGround",o.CLAMP_TO_SEAFLOOR="clampToSeaFloor",o.RELATIVE_TO_SEAFLOOR="relativeToSeaFloor"},8628:function(e,t,r){"use strict";r.d(t,{w_:function(){return s}});var n=r(7294),o={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},i=n.createContext&&n.createContext(o),u=["attr","size","title"];function a(){return(a=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function l(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?l(Object(r),!0).forEach(function(t){var n,o;n=t,o=r[t],(n=function(e){var t=function(e,t){if("object"!=typeof e||!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:t+""}(n))in e?Object.defineProperty(e,n,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[n]=o}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):l(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function s(e){return function(t){return n.createElement(f,a({attr:c({},e.attr)},t),function e(t){return t&&t.map(function(t,r){return n.createElement(t.tag,c({key:r},t.attr),e(t.child))})}(e.child))}}function f(e){var t=function(t){var r,o=e.attr,i=e.size,l=e.title,s=function(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(e,u),f=i||t.size||"1em";return t.className&&(r=t.className),e.className&&(r=(r?r+" ":"")+e.className),n.createElement("svg",a({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},t.attr,o,s,{className:r,style:c(c({color:e.color||t.color},t.style),e.style),height:f,width:f,xmlns:"http://www.w3.org/2000/svg"}),l&&n.createElement("title",null,l),e.children)};return void 0!==i?n.createElement(i.Consumer,null,function(e){return t(e)}):t(o)}},2587:function(e,t,r){"use strict";function n(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}r.d(t,{Z:function(){return n}})},8307:function(e,t,r){"use strict";function n(e){return(n="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 o(e,t,r){var o;return o=function(e,t){if("object"!==n(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var o=r.call(e,t||"default");if("object"!==n(o))return o;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(t,"string"),(t="symbol"===n(o)?o:String(o))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}r.d(t,{Z:function(){return o}})},6835:function(e,t,r){"use strict";r.d(t,{Z:function(){return o}});var n=r(2937);function o(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,u,a=[],l=!0,c=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=i.call(r)).done)&&(a.push(n.value),a.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=r.return&&(u=r.return(),Object(u)!==u))return}finally{if(c)throw o}}return a}}(e,t)||(0,n.Z)(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}},7812:function(e,t,r){"use strict";r.d(t,{Z:function(){return i}});var n=r(2587),o=r(2937);function i(e){return function(e){if(Array.isArray(e))return(0,n.Z)(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||(0,o.Z)(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.")}()}},2937:function(e,t,r){"use strict";r.d(t,{Z:function(){return o}});var n=r(2587);function o(e,t){if(e){if("string"==typeof e)return(0,n.Z)(e,t);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(0,n.Z)(e,t)}}},5678:function(e,t,r){"use strict";var n=r(7294);let o=e=>"number"==typeof e&&!isNaN(e),i=e=>"string"==typeof e,u=e=>"function"==typeof e,a=e=>(0,n.isValidElement)(e)||i(e)||u(e)||o(e);function l(e){let{enter:t,exit:r,appendPosition:o=!1,collapse:i=!0,collapseDuration:u=300}=e;return function(e){let{children:a,position:l,preventExitTransition:c,done:s,nodeRef:f,isIn:d,playToast:p}=e,m=o?`${t}--${l}`:t,y=o?`${r}--${l}`:r,b=(0,n.useRef)(0);return(0,n.useLayoutEffect)(()=>{let e=f.current,t=m.split(" "),r=n=>{n.target===f.current&&(p(),e.removeEventListener("animationend",r),e.removeEventListener("animationcancel",r),0===b.current&&"animationcancel"!==n.type&&e.classList.remove(...t))};e.classList.add(...t),e.addEventListener("animationend",r),e.addEventListener("animationcancel",r)},[]),(0,n.useEffect)(()=>{let e=f.current,t=()=>{e.removeEventListener("animationend",t),i?function(e,t,r){void 0===r&&(r=300);let{scrollHeight:n,style:o}=e;requestAnimationFrame(()=>{o.minHeight="initial",o.height=n+"px",o.transition=`all ${r}ms`,requestAnimationFrame(()=>{o.height="0",o.padding="0",o.margin="0",setTimeout(t,r)})})}(e,s,u):s()};d||(c?t():(b.current=1,e.className+=` ${y}`,e.addEventListener("animationend",t)))},[d]),n.createElement(n.Fragment,null,a)}}let c=new Map,s=[],f=new Set,d=()=>c.size>0;function p(e,t){c.forEach(r=>{null!=t&&null!=t&&t.containerId?(null==t?void 0:t.containerId)===r.id&&r.toggle(e,null==t?void 0:t.id):r.toggle(e,null==t?void 0:t.id)})}let m=1,y=()=>""+m++;function b(e,t){return a(e)&&(d()||s.push({content:e,options:t}),c.forEach(r=>{r.buildToast(e,t)})),t.toastId}function h(e,t){return{...t,type:t&&t.type||e,toastId:t&&(i(t.toastId)||o(t.toastId))?t.toastId:y()}}function g(e){return(t,r)=>b(t,h(e,r))}function v(e,t){return b(e,h("default",t))}v.loading=(e,t)=>b(e,h("default",{isLoading:!0,autoClose:!1,closeOnClick:!1,closeButton:!1,draggable:!1,...t})),v.promise=function(e,t,r){let n,{pending:o,error:a,success:l}=t;o&&(n=i(o)?v.loading(o,r):v.loading(o.render,{...r,...o}));let c={isLoading:null,autoClose:null,closeOnClick:null,closeButton:null,draggable:null},s=(e,t,o)=>{if(null==t)return void v.dismiss(n);let u={type:e,...c,...r,data:o},a=i(t)?{render:t}:t;return n?v.update(n,{...u,...a}):v(a.render,{...u,...a}),o},f=u(e)?e():e;return f.then(e=>s("success",l,e)).catch(e=>s("error",a,e)),f},v.success=g("success"),v.info=g("info"),v.error=g("error"),v.warning=g("warning"),v.warn=v.warning,v.dark=(e,t)=>b(e,h("default",{theme:"dark",...t})),v.dismiss=function(e){!function(e){var t;if(d()){if(null==e||i(t=e)||o(t))c.forEach(t=>{t.removeToast(e)});else if(e&&("containerId"in e||"id"in e)){let t=c.get(e.containerId);t?t.removeToast(e.id):c.forEach(t=>{t.removeToast(e.id)})}}else s=s.filter(t=>null!=e&&t.options.toastId!==e)}(e)},v.clearWaitingQueue=function(e){void 0===e&&(e={}),c.forEach(t=>{!t.props.limit||e.containerId&&t.id!==e.containerId||t.clearQueue()})},v.isActive=function(e,t){var r;if(t)return!(null==(r=c.get(t))||!r.isToastActive(e));let n=!1;return c.forEach(t=>{t.isToastActive(e)&&(n=!0)}),n},v.update=function(e,t){void 0===t&&(t={});let r=((e,t)=>{var r;let{containerId:n}=t;return null==(r=c.get(n||1))?void 0:r.toasts.get(e)})(e,t);if(r){let{props:n,content:o}=r,i={delay:100,...n,...t,toastId:t.toastId||e,updateId:y()};i.toastId!==e&&(i.staleId=e);let u=i.render||o;delete i.render,b(u,i)}},v.done=e=>{v.update(e,{progress:1})},v.onChange=function(e){return f.add(e),()=>{f.delete(e)}},v.play=e=>p(!0,e),v.pause=e=>p(!1,e),"undefined"!=typeof window?n.useLayoutEffect:n.useEffect;let O=function(e,t){return void 0===t&&(t=!1),{enter:`Toastify--animate Toastify__${e}-enter`,exit:`Toastify--animate Toastify__${e}-exit`,appendPosition:t}};l(O("bounce",!0)),l(O("slide",!0)),l(O("zoom")),l(O("flip"))}}]);