Module 825913

1,747 characters · in no known chunk
Dependencies
Source Raw
function(e,t,n){"use strict";n.d(t,{CC:()=>d,JT:()=>_,Kq:()=>u,P_:()=>l,SK:()=>h,Sl:()=>c,_E:()=>f});var i=n(533715),r=n(561514),s=n(318473),a=n(3388),o=n(64700);let l=Symbol("default");function u({values:e,children:t}){for(let[n,i]of e)t=o.createElement(n.Provider,{value:i},t);return t}function c(e){let{className:t,style:n,children:i,defaultClassName:r,defaultChildren:s,defaultStyle:a,values:l}=e;return(0,o.useMemo)(()=>{let e,o,u;return e="function"==typeof t?t({...l,defaultClassName:r}):t,o="function"==typeof n?n({...l,defaultStyle:a||{}}):n,u="function"==typeof i?i({...l,defaultChildren:s}):null==i?s:i,{className:null!=e?e:r,style:o||a?{...a,...o}:void 0,children:null!=u?u:s,"data-rac":""}},[t,n,i,r,s,a,l])}function d(e,t){let n=(0,o.useContext)(e);if(null===t)return null;if(n&&"object"==typeof n&&"slots"in n&&n.slots){let e=t||l;if(!n.slots[e]){let e=new Intl.ListFormat().format(Object.keys(n.slots).map(e=>`"${e}"`)),i=t?`Invalid slot "${t}".`:"A slot prop is required.";throw Error(`${i} Valid slot names are ${e}.`)}return n.slots[e]}return n}function _(e,t,n){let{ref:a,...l}=d(n,e.slot)||{},u=(0,i.U)((0,o.useMemo)(()=>(0,r.P)(t,a),[t,a])),c=(0,s.v)(l,e);return"style"in l&&l.style&&"style"in e&&e.style&&("function"==typeof l.style||"function"==typeof e.style?c.style=t=>{let n="function"==typeof l.style?l.style(t):l.style,i={...t.defaultStyle,...n},r="function"==typeof e.style?e.style({...t,defaultStyle:i}):e.style;return{...i,...r}}:c.style={...l.style,...e.style}),[c,u]}function f(e=!0){let[t,n]=(0,o.useState)(e),i=(0,o.useRef)(!1),r=(0,o.useCallback)(e=>{i.current=!0,n(!!e)},[]);return(0,a.N)(()=>{i.current||n(!1)},[]),[r,t]}function h(e){let t=/^(data-.*)$/,n={};for(let i in e)t.test(i)||(n[i]=e[i]);return n}}