From c475d5efa0c534de083fa20720aaa86808239bd6 Mon Sep 17 00:00:00 2001 From: bricel <165644+bricel@users.noreply.github.com> Date: Tue, 17 Sep 2024 13:34:19 +0300 Subject: [PATCH] s --- stable/user-ui/asset-manifest.json | 6 +++--- stable/user-ui/index.html | 2 +- stable/user-ui/manifest.json | 4 ++-- .../static/js/{main.984527a8.js => main.904a57ca.js} | 6 +++--- ...984527a8.js.LICENSE.txt => main.904a57ca.js.LICENSE.txt} | 0 .../js/{main.984527a8.js.map => main.904a57ca.js.map} | 2 +- 6 files changed, 10 insertions(+), 10 deletions(-) rename stable/user-ui/static/js/{main.984527a8.js => main.904a57ca.js} (62%) rename stable/user-ui/static/js/{main.984527a8.js.LICENSE.txt => main.904a57ca.js.LICENSE.txt} (100%) rename stable/user-ui/static/js/{main.984527a8.js.map => main.904a57ca.js.map} (56%) diff --git a/stable/user-ui/asset-manifest.json b/stable/user-ui/asset-manifest.json index cb6f3d8..87df722 100644 --- a/stable/user-ui/asset-manifest.json +++ b/stable/user-ui/asset-manifest.json @@ -1,14 +1,14 @@ { "files": { "main.css": "/static/css/main.4f05a361.css", - "main.js": "/static/js/main.984527a8.js", + "main.js": "/static/js/main.904a57ca.js", "index.html": "/index.html", "static/media/getFetch.cjs": "/static/media/getFetch.c4cca45e22bc1b2c7d0d.cjs", "main.4f05a361.css.map": "/static/css/main.4f05a361.css.map", - "main.984527a8.js.map": "/static/js/main.984527a8.js.map" + "main.904a57ca.js.map": "/static/js/main.904a57ca.js.map" }, "entrypoints": [ "static/css/main.4f05a361.css", - "static/js/main.984527a8.js" + "static/js/main.904a57ca.js" ] } \ No newline at end of file diff --git a/stable/user-ui/index.html b/stable/user-ui/index.html index 95646ae..d5119f4 100644 --- a/stable/user-ui/index.html +++ b/stable/user-ui/index.html @@ -1 +1 @@ -
e.y-t.y)),n=[];let r=null;for(let a=0;a e.y-t.y)),n=[];let r=null;for(let a=0;ae?n:n-o}Ft(e,d)&&(d=c)}if(n.key===Pt&&(u&&I(n),-1===c?d=s:(d=At(e,{startingIndex:c,amount:o,disabledIndices:i}),a&&c+o>l&&(d=At(e,{startingIndex:c%o-o,amount:o,disabledIndices:i}))),Ft(e,d)&&(d=c)),"both"===r){const t=Y(c/o);n.key===zt&&(u&&I(n),c%o!==o-1?(d=At(e,{startingIndex:c,disabledIndices:i}),a&&_t(d,o,t)&&(d=At(e,{startingIndex:c-c%o-1,disabledIndices:i}))):a&&(d=At(e,{startingIndex:c-c%o-1,disabledIndices:i})),_t(d,o,t)&&(d=c)),n.key===Ot&&(u&&I(n),c%o!==0?(d=At(e,{startingIndex:c,decrement:!0,disabledIndices:i}),a&&_t(d,o,t)&&(d=At(e,{startingIndex:c+(o-c%o),decrement:!0,disabledIndices:i}))):a&&(d=At(e,{startingIndex:c+(o-c%o),decrement:!0,disabledIndices:i})),_t(d,o,t)&&(d=c));const r=Y(l/o)===t;Ft(e,d)&&(d=a&&r?n.key===Ot?l:At(e,{startingIndex:c-c%o-1,disabledIndices:i}):c)}return d}function Tt(e,t,n){const r=[];let a=0;return e.forEach(((e,o)=>{let{width:i,height:s}=e,l=!1;for(n&&(a=0);!l;){const e=[];for(let n=0;nnull==r[e]))?(e.forEach((e=>{r[e]=o})),l=!0):a++}})),[...r]}function It(e,t,n,r,a){if(-1===e)return-1;const o=n.indexOf(e),i=t[e];switch(a){case"tl":return o;case"tr":return i?o+i.width-1:o;case"bl":return i?o+(i.height-1)*r:o;case"br":return n.lastIndexOf(e)}}function Lt(e,t){return t.flatMap(((t,n)=>e.includes(t)?[n]:[]))}function Rt(e,t,n){if(n)return n.includes(t);const r=e[t];return null==r||r.hasAttribute("disabled")||"true"===r.getAttribute("aria-disabled")}let Bt=0;function Ht(e,t){void 0===t&&(t={});const{preventScroll:n=!1,cancelPrevious:r=!0,sync:a=!1}=t;r&&cancelAnimationFrame(Bt);const o=()=>null==e?void 0:e.focus({preventScroll:n});a?o():Bt=requestAnimationFrame(o)}var Vt="undefined"!==typeof document?r.useLayoutEffect:r.useEffect;function Wt(e,t){const n=e.compareDocumentPosition(t);return n&Node.DOCUMENT_POSITION_FOLLOWING||n&Node.DOCUMENT_POSITION_CONTAINED_BY?-1:n&Node.DOCUMENT_POSITION_PRECEDING||n&Node.DOCUMENT_POSITION_CONTAINS?1:0}const Ut=r.createContext({register:()=>{},unregister:()=>{},map:new Map,elementsRef:{current:[]}});function Yt(e){const{children:t,elementsRef:n,labelsRef:a}=e,[o,i]=r.useState((()=>new Map)),s=r.useCallback((e=>{i((t=>new Map(t).set(e,null)))}),[]),l=r.useCallback((e=>{i((t=>{const n=new Map(t);return n.delete(e),n}))}),[]);return Vt((()=>{const e=new Map(o);Array.from(e.keys()).sort(Wt).forEach(((t,n)=>{e.set(t,n)})),function(e,t){if(e.size!==t.size)return!1;for(const[n,r]of e.entries())if(r!==t.get(n))return!1;return!0}(o,e)||i(e)}),[o]),r.createElement(Ut.Provider,{value:r.useMemo((()=>({register:s,unregister:l,map:o,elementsRef:n,labelsRef:a})),[s,l,o,n,a])},t)}function qt(e){void 0===e&&(e={});const{label:t}=e,{register:n,unregister:a,map:o,elementsRef:i,labelsRef:s}=r.useContext(Ut),[l,c]=r.useState(null),u=r.useRef(null),d=r.useCallback((e=>{if(u.current=e,null!==l&&(i.current[l]=e,s)){var n;const r=void 0!==t;s.current[l]=r?t:null!=(n=null==e?void 0:e.textContent)?n:null}}),[l,i,s,t]);return Vt((()=>{const e=u.current;if(e)return n(e),()=>{a(e)}}),[n,a]),Vt((()=>{const e=u.current?o.get(u.current):null;null!=e&&c(e)}),[o]),r.useMemo((()=>({ref:d,index:null==l?-1:l})),[l,d])}function Kt(e,t){return"function"===typeof e?e(t):e?r.cloneElement(e,t):r.createElement("div",t)}const Gt=r.createContext({activeIndex:0,onNavigate:()=>{}}),Qt=[Ot,zt],Zt=[Dt,Pt],Xt=[...Qt,...Zt],Jt=r.forwardRef((function(e,t){const{render:n,orientation:a="both",loop:o=!0,cols:i=1,disabledIndices:s,activeIndex:l,onNavigate:c,itemSizes:u,dense:d=!1,...f}=e,[h,p]=r.useState(0),m=null!=l?l:h,g=Ct(null!=c?c:p),v=r.useRef([]),y=n&&"function"!==typeof n?n.props:{},b=r.useMemo((()=>({activeIndex:m,onNavigate:g})),[m,g]),w=i>1;const x={...f,...y,ref:t,"aria-orientation":"both"===a?void 0:a,onKeyDown(e){null==f.onKeyDown||f.onKeyDown(e),null==y.onKeyDown||y.onKeyDown(e),function(e){if(!Xt.includes(e.key))return;let t=m;const n=$t(v,s),r=Nt(v,s);if(w){const l=u||Array.from({length:v.current.length},(()=>({width:1,height:1}))),c=Tt(l,i,d),f=c.findIndex((e=>null!=e&&!Rt(v.current,e,s))),h=c.reduce(((e,t,n)=>null==t||Rt(v.current,t,s)?e:n),-1);t=c[jt({current:c.map((e=>e?v.current[e]:null))},{event:e,orientation:a,loop:o,cols:i,disabledIndices:Lt([...s||v.current.map(((e,t)=>Rt(v.current,t)?t:void 0)),void 0],c),minIndex:f,maxIndex:h,prevIndex:It(m>r?n:m,l,c,i,e.key===Pt?"bl":e.key===zt?"tr":"tl")})]}const l={horizontal:[zt],vertical:[Pt],both:[zt,Pt]}[a],c={horizontal:[Ot],vertical:[Dt],both:[Ot,Dt]}[a],f=w?Xt:{horizontal:Qt,vertical:Zt,both:Xt}[a];t===m&&[...l,...c].includes(e.key)&&(t=o&&t===r&&l.includes(e.key)?n:o&&t===n&&c.includes(e.key)?r:At(v,{startingIndex:t,decrement:c.includes(e.key),disabledIndices:s})),t===m||Ft(v,t)||(e.stopPropagation(),f.includes(e.key)&&e.preventDefault(),g(t),queueMicrotask((()=>{Ht(v.current[t])})))}(e)}};return r.createElement(Gt.Provider,{value:b},r.createElement(Yt,{elementsRef:v},Kt(n,x)))})),en=r.forwardRef((function(e,t){const{render:n,...a}=e,o=n&&"function"!==typeof n?n.props:{},{activeIndex:i,onNavigate:s}=r.useContext(Gt),{ref:l,index:c}=qt(),u=kt([l,t,o.ref]),d=i===c;return Kt(n,{...a,...o,ref:u,tabIndex:d?0:-1,"data-active":d?"":void 0,onFocus(e){null==a.onFocus||a.onFocus(e),null==o.onFocus||o.onFocus(e),s(c)}})}));function tn(){return tn=Object.assign?Object.assign.bind():function(e){for(var t=1;t{"use strict";t.clamp=function(e,t){return(0,a.min)([(0,r.max)([e,t.start]),t.end])};var r=n(8442),a=n(1972)},3034:(e,t,n)=>{"use strict";t.closestIndexTo=function(e,t){const n=(0,r.toDate)(e);if(isNaN(Number(n)))return NaN;const a=n.getTime();let o,i;return t.forEach((function(e,t){const n=(0,r.toDate)(e);if(isNaN(Number(n)))return o=NaN,void(i=NaN);const s=Math.abs(a-n.getTime());(null==o||s{"use strict";t.closestTo=function(e,t){const n=(0,a.toDate)(e);if(isNaN(Number(n)))return(0,r.constructFrom)(e,NaN);const o=n.getTime();let i,s;return t.forEach((t=>{const n=(0,a.toDate)(t);if(isNaN(Number(n)))return i=(0,r.constructFrom)(e,NaN),void(s=NaN);const l=Math.abs(o-n.getTime());(null==i||l{"use strict";t.compareAsc=function(e,t){const n=(0,r.toDate)(e),a=(0,r.toDate)(t),o=n.getTime()-a.getTime();return o<0?-1:o>0?1:o};var r=n(5551)},8958:(e,t,n)=>{"use strict";t.compareDesc=function(e,t){const n=(0,r.toDate)(e),a=(0,r.toDate)(t),o=n.getTime()-a.getTime();return o>0?-1:o<0?1:o};var r=n(5551)},9757:(e,t)=>{"use strict";t.secondsInYear=t.secondsInWeek=t.secondsInQuarter=t.secondsInMonth=t.secondsInMinute=t.secondsInHour=t.secondsInDay=t.quartersInYear=t.monthsInYear=t.monthsInQuarter=t.minutesInYear=t.minutesInMonth=t.minutesInHour=t.minutesInDay=t.minTime=t.millisecondsInWeek=t.millisecondsInSecond=t.millisecondsInMinute=t.millisecondsInHour=t.millisecondsInDay=t.maxTime=t.daysInYear=t.daysInWeek=void 0;t.daysInWeek=7;const n=t.daysInYear=365.2425,r=t.maxTime=24*Math.pow(10,8)*60*60*1e3,a=(t.minTime=-r,t.millisecondsInWeek=6048e5,t.millisecondsInDay=864e5,t.millisecondsInMinute=6e4,t.millisecondsInHour=36e5,t.millisecondsInSecond=1e3,t.minutesInYear=525600,t.minutesInMonth=43200,t.minutesInDay=1440,t.minutesInHour=60,t.monthsInQuarter=3,t.monthsInYear=12,t.quartersInYear=4,t.secondsInHour=3600),o=(t.secondsInMinute=60,t.secondsInDay=24*a),i=(t.secondsInWeek=7*o,t.secondsInYear=o*n),s=t.secondsInMonth=i/12;t.secondsInQuarter=3*s},4161:(e,t)=>{"use strict";t.constructFrom=function(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}},7229:(e,t,n)=>{"use strict";t.constructNow=function(e){return(0,r.constructFrom)(e,Date.now())};var r=n(4161)},1875:(e,t,n)=>{"use strict";t.daysToWeeks=function(e){const t=e/r.daysInWeek,n=Math.trunc(t);return 0===n?0:n};var r=n(9757)},2819:(e,t,n)=>{"use strict";t.differenceInBusinessDays=function(e,t){const n=(0,l.toDate)(e);let c=(0,l.toDate)(t);if(!(0,i.isValid)(n)||!(0,i.isValid)(c))return NaN;const u=(0,a.differenceInCalendarDays)(n,c),d=u<0?-1:1,f=Math.trunc(u/7);let h=5*f;c=(0,r.addDays)(c,7*f);for(;!(0,o.isSameDay)(n,c);)h+=(0,s.isWeekend)(c)?0:d,c=(0,r.addDays)(c,d);return 0===h?0:h};var r=n(8620),a=n(3439),o=n(8444),i=n(9858),s=n(6597),l=n(5551)},3439:(e,t,n)=>{"use strict";t.differenceInCalendarDays=function(e,t){const n=(0,a.startOfDay)(e),i=(0,a.startOfDay)(t),s=+n-(0,o.getTimezoneOffsetInMilliseconds)(n),l=+i-(0,o.getTimezoneOffsetInMilliseconds)(i);return Math.round((s-l)/r.millisecondsInDay)};var r=n(9757),a=n(6191),o=n(3300)},9865:(e,t,n)=>{"use strict";t.differenceInCalendarISOWeekYears=function(e,t){return(0,r.getISOWeekYear)(e)-(0,r.getISOWeekYear)(t)};var r=n(8890)},2266:(e,t,n)=>{"use strict";t.differenceInCalendarISOWeeks=function(e,t){const n=(0,a.startOfISOWeek)(e),i=(0,a.startOfISOWeek)(t),s=+n-(0,o.getTimezoneOffsetInMilliseconds)(n),l=+i-(0,o.getTimezoneOffsetInMilliseconds)(i);return Math.round((s-l)/r.millisecondsInWeek)};var r=n(9757),a=n(1048),o=n(3300)},5575:(e,t,n)=>{"use strict";t.differenceInCalendarMonths=function(e,t){const n=(0,r.toDate)(e),a=(0,r.toDate)(t),o=n.getFullYear()-a.getFullYear(),i=n.getMonth()-a.getMonth();return 12*o+i};var r=n(5551)},5309:(e,t,n)=>{"use strict";t.differenceInCalendarQuarters=function(e,t){const n=(0,a.toDate)(e),o=(0,a.toDate)(t),i=n.getFullYear()-o.getFullYear(),s=(0,r.getQuarter)(n)-(0,r.getQuarter)(o);return 4*i+s};var r=n(2918),a=n(5551)},6003:(e,t,n)=>{"use strict";t.differenceInCalendarWeeks=function(e,t,n){const i=(0,a.startOfWeek)(e,n),s=(0,a.startOfWeek)(t,n),l=+i-(0,o.getTimezoneOffsetInMilliseconds)(i),c=+s-(0,o.getTimezoneOffsetInMilliseconds)(s);return Math.round((l-c)/r.millisecondsInWeek)};var r=n(9757),a=n(9249),o=n(3300)},9840:(e,t,n)=>{"use strict";t.differenceInCalendarYears=function(e,t){const n=(0,r.toDate)(e),a=(0,r.toDate)(t);return n.getFullYear()-a.getFullYear()};var r=n(5551)},6933:(e,t,n)=>{"use strict";t.differenceInDays=function(e,t){const n=(0,a.toDate)(e),i=(0,a.toDate)(t),s=o(n,i),l=Math.abs((0,r.differenceInCalendarDays)(n,i));n.setDate(n.getDate()-s*l);const c=Number(o(n,i)===-s),u=s*(l-c);return 0===u?0:u};var r=n(3439),a=n(5551);function o(e,t){const n=e.getFullYear()-t.getFullYear()||e.getMonth()-t.getMonth()||e.getDate()-t.getDate()||e.getHours()-t.getHours()||e.getMinutes()-t.getMinutes()||e.getSeconds()-t.getSeconds()||e.getMilliseconds()-t.getMilliseconds();return n<0?-1:n>0?1:n}},6371:(e,t,n)=>{"use strict";t.differenceInHours=function(e,t,n){const i=(0,o.differenceInMilliseconds)(e,t)/a.millisecondsInHour;return(0,r.getRoundingMethod)(null===n||void 0===n?void 0:n.roundingMethod)(i)};var r=n(8056),a=n(9757),o=n(8984)},9907:(e,t,n)=>{"use strict";t.differenceInISOWeekYears=function(e,t){let n=(0,i.toDate)(e);const s=(0,i.toDate)(t),l=(0,r.compareAsc)(n,s),c=Math.abs((0,a.differenceInCalendarISOWeekYears)(n,s));n=(0,o.subISOWeekYears)(n,l*c);const u=Number((0,r.compareAsc)(n,s)===-l),d=l*(c-u);return 0===d?0:d};var r=n(9094),a=n(9865),o=n(3131),i=n(5551)},8984:(e,t,n)=>{"use strict";t.differenceInMilliseconds=function(e,t){return+(0,r.toDate)(e)-+(0,r.toDate)(t)};var r=n(5551)},281:(e,t,n)=>{"use strict";t.differenceInMinutes=function(e,t,n){const i=(0,o.differenceInMilliseconds)(e,t)/a.millisecondsInMinute;return(0,r.getRoundingMethod)(null===n||void 0===n?void 0:n.roundingMethod)(i)};var r=n(8056),a=n(9757),o=n(8984)},4917:(e,t,n)=>{"use strict";t.differenceInMonths=function(e,t){const n=(0,i.toDate)(e),s=(0,i.toDate)(t),l=(0,r.compareAsc)(n,s),c=Math.abs((0,a.differenceInCalendarMonths)(n,s));let u;if(c<1)u=0;else{1===n.getMonth()&&n.getDate()>27&&n.setDate(30),n.setMonth(n.getMonth()-l*c);let t=(0,r.compareAsc)(n,s)===-l;(0,o.isLastDayOfMonth)((0,i.toDate)(e))&&1===c&&1===(0,r.compareAsc)(e,s)&&(t=!1),u=l*(c-Number(t))}return 0===u?0:u};var r=n(9094),a=n(5575),o=n(7789),i=n(5551)},4219:(e,t,n)=>{"use strict";t.differenceInQuarters=function(e,t,n){const o=(0,a.differenceInMonths)(e,t)/3;return(0,r.getRoundingMethod)(null===n||void 0===n?void 0:n.roundingMethod)(o)};var r=n(8056),a=n(4917)},9765:(e,t,n)=>{"use strict";t.differenceInSeconds=function(e,t,n){const o=(0,a.differenceInMilliseconds)(e,t)/1e3;return(0,r.getRoundingMethod)(null===n||void 0===n?void 0:n.roundingMethod)(o)};var r=n(8056),a=n(8984)},8413:(e,t,n)=>{"use strict";t.differenceInWeeks=function(e,t,n){const o=(0,a.differenceInDays)(e,t)/7;return(0,r.getRoundingMethod)(null===n||void 0===n?void 0:n.roundingMethod)(o)};var r=n(8056),a=n(6933)},2606:(e,t,n)=>{"use strict";t.differenceInYears=function(e,t){const n=(0,o.toDate)(e),i=(0,o.toDate)(t),s=(0,r.compareAsc)(n,i),l=Math.abs((0,a.differenceInCalendarYears)(n,i));n.setFullYear(1584),i.setFullYear(1584);const c=(0,r.compareAsc)(n,i)===-s,u=s*(l-+c);return 0===u?0:u};var r=n(9094),a=n(9840),o=n(5551)},6229:(e,t,n)=>{"use strict";t.eachDayOfInterval=function(e,t){var n;const a=(0,r.toDate)(e.start),o=(0,r.toDate)(e.end);let i=+a>+o;const s=i?+a:+o,l=i?o:a;l.setHours(0,0,0,0);let c=null!==(n=null===t||void 0===t?void 0:t.step)&&void 0!==n?n:1;if(!c)return[];c<0&&(c=-c,i=!i);const u=[];for(;+l<=s;)u.push((0,r.toDate)(l)),l.setDate(l.getDate()+c),l.setHours(0,0,0,0);return i?u.reverse():u};var r=n(5551)},6977:(e,t,n)=>{"use strict";t.eachHourOfInterval=function(e,t){var n;const o=(0,a.toDate)(e.start),i=(0,a.toDate)(e.end);let s=+o>+i;const l=s?+o:+i;let c=s?i:o;c.setMinutes(0,0,0);let u=null!==(n=null===t||void 0===t?void 0:t.step)&&void 0!==n?n:1;if(!u)return[];u<0&&(u=-u,s=!s);const d=[];for(;+c<=l;)d.push((0,a.toDate)(c)),c=(0,r.addHours)(c,u);return s?d.reverse():d};var r=n(5608),a=n(5551)},5027:(e,t,n)=>{"use strict";t.eachMinuteOfInterval=function(e,t){var n;const i=(0,a.startOfMinute)((0,o.toDate)(e.start)),s=(0,o.toDate)(e.end);let l=+i>+s;const c=l?+i:+s;let u=l?s:i,d=null!==(n=null===t||void 0===t?void 0:t.step)&&void 0!==n?n:1;if(!d)return[];d<0&&(d=-d,l=!l);const f=[];for(;+u<=c;)f.push((0,o.toDate)(u)),u=(0,r.addMinutes)(u,d);return l?f.reverse():f};var r=n(86),a=n(377),o=n(5551)},5089:(e,t,n)=>{"use strict";t.eachMonthOfInterval=function(e,t){var n;const a=(0,r.toDate)(e.start),o=(0,r.toDate)(e.end);let i=+a>+o;const s=i?+a:+o,l=i?o:a;l.setHours(0,0,0,0),l.setDate(1);let c=null!==(n=null===t||void 0===t?void 0:t.step)&&void 0!==n?n:1;if(!c)return[];c<0&&(c=-c,i=!i);const u=[];for(;+l<=s;)u.push((0,r.toDate)(l)),l.setMonth(l.getMonth()+c);return i?u.reverse():u};var r=n(5551)},6007:(e,t,n)=>{"use strict";t.eachQuarterOfInterval=function(e,t){var n;const i=(0,o.toDate)(e.start),s=(0,o.toDate)(e.end);let l=+i>+s;const c=l?+(0,a.startOfQuarter)(i):+(0,a.startOfQuarter)(s);let u=l?(0,a.startOfQuarter)(s):(0,a.startOfQuarter)(i),d=null!==(n=null===t||void 0===t?void 0:t.step)&&void 0!==n?n:1;if(!d)return[];d<0&&(d=-d,l=!l);const f=[];for(;+u<=c;)f.push((0,o.toDate)(u)),u=(0,r.addQuarters)(u,d);return l?f.reverse():f};var r=n(1634),a=n(1125),o=n(5551)},2887:(e,t,n)=>{"use strict";t.eachWeekOfInterval=function(e,t){var n;const i=(0,o.toDate)(e.start),s=(0,o.toDate)(e.end);let l=+i>+s;const c=l?(0,a.startOfWeek)(s,t):(0,a.startOfWeek)(i,t),u=l?(0,a.startOfWeek)(i,t):(0,a.startOfWeek)(s,t);c.setHours(15),u.setHours(15);const d=+u.getTime();let f=c,h=null!==(n=null===t||void 0===t?void 0:t.step)&&void 0!==n?n:1;if(!h)return[];h<0&&(h=-h,l=!l);const p=[];for(;+f<=d;)f.setHours(0),p.push((0,o.toDate)(f)),f=(0,r.addWeeks)(f,h),f.setHours(15);return l?p.reverse():p};var r=n(9994),a=n(9249),o=n(5551)},3006:(e,t,n)=>{"use strict";t.eachWeekendOfInterval=function(e){const t=(0,r.eachDayOfInterval)(e),n=[];let o=0;for(;o\" "}),Mm=Nf(((e,t)=>{const n=Lf("Table",e),{className:r,layout:a,...o}=Fu(e);return(0,zf.jsx)(km,{value:n,children:(0,zf.jsx)(Of.table,{ref:t,__css:{tableLayout:a,...n.table},className:zt("chakra-table",r),...o})})}));Mm.displayName="Table";var Cm=Nf(((e,t)=>{const n=Sm();return(0,zf.jsx)(Of.tbody,{...e,ref:t,__css:n.tbody})})),Dm=Nf(((e,t)=>{const n=Sm();return(0,zf.jsx)(Of.tr,{...e,ref:t,__css:n.tr})})),Pm=Nf(((e,t)=>{let{isNumeric:n,...r}=e;const a=Sm();return(0,zf.jsx)(Of.td,{...r,ref:t,__css:a.td,"data-is-numeric":n})})),Om=Nf((function(e,t){const n=If("Heading",e),{className:r,...a}=Fu(e);return(0,zf.jsx)(Of.h2,{ref:t,className:zt("chakra-heading",e.className),...a,__css:n})}));Om.displayName="Heading";var zm=Nf((function(e,t){var n;const r=If("FormLabel",e),a=Fu(e),{className:o,children:i,requiredIndicator:s=(0,zf.jsx)(_m,{}),optionalIndicator:l=null,...c}=a,u=Rp(),d=null!=(n=null==u?void 0:u.getLabelProps(c,t))?n:{ref:t,...c};return(0,zf.jsxs)(Of.label,{...d,className:zt("chakra-form__label",a.className),__css:{display:"block",textAlign:"start",...r},children:[i,(null==u?void 0:u.isRequired)?s:l]})}));zm.displayName="FormLabel";var _m=Nf((function(e,t){const n=Rp(),r=Ip();if(!(null==n?void 0:n.isRequired))return null;const a=zt("chakra-form__required-indicator",e.className);return(0,zf.jsx)(Of.span,{...null==n?void 0:n.getRequiredIndicatorProps(e,t),__css:r.requiredIndicator,className:a})}));_m.displayName="RequiredIndicator";var Fm=Nf((function(e,t){const{htmlSize:n,...r}=e,a=Lf("Input",r),o=Vp(Fu(r)),i=zt("chakra-input",e.className);return(0,zf.jsx)(Of.input,{size:n,...o,__css:a.field,ref:t,className:i})}));Fm.displayName="Input",Fm.id="Input";var[$m,Nm]=Vf({strict:!1,name:"ButtonGroupContext"});function Am(e){const{children:n,className:r,...a}=e,o=(0,t.isValidElement)(n)?(0,t.cloneElement)(n,{"aria-hidden":!0,focusable:!1}):n,i=zt("chakra-button__icon",r);return(0,zf.jsx)(Of.span,{display:"inline-flex",alignSelf:"center",flexShrink:0,...a,className:i,children:o})}function jm(e){const{label:n,placement:r,spacing:a="0.5rem",children:o=(0,zf.jsx)(Qf,{color:"currentColor",width:"1em",height:"1em"}),className:i,__css:s,...l}=e,c=zt("chakra-button__spinner",i),u="start"===r?"marginEnd":"marginStart",d=(0,t.useMemo)((()=>({display:"flex",alignItems:"center",position:n?"relative":"absolute",[u]:n?a:0,fontSize:"1em",lineHeight:"normal",...s})),[s,n,u,a]);return(0,zf.jsx)(Of.div,{className:c,...l,__css:d,children:o})}Am.displayName="ButtonIcon",jm.displayName="ButtonSpinner";var Tm=Nf(((e,n)=>{const r=Nm(),a=If("Button",{...r,...e}),{isDisabled:o=(null==r?void 0:r.isDisabled),isLoading:i,isActive:s,children:l,leftIcon:c,rightIcon:u,loadingText:d,iconSpacing:f="0.5rem",type:h,spinner:p,spinnerPlacement:m="start",className:g,as:v,...y}=Fu(e),b=(0,t.useMemo)((()=>{const e={...null==a?void 0:a._focus,zIndex:1};return{display:"inline-flex",appearance:"none",alignItems:"center",justifyContent:"center",userSelect:"none",position:"relative",whiteSpace:"nowrap",verticalAlign:"middle",outline:"none",...a,...!!r&&{_focus:e}}}),[a,r]),{ref:w,type:x}=function(e){const[n,r]=(0,t.useState)(!e),a=(0,t.useCallback)((e=>{e&&r("BUTTON"===e.tagName)}),[]);return{ref:a,type:n?"button":void 0}}(v),E={rightIcon:u,leftIcon:c,iconSpacing:f,children:l};return(0,zf.jsxs)(Of.button,{ref:rp(n,w),as:v,type:null!=h?h:x,"data-active":At(s),"data-loading":At(i),__css:b,className:zt("chakra-button",g),...y,disabled:o||i,children:[i&&"start"===m&&(0,zf.jsx)(jm,{className:"chakra-button__spinner--start",label:d,placement:"start",spacing:f,children:p}),i?d||(0,zf.jsx)(Of.span,{opacity:0,children:(0,zf.jsx)(Im,{...E})}):(0,zf.jsx)(Im,{...E}),i&&"end"===m&&(0,zf.jsx)(jm,{className:"chakra-button__spinner--end",label:d,placement:"end",spacing:f,children:p})]})}));function Im(e){const{leftIcon:t,rightIcon:n,children:r,iconSpacing:a}=e;return(0,zf.jsxs)(zf.Fragment,{children:[t&&(0,zf.jsx)(Am,{marginEnd:a,children:t}),r,n&&(0,zf.jsx)(Am,{marginStart:a,children:n})]})}Tm.displayName="Button";const Lm=e=>{let{accessToken:n,userUuid:r,saleUuid:a,currency:o}=e;const{t:i}=Pe(),[s,l]=(0,t.useState)(!1),c=Nh(),[u,d]=(0,t.useState)(!0),[f,h]=(0,t.useState)(null),[p,m]=(0,t.useState)(null),[g,v]=(0,t.useState)((null===f||void 0===f?void 0:f.amount)||""),[y,b]=(0,t.useState)(!1),w=(0,t.useContext)(Vh);(0,t.useEffect)((()=>{(async()=>{try{const e=await fetch("".concat(w.backendUrl,"/api/v1.0/bidder_ids?bidder_type=website&user_uuid=").concat(r,"&sale_uuid=").concat(a,"&access_token=").concat(n));if(!e.ok)return;const t=await e.json();if(0===t.count)return;m(t.data[0]);const o=t.data[0].live_credit;console.log("liveCredit",o),b(o)}catch(e){c({title:i("myCredit.error"),description:e.title,status:"error",duration:9e3,isClosable:!0})}finally{d(!1)}})()}),[n,r,a,c,w,i]),(0,t.useEffect)((()=>{(async()=>{if(p)try{const e=await fetch("".concat(w.backendUrl,"/api/credit_requests?sort=-id&user_uuid=").concat(r,"&sale_uuid=").concat(a,"&access_token=").concat(n));if(!e.ok)return;const t=await e.json();if(0===t.count)return;const o=t.data[0].amount;h(t.data[0]),v(o)}catch(e){c({title:i("myCredit.error"),description:e.title,status:"error",duration:9e3,isClosable:!0})}finally{d(!1)}})()}),[n,r,a,c,w,p,i]);if(u)return(0,zf.jsx)(bm,{children:i("myCredit.loading")});let x=i("myCredit.formHeading"),E=i("myCredit.buttonLabel"),k=i("myCredit.creditStatusMessage"),S="info";return f&&"pending"===f.status&&(x=i("myCredit.pendingFormHeading"),E=i("myCredit.pendingButtonLabel"),k=y?"-1"===y?i("myCredit.pendingCreditStatusMessageUnlimited",{amount:Uh(f.amount,o)}):i("myCredit.pendingCreditStatusMessageWithLimit",{amount:Uh(f.amount,o),approvedAmount:Uh(y,o)}):i("myCredit.pendingCreditStatusMessage",{amount:Uh(f.amount,o)})),f&&"approved"===f.status&&(S="success",x=i("myCredit.approvedFormHeading"),E=i("myCredit.approvedButtonLabel"),k=i("myCredit.approvedCreditStatusMessage",{amount:Uh(f.amount,o)})),f&&"rejected"===f.status?(0,zf.jsxs)(nh,{status:"error",children:[(0,zf.jsx)(rh,{}),(0,zf.jsx)(oh,{children:i("myCredit.rejectedCreditStatusMessage")})]}):(0,zf.jsx)(Jh,{p:4,borderWidth:"1px",borderRadius:"lg",children:(0,zf.jsxs)("form",{onSubmit:async e=>{e.preventDefault(),l(!0);let t={amount:g,sale_uuid:a,user_uuid:r},s="POST",u="".concat(w.backendUrl,"/api/credit_requests?access_token=").concat(n);f&&f.id&&"approved"!==f.status&&(s="PATCH",u="".concat(w.backendUrl,"/api/credit_requests/").concat(f.id,"?access_token=").concat(n),t={amount:g});try{const e=await fetch(u,{method:s,headers:{"Content-Type":"application/json"},body:JSON.stringify(t)}),n=await e.json();e.ok?(h(n.data[0]),c({title:i("myCredit.creditRequestSubmitted"),description:i("myCredit.creditRequestDescription",{amount:Uh(n.data[0].amount,o)}),status:"success",duration:9e3,isClosable:!0})):c({title:i("myCredit.error"),description:n.title||i("myCredit.errorSubmittingCreditRequest"),status:"error",duration:9e3,isClosable:!0})}catch(d){c({title:i("myCredit.error"),description:d.message||i("myCredit.generalError"),status:"error",duration:9e3,isClosable:!0})}finally{l(!1)}},children:[(0,zf.jsx)(Om,{as:"h3",size:"sm",mb:4,children:x}),(0,zf.jsxs)(Jh,{className:"instructions",mb:4,children:[(0,zf.jsx)(bm,{size:"xs",children:i("myCredit.instructions")}),(0,zf.jsx)(bm,{size:"xs",children:i("myCredit.noCommasOrDecimals")})]}),(0,zf.jsxs)(nh,{status:S,children:[(0,zf.jsx)(rh,{}),(0,zf.jsx)(oh,{children:k})]}),(0,zf.jsxs)(Bp,{id:"credit-request",isRequired:!0,children:[(0,zf.jsx)(zm,{children:i("myCredit.creditRequestLabel",{currency:o})}),(0,zf.jsx)(Fm,{type:"number",min:"1",max:"2147483647",value:g,onChange:e=>v(e.target.value)}),(0,zf.jsx)(Tm,{colorScheme:"blue",mt:4,isLoading:s,type:"submit",children:E})]})]})})};function Rm(e){return function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}Rm({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),Rm({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),Rm({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"});function Bm(e){return(t,n)=>{let r;if("formatting"===(null!==n&&void 0!==n&&n.context?String(n.context):"standalone")&&e.formattingValues){const t=e.defaultFormattingWidth||e.defaultWidth,a=null!==n&&void 0!==n&&n.width?String(n.width):t;r=e.formattingValues[a]||e.formattingValues[t]}else{const t=e.defaultWidth,a=null!==n&&void 0!==n&&n.width?String(n.width):e.defaultWidth;r=e.values[a]||e.values[t]}return r[e.argumentCallback?e.argumentCallback(t):t]}}Bm({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),Bm({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:e=>e-1}),Bm({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),Bm({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),Bm({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"});function Hm(e){return function(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const r=n.width,a=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],o=t.match(a);if(!o)return null;const i=o[0],s=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(s)?function(e,t){for(let n=0;n
=o?i(l,e):(n=l,r||(r=setTimeout((()=>{r=null,i(n)}),o-t)))},()=>n&&i(n)]},TT=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:3,r=0;const a=AT(50,250);return jT((n=>{const o=n.loaded,i=n.lengthComputable?n.total:void 0,s=o-r,l=a(s);r=o;e({loaded:o,total:i,progress:i?o/i:void 0,bytes:s,rate:l||void 0,estimated:l&&i&&o<=i?(i-o)/l:void 0,event:n,lengthComputable:null!=i,[t?"download":"upload"]:!0})}),n)},IT=(e,t)=>{const n=null!=e;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},LT=e=>function(){for(var t=arguments.length,n=new Array(t),r=0;r