PageSourceSearch

https://dataskeptic.com/assets/Tabbed-CIt3vIkV.js

js dataskeptic.com collected 2026-10-01 10:18:04 UTC 10,793 bytes, 1 lines download raw bytes

1import{d as Z,b as ne,u as ee,r as h,Y as R,j as e,P as S,S as m,bG as F,H as V,W as q,an as ae}from"./index-DN4Mwqf7.js";import se from"./Dashboard-D6aWkt-D.js";import ie from"./ObjectExplorer-Bl-zkk46.js";import{S as le}from"./Streams-40ciSb3w.js";import ce from"./Parallax-B1e3rbLe.js";import{J as Y,K as pe}from"./Parameter-DD2b9kxf.js";import{M as Q}from"./index-CeTPcGzX.js";import{P as de}from"./Popup-CI8dlaUY.js";import"./outputActions-FyfPcXwd.js";import"./AppWebsiteV2-ClyCSvQD.js";import"./Support-BHZo4W1C.js";import"./types-0x_1vaZr.js";import"./useAudioPosition-CPloxytS.js";import"./sanitizeCss-DDeV3a_4.js";import"./ThemeEditor-WHlrAEfK.js";import"./types-C-48g5o1.js";import"./useCredentialReports-xrk7mg-r.js";import"./applications-4-Xsf5u6.js";import"./ParameterBuilder-D6MDV4qs.js";import"./index-Bq1GzDBn.js";import"./ace-Dlf-vt7D.js";import"./SelectOptions-CX_-i7or.js";import"./StreamSelectorV2-CMYzFjhf.js";import"./Card-cLjeqwtT.js";import"./ValidationsEditor-9eUU24Dk.js";import"./Dashboard-BQQAX2MJ.js";import"./AppMenu-BKz22tte.js";import"./Placeholder-BfICVJLU.js";import"./PlusScriptView-CbHSws3c.js";import"./_commonjs-dynamic-modules-TDtrdbi3.js";import"./style-BRPsycUQ.js";import"./StreamTriggerDataHandler-Cs0IsTmf.js";import"./Parameter-D-2E5g6H.js";import"./ApplicationContext-CgvY33Jd.js";import"./useDebounce-D6bLFlxb.js";import"./useMobile-D8fDk965.js";import"./SplitPaneLayout-CYe7S9cP.js";import"./index-Cu4DO8L0.js";import"./motion-j9FxiGRE.js";import"./ItemActionButtonsRunner-BhCzVyIt.js";import"./SpreadsheetViewer-0aBpyk4X.js";import"./ReceiptViewerModal-DXJRO76Y.js";import"./JobViewerModal-CKTjHPHi.js";import"./JobDetailView-BZ4JBm31.js";import"./mode-json-DGKgiNOd.js";import"./mode-text-owca_3Io.js";import"./CustomTemplateModal-Ds-_T8OI.js";import"./mode-css-ZyOVlraq.js";import"./useNavigationBlocker-DIfVhHY3.js";import"./StreamViewer-DTrl6OAL.js";import"./StreamEChart-xITwTqqn.js";import"./ReactECharts-BtHj0bXP.js";import"./FileViewer-vY3FOqMN.js";import"./Tab-UZsBiH8e.js";import"./JSONViewer-Bu0_hIJH.js";import"./papaparse.min-D6Gm67i-.js";import"./leaflet-CoeUjYat.js";import"./index-BpoLgcEt.js";import"./prism-DhdOSkyD.js";import"./toConsumableArray-u9GFSwrg.js";import"./ActionRunnerMain-q0XID2wW.js";import"./ActionInfo-BIM1zBnI.js";import"./vis-network-BHjj1H0E.js";import"./theme-monokai-KobNCr1x.js";import"./YouTube.esm-CeHaenUX.js";/* empty css                  */import"./ParallaxEngine-DMKwpMiL.js";import"./use-transform-n5dcjMB3.js";import"./AudioRecordingPublic-BU_wehFX.js";import"./PodcastLatestEpisode-CfI7X7Sd.js";import"./imageResize-BSgDhDs_.js";import"./MailingList-DYDdBp4u.js";import"./Playlist-DYoV_nez.js";const me=["http://","https://","mailto:","/","#","./"];function ue(n){if(typeof n!="string")return null;const a=n.replace(/[\t\n\r]/g,"").replace(/^[\u0000-\u0020\u007f]+/,"").trim();if(!a)return null;const u=a.toLowerCase();return me.some(j=>u.startsWith(j))?a.replace(/"/g,"&quot;").replace(/'/g,"&#39;"):null}function te(n){if(!n)return"";let a=n.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/^### (.+)$/gm,"<h3>$1</h3>").replace(/^## (.+)$/gm,"<h2>$1</h2>").replace(/^# (.+)$/gm,"<h1>$1</h1>").replace(/\*\*(.+?)\*\*/g,"<strong>$1</strong>").replace(/\*(.+?)\*/g,"<em>$1</em>").replace(/\[([^\]]+)\]\(([^)]+)\)/g,(u,j,I)=>{const k=ue(I);return k===null?j:'<a href="'.concat(k,'" target="_blank" rel="noopener noreferrer">').concat(j,"</a>")}).replace(/\n\n/g,"</p><p>").replace(/\n/g,"<br />");return"<p>".concat(a,"</p>")}ae("useandom26T198340PX75pxJACKVERYMINDBUSHWOLFGQZbfghjklqvwyzrict",5);function be({application:n,loading:a=!1,parentAppObjectId:u}){var j;const I=Z(),{username:k}=ee(),{admin_params:W=[],admin_settings:G=new Map}=n??{},c=(j=G.get("file_key"))==null?void 0:j.sval,[p,f]=h.useState(null),[D,s]=h.useState(null),[L,U]=h.useState(!1);h.useEffect(()=>{(async()=>{if(!(!c||!u)){U(!0),s(null);try{const E=await I.getEmbeddedContent(c,u);f(E)}catch(E){console.error("[FileViewer] Error fetching embedded content:",E),s(E.message||"Failed to load embedded content")}finally{U(!1)}}})()},[c,u]);const P=c?c.slice(c.lastIndexOf(".")+1).toLowerCase():"";return a||L?e.jsx(m,{children:e.jsx(m,{placeholder:!0,children:e.jsxs(V,{icon:!0,children:[e.jsx(S,{loading:!0,name:"spinner"}),"Loading File"]})})}):D?e.jsx(m,{children:e.jsxs(m,{placeholder:!0,children:[e.jsxs(V,{icon:!0,children:[e.jsx(S,{name:"exclamation triangle"}),"Error loading file"]}),e.jsx("p",{children:D})]})}):c?p!==null?P==="md"||P==="markdown"?e.jsx(m,{style:{overflow:"auto",maxHeight:"70vh"},children:e.jsx("div",{className:"markdown-content",dangerouslySetInnerHTML:{__html:te(p)}})}):e.jsx(m,{style:{overflow:"auto",maxHeight:"70vh"},children:e.jsx("pre",{style:{whiteSpace:"pre-wrap",wordBreak:"break-word"},children:p})}):e.jsx(m,{children:e.jsx(m,{placeholder:!0,children:e.jsxs(V,{icon:!0,children:[e.jsx(S,{name:"file outline"}),"No content available"]})})}):e.jsx(m,{children:e.jsx(m,{placeholder:!0,children:e.jsxs(V,{icon:!0,children:[e.jsx(S,{name:"exclamation triangle"}),"File not found"]}
1)})})}function Vt({application:n,refreshApps:a,onAddedApp:u,className:j,id:I}){var k,W;const G=Z(),{hostname:c}=ne(),{username:p}=ee(),[f,D]=h.useState(0),[s,L]=h.useState(n),[U,P]=h.useState(!1),[B,E]=h.useState(new Set([0]));h.useEffect(()=>{n&&L(n)},[n]);const{admin_params:he=[],admin_settings:z=new Map}=s??{},K=((k=z.get("footer_markdown"))==null?void 0:k.sval)||"";h.useEffect(()=>{(async()=>{if(!c||!p||!(n!=null&&n.object_id))return;const r=n.object_id.split("."),b=r[r.length-1];if(b)try{const l=await G.checkAndUpgradeApp(c,p,b);if(console.log("[TabbedApp] Upgrade check result:",l),l.upgraded&&l.app){console.log("[TabbedApp] Upgraded from ".concat(l.from_version," to ").concat(l.to_version));const w=F.fromObject(l.app);L(w),a&&a(!0)}}catch(l){console.error("[TabbedApp] Upgrade check failed:",l)}})()},[c,p,n==null?void 0:n.object_id]);const A=(W=z.get("tabs"))==null?void 0:W.vals,M=h.useMemo(()=>A&&A.length>0?A.map(o=>{var r,b,l,w,C;const{vmap:x}=o,$=(r=x.get("group"))==null?void 0:r.sval,_=(b=x.get("label"))==null?void 0:b.sval,O=(l=x.get("icon"))==null?void 0:l.sval,g=(w=x.get("hover_desc"))==null?void 0:w.sval;let i=(C=x.get("nested"))==null?void 0:C.vmap;if(i&&!(i instanceof Map)){console.warn("[TabbedApp] nestedVals is not a Map, converting:",typeof i,Object.keys(i));try{i=new Map(Object.entries(i).map(([t,y])=>[t,R.fromObject(y)]))}catch(t){console.error("[TabbedApp] Failed to convert nestedVals:",t),i=new Map}}return{group:$,label:_,icon:O,description:g,nestedVals:i}}):[],[A]);h.useEffect(()=>{var o;((o=M[f])==null?void 0:o.group)==="dashboard"&&E(r=>{if(r.has(f))return r;const b=new Set(r);return b.add(f),b})},[f,M]);const J=o=>{if(!o||!p)return!1;const r=/^[^/]+\/([^/]+)\//.exec(o);return r?r[1]!==p:!1},oe=(()=>{var o,r,b,l,w,C,x,$;if(!A||A.length===0)return null;const _=[];M.forEach((g,i)=>{var t;if(g.group!=="dashboard"||!B.has(i))return;const{nestedVals:y}=g,v=((t=y==null?void 0:y.get("dashboard_id"))==null?void 0:t.sval)||"";if(!v){_.push(e.jsx("div",{style:{display:i===f?"block":"none",height:"100%"},children:e.jsxs(m,{placeholder:!0,children:[e.jsxs(V,{icon:!0,children:[e.jsx(S,{name:"setting"}),'No Dashboard configured for "',g.label||"this tab",'"']}),e.jsx("p",{style:{textAlign:"center",color:"#888",maxWidth:"500px",margin:"0.5rem auto"},children:'Open the Web Builder, go to Applications, select this Tabbed App, and choose a Dashboard for this tab using "Select Existing" or "New Dashboard".'})]})},"dashboard-container-unconfigured-".concat(i)));return}const d=new F({admin_params:[],admin_settings:y});_.push(e.jsx("div",{style:{display:i===f?"block":"none",height:"100%"},children:e.jsx(se,{application:d,refreshApps:a,onAddedApp:u,embedded:!0,parentAppObjectId:s==null?void 0:s.object_id},"dashboard-".concat(v))},"dashboard-container-".concat(v)))});const O=M[f];if(O&&O.group!=="dashboard"){const{group:g,label:i,nestedVals:t}=O,y=new F({admin_params:[],admin_settings:t});if(g==="collection"){const v=(o=t==null?void 0:t.get("collections_app_type"))==null?void 0:o.sval;let d=(r=t==null?void 0:t.get("collection_id"))==null?void 0:r.sval;const T=v||(d?Y.MyCollection:void 0);if(T===Y.UserCollection&&p){const X=(b=t==null?void 0:t.get("collection_slug"))==null?void 0:b.sval;X&&(d="".concat(c,"/").concat(p,"/collection.").concat(X))}const H=J(d),N=t instanceof Map?new Map(t):new Map;N.set("collection_id",R.fromObject({ptype:q.STRING,sval:d})),(T&&!N.has("collections_app_type")||T&&((l=N.get("collections_app_type"))==null?void 0:l.sval)!==T)&&N.set("collections_app_type",R.fromObject({ptype:q.STRING,sval:T}));const re=new F({admin_params:[],admin_settings:N});_.push(e.jsx(ie,{application:re,refreshApps:a,onAddedApp:u,embedded:H,parentAppObjectId:H?s==null?void 0:s.object_id:void 0},"collection-".concat(d)))}if(g==="stream"){const v=(w=t==null?void 0:t.get("streams_app_type"))==null?void 0:w.sval;let d=(C=t==null?void 0:t.get("stream_id"))==null?void 0:C.sval;if(v===pe.UserStream&&p){const H=(x=t==null?void 0:t.get("stream_slug"))==null?void 0:x.sval;H&&(d="".concat(c,"/").concat(p,"/stream.").concat(H))}console.log("[TabbedApp] Stream tab resolved:",{streamId:d,streamsAppType:v,tabLabel:i,appObjectId:s==null?void 0:s.object_id}),J(d);const T=new F({admin_params:[],admin_settings:new Map(t).set("stream_id",R.fromObject({ptype:q.STRING,sval:d}))});_.push(e.jsx(le,{application:T,refreshApps:a,onAddedApp:u,embedded:!0,parentAppObjectId:s==null?void 0:s.object_id},"stream-".concat(d)))}if(g==="file"){const v=(($=t==null?void 0:t.get("file_key"))==null?void 0:$.sval)||"";_.push(e.jsx(be,{application:y,refreshApps:a,onAddedApp:u,parentAppObjectId:s==null?void 0:s.object_id},"file-".concat(v)))}g==="parallax"&&_.push(e.jsx(ce,{application:y,refreshApps:a,onAddedApp:u},"parallax-".concat(f)))}return _})();return e.jsxs("main",{className:"tabbed-app plus-app-tabs",id:"tabbed-app",children:[e.jsx(Q,{attached:"top",tabular:!0,children:M.map((o,r)=>
1e.jsxs(Q.Item,{name:o.label,active:r===f,onClick:()=>D(r),children:[o.icon&&e.jsx(S,{name:o.icon}),o.description&&o.description.trim()?e.jsx(de,{wide:"very",trigger:e.jsx("span",{children:o.label}),children:o.description}):e.jsx("span",{children:o.label})]},r))}),e.jsx(m,{attached:"bottom",className:"tabview",id:I,children:oe}),K&&K.trim()&&!U&&e.jsxs(m,{className:"tabbed-app-footer",style:{marginTop:"1rem",position:"relative",textAlign:"center"},children:[e.jsx(S,{name:"close",link:!0,style:{position:"absolute",top:"0.5rem",right:"0.5rem",opacity:.5,cursor:"pointer"},onClick:()=>P(!0),title:"Hide footer"}),e.jsx("div",{className:"markdown-content footer-content",dangerouslySetInnerHTML:{__html:te(K)}})]})]})}export{Vt 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.