"use strict";var e=require("@kdcloudjs/kwc"),t=require("./shadowBaseClassPrivate.js"),s=require("./messageDispatcher.js"),i=require("../ssr-RXknEJpO.js");require("../observable-BXDJFaLN.js"),require("../i18n-CP31jeWH.js"),require("./utilsPrivate.js"),require("../client-Co_j5m_k.js"),require("../normalize-DKPi18vK.js"),require("./iso8601Utils.js"),require("../colorValid-BBnkvgd_.js"),require("../empty_html-hFq4zm9t.js");var r=[function(e,t,s){return".kdds-non-salseforce-resource"+(e?"["+e+"]":"")+" {display: none;}"}];function n(e,t,s,i){const{b:r,h:n}=e,{_m0:o}=i;return[n("iframe",{style:t.frameStyle,attrs:{src:t.src,title:t.title,width:t.width,height:t.height,lang:t.language},key:0,on:o||(i._m0={load:r(t.handleContentLoad)})})]}var o=e.registerTemplate(n);n.stylesheets=[],n.stylesheetToken="kwc-7d89m8ebf1g",n.legacyStylesheetToken="D:\\new_workspace\\workspace\\kingdee-base-components\\src\\modules\\kd\\primitiveIframe-undefined_primitiveIframe",r&&n.stylesheets.push.apply(n.stylesheets,r),e.freezeTemplate(n);class a extends t{constructor(...e){super(...e),this.src=void 0,this.domain=void 0,this.width="100%",this.height="100%",this.frameStyle="",this.title=void 0,this.language=void 0}connectedCallback(){super.connectedCallback(),s.registerDomain(this.src)}renderedCallback(){this.language=i.isCSR&&document.documentElement.lang||null}disconnectedCallback(){s.unregisterDomain(this.src)}handleContentLoad(){const e=new CustomEvent("iframeload",{detail:{callbacks:{postToWindow:this.postToWindow.bind(this)}}});this.contentWindow=this.template.querySelector("iframe").contentWindow,this.dispatchEvent(e)}postToWindow(e){this.contentWindow&&this.contentWindow.postMessage(e,this.domain)}}e.registerDecorators(a,{publicProps:{src:{config:0},domain:{config:0},width:{config:0},height:{config:0},frameStyle:{config:0},title:{config:0}},publicMethods:["postToWindow"],fields:["language"]});const l=e.registerComponent(a,{tmpl:o,sel:"D:\\new_workspace\\workspace\\kingdee-base-components\\src\\modules\\kd\\primitiveIframe-",apiVersion:63});module.exports=l;
