PageSourceSearch

https://dataflair.ai/build/assets/Index-C4GbT_dq.js

js dataflair.ai collected 2026-10-05 15:06:36 UTC 7,874 bytes, 1 lines download raw bytes

1import{h as P,r as a}from"./app-Bx_4WIP2.js";import{_ as U}from"./AppLayout.vue_vue_type_script_setup_true_lang-CYSeWSZR.js";import{_ as M}from"./PageContainer.vue_vue_type_script_setup_true_lang-DGxOsd-U.js";import{_ as O}from"./CrudDeleteModal.vue_vue_type_script_setup_true_lang-Cv6qD0y6.js";import{_ as j}from"./AutomationHeader.vue_vue_type_script_setup_true_lang-D3PzQzh3.js";import{_ as K}from"./RulesFilterBar.vue_vue_type_script_setup_true_lang-OuguJN6G.js";import{_ as W}from"./RuleCard.vue_vue_type_script_setup_true_lang-DFGwX2s_.js";import{d as G,l as u,p as n,u as y,q as k,x as e,y as r,F as g,z as h,ch as F,E as J,N as Z,aB as H,c4 as Q,ay as X,cK as Y,I as _,J as w,A as m,B as ee,t as x,r as p,g as c,b2 as te,c9 as se,ca as oe,b8 as le}from"./lucide-icons-BHM17C-j.js";import"./Primitive-CjuHcWY2.js";import"./Input.vue_vue_type_script_setup_true_lang-BtPDCmnq.js";import"./index-DCcBiDiX.js";import"./TooltipProvider-CT1apEQy.js";import"./useForwardExpose-CVjld09t.js";import"./Presence-BVbJcFMP.js";import"./DialogTitle.vue_vue_type_script_setup_true_lang-B4MZjYFN.js";import"./ConfigProvider-CqsVdPkO.js";import"./Teleport-CIFwUTJQ.js";import"./_plugin-vue_export-helper-DlAUqK2U.js";import"./RovingFocusGroup-BxRC3pJu.js";import"./index-8HNYwhGY.js";import"./index-DyR6fIAl.js";import"./http-BkpICFrm.js";import"./AiToolUseTrace.vue_vue_type_script_setup_true_lang-CZwXnBut.js";import"./ToplistIntelCard.vue_vue_type_script_setup_true_lang-Dpxzk43x.js";import"./entities-Dsb_FXkd.js";import"./StatusDot.vue_vue_type_script_setup_true_lang-CIN9qhMQ.js";import"./resultStyles-D_821iDo.js";const re={class:"mb-6"},ie={class:"grid grid-cols-3 gap-2.5 sm:grid-cols-4 lg:grid-cols-7"},ae={class:"text-2xl font-extrabold leading-none text-slate-900"},ne={class:"mt-1 text-[10px] font-semibold text-slate-500"},ue={class:"mb-6 grid grid-cols-2 gap-3.5 lg:grid-cols-4"},ce={class:"mb-2 flex items-center justify-between"},de={class:"text-[10px] font-bold uppercase tracking-wider text-slate-500"},me={class:"text-2xl font-extrabold leading-none tracking-tight text-slate-900"},pe={class:"mt-1 text-[11px] leading-snug text-slate-500"},ve={class:"rounded-lg border border-slate-200 bg-white"},fe={key:0,class:"px-6 py-10 text-center text-sm text-slate-500"},ge={class:"mt-6 rounded-lg border p-4",style:{background:"linear-gradient(135deg,#4A8FA810,#FFBE0010)","border-color":"#4A8FA840"}},xe={class:"flex items-start gap-3.5"},be={class:"flex size-10 shrink-0 items-center justify-center rounded-lg",style:{background:"#4A8FA8"}},We=G({__name:"Index",props:{rules:{},meta:{}},setup(C){const l=C,d=p(""),v=p("All sources"),f=p("All statuses"),i=p(null),b=p(!1),A=c(()=>l.rules.filter(t=>(v.value==="All sources"||t.source.includes(v.value))&&(f.value==="All statuses"||t.status===f.value)&&(d.value===""||t.name.toLowerCase().includes(d.value.toLowerCase())||(t.tags??[]).some(o=>o.includes(d.value.toLowerCase()))))),B=[{src:"Intelligence",icon:F,color:"#FFBE00"},{src:"CRM",icon:J,color:"#215B7A"},{src:"Stats",icon:Z,color:"#e83a91"},{src:"Tracking",icon:H,color:"#2DA8C8"},{src:"KPIs",icon:Q,color:"#059669"},{src:"List Manager",icon:X,color:"#215B7A"},{src:"Content",icon:Y,color:"#7C3AED"}],R=c(()=>{const t={};for(const o of l.rules){const s=o.source.split(/[+ ]/)[0];t[s]??=0,o.status==="active"&&(t[s]+=1)}return t}),E=c(()=>l.rules.filter(t=>t.status==="active").length),T=c(()=>l.rules.reduce((t,o)=>t+o.fired_this_month,0)),S=c(()=>[{label:"Total active",value:E.value,sub:`of ${l.rules.length} total`,color:"#4A8FA8",icon:te},{label:"Fires this month",value:T.value,sub:"across all sources",color:"#10B981",icon:se},{label:"Source modules touched",value:l.meta?.source_modules_touched??0,sub:"modules with at least one active rule",color:"#FFBE00",icon:oe},{label:"Failed runs (24h)",value:l.meta?.failed_runs_24h??0,sub:"errored or circuit-broken runs",color:"#F59E0B",icon:le}]);function L(t){a.visit(`/automation/rules/${t.id}`)}function $(){a.visit("/automation/rules/create")}function I(t){a.post(route("tenant.automation.rules.activate",{rule:t.id}),{},{preserveScroll:!0})}function N(t){a.post(route("tenant.automation.rules.pause",{rule:t.i
1d}),{},{preserveScroll:!0})}const q=c(()=>l.rules.find(t=>t.id===i.value)??null);function z(t){i.value=t.id}function D(){i.value!==null&&(b.value=!0,a.delete(route("tenant.automation.rules.destroy",{rule:i.value}),{preserveScroll:!0,onFinish:()=>{b.value=!1,i.value=null}}))}function V(){const t=l.rules.find(o=>(o.tags??[]).includes("from_template:validation-loop"));if(t){a.visit(`/automation/rules/${t.id}/edit`);return}a.visit("/automation/templates/validation-loop")}return(t,o)=>(r(),u(g,null,[n(y(P),{title:"Automation · Rules"}),n(U,{breadcrumbs:[{title:"Automation",href:t.route("tenant.automation.index")},{title:"Rules"}]},{default:k(()=>[n(M,{variant:"wide",class:"automation-rules-index"},{default:k(()=>[n(j,{title:"Rules",crumb:"Rules",subtitle:"Every rule is an Entity, a Criteria, and a When-Result. Pick the entity, build the sentence, save."}),e("div",re,[o[4]||(o[4]=e("div",{class:"mb-2 text-[10px] font-bold uppercase tracking-wider text-slate-500"}," Active rules by source module ",-1)),e("div",ie,[(r(),u(g,null,h(B,s=>e("div",{key:s.src,class:"rounded-lg border border-slate-200 bg-white p-3 text-center"},[(r(),_(w(s.icon),{size:16,color:s.color,class:"mx-auto mb-1.5"},null,8,["color"])),e("div",ae,m(R.value[s.src]??0),1),e("div",ne,m(s.src),1)])),64))])]),e("div",ue,[(r(!0),u(g,null,h(S.value,s=>(r(),u("div",{key:s.label,class:"rounded-lg border border-slate-200 bg-white p-4"},[e("div",ce,[e("span",de,m(s.label),1),(r(),_(w(s.icon),{size:15,color:s.color},null,8,["color"]))]),e("div",me,m(s.value),1),e("div",pe,m(s.sub),1)]))),128))]),n(K,{q:d.value,"source-filter":v.value,"status-filter":f.value,"onUpdate:q":o[0]||(o[0]=s=>d.value=s),"onUpdate:sourceFilter":o[1]||(o[1]=s=>v.value=s),"onUpdate:statusFilter":o[2]||(o[2]=s=>f.value=s),onCreate:$},null,8,["q","source-filter","status-filter"]),e("div",ve,[o[5]||(o[5]=e("div",{class:"grid grid-cols-[minmax(280px,2fr)_120px_140px_110px_130px_90px_40px] gap-2 border-b border-slate-200 px-4 py-3 text-[10px] font-bold uppercase tracking-wider text-slate-500"},[e("div",null,"Rule"),e("div",null,"Entity"),e("div",null,"Source"),e("div",null,"Status"),e("div",null,"Last fired"),e("div",{class:"text-right"},"Fires / mo"),e("div")],-1)),A.value.length===0?(r(),u("div",fe," No rules match the current filters. ")):ee("",!0),(r(!0),u(g,null,h(A.value,s=>(r(),_(W,{key:s.id,rule:s,onOpen:L,onActivate:I,onPause:N,onArchive:z},null,8,["rule"]))),128))]),e("div",ge,[e("div",xe,[e("div",be,[n(y(F),{size:20,color:"#fff"})]),o[6]||(o[6]=e("div",{class:"flex-1"},[e("div",{class:"mb-1 flex items-center gap-2"},[e("span",{class:"text-sm font-extrabold text-slate-900"}," The validation loop is the closed-loop play "),e("span",{class:"rounded-sm px-1.5 py-0.5 text-[10px] font-bold text-white",style:{background:"#4A8FA8"}}," Differentiator · v1 ")]),e("p",{class:"m-0 text-xs leading-relaxed text-slate-600"},[x(" When "),e("strong",null,"Intelligence"),x(" says trust is high but "),e("strong",null,"Stats / Tracking"),x(" shows conversion collapsing — Automation surfaces the contradiction. No other module spots this. Activate the "),e("strong",null,"Trust × Behavior"),x(" template to ship it. ")])],-1)),e("button",{type:"button",class:"shrink-0 whitespace-nowrap rounded-lg px-3.5 py-2 text-xs font-bold text-white",style:{background:"#4A8FA8"},onClick:V},"Activate")])])]),_:1}),n(O,{open:i.value!==null,"entity-label":"rule","entity-name":q.value?.name,warning:"This rule will stop firing immediately and be hidden from the active list.",deleting:b.value,onConfirm:D,onCancel:o[3]||(o[3]=s=>i.value=null)},null,8,["open","entity-name","deleting"])]),_:1},8,["breadcrumbs"])],64))}});export{We as default};

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.