PageSourceSearch

https://autosecai.notion.site/_assets/AgentIconsBadge-78e15a2d3dd94ff6.js

js autosecai.notion.site collected 2026-10-10 00:33:41 UTC 11,354 bytes, 1 lines download raw bytes

1"use strict";(globalThis.rspackChunknotion_next=globalThis.rspackChunknotion_next||[]).push([[23242],{772966(e,t,a){function n(e){var t;let a=e.getDraftData()??e.getData(),n=[];return null==a||null==(t=a.modules)||t.forEach(e=>{var t;"notion"===e.type&&null!=(t=e.state)&&t.ownedByDatabasePropertyIds&&n.push(...e.state.ownedByDatabasePropertyIds)}),n}function o(e){let{workflowsData:t,collectionViewBlockStore:n,currentCollectionStore:o,property:l,spaceId:i}=e;if(0===t.length||!o)return[];let r=[];for(let e of t)e.collectionId===o.id&&r.push(e.workflowId);return r.map(e=>a(360851).N.createChildStore(n,{table:a(832375).C0E,id:e,spaceId:i})).filter(e=>{let t=e.getDraftData()??e.getData();for(let e of(null==t?void 0:t.modules)??[])if("notion"===e.type){var a;return(null==(a=e.state)||null==(a=a.ownedByDatabasePropertyIds)?void 0:a.includes(l))??!1}return!1})}function l(e){let{collectionStore:t,spaceId:n}=e,o=t.getParentStore(),l=null==o?void 0:o.getFormat(),i=l&&"database_agent_ids"in l&&Array.isArray(l.database_agent_ids)?l.database_agent_ids:[];if(!o||!l||0===i.length)return{value:[]};let r=i.map(e=>a(360851).N.createChildStore(o,{id:e,table:"workflow",spaceId:n})).filter(e=>e.isDefined()&&void 0===e.getMovedToTrashTime());try{return{value:r.map(e=>{let a,n=e.getData(),l=null==n?void 0:n.runtime_actor_pointer;l&&"bot"===l.table&&(a=l.id);let i={blockId:o.id,collectionId:t.id,workflowId:e.id,botId:a},r=e.canEdit()?"write":"read";return{...i,access:r}})}}catch(e){return{error:(0,a(324497).A)(e)}}}a(435368),a(730330),a(976614),a(218043),a(159952),a.d(t,{d_:()=>n,gY:()=>o,so:()=>l})},994578(e,t,a){a.r(t),a.d(t,{AgentIconsBadge:()=>u}),a(159952);var n=a(635790);let o=new(a(552709)).O2("CollectionViewAgentsMenu",async()=>Promise.all([a.e(87662),a.e(77694),a.e(20681),a.e(10033),a.e(77099),a.e(82782),a.e(90034),a.e(85898),a.e(30116)]).then(a.bind(a,455279))),l=(0,a(552709)._h)(o,e=>e.CollectionViewAgentsMenu);var i=a(440302);let r={display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"50%",padding:4},d={width:300},s={width:"100%"},c=(0,a(327219).YK)({openAgentsMenu:{defaultMessage:"Open Database Agents menu",id:"collectionTable.agentIconsBadge.openAgentsMenu"},configuredAutofillIndicator:{defaultMessage:"AI Autofill configured",id:"collectionTable.agentIconsBadge.configuredAutofillIndicator"}});
1function u(e){let{collectionContextStore:t,collectionStore:o,spaceId:u,property:g,propertySchema:f}=e,m=(0,a(533992).v3)(),p=(0,a(327219).tz)(),w=(0,a(551408).A)(),I=(0,a(579993).K8)(()=>o.canEdit(),[o]),{getWorkflowsForProperty:y}=(0,a(300873).i)(o,u),h=(0,a(579993).K8)(()=>I?y(g):[],[I,y,g]),v=(0,a(579993).K8)(()=>h.map(e=>({id:e.id,agentIcon:(0,a(575422).m)(e,p).icon,isLite:(0,a(691143).m)(e),workflowStore:e})),[h,p]),b=v.length>1,A=(0,n.useCallback)(async()=>{let{triggerDatabaseAgentModal:e}=await Promise.all([a.e(58035),a.e(80293),a.e(75887),a.e(87662),a.e(77694),a.e(22985),a.e(20681),a.e(86600),a.e(46913),a.e(10033),a.e(99115),a.e(85487),a.e(13991),a.e(25688),a.e(94466),a.e(80730),a.e(38786),a.e(88113),a.e(13905),a.e(58579),a.e(69811),a.e(38559),a.e(97754),a.e(77099),a.e(99376),a.e(4822),a.e(78729),a.e(68735),a.e(14417),a.e(41379),a.e(64552),a.e(83065),a.e(66395),a.e(99044),a.e(97054),a.e(50869),a.e(40678),a.e(3649),a.e(1559),a.e(61300),a.e(97098),a.e(60921),a.e(54931),a.e(56556),a.e(26751),a.e(11849),a.e(36153),a.e(4637),a.e(74787),a.e(57614),a.e(11327),a.e(20773),a.e(60428),a.e(56161),a.e(40835),a.e(89379),a.e(2337),a.e(90989),a.e(79110),a.e(89292),a.e(52149),a.e(64076),a.e(44960),a.e(54161),a.e(42968),a.e(89352),a.e(11723),a.e(68034),a.e(31693),a.e(14512),a.e(80247),a.e(46449),a.e(82782),a.e(54811),a.e(85239),a.e(37747),a.e(74017),a.e(26612),a.e(96886),a.e(17970),a.e(33308),a.e(34925),a.e(34272),a.e(66194),a.e(38069),a.e(42492),a.e(38886),a.e(42293),a.e(48453),a.e(65588),a.e(51604),a.e(90466),a.e(72474),a.e(39266),a.e(41269),a.e(59870),a.e(89380),a.e(794),a.e(65848),a.e(10817),a.e(43009),a.e(869),a.e(60952),a.e(55857),a.e(86267),a.e(9614),a.e(52512),a.e(60984),a.e(12650),a.e(2728),a.e(27682),a.e(91049),a.e(90034),a.e(52790),a.e(98326),a.e(15908),a.e(11702),a.e(47034),a.e(14343),a.e(18091),a.e(42386),a.e(30068),a.e(58422),a.e(15609),a.e(37994),a.e(1147),a.e(52445),a.e(19332),a.e(80141),a.e(13751),a.e(27035),a.e(35789),a.e(63361),a.e(68041),a.e(31771),a.e(77231),a.e(19600),a.e(66738),a.e(62186),a.e(22433),a.e(91780),a.e(39099),a.e(77979),a.e(14258),a.e(66605),a.e(92354),a.e(31e3),a.e(22837),a.e(38514),a.e(82531),a.e(6793),a.e(99287),a.e(81849),a.e(56762),a.e(4316),a.e(84498),a.e(70785),a.e(94109),a.e(61658),a.e(74616),a.e(1538),a.e(64563),a.e(15061),a.e(89814),a.e(97151),a.e(69058),a.e(42907),a.e(19244),a.e(6182),a.e(69689),a.e(97281),a.e(11322),a.e(59068),a.e(32797),a.e(2710),a.e(85231),a.e(59633),a.e(43889),a.e(94988),a.e(90490),a.e(15774),a.e(17113),a.e(79261),a.e(18516),a.e(86918),a.e(46335),a.e(93599),a.e(96450),a.e(92843),a.e(84959),a.e(31483),a.e(42104),a.e(68317),a.e(87057),a.e(63336),a.e(48765),a.e(58102),a.e(27580),a.e(39690),a.e(46411),a.e(57793),a.e(397),a.e(59583),a.e(96015),a.e(19361),a.e(87696),a.e(97214),a.e(65067),a.e(92054),a.e(18242),a.e(36927),a.e(22299),a.e(34250),a.e(49094),a.e(22601),a.e(7852),a.e(63741),a.e(48251),a.e(95023),a.e(47204),a.e(29069),a.e(49198),a.e(64188),a.e(44518),a.e(15222),a.e(30946),a.e(36087),a.e(85565),a.e(82027),a.e(26985),a.e(38431),a.e(32869),a.e(85898),a.e(40593),a.e(41981),a.e(35402),a.e(52138),a.e(17980),a.e(40127),a.e(78271),a.e(70102),a.e(8481),a.e(44356),a.e(46864),a.e(21432),a.e(85556),a.e(42195),a.e(50909),a.e(15280),a.e(46907),a.e(66215),a.e(82535),a.e(74115),a.e(55417),a.e(66815),a.e(21961),a.e(77580),a.e(38647)]).then(a.bind(a,636561));await e({collectionContextStore:t,collectionId:o.id,environment:m,intl:p,propertyId:g,propertySchema:f,workflowId:v[0].id})},[t,o.id,m,p,g,f,v]),k=(0,n.useCallback)(()=>(0,i.jsx)(a(525258).C,{workflows:v,size:18}),[v]),x=p.formatMessage(c.openAgentsMenu);return w?I?0===v.length?null:b?(0,i.jsx)(a(656252).d,{popupType:a(139424).A.isMobile?a(182718).n.BottomSheet:a(182718).n.Popup,stopClickPropagation:!0,content:e=>(0,i.jsx)("div",{style:a(139424).A.isMobile?s:d,children:(0,i.jsx)(l,{collectionContextStore:t,propertyId:g,onClose:e.close})}),originGap:4,children:e=>(0,i.jsx)(a(64960).Ay,{...e,ariaLabel:x,style:r,children:k()})}):(0,i.jsx)(a(64960).Ay,{onClick:A,style:r,children:k()}):f.default_workflow_id?(0,i.jsx)("div",{style:r,children:(0,i.jsx)(a(16275).I,{icon:a(438166).magicWandSmallIcon,size:"sm",colorPalette:"gray",colorVariant:"secondary",label:p.formatMessage(c.configuredAutofillIndicator)})}):null:null}},595151(e,t,a){function n(e){let t=(0,a(579993).K8)(()=>
1{if(e)return e.getSpaceId()},[e]);return(0,a(579993).K8)(()=>e&&t?(0,a(772966).so)({collectionStore:e,spaceId:t}):{value:[]},[e,t])}a.d(t,{a:()=>n})},300873(e,t,a){var n=a(635790);function o(e,t){let o=(0,a(595151).a)(e);return{getWorkflowsForProperty:(0,n.useCallback)(n=>{if(o.error||!o.value||!e||!t)return[];let l=e.getParentCollectionViewBlockStore();return l?(0,a(772966).gY)({workflowsData:o.value,collectionViewBlockStore:l,currentCollectionStore:e,property:n,spaceId:t}):[]},[o,e,t])}}a.d(t,{i:()=>o})},525258(e,t,a){a(730330),a(976614),a(159952),a(635790);var n=a(440302);let o={marginInlineStart:-10},l={opacity:.5};function i(e){let{workflows:t}=e,i=t.length>1?t.filter(e=>!e.isLite):t;return(0,n.jsx)(a(4458).fI,{alignItems:"center",children:i.slice(0,3).map((e,t)=>(0,n.jsx)("div",{style:{...0!==t&&o,...2===t&&l,position:"relative",zIndex:3-t},children:(0,n.jsx)(a(686015).D,{agentIcon:e.agentIcon,workflowStore:e.workflowStore,size:16,useSmallIcon:!0,colorPalette:"gray",colorVariant:"secondary"})},e.id))})}a.d(t,{C:()=>i})},686015(e,t,a){a(635790);var n=a(440302);function o(e){let{agentIcon:t,workflowStore:o,size:l,colorPalette:i,colorVariant:r="primary",useSmallIcon:d}=e;return(0,a(579993).K8)(()=>(0,a(691143).m)(o),[o])?(0,n.jsx)(a(16275).I,{icon:d?a(438166).magicWandSmallIcon:a(312528).magicWandIcon,size:l,colorPalette:i,colorVariant:r}):(0,n.jsx)(a(651790).AgentIcon,{agentIcon:t,workflowStore:o,size:l})}a.d(t,{D:()=>o})},691143(e,t,a){function n(e){var t,a;return(null==(t=e.getDraftData())?void 0:t.isLite)??(null==(a=e.getData())?void 0:a.isLite)??!1}a.d(t,{m:()=>n})},551408(e,t,a){function n(){return(0,a(579993).K8)(()=>a(886556).z.isAiEnabled(),[])}function o(){return a(886556).z.isAiEnabled()}a.d(t,{A:()=>n,R:()=>o})},651790(e,t,a){a.r(t);var n=a(635790),o=a(440302);function l(e){let{agentIcon:t,workflowStore:l,workflowPointer:i,size:r,animated:d=!1}=e,s=(0,a(83208).X)("animated_custom_agent_faces"),c=(0,n.useMemo)(()=>{let e={workflowIcon:t,size:r,animated:d&&s};return l?(0,a(514827).D)({...e,workflowStore:l}):(0,a(514827).D)({...e,workflowPointer:i})},[t,l,i,r,d,s]);return(0,o.jsx)(a(569553).B6,{icon:c,iconRecordCategory:"workflow",isEmptyPage:!1,size:r,disabled:!0})}a.d(t,{AgentIcon:()=>l})},575422(e,t,a){let n=(0,a(327219).YK)({untitledAgent:{id:"workflow.emptyWorkflowTitle",defaultMessage:"Untitled agent"}});function o(e,t,a){var o;return{name:e.getName()||a||t.formatMessage(n.untitledAgent),icon:e.getRawIcon()||"",isLite:(null==(o=e.getData())?void 0:o.isLite)??!1}}a.d(t,{m:()=>o})},514827(e,t,a){function n(e){let{workflowStore:t,workflowPointer:n,workflowIcon:o,size:l,animated:i}=e,r=t?t.pointer:n,d=o||(0,a(337222).Oy)({baseUrl:a(139424).A.domainBaseUrl||"",shape:"square",color:"gray"});return l<32&&(d=(0,a(337222).Hy)(d)),i&&(d=(0,a(337222).xz)(d)),{pointer:r,icon:(0,a(337222).xr)(d)}}a.d(t,{D:()=>n})},312528(e,t,a){a.r(t),a(635790);let n={viewBox:"0 0 20 20",fittedViewBox:"2.44 2.45 15.57 15.57",svg:(0,a(440302).jsx)("path",{d:"M10.55 3a.55.55 0 0 0-1.1 0v2a.55.55 0 0 0 1.1 0zM8.47 8.47a.75.75 0 0 1 1.06 0l.897.896-1.06 1.06-.897-.896a.75.75 0 0 1 0-1.06m1.603 2.664 6.647 6.646a.75.75 0 1 0 1.06-1.06l-6.646-6.647zM10.55 15a.55.55 0 0 0-1.1 0v2a.55.55 0 0 0 1.1 0zm-3.697-1.853a.55.55 0 0 1 0 .777L5.44 15.34a.55.55 0 1 1-.778-.778l1.415-1.415a.55.55 0 0 1 .777 0m8.485-8.486a.55.55 0 0 1 0 .778l-1.415 1.414a.55.55 0 1 1-.777-.777L14.56 4.66a.55.55 0 0 1 .777 0M5.55 10a.55.55 0 0 1-.55.55H3a.55.55 0 1 1 0-1.1h2a.55.55 0 0 1 .55.55m12 0a.55.55 0 0 1-.55.55h-2a.55.55 0 1 1 0-1.1h2a.55.55 0 0 1 .55.55M6.853 6.853a.55.55 0 0 1-.778 0L4.661 5.44a.55.55 0 1 1 .778-.778l1.414 1.415a.55.55 0 0 1 0 .777"})},o=(0,a(104509).wt)("magicWand",n,"default");a.d(t,{},{iconDefinition:n,magicWandIcon:o})},438166(e,t,a){a.r(t),a(635790);let n={viewBox:"0 0 16 16",fittedViewBox:"1.82 1.82 12.68 12.68",svg:(0,a(440302).jsx)("path",{d:"M8 1.825a.575.575 0 0 0-.575.575V4a.575.575 0 0 0 1.15 0V2.4A.575.575 0 0 0 8 1.825m4.367 1.809a.575.575 0 0 0-.814 0l-1.131 1.131a.575.575 0 1 0 .813.813l1.132-1.131a.575.575 0 0 0 0-.813m-7.92 0a.575.575 0 0 0-.813.813l1.13 1.131a.575.575 0 1 0 .814-.813zm3.248 3.071a.7.7 0 1 0-.99.99l.77.77.99-.99zm4.305.72a.575.575 0 0 0 0 1.15h1.6a.575.575 0 1 0 0-1.15zm-9.6 0a.575.575 0 1 0 0 1.15H4a.575.575 0 0 0 0-1.15zm11.895 5.88-5.37-5.37-.99.99 5.37 5.37a.7.7 0 0 0 .99-.99m-8.717-2.883a.575.575 0 0 0-.813 0l-1.131 1.131a.575.575 0 1 0 .813.813l1.131-1.131a.575.575 0 0 0 0-.813M8 11.425a.575.575 0 0 0-.575.575v1.6a.575.575 0 1 0 1.15 0V12A.575.575 0 0 0 8 11.425"})},o=(0,a(104509).wt)("magicWandSmall",n,"small");a.d(t,{},{iconDefinition:n,magicWandSmallIcon:o})}}]);

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.