PageSourceSearch

https://www.hitwit.ai/assets/DocSummary-BmmGr3Nq.js

js hitwit.ai collected 2026-10-01 15:16:10 UTC 12,095 bytes, 1 lines download raw bytes

1import{fo as ce,fp as pe,j as t,a as ue,m as de,x as he,u as me,f as _e,k as xe,R as j,b as fe,r as f,bk as P,gS as be,F as K,aI as ge,a3 as we,gi as q,B as r,aG as je,a1 as ye,d,aL as h,aB as G,Z as ke,bm as ve,aJ as Ce,b1 as De}from"./main-C-fwQcoT.js";import{m as b}from"./index-BimB3y0M.js";import{d as Pe}from"./ArrowOutward-H9LxhrE0.js";import{P as Ke}from"./Plot-Nd0-nc3N.js";import{H as ze}from"./Helmet-BxY3G0E1.js";import{u as Ie}from"./useQuery-D3RdAc2M.js";import{A as Re}from"./index-Dg6OK19A.js";import{S as J}from"./Skeleton-SaD8DtO8.js";import{T as z}from"./Tooltip-DHbbWoSY.js";import"./moment-BUbwdKDH.js";import"./index-oQSeW9Qi.js";import"./index-CntarGLk.js";import"./index-LvzHWtTh.js";import"./DragIndicator-uOYVTOHx.js";import"./AddCircleOutline-_72Ow5IP.js";import"./CloseRounded-CsM95v6L.js";import"./DeleteOutline-DRDlbX-y.js";import"./index-l5eeFzoM.js";import"./Dialog-DAlsJXBl.js";import"./DialogTitle-D3A1bFzV.js";import"./DialogContent-DTVO09wk.js";import"./DialogContentText-CFhUcySH.js";import"./DialogActions-BfT18xOq.js";import"./dnd.esm-CPqWU99Z.js";import"./tiny-invariant-CopsF_GD.js";import"./memoize-one.esm-BdPwpGay.js";import"./Edit-Bn4JwfeG.js";import"./redux-toolkit.esm-DzF0EK8f.js";import"./Chip-BfOgeZWd.js";import"./useSlotProps-BppxDYia.js";import"./TextField-BDv8TDl8.js";import"./index-DnugzyUQ.js";/* empty css                    */import"./index-Ct3Wyt73.js";import"./Close-Gb_WOZtX.js";import"./Share-Dv9EUqmG.js";import"./useAppBarHeight-CA7bHGF8.js";import"./_hitwit-source-asset_42-DHXf8Yaj.js";import"./PDFViewer-CX7eXu1h.js";import"./index-CdjhsG1T.js";import"./AzureMic-KpuVH9q1.js";import"./speechEngine-o36abI8V.js";import"./react-audio-voice-recorder.es-CPpae1X4.js";import"./index-As5_efZu.js";import"./useRetry-BYCJWWSU.js";import"./CacheImage-DAWQi598.js";import"./useLoadSource-BxwOnj9g.js";import"./OpenWith-XQ1dh9zs.js";import"./index-9PX89jxl.js";import"./styles-BSRhZKVN.js";import"./index-DXY7m0E8.js";import"./ContentCopy-Bk_VCmB7.js";import"./index-CTbsV7n8.js";import"./index-BuASt9GS.js";import"./index.dom-C3-224fz.js";import"./index-C3WPppvE.js";import"./katex-Cu_Erd72.js";import"./objectWithoutProperties-DrSx-kgC.js";import"./Link-CjBgfGI7.js";import"./DocViewer-CUzMH8JP.js";import"./index-DTrzyFE1.js";import"./Visibility-CvK2rdCe.js";import"./index-CRqeHcAI.js";import"./subtitleUtils-enCDK_TX.js";/* empty css                    */import"./ArrowBack-BoVFQDnV.js";import"./EditNote-B7gh5d9m.js";import"./index-a0dGGKrP.js";import"./uniqWith-DQNlX3yf.js";import"./DownloadOutlined-Bjp47KPj.js";import"./OpenInNewOutlined-D3DKAElP.js";import"./useMemberCopy-CkSEKhEk.js";import"./resolve-Db06kjKL.js";import"./ListItem-Dzig8Uhw.js";import"./listItemButtonClasses-CRRCSdLE.js";import"./ListItemIcon-k122D9jH.js";import"./ListItemText-BaGUPPWZ.js";import"./index-BufVcWCx.js";import"./index.es-ZgsSYpxC.js";import"./index-CERSL1ux.js";import"./index-njULAYOe.js";import"./Tabs-BnOd7cw3.js";import"./KeyboardArrowRight-hJhcOdyG.js";import"./ListItemButton-DP-wrpO6.js";import"./ListItemAvatar-DqqYDPKf.js";import"./Popper-4wijU_-a.js";var I={},Ue=ce;Object.defineProperty(I,"__esModule",{value:!0});var X=I.default=void 0,Ye=Ue(pe()),Z=t;X=I.default=(0,Ye.default)([(0,Z.jsx)("path",{d:"M20 6v14H6v2h14c1.1 0 2-.9 2-2V6z"},"0"),(0,Z.jsx)("path",{d:"M16 2H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2M9 16H4v-5h5zm7 0h-5v-5h5zm0-7H4V4h12z"},"1")],"BackupTable");const Ee=de(a=>({root:{paddingTop:80,paddingBottom:32},fitQuestion:{},fitAnswer:{},youtubeContainer:{display:"flex",flexDirection:"row",alignItems:"flex-start",[a.breakpoints.down("md")]:{display:"flex",flexDirection:"column",alignItems:"flex-start"}},followBtn:{width:"100%",maxWidth:200,textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden",textAlign:"left",display:"block"}})),_o=()=>{var F,L,$,A,M,T,B,H,W,N,O;const a=ue(),m=Ee(),y=he(),S=me(),c=_e(),R=Ie(),ee=xe(a==null?void 0:a.breakpoints.up("md")),[e,k]=j.useState(null);console.log("docSummary",e);const[p,te]=j.useState(null),{myYoutube:v,myYoutubeLoading:C}=fe(o=>o==null?void 0:o.app),[oe,U]=j.useState(!1),[Fe,ie]=j.useState(null),ne=()=>{ie(null)};f.useEffect(()=>{(!v||v.length==0)&&y(P({youtube_subscription_action:"get_youtube_channel_subscriptions",user_timezone:b.tz.guess()}))},[]);const se=o=>{y(P({youtube_subscription_action:"subscribe_youtube_channel",user_timezone:b.tz.guess(),youtube_channel_id:o}))},ae=o=>{y(P({youtube_subscription_action:"unsubscribe_youtube_channel",user_timezone:b.tz.guess(),youtube_channel_id:o}))},D=o=>ve(v,n=>(n==null?void 0:n.channel_id)===o),Y=f.useCallback((o,n)=>{var x,s,Q;o.stopPropagation();let i=((x=e==null?void 0:e.PK)==null?void 0:x.indexOf("youtubeDoc"))>-1?"Youtube Feed":"";(s=c==null?void 0:c.state)!=null&&s.previousPage&&(i=(Q=c==null?void 0:c.state)==null?void 0:Q.previousPage);const u=i==="Youtube Feed"?"create_backlog_topic_from_common_doc":"create_backlog_topic_from_user_doc",l=i==="Youtube Feed"?"create_current_topic_from_common_doc":"create_current_topic_from_user_doc";if(e!=null&&e.PK){let _="",g=e==null?void 0:e.PK.split("#");g=g[g.length-1],n==="create_current_topic"?_=l:n==="create_backlog_topic"&&(_=u),U(!0),be({doc_action:_,doc_id:g,user_timezone:b.tz.guess(),...i==="Youtube Feed"?{action:"create_topic_from_common_doc"}:{}}).then(w=>
1{var V;((V=w==null?void 0:w.data)==null?void 0:V.status)==="success"?K.success(_===l?"Successfully created topic from document":"Successfully added document to backlog"):K.error(_===l?"Unable to create topic from document":"Unable to add document to backlog")}).catch(w=>{K.error(_===l?"Unable to create topic from document":"Unable to add document to backlog")}).finally(()=>{U(!1),ne()})}},[e]),E=ge(e,a),re=async o=>{console.log("link in loadVideo Details : ",o);const n=Ce(o);console.log("docSummary",n),n&&De.get(`https://www.youtube.com/oembed?url=${encodeURIComponent(o.replace(">",""))}&format=json`).then(i=>{te(i.data)})};f.useEffect(()=>{e&&re((e==null?void 0:e.link)||`https://www.youtube.com/watch?v=${e==null?void 0:e.file_name.replace(/^youtube-/,"").replace(/\.txt$/,"")}`)},[e]);const le=o=>{window.open(`https://www.youtube.com/channel/${o}`,"_blank")};return f.useEffect(()=>{var o,n,i;if(!e){let u=R.get("p-key");if((o=window.location)!=null&&o.href.indexOf("p-key=user#")){let s=window.location.href.replace("#","%23");s=s==null?void 0:s.split("?")[1],u=new URLSearchParams(s).get("p-key")}const l=new URLSearchParams((n=window==null?void 0:window.location)==null?void 0:n.hash).get("s-key"),x=new URLSearchParams((i=window==null?void 0:window.location)==null?void 0:i.hash).get("type");x&&x!=="doc"&&u&&l?u&&l&&we.get(`?action=get_youtube_doc&doc_PK=${encodeURIComponent(`youtubeDoc#${u}`)}&doc_SK=${encodeURIComponent(l)}`).then(s=>{console.log(s),k(s==null?void 0:s.data)}).catch(s=>{console.log(s)}):q({doc_PK:u,doc_SK:l,action:"get_doc"}).then(s=>{k(s==null?void 0:s.data)})}},[e]),f.useEffect(()=>{var o,n;if((o=c==null?void 0:c.state)!=null&&o.summary){const i=(n=c==null?void 0:c.state)==null?void 0:n.summary;if(console.log("SUMMARYYYY",i),i&&(i!=null&&i.PK)&&(i!=null&&i.SK)){let u="get_doc";(i==null?void 0:i.PK.indexOf("youtube"))>-1&&(u="get_youtube_doc"),q({doc_PK:i==null?void 0:i.PK,doc_SK:i==null?void 0:i.SK,action:u}).then(l=>{k(l==null?void 0:l.data)})}}},[]),e?t.jsxs(t.Fragment,{children:[t.jsxs(ze,{children:[t.jsx("meta",{charSet:"utf-8"}),t.jsx("title",{children:"Doc Summary"})]}),t.jsxs(r,{className:m.root,children:[oe&&t.jsx(r,{display:"flex",alignItems:"center",justifyContent:"center",style:{position:"fixed",top:0,bottom:0,left:0,right:0,zIndex:1102,backgroundColor:"rgba(0, 0, 0, 0.5)"},children:t.jsx(je,{size:100,color:(A=($=a==null?void 0:a.palette)==null?void 0:$.primary)==null?void 0:A.main})}),t.jsxs(ye,{elevation:0,sx:{my:1,p:2,borderRadius:"12px"},children:[t.jsx(r,{display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"space-between",children:t.jsxs(r,{sx:{mb:2},width:"100%",display:"flex",flexDirection:ee?"row":"column",alignItems:"flex-start",justifyContent:"space-between",children:[p?t.jsx(r,{style:{flexGrow:1,marginBottom:"25px"},children:t.jsxs(r,{sx:{mt:0},className:m.youtubeContainer,children:[t.jsx(r,{sx:{mt:1,maxWidth:"200px",maxHeight:"113px",mr:3},dangerouslySetInnerHTML:{__html:p==null?void 0:p.html}}
1),t.jsxs(r,{sx:{mt:1},children:[t.jsx(d,{onClick:()=>{var o,n;(o=e==null?void 0:e.channel_details)!=null&&o.channel_id&&le((n=e==null?void 0:e.channel_details)==null?void 0:n.channel_id)},sx:{mb:1,cursor:"pointer"},variant:"subtitle2",children:p==null?void 0:p.author_name}),t.jsx(d,{sx:{fontWeight:"bold",mr:3},variant:"h4",children:p==null?void 0:p.title}),t.jsx(d,{variant:"body2",style:{color:"#7E7E7E"},children:b.utc(e==null?void 0:e.creation_time).local().format("MMM DD, YYYY hh:mm A")})]})]})}):t.jsx(r,{style:{flexGrow:1,marginBottom:"8px"},children:t.jsxs(r,{display:"flex",flexDirection:"row",alignItems:"flex-start",sx:{my:1},children:[t.jsx(r,{sx:{mr:1},children:E.icon}),t.jsx(d,{sx:{opacity:.8,textWrap:"wrap !important"},variant:"body2",children:h(e,"channel_details?.channel_title",h(E,"title",""))})]})}),R.get("p-key")&&t.jsx(G,{onClick:()=>S("/summary"),sx:{mr:1,whiteSpace:"nowrap",backgroundColor:`${(M=a==null?void 0:a.palette)==null?void 0:M.primary.main} !important`,color:"#FFF",textTransform:"none"},children:"Explore more"}),C!=="get_youtube_channel_subscriptions"&&((T=e==null?void 0:e.channel_details)==null?void 0:T.channel_id)&&h(e,"channel_details.channel_id","")!=="Unknown"&&t.jsx(z,{title:"Whenever this channel post new content, you will get a visual summary in your inbox",children:t.jsx("span",{children:t.jsx(G,{variant:"contained",color:"primary",className:m.followBtn,sx:{...D((B=e==null?void 0:e.channel_details)==null?void 0:B.channel_id)?{backgroundColor:"#272727 !important",color:"#FFF"}:{}},size:"small",loading:C===`subscribe_youtube_channel-${(H=e==null?void 0:e.channel_details)==null?void 0:H.channel_id}`||C===`unsubscribe_youtube_channel-${(W=e==null?void 0:e.channel_details)==null?void 0:W.channel_id}`,onClick:()=>{var o,n,i;D((o=e==null?void 0:e.channel_details)==null?void 0:o.channel_id)?ae((n=e==null?void 0:e.channel_details)==null?void 0:n.channel_id):se((i=e==null?void 0:e.channel_details)==null?void 0:i.channel_id)},children:h(e,"channel_details.channel_id","")&&h(e,"channel_details.channel_id","")!=="Unknown"&&D((N=e==null?void 0:e.channel_details)==null?void 0:N.channel_id)?`Unfollow ${h(e,"channel_details.channel_title","")}`:`Follow ${h(e,"channel_details.channel_title","")}`})})})]})}),t.jsx(d,{variant:"subtitle1",className:m.fitQuestion,children:e==null?void 0:e.title}),t.jsx(d,{variant:"body1",sx:{my:1},className:m.fitAnswer,dangerouslySetInnerHTML:{__html:((e==null?void 0:e.summary)||"").replace(/(\n)/g,"<br/>")}}),t.jsxs(ke,{sx:{my:2},direction:"row",children:[t.jsx(z,{title:"Learn this now",children:t.jsx(d,{onClick:o=>Y(o,"create_current_topic"),color:"primary",sx:{fontWeight:600,ml:1},style:{cursor:"pointer",fontSize:12,textTransform:"uppercase"},children:t.jsx(Pe,{})})}),t.jsx(z,{title:"Add to backlog",children:t.jsx(d,{onClick:o=>Y(o,"create_backlog_topic"),color:"primary",sx:{pl:2,fontWeight:600,ml:1},style:{cursor:"pointer",fontSize:12,textTransform:"uppercase"},children:t.jsx(X,{})})})]}),e&&t.jsx(Re,{docId:(O=e==null?void 0:e.PK)==null?void 0:O.split("#Doc#")[1],title:e==null?void 0:e.title})]}),t.jsx(r,{children:(e==null?void 0:e.charts)&&t.jsx(Ke,{itemKey:{pk:e==null?void 0:e.PK,sk:e==null?void 0:e.SK},charts:e==null?void 0:e.charts})})]})]}):t.jsxs(r,{className:m.root,children:[t.jsx(r,{children:t.jsx(J,{sx:{borderRadius:2,bgcolor:((F=a==null?void 0:a.palette)==null?void 0:F.type)==="light"?"grey.100":"grey.800"},animation:"pulse",variant:"rectangular",width:"100%",height:400})}),t.jsx(r,{sx:{mt:1},children:t.jsx(J,{sx:{borderRadius:2,bgcolor:((L=a==null?void 0:a.palette)==null?void 0:L.type)==="light"?"grey.100":"grey.800"},animation:"pulse",variant:"rectangular",width:"100%",height:600})})]})};export{_o 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.