text: (self.webpackChunkreact_slingshot=self.webpackChunkreact_slingshot||[]).push([[728],{90955:(e,t,n)=>{"use strict";n.d(t,{jq:()=>f,wl:()=>h,GP:()=>m,bQ:()=>v,E2:()=>y,X3:()=>g,Ou:()=>b,oG:()=>Z,k4:()=>E,IY:()=>A,O4:()=>w,Pk:()=>O,ML:()=>C,xT:()=>P,XD:()=>x,Yc:()=>k,rn:()=>R,Sr:()=>S,NV:()=>j,No:()=>M,pR:()=>B,fq:()=>D,nq:()=>N,om:()=>T,w3:()=>I,gg:()=>L,eh:()=>X,Hp:()=>U,DJ:()=>z,s9:()=>_,z0:()=>F,s5:()=>W,yb:()=>Y,$0:()=>G,Ee:()=>V,au:()=>q,$u:()=>H,pt:()=>$,Nu:()=>K,iX:()=>Q,XU:()=>J,Je:()=>ee,$Z:()=>te,RU:()=>ne,bB:()=>re,uk:()=>oe,Od:()=>ae,wd:()=>ie,XW:()=>ce,r5:()=>le,O2:()=>se,pK:()=>ue});var r,o,a,i,c,l,s,u,p,d=n(96156),f="http://localhost:3001",h={CURRENT_USER:"CURRENT_USER_SELECTOR",LIST_ITEM:"LIST_ITEM_SELECTOR",ROUTE_PARAM:"ROUTE_PARAM_SELECTOR",SELECT_VALUE:"SELECT_VALUE_SELECTOR",CREATED_OBJECT:"CREATED_OBJECT"},m="label",v="section",y="ellipse",g="shape",b="rectangle",Z="group",E="image",A="list",w="input",O="image-upload",C="file-upload",P="date-picker",x="select",k="form",R="row",S="web-view",j="component",M="componentInstance",B="libraryComponent",D="line",N=[{label:"Text",value:m},{label:"Ellipse",value:y},{label:"Shape",value:g},{label:"Rectangle",value:b},{label:"Group",value:Z},{label:"List",value:A},{label:"Image",value:E},{label:"Text Field",value:w},{label:"Image Picker",value:O},{label:"File Picker",value:C},{label:"Date Picker",value:P},{label:"Select Menu",value:x},{label:"Web View",value:S},{label:"Line",value:D}],T="action",I="center",L="right",X="input",U=(r={},(0,d.Z)(r,"tap","Tap"),(0,d.Z)(r,"longPress","Long Press"),{CREATE_OBJECT:"createObject",UPDATE_OBJECT:"updateObject",DELETE_OBJECT:"deleteObject",CREATE_ASSOCIATION:"createAssociation",DELETE_ASSOCIATION:"deleteAssociation",NAVIGATE:"navigate",AUTHENTICATE:"authenticate",LOGOUT:"logout",SIGNUP:"signup",FORGOT_PASSWORD:"forgotPassword",SHARE:"share",SET_INPUT_VALUE:"setInputValue",CALL_API:"callAPI",AUTHENTICATE_API:"authAPI",SIGNUP_API:"signupAPI",PUSH_NOTIFICATION:"pushNotification",NOTIFICATION_PERMISSION:"notificationPermission",EXTERNAL_LINK:"externalLink",CUSTOM:"custom",AUTHENTICATE_EXTERNAL:"authenticateExternal",SIGNUP_EXTERNAL:"signupExternal"}),z=(o={},(0,d.Z)(o,U.CREATE_OBJECT,"Create"),(0,d.Z)(o,U.UPDATE_OBJECT,"Update"),(0,d.Z)(o,U.DELETE_OBJECT,"Delete"),(0,d.Z)(o,U.CREATE_ASSOCIATION,"Add To Collection"),(0,d.Z)(o,U.DELETE_ASSOCIATION,"Remove From Collection"),(0,d.Z)(o,U.NAVIGATE,"Link"),(0,d.Z)(o,U.AUTHENTICATE,"Log In"),(0,d.Z)(o,U.LOGOUT,"Log Out"),(0,d.Z)(o,U.SIGNUP,"Sign Up"),(0,d.Z)(o,U.FORGOT_PASSWORD,"Forgot Password"),(0,d.Z)(o,U.SHARE,"Share"),(0,d.Z)(o,U.SET_INPUT_VALUE,"Change Input Value"),(0,d.Z)(o,U.CALL_API,"Call API"),(0,d.Z)(o,U.AUTHENTICATE_API,"Log In"),(0,d.Z)(o,U.SIGNUP_API,"Sign Up"),(0,d.Z)(o,U.PUSH_NOTIFICATION,"Trigger Notification"),(0,d.Z)(o,U.NOTIFICATION_PERMISSION,"Request Notification Permission"),(0,d.Z)(o,U.EXTERNAL_LINK,"External Link"),(0,d.Z)(o,U.CUSTOM,"Custom Action"),{TEXT:"text",DATE:"date",DATE_ONLY:"dateOnly",LOCATION:"location",NUMBER:"number",BOOLEAN:"boolean",LIST:"list",IMAGE:"image",COLOR:"color",ICON:"icon",FILE:"file",PASSWORD:"password",OBJECT:"object",FOREIGN_KEY:"foreignKey",ACTION_REF:"actionRef"}),_={MENU:"menu",SLIDER:"slider"},F={INPUT:"input",FIELD:"field",COUNT:"count",MIN:"min",MAX:"max",MIN_MAX:"minMax",SUM:"sum",AVERAGE:"avg",DATA:"data",PARAM:"param",LIST_ITEM:"listItem",RELATION:"relation",ROUTE_PARAM:"routeParam",PARENT_BINDING:"parentBinding",BELONGS_TO:"belongsToRelation",HAS_MANY:"hasManyRelation",MANY_TO_MANY:"manyToManyRelation",DATETIME:"dateTime",API_ENDPOINT:"apiEndpoint",API_FIELD:"apiField",AUTOSAVE:"autosave",ACTION_ARGUMENT:"actionArgument",CUSTOM_ACTION:"customAction",EXTERNAL_USERS_TOKEN:"externalUsersToken",EXTERNAL_USERS_ID:"externalUsersId"},W=(a={},(0,d.Z)(a,F.COUNT,"Count"),(0,d.Z)(a,F.MIN,"Minimum"),(0,d.Z)(a,F.MAX,"Maximum"),(0,d.Z)(a,F.MIN_MAX,"Min / Max"),(0,d.Z)(a,F.SUM,"Sum"),(0,d.Z)(a,F.AVERAGE,"Average"),(0,d.Z)(a,F.ACTION_ARGUMENT,"Custom Component Action Argument"),a),Y={SET_PROPERTY:"property",SET_TEXT:"text",SET_IMAGE:"image",VISIBILITY:"visibility",LIST:"list",SET_DATE:"date",SET_URI:"uri",LIBRARY_PROP:"libraryProp"},G=(i={},(0,d.Z)(i,Y.SET_PROPERTY,"Set Property"),(0,d.Z)(i,Y.SET_TEXT,"Replace Text"),(0,d.Z)(i,Y.SET_IMAGE,"Replace Image"),(0,d.Z)(i,Y.VISIBILITY,"Show / Hide"),(0,d.Z)(i,Y.LIST,"List Items"),(0,d.Z)(i,Y.SET_DATE,"Set Date"),(0,d.Z)(i,Y.SET_URI,"Set URL"),c={},(0,d.Z)(c,z.DATE,{RELATIVE:"relativeDate",RELATIVE_SHORT:"relativeShort",ABSOLUTE_DATE:"absoluteDate",ABSOLUTE_DATETIME:"absoluteDatetime",WEEK_DAY_LONG:"weekDayLong",WEEK_DAY_SHORT:"weekDayShort",TIME:"time",ISO:"iso"}),(0,d.Z)(c,z.DATE_ONLY,{RELATIVE:"dateOnlyRelative",ABSOLUTE_DATE:"dateOnlyAbsolute",WEEK_DAY_LONG:"dateOnlyWeekday",WEEK_DAY_SHORT:"dateOnlyWeekdayShort",ISO:"iso"}),(0,d.Z)(c,z.NUMBER,{NONE:"none",COMMAS:"commas",ABBREVIATED:"abbreviated",CURRENCY:"currency",ABBREVIATED_CURRENCY:"abbreviatedCurrency"}),c),V=(l={},(0,d.Z)(l,z.DATE,[{label:"Relative",subtitle:"10 days ago",value:G.date.RELATIVE},{label:"Relative (short)",subtitle:"10d",value:G.date.RELATIVE_SHORT},{label:"Date",subtitle:"7/31/2020",value:G.date.ABSOLUTE_DATE},{label:"Date / Time",subtitle:"7/31/2020 at 2:15 PM",value:G.date.ABSOLUTE_DATETIME},null,{label:"Day of Week",subtitle:"Monday",value:G.date.WEEK_DAY_LONG},{label:"Day of Week (short)",subtitle:"Mon",value:G.date.WEEK_DAY_SHORT},null,{label:"Time",subtitle:"2:15 PM",value:G.date.TIME},null,{label:"No Formatting",subtitle:"2020-07-31T14:15:00.000Z",value:G.date.ISO}]),(0,d.Z)(l,z.DATE_ONLY,[{label:"Relative",subtitle:"10 days ago",value:G.dateOnly.RELATIVE},{label:"Date",subtitle:"7/31/2017",value:G.dateOnly.ABSOLUTE_DATE},null,{label:"Day of Week",subtitle:"Monday",value:G.dateOnly.WEEK_DAY_LONG},{label:"Day of Week (short)",subtitle:"Mon",value:G.dateOnly.WEEK_DAY_SHORT},null,{label:"No Formatting",subtitle:"2020-07-31",value:G.date.ISO}]),(0,d.Z)(l,z.NUMBER,[{label:"Default",subtitle:"1,500,000",value:G.number.COMMAS},null,{label:"None",subtitle:"1500000",value:G.number.NONE},{label:"Abbreviated",subtitle:"1.5M",value:G.number.ABBREVIATED},null,{label:"Currency",subtitle:"$1,500,000.00",value:G.number.CURRENCY},{label:"Currency Abreviated",subtitle:"$1.5M",value:G.number.ABBREVIATED_CURRENCY}]),l),q={FIXED_TOP:"fixedTop",FIXED_BOTTOM:"fixedBottom",FIXED:"fixed",DEFAULT:null},H=(q.FIXED_TOP,q.FIXED_BOTTOM,q.DEFAULT,{NONE:"none",SOLID:"solid",DOTTED:"dotted",DASHED:"dashed"}),$=[{label:"None",value:H.NONE},{label:"▬▬▬▬▬▬▬▬▬",value:H.SOLID},{label:"▪▪▪▪▪▪▪▪▪",value:H.DOTTED},{label:"▬ ▬ ▬ ▬ ▬",value:H.DASHED}],K=($.slice(1),{NONE:"none",COLOR:"color",IMAGE:"image"}),Q=(K.NONE,K.COLOR,K.IMAGE,{INSIDE:"inside",CENTER:"center",OUTSIDE:"outside"}),J=(Q.INSIDE,Q.CENTER,Q.OUTSIDE,{USERNAME:"username",EMAIL:"email",PASSWORD:"password",FULL_NAME:"full_name",TEMPORARY_PASSWORD:"temporary_password",TEMPORARY_PASSWORD_EXPIRES_AT:"temporary_password_expires_at"}),ee={DEFAULT:"default",LOWERCASE:"lowercase",PASSWORD:"password",EMAIL:"email",NUMBER:"number"},te=(ee.DEFAULT,ee.LOWERCASE,ee.PASSWORD,ee.EMAIL,ee.NUMBER,{EQUAL:"==",NOT_EQUAL:"!=",GREATER_THAN:">",LESS_THAN:"<",GREATER_THAN_OR_EQUAL:">=",LESS_THAN_OR_EQUAL:"<=",BETWEEN:"between",EMPTY:"empty",NOT_EMPTY:"notEmpty",CONTAINS:"contains",LIST_CONTAINS:"listContains",LIST_NOT_CONTAINS:"listNotContains",TRUE:"true",FALSE:"false"}),ne=(s={},(0,d.Z)(s,te.EQUAL,"Is equal to"),(0,d.Z)(s,te.NOT_EQUAL,"Is not equal to"),(0,d.Z)(s,te.GREATER_THAN,"Is greater than"),(0,d.Z)(s,te.LESS_THAN,"Is less than"),(0,d.Z)(s,te.GREATER_THAN_OR_EQUAL,"Is greater than or equal"),(0,d.Z)(s,te.LESS_THAN_OR_EQUAL,"Is less than or equal"),(0,d.Z)(s,te.EMPTY,"Is empty"),(0,d.Z)(s,te.NOT_EMPTY,"Is not empty"),(0,d.Z)(s,te.BETWEEN,"Is between"),(0,d.Z)(s,te.CONTAINS,"Contains"),(0,d.Z)(s,te.LIST_CONTAINS,"Contains"),(0,d.Z)(s,te.LIST_NOT_CONTAINS,"Does not contain"),(0,d.Z)(s,te.TRUE,"Is true"),(0,d.Z)(s,te.FALSE,"Is false"),{DARK_CONTENT:"dark",LIGHT_CONTENT:"light",HIDDEN:"hidden"}),re=(ne.DARK_CONTENT,ne.LIGHT_CONTENT,ne.HIDDEN,{CONTAIN:"contain",COVER:"cover"}),oe=[{label:"Contain",value:re.CONTAIN},{label:"Cover",value:re.COVER}],ae={GET:"get",POST:"post",PUT:"put",DELETE:"delete"},ie={LIST:"list",DETAIL:"detail",CREATE:"create",UPDATE:"update",DELETE:"delete",CUSTOM:"custom"},ce=(u={},(0,d.Z)(u,ie.LIST,"Get All"),(0,d.Z)(u,ie.DETAIL,"Get One"),(0,d.Z)(u,ie.CREATE,"Create"),(0,d.Z)(u,ie.UPDATE,"Update"),(0,d.Z)(u,ie.DELETE,"Delete"),(0,d.Z)(u,ie.CUSTOM,"Custom"),u),le=(p={},(0,d.Z)(p,ie.LIST,ae.GET),(0,d.Z)(p,ie.DETAIL,ae.GET),(0,d.Z)(p,ie.CREATE,ae.POST),(0,d.Z)(p,ie.UPDATE,ae.PUT),(0,d.Z)(p,ie.DELETE,ae.DELETE),p),se=[ie.LIST,ie.DETAIL,ie.CREATE,ie.UPDATE,ie.DELETE],ue={INTERNAL:"internal",URL:"url"}},44127:(e,t,n)=>{"use strict";n.d(t,{em:()=>b.em,ki:()=>b.ki,MX:()=>b.MX,Fh:()=>b.Fh,RH:()=>b.RH,ku:()=>b.ku,A5:()=>u,tT:()=>m,de:()=>b.de,z:()=>b.z,ri:()=>b.ri,zv:()=>h,Uv:()=>b.Uv,RK:()=>b.RK,MS:()=>b.MS,dX:()=>b.dX,Il:()=>b.Il,Nh:()=>b.Nh,cq:()=>s,$T:()=>b.$T,w1:()=>b.w1,RQ:()=>b.RQ,yS:()=>Z,AG:()=>b.AG,tL:()=>b.tL,XM:()=>b.XM,wV:()=>b.wV,Od:()=>b.Od,ep:()=>b.ep,GB:()=>i,wU:()=>b.wU,DY:()=>l,P7:()=>E.P,fw:()=>b.fw,Ak:()=>b.Ak,lT:()=>b.lT,NT:()=>g,bF:()=>c,Vx:()=>b.Vx,pl:()=>b.pl,$X:()=>b.$X});var r=n(10251),o=n.n(r),a=function(e){return e},i=function(e,t){if(e.length!==t.length)return!1;e=e.slice(0),t=t.slice(0),e.sort((function(e,t){return e-t})),t.sort((function(e,t){return e-t}));for(var n=0;n<e.length;n+=1)if(e[n]!==t[n])return!1;return!0},c=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=new Set,i=[];return e.forEach((function(e){var a=t(e);if(n){for(var c=!1,l=0;l<i.length;l+=1)if(o()(t(i[l]),a)){c=!0;break}c||i.push(e)}else r.has(a)||(i.push(e),r.add(a))})),i},l=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(e){return e};return e.slice(0).sort((function(e,n){var r=t(e),o=t(n);return r<o?-1:o<r?1:0}))},s=function(e,t){for(var n=0;n<e.length;n+=1)if(t(e[n]))return n;return-1};n(30381);var u=function(e){var t=1/0,n=-1/0,r=1/0,o=-1/0;if(0===e.length)return null;e.forEach((function(e){e.x<t&&(t=e.x),e.x+e.width>n&&(n=e.x+e.width),e.y<r&&(r=e.y),e.y+e.height>o&&(o=e.y+e.height)}));var a=n-t,i=o-r;return t===1/0&&(t=0),r===1/0&&(r=0),a===-1/0&&(a=0),i===-1/0&&(i=0),{x:t,y:r,width:a,height:i}},p=n(7597),d=n.n(p),f=n(44586),h=function(){return function(e,t,n){for(var r=e.length;r<25;r+=1)e="0"+e;return e}(d()("0123456789abcdefghijklmnopqrstuvwxyz").fromUUID((0,f.Z)()))},m=function(){return"c_"+h()},v=(n(77963),n(95493),n(90484)),y="function"==typeof Symbol&&"symbol"===(0,v.Z)(Symbol.iterator)?function(e){return(0,v.Z)(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":(0,v.Z)(e)},g=function e(t,n){if(Array.isArray(t))return t.map((function(t){return e(t,n)}));if(!t||"object"!==(void 0===t?"undefined":y(t)))return t;var r={},o=!0,a=!1,i=void 0;try{for(var c,l=Object.keys(t)[Symbol.iterator]();!(o=(c=l.next()).done);o=!0){var s=c.value,u=t[s];r[s]=e(u,n)}}catch(e){a=!0,i=e}finally{try{!o&&l.return&&l.return()}finally{if(a)throw i}}return n(r)},b=n(91001),Z=(n(70956),n(12941),function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var o=[];return Array.isArray(n[0])&&(o=n[0],n=n.slice(1)),function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:e,r=arguments[1],a=t,i=!0,c=!1,l=void 0;try{for(var s,u=n[Symbol.iterator]();!(i=(s=u.next()).done);i=!0){var p=s.value;void 0!==(y=p(t,r))&&y!==t&&(t=y)}}catch(e){c=!0,l=e}finally{try{!i&&u.return&&u.return()}finally{if(c)throw l}}var d=!0,f=!1,h=void 0;try{for(var m,v=o[Symbol.iterator]();!(d=(m=v.next()).done);d=!0){var y,g=m.value;void 0!==(y=g(t,a))&&(t=y)}}catch(e){f=!0,h=e}finally{try{!d&&v.return&&v.return()}finally{if(f)throw h}}return t}}),E=n(10994)},91001:(e,t,n)=>{"use strict";n.d(t,{Uv:()=>u,RK:()=>p,MS:()=>d,AG:()=>f,$T:()=>h,Vx:()=>m,Od:()=>v,Il:()=>b,RQ:()=>Z,wV:()=>E,fw:()=>A,XM:()=>w,ri:()=>O,de:()=>C,ep:()=>P,z:()=>x,Nh:()=>k,ki:()=>R,w1:()=>S,dX:()=>j,wU:()=>M,pl:()=>B,$X:()=>N,ku:()=>T,Ak:()=>I,lT:()=>L,Fh:()=>X,MX:()=>U,em:()=>z,tL:()=>_,RH:()=>F});var r=n(90484),o=n(7145),a=n.n(o),i=n(10994),c=(n(90955),"function"==typeof Symbol&&"symbol"===(0,r.Z)(Symbol.iterator)?function(e){return(0,r.Z)(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":(0,r.Z)(e)}),l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e};function s(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var u=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];t&&n&&A(t,w(n))!==n&&(t=n);var o=p(e,t=t||n);return o?o.children&&r?t+"."+o.children.length:f(t):""+e.length},p=function e(t,n){if(!t||!n||0===n.length)return null;if("string"==typeof n&&(n=n.split(".")),1===n.length)return t[n[0]];var r=t[n[0]];return r&&e(r.children,n.slice(1))||null},d=function(e,t){var n=p(e,t);return n&&n.id},f=function(e){var t=e.split(".");return t.slice(0,t.length-1).concat([+t[t.length-1]+1]).join(".")},h=function(e,t){for(var n=arguments.length,r=Array(n>2?n-2:0),o=2;o<n;o++)r[o-2]=arguments[o];return(r=r.slice().reverse()).forEach((function(n){e=a()(e,y(t,n,!0))})),e},m=function(e,t,n){return a()(e,y(t,n))},v=function(e,t){return m(e,t)},y=function e(t,n){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=r?0:1;if(t||(t=[]),"string"==typeof t&&(t=t.split(".")),0===t.length)return{};if(1===t.length){var a=[t[0],o];return n&&a.push(n),{$splice:[a]}}return s({},t[0],{children:e(t.slice(1),n,r)})},g=function(e,t){var n=b(t);if(null===n)return e;var r=p(e,n);return r&&r.children||[]},b=function(e){var t=e.split("."),n=t.slice(0,t.length-1).join(".");return""===n?null:n},Z=function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return(t=t.filter((function(e){return e}))).join(".")},E=function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"0";n=l({},n);var o=b(r),a=g(t,r);return a.forEach((function(r,a){var i=Z(o,""+a);if(n[r.id]=i,r.children){var c=Z(i,"0"),s=e(t,{},c);n=l({},n,s)}})),n},A=function(e,t){return(e||"").split(".").slice(0,t).join(".")},w=function(e){return e?e.split(".").length:0},O=function(e){if(0===e.length)return null;var t=e[0];return e.forEach((function(e){for(var n=w(t);n>=0;n-=1)if(A(e,n)===A(t,n)){t=A(t,n);break}})),(e=(0,i.P)(e))[0].split(".").slice(0,t.length+1).join(".")},C=function(e){var t=e=e.map((function(e){return A(e,1)}));return(0,i.P)(Array.from(new Set(t)))},P=function(e){var t={};return e.forEach((function(e){t[e]=!0})),e.forEach((function(e){for(var n=0;n<=w(e)-1;n+=1)if(t[A(e,n)]){delete t[e];break}})),e.filter((function(e){return t[e]}))},x=function(e,t){var n=w(e),r=e.split("."),o={};t.forEach((function(e){var t=w(e);o[t]||(o[t]=[]),o[t].push(e)}));for(var a=function(t){var n=t+1,a=o[n]||[],c=A(e,n);a.forEach((function(e){(function(e,t){var n=w(e);return n===w(t)&&A(e,n-1)===A(t,n-1)})(c,e)&&-1===(0,i.W)(e,c)&&(r[t]-=1)}))},c=0;c<n;c+=1)a(c);return r.join(".")},k=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=w(e),r=A(e,n-1),o=e.split("."),a=o[o.length-1];return Z(r,a=""+(+a+ +t))},R=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=w(e),r=A(e,n-1),o=e.split("."),a=o[o.length-1];return a=""+Math.max(0,+a-+t),Z(r,a)},S=function(e,t){return!(w(t)<=w(e))&&A(t,w(e))===e},j=function(e,t){if(!t)return[];var n=t.x,r=t.y,o=t.width,a=t.height,i=[];return e.forEach((function(e){(function(e,t,n){for(var r=0;r<t.length;r+=1)if("number"!=typeof e[t[r]])return!0;return!1})(e,["x","y","width","height"])||e.x+e.width<n||n+o<e.x||e.y+e.height<r||r+a<e.y||i.push(e.id)})),i},M=function(e,t,n){if(!e||!t||"object"!==(void 0===e?"undefined":c(e))||"object"!==(void 0===t?"undefined":c(t)))return e===t;n||(n=Object.keys(l({},e,t)));for(var r=0;r<n.length;r+=1)if(e[n[r]]!==t[n[r]])return!1;return!0},B=function e(t,n,r){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,a=p(t,r);if(!a)return t;if(o&&!o(a))return t;var i=1/0,c=1/0,s=-1/0,u=-1/0;a.children.forEach((function(e){e.x<i&&(i=e.x),e.x+e.width>s&&(s=e.x+e.width),e.y<c&&(c=e.y),e.y+e.height>u&&(u=e.y+e.height)}));var d=D(i,0),f=D(c,0),h=D(s-i,0),v=D(u-c,0),y=l({},a,{x:d,y:f,width:h,height:v});if(!M(a,y,["x","y","width","height"])){t=m(t,r,y);var g=A(r,w(r)-1);t=e(t,n,g,o)}return t},D=function(e,t){return isFinite(e)?e:t},N=function(e,t,n,r,o){if(!(r=r||t[n]))return e;var a=A(r,w(r)-1);return B(e,t,a,o)},T=function(e,t){var n={};return Object.keys(e).forEach((function(r){"function"==typeof e[r]?n[r]=e[r](t):n[r]=e[r]})),n},I=function e(t,n){if(!t.children||!t.children.length)return t;var r=t.x-n.x,o=t.y-n.y;if(!r&&!o)return t;var a=l({},t);return a.children=a.children.map((function(t){return e(l({},t,{x:t.x+r,y:t.y+o}),t)})),a},L=function e(t,n,r,o){for(var a=0;a<t.length;a+=1){var i=t[a];if(n(i,o,t[a-1],t[a+1]),i&&i.children&&(!r||r(i))){if(!Array.isArray(i.children))throw new Error("obj.children is not an Array: "+JSON.stringify(i));e(i.children,n,r,i)}}},X=function e(t,n,r){var o=[],a=!0,i=!1,c=void 0;try{for(var s,u=t[Symbol.iterator]();!(a=(s=u.next()).done);a=!0){var p=s.value,d=p,f=p?p.children:void 0;d&&d.children&&(!r||r(d))&&(d=l({},d,{children:e(d.children,n)})),d=n(d,f),o.push(d)}}catch(e){i=!0,c=e}finally{try{!a&&u.return&&u.return()}finally{if(i)throw c}}return o},U=function(e,t){var n=[];return L(e,(function(e){t(e)&&n.push(e)})),n},z=function(e,t){for(var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r={},o=0;o<e.length;o+=1){var a=e[o],i=t(a);n?(r[i]||(r[i]=[]),r[i].push(a)):r[i]=a}return r},_=function(e,t){for(var n=null,r=-1/0,o=0;o<e.length;o+=1){var a=e[o],i=t(a);i>r&&(n=a,r=i)}return n},F=function e(t,n){if(void 0!==t&&void 0===n)return t;if(void 0!==n&&void 0===!t)return n;if(!t||"object"!==(void 0===t?"undefined":c(t))||Array.isArray(t)||!n||"object"!==(void 0===n?"undefined":c(n))||Array.isArray(n))return n;var r={},o=new Set(Object.keys(n));for(var a in l({},t,n))n[a]||!o.has(a)?r[a]=e(t[a],n[a]):(r[a]=n[a],void 0===r[a]&&delete r[a]);return r}},10994:(e,t,n)=>{"use strict";n.d(t,{W:()=>r,P:()=>o});var r=function(e,t){for(var n=e.split("."),r=t.split("."),o=Math.max(n.length,r.length),a=0;a<o;a+=1){if(+n[a]>+r[a]||void 0===r[a])return 1;if(+r[a]>+n[a]||void 0===n[a])return-1}return 0},o=function(e){return(e=[].concat(function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}(e))).sort((function(e,t){return r(e,t)})),e}},92864:(e,t,n)=>{"use strict";n(6610),n(5991),n(63349),n(10379),n(46070),n(77608),n(96156);var r=n(67294);n(45697),n(98605),n(94184);r.Component},67342:(e,t,n)=>{"use strict";n.d(t,{L:()=>N,Z:()=>B});var r=n(6610),o=n(5991),a=n(10379),i=n(46070),c=n(77608),l=n(67294),s=n(63349),u=n(96156),p=n(5513),d=n(26353),f=n(37703),h=n(94184),m=n.n(h),v=n(98605),y=n.n(v),g=n(8808),b=n(19057);var Z=l.createElement(b.Z,{big:!0,type:"account-circle"}),E=l.createElement(b.Z,{type:"expand-vertical"}),A=l.createElement("hr",null),w=l.createElement("a",{href:"",target:"_blank",rel:"noopener noreferrer"},"Help & Documentation"),O=l.createElement("hr",null),C=l.createElement("hr",null),P=l.createElement(l.Fragment,null,l.createElement(p.rU,{to:"/admin/users"},"Admin"),l.createElement("hr",null)),x=function(e){(0,a.Z)(f,e);var t,n,d=(t=f,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=(0,c.Z)(t);if(n){var o=(0,c.Z)(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return(0,i.Z)(this,e)});function f(){var e;(0,r.Z)(this,f);for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return e=d.call.apply(d,[this].concat(n)),(0,u.Z)((0,s.Z)(e),"state",{expanded:!1}),(0,u.Z)((0,s.Z)(e),"handleLogout",(function(){window.localStorage.removeItem("protonSession"),window.location="/"})),(0,u.Z)((0,s.Z)(e),"handleToggle",(function(){e.setState((function(e){return{expanded:!e.expanded}}))})),(0,u.Z)((0,s.Z)(e),"getBaseURL",(function(){var t=e.props.location.pathname.match(/^\/apps\/([\w\-]+)/);if(t){var n=t[1];return"/apps/".concat(n,"/screens")}return""})),(0,u.Z)((0,s.Z)(e),"getSettingsLink",(function(){var t=e.getBaseURL();return"".concat(t,"/settings/account")})),(0,u.Z)((0,s.Z)(e),"getDevelopersLink",(function(){var t=e.getBaseURL();return"".concat(t,"/developers/libraries")})),e}return(0,o.Z)(f,[{key:"render",value:function(){var e=this.props.user,t=this.state.expanded;return e?l.createElement("div",{className:"navbar-user-info"},t?l.createElement(y(),{onClick:this.handleToggle}):null,l.createElement("a",{className:"navbar-user-avatar",onClick:this.handleToggle},Z,E),t?l.createElement("div",{onClick:this.handleToggle,className:m()("navbar-user-menu",{expanded:t})},l.createElement(p.rU,{to:this.getSettingsLink()},"Settings"),A,w,O,null!=e&&e.developer?l.createElement(l.Fragment,null,l.createElement(p.rU,{to:this.getDevelopersLink()},"Developers"),C):null,e.admin?P:null,l.createElement("a",{onClick:this.handleLogout},"Sign Out")):null):null}}]),f}(l.Component);const k=(0,d.EN)((0,f.$j)((function(e){return{user:(0,g.ts)(e)}}))(x));var R=n(41122);n(37908);var S=l.createElement(R.Z,{className:"app-navbar-stripe"}),j=l.createElement("div",{className:"app-navbar-brand"},"Бокс 1"),M=l.createElement(k,null),B=function(e){(0,a.Z)(u,e);var t,n,s=(t=u,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=(0,c.Z)(t);if(n){var o=(0,c.Z)(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return(0,i.Z)(this,e)});function u(){return(0,r.Z)(this,u),s.apply(this,arguments)}return(0,o.Z)(u,[{key:"render",value:function(){var e=this.props.children;return l.createElement("div",{className:"app-navbar"},S,j,e,M)}}]),u}(l.Component),D=l.createElement("div",{className:"navbar-spacer"}),N=function(){return D}},49448:(e,t,n)=>{"use strict";n.d(t,{Z:()=>hr});var r=n(6610),o=n(5991),a=n(10379),i=n(46070),c=n(77608),l=n(67294),s=n(5513),u=n(26353),p=n(49611),d=n.n(p),f=n(18748),h=n(78248),m=n(93692),v=n(63349),y=n(96156),g=n(37703),b=n(80129),Z=n.n(b),E=n(3227),A=n(98214),w=n(23668),O=n(59028);n(89084);var C=l.createElement(u.l_,{to:"apps/eb5e611c-7ac8-416f-899f-221a194318d0/screens"}),P=(u.l_,A.Z,w.Z,function(e){(0,a.Z)(s,e);var t,n,l=(t=s,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=(0,c.Z)(t);if(n){var o=(0,c.Z)(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return(0,i.Z)(this,e)});function s(){var e;(0,r.Z)(this,s);for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return e=l.call.apply(l,[this].concat(n)),(0,y.Z)((0,v.Z)(e),"getParams",(function(){var t=e.props.location.search;return Z().parse(t||"",{ignoreQueryPrefix:!0})})),e}return(0,o.Z)(s,[{key:"componentDidMount",value:function(){(0,this.props.requestApps)()}},{key:"render",value:function(){var e=this.props;return e.lastApp,e.children,e.modalProps,e.appsLoaded,this.getParams(),C}}]),s}(l.Component));const x=(0,g.$j)((function(e){return{lastApp:(0,E.sZ)(e),appsLoaded:(0,E.xu)(e)}}),{requestApps:E.ZZ})(P);var k=n(66153),R=n(5321),S=n(26828);var j=function(e){(0,a.Z)(u,e);var t,n,s=(t=u,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=(0,c.Z)(t);if(n){var o=(0,c.Z)(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return(0,i.Z)(this,e)});function u(){var e;(0,r.Z)(this,u);for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return e=s.call.apply(s,[this].concat(n)),(0,y.Z)((0,v.Z)(e),"getDetailsURL",(function(){var t=e.props,n=t.match,r=t.item,o=n.params.appId;return"/apps/".concat(o,"/addons/").concat(r.id)})),(0,y.Z)((0,v.Z)(e),"getInstallURL",(function(){var t=e.props,n=t.match,r=t.item,o=n.params.appId;return"/apps/".concat(o,"/addons/install/").concat(r.id)})),e}return(0,o.Z)(u,[{key:"render",value:function(){var e=this.props.item,t=e.name,n=e.tagline;return l.createElement("div",{className:"addons-list-item"},l.createElement("h3",null,t),l.createElement("p",{className:"addons-list-item-tagline"},n),l.createElement("div",{className:"addons-list-item-actions"},l.createElement(S.Z,{secondary:!0,to:this.getDetailsURL()},"Details"),l.createElement(S.Z,{to:this.getInstallURL()},"Install")))}}]),u}(l.Component);const M=(0,u.EN)(j);var B=l.createElement(A.Z,{greedy:!0},l.createElement(w.Z,{large:!0})),D=l.createElement(A.Z,null,"No Addons Available"),N=function(e){(0,a.Z)(u,e);var t,n,s=(t=u,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=(0,c.Z)(t);if(n){var o=(0,c.Z)(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return(0,i.Z)(this,e)});function u(){return(0,r.Z)(this,u),s.apply(this,arguments)}return(0,o.Z)(u,[{key:"renderContent",value:function(){var e=this.props.list;return e?0===e.length?D:e.map((function(e){return l.createElement(M,{key:e.id,item:e})})):B}},{key:"render",value:function(){var e=this.props.title;return l.createElement("div",{className:"addons-list-wrapper"},l.createElement("h2",null,e),l.createElement("div",{className:"addons-list"},this.renderContent()))}}]),u}(l.Component);var T=l.createElement(A.Z,{greedy:!0},l.createElement(w.Z,{large:!0})),I=function(e){(0,a.Z)(u,e);var t,n,s=(t=u,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=(0,c.Z)(t);if(n){var o=(0,c.Z)(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return(0,i.Z)(this,e)});function u(){var e;(0,r.Z)(this,u);for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return e=s.call.apply(s,[this].concat(n)),(0,y.Z)((0,v.Z)(e),"getInstallURL",(function(){var t=e.props.match.params,n=t.appId,r=t.serviceId;return"/apps/".concat(n,"/addons/install/").concat(r)})),e}return(0,o.Z)(u,[{key:"render",value:function(){var e=this.props.service;return e?l.createElement("div",{className:"addons-modal-content"},l.createElement("div",{className:"addons-modal-header"},l.createElement("div",{className:"addons-modal-header-actions"},l.createElement(S.Z,{to:this.getInstallURL()},"Install Now")),l.createElement("h3",null,e.name),l.createElement("p",null,e.tagline)),l.createElement("div",{className:"addons-modal-details"},l.createElement("p",{className:"addons-modal-description"},e.description))):T}}]),u}(l.Component);const L=(0,u.EN)((0,g.$j)((function(e,t){var n=t.serviceId;return{service:(0,R.ko)(e,n)}}))(I));n(35586);var X=l.createElement("h1",null,"Addons"),U=l.createElement("div",{className:"addons-page-sidebar"},l.createElement("h2",null,"What Are Addons?"),l.createElement("p",null,"Addons give your app superpowers—things like accepting payments,\n                sending emails, and much more. Addons add additional Actions,\n                Data Connections, and Components. To find out more, click on\n                an Addon to the left! ",l.createElement("span",{role:"img","aria-label":"Pointing Left"},"👈"))),z=function(e){(0,a.Z)(u,e);var t,n,s=(t=u,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=(0,c.Z)(t);if(n){var o=(0,c.Z)(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return(0,i.Z)(this,e)});function u(){var e;(0,r.Z)(this,u);for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return e=s.call.apply(s,[this].concat(n)),(0,y.Z)((0,v.Z)(e),"getBaseURL",(function(){var t=e.props.match.params.appId;return"/apps/".concat(t,"/addons")})),e}return(0,o.Z)(u,[{key:"componentDidMount",value:function(){var e=this.props,t=e.requestApp,n=e.requestPopularServices;t(e.match.params.appId),n()}},{key:"render",value:function(){var e=this.props,t=e.app,n=e.services,r=e.match.params.serviceId;return l.createElement(O.Z,{className:"addons-page",title:(0,k.u)(t,"Addons"),modalContent:r&&l.createElement(L,{serviceId:r}),modalProps:{className:"addons-modal"},baseURL:this.getBaseURL()},X,l.createElement("div",{className:"addons-page-main"},l.createElement("div",{className:"addons-page-content"},l.createElement(N,{list:n,title:"Popular Addons"})),U))}}]),u}(l.Component);(0,g.$j)((function(e,t){var n=t.match;return{app:(0,E.Mq)(e,n.params.appId),services:(0,R.ok)(e)}}),{requestApp:E.bO,requestPopularServices:R.YR})(z);var _=l.createElement(A.Z,{greedy:!0},l.createElement(w.Z,{large:!0})),F=function(e){(0,a.Z)(u,e);var t,n,s=(t=u,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=(0,c.Z)(t);if(n){var o=(0,c.Z)(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return(0,i.Z)(this,e)});function u(){return(0,r.Z)(this,u),s.apply(this,arguments)}return(0,o.Z)(u,[{key:"componentDidMount",value:function(){var e=this.props,t=e.match,n=e.requestApp,r=e.requestService,o=t.params,a=o.appId,i=o.serviceId;n(a),r(i)}},{key:"render",value:function(){var e=this.props.service;return e?l.createElement(O.Z,{form:!0,title:"Install ".concat(e.name)},l.createElement("div",{className:"install-addon-page"},l.createElement("h1",null,"Install",e.name))):_}}]),u}(l.Component);(0,g.$j)((function(e,t){var n=t.match;return{service:(0,R.ko)(e,n.params.serviceId),app:(0,E.Mq)(e,n.params.appId)}}),{requestApp:E.bO,requestService:R.MJ})(F);var W=n(67342);var Y=function(e){(0,a.Z)(u,e);var t,n,s=(t=u,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=(0,c.Z)(t);if(n){var o=(0,c.Z)(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return(0,i.Z)(this,e)});function u(){return(0,r.Z)(this,u),s.apply(this,arguments)}return(0,o.Z)(u,[{key:"render",value:function(){var e=this.props.children;return l.createElement("div",{className:"app-body"},e)}}]),u}(l.Component),G=n(94188);n(79258);var V=l.createElement("p",null,"This cannot be undone"),q=l.createElement(s.rU,{to:"/",className:"deemphasize"},"Cancel"),H=function(e){(0,a.Z)(u,e);var t,n,s=(t=u,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=(0,c.Z)(t);if(n){var o=(0,c.Z)(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return(0,i.Z)(this,e)});function u(){var e;(0,r.Z)(this,u);for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return e=s.call.apply(s,[this].concat(n)),(0,y.Z)((0,v.Z)(e),"handleDelete",(function(){var t=e.props,n=t.history,r=t.match;(0,t.deleteApp)(r.params.appId),n.push("/")})),e}return(0,o.Z)(u,[{key:"render",value:function(){var e=this.props.app;if(!e)return null;var t=e.name;return l.createElement("div",null,l.createElement("h1",null,"Are you sure you want to delete ",l.createElement("strong",null,t),"?"),V,l.createElement("div",{className:"delete-app-actions"},q,l.createElement(S.Z,{large:!0,danger:!0,onClick:this.handleDelete},"Delete Permanently")))}}]),u}(l.Component);const $=(0,u.EN)((0,g.$j)((function(e,t){var n=t.match;return{app:(0,E.XB)(e,n.params.appId)}}),{deleteApp:E.P2})(H));var K=n(87757),Q=n.n(K),J=n(92137),ee=n(75607),te=n(30224),ne=n(8808),re=n(6455),oe=n(13705),ae=n(33941),ie=n(16093);var ce=l.createElement(ie.Z,null),le=l.createElement("h1",null,"Sign In"),se=l.createElement(re.Z,{autoFocus:!0,name:"email",placeholder:"me@example.com",type:"email",label:"Email Address",autoComplete:"email",component:ae.Z}),ue=l.createElement(re.Z,{name:"password",placeholder:"••••••••",type:"password",label:"Password",autoComplete:"current-password",component:ae.Z}),pe=l.createElement("div",{className:"auth-form-link"},l.createElement(s.rU,{to:"/forgot-password",className:"link-button"},"Forgot Password?")),de=function(e){(0,a.Z)(p,e);var t,n,u=(t=p,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=(0,c.Z)(t);if(n){var o=(0,c.Z)(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return(0,i.Z)(this,e)});function p(){return(0,r.Z)(this,p),u.apply(this,arguments)}return(0,o.Z)(p,[{key:"render",value:function(){var e=this.props,t=e.handleSubmit,n=e.error,r=e.submitting,o=e.redirect,a=Z().stringify({redirect:o},{addQueryPrefix:!0});return l.createElement("form",{onSubmit:t,className:"auth-form"},ce,le,se,ue,l.createElement("div",{className:"auth-form-submission-row"},l.createElement(S.Z,{large:!0,yellow:!0,loading:r},"Sign In")),n&&l.createElement("div",{className:"auth-form-error"},n),pe,l.createElement("div",{className:"auth-form-link"},"No account? ",l.createElement(s.rU,{to:"/signup".concat(a),className:"link-button"},"Signup")))}}]),p}(l.Component);const fe=(0,oe.Z)({form:"loginForm"})(de);var he=n(94184),me=n.n(he),ve=n(44302);function ye(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=(0,c.Z)(e);if(t){var o=(0,c.Z)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return(0,i.Z)(this,n)}}var ge=l.createElement(ve.Z,{className:"auth-screen"}),be=function(e){(0,a.Z)(n,e);var t=ye(n);function n(){return(0,r.Z)(this,n),t.apply(this,arguments)}return(0,o.Z)(n,[{key:"render",value:function(){var e=this.props,t=e.className,n=e.children,r=e.error;return l.createElement("div",{className:me()("auth-page",t,{"auth-page-has-error":r})},ge,r?l.createElement(Ze,{error:r}):null,l.createElement("div",{className:"auth-page-body"},n))}}]),n}(l.Component),Ze=function(e){(0,a.Z)(n,e);var t=ye(n);function n(){return(0,r.Z)(this,n),t.apply(this,arguments)}return(0,o.Z)(n,[{key:"render",value:function(){var e=this.props.error;return l.createElement("div",{className:"auth-page-error"},e)}}]),n}(l.Component);n(17548);var Ee=function(e){(0,a.Z)(u,e);var t,n,s=(t=u,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=(0,c.Z)(t);if(n){var o=(0,c.Z)(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return(0,i.Z)(this,e)});function u(){var e;(0,r.Z)(this,u);for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return e=s.call.apply(s,[this].concat(n)),(0,y.Z)((0,v.Z)(e),"getRedirect",(function(){var t=e.props.location;return Z().parse(t.search,{ignoreQueryPrefix:!0}).redirect})),(0,y.Z)((0,v.Z)(e),"handleLogin",function(){var t=(0,J.Z)(Q().mark((function t(n){var r,o,a,i,c;return Q().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.props,o=r.history,a=r.setCurrentUserToken,i=e.getRedirect(),t.prev=2,t.next=5,(0,te.YR)(n);case 5:c=t.sent,window.localStorage.setItem("protonSession",c),a(c),o.push(i||"/"),t.next=14;break;case 11:throw t.prev=11,t.t0=t.catch(2),new ee.t({_error:"Invalid email or password"});case 14:case"end":return t.stop()}}),t,null,[[2,11]])})));return function(e){return t.apply(this,arguments)}}()),e}return(0,o.Z)(u,[{key:"render",value:function(){var e=this.getRedirect();return l.createElement(be,{className:"login-page"},l.createElement(fe,{onSubmit:this.handleLogin,redirect:e}))}}]),u}(l.Component);const Ae=(0,g.$j)(null,{setCurrentUserToken:ne.se})(Ee);var we=l.createElement(ie.Z,null),Oe=l.createElement("h1",null,"Forgot Password"),Ce=l.createElement("p",null,"Please enter your email and a password reset link will be sent"),Pe=l.createElement(re.Z,{autoFocus:!0,name:"email",placeholder:"me@example.com",type:"email",label:"Email Address",component:ae.Z}),xe=l.createElement("div",{className:"auth-form-error"},"A password recovery link has been sent to your email."),ke=function(e){(0,a.Z)(u,e);var t,n,s=(t=u,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=(0,c.Z)(t);if(n){var o=(0,c.Z)(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return(0,i.Z)(this,e)});function u(){return(0,r.Z)(this,u),s.apply(this,arguments)}return(0,o.Z)(u,[{key:"render",value:function(){var e=this.props,t=e.handleSubmit,n=e.error,r=e.submitSucceeded;return l.createElement("form",{onSubmit:t,className:"auth-form"},we,Oe,Ce,Pe,l.createElement("div",{className:"auth-form-submission-row"},l.createElement(S.Z,{large:!0,yellow:!0,disabled:r},"Send")),n&&l.createElement("div",{className:"auth-form-error"},n),r&&xe)}}]),u}(l.Component);const Re=(0,oe.Z)({form:"forgotPasswordForm",validate:function(e){var t={};return e.email?e.email.match(/^.+@([\w\-]+\.)+\w{2,}$/)||(t.email="Please enter a valid email address"):t.email="Email is required",t}})(ke);var Se=function(e){(0,a.Z)(u,e);var t,n,s=(t=u,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=(0,c.Z)(t);if(n){var o=(0,c.Z)(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return(0,i.Z)(this,e)});function u(){var e;(0,r.Z)(this,u);for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return e=s.call.apply(s,[this].concat(n)),(0,y.Z)((0,v.Z)(e),"handleRecovery",(function(e){return new Promise((function(t,n){(0,te.BI)(e,(function(e){var r=e.success,o=e.errors;if(console.log(r),!r)return n(new ee.t(o));t()}))}))})),e}return(0,o.Z)(u,[{key:"render",value:function(){return l.createElement(be,{className:"login-page"},l.createElement(Re,{onSubmit:this.handleRecovery}))}}]),u}(l.Component);const je=(0,g.$j)(null)(Se);var Me=n(58796);var Be=l.createElement(ie.Z,null),De=l.createElement("h1",null,"Update Password"),Ne=l.createElement("p",null,"Please enter your new password"),Te=l.createElement(re.Z,{autoFocus:!0,name:"password",placeholder:"New Password",type:"password",label:"New Password",component:ae.Z}),Ie=l.createElement("div",{className:"auth-form-submission-row"},l.createElement(S.Z,{large:!0,yellow:!0},"Update")),Le=function(e){(0,a.Z)(u,e);var t,n,s=(t=u,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=(0,c.Z)(t);if(n){var o=(0,c.Z)(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return(0,i.Z)(this,e)});function u(){return(0,r.Z)(this,u),s.apply(this,arguments)}return(0,o.Z)(u,[{key:"render",value:function(){var e=this.props,t=e.handleSubmit,n=e.error;return l.createElement("form",{onSubmit:t,className:"auth-form"},Be,De,Ne,Te,Ie,n&&l.createElement("div",{className:"auth-form-error"},n))}}]),u}(l.Component);const Xe=(0,oe.Z)({form:"recoverPasswordForm",validate:function(e){var t={};return(!e.password||e.password.length<8)&&(t.password="Password must be at least 8 characters"),t}})(Le);function Ue(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ze(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ue(Object(n),!0).forEach((function(t){(0,y.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ue(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var _e=function(e){(0,a.Z)(u,e);var t,n,s=(t=u,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=(0,c.Z)(t);if(n){var o=(0,c.Z)(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return(0,i.Z)(this,e)});function u(e){var t;(0,r.Z)(this,u),t=s.call(this,e),(0,y.Z)((0,v.Z)(t),"handleUpdate",(function(e){return new Promise((function(n,r){var o=t.state.recoveryToken,a=t.props,i=a.history,c=a.setCurrentUserToken;e=ze(ze({},e),{},{recoveryToken:o}),(0,te.gQ)(e,(function(e){var t=e.success,o=e.errors,a=e.sessionToken;if(!t)return console.log(o),r(new ee.t(o));window.localStorage.setItem("protonSession",a),c(a),i.push("/"),n()}))}))}));var n=e.location,o=Z().parse(n.search.slice(1)).token,a=null;return o&&((0,Me.JW)(o)||(a="Your password recovery link has expired. Invitations expire after 7 days.")),t.state={error:a,recoveryToken:o},t}return(0,o.Z)(u,[{key:"render",value:function(){var e=this.state.error;return l.createElement(be,{className:"login-page",error:e},l.createElement(Xe,{onSubmit:this.handleUpdate}))}}]),u}(l.Component);const Fe=(0,g.$j)(null,{setCurrentUserToken:ne.se})(_e);var We=n(99809),Ye=n(87180),Ge=n(15645);function Ve(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function qe(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ve(Object(n),!0).forEach((function(t){(0,y.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ve(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var He=function(e){(0,a.Z)(u,e);var t,n,s=(t=u,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=(0,c.Z)(t);if(n){var o=(0,c.Z)(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return(0,i.Z)(this,e)});function u(e){var t;(0,r.Z)(this,u),t=s.call(this,e),(0,y.Z)((0,v.Z)(t),"handleSubmit",(function(e){return new Promise((function(n,r){var o=t.props,a=o.history,i=o.setCurrentUserToken,c=t.state,l=c.inviteToken,s=c.redirect,u=(0,Ye.I)(),p=window.location.href,d=document.title,f=Object.fromEntries(document.cookie.split("; ").map((function(e){var t=e.split("="),n=(0,We.Z)(t);return[n[0],n.slice(1).join("=")]}))),h=null==f?void 0:f.hubspotutk;e=qe(qe({},e),{},{inviteToken:l,rewardfulToken:u,hubspotutk:h,pageUri:p,pageName:d}),(0,te.IU)(e,(function(e){var t=e.success,o=e.errors,c=e.sessionToken,l=e.newOrg;if(!t)return r(new ee.t(o));window.localStorage.setItem("protonSession",c),i(c),s?(String(s).startsWith("/")||(s="/".concat(s)),a.push(s)):l?a.push("/first-app-setup"):a.push("/"),n()}))}))}));var n=e.location,o=Z().parse(n.search,{ignoreQueryPrefix:!0}),a=o.token,i=o.redirect,c={},l=null;if(a){var p=(0,Me.JW)(a);p?c={email:p.email}:l="Your invitation has expired. Invitations expire after 7 days."}return t.state={initialValues:c,error:l,inviteToken:a,redirect:i},t}return(0,o.Z)(u,[{key:"render",value:function(){var e=this.props,t=e.children,n=e.location,r=this.state.redirect,o="/accept-invite"===n.pathname,a=this.state,i=a.initialValues,c=a.error;return l.createElement(be,{name:"signup-page",error:c},l.createElement(Ge.Z,{isInvite:o,initialValues:i,onSubmit:this.handleSubmit,redirect:r}),t)}}]),u}(l.Component);const $e=(0,g.$j)(null,{setCurrentUserToken:ne.se})(He);var Ke=n(39368),Qe=n(75419),Je=n(64395);var et=function(e){(0,a.Z)(u,e);var t,n,s=(t=u,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=(0,c.Z)(t);if(n){var o=(0,c.Z)(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return(0,i.Z)(this,e)});function u(){var e;(0,r.Z)(this,u);for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return e=s.call.apply(s,[this].concat(n)),(0,y.Z)((0,v.Z)(e),"handleSubmit",function(){var t=(0,J.Z)(Q().mark((function t(n){var r,o,a,i,c,l,s,u,p,d,f,h,m;return Q().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.props,o=r.stripe,a=r.saveSubscription,i=r.organizationId,c=n.plan,l=n.coupon,s=n.name,t.next=4,o.createToken({name:s});case 4:if(u=t.sent,p=u.token,d=u.error,!p||!i){t.next=23;break}return t.prev=8,t.next=11,a(i,{coupon:l,planType:c,stripeToken:null==p?void 0:p.id});case 11:"individual"===c&&window.ga&&window.ga("send",{hitType:"event",eventCategory:"button",eventAction:"click",eventLabel:"Payment Made",eventValue:50}),"launch"===c&&window.ga&&window.ga("send",{hitType:"event",eventCategory:"button",eventAction:"click",eventLabel:"Payment Made",eventValue:200}),e.handleSuccess(),t.next=21;break;case 16:throw t.prev=16,t.t0=t.catch(8),h=t.t0.response,m=(null==h||null===(f=h.data)||void 0===f?void 0:f.error)||"An unknown error occurred",new ee.t({_error:m});case 21:t.next=25;break;case 23:throw console.log("ERROR:",d),new ee.t({_error:d.message});case 25:case"end":return t.stop()}}),t,null,[[8,16]])})));return function(e){return t.apply(this,arguments)}}()),(0,y.Z)((0,v.Z)(e),"handleSuccess",(function(){return e.props.history.push("/first-app-setup")})),e}return(0,o.Z)(u,[{key:"componentDidMount",value:function(){(0,this.props.fetchOrganizations)()}},{key:"render",value:function(){return l.createElement(be,null,l.createElement(Je.Z,{className:"modal-wrapper-text-aligned-left",size:"lg",scrolling:!0,hideDimmer:!0},l.createElement(SignupForm,{hideFreeTier:!0,hideStorage:!0,title:"Choose your plan to get started",submitText:"Start!",onSubmit:this.handleSubmit,initialValues:{plan:"individual"}})))}}]),u}(l.Component),tt=(0,g.$j)((function(e){var t,n;return{organizationId:null===(t=(0,Qe.jX)(e))||void 0===t||null===(n=t[0])||void 0===n?void 0:n.id}}),{fetchOrganizations:Qe.ZC,saveSubscription:Ke.Oz})((0,u.EN)(et)),nt=l.createElement(tt,null);var rt=n(60819);var ot=[{id:"blank",name:"Blank"}],at=l.createElement(ve.Z,{className:"auth-screen"}),it=function(e){(0,a.Z)(u,e);var t,n,s=(t=u,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=(0,c.Z)(t);if(n){var o=(0,c.Z)(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return(0,i.Z)(this,e)});function u(){return(0,r.Z)(this,u),s.apply(this,arguments)}return(0,o.Z)(u,[{key:"render",value:function(){var e=this.props.organizations;return l.createElement(O.Z,{modalProps:{className:"new-app-modal",grayOut:!1},modalContent:l.createElement(rt.Z,{onSubmit:this.handleSubmit,templates:ot,organizations:e})},at)}}]),u}(l.Component);(0,g.$j)((function(e){return{organizations:(0,Qe.jX)(e)}}),{updateOrganization:Qe.FV,fetchOrganizations:Qe.ZC})(it);var ct=n(49277),lt=n(9669),st=n.n(lt),ut=n(50965);n(14490);var pt=l.createElement("div",{className:"terms-modal-header"},l.createElement("h1",null,"Terms of Use")),dt=l.createElement(w.Z,{large:!0,expanded:!0}),ft=function(e){(0,a.Z)(u,e);var t,n,s=(t=u,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=(0,c.Z)(t);if(n){var o=(0,c.Z)(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return(0,i.Z)(this,e)});function u(){var e;(0,r.Z)(this,u);for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return e=s.call.apply(s,[this].concat(n)),(0,y.Z)((0,v.Z)(e),"state",{terms:null}),(0,y.Z)((0,v.Z)(e),"getBackLocation",(function(){var e=window.location,t=e.pathname,n=e.search;return t=t.replace("/terms",""),"".concat(t).concat(n)})),e}return(0,o.Z)(u,[{key:"componentDidMount",value:function(){var e=this;st().get("/terms.html").then((function(t){e.setState({terms:t.data})}))}},{key:"render",value:function(){var e=this.state.terms;return l.createElement(Je.Z,{constrained:!0,className:"terms-modal"},pt,e?l.createElement(ut.Z,{className:"terms-modal-content"},l.createElement("div",{dangerouslySetInnerHTML:{__html:e}})):dt,l.createElement("div",{className:"terms-modal-footer"},l.createElement(S.Z,{to:this.getBackLocation()},"Done")))}}]),u}(l.Component),ht=n(81253),mt=["login_type"];var vt=function(e){(0,a.Z)(p,e);var t,n,s=(t=p,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=(0,c.Z)(t);if(n){var o=(0,c.Z)(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return(0,i.Z)(this,e)});function p(){return(0,r.Z)(this,p),s.apply(this,arguments)}return(0,o.Z)(p,[{key:"render",value:function(){var e=this.props.authVisible,t=window.location.pathname.match(/^\/(login)|(signup)|(accept-invite)|(forgot-password)|(recover-password)/);if(e&&!t){var n=Z().parse(window.location.search,{ignoreQueryPrefix:!0}),r=n.login_type,o=(0,ht.Z)(n,mt),a=Z().stringify(o,{addQueryPrefix:!0}),i="".concat(window.location.pathname).concat(a);["login","signup"].includes(r)||(r="login");var c="/".concat(r,"?").concat(Z().stringify({redirect:i}));return l.createElement(u.l_,{to:c})}return null}}]),p}(l.Component);(0,u.EN)((0,g.$j)((function(e){return{authVisible:(0,ne.Qp)(e)}}))(vt));var yt=function(e){(0,a.Z)(s,e);var t,n,l=(t=s,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=(0,c.Z)(t);if(n){var o=(0,c.Z)(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return(0,i.Z)(this,e)});function s(){var e;(0,r.Z)(this,s);for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return e=l.call.apply(l,[this].concat(n)),(0,y.Z)((0,v.Z)(e),"handleWheel",(function(e){0!==e.deltaX&&e.preventDefault()})),e}return(0,o.Z)(s,[{key:"componentDidMount",value:function(){document.body.addEventListener("wheel",this.handleWheel,{passive:!1,capture:!0})}},{key:"componentWillUnmount",value:function(){document.body.removeEventListener("wheel",this.handleWheel)}},{key:"render",value:function(){return null}}]),s}(l.Component),gt=n(94537),bt=n(71315),Zt=n(37359),Et=n(405);function At(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=(0,c.Z)(e);if(t){var o=(0,c.Z)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return(0,i.Z)(this,n)}}n(48030);var wt=function(e){(0,a.Z)(n,e);var t=At(n);function n(){var e;(0,r.Z)(this,n);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return e=t.call.apply(t,[this].concat(a)),(0,y.Z)((0,v.Z)(e),"handleHide",(function(){var t=e.props,n=t.notification;(0,t.hideNotification)(n.id)})),e}return(0,o.Z)(n,[{key:"render",value:function(){var e=this.props.notification;return l.createElement("div",{className:"notification-item"},l.createElement(Et.Z,{onDismiss:this.handleHide},e.message))}}]),n}(l.Component),Ot=function(e){(0,a.Z)(n,e);var t=At(n);function n(){return(0,r.Z)(this,n),t.apply(this,arguments)}return(0,o.Z)(n,[{key:"render",value:function(){var e=this.props,t=e.notifications,n=e.hideNotification;return l.createElement(gt.Z,{className:"notifications"},t.map((function(e){return l.createElement(bt.Z,{key:e.id,timeout:400,classNames:"notification-item"},l.createElement(wt,{notification:e,hideNotification:n}))})))}}]),n}(l.Component);const Ct=(0,g.$j)((function(e){return{notifications:(0,Zt.TH)(e)}}),{hideNotification:Zt.yK})(Ot);var Pt=n(65479);n(21269);var xt=l.createElement(ve.Z,{className:"offline-banner-visible"}),kt=l.createElement("div",{className:"offline-banner"},"Нет подключения к серверу."),Rt=function(e){(0,a.Z)(u,e);var t,n,s=(t=u,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=(0,c.Z)(t);if(n){var o=(0,c.Z)(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return(0,i.Z)(this,e)});function u(){return(0,r.Z)(this,u),s.apply(this,arguments)}return(0,o.Z)(u,[{key:"render",value:function(){var e=this.props.connected;return l.createElement(l.Fragment,null,e?null:xt,kt)}}]),u}(l.Component);const St=(0,g.$j)((function(e){return{connected:(0,Pt.Nd)(e)}}))(Rt);var jt=n(96486),Mt=n(87872),Bt=n(34943),Dt=n(93379),Nt=n.n(Dt),Tt=n(60854);function It(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=(0,c.Z)(e);if(t){var o=(0,c.Z)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return(0,i.Z)(this,n)}}Nt()(Tt.Z,{insert:"head",singleton:!1}),Tt.Z.locals;var Lt=function(e){(0,a.Z)(n,e);var t=It(n);function n(){return(0,r.Z)(this,n),t.apply(this,arguments)}return(0,o.Z)(n,[{key:"render",value:function(){var e=this.props.app;return l.createElement(s.rU,{className:"admin-user-item",to:"/apps/".concat(e.id)},l.createElement(Bt.Z,{app:e}),l.createElement("h5",null,e.name),l.createElement("p",null,e.createdAt),l.createElement("p",null,e.updatedAt))}}]),n}(l.Component),Xt=function(e){(0,a.Z)(n,e);var t=It(n);function n(){var e;(0,r.Z)(this,n);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return e=t.call.apply(t,[this].concat(a)),(0,y.Z)((0,v.Z)(e),"getStatus",(function(){return e.props.organization.active?"paying":"free"})),e}return(0,o.Z)(n,[{key:"render",value:function(){var e=this.props.organization,t=this.getStatus();return l.createElement("span",{className:"admin-user-organization"},l.createElement("span",{className:"admin-user-org-sub"},e.name,l.createElement("span",{className:me()("admin-org-status","admin-org-".concat(t))},t)))}}]),n}(l.Component),Ut=l.createElement(A.Z,{greedy:!0},l.createElement(w.Z,{large:!0})),zt=l.createElement(s.rU,{to:"/admin/users"},"Back to Users"),_t=function(e){(0,a.Z)(n,e);var t=It(n);function n(){return(0,r.Z)(this,n),t.apply(this,arguments)}return(0,o.Z)(n,[{key:"componentDidMount",value:function(){var e=this.props,t=e.match;(0,e.requestUser)(t.params.userId)}},{key:"render",value:function(){var e=this.props.user;if(!e)return Ut;var t=e.Apps;return l.createElement(O.Z,{className:"admin-users-page",title:"Users"},zt,l.createElement("h1",null,e.name),l.createElement("h2",null,e.email),l.createElement("h3",null,e.Organizations.map((function(e){return l.createElement(Xt,{key:e.id,organization:e})}))),l.createElement("div",null,t.map((function(e){return l.createElement(Lt,{key:e.id,app:e})}))))}}]),n}(l.Component);const Ft=(0,g.$j)((function(e,t){var n=t.match;return{user:(0,Mt.PR)(e,n.params.userId)}}),{requestUser:Mt.HG})(_t);function Wt(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=(0,c.Z)(e);if(t){var o=(0,c.Z)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return(0,i.Z)(this,n)}}var Yt=function(e){(0,a.Z)(n,e);var t=Wt(n);function n(){return(0,r.Z)(this,n),t.apply(this,arguments)}return(0,o.Z)(n,[{key:"render",value:function(){var e=this.props.user;return l.createElement(s.rU,{className:"admin-user-item",to:"/admin/users/".concat(e.id)},l.createElement("h5",null,e.name),l.createElement("p",null,e.email),l.createElement("p",null,e.createdAt),l.createElement("p",null,e.Organizations.map((function(e){return l.createElement(Xt,{key:e.id,organization:e})}))))}}]),n}(l.Component),Gt=l.createElement(s.rU,{to:"/admin/marketplace"},"Marketplace Libraries"),Vt=l.createElement(s.rU,{to:"/admin/builds"},"Builds"),qt=l.createElement("h1",null,"Users"),Ht=l.createElement("div",{className:"admin-users-header"},l.createElement("p",null,"Name"),l.createElement("p",null,"Email"),l.createElement("p",null,"Signup Date"),l.createElement("p",null,"Team(s)")),$t=function(e){(0,a.Z)(n,e);var t=Wt(n);function n(e){var o;return(0,r.Z)(this,n),o=t.call(this,e),(0,y.Z)((0,v.Z)(o),"handleChange",(function(e){e.preventDefault(),o.setState({value:e.target.value})})),(0,y.Z)((0,v.Z)(o),"handleQuery",(function(){var e=o.props.requestUsers,t=o.state.value;return t?e({query:t}):e()})),o.state={value:""},o.handleQuery=(0,jt.debounce)(o.handleQuery,200),o}return(0,o.Z)(n,[{key:"componentDidMount",value:function(){(0,this.props.requestUsers)()}},{key:"componentDidUpdate",value:function(e,t){var n=this.state.value;t.value!==n&&this.handleQuery()}},{key:"render",value:function(){var e=this.props.users,t=this.state.value;return l.createElement(O.Z,{className:"admin-users-page",title:"Users"},Gt," • ",Vt,l.createElement("section",{className:"users-header"},qt,l.createElement("input",{type:"text",onChange:this.handleChange,value:t,placeholder:"Search by name or email",autoFocus:!0})),Ht,e.map((function(e){return l.createElement(Yt,{key:e.id,user:e})})))}}]),n}(l.Component);const Kt=(0,g.$j)((function(e){return{users:(0,ne.Rf)(e)}}),{requestUsers:ne.D7})($t);var Qt=n(28481),Jt=n(30381),en=n.n(Jt),tn=n(63620),nn=n(68535),rn=n(3401),on=n(19057),an=n(7629),cn=[{label:"pending",value:"pending"},{label:"testing",value:"testing"},{label:"approved",value:"approved"},{label:"rejected",value:"rejected"},{label:"active",value:"active"},{label:"private",value:"private"},{label:"unlisted",value:"unlisted"},{label:"deprecated",value:"deprecated"}],ln="http://localhost:8083/component-marketplace-prod?".concat(""),sn=l.createElement(s.rU,{to:"/admin/users"},"Users"),un=l.createElement("span",null," • "),pn=l.createElement(s.rU,{to:"/admin/builds"},"Builds"),dn=l.createElement("h1",null,"Marketplace Libraries"),fn=l.createElement("p",null,"Author"),hn=l.createElement("p",null,"Public"),mn=l.createElement("p",null,"Needs Review"),vn=l.createElement("div",{className:"admin-page-table-loading"},l.createElement(w.Z,null)),yn=l.createElement(on.Z,{type:"check"}),gn=l.createElement(on.Z,{type:"lock"}),bn=l.createElement(on.Z,{type:"check"}),Zn=l.createElement("h3",null,"No Libraries Found"),En=l.createElement(s.rU,{to:"/admin/marketplace"},"← Marketplace Libraries"),An=l.createElement("span",null," • "),wn=l.createElement(s.rU,{to:"/admin/users"},"Users"),On=l.createElement("span",null," • "),Cn=l.createElement(s.rU,{to:"/admin/builds"},"Builds"),Pn=l.createElement("div",{className:"admin-page-table-header"},l.createElement("p",null,"Author"),l.createElement("p",null,"Email"),l.createElement("p",null,"Public"),l.createElement("p",null,"Listed")),xn=l.createElement("div",{className:"admin-page-table-loading"},l.createElement(w.Z,null)),kn=l.createElement("p",null,"Version"),Rn=l.createElement("p",null,"Status"),Sn=l.createElement("p",null,"Active"),jn=l.createElement("p",null,"Needs Review"),Mn=l.createElement("p",null,"Submitted"),Bn=l.createElement("span",null),Dn=l.createElement("div",{className:"admin-page-table-loading"},l.createElement(w.Z,null));function Nn(e){var t=e.match.params,n=t.libraryName,r=t.libraryAuthor;r&&(n="".concat(r,"/").concat(n));var o=(0,g.I0)(),a=(0,g.v9)(an.Qx),i=a.data.find((function(e){return e.name===n}));function c(e){var t=i.id,n=e.target.name;o((0,an.tl)(t,(0,y.Z)({},n,!i[n])))}return(0,l.useEffect)((function(){i||o((0,an.ob)(n))}),[]),l.createElement(O.Z,{className:"admin-page",title:n},En,An,wn,On,Cn,l.createElement("section",{className:"admin-page-header"},null!=i&&i.logo?l.createElement("img",{height:"32",src:null==i?void 0:i.logo,alt:"library logo",style:{marginRight:16}}):null,l.createElement("h1",null,n),null!=i&&i.public&&null!=i&&i.listed?l.createElement(rn.Z,{style:{marginLeft:16}},l.createElement(rn.Z.Content,null,(0,nn.p)((null==i?void 0:i.installs)||0)," installs")):null),l.createElement("section",{className:"admin-page-table"},Pn,"ready"===a.status&&i?l.createElement("div",{className:"admin-page-table-item"},l.createElement("span",null,i.User.name),l.createElement("span",null,i.User.email),l.createElement("span",null,l.createElement("input",{type:"checkbox",name:"public",checked:i.public,onChange:c})),l.createElement("span",null,l.createElement("input",{type:"checkbox",name:"listed",checked:i.listed,onChange:c}))):xn),l.createElement("section",{className:"admin-page-table"},l.createElement("div",{className:"admin-page-table-header"},kn,null!=i&&i.public?l.createElement(l.Fragment,null,Rn,Sn,jn):null,Mn,Bn),"ready"===a.status&&i?i.Versions.map((function(e){var t=i.id,r=e.id;function a(n){var a=n.target.name;o((0,an.J9)(t,r,(0,y.Z)({},a,!e[a])))}var c="".concat(ln,"/").concat(n,"/").concat(e.version,".tar");return l.createElement("div",{key:e.id,className:"admin-page-table-item"},l.createElement("span",null,l.createElement("strong",null,e.version)),null!=i&&i.public?l.createElement(l.Fragment,null,l.createElement("span",null,l.createElement(tn.UB,{menu:cn,onSelect:function(e){o((0,an.J9)(t,r,{status:e}))},rowHeight:32},l.createElement(rn.Z,{className:me()("status","status-".concat(e.status))},l.createElement(rn.Z.Content,null,e.status)))),l.createElement("span",null,l.createElement("input",{type:"checkbox",checked:e.active,name:"active",onChange:a})),l.createElement("span",null,l.createElement("input",{type:"checkbox",checked:e.submitted,name:"submitted",onChange:a}))):null,l.createElement("span",{title:en()(e.createdAt).format("LLL")},en()(e.createdAt).fromNow()),l.createElement("span",null,l.createElement(on.h,{type:"download",href:c})))})):Dn))}var Tn=n(69664),In=n(89254);function Ln(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=(0,c.Z)(e);if(t){var o=(0,c.Z)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return(0,i.Z)(this,n)}}var Xn=l.createElement(w.Z,{small:!0}),Un=function(e){(0,a.Z)(n,e);var t=Ln(n);function n(){var e;(0,r.Z)(this,n);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return e=t.call.apply(t,[this].concat(a)),(0,y.Z)((0,v.Z)(e),"state",{restarting:!1}),(0,y.Z)((0,v.Z)(e),"handleRestart",(0,J.Z)(Q().mark((function t(){var n,r,o;return Q().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.props,r=n.build,o=n.onRestart,e.setState({restarting:!0}),t.prev=2,t.next=5,o(r.id);case 5:t.next=9;break;case 7:t.prev=7,t.t0=t.catch(2);case 9:e.setState({restarting:!1});case 10:case"end":return t.stop()}}),t,null,[[2,7]])})))),e}return(0,o.Z)(n,[{key:"render",value:function(){var e,t=this.props.build,n=this.state.restarting;return l.createElement("div",{className:"admin-user-item"},l.createElement("h5",null,l.createElement(s.rU,{to:"/apps/".concat(t.AppId)},null===(e=t.App)||void 0===e?void 0:e.name)),l.createElement("p",null,t.target),l.createElement("p",null,t.version," (",t.versionCode,")"),l.createElement("p",null,(0,Tn.K8)(t.updatedAt)),l.createElement("p",{className:"admin-build-status-wrapper"},l.createElement("span",{className:me()("admin-build-status","admin-build-".concat(t.status))},t.status),"failed"===t.status&&l.createElement("a",{className:"deemphasize",onClick:this.handleRestart},"Restart"),n&&Xn))}}]),n}(l.Component),zn=l.createElement(A.Z,{greedy:!0},l.createElement(w.Z,{large:!0})),_n=l.createElement("p",null,l.createElement(s.rU,{to:"/admin/users"},"← Back to Users")),Fn=l.createElement("h1",null,"Builds"),Wn=function(e){(0,a.Z)(n,e);var t=Ln(n);function n(){return(0,r.Z)(this,n),t.apply(this,arguments)}return(0,o.Z)(n,[{key:"componentDidMount",value:function(){(0,this.props.requestBuilds)()}},{key:"render",value:function(){var e=this.props,t=e.builds,n=e.restartBuild;return 0===t.length?zn:l.createElement(O.Z,{className:"admin-users-page",title:"Builds"},_n,Fn,l.createElement("div",null,t.map((function(e){return l.createElement(Un,{key:e.id,build:e,onRestart:n})}))))}}]),n}(l.Component);const Yn=(0,g.$j)((function(e){return{builds:(0,In.BY)(e)}}),{requestBuilds:In.kQ,restartBuild:In.fJ})(Wn);n(7561);var Gn=l.createElement(St,null),Vn=l.createElement(Ct,null),qn=l.createElement(yt,null),Hn=l.createElement(u.AW,{exact:!0,path:"/login",component:Ae}),$n=l.createElement(u.AW,{exact:!0,path:"/signup/payment",component:function(){return nt}}),Kn=l.createElement(u.rs,null,l.createElement(u.AW,{exact:!0,path:"/signup/terms",component:ft}),l.createElement(u.AW,{path:"/apps/:appId/:tabName",component:m.Z}),l.createElement(u.AW,null,l.createElement(l.Fragment,null,l.createElement(W.L,null)))),Qn=l.createElement(u.AW,{exact:!0,path:"/forgot-password",component:je}),Jn=l.createElement(u.rs,null,l.createElement(u.AW,{path:"/accept-invite/terms",component:ft})),er=l.createElement(u.AW,{exact:!0,path:"/recover-password",component:Fe}),tr=l.createElement(W.Z,null,l.createElement(u.rs,null,l.createElement(u.AW,{path:"/apps/:appId/:tabName",component:m.Z}),l.createElement(u.AW,null,l.createElement(l.Fragment,null,l.createElement(W.L,null))))),nr=l.createElement(u.AW,{exact:!0,path:"/",component:x}),rr=l.createElement(ct.Z,null,l.createElement(u.rs,null,l.createElement(u.AW,{exact:!0,path:"/settings/account",component:ct.m}))),or=l.createElement(G.Z,null),ar=l.createElement(x,null,l.createElement($,null)),ir=l.createElement(u.AW,{exact:!0,path:"/apps/:appId/settings",component:ct.Z}),cr=l.createElement(u.AW,{exact:!0,path:"/admin/users",component:Kt}),lr=l.createElement(u.AW,{exact:!0,path:"/admin/users/:userId",component:Ft}),sr=l.createElement(u.AW,{exact:!0,path:"/admin/marketplace",component:function(){var e,t=(0,g.I0)(),n=(0,g.v9)(an.Qx),r=(0,l.useState)(""),o=(0,Qt.Z)(r,2),a=o[0],i=o[1];(0,l.useEffect)((function(){t((0,an.tU)())}),[]);var c=(0,l.useCallback)((0,jt.debounce)((function(e){return t((0,an.tU)(e))}),200),[]);return l.createElement(O.Z,{className:"admin-page",title:"Marketplace Libraries"},sn,un,pn,l.createElement("section",{className:"admin-page-header"},dn,l.createElement("div",{style:{marginLeft:"auto"}},l.createElement("input",{type:"text",onChange:function(e){i(e.target.value),c(e.target.value)},value:a,placeholder:"Search by name or author...",autoFocus:!0}))),l.createElement("div",{className:"admin-page-table"},l.createElement("div",{className:"admin-page-table-header"},l.createElement("p",{style:{flex:2}},"Display Name"),fn,l.createElement("p",{style:{flex:2}},"Latest Version"),hn,mn,l.createElement("p",{style:{flex:2}},"Updated")),"ready"!==n.status?vn:(null===(e=n.data)||void 0===e?void 0:e.length)>0?n.data.map((function(e){var t,n,r,o,a,i=e.id,c=e.name,u="/admin/marketplace/".concat(c),p=null==e||null===(t=e.Versions)||void 0===t||null===(n=t[0])||void 0===n?void 0:n.version,d=null==e||null===(r=e.Versions)||void 0===r||null===(o=r[0])||void 0===o?void 0:o.status,f=null==e||null===(a=e.Versions)||void 0===a?void 0:a.some((function(e){return e.submitted}));return l.createElement(s.rU,{key:i,className:"admin-page-table-item",to:u},l.createElement("span",{style:{flex:2}},e.displayName),l.createElement("span",null,e.author),l.createElement("span",{style:{flex:2}},l.createElement(rn.Z,{className:me()("status",(0,y.Z)({},"status-".concat(d),null==e?void 0:e.public))},l.createElement(rn.Z.Content,null,null!=e&&e.public?"".concat(d,"@").concat(p):p))),l.createElement("span",null,e.public?yn:gn),l.createElement("span",null,f?bn:null),l.createElement("span",{style:{flex:2}},en()(e.updatedAt).fromNow()))})):l.createElement("div",{className:"admin-page-table-error"},Zn,l.createElement("p",null,'for "',a,'"'))))}}),ur=l.createElement(u.AW,{exact:!0,path:"/admin/marketplace/:libraryName",component:Nn}),pr=l.createElement(u.AW,{exact:!0,path:"/admin/marketplace/:libraryAuthor/:libraryName",component:Nn}),dr=l.createElement(u.AW,{exact:!0,path:"/admin/builds",component:Yn}),fr=l.createElement(u.AW,{path:"/apps/:appId",component:h.Z}),hr=function(e){(0,a.Z)(h,e);var t,n,p=(t=h,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=(0,c.Z)(t);if(n){var o=(0,c.Z)(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return(0,i.Z)(this,e)});function h(){return(0,r.Z)(this,h),p.apply(this,arguments)}return(0,o.Z)(h,[{key:"render",value:function(){return this.renderChildren()}},{key:"renderChildren",value:function(){return l.createElement(d(),{title:"Бокс 1"},l.createElement(s.VK,{history:f.Z},Gn,Vn,qn,l.createElement(u.rs,null,Hn,$n,l.createElement(u.AW,{path:"/signup",render:function(e){return l.createElement($e,e,Kn)}}),Qn,l.createElement(u.AW,{path:"/accept-invite",render:function(e){return l.createElement($e,e,Jn)}}),er,l.createElement(u.AW,{render:function(){return l.createElement("div",{className:"app"},tr,l.createElement(Y,null,l.createElement(u.rs,null,nr,l.createElement(u.AW,{path:"/settings",render:function(){return rr}}),l.createElement(u.AW,{exact:!0,path:"/new",render:function(){return l.createElement(x,{modalProps:{className:"new-app-modal"}},or)}}),l.createElement(u.AW,{exact:!0,path:"/delete/:appId",render:function(){return ar}}),l.createElement(u.AW,{exact:!0,path:"/apps/:appId",render:function(e){var t=e.match;return l.createElement(u.l_,{to:"/apps/".concat(t.params.appId,"/screens"),replace:!0})}}),ir,cr,lr,sr,ur,pr,dr,fr)))}}))))}}]),h}(l.Component)},16093:(e,t,n)=>{"use strict";n.d(t,{Z:()=>u});var r=n(6610),o=n(5991),a=n(10379),i=n(46070),c=n(77608),l=n(67294);var s=l.createElement("div",{className:"auth-page-logo"}),u=function(e){(0,a.Z)(u,e);var t,n,l=(t=u,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=(0,c.Z)(t);if(n){var o=(0,c.Z)(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return(0,i.Z)(this,e)});function u(){return(0,r.Z)(this,u),l.apply(this,arguments)}return(0,o.Z)(u,[{key:"render",value:function(){return s}}]),u}(l.Component)},15645:(e,t,n)=>{"use strict";n.d(t,{G:()=>Z,Z:()=>C});var r=n(6610),o=n(5991),a=n(63349),i=n(10379),c=n(46070),l=n(77608),s=n(96156),u=n(67294),p=n(5513),d=n(6455),f=n(13705),h=n(80129),m=n.n(h),v=n(26828),y=n(33941),g=n(27650),b=n(16093);var Z=function(e){var t={};return e.email?e.email.match(/^.+@([\w\-]+\.)+\w{2,}$/)||(t.email="Please enter a valid email address"):t.email="Email is required",e.name||(t.name="Name is required"),(!e.password||e.password.length<8)&&(t.password="Password must be at least 8 characters"),e.terms||(t.terms="You must accept the Terms of Use"),t},E=u.createElement(b.Z,null),A=u.createElement("h1",null,"Sign Up For Free!"),w=u.createElement(d.Z,{name:"name",placeholder:"Elon Musk",type:"text",component:y.Z,label:"Full Name",autoComplete:"name"}),O=function(e){(0,i.Z)(h,e);var t,n,f=(t=h,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=(0,l.Z)(t);if(n){var o=(0,l.Z)(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return(0,c.Z)(this,e)});function h(){var e;(0,r.Z)(this,h);for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return e=f.call.apply(f,[this].concat(n)),(0,s.Z)((0,a.Z)(e),"getTermsURL",(function(){var e=window.location,t=e.pathname,n=e.search,r=(t=t.replace(/\/$/,"")).includes("/terms")?"":"/terms";return"".concat(t).concat(r).concat(n)})),e}return(0,o.Z)(h,[{key:"render",value:function(){var e=this.props,t=e.handleSubmit,n=e.submitFailed,r=e.error,o=e.isInvite,a=e.submitting,i=e.redirect,c=m().stringify({redirect:i},{addQueryPrefix:!0});return u.createElement("form",{onSubmit:t,className:"auth-form"},E,A,u.createElement(d.Z,{autoFocus:!o,disabled:o,name:"email",placeholder:"elon@spacex.com",type:"email",label:"Email Address",component:y.Z,autoComplete:"email"}),u.createElement(d.Z,{autoFocus:o,name:"password",placeholder:"••••••••",type:"password",label:"Password",component:y.Z,autoComplete:"new-password"}),w,u.createElement(d.Z,{yellow:!0,name:"terms",component:g.Z,label:u.createElement("span",null,"I have read & agree to ",u.createElement(p.rU,{to:this.getTermsURL()},"Terms of Use")),autoComplete:"off"}),u.createElement("div",{className:"auth-form-submission-row"},u.createElement(v.Z,{large:!0,yellow:!0,loading:a},"Let’s Do This!")),r&&n&&u.createElement("div",{className:"auth-form-error"},r),u.createElement("div",{className:"auth-form-link"},"Already have an account? ",u.createElement(p.rU,{to:"/login".concat(c),className:"link-button"},"Login")))}}]),h}(u.Component);const C=(0,f.Z)({form:"signupForm",validate:Z})(O)},50930:(e,t,n)=>{"use strict";n.d(t,{Z:()=>ue});var r=n(6610),o=n(5991),a=n(10379),i=n(46070),c=n(77608),l=n(67294),s=n(26353),u=n(94184),p=n.n(u),d=n(37703),f=n(82092);n(32467),(0,d.$j)((function(e){return{activeTab:(0,f.Pk)(e)}}),{setActiveAddTab:f.VL})((function(e){var t=e.activeTab,n=e.extraProps,r=e.tabs;(0,l.useEffect)((function(){var n=e.setActiveAddTab;return!t&&r.length&&n(r[0].id),function(){return n("component")}}),[]);var o=r.find((function(e){return e.id===t}));return l.createElement(l.Fragment,null,l.createElement("div",{className:"editor-add-panel-tabs"},r.map((function(n){var r=n.id,o=n.title;return l.createElement("div",{key:r,className:p()("editor-add-panel-tab",{"editor-add-panel-tab-active":t===r}),onClick:function(){return function(t){return(0,e.setActiveAddTab)(t)}(r)}},o)}))),o?l.createElement(o.component,n):null)}));var h=n(87757),m=n.n(h),v=n(90484),y=n(92137),g=n(81253),b=n(63349),Z=n(96156),E=n(90955),A=n(96486),w=n(24812),O=n(82700),C=n(69425),P=n(97814),x=n(3227),k=n(8808),R=n(42271),S=(n(85047),n(84975)),j=n(52054),M=n(85061),B=n(28481),D=(n(45697),n(57317)),N=n(22122),T=n(93379),I=n.n(T),L=n(98931);I()(L.Z,{insert:"head",singleton:!1}),L.Z.locals;const X=function(e){var t=e.items,n=e.emptyMessage,r=e.className,o=e.renderItem,a=e.isSearching;return 0===t.length?l.createElement("div",{className:"editor-add-no-results"},n):t.map((function(e){var n=e.title,i=e.options,c=e.callout;return n?l.createElement("div",{key:n,className:"editor-add-section"},l.createElement("div",{className:"section-header-content"},l.createElement("h2",null,n),c&&function(e){var n=e.callout;return a&&t.length>0?null:l.createElement(j.Z,n)}(e)),(null==i?void 0:i.length)>0?i.map((function(e){var t=e.children,n=e.label,a={title:n,options:t,renderItem:o,emptyCallout:null==e?void 0:e.emptyCallout};return l.createElement(S.ZP,(0,N.Z)({key:n,className:p()("editor-add-panel-accordion",r)},a))})):null):l.createElement(S.ZP,{key:e.label,className:p()("editor-add-panel-accordion",r),title:e.label,options:e.children,renderItem:o})}))};function U(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function z(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?U(Object(n),!0).forEach((function(t){(0,Z.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):U(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function _(e,t){return t=t.toLowerCase(),e.map((function(e){var n=e.children,r=e.options;return z(z({},e),{},r?{options:_(r,t)}:{children:null==n?void 0:n.filter((function(e){return e.label.toLowerCase().includes(t)}))})})).filter((function(e){var t,n,r=e.options;return r?(null==r||null===(n=r.filter((function(e){var t;return(null==e||null===(t=e.children)||void 0===t?void 0:t.length)>0})))||void 0===n?void 0:n.length)>0:(null==e||null===(t=e.children)||void 0===t?void 0:t.length)>0}))}var F=l.createElement("i",{className:"material-icons"},"search"),W=function(e){var t=e.defaultOpen,n=e.options,r=e.searchPlaceholder,o=e.emptyMessage,a=e.renderItem,i=(e.className,e.sections),c=(0,l.useState)(""),s=(0,B.Z)(c,2),u=s[0],p=s[1],d=[].concat((0,M.Z)(n),(0,M.Z)(i)),f=u?_(d,u):d;return l.createElement(D.Z.Group,{defaultOpen:t,openAll:!!u},l.createElement("div",{className:"editor-add-panel-search"},F,l.createElement("input",{placeholder:r,value:u,onChange:function(e){return p(e.target.value)},autoFocus:!0})),l.createElement(X,{items:f,emptyMessage:o,renderItem:a,isSearching:!!u}))};W.defaultProps={searchPlaceholder:"Search...",sections:[]};const Y=l.memo(W);n.p;var G=["id","label","value","icon"];function V(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return q(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?q(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,c=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return i=e.done,e},e:function(e){c=!0,a=e},f:function(){try{i||null==n.return||n.return()}finally{if(c)throw a}}}}function q(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function H(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function $(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?H(Object(n),!0).forEach((function(t){(0,Z.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):H(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var K={rectangle:{icon:"section",label:"Прямоугольник",value:{type:E.Ou,options:O.ce[E.Ou]}},ellipse:{icon:"ellipse",label:"Круг",value:{type:E.E2,options:O.ce[E.E2]}},image:{icon:"image",label:"Трассировка изображения",value:{type:E.k4,options:O.ce[E.k4]}},imageUpload:{icon:"image-upload",label:"Image Picker",value:{type:E.Pk,options:O.ce[E.Pk]}},vector:{icon:"pen",label:"Вектор",value:E.X3}},Q=function(e,t){return{$ref:{library:e,component:t}}};function J(e){if(null!=e&&e.options){var t=e.options,n=t.libraryName,r=t.libraryVersion,o=t.componentName;if(!n)return null;var a=(0,w.NC)(n,r,o);return{backgroundImage:"url(".concat(a,")")}}}var ee=function(e,t){var n=(0,w.u)(e);return t.map((function(e){return null!=e&&e.$ref?function(e,t){var n,r=t.find((function(t){return t.library===e.library||t.label===e.library}));if(!r)return null;var o=r.children.find((function(t){return t.name===e.component||t.label===e.component}));if(null!=o&&null!==(n=o.value)&&void 0!==n&&n.options){var a=o.value.options,i=a.libraryName,c=a.libraryVersion,l=a.componentName;return $($({},o),{},{id:"".concat(i).concat(c).concat(l)})}return o}(e.$ref,n):e})).filter(Boolean)},te=[{title:"Популярные",components:[K.ellipse,K.rectangle,K.vector]},{title:"Простая геометрия",components:[]}],ne=function(e){(0,a.Z)(u,e);var t,n,s=(t=u,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=(0,c.Z)(t);if(n){var o=(0,c.Z)(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return(0,i.Z)(this,e)});function u(){var e;(0,r.Z)(this,u);for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return e=s.call.apply(s,[this].concat(n)),(0,Z.Z)((0,b.Z)(e),"renderItem",(function(t){var n=t.id,r=t.label,o=t.value,a=t.icon;return(0,g.Z)(t,G),l.createElement(S.Q1,{key:n||r,name:r,iconClassName:a&&"editor-add-component-icon-".concat(a),iconStyles:J(o),onMouseDown:function(t){e.handleSelect(o,[t.clientX,t.clientY])}})})),(0,Z.Z)((0,b.Z)(e),"handleSelect",function(){var t=(0,y.Z)(m().mark((function t(n,r){var o,a;return m().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n){t.next=2;break}return t.abrupt("return");case 2:o=e.props.setTool,"object"===(0,v.Z)(n)?(a=n.options,n=n.type):a={},o(n,a,r);case 5:case"end":return t.stop()}}),t)})));return function(e,n){return t.apply(this,arguments)}}()),(0,Z.Z)((0,b.Z)(e),"getMarketplaceLibraries",(function(e){var t,n=null===(t=window)||void 0===t?void 0:t.protonLibraries,r=[];if(n){var o,a=V(e);try{for(a.s();!(o=a.n()).done;){var i,c,l=o.value;if(l){var s=l.name,u=l.version,p=null==n||null===(i=n[s])||void 0===i||null===(c=i[u])||void 0===c?void 0:c.config;if(p){var d,f=p.name,h=V(p.components);try{for(h.s();!(d=h.n()).done;){var m=d.value;if(m){var v=m.displayName,y=Q(f,v);r.push(y)}}}catch(e){h.e(e)}finally{h.f()}}}}}catch(e){a.e(e)}finally{a.f()}}return r})),(0,Z.Z)((0,b.Z)(e),"getDevelopmentLibraries",(function(){var e,t=(0,C.tZ)(),n=null===(e=window)||void 0===e?void 0:e.protonLibraries,r=[];return t.length>0&&t.forEach((function(e){var t,o=null==n?void 0:n[e];if(null!=o&&null!==(t=o.dev)&&void 0!==t&&t.config){var a=o.dev.config,i=a.name;a.components.map((function(e){var t=e.displayName,n=Q(i,t);return r.push(n)}))}})),r})),(0,Z.Z)((0,b.Z)(e),"getMarketplaceOptions",(function(){var t=e.props,n=t.app,r=t.installedLibraries,o=t.privateLibraries,a=t.adminLibraries,i=e.getDevelopmentLibraries(),c=[];if(!(Array.isArray(r)&&r.length||Array.isArray(o)&&o.length||Array.isArray(a)&&a.length||Array.isArray(i)&&i.length))return c;var s=e.getMarketplaceLibraries(r),u="Installed";if(c.find((function(e){return e.label===u}))||c.push({label:u,children:[]}),s.length>0){var p=(0,A.findIndex)(c,{label:u});(null==c?void 0:c[p]).children=ee(n,s)}var d=e.getMarketplaceLibraries(o);if(!c.find((function(e){return"Private"===e.label}))){var f={title:"No Private Components",body:"Develop your own private component or \nadd one to the marketplace!",color:"grey",borderStyle:"dashed",button:{icon:"code",children:"Create Component",to:"https://developers.adalo.com",target:"_blank",rel:"noreferrer noopener",outlined:!0}},h=l.createElement(j.Z,f);c.push({label:"Private",children:[],emptyCallout:h})}if(d.length>0){var m=(0,A.findIndex)(c,{label:"Private"});(null==c?void 0:c[m]).children=ee(n,d)}var v="Under Review",y=e.getMarketplaceLibraries(a);if(y.length>0){c.find((function(e){return e.label===v}))||c.push({label:v,children:[]});var g=(0,A.findIndex)(c,{label:v});(null==c?void 0:c[g]).children=ee(n,y)}var b="Development";if((null==i?void 0:i.length)>0){c.find((function(e){return e.label===b}))||c.push({label:b,children:[]});var Z=(0,A.findIndex)(c,{label:b});(null==c?void 0:c[Z]).children=ee(n,i)}return c})),e}return(0,o.Z)(u,[{key:"render",value:function(){var e=this.props,t=e.appId,n=e.options;return this.getMarketplaceOptions().length,"/apps/".concat(t,"/marketplace"),l.createElement(Y,{defaultOpen:["Популярные"],searchPlaceholder:"Поиск объектов...",emptyMessage:l.createElement(l.Fragment,null,"Пусто"),renderItem:this.renderItem,options:n,sections:[]})}}]),u}(l.Component);const re=(0,d.$j)((function(e,t){var n=t.appId,r=(0,x.Mq)(e,n),o=(0,k.ts)(e),a=(0,R.fL)(e),i=(0,R.M2)(e),c=(0,R.JQ)(e);return{app:r,options:te.map((function(e){return{label:e.title,children:ee(r,e.components)}})),user:o,installedLibraries:a,privateLibraries:i,adminLibraries:c}}),{setTool:P.Cc})(ne);var oe=n(75645),ae=n(39661),ie=n(85948);function ce(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var le=function(e){(0,a.Z)(u,e);var t,n,s=(t=u,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=(0,c.Z)(t);if(n){var o=(0,c.Z)(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return(0,i.Z)(this,e)});function u(){var e;(0,r.Z)(this,u);for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return e=s.call.apply(s,[this].concat(n)),(0,Z.Z)((0,b.Z)(e),"handleSelect",function(){var t=(0,y.Z)(m().mark((function t(n){var r,o,a;return m().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.props,o=r.showModal,a=r.setActiveAddTab,t.prev=1,t.next=4,o(ae.fk,{zoom:!0,template:n});case 4:a("component"),t.next=9;break;case 7:t.prev=7,t.t0=t.catch(1);case 9:case"end":return t.stop()}}),t,null,[[1,7]])})));return function(e){return t.apply(this,arguments)}}()),(0,Z.Z)((0,b.Z)(e),"renderItem",(function(t){var n=t.id,r=t.name,o=t.thumbnail,a=t.iconClassName,i=e.props.platform,c={};return o&&(c.backgroundImage='url("'.concat((0,oe.L)(o),'")')),l.createElement(S.Q1,{key:n,name:r,isMobileScreen:"mobile"===i,iconClassName:a,iconStyles:c,onClick:function(){return e.handleSelect(n)}})})),e}return(0,o.Z)(u,[{key:"getOptions",value:function(){return this.props.categorizedTemplates.map((function(e){return{label:e.title,children:e.options.map((function(e){return function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ce(Object(n),!0).forEach((function(t){(0,Z.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ce(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({label:e.name},e)}))}}))}},{key:"componentDidMount",value:function(){var e=this.props;(0,e.ensureScreenTemplatesAreLoaded)(e.platform)}},{key:"render",value:function(){var e=this.props.platform;return l.createElement(Y,{key:"screen",isMobileScreen:"mobile"===e,className:p()("editor-add-screens-tab",{"editor-add-mobile-screens-tab":"mobile"===e,"editor-add-web-screens-tab":"web"===e}),defaultOpen:["Simple"],searchPlaceholder:"Search Screens...",emptyMessage:"No screens found",onSelect:this.handleSelect,options:this.getOptions(),renderItem:this.renderItem})}}]),u}(l.Component);(0,d.$j)((function(e,t){var n=t.appId,r=(0,x.L5)(e,n);return{platform:r,categorizedTemplates:(0,ie.lv)(e,r)}}),{showModal:ae.K4,ensureScreenTemplatesAreLoaded:ie.A$,setActiveAddTab:f.VL})(le),n(8976);var se=function(e){(0,a.Z)(u,e);var t,n,s=(t=u,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=(0,c.Z)(t);if(n){var o=(0,c.Z)(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return(0,i.Z)(this,e)});function u(){return(0,r.Z)(this,u),s.apply(this,arguments)}return(0,o.Z)(u,[{key:"shouldComponentUpdate",value:function(e){return this.props.match.params.appId!==e.match.params.appId}},{key:"render",value:function(){var e=this.props.match.params.appId;return l.createElement(re,{appId:{appId:e}})}}]),u}(l.Component);const ue=(0,s.EN)(se)},56399:(e,t,n)=>{"use strict";n.d(t,{Z:()=>K});var r=n(6610),o=n(5991),a=n(10379),i=n(46070),c=n(77608),l=n(67294),s=n(26353),u=n(87757),p=n.n(u),d=n(92137),f=n(81253),h=n(63349),m=n(96156),v=n(37703),y=n(24812),g=n(61145),b=n(97814),Z=n(3227),E=n(8808),A=n(42271),w=(n(86179),n(84975)),O=n(85061),C=n(28481),P=(n(45697),n(57317)),x=n(22122),k=n(94184),R=n.n(k),S=n(52054),j=n(93379),M=n.n(j),B=n(67537);M()(B.Z,{insert:"head",singleton:!1}),B.Z.locals;const D=function(e){var t=e.items,n=e.emptyMessage,r=e.className,o=e.renderItem,a=e.isSearching;return 0===t.length?l.createElement("div",{className:"editor-add-no-results"},n):t.map((function(e){var n=e.title,i=e.options,c=e.callout;return n?l.createElement("div",{key:n,className:"editor-add-section"},l.createElement("div",{className:"section-header-content"},l.createElement("h2",null,n),c&&function(e){var n=e.callout;return a&&t.length>0?null:l.createElement(S.Z,n)}(e)),(null==i?void 0:i.length)>0?i.map((function(e){var t=e.children,n=e.label,a={title:n,options:t,renderItem:o,emptyCallout:null==e?void 0:e.emptyCallout};return l.createElement(w.ZP,(0,x.Z)({key:n,className:R()("editor-add-panel-accordion",r)},a))})):null):l.createElement(w.ZP,{key:e.label,className:R()("editor-add-panel-accordion",r),title:e.label,options:e.children,renderItem:o})}))};function N(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function T(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?N(Object(n),!0).forEach((function(t){(0,m.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):N(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function I(e,t){return t=t.toLowerCase(),e.map((function(e){var n=e.children,r=e.options;return T(T({},e),{},r?{options:I(r,t)}:{children:null==n?void 0:n.filter((function(e){return e.label.toLowerCase().includes(t)}))})})).filter((function(e){var t,n,r=e.options;return r?(null==r||null===(n=r.filter((function(e){var t;return(null==e||null===(t=e.children)||void 0===t?void 0:t.length)>0})))||void 0===n?void 0:n.length)>0:(null==e||null===(t=e.children)||void 0===t?void 0:t.length)>0}))}var L=l.createElement("i",{className:"material-icons"},"search"),X=function(e){var t=e.defaultOpen,n=e.options,r=e.searchPlaceholder,o=e.emptyMessage,a=e.renderItem,i=(e.className,e.sections),c=(0,l.useState)(""),s=(0,C.Z)(c,2),u=s[0],p=s[1],d=[].concat((0,O.Z)(n),(0,O.Z)(i)),f=u?I(d,u):d;return l.createElement(P.Z.Group,{defaultOpen:t,openAll:!!u},l.createElement("div",{className:"editor-add-panel-search"},L,l.createElement("input",{placeholder:r,value:u,onChange:function(e){return p(e.target.value)},autoFocus:!0})),l.createElement(D,{items:f,emptyMessage:o,renderItem:a,isSearching:!!u}))};X.defaultProps={searchPlaceholder:"Search...",sections:[]};const U=l.memo(X);var z=n(14718),_=["id","label","value","icon"];function F(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function W(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?F(Object(n),!0).forEach((function(t){(0,m.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):F(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Y(e){if(null!=e&&e.options){var t=e.options,n=t.libraryName,r=t.libraryVersion,o=t.componentName;if(!n)return null;var a=(0,y.NC)(n,r,o);return{backgroundImage:"url(".concat(a,")")}}}var G=function(e,t){var n=(0,y.u)(e);return t.map((function(e){return null!=e&&e.$ref?function(e,t){var n,r=t.find((function(t){return t.library===e.library||t.label===e.library}));if(!r)return null;var o=r.children.find((function(t){return t.name===e.component||t.label===e.component}));if(null!=o&&null!==(n=o.value)&&void 0!==n&&n.options){var a=o.value.options,i=a.libraryName,c=a.libraryVersion,l=a.componentName;return W(W({},o),{},{id:"".concat(i).concat(c).concat(l)})}return o}(e.$ref,n):e})).filter(Boolean)},V=z.reduce((function(e,t){return e[t.categoryString]||(e[t.categoryString]=[]),e[t.categoryString].push(t),e}),{}),q=function(e){(0,a.Z)(u,e);var t,n,s=(t=u,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=(0,c.Z)(t);if(n){var o=(0,c.Z)(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return(0,i.Z)(this,e)});function u(){var e;(0,r.Z)(this,u);for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return e=s.call.apply(s,[this].concat(n)),(0,m.Z)((0,h.Z)(e),"renderItem",(function(t){var n=t.id,r=t.label,o=t.value,a=t.icon,i=(0,f.Z)(t,_);return l.createElement(w.Q1,{key:n||r,name:r,iconClassName:a&&"editor-add-component-icon-".concat(a),iconStyles:Y(o),onMouseDown:function(t){e.handleSelect({width:96*i.width,height:96*i.height,inCaseShapes:i.inCaseShapes,lowerWidth:96*i.lowerWidth,lowerLength:96*i.lowerLength,outerRule:i.outerRule,depth:96*i.totalDepth})}})})),(0,m.Z)((0,h.Z)(e),"handleSelect",function(){var t=(0,d.Z)(p().mark((function t(n){var r,o,a,i;return p().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r=e.props,o=r.root,a=r.updateObject,i=W(W({},o),n),a(o.id,i,"box");case 3:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()),e}return(0,o.Z)(u,[{key:"render",value:function(){var e=this.props,t=(e.appId,e.options);return l.createElement(U,{defaultOpen:["Популярные"],searchPlaceholder:"Поиск объектов...",emptyMessage:l.createElement(l.Fragment,null,"Пусто"),renderItem:this.renderItem,options:t,sections:[]})}}]),u}(l.Component);const H=(0,v.$j)((function(e,t){var n=t.appId,r=(0,Z.Mq)(e,n),o=(0,E.ts)(e),a=(0,A.fL)(e),i=(0,A.M2)(e),c=(0,A.JQ)(e);return{app:r,root:(0,g.PP)(e),options:Object.keys(V).map((function(e){return{label:e,children:G(r,V[e])}})),user:o,installedLibraries:a,privateLibraries:i,adminLibraries:c}}),{setTool:b.Cc,updateObject:g.v4})(q);n(8976);var $=function(e){(0,a.Z)(u,e);var t,n,s=(t=u,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=(0,c.Z)(t);if(n){var o=(0,c.Z)(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return(0,i.Z)(this,e)});function u(){return(0,r.Z)(this,u),s.apply(this,arguments)}return(0,o.Z)(u,[{key:"shouldComponentUpdate",value:function(e){return this.props.match.params.appId!==e.match.params.appId}},{key:"render",value:function(){var e=this.props.match.params.appId;return l.createElement(H,{appId:{appId:e}})}}]),u}(l.Component);const K=(0,s.EN)($)},85047:(e,t,n)=>{"use strict";n.d(t,{Z:()=>B});var r=n(28481),o=n(6610),a=n(5991),i=n(63349),c=n(10379),l=n(46070),s=n(77608),u=n(96156),p=n(67294),d=n(26353),f=n(37703),h=n(5535),m=n(81129),v=n(43020),y=n(82700),g=n(61145),b=n(96766),Z=n(98151),E=n(3227),A=n(97814),w=(n(69501),n(90955)),O=n(59274),C=n(6789);function P(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function x(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?P(Object(n),!0).forEach((function(t){(0,u.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):P(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var k=Symbol("AddDraggableComponent$OPTIONS"),R=Math.pow(20,2);function S(e,t,n){return[e-=Math.floor(n.width/2),t-=Math.floor(n.height/2)]}function j(e,t,n){return n.options&&n.options[k]&&(n.options[k].xOffset&&(e+=n.options[k].xOffset),n.options[k].yOffset&&(t+=n.options[k].yOffset)),[e,t]}var M=function(e){(0,c.Z)(f,e);var t,n,d=(t=f,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=(0,s.Z)(t);if(n){var o=(0,s.Z)(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return(0,l.Z)(this,e)});function f(e){var t;(0,o.Z)(this,f),t=d.call(this,e),(0,u.Z)((0,i.Z)(t),"handleMouseUp",(function(e){var n=t.props.startPosition,o=(0,r.Z)(n,2),a=o[0],i=o[1];Math.pow(e.clientX-a,2)+Math.pow(e.clientY-i,2)<R||t.handleMouseDown(e)})),(0,u.Z)((0,i.Z)(t),"handleMouseDown",(function(e){var n=t.state,r=n.xSnapped,o=n.ySnapped,a=t.props,i=a.createObject,c=a.resetTool,l=a.resetSnaps,s=a.options,u=s.type,p=x(x(x({},s),y.ce[u]),{},{x:r,y:o}),d=4*(Math.sqrt(2)-1)/3,f=[],h=[],m=[];switch(p.type){case w.E2:var v=[new O.XX([-1,0],[0,d],[0,-d]),new O.XX([0,-1],[-d,0],[d,0]),new O.XX([1,0],[0,-d],[0,d]),new O.XX([0,1],[d,0],[-d,0])],g=new O.E9(p.x,p.y),b=new O.E9(p.width/2,p.height/2);m=new Array(4);for(var Z=0;Z<4;Z++){var E=v[Z];m[Z]=new O.XX(E._point.multiply(b).add(g),E._handleIn.multiply(b),E._handleOut.multiply(b))}var A=O.XV.create(m.map((function(e){var t=e.point,n=e.handleIn,r=e.handleOut;return new O.XX(t,n,r)})));A.setClosed(!0),A.setPosition(new O.E9(p.x+p.width/2,p.y+p.height/2)),A instanceof C.Op?f=A.children.map((function(e){return e.points})):h=A.points,p=x(x({},p),{},{compound:f,points:h,isClosed:!0});break;case w.Ou:var P=new C.Ae(p.x,p.y,p.width,p.height),k=new O.E9(p.borderRadius?[p.borderRadius,p.borderRadius]:[0,0]),R=P.getBottomLeft(!0),S=P.getTopLeft(!0),j=P.getTopRight(!0),M=P.getBottomRight(!0);if(!k||k.isZero())m=[new O.XX(R),new O.XX(S),new O.XX(j),new O.XX(M)];else{var B=(k=O.$u.min(new O.$u(p.borderRadius,p.borderRadius),P.getSize(!0).divide(2))).width,D=k.height,N=B*d,T=D*d;m=[new O.XX(R.add(B,0),null,[-N,0]),new O.XX(R.subtract(0,D),[0,T]),new O.XX(S.add(0,D),null,[0,-T]),new O.XX(S.add(B,0),[-N,0],null),new O.XX(j.subtract(B,0),null,[N,0]),new O.XX(j.add(0,D),[0,-T],null),new O.XX(M.subtract(0,D),null,[0,T]),new O.XX(M.subtract(B,0),[N,0])]}var I=O.XV.create(m.map((function(e){var t=e.point,n=e.handleIn,r=e.handleOut;return new O.XX(t,n,r)})));I.setClosed(!0),I.adjust(p.x,p.y),I instanceof C.Op?f=I.children.map((function(e){return e.points})):h=I.points,p=x(x({},p),{},{compound:f,points:h,isClosed:!0})}i(p),c(),l()})),(0,u.Z)((0,i.Z)(t),"handleMouseMove",(function(e){var n=t.props,o=n.zoom,a=n.options,i=(0,m.ty)([e.clientX,e.clientY],o),c=(0,r.Z)(i,2),l=S(c[0],c[1],x(x({},a),y.ce[a.type])),s=(0,r.Z)(l,2),u=j(s[0],s[1],t.props),p=(0,r.Z)(u,2),d=p[0],f=p[1],h=t.getBestParent(d,f),v=t.calculateSnappedPosition(d,f,h),g=(0,r.Z)(v,2),b=g[0],Z=g[1];t.setState({xSnapped:b,ySnapped:Z,mouseOver:!0,x:d,y:f})})),(0,u.Z)((0,i.Z)(t),"handleMouseLeave",(function(){t.setState({mouseOver:!1})})),(0,u.Z)((0,i.Z)(t),"getBestParent",(function(e,n){var r=t.state,o=r.x,a=r.y;o=e||o,a=n||a;var i=t.props,c=i.options,l=i.screens,s=x(x(x({},c),y.ce[c.type]),{},{x:o,y:a}),u=(0,h.A5)(s,l);return l.filter((function(e){return e.id===u}))[0]})),(0,u.Z)((0,i.Z)(t),"calculateGridSnapPosition",(function(e,n){var r=t.props,o=r.options,a=r.xGrid,i=r.yGrid,c=r.setXSnap,l=r.setYSnap,s=r.zoom,u=y.ce[o.type],p=u.width,d=u.height;if(!a||!i)return[e,n,p,d];var f=0,h=0,m={left:e,center:e+p/2,right:e+p},g={top:n,center:n+d/2,bottom:n+d},b=(0,v.qz)(a,m,s),Z=(0,v.qz)(i,g,s);if(b){var E=Object.keys(b)[0];f=b[E]-m[E],c(b[E])}else c(null);if(Z){var A=Object.keys(Z)[0];h=Z[A]-g[A],l(Z[A])}else l(null);return[Math.round(e+f),Math.round(n+h),p,d]})),(0,u.Z)((0,i.Z)(t),"calculateSnappedPosition",(function(e,n,r){return t.calculateGridSnapPosition(e,n)})),(0,u.Z)((0,i.Z)(t),"renderComponent",(function(){var e=t.props,n=e.zoom,o=e.options,a=e.branding,i=o.type,c=t.state,l=c.xSnapped,s=c.ySnapped,u=(0,m.bA)([l,s],n),d=(0,r.Z)(u,2),f=d[0],h=d[1],v=y.ce[i],g=v.width,Z=v.height,E=g,A=Z;g=(0,m.pF)(E,n),Z=(0,m.pF)(A,n);var w=x(x({},o),{},{width:E,height:A,x:0,y:0}),O=x(x({},n),{},{offset:[0,0]});return p.createElement("g",{transform:"translate(".concat(f,", ").concat(h,")"),opacity:.5},p.createElement(b.Z,{branding:a,object:w,zoom:O}),p.createElement("rect",{x:0,y:0,width:g,height:Z,stroke:"none",fill:"none"}))}));var n=e.startPosition?e.startPosition:[0,0],a=(0,m.ty)(n,e.zoom),c=(0,r.Z)(a,2),l=c[0],s=c[1],g=e.options.type,Z=S(l,s,y.ce[g]),E=(0,r.Z)(Z,2),A=j(E[0],E[1],e),P=(0,r.Z)(A,2),k=P[0],M=P[1];return t.state={x:k,y:M,mouseOver:!!e.startPosition,xSnapped:k,ySnapped:M},t}return(0,a.Z)(f,[{key:"render",value:function(){var e=this.state.mouseOver,t=window.innerWidth,n=window.innerHeight;return p.createElement("g",{className:"add-component-instance"},e?this.renderComponent():null,p.createElement("rect",{onMouseDown:this.handleMouseDown,onMouseUp:this.handleMouseUp,onMouseMove:this.handleMouseMove,onMouseLeave:this.handleMouseLeave,onMouseEnter:this.handleMouseMove,x:0,y:0,width:t,height:n,className:"add-component-backdrop"}))}}]),f}(p.Component);const B=(0,d.EN)((0,f.$j)((function(e,t){return t.match,t.options,{branding:(0,E.WS)(e,(0,g.i3)(e)),screens:(0,g.sr)(e),xGrid:(0,Z.L)(e),yGrid:(0,Z.WP)(e),startPosition:(0,A.nr)(e)}}),{createObject:g.nW,resetTool:A.bS,setXSnap:Z.xd,setYSnap:Z.mE,resetSnaps:Z.gL})(M))},3219:(e,t,n)=>{"use strict";n.d(t,{Z:()=>O});var r=n(6610),o=n(5991),a=n(63349),i=n(10379),c=n(46070),l=n(77608),s=n(96156),u=n(67294),p=n(37703),d=n(98605),f=n.n(d),h=n(96486),m=n(44127),v=n(81129),y=n(5535),g=n(61145),b=n(62012),Z=n(82092),E=n(80503);var A=function(e){(0,i.Z)(s,e);var t,n,a=(t=s,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=(0,l.Z)(t);if(n){var o=(0,l.Z)(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return(0,c.Z)(this,e)});function s(){return(0,r.Z)(this,s),a.apply(this,arguments)}return(0,o.Z)(s,[{key:"render",value:function(){var e=this.props,t=e.x,n=e.y,r=e.width,o=e.height,a={left:"".concat(t,"px"),top:"".concat(n,"px"),width:"".concat(r,"px"),height:"".concat(o,"px")};return u.createElement("div",{className:"marquee",style:a})}}]),s}(u.Component);var w=function(e){(0,i.Z)(d,e);var t,n,p=(t=d,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=(0,l.Z)(t);if(n){var o=(0,l.Z)(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return(0,c.Z)(this,e)});function d(e){var t;return(0,r.Z)(this,d),t=p.call(this,e),(0,s.Z)((0,a.Z)(t),"handleMouseDown",(function(e){var n=t.props,r=n.startDrag,o=n.setActiveTab,a=n.setSelection;e.ctrlKey||(r([e.clientX,e.clientY]),e.shiftKey||o(null),a([],e.shiftKey))})),(0,s.Z)((0,a.Z)(t),"handleMouseMove",(function(e){var n=t.props,r=n.marquee,o=n.drag;r&&(t.setMarqueeSelection(e.shiftKey),o([e.clientX,e.clientY]))})),(0,s.Z)((0,a.Z)(t),"handleMouseUp",(function(e){var n=t.props,r=n.marquee,o=n.endDrag;r&&o()})),(0,s.Z)((0,a.Z)(t),"setMarqueeSelection",(function(e){var n=t.props,r=n.marqueeSelection,o=n.marquee,a=n.selection,i=n.setSelection;o&&((0,m.GB)(r,a)||(0===r.length?i(null,e):i(r,e)))})),t.setMarqueeSelection=(0,h.throttle)(t.setMarqueeSelection,50,{leading:!1}),t}return(0,o.Z)(d,[{key:"render",value:function(){var e=this.props.marquee;return u.createElement("div",{className:"canvas-backdrop",onMouseDown:this.handleMouseDown},e&&u.createElement(A,e),e&&u.createElement(f(),{onMouseMove:this.handleMouseMove,onMouseUp:this.handleMouseUp}))}}]),d}(u.Component);const O=(0,p.$j)((function(e){return{marquee:(0,E.LJ)(e),selection:(0,b.Mf)(e),marqueeSelection:(0,y.pu)((0,g.vo)(e),(0,v.S2)((0,E.LJ)(e),(0,g.aB)(e)))}}),{setSelection:b.Z5,startDrag:E.f$,drag:E.oh,endDrag:E.Xs,setActiveTab:Z.r7})(w)},72982:(e,t,n)=>{"use strict";n.d(t,{Z:()=>h});var r=n(6610),o=n(5991),a=n(63349),i=n(10379),c=n(46070),l=n(77608),s=n(96156),u=n(67294),p=n(45697),d=n.n(p),f=n(71707);var h=function(e){(0,i.Z)(p,e);var t,n,u=(t=p,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=(0,l.Z)(t);if(n){var o=(0,l.Z)(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return(0,c.Z)(this,e)});function p(){var e;(0,r.Z)(this,p);for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return e=u.call.apply(u,[this].concat(n)),(0,s.Z)((0,a.Z)(e),"cancelEvent",(function(e){e.stopPropagation()})),(0,s.Z)((0,a.Z)(e),"handleSelect",(function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.props.onSelect;n(t.shiftKey,t.metaKey)})),(0,s.Z)((0,a.Z)(e),"isSelected",(function(){var t=e.props.id;return-1!==(0,e.context.getSelection)().indexOf(t)})),(0,s.Z)((0,a.Z)(e),"handleMouseDown",(function(t){var n=e.props.onPosition;e.handleSelect(t),n([t.clientX,t.clientY])})),(0,s.Z)((0,a.Z)(e),"handleDoubleClick",(function(t){e.context.editable&&(t.stopPropagation(),e.doubleClickHandler())})),e}return(0,o.Z)(p,[{key:"doubleClickHandler",value:function(){(0,this.props.onExpand)()}},{key:"getColor",value:function(e){var t=this.props.branding;return(0,f.ut)(e,t)}}]),p}(u.Component);(0,s.Z)(h,"contextTypes",{editable:d().bool,getSelection:d().func})},42281:(e,t,n)=>{"use strict";n.d(t,{Z:()=>v});var r=n(96156),o=n(81253),a=n(6610),i=n(5991),c=n(10379),l=n(46070),s=n(77608),u=n(90955),p=n(72982),d=n(81129),f=["borderColor","borderPosition"];function h(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function m(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?h(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):h(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var v=function(e){(0,c.Z)(p,e);var t,n,r=(t=p,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=(0,s.Z)(t);if(n){var o=(0,s.Z)(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return(0,l.Z)(this,e)});function p(){return(0,a.Z)(this,p),r.apply(this,arguments)}return(0,i.Z)(p,[{key:"getBorderWidth",value:function(){var e=this.props,t=(e.borderWidth,e.zoom);return(0,d.pF)(1,t)}},{key:"getBorderProps",value:function(){var e=this.props,t=e.borderColor,n=(e.borderPosition,(0,o.Z)(e,f));return n.borderStyle&&n.borderStyle!==u.$u.NONE?{strokeWidth:0,stroke:this.getColor(t)}:{strokeWidth:0,stroke:"transparent"}}},{key:"getBackgroundColor",value:function(){return this.props.backgroundStyle===u.Nu.COLOR?this.getColor(this.props.backgroundColor):"#ddd"}},{key:"getShadowProps",value:function(){var e=this.props,t=e.xScaled,n=e.yScaled,r=e.widthScaled,o=e.heightScaled,a=e.shadow,i=e.zoom,c=this.getBorderProps();return{shadow:a=m(m({},a),{},{color:this.getColor(a.color)}),zoom:i,border:c,x:t,y:n,width:r,height:o}}}]),p}(p.Z)},24821:(e,t,n)=>{"use strict";n.d(t,{Z:()=>Y});var r=n(6610),o=n(5991),a=n(63349),i=n(10379),c=n(46070),l=n(77608),s=n(96156),u=n(67294),p=n(26353),d=n(37703),f=n(44127),h=n(90955),m=n(43020),v=n(61145),y=n(98151),g=n(62012),b=n(89926),Z=n(62088),E=n(28481),A=n(98605),w=n.n(A),O=n(94184),C=n.n(O),P=n(81129),x=n(13716),k=n(24812),R=n(3227);var S=function(e){(0,i.Z)(s,e);var t,n,a=(t=s,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=(0,l.Z)(t);if(n){var o=(0,l.Z)(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return(0,c.Z)(this,e)});function s(){return(0,r.Z)(this,s),a.apply(this,arguments)}return(0,o.Z)(s,[{key:"render",value:function(){var e=this.props,t=e.invisible,n=e.cursor,r=e.x,o=e.y,a=e.onMouseDown,i=e.height,c=e.width,l=e.position;return u.createElement("g",{transform:"translate(".concat("top"===l||"bottom"===l?0:r-4,", ").concat("left"===l||"right"===l?0:o-4,")"),onMouseDown:a},t?null:u.createElement("rect",{className:"resize-handle",width:8,height:8,x:c/2-4,y:i/2-4}),u.createElement("rect",{className:"resize-click-target",width:c,height:i,style:{cursor:"".concat(n,"-resize")}}))}}]),s}(u.Component);(0,s.Z)(S,"defaultProps",{x:0,y:0,height:8,width:8});var j=n(12893);var M=u.createElement("line",{className:"depth-line",x1:-30,y1:0,x2:-30,y2:10}),B=function(e){(0,i.Z)(s,e);var t,n,a=(t=s,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=(0,l.Z)(t);if(n){var o=(0,l.Z)(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return(0,c.Z)(this,e)});function s(){return(0,r.Z)(this,s),a.apply(this,arguments)}return(0,o.Z)(s,[{key:"render",value:function(){var e=this.props,t=e.width,n=e.height,r=e.depth,o=e.widthScaled,a=e.heightScaled;return e.position,u.createElement("g",{className:"rule-sizes"},M,u.createElement("text",{x:-22,y:5,textAnchor:"left"},(0,j.Q)(r),"mm"),u.createElement("text",{x:o/2,y:a+12,dominantBaseline:"middle",textAnchor:"middle"},(0,j.Q)(n),"mm x ",(0,j.Q)(t),"mm"))}}]),s}(u.Component);function D(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function N(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?D(Object(n),!0).forEach((function(t){(0,s.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):D(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}(0,s.Z)(B,"defaultProps",{x:0,y:0,height:0,width:0});var T="LEFT",I="RIGHT",L="TOP",X="BOTTOM",U=function(e){(0,i.Z)(d,e);var t,n,p=(t=d,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=(0,l.Z)(t);if(n){var o=(0,l.Z)(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return(0,c.Z)(this,e)});function d(){var e;(0,r.Z)(this,d);for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return e=p.call.apply(p,[this].concat(n)),(0,s.Z)((0,a.Z)(e),"state",{activeResize:null,resizeStartPoint:null,prevState:null}),(0,s.Z)((0,a.Z)(e),"resize",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return function(t){t.stopPropagation();var r=e.props.object,o={},a={x:r.x,y:r.y,width:r.width,height:r.height},i=[t.clientX,t.clientY];n.forEach((function(e){return o[e]=!0})),e.setState({activeResize:o,prevState:a,resizeStartPoint:i})}})),(0,s.Z)((0,a.Z)(e),"handleMouseMove",(function(t){var n=e.state,r=n.prevState,o=n.resizeStartPoint,a=n.activeResize,i=e.props,c=i.onChange,l=i.zoom;if(a){var s=(0,E.Z)(o,2),u=s[0],p=s[1],d=t.clientX,f=t.clientY,h=1,m=1;a.LEFT&&(h=-1),a.TOP&&(m=-1);var v=a.LEFT||a.RIGHT?Math.round((d-u)/l.scale):0,y=a.TOP||a.BOTTOM?Math.round((f-p)/l.scale):0,g=Math.max(0,+r.width+v*h),b=Math.max(0,+r.height+y*m),Z=null;if(t.shiftKey&&e.verticalResizeable()){var A=[];Z=r.height/r.width,(a.LEFT||a.RIGHT)&&A.push(g/r.width),(a.TOP||a.BOTTOM)&&A.push(b/r.height);var w=Math.max(0,Math.min.apply(Math,A));g=r.width*w,b=r.height*w}var O=.5,C=.5;t.altKey||(a.TOP&&(C=1),a.BOTTOM&&(C=0),a.LEFT&&(O=1),a.RIGHT&&(O=0));var P={x:r.x+O*(r.width-g),width:g,activeResize:a};e.verticalResizeable()&&(P.y=r.y+C*(r.height-b),P.height=b),(a.LEFT||a.RIGHT)&&(P=e.snapXChanges(P,O,Z,C)),(e.verticalResizeable()&&a.TOP||a.BOTTOM)&&(P=e.snapYChanges(P,C,Z,O)),c(P)}})),(0,s.Z)((0,a.Z)(e),"snapXChanges",(function(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,o=arguments.length>3?arguments[3]:void 0,a=e.props,i=a.object,c=a.xGrid,l=a.setXSnap,s=a.zoom,u=a.component,p=0;i.type!==h.NV&&(p=u.x);var d={};if(0!==n&&(d.left=t.x+p),1!==n&&(d.right=t.x+t.width+p),.5!==n&&(d.center=t.x+t.width/2+p),0===Object.keys(d).length)return t;var f=(0,m.qz)(c,d,s,!0);if(!f)return l(null),t;var v=Object.keys(f)[0],y=f[v];l(y);var g=y-d[v],b=.5===n;if(t=N({},t),"left"===v&&(t.x=y-p,t.width+=b?2*-g:-g),"right"===v&&(t.x+=b?-g:0,t.width+=b?2*g:g),"center"===v&&(0===n?t.width+=2*g:1===n&&(t.x+=2*g,t.width-=2*g)),null!==r){var Z=t.width*r,E=-o*(Z-t.height);t.height=Z,t.y+=E}return t})),(0,s.Z)((0,a.Z)(e),"snapYChanges",(function(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,o=arguments.length>3?arguments[3]:void 0,a=e.props,i=a.object,c=a.yGrid,l=a.setYSnap,s=a.zoom,u=a.component,p=0;i.type!==h.NV&&(p=u.y);var d={};if(0!==n&&(d.top=t.y+p),1!==n&&(d.bottom=t.y+t.height+p),.5!==n&&(d.center=t.y+t.height/2+p),0===Object.keys(d).length)return t;var f=(0,m.qz)(c,d,s,!0);if(!f)return l(null),t;var v=Object.keys(f)[0],y=f[v];l(y);var g=y-d[v],b=.5===n;if(t=N({},t),"top"===v&&(t.y=y-p,t.height+=b?2*-g:-g),"bottom"===v&&(t.y+=b?-g:0,t.height+=b?2*g:g),"center"===v&&(0===n?t.height+=2*g:1===n&&(t.y+=2*g,t.height-=2*g)),null!==r){var Z=1*t.height/r,E=-o*(Z-t.width);t.width=Z,t.x+=E}return t})),(0,s.Z)((0,a.Z)(e),"handleMouseUp",(function(){var t=e.state.activeResize,n=e.props,r=n.onResizeEnd,o=n.resetSnaps;t&&(o(),e.setState({activeResize:null}),r&&r())})),(0,s.Z)((0,a.Z)(e),"verticalResizeable",(function(){var t=e.props,n=t.app,r=t.object;if(r.type===h.pR||r.type===h.fq){var o=r.libraryName,a=r.componentName,i=(0,k.n6)(n,o,a);return!(!i||!i.resizeY)}return![h.GP,h.No,h.Yc,h.oG].includes(r.type)})),(0,s.Z)((0,a.Z)(e),"horizontalResizeable",(function(){var t=e.props,n=t.object,r=t.app;if(n.type===h.pR){var o=n.libraryName,a=n.componentName,i=(0,k.n6)(r,o,a)||{};if("resizeX"in i)return!!i.resizeX}return n.type!==h.oG})),(0,s.Z)((0,a.Z)(e),"renderLink",(function(){var t=e.props,n=t.object,r=t.link,o=t.linkTargets,a=t.zoom;if(!r||!o)return null;var i=n.width,c=n.height,l=N(N({},n.absolutePosition),{},{width:i,height:c}),s=o.filter((function(e){return e.id===r.target}))[0],p=(0,x.ds)(l,s,a),d=(0,x.fq)(l,s,a);return u.createElement("g",null,u.createElement("path",{className:"link-path",d:p}),u.createElement("path",{className:"link-arrow",d}))})),e}return(0,o.Z)(d,[{key:"render",value:function(){var e=this.props,t=e.object,n=e.zoom,r=e.resize,o=e.link,a=this.state.activeDrag,i=this.verticalResizeable(),c=t.absolutePosition,l=c.x,s=c.y,p=(0,P.bA)([l,s],n),d=(0,E.Z)(p,2),f=d[0],h=d[1],m=Math.round(f+(0,P.pF)(t.width,n)+.5)-.5,v=Math.round(h+(0,P.pF)(t.height,n)+.5)-.5,y=m-(f=Math.round(f+.5)-.5)||0,g=v-(h=Math.round(h+.5)-.5)||0,b=!!r;return this.horizontalResizeable()||(b=!1),u.createElement(u.Fragment,null,this.renderLink(),u.createElement("g",{className:C()("bounding-box",{"has-link":o}),transform:"translate(".concat(f,", ").concat(h,")")},u.createElement(w(),{enabled:a,onMouseMove:this.handleMouseMove,onMouseUp:this.handleMouseUp}),u.createElement("rect",{x:-0,y:-0,width:y,height:g,className:"selection-box"}),u.createElement(B,{position:"top",heightScaled:g,widthScaled:y,height:t.height,width:t.width,depth:t.depth}),b&&u.createElement("g",{className:"resize-handles"},y>20&&i?u.createElement(u.Fragment,null,u.createElement(S,{invisible:!0,onMouseDown:this.resize(L),cursor:"ns",width:y,position:"top"}),u.createElement(S,{invisible:!0,onMouseDown:this.resize(X),cursor:"ns",width:y,y:g,position:"bottom"})):null,g>20||!i?u.createElement(u.Fragment,null,u.createElement(S,{invisible:i,onMouseDown:this.resize(T),cursor:"ew",height:g,position:"left"}),u.createElement(S,{invisible:i,onMouseDown:this.resize(I),cursor:"ew",height:g,x:y,position:"right"})):null,i?u.createElement(u.Fragment,null,u.createElement(S,{onMouseDown:this.resize(T,L),cursor:"nwse"}),u.createElement(S,{onMouseDown:this.resize(I,L),cursor:"nesw",x:y}),u.createElement(S,{onMouseDown:this.resize(T,X),cursor:"nesw",y:g}),u.createElement(S,{onMouseDown:this.resize(I,X),cursor:"nwse",x:y,y:g})):null)))}}]),d}(u.Component);(0,s.Z)(U,"defaultProps",{resize:!0});const z=(0,d.$j)((function(e,t){var n=t.object;return{app:(0,R.Mq)(e,(0,v.i3)(e)),component:(0,v.Xr)(e,n.id)}}))(U);function _(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function F(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?_(Object(n),!0).forEach((function(t){(0,s.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}n(3006),n(59274);var W=function(e){(0,i.Z)(d,e);var t,n,p=(t=d,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=(0,l.Z)(t);if(n){var o=(0,l.Z)(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return(0,c.Z)(this,e)});function d(){var e;(0,r.Z)(this,d);for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return e=p.call.apply(p,[this].concat(n)),(0,s.Z)((0,a.Z)(e),"handleResizeEnd",(function(){var t=e.props,n=t.objects,r=t.resizeObject,o=t.recalculateSnapGrid;if(1===n.length){var a=(0,m.HT)(n[0]);o(),r(a.id,a)}})),(0,s.Z)((0,a.Z)(e),"handleChange",(function(t){var n=e.props,r=n.objects,o=n.resizeObject;if(1===r.length)return o(r[0].id,t,!0)})),e}return(0,o.Z)(d,[{key:"render",value:function(){var e=this.props,t=e.editing,n=e.objects,r=e.zoom,o=e.links,a=e.linkTargets,i=e.xGrid,c=e.yGrid,l=e.setXSnap,s=e.setYSnap,p=e.resetSnaps,d=e.yOffset,m=(0,f.A5)(n.map((function(e){return F(F({},e),e.absolutePosition)})));return m&&(m.absolutePosition=m),t||!m?null:(n=n.map((function(e){return e.type===h.NV&&0!==d?F(F({},e),{},{height:e.height-d,absolutePosition:F(F({},e.absolutePosition),{},{y:e.absolutePosition.y+d})}):e})),u.createElement("g",{className:"bounding-boxes"},n.map((function(e){return u.createElement(z,{resize:!1,key:e.id,object:e,zoom:r,link:o[e.id],linkTargets:a})})),u.createElement(z,{link:1===n.length?o[n[0].id]:null,resize:1===n.length,onChange:this.handleChange,onResizeEnd:this.handleResizeEnd,object:1===n.length?n[0]:m,xGrid:i,yGrid:c,setXSnap:l,setYSnap:s,resetSnaps:p,zoom:r})))}}]),d}(u.Component);const Y=(0,p.EN)((0,d.$j)((function(e,t){t.match;var n={},r=(0,v.sr)(e,Object.keys(n).map((function(e){return n[e].target}))),o=(0,v.cm)(e);return{links:n,linkTargets:r,originalObjects:o,objects:o.map((function(t){return F(F({},t),{},{absolutePosition:(0,v.vi)(e,t.id)})})),editing:!(!(0,b._R)(e)&&!(0,Z.ni)(e)),zoom:(0,v.aB)(e),xGrid:(0,y.L)(e),yGrid:(0,y.WP)(e),yOffset:(0,v.Gr)(e)}}),{resizeObject:v.c5,recalculateSnapGrid:g.eQ,setXSnap:y.xd,setYSnap:y.mE,resetSnaps:y.gL})(W))},96766:(e,t,n)=>{"use strict";n.d(t,{Z:()=>V});var r=n(81253),o=n(28481),a=n(6610),i=n(5991),c=n(63349),l=n(10379),s=n(46070),u=n(77608),p=n(96156),d=n(67294),f=n(45697),h=n.n(f),m=n(37703),v=n(90955),y=n(81129),g=n(61145),b=n(35592),Z=n(89926),E=n(62088),A=n(62012),w=n(15746),O=n(1054),C=n(43530),P=n(66400),x=n(44263),k=n(22122),R=n(75645);n(91758);var S=n(59274);function j(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}n(55744);var M={source:"data:image/svg+xml;base64,bW9kdWxlLmV4cG9ydHMgPSBfX3dlYnBhY2tfcHVibGljX3BhdGhfXyArICJzdGF0aWMvbWVkaWEvZHluYW1pYy1pbWFnZS5mZmQ4NTRhNS5zdmciOw=="},B={source:"data:image/svg+xml;base64,bW9kdWxlLmV4cG9ydHMgPSBfX3dlYnBhY2tfcHVibGljX3BhdGhfXyArICJzdGF0aWMvbWVkaWEvdXBsb2FkZWQtaW1hZ2UuMjgzZjM1OTQuc3ZnIjs="},D=function(e){(0,l.Z)(o,e);var t,n,r=(t=o,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=(0,u.Z)(t);if(n){var o=(0,u.Z)(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return(0,s.Z)(this,e)});function o(e){var t;return(0,a.Z)(this,o),t=r.call(this,e),(0,p.Z)((0,c.Z)(t),"getURL",(function(){var e=t.props,n=e.imageType,r=e.imageId,o=e.imageBinding,a=e.imageURL,i=e.filename1x,c=null,l=null,s=null;if(o&&void 0!==o.options&&!i){var u=o.options;void 0!==u.placeholderImageEnabled&&(l=u.placeholderImageEnabled),void 0!==u.placeholderImage&&(s=u.placeholderImage)}if(r)c="".concat(r,"@2x.png");else if(l)c=s;else if(!o&&i){var p,d=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return j(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?j(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,c=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return i=e.done,e},e:function(e){c=!0,a=e},f:function(){try{i||null==n.return||n.return()}finally{if(c)throw a}}}}(["2x","1x","3x"]);try{for(d.s();!(p=d.n()).done;){var f=p.value,h="filename".concat(f);if(t.props[h]){c=t.props[h];break}}}catch(e){d.e(e)}finally{d.f()}}return"url"===n&&a?Array.isArray(a)?null:a:c?(0,R.L)(c):null})),t.svgRef=d.createRef(),t}return(0,i.Z)(o,[{key:"getMaskId",value:function(){var e=this.props.id;return"image-mask-".concat(e)}},{key:"renderPlaceholder",value:function(){var e=this.props,t=e.id,n=e.zoom,r=e.width,o=e.height,a=e.widthScaled,i=e.heightScaled,c=e.xScaled,l=e.yScaled,s=e.imageType,u="dynamic"===s||"url"===s?M:B,p=Math.min(r,o),f=Math.max(16,Math.min(80,.7*p)),h=(0,y.pF)(f,n),m=(0,y.pF)(f,n),g=this.getURL(),b=this.getMaskId(),Z=this.props.imageResize===v.bB.CONTAIN?"meet":"slice";return g?d.createElement("g",{mask:"url(#".concat(b,")")},d.createElement("image",{href:g,x:c,y:l,width:a,height:i,preserveAspectRatio:"xMidYMid ".concat(Z)})):d.createElement("g",{transform:"translate(".concat(c,", ").concat(l,")"),className:"image-upload-object"},d.createElement("image",{href:u.source,width:h,height:m,x:a/2-h/2,y:i/2-m/2,clipPath:"url(#clip-".concat(t,")")}))}},{key:"render",value:function(){var e=this.props,t=e.id,n=e.width,r=e.height,o=e.xScaled,a=e.yScaled,i=e.widthScaled,c=e.heightScaled,l=e.borderRadius,s=e.opacity,u=e.zoom,p=e.imageType;l=Math.min(l,r/2),l=Math.min(l,n/2),l=(0,y.pF)(l||0,u);var f=this.getBorderProps(),h=this.getBackgroundColor(),m=this.props.imageResize===v.bB.CONTAIN?"meet":"slice",g=this.getURL(),b=this.getMaskId(),Z="dynamic"===p||!g,E="dynamic"===p&&g;return d.createElement("g",{className:"image",onMouseDown:this.handleMouseDown,onDoubleClick:this.handleDoubleClick,opacity:s},d.createElement("defs",null,d.createElement("clipPath",{id:"clip-".concat(t)},d.createElement("rect",{x:0,y:0,width:i,height:c,rx:l,ry:l}))),d.createElement("mask",{id:b},d.createElement("rect",{x:o,y:a,width:i,height:c,fill:"#fff",stroke:"none",rx:l,ry:l})),d.createElement("rect",{x:o,y:a,width:i,height:c,stroke:"none",fill:h,rx:l,ry:l}),d.createElement("rect",(0,k.Z)({},f,{x:o,y:a,width:i,height:c,fill:!Z||E?"none":"#eaeaea",rx:l,ry:l})),Z?this.renderPlaceholder():d.createElement("g",null,d.createElement("g",{mask:"url(#".concat(b,")")},d.createElement("image",{href:g,x:o,y:a,width:i,height:c,preserveAspectRatio:"xMidYMid ".concat(m)}))))}}]),o}(O.Z),N=n(66213),T=n(42281),I=(n(6789),["xScaled","yScaled","points","zoom","hideShadows","shadow","x","y","width","height"]);var L=function(e){(0,l.Z)(c,e);var t,n,o=(t=c,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=(0,u.Z)(t);if(n){var o=(0,u.Z)(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return(0,s.Z)(this,e)});function c(){return(0,a.Z)(this,c),o.apply(this,arguments)}return(0,i.Z)(c,[{key:"getPathData",value:function(){this.dimension=[];var e=4*(Math.sqrt(2)-1)/3,t=this.props,n=t.width,r=t.height,o=t.points,a=t.compound,i=t.isClosed,c=t.zoom,l=t.x,s=t.y,u=t.borderRadius;if(this.path=S.XV.create(),a&&a.length>0)this.path=S.XV.create(a);else if(o&&o.length>0)this.path=S.XV.create(o);else{var p=new S.Ae(l,s,n,r),d=new S.E9(u?[u,u]:[0,0]),f=p.getBottomLeft(!0),h=p.getTopLeft(!0),m=p.getTopRight(!0),v=p.getBottomRight(!0),y=[];if(!d||d.isZero())y=[new S.XX(f),new S.XX(h),new S.XX(m),new S.XX(v)];else{var g=(d=S.$u.min(new S.$u(u,u),p.getSize(!0).divide(2))).width,b=d.height,Z=g*e,E=b*e;y=[new S.XX(f.add(g,0),null,[-Z,0]),new S.XX(f.subtract(0,b),[0,E]),new S.XX(h.add(0,b),null,[0,-E]),new S.XX(h.add(g,0),[-Z,0],null),new S.XX(m.subtract(g,0),null,[Z,0]),new S.XX(m.add(0,b),[0,-E],null),new S.XX(v.subtract(0,b),null,[0,E]),new S.XX(v.subtract(g,0),[Z,0])]}this.path=S.XV.create(y.map((function(e){var t=e.point,n=e.handleIn,r=e.handleOut;return new S.XX(t,n,r)})))}return this.path.setClosed(i),this.path.scale(c.scale),this.path.adjust(l,s),this.path.getPathData()}},{key:"doubleClickHandler",value:function(){return this.isSelected()?this.props.onEdit():(0,N.Z)((0,u.Z)(c.prototype),"doubleClickHandler",this).call(this)}},{key:"renderDimesion",value:function(){}},{key:"renderPath",value:function(){return d.createElement("path",(0,k.Z)({},this.getBorderProps(),{fill:this.getBackgroundColor(),d:this.getPathData()}))}},{key:"render",value:function(){var e=this.props,t=(e.xScaled,e.yScaled,e.points,e.zoom,e.hideShadows,e.shadow,e.x,e.y,e.width,e.height,(0,r.Z)(e,I));return d.createElement("g",{className:"shape"},d.createElement("g",{className:"shape",onMouseDown:this.handleMouseDown,onDoubleClick:this.handleDoubleClick,style:t},this.renderPath()),this.dimension&&d.createElement("g",{className:"shape-editor-size"},this.dimension.map((function(e,t){return d.createElement("g",null,d.createElement("line",{className:"shape-editor-line-angle",x1:e[0],y1:e[1],x2:e[2],y2:e[3]}))}))))}}]),c}(T.Z),X=n(32939),U=n(41665),z=n(72036),_=["children"];function F(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function W(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?F(Object(n),!0).forEach((function(t){(0,p.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):F(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Y=function(e){(0,l.Z)(h,e);var t,n,f=(t=h,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=(0,u.Z)(t);if(n){var o=(0,u.Z)(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return(0,s.Z)(this,e)});function h(){var e;(0,a.Z)(this,h);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return e=f.call.apply(f,[this].concat(n)),(0,p.Z)((0,c.Z)(e),"state",{error:null}),(0,p.Z)((0,c.Z)(e),"handleMouseEnter",(function(t){var n=e.props,r=n.object,o=n.setCanvasHover;e.context.editable&&o(r.id)})),(0,p.Z)((0,c.Z)(e),"handleSelect",(function(t,n){var r=e.props,o=r.object,a=r.setSelection;e.context.editable&&a(o.id,t,!n)})),(0,p.Z)((0,c.Z)(e),"handleExpand",(function(){var t=e.context.editable,n=e.props,r=n.object,o=n.setExpandSelection;t&&o(r.id)})),(0,p.Z)((0,c.Z)(e),"handleEdit",(function(){var t=e.props,n=t.object,r=t.setEditingText,o=t.setEditingShape;e.context.editable&&(n.type===v.GP&&r(n.id),n.type===v.X3&&o(n.id),n.type===v.E2&&o(n.id))})),e}return(0,i.Z)(h,[{key:"shouldComponentUpdate",value:function(e){for(var t=this.props.zoom,n=0,r=["object","textEditing","shapeEditing","hideShadows","branding"];n<r.length;n++){var o=r[n];if(e[o]!==this.props[o])return!0}return t.scale!==e.zoom.scale}},{key:"componentDidCatch",value:function(e,t){var n=this.props.object;window.setTimeout((function(){var t=new Error("Component Error [".concat(n&&n.type,"]: ").concat(e.message));if(t.stack=[t.stack.split("\n").slice(0,2),e.stack].join("\n"),!window.adaloDeveloper)throw t;console.error(t)}),0),this.setState({error:e})}},{key:"render",value:function(){var e=this.props,t=e.object,n=e.zoom,a=e.transformZoom,i=e.hideShadows,c=e.beginDrag,l=e.branding;if(this.state.error)return null;var s=(0,y.bA)([t.x,t.y],n),u=(0,o.Z)(s,2),p=u[0],f=u[1],h=(0,y.pF)(t.width,n),m=(0,y.pF)(t.height,n),g=(t.children,(0,r.Z)(t,_)),b=W(W({},g),{},{xScaled:p,yScaled:f,widthScaled:h,heightScaled:m,zoom:n,transformZoom:a,hideShadows:i,branding:l,onPosition:c,onExpand:this.handleExpand,onSelect:this.handleSelect,onEdit:this.handleEdit,object:g});if(t.hidden)return null;switch(t.type){case v.GP:return d.createElement("g",{onMouseEnter:this.handleMouseEnter,onMouseLeave:this.handleMouseLeave},d.createElement(w.Z,b));case v.Ou:return d.createElement("g",{onMouseEnter:this.handleMouseEnter,onMouseLeave:this.handleMouseLeave},d.createElement(L,b));case v.fq:return d.createElement("g",{onMouseEnter:this.handleMouseEnter,onMouseLeave:this.handleMouseLeave},d.createElement(C.Z,b));case v.E2:return d.createElement("g",{onMouseEnter:this.handleMouseEnter,onMouseLeave:this.handleMouseLeave},d.createElement(P.Z,b));case v.X3:return d.createElement("g",{onMouseEnter:this.handleMouseEnter,onMouseLeave:this.handleMouseLeave},d.createElement(x.Z,b));case v.k4:return d.createElement("g",{onMouseEnter:this.handleMouseEnter,onMouseLeave:this.handleMouseLeave},d.createElement(D,b));case v.oG:return d.createElement(X.Z,{object:t},t.children.map((function(e){return d.createElement(G,{key:e.id,object:e,zoom:n,transformZoom:a,hideShadows:i,branding:l})})));case v.Pk:return d.createElement("g",{onMouseEnter:this.handleMouseEnter,onMouseLeave:this.handleMouseLeave},d.createElement(ImageUpload,b));case v.No:return d.createElement("g",{onMouseEnter:this.handleMouseEnter,onMouseLeave:this.handleMouseLeave},d.createElement(U.Z,b));case v.pR:return d.createElement("g",{onMouseEnter:this.handleMouseEnter,onMouseLeave:this.handleMouseLeave},d.createElement(z.Z,b))}return null}}]),h}(d.Component);(0,p.Z)(Y,"contextTypes",{editable:h().bool,getSelection:h().func});var G=(0,m.$j)(null,{setExpandSelection:A.c4,setSelection:A.Z5,positionObjects:g.aN,setCanvasHover:A.TL,setEditingShape:E.S6,setEditingText:Z._n,beginDrag:b.fM})(Y);const V=G},91732:(e,t,n)=>{"use strict";n(67294),n(81129)},41665:(e,t,n)=>{"use strict";n.d(t,{Z:()=>I});var r=n(28481),o=n(6610),a=n(5991),i=n(63349),c=n(10379),l=n(46070),s=n(77608),u=n(96156),p=n(67294),d=n(45697),f=n.n(d),h=n(26353),m=n(37703),v=n(44127),y=n(1331),g=n(3227),b=n(61145),Z=n(72982),E=n(81253),A=n(90955),w=n(81129),O=n(15746),C=n(1054),P=n(43530),x=n(66400),k=n(44263),R=n(32939);var S=function(e){(0,c.Z)(i,e);var t,n,r=(t=i,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=(0,s.Z)(t);if(n){var o=(0,s.Z)(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return(0,l.Z)(this,e)});function i(){return(0,o.Z)(this,i),r.apply(this,arguments)}return(0,a.Z)(i,[{key:"render",value:function(){var e=this.props,t=e.xScaled,n=e.yScaled,r=e.children,o="translate(".concat(t," ").concat(n,")");return p.createElement("g",{transform:o},r)}}]),i}(p.Component),j=["children"];function M(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function B(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?M(Object(n),!0).forEach((function(t){(0,u.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):M(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var D=function(){},N=function(e){(0,c.Z)(d,e);var t,n,r=(t=d,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=(0,s.Z)(t);if(n){var o=(0,s.Z)(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return(0,l.Z)(this,e)});function d(){var e;(0,o.Z)(this,d);for(var t=arguments.length,n=new Array(t),a=0;a<t;a++)n[a]=arguments[a];return e=r.call.apply(r,[this].concat(n)),(0,u.Z)((0,i.Z)(e),"getClassMapping",(function(){var e;return e={},(0,u.Z)(e,A.GP,O.Z),(0,u.Z)(e,A.bQ,C.Z),(0,u.Z)(e,A.fq,P.Z),(0,u.Z)(e,A.E2,x.Z),(0,u.Z)(e,A.X3,k.Z),(0,u.Z)(e,A.oG,R.Z),(0,u.Z)(e,A.No,I),e})),e}return(0,a.Z)(d,[{key:"renderChildren",value:function(){var e=this.props,t=e.object,n=e.layout,r=e.hideShadows;return t.children?(0,v.DY)(t.children,(function(e){return e.layout.zIndex})).map((function(e){return p.createElement(d,{key:e.id,object:e,layout:n,hideShadows:r})})):null}},{key:"render",value:function(){var e=this.props,t=e.object,n=e.layout,r=e.hideShadows,o=n[t.id],a=this.getClassMapping()[t.type]||S;if(!o||!a)return null;delete(t=B(B(B({},t),t.attributes),{},{x:o.left,y:o.top,width:o.width,height:o.height})).layoutText;var i=t,c=(i.children,B(B({},(0,E.Z)(i,j)),{},{xScaled:t.x,yScaled:t.y,widthScaled:t.width,heightScaled:t.height,zoom:w.m6,hideShadows:r,onPosition:D,onExpand:D,onSelect:D,onEdit:D}));return p.createElement(a,c,this.renderChildren())}}]),d}(p.Component);var T=function(e){(0,c.Z)(f,e);var t,n,d=(t=f,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=(0,s.Z)(t);if(n){var o=(0,s.Z)(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return(0,l.Z)(this,e)});function f(){var e;(0,o.Z)(this,f);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return e=d.call.apply(d,[this].concat(n)),(0,u.Z)((0,i.Z)(e),"getChildContext",(function(){return{isNestedComponentInstance:!0}})),e}return(0,a.Z)(f,[{key:"shouldComponentUpdate",value:function(e){for(var t=0,n=["component","hideShadows","xScaled","yScaled","width","height","otherComponents"];t<n.length;t++){var r=n[t];if(!(0,v.wU)(e[r],this.props[r]))return!0}return!1}},{key:"renderObjects",value:function(){var e=this.props,t=e.id,n=e.component,o=e.width,a=e.height,i=e.hideShadows,c=e.otherComponents,l=e.updateObject;if(!n)return null;var s=(0,y._)(n,o,a,c);if(!s)return null;var u=(0,r.Z)(s,2),d=u[0],f=u[1];this.context.isNestedComponentInstance||f!==a&&window.setTimeout((function(){l(t,{height:f})}),0);var h=(n.layout.body||[])[0],m=h&&h.children||[];return p.createElement("g",{className:"component-instance-objects"},m.map((function(e){return p.createElement(N,{key:e.id,object:e,hideShadows:i,layout:d})})))}},{key:"render",value:function(){var e=this.props,t=e.xScaled,n=e.yScaled,r=e.width,o=e.height,a=e.zoom,i="translate(".concat(t,", ").concat(n,") scale(").concat(a.scale,")");return p.createElement("g",{className:"component-instance",transform:i},this.renderObjects(),p.createElement("rect",{x:0,y:0,width:r,height:o,fill:"transparent",onMouseDown:this.handleMouseDown,onDoubleClick:this.handleDoubleClick}))}}]),f}(Z.Z);(0,u.Z)(T,"contextTypes",{editable:f().bool,getSelection:f().func,isNestedComponentInstance:f().bool}),(0,u.Z)(T,"childContextTypes",{isNestedComponentInstance:f().bool});const I=(0,h.EN)((0,m.$j)((function(e,t){var n=t.match,r=t.componentId,o=n.params.appId,a=(0,g.Xr)(e,o,r);return{component:a,otherComponents:(0,g.IB)(e,o,a)}}),{updateObject:b.v4})(T))},48850:(e,t,n)=>{"use strict";n.d(t,{Z:()=>k});var r=n(28481),o=n(13894),a=n(85061),i=n(6610),c=n(5991),l=n(63349),s=n(10379),u=n(46070),p=n(77608),d=n(96156),f=n(67294),h=n(37703),m=n(98605),v=n.n(m),y=n(81129),g=n(45145),b=n(59274),Z=n(61145),E=n(62088),A=n(97814),w=(n(22917),n(6789)),O=n(20034);function C(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function P(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?C(Object(n),!0).forEach((function(t){(0,d.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):C(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}n(21518);var x=function(e){(0,s.Z)(m,e);var t,n,h=(t=m,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=(0,p.Z)(t);if(n){var o=(0,p.Z)(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return(0,u.Z)(this,e)});function m(e){var t;(0,i.Z)(this,m),t=h.call(this,e),(0,d.Z)((0,l.Z)(t),"handleKeyDown",(function(e){var n=t.props,r=n.setEditingShape,o=n.resetTool;e.which===g._Q&&(r(null),o())})),(0,d.Z)((0,l.Z)(t),"handleMouseMove",(function(e){var n=t.getRealPoint([e.clientX,e.clientY]),r=(0,o.Z)(b.E9,(0,a.Z)(n)),i=t.path.hitTest(r);!i||"curve"!==i.type&&"segment"!==i.type?t.setState({lastCursorPosition:n,selectedIndex:null}):t.setState({lastCursorPosition:n,selectedIndex:i.item.index})})),(0,d.Z)((0,l.Z)(t),"handleDoubleClick",(function(e){var n=t.state.selectedIndex;(0,t.props.setEditingPath)(n)})),(0,d.Z)((0,l.Z)(t),"convertPoint",(function(e){var n=t.props,o=n.zoom,a=n.component;if(n.object,!e)return e;var i=(0,r.Z)(e,2),c=i[0],l=i[1],s=e;return a&&(s=[c+a.x,l+a.y]),(0,y.bA)(s,o)})),(0,d.Z)((0,l.Z)(t),"getRealPoint",(function(e){var n=t.props,o=(n.object,n.component),a=n.zoom,i=(0,y.ty)(e,a),c=(0,r.Z)(i,2),l=c[0],s=c[1];return o&&(l-=o.x,s-=o.y),[l=Math.round(l),s=Math.round(s)]})),t.state={lastCursorPosition:null,hitPoint:{x:0,y:0}},t.path=b.XV.create();var n=e.object,c=(e.zoom,e.updateObject);if(n){var s=n.points,u=n.compound,p=n.isClosed;u&&u.length>0?t.path=b.XV.create(u):s&&s.length>0&&t.path.setSegments(s);var f=t.path.bounds;t.path.setClosed(p);var v=P(P({},n),{},{width:f.width,height:f.height,x:f.left,y:f.top});c(n.id,v,"zoom"),e.setEditingPath(0)}return t}return(0,c.Z)(m,[{key:"render",value:function(){var e=this.state,t=(e.lastCursorPosition,e.selectedIndex),n=this.props,r=(n.selectedPoint,n.object),o=(n.setDraggingInControl,n.setDraggingOutControl,n.zoom),i=n.editingPath,c=this.path;if(r){var l,s=r.points,u=r.compound,p=r.isClosed;u&&u.length>0?this.path=b.XV.create(u):s&&s.length>0&&this.path.setSegments(s),this.path.setClosed(p),(c=this.path.clone()).scale(o.scale);var d=this.convertPoint([r.x,r.y]);(l=c).adjust.apply(l,(0,a.Z)(d))}var h;return h=c&&c instanceof w.Op?f.createElement("g",{key:"compound-editor",onMouseMove:this.handleMouseMove,className:null,onDoubleClick:this.handleDoubleClick,pointerEvents:"all"},f.createElement(v(),{onKeyDown:this.handleKeyDown}),f.createElement("rect",{x:0,y:0,width:window.innerWidth,height:window.innerHeight,style:{fill:"none"}}),c.children.map((function(e,n){return i===n?f.createElement(O.Z,{key:"path-editor-".concat(n),zoom:o}):f.createElement("path",{key:"path-".concat(n),id:"editorLine",className:"shape-editor-line ".concat(t===n?"shape-editor-line-selected":""),d:e.getPathData()})})),")}"):f.createElement(O.Z,{key:"path-editor",zoom:o}),f.createElement("g",{key:"wrapper-editor"},h)}}]),m}(f.Component);const k=(0,h.$j)((function(e){return{object:(0,Z.j6)(e,(0,E.ni)(e)),editingPath:(0,E.xU)(e),component:(0,Z.j6)(e,(0,Z.TY)(e,(0,E.ni)(e))),draggingOutControl:(0,E.ek)(e),draggingInControl:(0,E.t0)(e),selectedPoint:(0,E.ee)(e),draggingSelectedPoint:(0,E.E2)(e)}}),{resetTool:A.bS,createObject:Z.nW,updateObject:Z.v4,setEditingShape:E.S6,setEditingPath:E.Zf,setDraggingOutControl:E.hd,setDraggingInControl:E.Tl,endDrag:E.Xs,setSelectedPoint:E.bN,setDraggingSelectedPoint:E.q7})(x)},11183:(e,t,n)=>{"use strict";n.d(t,{Z:()=>J});var r=n(28481),o=n(6610),a=n(5991),i=n(63349),c=n(10379),l=n(46070),s=n(77608),u=n(96156),p=n(67294),d=n(37703),f=n(90955),h=n(81129),m=n(64946),v=n(5535),y=n(43020),g=n(97814),b=n(98151),Z=n(61145),E=n(20034);function A(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function w(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?A(Object(n),!0).forEach((function(t){(0,u.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):A(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var O={startPoint:null,currentPoint:null,shiftPressed:!1,altPressed:!1},C=function(e){(0,c.Z)(d,e);var t,n,r=(t=d,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=(0,s.Z)(t);if(n){var o=(0,s.Z)(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return(0,l.Z)(this,e)});function d(){var e;(0,o.Z)(this,d);for(var t=arguments.length,n=new Array(t),a=0;a<t;a++)n[a]=arguments[a];return e=r.call.apply(r,[this].concat(n)),(0,u.Z)((0,i.Z)(e),"state",w({},O)),(0,u.Z)((0,i.Z)(e),"handleKeyDown",(function(t){27===t.which&&(0,e.props.resetTool)()})),(0,u.Z)((0,i.Z)(e),"getPoint",(function(t){var n=e.props,r=n.zoom,o=n.xGrid,a=n.yGrid,i=n.setXSnap,c=n.setYSnap,l=(0,h.ty)([t.clientX,t.clientY],r);if(!o||!a)return l;var s=(0,y.qz)(o,{x:l[0]},r),u=(0,y.qz)(a,{y:l[1]},r);return i(s&&s.x),c(u&&u.y),[s?s.x:l[0],u?u.y:l[1]]})),(0,u.Z)((0,i.Z)(e),"handleMouseDown",(function(t){return e.setState({startPoint:e.getPoint(t)})})),(0,u.Z)((0,i.Z)(e),"handleMouseMove",(function(t){return e.setState({currentPoint:e.getPoint(t),shiftPressed:t.shiftKey,altPressed:t.altKey})})),(0,u.Z)((0,i.Z)(e),"handleMouseUp",(function(t){if(e.state.startPoint){var n=e.props,r=n.resetTool,o=n.objectAttributes;r(),e.createObject(o,e.getRect())}})),(0,u.Z)((0,i.Z)(e),"getRect",(function(){var t=e.state,n=t.startPoint,r=t.currentPoint,o=t.shiftPressed,a=t.altPressed;if(!n||!r||n[0]===r[0]&&n[1]===r[1])return null;var i=r[0]-n[0],c=r[1]-n[1],l=i?i/Math.abs(i):1,s=c?c/Math.abs(c):1;if(o){var u=Math.max(Math.abs(i),Math.abs(c));r=[n[0]+l*u,n[1]+s*u]}return a&&(n=[n[0]-(r[0]-n[0]),n[1]-(r[1]-n[1])]),(0,v.fW)(n,r,!0)})),e}return(0,a.Z)(d,[{key:"componentDidMount",value:function(){document.addEventListener("keydown",this.handleKeyDown)}},{key:"componentWillUnmount",value:function(){var e=this.props.resetSnaps;document.removeEventListener("keydown",this.handleKeyDown),e()}},{key:"createObject",value:function(){throw new Error("createObject should be overriden in subclass")}},{key:"render",value:function(){var e=this.props.zoom,t=(0,h.Px)(this.getRect(),e);return p.createElement("g",{onMouseDown:this.handleMouseDown,onMouseMove:this.handleMouseMove,onMouseUp:this.handleMouseUp,pointerEvents:"all"},p.createElement("rect",{x:0,y:0,width:window.innerWidth,height:window.innerHeight,style:{fill:"none"}}),t&&p.createElement("rect",{x:t.x-.5,y:t.y-.5,width:t.width+1,height:t.height+1,rx:0,ry:0,style:{fill:"none",stroke:"#808080",strokeWidth:.5}}))}}]),d}(p.Component),P={resetTool:g.bS,setXSnap:b.xd,setYSnap:b.mE,resetSnaps:b.gL};function x(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function k(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?x(Object(n),!0).forEach((function(t){(0,u.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):x(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}n(13448);var R=function(e){(0,c.Z)(i,e);var t,n,r=(t=i,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=(0,s.Z)(t);if(n){var o=(0,s.Z)(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return(0,l.Z)(this,e)});function i(){return(0,o.Z)(this,i),r.apply(this,arguments)}return(0,a.Z)(i,[{key:"createObject",value:function(e,t){t&&(t.width>0||t.height>0)&&(0,this.props.createObject)(k(k({},e),t))}}]),i}(C);const S=(0,d.$j)((function(e){return{objectAttributes:(0,g.rs)(e),xGrid:(0,b.L)(e),yGrid:(0,b.WP)(e)}}),k(k({},P),{},{createObject:Z.nW}))(R);var j=n(96766);function M(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=(0,s.Z)(e);if(t){var o=(0,s.Z)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return(0,l.Z)(this,n)}}var B=function(e){(0,c.Z)(n,e);var t=M(n);function n(){return(0,o.Z)(this,n),t.apply(this,arguments)}return(0,a.Z)(n,[{key:"renderObjects",value:function(){var e=this.props,t=e.component,n=e.width,r=e.height;if(!t)return null;var o=t.children,a=Math.min(n/t.width,r/t.height),i={scale:a,offset:[(n-t.width*a)/2,(r-t.height*a)/2]};return p.createElement(D,{objects:o,zoom:i})}},{key:"render",value:function(){var e=this.props,t=e.width,n=e.height;return p.createElement("svg",{width:t,height:n,className:"component-preview"},this.renderObjects())}}]),n}(p.Component),D=function(e){(0,c.Z)(n,e);var t=M(n);function n(){return(0,o.Z)(this,n),t.apply(this,arguments)}return(0,a.Z)(n,[{key:"render",value:function(){var e=this.props,t=e.objects,n=e.zoom;return p.createElement("g",{className:"preview-objects"},t.map((function(e){return p.createElement(j.Z,{key:e.id,object:e,zoom:n,transformZoom:n,hideShadows:!1})})))}}]),n}(p.Component);function N(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function T(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?N(Object(n),!0).forEach((function(t){(0,u.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):N(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}(0,d.$j)((function(e,t){var n=t.componentId;return{component:(0,Z.j6)(e,n)}}))(B),n(79748);var I=function(e){(0,c.Z)(f,e);var t,n,d=(t=f,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=(0,s.Z)(t);if(n){var o=(0,s.Z)(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return(0,l.Z)(this,e)});function f(){var e;(0,o.Z)(this,f);for(var t=arguments.length,n=new Array(t),a=0;a<t;a++)n[a]=arguments[a];return e=d.call.apply(d,[this].concat(n)),(0,u.Z)((0,i.Z)(e),"state",{mouseOver:!1,xSnapped:0,ySnapped:0}),(0,u.Z)((0,i.Z)(e),"handleMouseDown",(function(t){var n=e.props,r=n.createObject,o=n.resetTool,a=n.resetSnaps,i=n.component,c=n.options,l=e.state,s=l.xSnapped,u=l.ySnapped,p=l.mouseOver;i&&p&&(r(T(T({},c),{},{x:s,y:u,width:i.width,height:i.height,name:i.name})),o(),a())})),(0,u.Z)((0,i.Z)(e),"getSnappedPoints",(function(t,n){var r=e.props,o=r.component,a=r.xGrid,i=r.yGrid,c=r.zoom,l=r.setXSnap,s=r.setYSnap,u=o.width,p=o.height;if(!a||!i)return[t,n,u,p];var d=0,f=0,h={left:t,center:t+u/2,right:t+u},m={top:n,center:n+p/2,bottom:n+p},v=(0,y.qz)(a,h,c),g=(0,y.qz)(i,m,c);if(v){var b=Object.keys(v)[0];d=v[b]-h[b],l(v[b])}else l(null);if(g){var Z=Object.keys(g)[0];f=g[Z]-m[Z],s(g[Z])}else s(null);return[t+d,n+f]})),(0,u.Z)((0,i.Z)(e),"handleMouseMove",(function(t){var n=e.props,o=n.zoom,a=n.component,i=(0,h.ty)([t.clientX,t.clientY],o),c=(0,r.Z)(i,2),l=c[0],s=c[1];l=Math.round(l-a.width/2),s=Math.round(s-a.height/2);var u=e.getSnappedPoints(l,s),p=(0,r.Z)(u,2),d=p[0],f=p[1];e.setState({xSnapped:d,ySnapped:f,mouseOver:!0})})),(0,u.Z)((0,i.Z)(e),"handleMouseLeave",(function(){e.setState({mouseOver:!1})})),(0,u.Z)((0,i.Z)(e),"renderComponent",(function(){var t=e.props,n=t.zoom,o=t.component,a=e.state,i=a.xSnapped,c=a.ySnapped,l=(0,h.bA)([i,c],n),s=(0,r.Z)(l,2),u=s[0],d=s[1];if(!o)return null;var f=T(T({},n),{},{offset:[0,0]});return p.createElement("g",{transform:"translate(".concat(u,", ").concat(d,")"),opacity:.5},p.createElement(D,{objects:o.children,zoom:f}))})),e}return(0,a.Z)(f,[{key:"render",value:function(){var e=this.props,t=e.component,n=e.resetTool,r=this.state.mouseOver;t||n();var o=window.innerWidth,a=window.innerHeight;return p.createElement("g",{className:"add-component-instance"},p.createElement("rect",{onMouseDown:this.handleMouseDown,onMouseMove:this.handleMouseMove,onMouseLeave:this.handleMouseLeave,onMouseEnter:this.handleMouseMove,x:0,y:0,width:o,height:a,className:"add-component-backdrop"}),r?this.renderComponent():null)}}]),f}(p.Component);const L=(0,d.$j)((function(e,t){var n=t.options;return{component:(0,Z.j6)(e,n&&n.componentId),xGrid:(0,b.L)(e),yGrid:(0,b.WP)(e)}}),{createObject:Z.nW,resetTool:g.bS,setXSnap:b.xd,setYSnap:b.mE,resetSnaps:b.gL})(I);var X=n(26353),U=n(24812),z=n(3227),_=n(77297);function F(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function W(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?F(Object(n),!0).forEach((function(t){(0,u.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):F(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}n(69501);var Y=Math.pow(20,2),G=function(e){(0,c.Z)(f,e);var t,n,d=(t=f,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=(0,s.Z)(t);if(n){var o=(0,s.Z)(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return(0,l.Z)(this,e)});function f(e){var t;(0,o.Z)(this,f),t=d.call(this,e),(0,u.Z)((0,i.Z)(t),"handleMouseUp",(function(e){var n=t.props.startPosition,o=(0,r.Z)(n,2),a=o[0],i=o[1];Math.pow(e.clientX-a,2)+Math.pow(e.clientY-i,2)<Y||t.handleMouseDown(e)})),(0,u.Z)((0,i.Z)(t),"handleMouseDown",(function(e){var n=t.state,r=n.xSnapped,o=n.ySnapped,a=n.widthSnapped,i=n.heightSnapped,c=t.props,l=c.createObject,s=c.resetTool,u=c.resetSnaps,p=c.options,d=p.libraryName,f=p.libraryVersion,h=p.componentName,m=(0,U.av)(d,f).config.components.filter((function(e){return e.name===h}))[0];l(W(W({},p),{},{x:r,y:o,width:a||p.width,height:i||p.height,name:m.displayName})),s(),u()})),(0,u.Z)((0,i.Z)(t),"handleMouseMove",(function(e){var n=t.props,o=n.zoom,a=n.options,i=(0,h.ty)([e.clientX,e.clientY],o),c=(0,r.Z)(i,2),l=c[0],s=c[1];l=Math.round(l-a.width/2),s=Math.round(s-a.height/2);var u=t.getBestParent(l,s),p=t.calculateSnappedPosition(l,s,u),d=(0,r.Z)(p,4),f=d[0],m=d[1],v=d[2],y=d[3];t.setState({mouseOver:!0,x:l,y:s,xSnapped:f,ySnapped:m,widthSnapped:v,heightSnapped:y})})),(0,u.Z)((0,i.Z)(t),"handleMouseLeave",(function(){t.setState({mouseOver:!1})})),(0,u.Z)((0,i.Z)(t),"getBestParent",(function(e,n){var r=t.state,o=r.x,a=r.y;o=e||o,a=n||a;var i=t.props,c=i.options,l=i.screens,s=W(W({},c),{},{x:o,y:a}),u=(0,v.A5)(s,l);return l.filter((function(e){return e.id===u}))[0]})),(0,u.Z)((0,i.Z)(t),"calculateGridSnapPosition",(function(e,n){var r=t.props,o=r.options,a=r.xGrid,i=r.yGrid,c=r.setXSnap,l=r.setYSnap,s=r.zoom,u=o.width,p=o.height;if(!a||!i)return[e,n,u,p];var d=0,f=0,h={left:e,center:e+u/2,right:e+u},m={top:n,center:n+p/2,bottom:n+p},v=(0,y.qz)(a,h,s),g=(0,y.qz)(i,m,s);if(v){var b=Object.keys(v)[0];d=v[b]-h[b],c(v[b])}else c(null);if(g){var Z=Object.keys(g)[0];f=g[Z]-m[Z],l(g[Z])}else l(null);return[Math.round(e+d),Math.round(n+f),u,p]})),(0,u.Z)((0,i.Z)(t),"calculateSnappedPosition",(function(e,n,r){var o=t.props.options;if(!o.snappingRules)return t.calculateGridSnapPosition(e,n);var a=(0,U.Xk)(W(W({},o),{},{x:e,y:n}),r);return[a.x,a.y,a.width,a.height]})),(0,u.Z)((0,i.Z)(t),"renderComponent",(function(){var e=t.props,n=e.zoom,o=e.options,a=e.libraryVersion,i=t.state,c=i.xSnapped,l=i.ySnapped,s=i.widthSnapped,u=i.heightSnapped,d=(0,h.bA)([c,l],n),f=(0,r.Z)(d,2),m=f[0],v=f[1],y=o.width,g=o.height,b=s||y,Z=u||g;y=(0,h.pF)(b,n),g=(0,h.pF)(Z,n);var E=W(W({},o),{},{width:b,height:Z}),A=W(W({},n),{},{offset:[0,0]});return p.createElement("g",{opacity:.5},p.createElement(_.Z,{object:E,zoom:A,libraryVersion:a,x:m,y:v}),p.createElement("g",{transform:"translate(".concat(m,", ").concat(v,")")},p.createElement("rect",{x:0,y:0,width:y,height:g,className:"add-component-outline"})))}));var n=e.startPosition?(0,h.ty)(e.startPosition,e.zoom):[0,0],a=(0,r.Z)(n,2),c=a[0],l=a[1],s=e.options,m=s.width,g=s.height;return c-=Math.floor(m/2),l-=Math.floor(g/2),t.state={x:c,y:l,mouseOver:!!e.startPosition,xSnapped:c,ySnapped:l,widthSnapped:0,heightSnapped:0},t}return(0,a.Z)(f,[{key:"render",value:function(){var e=this.state.mouseOver,t=window.innerWidth,n=window.innerHeight;return p.createElement("g",{className:"add-component-instance"},e?this.renderComponent():null,p.createElement("rect",{onMouseDown:this.handleMouseDown,onMouseUp:this.handleMouseUp,onMouseMove:this.handleMouseMove,onMouseLeave:this.handleMouseLeave,onMouseEnter:this.handleMouseMove,x:0,y:0,width:t,height:n,className:"add-component-backdrop"}))}}]),f}(p.Component);const V=(0,X.EN)((0,d.$j)((function(e,t){var n=t.match,r=t.options;return{screens:(0,Z.sr)(e),xGrid:(0,b.L)(e),yGrid:(0,b.WP)(e),startPosition:(0,g.nr)(e),libraryVersion:(0,z.HF)(e,n.params.appId,r.libraryName)}}),{createObject:Z.nW,resetTool:g.bS,setXSnap:b.xd,setYSnap:b.mE,resetSnaps:b.gL})(G));var q=n(85047),H=n(90278);function $(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function K(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?$(Object(n),!0).forEach((function(t){(0,u.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Q=function(e){(0,c.Z)(g,e);var t,n,d=(t=g,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=(0,s.Z)(t);if(n){var o=(0,s.Z)(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return(0,l.Z)(this,e)});function g(){var e;(0,o.Z)(this,g);for(var t=arguments.length,n=new Array(t),a=0;a<t;a++)n[a]=arguments[a];return e=d.call.apply(d,[this].concat(n)),(0,u.Z)((0,i.Z)(e),"state",{startPoint:null,currentPoint:null,shiftPressed:!1,altPressed:!1}),(0,u.Z)((0,i.Z)(e),"handleKeyDown",(function(t){var n=e.props.resetTool;27===t.which&&n()})),(0,u.Z)((0,i.Z)(e),"getPoint",(function(t){var n=e.props,r=n.zoom,o=n.xGrid,a=n.yGrid,i=n.setXSnap,c=n.setYSnap,l=(0,h.ty)([t.clientX,t.clientY],r);if(!o||!a)return l;var s=(0,y.qz)(o,{x:l[0]},r),u=(0,y.qz)(a,{y:l[1]},r);return i(s&&s.x),c(u&&u.y),[s?s.x:l[0],u?u.y:l[1]]})),(0,u.Z)((0,i.Z)(e),"handleMouseDown",(function(t){return e.setState({startPoint:e.getPoint(t)})})),(0,u.Z)((0,i.Z)(e),"handleMouseMove",(function(t){return e.setState({currentPoint:e.getPoint(t),shiftPressed:t.shiftKey,altPressed:t.altKey})})),(0,u.Z)((0,i.Z)(e),"handleMouseUp",(function(t){var n=e.props,o=n.createObject,a=n.resetTool,i=n.objectAttributes,c=(n.zoom,e.state.startPoint);if(c){var l=e.getRect();if(a(),l)i.type===f.GP&&(i=K(K({},i),{},{autoWidth:!1})),i.type===f.Ou&&(i=K({},(0,H.MC)(K(K({},i),l)))),(l.width>0||l.height>0)&&o(K(K({},i),l));else if(i.type===f.GP){var s=(0,r.Z)(c,2),u=s[0],p=s[1];u=Math.round(u),p=Math.round(p)-8,o(K(K({},i),{},{x:u,y:p}))}}})),(0,u.Z)((0,i.Z)(e),"getRect",(function(){var t=e.state,n=t.startPoint,r=t.currentPoint,o=t.shiftPressed,a=t.altPressed;if(!n||!r||n[0]===r[0]&&n[1]===r[1])return null;var i=r[0]-n[0],c=r[1]-n[1],l=i?i/Math.abs(i):1,s=c?c/Math.abs(c):1;if(o){var u=Math.max(Math.abs(i),Math.abs(c));r=[n[0]+l*u,n[1]+s*u]}return a&&(n=[n[0]-(r[0]-n[0]),n[1]-(r[1]-n[1])]),(0,v.fW)(n,r,!0)})),e}return(0,a.Z)(g,[{key:"componentDidMount",value:function(){document.addEventListener("keydown",this.handleKeyDown)}},{key:"componentWillUnmount",value:function(){var e=this.props.resetSnaps;document.removeEventListener("keydown",this.handleKeyDown),e()}},{key:"render",value:function(){var e=this.props,t=e.objectAttributes,n=e.tool,r=e.zoom,o=e.platform,a=(0,h.Px)(this.getRect(),r),i=0;return a&&t.borderRadius&&(i=Math.min(a.width/2,a.height/2,(0,h.pF)(t.borderRadius,r))),n===m.pf&&(i=1e5),n===m.ox?p.createElement(E.Z,{zoom:r}):n===m.uk?p.createElement(S,{zoom:r}):n===m.CY?p.createElement(L,{zoom:r,options:t}):n===m.u1?("web"!==o&&t.width>375&&(t.width=375),p.createElement(V,{zoom:r,options:t})):n===m.$7?p.createElement(q.Z,{zoom:r,options:t}):p.createElement("g",{onMouseDown:this.handleMouseDown,onMouseMove:this.handleMouseMove,onMouseUp:this.handleMouseUp,pointerEvents:"all"},p.createElement("rect",{x:0,y:0,width:window.innerWidth,height:window.innerHeight,style:{fill:"none"}}),a&&p.createElement("rect",{x:a.x-.5,y:a.y-.5,width:a.width+1,height:a.height+1,rx:i,ry:i,style:{fill:"none",stroke:"#808080",strokeWidth:.5}}))}}]),g}(p.Component);const J=(0,d.$j)((function(e){return{objectAttributes:(0,g.rs)(e),xGrid:(0,b.L)(e),yGrid:(0,b.WP)(e),platform:(0,Z.Xf)(e)}}),{createObject:Z.nW,resetTool:g.bS,setXSnap:b.xd,setYSnap:b.mE,resetSnaps:b.gL})(Q)},66400:(e,t,n)=>{"use strict";n.d(t,{Z:()=>m});var r=n(81253),o=n(22122),a=n(6610),i=n(5991),c=n(66213),l=n(10379),s=n(46070),u=n(77608),p=n(67294),d=n(42281),f=n(59274),h=(n(6789),["xScaled","yScaled","points","zoom","hideShadows","shadow","x","y","width","height"]);var m=function(e){(0,l.Z)(m,e);var t,n,d=(t=m,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=(0,u.Z)(t);if(n){var o=(0,u.Z)(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return(0,s.Z)(this,e)});function m(){return(0,a.Z)(this,m),d.apply(this,arguments)}return(0,i.Z)(m,[{key:"getPathData",value:function(){this.dimension=[];var e=this.props,t=e.width,n=e.height,r=e.points,o=e.compound,a=e.isClosed,i=e.zoom,c=e.x,l=e.y;if(this.path=f.XV.create(),o&&o.length>0)this.path=f.XV.create(o);else if(r&&r.length>0)this.path=f.XV.create(r);else{for(var s=4*(Math.sqrt(2)-1)/3,u=[new f.XX([-1,0],[0,s],[0,-s]),new f.XX([0,-1],[-s,0],[s,0]),new f.XX([1,0],[0,-s],[0,s]),new f.XX([0,1],[s,0],[-s,0])],p=new f.E9(c,l),d=new f.E9(t/2,n/2),h=new Array(4),m=0;m<4;m++){var v=u[m];h[m]=new f.XX(v._point.multiply(d).add(p),v._handleIn.multiply(d),v._handleOut.multiply(d))}this.path=f.XV.create(h)}return this.path.setClosed(a),this.path.scale(i.scale),this.path.adjust(c,l),this.path.getPathData()}},{key:"doubleClickHandler",value:function(){return this.isSelected()?this.props.onEdit():(0,c.Z)((0,u.Z)(m.prototype),"doubleClickHandler",this).call(this)}},{key:"renderDimesion",value:function(){}},{key:"renderPath",value:function(){return p.createElement("path",(0,o.Z)({},this.getBorderProps(),{fill:this.getBackgroundColor(),d:this.getPathData()}))}},{key:"render",value:function(){var e=this.props,t=(e.xScaled,e.yScaled,e.points,e.zoom,e.hideShadows,e.shadow,e.x,e.y,e.width,e.height,(0,r.Z)(e,h));return p.createElement("g",{className:"shape"},p.createElement("g",{className:"shape",onMouseDown:this.handleMouseDown,onDoubleClick:this.handleDoubleClick,style:t},this.renderPath()),this.dimension&&p.createElement("g",{className:"shape-editor-size"},this.dimension.map((function(e,t){return p.createElement("g",null,p.createElement("line",{className:"shape-editor-line-angle",x1:e[0],y1:e[1],x2:e[2],y2:e[3]}))}))))}}]),m}(d.Z)},88754:(e,t,n)=>{"use strict";n.d(t,{Z:()=>E});var r=n(6610),o=n(5991),a=n(63349),i=n(10379),c=n(46070),l=n(77608),s=n(96156),u=n(67294),p=n(37703),d=n(39661),f=n(98214);const h=n.p+"empty-state.png";var m=n(93379),v=n.n(m),y=n(13126);v()(y.Z,{insert:"head",singleton:!1}),y.Z.locals;var g=u.createElement("img",{src:h,alt:"browser and mobile screen",height:220}),b=u.createElement("h1",null,"The possibilities are endless!"),Z=function(e){(0,i.Z)(h,e);var t,n,p=(t=h,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=(0,l.Z)(t);if(n){var o=(0,l.Z)(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return(0,c.Z)(this,e)});function h(){var e;(0,r.Z)(this,h);for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return e=p.call.apply(p,[this].concat(n)),(0,s.Z)((0,a.Z)(e),"handleClick",(function(t){return t.preventDefault(),(0,e.props.showModal)(d.fk,{zoom:!0})})),e}return(0,o.Z)(h,[{key:"render",value:function(){return u.createElement(f.Z,{greedy:!0,className:"editor-empty-canvas"},g,b,u.createElement("p",null,u.createElement("a",{className:"add-screen-link",onClick:this.handleClick},"Add a screen")," ","to begin creating your masterpiece."))}}]),h}(u.Component);const E=(0,p.$j)(null,{showModal:d.K4})(Z)},49093:(e,t,n)=>{"use strict";n.d(t,{Z:()=>v});var r=n(28481),o=n(6610),a=n(5991),i=n(10379),c=n(46070),l=n(77608),s=n(67294),u=n(37703),p=(n(94184),n(81129)),d=n(71707),f=n(3227),h=n(61145);n(19057);var m=function(e){(0,i.Z)(d,e);var t,n,u=(t=d,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=(0,l.Z)(t);if(n){var o=(0,l.Z)(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return(0,c.Z)(this,e)});function d(){return(0,o.Z)(this,d),u.apply(this,arguments)}return(0,a.Z)(d,[{key:"render",value:function(){var e=this.props,t=e.component,n=e.zoom,o=t.x,a=t.y,i=t.width,c=t.height,l=(0,p.bA)([o,a],n),u=(0,r.Z)(l,2),d=u[0],f=u[1],h=(0,p.pF)(i,n),m=(0,p.pF)(c,n),v=(0,r.Z)(n.offset,2),y=v[0],g=v[1],b=window,Z=b.innerWidth,E=b.innerHeight,A=d>0?Math.min(h,Z-d):Math.min(h+d,Z),w=f>0?Math.min(m,E-f):Math.min(m+f,E),O=(0,p.fr)(n,!0,o,a),C=y>0?0:Math.abs(y),P=g>0?0:Math.abs(g),x=function(e,t,n,r){var o=arguments.length>4&&void 0!==arguments[4]&&arguments[4],a=1/.2645833333,i=2,c=a*((r=r||1)||1),l=[],s=1,u=10;if(c<30){s=(Math.floor(30/c/u)+1)*u;var p=Math.floor((c=a*r*s)/30);p>1&&(c=a*r*(s=(Math.round(30/c/(u=p>5?2:5))+1)*u))}var d,f,h,m,v=n-Math.ceil(n/c)*c,y=v,g=c/u;for(m=e;y<m;){var b=void 0,Z=void 0;for(d=.5+~~y,b=o?[t,d]:[d,t],Z=o?[0,d]:[d,0],l.push([b,Z,Math.round((y-n)/c*s)]),h=1;h<u;h++)f=~~y+g*h+.5,b=o?[t,f]:[f,t],Z=o?[0,f]:[f,0],l.push([b,Z,((y-n+g*h)/c*s).toFixed(i)]);y+=c}return l},k=x(A,w,y-Math.max(O.x,0),n.scale),R=x(w,A,g-Math.max(O.y,0),n.scale,!0);return n.scale<=.15?null:s.createElement("g",null,k.map((function(e){return s.createElement("line",{x1:(C+e[0][0])/n.scale,y1:(P+e[0][1])/n.scale,value:e[2],x2:(C+e[1][0])/n.scale,y2:(P+e[1][1])/n.scale,strokeWidth:1/(10*n.scale),stroke:"#000"})})),R.map((function(e){return s.createElement("line",{x1:(C+e[0][0])/n.scale,y1:(P+e[0][1])/n.scale,value:e[2],x2:(C+e[1][0])/n.scale,y2:(P+e[1][1])/n.scale,strokeWidth:1/(10*n.scale),stroke:"#000"})})))}}]),d}(s.Component);const v=(0,u.$j)((function(e){return{branding:(0,f.WS)(e,(0,h.i3)(e))||d.ST}}))(m)},32939:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var r=n(6610),o=n(5991),a=n(10379),i=n(46070),c=n(77608),l=n(67294);var s=function(e){(0,a.Z)(u,e);var t,n,s=(t=u,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=(0,c.Z)(t);if(n){var o=(0,c.Z)(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return(0,i.Z)(this,e)});function u(){return(0,r.Z)(this,u),s.apply(this,arguments)}return(0,o.Z)(u,[{key:"render",value:function(){var e=this.props,t=e.children,n={opacity:e.object.opacity};return l.createElement("g",{className:"group",style:n},t)}}]),u}(l.Component)},39539:(e,t,n)=>{"use strict";n.d(t,{Z:()=>C});var r=n(96156),o=n(6610),a=n(5991),i=n(10379),c=n(46070),l=n(77608),s=n(67294),u=n(37703),p=n(61145),d=n(62012),f=n(80503),h=n(28481),m=n(90955),v=n(94184),y=n.n(v),g=n(81129);function b(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Z(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?b(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):b(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var E=function(e){(0,i.Z)(u,e);var t,n,r=(t=u,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=(0,l.Z)(t);if(n){var o=(0,l.Z)(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return(0,c.Z)(this,e)});function u(){return(0,o.Z)(this,u),r.apply(this,arguments)}return(0,a.Z)(u,[{key:"render",value:function(){var e=this.props,t=e.object,n=e.zoom,r=e.yOffset,o=e.isHover;if(!t)return null;t.type===m.NV&&r&&(t=Z(Z({},t),{},{y:t.y+r,height:t.height-r}));var a=(0,g.bA)([t.x,t.y],n),i=(0,h.Z)(a,2),c=i[0],l=i[1],u=(0,g.pF)(t.width,n)||0,p=(0,g.pF)(t.height,n)||0,d=Math.round(c+.5)-.5,f=Math.round(l+.5)-.5,v=Math.round(c+u+.5)-.5,b=Math.round(l+p+.5)-.5;o&&t.type===m.NV&&(d-=3.5,f-=3.5,v+=3.5,b+=3.5);var E=v-d,A=b-f,w=Number.isNaN;return w(d)||w(f)||w(E)||w(A)?null:s.createElement("g",{className:"hover-selection",transform:"translate(".concat(d,", ").concat(f,")")},s.createElement("rect",{x:0,y:0,width:E,height:A,className:y()("hover-selection-box",{thicc:o&&t.type===m.NV})}))}}]),u}(s.Component);function A(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function w(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?A(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):A(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}n(80443);var O=function(e){(0,i.Z)(u,e);var t,n,r=(t=u,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=(0,l.Z)(t);if(n){var o=(0,l.Z)(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return(0,c.Z)(this,e)});function u(){return(0,o.Z)(this,u),r.apply(this,arguments)}return(0,a.Z)(u,[{key:"render",value:function(){var e=this.props,t=e.marquee,n=e.objects,r=e.zoom,o=e.yOffset;return t||0===n.length?null:s.createElement("g",null,n.map((function(e){return e&&s.createElement(E,{isHover:!0,key:e.id,object:e,zoom:r,yOffset:o})})))}}]),u}(s.Component);const C=(0,u.$j)((function(e){var t=(0,d.Pr)(e);return{objects:(t=t.filter((function(t){return-1===(0,d.Mf)(e).indexOf(t)}))).map((function(t){return w(w({},(0,p.j6)(e,t)),(0,p.vi)(e,t))})),zoom:(0,p.aB)(e),marquee:(0,f.LJ)(e),yOffset:(0,p.Gr)(e)}}))(O)},83885:(e,t,n)=>{"use strict";n.d(t,{Z:()=>D});var r=n(85061),o=n(28481),a=n(6610),i=n(5991),c=n(63349),l=n(10379),s=n(46070),u=n(77608),p=n(96156),d=n(67294),f=n(37703),h=n(98605),m=n.n(h),v=n(21090),y=n(45145),g=n(83686),b=n(61312),Z=n(61145),E=n(97814),A=n(62012),w=n(89926),O=n(62088),C=n(66113);function P(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function x(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?P(Object(n),!0).forEach((function(t){(0,p.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):P(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}for(var k={},R=0,S=Object.keys(g.j);R<S.length;R++){var j=S[R],M=g.j[j].toUpperCase().charCodeAt(0);k[M]=j}var B=function(e){(0,l.Z)(h,e);var t,n,f=(t=h,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=(0,u.Z)(t);if(n){var o=(0,u.Z)(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return(0,s.Z)(this,e)});function h(){var e;(0,a.Z)(this,h);for(var t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];return e=f.call.apply(f,[this].concat(n)),(0,p.Z)((0,c.Z)(e),"handleKeyDown",(function(t){var n=t.which,a=e.props,i=a.editing,c=a.setZoom,l=a.resetZoom;if((0,b.J)(t)){var s=e.props,u=s.undo,p=s.redo;if(n===y.Z&&t.shiftKey?(t.preventDefault(),p()):n===y.Z&&(t.preventDefault(),u()),n===y.G){t.preventDefault();var d=e.props,f=d.groupObjects,h=d.ungroupObjects,m=d.selection;t.shiftKey?h(m):f(m)}if(n===y.LH){t.preventDefault();var v=e.props,g=v.reorderObjectsMoveFirst,Z=v.reorderObjectsMoveUp,E=v.selection;t.shiftKey?g(E):Z(E)}if(n===y.JH){t.preventDefault();var A=e.props,w=A.reorderObjectsMoveLast,O=A.reorderObjectsMoveDown,C=A.selection;t.shiftKey?w(C):O(C)}y.ho.includes(n)&&(t.preventDefault(),c(null,null,Math.sqrt(2))),y.tD.includes(n)&&(t.preventDefault(),c(null,null,1/Math.sqrt(2))),n===y.xE?(t.preventDefault(),c(1)):n===y.ry&&(t.preventDefault(),l())}else if(t.target===document.body){var P=e.props,x=P.deleteObject,R=P.positionObjects,S=P.selection,j=P.setTool,M=P.selectedPoint,B=P.toggleConnections,D=P.editingObject,N=(P.editingComponent,t.shiftKey?10:1);if(i){if(n===y.yY){if(D&&null!==M){var T=[].concat((0,r.Z)(D.points.slice(0,M)),(0,r.Z)(D.points.slice(M+1)));T.slice(M,1),e.updateObject({points:T},"removePoint-".concat(+new Date))}t.preventDefault()}}else{if(y.Zl.includes(n)){var I=(0,o.Z)(y.Xc[n],2),L=I[0],X=I[1];S.length>0?R(S,{x:N*L,y:N*X},!1,!1):c(null,null,null,[-100*L,-100*X])}n!==y.yY&&n!==y.ZH||(x(S),t.preventDefault())}n===y.Bs&&(t.preventDefault(),(0,e.props.setPan)(!0)),t.shiftKey&&n===y.L&&B();var U=k[n];U&&j(U,{})}})),(0,p.Z)((0,c.Z)(e),"updateObject",(function(t,n){var r=e.props,o=r.editingObject,a=r.updateObject,i=x(x({},o),t);n&&(e._lastUndoKey=n),a(o.id,i,e._lastUndoKey||"vector")})),(0,p.Z)((0,c.Z)(e),"handleKeyUp",(function(t){var n=t.which;if(t.target===document.body&&(n===y.Bs&&(t.preventDefault(),(0,e.props.setPan)(!1)),y.Zl.includes(n))){var r=e.props,o=r.positionObjects,a=r.selection;a.length>0&&o(a,{x:0,y:0})}})),e}return(0,i.Z)(h,[{key:"render",value:function(){return d.createElement(m(),{onKeyDown:this.handleKeyDown,onKeyUp:this.handleKeyUp})}}]),h}(d.Component);const D=(0,f.$j)((function(e){return{selection:(0,A.Mf)(e),selectedPoint:(0,O.ee)(e),editingShape:(0,O.ni)(e),editingObject:(0,Z.j6)(e,(0,O.ni)(e)),editingComponent:(0,Z.j6)(e,(0,Z.TY)(e,(0,O.ni)(e))),editing:!(!(0,O.ni)(e)&&!(0,w._R)(e))}}),{deleteObject:Z.oq,groupObjects:Z.Jo,ungroupObjects:Z.wr,positionObjects:Z.aN,setTool:E.Cc,setZoom:Z.cq,setPan:Z.eM,resetZoom:Z.uN,updateObject:Z.v4,undo:v.zF.undo,redo:v.zF.redo,toggleConnections:C.Kk,reorderObjectsMoveFirst:Z.EM,reorderObjectsMoveLast:Z.a9,reorderObjectsMoveUp:Z.RK,reorderObjectsMoveDown:Z.kj})(B)},15746:(e,t,n)=>{"use strict";n.d(t,{Z:()=>C});var r=n(22122),o=n(81253),a=n(6610),i=n(5991),c=n(63349),l=n(66213),s=n(10379),u=n(46070),p=n(77608),d=n(96156),f=n(67294),h=n(94184),m=n.n(h),v=n(90955),y=n(10702),g=n(39240),b=n(81129),Z=n(7065),E=n(72982),A=(n(75629),["branding","text","layoutText","x","y","width","height","xScaled","yScaled","widthScaled","heightScaled","selected","editing","fontSize","textAlignment","elementRef","onChange","onSelect","zoom"]);function w(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function O(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?w(Object(n),!0).forEach((function(t){(0,d.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):w(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var C=function(e){(0,s.Z)(E,e);var t,n,h=(t=E,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=(0,p.Z)(t);if(n){var o=(0,p.Z)(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return(0,u.Z)(this,e)});function E(){var e;(0,a.Z)(this,E);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return e=h.call.apply(h,[this].concat(n)),(0,d.Z)((0,c.Z)(e),"handleFontFamily",(function(){var t=e.props,n=t.branding,r=t.fontFamily;return(0,Z.BN)(r,n)})),e}return(0,i.Z)(E,[{key:"doubleClickHandler",value:function(){return this.isSelected()?this.props.onEdit():(0,l.Z)((0,p.Z)(E.prototype),"doubleClickHandler",this).call(this)}},{key:"getBorderProps",value:function(){if(!this.props.id)return{strokeWidth:2,stroke:"#e0e0e0",rx:4,ry:4}}},{key:"render",value:function(){var e=this.props,t=(e.branding,e.text,e.layoutText),n=(e.x,e.y,e.width,e.height,e.xScaled),a=e.yScaled,i=e.widthScaled,c=e.heightScaled,l=(e.selected,e.editing),s=e.fontSize,u=e.textAlignment,p=(e.elementRef,e.onChange,e.onSelect,e.zoom),d=(0,o.Z)(e,A);s=(0,b.pF)(s,p);var h="start",Z=n;t=(0,g.UM)(this.props).map((function(e){return e.trim()})),l&&(d.opacity=0),u===v.w3?(h="middle",Z+=i/2):u===v.gg&&(h="end",Z+=i),d.fontFamily=this.handleFontFamily();var E=this.getColor(d.color||"@text");return f.createElement("g",{className:m()("label",{"label-editing":l}),onMouseDown:this.handleMouseDown,onDoubleClick:this.handleDoubleClick,style:O(O({},d),{},{fontSize:"".concat(s,"px")})},f.createElement("rect",(0,r.Z)({x:n,y:a,width:i,height:c,fill:"transparent"},this.getBorderProps())),f.createElement("text",{className:"label-text",y:a,x:Z,fill:E,textAnchor:h,style:O({},d)},t.map((function(e,t){return f.createElement("tspan",{key:t,alignmentBaseline:"text-before-edge",x:Z,y:a+t*s*1.15+((0,y.v)()?s:0)||0},e)}))))}}]),E}(E.Z);C.defaultProps={yScaled:0,y:0}},85136:(e,t,n)=>{"use strict";n.d(t,{Z:()=>g});var r=n(6610),o=n(5991),a=n(10379),i=n(46070),c=n(77608),l=n(67294),s=n(26353),u=n(37703),p=n(61145),d=n(3227),f=n(63349),h=n(96156);var m=function(e){(0,a.Z)(s,e);var t,n,l=(t=s,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=(0,c.Z)(t);if(n){var o=(0,c.Z)(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return(0,i.Z)(this,e)});function s(){var e;(0,r.Z)(this,s);for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return e=l.call.apply(l,[this].concat(n)),(0,h.Z)((0,f.Z)(e),"handleAutoChange",(function(){window.setTimeout((function(){var t=e.props,n=t.appId,r=t.component,o=t.objects,a=t.onChangeComponent;!r&&o.length>0&&a(n,o[0].id)}),50)})),e}return(0,o.Z)(s,[{key:"render",value:function(){var e=this.props,t=e.component,n=e.objects;return!t&&n.length>0&&this.handleAutoChange(),null}}]),s}(l.Component);const v=(0,u.$j)((function(e,t){return t.type,{allComponents:(0,p.sr)(e)}}))(m);n(7860);var y=function(e){(0,a.Z)(u,e);var t,n,s=(t=u,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=(0,c.Z)(t);if(n){var o=(0,c.Z)(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return(0,i.Z)(this,e)});function u(){return(0,r.Z)(this,u),s.apply(this,arguments)}return(0,o.Z)(u,[{key:"render",value:function(){var e=this.props,t=e.launchComponent,n=e.authComponent,r=e.zoom,o=e.match,a=e.setLaunchComponentId,i=e.setAuthComponentId,c=e.objects,s=o.params.appId;return l.createElement("div",{className:"launch-component-indicators"},l.createElement(v,{appId:s,component:t,zoom:r,onChangeComponent:a,name:"Returning User",type:"home",offset:20,objects:c}),l.createElement(v,{appId:s,component:n,zoom:r,onChangeComponent:i,name:"New User",type:"auth",offset:-20,objects:c}))}}]),u}(l.Component);const g=(0,s.EN)((0,u.$j)((function(e,t){var n=t.match;return{launchComponent:(0,p.j6)(e,(0,d.bu)(e,n.params.appId)),authComponent:(0,p.j6)(e,(0,d.l3)(e,n.params.appId)),objects:(0,p.sr)(e)}}),{setLaunchComponentId:d.oC,setAuthComponentId:d.lQ})(y))},77297:(e,t,n)=>{"use strict";n.d(t,{Z:()=>B});var r=n(22122),o=n(6610),a=n(5991),i=n(63349),c=n(10379),l=n(46070),s=n(77608),u=n(96156),p=n(67294),d=n(26353),f=n(37703),h=n(24812),m=n(74370),v=n(81129),y=n(7065),g=n(31475),b=n(61145),Z=n(3227),E=(n(45697),function(e){var t=e.offsetX,n=e.offsetY,r=e.boundingWidth,o=e.boundingHeight,a=e.zoom,i=e.styleHeight,c=e.children,l=Math.floor(t),s=Math.floor(n),u=t%1,d=n%1;return p.createElement("foreignObject",{x:l,y:s,width:r,height:o,pointerEvents:"none",transform:"translate(".concat(u,",").concat(d,")")},p.createElement("div",{className:"library-component-inner-wrapper",style:{transform:"scale(".concat(a.scale,")"),transformOrigin:"left top",width:"".concat(1/a.scale*100,"%"),zIndex:-1}},p.createElement("div",{style:{padding:20,height:i}},c)))});const A=p.memo(E);var w=p.createElement("br",null),O=p.createElement("br",null),C=function(e){var t,n,r=e.object;return p.createElement("div",{className:"library-component-error"},"Missing Component: ",null==r?void 0:r.libraryName,".",null==r?void 0:r.componentName,null!=r&&null!==(t=r.libraryName)&&void 0!==t&&t.toLowerCase().includes("ad")||null!=r&&null!==(n=r.componentName)&&void 0!==n&&n.toLowerCase().includes("ad")?p.createElement(p.Fragment,null,w,O,p.createElement("span",null,"Make sure your ad blocker is disabled to use the"," ",r.componentName," component.")):null)};const P=p.memo(C);var x=n(93379),k=n.n(x),R=n(62112);function S(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function j(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?S(Object(n),!0).forEach((function(t){(0,u.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):S(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}k()(R.Z,{insert:"head",singleton:!1}),R.Z.locals;var M=function(e){(0,c.Z)(f,e);var t,n,d=(t=f,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=(0,s.Z)(t);if(n){var o=(0,s.Z)(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return(0,l.Z)(this,e)});function f(){var e;(0,o.Z)(this,f);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return e=d.call.apply(d,[this].concat(n)),(0,u.Z)((0,i.Z)(e),"shouldComponentUpdate",(function(t){for(var n=0,r=["object","zoom","libraryVersion","branding","libraryGlobals"];n<r.length;n++){var o=r[n];if(t[o]!==e.props[o])return!0}return!1})),e}return(0,a.Z)(f,[{key:"renderLoading",value:function(){return null}},{key:"render",value:function(){var e=this.props,t=e.object,n=e.zoom,o=e.libraryVersion,a=e.getLabel,i=e.match,c=e.x,l=e.y,s=e.branding,u=e.libraryGlobals,d=i.params.appId,f=t.width,m=t.height,g=t.libraryName,b=t.componentName,Z=(0,h.UZ)(g,o,b),E=(0,h.Mo)(g,o,b),w=(0,v.pF)(f+40,n),O=(0,v.pF)(m+40,n),C=c-(0,v.pF)(20,n),x=l-(0,v.pF)(20,n),k=(0,v.pF)(f,n),R=(0,v.pF)(m,n),S={boundingHeight:O,boundingWidth:w,offsetX:C,offsetY:x,zoom:n,styleHeight:null!=E&&E.resizeY?m+40:void 0};if(!Z||!E)return p.createElement(A,S,p.createElement(P,{object:t}));var M=j(j({},(0,h.bd)(E,t.attributes,a,{branding:s,libraryGlobals:u})),{},{appId:d,_fonts:{body:(0,y.kG)("@body",s),heading:(0,y.kG)("@heading",s)},_width:f,_height:m,_getUserValue:function(){return Promise.resolve(null)},_setUserValue:function(e,t){return Promise.resolve(t)}});return p.createElement("g",null,p.createElement(A,S,p.createElement(Z,(0,r.Z)({},M,{editor:!0}))),p.createElement("rect",{x:c,y:l,width:k,height:R,fill:"none",stroke:"none"}))}}]),f}(p.Component);const B=(0,d.EN)((0,f.$j)((function(e,t){var n=t.match,r=t.object,o=t.libraryVersion;return{status:(0,g.In)(e,r.libraryName,o),getLabel:function(t){return(0,m.xK)(e,t,n.params.appId,n.params.componentId)},branding:(0,Z.WS)(e,n.params.appId),libraryGlobals:(0,b.wR)(e,r.libraryName,r.componentName)}}))(M))},72036:(e,t,n)=>{"use strict";n.d(t,{Z:()=>x});var r=n(87757),o=n.n(r),a=n(92137),i=n(6610),c=n(5991),l=n(63349),s=n(10379),u=n(46070),p=n(77608),d=n(96156),f=n(67294),h=n(37703),m=n(3227),v=n(61145),y=n(31475),g=n(8808),b=n(69425),Z=n(58796),E=n(81129),A=n(23668),w=n(72982),O=n(77297);var C=f.createElement(A.Z,{small:!0,expanded:!0}),P=function(e){(0,s.Z)(h,e);var t,n,r=(t=h,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=(0,p.Z)(t);if(n){var o=(0,p.Z)(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return(0,u.Z)(this,e)});function h(){var e;(0,i.Z)(this,h);for(var t=arguments.length,n=new Array(t),c=0;c<t;c++)n[c]=arguments[c];return e=r.call.apply(r,[this].concat(n)),(0,d.Z)((0,l.Z)(e),"state",{isLoading:!1}),(0,d.Z)((0,l.Z)(e),"handleLibraryUpdate",function(){var t=(0,a.Z)(o().mark((function t(n){var r,a,i,c;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=e.props,a=r.libraryName,i=r.libraryVersion,c=r.requestLibrary,a===n){t.next=3;break}return t.abrupt("return",null);case 3:return e.setState({isLoading:!0}),t.next=6,c(a,i);case 6:e.setState({isLoading:!1});case 7:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()),(0,d.Z)((0,l.Z)(e),"librarySocket",(function(){var e=(0,Z.bW)();return e&&(0,b.Hn)(e)})),(0,d.Z)((0,l.Z)(e),"renderLoading",(function(){var t=e.props,n=t.xScaled,r=t.yScaled,o=t.zoom,a=t.object,i=a.height,c=a.width,l=(0,E.pF)(c+40,o),s=(0,E.pF)(i+40,o),u=n-(0,E.pF)(20,o),p=r-(0,E.pF)(20,o);return f.createElement("foreignObject",{x:u,y:p,width:l,height:s,pointerEvents:"none"},C)})),e}return(0,c.Z)(h,[{key:"componentDidMount",value:function(){var e=this.props.currentUser;if(null!=e&&e.developer){var t=this.librarySocket();t&&t.on("libraryUpdates",this.handleLibraryUpdate)}}},{key:"componentWillUnmount",value:function(){var e=this.props.currentUser;if(null!=e&&e.developer){var t=this.librarySocket();t&&t.off("libraryUpdates",this.handleLibraryUpdate)}}},{key:"render",value:function(){var e=this.props,t=e.xScaled,n=e.yScaled,r=e.zoom,o=e.libraryVersion,a=e.object,i=this.state.isLoading,c=a;return f.createElement("g",{onMouseDown:this.handleMouseDown,onDoubleClick:this.handleDoubleClick},i?this.renderLoading():f.createElement(O.Z,{object:c,libraryVersion:o,zoom:r,x:t,y:n,isLoading:i}))}}]),h}(w.Z);const x=(0,h.$j)((function(e,t){t.id;var n=t.libraryName,r=(0,v.i3)(e);return{currentUser:(0,g.ts)(e),libraryVersion:(0,m.HF)(e,r,n)}}),{loadComponent:m.yC,requestLibrary:y.Rt})(P)},43530:(e,t,n)=>{"use strict";n.d(t,{Z:()=>v});var r=n(22122),o=n(81253),a=n(6610),i=n(5991),c=n(10379),l=n(46070),s=n(77608),u=n(67294),p=n(94184),d=n.n(p),f=n(90955),h=n(42281),m=["xScaled","yScaled","widthScaled","heightScaled","selected","borderRadius","zoom","width","height","hideShadows","children"];var v=function(e){(0,c.Z)(h,e);var t,n,p=(t=h,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=(0,s.Z)(t);if(n){var o=(0,s.Z)(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return(0,l.Z)(this,e)});function h(){return(0,a.Z)(this,h),p.apply(this,arguments)}return(0,i.Z)(h,[{key:"getRenderOffset",value:function(){if(this.props.borderStyle!==f.$u.NONE)switch(this.props.borderPosition){case f.iX.INSIDE:return.5*this.getBorderWidth();case f.iX.OUTSIDE:return-.5*this.getBorderWidth()}return 0}},{key:"render",value:function(){var e=this.props,t=e.xScaled,n=e.yScaled,a=e.widthScaled,i=(e.heightScaled,e.selected),c=(e.borderRadius,e.zoom,e.width,e.height,e.hideShadows,e.children),l=(0,o.Z)(e,m),s=this.getBorderProps(),p=this.getRenderOffset();return t+=p,n+=p,a-=2*p,u.createElement("g",{className:d()("section",{"section-selected":i}),onMouseDown:this.handleMouseDown,onDoubleClick:this.handleDoubleClick,transform:"translate(".concat(t,", ").concat(n,")"),style:l},u.createElement("line",(0,r.Z)({},s,{x:0,y:0,x2:a,y2:0})),u.createElement("line",(0,r.Z)({},s,{strokeDasharray:"none",stroke:"transparent",x:0,y:0,x2:a,y2:0})),c)}}]),h}(h.Z)},95835:(e,t,n)=>{"use strict";var r=n(6610),o=n(5991),a=n(63349),i=n(10379),c=n(46070),l=n(77608),s=n(96156),u=n(67294),p=n(37703),d=n(26353),f=n(10251),h=n.n(f),m=n(94184),v=n.n(m),y=n(44127),g=n(3227),b=n(61145),Z=n(13716),E=n(93379),A=n.n(E),w=n(66736);function O(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function C(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?O(Object(n),!0).forEach((function(t){(0,s.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):O(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function P(e){var t=e.source,n=e.target,r=e.zoom,o=e.selected;if(!t||!n)return null;var a=(0,Z.ds)(t,n,r),i=(0,Z.fq)(t,n,r);return u.createElement("g",{className:v()("link-wrapper",o&&"link-wrapper-selected")},u.createElement("path",{className:"link-hover-path",d:a}),u.createElement("path",{className:"link-path",d:a}),u.createElement("path",{className:"link-arrow",d:i}))}A()(w.Z,{insert:"head",singleton:!1}),w.Z.locals;var x=function(e){(0,i.Z)(d,e);var t,n,p=(t=d,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=(0,l.Z)(t);if(n){var o=(0,l.Z)(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return(0,c.Z)(this,e)});function d(){var e;(0,r.Z)(this,d);for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return e=p.call.apply(p,[this].concat(n)),(0,s.Z)((0,a.Z)(e),"getScreen",(function(t){var n=e.props,r=n.screens[n.screensMap[t]];return r?(0,y.A5)([r]):null})),(0,s.Z)((0,a.Z)(e),"getSelectedScreens",(function(){var t=e.props,n=t.screens,r=t.screensMap,o=t.selection.map((function(e){return(0,y.fw)(r[e],1)}));return(o=(0,y.bF)(o)).map((function(e){var t;return null===(t=(0,y.RK)(n,e))||void 0===t?void 0:t.id}))})),(0,s.Z)((0,a.Z)(e),"render",(function(){var t=e.props,n=t.inboundLinks,r=t.zoom,o=e.getSelectedScreens();return u.createElement("g",{className:v()("canvas-link-map",o.length>0&&"canvas-link-map-selected")},Object.keys(n).map((function(t){return u.createElement(u.Fragment,{key:t},n[t].map((function(n){return u.createElement(P,{key:n,source:e.getScreen(n),target:e.getScreen(t),zoom:r,selected:o.includes(n)||o.includes(t)})})))})))})),e}return(0,o.Z)(d,[{key:"shouldComponentUpdate",value:function(e){var t=this.props,n=t.inboundLinks,r=t.screens,o=t.zoom,a=t.selection;if(o!==e.zoom||a!==e.selection)return!0;for(var i=0,c=Object.keys(C(C({},r),e.screens));i<c.length;i++){var l=c[i],s=e.screens[l],u=r[l];if(!s||!u)return!0;if(s.x!==u.x||s.y!==u.y||s.width!==u.width||s.height!==u.height)return!0}return!h()(e.inboundLinks,n)}}]),d}(u.Component);(0,d.EN)((0,p.$j)((function(e,t){var n=t.match.params.appId;return{inboundLinks:(0,g.Ru)(e,n),screens:(0,b.sr)(e),screensMap:(0,b.FU)(e)}}))(x))},48856:(e,t,n)=>{"use strict";n.d(t,{Z:()=>p});var r=n(6610),o=n(5991),a=n(10379),i=n(46070),c=n(77608),l=n(67294),s=n(23668);var u=l.createElement("div",{className:"canvas-loader"},l.createElement(s.Z,null)),p=function(e){(0,a.Z)(s,e);var t,n,l=(t=s,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=(0,c.Z)(t);if(n){var o=(0,c.Z)(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return(0,i.Z)(this,e)});function s(){return(0,r.Z)(this,s),l.apply(this,arguments)}return(0,o.Z)(s,[{key:"render",value:function(){return u}}]),s}(l.Component)},77699:(e,t,n)=>{},20295:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=n(28481),o=n(67294),a=n(73935);n(45697);const i=function(e){e.objects,e.zoom,e.setZoom;var t=e.handlePanning,n=o.createRef(),i=(0,o.useState)(!1),c=(0,r.Z)(i,2),l=c[0],s=c[1],u={id:"panning",ref:n,onMouseDown:function(e){return s(!0)},onMouseUp:function(e){return s(!1)},onMouseMove:function(e){return e.stopPropagation(),l?t(e):null}};return a.createPortal(o.createElement("div",u),document.body)}},20034:(e,t,n)=>{"use strict";n.d(t,{Z:()=>M});var r=n(85061),o=n(28481),a=n(6610),i=n(5991),c=n(63349),l=n(10379),s=n(46070),u=n(77608),p=n(96156),d=n(67294),f=n(37703),h=n(98605),m=n.n(h),v=n(90955),y=n(81129),g=n(45145),b=n(5535),Z=n(59274),E=n(61145),A=n(62088),w=n(97814),O=n(94184),C=n.n(O);function P(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=(0,u.Z)(e);if(t){var o=(0,u.Z)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return(0,s.Z)(this,n)}}var x=function(e){(0,l.Z)(n,e);var t=P(n);function n(){var e;(0,a.Z)(this,n);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return e=t.call.apply(t,[this].concat(o)),(0,p.Z)((0,c.Z)(e),"handleMouseDown",(function(t){var n=e.props.onSelect;t.stopPropagation(),n()})),(0,p.Z)((0,c.Z)(e),"renderControlPoint",(function(t,n){var r=e.props,o=r.scalePoint,a=r.setDraggingInControl,i=r.setDraggingOutControl;if(!t||!t[n])return null;var c=o(t.point),l=o([t[n][0]+t.point[0],t[n][1]+t.point[1]]),s="handleIn"===n?a:i;return d.createElement("g",null,d.createElement("line",{className:"shape-editor-line shape-editor-line-control-point",x1:c[0],y1:c[1],x2:l[0],y2:l[1]}),d.createElement(k,{point:l,onMouseDown:s}))})),e}return(0,i.Z)(n,[{key:"render",value:function(){var e=this.props,t=e.point,n=e.isClosePoint,r=e.selected,o=e.scalePoint;return d.createElement("g",{className:"shape-editor-point-wrapper "},r?d.createElement(d.Fragment,null,d.createElement("g",{className:"control-wrapper"},this.renderControlPoint(t,"handleIn"),this.renderControlPoint(t,"handleOut"))):null,d.createElement(k,{point:o(t.point),selected:r,isClosePoint:n,onMouseDown:this.handleMouseDown}))}}]),n}(d.Component),k=function(e){(0,l.Z)(n,e);var t=P(n);function n(){var e;(0,a.Z)(this,n);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return e=t.call.apply(t,[this].concat(o)),(0,p.Z)((0,c.Z)(e),"handleMouseDown",(function(t){var n=e.props.onMouseDown;t.preventDefault(),t.stopPropagation(),n&&n(t)})),e}return(0,i.Z)(n,[{key:"render",value:function(){var e=this.props,t=e.point,n=e.selected,r=e.isClosePoint;return d.createElement("g",{onMouseDown:this.handleMouseDown},d.createElement("ellipse",{className:C()("shape-editor-point",{selected:n}),cx:t[0],cy:t[1],rx:3,ry:3}),d.createElement("ellipse",{className:C()("shape-editor-point-target",{"cursor-pen-close-path":r}),cx:t[0],cy:t[1],rx:5,ry:5}))}}]),n}(d.Component);function R(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function S(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?R(Object(n),!0).forEach((function(t){(0,p.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):R(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}n(22917);var j=function(e){(0,l.Z)(h,e);var t,n,f=(t=h,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=(0,u.Z)(t);if(n){var o=(0,u.Z)(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return(0,s.Z)(this,e)});function h(e){var t;(0,a.Z)(this,h),t=f.call(this,e),(0,p.Z)((0,c.Z)(t),"handleKeyDown",(function(e){var n=t.props,r=(n.setEditingPath,n.setEditingShape),o=n.resetTool;e.which===g._Q&&(r(null),o())})),(0,p.Z)((0,c.Z)(t),"handleSelectPoint",(function(e){return function(){var n=t.props.setSelectedPoint,r=t.getClosePointIndex();if(e===r){var o=t.props.setDraggingOutControl;t.updateObject({isClosed:!0},"closePath"),t.setState({lastCursorPosition:null}),o()}n(e,!0)}})),(0,p.Z)((0,c.Z)(t),"updateObject",(function(e,n){var r=t.props,o=r.object,a=r.updateObject,i=(r.zoom,r.editingPath),c=S(S({},o),e);if(n&&(t._lastUndoKey=n),c){c.compound&&c.compound.length>0?(c.compound[i]=c.points,t.compoundPath.children[i].setSegments(c.points)):t.compoundPath.setSegments(c.points);var l=t.compoundPath.bounds;c=S(S({},c),{},{width:l.width,height:l.height,x:l.left,y:l.top}),t.compoundPath.setClosed(c.isClosed)}a(o.id,c,t._lastUndoKey||"vector")})),(0,p.Z)((0,c.Z)(t),"handleMouseDown",(function(e){var n=t.props,r=n.object,a=n.createObject,i=n.resetTool,c=n.setDraggingOutControl,l=n.setSelectedPoint,s=n.setEditingShape,u=n.setEditingPath,p=n.editingPath,d=t.props.selectedPoint,f=t.getRealPoint([e.clientX,e.clientY]),h=(0,o.Z)(f,2),m=h[0],y=h[1],g={point:[m,y]};if(r){var b=[];if(b=r.compound?r.compound[p]:r.points,t.canCreatePoint())if(d===b.length-1){var Z=b.slice();Z.push(g),t.setState({lastCursorPosition:null}),c(),l(d+1),t.updateObject({points:Z},"addPoint-".concat(+new Date))}else if(0===d){var E=b.slice();E.unshift(g),t.updateObject({points:E},"addPoint-".concat(+new Date)),t.setState({lastCursorPosition:null}),c()}else u(null),s(null);else u(null),s(null)}else a({x:m,y,type:v.X3,width:1,height:1,points:[{point:[m,y]}]}),i(),t.setState({lastCursorPosition:null}),c(),l(0)})),(0,p.Z)((0,c.Z)(t),"handleMouseMove",(function(e){var n=t.getRealPoint([e.clientX,e.clientY]),r=t.props,a=r.object,i=r.draggingInControl,c=r.draggingOutControl,l=r.draggingSelectedPoint,s=r.editingPath,u=t.props.selectedPoint,d=[];if(a&&(d=a.compound?a.compound[s]||[]:a.points||[]),d[u]&&(i||c)){var f;d=d.slice();var h=i?"handleIn":"handleOut",m=i?"handleOut":"handleIn",v=(0,o.Z)(d[u].point,2),y=v[0],g=v[1],Z=[y-n[0],g-n[1]];d[u]=S(S({},d[u]),{},(f={},(0,p.Z)(f,h,[n[0]-y,n[1]-g]),(0,p.Z)(f,m,Z),(0,p.Z)(f,"type",b._Z),f)),t.updateObject({points:d}),t.setState({lastCursorPosition:null})}else if(l){var E=(d=d.slice())[u],A=n[0]-E.point[0],w=n[1]-E.point[1];E.point=[E.point[0]+A,E.point[1]+w],d[u]=E,t.updateObject({points:d},"dragPoint-".concat(u)),t.setState({lastCursorPosition:null})}else t.setState({lastCursorPosition:n})})),(0,p.Z)((0,c.Z)(t),"handleMouseLeave",(function(){t.setState({lastCursorPosition:null})})),(0,p.Z)((0,c.Z)(t),"handleMouseUp",(function(){var e=t.props,n=e.object,r=e.updateObject,o=e.endDrag,a=e.setDraggingSelectedPoint;e.zoom,o(),a(!1),n&&n.points&&n.points.length>1&&r(n.id,n,t._lastUndoKey)})),(0,p.Z)((0,c.Z)(t),"canCreatePoint",(function(){var e=t.props,n=e.object,r=e.selectedPoint;return!n||!n.isClosed&&(0===r||r===n.points.length-1)})),(0,p.Z)((0,c.Z)(t),"getEndPoint",(function(){var e=t.props,n=e.object,r=e.selectedPoint;return n&&t.canCreatePoint()&&n.points[r]})),(0,p.Z)((0,c.Z)(t),"getClosePointIndex",(function(){var e=t.props,n=e.object,r=e.selectedPoint;return!n||n.points&&0===n.points.length||n.isClosed?null:0===r?n.points.length-1:r===n.points.length-1?0:null})),(0,p.Z)((0,c.Z)(t),"convertPoint",(function(e){var n=t.props,r=n.zoom,a=n.component;if(n.object,!e)return e;var i=(0,o.Z)(e,2),c=i[0],l=i[1],s=e;return a&&(s=[c+a.x,l+a.y]),(0,y.bA)(s,r)})),(0,p.Z)((0,c.Z)(t),"getRealPoint",(function(e){var n=t.props,r=(n.object,n.component),a=n.zoom,i=(0,y.ty)(e,a),c=(0,o.Z)(i,2),l=c[0],s=c[1];return r&&(l-=r.x,s-=r.y),[l=Math.round(l),s=Math.round(s)]})),t.state={lastCursorPosition:null,hitPoint:{x:0,y:0}},t.path=Z.XV.create(),t.compoundPath=Z.XV.create();var n=e.object,r=(e.zoom,e.updateObject),i=e.editingPath;if(n){n.compound&&n.compound.length>0?(t.compoundPath=Z.XV.create(n.compound),t.compoundPath.setClosed(n.isClosed),t.path=t.compoundPath.children[i],t.path.setClosed(n.isClosed)):(t.path.setSegments(n.points),t.path.setClosed(n.isClosed),t.compoundPath.setSegments(n.points),t.compoundPath.setClosed(n.isClosed));var l=t.compoundPath.bounds,s=S(S({},n),{},{width:l.width,height:l.height,x:l.left,y:l.top});r(n.id,s,"zoom")}return t}return(0,i.Z)(h,[{key:"render",value:function(){var e=this,t=this.state,n=t.lastCursorPosition,o=(t.hitPoint,this.props),a=o.selectedPoint,i=o.object,c=o.setDraggingInControl,l=o.setDraggingOutControl,s=o.zoom,u=o.editingPath,p=null,f=this.canCreatePoint(),h=this.getEndPoint(),v="",y=[],g=Z.XV.create();if(i){var b=this.convertPoint([i.x,i.y]),E=this.compoundPath.clone();E.scale(s.scale),E.bounds.bbox(),E.adjust.apply(E,(0,r.Z)(b)),i.compound&&i.compound[u]?(y=i.compound[u],g=E.children[u]):(y=i.points,g=E),n&&h&&g.draw(new Z.XX(this.convertPoint(n)),i.points.length),v=g.getPathData()}var A=this.getClosePointIndex();return p="point-editor",f&&(p+=" cursor-pen-plus"),d.createElement("g",{onMouseDown:this.handleMouseDown,onMouseMove:this.handleMouseMove,onMouseUp:this.handleMouseUp,onMouseLeave:this.handleMouseLeave,className:p,pointerEvents:"all"},d.createElement(m(),{onKeyDown:this.handleKeyDown}),d.createElement("rect",{x:0,y:0,width:window.innerWidth,height:window.innerHeight,style:{fill:"none"}}),d.createElement("path",{id:"editorLine",className:"shape-editor-line ",d:v}),i&&d.createElement("g",{className:"shape-editor-points"},y.map((function(t,n){return d.createElement(x,{point:t,key:n,onSelect:e.handleSelectPoint(n),selected:a===n,isClosePoint:n===A,scalePoint:e.convertPoint,setDraggingInControl:c,setDraggingOutControl:l})}))))}}]),h}(d.Component);const M=(0,f.$j)((function(e){return{object:(0,E.j6)(e,(0,A.ni)(e)),editingPath:(0,A.xU)(e),component:(0,E.j6)(e,(0,E.TY)(e,(0,A.ni)(e))),draggingOutControl:(0,A.ek)(e),draggingInControl:(0,A.t0)(e),selectedPoint:(0,A.ee)(e),draggingSelectedPoint:(0,A.E2)(e)}}),{resetTool:w.bS,createObject:E.nW,updateObject:E.v4,setEditingShape:A.S6,setEditingPath:A.Zf,setDraggingOutControl:A.hd,setDraggingInControl:A.Tl,endDrag:A.Xs,setSelectedPoint:A.bN,setDraggingSelectedPoint:A.q7})(j)},36966:(e,t,n)=>{"use strict";n.d(t,{Z:()=>f});var r=n(6610),o=n(5991),a=n(63349),i=n(10379),c=n(46070),l=n(77608),s=n(96156),u=n(67294),p=n(98605),d=n.n(p);var f=function(e){(0,i.Z)(f,e);var t,n,p=(t=f,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=(0,l.Z)(t);if(n){var o=(0,l.Z)(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return(0,c.Z)(this,e)});function f(){var e;(0,r.Z)(this,f);for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return e=p.call.apply(p,[this].concat(n)),(0,s.Z)((0,a.Z)(e),"_prevDragPoint",[0,0]),(0,s.Z)((0,a.Z)(e),"handleMouseMove",(function(t){var n=e.props.drag;void 0!==t.clientX&&void 0!==t.clientY&&(e._prevDragPoint=[t.clientX,t.clientY]),n(e._prevDragPoint,t.shiftKey,t.altKey)})),(0,s.Z)((0,a.Z)(e),"handleMouseUp",(function(){(0,e.props.endDrag)()})),e}return(0,o.Z)(f,[{key:"render",value:function(){return u.createElement(d(),{onMouseMove:this.handleMouseMove,onMouseUp:this.handleMouseUp,onKeyUp:this.handleKeyDown})}}]),f}(u.Component)},34392:(e,t,n)=>{"use strict";n.d(t,{Z:()=>F});var r=n(6610),o=n(5991),a=n(63349),i=n(10379),c=n(46070),l=n(77608),s=n(96156),u=n(67294),p=n(45697),d=n.n(p),f=n(37703),h=n(44127),m=n(81129),v=n(71707),y=n(75645),g=n(62012),b=n(35592),Z=n(61145),E=n(81253),A=n(28481),w=n(90955),O=n(89926),C=n(62088),P=(n(15746),n(1054),n(43530),n(66400),n(44263),n(32939),n(41665),n(72036),["children"]);function x(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function k(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?x(Object(n),!0).forEach((function(t){(0,s.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):x(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var R=function(e){(0,i.Z)(d,e);var t,n,p=(t=d,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=(0,l.Z)(t);if(n){var o=(0,l.Z)(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return(0,c.Z)(this,e)});function d(){var e;(0,r.Z)(this,d);for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return e=p.call.apply(p,[this].concat(n)),(0,s.Z)((0,a.Z)(e),"state",{error:null}),(0,s.Z)((0,a.Z)(e),"handleMouseEnter",(function(t){var n=e.props,r=n.object,o=n.setCanvasHover;e.context.editable&&o(r.id)})),(0,s.Z)((0,a.Z)(e),"handleSelect",(function(t,n){var r=e.props,o=r.object,a=r.setSelection;e.context.editable&&a(o.id,t,!n)})),(0,s.Z)((0,a.Z)(e),"handleExpand",(function(){var t=e.context.editable,n=e.props,r=n.object,o=n.setExpandSelection;t&&o(r.id)})),(0,s.Z)((0,a.Z)(e),"handleEdit",(function(){var t=e.props,n=t.object,r=t.setEditingText,o=t.setEditingShape;e.context.editable&&(n.type===w.GP&&r(n.id),n.type===w.X3&&o(n.id),n.type===w.E2&&o(n.id))})),e}return(0,o.Z)(d,[{key:"shouldComponentUpdate",value:function(e){for(var t=this.props.zoom,n=0,r=["object","textEditing","shapeEditing","hideShadows","branding"];n<r.length;n++){var o=r[n];if(e[o]!==this.props[o])return!0}return t.scale!==e.zoom.scale}},{key:"componentDidCatch",value:function(e,t){var n=this.props.object;window.setTimeout((function(){var t=new Error("Component Error [".concat(n&&n.type,"]: ").concat(e.message));if(t.stack=[t.stack.split("\n").slice(0,2),e.stack].join("\n"),!window.adaloDeveloper)throw t;console.error(t)}),0),this.setState({error:e})}},{key:"getColor",value:function(e){var t=this.props.branding;return(0,v.ut)(e,t)}},{key:"getBackgroundColor",value:function(){return this.props.backgroundStyle===w.Nu.COLOR?this.getColor(this.props.backgroundColor):"#ddd"}},{key:"render",value:function(){var e=this.props,t=e.object,n=e.zoom,r=e.transformZoom,o=e.hideShadows,a=e.beginDrag,i=e.branding;if(this.state.error)return null;var c=(0,m.bA)([t.x,t.y],n),l=(0,A.Z)(c,2),s=l[0],p=l[1],d=(0,m.pF)(t.width,n),f=(0,m.pF)(t.height,n),h=(0,m.pF)(t.depth,n),v=(t.children,(0,E.Z)(t,P)),y=(k(k({},v),{},{xScaled:s,yScaled:p,widthScaled:d,heightScaled:f,zoom:n,transformZoom:r,hideShadows:o,branding:i,onPosition:a,onExpand:this.handleExpand,onSelect:this.handleSelect,onEdit:this.handleEdit,object:v}),t.backgroundStyle===w.Nu.COLOR?this.getColor(t.backgroundColor):"#ddd");return t.hidden?null:u.createElement("g",{onMouseEnter:this.handleMouseEnter,onMouseLeave:this.handleMouseLeave},u.createElement("rect",{x:s,y:0,width:d,height:h,fill:y}))}}]),d}(u.Component);(0,s.Z)(R,"contextTypes",{editable:d().bool,getSelection:d().func});const S=(0,f.$j)(null,{setExpandSelection:g.c4,setSelection:g.Z5,positionObjects:Z.aN,setCanvasHover:g.TL,setEditingShape:C.S6,setEditingText:O._n,beginDrag:b.fM})(R);var j=n(94184),M=n.n(j),B=n(3227),D=n(19057);var N=u.createElement("span",{className:"page-title-icons"},u.createElement(D.Z,{type:"component-small"})),T=u.createElement(D.Z,{type:"home-small"}),I=u.createElement(D.Z,{type:"user-login"}),L=u.createElement("span",{className:"page-title-text"},"Проекция"),X=function(e){(0,i.Z)(s,e);var t,n,a=(t=s,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=(0,l.Z)(t);if(n){var o=(0,l.Z)(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return(0,c.Z)(this,e)});function s(){return(0,r.Z)(this,s),a.apply(this,arguments)}return(0,o.Z)(s,[{key:"renderIcon",value:function(){var e=this.props,t=e.isLaunchComponent,n=e.isAuthComponent;return e.component.reusableComponent?N:u.createElement("span",{className:"page-title-icons"},t?T:null,n?I:null)}},{key:"render",value:function(){var e=this.props,t=e.component,n=e.zoom,r=e.zoomActive,o=e.onEnterTitle,a=e.onLeaveTitle,i=e.onClickTitle,c=e.yOffset,l=e.transparent,s=t.x,p=t.y,d=t.width,f=t.height;p+=c,f/=2;var h=(0,m.bA)([s,p],n),v=(0,A.Z)(h,2),y=v[0],g=v[1],b=(0,m.pF)(d,n),Z={left:y,top:g,width:b,height:(0,m.pF)(f,n)},E=(0,m.Ig)(4,n),w=(0,m.Ig)(8,n),O=(0,m.Ig)(.5,n),C=l?.1:1;return(0,m.Ck)(n,!1,s,p),"0 ".concat(E,"px ").concat(w,"px rgba(0, 0, 0, ").concat(.1*C,"),\n                  0 0 0 ").concat(O,"px rgba(0, 0, 0, ").concat(.1*C,")"),u.createElement(u.Fragment,null,u.createElement("div",{key:t.id,className:M()("page-title-wrapper",{"page-title-wrapper-transparent":l}),style:Z},r||b<22?null:u.createElement("div",{className:M()("page-title",{"component-page-title":t.reusableComponent}),onMouseEnter:o,onMouseLeave:a,onMouseDown:i},L)))}}]),s}(u.Component);const U=(0,f.$j)((function(e){return{branding:(0,B.WS)(e,(0,Z.i3)(e))||v.ST}}))(X);n(49093),n(91732);var z=n(59274);var _=function(e){(0,i.Z)(d,e);var t,n,p=(t=d,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=(0,l.Z)(t);if(n){var o=(0,l.Z)(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return(0,c.Z)(this,e)});function d(){var e;(0,r.Z)(this,d);for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return e=p.call.apply(p,[this].concat(n)),(0,s.Z)((0,a.Z)(e),"handleMouseLeave",(function(t){var n=e.context.editable,r=e.props.setCanvasHover;n&&r(null)})),(0,s.Z)((0,a.Z)(e),"handleEnterTitle",(function(){if(e.context.editable){var t=e.props,n=t.component;(0,t.setCanvasHover)(n.id)}})),(0,s.Z)((0,a.Z)(e),"handleClickTitle",(function(t){var n=e.props,r=n.component,o=n.setSelection,a=n.beginDrag;e.context.editable&&(o(r.id,t.shiftKey),a([t.clientX,t.clientY]))})),(0,s.Z)((0,a.Z)(e),"getBackgroundPosition",(function(){var t=e.props.component,n="",r=null==t?void 0:t.backgroundSize,o=null==t?void 0:t.backgroundPositionX,a=null==t?void 0:t.backgroundPositionY;switch(o){case"left":n=n.concat("xMin");break;case"right":n=n.concat("xMax");break;case"center":default:n=n.concat("xMid")}switch(a){case"top":n=n.concat("YMin");break;case"bottom":n=n.concat("YMax");break;case"center":default:n=n.concat("YMid")}switch(r){case"contain":n=n.concat(" meet");break;case"cover":default:n=n.concat(" slice")}return n})),(0,s.Z)((0,a.Z)(e),"getMask",(function(){e.props.component;var t=(0,m.iI)(),n=(Math.sqrt(2),e.props.component),r=n.width,o=n.depth,a=n.x,i=n.y,c=n.borderRadius,l=n.lowerLength,s=new z.Ae(a,i,r,o),p=new z.E9(c?[c,c]:[0,0]),d=s.getBottomLeft(!0),f=s.getTopLeft(!0),h=s.getTopRight(!0),v=s.getBottomRight(!0),y=[];if(l>0&&r>l){console.log(l);var g=(r-l)/2;v.x=v.x-g,d.x=d.x+g}p&&!p.isZero()||(y=[new z.XX(d),new z.XX(f),new z.XX(h),new z.XX(v)]);var b=z.XV.create(y.map((function(e){var t=e.point,n=e.handleIn,r=e.handleOut;return new z.XX(t,n,r)})));b.setClosed(!0),b.scale(t.scale),b.adjust(a,i);var Z=b.clone();return Z.offset(-10,{insert:!1}),[{mask:u.createElement("path",{fill:"#fff",d:b.getPathData()}),offset:u.createElement("path",{stroke:"#000",fill:"transparent",strokeWidth:2,d:Z.getPathData()})}]})),(0,s.Z)((0,a.Z)(e),"getExtrudeBoxes",(function(){var t=e.props.component,n=(0,m.iI)(),r=function(e,t,r,o,a,i,c){var l=arguments.length>7&&void 0!==arguments[7]?arguments[7]:0,s=4*(Math.sqrt(2)-1)/3,p=new z.Ae(o,a,e,r),d=new z.E9(i?[i,i]:[0,0]),f=p.getBottomLeft(!0),h=p.getTopLeft(!0),m=p.getTopRight(!0),v=p.getBottomRight(!0),y=[];if(!d||d.isZero())y=[new z.XX(f),new z.XX(h),new z.XX(m),new z.XX(v)];else{var g=(d=z.$u.min(new z.$u(i,i),p.getSize(!0).divide(2))).width,b=d.height,Z=g*s,E=b*s;y=[new z.XX(f.add(g,0),null,[-Z,0]),new z.XX(f.subtract(0,b),[0,E]),new z.XX(h.add(0,b),null,[0,-E]),new z.XX(h.add(g,0),[-Z,0],null),new z.XX(m.subtract(g,0),null,[Z,0]),new z.XX(m.add(0,b),[0,-E],null),new z.XX(v.subtract(0,b),null,[0,E]),new z.XX(v.subtract(g,0),[Z,0])]}var A=z.XV.create(y.map((function(e){var t=e.point,n=e.handleIn,r=e.handleOut;return new z.XX(t,n,r)})));return A.setClosed(!0),A.scale(96*n.scale),A.adjust(96*o,Math.abs(l-96*t)),u.createElement("path",{fill:"rgb(255, 0, 0, 0.5)",d:A.getPathData()})};return t.inCaseShapes?t.inCaseShapes.map((function(e){if(e.data)return e.data.map((function(e){var o=e.width,a=(e.height,e.length,e.x),i=e.y,c=e.depth,l=e.borderRadius,s=e.rounded,p=e.shape,d=e.points;return"RECT"===p?r(o,c,c,a,i,l,s,t.depth):"POLYGON"===p?function(e,t,r,o,a){var i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0,c=z.XV.create(a);return c.setClosed(!0),c.scale(96*n.scale),c.adjust(96*r,Math.abs(i-96*t)),u.createElement("path",{fill:"rgb(255, 0, 0, 0.5)",d:c.getPathData()})}(o,c,a,i,d,t.depth):null}));var o=e.width,a=e.height,i=(e.length,e.xx),c=e.yy,l=e.borderRadius,s=e.rounded;return r(o,a,a,i,c,l,s,t.depth)})):null})),e}return(0,o.Z)(d,[{key:"render",value:function(){var e=this.props,t=e.component,n=e.zoom,r=e.zoomActive,o=e.isLaunchComponent,a=e.isAuthComponent,i=e.branding,c=e.yOffset,l=(e.platform,e.selectedParent),s=e.selectedParentScreenId,p=t.children,d=n.scale>8,f=(0,m.Ck)(n,!0,t.x,t.y+t.height+120),h=(0,m.iI)(),g="projection-mask-".concat(t.id),b="screen-hightlight-mask-".concat(t.id),Z={transform:f},E=(0,v.ut)(t.backgroundColor||"@background",i),A=null!=t&&t.backgroundImage?(0,y.L)(t.backgroundImage):null,w=this.getBackgroundPosition(),O=((0,m.dL)(n,!0,t.x,t.y),this.getExtrudeBoxes()),C=this.getMask(),P=t.depth;return u.createElement("div",null,u.createElement(U,{zoom:n,zoomActive:r,component:t,onEnterTitle:this.handleEnterTitle,onLeaveTitle:this.handleMouseLeave,onClickTitle:this.handleClickTitle,isLaunchComponent:o,isAuthComponent:a,yOffset:c+t.height+120,transparent:!!l}),u.createElement("svg",{className:"canvas-objects",width:Math.ceil(t.width*h.scale),height:Math.ceil(P*h.scale),style:Z},u.createElement("mask",{id:g},C.map((function(e){var t=e.mask;return e.offset,t}))),l&&u.createElement("mask",{id:b},u.createElement("rect",{x:0,y:0,width:t.width*h.scale,height:P*h.scale,fill:"#fff"}),s===t.id&&u.createElement("rect",{x:l.x-6,y:l.y-6,width:l.width+12,height:P+12,fill:"#000"})),u.createElement("g",{onMouseLeave:this.handleMouseLeave,mask:"url(#".concat(g,")")},u.createElement("rect",{x:0,y:0,fill:E,width:t.width*h.scale,height:P*h.scale,pointerEvents:"none"}),u.createElement("g",{id:"offset"},C.map((function(e){return e.mask,e.offset}))),O,A&&u.createElement("image",{href:A,x:0,y:0,width:t.width*h.scale,height:P*h.scale,preserveAspectRatio:w,pointerEvents:"none"}),p.map((function(e){return u.createElement(S,{key:e.id,object:e,zoom:h,transformZoom:n,hideShadows:d,branding:i})})),l&&u.createElement("rect",{mask:"url(#".concat(b,")"),pointerEvents:"none",x:0,y:0,width:t.width*h.scale,height:P*h.scale,fill:"#fff",fillOpacity:.9}))))}}]),d}(u.Component);(0,s.Z)(_,"contextTypes",{editable:d().bool});const F=(0,f.$j)((function(e){var t,n=(0,Z.er)(e);if(n){var r=(0,Z.DW)(e,n.id),o=e.editor.objects.present.list,a=(0,h.RK)(o,r.split(".")[0]);t=a&&a.id}return{selectedParentScreenId:t,selectedParent:n,yOffset:(0,Z.Gr)(e),platform:(0,Z.Xf)(e)}}),{setCanvasHover:g.TL,setSelection:g.Z5,beginDrag:b.fM})(_)},95311:(e,t,n)=>{"use strict";n.d(t,{Z:()=>C});var r=n(6610),o=n(5991),a=n(63349),i=n(10379),c=n(46070),l=n(77608),s=n(96156),u=n(67294),p=n(45697),d=n.n(p),f=n(37703),h=n(44127),m=n(81129),v=n(71707),y=n(75645),g=n(62012),b=n(35592),Z=n(61145),E=n(96766),A=n(49093),w=n(59274);var O=function(e){(0,i.Z)(d,e);var t,n,p=(t=d,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=(0,l.Z)(t);if(n){var o=(0,l.Z)(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return(0,c.Z)(this,e)});function d(e){var t;(0,r.Z)(this,d),t=p.call(this,e),(0,s.Z)((0,a.Z)(t),"handleMouseLeave",(function(e){var n=t.context.editable,r=t.props.setCanvasHover;n&&r(null)})),(0,s.Z)((0,a.Z)(t),"handleEnterTitle",(function(){if(t.context.editable){var e=t.props,n=e.component;(0,e.setCanvasHover)(n.id)}})),(0,s.Z)((0,a.Z)(t),"handleClickTitle",(function(e){var n=t.props,r=n.component,o=n.setSelection,a=n.beginDrag;t.context.editable&&(o(r.id,e.shiftKey),a([e.clientX,e.clientY]))})),(0,s.Z)((0,a.Z)(t),"getMask",(function(){var e=t.props.component,n=(0,m.iI)();if(e.outerRule&&Array.isArray(e.outerRule))return e.outerRule.map((function(e){if(0===e.points.length)return{mask:null,offset:null};var t=w.XV.create(e.points);t.setClosed(!0),t.scale(96*n.scale),t.adjust(0,0);var r=t.clone();return r.offset(-10,{insert:!1}),{mask:u.createElement("path",{fill:"#fff",d:t.getPathData()}),offset:u.createElement("path",{stroke:"#000",fill:"transparent",strokeWidth:2,d:r.getPathData()})}}));var r=4*(Math.sqrt(2)-1)/3,o=t.props.component,a=o.width,i=o.height,c=o.x,l=o.y,s=o.borderRadius,p=new w.Ae(c,l,a,i),d=new w.E9(s?[s,s]:[0,0]),f=p.getBottomLeft(!0),h=p.getTopLeft(!0),v=p.getTopRight(!0),y=p.getBottomRight(!0),g=[];if(!d||d.isZero())g=[new w.XX(f),new w.XX(h),new w.XX(v),new w.XX(y)];else{var b=(d=w.$u.min(new w.$u(s,s),p.getSize(!0).divide(2))).width,Z=d.height,E=b*r,A=Z*r;g=[new w.XX(f.add(b,0),null,[-E,0]),new w.XX(f.subtract(0,Z),[0,A]),new w.XX(h.add(0,Z),null,[0,-A]),new w.XX(h.add(b,0),[-E,0],null),new w.XX(v.subtract(b,0),null,[E,0]),new w.XX(v.add(0,Z),[0,-A],null),new w.XX(y.subtract(0,Z),null,[0,A]),new w.XX(y.subtract(b,0),[E,0])]}var O=w.XV.create(g.map((function(e){var t=e.point,n=e.handleIn,r=e.handleOut;return new w.XX(t,n,r)})));O.setClosed(!0),O.scale(n.scale),O.adjust(c,l);var C=O.clone();return C.offset(-10,{insert:!1}),console.log(t.offsetPath.getPathData()),[{mask:u.createElement("path",{fill:"#fff",d:O.getPathData()}),offset:u.createElement("path",{stroke:"#000",fill:"transparent",strokeWidth:2,d:C.getPathData()})}]})),(0,s.Z)((0,a.Z)(t),"getExtrudeBoxes",(function(){var e=t.props.component,n=(0,m.iI)(),r=function(e,t,r,o,a,i,c){var l=4*(Math.sqrt(2)-1)/3,s=new w.Ae(o,a,e,r),p=new w.E9(i?[i,i]:[0,0]),d=s.getBottomLeft(!0),f=s.getTopLeft(!0),h=s.getTopRight(!0),m=s.getBottomRight(!0),v=[];if(!p||p.isZero())v=[new w.XX(d),new w.XX(f),new w.XX(h),new w.XX(m)];else{var y=(p=w.$u.min(new w.$u(i,i),s.getSize(!0).divide(2))).width,g=p.height,b=y*l,Z=g*l;v=[new w.XX(d.add(y,0),null,[-b,0]),new w.XX(d.subtract(0,g),[0,Z]),new w.XX(f.add(0,g),null,[0,-Z]),new w.XX(f.add(y,0),[-b,0],null),new w.XX(h.subtract(y,0),null,[b,0]),new w.XX(h.add(0,g),[0,-Z],null),new w.XX(m.subtract(0,g),null,[0,Z]),new w.XX(m.subtract(y,0),[b,0])]}var E=w.XV.create(v.map((function(e){var t=e.point,n=e.handleIn,r=e.handleOut;return new w.XX(t,n,r)})));return E.setClosed(!0),E.scale(96*n.scale),E.adjust(96*o,96*a),u.createElement("path",{fill:"rgb(255, 0, 0, 0.5)",d:E.getPathData()})};return e.inCaseShapes?e.inCaseShapes.map((function(e){if(e.data)return e.data.map((function(e){var t=e.width,o=e.height,a=(e.length,e.x),i=e.y,c=e.borderRadius,l=(e.rounded,e.shape),s=e.points;return"RECT"===l?r(t,0,o,a,i,c):"POLYGON"===l?function(e,t,r,o,a){var i=w.XV.create(a);return i.setClosed(!0),i.scale(96*n.scale),i.adjust(96*r,96*o),u.createElement("path",{fill:"rgb(255, 0, 0, 0.5)",d:i.getPathData()})}(0,0,a,i,s):null}));var t=e.width,o=(e.height,e.length),a=e.xx,i=e.yy,c=e.borderRadius;return e.rounded,r(t,0,o,a,i,c)})):null})),(0,s.Z)((0,a.Z)(t),"getBackgroundPosition",(function(){var e=t.props.component,n="",r=null==e?void 0:e.backgroundSize,o=null==e?void 0:e.backgroundPositionX,a=null==e?void 0:e.backgroundPositionY;switch(o){case"left":n=n.concat("xMin");break;case"right":n=n.concat("xMax");break;case"center":default:n=n.concat("xMid")}switch(a){case"top":n=n.concat("YMin");break;case"bottom":n=n.concat("YMax");break;case"center":default:n=n.concat("YMid")}switch(r){case"contain":n=n.concat(" meet");break;case"cover":default:n=n.concat(" slice")}return n})),t.maskPath=w.XV.create([[[7.149641710754413,24.124974630880526],[7.1742166181614335,24.126863553385753],[7.198649765153487,24.13010630381401],[7.222866627051889,24.134692991295687],[7.246793338876719,24.140609625771713],[7.270356920655244,24.14783816063293],[7.293485499999056,24.156356547789002],[7.3161085313589025,24.166138804916184],[7.3381570111691525,24.177155094686896],[7.359563688335654,24.189371815810983],[7.380263269355055,24.202751705494638],[7.400192617474554,24.217253953111],[7.4192909452562725,24.232834324683957],[7.4375,24.24944529779112],[16.6875,24.24944529779112],[16.70570905474373,24.232834324683957],[16.724807382525448,24.217253953111],[16.744736730644945,24.202751705494638],[16.765436311664345,24.189371815810983],[16.78684298883085,24.177155094686896],[16.808891468641097,24.166138804916184],[16.831514500000942,24.156356547789002],[16.854643079344758,24.14783816063293],[16.87820666112328,24.140609625771713],[16.90213337294811,24.134692991295687],[16.926350234846513,24.13010630381401],[16.950783381838566,24.126863553385753],[16.975358289245587,24.124974630880526],[17,24.12444529779112],[7.130480000001485,24.12444529779112],[1,24.12444529779112],[.8576851259925976,24.114266834266555],[.7182673627125601,24.083938435606587],[.5845848591595243,24.034077501725942],[.4593590107710602,23.965699059373808],[.3451390595381291,23.880195099094774],[.24425019869634595,23.779306238252993],[.1587462384173145,23.66508628702006],[.09036779606517834,23.539860438631596],[.04050686218453428,23.40617793507856],[.010178463524565674,23.266760171798524],[0,23.12444529779112],[0,1.124445297791121],[.010178463524565674,.9821304237837187],[.04050686218453428,.8427126605036812],[.09036779606517834,.7090301569506454],[.1587462384173145,.5838043085621814],[.24425019869634595,.46958435732925025],[.3451390595381291,.368695496487467],[.4593590107710602,.2831915362084356],[.5845848591595243,.21481309385629943],[.7182673627125601,.16495215997565538],[.8576851259925976,.13462376131568676],[1,.1244452977911211],[7.5625,.1244452977911211],[8.16200081275579,.09333994557024337],[8.761715537084875,.06667504633347002],[9.361611283375309,.04445206243634367],[9.961655152084019,.026672212635346044],[10.561814235536776,.013336472016257735],[11.162055619755007,.004445571940428076],[11.76234638623338,0],[12.36265361376662,0],[12.962944380244993,.004445571940428076],[13.563185764463224,.013336472016257735],[14.163344847915981,.026672212635346044],[14.763388716624691,.04445206243634367],[15.363284462915125,.06667504633347002],[15.96299918724421,.09333994557024337],[16.5625,.1244452977911211],[23.125,.1244452977911211],[23.267314874007404,.13462376131568676],[23.40673263728744,.16495215997565538],[23.540415140840476,.21481309385629943],[23.66564098922894,.2831915362084356],[23.77986094046187,.368695496487467],[23.880749801303654,.46958435732925025],[23.966253761582685,.5838043085621814],[24.034632203934823,.7090301569506454],[24.084493137815464,.8427126605036812],[24.114821536475436,.9821304237837187],[24.125,1.124445297791121],[24.125,23.12444529779112],[24.114821536475436,23.266760171798524],[24.084493137815464,23.40617793507856],[24.034632203934823,23.539860438631596],[23.966253761582685,23.66508628702006],[23.880749801303654,23.779306238252993],[23.77986094046187,23.880195099094774],[23.66564098922894,23.965699059373808],[23.540415140840476,24.034077501725942],[23.40673263728744,24.083938435606587],[23.267314874007404,24.114266834266555],[23.125,24.12444529779112],[16.994519999998513,24.12444529779112]]]);var n=(0,m.iI)();return console.log(n),t.maskPath.scale(96*n.scale),t.maskPath.adjust(0,0),t.maskPath.setClosed(!0),t.offsetPath=t.maskPath.clone(),t.offsetPath.offset(-10,{insert:!1}),console.log(t.offsetPath.getPathData()),t.inCaseShapes=[{x:.09375,y:.125,w:1.5,h:2.75,d:3,p:[],g:[],n:"",s:"RECT",r:0,f:!1,i:"XzjXEJy5XI",t:{id:"gE3WF",name:"Base Foam",depth:11.5}},{x:.03125,y:.125,w:3.5,h:1.5,d:3,p:[],g:[],n:"",s:"RECT",r:0,f:!1,i:"7p4quEU6b9",t:{id:"gE3WF",name:"Base Foam",depth:11.5}},{x:20.65625,y:.125,w:3.5,h:1.5,d:3,p:[],g:[],n:"",s:"RECT",r:0,f:!1,i:"Z3iJAH6VoH",t:{id:"gE3WF",name:"Base Foam",depth:11.5}},{x:22.625,y:.125,w:1.5,h:2.75,d:3,p:[],g:[],n:"",s:"RECT",r:0,f:!1,i:"elhBF78krM",t:{id:"gE3WF",name:"Base Foam",depth:11.5}},{x:7.1875,y:21.5,w:9.75,h:2.75,d:1.625,p:[],g:[],n:"",s:"RECT",r:0,f:!1,i:"syAizFTkSX",t:{id:"gE3WF",name:"Base Foam",depth:11.5}}].map((function(e){var t=w.XV.create(),n=new w.Ae(e.x,e.y,e.w,e.h),r=n.getBottomLeft(!0),o=n.getTopLeft(!0),a=n.getTopRight(!0),i=n.getBottomRight(!0),c=[];return c=[new w.XX(r),new w.XX(o),new w.XX(a),new w.XX(i)],(t=w.XV.create(c.map((function(e){var t=e.point,n=e.handleIn,r=e.handleOut;return new w.XX(t,n,r)})))).setClosed(!0),t.scale(96),t.adjust(96*e.x,96*e.y),t})),t}return(0,o.Z)(d,[{key:"render",value:function(){var e=this.props,t=e.component,n=e.zoom,r=e.zoomActive,o=(e.isLaunchComponent,e.isAuthComponent,e.branding),a=(e.yOffset,e.platform,e.selectedParent),i=e.selectedParentScreenId,c=t.children,l=n.scale>8,s=(0,m.Ck)(n,!0,t.x,t.y),p=(0,m.iI)(),d="screen-mask-".concat(t.id),f="screen-hightlight-mask-".concat(t.id),h={transform:s},g=(0,v.ut)(t.backgroundColor||"@background",o),b=null!=t&&t.backgroundImage?(0,y.L)(t.backgroundImage):null,Z=this.getBackgroundPosition(),w=this.getMask(),O=this.getExtrudeBoxes();return u.createElement("div",null,u.createElement("svg",{className:"canvas-objects",width:Math.ceil(t.width*p.scale),height:Math.ceil(t.height*p.scale),style:h},u.createElement("defs",null,u.createElement("marker",{id:"depth-arrow",markerWidth:"12",markerHeight:"12",orient:"auto",refY:"6",fill:"transparent",refX:"12"},u.createElement("path",{fill:"transparent",stroke:"#8a8a8a",d:"M6,0 L12,6 6,12",style:{strokeWidth:.5}}))),u.createElement("mask",{id:d},w&&w.map((function(e){var t=e.mask;return e.offset,t}))),u.createElement("use",{href:"#".concat(d),overflow:"visible",stroke:"#000",strokeWidth:"10"}),a&&u.createElement("mask",{id:f},u.createElement("rect",{x:0,y:0,width:t.width*p.scale,height:t.height*p.scale,fill:"#fff"}),i===t.id&&u.createElement("rect",{x:a.x-6,y:a.y-6,width:a.width+12,height:a.height+12,fill:"#000"})),u.createElement("g",{onMouseLeave:this.handleMouseLeave,mask:"url(#".concat(d,")")},u.createElement("rect",{x:0,y:0,fill:g,width:t.width*p.scale,height:t.height*p.scale,pointerEvents:"none"}),u.createElement("g",{id:"offset"},w&&w.map((function(e){return e.mask,e.offset}))),O,u.createElement(A.Z,{zoom:n,zoomActive:r,component:t,baseZoom:p}),b&&u.createElement("image",{href:b,x:0,y:0,width:t.width*p.scale,height:t.height*p.scale,preserveAspectRatio:Z,pointerEvents:"none"}),c.map((function(e){return u.createElement(E.Z,{key:e.id,object:e,zoom:p,transformZoom:n,hideShadows:l,branding:o})})),a&&u.createElement("rect",{mask:"url(#".concat(f,")"),pointerEvents:"none",x:0,y:0,width:t.width*p.scale,height:t.height*p.scale,fill:"#fff",fillOpacity:.9}))))}}]),d}(u.Component);(0,s.Z)(O,"contextTypes",{editable:d().bool});const C=(0,f.$j)((function(e){var t,n=(0,Z.er)(e);if(n){var r=(0,Z.DW)(e,n.id),o=e.editor.objects.present.list,a=(0,h.RK)(o,r.split(".")[0]);t=a&&a.id}return{selectedParentScreenId:t,selectedParent:n,yOffset:(0,Z.Gr)(e),platform:(0,Z.Xf)(e)}}),{setCanvasHover:g.TL,setSelection:g.Z5,beginDrag:b.fM})(O)},1054:(e,t,n)=>{"use strict";n.d(t,{Z:()=>y});var r=n(22122),o=n(81253),a=n(6610),i=n(5991),c=n(10379),l=n(46070),s=n(77608),u=n(67294),p=n(94184),d=n.n(p),f=n(90955),h=n(42281),m=n(53124),v=["xScaled","yScaled","widthScaled","heightScaled","selected","borderRadius","shadow","zoom","width","height","hideShadows","children"];var y=function(e){(0,c.Z)(h,e);var t,n,p=(t=h,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=(0,s.Z)(t);if(n){var o=(0,s.Z)(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return(0,l.Z)(this,e)});function h(){return(0,a.Z)(this,h),p.apply(this,arguments)}return(0,i.Z)(h,[{key:"getRenderOffset",value:function(){if(this.props.borderStyle!==f.$u.NONE)switch(this.props.borderPosition){case f.iX.INSIDE:return.5*this.getBorderWidth();case f.iX.OUTSIDE:return-.5*this.getBorderWidth()}return 0}},{key:"getBorderRadiusProps",value:function(){var e=this.props,t=e.width,n=e.height,r=e.borderRadius,o=e.zoom;r=Math.min(r,n/2);var a=((r=Math.min(r,t/2))||0)*o.scale;return{rx:a,ry:a}}},{key:"render",value:function(){var e=this.props,t=e.xScaled,n=e.yScaled,a=e.widthScaled,i=e.heightScaled,c=e.selected,l=(e.borderRadius,e.shadow),s=(e.zoom,e.width,e.height,e.hideShadows),p=e.children,f=(0,o.Z)(e,v),h=this.getBorderProps(),y=this.getBorderRadiusProps(),g=this.getBackgroundColor(),b=this.getRenderOffset();return t+=b,n+=b,a-=2*b,i-=2*b,u.createElement("g",{className:d()("section",{"section-selected":c}),onMouseDown:this.handleMouseDown,onDoubleClick:this.handleDoubleClick,transform:"translate(".concat(t,", ").concat(n,")"),style:f},l&&l.enabled&&!s?u.createElement(m.Z,this.getShadowProps(),u.createElement("rect",(0,r.Z)({},h,y,{x:0,y:0,width:a,height:i,fill:g}))):null,u.createElement("rect",(0,r.Z)({},h,y,{x:0,y:0,width:a,height:i,fill:g})),p)}}]),h}(h.Z)},53124:(e,t,n)=>{"use strict";n.d(t,{Z:()=>f});var r=n(28481),o=n(6610),a=n(5991),i=n(10379),c=n(46070),l=n(77608),s=n(67294),u=n(6767),p=n.n(u),d=n(81129);var f=function(e){(0,i.Z)(f,e);var t,n,u=(t=f,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=(0,l.Z)(t);if(n){var o=(0,l.Z)(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return(0,c.Z)(this,e)});function f(){var e;return(0,o.Z)(this,f),(e=u.call(this))._id=Math.round(1e4*Math.random()).toFixed(0),e._filterId="filter-".concat(e._id),e._maskId="mask-".concat(e._id),e}return(0,a.Z)(f,[{key:"getBlurRadius",value:function(){var e=this.props,t=e.shadow,n=e.zoom,r=(t=t||{}).size||0;return(0,d.pF)(r/2,n)}},{key:"getBorderWidth",value:function(){var e=this.props,t=e.border,n=e.zoom;return(0,d.pF)((t.strokeWidth||0)/2,n)}},{key:"getShadowPosition",value:function(){var e=this.props,t=e.shadow,n=e.zoom,r=(t=t||{}).x||0,o=t.y||0;return[(0,d.pF)(r,n),(0,d.pF)(o,n)]}},{key:"getColor",value:function(){var e=this.props.shadow;e=e||{};var t=p()(e.color);return{r:t.red()/255,g:t.green()/255,b:t.blue()/255,a:t.alpha()}}},{key:"render",value:function(){var e=this.props,t=e.width,n=e.height,o=e.children,a=s.cloneElement(o,{fill:"#000",stroke:"#000"}),i=this.getBorderWidth(),c=s.cloneElement(a,{filter:"url(#".concat(this._filterId,")"),mask:"url(#".concat(this._maskId,")")}),l=this.getBlurRadius(),u=this.getColor(),p=this.getShadowPosition(),d=(0,r.Z)(p,2),f=d[0],h=d[1],m=-3*l+f-i,v=-3*l+h-i,y=t+6*l+2*i,g=n+6*l+2*i;return s.createElement("g",null,s.createElement("filter",{id:this._filterId,width:2*t,height:2*n,x:-t/2,y:-n/2},s.createElement("feOffset",{result:"offsetOut",in:"SourceAlpha",dx:f,dy:h}),s.createElement("feComponentTransfer",{result:"alphaOut",in:"offsetOut"},s.createElement("feFuncR",{type:"linear",slope:"0",intercept:u.r}),s.createElement("feFuncG",{type:"linear",slope:"0",intercept:u.g}),s.createElement("feFuncB",{type:"linear",slope:"0",intercept:u.b}),s.createElement("feFuncA",{type:"linear",slope:u.a,intercept:"0"})),s.createElement("feGaussianBlur",{in:"alphaOut",stdDeviation:l})),s.createElement("mask",{id:this._maskId,maskUnits:"userSpaceOnUse",x:m,y:v,width:y,height:g},s.createElement("rect",{x:m,y:v,width:y,height:g,fill:"#fff"}),a),c)}}]),f}(s.Component)},21518:(e,t,n)=>{"use strict";var r=n(28481),o=n(6610),a=n(5991),i=n(63349),c=n(10379),l=n(46070),s=n(77608),u=n(96156),p=n(67294),d=n(37703),f=n(98605),h=n.n(f),m=n(90955),v=n(81129),y=n(45145),g=n(5535),b=n(59274),Z=n(61145),E=n(62088),A=n(97814),w=n(94184),O=n.n(w);function C(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=(0,s.Z)(e);if(t){var o=(0,s.Z)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return(0,l.Z)(this,n)}}var P=function(e){(0,c.Z)(n,e);var t=C(n);function n(){var e;(0,o.Z)(this,n);for(var r=arguments.length,a=new Array(r),c=0;c<r;c++)a[c]=arguments[c];return e=t.call.apply(t,[this].concat(a)),(0,u.Z)((0,i.Z)(e),"handleMouseDown",(function(t){var n=e.props.onSelect;t.stopPropagation(),n()})),(0,u.Z)((0,i.Z)(e),"renderControlPoint",(function(t,n){var r=e.props,o=r.scalePoint,a=r.setDraggingInControl,i=r.setDraggingOutControl;if(!t||!t[n])return null;var c=o(t.point),l=o([t[n][0]+t.point[0],t[n][1]+t.point[1]]),s="handleIn"===n?a:i;return p.createElement("g",null,p.createElement("line",{className:"shape-editor-line shape-editor-line-control-point",x1:c[0],y1:c[1],x2:l[0],y2:l[1]}),p.createElement(x,{point:l,onMouseDown:s}))})),e}return(0,a.Z)(n,[{key:"render",value:function(){var e=this.props,t=e.point,n=e.isClosePoint,r=e.selected,o=e.scalePoint;return p.createElement("g",{className:"shape-editor-point-wrapper "},r?p.createElement(p.Fragment,null,p.createElement("g",{className:"control-wrapper"},this.renderControlPoint(t,"handleIn"),this.renderControlPoint(t,"handleOut"))):null,p.createElement(x,{point:o(t.point),selected:r,isClosePoint:n,onMouseDown:this.handleMouseDown}))}}]),n}(p.Component),x=function(e){(0,c.Z)(n,e);var t=C(n);function n(){var e;(0,o.Z)(this,n);for(var r=arguments.length,a=new Array(r),c=0;c<r;c++)a[c]=arguments[c];return e=t.call.apply(t,[this].concat(a)),(0,u.Z)((0,i.Z)(e),"handleMouseDown",(function(t){var n=e.props.onMouseDown;t.preventDefault(),t.stopPropagation(),n&&n(t)})),e}return(0,a.Z)(n,[{key:"render",value:function(){var e=this.props,t=e.point,n=e.selected,r=e.isClosePoint;return p.createElement("g",{onMouseDown:this.handleMouseDown},p.createElement("ellipse",{className:O()("shape-editor-point",{selected:n}),cx:t[0],cy:t[1],rx:3,ry:3}),p.createElement("ellipse",{className:O()("shape-editor-point-target",{"cursor-pen-close-path":r}),cx:t[0],cy:t[1],rx:5,ry:5}))}}]),n}(p.Component);function k(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function R(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?k(Object(n),!0).forEach((function(t){(0,u.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):k(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}n(22917);var S=function(e){(0,c.Z)(f,e);var t,n,d=(t=f,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=(0,s.Z)(t);if(n){var o=(0,s.Z)(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return(0,l.Z)(this,e)});function f(e){var t;(0,o.Z)(this,f),t=d.call(this,e),(0,u.Z)((0,i.Z)(t),"handleKeyDown",(function(e){var n=t.props,r=n.setEditingShape,o=n.resetTool;e.which===y._Q&&(r(null),o())})),(0,u.Z)((0,i.Z)(t),"handleSelectPoint",(function(e){return function(){var n=t.props.setSelectedPoint,r=t.getClosePointIndex();if(e===r){var o=t.props.setDraggingOutControl;t.updateObject({isClosed:!0},"closePath"),t.setState({lastCursorPosition:null}),o()}n(e,!0)}})),(0,u.Z)((0,i.Z)(t),"updateObject",(function(e,n){var r=t.props,o=r.object,a=r.updateObject,i=(r.zoom,R(R({},o),e));if(n&&(t._lastUndoKey=n),i){t.path.setSegments(i.points.map((function(e){var t=e.point,n=e.handleIn,r=e.handleOut;return new b.XX(t,n,r)})));var c=t.path.bounds;i=R(R({},i),{},{width:c.width,height:c.height,x:c.left,y:c.top}),t.path.setClosed(i.isClosed)}a(o.id,i,t._lastUndoKey||"vector")})),(0,u.Z)((0,i.Z)(t),"handleMouseDown",(function(e){var n=t.props,o=n.object,a=n.createObject,i=n.resetTool,c=n.setDraggingOutControl,l=n.setSelectedPoint,s=n.setEditingShape,u=t.props.selectedPoint,p=t.getRealPoint([e.clientX,e.clientY]),d=(0,r.Z)(p,2),f=d[0],h=d[1],v={point:[f,h]};if(o)if(t.canCreatePoint())if(u===o.points.length-1){var y=o.points.slice();y.push(v),t.setState({lastCursorPosition:null}),c(),l(u+1),t.updateObject({points:y},"addPoint-".concat(+new Date))}else if(0===u){var g=o.points.slice();g.unshift(v),t.updateObject({points:g},"addPoint-".concat(+new Date)),t.setState({lastCursorPosition:null}),c()}else s(null);else s(null);else a({x:f,y:h,type:m.X3,width:1,height:1,points:[{point:[f,h]}]}),i(),t.setState({lastCursorPosition:null}),c(),l(0)})),(0,u.Z)((0,i.Z)(t),"handleMouseMove",(function(e){var n=t.getRealPoint([e.clientX,e.clientY]),o=t.props,a=o.object,i=o.draggingInControl,c=o.draggingOutControl,l=o.draggingSelectedPoint,s=new b.E9(n[0],n[1]),p=t.path.hitTest(s);if(p){var d=t.convertPoint([p.point.x,p.point.y]),f=(0,r.Z)(d,2);f[0],f[1]}var h=t.props.selectedPoint;if((a&&a.points||[])[h]&&(i||c)){var m,v=a.points;v=v.slice();var y=i?"handleIn":"handleOut",Z=i?"handleOut":"handleIn",E=(0,r.Z)(v[h].point,2),A=E[0],w=E[1],O=[A-n[0],w-n[1]];v[h]=R(R({},v[h]),{},(m={},(0,u.Z)(m,y,[n[0]-A,n[1]-w]),(0,u.Z)(m,Z,O),(0,u.Z)(m,"type",g._Z),m)),t.updateObject({points:v}),t.setState({lastCursorPosition:null})}else if(l){var C=a.points.slice(),P=C[h],x=n[0]-P.point[0],k=n[1]-P.point[1];P.point=[P.point[0]+x,P.point[1]+k],C[h]=P,t.updateObject({points:C},"dragPoint-".concat(h)),t.setState({lastCursorPosition:null})}else t.setState({lastCursorPosition:n})})),(0,u.Z)((0,i.Z)(t),"handleMouseLeave",(function(){t.setState({lastCursorPosition:null})})),(0,u.Z)((0,i.Z)(t),"handleMouseUp",(function(){var e=t.props,n=e.object,r=e.updateObject,o=e.endDrag,a=e.setDraggingSelectedPoint;e.zoom,o(),a(!1),n&&n.points&&n.points.length>1&&r(n.id,n,t._lastUndoKey)})),(0,u.Z)((0,i.Z)(t),"canCreatePoint",(function(){var e=t.props,n=e.object,r=e.selectedPoint;return!n||!n.isClosed&&(0===r||r===n.points.length-1)})),(0,u.Z)((0,i.Z)(t),"getEndPoint",(function(){var e=t.props,n=e.object,r=e.selectedPoint;return n&&t.canCreatePoint()&&n.points[r]})),(0,u.Z)((0,i.Z)(t),"getClosePointIndex",(function(){var e=t.props,n=e.object,r=e.selectedPoint;return!n||0===n.points.length||n.isClosed?null:0===r?n.points.length-1:r===n.points.length-1?0:null})),(0,u.Z)((0,i.Z)(t),"convertPoint",(function(e){var n=t.props,o=n.zoom,a=n.component;if(n.object,!e)return e;var i=(0,r.Z)(e,2),c=i[0],l=i[1],s=e;return a&&(s=[c+a.x,l+a.y]),(0,v.bA)(s,o)})),(0,u.Z)((0,i.Z)(t),"getRealPoint",(function(e){var n=t.props,o=(n.object,n.component),a=n.zoom,i=(0,v.ty)(e,a),c=(0,r.Z)(i,2),l=c[0],s=c[1];return o&&(l-=o.x,s-=o.y),[l=Math.round(l),s=Math.round(s)]})),t.state={lastCursorPosition:null,hitPoint:{x:0,y:0}},t.path=b.XV.create();var n=e.object,a=(e.zoom,e.updateObject);if(n){t.path.setSegments(n.points),t.path.setClosed(n.isClosed);var c=t.path.bounds,l=R(R({},n),{},{width:c.width,height:c.height,x:c.left,y:c.top});a(n.id,l,"zoom")}return t}return(0,a.Z)(f,[{key:"render",value:function(){var e=this,t=this.state,n=t.lastCursorPosition,r=(t.hitPoint,this.props),o=r.selectedPoint,a=r.object,i=r.setDraggingInControl,c=r.setDraggingOutControl,l=r.zoom,s=null,u=this.canCreatePoint(),d=this.getEndPoint(),f="",m=[];if(a){var v=this.path.clone();v.scale(l.scale);var y=this.convertPoint([a.x,a.y]),g=v.bounds.bbox();v.setPosition(new b.E9(y[0]+g.x+g.width/2,y[1]+g.y+g.height/2)),n&&d&&v.draw(new b.XX(this.convertPoint(n)),a.points.length),m=a.points.slice();var Z=0;v.segments.map((function(e,t){e.point,e.handleIn,e.handleOut,e.type;var n=e.curve,r=e.next,o=0;if(n){var a=r&&r.curve?r.curve:n,i=n._segment1.point.subtract(n._segment2.point),c=a._segment2.point.subtract(a._segment1.point);o=i.getDirectedAngle(c);var s=new P,u="";Z+=n.getLength();var p=n.getLength();if(n.getLength(),n._segment2){var d=n._segment2.point,f=n._segment1.point.rotate(o/2,d).subtract(d);f.length=30;var h=d.add(f);f.length=40,s=d.add(f);var y=v.getOffsetOf(n._segment2.point),g=v.getPointAt(y-30),E=v.getPointAt(y+30);if(y||(g=v.getPointAt(v.getLength()-30),E=v.getPointAt(30)),E){var A=b.XV.create();A.moveTo(g),A.arcTo2(h,E),u=A.getPathData()}}m[t]=R(R({},m[t]),{},{arcpath:u,textMedian:s,angle:o,offset:Z-p/2,length:p*(1/l.scale)})}})),f=v.getPathData()}var E=this.getClosePointIndex();return s="point-editor",u&&(s+=" cursor-pen-plus"),p.createElement("g",{onMouseDown:this.handleMouseDown,onMouseMove:this.handleMouseMove,onMouseUp:this.handleMouseUp,onMouseLeave:this.handleMouseLeave,className:s,pointerEvents:"all"},p.createElement(h(),{onKeyDown:this.handleKeyDown}),p.createElement("rect",{x:0,y:0,width:window.innerWidth,height:window.innerHeight,style:{fill:"none"}}),p.createElement("path",{id:"editorLine",className:"shape-editor-line ",d:f}),a&&p.createElement("g",{className:"shape-editor-points"},a.points.map((function(t,n){return p.createElement(P,{point:t,key:n,onSelect:e.handleSelectPoint(n),selected:o===n,isClosePoint:n===E,scalePoint:e.convertPoint,setDraggingInControl:i,setDraggingOutControl:c})}))),a&&p.createElement("g",{className:"shape-editor-size"},m.map((function(e,t){return p.createElement("g",null,p.createElement("path",{className:"shape-editor-line-angle",d:e.arcpath}),e.textMedian&&p.createElement("text",{x:e.textMedian.x,y:e.textMedian.y},Math.round(e.angle),"°"),p.createElement("text",{dy:"-4"},p.createElement("textPath",{href:"#editorLine",className:"shape-editor-active-line-text",startOffset:Math.round(e.offset)},Math.round(e.length))))})),"))}"))}}]),f}(p.Component);(0,d.$j)((function(e){return{object:(0,Z.j6)(e,(0,E.ni)(e)),component:(0,Z.j6)(e,(0,Z.TY)(e,(0,E.ni)(e))),draggingOutControl:(0,E.ek)(e),draggingInControl:(0,E.t0)(e),selectedPoint:(0,E.ee)(e),draggingSelectedPoint:(0,E.E2)(e)}}),{resetTool:A.bS,createObject:Z.nW,updateObject:Z.v4,setEditingShape:E.S6,setDraggingOutControl:E.hd,setDraggingInControl:E.Tl,endDrag:E.Xs,setSelectedPoint:E.bN,setDraggingSelectedPoint:E.q7})(S)},44263:(e,t,n)=>{"use strict";n.d(t,{Z:()=>m});var r=n(81253),o=n(22122),a=n(6610),i=n(5991),c=n(66213),l=n(10379),s=n(46070),u=n(77608),p=n(67294),d=(n(44127),n(81129),n(42281)),f=(n(53124),n(59274)),h=["xScaled","yScaled","points","zoom","hideShadows","shadow","x","y","width","height"];var m=function(e){(0,l.Z)(m,e);var t,n,d=(t=m,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=(0,u.Z)(t);if(n){var o=(0,u.Z)(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return(0,s.Z)(this,e)});function m(){return(0,a.Z)(this,m),d.apply(this,arguments)}return(0,i.Z)(m,[{key:"getPathData",value:function(){var e=this.props,t=(e.width,e.height,e.points),n=e.compound,r=e.isClosed,o=e.zoom,a=e.x,i=e.y;return this.path=f.XV.create(),n&&n.length>0?this.path=f.XV.create(n):t&&t.length>0&&(this.path=f.XV.create(t)),this.path.setClosed(r),this.path.scale(o.scale),this.path.adjust(a,i),this.path.getPathData()}},{key:"doubleClickHandler",value:function(){return this.isSelected()?this.props.onEdit():(0,c.Z)((0,u.Z)(m.prototype),"doubleClickHandler",this).call(this)}},{key:"renderPath",value:function(){return p.createElement("path",(0,o.Z)({},this.getBorderProps(),{fill:this.getBackgroundColor(),d:this.getPathData()}))}},{key:"render",value:function(){var e=this.props,t=(e.xScaled,e.yScaled,e.points,e.zoom,e.hideShadows,e.shadow,e.x,e.y,e.width,e.height,(0,r.Z)(e,h));return p.createElement("g",{className:"shape",onMouseDown:this.handleMouseDown,onDoubleClick:this.handleDoubleClick,style:t},this.renderPath())}}]),m}(d.Z)},92792:(e,t,n)=>{"use strict";n.d(t,{Z:()=>h});var r=n(28481),o=n(6610),a=n(5991),i=n(10379),c=n(46070),l=n(77608),s=n(67294),u=n(37703),p=n(81129),d=n(98151);n(60276);var f=function(e){(0,i.Z)(d,e);var t,n,u=(t=d,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=(0,l.Z)(t);if(n){var o=(0,l.Z)(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return(0,c.Z)(this,e)});function d(){return(0,o.Z)(this,d),u.apply(this,arguments)}return(0,a.Z)(d,[{key:"renderXSnap",value:function(){var e=this.props,t=e.xSnap,n=e.zoom;if(t&&null!==t.coord){var o=t.coord,a=(0,p.bA)([o,0],n),i=(0,r.Z)(a,1)[0];return i=Math.round(i+.5)-.5,s.createElement("line",{x1:i,x2:i,y1:0,y2:window.innerHeight})}}},{key:"renderYSnap",value:function(){var e=this.props,t=e.ySnap,n=e.zoom;if(t&&null!==t.coord){var o=t.coord,a=(0,p.bA)([0,o],n),i=(0,r.Z)(a,2)[1];return i=Math.round(i+.5)-.5,s.createElement("line",{x1:0,x2:window.innerWidth,y1:i,y2:i})}}},{key:"render",value:function(){return s.createElement("g",{className:"snap-grid"},this.renderXSnap(),this.renderYSnap())}}]),d}(s.Component);const h=(0,u.$j)((function(e){return{xSnap:(0,d.IS)(e),ySnap:(0,d.mm)(e)}}))(f)},5111:(e,t,n)=>{"use strict";n.d(t,{Z:()=>O});var r=n(81253),o=n(6610),a=n(5991),i=n(63349),c=n(10379),l=n(46070),s=n(77608),u=n(96156),p=n(67294),d=n(73935),f=n(37703),h=n(43236),m=n(61145),v=n(89926),y=n(45145),g=n(81129),b=n(7065),Z=["fontSize","width","height"];function E(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function A(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?E(Object(n),!0).forEach((function(t){(0,u.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):E(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var w=function(e){(0,c.Z)(m,e);var t,n,f=(t=m,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=(0,s.Z)(t);if(n){var o=(0,s.Z)(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return(0,l.Z)(this,e)});function m(){var e;(0,o.Z)(this,m);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return e=f.call.apply(f,[this].concat(n)),(0,u.Z)((0,i.Z)(e),"handleKeyDown",(function(t){t.stopPropagation(),(t.which===y.Yl&&t.metaKey||t.which===y._Q)&&e.handleBlur()})),(0,u.Z)((0,i.Z)(e),"handleChange",(function(t){var n=e.props,r=n.object;(0,n.updateObject)(r.id,t)})),(0,u.Z)((0,i.Z)(e),"handleBlur",(function(){(0,e.props.setEditingText)(!1)})),(0,u.Z)((0,i.Z)(e),"inputRef",(function(t){e.input=(0,d.findDOMNode)(t),e.input&&window.setTimeout((function(){e.input.focus(),e.input.select()}),20)})),(0,u.Z)((0,i.Z)(e),"concatLayoutText",(function(e){return Array.isArray(e)?e.join("\n"):""})),e}return(0,a.Z)(m,[{key:"render",value:function(){var e=this.props,t=e.branding,n=e.object,o=e.position,a=e.zoom;if(!n)return null;var i=n.fontSize,c=n.width,l=n.height,s=(0,r.Z)(n,Z),u=o.x,d=o.y,f=(0,b.BN)(n,t),m=(0,g.Ck)(a);s=A(A({},s),{},{fontFamily:f,fontSize:i,transform:m});var v=0;"center"===n.textAlignment?v-=i/2:"right"===n.textAlignment&&(v-=i);var y={width:c,textAlign:n.textAlignment,marginLeft:v};n.autoWidth&&(y.width+=i);var E={left:u,top:d,width:c,height:l};return p.createElement("div",{className:"text-editor-wrapper"},p.createElement("div",{className:"text-editor-backdrop",onClick:this.handleBlur}),p.createElement("div",{className:"text-editor",style:s},p.createElement("div",{className:"text-editor-sub",style:E},p.createElement("div",{className:"text-editor-input-backdrop",style:{width:c,height:l}}),p.createElement(h.ZP,{name:"text",displayName:"Text",role:"textbox",reference:"text",onChange:this.handleChange,objectId:n.id,value:n.text,hideBinding:!0,hideDisplayName:!0,disableIcon:!0,disableChip:!0}))))}}]),m}(p.Component);const O=(0,f.$j)((function(e){var t=(0,m.j6)(e,(0,v._R)(e));return{object:t,position:t&&(0,m.vi)(e,t.id),zoom:(0,m.aB)(e)}}),{updateObject:m.v4,setEditingText:v._n})(w)},60854:(e,t,n)=>{"use strict";n.d(t,{Z:()=>c});var r=n(94015),o=n.n(r),a=n(23645),i=n.n(a)()(o());i.push([e.id,'.admin-page{padding:32px;max-width:960px;margin:0 auto}.admin-page h1,.admin-page h2,.admin-page h3,.admin-page h4,.admin-page h5,.admin-page h6{margin:0;padding:0}.admin-page p{color:#8a8a8a}.admin-page-header{display:flex;flex-direction:row;align-items:center;justify-content:flex-start;padding:0;margin:0 0 24px 0;padding:8px 16px;border-bottom:1px solid #eee}.admin-page-header input{border:1px solid #eee;border-radius:4px;padding:8px;min-width:200px}.admin-page-table{margin-bottom:32px}.admin-page-table:last-of-type{margin-bottom:0}.admin-page-table-header{display:flex;flex-direction:row;align-items:center;border-bottom:1px solid #eee;font-weight:500}.admin-page-table-item{display:flex;flex-direction:row;align-items:center;border-bottom:1px solid #eee;color:inherit;text-decoration:none}.admin-page-table-item:hover{background-color:#f5f5f5}.admin-page-table a.admin-page-table-item{cursor:pointer}.admin-page-table-header>*,.admin-page-table-item>*{flex:1;align-items:flex-start;padding:8px 20px}.admin-page-table-error{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:64px 0}.admin-page-table-error h3{font-size:20px}.admin-page-table-error p{font-size:14px}.admin-page-table-loading{display:flex;align-items:center;justify-content:center;margin:32px 0}.admin-page .chip.status-active{background-color:#a1cd46}.admin-page .chip.status-rejected{color:#fff;background-color:#ef4c30}.admin-page .chip.status-private{color:#fff;background-color:#43437a}.admin-page .chip.status-testing{background-color:rgba(255,192,14,.1);border:1px solid #ffc00e}.admin-page .chip.status-approved{background-color:rgba(161,205,70,.1);border:1px solid #a1cd46}.admin-page .missing-logo{display:block;width:32px;height:32px}.admin-users-page{padding:30px;max-width:1000px;margin:0 auto}.admin-user-item,.admin-users-header{display:flex;flex-direction:row;align-items:center;padding:6px 20px;border-bottom:1px solid #ddd;margin:0 -20px}.admin-user-item>*,.admin-users-header>*{flex:1;align-items:flex-start}.admin-users-header p{color:#8a8a8a}a.admin-user-item{cursor:pointer;color:inherit;text-decoration:none}.admin-user-item:hover{background:#f5f5f5}.admin-user-item h5{font-size:14px;margin:0}.admin-user-item .app-icon{flex:unset;margin-right:12px}.admin-users-page h2{color:#8a8a8a;font-weight:400;font-size:18px}.admin-users-page h1+h2{margin-top:-3em;margin-bottom:3em}.admin-users-page h3{font-size:14px}.admin-users-page h2+h3{margin-top:-3em;margin-bottom:3em}.admin-org-status,.admin-build-status{display:inline-block;font-size:10px;text-transform:capitalize;color:#fff;background-color:#bbb;padding:3px 6px;border-radius:3px;margin:5px 0 5px 3px}.admin-org-paying,.admin-build-built{background-color:#3e87f8}.admin-org-free{background-color:#bbb}.admin-build-failed{background-color:red}.admin-library-active{background-color:#a1cd46}.admin-library-pending{color:#333;background-color:#ffc00e}.admin-library-approved{background-color:#3e87f8}.admin-library-deprecated{background-color:#ef4c30}.admin-user-organization+.admin-user-organization:before{content:", "}.admin-user-org-sub{display:inline-block}.admin-users-page .users-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:32px}.admin-users-page .users-header h1{margin-bottom:0}.admin-users-page .users-header input{padding:8px 12px;border-radius:6px;width:100%;max-width:240px;border:1px solid #e0e0e0;font-size:14px}.admin-users-page .users-header input:focus{outline:none}.admin-build-status-wrapper{display:flex;flex-direction:row;align-items:center}.admin-build-status-wrapper>*+*{margin-left:6px}',"",{version:3,sources:["webpack://./src/components/Admin/Admin.scss"],names:[],mappings:"AAAA,YAAY,YAAY,CAAC,eAAe,CAAC,aAAa,CAAC,0FAA0F,QAAQ,CAAC,SAAS,CAAC,cAAc,aAAa,CAAC,mBAAmB,YAAY,CAAC,kBAAkB,CAAC,kBAAkB,CAAC,0BAA0B,CAAC,SAAS,CAAC,iBAAiB,CAAC,gBAAgB,CAAC,4BAA4B,CAAC,yBAAyB,qBAAqB,CAAC,iBAAiB,CAAC,WAAW,CAAC,eAAe,CAAC,kBAAkB,kBAAkB,CAAC,+BAA+B,eAAe,CAAC,yBAAyB,YAAY,CAAC,kBAAkB,CAAC,kBAAkB,CAAC,4BAA4B,CAAC,eAAe,CAAC,uBAAuB,YAAY,CAAC,kBAAkB,CAAC,kBAAkB,CAAC,4BAA4B,CAAC,aAAa,CAAC,oBAAoB,CAAC,6BAA6B,wBAAwB,CAAC,0CAA0C,cAAc,CAAC,oDAAoD,MAAM,CAAC,sBAAsB,CAAC,gBAAgB,CAAC,wBAAwB,YAAY,CAAC,qBAAqB,CAAC,kBAAkB,CAAC,sBAAsB,CAAC,cAAc,CAAC,2BAA2B,cAAc,CAAC,0BAA0B,cAAc,CAAC,0BAA0B,YAAY,CAAC,kBAAkB,CAAC,sBAAsB,CAAC,aAAa,CAAC,gCAAgC,wBAAwB,CAAC,kCAAkC,UAAU,CAAC,wBAAwB,CAAC,iCAAiC,UAAU,CAAC,wBAAwB,CAAC,iCAAiC,oCAAoC,CAAC,wBAAwB,CAAC,kCAAkC,oCAAoC,CAAC,wBAAwB,CAAC,0BAA0B,aAAa,CAAC,UAAU,CAAC,WAAW,CAAC,kBAAkB,YAAY,CAAC,gBAAgB,CAAC,aAAa,CAAC,qCAAqC,YAAY,CAAC,kBAAkB,CAAC,kBAAkB,CAAC,gBAAgB,CAAC,4BAA4B,CAAC,cAAc,CAAC,yCAAyC,MAAM,CAAC,sBAAsB,CAAC,sBAAsB,aAAa,CAAC,kBAAkB,cAAc,CAAC,aAAa,CAAC,oBAAoB,CAAC,uBAAuB,kBAAkB,CAAC,oBAAoB,cAAc,CAAC,QAAQ,CAAC,2BAA2B,UAAU,CAAC,iBAAiB,CAAC,qBAAqB,aAAa,CAAC,eAAe,CAAC,cAAc,CAAC,wBAAwB,eAAe,CAAC,iBAAiB,CAAC,qBAAqB,cAAc,CAAC,wBAAwB,eAAe,CAAC,iBAAiB,CAAC,sCAAsC,oBAAoB,CAAC,cAAc,CAAC,yBAAyB,CAAC,UAAU,CAAC,qBAAqB,CAAC,eAAe,CAAC,iBAAiB,CAAC,oBAAoB,CAAC,qCAAqC,wBAAwB,CAAC,gBAAgB,qBAAqB,CAAC,oBAAoB,oBAAoB,CAAC,sBAAsB,wBAAwB,CAAC,uBAAuB,UAAU,CAAC,wBAAwB,CAAC,wBAAwB,wBAAwB,CAAC,0BAA0B,wBAAwB,CAAC,yDAAyD,YAAY,CAAC,oBAAoB,oBAAoB,CAAC,gCAAgC,YAAY,CAAC,kBAAkB,CAAC,6BAA6B,CAAC,kBAAkB,CAAC,mCAAmC,eAAe,CAAC,sCAAsC,gBAAgB,CAAC,iBAAiB,CAAC,UAAU,CAAC,eAAe,CAAC,wBAAwB,CAAC,cAAc,CAAC,4CAA4C,YAAY,CAAC,4BAA4B,YAAY,CAAC,kBAAkB,CAAC,kBAAkB,CAAC,gCAAgC,eAAe",sourcesContent:['.admin-page{padding:32px;max-width:960px;margin:0 auto}.admin-page h1,.admin-page h2,.admin-page h3,.admin-page h4,.admin-page h5,.admin-page h6{margin:0;padding:0}.admin-page p{color:#8a8a8a}.admin-page-header{display:flex;flex-direction:row;align-items:center;justify-content:flex-start;padding:0;margin:0 0 24px 0;padding:8px 16px;border-bottom:1px solid #eee}.admin-page-header input{border:1px solid #eee;border-radius:4px;padding:8px;min-width:200px}.admin-page-table{margin-bottom:32px}.admin-page-table:last-of-type{margin-bottom:0}.admin-page-table-header{display:flex;flex-direction:row;align-items:center;border-bottom:1px solid #eee;font-weight:500}.admin-page-table-item{display:flex;flex-direction:row;align-items:center;border-bottom:1px solid #eee;color:inherit;text-decoration:none}.admin-page-table-item:hover{background-color:#f5f5f5}.admin-page-table a.admin-page-table-item{cursor:pointer}.admin-page-table-header>*,.admin-page-table-item>*{flex:1;align-items:flex-start;padding:8px 20px}.admin-page-table-error{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:64px 0}.admin-page-table-error h3{font-size:20px}.admin-page-table-error p{font-size:14px}.admin-page-table-loading{display:flex;align-items:center;justify-content:center;margin:32px 0}.admin-page .chip.status-active{background-color:#a1cd46}.admin-page .chip.status-rejected{color:#fff;background-color:#ef4c30}.admin-page .chip.status-private{color:#fff;background-color:#43437a}.admin-page .chip.status-testing{background-color:rgba(255,192,14,.1);border:1px solid #ffc00e}.admin-page .chip.status-approved{background-color:rgba(161,205,70,.1);border:1px solid #a1cd46}.admin-page .missing-logo{display:block;width:32px;height:32px}.admin-users-page{padding:30px;max-width:1000px;margin:0 auto}.admin-user-item,.admin-users-header{display:flex;flex-direction:row;align-items:center;padding:6px 20px;border-bottom:1px solid #ddd;margin:0 -20px}.admin-user-item>*,.admin-users-header>*{flex:1;align-items:flex-start}.admin-users-header p{color:#8a8a8a}a.admin-user-item{cursor:pointer;color:inherit;text-decoration:none}.admin-user-item:hover{background:#f5f5f5}.admin-user-item h5{font-size:14px;margin:0}.admin-user-item .app-icon{flex:unset;margin-right:12px}.admin-users-page h2{color:#8a8a8a;font-weight:400;font-size:18px}.admin-users-page h1+h2{margin-top:-3em;margin-bottom:3em}.admin-users-page h3{font-size:14px}.admin-users-page h2+h3{margin-top:-3em;margin-bottom:3em}.admin-org-status,.admin-build-status{display:inline-block;font-size:10px;text-transform:capitalize;color:#fff;background-color:#bbb;padding:3px 6px;border-radius:3px;margin:5px 0 5px 3px}.admin-org-paying,.admin-build-built{background-color:#3e87f8}.admin-org-free{background-color:#bbb}.admin-build-failed{background-color:red}.admin-library-active{background-color:#a1cd46}.admin-library-pending{color:#333;background-color:#ffc00e}.admin-library-approved{background-color:#3e87f8}.admin-library-deprecated{background-color:#ef4c30}.admin-user-organization+.admin-user-organization:before{content:", "}.admin-user-org-sub{display:inline-block}.admin-users-page .users-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:32px}.admin-users-page .users-header h1{margin-bottom:0}.admin-users-page .users-header input{padding:8px 12px;border-radius:6px;width:100%;max-width:240px;border:1px solid #e0e0e0;font-size:14px}.admin-users-page .users-header input:focus{outline:none}.admin-build-status-wrapper{display:flex;flex-direction:row;align-items:center}.admin-build-status-wrapper>*+*{margin-left:6px}'],sourceRoot:""}]);const c=i},98931:(e,t,n)=>{"use strict";n.d(t,{Z:()=>c});var r=n(94015),o=n.n(r),a=n(23645),i=n.n(a)()(o());i.push([e.id,".editor-add-section .section-header-content{margin:0 -16px 16px}.editor-add-section h2{margin:16px 0;color:#8a8a8a;font-weight:400}","",{version:3,sources:["webpack://./src/components/Editor/AddObject/Tab/tab.scss"],names:[],mappings:"AAAA,4CAA4C,mBAAmB,CAAC,uBAAuB,aAAa,CAAC,aAAa,CAAC,eAAe",sourcesContent:[".editor-add-section .section-header-content{margin:0 -16px 16px}.editor-add-section h2{margin:16px 0;color:#8a8a8a;font-weight:400}"],sourceRoot:""}]);const c=i},67537:(e,t,n)=>{"use strict";n.d(t,{Z:()=>c});var r=n(94015),o=n.n(r),a=n(23645),i=n.n(a)()(o());i.push([e.id,".editor-add-section .section-header-content{margin:0 -16px 16px}.editor-add-section h2{margin:16px 0;color:#8a8a8a;font-weight:400}","",{version:3,sources:["webpack://./src/components/Editor/Box/Tab/tab.scss"],names:[],mappings:"AAAA,4CAA4C,mBAAmB,CAAC,uBAAuB,aAAa,CAAC,aAAa,CAAC,eAAe",sourcesContent:[".editor-add-section .section-header-content{margin:0 -16px 16px}.editor-add-section h2{margin:16px 0;color:#8a8a8a;font-weight:400}"],sourceRoot:""}]);const c=i},13126:(e,t,n)=>{"use strict";n.d(t,{Z:()=>c});var r=n(94015),o=n.n(r),a=n(23645),i=n.n(a)()(o());i.push([e.id,".empty-state.greedy.editor-empty-canvas{position:relative;z-index:1;margin-top:64px;margin-left:431px;width:auto;transition:margin .2s}.offline-banner-visible .empty-state.greedy.editor-empty-canvas{margin-top:96px}.editor-empty-canvas>*:last-child{margin-bottom:50px}.editor-empty-canvas h1{font-size:24px}.editor-empty-canvas p{font-size:14px}.editor-empty-canvas .add-screen-link{color:#3e87f8 !important}","",{version:3,sources:["webpack://./src/components/Editor/Canvas/Empty/Empty.scss"],names:[],mappings:"AAAA,wCAAwC,iBAAiB,CAAC,SAAS,CAAC,eAAe,CAAC,iBAAiB,CAAC,UAAU,CAAC,qBAAqB,CAAC,gEAAgE,eAAe,CAAC,kCAAkC,kBAAkB,CAAC,wBAAwB,cAAc,CAAC,uBAAuB,cAAc,CAAC,sCAAsC,wBAAwB",sourcesContent:[".empty-state.greedy.editor-empty-canvas{position:relative;z-index:1;margin-top:64px;margin-left:431px;width:auto;transition:margin .2s}.offline-banner-visible .empty-state.greedy.editor-empty-canvas{margin-top:96px}.editor-empty-canvas>*:last-child{margin-bottom:50px}.editor-empty-canvas h1{font-size:24px}.editor-empty-canvas p{font-size:14px}.editor-empty-canvas .add-screen-link{color:#3e87f8 !important}"],sourceRoot:""}]);const c=i},62112:(e,t,n)=>{"use strict";n.d(t,{Z:()=>c});var r=n(94015),o=n.n(r),a=n(23645),i=n.n(a)()(o());i.push([e.id,".library-component-inner-wrapper{-webkit-font-smoothing:antialiased}.library-component-error{display:block;background-color:#fcc;border:1px solid #d00;padding:4px;height:100%;width:100%}","",{version:3,sources:["webpack://./src/components/Editor/Canvas/LibraryComponent/LibraryComponent.scss"],names:[],mappings:"AAAA,iCAAiC,kCAAkC,CAAC,yBAAyB,aAAa,CAAC,qBAAqB,CAAC,qBAAqB,CAAC,WAAW,CAAC,WAAW,CAAC,UAAU",sourcesContent:[".library-component-inner-wrapper{-webkit-font-smoothing:antialiased}.library-component-error{display:block;background-color:#fcc;border:1px solid #d00;padding:4px;height:100%;width:100%}"],sourceRoot:""}]);const c=i},66736:(e,t,n)=>{"use strict";n.d(t,{Z:()=>c});var r=n(94015),o=n.n(r),a=n(23645),i=n.n(a)()(o());i.push([e.id,".link-wrapper{pointer-events:all}.link-wrapper .link-arrow{fill:#ddd}.link-wrapper .link-hover-path{fill:none;stroke:transparent;stroke-width:10}.link-wrapper .link-path{fill:none;stroke:#ddd}.link-wrapper:hover .link-path{stroke:#3e87f8}.link-wrapper:hover .link-arrow{fill:#3e87f8}.canvas-link-map-selected .link-wrapper:not(:hover) .link-path{stroke:#f5f5f5}.canvas-link-map-selected .link-wrapper:not(:hover) .link-arrow{fill:#f5f5f5}.canvas-link-map-selected .link-wrapper:not(:hover).link-wrapper-selected .link-path{stroke:#bbb}.canvas-link-map-selected .link-wrapper:not(:hover).link-wrapper-selected .link-arrow{fill:#bbb}","",{version:3,sources:["webpack://./src/components/Editor/Canvas/Links.scss"],names:[],mappings:"AAAA,cAAc,kBAAkB,CAAC,0BAA0B,SAAS,CAAC,+BAA+B,SAAS,CAAC,kBAAkB,CAAC,eAAe,CAAC,yBAAyB,SAAS,CAAC,WAAW,CAAC,+BAA+B,cAAc,CAAC,gCAAgC,YAAY,CAAC,+DAA+D,cAAc,CAAC,gEAAgE,YAAY,CAAC,qFAAqF,WAAW,CAAC,sFAAsF,SAAS",sourcesContent:[".link-wrapper{pointer-events:all}.link-wrapper .link-arrow{fill:#ddd}.link-wrapper .link-hover-path{fill:none;stroke:transparent;stroke-width:10}.link-wrapper .link-path{fill:none;stroke:#ddd}.link-wrapper:hover .link-path{stroke:#3e87f8}.link-wrapper:hover .link-arrow{fill:#3e87f8}.canvas-link-map-selected .link-wrapper:not(:hover) .link-path{stroke:#f5f5f5}.canvas-link-map-selected .link-wrapper:not(:hover) .link-arrow{fill:#f5f5f5}.canvas-link-map-selected .link-wrapper:not(:hover).link-wrapper-selected .link-path{stroke:#bbb}.canvas-link-map-selected .link-wrapper:not(:hover).link-wrapper-selected .link-arrow{fill:#bbb}"],sourceRoot:""}]);const c=i}}]);