brave-search-mcp
Version:
MCP Server that uses Brave Search API to search for images, general web search, video, news and points of interest.
8 lines • 155 kB
HTML
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="color-scheme" content="light dark" />
<title>Brave Local Search</title>
<script type="module" crossorigin>!function(){const e=document.createElement("link").relList;if(!(e&&e.supports&&e.supports("modulepreload"))){for(const e of document.querySelectorAll('link[rel="modulepreload"]'))t(e);new MutationObserver(e=>{for(const n of e)if("childList"===n.type)for(const e of n.addedNodes)"LINK"===e.tagName&&"modulepreload"===e.rel&&t(e)}).observe(document,{childList:!0,subtree:!0})}function t(e){if(e.ep)return;e.ep=!0;const t=function(e){const t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),"use-credentials"===e.crossOrigin?t.credentials="include":"anonymous"===e.crossOrigin?t.credentials="omit":t.credentials="same-origin",t}(e);fetch(e.href,t)}}();var e,t,n,o,r,i,a,l,s,c,u,d,_={},h=[],p=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,f=Array.isArray;function m(e,t){for(var n in t)e[n]=t[n];return e}function v(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function g(t,n,o){var r,i,a,l={};for(a in n)"key"==a?r=n[a]:"ref"==a?i=n[a]:l[a]=n[a];if(arguments.length>2&&(l.children=arguments.length>3?e.call(arguments,2):o),"function"==typeof t&&null!=t.defaultProps)for(a in t.defaultProps)void 0===l[a]&&(l[a]=t.defaultProps[a]);return y(t,l,r,i,null)}function y(e,o,r,i,a){var l={type:e,props:o,key:r,ref:i,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:null==a?++n:a,__i:-1,__u:0};return null==a&&null!=t.vnode&&t.vnode(l),l}function w(){return{current:null}}function b(e){return e.children}function C(e,t){this.props=e,this.context=t}function M(e,t){if(null==t)return e.__?M(e.__,e.__i+1):null;for(var n;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e)return n.__e;return"function"==typeof e.type?M(e):null}function x(e){if(e.__P&&e.__d){var n=e.__v,o=n.__e,r=[],i=[],a=m({},n);a.__v=n.__v+1,t.vnode&&t.vnode(a),A(e.__P,a,n,e.__n,e.__P.namespaceURI,32&n.__u?[o]:null,r,null==o?M(n):o,!!(32&n.__u),i),a.__v=n.__v,a.__.__k[a.__i]=a,Z(r,a,i),n.__e=n.__=null,a.__e!=o&&S(a)}}function S(e){if(null!=(e=e.__)&&null!=e.__c)return e.__e=e.__c.base=null,e.__k.some(function(t){if(null!=t&&null!=t.__e)return e.__e=e.__c.base=t.__e}),S(e)}function E(e){(!e.__d&&(e.__d=!0)&&o.push(e)&&!k.__r++||r!=t.debounceRendering)&&((r=t.debounceRendering)||i)(k)}function k(){for(var e,t=1;o.length;)o.length>t&&o.sort(a),e=o.shift(),t=o.length,x(e);k.__r=0}function L(e,t,n,o,r,i,a,l,s,c,u){var d,p,m,v,g,w,C,x=o&&o.__k||h,S=t.length;for(s=function(e,t,n,o,r){var i,a,l,s,c,u=n.length,d=u,_=0;for(e.__k=new Array(r),i=0;i<r;i++)null!=(a=t[i])&&"boolean"!=typeof a&&"function"!=typeof a?("string"==typeof a||"number"==typeof a||"bigint"==typeof a||a.constructor==String?a=e.__k[i]=y(null,a,null,null,null):f(a)?a=e.__k[i]=y(b,{children:a},null,null,null):void 0===a.constructor&&a.__b>0?a=e.__k[i]=y(a.type,a.props,a.key,a.ref?a.ref:null,a.__v):e.__k[i]=a,s=i+_,a.__=e,a.__b=e.__b+1,l=null,-1!=(c=a.__i=N(a,n,s,d))&&(d--,(l=n[c])&&(l.__u|=2)),null==l||null==l.__v?(-1==c&&(r>u?_--:r<u&&_++),"function"!=typeof a.type&&(a.__u|=4)):c!=s&&(c==s-1?_--:c==s+1?_++:(c>s?_--:_++,a.__u|=4))):e.__k[i]=null;if(d)for(i=0;i<u;i++)null!=(l=n[i])&&!(2&l.__u)&&(l.__e==o&&(o=M(l)),I(l,l));return o}(n,t,x,s,S),d=0;d<S;d++)null!=(m=n.__k[d])&&(p=-1!=m.__i&&x[m.__i]||_,m.__i=d,w=A(e,m,p,r,i,a,l,s,c,u),v=m.__e,m.ref&&p.ref!=m.ref&&(p.ref&&$(p.ref,null,m),u.push(m.ref,m.__c||v,m)),null==g&&null!=v&&(g=v),(C=!!(4&m.__u))||p.__k===m.__k?s=T(m,s,e,C):"function"==typeof m.type&&void 0!==w?s=w:v&&(s=v.nextSibling),m.__u&=-7);return n.__e=g,s}function T(e,t,n,o){var r,i;if("function"==typeof e.type){for(r=e.__k,i=0;r&&i<r.length;i++)r[i]&&(r[i].__=e,t=T(r[i],t,n,o));return t}e.__e!=t&&(o&&(t&&e.type&&!t.parentNode&&(t=M(e)),n.insertBefore(e.__e,t||null)),t=e.__e);do{t=t&&t.nextSibling}while(null!=t&&8==t.nodeType);return t}function P(e,t){return t=t||[],null==e||"boolean"==typeof e||(f(e)?e.some(function(e){P(e,t)}):t.push(e)),t}function N(e,t,n,o){var r,i,a,l=e.key,s=e.type,c=t[n],u=null!=c&&!(2&c.__u);if(null===c&&null==l||u&&l==c.key&&s==c.type)return n;if(o>(u?1:0))for(r=n-1,i=n+1;r>=0||i<t.length;)if(null!=(c=t[a=r>=0?r--:i++])&&!(2&c.__u)&&l==c.key&&s==c.type)return a;return-1}function D(e,t,n){"-"==t[0]?e.setProperty(t,null==n?"":n):e[t]=null==n?"":"number"!=typeof n||p.test(t)?n:n+"px"}function z(e,t,n,o,r){var i,a;e:if("style"==t)if("string"==typeof n)e.style.cssText=n;else{if("string"==typeof o&&(e.style.cssText=o=""),o)for(t in o)n&&t in n||D(e.style,t,"");if(n)for(t in n)o&&n[t]==o[t]||D(e.style,t,n[t])}else if("o"==t[0]&&"n"==t[1])i=t!=(t=t.replace(l,"$1")),a=t.toLowerCase(),t=a in e||"onFocusOut"==t||"onFocusIn"==t?a.slice(2):t.slice(2),e.l||(e.l={}),e.l[t+i]=n,n?o?n.u=o.u:(n.u=s,e.addEventListener(t,i?u:c,i)):e.removeEventListener(t,i?u:c,i);else{if("http://www.w3.org/2000/svg"==r)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!=t&&"height"!=t&&"href"!=t&&"list"!=t&&"form"!=t&&"tabIndex"!=t&&"download"!=t&&"rowSpan"!=t&&"colSpan"!=t&&"role"!=t&&"popover"!=t&&t in e)try{e[t]=null==n?"":n;break e}catch(d){}"function"==typeof n||(null==n||!1===n&&"-"!=t[4]?e.removeAttribute(t):e.setAttribute(t,"popover"==t&&1==n?"":n))}}function R(e){return function(n){if(this.l){var o=this.l[n.type+e];if(null==n.t)n.t=s++;else if(n.t<o.u)return;return o(t.event?t.event(n):n)}}}function A(n,o,r,i,a,l,s,c,u,d){var p,g,y,w,x,S,E,k,T,P,N,D,R,A,Z,$=o.type;if(void 0!==o.constructor)return null;128&r.__u&&(u=!!(32&r.__u),l=[c=o.__e=r.__e]),(p=t.__b)&&p(o);e:if("function"==typeof $)try{if(k=o.props,T="prototype"in $&&$.prototype.render,P=(p=$.contextType)&&i[p.__c],N=p?P?P.props.value:p.__:i,r.__c?E=(g=o.__c=r.__c).__=g.__E:(T?o.__c=g=new $(k,N):(o.__c=g=new C(k,N),g.constructor=$,g.render=H),P&&P.sub(g),g.state||(g.state={}),g.__n=i,y=g.__d=!0,g.__h=[],g._sb=[]),T&&null==g.__s&&(g.__s=g.state),T&&null!=$.getDerivedStateFromProps&&(g.__s==g.state&&(g.__s=m({},g.__s)),m(g.__s,$.getDerivedStateFromProps(k,g.__s))),w=g.props,x=g.state,g.__v=o,y)T&&null==$.getDerivedStateFromProps&&null!=g.componentWillMount&&g.componentWillMount(),T&&null!=g.componentDidMount&&g.__h.push(g.componentDidMount);else{if(T&&null==$.getDerivedStateFromProps&&k!==w&&null!=g.componentWillReceiveProps&&g.componentWillReceiveProps(k,N),o.__v==r.__v||!g.__e&&null!=g.shouldComponentUpdate&&!1===g.shouldComponentUpdate(k,g.__s,N)){o.__v!=r.__v&&(g.props=k,g.state=g.__s,g.__d=!1),o.__e=r.__e,o.__k=r.__k,o.__k.some(function(e){e&&(e.__=o)}),h.push.apply(g.__h,g._sb),g._sb=[],g.__h.length&&s.push(g);break e}null!=g.componentWillUpdate&&g.componentWillUpdate(k,g.__s,N),T&&null!=g.componentDidUpdate&&g.__h.push(function(){g.componentDidUpdate(w,x,S)})}if(g.context=N,g.props=k,g.__P=n,g.__e=!1,D=t.__r,R=0,T)g.state=g.__s,g.__d=!1,D&&D(o),p=g.render(g.props,g.state,g.context),h.push.apply(g.__h,g._sb),g._sb=[];else do{g.__d=!1,D&&D(o),p=g.render(g.props,g.state,g.context),g.state=g.__s}while(g.__d&&++R<25);g.state=g.__s,null!=g.getChildContext&&(i=m(m({},i),g.getChildContext())),T&&!y&&null!=g.getSnapshotBeforeUpdate&&(S=g.getSnapshotBeforeUpdate(w,x)),A=null!=p&&p.type===b&&null==p.key?W(p.props.children):p,c=L(n,f(A)?A:[A],o,r,i,a,l,s,c,u,d),g.base=o.__e,o.__u&=-161,g.__h.length&&s.push(g),E&&(g.__E=g.__=null)}catch(I){if(o.__v=null,u||null!=l)if(I.then){for(o.__u|=u?160:128;c&&8==c.nodeType&&c.nextSibling;)c=c.nextSibling;l[l.indexOf(c)]=null,o.__e=c}else{for(Z=l.length;Z--;)v(l[Z]);O(o)}else o.__e=r.__e,o.__k=r.__k,I.then||O(o);t.__e(I,o,r)}else null==l&&o.__v==r.__v?(o.__k=r.__k,o.__e=r.__e):c=o.__e=function(n,o,r,i,a,l,s,c,u){var d,h,p,m,g,y,w,b=r.props||_,C=o.props,x=o.type;if("svg"==x?a="http://www.w3.org/2000/svg":"math"==x?a="http://www.w3.org/1998/Math/MathML":a||(a="http://www.w3.org/1999/xhtml"),null!=l)for(d=0;d<l.length;d++)if((g=l[d])&&"setAttribute"in g==!!x&&(x?g.localName==x:3==g.nodeType)){n=g,l[d]=null;break}if(null==n){if(null==x)return document.createTextNode(C);n=document.createElementNS(a,x,C.is&&C),c&&(t.__m&&t.__m(o,l),c=!1),l=null}if(null==x)b===C||c&&n.data==C||(n.data=C);else{if(l=l&&e.call(n.childNodes),!c&&null!=l)for(b={},d=0;d<n.attributes.length;d++)b[(g=n.attributes[d]).name]=g.value;for(d in b)g=b[d],"dangerouslySetInnerHTML"==d?p=g:"children"==d||d in C||"value"==d&&"defaultValue"in C||"checked"==d&&"defaultChecked"in C||z(n,d,null,g,a);for(d in C)g=C[d],"children"==d?m=g:"dangerouslySetInnerHTML"==d?h=g:"value"==d?y=g:"checked"==d?w=g:c&&"function"!=typeof g||b[d]===g||z(n,d,g,b[d],a);if(h)c||p&&(h.__html==p.__html||h.__html==n.innerHTML)||(n.innerHTML=h.__html),o.__k=[];else if(p&&(n.innerHTML=""),L("template"==o.type?n.content:n,f(m)?m:[m],o,r,i,"foreignObject"==x?"http://www.w3.org/1999/xhtml":a,l,s,l?l[0]:r.__k&&M(r,0),c,u),null!=l)for(d=l.length;d--;)v(l[d]);c||(d="value","progress"==x&&null==y?n.removeAttribute("value"):null!=y&&(y!==n[d]||"progress"==x&&!y||"option"==x&&y!=b[d])&&z(n,d,y,b[d],a),d="checked",null!=w&&w!=n[d]&&z(n,d,w,b[d],a))}return n}(r.__e,o,r,i,a,l,s,u,d);return(p=t.diffed)&&p(o),128&o.__u?void 0:c}function O(e){e&&(e.__c&&(e.__c.__e=!0),e.__k&&e.__k.some(O))}function Z(e,n,o){for(var r=0;r<o.length;r++)$(o[r],o[++r],o[++r]);t.__c&&t.__c(n,e),e.some(function(n){try{e=n.__h,n.__h=[],e.some(function(e){e.call(n)})}catch(o){t.__e(o,n.__v)}})}function W(e){return"object"!=typeof e||null==e||e.__b>0?e:f(e)?e.map(W):m({},e)}function $(e,n,o){try{if("function"==typeof e){var r="function"==typeof e.__u;r&&e.__u(),r&&null==n||(e.__u=e(n))}else e.current=n}catch(i){t.__e(i,o)}}function I(e,n,o){var r,i;if(t.unmount&&t.unmount(e),(r=e.ref)&&(r.current&&r.current!=e.__e||$(r,null,n)),null!=(r=e.__c)){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(a){t.__e(a,n)}r.base=r.__P=null}if(r=e.__k)for(i=0;i<r.length;i++)r[i]&&I(r[i],n,o||"function"!=typeof e.type);o||v(e.__e),e.__c=e.__=e.__e=void 0}function H(e,t,n){return this.constructor(e,n)}function B(n,o,r){var i,a,l,s;o==document&&(o=document.documentElement),t.__&&t.__(n,o),a=(i="function"==typeof r)?null:r&&r.__k||o.__k,l=[],s=[],A(o,n=(!i&&r||o).__k=g(b,null,[n]),a||_,_,o.namespaceURI,!i&&r?[r]:a?null:o.firstChild?e.call(o.childNodes):null,l,!i&&r?r:a?a.__e:o.firstChild,i,s),Z(l,n,s)}function F(e,t){B(e,t,F)}function U(t,n,o){var r,i,a,l,s=m({},t.props);for(a in t.type&&t.type.defaultProps&&(l=t.type.defaultProps),n)"key"==a?r=n[a]:"ref"==a?i=n[a]:s[a]=void 0===n[a]&&null!=l?l[a]:n[a];return arguments.length>2&&(s.children=arguments.length>3?e.call(arguments,2):o),y(t.type,s,r||t.key,i||t.ref,null)}function j(e){function t(e){var n,o;return this.getChildContext||(n=new Set,(o={})[t.__c]=this,this.getChildContext=function(){return o},this.componentWillUnmount=function(){n=null},this.shouldComponentUpdate=function(e){this.props.value!=e.value&&n.forEach(function(e){e.__e=!0,E(e)})},this.sub=function(e){n.add(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){n&&n.delete(e),t&&t.call(e)}}),e.children}return t.__c="__cC"+d++,t.__=e,t.Provider=t.__l=(t.Consumer=function(e,t){return e.children(t)}).contextType=t,t}e=h.slice,t={__e:function(e,t,n,o){for(var r,i,a;t=t.__;)if((r=t.__c)&&!r.__)try{if((i=r.constructor)&&null!=i.getDerivedStateFromError&&(r.setState(i.getDerivedStateFromError(e)),a=r.__d),null!=r.componentDidCatch&&(r.componentDidCatch(e,o||{}),a=r.__d),a)return r.__E=r}catch(l){e=l}throw e}},n=0,C.prototype.setState=function(e,t){var n;n=null!=this.__s&&this.__s!=this.state?this.__s:this.__s=m({},this.state),"function"==typeof e&&(e=e(m({},n),this.props)),e&&m(n,e),null!=e&&this.__v&&(t&&this._sb.push(t),E(this))},C.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),E(this))},C.prototype.render=b,o=[],i="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,a=function(e,t){return e.__v.__b-t.__v.__b},k.__r=0,l=/(PointerCapture)$|Capture$/i,s=0,c=R(!1),u=R(!0),d=0;var q=0;function V(e,n,o,r,i,a){n||(n={});var l,s,c=n;if("ref"in c)for(s in c={},n)"ref"==s?l=n[s]:c[s]=n[s];var u={type:e,props:c,key:o,ref:l,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--q,__i:-1,__u:0,__source:i,__self:a};if("function"==typeof e&&(l=e.defaultProps))for(s in l)void 0===c[s]&&(c[s]=l[s]);return t.vnode&&t.vnode(u),u}var Y,X,K,Q,G=0,J=[],ee=t,te=ee.__b,ne=ee.__r,oe=ee.diffed,re=ee.__c,ie=ee.unmount,ae=ee.__;function le(e,t){ee.__h&&ee.__h(X,e,G||t),G=0;var n=X.__H||(X.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function se(e){return G=1,ce(Se,e)}function ce(e,t,n){var o=le(Y++,2);if(o.t=e,!o.__c&&(o.__=[n?n(t):Se(void 0,t),function(e){var t=o.__N?o.__N[0]:o.__[0],n=o.t(t,e);t!==n&&(o.__N=[n,o.__[1]],o.__c.setState({}))}],o.__c=X,!X.__f)){var r=function(e,t,n){if(!o.__c.__H)return!0;var r=o.__c.__H.__.filter(function(e){return e.__c});if(r.every(function(e){return!e.__N}))return!i||i.call(this,e,t,n);var a=o.__c.props!==e;return r.some(function(e){if(e.__N){var t=e.__[0];e.__=e.__N,e.__N=void 0,t!==e.__[0]&&(a=!0)}}),i&&i.call(this,e,t,n)||a};X.__f=!0;var i=X.shouldComponentUpdate,a=X.componentWillUpdate;X.componentWillUpdate=function(e,t,n){if(this.__e){var o=i;i=void 0,r(e,t,n),i=o}a&&a.call(this,e,t,n)},X.shouldComponentUpdate=r}return o.__N||o.__}function ue(e,t){var n=le(Y++,3);!ee.__s&&xe(n.__H,t)&&(n.__=e,n.u=t,X.__H.__h.push(n))}function de(e,t){var n=le(Y++,4);!ee.__s&&xe(n.__H,t)&&(n.__=e,n.u=t,X.__h.push(n))}function _e(e){return G=5,pe(function(){return{current:e}},[])}function he(e,t,n){G=6,de(function(){if("function"==typeof e){var n=e(t());return function(){e(null),n&&"function"==typeof n&&n()}}if(e)return e.current=t(),function(){return e.current=null}},null==n?n:n.concat(e))}function pe(e,t){var n=le(Y++,7);return xe(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function fe(e,t){return G=8,pe(function(){return e},t)}function me(e){var t=X.context[e.__c],n=le(Y++,9);return n.c=e,t?(null==n.__&&(n.__=!0,t.sub(X)),t.props.value):e.__}function ve(e,t){ee.useDebugValue&&ee.useDebugValue(t?t(e):e)}function ge(){var e=le(Y++,11);if(!e.__){for(var t=X.__v;null!==t&&!t.__m&&null!==t.__;)t=t.__;var n=t.__m||(t.__m=[0,0]);e.__="P"+n[0]+"-"+n[1]++}return e.__}function ye(){for(var e;e=J.shift();){var t=e.__H;if(e.__P&&t)try{t.__h.some(Ce),t.__h.some(Me),t.__h=[]}catch(n){t.__h=[],ee.__e(n,e.__v)}}}ee.__b=function(e){X=null,te&&te(e)},ee.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),ae&&ae(e,t)},ee.__r=function(e){ne&&ne(e),Y=0;var t=(X=e.__c).__H;t&&(K===X?(t.__h=[],X.__h=[],t.__.some(function(e){e.__N&&(e.__=e.__N),e.u=e.__N=void 0})):(t.__h.some(Ce),t.__h.some(Me),t.__h=[],Y=0)),K=X},ee.diffed=function(e){oe&&oe(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(1!==J.push(t)&&Q===ee.requestAnimationFrame||((Q=ee.requestAnimationFrame)||be)(ye)),t.__H.__.some(function(e){e.u&&(e.__H=e.u),e.u=void 0})),K=X=null},ee.__c=function(e,t){t.some(function(e){try{e.__h.some(Ce),e.__h=e.__h.filter(function(e){return!e.__||Me(e)})}catch(n){t.some(function(e){e.__h&&(e.__h=[])}),t=[],ee.__e(n,e.__v)}}),re&&re(e,t)},ee.unmount=function(e){ie&&ie(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.some(function(e){try{Ce(e)}catch(n){t=n}}),n.__H=void 0,t&&ee.__e(t,n.__v))};var we="function"==typeof requestAnimationFrame;function be(e){var t,n=function(){clearTimeout(o),we&&cancelAnimationFrame(t),setTimeout(e)},o=setTimeout(n,35);we&&(t=requestAnimationFrame(n))}function Ce(e){var t=X,n=e.__c;"function"==typeof n&&(e.__c=void 0,n()),X=t}function Me(e){var t=X;e.__c=e.__(),X=t}function xe(e,t){return!e||e.length!==t.length||t.some(function(t,n){return t!==e[n]})}function Se(e,t){return"function"==typeof t?t(e):t}function Ee(e,t){for(var n in t)e[n]=t[n];return e}function ke(e,t){for(var n in e)if("__source"!==n&&!(n in t))return!0;for(var o in t)if("__source"!==o&&e[o]!==t[o])return!0;return!1}function Le(e,t){var n=t(),o=se({t:{__:n,u:t}}),r=o[0].t,i=o[1];return de(function(){r.__=n,r.u=t,Te(r)&&i({t:r})},[e,n,t]),ue(function(){return Te(r)&&i({t:r}),e(function(){Te(r)&&i({t:r})})},[e]),n}function Te(e){try{return!((t=e.__)===(n=e.u())&&(0!==t||1/t==1/n)||t!=t&&n!=n)}catch(o){return!0}var t,n}function Pe(e){e()}function Ne(e){return e}function De(){return[!1,Pe]}var ze=de;function Re(e,t){this.props=e,this.context=t}function Ae(e,t){function n(e){var n=this.props.ref,o=n==e.ref;return!o&&n&&(n.call?n(null):n.current=null),t?!t(this.props,e)||!o:ke(this.props,e)}function o(t){return this.shouldComponentUpdate=n,g(e,t)}return o.displayName="Memo("+(e.displayName||e.name)+")",o.prototype.isReactComponent=!0,o.__f=!0,o.type=e,o}(Re.prototype=new C).isPureReactComponent=!0,Re.prototype.shouldComponentUpdate=function(e,t){return ke(this.props,e)||ke(this.state,t)};var Oe=t.__b;t.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),Oe&&Oe(e)};var Ze="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function We(e){function t(t){var n=Ee({},t);return delete n.ref,e(n,t.ref||null)}return t.$$typeof=Ze,t.render=e,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}var $e=function(e,t){return null==e?null:P(P(e).map(t))},Ie={map:$e,forEach:$e,count:function(e){return e?P(e).length:0},only:function(e){var t=P(e);if(1!==t.length)throw"Children.only";return t[0]},toArray:P},He=t.__e;t.__e=function(e,t,n,o){if(e.then)for(var r,i=t;i=i.__;)if((r=i.__c)&&r.__c)return null==t.__e&&(t.__e=n.__e,t.__k=n.__k),r.__c(e,t);He(e,t,n,o)};var Be=t.unmount;function Fe(e,t,n){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach(function(e){"function"==typeof e.__c&&e.__c()}),e.__c.__H=null),null!=(e=Ee({},e)).__c&&(e.__c.__P===n&&(e.__c.__P=t),e.__c.__e=!0,e.__c=null),e.__k=e.__k&&e.__k.map(function(e){return Fe(e,t,n)})),e}function Ue(e,t,n){return e&&n&&(e.__v=null,e.__k=e.__k&&e.__k.map(function(e){return Ue(e,t,n)}),e.__c&&e.__c.__P===t&&(e.__e&&n.appendChild(e.__e),e.__c.__e=!0,e.__c.__P=n)),e}function je(){this.__u=0,this.o=null,this.__b=null}function qe(e){if(!e.__)return null;var t=e.__.__c;return t&&t.__a&&t.__a(e)}function Ve(e){var t,n,o,r=null;function i(i){if(t||(t=e()).then(function(e){e&&(r=e.default||e),o=!0},function(e){n=e,o=!0}),n)throw n;if(!o)throw t;return r?g(r,i):null}return i.displayName="Lazy",i.__f=!0,i}function Ye(){this.i=null,this.l=null}t.unmount=function(e){var t=e.__c;t&&(t.__z=!0),t&&t.__R&&t.__R(),t&&32&e.__u&&(e.type=null),Be&&Be(e)},(je.prototype=new C).__c=function(e,t){var n=t.__c,o=this;null==o.o&&(o.o=[]),o.o.push(n);var r=qe(o.__v),i=!1,a=function(){i||o.__z||(i=!0,n.__R=null,r?r(s):s())};n.__R=a;var l=n.__P;n.__P=null;var s=function(){if(! --o.__u){if(o.state.__a){var e=o.state.__a;o.__v.__k[0]=Ue(e,e.__c.__P,e.__c.__O)}var t;for(o.setState({__a:o.__b=null});t=o.o.pop();)t.__P=l,t.forceUpdate()}};o.__u++||32&t.__u||o.setState({__a:o.__b=o.__v.__k[0]}),e.then(a,a)},je.prototype.componentWillUnmount=function(){this.o=[]},je.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),o=this.__v.__k[0].__c;this.__v.__k[0]=Fe(this.__b,n,o.__O=o.__P)}this.__b=null}var r=t.__a&&g(b,null,e.fallback);return r&&(r.__u&=-33),[g(b,null,t.__a?null:e.children),r]};var Xe=function(e,t,n){if(++n[1]===n[0]&&e.l.delete(t),e.props.revealOrder&&("t"!==e.props.revealOrder[0]||!e.l.size))for(n=e.i;n;){for(;n.length>3;)n.pop()();if(n[1]<n[0])break;e.i=n=n[2]}};function Ke(e){return this.getChildContext=function(){return e.context},e.children}function Qe(e){var t=this,n=e.h;if(t.componentWillUnmount=function(){B(null,t.v),t.v=null,t.h=null},t.h&&t.h!==n&&t.componentWillUnmount(),!t.v){for(var o=t.__v;null!==o&&!o.__m&&null!==o.__;)o=o.__;t.h=n,t.v={nodeType:1,parentNode:n,childNodes:[],__k:{__m:o.__m},contains:function(){return!0},namespaceURI:n.namespaceURI,insertBefore:function(e,n){this.childNodes.push(e),t.h.insertBefore(e,n)},removeChild:function(e){this.childNodes.splice(this.childNodes.indexOf(e)>>>1,1),t.h.removeChild(e)}}}B(g(Ke,{context:t.context},e.__v),t.v)}function Ge(e,t){var n=g(Qe,{__v:e,h:t});return n.containerInfo=t,n}(Ye.prototype=new C).__a=function(e){var t=this,n=qe(t.__v),o=t.l.get(e);return o[0]++,function(r){var i=function(){t.props.revealOrder?(o.push(r),Xe(t,e,o)):r()};n?n(i):i()}},Ye.prototype.render=function(e){this.i=null,this.l=new Map;var t=P(e.children);e.revealOrder&&"b"===e.revealOrder[0]&&t.reverse();for(var n=t.length;n--;)this.l.set(t[n],this.i=[1,0,this.i]);return e.children},Ye.prototype.componentDidUpdate=Ye.prototype.componentDidMount=function(){var e=this;this.l.forEach(function(t,n){Xe(e,n,t)})};var Je="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,et=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,tt=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,nt=/[A-Z0-9]/g,ot="undefined"!=typeof document,rt=function(e){return("undefined"!=typeof Symbol&&"symbol"==typeof Symbol()?/fil|che|rad/:/fil|che|ra/).test(e)};function it(e,t,n){return null==t.__k&&(t.textContent=""),B(e,t),"function"==typeof n&&n(),e?e.__c:null}function at(e,t,n){return F(e,t),"function"==typeof n&&n(),e?e.__c:null}C.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(e){Object.defineProperty(C.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})});var lt=t.event;function st(){}function ct(){return this.cancelBubble}function ut(){return this.defaultPrevented}t.event=function(e){return lt&&(e=lt(e)),e.persist=st,e.isPropagationStopped=ct,e.isDefaultPrevented=ut,e.nativeEvent=e};var dt,_t={enumerable:!1,configurable:!0,get:function(){return this.class}},ht=t.vnode;t.vnode=function(e){"string"==typeof e.type&&function(e){var t=e.props,n=e.type,o={},r=-1===n.indexOf("-");for(var i in t){var a=t[i];if(!("value"===i&&"defaultValue"in t&&null==a||ot&&"children"===i&&"noscript"===n||"class"===i||"className"===i)){var l=i.toLowerCase();"defaultValue"===i&&"value"in t&&null==t.value?i="value":"download"===i&&!0===a?a="":"translate"===l&&"no"===a?a=!1:"o"===l[0]&&"n"===l[1]?"ondoubleclick"===l?i="ondblclick":"onchange"!==l||"input"!==n&&"textarea"!==n||rt(t.type)?"onfocus"===l?i="onfocusin":"onblur"===l?i="onfocusout":tt.test(i)&&(i=l):l=i="oninput":r&&et.test(i)?i=i.replace(nt,"-$&").toLowerCase():null===a&&(a=void 0),"oninput"===l&&o[i=l]&&(i="oninputCapture"),o[i]=a}}"select"==n&&o.multiple&&Array.isArray(o.value)&&(o.value=P(t.children).forEach(function(e){e.props.selected=-1!=o.value.indexOf(e.props.value)})),"select"==n&&null!=o.defaultValue&&(o.value=P(t.children).forEach(function(e){e.props.selected=o.multiple?-1!=o.defaultValue.indexOf(e.props.value):o.defaultValue==e.props.value})),t.class&&!t.className?(o.class=t.class,Object.defineProperty(o,"className",_t)):t.className&&(o.class=o.className=t.className),e.props=o}(e),e.$$typeof=Je,ht&&ht(e)};var pt=t.__r;t.__r=function(e){pt&&pt(e),dt=e.__c};var ft=t.diffed;t.diffed=function(e){ft&&ft(e);var t=e.props,n=e.__e;null!=n&&"textarea"===e.type&&"value"in t&&t.value!==n.value&&(n.value=null==t.value?"":t.value),dt=null};var mt={ReactCurrentDispatcher:{current:{readContext:function(e){return dt.__n[e.__c].props.value},useCallback:fe,useContext:me,useDebugValue:ve,useDeferredValue:Ne,useEffect:ue,useId:ge,useImperativeHandle:he,useInsertionEffect:ze,useLayoutEffect:de,useMemo:pe,useReducer:ce,useRef:_e,useState:se,useSyncExternalStore:Le,useTransition:De}}};function vt(e){return g.bind(null,e)}function gt(e){return!!e&&e.$$typeof===Je}function yt(e){return gt(e)&&e.type===b}function wt(e){return!!e&&"string"==typeof e.displayName&&e.displayName.startsWith("Memo(")}function bt(e){return gt(e)?U.apply(null,arguments):e}function Ct(e){return!!e.__k&&(B(null,e),!0)}function Mt(e){return e&&(e.base||1===e.nodeType&&e)||null}var xt=function(e,t){return e(t)},St=function(e,t){return e(t)},Et=b,kt=gt,Lt={useState:se,useId:ge,useReducer:ce,useEffect:ue,useLayoutEffect:de,useInsertionEffect:ze,useTransition:De,useDeferredValue:Ne,useSyncExternalStore:Le,startTransition:Pe,useRef:_e,useImperativeHandle:he,useMemo:pe,useCallback:fe,useContext:me,useDebugValue:ve,version:"18.3.1",Children:Ie,render:it,hydrate:at,unmountComponentAtNode:Ct,createPortal:Ge,createElement:g,createContext:j,createFactory:vt,cloneElement:bt,createRef:w,Fragment:b,isValidElement:gt,isElement:kt,isFragment:yt,isMemo:wt,findDOMNode:Mt,Component:C,PureComponent:Re,memo:Ae,forwardRef:We,flushSync:St,unstable_batchedUpdates:xt,StrictMode:Et,Suspense:je,SuspenseList:Ye,lazy:Ve,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:mt};const Tt=Object.freeze(Object.defineProperty({__proto__:null,Children:Ie,Component:C,Fragment:b,PureComponent:Re,StrictMode:Et,Suspense:je,SuspenseList:Ye,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:mt,cloneElement:bt,createContext:j,createElement:g,createFactory:vt,createPortal:Ge,createRef:w,default:Lt,findDOMNode:Mt,flushSync:St,forwardRef:We,hydrate:at,isElement:kt,isFragment:yt,isMemo:wt,isValidElement:gt,lazy:Ve,memo:Ae,render:it,startTransition:Pe,unmountComponentAtNode:Ct,unstable_batchedUpdates:xt,useCallback:fe,useContext:me,useDebugValue:ve,useDeferredValue:Ne,useEffect:ue,useErrorBoundary:function(e){var t=le(Y++,10),n=se();return t.__=e,X.componentDidCatch||(X.componentDidCatch=function(e,o){t.__&&t.__(e,o),n[1](e)}),[n[0],function(){n[1](void 0)}]},useId:ge,useImperativeHandle:he,useInsertionEffect:ze,useLayoutEffect:de,useMemo:pe,useReducer:ce,useRef:_e,useState:se,useSyncExternalStore:Le,useTransition:De,version:"18.3.1"},Symbol.toStringTag,{value:"Module"}));function Pt(e){const t=document.documentElement;t.setAttribute("data-theme",e),t.style.colorScheme=e}const Nt="openai:set_globals";function Dt(e){const t=fe(t=>{if("undefined"==typeof window)return()=>{};const n=n=>{const o=n;o.detail?.globals&&e in o.detail.globals&&t()};return window.addEventListener(Nt,n,{passive:!0}),()=>{window.removeEventListener(Nt,n)}},[e]),n=fe(()=>{if("undefined"!=typeof window)return window.openai?.[e]},[e]);return fe(()=>{},[]),Le(t,n)}const zt="(prefers-color-scheme: dark)";function Rt(){const e=Dt("theme");var t;ue(()=>{if(t)return void Pt(t);const e=()=>{Pt(window.matchMedia?.(zt).matches?"dark":"light")};e();const n=window.matchMedia?.(zt);if(!n)return;const o=()=>e();return n.addEventListener?(n.addEventListener("change",o),()=>{n.removeEventListener("change",o)}):(n.addListener?.(o),()=>{n.removeListener?.(o)})},[t="light"===e||"dark"===e?e:void 0])}const At={},Ot=function(e,t,n){let o=Promise.resolve();if(t&&t.length>0){let e=function(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:"fulfilled",value:e}),e=>({status:"rejected",reason:e}))))};const r=document.getElementsByTagName("link"),i=document.querySelector("meta[property=csp-nonce]"),a=i?.nonce||i?.getAttribute("nonce");o=e(t.map(e=>{if(e=function(e,t){return new URL(e,t).href}(e,n),e in At)return;At[e]=!0;const t=e.endsWith(".css"),o=t?'[rel="stylesheet"]':"";if(n)for(let n=r.length-1;n>=0;n--){const o=r[n];if(o.href===e&&(!t||"stylesheet"===o.rel))return}else if(document.querySelector(`link[href="${e}"]${o}`))return;const i=document.createElement("link");return i.rel=t?"stylesheet":"modulepreload",t||(i.as="script"),i.crossOrigin="",i.href=e,a&&i.setAttribute("nonce",a),document.head.appendChild(i),t?new Promise((t,n)=>{i.addEventListener("load",t),i.addEventListener("error",()=>n(new Error(`Unable to preload CSS for ${e}`)))}):void 0}))}function r(e){const t=new Event("vite:preloadError",{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return o.then(t=>{for(const e of t||[])"rejected"===e.status&&r(e.reason);return e().catch(r)})},Zt=e=>V("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"currentColor",...e,children:V("path",{d:"M5.29289 12.7071C4.90237 12.3166 4.90237 11.6834 5.29289 11.2929L10.2929 6.29289C10.6834 5.90237 11.3166 5.90237 11.7071 6.29289C12.0976 6.68342 12.0976 7.31658 11.7071 7.70711L8.41421 11H18C18.5523 11 19 11.4477 19 12C19 12.5523 18.5523 13 18 13H8.41421L11.7071 16.2929C12.0976 16.6834 12.0976 17.3166 11.7071 17.7071C11.3166 18.0976 10.6834 18.0976 10.2929 17.7071L5.29289 12.7071Z",fill:"currentColor"})}),Wt=e=>V("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"currentColor",...e,children:V("path",{d:"M18.7071 12.7071C19.0976 12.3166 19.0976 11.6834 18.7071 11.2929L13.7071 6.29289C13.3166 5.90237 12.6834 5.90237 12.2929 6.29289C11.9024 6.68342 11.9024 7.31658 12.2929 7.70711L15.5858 11H6C5.44771 11 5 11.4477 5 12C5 12.5523 5.44771 13 6 13H15.5858L12.2929 16.2929C11.9024 16.6834 11.9024 17.3166 12.2929 17.7071C12.6834 18.0976 13.3166 18.0976 13.7071 17.7071L18.7071 12.7071Z",fill:"currentColor"})}),$t=e=>V("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"currentColor",...e,children:V("path",{fillRule:"evenodd",d:"M18.063 5.674a1 1 0 0 1 .263 1.39l-7.5 11a1 1 0 0 1-1.533.143l-4.5-4.5a1 1 0 1 1 1.414-1.414l3.647 3.647 6.82-10.003a1 1 0 0 1 1.39-.263Z",clipRule:"evenodd"})}),It=e=>V("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"currentColor",...e,children:V("path",{fillRule:"evenodd",d:"M4.293 8.293a1 1 0 0 1 1.414 0L12 14.586l6.293-6.293a1 1 0 1 1 1.414 1.414l-7 7a1 1 0 0 1-1.414 0l-7-7a1 1 0 0 1 0-1.414Z",clipRule:"evenodd"})}),Ht=e=>V("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"currentColor",...e,children:V("path",{fillRule:"evenodd",d:"M12 8a1 1 0 0 1 .707.293l7 7a1 1 0 0 1-1.414 1.414L12 10.414l-6.293 6.293a1 1 0 0 1-1.414-1.414l7-7A1 1 0 0 1 12 8Z",clipRule:"evenodd"})}),Bt=e=>V("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"currentColor",...e,children:V("path",{d:"M12 4C7.58172 4 4 7.58172 4 12C4 16.4183 7.58172 20 12 20C16.4183 20 20 16.4183 20 12C20 7.58172 16.4183 4 12 4ZM2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22C6.47715 22 2 17.5228 2 12ZM12 6C12.5523 6 13 6.44772 13 7V12C13 12.2652 12.8946 12.5196 12.7071 12.7071L10.2071 15.2071C9.81658 15.5976 9.18342 15.5976 8.79289 15.2071C8.40237 14.8166 8.40237 14.1834 8.79289 13.7929L11 11.5858V7C11 6.44772 11.4477 6 12 6Z",fill:"currentColor"})}),Ft=e=>V("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"currentColor",...e,children:V("path",{d:"M13 4a1 1 0 1 1 2 0v3.586l4.293-4.293a1 1 0 1 1 1.414 1.414L16.414 9H20a1 1 0 1 1 0 2h-6a1 1 0 0 1-1-1V4ZM3 14a1 1 0 0 1 1-1h6a1 1 0 0 1 1 1v6a1 1 0 1 1-2 0v-3.586l-4.293 4.293a1 1 0 0 1-1.414-1.414L7.586 15H4a1 1 0 0 1-1-1Z"})}),Ut=e=>V("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"currentColor",...e,children:V("path",{d:"M13 4a1 1 0 0 1 1-1h6a1 1 0 0 1 1 1v6a1 1 0 1 1-2 0V6.414l-3.793 3.793a1 1 0 0 1-1.414-1.414L17.586 5H14a1 1 0 0 1-1-1Zm-9 9a1 1 0 0 1 1 1v3.586l3.793-3.793a1 1 0 0 1 1.414 1.414L6.414 19H10a1 1 0 1 1 0 2H4a1 1 0 0 1-1-1v-6a1 1 0 0 1 1-1Z"})}),jt=e=>V("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"currentColor",...e,children:V("path",{fillRule:"evenodd",d:"M5 4a3 3 0 0 0-3 3v10a3 3 0 0 0 3 3h14a3 3 0 0 0 3-3V7a3 3 0 0 0-3-3H5ZM4 7.329V17a1 1 0 0 0 1 1h14a1 1 0 0 0 1-1V7.329L13.976 12.6a3 3 0 0 1-3.952 0L4 7.33ZM18.481 6H5.52l5.822 5.095a1 1 0 0 0 1.318 0L18.48 6Z",clipRule:"evenodd"})}),qt=e=>V("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"currentColor",...e,children:V("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M13.414 4.58563C12.633 3.80466 11.3672 3.8048 10.5853 4.58598C9.80497 5.36556 9.80463 6.63257 10.586 7.41472C11.3654 8.19502 12.6322 8.19539 13.4143 7.41403C14.1951 6.634 14.1956 5.36726 13.414 4.58563ZM9.17171 3.1711C10.7336 1.61065 13.2654 1.6085 14.8282 3.17145C16.3904 4.73374 16.3909 7.26728 14.8279 8.82889C14.3036 9.35271 13.6698 9.70097 13 9.87334V17C13 17.5523 12.5523 18 12 18C11.4477 18 11 17.5523 11 17V9.87399C10.3298 9.70187 9.69564 9.35338 9.171 8.8282C7.61087 7.26643 7.60825 4.73315 9.17171 3.1711ZM8.98183 14.1741C9.08663 14.7163 8.732 15.2408 8.18974 15.3456C6.77813 15.6184 5.65459 16.027 4.9124 16.4832C4.12818 16.9653 4 17.3441 4 17.5C4 17.6089 4.0528 17.8216 4.3841 18.1262C4.71624 18.4316 5.25207 18.7526 5.99849 19.0429C7.48496 19.6209 9.60648 20 12 20C14.3935 20 16.5151 19.6209 18.0015 19.0429C18.7479 18.7526 19.2838 18.4316 19.6159 18.1262C19.9472 17.8216 20 17.6089 20 17.5C20 17.3441 19.8718 16.9653 19.0876 16.4833C18.3454 16.027 17.2219 15.6184 15.8103 15.3456C15.268 15.2408 14.9134 14.7163 15.0182 14.1741C15.123 13.6318 15.6475 13.2772 16.1897 13.382C17.7415 13.6819 19.118 14.1543 20.135 14.7794C21.1099 15.3787 22 16.2817 22 17.5C22 18.3576 21.5491 19.0656 20.9696 19.5985C20.3909 20.1306 19.6087 20.5638 18.7264 20.9069C16.9555 21.5956 14.5771 22 12 22C9.42296 22 7.04448 21.5956 5.27359 20.9069C4.39133 20.5638 3.60913 20.1306 3.03043 19.5985C2.45088 19.0656 2 18.3576 2 17.5C2 16.2817 2.8901 15.3787 3.86502 14.7794C4.88197 14.1543 6.25843 13.6819 7.81026 13.382C8.35251 13.2772 8.87704 13.6318 8.98183 14.1741Z",fill:"currentColor"})}),Vt=e=>V("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"currentColor",...e,children:V("path",{d:"M14.5321 18.4159L19.0209 5.69756C19.3005 4.90533 18.5376 4.14239 17.7453 4.422L5.02696 8.91084C4.18269 9.20882 4.12559 10.381 4.93691 10.7597L9.88904 13.0707C10.1019 13.17 10.2729 13.341 10.3722 13.5539L12.6832 18.506C13.0619 19.3173 14.2341 19.2602 14.5321 18.4159Z",fill:"currentColor"})}),Yt=e=>V("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"currentColor",...e,children:V("path",{d:"M2 5.57143C2 3.59898 3.59898 2 5.57143 2H8.625C9.0287 2 9.39281 2.24274 9.54808 2.61538L11.4231 7.11538C11.5744 7.47863 11.4987 7.89686 11.2295 8.18394L9.82741 9.67954C10.9044 11.7563 12.2732 13.2047 14.3016 14.2842L15.7929 12.7929C16.0794 12.5064 16.5106 12.4211 16.8846 12.5769L21.3846 14.4519C21.7573 14.6072 22 14.9713 22 15.375V18.4286C22 20.401 20.401 22 18.4286 22C9.35532 22 2 14.6447 2 5.57143ZM5.57143 4C4.70355 4 4 4.70355 4 5.57143C4 13.5401 10.4599 20 18.4286 20C19.2964 20 20 19.2964 20 18.4286V16.0417L16.7336 14.6807L15.2071 16.2071C14.9098 16.5044 14.4582 16.584 14.0771 16.4062C11.0315 14.9849 9.12076 12.9271 7.71882 9.92289C7.54598 9.55251 7.61592 9.11423 7.89546 8.81606L9.32824 7.28777L7.95833 4H5.57143Z",fill:"currentColor"})}),Xt=e=>V("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"currentColor",...e,children:V("path",{fillRule:"evenodd",d:"M12 5a1 1 0 0 1 1 1v5h5a1 1 0 1 1 0 2h-5v5a1 1 0 1 1-2 0v-5H6a1 1 0 1 1 0-2h5V6a1 1 0 0 1 1-1Z",clipRule:"evenodd"})}),Kt=e=>V("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"currentColor",...e,children:V("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.96751 2.23646C10.86 0.652956 13.1403 0.652948 14.0329 2.23645L16.169 6.02623C16.2165 6.11062 16.2984 6.17014 16.3934 6.1893L20.6578 7.04973C22.4396 7.40924 23.1442 9.57795 21.914 10.9161L18.9698 14.1188C18.9043 14.1901 18.873 14.2864 18.8841 14.3826L19.3836 18.7042C19.5922 20.5099 17.7474 21.8502 16.0946 21.0937L12.1389 19.2833C12.0508 19.243 11.9496 19.243 11.8615 19.2833L7.90578 21.0937C6.25295 21.8502 4.40814 20.5099 4.61683 18.7042L5.11628 14.3826C5.1274 14.2864 5.09611 14.1901 5.03054 14.1188L2.08634 10.9161C0.856146 9.57795 1.56079 7.40924 3.34261 7.04973L7.60698 6.1893C7.70194 6.17014 7.78387 6.11062 7.83143 6.02623L9.96751 2.23646ZM12.2906 3.21849C12.1631 2.99228 11.8373 2.99227 11.7098 3.21849L9.57373 7.00826C9.24076 7.59901 8.66727 8.01567 8.00255 8.1498L3.73817 9.01022C3.48363 9.06158 3.38297 9.37139 3.55871 9.56256L6.50291 12.7652C6.96185 13.2644 7.18091 13.9386 7.10305 14.6122L6.6036 18.9338C6.57379 19.1917 6.83733 19.3832 7.07345 19.2751L11.0291 17.4647C11.6458 17.1825 12.3546 17.1825 12.9712 17.4647L16.9269 19.2751C17.1631 19.3832 17.4266 19.1917 17.3968 18.9338L16.8973 14.6122C16.8195 13.9386 17.0385 13.2644 17.4975 12.7652L20.4417 9.56256C20.6174 9.3714 20.5168 9.06158 20.2622 9.01022L15.9978 8.1498C15.3331 8.01567 14.7596 7.59901 14.4266 7.00826L12.2906 3.21849Z",fill:"currentColor"})});function Qt({onRequestFullscreen:e,displayMode:t}){const n="fullscreen"===t;return V("button",{className:"fullscreen-btn",onClick:e,title:n?"Exit fullscreen":"Enter fullscreen","aria-label":n?"Exit fullscreen":"Enter fullscreen",children:V(n?Ft:Ut,{width:16,height:16})})}function Gt({direction:e,className:t,disabled:n,...o}){const r="previous"===e,i=r?"Previous":"Next";return V("button",{type:"button",className:`inline-flex h-8 min-w-[88px] items-center justify-center gap-1.5 rounded-full border border-[var(--color-border-secondary-outline)] bg-transparent px-3 text-[13px] font-medium text-[var(--color-text-secondary-outline)] transition-colors duration-150 ease-out ${n?"cursor-not-allowed border-[var(--color-border-disabled)] text-[var(--color-text-disabled)]":"hover:bg-[var(--color-background-secondary-outline-hover)] hover:text-[var(--color-text-secondary-outline-hover)] active:bg-[var(--color-background-secondary-outline-active)]"}${t?` ${t}`:""}`,disabled:n,...o,children:[r&&V(Zt,{width:14,height:14}),i,!r&&V(Wt,{width:14,height:14})]})}function Jt({size:e,strokeWidth:t}){return V("span",{className:"inline-block animate-spin rounded-full border-solid border-[var(--grid-line-strong)] border-t-[var(--accent)]",style:{width:e,height:e,borderWidth:t},"aria-hidden":"true"})}function en({variant:e,brandSub:t,query:n,countLabel:o,isInitialLoading:r,loadingQuery:i,error:a,infoBanner:l,hasData:s,isEmpty:c,emptyTitle:u,emptyDescription:d,noResultsTitle:_="No results",noResultsDescription:h="Try a different query.",children:p,pagination:f,context:m,hostContext:v,displayMode:g,requestDisplayMode:y}){const w=v?.safeAreaInsets,b={paddingTop:w?.top,paddingRight:w?.right,paddingBottom:w?.bottom,paddingLeft:w?.left,marginBottom:w?.bottom},C=f?` · Page ${f.pageNumber}`:"",M=m&&m.count>0?` · ${m.count} in context`:"",x=Boolean(f?.isLoading&&s&&!c),S=Boolean(m?.addAllDisabled||x),E=S?"cursor-not-allowed border-[var(--color-border-disabled)] bg-[var(--color-background-disabled)] text-[var(--color-text-disabled)]":"hover:bg-[var(--color-background-secondary-soft-alpha-hover)] active:bg-[var(--color-background-secondary-soft-alpha-active)]";return V("main",{className:`app ${e}-app`,style:b,"data-display-mode":g,children:[V("header",{className:"header",children:[V("div",{className:"brand",children:[V("span",{className:"brand-mark",children:"Brave"}),V("span",{className:"brand-sub",children:t})]}),V("div",{className:"header-right",children:[V("div",{className:"meta",children:[V("div",{className:"term",children:s?n:r&&i?i:`Run brave_${e}_search to see results`}),V("div",{className:"count",children:[s?o:r?"Searching...":"Awaiting tool output",s&&f&&C,M]})]}),V("div",{className:"header-actions",children:[m&&V("button",{type:"button",className:`inline-flex h-8 items-center justify-center rounded-full border border-transparent bg-[var(--color-background-secondary-soft-alpha)] px-3 text-[13px] font-medium text-[var(--color-text-secondary-soft)] transition-colors duration-150 ease-out ${E}`,onClick:m.onAddAll,disabled:S,children:"Add All"}),y&&V(Qt,{onRequestFullscreen:()=>{y&&y("fullscreen"===g?"inline":"fullscreen")},displayMode:g})]})]})]}),a&&V("div",{className:"error-banner",children:[V("strong",{children:"Error:"})," ",a]}),l&&V("div",{className:"info-banner",children:l}),r&&!s&&V("section",{className:"loading-state",children:[V(Jt,{size:32,strokeWidth:3}),V("p",{children:["Searching for"," ",V("strong",{children:i||"..."})]})]}),!s&&!r&&V("section",{className:"empty-state",children:[V("h2",{children:u}),V("p",{children:d})]}),s&&c&&!a&&V("section",{className:"empty-state",children:[V("h2",{children:_}),V("p",{children:h})]}),s&&!c&&V("section",{className:"results-region"+(x?" results-region--loading":""),"aria-busy":x,children:[V("div",{className:"results-content"+(x?" results-content--locked":""),inert:x,children:p}),x?V("div",{className:"results-loading-overlay",role:"status","aria-label":"Loading page results",children:V("div",{className:"results-loading-content",children:[V(Jt,{size:28,strokeWidth:3}),V("span",{children:"Loading results..."})]})}):null]}),f&&s&&!c&&V("footer",{className:"app-footer",style:void 0,children:V("nav",{className:"pagination","aria-label":"Pagination",children:[V(Gt,{direction:"previous",onClick:f.onPrevious,disabled:!f.hasPrevious||f.isLoading,"aria-label":"Previous page"}),V("span",{className:"pagination-info",children:f.isLoading?"Loading...":`Page ${f.pageNumber}`}),V(Gt,{direction:"next",onClick:f.onNext,disabled:!f.hasNext||f.isLoading,"aria-label":"Next page"})]})})]})}const tn=Ve(()=>Ot(()=>Promise.resolve().then(()=>yn),void 0,import.meta.url));function nn({item:e,index:t,isSelected:n,onSelect:o,onOpenLink:r,isInContext:i,onToggleContext:a}){return V("div",{className:`local-card ${n?"local-card--selected":""} ${i?"local-card--in-context":""}`,style:{animationDelay:50*t+"ms"},children:[V("div",{className:"local-card-header",children:[V("button",{type:"button",className:"local-card-trigger",onClick:o,"aria-expanded":n,"aria-label":`${n?"Collapse details for":"Expand details for"} ${e.name}`,children:[V("div",{className:"local-card-number",children:t+1}),V("div",{className:"local-card-content",children:[V("h3",{className:"local-card-name",children:e.name}),V("div",{className:"local-card-rating",children:[void 0!==e.rating&&V(b,{children:[V(Kt,{width:14,height:14,className:"local-star"}),V("span",{className:"local-rating-value",children:e.rating.toFixed(1)}),e.reviewCount&&V("span",{className:"local-review-count",children:["(",e.reviewCount,")"]})]}),e.priceRange&&V("span",{className:"local-price",children:e.priceRange}),e.cuisine&&e.cuisine.length>0&&V("span",{className:"local-cuisine",children:e.cuisine.slice(0,2).join(", ")})]}),e.phone&&V("div",{className:"local-card-phone",children:[V(Yt,{width:12,height:12}),V("span",{children:e.phone})]}),V("div",{className:"local-card-address",children:[V(qt,{width:12,height:12}),V("span",{children:e.address})]}),e.todayHours&&V("div",{className:"local-card-hours",children:[V(Bt,{width:12,height:12}),V("span",{children:["Today:",e.todayHours]})]})]})]}),V("div",{className:"local-card-actions",children:[e.phone&&V("button",{className:"local-action-btn",onClick:t=>{t.stopPropagation(),e.phone&&r(`tel:${e.phone}`)},title:"Call",children:V(Yt,{width:16,height:16})}),e.coordinates&&V("button",{className:"local-action-btn",onClick:t=>{if(t.stopPropagation(),e.coordinates){const[t,n]=e.coordinates;r(`https://www.google.com/maps/dir/?api=1&destination=${t},${n}`)}},title:"Directions",children:V(Vt,{width:16,height:16})}),a&&V("button",{className:"local-action-btn local-context-btn "+(i?"local-context-btn--active":""),onClick:t=>{t.stopPropagation(),a&&a(e)},title:i?"In context":"Add to context",children:V(i?$t:Xt,{width:16,height:16})}),V("button",{type:"button",className:"local-action-btn local-expand-btn",onClick:e=>{e.stopPropagation(),o()},"aria-expanded":n,"aria-label":n?"Collapse details":"Expand details",title:n?"Collapse details":"Expand details",children:V(n?Ht:It,{width:16,height:16})})]})]}),n&&V("div",{className:"local-card-details",children:[e.email&&V("div",{className:"local-detail-row",children:[V(jt,{width:14,height:14}),V("button",{className:"local-detail-link",onClick:t=>{t.stopPropagation(),e.email&&r(`mailto:${e.email}`)},children:e.email})]}),e.weeklyHours&&V("div",{className:"local-detail-section",children:[V("div",{className:"local-detail-label",children:"Hours"}),V("pre",{className:"local-weekly-hours",children:e.weeklyHours})]}),e.description&&V("div",{className:"local-detail-section",children:[V("div",{className:"local-detail-label",children:"About"}),V("div",{className:"local-description",children:V(je,{fallback:V("p",{children:"Loading details..."}),children:V(tn,{description:e.description})})})]})]})]})}const on=Ve(()=>Ot(()=>Promise.resolve().then(()=>qn),void 0,import.meta.url).then(e=>({default:e.LocalMap}))),rn=[];function an({toolResult:e,hostContext:t,openLink:n,sendLog:o,displayMode:r,requestDisplayMode:i,onLoadPage:a,isLoading:l,isInitialLoading:s,loadingQuery:c,contextPlaces:u=rn,onContextChange:d}){const[_,h]=se(null),[p,f]=se(!1),m=_e(null),v=l??p,g=e?._meta?.structuredContent??e?.structuredContent,y=g?.items??[],w=g?.error,b=g?.fallbackToWeb,C=Boolean(g),M=g?.offset??0,x=g?.returnedCount??y.length,S=g?.pageSize??g?.count??y.length,E=M>0,k=M<9&&y.length>0,L=Boolean(a)&&C&&!w&&!b,T=new Set(u.map(e=>`${e.name}-${e.address}`)),P=e=>T.has(`${e.name}-${e.address}`),N=Boolean(d),D=async e=>{try{const{isError:t}=await n({url:e});t&&await o({level:"warning",data:`Open link rejected: ${e}`})}catch(t){await o({level:"error",data:`Open link failed: ${t instanceof Error?t.message:String(t)}`})}},z=e=>{if(!d)return;const t={name:e.name,address:e.address,phone:e.phone,rating:e.rating,coordinates:e.coordinates};P(e)?d(u.filter(t=>`${t.name}-${t.address}`!=`${e.name}-${e.address}`)):d([...u,t])},R=M+1,A=y.some(e=>e.coordinates)||u.some(e=>e.coordinates);return V(en,{variant:"local",brandSub:"Local Search",query:g?.query,countLabel:`${x}/${S} PLACES`,error:w,infoBanner:b?"No local results found. Showing web search results instead.":void 0,isInitialLoading:s,loadingQuery:c,hasData:C,isEmpty:0===y.length&&!b,emptyTitle:"Local Search",emptyDescription:"Ask to search for local businesses and places.",noResultsTitle:"No places found",noResultsDescription:"Try a different location or query.",hostContext:t,displayMode:r,requestDisplayMode:i,pagination:L?{pageNumber:R,hasPrevious:E,hasNext:k,isLoading:v,onPrevious:async()=>{if(a&&!v&&E){f(!0);try{await a(M-1)}finally{f(!1)}}},onNext:async()=>{if(a&&!v&&k){f(!0);try{await a(M+1)}finally{f(!1)}}}}:void 0,context:N&&y.length>0?{count:u.length,onAddAll:()=>{if(!d)return;const e=y.filter(e=>!P(e)).map(e=>({name:e.name,address:e.address,phone:e.phone,rating:e.rating,coordinates:e.coordinates}));d([...u,...e])},addAllDisabled:y.every(e=>P(e))}:void 0,children:V("div",{className:"local-split-view",children:[V("div",{className:"local-list",ref:m,children:y.map((e,t)=>V(nn,{item:e,index:t,isSelected:_===t,onSelect:()=>h(e=>e===t?null:t),onOpenLink:D,isInContext:P(e),onToggleContext:N?z:void 0},e.id||t))}),V("div",{className:"local-map-wrapper",children:A?V(je,{fallback:V("div",{className:"local-map-empty",children:V("p",{children:"Loading map..."})}),children:V(on,{items:y,selectedIndex:_,onSelectIndex:e=>{if(h(e),m.current){const t=m.current.querySelectorAll(".local-card");t[e]&&t[e].scrollIntoView({behavior:"smooth",block:"nearest"})}},displayMode:r,contextPlaces:u})}):V("div",{className:"local-map-empty",children:V("p",{children:"No location data available"})})})]})})}function ln(){Rt();const e=Dt("toolInput"),t=Dt("toolOutput"),n=Dt("toolResponseMetadata"),o=n?.structuredContent??t?.structuredContent,[r,i]=se([]),{displayMode:a,hostContext:l,openLink:s,requestDisplayMode:c,noopLog:u,canCallTool:d,canSetWidgetState:_,callTool:h,setWidgetState:p,currentData:f,isLoading:m,setIsLoading:v,setPagedOutput:g}=function({toolInputQuery:e=null,initialData:t=null}={}){const n=Dt("displayMode"),o=Dt("safeArea"),[r,i]=se(null),[a,l]=se(!1),s=pe(()=>{const e=o?.insets;return e?{safeAreaInsets:{top:e.top??0,right:e.right??0,bottom:e.bottom??0,left:e.left??0}}:null},[o]),c=e??t?.query??null,u=r&&c&&r.query===c?r:t;ue(()=>{if(r&&c&&r.query!==c){const e=setTimeout(()=>{i(null),l(!1)},0);return()=>clearTimeout(e)}},[c,r]);const d=fe(async({url:e})=>{try{return window.openai?.openExternal&&await window.openai.openExternal({href:e}),{isError:!1}}catch{return{isError:!0}}},[]),_=fe(async e=>{if(window.openai?.requestDisplayMode)return await window.openai.requestDisplayMode({mode:e}),e},[]),h=fe(async()=>{},[]),p=fe(async(e,t)=>window.openai?.callTool?window.openai.callTool(e,t):null,[]),f=fe(e=>{window.openai?.setWidgetState?.(e)},[]);return{displayMode:n,hostContext:s,openLink:d,requestDisplayMode:_,noopLog:h,canCallTool:Boolean(window.openai?.callTool),canSetWidgetState:Boolean(window.openai?.setWidgetState),canRequestDisplayMode:Boolean(window.openai?.requestDisplayMode),callTool:p,setWidgetState:f,currentData:u,hostQuery:c,isLoading:a,setIsLoading:l,setPagedOutput:i}}({toolInputQuery:e?.query??null,initialData:o}),y=fe(async e=>{if(f){v(!0);try{const t=function(e){if(!e||"object"!=typeof e)return null;const t=e;return t.meta?.structuredContent??t._meta?.structuredContent??t.structuredContent??null}(await h("brave_local_search",{query:f.query,count:f.pageSize??f.count??10,offset:e}));t&&g(t)}catch(t){console.error("Failed to load page:",t)}finally{v(!1)}}},[h,f,v,g]),w=fe(e=>{i(e),p({modelContent:{selectedPlaces:e.map((e,t)=>({index:t+1,name:e.name,address:e.address,phone:e.phone,rating:e.rating})),count:e.length}})},[p]),b=Boolean(f),C=null!==e&&!b,M=e?.query;return V(an,{toolInputs:null,toolInputsPartial:null,toolResult:f?{structuredContent:f}:null,hostContext:l,openLink:s,sendLog:u,displayMode:a??"inline",requestDisplayMode:c,onLoadPage:d?y:void 0,isLoading:m,isInitialLoading:C,loadingQuery:M,contextPlaces:r,onContextChange:_?w:void 0})}var sn;(sn=document.getElementById("root"),{render:function(e){it(e,sn)},unmount:function(){Ct(sn)}}).render(V(Et,{children:V(ln,{})}));var cn={"":["<em>","</em>"],_:["<strong>","</strong>"],"*":["<strong>","</strong>"],"~":["<s>","</s>"],"\n":["<br />"]," ":["<br />"],"-":["<hr />"]};function un(e){return e.replace(RegExp("^"+(e.match(/^(\t| )+/)||"")[0],"gm"),"")}function dn(e){return(e+"").replace(/"/g,""").replace(/</g,"<").replace(/>/g,">")}function _n(e,t){var n,o,r,i,a,l=/((?:^|\n+)(?:\n---+|\* \*(?: \*)+)\n)|(?:^``