!function(t){var e={};function a(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,a),o.l=!0,o.exports}a.m=t,a.c=e,a.d=function(t,e,n){a.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},a.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},a.t=function(t,e){if(1&e&&(t=a(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(a.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)a.d(n,o,function(e){return t[e]}.bind(null,o));return n},a.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return a.d(e,"a",e),e},a.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},a.p="/vendor/Question/",a(a.s=277)}({27:function(t,e){t.exports=window.$},277:function(t,e,a){(function(t){a(278).init(),t(document).on("click","[data-favorite-action] [data-action]",(function(){let e=t(this).data("action"),a=t(this).data("category-id"),n=t(this);window.api.base.post("/question_favorite_member/submit",{action:e,categoryId:a},(function(t){window.api.base.defaultFormCallback(t,{success:function(t){n.closest("[data-favorite-action]").find("[data-action]").show(),n.closest("[data-favorite-action]").find("[data-action="+e+"]").hide()}})}))}))}).call(this,a(27))},278:function(t,e,a){(function(e){const a=window.api.base;function n(t,n,o){if(t.data("done"))return!1;t.addClass("locked"),t.data("done",!0),a.post("/question/answer/"+t.attr("data-question-alias"),{answer:n},(function(n){a.defaultFormCallback(n,{success:function(n){t.trigger("QuestionAnswer"),t.find(".answer-result").html(n.data.html);let i=t.closest('[data-question-type="group"]');if(i.length>0){let t=!0;i.find("[data-question]").each((function(a,n){e(n).data("done")||(t=!1)})),t&&a.post("/question/answer/"+i.attr("data-question-alias"),{},(function(t){a.defaultFormCallback(t,{success:function(t){i.find(">.question-analysis>.answer-result").html(t.data.html)}})}))}o&&o()}})}))}t.exports={init:function(){e("[data-question-type=singleChoice]").on("click","[data-choice]",(function(){let t=e(this).closest("[data-question-type]");return t.data("done")||n(t,e(this).attr("data-choice"),()=>{e(this).addClass("selected")}),!1})),e("[data-question-type=multiChoices]").on("click","[data-choice]",(function(){return e(this).closest("[data-question-type]").data("done")||(e(this).hasClass("selected")?e(this).removeClass("selected"):e(this).addClass("selected")),!1})),e("[data-question-type=multiChoices]").on("click","[data-choice-confirm]",(function(){let t=e(this).closest("[data-question-type]");if(t.data("done"))return!1;let a=[];return t.find("[data-choice].selected").each((function(t,n){a.push(e(n).attr("data-choice"))})),a.length?(n(t,a),!1):(window.api.dialog.tipError("请选择选项"),!1)})),e("[data-question-type=trueFalse]").on("click","[data-choice]",(function(){let t=e(this).closest("[data-question-type]");return t.data("done")||n(t,e(this).attr("data-choice"),()=>{e(this).addClass("selected")}),!1})),e("[data-question-type=fill]").on("click","[data-answer-show]",(function(){let t=e(this).closest("[data-question-type]");return t.data("done")||n(t,null),!1})),e("[data-question-type=text]").on("click","[data-answer-show]",(function(){let t=e(this).closest("[data-question-type]");return t.data("done")||n(t,null),!1})),e("[data-question-type]").on("click","*",(function(){let t=!0;e("[data-question-type]").each((function(a,n){e(n).data("done")||(t=!1)})),t&&e("[data-group-analysis]").show()}))}}}).call(this,a(27))}});