function createUnityInstance(r,n,l){function s(e,r){if(!s.aborted&&n.showBanner)return"error"==r&&(s.aborted=!0),n.showBanner(e,r);switch(r){case"error":console.error(e);break;case"warning":console.warn(e);break;default:console.log(e)}}function t(e){var r=e.reason||e.error,n=r?r.toString():e.message||e.reason||"",t=r&&r.stack?r.stack.toString():"";(n+="\n"+(t=t.startsWith(n)?t.substring(n.length):t).trim())&&c.stackTraceRegExp&&c.stackTraceRegExp.test(n)&&h(n,e.filename||r&&(r.fileName||r.sourceURL)||"",e.lineno||r&&(r.lineNumber||r.line)||0)}function e(e,r,n){var t=e[r];void 0!==t&&t||(console.warn('Config option "'+r+'" is missing or empty. Falling back to default value: "'+n+'". Consider updating your WebGL template to include the missing config option.'),e[r]=n)}l=l||function(){};var o,c={canvas:r,webglContextAttributes:{preserveDrawingBuffer:!1,powerPreference:2},streamingAssetsUrl:"StreamingAssets",downloadProgress:{},deinitializers:[],intervals:{},setInterval:function(e,r){e=window.setInterval(e,r);return this.intervals[e]=!0,e},clearInterval:function(e){delete this.intervals[e],window.clearInterval(e)},preRun:[],postRun:[],print:function(e){console.log(e)},printErr:function(e){console.error(e),"string"==typeof e&&-1!=e.indexOf("wasm streaming compile failed")&&(-1!=e.toLowerCase().indexOf("mime")?s('HTTP Response Header "Content-Type" configured incorrectly on the server for file '+c.codeUrl+' , should be "application/wasm". Startup time performance will suffer.',"warning"):s('WebAssembly streaming compilation failed! This can happen for example if "Content-Encoding" HTTP header is incorrectly enabled on the server for file '+c.codeUrl+", but the file is not pre-compressed on disk (or vice versa). Check the Network tab in browser Devtools to debug server header configuration.","warning"))},locateFile:function(e){return"build.wasm"==e?this.codeUrl:e},disabledCanvasEvents:["contextmenu","dragstart"]};for(o in e(n,"companyName","Unity"),e(n,"productName","WebGL Player"),e(n,"productVersion","1.0"),n)c[o]=n[o];c.streamingAssetsUrl=new URL(c.streamingAssetsUrl,document.URL).href;var i=c.disabledCanvasEvents.slice();function a(e){e.preventDefault()}i.forEach(function(e){r.addEventListener(e,a)}),window.addEventListener("error",t),window.addEventListener("unhandledrejection",t),c.deinitializers.push(function(){for(var e in c.disableAccessToMediaDevices(),i.forEach(function(e){r.removeEventListener(e,a)}),window.removeEventListener("error",t),window.removeEventListener("unhandledrejection",t),c.intervals)window.clearInterval(e);c.intervals={}}),c.QuitCleanup=function(){for(var e=0;eIf using custom web server, verify that web server is sending .br files with HTTP Response Header "Content-Encoding: br". Brotli compression may not be supported in Firefox over HTTP connections. '+t+' See https://bugzilla.mozilla.org/show_bug.cgi?id=1670675 for more information.':"Unable to parse "+c.frameworkUrl+'!
If using custom web server, verify that web server is sending .br files with HTTP Response Header "Content-Encoding: br". Brotli compression may not be supported over HTTP connections. Migrate your server to use HTTPS.'),void s(n,"error"))}s("Unable to parse "+c.frameworkUrl+"! The file is corrupt, or compression was misconfigured? (check Content-Encoding HTTP Response Header on web server)","error")}var o=unityFramework;unityFramework=null,a.onload=null,i(o)},a.onerror=function(e){s("Unable to load file "+c.frameworkUrl+"! Check that the file exists on the remote server. (also check browser Console and Devtools Network tab to debug)","error")},document.body.appendChild(a),c.deinitializers.push(function(){document.body.removeChild(a)})}).then(function(e){e(c)});g(n="dataUrl"),e=c.fetchWithProgress,r=c[n],r=/file:\/\//.exec(r)?"same-origin":void 0;var n,e,r,t=e(c[n],{method:"GET",companyName:c.companyName,productName:c.productName,control:"no-store",mode:r,onProgress:function(e){g(n,e)}}).then(function(e){return e.parsedBody}).catch(function(e){var r="Failed to download file "+c[n];"file:"==location.protocol?s(r+". Loading web pages via a file:// URL without a web server is not supported by this browser. Please use a local development web server to host Unity content, or use the Unity Build and Run option.","error"):console.error(r)});c.preRun.push(function(){c.addRunDependency("dataUrl"),t.then(function(e){var r=new DataView(e.buffer,e.byteOffset,e.byteLength),n=0,t="UnityWebData1.0\0";if(!String.fromCharCode.apply(null,e.subarray(n,n+t.length))==t)throw"unknown data format";var o=r.getUint32(n+=t.length,!0);for(n+=4;n