PageSourceSearch

https://reg-kursk.ru/build/assets/checkbox-DaqbNDQS.js

js reg-kursk.ru collected 2026-09-24 20:20:08 UTC 4,187 bytes, 1 lines download raw bytes

1import{r as l,j as i}from"./app-CureB7I2.js";import{aj as L,ac as N,aa as y,ad as P,az as O,at as H,ah as G,c as K,a as U}from"./sonner-DS-oxQwz.js";import{u as X}from"./dialog-DJXJp60a.js";import{C as $}from"./check-C_ruieJP.js";var E="Checkbox",[J]=H(E),[Q,j]=J(E);function V(o){const{__scopeCheckbox:e,checked:n,children:s,defaultChecked:r,disabled:t,form:a,name:b,onCheckedChange:u,required:m,value:k="on",internal_do_not_use_render:f}=o,[p,v]=L({prop:n,defaultProp:r??!1,onChange:u,caller:E}),[C,x]=l.useState(null),[g,c]=l.useState(null),d=l.useRef(!1),_=C?!!a||!!C.closest("form"):!0,R={checked:p,disabled:t,setChecked:v,control:C,setControl:x,name:b,form:a,value:k,hasConsumerStoppedPropagationRef:d,required:m,defaultChecked:h(r)?!1:r,isFormControl:_,bubbleInput:g,setBubbleInput:c};return i.jsx(Q,{scope:e,...R,children:W(f)?f(R):s})}var S="CheckboxTrigger",w=l.forwardRef(({__scopeCheckbox:o,onKeyDown:e,onClick:n,...s},r)=>{const{control:t,value:a,disabled:b,checked:u,required:m,setControl:k,setChecked:f,hasConsumerStoppedPropagationRef:p,isFormControl:v,bubbleInput:C}=j(S,o),x=N(r,k),g=l.useRef(u);return l.useEffect(()=>{const c=t?.form;if(c){const d=()=>f(g.current);return c.addEventListener("reset",d),()=>c.removeEventListener("reset",d)}},[t,f]),i.jsx(y.button,{type:"button",role:"checkbox","aria-checked":h(u)?"mixed":u,"aria-required":m,"data-state":z(u),"data-disabled":b?"":void 0,disabled:b,value:a,...s,ref:x,onKeyDown:P(e,c=>{c.key==="Enter"&&c.preventDefault()}),onClick:P(n,c=>{f(d=>h(d)?!0:!d),C&&v&&(p.current=c.isPropagationStopped(),p.current||c.stopPropagation())})})});w.displayName=S;var B=l.forwardRef((o,e)=>{const{__scopeCheckbox:n,name:s,checked:r,defaultChecked:t,required:a,disabled:b,value:u,onCheckedChange:m,form:k,...f}=o;return i.jsx(V,{__scopeCheckbox:n,checked:r,defaultChecked:t,disabled:b,required:a,onCheckedChange:m,name:s,form:k,value:u,internal_do_not_use_render:({isFormControl:p})=>i.jsxs(i.Fragment,{children:[i.jsx(w,{...f,ref:e,__scopeCheckbox:n}),p&&i.jsx(A,{__scopeCheckbox:n})]})})});B.displayName=E;var M="CheckboxIndicator",T=l.forwardRef((o,e)=>{const{__scopeCheckbox:n,forceMount:s,...r}=o,t=j(M,n);return i.jsx(G,{present:s||h(t.checked)||t.checked===!0,children:i.jsx(y.span,{"data-state":z(t.checked),"data-disabled":t.disabled?"":void 0,...r,ref:e,style:{pointerEvents:"none",...o.style}})})});T.displayName=M;var q="CheckboxBubbleInput",A=l.forwardRef(({__scopeCheckbox:o,...e},n)=>{const{control:s,hasConsumerStoppedPropagationRef:r,checked:t,defaultChecked:a,required:b,disabled:u,name:m,value:k,form:f,bubbleInput:p,setBubbleInput:v}=j(q,o),C=N(n,v),x=X(t),g=O(s);l.useEffect(()=>{const d=p;if(!d)return;const _=window.HTMLInputElement.prototype,I=Object.getOwnPropertyDescriptor(_,"checked").set,D=!r.current;if(x!==t&&I){const F=new Event("click",{bubbles:D});d.indeterminate=h(t),I.call(d,h(t)?!1:t),d.dispatchEvent(F)}},[p,x,t,r]);const c=l.useRef(h(t)?!1:t);return i.jsx(y.input,{type:"checkbox","aria-hidden":!0,defaultChecked:a??c.current,required:b,disabled:u,name:m,value:k,form:f,...e,tabIndex:-1,ref:C,style:{...e.style,...g,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});A.displayName=q;function W(o){return typeof o=="function"}function h(o){return o==="indeterminate"}function z(o){return h(o)?"indeterminate":o?"checked":"unchecked"}function oe(o){const e=K.c(9);let n,s;e[0]!==o?({className:n,...s}=o,e[0]=o,e[1]=n,e[2]=s):(n=e[1],s=e[2]);let r;e[3]!==n?(r=U("peer h-gos-12 w-gos-12 shrink-0 rounded-gos-2 border-2 border-gosblue outline-none hover:bg-fessura active:border-pulsante-premuto active:bg-fessura disabled:cursor-not-allowed","focus-visible:","aria-invalid:bg-paura aria-invalid:border-gosred",n),e[3]=n,e[4]=r):r=e[4];let t;e[5]===Symbol.for("react.memo_cache_sentinel")?(t=i.jsx(T,{"data-slot":"checkbox-indicator",className:"flex items-center justify-center text-current transition-none",children:i.jsx($,{className:"size-3.5 rounded-gos bg-gosblue p-px text-white"})}),e[5]=t):t=e[5];let a;return e[6]!==s||e[7]!==r?(a=i.jsx(B,{"data-slot":"checkbox",className:r,...s,children:t}),e[6]=s,e[7]=r,e[8]=a):a=e[8],a}export{oe as C};

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.