Files
developer-roadmap/_next/static/chunks/pages/[roadmap]/interactive-c62bd94f20a8d338.js
Kamran Ahmed 175bbe77af Updates
2021-12-04 19:13:50 +00:00

1 line
15 KiB
JavaScript

(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[526],{7718:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/[roadmap]/interactive",function(){return n(4498)}])},1524:function(e,t,n){"use strict";n.d(t,{m:function(){return i}});var r=n(5893),o=n(8527);n(7294);function i(e){var t=e.title,n=e.subtitle,i=e.children,a=e.beforeTitle,c=void 0===a?null:a;return(0,r.jsxs)(o.xu,{pt:["25px","20px","45px"],pb:["20px","15px","30px"],borderBottomWidth:1,mb:"30px",children:[(0,r.jsxs)(o.W2,{maxW:"container.md",position:"relative",children:[c,(0,r.jsx)(o.X6,{as:"h1",color:"black",fontSize:["28px","33px","40px"],fontWeight:700,mb:["2px","2px","5px"],children:t}),(0,r.jsx)(o.xv,{fontSize:["13px","14px","15px"],children:n})]}),i&&(0,r.jsx)(o.W2,{maxW:"container.md",children:i})]})}},4866:function(e,t,n){"use strict";n.d(t,{v:function(){return c}});var r=n(5893),o=n(8527),i=n(8641),a=n(5657);n(7294);function c(){return(0,r.jsxs)(o.xv,{_hover:{textDecoration:"none",color:"blue.700","& .new-badge":{bg:"blue.700"}},as:o.rU,href:i.url.youtube,d:"block",target:"_blank",color:"red.700",fontSize:"sm",mb:"10px",fontWeight:500,onClick:function(){return(0,a.B)({category:"Subscription",action:"Clicked the YouTube banner",label:"YouTube Alert on Roadmap"})},children:[(0,r.jsx)(o.Ct,{transition:"all 300ms",className:"new-badge",mr:"7px",colorScheme:"red",variant:"solid",children:"New"}),(0,r.jsx)(o.xv,{textDecoration:"underline",as:"span",d:["none","inline"],children:"Roadmap topics to be covered on our YouTube Channel"}),(0,r.jsx)(o.xv,{textDecoration:"underline",as:"span",d:["inline","none"],children:"Topic videos being made on YouTube"}),(0,r.jsx)(o.xv,{as:"span",ml:"5px",children:"\xbb"})]})}},1177:function(e,t,n){"use strict";n.d(t,{h:function(){return s}});var r=n(5893),o=n(4866),i=n(8527),a=n(6723),c=n(9876),l=n(1524);n(7294);function s(e){var t=e.roadmap;return(0,r.jsx)(l.m,{beforeTitle:(0,r.jsx)(o.v,{}),title:t.title,subtitle:t.description,children:(0,r.jsxs)(i.Kq,{mt:"20px",isInline:!0,children:[(0,r.jsxs)(a.zx,{d:["flex","flex"],as:i.rU,href:"/roadmaps",size:"xs",py:"14px",px:"10px",colorScheme:"teal",variant:"solid",_hover:{textDecoration:"none"},children:["\u2190 ",(0,r.jsx)(i.xv,{as:"span",d:["none","inline"],ml:"5px",children:"All Roadmaps"})]}),t.pdfUrl&&(0,r.jsx)(a.zx,{as:i.rU,href:t.pdfUrl,target:"_blank",size:"xs",py:"14px",px:"10px",leftIcon:(0,r.jsx)(c._8,{}),colorScheme:"yellow",variant:"solid",_hover:{textDecoration:"none"},children:"Download"}),(0,r.jsx)(a.zx,{as:i.rU,href:"/signup",size:"xs",py:"14px",px:"10px",leftIcon:(0,r.jsx)(c.Km,{}),colorScheme:"yellow",variant:"solid",_hover:{textDecoration:"none"},children:"Subscribe"})]})})}},3626:function(e,t,n){"use strict";n.r(t),n.d(t,{__N_SSG:function(){return x},default:function(){return h}});var r=n(5893),o=n(1739),i=n(8527),a=n(2438),c=n(1832),l=n(600),s=n(6673),u=n(8025),d=n(202),p=(n(7294),n(9876));function f(e){var t=e.roadmap,o=e.group;if(!t.contentPathsFilePath)return null;var i=t.contentPathsFilePath.replace(/^\//,""),a=(n(9280)("./".concat(i))[o]||"").replace(/^\//,""),c=n(9280)("./".concat(a)).default;return(0,r.jsx)(u.Z,{children:(0,r.jsx)(c,{})})}function v(e){var t=e.roadmap,n=e.group.split(":");return(0,r.jsxs)(o.aG,{fontWeight:"medium",fontSize:"sm",separator:(0,r.jsx)(p.XC,{color:"gray.500"}),children:[(0,r.jsx)(o.gN,{children:(0,r.jsx)(o.At,{color:"blue.500",href:"/".concat(t.id),children:t.featuredTitle})}),n.map((function(e,i){return(0,r.jsx)(o.gN,{isCurrentPage:i===n.length-1,children:(0,r.jsx)(o.At,{textTransform:"capitalize",color:"blue.500",href:"/".concat(t.id,"/").concat(n.slice(0,i+1).join(":")),children:e.split("-").join(" ")})},e)}))]})}var x=!0;function h(e){var t,n,o=e.roadmap,u=e.group,p=e.isOutlet;return void 0!==p&&p?(0,r.jsx)(f,{roadmap:o,group:u}):(0,r.jsxs)(i.xu,{bg:"white",minH:"100vh",children:[(0,r.jsx)(a.e,{}),(0,r.jsx)(d.Z,{title:(null===o||void 0===o||null===(t=o.seo)||void 0===t?void 0:t.title)||o.title,description:(null===o||void 0===o||null===(n=o.seo)||void 0===n?void 0:n.description)||o.description,keywords:(null===o||void 0===o?void 0:o.seo.keywords)||[]}),(0,r.jsxs)(i.W2,{my:"60px",maxW:"container.md",position:"relative",children:[(0,r.jsx)(v,{roadmap:o,group:u}),(0,r.jsx)(f,{roadmap:o,group:u})]}),(0,r.jsx)(c.z,{}),(0,r.jsx)(l.q,{}),(0,r.jsx)(s.$,{})]})}},4498:function(e,t,n){"use strict";n.r(t),n.d(t,{__N_SSG:function(){return W},default:function(){return E}});var r=n(5893),o=n(8527),i=n(2438),a=n(1832),c=n(600),l=n(6673),s=n(202),u=n(7294),d=n(8520),p=n.n(d);function f(e,t,n){var r=void 0===t?{}:t,o=document.createElementNS("http://www.w3.org/2000/svg",e);for(var i in r)r.hasOwnProperty(i)&&o.setAttribute(i,r[i]);return n&&n.appendChild(o),o}var v=2.7,x={black:["#000"],gray:["#000","#333","#666","#999","#ccc","#ddd","#eee"],white:["#fff"],red:["#cf2a27","#ea9999","#eo6666","#cc0000","#990000","#660000"],orange:["#ff9900","#f9cb9c","#f6b26b","#e69138","#b45f06","#783f04"],yellow:["#ffff00","#ffe599","#ffd966","#f1c232","#bf9000","#7f6000"],green:["#009e0f","#b6d7a8","#93c47d","#6aa84f","#38761d","#274e13"],cyan:["#00ffff","#a2c4c9","#76a5af","#45818e","#134f5c","#0c343d"],blue:["#2b78e4","#9fc5f8","#6fa8dc","#597eaa","#085394","#073763"],purple:["#9900ff","#b4a7d6","#8e7cc3","#674ea7","#351c75","#20124d"],pink:["#ff00ff","#d5a6bd","#c27ba0","#a64d79","#741b47","#4c1130"]};function h(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function m(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function y(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=[],r=!0,o=!1,i=void 0;try{for(var a,c=e[Symbol.iterator]();!(r=(a=c.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(l){o=!0,i=l}finally{try{r||null==c.return||c.return()}finally{if(o)throw i}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}var b=function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.svgRoot=t,this.fontFamily=n,this.canvasRenderingContext2D=document.createElement("canvas").getContext("2d")}var t,n,r;return t=e,(n=[{key:"render",value:function(e,t){var n=e.typeID;n in this?this[n](e,t):console.log("'".concat(n,"' control type not implemented"))}},{key:"parseColor",value:function(e,t){return void 0===e?"rgb(".concat(t,")"):function(e){var t=e>>8&255,n=255&e;return"rgb(".concat(e>>16&255,",").concat(t,",").concat(n,")")}(e)}},{key:"parseFontProperties",value:function(e){var t,n,r;return{style:(null===(t=e.properties)||void 0===t?void 0:t.italic)?"italic":"normal",weight:(null===(n=e.properties)||void 0===n?void 0:n.bold)?"bold":"normal",size:(null===(r=e.properties)||void 0===r?void 0:r.size)?e.properties.size+"px":"13px",family:this.fontFamily}}},{key:"measureText",value:function(e,t){return this.canvasRenderingContext2D.font=t,this.canvasRenderingContext2D.measureText(e)}},{key:"drawRectangle",value:function(e,t){var n,r,o,i,a,c;f("rect",{x:parseInt(e.x)+1.35,y:parseInt(e.y)+1.35,width:parseInt(null!==(i=e.w)&&void 0!==i?i:e.measuredW)-v,height:parseInt(null!==(a=e.h)&&void 0!==a?a:e.measuredH)-v,rx:2,fill:this.parseColor(null===(n=e.properties)||void 0===n?void 0:n.color,"255,255,255"),"fill-opacity":null!==(c=null===(r=e.properties)||void 0===r?void 0:r.backgroundAlpha)&&void 0!==c?c:1,stroke:this.parseColor(null===(o=e.properties)||void 0===o?void 0:o.borderColor,"0,0,0"),"stroke-width":v},t)}},{key:"addText",value:function(e,t,n,r){var o,i,a=null!==(o=e.properties.text)&&void 0!==o?o:"",c=parseInt(e.x),l=parseInt(e.y),s=this.parseFontProperties(e),u=this.measureText(a,"".concat(s.style," ").concat(s.weight," ").concat(s.size," ").concat(s.family)),d=f("text",{x:"center"===r?c+(null!==(i=e.w)&&void 0!==i?i:e.measuredW)/2-u.width/2:c,y:l+e.measuredH/2+u.actualBoundingBoxAscent/2,fill:n,"font-style":s.style,"font-weight":s.weight,"font-size":s.size},t);a.includes("{color:")?a.split(/{color:|{color}/).forEach((function(e){if(e.includes("}")){var t=y(e.split("}"),2),n=t[0],r=t[1];if(!n.startsWith("#")){var o=parseInt(n.slice(-1));n=isNaN(o)?x[n][0]:x[n][o]}f("tspan",{fill:n},d).textContent=r}else f("tspan",{},d).textContent=e})):f("tspan",{},d).textContent=a}},{key:"TextArea",value:function(e,t){this.drawRectangle(e,t)}},{key:"Canvas",value:function(e,t){this.drawRectangle(e,t)}},{key:"Label",value:function(e,t){var n;this.addText(e,t,this.parseColor(null===(n=e.properties)||void 0===n?void 0:n.color,"0,0,0"),"left")}},{key:"TextInput",value:function(e,t){var n;this.drawRectangle(e,t),this.addText(e,t,this.parseColor(null===(n=e.properties)||void 0===n?void 0:n.textColor,"0,0,0"),"center")}},{key:"Arrow",value:function(e,t){var n,r,o,i,a=parseInt(e.x),c=parseInt(e.y),l=e.properties,s=l.p0,u=l.p1,d=l.p2;"dotted"===(null===(n=e.properties)||void 0===n?void 0:n.stroke)?i="0.8 12":"dashed"===(null===(r=e.properties)||void 0===r?void 0:r.stroke)&&(i="28 46");var p=(d.x-s.x)*u.x,v=(d.y-s.y)*u.x;f("path",{d:"M".concat(a+s.x," ").concat(c+s.y,"Q").concat(a+s.x+p+v*u.y*3.6," ").concat(c+s.y+v+-p*u.y*3.6," ").concat(a+d.x," ").concat(c+d.y),fill:"none",stroke:this.parseColor(null===(o=e.properties)||void 0===o?void 0:o.color,"0,0,0"),"stroke-width":4,"stroke-linecap":"round","stroke-linejoin":"round","stroke-dasharray":i},t)}},{key:"Icon",value:function(e,t){var n,r=parseInt(e.x),o=parseInt(e.y),i=10;f("circle",{cx:r+i,cy:o+i,r:i,fill:this.parseColor(null===(n=e.properties)||void 0===n?void 0:n.color,"0,0,0")},t),"check-circle"===e.properties.icon.ID&&f("path",{d:"M".concat(r+4.5," ").concat(o+i,"L").concat(r+8.5," ").concat(o+i+4," ").concat(r+15," ").concat(o+i-2.5),fill:"none",stroke:"#fff","stroke-width":3.5,"stroke-linecap":"round","stroke-linejoin":"round"},t)}},{key:"HRule",value:function(e,t){var n,r,o,i,a,c=parseInt(e.x),l=parseInt(e.y);"dotted"===(null===(n=e.properties)||void 0===n?void 0:n.stroke)?i="0.8, 8":"dashed"===(null===(r=e.properties)||void 0===r?void 0:r.stroke)&&(i="18, 30"),f("path",{d:"M".concat(c," ").concat(l,"L").concat(c+parseInt(null!==(a=e.w)&&void 0!==a?a:e.measuredW)," ").concat(l),fill:"none",stroke:this.parseColor(null===(o=e.properties)||void 0===o?void 0:o.color,"0,0,0"),"stroke-width":v,"stroke-linecap":"round","stroke-linejoin":"round","stroke-dasharray":i},t)}},{key:"__group__",value:function(e,t){var n,r=this,o=null===e||void 0===e||null===(n=e.properties)||void 0===n?void 0:n.controlName,i=f("g",function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"===typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){m(e,t,n[t])}))}return e}({},o?{class:"clickable-group","data-group-id":o}:{}),t);e.children.controls.control.sort((function(e,t){return e.zOrder-t.zOrder})).forEach((function(t){t.x=parseInt(t.x,10)+parseInt(e.x,10),t.y=parseInt(t.y,10)+parseInt(e.y,10),r.render(t,i)}))}}])&&h(t.prototype,n),r&&h(t,r),e}();function g(e,t,n,r,o,i,a){try{var c=e[i](a),l=c.value}catch(s){return void n(s)}c.done?t(l):Promise.resolve(l).then(r,o)}function w(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){g(i,r,o,a,c,"next",e)}function c(e){g(i,r,o,a,c,"throw",e)}a(void 0)}))}}function j(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function k(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"===typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){j(e,t,n[t])}))}return e}function C(){return(C=w(p().mark((function e(t,n){var r,o,i,a,c,l,s,u,d;return p().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(r=k({padding:5,fontFamily:"balsamiq",fontURL:"/fonts/balsamiq.woff2"},r=void 0===n?{}:n)).fontURL){e.next=7;break}return o=new FontFace(r.fontFamily,"url(".concat(r.fontURL,")")),e.next=6,o.load();case 6:document.fonts.add(o);case 7:return i=t.mockup,a=i.measuredW-i.mockupW-r.padding,c=i.measuredH-i.mockupH-r.padding,l=parseInt(i.mockupW)+2*r.padding,s=parseInt(i.mockupH)+2*r.padding,u=f("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"".concat(a," ").concat(c," ").concat(l," ").concat(s),style:"font-family: balsamiq"}),d=new b(u,r.fontFamily),i.controls.control.sort((function(e,t){return e.zOrder-t.zOrder})).forEach((function(e){d.render(e,u)})),e.abrupt("return",u);case 16:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var I=n(1177),_=n(4746),O=n(2779),z=n(3626);function S(e){var t=e.roadmap,n=e.groupId,i=e.onClose,a=void 0===i?function(){return null}:i;return n?(0,r.jsxs)(o.xu,{zIndex:99999,pos:"relative",children:[(0,r.jsx)(o.xu,{onClick:a,pos:"fixed",top:0,left:0,right:0,bottom:0,bg:"black",opacity:.4}),(0,r.jsx)(O.Z,{children:(0,r.jsxs)(o.xu,{p:"0px 30px 30px",position:"fixed",w:["100%","70%","50%"],bg:"white",top:0,right:0,bottom:0,borderLeftWidth:"1px",overflowY:"scroll",children:[(0,r.jsx)(_.P,{onClick:a,pos:"absolute",top:"20px",right:"20px",zIndex:1}),(0,r.jsx)(z.default,{isOutlet:!0,roadmap:t,group:n})]})})]}):null}var P=n(2730);function T(e){var t=e.roadmap,n=(0,P.ib)(),i=(n.loading,n.error,n.get),a=(0,u.useRef)(null),c=(0,u.useState)(null),l=c[0],s=c[1],d=(0,u.useState)(""),p=d[0],f=d[1],v=(0,u.useState)(!1),x=(v[0],v[1]);return(0,u.useEffect)((function(){i("/project/".concat(t.id,".json")).then((function(e){s(e)})).catch((function(e){console.error(e),x(!0)}))}),[]),(0,u.useEffect)((function(){window.addEventListener("keydown",(function(e){"escape"===e.key.toLowerCase()&&f("")})),window.addEventListener("click",(function(e){var t,n,r=null===(t=null===e||void 0===e?void 0:e.target)||void 0===t?void 0:t.closest("g"),o=null===r||void 0===r||null===(n=r.dataset)||void 0===n?void 0:n.groupId;r&&o&&f(o.replace(/^\d+-/,""))}))}),[]),(0,u.useEffect)((function(){l&&function(e){return C.apply(this,arguments)}(l).then((function(e){var t=a.current;t&&(t.firstChild&&t.removeChild(t.firstChild),t.appendChild(e))})).catch((function(e){x(!0)}))}),[l]),(0,r.jsxs)(o.W2,{maxW:"container.lg",position:"relative",children:[(0,r.jsx)(S,{roadmap:t,groupId:p,onClose:function(){return f("")}}),(0,r.jsx)("div",{ref:a})]})}var W=!0;function E(e){var t,n,u=e.roadmap;return(0,r.jsxs)(o.xu,{bg:"white",minH:"100vh",children:[(0,r.jsx)(i.e,{}),(0,r.jsx)(s.Z,{title:(null===u||void 0===u||null===(t=u.seo)||void 0===t?void 0:t.title)||u.title,description:(null===u||void 0===u||null===(n=u.seo)||void 0===n?void 0:n.description)||u.description,keywords:(null===u||void 0===u?void 0:u.seo.keywords)||[]}),(0,r.jsxs)(o.xu,{mb:"60px",children:[(0,r.jsx)(I.h,{roadmap:u}),(0,r.jsx)(T,{roadmap:u})]}),(0,r.jsx)(a.z,{}),(0,r.jsx)(c.q,{}),(0,r.jsx)(l.$,{})]})}}},function(e){e.O(0,[709,22,26,515,231,70,636,280,774,888,179],(function(){return t=7718,e(e.s=t);var t}));var t=e.O();_N_E=t}]);