@e-llm-studio/instant-learning 0.0.259 → 0.0.261
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/DocumentLearning/InstantLearning.module.css.js +1 -1
- package/dist/cjs/features/IL-OTJ/InstantLearning.module.css.js +1 -1
- package/dist/cjs/features/IL-OTJ/_components/AccordianSection.js +1 -1
- package/dist/cjs/features/IL-OTJ/_components/ChatComponents/ChatComponent.js +1 -1
- package/dist/cjs/features/IL-OTJ/_components/ChatComponents/ChatComponent.module.css.js +1 -1
- package/dist/cjs/features/IL-OTJ/_components/ChatComponents/ChatHeader.module.css.js +1 -1
- package/dist/cjs/features/IL-OTJ/_components/CriticalGaps.js +1 -1
- package/dist/cjs/features/IL-OTJ/_components/MessageRendering/MessageRendering.js +1 -1
- package/dist/cjs/features/IL-OTJ/_components/atoms/SkeletonLoader/SkeletonLoader.module.css.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/templates/RuleComparison/RuleComparison.js +1 -1
- package/dist/cjs/features/IL-OTJ/_components/templates/TrafficManager/CreateRule.js +1 -1
- package/dist/cjs/features/IL-OTJ/helpers/message-rendering-utils.js +1 -1
- package/dist/cjs/features/InstantLearning/InstantLearning.module.css.js +1 -1
- package/dist/cjs/features/WtaWnta/WtaWnta.module.css.js +1 -1
- package/dist/cjs/node_modules/style-inject/dist/style-inject.es.js +2 -0
- package/dist/cjs/node_modules/style-inject/dist/style-inject.es.js.map +1 -0
- package/dist/features/DocumentLearning/InstantLearning.module.css.js +1 -1
- package/dist/features/IL-OTJ/InstantLearning.module.css.js +1 -1
- package/dist/features/IL-OTJ/_components/AccordianSection.js +1 -1
- package/dist/features/IL-OTJ/_components/ChatComponents/ChatComponent.js +1 -1
- package/dist/features/IL-OTJ/_components/ChatComponents/ChatComponent.module.css.js +1 -1
- package/dist/features/IL-OTJ/_components/ChatComponents/ChatHeader.module.css.js +1 -1
- package/dist/features/IL-OTJ/_components/CriticalGaps.js +1 -1
- package/dist/features/IL-OTJ/_components/MessageRendering/MessageRendering.js +1 -1
- package/dist/features/IL-OTJ/_components/atoms/SkeletonLoader/SkeletonLoader.module.css.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/templates/RuleComparison/RuleComparison.js +1 -1
- package/dist/features/IL-OTJ/_components/templates/TrafficManager/CreateRule.js +1 -1
- package/dist/features/IL-OTJ/helpers/message-rendering-utils.js +1 -1
- package/dist/features/InstantLearning/InstantLearning.module.css.js +1 -1
- package/dist/features/WtaWnta/WtaWnta.module.css.js +1 -1
- package/dist/node_modules/style-inject/dist/style-inject.es.js +2 -0
- package/dist/node_modules/style-inject/dist/style-inject.es.js.map +1 -0
- package/dist/types/src/features/IL-OTJ/_components/AccordianSection.d.ts +2 -1
- package/dist/types/src/features/IL-OTJ/_components/AccordianSection.d.ts.map +1 -1
- package/dist/types/src/features/IL-OTJ/_components/ChatComponents/ChatComponent.d.ts.map +1 -1
- package/dist/types/src/features/IL-OTJ/_components/CriticalGaps.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/NewMinimizedThinkingSteps.d.ts.map +1 -1
- package/dist/types/src/features/IL-OTJ/_components/WatchMeWork/Usethinkingsteps.d.ts +1 -1
- package/dist/types/src/features/IL-OTJ/_components/WatchMeWork/Usethinkingsteps.d.ts.map +1 -1
- package/dist/types/src/features/IL-OTJ/_components/molecules/Condition/ConditionList.d.ts +2 -1
- 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/templates/RuleComparison/RuleComparison.d.ts.map +1 -1
- package/dist/types/src/features/IL-OTJ/_components/templates/TrafficManager/CreateRule.d.ts.map +1 -1
- package/dist/types/src/features/IL-OTJ/helpers/message-rendering-utils.d.ts.map +1 -1
- package/package.json +2 -2
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__spreadArray as e,__rest as n,__assign as t}from"tslib";import{jsx as i,jsxs as a,Fragment as r}from"react/jsx-runtime";import o from"react-markdown";import c from"rehype-raw";import l from"remark-gfm";import{useState as s,useRef as d,useEffect as u,useCallback as p,useMemo as m}from"react";import{RuleDisplay as v,ActionableButton as g,ActionableCheckbox as f}from"./ClickableChatComponents.js";import{MarkdownLinkRenderer as h,MarkdownDivRenderer as S,MarkdownSpanRenderer as y}from"../MarkdownComponents/MarkdownElements.js";import{extractTextFromChildren as b}from"../../helpers/utils.js";import{RuleVariantCard as k}from"./RuleVariantCard.js";import{MarkdownSelect as w}from"../MarkdownComponents/MarkdownSelect.js";import _ from"./ChatFeedback.js";import{parseJsonBlocks as x,extractReasoningFromText as C,buildAiReasoning as T}from"../../helpers/message-rendering-utils.js";var E=function(E){var A=E.index,L=E.content,M=E.role,N=E.messages,R=E.handleStream,I=E.scrollToBottom,j=E.isLastMessage,B=E.onSave,z=E.citations,W=E.setChatSize,D=E.chatSize,O=E.isStreamEnd,U=E.messageIsEnd,G=E.onViewComparison,J=E.onTypeResponseClick,V=E.onComparisonLinkClick,P=E.baseURL,q=E.onFeedbackSubmit,F=E.isGlobalEditActive,H=s(L),K=H[0],$=H[1],Y=s([]),Q=Y[0],X=Y[1],Z=s(!1),ee=Z[0],ne=Z[1],te=s(!1),ie=te[0],ae=te[1],re=s(!1),oe=re[0],ce=re[1],le=s(null),se=le[0],de=le[1],ue=s(null),pe=ue[0],me=ue[1],ve=s([]),ge=ve[0],fe=ve[1],he=s(!1),Se=he[0],ye=he[1],be=s(!1),ke=be[0],we=be[1],_e=s(new Set),xe=_e[0],Ce=_e[1],Te=s(new Set),Ee=Te[0],Ae=Te[1],Le=d({handleStream:R,onSave:B,selectedTiers:Q,tiersSubmitted:ie,citations:z,openCardIds:xe,openCitationIds:Ee,chatSize:D,isLastMessage:j,scrollToBottom:I,isStreamEnd:O,selectedVariant:pe,messageIsEnd:U,isCommitted:oe,clickedAction:se,gapSelections:ge,gapsSubmitted:ke,onTypeResponseClick:J,isGlobalEditActive:F});Le.current={handleStream:R,onSave:B,selectedTiers:Q,tiersSubmitted:ie,citations:z,openCardIds:xe,openCitationIds:Ee,chatSize:D,isLastMessage:j,scrollToBottom:I,isStreamEnd:O,selectedVariant:pe,messageIsEnd:U,isCommitted:oe,clickedAction:se,gapSelections:ge,gapsSubmitted:ke,onTypeResponseClick:J,isGlobalEditActive:F},u(function(){me(null),ce(!1),de(null),ye(!1),we(!1),fe([])},[A]),u(function(){if(U&&!oe&&!pe){var e=Ge(K).match(/<variant-card[^>]*isselected=["']true["'][^>]*>/i);if(e){var n=e[0].match(/id=["']([^"']+)["']/),t=e[0].match(/variantname=["']([^"']+)["']/),i=e[0].match(/decisionstrength=["']([^"']+)["']/);n&&t&&me({id:n[1],variantName:t[1],decisionStrength:parseInt((null==i?void 0:i[1])||"0")})}}},[K,U,oe,pe]);var Me=p(function(e,n,t){var i=function(t){var i=new Set(t);return n?i.add(e):i.delete(e),i};"card"===t?Ce(function(e){return i(e)}):Ae(function(e){return i(e)})},[]),Ne=p(function(e,n,t){void 0===n&&(n=!1);var i=Le.current,a=i.handleStream;i.onSave;var r=e.trim();a&&(a(new KeyboardEvent("keydown",{key:"Enter"}),!1,r),n&&t&&(ce(!0),de(t))),n||$(function(e){return e.replace(/<button([^>]*)class=["']clickable-button["']([^>]*)>([\s\S]*?)<\/button>/gi,function(e,n,t,i){var a=i.trim(),o='data-selected="'.concat(a===r,'"');return"<button".concat(n,'class="clickable-button" ').concat(o).concat(t,">").concat(i,"</button>")})})},[]),Re=p(function(e,n){ye(e),fe(n)},[]),Ie=p(function(){var e=Le.current,n=e.handleStream,t=e.gapSelections.map(function(e){var n=Array.isArray(e.userSelection)?e.userSelection.join(", "):e.userSelection;return"".concat(e.name,": ").concat(n||"Skipped")}),i="Here are my choices for the critical gaps:\n".concat(t.join(","));n(new KeyboardEvent("keydown",{key:"Enter"}),!1,i),we(!0)},[]),je=p(function(e,n){var t=Le.current.citations;return t&&t.find(function(t){return t.customMetaData.citation_number&&"Cognitive Decisioning"!==t.customMetaData.citation_title&&t.customMetaData.source===n&&String(t.customMetaData.citation_number)===String(e)})||null},[]),Be=p(function(n,t){var i=Le.current.scrollToBottom,a=Array.isArray(n)?n[0].trim():n.trim();ne(!0),X(function(n){var i=e([],n,!0);if(["both tiers","all tiers"].includes(a.toLowerCase()))i=t?["Both Tiers","Tier 1","Tier 2"]:[];else{t?i.includes(a)||i.push(a):i=i.filter(function(e){return e!==a});var r=i.includes("Tier 1"),o=i.includes("Tier 2");r&&o?i.includes("Both Tiers")||i.push("Both Tiers"):i=i.filter(function(e){return!["Both Tiers","All tiers"].includes(e)})}return i.filter(function(e,n){return i.indexOf(e)===n})}),null==i||i()},[]),ze=p(function(e,n,t,i){Le.current.isCommitted||n&&me({id:e,variantName:t,decisionStrength:i})},[]),We=function(){if(!Le.current.isCommitted){var e="Edit ".concat((null==pe?void 0:pe.variantName)||"Selected Behavior");Ne(e,!0,"edit")}},De=p(function(){var e=Le.current,n=e.handleStream,t=e.selectedTiers,i=t.join(" and ");t.some(function(e){return"both tiers"===e.toLowerCase()||"all tiers"===e.toLowerCase()})&&(i="Both Tiers"),n(new KeyboardEvent("keydown",{key:"Enter"}),!1,"".concat(i)),ae(!0),ne(!1),$(function(e){return e.replace(/<checkbox\s+class=["']clickable-box["'][^>]*>([\s\S]*?)<\/checkbox>/gi,function(e,n){var i=n.trim();return t.includes(i)?e:""})})},[]),Oe=m(function(){return{p:function(e){e.node;var a=n(e,["node"]);return i("span",t({},a,{style:{maxWidth:"100%",wordWrap:"break-word",overflowWrap:"break-word",wordBreak:"break-word",whiteSpace:"normal",overflow:"hidden",display:"block",fontSize:"1rem",lineHeight:"1.625rem",marginBottom:"user"===M?"0":"0.4rem"}},{children:null==a?void 0:a.children}))},code:function(e){e.node;var a=n(e,["node"]);return i("span",t({},a,{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==a?void 0:a.children}))},ol:function(e){e.node;var a=n(e,["node"]);return i("ol",t({},a,{style:{display:"flex",flexDirection:"column",gap:"1rem",listStyle:"decimal",paddingLeft:"2.5rem"}},{children:null==a?void 0:a.children}))},ul:function(e){e.node;var a=n(e,["node"]);return i("ul",t({},a,{style:{display:"flex",flexDirection:"column",gap:"1rem",listStyle:"decimal",paddingLeft:"2.5rem"}},{children:null==a?void 0:a.children}))},rule:function(e){e.node;var t=n(e,["node"]);return i(v,{content:b(t.children)})},button:function(e){var a=e.node,r=e.className,o=n(e,["node","className"]),c=Le.current,l=c.isLastMessage,s=c.handleStream,d=c.isStreamEnd;return i(g,t({node:a,className:r||o.class,handleStream:s,onAction:Ne,disabled:!l||!!F,isStreamEnd:d,isLastMessage:l,onTypeResponseClick:J,baseURL:P},o))},checkbox:function(e){var a=e.node,r=e.className,o=n(e,["node","className"]),c=Le.current,l=c.selectedTiers,s=c.tiersSubmitted,d=c.isLastMessage;return i(f,t({node:a,className:r||o.class,selectedItems:l,onToggle:Be,isSubmitted:s,disabled:!d||!!F},o))},a:function(e){var n=Le.current,a=n.chatSize,r=n.openCitationIds;return i(h,t({},e,{chatSize:a,openCitationIds:r,getCitationByNumber:je,handleToggleState:Me,isStreamEnd:Le.current.isStreamEnd}))},div:function(e){var n=Le.current,a=n.openCardIds,r=n.citations,o=n.isLastMessage,c=n.isStreamEnd,l=n.gapsSubmitted,s=n.onTypeResponseClick;return i(S,t({},e,{openCardIds:a,citations:r,handleToggleState:Me,isStreamEnd:c,isLastMessage:o,handleStream:R,onGapValidation:Re,isGapsSubmitted:l,onViewComparison:G,onComparisonLinkClick:V,onTypeResponseClick:s,isGlobalEditActive:F}))},span:function(e){var n,a,r;if((null===(n=e.className)||void 0===n?void 0:n.includes("cognitive-card-trigger"))||(null===(a=e.className)||void 0===a?void 0:a.includes("view-form-update-trigger"))||(null===(r=e.className)||void 0===r?void 0:r.includes("view-identified-fields-trigger"))){var o=Le.current,c=o.openCardIds,l=o.citations,s=o.isLastMessage,d=o.isStreamEnd;return i(y,t({},e,{openCardIds:c,citations:l,handleToggleState:Me,onComparisonLinkClick:V,isStreamEnd:!s||d}))}return i("span",t({},e))},"variant-card":function(e){e.node;var a=n(e,["node"]),r=a.variantname,o=a.decisionstrength,c=a.id,l=Le.current,s=l.isCommitted,d=l.isLastMessage,u=l.selectedVariant;if(!U)return null;var p=(null==u?void 0:u.id)===c,m=parseInt(o||"0");return i(k,t({variantName:r,decisionStrength:m,isEditable:!s&&d&&!F,isSelected:p,onToggle:function(e){return ze(c,e,r,m)},onEdit:function(){return We()}},{children:a.children}))},br:function(e){return i("p",t({style:{marginBottom:"0.75rem"}},e))}}},[Ne,Be,je,Me,M,pe,oe,U,Re,ze,F]);u(function(){ie||($(L),setTimeout(function(){null==I||I()},50))},[L,ie,I]);var Ue=d(0);u(function(){var e=xe.size+Ee.size;e>0&&0===Ue.current?null==W||W(50):0===e&&Ue.current>0&&(null==W||W(40)),Ue.current=e},[xe,Ee,W]);var Ge=function(e){if(!e)return"";for(var n=e,t=function(e){if("critical_gaps"===e.property){var t=e.data,i=(null==t?void 0:t.critical_gaps)||t,a={count:String((null==i?void 0:i.count)||0),decisionStrength:(null==i?void 0:i.critical_gaps_decision_strength)||(null==i?void 0:i.decisionStrength)||"0",value:(null==i?void 0:i.value)||"",gaps:((null==i?void 0:i.gap_cards)||(null==i?void 0:i.gaps)||[]).map(function(e,n){var t,i,a,r,o,c,l=C((null==e?void 0:e.gap_value)||(null==e?void 0:e.value)||""),s=l.text,d=l.aiReasoning,u=(null==e?void 0:e.ai_reasoning)||(null==e?void 0:e.aiReasoning)||d,p=((null===(t=null==e?void 0:e.interaction)||void 0===t?void 0:t.options)||(null==e?void 0:e.options)||[]).map(function(e){var n,t=C((null==e?void 0:e.label)||(null==e?void 0:e.text)||""),i=t.text,a=t.aiReasoning,r=(null==e?void 0:e.ai_reasoning)||(null==e?void 0:e.aiReasoning)||a,o=null!==(n=e.explanation)&&void 0!==n?n:null;if("string"==typeof o)try{o=o.startsWith("[")&&o.endsWith("]")?JSON.parse(o.replace(/"/g,'"')):o?[o]:null}catch(e){o=o?[o]:null}return{id:null==e?void 0:e.id,text:i,explanation:o,aiReasoning:T(r)}});return{id:(null==e?void 0:e.id)||"gap-".concat(n),name:(null==e?void 0:e.gap_name)||(null==e?void 0:e.name)||"Gap",decisionStrength:(null==e?void 0:e.gap_decision_strength)||(null==e?void 0:e.decisionStrength)||"0",impact:(null==e?void 0:e.impact)||"Medium",value:s,aiReasoning:T(u),inputType:"textfield"===(null===(i=null==e?void 0:e.interaction)||void 0===i?void 0:i.interaction_type)||"text"===(null==e?void 0:e.inputType)?"text":"radioselect"===(null===(a=null==e?void 0:e.interaction)||void 0===a?void 0:a.interaction_type)||"radio"===(null===(r=null==e?void 0:e.interaction)||void 0===r?void 0:r.interaction_type)||"radio"===(null==e?void 0:e.inputType)?"radio":"checkbox"===(null===(o=null==e?void 0:e.interaction)||void 0===o?void 0:o.interaction_type)||"checkbox"===(null==e?void 0:e.inputType)?"checkbox":"text",options:p,userSelection:"checkbox"===(null===(c=null==e?void 0:e.interaction)||void 0===c?void 0:c.interaction_type)||"checkbox"===(null==e?void 0:e.inputType)?[]:""}})},r=JSON.stringify(a).replace(/"/g,""");n=n.replace(e.rawMatch,'\n\n<div class="critical-gaps-trigger" data-payload="'.concat(r,'"></div>\n\n'))}else if("updated_fields"===e.property||"identified_fields"===e.property){var o=(null==e?void 0:e.data)&&"object"==typeof e.data?e.data:{},c={title:"Rule Title",description:"Description",rule_description:"Description",wta:"When to Apply",wnta:"When NOT to Apply",scope:"Tier Information",rule_type:"Rule Type"},l=["ai_reasoning","scheduling_config","is_user_accepted_risk"],s=[];Object.keys(o).forEach(function(e){var n;try{var t=o[e];if(l.includes(e)||null==t)return;var i=c[e]||e.replace(/_/g," ").replace(/\b\w/g,function(e){return e.toUpperCase()}),a="",r=null,d=function(e){var n,t=C(e);return{text:null===(n=t.text)||void 0===n?void 0:n.trim(),reasoning:t.aiReasoning||null}};if("string"==typeof t){var u=d(t);a=u.text,r=u.reasoning}else if(Array.isArray(t)){var p=t.map(function(e){return"string"==typeof e?d(e):{text:JSON.stringify(e),reasoning:null}}).filter(function(e){return e.text});a=p.map(function(e){return e.text}).join(", "),r=(null===(n=p.find(function(e){return e.reasoning}))||void 0===n?void 0:n.reasoning)||null}else if("object"==typeof t)try{a=JSON.stringify(t,null,2)}catch(e){a=String(t)}else a=String(t);a&&s.push({label:"".concat(i,": ").concat(a),reasoning:r})}catch(n){console.error('Error processing field "'.concat(e,'":'),n)}});var d="updated_fields"===e.property?"Updated Details":"Identified Details";if(0===s.length)n=n.replace(e.rawMatch,"");else try{var u={title:d,fields:s},p=(r=JSON.stringify(u).replace(/"/g,"""),"updated_fields"===e.property?"view-form-update-trigger":"view-identified-fields-trigger");n=n.replace(e.rawMatch,'<span class="'.concat(p,'" data-payload="').concat(r,'"></span>'))}catch(t){n=n.replace(e.rawMatch,"")}}else if("variant_card"===e.property){var m=e.data.variants.map(function(e){var n,t,i,a;return'<variant-card id="'.concat(e.id||"",'" variantname="').concat(e.variant_name||e.variantname||"",'" decisionstrength="').concat(null!==(t=null!==(n=e.decision_strength)&&void 0!==n?n:e.decisionstrength)&&void 0!==t?t:"0",'" iseditable="').concat(e.iseditable||"false",'" isselected="').concat(null!==(a=null!==(i=e.is_selected)&&void 0!==i?i:e.isselected)&&void 0!==a?a:"false",'">').concat(e.description||e.innerContent||"","</variant-card>")}).join("\n\n");n=n.replace(e.rawMatch,"\n\n".concat(m,"\n\n"))}else if("rule_validation_card"===e.property){var v=e.data,g=function(e){return String(null!=e?e:"").replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")};m=(Array.isArray(null==v?void 0:v.validated_rules)?v.validated_rules:[v]).map(function(e){var n=C(e.rule_description||e.ruleDescription||""),t=n.text,i=n.aiReasoning,a=C(e.rule_title||e.ruleTitle||""),r=a.text,o=a.aiReasoning,c=i||o,l="";return c&&(l="<ai_reasoning>\n <id>".concat(c.id||"","</id>\n <reason>").concat(c.reason||"","</reason>\n <gap>").concat(c.gap||"","</gap>\n <relevance_score>").concat(c.score||"","</relevance_score>\n </ai_reasoning>")),'<div class="rule-validation-card-trigger"\n data-type="'.concat(g(e.validation_type||e.validationType),'"\n data-decision-strength="').concat(g(e.decision_strength||e.decisionStrength),'"\n data-title="').concat(g(r),'"\n data-tier="').concat(g(e.tier),'"\n data-rule-id="').concat(g(e.rule_id||e.ruleId),'"\n data-description="').concat(g(t),'">\n ').concat(l,"\n </div>")}).join("\n\n");n=n.replace(e.rawMatch,"\n\n".concat(m,"\n\n"))}},i=0,a=x(n);i<a.length;i++){t(a[i])}n=(n=(n=(n=(n=(n=n.replace(/\\"/g,'"').replace(/\\'/g,"'").replace(/\u00A0/g," ").replace(/\r\n/g,"\n")).replace(/```(?:\w+)?\n?([\s\S]*?)```/gi,"$1")).replace(/<br\s*\/?>/gi,"\n\n")).replace(/<(singleselect|multiselect|instantselect)>([\s\S]*?)<\/\1>/gi,function(e,n,t){var i="multi";return"singleselect"===n?i="single":"instantselect"===n&&(i="instant"),'\n\n<div class="markdown-select-trigger" data-type="'.concat(i,'">').concat(t,"</div>\n\n")})).replace(/<selectoption\s+([\s\S]*?)>([\s\S]*?)<\/selectoption>/gi,function(e,n,t){for(var i,a={},r=/([a-z0-9-]+)\s*=\s*(["'])([\s\S]*?)\2/gi;null!==(i=r.exec(n));)a[i[1]]=i[3];return'<div class="select-option-item" data-id="'.concat(a.id||"",'" data-cd="').concat(a.cd||"false",'">').concat(t,"</div>")})).replace(/<!--<ai_reasoning>(?![\s\S]*?<\/ai_reasoning>-->)[\s\S]*$/gi,"");["ai_reasoning"].forEach(function(e){var t=new RegExp("\x3c!--\\s*(<".concat(e,">[\\s\\S]*?<\\/").concat(e,">)\\s*--\x3e"),"gi");n=n.replace(t,"$1")});var r=0;n=n.replace(/<ai_reasoning>([\s\S]*?)<\/ai_reasoning>/gi,function(e,n){var t=n.replace(/\[([^\]]+)\]\(([^)]+)\)/g,function(e,n,t){return'<a href="'.concat(t,'" data-shielded="true">').concat(n,"</a>")});return t=t.replace(/</g,"<").replace(/>/g,">"),r++,'<span class="cognitive-card-trigger" data-card-id="card-'.concat(r,'">').concat(t,"</span>")});var o=0;return n.replace(/(\[[^\]]+\]\()([^)]+)(\))/g,function(e,n,t,i){var a=t.replace(/\s/g,"%20");if(a.includes("citationNumber=")){o++;var r=a.includes("?")?"&":"?";return"".concat(n).concat(a).concat(r,"uiUniqueId=").concat(o).concat(i)}return"".concat(n).concat(a).concat(i)})},Je=m(function(){return[c]},[]),Ve=m(function(){return[l]},[]),Pe=(null==pe?void 0:pe.variantName)||"Selected Behavior",qe=ge.some(function(e){return!(!e.userSelection||!e.options)&&(Array.isArray(e.userSelection)?e.userSelection:[e.userSelection]).some(function(n){var t=e.options.find(function(e){return e.text===n});return"typeYourAnswer"===(null==t?void 0:t.id)||"type your response"===n.trim().toLowerCase()})}),Fe=Se&&U&&(j||ke)&&!qe,He=m(function(){return x(K).some(function(e){return"variant_card"===e.property})},[K]);return a(r,{children:[a("div",t({style:{lineHeight:"1.625rem",fontSize:"1rem",marginTop:"0.5rem",marginBottom:"".concat("assistant"===M?"0.3rem":"0rem"),fontFamily:"Plus Jakarta Sans, sans-serif"}},{children:[i(o,t({components:Oe,rehypePlugins:Je,remarkPlugins:Ve},{children:Ge(K)}),A),U&&He&&a("div",t({style:{gap:"8px"}},{children:[a(g,t({className:"clickable-button",handleStream:R,disabled:!j||!pe&&!oe||oe&&"add"!==se||F,isStreamEnd:O,onAction:function(){return Ne("Add ".concat(Pe),!0,"add")},"data-selected":"add"===se?"true":oe?"false":void 0,baseURL:P},{children:["Add ",Pe]})),a(g,t({className:"clickable-button",handleStream:R,disabled:!j||!pe&&!oe||oe&&"edit"!==se||F,isStreamEnd:O,onAction:function(){return Ne("Edit ".concat(Pe),!0,"edit")},"data-selected":"edit"===se?"true":oe?"false":void 0,baseURL:P},{children:["Edit ",Pe]})),i(g,t({className:"clickable-button",handleStream:R,disabled:!j||oe&&"skip"!==se||F,isStreamEnd:O,onAction:function(){return Ne("Skip for now",!0,"skip")},"data-selected":"skip"===se?"true":oe?"false":void 0,baseURL:P},{children:"Skip for now"}))]})),Fe&&i("div",t({style:{marginTop:"12px",display:"flex",justifyContent:"flex-start"}},{children:i(w,{type:"instant",options:[{id:"proceed-gaps",label:"Proceed"}],selectedIds:ke?["proceed-gaps"]:[],disabled:ke,citations:[],onProceed:Ie})}))]})),i("div",t({style:{display:"flex",maxWidth:"100%"}},{children:i("div",t({style:{width:"100%"}},{children:(null==Q?void 0:Q.length)>0&&ee&&!ie?a("div",t({style:{marginTop:"10px"}},{children:[a("span",{children:["It looks like you've chosen ",Q&&0!==Q.length?Q.some(function(e){return"both tiers"===e.toLowerCase()||"all tiers"===e.toLowerCase()})?"Both Tiers":Q.join(", "):"",". Would you like me to proceed?"]}),i("p",{children:i("button",t({style:{padding:"0.5rem 1rem",margin:"0.5rem 0",backgroundColor:"#2661eb",color:"white",border:"none",borderRadius:"8px",cursor:"pointer",fontSize:"0.75rem",fontWeight:"500",fontFamily:"Plus Jakarta Sans, sans-serif"},onClick:De},{children:"Yes"}))})]})):null}))})),i(_,{isLastMessage:j,isStreamEnd:O,role:M,content:L,messages:N,index:A,onFeedbackSubmit:q})]})};export{E as default};
|
|
1
|
+
import{__spreadArray as e,__rest as n,__assign as t}from"tslib";import{jsx as i,jsxs as r,Fragment as a}from"react/jsx-runtime";import o from"react-markdown";import c from"rehype-raw";import l from"remark-gfm";import{useState as s,useRef as d,useEffect as u,useCallback as p,useMemo as m}from"react";import{RuleDisplay as v,ActionableButton as g,ActionableCheckbox as f}from"./ClickableChatComponents.js";import{MarkdownLinkRenderer as h,MarkdownDivRenderer as S,MarkdownSpanRenderer as y}from"../MarkdownComponents/MarkdownElements.js";import{extractTextFromChildren as b}from"../../helpers/utils.js";import{RuleVariantCard as k}from"./RuleVariantCard.js";import{MarkdownSelect as w}from"../MarkdownComponents/MarkdownSelect.js";import _ from"./ChatFeedback.js";import{parseJsonBlocks as x,extractReasoningFromText as C,buildAiReasoning as T}from"../../helpers/message-rendering-utils.js";var E=function(E){var A=E.index,L=E.content,M=E.role,R=E.messages,N=E.handleStream,I=E.scrollToBottom,j=E.isLastMessage,B=E.onSave,z=E.citations,W=E.setChatSize,D=E.chatSize,O=E.isStreamEnd,U=E.messageIsEnd,G=E.onViewComparison,J=E.onTypeResponseClick,V=E.onComparisonLinkClick,P=E.baseURL,q=E.onFeedbackSubmit,F=E.isGlobalEditActive,H=s(L),K=H[0],$=H[1],Y=s([]),Q=Y[0],X=Y[1],Z=s(!1),ee=Z[0],ne=Z[1],te=s(!1),ie=te[0],re=te[1],ae=s(!1),oe=ae[0],ce=ae[1],le=s(null),se=le[0],de=le[1],ue=s(null),pe=ue[0],me=ue[1],ve=s([]),ge=ve[0],fe=ve[1],he=s(!1),Se=he[0],ye=he[1],be=s(!1),ke=be[0],we=be[1],_e=s(new Set),xe=_e[0],Ce=_e[1],Te=s(new Set),Ee=Te[0],Ae=Te[1],Le=d({handleStream:N,onSave:B,selectedTiers:Q,tiersSubmitted:ie,citations:z,openCardIds:xe,openCitationIds:Ee,chatSize:D,isLastMessage:j,scrollToBottom:I,isStreamEnd:O,selectedVariant:pe,messageIsEnd:U,isCommitted:oe,clickedAction:se,gapSelections:ge,gapsSubmitted:ke,onTypeResponseClick:J,isGlobalEditActive:F});Le.current={handleStream:N,onSave:B,selectedTiers:Q,tiersSubmitted:ie,citations:z,openCardIds:xe,openCitationIds:Ee,chatSize:D,isLastMessage:j,scrollToBottom:I,isStreamEnd:O,selectedVariant:pe,messageIsEnd:U,isCommitted:oe,clickedAction:se,gapSelections:ge,gapsSubmitted:ke,onTypeResponseClick:J,isGlobalEditActive:F},u(function(){me(null),ce(!1),de(null),ye(!1),we(!1),fe([])},[A]),u(function(){if(U&&!oe&&!pe){var e=Ge(K).match(/<variant-card[^>]*isselected=["']true["'][^>]*>/i);if(e){var n=e[0].match(/id=["']([^"']+)["']/),t=e[0].match(/variantname=["']([^"']+)["']/),i=e[0].match(/decisionstrength=["']([^"']+)["']/);n&&t&&me({id:n[1],variantName:t[1],decisionStrength:parseInt((null==i?void 0:i[1])||"0")})}}},[K,U,oe,pe]);var Me=p(function(e,n,t){var i=function(t){var i=new Set(t);return n?i.add(e):i.delete(e),i};"card"===t?Ce(function(e){return i(e)}):Ae(function(e){return i(e)})},[]),Re=p(function(e,n,t){void 0===n&&(n=!1);var i=Le.current,r=i.handleStream;i.onSave;var a=e.trim();r&&(r(new KeyboardEvent("keydown",{key:"Enter"}),!1,a),n&&t&&(ce(!0),de(t))),n||$(function(e){return e.replace(/<button([^>]*)class=["']clickable-button["']([^>]*)>([\s\S]*?)<\/button>/gi,function(e,n,t,i){var r=i.trim(),o='data-selected="'.concat(r===a,'"');return"<button".concat(n,'class="clickable-button" ').concat(o).concat(t,">").concat(i,"</button>")})})},[]),Ne=p(function(e,n){ye(e),fe(n)},[]),Ie=p(function(){var e=Le.current,n=e.handleStream,t=e.gapSelections.map(function(e){var n=Array.isArray(e.userSelection)?e.userSelection.join(", "):e.userSelection;return"".concat(e.name,": ").concat(n||"Skipped")}),i="Here are my choices for the critical gaps:\n".concat(t.join(","));n(new KeyboardEvent("keydown",{key:"Enter"}),!1,i),we(!0)},[]),je=p(function(e,n){var t=Le.current.citations;return t&&t.find(function(t){return t.customMetaData.citation_number&&"Cognitive Decisioning"!==t.customMetaData.citation_title&&t.customMetaData.source===n&&String(t.customMetaData.citation_number)===String(e)})||null},[]),Be=p(function(n,t){var i=Le.current.scrollToBottom,r=Array.isArray(n)?n[0].trim():n.trim();ne(!0),X(function(n){var i=e([],n,!0);if(["both tiers","all tiers"].includes(r.toLowerCase()))i=t?["Both Tiers","Tier 1","Tier 2"]:[];else{t?i.includes(r)||i.push(r):i=i.filter(function(e){return e!==r});var a=i.includes("Tier 1"),o=i.includes("Tier 2");a&&o?i.includes("Both Tiers")||i.push("Both Tiers"):i=i.filter(function(e){return!["Both Tiers","All tiers"].includes(e)})}return i.filter(function(e,n){return i.indexOf(e)===n})}),null==i||i()},[]),ze=p(function(e,n,t,i){Le.current.isCommitted||n&&me({id:e,variantName:t,decisionStrength:i})},[]),We=function(){if(!Le.current.isCommitted){var e="Edit ".concat((null==pe?void 0:pe.variantName)||"Selected Behavior");Re(e,!0,"edit")}},De=p(function(){var e=Le.current,n=e.handleStream,t=e.selectedTiers,i=t.join(" and ");t.some(function(e){return"both tiers"===e.toLowerCase()||"all tiers"===e.toLowerCase()})&&(i="Both Tiers"),n(new KeyboardEvent("keydown",{key:"Enter"}),!1,"".concat(i)),re(!0),ne(!1),$(function(e){return e.replace(/<checkbox\s+class=["']clickable-box["'][^>]*>([\s\S]*?)<\/checkbox>/gi,function(e,n){var i=n.trim();return t.includes(i)?e:""})})},[]),Oe=m(function(){return{p:function(e){e.node;var r=n(e,["node"]);return i("span",t({},r,{style:{maxWidth:"100%",wordWrap:"break-word",overflowWrap:"break-word",wordBreak:"break-word",whiteSpace:"normal",overflow:"hidden",display:"block",fontSize:"1rem",lineHeight:"1.625rem",marginBottom:"user"===M?"0":"0.4rem"}},{children:null==r?void 0:r.children}))},code:function(e){e.node;var r=n(e,["node"]);return i("span",t({},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(e){e.node;var r=n(e,["node"]);return i("ol",t({},r,{style:{display:"flex",flexDirection:"column",gap:"1rem",listStyle:"decimal",paddingLeft:"2.5rem"}},{children:null==r?void 0:r.children}))},ul:function(e){e.node;var r=n(e,["node"]);return i("ul",t({},r,{style:{display:"flex",flexDirection:"column",gap:"1rem",listStyle:"decimal",paddingLeft:"2.5rem"}},{children:null==r?void 0:r.children}))},rule:function(e){e.node;var t=n(e,["node"]);return i(v,{content:b(t.children)})},button:function(e){var r=e.node,a=e.className,o=n(e,["node","className"]),c=Le.current,l=c.isLastMessage,s=c.handleStream,d=c.isStreamEnd;return i(g,t({node:r,className:a||o.class,handleStream:s,onAction:Re,disabled:!l||!!F,isStreamEnd:d,isLastMessage:l,onTypeResponseClick:J,baseURL:P},o))},checkbox:function(e){var r=e.node,a=e.className,o=n(e,["node","className"]),c=Le.current,l=c.selectedTiers,s=c.tiersSubmitted,d=c.isLastMessage;return i(f,t({node:r,className:a||o.class,selectedItems:l,onToggle:Be,isSubmitted:s,disabled:!d||!!F},o))},a:function(e){var n=Le.current,r=n.chatSize,a=n.openCitationIds;return i(h,t({},e,{chatSize:r,openCitationIds:a,getCitationByNumber:je,handleToggleState:Me,isStreamEnd:Le.current.isStreamEnd}))},div:function(e){var n=Le.current,r=n.openCardIds,a=n.citations,o=n.isLastMessage,c=n.isStreamEnd,l=n.gapsSubmitted,s=n.onTypeResponseClick;return i(S,t({},e,{openCardIds:r,citations:a,handleToggleState:Me,isStreamEnd:c,isLastMessage:o,handleStream:N,onGapValidation:Ne,isGapsSubmitted:l,onViewComparison:G,onComparisonLinkClick:V,onTypeResponseClick:s,isGlobalEditActive:F}))},span:function(e){var n,r,a;if((null===(n=e.className)||void 0===n?void 0:n.includes("cognitive-card-trigger"))||(null===(r=e.className)||void 0===r?void 0:r.includes("view-form-update-trigger"))||(null===(a=e.className)||void 0===a?void 0:a.includes("view-identified-fields-trigger"))){var o=Le.current,c=o.openCardIds,l=o.citations,s=o.isLastMessage,d=o.isStreamEnd;return i(y,t({},e,{openCardIds:c,citations:l,handleToggleState:Me,onComparisonLinkClick:V,isStreamEnd:!s||d}))}return i("span",t({},e))},"variant-card":function(e){e.node;var r=n(e,["node"]),a=r.variantname,o=r.decisionstrength,c=r.id,l=Le.current,s=l.isCommitted,d=l.isLastMessage,u=l.selectedVariant;if(!U)return null;var p=(null==u?void 0:u.id)===c,m=parseInt(o||"0");return i(k,t({variantName:a,decisionStrength:m,isEditable:!s&&d&&!F,isSelected:p,onToggle:function(e){return ze(c,e,a,m)},onEdit:function(){return We()}},{children:r.children}))},br:function(e){return i("p",t({style:{marginBottom:"0.75rem"}},e))}}},[Re,Be,je,Me,M,pe,oe,U,Ne,ze,F]);u(function(){ie||($(L),setTimeout(function(){null==I||I()},50))},[L,ie,I]);var Ue=d(0);u(function(){var e=xe.size+Ee.size;e>0&&0===Ue.current?null==W||W(50):0===e&&Ue.current>0&&(null==W||W(40)),Ue.current=e},[xe,Ee,W]);var Ge=function(e){if(!e)return"";for(var n=e,t=function(e){if("critical_gaps"===e.property){var t=e.data,i=(null==t?void 0:t.critical_gaps)||t,r=(null==i?void 0:i.gap_cards)||(null==i?void 0:i.gaps)||[],a=Array.isArray(r)?r:r&&"object"==typeof r?[r]:[];console.log("processing safe guard :",a);var o={count:String((null==i?void 0:i.count)||0),decisionStrength:(null==i?void 0:i.critical_gaps_decision_strength)||(null==i?void 0:i.decisionStrength)||"0",value:(null==i?void 0:i.value)||"",gaps:a.map(function(e,n){var t,i,r,a,o,c,l=C((null==e?void 0:e.gap_value)||(null==e?void 0:e.value)||""),s=l.text,d=l.aiReasoning,u=(null==e?void 0:e.ai_reasoning)||(null==e?void 0:e.aiReasoning)||d,p=(null===(t=null==e?void 0:e.interaction)||void 0===t?void 0:t.options)||(null==e?void 0:e.options)||[],m=(Array.isArray(p)?p:[p].filter(Boolean)).map(function(e){var n,t=C((null==e?void 0:e.label)||(null==e?void 0:e.text)||""),i=t.text,r=t.aiReasoning,a=(null==e?void 0:e.ai_reasoning)||(null==e?void 0:e.aiReasoning)||r,o=null!==(n=e.explanation)&&void 0!==n?n:null;if("string"==typeof o)try{o=o.startsWith("[")&&o.endsWith("]")?JSON.parse(o.replace(/"/g,'"')):o?[o]:null}catch(e){o=o?[o]:null}return{id:null==e?void 0:e.id,text:i,explanation:o,aiReasoning:T(a),is_recommended:(null==e?void 0:e.is_recommended)||(null==e?void 0:e.isRecommended)||!1}});return{id:(null==e?void 0:e.id)||"gap-".concat(n),name:(null==e?void 0:e.gap_name)||(null==e?void 0:e.name)||"Gap",decisionStrength:(null==e?void 0:e.gap_decision_strength)||(null==e?void 0:e.decisionStrength)||"0",impact:(null==e?void 0:e.impact)||"Medium",value:s,aiReasoning:T(u),inputType:"textfield"===(null===(i=null==e?void 0:e.interaction)||void 0===i?void 0:i.interaction_type)||"text"===(null==e?void 0:e.inputType)?"text":"radioselect"===(null===(r=null==e?void 0:e.interaction)||void 0===r?void 0:r.interaction_type)||"radio"===(null===(a=null==e?void 0:e.interaction)||void 0===a?void 0:a.interaction_type)||"radio"===(null==e?void 0:e.inputType)?"radio":"checkbox"===(null===(o=null==e?void 0:e.interaction)||void 0===o?void 0:o.interaction_type)||"checkbox"===(null==e?void 0:e.inputType)?"checkbox":"text",options:m,userSelection:"checkbox"===(null===(c=null==e?void 0:e.interaction)||void 0===c?void 0:c.interaction_type)||"checkbox"===(null==e?void 0:e.inputType)?[]:""}})},c=JSON.stringify(o).replace(/"/g,""");n=n.replace(e.rawMatch,'\n\n<div class="critical-gaps-trigger" data-payload="'.concat(c,'"></div>\n\n'))}else if("updated_fields"===e.property||"identified_fields"===e.property){var l=(null==e?void 0:e.data)&&"object"==typeof e.data?e.data:{},s={title:"Rule Title",description:"Description",rule_description:"Description",wta:"When to Apply",wnta:"When NOT to Apply",scope:"Tier Information",rule_type:"Rule Type"},d=["ai_reasoning","scheduling_config","is_user_accepted_risk"],u=[];Object.keys(l).forEach(function(e){var n;try{var t=l[e];if(d.includes(e)||null==t)return;var i=s[e]||e.replace(/_/g," ").replace(/\b\w/g,function(e){return e.toUpperCase()}),r="",a=null,o=function(e){var n,t=C(e);return{text:null===(n=t.text)||void 0===n?void 0:n.trim(),reasoning:t.aiReasoning||null}};if("string"==typeof t){var c=o(t);r=c.text,a=c.reasoning}else if(Array.isArray(t)){var p=t.map(function(e){return"string"==typeof e?o(e):{text:JSON.stringify(e),reasoning:null}}).filter(function(e){return e.text});r=p.map(function(e){return e.text}).join(", "),a=(null===(n=p.find(function(e){return e.reasoning}))||void 0===n?void 0:n.reasoning)||null}else if("object"==typeof t)try{r=JSON.stringify(t,null,2)}catch(e){r=String(t)}else r=String(t);r&&u.push({label:"".concat(i,": ").concat(r),reasoning:a})}catch(n){console.error('Error processing field "'.concat(e,'":'),n)}});var p="updated_fields"===e.property?"Updated Details":"Identified Details";if(0===u.length)n=n.replace(e.rawMatch,"");else try{var m={title:p,fields:u},v=(c=JSON.stringify(m).replace(/"/g,"""),"updated_fields"===e.property?"view-form-update-trigger":"view-identified-fields-trigger");n=n.replace(e.rawMatch,'<span class="'.concat(v,'" data-payload="').concat(c,'"></span>'))}catch(t){n=n.replace(e.rawMatch,"")}}else if("variant_card"===e.property){var g=e.data.variants.map(function(e){var n,t,i,r;return'<variant-card id="'.concat(e.id||"",'" variantname="').concat(e.variant_name||e.variantname||"",'" decisionstrength="').concat(null!==(t=null!==(n=e.decision_strength)&&void 0!==n?n:e.decisionstrength)&&void 0!==t?t:"0",'" iseditable="').concat(e.iseditable||"false",'" isselected="').concat(null!==(r=null!==(i=e.is_selected)&&void 0!==i?i:e.isselected)&&void 0!==r?r:"false",'">').concat(e.description||e.innerContent||"","</variant-card>")}).join("\n\n");n=n.replace(e.rawMatch,"\n\n".concat(g,"\n\n"))}else if("rule_validation_card"===e.property){var f=e.data,h=function(e){return String(null!=e?e:"").replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")};g=(Array.isArray(null==f?void 0:f.validated_rules)?f.validated_rules:[f]).map(function(e){var n=C(e.rule_description||e.ruleDescription||""),t=n.text,i=n.aiReasoning,r=C(e.rule_title||e.ruleTitle||""),a=r.text,o=r.aiReasoning,c=i||o,l="";return c&&(l="<ai_reasoning>\n <id>".concat(c.id||"","</id>\n <reason>").concat(c.reason||"","</reason>\n <gap>").concat(c.gap||"","</gap>\n <relevance_score>").concat(c.score||"","</relevance_score>\n </ai_reasoning>")),'<div class="rule-validation-card-trigger"\n data-type="'.concat(h(e.validation_type||e.validationType),'"\n data-decision-strength="').concat(h(e.decision_strength||e.decisionStrength),'"\n data-title="').concat(h(a),'"\n data-tier="').concat(h(e.tier),'"\n data-rule-id="').concat(h(e.rule_id||e.ruleId),'"\n data-description="').concat(h(t),'">\n ').concat(l,"\n </div>")}).join("\n\n");n=n.replace(e.rawMatch,"\n\n".concat(g,"\n\n"))}},i=0,r=x(n);i<r.length;i++){t(r[i])}n=(n=(n=(n=(n=(n=n.replace(/\\"/g,'"').replace(/\\'/g,"'").replace(/\u00A0/g," ").replace(/\r\n/g,"\n")).replace(/```(?:\w+)?\n?([\s\S]*?)```/gi,"$1")).replace(/<br\s*\/?>/gi,"\n\n")).replace(/<(singleselect|multiselect|instantselect)>([\s\S]*?)<\/\1>/gi,function(e,n,t){var i="multi";return"singleselect"===n?i="single":"instantselect"===n&&(i="instant"),'\n\n<div class="markdown-select-trigger" data-type="'.concat(i,'">').concat(t,"</div>\n\n")})).replace(/<selectoption\s+([\s\S]*?)>([\s\S]*?)<\/selectoption>/gi,function(e,n,t){for(var i,r={},a=/([a-z0-9-]+)\s*=\s*(["'])([\s\S]*?)\2/gi;null!==(i=a.exec(n));)r[i[1]]=i[3];return'<div class="select-option-item" data-id="'.concat(r.id||"",'" data-cd="').concat(r.cd||"false",'">').concat(t,"</div>")})).replace(/<!--<ai_reasoning>(?![\s\S]*?<\/ai_reasoning>-->)[\s\S]*$/gi,"");["ai_reasoning"].forEach(function(e){var t=new RegExp("\x3c!--\\s*(<".concat(e,">[\\s\\S]*?<\\/").concat(e,">)\\s*--\x3e"),"gi");n=n.replace(t,"$1")});var a=0;n=n.replace(/<ai_reasoning>([\s\S]*?)<\/ai_reasoning>/gi,function(e,n){var t=n.replace(/\[([^\]]+)\]\(([^)]+)\)/g,function(e,n,t){return'<a href="'.concat(t,'" data-shielded="true">').concat(n,"</a>")});return t=t.replace(/</g,"<").replace(/>/g,">"),a++,'<span class="cognitive-card-trigger" data-card-id="card-'.concat(a,'">').concat(t,"</span>")});var o=0;return n.replace(/(\[[^\]]+\]\()([^)]+)(\))/g,function(e,n,t,i){var r=t.replace(/\s/g,"%20");if(r.includes("citationNumber=")){o++;var a=r.includes("?")?"&":"?";return"".concat(n).concat(r).concat(a,"uiUniqueId=").concat(o).concat(i)}return"".concat(n).concat(r).concat(i)})},Je=m(function(){return[c]},[]),Ve=m(function(){return[l]},[]),Pe=(null==pe?void 0:pe.variantName)||"Selected Behavior",qe=ge.some(function(e){return!(!e.userSelection||!e.options)&&(Array.isArray(e.userSelection)?e.userSelection:[e.userSelection]).some(function(n){var t=e.options.find(function(e){return e.text===n});return"typeYourAnswer"===(null==t?void 0:t.id)||"type your response"===n.trim().toLowerCase()})}),Fe=Se&&U&&(j||ke)&&!qe,He=m(function(){return x(K).some(function(e){return"variant_card"===e.property})},[K]);return r(a,{children:[r("div",t({style:{lineHeight:"1.625rem",fontSize:"1rem",marginTop:"0.5rem",marginBottom:"".concat("assistant"===M?"0.3rem":"0rem"),fontFamily:"Plus Jakarta Sans, sans-serif"}},{children:[i(o,t({components:Oe,rehypePlugins:Je,remarkPlugins:Ve},{children:Ge(K)}),A),U&&He&&r("div",t({style:{gap:"8px"}},{children:[r(g,t({className:"clickable-button",handleStream:N,disabled:!j||!pe&&!oe||oe&&"add"!==se||F,isStreamEnd:O,onAction:function(){return Re("Add ".concat(Pe),!0,"add")},"data-selected":"add"===se?"true":oe?"false":void 0,baseURL:P},{children:["Add ",Pe]})),r(g,t({className:"clickable-button",handleStream:N,disabled:!j||!pe&&!oe||oe&&"edit"!==se||F,isStreamEnd:O,onAction:function(){return Re("Edit ".concat(Pe),!0,"edit")},"data-selected":"edit"===se?"true":oe?"false":void 0,baseURL:P},{children:["Edit ",Pe]})),i(g,t({className:"clickable-button",handleStream:N,disabled:!j||oe&&"skip"!==se||F,isStreamEnd:O,onAction:function(){return Re("Skip for now",!0,"skip")},"data-selected":"skip"===se?"true":oe?"false":void 0,baseURL:P},{children:"Skip for now"}))]})),Fe&&i("div",t({style:{marginTop:"12px",display:"flex",justifyContent:"flex-start"}},{children:i(w,{type:"instant",options:[{id:"proceed-gaps",label:"Proceed"}],selectedIds:ke?["proceed-gaps"]:[],disabled:ke,citations:[],onProceed:Ie})}))]})),i("div",t({style:{display:"flex",maxWidth:"100%"}},{children:i("div",t({style:{width:"100%"}},{children:(null==Q?void 0:Q.length)>0&&ee&&!ie?r("div",t({style:{marginTop:"10px"}},{children:[r("span",{children:["It looks like you've chosen ",Q&&0!==Q.length?Q.some(function(e){return"both tiers"===e.toLowerCase()||"all tiers"===e.toLowerCase()})?"Both Tiers":Q.join(", "):"",". Would you like me to proceed?"]}),i("p",{children:i("button",t({style:{padding:"0.5rem 1rem",margin:"0.5rem 0",backgroundColor:"#2661eb",color:"white",border:"none",borderRadius:"8px",cursor:"pointer",fontSize:"0.75rem",fontWeight:"500",fontFamily:"Plus Jakarta Sans, sans-serif"},onClick:De},{children:"Yes"}))})]})):null}))})),i(_,{isLastMessage:j,isStreamEnd:O,role:M,content:L,messages:R,index:A,onFeedbackSubmit:q})]})};export{E as default};
|
|
2
2
|
//# sourceMappingURL=MessageRendering.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import e from"style-inject";var o={skeleton:"SkeletonLoader-module_skeleton__CznvH","skeleton-loading":"SkeletonLoader-module_skeleton-loading__MVHfe","skeleton-text":"SkeletonLoader-module_skeleton-text__V5j2O","skeleton-title":"SkeletonLoader-module_skeleton-title__goxHt","skeleton-avatar":"SkeletonLoader-module_skeleton-avatar__Ihuh7","skeleton-image":"SkeletonLoader-module_skeleton-image__ddADp"};e(".SkeletonLoader-module_skeleton__CznvH{animation:SkeletonLoader-module_skeleton-loading__MVHfe 1.4s ease infinite;background:linear-gradient(90deg,#e0e0e0 25%,#f0f0f0 37%,#e0e0e0 63%);background-size:400% 100%;border-radius:4px;display:inline-flex;margin:0}.SkeletonLoader-module_skeleton-text__V5j2O{height:14px;width:100%}.SkeletonLoader-module_skeleton-title__goxHt{height:20px;width:60%}.SkeletonLoader-module_skeleton-avatar__Ihuh7{border-radius:50%;height:48px;width:48px}.SkeletonLoader-module_skeleton-image__ddADp{border-radius:8px;height:180px;width:100%}@keyframes SkeletonLoader-module_skeleton-loading__MVHfe{0%{background-position:100% 0}to{background-position:0 0}}");export{o as default};
|
|
1
|
+
import e from"../../../../../node_modules/style-inject/dist/style-inject.es.js";var o={skeleton:"SkeletonLoader-module_skeleton__CznvH","skeleton-loading":"SkeletonLoader-module_skeleton-loading__MVHfe","skeleton-text":"SkeletonLoader-module_skeleton-text__V5j2O","skeleton-title":"SkeletonLoader-module_skeleton-title__goxHt","skeleton-avatar":"SkeletonLoader-module_skeleton-avatar__Ihuh7","skeleton-image":"SkeletonLoader-module_skeleton-image__ddADp"};e(".SkeletonLoader-module_skeleton__CznvH{animation:SkeletonLoader-module_skeleton-loading__MVHfe 1.4s ease infinite;background:linear-gradient(90deg,#e0e0e0 25%,#f0f0f0 37%,#e0e0e0 63%);background-size:400% 100%;border-radius:4px;display:inline-flex;margin:0}.SkeletonLoader-module_skeleton-text__V5j2O{height:14px;width:100%}.SkeletonLoader-module_skeleton-title__goxHt{height:20px;width:60%}.SkeletonLoader-module_skeleton-avatar__Ihuh7{border-radius:50%;height:48px;width:48px}.SkeletonLoader-module_skeleton-image__ddADp{border-radius:8px;height:180px;width:100%}@keyframes SkeletonLoader-module_skeleton-loading__MVHfe{0%{background-position:100% 0}to{background-position:0 0}}");export{o as default};
|
|
2
2
|
//# sourceMappingURL=SkeletonLoader.module.css.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__assign as n}from"tslib";import{jsxs as t,jsx as i,Fragment as e}from"react/jsx-runtime";import{Check as o,X as c,Pencil as r,Trash2 as l,AlertTriangle as a,Loader2Icon as d,Plus as s}from"lucide-react";import{useState as u,useRef as f,useEffect as m,useCallback as v}from"react";import{Button as p}from"../../atoms/Button/Button.js";import{Textarea as g}from"../../atoms/Textarea/Textarea.js";import{InputDataReasoningCard as h}from"../../InputDataReasoningCard.js";import x from"../../TooltipComponent.js";import{ButtonCognitiveIcon as y}from"../../_svg/ButtonCognitiveIcon.js";var C=function(C){var b=C.
|
|
1
|
+
import{__assign as n}from"tslib";import{jsxs as t,jsx as i,Fragment as e}from"react/jsx-runtime";import{Check as o,X as c,Pencil as r,Trash2 as l,AlertTriangle as a,Loader2Icon as d,Plus as s}from"lucide-react";import{useState as u,useRef as f,useEffect as m,useCallback as v}from"react";import{Button as p}from"../../atoms/Button/Button.js";import{Textarea as g}from"../../atoms/Textarea/Textarea.js";import{InputDataReasoningCard as h}from"../../InputDataReasoningCard.js";import x from"../../TooltipComponent.js";import{ButtonCognitiveIcon as y}from"../../_svg/ButtonCognitiveIcon.js";var C=function(C){var b=C.idPrefix,N=C.items,_=C.onAdd,S=C.onRemove,E=C.onEdit,w=C.index,I=C.tierKey,A=C.readOnly,k=void 0!==A&&A,R=C.placeholder,T=void 0===R?"Enter your condition":R,j=C.addLabel,z=void 0===j?"Add Condition":j,D=C.showAddButton,O=void 0===D||D;C.isHighlighted;var B=C.highlightedIds;C.footer;var M=C.tooltipDescription,H=C.citations,K=void 0===H?[]:H,L=C.setSendMessageInChat,P=C.fieldName,W=C.isAiStreaming,U=void 0!==W&&W,V=C.activeEditId,G=C.setActiveEditId,q=C.pendingEditId;C.setPendingEditId;var F=u({}),J=F[0],Q=F[1],X=u(null),Y=X[0],Z=X[1],$=u(null),nn=$[0],tn=$[1],en=u(null),on=en[0],cn=en[1],rn=u(null),ln=rn[0],an=rn[1],dn=f(""),sn=f(U),un=f(new Map),fn=f(N);m(function(){var t=fn.current,i=N.filter(function(n){return!t.find(function(t){return t.id===n.id})});if(i.length>0){Q(function(t){var e=n({},t);return i.forEach(function(n){return e[n.id]=n.text}),e});var e=i[i.length-1];if(!e.text||""===e.text.trim()){var o="".concat(b,"-").concat(I,"-").concat(w,"-").concat(e.id);G&&G(o),Z(e.id)}}fn.current=N},[N,I,w,G]),m(function(){if(Y){var n=un.current.get(Y);if(n){n.focus();var t=n.value.length;n.setSelectionRange(t,t)}Z(null)}},[Y,N]),m(function(){if(sn.current&&!U&&null!==on){var t=N.find(function(n){return n.id===on}),i=t?t.text:"";if(L){var e=("string"==typeof P&&""!==P.trim()?P:null)||"field",o="";o="remove"===ln?"Remove ".concat(e," ").concat(dn.current):"add"===ln?"Add ".concat(e," to ").concat(i):"Update ".concat(e," with ").concat(i),L("__SKELETON_END__::".concat(o))}ln&&G&&G(null),Q(function(t){var i=n({},t);return delete i[on],i}),cn(null),an(null)}sn.current=U},[U,on,ln,N,L,P,G]);var mn=v(function(n){n&&(n.style.height="auto",n.style.height="".concat(n.scrollHeight,"px"))},[]),vn=N.some(function(n){return!n.text||""===n.text.trim()}),pn=N.filter(function(n){return n.text&&""!==n.text.trim()}),gn=new Set(pn.map(function(n){return n.text.trim()})).size!==pn.length,hn=vn||gn||null!==V;return t("div",n({className:"condition-wrapper"},{children:[N.map(function(d,s){var u,f,m,v,C,_,A="".concat(b,"-").concat(I,"-").concat(w,"-").concat(d.id),R=V===A,j=null!==V&&V!==A,z=(null==B?void 0:B.has(d.id))&&null===on,D=on===d.id,O=d.text,H=!!d.conflict,W=(null===(u=d.conflict)||void 0===u?void 0:u.reason)||(H?"Conflicting":null),U=Array.isArray(null===(f=d.conflict)||void 0===f?void 0:f.conflicting_reasoning)?d.conflict.conflicting_reasoning.map(function(n){return"- ".concat(n)}).join("\n"):(null===(m=d.conflict)||void 0===m?void 0:m.conflicting_reasoning)||null,F=(null===(v=d.conflict)||void 0===v?void 0:v.decision_strength)||null,X=Array.isArray(null===(C=d.conflict)||void 0===C?void 0:C.conflicting_gap)?d.conflict.conflicting_gap.map(function(n){return"- ".concat(n)}).join("\n"):(null===(_=d.conflict)||void 0===_?void 0:_.conflicting_gap)||null,Y=!!d.reasoning,$=nn===d.id,en=k||D,rn=k||D||!R;return t("div",n({className:"condition-row-container","data-edit-id":A,style:{marginBottom:Y&&$?"16px":"8px"}},{children:[t("div",n({className:"condition-item ".concat(H?"border-red-500":""," ").concat(R?"is-editing":""),style:{opacity:null===on||D?1:.5,pointerEvents:"auto"}},{children:[i("div",n({className:"condition-left"},{children:i(g,{ref:function(n){n?(un.current.set(d.id,n),mn(n)):un.current.delete(d.id)},rows:1,placeholder:T,value:O,onChange:function(n){return E(I,w,d.id,n.target.value)},showNumber:!0,numberIndex:s+1,isReadOnly:en,inputReadOnly:rn,isOpen:$&&!R,onToggle:function(){return n=d.id,void tn(function(t){return t===n?null:n});var n},showCognitiveIcon:Y&&!R&&!H,cognitiveIcon:i(y,{}),tooltipDescription:M,isConflicting:H,conflictMsg:W,conflictingReasoning:U,isHighlighted:z,decisionStrength:F,conflictingGap:X})})),!k&&i("div",n({className:"action-buttons"},{children:R?i("div",n({className:"action-buttons-inline"},{children:!D&&t(e,{children:[i(x,n({description:"Save"},{children:i(p,n({onClick:function(){return function(t){var i=N.find(function(n){return n.id===t}),e=(null==i?void 0:i.text)||"";if(e.trim()&&!N.some(function(n){return n.id!==t&&n.text.trim()===e.trim()})){var o=e,c=J[t]||"";if(o===c)return G&&G(null),void Q(function(i){var e=n({},i);return delete e[t],e});var r=!c||""===c.trim();if(cn(t),an(r?"add":"update"),L){var l="sk-".concat(Date.now(),"-").concat(Math.random().toString(36).slice(2,8)),a=("string"==typeof P&&""!==P.trim()?P:null)||"field",d=r?"Add ".concat(a," to ").concat(o):"Update ".concat(a," with ").concat(e);L("__SKELETON__:".concat(l,":").concat(d))}}}(d.id)},className:"btn-apply",icon:i(o,{size:20,strokeWidth:2.5})},{children:"Apply"}))})),i(x,n({description:"Cancel"},{children:i(p,{onClick:function(){return function(t){if(null===on){var i=J[t.id];void 0!==i&&(""===i?S(I,w,t.id):E(I,w,t.id,i)),G&&G(null),Q(function(i){var e=n({},i);return delete e[t.id],e})}}(d)},className:"btn-cancel-inline",icon:i(c,{size:20,strokeWidth:2.5})})}))]})})):t("div",n({className:"action-buttons"},{children:[i(x,n({description:j?"Save active edits first":"Edit this condition"},{children:i(p,{onClick:function(){return function(t){var i="".concat(b,"-").concat(I,"-").concat(w,"-").concat(t.id);V&&V!==i||(G&&G(i),Q(function(i){var e;return n(n({},i),((e={})[t.id]=t.text,e))}),Z(t.id))}(d)},className:"btn-icon btn-edit",icon:i(r,{size:18}),disabled:null!==on})})),i(x,n({description:j?"Save active edits first":"Delete this condition"},{children:i(p,{onClick:function(){return function(t){var i="".concat(b,"-").concat(I,"-").concat(w,"-").concat(t.id);if(V===i&&G&&G(null),!(t.text||"").trim())return S(I,w,t.id),void Q(function(i){var e=n({},i);return delete e[t.id],e});if(L){var e=t.text||"",o=("string"==typeof P&&""!==P.trim()?P:null)||"field",c="sk-".concat(Date.now(),"-").concat(Math.random().toString(36).slice(2,8)),r="Remove ".concat(o," ").concat(e);L("__SKELETON__:".concat(c,":").concat(r)),cn(t.id),an("remove"),dn.current=e}else S(I,w,t.id)}(d)},className:"btn-icon btn-delete",icon:i(l,{size:18}),disabled:null!==on})}))]}))}))]})),q===A&&R&&t("div",n({style:{display:"flex",alignItems:"center",gap:"6px",marginTop:"8px"}},{children:[i(a,{style:{color:"#C2410C"}}),i("div",n({style:{display:"flex",color:"#C2410C",fontSize:"13px",paddingTop:"8px",alignItems:"center"}},{children:"Pending - Changes not applied yet. Apply or discard them to continue."}))]})),Y&&!H&&i("div",n({style:{maxHeight:$?"1000px":"0",overflow:"hidden",transition:"all 0.3s ease-in-out",marginTop:$?"1.5px":"0"}},{children:i(h,{isVisible:$,citation:d.reasoning,citations:K,fieldName:"Condition ".concat(s+1),fieldValue:d.text})}))]}),d.id)}),null!==on&&t(e,{children:[i("style",{children:"\n @keyframes spin {\n from { transform: rotate(0deg); }\n to { transform: rotate(360deg); }\n }\n "}),t("div",n({style:{display:"flex",alignItems:"center",justifyContent:"flex-start",padding:"4px 0 12px 12px",color:"#141414ff",fontSize:"13px",fontWeight:500,fontStyle:"italic"}},{children:[i(d,{style:{marginRight:8,animation:"spin 1s linear infinite"}})," ","remove"===ln?"Removing condition...":"Checking the correctness of your updated condition..."]}))]}),0===N.length&&i("div",n({style:{display:"flex",alignItems:"center",color:"#bbb",fontSize:"14px",height:"40px",marginBottom:"8px"}},{children:"No items to show"})),O&&!k&&t("div",n({className:"condition-add ".concat(hn?"disabled":""),onClick:function(){return!hn&&_()},role:"button",style:{opacity:hn?.5:1,cursor:hn?"not-allowed":"pointer"}},{children:[i(s,{size:20,className:"condition-add-icon"}),i("span",n({className:"condition-add-text"},{children:z}))]}))]}))};export{C as ConditionList};
|
|
2
2
|
//# sourceMappingURL=ConditionList.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__rest as
|
|
1
|
+
import{__rest as i,__assign as e}from"tslib";import{jsxs as t,jsx as d}from"react/jsx-runtime";import{SectionWrapper as n}from"../../molecules/Sections/SectionWrapper.js";import{ConditionList as o}from"../../molecules/Condition/ConditionList.js";var s=function(s){var r=s.conditions,a=s.onAdd,l=s.onRemove,g=s.onEdit,c=s.index,h=s.isHighlighted,p=s.highlightedIds,m=s.footer,I=s.tooltipDescription,f=s.citations,E=s.addLabel,v=s.title;s.sendMessageInChat;var x=s.setSendMessageInChat,A=s.readOnly,S=s.isAiStreaming,C=s.errorMessage,M=s.activeEditId,u=s.setActiveEditId,y=s.pendingEditId,P=s.setPendingEditId,b=s.idPrefix,L=i(s,["conditions","onAdd","onRemove","onEdit","index","isHighlighted","highlightedIds","footer","tooltipDescription","citations","addLabel","title","sendMessageInChat","setSendMessageInChat","readOnly","isAiStreaming","errorMessage","activeEditId","setActiveEditId","pendingEditId","setPendingEditId","idPrefix"]);return t(n,e({},L,{title:v,collapsible:!0,defaultOpen:!0},{children:[d(o,{items:r,onAdd:a,onRemove:l,onEdit:g,index:c,tierKey:L.tierKey,readOnly:A,isHighlighted:h,highlightedIds:p,footer:m,tooltipDescription:I,citations:f,addLabel:E,setSendMessageInChat:x,fieldName:v,isAiStreaming:S,activeEditId:M,setActiveEditId:u,pendingEditId:y,setPendingEditId:P,idPrefix:b}),C&&d("div",e({style:{color:"#ef4444",fontSize:"12px",marginTop:"4px"}},{children:C}))]}))};export{s as ConditionSection};
|
|
2
2
|
//# sourceMappingURL=ConditionSection.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__assign as e,__spreadArray as n,__rest as t}from"tslib";import{jsxs as i,jsx as r}from"react/jsx-runtime";import o,{useState as l,useRef as a,useEffect as s,useMemo as d}from"react";import{Box as c,Typography as p,IconButton as h,Skeleton as u}from"@mui/material";import{ArrowLeft as g,ArrowRight as x}from"lucide-react";import f from"../../_svg/SparkleIcon.js";import{CognitiveDecisioningCard as m}from"@e-llm-studio/citation";import{ButtonCognitiveIcon as b}from"../../_svg/ButtonCognitiveIcon.js";var v=function(e,n){if(!n)return null;var t=new RegExp("<".concat(e,"[^>]*>([\\s\\S]*?)<\\/").concat(e,">"),"i"),i=n.match(t);return i?i[1].replace(/\\n/g,"\n"):null},y=function(e,n,t){var i=100*e;if(!t)return{bg:"#FFFFFF",border:"#E2E8F0",badgeBg:"#F1F5F9",badgeBorder:"#CBD5E1",badgeText:"#64748B",highlightBg:"transparent",label:"Not Defined"};var r=function(e){return e&&"null"!==e.toLowerCase()?e.split("_").map(function(e){return e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()}).join(" "):"Different"}(n);return i>=70?{bg:"#FEF2F2",border:"#FEE2E2",badgeBg:"#FEF2F2",badgeBorder:"#FECACA",badgeText:"#B91C1C",highlightBg:"#FECACA",label:r}:i>=40?{bg:"#FFFCF6",border:"#FFDD80",badgeBg:"#FEF9C3",badgeBorder:"#FEF08A",badgeText:"#A16207",highlightBg:"#FDDEB3",label:r}:{bg:"#FFFFFF",border:"#E2E8F0",badgeBg:"#F1F5F9",badgeBorder:"#CBD5E1",badgeText:"#64748B",highlightBg:"transparent",label:r}},w=o.forwardRef(function(n,t){var o=n.label,l=n.content,a=n.highlights,s=void 0===a?[]:a,d=n.styleVariant,h=n.isHighlighted,u=void 0!==h&&h,g=Array.isArray(l)?l.join("\n"):l||"",x="#B91C1C"===d.badgeText?{borderColor:"#EF4444",shadow:"rgba(239, 68, 68, 0.25)"}:"#A16207"===d.badgeText?{borderColor:"#F59E0B",shadow:"rgba(245, 158, 11, 0.25)"}:{borderColor:"#6366F1",shadow:"rgba(99, 102, 241, 0.25)"};return i(c,e({sx:{mb:1.5}},{children:[r(p,e({sx:{fontSize:"12px",color:"#19213D",mb:.5,fontWeight:500,lineHeight:"130%"}},{children:o})),r(c,e({ref:t,sx:{p:"4px 12px",borderRadius:"6px",border:u?"1.5px solid ".concat(x.borderColor):"1px solid ".concat(d.border),boxShadow:u?"0px 0px 0px 2px ".concat(x.shadow):"none",bgcolor:d.bg,fontSize:"13px",color:"#0B0E1A",lineHeight:1.4,minHeight:"24px",display:"flex",alignItems:"center",whiteSpace:"pre-line",wordBreak:"break-word"}},{children:r(c,{children:function(){if(!g)return r(p,e({sx:{color:"#94A3B8",fontSize:"12px",fontStyle:"italic"}},{children:"Not Defined"}));if(!s||0===s.length)return g;var n=s.filter(function(e){return e&&e.length>0}).map(function(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")});if(0===n.length)return g;var t=new RegExp("(".concat(n.join("|"),")"),"gi");return g.split(t).map(function(n,t){return s.some(function(e){return e&&e.toLowerCase()===n.toLowerCase()})?r(c,e({component:"span",sx:{bgcolor:d.highlightBg,borderRadius:"2px",px:"2px"}},{children:n}),t):n})}()})}))]}))}),F=function(n){var t=n.data,o=n.isSelected,l=n.isCognitiveOpen,a=n.onToggleCognitive,s=n.onClick,d=t.summaryText||t.description||"",h=d.match(/<ai_reasoning>([\s\S]*?)<\/ai_reasoning>/i),g=h?d.replace(h[0],"").trim():d,x=!!h;return i(c,e({id:"variant-card-".concat(t.id),onClick:s,sx:{minWidth:"280px",maxWidth:"280px",p:2,m:.5,bgcolor:o?"#EFF6FF99":"#FFFFFF",borderRadius:"8px",cursor:"pointer",transition:"all 0.2s",display:"flex",flexDirection:"column",gap:1,flexShrink:0,opacity:t.isLoading?.7:1,border:o?"1.4px solid #2563EB":null,boxShadow:o?"none":"0px 2px 4px 0px #19213D14","&:hover":{borderColor:o?"#2563EB":"#CBD5E1",boxShadow:o?"none":"0px 4px 8px 0px #19213D1F"}}},{children:[r(c,e({sx:{display:"flex",alignItems:"center",gap:1.5}},{children:t.isLoading?r(u,{variant:"rounded",width:80,height:20}):i(c,e({sx:{bgcolor:"#FEF2F2",color:"#B91C1C",fontSize:"11px",fontWeight:600,px:1,py:.5,borderRadius:"100px",border:"1px solid #FFE1E1"}},{children:[void 0!==t.similarity?t.similarity:0,"% Similarity"]}))})),i(c,e({sx:{display:"flex",flexDirection:"column",gap:1}},{children:[i(c,e({sx:{display:"flex",alignItems:"center",gap:1,flexWrap:"nowrap"}},{children:[r(p,e({title:t.title,sx:{fontWeight:500,fontSize:"14px",color:"#19213D",lineHeight:1.2,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",display:"block"}},{children:t.title})),t.scope&&r(c,e({sx:{flexShrink:0,fontSize:"10px",fontWeight:600,color:"#19213D",bgcolor:"#FFF",border:"1px solid #EDEFF2",px:.75,py:.25,borderRadius:"6px",lineHeight:1.4,whiteSpace:"nowrap"}},{children:t.scope}))]})),t.isLoading?i(c,{children:[r(u,{width:"90%"}),r(u,{width:"60%"})]}):i(c,e({title:g,sx:{display:"flex",flexDirection:"column",gap:.5}},{children:[r(p,e({sx:{fontWeight:400,fontSize:"13px",color:"#666F8D",lineHeight:1.4,display:"-webkit-box",WebkitLineClamp:2,WebkitBoxOrient:"vertical",overflow:"hidden",textOverflow:"ellipsis"}},{children:g})),x&&i(c,e({onClick:function(e){e.stopPropagation(),o||s(),a()},sx:{display:"inline-flex",alignItems:"center",alignSelf:"flex-start",gap:"4px",padding:"2px 6px",borderRadius:"4px",cursor:"pointer",transition:"all 0.2s ease",marginLeft:"-4px","&:hover":{backgroundColor:"#F1F5F9"}}},{children:[r("div",e({style:{width:"13px",height:"13px",display:"flex",alignItems:"center"}},{children:r(b,{})})),r("svg",e({width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"#4B5563",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",style:{transform:o&&l?"rotate(180deg)":"rotate(0deg)",transition:"transform 0.2s ease"}},{children:r("path",{d:"M6 9l6 6 6-6"})}))]}))]}))]}))]}))},_=function(o){var u,_,C=o.proposedRule,B=o.variants,E=void 0===B?[]:B,k=o.onSelectVariant;o.onAddAsVariant;var S=o.onSkip,A=o.onBack,D=o.targetVariantId,W=o.highlightedField,L=l(D||null),z=L[0],T=L[1],R=l(!1),I=R[0],j=R[1],H=l(null),O=H[0],M=H[1],V=a(null),N=a(null);s(function(){if(D&&T(D),M(null!=W?W:null),W){var e=setTimeout(function(){return M(null)},6e3);return function(){return clearTimeout(e)}}},[D,W]);var U=function(e){V.current&&V.current.scrollBy({left:"left"===e?-300:300,behavior:"smooth"})},P=d(function(){return n([],E,!0).sort(function(e,n){return(n.similarity||0)-(e.similarity||0)})},[E]),Y=d(function(){if(z){var e=String(z).trim();return E.find(function(n){return n.id&&String(n.id).trim()===e})||P[0]}return P.length>0?P[0]:null},[z,E,P]);s(function(){if(z&&V.current){var e=z.trim();setTimeout(function(){var n=document.getElementById("variant-card-".concat(e)),t=V.current;if(n&&t){var i=n.offsetLeft-t.offsetLeft-t.clientWidth/2+n.clientWidth/2;t.scrollTo({left:i,behavior:"smooth"})}},150)}},[z,P]);var $=Y||{title:"",scope:"",description:"",wta:"",wnta:"",variantType:"Default"},q=null==Y?void 0:Y.analysis,J=(null===(_=null===(u=null==q?void 0:q.rule_difference_comparison)||void 0===u?void 0:u.summary)||void 0===_?void 0:_.overall_summary)||"",X=J.match(/<ai_reasoning>([\s\S]*?)<\/ai_reasoning>/i),G=!!X,K=X?X[1]:"",Q=v("reason",K)||"",Z=v("gap",K)||"",ee=v("relevance_score",K)||"",ne=d(function(){return{ul:function(n){n.node;var i=t(n,["node"]);return r("ol",e({},i,{style:{paddingLeft:"1.25rem",listStyleType:"decimal",margin:0}}))},li:function(n){n.node;var i=t(n,["node"]);return r("li",e({},i,{style:{marginBottom:"4px",listStyleType:"decimal"}},{children:i.children}))},ol:function(n){n.node;var i=t(n,["node"]);return r("li",e({},i,{style:{marginBottom:"4px",listStyleType:"decimal"}},{children:i.children}))},a:function(n){var o=n.href,l=n.children,a=t(n,["href","children"]);if(!o)return r("a",e({},a,{children:l}));var s=o||"";try{s=decodeURIComponent(o)}catch(e){console.error("Error decoding href",e)}if(s.includes("variant_id=")){var d="",c="",p=s.match(/variant_id=([^?&]+)/);p&&(d=p[1]);var h=s.match(/field_name=([^&]+)/);return h&&(c=h[1]),i("button",e({type:"button",onClick:function(e){e.preventDefault(),e.stopPropagation(),T(d),M(c),setTimeout(function(){return M(null)},6e3)},style:{background:"none",border:"none",outline:"none",borderRadius:"6px",padding:"1px 4px",color:"#0F172A",cursor:"pointer",fontSize:"13px",fontWeight:500,display:"inline-flex",alignItems:"center",gap:"2px",margin:"0 1px",verticalAlign:"baseline",textDecoration:"none",boxShadow:"none",WebkitAppearance:"none",MozAppearance:"none"},title:"View Comparison"},{children:[l,r("svg",e({width:"13",height:"13",viewBox:"0 0 13 13",fill:"none",xmlns:"http://www.w3.org/2000/svg"},{children:r("path",{d:"M10.2082 8.67708H2.0415M2.0415 8.67708L4.08317 6.63542M2.0415 8.67708L4.08317 10.7188M2.0415 3.57292H10.2082M10.2082 3.57292L8.1665 1.53125M10.2082 3.57292L8.1665 5.61458",stroke:"#0F172A",strokeWidth:"1.2",strokeLinecap:"round",strokeLinejoin:"round"})}))]}))}return r("a",e({href:o,target:"_blank",rel:"noopener noreferrer",style:{color:"#7C3AED"}},a,{children:l}))}}},[]);s(function(){!z&&!D&&P.length>0&&!P[0].isLoading&&T(P[0].id)},[P,z,D]);var te=a(null),ie=l([]),re=ie[0],oe=ie[1],le=l(!1),ae=le[0],se=le[1],de=l(!1),ce=de[0],pe=de[1];s(function(){var e=V.current;if(e){var n=function(){se(e.scrollLeft>0),pe(e.scrollLeft+e.clientWidth<e.scrollWidth-1)};return n(),e.addEventListener("scroll",n),window.addEventListener("resize",n),function(){e.removeEventListener("scroll",n),window.removeEventListener("resize",n)}}},[P]);var he={title:a(null),scope:a(null),description:a(null),wta:a(null),wnta:a(null)},ue={title:a(null),scope:a(null),description:a(null),wta:a(null),wnta:a(null)};s(function(){if(O){var e="when_to_apply"===O?"wta":"when_not_to_apply"===O?"wnta":O,n=he[e]||ue[e];n&&n.current&&setTimeout(function(){n.current.scrollIntoView({behavior:"smooth",block:"center"})},150)}},[O]);var ge=function(e){var n,t,i,r,o,l=null===(n=null==q?void 0:q.rule_difference_comparison)||void 0===n?void 0:n.fields,a="when_to_apply"===e?"wta":"when_not_to_apply"===e?"wnta":e,s=!(!C[a]&&!$[a]);if(!l||!l[e])return{score:0,relation:"",highlightsA:[],highlightsB:[],hasContent:!1};var d=l[e];if(d.mappings){var c=d.mappings[0]||{};return{score:d.score,relation:c.relation||"",highlightsA:(null===(t=c.highlights)||void 0===t?void 0:t.ruleA_spans)||[],highlightsB:(null===(i=c.highlights)||void 0===i?void 0:i.ruleB_spans)||[],hasContent:s}}return{score:d.score,relation:d.relation||"",highlightsA:(null===(r=d.highlights)||void 0===r?void 0:r.ruleA_spans)||[],highlightsB:(null===(o=d.highlights)||void 0===o?void 0:o.ruleB_spans)||[],hasContent:s}},xe=["title","scope","description","when_to_apply","when_not_to_apply"],fe=function(){if(te.current){var e=te.current.getBoundingClientRect(),n=[];xe.forEach(function(t){var i="when_to_apply"===t?he.wta:"when_not_to_apply"===t?he.wnta:he[t],r="when_to_apply"===t?ue.wta:"when_not_to_apply"===t?ue.wnta:ue[t];if(i.current&&r.current){i.current.style.height="auto",r.current.style.height="auto";var o=i.current.getBoundingClientRect(),l=r.current.getBoundingClientRect(),a=Math.max(o.height,l.height);i.current.style.height="".concat(a,"px"),r.current.style.height="".concat(a,"px");var s=i.current.getBoundingClientRect(),d=r.current.getBoundingClientRect(),c=ge(t),p=y(c.score,c.relation,c.hasContent),h=s.top+s.height/2-e.top;n.push({x1:s.right-e.left,y1:h,x2:d.left-e.left,y2:h,style:p})}}),oe(n)}};return s(function(){var e=setTimeout(fe,250);window.addEventListener("resize",fe);var n=null;return te.current&&(n=new ResizeObserver(function(){window.requestAnimationFrame(function(){fe()})})).observe(te.current),function(){clearTimeout(e),window.removeEventListener("resize",fe),n&&n.disconnect()}},[C,$,q,I]),i(c,e({sx:{display:"flex",flexDirection:"column",height:"100%",bgcolor:"#F6F7F9B2",fontFamily:'"Plus Jakarta Sans", sans-serif',overflow:"hidden"}},{children:[i(c,e({sx:{px:2,py:1,display:"flex",alignItems:"center",justifyContent:"space-between",bgcolor:"#FFFFFF",border:"1.5px solid #EEF0F4"}},{children:[i(c,e({sx:{display:"flex",alignItems:"center",gap:1}},{children:[r(h,e({onClick:A,size:"small"},{children:r(g,{})})),r(p,e({sx:{fontSize:"16px",fontWeight:450,color:"#0F172A"}},{children:"Rule Comparison"}))]})),r(h,e({onClick:S,size:"small"},{children:r(c,e({sx:{fontSize:24,lineHeight:.5}},{children:"×"}))}))]})),P.length>1&&i(c,e({sx:{px:3,pb:.25}},{children:[i(c,e({sx:{display:"flex",alignItems:"center",justifyContent:"space-between",py:1}},{children:[r(p,e({sx:{fontSize:"13px",color:"#475569"}},{children:"Choose the Learning you want to compare with the rule you are creating."})),i(c,e({sx:{display:"flex",gap:.5,flexShrink:0,ml:1}},{children:[r(h,e({onClick:function(){return U("left")},size:"small",disabled:!ae},{children:r(g,{size:18})})),r(h,e({onClick:function(){return U("right")},size:"small",disabled:!ce},{children:r(x,{size:18})}))]}))]})),r(c,e({ref:V,sx:{display:"flex",gap:1,overflowX:"auto",pb:.05,"&::-webkit-scrollbar":{height:"6px"},"&::-webkit-scrollbar-track":{background:"transparent"},"&::-webkit-scrollbar-thumb":{background:"transparent",borderRadius:"10px"},"&::-webkit-scrollbar-thumb:hover":{background:"transparent"}}},{children:P.map(function(e){return r(F,{data:e,isSelected:(null==Y?void 0:Y.id)===e.id,isCognitiveOpen:I,onToggleCognitive:function(){j(function(e){var n=!e;return n&&N.current&&N.current.scrollTo({top:0,behavior:"smooth"}),n})},onClick:function(){return T((n=e).id),k(n),void j(!1);var n}},e.id)})}))]})),r(c,e({ref:N,sx:{flex:1,overflowY:"auto",py:1.5,px:3,display:"flex",justifyContent:"center",alignItems:"flex-start",bgcolor:"#FFFFFF",borderTop:J&&G&&I?"none":"1.5px solid #EEF0F4"}},{children:i(c,e({sx:{display:"flex",flexDirection:"column",width:"100%",maxWidth:"1200px"}},{children:[J&&G&&I&&r(c,e({sx:{width:"100%",pb:1,animation:"fadeIn 0.2s ease-out","& > div > button":{display:"none !important"},"& > div > div":{marginTop:"0px"}}},{children:r(m,{headerIcon:r(b,{}),reasoning:Q,gap:Z,score:ee,mdComponents:ne,isOpen:!0,onToggle:function(){return j(!1)}})})),i(c,e({ref:te,sx:{display:"grid",gridTemplateColumns:"1fr auto 1fr",gap:"60px",maxWidth:"1200px",width:"100%",position:"relative"}},{children:[r("svg",e({style:{position:"absolute",top:0,left:0,width:"100%",height:"100%",pointerEvents:"none",zIndex:10}},{children:re.map(function(n,t){var o=(n.x1+n.x2)/2,l=n.y1;return i("g",{children:[r("line",{x1:n.x1,y1:n.y1,x2:n.x2,y2:n.y2,stroke:n.style.badgeBorder,strokeWidth:"1"}),r("foreignObject",e({x:o-125,y:l-16,width:"250",height:"32"},{children:r(c,e({sx:{display:"flex",justifyContent:"center",alignItems:"center",height:"100%"}},{children:r(c,e({sx:{fontSize:"11px",bgcolor:n.style.badgeBg,color:n.style.badgeText,border:"1px solid ".concat(n.style.badgeBorder),borderRadius:"12px",px:1.5,py:.25,fontWeight:500,textAlign:"center",whiteSpace:"nowrap"}},{children:n.style.label}))}))}))]},t)})})),i(c,e({sx:{border:"1px dashed #B0B0B0",borderRadius:"8px",bgcolor:"#FFFFFF",display:"flex",flexDirection:"column",position:"relative",zIndex:2,filter:"drop-shadow(0px 2px 4px #F2F2F2)",minWidth:0}},{children:[r(c,e({sx:{p:"8px",bgcolor:"#F7F8FA",borderBottom:"1px dashed #B0B0B0",borderRadius:"8px 8px 0 0",display:"flex",minHeight:"24px",alignItems:"center"}},{children:r(p,e({sx:{fontSize:"16px",fontWeight:500,color:"#19213D"}},{children:"Rule You’re Creating"}))})),r(c,e({sx:{p:"12px",display:"flex",flexDirection:"column"}},{children:xe.map(function(e){var n=ge(e),t=y(n.score,n.relation,n.hasContent),i="when_to_apply"===e?he.wta:"when_not_to_apply"===e?he.wnta:he[e],o=C["when_to_apply"===e?"wta":"when_not_to_apply"===e?"wnta":e];return r(w,{ref:i,label:"when_to_apply"===e?"When to apply":"when_not_to_apply"===e?"When NOT to Apply":e.charAt(0).toUpperCase()+e.slice(1).replace("_"," "),content:o,highlights:n.highlightsA,styleVariant:t,isHighlighted:O===e},"left-".concat(e))})}))]})),r(c,{sx:{width:"1px"}}),i(c,e({sx:{border:"1px solid #E3E6EA",borderRadius:"8px",bgcolor:"#FFFFFF",boxShadow:"0px 1px 4px #F7F4FE",position:"relative",zIndex:2,display:"flex",flexDirection:"column",minWidth:0}},{children:[r(c,e({sx:{p:"8px",bgcolor:"#F7F8FA",borderBottom:"1px solid #E3E6EA",borderRadius:"8px 8px 0 0",minHeight:"24px",display:"flex",alignItems:"center"}},{children:i(p,e({sx:{fontSize:"16px",fontWeight:500,color:"#5928ED",display:"flex",alignItems:"center",gap:1}},{children:[r("div",e({style:{width:"18px",height:"18px",display:"flex",alignItems:"center",justifyContent:"center"}},{children:r(f,{})})),"Existing Rule"]}))})),r(c,e({sx:{p:"12px",display:"flex",flexDirection:"column"}},{children:xe.map(function(e){var n=ge(e),t=y(n.score,n.relation,n.hasContent),i="when_to_apply"===e?ue.wta:"when_not_to_apply"===e?ue.wnta:ue[e],o=$["when_to_apply"===e?"wta":"when_not_to_apply"===e?"wnta":e];return r(w,{ref:i,label:"when_to_apply"===e?"When to apply":"when_not_to_apply"===e?"When NOT to Apply":e.charAt(0).toUpperCase()+e.slice(1).replace("_"," "),content:o,highlights:n.highlightsB,styleVariant:t,isHighlighted:O===e},"right-".concat(e))})}))]}))]}))]}))}))]}))};export{_ as default};
|
|
1
|
+
import{__assign as e,__spreadArray as n,__rest as t}from"tslib";import{jsxs as i,jsx as r}from"react/jsx-runtime";import o,{useState as l,useRef as a,useEffect as s,useMemo as d}from"react";import{Box as c,Typography as p,IconButton as h,Skeleton as g}from"@mui/material";import{ArrowLeft as u,ArrowRight as x}from"lucide-react";import f from"../../_svg/SparkleIcon.js";import{CognitiveDecisioningCard as m}from"@e-llm-studio/citation";import{ButtonCognitiveIcon as b}from"../../_svg/ButtonCognitiveIcon.js";var v=function(e,n){if(!n)return null;var t=new RegExp("<".concat(e,"[^>]*>([\\s\\S]*?)<\\/").concat(e,">"),"i"),i=n.match(t);return i?i[1].replace(/\\n/g,"\n"):null},y=function(e,n,t){var i=100*e;if(!t)return{bg:"#FFFFFF",border:"#E2E8F0",badgeBg:"#F1F5F9",badgeBorder:"#CBD5E1",badgeText:"#64748B",highlightBg:"transparent",label:"Not Defined"};var r=function(e){return e.split("_").map(function(e){return e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()}).join(" ")}(n);return i>=70?{bg:"#FEF2F2",border:"#FEE2E2",badgeBg:"#FEF2F2",badgeBorder:"#FECACA",badgeText:"#B91C1C",highlightBg:"#FECACA",label:r}:i>=40?{bg:"#FFFCF6",border:"#FFDD80",badgeBg:"#FEF9C3",badgeBorder:"#FEF08A",badgeText:"#A16207",highlightBg:"#FDDEB3",label:r}:{bg:"#FFFFFF",border:"#E2E8F0",badgeBg:"#F1F5F9",badgeBorder:"#CBD5E1",badgeText:"#64748B",highlightBg:"transparent",label:r}},w=o.forwardRef(function(n,t){var o=n.label,l=n.content,a=n.highlights,s=void 0===a?[]:a,d=n.styleVariant,h=n.isHighlighted,g=void 0!==h&&h,u=Array.isArray(l)?l.join("\n"):l||"",x="#B91C1C"===d.badgeText?{borderColor:"#EF4444",shadow:"rgba(239, 68, 68, 0.25)"}:"#A16207"===d.badgeText?{borderColor:"#F59E0B",shadow:"rgba(245, 158, 11, 0.25)"}:{borderColor:"#6366F1",shadow:"rgba(99, 102, 241, 0.25)"};return i(c,e({sx:{mb:1.5}},{children:[r(p,e({sx:{fontSize:"12px",color:"#19213D",mb:.5,fontWeight:500,lineHeight:"130%"}},{children:o})),r(c,e({ref:t,sx:{p:"4px 12px",borderRadius:"6px",border:g?"1.5px solid ".concat(x.borderColor):"1px solid ".concat(d.border),boxShadow:g?"0px 0px 0px 2px ".concat(x.shadow):"none",bgcolor:d.bg,fontSize:"13px",color:"#0B0E1A",lineHeight:1.4,minHeight:"24px",display:"flex",alignItems:"center",whiteSpace:"pre-line",wordBreak:"break-word"}},{children:r(c,{children:function(){if(!u)return r(p,e({sx:{color:"#94A3B8",fontSize:"12px",fontStyle:"italic"}},{children:"Not Defined"}));if(!s||0===s.length)return u;var n=s.filter(function(e){return e&&e.length>0}).map(function(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")});if(0===n.length)return u;var t=new RegExp("(".concat(n.join("|"),")"),"gi");return u.split(t).map(function(n,t){return s.some(function(e){return e&&e.toLowerCase()===n.toLowerCase()})?r(c,e({component:"span",sx:{bgcolor:d.highlightBg,borderRadius:"2px",px:"2px"}},{children:n}),t):n})}()})}))]}))}),F=function(n){var t=n.data,o=n.isSelected,l=n.isCognitiveOpen,a=n.onToggleCognitive,s=n.onClick,d=t.summaryText||t.description||"",h=d.match(/<ai_reasoning>([\s\S]*?)<\/ai_reasoning>/i),u=h?d.replace(h[0],"").trim():d,x=!!h;return i(c,e({id:"variant-card-".concat(t.id),onClick:s,sx:{minWidth:"280px",maxWidth:"280px",p:2,m:.5,bgcolor:o?"#EFF6FF99":"#FFFFFF",borderRadius:"8px",cursor:"pointer",transition:"all 0.2s",display:"flex",flexDirection:"column",gap:1,flexShrink:0,opacity:t.isLoading?.7:1,border:o?"1.4px solid #2563EB":null,boxShadow:o?"none":"0px 2px 4px 0px #19213D14","&:hover":{borderColor:o?"#2563EB":"#CBD5E1",boxShadow:o?"none":"0px 4px 8px 0px #19213D1F"}}},{children:[r(c,e({sx:{display:"flex",alignItems:"center",gap:1.5}},{children:t.isLoading?r(g,{variant:"rounded",width:80,height:20}):i(c,e({sx:{bgcolor:"#FEF2F2",color:"#B91C1C",fontSize:"11px",fontWeight:600,px:1,py:.5,borderRadius:"100px",border:"1px solid #FFE1E1"}},{children:[void 0!==t.similarity?t.similarity:0,"% Similarity"]}))})),i(c,e({sx:{display:"flex",flexDirection:"column",gap:1}},{children:[i(c,e({sx:{display:"flex",alignItems:"center",gap:1,flexWrap:"nowrap"}},{children:[r(p,e({title:t.title,sx:{fontWeight:500,fontSize:"14px",color:"#19213D",lineHeight:1.2,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",display:"block"}},{children:t.title})),t.scope&&r(c,e({sx:{flexShrink:0,fontSize:"10px",fontWeight:600,color:"#19213D",bgcolor:"#FFF",border:"1px solid #EDEFF2",px:.75,py:.25,borderRadius:"6px",lineHeight:1.4,whiteSpace:"nowrap"}},{children:t.scope}))]})),t.isLoading?i(c,{children:[r(g,{width:"90%"}),r(g,{width:"60%"})]}):i(c,e({title:u,sx:{display:"flex",flexDirection:"column",gap:.5}},{children:[r(p,e({sx:{fontWeight:400,fontSize:"13px",color:"#666F8D",lineHeight:1.4,display:"-webkit-box",WebkitLineClamp:2,WebkitBoxOrient:"vertical",overflow:"hidden",textOverflow:"ellipsis"}},{children:u})),x&&i(c,e({onClick:function(e){e.stopPropagation(),o||s(),a()},sx:{display:"inline-flex",alignItems:"center",alignSelf:"flex-start",gap:"4px",padding:"2px 6px",borderRadius:"4px",cursor:"pointer",transition:"all 0.2s ease",marginLeft:"-4px","&:hover":{backgroundColor:"#F1F5F9"}}},{children:[r("div",e({style:{width:"13px",height:"13px",display:"flex",alignItems:"center"}},{children:r(b,{})})),r("svg",e({width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"#4B5563",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",style:{transform:o&&l?"rotate(180deg)":"rotate(0deg)",transition:"transform 0.2s ease"}},{children:r("path",{d:"M6 9l6 6 6-6"})}))]}))]}))]}))]}))},_=function(o){var g,_,C=o.proposedRule,B=o.variants,E=void 0===B?[]:B,k=o.onSelectVariant;o.onAddAsVariant;var S=o.onSkip,A=o.onBack,L=o.targetVariantId,D=o.highlightedField,W=l(L||null),z=W[0],T=W[1],I=l(!1),R=I[0],j=I[1],H=l(null),O=H[0],M=H[1],V=a(null),N=a(null);s(function(){if(L&&T(L),M(null!=D?D:null),D){var e=setTimeout(function(){return M(null)},6e3);return function(){return clearTimeout(e)}}},[L,D]);var U=function(e){V.current&&V.current.scrollBy({left:"left"===e?-300:300,behavior:"smooth"})},P=d(function(){return n([],E,!0).sort(function(e,n){return(n.similarity||0)-(e.similarity||0)})},[E]),Y=d(function(){if(z){var e=String(z).trim();return E.find(function(n){return n.id&&String(n.id).trim()===e})||P[0]}return P.length>0?P[0]:null},[z,E,P]);s(function(){if(z&&V.current){var e=z.trim();setTimeout(function(){var n=document.getElementById("variant-card-".concat(e)),t=V.current;if(n&&t){var i=n.offsetLeft-t.offsetLeft-t.clientWidth/2+n.clientWidth/2;t.scrollTo({left:i,behavior:"smooth"})}},150)}},[z,P]);var $=Y||{title:"",scope:"",description:"",wta:"",wnta:"",variantType:"Default"},q=null==Y?void 0:Y.analysis,J=(null===(_=null===(g=null==q?void 0:q.rule_difference_comparison)||void 0===g?void 0:g.summary)||void 0===_?void 0:_.overall_summary)||"",X=J.match(/<ai_reasoning>([\s\S]*?)<\/ai_reasoning>/i),G=!!X,K=X?X[1]:"",Q=v("reason",K)||"",Z=v("gap",K)||"",ee=v("relevance_score",K)||"",ne=d(function(){return{ul:function(n){n.node;var i=t(n,["node"]);return r("ol",e({},i,{style:{paddingLeft:"1.25rem",listStyleType:"decimal",margin:0}}))},li:function(n){n.node;var i=t(n,["node"]);return r("li",e({},i,{style:{marginBottom:"4px",listStyleType:"decimal"}},{children:i.children}))},ol:function(n){n.node;var i=t(n,["node"]);return r("li",e({},i,{style:{marginBottom:"4px",listStyleType:"decimal"}},{children:i.children}))},a:function(n){var o=n.href,l=n.children,a=t(n,["href","children"]);if(!o)return r("a",e({},a,{children:l}));var s=o||"";try{s=decodeURIComponent(o)}catch(e){console.error("Error decoding href",e)}if(s.includes("variant_id=")){var d="",c="",p=s.match(/variant_id=([^?&]+)/);p&&(d=p[1]);var h=s.match(/field_name=([^&]+)/);return h&&(c=h[1]),i("button",e({type:"button",onClick:function(e){e.preventDefault(),e.stopPropagation(),T(d),M(c),setTimeout(function(){return M(null)},6e3)},style:{background:"none",border:"none",outline:"none",borderRadius:"6px",padding:"1px 4px",color:"#0F172A",cursor:"pointer",fontSize:"13px",fontWeight:500,display:"inline-flex",alignItems:"center",gap:"2px",margin:"0 1px",verticalAlign:"baseline",textDecoration:"none",boxShadow:"none",WebkitAppearance:"none",MozAppearance:"none"},title:"View Comparison"},{children:[l,r("svg",e({width:"13",height:"13",viewBox:"0 0 13 13",fill:"none",xmlns:"http://www.w3.org/2000/svg"},{children:r("path",{d:"M10.2082 8.67708H2.0415M2.0415 8.67708L4.08317 6.63542M2.0415 8.67708L4.08317 10.7188M2.0415 3.57292H10.2082M10.2082 3.57292L8.1665 1.53125M10.2082 3.57292L8.1665 5.61458",stroke:"#0F172A",strokeWidth:"1.2",strokeLinecap:"round",strokeLinejoin:"round"})}))]}))}return r("a",e({href:o,target:"_blank",rel:"noopener noreferrer",style:{color:"#7C3AED"}},a,{children:l}))}}},[]);s(function(){!z&&!L&&P.length>0&&!P[0].isLoading&&T(P[0].id)},[P,z,L]);var te=a(null),ie=l([]),re=ie[0],oe=ie[1],le=l(!1),ae=le[0],se=le[1],de=l(!1),ce=de[0],pe=de[1];s(function(){var e=V.current;if(e){var n=function(){se(e.scrollLeft>0),pe(e.scrollLeft+e.clientWidth<e.scrollWidth-1)};return n(),e.addEventListener("scroll",n),window.addEventListener("resize",n),function(){e.removeEventListener("scroll",n),window.removeEventListener("resize",n)}}},[P]);var he={title:a(null),scope:a(null),description:a(null),wta:a(null),wnta:a(null)},ge={title:a(null),scope:a(null),description:a(null),wta:a(null),wnta:a(null)};s(function(){if(O){var e="when_to_apply"===O?"wta":"when_not_to_apply"===O?"wnta":O,n=he[e]||ge[e];n&&n.current&&setTimeout(function(){n.current.scrollIntoView({behavior:"smooth",block:"center"})},150)}},[O]);var ue=function(e){var n,t,i,r,o,l=null===(n=null==q?void 0:q.rule_difference_comparison)||void 0===n?void 0:n.fields,a="when_to_apply"===e?"wta":"when_not_to_apply"===e?"wnta":e,s=!(!C[a]&&!$[a]);if(!l||!l[e])return{score:0,relation:"",highlightsA:[],highlightsB:[],hasContent:!1};var d=l[e];if(d.mappings){var c=d.mappings[0]||{};return{score:d.score,relation:c.relation||"",highlightsA:(null===(t=c.highlights)||void 0===t?void 0:t.ruleA_spans)||[],highlightsB:(null===(i=c.highlights)||void 0===i?void 0:i.ruleB_spans)||[],hasContent:s}}return{score:d.score,relation:d.relation||"",highlightsA:(null===(r=d.highlights)||void 0===r?void 0:r.ruleA_spans)||[],highlightsB:(null===(o=d.highlights)||void 0===o?void 0:o.ruleB_spans)||[],hasContent:s}},xe=["title","scope","description","when_to_apply","when_not_to_apply"],fe=function(){if(te.current){var e=te.current.getBoundingClientRect(),n=[];xe.forEach(function(t){var i="when_to_apply"===t?he.wta:"when_not_to_apply"===t?he.wnta:he[t],r="when_to_apply"===t?ge.wta:"when_not_to_apply"===t?ge.wnta:ge[t];if(i.current&&r.current){i.current.style.height="auto",r.current.style.height="auto";var o=i.current.getBoundingClientRect(),l=r.current.getBoundingClientRect(),a=Math.max(o.height,l.height);i.current.style.height="".concat(a,"px"),r.current.style.height="".concat(a,"px");var s=i.current.getBoundingClientRect(),d=r.current.getBoundingClientRect(),c=ue(t),p=y(c.score,c.relation,c.hasContent),h=s.top+s.height/2-e.top;n.push({x1:s.right-e.left,y1:h,x2:d.left-e.left,y2:h,style:p})}}),oe(n)}};return s(function(){var e=setTimeout(fe,250);window.addEventListener("resize",fe);var n=null;return te.current&&(n=new ResizeObserver(function(){window.requestAnimationFrame(function(){fe()})})).observe(te.current),function(){clearTimeout(e),window.removeEventListener("resize",fe),n&&n.disconnect()}},[C,$,q,R]),i(c,e({sx:{display:"flex",flexDirection:"column",height:"100%",bgcolor:"#F6F7F9B2",fontFamily:'"Plus Jakarta Sans", sans-serif',overflow:"hidden"}},{children:[i(c,e({sx:{px:2,py:1,display:"flex",alignItems:"center",justifyContent:"space-between",bgcolor:"#FFFFFF",border:"1.5px solid #EEF0F4"}},{children:[i(c,e({sx:{display:"flex",alignItems:"center",gap:1}},{children:[r(h,e({onClick:A,size:"small"},{children:r(u,{})})),r(p,e({sx:{fontSize:"16px",fontWeight:450,color:"#0F172A"}},{children:"Learning Comparison"}))]})),r(h,e({onClick:S,size:"small"},{children:r(c,e({sx:{fontSize:24,lineHeight:.5}},{children:"×"}))}))]})),P.length>1&&i(c,e({sx:{px:3,pb:.25}},{children:[i(c,e({sx:{display:"flex",alignItems:"center",justifyContent:"space-between",py:1}},{children:[r(p,e({sx:{fontSize:"13px",color:"#475569"}},{children:"Choose the Learning you want to compare with the rule you are creating."})),i(c,e({sx:{display:"flex",gap:.5,flexShrink:0,ml:1}},{children:[r(h,e({onClick:function(){return U("left")},size:"small",disabled:!ae},{children:r(u,{size:18})})),r(h,e({onClick:function(){return U("right")},size:"small",disabled:!ce},{children:r(x,{size:18})}))]}))]})),r(c,e({ref:V,sx:{display:"flex",gap:1,overflowX:"auto",pb:.05,"&::-webkit-scrollbar":{height:"6px"},"&::-webkit-scrollbar-track":{background:"transparent"},"&::-webkit-scrollbar-thumb":{background:"transparent",borderRadius:"10px"},"&::-webkit-scrollbar-thumb:hover":{background:"transparent"}}},{children:P.map(function(e){return r(F,{data:e,isSelected:(null==Y?void 0:Y.id)===e.id,isCognitiveOpen:R,onToggleCognitive:function(){j(function(e){var n=!e;return n&&N.current&&N.current.scrollTo({top:0,behavior:"smooth"}),n})},onClick:function(){return T((n=e).id),k(n),void j(!1);var n}},e.id)})}))]})),r(c,e({ref:N,sx:{flex:1,overflowY:"auto",py:1.5,px:3,display:"flex",justifyContent:"center",alignItems:"flex-start",bgcolor:"#FFFFFF",borderTop:J&&G&&R?"none":"1.5px solid #EEF0F4"}},{children:i(c,e({sx:{display:"flex",flexDirection:"column",width:"100%",maxWidth:"1200px"}},{children:[J&&G&&R&&r(c,e({sx:{width:"100%",pb:1,animation:"fadeIn 0.2s ease-out","& > div > button":{display:"none !important"},"& > div > div":{marginTop:"0px"}}},{children:r(m,{headerIcon:r(b,{}),reasoning:Q,gap:Z,score:ee,mdComponents:ne,isOpen:!0,onToggle:function(){return j(!1)}})})),i(c,e({ref:te,sx:{display:"grid",gridTemplateColumns:"1fr auto 1fr",gap:"60px",maxWidth:"1200px",width:"100%",position:"relative"}},{children:[r("svg",e({style:{position:"absolute",top:0,left:0,width:"100%",height:"100%",pointerEvents:"none",zIndex:10}},{children:re.map(function(n,t){var o=(n.x1+n.x2)/2,l=n.y1;return i("g",{children:[r("line",{x1:n.x1,y1:n.y1,x2:n.x2,y2:n.y2,stroke:n.style.badgeBorder,strokeWidth:"1"}),r("foreignObject",e({x:o-125,y:l-16,width:"250",height:"32"},{children:r(c,e({sx:{display:"flex",justifyContent:"center",alignItems:"center",height:"100%"}},{children:r(c,e({sx:{fontSize:"11px",bgcolor:n.style.badgeBg,color:n.style.badgeText,border:"1px solid ".concat(n.style.badgeBorder),borderRadius:"12px",px:1.5,py:.25,fontWeight:500,textAlign:"center",whiteSpace:"nowrap"}},{children:n.style.label}))}))}))]},t)})})),i(c,e({sx:{border:"1px dashed #B0B0B0",borderRadius:"8px",bgcolor:"#FFFFFF",display:"flex",flexDirection:"column",position:"relative",zIndex:2,filter:"drop-shadow(0px 2px 4px #F2F2F2)",minWidth:0}},{children:[r(c,e({sx:{p:"8px",bgcolor:"#F7F8FA",borderBottom:"1px dashed #B0B0B0",borderRadius:"8px 8px 0 0",display:"flex",minHeight:"24px",alignItems:"center"}},{children:r(p,e({sx:{fontSize:"16px",fontWeight:500,color:"#19213D"}},{children:"Learning You’re Creating"}))})),r(c,e({sx:{p:"12px",display:"flex",flexDirection:"column"}},{children:xe.map(function(e){var n=ue(e),t=y(n.score,n.relation,n.hasContent),i="when_to_apply"===e?he.wta:"when_not_to_apply"===e?he.wnta:he[e],o=C["when_to_apply"===e?"wta":"when_not_to_apply"===e?"wnta":e];return r(w,{ref:i,label:"when_to_apply"===e?"When to apply":"when_not_to_apply"===e?"When NOT to Apply":e.charAt(0).toUpperCase()+e.slice(1).replace("_"," "),content:o,highlights:n.highlightsA,styleVariant:t,isHighlighted:O===e},"left-".concat(e))})}))]})),r(c,{sx:{width:"1px"}}),i(c,e({sx:{border:"1px solid #E3E6EA",borderRadius:"8px",bgcolor:"#FFFFFF",boxShadow:"0px 1px 4px #F7F4FE",position:"relative",zIndex:2,display:"flex",flexDirection:"column",minWidth:0}},{children:[r(c,e({sx:{p:"8px",bgcolor:"#F7F8FA",borderBottom:"1px solid #E3E6EA",borderRadius:"8px 8px 0 0",minHeight:"24px",display:"flex",alignItems:"center"}},{children:i(p,e({sx:{fontSize:"16px",fontWeight:500,color:"#5928ED",display:"flex",alignItems:"center",gap:1}},{children:[r("div",e({style:{width:"18px",height:"18px",display:"flex",alignItems:"center",justifyContent:"center"}},{children:r(f,{})})),"Existing Learning"]}))})),r(c,e({sx:{p:"12px",display:"flex",flexDirection:"column"}},{children:xe.map(function(e){var n=ue(e),t=y(n.score,n.relation,n.hasContent),i="when_to_apply"===e?ge.wta:"when_not_to_apply"===e?ge.wnta:ge[e],o=$["when_to_apply"===e?"wta":"when_not_to_apply"===e?"wnta":e];return r(w,{ref:i,label:"when_to_apply"===e?"When to apply":"when_not_to_apply"===e?"When NOT to Apply":e.charAt(0).toUpperCase()+e.slice(1).replace("_"," "),content:o,highlights:n.highlightsB,styleVariant:t,isHighlighted:O===e},"right-".concat(e))})}))]}))]}))]}))}))]}))};export{_ as default};
|
|
2
2
|
//# sourceMappingURL=RuleComparison.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__assign as i}from"tslib";import{jsxs as e,jsx as t}from"react/jsx-runtime";import n,{useState as o,useEffect as l}from"react";import{InputDataReasoningCard as a}from"../../InputDataReasoningCard.js";import{ConditionSection as r}from"../../organisms/ConditionSection/ConditionSection.js";import{ConfigSection as d}from"../../organisms/ConfigSection/ConfigSection.js";import{ScopeSection as c}from"../../organisms/ScopeSection/ScopeSection.js";import{TextSection as s}from"../../organisms/TextSection/TextSection.js";import u from"../../AccordianSection.js";import{ButtonCognitiveIcon as p}from"../../_svg/ButtonCognitiveIcon.js";import{Loader2Icon as v,Pencil as f,Check as g,AlertTriangle as h}from"lucide-react";var y=function(o){var l=o.children,a=o.onAddVariant,r=o.isDisabled,d=n.Children.toArray(l);return e("div",i({style:{display:"flex",flexDirection:"column",alignItems:"flex-start"}},{children:[d.map(function(i,o){return e(n.Fragment,{children:[i,t("div",{style:{width:"2px",height:"20px",backgroundColor:"#E2E8F0",marginLeft:"30px"}})]},o)}),t("div",i({onClick:r?void 0:a,style:{padding:"8px 16px",border:"1px solid #E2E8F0",borderRadius:"8px",color:r?"#94a3b8":"#475569",fontSize:"14px",fontWeight:"500",cursor:r?"not-allowed":"pointer",backgroundColor:r?"#f8fafc":"#FFFFFF",opacity:r?.7:1,userSelect:"none",transition:"all 0.2s ease"}},{children:"Add Variant"}))]}))},m=function(m){var T,D,S,x,C,A,I,b,E,O,w,R=m.state,V=m.handlers,N=m.uiState,_=(null==N?void 0:N.highlights)||new Map,W=_.get("global_0")||{},j=o({}),M=j[0],k=j[1],B=o(null),F=B[0],L=B[1],z="rule-setup"===(null==N?void 0:N.activeEditId),q=o({title:"",scope:{}}),P=q[0],J=q[1],H=o(!1),K=H[0],U=H[1],$=n.useRef(null==N?void 0:N.isAiStreaming);l(function(){z||K||J({title:R.ruleTitle,scope:R.scopeData})},[R.ruleTitle,R.scopeData,z,K]),l(function(){var i;if($.current&&!(null==N?void 0:N.isAiStreaming)&&K&&(U(!1),null===(i=null==N?void 0:N.setActiveEditId)||void 0===i||i.call(N,null),null==N?void 0:N.setSendMessageInChat)){var e=R.ruleTitle!==P.title,t=JSON.stringify(R.scopeData)!==JSON.stringify(P.scope),n=[];if(e&&n.push("Title with ".concat(R.ruleTitle)),t){var o=[];R.scopeData.station&&o.push(R.scopeData.station),R.scopeData.tiers&&R.scopeData.tiers.length>0&&o.push(R.scopeData.tiers.join(", ")),n.push("Scope with ".concat(o.join(", ")))}var l=n.join(" and ");N.setSendMessageInChat("__SKELETON_END__::Update Rule Setup using ".concat(l))}$.current=null==N?void 0:N.isAiStreaming},[null==N?void 0:N.isAiStreaming,K,R,P]);var Z=function(){var i;V.setRuleTitle(P.title),P.scope.station!==R.scopeData.station&&V.onScopeChange("station",P.scope.station),JSON.stringify(P.scope.tiers)!==JSON.stringify(R.scopeData.tiers)&&V.onScopeChange("tiers",P.scope.tiers),null===(i=null==N?void 0:N.setActiveEditId)||void 0===i||i.call(N,null)},G=function(){var i,e,t=R.ruleTitle!==P.title,n=JSON.stringify(R.scopeData)!==JSON.stringify(P.scope);if(t||n){if(U(!0),null==N?void 0:N.setSendMessageInChat){var o="sk-".concat(Date.now(),"-").concat(Math.random().toString(36).slice(2,8)),l=[];if(t){var a=(null===(e=R.ruleTitle)||void 0===e?void 0:e.trim())?"Title with ".concat(R.ruleTitle):"No Title";l.push(a)}if(n){var r=[];R.scopeData.station&&r.push("station: ".concat(R.scopeData.station)),R.scopeData.tiers&&R.scopeData.tiers.length>0&&r.push("tiers: ".concat(R.scopeData.tiers.join(", ")));var d=r.length>0?"with ".concat(r.join(" and ")):"No Tier Selected";l.push(d)}var c=l.join(" and ");N.setSendMessageInChat("__SKELETON__:".concat(o,":Update Rule Setup ").concat(c))}}else null===(i=null==N?void 0:N.setActiveEditId)||void 0===i||i.call(N,null)},Q=n.useRef(null==N?void 0:N.defaultVariantOpen),X=n.useRef(R.variantsByTier);n.useEffect(function(){var i,e,t,n,o=null,l=!1;if(Q.current!==(null==N?void 0:N.defaultVariantOpen)&&(l=!0,Q.current=null==N?void 0:N.defaultVariantOpen),R.variantsByTier,X.current,l){if(null==(null==N?void 0:N.defaultVariantOpen)||(null==N?void 0:N.defaultVariantOpen)<0)return L(null),void(X.current=R.variantsByTier);null===(e=null===(i=null==N?void 0:N.tierOptions)||void 0===i?void 0:i.filter(function(i){var e,t;return null===(t=null===(e=R.scopeData)||void 0===e?void 0:e.tiers)||void 0===t?void 0:t.includes(i)}))||void 0===e||e.forEach(function(i){var e,t=i.toLowerCase().replace(/ /g,"_");((null===(e=R.variantsByTier)||void 0===e?void 0:e[t])||[]).forEach(function(i,e){(null==N?void 0:N.defaultVariantOpen)===e&&(o="".concat(t,"-variant-").concat(e)),(null==N?void 0:N.autoScrollVariantIndex)===e&&(o="".concat(t,"-variant-").concat(e))})}),o&&L(o)}null===F&&(null==N?void 0:N.defaultVariantOpen)>=0&&(null===(n=null===(t=null==N?void 0:N.tierOptions)||void 0===t?void 0:t.filter(function(i){var e,t;return null===(t=null===(e=R.scopeData)||void 0===e?void 0:e.tiers)||void 0===t?void 0:t.includes(i)}))||void 0===n||n.forEach(function(i){var e,t=i.toLowerCase().replace(/ /g,"_");((null===(e=R.variantsByTier)||void 0===e?void 0:e[t])||[])[N.defaultVariantOpen]&&L("".concat(t,"-variant-").concat(N.defaultVariantOpen))})),X.current=R.variantsByTier},[R.variantsByTier,null==N?void 0:N.defaultVariantOpen,null===(T=R.scopeData)||void 0===T?void 0:T.tiers,null==N?void 0:N.tierOptions,null==N?void 0:N.autoScrollVariantIndex]);var Y=function(e){k(function(t){var n;return i(i({},t),((n={})[e]=!t[e],n))})},ii=function(i){var e,t=null===(e=R.fieldCitations)||void 0===e?void 0:e[i];return Array.isArray(t)&&t.length>0?t:R.citations},ei={marginTop:"-17px",position:"relative",zIndex:1},ti=function(i){i&&i.scrollIntoView({behavior:"smooth",block:"center"})};console.log("CreateRule state:",R),console.log("CreateRule uiState:",N);var ni=function(i){return i?i.replace(/_/g," ").replace(/([a-zA-Z])(\d)/g,"$1 $2").replace(/\b\w/g,function(i){return i.toUpperCase()}):"Variant 1"},oi=!!(null==N?void 0:N.activeEditId);return e("div",i({className:"traffic-manager-template"},{children:[t("div",i({"data-edit-id":"rule-setup"},{children:t(u,i({title:{type:"other",label:(null==N?void 0:N.setupLabel)||"Rule Setup"},actionButtons:function(n,o){if(z)return null;var l=!!(null==N?void 0:N.activeEditId)&&"rule-setup"!==N.activeEditId;return t("div",i({style:{position:"relative",display:"flex",flexDirection:"column"}},{children:e("button",i({title:l?"Save active edits first":"Edit",onClick:function(i){i.stopPropagation(),l?(null==N?void 0:N.setPendingEditId)&&N.setPendingEditId(N.activeEditId||null):(!function(){var i;(null==N?void 0:N.activeEditId)&&"rule-setup"!==N.activeEditId||(null===(i=null==N?void 0:N.setActiveEditId)||void 0===i||i.call(N,"rule-setup"),J({title:R.ruleTitle,scope:R.scopeData}))}(),(null==N?void 0:N.setPendingEditId)&&N.setPendingEditId(null),n||o())},disabled:K,style:{display:"flex",alignItems:"center",justifyContent:"center",gap:"8px",padding:"6px 8px",border:"1px solid #e5e7eb",borderRadius:"8px",cursor:K?"not-allowed":"pointer",backgroundColor:"#ffffff",color:"#6b7280",opacity:K?.5:1}},{children:[t(f,{size:14})," Edit"]}))}))},footerData:{ruleTitle:R.ruleTitle,stations:[R.scopeData.station],tiers:null===(D=R.scopeData)||void 0===D?void 0:D.tiers},defaultOpen:"Create"===(null==N?void 0:N.usedFor),readOnly:"Create"!==(null==N?void 0:N.usedFor),isAiStreaming:null==N?void 0:N.isAiStreaming},{children:e("div",i({style:{display:"flex",flexDirection:"column",gap:"12px"}},{children:[K&&e("div",i({style:{display:"flex",alignItems:"center",color:"#141414ff",fontSize:"13px",fontWeight:500,fontStyle:"italic",marginBottom:"8px",paddingLeft:"4px"}},{children:[t(v,{size:16,style:{marginRight:8,animation:"spin 1s linear infinite"}},"loader"),"Checking the correctness of your Rule Setup..."]})),t(s,i({id:"rule-title",title:N.ruleTitle||"Rule Title",rows:1,placeholder:"Enter a short, descriptive title for the learning",required:!0,value:R.ruleTitle,onChange:V.setRuleTitle,readOnly:"Create"!==(null==N?void 0:N.usedFor)||(null==N?void 0:N.isAiStreaming)||!z,isOpen:M.ruleTitle,onToggle:function(){return Y("ruleTitle")},isHighlighted:W.ruleTitle||!1,showCognitiveIcon:R.citation.ruleTitle,tooltipDescription:"Why this Title?",errorMessage:null===(S=N.validationErrors)||void 0===S?void 0:S.ruleTitle},N)),R.citation.ruleTitle&&t("div",i({style:ei},{children:t(a,{isVisible:M.ruleTitle,citation:R.citation.ruleTitle,citations:ii("ruleTitle"),fieldName:"Rule Title",fieldValue:R.ruleTitle})})),t(c,i({id:"scope",title:"",required:!1,scopeData:R.scopeData,onScopeChange:V.onScopeChange,tierLabel:"Which tiers should this learning apply to?",stationLabel:"Which scope should this learning belong to?",highlights:W,isOpen:M.scopeData,onToggle:function(){return Y("scopeData")},showCognitiveIcon:R.citation.scopeData,cognitiveIcon:t(p,{}),tooltipDescription:"Why this Scope?",errorMessage:(null===(x=N.validationErrors)||void 0===x?void 0:x.station)||(null===(C=N.validationErrors)||void 0===C?void 0:C.tiers),stationErrorMessage:null===(A=N.validationErrors)||void 0===A?void 0:A.station,tierErrorMessage:null===(I=N.validationErrors)||void 0===I?void 0:I.tiers,readOnly:"Create"!==(null==N?void 0:N.usedFor)||(null==N?void 0:N.isAiStreaming)||!z},N)),R.citation.scopeData&&t("div",i({style:ei},{children:t(a,{isVisible:M.scopeData,citation:R.citation.scopeData,citations:ii("scopeData"),fieldName:"Scope",fieldValue:null===(E=null===(b=R.scopeData)||void 0===b?void 0:b.tiers)||void 0===E?void 0:E.join(", ")})})),!z||K?null:e("div",i({style:{display:"flex",flexDirection:"column",alignItems:"flex-start"}},{children:[e("div",i({style:{display:"flex",justifyContent:"flex-start",alignItems:"center",gap:"16px"}},{children:[t("button",i({onClick:Z,style:{background:"none",border:"none",color:"#6b7280",fontSize:"14px",fontWeight:"500",cursor:"pointer",padding:"0"}},{children:"Discard Changes"})),e("button",i({onClick:G,style:{display:"flex",alignItems:"center",gap:"8px",padding:"8px 16px",borderRadius:"12px",border:"none",backgroundColor:"#2563eb",color:"#ffffff",fontSize:"14px",fontWeight:"500",cursor:"pointer",boxShadow:"0 1px 2px rgba(0, 0, 0, 0.05)"}},{children:[t(g,{size:18,strokeWidth:2.5,color:"#ffffff"}),"Save Changes"]}))]})),"rule-setup"===(null==N?void 0:N.pendingEditId)&&e("div",i({style:{display:"flex",alignItems:"center",gap:"6px",marginTop:"8px"}},{children:[t(h,{style:{color:"#C2410C"}}),t("div",i({style:{display:"flex",color:"#C2410C",fontSize:"13px",paddingTop:"8px",alignItems:"center"}},{children:"Pending - Changes not applied yet. Apply or discard them to continue."}))]}))]}))]}))}))})),null===(w=null===(O=null==N?void 0:N.tierOptions)||void 0===O?void 0:O.filter(function(i){var e,t;return null===(t=null===(e=R.scopeData)||void 0===e?void 0:e.tiers)||void 0===t?void 0:t.includes(i)}))||void 0===w?void 0:w.map(function(n,o,l){var c,p,v,f,g=n.toLowerCase().replace(/ /g,"_"),h=(null===(c=R.variantsByTier)||void 0===c?void 0:c[g])||[],m=h.length,T=!1;if(1===m){var D=h[0],S=!(null===(p=null==D?void 0:D.ruleDescription)||void 0===p?void 0:p.trim()),x=(null===(v=null==D?void 0:D.whenToApplyConditions)||void 0===v?void 0:v.some(function(i){return(null==i?void 0:i.text)&&""!==i.text.trim()}))||!1,C=(null===(f=null==D?void 0:D.whenNotToApplyConditions)||void 0===f?void 0:f.some(function(i){return(null==i?void 0:i.text)&&""!==i.text.trim()}))||!1;S&&!x&&!C&&(T=!0)}var A=T?void 0:"".concat(m," ").concat(1===m?"variant":"variants"," configured for this tier"),I=!((null==N?void 0:N.defaultTierOpen)>=0)||o===N.defaultTierOpen;return console.log("Rendering tier : ",n),t(u,i({variant:"tier-header",title:{type:"other",label:n},subtitle:A,defaultOpen:I,footerData:{description:"Variants for ".concat(n)}},{children:t(y,i({onAddVariant:function(){var i;return null===(i=V.addNewVariant)||void 0===i?void 0:i.call(V,g)},isDisabled:null==N?void 0:N.isAiStreaming},{children:h.map(function(n,o){var l,c,p,v,f,h,y,m,T,D,S,x=n.variantType||"default",C="".concat(g,"-variant-").concat(o),A=!0===n.is_variant,I="default"===x||"default_variant"===x;(null==N?void 0:N.defaultVariantOpen)>=0&&N.defaultVariantOpen;var b="".concat(g,"_").concat(o),E=_.get(b)||{},O=(null===(c=null===(l=N.separationItemsByTier)||void 0===l?void 0:l[g])||void 0===c?void 0:c.get(o))||[],w=(null===(v=null===(p=N.togglesByTier)||void 0===p?void 0:p[g])||void 0===v?void 0:v.get(o))||[],R=(null==N?void 0:N.autoScrollVariantIndex)===o||!0===n.is_variant;return console.log("Rendering ".concat(g," variant ").concat(o,":"),n),console.log("Rendering Variant : ",n),console.log("Open Accordion ID:",F,"Current Variant ID:",C),t("div",i({ref:R?ti:null,style:{width:"100%"}},{children:t(u,i({title:{type:I?"default":"variant",label:ni(x),number:o+1,isNewVariant:A,isDefault:n.isDefault,isModified:n.isModified},defaultOpen:!0,expanded:F===C,onToggle:function(){var i,e=F===C;console.log("is closing:",e),L(e?null:C),null===(i=null==N?void 0:N.setActiveVariantAccordionIndex)||void 0===i||i.call(N,e?null:o)},variant:"rule-behavior",footerData:{ruleTitle:x,description:n.ruleDescription||""}},{children:e("div",i({style:{display:"flex",flexDirection:"column",gap:"12px"}},{children:[t(s,i({id:"rule-description-".concat(g,"-").concat(o),title:N.ruleDescriptionTitle||"Rule Description",rows:2,placeholder:"Explain the learning behaviour",required:!0,readOnly:n.isReadOnly||(null==N?void 0:N.isAiStreaming)||oi&&(null==N?void 0:N.activeEditId)!=="rule-description-".concat(g,"-").concat(o),value:n.ruleDescription||"",onChange:function(i){return V.setRuleDescription(g,o,i)},isOpen:M["ruleDescription-".concat(g,"-").concat(o)],onToggle:function(){return Y("ruleDescription-".concat(g,"-").concat(o))},isHighlighted:E.ruleDescription||!1,showCognitiveIcon:null===(f=n.reasoning)||void 0===f?void 0:f.ruleDescription,tooltipDescription:"Why this Description?",errorMessage:null===(h=N.validationErrors)||void 0===h?void 0:h["ruleDescription-".concat(g,"-").concat(o)],enableInlineEdit:!0,setSendMessageInChat:null==N?void 0:N.setSendMessageInChat,isAiStreaming:null==N?void 0:N.isAiStreaming,fieldName:"Rule Description"},N)),(null===(y=n.reasoning)||void 0===y?void 0:y.ruleDescription)&&t("div",i({style:ei},{children:t(a,{isVisible:M["ruleDescription-".concat(g,"-").concat(o)],citation:n.reasoning.ruleDescription,citations:ii("ruleDescription_".concat(g,"_").concat(o)),fieldName:"Rule Description",fieldValue:n.ruleDescription})})),t(r,i({id:"when-to-apply-".concat(g,"-").concat(o),title:N.whenToApplyTitle||"When to apply",required:!0,dividerRequired:!0,readOnly:n.isReadOnly||(null==N?void 0:N.isAiStreaming)||oi&&!(null===(m=n.whenToApplyConditions)||void 0===m?void 0:m.some(function(i){return"condition-".concat(g,"-").concat(o,"-").concat(i.id)===(null==N?void 0:N.activeEditId)})),conditions:n.whenToApplyConditions||[],onAdd:function(){return V.addWhenToApply(g,o)},onRemove:function(i,e,t){return V.removeWhenToApply(i,e,t)},onEdit:function(i,e,t,n){return V.editWhenToApply(i,e,t,n)},index:o,tierKey:g,isHighlighted:E.wta||!1,highlightedIds:null==N?void 0:N.highlightedIds,tooltipDescription:"Why this Condition?",citations:ii("whenToApply_".concat(g,"_").concat(o)),bordered:!0,addLabel:"Add When to apply",isAiStreaming:N.isAiStreaming,errorMessage:(null===(T=N.validationErrors)||void 0===T?void 0:T["whenToApply-".concat(g,"-").concat(o)])||(null==N?void 0:N.conflictReason)},N)),t(r,i({id:"when-not-to-apply-".concat(g,"-").concat(o),title:N.whenNotToApplyTitle||"When NOT to apply",required:!1,dividerRequired:!0,readOnly:n.isReadOnly||(null==N?void 0:N.isAiStreaming)||oi&&!(null===(D=n.whenNotToApplyConditions)||void 0===D?void 0:D.some(function(i){return"condition-".concat(g,"-").concat(o,"-").concat(i.id)===(null==N?void 0:N.activeEditId)})),conditions:n.whenNotToApplyConditions||[],onAdd:function(){return V.addWhenNotToApply(g,o)},onRemove:function(i,e,t){return V.removeWhenNotToApply(i,e,t)},onEdit:function(i,e,t,n){return V.editWhenNotToApply(i,e,t,n)},index:o,tierKey:g,isHighlighted:E.wnta||!1,highlightedIds:null==N?void 0:N.highlightedIds,tooltipDescription:"Why this Condition?",citations:ii("whenNotToApply_".concat(g,"_").concat(o)),bordered:!0,addLabel:"Add When NOT to apply",isAiStreaming:N.isAiStreaming},N)),t(d,i({id:"config-".concat(g,"-").concat(o),title:N.configTitle||"Configuration",required:!1,highlights:E,bordered:!0,readOnly:n.isReadOnly||(null==N?void 0:N.isAiStreaming)||oi,onConfigChange:function(i,e){return V.onConfigChange(g,o,i,e)},separationItems:O,toggles:w,index:o},N)),(null===(S=n.reasoning)||void 0===S?void 0:S.configData)&&t("div",i({style:ei},{children:t(a,{citation:n.reasoning.configData,citations:ii("configData_".concat(g,"_").concat(o)),fieldName:"Configuration",fieldValue:"Proposed Configuration"})}))]}))}),C)}),"".concat(g,"-variant-").concat(o))})}))}),"tier-".concat(o))})]}))};export{m as CreateRule};
|
|
1
|
+
import{__assign as i}from"tslib";import{jsxs as e,jsx as t}from"react/jsx-runtime";import n,{useState as o,useEffect as l}from"react";import{InputDataReasoningCard as a}from"../../InputDataReasoningCard.js";import{ConditionSection as r}from"../../organisms/ConditionSection/ConditionSection.js";import{ConfigSection as d}from"../../organisms/ConfigSection/ConfigSection.js";import{ScopeSection as c}from"../../organisms/ScopeSection/ScopeSection.js";import{TextSection as s}from"../../organisms/TextSection/TextSection.js";import u from"../../AccordianSection.js";import{ButtonCognitiveIcon as p}from"../../_svg/ButtonCognitiveIcon.js";import{Loader2Icon as v,Pencil as f,Check as g,AlertTriangle as h}from"lucide-react";var y=function(o){var l=o.children,a=o.onAddVariant,r=o.isDisabled,d=n.Children.toArray(l);return e("div",i({style:{display:"flex",flexDirection:"column",alignItems:"flex-start"}},{children:[d.map(function(i,o){return e(n.Fragment,{children:[i,t("div",{style:{width:"2px",height:"20px",backgroundColor:"#E2E8F0",marginLeft:"30px"}})]},o)}),t("div",i({onClick:r?void 0:a,style:{padding:"8px 16px",border:"1px solid #E2E8F0",borderRadius:"8px",color:r?"#94a3b8":"#475569",fontSize:"14px",fontWeight:"500",cursor:r?"not-allowed":"pointer",backgroundColor:r?"#f8fafc":"#FFFFFF",opacity:r?.7:1,userSelect:"none",transition:"all 0.2s ease"}},{children:"Add Variant"}))]}))},m=function(m){var D,T,x,S,C,A,I,b,E,O,w,R=m.state,V=m.handlers,N=m.uiState,_=(null==N?void 0:N.highlights)||new Map,W=_.get("global_0")||{},j=o({}),M=j[0],F=j[1],k=o(null),B=k[0],L=k[1],z="rule-setup"===(null==N?void 0:N.activeEditId),P=o({title:"",scope:{}}),q=P[0],J=P[1],H=o(!1),K=H[0],U=H[1],$=n.useRef(null==N?void 0:N.isAiStreaming);l(function(){z||K||J({title:R.ruleTitle,scope:R.scopeData})},[R.ruleTitle,R.scopeData,z,K]),l(function(){var i;if($.current&&!(null==N?void 0:N.isAiStreaming)&&K&&(U(!1),null===(i=null==N?void 0:N.setActiveEditId)||void 0===i||i.call(N,null),null==N?void 0:N.setSendMessageInChat)){var e=R.ruleTitle!==q.title,t=JSON.stringify(R.scopeData)!==JSON.stringify(q.scope),n=[];if(e&&n.push("Title with ".concat(R.ruleTitle)),t){var o=[];R.scopeData.station&&o.push(R.scopeData.station),R.scopeData.tiers&&R.scopeData.tiers.length>0&&o.push(R.scopeData.tiers.join(", ")),n.push("Scope with ".concat(o.join(", ")))}var l=n.join(" and ");N.setSendMessageInChat("__SKELETON_END__::Update Rule Setup using ".concat(l))}$.current=null==N?void 0:N.isAiStreaming},[null==N?void 0:N.isAiStreaming,K,R,q]);var Z=function(){var i;V.setRuleTitle(q.title),q.scope.station!==R.scopeData.station&&V.onScopeChange("station",q.scope.station),JSON.stringify(q.scope.tiers)!==JSON.stringify(R.scopeData.tiers)&&V.onScopeChange("tiers",q.scope.tiers),null===(i=null==N?void 0:N.setActiveEditId)||void 0===i||i.call(N,null)},G=function(){var i,e,t=R.ruleTitle!==q.title,n=JSON.stringify(R.scopeData)!==JSON.stringify(q.scope);if(t||n){if(U(!0),null==N?void 0:N.setSendMessageInChat){var o="sk-".concat(Date.now(),"-").concat(Math.random().toString(36).slice(2,8)),l=[];if(t){var a=(null===(e=R.ruleTitle)||void 0===e?void 0:e.trim())?"Title with ".concat(R.ruleTitle):"No Title";l.push(a)}if(n){var r=[];R.scopeData.station&&r.push("station: ".concat(R.scopeData.station)),R.scopeData.tiers&&R.scopeData.tiers.length>0&&r.push("tiers: ".concat(R.scopeData.tiers.join(", ")));var d=r.length>0?"with ".concat(r.join(" and ")):"No Tier Selected";l.push(d)}var c=l.join(" and ");N.setSendMessageInChat("__SKELETON__:".concat(o,":Update Rule Setup ").concat(c))}}else null===(i=null==N?void 0:N.setActiveEditId)||void 0===i||i.call(N,null)},Q=n.useRef(null==N?void 0:N.defaultVariantOpen),X=n.useRef(R.variantsByTier);n.useEffect(function(){var i,e,t,n,o=null,l=!1;if(Q.current!==(null==N?void 0:N.defaultVariantOpen)&&(l=!0,Q.current=null==N?void 0:N.defaultVariantOpen),R.variantsByTier,X.current,l){if(null==(null==N?void 0:N.defaultVariantOpen)||(null==N?void 0:N.defaultVariantOpen)<0)return L(null),void(X.current=R.variantsByTier);null===(e=null===(i=null==N?void 0:N.tierOptions)||void 0===i?void 0:i.filter(function(i){var e,t;return null===(t=null===(e=R.scopeData)||void 0===e?void 0:e.tiers)||void 0===t?void 0:t.includes(i)}))||void 0===e||e.forEach(function(i){var e,t=i.toLowerCase().replace(/ /g,"_");((null===(e=R.variantsByTier)||void 0===e?void 0:e[t])||[]).forEach(function(i,e){(null==N?void 0:N.defaultVariantOpen)===e&&(o="".concat(t,"-variant-").concat(e)),(null==N?void 0:N.autoScrollVariantIndex)===e&&(o="".concat(t,"-variant-").concat(e))})}),o&&L(o)}null===B&&(null==N?void 0:N.defaultVariantOpen)>=0&&(null===(n=null===(t=null==N?void 0:N.tierOptions)||void 0===t?void 0:t.filter(function(i){var e,t;return null===(t=null===(e=R.scopeData)||void 0===e?void 0:e.tiers)||void 0===t?void 0:t.includes(i)}))||void 0===n||n.forEach(function(i){var e,t=i.toLowerCase().replace(/ /g,"_");((null===(e=R.variantsByTier)||void 0===e?void 0:e[t])||[])[N.defaultVariantOpen]&&L("".concat(t,"-variant-").concat(N.defaultVariantOpen))})),X.current=R.variantsByTier},[R.variantsByTier,null==N?void 0:N.defaultVariantOpen,null===(D=R.scopeData)||void 0===D?void 0:D.tiers,null==N?void 0:N.tierOptions,null==N?void 0:N.autoScrollVariantIndex]);var Y=function(e){F(function(t){var n;return i(i({},t),((n={})[e]=!t[e],n))})},ii=function(i){var e,t=null===(e=R.fieldCitations)||void 0===e?void 0:e[i];return Array.isArray(t)&&t.length>0?t:R.citations},ei={marginTop:"-17px",position:"relative",zIndex:1},ti=function(i){i&&i.scrollIntoView({behavior:"smooth",block:"center"})};console.log("CreateRule state:",R),console.log("CreateRule uiState:",N);var ni=function(i){return i?i.replace(/_/g," ").replace(/([a-zA-Z])(\d)/g,"$1 $2").replace(/\b\w/g,function(i){return i.toUpperCase()}):"Variant 1"},oi=!!(null==N?void 0:N.activeEditId);return e("div",i({className:"traffic-manager-template"},{children:[t("div",i({"data-edit-id":"rule-setup"},{children:t(u,i({title:{type:"other",label:(null==N?void 0:N.setupLabel)||"Rule Setup"},actionButtons:function(e,n){if(z)return null;var o=!!(null==N?void 0:N.activeEditId)&&"rule-setup"!==N.activeEditId;return t("div",i({style:{position:"relative",display:"flex",flexDirection:"column"}},{children:t("button",i({title:o?"Save active edits first":"Edit",onClick:function(i){i.stopPropagation(),o?(null==N?void 0:N.setPendingEditId)&&N.setPendingEditId(N.activeEditId||null):(!function(){var i;(null==N?void 0:N.activeEditId)&&"rule-setup"!==N.activeEditId||(null===(i=null==N?void 0:N.setActiveEditId)||void 0===i||i.call(N,"rule-setup"),J({title:R.ruleTitle,scope:R.scopeData}))}(),(null==N?void 0:N.setPendingEditId)&&N.setPendingEditId(null),e||n())},disabled:K,style:{display:"flex",alignItems:"center",justifyContent:"center",gap:"8px",padding:"6px 8px",border:"1px solid #e5e7eb",borderRadius:"8px",cursor:K?"not-allowed":"pointer",backgroundColor:"#ffffff",color:"#6b7280",opacity:K?.5:1}},{children:t(f,{size:14})}))}))},footerData:{ruleTitle:R.ruleTitle,stations:[R.scopeData.station],tiers:null===(T=R.scopeData)||void 0===T?void 0:T.tiers},defaultOpen:"Create"===(null==N?void 0:N.usedFor),readOnly:"Create"!==(null==N?void 0:N.usedFor),isAiStreaming:null==N?void 0:N.isAiStreaming,editFlow:"Edit"===(null==N?void 0:N.usedFor)},{children:e("div",i({style:{display:"flex",flexDirection:"column",gap:"12px"}},{children:[K&&e("div",i({style:{display:"flex",alignItems:"center",color:"#141414ff",fontSize:"13px",fontWeight:500,fontStyle:"italic",marginBottom:"8px",paddingLeft:"4px"}},{children:[t(v,{size:16,style:{marginRight:8,animation:"spin 1s linear infinite"}},"loader"),"Checking the correctness of your Rule Setup..."]})),t(s,i({id:"rule-title",title:N.ruleTitle||"Rule Title",rows:1,placeholder:"Enter a short, descriptive title for the learning",required:!0,value:R.ruleTitle,onChange:V.setRuleTitle,readOnly:"Create"!==(null==N?void 0:N.usedFor)||(null==N?void 0:N.isAiStreaming)||!z,isOpen:M.ruleTitle,onToggle:function(){return Y("ruleTitle")},isHighlighted:W.ruleTitle||!1,showCognitiveIcon:R.citation.ruleTitle,tooltipDescription:"Why this Title?",errorMessage:null===(x=N.validationErrors)||void 0===x?void 0:x.ruleTitle},N)),R.citation.ruleTitle&&t("div",i({style:ei},{children:t(a,{isVisible:M.ruleTitle,citation:R.citation.ruleTitle,citations:ii("ruleTitle"),fieldName:"Rule Title",fieldValue:R.ruleTitle})})),t(c,i({id:"scope",title:"",required:!1,scopeData:R.scopeData,onScopeChange:V.onScopeChange,tierLabel:"Which tiers should this learning apply to?",stationLabel:"Which scope should this learning belong to?",highlights:W,isOpen:M.scopeData,onToggle:function(){return Y("scopeData")},showCognitiveIcon:R.citation.scopeData,cognitiveIcon:t(p,{}),tooltipDescription:"Why this Scope?",errorMessage:(null===(S=N.validationErrors)||void 0===S?void 0:S.station)||(null===(C=N.validationErrors)||void 0===C?void 0:C.tiers),stationErrorMessage:null===(A=N.validationErrors)||void 0===A?void 0:A.station,tierErrorMessage:null===(I=N.validationErrors)||void 0===I?void 0:I.tiers,readOnly:"Create"!==(null==N?void 0:N.usedFor)||(null==N?void 0:N.isAiStreaming)||!z},N)),R.citation.scopeData&&t("div",i({style:ei},{children:t(a,{isVisible:M.scopeData,citation:R.citation.scopeData,citations:ii("scopeData"),fieldName:"Scope",fieldValue:null===(E=null===(b=R.scopeData)||void 0===b?void 0:b.tiers)||void 0===E?void 0:E.join(", ")})})),!z||K?null:e("div",i({style:{display:"flex",flexDirection:"column",alignItems:"flex-start"}},{children:[e("div",i({style:{display:"flex",justifyContent:"flex-start",alignItems:"center",gap:"16px"}},{children:[t("button",i({onClick:Z,style:{background:"none",border:"none",color:"#6b7280",fontSize:"14px",fontWeight:"500",cursor:"pointer",padding:"0"}},{children:"Discard Changes"})),e("button",i({onClick:G,style:{display:"flex",alignItems:"center",gap:"8px",padding:"8px 16px",borderRadius:"12px",border:"none",backgroundColor:"#2563eb",color:"#ffffff",fontSize:"14px",fontWeight:"500",cursor:"pointer",boxShadow:"0 1px 2px rgba(0, 0, 0, 0.05)"}},{children:[t(g,{size:18,strokeWidth:2.5,color:"#ffffff"}),"Save Changes"]}))]})),"rule-setup"===(null==N?void 0:N.pendingEditId)&&e("div",i({style:{display:"flex",alignItems:"center",gap:"6px",marginTop:"8px"}},{children:[t(h,{style:{color:"#C2410C"}}),t("div",i({style:{display:"flex",color:"#C2410C",fontSize:"13px",paddingTop:"8px",alignItems:"center"}},{children:"Pending - Changes not applied yet. Apply or discard them to continue."}))]}))]}))]}))}))})),null===(w=null===(O=null==N?void 0:N.tierOptions)||void 0===O?void 0:O.filter(function(i){var e,t;return null===(t=null===(e=R.scopeData)||void 0===e?void 0:e.tiers)||void 0===t?void 0:t.includes(i)}))||void 0===w?void 0:w.map(function(n,o,l){var c,p,v,f,g=n.toLowerCase().replace(/ /g,"_"),h=(null===(c=R.variantsByTier)||void 0===c?void 0:c[g])||[],m=h.length,D=!1;if(1===m){var T=h[0],x=!(null===(p=null==T?void 0:T.ruleDescription)||void 0===p?void 0:p.trim()),S=(null===(v=null==T?void 0:T.whenToApplyConditions)||void 0===v?void 0:v.some(function(i){return(null==i?void 0:i.text)&&""!==i.text.trim()}))||!1,C=(null===(f=null==T?void 0:T.whenNotToApplyConditions)||void 0===f?void 0:f.some(function(i){return(null==i?void 0:i.text)&&""!==i.text.trim()}))||!1;x&&!S&&!C&&(D=!0)}var A=D?void 0:"".concat(m," ").concat(1===m?"variant":"variants"," configured for this tier"),I=!((null==N?void 0:N.defaultTierOpen)>=0)||o===N.defaultTierOpen;return console.log("Rendering tier : ",n),t(u,i({variant:"tier-header",title:{type:"other",label:n},subtitle:A,defaultOpen:I,footerData:{description:"Variants for ".concat(n)}},{children:t(y,i({onAddVariant:function(){var i;return null===(i=V.addNewVariant)||void 0===i?void 0:i.call(V,g)},isDisabled:null==N?void 0:N.isAiStreaming},{children:h.map(function(n,o){var l,c,p,v,f,h,y,m,D,T,x,S=n.variantType||"default",C="".concat(g,"-variant-").concat(o),A=!0===n.is_variant,I="default"===S||"default_variant"===S;(null==N?void 0:N.defaultVariantOpen)>=0&&N.defaultVariantOpen;var b="".concat(g,"_").concat(o),E=_.get(b)||{},O=(null===(c=null===(l=N.separationItemsByTier)||void 0===l?void 0:l[g])||void 0===c?void 0:c.get(o))||[],w=(null===(v=null===(p=N.togglesByTier)||void 0===p?void 0:p[g])||void 0===v?void 0:v.get(o))||[],R=(null==N?void 0:N.autoScrollVariantIndex)===o||!0===n.is_variant;console.log("Rendering ".concat(g," variant ").concat(o,":"),n),console.log("Rendering Variant : ",n),console.log("Open Accordion ID:",B,"Current Variant ID:",C);var W=null===(f=null==N?void 0:N.activeEditId)||void 0===f?void 0:f.startsWith("condition-wta-".concat(g,"-").concat(o)),j=null===(h=null==N?void 0:N.activeEditId)||void 0===h?void 0:h.startsWith("condition-wnta-".concat(g,"-").concat(o));return t("div",i({ref:R?ti:null,style:{width:"100%"}},{children:t(u,i({title:{type:I?"default":"variant",label:ni(S),number:o+1,isNewVariant:A,isDefault:n.isDefault,isModified:n.isModified},defaultOpen:!0,expanded:B===C,onToggle:function(){var i,e=B===C;console.log("is closing:",e),L(e?null:C),null===(i=null==N?void 0:N.setActiveVariantAccordionIndex)||void 0===i||i.call(N,e?null:o)},variant:"rule-behavior",footerData:{ruleTitle:S,description:n.ruleDescription||""}},{children:e("div",i({style:{display:"flex",flexDirection:"column",gap:"12px"}},{children:[t(s,i({id:"rule-description-".concat(g,"-").concat(o),title:N.ruleDescriptionTitle||"Rule Description",rows:2,placeholder:"Explain the learning behaviour",required:!0,readOnly:n.isReadOnly||(null==N?void 0:N.isAiStreaming)||oi&&(null==N?void 0:N.activeEditId)!=="rule-description-".concat(g,"-").concat(o),value:n.ruleDescription||"",onChange:function(i){return V.setRuleDescription(g,o,i)},isOpen:M["ruleDescription-".concat(g,"-").concat(o)],onToggle:function(){return Y("ruleDescription-".concat(g,"-").concat(o))},isHighlighted:E.ruleDescription||!1,showCognitiveIcon:null===(y=n.reasoning)||void 0===y?void 0:y.ruleDescription,tooltipDescription:"Why this Description?",errorMessage:null===(m=N.validationErrors)||void 0===m?void 0:m["ruleDescription-".concat(g,"-").concat(o)],enableInlineEdit:!0,setSendMessageInChat:null==N?void 0:N.setSendMessageInChat,isAiStreaming:null==N?void 0:N.isAiStreaming,fieldName:"Rule Description"},N)),(null===(D=n.reasoning)||void 0===D?void 0:D.ruleDescription)&&t("div",i({style:ei},{children:t(a,{isVisible:M["ruleDescription-".concat(g,"-").concat(o)],citation:n.reasoning.ruleDescription,citations:ii("ruleDescription_".concat(g,"_").concat(o)),fieldName:"Rule Description",fieldValue:n.ruleDescription})})),t(r,i({id:"when-to-apply-".concat(g,"-").concat(o),idPrefix:"condition-wta",title:N.whenToApplyTitle||"When to apply",required:!0,dividerRequired:!0,readOnly:n.isReadOnly||(null==N?void 0:N.isAiStreaming)||oi&&!W,conditions:n.whenToApplyConditions||[],onAdd:function(){return V.addWhenToApply(g,o)},onRemove:function(i,e,t){return V.removeWhenToApply(i,e,t)},onEdit:function(i,e,t,n){return V.editWhenToApply(i,e,t,n)},index:o,tierKey:g,isHighlighted:E.wta||!1,highlightedIds:null==N?void 0:N.highlightedIds,tooltipDescription:"Why this Condition?",citations:ii("whenToApply_".concat(g,"_").concat(o)),bordered:!0,addLabel:"Add When to apply",isAiStreaming:N.isAiStreaming,errorMessage:(null===(T=N.validationErrors)||void 0===T?void 0:T["whenToApply-".concat(g,"-").concat(o)])||(null==N?void 0:N.conflictReason)},N)),t(r,i({id:"when-not-to-apply-".concat(g,"-").concat(o),idPrefix:"condition-wnta",title:N.whenNotToApplyTitle||"When NOT to apply",required:!1,dividerRequired:!0,readOnly:n.isReadOnly||(null==N?void 0:N.isAiStreaming)||oi&&!j,conditions:n.whenNotToApplyConditions||[],onAdd:function(){return V.addWhenNotToApply(g,o)},onRemove:function(i,e,t){return V.removeWhenNotToApply(i,e,t)},onEdit:function(i,e,t,n){return V.editWhenNotToApply(i,e,t,n)},index:o,tierKey:g,isHighlighted:E.wnta||!1,highlightedIds:null==N?void 0:N.highlightedIds,tooltipDescription:"Why this Condition?",citations:ii("whenNotToApply_".concat(g,"_").concat(o)),bordered:!0,addLabel:"Add When NOT to apply",isAiStreaming:N.isAiStreaming},N)),t(d,i({id:"config-".concat(g,"-").concat(o),title:N.configTitle||"Configuration",required:!1,highlights:E,bordered:!0,readOnly:n.isReadOnly||(null==N?void 0:N.isAiStreaming)||oi,onConfigChange:function(i,e){return V.onConfigChange(g,o,i,e)},separationItems:O,toggles:w,index:o},N)),(null===(x=n.reasoning)||void 0===x?void 0:x.configData)&&t("div",i({style:ei},{children:t(a,{citation:n.reasoning.configData,citations:ii("configData_".concat(g,"_").concat(o)),fieldName:"Configuration",fieldValue:"Proposed Configuration"})}))]}))}),C)}),"".concat(g,"-variant-").concat(o))})}))}),"tier-".concat(o))})]}))};export{m as CreateRule};
|
|
2
2
|
//# sourceMappingURL=CreateRule.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
function r(r){return r.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\t/g,"\\t")}function n(n){try{return JSON.parse(n)}catch(a){var e=n;return e=(e=(e=
|
|
1
|
+
function r(r){return r.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\t/g,"\\t")}function n(n){try{return JSON.parse(n)}catch(a){var e=n.replace(/`/g,"\\`");return e=(e=(e=function(r){return r.replace(/,\s*([}\]])/g,"$1")}(e=e.replace(/"([^"\\]*(\\.[^"\\]*)*)"/g,function(r){return r.replace(/\n/g,"\\n")}))).replace(/<ai_reasoning>[\s\S]*?<\/ai_reasoning>/g,function(n){return r(n)})).replace(/<explaination[\s\S]*?<\/explaination>/g,function(n){return r(n)}),JSON.parse(e)}}function e(r){for(var e,a=/<!--\s*```json\s+property="([^"]+)"\s*([\s\S]*?)```\s*-->/gi,o=[];null!==(e=a.exec(r));){var t=e[0],c=e[1],i=e[2].trim();try{var l=n(i);o.push({property:c,data:l,rawMatch:t})}catch(r){var s="".concat(c,"::").concat(i.slice(0,40));console.warn('Failed to parse JSON for property="'.concat(c,'" warnId="').concat(s,'":'),r),console.warn("👉 Raw JSON string:",i),console.warn("👉 Error:"),console.warn(r),o.push({property:c,data:null,rawMatch:t})}}return o}var a=function(r){if(null==r)return{text:"",aiReasoning:null};var n="",e=(n="string"==typeof r?r:Array.isArray(r)?r.join(", "):"object"==typeof r?JSON.stringify(r):String(r)).match(/<ai_reasoning>([\s\S]*?)<\/ai_reasoning>/i),a=null,o=n;if(e){var t=e[1],c=function(r){var n=t.match(new RegExp("<".concat(r,">([\\s\\S]*?)<\\/").concat(r,">"),"i"));return n?n[1].replace(/\\n/g,"\n").trim():""};a={id:c("id"),reason:c("reason"),gap:c("gap"),score:c("relevance_score")||c("score")},o=n.replace(/<ai_reasoning>[\s\S]*?<\/ai_reasoning>/gi,"").trim()}return{text:o,aiReasoning:a}},o=function(r){if(!r)return null;var n={id:null==r?void 0:r.id,reason:null==r?void 0:r.reason,gap:null==r?void 0:r.gap,score:(null==r?void 0:r.relevance_score)||(null==r?void 0:r.score)};return!(n.id||n.reason||n.gap||null!=n.score&&""!==n.score)?null:n};export{o as buildAiReasoning,a as extractReasoningFromText,e as parseJsonBlocks,n as safeParse,r as sanitizeBlock};
|
|
2
2
|
//# sourceMappingURL=message-rendering-utils.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import
|
|
1
|
+
import s from"../../node_modules/style-inject/dist/style-inject.es.js";var t={customFont:"InstantLearning-module_customFont__kxKC-"};s('@import url("https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;700&display=swap");.InstantLearning-module_customFont__kxKC-{font-family:Plus Jakarta Sans,sans-serif}');export{t as default};
|
|
2
2
|
//# sourceMappingURL=InstantLearning.module.css.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import t from"style-inject";var
|
|
1
|
+
import t from"../../node_modules/style-inject/dist/style-inject.es.js";var e={parentContainer:"WtaWnta-module_parentContainer__-2Txc"};t('@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400..900&display=swap");body{font-family:Inter,sans-serif}.WtaWnta-module_parentContainer__-2Txc{align-items:center;display:flex;flex-direction:column;gap:24px;width:100%}');export{e as default};
|
|
2
2
|
//# sourceMappingURL=WtaWnta.module.css.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
function e(e,t){void 0===t&&(t={});var d=t.insertAt;if(e&&"undefined"!=typeof document){var n=document.head||document.getElementsByTagName("head")[0],s=document.createElement("style");s.type="text/css","top"===d&&n.firstChild?n.insertBefore(s,n.firstChild):n.appendChild(s),s.styleSheet?s.styleSheet.cssText=e:s.appendChild(document.createTextNode(e))}}export{e as default};
|
|
2
|
+
//# sourceMappingURL=style-inject.es.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"style-inject.es.js","sources":["../../../../node_modules/style-inject/dist/style-inject.es.js"],"sourcesContent":["function styleInject(css, ref) {\n if ( ref === void 0 ) ref = {};\n var insertAt = ref.insertAt;\n\n if (!css || typeof document === 'undefined') { return; }\n\n var head = document.head || document.getElementsByTagName('head')[0];\n var style = document.createElement('style');\n style.type = 'text/css';\n\n if (insertAt === 'top') {\n if (head.firstChild) {\n head.insertBefore(style, head.firstChild);\n } else {\n head.appendChild(style);\n }\n } else {\n head.appendChild(style);\n }\n\n if (style.styleSheet) {\n style.styleSheet.cssText = css;\n } else {\n style.appendChild(document.createTextNode(css));\n }\n}\n\nexport default styleInject;\n"],"names":["styleInject","css","ref","insertAt","document","head","getElementsByTagName","style","createElement","type","firstChild","insertBefore","appendChild","styleSheet","cssText","createTextNode"],"mappings":"AAAA,SAASA,EAAYC,EAAKC,QACN,IAAbA,IAAiBA,EAAM,CAAA,GAC5B,IAAIC,EAAWD,EAAIC,SAEnB,GAAKF,GAA2B,oBAAbG,SAAnB,CAEA,IAAIC,EAAOD,SAASC,MAAQD,SAASE,qBAAqB,QAAQ,GAC9DC,EAAQH,SAASI,cAAc,SACnCD,EAAME,KAAO,WAEI,QAAbN,GACEE,EAAKK,WACPL,EAAKM,aAAaJ,EAAOF,EAAKK,YAKhCL,EAAKO,YAAYL,GAGfA,EAAMM,WACRN,EAAMM,WAAWC,QAAUb,EAE3BM,EAAMK,YAAYR,SAASW,eAAed,GAnBY,CAqB1D"}
|
|
@@ -24,7 +24,7 @@ interface FooterData {
|
|
|
24
24
|
tiers?: string[];
|
|
25
25
|
description?: string;
|
|
26
26
|
}
|
|
27
|
-
declare const AccordionSection: ({ title, subtitle, children, defaultOpen, footerData, readOnly, variant, expanded, onToggle, actionButtons, isAiStreaming }: {
|
|
27
|
+
declare const AccordionSection: ({ title, subtitle, children, defaultOpen, footerData, readOnly, variant, expanded, onToggle, actionButtons, isAiStreaming, editFlow }: {
|
|
28
28
|
title: TitleProps;
|
|
29
29
|
subtitle?: string | undefined;
|
|
30
30
|
children: React.ReactNode;
|
|
@@ -36,6 +36,7 @@ declare const AccordionSection: ({ title, subtitle, children, defaultOpen, foote
|
|
|
36
36
|
onToggle?: (() => void) | undefined;
|
|
37
37
|
actionButtons?: ((isOpen: boolean, onToggle: () => void) => React.ReactNode) | undefined;
|
|
38
38
|
isAiStreaming?: boolean | undefined;
|
|
39
|
+
editFlow?: boolean | undefined;
|
|
39
40
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
40
41
|
export default AccordionSection;
|
|
41
42
|
//# sourceMappingURL=AccordianSection.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AccordianSection.d.ts","sourceRoot":"","sources":["../../../../../../src/features/IL-OTJ/_components/AccordianSection.tsx"],"names":[],"mappings":"AAGA,KAAK,UAAU,GACT;IAAE,IAAI,EAAE,SAAS,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,YAAY,CAAC,EAAE,OAAO,CAAC;IAAC,SAAS,CAAC,EAAE,OAAO,CAAC;IAAC,UAAU,CAAC,EAAE,OAAO,CAAA;CAAE,GACrG;IAAE,IAAI,EAAE,SAAS,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,YAAY,CAAC,EAAE,OAAO,CAAC;IAAC,SAAS,CAAC,EAAE,OAAO,CAAC;IAAC,UAAU,CAAC,EAAE,OAAO,CAAA;CAAE,GACrH;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,YAAY,CAAC,EAAE,OAAO,CAAC;IAAC,SAAS,CAAC,EAAE,OAAO,CAAC;IAAC,UAAU,CAAC,EAAE,OAAO,CAAA;CAAE,CAAC;AAE1G,UAAU,UAAU;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,QAAA,MAAM,gBAAgB;
|
|
1
|
+
{"version":3,"file":"AccordianSection.d.ts","sourceRoot":"","sources":["../../../../../../src/features/IL-OTJ/_components/AccordianSection.tsx"],"names":[],"mappings":"AAGA,KAAK,UAAU,GACT;IAAE,IAAI,EAAE,SAAS,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,YAAY,CAAC,EAAE,OAAO,CAAC;IAAC,SAAS,CAAC,EAAE,OAAO,CAAC;IAAC,UAAU,CAAC,EAAE,OAAO,CAAA;CAAE,GACrG;IAAE,IAAI,EAAE,SAAS,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,YAAY,CAAC,EAAE,OAAO,CAAC;IAAC,SAAS,CAAC,EAAE,OAAO,CAAC;IAAC,UAAU,CAAC,EAAE,OAAO,CAAA;CAAE,GACrH;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,YAAY,CAAC,EAAE,OAAO,CAAC;IAAC,SAAS,CAAC,EAAE,OAAO,CAAC;IAAC,UAAU,CAAC,EAAE,OAAO,CAAA;CAAE,CAAC;AAE1G,UAAU,UAAU;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,QAAA,MAAM,gBAAgB;WAcX,UAAU;;cAEP,MAAM,SAAS;;;;;;sBAMR,IAAI;8BACI,OAAO,YAAY,MAAM,IAAI,KAAK,MAAM,SAAS;;;6CA0O7E,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChatComponent.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/IL-OTJ/_components/ChatComponents/ChatComponent.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA6E,MAAM,OAAO,CAAC;AAqClG,UAAU,kBAAkB;IAC1B,iBAAiB,EAAE,MAAM,CAAC;IAC1B,gBAAgB,EAAE,MAAM,CAAC;IACzB,OAAO,EAAE,MAAM,CAAC;IAChB,gBAAgB,EAAE,MAAM,CAAC;IACzB,mBAAmB,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,CAAC;IACnE,yBAAyB,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3C,iBAAiB,EAAE,OAAO,CAAC;IAC3B,qBAAqB,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,CAAC;IACrE,mBAAmB,CAAC,EAAE,MAAM,IAAI,CAAC;IACjC,iBAAiB,EAAE,MAAM,CAAC;IAC1B,oBAAoB,CAAC,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC,CAAC;IACpE,gBAAgB,EAAE,OAAO,CAAC;IAC1B,SAAS,EAAE,MAAM,CAAC;IAClB,cAAc,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IACrC,qBAAqB,EAAE,GAAG,CAAC;IAC3B,UAAU,CAAC,EAAE,GAAG,CAAC;IACjB,aAAa,CAAC,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,CAAC;IAC9D,WAAW,CAAC,EAAE,MAAM,IAAI,CAAC;IACzB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,CAAC,IAAI,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IACrC,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,YAAY,CAAC,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC;IAC9D,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,mBAAmB,CAAC,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC,CAAC;IACnE,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,oDAAoD;IACpD,sBAAsB,CAAC,EAAE,CAAC,WAAW,EAAE,OAAO,KAAK,IAAI,CAAC;IACxD,gBAAgB,CAAC,EAAE,MAAM,IAAI,CAAC;IAC9B,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,qBAAqB,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;IACvE,gBAAgB,CAAC,EAAE,CAAC,OAAO,EAAE,GAAG,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACnD,WAAW,CAAC,EAAE;QACZ,IAAI,EAAE,MAAM,CAAC;QACb,EAAE,EAAE,MAAM,CAAC;QACX,KAAK,EAAE,MAAM,CAAC;KACf,CAAA;IACD,kBAAkB,CAAC,EAAE,OAAO,CAAC;CAC9B;AACD,eAAO,MAAM,kBAAkB,aAAc,MAAM,cAAc,MAAM,iBAsBtE,CAAC;AAEF,QAAA,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,
|
|
1
|
+
{"version":3,"file":"ChatComponent.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/IL-OTJ/_components/ChatComponents/ChatComponent.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA6E,MAAM,OAAO,CAAC;AAqClG,UAAU,kBAAkB;IAC1B,iBAAiB,EAAE,MAAM,CAAC;IAC1B,gBAAgB,EAAE,MAAM,CAAC;IACzB,OAAO,EAAE,MAAM,CAAC;IAChB,gBAAgB,EAAE,MAAM,CAAC;IACzB,mBAAmB,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,CAAC;IACnE,yBAAyB,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3C,iBAAiB,EAAE,OAAO,CAAC;IAC3B,qBAAqB,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,CAAC;IACrE,mBAAmB,CAAC,EAAE,MAAM,IAAI,CAAC;IACjC,iBAAiB,EAAE,MAAM,CAAC;IAC1B,oBAAoB,CAAC,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC,CAAC;IACpE,gBAAgB,EAAE,OAAO,CAAC;IAC1B,SAAS,EAAE,MAAM,CAAC;IAClB,cAAc,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IACrC,qBAAqB,EAAE,GAAG,CAAC;IAC3B,UAAU,CAAC,EAAE,GAAG,CAAC;IACjB,aAAa,CAAC,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,CAAC;IAC9D,WAAW,CAAC,EAAE,MAAM,IAAI,CAAC;IACzB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,CAAC,IAAI,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IACrC,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,YAAY,CAAC,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC;IAC9D,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,mBAAmB,CAAC,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC,CAAC;IACnE,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,oDAAoD;IACpD,sBAAsB,CAAC,EAAE,CAAC,WAAW,EAAE,OAAO,KAAK,IAAI,CAAC;IACxD,gBAAgB,CAAC,EAAE,MAAM,IAAI,CAAC;IAC9B,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,qBAAqB,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;IACvE,gBAAgB,CAAC,EAAE,CAAC,OAAO,EAAE,GAAG,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACnD,WAAW,CAAC,EAAE;QACZ,IAAI,EAAE,MAAM,CAAC;QACb,EAAE,EAAE,MAAM,CAAC;QACX,KAAK,EAAE,MAAM,CAAC;KACf,CAAA;IACD,kBAAkB,CAAC,EAAE,OAAO,CAAC;CAC9B;AACD,eAAO,MAAM,kBAAkB,aAAc,MAAM,cAAc,MAAM,iBAsBtE,CAAC;AAEF,QAAA,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CAs/C/C,CAAC;AAEF,eAAe,aAAa,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CriticalGaps.d.ts","sourceRoot":"","sources":["../../../../../../src/features/IL-OTJ/_components/CriticalGaps.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CriticalGaps.d.ts","sourceRoot":"","sources":["../../../../../../src/features/IL-OTJ/_components/CriticalGaps.tsx"],"names":[],"mappings":"AA6jBA,eAAO,MAAM,YAAY;UASjB,GAAG;mBACM,OAAO;oCACS,OAAO,cAAc,GAAG,EAAE,KAAK,IAAI;;;iCAGtC,IAAI;;6CA0MjC,CAAC"}
|
package/dist/types/src/features/IL-OTJ/_components/MessageRendering/MessageRendering.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MessageRendering.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/IL-OTJ/_components/MessageRendering/MessageRendering.tsx"],"names":[],"mappings":"AAYA,UAAU,qBAAqB;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,GAAG,CAAC;IACd,YAAY,EAAE,GAAG,CAAC;IAClB,cAAc,CAAC,EAAE,GAAG,CAAC;IACrB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,SAAS,CAAC,EAAE,GAAG,EAAE,CAAC;IAClB,WAAW,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACrC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,gBAAgB,CAAC,EAAE,MAAM,IAAI,CAAC;IAC9B,mBAAmB,CAAC,EAAE,MAAM,IAAI,CAAC;IACjC,qBAAqB,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;IACvE,OAAO,CAAC,EAAE,MAAM,GAAC,SAAS,CAAC;IAC3B,gBAAgB,CAAC,EAAE,CAAC,OAAO,EAAE,GAAG,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACnD,kBAAkB,CAAC,EAAE,OAAO,CAAC;CAC9B;AAED,QAAA,MAAM,gBAAgB,uQAoBnB,qBAAqB,
|
|
1
|
+
{"version":3,"file":"MessageRendering.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/IL-OTJ/_components/MessageRendering/MessageRendering.tsx"],"names":[],"mappings":"AAYA,UAAU,qBAAqB;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,GAAG,CAAC;IACd,YAAY,EAAE,GAAG,CAAC;IAClB,cAAc,CAAC,EAAE,GAAG,CAAC;IACrB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,SAAS,CAAC,EAAE,GAAG,EAAE,CAAC;IAClB,WAAW,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACrC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,gBAAgB,CAAC,EAAE,MAAM,IAAI,CAAC;IAC9B,mBAAmB,CAAC,EAAE,MAAM,IAAI,CAAC;IACjC,qBAAqB,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;IACvE,OAAO,CAAC,EAAE,MAAM,GAAC,SAAS,CAAC;IAC3B,gBAAgB,CAAC,EAAE,CAAC,OAAO,EAAE,GAAG,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACnD,kBAAkB,CAAC,EAAE,OAAO,CAAC;CAC9B;AAED,QAAA,MAAM,gBAAgB,uQAoBnB,qBAAqB,4CA26BvB,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NewMinimizedThinkingSteps.d.ts","sourceRoot":"","sources":["../../../../../../src/features/IL-OTJ/_components/NewMinimizedThinkingSteps.tsx"],"names":[],"mappings":";AACA,OAAO,yBAAyB,CAAC;AACjC,OAAO,iCAAiC,CAAC;AACzC,OAAO,
|
|
1
|
+
{"version":3,"file":"NewMinimizedThinkingSteps.d.ts","sourceRoot":"","sources":["../../../../../../src/features/IL-OTJ/_components/NewMinimizedThinkingSteps.tsx"],"names":[],"mappings":";AACA,OAAO,yBAAyB,CAAC;AACjC,OAAO,iCAAiC,CAAC;AACzC,OAAO,EAAwB,KAAK,mBAAmB,EAAE,MAAM,mCAAmC,CAAC;AAMnG,QAAA,MAAM,yBAAyB,gHAmD9B,CAAC;AAEF,eAAe,yBAAyB,CAAC"}
|
|
@@ -15,7 +15,7 @@ export declare const useThinkingSteps: ({ orchestratorAndAgentsMessages, isStrea
|
|
|
15
15
|
openSteps: Record<number, "open" | "expanded" | undefined>;
|
|
16
16
|
showMoreMap: Record<number, boolean>;
|
|
17
17
|
contentRefs: import("react").MutableRefObject<Record<number, HTMLDivElement | null>>;
|
|
18
|
-
currentStep: ThinkingResponseData;
|
|
18
|
+
currentStep: ThinkingResponseData | null;
|
|
19
19
|
currentContent: string;
|
|
20
20
|
wmwLabel: string;
|
|
21
21
|
toggleStep: (index: number) => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Usethinkingsteps.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/IL-OTJ/_components/WatchMeWork/Usethinkingsteps.ts"],"names":[],"mappings":";AAEA,OAAO,EAAc,KAAK,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAE9E,MAAM,MAAM,QAAQ,GAAG,UAAU,GAAG,OAAO,GAAG,aAAa,CAAC;AAE5D,UAAU,qBAAqB;IAC7B,6BAA6B,EAAE,oBAAoB,EAAE,CAAC;IACtD,WAAW,EAAE,OAAO,CAAC;IACrB,SAAS,EAAE,MAAM,GAAE,SAAS,CAAC;IAC7B,iBAAiB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAClC,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;CAC/B;AAED,eAAO,MAAM,gBAAgB,2HAO1B,qBAAqB;;;;;;;;;wBA4DiB,MAAM;4BAcF,MAAM;;;
|
|
1
|
+
{"version":3,"file":"Usethinkingsteps.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/IL-OTJ/_components/WatchMeWork/Usethinkingsteps.ts"],"names":[],"mappings":";AAEA,OAAO,EAAc,KAAK,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAE9E,MAAM,MAAM,QAAQ,GAAG,UAAU,GAAG,OAAO,GAAG,aAAa,CAAC;AAE5D,UAAU,qBAAqB;IAC7B,6BAA6B,EAAE,oBAAoB,EAAE,CAAC;IACtD,WAAW,EAAE,OAAO,CAAC;IACrB,SAAS,EAAE,MAAM,GAAE,SAAS,CAAC;IAC7B,iBAAiB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAClC,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;CAC/B;AAED,eAAO,MAAM,gBAAgB,2HAO1B,qBAAqB;;;;;;;;;wBA4DiB,MAAM;4BAcF,MAAM;;;CA0ElD,CAAC"}
|
|
@@ -6,6 +6,7 @@ interface ListItem {
|
|
|
6
6
|
conflict?: any;
|
|
7
7
|
}
|
|
8
8
|
interface ConditionListProps {
|
|
9
|
+
idPrefix: string;
|
|
9
10
|
items: ListItem[];
|
|
10
11
|
onAdd: () => void;
|
|
11
12
|
onRemove: (tierKey: string, index: number, id: any) => void;
|
|
@@ -29,6 +30,6 @@ interface ConditionListProps {
|
|
|
29
30
|
pendingEditId?: string | null;
|
|
30
31
|
setPendingEditId?: (id: string | null) => void;
|
|
31
32
|
}
|
|
32
|
-
export declare const ConditionList: ({ items, onAdd, onRemove, onEdit, index, tierKey, readOnly, placeholder, addLabel, showAddButton, isHighlighted, highlightedIds, footer, tooltipDescription, citations, setSendMessageInChat, fieldName, isAiStreaming, activeEditId, setActiveEditId, pendingEditId, setPendingEditId }: ConditionListProps) => import("react/jsx-runtime").JSX.Element;
|
|
33
|
+
export declare const ConditionList: ({ idPrefix, items, onAdd, onRemove, onEdit, index, tierKey, readOnly, placeholder, addLabel, showAddButton, isHighlighted, highlightedIds, footer, tooltipDescription, citations, setSendMessageInChat, fieldName, isAiStreaming, activeEditId, setActiveEditId, pendingEditId, setPendingEditId }: ConditionListProps) => import("react/jsx-runtime").JSX.Element;
|
|
33
34
|
export {};
|
|
34
35
|
//# sourceMappingURL=ConditionList.d.ts.map
|
package/dist/types/src/features/IL-OTJ/_components/molecules/Condition/ConditionList.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConditionList.d.ts","sourceRoot":"","sources":["../../../../../../../../src/features/IL-OTJ/_components/molecules/Condition/ConditionList.tsx"],"names":[],"mappings":";AAQA,UAAU,QAAQ;IAChB,EAAE,EAAE,MAAM,GAAG,MAAM,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,GAAG,CAAC;CAChB;AAED,UAAU,kBAAkB;IAC1B,KAAK,EAAE,QAAQ,EAAE,CAAC;IAClB,KAAK,EAAE,MAAM,IAAI,CAAC;IAClB,QAAQ,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,EAAE,GAAG,KAAK,IAAI,CAAC;IAC5D,MAAM,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACxE,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,OAAO,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,cAAc,CAAC,EAAE,GAAG,CAAC,MAAM,GAAG,MAAM,CAAC,CAAC;IACtC,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACzB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,SAAS,CAAC,EAAE,GAAG,EAAE,CAAC;IAClB,oBAAoB,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAC/C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,eAAe,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;IAC9C,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,gBAAgB,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;CAChD;AAED,eAAO,MAAM,aAAa,
|
|
1
|
+
{"version":3,"file":"ConditionList.d.ts","sourceRoot":"","sources":["../../../../../../../../src/features/IL-OTJ/_components/molecules/Condition/ConditionList.tsx"],"names":[],"mappings":";AAQA,UAAU,QAAQ;IAChB,EAAE,EAAE,MAAM,GAAG,MAAM,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,GAAG,CAAC;CAChB;AAED,UAAU,kBAAkB;IAC1B,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,QAAQ,EAAE,CAAC;IAClB,KAAK,EAAE,MAAM,IAAI,CAAC;IAClB,QAAQ,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,EAAE,GAAG,KAAK,IAAI,CAAC;IAC5D,MAAM,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACxE,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,OAAO,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,cAAc,CAAC,EAAE,GAAG,CAAC,MAAM,GAAG,MAAM,CAAC,CAAC;IACtC,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACzB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,SAAS,CAAC,EAAE,GAAG,EAAE,CAAC;IAClB,oBAAoB,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAC/C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,eAAe,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;IAC9C,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,gBAAgB,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;CAChD;AAED,eAAO,MAAM,aAAa,uSAwBvB,kBAAkB,4CAgYpB,CAAC"}
|
package/dist/types/src/features/IL-OTJ/_components/organisms/ConditionSection/ConditionSection.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const ConditionSection: ({ conditions, onAdd, onRemove, onEdit, index, isHighlighted, highlightedIds, footer, tooltipDescription, citations, addLabel, title, sendMessageInChat, setSendMessageInChat, readOnly, isAiStreaming, errorMessage, activeEditId, setActiveEditId, pendingEditId, setPendingEditId, ...props }: any) => import("react/jsx-runtime").JSX.Element;
|
|
1
|
+
export declare const ConditionSection: ({ conditions, onAdd, onRemove, onEdit, index, isHighlighted, highlightedIds, footer, tooltipDescription, citations, addLabel, title, sendMessageInChat, setSendMessageInChat, readOnly, isAiStreaming, errorMessage, activeEditId, setActiveEditId, pendingEditId, setPendingEditId, idPrefix, ...props }: any) => import("react/jsx-runtime").JSX.Element;
|
|
2
2
|
//# sourceMappingURL=ConditionSection.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConditionSection.d.ts","sourceRoot":"","sources":["../../../../../../../../src/features/IL-OTJ/_components/organisms/ConditionSection/ConditionSection.tsx"],"names":[],"mappings":"AAGA,eAAO,MAAM,gBAAgB,
|
|
1
|
+
{"version":3,"file":"ConditionSection.d.ts","sourceRoot":"","sources":["../../../../../../../../src/features/IL-OTJ/_components/organisms/ConditionSection/ConditionSection.tsx"],"names":[],"mappings":"AAGA,eAAO,MAAM,gBAAgB,8SAC6C,GAAG,4CAgC5E,CAAC"}
|
package/dist/types/src/features/IL-OTJ/_components/templates/RuleComparison/RuleComparison.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RuleComparison.d.ts","sourceRoot":"","sources":["../../../../../../../../src/features/IL-OTJ/_components/templates/RuleComparison/RuleComparison.tsx"],"names":[],"mappings":"AAOA,UAAU,uBAAuB;IAC/B,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE;QACX,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;QACvB,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;KACxB,CAAC;CACH;AAED,UAAU,kBAAkB;IAC1B,0BAA0B,EAAE;QAC1B,OAAO,EAAE;YACP,aAAa,EAAE,MAAM,CAAC;YACtB,eAAe,EAAE,MAAM,CAAC;SACzB,CAAC;QACF,MAAM,EAAE;YACN,KAAK,EAAE,uBAAuB,CAAC;YAC/B,KAAK,EAAE,uBAAuB,CAAC;YAC/B,WAAW,EAAE,uBAAuB,CAAC;YACrC,aAAa,EAAE;gBACb,KAAK,EAAE,MAAM,CAAC;gBACd,QAAQ,EAAE,GAAG,EAAE,CAAC;aACjB,CAAC;YACF,iBAAiB,EAAE;gBACjB,KAAK,EAAE,MAAM,CAAC;gBACd,QAAQ,EAAE,GAAG,EAAE,CAAC;aACjB,CAAC;SACH,CAAC;KACH,CAAC;CACH;AAED,UAAU,QAAQ;IAChB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,kBAAkB,CAAC;IAC9B,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,MAAM,WAAW,mBAAmB;IAClC,YAAY,EAAE,GAAG,CAAC;IAClB,QAAQ,CAAC,EAAE,QAAQ,EAAE,CAAC;IACtB,eAAe,EAAE,CAAC,OAAO,EAAE,QAAQ,KAAK,IAAI,CAAC;IAC7C,cAAc,CAAC,EAAE,MAAM,IAAI,CAAC;IAC5B,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,eAAe,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,gBAAgB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAClC;
|
|
1
|
+
{"version":3,"file":"RuleComparison.d.ts","sourceRoot":"","sources":["../../../../../../../../src/features/IL-OTJ/_components/templates/RuleComparison/RuleComparison.tsx"],"names":[],"mappings":"AAOA,UAAU,uBAAuB;IAC/B,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE;QACX,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;QACvB,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;KACxB,CAAC;CACH;AAED,UAAU,kBAAkB;IAC1B,0BAA0B,EAAE;QAC1B,OAAO,EAAE;YACP,aAAa,EAAE,MAAM,CAAC;YACtB,eAAe,EAAE,MAAM,CAAC;SACzB,CAAC;QACF,MAAM,EAAE;YACN,KAAK,EAAE,uBAAuB,CAAC;YAC/B,KAAK,EAAE,uBAAuB,CAAC;YAC/B,WAAW,EAAE,uBAAuB,CAAC;YACrC,aAAa,EAAE;gBACb,KAAK,EAAE,MAAM,CAAC;gBACd,QAAQ,EAAE,GAAG,EAAE,CAAC;aACjB,CAAC;YACF,iBAAiB,EAAE;gBACjB,KAAK,EAAE,MAAM,CAAC;gBACd,QAAQ,EAAE,GAAG,EAAE,CAAC;aACjB,CAAC;SACH,CAAC;KACH,CAAC;CACH;AAED,UAAU,QAAQ;IAChB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,kBAAkB,CAAC;IAC9B,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,MAAM,WAAW,mBAAmB;IAClC,YAAY,EAAE,GAAG,CAAC;IAClB,QAAQ,CAAC,EAAE,QAAQ,EAAE,CAAC;IACtB,eAAe,EAAE,CAAC,OAAO,EAAE,QAAQ,KAAK,IAAI,CAAC;IAC7C,cAAc,CAAC,EAAE,MAAM,IAAI,CAAC;IAC5B,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,eAAe,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,gBAAgB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAClC;AAgVD,QAAA,MAAM,cAAc,mHASjB,mBAAmB,4CA4brB,CAAC;AAEF,eAAe,cAAc,CAAC"}
|
package/dist/types/src/features/IL-OTJ/_components/templates/TrafficManager/CreateRule.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CreateRule.d.ts","sourceRoot":"","sources":["../../../../../../../../src/features/IL-OTJ/_components/templates/TrafficManager/CreateRule.tsx"],"names":[],"mappings":"AAoDA,eAAO,MAAM,UAAU,iCAAkC,GAAG,
|
|
1
|
+
{"version":3,"file":"CreateRule.d.ts","sourceRoot":"","sources":["../../../../../../../../src/features/IL-OTJ/_components/templates/TrafficManager/CreateRule.tsx"],"names":[],"mappings":"AAoDA,eAAO,MAAM,UAAU,iCAAkC,GAAG,4CAgpB3D,CAAC"}
|