diff --git a/js/dist/chat/chat.css b/js/dist/chat/chat.css
index e9ca14a4..721fd3dd 100644
--- a/js/dist/chat/chat.css
+++ b/js/dist/chat/chat.css
@@ -1,2 +1,2 @@
-@charset "UTF-8";.shiny-tool-card{max-height:var(--shiny-tool-card-max-height, 500px)}.shiny-tool-card .tool-intent{opacity:.66;font-style:italic;font-weight:400}.shiny-tool-card .tool-spacer{margin-inline-start:auto}.shiny-tool-card .tool-icon{--_icon-size: var(--shiny-tool-card-icon-size, 16px);width:var(--_icon-size);height:var(--_icon-size);display:flex;align-items:center;flex:none}.shiny-tool-card .tool-icon [class^=spinner]{--bs-spinner-width: var(--_icon-size);--bs-spinner-height: var(--_icon-size);--bs-spinner-border-width: .2em;color:var(--shiny-tool-card-spinner-color, var(--bs-primary, #007bc2))}.shiny-tool-card .tool-title-name{font-weight:600}.shiny-tool-card .card-header,.shiny-tool-card .card-footer{font-size:inherit;font-weight:400;word-break:break-word}.shiny-tool-card>.card-header{display:flex;flex-direction:row;align-items:center;align-self:stretch;gap:.5rem;width:100%;text-align:left;cursor:pointer;border-top-width:0;border-right-width:0;border-left-width:0}.shiny-tool-card>.card-header[aria-expanded=false]{border-bottom-width:0}.shiny-tool-card>.card-header>*{line-height:1}.shiny-tool-card>.card-header:hover,.shiny-tool-card>.card-header:focus-visible{background-color:rgba(var(--bs-emphasis-color-rgb),.05);outline:none}.shiny-tool-card>.card-header .function-name{font-weight:700}.shiny-tool-card>.card-header .collapse-indicator{display:grid;place-items:center;width:1em;height:1em;opacity:.66}.shiny-tool-card>.card-header .collapse-indicator,.shiny-tool-card>.card-header .collapse-indicator>.horizontal{transition:.3s ease-in-out all;transform-origin:center center}.shiny-tool-card>.card-header[aria-expanded=true]>.collapse-indicator{transform:rotate(-90deg)}.shiny-tool-card>.card-header[aria-expanded=true]>.collapse-indicator .horizontal{transform:scale(0)}.shiny-tool-card>.card-body{transition:max-height .3s ease-out,opacity .2s ease-out;opacity:1;overflow:auto}.shiny-tool-card>.card-body.collapsed{max-height:0;opacity:0;padding:0}.shiny-tool-card pre{margin:0;white-space:pre-wrap;padding:1em;border-radius:var(--bs-border-radius, 4px)}shiny-tool-result,shiny-tool-request{display:block;margin:1em 0;border-radius:var(--bs-border-radius, 4px);overflow:visible;padding:0;font-size:.8em}shiny-tool-result[hidden],shiny-tool-request[hidden]{display:none}shiny-tool-result+p,shiny-tool-request+p{margin-top:1rem}shiny-tool-result:first-child,shiny-tool-request:first-child{margin-top:0}shiny-tool-result:last-child,shiny-tool-request:last-child{margin-bottom:0}shiny-tool-request[hidden]+shiny-tool-result:first-of-type{margin-top:0}shiny-chat-container{--shiny-chat-border: var(--bs-border-width, 1px) solid var(--bs-border-color, #e9ecef);--shiny-chat-user-message-bg: RGBA(var(--bs-primary-rgb, 0, 123, 194), .06);--_chat-container-padding: .25rem;display:grid;grid-template-columns:1fr;grid-template-rows:1fr auto;margin:0 auto;gap:0;padding:var(--_chat-container-padding);padding-bottom:0}shiny-chat-container p:last-child{margin-bottom:0}shiny-chat-container .suggestion,shiny-chat-container [data-suggestion]{cursor:pointer}shiny-chat-container .suggestion{color:var(--bs-link-color, #007bc2);text-decoration-color:var(--bs-link-color, #007bc2);text-decoration-line:underline;text-decoration-style:dotted;text-underline-offset:2px;text-underline-offset:4px;text-decoration-thickness:2px;padding-inline:2px}shiny-chat-container .suggestion:hover{text-decoration-style:solid}shiny-chat-container .suggestion:after{content:"\2726";display:inline-block;margin-inline-start:.15em}shiny-chat-container .suggestion.submit:after,shiny-chat-container .suggestion[data-suggestion-submit=""]:after,shiny-chat-container .suggestion[data-suggestion-submit=true]:after{content:"\21b5"}shiny-chat-container .card[data-suggestion]:hover{color:var(--bs-link-color, #007bc2);border-color:rgba(var(--bs-link-color-rgb),.5)}shiny-chat-messages{display:flex;flex-direction:column;gap:2rem;overflow:auto;margin-bottom:1rem;--_scroll-margin: 1rem;padding-right:var(--_scroll-margin);margin-right:calc(-1 * var(--_scroll-margin))}shiny-chat-message{display:grid;grid-template-columns:auto minmax(0,1fr);gap:1rem}shiny-chat-message>*{height:fit-content}shiny-chat-message .message-icon{border-radius:50%;border:var(--shiny-chat-border);height:2rem;width:2rem;display:grid;place-items:center;overflow:clip}shiny-chat-message .message-icon>*{height:100%;width:100%;max-width:100%;max-height:100%;margin:0!important;object-fit:contain}shiny-chat-message .message-icon>svg,shiny-chat-message .message-icon>.icon,shiny-chat-message .message-icon>.fa,shiny-chat-message .message-icon>.bi{max-height:66%;max-width:66%}shiny-chat-message .message-icon:has(>.border-0){border:none;border-radius:unset;overflow:unset}shiny-chat-message shiny-markdown-stream{align-self:center}shiny-user-message,shiny-chat-message[data-role=user]{align-self:flex-end;padding:.75rem 1rem;border-radius:10px;background-color:var(--shiny-chat-user-message-bg);max-width:100%}shiny-chat-message[data-role=user]:not([icon]){grid-template-columns:auto}shiny-user-message[content_type=text],shiny-chat-message[content_type=text]{white-space:pre;overflow-x:auto}shiny-chat-input{--_input-padding-top: 0;--_input-padding-bottom: var(--_chat-container-padding, .25rem);margin-top:calc(-1 * var(--_input-padding-top));position:sticky;bottom:calc(-1 * var(--_input-padding-bottom) + 4px);padding-block:var(--_input-padding-top) var(--_input-padding-bottom)}shiny-chat-input textarea{--bs-border-radius: 26px;resize:none;padding-right:36px!important;max-height:175px}shiny-chat-input textarea::placeholder{color:var(--bs-gray-600, #707782)!important}shiny-chat-input button{position:absolute;bottom:calc(6px + var(--_input-padding-bottom));right:8px;background-color:transparent;color:var(--bs-primary, #007bc2);transition:color .25s ease-in-out;border:none;padding:0;cursor:pointer;line-height:16px;border-radius:50%}shiny-chat-input button:disabled{cursor:not-allowed;color:var(--bs-gray-500, #8d959e)}.shiny-busy:has(shiny-chat-input[disabled]):after{display:none}
+@charset "UTF-8";.shiny-tool-card{max-height:var(--shiny-tool-card-max-height, 500px)}.shiny-tool-card .tool-intent{opacity:.66;font-style:italic;font-weight:400}.shiny-tool-card .tool-spacer{margin-inline-start:auto}.shiny-tool-card .tool-icon{--_icon-size: var(--shiny-tool-card-icon-size, 16px);width:var(--_icon-size);height:var(--_icon-size);display:flex;align-items:center;flex:none}.shiny-tool-card .tool-icon [class^=spinner]{--bs-spinner-width: var(--_icon-size);--bs-spinner-height: var(--_icon-size);--bs-spinner-border-width: .2em;color:var(--shiny-tool-card-spinner-color, var(--bs-primary, #007bc2))}.shiny-tool-card .tool-title-name{font-weight:600}.shiny-tool-card .card-header,.shiny-tool-card .card-footer{font-size:inherit;font-weight:400;word-break:break-word}.shiny-tool-card>.card-header{display:flex;flex-direction:row;align-items:center;align-self:stretch;gap:.5rem;width:100%;text-align:left;cursor:pointer;border-top-width:0;border-right-width:0;border-left-width:0}.shiny-tool-card>.card-header[aria-expanded=false]{border-bottom-width:0}.shiny-tool-card>.card-header>*{line-height:1}.shiny-tool-card>.card-header:hover,.shiny-tool-card>.card-header:focus-visible{background-color:rgba(var(--bs-emphasis-color-rgb),.05);outline:none}.shiny-tool-card>.card-header .function-name{font-weight:700}.shiny-tool-card>.card-header .collapse-indicator{display:grid;place-items:center;width:1em;height:1em;opacity:.66}.shiny-tool-card>.card-header .collapse-indicator,.shiny-tool-card>.card-header .collapse-indicator>.horizontal{transition:.3s ease-in-out all;transform-origin:center center}.shiny-tool-card>.card-header[aria-expanded=true]>.collapse-indicator{transform:rotate(-90deg)}.shiny-tool-card>.card-header[aria-expanded=true]>.collapse-indicator .horizontal{transform:scale(0)}.shiny-tool-card>.card-body{transition:max-height .3s ease-out,opacity .2s ease-out;opacity:1;overflow:auto}.shiny-tool-card>.card-body.collapsed{max-height:0;opacity:0;padding:0}.shiny-tool-card pre{margin:0;white-space:pre-wrap;padding:1em;border-radius:var(--bs-border-radius, 4px)}shiny-tool-result,shiny-tool-request{display:block;margin:1em 0;border-radius:var(--bs-border-radius, 4px);overflow:visible;padding:0;font-size:.8em}shiny-tool-result[hidden],shiny-tool-request[hidden]{display:none}shiny-tool-result+p,shiny-tool-request+p{margin-top:1rem}shiny-tool-result:first-child,shiny-tool-request:first-child{margin-top:0}shiny-tool-result:last-child,shiny-tool-request:last-child{margin-bottom:0}shiny-tool-request[hidden]+shiny-tool-result:first-of-type{margin-top:0}shiny-chat-container{--shiny-chat-border: var(--bs-border-width, 1px) solid var(--bs-border-color, #e9ecef);--shiny-chat-user-message-bg: RGBA(var(--bs-primary-rgb, 0, 123, 194), .06);--_chat-container-padding: .25rem;display:grid;grid-template-columns:1fr;grid-template-rows:1fr auto;margin:0 auto;gap:0;padding:var(--_chat-container-padding);padding-bottom:0}shiny-chat-container p:last-child{margin-bottom:0}shiny-chat-container .suggestion,shiny-chat-container [data-suggestion]{cursor:pointer}shiny-chat-container .suggestion{color:var(--bs-link-color, #007bc2);text-decoration-color:var(--bs-link-color, #007bc2);text-decoration-line:underline;text-decoration-style:dotted;text-underline-offset:2px;text-underline-offset:4px;text-decoration-thickness:2px;padding-inline:2px}shiny-chat-container .suggestion:hover{text-decoration-style:solid}shiny-chat-container .suggestion:after{content:"\2726";display:inline-block;margin-inline-start:.15em}shiny-chat-container .suggestion.submit:after,shiny-chat-container .suggestion[data-suggestion-submit=""]:after,shiny-chat-container .suggestion[data-suggestion-submit=true]:after{content:"\21b5"}shiny-chat-container .card[data-suggestion]:hover{color:var(--bs-link-color, #007bc2);border-color:rgba(var(--bs-link-color-rgb),.5)}shiny-chat-messages{display:flex;flex-direction:column;gap:2rem;overflow:auto;margin-bottom:1rem;--_scroll-margin: 1rem;padding-right:var(--_scroll-margin);margin-right:calc(-1 * var(--_scroll-margin))}shiny-chat-message{display:grid;grid-template-columns:auto minmax(0,1fr);gap:1rem}shiny-chat-message>*{height:fit-content}shiny-chat-message .message-icon{border-radius:50%;border:var(--shiny-chat-border);height:2rem;width:2rem;display:grid;place-items:center;overflow:clip}shiny-chat-message .message-icon>*{height:100%;width:100%;max-width:100%;max-height:100%;margin:0!important;object-fit:contain}shiny-chat-message .message-icon>svg,shiny-chat-message .message-icon>.icon,shiny-chat-message .message-icon>.fa,shiny-chat-message .message-icon>.bi{max-height:66%;max-width:66%}shiny-chat-message .message-icon:has(>.border-0){border:none;border-radius:unset;overflow:unset}shiny-chat-message shiny-markdown-stream{align-self:center}shiny-user-message,shiny-chat-message[data-role=user]{align-self:flex-end;padding:.75rem 1rem;border-radius:10px;background-color:var(--shiny-chat-user-message-bg);max-width:100%}shiny-chat-message[data-role=user]:not([icon]){grid-template-columns:auto}shiny-user-message[content_type=text],shiny-chat-message[content_type=text]{white-space:pre;overflow-x:auto}shiny-chat-message .message-content shiny-markdown-stream:not(:last-child){margin-bottom:1rem}shiny-chat-message shiny-markdown-stream:empty{display:none}shiny-chat-input{--_input-padding-top: 0;--_input-padding-bottom: var(--_chat-container-padding, .25rem);margin-top:calc(-1 * var(--_input-padding-top));position:sticky;bottom:calc(-1 * var(--_input-padding-bottom) + 4px);padding-block:var(--_input-padding-top) var(--_input-padding-bottom)}shiny-chat-input textarea{--bs-border-radius: 26px;resize:none;padding-right:36px!important;max-height:175px}shiny-chat-input textarea::placeholder{color:var(--bs-gray-600, #707782)!important}shiny-chat-input button{position:absolute;bottom:calc(6px + var(--_input-padding-bottom));right:8px;background-color:transparent;color:var(--bs-primary, #007bc2);transition:color .25s ease-in-out;border:none;padding:0;cursor:pointer;line-height:16px;border-radius:50%}shiny-chat-input button:disabled{cursor:not-allowed;color:var(--bs-gray-500, #8d959e)}.shiny-busy:has(shiny-chat-input[disabled]):after{display:none}
/*# sourceMappingURL=chat.css.map */
diff --git a/js/dist/chat/chat.css.map b/js/dist/chat/chat.css.map
index c6781b44..09e9bf58 100644
--- a/js/dist/chat/chat.css.map
+++ b/js/dist/chat/chat.css.map
@@ -1,7 +1,7 @@
{
"version": 3,
"sources": ["../../src/chat/chat.scss"],
- "sourcesContent": ["@charset \"UTF-8\";\n.shiny-tool-card {\n max-height: var(--shiny-tool-card-max-height, 500px);\n}\n.shiny-tool-card .tool-intent {\n opacity: 0.66;\n font-style: italic;\n font-weight: normal;\n}\n.shiny-tool-card .tool-spacer {\n margin-inline-start: auto;\n}\n.shiny-tool-card .tool-icon {\n --_icon-size: var(--shiny-tool-card-icon-size, 16px);\n width: var(--_icon-size);\n height: var(--_icon-size);\n display: flex;\n align-items: center;\n flex: none;\n}\n.shiny-tool-card .tool-icon [class^=spinner] {\n --bs-spinner-width: var(--_icon-size);\n --bs-spinner-height: var(--_icon-size);\n --bs-spinner-border-width: 0.20em;\n color: var(--shiny-tool-card-spinner-color, var(--bs-primary, #007bc2));\n}\n.shiny-tool-card .tool-title-name {\n font-weight: 600;\n}\n.shiny-tool-card .card-header,\n.shiny-tool-card .card-footer {\n font-size: inherit;\n font-weight: 400;\n word-break: break-word;\n}\n.shiny-tool-card > .card-header {\n display: flex;\n flex-direction: row;\n align-items: center;\n align-self: stretch;\n gap: 0.5rem;\n width: 100%;\n text-align: left;\n cursor: pointer;\n border-top-width: 0;\n border-right-width: 0;\n border-left-width: 0;\n}\n.shiny-tool-card > .card-header[aria-expanded=false] {\n border-bottom-width: 0;\n}\n.shiny-tool-card > .card-header > * {\n line-height: 1;\n}\n.shiny-tool-card > .card-header:hover, .shiny-tool-card > .card-header:focus-visible {\n background-color: rgba(var(--bs-emphasis-color-rgb), 0.05);\n outline: none;\n}\n.shiny-tool-card > .card-header .function-name {\n font-weight: bold;\n}\n.shiny-tool-card > .card-header .collapse-indicator {\n display: grid;\n place-items: center;\n width: 1em;\n height: 1em;\n opacity: 0.66;\n}\n.shiny-tool-card > .card-header .collapse-indicator,\n.shiny-tool-card > .card-header .collapse-indicator > .horizontal {\n transition: 0.3s ease-in-out all;\n transform-origin: center center;\n}\n.shiny-tool-card > .card-header[aria-expanded=true] > .collapse-indicator {\n transform: rotate(-90deg);\n}\n.shiny-tool-card > .card-header[aria-expanded=true] > .collapse-indicator .horizontal {\n transform: scale(0);\n}\n.shiny-tool-card > .card-body {\n transition: max-height 0.3s ease-out, opacity 0.2s ease-out;\n opacity: 1;\n overflow: auto;\n}\n.shiny-tool-card > .card-body.collapsed {\n max-height: 0;\n opacity: 0;\n padding: 0;\n}\n.shiny-tool-card pre {\n margin: 0;\n white-space: pre-wrap;\n padding: 1em;\n border-radius: var(--bs-border-radius, 4px);\n}\n\nshiny-tool-result,\nshiny-tool-request {\n display: block;\n margin: 1em 0;\n border-radius: var(--bs-border-radius, 4px);\n overflow: visible;\n padding: 0;\n font-size: 0.8em;\n}\nshiny-tool-result[hidden],\nshiny-tool-request[hidden] {\n display: none;\n}\n\nshiny-tool-result + p,\nshiny-tool-request + p {\n margin-top: 1rem;\n}\n\nshiny-tool-result:first-child,\nshiny-tool-request:first-child {\n margin-top: 0;\n}\nshiny-tool-result:last-child,\nshiny-tool-request:last-child {\n margin-bottom: 0;\n}\n\nshiny-tool-request[hidden] + shiny-tool-result:first-of-type {\n margin-top: 0;\n}\n\nshiny-chat-container {\n --shiny-chat-border: var(--bs-border-width, 1px) solid var(--bs-border-color, #e9ecef);\n --shiny-chat-user-message-bg: RGBA(var(--bs-primary-rgb, 0, 123, 194), 0.06);\n --_chat-container-padding: 0.25rem;\n display: grid;\n grid-template-columns: 1fr;\n grid-template-rows: 1fr auto;\n margin: 0 auto;\n gap: 0;\n padding: var(--_chat-container-padding);\n padding-bottom: 0;\n}\nshiny-chat-container p:last-child {\n margin-bottom: 0;\n}\nshiny-chat-container .suggestion,\nshiny-chat-container [data-suggestion] {\n cursor: pointer;\n}\nshiny-chat-container .suggestion {\n color: var(--bs-link-color, #007bc2);\n text-decoration-color: var(--bs-link-color, #007bc2);\n text-decoration-line: underline;\n text-decoration-style: dotted;\n text-decoration-thickness: 2px;\n text-underline-offset: 2px;\n text-underline-offset: 4px;\n text-decoration-thickness: 2px;\n padding-inline: 2px;\n}\nshiny-chat-container .suggestion:hover {\n text-decoration-style: solid;\n}\nshiny-chat-container .suggestion::after {\n content: \"\u2726\";\n display: inline-block;\n margin-inline-start: 0.15em;\n}\nshiny-chat-container .suggestion.submit::after, shiny-chat-container .suggestion[data-suggestion-submit=\"\"]::after, shiny-chat-container .suggestion[data-suggestion-submit=true]::after {\n content: \"\u21B5\";\n}\nshiny-chat-container .card[data-suggestion]:hover {\n color: var(--bs-link-color, #007bc2);\n border-color: rgba(var(--bs-link-color-rgb), 0.5);\n}\n\nshiny-chat-messages {\n display: flex;\n flex-direction: column;\n gap: 2rem;\n overflow: auto;\n margin-bottom: 1rem;\n --_scroll-margin: 1rem;\n padding-right: var(--_scroll-margin);\n margin-right: calc(-1 * var(--_scroll-margin));\n}\n\nshiny-chat-message {\n display: grid;\n grid-template-columns: auto minmax(0, 1fr);\n gap: 1rem;\n /* Vertically center the 2nd column (message content) */\n}\nshiny-chat-message > * {\n height: fit-content;\n}\nshiny-chat-message .message-icon {\n border-radius: 50%;\n border: var(--shiny-chat-border);\n height: 2rem;\n width: 2rem;\n display: grid;\n place-items: center;\n overflow: clip;\n}\nshiny-chat-message .message-icon > * {\n height: 100%;\n width: 100%;\n max-width: 100%;\n max-height: 100%;\n margin: 0 !important;\n object-fit: contain;\n}\nshiny-chat-message .message-icon > svg,\nshiny-chat-message .message-icon > .icon,\nshiny-chat-message .message-icon > .fa,\nshiny-chat-message .message-icon > .bi {\n max-height: 66%;\n max-width: 66%;\n}\nshiny-chat-message .message-icon:has(> .border-0) {\n border: none;\n border-radius: unset;\n overflow: unset;\n}\nshiny-chat-message shiny-markdown-stream {\n align-self: center;\n}\n\n/* Align the user message to the right */\nshiny-user-message,\nshiny-chat-message[data-role=user] {\n align-self: flex-end;\n padding: 0.75rem 1rem;\n border-radius: 10px;\n background-color: var(--shiny-chat-user-message-bg);\n max-width: 100%;\n}\n\nshiny-chat-message[data-role=user]:not([icon]) {\n grid-template-columns: auto;\n}\n\nshiny-user-message[content_type=text],\nshiny-chat-message[content_type=text] {\n white-space: pre;\n overflow-x: auto;\n}\n\nshiny-chat-input {\n --_input-padding-top: 0;\n --_input-padding-bottom: var(--_chat-container-padding, 0.25rem);\n margin-top: calc(-1 * var(--_input-padding-top));\n position: sticky;\n bottom: calc(-1 * var(--_input-padding-bottom) + 4px);\n padding-block: var(--_input-padding-top) var(--_input-padding-bottom);\n}\nshiny-chat-input textarea {\n --bs-border-radius: 26px;\n resize: none;\n padding-right: 36px !important;\n max-height: 175px;\n}\nshiny-chat-input textarea::placeholder {\n color: var(--bs-gray-600, #707782) !important;\n}\nshiny-chat-input button {\n position: absolute;\n bottom: calc(6px + var(--_input-padding-bottom));\n right: 8px;\n background-color: transparent;\n color: var(--bs-primary, #007bc2);\n transition: color 0.25s ease-in-out;\n border: none;\n padding: 0;\n cursor: pointer;\n line-height: 16px;\n border-radius: 50%;\n}\nshiny-chat-input button:disabled {\n cursor: not-allowed;\n color: var(--bs-gray-500, #8d959e);\n}\n\n/*\n Disable the page-level pulse when the chat input is disabled\n (i.e., when a response is being generated and brought into the chat)\n*/\n.shiny-busy:has(shiny-chat-input[disabled])::after {\n display: none;\n}"],
- "mappings": "iBACA,CAAC,gBACC,WAAY,IAAI,4BAA4B,EAAE,MAChD,CACA,CAHC,gBAGgB,CAAC,YAChB,QAAS,IACT,WAAY,OACZ,YAAa,GACf,CACA,CARC,gBAQgB,CAAC,YAChB,oBAAqB,IACvB,CACA,CAXC,gBAWgB,CAAC,UAChB,cAAc,IAAI,2BAA2B,EAAE,MAC/C,MAAO,IAAI,cACX,OAAQ,IAAI,cACZ,QAAS,KACT,YAAa,OACb,KAAM,IACR,CACA,CAnBC,gBAmBgB,CARC,UAQU,CAAC,gBAC3B,oBAAoB,IAAI,cACxB,qBAAqB,IAAI,cACzB,2BAA2B,KAC3B,MAAO,IAAI,+BAA+B,EAAE,IAAI,YAAY,EAAE,SAChE,CACA,CAzBC,gBAyBgB,CAAC,gBAChB,YAAa,GACf,CACA,CA5BC,gBA4BgB,CAAC,YAClB,CA7BC,gBA6BgB,CAAC,YAChB,UAAW,QACX,YAAa,IACb,WAAY,UACd,CACA,CAlCC,eAkCgB,CAAE,CAND,YAOhB,QAAS,KACT,eAAgB,IAChB,YAAa,OACb,WAAY,QACZ,IAAK,MACL,MAAO,KACP,WAAY,KACZ,OAAQ,QACR,iBAAkB,EAClB,mBA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/C,CACA,iBAAiB,SACf,oBAAoB,KACpB,OAAQ,KACR,cAAe,eACf,WAAY,KACd,CACA,iBAAiB,QAAQ,cACvB,MAAO,IAAI,aAAa,EAAE,kBAC5B,CACA,iBAAiB,OACf,SAAU,SACV,OAAQ,KAAK,IAAI,EAAE,IAAI,0BACvB,MAAO,IACP,iBAAkB,YAClB,MAAO,IAAI,YAAY,EAAE,SACzB,WAAY,MAAM,KAAM,YACxB,OAAQ,KA/QV,QAgRW,EACT,OAAQ,QACR,YAAa,KAlRf,cAmRiB,GACjB,CACA,iBAAiB,MAAM,UACrB,OAAQ,YACR,MAAO,IAAI,aAAa,EAAE,QAC5B,CAMA,CAAC,UAAU,KAAK,gBAAgB,CAAC,UAAU,OACzC,QAAS,IACX",
+ "sourcesContent": ["@charset \"UTF-8\";\n.shiny-tool-card {\n max-height: var(--shiny-tool-card-max-height, 500px);\n}\n.shiny-tool-card .tool-intent {\n opacity: 0.66;\n font-style: italic;\n font-weight: normal;\n}\n.shiny-tool-card .tool-spacer {\n margin-inline-start: auto;\n}\n.shiny-tool-card .tool-icon {\n --_icon-size: var(--shiny-tool-card-icon-size, 16px);\n width: var(--_icon-size);\n height: var(--_icon-size);\n display: flex;\n align-items: center;\n flex: none;\n}\n.shiny-tool-card .tool-icon [class^=spinner] {\n --bs-spinner-width: var(--_icon-size);\n --bs-spinner-height: var(--_icon-size);\n --bs-spinner-border-width: 0.20em;\n color: var(--shiny-tool-card-spinner-color, var(--bs-primary, #007bc2));\n}\n.shiny-tool-card .tool-title-name {\n font-weight: 600;\n}\n.shiny-tool-card .card-header,\n.shiny-tool-card .card-footer {\n font-size: inherit;\n font-weight: 400;\n word-break: break-word;\n}\n.shiny-tool-card > .card-header {\n display: flex;\n flex-direction: row;\n align-items: center;\n align-self: stretch;\n gap: 0.5rem;\n width: 100%;\n text-align: left;\n cursor: pointer;\n border-top-width: 0;\n border-right-width: 0;\n border-left-width: 0;\n}\n.shiny-tool-card > .card-header[aria-expanded=false] {\n border-bottom-width: 0;\n}\n.shiny-tool-card > .card-header > * {\n line-height: 1;\n}\n.shiny-tool-card > .card-header:hover, .shiny-tool-card > .card-header:focus-visible {\n background-color: rgba(var(--bs-emphasis-color-rgb), 0.05);\n outline: none;\n}\n.shiny-tool-card > .card-header .function-name {\n font-weight: bold;\n}\n.shiny-tool-card > .card-header .collapse-indicator {\n display: grid;\n place-items: center;\n width: 1em;\n height: 1em;\n opacity: 0.66;\n}\n.shiny-tool-card > .card-header .collapse-indicator,\n.shiny-tool-card > .card-header .collapse-indicator > .horizontal {\n transition: 0.3s ease-in-out all;\n transform-origin: center center;\n}\n.shiny-tool-card > .card-header[aria-expanded=true] > .collapse-indicator {\n transform: rotate(-90deg);\n}\n.shiny-tool-card > .card-header[aria-expanded=true] > .collapse-indicator .horizontal {\n transform: scale(0);\n}\n.shiny-tool-card > .card-body {\n transition: max-height 0.3s ease-out, opacity 0.2s ease-out;\n opacity: 1;\n overflow: auto;\n}\n.shiny-tool-card > .card-body.collapsed {\n max-height: 0;\n opacity: 0;\n padding: 0;\n}\n.shiny-tool-card pre {\n margin: 0;\n white-space: pre-wrap;\n padding: 1em;\n border-radius: var(--bs-border-radius, 4px);\n}\n\nshiny-tool-result,\nshiny-tool-request {\n display: block;\n margin: 1em 0;\n border-radius: var(--bs-border-radius, 4px);\n overflow: visible;\n padding: 0;\n font-size: 0.8em;\n}\nshiny-tool-result[hidden],\nshiny-tool-request[hidden] {\n display: none;\n}\n\nshiny-tool-result + p,\nshiny-tool-request + p {\n margin-top: 1rem;\n}\n\nshiny-tool-result:first-child,\nshiny-tool-request:first-child {\n margin-top: 0;\n}\nshiny-tool-result:last-child,\nshiny-tool-request:last-child {\n margin-bottom: 0;\n}\n\nshiny-tool-request[hidden] + shiny-tool-result:first-of-type {\n margin-top: 0;\n}\n\nshiny-chat-container {\n --shiny-chat-border: var(--bs-border-width, 1px) solid var(--bs-border-color, #e9ecef);\n --shiny-chat-user-message-bg: RGBA(var(--bs-primary-rgb, 0, 123, 194), 0.06);\n --_chat-container-padding: 0.25rem;\n display: grid;\n grid-template-columns: 1fr;\n grid-template-rows: 1fr auto;\n margin: 0 auto;\n gap: 0;\n padding: var(--_chat-container-padding);\n padding-bottom: 0;\n}\nshiny-chat-container p:last-child {\n margin-bottom: 0;\n}\nshiny-chat-container .suggestion,\nshiny-chat-container [data-suggestion] {\n cursor: pointer;\n}\nshiny-chat-container .suggestion {\n color: var(--bs-link-color, #007bc2);\n text-decoration-color: var(--bs-link-color, #007bc2);\n text-decoration-line: underline;\n text-decoration-style: dotted;\n text-decoration-thickness: 2px;\n text-underline-offset: 2px;\n text-underline-offset: 4px;\n text-decoration-thickness: 2px;\n padding-inline: 2px;\n}\nshiny-chat-container .suggestion:hover {\n text-decoration-style: solid;\n}\nshiny-chat-container .suggestion::after {\n content: \"\u2726\";\n display: inline-block;\n margin-inline-start: 0.15em;\n}\nshiny-chat-container .suggestion.submit::after, shiny-chat-container .suggestion[data-suggestion-submit=\"\"]::after, shiny-chat-container .suggestion[data-suggestion-submit=true]::after {\n content: \"\u21B5\";\n}\nshiny-chat-container .card[data-suggestion]:hover {\n color: var(--bs-link-color, #007bc2);\n border-color: rgba(var(--bs-link-color-rgb), 0.5);\n}\n\nshiny-chat-messages {\n display: flex;\n flex-direction: column;\n gap: 2rem;\n overflow: auto;\n margin-bottom: 1rem;\n --_scroll-margin: 1rem;\n padding-right: var(--_scroll-margin);\n margin-right: calc(-1 * var(--_scroll-margin));\n}\n\nshiny-chat-message {\n display: grid;\n grid-template-columns: auto minmax(0, 1fr);\n gap: 1rem;\n /* Vertically center the 2nd column (message content) */\n}\nshiny-chat-message > * {\n height: fit-content;\n}\nshiny-chat-message .message-icon {\n border-radius: 50%;\n border: var(--shiny-chat-border);\n height: 2rem;\n width: 2rem;\n display: grid;\n place-items: center;\n overflow: clip;\n}\nshiny-chat-message .message-icon > * {\n height: 100%;\n width: 100%;\n max-width: 100%;\n max-height: 100%;\n margin: 0 !important;\n object-fit: contain;\n}\nshiny-chat-message .message-icon > svg,\nshiny-chat-message .message-icon > .icon,\nshiny-chat-message .message-icon > .fa,\nshiny-chat-message .message-icon > .bi {\n max-height: 66%;\n max-width: 66%;\n}\nshiny-chat-message .message-icon:has(> .border-0) {\n border: none;\n border-radius: unset;\n overflow: unset;\n}\nshiny-chat-message shiny-markdown-stream {\n align-self: center;\n}\n\n/* Align the user message to the right */\nshiny-user-message,\nshiny-chat-message[data-role=user] {\n align-self: flex-end;\n padding: 0.75rem 1rem;\n border-radius: 10px;\n background-color: var(--shiny-chat-user-message-bg);\n max-width: 100%;\n}\n\nshiny-chat-message[data-role=user]:not([icon]) {\n grid-template-columns: auto;\n}\n\nshiny-user-message[content_type=text],\nshiny-chat-message[content_type=text] {\n white-space: pre;\n overflow-x: auto;\n}\n\nshiny-chat-message .message-content shiny-markdown-stream:not(:last-child) {\n margin-bottom: 1rem;\n}\n\nshiny-chat-message shiny-markdown-stream:empty {\n display: none;\n}\n\nshiny-chat-input {\n --_input-padding-top: 0;\n --_input-padding-bottom: var(--_chat-container-padding, 0.25rem);\n margin-top: calc(-1 * var(--_input-padding-top));\n position: sticky;\n bottom: calc(-1 * var(--_input-padding-bottom) + 4px);\n padding-block: var(--_input-padding-top) var(--_input-padding-bottom);\n}\nshiny-chat-input textarea {\n --bs-border-radius: 26px;\n resize: none;\n padding-right: 36px !important;\n max-height: 175px;\n}\nshiny-chat-input textarea::placeholder {\n color: var(--bs-gray-600, #707782) !important;\n}\nshiny-chat-input button {\n position: absolute;\n bottom: calc(6px + var(--_input-padding-bottom));\n right: 8px;\n background-color: transparent;\n color: var(--bs-primary, #007bc2);\n transition: color 0.25s ease-in-out;\n border: none;\n padding: 0;\n cursor: pointer;\n line-height: 16px;\n border-radius: 50%;\n}\nshiny-chat-input button:disabled {\n cursor: not-allowed;\n color: var(--bs-gray-500, #8d959e);\n}\n\n/*\n Disable the page-level pulse when the chat input is disabled\n (i.e., when a response is being generated and brought into the chat)\n*/\n.shiny-busy:has(shi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AiB,MAAM,UACrB,OAAQ,YACR,MAAO,IAAI,aAAa,EAAE,QAC5B,CAMA,CAAC,UAAU,KAAK,gBAAgB,CAAC,UAAU,OACzC,QAAS,IACX",
"names": []
}
diff --git a/js/dist/chat/chat.js b/js/dist/chat/chat.js
index d5b88a76..ebc06c70 100644
--- a/js/dist/chat/chat.js
+++ b/js/dist/chat/chat.js
@@ -1,8 +1,8 @@
-var fn=Object.defineProperty;var gn=Object.getOwnPropertyDescriptor;var g=(i,t,e,s)=>{for(var o=s>1?void 0:s?gn(t,e):t,r=i.length-1,l;r>=0;r--)(l=i[r])&&(o=(s?l(t,e,o):l(o))||o);return s&&o&&fn(t,e,o),o};var zt=globalThis,Bt=zt.ShadowRoot&&(zt.ShadyCSS===void 0||zt.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,hs=Symbol(),us=new WeakMap,qt=class{constructor(t,e,s){if(this._$cssResult$=!0,s!==hs)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o,e=this.t;if(Bt&&t===void 0){let s=e!==void 0&&e.length===1;s&&(t=us.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),s&&us.set(e,t))}return t}toString(){return this.cssText}},ds=i=>new qt(typeof i=="string"?i:i+"",void 0,hs);var ps=(i,t)=>{if(Bt)i.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet);else for(let e of t){let s=document.createElement("style"),o=zt.litNonce;o!==void 0&&s.setAttribute("nonce",o),s.textContent=e.cssText,i.appendChild(s)}},fe=Bt?i=>i:i=>i instanceof CSSStyleSheet?(t=>{let e="";for(let s of t.cssRules)e+=s.cssText;return ds(e)})(i):i;var{is:_n,defineProperty:En,getOwnPropertyDescriptor:yn,getOwnPropertyNames:An,getOwnPropertySymbols:vn,getPrototypeOf:Tn}=Object,Gt=globalThis,ms=Gt.trustedTypes,bn=ms?ms.emptyScript:"",Sn=Gt.reactiveElementPolyfillSupport,yt=(i,t)=>i,At={toAttribute(i,t){switch(t){case Boolean:i=i?bn:null;break;case Object:case Array:i=i==null?i:JSON.stringify(i)}return i},fromAttribute(i,t){let e=i;switch(t){case Boolean:e=i!==null;break;case Number:e=i===null?null:Number(i);break;case Object:case Array:try{e=JSON.parse(i)}catch{e=null}}return e}},Wt=(i,t)=>!_n(i,t),fs={attribute:!0,type:String,converter:At,reflect:!1,useDefault:!1,hasChanged:Wt};Symbol.metadata??=Symbol("metadata"),Gt.litPropertyMetadata??=new WeakMap;var j=class extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=fs){if(e.state&&(e.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((e=Object.create(e)).wrapped=!0),this.elementProperties.set(t,e),!e.noAccessor){let s=Symbol(),o=this.getPropertyDescriptor(t,s,e);o!==void 0&&En(this.prototype,t,o)}}static getPropertyDescriptor(t,e,s){let{get:o,set:r}=yn(this.prototype,t)??{get(){return this[e]},set(l){this[e]=l}};return{get:o,set(l){let p=o?.call(this);r?.call(this,l),this.requestUpdate(t,p,s)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??fs}static _$Ei(){if(this.hasOwnProperty(yt("elementProperties")))return;let t=Tn(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(yt("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(yt("properties"))){let e=this.properties,s=[...An(e),...vn(e)];for(let o of s)this.createProperty(o,e[o])}let t=this[Symbol.metadata];if(t!==null){let e=litPropertyMetadata.get(t);if(e!==void 0)for(let[s,o]of e)this.elementProperties.set(s,o)}this._$Eh=new Map;for(let[e,s]of this.elementProperties){let o=this._$Eu(e,s);o!==void 0&&this._$Eh.set(o,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){let e=[];if(Array.isArray(t)){let s=new Set(t.flat(1/0).reverse());for(let o of s)e.unshift(fe(o))}else t!==void 0&&e.push(fe(t));return e}static _$Eu(t,e){let s=e.attribute;return s===!1?void 0:typeof s=="string"?s:typeof t=="string"?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise(t=>this.enableUpdating=t),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(t=>t(this))}addController(t){(this._$EO??=new Set).add(t),this.renderRoot!==void 0&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){let t=new Map,e=this.constructor.elementProperties;for(let s of e.keys())this.hasOwnProperty(s)&&(t.set(s,this[s]),delete this[s]);t.size>0&&(this._$Ep=t)}createRenderRoot(){let t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return ps(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach(t=>t.hostConnected?.())}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach(t=>t.hostDisconnected?.())}attributeChangedCallback(t,e,s){this._$AK(t,s)}_$ET(t,e){let s=this.constructor.elementProperties.get(t),o=this.constructor._$Eu(t,s);if(o!==void 0&&s.reflect===!0){let r=(s.converter?.toAttribute!==void 0?s.converter:At).toAttribute(e,s.type);this._$Em=t,r==null?this.removeAttribute(o):this.setAttribute(o,r),this._$Em=null}}_$AK(t,e){let s=this.constructor,o=s._$Eh.get(t);if(o!==void 0&&this._$Em!==o){let r=s.getPropertyOptions(o),l=typeof r.converter=="function"?{fromAttribute:r.converter}:r.converter?.fromAttribute!==void 0?r.converter:At;this._$Em=o,this[o]=l.fromAttribute(e,r.type)??this._$Ej?.get(o)??null,this._$Em=null}}requestUpdate(t,e,s){if(t!==void 0){let o=this.constructor,r=this[t];if(s??=o.getPropertyOptions(t),!((s.hasChanged??Wt)(r,e)||s.useDefault&&s.reflect&&r===this._$Ej?.get(t)&&!this.hasAttribute(o._$Eu(t,s))))return;this.C(t,e,s)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(t,e,{useDefault:s,reflect:o,wrapped:r},l){s&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,l??e??this[t]),r!==!0||l!==void 0)||(this._$AL.has(t)||(this.hasUpdated||s||(e=void 0),this._$AL.set(t,e)),o===!0&&this._$Em!==t&&(this._$Eq??=new Set).add(t))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(e){Promise.reject(e)}let t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(let[o,r]of this._$Ep)this[o]=r;this._$Ep=void 0}let s=this.constructor.elementProperties;if(s.size>0)for(let[o,r]of s){let{wrapped:l}=r,p=this[o];l!==!0||this._$AL.has(o)||p===void 0||this.C(o,void 0,r,p)}}let t=!1,e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),this._$EO?.forEach(s=>s.hostUpdate?.()),this.update(e)):this._$EM()}catch(s){throw t=!1,this._$EM(),s}t&&this._$AE(e)}willUpdate(t){}_$AE(t){this._$EO?.forEach(e=>e.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&=this._$Eq.forEach(e=>this._$ET(e,this[e])),this._$EM()}updated(t){}firstUpdated(t){}};j.elementStyles=[],j.shadowRootOptions={mode:"open"},j[yt("elementProperties")]=new Map,j[yt("finalized")]=new Map,Sn?.({ReactiveElement:j}),(Gt.reactiveElementVersions??=[]).push("2.1.0");var Te=globalThis,jt=Te.trustedTypes,gs=jt?jt.createPolicy("lit-html",{createHTML:i=>i}):void 0,Ts="$lit$",Z=`lit$${Math.random().toFixed(9).slice(2)}$`,bs="?"+Z,wn=`<${bs}>`,st=document,Tt=()=>st.createComment(""),bt=i=>i===null||typeof i!="object"&&typeof i!="function",be=Array.isArray,Cn=i=>be(i)||typeof i?.[Symbol.iterator]=="function",ge=`[
-\f\r]`,vt=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,_s=/-->/g,Es=/>/g,tt=RegExp(`>|${ge}(?:([^\\s"'>=/]+)(${ge}*=${ge}*(?:[^
-\f\r"'\`<>=]|("|')|))|$)`,"g"),ys=/'/g,As=/"/g,Ss=/^(?:script|style|textarea|title)$/i,Se=i=>(t,...e)=>({_$litType$:i,strings:t,values:e}),y=Se(1),hi=Se(2),di=Se(3),V=Symbol.for("lit-noChange"),v=Symbol.for("lit-nothing"),vs=new WeakMap,et=st.createTreeWalker(st,129);function ws(i,t){if(!be(i)||!i.hasOwnProperty("raw"))throw Error("invalid template strings array");return gs!==void 0?gs.createHTML(t):t}var $n=(i,t)=>{let e=i.length-1,s=[],o,r=t===2?"":t===3?"":"")),s]},St=class i{constructor({strings:t,_$litType$:e},s){let o;this.parts=[];let r=0,l=0,p=t.length-1,h=this.parts,[_,b]=$n(t,e);if(this.el=i.createElement(_,s),et.currentNode=this.el.content,e===2||e===3){let m=this.el.content.firstChild;m.replaceWith(...m.childNodes)}for(;(o=et.nextNode())!==null&&h.length
0){o.textContent=jt?jt.emptyScript:"";for(let D=0;D2||s[0]!==""||s[1]!==""?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=v}_$AI(t,e=this,s,o){let r=this.strings,l=!1;if(r===void 0)t=ht(this,t,e,0),l=!bt(t)||t!==this._$AH&&t!==V,l&&(this._$AH=t);else{let p=t,h,_;for(t=r[0],h=0;h{let s=e?.renderBefore??t,o=s._$litPart$;if(o===void 0){let r=e?.renderBefore??null;s._$litPart$=o=new wt(t.insertBefore(Tt(),r),r,void 0,e??{})}return o._$AI(i),o};var we=globalThis,q=class extends j{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){let t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){let e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=Cs(e,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return V}};q._$litElement$=!0,q.finalized=!0,we.litElementHydrateSupport?.({LitElement:q});var xn=we.litElementPolyfillSupport;xn?.({LitElement:q});(we.litElementVersions??=[]).push("4.2.0");var $s={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},Ms=i=>(...t)=>({_$litDirective$:i,values:t}),Vt=class{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,s){this._$Ct=t,this._$AM=e,this._$Ci=s}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}};var Ct=class extends Vt{constructor(t){if(super(t),this.it=v,t.type!==$s.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===v||t==null)return this._t=void 0,this.it=t;if(t===V)return t;if(typeof t!="string")throw Error(this.constructor.directiveName+"() called with a non-string value");if(t===this.it)return this._t;this.it=t;let e=[t];return e.raw=e,this._t={_$litType$:this.constructor.resultType,strings:e,values:[]}}};Ct.directiveName="unsafeHTML",Ct.resultType=1;var J=Ms(Ct);var Ln={attribute:!0,type:String,converter:At,reflect:!1,hasChanged:Wt},Rn=(i=Ln,t,e)=>{let{kind:s,metadata:o}=e,r=globalThis.litPropertyMetadata.get(o);if(r===void 0&&globalThis.litPropertyMetadata.set(o,r=new Map),s==="setter"&&((i=Object.create(i)).wrapped=!0),r.set(e.name,i),s==="accessor"){let{name:l}=e;return{set(p){let h=t.get.call(this);t.set.call(this,p),this.requestUpdate(l,h,i)},init(p){return p!==void 0&&this.C(l,void 0,i,p),p}}}if(s==="setter"){let{name:l}=e;return function(p){let h=this[l];t.call(this,p),this.requestUpdate(l,h,i)}}throw Error("Unsupported decorator location: "+s)};function f(i){return(t,e)=>typeof e=="object"?Rn(i,t,e):((s,o,r)=>{let l=o.hasOwnProperty(r);return o.constructor.createProperty(r,s),l?Object.getOwnPropertyDescriptor(o,r):void 0})(i,t,e)}var{entries:Us,setPrototypeOf:xs,isFrozen:On,getPrototypeOf:Nn,getOwnPropertyDescriptor:In}=Object,{freeze:O,seal:P,create:Hs}=Object,{apply:Re,construct:Oe}=typeof Reflect<"u"&&Reflect;O||(O=function(t){return t});P||(P=function(t){return t});Re||(Re=function(t,e,s){return t.apply(e,s)});Oe||(Oe=function(t,e){return new t(...e)});var Kt=N(Array.prototype.forEach),Dn=N(Array.prototype.lastIndexOf),Ls=N(Array.prototype.pop),$t=N(Array.prototype.push),Pn=N(Array.prototype.splice),Zt=N(String.prototype.toLowerCase),Ce=N(String.prototype.toString),Rs=N(String.prototype.match),Mt=N(String.prototype.replace),kn=N(String.prototype.indexOf),Un=N(String.prototype.trim),H=N(Object.prototype.hasOwnProperty),R=N(RegExp.prototype.test),xt=Hn(TypeError);function N(i){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var e=arguments.length,s=new Array(e>1?e-1:0),o=1;o2&&arguments[2]!==void 0?arguments[2]:Zt;xs&&xs(i,null);let s=t.length;for(;s--;){let o=t[s];if(typeof o=="string"){let r=e(o);r!==o&&(On(t)||(t[s]=r),o=r)}i[o]=!0}return i}function Fn(i){for(let t=0;t/gm),Wn=P(/\$\{[\w\W]*/gm),jn=P(/^data-[\-\w.\u00B7-\uFFFF]+$/),Vn=P(/^aria-[\-\w]+$/),Fs=P(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Yn=P(/^(?:\w+script|data):/i),Kn=P(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),zs=P(/^html$/i),Xn=P(/^[a-z][.\w]*(-[.\w]+)+$/i),Ps=Object.freeze({__proto__:null,ARIA_ATTR:Vn,ATTR_WHITESPACE:Kn,CUSTOM_ELEMENT:Xn,DATA_ATTR:jn,DOCTYPE_NAME:zs,ERB_EXPR:Gn,IS_ALLOWED_URI:Fs,IS_SCRIPT_OR_DATA:Yn,MUSTACHE_EXPR:Bn,TMPLIT_EXPR:Wn}),Rt={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},Zn=function(){return typeof window>"u"?null:window},Jn=function(t,e){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let s=null,o="data-tt-policy-suffix";e&&e.hasAttribute(o)&&(s=e.getAttribute(o));let r="dompurify"+(s?"#"+s:"");try{return t.createPolicy(r,{createHTML(l){return l},createScriptURL(l){return l}})}catch{return console.warn("TrustedTypes policy "+r+" could not be created."),null}},ks=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function qs(){let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Zn(),t=u=>qs(u);if(t.version="3.2.6",t.removed=[],!i||!i.document||i.document.nodeType!==Rt.document||!i.Element)return t.isSupported=!1,t;let{document:e}=i,s=e,o=s.currentScript,{DocumentFragment:r,HTMLTemplateElement:l,Node:p,Element:h,NodeFilter:_,NamedNodeMap:b=i.NamedNodeMap||i.MozNamedAttrMap,HTMLFormElement:m,DOMParser:U,trustedTypes:D}=i,F=h.prototype,Ys=Lt(F,"cloneNode"),Ks=Lt(F,"remove"),Xs=Lt(F,"nextSibling"),Zs=Lt(F,"childNodes"),Nt=Lt(F,"parentNode");if(typeof l=="function"){let u=e.createElement("template");u.content&&u.content.ownerDocument&&(e=u.content.ownerDocument)}let x,mt="",{implementation:te,createNodeIterator:Js,createDocumentFragment:Qs,getElementsByTagName:tn}=e,{importNode:en}=s,L=ks();t.isSupported=typeof Us=="function"&&typeof Nt=="function"&&te&&te.createHTMLDocument!==void 0;let{MUSTACHE_EXPR:ee,ERB_EXPR:se,TMPLIT_EXPR:ne,DATA_ATTR:sn,ARIA_ATTR:nn,IS_SCRIPT_OR_DATA:on,ATTR_WHITESPACE:He,CUSTOM_ELEMENT:rn}=Ps,{IS_ALLOWED_URI:Fe}=Ps,S=null,ze=d({},[...Os,...$e,...Me,...xe,...Ns]),C=null,qe=d({},[...Is,...Le,...Ds,...Xt]),A=Object.seal(Hs(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),ft=null,ie=null,Be=!0,oe=!0,Ge=!1,We=!0,it=!1,It=!0,Q=!1,re=!1,ae=!1,ot=!1,Dt=!1,Pt=!1,je=!0,Ve=!1,an="user-content-",le=!0,gt=!1,rt={},at=null,Ye=d({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),Ke=null,Xe=d({},["audio","video","img","source","image","track"]),ce=null,Ze=d({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),kt="http://www.w3.org/1998/Math/MathML",Ut="http://www.w3.org/2000/svg",B="http://www.w3.org/1999/xhtml",lt=B,ue=!1,he=null,ln=d({},[kt,Ut,B],Ce),Ht=d({},["mi","mo","mn","ms","mtext"]),Ft=d({},["annotation-xml"]),cn=d({},["title","style","font","a","script"]),_t=null,un=["application/xhtml+xml","text/html"],hn="text/html",w=null,ct=null,dn=e.createElement("form"),Je=function(n){return n instanceof RegExp||n instanceof Function},de=function(){let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(ct&&ct===n)){if((!n||typeof n!="object")&&(n={}),n=Y(n),_t=un.indexOf(n.PARSER_MEDIA_TYPE)===-1?hn:n.PARSER_MEDIA_TYPE,w=_t==="application/xhtml+xml"?Ce:Zt,S=H(n,"ALLOWED_TAGS")?d({},n.ALLOWED_TAGS,w):ze,C=H(n,"ALLOWED_ATTR")?d({},n.ALLOWED_ATTR,w):qe,he=H(n,"ALLOWED_NAMESPACES")?d({},n.ALLOWED_NAMESPACES,Ce):ln,ce=H(n,"ADD_URI_SAFE_ATTR")?d(Y(Ze),n.ADD_URI_SAFE_ATTR,w):Ze,Ke=H(n,"ADD_DATA_URI_TAGS")?d(Y(Xe),n.ADD_DATA_URI_TAGS,w):Xe,at=H(n,"FORBID_CONTENTS")?d({},n.FORBID_CONTENTS,w):Ye,ft=H(n,"FORBID_TAGS")?d({},n.FORBID_TAGS,w):Y({}),ie=H(n,"FORBID_ATTR")?d({},n.FORBID_ATTR,w):Y({}),rt=H(n,"USE_PROFILES")?n.USE_PROFILES:!1,Be=n.ALLOW_ARIA_ATTR!==!1,oe=n.ALLOW_DATA_ATTR!==!1,Ge=n.ALLOW_UNKNOWN_PROTOCOLS||!1,We=n.ALLOW_SELF_CLOSE_IN_ATTR!==!1,it=n.SAFE_FOR_TEMPLATES||!1,It=n.SAFE_FOR_XML!==!1,Q=n.WHOLE_DOCUMENT||!1,ot=n.RETURN_DOM||!1,Dt=n.RETURN_DOM_FRAGMENT||!1,Pt=n.RETURN_TRUSTED_TYPE||!1,ae=n.FORCE_BODY||!1,je=n.SANITIZE_DOM!==!1,Ve=n.SANITIZE_NAMED_PROPS||!1,le=n.KEEP_CONTENT!==!1,gt=n.IN_PLACE||!1,Fe=n.ALLOWED_URI_REGEXP||Fs,lt=n.NAMESPACE||B,Ht=n.MATHML_TEXT_INTEGRATION_POINTS||Ht,Ft=n.HTML_INTEGRATION_POINTS||Ft,A=n.CUSTOM_ELEMENT_HANDLING||{},n.CUSTOM_ELEMENT_HANDLING&&Je(n.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(A.tagNameCheck=n.CUSTOM_ELEMENT_HANDLING.tagNameCheck),n.CUSTOM_ELEMENT_HANDLING&&Je(n.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(A.attributeNameCheck=n.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),n.CUSTOM_ELEMENT_HANDLING&&typeof n.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(A.allowCustomizedBuiltInElements=n.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),it&&(oe=!1),Dt&&(ot=!0),rt&&(S=d({},Ns),C=[],rt.html===!0&&(d(S,Os),d(C,Is)),rt.svg===!0&&(d(S,$e),d(C,Le),d(C,Xt)),rt.svgFilters===!0&&(d(S,Me),d(C,Le),d(C,Xt)),rt.mathMl===!0&&(d(S,xe),d(C,Ds),d(C,Xt))),n.ADD_TAGS&&(S===ze&&(S=Y(S)),d(S,n.ADD_TAGS,w)),n.ADD_ATTR&&(C===qe&&(C=Y(C)),d(C,n.ADD_ATTR,w)),n.ADD_URI_SAFE_ATTR&&d(ce,n.ADD_URI_SAFE_ATTR,w),n.FORBID_CONTENTS&&(at===Ye&&(at=Y(at)),d(at,n.FORBID_CONTENTS,w)),le&&(S["#text"]=!0),Q&&d(S,["html","head","body"]),S.table&&(d(S,["tbody"]),delete ft.tbody),n.TRUSTED_TYPES_POLICY){if(typeof n.TRUSTED_TYPES_POLICY.createHTML!="function")throw xt('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof n.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw xt('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');x=n.TRUSTED_TYPES_POLICY,mt=x.createHTML("")}else x===void 0&&(x=Jn(D,o)),x!==null&&typeof mt=="string"&&(mt=x.createHTML(""));O&&O(n),ct=n}},Qe=d({},[...$e,...Me,...zn]),ts=d({},[...xe,...qn]),pn=function(n){let a=Nt(n);(!a||!a.tagName)&&(a={namespaceURI:lt,tagName:"template"});let c=Zt(n.tagName),E=Zt(a.tagName);return he[n.namespaceURI]?n.namespaceURI===Ut?a.namespaceURI===B?c==="svg":a.namespaceURI===kt?c==="svg"&&(E==="annotation-xml"||Ht[E]):!!Qe[c]:n.namespaceURI===kt?a.namespaceURI===B?c==="math":a.namespaceURI===Ut?c==="math"&&Ft[E]:!!ts[c]:n.namespaceURI===B?a.namespaceURI===Ut&&!Ft[E]||a.namespaceURI===kt&&!Ht[E]?!1:!ts[c]&&(cn[c]||!Qe[c]):!!(_t==="application/xhtml+xml"&&he[n.namespaceURI]):!1},z=function(n){$t(t.removed,{element:n});try{Nt(n).removeChild(n)}catch{Ks(n)}},ut=function(n,a){try{$t(t.removed,{attribute:a.getAttributeNode(n),from:a})}catch{$t(t.removed,{attribute:null,from:a})}if(a.removeAttribute(n),n==="is")if(ot||Dt)try{z(a)}catch{}else try{a.setAttribute(n,"")}catch{}},es=function(n){let a=null,c=null;if(ae)n=""+n;else{let T=Rs(n,/^[\r\n\t ]+/);c=T&&T[0]}_t==="application/xhtml+xml"&<===B&&(n=''+n+"");let E=x?x.createHTML(n):n;if(lt===B)try{a=new U().parseFromString(E,_t)}catch{}if(!a||!a.documentElement){a=te.createDocument(lt,"template",null);try{a.documentElement.innerHTML=ue?mt:E}catch{}}let $=a.body||a.documentElement;return n&&c&&$.insertBefore(e.createTextNode(c),$.childNodes[0]||null),lt===B?tn.call(a,Q?"html":"body")[0]:Q?a.documentElement:$},ss=function(n){return Js.call(n.ownerDocument||n,n,_.SHOW_ELEMENT|_.SHOW_COMMENT|_.SHOW_TEXT|_.SHOW_PROCESSING_INSTRUCTION|_.SHOW_CDATA_SECTION,null)},pe=function(n){return n instanceof m&&(typeof n.nodeName!="string"||typeof n.textContent!="string"||typeof n.removeChild!="function"||!(n.attributes instanceof b)||typeof n.removeAttribute!="function"||typeof n.setAttribute!="function"||typeof n.namespaceURI!="string"||typeof n.insertBefore!="function"||typeof n.hasChildNodes!="function")},ns=function(n){return typeof p=="function"&&n instanceof p};function G(u,n,a){Kt(u,c=>{c.call(t,n,a,ct)})}let is=function(n){let a=null;if(G(L.beforeSanitizeElements,n,null),pe(n))return z(n),!0;let c=w(n.nodeName);if(G(L.uponSanitizeElement,n,{tagName:c,allowedTags:S}),It&&n.hasChildNodes()&&!ns(n.firstElementChild)&&R(/<[/\w!]/g,n.innerHTML)&&R(/<[/\w!]/g,n.textContent)||n.nodeType===Rt.progressingInstruction||It&&n.nodeType===Rt.comment&&R(/<[/\w]/g,n.data))return z(n),!0;if(!S[c]||ft[c]){if(!ft[c]&&rs(c)&&(A.tagNameCheck instanceof RegExp&&R(A.tagNameCheck,c)||A.tagNameCheck instanceof Function&&A.tagNameCheck(c)))return!1;if(le&&!at[c]){let E=Nt(n)||n.parentNode,$=Zs(n)||n.childNodes;if($&&E){let T=$.length;for(let I=T-1;I>=0;--I){let W=Ys($[I],!0);W.__removalCount=(n.__removalCount||0)+1,E.insertBefore(W,Xs(n))}}}return z(n),!0}return n instanceof h&&!pn(n)||(c==="noscript"||c==="noembed"||c==="noframes")&&R(/<\/no(script|embed|frames)/i,n.innerHTML)?(z(n),!0):(it&&n.nodeType===Rt.text&&(a=n.textContent,Kt([ee,se,ne],E=>{a=Mt(a,E," ")}),n.textContent!==a&&($t(t.removed,{element:n.cloneNode()}),n.textContent=a)),G(L.afterSanitizeElements,n,null),!1)},os=function(n,a,c){if(je&&(a==="id"||a==="name")&&(c in e||c in dn))return!1;if(!(oe&&!ie[a]&&R(sn,a))){if(!(Be&&R(nn,a))){if(!C[a]||ie[a]){if(!(rs(n)&&(A.tagNameCheck instanceof RegExp&&R(A.tagNameCheck,n)||A.tagNameCheck instanceof Function&&A.tagNameCheck(n))&&(A.attributeNameCheck instanceof RegExp&&R(A.attributeNameCheck,a)||A.attributeNameCheck instanceof Function&&A.attributeNameCheck(a))||a==="is"&&A.allowCustomizedBuiltInElements&&(A.tagNameCheck instanceof RegExp&&R(A.tagNameCheck,c)||A.tagNameCheck instanceof Function&&A.tagNameCheck(c))))return!1}else if(!ce[a]){if(!R(Fe,Mt(c,He,""))){if(!((a==="src"||a==="xlink:href"||a==="href")&&n!=="script"&&kn(c,"data:")===0&&Ke[n])){if(!(Ge&&!R(on,Mt(c,He,"")))){if(c)return!1}}}}}}return!0},rs=function(n){return n!=="annotation-xml"&&Rs(n,rn)},as=function(n){G(L.beforeSanitizeAttributes,n,null);let{attributes:a}=n;if(!a||pe(n))return;let c={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:C,forceKeepAttr:void 0},E=a.length;for(;E--;){let $=a[E],{name:T,namespaceURI:I,value:W}=$,Et=w(T),me=W,M=T==="value"?me:Un(me);if(c.attrName=Et,c.attrValue=M,c.keepAttr=!0,c.forceKeepAttr=void 0,G(L.uponSanitizeAttribute,n,c),M=c.attrValue,Ve&&(Et==="id"||Et==="name")&&(ut(T,n),M=an+M),It&&R(/((--!?|])>)|<\/(style|title)/i,M)){ut(T,n);continue}if(c.forceKeepAttr)continue;if(!c.keepAttr){ut(T,n);continue}if(!We&&R(/\/>/i,M)){ut(T,n);continue}it&&Kt([ee,se,ne],cs=>{M=Mt(M,cs," ")});let ls=w(n.nodeName);if(!os(ls,Et,M)){ut(T,n);continue}if(x&&typeof D=="object"&&typeof D.getAttributeType=="function"&&!I)switch(D.getAttributeType(ls,Et)){case"TrustedHTML":{M=x.createHTML(M);break}case"TrustedScriptURL":{M=x.createScriptURL(M);break}}if(M!==me)try{I?n.setAttributeNS(I,T,M):n.setAttribute(T,M),pe(n)?z(n):Ls(t.removed)}catch{ut(T,n)}}G(L.afterSanitizeAttributes,n,null)},mn=function u(n){let a=null,c=ss(n);for(G(L.beforeSanitizeShadowDOM,n,null);a=c.nextNode();)G(L.uponSanitizeShadowNode,a,null),is(a),as(a),a.content instanceof r&&u(a.content);G(L.afterSanitizeShadowDOM,n,null)};return t.sanitize=function(u){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},a=null,c=null,E=null,$=null;if(ue=!u,ue&&(u=""),typeof u!="string"&&!ns(u))if(typeof u.toString=="function"){if(u=u.toString(),typeof u!="string")throw xt("dirty is not a string, aborting")}else throw xt("toString is not a function");if(!t.isSupported)return u;if(re||de(n),t.removed=[],typeof u=="string"&&(gt=!1),gt){if(u.nodeName){let W=w(u.nodeName);if(!S[W]||ft[W])throw xt("root node is forbidden and cannot be sanitized in-place")}}else if(u instanceof p)a=es(""),c=a.ownerDocument.importNode(u,!0),c.nodeType===Rt.element&&c.nodeName==="BODY"||c.nodeName==="HTML"?a=c:a.appendChild(c);else{if(!ot&&!it&&!Q&&u.indexOf("<")===-1)return x&&Pt?x.createHTML(u):u;if(a=es(u),!a)return ot?null:Pt?mt:""}a&&ae&&z(a.firstChild);let T=ss(gt?u:a);for(;E=T.nextNode();)is(E),as(E),E.content instanceof r&&mn(E.content);if(gt)return u;if(ot){if(Dt)for($=Qs.call(a.ownerDocument);a.firstChild;)$.appendChild(a.firstChild);else $=a;return(C.shadowroot||C.shadowrootmode)&&($=en.call(s,$,!0)),$}let I=Q?a.outerHTML:a.innerHTML;return Q&&S["!doctype"]&&a.ownerDocument&&a.ownerDocument.doctype&&a.ownerDocument.doctype.name&&R(zs,a.ownerDocument.doctype.name)&&(I="
-`+I),it&&Kt([ee,se,ne],W=>{I=Mt(I,W," ")}),x&&Pt?x.createHTML(I):I},t.setConfig=function(){let u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};de(u),re=!0},t.clearConfig=function(){ct=null,re=!1},t.isValidAttribute=function(u,n,a){ct||de({});let c=w(u),E=w(n);return os(c,E,a)},t.addHook=function(u,n){typeof n=="function"&&$t(L[u],n)},t.removeHook=function(u,n){if(n!==void 0){let a=Dn(L[u],n);return a===-1?void 0:Pn(L[u],a,1)[0]}return Ls(L[u])},t.removeHooks=function(u){L[u]=[]},t.removeAllHooks=function(){L=ks()},t}var Bs=qs();function Jt(i,t){let e=document.createElement(i);for(let[s,o]of Object.entries(t)){let r=s.replace(/_/g,"-");o!==null&&e.setAttribute(r,o)}return e}var nt=class extends q{createRenderRoot(){return this}};function Ne({headline:i="",message:t,status:e="warning"}){document.dispatchEvent(new CustomEvent("shiny:client-message",{detail:{headline:i,message:t,status:e}}))}async function Gs(i){if(window.Shiny&&i)try{await window.Shiny.renderDependenciesAsync(i)}catch(t){Ne({status:"error",message:`Failed to render HTML dependencies: ${t}`})}}var Qn=Bs();Qn.addHook("uponSanitizeElement",(i,t)=>{if(i.nodeName&&i.nodeName==="SCRIPT"){let e=i,s=e.getAttribute("type")==="application/json"&&e.getAttribute("data-for")!==null;t.allowedTags.script=s}});window.shinychat=window.shinychat||{};window.shinychat.hiddenToolRequests=window.shinychat.hiddenToolRequests||new Set;var k=class extends q{constructor(){super(...arguments);this.expanded=!1;this.classStatus="";this.icon="";this.titleTemplate="{title}"}createRenderRoot(){return this}#t(e){e.preventDefault(),this.expanded=!this.expanded,this.requestUpdate()}formatTitle(){let e=this.toolTitle||`${this.toolName}()`;return e=`${e}`,e=this.titleTemplate.replace("{title}",e),y`${J(e)}`}renderCard(e){let s=`tool-header-${this.requestId}`,o=`tool-content-${this.requestId}`,r=y`
- ${J(this.icon)}
+var fs=Object.defineProperty;var gs=Object.getOwnPropertyDescriptor;var T=(r,t,e,n)=>{for(var i=n>1?void 0:n?gs(t,e):t,o=r.length-1,l;o>=0;o--)(l=r[o])&&(i=(n?l(t,e,i):l(i))||i);return n&&i&&fs(t,e,i),i};var zt=globalThis,Gt=zt.ShadowRoot&&(zt.ShadyCSS===void 0||zt.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,dn=Symbol(),un=new WeakMap,Bt=class{constructor(t,e,n){if(this._$cssResult$=!0,n!==dn)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o,e=this.t;if(Gt&&t===void 0){let n=e!==void 0&&e.length===1;n&&(t=un.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),n&&un.set(e,t))}return t}toString(){return this.cssText}},pn=r=>new Bt(typeof r=="string"?r:r+"",void 0,dn);var mn=(r,t)=>{if(Gt)r.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet);else for(let e of t){let n=document.createElement("style"),i=zt.litNonce;i!==void 0&&n.setAttribute("nonce",i),n.textContent=e.cssText,r.appendChild(n)}},ge=Gt?r=>r:r=>r instanceof CSSStyleSheet?(t=>{let e="";for(let n of t.cssRules)e+=n.cssText;return pn(e)})(r):r;var{is:ys,defineProperty:_s,getOwnPropertyDescriptor:Es,getOwnPropertyNames:As,getOwnPropertySymbols:vs,getPrototypeOf:Ts}=Object,Wt=globalThis,fn=Wt.trustedTypes,bs=fn?fn.emptyScript:"",Ss=Wt.reactiveElementPolyfillSupport,At=(r,t)=>r,vt={toAttribute(r,t){switch(t){case Boolean:r=r?bs:null;break;case Object:case Array:r=r==null?r:JSON.stringify(r)}return r},fromAttribute(r,t){let e=r;switch(t){case Boolean:e=r!==null;break;case Number:e=r===null?null:Number(r);break;case Object:case Array:try{e=JSON.parse(r)}catch{e=null}}return e}},jt=(r,t)=>!ys(r,t),gn={attribute:!0,type:String,converter:vt,reflect:!1,useDefault:!1,hasChanged:jt};Symbol.metadata??=Symbol("metadata"),Wt.litPropertyMetadata??=new WeakMap;var j=class extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=gn){if(e.state&&(e.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((e=Object.create(e)).wrapped=!0),this.elementProperties.set(t,e),!e.noAccessor){let n=Symbol(),i=this.getPropertyDescriptor(t,n,e);i!==void 0&&_s(this.prototype,t,i)}}static getPropertyDescriptor(t,e,n){let{get:i,set:o}=Es(this.prototype,t)??{get(){return this[e]},set(l){this[e]=l}};return{get:i,set(l){let d=i?.call(this);o?.call(this,l),this.requestUpdate(t,d,n)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??gn}static _$Ei(){if(this.hasOwnProperty(At("elementProperties")))return;let t=Ts(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(At("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(At("properties"))){let e=this.properties,n=[...As(e),...vs(e)];for(let i of n)this.createProperty(i,e[i])}let t=this[Symbol.metadata];if(t!==null){let e=litPropertyMetadata.get(t);if(e!==void 0)for(let[n,i]of e)this.elementProperties.set(n,i)}this._$Eh=new Map;for(let[e,n]of this.elementProperties){let i=this._$Eu(e,n);i!==void 0&&this._$Eh.set(i,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){let e=[];if(Array.isArray(t)){let n=new Set(t.flat(1/0).reverse());for(let i of n)e.unshift(ge(i))}else t!==void 0&&e.push(ge(t));return e}static _$Eu(t,e){let n=e.attribute;return n===!1?void 0:typeof n=="string"?n:typeof t=="string"?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise(t=>this.enableUpdating=t),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(t=>t(this))}addController(t){(this._$EO??=new Set).add(t),this.renderRoot!==void 0&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){let t=new Map,e=this.constructor.elementProperties;for(let n of e.keys())this.hasOwnProperty(n)&&(t.set(n,this[n]),delete this[n]);t.size>0&&(this._$Ep=t)}createRenderRoot(){let t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return mn(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach(t=>t.hostConnected?.())}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach(t=>t.hostDisconnected?.())}attributeChangedCallback(t,e,n){this._$AK(t,n)}_$ET(t,e){let n=this.constructor.elementProperties.get(t),i=this.constructor._$Eu(t,n);if(i!==void 0&&n.reflect===!0){let o=(n.converter?.toAttribute!==void 0?n.converter:vt).toAttribute(e,n.type);this._$Em=t,o==null?this.removeAttribute(i):this.setAttribute(i,o),this._$Em=null}}_$AK(t,e){let n=this.constructor,i=n._$Eh.get(t);if(i!==void 0&&this._$Em!==i){let o=n.getPropertyOptions(i),l=typeof o.converter=="function"?{fromAttribute:o.converter}:o.converter?.fromAttribute!==void 0?o.converter:vt;this._$Em=i,this[i]=l.fromAttribute(e,o.type)??this._$Ej?.get(i)??null,this._$Em=null}}requestUpdate(t,e,n){if(t!==void 0){let i=this.constructor,o=this[t];if(n??=i.getPropertyOptions(t),!((n.hasChanged??jt)(o,e)||n.useDefault&&n.reflect&&o===this._$Ej?.get(t)&&!this.hasAttribute(i._$Eu(t,n))))return;this.C(t,e,n)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(t,e,{useDefault:n,reflect:i,wrapped:o},l){n&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,l??e??this[t]),o!==!0||l!==void 0)||(this._$AL.has(t)||(this.hasUpdated||n||(e=void 0),this._$AL.set(t,e)),i===!0&&this._$Em!==t&&(this._$Eq??=new Set).add(t))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(e){Promise.reject(e)}let t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(let[i,o]of this._$Ep)this[i]=o;this._$Ep=void 0}let n=this.constructor.elementProperties;if(n.size>0)for(let[i,o]of n){let{wrapped:l}=o,d=this[i];l!==!0||this._$AL.has(i)||d===void 0||this.C(i,void 0,o,d)}}let t=!1,e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),this._$EO?.forEach(n=>n.hostUpdate?.()),this.update(e)):this._$EM()}catch(n){throw t=!1,this._$EM(),n}t&&this._$AE(e)}willUpdate(t){}_$AE(t){this._$EO?.forEach(e=>e.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&=this._$Eq.forEach(e=>this._$ET(e,this[e])),this._$EM()}updated(t){}firstUpdated(t){}};j.elementStyles=[],j.shadowRootOptions={mode:"open"},j[At("elementProperties")]=new Map,j[At("finalized")]=new Map,Ss?.({ReactiveElement:j}),(Wt.reactiveElementVersions??=[]).push("2.1.0");var be=globalThis,Vt=be.trustedTypes,yn=Vt?Vt.createPolicy("lit-html",{createHTML:r=>r}):void 0,bn="$lit$",X=`lit$${Math.random().toFixed(9).slice(2)}$`,Sn="?"+X,Cs=`<${Sn}>`,et=document,bt=()=>et.createComment(""),St=r=>r===null||typeof r!="object"&&typeof r!="function",Se=Array.isArray,ws=r=>Se(r)||typeof r?.[Symbol.iterator]=="function",ye=`[
+\f\r]`,Tt=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,_n=/-->/g,En=/>/g,Q=RegExp(`>|${ye}(?:([^\\s"'>=/]+)(${ye}*=${ye}*(?:[^
+\f\r"'\`<>=]|("|')|))|$)`,"g"),An=/'/g,vn=/"/g,Cn=/^(?:script|style|textarea|title)$/i,Ce=r=>(t,...e)=>({_$litType$:r,strings:t,values:e}),y=Ce(1),pi=Ce(2),mi=Ce(3),V=Symbol.for("lit-noChange"),A=Symbol.for("lit-nothing"),Tn=new WeakMap,tt=et.createTreeWalker(et,129);function wn(r,t){if(!Se(r)||!r.hasOwnProperty("raw"))throw Error("invalid template strings array");return yn!==void 0?yn.createHTML(t):t}var Ms=(r,t)=>{let e=r.length-1,n=[],i,o=t===2?"":t===3?"":"")),n]},Ct=class r{constructor({strings:t,_$litType$:e},n){let i;this.parts=[];let o=0,l=0,d=t.length-1,u=this.parts,[f,_]=Ms(t,e);if(this.el=r.createElement(f,n),tt.currentNode=this.el.content,e===2||e===3){let m=this.el.content.firstChild;m.replaceWith(...m.childNodes)}for(;(i=tt.nextNode())!==null&&u.length0){i.textContent=Vt?Vt.emptyScript:"";for(let P=0;P2||n[0]!==""||n[1]!==""?(this._$AH=Array(n.length-1).fill(new String),this.strings=n):this._$AH=A}_$AI(t,e=this,n,i){let o=this.strings,l=!1;if(o===void 0)t=ht(this,t,e,0),l=!St(t)||t!==this._$AH&&t!==V,l&&(this._$AH=t);else{let d=t,u,f;for(t=o[0],u=0;u{let n=e?.renderBefore??t,i=n._$litPart$;if(i===void 0){let o=e?.renderBefore??null;n._$litPart$=i=new wt(t.insertBefore(bt(),o),o,void 0,e??{})}return i._$AI(r),i};var we=globalThis,z=class extends j{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){let t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){let e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=Mn(e,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return V}};z._$litElement$=!0,z.finalized=!0,we.litElementHydrateSupport?.({LitElement:z});var Ls=we.litElementPolyfillSupport;Ls?.({LitElement:z});(we.litElementVersions??=[]).push("4.2.0");var $n={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},Ln=r=>(...t)=>({_$litDirective$:r,values:t}),Yt=class{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,n){this._$Ct=t,this._$AM=e,this._$Ci=n}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}};var Mt=class extends Yt{constructor(t){if(super(t),this.it=A,t.type!==$n.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===A||t==null)return this._t=void 0,this.it=t;if(t===V)return t;if(typeof t!="string")throw Error(this.constructor.directiveName+"() called with a non-string value");if(t===this.it)return this._t;this.it=t;let e=[t];return e.raw=e,this._t={_$litType$:this.constructor.resultType,strings:e,values:[]}}};Mt.directiveName="unsafeHTML",Mt.resultType=1;var nt=Ln(Mt);var xs={attribute:!0,type:String,converter:vt,reflect:!1,hasChanged:jt},Rs=(r=xs,t,e)=>{let{kind:n,metadata:i}=e,o=globalThis.litPropertyMetadata.get(i);if(o===void 0&&globalThis.litPropertyMetadata.set(i,o=new Map),n==="setter"&&((r=Object.create(r)).wrapped=!0),o.set(e.name,r),n==="accessor"){let{name:l}=e;return{set(d){let u=t.get.call(this);t.set.call(this,d),this.requestUpdate(l,u,r)},init(d){return d!==void 0&&this.C(l,void 0,r,d),d}}}if(n==="setter"){let{name:l}=e;return function(d){let u=this[l];t.call(this,d),this.requestUpdate(l,u,r)}}throw Error("Unsupported decorator location: "+n)};function v(r){return(t,e)=>typeof e=="object"?Rs(r,t,e):((n,i,o)=>{let l=i.hasOwnProperty(o);return i.constructor.createProperty(o,n),l?Object.getOwnPropertyDescriptor(i,o):void 0})(r,t,e)}var{entries:Hn,setPrototypeOf:xn,isFrozen:Is,getPrototypeOf:Os,getOwnPropertyDescriptor:Ns}=Object,{freeze:I,seal:D,create:Fn}=Object,{apply:Ie,construct:Oe}=typeof Reflect<"u"&&Reflect;I||(I=function(t){return t});D||(D=function(t){return t});Ie||(Ie=function(t,e,n){return t.apply(e,n)});Oe||(Oe=function(t,e){return new t(...e)});var Xt=O(Array.prototype.forEach),Ps=O(Array.prototype.lastIndexOf),Rn=O(Array.prototype.pop),$t=O(Array.prototype.push),Ds=O(Array.prototype.splice),Jt=O(String.prototype.toLowerCase),Me=O(String.prototype.toString),In=O(String.prototype.match),Lt=O(String.prototype.replace),ks=O(String.prototype.indexOf),Us=O(String.prototype.trim),H=O(Object.prototype.hasOwnProperty),R=O(RegExp.prototype.test),xt=Hs(TypeError);function O(r){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var e=arguments.length,n=new Array(e>1?e-1:0),i=1;i2&&arguments[2]!==void 0?arguments[2]:Jt;xn&&xn(r,null);let n=t.length;for(;n--;){let i=t[n];if(typeof i=="string"){let o=e(i);o!==i&&(Is(t)||(t[n]=o),i=o)}r[i]=!0}return r}function Fs(r){for(let t=0;t/gm),Ws=D(/\$\{[\w\W]*/gm),js=D(/^data-[\-\w.\u00B7-\uFFFF]+$/),Vs=D(/^aria-[\-\w]+$/),qn=D(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Ys=D(/^(?:\w+script|data):/i),Ks=D(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),zn=D(/^html$/i),Xs=D(/^[a-z][.\w]*(-[.\w]+)+$/i),kn=Object.freeze({__proto__:null,ARIA_ATTR:Vs,ATTR_WHITESPACE:Ks,CUSTOM_ELEMENT:Xs,DATA_ATTR:js,DOCTYPE_NAME:zn,ERB_EXPR:Gs,IS_ALLOWED_URI:qn,IS_SCRIPT_OR_DATA:Ys,MUSTACHE_EXPR:Bs,TMPLIT_EXPR:Ws}),It={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},Zs=function(){return typeof window>"u"?null:window},Js=function(t,e){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let n=null,i="data-tt-policy-suffix";e&&e.hasAttribute(i)&&(n=e.getAttribute(i));let o="dompurify"+(n?"#"+n:"");try{return t.createPolicy(o,{createHTML(l){return l},createScriptURL(l){return l}})}catch{return console.warn("TrustedTypes policy "+o+" could not be created."),null}},Un=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function Bn(){let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Zs(),t=h=>Bn(h);if(t.version="3.2.6",t.removed=[],!r||!r.document||r.document.nodeType!==It.document||!r.Element)return t.isSupported=!1,t;let{document:e}=r,n=e,i=n.currentScript,{DocumentFragment:o,HTMLTemplateElement:l,Node:d,Element:u,NodeFilter:f,NamedNodeMap:_=r.NamedNodeMap||r.MozNamedAttrMap,HTMLFormElement:m,DOMParser:U,trustedTypes:P}=r,F=u.prototype,Kn=Rt(F,"cloneNode"),Xn=Rt(F,"remove"),Zn=Rt(F,"nextSibling"),Jn=Rt(F,"childNodes"),Nt=Rt(F,"parentNode");if(typeof l=="function"){let h=e.createElement("template");h.content&&h.content.ownerDocument&&(e=h.content.ownerDocument)}let L,ft="",{implementation:ee,createNodeIterator:Qn,createDocumentFragment:ts,getElementsByTagName:es}=e,{importNode:ns}=n,x=Un();t.isSupported=typeof Hn=="function"&&typeof Nt=="function"&&ee&&ee.createHTMLDocument!==void 0;let{MUSTACHE_EXPR:ne,ERB_EXPR:se,TMPLIT_EXPR:ie,DATA_ATTR:ss,ARIA_ATTR:is,IS_SCRIPT_OR_DATA:rs,ATTR_WHITESPACE:He,CUSTOM_ELEMENT:os}=kn,{IS_ALLOWED_URI:Fe}=kn,S=null,qe=p({},[...On,...$e,...Le,...xe,...Nn]),w=null,ze=p({},[...Pn,...Re,...Dn,...Zt]),E=Object.seal(Fn(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),gt=null,re=null,Be=!0,oe=!0,Ge=!1,We=!0,st=!1,Pt=!0,J=!1,ae=!1,le=!1,it=!1,Dt=!1,kt=!1,je=!0,Ve=!1,as="user-content-",ce=!0,yt=!1,rt={},ot=null,Ye=p({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),Ke=null,Xe=p({},["audio","video","img","source","image","track"]),he=null,Ze=p({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Ut="http://www.w3.org/1998/Math/MathML",Ht="http://www.w3.org/2000/svg",B="http://www.w3.org/1999/xhtml",at=B,ue=!1,de=null,ls=p({},[Ut,Ht,B],Me),Ft=p({},["mi","mo","mn","ms","mtext"]),qt=p({},["annotation-xml"]),cs=p({},["title","style","font","a","script"]),_t=null,hs=["application/xhtml+xml","text/html"],us="text/html",C=null,lt=null,ds=e.createElement("form"),Je=function(s){return s instanceof RegExp||s instanceof Function},pe=function(){let s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(lt&<===s)){if((!s||typeof s!="object")&&(s={}),s=Y(s),_t=hs.indexOf(s.PARSER_MEDIA_TYPE)===-1?us:s.PARSER_MEDIA_TYPE,C=_t==="application/xhtml+xml"?Me:Jt,S=H(s,"ALLOWED_TAGS")?p({},s.ALLOWED_TAGS,C):qe,w=H(s,"ALLOWED_ATTR")?p({},s.ALLOWED_ATTR,C):ze,de=H(s,"ALLOWED_NAMESPACES")?p({},s.ALLOWED_NAMESPACES,Me):ls,he=H(s,"ADD_URI_SAFE_ATTR")?p(Y(Ze),s.ADD_URI_SAFE_ATTR,C):Ze,Ke=H(s,"ADD_DATA_URI_TAGS")?p(Y(Xe),s.ADD_DATA_URI_TAGS,C):Xe,ot=H(s,"FORBID_CONTENTS")?p({},s.FORBID_CONTENTS,C):Ye,gt=H(s,"FORBID_TAGS")?p({},s.FORBID_TAGS,C):Y({}),re=H(s,"FORBID_ATTR")?p({},s.FORBID_ATTR,C):Y({}),rt=H(s,"USE_PROFILES")?s.USE_PROFILES:!1,Be=s.ALLOW_ARIA_ATTR!==!1,oe=s.ALLOW_DATA_ATTR!==!1,Ge=s.ALLOW_UNKNOWN_PROTOCOLS||!1,We=s.ALLOW_SELF_CLOSE_IN_ATTR!==!1,st=s.SAFE_FOR_TEMPLATES||!1,Pt=s.SAFE_FOR_XML!==!1,J=s.WHOLE_DOCUMENT||!1,it=s.RETURN_DOM||!1,Dt=s.RETURN_DOM_FRAGMENT||!1,kt=s.RETURN_TRUSTED_TYPE||!1,le=s.FORCE_BODY||!1,je=s.SANITIZE_DOM!==!1,Ve=s.SANITIZE_NAMED_PROPS||!1,ce=s.KEEP_CONTENT!==!1,yt=s.IN_PLACE||!1,Fe=s.ALLOWED_URI_REGEXP||qn,at=s.NAMESPACE||B,Ft=s.MATHML_TEXT_INTEGRATION_POINTS||Ft,qt=s.HTML_INTEGRATION_POINTS||qt,E=s.CUSTOM_ELEMENT_HANDLING||{},s.CUSTOM_ELEMENT_HANDLING&&Je(s.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(E.tagNameCheck=s.CUSTOM_ELEMENT_HANDLING.tagNameCheck),s.CUSTOM_ELEMENT_HANDLING&&Je(s.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(E.attributeNameCheck=s.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),s.CUSTOM_ELEMENT_HANDLING&&typeof s.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(E.allowCustomizedBuiltInElements=s.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),st&&(oe=!1),Dt&&(it=!0),rt&&(S=p({},Nn),w=[],rt.html===!0&&(p(S,On),p(w,Pn)),rt.svg===!0&&(p(S,$e),p(w,Re),p(w,Zt)),rt.svgFilters===!0&&(p(S,Le),p(w,Re),p(w,Zt)),rt.mathMl===!0&&(p(S,xe),p(w,Dn),p(w,Zt))),s.ADD_TAGS&&(S===qe&&(S=Y(S)),p(S,s.ADD_TAGS,C)),s.ADD_ATTR&&(w===ze&&(w=Y(w)),p(w,s.ADD_ATTR,C)),s.ADD_URI_SAFE_ATTR&&p(he,s.ADD_URI_SAFE_ATTR,C),s.FORBID_CONTENTS&&(ot===Ye&&(ot=Y(ot)),p(ot,s.FORBID_CONTENTS,C)),ce&&(S["#text"]=!0),J&&p(S,["html","head","body"]),S.table&&(p(S,["tbody"]),delete gt.tbody),s.TRUSTED_TYPES_POLICY){if(typeof s.TRUSTED_TYPES_POLICY.createHTML!="function")throw xt('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof s.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw xt('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');L=s.TRUSTED_TYPES_POLICY,ft=L.createHTML("")}else L===void 0&&(L=Js(P,i)),L!==null&&typeof ft=="string"&&(ft=L.createHTML(""));I&&I(s),lt=s}},Qe=p({},[...$e,...Le,...qs]),tn=p({},[...xe,...zs]),ps=function(s){let a=Nt(s);(!a||!a.tagName)&&(a={namespaceURI:at,tagName:"template"});let c=Jt(s.tagName),g=Jt(a.tagName);return de[s.namespaceURI]?s.namespaceURI===Ht?a.namespaceURI===B?c==="svg":a.namespaceURI===Ut?c==="svg"&&(g==="annotation-xml"||Ft[g]):!!Qe[c]:s.namespaceURI===Ut?a.namespaceURI===B?c==="math":a.namespaceURI===Ht?c==="math"&&qt[g]:!!tn[c]:s.namespaceURI===B?a.namespaceURI===Ht&&!qt[g]||a.namespaceURI===Ut&&!Ft[g]?!1:!tn[c]&&(cs[c]||!Qe[c]):!!(_t==="application/xhtml+xml"&&de[s.namespaceURI]):!1},q=function(s){$t(t.removed,{element:s});try{Nt(s).removeChild(s)}catch{Xn(s)}},ct=function(s,a){try{$t(t.removed,{attribute:a.getAttributeNode(s),from:a})}catch{$t(t.removed,{attribute:null,from:a})}if(a.removeAttribute(s),s==="is")if(it||Dt)try{q(a)}catch{}else try{a.setAttribute(s,"")}catch{}},en=function(s){let a=null,c=null;if(le)s=""+s;else{let b=In(s,/^[\r\n\t ]+/);c=b&&b[0]}_t==="application/xhtml+xml"&&at===B&&(s=''+s+"");let g=L?L.createHTML(s):s;if(at===B)try{a=new U().parseFromString(g,_t)}catch{}if(!a||!a.documentElement){a=ee.createDocument(at,"template",null);try{a.documentElement.innerHTML=ue?ft:g}catch{}}let M=a.body||a.documentElement;return s&&c&&M.insertBefore(e.createTextNode(c),M.childNodes[0]||null),at===B?es.call(a,J?"html":"body")[0]:J?a.documentElement:M},nn=function(s){return Qn.call(s.ownerDocument||s,s,f.SHOW_ELEMENT|f.SHOW_COMMENT|f.SHOW_TEXT|f.SHOW_PROCESSING_INSTRUCTION|f.SHOW_CDATA_SECTION,null)},me=function(s){return s instanceof m&&(typeof s.nodeName!="string"||typeof s.textContent!="string"||typeof s.removeChild!="function"||!(s.attributes instanceof _)||typeof s.removeAttribute!="function"||typeof s.setAttribute!="function"||typeof s.namespaceURI!="string"||typeof s.insertBefore!="function"||typeof s.hasChildNodes!="function")},sn=function(s){return typeof d=="function"&&s instanceof d};function G(h,s,a){Xt(h,c=>{c.call(t,s,a,lt)})}let rn=function(s){let a=null;if(G(x.beforeSanitizeElements,s,null),me(s))return q(s),!0;let c=C(s.nodeName);if(G(x.uponSanitizeElement,s,{tagName:c,allowedTags:S}),Pt&&s.hasChildNodes()&&!sn(s.firstElementChild)&&R(/<[/\w!]/g,s.innerHTML)&&R(/<[/\w!]/g,s.textContent)||s.nodeType===It.progressingInstruction||Pt&&s.nodeType===It.comment&&R(/<[/\w]/g,s.data))return q(s),!0;if(!S[c]||gt[c]){if(!gt[c]&&an(c)&&(E.tagNameCheck instanceof RegExp&&R(E.tagNameCheck,c)||E.tagNameCheck instanceof Function&&E.tagNameCheck(c)))return!1;if(ce&&!ot[c]){let g=Nt(s)||s.parentNode,M=Jn(s)||s.childNodes;if(M&&g){let b=M.length;for(let N=b-1;N>=0;--N){let W=Kn(M[N],!0);W.__removalCount=(s.__removalCount||0)+1,g.insertBefore(W,Zn(s))}}}return q(s),!0}return s instanceof u&&!ps(s)||(c==="noscript"||c==="noembed"||c==="noframes")&&R(/<\/no(script|embed|frames)/i,s.innerHTML)?(q(s),!0):(st&&s.nodeType===It.text&&(a=s.textContent,Xt([ne,se,ie],g=>{a=Lt(a,g," ")}),s.textContent!==a&&($t(t.removed,{element:s.cloneNode()}),s.textContent=a)),G(x.afterSanitizeElements,s,null),!1)},on=function(s,a,c){if(je&&(a==="id"||a==="name")&&(c in e||c in ds))return!1;if(!(oe&&!re[a]&&R(ss,a))){if(!(Be&&R(is,a))){if(!w[a]||re[a]){if(!(an(s)&&(E.tagNameCheck instanceof RegExp&&R(E.tagNameCheck,s)||E.tagNameCheck instanceof Function&&E.tagNameCheck(s))&&(E.attributeNameCheck instanceof RegExp&&R(E.attributeNameCheck,a)||E.attributeNameCheck instanceof Function&&E.attributeNameCheck(a))||a==="is"&&E.allowCustomizedBuiltInElements&&(E.tagNameCheck instanceof RegExp&&R(E.tagNameCheck,c)||E.tagNameCheck instanceof Function&&E.tagNameCheck(c))))return!1}else if(!he[a]){if(!R(Fe,Lt(c,He,""))){if(!((a==="src"||a==="xlink:href"||a==="href")&&s!=="script"&&ks(c,"data:")===0&&Ke[s])){if(!(Ge&&!R(rs,Lt(c,He,"")))){if(c)return!1}}}}}}return!0},an=function(s){return s!=="annotation-xml"&&In(s,os)},ln=function(s){G(x.beforeSanitizeAttributes,s,null);let{attributes:a}=s;if(!a||me(s))return;let c={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:w,forceKeepAttr:void 0},g=a.length;for(;g--;){let M=a[g],{name:b,namespaceURI:N,value:W}=M,Et=C(b),fe=W,$=b==="value"?fe:Us(fe);if(c.attrName=Et,c.attrValue=$,c.keepAttr=!0,c.forceKeepAttr=void 0,G(x.uponSanitizeAttribute,s,c),$=c.attrValue,Ve&&(Et==="id"||Et==="name")&&(ct(b,s),$=as+$),Pt&&R(/((--!?|])>)|<\/(style|title)/i,$)){ct(b,s);continue}if(c.forceKeepAttr)continue;if(!c.keepAttr){ct(b,s);continue}if(!We&&R(/\/>/i,$)){ct(b,s);continue}st&&Xt([ne,se,ie],hn=>{$=Lt($,hn," ")});let cn=C(s.nodeName);if(!on(cn,Et,$)){ct(b,s);continue}if(L&&typeof P=="object"&&typeof P.getAttributeType=="function"&&!N)switch(P.getAttributeType(cn,Et)){case"TrustedHTML":{$=L.createHTML($);break}case"TrustedScriptURL":{$=L.createScriptURL($);break}}if($!==fe)try{N?s.setAttributeNS(N,b,$):s.setAttribute(b,$),me(s)?q(s):Rn(t.removed)}catch{ct(b,s)}}G(x.afterSanitizeAttributes,s,null)},ms=function h(s){let a=null,c=nn(s);for(G(x.beforeSanitizeShadowDOM,s,null);a=c.nextNode();)G(x.uponSanitizeShadowNode,a,null),rn(a),ln(a),a.content instanceof o&&h(a.content);G(x.afterSanitizeShadowDOM,s,null)};return t.sanitize=function(h){let s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},a=null,c=null,g=null,M=null;if(ue=!h,ue&&(h=""),typeof h!="string"&&!sn(h))if(typeof h.toString=="function"){if(h=h.toString(),typeof h!="string")throw xt("dirty is not a string, aborting")}else throw xt("toString is not a function");if(!t.isSupported)return h;if(ae||pe(s),t.removed=[],typeof h=="string"&&(yt=!1),yt){if(h.nodeName){let W=C(h.nodeName);if(!S[W]||gt[W])throw xt("root node is forbidden and cannot be sanitized in-place")}}else if(h instanceof d)a=en(""),c=a.ownerDocument.importNode(h,!0),c.nodeType===It.element&&c.nodeName==="BODY"||c.nodeName==="HTML"?a=c:a.appendChild(c);else{if(!it&&!st&&!J&&h.indexOf("<")===-1)return L&&kt?L.createHTML(h):h;if(a=en(h),!a)return it?null:kt?ft:""}a&&le&&q(a.firstChild);let b=nn(yt?h:a);for(;g=b.nextNode();)rn(g),ln(g),g.content instanceof o&&ms(g.content);if(yt)return h;if(it){if(Dt)for(M=ts.call(a.ownerDocument);a.firstChild;)M.appendChild(a.firstChild);else M=a;return(w.shadowroot||w.shadowrootmode)&&(M=ns.call(n,M,!0)),M}let N=J?a.outerHTML:a.innerHTML;return J&&S["!doctype"]&&a.ownerDocument&&a.ownerDocument.doctype&&a.ownerDocument.doctype.name&&R(zn,a.ownerDocument.doctype.name)&&(N="
+`+N),st&&Xt([ne,se,ie],W=>{N=Lt(N,W," ")}),L&&kt?L.createHTML(N):N},t.setConfig=function(){let h=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};pe(h),ae=!0},t.clearConfig=function(){lt=null,ae=!1},t.isValidAttribute=function(h,s,a){lt||pe({});let c=C(h),g=C(s);return on(c,g,a)},t.addHook=function(h,s){typeof s=="function"&&$t(x[h],s)},t.removeHook=function(h,s){if(s!==void 0){let a=Ps(x[h],s);return a===-1?void 0:Ds(x[h],a,1)[0]}return Rn(x[h])},t.removeHooks=function(h){x[h]=[]},t.removeAllHooks=function(){x=Un()},t}var Gn=Bn();function Ne(r,t){let e=document.createElement(r);for(let[n,i]of Object.entries(t)){let o=n.replace(/_/g,"-");i!==null&&e.setAttribute(o,i)}return e}var dt=class extends z{createRenderRoot(){return this}};function Pe({headline:r="",message:t,status:e="warning"}){document.dispatchEvent(new CustomEvent("shiny:client-message",{detail:{headline:r,message:t,status:e}}))}async function Wn(r){if(window.Shiny&&r)try{await window.Shiny.renderDependenciesAsync(r)}catch(t){Pe({status:"error",message:`Failed to render HTML dependencies: ${t}`})}}var Qs=Gn();Qs.addHook("uponSanitizeElement",(r,t)=>{if(r.nodeName&&r.nodeName==="SCRIPT"){let e=r,n=e.getAttribute("type")==="application/json"&&e.getAttribute("data-for")!==null;t.allowedTags.script=n}});function jn(r,t=12){let e="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",n="";if(crypto?.getRandomValues){let i=new Uint8Array(t);crypto.getRandomValues(i);for(let o=0;o',dotsFade:'',arrowUpCircleFill:'',exclamationCircleFill:'',wrenchAdjustable:'',plus:''};window.shinychat=window.shinychat||{};window.shinychat.hiddenToolRequests=window.shinychat.hiddenToolRequests||new Set;var k=class extends z{constructor(){super(...arguments);this.expanded=!1;this.classStatus="";this.icon="";this.titleTemplate="{title}"}createRenderRoot(){return this}#t(e){e.preventDefault(),this.expanded=!this.expanded,this.requestUpdate()}formatTitle(){let e=this.toolTitle||`${this.toolName}()`;return e=`${e}`,e=this.titleTemplate.replace("{title}",e),y`${nt(e)}`}renderCard(e){let n=`tool-header-${this.requestId}`,i=`tool-content-${this.requestId}`,o=y`
+ ${nt(this.icon)}
${this.formatTitle()}
${this.intent?y`${this.intent}
`:""}
@@ -12,25 +12,25 @@ var fn=Object.defineProperty;var gn=Object.getOwnPropertyDescriptor;var g=(i,t,e
>
${e}
- `}};g([f({type:String,attribute:"request-id"})],k.prototype,"requestId",2),g([f({type:String,attribute:"tool-name"})],k.prototype,"toolName",2),g([f({type:String,attribute:"tool-title"})],k.prototype,"toolTitle",2),g([f({type:String})],k.prototype,"intent",2),g([f({type:Boolean,reflect:!0})],k.prototype,"expanded",2),g([f({type:String})],k.prototype,"classStatus",2),g([f({type:String})],k.prototype,"icon",2),g([f({type:String})],k.prototype,"titleTemplate",2);var pt=class extends k{constructor(){super();this.hidden=!1;this.#t=e=>{e.detail.request_id===this.requestId&&(this.hidden=!0)};this.titleTemplate="Running {title}",this.icon=''}connectedCallback(){super.connectedCallback(),this.hidden=window.shinychat.hiddenToolRequests.has(this.requestId),window.addEventListener("shiny-tool-request-hide",this.#t)}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("shiny-tool-request-hide",this.#t)}#t;render(){if(this.hidden)return y``;let e=y`
+ `}};T([v({type:String,attribute:"request-id"})],k.prototype,"requestId",2),T([v({type:String,attribute:"tool-name"})],k.prototype,"toolName",2),T([v({type:String,attribute:"tool-title"})],k.prototype,"toolTitle",2),T([v({type:String})],k.prototype,"intent",2),T([v({type:Boolean,reflect:!0})],k.prototype,"expanded",2),T([v({type:String})],k.prototype,"classStatus",2),T([v({type:String})],k.prototype,"icon",2),T([v({type:String})],k.prototype,"titleTemplate",2);var pt=class extends k{constructor(){super();this.hidden=!1;this.#t=e=>{e.detail.request_id===this.requestId&&(this.hidden=!0)};this.titleTemplate="Running {title}",this.icon=''}connectedCallback(){super.connectedCallback(),this.hidden=window.shinychat.hiddenToolRequests.has(this.requestId),window.addEventListener("shiny-tool-request-hide",this.#t)}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("shiny-tool-request-hide",this.#t)}#t;render(){if(this.hidden)return y``;let e=y`
`;return this.renderCard(y`
Tool arguments ${e}
-
`)}};g([f({type:String})],pt.prototype,"arguments",2),g([f({type:Boolean,reflect:!0})],pt.prototype,"hidden",2);var K=class extends k{constructor(){super();this.showRequest=!1;this.titleTemplate="{title}"}connectedCallback(){super.connectedCallback(),this.status==="error"?(this.classStatus="text-danger",this.icon=Ie.exclamationCircleFill,this.titleTemplate="{title} failed"):this.icon||(this.icon=Ie.wrenchAdjustable),window.shinychat.hiddenToolRequests.add(this.requestId),this.dispatchEvent(new CustomEvent("shiny-tool-request-hide",{detail:{request_id:this.requestId},bubbles:!0,cancelable:!0}))}#t(){let e="";if(this.valueType==="html"?e=y`${J(this.value)}`:this.valueType==="text"?e=y`${this.value}
`:(this.valueType!=="markdown"&&(e=De(this.value,"text")),e=y``)}};T([v({type:String})],pt.prototype,"arguments",2),T([v({type:Boolean,reflect:!0})],pt.prototype,"hidden",2);var K=class extends k{constructor(){super();this.showRequest=!1;this.titleTemplate="{title}"}connectedCallback(){super.connectedCallback(),this.status==="error"?(this.classStatus="text-danger",this.icon=Z.exclamationCircleFill,this.titleTemplate="{title} failed"):this.icon||(this.icon=Z.wrenchAdjustable),window.shinychat.hiddenToolRequests.add(this.requestId),this.dispatchEvent(new CustomEvent("shiny-tool-request-hide",{detail:{request_id:this.requestId},bubbles:!0,cancelable:!0}))}#t(){let e="";if(this.valueType==="html"?e=y`${nt(this.value)}`:this.valueType==="text"?e=y`${this.value}
`:(this.valueType!=="markdown"&&(e=De(this.value,"text")),e=y``),!this.showRequest&&this.valueType==="html")return e;let s=this.showRequest?y`Tool result `:"";return y`
- ${s}${e}
+ >`),!this.showRequest&&this.valueType==="html")return e;let n=this.showRequest?y`
Tool result `:"";return y`
+ ${n}${e}
`}#e(){if(!this.showRequest||!this.requestCall)return"";let e=y`
`,s=this.requestCall.split(`
+ >`,n=this.requestCall.split(`
`).length>2;return y`
- ${s?y`
+ ${n?y`
Tool call
${e}
`:y`Tool call ${e}`}
-
`}render(){let e=y` ${this.#e()} ${this.#t()} `;return this.renderCard(e)}};g([f({type:String,attribute:"request-call"})],K.prototype,"requestCall",2),g([f({type:String})],K.prototype,"status",2),g([f({type:Boolean,attribute:"show-request"})],K.prototype,"showRequest",2),g([f({type:String})],K.prototype,"value",2),g([f({type:String,attribute:"value-type"})],K.prototype,"valueType",2);var Ie={exclamationCircleFill:`
`,wrenchAdjustable:`
`,plus:`
`},De=(i,t="markdown")=>{let e="`".repeat(8);return`${e}${t}
-${i}
-${e}`};window.Shiny?.addCustomMessageHandler("shiny-tool-request-hide",i=>{window.shinychat.hiddenToolRequests.add(i);let t=new CustomEvent("shiny-tool-request-hide",{detail:{request_id:i},bubbles:!0,cancelable:!0});window.dispatchEvent(t)});var Pe="shiny-chat-message",ti="shiny-user-message",js="shiny-chat-messages",Vs="shiny-chat-input",ei="shiny-chat-container",si="shiny-tool-request",ni="shiny-tool-result",Ws={robot:'
',dots_fade:'
'},X=class extends nt{constructor(){super(...arguments);this.content="...";this.contentType="markdown";this.streaming=!1;this.icon="";this.role="assistant"}render(){let e=this.#t();return y`
+
`}render(){let e=y` ${this.#e()} ${this.#t()} `;return this.renderCard(e)}};T([v({type:String,attribute:"request-call"})],K.prototype,"requestCall",2),T([v({type:String})],K.prototype,"status",2),T([v({type:Boolean,attribute:"show-request"})],K.prototype,"showRequest",2),T([v({type:String})],K.prototype,"value",2),T([v({type:String,attribute:"value-type"})],K.prototype,"valueType",2);var De=(r,t="markdown")=>{let e="`".repeat(8);return`${e}${t}
+${r}
+${e}`};window.Shiny?.addCustomMessageHandler("shiny-tool-request-hide",r=>{window.shinychat.hiddenToolRequests.add(r);let t=new CustomEvent("shiny-tool-request-hide",{detail:{request_id:r},bubbles:!0,cancelable:!0});window.dispatchEvent(t)});var ti="shiny-chat-message",ei="shiny-user-message",ni="shiny-chat-message-loading",Vn="shiny-chat-messages",Yn="shiny-chat-input",si="shiny-chat-container",ii="shiny-tool-request",ri="shiny-tool-result",mt=class extends HTMLElement{constructor(){super();this._icon="";this._role="assistant";this._content="";this._contentType="markdown";this._initialized=!1;this._content=this.getAttribute("content")||"",this._contentType=this.getAttribute("content-type")||"markdown";let e=this.getAttribute("data-role");e&&(this._role=e),this.#t()}connectedCallback(){this._initialized||(this._initialized=!0,this.#i())}get icon(){return this._icon}set icon(e){this._icon=e||"",e?this.setAttribute("icon",""):this.removeAttribute("icon"),this.#e()}get role(){return this._role}set role(e){this._role=e,this.setAttribute("data-role",e),this.#e()}get content(){return this._content}set content(e){this._content=e,this.#i()}get contentType(){return this._contentType}set contentType(e){this._contentType=e,this.setAttribute("content-type",e)}static get observedAttributes(){return["data-role","content-type"]}attributeChangedCallback(e,n,i){if(n!==i)switch(e){case"data-role":this._role=i,this.#e();break;case"content-type":this._contentType=i;break}}#t(){let e=this.#n();this.innerHTML=`
${e}
-
- `}#t(){let e=this.#e();return e?y`${J(e)}
`:null}#e(){return this.role!=="assistant"?this.icon:this.content.trim().length===0?Ws.dots_fade:this.icon||Ws.robot}#n(){this.streaming||this.#s()}#s(){this.querySelectorAll(".suggestion,[data-suggestion]").forEach(e=>{if(!(e instanceof HTMLElement)||e.hasAttribute("tabindex"))return;e.setAttribute("tabindex","0"),e.setAttribute("role","button");let s=e.dataset.suggestion||e.textContent;e.setAttribute("aria-label",`Use chat suggestion: ${s}`)})}};g([f()],X.prototype,"content",2),g([f({attribute:"content-type"})],X.prototype,"contentType",2),g([f({type:Boolean,reflect:!0})],X.prototype,"streaming",2),g([f()],X.prototype,"icon",2),g([f({attribute:"data-role"})],X.prototype,"role",2);var ke=class extends X{constructor(){super(),this.role="user",this.contentType="semi-markdown"}},Ue=class extends nt{render(){return y``}},Ot=class extends nt{constructor(){super(...arguments);this.placeholder="Enter a message...";this._disabled=!1;this._isComposing=!1}get disabled(){return this._disabled}set disabled(e){let s=this._disabled;e!==s&&(this._disabled=e,e?this.setAttribute("disabled",""):this.removeAttribute("disabled"),this.requestUpdate("disabled",s),this.#e())}connectedCallback(){super.connectedCallback(),this.inputVisibleObserver=new IntersectionObserver(e=>{e.forEach(s=>{s.isIntersecting&&this.#o()})}),this.inputVisibleObserver.observe(this),this.addEventListener("compositionstart",this.#n),this.addEventListener("compositionend",this.#s)}disconnectedCallback(){super.disconnectedCallback(),this.inputVisibleObserver?.disconnect(),this.inputVisibleObserver=void 0,this.removeEventListener("compositionstart",this.#n),this.removeEventListener("compositionend",this.#s)}attributeChangedCallback(e,s,o){super.attributeChangedCallback(e,s,o),e==="disabled"&&(this.disabled=o!==null)}get textarea(){return this.querySelector("textarea")}get value(){return this.textarea.value}get valueIsEmpty(){return this.value.trim().length===0}get button(){return this.querySelector("button")}render(){return y`
+
+ `}#e(){let e=this.querySelector(".message-icon"),n=this.#s();if(n&&e)e.innerHTML=n;else if(n&&!e){let i=document.createElement("div");i.className="message-icon",i.innerHTML=n,this.prepend(i)}else!n&&e&&e.remove()}#n(){let e=this.#s();return e?`${e}
`:""}#s(){return this.role!="user"?this.icon||Z.robot:this.icon}async#i(){if(!this.content)return;let e=this.contentContainer.querySelector("[data-stream-id='__init__']");e&&e.remove();let n=await this.createStream("__init__",this.contentType,!1);n.content=this.content,n.streaming=!1,this.contentContainer.prepend(n)}get contentContainer(){return this.querySelector(".message-content")}async createStream(e,n,i=!1){let o=Ne("shiny-markdown-stream",{"data-stream-id":e,content:"","content-type":n,streaming:i?"":null,"auto-scroll":this.role==="assistant"?"":null});return o.onContentChange=this.#r.bind(this),o.onStreamEnd=this.#r.bind(this),this.contentContainer.appendChild(o),o}#r(){this.querySelectorAll(".suggestion,[data-suggestion]").forEach(e=>{if(!(e instanceof HTMLElement)||e.hasAttribute("tabindex"))return;e.setAttribute("tabindex","0"),e.setAttribute("role","button");let n=e.dataset.suggestion||e.textContent;e.setAttribute("aria-label",`Use chat suggestion: ${n}`)})}},ke=class extends mt{constructor(){super(),this.role="user"}},te=class extends mt{constructor(){super(),this.role="loading",this.icon=Z.dotsFade}},Ue=class extends dt{render(){return y``}},Ot=class extends dt{constructor(){super(...arguments);this.placeholder="Enter a message...";this._disabled=!1;this._isComposing=!1}get disabled(){return this._disabled}set disabled(e){let n=this._disabled;e!==n&&(this._disabled=e,e?this.setAttribute("disabled",""):this.removeAttribute("disabled"),this.requestUpdate("disabled",n),this.#e())}connectedCallback(){super.connectedCallback(),this.inputVisibleObserver=new IntersectionObserver(e=>{e.forEach(n=>{n.isIntersecting&&this.#r()})}),this.inputVisibleObserver.observe(this),this.addEventListener("compositionstart",this.#n),this.addEventListener("compositionend",this.#s)}disconnectedCallback(){super.disconnectedCallback(),this.inputVisibleObserver?.disconnect(),this.inputVisibleObserver=void 0,this.removeEventListener("compositionstart",this.#n),this.removeEventListener("compositionend",this.#s)}attributeChangedCallback(e,n,i){super.attributeChangedCallback(e,n,i),e==="disabled"&&(this.disabled=i!==null)}get textarea(){return this.querySelector("textarea")}get value(){return this.textarea.value}get valueIsEmpty(){return this.value.trim().length===0}get button(){return this.querySelector("button")}render(){let e=Z.arrowUpCircleFill;return y`