Second frontend, written in Next.JS + Typescript.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

1 lines
14 KiB

{"ast":null,"code":"\"use strict\";\n\nexports.__esModule = true;\nexports[\"default\"] = initializeBuildWatcher;\n\nvar _eventsource = require(\"./error-overlay/eventsource\");\n\nfunction initializeBuildWatcher() {\n var shadowHost = document.createElement('div');\n shadowHost.id = '__next-build-watcher'; // Make sure container is fixed and on a high zIndex so it shows\n\n shadowHost.style.position = 'fixed';\n shadowHost.style.bottom = '10px';\n shadowHost.style.right = '20px';\n shadowHost.style.width = 0;\n shadowHost.style.height = 0;\n shadowHost.style.zIndex = 99999;\n document.body.appendChild(shadowHost);\n var shadowRoot;\n var prefix = '';\n\n if (shadowHost.attachShadow) {\n shadowRoot = shadowHost.attachShadow({\n mode: 'open'\n });\n } else {\n // If attachShadow is undefined then the browser does not support\n // the Shadow DOM, we need to prefix all the names so there\n // will be no conflicts\n shadowRoot = shadowHost;\n prefix = '__next-build-watcher-';\n } // Container\n\n\n var container = createContainer(prefix);\n shadowRoot.appendChild(container); // CSS\n\n var css = createCss(prefix);\n shadowRoot.appendChild(css); // State\n\n var isVisible = false;\n var isBuilding = false;\n var timeoutId = null; // Handle events\n\n var evtSource = (0, _eventsource.getEventSourceWrapper)({\n path: '/_next/webpack-hmr'\n });\n evtSource.addMessageListener(function (event) {\n // This is the heartbeat event\n if (event.data === \"\\uD83D\\uDC93\") {\n return;\n }\n\n try {\n handleMessage(event);\n } catch (_unused) {}\n });\n\n function handleMessage(event) {\n var obj = JSON.parse(event.data); // eslint-disable-next-line default-case\n\n switch (obj.action) {\n case 'building':\n timeoutId && clearTimeout(timeoutId);\n isVisible = true;\n isBuilding = true;\n updateContainer();\n break;\n\n case 'built':\n isBuilding = false; // Wait for the fade out transtion to complete\n\n timeoutId = setTimeout(function () {\n isVisible = false;\n updateContainer();\n }, 100);\n updateContainer();\n break;\n }\n }\n\n function updateContainer() {\n if (isBuilding) {\n container.classList.add(prefix + \"building\");\n } else {\n container.classList.remove(prefix + \"building\");\n }\n\n if (isVisible) {\n container.classList.add(prefix + \"visible\");\n } else {\n container.classList.remove(prefix + \"visible\");\n }\n }\n}\n\nfunction createContainer(prefix) {\n var container = document.createElement('div');\n container.id = prefix + \"container\";\n container.innerHTML = \"\\n <div id=\\\"\" + prefix + \"icon-wrapper\\\">\\n <svg viewBox=\\\"0 0 226 200\\\">\\n <defs>\\n <linearGradient\\n x1=\\\"114.720775%\\\"\\n y1=\\\"181.283245%\\\"\\n x2=\\\"39.5399306%\\\"\\n y2=\\\"100%\\\"\\n id=\\\"\" + prefix + \"linear-gradient\\\"\\n >\\n <stop stop-color=\\\"#FFFFFF\\\" offset=\\\"0%\\\" />\\n <stop stop-color=\\\"#000000\\\" offset=\\\"100%\\\" />\\n </linearGradient>\\n </defs>\\n <g id=\\\"\" + prefix + \"icon-group\\\" fill=\\\"none\\\" stroke=\\\"url(#\" + prefix + \"linear-gradient)\\\" stroke-width=\\\"18\\\">\\n <path d=\\\"M113,5.08219117 L4.28393801,197.5 L221.716062,197.5 L113,5.08219117 Z\\\" />\\n </g>\\n </svg>\\n </div>\\n \";\n return container;\n}\n\nfunction createCss(prefix) {\n var css = document.createElement('style');\n css.textContent = \"\\n #\" + prefix + \"container {\\n position: absolute;\\n bottom: 10px;\\n right: 30px;\\n\\n background: #fff;\\n color: #000;\\n font: initial;\\n cursor: initial;\\n letter-spacing: initial;\\n text-shadow: initial;\\n text-transform: initial;\\n visibility: initial;\\n\\n padding: 8px 10px;\\n align-items: center;\\n box-shadow: 0 11px 40px 0 rgba(0, 0, 0, 0.25), 0 2px 10px 0 rgba(0, 0, 0, 0.12);\\n\\n display: none;\\n opacity: 0;\\n transition: opacity 0.1s ease, bottom 0.1s ease;\\n animation: \" + prefix + \"fade-in 0.1s ease-in-out;\\n }\\n\\n #\" + prefix + \"container.\" + prefix + \"visible {\\n display: flex;\\n }\\n\\n #\" + prefix + \"container.\" + prefix + \"building {\\n bottom: 20px;\\n opacity: 1;\\n }\\n\\n #\" + prefix + \"icon-wrapper {\\n width: 16px;\\n height: 16px;\\n }\\n\\n #\" + prefix + \"icon-wrapper > svg {\\n width: 100%;\\n height: 100%;\\n }\\n\\n #\" + prefix + \"icon-group {\\n animation: \" + prefix + \"strokedash 1s ease-in-out both infinite;\\n }\\n\\n @keyframes \" + prefix + \"fade-in {\\n from {\\n bottom: 10px;\\n opacity: 0;\\n }\\n to {\\n bottom: 20px;\\n opacity: 1;\\n }\\n }\\n\\n @keyframes \" + prefix + \"strokedash {\\n 0% {\\n stroke-dasharray: 0 226;\\n }\\n 80%,\\n 100% {\\n stroke-dasharray: 659 226;\\n }\\n }\\n \";\n return css;\n}","map":{"version":3,"sources":["/home/gisle/projects/react/rpdata-frontend2/node_modules/next/dist/client/dev/dev-build-watcher.js"],"names":["exports","__esModule","initializeBuildWatcher","_eventsource","require","shadowHost","document","createElement","id","style","position","bottom","right","width","height","zIndex","body","appendChild","shadowRoot","prefix","attachShadow","mode","container","createContainer","css","createCss","isVisible","isBuilding","timeoutId","evtSource","getEventSourceWrapper","path","addMessageListener","event","data","handleMessage","_unused","obj","JSON","parse","action","clearTimeout","updateContainer","setTimeout","classList","add","remove","innerHTML","textContent"],"mappings":"AAAA;;AAAaA,OAAO,CAACC,UAAR,GAAmB,IAAnB;AAAwBD,OAAO,WAAP,GAAgBE,sBAAhB;;AAAuC,IAAIC,YAAY,GAACC,OAAO,CAAC,6BAAD,CAAxB;;AAAwD,SAASF,sBAAT,GAAiC;AAAC,MAAIG,UAAU,GAACC,QAAQ,CAACC,aAAT,CAAuB,KAAvB,CAAf;AAA6CF,EAAAA,UAAU,CAACG,EAAX,GAAc,sBAAd,CAA9C,CAAmF;;AACxPH,EAAAA,UAAU,CAACI,KAAX,CAAiBC,QAAjB,GAA0B,OAA1B;AAAkCL,EAAAA,UAAU,CAACI,KAAX,CAAiBE,MAAjB,GAAwB,MAAxB;AAA+BN,EAAAA,UAAU,CAACI,K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AS,CAACd,EAAV,GAAaW,MAAM,GAAC,WAApB;AAAgCG,EAAAA,SAAS,CAACyB,SAAV,GAAoB,qBAAmB5B,MAAnB,GAA0B,6OAA1B,GAAwQA,MAAxQ,GAA+Q,wNAA/Q,GAAweA,MAAxe,GAA+e,2CAA/e,GAA2hBA,MAA3hB,GAAkiB,qLAAtjB;AAA4uB,SAAOG,SAAP;AAAkB;;AAAA,SAASG,SAAT,CAAmBN,MAAnB,EAA0B;AAAC,MAAIK,GAAG,GAAClB,QAAQ,CAACC,aAAT,CAAuB,OAAvB,CAAR;AAAwCiB,EAAAA,GAAG,CAACwB,WAAJ,GAAgB,YAAU7B,MAAV,GAAiB,6iBAAjB,GAA+jBA,MAA/jB,GAAskB,2CAAtkB,GAAknBA,MAAlnB,GAAynB,YAAznB,GAAsoBA,MAAtoB,GAA6oB,iDAA7oB,GAA+rBA,MAA/rB,GAAssB,YAAtsB,GAAmtBA,MAAntB,GAA0tB,oEAA1tB,GAA+xBA,MAA/xB,GAAsyB,yEAAtyB,GAAg3BA,MAAh3B,GAAu3B,+EAAv3B,GAAu8BA,MAAv8B,GAA88B,iCAA98B,GAAg/BA,MAAh/B,GAAu/B,oEAAv/B,GAA4jCA,MAA5jC,GAAmkC,yKAAnkC,GAA6uCA,MAA7uC,GAAovC,uJAApwC;AAA45C,SAAOK,GAAP;AAAY","sourcesContent":["\"use strict\";exports.__esModule=true;exports.default=initializeBuildWatcher;var _eventsource=require(\"./error-overlay/eventsource\");function initializeBuildWatcher(){var shadowHost=document.createElement('div');shadowHost.id='__next-build-watcher';// Make sure container is fixed and on a high zIndex so it shows\nshadowHost.style.position='fixed';shadowHost.style.bottom='10px';shadowHost.style.right='20px';shadowHost.style.width=0;shadowHost.style.height=0;shadowHost.style.zIndex=99999;document.body.appendChild(shadowHost);var shadowRoot;var prefix='';if(shadowHost.attachShadow){shadowRoot=shadowHost.attachShadow({mode:'open'});}else{// If attachShadow is undefined then the browser does not support\n// the Shadow DOM, we need to prefix all the names so there\n// will be no conflicts\nshadowRoot=shadowHost;prefix='__next-build-watcher-';}// Container\nvar container=createContainer(prefix);shadowRoot.appendChild(container);// CSS\nvar css=createCss(prefix);shadowRoot.appendChild(css);// State\nvar isVisible=false;var isBuilding=false;var timeoutId=null;// Handle events\nvar evtSource=(0,_eventsource.getEventSourceWrapper)({path:'/_next/webpack-hmr'});evtSource.addMessageListener(event=>{// This is the heartbeat event\nif(event.data==='\\uD83D\\uDC93'){return;}try{handleMessage(event);}catch(_unused){}});function handleMessage(event){var obj=JSON.parse(event.data);// eslint-disable-next-line default-case\nswitch(obj.action){case'building':timeoutId&&clearTimeout(timeoutId);isVisible=true;isBuilding=true;updateContainer();break;case'built':isBuilding=false;// Wait for the fade out transtion to complete\ntimeoutId=setTimeout(()=>{isVisible=false;updateContainer();},100);updateContainer();break;}}function updateContainer(){if(isBuilding){container.classList.add(prefix+\"building\");}else{container.classList.remove(prefix+\"building\");}if(isVisible){container.classList.add(prefix+\"visible\");}else{container.classList.remove(prefix+\"visible\");}}}function createContainer(prefix){var container=document.createElement('div');container.id=prefix+\"container\";container.innerHTML=\"\\n <div id=\\\"\"+prefix+\"icon-wrapper\\\">\\n <svg viewBox=\\\"0 0 226 200\\\">\\n <defs>\\n <linearGradient\\n x1=\\\"114.720775%\\\"\\n y1=\\\"181.283245%\\\"\\n x2=\\\"39.5399306%\\\"\\n y2=\\\"100%\\\"\\n id=\\\"\"+prefix+\"linear-gradient\\\"\\n >\\n <stop stop-color=\\\"#FFFFFF\\\" offset=\\\"0%\\\" />\\n <stop stop-color=\\\"#000000\\\" offset=\\\"100%\\\" />\\n </linearGradient>\\n </defs>\\n <g id=\\\"\"+prefix+\"icon-group\\\" fill=\\\"none\\\" stroke=\\\"url(#\"+prefix+\"linear-gradient)\\\" stroke-width=\\\"18\\\">\\n <path d=\\\"M113,5.08219117 L4.28393801,197.5 L221.716062,197.5 L113,5.08219117 Z\\\" />\\n </g>\\n </svg>\\n </div>\\n \";return container;}function createCss(prefix){var css=document.createElement('style');css.textContent=\"\\n #\"+prefix+\"container {\\n position: absolute;\\n bottom: 10px;\\n right: 30px;\\n\\n background: #fff;\\n color: #000;\\n font: initial;\\n cursor: initial;\\n letter-spacing: initial;\\n text-shadow: initial;\\n text-transform: initial;\\n visibility: initial;\\n\\n padding: 8px 10px;\\n align-items: center;\\n box-shadow: 0 11px 40px 0 rgba(0, 0, 0, 0.25), 0 2px 10px 0 rgba(0, 0, 0, 0.12);\\n\\n display: none;\\n opacity: 0;\\n transition: opacity 0.1s ease, bottom 0.1s ease;\\n animation: \"+prefix+\"fade-in 0.1s ease-in-out;\\n }\\n\\n #\"+prefix+\"container.\"+prefix+\"visible {\\n display: flex;\\n }\\n\\n #\"+prefix+\"container.\"+prefix+\"building {\\n bottom: 20px;\\n opacity: 1;\\n }\\n\\n #\"+prefix+\"icon-wrapper {\\n width: 16px;\\n height: 16px;\\n }\\n\\n #\"+prefix+\"icon-wrapper > svg {\\n width: 100%;\\n height: 100%;\\n }\\n\\n #\"+prefix+\"icon-group {\\n animation: \"+prefix+\"strokedash 1s ease-in-out both infinite;\\n }\\n\\n @keyframes \"+prefix+\"fade-in {\\n from {\\n bottom: 10px;\\n opacity: 0;\\n }\\n to {\\n bottom: 20px;\\n opacity: 1;\\n }\\n }\\n\\n @keyframes \"+prefix+\"strokedash {\\n 0% {\\n stroke-dasharray: 0 226;\\n }\\n 80%,\\n 100% {\\n stroke-dasharray: 659 226;\\n }\\n }\\n \";return css;}"]},"metadata":{},"sourceType":"script"}