(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["medical-three-column-page"],{"00de":function(e,t,i){"use strict";i("5a18")},"0274":function(e,t,i){"use strict";var n=function(){var e,t,i,n,r,s,a=this,o=a._self._c;return o("div",{staticClass:"three-column-preview"},[o("div",{staticClass:"three-column-preview__content"},[a.material?o("div",{staticClass:"three-column-preview__body"},[o("div",{staticClass:"three-column-preview__material-id"},[a._v(" id: "+a._s((null===(e=a.material)||void 0===e?void 0:e.material_id)||(null===(t=a.material)||void 0===t?void 0:t.id))+" ")]),a.total?o("button",{staticClass:"three-column-preview__nav three-column-preview__nav--prev",attrs:{type:"button","aria-label":"上一张"},on:{click:function(e){return e.stopPropagation(),e.preventDefault(),a.$emit("prev")}}},[o("i",{staticClass:"el-icon-arrow-left"})]):a._e(),a.isImageMaterial?o("img-deal",{ref:"previewImgDeal",staticClass:"three-column-preview__img",attrs:{imgData:a.material,url:null===(i=a.material)||void 0===i?void 0:i.oss_preview_url,"disable-legacy-fallback":!0,"fit-mode":a.isLayoutFocusActive?"contain":"width-first","width-first-vertical-align":"auto","show-ocr-frames":a.ocrOverlayEnabled,"ocr-tooltip-open-delay":500,"invoice-editor-match-highlight":Boolean(a.material&&"string"===typeof a.material.materials_type&&a.material.materials_type.includes("发票")),"show-handwork-flag":!0},on:{"toggle-handwork-flag":function(e){return a.$emit("toggle-handwork-flag",e)},"image-loading":a.handleImageLoading,"image-loaded":a.handleImageLoaded,"image-error":a.handleImageError},nativeOn:{dblclick:function(e){return a.handleImageDblClick.apply(null,arguments)}},scopedSlots:a._u([{key:"addIcon",fn:function(){return[o("i",{staticClass:"img-deal__layout-toggle",class:{"is-active":a.isLayoutFocusActive},attrs:{title:a.isLayoutFocusActive?"切换到布局一":"切换到布局二"},on:{click:function(e){return e.stopPropagation(),a.$emit("toggle-layout")}}},[a._v(" ✎ ")]),o("i",{staticClass:"img-deal__compare-icon el-icon-compare",class:{"is-disabled":!a.canShowCompareButton},attrs:{title:a.canShowCompareButton?"比对图片":"点击尝试比对"},on:{click:function(e){return e.stopPropagation(),a.$emit("open-image-compare")}}}),o("i",{staticClass:"img-deal__similar-search-icon el-icon-picture-outline-round",attrs:{title:"搜索相似图(以图搜图)"},on:{click:function(e){return e.stopPropagation(),a.$emit("open-similar-image-search")}}}),o("i",{class:["img-deal__ocr-toggle","el-icon-ocr-toggle",{"is-active":a.ocrOverlayEnabled,"is-disabled":!a.hasOcrBbox}],attrs:{title:a.hasOcrBbox?a.ocrOverlayEnabled?"关闭 ocr":"打开 ocr":"无 ocr 结果"},on:{click:function(e){return e.stopPropagation(),a.toggleOcrOverlay.apply(null,arguments)}}})]},proxy:!0}],null,!1,178561310)}):o("div",{staticClass:"three-column-preview__doc",attrs:{"aria-label":"文档材料"}},[o("div",{staticClass:"three-column-preview__doc-label"},[a._v(a._s(a.docLabel))]),o("el-button",{attrs:{size:"mini",type:"primary"},on:{click:a.openDoc}},[a._v("在新标签打开")])],1),a.isImageMaterial&&a.imageLoading?o("div",{staticClass:"three-column-preview__loading",attrs:{"aria-label":"图片加载中"}},[o("i",{staticClass:"el-icon-loading"}),o("span",[a._v("图片加载中")])]):a._e(),a.total?o("button",{staticClass:"three-column-preview__nav three-column-preview__nav--next",attrs:{type:"button","aria-label":"下一张"},on:{click:function(e){return e.stopPropagation(),e.preventDefault(),a.$emit("next")}}},[o("i",{staticClass:"el-icon-arrow-right"})]):a._e()],1):o("div",{staticClass:"three-column-preview__empty"},[o("p",[a._v("请选择任意材料开始预览")])]),o("footer",{staticClass:"three-column-preview__footer"},[o("div",{staticClass:"three-column-preview__footer-left"},[null!==(n=a.status)&&void 0!==n&&n.error?o("el-tag",{attrs:{size:"mini",type:"danger"}},[a._v(a._s(a.status.error))]):a._e(),a.total?o("div",{staticClass:"three-column-preview__progress"},[a._v(" "+a._s(a.currentIndex+1)+" / "+a._s(a.total)+" ")]):a._e(),a.material?o("div",{staticClass:"three-column-preview__types"},[a.material.materials_type?o("el-tag",{attrs:{size:"mini",type:"primary",effect:"dark",closable:""},on:{close:a.handleClearType}},[a._v(" "+a._s(a.material.materials_type)+" ")]):o("el-popover",{attrs:{placement:"top-start",trigger:"click","popper-class":"three-column-preview__type-popover"},model:{value:a.typePopoverVisible,callback:function(e){a.typePopoverVisible=e},expression:"typePopoverVisible"}},[o("div",{staticClass:"type-popover__content"},[o("div",{staticClass:"type-popover__primary"},a._l(a.primaryTypeTags,(function(e){return o("el-tag",{key:e.value,attrs:{size:"mini",type:"success"},on:{click:function(t){return a.handleSelectType(e.label)}}},[a._v(" "+a._s(e.label)+" ")])})),1),o("el-select",{attrs:{size:"mini",filterable:"",placeholder:"选择其他类型"},on:{change:a.handleSelectType},model:{value:a.otherTypeValue,callback:function(e){a.otherTypeValue=e},expression:"otherTypeValue"}},a._l(a.otherTypeOptions,(function(e){return o("el-option",{key:e.value,attrs:{label:e.label,value:e.label}})})),1)],1),o("el-button",{attrs:{slot:"reference",size:"mini",type:"default",icon:"el-icon-plus"},slot:"reference"})],1)],1):a._e()],1),o("div",{staticClass:"three-column-preview__footer-right"},[a.pending?o("el-tag",{attrs:{size:"mini",type:"warning"}},[a._v("未保存")]):a._e(),o("el-button",{attrs:{size:"mini",type:"primary",loading:Boolean(null===(r=a.status)||void 0===r?void 0:r.saving),disabled:!a.pending||Boolean(null===(s=a.status)||void 0===s?void 0:s.saving)},on:{click:function(e){return a.$emit("save")}}},[a._v(" 保存当前材料 ")])],1)]),a.$slots.default?o("div",{staticClass:"three-column-preview__editor"},[a._t("default")],2):a._e()])])},r=[],s=(i("8f26"),i("d9d9"),i("209c"),i("18dd")),a=i("472a"),o=i("dd32"),l={name:"MedicalThreeColumnPreviewPanel",components:{ImgDeal:s["a"]},props:{material:{type:Object,default:null},materialTypeOptions:{type:Array,default:()=>[]},pending:{type:Boolean,default:!1},status:{type:Object,default:()=>({saving:!1,error:""})},currentIndex:{type:Number,default:0},total:{type:Number,default:0},canShowCompareButton:{type:Boolean,default:!0},layoutVariant:{type:String,default:"default"}},data(){return{typePopoverVisible:!1,otherTypeValue:"",ocrOverlayEnabled:!1,imageLoading:!1,imageLoadingUrl:""}},computed:{isImageMaterial(){const e=Object(o["d"])(this.material);return!!e&&Object(o["b"])(e)},docLabel(){const e=Object(o["d"])(this.material);return Object(o["a"])(e)},hasOcrBbox(){var e;const t=null===(e=this.material)||void 0===e?void 0:e.ocr_result;if(null===t||void 0===t)return!1;if("null"===t||"NULL"===t)return!1;if(Array.isArray(t))return t.length>0;if("object"===typeof t)return Object.keys(t||{}).length>0;if("string"!==typeof t)return Boolean(t);const i=t.trim();if(!i||"null"===i||"[]"===i||"{}"===i||'""'===i)return!1;try{const e=JSON.parse(i);return!!e&&(Array.isArray(e)?e.length>0:"object"===typeof e?Object.keys(e).length>0:Boolean(e))}catch(n){return Boolean(i)}},primaryTypeTags(){const e=["交通事故认定书","医疗发票","病人费用清单","其他"];return this.materialTypeOptions.filter(t=>e.includes(t.label))},otherTypeOptions(){const e=["交通事故认定书","医疗发票","病人费用清单","其他"];return this.materialTypeOptions.filter(t=>!e.includes(t.label))},isLayoutFocusActive(){return"focus"===this.layoutVariant}},watch:{material:{immediate:!0,handler(e){const t="string"===typeof(null===e||void 0===e?void 0:e.materials_type)?e.materials_type.trim():"",i=Object(o["d"])(e),n=Boolean(i&&Object(o["b"])(i)),r=n&&"string"===typeof(null===e||void 0===e?void 0:e.oss_preview_url)?e.oss_preview_url:"";this.imageLoadingUrl=r||"",this.imageLoading=Boolean(e&&n&&r),this.$nextTick(()=>{this.syncLoadingFromDom()});const s=Boolean(t&&(t.includes("认定书")||"病人费用清单"===t||"医疗发票"===t))&&this.hasOcrBbox;this.ocrOverlayEnabled=Boolean(n&&s)}}},methods:{handleImageDblClick(e){const t=e&&e.target&&1===e.target.nodeType?e.target:null;t&&"function"===typeof t.closest&&t.closest(".iconBtn")||this.isImageMaterial&&this.material&&this.material.oss_preview_url&&this.$emit("open-fullscreen",{material:this.material})},getMaterialId(e){var t,i;return null!==(t=null!==(i=null===e||void 0===e?void 0:e.material_id)&&void 0!==i?i:null===e||void 0===e?void 0:e.id)&&void 0!==t?t:null},syncLoadingFromDom(){var e,t;const i=this.$refs.previewImgDeal,n=null===i||void 0===i||null===(e=i.$el)||void 0===e||null===(t=e.querySelector)||void 0===t?void 0:t.call(e,"img");return!!n&&(!!(n.complete&&n.naturalWidth>0)&&(this.imageLoading=!1,!0))},handleImageLoading(e){var t,i;const n=(null===e||void 0===e?void 0:e.url)||(null===(t=this.material)||void 0===t?void 0:t.oss_preview_url)||"";if(!n)return;const r=null!==(i=null===e||void 0===e?void 0:e.id)&&void 0!==i?i:null,s=this.getMaterialId(this.material);null!==r&&null!==s&&r!==s||(this.imageLoadingUrl=n,this.imageLoading=!0,this.$nextTick(()=>{this.syncLoadingFromDom()}))},handleImageLoaded(e){var t;const i=(null===e||void 0===e?void 0:e.url)||"",n=null!==(t=null===e||void 0===e?void 0:e.id)&&void 0!==t?t:null,r=this.getMaterialId(this.material);null!==n&&null!==r&&n!==r||(i&&this.imageLoadingUrl&&i!==this.imageLoadingUrl?this.$nextTick(()=>{this.syncLoadingFromDom()}):this.imageLoading=!1)},handleImageError(...e){this.imageLoading=!1,this.$emit("image-error",...e)},async openDoc(){const e=Object(o["d"])(this.material);var t,i;if(!e)return void(null===(t=this.$message)||void 0===t||null===(i=t.warning)||void 0===i||i.call(t,"缺少 oss_path,无法打开文档"));const n="undefined"!==typeof window?window.open("","_blank"):null;try{const t=await Object(a["a"])(e);var r,s;if(!t)return n&&"function"===typeof n.close&&n.close(),void(null===(r=this.$message)||void 0===r||null===(s=r.error)||void 0===s||s.call(r,"文档链接生成失败"));if(n)return void(n.location.href=t);window.open(t,"_blank")}catch(u){var l,c;n&&"function"===typeof n.close&&n.close(),null===(l=this.$message)||void 0===l||null===(c=l.error)||void 0===c||c.call(l,(null===u||void 0===u?void 0:u.message)||"打开文档失败")}},toggleOcrOverlay(){this.hasOcrBbox&&(this.ocrOverlayEnabled=!this.ocrOverlayEnabled)},handleClearType(){this.typePopoverVisible=!1,this.otherTypeValue="",this.$emit("change-material-type","")},handleSelectType(e){e&&(this.$emit("change-material-type",e),this.typePopoverVisible=!1,this.otherTypeValue="")}}},c=l,u=(i("da86"),i("1805")),h=Object(u["a"])(c,n,r,!1,null,"1c0f2da4",null);t["a"]=h.exports},"028f":function(e,t,i){"use strict";var n=i("76b7"),r="object"==typeof self&&self&&self.Object===Object&&self,s=n["a"]||r||Function("return this")();t["a"]=s},"0320":function(e,t,i){"use strict";i("83c7")},"03c5":function(e,t,i){"use strict";(function(e){var n=i("028f"),r=i("bfe9"),s="object"==typeof exports&&exports&&!exports.nodeType&&exports,a=s&&"object"==typeof e&&e&&!e.nodeType&&e,o=a&&a.exports===s,l=o?n["a"].Buffer:void 0,c=l?l.isBuffer:void 0,u=c||r["a"];t["a"]=u}).call(this,i("c8f3")(e))},"03d6":function(e,t,i){"use strict";i.d(t,"a",(function(){return y}));i("0f5d"),i("b138"),i("865d"),i("8f26"),i("a3ff"),i("d9d9"),i("3739"),i("666b"),i("1447"),i("209c"),i("f803");function n(e){const t=e.itemFieldMapArr.reduce((e,t)=>(e[t.name]=t.field,e),{}),i=[];e.tableData.forEach(e=>{let n=0;e.lists.forEach(r=>{const s=r[t[r.item]]||"--";i.push({name:e.name,item:r.item,amount:s,source:"🤖",subtotal:e.final_adjustment_amount||0,liability_ratio:e.responsibility_ratio>0?100*e.responsibility_ratio:0,total:e.formula}),n+=s});const r=n*(e.liability_ratio||0);i.length>0&&(i[i.length-1].subtotal=n,i[i.length-1].liability_ratio=(100*e.liability_ratio||0)+"%",i[i.length-1].total=""+r.toFixed(0))}),e.tableRows=i}function r(e,{rowIndex:t,columnIndex:i}){if(0===i||i>3){var n;const i=null===(n=e.tableRows[t])||void 0===n?void 0:n.name;if(!i)return{rowspan:1,colspan:1};const r=e.tableRows.filter(e=>e.name===i),s=e.tableRows.findIndex(e=>e.name===i);return t===s?{rowspan:r.length,colspan:1}:{rowspan:0,colspan:0}}}function s(e,{row:t,column:i,rowIndex:n,columnIndex:r}){if(0===r)return 0===n?{rowspan:2,colspan:1}:1===n?{rowspan:0,colspan:0}:{rowspan:1,colspan:1};if(0===n){if(1===r)return{rowspan:1,colspan:4};if(2===r||3===r||4===r)return{rowspan:1,colspan:0}}if("责任比例"===t.display_name||"合计"===t.display_name){if(1===r)return{rowspan:1,colspan:3};if(2===r||3===r)return{rowspan:1,colspan:0}}}function a(e,{prop:t,order:i}){if(!t||!i)return;const n=[],r=[];e.personalPayData.forEach(e=>{"合计"===e.invoice_no?r.push(e):n.push(e)}),n.sort((e,n)=>{const r=e[t],s=n[t];if(null==r&&null==s)return 0;if(null==r)return 1;if(null==s)return-1;if("invoice_no"===t)return"ascending"===i?String(r).localeCompare(String(s)):String(s).localeCompare(String(r));if(["personal_payment","total_amount","other_payment"].includes(t)){const e=parseFloat(r)||0,t=parseFloat(s)||0;return"ascending"===i?e-t:t-e}return"ascending"===i?String(r).localeCompare(String(s)):String(s).localeCompare(String(r))}),e.personalPayData=[...n,...r]}function o(e,{prop:t,order:i}){if(!t||!i)return;const n=[],r=[];e.highCostDeductionData.forEach(e=>{"合计"===e.project_name?r.push(e):n.push(e)}),n.sort((e,n)=>{const r=e[t],s=n[t];return"ascending"===i?r-s:s-r}),e.highCostDeductionData=[...n,...r]}function l({row:e,editFormRef:t,editingRowRef:i,accidentTime:n,currentImage:r}){i.value=e,t.value=JSON.parse(JSON.stringify(e)),r&&r.materials_type&&r.materials_type.includes("认定书")&&n&&(t.value.accident_time=n)}function c({row:e,index:t,editForm:i,editingRowRef:n,accidentImgData:r,accidentTable:s,accidentTime:a,apiClient:o,interfaceUrl:l,caseNo:c,currentImage:u,materialState:h,accidentMaterialId:d,onSuccess:p,onError:g,onMessage:f}){const{accident_time:m,...v}=i;let y=t;if((void 0===y||null===y)&&s&&Array.isArray(s)&&e&&(y=s.findIndex(t=>!(!e.party_id||!t.party_id||e.party_id!==t.party_id)||(!(!e.name||!e.id_number||t.name!==e.name||t.id_number!==e.id_number)||!(!e.name||t.name!==e.name||e.id_number&&t.id_number)))),s&&Array.isArray(s)&&y>=0&&y=0&&y=0&&ye&&e.material_id),w=d||"",x=e=>{if(!e||!h)return null;const t=h.otherMaterialsMap||h.tmpOtherMaterialsMap||{},i=t[String(e)];if(i)return JSON.parse(JSON.stringify(i));const n=Array.isArray(h.caseAllMaterials)?h.caseAllMaterials:[],r=n.find(t=>String((null===t||void 0===t?void 0:t.material_id)||(null===t||void 0===t?void 0:t.id)||"")===String(e));return r?JSON.parse(JSON.stringify(r)):null},S=Boolean((null===u||void 0===u?void 0:u.materials_type)&&String(u.materials_type).includes("认定书")),_=S&&((null===u||void 0===u?void 0:u.material_id)||(null===u||void 0===u?void 0:u.id))||"",A=_||w,M=A?x(A):null,k=C.length>0||Boolean(M);if(k){const e=JSON.parse(JSON.stringify(s||[])),t=(t,i)=>{if(!t||!i)return;const n="string"===typeof i.pipeline_result?{}:i.pipeline_result||{};i.pipeline_result={...n,parties:e,accident_time:a},i.handwork_result=i.pipeline_result;const r=`${l}/api/materials_pipeline/${t}/sync`;o.post(r,i).then(e=>{var t;e.data.success?(f&&f.success("保存成功!"),p&&p()):(f&&f.error((null===(t=e.data.data)||void 0===t?void 0:t.message)||"保存失败"),g&&g(e.data))}).catch(e=>{var t;f&&f.error((null===e||void 0===e||null===(t=e.response)||void 0===t||null===(t=t.data)||void 0===t?void 0:t.message)||"保存失败"),g&&g(e)})};if(0===C.length&&M){const e=JSON.parse(JSON.stringify(M)),i=A;return void t(i,e)}C.forEach(e=>{e.materialDetail&&e.materialDetail[0]&&t(e.material_id,e.materialDetail[0])})}else{let t=`${l}/api/claims/${c}/parties/${e.party_id||""}`;e.party_id||(t=`${l}/api/claims/${c}/parties`),o.post(t,e).then(e=>{var t;e.data.success?(f&&f.success("保存成功!"),p&&p()):(f&&f.error((null===(t=e.data.data)||void 0===t?void 0:t.message)||"保存失败"),g&&g(e.data))}).catch(e=>{var t;f&&f.error((null===e||void 0===e||null===(t=e.response)||void 0===t||null===(t=t.data)||void 0===t?void 0:t.message)||"保存失败"),g&&g(e)})}}function u({row:e,index:t,editingRowRef:i,editFormRef:n,accidentTable:r}){i.value=null,n.value={},r&&Object.keys(e).every(t=>!e[t])&&r.splice(t,1)}function h({accidentTime:e,editFormRef:t,editingAccidentTimeRef:i}){i.value=!0;let n=e||"";if(n&&n.includes("T")){const e=new Date(n),t=e.getFullYear(),i=String(e.getMonth()+1).padStart(2,"0"),r=String(e.getDate()).padStart(2,"0"),s=String(e.getHours()).padStart(2,"0"),a=String(e.getMinutes()).padStart(2,"0");n=`${t}-${i}-${r} ${s}:${a}`}t.value={accident_time:n}}function d({accidentTime:e,accidentDataRef:t,accidentImgData:i,apiClient:n,interfaceUrl:r,editingAccidentTimeRef:s,editFormRef:a,onMessage:o}){if(!e)return void(o&&o.warning("请选择事故时间"));t&&(t.value=t.value||{},t.value.accident_time=e);const l=[];(i||[]).forEach(t=>{if(t.materialDetail&&t.materialDetail[0]){t.materialDetail[0].pipeline_result&&"string"!==typeof t.materialDetail[0].pipeline_result||(t.materialDetail[0].pipeline_result={}),t.materialDetail[0].pipeline_result.accident_time=e,t.materialDetail[0].handwork_result=t.materialDetail[0].pipeline_result;const i=n.post(`${r}/api/materials_pipeline/${t.material_id}/sync`,t.materialDetail[0]).then(e=>{if(e.data.success)return{success:!0};var t;throw new Error((null===(t=e.data.data)||void 0===t?void 0:t.message)||"保存失败")});l.push(i)}}),Promise.all(l).then(()=>{o&&o.success("事故时间保存成功!"),s&&(s.value=!1),a&&(a.value={})}).catch(e=>{o&&o.error((null===e||void 0===e?void 0:e.message)||"保存失败")})}function p({editingAccidentTimeRef:e,editFormRef:t}){e&&(e.value=!1),t&&(t.value={})}function g({typeStr:e,deliveryManName:t,accidentTable:i,onRowAdded:n}){const r={name:"addBtn"===e&&t||"",id_number:"",liability:"",transport_mode:""};i&&i.push(r),n&&n(r)}function f({row:e,accidentTable:t,accidentImgData:i,apiClient:n,interfaceUrl:r,caseNo:s,editingRowRef:a,editFormRef:o,onConfirm:l,onMessage:c,onSuccess:u,onSaveEdit:h}){l("确定要删除这一行数据吗?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(()=>{const l=t.indexOf(e);if(l>-1&&t.splice(l,1),!e.party_id||i&&0!==i.length)h&&h(e);else{const t=`${r}/api/claims/${s}/parties/${e.party_id}/delete`;n.post(t,e).then(e=>{var t;e.data.success?(c&&c.success("删除成功!"),o&&(o.value={}),u&&u()):c&&c.error((null===(t=e.data.data)||void 0===t?void 0:t.message)||"删除失败")}).catch(e=>{var t;c&&c.error((null===e||void 0===e||null===(t=e.response)||void 0===t||null===(t=t.data)||void 0===t?void 0:t.message)||"删除失败")})}a&&a.value===e&&(a.value=null,o&&(o.value={}))}).catch(()=>{})}function m(e,t,i,n,r){if(t&&t.currentImage)if(i||0!==n&&null!==n){if(i&&i.invoice&&(e.$set(i.invoice,"交款人",r),t.currentImage.handwork_result&&t.currentImage.handwork_result[n]&&t.currentImage.handwork_result[n].invoice&&e.$set(t.currentImage.handwork_result[n].invoice,"交款人",r),t.currentImage.pipeline_result&&Array.isArray(t.currentImage.pipeline_result))){const i=t.currentImage.pipeline_result[n];i&&i.invoice&&e.$set(i.invoice,"交款人",r)}}else t.currentImage.pipeline_result&&"string"!==typeof t.currentImage.pipeline_result||e.$set(t.currentImage,"pipeline_result",{}),e.$set(t.currentImage.pipeline_result,"交款人",r),t.currentImage.handwork_result&&("object"!==typeof t.currentImage.handwork_result||Array.isArray(t.currentImage.handwork_result)||e.$set(t.currentImage.handwork_result,"交款人",r));else console.warn("tagNameReplace: previewState or currentImage is missing")}function v(e,t,i,n,r,s,a,o){var l;if(!t.currentImage)return e.$set(t,"currentImage",{}),void(a&&a.error("数据未初始化,请重新操作"));if(-1!==t.dialogTitle.indexOf("清单")&&t.currentImage.chargeList){let e=!0,i="";for(let n=0;n{if(void 0===e||null===e)return e;try{return JSON.parse(JSON.stringify(e))}catch(t){return e}},h=(e,t)=>{if(e&&"function"===typeof t)return Array.isArray(e)?(e[0]&&"object"===typeof e[0]||(e[0]={}),void t(e[0])):void("object"===typeof e&&t(e))};let d=u(t.currentImage.handwork_result);if(d&&"string"!==typeof d||(d=u(t.currentImage.pipeline_result)),d&&"string"!==typeof d||(d={}),c&&c.includes("清单")&&h(d,e=>{e.charge_list=JSON.parse(JSON.stringify(t.currentImage.chargeList||[]))}),c&&c.includes("认定书")&&h(d,e=>{e.accident_time=i.accident_time}),e.$set(t.currentImage,"handwork_result",d),t.currentImage.handwork_result&&t.currentImage.handwork_result["交款人"]?t.currentImage.materials_owner=t.currentImage.handwork_result["交款人"]:null!==(l=t.currentImage)&&void 0!==l&&null!==(l=l.handwork_result)&&void 0!==l&&null!==(l=l[0])&&void 0!==l&&null!==(l=l.invoice)&&void 0!==l&&l["交款人"]&&(t.currentImage.materials_owner=t.currentImage.handwork_result[0].invoice["交款人"]),!n||!r)return void(a&&a.error("API 配置缺失,无法更新"));const p=t.currentImage.material_id||t.currentImage.id;p?n.post(`${r}/api/materials_pipeline/${p}/sync`,t.currentImage).then(i=>{let n=i.data;if(n.success){const i=n.data;if(Object.assign(t.currentImage,JSON.parse(JSON.stringify(i))),t.previewImages&&Array.isArray(t.previewImages)&&t.previewImages.forEach((e,n)=>{!e||e.id!==p&&e.material_id!==p||Object.assign(t.previewImages[n],JSON.parse(JSON.stringify(i)))}),o){const e=t.dialogTitle||"";let n=null;-1!==e.indexOf("医疗发票")?n=o.medicalInvoiceData:-1!==e.indexOf("无效发票")?n=o.invalidInvoiceData:-1!==e.indexOf("医疗费用清单")||-1!==e.indexOf("清单")?n=o.medicalBillData:-1===e.indexOf("事故责任认定书")&&-1===e.indexOf("认定书")||(n=o.accidentImgData),n&&Array.isArray(n)&&n.forEach(e=>{if(null!==e&&void 0!==e&&e.materialDetail){const t=Array.isArray(e.materialDetail)?e.materialDetail:[e.materialDetail];t.forEach(e=>{!e||e.id!==p&&e.material_id!==p||Object.assign(e,JSON.parse(JSON.stringify(i)))})}})}a&&a.success("更新成功!"),e.$nextTick(()=>{s&&"function"===typeof s&&s()})}else{var r;a&&a.error((null===(r=n.data)||void 0===r?void 0:r.message)||"更新失败!")}}).catch(e=>{var t;a&&a.error((null===e||void 0===e||null===(t=e.response)||void 0===t||null===(t=t.data)||void 0===t?void 0:t.message)||"更新失败,请稍后重试")}):a&&a.error("材料ID缺失,无法更新")}function y(e){return{flattenData:()=>n(e),mergeCells:t=>r(e,t),mergeReportCells:t=>s(e,t),handlePersonalPaySort:t=>a(e,t),handleHighCostDeductionSort:t=>o(e,t),startEdit:(t,i={})=>{var n,r;const s=i.editFormRef||{value:e.editForm},a=i.editingRowRef||{value:e.editingRow},o=i.accidentTime||(null===(n=e.materialState)||void 0===n||null===(n=n.accidentData)||void 0===n?void 0:n.accident_time),c=i.currentImage||(null===(r=e.previewState)||void 0===r?void 0:r.currentImage);l({row:t,editFormRef:s,editingRowRef:a,accidentTime:o,currentImage:c}),i.editFormRef||(e.editForm=s.value),i.editingRowRef||(e.editingRow=a.value)},saveEdit:(t,i,n={})=>{var r,s,a,o,l;const u=n.editForm||e.editForm,h=n.editingRowRef||{value:e.editingRow},d=n.accidentImgData||(null===(r=e.materialState)||void 0===r?void 0:r.accidentImgData)||[],p=n.accidentTable||(null===(s=e.materialState)||void 0===s?void 0:s.accidentTable)||[],g=n.accidentTime||(null===(a=e.materialState)||void 0===a||null===(a=a.accidentData)||void 0===a?void 0:a.accident_time),f=n.apiClient||e.instance||e.axiosInstance,m=n.interfaceUrl||e.interfaceUrl||e.apiInterfaceUrl,v=n.caseNo||(null===(o=e.navForm)||void 0===o?void 0:o.caseNo),y=n.currentImage||(null===(l=e.previewState)||void 0===l?void 0:l.currentImage);c({row:t,index:i,editForm:u,editingRowRef:h,accidentImgData:d,accidentTable:p,accidentTime:g,apiClient:f,interfaceUrl:m,caseNo:v,currentImage:y,materialState:n.materialState||e.materialState,accidentMaterialId:n.accidentMaterialId,onSuccess:n.onSuccess||(()=>e.searchTable&&e.searchTable()),onError:n.onError,onMessage:n.onMessage||{success:t=>{var i;return null===(i=e.$message)||void 0===i?void 0:i.success(t)},error:t=>{var i;return null===(i=e.$message)||void 0===i?void 0:i.error(t)}}}),n.editingRowRef||(e.editingRow=h.value)},cancelEdit:(t,i,n={})=>{var r;const s=n.editingRowRef||{value:e.editingRow},a=n.editFormRef||{value:e.editForm},o=n.accidentTable||(null===(r=e.materialState)||void 0===r?void 0:r.accidentTable)||[];u({row:t,index:i,editingRowRef:s,editFormRef:a,accidentTable:o}),n.editingRowRef||(e.editingRow=s.value),n.editFormRef||(e.editForm=a.value)},startEditAccidentTime:(t={})=>{var i;const n=t.accidentTime||(null===(i=e.materialState)||void 0===i||null===(i=i.accidentData)||void 0===i?void 0:i.accident_time),r=t.editFormRef||{value:e.editForm},s=t.editingAccidentTimeRef||{value:e.editingAccidentTime};h({accidentTime:n,editFormRef:r,editingAccidentTimeRef:s}),t.editFormRef||(e.editForm=r.value),t.editingAccidentTimeRef||(e.editingAccidentTime=s.value)},saveAccidentTime:(t,i={})=>{var n,r,s;const a=t||i.accidentTime||(null===(n=e.editForm)||void 0===n?void 0:n.accident_time),o=i.accidentDataRef||{value:null===(r=e.materialState)||void 0===r?void 0:r.accidentData,set accident_time(e){this.value={...this.value,accident_time:e}}},l=i.accidentImgData||(null===(s=e.materialState)||void 0===s?void 0:s.accidentImgData)||[],c=i.apiClient||e.instance||e.axiosInstance,u=i.interfaceUrl||e.interfaceUrl||e.apiInterfaceUrl,h=i.editingAccidentTimeRef||{value:e.editingAccidentTime},p=i.editFormRef||{value:e.editForm};d({accidentTime:a,accidentDataRef:o,accidentImgData:l,apiClient:c,interfaceUrl:u,editingAccidentTimeRef:h,editFormRef:p,onMessage:i.onMessage||{success:t=>{var i;return null===(i=e.$message)||void 0===i?void 0:i.success(t)},error:t=>{var i;return null===(i=e.$message)||void 0===i?void 0:i.error(t)},warning:t=>{var i;return null===(i=e.$message)||void 0===i?void 0:i.warning(t)}}}),o.value&&!i.accidentDataRef&&(e.materialState=e.materialState||{},e.materialState.accidentData=o.value),i.editingAccidentTimeRef||(e.editingAccidentTime=h.value),i.editFormRef||(e.editForm=p.value)},cancelAccidentTime:(t={})=>{const i=t.editingAccidentTimeRef||{value:e.editingAccidentTime},n=t.editFormRef||{value:e.editForm};p({editingAccidentTimeRef:i,editFormRef:n}),t.editingAccidentTimeRef||(e.editingAccidentTime=i.value),t.editFormRef||(e.editForm=n.value)},addAccidentRow:(t,i={})=>{var n,r;const s=i.deliveryManName||(null===(n=e.insuranceData)||void 0===n?void 0:n.nameOfDeliveryMan),a=i.accidentTable||(null===(r=e.materialState)||void 0===r?void 0:r.accidentTable)||[];g({typeStr:t,deliveryManName:s,accidentTable:a,onRowAdded:i.onRowAdded||(t=>{e.$nextTick&&e.$nextTick(()=>{var i;const n={value:e.editForm},r={value:e.editingRow};l({row:t,editFormRef:n,editingRowRef:r,accidentTime:null===(i=e.materialState)||void 0===i||null===(i=i.accidentData)||void 0===i?void 0:i.accident_time}),e.editForm=n.value,e.editingRow=r.value})})})},deleteRow:(t,i={})=>{var n,r,s;const a=i.accidentTable||(null===(n=e.materialState)||void 0===n?void 0:n.accidentTable)||[],o=i.accidentImgData||(null===(r=e.materialState)||void 0===r?void 0:r.accidentImgData)||[],l=i.apiClient||e.instance||e.axiosInstance,u=i.interfaceUrl||e.interfaceUrl||e.apiInterfaceUrl,h=i.caseNo||(null===(s=e.navForm)||void 0===s?void 0:s.caseNo),d=i.editingRowRef||{value:e.editingRow},p=i.editFormRef||{value:e.editForm};f({row:t,accidentTable:a,accidentImgData:o,apiClient:l,interfaceUrl:u,caseNo:h,editingRowRef:d,editFormRef:p,onConfirm:i.onConfirm||((t,i,n)=>e.$confirm(t,i,n)),onMessage:i.onMessage||{success:t=>{var i;return null===(i=e.$message)||void 0===i?void 0:i.success(t)},error:t=>{var i;return null===(i=e.$message)||void 0===i?void 0:i.error(t)}},onSuccess:i.onSuccess||(()=>e.searchTable&&e.searchTable()),onSaveEdit:i.onSaveEdit||(t=>{var i;const n=e.editForm,r=a.indexOf(t);c({row:t,index:r,editForm:n,editingRowRef:d,accidentImgData:o,accidentTable:a,accidentTime:null===(i=e.materialState)||void 0===i||null===(i=i.accidentData)||void 0===i?void 0:i.accident_time,apiClient:l,interfaceUrl:u,caseNo:h,onSuccess:()=>e.searchTable&&e.searchTable(),onMessage:{success:t=>{var i;return null===(i=e.$message)||void 0===i?void 0:i.success(t)},error:t=>{var i;return null===(i=e.$message)||void 0===i?void 0:i.error(t)}}}),e.editingRow=d.value})}),i.editingRowRef||(e.editingRow=d.value),i.editFormRef||(e.editForm=p.value)},editAccidentRow:(t,i={})=>{var n,r;const s=i.editFormRef||{value:e.editForm},a=i.editingRowRef||{value:e.editingRow},o=i.accidentTime||(null===(n=e.materialState)||void 0===n||null===(n=n.accidentData)||void 0===n?void 0:n.accident_time),c=i.currentImage||(null===(r=e.previewState)||void 0===r?void 0:r.currentImage);l({row:t,editFormRef:s,editingRowRef:a,accidentTime:o,currentImage:c}),i.editFormRef||(e.editForm=s.value),i.editingRowRef||(e.editingRow=a.value)},tagNameReplace:(t,i,n)=>m(e,e.previewState,t,i,n),updateCategory:()=>v(e,e.previewState,e.editForm,e.instance||e.axiosInstance,e.interfaceUrl||e.apiInterfaceUrl,e.onUpdateSuccess,{success:t=>{var i;return null===(i=e.$message)||void 0===i?void 0:i.success(t)},error:t=>{var i;return null===(i=e.$message)||void 0===i?void 0:i.error(t)}},e.materialState)}}},"04f7":function(e,t,i){"use strict";var n=function(){var e=this,t=e._self._c;return t("el-dialog",{staticClass:"previewDialog",attrs:{visible:e.internalDialogVisible,width:"80%","modal-append-to-body":!1,title:e.dialogTitle,"close-on-click-modal":!0},on:{"update:visible":function(t){e.internalDialogVisible=t},close:e.handleClose}},[t("div",{staticClass:"previewContent"},[t("div",{staticClass:"content-top",style:{height:e.effectiveHasBottomData?"80%":"100%"}},[t("left-image-list",{attrs:{"has-left-image":e.hasLeftImage,"active-img-index":e.activeImgIndex,"other-materials-map":e.otherMaterialsMap},on:{"switch-left-img":e.handleSwitchLeftImg,"image-error":(...t)=>e.$emit("image-error",...t)}}),t("div",{ref:"mainContent",staticClass:"main-content",class:e.mainContentModeClasses,style:e.mainContentStyle},[t("center-image-display",{ref:"previewImgDeal",attrs:{"current-image":e.currentImage,"preview-images":e.previewImages,"current-index":e.currentIndex},on:{"prev-image":function(t){return e.$emit("prev-image")},"next-image":function(t){return e.$emit("next-image")},"check-click":function(t){return e.$emit("check-click",t)},"image-error":(...t)=>e.$emit("image-error",...t)}}),t("div",{staticClass:"panel-resizer",class:{"is-resizing":e.isResizingRightPanel},attrs:{title:"拖拽调整右侧宽度"},on:{mousedown:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"left",37,t.key,["Left","ArrowLeft"])||"button"in t&&0!==t.button?null:(t.preventDefault(),e.handleStartResize.apply(null,arguments))},dblclick:function(t){return t.stopPropagation(),e.handleResetPanelWidth.apply(null,arguments)}}},[t("i",{staticClass:"el-icon-d-caret"})]),t("material-info-panel",{ref:"rightPanel",attrs:{"current-image":e.currentImage,"accident-table":e.accidentTable,"accident-data":e.accidentData,"liability-options":e.liabilityOptions,"material-type-options":e.materialTypeOptions,"can-show-compare-button":e.canShowCompareButton},on:{"open-image-compare":function(t){return e.$emit("open-image-compare")},"add-invoice-item":function(t){return e.$emit("add-invoice-item")},"delete-invoice-item":function(t){return e.$emit("delete-invoice-item",t)},"tag-name-replace":(t,i,n)=>e.$emit("tag-name-replace",t,i,n),"invoice-no-mouse-enter":function(t){return e.$emit("invoice-no-mouse-enter",t)},"highlight-leave":function(t){return e.$emit("highlight-leave")},"personal-payment-input":(t,i)=>e.$emit("personal-payment-input",t,i),"other-payment-input":(t,i)=>e.$emit("other-payment-input",t,i),"examination-fee-update":function(t){return e.$emit("examination-fee-update",t)},"save-accident-time":function(t){return e.$emit("save-accident-time",t)},"save-edit":function(t){return e.$emit("save-edit",t)},"cancel-edit":function(t){return e.$emit("cancel-edit",t)},"delete-row":function(t){return e.$emit("delete-row",t)},"add-accident-row":function(t){return e.$emit("add-accident-row",t)},"update-charge":function(t){return e.$emit("update-charge")},"delete-charge":function(t){return e.$emit("delete-charge",t)},"charge-field-hover":(t,i)=>e.$emit("charge-field-hover",t,i),"charge-field-leave":function(t){return e.$emit("charge-field-leave")},"charge-amount-paste":function(t){return e.$emit("charge-amount-paste",t)},"update-category":function(t){return e.$emit("update-category")},"materials-type-change":e.handleMaterialsTypeChangeFromPanel}})],1)],1),t("bottom-preview-list",{attrs:{"preview-images":e.previewImages,"current-index":e.currentIndex,"has-bottom-data":e.hasBottomData},on:{"bottom-prev":function(t){return e.$emit("bottom-prev")},"bottom-next":function(t){return e.$emit("bottom-next")},"select-image":e.handleSelectImage,"check-click":function(t){return e.$emit("check-click",t)},"image-error":(...t)=>e.$emit("image-error",...t)}})],1)])},r=[],s=(i("8f26"),i("356e"),function(){var e,t=this,i=t._self._c;return i("div",{ref:"rightPanel",class:t.rightBoxClasses},[i("div",{staticClass:"right-panel-slot-wrapper"},[i("div",{staticClass:"right"},[t.effectiveCurrentImage&&(t.effectiveCurrentImage.id||t.effectiveCurrentImage.material_id)?[i("div",{staticClass:"img-info img-info__header"},[i("el-row",{staticClass:"rosterInfo"},[t._v(" id: "+t._s(t.effectiveCurrentImage.id||t.effectiveCurrentImage.material_id))]),i("div",{staticClass:"header-actions"},[t.shouldShowCompareButton?i("el-button",{staticClass:"compare-btn",attrs:{type:"primary",size:"mini",icon:"el-icon-view"},on:{click:t.handleOpenImageCompare}},[t._v("比对图片")]):t._e()],1)],1),i("div",{staticClass:"img-info"},[i("div",{staticClass:"rosterInfo",staticStyle:{"botder-bottom":"0"}},[i("span",{staticClass:"infoLabel"},[t._v("材料分类:")]),i("el-select",{staticClass:"full-width-select",attrs:{placeholder:"请选择分类",size:"mini",filterable:""},on:{change:t.handleMaterialsTypeChange},model:{value:t.effectiveCurrentImage.materials_type,callback:function(e){t.$set(t.effectiveCurrentImage,"materials_type",e)},expression:"effectiveCurrentImage.materials_type"}},t._l(t.filteredMaterialTypeOptions,(function(e){return i("el-option",{key:e.value,attrs:{label:e.label,value:e.label}})})),1)],1)]),t.effectiveCurrentImage.materials_type&&-1!=t.effectiveCurrentImage.materials_type.indexOf("清单")&&"病人费用清单"!==t.effectiveCurrentImage.materials_type?i("div",{staticClass:"img-info"},[i("div",{staticClass:"rosterInfo clearfix"},[i("div",{staticClass:"infoMaterialsType fl"},[t._v(t._s(t.effectiveCurrentImage.materials_type))])])]):t._e(),t.effectiveCurrentImage.materials_type&&-1!=t.effectiveCurrentImage.materials_type.indexOf("清单")?i("div",{staticClass:"img-info"},[i("div",{staticClass:"rosterInfo clearfix"},[i("div",{staticClass:"infoContent fl"},[i("span",[t._v("是否有效:")]),i("el-switch",{staticClass:"switchEffective",model:{value:t.effectiveCurrentImage.effective_flag,callback:function(e){t.$set(t.effectiveCurrentImage,"effective_flag",e)},expression:"effectiveCurrentImage.effective_flag"}})],1)])]):t._e(),t.effectiveCurrentImage.materials_type&&-1!=t.effectiveCurrentImage.materials_type.indexOf("清单")?i("div",{staticClass:"img-info"},[i("div",{staticClass:"rosterInfo payee-section"},[i("div",{staticClass:"payee-label-row"},[i("div",{staticClass:"infoLabel"},[t._v("交款人:")]),i("el-input",{staticClass:"payee-input",attrs:{value:t.effectiveCurrentImage.pipeline_result&&t.effectiveCurrentImage.pipeline_result["交款人"]?t.effectiveCurrentImage.pipeline_result["交款人"]:"",placeholder:"请输入或点击下方标签选择",size:"mini",clearable:""},on:{input:t.handlePayerInput}})],1),t.effectiveCurrentImage.pipeline_result&&t.effectiveCurrentImage.pipeline_result["交款人"]&&!t.effectiveAccidentTable.some(e=>e.name===t.effectiveCurrentImage.pipeline_result["交款人"])?i("p",{staticClass:"invoiceError"},[t._v("请注意交款人异常!")]):t._e()]),t.accidentTable&&t.accidentTable.length>0?i("div",{staticClass:"payee-tags-section"},[i("div",{staticClass:"payee-tags-label"},[t._v("可选交款人:")]),i("div",{staticClass:"tag-box payee-tag-box"},t._l(t.accidentTable||[],(function(e,n){return i("el-tag",{key:n,staticClass:"payee-tag",class:{"tag-active":t.effectiveCurrentImage.pipeline_result&&t.effectiveCurrentImage.pipeline_result["交款人"]===e.name},attrs:{size:"mini"},on:{click:function(i){return t.handleTagClick(e.name)}}},[t._v(t._s(e.name))])})),1)]):t._e()]):t._e(),"无效发票"==t.effectiveCurrentImage.materials_type||"医疗发票"==t.effectiveCurrentImage.materials_type||t.effectiveCurrentImage.materials_type&&-1!=t.effectiveCurrentImage.materials_type.indexOf("发票")?i("invoice-editor",{attrs:{"invoice-list":t.effectiveCurrentImage.pipeline_result||[],"accident-table":t.accidentTable,"invalid-reason":null===(e=t.currentImage)||void 0===e?void 0:e.reason},on:{"add-invoice":function(e){return t.$emit("add-invoice-item")},"delete-invoice":function(e){return t.$emit("delete-invoice-item",e)},"tag-replace":(e,i,n)=>t.$emit("tag-name-replace",e,i,n),"field-hover":t.handleInvoiceFieldHover,"field-leave":t.handleHighlightLeave,"personal-payment-input":(e,i)=>t.$emit("personal-payment-input",e,i),"other-payment-input":(e,i)=>t.$emit("other-payment-input",e,i),"examination-fee-update":(e,i)=>t.$emit("examination-fee-update",e,i)}}):t._e(),t.effectiveCurrentImage.materials_type&&-1!=t.effectiveCurrentImage.materials_type.indexOf("认定书")?i("accident-detail-editor",{attrs:{"accident-data":t.effectiveAccidentData,"accident-table":t.effectiveAccidentTable,"liability-options":t.effectiveLiabilityOptions},on:{"save-accident-time":function(e){return t.$emit("save-accident-time",e)},"save-edit":t.handleAccidentSaveEdit,"cancel-edit":t.handleAccidentCancelEdit,"delete-row":function(e){return t.$emit("delete-row",e)},"add-accident-row":function(e){return t.$emit("add-accident-row",e)}}}):t._e(),t.effectiveCurrentImage.materials_type&&-1!=t.effectiveCurrentImage.materials_type.indexOf("清单")?i("charge-list-editor",{key:`charge-list-${t.effectiveCurrentImage.id||t.effectiveCurrentImage._id||t.effectiveCurrentImage.material_id||"default"}-${t.effectiveCurrentImage.materials_type||""}`,ref:"chargeListEditor",attrs:{"charge-list":t.effectiveChargeList},on:{"add-charge":function(e){return t.$emit("update-charge")},"delete-charge":function(e){return t.$emit("delete-charge",e)},"field-hover":t.handleChargeFieldHover,"field-leave":t.handleChargeFieldLeave,"amount-paste":(e,i)=>t.$emit("charge-amount-paste",e,i)}}):t._e()]:[i("div",{staticClass:"empty-info"},[t._v("暂无图片信息")])],i("div",{staticClass:"category-edit"},[i("el-button",{staticClass:"update-btn",attrs:{type:"primary",size:"small",icon:"el-icon-check"},on:{click:function(e){return t.$emit("update-category")}}},[t._v("更 新")])],1)],2)])])}),a=[],o=(i("666b"),i("963e"),function(){var e=this,t=e._self._c;return t("div",{staticClass:"invoice-editor"},[t("div",{staticClass:"invoice-add-header"},[t("el-button",{staticClass:"add-invoice-btn",attrs:{type:"primary",size:"mini",icon:"el-icon-plus"},on:{click:e.handleAddInvoice}},[e._v(" 添加发票信息 ")]),e.effectiveInvoiceList&&e.effectiveInvoiceList.length>0?t("span",{staticClass:"invoice-count"},[e._v(" 共 "+e._s(e.effectiveInvoiceList.length)+" 张发票 ")]):e._e()],1),e.effectiveInvoiceList&&e.effectiveInvoiceList.length>0?t("div",e._l(e.effectiveInvoiceList,(function(i,n){var r,s,a;return t("div",{key:i.id||n,staticClass:"invoice-item"},[t("div",{staticClass:"invoice-header"},[t("span",{staticClass:"invoice-title"},[e._v("发票信息 "+e._s(n+1))]),t("div",{staticClass:"invoice-header-actions"},[t("i",{staticClass:"invoiceDel el-icon-delete",attrs:{title:"删除此发票"},on:{click:function(t){return e.handleDeleteInvoice(n)}}})])]),t("div",{staticClass:"invoice-section invoice-basic-info"},[e._m(0,!0),t("el-row",{staticClass:"rosterInfo",nativeOn:{mouseenter:function(t){return e.handleFieldHover(t,"发票号",n)},mouseleave:function(t){return e.handleFieldLeave.apply(null,arguments)}}},[t("el-col",{attrs:{span:9}},[e._v("发票号:")]),t("el-col",{attrs:{span:15}},[t("el-input",{attrs:{value:i.invoice&&i.invoice["票据号码"]?i.invoice["票据号码"]:"",placeholder:"",size:"mini"},on:{input:function(t){return e.handleInvoiceFieldInput(i,"票据号码",t)}}}),t("p",{staticClass:"invoiceError"},[e._v(e._s(i.invoice&&i.invoice["票据号码"]&&i.invoice["票据号码"].length&&![10,8,20].includes(i.invoice["票据号码"].length)?"请注意发票号长度异常!":""))])],1)],1),t("el-row",{staticClass:"rosterInfo payee-section",nativeOn:{mouseenter:function(t){return e.handleFieldHover(t,"交款人",n)},mouseleave:function(t){return e.handleFieldLeave.apply(null,arguments)}}},[t("el-col",{attrs:{span:9}},[e._v("交款人:")]),t("el-col",{attrs:{span:15}},[t("el-input",{attrs:{value:i.invoice&&i.invoice["交款人"]?i.invoice["交款人"]:"",placeholder:"请输入或点击下方标签选择",size:"mini"},on:{input:function(t){return e.handleInvoiceFieldInput(i,"交款人",t)}}}),i.invoice&&i.invoice["交款人"]&&!e.accidentTable.some(e=>e.name===i.invoice["交款人"])?t("p",{staticClass:"invoiceError"},[e._v("请注意交款人异常!")]):e._e()],1)],1),e.accidentTable&&e.accidentTable.length>0?t("div",{staticClass:"payee-tags-section"},[t("div",{staticClass:"payee-tags-label"},[e._v("可选交款人:")]),t("div",{staticClass:"tag-box payee-tag-box"},e._l(e.accidentTable,(function(r,s){return t("el-tag",{key:s,staticClass:"payee-tag",class:{"tag-active":i.invoice&&i.invoice["交款人"]===r.name},attrs:{size:"mini"},on:{click:function(t){return e.handleTagReplace(i,n,r.name)}}},[e._v(e._s(r.name))])})),1)]):e._e()],1),t("div",{staticClass:"invoice-section invoice-payment-info"},[e._m(1,!0),t("el-row",{staticClass:"rosterInfo",nativeOn:{mouseenter:function(t){return e.handleFieldHover(t,"总金额",n)},mouseleave:function(t){return e.handleFieldLeave.apply(null,arguments)}}},[t("el-col",{attrs:{span:9}},[e._v("支付金额:")]),t("el-col",{attrs:{span:15}},[t("el-input",{staticClass:"editInput",attrs:{value:i.invoice&&i.invoice["总金额"]?i.invoice["总金额"]:"",placeholder:"",size:"mini"},on:{input:function(t){return e.handleInvoiceFieldInput(i,"总金额",t)}}},[t("template",{slot:"append"},[e._v("元")])],2)],1)],1),t("el-row",{staticClass:"rosterInfo",nativeOn:{mouseenter:function(t){return e.handleFieldHover(t,"个人支付总额",n)},mouseleave:function(t){return e.handleFieldLeave.apply(null,arguments)}}},[t("el-col",{attrs:{span:9}},[e._v("个人支付:")]),t("el-col",{attrs:{span:15}},[t("el-input",{staticClass:"editInput",attrs:{value:null!==(r=null===(s=i.analysis_result)||void 0===s||null===(s=s[0])||void 0===s?void 0:s["个人支付总额"])&&void 0!==r?r:"",placeholder:"",size:"mini"},on:{input:function(t){return e.handlePersonalPaymentInput(i,t)}}},[t("template",{slot:"append"},[e._v("元")])],2)],1)],1),t("el-row",{staticClass:"rosterInfo",nativeOn:{mouseenter:function(t){return e.handleFieldHover(t,"其它支付总额",n)},mouseleave:function(t){return e.handleFieldLeave.apply(null,arguments)}}},[t("el-col",{attrs:{span:9}},[e._v("其它支付:")]),t("el-col",{attrs:{span:15}},[t("el-input",{staticClass:"editInput",attrs:{value:i.analysis_result&&i.analysis_result[0]&&i.analysis_result[0]["其它支付总额"]||"",placeholder:"",size:"mini"},on:{input:function(t){return e.handleOtherPaymentInput(i,t)}}},[t("template",{slot:"append"},[e._v("元")])],2)],1)],1),t("el-row",{staticClass:"rosterInfo",nativeOn:{mouseenter:function(t){return e.handleFieldHover(t,"无效原因",n)},mouseleave:function(t){return e.handleFieldLeave.apply(null,arguments)}}},[t("el-col",{attrs:{span:9}},[e._v("无效原因:")]),t("el-col",{attrs:{span:15}},[e._v(e._s(null!==(a=e.invalidReason)&&void 0!==a?a:"--")+" ")])],1)],1),t("examination-fee-editor",{attrs:{"invoice-item":i,"invoice-index":n},on:{update:e.handleExaminationFeeUpdate}})],1)})),0):e._e()])}),l=[function(){var e=this,t=e._self._c;return t("div",{staticClass:"section-title-bar"},[t("span",{staticClass:"section-title"},[e._v("基本信息")])])},function(){var e=this,t=e._self._c;return t("div",{staticClass:"section-title-bar"},[t("span",{staticClass:"section-title"},[e._v("支付信息")])])}],c=function(){var e=this,t=e._self._c;return e.invoiceItem&&e.invoiceItem.invoice?t("div",{staticClass:"examination-fee-editor"},[t("div",{staticClass:"section-title-bar"},[t("span",{staticClass:"section-title"},[e._v("明细项")]),t("el-button",{staticClass:"add-fee-btn",attrs:{type:"text",size:"mini"},on:{click:e.handleAddFeeItem}},[t("i",{staticClass:"el-icon-plus"}),e._v(" 添加 ")])],1),e.examinationFeeItems.length>0?t("div",[t("el-tabs",{staticClass:"fee-tabs",attrs:{type:"card"},on:{"tab-remove":e.handleTabRemove},model:{value:e.activeTab,callback:function(t){e.activeTab=t},expression:"activeTab"}},e._l(e.examinationFeeItems,(function(i,n){return t("el-tab-pane",{key:i.id||`fee-${e.invoiceIndex}-${n}`,attrs:{label:"费用 "+(n+1),name:String(n),closable:""}},[t("div",{staticClass:"examination-fee-item"},[t("el-row",{staticClass:"rosterInfo"},[t("el-col",{attrs:{span:9}},[e._v("项目名称:")]),t("el-col",{attrs:{span:15}},[t("el-input",{attrs:{placeholder:"请输入项目名称",size:"mini"},on:{input:e.handleUpdate},model:{value:i.project_name,callback:function(t){e.$set(i,"project_name",t)},expression:"feeItem.project_name"}})],1)],1),t("el-row",{staticClass:"rosterInfo"},[t("el-col",{attrs:{span:9}},[e._v("金额:")]),t("el-col",{attrs:{span:15}},[t("el-input",{attrs:{placeholder:"请输入金额",size:"mini"},on:{input:e.handleUpdate},model:{value:i.amount,callback:function(t){e.$set(i,"amount",t)},expression:"feeItem.amount"}},[t("template",{slot:"append"},[e._v("元")])],2)],1)],1)],1)])})),1)],1):t("div",{staticClass:"no-fee-data"},[t("span",{staticClass:"no-data-text"},[e._v("暂无检查费项")])])]):e._e()},u=[],h=(i("b138"),{name:"ExaminationFeeEditor",props:{invoiceItem:{type:Object,required:!0},invoiceIndex:{type:Number,required:!0}},data(){return{activeTab:"0"}},computed:{examinationFeeItems(){return this.invoiceItem&&this.invoiceItem.invoice?(this.invoiceItem.invoice.items_detail||this.$set(this.invoiceItem.invoice,"items_detail",{}),this.invoiceItem.invoice.items_detail.items||this.$set(this.invoiceItem.invoice.items_detail,"items",[]),this.invoiceItem.invoice.items_detail.items||[]):[]}},methods:{handleAddFeeItem(){this.invoiceItem.invoice||this.$set(this.invoiceItem,"invoice",{}),this.invoiceItem.invoice.items_detail||this.$set(this.invoiceItem.invoice,"items_detail",{}),this.invoiceItem.invoice.items_detail.items||this.$set(this.invoiceItem.invoice.items_detail,"items",[]);const e={project_name:"检查费",amount:"",id:`fee-${Date.now()}-${Math.random().toString(36).substr(2,9)}`};this.invoiceItem.invoice.items_detail.items.push(e),this.$emit("update",this.invoiceItem,this.invoiceIndex),this.$nextTick(()=>{this.activeTab=String(this.examinationFeeItems.length-1)})},handleDeleteFeeItem(e){if(!this.invoiceItem.invoice||!this.invoiceItem.invoice.items_detail||!this.invoiceItem.invoice.items_detail.items)return;const t=this.examinationFeeItems;if(e>=0&&e=0&&(this.invoiceItem.invoice.items_detail.items.splice(n,1),this.$set(this.invoiceItem.invoice.items_detail,"items",[...this.invoiceItem.invoice.items_detail.items]),this.$emit("update",this.invoiceItem,this.invoiceIndex))}},handleTabRemove(e){const t=Number(e);Number.isNaN(t)||this.handleDeleteFeeItem(t)},handleUpdate(){this.$emit("update",this.invoiceItem,this.invoiceIndex)}},watch:{examinationFeeItems:{immediate:!0,handler(e){if(!e||0===e.length)return void(this.activeTab="0");const t=Number(this.activeTab);(Number.isNaN(t)||t>=e.length)&&(this.activeTab="0")}}}}),d=h,p=(i("4f93"),i("1805")),g=Object(p["a"])(d,c,u,!1,null,"24591fb0",null),f=g.exports,m={name:"InvoiceEditor",components:{ExaminationFeeEditor:f},inject:{injectedMedicalService:{from:"medicalService",default:null},injectedBusinessLogic:{from:"businessLogic",default:null},injectedUiHandlers:{from:"uiHandlers",default:null},injectedFormAndTableManagement:{from:"formAndTableManagement",default:null},injectedMaterialState:{from:"materialState",default:null},injectedPreviewState:{from:"previewState",default:null},injectedRefreshData:{from:"refreshData",default:null}},props:{invoiceList:{type:Array,default:()=>[]},accidentTable:{type:Array,default:()=>[]},invalidReason:{type:String,default:""}},computed:{medicalService(){return this.injectedMedicalService},businessLogic(){return this.injectedBusinessLogic},uiHandlers(){return this.injectedUiHandlers},formAndTableManagement(){return this.injectedFormAndTableManagement},effectiveInvoiceList(){return Array.isArray(this.invoiceList)?this.invoiceList:[]}},methods:{handleAddInvoice(){if(this.medicalService&&this.medicalService.addInvoice)try{this.medicalService.addInvoice()}catch(e){console.warn("addInvoice failed, falling back to event:",e),this.$emit("add-invoice")}else this.uiHandlers&&this.uiHandlers.handleAddInvoiceItem?this.uiHandlers.handleAddInvoiceItem():this.$emit("add-invoice")},handleDeleteInvoice(e){if(this.medicalService&&this.medicalService.deleteInvoice)try{this.medicalService.deleteInvoice(e)}catch(t){console.warn("deleteInvoice failed, falling back to event:",t),this.$emit("delete-invoice",e)}else this.uiHandlers&&this.uiHandlers.handleDeleteInvoiceItem?this.uiHandlers.handleDeleteInvoiceItem(e):this.$emit("delete-invoice",e)},handleTagReplace(e,t,i){if(e)if(e.invoice||this.$set(e,"invoice",{}),this.$set(e.invoice,"交款人",i),this.$emit("tag-replace",e,t,i),this.medicalService&&this.medicalService.replaceTag)try{this.medicalService.replaceTag(e,t,i)}catch(n){console.warn("replaceTag failed:",n)}else if(this.formAndTableManagement&&this.formAndTableManagement.tagNameReplace)try{this.formAndTableManagement.tagNameReplace(e,t,i)}catch(n){console.warn("tagNameReplace failed:",n)}},handleInvoiceFieldInput(e,t,i){if(e&&(e.invoice||this.$set(e,"invoice",{}),this.$set(e.invoice,t,i),"交款人"===t)){const t=this.effectiveInvoiceList.indexOf(e);this.$emit("tag-replace",e,t,i)}},handleFieldHover(e,t,i){if(this.medicalService&&this.medicalService.highlightField)try{var n;const r=null===(n=this.injectedPreviewState)||void 0===n?void 0:n.currentImage;r&&this.medicalService.highlightField(e,r,i,t)}catch(s){console.warn("highlightField failed, falling back to event:",s),this.$emit("field-hover",e,t,i)}else if(this.businessLogic&&this.businessLogic.handleInvoiceNoMouseEnter){var r;const n=null===(r=this.injectedPreviewState)||void 0===r?void 0:r.currentImage;n&&this.businessLogic.handleInvoiceNoMouseEnter(e,n,i,t)}else this.$emit("field-hover",e,t,i)},handleFieldLeave(){if(this.medicalService&&this.medicalService.clearHighlight)try{this.medicalService.clearHighlight()}catch(e){console.warn("clearHighlight failed, falling back to event:",e),this.$emit("field-leave")}else this.businessLogic&&this.businessLogic.handleHighlightLeave?this.businessLogic.handleHighlightLeave():this.$emit("field-leave")},handlePersonalPaymentInput(e,t){if(e)if(e.analysis_result||this.$set(e,"analysis_result",[]),e.analysis_result[0]||this.$set(e.analysis_result,0,{}),this.$set(e.analysis_result[0],"个人支付总额",t),this.medicalService&&this.medicalService.updatePersonalPayment)try{this.medicalService.updatePersonalPayment(e,t)}catch(i){console.warn("updatePersonalPayment failed, falling back to event:",i),this.$emit("personal-payment-input",e,t)}else this.uiHandlers&&this.uiHandlers.handlePersonalPaymentInput?this.uiHandlers.handlePersonalPaymentInput(e,t):this.$emit("personal-payment-input",e,t)},handleOtherPaymentInput(e,t){if(e)if(e.analysis_result||this.$set(e,"analysis_result",[]),e.analysis_result[0]||this.$set(e.analysis_result,0,{}),this.$set(e.analysis_result[0],"其它支付总额",t),this.medicalService&&this.medicalService.updateOtherPayment)try{this.medicalService.updateOtherPayment(e,t)}catch(i){console.warn("updateOtherPayment failed, falling back to event:",i),this.$emit("other-payment-input",e,t)}else this.uiHandlers&&this.uiHandlers.handleOtherPaymentInput?this.uiHandlers.handleOtherPaymentInput(e,t):this.$emit("other-payment-input",e,t)},handleExaminationFeeUpdate(e,t){if(this.medicalService&&this.medicalService.updateExaminationFee)try{const i=this.injectedRefreshData||(()=>{});this.medicalService.updateExaminationFee(e,t,this.injectedPreviewState,this.injectedMaterialState,i)}catch(i){console.warn("updateExaminationFee failed, falling back to event:",i),this.$emit("examination-fee-update",e,t)}else if(this.uiHandlers&&this.uiHandlers.handleExaminationFeeUpdate){const i=this.injectedRefreshData||(()=>{});this.uiHandlers.handleExaminationFeeUpdate(e,t,this.injectedPreviewState,this.injectedMaterialState,i)}else this.$emit("examination-fee-update",e,t)}}},v=m,y=(i("429c"),Object(p["a"])(v,o,l,!1,null,"2b4173f6",null)),b=y.exports,C=function(){var e=this,t=e._self._c;return t("div",{staticClass:"charge-list-editor"},[t("div",{staticClass:"section-title-bar"},[t("span",{staticClass:"section-title"},[e._v("高耗材清单")]),t("el-button",{staticClass:"add-charge-inline-btn",attrs:{type:"text",size:"mini",icon:"el-icon-plus"},on:{click:e.handleAddCharge}},[e._v("添加耗材项")])],1),t("p",{staticClass:"hot"},[e._v("*高耗材清单,只需要填写金额大于等于1000的项目")]),e.filteredChargeList&&e.filteredChargeList.length>0?t("div",{staticClass:"chargeListBox"},e._l(e.filteredChargeList,(function(i,n){return t("el-row",{key:"charge-"+(i.id||i._id||"item-"+(void 0!==i._originalIndex?i._originalIndex:n)),staticClass:"rosterInfo roster-item",attrs:{type:"flex",align:"middle"}},[t("el-col",{staticClass:"chargeIndex",staticStyle:{display:"flex","align-items":"center","justify-content":"center"},attrs:{span:2}},[e._v(e._s(n+1))]),t("el-col",{staticClass:"charge-item-col",attrs:{span:13}},[t("el-input",{attrs:{placeholder:"请输入耗材项",size:"mini"},nativeOn:{mouseenter:function(t){return e.handleFieldHover("project",void 0!==i._originalIndex?i._originalIndex:n)},mouseleave:function(t){return e.handleFieldLeave.apply(null,arguments)}},model:{value:i.ProjectName,callback:function(t){e.$set(i,"ProjectName",t)},expression:"item.ProjectName"}})],1),t("el-col",{staticClass:"chargeAmount charge-amount-col",attrs:{span:7}},[t("el-input",{attrs:{placeholder:"请输入金额",size:"mini"},nativeOn:{paste:function(t){return e.handleAmountPaste(t,i)},mouseenter:function(t){return e.handleFieldHover("amount",void 0!==i._originalIndex?i._originalIndex:n)},mouseleave:function(t){return e.handleFieldLeave.apply(null,arguments)}},model:{value:i.Amount,callback:function(t){e.$set(i,"Amount",t)},expression:"item.Amount"}},[t("template",{slot:"append"},[e._v("元")])],2)],1),t("el-col",{staticClass:"deleteIcon delete-icon-col",staticStyle:{display:"flex","align-items":"center","justify-content":"center"},attrs:{span:2}},[t("i",{staticClass:"el-icon-delete delete-icon",attrs:{title:"删除"},on:{click:function(t){return e.handleDeleteCharge(i)}}})])],1)})),1):e._e(),t("p",{directives:[{name:"show",rawName:"v-show",value:!e.filteredChargeList||0===e.filteredChargeList.length,expression:"!filteredChargeList || filteredChargeList.length === 0"}],staticClass:"noData empty-data-tip"},[e._v("暂无数据")])])},w=[],x={name:"ChargeListEditor",inject:{injectedMedicalService:{from:"medicalService",default:null},injectedUiHandlers:{from:"uiHandlers",default:null}},props:{chargeList:{type:Array,default:()=>[]}},watch:{chargeList:{handler(e,t){if(e!==t)if(!t&&Array.isArray(e)&&e.length>0)this.$nextTick(()=>{e.forEach((e,t)=>{if(e){if(void 0===e.amountShow){const t=parseFloat(e.Amount),i=!isNaN(t)&&t>=1e3&&("材料与耗材费用"===e.Category||!e.Category);this.$set(e,"amountShow",i)}e._originalIndex!==t&&this.$set(e,"_originalIndex",t)}})});else{if(t&&e&&t.length===e.length){let i=!0;for(let n=0;n0&&this.$nextTick(()=>{e.forEach((e,t)=>{if(e){if(void 0===e.amountShow){const t=parseFloat(e.Amount),i=!isNaN(t)&&t>=1e3&&("材料与耗材费用"===e.Category||!e.Category);this.$set(e,"amountShow",i)}e._originalIndex!==t&&this.$set(e,"_originalIndex",t)}})})}},deep:!0,immediate:!1}},mounted(){this.initChargeListProperties()},methods:{initChargeListProperties(){Array.isArray(this.chargeList)&&this.chargeList.length>0&&this.$nextTick(()=>{this.chargeList.forEach((e,t)=>{if(e){if(void 0===e.amountShow){const t=parseFloat(e.Amount),i=!isNaN(t)&&t>=1e3&&("材料与耗材费用"===e.Category||!e.Category);this.$set(e,"amountShow",i)}e._originalIndex!==t&&this.$set(e,"_originalIndex",t)}})})},handleAddCharge(){if(this.medicalService&&this.medicalService.addCharge)try{this.medicalService.addCharge()}catch(e){console.warn("addCharge failed, falling back to event:",e),this.$emit("add-charge")}else this.uiHandlers&&this.uiHandlers.updateCharge?this.uiHandlers.updateCharge():this.$emit("add-charge")},handleDeleteCharge(e){const t=this.chargeList||[],i=t.findIndex(t=>e.id&&t.id?e.id===t.id:e._id&&t._id?e._id===t._id:t===e);if(-1!==i)if(this.medicalService&&this.medicalService.deleteCharge)try{this.medicalService.deleteCharge(i)}catch(n){console.warn("deleteCharge failed, falling back to event:",n),this.$emit("delete-charge",i)}else this.uiHandlers&&this.uiHandlers.deleteCharge?this.uiHandlers.deleteCharge(i):this.$emit("delete-charge",i);else console.warn("handleDeleteCharge: 未找到要删除的项",e)},handleFieldHover(e,t){this.$emit("field-hover",e,t)},handleFieldLeave(){this.$emit("field-leave")},handleAmountPaste(e,t){this.$emit("amount-paste",e,t)}},computed:{getEffectiveChargeList(){return Array.isArray(this.chargeList)?this.chargeList:[]},hasChargeListData(){const e=this.getEffectiveChargeList;return Array.isArray(e)&&e.length>0},filteredChargeList(){const e=this.getEffectiveChargeList;if(!Array.isArray(e)||0===e.length)return[];const t=[];for(let i=0;i=1e3&&("材料与耗材费用"===n.Category||!n.Category)}!1!==r&&t.push(n)}return t},medicalService(){return this.injectedMedicalService},uiHandlers(){return this.injectedUiHandlers}}},S=x,_=(i("cf4b"),Object(p["a"])(S,C,w,!1,null,"c510c3cc",null)),A=_.exports,M=function(){var e,t=this,i=t._self._c;return i("div",{staticClass:"accident"},[i("div",{staticClass:"accident-title"},[i("span",{staticClass:"title-label"},[t._v("事故时间:")]),t.editingAccidentTime?i("div",{staticClass:"edit-mode"},[i("el-date-picker",{staticClass:"small-date-picker",attrs:{type:"datetime",size:"small",format:"yyyy-MM-dd HH:mm","value-format":"yyyy-MM-dd HH:mm"},model:{value:t.localEditForm.accident_time,callback:function(e){t.$set(t.localEditForm,"accident_time",e)},expression:"localEditForm.accident_time"}}),i("div",{staticClass:"operation-buttons"},[i("i",{staticClass:"el-icon-check operation-icon",on:{click:t.handleSaveAccidentTime}}),i("i",{staticClass:"el-icon-close",on:{click:t.handleCancelAccidentTime}})])],1):i("div",{staticClass:"clickTxt",on:{click:t.handleStartEditAccidentTime}},[i("span",{staticClass:"time-value"},[t._v(t._s((null===(e=t.accidentData)||void 0===e?void 0:e.accident_time)||"--"))]),i("i",{staticClass:"el-icon-edit"})])]),i("el-table",{staticClass:"width-100",attrs:{data:t.accidentTable||[],border:"","max-height":"250"}},[i("el-table-column",{attrs:{prop:"name",label:"当事人","min-width":"140"},scopedSlots:t._u([{key:"default",fn:function(e){return[t.editingRow===e.row?i("div",[i("el-input",{attrs:{size:"small"},model:{value:t.localEditForm.name,callback:function(e){t.$set(t.localEditForm,"name",e)},expression:"localEditForm.name"}})],1):i("div",{staticClass:"transport-with-icon"},[e.row.is_rider?i("span",{staticClass:"transport-icon icon-electric-bike"}):t._e(),i("span",{staticClass:"transport-name"},[t._v(t._s(e.row.name||"--"))])])]}}])}),i("el-table-column",{attrs:{prop:"id_number",label:"身份证号",width:"170"},scopedSlots:t._u([{key:"default",fn:function(e){return[t.editingRow===e.row?i("div",[i("el-input",{attrs:{size:"small"},model:{value:t.localEditForm.id_number,callback:function(e){t.$set(t.localEditForm,"id_number",e)},expression:"localEditForm.id_number"}})],1):i("div",[t._v(t._s(e.row.id_number||"--"))])]}}])}),i("el-table-column",{attrs:{prop:"liability",label:"责任",width:"100"},scopedSlots:t._u([{key:"default",fn:function(e){return[t.editingRow===e.row?i("div",[i("el-select",{attrs:{placeholder:"请选择"},model:{value:t.localEditForm.liability,callback:function(e){t.$set(t.localEditForm,"liability",e)},expression:"localEditForm.liability"}},t._l(t.liabilityOptions,(function(e){return i("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})})),1)],1):i("div",[t._v(t._s(e.row.liability||"--"))])]}}])}),i("el-table-column",{attrs:{prop:"transport_mode",label:"交通工具",width:"120"},scopedSlots:t._u([{key:"default",fn:function(e){return[t.editingRow===e.row?i("div",[i("el-select",{attrs:{size:"small",placeholder:"选择交通工具"},model:{value:t.localEditForm.transport_mode,callback:function(e){t.$set(t.localEditForm,"transport_mode",e)},expression:"localEditForm.transport_mode"}},[i("el-option",{attrs:{label:"机动车",value:"机动车"}}),i("el-option",{attrs:{label:"非机动车",value:"非机动车"}}),i("el-option",{attrs:{label:"行人",value:"行人"}}),i("el-option",{attrs:{label:"其他",value:"其他"}})],1)],1):i("div",{staticClass:"transport-with-icon"},[i("span",[t._v(t._s(e.row.transport_mode||"--"))])])]}}])}),i("el-table-column",{attrs:{label:"操作",fixed:"right",width:"70"},scopedSlots:t._u([{key:"default",fn:function(e){return[t.editingRow===e.row?i("div",{staticClass:"operation-buttons"},[i("i",{staticClass:"el-icon-check operation-icon",on:{click:function(i){return t.handleSaveEdit(e.row,e.$index)}}}),i("i",{staticClass:"el-icon-close",on:{click:function(i){return t.handleCancelEdit(e.row,e.$index)}}})]):i("div",{staticClass:"operation-buttons"},[i("i",{staticClass:"el-icon-edit operation-icon",on:{click:function(i){return t.handleStartEdit(e.row)}}}),i("i",{staticClass:"el-icon-delete",attrs:{disabled:t.accidentTable.length<=1},on:{click:function(i){return t.handleDeleteRow(e.row)}}})])]}}])})],1),t.accidentTable&&0===t.accidentTable.length?i("div",{staticClass:"addBtn"},[i("el-button",{attrs:{type:"warning",size:"mini"},on:{click:function(e){return t.$emit("add-accident-row","addBtn")}}},[t._v('添加"当前保单骑手"作为当事人')])],1):t._e(),i("div",{staticClass:"add-btn-box"},[i("el-button",{attrs:{type:"primary",size:"mini"},on:{click:function(e){return t.$emit("add-accident-row")}}},[t._v("添加")])],1)],1)},k=[],I={name:"AccidentDetailEditor",props:{accidentData:{type:Object,default:()=>({})},accidentTable:{type:Array,default:()=>[]},liabilityOptions:{type:Array,default:()=>[]}},data(){return{editingAccidentTime:!1,editingRow:null,localEditForm:{name:"",id_number:"",liability:"",transport_mode:"",accident_time:""}}},methods:{handleStartEditAccidentTime(){var e;this.editingAccidentTime=!0,this.localEditForm.accident_time=(null===(e=this.accidentData)||void 0===e?void 0:e.accident_time)||""},handleSaveAccidentTime(){this.$emit("save-accident-time",this.localEditForm.accident_time),this.editingAccidentTime=!1},handleCancelAccidentTime(){this.editingAccidentTime=!1,this.localEditForm.accident_time=""},handleStartEdit(e){this.editingRow=e,this.localEditForm={name:e.name||"",id_number:e.id_number||"",liability:e.liability||"",transport_mode:e.transport_mode||"",accident_time:this.localEditForm.accident_time||""}},handleSaveEdit(e,t){this.$emit("save-edit",{...e,...this.localEditForm},t),this.editingRow=null},handleCancelEdit(e,t){this.editingRow=null,this.$emit("cancel-edit",e,t)},handleDeleteRow(e){this.$emit("delete-row",e)}}},D=I,T=(i("1a03"),Object(p["a"])(D,M,k,!1,null,"1ffe5c80",null)),E=T.exports,P={name:"MaterialInfoPanel",components:{InvoiceEditor:b,ChargeListEditor:A,AccidentDetailEditor:E},inject:{injectedMedicalService:{from:"medicalService",default:null},injectedUiHandlers:{from:"uiHandlers",default:null},injectedBusinessLogic:{from:"businessLogic",default:null},injectedMaterialTypeOptions:{from:"materialTypeOptions",default:null},injectedLiabilityOptions:{from:"liabilityOptions",default:null},injectedCanShowCompareButton:{from:"canShowCompareButton",default:null},injectedMaterialState:{from:"materialState",default:null},injectedPreviewState:{from:"previewState",default:null},injectedInitCurrentImage:{from:"initCurrentImage",default:null}},props:{currentImage:{type:Object,default:()=>({})},accidentTable:{type:Array,default:()=>[]},accidentData:{type:Object,default:()=>({})},liabilityOptions:{type:Array,default:()=>[{value:"全责",label:"全责"},{value:"主责",label:"主责"},{value:"次责",label:"次责"},{value:"无责",label:"无责"}]},materialTypeOptions:{type:Array,default:()=>[]},canShowCompareButton:{type:Boolean,default:!1}},computed:{medicalService(){return this.injectedMedicalService},effectiveChargeList(){const e=this.effectiveCurrentImage;if(!e)return[];let t=e.chargeList;if(Array.isArray(t)&&t.length>0)return t;const i=Array.isArray(e.pipeline_result)?e.pipeline_result[0]:e.pipeline_result,n=(null===i||void 0===i?void 0:i.charge_list)||[];if(Array.isArray(n)&&n.length>0){const t=n.map((e,t)=>{const i={...e};if(void 0===i.amountShow){const e=parseFloat(i.Amount);i.amountShow=!isNaN(e)&&e>=1e3&&("材料与耗材费用"===i.Category||!i.Category)}return i._originalIndex=t,i});return t.sort((e,t)=>{const i=parseFloat(e.Amount)||0,n=parseFloat(t.Amount)||0;return n-i}),t.forEach((e,t)=>{e._originalIndex=t}),this.$set(e,"chargeList",t),t}return[]},uiHandlers(){return this.injectedUiHandlers},businessLogic(){return this.injectedBusinessLogic},filteredMaterialTypeOptions(){const e=this.injectedMaterialTypeOptions||this.materialTypeOptions;return e&&Array.isArray(e)?e:[]},effectiveAccidentTable(){var e;const t=this.effectiveCurrentImage;if(t&&t.pipeline_result){const e="string"===typeof t.pipeline_result?{}:Array.isArray(t.pipeline_result)?t.pipeline_result[0]:t.pipeline_result;if(e&&Array.isArray(e.parties)&&e.parties.length>0)return e.parties}return(null===(e=this.injectedMaterialState)||void 0===e?void 0:e.accidentTable)||this.accidentTable},effectiveAccidentData(){var e;return(null===(e=this.injectedMaterialState)||void 0===e?void 0:e.accidentData)||this.accidentData},effectiveLiabilityOptions(){return this.injectedLiabilityOptions||this.liabilityOptions},effectiveCanShowCompareButton(){return null!==this.injectedCanShowCompareButton&&void 0!==this.injectedCanShowCompareButton?Boolean(this.injectedCanShowCompareButton):void 0===this.canShowCompareButton||null===this.canShowCompareButton||Boolean(this.canShowCompareButton)},shouldShowCompareButton(){const e=this.effectiveCanShowCompareButton;return e},effectiveCurrentImage(){var e;const t=(null===(e=this.injectedPreviewState)||void 0===e?void 0:e.currentImage)||this.currentImage;return t},rightBoxClasses(){var e;return{"right-box":!0,"right-box--accident":"事故责任认定书"==(null===(e=this.effectiveCurrentImage)||void 0===e?void 0:e.materials_type)}}},methods:{handleInvoiceFieldHover(e,t,i){if(this.medicalService&&this.medicalService.highlightField)try{const n=this.effectiveCurrentImage;n&&this.medicalService.highlightField(e,n,i,t)}catch(n){console.warn("highlightField failed, falling back to event:",n),this.$emit("invoice-no-mouse-enter",e,this.effectiveCurrentImage,i,t)}else if(this.businessLogic&&this.businessLogic.handleInvoiceNoMouseEnter){const n=this.effectiveCurrentImage;n&&this.businessLogic.handleInvoiceNoMouseEnter(e,n,i,t)}else this.$emit("invoice-no-mouse-enter",e,this.effectiveCurrentImage,i,t)},handleHighlightLeave(){if(this.medicalService&&this.medicalService.clearHighlight)try{this.medicalService.clearHighlight()}catch(e){console.warn("clearHighlight failed, falling back to event:",e),this.$emit("highlight-leave")}else this.businessLogic&&this.businessLogic.handleHighlightLeave?this.businessLogic.handleHighlightLeave():this.$emit("highlight-leave")},handleChargeFieldHover(e,t){if(this.medicalService&&this.medicalService.hoverChargeField)try{this.medicalService.hoverChargeField(e,t)}catch(i){console.warn("hoverChargeField failed, falling back to event:",i),this.$emit("charge-field-hover",e,t)}else this.uiHandlers&&this.uiHandlers.handleChargeFieldHover?this.uiHandlers.handleChargeFieldHover(e,t):this.$emit("charge-field-hover",e,t)},handleChargeFieldLeave(){if(this.medicalService&&this.medicalService.leaveChargeField)try{this.medicalService.leaveChargeField()}catch(e){console.warn("leaveChargeField failed, falling back to event:",e),this.$emit("charge-field-leave")}else this.uiHandlers&&this.uiHandlers.handleChargeFieldLeave?this.uiHandlers.handleChargeFieldLeave():this.$emit("charge-field-leave")},handleMaterialsTypeChange(e){if(this.medicalService&&this.medicalService.changeMaterialType)try{const e=()=>{this.injectedInitCurrentImage&&"function"===typeof this.injectedInitCurrentImage&&this.injectedInitCurrentImage()};this.medicalService.changeMaterialType(e)}catch(t){console.warn("changeMaterialType failed, falling back to event:",t),this.$emit("materials-type-change",e)}else if(this.uiHandlers&&this.uiHandlers.handleMaterialsTypeChange){const e=()=>{this.injectedInitCurrentImage&&"function"===typeof this.injectedInitCurrentImage&&this.injectedInitCurrentImage()};this.uiHandlers.handleMaterialsTypeChange(this,this.injectedPreviewState,e)}else this.$emit("materials-type-change",e)},handleAccidentSaveEdit(e,t){this.$emit("save-edit",e,t)},handleAccidentCancelEdit(e,t){this.$emit("cancel-edit",e,t)},handleOpenImageCompare(){this.$emit("open-image-compare")},getChargeList(){if(!this.effectiveCurrentImage)return[];const e=this.effectiveCurrentImage.chargeList;if(Array.isArray(e)&&e.length>0)return this.$nextTick(()=>{e.forEach((e,t)=>{if(e&&void 0===e.amountShow){const t=parseFloat(e.Amount),i=!isNaN(t)&&t>=1e3&&("材料与耗材费用"===e.Category||!e.Category);this.$set(e,"amountShow",i)}e&&e._originalIndex!==t&&this.$set(e,"_originalIndex",t)})}),e;const t=Array.isArray(this.effectiveCurrentImage.pipeline_result)?this.effectiveCurrentImage.pipeline_result[0]:this.effectiveCurrentImage.pipeline_result,i=(null===t||void 0===t?void 0:t.charge_list)||[];if(Array.isArray(i)&&i.length>0){const e=i.map((e,t)=>{const i={...e};if(void 0===i.amountShow){const e=parseFloat(i.Amount);i.amountShow=!isNaN(e)&&e>=1e3&&("材料与耗材费用"===i.Category||!i.Category)}return i._originalIndex=t,i});return e.sort((e,t)=>{const i=parseFloat(e.Amount)||0,n=parseFloat(t.Amount)||0;return n-i}),e.forEach((e,t)=>{e._originalIndex=t}),this.$set(this.effectiveCurrentImage,"chargeList",e),e}return[]},getChargeListKey(){const e=this.getChargeList(),t=Array.isArray(e)?e.length:0,i=e&&e.length>0?e[0]:null,n=i?`${i.id||i._id||""}-${i.ProjectName||""}-${i.Amount||""}`:"";return`${t}-${n}`},handlePayerInput(e){var t;const i=(null===(t=this.injectedPreviewState)||void 0===t?void 0:t.currentImage)||this.currentImage;i&&(i.pipeline_result&&"string"!==typeof i.pipeline_result||this.$set(i,"pipeline_result",{}),this.$set(i.pipeline_result,"交款人",e),this.$emit("tag-name-replace",null,0,e))},handleTagClick(e){var t;const i=(null===(t=this.injectedPreviewState)||void 0===t?void 0:t.currentImage)||this.currentImage;i&&(i.pipeline_result&&"string"!==typeof i.pipeline_result||this.$set(i,"pipeline_result",{}),this.$set(i.pipeline_result,"交款人",e),this.$emit("tag-name-replace",null,0,e))}}},O=P,N=(i("b533"),Object(p["a"])(O,s,a,!1,null,"44813921",null)),j=N.exports,L=function(){var e=this,t=e._self._c;return t("div",{staticClass:"left-placeholder"},[e.effectiveHasLeftImage&&e.effectiveHasLeftImage.length>0?e._l(e.effectiveHasLeftImage||[],(function(i,n){return t("div",{key:`left-img-${n}-${i.id||i.material_id||n}`,class:["img-item",{activeImg:Number(e.effectiveActiveImgIndex)===Number(n)}],on:{click:function(t){return e.handleItemClick(i,n)}}},[e.isImageEntry(i)?[e.getLeftThumbnailUrl(i)?t("img",{attrs:{src:e.getLeftThumbnailUrl(i),alt:"",loading:"lazy"},on:{error:function(t){return e.handleImageError(t,i)},load:e.handleImageLoad}}):t("div",{staticClass:"img-placeholder"},[t("i",{staticClass:"el-icon-picture"})])]:t("div",{staticClass:"img-placeholder img-placeholder--doc"},[e._v(" "+e._s(e.getDocLabel(i))+" ")])],2)})):t("p",{staticClass:"left-no"},[e._v("暂无数据")])],2)},F=[],R=(i("3739"),i("472a")),$=i("ff5b"),B=i("dd32"),z={name:"LeftImageList",props:{hasLeftImage:{type:Array,default:()=>[]},activeImgIndex:{type:Number,default:0},otherMaterialsMap:{type:Object,default:()=>({})}},inject:{injectedOtherMaterialsMap:{from:"otherMaterialsMap",default:null},injectedPreviewState:{from:"previewState",default:null},injectedMaterialState:{from:"materialState",default:null}},computed:{effectiveOtherMaterialsMap(){return this.injectedOtherMaterialsMap||this.otherMaterialsMap},effectiveHasLeftImage(){var e;return(null===(e=this.injectedPreviewState)||void 0===e?void 0:e.hasLeftImage)||this.hasLeftImage},effectiveActiveImgIndex(){var e;const t=null===(e=this.injectedPreviewState)||void 0===e?void 0:e.activeImgIndex,i=this.activeImgIndex,n=void 0!==t&&null!==t?Number(t):void 0!==i&&null!==i?Number(i):0;return n}},data(){return{thumbTaskMap:{}}},watch:{"injectedPreviewState.activeImgIndex":{handler(e,t){this.$nextTick(()=>{this.$forceUpdate()})},immediate:!0},activeImgIndex:{handler(e,t){e!==t&&this.$nextTick(()=>{this.$forceUpdate()})},immediate:!0},effectiveActiveImgIndex:{handler(e,t){e!==t&&this.$nextTick(()=>{this.$forceUpdate()})},immediate:!0}},methods:{handleSwitchLeftImg(e){this.$emit("switch-left-img",e)},isImageEntry(e){const t=this.getOtherMaterial(e),i=Object(B["d"])(t);return!!i&&Object(B["b"])(i)},getDocLabel(e){const t=this.getOtherMaterial(e),i=Object(B["d"])(t);return Object(B["a"])(i)},async openDocInNewTab(e){const t=this.getOtherMaterial(e),i=Object(B["d"])(t);var n,r;if(!i)return void(null===(n=this.$message)||void 0===n||null===(r=n.warning)||void 0===r||r.call(n,"缺少 oss_path,无法打开文档"));const s="undefined"!==typeof window?window.open("","_blank"):null;try{const e=await Object(R["a"])(i);var a,o;if(!e)return s&&"function"===typeof s.close&&s.close(),void(null===(a=this.$message)||void 0===a||null===(o=a.error)||void 0===o||o.call(a,"文档链接生成失败"));if(s)return void(s.location.href=e);window.open(e,"_blank")}catch(u){var l,c;s&&"function"===typeof s.close&&s.close(),null===(l=this.$message)||void 0===l||null===(c=l.error)||void 0===c||c.call(l,(null===u||void 0===u?void 0:u.message)||"打开文档失败")}},handleItemClick(e,t){this.isImageEntry(e)?this.handleSwitchLeftImg(t):this.openDocInNewTab(e)},getLeftThumbnailUrl(e){const t=this.getOtherMaterial(e);return t&&"object"===typeof t&&this.isImageEntry(e)?t.oss_thumbnail_url?t.oss_thumbnail_url:(this.ensureThumbUrl(t),""):""},async ensureThumbUrl(e){const t=(null===e||void 0===e?void 0:e.material_id)||(null===e||void 0===e?void 0:e.id)||(null===e||void 0===e?void 0:e.file_id)||(null===e||void 0===e?void 0:e.fileId);if(void 0===t||null===t||""===t)return;const i=String(t);if(e.oss_thumbnail_url)return;if(this.thumbTaskMap[i])return;const n=Object(B["d"])(e);if(!n)return;if(!Object(B["b"])(n))return;const r=null!==e&&void 0!==e&&e.__ossRotateDisabled?0:Object(B["c"])(e)||0,s=(async()=>{try{const t=await Object(R["c"])(n,{angle:r,disableRotate:Boolean(null===e||void 0===e?void 0:e.__ossRotateDisabled)});t&&(e.oss_thumbnail_url=t,e.oss_path||(e.oss_path=n))}finally{this.$delete(this.thumbTaskMap,i)}})();this.$set(this.thumbTaskMap,i,s)},getOtherMaterial(e){const t=this.effectiveOtherMaterialsMap;if("string"===typeof e||"number"===typeof e){let i=t[e];if(!i){const t=this.injectedMaterialState;t&&Array.isArray(t.caseAllMaterials)&&(i=t.caseAllMaterials.find(t=>t.material_id===e||t.id===e||t.file_id===e))}return i||{}}return t[e]||e||{}},async handleImageError(e,t){const i=e.target;if(!i)return;if(i.dataset.ossTokenRetryAttempted)return i.style.display="none",void this.$emit("image-error",e,t);const n=this.getOtherMaterial(t),r=Object(B["d"])(n);if(!r)return i.style.display="none",void this.$emit("image-error",e,t);if(!Object(B["b"])(r))return void(i.style.display="none");const s=Object(B["c"])(n)||0;try{if(s&&!n.__ossRotateDisabled&&!i.dataset.ossRotateFallbackAttempted){i.dataset.ossRotateFallbackAttempted="true",this.$set(n,"__ossRotateDisabled",!0);const e=await Object(R["c"])(r,{angle:0,disableRotate:!0});if(e)return n.oss_thumbnail_url=e,n.oss_path||(n.oss_path=r),i.src=e,void(i.style.display="block")}i.dataset.ossTokenRetryAttempted="true",await Object($["e"])();const e=Boolean(n.__ossRotateDisabled),t=await Object(R["c"])(r,{angle:e?0:s,disableRotate:e});if(t)return n.oss_thumbnail_url=t,n.oss_path||(n.oss_path=r),i.src=t,void(i.style.display="block")}catch(a){}i.style.display="none",this.$emit("image-error",e,t)},handleImageLoad(e){const t=e.target;t&&(t.style.display="block")}}},H=z,V=(i("dc66"),Object(p["a"])(H,L,F,!1,null,"190ec26a",null)),G=V.exports,U=function(){var e,t,i=this,n=i._self._c;return i.hasBottomData&&(null===(e=i.previewImages)||void 0===e?void 0:e.length)>0?n("div",{staticClass:"content-bottom"},[n("el-button",{staticClass:"list-btn left-btn",attrs:{icon:"el-icon-arrow-left",size:"mini",disabled:i.effectiveCurrentIndex<=0},on:{click:i.handleBottomPrev}}),n("div",{ref:"listContainer",staticClass:"img-list-container"},[n("ul",{ref:"imgList",staticClass:"img-list"},i._l(i.effectivePreviewImages||[],(function(e,t){return n("li",{key:`${e.id||e.material_id||t}-${e.materials_type||""}`,ref:"imgItem-"+t,refInFor:!0,staticClass:"img-item",class:{active:i.effectiveCurrentIndex===t,hover:i.hoverIndex===t&&i.effectiveCurrentIndex!==t},on:{click:function(n){return i.handleClickItem(e,t)},mouseenter:function(e){return i.handleHoverImage(t)},mouseleave:function(e){return i.handleHoverImage(-1)}}},[i.isImageEntry(e)?[n("img",{staticClass:"list-img",attrs:{src:i.getThumbSrc(e),alt:e.name,loading:"lazy"},on:{error:function(t){return i.handleThumbError(t,e)}}})]:n("div",{staticClass:"list-doc"},[i._v(i._s(i.getDocLabel(e)))]),n("i",{class:{markerTag:1,"el-icon-success":1,activeTag:null===e||void 0===e?void 0:e.handwork_flag},on:{click:function(t){return t.stopPropagation(),i.$emit("check-click",e,null,1)}}})],2)})),0)]),n("el-button",{staticClass:"list-btn right-btn",attrs:{icon:"el-icon-arrow-right",size:"mini",disabled:i.effectiveCurrentIndex>=((null===(t=i.effectivePreviewImages)||void 0===t?void 0:t.length)||0)-1},on:{click:i.handleBottomNext}})],1):i._e()},q=[],W={name:"BottomPreviewList",props:{previewImages:{type:Array,default:()=>[]},currentIndex:{type:Number,default:0},hasBottomData:{type:Boolean,default:!1}},inject:{injectedPreviewState:{from:"previewState",default:null}},data(){return{hoverIndex:-1,thumbTaskMap:{}}},watch:{effectivePreviewImages:{immediate:!0,handler(e){(e||[]).forEach(e=>this.ensureThumbUrl(e))},deep:!0}},computed:{effectivePreviewImages(){var e;return(null===(e=this.injectedPreviewState)||void 0===e?void 0:e.previewImages)||this.previewImages},effectiveCurrentIndex(){var e,t;return null!==(e=null===(t=this.injectedPreviewState)||void 0===t?void 0:t.currentIndex)&&void 0!==e?e:this.currentIndex},effectiveHasBottomData(){var e,t;return null!==(e=null===(t=this.injectedPreviewState)||void 0===t?void 0:t.hasBottomData)&&void 0!==e?e:this.hasBottomData}},methods:{isImageEntry(e){const t=Object(B["d"])(e);return!!t&&Object(B["b"])(t)},getDocLabel(e){const t=Object(B["d"])(e);return Object(B["a"])(t)},async openDocInNewTab(e){const t=Object(B["d"])(e);var i,n;if(!t)return void(null===(i=this.$message)||void 0===i||null===(n=i.warning)||void 0===n||n.call(i,"缺少 oss_path,无法打开文档"));const r="undefined"!==typeof window?window.open("","_blank"):null;try{const e=await Object(R["a"])(t);var s,a;if(!e)return r&&"function"===typeof r.close&&r.close(),void(null===(s=this.$message)||void 0===s||null===(a=s.error)||void 0===a||a.call(s,"文档链接生成失败"));if(r)return void(r.location.href=e);window.open(e,"_blank")}catch(c){var o,l;r&&"function"===typeof r.close&&r.close(),null===(o=this.$message)||void 0===o||null===(l=o.error)||void 0===l||l.call(o,(null===c||void 0===c?void 0:c.message)||"打开文档失败")}},handleClickItem(e,t){this.isImageEntry(e)?this.handleSelectImage(t):this.openDocInNewTab(e)},getThumbSrc(e){return e&&this.isImageEntry(e)?e.oss_thumbnail_url?e.oss_thumbnail_url:(this.ensureThumbUrl(e),""):""},async ensureThumbUrl(e){const t=(null===e||void 0===e?void 0:e.material_id)||(null===e||void 0===e?void 0:e.id);if(void 0===t||null===t||""===t)return;const i=String(t);if(e.oss_thumbnail_url)return;if(this.thumbTaskMap[i])return;const n=Object(B["d"])(e);if(!n)return;if(!Object(B["b"])(n))return;const r=null!==e&&void 0!==e&&e.__ossRotateDisabled?0:Object(B["c"])(e)||0,s=(async()=>{try{const t=await Object(R["c"])(n,{angle:r,disableRotate:Boolean(null===e||void 0===e?void 0:e.__ossRotateDisabled)});t&&(e.oss_thumbnail_url=t,e.oss_path||(e.oss_path=n))}finally{this.$delete(this.thumbTaskMap,i)}})();this.$set(this.thumbTaskMap,i,s)},async handleThumbError(e,t){const i=null===e||void 0===e?void 0:e.target;if(!i)return;if(i.dataset.ossTokenRetryAttempted)return void this.$emit("image-error",e,t);const n=Object(B["d"])(t);if(!n)return void this.$emit("image-error",e,t);if(!Object(B["b"])(n))return void this.$emit("image-error",e,t);const r=Object(B["c"])(t)||0;try{if(r&&!t.__ossRotateDisabled&&!i.dataset.ossRotateFallbackAttempted){i.dataset.ossRotateFallbackAttempted="true",this.$set(t,"__ossRotateDisabled",!0);const e=await Object(R["c"])(n,{angle:0,disableRotate:!0});if(e)return t.oss_thumbnail_url=e,t.oss_path||(t.oss_path=n),void(i.src=e)}i.dataset.ossTokenRetryAttempted="true",await Object($["e"])();const e=Boolean(t.__ossRotateDisabled),s=await Object(R["c"])(n,{angle:e?0:r,disableRotate:e});if(s)return t.oss_thumbnail_url=s,t.oss_path||(t.oss_path=n),void(i.src=s)}catch(s){}this.$emit("image-error",e,t)},handleSelectImage(e){this.$emit("select-image",e),this.$nextTick(()=>{this.scrollToActiveItem()})},handleHoverImage(e){this.hoverIndex=e},scrollToActiveItem(){this.$nextTick(()=>{const e=this.$refs.listContainer;if(!e)return;const t=this.$refs.imgList;if(!t)return;const i=t.querySelectorAll(".img-item"),n=this.effectiveCurrentIndex;if(n<0||n>=i.length)return;const r=i[n];if(!r)return;const s=e.getBoundingClientRect(),a=r.getBoundingClientRect(),o=r.offsetLeft,l=r.offsetWidth,c=e.offsetWidth,u=(e.scrollLeft,12);a.lefts.right&&e.scrollTo({left:o+l-c+u,behavior:"smooth"})})},handleBottomPrev(){this.effectiveCurrentIndex>0&&this.$emit("bottom-prev")},handleBottomNext(){var e;this.effectiveCurrentIndex<((null===(e=this.effectivePreviewImages)||void 0===e?void 0:e.length)||0)-1&&this.$emit("bottom-next")}},watch:{effectiveCurrentIndex(){this.scrollToActiveItem()}},mounted(){this.$nextTick(()=>{this.scrollToActiveItem()})}},X=W,Y=(i("e228"),Object(p["a"])(X,U,q,!1,null,"7e244fcc",null)),J=Y.exports,K=function(){var e,t,i=this,n=i._self._c;return n("div",{class:i.centerClasses},[n("el-button",{staticClass:"img-nav-btn left-nav",attrs:{icon:"el-icon-arrow-left",size:"mini"},on:{click:function(e){return i.$emit("prev-image")}}}),n("el-button",{staticClass:"img-nav-btn right-nav",attrs:{icon:"el-icon-arrow-right",size:"mini"},on:{click:function(e){return i.$emit("next-image")}}}),n("div",{staticClass:"img-count"},[i._v(i._s(i.currentIndex+1)+"/"+i._s((null===(e=i.previewImages)||void 0===e?void 0:e.length)||0))]),i.imageUrl?n("img-deal",{ref:"previewImgDeal",staticClass:"preview-img",attrs:{imgData:i.currentImage,url:i.imageUrl,"disable-legacy-fallback":!0,"fit-mode":"width-first"},on:{"image-error":(...e)=>i.$emit("image-error",...e)}}):i.isDoc?n("div",{staticClass:"doc-tip"},[n("div",{staticClass:"doc-tip__label"},[i._v(i._s(i.docLabel))]),n("el-button",{attrs:{size:"mini",type:"primary"},on:{click:i.openDoc}},[i._v("在新标签打开")])],1):n("div",{staticClass:"empty-tip"},[i._v("暂无图片")]),n("i",{class:{markerTag:1,"el-icon-success":1,activeTag:null===(t=i.currentImage)||void 0===t?void 0:t.handwork_flag},on:{click:function(e){return e.stopPropagation(),i.$emit("check-click",i.currentImage,null,1)}}})],1)},Z=[],Q=i("18dd"),ee={name:"CenterImageDisplay",components:{ImgDeal:Q["a"]},props:{currentImage:{type:Object,default:()=>({})},previewImages:{type:Array,default:()=>[]},currentIndex:{type:Number,default:0}},inject:{injectedPreviewState:{from:"previewState",default:null}},computed:{effectiveCurrentImage(){var e;return(null===(e=this.injectedPreviewState)||void 0===e?void 0:e.currentImage)||this.currentImage},effectivePreviewImages(){var e;return(null===(e=this.injectedPreviewState)||void 0===e?void 0:e.previewImages)||this.previewImages},effectiveCurrentIndex(){var e,t;return null!==(e=null===(t=this.injectedPreviewState)||void 0===t?void 0:t.currentIndex)&&void 0!==e?e:this.currentIndex},imageUrl(){var e;const t=this.effectiveCurrentImage,i=null===(e=this.effectivePreviewImages)||void 0===e?void 0:e[this.effectiveCurrentIndex],n=Object(B["d"])(t)||Object(B["d"])(i)||"";if(!n||!Object(B["b"])(n))return"";if(null!==t&&void 0!==t&&t.oss_preview_url)return t.oss_preview_url;if(null!==i&&void 0!==i&&i.oss_preview_url)return i.oss_preview_url;const r=t||i,s=null!==r&&void 0!==r&&r.__ossRotateDisabled?0:Object(B["c"])(r)||0,a=Object(R["d"])(n,{angle:s,disableRotate:Boolean(null===r||void 0===r?void 0:r.__ossRotateDisabled)});return a&&(t&&"object"===typeof t&&(t.oss_preview_url=a),i&&"object"===typeof i&&(i.oss_preview_url=a)),a||""},isDoc(){var e;const t=this.effectiveCurrentImage,i=null===(e=this.effectivePreviewImages)||void 0===e?void 0:e[this.effectiveCurrentIndex],n=Object(B["d"])(t)||Object(B["d"])(i)||"";return Boolean(n&&!Object(B["b"])(n))},docLabel(){var e;const t=this.effectiveCurrentImage,i=null===(e=this.effectivePreviewImages)||void 0===e?void 0:e[this.effectiveCurrentIndex],n=Object(B["d"])(t)||Object(B["d"])(i)||"";return Object(B["a"])(n)},centerClasses(){var e;return{center:!0,imgCorrect:!(null===(e=this.effectiveCurrentImage)||void 0===e||!e.handwork_flag)}}},methods:{async openDoc(){var e;const t=this.effectiveCurrentImage,i=null===(e=this.effectivePreviewImages)||void 0===e?void 0:e[this.effectiveCurrentIndex],n=Object(B["d"])(t)||Object(B["d"])(i)||"";var r,s;if(!n)return void(null===(r=this.$message)||void 0===r||null===(s=r.warning)||void 0===s||s.call(r,"缺少 oss_path,无法打开文档"));const a="undefined"!==typeof window?window.open("","_blank"):null;try{const e=await Object(R["a"])(n);var o,l;if(!e)return a&&"function"===typeof a.close&&a.close(),void(null===(o=this.$message)||void 0===o||null===(l=o.error)||void 0===l||l.call(o,"文档链接生成失败"));if(a)return void(a.location.href=e);window.open(e,"_blank")}catch(h){var c,u;a&&"function"===typeof a.close&&a.close(),null===(c=this.$message)||void 0===c||null===(u=c.error)||void 0===u||u.call(c,(null===h||void 0===h?void 0:h.message)||"打开文档失败")}},getImgDealComponent(){return this.$refs.previewImgDeal||null},setActiveChargeHighlight(e,t){const i=this.getImgDealComponent();i&&"function"===typeof i.setActiveChargeHighlight&&i.setActiveChargeHighlight(e,t)},clearActiveChargeHighlight(){const e=this.getImgDealComponent();e&&"function"===typeof e.clearActiveChargeHighlight&&e.clearActiveChargeHighlight()}}},te=ee,ie=(i("09d9"),Object(p["a"])(te,K,Z,!1,null,"f50d904a",null)),ne=ie.exports;function re(e,t={}){const{storageKey:i="previewDialogRightPanelWidth",minWidth:n=300,maxWidth:r=1e3,centerPanelMinWidth:s=300}=t,a=e.$data||{};function o(t){var i;const n=(null===(i=e.$refs.rightPanel)||void 0===i?void 0:i.$el)||e.$refs.rightPanel,r=e.$refs.mainContent;n&&r&&(e.$set(a,"isResizingRightPanel",!0),e.$set(a,"resizeStartX",t.clientX),e.$set(a,"resizeStartWidth",n.offsetWidth),window.addEventListener("mousemove",l),window.addEventListener("mouseup",c))}function l(t){if(!a.isResizingRightPanel)return;const i=t.clientX-a.resizeStartX;let n=a.resizeStartWidth-i;const{min:r,max:s}=h();n=Math.min(Math.max(n,r),s),e.$set(a,"customRightPanelWidth",Math.round(n))}function c(){window.removeEventListener("mousemove",l),window.removeEventListener("mouseup",c),e.$set(a,"isResizingRightPanel",!1),d()}function u(){e.$set(a,"customRightPanelWidth",null),d(),c()}function h(){const t=e.$refs.mainContent,i=t?t.offsetWidth:0;let a=r;if(i){const e=Math.max(i-s,n);a=Math.min(a,e)}const o=n;return a0&&e.$set(a,"customRightPanelWidth",i)}}catch(t){console.warn("Failed to load right panel width:",t)}}return a.isResizingRightPanel||e.$set(a,"isResizingRightPanel",!1),void 0===a.customRightPanelWidth&&e.$set(a,"customRightPanelWidth",null),a.resizeStartX||e.$set(a,"resizeStartX",0),a.resizeStartWidth||e.$set(a,"resizeStartWidth",0),{handleStartResize:o,handleRightPanelResizing:l,stopRightPanelResize:c,handleResetPanelWidth:u,getRightPanelResizeLimits:h,persistRightPanelWidth:d,loadRightPanelWidth:p}}function se(e,t={}){const{injectedPreviewState:i=null,injectedMaterialState:n=null,injectedOtherMaterialsMap:r=null,previewImages:s=[],currentIndex:a=0,currentImage:o={},hasLeftImage:l=[],hasBottomData:c=!1,otherMaterialsMap:u={}}=t;function h(){return(null===i||void 0===i?void 0:i.previewImages)||s}function d(){var e;return null!==(e=null===i||void 0===i?void 0:i.currentIndex)&&void 0!==e?e:a}function p(){return(null===i||void 0===i?void 0:i.currentImage)||o}function g(){return(null===i||void 0===i?void 0:i.hasLeftImage)||l}function f(){var e;return null!==(e=null===i||void 0===i?void 0:i.hasBottomData)&&void 0!==e?e:c}function m(){return r||u}function v(t,n){const r=h();if(!r||!Array.isArray(r))return!1;let s=!1;return r.forEach((a,o)=>{const l=a.id||a.material_id;if(l&&String(l)===String(t))if(i&&i.previewImages){const t={...i.previewImages[o],materials_type:n};e.$set(i.previewImages,o,t),s=!0}else{const t={...r[o],materials_type:n};e.$set(r,o,t),s=!0}}),s}return{getEffectivePreviewImages:h,getEffectiveCurrentIndex:d,getEffectiveCurrentImage:p,getEffectiveHasLeftImage:g,getEffectiveHasBottomData:f,getEffectiveOtherMaterialsMap:m,updatePreviewImageMaterialsType:v}}var ae={name:"ImagePreviewPanel",components:{MaterialInfoPanel:j,LeftImageList:G,BottomPreviewList:J,CenterImageDisplay:ne},inject:{injectedMedicalService:{from:"medicalService",default:null},injectedMedicalApi:{from:"medicalApi",default:null},injectedFormAndTableManagement:{from:"formAndTableManagement",default:null},injectedUiHandlers:{from:"uiHandlers",default:null},injectedBusinessLogic:{from:"businessLogic",default:null},injectedMaterialTypeOptions:{from:"materialTypeOptions",default:null},injectedOtherMaterialsMap:{from:"otherMaterialsMap",default:null},injectedLiabilityOptions:{from:"liabilityOptions",default:null},injectedCanShowCompareButton:{from:"canShowCompareButton",default:null},injectedMaterialState:{from:"materialState",default:null},injectedPreviewState:{from:"previewState",default:null},injectedSelectImage:{from:"selectImage",default:null},injectedInitCurrentImage:{from:"initCurrentImage",default:null},injectedRefreshData:{from:"refreshData",default:null}},props:{dialogVisible:{type:Boolean,default:!1},dialogTitle:{type:String,default:"图片预览"},previewImages:{type:Array,default:()=>[]},currentIndex:{type:Number,default:0},currentImage:{type:Object,default:()=>({})},hasLeftImage:{type:Array,default:()=>[]},hasBottomData:{type:Boolean,default:!1},otherMaterialsMap:{type:Object,default:()=>({})},accidentTable:{type:Array,default:()=>[]},accidentData:{type:Object,default:()=>({})},liabilityOptions:{type:Array,default:()=>[{value:"全责",label:"全责"},{value:"主责",label:"主责"},{value:"次责",label:"次责"},{value:"无责",label:"无责"}]},materialTypeOptions:{type:Array,default:()=>[]},canShowCompareButton:{type:Boolean,default:!1}},data(){return{isResizingRightPanel:!1,customRightPanelWidth:null,resizeStartX:0,resizeStartWidth:0}},computed:{internalDialogVisible:{get(){return this.dialogVisible},set(e){this.$emit("update:dialogVisible",e)}},hasLeft(){return this.hasLeftImage&&this.hasLeftImage.length>0},medicalService(){return this.injectedMedicalService},formAndTableManagement(){return this.injectedFormAndTableManagement},uiHandlers(){return this.injectedUiHandlers},businessLogic(){return this.injectedBusinessLogic},effectiveOtherMaterialsMap(){var e;return(null===(e=this.previewState)||void 0===e?void 0:e.getEffectiveOtherMaterialsMap())||this.otherMaterialsMap},effectivePreviewImages(){var e;return(null===(e=this.previewState)||void 0===e?void 0:e.getEffectivePreviewImages())||this.previewImages},effectiveCurrentIndex(){var e,t;return null!==(e=null===(t=this.previewState)||void 0===t?void 0:t.getEffectiveCurrentIndex())&&void 0!==e?e:this.currentIndex},effectiveCurrentImage(){var e;return(null===(e=this.previewState)||void 0===e?void 0:e.getEffectiveCurrentImage())||this.currentImage},effectiveHasLeftImage(){var e;return(null===(e=this.previewState)||void 0===e?void 0:e.getEffectiveHasLeftImage())||this.hasLeftImage},effectiveHasBottomData(){var e,t;return null!==(e=null===(t=this.previewState)||void 0===t?void 0:t.getEffectiveHasBottomData())&&void 0!==e?e:this.hasBottomData},activeImgIndex:{get(){var e,t;return null!==(e=null===(t=this.injectedPreviewState)||void 0===t?void 0:t.activeImgIndex)&&void 0!==e?e:0},set(e){this.injectedPreviewState&&(this.injectedPreviewState.activeImgIndex=e)}},mainContentModeClasses(){var e,t;return{"main-content--inventory":"医疗费用清单"==(null===(e=this.effectiveCurrentImage)||void 0===e?void 0:e.materials_type),"main-content--accident":"事故责任认定书"==(null===(t=this.effectiveCurrentImage)||void 0===t?void 0:t.materials_type)}},mainContentStyle(){const e={width:this.hasLeft?"90%":"100%"};return null!==this.customRightPanelWidth&&(e["--right-panel-width"]=this.customRightPanelWidth+"px"),e}},mounted(){this.previewState=se(this,{injectedPreviewState:this.injectedPreviewState,injectedMaterialState:this.injectedMaterialState,injectedOtherMaterialsMap:this.injectedOtherMaterialsMap,previewImages:this.previewImages,currentIndex:this.currentIndex,currentImage:this.currentImage,hasLeftImage:this.hasLeftImage,hasBottomData:this.hasBottomData,otherMaterialsMap:this.otherMaterialsMap}),this.panelResizer=re(this,{storageKey:"previewDialogRightPanelWidth",minWidth:300,maxWidth:1e3,centerPanelMinWidth:300}),this.panelResizer.loadRightPanelWidth()},beforeDestroy(){this.panelResizer&&this.panelResizer.stopRightPanelResize()},watch:{dialogVisible(e){e?this.panelResizer&&this.panelResizer.loadRightPanelWidth():this.panelResizer&&this.panelResizer.stopRightPanelResize()},hasLeftImage:{handler(e,t){if(e&&e.length>0&&(!t||0===t.length)&&this.injectedPreviewState){var i,n;const t=(null===(i=this.effectiveCurrentImage)||void 0===i?void 0:i.material_id)||(null===(n=this.effectiveCurrentImage)||void 0===n?void 0:n.id);if(t){const i=e.findIndex(e=>String(e)===String(t));i>=0?this.$set(this.injectedPreviewState,"activeImgIndex",i):this.$set(this.injectedPreviewState,"activeImgIndex",0)}else this.$set(this.injectedPreviewState,"activeImgIndex",0)}},immediate:!0},"injectedPreviewState.activeImgIndex":{handler(e){this.$forceUpdate()},immediate:!1},effectiveCurrentImage:{handler(e,t){e&&(t&&e===t||this.$nextTick(()=>{e.materials_type&&-1!=e.materials_type.indexOf("清单")&&this.$forceUpdate()}))},deep:!1,immediate:!0},"effectiveCurrentImage.chargeList":{handler(e,t){e!==t&&this.$nextTick(()=>{this.effectiveCurrentImage&&this.effectiveCurrentImage.materials_type&&-1!=this.effectiveCurrentImage.materials_type.indexOf("清单")&&this.$forceUpdate()})},deep:!1,immediate:!0},"effectiveCurrentImage.materials_type":{handler(e,t){if(e&&e!==t&&this.effectiveCurrentImage&&this.previewState){const t=this.effectiveCurrentImage,i=t.id||t.material_id,n=this.previewState.updatePreviewImageMaterialsType(i,e);n&&this.$nextTick(()=>{this.$forceUpdate()}),e&&-1!=e.indexOf("清单")&&this.$nextTick(()=>{this.$forceUpdate()})}},immediate:!1},"injectedPreviewState.previewImages":{handler(){this.$nextTick(()=>{this.$forceUpdate()})},deep:!0,immediate:!1}},methods:{handleClose(){this.$emit("update:dialogVisible",!1),this.$emit("close")},handleSwitchLeftImg(e){this.injectedPreviewState&&this.$set(this.injectedPreviewState,"activeImgIndex",Number(e)),this.$emit("switch-left-img",Number(e))},handleSelectImage(e){this.$emit("select-image",e)},handleStartResize(e){this.panelResizer&&this.panelResizer.handleStartResize(e)},handleRightPanelResizing(e){this.panelResizer&&this.panelResizer.handleRightPanelResizing(e)},stopRightPanelResize(){this.panelResizer&&this.panelResizer.stopRightPanelResize()},handleResetPanelWidth(){this.panelResizer&&this.panelResizer.handleResetPanelWidth()},handleMaterialsTypeChangeFromPanel(e){this.handleMaterialsTypeChange(e)},handleMaterialsTypeChange(e){const t=this.effectiveCurrentImage;if(t&&this.previewState){const i=t.id||t.material_id;this.previewState.updatePreviewImageMaterialsType(i,e)}if(this.medicalService&&this.medicalService.changeMaterialType)try{const t=this.injectedInitCurrentImage||(()=>this.$emit("materials-type-change",e));this.medicalService.changeMaterialType(t)}catch(i){console.warn("changeMaterialType failed, falling back to event:",i),this.$emit("materials-type-change",e)}else if(this.uiHandlers&&this.uiHandlers.handleMaterialsTypeChange){const t=this.injectedInitCurrentImage||(()=>this.$emit("materials-type-change",e));this.uiHandlers.handleMaterialsTypeChange(t)}else this.$emit("materials-type-change",e);this.$nextTick(()=>{this.$forceUpdate()})}}},oe=ae,le=(i("d0d0"),Object(p["a"])(oe,n,r,!1,null,"42897af2",null));t["a"]=le.exports},"09d9":function(e,t,i){"use strict";i("94b5")},"0ecf":function(e,t,i){"use strict";i("eeaf")},"12c6":function(e,t,i){},"135b":function(e,t,i){"use strict";i.d(t,"a",(function(){return s}));i("b138");var n=i("b98b"),r=i("dd32");function s(e,t={}){const i=t.vueInstance||null,s=t.onMessage||null,a=(e,t)=>{s&&s[e]?s[e](t):i&&i.$message&&i.$message[e](t)},o=(e,t,n)=>{i&&i.$set?i.$set(e,t,n):e[t]=n},l={similarMaterialsCache:{},currentSimilarSummary:{materialId:null,similarMaterialIds:[],similarMaterials:[],similarityMap:{},threshold:.85,highSimilarityCount:0},similarMaterialsLoading:!1,similarityThreshold:.85,latestSimilarMaterialId:null};function c(e){return e&&String(e.id||e.material_id||e.file_id||e.fileId||e.invoice_no||"").trim()||null}async function u(t){const i=c(t);if(l.latestSimilarMaterialId=i||null,i)if(l.similarMaterialsCache[i])l.currentSimilarSummary=l.similarMaterialsCache[i];else{l.similarMaterialsLoading=!0;try{const t=await e.getSimilarMaterials(i,{top_k:100,similarity_threshold:0});if(t.success){const e=Object(n["a"])(t.data,i,l.similarityThreshold);o(l.similarMaterialsCache,i,e),l.latestSimilarMaterialId===i&&(l.currentSimilarSummary=e)}else l.latestSimilarMaterialId===i&&(l.currentSimilarSummary=Object(n["a"])(null,i,l.similarityThreshold))}catch(r){l.latestSimilarMaterialId===i&&(l.currentSimilarSummary=Object(n["a"])(null,i,l.similarityThreshold))}finally{l.latestSimilarMaterialId===i&&(l.similarMaterialsLoading=!1)}}else l.currentSimilarSummary=Object(n["a"])(null,null,l.similarityThreshold)}function h(e){return Object(n["c"])(e,l.currentSimilarSummary)}function d(e){return Object(n["d"])(e,l.currentSimilarSummary)}function p(e,t,i,n){if(!e||!(e.id||e.material_id||e.file_id||e.fileId))return;const s=e.id||e.material_id||e.file_id||e.fileId,o=t.findIndex(e=>{const t=e.id||e.material_id||e.file_id||e.fileId;return String(t)===String(s)});if(-1!==o)i&&i(o);else{const o=n[s];if(o){const n=Object(r["d"])(o)||Object(r["d"])(e)||"",s={...o,oss_path:n||o.oss_path,similarity:"number"===typeof e.similarity?e.similarity:o.similarity};t.push(s),i&&i(t.length-1)}else a("warning","未找到对应的材料数据")}}function g(e=[]){const t=Array.isArray(e)?[...e]:[];return t.sort((e,t)=>{const i=e.isMarkedSimilar?1:0,n=t.isMarkedSimilar?1:0;if(i!==n)return n-i;const r="number"===typeof e.similarity?e.similarity:-1,s="number"===typeof t.similarity?t.similarity:-1;return s-r}),t}return{currentSimilarSummary:()=>l.currentSimilarSummary,similarMaterialsLoading:()=>l.similarMaterialsLoading,similarityThreshold:()=>l.similarityThreshold,getMaterialIdentifier:c,fetchSimilarMaterialsForCurrent:u,getSimilarityScoreForMaterial:h,isMaterialMarkedSimilarForMaterial:d,handleSelectSimilarMaterial:p,sortComparisonList:g}}},"1a03":function(e,t,i){"use strict";i("7b17")},"201d":function(e,t,i){},"23f1":function(e,t,i){var n,r,s; /*! * jQuery Mousewheel 3.2.2 * Copyright OpenJS Foundation and other contributors */(function(a){"use strict";r=[i("5d85")],n=a,s="function"===typeof n?n.apply(t,r):n,void 0===s||(e.exports=s)})((function(e){"use strict";var t,i,n=!!e.fn.on,r=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],s="onwheel"in window.document||window.document.documentMode>=9?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],a=Array.prototype.slice;if(e.event.fixHooks)for(var o=r.length;o;)e.event.fixHooks[r[--o]]=e.event.mouseHooks;var l=e.event.special.mousewheel={version:"3.2.2",setup:function(){if(this.addEventListener)for(var t=s.length;t;)this.addEventListener(s[--t],c,!1);else this.onmousewheel=c;e.data(this,"mousewheel-line-height",l.getLineHeight(this)),e.data(this,"mousewheel-page-height",l.getPageHeight(this))},teardown:function(){if(this.removeEventListener)for(var t=s.length;t;)this.removeEventListener(s[--t],c,!1);else this.onmousewheel=null;e.removeData(this,"mousewheel-line-height"),e.removeData(this,"mousewheel-page-height")},getLineHeight:function(t){var i=e(t),n=i["offsetParent"in e.fn?"offsetParent":"parent"]();return n.length||(n=e("body")),parseInt(n.css("fontSize"),10)||parseInt(i.css("fontSize"),10)||16},getPageHeight:function(t){return e(t).height()},settings:{adjustOldDeltas:!0,normalizeOffset:!0}};function c(n){var r=n||window.event,s=a.call(arguments,1),o=0,c=0,h=0,d=0;if(n=e.event.fix(r),n.type="mousewheel","detail"in r&&(h=-1*r.detail),"wheelDelta"in r&&(h=r.wheelDelta),"wheelDeltaY"in r&&(h=r.wheelDeltaY),"wheelDeltaX"in r&&(c=-1*r.wheelDeltaX),"axis"in r&&r.axis===r.HORIZONTAL_AXIS&&(c=-1*h,h=0),o=0===h?c:h,"deltaY"in r&&(h=-1*r.deltaY,o=h),"deltaX"in r&&(c=r.deltaX,0===h&&(o=-1*c)),0!==h||0!==c){if(1===r.deltaMode){var p=e.data(this,"mousewheel-line-height");o*=p,h*=p,c*=p}else if(2===r.deltaMode){var g=e.data(this,"mousewheel-page-height");o*=g,h*=g,c*=g}if(d=Math.max(Math.abs(h),Math.abs(c)),(!i||d=1?"floor":"ceil"](o/i),c=Math[c>=1?"floor":"ceil"](c/i),h=Math[h>=1?"floor":"ceil"](h/i),l.settings.normalizeOffset&&this.getBoundingClientRect){var f=this.getBoundingClientRect();n.offsetX=n.clientX-f.left,n.offsetY=n.clientY-f.top}return n.deltaX=c,n.deltaY=h,n.deltaFactor=i,n.deltaMode=0,s.unshift(n,o,c,h),t&&window.clearTimeout(t),t=window.setTimeout((function(){i=null}),200),(e.event.dispatch||e.event.handle).apply(this,s)}}function u(e,t){return l.settings.adjustOldDeltas&&"mousewheel"===e.type&&t%120===0}e.fn.extend({mousewheel:function(e){return e?this[n?"on":"bind"]("mousewheel",e):this.trigger("mousewheel")},unmousewheel:function(e){return this[n?"off":"unbind"]("mousewheel",e)}})}))},2502:function(e,t,i){"use strict";i("7163")},"294a":function(e,t,i){"use strict";var n=function(){var e=this,t=e._self._c;return t("el-dialog",{staticClass:"three-column-unsaved-prompt",attrs:{visible:e.visibleProxy,width:"420px",title:"未保存的更改","append-to-body":""},on:{"update:visible":function(t){e.visibleProxy=t},close:function(t){return e.$emit("cancel")}}},[t("p",{staticClass:"three-column-unsaved-prompt__message"},[e._v(" "+e._s(e.message)+" ")]),t("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[t("el-button",{on:{click:function(t){return e.$emit("cancel")}}},[e._v("取消")]),t("el-button",{attrs:{type:"warning"},on:{click:function(t){return e.$emit("discard")}}},[e._v("放弃更改")]),t("el-button",{attrs:{type:"primary"},on:{click:function(t){return e.$emit("save")}}},[e._v("保存并继续")])],1)])},r=[],s={name:"MedicalThreeColumnUnsavedPrompt",props:{visible:{type:Boolean,default:!1},message:{type:String,default:"存在未保存的更改,请选择操作。"}},computed:{visibleProxy:{get(){return this.visible},set(e){e||this.$emit("cancel")}}}},a=s,o=(i("6d75"),i("1805")),l=Object(o["a"])(a,n,r,!1,null,"a8dacc1c",null);t["a"]=l.exports},"296e":function(e,t,i){},"2a43":function(e,t,i){"use strict";i.d(t,"a",(function(){return s}));i("8f26"),i("666b");var n=i("2aaa"),r=i("b98b");function s(e={}){const{apiClient:t,interfaceUrl:i,caseNo:s,onMessage:a=null,onMaterialsLoaded:o=null,onAccidentDataLoaded:l=null}=e;async function c(){if(!t||!i||!s)return{success:!1,message:"缺少必要参数"};try{const e=await Object(n["d"])(t,i,s);return e.success?{success:!0,data:e.data||{}}:(a&&a.error&&a.error(e.message||"获取保单信息失败"),{success:!1,message:e.message,data:{}})}catch(e){return a&&a.error&&a.error("获取保单信息失败"),{success:!1,error:e,data:{}}}}async function u(e,l={}){let c=s,u={};if(l&&"object"===typeof l&&(void 0!==l.caseNo?(c=l.caseNo,u=l.queryParams||{}):void 0===l.effective_only&&void 0===l.calculation_only||(u=l)),!t||!i||!c)return{success:!1,message:"缺少必要参数"};try{const s=await Object(n["c"])(t,i,c,u);if(s.success){const t=Object(r["g"])(s.data||[]);let i=Object(r["e"])(t,"material_id");return 0===Object.keys(i).length&&(i=Object(r["e"])(t,"id")),0===Object.keys(i).length&&(i={},t.forEach(e=>{const t=e.material_id||e.id;void 0!==t&&null!==t&&(i[t]=e)})),e&&(e.caseAllMaterials=t,e.otherMaterialsData=t,e.otherMaterialsMap=i),o&&o(t,i),{success:!0,data:t,materialsMap:i}}return e&&(e.otherMaterialsData=[],e.caseAllMaterials=[],e.otherMaterialsMap={}),a&&a.error&&a.error(s.message||"获取材料数据失败"),{success:!1,message:s.message,data:[]}}catch(h){return e&&(e.otherMaterialsData=[],e.caseAllMaterials=[],e.otherMaterialsMap={}),a&&a.error&&a.error("获取材料数据失败"),{success:!1,error:h,data:[]}}}async function h(e){if(!t||!i||!s)return{success:!1,message:"缺少必要参数"};try{const o=await Object(n["b"])(t,i,s);if(o.success){var r;const t=(null===(r=o.data)||void 0===r?void 0:r.accident_report)||{},i=t.parties||[];return e&&(e.accidentData=t,e.accidentTable=i),l&&l(t,i),{success:!0,data:t,accidentTable:i}}return a&&a.error&&a.error(o.message||"获取事故报告失败"),{success:!1,message:o.message,data:{}}}catch(o){return a&&a.error&&a.error("获取事故报告失败"),{success:!1,error:o,data:{}}}}async function d(e){const[t,i,n]=await Promise.all([c(),u(e),h(e)]);return{policy:t,materials:i,accident:n,allSuccess:t.success&&i.success&&n.success}}return{fetchInsurancePolicy:c,fetchCaseMaterials:u,fetchAccidentReport:h,fetchAllData:d}}},"2aaa":function(e,t,i){"use strict";i.d(t,"d",(function(){return n})),i.d(t,"c",(function(){return l})),i.d(t,"b",(function(){return u})),i.d(t,"a",(function(){return b}));i("0f5d");function n(e,t,i){return e.get(`${t}/api/cases/policy/${i}`,{params:{}}).then(e=>{const t=e.data;return t.success?{success:!0,data:t.data||{}}:{success:!1,message:t.message}}).catch(e=>({success:!1,error:e,data:{}}))}function r(e,t,i){const n={caseNo:String(i||"").trim()};return e.post(t+"/manager/api/cpic/caseRisksInternal",n||{}).then(e=>{const t=null===e||void 0===e?void 0:e.data,i=!t||!Object.prototype.hasOwnProperty.call(t,"success")||Boolean(t.success);var n;return i?{success:!0,data:null!==(n=null===t||void 0===t?void 0:t.data)&&void 0!==n?n:t,raw:t}:{success:!1,message:null===t||void 0===t?void 0:t.message,data:null===t||void 0===t?void 0:t.data,raw:t}}).catch(e=>({success:!1,error:e,data:null,raw:null}))}function s(e,t,i){const n=String(i||"").trim();return e.get(`${t}/api/sync-log/${n}`,{params:{},validateStatus:()=>!0}).then(e=>{const t=null===e||void 0===e?void 0:e.status,i=null===e||void 0===e?void 0:e.data,n=Number(t)>=200&&Number(t)<300;if(!n)return{success:!1,message:null===i||void 0===i?void 0:i.message,data:null===i||void 0===i?void 0:i.data,raw:i,status:t};const r=!i||!Object.prototype.hasOwnProperty.call(i,"success")||Boolean(i.success);var s;return r?{success:!0,data:null!==(s=null===i||void 0===i?void 0:i.data)&&void 0!==s?s:i,raw:i,status:t}:{success:!1,message:null===i||void 0===i?void 0:i.message,data:null===i||void 0===i?void 0:i.data,raw:i,status:t}}).catch(e=>{var t;return{success:!1,error:e,data:null,raw:null,status:null===e||void 0===e||null===(t=e.response)||void 0===t?void 0:t.status}})}function a(e,t,i){const n=String(i||"").trim();return e.get(`${t}/api/sync-log-v2/${n}`,{params:{},validateStatus:()=>!0}).then(e=>{const t=null===e||void 0===e?void 0:e.status,i=null===e||void 0===e?void 0:e.data,n=Number(t)>=200&&Number(t)<300;if(!n)return{success:!1,message:null===i||void 0===i?void 0:i.message,data:null===i||void 0===i?void 0:i.data,raw:i,status:t};const r=!i||!Object.prototype.hasOwnProperty.call(i,"success")||Boolean(i.success);var s;return r?{success:!0,data:null!==(s=null===i||void 0===i?void 0:i.data)&&void 0!==s?s:i,raw:i,status:t}:{success:!1,message:null===i||void 0===i?void 0:i.message,data:null===i||void 0===i?void 0:i.data,raw:i,status:t}}).catch(e=>{var t;return{success:!1,error:e,data:null,raw:null,status:null===e||void 0===e||null===(t=e.response)||void 0===t?void 0:t.status}})}function o(e,t,i){const n=i||{};return e.post(t+"/api/spider/crawl-cookie",n||{}).then(e=>{const t=null===e||void 0===e?void 0:e.data,i=!t||!Object.prototype.hasOwnProperty.call(t,"success")||Boolean(t.success);var n;return i?{success:!0,data:null!==(n=null===t||void 0===t?void 0:t.data)&&void 0!==n?n:t,raw:t}:{success:!1,message:null===t||void 0===t?void 0:t.message,data:null===t||void 0===t?void 0:t.data,raw:t}}).catch(e=>({success:!1,error:e,data:null,raw:null}))}function l(e,t,i,n={}){const r={};return void 0!==n.effective_only&&null!==n.effective_only&&(r.effective_only=String(n.effective_only)),void 0!==n.calculation_only&&null!==n.calculation_only&&(r.calculation_only=String(n.calculation_only)),e.get(`${t}/api/materials_pipeline/${i}`,{params:r}).then(e=>{const t=e.data;var i;return t.success?{success:!0,data:(null===(i=t.data)||void 0===i?void 0:i.materials)||[]}:{success:!1,message:t.message,data:[]}}).catch(e=>({success:!1,error:e,data:[]}))}function c(e,t,i,n,r={}){const s=String(i||"").trim(),a=void 0===n||null===n?"":String(n).trim(),o={};return void 0!==r.fileHash&&null!==r.fileHash&&String(r.fileHash).trim()&&(o.fileHash=String(r.fileHash).trim()),e.get(`${t}/manager/materials-pipeline-duplicates/${s}/${a}`,{params:o,validateStatus:()=>!0}).then(e=>{const t=null===e||void 0===e?void 0:e.status,i=null===e||void 0===e?void 0:e.data,n=Number(t)>=200&&Number(t)<300;if(!n)return{success:!1,message:null===i||void 0===i?void 0:i.message,data:null===i||void 0===i?void 0:i.data,raw:i,status:t};const r=!i||!Object.prototype.hasOwnProperty.call(i,"success")||Boolean(i.success);var s;return r?{success:!0,data:null!==(s=null===i||void 0===i?void 0:i.data)&&void 0!==s?s:i,raw:i,status:t}:{success:!1,message:null===i||void 0===i?void 0:i.message,data:null===i||void 0===i?void 0:i.data,raw:i,status:t}}).catch(e=>{var t;return{success:!1,error:e,data:null,raw:null,status:null===e||void 0===e||null===(t=e.response)||void 0===t?void 0:t.status}})}function u(e,t,i){return e.post(`${t}/api/adjustment/calculate/${i}`,{}).then(e=>{const t=e.data;if(t.success){var i;const e=(null===(i=t.data)||void 0===i?void 0:i.accident_report)||{};return{success:!0,data:{accident_report:e}}}return{success:!1,message:t.message}}).catch(e=>({success:!1,error:e,data:{}}))}function h(e,t,i){return e.get(`${t}/api/claims/${i}/injury-expenses`,{params:{}}).then(e=>{const t=e.data;return t.success?{success:!0,data:t.data||{}}:{success:!1,message:t.message}}).catch(e=>({success:!1,error:e}))}function d(e,t){return e.get(t+"/api/injury-expense/config",{params:{}}).then(e=>{const t=e.data;var i;return t.success?{success:!0,data:(null===(i=t.data)||void 0===i?void 0:i.items)||{}}:{success:!1,message:t.message}}).catch(e=>({success:!1,error:e}))}function p(e,t,i,n){return e.post(`${t}/api/materials_pipeline/${i}/sync`,n).then(e=>{const t=e.data;return t.success?{success:!0,data:t.data}:{success:!1,message:t.message||(null===(i=t.data)||void 0===i?void 0:i.message)};var i}).catch(e=>({success:!1,error:e}))}function g(e,t,i,n={}){const r={top_k:100,similarity_threshold:0,...n};return e.get(`${t}/api/materials_pipeline/${i}/similar`,{params:r}).then(e=>{const t=e.data;return t.success?{success:!0,data:t.data}:{success:!1,message:t.message}}).catch(e=>({success:!1,error:e}))}function f(e,t,i){return e.get(`${t}/api/materials_pipeline/${i}/ocr_result`,{params:{}}).then(e=>{const t=e.data;return t.success?{success:!0,data:t.data||{}}:{success:!1,message:t.message,data:{}}}).catch(e=>({success:!1,error:e,data:{}}))}function m(e,t,i){return e.get(`${t}/api/materials_pipeline/${i}/results`,{params:{}}).then(e=>{const t=e.data;return t.success?{success:!0,data:t.data||{}}:{success:!1,message:t.message,data:{}}}).catch(e=>({success:!1,error:e,data:{}}))}function v(e,t,i){return e.post(`${t}/api/adjustment/calculate/${i}`,{}).then(e=>{const t=e.data;return t.success?{success:!0,data:t.data}:{success:!1,message:t.message}}).catch(e=>({success:!1,error:e}))}function y(e,t,i,n,r){return e.post(`${t}/api/claims/${i}/injury-expenses/${n}`,r).then(e=>{const t=e.data;return t.success?{success:!0,data:t.data}:{success:!1,message:t.message}}).catch(e=>({success:!1,error:e}))}function b(e={}){const{instance:t,interfaceUrl:i,duplicateInterfaceUrl:b}=e;if(!t)throw new Error("instance is required");if(!i)throw new Error("interfaceUrl is required");return{getInsurancePolicy:e=>n(t,i,e),getCaseRisksInternal:e=>r(t,i,e),getSyncLog:e=>s(t,i,e),getSyncLogV2:e=>a(t,i,e),spiderCrawlCookie:e=>o(t,i,e),getCaseMaterials:(e,n)=>l(t,i,e,n),getDuplicateCases:(e,n,r)=>c(t,b||i,e,n,r),getAccidentReport:e=>u(t,i,e),getInjuryExpenses:e=>h(t,i,e),getConfig:()=>d(t,i),syncMaterial:(e,n)=>p(t,i,e,n),getSimilarMaterials:(e,n)=>g(t,i,e,n),getMaterialOcrResult:e=>f(t,i,e),getMaterialResults:e=>m(t,i,e),calculateAdjustment:e=>v(t,i,e),saveInjuryExpense:(e,n,r)=>y(t,i,e,n,r)}}},"2ab0":function(e,t,i){"use strict";i("bfba")},3739:function(e,t,i){"use strict";var n=i("04c2"),r=i("ac1e"),s=i("203c"),a=i("db2f"),o=i("62f1"),l=i("ed14"),c=i("d5f7"),u=i("8dda"),h=u("find",TypeError);n({target:"Iterator",proto:!0,real:!0,forced:h},{find:function(e){o(this);try{a(e)}catch(n){c(this,"throw",n)}if(h)return r(h,this,e);var t=l(this),i=0;return s(t,(function(t,n){if(e(t,i++))return n(t)}),{IS_RECORD:!0,INTERRUPTED:!0}).result}})},"39b8":function(e,t,i){"use strict";(function(e){var n=i("76b7"),r="object"==typeof exports&&exports&&!exports.nodeType&&exports,s=r&&"object"==typeof e&&e&&!e.nodeType&&e,a=s&&s.exports===r,o=a&&n["a"].process,l=function(){try{var e=s&&s.require&&s.require("util").types;return e||o&&o.binding&&o.binding("util")}catch(t){}}();t["a"]=l}).call(this,i("c8f3")(e))},"3d75":function(e,t,i){"use strict";var n=function(){var e,t=this,i=t._self._c;return i("div",{staticClass:"three-column-accident-detail"},[i("div",{staticClass:"accident-time"},[i("div",{staticClass:"accident-time__label"},[t._v("事故时间")]),i("div",{staticClass:"accident-time__content"},[t.editingAccidentTime?i("div",{staticClass:"edit-mode"},[i("el-date-picker",{staticClass:"small-date-picker",attrs:{type:"datetime",size:"small",format:"yyyy-MM-dd HH:mm","value-format":"yyyy-MM-dd HH:mm"},model:{value:t.localEditForm.accident_time,callback:function(e){t.$set(t.localEditForm,"accident_time",e)},expression:"localEditForm.accident_time"}}),i("div",{staticClass:"operation-buttons"},[i("i",{staticClass:"el-icon-check operation-icon",on:{click:t.handleSaveAccidentTime}}),i("i",{staticClass:"el-icon-close",on:{click:t.handleCancelAccidentTime}})])],1):i("div",{staticClass:"clickTxt",on:{click:t.handleStartEditAccidentTime}},[i("span",{staticClass:"time-value"},[t._v(t._s((null===(e=t.accidentData)||void 0===e?void 0:e.accident_time)||"--"))]),i("i",{staticClass:"el-icon-edit"})])])]),i("div",{staticClass:"accident-left"},[i("el-table",{staticClass:"width-100",attrs:{data:t.accidentTable||[],border:"","max-height":"250"}},[i("el-table-column",{attrs:{prop:"name",label:"当事人","min-width":"90"},scopedSlots:t._u([{key:"default",fn:function(e){return[t.editingRow===e.row?i("div",[i("el-input",{attrs:{size:"small"},model:{value:t.localEditForm.name,callback:function(e){t.$set(t.localEditForm,"name",e)},expression:"localEditForm.name"}})],1):i("div",{staticClass:"transport-with-icon"},[e.row.is_rider?i("span",{staticClass:"transport-icon icon-electric-bike"}):t._e(),i("span",{staticClass:"transport-name"},[t._v(t._s(e.row.name||"--"))])])]}}])}),i("el-table-column",{attrs:{prop:"id_number",label:"身份证号",width:"150"},scopedSlots:t._u([{key:"default",fn:function(e){return[t.editingRow===e.row?i("div",[i("el-input",{attrs:{size:"small"},model:{value:t.localEditForm.id_number,callback:function(e){t.$set(t.localEditForm,"id_number",e)},expression:"localEditForm.id_number"}})],1):i("div",[t._v(t._s(e.row.id_number||"--"))])]}}])}),i("el-table-column",{attrs:{prop:"liability",label:"责任",width:"60"},scopedSlots:t._u([{key:"default",fn:function(e){return[t.editingRow===e.row?i("div",[i("el-select",{attrs:{placeholder:"请选择"},model:{value:t.localEditForm.liability,callback:function(e){t.$set(t.localEditForm,"liability",e)},expression:"localEditForm.liability"}},t._l(t.liabilityOptions,(function(e){return i("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})})),1)],1):i("div",[t._v(t._s(e.row.liability||"--"))])]}}])}),i("el-table-column",{attrs:{prop:"transport_mode",label:"交通工具",width:"100"},scopedSlots:t._u([{key:"default",fn:function(e){return[t.editingRow===e.row?i("div",[i("el-select",{attrs:{size:"small",placeholder:"选择交通工具"},model:{value:t.localEditForm.transport_mode,callback:function(e){t.$set(t.localEditForm,"transport_mode",e)},expression:"localEditForm.transport_mode"}},[i("el-option",{attrs:{label:"机动车",value:"机动车"}}),i("el-option",{attrs:{label:"非机动车",value:"非机动车"}}),i("el-option",{attrs:{label:"行人",value:"行人"}}),i("el-option",{attrs:{label:"其他",value:"其他"}})],1)],1):i("div",{staticClass:"transport-with-icon"},[i("span",[t._v(t._s(e.row.transport_mode||"--"))])])]}}])}),i("el-table-column",{attrs:{label:"操作",fixed:"right",width:"70"},scopedSlots:t._u([{key:"default",fn:function(e){return[t.editingRow===e.row?i("div",{staticClass:"operation-buttons"},[i("i",{staticClass:"el-icon-check operation-icon",on:{click:function(i){return t.handleSaveEdit(e.row,e.$index)}}}),i("i",{staticClass:"el-icon-close",on:{click:function(i){return t.handleCancelEdit(e.row,e.$index)}}})]):i("div",{staticClass:"operation-buttons"},[i("i",{staticClass:"el-icon-edit operation-icon",on:{click:function(i){return t.handleStartEdit(e.row)}}}),i("i",{staticClass:"el-icon-delete",attrs:{disabled:t.accidentTable.length<=1},on:{click:function(i){return t.handleDeleteRow(e.row)}}})])]}}])})],1),t.accidentTable&&0===t.accidentTable.length?i("div",{staticClass:"addBtn"},[i("el-button",{attrs:{type:"warning",size:"mini"},on:{click:function(e){return t.handleAddAccidentRow("addBtn")}}},[t._v('添加"当前保单骑手"作为当事人')])],1):t._e(),i("div",{staticClass:"add-btn-box"},[i("el-button",{attrs:{type:"primary",size:"mini"},on:{click:function(e){return t.handleAddAccidentRow()}}},[t._v("添加")])],1)],1)])},r=[],s={name:"ThreeColumnAccidentDetailEditor",props:{accidentData:{type:Object,default:()=>({})},accidentTable:{type:Array,default:()=>[]},liabilityOptions:{type:Array,default:()=>[]}},data(){return{editingAccidentTime:!1,editingRow:null,localEditForm:{name:"",id_number:"",liability:"",transport_mode:"",accident_time:""}}},methods:{handleAddAccidentRow(e){this.$emit("add-accident-row",e),this.$emit("dirty")},handleStartEditAccidentTime(){var e;this.editingAccidentTime=!0,this.localEditForm.accident_time=(null===(e=this.accidentData)||void 0===e?void 0:e.accident_time)||""},handleSaveAccidentTime(){this.$emit("save-accident-time",this.localEditForm.accident_time),this.editingAccidentTime=!1,this.$emit("dirty")},handleCancelAccidentTime(){this.editingAccidentTime=!1,this.localEditForm.accident_time=""},handleStartEdit(e){this.editingRow=e,this.localEditForm={name:e.name||"",id_number:e.id_number||"",liability:e.liability||"",transport_mode:e.transport_mode||"",accident_time:this.localEditForm.accident_time||""}},handleSaveEdit(e,t){this.$emit("save-edit",{...e,...this.localEditForm},t),this.editingRow=null,this.$emit("dirty")},handleCancelEdit(e,t){this.editingRow=null,this.$emit("cancel-edit",e,t)},handleDeleteRow(e){this.$emit("delete-row",e),this.$emit("dirty")}}},a=s,o=(i("f490"),i("1805")),l=Object(o["a"])(a,n,r,!1,null,"19502252",null);t["a"]=l.exports},"429c":function(e,t,i){"use strict";i("c49a")},"4a01":function(e,t,i){},"4f93":function(e,t,i){"use strict";i("296e")},5706:function(e,t,i){"use strict";i("e279")},5774:function(e,t,i){"use strict";i.d(t,"a",(function(){return j}));i("b138"),i("865d"),i("8f26"),i("d9d9"),i("666b"),i("1447"),i("209c"),i("f803");var n=i("472a"),r=i("ff5b"),s=i("dd32");async function a(e,t){const i=e.target;if(!i)return;const a=Array.isArray(null===t||void 0===t?void 0:t.materialDetail)&&t.materialDetail.length>0?t.materialDetail[0]:null===t||void 0===t?void 0:t.materialDetail,o=Object(s["d"])(t)||Object(s["d"])(a)||"";if(o&&Object(s["b"])(o))try{const e=Object(s["c"])(t)||0;if(e&&(null===t||void 0===t||!t.__ossRotateDisabled)&&!i.dataset.ossRotateFallbackAttempted){i.dataset.ossRotateFallbackAttempted="true",t&&"object"===typeof t&&(t.__ossRotateDisabled=!0),a&&"object"===typeof a&&(a.__ossRotateDisabled=!0);const e=await Object(n["b"])(o,{angle:0,disableRotate:!0});if(e)return i.src=e,t&&"object"===typeof t&&(t.oss_preview_url=e),void(a&&"object"===typeof a&&(a.oss_preview_url=e))}if(i.dataset.ossTokenRetryAttempted)return;i.dataset.ossTokenRetryAttempted="true",await Object(r["e"])();const l=Boolean(null===t||void 0===t?void 0:t.__ossRotateDisabled),c=await Object(n["b"])(o,{angle:l?0:e,disableRotate:l});c&&(i.src=c,t&&"object"===typeof t&&(t.oss_preview_url=c),a&&"object"===typeof a&&(a.oss_preview_url=c))}catch(l){}}function o(e,t,i,n,r,s,a,o,c=null,u=null){const h=e=>{var t,i;return e.materialDetail&&e.materialDetail.length>0?(null===(t=e.materialDetail[0])||void 0===t?void 0:t.id)||(null===(i=e.materialDetail[0])||void 0===i?void 0:i.material_id):e.id||e.material_id},d=h(t);if(t.materialDetail&&t.materialDetail.length>0)t.materialDetail.forEach(t=>{e.$set(t,"handwork_flag",n);const i=t.material_id||t.id;i?r.post(`${s}/api/materials_pipeline/${i}/sync`,t).then(i=>{let n=i.data;var r;n.success?(l(e,t.id||t.material_id,n.data,c,u),a.success("更新成功!"),o()):a.error((null===(r=n.data)||void 0===r?void 0:r.message)||"更新失败!")}).catch(e=>{var t;a.error((null===e||void 0===e||null===(t=e.response)||void 0===t||null===(t=t.data)||void 0===t?void 0:t.message)||"更新失败,请稍后重试")}):a.error("材料ID缺失,无法更新")});else{e.$set(t,"handwork_flag",n);const i=t.material_id||t.id;if(!i)return void a.error("材料ID缺失,无法更新");r.post(`${s}/api/materials_pipeline/${i}/sync`,t).then(t=>{let i=t.data;var n;i.success?(l(e,d,i.data,c,u),a.success("更新成功!"),o()):a.error((null===(n=i.data)||void 0===n?void 0:n.message)||"更新失败!")}).catch(e=>{var t;a.error((null===e||void 0===e||null===(t=e.response)||void 0===t||null===(t=t.data)||void 0===t?void 0:t.message)||"更新失败,请稍后重试")})}}function l(e,t,i,n,r){if(n&&t&&i){if(n.previewImages&&Array.isArray(n.previewImages)&&n.previewImages.forEach((e,r)=>{const s=e.id||e.material_id;s&&String(s)===String(t)&&Object.assign(n.previewImages[r],JSON.parse(JSON.stringify(i)))}),n.currentImage){const e=n.currentImage.id||n.currentImage.material_id;e&&String(e)===String(t)&&Object.assign(n.currentImage,JSON.parse(JSON.stringify(i)))}if(r){const e=t,s=n.dialogTitle||"";let a=null;-1!==s.indexOf("医疗发票")?a=r.medicalInvoiceData:-1!==s.indexOf("无效发票")?a=r.invalidInvoiceData:-1!==s.indexOf("医疗费用清单")||-1!==s.indexOf("清单")?a=r.medicalBillData:-1===s.indexOf("事故责任认定书")&&-1===s.indexOf("认定书")||(a=r.accidentImgData),a&&Array.isArray(a)&&a.forEach(t=>{if(null!==t&&void 0!==t&&t.materialDetail){const n=Array.isArray(t.materialDetail)?t.materialDetail:[t.materialDetail];n.forEach(t=>{!t||t.id!==e&&t.material_id!==e||Object.assign(t,JSON.parse(JSON.stringify(i)))})}})}}}function c(e){if(void 0===e||null===e)return null;let t="string"===typeof e?e:String(e);if(!t.trim())return null;t=t.replace(/[\uFF10-\uFF19]/g,e=>String.fromCharCode(e.charCodeAt(0)-65248)).replace(/\uFF0E/g,".").replace(/\uFF0D/g,"-").replace(/\uFF0C/g,",").replace(/。/g,".").replace(/[¥¥]/g,"");const i=t.replace(/[\s,,]/g,""),n=i.match(/-?\d+(?:\.\d+)?/);if(!n)return null;const r=parseFloat(n[0]);return isNaN(r)?null:r}function u(e,t,i){if(!t||!i)return;const n=t.clipboardData||window.clipboardData;if(!n)return;const r=n.getData("text"),s=c(r);null!==s&&(t.preventDefault(),e.$set(i,"Amount",s))}function h(e,t,i,n){if(n)try{const e="function"===typeof n?n():n;if(!e||!e.$refs)return;const r=e.$refs.previewImgDeal;if(!r||"function"!==typeof r.setActiveChargeHighlight)return;r.setActiveChargeHighlight(t,i)}catch(r){console.warn("handleChargeFieldHover error:",r)}}function d(e,t){if(t)try{const e="function"===typeof t?t():t;if(!e||!e.$refs)return;const i=e.$refs.previewImgDeal;if(!i||"function"!==typeof i.clearActiveChargeHighlight)return;i.clearActiveChargeHighlight()}catch(i){console.warn("handleChargeFieldLeave error:",i)}}function p(e,t){t.currentImage||e.$set(t,"currentImage",{}),t.currentImage.chargeList||e.$set(t.currentImage,"chargeList",[]);const i=t.currentImage.chargeList,n=i.length,r=Date.now(),s=Math.random().toString(36).substr(2,9),a={ProjectName:"",Amount:"",Category:"材料与耗材费用",amountShow:!0,id:`charge-${r}-${s}`,_originalIndex:n};i.push(a)}function g(e,t,i){t.currentImage&&t.currentImage.chargeList&&i>=0&&i{const i=t.data;if(i.success){if(Object.assign(s,JSON.parse(JSON.stringify(h))),a&&a.previewImages&&Array.isArray(a.previewImages)&&a.previewImages.forEach((e,t)=>{!e||e.id!==d&&e.material_id!==d||Object.assign(a.previewImages[t],JSON.parse(JSON.stringify(s)))}),o&&s){const e=s.material_id||s.id,t=(null===a||void 0===a?void 0:a.dialogTitle)||"";let i=null;-1!==t.indexOf("医疗发票")?i=o.medicalInvoiceData:-1!==t.indexOf("无效发票")&&(i=o.invalidInvoiceData),i&&Array.isArray(i)&&i.forEach(t=>{if(null!==t&&void 0!==t&&t.materialDetail){const i=Array.isArray(t.materialDetail)?t.materialDetail:[t.materialDetail];i.forEach(t=>{!t||t.id!==e&&t.material_id!==e||Object.assign(t,JSON.parse(JSON.stringify(s)))})}})}e.$nextTick(()=>{u?u():c&&c()})}else{var n;l.error((null===(n=i.data)||void 0===n?void 0:n.message)||"检查费项更新失败")}}).catch(e=>{var t;l.error((null===e||void 0===e||null===(t=e.response)||void 0===t||null===(t=t.data)||void 0===t?void 0:t.message)||"检查费项更新失败,请稍后重试")})}}function b(e,t,i){if(!t||!t.currentImage)return;const n=t.currentImage,r=n.id||n.material_id,s=n.materials_type;t.previewImages&&Array.isArray(t.previewImages)&&t.previewImages.forEach(t=>{const i=t.id||t.material_id;i&&String(i)===String(r)&&e.$set(t,"materials_type",s)}),s&&-1!=s.indexOf("发票")&&i&&i()}function C(e,t,i,n,r,s,a,o){const l=a(i,"mouse"),c=l.filter(e=>e.label===r);c.length>0&&i.materialDetail&&i.materialDetail[0]&&c.forEach((e,t)=>{const r={...e,highlightIndex:t};o(null,i.materialDetail[0],r,s+"-"+n)})}function w(e,t,i,n){if("合计"==t.project_name)return;let r=i.findIndex(e=>e.material_id===t.material_id);n("医疗费用清单",r)}function x(e,t,i,n){if("合计"===t.invoice_no)return;let r=t.matchedMaterials||[];i.dialogTitle="医疗发票",i.previewImages=r,i.hasBottomData=r.length>0,i.dialogVisible=!0,n(0)}function S(e,t){t.isImgLoading=!1,e.$set(t,"currentImage",{...t.currentImage,url:"https://via.placeholder.com/800x600?text=图片加载失败"})}function _(e,t,i){i.success("已选中:"+t.currentImage.name),t.dialogVisible=!1}function A(e,t){e.$set(t,"previewImages",[]),e.$set(t,"currentIndex",0),e.$set(t,"currentImage",{}),e.$set(t,"isImgLoading",!1)}function M(e,t,i){var n,r,s,a,o,l,c,u;const h=String(t||"").trim();e.navForm.caseNo=h;const d={caseNo:h},p=null===e||void 0===e||null===(n=e.materialQueryParams)||void 0===n?void 0:n.effective_only,g=null===e||void 0===e||null===(r=e.materialQueryParams)||void 0===r?void 0:r.calculation_only;null!==p&&void 0!==p&&""!==String(p).trim()&&(d.effective_only=p),null!==g&&void 0!==g&&""!==String(g).trim()&&(d.calculation_only=g);const f=(null===e||void 0===e||null===(s=e.$route)||void 0===s?void 0:s.query)||{},m=String(f.caseNo||"")===h&&String(null!==(a=f.effective_only)&&void 0!==a?a:"")===String(null!==(o=d.effective_only)&&void 0!==o?o:"")&&String(null!==(l=f.calculation_only)&&void 0!==l?l:"")===String(null!==(c=d.calculation_only)&&void 0!==c?c:"")&&!f.focusMaterialId&&!f.focusFileHash&&!f.focusMaterialType&&!f.sourceCaseNo&&!f.sourceMaterialId;var v;!m&&null!==e&&void 0!==e&&null!==(u=e.$router)&&void 0!==u&&u.replace&&e.$router.replace({path:(null===(v=e.$route)||void 0===v?void 0:v.path)||"/calculatorTool/medicalThreeColumn",query:d}).catch(()=>{});i()}function k(e,t){e.calculationData=t}function I(e,t,i,n,r,s){0==i?e.checked1=!1:e.checked0=!1,s.name7=e.checked0||e.checked1}function D(e,t,i){e.$nextTick(()=>{var e;const n=i();if(!n)return;const r=n.$refs.listContainer,s=null===(e=n.$refs.imgList)||void 0===e?void 0:e.children[t.currentIndex];if(!s||!r)return;const a=s.offsetLeft,o=s.offsetWidth,l=r.clientWidth,c=r.scrollLeft,u=a+o,h=c+l;ah&&r.scrollTo({left:u-l,behavior:"smooth"})})}function T(e,t,i){t.currentIndex>0&&i(t.currentIndex-1)}function E(e,t,i){t.currentIndex0?t[0]:t,r=Object(s["d"])(e);if(!r||!Object(s["b"])(r))return"";if(e.oss_preview_url)return e.oss_preview_url;const a=e||i,o=null!==a&&void 0!==a&&a.__ossRotateDisabled?0:Object(s["c"])(a)||0,l=Object(n["d"])(r,{angle:o,disableRotate:Boolean(null===a||void 0===a?void 0:a.__ossRotateDisabled)});return l&&"object"===typeof e&&(e.oss_preview_url=l,!e.oss_path&&r&&(e.oss_path=r),i&&"object"===typeof i&&(i.oss_preview_url=l,!i.oss_path&&r&&(i.oss_path=r))),l||""}function O(e){return e||""}function N(e,t){if(!Array.isArray(e))return"--";const i=e.reduce((e,i)=>{if(i&&"object"===typeof i){const n=i[t];if(null!==n&&void 0!==n&&"--"!==n){const t=Number(n);if(!isNaN(t))return e+t}}return e},0);return i>0?i:"--"}function j(e={}){const{vueInstance:t,axiosInstance:i,apiInterfaceUrl:n,previewState:r,imagePreviewPanelRef:s,onMessage:l,onSuccess:j}=e;return t?{handleImageError:(e,t)=>a(e,t),handleCheckClick:(e,s,a,c=null)=>o(t,e,s,a,i,n,l,j,r,c),normalizeChargeAmountInput:e=>c(e),handleChargeAmountPaste:(e,i)=>u(t,e,i),handleChargeFieldHover:(e,i)=>h(t,e,i,s),handleChargeFieldLeave:()=>d(t,s),updateCharge:()=>p(t,r),deleteCharge:e=>g(t,r,e),toggleExpanded:(e,i)=>f(t,e,i),handlePersonalPaymentInput:(e,i)=>m(t,e,i),handleOtherPaymentInput:(e,i)=>v(t,e,i),handleExaminationFeeUpdate:(e,r,s,a,o)=>y(t,e,r,i,n,s.currentImage,s,a,l,j,o),handleMaterialsTypeChange:e=>b(t,r,e),handleInvoiceNoMouseEnter:(e,i,n,r,s,a,o)=>C(t,e,i,n,r,s,a,o),highCostClick:(e,i,n)=>w(t,e,i,n),handleInvoiceClick:(e,i)=>x(t,e,r,i),handleImgError:()=>S(t,r),confirmPreview:()=>_(t,r,l),resetPreview:()=>A(t,r),handleCaseSearch:(e,i)=>M(t,e,i),handleUpdateCalculationData:e=>k(t,e),handleCheckedChange:(e,i,n,r,s)=>I(t,e,i,n,r,s),scrollToActiveItem:()=>D(t,r,s),handleBottomPrev:e=>T(t,r,e),handleBottomNext:e=>E(t,r,e),getImageUrl:e=>P(e),formatFormula:e=>O(e),calculateTotalAmount:(e,t)=>N(e,t)}:(console.warn("useMedicalUIHandlers: vueInstance is required"),{})}},"5a18":function(e,t,i){},"5b89":function(e,t,i){},"5d85":function(e,t,i){var n,r; /*! * jQuery JavaScript Library v4.0.0 * https://jquery.com/ * * Copyright OpenJS Foundation and other contributors * Released under the MIT license * https://jquery.com/license/ * * Date: 2026-01-18T00:20Z */(function(t,i){"use strict";"object"===typeof e.exports?e.exports=i(t,!0):i(t)})("undefined"!==typeof window?window:this,(function(i,s){"use strict";if(!i.document)throw new Error("jQuery requires a window with a document");var a=[],o=Object.getPrototypeOf,l=a.slice,c=a.flat?function(e){return a.flat.call(e)}:function(e){return a.concat.apply([],e)},u=a.push,h=a.indexOf,d={},p=d.toString,g=d.hasOwnProperty,f=g.toString,m=f.call(Object),v={};function y(e){return null==e?e+"":"object"===typeof e?d[p.call(e)]||"object":typeof e}function b(e){return null!=e&&e===e.window}function C(e){var t=!!e&&e.length,i=y(e);return"function"!==typeof e&&!b(e)&&("array"===i||0===t||"number"===typeof t&&t>0&&t-1 in e)}var w=i.document,x={type:!0,src:!0,nonce:!0,noModule:!0};function S(e,t,i){i=i||w;var n,r=i.createElement("script");for(n in r.text=e,x)t&&t[n]&&(r[n]=t[n]);i.head.appendChild(r).parentNode&&r.parentNode.removeChild(r)}var _="4.0.0",A=/HTML$/i,M=function(e,t){return new M.fn.init(e,t)};function k(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}M.fn=M.prototype={jquery:_,constructor:M,length:0,toArray:function(){return l.call(this)},get:function(e){return null==e?l.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){var t=M.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return M.each(this,e)},map:function(e){return this.pushStack(M.map(this,(function(t,i){return e.call(t,i,t)})))},slice:function(){return this.pushStack(l.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},even:function(){return this.pushStack(M.grep(this,(function(e,t){return(t+1)%2})))},odd:function(){return this.pushStack(M.grep(this,(function(e,t){return t%2})))},eq:function(e){var t=this.length,i=+e+(e<0?t:0);return this.pushStack(i>=0&&i+~]|"+D+")"+D+"*"),j=new RegExp(D+"|>"),L=/[+~]/,F=w.documentElement,R=F.matches||F.msMatchesSelector;function $(){var e=[];function t(i,n){return e.push(i+" ")>M.expr.cacheLength&&delete t[e.shift()],t[i+" "]=n}return t}function B(e){return e&&"undefined"!==typeof e.getElementsByTagName&&e}var z="\\["+D+"*("+O+")(?:"+D+"*([*^$|!~]?=)"+D+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+O+"))|)"+D+"*\\]",H=":("+O+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+z+")*)|.*)\\)|)",V={ID:new RegExp("^#("+O+")"),CLASS:new RegExp("^\\.("+O+")"),TAG:new RegExp("^("+O+"|[*])"),ATTR:new RegExp("^"+z),PSEUDO:new RegExp("^"+H),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+D+"*(even|odd|(([+-]|)(\\d*)n|)"+D+"*(?:([+-]|)"+D+"*(\\d+)|))"+D+"*\\)|)","i")},G=new RegExp(H),U=new RegExp("\\\\[\\da-fA-F]{1,6}"+D+"?|\\\\([^\\r\\n\\f])","g"),q=function(e,t){var i="0x"+e.slice(1)-65536;return t||(i<0?String.fromCharCode(i+65536):String.fromCharCode(i>>10|55296,1023&i|56320))};function W(e){return e.replace(U,q)}function X(e){M.error("Syntax error, unrecognized expression: "+e)}var Y=new RegExp("^"+D+"*,"+D+"*"),J=$();function K(e,t){var i,n,r,s,a,o,l,c=J[e+" "];if(c)return t?0:c.slice(0);a=e,o=[],l=M.expr.preFilter;while(a){for(s in i&&!(n=Y.exec(a))||(n&&(a=a.slice(n[0].length)||a),o.push(r=[])),i=!1,(n=N.exec(a))&&(i=n.shift(),r.push({value:i,type:n[0].replace(P," ")}),a=a.slice(i.length)),V)!(n=M.expr.match[s].exec(a))||l[s]&&!(n=l[s](n))||(i=n.shift(),r.push({value:i,type:s,matches:n}),a=a.slice(i.length));if(!i)break}return t?a.length:a?X(e):J(e,o).slice(0)}var Z={ATTR:function(e){return e[1]=W(e[1]),e[3]=W(e[3]||e[4]||e[5]||""),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||X(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&X(e[0]),e},PSEUDO:function(e){var t,i=!e[6]&&e[2];return V.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":i&&G.test(i)&&(t=K(i,!0))&&(t=i.indexOf(")",i.length-t)-i.length)&&(e[0]=e[0].slice(0,t),e[2]=i.slice(0,t)),e.slice(0,3))}};function Q(e){for(var t=0,i=e.length,n="";t1)},removeAttr:function(e){return this.each((function(){M.removeAttr(this,e)}))}}),M.extend({attr:function(e,t,i){var n,r,s=e.nodeType;if(3!==s&&8!==s&&2!==s)return"undefined"===typeof e.getAttribute?M.prop(e,t,i):(1===s&&M.isXMLDoc(e)||(r=M.attrHooks[t.toLowerCase()]),void 0!==i?null===i||!1===i&&0!==t.toLowerCase().indexOf("aria-")?void M.removeAttr(e,t):r&&"set"in r&&void 0!==(n=r.set(e,i,t))?n:(e.setAttribute(t,i),i):r&&"get"in r&&null!==(n=r.get(e,t))?n:(n=e.getAttribute(t),null==n?void 0:n))},attrHooks:{},removeAttr:function(e,t){var i,n=0,r=t&&t.match(te);if(r&&1===e.nodeType)while(i=r[n++])e.removeAttribute(i)}}),T&&(M.attrHooks.type={set:function(e,t){if("radio"===t&&k(e,"input")){var i=e.value;return e.setAttribute("type",t),i&&(e.value=i),t}}});var ie=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g;function ne(e,t){return t?"\0"===e?"�":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e}M.escapeSelector=function(e){return(e+"").replace(ie,ne)};var re,se=a.sort,ae=a.splice;function oe(e,t){if(e===t)return re=!0,0;var i=!e.compareDocumentPosition-!t.compareDocumentPosition;return i||(i=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1,1&i?e==w||e.ownerDocument==w&&M.contains(w,e)?-1:t==w||t.ownerDocument==w&&M.contains(w,t)?1:0:4&i?-1:1)}M.uniqueSort=function(e){var t,i=[],n=0,r=0;if(re=!1,se.call(e,oe),re){while(t=e[r++])t===e[r]&&(n=i.push(r));while(n--)ae.call(e,i[n],1)}return e},M.fn.uniqueSort=function(){return this.pushStack(M.uniqueSort(l.apply(this)))};var le,ce,ue,he,de,pe=0,ge=0,fe=$(),me=$(),ve=$(),ye=new RegExp(D+"+","g"),be=new RegExp("^"+O+"$"),Ce=M.extend({needsContext:new RegExp("^"+D+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+D+"*((?:-\\d)?\\d*)"+D+"*\\)|)(?=[^-]|$)","i")},V),we=/^(?:input|select|textarea|button)$/i,xe=/^h\d$/i,Se=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,_e=function(){Pe()},Ae=Ne((function(e){return!0===e.disabled&&k(e,"fieldset")}),{dir:"parentNode",next:"legend"});function Me(e,t,i,n){var r,s,a,o,l,c,h,d=t&&t.ownerDocument,p=t?t.nodeType:9;if(i=i||[],"string"!==typeof e||!e||1!==p&&9!==p&&11!==p)return i;if(!n&&(Pe(t),t=t||ue,de)){if(11!==p&&(l=Se.exec(e)))if(r=l[1]){if(9===p)return(a=t.getElementById(r))&&u.call(i,a),i;if(d&&(a=d.getElementById(r))&&M.contains(t,a))return u.call(i,a),i}else{if(l[2])return u.apply(i,t.getElementsByTagName(e)),i;if((r=l[3])&&t.getElementsByClassName)return u.apply(i,t.getElementsByClassName(r)),i}if(!ve[e+" "]&&(!E||!E.test(e))){if(h=e,d=t,1===p&&(j.test(e)||N.test(e))){d=L.test(e)&&B(t.parentNode)||t,(d!=t||T)&&((o=t.getAttribute("id"))?o=M.escapeSelector(o):t.setAttribute("id",o=M.expando)),c=K(e),s=c.length;while(s--)c[s]=(o?"#"+o:":scope")+" "+Q(c[s]);h=c.join(",")}try{return u.apply(i,d.querySelectorAll(h)),i}catch(g){ve(e,!0)}finally{o===M.expando&&t.removeAttribute("id")}}}return He(e.replace(P,"$1"),t,i,n)}function ke(e){return e[M.expando]=!0,e}function Ie(e){return function(t){return k(t,"input")&&t.type===e}}function De(e){return function(t){return(k(t,"input")||k(t,"button"))&&t.type===e}}function Te(e){return function(t){return"form"in t?t.parentNode&&!1===t.disabled?"label"in t?"label"in t.parentNode?t.parentNode.disabled===e:t.disabled===e:t.isDisabled===e||t.isDisabled!==!e&&Ae(t)===e:t.disabled===e:"label"in t&&t.disabled===e}}function Ee(e){return ke((function(t){return t=+t,ke((function(i,n){var r,s=e([],i.length,t),a=s.length;while(a--)i[r=s[a]]&&(i[r]=!(n[r]=i[r]))}))}))}function Pe(e){var t,i=e?e.ownerDocument||e:w;i!=ue&&9===i.nodeType&&(ue=i,he=ue.documentElement,de=!M.isXMLDoc(ue),T&&w!=ue&&(t=ue.defaultView)&&t.top!==t&&t.addEventListener("unload",_e))}for(le in Me.matches=function(e,t){return Me(e,null,null,t)},Me.matchesSelector=function(e,t){if(Pe(e),de&&!ve[t+" "]&&(!E||!E.test(t)))try{return R.call(e,t)}catch(i){ve(t,!0)}return Me(t,ue,null,[e]).length>0},M.expr={cacheLength:50,createPseudo:ke,match:Ce,find:{ID:function(e,t){if("undefined"!==typeof t.getElementById&&de){var i=t.getElementById(e);return i?[i]:[]}},TAG:function(e,t){return"undefined"!==typeof t.getElementsByTagName?t.getElementsByTagName(e):t.querySelectorAll(e)},CLASS:function(e,t){if("undefined"!==typeof t.getElementsByClassName&&de)return t.getElementsByClassName(e)}},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:Z,filter:{ID:function(e){var t=W(e);return function(e){return e.getAttribute("id")===t}},TAG:function(e){var t=W(e).toLowerCase();return"*"===e?function(){return!0}:function(e){return k(e,t)}},CLASS:function(e){var t=fe[e+" "];return t||(t=new RegExp("(^|"+D+")"+e+"("+D+"|$)"))&&fe(e,(function(e){return t.test("string"===typeof e.className&&e.className||"undefined"!==typeof e.getAttribute&&e.getAttribute("class")||"")}))},ATTR:function(e,t,i){return function(n){var r=M.attr(n,e);return null==r?"!="===t:!t||(r+="","="===t?r===i:"!="===t?r!==i:"^="===t?i&&0===r.indexOf(i):"*="===t?i&&r.indexOf(i)>-1:"$="===t?i&&r.slice(-i.length)===i:"~="===t?(" "+r.replace(ye," ")+" ").indexOf(i)>-1:"|="===t&&(r===i||r.slice(0,i.length+1)===i+"-"))}},CHILD:function(e,t,i,n,r){var s="nth"!==e.slice(0,3),a="last"!==e.slice(-4),o="of-type"===t;return 1===n&&0===r?function(e){return!!e.parentNode}:function(t,i,l){var c,u,h,d,p,g=s!==a?"nextSibling":"previousSibling",f=t.parentNode,m=o&&t.nodeName.toLowerCase(),v=!l&&!o,y=!1;if(f){if(s){while(g){h=t;while(h=h[g])if(o?k(h,m):1===h.nodeType)return!1;p=g="only"===e&&!p&&"nextSibling"}return!0}if(p=[a?f.firstChild:f.lastChild],a&&v){u=f[M.expando]||(f[M.expando]={}),c=u[e]||[],d=c[0]===pe&&c[1],y=d&&c[2],h=d&&f.childNodes[d];while(h=++d&&h&&h[g]||(y=d=0)||p.pop())if(1===h.nodeType&&++y&&h===t){u[e]=[pe,d,y];break}}else if(v&&(u=t[M.expando]||(t[M.expando]={}),c=u[e]||[],d=c[0]===pe&&c[1],y=d),!1===y)while(h=++d&&h&&h[g]||(y=d=0)||p.pop())if((o?k(h,m):1===h.nodeType)&&++y&&(v&&(u=h[M.expando]||(h[M.expando]={}),u[e]=[pe,y]),h===t))break;return y-=r,y===n||y%n===0&&y/n>=0}}},PSEUDO:function(e,t){var i=M.expr.pseudos[e]||M.expr.setFilters[e.toLowerCase()]||X("unsupported pseudo: "+e);return i[M.expando]?i(t):i}},pseudos:{not:ke((function(e){var t=[],i=[],n=ze(e.replace(P,"$1"));return n[M.expando]?ke((function(e,t,i,r){var s,a=n(e,null,r,[]),o=e.length;while(o--)(s=a[o])&&(e[o]=!(t[o]=s))})):function(e,r,s){return t[0]=e,n(t,null,s,i),t[0]=null,!i.pop()}})),has:ke((function(e){return function(t){return Me(e,t).length>0}})),contains:ke((function(e){return e=W(e),function(t){return(t.textContent||M.text(t)).indexOf(e)>-1}})),lang:ke((function(e){return be.test(e||"")||X("unsupported lang: "+e),e=W(e).toLowerCase(),function(t){var i;do{if(i=de?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return i=i.toLowerCase(),i===e||0===i.indexOf(e+"-")}while((t=t.parentNode)&&1===t.nodeType);return!1}})),target:function(e){var t=i.location&&i.location.hash;return t&&t.slice(1)===e.id},root:function(e){return e===he},focus:function(e){return e===ue.activeElement&&ue.hasFocus()&&!!(e.type||e.href||~e.tabIndex)},enabled:Te(!1),disabled:Te(!0),checked:function(e){return k(e,"input")&&!!e.checked||k(e,"option")&&!!e.selected},selected:function(e){return T&&e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!M.expr.pseudos.empty(e)},header:function(e){return xe.test(e.nodeName)},input:function(e){return we.test(e.nodeName)},button:function(e){return k(e,"input")&&"button"===e.type||k(e,"button")},text:function(e){return k(e,"input")&&"text"===e.type},first:Ee((function(){return[0]})),last:Ee((function(e,t){return[t-1]})),eq:Ee((function(e,t,i){return[i<0?i+t:i]})),even:Ee((function(e,t){for(var i=0;it?t:i;--n>=0;)e.push(n);return e})),gt:Ee((function(e,t,i){for(var n=i<0?i+t:i;++n1?function(t,i,n){var r=e.length;while(r--)if(!e[r](t,i,n))return!1;return!0}:e[0]}function Le(e,t,i){for(var n=0,r=t.length;n-1&&(s[c]=!(a[c]=p))}}else g=Fe(g===a?g.splice(v,g.length):g),r?r(null,a,g,l):u.apply(a,g)}))}function $e(e){for(var t,i,n,r=e.length,s=M.expr.relative[e[0].type],a=s||M.expr.relative[" "],o=s?1:0,l=Ne((function(e){return e===t}),a,!0),c=Ne((function(e){return h.call(t,e)>-1}),a,!0),u=[function(e,i,n){var r=!s&&(n||i!=ce)||((t=i).nodeType?l(e,i,n):c(e,i,n));return t=null,r}];o1&&je(u),o>1&&Q(e.slice(0,o-1).concat({value:" "===e[o-2].type?"*":""})).replace(P,"$1"),i,o0,n=e.length>0,r=function(r,s,a,o,l){var c,h,d,p=0,g="0",f=r&&[],m=[],v=ce,y=r||n&&M.expr.find.TAG("*",l),b=pe+=null==v?1:Math.random()||.1;for(l&&(ce=s==ue||s||l);null!=(c=y[g]);g++){if(n&&c){h=0,s||c.ownerDocument==ue||(Pe(c),a=!de);while(d=e[h++])if(d(c,s||ue,a)){u.call(o,c);break}l&&(pe=b)}i&&((c=!d&&c)&&p--,r&&f.push(c))}if(p+=g,i&&g!==p){h=0;while(d=t[h++])d(f,m,s,a);if(r){if(p>0)while(g--)f[g]||m[g]||(m[g]=I.call(o));m=Fe(m)}u.apply(o,m),l&&!r&&m.length>0&&p+t.length>1&&M.uniqueSort(o)}return l&&(pe=b,ce=v),f};return i?ke(r):r}function ze(e,t){var i,n=[],r=[],s=me[e+" "];if(!s){t||(t=K(e)),i=t.length;while(i--)s=$e(t[i]),s[M.expando]?n.push(s):r.push(s);s=me(e,Be(r,n)),s.selector=e}return s}function He(e,t,i,n){var r,s,a,o,l,c="function"===typeof e&&e,h=!n&&K(e=c.selector||e);if(i=i||[],1===h.length){if(s=h[0]=h[0].slice(0),s.length>2&&"ID"===(a=s[0]).type&&9===t.nodeType&&de&&M.expr.relative[s[1].type]){if(t=(M.expr.find.ID(W(a.matches[0]),t)||[])[0],!t)return i;c&&(t=t.parentNode),e=e.slice(s.shift().value.length)}r=Ce.needsContext.test(e)?0:s.length;while(r--){if(a=s[r],M.expr.relative[o=a.type])break;if((l=M.expr.find[o])&&(n=l(W(a.matches[0]),L.test(s[0].type)&&B(t.parentNode)||t))){if(s.splice(r,1),e=n.length&&Q(s),!e)return u.apply(i,n),i;break}}}return(c||ze(e,h))(n,t,!de,i,!t||L.test(e)&&B(t.parentNode)||t),i}function Ve(e,t,i){var n=[],r=void 0!==i;while((e=e[t])&&9!==e.nodeType)if(1===e.nodeType){if(r&&M(e).is(i))break;n.push(e)}return n}function Ge(e,t){for(var i=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&i.push(e);return i}Oe.prototype=M.expr.pseudos,M.expr.setFilters=new Oe,Pe(),M.find=Me,Me.compile=ze,Me.select=He,Me.setDocument=Pe,Me.tokenize=K;var Ue=M.expr.match.needsContext,qe=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function We(e){return"<"===e[0]&&">"===e[e.length-1]&&e.length>=3}function Xe(e,t,i){return"function"===typeof t?M.grep(e,(function(e,n){return!!t.call(e,n,e)!==i})):t.nodeType?M.grep(e,(function(e){return e===t!==i})):"string"!==typeof t?M.grep(e,(function(e){return h.call(t,e)>-1!==i})):M.filter(t,e,i)}M.filter=function(e,t,i){var n=t[0];return i&&(e=":not("+e+")"),1===t.length&&1===n.nodeType?M.find.matchesSelector(n,e)?[n]:[]:M.find.matches(e,M.grep(t,(function(e){return 1===e.nodeType})))},M.fn.extend({find:function(e){var t,i,n=this.length,r=this;if("string"!==typeof e)return this.pushStack(M(e).filter((function(){for(t=0;t1?M.uniqueSort(i):i},filter:function(e){return this.pushStack(Xe(this,e||[],!1))},not:function(e){return this.pushStack(Xe(this,e||[],!0))},is:function(e){return!!Xe(this,"string"===typeof e&&Ue.test(e)?M(e):e||[],!1).length}});var Ye,Je=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/,Ke=M.fn.init=function(e,t){var i,n;if(!e)return this;if(e.nodeType)return this[0]=e,this.length=1,this;if("function"===typeof e)return void 0!==Ye.ready?Ye.ready(e):e(M);if(i=e+"",We(i))i=[null,e,null];else{if("string"!==typeof e)return M.makeArray(e,this);i=Je.exec(e)}if(!i||!i[1]&&t)return!t||t.jquery?(t||Ye).find(e):this.constructor(t).find(e);if(i[1]){if(t=t instanceof M?t[0]:t,M.merge(this,M.parseHTML(i[1],t&&t.nodeType?t.ownerDocument||t:w,!0)),qe.test(i[1])&&M.isPlainObject(t))for(i in t)"function"===typeof this[i]?this[i](t[i]):this.attr(i,t[i]);return this}return n=w.getElementById(i[2]),n&&(this[0]=n,this.length=1),this};Ke.prototype=M.fn,Ye=M(w);var Ze=/^(?:parents|prev(?:Until|All))/,Qe={children:!0,contents:!0,next:!0,prev:!0};function et(e,t){while((e=e[t])&&1!==e.nodeType);return e}function tt(e){var t={};return M.each(e.match(te)||[],(function(e,i){t[i]=!0})),t}function it(e){return e}function nt(e){throw e}function rt(e,t,i,n){var r;try{e&&"function"===typeof(r=e.promise)?r.call(e).done(t).fail(i):e&&"function"===typeof(r=e.then)?r.call(e,t,i):t.apply(void 0,[e].slice(n))}catch(e){i(e)}}M.fn.extend({has:function(e){var t=M(e,this),i=t.length;return this.filter((function(){for(var e=0;e-1:1===i.nodeType&&M.find.matchesSelector(i,e))){s.push(i);break}return this.pushStack(s.length>1?M.uniqueSort(s):s)},index:function(e){return e?"string"===typeof e?h.call(M(e),this[0]):h.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(M.uniqueSort(M.merge(this.get(),M(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),M.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return Ve(e,"parentNode")},parentsUntil:function(e,t,i){return Ve(e,"parentNode",i)},next:function(e){return et(e,"nextSibling")},prev:function(e){return et(e,"previousSibling")},nextAll:function(e){return Ve(e,"nextSibling")},prevAll:function(e){return Ve(e,"previousSibling")},nextUntil:function(e,t,i){return Ve(e,"nextSibling",i)},prevUntil:function(e,t,i){return Ve(e,"previousSibling",i)},siblings:function(e){return Ge((e.parentNode||{}).firstChild,e)},children:function(e){return Ge(e.firstChild)},contents:function(e){return null!=e.contentDocument&&o(e.contentDocument)?e.contentDocument:(k(e,"template")&&(e=e.content||e),M.merge([],e.childNodes))}},(function(e,t){M.fn[e]=function(i,n){var r=M.map(this,t,i);return"Until"!==e.slice(-5)&&(n=i),n&&"string"===typeof n&&(r=M.filter(n,r)),this.length>1&&(Qe[e]||M.uniqueSort(r),Ze.test(e)&&r.reverse()),this.pushStack(r)}})),M.Callbacks=function(e){e="string"===typeof e?tt(e):M.extend({},e);var t,i,n,r,s=[],a=[],o=-1,l=function(){for(r=r||e.once,n=t=!0;a.length;o=-1){i=a.shift();while(++o-1)s.splice(i,1),i<=o&&o--})),this},has:function(e){return e?M.inArray(e,s)>-1:s.length>0},empty:function(){return s&&(s=[]),this},disable:function(){return r=a=[],s=i="",this},disabled:function(){return!s},lock:function(){return r=a=[],i||t||(s=i=""),this},locked:function(){return!!r},fireWith:function(e,i){return r||(i=i||[],i=[e,i.slice?i.slice():i],a.push(i),t||l()),this},fire:function(){return c.fireWith(this,arguments),this},fired:function(){return!!n}};return c},M.extend({Deferred:function(e){var t=[["notify","progress",M.Callbacks("memory"),M.Callbacks("memory"),2],["resolve","done",M.Callbacks("once memory"),M.Callbacks("once memory"),0,"resolved"],["reject","fail",M.Callbacks("once memory"),M.Callbacks("once memory"),1,"rejected"]],n="pending",r={state:function(){return n},always:function(){return s.done(arguments).fail(arguments),this},catch:function(e){return r.then(null,e)},pipe:function(){var e=arguments;return M.Deferred((function(i){M.each(t,(function(t,n){var r="function"===typeof e[n[4]]&&e[n[4]];s[n[1]]((function(){var e=r&&r.apply(this,arguments);e&&"function"===typeof e.promise?e.promise().progress(i.notify).done(i.resolve).fail(i.reject):i[n[0]+"With"](this,r?[e]:arguments)}))})),e=null})).promise()},then:function(e,n,r){var s=0;function a(e,t,n,r){return function(){var o=this,l=arguments,c=function(){var i,c;if(!(e=s&&(n!==nt&&(o=void 0,l=[i]),t.rejectWith(o,l))}};e?u():(M.Deferred.getErrorHook&&(u.error=M.Deferred.getErrorHook()),i.setTimeout(u))}}return M.Deferred((function(i){t[0][3].add(a(0,i,"function"===typeof r?r:it,i.notifyWith)),t[1][3].add(a(0,i,"function"===typeof e?e:it)),t[2][3].add(a(0,i,"function"===typeof n?n:nt))})).promise()},promise:function(e){return null!=e?M.extend(e,r):r}},s={};return M.each(t,(function(e,i){var a=i[2],o=i[5];r[i[1]]=a.add,o&&a.add((function(){n=o}),t[3-e][2].disable,t[3-e][3].disable,t[0][2].lock,t[0][3].lock),a.add(i[3].fire),s[i[0]]=function(){return s[i[0]+"With"](this===s?void 0:this,arguments),this},s[i[0]+"With"]=a.fireWith})),r.promise(s),e&&e.call(s,s),s},when:function(e){var t=arguments.length,i=t,n=Array(i),r=l.call(arguments),s=M.Deferred(),a=function(e){return function(i){n[e]=this,r[e]=arguments.length>1?l.call(arguments):i,--t||s.resolveWith(n,r)}};if(t<=1&&(rt(e,s.done(a(i)).resolve,s.reject,!t),"pending"===s.state()||"function"===typeof(r[i]&&r[i].then)))return s.then();while(i--)rt(r[i],a(i),s.reject);return s.promise()}});var st=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;M.Deferred.exceptionHook=function(e,t){e&&st.test(e.name)&&i.console.warn("jQuery.Deferred exception",e,t)},M.readyException=function(e){i.setTimeout((function(){throw e}))};var at=M.Deferred();function ot(){w.removeEventListener("DOMContentLoaded",ot),i.removeEventListener("load",ot),M.ready()}M.fn.ready=function(e){return at.then(e).catch((function(e){M.readyException(e)})),this},M.extend({isReady:!1,readyWait:1,ready:function(e){(!0===e?--M.readyWait:M.isReady)||(M.isReady=!0,!0!==e&&--M.readyWait>0||at.resolveWith(w,[M]))}}),M.ready.then=at.then,"loading"!==w.readyState?i.setTimeout(M.ready):(w.addEventListener("DOMContentLoaded",ot),i.addEventListener("load",ot));var lt=/-([a-z])/g;function ct(e,t){return t.toUpperCase()}function ut(e){return e.replace(lt,ct)}function ht(e){return 1===e.nodeType||9===e.nodeType||!+e.nodeType}function dt(){this.expando=M.expando+dt.uid++}dt.uid=1,dt.prototype={cache:function(e){var t=e[this.expando];return t||(t=Object.create(null),ht(e)&&(e.nodeType?e[this.expando]=t:Object.defineProperty(e,this.expando,{value:t,configurable:!0}))),t},set:function(e,t,i){var n,r=this.cache(e);if("string"===typeof t)r[ut(t)]=i;else for(n in t)r[ut(n)]=t[n];return i},get:function(e,t){return void 0===t?this.cache(e):e[this.expando]&&e[this.expando][ut(t)]},access:function(e,t,i){return void 0===t||t&&"string"===typeof t&&void 0===i?this.get(e,t):(this.set(e,t,i),void 0!==i?i:t)},remove:function(e,t){var i,n=e[this.expando];if(void 0!==n){if(void 0!==t){Array.isArray(t)?t=t.map(ut):(t=ut(t),t=t in n?[t]:t.match(te)||[]),i=t.length;while(i--)delete n[t[i]]}(void 0===t||M.isEmptyObject(n))&&(e.nodeType?e[this.expando]=void 0:delete e[this.expando])}},hasData:function(e){var t=e[this.expando];return void 0!==t&&!M.isEmptyObject(t)}};var pt=new dt,gt=new dt,ft=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,mt=/[A-Z]/g;function vt(e){return"true"===e||"false"!==e&&("null"===e?null:e===+e+""?+e:ft.test(e)?JSON.parse(e):e)}function yt(e,t,i){var n;if(void 0===i&&1===e.nodeType)if(n="data-"+t.replace(mt,"-$&").toLowerCase(),i=e.getAttribute(n),"string"===typeof i){try{i=vt(i)}catch(r){}gt.set(e,t,i)}else i=void 0;return i}M.extend({hasData:function(e){return gt.hasData(e)||pt.hasData(e)},data:function(e,t,i){return gt.access(e,t,i)},removeData:function(e,t){gt.remove(e,t)},_data:function(e,t,i){return pt.access(e,t,i)},_removeData:function(e,t){pt.remove(e,t)}}),M.fn.extend({data:function(e,t){var i,n,r,s=this[0],a=s&&s.attributes;if(void 0===e){if(this.length&&(r=gt.get(s),1===s.nodeType&&!pt.get(s,"hasDataAttrs"))){i=a.length;while(i--)a[i]&&(n=a[i].name,0===n.indexOf("data-")&&(n=ut(n.slice(5)),yt(s,n,r[n])));pt.set(s,"hasDataAttrs",!0)}return r}return"object"===typeof e?this.each((function(){gt.set(this,e)})):ee(this,(function(t){var i;if(s&&void 0===t)return i=gt.get(s,e),void 0!==i?i:(i=yt(s,e),void 0!==i?i:void 0);this.each((function(){gt.set(this,e,t)}))}),null,t,arguments.length>1,null,!0)},removeData:function(e){return this.each((function(){gt.remove(this,e)}))}}),M.extend({queue:function(e,t,i){var n;if(e)return t=(t||"fx")+"queue",n=pt.get(e,t),i&&(!n||Array.isArray(i)?n=pt.set(e,t,M.makeArray(i)):n.push(i)),n||[]},dequeue:function(e,t){t=t||"fx";var i=M.queue(e,t),n=i.length,r=i.shift(),s=M._queueHooks(e,t),a=function(){M.dequeue(e,t)};"inprogress"===r&&(r=i.shift(),n--),r&&("fx"===t&&i.unshift("inprogress"),delete s.stop,r.call(e,a,s)),!n&&s&&s.empty.fire()},_queueHooks:function(e,t){var i=t+"queueHooks";return pt.get(e,i)||pt.set(e,i,{empty:M.Callbacks("once memory").add((function(){pt.remove(e,[t+"queue",i])}))})}}),M.fn.extend({queue:function(e,t){var i=2;return"string"!==typeof e&&(t=e,e="fx",i--),arguments.length\x20\t\r\n\f]*)/i,jt={thead:["table"],col:["colgroup","table"],tr:["tbody","table"],td:["tr","tbody","table"]};function Lt(e,t){var i;return i="undefined"!==typeof e.getElementsByTagName?a.slice.call(e.getElementsByTagName(t||"*")):"undefined"!==typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&k(e,t)?M.merge([e],i):i}jt.tbody=jt.tfoot=jt.colgroup=jt.caption=jt.thead,jt.th=jt.td;var Ft=/^$|^module$|\/(?:java|ecma)script/i;function Rt(e,t){for(var i=0,n=e.length;i-1)o=o.appendChild(t.createElement(c[h]));o.innerHTML=M.htmlPrefilter(s),M.merge(p,o.childNodes),o=d.firstChild,o.textContent=""}else p.push(t.createTextNode(s));d.textContent="",g=0;while(s=p[g++])if(n&&M.inArray(s,n)>-1)r&&r.push(s);else if(u=Pt(s),o=Lt(d.appendChild(s),"script"),u&&Rt(o),i){h=0;while(s=o[h++])Ft.test(s.type||"")&&i.push(s)}return d}function zt(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function Ht(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Vt(e,t,i,n){t=c(t);var r,s,a,o,l,u,h=0,d=e.length,p=d-1,g=t[0],f="function"===typeof g;if(f)return e.each((function(r){var s=e.eq(r);t[0]=g.call(this,r,s.html()),Vt(s,t,i,n)}));if(d&&(r=Bt(t,e[0].ownerDocument,!1,e,n),s=r.firstChild,1===r.childNodes.length&&(r=s),s||n)){for(a=M.map(Lt(r,"script"),zt),o=a.length;h=1))for(;c!==this;c=c.parentNode||this)if(1===c.nodeType&&("click"!==e.type||!0!==c.disabled)){for(s=[],a={},i=0;i-1:M.find(r,this,null,[c]).length),a[r]&&s.push(n);s.length&&o.push({elem:c,handlers:s})}return c=this,l0&&Rt(a,!l&&Lt(e,"script")),o},cleanData:function(e){for(var t,i,n,r=M.event.special,s=0;void 0!==(i=e[s]);s++)if(ht(i)){if(t=i[pt.expando]){if(t.events)for(n in t.events)r[n]?M.event.remove(i,n):M.removeEvent(i,n,t.handle);i[pt.expando]=void 0}i[gt.expando]&&(i[gt.expando]=void 0)}}}),M.fn.extend({detach:function(e){return Qt(this,e,!0)},remove:function(e){return Qt(this,e)},text:function(e){return ee(this,(function(e){return void 0===e?M.text(this):this.empty().each((function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=e)}))}),null,e,arguments.length)},append:function(){return Vt(this,arguments,(function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=Kt(this,e);t.appendChild(e)}}))},prepend:function(){return Vt(this,arguments,(function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=Kt(this,e);t.insertBefore(e,t.firstChild)}}))},before:function(){return Vt(this,arguments,(function(e){this.parentNode&&this.parentNode.insertBefore(e,this)}))},after:function(){return Vt(this,arguments,(function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)}))},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(M.cleanData(Lt(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map((function(){return M.clone(this,e,t)}))},html:function(e){return ee(this,(function(e){var t=this[0]||{},i=0,n=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"===typeof e&&!Jt.test(e)&&!jt[(Nt.exec(e)||["",""])[1].toLowerCase()]){e=M.htmlPrefilter(e);try{for(;i=0&&(l+=Math.max(0,Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-s-l-o-.5))||0),l+c}function vi(e,t,i){var n=ii(e),r=T||i,s=r&&"border-box"===M.css(e,"boxSizing",!1,n),a=s,o=ri(e,t,n),l="offset"+t[0].toUpperCase()+t.slice(1);if(ei.test(o)){if(!i)return o;o="auto"}return("auto"===o||T&&s||!v.reliableColDimensions()&&k(e,"col")||!v.reliableTrDimensions()&&k(e,"tr"))&&e.getClientRects().length&&(s="border-box"===M.css(e,"boxSizing",!1,n),a=l in e,a&&(o=e[l])),o=parseFloat(o)||0,o+mi(e,t,i||(s?"border":"content"),a,n,o)+"px"}function yi(e,t,i,n,r){return new yi.prototype.init(e,t,i,n,r)}M.extend({cssHooks:{},style:function(e,t,i,n){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var r,s,a,o=It(t),l=ti.test(t),c=e.style;if(l||(t=li(o)),a=M.cssHooks[t]||M.cssHooks[o],void 0===i)return a&&"get"in a&&void 0!==(r=a.get(e,!1,n))?r:c[t];s=typeof i,"string"===s&&(r=Ct.exec(i))&&r[1]&&(i=Mt(e,t,r),s="number"),null!=i&&i===i&&("number"===s&&(i+=r&&r[3]||(At(o)?"px":"")),T&&""===i&&0===t.indexOf("background")&&(c[t]="inherit"),a&&"set"in a&&void 0===(i=a.set(e,i,n))||(l?c.setProperty(t,i):c[t]=i))}},css:function(e,t,i,n){var r,s,a,o=It(t),l=ti.test(t);return l||(t=li(o)),a=M.cssHooks[t]||M.cssHooks[o],a&&"get"in a&&(r=a.get(e,!0,i)),void 0===r&&(r=ri(e,t,n)),"normal"===r&&t in gi&&(r=gi[t]),""===i||i?(s=parseFloat(r),!0===i||isFinite(s)?s||0:r):r}}),M.each(["height","width"],(function(e,t){M.cssHooks[t]={get:function(e,i,n){if(i)return"none"===M.css(e,"display")?ni(e,pi,(function(){return vi(e,t,n)})):vi(e,t,n)},set:function(e,i,n){var r,s=ii(e),a=n&&"border-box"===M.css(e,"boxSizing",!1,s),o=n?mi(e,t,n,a,s):0;return o&&(r=Ct.exec(i))&&"px"!==(r[3]||"px")&&(e.style[t]=i,i=M.css(e,t)),fi(e,i,o)}}})),M.each({margin:"",padding:"",border:"Width"},(function(e,t){M.cssHooks[e+t]={expand:function(i){for(var n=0,r={},s="string"===typeof i?i.split(" "):[i];n<4;n++)r[e+wt[n]+t]=s[n]||s[n-2]||s[0];return r}},"margin"!==e&&(M.cssHooks[e+t].set=fi)})),M.fn.extend({css:function(e,t){return ee(this,(function(e,t,i){var n,r,s={},a=0;if(Array.isArray(t)){for(n=ii(e),r=t.length;a1)}}),M.Tween=yi,yi.prototype={constructor:yi,init:function(e,t,i,n,r,s){this.elem=e,this.prop=i,this.easing=r||M.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=n,this.unit=s||(At(i)?"px":"")},cur:function(){var e=yi.propHooks[this.prop];return e&&e.get?e.get(this):yi.propHooks._default.get(this)},run:function(e){var t,i=yi.propHooks[this.prop];return this.options.duration?this.pos=t=M.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),i&&i.set?i.set(this):yi.propHooks._default.set(this),this}},yi.prototype.init.prototype=yi.prototype,yi.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=M.css(e.elem,e.prop,""),t&&"auto"!==t?t:0)},set:function(e){M.fx.step[e.prop]?M.fx.step[e.prop](e):1!==e.elem.nodeType||!M.cssHooks[e.prop]&&null==e.elem.style[li(e.prop)]?e.elem[e.prop]=e.now:M.style(e.elem,e.prop,e.now+e.unit)}}},M.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},M.fx=yi.prototype.init,M.fx.step={};var bi,Ci,wi=/^(?:toggle|show|hide)$/,xi=/queueHooks$/;function Si(){Ci&&(!1===w.hidden&&i.requestAnimationFrame?i.requestAnimationFrame(Si):i.setTimeout(Si,13),M.fx.tick())}function _i(){return i.setTimeout((function(){bi=void 0})),bi=Date.now()}function Ai(e,t){var i,n=0,r={height:e};for(t=t?1:0;n<4;n+=2-t)i=wt[n],r["margin"+i]=r["padding"+i]=e;return t&&(r.opacity=r.width=e),r}function Mi(e,t,i){for(var n,r=(Di.tweeners[t]||[]).concat(Di.tweeners["*"]),s=0,a=r.length;s1)},removeProp:function(e){return this.each((function(){delete this[M.propFix[e]||e]}))}}),M.extend({prop:function(e,t,i){var n,r,s=e.nodeType;if(3!==s&&8!==s&&2!==s)return 1===s&&M.isXMLDoc(e)||(t=M.propFix[t]||t,r=M.propHooks[t]),void 0!==i?r&&"set"in r&&void 0!==(n=r.set(e,i,t))?n:e[t]=i:r&&"get"in r&&null!==(n=r.get(e,t))?n:e[t]},propHooks:{tabIndex:{get:function(e){var t=e.getAttribute("tabindex");return t?parseInt(t,10):Ti.test(e.nodeName)||Ei.test(e.nodeName)&&e.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),T&&(M.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),M.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],(function(){M.propFix[this.toLowerCase()]=this})),M.fn.extend({addClass:function(e){var t,i,n,r,s,a;return"function"===typeof e?this.each((function(t){M(this).addClass(e.call(this,t,Oi(this)))})):(t=Ni(e),t.length?this.each((function(){if(n=Oi(this),i=1===this.nodeType&&" "+Pi(n)+" ",i){for(s=0;s-1)i=i.replace(" "+r+" "," ")}a=Pi(i),n!==a&&this.setAttribute("class",a)}})):this):this.attr("class","")},toggleClass:function(e,t){var i,n,r,s;return"function"===typeof e?this.each((function(i){M(this).toggleClass(e.call(this,i,Oi(this),t),t)})):"boolean"===typeof t?t?this.addClass(e):this.removeClass(e):(i=Ni(e),i.length?this.each((function(){for(s=M(this),r=0;r-1)return!0;return!1}}),M.fn.extend({val:function(e){var t,i,n,r=this[0];return arguments.length?(n="function"===typeof e,this.each((function(i){var r;1===this.nodeType&&(r=n?e.call(this,i,M(this).val()):e,null==r?r="":"number"===typeof r?r+="":Array.isArray(r)&&(r=M.map(r,(function(e){return null==e?"":e+""}))),t=M.valHooks[this.type]||M.valHooks[this.nodeName.toLowerCase()],t&&"set"in t&&void 0!==t.set(this,r,"value")||(this.value=r))}))):r?(t=M.valHooks[r.type]||M.valHooks[r.nodeName.toLowerCase()],t&&"get"in t&&void 0!==(i=t.get(r,"value"))?i:(i=r.value,null==i?"":i)):void 0}}),M.extend({valHooks:{select:{get:function(e){var t,i,n,r=e.options,s=e.selectedIndex,a="select-one"===e.type,o=a?null:[],l=a?s+1:r.length;for(n=s<0?l:a?s:0;n-1)&&(i=!0);return i||(e.selectedIndex=-1),s}}}}),T&&(M.valHooks.option={get:function(e){var t=e.getAttribute("value");return null!=t?t:Pi(M.text(e))}}),M.each(["radio","checkbox"],(function(){M.valHooks[this]={set:function(e,t){if(Array.isArray(t))return e.checked=M.inArray(M(e).val(),t)>-1}}}));var ji=/^(?:focusinfocus|focusoutblur)$/,Li=function(e){e.stopPropagation()};M.extend(M.event,{trigger:function(e,t,n,r){var s,a,o,l,c,u,h,d,p=[n||w],f=g.call(e,"type")?e.type:e,m=g.call(e,"namespace")?e.namespace.split("."):[];if(a=d=o=n=n||w,3!==n.nodeType&&8!==n.nodeType&&!ji.test(f+M.event.triggered)&&(f.indexOf(".")>-1&&(m=f.split("."),f=m.shift(),m.sort()),c=f.indexOf(":")<0&&"on"+f,e=e[M.expando]?e:new M.Event(f,"object"===typeof e&&e),e.isTrigger=r?2:3,e.namespace=m.join("."),e.rnamespace=e.namespace?new RegExp("(^|\\.)"+m.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=void 0,e.target||(e.target=n),t=null==t?[e]:M.makeArray(t,[e]),h=M.event.special[f]||{},r||!h.trigger||!1!==h.trigger.apply(n,t))){if(!r&&!h.noBubble&&!b(n)){for(l=h.delegateType||f,ji.test(l+f)||(a=a.parentNode);a;a=a.parentNode)p.push(a),o=a;o===(n.ownerDocument||w)&&p.push(o.defaultView||o.parentWindow||i)}s=0;while((a=p[s++])&&!e.isPropagationStopped())d=a,e.type=s>1?l:h.bindType||f,u=(pt.get(a,"events")||Object.create(null))[e.type]&&pt.get(a,"handle"),u&&u.apply(a,t),u=c&&a[c],u&&u.apply&&ht(a)&&(e.result=u.apply(a,t),!1===e.result&&e.preventDefault());return e.type=f,r||e.isDefaultPrevented()||h._default&&!1!==h._default.apply(p.pop(),t)||!ht(n)||c&&"function"===typeof n[f]&&!b(n)&&(o=n[c],o&&(n[c]=null),M.event.triggered=f,e.isPropagationStopped()&&d.addEventListener(f,Li),n[f](),e.isPropagationStopped()&&d.removeEventListener(f,Li),M.event.triggered=void 0,o&&(n[c]=o)),e.result}},simulate:function(e,t,i){var n=M.extend(new M.Event,i,{type:e,isSimulated:!0});M.event.trigger(n,null,t)}}),M.fn.extend({trigger:function(e,t){return this.each((function(){M.event.trigger(e,t,this)}))},triggerHandler:function(e,t){var i=this[0];if(i)return M.event.trigger(e,t,i,!0)}});var Fi=i.location,Ri={guid:Date.now()},$i=/\?/;M.parseXML=function(e){var t,n;if(!e||"string"!==typeof e)return null;try{t=(new i.DOMParser).parseFromString(e,"text/xml")}catch(r){}return n=t&&t.getElementsByTagName("parsererror")[0],t&&!n||M.error("Invalid XML: "+(n?M.map(n.childNodes,(function(e){return e.textContent})).join("\n"):e)),t};var Bi=/\[\]$/,zi=/\r?\n/g,Hi=/^(?:submit|button|image|reset|file)$/i,Vi=/^(?:input|select|textarea|keygen)/i;function Gi(e,t,i,n){var r;if(Array.isArray(t))M.each(t,(function(t,r){i||Bi.test(e)?n(e,r):Gi(e+"["+("object"===typeof r&&null!=r?t:"")+"]",r,i,n)}));else if(i||"object"!==y(t))n(e,t);else for(r in t)Gi(e+"["+r+"]",t[r],i,n)}M.param=function(e,t){var i,n=[],r=function(e,t){var i="function"===typeof t?t():t;n[n.length]=encodeURIComponent(e)+"="+encodeURIComponent(null==i?"":i)};if(null==e)return"";if(Array.isArray(e)||e.jquery&&!M.isPlainObject(e))M.each(e,(function(){r(this.name,this.value)}));else for(i in e)Gi(i,e[i],t,r);return n.join("&")},M.fn.extend({serialize:function(){return M.param(this.serializeArray())},serializeArray:function(){return this.map((function(){var e=M.prop(this,"elements");return e?M.makeArray(e):this})).filter((function(){var e=this.type;return this.name&&!M(this).is(":disabled")&&Vi.test(this.nodeName)&&!Hi.test(e)&&(this.checked||!Gt.test(e))})).map((function(e,t){var i=M(this).val();return null==i?null:Array.isArray(i)?M.map(i,(function(e){return{name:t.name,value:e.replace(zi,"\r\n")}})):{name:t.name,value:i.replace(zi,"\r\n")}})).get()}});var Ui=/%20/g,qi=/#.*$/,Wi=/([?&])_=[^&]*/,Xi=/^(.*?):[ \t]*([^\r\n]*)$/gm,Yi=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Ji=/^(?:GET|HEAD)$/,Ki=/^\/\//,Zi={},Qi={},en="*/".concat("*"),tn=w.createElement("a");function nn(e){return function(t,i){"string"!==typeof t&&(i=t,t="*");var n,r=0,s=t.toLowerCase().match(te)||[];if("function"===typeof i)while(n=s[r++])"+"===n[0]?(n=n.slice(1)||"*",(e[n]=e[n]||[]).unshift(i)):(e[n]=e[n]||[]).push(i)}}function rn(e,t,i,n){var r={},s=e===Qi;function a(o){var l;return r[o]=!0,M.each(e[o]||[],(function(e,o){var c=o(t,i,n);return"string"!==typeof c||s||r[c]?s?!(l=c):void 0:(t.dataTypes.unshift(c),a(c),!1)})),l}return a(t.dataTypes[0])||!r["*"]&&a("*")}function sn(e,t){var i,n,r=M.ajaxSettings.flatOptions||{};for(i in t)void 0!==t[i]&&((r[i]?e:n||(n={}))[i]=t[i]);return n&&M.extend(!0,e,n),e}function an(e,t,i){var n,r,s,a,o=e.contents,l=e.dataTypes;while("*"===l[0])l.shift(),void 0===n&&(n=e.mimeType||t.getResponseHeader("Content-Type"));if(n)for(r in o)if(o[r]&&o[r].test(n)){l.unshift(r);break}if(l[0]in i)s=l[0];else{for(r in i){if(!l[0]||e.converters[r+" "+l[0]]){s=r;break}a||(a=r)}s=s||a}if(s)return s!==l[0]&&l.unshift(s),i[s]}function on(e,t,i,n){var r,s,a,o,l,c={},u=e.dataTypes.slice();if(u[1])for(a in e.converters)c[a.toLowerCase()]=e.converters[a];s=u.shift();while(s)if(e.responseFields[s]&&(i[e.responseFields[s]]=t),!l&&n&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),l=s,s=u.shift(),s)if("*"===s)s=l;else if("*"!==l&&l!==s){if(a=c[l+" "+s]||c["* "+s],!a)for(r in c)if(o=r.split(" "),o[1]===s&&(a=c[l+" "+o[0]]||c["* "+o[0]],a)){!0===a?a=c[r]:!0!==c[r]&&(s=o[0],u.unshift(o[1]));break}if(!0!==a)if(a&&e.throws)t=a(t);else try{t=a(t)}catch(h){return{state:"parsererror",error:a?h:"No conversion from "+l+" to "+s}}}return{state:"success",data:t}}tn.href=Fi.href,M.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Fi.href,type:"GET",isLocal:Yi.test(Fi.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":en,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":M.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?sn(sn(e,M.ajaxSettings),t):sn(M.ajaxSettings,e)},ajaxPrefilter:nn(Zi),ajaxTransport:nn(Qi),ajax:function(e,t){"object"===typeof e&&(t=e,e=void 0),t=t||{};var n,r,s,a,o,l,c,u,h,d,p=M.ajaxSetup({},t),g=p.context||p,f=p.context&&(g.nodeType||g.jquery)?M(g):M.event,m=M.Deferred(),v=M.Callbacks("once memory"),y=p.statusCode||{},b={},C={},x="canceled",S={readyState:0,getResponseHeader:function(e){var t;if(c){if(!a){a={};while(t=Xi.exec(s))a[t[1].toLowerCase()+" "]=(a[t[1].toLowerCase()+" "]||[]).concat(t[2])}t=a[e.toLowerCase()+" "]}return null==t?null:t.join(", ")},getAllResponseHeaders:function(){return c?s:null},setRequestHeader:function(e,t){return null==c&&(e=C[e.toLowerCase()]=C[e.toLowerCase()]||e,b[e]=t),this},overrideMimeType:function(e){return null==c&&(p.mimeType=e),this},statusCode:function(e){var t;if(e)if(c)S.always(e[S.status]);else for(t in e)y[t]=[y[t],e[t]];return this},abort:function(e){var t=e||x;return n&&n.abort(t),_(0,t),this}};if(m.promise(S),p.url=((e||p.url||Fi.href)+"").replace(Ki,Fi.protocol+"//"),p.type=t.method||t.type||p.method||p.type,p.dataTypes=(p.dataType||"*").toLowerCase().match(te)||[""],null==p.crossDomain){l=w.createElement("a");try{l.href=p.url,l.href=l.href,p.crossDomain=tn.protocol+"//"+tn.host!==l.protocol+"//"+l.host}catch(A){p.crossDomain=!0}}if(rn(Zi,p,t,S),p.data&&p.processData&&"string"!==typeof p.data&&(p.data=M.param(p.data,p.traditional)),c)return S;for(h in u=M.event&&p.global,u&&0===M.active++&&M.event.trigger("ajaxStart"),p.type=p.type.toUpperCase(),p.hasContent=!Ji.test(p.type),r=p.url.replace(qi,""),p.hasContent?p.data&&p.processData&&0===(p.contentType||"").indexOf("application/x-www-form-urlencoded")&&(p.data=p.data.replace(Ui,"+")):(d=p.url.slice(r.length),p.data&&(p.processData||"string"===typeof p.data)&&(r+=($i.test(r)?"&":"?")+p.data,delete p.data),!1===p.cache&&(r=r.replace(Wi,"$1"),d=($i.test(r)?"&":"?")+"_="+Ri.guid+++d),p.url=r+d),p.ifModified&&(M.lastModified[r]&&S.setRequestHeader("If-Modified-Since",M.lastModified[r]),M.etag[r]&&S.setRequestHeader("If-None-Match",M.etag[r])),(p.data&&p.hasContent&&!1!==p.contentType||t.contentType)&&S.setRequestHeader("Content-Type",p.contentType),S.setRequestHeader("Accept",p.dataTypes[0]&&p.accepts[p.dataTypes[0]]?p.accepts[p.dataTypes[0]]+("*"!==p.dataTypes[0]?", "+en+"; q=0.01":""):p.accepts["*"]),p.headers)S.setRequestHeader(h,p.headers[h]);if(p.beforeSend&&(!1===p.beforeSend.call(g,S,p)||c))return S.abort();if(x="abort",v.add(p.complete),S.done(p.success),S.fail(p.error),n=rn(Qi,p,t,S),n){if(S.readyState=1,u&&f.trigger("ajaxSend",[S,p]),c)return S;p.async&&p.timeout>0&&(o=i.setTimeout((function(){S.abort("timeout")}),p.timeout));try{c=!1,n.send(b,_)}catch(A){if(c)throw A;_(-1,A)}}else _(-1,"No Transport");function _(e,t,a,l){var h,d,b,C,w,x=t;c||(c=!0,o&&i.clearTimeout(o),n=void 0,s=l||"",S.readyState=e>0?4:0,h=e>=200&&e<300||304===e,a&&(C=an(p,S,a)),!h&&M.inArray("script",p.dataTypes)>-1&&M.inArray("json",p.dataTypes)<0&&(p.converters["text script"]=function(){}),C=on(p,C,S,h),h?(p.ifModified&&(w=S.getResponseHeader("Last-Modified"),w&&(M.lastModified[r]=w),w=S.getResponseHeader("etag"),w&&(M.etag[r]=w)),204===e||"HEAD"===p.type?x="nocontent":304===e?x="notmodified":(x=C.state,d=C.data,b=C.error,h=!b)):(b=x,!e&&x||(x="error",e<0&&(e=0))),S.status=e,S.statusText=(t||x)+"",h?m.resolveWith(g,[d,x,S]):m.rejectWith(g,[S,x,b]),S.statusCode(y),y=void 0,u&&f.trigger(h?"ajaxSuccess":"ajaxError",[S,p,h?d:b]),v.fireWith(g,[S,x]),u&&(f.trigger("ajaxComplete",[S,p]),--M.active||M.event.trigger("ajaxStop")))}return S},getJSON:function(e,t,i){return M.get(e,t,i,"json")},getScript:function(e,t){return M.get(e,void 0,t,"script")}}),M.each(["get","post"],(function(e,t){M[t]=function(e,i,n,r){return"function"!==typeof i&&null!==i||(r=r||n,n=i,i=void 0),M.ajax(M.extend({url:e,type:t,dataType:r,data:i,success:n},M.isPlainObject(e)&&e))}})),M.ajaxPrefilter((function(e){var t;for(t in e.headers)"content-type"===t.toLowerCase()&&(e.contentType=e.headers[t]||"")})),M._evalUrl=function(e,t,i){return M.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,scriptAttrs:t.crossOrigin?{crossOrigin:t.crossOrigin}:void 0,converters:{"text script":function(){}},dataFilter:function(e){M.globalEval(e,t,i)}})},M.fn.extend({wrapAll:function(e){var t;return this[0]&&("function"===typeof e&&(e=e.call(this[0])),t=M(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map((function(){var e=this;while(e.firstElementChild)e=e.firstElementChild;return e})).append(this)),this},wrapInner:function(e){return"function"===typeof e?this.each((function(t){M(this).wrapInner(e.call(this,t))})):this.each((function(){var t=M(this),i=t.contents();i.length?i.wrapAll(e):t.append(e)}))},wrap:function(e){var t="function"===typeof e;return this.each((function(i){M(this).wrapAll(t?e.call(this,i):e)}))},unwrap:function(e){return this.parent(e).not("body").each((function(){M(this).replaceWith(this.childNodes)})),this}}),M.expr.pseudos.hidden=function(e){return!M.expr.pseudos.visible(e)},M.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},M.ajaxSettings.xhr=function(){return new i.XMLHttpRequest};var ln={0:200};function cn(e){return e.scriptAttrs||!e.headers&&(e.crossDomain||e.async&&M.inArray("json",e.dataTypes)<0)}M.ajaxTransport((function(e){var t;return{send:function(i,n){var r,s=e.xhr();if(s.open(e.type,e.url,e.async,e.username,e.password),e.xhrFields)for(r in e.xhrFields)s[r]=e.xhrFields[r];for(r in e.mimeType&&s.overrideMimeType&&s.overrideMimeType(e.mimeType),e.crossDomain||i["X-Requested-With"]||(i["X-Requested-With"]="XMLHttpRequest"),i)s.setRequestHeader(r,i[r]);t=function(e){return function(){t&&(t=s.onload=s.onerror=s.onabort=s.ontimeout=null,"abort"===e?s.abort():"error"===e?n(s.status,s.statusText):n(ln[s.status]||s.status,s.statusText,"text"===(s.responseType||"text")?{text:s.responseText}:{binary:s.response},s.getAllResponseHeaders()))}},s.onload=t(),s.onabort=s.onerror=s.ontimeout=t("error"),t=t("abort");try{s.send(e.hasContent&&e.data||null)}catch(a){if(t)throw a}},abort:function(){t&&t()}}})),M.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},converters:{"text script":function(e){return M.globalEval(e),e}}}),M.ajaxPrefilter("script",(function(e){void 0===e.cache&&(e.cache=!1),cn(e)&&(e.type="GET")})),M.ajaxTransport("script",(function(e){var t,i;if(cn(e))return{send:function(n,r){t=M("