Files
core/hwe/js/troop.js
T
2021-08-16 03:29:54 +09:00

2 lines
8.9 KiB
JavaScript

(()=>{"use strict";var t,e={3430:(t,e,n)=>{function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function i(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&p(t,e)}function c(t){var e=d();return function(){var n,r=h(t);if(e){var o=h(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return u(this,n)}}function u(t,e){return!e||"object"!==r(e)&&"function"!=typeof e?l(t):e}function l(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function s(t){var e="function"==typeof Map?new Map:void 0;return(s=function(t){if(null===t||(n=t,-1===Function.toString.call(n).indexOf("[native code]")))return t;var n;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==e){if(e.has(t))return e.get(t);e.set(t,r)}function r(){return f(t,arguments,h(this).constructor)}return r.prototype=Object.create(t.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),p(r,t)})(t)}function f(t,e,n){return(f=d()?Reflect.construct:function(t,e,n){var r=[null];r.push.apply(r,e);var o=new(Function.bind.apply(t,r));return n&&p(o,n.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(t){return!1}}function p(t,e){return(p=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function h(t){return(h=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function b(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}n(4916),n(5306),n(2479),n(1539),n(9714),n(1058),n(6992),n(189),n(8783),n(3948),n(4723),n(7042),n(9826),n(3123),n(3210),n(1038),n(2526),n(1817),n(2165),n(2222),n(8304),n(489),n(2772),n(2419),n(1532);var v=function(t){i(u,t);var e,n,r=c(u);function u(){var t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return o(this,u),b(l(t=r.call(this,e)),"name","RuntimeError"),t.message=e,t}return e=u,(n=[{key:"toString",value:function(){return this.message?this.name+": "+this.message:this.name}}])&&a(e.prototype,n),u}(s(Error)),y=function(t){i(n,t);var e=c(n);function n(){var t;o(this,n);for(var r=arguments.length,a=new Array(r),i=0;i<r;i++)a[i]=arguments[i];return b(l(t=e.call.apply(e,[this].concat(a))),"name","NotNullExpected"),t}return n}(v);function g(t){if(null==t)throw new y;return t}var m=n(9755),w=n.n(m),j=(n(3734),n(9669)),O=n.n(j);function _(){alert("작업을 실패했습니다.")}function x(t,e,n,r,o,a,i){try{var c=t[a](i),u=c.value}catch(t){return void n(t)}c.done?e(u):Promise.resolve(u).then(r,o)}function T(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var a=t.apply(e,n);function i(t){x(a,r,o,i,c,"next",t)}function c(t){x(a,r,o,i,c,"throw",t)}i(void 0)}))}}O().defaults.headers.common["X-Requested-With"]="XMLHttpRequest",String.prototype.format=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return this.replace(/{(\d+)}/g,(function(t,n){return void 0!==e[n]?e[n].toString():t}))},n(5666),n(4986),n(8674),w()((function(t){t("#btnLeaveTroop").click((function(){return!!confirm("정말 부대를 탈퇴하시겠습니까?")&&(t.post({url:"j_troop.php",dataType:"json",data:{action:"부대탈퇴"}}).then((function(t){console.log(t),t.result||(alert(t.reason),location.reload()),location.reload()}),_),!1)})),t("#btnCreateTroop").click((function(){return t.post({url:"j_troop.php",dataType:"json",data:{action:"부대창설",name:t("#nameplate").val()}}).then((function(t){console.log(t),t.result||(alert(t.reason),location.reload()),location.reload()}),_),!1})),t("#btnChangeTroopName").click((function(){return t.post({url:"j_troop.php",dataType:"json",data:{action:"부대변경",name:t("#nameplate").val()}}).then((function(t){console.log(t),t.result||(alert(t.reason),location.reload()),location.reload()}),_),!1})),t("#btnKickTroop").click((function(){return t.post({url:"j_troop.php",dataType:"json",data:{action:"부대추방",gen:t("#genNo").val()}}).then((function(t){console.log(t),t.result||(alert(t.reason),location.reload()),location.reload()}),_),!1})),t("#btnJoinTroop").click((function(){return t.post({url:"j_troop.php",dataType:"json",data:{action:"부대가입",troop:t(".troopId:checked").val()}}).then((function(t){console.log(t),t.result||(alert(t.reason),location.reload()),location.reload()}),_),!1})),function(t){var e,n={},r=(e=document.location.pathname).substring(0,e.lastIndexOf("/")),o=t("<div id='on_mover' style='position:absolute;'><table class='tb_layout bg0' style='width:100%;'><thead><tr><td width=98 class='bg1 center'>이 름</td><td width=98 class='bg1 center'>통무지</td><td width=53 class='bg1 center'>자 금</td><td width=53 class='bg1 center'>군 량</td><td width=48 class='bg1 center'>도시</td><td width=28 class='bg1 center'>守</td><td width=58 class='bg1 center'>병 종</td><td width=63 class='bg1 center'>병 사</td><td width=38 class='bg1 center'>훈련</td><td width=38 class='bg1 center'>사기</td><td width=213 class='bg1 center'>명 령</td><td width=38 class='bg1 center'>삭턴</td><td width=48 class='bg1 center'>턴</td></tr></thead></thead><tbody class='content'></tbody></table></div>");o.find("thead td"),o.css("width","960px").css("margin","0").css("padding","0").css("left","50%").css("margin-left","-480px"),o.hide();var a=function(){var e=T(regeneratorRuntime.mark((function e(){var a,i,c,u;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n={},(a=t("#on_mover .content")).html(""),e.next=5,O().get("".concat(r,"/b_genList.php"),{responseType:"text"});case 5:i=e.sent,c=i.data;try{u=t(c),function(){var e=void 0;if(u.each((function(){if("general_list"==t(this).attr("id"))return e=t(this),!1})),void 0===e)throw new v;return e}().find("tbody > tr").each((function(){var e=t(this),r=e.children(".i_troop");if("-"!=t.trim(r.text())){r.remove();var o=parseInt(e.data("general-id"));n[o]=e,e.hide(),a.append(e)}})),t(".troopUser").hover((function(){var e=t(this),r=e.closest("tr"),a=parseInt(e.data("general-id"));console.log(a);var i=g(r.offset()).top+g(r.outerHeight());o.css("top",i),n[a].show(),o.show()}),(function(){var e=t(this),r=parseInt(e.data("general-id"));n[r].hide(),o.hide()}))}catch(t){console.log(t)}case 8:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),i=t("table:eq(0) td:eq(0)");i.find("br:last").remove();var c=t('<input type="button" value="암행부 연동">');c.click(T(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,a();case 2:case"end":return t.stop()}}),t)})))),i.append(c),window.userList=n,t("body").append(o)}(t)}))}},n={};function r(t){var o=n[t];if(void 0!==o)return o.exports;var a=n[t]={id:t,loaded:!1,exports:{}};return e[t].call(a.exports,a,a.exports,r),a.loaded=!0,a.exports}r.m=e,t=[],r.O=(e,n,o,a)=>{if(!n){var i=1/0;for(s=0;s<t.length;s++){for(var[n,o,a]=t[s],c=!0,u=0;u<n.length;u++)(!1&a||i>=a)&&Object.keys(r.O).every((t=>r.O[t](n[u])))?n.splice(u--,1):(c=!1,a<i&&(i=a));if(c){t.splice(s--,1);var l=o();void 0!==l&&(e=l)}}return e}a=a||0;for(var s=t.length;s>0&&t[s-1][2]>a;s--)t[s]=t[s-1];t[s]=[n,o,a]},r.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return r.d(e,{a:e}),e},r.d=(t,e)=>{for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.nmd=t=>(t.paths=[],t.children||(t.children=[]),t),r.j=48,(()=>{var t={48:0};r.O.j=e=>0===t[e];var e=(e,n)=>{var o,a,[i,c,u]=n,l=0;for(o in c)r.o(c,o)&&(r.m[o]=c[o]);if(u)var s=u(r);for(e&&e(n);l<i.length;l++)a=i[l],r.o(t,a)&&t[a]&&t[a][0](),t[i[l]]=0;return r.O(s)},n=self.webpackChunkhidche_lib=self.webpackChunkhidche_lib||[];n.forEach(e.bind(null,0)),n.push=e.bind(null,n.push.bind(n))})();var o=r.O(void 0,[216],(()=>r(3430)));o=r.O(o)})();
//# sourceMappingURL=troop.js.map