1"use strict";(self.webpackChunkStackby_webapp=self.webpackChunkStackby_webapp||[]).push([[7390],{97390:(t,e,a)=>{a.r(e),a.d(e,{default:()=>W});var s=a(379),r=a(42903),i=a(36713),n=a(56429),o=a(89253),c=a(92975),h=a(71083),p=a(59879),d=a(98505),l=a(71468),m=a(33365),u=a(9872),f=a(15180),y=a(92672),k=a(17041),b=a(70510);function g(t){return g="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},g(t)}function v(t,e){for(var a=0;a<e.length;a++){var s=e[a];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(t,x(s.key),s)}}function x(t){var e=function(t,e){if("object"!=g(t)||!t)return t;var a=t[Symbol.toPrimitive];if(void 0!==a){var s=a.call(t,e||"default");if("object"!=g(s))return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==g(e)?e:e+""}function C(t,e,a){return e=w(e),function(t,e){if(e&&("object"==g(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,j()?Reflect.construct(e,a||[],w(t).constructor):e.apply(t,a))}function j(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(j=function(){return!!t})()}function w(t){return w=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},w(t)}function S(t,e){return S=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},S(t,e)}var I={position:"bottom-left",autoClose:!0,closeButton:!1},N=function(t){function e(t){var a;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(a=C(this,e,[t])).state={stackName:t.table.stackName,layout:null,iframeHeight:533,lastValidHeight:533,stackId:t.match.params.stackId},a.handleCopy=a.handleCopy.bind(a),a.handleChange=a.handleChange.bind(a),a.handleChangeCopyStack=a.handleChangeCopyStack.bind(a),a.handleChangeLayout=a.handleChangeLayout.bind(a),a.handleHideShowAppChange=a.handleHideShowAppChange.bind(a),a.handleHeightChange=a.handleHeightChange.bind(a),a.handleEmbedClick=a.handleEmbedClick.bind(a),a}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&S(t,e)}(e,t),a=e,s=[{key:"componentDidMount",value:function(){var t=this;this.props.match.params.stackId.startsWith("frshr")||this.props.match.params.stackId.startsWith("ufshr")?(h.A.get("/api/v1/getformdata/"+this.props.match.params.stackId).then(function(e){var a=e.data,s=JSON.parse((0,u.Y)(a.data)).stackName;t.setState({stackName:s})}),(0,k.Io)(this.props.auth,"User perform embed ".concat(this.props.match.params.stackId.startsWith("frshr")?"form":"update form"))):(h.A.post("/api/v1/stackaction/"+this.props.match.params.stackId+"/stackname").then(function(e){var a=e.data,s=JSON.parse((0,u.Y)(a.data)).stackName;t.setState({stackName:s})}),(0,k.Io)(this.props.auth,"User perform embed stack"))}},{key:"handleCopy",value:function(t){this.embedCodeRef&&(this.embedCodeRef.select(),document.execCommand("copy"),m.oR.info("Copied",I))}},{key:"handleGleapClose",value:function(t){window.Gleap.close(),Gleap.hide(),window.Gleap.destroy()}},{key:"handleChange",value:function(t,e){e.value,this.setState(function(t){return{isHideHeader:"true"==t.isHideHeader?"false":"true"}})}},{key:"handleHideShowAppChange",value:function(t,e){e.value,this.setState(function(t){return{isHideApps:"true"==t.isHideApps?"false":"true"}})}},{key:"handleChangeCopyStack",value:function(t,e){e.value,this.setState(function(t){return{isCopyStack:"true"==t.isCopyStack?"false":"true"}})}},{key:"handleChangeLayout",value:function(){this.setState(function(t){return{layout:t.layout?null:"card"}})}},{key:"handleHeightChange",value:function(t){var e=parseInt(t.target.value,10);isNaN(e)?this.setState({iframeHeight:""}):e>=533&&e<1e5?this.setState({iframeHeight:e,lastValidHeight:e}):this.setState({iframeHeight:e})}},{key:"handleEmbedClick",value:function(t,e,a){t.stopPropagation();var s=this.state.stackId;this.props.adminActionCreate({action:e,payload:JSON.stringify({stackId:s}),modelType:a,stackId:s})}},{key:"render",value:function(){var t,e=this,a=this.state,s=a.isHideHeader,h=void 0===s?"false":s,l=(a.isCopyStack,a.isHideApps),u=void 0===l?"false":l,f=a.layout,y=a.stackName,k=a.iframeHeight,g=a.lastV
1alidHeight;return t=this.props.match.params.stackId.startsWith("frshr")?"https://stackby.com/form/"+this.props.match.params.stackId:this.props.match.params.stackId.startsWith("ufshr")?"https://stackby.com/update/"+this.props.match.params.stackId:"https://stackby.com/embed/"+this.props.match.params.stackId,"true"==h?t=t+"?isHideHeader="+h:t+="?","true"==u&&(t=t+"&isHideApps="+u),f&&(t=t+"&layout="+f),(0,b.jsxs)("div",{id:"EmbedView",children:[(0,b.jsx)(c.A,{}),(0,b.jsxs)("div",{className:"content-wrapper",style:{position:"relative",top:"94px"},children:[(0,b.jsxs)("div",{className:"embed-detail",children:[(0,b.jsxs)("div",{className:"col-4",children:[(0,b.jsxs)("p",{className:"embed-text",children:["Embed"," ",this.props.match.params.stackId.startsWith("frshr")?"Form":this.props.match.params.stackId.startsWith("ufshr")?"Update Form":"Stack"]}),(0,b.jsx)("h2",{className:"embed-stackname",children:this.props.match.params.stackId.startsWith("frshr")?y||"Untitled form":this.props.match.params.stackId.startsWith("ufshr")?y||"Untitled update form":y||"Untitled stack"}),(this.props.match.params.stackId.startsWith("frshr")||this.props.match.params.stackId.startsWith("ufshr"))&&(0,b.jsxs)("div",{className:"height-content",children:[(0,b.jsx)("p",{className:"height-text",children:"Embed height: "}),(0,b.jsx)("div",{className:"height-info",children:(0,b.jsx)("div",{style:{width:"100%"},children:(0,b.jsxs)("div",{className:"height-div",children:[(0,b.jsx)("input",{placeholder:"",type:"text",value:k,min:533,max:1e5,onChange:this.handleHeightChange,className:"input-height ".concat(k<533?"less-heightCss":"more-heightCss")}),k<533&&(0,b.jsx)(d.SmD,{className:"warningIcon"})]})})})]}),(this.props.match.params.stackId.startsWith("frshr")||this.props.match.params.stackId.startsWith("ufshr"))&&(k<533||k>1e5)&&(0,b.jsx)("div",{className:"warning-text",children:k<533?"Embed height must be at least 533px.":k>1e5?"Embed height must not exceed 100,000px.":""})]}),(0,b.jsxs)("div",{className:"col-8",children:[(0,b.jsxs)("h5",{children:[(0,b.jsx)(o.A,{icon:"ios-code-working",fontSize:"20px",color:"#212121",style:{marginBottom:"-5px"}})," ","Embed Code"]}),(0,b.jsx)("textarea",{readOnly:"readonly",ref:function(t){return e.embedCodeRef=t},value:'<iframe class="stackby-embed" src="'.concat(t,'" frameborder="0" width="100%" height="').concat(this.props.match.params.stackId.startsWith("frshr")||this.props.match.params.stackId.startsWith("ufshr")?g:"533",'" ></iframe>'),onFocus:function(t){return t.target.select()}}),(0,b.jsx)(n.A,{icon:"copy",content:"Copy to clipboard",size:"mini",onClick:function(t){e.handleCopy()}})," ","Â Â ",this.props.match.params.stackId.startsWith("frshr")||this.props.match.params.stackId.startsWith("ufshr")?"":(0,b.jsx)(r.A,{value:!0,checked:"true"==h,onChange:function(t,a){e.handleChange(t,a)},label:"Show / Hide Header"}),["local","development"].includes("production")&&(this.props.match.params.stackId.startsWith("frshr")||this.props.match.params.stackId.startsWith("ufshr"))?"":(0,b.jsx)(r.A,{value:!0,checked:"true"==u,onChange:function(t,a){e.handleHideShowAppChange(t,a)},label:"Show / Hide Apps",style:{marginLeft:"14px"}}),this.props.match.params.stackId.startsWith("frshr")||this.props.match.params.stackId.startsWith("ufshr")?"":(0,b.jsx)(r.A,{value:!0,checked:!!f,onChange:function(t,a){e.handleChangeLayout(t,a)},label:"Use card layout on desktop",style:{marginLeft:"14px"}})]})]}),(0,b.jsx)(i.A,{horizontal:!0,style:{margin:"2rem 0px"},children:"Preview"}),window.Gleap&&this.handleGleapClose(),(0,b.jsxs)("div",{className:"dashboard-iframe-maindiv",children:[(0,b.jsxs)("div",{className:"desktop-iframe",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)(p.MdComputer,{fontSize:"18px"}),(0,b.jsx)("p",{children:"Desktop embed preview"})]}),(0,b.jsx)("iframe",{id:"stackby-embed",src:t,frameBorder:"0",style:{width:"800px",height:this.props.match.params.stackId.startsWith("frshr")||this.props.match.params.stackId.startsWith("ufshr")?g:"533px"}})]}),(0,b.jsxs)("div",{className:"desktop-iframe",children:[(0,b.jsxs)("div",{style:{marginLeft:"12px "},children:[(0,b.jsx)(p.MdSmartphone,{fontSize:"18px"}),(0,b.jsx)("p",{children:"Mobile embed preview"})]}),(0,b.jsx)("iframe",{id:"stackby-embed",src:t,frameBorder:"0",style:{marginLeft:"12px",height:this.props.match.params.stackId.startsWith("frshr")||this.props.match.params.stackId.startsWith("ufshr")?g:"533px",width:"350px"}})]})]})]}),(0,b.jsx)(m.N9,{autoClose:4e3,className:"custom-notification",hideProgressBar:!0,icon:!1})]})}}],s&&v(a.prototype,s),l&&v(a,l),Object.defineProperty(a,"prototype",{writable:!1}),a;var a,s,l}(s.Component),H={adminActionCreate:f.WX};const W=(0,l.Ng)(function(t){return{socket:t.socket,table:t.table}},H)((0,y.A)(N))}}]);
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.