(()=>{"use strict";var e,t={8464:(e,t,r)=>{r(7042),r(1539),r(1038),r(8783),r(2526),r(1817),r(2165),r(6992),r(3948),r(8674);var n=r(6026),o=r.n(n),i=(r(5666),r(9826),r(1249),r(1058),r(9669)),u=r.n(i),a=r(9755),c=r.n(a),f=r(9490);function l(e){return(l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function p(e,t){return!t||"object"!==l(t)&&"function"!=typeof t?h(e):t}function h(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function y(e){var t="function"==typeof Map?new Map:void 0;return(y=function(e){if(null===e||(r=e,-1===Function.toString.call(r).indexOf("[native code]")))return e;var r;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return v(e,arguments,b(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),m(n,e)})(e)}function v(e,t,r){return(v=d()?Reflect.construct:function(e,t,r){var n=[null];n.push.apply(n,t);var o=new(Function.bind.apply(e,n));return r&&m(o,r.prototype),o}).apply(null,arguments)}function d(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function m(e,t){return(m=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function b(e){return(b=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function g(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}r(4916),r(5306),r(2479),r(9714),r(189),r(4723),r(3123),r(3210),r(2222),r(8304),r(489),r(2772),r(2419),r(1532);var w=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&m(e,t)}(o,e);var t,r,n=(t=o,r=d(),function(){var e,n=b(t);if(r){var o=b(this).constructor;e=Reflect.construct(n,arguments,o)}else e=n.apply(this,arguments);return p(this,e)});function o(){var e;s(this,o);for(var t=arguments.length,r=new Array(t),i=0;i=2?"cyan":1==e?"skyblue":null}r(3734),u().defaults.headers.common["X-Requested-With"]="XMLHttpRequest",String.prototype.format=function(){for(var e=arguments.length,t=new Array(e),r=0;r=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,u=!0,a=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return u=e.done,e},e:function(e){a=!0,i=e},f:function(){try{u||null==r.return||r.return()}finally{if(a)throw i}}}}function L(e,t){if(e){if("string"==typeof e)return I(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?I(e,t):void 0}}function I(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,u=!0,a=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return u=e.done,e},e:function(e){a=!0,i=e},f:function(){try{u||null==r.return||r.return()}finally{if(a)throw i}}}}function H(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r{0}".format(t.name)),a=j(t.npcType);a&&u.css("color",a),i.name.empty().append(u)}else i.name.html("");i.officerLevelText.text(t.officerLevelText),t.turnTime&&(o=f.ou.fromSQL(t.turnTime));var l=i.turn;c().each(t.turn,(function(e,t){o?l[e].turnTime.text(o.toFormat("HH:mm")):l[e].turnTime.text(""),l[e].turnText.html(t).css("font-size","13px");var n=x(l[e].turnPad.innerWidth()),i=x(l[e].turnText.outerWidth());if(i>.95*n){var u=13*n/i*.9;l[e].turnText.css("font-size","{0}px".format(u))}o&&(o=o.plus({minutes:r}))}))})),i=B(o()(5,13)),e.prev=11,i.s();case 13:if((a=i.n()).done){e.next=20;break}if(!((l=a.value)in n)){e.next=17;break}return e.abrupt("continue",18);case 17:l in W&&D(l);case 18:e.next=13;break;case 20:e.next=25;break;case 22:e.prev=22,e.t0=e.catch(11),i.e(e.t0);case 25:return e.prev=25,i.f(),e.finish(25);case 28:W=n;case 29:case"end":return e.stop()}}),e,null,[[11,22,25,28]])})))).apply(this,arguments)}function X(){return(X=q(regeneratorRuntime.mark((function e(t,r){var n,o;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return console.log(t,r),e.prev=1,e.next=4,u()({url:"j_set_chief_command.php",responseType:"json",method:"post",data:M({turnList:t,action:r})});case 4:return n=e.sent,(o=n.data).result||alert(o.reason),e.next=9,Q();case 9:e.next=15;break;case 11:e.prev=11,e.t0=e.catch(1),console.error(e.t0),T();case 15:case"end":return e.stop()}}),e,null,[[1,11]])})))).apply(this,arguments)}function $(e){return G.apply(this,arguments)}function G(){return(G=q(regeneratorRuntime.mark((function e(t){var r,n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,u()({url:"j_chief_turn.php",responseType:"json",method:"post",data:M({amount:t})});case 3:return r=e.sent,(n=r.data).result||alert(n.reason),e.next=8,Q();case 8:e.next=14;break;case 10:e.prev=10,e.t0=e.catch(0),console.error(e.t0),T();case 14:case"end":return e.stop()}}),e,null,[[0,10]])})))).apply(this,arguments)}jQuery((function(e){z=function(){var e,t={btns:c()("#turnPush,#turnPull,#setCommand")},r=B(o()(5,13));try{for(r.s();!(e=r.n()).done;){var n,i=e.value,u=c()("#chief_{0}".format(i)),a=u.find(".chiefLevelText"),f=u.find(".chiefName"),l=[],s=B(o()(maxChiefTurn));try{for(s.s();!(n=s.n()).done;){var p=n.value,h=u.find(".turn{0}".format(p)),y=h.find(".chiefTurnTime"),v=h.find(".chiefTurnPad"),d=h.find(".chiefTurnText");l.push({turnTime:y,turnPad:v,turnText:d})}}catch(e){s.e(e)}finally{s.f()}t[i]={officerLevelText:a,name:f,turn:l}}}catch(e){r.e(e)}finally{r.f()}return t}(),Q(),e("#reloadTable").on("click",Q),e("#setCommand").on("click",(function(){var t=F(e("#chiefTurnSelector").val()).map((function(e){return parseInt(e)})),r=e("#chiefCommandList option:selected");return r.data("reqarg")?e.redirect("b_processing.php",{command:x(r.val()),turnList:t.join("_"),is_chief:!0},"GET"):function(e,t){X.apply(this,arguments)}(t,F(r.val())),!1})),e("#turnPush").on("click",(function(){return $(1),!1})),e("#turnPull").on("click",(function(){return $(-1),!1}))}))}},r={};function n(e){var o=r[e];if(void 0!==o)return o.exports;var i=r[e]={id:e,loaded:!1,exports:{}};return t[e].call(i.exports,i,i.exports,n),i.loaded=!0,i.exports}n.m=t,e=[],n.O=(t,r,o,i)=>{if(!r){var u=1/0;for(l=0;l=i)&&Object.keys(n.O).every((e=>n.O[e](r[c])))?r.splice(c--,1):(a=!1,i0&&e[l-1][2]>i;l--)e[l]=e[l-1];e[l]=[r,o,i]},n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),n.j=310,(()=>{var e={310:0};n.O.j=t=>0===e[t];var t=(t,r)=>{var o,i,[u,a,c]=r,f=0;if(u.some((t=>0!==e[t]))){for(o in a)n.o(a,o)&&(n.m[o]=a[o]);if(c)var l=c(n)}for(t&&t(r);fn(8464)));o=n.O(o)})(); //# sourceMappingURL=chiefCenter.js.map