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
10 KiB

{"ast":null,"code":"\"use strict\";\n\nvar _regeneratorRuntime = require(\"@babel/runtime/regenerator\");\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nvar _unfetch = _interopRequireDefault(require(\"next/dist/build/polyfills/unfetch\"));\n\nvar _eventSourcePolyfill = _interopRequireDefault(require(\"./event-source-polyfill\"));\n\nvar _eventsource = require(\"./error-overlay/eventsource\");\n\nvar _onDemandEntriesUtils = require(\"./on-demand-entries-utils\");\n\nvar _fouc = require(\"./fouc\");\n/* globals __webpack_hash__ */\n\n\nif (!window.EventSource) {\n window.EventSource = _eventSourcePolyfill[\"default\"];\n}\n\nvar data = JSON.parse(document.getElementById('__NEXT_DATA__').textContent);\nvar assetPrefix = data.assetPrefix,\n page = data.page;\nassetPrefix = assetPrefix || '';\nvar mostRecentHash = null;\n/* eslint-disable-next-line */\n\nvar curHash = __webpack_hash__;\nvar hotUpdatePath = assetPrefix + (assetPrefix.endsWith('/') ? '' : '/') + '_next/static/webpack/'; // Is there a newer version of this code available?\n\nfunction isUpdateAvailable() {\n // __webpack_hash__ is the hash of the current compilation.\n // It's a global variable injected by Webpack.\n\n /* eslint-disable-next-line */\n return mostRecentHash !== __webpack_hash__;\n} // Webpack disallows updates in other states.\n\n\nfunction canApplyUpdates() {\n return module.hot.status() === 'idle';\n} // This function reads code updates on the fly and hard\n// reloads the page when it has changed.\n\n\nfunction tryApplyUpdates() {\n var res, _data, curPage, pageUpdated;\n\n return _regeneratorRuntime.async(function tryApplyUpdates$(_context) {\n while (1) {\n switch (_context.prev = _context.next) {\n case 0:\n if (!(!isUpdateAvailable() || !canApplyUpdates())) {\n _context.next = 2;\n break;\n }\n\n return _context.abrupt(\"return\");\n\n case 2:\n _context.prev = 2;\n _context.next = 5;\n return _regeneratorRuntime.awrap((0, _unfetch[\"default\"])(\"\" + hotUpdatePath + curHash + \".hot-update.json\"));\n\n case 5:\n res = _context.sent;\n _context.next = 8;\n return _regeneratorRuntime.awrap(res.json());\n\n case 8:\n _data = _context.sent;\n curPage = page === '/' ? 'index' : page;\n pageUpdated = Object.keys(_data.c).some(function (mod) {\n return mod.indexOf(\"pages\" + (curPage.substr(0, 1) === '/' ? curPage : \"/\" + curPage)) !== -1 || mod.indexOf((\"pages\" + (curPage.substr(0, 1) === '/' ? curPage : \"/\" + curPage)).replace(/\\//g, '\\\\')) !== -1;\n });\n\n if (pageUpdated) {\n document.location.reload(true);\n } else {\n curHash = mostRecentHash;\n }\n\n _context.next = 18;\n break;\n\n case 14:\n _context.prev = 14;\n _context.t0 = _context[\"catch\"](2);\n console.error('Error occurred checking for update', _context.t0);\n document.location.reload(true);\n\n case 18:\n case \"end\":\n return _context.stop();\n }\n }\n }, null, null, [[2, 14]], Promise);\n}\n\n(0, _eventsource.getEventSourceWrapper)({\n path: assetPrefix + \"/_next/webpack-hmr\"\n}).addMessageListener(function (event) {\n if (event.data === \"\\uD83D\\uDC93\") {\n return;\n }\n\n try {\n var message = JSON.parse(event.data);\n\n if (message.action === 'sync' || message.action === 'built') {\n if (!message.hash) {\n return;\n }\n\n mostRecentHash = message.hash;\n tryApplyUpdates();\n } else if (message.action === 'reloadPage') {\n document.location.reload(true);\n }\n } catch (ex) {\n console.warn('Invalid HMR message: ' + event.data + '\\n' + ex);\n }\n});\n(0, _onDemandEntriesUtils.setupPing)(assetPrefix, function () {\n return page;\n});\n(0, _fouc.displayContent)();","map":{"version":3,"sources":["/home/gisle/projects/react/rpdata-frontend2/node_modules/next/dist/client/dev/amp-dev.js"],"names":["_interopRequireDefault","require","_unfetch","_eventSourcePolyfill","_eventsource","_onDemandEntriesUtils","_fouc","window","EventSource","data","JSON","parse","document","getElementById","textContent","assetPrefix","page","mostRecentHash","curHash","__webpack_hash__","hotUpdatePath","endsWith","isUpdateAvailable","canApplyUpdates","module","hot","status","tryApplyUpdates","res","json","_data","curPage","pageUpdated","Object","keys","c","some","mod","indexOf","substr","replace","location","reload","console","error","getEventSourceWrapper","path","addMessageListener","event","message","action","hash","ex","warn","setupPing","displayContent"],"mappings":"AAAA;;;;AAAa,IAAIA,sBAAsB,GAACC,OAAO,CAAC,8CAAD,CAAlC;;AAAmF,IAAIC,QAAQ,GAACF,sBAAsB,CAACC,OAAO,CAAC,mCAAD,CAAR,CAAnC;;AAAkF,IAAIE,oBAAoB,GAACH,sBAAsB,CAACC,OAAO,CAAC,yBAAD,CAAR,CAA/C;;AAAoF,IAAIG,YAAY,GAACH,OAAO,CAAC,6BAAD,CAAxB;;AAAwD,IAAII,qBAAqB,GAACJ,OAAO,CAAC,2BAAD,CAAjC;;AAA+D,IAAIK,KAAK,GAACL,OAAO,CAAC,QAAD,CAAjB;AAA4B;;;AAA8B,IAAG,CAACM,MAAM,CAACC,WAAX,EAAuB;AAACD,EAAAA,MAAM,CAACC,WAAP,GAAmBL,oBAAoB,WAAvC;AAAiD;;AAAA,IAAIM,IAAI,GAACC,IAAI,CAACC,KAAL,CAAWC,QAAQ,CAACC,cAAT,CAAwB,eAAxB,EAAyCC,WAApD,CAAT;IAA8EC,W,GAAkBN,I,CAAlBM,W;IAAYC,I,GAAMP,I,CAANO,I;AAAWD,WAAW,GAACA,WAAW,IAAE,EAAzB;AAA4B,IAAIE,cAAc,GAAC,IAAnB;AAAwB;;AAA8B,IAAIC,OAAO,GAACC,gBAAZ;AAA6B,IAAIC,aAAa,GAACL,WAAW,IAAEA,WAAW,CAACM,QAAZ,CAAqB,GAArB,IAA0B,EAA1B,GAA6B,GAA/B,CAAX,GAA+C,uBAAjE,C,CAAyF;;AAC7yB,SAASC,iBAAT,GAA4B;AAAC;AAC7B;;AACA;AAA8B,SAAOL,cAAc,KAAGE,gBAAxB;AAA0C,C,CAAA;;;AACxE,SAASI,eAAT,GAA0B;AAAC,SAAOC,MAAM,CAACC,GAAP,CAAWC,MAAX,OAAsB,MAA7B;AAAqC,C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AAwDhC,UAAAA,QAAQ,CAAC6B,QAAT,CAAkBC,MAAlB,CAAyB,IAAzB;;AAA9lB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AAA+nB,CAAC,GAAEtC,YAAY,CAACyC,qBAAhB,EAAuC;AAACC,EAAAA,IAAI,EAAC/B,WAAW,GAAC;AAAlB,CAAvC,EAAgFgC,kBAAhF,CAAmG,UAAAC,KAAK,EAAE;AAAC,MAAGA,KAAK,CAACvC,IAAN,KAAa,cAAhB,EAA+B;AAAC;AAAQ;;AAAA,MAAG;AAAC,QAAIwC,OAAO,GAACvC,IAAI,CAACC,KAAL,CAAWqC,KAAK,CAACvC,IAAjB,CAAZ;;AAAmC,QAAGwC,OAAO,CAACC,MAAR,KAAiB,MAAjB,IAAyBD,OAAO,CAACC,MAAR,KAAiB,OAA7C,EAAqD;AAAC,UAAG,CAACD,OAAO,CAACE,IAAZ,EAAiB;AAAC;AAAQ;;AAAAlC,MAAAA,cAAc,GAACgC,OAAO,CAACE,IAAvB;AAA4BxB,MAAAA,eAAe;AAAI,KAA/H,MAAoI,IAAGsB,OAAO,CAACC,MAAR,KAAiB,YAApB,EAAiC;AAACtC,MAAAA,QAAQ,CAAC6B,QAAT,CAAkBC,MAAlB,CAAyB,IAAzB;AAAgC;AAAC,GAA9O,CAA8O,OAAMU,EAAN,EAAS;AAACT,IAAAA,OAAO,CAACU,IAAR,CAAa,0BAAwBL,KAAK,CAACvC,IAA9B,GAAmC,IAAnC,GAAwC2C,EAArD;AAA0D;AAAC,CAAtc;AAAwc,CAAC,GAAE/C,qBAAqB,CAACiD,SAAzB,EAAoCvC,WAApC,EAAgD;AAAA,SAAIC,IAAJ;AAAA,CAAhD;AAA0D,CAAC,GAAEV,KAAK,CAACiD,cAAT","sourcesContent":["\"use strict\";var _interopRequireDefault=require(\"@babel/runtime/helpers/interopRequireDefault\");var _unfetch=_interopRequireDefault(require(\"next/dist/build/polyfills/unfetch\"));var _eventSourcePolyfill=_interopRequireDefault(require(\"./event-source-polyfill\"));var _eventsource=require(\"./error-overlay/eventsource\");var _onDemandEntriesUtils=require(\"./on-demand-entries-utils\");var _fouc=require(\"./fouc\");/* globals __webpack_hash__ */if(!window.EventSource){window.EventSource=_eventSourcePolyfill.default;}var data=JSON.parse(document.getElementById('__NEXT_DATA__').textContent);var{assetPrefix,page}=data;assetPrefix=assetPrefix||'';var mostRecentHash=null;/* eslint-disable-next-line */var curHash=__webpack_hash__;var hotUpdatePath=assetPrefix+(assetPrefix.endsWith('/')?'':'/')+'_next/static/webpack/';// Is there a newer version of this code available?\nfunction isUpdateAvailable(){// __webpack_hash__ is the hash of the current compilation.\n// It's a global variable injected by Webpack.\n/* eslint-disable-next-line */return mostRecentHash!==__webpack_hash__;}// Webpack disallows updates in other states.\nfunction canApplyUpdates(){return module.hot.status()==='idle';}// This function reads code updates on the fly and hard\n// reloads the page when it has changed.\nasync function tryApplyUpdates(){if(!isUpdateAvailable()||!canApplyUpdates()){return;}try{var res=await(0,_unfetch.default)(\"\"+hotUpdatePath+curHash+\".hot-update.json\");var _data=await res.json();var curPage=page==='/'?'index':page;var pageUpdated=Object.keys(_data.c).some(mod=>{return mod.indexOf(\"pages\"+(curPage.substr(0,1)==='/'?curPage:\"/\"+curPage))!==-1||mod.indexOf((\"pages\"+(curPage.substr(0,1)==='/'?curPage:\"/\"+curPage)).replace(/\\//g,'\\\\'))!==-1;});if(pageUpdated){document.location.reload(true);}else{curHash=mostRecentHash;}}catch(err){console.error('Error occurred checking for update',err);document.location.reload(true);}}(0,_eventsource.getEventSourceWrapper)({path:assetPrefix+\"/_next/webpack-hmr\"}).addMessageListener(event=>{if(event.data==='\\uD83D\\uDC93'){return;}try{var message=JSON.parse(event.data);if(message.action==='sync'||message.action==='built'){if(!message.hash){return;}mostRecentHash=message.hash;tryApplyUpdates();}else if(message.action==='reloadPage'){document.location.reload(true);}}catch(ex){console.warn('Invalid HMR message: '+event.data+'\\n'+ex);}});(0,_onDemandEntriesUtils.setupPing)(assetPrefix,()=>page);(0,_fouc.displayContent)();"]},"metadata":{},"sourceType":"script"}