@e-llm-studio/instant-learning 0.0.108 → 0.0.110
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/features/IL-OTJ/ILOTJ.js +1 -1
- package/dist/cjs/features/IL-OTJ/_components/ChatComponent.js +1 -1
- package/dist/cjs/features/IL-OTJ/_components/CitationLink.js +1 -1
- package/dist/cjs/features/IL-OTJ/_components/CognitiveDecisioningCard.js +1 -1
- package/dist/cjs/features/IL-OTJ/_components/ILPopup.js +1 -1
- package/dist/cjs/features/IL-OTJ/_components/ILPopup.styles.js +1 -1
- package/dist/cjs/features/IL-OTJ/_components/InputDataReasoningCard.js +1 -1
- package/dist/cjs/features/IL-OTJ/_components/MessageRendering/MarkdownElements.js +1 -1
- package/dist/cjs/features/IL-OTJ/_components/MessageRendering/MessageRendering.js +1 -1
- package/dist/cjs/features/IL-OTJ/_components/MinimizedThinkingSteps.js +1 -1
- package/dist/cjs/features/IL-OTJ/_components/TooltipComponent.js +2 -0
- package/dist/cjs/features/IL-OTJ/_components/TooltipComponent.js.map +1 -0
- package/dist/cjs/features/IL-OTJ/_components/atoms/Textarea/Textarea.js +1 -1
- package/dist/cjs/features/IL-OTJ/_components/molecules/Condition/ConditionList.js +1 -1
- package/dist/cjs/features/IL-OTJ/_components/organisms/ConditionSection/ConditionSection.js +1 -1
- package/dist/cjs/features/IL-OTJ/_components/organisms/ScopeSection/ScopeSection.js +1 -1
- package/dist/cjs/features/IL-OTJ/_components/templates/TrafficManager/CreateRule.js +1 -1
- package/dist/cjs/node_modules/@e-llm-studio/citation/dist/features/CitationRenderer/MarkdownRenderer.js +1 -1
- package/dist/cjs/node_modules/@e-llm-studio/citation/dist/features/CitationRenderer/MarkdownRenderer.js.map +1 -1
- package/dist/cjs/node_modules/lucide-react/dist/esm/icons/chevron-right.js +1 -1
- package/dist/cjs/node_modules/lucide-react/dist/esm/icons/chevron-right.js.map +1 -1
- package/dist/features/IL-OTJ/ILOTJ.js +1 -1
- package/dist/features/IL-OTJ/_components/ChatComponent.js +1 -1
- package/dist/features/IL-OTJ/_components/CitationLink.js +1 -1
- package/dist/features/IL-OTJ/_components/CognitiveDecisioningCard.js +1 -1
- package/dist/features/IL-OTJ/_components/ILPopup.js +1 -1
- package/dist/features/IL-OTJ/_components/ILPopup.styles.js +1 -1
- package/dist/features/IL-OTJ/_components/InputDataReasoningCard.js +1 -1
- package/dist/features/IL-OTJ/_components/MessageRendering/MarkdownElements.js +1 -1
- package/dist/features/IL-OTJ/_components/MessageRendering/MessageRendering.js +1 -1
- package/dist/features/IL-OTJ/_components/MinimizedThinkingSteps.js +1 -1
- package/dist/features/IL-OTJ/_components/TooltipComponent.js +2 -0
- package/dist/features/IL-OTJ/_components/TooltipComponent.js.map +1 -0
- package/dist/features/IL-OTJ/_components/atoms/Textarea/Textarea.js +1 -1
- package/dist/features/IL-OTJ/_components/molecules/Condition/ConditionList.js +1 -1
- package/dist/features/IL-OTJ/_components/organisms/ConditionSection/ConditionSection.js +1 -1
- package/dist/features/IL-OTJ/_components/organisms/ScopeSection/ScopeSection.js +1 -1
- package/dist/features/IL-OTJ/_components/templates/TrafficManager/CreateRule.js +1 -1
- package/dist/node_modules/@e-llm-studio/citation/dist/features/CitationRenderer/MarkdownRenderer.js +1 -1
- package/dist/node_modules/@e-llm-studio/citation/dist/features/CitationRenderer/MarkdownRenderer.js.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/chevron-right.js +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/chevron-right.js.map +1 -1
- package/dist/types/src/features/IL-OTJ/ILOTJ.d.ts +1 -0
- package/dist/types/src/features/IL-OTJ/ILOTJ.d.ts.map +1 -1
- package/dist/types/src/features/IL-OTJ/ILOTJTest.d.ts.map +1 -1
- package/dist/types/src/features/IL-OTJ/_components/ChatComponent.d.ts.map +1 -1
- package/dist/types/src/features/IL-OTJ/_components/CitationLink.d.ts +1 -12
- package/dist/types/src/features/IL-OTJ/_components/CitationLink.d.ts.map +1 -1
- package/dist/types/src/features/IL-OTJ/_components/CognitiveDecisioningCard.d.ts.map +1 -1
- package/dist/types/src/features/IL-OTJ/_components/ILPopup.d.ts +3 -1
- package/dist/types/src/features/IL-OTJ/_components/ILPopup.d.ts.map +1 -1
- package/dist/types/src/features/IL-OTJ/_components/ILPopup.styles.d.ts +1 -1
- package/dist/types/src/features/IL-OTJ/_components/ILPopup.styles.d.ts.map +1 -1
- package/dist/types/src/features/IL-OTJ/_components/InputDataReasoningCard.d.ts.map +1 -1
- package/dist/types/src/features/IL-OTJ/_components/MessageRendering/MarkdownElements.d.ts.map +1 -1
- package/dist/types/src/features/IL-OTJ/_components/MessageRendering/MessageRendering.d.ts.map +1 -1
- package/dist/types/src/features/IL-OTJ/_components/MinimizedThinkingSteps.d.ts.map +1 -1
- package/dist/types/src/features/IL-OTJ/_components/TooltipComponent.d.ts +8 -0
- package/dist/types/src/features/IL-OTJ/_components/TooltipComponent.d.ts.map +1 -0
- package/dist/types/src/features/IL-OTJ/_components/molecules/Condition/ConditionList.d.ts +3 -4
- package/dist/types/src/features/IL-OTJ/_components/molecules/Condition/ConditionList.d.ts.map +1 -1
- package/dist/types/src/features/IL-OTJ/_components/organisms/ConditionSection/ConditionSection.d.ts +1 -1
- package/dist/types/src/features/IL-OTJ/_components/organisms/ConditionSection/ConditionSection.d.ts.map +1 -1
- package/dist/types/src/features/IL-OTJ/_components/organisms/ScopeSection/ScopeSection.d.ts.map +1 -1
- package/dist/types/src/features/IL-OTJ/_components/templates/TrafficManager/CreateRule.d.ts.map +1 -1
- package/package.json +2 -2
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__assign as e,__rest as n}from"../../../node_modules/tslib/tslib.es6.mjs.js";import{jsx as t,jsxs as i}from"react/jsx-runtime";import{useMemo as r,useState as o,useCallback as l}from"react";import{ReactMarkdown as a}from"../../../node_modules/react-markdown/lib/react-markdown.js";import d from"../../../node_modules/rehype-raw/lib/index.js";import c from"../../../node_modules/remark-gfm/index.js";import s from"./CitationLink.js";var u=function(){return t("svg",e({width:"12",height:"14",viewBox:"0 0 14 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},{children:t("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M10.2059 0.857334C8.62849 -0.0137806 6.77225 -0.231241 5.03618 0.251692C3.30011 0.734626 1.8228 1.8794 0.921793 3.43996C0.0207848 5.00052 -0.232 6.85229 0.217771 8.59724C0.667543 10.3422 1.78397 11.841 3.32708 12.7716V15.2653C3.32708 15.3591 3.34555 15.452 3.38145 15.5387C3.41735 15.6253 3.46996 15.7041 3.53629 15.7704C3.60261 15.8367 3.68136 15.8894 3.76802 15.9252C3.85468 15.9611 3.94756 15.9796 4.04136 15.9796C4.13516 15.9796 4.22805 15.9611 4.31471 15.9252C4.40137 15.8894 4.48011 15.8367 4.54644 15.7704C4.61277 15.7041 4.66538 15.6253 4.70128 15.5387C4.73717 15.452 4.75565 15.3591 4.75565 15.2653V12.351C4.75517 12.2196 4.71871 12.0907 4.65021 11.9785C4.58171 11.8663 4.48379 11.775 4.36708 11.7145C3.50392 11.2743 2.77367 10.612 2.25152 9.79584C1.72938 8.97965 1.4342 8.03905 1.39637 7.07087C1.35855 6.10269 1.57946 5.14193 2.03634 4.28749C2.49323 3.43306 3.16958 2.71584 3.99577 2.20967C4.82196 1.7035 5.76813 1.42667 6.73686 1.40769C7.70559 1.38871 8.66188 1.62826 9.50726 2.10168C10.3526 2.5751 11.0566 3.26528 11.5466 4.10116C12.0366 4.93704 12.2949 5.88842 12.2951 6.85733V11.3419C12.2951 11.4498 12.2522 11.5533 12.1759 11.6296C12.0996 11.7059 11.9961 11.7488 11.8882 11.7488H9.64593C9.45649 11.7488 9.27481 11.824 9.14086 11.958C9.0069 12.0919 8.93165 12.2736 8.93165 12.463V15.2653C8.93165 15.4548 9.0069 15.6365 9.14086 15.7704C9.27481 15.9044 9.45649 15.9796 9.64593 15.9796C9.83537 15.9796 10.0171 15.9044 10.151 15.7704C10.285 15.6365 10.3602 15.4548 10.3602 15.2653V13.1773H11.8882C12.1293 13.1773 12.3679 13.1299 12.5906 13.0376C12.8133 12.9454 13.0156 12.8102 13.1861 12.6398C13.3565 12.4693 13.4917 12.267 13.5839 12.0443C13.6762 11.8216 13.7236 11.5829 13.7236 11.3419V6.85848C13.7234 5.63584 13.3974 4.43536 12.7791 3.38058C12.1608 2.3258 11.2726 1.45484 10.2059 0.857334ZM4.98651 3.51676C5.78545 3.05623 6.71898 2.8859 7.62909 3.0346C8.5392 3.1833 9.36997 3.64189 9.98079 4.33276C10.3922 4.7979 10.2779 5.46648 9.85508 5.84705C8.61165 6.97048 6.55108 8.42648 4.50308 8.96933C3.98193 9.10648 3.41051 8.85505 3.21965 8.31791C2.90724 7.43742 2.91289 6.47535 3.23562 5.5986C3.55835 4.72184 4.1778 3.98457 4.98651 3.51676Z",fill:"#6D28D9"})}))},p=function(){return t("svg",e({width:"12",height:"12",viewBox:"0 0 24 24",fill:"currentColor",style:{marginRight:"4px"}},{children:t("path",{d:"M12 2L9 9l-7 3 7 3 3 7 3-7 7-3-7-3z"})}))},f=function(){return t("div",e({style:{display:"flex",height:"32px",width:"32px",alignItems:"center",justifyContent:"center",borderRadius:"50%",backgroundColor:"#f5f5ff",color:"#6b27d9",flexShrink:0,border:"1.5px solid #f5f5ff"}},{children:i("svg",e({width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},{children:[t("path",{d:"M9 18h6"}),t("path",{d:"M10 22h4"}),t("path",{d:"M12 2a7 7 0 0 1 7 7c0 2.38-1.19 4.55-3 6H8a7 7 0 0 1-3-6 7 7 0 0 1 7-7z"})]}))}))},h=function(n){var r=n.width,o=void 0===r?18:r,l=n.height;return t("div",e({style:{display:"flex",height:"32px",width:"32px",alignItems:"center",justifyContent:"center",borderRadius:"50%",backgroundColor:"#f5f5ff",flexShrink:0,border:"1.5px solid #f5f5ff"}},{children:i("svg",e({width:o,height:void 0===l?18:l,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},{children:[t("path",{d:"M4.92363 2.64844H1.93457V5.34844M1.93457 10.7484V12.5484M8.90904 2.64844H12.9601M16.9455 2.64844H19.9346V5.34844M4.92363 20.6484H1.93457V17.9484",stroke:"#6b27d9",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round"}),t("path",{d:"M18.2707 19.1183C18.7024 18.6924 19.0455 18.1852 19.2802 17.6261C19.5149 17.0669 19.6366 16.4669 19.6383 15.8605C19.6399 15.2541 19.5215 14.6533 19.2898 14.0929C19.0582 13.5325 18.7179 13.0235 18.2885 12.5953C17.8592 12.167 17.3493 11.828 16.7883 11.5978C16.2273 11.3676 15.6262 11.2507 15.0198 11.254C14.4134 11.2572 13.8137 11.3804 13.2551 11.6166C12.6966 11.8528 12.1903 12.1972 11.7656 12.6299C10.9166 13.4949 10.4438 14.6604 10.4503 15.8724C10.4567 17.0844 10.9418 18.2447 11.8 19.1006C12.6581 19.9566 13.8197 20.4387 15.0317 20.442C16.2437 20.4453 17.408 19.9695 18.2707 19.1183ZM18.2707 19.1183L21.1436 21.9987",stroke:"#6b27d9",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round"})]}))}))},g=function(n){var r=n.isOpen,o=n.onClick;return i("button",e({onClick:o,style:{display:"inline-flex",alignItems:"center",gap:"8px",padding:"3px 5px",borderRadius:"4px",border:"1.5px solid ".concat(r?"#7C3AED":"#ded6ff"),backgroundColor:r?"#F5F3FF":"#FFFFFF",cursor:"pointer",transition:"all 0.2s ease",outline:"none"}},{children:[t(u,{}),t("svg",e({width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"#4B5563",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",style:{transform:r?"rotate(180deg)":"rotate(0deg)",transition:"transform 0.2s ease"}},{children:t("path",{d:"M6 9l6 6 6-6"})}))]}))},m=function(n){var i=n.isOpen,r=n.color;return t("svg",e({width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",style:{color:void 0===r?"#9CA3AF":r,transform:i?"rotate(180deg)":"rotate(0deg)",transition:"transform 0.2s ease",marginLeft:"4px"}},{children:t("path",{d:"M6 9l6 6 6-6"})}))},x=function(x){var C=x.citation,v=x.citations,y=x.setChatSize,k=x.isOpen,b=void 0!==k&&k,w=x.onToggle,F=function(e,n){var t,i="";if(!(i="string"==typeof n?n:(null===(t=null==n?void 0:n.customMetaData)||void 0===t?void 0:t.content)?n.customMetaData.content:String(n)))return null;var r=new RegExp("<".concat(e,"[^>]*>([\\s\\S]*?)<\\/").concat(e,">"),"i"),o=i.match(r);return o?(console.log("Extracted",e,":",o[1]),o[1].replace(/\\n/g,"\n")):null},M=r(function(){return F("reason",C)},[C]),S=r(function(){return F("gap",C)},[C]),D=r(function(){return F("relevance_score",C)},[C]),L=o(!1);L[0],L[1];var _=o(!0),j=_[0],B=_[1],W=o(!0),I=W[0],z=W[1],R={display:"flex",width:"100%",alignItems:"flex-start",justifyContent:"space-between",background:"none",border:"none",cursor:"pointer",padding:"10px 12px",textAlign:"left"},V={marginTop:"2px",paddingLeft:"40px",paddingRight:"12px",paddingBottom:"12px",fontSize:"12px",lineHeight:"1.5",color:"#4B5563"},H=function(e){return e?e.replace(/(\[[^\]]+\]\()([^)]+)(\))/g,function(e,n,t,i){var r=t.replace(/\s/g,"%20");return"".concat(n).concat(r).concat(i)}):""},A=l(function(e){return v&&v.find(function(n){return n.customMetaData.citation_number&&"Cognitive Decisioning"!==n.customMetaData.citation_title&&String(n.customMetaData.citation_number)===String(e)})||null},[v]),T=r(function(){return{img:function(i){i.node;var r=n(i,["node"]);return t("img",e({},r,{style:{height:"100%",width:"100%",objectFit:"contain"},alt:(null==r?void 0:r.alt)||"",className:"w-full sm:max-w-lg md:max-w-2xl lg:max-w-4xl mx-auto"}))},p:function(i){i.node;var r=n(i,["node"]);return t("p",e({},r,{style:{margin:0}},{children:null==r?void 0:r.children}))},code:function(i){i.node;var r=n(i,["node"]);return t("span",e({},r,{style:{maxWidth:"100%",wordWrap:"break-word",overflowWrap:"break-word",wordBreak:"break-word",whiteSpace:"normal",overflow:"hidden",display:"inline-flex",fontSize:"1rem",lineHeight:"1.625rem"}},{children:null==r?void 0:r.children}))},ol:function(i){i.node;var r=n(i,["node"]);return t("ol",e({},r,{style:{display:"flex",flexDirection:"column",gap:"1rem",listStyle:"decimal",paddingLeft:"2.5rem"}},{children:null==r?void 0:r.children}))},ul:function(i){i.node;var r=n(i,["node"]);return t("ol",e({},r,{style:{paddingLeft:"1.25rem",listStyleType:"decimal"}}))},li:function(i){i.node;var r=n(i,["node"]);return t("li",e({},r,{style:{marginBottom:"4px",listStyle:"decimal"}},{children:r.children}))},a:function(i){var r;i.node;var o=i.href,l=i.children,a=n(i,["node","href","children"]);if(!o)return t("a",e({},a,{children:l}));var d=o.match(/citationNumber=([^&]+)/),c=d?d[1]:null;if(c){var u=A(c);if(u){var p=(null===(r=u.customMetaData)||void 0===r?void 0:r.citation_type)||"",f=String(p).trim().toLowerCase(),h="rule_book"===f||"advertiser_names"===f,g={headerTitle:u.customMetaData.citation_title,headerBadge:u.customMetaData.citation_relevance_score,footerText:"Referenced from ".concat(u.customMetaData.citation_reference),rightSidebarItems:h?[]:[{label:"Category",value:u.customMetaData.citation_category||""},{label:"Code Name",value:u.customMetaData.citation_source||""}]};return t(s,{citation:u,linkTitle:l,cardData:g,fontSize:12})}}return t("a",e({href:o,target:"_blank",rel:"noopener noreferrer",className:"md-link inline-flex items-center gap-1 text-purple-700 hover:underline"},a,{children:l}))}}},[]),N=r(function(){return[d]},[]),O=r(function(){return[c]},[]);return i("div",e({style:{display:"contents"}},{children:[t(g,{isOpen:b,onClick:function(){w?w():b?null==y||y(40):null==y||y(50)}}),b&&i("div",e({style:{display:"block",width:"100%",marginTop:"4px",marginBottom:"12px",overflow:"hidden",borderRadius:"8px",border:"1.5px solid #cacdfa",backgroundColor:"#FFFFFF",boxShadow:"0 2px 4px -1px rgba(0, 0, 0, 0.05)",fontFamily:'"Plus Jakarta Sans", sans-serif',animation:"fadeIn 0.2s ease-out",maxWidth:"100%"}},{children:[i("div",e({style:{display:"flex",alignItems:"center",justifyContent:"space-between",borderBottom:"1.5px solid #d4dbff",backgroundColor:"#f4f2ff",padding:"8px 12px",gap:"8px"}},{children:[i("div",e({style:{display:"flex",alignItems:"center",gap:"8px"}},{children:[t(u,{}),t("span",e({style:{fontSize:"13px",fontWeight:500,color:"#1F2937"}},{children:"Cognitive Decisioning AI"}))]})),D&&i("div",e({style:{display:"flex",alignItems:"center",borderRadius:"9999px",border:"1px solid #d4dbff",backgroundColor:"#FFFFFF",padding:"2px 8px",fontSize:"11px",fontWeight:600,color:"#7C3AED"}},{children:[t(p,{}),"AI Relevance: ",D,"%"]}))]})),i("div",e({style:{borderBottom:"1.5px solid #e9ebf0"}},{children:[i("button",e({onClick:function(){return B(!j)},style:R},{children:[i("div",e({style:{display:"flex",gap:"8px",alignItems:"center"}},{children:[t(f,{}),i("div",{children:[t("h4",e({style:{fontSize:"12px",fontWeight:500,color:"#111827",margin:0}},{children:"Reasoning"})),t("p",e({style:{fontSize:"10px",color:"#6B7280",margin:"0"}},{children:"Why this was picked"}))]})]})),t(m,{isOpen:j})]})),j&&t("div",e({style:V},{children:t(a,e({components:T,rehypePlugins:N,remarkPlugins:O},{children:H(M||"No reasoning provided.")}))}))]})),i("div",{children:[i("button",e({onClick:function(){return z(!I)},style:R},{children:[i("div",e({style:{display:"flex",gap:"8px",alignItems:"center"}},{children:[t(h,{}),i("div",{children:[t("h4",e({style:{fontSize:"12px",fontWeight:500,color:"#111827",margin:0}},{children:"Gap"})),t("p",e({style:{fontSize:"10px",color:"#6B7280",margin:"0"}},{children:"What's missing or unclear"}))]})]})),t(m,{isOpen:I})]})),I&&t("div",e({style:V},{children:t(a,e({components:T,rehypePlugins:N,remarkPlugins:O},{children:H(S||"No gaps identified.")}))}))]})]}))]}))};export{x as CognitiveDecisioningCard,u as HumanWithBrainIcon};
|
|
1
|
+
import{__assign as e,__rest as n}from"../../../node_modules/tslib/tslib.es6.mjs.js";import{jsx as i,jsxs as t}from"react/jsx-runtime";import{useMemo as r,useState as o,useCallback as l}from"react";import{ReactMarkdown as d}from"../../../node_modules/react-markdown/lib/react-markdown.js";import a from"../../../node_modules/rehype-raw/lib/index.js";import s from"../../../node_modules/remark-gfm/index.js";import c from"./CitationLink.js";var p=function(){return i("svg",e({width:"13",height:"15",viewBox:"0 0 14 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},{children:i("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M10.2059 0.857334C8.62849 -0.0137806 6.77225 -0.231241 5.03618 0.251692C3.30011 0.734626 1.8228 1.8794 0.921793 3.43996C0.0207848 5.00052 -0.232 6.85229 0.217771 8.59724C0.667543 10.3422 1.78397 11.841 3.32708 12.7716V15.2653C3.32708 15.3591 3.34555 15.452 3.38145 15.5387C3.41735 15.6253 3.46996 15.7041 3.53629 15.7704C3.60261 15.8367 3.68136 15.8894 3.76802 15.9252C3.85468 15.9611 3.94756 15.9796 4.04136 15.9796C4.13516 15.9796 4.22805 15.9611 4.31471 15.9252C4.40137 15.8894 4.48011 15.8367 4.54644 15.7704C4.61277 15.7041 4.66538 15.6253 4.70128 15.5387C4.73717 15.452 4.75565 15.3591 4.75565 15.2653V12.351C4.75517 12.2196 4.71871 12.0907 4.65021 11.9785C4.58171 11.8663 4.48379 11.775 4.36708 11.7145C3.50392 11.2743 2.77367 10.612 2.25152 9.79584C1.72938 8.97965 1.4342 8.03905 1.39637 7.07087C1.35855 6.10269 1.57946 5.14193 2.03634 4.28749C2.49323 3.43306 3.16958 2.71584 3.99577 2.20967C4.82196 1.7035 5.76813 1.42667 6.73686 1.40769C7.70559 1.38871 8.66188 1.62826 9.50726 2.10168C10.3526 2.5751 11.0566 3.26528 11.5466 4.10116C12.0366 4.93704 12.2949 5.88842 12.2951 6.85733V11.3419C12.2951 11.4498 12.2522 11.5533 12.1759 11.6296C12.0996 11.7059 11.9961 11.7488 11.8882 11.7488H9.64593C9.45649 11.7488 9.27481 11.824 9.14086 11.958C9.0069 12.0919 8.93165 12.2736 8.93165 12.463V15.2653C8.93165 15.4548 9.0069 15.6365 9.14086 15.7704C9.27481 15.9044 9.45649 15.9796 9.64593 15.9796C9.83537 15.9796 10.0171 15.9044 10.151 15.7704C10.285 15.6365 10.3602 15.4548 10.3602 15.2653V13.1773H11.8882C12.1293 13.1773 12.3679 13.1299 12.5906 13.0376C12.8133 12.9454 13.0156 12.8102 13.1861 12.6398C13.3565 12.4693 13.4917 12.267 13.5839 12.0443C13.6762 11.8216 13.7236 11.5829 13.7236 11.3419V6.85848C13.7234 5.63584 13.3974 4.43536 12.7791 3.38058C12.1608 2.3258 11.2726 1.45484 10.2059 0.857334ZM4.98651 3.51676C5.78545 3.05623 6.71898 2.8859 7.62909 3.0346C8.5392 3.1833 9.36997 3.64189 9.98079 4.33276C10.3922 4.7979 10.2779 5.46648 9.85508 5.84705C8.61165 6.97048 6.55108 8.42648 4.50308 8.96933C3.98193 9.10648 3.41051 8.85505 3.21965 8.31791C2.90724 7.43742 2.91289 6.47535 3.23562 5.5986C3.55835 4.72184 4.1778 3.98457 4.98651 3.51676Z",fill:"#6D28D9"})}))},u=function(){return i("svg",e({width:"12",height:"12",viewBox:"0 0 24 24",fill:"currentColor",style:{marginRight:"4px"}},{children:i("path",{d:"M12 2L9 9l-7 3 7 3 3 7 3-7 7-3-7-3z"})}))},f=function(){return i("div",e({style:{display:"flex",height:"32px",width:"32px",alignItems:"center",justifyContent:"center",borderRadius:"50%",backgroundColor:"#f5f5ff",color:"#6b27d9",flexShrink:0,border:"1.5px solid #f5f5ff"}},{children:t("svg",e({width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},{children:[i("path",{d:"M9 18h6"}),i("path",{d:"M10 22h4"}),i("path",{d:"M12 2a7 7 0 0 1 7 7c0 2.38-1.19 4.55-3 6H8a7 7 0 0 1-3-6 7 7 0 0 1 7-7z"})]}))}))},h=function(n){var r=n.width,o=void 0===r?18:r,l=n.height;return i("div",e({style:{display:"flex",height:"32px",width:"32px",alignItems:"center",justifyContent:"center",borderRadius:"50%",backgroundColor:"#f5f5ff",flexShrink:0,border:"1.5px solid #f5f5ff"}},{children:t("svg",e({width:o,height:void 0===l?18:l,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},{children:[i("path",{d:"M4.92363 2.64844H1.93457V5.34844M1.93457 10.7484V12.5484M8.90904 2.64844H12.9601M16.9455 2.64844H19.9346V5.34844M4.92363 20.6484H1.93457V17.9484",stroke:"#6b27d9",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round"}),i("path",{d:"M18.2707 19.1183C18.7024 18.6924 19.0455 18.1852 19.2802 17.6261C19.5149 17.0669 19.6366 16.4669 19.6383 15.8605C19.6399 15.2541 19.5215 14.6533 19.2898 14.0929C19.0582 13.5325 18.7179 13.0235 18.2885 12.5953C17.8592 12.167 17.3493 11.828 16.7883 11.5978C16.2273 11.3676 15.6262 11.2507 15.0198 11.254C14.4134 11.2572 13.8137 11.3804 13.2551 11.6166C12.6966 11.8528 12.1903 12.1972 11.7656 12.6299C10.9166 13.4949 10.4438 14.6604 10.4503 15.8724C10.4567 17.0844 10.9418 18.2447 11.8 19.1006C12.6581 19.9566 13.8197 20.4387 15.0317 20.442C16.2437 20.4453 17.408 19.9695 18.2707 19.1183ZM18.2707 19.1183L21.1436 21.9987",stroke:"#6b27d9",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round"})]}))}))},g=function(n){var r=n.isOpen,o=n.onClick;return t("button",e({onClick:o,style:{display:"inline-flex",alignItems:"center",gap:"8px",padding:"3px 5px",borderRadius:"4px",border:"1.5px solid ".concat(r?"#7C3AED":"#ded6ff"),backgroundColor:r?"#F5F3FF":"#FFFFFF",cursor:"pointer",transition:"all 0.2s ease",outline:"none"}},{children:[i(p,{}),i("svg",e({width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"#4B5563",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",style:{transform:r?"rotate(180deg)":"rotate(0deg)",transition:"transform 0.2s ease"}},{children:i("path",{d:"M6 9l6 6 6-6"})}))]}))},m=function(n){var t=n.isOpen,r=n.color;return i("svg",e({width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",style:{color:void 0===r?"#9CA3AF":r,transform:t?"rotate(180deg)":"rotate(0deg)",transition:"transform 0.2s ease",marginLeft:"4px"}},{children:i("path",{d:"M6 9l6 6 6-6"})}))},x=function(x){var C=x.citation,v=x.citations,y=x.setChatSize,k=x.isOpen,w=void 0!==k&&k,b=x.onToggle,F=function(e,n){var i,t="";if(!(t="string"==typeof n?n:(null===(i=null==n?void 0:n.customMetaData)||void 0===i?void 0:i.content)?n.customMetaData.content:String(n)))return null;var r=new RegExp("<".concat(e,"[^>]*>([\\s\\S]*?)<\\/").concat(e,">"),"i"),o=t.match(r);return o?(console.log("Extracted",e,":",o[1]),o[1].replace(/\\n/g,"\n")):null},S=r(function(){return F("reason",C)},[C]),M=r(function(){return F("gap",C)},[C]),j=r(function(){return F("relevance_score",C)},[C]),L=o(!1);L[0],L[1];var B=o(!0),W=B[0],z=B[1],D=o(!0),I=D[0],R=D[1],V={display:"flex",width:"100%",alignItems:"flex-start",justifyContent:"space-between",background:"none",border:"none",cursor:"pointer",padding:"10px 12px",textAlign:"left"},H={marginTop:"2px",paddingLeft:"40px",paddingRight:"12px",paddingBottom:"12px",fontSize:"14px",lineHeight:"1.5",color:"#4B5563"},_=function(e){return e?e.replace(/(\[[^\]]+\]\()([^)]+)(\))/g,function(e,n,i,t){var r=i.replace(/\s/g,"%20");return"".concat(n).concat(r).concat(t)}):""},A=l(function(e){return v&&v.find(function(n){return n.customMetaData.citation_number&&"Cognitive Decisioning"!==n.customMetaData.citation_title&&String(n.customMetaData.citation_number)===String(e)})||null},[v]),O=r(function(){return{img:function(t){t.node;var r=n(t,["node"]);return i("img",e({},r,{style:{height:"100%",width:"100%",objectFit:"contain"},alt:(null==r?void 0:r.alt)||"",className:"w-full sm:max-w-lg md:max-w-2xl lg:max-w-4xl mx-auto"}))},p:function(t){t.node;var r=n(t,["node"]);return i("p",e({},r,{style:{margin:0}},{children:null==r?void 0:r.children}))},code:function(t){t.node;var r=n(t,["node"]);return i("span",e({},r,{style:{maxWidth:"100%",wordWrap:"break-word",overflowWrap:"break-word",wordBreak:"break-word",whiteSpace:"normal",overflow:"hidden",display:"inline-flex",fontSize:"1rem",lineHeight:"1.625rem"}},{children:null==r?void 0:r.children}))},ol:function(t){t.node;var r=n(t,["node"]);return i("ol",e({},r,{style:{display:"flex",flexDirection:"column",gap:"1rem",listStyle:"decimal",paddingLeft:"2.5rem"}},{children:null==r?void 0:r.children}))},ul:function(t){t.node;var r=n(t,["node"]);return i("ol",e({},r,{style:{paddingLeft:"1.25rem",listStyleType:"decimal"}}))},li:function(t){t.node;var r=n(t,["node"]);return i("li",e({},r,{style:{marginBottom:"4px",listStyle:"decimal"}},{children:r.children}))},a:function(t){t.node;var r=t.href,o=t.children,l=n(t,["node","href","children"]);if(!r)return i("a",e({},l,{children:o}));var d=r.match(/citationNumber=([^&]+)/),a=d?d[1]:null;if(a){var s=A(a);if(s)return i(c,{citation:s,linkTitle:o,fontSize:14})}return i("a",e({href:r,target:"_blank",rel:"noopener noreferrer",className:"md-link inline-flex items-center gap-1 text-purple-700 hover:underline"},l,{children:o}))}}},[]),N=r(function(){return[a]},[]),P=r(function(){return[s]},[]);return t("div",e({style:{display:"contents"}},{children:[i(g,{isOpen:w,onClick:function(){b?b():w?null==y||y(40):null==y||y(50)}}),w&&t("div",e({style:{display:"block",width:"100%",marginTop:"4px",marginBottom:"12px",overflow:"hidden",borderRadius:"8px",border:"1.5px solid #cacdfa",backgroundColor:"#FFFFFF",boxShadow:"0 2px 4px -1px rgba(0, 0, 0, 0.05)",fontFamily:'"Plus Jakarta Sans", sans-serif',animation:"fadeIn 0.2s ease-out",maxWidth:"100%"}},{children:[t("div",e({style:{display:"flex",alignItems:"center",justifyContent:"space-between",borderBottom:"1.5px solid #d4dbff",backgroundColor:"#f4f2ff",padding:"8px 12px",gap:"8px"}},{children:[t("div",e({style:{display:"flex",alignItems:"center",gap:"8px"}},{children:[i(p,{}),i("span",e({style:{fontSize:"14px",fontWeight:500,color:"#1F2937"}},{children:"Cognitive Decisioning AI"}))]})),j&&t("div",e({style:{display:"flex",alignItems:"center",borderRadius:"9999px",border:"1px solid #d4dbff",backgroundColor:"#FFFFFF",padding:"2px 8px",fontSize:"12px",fontWeight:600,color:"#7C3AED"}},{children:[i(u,{}),"AI Relevance: ",j,"%"]}))]})),t("div",e({style:{borderBottom:"1.5px solid #e9ebf0"}},{children:[t("button",e({onClick:function(){return z(!W)},style:V},{children:[t("div",e({style:{display:"flex",gap:"8px",alignItems:"center"}},{children:[i(f,{}),t("div",{children:[i("h4",e({style:{fontSize:"14px",fontWeight:500,color:"#111827",margin:0}},{children:"Reasoning"})),i("p",e({style:{fontSize:"12px",color:"#6B7280",margin:"0"}},{children:"Why this was picked"}))]})]})),i(m,{isOpen:W})]})),W&&i("div",e({style:H},{children:i(d,e({components:O,rehypePlugins:N,remarkPlugins:P},{children:_(S||"No reasoning provided.")}))}))]})),t("div",{children:[t("button",e({onClick:function(){return R(!I)},style:V},{children:[t("div",e({style:{display:"flex",gap:"8px",alignItems:"center"}},{children:[i(h,{}),t("div",{children:[i("h4",e({style:{fontSize:"14px",fontWeight:500,color:"#111827",margin:0}},{children:"Gap"})),i("p",e({style:{fontSize:"12px",color:"#6B7280",margin:"0"}},{children:"What's missing or unclear"}))]})]})),i(m,{isOpen:I})]})),I&&i("div",e({style:H},{children:i(d,e({components:O,rehypePlugins:N,remarkPlugins:P},{children:_(M||"No gaps identified.")}))}))]})]}))]}))};export{x as CognitiveDecisioningCard,p as HumanWithBrainIcon};
|
|
2
2
|
//# sourceMappingURL=CognitiveDecisioningCard.js.map
|