vendor: 5,960 bytes, line 1
1import{g as T}from"./classnames-c68cc36e.js";import{r as h}from"./react-029fb5b6.js";import{r as E}from"./react-dom-1cc11783.js";import{p as g}from"./prop-types-387d7a00.js";var b={},c={},a={};Object.defineProperty(a,"__esModule",{value:!0});a.FrameContextConsumer=a.FrameContextProvider=a.useFrame=a.FrameContext=void 0;var L=h,w=$(L);function $(t){return t&&t.__esModule?t:{default:t}}var C=void 0,O=void 0;typeof document<"u"&&(C=document);typeof window<"u"&&(O=window);var v=a.FrameContext=w.default.createContext({document:C,window:O});a.useFrame=function(){return w.default.useContext(v)};var k=v.Provider,U=v.Consumer;a.FrameContextProvider=k;a.FrameContextConsumer=U;var _={};Object.defineProperty(_,"__esModule",{value:!0});var j=function(){function t(e,o){for(var r=0;r<o.length;r++){var n=o[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(e,o,r){return o&&t(e.prototype,o),r&&t(e,r),e}}(),m=h;F(m);var q=g,p=F(q);function F(t){return t&&t.__esModule?t:{default:t}}function S(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function W(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function I(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var M=function(t){I(e,t);function e(){return S(this,e),W(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return j(e,[{key:"componentDidMount",value:function(){this.props.contentDidMount()}},{key:"componentDidUpdate",value:function(){this.props.contentDidUpdate()}},{key:"render",value:function(){return m.Children.only(this.props.children)}}]),e}(m.Component);M.propTypes={children:p.default.element.isRequired,contentDidMount:p.default.func.isRequired,contentDidUpdate:p.default.func.isRequired};_.default=M;Object.defineProperty(c,"__esModule",{value:!0});c.Frame=void 0;var s=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var o=arguments[e];for(var r in o)Object.prototype.hasOwnProperty.call(o,r)&&(t[r]=o[r])}return t},V=function(){function t(e,o){for(var r=0;r<o.length;r++){var n=o[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(e,o,r){return o&&t(e.prototype,o),r&&t(e,r),e}}(),R=h,i=l(R),N=E,D=l(N),Y=g,u=l(Y),z=a,A=_,B=l(A);function l(t){return t&&t.__esModule?t:{default:t}}function G(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function H(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function J(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var y=c.Frame=function(t){J(e,t);function e(o,r){G(this,e);var n=H(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,o,r));return n.setRef=function(d){n.nodeRef.current=d;var f=n.props.forwardedRef;typeof f=="function"?f(d):f&&(f.current=d)},n.handleLoad=function(){clearInterval(n.loadCheck),n.state.iframeLoaded||n.setState({iframeLoaded:!0})},n.loadCheck=function(){return setInterval(function(){n.handleLoad()},500)},n._isMounted=!1,n.nodeRef=i.default.createRef(),n.state={iframeLoaded:!1},n}return V(e,[{key:"componentDidMount",value:function(){this._isMounted=!0;var r=this.getDoc();r&&this.nodeRef.current.contentWindow.addEventListener("DOMContentLoaded",this.handleLoad)}},{key:"componentWillUnmount",value:function(){this._isMounted=!1,this.nodeRef.current.removeEventListener("DOMContentLoaded",this.handleLoad)}},{key:"getDoc",value:function(){return this.nodeRef.current?this.nodeRef.current.contentDocument:null}},{key:"getMountTarget",value:function(){var r=this.getDoc();return this.props.mountTarget?r.querySelector(this.props.mountTarget):r.body.children[0]}},{key:"renderFrameContents",value:function(){if(!this._isMounted)return null;var r=this.getDoc();if(!r)return null;var n=this.props.contentDidMount,d=this.props.contentDidUpdate,f=r.defaultView||r.parentView,P=i.default.createElement(B.default,{contentDidMount:n,contentDidUpdate:d},i.default.createElement(z.FrameContextProvider,{value:{document:r,window:f}},i.default.createElement("div",{className:"frame-content"},this.props.children))),x=this.getMountTarget();return[D.default.createPortal(this.props.head,this.getDoc().head),D.default.createPortal(P,x)]}},{key:"render",value:function(){var r=s({},this.props,{srcDoc:this.props.initialContent,children:void 0});return delete r.head,delete r.initialContent,delete r.mountTarget,delete r.contentDidMount,delete r.contentDidUpdate,delete r.forwardedRef,i.default.createElement("iframe",s({},r,{ref:this.setRef,onLoad:this.handleLoad}),this.state.iframeLoaded&&this.renderFrameContents())}}]),e}(R.Component);y.propTypes={style:u.default.object,head:u.default.node,initialContent:u.default.string,mountTarget:u.default.string,contentDidMount:u.default.func,contentDidUpdate:u.default.func,children:u.default.oneOfType([u.default.element,u.default.arrayOf(u.default.element)])};y.defaultProps={style:{},head:null,children:void 0,mountTarget:void 0,contentDidMount:function(){},contentDidUpdate:function(){},initialContent:'<!DOCTYPE html><html><head></head><body><div class="frame-root"></div></body></html>'};c.default=i.default.forwardRef(function(t,e){return i.default.createElement(y,s({},t,{forwardedRef:e}))});
1(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=c;Object.defineProperty(t,"default",{enumerable:!0,get:function(){return r(e).default}});var o=a;Object.defineProperty(t,"FrameContext",{enumerable:!0,get:function(){return o.FrameContext}}),Object.defineProperty(t,"FrameContextConsumer",{enumerable:!0,get:function(){return o.FrameContextConsumer}}),Object.defineProperty(t,"useFrame",{enumerable:!0,get:function(){return o.useFrame}});function r(n){return n&&n.__esModule?n:{default:n}}})(b);const ee=T(b);export{ee as F};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.