1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1547,32508,35458,55462,65060,65129,95323],{1547:(e,t,o)=>{"use strict";o.d(t,{A:()=>i});var n,r=o(14232);function a(){return(a=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)({}).hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e}).apply(null,arguments)}let i=e=>r.createElement("svg",a({xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 26 24"},e),n||(n=r.createElement("g",{fill:"none",fillRule:"evenodd"},r.createElement("rect",{width:25.043,height:2.098,y:21.902,fill:"currentColor",rx:1.049}),r.createElement("rect",{width:14.348,height:2.098,x:7.419,y:9.777,fill:"currentColor",rx:1.049,transform:"rotate(45 14.593 10.826)"}),r.createElement("path",{stroke:"currentColor",strokeWidth:1.836,d:"M13.118 22.907 24.265 11.76a2.8 2.8 0 0 0 0-3.957l-5.997-5.997a2.8 2.8 0 0 0-3.957 0L1.735 14.382a2.8 2.8 0 0 0 0 3.957l4.568 4.568z"}))))},4381:(e,t,o)=>{"use strict";o.d(t,{A:()=>i});var n,r=o(14232);function a(){return(a=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)({}).hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e}).apply(null,arguments)}let i=e=>r.createElement("svg",a({xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 23"},e),n||(n=r.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"m4.564 4.714-.007.013c-1.143 0-2.338.655-2.338 2.002l-.013-.005v2.535h.01c.266 4.79 3.125 8.345 8.877 8.654h.565a.63.63 0 0 1 .63.63v.94a.63.63 0 0 1-.63.63h-.363v.019C4.476 20.132.39 15.416.038 10.25a1 1 0 0 1-.032-.265V5.89H.003q0-.013.003-.026v-.057c0-.202.054-.39.149-.553.377-1.057 1.462-2.578 3.557-2.716q.11-.024.226-.024h2.84V1.095a1.1 1.1 0 0 1 2.2 0v1.42h4.1v-1.42a1.1 1.1 0 0 1 2.2 0v1.42h2.682q.093 0 .18.014c2.185.055 3.323 1.587 3.729 2.672.115.174.181.382.181.606v4.179a1.1 1.1 0 0 1-2.2 0V6.718l-.026.011c0-1.347-1.195-2.002-2.338-2.002l-.007-.013zm15.564 9.712 1.12 2.132c.06.115.154.21.27.27l2.132 1.12a.642.642 0 0 1 .004 1.135l-2.162 1.154a.64.64 0 0 0-.265.265l-1.154 2.162a.642.642 0 0 1-1.135-.004l-1.12-2.132a.64.64 0 0 0-.27-.27l-2.132-1.12a.642.642 0 0 1-.004-1.135l2.162-1.154a.64.64 0 0 0 .265-.265l1.154-2.162a.642.642 0 0 1 1.135.004M7.406 11.943a1.73 1.73 0 0 1-1.733-1.729 1.73 1.73 0 0 1 1.733-1.728 1.73 1.73 0 0 1 1.732 1.728 1.73 1.73 0 0 1-1.732 1.729m7.402 0a1.73 1.73 0 0 1-1.732-1.729 1.73 1.73 0 0 1 1.732-1.728 1.73 1.73 0 0 1 1.732 1.728 1.73 1.73 0 0 1-1.732 1.729"})))},6041:(e,t,o)=>{"use strict";o.d(t,{b:()=>i});var n=o(82964),r=o(21028),a=o(5496);function i(e,t){if(!e?.length||!t)return;let o=`AITaskQueueStats${e}`;if(null==t.allCurrentProfileListenerUnsubscribes?.[o])try{let i=(0,n.onSnapshot)((0,n.doc)(r.db,"aiTaskQueueStats",e),o=>{let n=o.data()??null;t.aiTaskQueueStatsByQueue||t.setProp("aiTaskQueueStatsByQueue",{}),t.setProp("aiTaskQueueStatsByQueue",{...t.aiTaskQueueStatsByQueue,[e]:n}),t.setCS("aiTaskQueueStatsPrimaryQueueID",e),t.setProp("aiTaskQueueStats",n),(0,a.ny)(e,t)},function(t){console.error("Error snapshot aiTaskQueueStats",e,t)});t.setObjectKey("allCurrentProfileListenerUnsubscribes",o,i)}catch(e){t.clearCurrentProfileListener(o)}}},11035:(e,t,o)=>{"use strict";o.d(t,{A:()=>i});var n,r=o(14232);function a(){return(a=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)({}).hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e}).apply(null,arguments)}let i=e=>r.createElement("svg",a({xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 22 19"},e),n||(n=r.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"M11 2C5.5 2 1.2 5.8 0 9.5 1.2 13.2 5.5 17 11 17s9.8-3.8 11-7.5C20.8 5.8 16.5 2 11 2m0 12.5c-2.48 0-4.5-2.02-4.5-4.5S8.52 5.5 11 5.5s4.5 2.02 4.5 4.5-2.02 4.5-4.5 4.5m0-7a2.5 2.5 0 0 0 0 5 2.5 2.5 0 0 0 0-5"})))},11794:(e,t,o)=>{"use strict";o.d(t,{A:()=>i});var n,r=o(14232);function a(){return(a=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)({}).hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e}).apply(null,arguments)}let i=e=>r.createElement("svg",a({xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 12 8"},e),n||(n=r.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"M1.41 0 6 4.77 10.59 0 12 1.469l-6 6.25-6-6.25z"})))},12076:(e,t,o)=>{"use strict";o.d(t,{A:()=>i});var n,r=o(14232);function a(){return(a=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)({}).hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e}).apply(null,arguments)}let i=e=>r.createElement("svg",a({xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 22 19"},e),n||(n=r.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"M11 4c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C9.74 4.13 10.35 4 11 4M1 1.27l2.28 2.28.46.46A11.8 11.8 0 0 0 0 9c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L18.73 19 20 17.73 2.27 0zM6.53 6.8l1.55 1.55C8.03 8.56 8 8.78 8 9c0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2m4.31-.78 3.15 3.15.02-.16c0-1.66-1.34-3-3-3z"})))},12295:(e,t,o)=>{"use strict";o.d(t,{A:()=>i});var n,r=o(14232);function a(){return(a=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)({}).hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e}).apply(null,arguments)}let i=e=>r.createElement("svg",a({xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 10 22"},e),n||(n=r.createElement("path",{fill:"currentColor",fillRule:"evenodd",stroke:"currentColor",d:"M6.595 5.446c-1.328 0-2.404-.995-2.404-2.223S5.267 1 6.595 1 9 1.995 9 3.223 7.923 5.446 6.595 5.446ZM0 9.446c5.869-3.309 8.923-1.324 5.742 6.893Q4.5 19.545 9 19.545q-5.109 2.75-7.284.304C-.8 17.023 6.95 8.91 0 9.447Z"})))},20719:(e,t,o)=>{"use strict";function n(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{includeCopyAndEdit:t=!1,includeReplyPath:n=!1}=e,r=[Promise.all([o.e(63656),o.e(30045),o.e(14500),o.e(40328)]).then(o.bind(o,14500)),o.e(12660).then(o.bind(o,12660))];
1t&&r.push(o.e(22590).then(o.bind(o,22590))),n&&r.push(Promise.all([o.e(63656),o.e(30045),o.e(52180)]).then(o.bind(o,30045)),o.e(54940).then(o.bind(o,54940)),o.e(45317).then(o.bind(o,45317)),Promise.resolve().then(o.bind(o,97685))),Promise.all(r)}o.d(t,{z:()=>n})},29964:(e,t,o)=>{"use strict";o.d(t,{A:()=>i});var n,r=o(14232);function a(){return(a=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)({}).hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e}).apply(null,arguments)}let i=e=>r.createElement("svg",a({xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 14 19"},e),n||(n=r.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"M7 12c1.66 0 2.99-1.34 2.99-3L10 3c0-1.66-1.34-3-3-3S4 1.34 4 3v6c0 1.66 1.34 3 3 3m5.3-3c0 3-2.54 5.1-5.3 5.1S1.7 12 1.7 9H0c0 3.41 2.72 6.23 6 6.72V19h2v-3.28c3.28-.48 6-3.3 6-6.72z"})))},34732:e=>{e.exports={docLink:"AIParameterBottomRow_docLink__6ZQGi",endText:"AIParameterBottomRow_endText__7NrP_"}},38465:(e,t,o)=>{"use strict";o.d(t,{A:()=>i});var n,r=o(14232);function a(){return(a=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)({}).hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e}).apply(null,arguments)}let i=e=>r.createElement("svg",a({xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 22 21"},e),n||(n=r.createElement("path",{fill:"currentColor",fillRule:"evenodd",stroke:"currentColor",strokeWidth:1.591,d:"m11 15.902-5.29 3.38 1.579-6.076L2.44 9.219l6.266-.376L11 3l2.294 5.843 6.266.376-4.849 3.987 1.58 6.075z"})))},40791:(e,t,o)=>{"use strict";o.d(t,{A:()=>v});var n=o(37876),r=o(14232),a=o(33144),i=o(50698),s=o(94882),l=o(23694),c=o(11150),p=o(65129),u=o(11794),d=o(85207),h=o(38465),m=o(56566),_=o.n(m);function g(e,t,o){if(!t?.currentUser?.uid||t?.currentUser?.isAnonymous===!0)return null;let n=t?.currentUnlockedProfileID&&"-1"!==String(t.currentUnlockedProfileID)?t.currentUnlockedProfileID:t?.currentUser?.uid,r=String(o||"default").replace(/[^a-z0-9_-]/gi,"_");return`${e}_${n}_${r}`}async function f(e,t){if(!t)return[];try{await (0,c.loadUserKeyValues)([t],e);let o=e?.getCS?.(t);if(Array.isArray(o))return o;return[]}catch(e){return console.warn("[ModelDropdown] loadArrayKV failed:",e),[]}}function w(e,t,o){t&&e?.currentUser?.uid&&(e?.setCS?.(t,o),(0,p.saveUserKeyValues)(e.currentUser.uid,{[t]:o},e).catch(e=>{console.warn("[ModelDropdown] saveArrayKV failed:",e)}))}function v(e){let{value:t,options:o,onChange:c,visibility:p="public",labelPrefix:m="",fallbackLabel:v="",maxMenuHeight:C=280,u:k=null,scope:I="model"}=e,[y,A]=(0,r.useState)(!1),[b,x]=(0,r.useState)([]),[T,B]=(0,r.useState)([]),[S,R]=(0,r.useState)(!1),D="private"===p?"#525F7F":l.PRIMARY_COLOR,M=(0,r.useMemo)(()=>g("starredModels",k,I),[k,I]),P=(0,r.useMemo)(()=>g("recentModels",k,I),[k,I]);(0,r.useEffect)(()=>{if(!y||S||!k)return;let e=!1;return(async()=>{let[t,o]=await Promise.all([f(k,M),f(k,P)]);e||(x(t),B(o),R(!0))})(),()=>{e=!0}},[y,S,M,P]);let{refs:F,floatingStyles:O,context:j}=(0,a.we)({open:y,onOpenChange:A,placement:"bottom-start",whileElementsMounted:i.ll,middleware:[(0,s.cY)(4),(0,s.UU)({padding:8}),(0,s.BN)({padding:8}),(0,s.Ej)({padding:8,apply(e){let{availableHeight:t,elements:o}=e,n=Math.min(C,t);Object.assign(o.floating.style,{maxHeight:`${n}px`});let r=o.floating.querySelector("[data-dropdown-scroll]");r&&(r.style.maxHeight=`${n}px`)}})]}),W=(0,a.kp)(j,{toggle:!0}),N=(0,a.s9)(j),E=(0,a.It)(j,{role:"listbox"}),{getReferenceProps:L,getFloatingProps:U}=(0,a.bv)([W,N,E]),$=e=>{if(c({target:{value:e}}),A(!1),k&&P){let t=e.replace(/_imageGen$/,""),o=[t,...T.filter(e=>e!==t)].slice(0,5);B(o),w(k,P,o)}},V=(e,t)=>{if(!k)return;let o=t.replace(/_imageGen$/,""),n=b.includes(o)?b.filter(e=>e!==o):[o,...b].slice(0,20);x(n),w(k,M,n),"keydown"===e.type&&$(t)},H=t?.endsWith("_imageGen")?t.replace("_imageGen",""):t,Y=o?.find(e=>e.value===t||e.value===H),q=Y?.text||(v?.length>0?v:null)||(t?t&&"string"==typeof t?(t.endsWith("_imageGen")?t.replace(/_imageGen$/,""):t).split("/").pop().split("-").filter(
1Boolean).map(e=>/^\d+(\.\d+)*$/.test(e)?e:e.length<=3&&/^[a-z0-9]+$/i.test(e)?e.toUpperCase():e.charAt(0).toUpperCase()+e.slice(1)).join(" "):"Select model":"Loading models..."),Q=m?`${m}${q}`:q,z=(0,r.useMemo)(()=>{let e=Array.isArray(o)?o:[],t=new Map(e.map(e=>[e.value,e])),n=b.map(e=>e.replace(/_imageGen$/,"")),r=T.map(e=>e.replace(/_imageGen$/,"")),a=n.map(e=>t.get(e)).filter(Boolean),i=r.filter(e=>!n.includes(e)).map(e=>t.get(e)).filter(Boolean),s=new Set([...n,...r.filter(e=>!n.includes(e))]),l=e.filter(e=>!s.has(e.value)),c=[];if(a.length>0)for(let e of(c.push({kind:"header",label:"Starred",key:"header-starred"}),a))c.push({kind:"option",opt:e,key:`starred-${e.value}`});if(i.length>0)for(let e of(c.length>0&&c.push({kind:"gap",key:"gap-recent"}),c.push({kind:"header",label:"Recently used",key:"header-recent"}),i))c.push({kind:"option",opt:e,key:`recent-${e.value}`});if(l.length>0)for(let e of(c.length>0&&c.push({kind:"gap",key:"gap-all"}),c.push({kind:"header",label:"All models",key:"header-all"}),l))c.push({kind:"option",opt:e,key:`all-${e.value}`});if(0===c.length)for(let t of e)c.push({kind:"option",opt:t,key:`opt-${t.value}`});return c},[o,b,T]),K=e=>{let o=e.value.replace(/_imageGen$/,""),r=b.includes(o),a=e.value===t||e.value===H;return(0,n.jsx)("button",{type:"button",className:`${_().customDropdownOption} ${a?_().customDropdownOptionSelected:""}`,onClick:()=>$(e.value),children:(0,n.jsxs)("span",{className:_().customDropdownOptionRow,children:[(0,n.jsx)("span",{className:_().customDropdownOptionRowMain,children:(0,n.jsxs)("span",{className:_().customDropdownOptionMain,children:[(0,n.jsx)("span",{className:_().customDropdownText,children:e.text}),e.subtitle?.length>0?(0,n.jsx)("span",{className:_().customDropdownSubtitle,children:e.subt
1itle}):null]})}),k?.currentUser?.uid?(0,n.jsx)("span",{role:"button",tabIndex:0,className:`${_().customDropdownStarButton} ${r?_().customDropdownStarButtonStarred:""}`,onClick:t=>V(t,e.value),onKeyDown:t=>{("Enter"===t.key||" "===t.key)&&(t.preventDefault(),V(t,e.value))},"aria-label":r?"Unstar model":"Star model","data-tooltip-content":r?"Remove from starred":"Add to starred","data-tooltip-id":"placeBottom",children:r?(0,n.jsx)(h.A,{width:14,height:14,color:"#f5a623"}):(0,n.jsx)(d.A,{width:14,height:14,color:"currentColor"})}):null,a&&(0,n.jsx)("span",{className:`${_().customDropdownCheckmark} ${!k?.currentUser?.uid?_().customDropdownCheckmarkSolo:""}`,children:"â"})]})},e.value)};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{ref:F.setReference,...L(),children:(0,n.jsxs)("button",{type:"button",className:_().customModelDropdownButton,children:[(0,n.jsx)("span",{className:_().customDropdownText,children:Q}),(0,n.jsx)(u.A,{width:12,height:8,color:D,viewBox:"0 0 12 8",className:_().customDropdownCaret})]})}),(0,n.jsx)(a.XF,{children:y&&(0,n.jsx)("div",{ref:F.setFloating,style:O,...U(),className:_().customDropdownMenu,children:(0,n.jsx)("div",{className:_().customDropdownMenuScroll,"data-dropdown-scroll":!0,children:z.map(e=>"header"===e.kind?(0,n.jsx)("div",{className:_().customDropdownSectionHeader,children:e.label},e.key):"gap"===e.kind?(0,n.jsx)("div",{className:_().customDropdownSectionGap},e.key):K(e.opt))})})})]})}},47568:(e,t,o)=>{"use strict";o.d(t,{A:()=>i});var n,r=o(14232);function a(){return(a=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)({}).hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e}).apply(null,arguments)}let i=e=>r.createElement("svg",a({xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 22 21"},e),n||(n=r.createElement("g",{fill:"currentColor",fillRule:"evenodd"},r.createElement("path",{d:"m13.677 7.136 6.016-6.016a.84.84 0 0 1 1.185 0l.002.002a.84.84 0 0 1 0 1.185l-6 6h3.806c.463 0 .838.376.838.839v.002a.84.84 0 0 1-.838.838h-5.72a.84.84 0 0 1-.714-.237l-.002-.001a.834.834 0 0 1-.252-.605V3.295c0-.463.376-.838.84-.838h.001c.463 0 .838.375.838.838zM8.323 13.871 1.98 20.214a.84.84 0 0 1-1.186 0l-.001-.002a.84.84 0 0 1 0-1.185l6.348-6.348H3.314a.84.84 0 0 1-.838-.839v-.002c0-.463.375-.838.838-.838h5.848a.84.84 0 0 1 .84.843v5.848a.84.84 0 0 1-.84.838h-.001a.84.84 0 0 1-.838-.838z"}))))},50704:(e,t,o)=>{"use strict";o.d(t,{A:()=>i});var n,r=o(14232);function a(){return(a=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)({}).hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e}).apply(null,arguments)}let i=e=>r.createElement("svg",a({xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 16 16"},e),n||(n=r.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"M14.222 14.222H1.778V1.778H8V0H1.778C.79 0 0 .8 0 1.778v12.444C0 15.2.791 16 1.778 16h12.444C15.2 16 16 15.2 16 14.222V8h-1.778zM9.778 0v1.778h3.19l-8.737 8.738 1.253 1.253 8.738-8.738v3.191H16V0z"})))},54682:(e,t,o)=>{"use strict";function n(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,o=e?.computeQueueID;if(o?.length>0&&"t4gpu"!==o&&!function(e,t){let o=t?.computeQueueID??"t4gpu";if(e?.computeQueueID!==o)return!1;let n=e?.inputs?.model??e?.inputs?.ai_model;return n?.length>0}(e,t))return o;let n=e?.inputs?.model??e?.inputs?.ai_model??null;if(n?.length>0&&t?.inputSchemaJSONString?.length>0)try{let e=JSON.parse(t.inputSchemaJSONString);for(let t of Object.values(e)){if(t?.type!=="grid-select"||!t?.options?.length)continue;let e=t.options.find(e=>e.value===n);if(e?.computeQueueID?.length>0)return e.computeQueueID}}catch(e){console.warn("resolveComputeQueueIDForTask: schema parse failed",e)}return o?.length>0?o:t?.computeQueueID??"t4gpu"}o.d(t,{o:()=>n})},55462:(e,t,o)=>{"use strict";o.r(t),o.d(t,{default:()=>r});var n=o(37876);o(14232);let r=function(e){return(0,n.jsx)("svg",{width:e.width,height:e.height,viewBox:"0 0 22 24",xmlns:"http://www.w3.org/2000/svg",style:{overflow:"visible"},...e,children:(0,n.jsx)("path",{d:"M20.9 6.933h-2.2v9.6H4.4v2.134c0 .586.495 1.066 1.1 1.066h12.1L22 24V8c0-.587-.495-1.067-1.1-1.067zM16.5 1.6v11.733c0 .587-.495 1.067-1.1 1.067h-11L0 18.667V1.6C0 1.013.495.533 1.1.533h14.3c.605 0 1.1.48 1.1 1.067zM7.427 8.716h1.85V8.31c0-.27.06-.49.179-.657.118-.167.401-.41.848-.731.652-.452 1.094-.858 1.327-1.219.232-.361.349-.79.349-1.28
16 0-.745-.283-1.341-.849-1.788-.565-.447-1.327-.67-2.286-.67a6.814 6.814 0 00-3.303.846l.761 1.483c.894-.442 1.69-.664 2.388-.664.4 0 .712.077.936.23.223.154.335.378.335.671 0 .262-.078.499-.234.71-.156.213-.478.488-.967.827-.508.361-.857.702-1.048 1.022-.19.32-.286.698-.286 1.131v.501zm-.223 2.316c0 .365.107.649.32.85.215.2.518.3.909.3.381 0 .68-.102.893-.307.214-.206.322-.487.322-.843 0-.37-.106-.655-.318-.853-.212-.199-.511-.298-.897-.298-.4 0-.706.097-.915.29-.21.195-.314.482-.314.86z",fill:e.color,stroke:"none",strokeWidth:1,fillRule:"evenodd"})})}},56491:(e,t,o)=>{"use strict";function n(e){let{currentValue:t=null,preferredModelValue:o=null,modelOptions:n=[],schemaDefaultValue:r=null}=e;if(!Array.isArray(n)||0===n.length)return null;let a=e=>e&&n.find(t=>t?.value===e)||null,i=a(o);if(i)return{value:i.value,text:i.text||null,computeQueueID:i.computeQueueID||null,source:"preferred"};let s=a(t);if(s)return{value:s.value,text:s.text||null,computeQueueID:s.computeQueueID||null,source:"current"};let l=a(r);if(l)return{value:l.value,text:l.text||null,computeQueueID:l.computeQueueID||null,source:"schemaDefault"};let c=n[0];return c?{value:c.value,text:c.text||null,computeQueueID:c.computeQueueID||null,source:"firstOption"}:null}o.d(t,{N:()=>n})},56566:e=>{e.exports={messageAICompactOuter:"ReplyToAICompact_messageAICompactOuter__DvhWm",replyWrapper:"ReplyToAICompact_replyWrapper__SZImO",replyWrapperPrivate:"ReplyToAICompact_replyWrapperPrivate__UW4Kk",replyRow:"ReplyToAICompact_replyRow__E7scu",col:"ReplyToAICompact_col__4N3R1",footerControlsRow:"ReplyToAICompact_footerControlsRow__Y2WCc",compactNotepadFooterShell:"ReplyToAICompact_compactNotepadFooterShell__AsPPf",customFunctionModeDropdownButton:"ReplyToAICompact_customFunctionModeDropdownButton__62JRE",customModelDropdownButton:"ReplyToAICompact_customModelDropdownButton__5a5qr",customDropdownText:"ReplyToAICompact_customDropdownText__l33Va",heroFreeUsesSlot:"ReplyToAICompact_heroFreeUsesSlot__z6o_F",heroFreeUsesLabel:"ReplyToAICompact_heroFreeUsesLabel__aMIBX",heroFreeUsesReserve:"ReplyToAICompact_heroFreeUsesReserve__F1gnk",noFreeUsesSlot:"ReplyToAICompact_noFreeUsesSlot__oEhVQ",replyDivider:"ReplyToAICompact_replyDivider__XWEy6",actionButton:"ReplyToAICompact_actionButton__TE0Vl",actionButtonSending:"ReplyToAICompact_actionButtonSending__3_OPA",sendSpinner:"ReplyToAICompact_sendSpinner__TejXC",replyCompactSpin:"ReplyToAICompact_replyCompactSpin__CUac8",attachButton:"ReplyToAICompact_attachButton__5FY8L",inputTextArea:"ReplyToAICompact_inputTextArea__3rKPL",sendIconWrapper:"ReplyToAICompact_sendIconWrapper__2xraB",captionTipTop:"ReplyToAICompact_captionTipTop__396TX",captionTipTopChecklist:"ReplyToAICompact_captionTipTopChecklist__4Mwt2",rightMessageCurly:"ReplyToAICompact_rightMessageCurly__CwsaB",rightMessageCurlyChecklist:"ReplyToAICompact_rightMessageCurlyChecklist__gCv5l",compWrapper:"ReplyToAICompact_compWrapper__4m40i",footerControlsRowNoMode:"ReplyToAICompact_footerControlsRowNoMode__zSynH",infoPopover:"ReplyToAICompact_infoPopover__GK2LF",infoPopoverRow:"ReplyToAICompact_infoPopoverRow__0xm9S",infoPopoverDivider:"ReplyToAICompact_infoPopoverDivider__hLD_a",dropdownsRow:"ReplyToAICompact_dropdownsRow__LaYwG",customFunctionModeDropdownWrapper:"ReplyToAICompact_customFunctionModeDropdownWrapper__no_dp",customDropdownCaret:"ReplyToAICompact_customDropdownCaret__u2hVg",customModelDropdownWrapper:"ReplyToAICompact_customModelDropdownWrapper__161pb",customDropdownMenu:"ReplyToAICompact_customDropdownMenu__0wv1r",customDropdownMenuScroll:"ReplyToAICompact_customDropdownMenuScroll__NO3Jb",customDropdownOption:"ReplyToAICompact_customDropdownOption__DohLM",customDropdownOptionMain:"ReplyToAICompact_customDropdownOptionMain__pwZZW",customDropdownSubtitle:"ReplyToAICompact_customDropdownSubtitle__b3CNh",customDropdownOptionSelected:"ReplyToAICompact_customDropdownOptionSelected___NfNb",customDropdownOptionWithIcon:"ReplyToAICompact_customDropdownOptionWithIcon__DQI0G",customDropdownCheckmark:"ReplyToAICompact_customDropdownCheckmark__ISleK",customDropdownCheckmarkSolo:"ReplyToAICompact_customDropdownCheckmarkSolo__T3J8g",customDropdownStarButton:"ReplyToAICompact_customDropdownStarButton__uOq_a",customDropdownStarButtonStarred:"ReplyToAICompact_customDropdownStarButtonStarred__2Kzxk",customDropdownSectionHeader:"ReplyToAICompact_customDropdownSectionHeader__vsnf8",customDropdownSectionGap:"ReplyToAICompact_customDropdownSectionGap__REA8w",customDropdownOptionRow:"ReplyToAICompact_customDropdownOptionRow__A4JdF",customDropdownOptionRowMain:"ReplyToAICompact_customDropdownOptionRowMain__JpgoZ",functionIconWrapper:"ReplyToAICompact_functionIconWrapper__sEv73",functionModeDropdown:"ReplyToAICompact_functionModeDropdown__nn_Mr",dropdownDivider:"ReplyToAICompact_dropdownDivider__3PFst",advancedToolLink:"ReplyToAICompact_advancedToolLink__C88tC",modelDropdown:"ReplyToAICompact_modelDropdown__usHPC",footerControlsSpacer:"ReplyToAICompact_footerControlsSpacer__P8TdW",footerControlsWrapper:"ReplyToAICompact_footerControlsWrapper__b2SJY",dropzoneOverlay:"ReplyToAICompact_dropzoneOverlay__CQ_zD",fileName:"ReplyToAICompact_fileName__UBFzS",checkmarkImageWrapper:"ReplyToAICompact_checkmarkImageWrapper__sqVeF",costInfoIconWrapper:"ReplyToAICompact_costInfoIconWrapper__HMnWP",costInfoIcon:"ReplyToAICompact_costInfoIcon__vsztG",minimizeComposerButton:"ReplyToAICompact_minimizeComposerButton__GYKRj"}},59013:(e,t,o)=>{"use strict";o.d(t,{A:()=>l});var n=o(37876),r=o(34732),a=o.n(r),i=o(50704),s=o(23694);let l=e=>{let{endText:t,postText:o,endLink:r,endLinkText:l}=e;return(0,n.jsxs)(n.Fragment,{children:[(t?.length>0||o?.length>0)&&(0,n.jsx)("p",{className:a().endText,children:t??o}),r&&l&&(0,n.jsx)("a",{target:"_blank",href:r,className:a().blueLink,children:(0,n.jsxs)("div",{className:a().docLink,children:[l,(0,n.jsx)("div",{className:a().oNewIconWrapper,children:(0,n.jsx)(i.A,{width:16,height:16,color:s.PRIMARY_COLOR})})]})})]})}},60232:(e,t,o)=>{"use strict";o.d(t,{dX:()=>i,ee:()=>a});var n=o(54238);function r(e){window.VWO=window.VWO||[],window.VWO.event=window.VWO.event||function(){window.VWO.push(["event"].concat([].slice.call(arguments)))}
1,window.VWO.event(e)}function a(e){(0,n.logEvent)("Home","Hero Utility Prompt Submitted",e),r("heroPromptSubmitted")}function i(){(0,n.logEvent)("Home","Hero Note Created"),r("heroNoteCreated")}},65129:(e,t,o)=>{"use strict";o.r(t),o.d(t,{saveUserKeyValues:()=>r});var n=o(82964);async function r(e,t,r){if(!e)throw console.warn("saveUserKeyValues: No uid provided"),Error("No authenticated user found");let{db:a}=await Promise.resolve().then(o.bind(o,21028));for(let o in t){let i=t[o],s=`${e}_${o}`,l=(0,n.doc)(a,"userKeyValues",s);try{await (0,n.setDoc)(l,{uid:e,id:s,key:o,value:i,createAtMillis:Date.now()}),r.getCS(o)!==i&&r.setCS(o,i)}catch(e){throw console.error(`saveUserKeyValues error for key ${o}:`,e),e}}return!0}},70909:(e,t,o)=>{"use strict";o.d(t,{A:()=>i});var n,r=o(14232);function a(){return(a=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)({}).hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e}).apply(null,arguments)}let i=e=>r.createElement("svg",a({xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 10 22"},e),n||(n=r.createElement("path",{fill:"none",fillRule:"evenodd",stroke:"currentColor",d:"M6.595 5.446c-1.328 0-2.404-.995-2.404-2.223S5.267 1 6.595 1 9 1.995 9 3.223 7.923 5.446 6.595 5.446ZM0 9.446c5.869-3.309 8.923-1.324 5.742 6.893Q4.5 19.545 9 19.545q-5.109 2.75-7.284.304C-.8 17.023 6.95 8.91 0 9.447Z"})))},75919:(e,t,o)=>{"use strict";o.d(t,{A:()=>i});var n,r=o(14232);function a(){return(a=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)({}).hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e}).apply(null,arguments)}let i=e=>r.createElement("svg",a({xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 21"},e),n||(n=r.createElement("g",{fill:"currentColor",fillRule:"evenodd",stroke:"currentColor",strokeWidth:.785,transform:"translate(-1)"},r.createElement("rect",{width:13.115,height:1,x:.512,y:5.003,rx:.5,transform:"rotate(-35 7.07 5.388)"}),r.createElement("rect",{width:13.115,height:1,x:12.287,y:5.003,rx:.5,transform:"scale(-1 1)rotate(-35 0 65.155)"}),r.createElement("rect",{width:5.141,height:1,x:17.981,y:3.873,rx:.5,transform:"scale(1 -1)rotate(90 24.808 0)"}),r.createElement("rect",{width:4.187,height:1,x:6.081,y:15.05,rx:.5,transform:"scale(1 -1)rotate(90 23.608 0)"}),r.createElement("rect",{width:4.187,height:1,x:15.868,y:15.05,rx:.5,transform:"scale(1 -1)rotate(90 33.395 0)"}),r.createElement("path",{d:"M18.29 4.622a.384.384 0 0 1-.767 0V2.056a.384.384 0 1 1 .768 0z"}),r.createElement("path",{d:"M20.492 1.718a.384.384 0 1 1 0 .768h-2.566a.384.384 0 0 1 0-.768zM13.724 2.319c-.534-.283-1.05-.272-1.585.03a1.1 1.1 0 0 1-.337-.446c-.06-.17-.026-.264.152-.352.657-.325 1.377-.33 1.934-.04.14.074.168.16.11.344a1.4 1.4 0 0 1-.274.464Z"}),r.createElement("rect",{width:8.629,height:1,x:4.592,y:9.426,rx:.5,transform:"rotate(-35 8.907 9.81)"}),r.createElement("rect",{width:8.629,height:1,x:4.854,y:13.568,rx:.5,transform:"rotate(30 9.168 13.952)"}),r.createElement("rect",{width:8.629,height:1,x:12.443,y:13.568,rx:.5,transform:"scale(-1 1)rotate(30 0 -48.586)"}),r.createElement("rect",{width:8.574,height:1,x:12.698,y:9.41,rx:.5,transform:"scale(-1 1)rotate(-35 0 63.664)"}),r.createElement("path",{d:"M13.724 8.014c-.534-.282-1.05-.272-1.585.03a1.1 1.1 0 0 1-.337-.446c-.06-.17-.026-.264.152-.352.657-.325 1.377-.33 1.934-.04.14.074.168.16.11.344a1.4 1.4 0 0 1-.274.464ZM13.482 16.259c.307-.162.374-.646.215-.982-.511.259-1.008.248-1.52-.033-.2.284-.123.82.254 1.007.413.189.695.189 1.051.008Z"}),r.createElement("rect",{width:5.853,height:1,x:7.443,y:18.137,rx:.5,transform:"rotate(30 10.37 18.522)"}),r.createElement("rect",{width:6.116,height:1,x:12.611,y:18.073,rx:.5,transform:"scale(-1 1)rotate(30 0 -40.02)"}),r.createElement("path",{d:"M13.482 20.142c.307-.162.374-.646.215-.982-.511.259-1.008.248-1.52-.033-.2.284-.123.82.254 1.007.413.189.695.189 1.051.008Z"}))))},77360:e=>{e.exports={trigger:"AskToolTweakMenu_trigger__9_8L7",portal:"AskToolTweakMenu_portal__HTqLc",option:"AskToolTweakMenu_option__0GsOp",optionLabel:"AskToolTweakMenu_optionLabel__b7juo",optionIcon:"AskToolTweakMenu_optionIcon__Fg15r",divider:"AskToolTweakMenu_divider__XbNGq",openFull:"AskToolTweakMenu_openFull__EyXde"}},78166:(e,t,o)=>{"use strict";o.r(t),o.d(t,{default:()=>en});
1var n,r=o(4902),a=o(37876),i=o(94250),s=o.n(i),l=o(74162),c=o(14232),p=o(24925),u=o(1987),d=o(37425),h=o(93715),m=o(40791),_=o(19369),g=o(20719),f=o(39860),w=o(3964),v=o(99329),C=o(96035),k=o(66708),I=o(82204),y=o(70587),A=o(6041),b=o(54682),x=o(56491),T=o(60232),B=o(54238),S=o(11150),R=o(65129),D=o(23694),M=o(48230),P=o.n(M),F=o(89099),O=o.n(F),j=o(83592);function W(){return(W=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)({}).hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e}).apply(null,arguments)}let N=e=>c.createElement("svg",W({xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 21 15"},e),n||(n=c.createElement("path",{fill:"#FFF",fillRule:"evenodd",stroke:"currentColor",strokeLinecap:"square",d:"M17.673 0c-1.229 6.318 0 11.644 2.589 13.522-4.55 0-6.698-1.794-8.108-3.29-1.82 1.713-3.357 3.655-12.154 3.655"})));var E=o(11035),L=o(12076),U=o(70909),$=o(12295),V=o(47568),H=o(33144),Y=o(94882),q=o(50698),Q=o(78309),z=o(95323),K=o(77360),G=o.n(K);let J={outputType:"text",iconW:20,iconH:20},X={outputType:"image",iconW:20,iconH:20};function Z(e){let{accentColor:t="#525F7F",showAskToggles:o=!0,webSearchEnabled:n=!1,respondWithImage:r=!1,onToggleWebSearch:i,onToggleRespondWithImage:s,onOpenFullTool:l,openFullLabel:p="Open full Ask tool",busy:u=!1}=e,[d,h]=(0,c.useState)(!1),{refs:m,floatingStyles:_,context:g}=(0,H.we)({open:d,onOpenChange:h,placement:"top-end",middleware:[(0,Y.cY)(8),(0,Y.UU)({padding:8}),(0,Y.BN)({padding:8})],whileElementsMounted:q.ll}),f=(0,H.Mk)(g,{handleClose:(0,H.iB)({buffer:6}),delay:{open:60,close:120}}),w=(0,H.kp)(g),v=(0,H.s9)(g),C=(0,H.It)(g,{role:"menu"}),{getReferenceProps:k,getFloatingProps:I}=(0,H.bv)([f,w,v,C]);return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("button",{type:"button",ref:m.setReference,className:G().trigger,disabled:u,"aria-label":"Tool options","aria-expanded":d,"aria-haspopup":"menu",...k(),children:(0,a.jsx)(Q.A,{width:"24",height:"16",color:t,viewBox:"0 0 24 16"})}),(0,a.jsx)(H.XF,{children:d?(0,a.jsx)(H.s3,{context:g,modal:!1,children:(0,a.jsxs)("div",{ref:m.setFloating,className:G().portal,style:{..._,zIndex:1100},...I(),children:[o?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("label",{className:G().option,children:[(0,a.jsx)("input",{type:"checkbox",checked:!0===n,onChange:e=>i?.(e)}),(0,a.jsx)("span",{className:G().optionLabel,children:"Search web"}),(0,a.jsx)("span",{className:G().optionIcon,"aria-hidden":"true",children:(0,a.jsx)(z.default,{toolID:"ai-researcher",funcMinD:J,color:t})})]}),(0,a.jsxs)("label",{className:G().option,children:[(0,a.jsx)("input",{type:"checkbox",checked:!0===r,onChange:e=>s?.(e)}),(0,a.jsx)("span",{className:G().optionLabel,children:"Respond with image"}),(0,a.jsx)("span",{className:G().optionIcon,"aria-hidden":"true",children:(0,a.jsx)(z.default,{toolID:"ai-image-generator",funcMinD:X,color:t})})]}),(0,a.jsx)("div",{className:G().divider})]}):null,(0,a.jsx)("button",{type:"button",className:G().openFull,disabled:u,onClick:e=>{h(!1),l?.(e)},children:u?"Openingâ¦":p})]})}):null})]})}var ee=o(56566),et=o.n(ee);class eo extends c.Component{static #e=this.contextType=p.gJ;constructor(e){var t;super(e),t=this,this.initDraftTask=async()=>{let{u:e}=this.props;if(await (0,f.Hm)(()=>!1===e.loadingUserData||e?.currentUser?.isAnonymous===!0&&e?.loadingUser===!1,this),this._isUnmounted)return;let t=this.state.selectedFunctionMode;for(let e=0;e<8;e++){if(await this.bootstrapDraftTask(t)||this._isUnmounted)return;await new Promise(t=>setTimeout(t,500*(e+1)))}},this.emptyBlocks=()=>[{id:`block-${this.nextId++}`,type:"text",data:{text:this.props.contextBlock?"":this.props.initialText||""},index:0}],this.getEditorAPI=()=>this.props.u.getCS(this.editorInstanceId),this.getModelParamKey=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:t.state.selectedFunctionMode;return"ai-assistant"===e||"ai-tutor"===e?"agent_model":"model"},this.extractModelOptions=(e,t)=>{let o=this.getModelParamKey(t),n=e?.[o];return n?.options||e?.suggester_model?.options||[]},this.getPersistedModelKVKey=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:t.state.selectedFunctionMode,{u:o}=t.props;if(!o?.currentUser?.uid||o?.currentUser?.isAnonymous===!0)return null;let n=o?.currentUnlockedProfileID&&"-1"!==String(o.currentUnlockedProfileID)?o.currentUnlockedProfileID:o?.currentUser?.uid;return`lastSelectedAgentModel_${n}_${e}`},this.loadPersistedModel=async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:t.state.selectedFunctionMode,{u:o}=t.props,n=t.getPersistedModelKVKey(e);if(!n)return null;try{await (0,S.loadUserKeyValues)([n],o);let e=o?.getCS?.(n);return"string"==typeof e&&e.length>0?e:null}catch(e){return console.warn("[MessageAICompact] loadPersistedModel failed:",e),null}},this.savePersistedModel=function(e){let o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t.state.selectedFunctionMode;if(!e)return;let{u:n}=t.props,r=t.getPersistedModelKVKey(o);if(!r)return;let a=n?.currentUser?.uid;a&&(0,R.saveUserKeyValues)(a,{[r]:e},n).catch(e=>{console.warn("[MessageAICompact] savePersistedModel failed:",e)})},this.ensureModelOnDraft=function(e,o,n,r){let a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null,i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:null;if(!e)return;let s=t.getModelParamKey(n),l=a?.length>
10?a:t.extractModelOptions(o,n),c=o?.[s],p=e.inputs?.[s],u=(0,x.N)({currentValue:p,preferredModelValue:i,modelOptions:l,schemaDefaultValue:c?.defaultValue});if(!u?.value)return;let d=e.inputs?.[`${s}Name`];(p!==u.value||d!==u.text)&&((0,w.updateTaskInputParameter)(e,s,u.value,r),u.text&&(0,w.updateTaskInputParameter)(e,`${s}Name`,u.text,r),u.computeQueueID?.length>0&&(0,v.D)(e,"computeQueueID",u.computeQueueID))},this.bootstrapDraftTask=async function(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,{u:r}=t.props;(0,g.z)({includeReplyPath:!0});let a=await (0,I.getAIFunctionAndParameters)(e,r);if(!a)return!1;let[i,s]=a,l=t.getModelParamKey(e),c=await o.e(93548).then(o.bind(o,93548)),p=await c.resolveModelSelectOptions(s?.[l]),[u,d]=await Promise.all([(0,y.getAIFunction)("question-answerer",r),(0,y.getAIFunction)("ai-assistant",r)]),h=(await Promise.all([o.e(519),o.e(72797)]).then(o.bind(o,27580))).genDraftTask(i,r);h.inputs.addsToMessageContent||(h.inputs.addsToMessageContent=[]),h.inputs.addsToMessageContent.includes("attachments")||h.inputs.addsToMessageContent.push("attachments");let m=n?null:await t.loadPersistedModel(e),_=!n&&!m&&r?.isCurrentPremiumMember&&"ai-tutor"!==e?"gemini-3.8-flash":null;t.ensureModelOnDraft(h,s,e,r,p,n||m||_),r?.setCS("selectedFunctionMode",e);let f=(0,b.o)(h,i);if(f?.length>0&&(0,A.b)(f,r),t._isUnmounted)return!1;let w="question-answerer"===e?{webSearchEnabled:h?.inputs?.search_web===!0,respondWithImage:h?.inputs?.generate_image===!0}:null;return t.setState({draftTask:h,aiFunction:i,modelOptions:p,questionAnswererFunction:u,messageAgentFunction:d,selectedFunctionMode:e,...w||{}},()=>{t._prevDefaultPrivate=r?.currentProfilePreferences?.defaultVisibilityPrivate===!0||r?.profilePreferences?.["-1"]?.defaultVisibilityPrivate===!0,r?.setCS("lastSelectedVisibility",h?.visibility),t.applyArticleContextToDraft(h),t.applyAskToolTogglesToDraft(h),t.props.articleContext&&t.stripArticleAttachmentFromCompact()}),p.length>0||!!h.inputs?.[t.getModelParamKey(e)]},this.handleBlocksChange=e=>{this.setState({blocks:e},()=>{this.state.isSending||this.syncBlocksToDraft(e),this.maybeSwitchToVisionModel(e),this.props.onHasContentChange?.(e?.some(e=>e?.type!=="text"||String(e?.data?.text||"").trim().length>0)===!0)})},this.maybeSwitchToVisionModel=e=>{let{selectedFunctionMode:t,draftTask:o,modelOptions:n}=this.state;if("ai-assistant"!==t||!o||!(e||[]).some(e=>e?.type==="image"||e?.type==="coalesced_uploads"&&(e?.data?.blocks??e?.blocks??[]).some(e=>e?.type==="image")))return;let r=this.getModelParamKey(t),a=o.inputs?.[r],i=(n||[]).find(e=>e?.value===a);if(i?.vision===!0)return;let s=(n||[]).filter(e=>e?.vision===!0);if(0===s.length)return;let l=s.find(e=>"gemini-3.8-flash"===e.value)||s[0],{u:c}=this.props;(0,w.updateTaskInputParameter)(o,r,l.value,c),l.text&&(0,w.updateTaskInputParameter)(o,`${r}Name`,l.text,c),l.computeQueueID?.length>0&&(0,v.D)(o,"computeQueueID",l.computeQueueID),this.setState({draftTask:{...o}})},this.applyArticleContextToDraft=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:t.state.draftTask,{u:o,articleContext:n}=t.props;if(!e||!n?.title||t.state.contextDismissed)return;let r=String(n.title||"").trim(),a=String(n.excerpt||"").trim(),i=String(n.slug||"").trim();if(n.isLessonBlock){let t=[n.trackTitle?`The user is reading a lesson in the "${n.trackTitle}" track and has a question about a specific part of it.`:"The user is reading a lesson and has a question about a specific part of it.",`Lesson title: ${r}`];n.objective&&t.push(`Lesson objective: ${n.objective}`),n.framework&&t.push(`Curriculum framework: ${n.framework}`),n.subject&&t.push(`Subject: ${n.subject}`),n.stage&&t.push(`Grade level: ${n.stage}`),n.trackTitle&&t.push(`Track: ${n.trackTitle}`),Array.isArray(n.standardCodes)&&n.standardCodes.length>0&&t.push(`Standards covered: ${n.standardCodes.join(", ")}`),n.blockTitle&&t.push(`Section heading: ${n.blockTitle}`),n.blockId&&t.push(`Block ID: ${n.blockId}`),n.isDiagramBlock?(t.push("The student is asking about an interactive diagram in the lesson."),n.blockText&&t.push(`Diagram description (what the diagram depicts): 2${n.blockText}`),n.diagramContentText&&t.push(`Visible text, labels, and values in the diagram: 3${n.diagramContentText}`),t.push("When answering, reference the specific visual elements, labels, and values the student can see in the diagram.")):n.blockText&&t.push(`Block content the user is asking about: 4${n.blockText}`),t.push("You are an expert tutor answering a student's question about a specific part of a lesson.","Pedagogical guidelines:","- Give an in-depth, thorough answer â don't just give a surface-level response. Explain the reasoning and connect it to broader concepts.","- Use concrete examples and analogies appropriate for the grade level.","- If the question reveals a misconception, gently correct it and explain why the misconception is common.","- Match the grade level â do not use more advanced terminology than the lesson itself uses without defining it.","- Structure your answer: start with a direct answer, then elaborate with context and examples.","- If the student seems confused (which they likely are, since they're asking), slow down and build understanding step by step.","- When spoken aloud, your answer should be paced for c
4omprehension â use shorter sentences and natural pauses. Avoid rushing through complex explanations."),(0,w.updateTaskInputParameter)(e,"system_message",t.join("\n"),o);return}let s=["The user is asking a follow-up about this published article.",`Title: ${r}`];a&&s.push(`Excerpt: ${a}`),i&&s.push(`Slug: ${i}`),s.push("The article body may be attached as a file block on the prompt when the user opens the full Ask tool or sends a question.","Answer helpfully in that article context. Do not invent that the user said they just read it."),(0,w.updateTaskInputParameter)(e,"system_message",s.join("\n"),o)},this.applyAskToolTogglesToDraft=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:t.state.draftTask,{u:o}=t.props;e&&"question-answerer"===t.state.selectedFunctionMode&&((0,w.updateTaskInputParameter)(e,"search_web",!0===t.state.webSearchEnabled,o),(0,w.updateTaskInputParameter)(e,"generate_image",!0===t.state.respondWithImage,o))},this.stripArticleAttachmentFromCompact=async()=>{let{articleContext:e}=this.props,{draftTask:t,blocks:n}=this.state;if(!e||!t)return;let r=String(e.slug||"").trim(),{isForYouArticleFileBlock:a}=await o.e(26637).then(o.bind(o,26637)),i=e=>(e||[]).filter(e=>!a(e,r)),s=i(n);if(s.length!==(n||[]).length){let e=s.length>0?s:this.emptyBlocks();this._isUnmounted||this.setState({blocks:e,blocksHydrationKey:this.state.blocksHydrationKey+1})}let l=t.inputs?.prompt_blocks;if(Array.isArray(l)&&l.some(e=>a(e,r))){let e=i(l);await this.syncBlocksToDraft(e.length>0?e:this.emptyBlocks())}},this.ensureArticleAttached=async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,{u:n,articleContext:r}=t.props,a=e||t.state.blocks||t.emptyBlocks();if(!r?.title||!t.state.draftTask||t.state.contextDismissed)return a;if(t._articleAttachPromise)return t._articleAttachPromise;let i=String(r.slug||"").trim(),{isForYouArticleFileBlock:s,createForYouArticleAttachmentBlock:l}=await o.e(26637).then(o.bind(o,26637)),c=a.filter(e=>!s(e,i));return t._articleAttachPromise=(async()=>{t.setState({articleAttachBusy:!0});try{let e=await l(r,n);if(t.applyArticleContextToDraft(),t.applyAskToolTogglesToDraft(),!e)return await t.syncBlocksToDraft(c),c;let o=c.some(e=>"text"===e.type&&!String(e.data?.text||"").trim())?[e,...c]:[e,...c,{id:`block-${t.nextId++}`,type:"text",data:{text:""}}];return await t.syncBlocksToDraft(o),o}finally{t._isUnmounted||t.setState({articleAttachBusy:!1}),t._articleAttachPromise=null}})(),t._articleAttachPromise},this.syncBlocksToDraft=async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:t.state.blocks,{draftTask:n}=t.state,{u:r}=t.props;if(!n)return;let{getTextFromBlocks:a}=await o.e(54940).then(o.bind(o,54940)),{sanitizeBlocksForTaskPersist:i}=await o.e(45317).then(o.bind(o,45317)),s=a(e),l=i(e);(0,w.updateTaskInputParameter)(n,"prompt",s,r),(0,w.updateTaskInputParameter)(n,"prompt_blocks",l,r)},this.handleFunctionModeChange=async e=>{let{u:t}=this.props,{selectedFunctionMode:o,blocks:n}=this.state;if(e===o)return;await this.syncBlocksToDraft(n);let r=!1;for(let t=0;t<5&&!await this.bootstrapDraftTask(e)&&!this._isUnmounted;t++)await new Promise(e=>setTimeout(e,300*(t+1)));this._isUnmounted||(await this.syncBlocksToDraft(n),this.setState(e=>({blocks:n,blocksHydrationKey:e.blocksHydrationKey+1})),t?.setCS("selectedFunctionMode",e))},this.handleAddBlock=function(e){let o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-1,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,a=t.getEditorAPI();a?.addBlock?.(e,o,n,r)},this.handleUpdateBlock=(e,t)=>{this.getEditorAPI()?.onUpdateBlock?.(e,t)},this.handleDeleteBlock=function(e){let o=arguments.length>1&&void 0!==arguments[1]&&arguments[1];t.getEditorAPI()?.onDeleteBlock?.(e,o)},this.handleClearBlocks=()=>{this.getEditorAPI()?.clearBlocks?.()},this.handleAttachmentSelected=async e=>{let{handleBlocksEditorAttachment:t}=await o.e(50438).then(o.bind(o,28057)),n=this.getEditorAPI();for(let e=0;e<12&&!n?.handleFilesDrop;e+=1)await new Promise(e=>requestAnimationFrame(e)),n=this.getEditorAPI();await t(e,{editorAPI:n}),this.props.u?.setCS("lastUpdatedTimestamp",Date.now())}
4,this.uploadFilesInBackground=async(e,t)=>{let n=await o.e(78477).then(o.bind(o,78477));await n.uploadFilesInBackground(e,{blocksEditor:t,handleFileUpload:async e=>{let{uploadRawFile:t}=await Promise.all([o.e(44540),o.e(5875)]).then(o.bind(o,44540)),n=[];for(let o of e){let e=o?.file??o,r=await t(e,this.props.u.currentUser,null,this.props.u);r&&n.push(r)}return n},onUploadComplete:()=>this.syncBlocksToDraft(t?.state?.blocks)})},this.getActiveText=async()=>{let{getTextFromBlocks:e}=await o.e(54940).then(o.bind(o,54940));return e(this.state.blocks)?.trim()??""},this.processAITasksQuerySnapshot=(e,t)=>{t.processQuerySnapshotGeneric(e,"localAITasks"),t.setProp("lastUpdatedTimestamp",Date.now())},this.expandMobileTaskList=()=>{let{u:e}=this.props;e.setCS("isMobileOwnTaskListExpanded",!0)},this.syncTaskList=async()=>{let{u:e}=this.props,t=await o.e(209).then(o.bind(o,209));await t.syncAIOwnLatestTasksList(null,e,t=>{this.processAITasksQuerySnapshot(t,e)})},this.onPressSend=async()=>{if(!this.state.isSending){performance.now(),this.setState({isSending:!0});try{let{u:e}=this.props,{draftTask:t,aiFunction:n,selectedFunctionMode:r}=this.state,a=(await this.getActiveText())?.trim()??"";if(!a){this.props.articleContext&&await this.syncBlocksToDraft(this.state.blocks);return}let i=this.getModelParamKey(r),s=t?.inputs?.[i],l="gemini-3.1-flash-live-preview"===s||!s&&"gemini-3.1-flash-live-preview"===this.props.initialModelValue;performance.now();let c=await this.props.onPromptSubmitted?.(a,{...l?{skipReset:!0}:{},contextBlockId:this.props.contextBlockId||null,contextAssetVersionID:this.props.articleContext?.contextAssetVersionID||null}),p=this.state.blocks;if(this.setState({blocks:this.emptyBlocks(),blocksHydrationKey:this.state.blocksHydrationKey+1,focusNextMount:!0}),c&&t?.inputs&&(t.inputs.sessionId=c),this.props.tutorLanguage&&t?.inputs&&(t.inputs.language=this.props.tutorLanguage),l&&this.props.onLiveVoiceQuestion&&(performance.now(),await this.props.onLiveVoiceQuestion(a))){try{let{incrementBadgeStats:t}=await o.e(81539).then(o.bind(o,82787));await t(e,{messageCount:1}),window.dispatchEvent(new CustomEvent("tutor-badge-check",{detail:{deferToast:!0}}))}catch{}this.props.contextBlockId&&this.props.onTaskCreated?.({contextBlockId:this.props.contextBlockId||null,contextAssetVersionID:this.props.articleContext?.contextAssetVersionID||null,inputs:{prompt_blocks:[{id:"block-1",type:"text",index:0,data:{text:a}}]}}),this.setState({isSending:!1});return}if(!t){let e=this.context?.t||(e=>e);this.props.onTaskCreateFailed?.(Error(e("aiTutorStillLoading")));return}t.inputs?.[i]==="gemini-3.1-flash-live-preview"&&(t.inputs[i]="gemini-3.8-flash",t.inputs[i+"Name"]="Gemini 3.8 Flash");let u=await this.ensureArticleAttached(p);await this.syncBlocksToDraft(u),this.applyArticleContextToDraft(t),this.applyAskToolTogglesToDraft(t);let d=n;if(d||(d=await (0,y.getAIFunction)(t.aiFunctionToRunID,e)),!d){(await Promise.resolve().then(o.bind(o,97685)).then(e=>e.default)).error("Could not load AI tool configuration. Please try again.",{duration:2500}),this.props.articleContext&&await this.syncBlocksToDraft(this.state.blocks);return}let h=(await o.e(24976).then(o.bind(o,24976)).then(e=>e.inputParametersForFunction))(d,e),{validateInputs:m}=await Promise.all([o.e(63656),o.e(30045),o.e(52180)]).then(o.bind(o,30045));if(!await m(t,h?Object.values(h):[],e)){this.props.articleContext&&await this.syncBlocksToDraft(this.state.blocks);return}let _=await Promise.all([o.e(63656),o.e(30045),o.e(14500),o.e(81961)]).then(o.bind(o,14500)).then(e=>e.attemptToEnqueueTask);this.syncTaskList(),performance.now();let g=await _(t,e,h,d,null,{suppressSuccessToast:this.props.suppressSuccessToast,onSetDocSuccess:t=>{if(e.setProp("currentAIFunction",d),e.setCS("hasComposedOnPage",!0),this.props.contextBlockId&&t?.objectID){let e=this.props.articleContext?.contextAssetVersionID||null;(async()=>{try{let{doc:n,setDoc:r,serverTimestamp:a}=await Promise.resolve().then(o.bind(o,82964)),{db:i}=await Promise.resolve().then(o.bind(o,21028));await r(n(i,"aiTaskQueue",t.objectID),{contextBlockId:this.props.contextBlockId,...e&&{contextAssetVersionID:e},updatedAt:a()},{merge:!0})}catch(e){console.warn("[MAC] failed to set contextBlockId on task:",e)}})()}this.props.onTaskCreated?.({...t,contextBlockId:this.props.contextBlockId||null,contextAssetVersionID:this.props.articleContext?.contextAssetVersionID||null})}});if(!1===g||g?.success===!1){let t=e?.getCS?.("lastTaskEnqueueFailReason")||"The AI task could not be started.";this.props.onTaskCreateFailed?.(Error(t)),this.props.articleContext&&await this.syncBlocksToDraft(this.state.blocks);return}(0,B.logFunnelEvent)("task_enqueue_succeeded",{ai_function_id:t.aiFunctionToRunID,function_mode:r});try{let{incrementBadgeStats:t}=await o.e(81539).then(o.bind(o,82787));await t(e,{messageCount:1}),window.dispatchEvent(new CustomEvent("tutor-badge-check",{detail:{deferToast:!0}}))}catch{}if(e.setProp("currentAIFunction",d),e.setCS("hasComposedOnPage",!0),"question-answerer"===r&&e.setCS("hasComposedOnAsk",!0),(0,T.ee)(r),await this.syncTaskList(),this.props.redirectAfterSend){let e="ai-assistant"===r?"ai-assistant":t.aiFunctionToRunID||"question-answerer";await O().push(`/tools/${e}`);return}this.expandMobileTaskList(),this.setState({blocks:this.emptyBlocks(),blocksHydrationKey:this.state.blocksHydrationKey+1}),await this.bootstrapDraftTask(r,s||null)}catch(e){console.error("[MessageAICompact] send failed:",e),this.props.onTaskCreateFailed?.(e)}finally{this._isUnmounted||this.setState({isSending:!1})}}},this.onMouseEnterCostInfo=async()=>{let e=await Promise.all([o.e(27979),o.e(88094)]).then(o.bind(o,27979)).then(e=>e.costInfoString);this.setState({costString:e(this.state.draftTask)}),this.props.u.setCS("currentlyHoveringButtonID",`costInfo${this.state.draftTask?.objectID}`)},this.onMouseLeaveCostInfo=()=>{this.props.u.setCS("currentlyHoveringButtonID",null)},this.onPressCostInfo=async()=>{let e=`costInfo${this.state.draftTask?.objectID}`;this.props.u?.getCS("currentlyHoveringButtonID")===e?this.props.u.setCS("currentlyHoveringButtonID",null):this.props.u.setCS("currentlyHoveringButtonID",e)},this.getLocalizedCostTooltip=e=>{let{u:t}=this.props,o=(0,_.K)(e,t?.getCS("userCountry"),t?.getCS("pricingVariant",D.PV)||D.PV,t?.getCS("membershipSignupFormPlanTypeSelected")||"individual",{showTooltip:!0,showUsdInTooltip:!0},t?.getCS("preferredCurrency")||null),n=o.tooltip||o.formatted,r=n.startsWith("~")?n.substring(1).trim():n.trim();return`Est cost: ${r}`},this.onPressAdvancedTool=async e=>{e?.preventDefault?.(),e?.stopPropagation?.();let{u:t}=this.props,{selectedFunctionMode:o}=this.state;try{let e=await this.ensureArticleAttached();await this.syncBlocksToDraft(e||this.state.blocks),this.applyArticleContextToDraft(),this.applyAskToolTogglesToDraft(),"question-answerer"===o&&t?.setCS("csvContextLoadedFor_question-answerer",Date.now())}catch(e){}O().push("question-answerer"===o?"/tools/question-answerer?advanced=true":"ai-tutor"===o?"/tutor":"/tools/ai-assistant?advanced=true")},this.onToggleWebSearch=e=>{let t=!0===e.target.checked;this.setState({webSearchEnabled:t},()=>{this.applyAskToolTogglesToDraft(),this.props.u?.setProp("lastUpdatedTimestamp",Date.now())})},this.onToggleRespondWithImage=e=>{let t=!0===e.target.checked;this.setState({respondWithImage:t},()=>{this.applyAskToolTogglesToDraft(),this.props.u?.setProp("lastUpdatedTimestamp",Date.now())})},this.onPressVisibilityToggle=async()=>{let{u:e}=this.props,{draftTask:t}=this.state;if(!t)return;let n="public"===t.visibility?"private":"public";if("private"===n&&!e.isCurrentPremiumMember){if(e?.currentUser?.isAnonymous){(0,B.logEvent)("Edit Task","Guest attempted change visibility"),await O().push("/start"),(await Promise.resolve().then(o.bind(o,97685)).then(e=>e.default)).success(D.HAS_FREE_TRIAL?"Start your free trial for private tool use":"Become a member for private tool use",{duration:5e3});return}(await Promise.resolve().then(o.bind(o,97685)).then(e=>e.default)).error("Please become a premium member to change visibility",{duration:5e3}),e.setCS("showAIBillingModal",!0);return}(0,v.D)(t,"visibility",n,e),(0,w.updateTaskInputParameter)(t,"private","private"===n,e),e?.setCS("lastSelectedVisibility",n)};let n=e?.u?.getCS("selectedFunctionMode"),r=e.defaultFunctionMode||(["question-answerer","ai-assistant","ai-tutor"].includes(n)?n:"question-answerer");this.nextId=1,this.editorInstanceId=`messageAI_${Date.now()}_${Math.random()}`,this._prevDefaultFunctionMode=r,this.state={blocks:this.emptyBlocks(),blocksHydrationKey:0,selectedFunctionMode:r,questionAnswererFunction:null,messageAgentFunction:null,aiFunction:null,draftTask:null,modelOptions:[],isSending:!1,costString:"",articleAttachBusy:!1,webSearchEnabled:!1,respondWithImage:!1,focusNextMount:!1,contextDismissed:!1},this._articleAttachPromise=null}componentDidMount(){this.initDraftTask(),this._prefillHandler=e=>{let t=e?.detail?.text;t&&(this.handleBlocksChange([{type:"text",data:{text:t}}]),setTimeout(()=>{let e=document.querySelector(`[data-editor-instance-id="${this.editorInstanceId}"] [contenteditable="true"]`)||document.querySelector(`[data-editor-instance-id="${this.editorInstanceId}"] textarea`);e&&e.focus()},100))},window.addEventListener("tutor-prefill-prompt",this._prefillHandler)}componentDidUpdate(){this.state.focusNextMount&&this.setState({focusNextMount:!1});let{u:e,defaultFunctionMode:t}=this.props;t&&t!==this._prevDefaultFunctionMode&&t!==this.state.selectedFunctionMode&&(this._prevDefaultFunctionMode=t,this.handleFunctionModeChange(t));let o=e?.currentProfilePreferences?.defaultVisibilityPrivate===!0||e?.profilePreferences?.["-1"]?.defaultVisibilityPrivate===!0;if(this._prevDefaultPrivate===o||!this.state.draftTask)return;this._prevDefaultPrivate=o;let n=e?.currentUser?.isAnonymous?"public":o?"private":"public",{draftTask:r}=this.state;r.visibility!==n&&((0,v.D)(r,"visibility",n,e),(0,w.updateTaskInputParameter)(r,"private","private"===n,e),e?.setCS("lastSelectedVisibility",n),this.setState({draftTask:r}))}componentWillUnmount(){this._isUnmounted=!0,this._prefillHandler&&window.removeEventListener("tutor-prefill-prompt",this._prefillHandler),this.editorInstanceId&&this.props.u&&this.props.u.setCS(this.editorInstanceId,null)}render(){let{u:e}=this.props,{blocks:t,blocksHydrationKey:o,selectedFunctionMode:n,questionAnswererFunction:r,messageAgentFunction:i,draftTask:l,modelOptions:c,isSending:p}=this.state,_=this.context?.t||(e=>e),g=void 0!==this.props.placeholder?this.props.placeholder:_("ai-assistant"===n?"makeADiagramAbout":"ai-tutor"===n?"teachMe":"askAQuestion"),f=(0,k.y)(l,e),I=(0,C.estimatedCostDollarsForTask)(l)??0,y=l?.visibility??"public",b="private"===y?"#525F7F":D.PRIMARY_COLOR,x=this.getModelParamKey(n),T=c?.length>
40?c:l?.inputs?.[x]?[{value:l.inputs[x],text:l.inputs[`${x}Name`]||l.inputs[x]}]:[],B=t?.length>1||t?.[0]?.data?.text?.length>0||t?.[0]&&"text"!==t[0].type,S=D.DAILY_FREE_AI_TOOL_USES-(e.aiToolUsesCountOnDeviceToday??0),R=l?.inputs?.[x],M="question-answerer"===n&&l?.inputs?.generate_image&&R?`${R}_imageGen`:R||this.props.initialModelValue||T?.[0]?.value,F=!1===e.loadingUserData,O=F&&f&&S>0,W=e.currentUser?.isAnonymous===!0,H=!this.props.articleContext&&!0!==e.isCurrentPremiumMember&&!D.IS_SPYCEAI&&(O||!F);return(0,a.jsxs)("div",{style:this.props.wrapperStyle||void 0,"data-spyce-tour":this.props.homeTour?"message-composer":void 0,className:s().dynamic([["754a693ef0262c65",[et().sendSpinner,D.PRIMARY_COLOR]]])+" "+`${et().messageAICompactOuter}${this.props.className?` ${this.props.className}`:""}${!H?` ${et().noFreeUsesSlot}`:""}`,children:[(0,a.jsxs)("div",{style:{marginLeft:0,marginRight:0,marginTop:0,borderColor:b},className:s().dynamic([["754a693ef0262c65",[et().sendSpinner,D.PRIMARY_COLOR]]])+" "+(("public"===y?et().replyWrapper:et().replyWrapperPrivate)||""),children:[(0,a.jsxs)("div",{className:s().dynamic([["754a693ef0262c65",[et().sendSpinner,D.PRIMARY_COLOR]]])+" "+(et().replyRow||""),children:[(0,a.jsx)("div",{className:s().dynamic([["754a693ef0262c65",[et().sendSpinner,D.PRIMARY_COLOR]]])+" "+(et().col||""),children:(0,a.jsx)(u.default,{editorInstanceId:this.editorInstanceId,initialBlocks:t,nextId:this.nextId,placeholder:g,draftTask:l,onBlocksChange:this.handleBlocksChange,onFileUpload:this.uploadFilesInBackground,onFocus:this.props.onPromptFocus,onBlur:this.props.onPromptBlur,onSubmit:this.onPressSend,u:e,noBorder:!0,focusOnMount:this.props.autoFocus||this.state.focusNextMount,contextBlock:this.props.contextBlock&&!this.state.contextDismissed?this.props.contextBlock:null,onContextBlockDismiss:()=>this.setState({contextDismissed:!0}),acceptedFileTypes:"image/png, image/jpeg, image/gif, image/webp, image/heic, image/heif, application/pdf, application/msword, application/vnd.openxmlformats-officedocument.wordprocessingml.document, text/plain, text/markdown, text/*, .docx, .doc, .txt, .md, application/vnd.ms-excel, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, text/csv, .xls, .xlsx, .csv"},`message-cbc-${this.editorInstanceId}-${o}`)}),(0,a.jsx)("div",{className:s().dynamic([["754a693ef0262c65",[et().sendSpinner,D.PRIMARY_COLOR]]])+" "+(et().replyDivider||"")}),(0,a.jsx)("button",{type:"button",onClick:this.onPressSend,disabled:p||!l,"aria-busy":p,"aria-label":p?"Sending":"Send message",className:s().dynamic([["754a693ef0262c65",[et().sendSpinner,D.PRIMARY_COLOR]]])+" "+`${et().actionButton}${p?` ${et().actionButtonSending}`:""}`,children:(0,a.jsx)("div",{className:s().dynamic([["754a693ef0262c65",[et().sendSpinner,D.PRIMARY_COLOR]]])+" "+(et().sendIconWrapper||""),children:p?(0,a.jsx)("span",{style:{borderTopColor:b},"aria-hidden":"true",className:s().dynamic([["754a693ef0262c65",[et().sendSpinner,D.PRIMARY_COLOR]]])+" "+(et().sendSpinner||"")}):(0,a.jsx)(j.A,{width:"19",height:"16",color:b,viewBox:"0 0 19 16"})})})]}),(0,a.jsxs)("div",{className:s().dynamic([["754a693ef0262c65",[et().sendSpinner,D.PRIMARY_COLOR]]])+" "+`${et().footerControlsRow} ${this.props.hideModeDropdown?et().footerControlsRowNoMode:""}`,children:[(0,a.jsxs)("div",{className:s().dynamic([["754a693ef0262c65",[et().sendSpinner,D.PRIMARY_COLOR]]])+" "+(et().dropdownsRow||""),children:[!this.props.hideModeDropdown&&!this.props.hideDropdowns&&(0,a.jsx)("div",{"data-spyce-tour":this.props.homeTour?"message-mode":void 0,className:s().dynamic([["754a693ef0262c65",[et().sendSpinner,D.PRIMARY_COLOR]]]),children:(0,a.jsx)(h.A,{value:n,onChange:e=>{this.props.onPromptFocus?.(),this.handleFunctionModeChange(e.target.value)},questionAnswererFunction:r,messageAgentFunction:i,visibility:y})}),!this.props.hideDropdowns&&(0,a.jsxs)(a.Fragment,{children:[!this.props.hideModeDropdown&&(0,a.jsx)("div",{className:s().dynamic([["754a693ef0262c65",[et().sendSpinner,D.PRIMARY_COLOR]]])+" "+(et().dropdownDivider||"")}),(0,a.jsx)(m.A,{value:M,options:T,u:e,scope:n,fallbackLabel:l?.inputs?.[`${x}Name`],onChange:t=>{this.props.onPromptFocus?.();let o=t.target.value,r="question-answerer"===n&&o.endsWith("_imageGen"),a=r?o.replace("_imageGen",""):o;(0,w.updateTaskInputParameter)(l,x,a,e),"question-answerer"===n&&((0,w.updateTaskInputParameter)(l,"generate_image",r,e),this.setState({respondWithImage:r}));let i=c?.find(e=>e.value===a);(0,w.updateTaskInputParameter)(l,`${x}Name`,i?.text||"",e),i?.computeQueueID?.length>0&&((0,v.D)(l,"computeQueueID",i.computeQueueID),(0,A.b)(i.computeQueueID,e)),this.savePersistedModel(a,n)},visibility:y})]}),["ai-assistant","ai-tutor","question-answerer"].includes(n)&&(0,a.jsxs)(a.Fragment,{children:[!this.props.hideDropdowns&&(0,a.jsx)("div",{className:s().dynamic([["754a693ef0262c65",[et().sendSpinner,D.PRIMARY_COLOR]]])+" "+(et().dropdownDivider||"")}),l?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("button",{type:"button",onClick:this.onPressVisibilityToggle,"data-tooltip-content":_("public"===y?"publicMakePrivate":"privateMakePublic"),"data-tooltip-id":"placeBottom","aria-label":_("public"===y?"publicMakePrivate":"privateMakePublic"),className:s().dynamic([["754a693ef0262c65",[et().sendSpinner,D.PRIMARY_COLOR]]])+" "+(et().advancedToolLink||""),children:"public"===y?(0,a.jsx)(E.A,{width:16,height:16,color:D.PRIMARY_COLOR,viewBox:"0 0 22 19"}):(0,a.jsx)(L.A,{width:16,height:16,color:"#525F7F",viewBox:"0 0 22 19"})}),!this.props.hideDropdowns&&(0,a.jsx)("div",{className:s().dynamic([["754a693ef0262c65",[et().sendSpinner,D.PRIMARY_COLOR]]])+" "+(et().dropdownDivider||"")})]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{"aria-hidden":"true",className:s().dynamic([["754a693ef0262c65",[et().sendSpinner,D.PRIMARY_COLOR]]])+" "+(et().advancedToolLink||""),children:(0,a.jsx)(E.A,{width:16,height:16,color:D.PRIMARY_COLOR,viewBox:"0 0 22 19"})}),!this.props.hideDropdowns&&(0,a.jsx)("div",{className:s().dynamic([["754a693ef0262c65",[et().sendSpinner,D.PRIMARY_COLOR]]])+" "+(et().dropdownDivider||"")})]}),"ai-tutor"!==n&&(0,a.jsx)(Z,{accentColor:b,showAskToggles:"question-answerer"===n,webSearchEnabled:this.state.webSearchEnabled,respondWithImage:this.state.respondWithImage,onToggleWebSearch:this.onToggleWebSearch,onToggleRespondWithImage:this.onToggleRespondWithImage,onOpenFullTool:this.onPressAdvancedTool,openFullLabel:"question-answerer"===n?"Open full Ask tool":"Open full AI Assistant",busy:this.state.articleAttachBusy})]})]}),(0,a.jsx)("div",{className:s().dynamic([["754a693ef0262c65",[et().sendSpinner,D.PRIMARY_COLOR]]])+" "+(et().footerControlsSpacer||"")}),(0,a.jsxs)("div",{className:s().dynamic([["754a693ef0262c65",[et().sendSpinner,D.PRIMARY_COLOR]]])+" "+(et().footerControlsWrapper||""),children:[(0,a.jsx)(d.default,{blocks:t,draftTask:l,showWordCount:!1,maxLengthChars:0,onAddBlock:this.handleAddBlock,onUpdateBlock:this.handleUpdateBlock,onDeleteBlock:this.handleDeleteBlock,onAttachmentSelected:this.handleAttachmentSelected,onClearBlocks:this.handleClearBlocks,isValueSet:B,u:e}),(0,a.jsx)("div",{className:s().dynamic([["754a693ef0262c65",[et().sendSpinner,D.PRIMARY_COLOR]]])+" "+(et().costInfoIconWrapper||""),children:(0,a.jsxs)("div",{onClick:this.onPressCostInfo,onMouseEnter:this.onMouseEnterCostInfo,onMouseLeave:this.onMouseLeaveCostInfo,className:s().dynamic([["754a693ef0262c65",[et().sendSpinner,D.PRIMARY_COLOR]]])+" "+(et().costInfoIcon||""),children:[e?.getCS("currentlyHoveringButtonID")===`costInfo${l?.objectID}`?(0,a.jsx)($.A,{width:10,height:22,color:b,viewBox:"0 0 10 22"}):(0,a.jsx)(U.A,{width:10,height:22,color:"#A6AAB2",viewBox:"0 0 10 22"}),e?.getCS("currentlyHoveringButtonID")===`costInfo${l?.objectID}`&&(0,a.jsxs)("div",{className:s().dynamic([["754a693ef0262c65",[et().sendSpinner,D.PRIMARY_COLOR]]])+" "+(et().infoPopover||""),children:[(0,a.jsx)("div",{className:s().dynamic([["754a693ef0262c65",[et().sendSpinner,D.PRIMARY_COLOR]]])+" "+(et().infoPopoverRow||""),children:(0,a.jsx)("strong",{className:s().dynamic([["754a693ef0262c65",[et().sendSpinner,D.PRIMARY_COLOR]]]),children:f?"Est cost: Free":this.getLocalizedCostTooltip(I)})}),(0,a.jsx)("div",{className:s().dynamic([["754a693ef0262c65",[et().sendSpinner,D.PRIMARY_COLOR]]])+" "+(et().infoPopoverDivider||"")}),(0,a.jsxs)("div",{className:s().dynamic([["754a693ef0262c65",[et().sendSpinner,D.PRIMARY_COLOR]]])+" "+(et().infoPopoverRow||""),children:[(0,a.jsx)("kbd",{className:s().dynamic([["754a693ef0262c65",[et().sendSpinner,D.PRIMARY_COLOR]]]),children:"Enter"})," to send"]}),(0,a.jsxs)("div",{className:s().dynamic([["754a693ef0262c65",[et().sendSpinner,D.PRIMARY_COLOR]]])+" "+(et().infoPopoverRow||""),children:[(0,a.jsx)("kbd",{className:s().dynamic([["754a693ef0262c65",[et().sendSpinner,D.PRIMARY_COLOR]]]),children:"Shift"}),"+",(0,a.jsx)("kbd",{className:s().dynamic([["754a693ef0262c65",[et().sendSpinner,D.PRIMARY_COLOR]]]),children:"Enter"})," for new line"]})]})]})}),this.props.onDismiss&&(0,a.jsx)("button",{type:"button",onClick:this.props.onDismiss,"aria-label":_("close"),className:s().dynamic([["754a693ef0262c65",[et().sendSpinner,D.PRIMARY_COLOR]]])+" "+(et().minimizeComposerButton||""),children:(0,a.jsx)("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"#A6AAB2",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",className:s().dynamic([["754a693ef0262c65",[et().sendSpinner,D.PRIMARY_COLOR]]]),children:(0,a.jsx)("path",{d:"M18 6L6 18M6 6l12 12",className:s().dynamic([["754a693ef0262c65",[et().sendSpinner,D.PRIMARY_COLOR]]])})})}),this.props.onMinimize&&(0,a.jsx)("button",{type:"button",onClick:this.props.onMinimize,"aria-label":_("minimizeTutorComposer"),className:s().dynamic([["754a693ef0262c65",[et().sendSpinner,D.PRIMARY_COLOR]]])+" "+(et().minimizeComposerButton||""),children:(0,a.jsx)(V.A,{width:21,height:21,color:"#A6AAB2","aria-hidden":"true"})})]})]}),(0,a.jsx)("div",{className:s().dynamic([["754a693ef0262c65",[et().sendSpinner,D.PRIMARY_COLOR]]])+" "+(et().rightMessageCurly||""),children:(0,a.jsx)(N,{width:21,height:15,color:b,viewBox:"0 0 21 15"})})]}),H?(0,a.jsx)("div",{className:s().dynamic([["754a693ef0262c65",[et().sendSpinner,D.PRIMARY_COLOR]]])+" "+(et().heroFreeUsesSlot||""),children:O?(0,a.jsxs)(P(),{href:"/start",className:et().heroFreeUsesLabel,children:[W?"Try it free. ":"",S," free AI tool uses left today."]}):(0,a.jsx)("span",{"aria-hidden":"true",className:s().dynamic([["754a693ef0262c65",[et().sendSpinner,D.PRIMARY_COLOR]]])+" "+(et().heroFreeUsesReserve||"")})}):null,(0,a.jsx)(s(),{id:"754a693ef0262c65",dynamic:[et().sendSpinner,D.PRIMARY_COLOR],children:`.${et().sendSpinner}.__jsx-style-dynamic-selector{border-top-color:${D.PRIMARY_COLOR}}`})]})}}let en=eo=(0,r.Cg)([(0,l.WQ)("u"),l.PA],eo)},78309:(e,t,o)=>{"use strict";o.d(t,{A:()=>i});var n,r=o(14232);function a(){return(a=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)({}).hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e}).apply(null,arguments)}let i=e=>r.createElement("svg",a({xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 18 12"},e),n||(n=r.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"M0 2v2h10V2zm4 4v2H0v2h4v2h2V6zm14 4V8H8v2zm-6-4h2V4h4V2h-4V0h-2z"})))},83592:(e,t,o)=>{"use strict";o.d(t,{A:()=>i});var n,r=o(14232);function a(){return(a=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)({}).hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e}).apply(null,arguments)}let i=e=>r.createElement("svg",a({xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 19 16"},e),n||(n=r.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"M.009 16 19 8 .009 0 0 6.222 13.571 8 0 9.778z"})))},85207:(e,t,o)=>{"use strict";o.d(t,{A:()=>i});var n,r=o(14232);function a(){return(a=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)({}).hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e}).apply(null,arguments)}let i=e=>r.createElement("svg",a({xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 20 19"},e),n||(n=r.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"m20 7.24-7.19-.62L10 0 7.19 6.63 0 7.24l5.46 4.73L3.82 19 10 15.27 16.18 19l-1.63-7.03zM10 13.4l-3.76 2.27 1-4.28-3.32-2.88 4.38-.38L10 4.1l1.71 4.04 4.38.38-3.32 2.88 1 4.28z"})))},89116:(e,t,o)=>{"use strict";o.d(t,{Nh:()=>a});let n=/^block-(\d+)$/;function r(e){let t=n.exec(e||"");return t?parseInt(t[1],10):0}function a(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return Math.max(t,function(e){if(!Array.isArray(e)||0===e.length)return 0;let t=0;for(let o of e)if(t=Math.max(t,r(o?.id)),o?.type==="coalesced_uploads"&&o.data?.blocks)for(let e of o.data.blocks)t=Math.max(t,r(e?.id));return t}(e)+1)}},91263:e=>{e.exports={bottomLeftImgWrapper:"AIFunctionCreateBlock_bottomLeftImgWrapper__KHyR1",bottomLeftImgWrapperComposeAnother:"AIFunctionCreateBlock_bottomLeftImgWrapperComposeAnother__zAwrj",freeString:"AIFunctionCreateBlock_freeString__9fYwI",estCostString:"AIFunctionCreateBlock_estCostString__d7ALE",costCreditsDenominator:"AIFunctionCreateBlock_costCreditsDenominator__WKPVw",creditsCostWrapper:"AIFunctionCreateBlock_creditsCostWrapper__SuEI4",costCreditsIconWrapper:"AIFunctionCreateBlock_costCreditsIconWrapper__PYc4U",checkmarkImageWrapper:"AIFunctionCreateBlock_checkmarkImageWrapper__U4EUF",horizontalTaskBar:"AIFunctionCreateBlock_horizontalTaskBar__ze787",functionIconWrapper:"AIFunctionCreateBlock_functionIconWrapper__DwEXr",underlayLineBlocker:"AIFunctionCreateBlock_underlayLineBlocker___6h5n",promoImgWrapper:"AIFunctionCreateBlock_promoImgWrapper__GrqJ3",streakTrackerWrapper:"AIFunctionCreateBlock_streakTrackerWrapper__2ZcM0",streakTrackerWrapperComposeAnother:"AIFunctionCreateBlock_streakTrackerWrapperComposeAnother___PH11",createButtonWrapper:"AIFunctionCreateBlock_createButtonWrapper__NaiXS",createButtonWrapperComposeAnother:"AIFunctionCreateBlock_createButtonWrapperComposeAnother__Rejj4",createButtonInnerWrapper:"AIFunctionCreateBlock_createButtonInnerWrapper__onAWX",createAITaskButton:"AIFunctionCreateBlock_createAITaskButton__vw3hx",orangeDot:"AIFunctionCreateBlock_orangeDot__r_fyu",pulse:"AIFunctionCreateBlock_pulse__OZ8Z_",scheduleButton:"AIFunctionCreateBlock_scheduleButton__F8SxE",rightButtonIconWrapper:"AIFunctionCreateBlock_rightButtonIconWrapper__WeDIJ",loaderWrapper:"AIFunctionCreateBlock_loaderWrapper__mQGyQ",createTitle:"AIFunctionCreateBlock_createTitle__D9wpv",createTitleComposeAnother:"AIFunctionCreateBlock_createTitleComposeAnother___mUNB",createDescription:"AIFunctionCreateBlock_createDescription__2wqoO",createDescriptionComposeAnother:"AIFunctionCreateBlock_createDescriptionComposeAnother__7gEvU",createSubtitle:"AIFunctionCreateBlock_createSubtitle__IMJaJ",createSubtitleComposeA:"AIFunctionCreateBlock_createSubtitleComposeA__QOi_c",estimatedCostColumn:"AIFunctionCreateBlock_estimatedCostColumn__7z10k",estimatedCostColumnComposeA:"AIFunctionCreateBlock_estimatedCostColumnComposeA__0Ood0",fulfilledCostString:"AIFunctionCreateBlock_fulfilledCostString__hlPFz",startFreeTrialRow:"AIFunctionCreateBlock_startFreeTrialRow__90hs6",costString:"AIFunctionCreateBlock_costString__gJU_W",aIFunctionCreateBlockWrapper:"AIFunctionCreateBlock_aIFunctionCreateBlockWrapper__W2LhE",clipPanelEmbed:"AIFunctionCreateBlock_clipPanelEmbed__cxhCx",createWrapperComposeAnother:"AIFunctionCreateBlock_createWrapperComposeAnother__hiuMo",createWrapperComposeAnotherNarrow:"AIFunctionCreateBlock_createWrapperComposeAnotherNarrow__H0bzV",gridSelectScrollWrapper:"AIFunctionCreateBlock_gridSelectScrollWrapper__JT_Ni",createWrapper:"AIFunctionCreateBlock_createWrapper__KT_Ri",createWrapperChecklistItem:"AIFunctionCreateBlock_createWrapperChecklistItem__kP3Iq",createWrapperCardEmbed:"AIFunctionCreateBlock_createWrapperCardEmbed__rfJ2c",createWrapperInSidebar:"AIFunctionCreateBlock_createWrapperInSidebar__BCRDh",videoEditorRailEmbed:"AIFunctionCreateBlock_videoEditorRailEmbed__Rzc3C",inputUIOuterComposeAnother:"AIFunctionCreateBlock_inputUIOuterComposeAnother__0mJc4",inputTextArea:"AIFunctionCreateBlock_inputTextAr
4ea__TarRi",inputTextAreaComposeAnother:"AIFunctionCreateBlock_inputTextAreaComposeAnother__g1VaY",inputTextAreaFirst:"AIFunctionCreateBlock_inputTextAreaFirst__UQTyS",aiNumberInput:"AIFunctionCreateBlock_aiNumberInput__ctr_S",aiNumberInputRightOfSlider:"AIFunctionCreateBlock_aiNumberInputRightOfSlider__tMgRs",wordCount:"AIFunctionCreateBlock_wordCount__oX9fE",expandToggle:"AIFunctionCreateBlock_expandToggle__MH8z0",expandImgWrapper:"AIFunctionCreateBlock_expandImgWrapper__5m0II",inputTextAreaDragActive:"AIFunctionCreateBlock_inputTextAreaDragActive__h6aQY",dropzoneOverlay:"AIFunctionCreateBlock_dropzoneOverlay__V_gpz",inputUIOuter:"AIFunctionCreateBlock_inputUIOuter__6wCnC",inputUIOuterCardEmbed:"AIFunctionCreateBlock_inputUIOuterCardEmbed__EnPn_",parameterName:"AIFunctionCreateBlock_parameterName__3MXJg",parameterH4:"AIFunctionCreateBlock_parameterH4__6cJqe",parameterWrapper:"AIFunctionCreateBlock_parameterWrapper__tUI1F",seeMoreButtonWrapper:"AIFunctionCreateBlock_seeMoreButtonWrapper__x69m7",parameterInfoIconWrapper:"AIFunctionCreateBlock_parameterInfoIconWrapper__JgYJe",privateIconWrapper:"AIFunctionCreateBlock_privateIconWrapper__4UiM_",unrequiredParameterSet:"AIFunctionCreateBlock_unrequiredParameterSet__5_JVP",unrequiredParameterUnset:"AIFunctionCreateBlock_unrequiredParameterUnset__sFDtF",requiredStepNumber:"AIFunctionCreateBlock_requiredStepNumber__qvgMU",requiredStepNumberValueSet:"AIFunctionCreateBlock_requiredStepNumberValueSet__PJjxv",divider18:"AIFunctionCreateBlock_divider18__EyLJI",decrementButton:"AIFunctionCreateBlock_decrementButton__d5r68",sliderRow:"AIFunctionCreateBlock_sliderRow__6oUAt",newButtonWrapper:"AIFunctionCreateBlock_newButtonWrapper__E_KMd",aiSelectButtonAppend:"AIFunctionCreateBlock_aiSelectButtonAppend__Nrxo7",parameterDescription:"AIFunctionCreateBlock_parameterDescription__mSrDB",selectedCheckmark:"AIFunctionCreateBlock_selectedCheckmark__Djw2i",checkboxInputWrapper:"AIFunctionCreateBlock_checkboxInputWrapper__Ys_5M",inputCheckbox:"AIFunctionCreateBlock_inputCheckbox__V5HYf",howManyMoreCreditsNeededLabel:"AIFunctionCreateBlock_howManyMoreCreditsNeededLabel__XgfEx",buyCreditsButton:"AIFunctionCreateBlock_buyCreditsButton__pOP5M",createMoreIconWrapper:"AIFunctionCreateBlock_createMoreIconWrapper__YCU79",rightArrowWrapper:"AIFunctionCreateBlock_rightArrowWrapper__WQmi2",guaranteeText:"AIFunctionCreateBlock_guaranteeText__taPVs",endText:"AIFunctionCreateBlock_endText__dskyn",apiWrapper:"AIFunctionCreateBlock_apiWrapper__GHtlf",viewingApiWrapper:"AIFunctionCreateBlock_viewingApiWrapper__P9l1l",mobileApiWrapper:"AIFunctionCreateBlock_mobileApiWrapper__k5rJQ",topTriangle:"AIFunctionCreateBlock_topTriangle__lkq9c",apiDescription:"AIFunctionCreateBlock_apiDescription__UJBOV",fallbackThumbnailWrapper:"AIFunctionCreateBlock_fallbackThumbnailWrapper__yF68j",editScheduledTaskWrapper:"AIFunctionCreateBlock_editScheduledTaskWrapper__UQvPM",defaultModelNameWrapper:"AIFunctionCreateBlock_defaultModelNameWrapper__rliYJ",textAreaButtonsWrapper:"AIFunctionCreateBlock_textAreaButtonsWrapper__PtylU",attachButton:"AIFunctionCreateBlock_attachButton__7CTGN",urlButton:"AIFunctionCreateBlock_urlButton__x9E3B",uploadingP:"AIFunctionCreateBlock_uploadingP___w_On",urlHandlerTooltipIconWrapper:"AIFunctionCreateBlock_urlHandlerTooltipIconWrapper__Dk8OS"}},93715:(e,t,o)=>{"use strict";o.d(t,{A:()=>f});var n=o(37876),r=o(14232),a=o(33144),i=o(50698),s=o(94882),l=o(23694),c=o(11794),p=o(55462),u=o(4381),d=o(75919),h=o(56566),m=o.n(h),_=o(24925);let g=[{value:"question-answerer",labelKey:"ask",Icon:p.default,iconWidth:16,iconHeight:17,tooltipKey:"oneRequestOneAnswer"},{value:"ai-assistant",labelKey:"assistant",Icon:u.A,iconWidth:16,iconHeight:16,tooltipKey:"establishGoal"},{value:"ai-tutor",labelKey:"tutor",Icon:d.A,iconWidth:18,iconHeight:17,tooltipKey:"teach"}];function f(e){let{value:t,onChange:o,visibility:p="public"}=e,{t:u}=(0,_.cJ)(),[d,h]=(0,r.useState)(!1),f="private"===p?"#525F7F":l.PRIMARY_COLOR,{refs:w,floatingStyles:v,context:C}=(0,a.we)({open:d,onOpenChange:h,placement:"bottom-start",whileElementsMounted:i.ll,middleware:[(0,s.cY)(4),(0,s.UU)(),(0,s.BN)({padding:5})]}),k=(0,a.kp)(C,{toggle:!0}),I=(0,a.s9)(C),y=(0,a.It)(C,{role:"listbox"}),{getReferenceProps:A,getFloatingProps:b}=(0,a.bv)([k,I,y]),x=e=>{o({target:{value:e}}),h(!1)},T=g.find(e=>e.value===t)??g[0],B=T.Icon;return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{ref:w.setReference,className:m().customFunctionModeDropdownWrapper,...A(),children:(0,n.jsxs)("button",{type:"button",className:m().customFunctionModeDropdownButton,children:[(0,n.jsx)("div",{className:m().functionIconWrapper,children:(0,n.jsx)(B,{width:T.iconWidth,height:T.iconHeight,color:f})}),(0,n.jsx)("span",{className:m().customDropdownText,children:T?u(T.labelKey):u("ask")}),(0,n.jsx)(c.A,{width:12,height:8,color:f,viewBox:"0 0 12 8",className:m().customDropdownCaret})]})}),(0,n.jsx)(a.XF,{children:d&&(0,n.jsx)("div",{ref:w.setFloating,style:v,...b(),className:m().customDropdownMenu,children:g.map(e=>{let o=e.Icon;return(0,n.jsxs)("button",{type:"button",className:`${m().customDropdownOption} ${m().customDropdownOptionWithIcon} ${e.value===t?m().customDropdownOptionSelected:""}`,onClick:()=>x(e.value),"data-tooltip-content":u(e.tooltipKey),"data-tooltip-id":"placeBottom","data-tooltip-place":"right",children:[(0,n.jsx)("div",{className:m().functionIconWrapper,children:(0,n.jsx)(o,{width:e.iconWidth,height:e.iconHeight,color:f})}),(0,n.jsx)("span",{className:m().customDropdownText,children:u(e.labelKey)}),e.value===t&&(0,n.jsx)("span",{className:m().customDropdownCheckmark,children:"â"})]},e.value)})})})]})}},95323:(e,t,o)=>{"use strict";o.r(t),o.d(t,{default:()=>g});var n,r=o(37876),a=o(68827),i=o.n(a),s=o(14232),l=o(18847),c=o.n(l),p=o(96813),u=o.n(p),d=o(23694);
4function h(){return(h=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)({}).hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e}).apply(null,arguments)}let m=e=>s.createElement("svg",h({xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 20 24"},e),n||(n=s.createElement("path",{fill:"none",fillRule:"evenodd",stroke:"currentColor",strokeLinecap:"square",strokeWidth:1.7,d:"M11.1 18.043c5.12-5.711.81-12.17-4.187-12.17-6.11 0-10.47 13.5 2.56 17.127C24.2 18.787 18.912 5.874 13.098 5.874c-1.651 0-1.766.161-2.98.522 0-1.099.003-1.529.3-2.404q-4.865.147-5.726-2.85 5.31-.795 5.726 2.85.477-1.303 2.007-2.322"}))),_={text:c()(()=>o.e(4146).then(o.bind(o,4146)),{loadableGenerated:{webpack:()=>[4146]}}),image:c()(()=>o.e(60723).then(o.bind(o,60723)),{loadableGenerated:{webpack:()=>[60723]}}),video:c()(()=>o.e(62017).then(o.bind(o,62017)),{loadableGenerated:{webpack:()=>[62017]}}),vision:c()(()=>o.e(68088).then(o.bind(o,68088)),{loadableGenerated:{webpack:()=>[68088]}}),email:c()(()=>o.e(74836).then(o.bind(o,74836)),{loadableGenerated:{webpack:()=>[74836]}}),pdf:c()(()=>o.e(96874).then(o.bind(o,96874)),{loadableGenerated:{webpack:()=>[96874]}}),developer:c()(()=>o.e(87648).then(o.bind(o,87648)),{loadableGenerated:{webpack:()=>[87648]}}),teacher:c()(()=>o.e(58803).then(o.bind(o,58803)),{loadableGenerated:{webpack:()=>[58803]}}),career:c()(()=>o.e(65188).then(o.bind(o,65188)),{loadableGenerated:{webpack:()=>[65188]}}),ads:c()(()=>o.e(79511).then(o.bind(o,79511)),{loadableGenerated:{webpack:()=>[79511]}}),audio:c()(()=>o.e(98376).then(o.bind(o,98376)),{loadableGenerated:{webpack:()=>[98376]}}),ui:c()(()=>o.e(30461).then(o.bind(o,30461)),{loadableGenerated:{webpack:()=>[30461]}}),outreach:c()(()=>o.e(66900).then(o.bind(o,66900)),{loadableGenerated:{webpack:()=>[66900]}}),agent:c()(()=>o.e(12855).then(o.bind(o,12855)),{loadableGenerated:{webpack:()=>[12855]}})};class g extends s.Component{render(){let{toolID:e,funcMinD:t,color:o=d.PRIMARY_COLOR,width:n,height:a}=this.props,s=t?.outputType??t?.functionType;if(s){let i=null;if(null!==_[s]&&void 0!==_[s]&&(i=_[s]),i){let s=t&&(void 0===t.iconW||void 0===t.iconH)?{...t,iconW:t.iconW??n,iconH:t.iconH??a}:t;return(0,r.jsx)(i,{toolID:e,funcMinD:s,color:o})}}let l=t?.iconURL||t?.thumbnailURL||null;return(0,r.jsx)("div",{className:u().iconWrapper,children:"nsfw-image-maker"===e?(0,r.jsx)(m,{width:t.iconW,height:t.iconH,color:o}):l?(0,r.jsx)(i(),{src:l,width:n??(t?.iconURL?.length>0?20:48),height:a??(t?.iconURL?.length>0?20:48),layout:"fill",objectFit:"contain",alt:""}):null})}}},96813:e=>{e.exports={iconWrapper:"AIFunctionIconSVG_iconWrapper__8q8Ha"}},99329:(e,t,o)=>{"use strict";o.d(t,{D:()=>n});let n=(e,t,o,n)=>{if(e)return"function"==typeof e.setProp&&e.setProp(t,o),e}}}]);
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.