@gregoriusrippenstein/node-red-contrib-introspection 0.6.12 → 0.6.14

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gregoriusrippenstein/node-red-contrib-introspection",
3
- "version": "0.6.12",
3
+ "version": "0.6.14",
4
4
  "dependencies": {
5
5
  "got": "^13",
6
6
  "uglify-js": "^3.17.4",
@@ -2,11 +2,11 @@
2
2
  (function() {
3
3
  var globalRefToSvgData;
4
4
 
5
- let obfuscateHelpers={getFlowDataFromCurrentWorkspace:e=>{var e=e||RED.workspaces.active(),t=RED.nodes.groups(e),e=(t=(t=t.concat(RED.nodes.junctions(e))).concat(RED.nodes.filterNodes({z:e})),RED.nodes.eachConfig(function(e){e.z===RED.workspaces.active()&&!1===e._def.hasUsers&&t.push(e)}),RED.nodes.workspace(e)||RED.nodes.subflow(e));return t.unshift(e),RED.nodes.createExportableNodeSet(t)},openImportDialog:e=>{RED.clipboard.import();let t=e;setTimeout(()=>{$("#red-ui-clipboard-dialog-import-text").val(JSON.stringify(t)).trigger("paste")},300)}};function obfuscatieCurrentFlow(t){let a=obfuscateHelpers.getFlowDataFromCurrentWorkspace(),l=(t.remove_groups&&(a=a.filter(e=>"group"!=e.type)).forEach(e=>{delete e.g}),{}),r={},p={},f={},s=[],d={},o={};if(a.forEach(e=>{"subflow"==(l[e.id]=e).type&&(o[e.id]=e),"junction"==e.type&&(r[e.id]=e),"link out"==e.type&&(f[e.id]=e),"link in"==e.type&&(p[e.id]=e),"link call"==e.type&&s.push(e.id),"catch"==e.type&&(d[e.id]=(e.wires||[])[0]||[])}),t.remove_junctions&&(Object.keys(r).forEach(n=>{let s=r[n];o[s.z]||a.forEach(t=>{for(let e=0;e<(t.wires||[]).length;e++){var r=t.wires[e].indexOf(n);-1<r&&(t.wires[e].splice(r,1),t.wires[e].push(...s.wires[0]))}})}),a=a.filter(e=>!("junction"==e.type&&!o[e.z]))),t.remove_linkout_nodes||t.remove_linkcall_nodes){let n=[],r=[],u=[],i=(t.remove_linkout_nodes&&!t.copy_linkin_nodes&&Object.keys(f).forEach(s=>{var e=f[s],t=e.links||[];t.reduce((e,t)=>e&&!!p[t],!0)&&"return"!=e.mode&&(n.push(s),t.forEach(n=>{a.forEach(t=>{for(let e=0;e<(t.wires||[]).length;e++){var r=t.wires[e].indexOf(s);-1<r&&(t.wires[e].splice(r,1),t.wires[e].push(...p[n].wires[0]))}})}))}),(s,e)=>{if(!e)return!1;let t=[],o=[],r=[];function u(e){if(r.indexOf(e.id)<0)switch(r.push(e.id),t.push(e),e.type){case"link out":if("return"!=e.mode)throw"not handable";break;case"link call":throw"unhandled";default:RED.nodes.getNodeLinks(e).forEach(function(e){u(e.target)})}}try{RED.nodes.getNodeLinks(e).forEach(function(e){u(e.target),o.push(e.target.id)});if(Object.keys(d).forEach(e=>{((t,e)=>{try{return e.map(e=>e.id).forEach(e=>{if(t.includes(e))throw"yes"}),!1}catch(e){return!0}})(d[e],t)&&t.push(l[e])}),0==t.length)return!1;let r={};var i=t[0];let n={x:s.x-i.x,y:s.y-i.y};var a=t.map(e=>{var t=structuredClone(l[e.id]);return t||console.log("WARNING: nodeid not found",[e.id,l[e.id]]),t.id=RED.nodes.id(),t.x+=n.x,t.y+=n.y,r[e.id]=t});return a.forEach(e=>{"catch"==e.type&&Array.isArray(e.scope)&&(e.scope=e.scope.map(e=>{var t=r[e];return t&&t.id||e})),e.wires&&(e.wires=e.wires.map(e=>e.map(e=>{var t=r[e];return t&&"link out"==t.type?[...s.wires[0],(t||{}).id||e]:(t||{}).id||e}).flat()))}),{nodes:a.filter(e=>"link out"!=e.type),entryNodes:o.map(e=>r[e])}}catch(e){return!1}});t.remove_linkout_nodes&&t.copy_linkin_nodes&&Object.keys(f).forEach(o=>{let r=f[o];var e=r.links||[];"return"!=r.mode&&(e=e.map(e=>{var t=p[e],t=i(r,t);if(t)return[e,t]})).reduce((e,t)=>e&&!!t,!0)&&(n.push(o),e.forEach(([,s])=>{a.forEach(t=>{for(let e=0;e<(t.wires||[]).length;e++){var r,n=t.wires[e].indexOf(o);-1<n&&(r=s.entryNodes.map(e=>e.id),t.wires[e].splice(n,1),t.wires[e].push(...r),u.push(...s.nodes))}})}))}),t.remove_linkcall_nodes&&s.forEach(s=>{var e=l[s],t=p[e.links[0]];let o=i(e,t);t&&o&&(r.push(e.id),a.forEach(t=>{for(let e=0;e<(t.wires||[]).length;e++){var r,n=t.wires[e].indexOf(s);-1<n&&(r=o.entryNodes.map(e=>e.id),t.wires[e].splice(n,1),t.wires[e].push(...r),u.push(...o.nodes))}}))}),(a=a.filter(e=>n.indexOf(e.id)<0&&r.indexOf(e.id)<0)).push(...u)}if((a=t.remove_debugs?a.filter(e=>"debug"!=e.type&&"comment"!=e.type):a).forEach(e=>{t.name&&(e.name=RED.nodes.id()),t.shrink_node&&(e.l=!1),t.info&&(e.info="",delete e.outputLabels,delete e.inputLabels),t.add_license&&(t.append_license?e.info=(e.info||"")+"\n---\n\n"+t.license_text:e.info=t.license_text),t.position&&(e.x=150,e.y=150),t.remove_icons&&delete e.icon}),t.replace_switch){let n=(t,r)=>{for(let e=0;e<r.rules.length;e++){var n=r.rules[e];if("nnull"==n.t)t.push("if ( _propValue != null ) { _returnValue.push(msg) ; return node.send(_returnValue) } else { _returnValue.push(undefined) }");else if("null"==n.t)t.push("if ( _propValue == null ) { _returnValue.push(msg) ; return node.send(_returnValue) } else { _returnValue.push(undefined) }");else if("eq"==n.t&&"str"==n.vt){s=n.v;s=btoa(encodeURIComponent(s).replace(/%([0-9A-F]{2})/g,function(e,t){return String.fromCharCode("0x"+t)}));t.push("if ( _propValue === Buffer.from('"+s+"', 'base64').toString('utf-8') ) { _returnValue.push(msg) ; return node.send(_returnValue) } else { _returnValue.push(undefined) }")}else if("gt"==n.t&&"num"==n.vt)t.push("if ( _propValue > "+n.v+" ) { _returnValue.push(msg) ; return node.send(_returnValue) } else { _returnValue.push(undefined) }");else if("eq"==n.t&&"num"==n.vt)t.push("if ( _propValue == "+n.v+" ) { _returnValue.push(msg) ; return node.send(_returnValue) } else { _returnValue.push(undefined) }");else if("empty"==n.t)t.push('let p = _propValue ; if ( (Array.isArray(p) && p.length == 0) || ((typeof p === "object") && p != null && Object.keys(p).length == 0) || ((typeof p === "string") && p.length == 0) ) { _returnValue.push(msg) ; return node.send(_returnValue) } else { _returnValue.push(undefined) }');else if("nempty"==n.t)t.push('let p = _propValue ; if ( (Array.isArray(p) && p.length > 0) || ((typeof p === "object") && p != null && Object.keys(p).length > 0) || ((typeof p === "string") && p.length > 0) ) { _returnValue.push(msg) ; return node.send(_returnValue) } else { _returnValue.push(undefined) }');else{if("else"!=n.t)throw"unhandled";t.push("_returnValue.push(msg)","return node.send(_returnValue)")}}var s};a=a.map(t=>{if("switch"!=t.type)return t;var e={id:t.id,name:t.name,type:"function",x:t.x,y:t.y,func:"",outputs:t.outputs,timeout:"",noerr:0,initialize:"",finalize:"",libs:[{var:"process",module:"process"},{var:"jsonata",module:"jsonata"}],wires:t.wires};t.hasOwnProperty("z")&&(e.z=t.z),t.hasOwnProperty("l")&&(e.l=t.l);try{var r=[];if(t.checkAll)throw"unhandled";if("msg"==t.propertyType)r.push("((msg,node) => {","let _propValue = undefined","try { _propValue = RED.util.getMessageProperty(msg, '"+t.property+"') } catch (ex) {}","let _returnValue = []"),n(r,t),r.push("})(msg,node);");else{if("jsonata"!=t.propertyType)throw"unhandled";r.push("jsonata('"+t.property+"').evaluate(msg).then(_propValue => {","let _returnValue = []"),n(r,t),r.push("})")}return e.func=r.join("\n"),e}catch(e){return t}})}if(t.replace_change){let s=e=>btoa(encodeURIComponent(e).replace(/%([0-9A-F]{2})/g,function(e,t){return String.fromCharCode("0x"+t)}));a=a.map(t=>{if("change"!=t.type)return t;var e={id:t.id,name:t.name,type:"function",x:t.x,y:t.y,func:"",outputs:1,timeout:"",noerr:0,initialize:"",finalize:"",libs:[{var:"process",module:"process"},{var:"jsonata",module:"jsonata"}],wires:t.wires};t.hasOwnProperty("z")&&(e.z=t.z),t.hasOwnProperty("l")&&(e.l=t.l);try{var r=["(async (msg,node) => {","let __s = RED.util.setMessageProperty","let __g = RED.util.getMessageProperty"];for(let e=0;e<t.rules.length;e++){var n=t.rules[e];if("set"==n.t){if(n.dc)throw"unhandled";if("msg"==n.pt&&"str"==n.tot)r.push("__s(msg,'"+n.p+"', Buffer.from('"+s(n.to)+"', 'base64').toString('utf-8') )");else if("msg"==n.pt&&"bool"==n.tot)r.push("__s(msg,'"+n.p+"', "+n.to+")");else if("msg"==n.pt&&"num"==n.tot)r.push("__s(msg,'"+n.p+"', Number(Buffer.from('"+s(n.to)+"', 'base64').toString('utf-8')))");else if("msg"==n.pt&&"json"==n.tot)r.push("__s(msg,'"+n.p+"', JSON.parse(Buffer.from('"+s(n.to)+"', 'base64').toString('utf-8')))");else if("msg"==n.pt&&"msg"==n.tot)r.push("try { __s(msg,'"+n.p+"', __g(msg, '"+n.to+"')) } catch (ex) {}");else if("msg"==n.pt&&"env"==n.tot)r.push("__s(msg,'"+n.p+"', process.env['"+n.to+"'])");else{if("msg"!=n.pt||"jsonata"!=n.tot||!n.to.startsWith("/* @obfuscate-safe */"))throw"unhandlable";r.push("__s(msg,'"+n.p+"', await jsonata(Buffer.from('"+s(n.to)+"', 'base64').toString('utf-8')).evaluate(msg) )")}}else{if("delete"!=n.t||"msg"!=n.pt)throw"unhandlable";r.push("delete msg."+n.p)}}return r.push("node.send(msg) })(msg,node);"),e.func=r.join("\n"),e}catch(e){return console.log(e),t}})}if(t.javascript){let r={},t=[];a.forEach(e=>{"javascript"!=(r[e.id]=e).format&&"function"!=e.type&&"css"!=e.format&&"json"!=e.format||t.push(e)});var e={parse:{bare_returns:!0,expression:!1},compress:{},mangle:{reserved:["$","export","require"]},output:null,sourceMap:null,nameCache:null,toplevel:!1,warnings:!1},u={compatibility:"*",level:2};$.ajax({url:"ClientCode/"+RED.nodes.id()+"/ugify",type:"POST",contentType:"application/json; charset=utf-8",data:JSON.stringify({nodes:t,jscfg:e,csscfg:u}),success:function(e){e.forEach(e=>{var t=r[e.id];e._error&&console.log("ERROR NODE",e),"function"==t.type?t.func=e.func:"javascript"!=t.format&&"css"!=t.format&&"json"!=t.format||(t.template=e.template)}),obfuscateHelpers.openImportDialog(a)},error:function(e,t,r){RED.notify("ClientCode Communcation Failure: "+n.id+": "+t,{type:"error",timeout:3e3})}})}else obfuscateHelpers.openImportDialog(a)}
5
+ let obfuscateHelpers={getFlowDataFromCurrentWorkspace:e=>{var e=e||RED.workspaces.active(),t=RED.nodes.groups(e),e=(t=(t=t.concat(RED.nodes.junctions(e))).concat(RED.nodes.filterNodes({z:e})),RED.nodes.eachConfig(function(e){e.z===RED.workspaces.active()&&!1===e._def.hasUsers&&t.push(e)}),RED.nodes.workspace(e)||RED.nodes.subflow(e));return t.unshift(e),RED.nodes.createExportableNodeSet(t)},openImportDialog:e=>{RED.clipboard.import();let t=e;setTimeout(()=>{$("#red-ui-clipboard-dialog-import-text").val(JSON.stringify(t)).trigger("paste")},300)}};function obfuscatieCurrentFlow(o){let i=obfuscateHelpers.getFlowDataFromCurrentWorkspace(),l=(o.remove_groups&&(i=i.filter(e=>"group"!=e.type)).forEach(e=>{delete e.g}),{}),t={},a={},p={},s=[],f={},r={};if(i.forEach(e=>{"subflow"==(l[e.id]=e).type&&(r[e.id]=e),"junction"==e.type&&(t[e.id]=e),"link out"==e.type&&(p[e.id]=e),"link in"==e.type&&(a[e.id]=e),"link call"==e.type&&s.push(e.id),"catch"==e.type&&(f[e.id]=(e.wires||[])[0]||[])}),o.remove_junctions&&(Object.keys(t).forEach(n=>{let s=t[n];r[s.z]||i.forEach(t=>{for(let e=0;e<(t.wires||[]).length;e++){var r=t.wires[e].indexOf(n);-1<r&&(t.wires[e].splice(r,1),t.wires[e].push(...s.wires[0]))}})}),i=i.filter(e=>!("junction"==e.type&&!r[e.z]))),o.remove_linkout_nodes||o.remove_linkcall_nodes){let t=[],r=[],u=[],n=(o.remove_linkout_nodes&&!o.copy_linkin_nodes&&Object.keys(p).forEach(n=>{var e=p[n];let s=e.links||[];s.reduce((e,t)=>e&&(!!a[t]||o.ignore_off_flow_links),!0)&&"return"!=e.mode&&(t.push(n),i.forEach(r=>{for(let t=0;t<(r.wires||[]).length;t++){var e=r.wires[t].indexOf(n);-1<e&&(r.wires[t].splice(e,1),s.forEach(e=>{a[e]&&r.wires[t].push(...a[e].wires[0])}))}}))}),(s,e)=>{if(!e)return!1;let t=[],o=[],r=[];function u(e){if(r.indexOf(e.id)<0)switch(r.push(e.id),t.push(e),e.type){case"link out":if("return"!=e.mode)throw"not handable";break;case"link call":throw"unhandled";default:RED.nodes.getNodeLinks(e).forEach(function(e){u(e.target)})}}try{RED.nodes.getNodeLinks(e).forEach(function(e){u(e.target),o.push(e.target.id)});if(Object.keys(f).forEach(e=>{((t,e)=>{try{return e.map(e=>e.id).forEach(e=>{if(t.includes(e))throw"yes"}),!1}catch(e){return!0}})(f[e],t)&&t.push(l[e])}),0==t.length)return!1;let r={};var i=t[0];let n={x:s.x-i.x,y:s.y-i.y};var a=t.map(e=>{var t=structuredClone(l[e.id]);return t||console.log("WARNING: nodeid not found",[e.id,l[e.id]]),t.id=RED.nodes.id(),t.x+=n.x,t.y+=n.y,r[e.id]=t});return a.forEach(e=>{"catch"==e.type&&Array.isArray(e.scope)&&(e.scope=e.scope.map(e=>{var t=r[e];return t&&t.id||e})),e.wires&&(e.wires=e.wires.map(e=>e.map(e=>{var t=r[e];return t&&"link out"==t.type?[...s.wires[0],(t||{}).id||e]:(t||{}).id||e}).flat()))}),{nodes:a.filter(e=>"link out"!=e.type),entryNodes:o.map(e=>r[e])}}catch(e){return!1}});o.remove_linkout_nodes&&o.copy_linkin_nodes&&Object.keys(p).forEach(o=>{let r=p[o];var e=r.links||[];"return"!=r.mode&&(e=e.map(e=>{var t=a[e],t=n(r,t);if(t)return[e,t]})).reduce((e,t)=>e&&!!t,!0)&&(t.push(o),e.forEach(([,s])=>{i.forEach(t=>{for(let e=0;e<(t.wires||[]).length;e++){var r,n=t.wires[e].indexOf(o);-1<n&&(r=s.entryNodes.map(e=>e.id),t.wires[e].splice(n,1),t.wires[e].push(...r),u.push(...s.nodes))}})}))}),o.remove_linkcall_nodes&&s.forEach(s=>{var e=l[s],t=a[e.links[0]];let o=n(e,t);t&&o&&(r.push(e.id),i.forEach(t=>{for(let e=0;e<(t.wires||[]).length;e++){var r,n=t.wires[e].indexOf(s);-1<n&&(r=o.entryNodes.map(e=>e.id),t.wires[e].splice(n,1),t.wires[e].push(...r),u.push(...o.nodes))}}))}),(i=i.filter(e=>t.indexOf(e.id)<0&&r.indexOf(e.id)<0)).push(...u)}if((i=o.remove_debugs?i.filter(e=>"debug"!=e.type&&"comment"!=e.type):i).forEach(e=>{o.name&&(e.name=RED.nodes.id()),o.shrink_node&&(e.l=!1),o.info&&(e.info="",delete e.outputLabels,delete e.inputLabels),o.add_license&&(o.append_license?e.info=(e.info||"")+"\n---\n\n"+o.license_text:e.info=o.license_text),o.position&&(e.x=150,e.y=150),o.remove_icons&&delete e.icon}),o.replace_switch){let n=(t,r)=>{for(let e=0;e<r.rules.length;e++){var n=r.rules[e];if("nnull"==n.t)t.push("if ( _propValue != null ) { _returnValue.push(msg) ; return node.send(_returnValue) } else { _returnValue.push(undefined) }");else if("null"==n.t)t.push("if ( _propValue == null ) { _returnValue.push(msg) ; return node.send(_returnValue) } else { _returnValue.push(undefined) }");else if("eq"==n.t&&"str"==n.vt){s=n.v;s=btoa(encodeURIComponent(s).replace(/%([0-9A-F]{2})/g,function(e,t){return String.fromCharCode("0x"+t)}));t.push("if ( _propValue === Buffer.from('"+s+"', 'base64').toString('utf-8') ) { _returnValue.push(msg) ; return node.send(_returnValue) } else { _returnValue.push(undefined) }")}else if("gt"==n.t&&"num"==n.vt)t.push("if ( _propValue > "+n.v+" ) { _returnValue.push(msg) ; return node.send(_returnValue) } else { _returnValue.push(undefined) }");else if("eq"==n.t&&"num"==n.vt)t.push("if ( _propValue == "+n.v+" ) { _returnValue.push(msg) ; return node.send(_returnValue) } else { _returnValue.push(undefined) }");else if("empty"==n.t)t.push('let p = _propValue ; if ( (Array.isArray(p) && p.length == 0) || ((typeof p === "object") && p != null && Object.keys(p).length == 0) || ((typeof p === "string") && p.length == 0) ) { _returnValue.push(msg) ; return node.send(_returnValue) } else { _returnValue.push(undefined) }');else if("nempty"==n.t)t.push('let p = _propValue ; if ( (Array.isArray(p) && p.length > 0) || ((typeof p === "object") && p != null && Object.keys(p).length > 0) || ((typeof p === "string") && p.length > 0) ) { _returnValue.push(msg) ; return node.send(_returnValue) } else { _returnValue.push(undefined) }');else{if("else"!=n.t)throw"unhandled";t.push("_returnValue.push(msg)","return node.send(_returnValue)")}}var s};i=i.map(t=>{if("switch"!=t.type)return t;var e={id:t.id,name:t.name,type:"function",x:t.x,y:t.y,func:"",outputs:t.outputs,timeout:"",noerr:0,initialize:"",finalize:"",libs:[{var:"process",module:"process"},{var:"jsonata",module:"jsonata"}],wires:t.wires};t.hasOwnProperty("z")&&(e.z=t.z),t.hasOwnProperty("l")&&(e.l=t.l);try{var r=[];if(t.checkAll)throw"unhandled";if("msg"==t.propertyType)r.push("((msg,node) => {","let _propValue = undefined","try { _propValue = RED.util.getMessageProperty(msg, '"+t.property+"') } catch (ex) {}","let _returnValue = []"),n(r,t),r.push("})(msg,node);");else{if("jsonata"!=t.propertyType)throw"unhandled";r.push("jsonata('"+t.property+"').evaluate(msg).then(_propValue => {","let _returnValue = []"),n(r,t),r.push("})")}return e.func=r.join("\n"),e}catch(e){return t}})}if(o.replace_change){let s=e=>btoa(encodeURIComponent(e).replace(/%([0-9A-F]{2})/g,function(e,t){return String.fromCharCode("0x"+t)}));i=i.map(t=>{if("change"!=t.type)return t;var e={id:t.id,name:t.name,type:"function",x:t.x,y:t.y,func:"",outputs:1,timeout:"",noerr:0,initialize:"",finalize:"",libs:[{var:"process",module:"process"},{var:"jsonata",module:"jsonata"}],wires:t.wires};t.hasOwnProperty("z")&&(e.z=t.z),t.hasOwnProperty("l")&&(e.l=t.l);try{var r=["(async (msg,node) => {","let __s = RED.util.setMessageProperty","let __g = RED.util.getMessageProperty"];for(let e=0;e<t.rules.length;e++){var n=t.rules[e];if("set"==n.t){if(n.dc)throw"unhandled";if("msg"==n.pt&&"str"==n.tot)r.push("__s(msg,'"+n.p+"', Buffer.from('"+s(n.to)+"', 'base64').toString('utf-8') )");else if("msg"==n.pt&&"bool"==n.tot)r.push("__s(msg,'"+n.p+"', "+n.to+")");else if("msg"==n.pt&&"num"==n.tot)r.push("__s(msg,'"+n.p+"', Number(Buffer.from('"+s(n.to)+"', 'base64').toString('utf-8')))");else if("msg"==n.pt&&"json"==n.tot)r.push("__s(msg,'"+n.p+"', JSON.parse(Buffer.from('"+s(n.to)+"', 'base64').toString('utf-8')))");else if("msg"==n.pt&&"msg"==n.tot)r.push("try { __s(msg,'"+n.p+"', __g(msg, '"+n.to+"')) } catch (ex) {}");else if("msg"==n.pt&&"env"==n.tot)r.push("__s(msg,'"+n.p+"', process.env['"+n.to+"'])");else{if("msg"!=n.pt||"jsonata"!=n.tot||!n.to.startsWith("/* @obfuscate-safe */"))throw"unhandlable";r.push("__s(msg,'"+n.p+"', await jsonata(Buffer.from('"+s(n.to)+"', 'base64').toString('utf-8')).evaluate(msg) )")}}else{if("delete"!=n.t||"msg"!=n.pt)throw"unhandlable";r.push("delete msg."+n.p)}}return r.push("node.send(msg) })(msg,node);"),e.func=r.join("\n"),e}catch(e){return console.log(e),t}})}if(o.javascript){let r={},t=[];i.forEach(e=>{"javascript"!=(r[e.id]=e).format&&"function"!=e.type&&"css"!=e.format&&"json"!=e.format||t.push(e)});var e={parse:{bare_returns:!0,expression:!1},compress:{},mangle:{reserved:["$","export","require"]},output:null,sourceMap:null,nameCache:null,toplevel:!1,warnings:!1},u={compatibility:"*",level:2};$.ajax({url:"ClientCode/"+RED.nodes.id()+"/ugify",type:"POST",contentType:"application/json; charset=utf-8",data:JSON.stringify({nodes:t,jscfg:e,csscfg:u}),success:function(e){e.forEach(e=>{var t=r[e.id];e._error&&console.log("ERROR NODE",e),"function"==t.type?t.func=e.func:"javascript"!=t.format&&"css"!=t.format&&"json"!=t.format||(t.template=e.template)}),obfuscateHelpers.openImportDialog(i)},error:function(e,t,r){RED.notify("ClientCode Communcation Failure: "+n.id+": "+t,{type:"error",timeout:3e3})}})}else obfuscateHelpers.openImportDialog(i)}
6
6
 
7
7
  function setupTreelist(){var e=collectOrphans();if(0==e.length){RED.notify("No Orphans Found",{type:"warning",timeout:2e3});try{$("#node-input-orphan-target-container-div").treeList("empty")}catch(e){}}else{try{$("#node-input-orphan-target-container-div").treeList("empty")}catch(e){$("#node-input-orphan-target-container-div").css({width:"100%",height:"calc(100%)"}).treeList({multi:!1}).on("treelistitemmouseover",function(e,t){}).on("treelistitemmouseout",function(e,t){}).on("treelistselect",function(e,t){t.node&&(RED.workspaces.show(t.node.z,!1,!1,!0),RED.view.reveal(t.node.id,!0),RED.view.redraw())}).on("treelistconfirm",function(e,t){var n;t.node&&(n=t.node.id,setTimeout(()=>{var e=RED.nodes.node(n);e&&(RED.view.reveal(e.id),RED.view.select(e.id),RED.editor.edit(e)),n==RED.workspaces.active()&&RED.workspaces.edit()},50))}),$("#node-input-orphan-target-filter").show();var n=$("#node-input-orphan-target-filter").searchBox({style:"compact",delay:300,change:function(){var e,t=$(this).val().trim().toLowerCase();""===t?($("#node-input-orphan-target-container-div").treeList("filter",null),n.searchBox("count","")):(e=$("#node-input-orphan-target-container-div").treeList("filter",function(e){return-1<e.label.toLowerCase().indexOf(t)||-1<e.node.type.toLowerCase().indexOf(t)}),n.searchBox("count",e+" / "+$("#node-input-orphan-target-container-div").treeList("data").length))}})}$("#node-input-orphan-target-container-div").treeList("data",e.sort((e,t)=>e.node.z>t.node.z))}}function collectOrphans(){const t=new Set;var n=[],i=(RED.nodes.eachLink(e=>{t.add(e.source),t.add(e.target)}),RED.nodes.eachNode(e=>{t.has(e)||n.push(e)}),[]),r={};return n.forEach(function(e){var t=RED.nodes.getType(e.type);if(t){var n=t.label,n=("function"==typeof n?n.call(e):n)||"",o=e.type;if(0===o.indexOf("subflow:"))return}t&&n||(n=e.type),r[e.id]={node:e,label:n,sublabel:o,selected:!1,checkbox:!1},i.push(r[e.id])}),i}
8
8
 
9
- function nr_intro_generate_svg_3_1(r){return e=>{try{handleSvgObject($($("svg[width=8000]")[0]),e)}catch(t){var n="Error Generating SVG: "+JSON.stringify(t);r.notify(n,{type:"error"}),e('<?xml version="1.0" encoding="UTF-8" standalone="no"?><svg width="1000" height="1000" viewBox="0 0 1000 1000" pointer-events="all" style="cursor: crosshair; touch-action: none;" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><style>.small { font: bold 20px sans-serif; fill: red;}</style><text x="10" y="30" class="small">'+n+"</text></svg>")}}}function nr_intro_generate_svg_3_0(r){return e=>{try{handleSvgObject($($("svg")[0]),e)}catch(t){var n="Error Generating SVG: "+JSON.stringify(t);r.notify(n,{type:"error"}),e('<?xml version="1.0" encoding="UTF-8" standalone="no"?><svg width="1000" height="1000" viewBox="0 0 1000 1000" pointer-events="all" style="cursor: crosshair; touch-action: none;" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><style>.small { font: bold 20px sans-serif; fill: red;}</style><text x="10" y="30" class="small">'+n+"</text></svg>")}}}function handleSvgObject(o,e){var t=o.clone();t.find("foreignObject").remove(),t.find("svg.__screenshot").remove();function a(t,e){for(var n=0;n<t.length;n++){var s=t.item(n),i=e[n];["stroke-width","fill-opacity","stroke-opacity","opacity","stroke-dasharray"].forEach(function(t){s.setAttribute(t,$(i).attr(t)||$(i).css(t))}),["fill","stroke"].forEach(function(t){var e,n,r=(e=$(i).attr(t)||$(i).css(t))&&null!==e&&"none"!=e?(n=e.match(/^#(.)(.)(.)$/))?"#"+n[1]+n[1]+n[2]+n[2]+n[3]+n[3]:(n=e.match(/^#......$/))?e:null===(n=e.match(/^rgb\(([0-9]+),\s+([0-9]+),\s+([0-9]+)/))?(r=e.match(/^rgba\(([0-9]+),\s+([0-9]+),\s+([0-9]+),\s+([0-9]+)/))?{clr:"#"+("0"+parseInt(r[1],10).toString(16)).slice(-2)+("0"+parseInt(r[2],10).toString(16)).slice(-2)+("0"+parseInt(r[3],10).toString(16)).slice(-2),opa:r[4]}:(console.log("Screenshot node: returned unknown color: "+e),e):"#"+("0"+parseInt(n[1],10).toString(16)).slice(-2)+("0"+parseInt(n[2],10).toString(16)).slice(-2)+("0"+parseInt(n[3],10).toString(16)).slice(-2):"none";"object"==typeof r?(s.setAttribute(t+"-opacity",r.opa),s.setAttribute(t,r.clr)):s.setAttribute(t,r)}),$(i).hasClass("hide")&&("g"==s.tagName&&s.setAttribute("opacity","0"),s.setAttribute("visibility","hidden"))}}var n='<?xml version="1.0" standalone="no"?>\r\n<svg '+('width="'+o.attr("width")+'" height="'+o.attr("height")+'"')+' pointer-events="all" style="cursor: crosshair; touch-action: none;" xmlns="http://www.w3.org/2000/svg" class="__screenshot" xmlns:xlink="http://www.w3.org/1999/xlink">\r\n',t=t.html(),l=(new DOMParser).parseFromString(n+t+"\r\n</svg>","image/svg+xml"),r=e=>(["g","rect","line","path","circle","image","text"].forEach(t=>{$(e.getElementsByTagName(t)).each((t,e)=>{e.setAttribute("class",""),e.setAttribute("id","")})}),e),s=(["g","rect","line","path","circle","image"].forEach(function(t){a(l.getElementsByTagName(t),o.find(t))}),["text"].forEach(function(t){a(l.getElementsByTagName(t),o.find(t));for(var e=l.getElementsByTagName(t),n=o.find(t),r=0;r<e.length;r++){var s=e.item(r),i=n[r];["font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","text-anchor","dominant-baseline"].forEach(function(t){s.setAttribute(t,$(i).attr(t)||$(i).css(t))})}}),l.getElementsByTagName("image")),g={},i=(n,r,s)=>{var i=n.getAttribute("xlink:href"),o=i.substr(-4,4).toLowerCase(),a={".jpg":"jpeg",jpeg:"jpeg",".png":"png",".svg":"svg+xml"};if(g[i])return n.setAttribute("xlink:href","data:image/"+a[o]+";base64,"+g[i]),s(r-1);switch(o){case".jpg":case"jpeg":case".png":var l=new XMLHttpRequest;l.open("GET",i,!0),l.responseType="arraybuffer";l.onload=function(t){var e=l.response;e&&(e=(t=>{for(var e="",n=new Uint8Array(t),r=n.byteLength,s=0;s<r;s++)e+=String.fromCharCode(n[s]);return window.btoa(e)})(e),g[i]=e,n.setAttribute("xlink:href","data:image/"+a[o]+";base64,"+e)),s(r-1)},l.send(null);break;case".svg":$.get(i,function(t){var e=new XMLSerializer,e=btoa(e.serializeToString(t));g[i]=e,n.setAttribute("xlink:href","data:image/svg+xml;base64,"+e),s(r-1)})}},c=t=>{t<0?e((new XMLSerializer).serializeToString(r(l))):i(s.item(t),t,c)};0<s.length?i(s.item(s.length-1),s.length-1,c):e((new XMLSerializer).serializeToString(r(l)))}function generatorFunctionForVersion(t){var n,e=t.settings.version.split("."),r=e[0],e=e[1];if("3"==r){if("0"==e)return nr_intro_generate_svg_3_0(t);if("1"==e)return nr_intro_generate_svg_3_1(t)}return n=t,t=>{var e="Node-RED version ("+n.settings.version+") not supported";n.notify(e,{type:"error"}),t&&t('<?xml version="1.0" encoding="UTF-8" standalone="no"?><svg width="1000" height="1000" viewBox="0 0 1000 1000" pointer-events="all" style="cursor: crosshair; touch-action: none;" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><style>.small { font: bold 20px sans-serif; fill: red;}</style><text x="10" y="30" class="small">'+e+"</text></svg>")}}function addPanZoom(){var t=d3.select("#node-input-screenshot-svgcontainer svg"),e=(t.html("<g>"+t.html()+"</g>"),t.select("g")),n=d3.behavior.zoom().scaleExtent([.2,100]).on("zoom",function(t){e.attr({transform:"translate("+n.translate()+") scale("+n.scale()+")"})});t.call(n)}
9
+ function nr_intro_generate_svg_3_1(r,t){return e=>{try{handleSvgObject($($("svg[width=8000]")[0]),e,t)}catch(t){var n="Error Generating SVG: "+JSON.stringify(t);r.notify(n,{type:"error"}),e('<?xml version="1.0" encoding="UTF-8" standalone="no"?><svg width="1000" height="1000" viewBox="0 0 1000 1000" pointer-events="all" style="cursor: crosshair; touch-action: none;" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><style>.small { font: bold 20px sans-serif; fill: red;}</style><text x="10" y="30" class="small">'+n+"</text></svg>")}}}function nr_intro_generate_svg_3_0(r,t){return e=>{try{handleSvgObject($($("svg")[0]),e,t)}catch(t){var n="Error Generating SVG: "+JSON.stringify(t);r.notify(n,{type:"error"}),e('<?xml version="1.0" encoding="UTF-8" standalone="no"?><svg width="1000" height="1000" viewBox="0 0 1000 1000" pointer-events="all" style="cursor: crosshair; touch-action: none;" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><style>.small { font: bold 20px sans-serif; fill: red;}</style><text x="10" y="30" class="small">'+n+"</text></svg>")}}}function handleSvgObject(o,e,t){var n=o.clone();n.find("foreignObject").remove(),n.find("svg.__screenshot").remove();function a(t,e){for(var n=0;n<t.length;n++){var s=t.item(n),i=e[n];["stroke-width","fill-opacity","stroke-opacity","opacity","stroke-dasharray"].forEach(function(t){s.setAttribute(t,$(i).attr(t)||$(i).css(t))}),["fill","stroke"].forEach(function(t){var e,n,r=(e=$(i).attr(t)||$(i).css(t))&&null!==e&&"none"!=e?(n=e.match(/^#(.)(.)(.)$/))?"#"+n[1]+n[1]+n[2]+n[2]+n[3]+n[3]:(n=e.match(/^#......$/))?e:null===(n=e.match(/^rgb\(([0-9]+),\s+([0-9]+),\s+([0-9]+)/))?(r=e.match(/^rgba\(([0-9]+),\s+([0-9]+),\s+([0-9]+),\s+([0-9]+)/))?{clr:"#"+("0"+parseInt(r[1],10).toString(16)).slice(-2)+("0"+parseInt(r[2],10).toString(16)).slice(-2)+("0"+parseInt(r[3],10).toString(16)).slice(-2),opa:r[4]}:(console.log("Screenshot node: returned unknown color: "+e),e):"#"+("0"+parseInt(n[1],10).toString(16)).slice(-2)+("0"+parseInt(n[2],10).toString(16)).slice(-2)+("0"+parseInt(n[3],10).toString(16)).slice(-2):"none";"object"==typeof r?(s.setAttribute(t+"-opacity",r.opa),s.setAttribute(t,r.clr)):s.setAttribute(t,r)}),$(i).hasClass("hide")&&("g"==s.tagName&&s.setAttribute("opacity","0"),s.setAttribute("visibility","hidden"))}}var r='<?xml version="1.0" standalone="no"?>\r\n<svg '+('width="'+o.attr("width")+'" height="'+o.attr("height")+'"')+' pointer-events="all" style="cursor: crosshair; touch-action: none;" xmlns="http://www.w3.org/2000/svg" class="__screenshot" xmlns:xlink="http://www.w3.org/1999/xlink">\r\n',n=n.html(),l=(new DOMParser).parseFromString(r+n+"\r\n</svg>","image/svg+xml"),s=t=>t,i=(t.rmidsandclasses&&(s=e=>(["g","rect","line","path","circle","image","text"].forEach(t=>{$(e.getElementsByTagName(t)).each((t,e)=>{e.setAttribute("class",""),e.setAttribute("id","")})}),e)),["g","rect","line","path","circle","image"].forEach(function(t){a(l.getElementsByTagName(t),o.find(t))}),["text"].forEach(function(t){a(l.getElementsByTagName(t),o.find(t));for(var e=l.getElementsByTagName(t),n=o.find(t),r=0;r<e.length;r++){var s=e.item(r),i=n[r];["font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","text-anchor","dominant-baseline"].forEach(function(t){s.setAttribute(t,$(i).attr(t)||$(i).css(t))})}}),l.getElementsByTagName("image")),g={},c=(n,r,s)=>{var i=n.getAttribute("xlink:href"),o=i.substr(-4,4).toLowerCase(),a={".jpg":"jpeg",jpeg:"jpeg",".png":"png",".svg":"svg+xml"};if(g[i])return n.setAttribute("xlink:href","data:image/"+a[o]+";base64,"+g[i]),s(r-1);switch(o){case".jpg":case"jpeg":case".png":var l=new XMLHttpRequest;l.open("GET",i,!0),l.responseType="arraybuffer";l.onload=function(t){var e=l.response;e&&(e=(t=>{for(var e="",n=new Uint8Array(t),r=n.byteLength,s=0;s<r;s++)e+=String.fromCharCode(n[s]);return window.btoa(e)})(e),g[i]=e,n.setAttribute("xlink:href","data:image/"+a[o]+";base64,"+e)),s(r-1)},l.send(null);break;case".svg":$.get(i,function(t){var e=new XMLSerializer,e=btoa(e.serializeToString(t));g[i]=e,n.setAttribute("xlink:href","data:image/svg+xml;base64,"+e),s(r-1)})}},h=t=>{t<0?e((new XMLSerializer).serializeToString(s(l))):c(i.item(t),t,h)};0<i.length?c(i.item(i.length-1),i.length-1,h):e((new XMLSerializer).serializeToString(s(l)))}function generatorFunctionForVersion(t,e){var n,r=t.settings.version.split("."),s=r[0],r=r[1];if("3"==s){if("0"==r)return nr_intro_generate_svg_3_0(t,e);if("1"==r)return nr_intro_generate_svg_3_1(t,e)}return n=t,t=>{var e="Node-RED version ("+n.settings.version+") not supported";n.notify(e,{type:"error"}),t&&t('<?xml version="1.0" encoding="UTF-8" standalone="no"?><svg width="1000" height="1000" viewBox="0 0 1000 1000" pointer-events="all" style="cursor: crosshair; touch-action: none;" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><style>.small { font: bold 20px sans-serif; fill: red;}</style><text x="10" y="30" class="small">'+e+"</text></svg>")}}function addPanZoom(){var t=d3.select("#node-input-screenshot-svgcontainer svg"),e=(t.html("<g>"+t.html()+"</g>"),t.select("g")),n=d3.behavior.zoom().scaleExtent([.2,100]).on("zoom",function(t){e.attr({transform:"translate("+n.translate()+") scale("+n.scale()+")"})});t.call(n)}
10
10
 
11
11
  function setupTreelistInfoness(){var e=collectUndocumentedNodes();if(0==e.length){RED.notify("All nodes documented",{type:"success",timeout:2e3});try{$("#node-input-orphan-target-container-div").treeList("empty")}catch(e){}}else{try{$("#node-input-orphan-target-container-div").treeList("empty")}catch(e){$("#node-input-orphan-target-container-div").css({width:"100%",height:"calc(100%)"}).treeList({multi:!1}).on("treelistitemmouseover",function(e,t){}).on("treelistitemmouseout",function(e,t){}).on("treelistselect",function(e,t){t.node&&(RED.workspaces.show(t.node.z,!1,!1,!0),RED.view.reveal(t.node.id,!0),RED.view.redraw())}).on("treelistconfirm",function(e,t){var i;t.node&&(i=t.node.id,setTimeout(()=>{var e=RED.nodes.node(i);e&&(RED.view.reveal(e.id),RED.view.select(e.id),RED.editor.edit(e,"editor-tab-description")),i==RED.workspaces.active()&&RED.workspaces.edit()},50))}),$("#node-input-orphan-target-filter").show();var i=$("#node-input-orphan-target-filter").searchBox({style:"compact",delay:300,change:function(){var e,t=$(this).val().trim().toLowerCase();""===t?($("#node-input-orphan-target-container-div").treeList("filter",null),i.searchBox("count","")):(e=$("#node-input-orphan-target-container-div").treeList("filter",function(e){return-1<e.label.toLowerCase().indexOf(t)||-1<e.node.type.toLowerCase().indexOf(t)}),i.searchBox("count",e+" / "+$("#node-input-orphan-target-container-div").treeList("data").length))}})}$("#node-input-orphan-target-container-div").treeList("data",e.sort((e,t)=>e.node.z>t.node.z))}}function collectUndocumentedNodes(){let t=[];RED.nodes.eachNode(e=>{if($("#"+e.id).find(".red-ui-info-available-indicator").remove(),e.info&&e.info.trim()){var i=document.createElementNS("http://www.w3.org/2000/svg","g"),n=(i.setAttribute("class","red-ui-info-available-indicator"),document.createElementNS("http://www.w3.org/2000/svg","circle"));n.setAttribute("cx","5"),n.setAttribute("cy","5"),n.setAttribute("r","5"),n.setAttribute("fill","yellow"),n.setAttribute("id","infoclk-"+e.id),n.setAttribute("style","cursor: pointer;"),i.append(n),$(i).insertBefore($("#"+e.id).find(".red-ui-flow-node-changed"));let t=e.id;$("#infoclk-"+e.id).on("click",e=>{e&&e.preventDefault();e=RED.nodes.node(t);RED.editor.edit(e,"editor-tab-description"),RED.sidebar.show("info")})}else e.z==RED.workspaces.active()&&t.push(e)});var o=[],r={};return t.forEach(function(e){var t=RED.nodes.getType(e.type);if(t){var i,n=t.label,n=("function"==typeof n?n.call(e):n)||"";if(0===(i=e.type).indexOf("subflow:"))return}t&&n||(n=e.type),r[e.id]={node:e,label:n,sublabel:i,selected:!1,checkbox:!1},o.push(r[e.id])}),o}
12
12
 
@@ -77,6 +77,7 @@
77
77
 
78
78
  remove_linkout_nodes: $('#node-input-obfuscate-remove-linknodes').is(":checked"),
79
79
  copy_linkin_nodes: $('#node-input-obfuscate-copy-linkin-nodes').is(":checked"),
80
+ ignore_off_flow_links: $('#node-input-obfuscate-ignore-off-flow-links').is(':checked'),
80
81
  remove_linkcall_nodes: $("#node-input-obfuscate-remove-linkcall-nodes").is(":checked"),
81
82
 
82
83
  replace_switch: $('#node-input-obfuscate-replace-switch').is(":checked"),
@@ -96,6 +97,14 @@
96
97
  }
97
98
  })
98
99
 
100
+ $('#node-input-obfuscate-remove-linknodes').on('change', (e) => {
101
+ if ( $('#node-input-obfuscate-remove-linknodes').is(":checked") ) {
102
+ $('#node-input-obfuscate-coalesce-link-out-options').fadeIn(300)
103
+ } else {
104
+ $('#node-input-obfuscate-coalesce-link-out-options').fadeOut(300)
105
+ }
106
+ })
107
+
99
108
  $('#node-screenshot-capture-btn').on("click", function (e) {
100
109
  if ( e ) { e.preventDefault() }
101
110
 
@@ -107,7 +116,10 @@
107
116
  }
108
117
  );
109
118
 
110
- generatorFunctionForVersion(RED)( (svgdata) => {
119
+ let opts = {
120
+ rmidsandclasses: $('#node-input-screenshot-remove-classes-and-ids').is('checked')
121
+ }
122
+ generatorFunctionForVersion(RED, opts)( (svgdata) => {
111
123
  $('#node-input-screenshot-svgcontainer').html(svgdata);
112
124
  globalRefToSvgData = svgdata;
113
125
  setTimeout(() => {
@@ -242,29 +254,34 @@
242
254
  <div class="col-100">
243
255
 
244
256
  <div class="form-row" style="margin-left: 10px; margin-top: 30px;">
245
- Step 1: Capture a screen shot, Step 2: download it, copy it or post off.
257
+ <button type="button" id="node-screenshot-capture-btn"
258
+ class="red-ui-button red-ui-button-large"><i class="fa fa-camera"></i> Capture</button>
259
+
260
+ <label for="node-input-screenshot-remove-classes-and-ids" class="ml-30" style="width: 200px">
261
+ <span>Remove Classes and Ids?</span>
262
+ </label>
263
+ <input type="checkbox" checked="checked" id="node-input-screenshot-remove-classes-and-ids"
264
+ style="display:inline-block; width:15px; vertical-align:baseline;">
246
265
  </div>
247
266
 
248
267
  <div class="form-row" style="margin-left: 10px; margin-top: 30px;">
249
- <button type="button" id="node-screenshot-capture-btn"
250
- class="red-ui-button red-ui-button-large"><i class="fa fa-camera"></i> Capture</button>
251
-
252
- <button type="button" id="node-screenshot-download-svg" style="margin-left: 30px;"
253
- class="red-ui-button red-ui-button-large"><i class="fa fa-download"></i> Download</button>
254
- <button type="button" id="node-screenshot-copy-to-clipboard-svg"
255
- class="red-ui-button red-ui-button-large"><i class="fa fa-clipboard"></i> Copy to Clipboard</button>
268
+ Step 1: Capture a screen shot, Step 2: download it, copy it or post off.
256
269
  </div>
257
270
 
271
+
258
272
  <div class="form-row"
259
273
  style="min-height: 300px; height: 450px; overflow: hidden; margin-left: 10px; margin-right: 15px; border: 1px rgb(196, 196, 196) solid; border-radius: 5px;">
260
274
  <div id="node-input-screenshot-svgcontainer"></div>
261
275
  </div>
262
276
 
263
277
  <div class="form-row" style="margin-left: 10px; margin-top: 30px;">
264
- <label for="node-input-svgpost-endpoint">
265
- <i class="fa fa-send-o"></i>
266
- <span>Post Endpoint</span>
267
- </label>
278
+ <button type="button" id="node-screenshot-download-svg"
279
+ class="red-ui-button red-ui-button-large"><i class="fa fa-download"></i> Download</button>
280
+ <button type="button" id="node-screenshot-copy-to-clipboard-svg"
281
+ class="red-ui-button red-ui-button-large"><i class="fa fa-clipboard"></i> Copy to Clipboard</button>
282
+ </div>
283
+
284
+ <div class="form-row" style="margin-left: 10px; margin-top: 30px;">
268
285
  <input type="text" id="node-input-svgpost-endpoint" placeholder="/screenshot" style="width: 40% !important;">
269
286
  <button type="button" id="node-screenshot-post-svg-to-endpoint"
270
287
  class="red-ui-button red-ui-button-large"><i class="fa fa-send-o"></i> Post to Endpoint</button>
@@ -304,7 +321,7 @@
304
321
  <i class="fa fa-tag"></i>
305
322
  <span>Obfuscate Name?</span>
306
323
  </label>
307
- <input type="checkbox" checked=checked id="node-input-obfuscate-name"
324
+ <input type="checkbox" id="node-input-obfuscate-name"
308
325
  style="display:inline-block; width:15px; vertical-align:baseline;">
309
326
  </div>
310
327
 
@@ -313,7 +330,7 @@
313
330
  <i class="fa fa-map-pin"></i>
314
331
  <span>Obfuscate Position?</span>
315
332
  </label>
316
- <input type="checkbox" checked=checked id="node-input-obfuscate-position"
333
+ <input type="checkbox" id="node-input-obfuscate-position"
317
334
  style="display:inline-block; width:15px; vertical-align:baseline;">
318
335
  </div>
319
336
 
@@ -322,7 +339,7 @@
322
339
  <i class="fa fa-angle-down"></i>
323
340
  <span>Shrink Nodes?</span>
324
341
  </label>
325
- <input type="checkbox" checked=checked id="node-input-obfuscate-shrink-size"
342
+ <input type="checkbox" id="node-input-obfuscate-shrink-size"
326
343
  style="display:inline-block; width:15px; vertical-align:baseline;">
327
344
  </div>
328
345
 
@@ -331,7 +348,7 @@
331
348
  <i class="fa fa-code"></i>
332
349
  <span>Obfuscate Javascript?</span>
333
350
  </label>
334
- <input type="checkbox" checked=checked id="node-input-obfuscate-javascript"
351
+ <input type="checkbox" id="node-input-obfuscate-javascript"
335
352
  style="display:inline-block; width:15px; vertical-align:baseline;">
336
353
  </div>
337
354
 
@@ -340,7 +357,7 @@
340
357
  <i class="fa fa-adjust"></i>
341
358
  <span>Remove Icon?</span>
342
359
  </label>
343
- <input type="checkbox" checked=checked id="node-input-obfuscate-remove-icons"
360
+ <input type="checkbox" id="node-input-obfuscate-remove-icons"
344
361
  style="display:inline-block; width:15px; vertical-align:baseline;">
345
362
  </div>
346
363
 
@@ -349,7 +366,7 @@
349
366
  <i class="fa fa-info"></i>
350
367
  <span>Remove Info?</span>
351
368
  </label>
352
- <input type="checkbox" checked=checked id="node-input-obfuscate-info"
369
+ <input type="checkbox" id="node-input-obfuscate-info"
353
370
  style="display:inline-block; width:15px; vertical-align:baseline;">
354
371
  </div>
355
372
 
@@ -358,7 +375,7 @@
358
375
  <i class="fa fa-object-group"></i>
359
376
  <span>Remove Groups?</span>
360
377
  </label>
361
- <input type="checkbox" checked=checked id="node-input-obfuscate-remove-groups"
378
+ <input type="checkbox" id="node-input-obfuscate-remove-groups"
362
379
  style="display:inline-block; width:15px; vertical-align:baseline;">
363
380
  </div>
364
381
 
@@ -367,7 +384,7 @@
367
384
  <i class="fa fa-bug"></i>
368
385
  <span>Remove comment & debugs?</span>
369
386
  </label>
370
- <input type="checkbox" checked=checked id="node-input-obfuscate-remove-debugs"
387
+ <input type="checkbox" id="node-input-obfuscate-remove-debugs"
371
388
  style="display:inline-block; width:15px; vertical-align:baseline;">
372
389
  </div>
373
390
 
@@ -376,7 +393,7 @@
376
393
  <i class="fa fa-sitemap"></i>
377
394
  <span>Coalesce Junctions?</span>
378
395
  </label>
379
- <input type="checkbox" checked=checked id="node-input-obfuscate-remove-junctions"
396
+ <input type="checkbox" id="node-input-obfuscate-remove-junctions"
380
397
  style="display:inline-block; width:15px; vertical-align:baseline;">
381
398
  </div>
382
399
 
@@ -385,23 +402,31 @@
385
402
  <i class="fa fa-unlink"></i>
386
403
  <span>Coalesce Link Call Nodes?</span>
387
404
  </label>
388
- <input type="checkbox" checked=checked id="node-input-obfuscate-remove-linkcall-nodes" style="display:inline-block; width:15px; vertical-align:baseline;">
405
+ <input type="checkbox" id="node-input-obfuscate-remove-linkcall-nodes" style="display:inline-block; width:15px; vertical-align:baseline;">
389
406
  </div>
390
407
 
391
408
  <div class="form-row">
392
409
  <label for="node-input-obfuscate-remove-linknodes" class="w-30">
393
410
  <i class="fa fa-unlink"></i>
394
411
  <span>Coalesce Link Out Nodes?</span>
395
- </label>
396
- <input type="checkbox" checked=checked id="node-input-obfuscate-remove-linknodes"
412
+ </label>
413
+ <input type="checkbox" id="node-input-obfuscate-remove-linknodes"
397
414
  style="display:inline-block; width:15px; vertical-align:baseline;">
398
415
  </div>
399
416
 
400
- <div class="form-row">
401
- <label for="node-input-obfuscate-copy-linkin-nodes" class="ml-30">
402
- <span>Copy Link-In Nodes?</span>
417
+ <div id="node-input-obfuscate-coalesce-link-out-options" style="display: none;">
418
+ <div class="form-row">
419
+ <label for="node-input-obfuscate-copy-linkin-nodes" class="ml-30" style="width: 150px;">
420
+ <span>Copy Link-In Nodes?</span>
421
+ </label>
422
+ <input type="checkbox" id="node-input-obfuscate-copy-linkin-nodes" style="display:inline-block; width:15px; vertical-align:baseline;">
423
+ </div>
424
+ <div class="form-row">
425
+ <label for="node-input-obfuscate-ignore-off-flow-links" class="ml-30" style="width: 150px;">
426
+ <span>Ignore off-flow links?</span>
403
427
  </label>
404
- <input type="checkbox" checked=checked id="node-input-obfuscate-copy-linkin-nodes" style="display:inline-block; width:15px; vertical-align:baseline;">
428
+ <input type="checkbox" id="node-input-obfuscate-ignore-off-flow-links" style="display:inline-block; width:15px; vertical-align:baseline;">
429
+ </div>
405
430
  </div>
406
431
 
407
432
  <div class="form-row">
@@ -415,7 +440,7 @@
415
440
  <label for="node-input-obfuscate-replace-switch" class="ml-30">
416
441
  <span>Switch</span>
417
442
  </label>
418
- <input type="checkbox" checked=checked id="node-input-obfuscate-replace-switch"
443
+ <input type="checkbox" id="node-input-obfuscate-replace-switch"
419
444
  style="display:inline-block; width:15px; vertical-align:baseline;">
420
445
  </div>
421
446
 
@@ -423,23 +448,28 @@
423
448
  <label for="node-input-obfuscate-replace-change" class="ml-30">
424
449
  <span>Change</span>
425
450
  </label>
426
- <input type="checkbox" checked=checked id="node-input-obfuscate-replace-change"
451
+ <input type="checkbox" id="node-input-obfuscate-replace-change"
427
452
  style="display:inline-block; width:15px; vertical-align:baseline;">
428
453
  </div>
429
454
 
430
455
  <div class="form-row">
431
456
  <label for="node-input-obfuscate-add-license-text" class="w-30">
432
- <i class="fa fa-gavel"></i>
433
- <span>Replace info with license?</span>
434
- </label>
457
+ <i class="fa fa-gavel"></i>
458
+ <span>Replace info with license?</span>
459
+ </label>
435
460
  <input type="checkbox" id="node-input-obfuscate-add-license-text" style="display:inline-block; width:15px; vertical-align:baseline;">
436
461
  </div>
437
-
438
- <div id="node-input-obfuscate-add-license-text-row" class="form-row" style="margin-left: 10px; display: none;">
439
- <label for="node-input-obfuscate-append-license-text">
440
- <span>Append to info?</span>
441
- </label>
442
- <input type="checkbox" id="node-input-obfuscate-append-license-text" style="display:inline-block; width:15px; vertical-align:baseline;"> <textarea id="node-input-obfuscate-license-text" placeholder="License Text"></textarea>
462
+
463
+ <div id="node-input-obfuscate-add-license-text-row" style="display: none;">
464
+ <div class="form-row ml-30">
465
+ <label for="node-input-obfuscate-append-license-text" style="width: 150px">
466
+ <span>Append to info?</span>
467
+ </label>
468
+ <input type="checkbox" id="node-input-obfuscate-append-license-text" style="display:inline-block; width:15px; vertical-align:baseline;">
469
+ </div>
470
+ <div class="form-row ml-30">
471
+ <textarea id="node-input-obfuscate-license-text" placeholder="License Text"></textarea>
472
+ </div>
443
473
  </div>
444
474
 
445
475
  <div class="form-row">