@lark-apaas/miaoda-coding-sdk 0.0.12-beta.0 → 0.0.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/design-runtime.dev.js +2 -2
- package/dist/design-runtime.js +2 -2
- package/dist/design-runtime.min.js +1 -1
- package/dist/doubao-runtime.dev.js +2 -2
- package/dist/doubao-runtime.js +2 -2
- package/dist/doubao-runtime.min.js +1 -1
- package/dist/runtime.dev.js +2 -2
- package/dist/runtime.js +2 -2
- package/dist/runtime.min.js +1 -1
- package/package.json +2 -2
|
@@ -519,7 +519,7 @@ var MiaodaRuntime = (() => {
|
|
|
519
519
|
return String(BigInt(msInt) * BigInt(1e6));
|
|
520
520
|
}
|
|
521
521
|
__name(toNanoString, "toNanoString");
|
|
522
|
-
var SDK_VERSION = "1.0.
|
|
522
|
+
var SDK_VERSION = "1.0.1";
|
|
523
523
|
function buildPayload(dataPoints, overrides) {
|
|
524
524
|
const defaultAttrs = getDefaultAttributes(overrides);
|
|
525
525
|
const nowNs = toNanoString(Date.now());
|
|
@@ -761,7 +761,7 @@ var MiaodaRuntime = (() => {
|
|
|
761
761
|
__name(initCreativePvTracking, "initCreativePvTracking");
|
|
762
762
|
|
|
763
763
|
// src/design-runtime.ts
|
|
764
|
-
var version = "0.0.12
|
|
764
|
+
var version = "0.0.12";
|
|
765
765
|
var name = "@lark-apaas/miaoda-coding-sdk";
|
|
766
766
|
if (!window.__CREATIVITY_RUNTIME__) {
|
|
767
767
|
window.__CREATIVITY_RUNTIME__ = true;
|
package/dist/design-runtime.js
CHANGED
|
@@ -519,7 +519,7 @@ var MiaodaRuntime = (() => {
|
|
|
519
519
|
return String(BigInt(msInt) * BigInt(1e6));
|
|
520
520
|
}
|
|
521
521
|
__name(toNanoString, "toNanoString");
|
|
522
|
-
var SDK_VERSION = "1.0.
|
|
522
|
+
var SDK_VERSION = "1.0.1";
|
|
523
523
|
function buildPayload(dataPoints, overrides) {
|
|
524
524
|
const defaultAttrs = getDefaultAttributes(overrides);
|
|
525
525
|
const nowNs = toNanoString(Date.now());
|
|
@@ -761,7 +761,7 @@ var MiaodaRuntime = (() => {
|
|
|
761
761
|
__name(initCreativePvTracking, "initCreativePvTracking");
|
|
762
762
|
|
|
763
763
|
// src/design-runtime.ts
|
|
764
|
-
var version = "0.0.12
|
|
764
|
+
var version = "0.0.12";
|
|
765
765
|
var name = "@lark-apaas/miaoda-coding-sdk";
|
|
766
766
|
if (!window.__CREATIVITY_RUNTIME__) {
|
|
767
767
|
window.__CREATIVITY_RUNTIME__ = true;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var MiaodaRuntime=(()=>{var y=Object.defineProperty;var U=Object.getOwnPropertyDescriptor;var V=Object.getOwnPropertyNames;var j=Object.prototype.hasOwnProperty;var i=(t,e)=>y(t,"name",{value:e,configurable:!0});var H=(t,e)=>{for(var r in e)y(t,r,{get:e[r],enumerable:!0})},K=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of V(e))!j.call(t,o)&&o!==r&&y(t,o,{get:()=>e[o],enumerable:!(n=U(e,o))||n.enumerable});return t};var J=t=>K(y({},"__esModule",{value:!0}),t);var _e={};H(_e,{name:()=>me,version:()=>he});var X=new Set(["text/babel","text/jsx"]),z=3e3,Y=15e3,q=1e3,G=20,P=!1;function A(){P||(P=!0,document.addEventListener("DOMContentLoaded",Q,{once:!0}))}i(A,"initCreativeBabelStages");function Q(){let t=W();if(!t.length)return;let e={fetchDur:0,transformDur:0,evalDur:0,externalCount:t.filter(o=>o.src).length},r={sent:!1,scriptsDone:!1,scriptsDoneAt:null,totalStart:null,renderStart:null,renderDur:null,takeover:!1,retries:0,hardTimer:null},n=window.Babel;if(!n||typeof n.transform!="function"||typeof n.disableScriptTags!="function"||e.externalCount>0&&typeof fetch!="function"){r.scriptsDone=!0,m(e,r);return}try{n.disableScriptTags()}catch{r.scriptsDone=!0,m(e,r);return}r.takeover=!0,r.totalStart=performance.now(),r.hardTimer=setTimeout(()=>m(e,r),Y),te(e,r),ee(n,t,e,r)}i(Q,"onDomContentLoaded");function W(){let t=document.getElementsByTagName("script"),e=[];for(let r=0;r<t.length;r++){let n=t[r];X.has((n.type||"").split(";")[0])&&e.push(n)}return e}i(W,"collectBabelScripts");function T(t,e){let r=t.getAttribute(e);return r===""?[]:r?r.split(",").map(n=>n.trim()):null}i(T,"attrList");function Z(t,e){var o,a,c;let r=t.getAttribute("data-type"),n={browsers:(o=T(t,"data-targets"))!=null?o:void 0};return r==="module"&&(n.esmodules="intersect"),{filename:e,presets:(a=T(t,"data-presets"))!=null?a:r==="module"?["react",["env",{modules:!1}]]:["react","env"],plugins:(c=T(t,"data-plugins"))!=null?c:["transform-class-properties","transform-object-rest-spread","transform-flow-strip-types"],sourceMaps:"inline",sourceFileName:e,targets:n}}i(Z,"buildOptions");function ee(t,e,r,n){let o=0,a=i((l,d)=>{var h;let p;if(l.src)p=l.src;else{let f=l.getAttribute("data-module");f?p=f:(o++,p=o===1?"Inline Babel script":`Inline Babel script (${o})`)}try{let f=performance.now(),g=t.transform(d,Z(l,p)),b=performance.now(),v=document.createElement("script"),w=l.getAttribute("data-type");w&&v.setAttribute("type",w),l.nonce&&(v.nonce=l.nonce),v.text=(h=g==null?void 0:g.code)!=null?h:"",document.head.appendChild(v),r.transformDur+=b-f,r.evalDur+=performance.now()-b}catch(f){console.error("[creative-babel-stages] script failed:",p,f)}},"runOne"),c=0;for(;c<e.length&&!e[c].src;)a(e[c],e[c].innerHTML),c++;if(c>=e.length){D(r,n);return}let u=e.slice(c),s=u.map(l=>{if(!l.src)return Promise.resolve(l.innerHTML);let d=performance.now();return fetch(l.src).then(p=>{if(!p.ok)throw new Error(`HTTP ${p.status}`);return p.text()}).then(p=>(r.fetchDur+=performance.now()-d,p))});(async()=>{for(let l=0;l<u.length;l++){let d=null;try{d=await s[l]}catch(p){console.error("[creative-babel-stages] load failed:",u[l].src,p);continue}a(u[l],d)}D(r,n)})()}i(ee,"runScripts");function te(t,e){let r=window.ReactDOM;if(!r)return;let n=i(c=>{if(e.renderStart===null){e.renderStart=performance.now();try{let u=new MutationObserver(()=>{u.disconnect(),e.renderDur=performance.now()-e.renderStart,e.scriptsDone&&m(t,e)});u.observe(c,{childList:!0,subtree:!0})}catch{}}},"observeCommit"),o=r.createRoot;typeof o=="function"&&(r.createRoot=(c,u)=>{let s=o.call(r,c,u),l=s.render.bind(s);return s.render=d=>(n(c),l(d)),s});let a=r.render;typeof a=="function"&&(r.render=(c,u,s)=>(n(u),a.call(r,c,u,s)))}i(te,"instrumentRender");function D(t,e){e.scriptsDone=!0,e.scriptsDoneAt=performance.now(),e.renderStart===null||e.renderDur!==null?m(t,e):setTimeout(()=>m(t,e),z)}i(D,"onScriptsDone");function m(t,e){var a;if(e.sent)return;let r=window.Slardar;if(!r){e.retries++<G&&setTimeout(()=>m(t,e),q);return}e.sent=!0,e.hardTimer!==null&&clearTimeout(e.hardTimer);let n=e.renderDur!==null&&e.renderStart!==null?e.renderStart+e.renderDur:(a=e.scriptsDoneAt)!=null?a:performance.now(),o=e.totalStart===null?0:Math.max(0,n-e.totalStart);r("sendEvent",{name:"creative_babel_stages",metrics:{babel_total_dur:Math.round(o),babel_fetch_dur:Math.round(t.fetchDur),babel_transform_dur:Math.round(t.transformDur),babel_eval_dur:Math.round(t.evalDur)},categories:{takeover:String(e.takeover),external:String(t.externalCount>0),render_observed:String(e.renderDur!==null)}})}i(m,"trySend");var re="https://lf3-short.ibytedapm.com/slardar/fe/sdk-web/browser.cn.js",R=!1;function M(){if(R)return;if(R=!0,window.Slardar){x();return}let t=document.createElement("script");t.src=re,t.onload=()=>{window.Slardar&&x()},t.onerror=()=>{},document.head.appendChild(t)}i(M,"initCreativePerf");function x(){var o,a,c;let t=window.Slardar;if(!t)return;let e=null;t("context.merge",{app_id:(o=window.__appId__)!=null?o:"",creative_type:(a=window.__creativeType__)!=null?a:"unknown",is_public:String((c=window.__isExternallyVisible__)!=null?c:!1)}),t("init",{bid:"apaas_miaoda",env:window.ENVIRONMENT||"online"}),t("start");try{new PerformanceObserver(u=>{for(let s of u.getEntries())if(s.name==="first-contentful-paint"){e=s.startTime,t("context.merge",{has_painted:"true"});break}}).observe({type:"paint",buffered:!0})}catch{}let r=!1,n=i(()=>{if(r||!window.Slardar)return;r=!0;let u=performance.getEntriesByType("resource"),s=performance.getEntriesByType("navigation")[0],l=e!=null?e:ne(),d={transfer_size:u.reduce((p,h)=>{var f;return p+((f=h.transferSize)!=null?f:0)},0)};s&&s.domContentLoadedEventEnd>=s.responseStart&&(d.ttfb_to_dom_ready_dur=Math.round(s.domContentLoadedEventEnd-s.responseStart)),s&&l!==null&&l>=s.domContentLoadedEventEnd&&(d.render_to_fcp_dur=Math.round(l-s.domContentLoadedEventEnd)),window.Slardar("sendEvent",{name:"creative_perf",metrics:d})},"send");window.addEventListener("load",()=>setTimeout(n,500)),setTimeout(n,15e3)}i(x,"bootstrap");function ne(){var r;let e=performance.getEntriesByType("paint").find(n=>n.name==="first-contentful-paint");return(r=e==null?void 0:e.startTime)!=null?r:null}i(ne,"getBufferedFcpStartTime");function k(){let t="inspector-id";document.addEventListener("DOMContentLoaded",()=>{let e=window.Babel;if(!e||!e.registerPlugin)return;let r=null,n=i(()=>{let a={},c=0;return document.querySelectorAll('script[type="text/babel"],script[type="text/jsx"]').forEach(u=>{let s=u.getAttribute("src");if(s){let l=s.split("?")[0],d=l.split("/").pop()||l;a[d]=d in a?"":l}else{c++;let l=c===1?"Inline Babel script":`Inline Babel script (${c})`;a[l]=u.getAttribute("data-filename")||`inline-${c-1}`}}),a},"buildFileMap");e.availablePlugins&&delete e.availablePlugins[t],e.registerPlugin(t,({types:a})=>({visitor:{JSXOpeningElement(c,u){let s=c.node;if(s.name&&s.name.type==="JSXMemberExpression")return;for(let E=0;E<s.attributes.length;E++){let S=s.attributes[E];if(S.type==="JSXAttribute"&&S.name&&S.name.name==="data-inspector-id")return}let l=u.file&&u.file.opts&&u.file.opts.filename||"?";r===null&&(r=n());let d=l.split("?")[0],p=d.split("/").pop()||d,h=r[l]||r[p]||d.replace(/^\/?[a-z][a-z0-9+.-]*:\/{1,2}[^/]+/i,"").replace(/^\/+/,"")||l,f=s.loc&&s.loc.start,g=f?f.line:0,b=f?f.column+1:0,v=s.name&&s.name.type==="JSXIdentifier"?s.name.name:h,w=`jsx:${h}:${v}:${g}:${b}`;s.attributes.push(a.jsxAttribute(a.jsxIdentifier("data-inspector-id"),a.stringLiteral(w)))}}}));let o="";try{let a=document.getElementById("__srcmap");if(a&&a.textContent){let c=JSON.parse(a.textContent),u=c==null?void 0:c.file;typeof u=="string"&&(o=u)}}catch{}document.querySelectorAll('script[type="text/babel"],script[type="text/jsx"]').forEach((a,c)=>{let u=a.getAttribute("data-plugins")||"";if(u.indexOf(t)<0&&a.setAttribute("data-plugins",u?`${u},${t}`:t),!a.hasAttribute("data-filename")){let s=o?`${o}#inline-${c}`:`inline-${c}`;a.setAttribute("data-filename",a.getAttribute("src")||s)}})})}i(k,"registerInspectorIdPlugin");function C(){if(typeof crypto!="undefined"&&crypto.getRandomValues){let e=new Uint8Array(8);return crypto.getRandomValues(e),Array.from(e).map(r=>r.toString(16).padStart(2,"0")).join("")}let t="";for(let e=0;e<16;e++)t+=Math.floor(Math.random()*16).toString(16);return t}i(C,"generateUUID");var L="x_sdk_device_id";function ie(){try{let t=localStorage.getItem(L);return t||(t=C(),localStorage.setItem(L,t)),t}catch{return C()}}i(ie,"getDeviceId");function oe(){let t=typeof navigator!="undefined"?navigator.userAgent:"";return t&&(/Android/i.test(t)&&/Mobile/i.test(t)||/iPhone|iPod/i.test(t)||/BlackBerry|IEMobile|Opera Mini/i.test(t))?"mobile":"desktop"}i(oe,"getDeviceType");var se="pageSessionID";function ae(){try{return new URLSearchParams(window.location.search).get(se)||""}catch{return""}}i(ae,"getPvId");function ce(t={}){let e=t.pvId||ae();return{app_id:window.appId||"",tenant_id:window.tenantId||"",user_id:window.userId||"",did:ie(),module:"app_web",app_env:"runtime",source_type:"user",device_type:oe(),release_commit_id:window.__RELEASE_COMMIT_ID__||"",...e?{pv_id:e}:{}}}i(ce,"getDefaultAttributes");function N(t){let e=Math.round(t);if(!Number.isFinite(e))throw new RangeError(`toNanoString: \u975E\u6CD5\u65F6\u95F4\u6233 ${t}`);return typeof BigInt!="function"?e===0?"0":`${e}000000`:String(BigInt(e)*BigInt(1e6))}i(N,"toNanoString");var le="1.0.2-beta.0";function ue(t,e){let r=ce(e),n=N(Date.now());return{metricsData:{resource:{attributes:{sdk_version:le,sdk_lang:"javascript",sdk_type:"client-frontend"}},metrics:[{name:"apaas_internal_metrics_pv_uv",description:"Count of page views",unit:"",scopeName:"apaas_internal_metrics_pv_uv",sum:{aggregationTemporality:1,isMonotonic:!0,dataPoints:t.map(o=>({attributes:{...r,url:o.url,path:o.path,referrer:o.referrer},startTimeUnixNano:N(o.timestampMs),timeUnixNano:n,asDouble:1}))}}]}}}i(ue,"buildPayload");function de(t,e,r={},n){if(e.length===0)return;let o;try{o=JSON.stringify(ue(e,n))}catch{return}try{fetch(t,{method:"POST",headers:{"Content-Type":"application/json","X-Suda-Csrf-Token":window.csrfToken||"",...r},body:o,keepalive:!0}).catch(()=>{})}catch{}}i(de,"sendPvData");var I="__APAAS_PV_TRACKER_STARTED__";function pe(){try{let t=window;return t[I]?!1:(t[I]=!0,!0)}catch{return!0}}i(pe,"claimPvReporting");function B(){try{window[I]=!1}catch{}}i(B,"releasePvReporting");var _,fe=(_=class{constructor(){this.started=!1,this.disposers=[],this.holdsPvReporting=!1,this.buffer=[]}static get instance(){return this._instance||(this._instance=new _),this._instance}start(e){var r;if(!this.started&&pe()){this.holdsPvReporting=!0,this.config=e,this.started=!0;try{this.listenRouteChanges(),this.registerLifecycleListeners();let n=(r=e.flushIntervalMs)!=null?r:1e4;this.flushTimer=setInterval(()=>this.flush(),n)}catch(n){throw this.started=!1,this.flushTimer&&(clearInterval(this.flushTimer),this.flushTimer=void 0),this.holdsPvReporting=!1,B(),n}}}shutdown(){this.flush(),this.flushTimer&&(clearInterval(this.flushTimer),this.flushTimer=void 0),this.firstFlushTimer&&(clearTimeout(this.firstFlushTimer),this.firstFlushTimer=void 0),this.started=!1;for(let e of this.disposers.splice(0))try{e()}catch{}this.holdsPvReporting&&(this.holdsPvReporting=!1,B())}pageKey(){let{origin:e,pathname:r,search:n}=window.location;return`${e}${r}${n}`}scheduleFirstFlush(){var e;let r=(e=this.config)==null?void 0:e.firstFlushDelayMs;r==null||this.firstFlushTimer||(this.firstFlushTimer=setTimeout(()=>this.flush(),r))}recordPv(){let e=this.pageKey();this.lastKey!==e&&(this.lastKey=e,this.buffer.push({url:window.location.href,path:window.location.pathname,referrer:document.referrer,timestampMs:Date.now()}),this.scheduleFirstFlush())}flush(){if(!this.config||this.buffer.length===0)return;let e=this.buffer.splice(0);de(this.config.collectorUrl,e,this.config.headers,{pvId:this.config.pvId})}listenRouteChanges(){this.recordPv();let e=i(()=>this.recordPv(),"onPopState");window.addEventListener("popstate",e),this.disposers.push(()=>window.removeEventListener("popstate",e)),this.patchHistory("pushState"),this.patchHistory("replaceState")}patchHistory(e){let r=history[e],n=i(()=>this.recordPv(),"recordPv");history[e]=function(...o){let a=r.apply(this,o);return n(),a},this.disposers.push(()=>{history[e]=r})}registerLifecycleListeners(){let e=i(()=>{document.visibilityState==="hidden"&&this.flush()},"onVisibilityChange");document.addEventListener("visibilitychange",e),this.disposers.push(()=>document.removeEventListener("visibilitychange",e));let r=i(()=>this.flush(),"onPageHide");window.addEventListener("pagehide",r),this.disposers.push(()=>window.removeEventListener("pagehide",r))}},i(_,"_PvTracker"),_),O=fe.instance;function F(){return window.appId||null}i(F,"getAppId");function $(){var e;let t=(e=F())!=null?e:"";O.start({collectorUrl:`/app/${t}/__runtime__/api/v1/observability/metrics/collect`,firstFlushDelayMs:1e3})}i($,"initCreativePvTracking");var he="0.0.12-beta.0",me="@lark-apaas/miaoda-coding-sdk";window.__CREATIVITY_RUNTIME__||(window.__CREATIVITY_RUNTIME__=!0,k(),M(),$(),A());return J(_e);})();
|
|
1
|
+
"use strict";var MiaodaRuntime=(()=>{var y=Object.defineProperty;var U=Object.getOwnPropertyDescriptor;var V=Object.getOwnPropertyNames;var j=Object.prototype.hasOwnProperty;var i=(t,e)=>y(t,"name",{value:e,configurable:!0});var H=(t,e)=>{for(var r in e)y(t,r,{get:e[r],enumerable:!0})},K=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of V(e))!j.call(t,o)&&o!==r&&y(t,o,{get:()=>e[o],enumerable:!(n=U(e,o))||n.enumerable});return t};var J=t=>K(y({},"__esModule",{value:!0}),t);var _e={};H(_e,{name:()=>me,version:()=>he});var X=new Set(["text/babel","text/jsx"]),z=3e3,Y=15e3,q=1e3,G=20,P=!1;function A(){P||(P=!0,document.addEventListener("DOMContentLoaded",Q,{once:!0}))}i(A,"initCreativeBabelStages");function Q(){let t=W();if(!t.length)return;let e={fetchDur:0,transformDur:0,evalDur:0,externalCount:t.filter(o=>o.src).length},r={sent:!1,scriptsDone:!1,scriptsDoneAt:null,totalStart:null,renderStart:null,renderDur:null,takeover:!1,retries:0,hardTimer:null},n=window.Babel;if(!n||typeof n.transform!="function"||typeof n.disableScriptTags!="function"||e.externalCount>0&&typeof fetch!="function"){r.scriptsDone=!0,m(e,r);return}try{n.disableScriptTags()}catch{r.scriptsDone=!0,m(e,r);return}r.takeover=!0,r.totalStart=performance.now(),r.hardTimer=setTimeout(()=>m(e,r),Y),te(e,r),ee(n,t,e,r)}i(Q,"onDomContentLoaded");function W(){let t=document.getElementsByTagName("script"),e=[];for(let r=0;r<t.length;r++){let n=t[r];X.has((n.type||"").split(";")[0])&&e.push(n)}return e}i(W,"collectBabelScripts");function T(t,e){let r=t.getAttribute(e);return r===""?[]:r?r.split(",").map(n=>n.trim()):null}i(T,"attrList");function Z(t,e){var o,a,c;let r=t.getAttribute("data-type"),n={browsers:(o=T(t,"data-targets"))!=null?o:void 0};return r==="module"&&(n.esmodules="intersect"),{filename:e,presets:(a=T(t,"data-presets"))!=null?a:r==="module"?["react",["env",{modules:!1}]]:["react","env"],plugins:(c=T(t,"data-plugins"))!=null?c:["transform-class-properties","transform-object-rest-spread","transform-flow-strip-types"],sourceMaps:"inline",sourceFileName:e,targets:n}}i(Z,"buildOptions");function ee(t,e,r,n){let o=0,a=i((l,d)=>{var h;let p;if(l.src)p=l.src;else{let f=l.getAttribute("data-module");f?p=f:(o++,p=o===1?"Inline Babel script":`Inline Babel script (${o})`)}try{let f=performance.now(),g=t.transform(d,Z(l,p)),b=performance.now(),v=document.createElement("script"),w=l.getAttribute("data-type");w&&v.setAttribute("type",w),l.nonce&&(v.nonce=l.nonce),v.text=(h=g==null?void 0:g.code)!=null?h:"",document.head.appendChild(v),r.transformDur+=b-f,r.evalDur+=performance.now()-b}catch(f){console.error("[creative-babel-stages] script failed:",p,f)}},"runOne"),c=0;for(;c<e.length&&!e[c].src;)a(e[c],e[c].innerHTML),c++;if(c>=e.length){D(r,n);return}let u=e.slice(c),s=u.map(l=>{if(!l.src)return Promise.resolve(l.innerHTML);let d=performance.now();return fetch(l.src).then(p=>{if(!p.ok)throw new Error(`HTTP ${p.status}`);return p.text()}).then(p=>(r.fetchDur+=performance.now()-d,p))});(async()=>{for(let l=0;l<u.length;l++){let d=null;try{d=await s[l]}catch(p){console.error("[creative-babel-stages] load failed:",u[l].src,p);continue}a(u[l],d)}D(r,n)})()}i(ee,"runScripts");function te(t,e){let r=window.ReactDOM;if(!r)return;let n=i(c=>{if(e.renderStart===null){e.renderStart=performance.now();try{let u=new MutationObserver(()=>{u.disconnect(),e.renderDur=performance.now()-e.renderStart,e.scriptsDone&&m(t,e)});u.observe(c,{childList:!0,subtree:!0})}catch{}}},"observeCommit"),o=r.createRoot;typeof o=="function"&&(r.createRoot=(c,u)=>{let s=o.call(r,c,u),l=s.render.bind(s);return s.render=d=>(n(c),l(d)),s});let a=r.render;typeof a=="function"&&(r.render=(c,u,s)=>(n(u),a.call(r,c,u,s)))}i(te,"instrumentRender");function D(t,e){e.scriptsDone=!0,e.scriptsDoneAt=performance.now(),e.renderStart===null||e.renderDur!==null?m(t,e):setTimeout(()=>m(t,e),z)}i(D,"onScriptsDone");function m(t,e){var a;if(e.sent)return;let r=window.Slardar;if(!r){e.retries++<G&&setTimeout(()=>m(t,e),q);return}e.sent=!0,e.hardTimer!==null&&clearTimeout(e.hardTimer);let n=e.renderDur!==null&&e.renderStart!==null?e.renderStart+e.renderDur:(a=e.scriptsDoneAt)!=null?a:performance.now(),o=e.totalStart===null?0:Math.max(0,n-e.totalStart);r("sendEvent",{name:"creative_babel_stages",metrics:{babel_total_dur:Math.round(o),babel_fetch_dur:Math.round(t.fetchDur),babel_transform_dur:Math.round(t.transformDur),babel_eval_dur:Math.round(t.evalDur)},categories:{takeover:String(e.takeover),external:String(t.externalCount>0),render_observed:String(e.renderDur!==null)}})}i(m,"trySend");var re="https://lf3-short.ibytedapm.com/slardar/fe/sdk-web/browser.cn.js",R=!1;function M(){if(R)return;if(R=!0,window.Slardar){x();return}let t=document.createElement("script");t.src=re,t.onload=()=>{window.Slardar&&x()},t.onerror=()=>{},document.head.appendChild(t)}i(M,"initCreativePerf");function x(){var o,a,c;let t=window.Slardar;if(!t)return;let e=null;t("context.merge",{app_id:(o=window.__appId__)!=null?o:"",creative_type:(a=window.__creativeType__)!=null?a:"unknown",is_public:String((c=window.__isExternallyVisible__)!=null?c:!1)}),t("init",{bid:"apaas_miaoda",env:window.ENVIRONMENT||"online"}),t("start");try{new PerformanceObserver(u=>{for(let s of u.getEntries())if(s.name==="first-contentful-paint"){e=s.startTime,t("context.merge",{has_painted:"true"});break}}).observe({type:"paint",buffered:!0})}catch{}let r=!1,n=i(()=>{if(r||!window.Slardar)return;r=!0;let u=performance.getEntriesByType("resource"),s=performance.getEntriesByType("navigation")[0],l=e!=null?e:ne(),d={transfer_size:u.reduce((p,h)=>{var f;return p+((f=h.transferSize)!=null?f:0)},0)};s&&s.domContentLoadedEventEnd>=s.responseStart&&(d.ttfb_to_dom_ready_dur=Math.round(s.domContentLoadedEventEnd-s.responseStart)),s&&l!==null&&l>=s.domContentLoadedEventEnd&&(d.render_to_fcp_dur=Math.round(l-s.domContentLoadedEventEnd)),window.Slardar("sendEvent",{name:"creative_perf",metrics:d})},"send");window.addEventListener("load",()=>setTimeout(n,500)),setTimeout(n,15e3)}i(x,"bootstrap");function ne(){var r;let e=performance.getEntriesByType("paint").find(n=>n.name==="first-contentful-paint");return(r=e==null?void 0:e.startTime)!=null?r:null}i(ne,"getBufferedFcpStartTime");function k(){let t="inspector-id";document.addEventListener("DOMContentLoaded",()=>{let e=window.Babel;if(!e||!e.registerPlugin)return;let r=null,n=i(()=>{let a={},c=0;return document.querySelectorAll('script[type="text/babel"],script[type="text/jsx"]').forEach(u=>{let s=u.getAttribute("src");if(s){let l=s.split("?")[0],d=l.split("/").pop()||l;a[d]=d in a?"":l}else{c++;let l=c===1?"Inline Babel script":`Inline Babel script (${c})`;a[l]=u.getAttribute("data-filename")||`inline-${c-1}`}}),a},"buildFileMap");e.availablePlugins&&delete e.availablePlugins[t],e.registerPlugin(t,({types:a})=>({visitor:{JSXOpeningElement(c,u){let s=c.node;if(s.name&&s.name.type==="JSXMemberExpression")return;for(let E=0;E<s.attributes.length;E++){let S=s.attributes[E];if(S.type==="JSXAttribute"&&S.name&&S.name.name==="data-inspector-id")return}let l=u.file&&u.file.opts&&u.file.opts.filename||"?";r===null&&(r=n());let d=l.split("?")[0],p=d.split("/").pop()||d,h=r[l]||r[p]||d.replace(/^\/?[a-z][a-z0-9+.-]*:\/{1,2}[^/]+/i,"").replace(/^\/+/,"")||l,f=s.loc&&s.loc.start,g=f?f.line:0,b=f?f.column+1:0,v=s.name&&s.name.type==="JSXIdentifier"?s.name.name:h,w=`jsx:${h}:${v}:${g}:${b}`;s.attributes.push(a.jsxAttribute(a.jsxIdentifier("data-inspector-id"),a.stringLiteral(w)))}}}));let o="";try{let a=document.getElementById("__srcmap");if(a&&a.textContent){let c=JSON.parse(a.textContent),u=c==null?void 0:c.file;typeof u=="string"&&(o=u)}}catch{}document.querySelectorAll('script[type="text/babel"],script[type="text/jsx"]').forEach((a,c)=>{let u=a.getAttribute("data-plugins")||"";if(u.indexOf(t)<0&&a.setAttribute("data-plugins",u?`${u},${t}`:t),!a.hasAttribute("data-filename")){let s=o?`${o}#inline-${c}`:`inline-${c}`;a.setAttribute("data-filename",a.getAttribute("src")||s)}})})}i(k,"registerInspectorIdPlugin");function C(){if(typeof crypto!="undefined"&&crypto.getRandomValues){let e=new Uint8Array(8);return crypto.getRandomValues(e),Array.from(e).map(r=>r.toString(16).padStart(2,"0")).join("")}let t="";for(let e=0;e<16;e++)t+=Math.floor(Math.random()*16).toString(16);return t}i(C,"generateUUID");var L="x_sdk_device_id";function ie(){try{let t=localStorage.getItem(L);return t||(t=C(),localStorage.setItem(L,t)),t}catch{return C()}}i(ie,"getDeviceId");function oe(){let t=typeof navigator!="undefined"?navigator.userAgent:"";return t&&(/Android/i.test(t)&&/Mobile/i.test(t)||/iPhone|iPod/i.test(t)||/BlackBerry|IEMobile|Opera Mini/i.test(t))?"mobile":"desktop"}i(oe,"getDeviceType");var se="pageSessionID";function ae(){try{return new URLSearchParams(window.location.search).get(se)||""}catch{return""}}i(ae,"getPvId");function ce(t={}){let e=t.pvId||ae();return{app_id:window.appId||"",tenant_id:window.tenantId||"",user_id:window.userId||"",did:ie(),module:"app_web",app_env:"runtime",source_type:"user",device_type:oe(),release_commit_id:window.__RELEASE_COMMIT_ID__||"",...e?{pv_id:e}:{}}}i(ce,"getDefaultAttributes");function N(t){let e=Math.round(t);if(!Number.isFinite(e))throw new RangeError(`toNanoString: \u975E\u6CD5\u65F6\u95F4\u6233 ${t}`);return typeof BigInt!="function"?e===0?"0":`${e}000000`:String(BigInt(e)*BigInt(1e6))}i(N,"toNanoString");var le="1.0.1";function ue(t,e){let r=ce(e),n=N(Date.now());return{metricsData:{resource:{attributes:{sdk_version:le,sdk_lang:"javascript",sdk_type:"client-frontend"}},metrics:[{name:"apaas_internal_metrics_pv_uv",description:"Count of page views",unit:"",scopeName:"apaas_internal_metrics_pv_uv",sum:{aggregationTemporality:1,isMonotonic:!0,dataPoints:t.map(o=>({attributes:{...r,url:o.url,path:o.path,referrer:o.referrer},startTimeUnixNano:N(o.timestampMs),timeUnixNano:n,asDouble:1}))}}]}}}i(ue,"buildPayload");function de(t,e,r={},n){if(e.length===0)return;let o;try{o=JSON.stringify(ue(e,n))}catch{return}try{fetch(t,{method:"POST",headers:{"Content-Type":"application/json","X-Suda-Csrf-Token":window.csrfToken||"",...r},body:o,keepalive:!0}).catch(()=>{})}catch{}}i(de,"sendPvData");var I="__APAAS_PV_TRACKER_STARTED__";function pe(){try{let t=window;return t[I]?!1:(t[I]=!0,!0)}catch{return!0}}i(pe,"claimPvReporting");function B(){try{window[I]=!1}catch{}}i(B,"releasePvReporting");var _,fe=(_=class{constructor(){this.started=!1,this.disposers=[],this.holdsPvReporting=!1,this.buffer=[]}static get instance(){return this._instance||(this._instance=new _),this._instance}start(e){var r;if(!this.started&&pe()){this.holdsPvReporting=!0,this.config=e,this.started=!0;try{this.listenRouteChanges(),this.registerLifecycleListeners();let n=(r=e.flushIntervalMs)!=null?r:1e4;this.flushTimer=setInterval(()=>this.flush(),n)}catch(n){throw this.started=!1,this.flushTimer&&(clearInterval(this.flushTimer),this.flushTimer=void 0),this.holdsPvReporting=!1,B(),n}}}shutdown(){this.flush(),this.flushTimer&&(clearInterval(this.flushTimer),this.flushTimer=void 0),this.firstFlushTimer&&(clearTimeout(this.firstFlushTimer),this.firstFlushTimer=void 0),this.started=!1;for(let e of this.disposers.splice(0))try{e()}catch{}this.holdsPvReporting&&(this.holdsPvReporting=!1,B())}pageKey(){let{origin:e,pathname:r,search:n}=window.location;return`${e}${r}${n}`}scheduleFirstFlush(){var e;let r=(e=this.config)==null?void 0:e.firstFlushDelayMs;r==null||this.firstFlushTimer||(this.firstFlushTimer=setTimeout(()=>this.flush(),r))}recordPv(){let e=this.pageKey();this.lastKey!==e&&(this.lastKey=e,this.buffer.push({url:window.location.href,path:window.location.pathname,referrer:document.referrer,timestampMs:Date.now()}),this.scheduleFirstFlush())}flush(){if(!this.config||this.buffer.length===0)return;let e=this.buffer.splice(0);de(this.config.collectorUrl,e,this.config.headers,{pvId:this.config.pvId})}listenRouteChanges(){this.recordPv();let e=i(()=>this.recordPv(),"onPopState");window.addEventListener("popstate",e),this.disposers.push(()=>window.removeEventListener("popstate",e)),this.patchHistory("pushState"),this.patchHistory("replaceState")}patchHistory(e){let r=history[e],n=i(()=>this.recordPv(),"recordPv");history[e]=function(...o){let a=r.apply(this,o);return n(),a},this.disposers.push(()=>{history[e]=r})}registerLifecycleListeners(){let e=i(()=>{document.visibilityState==="hidden"&&this.flush()},"onVisibilityChange");document.addEventListener("visibilitychange",e),this.disposers.push(()=>document.removeEventListener("visibilitychange",e));let r=i(()=>this.flush(),"onPageHide");window.addEventListener("pagehide",r),this.disposers.push(()=>window.removeEventListener("pagehide",r))}},i(_,"_PvTracker"),_),O=fe.instance;function F(){return window.appId||null}i(F,"getAppId");function $(){var e;let t=(e=F())!=null?e:"";O.start({collectorUrl:`/app/${t}/__runtime__/api/v1/observability/metrics/collect`,firstFlushDelayMs:1e3})}i($,"initCreativePvTracking");var he="0.0.12",me="@lark-apaas/miaoda-coding-sdk";window.__CREATIVITY_RUNTIME__||(window.__CREATIVITY_RUNTIME__=!0,k(),M(),$(),A());return J(_e);})();
|
|
@@ -1166,7 +1166,7 @@ var MiaodaRuntime = (() => {
|
|
|
1166
1166
|
return String(BigInt(msInt) * BigInt(1e6));
|
|
1167
1167
|
}
|
|
1168
1168
|
__name(toNanoString, "toNanoString");
|
|
1169
|
-
var SDK_VERSION = "1.0.
|
|
1169
|
+
var SDK_VERSION = "1.0.1";
|
|
1170
1170
|
function buildPayload(dataPoints, overrides) {
|
|
1171
1171
|
const defaultAttrs = getDefaultAttributes(overrides);
|
|
1172
1172
|
const nowNs = toNanoString(Date.now());
|
|
@@ -1711,7 +1711,7 @@ var MiaodaRuntime = (() => {
|
|
|
1711
1711
|
__name(mountDoubaoWatermark, "mountDoubaoWatermark");
|
|
1712
1712
|
|
|
1713
1713
|
// src/doubao-runtime.ts
|
|
1714
|
-
var version = "0.0.12
|
|
1714
|
+
var version = "0.0.12";
|
|
1715
1715
|
var name = "@lark-apaas/miaoda-coding-sdk";
|
|
1716
1716
|
if (isOnlineEnv()) {
|
|
1717
1717
|
reportPageView();
|
package/dist/doubao-runtime.js
CHANGED
|
@@ -1166,7 +1166,7 @@ var MiaodaRuntime = (() => {
|
|
|
1166
1166
|
return String(BigInt(msInt) * BigInt(1e6));
|
|
1167
1167
|
}
|
|
1168
1168
|
__name(toNanoString, "toNanoString");
|
|
1169
|
-
var SDK_VERSION = "1.0.
|
|
1169
|
+
var SDK_VERSION = "1.0.1";
|
|
1170
1170
|
function buildPayload(dataPoints, overrides) {
|
|
1171
1171
|
const defaultAttrs = getDefaultAttributes(overrides);
|
|
1172
1172
|
const nowNs = toNanoString(Date.now());
|
|
@@ -1711,7 +1711,7 @@ var MiaodaRuntime = (() => {
|
|
|
1711
1711
|
__name(mountDoubaoWatermark, "mountDoubaoWatermark");
|
|
1712
1712
|
|
|
1713
1713
|
// src/doubao-runtime.ts
|
|
1714
|
-
var version = "0.0.12
|
|
1714
|
+
var version = "0.0.12";
|
|
1715
1715
|
var name = "@lark-apaas/miaoda-coding-sdk";
|
|
1716
1716
|
if (isOnlineEnv()) {
|
|
1717
1717
|
reportPageView();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var MiaodaRuntime=(()=>{var we=Object.create;var R=Object.defineProperty;var xe=Object.getOwnPropertyDescriptor;var Ce=Object.getOwnPropertyNames;var Se=Object.getPrototypeOf,ke=Object.prototype.hasOwnProperty;var i=(n,e)=>R(n,"name",{value:e,configurable:!0});var z=(n,e)=>()=>(e||n((e={exports:{}}).exports,e),e.exports),Ee=(n,e)=>{for(var o in e)R(n,o,{get:e[o],enumerable:!0})},J=(n,e,o,h)=>{if(e&&typeof e=="object"||typeof e=="function")for(let p of Ce(e))!ke.call(n,p)&&p!==o&&R(n,p,{get:()=>e[p],enumerable:!(h=xe(e,p))||h.enumerable});return n};var q=(n,e,o)=>(o=n!=null?we(Se(n)):{},J(e||!n||!n.__esModule?R(o,"default",{value:n,enumerable:!0}):o,n)),Ie=n=>J(R({},"__esModule",{value:!0}),n);var Y=z((X,O)=>{"use strict";(function(n){"use strict";function e(t,f){var r=(t&65535)+(f&65535),b=(t>>16)+(f>>16)+(r>>16);return b<<16|r&65535}i(e,"safeAdd");function o(t,f){return t<<f|t>>>32-f}i(o,"bitRotateLeft");function h(t,f,r,b,w,S){return e(o(e(e(f,t),e(b,S)),w),r)}i(h,"md5cmn");function p(t,f,r,b,w,S,A){return h(f&r|~f&b,t,f,w,S,A)}i(p,"md5ff");function g(t,f,r,b,w,S,A){return h(f&b|r&~b,t,f,w,S,A)}i(g,"md5gg");function v(t,f,r,b,w,S,A){return h(f^r^b,t,f,w,S,A)}i(v,"md5hh");function y(t,f,r,b,w,S,A){return h(r^(f|~b),t,f,w,S,A)}i(y,"md5ii");function k(t,f){t[f>>5]|=128<<f%32,t[(f+64>>>9<<4)+14]=f;var r,b,w,S,A,s=1732584193,a=-271733879,c=-1732584194,l=271733878;for(r=0;r<t.length;r+=16)b=s,w=a,S=c,A=l,s=p(s,a,c,l,t[r],7,-680876936),l=p(l,s,a,c,t[r+1],12,-389564586),c=p(c,l,s,a,t[r+2],17,606105819),a=p(a,c,l,s,t[r+3],22,-1044525330),s=p(s,a,c,l,t[r+4],7,-176418897),l=p(l,s,a,c,t[r+5],12,1200080426),c=p(c,l,s,a,t[r+6],17,-1473231341),a=p(a,c,l,s,t[r+7],22,-45705983),s=p(s,a,c,l,t[r+8],7,1770035416),l=p(l,s,a,c,t[r+9],12,-1958414417),c=p(c,l,s,a,t[r+10],17,-42063),a=p(a,c,l,s,t[r+11],22,-1990404162),s=p(s,a,c,l,t[r+12],7,1804603682),l=p(l,s,a,c,t[r+13],12,-40341101),c=p(c,l,s,a,t[r+14],17,-1502002290),a=p(a,c,l,s,t[r+15],22,1236535329),s=g(s,a,c,l,t[r+1],5,-165796510),l=g(l,s,a,c,t[r+6],9,-1069501632),c=g(c,l,s,a,t[r+11],14,643717713),a=g(a,c,l,s,t[r],20,-373897302),s=g(s,a,c,l,t[r+5],5,-701558691),l=g(l,s,a,c,t[r+10],9,38016083),c=g(c,l,s,a,t[r+15],14,-660478335),a=g(a,c,l,s,t[r+4],20,-405537848),s=g(s,a,c,l,t[r+9],5,568446438),l=g(l,s,a,c,t[r+14],9,-1019803690),c=g(c,l,s,a,t[r+3],14,-187363961),a=g(a,c,l,s,t[r+8],20,1163531501),s=g(s,a,c,l,t[r+13],5,-1444681467),l=g(l,s,a,c,t[r+2],9,-51403784),c=g(c,l,s,a,t[r+7],14,1735328473),a=g(a,c,l,s,t[r+12],20,-1926607734),s=v(s,a,c,l,t[r+5],4,-378558),l=v(l,s,a,c,t[r+8],11,-2022574463),c=v(c,l,s,a,t[r+11],16,1839030562),a=v(a,c,l,s,t[r+14],23,-35309556),s=v(s,a,c,l,t[r+1],4,-1530992060),l=v(l,s,a,c,t[r+4],11,1272893353),c=v(c,l,s,a,t[r+7],16,-155497632),a=v(a,c,l,s,t[r+10],23,-1094730640),s=v(s,a,c,l,t[r+13],4,681279174),l=v(l,s,a,c,t[r],11,-358537222),c=v(c,l,s,a,t[r+3],16,-722521979),a=v(a,c,l,s,t[r+6],23,76029189),s=v(s,a,c,l,t[r+9],4,-640364487),l=v(l,s,a,c,t[r+12],11,-421815835),c=v(c,l,s,a,t[r+15],16,530742520),a=v(a,c,l,s,t[r+2],23,-995338651),s=y(s,a,c,l,t[r],6,-198630844),l=y(l,s,a,c,t[r+7],10,1126891415),c=y(c,l,s,a,t[r+14],15,-1416354905),a=y(a,c,l,s,t[r+5],21,-57434055),s=y(s,a,c,l,t[r+12],6,1700485571),l=y(l,s,a,c,t[r+3],10,-1894986606),c=y(c,l,s,a,t[r+10],15,-1051523),a=y(a,c,l,s,t[r+1],21,-2054922799),s=y(s,a,c,l,t[r+8],6,1873313359),l=y(l,s,a,c,t[r+15],10,-30611744),c=y(c,l,s,a,t[r+6],15,-1560198380),a=y(a,c,l,s,t[r+13],21,1309151649),s=y(s,a,c,l,t[r+4],6,-145523070),l=y(l,s,a,c,t[r+11],10,-1120210379),c=y(c,l,s,a,t[r+2],15,718787259),a=y(a,c,l,s,t[r+9],21,-343485551),s=e(s,b),a=e(a,w),c=e(c,S),l=e(l,A);return[s,a,c,l]}i(k,"binlMD5");function L(t){var f,r="",b=t.length*32;for(f=0;f<b;f+=8)r+=String.fromCharCode(t[f>>5]>>>f%32&255);return r}i(L,"binl2rstr");function x(t){var f,r=[];for(r[(t.length>>2)-1]=void 0,f=0;f<r.length;f+=1)r[f]=0;var b=t.length*8;for(f=0;f<b;f+=8)r[f>>5]|=(t.charCodeAt(f/8)&255)<<f%32;return r}i(x,"rstr2binl");function I(t){return L(k(x(t),t.length*8))}i(I,"rstrMD5");function E(t,f){var r,b=x(t),w=[],S=[],A;for(w[15]=S[15]=void 0,b.length>16&&(b=k(b,t.length*8)),r=0;r<16;r+=1)w[r]=b[r]^909522486,S[r]=b[r]^1549556828;return A=k(w.concat(x(f)),512+f.length*8),L(k(S.concat(A),640))}i(E,"rstrHMACMD5");function P(t){var f="0123456789abcdef",r="",b,w;for(w=0;w<t.length;w+=1)b=t.charCodeAt(w),r+=f.charAt(b>>>4&15)+f.charAt(b&15);return r}i(P,"rstr2hex");function T(t){return unescape(encodeURIComponent(t))}i(T,"str2rstrUTF8");function u(t){return I(T(t))}i(u,"rawMD5");function d(t){return P(u(t))}i(d,"hexMD5");function _(t,f){return E(T(t),T(f))}i(_,"rawHMACMD5");function m(t,f){return P(_(t,f))}i(m,"hexHMACMD5");function C(t,f,r){return f?r?_(f,t):m(f,t):r?u(t):d(t)}i(C,"md5"),typeof define=="function"&&define.amd?define(function(){return C}):typeof O=="object"&&O.exports?O.exports=C:n.md5=C})(X)});var ee=z((M,Q)=>{"use strict";(function(n,e){typeof M=="object"?Q.exports=M=e():typeof define=="function"&&define.amd?define([],e):n.CryptoJS=e()})(M,function(){var n=n||(function(e,o){var h=Object.create||(function(){function u(){}return i(u,"F"),function(d){var _;return u.prototype=d,_=new u,u.prototype=null,_}})(),p={},g=p.lib={},v=g.Base=(function(){return{extend:i(function(u){var d=h(this);return u&&d.mixIn(u),(!d.hasOwnProperty("init")||this.init===d.init)&&(d.init=function(){d.$super.init.apply(this,arguments)}),d.init.prototype=d,d.$super=this,d},"extend"),create:i(function(){var u=this.extend();return u.init.apply(u,arguments),u},"create"),init:i(function(){},"init"),mixIn:i(function(u){for(var d in u)u.hasOwnProperty(d)&&(this[d]=u[d]);u.hasOwnProperty("toString")&&(this.toString=u.toString)},"mixIn"),clone:i(function(){return this.init.prototype.extend(this)},"clone")}})(),y=g.WordArray=v.extend({init:i(function(u,d){u=this.words=u||[],d!=o?this.sigBytes=d:this.sigBytes=u.length*4},"init"),toString:i(function(u){return(u||L).stringify(this)},"toString"),concat:i(function(u){var d=this.words,_=u.words,m=this.sigBytes,C=u.sigBytes;if(this.clamp(),m%4)for(var t=0;t<C;t++){var f=_[t>>>2]>>>24-t%4*8&255;d[m+t>>>2]|=f<<24-(m+t)%4*8}else for(var t=0;t<C;t+=4)d[m+t>>>2]=_[t>>>2];return this.sigBytes+=C,this},"concat"),clamp:i(function(){var u=this.words,d=this.sigBytes;u[d>>>2]&=4294967295<<32-d%4*8,u.length=e.ceil(d/4)},"clamp"),clone:i(function(){var u=v.clone.call(this);return u.words=this.words.slice(0),u},"clone"),random:i(function(u){for(var d=[],_=i(function(r){var r=r,b=987654321,w=4294967295;return function(){b=36969*(b&65535)+(b>>16)&w,r=18e3*(r&65535)+(r>>16)&w;var S=(b<<16)+r&w;return S/=4294967296,S+=.5,S*(e.random()>.5?1:-1)}},"r"),m=0,C;m<u;m+=4){var t=_((C||e.random())*4294967296);C=t()*987654071,d.push(t()*4294967296|0)}return new y.init(d,u)},"random")}),k=p.enc={},L=k.Hex={stringify:i(function(u){for(var d=u.words,_=u.sigBytes,m=[],C=0;C<_;C++){var t=d[C>>>2]>>>24-C%4*8&255;m.push((t>>>4).toString(16)),m.push((t&15).toString(16))}return m.join("")},"stringify"),parse:i(function(u){for(var d=u.length,_=[],m=0;m<d;m+=2)_[m>>>3]|=parseInt(u.substr(m,2),16)<<24-m%8*4;return new y.init(_,d/2)},"parse")},x=k.Latin1={stringify:i(function(u){for(var d=u.words,_=u.sigBytes,m=[],C=0;C<_;C++){var t=d[C>>>2]>>>24-C%4*8&255;m.push(String.fromCharCode(t))}return m.join("")},"stringify"),parse:i(function(u){for(var d=u.length,_=[],m=0;m<d;m++)_[m>>>2]|=(u.charCodeAt(m)&255)<<24-m%4*8;return new y.init(_,d)},"parse")},I=k.Utf8={stringify:i(function(u){try{return decodeURIComponent(escape(x.stringify(u)))}catch{throw new Error("Malformed UTF-8 data")}},"stringify"),parse:i(function(u){return x.parse(unescape(encodeURIComponent(u)))},"parse")},E=g.BufferedBlockAlgorithm=v.extend({reset:i(function(){this._data=new y.init,this._nDataBytes=0},"reset"),_append:i(function(u){typeof u=="string"&&(u=I.parse(u)),this._data.concat(u),this._nDataBytes+=u.sigBytes},"_append"),_process:i(function(u){var d=this._data,_=d.words,m=d.sigBytes,C=this.blockSize,t=C*4,f=m/t;u?f=e.ceil(f):f=e.max((f|0)-this._minBufferSize,0);var r=f*C,b=e.min(r*4,m);if(r){for(var w=0;w<r;w+=C)this._doProcessBlock(_,w);var S=_.splice(0,r);d.sigBytes-=b}return new y.init(S,b)},"_process"),clone:i(function(){var u=v.clone.call(this);return u._data=this._data.clone(),u},"clone"),_minBufferSize:0}),P=g.Hasher=E.extend({cfg:v.extend(),init:i(function(u){this.cfg=this.cfg.extend(u),this.reset()},"init"),reset:i(function(){E.reset.call(this),this._doReset()},"reset"),update:i(function(u){return this._append(u),this._process(),this},"update"),finalize:i(function(u){u&&this._append(u);var d=this._doFinalize();return d},"finalize"),blockSize:512/32,_createHelper:i(function(u){return function(d,_){return new u.init(_).finalize(d)}},"_createHelper"),_createHmacHelper:i(function(u){return function(d,_){return new T.HMAC.init(u,_).finalize(d)}},"_createHmacHelper")}),T=p.algo={};return p})(Math);return n})});var ne=z((H,te)=>{"use strict";(function(n,e){typeof H=="object"?te.exports=H=e(ee()):typeof define=="function"&&define.amd?define(["./core"],e):e(n.CryptoJS)})(H,function(n){return(function(){var e=n,o=e.lib,h=o.WordArray,p=o.Hasher,g=e.algo,v=[],y=g.SHA1=p.extend({_doReset:i(function(){this._hash=new h.init([1732584193,4023233417,2562383102,271733878,3285377520])},"_doReset"),_doProcessBlock:i(function(k,L){for(var x=this._hash.words,I=x[0],E=x[1],P=x[2],T=x[3],u=x[4],d=0;d<80;d++){if(d<16)v[d]=k[L+d]|0;else{var _=v[d-3]^v[d-8]^v[d-14]^v[d-16];v[d]=_<<1|_>>>31}var m=(I<<5|I>>>27)+u+v[d];d<20?m+=(E&P|~E&T)+1518500249:d<40?m+=(E^P^T)+1859775393:d<60?m+=(E&P|E&T|P&T)-1894007588:m+=(E^P^T)-899497514,u=T,T=P,P=E<<30|E>>>2,E=I,I=m}x[0]=x[0]+I|0,x[1]=x[1]+E|0,x[2]=x[2]+P|0,x[3]=x[3]+T|0,x[4]=x[4]+u|0},"_doProcessBlock"),_doFinalize:i(function(){var k=this._data,L=k.words,x=this._nDataBytes*8,I=k.sigBytes*8;return L[I>>>5]|=128<<24-I%32,L[(I+64>>>9<<4)+14]=Math.floor(x/4294967296),L[(I+64>>>9<<4)+15]=x,k.sigBytes=L.length*4,this._process(),this._hash},"_doFinalize"),clone:i(function(){var k=p.clone.call(this);return k._hash=this._hash.clone(),k},"clone")});e.SHA1=p._createHelper(y),e.HmacSHA1=p._createHmacHelper(y)})(),n.SHA1})});var nt={};Ee(nt,{TrackKey:()=>$,name:()=>tt,reportTeaEvent:()=>U,version:()=>et});var se=q(Y(),1),ae=q(ne(),1);function B(){return window.appId||null}i(B,"getAppId");function Te(){var o;let n="suda-csrf-token",e=document.cookie.split("; ");for(let h of e){let[p,g]=h.split("=");if(p===n)return decodeURIComponent(g)}return(o=window.csrfToken)!=null?o:null}i(Te,"getCsrfToken");function W(){let n=globalThis.CLIENT_BASE_PATH||"/";return/^\/app\/[^/]/.test(n)}i(W,"isNewPathEnabled");function F(){switch(globalThis.ENVIRONMENT){case"gray":return"PRE";case"online":return"ONLINE";default:return"BOE"}}i(F,"getEnv");function re(){return window.appEnv!=null?window.appEnv==="runtime":!0}i(re,"isOnlineEnv");function N(){let n=navigator.userAgent,e=/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i.test(n),o=/iPad|Tab|Tablet/i.test(n)&&navigator.maxTouchPoints>1;return e||o}i(N,"isMobile");async function ie(){var h;let n=B();if(!n)return{code:1,msg:"appId is required",data:{}};let e=W()?`/app/${n}/__runtime__/api/v1/studio/lark/user_info`:`/spark/b/${n}/lark/user_info`;return await(await fetch(e,{headers:{"X-Suda-Csrf-Token":(h=Te())!=null?h:""}})).json()}i(ie,"getLarkUserInfo");var $={VIEW:"aily_agent_artifact_page_view"},Ae="08a441",Pe="42b91e";function oe(n){let e=String(n);return(0,ae.default)(Ae+(0,se.default)(e+Pe)).toString()}i(oe,"encryptTea");var j=!1;async function Le(){var g,v,y,k;let{data:n}=await ie(),{tenantID:e,userID:o}=n||{},h=o&&o!=="0"?oe(o):void 0,p=e&&e!=="0"?oe(e):void 0;(g=window.collectEvent)==null||g.call(window,"init",{app_id:788827,channel:"cn",disable_auto_pv:!1,enable_ab_test:!1,enable_debug:!1,enable_stay_duration:!0,reportTime:1e3}),(y=window.collectEvent)==null||y.call(window,"config",{user_unique_id:h,device_type:N()?"mobile":"pc",evtParams:{open_from:(v=new URLSearchParams(window.location.search).get("open-from"))!=null?v:void 0,env:F(),user_id:h,tenant_id:p}}),j=!0,(k=window.collectEvent)==null||k.call(window,"start")}i(Le,"createTracker");async function U({trackKey:n,trackParams:e={}}){var o;try{j||(j=!0,await Le()),(o=window.collectEvent)==null||o.call(window,n,e)}catch(h){console.error(h)}}i(U,"reportTeaEvent");function ce(){return U({trackKey:$.VIEW,trackParams:{artifact_uid:B(),agent_id:"agent_miaoda",url:window.location.href}})}i(ce,"reportPageView");function le(){if(typeof crypto!="undefined"&&crypto.getRandomValues){let e=new Uint8Array(8);return crypto.getRandomValues(e),Array.from(e).map(o=>o.toString(16).padStart(2,"0")).join("")}let n="";for(let e=0;e<16;e++)n+=Math.floor(Math.random()*16).toString(16);return n}i(le,"generateUUID");var ue="x_sdk_device_id";function Be(){try{let n=localStorage.getItem(ue);return n||(n=le(),localStorage.setItem(ue,n)),n}catch{return le()}}i(Be,"getDeviceId");function De(){let n=typeof navigator!="undefined"?navigator.userAgent:"";return n&&(/Android/i.test(n)&&/Mobile/i.test(n)||/iPhone|iPod/i.test(n)||/BlackBerry|IEMobile|Opera Mini/i.test(n))?"mobile":"desktop"}i(De,"getDeviceType");var Re="pageSessionID";function Oe(){try{return new URLSearchParams(window.location.search).get(Re)||""}catch{return""}}i(Oe,"getPvId");function Me(n={}){let e=n.pvId||Oe();return{app_id:window.appId||"",tenant_id:window.tenantId||"",user_id:window.userId||"",did:Be(),module:"app_web",app_env:"runtime",source_type:"user",device_type:De(),release_commit_id:window.__RELEASE_COMMIT_ID__||"",...e?{pv_id:e}:{}}}i(Me,"getDefaultAttributes");function de(n){let e=Math.round(n);if(!Number.isFinite(e))throw new RangeError(`toNanoString: \u975E\u6CD5\u65F6\u95F4\u6233 ${n}`);return typeof BigInt!="function"?e===0?"0":`${e}000000`:String(BigInt(e)*BigInt(1e6))}i(de,"toNanoString");var He="1.0.2-beta.0";function Fe(n,e){let o=Me(e),h=de(Date.now());return{metricsData:{resource:{attributes:{sdk_version:He,sdk_lang:"javascript",sdk_type:"client-frontend"}},metrics:[{name:"apaas_internal_metrics_pv_uv",description:"Count of page views",unit:"",scopeName:"apaas_internal_metrics_pv_uv",sum:{aggregationTemporality:1,isMonotonic:!0,dataPoints:n.map(p=>({attributes:{...o,url:p.url,path:p.path,referrer:p.referrer},startTimeUnixNano:de(p.timestampMs),timeUnixNano:h,asDouble:1}))}}]}}}i(Fe,"buildPayload");function Ne(n,e,o={},h){if(e.length===0)return;let p;try{p=JSON.stringify(Fe(e,h))}catch{return}try{fetch(n,{method:"POST",headers:{"Content-Type":"application/json","X-Suda-Csrf-Token":window.csrfToken||"",...o},body:p,keepalive:!0}).catch(()=>{})}catch{}}i(Ne,"sendPvData");var V="__APAAS_PV_TRACKER_STARTED__";function ze(){try{let n=window;return n[V]?!1:(n[V]=!0,!0)}catch{return!0}}i(ze,"claimPvReporting");function fe(){try{window[V]=!1}catch{}}i(fe,"releasePvReporting");var D,We=(D=class{constructor(){this.started=!1,this.disposers=[],this.holdsPvReporting=!1,this.buffer=[]}static get instance(){return this._instance||(this._instance=new D),this._instance}start(e){var o;if(!this.started&&ze()){this.holdsPvReporting=!0,this.config=e,this.started=!0;try{this.listenRouteChanges(),this.registerLifecycleListeners();let h=(o=e.flushIntervalMs)!=null?o:1e4;this.flushTimer=setInterval(()=>this.flush(),h)}catch(h){throw this.started=!1,this.flushTimer&&(clearInterval(this.flushTimer),this.flushTimer=void 0),this.holdsPvReporting=!1,fe(),h}}}shutdown(){this.flush(),this.flushTimer&&(clearInterval(this.flushTimer),this.flushTimer=void 0),this.firstFlushTimer&&(clearTimeout(this.firstFlushTimer),this.firstFlushTimer=void 0),this.started=!1;for(let e of this.disposers.splice(0))try{e()}catch{}this.holdsPvReporting&&(this.holdsPvReporting=!1,fe())}pageKey(){let{origin:e,pathname:o,search:h}=window.location;return`${e}${o}${h}`}scheduleFirstFlush(){var e;let o=(e=this.config)==null?void 0:e.firstFlushDelayMs;o==null||this.firstFlushTimer||(this.firstFlushTimer=setTimeout(()=>this.flush(),o))}recordPv(){let e=this.pageKey();this.lastKey!==e&&(this.lastKey=e,this.buffer.push({url:window.location.href,path:window.location.pathname,referrer:document.referrer,timestampMs:Date.now()}),this.scheduleFirstFlush())}flush(){if(!this.config||this.buffer.length===0)return;let e=this.buffer.splice(0);Ne(this.config.collectorUrl,e,this.config.headers,{pvId:this.config.pvId})}listenRouteChanges(){this.recordPv();let e=i(()=>this.recordPv(),"onPopState");window.addEventListener("popstate",e),this.disposers.push(()=>window.removeEventListener("popstate",e)),this.patchHistory("pushState"),this.patchHistory("replaceState")}patchHistory(e){let o=history[e],h=i(()=>this.recordPv(),"recordPv");history[e]=function(...p){let g=o.apply(this,p);return h(),g},this.disposers.push(()=>{history[e]=o})}registerLifecycleListeners(){let e=i(()=>{document.visibilityState==="hidden"&&this.flush()},"onVisibilityChange");document.addEventListener("visibilitychange",e),this.disposers.push(()=>document.removeEventListener("visibilitychange",e));let o=i(()=>this.flush(),"onPageHide");window.addEventListener("pagehide",o),this.disposers.push(()=>window.removeEventListener("pagehide",o))}},i(D,"_PvTracker"),D),pe=We.instance;function he(){var o;let n=(o=B())!=null?o:"",e=W()?`/app/${n}/__runtime__/api/v1/observability/metrics/collect`:`/spark/app/${n}/runtime/api/v1/observability/metrics/collect`;pe.start({collectorUrl:e})}i(he,"initPvTracking");var je="https://lf3-static.bytednsdoc.com/obj/eden-cn/LMfspH/ljhwZthlaukjlkulzlp/miaoda-ui",$e=`${je}/doubao.svg`,Ue='<svg viewBox="0 0 10 10" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M8.08312 8.08298C8.2384 7.92769 8.23953 7.67705 8.08424 7.52176L5.3625 4.80002L8.08422 2.07829C8.23951 1.92301 8.23839 1.67236 8.0831 1.51708C7.92781 1.36179 7.67717 1.36066 7.52188 1.51595C7.36659 1.67124 4.80016 4.23767 4.80016 4.23767L2.07841 1.51593C1.92313 1.36064 1.67248 1.36177 1.5172 1.51705C1.36191 1.67234 1.36078 1.92298 1.51607 2.07827L4.23782 4.80002L1.51605 7.52178C1.36076 7.67707 1.36189 7.92771 1.51718 8.083C1.67246 8.23829 1.92311 8.23941 2.07839 8.08412L4.80016 5.36236L7.5219 8.0841C7.67719 8.23939 7.92783 8.23826 8.08312 8.08298Z" fill="currentColor"/></svg>',Ve='<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M12.6667 2H3.33333V14H6.66667V15.3334H3.33333C2.59695 15.3334 2 14.7364 2 14V2C2 1.26364 2.59695 0.666687 3.33333 0.666687H12.6667C13.403 0.666687 14 1.26364 14 2V7.33335H12.6667V2Z" fill="currentColor"/><path d="M5.33333 4.66669C4.96514 4.66669 4.66667 4.96516 4.66667 5.33335C4.66667 5.70154 4.96514 6 5.33333 6H10.6667C11.0349 6 11.3333 5.70154 11.3333 5.33335C11.3333 4.96516 11.0349 4.66669 10.6667 4.66669H5.33333Z" fill="currentColor"/><path d="M4.66667 8.33335C4.66667 7.96516 4.96514 7.66669 5.33333 7.66669H8C8.36819 7.66669 8.66667 7.96516 8.66667 8.33335C8.66667 8.70154 8.36819 9 8 9H5.33333C4.96514 9 4.66667 8.70154 4.66667 8.33335Z" fill="currentColor"/><path d="M13.5523 8.70017C13.9428 8.30964 14.576 8.30964 14.9665 8.70017C15.357 9.09069 15.357 9.72386 14.9665 10.1144L14.2594 10.8215L12.8452 9.40728L13.5523 8.70017Z" fill="currentColor"/><path d="M12.1381 10.1144L13.5523 11.5286L10.2309 14.85C10.0916 14.9892 9.91229 15.0815 9.71798 15.1138L8.45737 15.3234C8.42136 15.3294 8.38467 15.3177 8.35885 15.2918C8.33271 15.2657 8.32099 15.2284 8.32749 15.192L8.55128 13.9374C8.58465 13.7502 8.6746 13.5779 8.80901 13.4435L12.1381 10.1144Z" fill="currentColor"/></svg>',ge=!0,Ke="\u8C46\u5305 AI \u751F\u6210",Ze="\u7531\u98DE\u4E66\u5999\u642D\u63D0\u4F9B\u652F\u6301",Ge="0px 8px 32px rgba(0,0,0,0.08), 0px 4px 16px rgba(0,0,0,0.04), 0px 2px 4px rgba(0,0,0,0.02)",Je="0px 4px 16px rgba(0,0,0,0.03), 0px 4px 10px rgba(0,0,0,0.03), 0px 2px 4px rgba(0,0,0,0.02)",Z="'PingFang SC', -apple-system, BlinkMacSystemFont, sans-serif",qe={BOE:"tns.feishu-boe.cn",PRE:"tns.feishu-pre.cn",ONLINE:"tns.feishu.cn"};function me(){var o;let n=JSON.stringify({scene:"miaoda_app_report",entity_id:(o=B())!=null?o:"",entity_type:"miaoda_app",extra:""}),e=`https://${qe[F()]}/cust/lark_report/?type=common¶ms=${encodeURIComponent(n)}&lang=zh-CN`;window.open(e,"_blank","noopener,noreferrer")}i(me,"openDoubaoReport");function be(n){let e=document.createElement("span");Object.assign(e.style,{display:"inline-flex",width:`${n}px`,height:`${n}px`,flexShrink:"0"}),e.innerHTML=Ue;let o=e.firstElementChild;return o&&(o.setAttribute("width",String(n)),o.setAttribute("height",String(n)),o.style.display="block"),e}i(be,"makeCloseIcon");function Xe(n){let e=document.createElement("img");return e.src=$e,e.width=n,e.height=n,e.alt="",Object.assign(e.style,{width:`${n}px`,height:`${n}px`,maxWidth:"none",maxHeight:"none",borderRadius:"100px",flexShrink:"0",display:"block"}),e}i(Xe,"makeAvatar");function ye(n,e){let o=n==="desktop",h=document.createElement("div");Object.assign(h.style,{boxSizing:"border-box",display:"inline-flex",alignItems:"center",gap:o?"4px":"6px",padding:o?"6px 12px 6px 8px":"4px 12px 4px 8px",background:"#363636",border:"0.5px solid rgba(255,255,255,0.1)",borderRadius:"100px",boxShadow:Ge,cursor:"pointer"});let p=Xe(o?16:18),g=document.createElement("span");if(g.textContent=Ke,Object.assign(g.style,{fontFamily:Z,fontSize:o?"12px":"14px",lineHeight:o?"18px":"22px",color:"rgba(255,255,255,0.85)",whiteSpace:"nowrap"}),h.append(p,g),o&&e){let v=document.createElement("span");v.setAttribute("role","button"),v.setAttribute("aria-label","\u5173\u95ED"),v.setAttribute("data-doubao-close",""),Object.assign(v.style,{display:"none",alignItems:"center",cursor:"pointer",flexShrink:"0",color:"rgba(255,255,255,0.5)"}),v.appendChild(be(10)),v.addEventListener("click",y=>{y.stopPropagation(),e()}),h.appendChild(v)}return h}i(ye,"buildPill");function K(n){let e=document.createElement("div");e.setAttribute("role","menuitem"),e.setAttribute("data-label",n.label),Object.assign(e.style,{boxSizing:"border-box",display:"flex",alignItems:"center",gap:"8px",padding:"4px 10px",borderRadius:"6px",cursor:"pointer",color:"#000000"});let o=document.createElement("span");Object.assign(o.style,{display:"inline-flex",width:"16px",height:"16px",flexShrink:"0",color:"#000000"}),n.icon==="feedback"?o.innerHTML=Ve:o.appendChild(be(16));let h=document.createElement("span");return h.textContent=n.label,Object.assign(h.style,{fontFamily:Z,fontSize:`${n.fontSize}px`,lineHeight:`${n.fontSize+8}px`,color:"#000000",whiteSpace:"nowrap"}),e.append(o,h),e.addEventListener("mouseenter",()=>{e.style.background="rgba(0,0,0,0.04)"}),e.addEventListener("mouseleave",()=>{e.style.background="transparent"}),e.addEventListener("click",n.onClick),e}i(K,"buildMenuRow");function _e(n){let e=document.createElement("div");if(Object.assign(e.style,{boxSizing:"border-box",display:"flex",flexDirection:"column",minWidth:`${n.minWidth}px`,background:"#ffffff",border:"0.5px solid rgba(0,0,0,0.1)",borderRadius:"10px",boxShadow:Je,overflow:"hidden",outline:"none"}),n.rows.length){let h=document.createElement("div");Object.assign(h.style,{boxSizing:"border-box",padding:"4px"}),n.rows.forEach(p=>h.appendChild(p)),e.appendChild(h)}let o=document.createElement("div");return o.textContent=Ze,Object.assign(o.style,{boxSizing:"border-box",background:"#f9f9f9",padding:"8px 14px",fontFamily:Z,fontSize:`${n.footerFontSize}px`,lineHeight:`${n.footerFontSize+8}px`,color:"rgba(0,0,0,0.35)",whiteSpace:"nowrap"}),e.appendChild(o),e}i(_e,"buildMenuCard");function Ye(){let n=document.createElement("div");n.setAttribute("data-custom-element","doubao-watermark"),Object.assign(n.style,{position:"fixed",right:"12px",bottom:"12px",zIndex:"9999",display:"flex",flexDirection:"column",alignItems:"flex-end",gap:"8px"});let e=[];ge&&e.push(K({icon:"feedback",label:"\u6295\u8BC9\u4E0E\u4E3E\u62A5",fontSize:14,onClick:me}));let o=_e({rows:e,footerFontSize:12,minWidth:144});o.style.display="none";let h=ye("desktop",()=>n.remove()),p=h.querySelector("[data-doubao-close]");n.append(o,h);let g=null;return n.addEventListener("mouseenter",()=>{g&&clearTimeout(g),o.style.display="flex",p&&(p.style.display="inline-flex")}),n.addEventListener("mouseleave",()=>{g=setTimeout(()=>{o.style.display="none",p&&(p.style.display="none")},100)}),n}i(Ye,"buildDesktopWatermark");function Qe(){let n=document.createElement("div");n.setAttribute("data-custom-element","doubao-watermark-mobile"),Object.assign(n.style,{position:"fixed",right:"12px",bottom:"12px",zIndex:"9999",display:"flex",flexDirection:"column",alignItems:"flex-end",gap:"8px",cursor:"pointer"});let e=[];ge&&e.push(K({icon:"feedback",label:"\u6295\u8BC9\u4E0E\u4E3E\u62A5",fontSize:16,onClick:me})),e.push(K({icon:"close",label:"\u4E0D\u518D\u5C55\u793A",fontSize:16,onClick:i(p=>{p.stopPropagation(),n.remove()},"onClick")}));let o=_e({rows:e,footerFontSize:14,minWidth:160});o.style.display="none";let h=ye("mobile");return n.append(o,h),n.addEventListener("click",p=>{p.stopPropagation(),o.style.display=o.style.display==="none"?"flex":"none"}),document.addEventListener("click",()=>{o.style.display="none"}),n}i(Qe,"buildMobileWatermark");var ve=!1;function G(){if(ve||typeof document=="undefined")return;if(document.readyState==="loading"){document.addEventListener("DOMContentLoaded",G,{once:!0});return}ve=!0;let n=N()?Qe():Ye();document.body.appendChild(n)}i(G,"mountDoubaoWatermark");var et="0.0.12-beta.0",tt="@lark-apaas/miaoda-coding-sdk";re()&&(ce(),he());G();return Ie(nt);})();
|
|
1
|
+
"use strict";var MiaodaRuntime=(()=>{var we=Object.create;var R=Object.defineProperty;var xe=Object.getOwnPropertyDescriptor;var Ce=Object.getOwnPropertyNames;var Se=Object.getPrototypeOf,ke=Object.prototype.hasOwnProperty;var i=(n,e)=>R(n,"name",{value:e,configurable:!0});var z=(n,e)=>()=>(e||n((e={exports:{}}).exports,e),e.exports),Ee=(n,e)=>{for(var o in e)R(n,o,{get:e[o],enumerable:!0})},J=(n,e,o,h)=>{if(e&&typeof e=="object"||typeof e=="function")for(let p of Ce(e))!ke.call(n,p)&&p!==o&&R(n,p,{get:()=>e[p],enumerable:!(h=xe(e,p))||h.enumerable});return n};var q=(n,e,o)=>(o=n!=null?we(Se(n)):{},J(e||!n||!n.__esModule?R(o,"default",{value:n,enumerable:!0}):o,n)),Ie=n=>J(R({},"__esModule",{value:!0}),n);var Y=z((X,O)=>{"use strict";(function(n){"use strict";function e(t,f){var r=(t&65535)+(f&65535),b=(t>>16)+(f>>16)+(r>>16);return b<<16|r&65535}i(e,"safeAdd");function o(t,f){return t<<f|t>>>32-f}i(o,"bitRotateLeft");function h(t,f,r,b,w,S){return e(o(e(e(f,t),e(b,S)),w),r)}i(h,"md5cmn");function p(t,f,r,b,w,S,A){return h(f&r|~f&b,t,f,w,S,A)}i(p,"md5ff");function g(t,f,r,b,w,S,A){return h(f&b|r&~b,t,f,w,S,A)}i(g,"md5gg");function v(t,f,r,b,w,S,A){return h(f^r^b,t,f,w,S,A)}i(v,"md5hh");function y(t,f,r,b,w,S,A){return h(r^(f|~b),t,f,w,S,A)}i(y,"md5ii");function k(t,f){t[f>>5]|=128<<f%32,t[(f+64>>>9<<4)+14]=f;var r,b,w,S,A,s=1732584193,a=-271733879,c=-1732584194,l=271733878;for(r=0;r<t.length;r+=16)b=s,w=a,S=c,A=l,s=p(s,a,c,l,t[r],7,-680876936),l=p(l,s,a,c,t[r+1],12,-389564586),c=p(c,l,s,a,t[r+2],17,606105819),a=p(a,c,l,s,t[r+3],22,-1044525330),s=p(s,a,c,l,t[r+4],7,-176418897),l=p(l,s,a,c,t[r+5],12,1200080426),c=p(c,l,s,a,t[r+6],17,-1473231341),a=p(a,c,l,s,t[r+7],22,-45705983),s=p(s,a,c,l,t[r+8],7,1770035416),l=p(l,s,a,c,t[r+9],12,-1958414417),c=p(c,l,s,a,t[r+10],17,-42063),a=p(a,c,l,s,t[r+11],22,-1990404162),s=p(s,a,c,l,t[r+12],7,1804603682),l=p(l,s,a,c,t[r+13],12,-40341101),c=p(c,l,s,a,t[r+14],17,-1502002290),a=p(a,c,l,s,t[r+15],22,1236535329),s=g(s,a,c,l,t[r+1],5,-165796510),l=g(l,s,a,c,t[r+6],9,-1069501632),c=g(c,l,s,a,t[r+11],14,643717713),a=g(a,c,l,s,t[r],20,-373897302),s=g(s,a,c,l,t[r+5],5,-701558691),l=g(l,s,a,c,t[r+10],9,38016083),c=g(c,l,s,a,t[r+15],14,-660478335),a=g(a,c,l,s,t[r+4],20,-405537848),s=g(s,a,c,l,t[r+9],5,568446438),l=g(l,s,a,c,t[r+14],9,-1019803690),c=g(c,l,s,a,t[r+3],14,-187363961),a=g(a,c,l,s,t[r+8],20,1163531501),s=g(s,a,c,l,t[r+13],5,-1444681467),l=g(l,s,a,c,t[r+2],9,-51403784),c=g(c,l,s,a,t[r+7],14,1735328473),a=g(a,c,l,s,t[r+12],20,-1926607734),s=v(s,a,c,l,t[r+5],4,-378558),l=v(l,s,a,c,t[r+8],11,-2022574463),c=v(c,l,s,a,t[r+11],16,1839030562),a=v(a,c,l,s,t[r+14],23,-35309556),s=v(s,a,c,l,t[r+1],4,-1530992060),l=v(l,s,a,c,t[r+4],11,1272893353),c=v(c,l,s,a,t[r+7],16,-155497632),a=v(a,c,l,s,t[r+10],23,-1094730640),s=v(s,a,c,l,t[r+13],4,681279174),l=v(l,s,a,c,t[r],11,-358537222),c=v(c,l,s,a,t[r+3],16,-722521979),a=v(a,c,l,s,t[r+6],23,76029189),s=v(s,a,c,l,t[r+9],4,-640364487),l=v(l,s,a,c,t[r+12],11,-421815835),c=v(c,l,s,a,t[r+15],16,530742520),a=v(a,c,l,s,t[r+2],23,-995338651),s=y(s,a,c,l,t[r],6,-198630844),l=y(l,s,a,c,t[r+7],10,1126891415),c=y(c,l,s,a,t[r+14],15,-1416354905),a=y(a,c,l,s,t[r+5],21,-57434055),s=y(s,a,c,l,t[r+12],6,1700485571),l=y(l,s,a,c,t[r+3],10,-1894986606),c=y(c,l,s,a,t[r+10],15,-1051523),a=y(a,c,l,s,t[r+1],21,-2054922799),s=y(s,a,c,l,t[r+8],6,1873313359),l=y(l,s,a,c,t[r+15],10,-30611744),c=y(c,l,s,a,t[r+6],15,-1560198380),a=y(a,c,l,s,t[r+13],21,1309151649),s=y(s,a,c,l,t[r+4],6,-145523070),l=y(l,s,a,c,t[r+11],10,-1120210379),c=y(c,l,s,a,t[r+2],15,718787259),a=y(a,c,l,s,t[r+9],21,-343485551),s=e(s,b),a=e(a,w),c=e(c,S),l=e(l,A);return[s,a,c,l]}i(k,"binlMD5");function L(t){var f,r="",b=t.length*32;for(f=0;f<b;f+=8)r+=String.fromCharCode(t[f>>5]>>>f%32&255);return r}i(L,"binl2rstr");function x(t){var f,r=[];for(r[(t.length>>2)-1]=void 0,f=0;f<r.length;f+=1)r[f]=0;var b=t.length*8;for(f=0;f<b;f+=8)r[f>>5]|=(t.charCodeAt(f/8)&255)<<f%32;return r}i(x,"rstr2binl");function I(t){return L(k(x(t),t.length*8))}i(I,"rstrMD5");function E(t,f){var r,b=x(t),w=[],S=[],A;for(w[15]=S[15]=void 0,b.length>16&&(b=k(b,t.length*8)),r=0;r<16;r+=1)w[r]=b[r]^909522486,S[r]=b[r]^1549556828;return A=k(w.concat(x(f)),512+f.length*8),L(k(S.concat(A),640))}i(E,"rstrHMACMD5");function P(t){var f="0123456789abcdef",r="",b,w;for(w=0;w<t.length;w+=1)b=t.charCodeAt(w),r+=f.charAt(b>>>4&15)+f.charAt(b&15);return r}i(P,"rstr2hex");function T(t){return unescape(encodeURIComponent(t))}i(T,"str2rstrUTF8");function u(t){return I(T(t))}i(u,"rawMD5");function d(t){return P(u(t))}i(d,"hexMD5");function _(t,f){return E(T(t),T(f))}i(_,"rawHMACMD5");function m(t,f){return P(_(t,f))}i(m,"hexHMACMD5");function C(t,f,r){return f?r?_(f,t):m(f,t):r?u(t):d(t)}i(C,"md5"),typeof define=="function"&&define.amd?define(function(){return C}):typeof O=="object"&&O.exports?O.exports=C:n.md5=C})(X)});var ee=z((M,Q)=>{"use strict";(function(n,e){typeof M=="object"?Q.exports=M=e():typeof define=="function"&&define.amd?define([],e):n.CryptoJS=e()})(M,function(){var n=n||(function(e,o){var h=Object.create||(function(){function u(){}return i(u,"F"),function(d){var _;return u.prototype=d,_=new u,u.prototype=null,_}})(),p={},g=p.lib={},v=g.Base=(function(){return{extend:i(function(u){var d=h(this);return u&&d.mixIn(u),(!d.hasOwnProperty("init")||this.init===d.init)&&(d.init=function(){d.$super.init.apply(this,arguments)}),d.init.prototype=d,d.$super=this,d},"extend"),create:i(function(){var u=this.extend();return u.init.apply(u,arguments),u},"create"),init:i(function(){},"init"),mixIn:i(function(u){for(var d in u)u.hasOwnProperty(d)&&(this[d]=u[d]);u.hasOwnProperty("toString")&&(this.toString=u.toString)},"mixIn"),clone:i(function(){return this.init.prototype.extend(this)},"clone")}})(),y=g.WordArray=v.extend({init:i(function(u,d){u=this.words=u||[],d!=o?this.sigBytes=d:this.sigBytes=u.length*4},"init"),toString:i(function(u){return(u||L).stringify(this)},"toString"),concat:i(function(u){var d=this.words,_=u.words,m=this.sigBytes,C=u.sigBytes;if(this.clamp(),m%4)for(var t=0;t<C;t++){var f=_[t>>>2]>>>24-t%4*8&255;d[m+t>>>2]|=f<<24-(m+t)%4*8}else for(var t=0;t<C;t+=4)d[m+t>>>2]=_[t>>>2];return this.sigBytes+=C,this},"concat"),clamp:i(function(){var u=this.words,d=this.sigBytes;u[d>>>2]&=4294967295<<32-d%4*8,u.length=e.ceil(d/4)},"clamp"),clone:i(function(){var u=v.clone.call(this);return u.words=this.words.slice(0),u},"clone"),random:i(function(u){for(var d=[],_=i(function(r){var r=r,b=987654321,w=4294967295;return function(){b=36969*(b&65535)+(b>>16)&w,r=18e3*(r&65535)+(r>>16)&w;var S=(b<<16)+r&w;return S/=4294967296,S+=.5,S*(e.random()>.5?1:-1)}},"r"),m=0,C;m<u;m+=4){var t=_((C||e.random())*4294967296);C=t()*987654071,d.push(t()*4294967296|0)}return new y.init(d,u)},"random")}),k=p.enc={},L=k.Hex={stringify:i(function(u){for(var d=u.words,_=u.sigBytes,m=[],C=0;C<_;C++){var t=d[C>>>2]>>>24-C%4*8&255;m.push((t>>>4).toString(16)),m.push((t&15).toString(16))}return m.join("")},"stringify"),parse:i(function(u){for(var d=u.length,_=[],m=0;m<d;m+=2)_[m>>>3]|=parseInt(u.substr(m,2),16)<<24-m%8*4;return new y.init(_,d/2)},"parse")},x=k.Latin1={stringify:i(function(u){for(var d=u.words,_=u.sigBytes,m=[],C=0;C<_;C++){var t=d[C>>>2]>>>24-C%4*8&255;m.push(String.fromCharCode(t))}return m.join("")},"stringify"),parse:i(function(u){for(var d=u.length,_=[],m=0;m<d;m++)_[m>>>2]|=(u.charCodeAt(m)&255)<<24-m%4*8;return new y.init(_,d)},"parse")},I=k.Utf8={stringify:i(function(u){try{return decodeURIComponent(escape(x.stringify(u)))}catch{throw new Error("Malformed UTF-8 data")}},"stringify"),parse:i(function(u){return x.parse(unescape(encodeURIComponent(u)))},"parse")},E=g.BufferedBlockAlgorithm=v.extend({reset:i(function(){this._data=new y.init,this._nDataBytes=0},"reset"),_append:i(function(u){typeof u=="string"&&(u=I.parse(u)),this._data.concat(u),this._nDataBytes+=u.sigBytes},"_append"),_process:i(function(u){var d=this._data,_=d.words,m=d.sigBytes,C=this.blockSize,t=C*4,f=m/t;u?f=e.ceil(f):f=e.max((f|0)-this._minBufferSize,0);var r=f*C,b=e.min(r*4,m);if(r){for(var w=0;w<r;w+=C)this._doProcessBlock(_,w);var S=_.splice(0,r);d.sigBytes-=b}return new y.init(S,b)},"_process"),clone:i(function(){var u=v.clone.call(this);return u._data=this._data.clone(),u},"clone"),_minBufferSize:0}),P=g.Hasher=E.extend({cfg:v.extend(),init:i(function(u){this.cfg=this.cfg.extend(u),this.reset()},"init"),reset:i(function(){E.reset.call(this),this._doReset()},"reset"),update:i(function(u){return this._append(u),this._process(),this},"update"),finalize:i(function(u){u&&this._append(u);var d=this._doFinalize();return d},"finalize"),blockSize:512/32,_createHelper:i(function(u){return function(d,_){return new u.init(_).finalize(d)}},"_createHelper"),_createHmacHelper:i(function(u){return function(d,_){return new T.HMAC.init(u,_).finalize(d)}},"_createHmacHelper")}),T=p.algo={};return p})(Math);return n})});var ne=z((H,te)=>{"use strict";(function(n,e){typeof H=="object"?te.exports=H=e(ee()):typeof define=="function"&&define.amd?define(["./core"],e):e(n.CryptoJS)})(H,function(n){return(function(){var e=n,o=e.lib,h=o.WordArray,p=o.Hasher,g=e.algo,v=[],y=g.SHA1=p.extend({_doReset:i(function(){this._hash=new h.init([1732584193,4023233417,2562383102,271733878,3285377520])},"_doReset"),_doProcessBlock:i(function(k,L){for(var x=this._hash.words,I=x[0],E=x[1],P=x[2],T=x[3],u=x[4],d=0;d<80;d++){if(d<16)v[d]=k[L+d]|0;else{var _=v[d-3]^v[d-8]^v[d-14]^v[d-16];v[d]=_<<1|_>>>31}var m=(I<<5|I>>>27)+u+v[d];d<20?m+=(E&P|~E&T)+1518500249:d<40?m+=(E^P^T)+1859775393:d<60?m+=(E&P|E&T|P&T)-1894007588:m+=(E^P^T)-899497514,u=T,T=P,P=E<<30|E>>>2,E=I,I=m}x[0]=x[0]+I|0,x[1]=x[1]+E|0,x[2]=x[2]+P|0,x[3]=x[3]+T|0,x[4]=x[4]+u|0},"_doProcessBlock"),_doFinalize:i(function(){var k=this._data,L=k.words,x=this._nDataBytes*8,I=k.sigBytes*8;return L[I>>>5]|=128<<24-I%32,L[(I+64>>>9<<4)+14]=Math.floor(x/4294967296),L[(I+64>>>9<<4)+15]=x,k.sigBytes=L.length*4,this._process(),this._hash},"_doFinalize"),clone:i(function(){var k=p.clone.call(this);return k._hash=this._hash.clone(),k},"clone")});e.SHA1=p._createHelper(y),e.HmacSHA1=p._createHmacHelper(y)})(),n.SHA1})});var nt={};Ee(nt,{TrackKey:()=>$,name:()=>tt,reportTeaEvent:()=>U,version:()=>et});var se=q(Y(),1),ae=q(ne(),1);function B(){return window.appId||null}i(B,"getAppId");function Te(){var o;let n="suda-csrf-token",e=document.cookie.split("; ");for(let h of e){let[p,g]=h.split("=");if(p===n)return decodeURIComponent(g)}return(o=window.csrfToken)!=null?o:null}i(Te,"getCsrfToken");function W(){let n=globalThis.CLIENT_BASE_PATH||"/";return/^\/app\/[^/]/.test(n)}i(W,"isNewPathEnabled");function F(){switch(globalThis.ENVIRONMENT){case"gray":return"PRE";case"online":return"ONLINE";default:return"BOE"}}i(F,"getEnv");function re(){return window.appEnv!=null?window.appEnv==="runtime":!0}i(re,"isOnlineEnv");function N(){let n=navigator.userAgent,e=/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i.test(n),o=/iPad|Tab|Tablet/i.test(n)&&navigator.maxTouchPoints>1;return e||o}i(N,"isMobile");async function ie(){var h;let n=B();if(!n)return{code:1,msg:"appId is required",data:{}};let e=W()?`/app/${n}/__runtime__/api/v1/studio/lark/user_info`:`/spark/b/${n}/lark/user_info`;return await(await fetch(e,{headers:{"X-Suda-Csrf-Token":(h=Te())!=null?h:""}})).json()}i(ie,"getLarkUserInfo");var $={VIEW:"aily_agent_artifact_page_view"},Ae="08a441",Pe="42b91e";function oe(n){let e=String(n);return(0,ae.default)(Ae+(0,se.default)(e+Pe)).toString()}i(oe,"encryptTea");var j=!1;async function Le(){var g,v,y,k;let{data:n}=await ie(),{tenantID:e,userID:o}=n||{},h=o&&o!=="0"?oe(o):void 0,p=e&&e!=="0"?oe(e):void 0;(g=window.collectEvent)==null||g.call(window,"init",{app_id:788827,channel:"cn",disable_auto_pv:!1,enable_ab_test:!1,enable_debug:!1,enable_stay_duration:!0,reportTime:1e3}),(y=window.collectEvent)==null||y.call(window,"config",{user_unique_id:h,device_type:N()?"mobile":"pc",evtParams:{open_from:(v=new URLSearchParams(window.location.search).get("open-from"))!=null?v:void 0,env:F(),user_id:h,tenant_id:p}}),j=!0,(k=window.collectEvent)==null||k.call(window,"start")}i(Le,"createTracker");async function U({trackKey:n,trackParams:e={}}){var o;try{j||(j=!0,await Le()),(o=window.collectEvent)==null||o.call(window,n,e)}catch(h){console.error(h)}}i(U,"reportTeaEvent");function ce(){return U({trackKey:$.VIEW,trackParams:{artifact_uid:B(),agent_id:"agent_miaoda",url:window.location.href}})}i(ce,"reportPageView");function le(){if(typeof crypto!="undefined"&&crypto.getRandomValues){let e=new Uint8Array(8);return crypto.getRandomValues(e),Array.from(e).map(o=>o.toString(16).padStart(2,"0")).join("")}let n="";for(let e=0;e<16;e++)n+=Math.floor(Math.random()*16).toString(16);return n}i(le,"generateUUID");var ue="x_sdk_device_id";function Be(){try{let n=localStorage.getItem(ue);return n||(n=le(),localStorage.setItem(ue,n)),n}catch{return le()}}i(Be,"getDeviceId");function De(){let n=typeof navigator!="undefined"?navigator.userAgent:"";return n&&(/Android/i.test(n)&&/Mobile/i.test(n)||/iPhone|iPod/i.test(n)||/BlackBerry|IEMobile|Opera Mini/i.test(n))?"mobile":"desktop"}i(De,"getDeviceType");var Re="pageSessionID";function Oe(){try{return new URLSearchParams(window.location.search).get(Re)||""}catch{return""}}i(Oe,"getPvId");function Me(n={}){let e=n.pvId||Oe();return{app_id:window.appId||"",tenant_id:window.tenantId||"",user_id:window.userId||"",did:Be(),module:"app_web",app_env:"runtime",source_type:"user",device_type:De(),release_commit_id:window.__RELEASE_COMMIT_ID__||"",...e?{pv_id:e}:{}}}i(Me,"getDefaultAttributes");function de(n){let e=Math.round(n);if(!Number.isFinite(e))throw new RangeError(`toNanoString: \u975E\u6CD5\u65F6\u95F4\u6233 ${n}`);return typeof BigInt!="function"?e===0?"0":`${e}000000`:String(BigInt(e)*BigInt(1e6))}i(de,"toNanoString");var He="1.0.1";function Fe(n,e){let o=Me(e),h=de(Date.now());return{metricsData:{resource:{attributes:{sdk_version:He,sdk_lang:"javascript",sdk_type:"client-frontend"}},metrics:[{name:"apaas_internal_metrics_pv_uv",description:"Count of page views",unit:"",scopeName:"apaas_internal_metrics_pv_uv",sum:{aggregationTemporality:1,isMonotonic:!0,dataPoints:n.map(p=>({attributes:{...o,url:p.url,path:p.path,referrer:p.referrer},startTimeUnixNano:de(p.timestampMs),timeUnixNano:h,asDouble:1}))}}]}}}i(Fe,"buildPayload");function Ne(n,e,o={},h){if(e.length===0)return;let p;try{p=JSON.stringify(Fe(e,h))}catch{return}try{fetch(n,{method:"POST",headers:{"Content-Type":"application/json","X-Suda-Csrf-Token":window.csrfToken||"",...o},body:p,keepalive:!0}).catch(()=>{})}catch{}}i(Ne,"sendPvData");var V="__APAAS_PV_TRACKER_STARTED__";function ze(){try{let n=window;return n[V]?!1:(n[V]=!0,!0)}catch{return!0}}i(ze,"claimPvReporting");function fe(){try{window[V]=!1}catch{}}i(fe,"releasePvReporting");var D,We=(D=class{constructor(){this.started=!1,this.disposers=[],this.holdsPvReporting=!1,this.buffer=[]}static get instance(){return this._instance||(this._instance=new D),this._instance}start(e){var o;if(!this.started&&ze()){this.holdsPvReporting=!0,this.config=e,this.started=!0;try{this.listenRouteChanges(),this.registerLifecycleListeners();let h=(o=e.flushIntervalMs)!=null?o:1e4;this.flushTimer=setInterval(()=>this.flush(),h)}catch(h){throw this.started=!1,this.flushTimer&&(clearInterval(this.flushTimer),this.flushTimer=void 0),this.holdsPvReporting=!1,fe(),h}}}shutdown(){this.flush(),this.flushTimer&&(clearInterval(this.flushTimer),this.flushTimer=void 0),this.firstFlushTimer&&(clearTimeout(this.firstFlushTimer),this.firstFlushTimer=void 0),this.started=!1;for(let e of this.disposers.splice(0))try{e()}catch{}this.holdsPvReporting&&(this.holdsPvReporting=!1,fe())}pageKey(){let{origin:e,pathname:o,search:h}=window.location;return`${e}${o}${h}`}scheduleFirstFlush(){var e;let o=(e=this.config)==null?void 0:e.firstFlushDelayMs;o==null||this.firstFlushTimer||(this.firstFlushTimer=setTimeout(()=>this.flush(),o))}recordPv(){let e=this.pageKey();this.lastKey!==e&&(this.lastKey=e,this.buffer.push({url:window.location.href,path:window.location.pathname,referrer:document.referrer,timestampMs:Date.now()}),this.scheduleFirstFlush())}flush(){if(!this.config||this.buffer.length===0)return;let e=this.buffer.splice(0);Ne(this.config.collectorUrl,e,this.config.headers,{pvId:this.config.pvId})}listenRouteChanges(){this.recordPv();let e=i(()=>this.recordPv(),"onPopState");window.addEventListener("popstate",e),this.disposers.push(()=>window.removeEventListener("popstate",e)),this.patchHistory("pushState"),this.patchHistory("replaceState")}patchHistory(e){let o=history[e],h=i(()=>this.recordPv(),"recordPv");history[e]=function(...p){let g=o.apply(this,p);return h(),g},this.disposers.push(()=>{history[e]=o})}registerLifecycleListeners(){let e=i(()=>{document.visibilityState==="hidden"&&this.flush()},"onVisibilityChange");document.addEventListener("visibilitychange",e),this.disposers.push(()=>document.removeEventListener("visibilitychange",e));let o=i(()=>this.flush(),"onPageHide");window.addEventListener("pagehide",o),this.disposers.push(()=>window.removeEventListener("pagehide",o))}},i(D,"_PvTracker"),D),pe=We.instance;function he(){var o;let n=(o=B())!=null?o:"",e=W()?`/app/${n}/__runtime__/api/v1/observability/metrics/collect`:`/spark/app/${n}/runtime/api/v1/observability/metrics/collect`;pe.start({collectorUrl:e})}i(he,"initPvTracking");var je="https://lf3-static.bytednsdoc.com/obj/eden-cn/LMfspH/ljhwZthlaukjlkulzlp/miaoda-ui",$e=`${je}/doubao.svg`,Ue='<svg viewBox="0 0 10 10" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M8.08312 8.08298C8.2384 7.92769 8.23953 7.67705 8.08424 7.52176L5.3625 4.80002L8.08422 2.07829C8.23951 1.92301 8.23839 1.67236 8.0831 1.51708C7.92781 1.36179 7.67717 1.36066 7.52188 1.51595C7.36659 1.67124 4.80016 4.23767 4.80016 4.23767L2.07841 1.51593C1.92313 1.36064 1.67248 1.36177 1.5172 1.51705C1.36191 1.67234 1.36078 1.92298 1.51607 2.07827L4.23782 4.80002L1.51605 7.52178C1.36076 7.67707 1.36189 7.92771 1.51718 8.083C1.67246 8.23829 1.92311 8.23941 2.07839 8.08412L4.80016 5.36236L7.5219 8.0841C7.67719 8.23939 7.92783 8.23826 8.08312 8.08298Z" fill="currentColor"/></svg>',Ve='<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M12.6667 2H3.33333V14H6.66667V15.3334H3.33333C2.59695 15.3334 2 14.7364 2 14V2C2 1.26364 2.59695 0.666687 3.33333 0.666687H12.6667C13.403 0.666687 14 1.26364 14 2V7.33335H12.6667V2Z" fill="currentColor"/><path d="M5.33333 4.66669C4.96514 4.66669 4.66667 4.96516 4.66667 5.33335C4.66667 5.70154 4.96514 6 5.33333 6H10.6667C11.0349 6 11.3333 5.70154 11.3333 5.33335C11.3333 4.96516 11.0349 4.66669 10.6667 4.66669H5.33333Z" fill="currentColor"/><path d="M4.66667 8.33335C4.66667 7.96516 4.96514 7.66669 5.33333 7.66669H8C8.36819 7.66669 8.66667 7.96516 8.66667 8.33335C8.66667 8.70154 8.36819 9 8 9H5.33333C4.96514 9 4.66667 8.70154 4.66667 8.33335Z" fill="currentColor"/><path d="M13.5523 8.70017C13.9428 8.30964 14.576 8.30964 14.9665 8.70017C15.357 9.09069 15.357 9.72386 14.9665 10.1144L14.2594 10.8215L12.8452 9.40728L13.5523 8.70017Z" fill="currentColor"/><path d="M12.1381 10.1144L13.5523 11.5286L10.2309 14.85C10.0916 14.9892 9.91229 15.0815 9.71798 15.1138L8.45737 15.3234C8.42136 15.3294 8.38467 15.3177 8.35885 15.2918C8.33271 15.2657 8.32099 15.2284 8.32749 15.192L8.55128 13.9374C8.58465 13.7502 8.6746 13.5779 8.80901 13.4435L12.1381 10.1144Z" fill="currentColor"/></svg>',ge=!0,Ke="\u8C46\u5305 AI \u751F\u6210",Ze="\u7531\u98DE\u4E66\u5999\u642D\u63D0\u4F9B\u652F\u6301",Ge="0px 8px 32px rgba(0,0,0,0.08), 0px 4px 16px rgba(0,0,0,0.04), 0px 2px 4px rgba(0,0,0,0.02)",Je="0px 4px 16px rgba(0,0,0,0.03), 0px 4px 10px rgba(0,0,0,0.03), 0px 2px 4px rgba(0,0,0,0.02)",Z="'PingFang SC', -apple-system, BlinkMacSystemFont, sans-serif",qe={BOE:"tns.feishu-boe.cn",PRE:"tns.feishu-pre.cn",ONLINE:"tns.feishu.cn"};function me(){var o;let n=JSON.stringify({scene:"miaoda_app_report",entity_id:(o=B())!=null?o:"",entity_type:"miaoda_app",extra:""}),e=`https://${qe[F()]}/cust/lark_report/?type=common¶ms=${encodeURIComponent(n)}&lang=zh-CN`;window.open(e,"_blank","noopener,noreferrer")}i(me,"openDoubaoReport");function be(n){let e=document.createElement("span");Object.assign(e.style,{display:"inline-flex",width:`${n}px`,height:`${n}px`,flexShrink:"0"}),e.innerHTML=Ue;let o=e.firstElementChild;return o&&(o.setAttribute("width",String(n)),o.setAttribute("height",String(n)),o.style.display="block"),e}i(be,"makeCloseIcon");function Xe(n){let e=document.createElement("img");return e.src=$e,e.width=n,e.height=n,e.alt="",Object.assign(e.style,{width:`${n}px`,height:`${n}px`,maxWidth:"none",maxHeight:"none",borderRadius:"100px",flexShrink:"0",display:"block"}),e}i(Xe,"makeAvatar");function ye(n,e){let o=n==="desktop",h=document.createElement("div");Object.assign(h.style,{boxSizing:"border-box",display:"inline-flex",alignItems:"center",gap:o?"4px":"6px",padding:o?"6px 12px 6px 8px":"4px 12px 4px 8px",background:"#363636",border:"0.5px solid rgba(255,255,255,0.1)",borderRadius:"100px",boxShadow:Ge,cursor:"pointer"});let p=Xe(o?16:18),g=document.createElement("span");if(g.textContent=Ke,Object.assign(g.style,{fontFamily:Z,fontSize:o?"12px":"14px",lineHeight:o?"18px":"22px",color:"rgba(255,255,255,0.85)",whiteSpace:"nowrap"}),h.append(p,g),o&&e){let v=document.createElement("span");v.setAttribute("role","button"),v.setAttribute("aria-label","\u5173\u95ED"),v.setAttribute("data-doubao-close",""),Object.assign(v.style,{display:"none",alignItems:"center",cursor:"pointer",flexShrink:"0",color:"rgba(255,255,255,0.5)"}),v.appendChild(be(10)),v.addEventListener("click",y=>{y.stopPropagation(),e()}),h.appendChild(v)}return h}i(ye,"buildPill");function K(n){let e=document.createElement("div");e.setAttribute("role","menuitem"),e.setAttribute("data-label",n.label),Object.assign(e.style,{boxSizing:"border-box",display:"flex",alignItems:"center",gap:"8px",padding:"4px 10px",borderRadius:"6px",cursor:"pointer",color:"#000000"});let o=document.createElement("span");Object.assign(o.style,{display:"inline-flex",width:"16px",height:"16px",flexShrink:"0",color:"#000000"}),n.icon==="feedback"?o.innerHTML=Ve:o.appendChild(be(16));let h=document.createElement("span");return h.textContent=n.label,Object.assign(h.style,{fontFamily:Z,fontSize:`${n.fontSize}px`,lineHeight:`${n.fontSize+8}px`,color:"#000000",whiteSpace:"nowrap"}),e.append(o,h),e.addEventListener("mouseenter",()=>{e.style.background="rgba(0,0,0,0.04)"}),e.addEventListener("mouseleave",()=>{e.style.background="transparent"}),e.addEventListener("click",n.onClick),e}i(K,"buildMenuRow");function _e(n){let e=document.createElement("div");if(Object.assign(e.style,{boxSizing:"border-box",display:"flex",flexDirection:"column",minWidth:`${n.minWidth}px`,background:"#ffffff",border:"0.5px solid rgba(0,0,0,0.1)",borderRadius:"10px",boxShadow:Je,overflow:"hidden",outline:"none"}),n.rows.length){let h=document.createElement("div");Object.assign(h.style,{boxSizing:"border-box",padding:"4px"}),n.rows.forEach(p=>h.appendChild(p)),e.appendChild(h)}let o=document.createElement("div");return o.textContent=Ze,Object.assign(o.style,{boxSizing:"border-box",background:"#f9f9f9",padding:"8px 14px",fontFamily:Z,fontSize:`${n.footerFontSize}px`,lineHeight:`${n.footerFontSize+8}px`,color:"rgba(0,0,0,0.35)",whiteSpace:"nowrap"}),e.appendChild(o),e}i(_e,"buildMenuCard");function Ye(){let n=document.createElement("div");n.setAttribute("data-custom-element","doubao-watermark"),Object.assign(n.style,{position:"fixed",right:"12px",bottom:"12px",zIndex:"9999",display:"flex",flexDirection:"column",alignItems:"flex-end",gap:"8px"});let e=[];ge&&e.push(K({icon:"feedback",label:"\u6295\u8BC9\u4E0E\u4E3E\u62A5",fontSize:14,onClick:me}));let o=_e({rows:e,footerFontSize:12,minWidth:144});o.style.display="none";let h=ye("desktop",()=>n.remove()),p=h.querySelector("[data-doubao-close]");n.append(o,h);let g=null;return n.addEventListener("mouseenter",()=>{g&&clearTimeout(g),o.style.display="flex",p&&(p.style.display="inline-flex")}),n.addEventListener("mouseleave",()=>{g=setTimeout(()=>{o.style.display="none",p&&(p.style.display="none")},100)}),n}i(Ye,"buildDesktopWatermark");function Qe(){let n=document.createElement("div");n.setAttribute("data-custom-element","doubao-watermark-mobile"),Object.assign(n.style,{position:"fixed",right:"12px",bottom:"12px",zIndex:"9999",display:"flex",flexDirection:"column",alignItems:"flex-end",gap:"8px",cursor:"pointer"});let e=[];ge&&e.push(K({icon:"feedback",label:"\u6295\u8BC9\u4E0E\u4E3E\u62A5",fontSize:16,onClick:me})),e.push(K({icon:"close",label:"\u4E0D\u518D\u5C55\u793A",fontSize:16,onClick:i(p=>{p.stopPropagation(),n.remove()},"onClick")}));let o=_e({rows:e,footerFontSize:14,minWidth:160});o.style.display="none";let h=ye("mobile");return n.append(o,h),n.addEventListener("click",p=>{p.stopPropagation(),o.style.display=o.style.display==="none"?"flex":"none"}),document.addEventListener("click",()=>{o.style.display="none"}),n}i(Qe,"buildMobileWatermark");var ve=!1;function G(){if(ve||typeof document=="undefined")return;if(document.readyState==="loading"){document.addEventListener("DOMContentLoaded",G,{once:!0});return}ve=!0;let n=N()?Qe():Ye();document.body.appendChild(n)}i(G,"mountDoubaoWatermark");var et="0.0.12",tt="@lark-apaas/miaoda-coding-sdk";re()&&(ce(),he());G();return Ie(nt);})();
|
package/dist/runtime.dev.js
CHANGED
|
@@ -1166,7 +1166,7 @@ var MiaodaRuntime = (() => {
|
|
|
1166
1166
|
return String(BigInt(msInt) * BigInt(1e6));
|
|
1167
1167
|
}
|
|
1168
1168
|
__name(toNanoString, "toNanoString");
|
|
1169
|
-
var SDK_VERSION = "1.0.
|
|
1169
|
+
var SDK_VERSION = "1.0.1";
|
|
1170
1170
|
function buildPayload(dataPoints, overrides) {
|
|
1171
1171
|
const defaultAttrs = getDefaultAttributes(overrides);
|
|
1172
1172
|
const nowNs = toNanoString(Date.now());
|
|
@@ -1711,7 +1711,7 @@ var MiaodaRuntime = (() => {
|
|
|
1711
1711
|
__name(mountDoubaoWatermark, "mountDoubaoWatermark");
|
|
1712
1712
|
|
|
1713
1713
|
// src/runtime.ts
|
|
1714
|
-
var version = "0.0.12
|
|
1714
|
+
var version = "0.0.12";
|
|
1715
1715
|
var name = "@lark-apaas/miaoda-coding-sdk";
|
|
1716
1716
|
if (isOnlineEnv()) {
|
|
1717
1717
|
reportPageView();
|
package/dist/runtime.js
CHANGED
|
@@ -1166,7 +1166,7 @@ var MiaodaRuntime = (() => {
|
|
|
1166
1166
|
return String(BigInt(msInt) * BigInt(1e6));
|
|
1167
1167
|
}
|
|
1168
1168
|
__name(toNanoString, "toNanoString");
|
|
1169
|
-
var SDK_VERSION = "1.0.
|
|
1169
|
+
var SDK_VERSION = "1.0.1";
|
|
1170
1170
|
function buildPayload(dataPoints, overrides) {
|
|
1171
1171
|
const defaultAttrs = getDefaultAttributes(overrides);
|
|
1172
1172
|
const nowNs = toNanoString(Date.now());
|
|
@@ -1711,7 +1711,7 @@ var MiaodaRuntime = (() => {
|
|
|
1711
1711
|
__name(mountDoubaoWatermark, "mountDoubaoWatermark");
|
|
1712
1712
|
|
|
1713
1713
|
// src/runtime.ts
|
|
1714
|
-
var version = "0.0.12
|
|
1714
|
+
var version = "0.0.12";
|
|
1715
1715
|
var name = "@lark-apaas/miaoda-coding-sdk";
|
|
1716
1716
|
if (isOnlineEnv()) {
|
|
1717
1717
|
reportPageView();
|
package/dist/runtime.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var MiaodaRuntime=(()=>{var we=Object.create;var R=Object.defineProperty;var xe=Object.getOwnPropertyDescriptor;var Ce=Object.getOwnPropertyNames;var Se=Object.getPrototypeOf,ke=Object.prototype.hasOwnProperty;var i=(n,e)=>R(n,"name",{value:e,configurable:!0});var z=(n,e)=>()=>(e||n((e={exports:{}}).exports,e),e.exports),Ee=(n,e)=>{for(var o in e)R(n,o,{get:e[o],enumerable:!0})},J=(n,e,o,h)=>{if(e&&typeof e=="object"||typeof e=="function")for(let p of Ce(e))!ke.call(n,p)&&p!==o&&R(n,p,{get:()=>e[p],enumerable:!(h=xe(e,p))||h.enumerable});return n};var q=(n,e,o)=>(o=n!=null?we(Se(n)):{},J(e||!n||!n.__esModule?R(o,"default",{value:n,enumerable:!0}):o,n)),Ie=n=>J(R({},"__esModule",{value:!0}),n);var Y=z((X,O)=>{"use strict";(function(n){"use strict";function e(t,f){var r=(t&65535)+(f&65535),b=(t>>16)+(f>>16)+(r>>16);return b<<16|r&65535}i(e,"safeAdd");function o(t,f){return t<<f|t>>>32-f}i(o,"bitRotateLeft");function h(t,f,r,b,w,S){return e(o(e(e(f,t),e(b,S)),w),r)}i(h,"md5cmn");function p(t,f,r,b,w,S,A){return h(f&r|~f&b,t,f,w,S,A)}i(p,"md5ff");function g(t,f,r,b,w,S,A){return h(f&b|r&~b,t,f,w,S,A)}i(g,"md5gg");function v(t,f,r,b,w,S,A){return h(f^r^b,t,f,w,S,A)}i(v,"md5hh");function y(t,f,r,b,w,S,A){return h(r^(f|~b),t,f,w,S,A)}i(y,"md5ii");function k(t,f){t[f>>5]|=128<<f%32,t[(f+64>>>9<<4)+14]=f;var r,b,w,S,A,s=1732584193,a=-271733879,c=-1732584194,l=271733878;for(r=0;r<t.length;r+=16)b=s,w=a,S=c,A=l,s=p(s,a,c,l,t[r],7,-680876936),l=p(l,s,a,c,t[r+1],12,-389564586),c=p(c,l,s,a,t[r+2],17,606105819),a=p(a,c,l,s,t[r+3],22,-1044525330),s=p(s,a,c,l,t[r+4],7,-176418897),l=p(l,s,a,c,t[r+5],12,1200080426),c=p(c,l,s,a,t[r+6],17,-1473231341),a=p(a,c,l,s,t[r+7],22,-45705983),s=p(s,a,c,l,t[r+8],7,1770035416),l=p(l,s,a,c,t[r+9],12,-1958414417),c=p(c,l,s,a,t[r+10],17,-42063),a=p(a,c,l,s,t[r+11],22,-1990404162),s=p(s,a,c,l,t[r+12],7,1804603682),l=p(l,s,a,c,t[r+13],12,-40341101),c=p(c,l,s,a,t[r+14],17,-1502002290),a=p(a,c,l,s,t[r+15],22,1236535329),s=g(s,a,c,l,t[r+1],5,-165796510),l=g(l,s,a,c,t[r+6],9,-1069501632),c=g(c,l,s,a,t[r+11],14,643717713),a=g(a,c,l,s,t[r],20,-373897302),s=g(s,a,c,l,t[r+5],5,-701558691),l=g(l,s,a,c,t[r+10],9,38016083),c=g(c,l,s,a,t[r+15],14,-660478335),a=g(a,c,l,s,t[r+4],20,-405537848),s=g(s,a,c,l,t[r+9],5,568446438),l=g(l,s,a,c,t[r+14],9,-1019803690),c=g(c,l,s,a,t[r+3],14,-187363961),a=g(a,c,l,s,t[r+8],20,1163531501),s=g(s,a,c,l,t[r+13],5,-1444681467),l=g(l,s,a,c,t[r+2],9,-51403784),c=g(c,l,s,a,t[r+7],14,1735328473),a=g(a,c,l,s,t[r+12],20,-1926607734),s=v(s,a,c,l,t[r+5],4,-378558),l=v(l,s,a,c,t[r+8],11,-2022574463),c=v(c,l,s,a,t[r+11],16,1839030562),a=v(a,c,l,s,t[r+14],23,-35309556),s=v(s,a,c,l,t[r+1],4,-1530992060),l=v(l,s,a,c,t[r+4],11,1272893353),c=v(c,l,s,a,t[r+7],16,-155497632),a=v(a,c,l,s,t[r+10],23,-1094730640),s=v(s,a,c,l,t[r+13],4,681279174),l=v(l,s,a,c,t[r],11,-358537222),c=v(c,l,s,a,t[r+3],16,-722521979),a=v(a,c,l,s,t[r+6],23,76029189),s=v(s,a,c,l,t[r+9],4,-640364487),l=v(l,s,a,c,t[r+12],11,-421815835),c=v(c,l,s,a,t[r+15],16,530742520),a=v(a,c,l,s,t[r+2],23,-995338651),s=y(s,a,c,l,t[r],6,-198630844),l=y(l,s,a,c,t[r+7],10,1126891415),c=y(c,l,s,a,t[r+14],15,-1416354905),a=y(a,c,l,s,t[r+5],21,-57434055),s=y(s,a,c,l,t[r+12],6,1700485571),l=y(l,s,a,c,t[r+3],10,-1894986606),c=y(c,l,s,a,t[r+10],15,-1051523),a=y(a,c,l,s,t[r+1],21,-2054922799),s=y(s,a,c,l,t[r+8],6,1873313359),l=y(l,s,a,c,t[r+15],10,-30611744),c=y(c,l,s,a,t[r+6],15,-1560198380),a=y(a,c,l,s,t[r+13],21,1309151649),s=y(s,a,c,l,t[r+4],6,-145523070),l=y(l,s,a,c,t[r+11],10,-1120210379),c=y(c,l,s,a,t[r+2],15,718787259),a=y(a,c,l,s,t[r+9],21,-343485551),s=e(s,b),a=e(a,w),c=e(c,S),l=e(l,A);return[s,a,c,l]}i(k,"binlMD5");function L(t){var f,r="",b=t.length*32;for(f=0;f<b;f+=8)r+=String.fromCharCode(t[f>>5]>>>f%32&255);return r}i(L,"binl2rstr");function x(t){var f,r=[];for(r[(t.length>>2)-1]=void 0,f=0;f<r.length;f+=1)r[f]=0;var b=t.length*8;for(f=0;f<b;f+=8)r[f>>5]|=(t.charCodeAt(f/8)&255)<<f%32;return r}i(x,"rstr2binl");function I(t){return L(k(x(t),t.length*8))}i(I,"rstrMD5");function E(t,f){var r,b=x(t),w=[],S=[],A;for(w[15]=S[15]=void 0,b.length>16&&(b=k(b,t.length*8)),r=0;r<16;r+=1)w[r]=b[r]^909522486,S[r]=b[r]^1549556828;return A=k(w.concat(x(f)),512+f.length*8),L(k(S.concat(A),640))}i(E,"rstrHMACMD5");function P(t){var f="0123456789abcdef",r="",b,w;for(w=0;w<t.length;w+=1)b=t.charCodeAt(w),r+=f.charAt(b>>>4&15)+f.charAt(b&15);return r}i(P,"rstr2hex");function T(t){return unescape(encodeURIComponent(t))}i(T,"str2rstrUTF8");function u(t){return I(T(t))}i(u,"rawMD5");function d(t){return P(u(t))}i(d,"hexMD5");function _(t,f){return E(T(t),T(f))}i(_,"rawHMACMD5");function m(t,f){return P(_(t,f))}i(m,"hexHMACMD5");function C(t,f,r){return f?r?_(f,t):m(f,t):r?u(t):d(t)}i(C,"md5"),typeof define=="function"&&define.amd?define(function(){return C}):typeof O=="object"&&O.exports?O.exports=C:n.md5=C})(X)});var ee=z((M,Q)=>{"use strict";(function(n,e){typeof M=="object"?Q.exports=M=e():typeof define=="function"&&define.amd?define([],e):n.CryptoJS=e()})(M,function(){var n=n||(function(e,o){var h=Object.create||(function(){function u(){}return i(u,"F"),function(d){var _;return u.prototype=d,_=new u,u.prototype=null,_}})(),p={},g=p.lib={},v=g.Base=(function(){return{extend:i(function(u){var d=h(this);return u&&d.mixIn(u),(!d.hasOwnProperty("init")||this.init===d.init)&&(d.init=function(){d.$super.init.apply(this,arguments)}),d.init.prototype=d,d.$super=this,d},"extend"),create:i(function(){var u=this.extend();return u.init.apply(u,arguments),u},"create"),init:i(function(){},"init"),mixIn:i(function(u){for(var d in u)u.hasOwnProperty(d)&&(this[d]=u[d]);u.hasOwnProperty("toString")&&(this.toString=u.toString)},"mixIn"),clone:i(function(){return this.init.prototype.extend(this)},"clone")}})(),y=g.WordArray=v.extend({init:i(function(u,d){u=this.words=u||[],d!=o?this.sigBytes=d:this.sigBytes=u.length*4},"init"),toString:i(function(u){return(u||L).stringify(this)},"toString"),concat:i(function(u){var d=this.words,_=u.words,m=this.sigBytes,C=u.sigBytes;if(this.clamp(),m%4)for(var t=0;t<C;t++){var f=_[t>>>2]>>>24-t%4*8&255;d[m+t>>>2]|=f<<24-(m+t)%4*8}else for(var t=0;t<C;t+=4)d[m+t>>>2]=_[t>>>2];return this.sigBytes+=C,this},"concat"),clamp:i(function(){var u=this.words,d=this.sigBytes;u[d>>>2]&=4294967295<<32-d%4*8,u.length=e.ceil(d/4)},"clamp"),clone:i(function(){var u=v.clone.call(this);return u.words=this.words.slice(0),u},"clone"),random:i(function(u){for(var d=[],_=i(function(r){var r=r,b=987654321,w=4294967295;return function(){b=36969*(b&65535)+(b>>16)&w,r=18e3*(r&65535)+(r>>16)&w;var S=(b<<16)+r&w;return S/=4294967296,S+=.5,S*(e.random()>.5?1:-1)}},"r"),m=0,C;m<u;m+=4){var t=_((C||e.random())*4294967296);C=t()*987654071,d.push(t()*4294967296|0)}return new y.init(d,u)},"random")}),k=p.enc={},L=k.Hex={stringify:i(function(u){for(var d=u.words,_=u.sigBytes,m=[],C=0;C<_;C++){var t=d[C>>>2]>>>24-C%4*8&255;m.push((t>>>4).toString(16)),m.push((t&15).toString(16))}return m.join("")},"stringify"),parse:i(function(u){for(var d=u.length,_=[],m=0;m<d;m+=2)_[m>>>3]|=parseInt(u.substr(m,2),16)<<24-m%8*4;return new y.init(_,d/2)},"parse")},x=k.Latin1={stringify:i(function(u){for(var d=u.words,_=u.sigBytes,m=[],C=0;C<_;C++){var t=d[C>>>2]>>>24-C%4*8&255;m.push(String.fromCharCode(t))}return m.join("")},"stringify"),parse:i(function(u){for(var d=u.length,_=[],m=0;m<d;m++)_[m>>>2]|=(u.charCodeAt(m)&255)<<24-m%4*8;return new y.init(_,d)},"parse")},I=k.Utf8={stringify:i(function(u){try{return decodeURIComponent(escape(x.stringify(u)))}catch{throw new Error("Malformed UTF-8 data")}},"stringify"),parse:i(function(u){return x.parse(unescape(encodeURIComponent(u)))},"parse")},E=g.BufferedBlockAlgorithm=v.extend({reset:i(function(){this._data=new y.init,this._nDataBytes=0},"reset"),_append:i(function(u){typeof u=="string"&&(u=I.parse(u)),this._data.concat(u),this._nDataBytes+=u.sigBytes},"_append"),_process:i(function(u){var d=this._data,_=d.words,m=d.sigBytes,C=this.blockSize,t=C*4,f=m/t;u?f=e.ceil(f):f=e.max((f|0)-this._minBufferSize,0);var r=f*C,b=e.min(r*4,m);if(r){for(var w=0;w<r;w+=C)this._doProcessBlock(_,w);var S=_.splice(0,r);d.sigBytes-=b}return new y.init(S,b)},"_process"),clone:i(function(){var u=v.clone.call(this);return u._data=this._data.clone(),u},"clone"),_minBufferSize:0}),P=g.Hasher=E.extend({cfg:v.extend(),init:i(function(u){this.cfg=this.cfg.extend(u),this.reset()},"init"),reset:i(function(){E.reset.call(this),this._doReset()},"reset"),update:i(function(u){return this._append(u),this._process(),this},"update"),finalize:i(function(u){u&&this._append(u);var d=this._doFinalize();return d},"finalize"),blockSize:512/32,_createHelper:i(function(u){return function(d,_){return new u.init(_).finalize(d)}},"_createHelper"),_createHmacHelper:i(function(u){return function(d,_){return new T.HMAC.init(u,_).finalize(d)}},"_createHmacHelper")}),T=p.algo={};return p})(Math);return n})});var ne=z((H,te)=>{"use strict";(function(n,e){typeof H=="object"?te.exports=H=e(ee()):typeof define=="function"&&define.amd?define(["./core"],e):e(n.CryptoJS)})(H,function(n){return(function(){var e=n,o=e.lib,h=o.WordArray,p=o.Hasher,g=e.algo,v=[],y=g.SHA1=p.extend({_doReset:i(function(){this._hash=new h.init([1732584193,4023233417,2562383102,271733878,3285377520])},"_doReset"),_doProcessBlock:i(function(k,L){for(var x=this._hash.words,I=x[0],E=x[1],P=x[2],T=x[3],u=x[4],d=0;d<80;d++){if(d<16)v[d]=k[L+d]|0;else{var _=v[d-3]^v[d-8]^v[d-14]^v[d-16];v[d]=_<<1|_>>>31}var m=(I<<5|I>>>27)+u+v[d];d<20?m+=(E&P|~E&T)+1518500249:d<40?m+=(E^P^T)+1859775393:d<60?m+=(E&P|E&T|P&T)-1894007588:m+=(E^P^T)-899497514,u=T,T=P,P=E<<30|E>>>2,E=I,I=m}x[0]=x[0]+I|0,x[1]=x[1]+E|0,x[2]=x[2]+P|0,x[3]=x[3]+T|0,x[4]=x[4]+u|0},"_doProcessBlock"),_doFinalize:i(function(){var k=this._data,L=k.words,x=this._nDataBytes*8,I=k.sigBytes*8;return L[I>>>5]|=128<<24-I%32,L[(I+64>>>9<<4)+14]=Math.floor(x/4294967296),L[(I+64>>>9<<4)+15]=x,k.sigBytes=L.length*4,this._process(),this._hash},"_doFinalize"),clone:i(function(){var k=p.clone.call(this);return k._hash=this._hash.clone(),k},"clone")});e.SHA1=p._createHelper(y),e.HmacSHA1=p._createHmacHelper(y)})(),n.SHA1})});var nt={};Ee(nt,{TrackKey:()=>$,name:()=>tt,reportTeaEvent:()=>U,version:()=>et});var se=q(Y(),1),ae=q(ne(),1);function B(){return window.appId||null}i(B,"getAppId");function Te(){var o;let n="suda-csrf-token",e=document.cookie.split("; ");for(let h of e){let[p,g]=h.split("=");if(p===n)return decodeURIComponent(g)}return(o=window.csrfToken)!=null?o:null}i(Te,"getCsrfToken");function W(){let n=globalThis.CLIENT_BASE_PATH||"/";return/^\/app\/[^/]/.test(n)}i(W,"isNewPathEnabled");function F(){switch(globalThis.ENVIRONMENT){case"gray":return"PRE";case"online":return"ONLINE";default:return"BOE"}}i(F,"getEnv");function re(){return window.appEnv!=null?window.appEnv==="runtime":!0}i(re,"isOnlineEnv");function N(){let n=navigator.userAgent,e=/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i.test(n),o=/iPad|Tab|Tablet/i.test(n)&&navigator.maxTouchPoints>1;return e||o}i(N,"isMobile");async function ie(){var h;let n=B();if(!n)return{code:1,msg:"appId is required",data:{}};let e=W()?`/app/${n}/__runtime__/api/v1/studio/lark/user_info`:`/spark/b/${n}/lark/user_info`;return await(await fetch(e,{headers:{"X-Suda-Csrf-Token":(h=Te())!=null?h:""}})).json()}i(ie,"getLarkUserInfo");var $={VIEW:"aily_agent_artifact_page_view"},Ae="08a441",Pe="42b91e";function oe(n){let e=String(n);return(0,ae.default)(Ae+(0,se.default)(e+Pe)).toString()}i(oe,"encryptTea");var j=!1;async function Le(){var g,v,y,k;let{data:n}=await ie(),{tenantID:e,userID:o}=n||{},h=o&&o!=="0"?oe(o):void 0,p=e&&e!=="0"?oe(e):void 0;(g=window.collectEvent)==null||g.call(window,"init",{app_id:788827,channel:"cn",disable_auto_pv:!1,enable_ab_test:!1,enable_debug:!1,enable_stay_duration:!0,reportTime:1e3}),(y=window.collectEvent)==null||y.call(window,"config",{user_unique_id:h,device_type:N()?"mobile":"pc",evtParams:{open_from:(v=new URLSearchParams(window.location.search).get("open-from"))!=null?v:void 0,env:F(),user_id:h,tenant_id:p}}),j=!0,(k=window.collectEvent)==null||k.call(window,"start")}i(Le,"createTracker");async function U({trackKey:n,trackParams:e={}}){var o;try{j||(j=!0,await Le()),(o=window.collectEvent)==null||o.call(window,n,e)}catch(h){console.error(h)}}i(U,"reportTeaEvent");function ce(){return U({trackKey:$.VIEW,trackParams:{artifact_uid:B(),agent_id:"agent_miaoda",url:window.location.href}})}i(ce,"reportPageView");function le(){if(typeof crypto!="undefined"&&crypto.getRandomValues){let e=new Uint8Array(8);return crypto.getRandomValues(e),Array.from(e).map(o=>o.toString(16).padStart(2,"0")).join("")}let n="";for(let e=0;e<16;e++)n+=Math.floor(Math.random()*16).toString(16);return n}i(le,"generateUUID");var ue="x_sdk_device_id";function Be(){try{let n=localStorage.getItem(ue);return n||(n=le(),localStorage.setItem(ue,n)),n}catch{return le()}}i(Be,"getDeviceId");function De(){let n=typeof navigator!="undefined"?navigator.userAgent:"";return n&&(/Android/i.test(n)&&/Mobile/i.test(n)||/iPhone|iPod/i.test(n)||/BlackBerry|IEMobile|Opera Mini/i.test(n))?"mobile":"desktop"}i(De,"getDeviceType");var Re="pageSessionID";function Oe(){try{return new URLSearchParams(window.location.search).get(Re)||""}catch{return""}}i(Oe,"getPvId");function Me(n={}){let e=n.pvId||Oe();return{app_id:window.appId||"",tenant_id:window.tenantId||"",user_id:window.userId||"",did:Be(),module:"app_web",app_env:"runtime",source_type:"user",device_type:De(),release_commit_id:window.__RELEASE_COMMIT_ID__||"",...e?{pv_id:e}:{}}}i(Me,"getDefaultAttributes");function de(n){let e=Math.round(n);if(!Number.isFinite(e))throw new RangeError(`toNanoString: \u975E\u6CD5\u65F6\u95F4\u6233 ${n}`);return typeof BigInt!="function"?e===0?"0":`${e}000000`:String(BigInt(e)*BigInt(1e6))}i(de,"toNanoString");var He="1.0.2-beta.0";function Fe(n,e){let o=Me(e),h=de(Date.now());return{metricsData:{resource:{attributes:{sdk_version:He,sdk_lang:"javascript",sdk_type:"client-frontend"}},metrics:[{name:"apaas_internal_metrics_pv_uv",description:"Count of page views",unit:"",scopeName:"apaas_internal_metrics_pv_uv",sum:{aggregationTemporality:1,isMonotonic:!0,dataPoints:n.map(p=>({attributes:{...o,url:p.url,path:p.path,referrer:p.referrer},startTimeUnixNano:de(p.timestampMs),timeUnixNano:h,asDouble:1}))}}]}}}i(Fe,"buildPayload");function Ne(n,e,o={},h){if(e.length===0)return;let p;try{p=JSON.stringify(Fe(e,h))}catch{return}try{fetch(n,{method:"POST",headers:{"Content-Type":"application/json","X-Suda-Csrf-Token":window.csrfToken||"",...o},body:p,keepalive:!0}).catch(()=>{})}catch{}}i(Ne,"sendPvData");var V="__APAAS_PV_TRACKER_STARTED__";function ze(){try{let n=window;return n[V]?!1:(n[V]=!0,!0)}catch{return!0}}i(ze,"claimPvReporting");function fe(){try{window[V]=!1}catch{}}i(fe,"releasePvReporting");var D,We=(D=class{constructor(){this.started=!1,this.disposers=[],this.holdsPvReporting=!1,this.buffer=[]}static get instance(){return this._instance||(this._instance=new D),this._instance}start(e){var o;if(!this.started&&ze()){this.holdsPvReporting=!0,this.config=e,this.started=!0;try{this.listenRouteChanges(),this.registerLifecycleListeners();let h=(o=e.flushIntervalMs)!=null?o:1e4;this.flushTimer=setInterval(()=>this.flush(),h)}catch(h){throw this.started=!1,this.flushTimer&&(clearInterval(this.flushTimer),this.flushTimer=void 0),this.holdsPvReporting=!1,fe(),h}}}shutdown(){this.flush(),this.flushTimer&&(clearInterval(this.flushTimer),this.flushTimer=void 0),this.firstFlushTimer&&(clearTimeout(this.firstFlushTimer),this.firstFlushTimer=void 0),this.started=!1;for(let e of this.disposers.splice(0))try{e()}catch{}this.holdsPvReporting&&(this.holdsPvReporting=!1,fe())}pageKey(){let{origin:e,pathname:o,search:h}=window.location;return`${e}${o}${h}`}scheduleFirstFlush(){var e;let o=(e=this.config)==null?void 0:e.firstFlushDelayMs;o==null||this.firstFlushTimer||(this.firstFlushTimer=setTimeout(()=>this.flush(),o))}recordPv(){let e=this.pageKey();this.lastKey!==e&&(this.lastKey=e,this.buffer.push({url:window.location.href,path:window.location.pathname,referrer:document.referrer,timestampMs:Date.now()}),this.scheduleFirstFlush())}flush(){if(!this.config||this.buffer.length===0)return;let e=this.buffer.splice(0);Ne(this.config.collectorUrl,e,this.config.headers,{pvId:this.config.pvId})}listenRouteChanges(){this.recordPv();let e=i(()=>this.recordPv(),"onPopState");window.addEventListener("popstate",e),this.disposers.push(()=>window.removeEventListener("popstate",e)),this.patchHistory("pushState"),this.patchHistory("replaceState")}patchHistory(e){let o=history[e],h=i(()=>this.recordPv(),"recordPv");history[e]=function(...p){let g=o.apply(this,p);return h(),g},this.disposers.push(()=>{history[e]=o})}registerLifecycleListeners(){let e=i(()=>{document.visibilityState==="hidden"&&this.flush()},"onVisibilityChange");document.addEventListener("visibilitychange",e),this.disposers.push(()=>document.removeEventListener("visibilitychange",e));let o=i(()=>this.flush(),"onPageHide");window.addEventListener("pagehide",o),this.disposers.push(()=>window.removeEventListener("pagehide",o))}},i(D,"_PvTracker"),D),pe=We.instance;function he(){var o;let n=(o=B())!=null?o:"",e=W()?`/app/${n}/__runtime__/api/v1/observability/metrics/collect`:`/spark/app/${n}/runtime/api/v1/observability/metrics/collect`;pe.start({collectorUrl:e})}i(he,"initPvTracking");var je="https://lf3-static.bytednsdoc.com/obj/eden-cn/LMfspH/ljhwZthlaukjlkulzlp/miaoda-ui",$e=`${je}/doubao.svg`,Ue='<svg viewBox="0 0 10 10" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M8.08312 8.08298C8.2384 7.92769 8.23953 7.67705 8.08424 7.52176L5.3625 4.80002L8.08422 2.07829C8.23951 1.92301 8.23839 1.67236 8.0831 1.51708C7.92781 1.36179 7.67717 1.36066 7.52188 1.51595C7.36659 1.67124 4.80016 4.23767 4.80016 4.23767L2.07841 1.51593C1.92313 1.36064 1.67248 1.36177 1.5172 1.51705C1.36191 1.67234 1.36078 1.92298 1.51607 2.07827L4.23782 4.80002L1.51605 7.52178C1.36076 7.67707 1.36189 7.92771 1.51718 8.083C1.67246 8.23829 1.92311 8.23941 2.07839 8.08412L4.80016 5.36236L7.5219 8.0841C7.67719 8.23939 7.92783 8.23826 8.08312 8.08298Z" fill="currentColor"/></svg>',Ve='<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M12.6667 2H3.33333V14H6.66667V15.3334H3.33333C2.59695 15.3334 2 14.7364 2 14V2C2 1.26364 2.59695 0.666687 3.33333 0.666687H12.6667C13.403 0.666687 14 1.26364 14 2V7.33335H12.6667V2Z" fill="currentColor"/><path d="M5.33333 4.66669C4.96514 4.66669 4.66667 4.96516 4.66667 5.33335C4.66667 5.70154 4.96514 6 5.33333 6H10.6667C11.0349 6 11.3333 5.70154 11.3333 5.33335C11.3333 4.96516 11.0349 4.66669 10.6667 4.66669H5.33333Z" fill="currentColor"/><path d="M4.66667 8.33335C4.66667 7.96516 4.96514 7.66669 5.33333 7.66669H8C8.36819 7.66669 8.66667 7.96516 8.66667 8.33335C8.66667 8.70154 8.36819 9 8 9H5.33333C4.96514 9 4.66667 8.70154 4.66667 8.33335Z" fill="currentColor"/><path d="M13.5523 8.70017C13.9428 8.30964 14.576 8.30964 14.9665 8.70017C15.357 9.09069 15.357 9.72386 14.9665 10.1144L14.2594 10.8215L12.8452 9.40728L13.5523 8.70017Z" fill="currentColor"/><path d="M12.1381 10.1144L13.5523 11.5286L10.2309 14.85C10.0916 14.9892 9.91229 15.0815 9.71798 15.1138L8.45737 15.3234C8.42136 15.3294 8.38467 15.3177 8.35885 15.2918C8.33271 15.2657 8.32099 15.2284 8.32749 15.192L8.55128 13.9374C8.58465 13.7502 8.6746 13.5779 8.80901 13.4435L12.1381 10.1144Z" fill="currentColor"/></svg>',ge=!0,Ke="\u8C46\u5305 AI \u751F\u6210",Ze="\u7531\u98DE\u4E66\u5999\u642D\u63D0\u4F9B\u652F\u6301",Ge="0px 8px 32px rgba(0,0,0,0.08), 0px 4px 16px rgba(0,0,0,0.04), 0px 2px 4px rgba(0,0,0,0.02)",Je="0px 4px 16px rgba(0,0,0,0.03), 0px 4px 10px rgba(0,0,0,0.03), 0px 2px 4px rgba(0,0,0,0.02)",Z="'PingFang SC', -apple-system, BlinkMacSystemFont, sans-serif",qe={BOE:"tns.feishu-boe.cn",PRE:"tns.feishu-pre.cn",ONLINE:"tns.feishu.cn"};function me(){var o;let n=JSON.stringify({scene:"miaoda_app_report",entity_id:(o=B())!=null?o:"",entity_type:"miaoda_app",extra:""}),e=`https://${qe[F()]}/cust/lark_report/?type=common¶ms=${encodeURIComponent(n)}&lang=zh-CN`;window.open(e,"_blank","noopener,noreferrer")}i(me,"openDoubaoReport");function be(n){let e=document.createElement("span");Object.assign(e.style,{display:"inline-flex",width:`${n}px`,height:`${n}px`,flexShrink:"0"}),e.innerHTML=Ue;let o=e.firstElementChild;return o&&(o.setAttribute("width",String(n)),o.setAttribute("height",String(n)),o.style.display="block"),e}i(be,"makeCloseIcon");function Xe(n){let e=document.createElement("img");return e.src=$e,e.width=n,e.height=n,e.alt="",Object.assign(e.style,{width:`${n}px`,height:`${n}px`,maxWidth:"none",maxHeight:"none",borderRadius:"100px",flexShrink:"0",display:"block"}),e}i(Xe,"makeAvatar");function ye(n,e){let o=n==="desktop",h=document.createElement("div");Object.assign(h.style,{boxSizing:"border-box",display:"inline-flex",alignItems:"center",gap:o?"4px":"6px",padding:o?"6px 12px 6px 8px":"4px 12px 4px 8px",background:"#363636",border:"0.5px solid rgba(255,255,255,0.1)",borderRadius:"100px",boxShadow:Ge,cursor:"pointer"});let p=Xe(o?16:18),g=document.createElement("span");if(g.textContent=Ke,Object.assign(g.style,{fontFamily:Z,fontSize:o?"12px":"14px",lineHeight:o?"18px":"22px",color:"rgba(255,255,255,0.85)",whiteSpace:"nowrap"}),h.append(p,g),o&&e){let v=document.createElement("span");v.setAttribute("role","button"),v.setAttribute("aria-label","\u5173\u95ED"),v.setAttribute("data-doubao-close",""),Object.assign(v.style,{display:"none",alignItems:"center",cursor:"pointer",flexShrink:"0",color:"rgba(255,255,255,0.5)"}),v.appendChild(be(10)),v.addEventListener("click",y=>{y.stopPropagation(),e()}),h.appendChild(v)}return h}i(ye,"buildPill");function K(n){let e=document.createElement("div");e.setAttribute("role","menuitem"),e.setAttribute("data-label",n.label),Object.assign(e.style,{boxSizing:"border-box",display:"flex",alignItems:"center",gap:"8px",padding:"4px 10px",borderRadius:"6px",cursor:"pointer",color:"#000000"});let o=document.createElement("span");Object.assign(o.style,{display:"inline-flex",width:"16px",height:"16px",flexShrink:"0",color:"#000000"}),n.icon==="feedback"?o.innerHTML=Ve:o.appendChild(be(16));let h=document.createElement("span");return h.textContent=n.label,Object.assign(h.style,{fontFamily:Z,fontSize:`${n.fontSize}px`,lineHeight:`${n.fontSize+8}px`,color:"#000000",whiteSpace:"nowrap"}),e.append(o,h),e.addEventListener("mouseenter",()=>{e.style.background="rgba(0,0,0,0.04)"}),e.addEventListener("mouseleave",()=>{e.style.background="transparent"}),e.addEventListener("click",n.onClick),e}i(K,"buildMenuRow");function _e(n){let e=document.createElement("div");if(Object.assign(e.style,{boxSizing:"border-box",display:"flex",flexDirection:"column",minWidth:`${n.minWidth}px`,background:"#ffffff",border:"0.5px solid rgba(0,0,0,0.1)",borderRadius:"10px",boxShadow:Je,overflow:"hidden",outline:"none"}),n.rows.length){let h=document.createElement("div");Object.assign(h.style,{boxSizing:"border-box",padding:"4px"}),n.rows.forEach(p=>h.appendChild(p)),e.appendChild(h)}let o=document.createElement("div");return o.textContent=Ze,Object.assign(o.style,{boxSizing:"border-box",background:"#f9f9f9",padding:"8px 14px",fontFamily:Z,fontSize:`${n.footerFontSize}px`,lineHeight:`${n.footerFontSize+8}px`,color:"rgba(0,0,0,0.35)",whiteSpace:"nowrap"}),e.appendChild(o),e}i(_e,"buildMenuCard");function Ye(){let n=document.createElement("div");n.setAttribute("data-custom-element","doubao-watermark"),Object.assign(n.style,{position:"fixed",right:"12px",bottom:"12px",zIndex:"9999",display:"flex",flexDirection:"column",alignItems:"flex-end",gap:"8px"});let e=[];ge&&e.push(K({icon:"feedback",label:"\u6295\u8BC9\u4E0E\u4E3E\u62A5",fontSize:14,onClick:me}));let o=_e({rows:e,footerFontSize:12,minWidth:144});o.style.display="none";let h=ye("desktop",()=>n.remove()),p=h.querySelector("[data-doubao-close]");n.append(o,h);let g=null;return n.addEventListener("mouseenter",()=>{g&&clearTimeout(g),o.style.display="flex",p&&(p.style.display="inline-flex")}),n.addEventListener("mouseleave",()=>{g=setTimeout(()=>{o.style.display="none",p&&(p.style.display="none")},100)}),n}i(Ye,"buildDesktopWatermark");function Qe(){let n=document.createElement("div");n.setAttribute("data-custom-element","doubao-watermark-mobile"),Object.assign(n.style,{position:"fixed",right:"12px",bottom:"12px",zIndex:"9999",display:"flex",flexDirection:"column",alignItems:"flex-end",gap:"8px",cursor:"pointer"});let e=[];ge&&e.push(K({icon:"feedback",label:"\u6295\u8BC9\u4E0E\u4E3E\u62A5",fontSize:16,onClick:me})),e.push(K({icon:"close",label:"\u4E0D\u518D\u5C55\u793A",fontSize:16,onClick:i(p=>{p.stopPropagation(),n.remove()},"onClick")}));let o=_e({rows:e,footerFontSize:14,minWidth:160});o.style.display="none";let h=ye("mobile");return n.append(o,h),n.addEventListener("click",p=>{p.stopPropagation(),o.style.display=o.style.display==="none"?"flex":"none"}),document.addEventListener("click",()=>{o.style.display="none"}),n}i(Qe,"buildMobileWatermark");var ve=!1;function G(){if(ve||typeof document=="undefined")return;if(document.readyState==="loading"){document.addEventListener("DOMContentLoaded",G,{once:!0});return}ve=!0;let n=N()?Qe():Ye();document.body.appendChild(n)}i(G,"mountDoubaoWatermark");var et="0.0.12-beta.0",tt="@lark-apaas/miaoda-coding-sdk";re()&&(ce(),he());G();return Ie(nt);})();
|
|
1
|
+
"use strict";var MiaodaRuntime=(()=>{var we=Object.create;var R=Object.defineProperty;var xe=Object.getOwnPropertyDescriptor;var Ce=Object.getOwnPropertyNames;var Se=Object.getPrototypeOf,ke=Object.prototype.hasOwnProperty;var i=(n,e)=>R(n,"name",{value:e,configurable:!0});var z=(n,e)=>()=>(e||n((e={exports:{}}).exports,e),e.exports),Ee=(n,e)=>{for(var o in e)R(n,o,{get:e[o],enumerable:!0})},J=(n,e,o,h)=>{if(e&&typeof e=="object"||typeof e=="function")for(let p of Ce(e))!ke.call(n,p)&&p!==o&&R(n,p,{get:()=>e[p],enumerable:!(h=xe(e,p))||h.enumerable});return n};var q=(n,e,o)=>(o=n!=null?we(Se(n)):{},J(e||!n||!n.__esModule?R(o,"default",{value:n,enumerable:!0}):o,n)),Ie=n=>J(R({},"__esModule",{value:!0}),n);var Y=z((X,O)=>{"use strict";(function(n){"use strict";function e(t,f){var r=(t&65535)+(f&65535),b=(t>>16)+(f>>16)+(r>>16);return b<<16|r&65535}i(e,"safeAdd");function o(t,f){return t<<f|t>>>32-f}i(o,"bitRotateLeft");function h(t,f,r,b,w,S){return e(o(e(e(f,t),e(b,S)),w),r)}i(h,"md5cmn");function p(t,f,r,b,w,S,A){return h(f&r|~f&b,t,f,w,S,A)}i(p,"md5ff");function g(t,f,r,b,w,S,A){return h(f&b|r&~b,t,f,w,S,A)}i(g,"md5gg");function v(t,f,r,b,w,S,A){return h(f^r^b,t,f,w,S,A)}i(v,"md5hh");function y(t,f,r,b,w,S,A){return h(r^(f|~b),t,f,w,S,A)}i(y,"md5ii");function k(t,f){t[f>>5]|=128<<f%32,t[(f+64>>>9<<4)+14]=f;var r,b,w,S,A,s=1732584193,a=-271733879,c=-1732584194,l=271733878;for(r=0;r<t.length;r+=16)b=s,w=a,S=c,A=l,s=p(s,a,c,l,t[r],7,-680876936),l=p(l,s,a,c,t[r+1],12,-389564586),c=p(c,l,s,a,t[r+2],17,606105819),a=p(a,c,l,s,t[r+3],22,-1044525330),s=p(s,a,c,l,t[r+4],7,-176418897),l=p(l,s,a,c,t[r+5],12,1200080426),c=p(c,l,s,a,t[r+6],17,-1473231341),a=p(a,c,l,s,t[r+7],22,-45705983),s=p(s,a,c,l,t[r+8],7,1770035416),l=p(l,s,a,c,t[r+9],12,-1958414417),c=p(c,l,s,a,t[r+10],17,-42063),a=p(a,c,l,s,t[r+11],22,-1990404162),s=p(s,a,c,l,t[r+12],7,1804603682),l=p(l,s,a,c,t[r+13],12,-40341101),c=p(c,l,s,a,t[r+14],17,-1502002290),a=p(a,c,l,s,t[r+15],22,1236535329),s=g(s,a,c,l,t[r+1],5,-165796510),l=g(l,s,a,c,t[r+6],9,-1069501632),c=g(c,l,s,a,t[r+11],14,643717713),a=g(a,c,l,s,t[r],20,-373897302),s=g(s,a,c,l,t[r+5],5,-701558691),l=g(l,s,a,c,t[r+10],9,38016083),c=g(c,l,s,a,t[r+15],14,-660478335),a=g(a,c,l,s,t[r+4],20,-405537848),s=g(s,a,c,l,t[r+9],5,568446438),l=g(l,s,a,c,t[r+14],9,-1019803690),c=g(c,l,s,a,t[r+3],14,-187363961),a=g(a,c,l,s,t[r+8],20,1163531501),s=g(s,a,c,l,t[r+13],5,-1444681467),l=g(l,s,a,c,t[r+2],9,-51403784),c=g(c,l,s,a,t[r+7],14,1735328473),a=g(a,c,l,s,t[r+12],20,-1926607734),s=v(s,a,c,l,t[r+5],4,-378558),l=v(l,s,a,c,t[r+8],11,-2022574463),c=v(c,l,s,a,t[r+11],16,1839030562),a=v(a,c,l,s,t[r+14],23,-35309556),s=v(s,a,c,l,t[r+1],4,-1530992060),l=v(l,s,a,c,t[r+4],11,1272893353),c=v(c,l,s,a,t[r+7],16,-155497632),a=v(a,c,l,s,t[r+10],23,-1094730640),s=v(s,a,c,l,t[r+13],4,681279174),l=v(l,s,a,c,t[r],11,-358537222),c=v(c,l,s,a,t[r+3],16,-722521979),a=v(a,c,l,s,t[r+6],23,76029189),s=v(s,a,c,l,t[r+9],4,-640364487),l=v(l,s,a,c,t[r+12],11,-421815835),c=v(c,l,s,a,t[r+15],16,530742520),a=v(a,c,l,s,t[r+2],23,-995338651),s=y(s,a,c,l,t[r],6,-198630844),l=y(l,s,a,c,t[r+7],10,1126891415),c=y(c,l,s,a,t[r+14],15,-1416354905),a=y(a,c,l,s,t[r+5],21,-57434055),s=y(s,a,c,l,t[r+12],6,1700485571),l=y(l,s,a,c,t[r+3],10,-1894986606),c=y(c,l,s,a,t[r+10],15,-1051523),a=y(a,c,l,s,t[r+1],21,-2054922799),s=y(s,a,c,l,t[r+8],6,1873313359),l=y(l,s,a,c,t[r+15],10,-30611744),c=y(c,l,s,a,t[r+6],15,-1560198380),a=y(a,c,l,s,t[r+13],21,1309151649),s=y(s,a,c,l,t[r+4],6,-145523070),l=y(l,s,a,c,t[r+11],10,-1120210379),c=y(c,l,s,a,t[r+2],15,718787259),a=y(a,c,l,s,t[r+9],21,-343485551),s=e(s,b),a=e(a,w),c=e(c,S),l=e(l,A);return[s,a,c,l]}i(k,"binlMD5");function L(t){var f,r="",b=t.length*32;for(f=0;f<b;f+=8)r+=String.fromCharCode(t[f>>5]>>>f%32&255);return r}i(L,"binl2rstr");function x(t){var f,r=[];for(r[(t.length>>2)-1]=void 0,f=0;f<r.length;f+=1)r[f]=0;var b=t.length*8;for(f=0;f<b;f+=8)r[f>>5]|=(t.charCodeAt(f/8)&255)<<f%32;return r}i(x,"rstr2binl");function I(t){return L(k(x(t),t.length*8))}i(I,"rstrMD5");function E(t,f){var r,b=x(t),w=[],S=[],A;for(w[15]=S[15]=void 0,b.length>16&&(b=k(b,t.length*8)),r=0;r<16;r+=1)w[r]=b[r]^909522486,S[r]=b[r]^1549556828;return A=k(w.concat(x(f)),512+f.length*8),L(k(S.concat(A),640))}i(E,"rstrHMACMD5");function P(t){var f="0123456789abcdef",r="",b,w;for(w=0;w<t.length;w+=1)b=t.charCodeAt(w),r+=f.charAt(b>>>4&15)+f.charAt(b&15);return r}i(P,"rstr2hex");function T(t){return unescape(encodeURIComponent(t))}i(T,"str2rstrUTF8");function u(t){return I(T(t))}i(u,"rawMD5");function d(t){return P(u(t))}i(d,"hexMD5");function _(t,f){return E(T(t),T(f))}i(_,"rawHMACMD5");function m(t,f){return P(_(t,f))}i(m,"hexHMACMD5");function C(t,f,r){return f?r?_(f,t):m(f,t):r?u(t):d(t)}i(C,"md5"),typeof define=="function"&&define.amd?define(function(){return C}):typeof O=="object"&&O.exports?O.exports=C:n.md5=C})(X)});var ee=z((M,Q)=>{"use strict";(function(n,e){typeof M=="object"?Q.exports=M=e():typeof define=="function"&&define.amd?define([],e):n.CryptoJS=e()})(M,function(){var n=n||(function(e,o){var h=Object.create||(function(){function u(){}return i(u,"F"),function(d){var _;return u.prototype=d,_=new u,u.prototype=null,_}})(),p={},g=p.lib={},v=g.Base=(function(){return{extend:i(function(u){var d=h(this);return u&&d.mixIn(u),(!d.hasOwnProperty("init")||this.init===d.init)&&(d.init=function(){d.$super.init.apply(this,arguments)}),d.init.prototype=d,d.$super=this,d},"extend"),create:i(function(){var u=this.extend();return u.init.apply(u,arguments),u},"create"),init:i(function(){},"init"),mixIn:i(function(u){for(var d in u)u.hasOwnProperty(d)&&(this[d]=u[d]);u.hasOwnProperty("toString")&&(this.toString=u.toString)},"mixIn"),clone:i(function(){return this.init.prototype.extend(this)},"clone")}})(),y=g.WordArray=v.extend({init:i(function(u,d){u=this.words=u||[],d!=o?this.sigBytes=d:this.sigBytes=u.length*4},"init"),toString:i(function(u){return(u||L).stringify(this)},"toString"),concat:i(function(u){var d=this.words,_=u.words,m=this.sigBytes,C=u.sigBytes;if(this.clamp(),m%4)for(var t=0;t<C;t++){var f=_[t>>>2]>>>24-t%4*8&255;d[m+t>>>2]|=f<<24-(m+t)%4*8}else for(var t=0;t<C;t+=4)d[m+t>>>2]=_[t>>>2];return this.sigBytes+=C,this},"concat"),clamp:i(function(){var u=this.words,d=this.sigBytes;u[d>>>2]&=4294967295<<32-d%4*8,u.length=e.ceil(d/4)},"clamp"),clone:i(function(){var u=v.clone.call(this);return u.words=this.words.slice(0),u},"clone"),random:i(function(u){for(var d=[],_=i(function(r){var r=r,b=987654321,w=4294967295;return function(){b=36969*(b&65535)+(b>>16)&w,r=18e3*(r&65535)+(r>>16)&w;var S=(b<<16)+r&w;return S/=4294967296,S+=.5,S*(e.random()>.5?1:-1)}},"r"),m=0,C;m<u;m+=4){var t=_((C||e.random())*4294967296);C=t()*987654071,d.push(t()*4294967296|0)}return new y.init(d,u)},"random")}),k=p.enc={},L=k.Hex={stringify:i(function(u){for(var d=u.words,_=u.sigBytes,m=[],C=0;C<_;C++){var t=d[C>>>2]>>>24-C%4*8&255;m.push((t>>>4).toString(16)),m.push((t&15).toString(16))}return m.join("")},"stringify"),parse:i(function(u){for(var d=u.length,_=[],m=0;m<d;m+=2)_[m>>>3]|=parseInt(u.substr(m,2),16)<<24-m%8*4;return new y.init(_,d/2)},"parse")},x=k.Latin1={stringify:i(function(u){for(var d=u.words,_=u.sigBytes,m=[],C=0;C<_;C++){var t=d[C>>>2]>>>24-C%4*8&255;m.push(String.fromCharCode(t))}return m.join("")},"stringify"),parse:i(function(u){for(var d=u.length,_=[],m=0;m<d;m++)_[m>>>2]|=(u.charCodeAt(m)&255)<<24-m%4*8;return new y.init(_,d)},"parse")},I=k.Utf8={stringify:i(function(u){try{return decodeURIComponent(escape(x.stringify(u)))}catch{throw new Error("Malformed UTF-8 data")}},"stringify"),parse:i(function(u){return x.parse(unescape(encodeURIComponent(u)))},"parse")},E=g.BufferedBlockAlgorithm=v.extend({reset:i(function(){this._data=new y.init,this._nDataBytes=0},"reset"),_append:i(function(u){typeof u=="string"&&(u=I.parse(u)),this._data.concat(u),this._nDataBytes+=u.sigBytes},"_append"),_process:i(function(u){var d=this._data,_=d.words,m=d.sigBytes,C=this.blockSize,t=C*4,f=m/t;u?f=e.ceil(f):f=e.max((f|0)-this._minBufferSize,0);var r=f*C,b=e.min(r*4,m);if(r){for(var w=0;w<r;w+=C)this._doProcessBlock(_,w);var S=_.splice(0,r);d.sigBytes-=b}return new y.init(S,b)},"_process"),clone:i(function(){var u=v.clone.call(this);return u._data=this._data.clone(),u},"clone"),_minBufferSize:0}),P=g.Hasher=E.extend({cfg:v.extend(),init:i(function(u){this.cfg=this.cfg.extend(u),this.reset()},"init"),reset:i(function(){E.reset.call(this),this._doReset()},"reset"),update:i(function(u){return this._append(u),this._process(),this},"update"),finalize:i(function(u){u&&this._append(u);var d=this._doFinalize();return d},"finalize"),blockSize:512/32,_createHelper:i(function(u){return function(d,_){return new u.init(_).finalize(d)}},"_createHelper"),_createHmacHelper:i(function(u){return function(d,_){return new T.HMAC.init(u,_).finalize(d)}},"_createHmacHelper")}),T=p.algo={};return p})(Math);return n})});var ne=z((H,te)=>{"use strict";(function(n,e){typeof H=="object"?te.exports=H=e(ee()):typeof define=="function"&&define.amd?define(["./core"],e):e(n.CryptoJS)})(H,function(n){return(function(){var e=n,o=e.lib,h=o.WordArray,p=o.Hasher,g=e.algo,v=[],y=g.SHA1=p.extend({_doReset:i(function(){this._hash=new h.init([1732584193,4023233417,2562383102,271733878,3285377520])},"_doReset"),_doProcessBlock:i(function(k,L){for(var x=this._hash.words,I=x[0],E=x[1],P=x[2],T=x[3],u=x[4],d=0;d<80;d++){if(d<16)v[d]=k[L+d]|0;else{var _=v[d-3]^v[d-8]^v[d-14]^v[d-16];v[d]=_<<1|_>>>31}var m=(I<<5|I>>>27)+u+v[d];d<20?m+=(E&P|~E&T)+1518500249:d<40?m+=(E^P^T)+1859775393:d<60?m+=(E&P|E&T|P&T)-1894007588:m+=(E^P^T)-899497514,u=T,T=P,P=E<<30|E>>>2,E=I,I=m}x[0]=x[0]+I|0,x[1]=x[1]+E|0,x[2]=x[2]+P|0,x[3]=x[3]+T|0,x[4]=x[4]+u|0},"_doProcessBlock"),_doFinalize:i(function(){var k=this._data,L=k.words,x=this._nDataBytes*8,I=k.sigBytes*8;return L[I>>>5]|=128<<24-I%32,L[(I+64>>>9<<4)+14]=Math.floor(x/4294967296),L[(I+64>>>9<<4)+15]=x,k.sigBytes=L.length*4,this._process(),this._hash},"_doFinalize"),clone:i(function(){var k=p.clone.call(this);return k._hash=this._hash.clone(),k},"clone")});e.SHA1=p._createHelper(y),e.HmacSHA1=p._createHmacHelper(y)})(),n.SHA1})});var nt={};Ee(nt,{TrackKey:()=>$,name:()=>tt,reportTeaEvent:()=>U,version:()=>et});var se=q(Y(),1),ae=q(ne(),1);function B(){return window.appId||null}i(B,"getAppId");function Te(){var o;let n="suda-csrf-token",e=document.cookie.split("; ");for(let h of e){let[p,g]=h.split("=");if(p===n)return decodeURIComponent(g)}return(o=window.csrfToken)!=null?o:null}i(Te,"getCsrfToken");function W(){let n=globalThis.CLIENT_BASE_PATH||"/";return/^\/app\/[^/]/.test(n)}i(W,"isNewPathEnabled");function F(){switch(globalThis.ENVIRONMENT){case"gray":return"PRE";case"online":return"ONLINE";default:return"BOE"}}i(F,"getEnv");function re(){return window.appEnv!=null?window.appEnv==="runtime":!0}i(re,"isOnlineEnv");function N(){let n=navigator.userAgent,e=/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i.test(n),o=/iPad|Tab|Tablet/i.test(n)&&navigator.maxTouchPoints>1;return e||o}i(N,"isMobile");async function ie(){var h;let n=B();if(!n)return{code:1,msg:"appId is required",data:{}};let e=W()?`/app/${n}/__runtime__/api/v1/studio/lark/user_info`:`/spark/b/${n}/lark/user_info`;return await(await fetch(e,{headers:{"X-Suda-Csrf-Token":(h=Te())!=null?h:""}})).json()}i(ie,"getLarkUserInfo");var $={VIEW:"aily_agent_artifact_page_view"},Ae="08a441",Pe="42b91e";function oe(n){let e=String(n);return(0,ae.default)(Ae+(0,se.default)(e+Pe)).toString()}i(oe,"encryptTea");var j=!1;async function Le(){var g,v,y,k;let{data:n}=await ie(),{tenantID:e,userID:o}=n||{},h=o&&o!=="0"?oe(o):void 0,p=e&&e!=="0"?oe(e):void 0;(g=window.collectEvent)==null||g.call(window,"init",{app_id:788827,channel:"cn",disable_auto_pv:!1,enable_ab_test:!1,enable_debug:!1,enable_stay_duration:!0,reportTime:1e3}),(y=window.collectEvent)==null||y.call(window,"config",{user_unique_id:h,device_type:N()?"mobile":"pc",evtParams:{open_from:(v=new URLSearchParams(window.location.search).get("open-from"))!=null?v:void 0,env:F(),user_id:h,tenant_id:p}}),j=!0,(k=window.collectEvent)==null||k.call(window,"start")}i(Le,"createTracker");async function U({trackKey:n,trackParams:e={}}){var o;try{j||(j=!0,await Le()),(o=window.collectEvent)==null||o.call(window,n,e)}catch(h){console.error(h)}}i(U,"reportTeaEvent");function ce(){return U({trackKey:$.VIEW,trackParams:{artifact_uid:B(),agent_id:"agent_miaoda",url:window.location.href}})}i(ce,"reportPageView");function le(){if(typeof crypto!="undefined"&&crypto.getRandomValues){let e=new Uint8Array(8);return crypto.getRandomValues(e),Array.from(e).map(o=>o.toString(16).padStart(2,"0")).join("")}let n="";for(let e=0;e<16;e++)n+=Math.floor(Math.random()*16).toString(16);return n}i(le,"generateUUID");var ue="x_sdk_device_id";function Be(){try{let n=localStorage.getItem(ue);return n||(n=le(),localStorage.setItem(ue,n)),n}catch{return le()}}i(Be,"getDeviceId");function De(){let n=typeof navigator!="undefined"?navigator.userAgent:"";return n&&(/Android/i.test(n)&&/Mobile/i.test(n)||/iPhone|iPod/i.test(n)||/BlackBerry|IEMobile|Opera Mini/i.test(n))?"mobile":"desktop"}i(De,"getDeviceType");var Re="pageSessionID";function Oe(){try{return new URLSearchParams(window.location.search).get(Re)||""}catch{return""}}i(Oe,"getPvId");function Me(n={}){let e=n.pvId||Oe();return{app_id:window.appId||"",tenant_id:window.tenantId||"",user_id:window.userId||"",did:Be(),module:"app_web",app_env:"runtime",source_type:"user",device_type:De(),release_commit_id:window.__RELEASE_COMMIT_ID__||"",...e?{pv_id:e}:{}}}i(Me,"getDefaultAttributes");function de(n){let e=Math.round(n);if(!Number.isFinite(e))throw new RangeError(`toNanoString: \u975E\u6CD5\u65F6\u95F4\u6233 ${n}`);return typeof BigInt!="function"?e===0?"0":`${e}000000`:String(BigInt(e)*BigInt(1e6))}i(de,"toNanoString");var He="1.0.1";function Fe(n,e){let o=Me(e),h=de(Date.now());return{metricsData:{resource:{attributes:{sdk_version:He,sdk_lang:"javascript",sdk_type:"client-frontend"}},metrics:[{name:"apaas_internal_metrics_pv_uv",description:"Count of page views",unit:"",scopeName:"apaas_internal_metrics_pv_uv",sum:{aggregationTemporality:1,isMonotonic:!0,dataPoints:n.map(p=>({attributes:{...o,url:p.url,path:p.path,referrer:p.referrer},startTimeUnixNano:de(p.timestampMs),timeUnixNano:h,asDouble:1}))}}]}}}i(Fe,"buildPayload");function Ne(n,e,o={},h){if(e.length===0)return;let p;try{p=JSON.stringify(Fe(e,h))}catch{return}try{fetch(n,{method:"POST",headers:{"Content-Type":"application/json","X-Suda-Csrf-Token":window.csrfToken||"",...o},body:p,keepalive:!0}).catch(()=>{})}catch{}}i(Ne,"sendPvData");var V="__APAAS_PV_TRACKER_STARTED__";function ze(){try{let n=window;return n[V]?!1:(n[V]=!0,!0)}catch{return!0}}i(ze,"claimPvReporting");function fe(){try{window[V]=!1}catch{}}i(fe,"releasePvReporting");var D,We=(D=class{constructor(){this.started=!1,this.disposers=[],this.holdsPvReporting=!1,this.buffer=[]}static get instance(){return this._instance||(this._instance=new D),this._instance}start(e){var o;if(!this.started&&ze()){this.holdsPvReporting=!0,this.config=e,this.started=!0;try{this.listenRouteChanges(),this.registerLifecycleListeners();let h=(o=e.flushIntervalMs)!=null?o:1e4;this.flushTimer=setInterval(()=>this.flush(),h)}catch(h){throw this.started=!1,this.flushTimer&&(clearInterval(this.flushTimer),this.flushTimer=void 0),this.holdsPvReporting=!1,fe(),h}}}shutdown(){this.flush(),this.flushTimer&&(clearInterval(this.flushTimer),this.flushTimer=void 0),this.firstFlushTimer&&(clearTimeout(this.firstFlushTimer),this.firstFlushTimer=void 0),this.started=!1;for(let e of this.disposers.splice(0))try{e()}catch{}this.holdsPvReporting&&(this.holdsPvReporting=!1,fe())}pageKey(){let{origin:e,pathname:o,search:h}=window.location;return`${e}${o}${h}`}scheduleFirstFlush(){var e;let o=(e=this.config)==null?void 0:e.firstFlushDelayMs;o==null||this.firstFlushTimer||(this.firstFlushTimer=setTimeout(()=>this.flush(),o))}recordPv(){let e=this.pageKey();this.lastKey!==e&&(this.lastKey=e,this.buffer.push({url:window.location.href,path:window.location.pathname,referrer:document.referrer,timestampMs:Date.now()}),this.scheduleFirstFlush())}flush(){if(!this.config||this.buffer.length===0)return;let e=this.buffer.splice(0);Ne(this.config.collectorUrl,e,this.config.headers,{pvId:this.config.pvId})}listenRouteChanges(){this.recordPv();let e=i(()=>this.recordPv(),"onPopState");window.addEventListener("popstate",e),this.disposers.push(()=>window.removeEventListener("popstate",e)),this.patchHistory("pushState"),this.patchHistory("replaceState")}patchHistory(e){let o=history[e],h=i(()=>this.recordPv(),"recordPv");history[e]=function(...p){let g=o.apply(this,p);return h(),g},this.disposers.push(()=>{history[e]=o})}registerLifecycleListeners(){let e=i(()=>{document.visibilityState==="hidden"&&this.flush()},"onVisibilityChange");document.addEventListener("visibilitychange",e),this.disposers.push(()=>document.removeEventListener("visibilitychange",e));let o=i(()=>this.flush(),"onPageHide");window.addEventListener("pagehide",o),this.disposers.push(()=>window.removeEventListener("pagehide",o))}},i(D,"_PvTracker"),D),pe=We.instance;function he(){var o;let n=(o=B())!=null?o:"",e=W()?`/app/${n}/__runtime__/api/v1/observability/metrics/collect`:`/spark/app/${n}/runtime/api/v1/observability/metrics/collect`;pe.start({collectorUrl:e})}i(he,"initPvTracking");var je="https://lf3-static.bytednsdoc.com/obj/eden-cn/LMfspH/ljhwZthlaukjlkulzlp/miaoda-ui",$e=`${je}/doubao.svg`,Ue='<svg viewBox="0 0 10 10" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M8.08312 8.08298C8.2384 7.92769 8.23953 7.67705 8.08424 7.52176L5.3625 4.80002L8.08422 2.07829C8.23951 1.92301 8.23839 1.67236 8.0831 1.51708C7.92781 1.36179 7.67717 1.36066 7.52188 1.51595C7.36659 1.67124 4.80016 4.23767 4.80016 4.23767L2.07841 1.51593C1.92313 1.36064 1.67248 1.36177 1.5172 1.51705C1.36191 1.67234 1.36078 1.92298 1.51607 2.07827L4.23782 4.80002L1.51605 7.52178C1.36076 7.67707 1.36189 7.92771 1.51718 8.083C1.67246 8.23829 1.92311 8.23941 2.07839 8.08412L4.80016 5.36236L7.5219 8.0841C7.67719 8.23939 7.92783 8.23826 8.08312 8.08298Z" fill="currentColor"/></svg>',Ve='<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M12.6667 2H3.33333V14H6.66667V15.3334H3.33333C2.59695 15.3334 2 14.7364 2 14V2C2 1.26364 2.59695 0.666687 3.33333 0.666687H12.6667C13.403 0.666687 14 1.26364 14 2V7.33335H12.6667V2Z" fill="currentColor"/><path d="M5.33333 4.66669C4.96514 4.66669 4.66667 4.96516 4.66667 5.33335C4.66667 5.70154 4.96514 6 5.33333 6H10.6667C11.0349 6 11.3333 5.70154 11.3333 5.33335C11.3333 4.96516 11.0349 4.66669 10.6667 4.66669H5.33333Z" fill="currentColor"/><path d="M4.66667 8.33335C4.66667 7.96516 4.96514 7.66669 5.33333 7.66669H8C8.36819 7.66669 8.66667 7.96516 8.66667 8.33335C8.66667 8.70154 8.36819 9 8 9H5.33333C4.96514 9 4.66667 8.70154 4.66667 8.33335Z" fill="currentColor"/><path d="M13.5523 8.70017C13.9428 8.30964 14.576 8.30964 14.9665 8.70017C15.357 9.09069 15.357 9.72386 14.9665 10.1144L14.2594 10.8215L12.8452 9.40728L13.5523 8.70017Z" fill="currentColor"/><path d="M12.1381 10.1144L13.5523 11.5286L10.2309 14.85C10.0916 14.9892 9.91229 15.0815 9.71798 15.1138L8.45737 15.3234C8.42136 15.3294 8.38467 15.3177 8.35885 15.2918C8.33271 15.2657 8.32099 15.2284 8.32749 15.192L8.55128 13.9374C8.58465 13.7502 8.6746 13.5779 8.80901 13.4435L12.1381 10.1144Z" fill="currentColor"/></svg>',ge=!0,Ke="\u8C46\u5305 AI \u751F\u6210",Ze="\u7531\u98DE\u4E66\u5999\u642D\u63D0\u4F9B\u652F\u6301",Ge="0px 8px 32px rgba(0,0,0,0.08), 0px 4px 16px rgba(0,0,0,0.04), 0px 2px 4px rgba(0,0,0,0.02)",Je="0px 4px 16px rgba(0,0,0,0.03), 0px 4px 10px rgba(0,0,0,0.03), 0px 2px 4px rgba(0,0,0,0.02)",Z="'PingFang SC', -apple-system, BlinkMacSystemFont, sans-serif",qe={BOE:"tns.feishu-boe.cn",PRE:"tns.feishu-pre.cn",ONLINE:"tns.feishu.cn"};function me(){var o;let n=JSON.stringify({scene:"miaoda_app_report",entity_id:(o=B())!=null?o:"",entity_type:"miaoda_app",extra:""}),e=`https://${qe[F()]}/cust/lark_report/?type=common¶ms=${encodeURIComponent(n)}&lang=zh-CN`;window.open(e,"_blank","noopener,noreferrer")}i(me,"openDoubaoReport");function be(n){let e=document.createElement("span");Object.assign(e.style,{display:"inline-flex",width:`${n}px`,height:`${n}px`,flexShrink:"0"}),e.innerHTML=Ue;let o=e.firstElementChild;return o&&(o.setAttribute("width",String(n)),o.setAttribute("height",String(n)),o.style.display="block"),e}i(be,"makeCloseIcon");function Xe(n){let e=document.createElement("img");return e.src=$e,e.width=n,e.height=n,e.alt="",Object.assign(e.style,{width:`${n}px`,height:`${n}px`,maxWidth:"none",maxHeight:"none",borderRadius:"100px",flexShrink:"0",display:"block"}),e}i(Xe,"makeAvatar");function ye(n,e){let o=n==="desktop",h=document.createElement("div");Object.assign(h.style,{boxSizing:"border-box",display:"inline-flex",alignItems:"center",gap:o?"4px":"6px",padding:o?"6px 12px 6px 8px":"4px 12px 4px 8px",background:"#363636",border:"0.5px solid rgba(255,255,255,0.1)",borderRadius:"100px",boxShadow:Ge,cursor:"pointer"});let p=Xe(o?16:18),g=document.createElement("span");if(g.textContent=Ke,Object.assign(g.style,{fontFamily:Z,fontSize:o?"12px":"14px",lineHeight:o?"18px":"22px",color:"rgba(255,255,255,0.85)",whiteSpace:"nowrap"}),h.append(p,g),o&&e){let v=document.createElement("span");v.setAttribute("role","button"),v.setAttribute("aria-label","\u5173\u95ED"),v.setAttribute("data-doubao-close",""),Object.assign(v.style,{display:"none",alignItems:"center",cursor:"pointer",flexShrink:"0",color:"rgba(255,255,255,0.5)"}),v.appendChild(be(10)),v.addEventListener("click",y=>{y.stopPropagation(),e()}),h.appendChild(v)}return h}i(ye,"buildPill");function K(n){let e=document.createElement("div");e.setAttribute("role","menuitem"),e.setAttribute("data-label",n.label),Object.assign(e.style,{boxSizing:"border-box",display:"flex",alignItems:"center",gap:"8px",padding:"4px 10px",borderRadius:"6px",cursor:"pointer",color:"#000000"});let o=document.createElement("span");Object.assign(o.style,{display:"inline-flex",width:"16px",height:"16px",flexShrink:"0",color:"#000000"}),n.icon==="feedback"?o.innerHTML=Ve:o.appendChild(be(16));let h=document.createElement("span");return h.textContent=n.label,Object.assign(h.style,{fontFamily:Z,fontSize:`${n.fontSize}px`,lineHeight:`${n.fontSize+8}px`,color:"#000000",whiteSpace:"nowrap"}),e.append(o,h),e.addEventListener("mouseenter",()=>{e.style.background="rgba(0,0,0,0.04)"}),e.addEventListener("mouseleave",()=>{e.style.background="transparent"}),e.addEventListener("click",n.onClick),e}i(K,"buildMenuRow");function _e(n){let e=document.createElement("div");if(Object.assign(e.style,{boxSizing:"border-box",display:"flex",flexDirection:"column",minWidth:`${n.minWidth}px`,background:"#ffffff",border:"0.5px solid rgba(0,0,0,0.1)",borderRadius:"10px",boxShadow:Je,overflow:"hidden",outline:"none"}),n.rows.length){let h=document.createElement("div");Object.assign(h.style,{boxSizing:"border-box",padding:"4px"}),n.rows.forEach(p=>h.appendChild(p)),e.appendChild(h)}let o=document.createElement("div");return o.textContent=Ze,Object.assign(o.style,{boxSizing:"border-box",background:"#f9f9f9",padding:"8px 14px",fontFamily:Z,fontSize:`${n.footerFontSize}px`,lineHeight:`${n.footerFontSize+8}px`,color:"rgba(0,0,0,0.35)",whiteSpace:"nowrap"}),e.appendChild(o),e}i(_e,"buildMenuCard");function Ye(){let n=document.createElement("div");n.setAttribute("data-custom-element","doubao-watermark"),Object.assign(n.style,{position:"fixed",right:"12px",bottom:"12px",zIndex:"9999",display:"flex",flexDirection:"column",alignItems:"flex-end",gap:"8px"});let e=[];ge&&e.push(K({icon:"feedback",label:"\u6295\u8BC9\u4E0E\u4E3E\u62A5",fontSize:14,onClick:me}));let o=_e({rows:e,footerFontSize:12,minWidth:144});o.style.display="none";let h=ye("desktop",()=>n.remove()),p=h.querySelector("[data-doubao-close]");n.append(o,h);let g=null;return n.addEventListener("mouseenter",()=>{g&&clearTimeout(g),o.style.display="flex",p&&(p.style.display="inline-flex")}),n.addEventListener("mouseleave",()=>{g=setTimeout(()=>{o.style.display="none",p&&(p.style.display="none")},100)}),n}i(Ye,"buildDesktopWatermark");function Qe(){let n=document.createElement("div");n.setAttribute("data-custom-element","doubao-watermark-mobile"),Object.assign(n.style,{position:"fixed",right:"12px",bottom:"12px",zIndex:"9999",display:"flex",flexDirection:"column",alignItems:"flex-end",gap:"8px",cursor:"pointer"});let e=[];ge&&e.push(K({icon:"feedback",label:"\u6295\u8BC9\u4E0E\u4E3E\u62A5",fontSize:16,onClick:me})),e.push(K({icon:"close",label:"\u4E0D\u518D\u5C55\u793A",fontSize:16,onClick:i(p=>{p.stopPropagation(),n.remove()},"onClick")}));let o=_e({rows:e,footerFontSize:14,minWidth:160});o.style.display="none";let h=ye("mobile");return n.append(o,h),n.addEventListener("click",p=>{p.stopPropagation(),o.style.display=o.style.display==="none"?"flex":"none"}),document.addEventListener("click",()=>{o.style.display="none"}),n}i(Qe,"buildMobileWatermark");var ve=!1;function G(){if(ve||typeof document=="undefined")return;if(document.readyState==="loading"){document.addEventListener("DOMContentLoaded",G,{once:!0});return}ve=!0;let n=N()?Qe():Ye();document.body.appendChild(n)}i(G,"mountDoubaoWatermark");var et="0.0.12",tt="@lark-apaas/miaoda-coding-sdk";re()&&(ce(),he());G();return Ie(nt);})();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lark-apaas/miaoda-coding-sdk",
|
|
3
|
-
"version": "0.0.12
|
|
3
|
+
"version": "0.0.12",
|
|
4
4
|
"description": "CDN distribution of aPaaS Web SDK for no-build HTML — self-contained IIFE entries consumed via <script src>",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"typecheck": "tsc --noEmit"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@lark-apaas/observable-web-lite": "1.0.2
|
|
23
|
+
"@lark-apaas/observable-web-lite": "^1.0.2",
|
|
24
24
|
"blueimp-md5": "^2.10.0",
|
|
25
25
|
"crypto-js": "^3.1.9-1"
|
|
26
26
|
},
|