PageSourceSearch

https://platform.socbyte.ai/_next/static/chunks/5340.2c1318f31415b364.js

js socbyte.ai collected 2026-10-05 12:42:13 UTC 5,128 bytes, 1 lines download raw bytes

1try{let e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="13100ca6-5e64-43ed-a5a9-5f04ab36eb1f",e._sentryDebugIdIdentifier="sentry-dbid-13100ca6-5e64-43ed-a5a9-5f04ab36eb1f")}catch(e){}"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5340],{4608:(e,t,r)=>{r.d(t,{k:()=>s});var o=r(12115);let a=[["Cat","rgb(125, 50, 0)"],["Dog","rgb(100, 0, 0)"],["Rabbit","rgb(150, 0, 0)"],["Frog","rgb(200, 0, 0)"],["Fox","rgb(200, 75, 0)"],["Hedgehog","rgb(0, 75, 0)"],["Pigeon","rgb(0, 125, 0)"],["Squirrel","rgb(75, 100, 0)"],["Bear","rgb(125, 100, 0)"],["Tiger","rgb(0, 0, 150)"],["Leopard","rgb(0, 0, 200)"],["Zebra","rgb(0, 0, 250)"],["Wolf","rgb(0, 100, 150)"],["Owl","rgb(0, 100, 100)"],["Gull","rgb(100, 0, 100)"],["Squid","rgb(150, 0, 150)"]],n=a[Math.floor(Math.random()*a.length)],l=(0,o.createContext)({clientID:0,color:n[1],isCollabActive:!1,name:n[0],yjsDocMap:new Map});function s(e,t){let r=(0,o.useContext)(l);return null!=e&&(r.name=e),null!=t&&(r.color=t),r}},35340:(e,t,r)=>{r.r(t),r.d(t,{default:()=>u});var o=r(95155),a=r(12115),n=r(4608),l=r(36997),s=r(47241),d=r(43971),i=r(53310),c=r(11806),b=r(70747),f=r(12877);function p(e){let{option:t,index:r,options:l,totalVotes:s,withPollNode:d}=e,{clientID:i}=(0,n.k)(),c=(0,a.useRef)(null),b=t.votes,p=-1!==b.indexOf(i),u=b.length,g=t.text;return(0,o.jsxs)("div",{className:"mb-2.5 flex flex-row items-center","data-sentry-component":"PollOptionComponent","data-sentry-source-file":"poll-component.tsx",children:[(0,o.jsx)("div",{className:"relative mr-2.5 flex h-[22px] w-[22px] rounded-md border border-gray-400 ".concat(p?'border-primary bg-primary after:pointer-events-none after:absolute after:top-1 after:left-2 after:m-0 after:block after:h-[9px] after:w-[5px] after:rotate-45 after:cursor-pointer after:border-r-2 after:border-b-2 after:border-solid after:border-white after:content-[""]':""),children:(0,o.jsx)("input",{ref:c,className:"absolute block h-full w-full cursor-pointer border-0 opacity-0",type:"checkbox",onChange:e=>{d(e=>{e.toggleVote(t,i)})},checked:p})}),(0,o.jsxs)("div",{className:"border-primary relative flex flex-[10px] cursor-pointer overflow-hidden rounded-md border",children:[(0,o.jsx)("div",{className:"transition-width bg-accent absolute top-0 left-0 z-0 h-full duration-1000 ease-in-out",style:{width:"".concat(0===u?0:u/s*100,"%")}}),(0,o.jsx)("span",{className:"text-primary absolute top-1.5 right-4 text-xs",children:u>0&&(1===u?"1 vote":"".concat(u," votes"))}),(0,o.jsx)(f.p,{type:"text",value:g,onChange:e=>{let r=e.target,o=r.value,a=r.selectionStart,n=r.selectionEnd;d(e=>{e.setOptionText(t,o)},()=>{r.selectionStart=a,r.selectionEnd=n})},placeholder:"Option ".concat(r+1),"data-sentry-element":"Input","data-sentry-source-file":"poll-component.tsx"})]}),(0,o.jsx)("button",{disabled:l.length<3,className:"relative z-0 ml-1.5 flex h-7 w-7 cursor-pointer rounded-md border-0 bg-transparent bg-[position:6px_6px] bg-no-repeat opacity-30 before:absolute before:top-1.5 before:left-[13px] before:block before:h-[15px] before:w-0.5 before:-rotate-45 before:bg-gray-400 before:content-[''] after:absolute after:top-1.5 after:left-[13px] after:block after:h-[15px] after:w-0.5 after:rotate-45 after:bg-gray-400 after:content-[''] hover:bg-gray-100 hover:opacity-100 disabled:cursor-not-allowed disabled:hover:bg-transparent disabled:hover:opacity-30","aria-label":"Remove",onClick:()=>{d(e=>{e.deleteOption(t)})}})]})}function u(e){let{question:t,options:r,nodeKey:n}=e,[f]=(0,l.DF)(),u=(0,a.useMemo)(()=>r.reduce((e,t)=>e+t.votes.length,0),[r]),[g,x,m]=(0,s.Y)(n),[h,y]=(0,a.useState)(null),v=(0,a.useRef)(null),w=(0,a.useCallback)(e=>{let t=(0,i.vJq)();return g&&(0,i.RTZ)(t)&&(e.preventDefault(),f.update(()=>{t.getNodes().forEach(e=>{(0,c.q9)(e)&&e.remove()})})),!1},[f,g]);(0,a.useEffect)(()=>(0,d.Sd)(f.registerUpdateListener(e=>{let{editorState:t}=e;y(t.read(()=>(0,i.vJq)()))}),f.registerCommand(i.d8p,e=>e.target===v.current&&(e.shiftKey||m(),x(!g),!0),i.AcJ),f.registerCommand(i.w$Z,w,i.AcJ),f.registerCommand(i.gCZ,w,i.AcJ)),[m,f,g,n,w,x]);let k=(e,t)=>{f.update(()=>{let t=(0,i.nsf)(n);(0,c.q9)(t)&&e(t)},{onUpdate:t})},C=(0,i.RTZ)(h)&&g;return(0,o.jsx)("div",{className:"bg-background max-w-[600px] min-w-[400px] cursor-pointer rounded-lg border border-gray-200 select-none ".concat(C?"outline-primary outline outline-2":""),ref:v,"data-sentry-component":"PollComponent","data-sentry-source-file":"poll-component.tsx",children:(0,o.jsxs)("div",{className:"m-4 cursor-default",children:[(0,o.jsx)("h2",{className:"m-0 mb-4 text-center text-lg text-gray-600",children:t}),r.map((e,t)=>{let a=e.uid;return(0,o.jsx)(p,{withPollNode:k,option:e,index:t,options:r,totalVotes:u},a)}),(0,o.jsx)("div",{className:"flex justify-center",children:(0,o.jsx)(b.$,{onClick:()=>{k(e=>{e.addOption((0,c.hw)())})},size:"sm","data-sentry-element":"Button","data-sentry-source-file":"poll-component.tsx",children:"Add Option"})})]})})}}}]);

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.