"use strict";exports.id=1433,exports.ids=[1433],exports.modules={13973:(a,b,c)=>{c.d(b,{default:()=>e.a});var d=c(33540),e=c.n(d)},24207:(a,b,c)=>{Object.defineProperty(b,"__esModule",{value:!0}),Object.defineProperty(b,"BailoutToCSR",{enumerable:!0,get:function(){return e}});let d=c(84339);function e(a){let{reason:b,children:c}=a;throw Object.defineProperty(new d.BailoutToCSRError(b),"__NEXT_ERROR_CODE",{value:"E394",enumerable:!1,configurable:!0})}},33540:(a,b,c)=>{Object.defineProperty(b,"__esModule",{value:!0}),Object.defineProperty(b,"default",{enumerable:!0,get:function(){return e}});let d=c(35288)._(c(43972));function e(a,b){var c;let e={};"function"==typeof a&&(e.loader=a);let f={...e,...b};return(0,d.default)({...f,modules:null==(c=f.loadableGenerated)?void 0:c.modules})}("function"==typeof b.default||"object"==typeof b.default&&null!==b.default)&&void 0===b.default.__esModule&&(Object.defineProperty(b.default,"__esModule",{value:!0}),Object.assign(b.default,b),a.exports=b.default)},39693:(a,b,c)=>{c.d(b,{Jw:()=>i,MZ:()=>g,o0:()=>e,qE:()=>h,sV:()=>f,x2:()=>j});let d=new Set(["html","document","mines_investor_presentation","mines_project_package"]);function e(a){return d.has(a)}function f(a){let b=`<base target="_self"><script>(function(){
  function classify(url){
    // Returns: 'anchor' | 'external' | 'internal' | 'ignore'
    if (!url) return 'ignore';
    var s = String(url).trim();
    if (!s) return 'ignore';
    var lower = s.toLowerCase();
    if (lower === '#' || lower.startsWith('javascript:') || lower.startsWith('data:') || lower.startsWith('blob:')) return 'ignore';
    if (s.startsWith('#')) return 'anchor';
    if (lower.startsWith('mailto:') || lower.startsWith('tel:')) return 'external';
    var parentOrigin = '';
    try { if (window.top && window.top.location) parentOrigin = window.top.location.origin; } catch(e){}
    try {
      var u = new URL(s, window.location.href);
      // Anything resolving to the parent app's origin would load madarX inside the artifact.
      if (parentOrigin && u.origin === parentOrigin) return 'internal';
      if (/^https?:$/i.test(u.protocol)) return 'external';
    } catch(e){}
    // Relative paths like "about" or "/foo" resolve against the iframe (parent origin) — block.
    if (/^(\\/|\\.|[a-z0-9_-]+\\/?$)/i.test(s)) return 'internal';
    return 'ignore';
  }
  function scrollToAnchor(href){
    var id = href.replace(/^#/, '');
    if (!id) return false;
    var el = document.getElementById(id);
    if (!el) {
      try {
        var safeId = window.CSS && CSS.escape ? CSS.escape(id) : id.replace(/["\\\\]/g, '\\\\$&');
        el = document.querySelector('[name="' + safeId + '"]');
      } catch(e){}
    }
    if (el) { el.scrollIntoView({behavior:'smooth'}); return true; }
    return false;
  }

  function postToParent(payload){
    try {
      if (window.parent && window.parent !== window) {
        window.parent.postMessage(payload, '*');
        return true;
      }
    } catch(e){}
    return false;
  }

  // madarX action bridge: elements marked with data-madarx-action="prompt" (and a
  // data-prompt="…" payload) forward to the parent dashboard which sends the prompt
  // into the chat as if the user typed it. Also recognises href="madarx:prompt:…".
  function handleMadarxAction(target){
    if (!target || !target.closest) return false;
    var el = target.closest('[data-madarx-action], a[href^="madarx:"], a[href^="madarx://"]');
    if (!el) return false;
    var action = el.getAttribute('data-madarx-action') || '';
    var payload = el.getAttribute('data-prompt') || el.getAttribute('data-madarx-prompt') || '';
    if (!action) {
      var href = el.getAttribute('href') || '';
      // Accept "madarx:prompt:<text>" or "madarx://prompt?text=<text>"
      var m = href.match(/^madarx:(?:\\/\\/)?([a-z_-]+)[:?](.*)$/i);
      if (m) {
        action = m[1];
        if (m[2].startsWith('text=')) {
          try { payload = decodeURIComponent(m[2].slice(5)); } catch(e){ payload = m[2].slice(5); }
        } else {
          try { payload = decodeURIComponent(m[2]); } catch(e){ payload = m[2]; }
        }
      }
    }
    if (action === 'prompt' && payload) {
      postToParent({ type: 'madarx:prompt', text: String(payload) });
      return true;
    }
    return false;
  }

  // Fallback for artifacts generated before the data-madarx-action contract
  // existed: any CTA-styled button or anchor with no real href (href="#" or
  // empty) is treated as a confirmation of whatever the artifact just proposed.
  // The button's visible text is sent into the chat — the prior turn's
  // proposal is in context, so the LLM knows what "yes, X" means.
  function handleCtaFallback(target){
    if (!target || !target.closest) return false;
    var el = target.closest('button, a, [role="button"]');
    if (!el) return false;
    if (el.hasAttribute('data-madarx-action')) return false;
    if (el.tagName === 'A') {
      var h = (el.getAttribute('href') || '').trim();
      if (h && h !== '#' && !/^javascript:/i.test(h)) return false;
    }
    var cls = ((el.className && el.className.baseVal) || el.className || '').toString().toLowerCase();
    var looksLikeCta = /\\b(cta|btn|button|primary|action|confirm|create|submit)\\b/.test(cls);
    if (!looksLikeCta) return false;
    // Strip trailing arrows/glyphs the LLM tends to add ("→", "›", "\xbb").
    var txt = (el.textContent || '').replace(/[\\u2190-\\u21FF\\u2794\\u279C\\u279E\\u27A1]/g, '').replace(/\\s+/g, ' ').trim();
    if (txt.length < 3 || txt.length > 100) return false;
    postToParent({ type: 'madarx:prompt', text: 'Yes — ' + txt.toLowerCase() });
    return true;
  }

  // 1) Link clicks. madarX action elements forward to the parent; anchors scroll
  // inside the iframe; external links navigate the iframe itself (no new tab);
  // same-origin/relative links are ignored so the parent app is never loaded
  // inside the artifact.
  document.addEventListener('click', function(ev){
    if (handleMadarxAction(ev.target)) {
      ev.preventDefault();
      ev.stopImmediatePropagation();
      return;
    }
    if (handleCtaFallback(ev.target)) {
      ev.preventDefault();
      ev.stopImmediatePropagation();
      return;
    }
    var a = ev.target && ev.target.closest ? ev.target.closest('a[href]') : null;
    if (!a) return;
    var href = a.getAttribute('href') || '';
    var kind = classify(href);
    if (kind === 'anchor') {
      ev.preventDefault();
      ev.stopImmediatePropagation();
      scrollToAnchor(href);
      return;
    }
    if (kind === 'external') {
      ev.preventDefault();
      ev.stopImmediatePropagation();
      try { window.location.href = href; } catch(e){}
      return;
    }
    // 'internal' or 'ignore' — block navigation entirely.
    ev.preventDefault();
    ev.stopImmediatePropagation();
  }, true);

  // 2) Forms — only submit when the action is a real external URL.
  document.addEventListener('submit', function(ev){
    var f = ev.target;
    var act = f && f.getAttribute ? f.getAttribute('action') : '';
    var kind = classify(act || '');
    if (kind === 'external') {
      ev.preventDefault();
      ev.stopImmediatePropagation();
      try { window.location.href = act; } catch(e){}
    } else {
      ev.preventDefault();
      ev.stopImmediatePropagation();
    }
  }, true);

  // 3) Window.open / location overrides — only honor true external URLs.
  try {
    window.open = function(u){
      if (classify(u) === 'external') { try { window.location.href = u; } catch(e){} }
      return null;
    };
  } catch(e){}
})();</script>`;if(!a)return b;let c=a.match(/<head[^>]*>/i);if(c){let d=c.index+c[0].length;return a.slice(0,d)+b+a.slice(d)}let d=a.indexOf("<body");return -1!==d?a.slice(0,d)+b+a.slice(d):b+a}function g(a){let b=a.target;try{let a=b.contentDocument;if(!a?.body)return;a.documentElement.style.overscrollBehavior="none",a.body.style.overscrollBehavior="contain";let d=a.createElement("style");function c(){let b=a.defaultView;b&&a.querySelectorAll("body *").forEach(a=>{if(a.closest&&a.closest('[class*="slide" i],[class*="carousel" i],[class*="deck" i],[class*="presentation" i],[data-slide],[data-page-index],[role="region"][aria-roledescription="slide"],.swiper,.slick,.glide,.flickity,.reveal,.tab-panel,[role="tabpanel"],[role="dialog"]'))return;let c=b.getComputedStyle(a);"0"===c.opacity&&a.style.setProperty("opacity","1","important"),"hidden"===c.visibility&&"INPUT"!==a.tagName&&"SELECT"!==a.tagName&&a.style.setProperty("visibility","visible","important")})}d.textContent=`
        html, body {
          overscroll-behavior: none !important;
        }
        /* The dashboard artifact window already renders the title in its chrome
           bar, so the document's own title heading would show it twice. Hide the
           in-document title here only — standalone/raw/download views keep it. */
        main.doc > header.doc-header > h1.doc-title {
          display: none !important;
        }
        [data-aos],[data-sal],[data-scroll],[data-animate],[data-animation],
        [data-wow],[data-sr],[data-gsap],
        .fade-in,.fade-up,.fade-down,.fade-left,.fade-right,
        .slide-in,.slide-up,.slide-down,.slide-left,.slide-right,
        .scroll-reveal,.reveal-item,.animate,.animated-item,
        .scroll-hidden,.hidden-until-visible,.will-animate,
        .hero__content,.hero-content,.section-content {
          opacity: 1 !important;
          transform: none !important;
          visibility: visible !important;
          transition: none !important;
          animation: none !important;
        }
      `,a.head?.appendChild(d),c(),setTimeout(c,300),a.__madarxWheelContained||(a.__madarxWheelContained=!0,a.addEventListener("wheel",a=>a.stopPropagation(),{capture:!0,passive:!0}))}catch{}}function h(a){a.stopPropagation()}function i(a){return b=>{if(b&&"function"==typeof a)try{a(b.contentWindow)}catch{}}}function j(a){let b=a.currentTarget.parentElement?.querySelector("iframe");if(b)try{let{dx:c,dy:d}=function(a,b){let c=1===a.deltaMode?16:2===a.deltaMode?b.clientHeight:1;return{dx:a.deltaX*c,dy:a.deltaY*c}}(a,b);((function(a,b,c,d){let e=a.contentDocument,f=e?.defaultView;if(!e||!f)return!1;for(let a of[...b.filter(a=>a&&1===a.nodeType),e.scrollingElement,e.documentElement,e.body])if(a&&"number"==typeof a.scrollTop&&function(a,b,c,d,e){if(b===e.scrollingElement||b===e.documentElement||b===e.body)return b.scrollHeight>b.clientHeight||b.scrollWidth>b.clientWidth;let f=a.getComputedStyle(b),g=/(auto|scroll|overlay)/.test(f.overflowY)&&b.scrollHeight>b.clientHeight,h=/(auto|scroll|overlay)/.test(f.overflowX)&&b.scrollWidth>b.clientWidth;return 0!==d&&g||0!==c&&h}(f,a,c,d,e)&&function(a,b,c){let d=a.scrollLeft,e=a.scrollTop;return a.scrollLeft+=b,a.scrollTop+=c,a.scrollLeft!==d||a.scrollTop!==e}(a,c,d))return!0;let g=e.scrollingElement||e.documentElement||e.body;if(!g)return!1;let h=g.scrollLeft,i=g.scrollTop;return f.scrollBy({left:c,top:d,behavior:"auto"}),g.scrollLeft!==h||g.scrollTop!==i})(b,[],c,d)||function(a){let b=a.contentDocument,c=b?.scrollingElement||b?.documentElement||b?.body;return!!(c&&(c.scrollHeight>c.clientHeight||c.scrollWidth>c.clientWidth))}(b))&&(a.preventDefault(),a.stopPropagation())}catch{}}},43972:(a,b,c)=>{Object.defineProperty(b,"__esModule",{value:!0}),Object.defineProperty(b,"default",{enumerable:!0,get:function(){return j}});let d=c(21124),e=c(38301),f=c(24207),g=c(52402);function h(a){return{default:a&&"default"in a?a.default:a}}let i={loader:()=>Promise.resolve(h(()=>null)),loading:null,ssr:!0},j=function(a){let b={...i,...a},c=(0,e.lazy)(()=>b.loader().then(h)),j=b.loading;function k(a){let h=j?(0,d.jsx)(j,{isLoading:!0,pastDelay:!0,error:null}):null,i=!b.ssr||!!b.loading,k=i?e.Suspense:e.Fragment,l=b.ssr?(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(g.PreloadChunks,{moduleIds:b.modules}),(0,d.jsx)(c,{...a})]}):(0,d.jsx)(f.BailoutToCSR,{reason:"next/dynamic",children:(0,d.jsx)(c,{...a})});return(0,d.jsx)(k,{...i?{fallback:h}:{},children:l})}return k.displayName="LoadableComponent",k}},52402:(a,b,c)=>{Object.defineProperty(b,"__esModule",{value:!0}),Object.defineProperty(b,"PreloadChunks",{enumerable:!0,get:function(){return h}});let d=c(21124),e=c(23312),f=c(29294),g=c(61348);function h(a){let{moduleIds:b}=a,c=f.workAsyncStorage.getStore();if(void 0===c)return null;let h=[];if(c.reactLoadableManifest&&b){let a=c.reactLoadableManifest;for(let c of b){if(!a[c])continue;let b=a[c].files;h.push(...b)}}return 0===h.length?null:(0,d.jsx)(d.Fragment,{children:h.map(a=>{let b=c.assetPrefix+"/_next/"+(0,g.encodeURIPath)(a);return a.endsWith(".css")?(0,d.jsx)("link",{precedence:"dynamic",href:b,rel:"stylesheet",as:"style"},a):((0,e.preload)(b,{as:"script",fetchPriority:"low"}),null)})})}},61348:(a,b)=>{function c(a){return a.split("/").map(a=>encodeURIComponent(a)).join("/")}Object.defineProperty(b,"__esModule",{value:!0}),Object.defineProperty(b,"encodeURIPath",{enumerable:!0,get:function(){return c}})}};