78066-926ca725574ee969.js 6.8 KB

12
  1. "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[78066],{64826:function(e,t,n){n.d(t,{Fw:function(){return k},fC:function(){return E},xz:function(){return _}});var r=n(57384),a=n(67597),o=n(90149),i=n(61544),u=n(82305),l=n(65672),c=n(71641),s=n(4300),f=n(8591),d=n(57458);const p="Collapsible",[b,v]=(0,i.b)(p),[h,y]=b(p),g=(0,a.forwardRef)(((e,t)=>{const{__scopeCollapsible:n,open:o,defaultOpen:i,disabled:l,onOpenChange:c,...f}=e,[p=!1,b]=(0,u.T)({prop:o,defaultProp:i,onChange:c});return(0,a.createElement)(h,{scope:n,disabled:l,contentId:(0,d.M)(),open:p,onOpenToggle:(0,a.useCallback)((()=>b((e=>!e))),[b])},(0,a.createElement)(s.WV.div,(0,r.Z)({"data-state":x(p),"data-disabled":l?"":void 0},f,{ref:t})))})),m="CollapsibleTrigger",w=(0,a.forwardRef)(((e,t)=>{const{__scopeCollapsible:n,...i}=e,u=y(m,n);return(0,a.createElement)(s.WV.button,(0,r.Z)({type:"button","aria-controls":u.contentId,"aria-expanded":u.open||!1,"data-state":x(u.open),"data-disabled":u.disabled?"":void 0,disabled:u.disabled},i,{ref:t,onClick:(0,o.M)(e.onClick,u.onOpenToggle)}))})),C="CollapsibleContent",k=(0,a.forwardRef)(((e,t)=>{const{forceMount:n,...o}=e,i=y(C,e.__scopeCollapsible);return(0,a.createElement)(f.z,{present:n||i.open},(({present:e})=>(0,a.createElement)(R,(0,r.Z)({},o,{ref:t,present:e}))))})),R=(0,a.forwardRef)(((e,t)=>{const{__scopeCollapsible:n,present:o,children:i,...u}=e,f=y(C,n),[d,p]=(0,a.useState)(o),b=(0,a.useRef)(null),v=(0,c.e)(t,b),h=(0,a.useRef)(0),g=h.current,m=(0,a.useRef)(0),w=m.current,k=f.open||d,R=(0,a.useRef)(k),E=(0,a.useRef)();return(0,a.useEffect)((()=>{const e=requestAnimationFrame((()=>R.current=!1));return()=>cancelAnimationFrame(e)}),[]),(0,l.b)((()=>{const e=b.current;if(e){E.current=E.current||{transitionDuration:e.style.transitionDuration,animationName:e.style.animationName},e.style.transitionDuration="0s",e.style.animationName="none";const t=e.getBoundingClientRect();h.current=t.height,m.current=t.width,R.current||(e.style.transitionDuration=E.current.transitionDuration,e.style.animationName=E.current.animationName),p(o)}}),[f.open,o]),(0,a.createElement)(s.WV.div,(0,r.Z)({"data-state":x(f.open),"data-disabled":f.disabled?"":void 0,id:f.contentId,hidden:!k},u,{ref:v,style:{"--radix-collapsible-content-height":g?`${g}px`:void 0,"--radix-collapsible-content-width":w?`${w}px`:void 0,...e.style}}),k&&i)}));function x(e){return e?"open":"closed"}const E=g,_=w},15033:function(e,t,n){n.d(t,{ZP:function(){return R}});var r=n(67597),a=n(99968),o=function(){return o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var a in t=arguments[n])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e},o.apply(this,arguments)};function i(e,t,n,r){return new(n||(n=Promise))((function(a,o){function i(e){try{l(r.next(e))}catch(t){o(t)}}function u(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,u)}l((r=r.apply(e,t||[])).next())}))}function u(e,t){var n,r,a,o,i={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return o={next:u(0),throw:u(1),return:u(2)},"function"===typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function u(o){return function(u){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;i;)try{if(n=1,r&&(a=2&o[0]?r.return:o[0]?r.throw||((a=r.return)&&a.call(r),0):r.next)&&!(a=a.call(r,o[1])).done)return a;switch(r=0,a&&(o=[2&o[0],a.value]),o[0]){case 0:case 1:a=o;break;case 4:return i.label++,{value:o[1],done:!1};case 5:i.label++,r=o[1],o=[0];continue;case 7:o=i.ops.pop(),i.trys.pop();continue;default:if(!(a=(a=i.trys).length>0&&a[a.length-1])&&(6===o[0]||2===o[0])){i=0;continue}if(3===o[0]&&(!a||o[1]>a[0]&&o[1]<a[3])){i.label=o[1];break}if(6===o[0]&&i.label<a[1]){i.label=a[1],a=o;break}if(a&&i.label<a[2]){i.label=a[2],i.ops.push(o);break}a[2]&&i.ops.pop(),i.trys.pop();continue}o=t.call(e,i)}catch(u){o=[6,u],r=0}finally{n=a=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}}var l,c,s=function(){},f=s(),d=Object,p=function(e){return e===f},b=function(e){return"function"==typeof e},v=!("undefined"!=typeof window)||"Deno"in window?r.useEffect:r.useLayoutEffect,h=new WeakMap,y=0,g=function(e){var t,n,r=typeof e,a=e&&e.constructor,o=a==Date;if(d(e)!==e||o||a==RegExp)t=o?e.toJSON():"symbol"==r?e.toString():"string"==r?JSON.stringify(e):""+e;else{if(t=h.get(e))return t;if(t=++y+"~",h.set(e,t),a==Array){for(t="@",n=0;n<e.length;n++)t+=g(e[n])+",";h.set(e,t)}if(a==d){t="#";for(var i=d.keys(e).sort();!p(n=i.pop());)p(e[n])||(t+=n+":"+g(e[n])+",");h.set(e,t)}}return t},m=function(e){if(b(e))try{e=e()}catch(n){e=""}var t=[].concat(e);return[e="string"==typeof e?e:(Array.isArray(e)?e.length:e)?g(e):"",t,e?"$swr$"+e:""]},w=function(e){return b(e[1])?[e[0],e[1],e[2]||{}]:[e[0],null,(null===e[1]?e[2]:e[1])||{}]},C="$inf$",k=function(e){return m(e?e(0,null):null)[0]},R=(l=a.ZP,c=function(e){return function(t,n,a){var o=(0,r.useState)({})[1],l=(0,r.useRef)(!1),c=(0,r.useRef)(),s=a.cache,d=a.initialSize,h=void 0===d?1:d,y=a.revalidateAll,g=void 0!==y&&y,w=a.persistSize,R=void 0!==w&&w,x=a.revalidateFirstPage,E=void 0===x||x,_=a.revalidateOnMount,O=void 0!==_&&_,S=null;try{S=k(t)}catch(T){}var $=null,N=null;S&&($="$ctx$"+S,N="$len$"+S);var D=(0,r.useCallback)((function(){var e=s.get(N);return p(e)?h:e}),[N,h]),z=(0,r.useRef)(D());v((function(){l.current?S&&s.set(N,R?z.current:h):l.current=!0}),[S]);var A=O&&!l.current,P=e(S?C+S:null,(function(){return i(void 0,void 0,void 0,(function(){var e,r,o,i,l,f,d,b,v,h,y,w;return u(this,(function(u){switch(u.label){case 0:e=s.get($)||[],r=e[0],o=e[1],i=[],l=D(),f=null,d=0,u.label=1;case 1:return d<l?(b=m(t(d,f)),v=b[0],h=b[1],v?(y=s.get(v),w=g||r||p(y)||E&&!d&&!p(c.current)||A||o&&!p(o[d])&&!a.compare(o[d],y),n&&w?[4,n.apply(void 0,h)]:[3,3]):[3,5]):[3,5];case 2:y=u.sent(),s.set(v,y),u.label=3;case 3:i.push(y),f=y,u.label=4;case 4:return++d,[3,1];case 5:return s.delete($),[2,i]}}))}))}),a);v((function(){c.current=P.data}),[P.data]);var Z=(0,r.useCallback)((function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=e[0],r=!1!==e[1];if($){if(r)if(p(n))s.set($,[!0]);else{var a=c.current;s.set($,[!1,a])}return e.length?P.mutate(n,r):P.mutate()}}),[$]),M=(0,r.useCallback)((function(e){var n;if(N&&(b(e)?n=e(D()):"number"==typeof e&&(n=e),"number"==typeof n))return s.set(N,n),z.current=n,o({}),Z(function(e){for(var n=[],r=null,a=0;a<e;++a){var o=m(t(a,r))[0],i=o?s.get(o):f;if(p(i))return c.current;n.push(i),r=i}return n}(n))}),[N,D,Z]);return{size:D(),setSize:M,mutate:Z,get error(){return P.error},get data(){return P.data},get isValidating(){return P.isValidating}}}},function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=w(e),r=n[0],a=n[1],i=n[2],u=(i.use||[]).concat(c);return l(r,a,o(o({},i),{use:u}))})}}]);
  2. //# sourceMappingURL=78066-926ca725574ee969.js.map