${this.showPreview||this.error?"":N`
`}
${this.renderIframe()}
${this.error?N`
${i18n.t('could_not_load_workflow_preview')} ${i18n.t('you_can_still')}
${i18n.t('and_paste_it_into_n8n')}
`:""}
${t?N`
${i18n.t('double_click_node_settings')}
${i18n.t('into_n8n_to_import')}
`:""}
${this.showCode?N`
${i18n.t(this.copyTextKey)}
${ot(this.workflow)?JSON.stringify(JSON.parse(this.workflow),void 0,2):i18n.t('invalid_json')}
`:""}
`
}
};
nt.styles=((t,...s)=>{const o=1===t.length?t[0]:s.reduce(((i,s,e)=>i+(t=>{if(!0===t._$cssResult$)return t.cssText;if("number"==typeof t)return t;throw Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(s)+t[e+1]),t[0]);return new e(o,i)})`
:host {
--n8n-color-primary-h: 6.9;
--n8n-color-primary-s: 100%;
--n8n-color-primary-l: 67.6%;
--n8n-color-primary: hsl(
var(--n8n-color-primary-h),
var(--n8n-color-primary-s),
var(--n8n-color-primary-l)
);
}
*,
*::before,
*::after {
box-sizing: border-box;
}
button {
outline: none;
text-decoration: none;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
-webkit-appearance: none;
}
.workflow_json {
height: 300px;
padding-left: 10px;
overflow: auto;
background-color: var(--n8n-json-background-color, hsl(260deg 100% 99%));
word-wrap: normal;
font-family: 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono',
'Bitstream Vera Sans Mono', 'Courier New', monospace;
font-size: 1.2em;
color: hsl(0, 0%, 20%);
}
.overlay {
height: 100%;
width: 100%;
position: absolute;
top: 0;
left: 0;
background: var(--n8n-overlay-background, hsla(232, 48%, 12%, 0.1));
display: flex;
align-items: center;
justify-content: center;
opacity: 0;
}
.overlay:hover {
opacity: 1;
transition: 250ms opacity;
}
.overlay > button {
padding: 20px 40px;
border-radius: 8px;
font-weight: 600;
font-size: 18px;
line-height: 24px;
border: var(--n8n-overlay-border, none);
background-color: var(
--n8n-overlay-background-color,
var(--n8n-color-primary)
);
color: var(--n8n-interact-button-color, white);
}
.overlay > button:hover {
filter: brightness(85%);
cursor: pointer;
}
.canvas-container {
height: var(--n8n-workflow-min-height, 300px);
position: relative;
}
.embedded_workflow.frame {
padding: 10px;
background-color: var(--n8n-frame-background-color, hsl(260, 11%, 95%));
}
.embedded_workflow .embedded_tip_error {
color: hsl(0, 0%, 40%);
text-align: center;
font-size: 0.9em;
}
.embedded_workflow .embedded_tip_error_with_code {
margin-bottom: 10px;
}
.embedded_workflow .embedded_tip {
margin-top: 7px;
color: hsl(0, 0%, 40%);
text-align: center;
font-size: 0.9em;
}
.embedded_workflow .embedded_tip_with_code {
margin-top: 7px;
margin-bottom: 10px;
}
.embedded_workflow_iframe {
width: 100%;
min-height: var(--n8n-workflow-min-height, 300px);
border: 0;
border-radius: var(--n8n-iframe-border-radius, 0px);
}
.embedded_workflow_iframe_node_view {
position: fixed;
top: 0;
left: 0;
height: 100%;
width: 100%;
z-index: 9999999;
}
.code_toggle {
background: none;
border: none;
padding: 0px;
margin: -1px;
cursor: pointer;
color: var(--n8n-color-primary);
font-size: 1em;
}
.copy_button {
display: none; /* Hide button */
}
.workflow_json:hover .copy_button {
display: block;
float: right;
right: 0px;
margin-top: 10px;
margin-right: 10px;
padding: 5px;
font-family: 'Arial', 'sans-serif';
font-size: 0.8em;
color: #646464;
background: var(--n8n-copy-button-background-color, rgb(239, 239, 239));
cursor: pointer;
}
.non_interactive {
pointer-events: none;
}
`,et([Q({type:String})],nt.prototype,"workflow",void 0),et([Q({type:String})],nt.prototype,"frame",void 0),et([Q({type:String})],nt.prototype,"src",void 0),et([Q({type:String})],nt.prototype,"collapseformobile",void 0),et([Q({type:String})],nt.prototype,"clicktointeract",void 0),et([Q({type:String})],nt.prototype,"hidecanvaserrors",void 0),et([Q({type:String})],nt.prototype,"disableinteractivity",void 0),et([Q({type:[String,void 0]})],nt.prototype,"theme",void 0),et([X()],nt.prototype,"showCode",void 0),et([X()],nt.prototype,"showPreview",void 0),et([X()],nt.prototype,"fullscreen",void 0),et([X()],nt.prototype,"insideIframe",void 0),et([X()],nt.prototype,"copyTextKey",void 0),et([X()],nt.prototype,"isMobileView",void 0),et([X()],nt.prototype,"error",void 0),et([X()],nt.prototype,"interactive",void 0),et([X()],nt.prototype,"locale",void 0),nt=et([(t=>i=>"function"==typeof i?((t,i)=>(window.customElements.define(t,i),i))(t,i):((t,i)=>{const{kind:s,elements:e}=i;return{kind:s,elements:e,finisher(i){window.customElements.define(t,i)}}})(t,i))("n8n-demo")],nt);export{nt as N8NDemo};