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AI4B,EAAkB,CACrB,IAAK,GAaNhC,EAAoBQ,EAAEjO,EAAK0P,GAA0C,IAA7BD,EAAgBC,GAGxD,IAAIC,EAAuB,CAACC,EAA4Bte,KACvD,IAGIoc,EAAUgC,GAHTxB,EAAU2B,EAAaC,GAAWxe,EAGhBoF,EAAI,EAC3B,GAAGwX,EAAS6B,MAAM9lB,GAAgC,IAAxBwlB,EAAgBxlB,KAAa,CACtD,IAAIyjB,KAAYmC,EACZpC,EAAoBxW,EAAE4Y,EAAanC,KACrCD,EAAoBO,EAAEN,GAAYmC,EAAYnC,IAGhD,GAAGoC,EAAS,IAAIxH,EAASwH,EAAQrC,EAClC,CAEA,IADGmC,GAA4BA,EAA2Bte,GACrDoF,EAAIwX,EAAS7a,OAAQqD,IACzBgZ,EAAUxB,EAASxX,GAChB+W,EAAoBxW,EAAEwY,EAAiBC,IAAYD,EAAgBC,IACrED,EAAgBC,GAAS,KAE1BD,EAAgBC,GAAW,EAE5B,OAAOjC,EAAoBQ,EAAE3F,EAAO,EAGjC0H,EAAqBC,KAAoC,8BAAIA,KAAoC,+BAAK,GAC1GD,EAAmB1X,QAAQqX,EAAqBnb,KAAK,KAAM,IAC3Dwb,EAAmBjF,KAAO4E,EAAqBnb,KAAK,KAAMwb,EAAmBjF,KAAKvW,KAAKwb,G,KC7CvF,IAAIE,EAAsBzC,EAAoBQ,OAAEhjB,EAAW,CAAC,MAAM,IAAOwiB,EAAoB,OAC7FyC,EAAsBzC,EAAoBQ,EAAEiC,E","sources":["webpack://squeezelite-esp32/webpack/runtime/chunk loaded","webpack://squeezelite-esp32/./src/js/custom.js","webpack://squeezelite-esp32/./src/index.ts","webpack://squeezelite-esp32/webpack/bootstrap","webpack://squeezelite-esp32/webpack/runtime/compat get default export","webpack://squeezelite-esp32/webpack/runtime/define property getters","webpack://squeezelite-esp32/webpack/runtime/global","webpack://squeezelite-esp32/webpack/runtime/hasOwnProperty shorthand","webpack://squeezelite-esp32/webpack/runtime/make namespace object","webpack://squeezelite-esp32/webpack/runtime/node module decorator","webpack://squeezelite-esp32/webpack/runtime/jsonp chunk loading","webpack://squeezelite-esp32/webpack/startup"],"sourcesContent":["var deferred = [];\n__webpack_require__.O = (result, chunkIds, fn, priority) => {\n\tif(chunkIds) {\n\t\tpriority = priority || 0;\n\t\tfor(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1];\n\t\tdeferred[i] = [chunkIds, fn, priority];\n\t\treturn;\n\t}\n\tvar notFulfilled = Infinity;\n\tfor (var i = 0; i < deferred.length; i++) {\n\t\tvar [chunkIds, fn, priority] = deferred[i];\n\t\tvar fulfilled = true;\n\t\tfor (var j = 0; j < chunkIds.length; j++) {\n\t\t\tif ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every((key) => (__webpack_require__.O[key](chunkIds[j])))) {\n\t\t\t\tchunkIds.splice(j--, 1);\n\t\t\t} else {\n\t\t\t\tfulfilled = false;\n\t\t\t\tif(priority < notFulfilled) notFulfilled = priority;\n\t\t\t}\n\t\t}\n\t\tif(fulfilled) {\n\t\t\tdeferred.splice(i--, 1)\n\t\t\tvar r = fn();\n\t\t\tif (r !== undefined) result = r;\n\t\t}\n\t}\n\treturn result;\n};","var he = require('he');\nvar Promise = require('es6-promise').Promise;\nwindow.bootstrap = require('bootstrap');\nimport Cookies from 'js-cookie';\n\n\n\nif (!String.prototype.format) {\n Object.assign(String.prototype, {\n format() {\n const args = arguments;\n return this.replace(/{(\\d+)}/g, function (match, number) {\n return typeof args[number] !== 'undefined' ? args[number] : match;\n });\n },\n });\n}\nif (!String.prototype.encodeHTML) {\n Object.assign(String.prototype, {\n encodeHTML() {\n return he.encode(this).replace(/\\n/g, '<br />');\n },\n });\n}\nObject.assign(Date.prototype, {\n toLocalShort() {\n const opt = { dateStyle: 'short', timeStyle: 'short' };\n return this.toLocaleString(undefined, opt);\n },\n});\nfunction get_control_option_value(obj) {\n let ctrl,id,val,opt;\n let radio = false;\n let checked = false;\n if (typeof (obj) === 'string') {\n id = obj;\n ctrl = $(`#${id}`);\n } else {\n id = $(obj).attr('id');\n ctrl = $(obj);\n }\n if(ctrl.attr('type') === 'checkbox'){\n opt = $(obj).checked?id.replace('cmd_opt_', ''):'';\n val = true;\n }\n else {\n opt = id.replace('cmd_opt_', '');\n val = $(obj).val();\n val = `${val.includes(\" \") ? '\"' : ''}${val}${val.includes(\" \") ? '\"' : ''}`;\n }\n\n return { opt, val };\n}\nfunction handleNVSVisible() {\n let nvs_previous_checked = isEnabled(Cookies.get(\"show-nvs\"));\n $('input#show-nvs')[0].checked = nvs_previous_checked;\n if ($('input#show-nvs')[0].checked || recovery) {\n $('*[href*=\"-nvs\"]').show();\n } else {\n $('*[href*=\"-nvs\"]').hide();\n }\n}\nfunction concatenateOptions(options) {\n let commandLine = ' ';\n for (const [option, value] of Object.entries(options)) {\n if (option !== 'n' && option !== 'o') {\n commandLine += `-${option} `;\n if (value !== true) {\n commandLine += `${value} `;\n }\n }\n }\n return commandLine;\n}\n\nfunction isEnabled(val) {\n return val != undefined && typeof val === 'string' && val.match(\"[Yy1]\");\n}\n\nconst nvsTypes = {\n NVS_TYPE_U8: 0x01,\n /*! < Type uint8_t */\n NVS_TYPE_I8: 0x11,\n /*! < Type int8_t */\n NVS_TYPE_U16: 0x02,\n /*! < Type uint16_t */\n NVS_TYPE_I16: 0x12,\n /*! < Type int16_t */\n NVS_TYPE_U32: 0x04,\n /*! < Type uint32_t */\n NVS_TYPE_I32: 0x14,\n /*! < Type int32_t */\n NVS_TYPE_U64: 0x08,\n /*! < Type uint64_t */\n NVS_TYPE_I64: 0x18,\n /*! < Type int64_t */\n NVS_TYPE_STR: 0x21,\n /*! < Type string */\n NVS_TYPE_BLOB: 0x42,\n /*! < Type blob */\n NVS_TYPE_ANY: 0xff /*! < Must be last */,\n};\nconst btIcons = {\n bt_playing: { 'label': '', 'icon': 'media_bluetooth_on' },\n bt_disconnected: { 'label': '', 'icon': 'media_bluetooth_off' },\n bt_neutral: { 'label': '', 'icon': 'bluetooth' },\n bt_connecting: { 'label': '', 'icon': 'bluetooth_searching' },\n bt_connected: { 'label': '', 'icon': 'bluetooth_connected' },\n bt_disabled: { 'label': '', 'icon': 'bluetooth_disabled' },\n play_arrow: { 'label': '', 'icon': 'play_circle_filled' },\n pause: { 'label': '', 'icon': 'pause_circle' },\n stop: { 'label': '', 'icon': 'stop_circle' },\n '': { 'label': '', 'icon': '' }\n};\nconst batIcons = [\n { icon: \"battery_0_bar\", label: '▪', ranges: [{ f: 5.8, t: 6.8 }, { f: 8.8, t: 10.2 }] },\n { icon: \"battery_2_bar\", label: '▪▪', ranges: [{ f: 6.8, t: 7.4 }, { f: 10.2, t: 11.1 }] },\n { icon: \"battery_3_bar\", label: '▪▪▪', ranges: [{ f: 7.4, t: 7.5 }, { f: 11.1, t: 11.25 }] },\n { icon: \"battery_4_bar\", label: '▪▪▪▪', ranges: [{ f: 7.5, t: 7.8 }, { f: 11.25, t: 11.7 }] }\n];\nconst btStateIcons = [\n { desc: 'Idle', sub: ['bt_neutral'] },\n { desc: 'Discovering', sub: ['bt_connecting'] },\n { desc: 'Discovered', sub: ['bt_connecting'] },\n { desc: 'Unconnected', sub: ['bt_disconnected'] },\n { desc: 'Connecting', sub: ['bt_connecting'] },\n {\n desc: 'Connected',\n sub: ['bt_connected', 'play_arrow', 'bt_playing', 'pause', 'stop'],\n },\n { desc: 'Disconnecting', sub: ['bt_disconnected'] },\n];\n\nconst pillcolors = {\n MESSAGING_INFO: 'badge-success',\n MESSAGING_WARNING: 'badge-warning',\n MESSAGING_ERROR: 'badge-danger',\n};\nconst connectReturnCode = {\n OK: 0,\n FAIL: 1,\n DISC: 2,\n LOST: 3,\n RESTORE: 4,\n ETH: 5\n}\nconst taskStates = {\n 0: 'eRunning',\n /*! < A task is querying the state of itself, so must be running. */\n 1: 'eReady',\n /*! < The task being queried is in a read or pending ready list. */\n 2: 'eBlocked',\n /*! < The task being queried is in the Blocked state. */\n 3: 'eSuspended',\n /*! < The task being queried is in the Suspended state, or is in the Blocked state with an infinite time out. */\n 4: 'eDeleted',\n};\nlet flashState = {\n NONE: 0,\n REBOOT_TO_RECOVERY: 2,\n SET_FWURL: 5,\n FLASHING: 6,\n DONE: 7,\n UPLOADING: 8,\n ERROR: 9,\n UPLOADCOMPLETE: 10,\n _state: -1,\n olderRecovery: false,\n statusText: '',\n flashURL: '',\n flashFileName: '',\n statusPercent: 0,\n Completed: false,\n recovery: false,\n prevRecovery: false,\n updateModal: new bootstrap.Modal(document.getElementById('otadiv'), {}),\n reset: function () {\n\n this.olderRecovery = false;\n this.statusText = '';\n this.statusPercent = -1;\n this.flashURL = '';\n this.flashFileName = undefined;\n this.UpdateProgress();\n $('#rTable tr.release').removeClass('table-success table-warning');\n $('.flact').prop('disabled', false);\n $('#flashfilename').value = null;\n $('#fw-url-input').value = null;\n if (!this.isStateError()) {\n $('span#flash-status').html('');\n $('#fwProgressLabel').parent().removeClass('bg-danger');\n }\n this._state = this.NONE\n return this;\n },\n isStateUploadComplete: function () {\n return this._state == this.UPLOADCOMPLETE;\n },\n isStateError: function () {\n return this._state == this.ERROR;\n },\n isStateNone: function () {\n return this._state == this.NONE;\n },\n isStateRebootRecovery: function () {\n return this._state == this.REBOOT_TO_RECOVERY;\n },\n isStateSetUrl: function () {\n return this._state == this.SET_FWURL;\n },\n isStateFlashing: function () {\n return this._state == this.FLASHING;\n },\n isStateDone: function () {\n return this._state == this.DONE;\n },\n isStateUploading: function () {\n return this._state == this.UPLOADING;\n },\n init: function () {\n this._state = this.NONE;\n return this;\n },\n\n SetStateError: function () {\n this._state = this.ERROR;\n $('#fwProgressLabel').parent().addClass('bg-danger');\n return this;\n },\n SetStateNone: function () {\n this._state = this.NONE;\n return this;\n },\n SetStateRebootRecovery: function () {\n this._state = this.REBOOT_TO_RECOVERY;\n // Reboot system to recovery mode\n this.SetStatusText('Starting recovery mode.')\n $.ajax({\n url: '/recovery.json',\n context: this,\n dataType: 'text',\n method: 'POST',\n cache: false,\n contentType: 'application/json; charset=utf-8',\n data: JSON.stringify({\n timestamp: Date.now(),\n }),\n error: function (xhr, _ajaxOptions, thrownError) {\n this.setOTAError(`Unexpected error while trying to restart to recovery. (status=${xhr.status ?? ''}, error=${thrownError ?? ''} ) `);\n },\n complete: function (response) {\n this.SetStatusText('Waiting for system to boot.')\n },\n });\n return this;\n },\n SetStateSetUrl: function () {\n this._state = this.SET_FWURL;\n this.statusText = 'Sending firmware download location.';\n let confData = {\n fwurl: {\n value: this.flashURL,\n type: 33,\n }\n };\n post_config(confData);\n return this;\n },\n SetStateFlashing: function () {\n this._state = this.FLASHING;\n return this;\n },\n SetStateDone: function () {\n this._state = this.DONE;\n this.reset();\n return this;\n },\n SetStateUploading: function () {\n this._state = this.UPLOADING;\n return this.SetStatusText('Sending file to device.');\n },\n SetStateUploadComplete: function () {\n this._state = this.UPLOADCOMPLETE;\n return this;\n },\n\n isFlashExecuting: function () {\n return true === (this._state != this.UPLOADING && (this.statusText !== '' || this.statusPercent >= 0));\n },\n\n\n\n toString: function () {\n let keys = Object.keys(this);\n return keys.find(x => this[x] === this._state);\n },\n\n setOTATargets: function () {\n this.flashURL = '';\n this.flashFileName = '';\n this.flashURL = $('#fw-url-input').val();\n let fileInput = $('#flashfilename')[0].files;\n if (fileInput.length > 0) {\n this.flashFileName = fileInput[0];\n }\n if (this.flashFileName.length == 0 && this.flashURL.length == 0) {\n this.setOTAError('Invalid url or file. Cannot start OTA');\n }\n return this;\n },\n\n setOTAError: function (message) {\n this.SetStateError().SetStatusPercent(0).SetStatusText(message).reset();\n return this;\n },\n\n ShowDialog: function () {\n if (!this.isStateNone()) {\n this.updateModal.show();\n $('.flact').prop('disabled', true);\n }\n return this;\n },\n\n SetStatusPercent: function (pct) {\n var pctChanged = (this.statusPercent != pct);\n this.statusPercent = pct;\n if (pctChanged) {\n if (!this.isStateUploading() && !this.isStateFlashing()) {\n this.SetStateFlashing();\n }\n if (pct == 100) {\n if (this.isStateFlashing()) {\n this.SetStateDone();\n }\n else if (this.isStateUploading()) {\n this.statusPercent = 0;\n this.SetStateFlashing();\n }\n }\n this.UpdateProgress().ShowDialog();\n }\n return this;\n },\n SetStatusText: function (txt) {\n var changed = (this.statusText != txt);\n this.statusText = txt;\n if (changed) {\n $('span#flash-status').html(this.statusText);\n this.ShowDialog();\n }\n\n return this;\n },\n UpdateProgress: function () {\n $('.progress-bar')\n .css('width', this.statusPercent + '%')\n .attr('aria-valuenow', this.statusPercent)\n .text(this.statusPercent + '%')\n $('.progress-bar').html((this.isStateDone() ? 100 : this.statusPercent) + '%');\n return this;\n },\n StartOTA: function () {\n this.logEvent(this.StartOTA.name);\n $('#fwProgressLabel').parent().removeClass('bg-danger');\n this.setOTATargets();\n if (this.isStateError()) {\n return this;\n }\n if (!recovery) {\n this.SetStateRebootRecovery();\n }\n else {\n this.SetStateFlashing().TargetReadyStartOTA();\n }\n\n return this;\n },\n UploadLocalFile: function () {\n this.SetStateUploading();\n const xhttp = new XMLHttpRequest();\n xhttp.context = this;\n var boundHandleUploadProgressEvent = this.HandleUploadProgressEvent.bind(this);\n var boundsetOTAError = this.setOTAError.bind(this);\n xhttp.upload.addEventListener(\"progress\", boundHandleUploadProgressEvent, false);\n xhttp.onreadystatechange = function () {\n if (xhttp.readyState === 4) {\n if (xhttp.status === 0 || xhttp.status === 404) {\n boundsetOTAError(`Upload Failed. Recovery version might not support uploading. Please use web update instead.`);\n }\n }\n };\n xhttp.open('POST', '/flash.json', true);\n xhttp.send(this.flashFileName);\n },\n TargetReadyStartOTA: function () {\n if (recovery && this.prevRecovery && !this.isStateRebootRecovery() && !this.isStateFlashing()) {\n // this should only execute once, while being in a valid state\n return this;\n }\n\n this.logEvent(this.TargetReadyStartOTA.name);\n if (!recovery) {\n console.error('Event TargetReadyStartOTA fired in the wrong mode ');\n return this;\n }\n this.prevRecovery = true;\n\n if (this.flashFileName !== '') {\n this.UploadLocalFile();\n }\n else if (this.flashURL != '') {\n this.SetStateSetUrl();\n }\n else {\n this.setOTAError('Invalid URL or file name while trying to start the OTa process')\n }\n },\n HandleUploadProgressEvent: function (data) {\n this.logEvent(this.HandleUploadProgressEvent.name);\n this.SetStateUploading().SetStatusPercent(Math.round(data.loaded / data.total * 100)).SetStatusText('Uploading file to device');\n },\n EventTargetStatus: function (data) {\n if (!this.isStateNone()) {\n this.logEvent(this.EventTargetStatus.name);\n }\n if (data.ota_pct ?? -1 >= 0) {\n this.olderRecovery = true;\n this.SetStatusPercent(data.ota_pct);\n }\n if ((data.ota_dsc ?? '') != '') {\n this.olderRecovery = true;\n this.SetStatusText(data.ota_dsc);\n }\n\n if (data.recovery != undefined) {\n this.recovery = data.recovery === 1 ? true : false;\n }\n if (this.isStateRebootRecovery() && this.recovery) {\n this.TargetReadyStartOTA();\n }\n },\n EventOTAMessageClass: function (data) {\n this.logEvent(this.EventOTAMessageClass.name);\n var otaData = JSON.parse(data);\n this.SetStatusPercent(otaData.ota_pct).SetStatusText(otaData.ota_dsc);\n },\n logEvent: function (fun) {\n console.log(`${fun}, flash state ${this.toString()}, recovery: ${this.recovery}, ota pct: ${this.statusPercent}, ota desc: ${this.statusText}`);\n }\n\n};\nwindow.hideSurrounding = function (obj) {\n $(obj).parent().parent().hide();\n}\n\nlet presetsloaded = false;\nlet is_i2c_locked = false;\nlet statusInterval = 2000;\nlet messageInterval = 2500;\nfunction post_config(data) {\n let confPayload = {\n timestamp: Date.now(),\n config: data\n };\n $.ajax({\n url: '/config.json',\n dataType: 'text',\n method: 'POST',\n cache: false,\n contentType: 'application/json; charset=utf-8',\n data: JSON.stringify(confPayload),\n error: handleExceptionResponse,\n });\n}\n\n\nwindow.hFlash = function () {\n // reset file upload selection if any;\n $('#flashfilename').value = null\n flashState.StartOTA();\n}\nwindow.handleReboot = function (link) {\n if (link == 'reboot_ota') {\n $('#reboot_ota_nav').removeClass('active').prop(\"disabled\", true); delayReboot(500, '', 'reboot_ota');\n }\n else {\n $('#reboot_nav').removeClass('active'); delayReboot(500, '', link);\n }\n}\n\nfunction parseSqueezeliteCommandLine(commandLine) {\n const options = {};\n let output, name;\n let otherValues = '';\n\n const argRegex = /(\"[^\"]+\"|'[^']+'|\\S+)/g;\n const args = commandLine.match(argRegex);\n\n let i = 0;\n\n while (i < args.length) {\n const arg = args[i];\n\n if (arg.startsWith('-')) {\n const option = arg.slice(1);\n\n if (option === '') {\n otherValues += args.slice(i).join(' ');\n break;\n }\n\n let value = true;\n\n if (i + 1 < args.length && !args[i + 1].startsWith('-')) {\n value = args[i + 1].replace(/\"/g, '').replace(/'/g, '');\n i++;\n }\n\n options[option] = value;\n } else {\n otherValues += arg + ' ';\n }\n\n i++;\n }\n\n otherValues = otherValues.trim();\n output = getOutput(options);\n name = getName(options);\n let otherOptions={btname:null,n:null};\n // assign o and n options to otheroptions if present\n if (options.o && output.toUpperCase() === 'BT') {\n let temp = parseSqueezeliteCommandLine(options.o);\n if(temp.name) {\n otherOptions.btname = temp.name;\n }\n delete options.o;\n }\n if (options.n) {\n otherOptions['n'] = options.n;\n delete options.n;\n }\n return { name, output, options, otherValues,otherOptions }; \n}\n\nfunction getOutput(options) {\n let output;\n if (options.o){\n output = options.o.replace(/\"/g, '').replace(/'/g, '');\n /* set output as the first alphanumerical word in the command line */\n if (output.indexOf(' ') > 0) {\n output = output.substring(0, output.indexOf(' '));\n }\n }\n return output;\n}\n\nfunction getName(options) {\n let name;\n /* if n option present, assign to name variable */\n if (options.n){\n name = options.n.replace(/\"/g, '').replace(/'/g, '');\n }\n return name;\n}\n\n\nfunction isConnected() {\n return ConnectedTo.hasOwnProperty('ip') && ConnectedTo.ip != '0.0.0.0' && ConnectedTo.ip != '';\n}\nfunction getIcon(icons) {\n return isConnected() ? icons.icon : icons.label;\n}\nfunction handlebtstate(data) {\n let icon = '';\n let tt = '';\n if (data.bt_status !== undefined && data.bt_sub_status !== undefined) {\n const iconindex = btStateIcons[data.bt_status].sub[data.bt_sub_status];\n if (iconindex) {\n icon = btIcons[iconindex];\n tt = btStateIcons[data.bt_status].desc;\n } else {\n icon = btIcons.bt_connected;\n tt = 'Output status';\n }\n }\n\n $('#o_type').attr('title', tt);\n $('#o_bt').html(isConnected() ? icon.label : icon.text);\n}\nfunction handleTemplateTypeRadio(outtype) {\n $('#o_type').children('span').css({ display: 'none' });\n let changed = false;\n if (outtype === 'bt') {\n changed = output !== 'bt' && output !== '';\n output = 'bt';\n } else if (outtype === 'spdif') {\n changed = output !== 'spdif' && output !== '';\n output = 'spdif';\n } else {\n changed = output !== 'i2s' && output !== '';\n output = 'i2s';\n }\n $('#' + output).prop('checked', true);\n $('#o_' + output).css({ display: 'inline' });\n if (changed) {\n Object.keys(commandDefaults[output]).forEach(function (key) {\n $(`#cmd_opt_${key}`).val(commandDefaults[output][key]);\n });\n }\n}\n\nfunction handleExceptionResponse(xhr, _ajaxOptions, thrownError) {\n console.log(xhr.status);\n console.log(thrownError);\n if (thrownError !== '') {\n showLocalMessage(thrownError, 'MESSAGING_ERROR');\n }\n}\nfunction HideCmdMessage(cmdname) {\n $('#toast_' + cmdname)\n .removeClass('table-success')\n .removeClass('table-warning')\n .removeClass('table-danger')\n .addClass('table-success')\n .removeClass('show');\n $('#msg_' + cmdname).html('');\n}\nfunction showCmdMessage(cmdname, msgtype, msgtext, append = false) {\n let color = 'table-success';\n if (msgtype === 'MESSAGING_WARNING') {\n color = 'table-warning';\n } else if (msgtype === 'MESSAGING_ERROR') {\n color = 'table-danger';\n }\n $('#toast_' + cmdname)\n .removeClass('table-success')\n .removeClass('table-warning')\n .removeClass('table-danger')\n .addClass(color)\n .addClass('show');\n let escapedtext = msgtext\n .substring(0, msgtext.length - 1)\n .encodeHTML()\n .replace(/\\n/g, '<br />');\n escapedtext =\n ($('#msg_' + cmdname).html().length > 0 && append\n ? $('#msg_' + cmdname).html() + '<br/>'\n : '') + escapedtext;\n $('#msg_' + cmdname).html(escapedtext);\n}\n\nlet releaseURL =\n 'https://api.github.com/repos/sle118/squeezelite-esp32/releases';\n\nlet recovery = false;\nlet messagesHeld = false;\nlet commandBTSinkName = '';\nconst commandHeader = 'squeezelite ';\nconst commandDefaults = {\n i2s: { b: \"500:2000\", C: \"30\", W: \"\", Z: \"96000\", o: \"I2S\" },\n spdif: { b: \"500:2000\", C: \"30\", W: \"\", Z: \"48000\", o: \"SPDIF\" },\n bt: { b: \"500:2000\", C: \"30\", W: \"\", Z: \"44100\", o: \"BT\" },\n};\nlet validOptions = {\n codecs: ['flac', 'pcm', 'mp3', 'ogg', 'aac', 'wma', 'alac', 'dsd', 'mad', 'mpg']\n};\n\n//let blockFlashButton = false;\nlet apList = null;\n//let selectedSSID = '';\n//let checkStatusInterval = null;\nlet messagecount = 0;\nlet messageseverity = 'MESSAGING_INFO';\nlet SystemConfig = {};\nlet LastCommandsState = null;\nvar output = '';\nlet hostName = '';\nlet versionName = 'Squeezelite-ESP32';\nlet prevmessage = '';\nlet project_name = versionName;\nlet depth = 16;\nlet board_model = '';\nlet platform_name = versionName;\nlet preset_name = '';\nlet btSinkNamesOptSel = '#cfg-audio-bt_source-sink_name';\nlet ConnectedTo = {};\nlet ConnectingToSSID = {};\nlet lmsBaseUrl;\nlet prevLMSIP = '';\nconst ConnectingToActions = {\n 'CONN': 0, 'MAN': 1, 'STS': 2,\n}\n\nPromise.prototype.delay = function (duration) {\n return this.then(\n function (value) {\n return new Promise(function (resolve) {\n setTimeout(function () {\n resolve(value);\n }, duration);\n });\n },\n function (reason) {\n return new Promise(function (_resolve, reject) {\n setTimeout(function () {\n reject(reason);\n }, duration);\n });\n }\n );\n};\n\nfunction getConfigJson(slimMode) {\n const config = {};\n $('input.nvs').each(function (_index, entry) {\n if (!slimMode) {\n const nvsType = parseInt(entry.attributes.nvs_type.value, 10);\n if (entry.id !== '') {\n config[entry.id] = {};\n if (\n nvsType === nvsTypes.NVS_TYPE_U8 ||\n nvsType === nvsTypes.NVS_TYPE_I8 ||\n nvsType === nvsTypes.NVS_TYPE_U16 ||\n nvsType === nvsTypes.NVS_TYPE_I16 ||\n nvsType === nvsTypes.NVS_TYPE_U32 ||\n nvsType === nvsTypes.NVS_TYPE_I32 ||\n nvsType === nvsTypes.NVS_TYPE_U64 ||\n nvsType === nvsTypes.NVS_TYPE_I64\n ) {\n config[entry.id].value = parseInt(entry.value);\n } else {\n config[entry.id].value = entry.value;\n }\n config[entry.id].type = nvsType;\n }\n } else {\n config[entry.id] = entry.value;\n }\n });\n const key = $('#nvs-new-key').val();\n const val = $('#nvs-new-value').val();\n if (key !== '') {\n if (!slimMode) {\n config[key] = {};\n config[key].value = val;\n config[key].type = 33;\n } else {\n config[key] = val;\n }\n }\n return config;\n}\n\nfunction handleHWPreset(allfields, reboot) {\n\n const selJson = JSON.parse(allfields[0].value);\n var cmd = allfields[0].attributes.cmdname.value;\n\n console.log(`selected model: ${selJson.name}`);\n let confPayload = {\n timestamp: Date.now(),\n config: { model_config: { value: selJson.name, type: 33 } }\n };\n for (const [name, value] of Object.entries(selJson.config)) {\n const storedval = (typeof value === 'string' || value instanceof String) ? value : JSON.stringify(value);\n confPayload.config[name] = {\n value: storedval,\n type: 33,\n }\n showCmdMessage(\n cmd,\n 'MESSAGING_INFO',\n `Setting ${name}=${storedval} `,\n true\n );\n }\n\n showCmdMessage(\n cmd,\n 'MESSAGING_INFO',\n `Committing `,\n true\n );\n $.ajax({\n url: '/config.json',\n dataType: 'text',\n method: 'POST',\n cache: false,\n contentType: 'application/json; charset=utf-8',\n data: JSON.stringify(confPayload),\n error: function (xhr, _ajaxOptions, thrownError) {\n handleExceptionResponse(xhr, _ajaxOptions, thrownError);\n showCmdMessage(\n cmd,\n 'MESSAGING_ERROR',\n `Unexpected error ${(thrownError !== '') ? thrownError : 'with return status = ' + xhr.status} `,\n true\n );\n },\n success: function (response) {\n showCmdMessage(\n cmd,\n 'MESSAGING_INFO',\n `Saving complete `,\n true\n );\n console.log(response);\n if (reboot) {\n delayReboot(2500, cmd);\n }\n },\n });\n}\n\n\n// pull json file from https://gist.githubusercontent.com/sle118/dae585e157b733a639c12dc70f0910c5/raw/b462691f69e2ad31ac95c547af6ec97afb0f53db/squeezelite-esp32-presets.json and\nfunction loadPresets() {\n if ($(\"#cfg-hw-preset-model_config\").length == 0) return;\n if (presetsloaded) return;\n presetsloaded = true;\n $('#cfg-hw-preset-model_config').html('<option>--</option>');\n $.getJSON(\n 'https://gist.githubusercontent.com/sle118/dae585e157b733a639c12dc70f0910c5/raw/',\n { _: new Date().getTime() },\n function (data) {\n $.each(data, function (key, val) {\n $('#cfg-hw-preset-model_config').append(`<option value='${JSON.stringify(val).replace(/\"/g, '\\\"').replace(/\\'/g, '\\\"')}'>${val.name}</option>`);\n if (preset_name !== '' && preset_name == val.name) {\n $('#cfg-hw-preset-model_config').val(preset_name);\n }\n });\n if (preset_name !== '') {\n ('#prev_preset').show().val(preset_name);\n }\n }\n\n ).fail(function (jqxhr, textStatus, error) {\n const err = textStatus + ', ' + error;\n console.log('Request Failed: ' + err);\n }\n );\n}\n\nfunction delayReboot(duration, cmdname, ota = 'reboot') {\n const url = '/' + ota + '.json';\n $('tbody#tasks').empty();\n $('#tasks_sect').css('visibility', 'collapse');\n Promise.resolve({ cmdname: cmdname, url: url })\n .delay(duration)\n .then(function (data) {\n if (data.cmdname.length > 0) {\n showCmdMessage(\n data.cmdname,\n 'MESSAGING_WARNING',\n 'System is rebooting.\\n',\n true\n );\n } else {\n showLocalMessage('System is rebooting.\\n', 'MESSAGING_WARNING');\n }\n console.log('now triggering reboot');\n $(\"button[onclick*='handleReboot']\").addClass('rebooting');\n $.ajax({\n url: data.url,\n dataType: 'text',\n method: 'POST',\n cache: false,\n contentType: 'application/json; charset=utf-8',\n data: JSON.stringify({\n timestamp: Date.now(),\n }),\n error: handleExceptionResponse,\n complete: function () {\n console.log('reboot call completed');\n Promise.resolve(data)\n .delay(6000)\n .then(function (rdata) {\n if (rdata.cmdname.length > 0) {\n HideCmdMessage(rdata.cmdname);\n }\n getCommands();\n getConfig();\n });\n },\n });\n });\n}\n// eslint-disable-next-line no-unused-vars\nwindow.saveAutoexec1 = function (apply) {\n showCmdMessage('cfg-audio-tmpl', 'MESSAGING_INFO', 'Saving.\\n', false);\n let commandLine = `${commandHeader} -o ${output} `;\n $('.sqcmd').each(function () {\n let { opt, val } = get_control_option_value($(this));\n if ((opt && opt.length>0 ) && typeof(val) == 'boolean' || val.length > 0) {\n const optStr=opt===':'?opt:(` -${opt} `);\n val = typeof(val) == 'boolean'?'':val;\n commandLine += `${optStr} ${val}`;\n }\n });\n const resample=$('#cmd_opt_R input[name=resample]:checked');\n if (resample.length>0 && resample.attr('suffix')!=='') {\n commandLine += resample.attr('suffix');\n // now check resample_i option and if checked, add suffix to command line\n if ($('#resample_i').is(\":checked\") && resample.attr('aint') =='true') {\n commandLine += $('#resample_i').attr('suffix');\n }\n}\n\n \n if (output === 'bt') {\n showCmdMessage(\n 'cfg-audio-tmpl',\n 'MESSAGING_INFO',\n 'Remember to configure the Bluetooth audio device name.\\n',\n true\n );\n }\n commandLine += concatenateOptions(options);\n const data = {\n timestamp: Date.now(),\n };\n data.config = {\n autoexec1: { value: commandLine, type: 33 },\n autoexec: {\n value: $('#disable-squeezelite').prop('checked') ? '0' : '1',\n type: 33,\n },\n };\n\n $.ajax({\n url: '/config.json',\n dataType: 'text',\n method: 'POST',\n cache: false,\n contentType: 'application/json; charset=utf-8',\n data: JSON.stringify(data),\n error: handleExceptionResponse,\n complete: function (response) {\n if (\n response.responseText &&\n JSON.parse(response.responseText).result === 'OK'\n ) {\n showCmdMessage('cfg-audio-tmpl', 'MESSAGING_INFO', 'Done.\\n', true);\n if (apply) {\n delayReboot(1500, 'cfg-audio-tmpl');\n }\n } else if (JSON.parse(response.responseText).result) {\n showCmdMessage(\n 'cfg-audio-tmpl',\n 'MESSAGING_WARNING',\n JSON.parse(response.responseText).Result + '\\n',\n true\n );\n } else {\n showCmdMessage(\n 'cfg-audio-tmpl',\n 'MESSAGING_ERROR',\n response.statusText + '\\n'\n );\n }\n console.log(response.responseText);\n },\n });\n console.log('sent data:', JSON.stringify(data));\n}\nwindow.handleDisconnect = function () {\n $.ajax({\n url: '/connect.json',\n dataType: 'text',\n method: 'DELETE',\n cache: false,\n contentType: 'application/json; charset=utf-8',\n data: JSON.stringify({\n timestamp: Date.now(),\n }),\n });\n}\nfunction setPlatformFilter(val) {\n if ($('.upf').filter(function () { return $(this).text().toUpperCase() === val.toUpperCase() }).length > 0) {\n $('#splf').val(val).trigger('input');\n return true;\n }\n return false;\n}\nwindow.handleConnect = function () {\n ConnectingToSSID.ssid = $('#manual_ssid').val();\n ConnectingToSSID.pwd = $('#manual_pwd').val();\n ConnectingToSSID.dhcpname = $('#dhcp-name2').val();\n $(\"*[class*='connecting']\").hide();\n $('#ssid-wait').text(ConnectingToSSID.ssid);\n $('.connecting').show();\n $.ajax({\n url: '/connect.json',\n dataType: 'text',\n method: 'POST',\n cache: false,\n contentType: 'application/json; charset=utf-8',\n data: JSON.stringify({\n timestamp: Date.now(),\n ssid: ConnectingToSSID.ssid,\n pwd: ConnectingToSSID.pwd\n }),\n error: handleExceptionResponse,\n });\n\n // now we can re-set the intervals regardless of result\n\n}\nfunction renderError(opt,error){\n const fieldname = `cmd_opt_${opt}`;\n let errorFieldName=`${fieldname}-error`;\n let errorField=$(`#${errorFieldName}`);\n let field=$(`#${fieldname}`);\n \n if (!errorField || errorField.length ==0) {\n field.after(`<div id=\"${errorFieldName}\" class=\"invalid-feedback\"></div>`);\n errorField=$(`#${errorFieldName}`);\n }\n if(error.length ==0){\n errorField.hide();\n field.removeClass('is-invalid');\n field.addClass('is-valid');\n errorField.text('');\n }\n else { \n errorField.show();\n errorField.text(error);\n field.removeClass('is-valid');\n field.addClass('is-invalid');\n }\n return errorField;\n}\n$(document).ready(function () {\n $('.material-icons').each(function (_index, entry) {\n entry.attributes['icon'] = entry.textContent;\n });\n setIcons(true);\n handleNVSVisible();\n flashState.init();\n $('#fw-url-input').on('input', function () {\n if ($(this).val().length > 8 && ($(this).val().startsWith('http://') || $(this).val().startsWith('https://'))) {\n $('#start-flash').show();\n }\n else {\n $('#start-flash').hide();\n }\n });\n $('.upSrch').on('input', function () {\n const val = this.value;\n $(\"#rTable tr\").removeClass(this.id + '_hide');\n if (val.length > 0) {\n $(`#rTable td:nth-child(${$(this).parent().index() + 1})`).filter(function () {\n return !$(this).text().toUpperCase().includes(val.toUpperCase());\n }).parent().addClass(this.id + '_hide');\n }\n $('[class*=\"_hide\"]').hide();\n $('#rTable tr').not('[class*=\"_hide\"]').show()\n\n });\n setTimeout(refreshAP, 1500);\n /* add validation for cmd_opt_c, which accepts a comma separated list. \n getting known codecs from validOptions.codecs array\n use bootstrap classes to highlight the error with an overlay message */\n $('#options input').on('input', function () {\n const { opt, val } = get_control_option_value(this);\n if (opt === 'c' || opt === 'e') {\n const fieldname = `cmd_opt_${opt}_codec-error`;\n \n const values = val.split(',').map(function (item) {\n return item.trim();\n });\n /* get a list of invalid codecs */\n const invalid = values.filter(function (item) {\n return !validOptions.codecs.includes(item);\n });\n renderError(opt,invalid.length > 0 ? `Invalid codec(s) ${invalid.join(', ')}` : '');\n }\n /* add validation for cmd_opt_m, which accepts a mac_address */\n if (opt === 'm') {\n const mac_regex = /^([0-9A-Fa-f]{2}[:-]){5}([0-9A-Fa-f]{2})$/;\n renderError(opt,mac_regex.test(val) ? '' : 'Invalid MAC address');\n }\n if (opt === 'r') {\n const rateRegex = /^(\\d+\\.?\\d*|\\.\\d+)-(\\d+\\.?\\d*|\\.\\d+)$|^(\\d+\\.?\\d*)$|^(\\d+\\.?\\d*,)+\\d+\\.?\\d*$/;\n renderError(opt,rateRegex.test(val)?'':`Invalid rate(s) ${val}. Acceptable format: <maxrate>|<minrate>-<maxrate>|<rate1>,<rate2>,<rate3>`);\n }\n\n\n\n }\n\n\n );\n\n\n\n\n\n $('#WifiConnectDialog')[0].addEventListener('shown.bs.modal', function (event) {\n $(\"*[class*='connecting']\").hide();\n\n if (event?.relatedTarget) {\n ConnectingToSSID.Action = ConnectingToActions.CONN;\n if ($(event.relatedTarget).children('td:eq(1)').text() == ConnectedTo.ssid) {\n ConnectingToSSID.Action = ConnectingToActions.STS;\n }\n else {\n if (!$(event.relatedTarget).is(':last-child')) {\n ConnectingToSSID.ssid = $(event.relatedTarget).children('td:eq(1)').text();\n $('#manual_ssid').val(ConnectingToSSID.ssid);\n }\n else {\n ConnectingToSSID.Action = ConnectingToActions.MAN;\n ConnectingToSSID.ssid = '';\n $('#manual_ssid').val(ConnectingToSSID.ssid);\n }\n }\n }\n\n\n if (ConnectingToSSID.Action !== ConnectingToActions.STS) {\n $('.connecting-init').show();\n $('#manual_ssid').trigger('focus');\n }\n else {\n handleWifiDialog();\n }\n });\n\n $('#WifiConnectDialog')[0].addEventListener('hidden.bs.modal', function () {\n $('#WifiConnectDialog input').val('');\n });\n\n $('#uCnfrm')[0].addEventListener('shown.bs.modal', function () {\n $('#selectedFWURL').text($('#fw-url-input').val());\n });\n\n $('input#show-commands')[0].checked = LastCommandsState === 1;\n $('a[href^=\"#tab-commands\"]').hide();\n $('#load-nvs').on('click', function () {\n $('#nvsfilename').trigger('click');\n });\n $('#nvsfilename').on('change', function () {\n if (typeof window.FileReader !== 'function') {\n throw \"The file API isn't supported on this browser.\";\n }\n if (!this.files) {\n throw 'This browser does not support the `files` property of the file input.';\n }\n if (!this.files[0]) {\n return undefined;\n }\n\n const file = this.files[0];\n let fr = new FileReader();\n fr.onload = function (e) {\n let data = {};\n try {\n data = JSON.parse(e.target.result);\n } catch (ex) {\n alert('Parsing failed!\\r\\n ' + ex);\n }\n $('input.nvs').each(function (_index, entry) {\n $(this).parent().removeClass('bg-warning').removeClass('bg-success');\n if (data[entry.id]) {\n if (data[entry.id] !== entry.value) {\n console.log(\n 'Changed ' + entry.id + ' ' + entry.value + '==>' + data[entry.id]\n );\n $(this).parent().addClass('bg-warning');\n $(this).val(data[entry.id]);\n }\n else {\n $(this).parent().addClass('bg-success');\n }\n }\n });\n var changed = $(\"input.nvs\").children('.bg-warning');\n if (changed) {\n alert('Highlighted values were changed. Press Commit to change on the device');\n }\n }\n fr.readAsText(file);\n this.value = null;\n\n }\n );\n $('#clear-syslog').on('click', function () {\n messagecount = 0;\n messageseverity = 'MESSAGING_INFO';\n $('#msgcnt').text('');\n $('#syslogTable').html('');\n });\n\n $('#ok-credits').on('click', function () {\n $('#credits').slideUp('fast', function () { });\n $('#app').slideDown('fast', function () { });\n });\n\n $('#acredits').on('click', function (event) {\n event.preventDefault();\n $('#app').slideUp('fast', function () { });\n $('#credits').slideDown('fast', function () { });\n });\n\n $('input#show-commands').on('click', function () {\n this.checked = this.checked ? 1 : 0;\n if (this.checked) {\n $('a[href^=\"#tab-commands\"]').show();\n LastCommandsState = 1;\n } else {\n LastCommandsState = 0;\n $('a[href^=\"#tab-commands\"]').hide();\n }\n });\n\n $('input#show-nvs').on('click', function () {\n this.checked = this.checked ? 1 : 0;\n Cookies.set(\"show-nvs\", this.checked ? 'Y' : 'N');\n handleNVSVisible();\n });\n $('#btn_reboot_recovery').on('click', function () {\n handleReboot('recovery');\n });\n $('#btn_reboot').on('click', function () {\n handleReboot('reboot');\n });\n $('#btn_flash').on('click', function () {\n hFlash();\n });\n $('#save-autoexec1').on('click', function () {\n saveAutoexec1(false);\n });\n $('#commit-autoexec1').on('click', function () {\n saveAutoexec1(true);\n });\n $('#btn_disconnect').on('click', function () {\n ConnectedTo = {};\n refreshAPHTML2();\n $.ajax({\n url: '/connect.json',\n dataType: 'text',\n method: 'DELETE',\n cache: false,\n contentType: 'application/json; charset=utf-8',\n data: JSON.stringify({\n timestamp: Date.now(),\n }),\n });\n });\n $('#btnJoin').on('click', function () {\n handleConnect();\n });\n $('#reboot_nav').on('click', function () {\n handleReboot('reboot');\n });\n $('#reboot_ota_nav').on('click', function () {\n handleReboot('reboot_ota');\n });\n\n $('#save-as-nvs').on('click', function () {\n const config = getConfigJson(true);\n const a = document.createElement('a');\n a.href = URL.createObjectURL(\n new Blob([JSON.stringify(config, null, 2)], {\n type: 'text/plain',\n })\n );\n a.setAttribute(\n 'download',\n 'nvs_config_' + hostName + '_' + Date.now() + 'json'\n );\n document.body.appendChild(a);\n a.click();\n document.body.removeChild(a);\n });\n\n $('#save-nvs').on('click', function () {\n post_config(getConfigJson(false));\n });\n\n $('#fwUpload').on('click', function () {\n const fileInput = document.getElementById('flashfilename').files;\n if (fileInput.length === 0) {\n alert('No file selected!');\n } else {\n $('#fw-url-input').value = null;\n flashState.StartOTA();\n }\n\n });\n $('[name=output-tmpl]').on('click', function () {\n handleTemplateTypeRadio(this.id);\n });\n\n $('#chkUpdates').on('click', function () {\n $('#rTable').html('');\n $.getJSON(releaseURL, function (data) {\n let i = 0;\n const branches = [];\n data.forEach(function (release) {\n const namecomponents = release.name.split('#');\n const branch = namecomponents[3];\n if (!branches.includes(branch)) {\n branches.push(branch);\n }\n });\n let fwb = '';\n branches.forEach(function (branch) {\n fwb += '<option value=\"' + branch + '\">' + branch + '</option>';\n });\n $('#fwbranch').append(fwb);\n\n data.forEach(function (release) {\n let url = '';\n release.assets.forEach(function (asset) {\n if (asset.name.match(/\\.bin$/)) {\n url = asset.browser_download_url;\n }\n });\n const namecomponents = release.name.split('#');\n const ver = namecomponents[0];\n const cfg = namecomponents[2];\n const branch = namecomponents[3];\n var bits = ver.substr(ver.lastIndexOf('-') + 1);\n bits = (bits == '32' || bits == '16') ? bits : '';\n\n let body = release.body;\n body = body.replace(/'/gi, '\"');\n body = body.replace(\n /[\\s\\S]+(### Revision Log[\\s\\S]+)### ESP-IDF Version Used[\\s\\S]+/,\n '$1'\n );\n body = body.replace(/- \\(.+?\\) /g, '- ').encodeHTML();\n $('#rTable').append(`<tr class='release ' fwurl='${url}'>\n <td data-bs-toggle='tooltip' title='${body}'>${ver}</td><td>${new Date(release.created_at).toLocalShort()}\n </td><td class='upf'>${cfg}</td><td>${branch}</td><td>${bits}</td></tr>`\n );\n });\n if (i > 7) {\n $('#releaseTable').append(\n \"<tr id='showall'>\" +\n \"<td colspan='6'>\" +\n \"<input type='button' id='showallbutton' class='btn btn-info' value='Show older releases' />\" +\n '</td>' +\n '</tr>'\n );\n $('#showallbutton').on('click', function () {\n $('tr.hide').removeClass('hide');\n $('tr#showall').addClass('hide');\n });\n }\n $('#searchfw').css('display', 'inline');\n if (!setPlatformFilter(platform_name)) {\n setPlatformFilter(project_name)\n }\n $('#rTable tr.release').on('click', function () {\n var url = this.attributes['fwurl'].value;\n if (lmsBaseUrl) {\n url = url.replace(/.*\\/download\\//, lmsBaseUrl + '/plugins/SqueezeESP32/firmware/');\n }\n $('#fw-url-input').val(url);\n $('#start-flash').show();\n $('#rTable tr.release').removeClass('table-success table-warning');\n $(this).addClass('table-success table-warning');\n });\n\n }).fail(function () {\n alert('failed to fetch release history!');\n });\n });\n $('#fwcheck').on('click', function () {\n $('#releaseTable').html('');\n $('#fwbranch').empty();\n $.getJSON(releaseURL, function (data) {\n let i = 0;\n const branches = [];\n data.forEach(function (release) {\n const namecomponents = release.name.split('#');\n const branch = namecomponents[3];\n if (!branches.includes(branch)) {\n branches.push(branch);\n }\n });\n let fwb;\n branches.forEach(function (branch) {\n fwb += '<option value=\"' + branch + '\">' + branch + '</option>';\n });\n $('#fwbranch').append(fwb);\n\n data.forEach(function (release) {\n let url = '';\n release.assets.forEach(function (asset) {\n if (asset.name.match(/\\.bin$/)) {\n url = asset.browser_download_url;\n }\n });\n const namecomponents = release.name.split('#');\n const ver = namecomponents[0];\n const idf = namecomponents[1];\n const cfg = namecomponents[2];\n const branch = namecomponents[3];\n\n let body = release.body;\n body = body.replace(/'/gi, '\"');\n body = body.replace(\n /[\\s\\S]+(### Revision Log[\\s\\S]+)### ESP-IDF Version Used[\\s\\S]+/,\n '$1'\n );\n body = body.replace(/- \\(.+?\\) /g, '- ');\n const trclass = i++ > 6 ? ' hide' : '';\n $('#releaseTable').append(\n \"<tr class='release\" +\n trclass +\n \"'>\" +\n \"<td data-bs-toggle='tooltip' title='\" +\n body +\n \"'>\" +\n ver +\n '</td>' +\n '<td>' +\n new Date(release.created_at).toLocalShort() +\n '</td>' +\n '<td>' +\n cfg +\n '</td>' +\n '<td>' +\n idf +\n '</td>' +\n '<td>' +\n branch +\n '</td>' +\n \"<td><input type='button' class='btn btn-success' value='Select' data-bs-url='\" +\n url +\n \"' onclick='setURL(this);' /></td>\" +\n '</tr>'\n );\n });\n if (i > 7) {\n $('#releaseTable').append(\n \"<tr id='showall'>\" +\n \"<td colspan='6'>\" +\n \"<input type='button' id='showallbutton' class='btn btn-info' value='Show older releases' />\" +\n '</td>' +\n '</tr>'\n );\n $('#showallbutton').on('click', function () {\n $('tr.hide').removeClass('hide');\n $('tr#showall').addClass('hide');\n });\n }\n $('#searchfw').css('display', 'inline');\n }).fail(function () {\n alert('failed to fetch release history!');\n });\n });\n\n $('#updateAP').on('click', function () {\n refreshAP();\n console.log('refresh AP');\n });\n\n // first time the page loads: attempt to get the connection status and start the wifi scan\n getConfig();\n getCommands();\n getMessages();\n checkStatus();\n\n});\n\n// eslint-disable-next-line no-unused-vars\nwindow.setURL = function (button) {\n let url = button.dataset.url;\n\n $('[data-bs-url^=\"http\"]')\n .addClass('btn-success')\n .removeClass('btn-danger');\n $('[data-bs-url=\"' + url + '\"]')\n .addClass('btn-danger')\n .removeClass('btn-success');\n\n // if user can proxy download through LMS, modify the URL\n if (lmsBaseUrl) {\n url = url.replace(/.*\\/download\\//, lmsBaseUrl + '/plugins/SqueezeESP32/firmware/');\n }\n\n $('#fwurl').val(url);\n}\n\n\nfunction rssiToIcon(rssi) {\n if (rssi >= -55) {\n return { 'label': '****', 'icon': `signal_wifi_statusbar_4_bar` };\n } else if (rssi >= -60) {\n return { 'label': '***', 'icon': `network_wifi_3_bar` };\n } else if (rssi >= -65) {\n return { 'label': '**', 'icon': `network_wifi_2_bar` };\n } else if (rssi >= -70) {\n return { 'label': '*', 'icon': `network_wifi_1_bar` };\n } else {\n return { 'label': '.', 'icon': `signal_wifi_statusbar_null` };\n }\n}\n\nfunction refreshAP() {\n if (ConnectedTo?.urc === connectReturnCode.ETH) return;\n $.ajaxSetup({\n timeout: 3000 //Time in milliseconds\n });\n $.getJSON('/scan.json', async function () {\n await sleep(2000);\n $.getJSON('/ap.json', function (data) {\n if (data.length > 0) {\n // sort by signal strength\n data.sort(function (a, b) {\n const x = a.rssi;\n const y = b.rssi;\n // eslint-disable-next-line no-nested-ternary\n return x < y ? 1 : x > y ? -1 : 0;\n });\n apList = data;\n refreshAPHTML2(apList);\n\n }\n });\n });\n}\nfunction formatAP(ssid, rssi, auth) {\n const rssi_icon = rssiToIcon(rssi);\n const auth_icon = { label: auth == 0 ? '🔓' : '🔒', icon: auth == 0 ? 'no_encryption' : 'lock' };\n\n return `<tr data-bs-toggle=\"modal\" data-bs-target=\"#WifiConnectDialog\"><td></td><td>${ssid}</td><td>\n <span class=\"material-icons\" style=\"fill:white; display: inline\" aria-label=\"${rssi_icon.label}\" icon=\"${rssi_icon.icon}\" >${getIcon(rssi_icon)}</span>\n \t</td><td>\n <span class=\"material-icons\" aria-label=\"${auth_icon.label}\" icon=\"${auth_icon.icon}\">${getIcon(auth_icon)}</span>\n </td></tr>`;\n}\nfunction refreshAPHTML2(data) {\n let h = '';\n $('#wifiTable tr td:first-of-type').text('');\n $('#wifiTable tr').removeClass('table-success table-warning');\n if (data) {\n data.forEach(function (e) {\n h += formatAP(e.ssid, e.rssi, e.auth);\n });\n $('#wifiTable').html(h);\n }\n if ($('.manual_add').length == 0) {\n $('#wifiTable').append(formatAP('Manual add', 0, 0));\n $('#wifiTable tr:last').addClass('table-light text-dark').addClass('manual_add');\n }\n if (ConnectedTo.ssid && (ConnectedTo.urc === connectReturnCode.OK || ConnectedTo.urc === connectReturnCode.RESTORE)) {\n const wifiSelector = `#wifiTable td:contains(\"${ConnectedTo.ssid}\")`;\n if ($(wifiSelector).filter(function () { return $(this).text() === ConnectedTo.ssid; }).length == 0) {\n $('#wifiTable').prepend(`${formatAP(ConnectedTo.ssid, ConnectedTo.rssi ?? 0, 0)}`);\n }\n $(wifiSelector).filter(function () { return $(this).text() === ConnectedTo.ssid; }).siblings().first().html('&check;').parent().addClass((ConnectedTo.urc === connectReturnCode.OK ? 'table-success' : 'table-warning'));\n $('span#foot-if').html(`SSID: <strong>${ConnectedTo.ssid}</strong>, IP: <strong>${ConnectedTo.ip}</strong>`);\n $('#wifiStsIcon').html(rssiToIcon(ConnectedTo.rssi));\n\n }\n else if (ConnectedTo?.urc !== connectReturnCode.ETH) {\n $('span#foot-if').html('');\n }\n\n}\nfunction refreshETH() {\n\n if (ConnectedTo.urc === connectReturnCode.ETH) {\n $('span#foot-if').html(`Network: Ethernet, IP: <strong>${ConnectedTo.ip}</strong>`);\n }\n}\nfunction showTask(task) {\n console.debug(\n this.toLocaleString() +\n '\\t' +\n task.nme +\n '\\t' +\n task.cpu +\n '\\t' +\n taskStates[task.st] +\n '\\t' +\n task.minstk +\n '\\t' +\n task.bprio +\n '\\t' +\n task.cprio +\n '\\t' +\n task.num\n );\n $('tbody#tasks').append(\n '<tr class=\"table-primary\"><th scope=\"row\">' +\n task.num +\n '</th><td>' +\n task.nme +\n '</td><td>' +\n task.cpu +\n '</td><td>' +\n taskStates[task.st] +\n '</td><td>' +\n task.minstk +\n '</td><td>' +\n task.bprio +\n '</td><td>' +\n task.cprio +\n '</td></tr>'\n );\n}\nfunction btExists(name) {\n return getBTSinkOpt(name).length > 0;\n}\nfunction getBTSinkOpt(name) {\n return $(`${btSinkNamesOptSel} option:contains('${name}')`);\n}\nfunction getMessages() {\n $.ajaxSetup({\n timeout: messageInterval //Time in milliseconds\n });\n $.getJSON('/messages.json', async function (data) {\n for (const msg of data) {\n const msgAge = msg.current_time - msg.sent_time;\n var msgTime = new Date();\n msgTime.setTime(msgTime.getTime() - msgAge);\n switch (msg.class) {\n case 'MESSAGING_CLASS_OTA':\n flashState.EventOTAMessageClass(msg.message);\n break;\n case 'MESSAGING_CLASS_STATS':\n // for task states, check structure : task_state_t\n var statsData = JSON.parse(msg.message);\n console.debug(\n msgTime.toLocalShort() +\n ' - Number of running tasks: ' +\n statsData.ntasks\n );\n console.debug(\n msgTime.toLocalShort() +\n '\\tname' +\n '\\tcpu' +\n '\\tstate' +\n '\\tminstk' +\n '\\tbprio' +\n '\\tcprio' +\n '\\tnum'\n );\n if (statsData.tasks) {\n if ($('#tasks_sect').css('visibility') === 'collapse') {\n $('#tasks_sect').css('visibility', 'visible');\n }\n $('tbody#tasks').html('');\n statsData.tasks\n .sort(function (a, b) {\n return b.cpu - a.cpu;\n })\n .forEach(showTask, msgTime);\n } else if ($('#tasks_sect').css('visibility') === 'visible') {\n $('tbody#tasks').empty();\n $('#tasks_sect').css('visibility', 'collapse');\n }\n break;\n case 'MESSAGING_CLASS_SYSTEM':\n showMessage(msg, msgTime);\n break;\n case 'MESSAGING_CLASS_CFGCMD':\n var msgparts = msg.message.split(/([^\\n]*)\\n(.*)/gs);\n showCmdMessage(msgparts[1], msg.type, msgparts[2], true);\n break;\n case 'MESSAGING_CLASS_BT':\n if ($(\"#cfg-audio-bt_source-sink_name\").is('input')) {\n var attr = $(\"#cfg-audio-bt_source-sink_name\")[0].attributes;\n var attrs = '';\n for (var j = 0; j < attr.length; j++) {\n if (attr.item(j).name != \"type\") {\n attrs += `${attr.item(j).name} = \"${attr.item(j).value}\" `;\n }\n }\n var curOpt = $(\"#cfg-audio-bt_source-sink_name\")[0].value;\n $(\"#cfg-audio-bt_source-sink_name\").replaceWith(`<select id=\"cfg-audio-bt_source-sink_name\" ${attrs}><option value=\"${curOpt}\" data-bs-description=\"${curOpt}\">${curOpt}</option></select> `);\n }\n JSON.parse(msg.message).forEach(function (btEntry) {\n //<input type=\"text\" class=\"form-control bg-success\" placeholder=\"name\" hasvalue=\"true\" longopts=\"sink_name\" shortopts=\"n\" checkbox=\"false\" cmdname=\"cfg-audio-bt_source\" id=\"cfg-audio-bt_source-sink_name\" name=\"cfg-audio-bt_source-sink_name\">\n //<select hasvalue=\"true\" longopts=\"jack_behavior\" shortopts=\"j\" checkbox=\"false\" cmdname=\"cfg-audio-general\" id=\"cfg-audio-general-jack_behavior\" name=\"cfg-audio-general-jack_behavior\" class=\"form-control \"><option>--</option><option>Headphones</option><option>Subwoofer</option></select> \n if (!btExists(btEntry.name)) {\n $(\"#cfg-audio-bt_source-sink_name\").append(`<option>${btEntry.name}</option>`);\n showMessage({ type: msg.type, message: `BT Audio device found: ${btEntry.name} RSSI: ${btEntry.rssi} ` }, msgTime);\n }\n getBTSinkOpt(btEntry.name).attr('data-bs-description', `${btEntry.name} (${btEntry.rssi}dB)`)\n .attr('rssi', btEntry.rssi)\n .attr('value', btEntry.name)\n .text(`${btEntry.name} [${btEntry.rssi}dB]`).trigger('change');\n\n });\n $(btSinkNamesOptSel).append($(`${btSinkNamesOptSel} option`).remove().sort(function (a, b) {\n console.log(`${parseInt($(a).attr('rssi'))} < ${parseInt($(b).attr('rssi'))} ? `);\n return parseInt($(a).attr('rssi')) < parseInt($(b).attr('rssi')) ? 1 : -1;\n }));\n break;\n default:\n break;\n }\n }\n setTimeout(getMessages, messageInterval);\n }).fail(function (xhr, ajaxOptions, thrownError) {\n\n if (xhr.status == 404) {\n $('.orec').hide(); // system commands won't be available either\n messagesHeld = true;\n }\n else {\n handleExceptionResponse(xhr, ajaxOptions, thrownError);\n }\n if (xhr.status == 0 && xhr.readyState == 0) {\n // probably a timeout. Target is rebooting? \n setTimeout(getMessages, messageInterval * 2); // increase duration if a failure happens\n }\n else if (!messagesHeld) {\n // 404 here means we rebooted to an old recovery\n setTimeout(getMessages, messageInterval); // increase duration if a failure happens\n }\n\n }\n );\n\n /*\n Minstk is minimum stack space left\nBprio is base priority\ncprio is current priority\nnme is name\nst is task state. I provided a \"typedef\" that you can use to convert to text\ncpu is cpu percent used\n*/\n}\nfunction handleRecoveryMode(data) {\n const locRecovery = data.recovery ?? 0;\n if (locRecovery === 1) {\n recovery = true;\n $('.recovery_element').show();\n $('.ota_element').hide();\n $('#boot-button').html('Reboot');\n $('#boot-form').attr('action', '/reboot_ota.json');\n } else {\n if (!recovery && messagesHeld) {\n messagesHeld = false;\n setTimeout(getMessages, messageInterval); // increase duration if a failure happens\n }\n recovery = false;\n\n $('.recovery_element').hide();\n $('.ota_element').show();\n $('#boot-button').html('Recovery');\n $('#boot-form').attr('action', '/recovery.json');\n }\n\n}\n\nfunction hasConnectionChanged(data) {\n // gw: \"192.168.10.1\"\n // ip: \"192.168.10.225\"\n // netmask: \"255.255.255.0\"\n // ssid: \"MyTestSSID\"\n\n return (data.urc !== ConnectedTo.urc ||\n data.ssid !== ConnectedTo.ssid ||\n data.gw !== ConnectedTo.gw ||\n data.netmask !== ConnectedTo.netmask ||\n data.ip !== ConnectedTo.ip || data.rssi !== ConnectedTo.rssi)\n}\nfunction handleWifiDialog(data) {\n if ($('#WifiConnectDialog').is(':visible')) {\n if (ConnectedTo.ip) {\n $('#ipAddress').text(ConnectedTo.ip);\n }\n if (ConnectedTo.ssid) {\n $('#connectedToSSID').text(ConnectedTo.ssid);\n }\n if (ConnectedTo.gw) {\n $('#gateway').text(ConnectedTo.gw);\n }\n if (ConnectedTo.netmask) {\n $('#netmask').text(ConnectedTo.netmask);\n }\n if (ConnectingToSSID.Action === undefined || (ConnectingToSSID.Action && ConnectingToSSID.Action == ConnectingToActions.STS)) {\n $(\"*[class*='connecting']\").hide();\n $('.connecting-status').show();\n }\n if (SystemConfig.ap_ssid) {\n $('#apName').text(SystemConfig.ap_ssid.value);\n }\n if (SystemConfig.ap_pwd) {\n $('#apPass').text(SystemConfig.ap_pwd.value);\n }\n if (!data) {\n return;\n }\n else {\n switch (data.urc) {\n case connectReturnCode.OK:\n if (data.ssid && data.ssid === ConnectingToSSID.ssid) {\n $(\"*[class*='connecting']\").hide();\n $('.connecting-success').show();\n ConnectingToSSID.Action = ConnectingToActions.STS;\n }\n break;\n case connectReturnCode.FAIL:\n // \n if (ConnectingToSSID.Action != ConnectingToActions.STS && ConnectingToSSID.ssid == data.ssid) {\n $(\"*[class*='connecting']\").hide();\n $('.connecting-fail').show();\n }\n break;\n case connectReturnCode.LOST:\n\n break;\n case connectReturnCode.RESTORE:\n if (ConnectingToSSID.Action != ConnectingToActions.STS && ConnectingToSSID.ssid != data.ssid) {\n $(\"*[class*='connecting']\").hide();\n $('.connecting-fail').show();\n }\n break;\n case connectReturnCode.DISC:\n // that's a manual disconnect\n // if ($('#wifi-status').is(':visible')) {\n // $('#wifi-status').slideUp('fast', function() {});\n // $('span#foot-wifi').html('');\n\n // } \n break;\n default:\n break;\n }\n }\n\n }\n}\nfunction setIcons(offline) {\n $('.material-icons').each(function (_index, entry) {\n entry.textContent = entry.attributes[offline ? 'aria-label' : 'icon'].value;\n });\n}\nfunction handleNetworkStatus(data) {\n setIcons(!isConnected());\n if (hasConnectionChanged(data) || !data.urc) {\n ConnectedTo = data;\n $(\".if_eth\").hide();\n $('.if_wifi').hide();\n if (!data.urc || ConnectedTo.urc != connectReturnCode.ETH) {\n $('.if_wifi').show();\n refreshAPHTML2();\n }\n else {\n $(\".if_eth\").show();\n refreshETH();\n }\n\n }\n handleWifiDialog(data);\n}\n\n\n\nfunction batteryToIcon(voltage) {\n /* Assuming Li-ion 18650s as a power source, 3.9V per cell, or above is treated\n as full charge (>75% of capacity). 3.4V is empty. The gauge is loosely\n following the graph here:\n https://learn.adafruit.com/li-ion-and-lipoly-batteries/voltages\n using the 0.2C discharge profile for the rest of the values.\n*/\n\n for (const iconEntry of batIcons) {\n for (const entryRanges of iconEntry.ranges) {\n if (inRange(voltage, entryRanges.f, entryRanges.t)) {\n return { label: iconEntry.label, icon: iconEntry.icon };\n }\n }\n }\n\n\n return { label: '▪▪▪▪', icon: \"battery_full\" };\n}\nfunction checkStatus() {\n $.ajaxSetup({\n timeout: statusInterval //Time in milliseconds\n });\n $.getJSON('/status.json', function (data) {\n handleRecoveryMode(data);\n handleNVSVisible();\n handleNetworkStatus(data);\n handlebtstate(data);\n flashState.EventTargetStatus(data);\n if(data.depth) {\n depth = data.depth;\n if(depth==16){\n $('#cmd_opt_R').show();\n }\n else{\n $('#cmd_opt_R').hide();\n }\n }\n\n\n if (data.project_name && data.project_name !== '') {\n project_name = data.project_name;\n }\n if (data.platform_name && data.platform_name !== '') {\n platform_name = data.platform_name;\n }\n if (board_model === '') board_model = project_name;\n if (board_model === '') board_model = 'Squeezelite-ESP32';\n if (data.version && data.version !== '') {\n versionName = data.version;\n $(\"#navtitle\").html(`${board_model}${recovery ? '<br>[recovery]' : ''}`);\n $('span#foot-fw').html(`fw: <strong>${versionName}</strong>, mode: <strong>${recovery ? \"Recovery\" : project_name}</strong>`);\n } else {\n $('span#flash-status').html('');\n }\n if (data.Voltage) {\n const bat_icon = batteryToIcon(data.Voltage);\n $('#battery').html(`${getIcon(bat_icon)}`);\n $('#battery').attr(\"aria-label\", bat_icon.label);\n $('#battery').attr(\"icon\", bat_icon.icon);\n $('#battery').show();\n } else {\n $('#battery').hide();\n }\n if ((data.message ?? '') != '' && prevmessage != data.message) {\n // supporting older recovery firmwares - messages will come from the status.json structure\n prevmessage = data.message;\n showLocalMessage(data.message, 'MESSAGING_INFO')\n }\n is_i2c_locked = data.is_i2c_locked;\n if (is_i2c_locked) {\n $('flds-cfg-hw-preset').hide();\n }\n else {\n $('flds-cfg-hw-preset').show();\n }\n $(\"button[onclick*='handleReboot']\").removeClass('rebooting');\n\n if (typeof lmsBaseUrl == \"undefined\" || data.lms_ip != prevLMSIP && data.lms_ip && data.lms_port) {\n const baseUrl = 'http://' + data.lms_ip + ':' + data.lms_port;\n prevLMSIP = data.lms_ip;\n $.ajax({\n url: baseUrl + '/plugins/SqueezeESP32/firmware/-check.bin',\n type: 'HEAD',\n dataType: 'text',\n cache: false,\n error: function () {\n // define the value, so we don't check it any more.\n lmsBaseUrl = '';\n },\n success: function () {\n lmsBaseUrl = baseUrl;\n }\n });\n }\n $('#o_jack').css({ display: Number(data.Jack) ? 'inline' : 'none' });\n setTimeout(checkStatus, statusInterval);\n }).fail(function (xhr, ajaxOptions, thrownError) {\n handleExceptionResponse(xhr, ajaxOptions, thrownError);\n if (xhr.status == 0 && xhr.readyState == 0) {\n // probably a timeout. Target is rebooting? \n setTimeout(checkStatus, messageInterval * 2); // increase duration if a failure happens\n }\n else {\n setTimeout(checkStatus, messageInterval); // increase duration if a failure happens\n }\n });\n}\n// eslint-disable-next-line no-unused-vars\nwindow.runCommand = function (button, reboot) {\n let cmdstring = button.attributes.cmdname.value;\n showCmdMessage(\n button.attributes.cmdname.value,\n 'MESSAGING_INFO',\n 'Executing.',\n false\n );\n const fields = document.getElementById('flds-' + cmdstring);\n const allfields = fields?.querySelectorAll('select,input');\n if (cmdstring === 'cfg-hw-preset') return handleHWPreset(allfields, reboot);\n cmdstring += ' ';\n if (fields) {\n\n for (const field of allfields) {\n let qts = '';\n let opt = '';\n let attr = field.attributes;\n let isSelect = $(field).is('select');\n const hasValue = attr?.hasvalue?.value === 'true';\n const validVal = (isSelect && field.value !== '--') || (!isSelect && field.value !== '');\n\n if (!hasValue || hasValue && validVal) {\n if (attr?.longopts?.value !== 'undefined') {\n opt += '--' + attr?.longopts?.value;\n } else if (attr?.shortopts?.value !== 'undefined') {\n opt = '-' + attr.shortopts.value;\n }\n\n if (attr?.hasvalue?.value === 'true') {\n if (attr?.value !== '') {\n qts = /\\s/.test(field.value) ? '\"' : '';\n cmdstring += opt + ' ' + qts + field.value + qts + ' ';\n }\n } else {\n // this is a checkbox\n if (field?.checked) {\n cmdstring += opt + ' ';\n }\n }\n }\n }\n }\n\n console.log(cmdstring);\n\n const data = {\n timestamp: Date.now(),\n };\n data.command = cmdstring;\n\n $.ajax({\n url: '/commands.json',\n dataType: 'text',\n method: 'POST',\n cache: false,\n contentType: 'application/json; charset=utf-8',\n data: JSON.stringify(data),\n error: function (xhr, _ajaxOptions, thrownError) {\n var cmd = JSON.parse(this.data).command;\n if (xhr.status == 404) {\n showCmdMessage(\n cmd.substr(0, cmd.indexOf(' ')),\n 'MESSAGING_ERROR',\n `${recovery ? 'Limited recovery mode active. Unsupported action ' : 'Unexpected error while processing command'}`,\n true\n );\n }\n else {\n handleExceptionResponse(xhr, _ajaxOptions, thrownError);\n showCmdMessage(\n cmd.substr(0, cmd.indexOf(' ') - 1),\n 'MESSAGING_ERROR',\n `Unexpected error ${(thrownError !== '') ? thrownError : 'with return status = ' + xhr.status}`,\n true\n );\n }\n },\n success: function (response) {\n $('.orec').show();\n console.log(response);\n if (\n JSON.parse(response).Result === 'Success' &&\n reboot\n ) {\n delayReboot(2500, button.attributes.cmdname.value);\n }\n },\n });\n}\nfunction getLongOps(data, name, longopts) {\n return data.values[name] !== undefined ? data.values[name][longopts] : \"\";\n}\nfunction getCommands() {\n $.ajaxSetup({\n timeout: 7000 //Time in milliseconds\n });\n $.getJSON('/commands.json', function (data) {\n console.log(data);\n $('.orec').show();\n data.commands.forEach(function (command) {\n if ($('#flds-' + command.name).length === 0) {\n const cmdParts = command.name.split('-');\n const isConfig = cmdParts[0] === 'cfg';\n const targetDiv = '#tab-' + cmdParts[0] + '-' + cmdParts[1];\n let innerhtml = '';\n innerhtml += `<div class=\"card text-white mb-3\"><div class=\"card-header\">${command.help.encodeHTML().replace(/\\n/g, '<br />')}</div><div class=\"card-body\"><fieldset id=\"flds-${command.name}\">`;\n if (command.argtable) {\n command.argtable.forEach(function (arg) {\n let placeholder = arg.datatype || '';\n const ctrlname = command.name + '-' + arg.longopts;\n const curvalue = getLongOps(data, command.name, arg.longopts);\n\n let attributes = 'hasvalue=' + arg.hasvalue + ' ';\n attributes += 'longopts=\"' + arg.longopts + '\" ';\n attributes += 'shortopts=\"' + arg.shortopts + '\" ';\n attributes += 'checkbox=' + arg.checkbox + ' ';\n attributes += 'cmdname=\"' + command.name + '\" ';\n attributes +=\n 'id=\"' +\n ctrlname +\n '\" name=\"' +\n ctrlname +\n '\" hasvalue=\"' +\n arg.hasvalue +\n '\" ';\n let extraclass = arg.mincount > 0 ? 'bg-success' : '';\n if (arg.glossary === 'hidden') {\n attributes += ' style=\"visibility: hidden;\"';\n }\n if (arg.checkbox) {\n innerhtml += `<div class=\"form-check\"><label class=\"form-check-label\"><input type=\"checkbox\" ${attributes} class=\"form-check-input ${extraclass}\" value=\"\" >${arg.glossary.encodeHTML()}</label>`;\n } else {\n innerhtml += `<div class=\"form-group\" ><label for=\"${ctrlname}\">${arg.glossary.encodeHTML()}</label>`;\n if (placeholder.includes('|')) {\n extraclass = placeholder.startsWith('+') ? ' multiple ' : '';\n placeholder = placeholder\n .replace('<', '')\n .replace('=', '')\n .replace('>', '');\n innerhtml += `<select ${attributes} class=\"form-control ${extraclass}\" >`;\n placeholder = '--|' + placeholder;\n placeholder.split('|').forEach(function (choice) {\n innerhtml += '<option >' + choice + '</option>';\n });\n innerhtml += '</select>';\n } else {\n innerhtml += `<input type=\"text\" class=\"form-control ${extraclass}\" placeholder=\"${placeholder}\" ${attributes}>`;\n }\n }\n\n innerhtml += `${arg.checkbox ? '</div>' : ''}<small class=\"form-text text-muted\">Previous value: ${arg.checkbox ? (curvalue ? 'Checked' : 'Unchecked') : (curvalue || '')}</small>${arg.checkbox ? '' : '</div>'}`;\n });\n }\n innerhtml += `<div style=\"margin-top: 16px;\">\n <div class=\"toast hide\" role=\"alert\" aria-live=\"assertive\" aria-atomic=\"true\" id=\"toast_${command.name}\">\n <div class=\"toast-header\">\n <strong class=\"mr-auto\">Result</strong\n <button type=\"button\" class=\"btn-close\" data-bs-dismiss=\"toast\" aria-label=\"Close\"></button>\n </div>\n <div class=\"toast-body\" id=\"msg_${command.name}\"></div>\n </div>`;\n if (isConfig) {\n innerhtml +=\n `<button type=\"submit\" class=\"btn btn-info sclk\" id=\"btn-save-${command.name}\" cmdname=\"${command.name}\">Save</button>\n<button type=\"submit\" class=\"btn btn-warning cclk\" id=\"btn-commit-${command.name}\" cmdname=\"${command.name}\">Apply</button>`;\n } else {\n innerhtml += `<button type=\"submit\" class=\"btn btn-success sclk\" id=\"btn-run-${command.name}\" cmdname=\"${command.name}\">Execute</button>`;\n }\n innerhtml += '</div></fieldset></div></div>';\n if (isConfig) {\n $(targetDiv).append(innerhtml);\n } else {\n $('#commands-list').append(innerhtml);\n }\n }\n });\n $(\".sclk\").off('click').on('click', function () { runCommand(this, false); });\n $(\".cclk\").off('click').on('click', function () { runCommand(this, true); });\n data.commands.forEach(function (command) {\n $('[cmdname=' + command.name + ']:input').val('');\n $('[cmdname=' + command.name + ']:checkbox').prop('checked', false);\n if (command.argtable) {\n command.argtable.forEach(function (arg) {\n const ctrlselector = '#' + command.name + '-' + arg.longopts;\n const ctrlValue = getLongOps(data, command.name, arg.longopts);\n if (arg.checkbox) {\n $(ctrlselector)[0].checked = ctrlValue;\n } else {\n if (ctrlValue !== undefined) {\n $(ctrlselector)\n .val(ctrlValue)\n .trigger('change');\n }\n if (\n $(ctrlselector)[0].value.length === 0 &&\n (arg.datatype || '').includes('|')\n ) {\n $(ctrlselector)[0].value = '--';\n }\n }\n });\n }\n });\n loadPresets();\n }).fail(function (xhr, ajaxOptions, thrownError) {\n if (xhr.status == 404) {\n $('.orec').hide();\n }\n else {\n handleExceptionResponse(xhr, ajaxOptions, thrownError);\n }\n $('#commands-list').empty();\n\n });\n}\n\nfunction getConfig() {\n $.ajaxSetup({\n timeout: 7000 //Time in milliseconds\n });\n $.getJSON('/config.json', function (entries) {\n $('#nvsTable tr').remove();\n const data = (entries.config ? entries.config : entries);\n SystemConfig = data;\n commandBTSinkName = '';\n Object.keys(data)\n .sort()\n .forEach(function (key) {\n let val = data[key].value;\n if (key === 'autoexec') {\n if (data.autoexec.value === '0') {\n $('#disable-squeezelite')[0].checked = true;\n } else {\n $('#disable-squeezelite')[0].checked = false;\n }\n } else if (key === 'autoexec1') {\n /* call new function to parse the squeezelite options */\n processSqueezeliteCommandLine(val);\n } else if (key === 'host_name') {\n val = val.replaceAll('\"', '');\n $('input#dhcp-name1').val(val);\n $('input#dhcp-name2').val(val);\n if ($('#cmd_opt_n').length == 0) {\n $('#cmd_opt_n').val(val);\n }\n document.title = val;\n hostName = val;\n } else if (key === 'rel_api') {\n releaseURL = val;\n }\n else if (key === 'enable_airplay') {\n $(\"#s_airplay\").css({ display: isEnabled(val) ? 'inline' : 'none' })\n }\n else if (key === 'enable_cspot') {\n $(\"#s_cspot\").css({ display: isEnabled(val) ? 'inline' : 'none' })\n }\n else if (key == 'preset_name') {\n preset_name = val;\n }\n else if (key == 'board_model') {\n board_model = val;\n }\n\n $('tbody#nvsTable').append(\n '<tr>' +\n '<td>' +\n key +\n '</td>' +\n \"<td class='value'>\" +\n \"<input type='text' class='form-control nvs' id='\" +\n key +\n \"' nvs_type=\" +\n data[key].type +\n ' >' +\n '</td>' +\n '</tr>'\n );\n $('input#' + key).val(data[key].value);\n });\n if(commandBTSinkName.length > 0) {\n // persist the sink name found in the autoexec1 command line\n $('#cfg-audio-bt_source-sink_name').val(commandBTSinkName);\n }\n $('tbody#nvsTable').append(\n \"<tr><td><input type='text' class='form-control' id='nvs-new-key' placeholder='new key'></td><td><input type='text' class='form-control' id='nvs-new-value' placeholder='new value' nvs_type=33 ></td></tr>\"\n );\n if (entries.gpio) {\n $('#pins').show();\n $('tbody#gpiotable tr').remove();\n entries.gpio.forEach(function (gpioEntry) {\n $('tbody#gpiotable').append(\n '<tr class=' +\n (gpioEntry.fixed ? 'table-secondary' : 'table-primary') +\n '><th scope=\"row\">' +\n gpioEntry.group +\n '</th><td>' +\n gpioEntry.name +\n '</td><td>' +\n gpioEntry.gpio +\n '</td><td>' +\n (gpioEntry.fixed ? 'Fixed' : 'Configuration') +\n '</td></tr>'\n );\n });\n }\n else {\n $('#pins').hide();\n }\n }).fail(function (xhr, ajaxOptions, thrownError) {\n handleExceptionResponse(xhr, ajaxOptions, thrownError);\n });\n}\n\nfunction processSqueezeliteCommandLine(val) {\n const parsed = parseSqueezeliteCommandLine(val);\n if (parsed.output.toUpperCase().startsWith('I2S')) {\n handleTemplateTypeRadio('i2s');\n } else if (parsed.output.toUpperCase().startsWith('SPDIF')) {\n handleTemplateTypeRadio('spdif');\n } else if (parsed.output.toUpperCase().startsWith('BT')) {\n if(parsed.otherOptions.btname){ \n commandBTSinkName= parsed.otherOptions.btname;\n }\n handleTemplateTypeRadio('bt');\n }\n Object.keys(parsed.options).forEach(function (key) {\n const option = parsed.options[key];\n if (!$(`#cmd_opt_${key}`).hasOwnProperty('checked')) {\n $(`#cmd_opt_${key}`).val(option);\n } else {\n $(`#cmd_opt_${key}`)[0].checked = option;\n }\n });\n if (parsed.options.hasOwnProperty('u')) {\n // parse -u v[:i] and check the appropriate radio button with id #resample_v\n const [resampleValue, resampleInterpolation] = parsed.options.u.split(':');\n $(`#resample_${resampleValue}`).prop('checked', true);\n // if resampleinterpolation is set, check resample_i checkbox\n if (resampleInterpolation) {\n $('#resample_i').prop('checked', true);\n }\n }\n\n\n}\n\nfunction showLocalMessage(message, severity) {\n const msg = {\n message: message,\n type: severity,\n };\n showMessage(msg, new Date());\n}\n\nfunction showMessage(msg, msgTime) {\n let color = 'table-success';\n\n if (msg.type === 'MESSAGING_WARNING') {\n color = 'table-warning';\n if (messageseverity === 'MESSAGING_INFO') {\n messageseverity = 'MESSAGING_WARNING';\n }\n } else if (msg.type === 'MESSAGING_ERROR') {\n if (\n messageseverity === 'MESSAGING_INFO' ||\n messageseverity === 'MESSAGING_WARNING'\n ) {\n messageseverity = 'MESSAGING_ERROR';\n }\n color = 'table-danger';\n }\n if (++messagecount > 0) {\n $('#msgcnt').removeClass('badge-success');\n $('#msgcnt').removeClass('badge-warning');\n $('#msgcnt').removeClass('badge-danger');\n $('#msgcnt').addClass(pillcolors[messageseverity]);\n $('#msgcnt').text(messagecount);\n }\n\n $('#syslogTable').append(\n \"<tr class='\" +\n color +\n \"'>\" +\n '<td>' +\n msgTime.toLocalShort() +\n '</td>' +\n '<td>' +\n msg.message.encodeHTML() +\n '</td>' +\n '</tr>'\n );\n}\n\nfunction inRange(x, min, max) {\n return (x - min) * (x - max) <= 0;\n}\n\nfunction sleep(ms) {\n return new Promise(resolve => setTimeout(resolve, ms));\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nrequire(\"bootstrap\");\nrequire(\"./sass/main.scss\");\nrequire(\"./assets/images/favicon-32x32.png\");\nrequire(\"./js/custom.js\");\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\tloaded: false,\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Flag the module as loaded\n\tmodule.loaded = true;\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n// expose the modules object (__webpack_modules__)\n__webpack_require__.m = __webpack_modules__;\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","__webpack_require__.nmd = (module) => {\n\tmodule.paths = [];\n\tif (!module.children) module.children = [];\n\treturn module;\n};","// no baseURI\n\n// object to store loaded and loading chunks\n// undefined = chunk not loaded, null = chunk preloaded/prefetched\n// [resolve, reject, Promise] = chunk loading, 0 = chunk loaded\nvar installedChunks = {\n\t826: 0\n};\n\n// no chunk on demand loading\n\n// no prefetching\n\n// no preloaded\n\n// no HMR\n\n// no HMR manifest\n\n__webpack_require__.O.j = (chunkId) => (installedChunks[chunkId] === 0);\n\n// install a JSONP callback for chunk loading\nvar webpackJsonpCallback = (parentChunkLoadingFunction, data) => {\n\tvar [chunkIds, moreModules, runtime] = data;\n\t// add \"moreModules\" to the modules object,\n\t// then flag all \"chunkIds\" as loaded and fire callback\n\tvar moduleId, chunkId, i = 0;\n\tif(chunkIds.some((id) => (installedChunks[id] !== 0))) {\n\t\tfor(moduleId in moreModules) {\n\t\t\tif(__webpack_require__.o(moreModules, moduleId)) {\n\t\t\t\t__webpack_require__.m[moduleId] = moreModules[moduleId];\n\t\t\t}\n\t\t}\n\t\tif(runtime) var result = runtime(__webpack_require__);\n\t}\n\tif(parentChunkLoadingFunction) parentChunkLoadingFunction(data);\n\tfor(;i < chunkIds.length; i++) {\n\t\tchunkId = chunkIds[i];\n\t\tif(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {\n\t\t\tinstalledChunks[chunkId][0]();\n\t\t}\n\t\tinstalledChunks[chunkId] = 0;\n\t}\n\treturn __webpack_require__.O(result);\n}\n\nvar chunkLoadingGlobal = self[\"webpackChunksqueezelite_esp32\"] = self[\"webpackChunksqueezelite_esp32\"] || [];\nchunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));\nchunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));","// startup\n// Load entry module and return exports\n// This entry module depends on other loaded chunks and execution need to be delayed\nvar __webpack_exports__ = __webpack_require__.O(undefined, [987], () => (__webpack_require__(607)))\n__webpack_exports__ = __webpack_require__.O(__webpack_exports__);\n"],"names":["deferred","he","require","Promise","get_control_option_value","obj","ctrl","id","val","opt","$","concat","attr","checked","replace","includes","handleNVSVisible","nvs_previous_checked","isEnabled","Cookies","recovery","show","hide","undefined","match","window","bootstrap","String","prototype","format","Object","assign","args","arguments","this","number","encodeHTML","encode","Date","toLocalShort","toLocaleString","dateStyle","timeStyle","nvsTypes","btIcons","bt_playing","bt_disconnected","bt_neutral","bt_connecting","bt_connected","bt_disabled","play_arrow","pause","stop","batIcons","icon","label","ranges","f","t","btStateIcons","desc","sub","pillcolors","MESSAGING_INFO","MESSAGING_WARNING","MESSAGING_ERROR","connectReturnCode","OK","FAIL","DISC","LOST","RESTORE","ETH","taskStates","flashState","NONE","REBOOT_TO_RECOVERY","SET_FWURL","FLASHING","DONE","UPLOADING","ERROR","UPLOADCOMPLETE","_state","olderRecovery","statusText","flashURL","flashFileName","statusPercent","Completed","prevRecovery","updateModal","Modal","document","getElementById","reset","UpdateProgress","removeClass","prop","value","isStateError","html","parent","isStateUploadComplete","isStateNone","isStateRebootRecovery","isStateSetUrl","isStateFlashing","isStateDone","isStateUploading","init","SetStateError","addClass","SetStateNone","SetStateRebootRecovery","SetStatusText","ajax","url","context","dataType","method","cache","contentType","data","JSON","stringify","timestamp","now","error","xhr","_ajaxOptions","thrownError","_xhr$status","setOTAError","status","complete","response","SetStateSetUrl","post_config","fwurl","type","SetStateFlashing","SetStateDone","SetStateUploading","SetStateUploadComplete","isFlashExecuting","toString","_this","keys","find","x","setOTATargets","fileInput","files","length","message","SetStatusPercent","ShowDialog","pct","pctChanged","txt","changed","css","text","StartOTA","logEvent","name","TargetReadyStartOTA","UploadLocalFile","xhttp","XMLHttpRequest","boundHandleUploadProgressEvent","HandleUploadProgressEvent","bind","boundsetOTAError","upload","addEventListener","onreadystatechange","readyState","open","send","console","Math","round","loaded","total","EventTargetStatus","_data$ota_pct","_data$ota_dsc","ota_pct","ota_dsc","EventOTAMessageClass","otaData","parse","fun","log","hideSurrounding","presetsloaded","messageInterval","confPayload","config","handleExceptionResponse","parseSqueezeliteCommandLine","commandLine","output","options","otherValues","i","arg","startsWith","option","slice","join","trim","o","indexOf","substring","getOutput","n","getName","otherOptions","btname","toUpperCase","temp","isConnected","ConnectedTo","hasOwnProperty","ip","getIcon","icons","handleTemplateTypeRadio","outtype","children","display","commandDefaults","forEach","key","showLocalMessage","showCmdMessage","cmdname","msgtype","msgtext","append","color","escapedtext","hFlash","handleReboot","link","delayReboot","lmsBaseUrl","releaseURL","messagesHeld","commandBTSinkName","i2s","b","C","W","Z","spdif","bt","validOptions","codecs","messagecount","messageseverity","SystemConfig","LastCommandsState","hostName","versionName","prevmessage","project_name","board_model","platform_name","preset_name","btSinkNamesOptSel","ConnectingToSSID","prevLMSIP","ConnectingToActions","getConfigJson","slimMode","each","_index","entry","nvsType","parseInt","attributes","nvs_type","duration","empty","resolve","delay","then","rdata","HideCmdMessage","getCommands","getConfig","setPlatformFilter","filter","trigger","renderError","fieldname","errorFieldName","errorField","field","after","rssiToIcon","rssi","refreshAP","_ConnectedTo","urc","ajaxSetup","timeout","getJSON","_asyncToGenerator","_regeneratorRuntime","_callee","_context","prev","next","sleep","sort","a","y","refreshAPHTML2","formatAP","ssid","auth","rssi_icon","auth_icon","_ConnectedTo2","h","e","_ConnectedTo$rssi","wifiSelector","prepend","siblings","first","showTask","task","debug","nme","cpu","st","minstk","bprio","cprio","num","getBTSinkOpt","getMessages","_ref2","_callee2","_iterator","_step","_loop","msgTime","statsData","msgparts","attrs","j","curOpt","_context3","_createForOfIteratorHelper","msg","msgAge","_context2","current_time","sent_time","setTime","getTime","t0","abrupt","ntasks","tasks","showMessage","split","is","item","replaceWith","btEntry","remove","s","done","delegateYield","t1","finish","setTimeout","_x","apply","fail","ajaxOptions","handleWifiDialog","gw","netmask","Action","STS","ap_ssid","ap_pwd","setIcons","offline","textContent","handleNetworkStatus","hasConnectionChanged","checkStatus","_data$message","_data$recovery","handleRecoveryMode","tt","bt_status","bt_sub_status","iconindex","handlebtstate","depth","version","Voltage","bat_icon","voltage","_i3","_batIcons","_step2","iconEntry","_iterator2","entryRanges","err","batteryToIcon","is_i2c_locked","lms_ip","lms_port","baseUrl","success","Number","Jack","getLongOps","longopts","values","commands","command","cmdParts","isConfig","targetDiv","innerhtml","help","argtable","placeholder","datatype","ctrlname","curvalue","hasvalue","shortopts","checkbox","extraclass","mincount","glossary","choice","off","on","runCommand","ctrlselector","ctrlValue","_","jqxhr","textStatus","entries","autoexec","parsed","_parsed$options$u$spl","u","_parsed$options$u$spl2","_slicedToArray","resampleValue","resampleInterpolation","processSqueezeliteCommandLine","replaceAll","title","gpio","gpioEntry","fixed","group","severity","ms","reason","_resolve","reject","saveAutoexec1","_get_control_option_v","optStr","resample","_i","_Object$entries","_Object$entries$_i","concatenateOptions","autoexec1","responseText","result","Result","handleDisconnect","handleConnect","pwd","dhcpname","ready","index","not","_get_control_option_v2","invalid","map","test","event","relatedTarget","CONN","MAN","FileReader","file","fr","onload","target","ex","alert","readAsText","slideUp","slideDown","preventDefault","createElement","href","URL","createObjectURL","Blob","setAttribute","body","appendChild","click","removeChild","branches","release","branch","push","fwb","assets","asset","browser_download_url","namecomponents","ver","cfg","bits","substr","lastIndexOf","created_at","idf","trclass","setURL","button","dataset","reboot","cmdstring","fields","allfields","querySelectorAll","selJson","cmd","model_config","_i2","_Object$entries2","_Object$entries2$_i","storedval","handleHWPreset","_step3","_iterator3","_attr$hasvalue","qts","isSelect","hasValue","validVal","_attr$longopts","_attr$shortopts","_attr$hasvalue2","_attr$longopts2","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","exports","module","__webpack_modules__","call","m","O","chunkIds","fn","priority","notFulfilled","Infinity","fulfilled","every","splice","r","getter","__esModule","d","definition","defineProperty","enumerable","get","g","globalThis","Function","Symbol","toStringTag","nmd","paths","installedChunks","chunkId","webpackJsonpCallback","parentChunkLoadingFunction","moreModules","runtime","some","chunkLoadingGlobal","self","__webpack_exports__"],"sourceRoot":""}