PageSourceSearch

https://www.careyaya.org/assets/Switch-C4XjT-ai.js

js careyaya.org collected 2026-10-01 15:08:44 UTC 3,401 bytes, 3 lines download raw bytes

1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._posthogChunkIds=e._posthogChunkIds||{},e._posthogChunkIds[n]="01a0d6ea-5c62-7973-9e69-0926cd7884a0")}catch(e){}}();import{j as s}from"./jsx-runtime-DuMOuFVt.js";import{r as R}from"./chunk-LFPYN7LY-ZMaTir27.js";import{f as T,u as L,b as Y,n as Z,B as E,c as ee,e as te,m as l,l as se}from"./factory-BL8na6Tv.js";import{I as oe,a as ae,b as re}from"./InputsGroupFieldset-DNbGk6Mi.js";import{a as N}from"./InputBase-CCamZmMf.js";import{u as B}from"./DirectionProvider-PGwLUtRT.js";import{u as ce}from"./use-id-Dz1nTexX.js";const W=R.createContext(null),ie=W.Provider,ne=()=>R.useContext(W),le={},S=T((r,o)=>{const{value:t,defaultValue:e,onChange:b,size:h,wrapperProps:d,children:u,readOnly:f,...C}=L("SwitchGroup",le,r),[a,p]=B({value:t,defaultValue:e,finalValue:[],onChange:b}),m=g=>{const c=g.currentTarget.value;!f&&p(a.includes(c)?a.filter(y=>y!==c):[...a,c])};return s.jsx(ie,{value:{value:a,onChange:m,size:h},children:s.jsx(N.Wrapper,{size:h,ref:o,...d,...C,labelElement:"div",__staticSelector:"SwitchGroup",children:s.jsx(oe,{role:"group",children:u})})})});S.classes=N.Wrapper.classes;S.displayName="@mantine/core/SwitchGroup";var A={root:"m_5f93f3bb",input:"m_926b4011",track:"m_9307d992",thumb:"m_93039a1d",trackLabel:"m_8277e082"};const he={labelPosition:"right",withThumbIndicator:!0},de=ee((r,{radius:o,color:t,size:e})=>({root:{"--switch-radius":o===void 0?void 0:se(o),"--switch-height":l(e,"switch-height"),"--switch-width":l(e,"switch-width"),"--switch-thumb-size":l(e,"switch-thumb-size"),"--switch-label-font-size":l(e,"switch-label-font-size"),"--switch-track-label-padding":l(e,"switch-track-label-padding"),"--switch-color":t?te(t,r):void 0}})),k=T((r,o)=>{const t=L("Switch",he,r),{classNames:e,className:b,style:h,styles:d,unstyled:u,vars:f,color:C,label:a,offLabel:p,onLabel:m,id:g,size:c,radius:y,wrapperProps:F,thumbIcon:_,checked:x,defaultChecked:O,onChange:U,labelPosition:P,description:$,error:I,disabled:j,variant:q,rootRef:D,mod:H,withThumbIndicator:J,...K}=t,i=ne(),M=c||i?.size,n=Y({name:"Switch",props:t,classes:A,className:b,style:h,classNames:e,styles:d,unstyled:u,vars:f,varsResolver:de}),{styleProps:Q,rest:G}=Z(K),V=ce(g),w=i?{checked:i.value.includes(G.value),onChange:i.onChange}:{},[z,X]=B({value:w.checked??x,defaultValue:O,finalValue:!1});return s.jsxs(ae,{...n("root"),__staticSelector:"Switch",__stylesApiProps:t,id:V,size:M,labelPosition:P,label:a,description:$,error:I,disabled:j,bodyElement:"label",labelElement:"span",classNames:e,styles:d,unstyled:u,"data-checked":w.checked||x||void 0,variant:q,ref:D,mod:H,...Q,...F,children:[s.jsx("input",{...G,disabled:j,checked:z,"data-checked":w.checked||x||void 0,onChange:v=>{i?w.onChange?.(v):U?.(v),X(v.currentTarget.checked)},id:V,ref:o,type:"checkbox",role:"switch",...n("input")}),s.jsxs(E,{"aria-hidden":"true",component:"span",mod:{error:I,"label-position":P,"without-labels":!m&&!p},...n("track"),children:[s.jsx(E,{component:"span",mod:{"reduce-motion":!0,"with-thumb-indicator":J&&!_},...n("thumb"),children:_}),s.jsx("span",{...n("trackLabel"),children:z?m:p})]})]})});k.classes={...A,...re};k.displayName="@mantine/core/Switch";k.Group=S;export{k as S};
2
3//# chunkId=01a0d6ea-5c62-7973-9e69-0926cd7884a0

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.