var NUTOOL_PIN={};
(function(){function Vb(){var b;var e=0;for(b=W.length;e<b;e+=1)W[e].restore();W.length=0}function Lb(){var b,e=$("#panel");var c=0;e[0].setAttribute("style","width:"+(Sa-275-8)+"px; height:"+(Na-8)+"px; border: 1px solid white; position:absolute; left:275px; top:0px;");-1!==F.indexOf("WLCSP")||-1!==F.indexOf("BGA")?e.hover(function(){$(this).css("opacity","1");$("#pin_side_0").css("opacity","0.8");$("#NUC_PinConfiguration_Canvas_Lining").css("opacity","0");lb()},function(){$(this).css("opacity",Mb);
$("#pin_side_0").css("opacity","0.1");$("#NUC_PinConfiguration_Canvas_Lining").css("opacity","1")}):e.hover(function(){$(this).css("opacity","1");lb()},function(){$(this).css("opacity",Mb)});var d=$("#NUC_PinConfiguration_Canvas")[0];d.setAttribute("style","z-index:1; position:absolute; left:0px; top:0px; border: 1px solid white;");d.setAttribute("width",Ta);d.setAttribute("height",gb);var f=sa.getContext(d);sa.addEvent(d,"click",hb);f.strokeStyle="#000000";if(-1!==F.indexOf("SOP")){f.strokeRect(Q,
V,A/2,A);d=f.createLinearGradient(Q+A/2,V+A,0,0);d.addColorStop(0,"#000000");d.addColorStop(1,"#8CA5B9");f.fillStyle=d;f.fillRect(Q,V,A/2,A);f.beginPath();f.arc(Q+10,V+10,5,0,2*Math.PI,!0);f.strokeStyle="white";f.stroke();f.strokeStyle="#000000";var h=1;do h+=1,f.font=h+'px "Arial Black", "Arial Bold", Gadget, sans-serif;';while(f.measureText(Ma).width<A/2);c=h;f.save();f.translate(Q+A/4,V+A/2-f.measureText(Ma).width/2);f.rotate(Math.PI/2);f.fillStyle="#FE2E2E";f.fillText(Ma,0,0);f.restore();d=F.slicePriorToX("(");
c=0;for(b=NUTOOL_PIN.g_cfg_chips.length;c<b;c+=1)if(NUTOOL_PIN.g_cfg_chips[c].name+"("+NUTOOL_PIN.g_cfg_chips[c].pkg+")"===F){"undefined"!==typeof NUTOOL_PIN.g_cfg_chips[c].display&&(d=NUTOOL_PIN.g_cfg_chips[c].display);break}f.fillStyle="white";c=1;do c+=1,f.font="bold "+c+"px Calibri";while(f.measureText(d).width<A/2);c>h&&(c=h,f.font="bold "+c+"px Calibri");c=c/2+5;f.save();f.translate(Q+A/4-c,V+A/2-f.measureText(d).width/2);f.rotate(Math.PI/2);f.fillText(d,0,0);f.restore();if(12<T){h=1;do h+=
1,f.font="bold "+h+"px Calibri";while(f.measureText(NUTOOL_PIN.g_packageNumber).width<A/4);c=c+h/2+5;f.save();f.translate(Q+A/4-c,V+A/2-f.measureText(NUTOOL_PIN.g_packageNumber).width/2);f.rotate(Math.PI/2);f.fillText(NUTOOL_PIN.g_packageNumber,0,0);f.restore()}W=[];for(c=0;2>c;c+=1)f="pin_side_"+c,e[0].appendChild(Ua("canvas",f)),W[c]=Wb().init(f,$("#"+f),c),W[c].draw()}else if(-1!==F.indexOf("WLCSP")||-1!==F.indexOf("BGA")){f.strokeRect(Q,V,A,A);d=f.createLinearGradient(Q+A,V+A,0,0);d.addColorStop(0,
"#000000");d.addColorStop(1,"#8CA5B9");f.fillStyle=d;f.fillRect(Q,V,A,A);f.beginPath();f.arc(Q+10,V+A-10,5,0,2*Math.PI,!0);f.strokeStyle="white";f.stroke();f.strokeStyle="#000000";0===$("#NUC_PinConfiguration_Canvas_Lining").length&&$("#panel")[0].appendChild(Ua("canvas","NUC_PinConfiguration_Canvas_Lining"));f=$("#NUC_PinConfiguration_Canvas_Lining")[0];f.setAttribute("style","z-index:1; position:absolute; left:0px; top:0px; border: 1px solid white;");f.setAttribute("width",Ta);f.setAttribute("height",
gb);f=sa.getContext(f);h=1;do h+=1,f.font=h+'px "Arial Black", "Arial Bold", Gadget, sans-serif;';while(f.measureText(Ma).width<A/2);f.fillStyle="#FE2E2E";f.fillText(Ma,Q+A/2-f.measureText(Ma).width/2,V+A/2);d=F.slicePriorToX("(");c=0;for(b=NUTOOL_PIN.g_cfg_chips.length;c<b;c+=1)if(NUTOOL_PIN.g_cfg_chips[c].name+"("+NUTOOL_PIN.g_cfg_chips[c].pkg+")"===F){"undefined"!==typeof NUTOOL_PIN.g_cfg_chips[c].display&&(d=NUTOOL_PIN.g_cfg_chips[c].display);break}f.fillStyle="white";c=1;do c+=1,f.font="bold "+
c+"px Calibri";while(f.measureText(d).width<A/2);c>h&&(c=h,f.font="bold "+c+"px Calibri");c=c/2+T/10;f.fillText(d,Q+A/2-f.measureText(d).width/2,V+A/2+c);d=F.slicePriorToX(")").sliceAfterX("(")+"(TOP VIEW)";h=1;do h+=1,f.font="bold "+h+"px Calibri";while(f.measureText(d).width<A/2);c=c+h/2+T/10;f.fillText(d,Q+A/2-f.measureText(d).width/2,V+A/2+c);W=[];f="pin_side_0";e[0].appendChild(Ua("canvas",f));W[0]=Wb().init(f,$("#"+f),0);W[0].draw()}else{f.strokeRect(Q,V,A,A);d=f.createLinearGradient(Q+A,V+
A,0,0);d.addColorStop(0,"#000000");d.addColorStop(1,"#8CA5B9");f.fillStyle=d;f.fillRect(Q,V,A,A);f.beginPath();f.arc(Q+10,V+A-10,5,0,2*Math.PI,!0);f.strokeStyle="white";f.stroke();f.strokeStyle="#000000";h=1;do h+=1,f.font=h+'px "Arial Black", "Arial Bold", Gadget, sans-serif;';while(f.measureText(Ma).width<A/2);f.fillStyle="#FE2E2E";f.fillText(Ma,Q+A/2-f.measureText(Ma).width/2,V+A/2);d=F.slicePriorToX("(");c=0;for(b=NUTOOL_PIN.g_cfg_chips.length;c<b;c+=1)if(NUTOOL_PIN.g_cfg_chips[c].name+"("+NUTOOL_PIN.g_cfg_chips[c].pkg+
")"===F){"undefined"!==typeof NUTOOL_PIN.g_cfg_chips[c].display&&(d=NUTOOL_PIN.g_cfg_chips[c].display);break}f.fillStyle="white";c=1;do c+=1,f.font="bold "+c+"px Calibri";while(f.measureText(d).width<A/2);c>h&&(c=h,f.font="bold "+c+"px Calibri");c=c/2+T/8;f.fillText(d,Q+A/2-f.measureText(d).width/2,V+A/2+c);h=1;do h+=1,f.font="bold "+h+"px Calibri";while(f.measureText(NUTOOL_PIN.g_packageNumber).width<A/4);c=c+h/2+T/8;f.fillText(NUTOOL_PIN.g_packageNumber,Q+A/2-f.measureText(NUTOOL_PIN.g_packageNumber).width/
2,V+A/2+c);W=[];for(c=0;4>c;c+=1)f="pin_side_"+c,e[0].appendChild(Ua("canvas",f)),W[c]=Wb().init(f,$("#"+f),c),W[c].draw()}Nc();Xb();c=h=f=c=d=d=f=f=d=e=b=c=null}function Qa(b,e){var c=0,d;var f=/(\d+)|(\D+)/g;var h=/\d/;if(isFinite(b)&&isFinite(e))return b-e;var k=String(b).toLowerCase();var a=String(e).toLowerCase();if(k===a)return 0;if(!h.test(k)||!h.test(a))return k>a?1:-1;k=k.match(f);a=a.match(f);for(d=k.length>a.length?a.length:k.length;c<d;)if(f=k[c],h=a[c],c+=1,f!==h)return isFinite(f)&&
isFinite(h)?("0"===f.charAt(0)&&(f="."+f),"0"===h.charAt(0)&&(h="."+h),f-h):f>h?1:-1;return k.length-a.length}function Yb(){var b=[],e,c,d,f=[],h=[],k=[],a=[],g,l=[],q=[],t=[],x=$("#rootTree_Pin"),u=$("#moduleTree"),p=$("#ChipType_span"),v=$("#MCU_span");b=wa(Ga);b.sort(Qa);a=[];nb=[];oa=[];t=[];var n=0;for(e=b.length;n<e;n+=1){f=[];k=[];var r=0;for(c=Ga[b[n]].length;r<c;r+=1){var y=Va[b[n]][r];f.push(y+"_Pin"+Ga[b[n]][r])}f.sort(Qa);h=[];var w=!1;r=0;for(c=f.length;r<c;r+=1)if(!(0<h.length&&-1!==
$.inArray(r,h))){y=f[r];var E=!1;if(0===NUTOOL_PIN.g_cfg_shareBits.length&&r!==f.length-1){var J=r+1;for(d=f.length;J<d;J+=1)y.restorePinTreeNodeName()===f[J].restorePinTreeNodeName()?(h.push(J),w=E=!0):y.sliceAfterX("_Pin")===f[J].sliceAfterX("_Pin")&&(w=!0)}var L=y.replaceSpecialCharacters();var Y={};var aa={};if(E){var ka={};aa.id=L;ka.data="Pin:"+Z(y.sliceAfterX("_Pin"));ka.attr=aa;q=[];q.push(ka);oa.push(aa.id);J=0;for(d=h.length;J<d;J+=1)y.restorePinTreeNodeName()===f[h[J]].restorePinTreeNodeName()&&
(ka={},aa={},aa.id=f[h[J]],aa.id=aa.id.replaceSpecialCharacters(),ka.data="Pin:"+Z(aa.id.sliceAfterX("_Pin")),ka.attr=aa,q.push(ka),oa.push(aa.id));aa={};aa.id=L.restorePinTreeNodeName()+"_Intermediate";Y.data=y.restorePinTreeNodeName();Y.attr=aa;Y.children=q;nb.push(aa.id)}else aa.id=L,Y.data=y.restorePinTreeNodeName()+"(Pin:"+Z(y.sliceAfterX("_Pin"))+")",Y.attr=aa;k.push(Y)}w&&t.push(b[n]+"_Root");var O={};aa={};aa.id=b[n]+"_Root";O.data=b[n];O.attr=aa;O.state="closed";O.children=k;a[n]=O}if(0===
u.length){ib();if("Simplified Chinese"===pa){var Fa="\u652f\u63f4\u6a21\u7ec4";r="\u641c\u5bfb..";J="\u82af\u7247\u7cfb\u5217:";c="\u578b\u53f7:"}else"Traditional Chinese"===pa?(Fa="\u652f\u63f4\u6a21\u7d44",r="\u641c\u5c0b..",J="\u6676\u7247\u7cfb\u5217:",c="\u578b\u865f:"):(Fa="Supported Modules",r="Search..",J="Chip Series:",c="Part No.:");x[0].appendChild(Ua("div","supportedModules",""));var Nb=$("#supportedModules");Nb.append("<span id=supportedModules_span></span>");var sb=$("#supportedModules_span");
sb.css("vertical-align","text-top");sb.css("font-size","16px");sb.css("font-weight","bold");Nb.append("<input id='searchInput_Pin' type='text' value="+r+">");var Zb=$("#searchInput_Pin");x[0].appendChild(Ua("div","moduleTree","Loading..."));u=$("#moduleTree");p.text(J);p.css("font-size","16px");p.css("font-weight","bold");v.text(c);v.css("font-size","16px");v.css("font-weight","bold");c=J=r=null}Nb[0].setAttribute("style","background-color: #FFFFFF; border-right: 16px solid #F2F2F2; float:left; width:259px; height: 22px;");
sb.text(Fa);Zb[0].setAttribute("style","font-family:Times Arial; position:absolute; left:"+(sb.width()+10)+"px; width:"+(259-sb.width()-10)+"px; height: 16px;");x.hide();Zb.change(function(){Ob(this.value)});u[0].setAttribute("style","background-color: #FFFFFF; overflow-y: scroll; float:left; width:275px; height: "+(Ha-Wa-6-$("#supportedModules").height())+"px; font-size:16px;");-1!==F.indexOf("WLCSP")||-1!==F.indexOf("BGA")?u.hover(function(){$(this).css("background-color","#FAFAFA");lb();$("#pin_side_0").css("opacity",
"0.8");$("#NUC_PinConfiguration_Canvas_Lining").css("opacity","0")},function(){$(this).css("background-color","#FFFFFF");$("#pin_side_0").css("opacity","0.1");$("#NUC_PinConfiguration_Canvas_Lining").css("opacity","1")}):u.hover(function(){$(this).css("background-color","#FAFAFA");lb()},function(){$(this).css("background-color","#FFFFFF")});u.jstree({themes:{theme:"classic",icons:!1},json_data:{data:a,progressive_render:!0},search:{case_insensitive:!0},core:{animation:0},plugins:"themes json_data types search checkbox ui".split(" ")}).bind("hover_node.jstree",
function(na,ja){var ma=ja.rslt.obj.attr("id"),ca=!1,da=-1;if(Bb&&0<NUTOOL_PIN.g_cfg_gpiosDescriptions.length&&-1===ma.indexOf("_dot")){if(-1!==ma.indexOf("_Pin")){var X=ma.restorePinTreeNodeName();da=parseInt(ma.sliceAfterX("_Pin"),10);ca=!0}-1!==ma.indexOf("_Intermediate")&&(X=ma.restorePinTreeNodeName(),ca=!0);ca&&(X=X.restorePinTreeNodeName().restoreSpecialCharacters(),X=sc(X,da),"unknown"!==X&&$("#"+ma).simpletip({content:X,fixed:!1,offset:[100,-7]}))}}).bind("check_node.jstree",function(na,ja){var ma,
ca=ja.rslt.obj.attr("id"),da=ca.restorePinTreeNodeName();try{var X=ja.inst._get_parent(ja.rslt.obj).attr("id")}catch(R){}l=[];hb();if($("#"+ca).hasClass("semi-disabled"))Oc(ca);else{if("undefined"===typeof X){X=0;for(ma=Ga[da].length;X<ma;X+=1)l.push(Ga[da][X]);g=da;u.jstree("open_node",$("#"+ca))}else l[0]=parseInt(ca.sliceAfterX("Pin"),10),g=z(X.slicePriorToX("_"));tb?Ia(ca,g,l):tc(!0,ca,g,l)}}).bind("uncheck_node.jstree",function(na,ja){var ma=ja.rslt.obj.attr("id"),ca=ma.restorePinTreeNodeName();
try{var da=ja.inst._get_parent(ja.rslt.obj).attr("id")}catch(X){}l=[];if("undefined"===typeof da)l=Ga[ca],g=z(ca);else{if(-1!==ma.indexOf("_Intermediate")){n=0;for(e=oa.length;n<e;n+=1)oa[n].restorePinTreeNodeName()===ma.restorePinTreeNodeName()&&(ca=oa[n],g=z(ca.slicePriorToX("_")),l[0]=parseInt(ca.sliceAfterX("_Pin"),10),da=ca.restorePinTreeNodeName(),da===D[l[0]-1].replaceSpecialCharacters()&&(jb(ca,g,l),Xa()));return}l[0]=parseInt(ma.sliceAfterX("Pin"),10);g=z(da.slicePriorToX("_"))}tc(!1,ma,
g,l)}).bind("open_node.jstree",function(na,ja){var ma=ja.rslt.obj.attr("id"),ca=ma.restorePinTreeNodeName(),da,X,R;try{var H=ja.inst._get_parent(ja.rslt.obj).attr("id")}catch(bb){}if("undefined"===typeof H&&-1!==$.inArray(ma,t))for(n=0,e=nb.length;n<e;n+=1)-1!==nb[n].indexOf(ca)&&($("#"+nb[n]).addClass("semi-disabled"),$("#"+nb[n]+" >a").css("background-color","#B0C4DE"));if("undefined"===typeof H&&"undefined"!==typeof B[ca]&&0<B[ca].length){tb=!0;n=0;for(e=B[ca].length;n<e;n+=1)u.jstree("open_node",
$("#"+B[ca][n].restorePinTreeNodeName()+"_Intermediate")),u.jstree("check_node",$("#"+B[ca][n]));B[ca].length=0;tb=!1;Xa()}$(ja.rslt.obj).find("li").each(function(bb,Ba){da=$(Ba).attr("id");H=z(da.slicePriorToX("_"));if(-1!==da.indexOf("_Pin"))if(R=Oa[parseInt(da.sliceAfterX("_Pin"),10)-1],0!==da.indexOf(R)&&!ta(R)||-1!==da.indexOf(R)&&!1===$("#"+da).hasClass("jstree-checked"))$("#"+da+" >a").css("color","red"),$("#"+ma+" >a").css("color","red");else{if("undefined"===typeof B[H]||"undefined"!==typeof B[H]&&
0===B[H].length)ra=$.inArray(da,Ca),-1!==ra&&($("#"+da+" >a").css("color","blue"),Ca.splice(ra,1))}else u.jstree("open_node",$("#"+da)),$("#"+da).find("li").each(function(C,S){X=$(S).attr("id");H=z(X.slicePriorToX("_"));R=Oa[parseInt(X.sliceAfterX("_Pin"),10)-1];if(-1===X.indexOf(R)&&!ta(R)||-1!==X.indexOf(R)&&!1===$("#"+X).hasClass("jstree-checked"))$("#"+X+" >a").css("color","red"),$("#"+da+" >a").css("color","red"),$("#"+ma+" >a").css("color","red");else if("undefined"===typeof B[H]||"undefined"!==
typeof B[H]&&0===B[H].length)C=$.inArray(X,Ca),-1!==C&&($("#"+X+" >a").css("color","blue"),Ca.splice(C,1))}),u.jstree("close_node",$("#"+da))});var ra=R=X=da=H=ca=ma=null}).bind("select_node.jstree",function(na,ja){var ma=ja.rslt.obj.attr("id"),ca;u.jstree("open_node",$("#"+ma));$("#"+ma).find("li").each(function(X,R){ca=$(R).attr("id");-1!==ca.indexOf("_Pin")?u.jstree("open_node",$("#"+ca)):(u.jstree("open_node",$("#"+ca)),$("#"+ca).find("li").each(function(H,ra){da=$(ra).attr("id");u.jstree("open_node",
$("#"+da))}))});var da=ca=ma=null}).bind("loaded.jstree",function(){n=0;for(e=t.length;n<e;n+=1)$("#"+t[n]).addClass("semi-disabled"),$("#"+t[n]+" >a").css("background-color","#B0C4DE");if(ub){tb=!0;var na,ja,ma,ca,da=[];var X=fa;var R=wa(za);if("NUC400"===m||"M451HD"===m||"M451LD"===m||"M4521"===m||"NANO100AN"===m||"NANO100BN"===m||"NANO112"===m||"NUC505"===m||"NUC121AE"===m||"NUC123AE"===m||"NANO103"===m||0===m.indexOf("M47")||"M480MD"===m||"M480LD"===m||"AX58200"===m||0===m.indexOf("M25")||"NDA102SD2"===
m||"M261"===m||0===m.indexOf("M235")||0===m.indexOf("M030")||0===m.indexOf("M031")||"M0564"===m||"M05641"===m||0===m.indexOf("NUC126")||"M071QV"===m||"NUC029xGE"===m||"NUC029KGE"===m||"MINI57"===m||"NM1120"===m||"NDA102"===m||"MA35D1"===m){var H=0;for(ja=R.length;H<ja;H+=1)if(0!==za[R[H]]){var ra=za[R[H]];var bb=-1!==R[H].indexOf("MFPH")||-1!==R[H].indexOf("_H_MFP")?!1:!0;for(na=0;8>na;na+=1){var Ba=15<<4*na>>>0;var C=(ra&Ba)>>>0;if(C=C>>>4*na>>>0){var S=bb?na:na+8;var Pa="P"+R[H].slice(R[H].indexOf("P")+
1,R[H].indexOf("P")+2)+"."+S.toString();var N=$.inArray(Pa,NUTOOL_PIN.g_cfg_pkgs[NUTOOL_PIN.g_packageNumberIndex]);if(-1!==N){var qa=Ya(R[H],S);S=1;for(ma=NUTOOL_PIN.g_cfg_gpios[qa].f.length;S<ma;S+=1)if(-1!==NUTOOL_PIN.g_cfg_gpios[qa].f[S].indexOf(":"+C)){var G=NUTOOL_PIN.g_cfg_gpios[qa].f[S];G=G.slicePriorToX(":");S+=1;if(S<ma&&-1!==NUTOOL_PIN.g_cfg_gpios[qa].f[S].indexOf(":"+C))if(-1!==fa.indexOf("Pin"+Z(N+1))){var P=fa.slice(fa.indexOf("Pin"+Z(N+1)));P=P.sliceBetweenXandX(":","\r").trim();G!==
P&&(G=P)}else-1!==fa.indexOf("Pin "+Z(N+1))&&(P=fa.slice(fa.indexOf("Pin "+Z(N+1))),P=P.sliceBetweenXandX(":","\r").trim(),G!==P&&(G=P));break}C=G;C=z(C);G=G.replaceSpecialCharacters();-1!==C.indexOf("_")&&(C=C.slicePriorToX("_"));da[0]=N+1;Ia(G+"_Pin"+(N+1),C,da);"undefined"===typeof B[C]?(B[C]=[],B[C][0]=G+"_Pin"+(N+1)):B[C].push(G+"_Pin"+(N+1))}}ra=(ra&~Ba)>>>0;if(0===ra)break}}}else if("M0A21"===m||"M480HD"===m||0===m.indexOf("M46"))for(H=0,ja=R.length;H<ja;H+=1){if(0!==za[R[H]])for(ra=za[R[H]],
bb=parseInt(R[H].substr(-1),10),na=0;4>na;na+=1){Ba=255<<8*na>>>0;C=(ra&Ba)>>>0;if(C=C>>>8*na>>>0)if(S=na+4*bb,Pa="P"+R[H].slice(R[H].indexOf("P")+1,R[H].indexOf("P")+2)+"."+S.toString(),N=$.inArray(Pa,NUTOOL_PIN.g_cfg_pkgs[NUTOOL_PIN.g_packageNumberIndex]),-1!==N){qa=Ya(R[H],S);S=1;for(ma=NUTOOL_PIN.g_cfg_gpios[qa].f.length;S<ma;S+=1)if(-1!==NUTOOL_PIN.g_cfg_gpios[qa].f[S].indexOf(":"+C)){G=NUTOOL_PIN.g_cfg_gpios[qa].f[S];G=G.slicePriorToX(":");S+=1;S<ma&&-1!==NUTOOL_PIN.g_cfg_gpios[qa].f[S].indexOf(":"+
C)&&(-1!==fa.indexOf("Pin"+Z(N+1))?(P=fa.slice(fa.indexOf("Pin"+Z(N+1))),P=P.sliceBetweenXandX(":","\r").trim(),G!==P&&(G=P)):-1!==fa.indexOf("Pin "+Z(N+1))&&(P=fa.slice(fa.indexOf("Pin "+Z(N+1))),P=P.sliceBetweenXandX(":","\r").trim(),G!==P&&(G=P)));break}C=G;C=z(C);G=G.replaceSpecialCharacters();-1!==C.indexOf("_")&&(C=C.slicePriorToX("_"));da[0]=N+1;Ia(G+"_Pin"+(N+1),C,da);"undefined"===typeof B[C]?(B[C]=[],B[C][0]=G+"_Pin"+(N+1)):B[C].push(G+"_Pin"+(N+1))}ra=(ra&~Ba)>>>0;if(0===ra)break}}else if(0===
m.indexOf("ML5")||0===m.indexOf("MS51")||0===m.indexOf("KM1M7"))for(H=0,ja=R.length;H<ja;H+=1){if(0!==za[R[H]])for(ra=za[R[H]],na=0;8>na;na+=1){Ba=15<<4*na>>>0;C=(ra&Ba)>>>0;if(C=C>>>4*na>>>0)if(S=na,Pa="P"+R[H].slice(R[H].indexOf("P")+1,R[H].indexOf("P")+2)+"."+S.toString(),N=$.inArray(Pa,NUTOOL_PIN.g_cfg_pkgs[NUTOOL_PIN.g_packageNumberIndex]),-1!==N){qa=Ya(R[H],S);S=1;for(ma=NUTOOL_PIN.g_cfg_gpios[qa].f.length;S<ma;S+=1)if(-1!==NUTOOL_PIN.g_cfg_gpios[qa].f[S].indexOf(":"+C)){G=NUTOOL_PIN.g_cfg_gpios[qa].f[S];
G=G.slicePriorToX(":");S+=1;S<ma&&-1!==NUTOOL_PIN.g_cfg_gpios[qa].f[S].indexOf(":"+C)&&(-1!==fa.indexOf("Pin"+Z(N+1))?(P=fa.slice(fa.indexOf("Pin"+Z(N+1))),P=P.sliceBetweenXandX(":","\r").trim(),G!==P&&(G=P)):-1!==fa.indexOf("Pin "+Z(N+1))&&(P=fa.slice(fa.indexOf("Pin "+Z(N+1))),P=P.sliceBetweenXandX(":","\r").trim(),G!==P&&(G=P)));break}C=G;C=z(C);G=G.replaceSpecialCharacters();-1!==C.indexOf("_")&&(C=C.slicePriorToX("_"));da[0]=N+1;Ia(G+"_Pin"+(N+1),C,da);"undefined"===typeof B[C]?(B[C]=[],B[C][0]=
G+"_Pin"+(N+1)):B[C].push(G+"_Pin"+(N+1))}ra=(ra&~Ba)>>>0;if(0===ra)break}}else if("ISD9100"===m||"ISD9300"===m)for(H=0,ja=R.length;H<ja;H+=1){if(0!==za[R[H]])for(ra=za[R[H]],na=0;16>na;na+=1){Ba=3<<2*na>>>0;C=(ra&Ba)>>>0;if(C=C>>>2*na>>>0)if(S=na,Pa="P"+R[H].slice(R[H].indexOf("P")+1,R[H].indexOf("P")+2)+"."+S.toString(),N=$.inArray(Pa,NUTOOL_PIN.g_cfg_pkgs[NUTOOL_PIN.g_packageNumberIndex]),-1!==N){qa=Ya(R[H],S);S=1;for(ma=NUTOOL_PIN.g_cfg_gpios[qa].f.length;S<ma;S+=1)if(-1!==NUTOOL_PIN.g_cfg_gpios[qa].f[S].indexOf(":"+
C)){G=NUTOOL_PIN.g_cfg_gpios[qa].f[S];G=G.slicePriorToX(":");S+=1;S<ma&&-1!==NUTOOL_PIN.g_cfg_gpios[qa].f[S].indexOf(":"+C)&&(-1!==fa.indexOf("Pin"+Z(N+1))?(P=fa.slice(fa.indexOf("Pin"+Z(N+1))),P=P.sliceBetweenXandX(":","\r").trim(),G!==P&&(G=P)):-1!==fa.indexOf("Pin "+Z(N+1))&&(P=fa.slice(fa.indexOf("Pin "+Z(N+1))),P=P.sliceBetweenXandX(":","\r").trim(),G!==P&&(G=P)));break}C=G;C=z(C);G=G.replaceSpecialCharacters();-1!==C.indexOf("_")&&(C=C.slicePriorToX("_"));da[0]=N+1;Ia(G+"_Pin"+(N+1),C,da);"undefined"===
typeof B[C]?(B[C]=[],B[C][0]=G+"_Pin"+(N+1)):B[C].push(G+"_Pin"+(N+1))}ra=(ra&~Ba)>>>0;if(0===ra)break}}else if("NUC200AE"===m||"NUC2201"===m||"M071R1S"===m||"NUC029xEE"===m||"NUC100AN_BN"===m||"NUC100CN"===m||"NUC100DN"===m)for(H=0,ja=R.length;H<ja;H+=1){if(-1===R[H].indexOf("ALT")&&0!==za[R[H]])for(na=0;32>na;na+=1){ra=za[R[H]];Ba=1<<na>>>0;C=(ra&Ba)>>>na>>>0;N=-1;if(C)for(P=R[H]+"["+na+"]",S=0,ma=NUTOOL_PIN.g_cfg_gpioMatrix.length;S<ma;S+=1){var ua=1;for(ca=NUTOOL_PIN.g_cfg_gpioMatrix[S].f.length;ua<
ca;ua+=1)if(-1!==NUTOOL_PIN.g_cfg_gpioMatrix[S].f[ua].indexOf(P)){Pa=NUTOOL_PIN.g_cfg_gpioMatrix[S].f[0];N=$.inArray(Pa,NUTOOL_PIN.g_cfg_pkgs[NUTOOL_PIN.g_packageNumberIndex]);break}if(-1!==N){C=0;ua=1;for(ca=NUTOOL_PIN.g_cfg_gpioMatrix[S].f.length;ua<ca;ua+=1)G=NUTOOL_PIN.g_cfg_gpioMatrix[S].f[ua],bb=parseInt(G.slice(G.indexOf("[")+1,G.indexOf("]")),10),Ba=1<<bb>>>0,qa=G.slicePriorToX("["),ra=za[qa],C+=((ra&Ba)>>>bb)*Math.pow(2,ua-1),qa=G.slicePriorToX(":"),-1===$.inArray(qa,NUTOOL_PIN.g_cfg_shareBits)&&
(za[qa]=ra&~Ba);G="";qa=Ya(Pa,parseInt(Pa.sliceAfterX("."),10));ua=1;for(ca=NUTOOL_PIN.g_cfg_gpios[qa].f.length;ua<ca;ua+=1)if(-1!==NUTOOL_PIN.g_cfg_gpios[qa].f[ua].indexOf(":"+C)){G=NUTOOL_PIN.g_cfg_gpios[qa].f[ua];G=G.slicePriorToX(":");ua+=1;ua<ca&&-1!==NUTOOL_PIN.g_cfg_gpios[qa].f[ua].indexOf(":"+C)&&(-1!==fa.indexOf("Pin"+Z(N+1))?(P=fa.slice(fa.indexOf("Pin"+Z(N+1))),P=P.sliceBetweenXandX(":","\r").trim(),G!==P&&(G=P)):-1!==fa.indexOf("Pin "+Z(N+1))&&(P=fa.slice(fa.indexOf("Pin "+Z(N+1))),P=
P.sliceBetweenXandX(":","\r").trim(),G!==P&&(G=P)));break}if(""!==G){C=G;C=z(C);G=G.replaceSpecialCharacters();-1!==C.indexOf("_")&&(C=C.slicePriorToX("_"));da[0]=N+1;Ia(G+"_Pin"+(N+1),C,da);"undefined"===typeof B[C]?(B[C]=[],B[C][0]=G+"_Pin"+(N+1)):B[C].push(G+"_Pin"+(N+1));break}}}if(0===za[R[H]])break}}else for(H=0,ja=R.length;H<ja;H+=1)if(0!==za[R[H]])for(na=0;32>na;na+=1){ra=za[R[H]];Ba=1<<na>>>0;C=(ra&Ba)>>>na>>>0;N=-1;if(C)for(P=R[H]+"["+na+"]",S=0,ma=NUTOOL_PIN.g_cfg_gpioMatrix.length;S<ma;S+=
1){ua=1;for(ca=NUTOOL_PIN.g_cfg_gpioMatrix[S].f.length;ua<ca;ua+=1)if(-1!==NUTOOL_PIN.g_cfg_gpioMatrix[S].f[ua].indexOf(P)){Pa=NUTOOL_PIN.g_cfg_gpioMatrix[S].f[0];N=$.inArray(Pa,NUTOOL_PIN.g_cfg_pkgs[NUTOOL_PIN.g_packageNumberIndex]);break}if(-1!==N){C=0;ua=1;for(ca=NUTOOL_PIN.g_cfg_gpioMatrix[S].f.length;ua<ca;ua+=1)G=NUTOOL_PIN.g_cfg_gpioMatrix[S].f[ua],bb=parseInt(G.slice(G.indexOf("[")+1,G.indexOf("]")),10),Ba=1<<bb>>>0,qa=G.slicePriorToX("["),ra=za[qa],C+=((ra&Ba)>>>bb)*Math.pow(2,ua-1),za[qa]=
ra&~Ba;G="";qa=Ya(Pa,parseInt(Pa.sliceAfterX("."),10));ua=1;for(ca=NUTOOL_PIN.g_cfg_gpios[qa].f.length;ua<ca;ua+=1)if(-1!==NUTOOL_PIN.g_cfg_gpios[qa].f[ua].indexOf(":"+C)){G=NUTOOL_PIN.g_cfg_gpios[qa].f[ua];G=G.slicePriorToX(":");ua+=1;ua<ca&&-1!==NUTOOL_PIN.g_cfg_gpios[qa].f[ua].indexOf(":"+C)&&(-1!==fa.indexOf("Pin"+Z(N+1))?(P=fa.slice(fa.indexOf("Pin"+Z(N+1))),P=P.sliceBetweenXandX(":","\r").trim(),G!==P&&(G=P)):-1!==fa.indexOf("Pin "+Z(N+1))&&(P=fa.slice(fa.indexOf("Pin "+Z(N+1))),P=P.sliceBetweenXandX(":",
"\r").trim(),G!==P&&(G=P)));break}if(""!==G){C=G;C=z(C);G=G.replaceSpecialCharacters();-1!==C.indexOf("_")&&(C=C.slicePriorToX("_"));da[0]=N+1;Ia(G+"_Pin"+(N+1),C,da);"undefined"===typeof B[C]?(B[C]=[],B[C][0]=G+"_Pin"+(N+1)):B[C].push(G+"_Pin"+(N+1));break}}}if(0===za[R[H]])break}for(;-1!==X.indexOf("IN_ICE_MODE");){R=!0;H=X.indexOf("IN_ICE_MODE");for(ja=1;":"!==X.charAt(H-ja);)if(ja+=1,0>H-ja||30<ja){R=!1;break}if(R)G=X.slice(H-ja+1,H)+"IN_ICE_MODE",C=G=G.replaceSpecialCharacters(),-1!==C.indexOf("_")&&
(C=C.slicePriorToX("_")),C=z(C);else break;R=!0;H-=ja;for(ja=1;"n"!==X.charAt(H-ja);)if(ja+=1,0>H-ja||30<ja){R=!1;break}if(R)H=X.slice(H-ja+1).slicePriorToX(":"),H=parseInt(H,10),da[0]=H,Ia(G+"_Pin"+(N+1),C,da),"undefined"===typeof B[C]?(B[C]=[],B[C][0]=G+"_Pin"+H):B[C].push(G+"_Pin"+H);else break;X=X.slice(X.indexOf("IN_ICE_MODE")+1)}H=0;for(ja=ya.length;H<ja;H+=1)if(""===D[ya[H]]){X=ia[ya[H]];for(X=X.slice(X.indexOf("P"));-1!==X.indexOf(".")&&2!==X.indexOf(".");)X=X.slice(1),X=X.slice(X.indexOf("P"));
X=X.slicePriorToX("/");N=X.replaceSpecialCharacters()+"_Pin"+(ya[H]+1);X=z(X);da[0]=ya[H]+1;Ia(N,X,da);"undefined"===typeof B[X]?(B[X]=[],B[X][0]=N):B[X].push(N)}da=wa(B);H=0;for(ja=da.length;H<ja;H+=1)$("#"+da[H]+"_Root").addClass("jstree-undetermined");za=[];Xa();fa=null}else ub=!0,(Fb||NUTOOL_PIN.g_bFunctionalTesting)&&uc();tb=!1;Fb?($("#ChipType").show(),$("#MCU").show(),$("#moduleTree").height(Ha-$("#ChipType").height()-$("#MCU").height()-Wa-6-$("#supportedModules").height())):($("#ChipType").show(),
$("#MCU").show());$("#ChipTypeSelect").show();$("#MCUselect").show();$("#rootTree_Pin").show();$("#panel").css("overflow-x","scroll");$("#panel").css("overflow-y","scroll");$("#ChipType").css("border-right","16px solid #F2F2F2");$("#MCU").css("border-right","16px solid #F2F2F2");if(-1!==F.indexOf("WLCSP")||-1!==F.indexOf("BGA"))$("#pin_side_0").css("opacity","0.1"),$("#NUC_PinConfiguration_Canvas_Lining").css("opacity","1");Pb();"undefined"!==typeof NUTOOL_PER&&"PinConfigure"!==NUTOOL_PER.getg_currentTool()&&
($("#parentOfPanel").hide(),$("#ChipType").hide(),$("#MCU").hide(),$("#rootTree_Pin").hide());NUTOOL_PIN.g_bModuleTreeLoaded=!0}).bind("destroy.jstree",function(){b=[];f=[];h=[];k=[];a=[];l=[];q=[];t=[];B=[];Ca=[];Fa=Zb=sb=Nb=v=p=u=x=aa=O=ka=Y=g=w=E=L=y=null})}function tc(b,e,c,d){function f(J,L){if($("#"+$(L).attr("id")).hasClass("jstree-checked")||$("#"+$(L).attr("id")).hasClass("jstree-undetermined"))return E=!0,!1}function h(J,L){if($("#"+$(L).attr("id")).hasClass("jstree-checked"))return $("#"+
e.restorePinTreeNodeName()+"_Intermediate").removeClass("jstree-unchecked jstree-checked").addClass("jstree-undetermined"),$("#"+z(c)+"_Root").removeClass("jstree-unchecked jstree-checked").addClass("jstree-undetermined"),!1}var k;var a=!1;var g=[],l=[],q=[],t=va.length,x="",u;var p="#41AF88";var v=$("#moduleTree");var n=0;for(k=va.length;n<k;n+=1)g[n]=va[n].slicePriorToX(":");if(b){ib();for(n=0;n<t;n+=1)-1!==$.inArray(parseInt(g[n],10),d)&&(1!==d.length&&va[n]!==g[n]+":"+c||1===d.length&&D[g[n]-
1].replaceSpecialCharacters()!==e.restorePinTreeNodeName())&&(x="Simplified Chinese"===pa?x+("\u7b2c"+Z(g[n])+"\u811a\u4f4d\u5df2\u88ab"+D[g[n]-1]+"\u4f7f\u7528\u3002<br />"):"Traditional Chinese"===pa?x+("\u7b2c"+Z(g[n])+"\u8173\u4f4d\u5df2\u88ab"+D[g[n]-1]+"\u4f7f\u7528\u3002<br />"):x+("Pin"+Z(g[n])+" has been asserted by "+D[g[n]-1]+".<br />"),a=!0);if(a){if("Simplified Chinese"===pa){t="\u51b2\u7a81\u53d1\u751f";var r="\u9810\u671f\u7684"+c+"\u548c\u522b\u7684\u6a21\u7ec4\u51b2\u7a81\u3002\u8bf7\u95ee\u4f60\u8981\u8c03\u6574\u65e7\u7684\u4e14\u6539\u8bbe\u7f6e\u5230\u73b0\u5728\u7684\u6a21\u7ec4\u5417?";
var y="\u8981";var w="\u4e0d\u8981"}else"Traditional Chinese"===pa?(t="\u885d\u7a81\u767c\u751f",r="\u9810\u671f\u7684"+c+"\u548c\u5225\u7684\u6a21\u7d44\u885d\u7a81\u3002\u8acb\u554f\u4f60\u8981\u8abf\u6574\u820a\u7684\u4e14\u6539\u8a2d\u7f6e\u5230\u73fe\u5728\u7684\u6a21\u7d44\u55ce?",y="\u8981",w="\u4e0d\u8981"):(t="Conflict Occurred",r="The expected "+c+" conflicts with other modules. Would you like to adjust the old modules and configure to the current one?",y="Yes",w="No");Ra();$('<div id="conflictDialog"><p>'+
r+"<br />"+x+'</p><input type="text" size="1" style="position:relative;top:-5000px;"/></div>').dialog({modal:!1,resizable:!1,title:t,width:500,height:400,show:"fade",hide:"fade",close:function(){$("#conflictDialog").dialog("destroy")},buttons:[{text:y,click:function(){q=wa(K);Gb=[];n=0;for(k=q.length;n<k;n+=1)Gb[q[n]]=K[q[n]];Cb=[];n=0;for(k=ya.length;n<k;n+=1)Cb[n]=ya[n];fa="";n=0;for(k=D.length;n<k;n+=1)""!==D[n]&&(fa+="Pin"+(n+1)+":"+D[n]+"\r");U="";vc(e,c,d,g);$("#conflictDialog").dialog("isOpen")&&
$("#conflictDialog").dialog("destroy")}},{text:w,click:function(){n=0;for(k=d.length;n<k;n+=1)-1===$.inArray(d[n].toString(),g)&&l.push(d[n]);$("#conflictDialog").dialog("isOpen")&&$("#conflictDialog").dialog("destroy");n=0;for(k=l.length;n<k;n+=1)u=Va[c][$.inArray(l[n],Ga[c])]+"_Pin"+l[n],u=u.replaceSpecialCharacters(),$("#moduleTree").jstree("check_node",$("#"+u))}}]});$("#conflictDialog").dialog("widget").draggable("option","axis","x y");$("#conflictDialog").dialog("widget").draggable({containment:"window",
scroll:!1});w=y=r=t=null}}if(a&&b)if(1===d.length&&-1!==e.indexOf("_Pin")){if($("#"+e).removeClass("jstree-checked jstree-undetermined").addClass("jstree-unchecked"),-1!==e.indexOf("_")){$("#"+e.restorePinTreeNodeName()+"_Intermediate").removeClass("jstree-checked jstree-undetermined").addClass("jstree-unchecked");var E=!1;$("#"+z(c)+"_Root").find("li").each(function(J,L){if($("#"+$(L).attr("id")).hasClass("jstree-checked")||$("#"+$(L).attr("id")).hasClass("jstree-undetermined"))return E=!0,$("#"+
z(c)+"_Root").removeClass("jstree-unchecked jstree-checked").addClass("jstree-undetermined"),!1});E||($("#"+e.slicePriorToX("_")).removeClass("jstree-checked jstree-undetermined").addClass("jstree-unchecked"),$("#"+z(c)+"_Root").removeClass("jstree-checked jstree-undetermined").addClass("jstree-unchecked"));$("#"+e.restorePinTreeNodeName()+"_Intermediate").find("li").each(function(J,L){if($("#"+$(L).attr("id")).hasClass("jstree-checked"))return $("#"+e.restorePinTreeNodeName()+"_Intermediate").removeClass("jstree-unchecked jstree-checked").addClass("jstree-undetermined"),
$("#"+z(c)+"_Root").removeClass("jstree-unchecked jstree-checked").addClass("jstree-undetermined"),!1})}}else for(n=0,k=d.length;n<k;n+=1){v=Va[c][n];e=v+"_Pin"+d[n];e=e.replaceSpecialCharacters();E=!1;v=0;for(a=va.length;v<a;v+=1)d[n]===parseInt(va[v].slicePriorToX(":"),10)&&0===e.indexOf(va[v].sliceAfterX(":"))&&(E=!0);E||($("#"+e).removeClass("jstree-checked jstree-undetermined").addClass("jstree-unchecked"),$("#"+z(c)+"_Root").removeClass("jstree-unchecked jstree-checked").addClass("jstree-undetermined"));
-1!==e.indexOf("_")&&($("#"+e.restorePinTreeNodeName()+"_Intermediate").removeClass("jstree-checked jstree-undetermined").addClass("jstree-unchecked"),E=!1,$("#"+z(c)+"_Root").find("li").each(f),E||($("#"+e.slicePriorToX("_")).removeClass("jstree-checked jstree-undetermined").addClass("jstree-unchecked"),$("#"+z(c)+"_Root").removeClass("jstree-checked jstree-undetermined").addClass("jstree-unchecked")),$("#"+e.restorePinTreeNodeName()+"_Intermediate").find("li").each(h))}else{if(b){if(-1!==$.inArray(e.restorePinTreeNodeName()+
"_Intermediate",nb))for(n=0,k=oa.length;n<k;n+=1)oa[n].restorePinTreeNodeName()===e.restorePinTreeNodeName()&&e!==oa[n]&&v.jstree("uncheck_node",$("#"+oa[n]));if(1===d.length&&0===e.indexOf("EBI")&&(t=ia[parseInt(e.sliceAfterX("_Pin"),10)-1],t.indexOf("EBI")!==t.lastIndexOf("EBI")))for(;-1!==t.indexOf("EBI");)t=t.slice(t.indexOf("EBI")),-1!==t.indexOf("/")?(e.restorePinTreeNodeName()!==t.slice(t.indexOf("EBI"),t.indexOf("/"))&&v.jstree("uncheck_node",$("#"+t.slice(t.indexOf("EBI"),t.indexOf("/"))+
"_Pin"+e.sliceAfterX("_Pin"))),t=t.slice(t.indexOf("/")+1)):(e.restorePinTreeNodeName()!==t.slice(t.indexOf("EBI"))&&v.jstree("uncheck_node",$("#"+t.slice(t.indexOf("EBI"))+"_Pin"+e.sliceAfterX("_Pin"))),t=t.slice(1))}t=d.length;if(b)if(1===d.length&&-1!==e.indexOf("_Pin"))vb(d[0]-1,e.restorePinTreeNodeName(),!1);else for(n=0,k=d.length;n<k;n+=1)v=Va[c][n],vb(d[n]-1,v,!1);else for(n=0,k=d.length;n<k;n+=1)if(c===Oa[d[n]-1]||""===Oa[d[n]-1])Oa[d[n]-1]=NUTOOL_PIN.g_cfg_pkgs[NUTOOL_PIN.g_packageNumberIndex][d[n]-
1],vb(d[n]-1,"",!0);if(b){if(0<mb.length)p="#FAB92D";else if(0!==Aa.length)for(v=0,a=Aa.length;v<a;v+=1)Aa[v]===d[n]&&Aa.splice(v,1);for(n=0;n<t;n+=1){x=!1;v=0;for(a=va.length;v<a;v+=1)if(d[n]===parseInt(va[v].slicePriorToX(":"),10)){va[v]=d[n]+":"+c;x=!0;break}x||va.push(d[n]+":"+c);1!==d.length?ob(d[n]-1,c):-1!==e.indexOf("_Pin")?ob(d[n]-1,e.restorePinTreeNodeName(),!0):ob(d[n]-1,e);pb(d[n],p);Oa[d[n]-1]=c}}else for(n=0;n<t;n+=1)if(p=$.inArray(d[n]+":"+c,va),-1!==p&&(va.splice(p,1),ob(d[n]-1,NUTOOL_PIN.g_cfg_pkgs[NUTOOL_PIN.g_packageNumberIndex][d[n]-
1]),pb(d[n],"#FFFFFF"),0!==Aa.length))for(v=0,a=Aa.length;v<a;v+=1)Aa[v]===d[n]&&Aa.splice(v,1);Xa();if(b)if(1===d.length&&-1!==e.indexOf("_Pin"))Db(e,d[0],!0);else for(n=0,k=d.length;n<k;n+=1)v=Va[c][n],Db(v+"_Pin"+d[n],d[n],!0);else for(n=0,k=d.length;n<k;n+=1)v=Va[c][n],Db(v+"_Pin"+d[n],d[n],!1);a=null;g=[];l=[];q=[];E=p=x=t=v=v=u=x=t=null}}function vc(b,e,c,d){function f(J,L){y=$(L).attr("id");if("red"===$("#"+y+" >a").css("color")||"rgb(255, 0, 0)"===$("#"+y+" >a").css("color")||r)$("#"+y).removeClass("jstree-checked jstree-undetermined").addClass("jstree-unchecked");
else{r=!0;v=[];v[0]=parseInt(y.sliceAfterX("Pin"),10);""!==U&&(E=U.slice(U.lastIndexOf("/")+1).slicePriorToX(";"),E!==v[0].toString()&&"removed"!==E&&"end"!==E&&(U+=D[parseInt(E,10)-1]+":"+E+"/end;"));U+=y.restorePinTreeNodeName()+":"+v[0];n=0;for(a=l.length;n<a;n+=1)if(0===l[n].indexOf(y.restorePinTreeNodeName()+"_Pin")){U+="/"+l[n].sliceAfterX("Pin");l.splice(n,1);break}U+=";";Ia(y,p,v);$("#"+y).removeClass("jstree-unchecked jstree-undetermined").addClass("jstree-checked");$("#"+y+" >a").css("color",
"blue")}}function h(J,L){y=$(L).attr("id");x=parseInt(y.sliceAfterX("Pin"),10);-1===$.inArray(x,c)&&(w=$b(y,c,0,l));if(w)return!1}var k,a;var g=$("#moduleTree");var l=[],q=[];var t=0;for(k=c.length;t<k;t+=1){var x=c[t];if(-1!==$.inArray(x.toString(),d)){var u=D[x-1]+"_Pin"+x;u=u.replaceSpecialCharacters();g.jstree("uncheck_node",$("#"+u));l.push(u);if(!$("#"+u).hasClass("jstree-unchecked")){var p=z(u.slicePriorToX("_"));var v=[];v[0]=x;jb(u,p,v);if("undefined"!==typeof B[p]){var n=0;for(a=B[p].length;n<
a;n+=1)if(B[p][n]===u){B[p][n]="";break}n=0;for(a=B[p].length;n<a&&""===B[p][n];n+=1)n===a-1&&$("#"+p+"_Root").removeClass("jstree-undetermined").addClass("jstree-unchecked")}g.jstree("close_node",$("#"+p+"_Root"))}-1!==$.inArray(u,oa)&&q.push(u.restorePinTreeNodeName()+"_Intermediate")}}if(1===c.length&&-1!==b.indexOf("_Pin"))g.jstree("check_node",$("#"+b));else for(t=0,k=c.length;t<k;t+=1)for(n=0,a=Ga[e].length;n<a;n+=1)Ga[e][n]===c[t]&&(b=Va[e][n].replaceSpecialCharacters(),g.jstree("check_node",
$("#"+b+"_Pin"+c[t])));if(0<q.length){t=0;for(k=q.length;t<k;t+=1){var r=!1;p=z(q[t].slicePriorToX("_"));if(0<$("#"+q[t]).find("li").length)$("#"+q[t]).find("li").each(f);else{var y=q[t].restorePinTreeNodeName();n=0;for(a=oa.length;n<a;n+=1)if(0===oa[n].indexOf(y+"_Pin")){x=oa[n].sliceAfterX("_Pin");var w=!1;e=0;for(g=va.length;e<g;e+=1)if(va[e].slicePriorToX(":")===x){w=!0;break}if(!w){r=!0;y=oa[n];v=[];v[0]=parseInt(y.sliceAfterX("Pin"),10);if(""!==U){var E=U.slice(U.lastIndexOf("/")+1).slicePriorToX(";");
E!==v[0].toString()&&"removed"!==E&&"end"!==E&&(U+=D[parseInt(E,10)-1]+":"+E+"/end;")}U+=y.restorePinTreeNodeName()+":"+v[0];n=0;for(a=l.length;n<a;n+=1)if(0===l[n].indexOf(y.restorePinTreeNodeName()+"_Pin")){U+="/"+l[n].sliceAfterX("Pin");l.splice(n,1);break}U+=";";Ia(y,p,v);e=0;for(g=Ca.length;e<g;e+=1)if(0===Ca[e].indexOf(y.restorePinTreeNodeName()+"_Pin")){Ca.splice(e,1);break}Ca.push(y);"undefined"===typeof B[p]?(B[p]=[],B[p][0]=y):B[p].push(y);break}}}if(r)$("#"+p+"_Root").removeClass("jstree-checked jstree-unchecked").addClass("jstree-undetermined"),
$("#"+q[t]).removeClass("jstree-checked jstree-unchecked").addClass("jstree-undetermined");else{w=!1;if(0<$("#"+q[t]).find("li").length)$("#"+q[t]).find("li").each(h);else for(y=q[t].restorePinTreeNodeName(),n=0,a=oa.length;n<a&&(0!==oa[n].indexOf(y+"_Pin")||(x=parseInt(oa[n].sliceAfterX("_Pin"),10),-1===$.inArray(x,c)&&(w=$b(oa[n],c,0,l)),!w));n+=1);w||$("#"+q[t]).removeClass("jstree-checked jstree-undetermined").addClass("jstree-unchecked")}}Xa()}""!==U&&(E=U.slice(U.lastIndexOf("/")+1).slicePriorToX(";"),
"removed"!==E&&"end"!==E&&(U+=D[parseInt(E,10)-1]+":"+E+"/end;"));n=0;for(a=l.length;n<a;n+=1)U+=l[n].restorePinTreeNodeName().restoreSpecialCharacters()+":"+l[n].sliceAfterX("_Pin")+"/removed;";""!==U&&Pc(U);p=g=b=y=u=b=E=x=g=e=a=n=k=t=null;v=[];l=[];q=[];w=r=null}function $b(b,e,c,d){function f(w,E){v=$(E).attr("id");v!==b&&$("#"+v).hasClass("jstree-checked")&&(x=!0,""!==U&&(y=U.slice(U.lastIndexOf("/")+1).slicePriorToX(";"),y!==a[0].toString()&&"removed"!==y&&"end"!==y&&(U+=D[parseInt(y,10)-1]+
":"+y+"/end;")),U+=b.restorePinTreeNodeName()+":"+a[0]+"/"+v.sliceAfterX("Pin")+";");v!==b&&$("#"+v).removeClass("jstree-checked jstree-undetermined").addClass("jstree-unchecked")}var h,k,a=[],g=[];$("#moduleTree");var l;var q=parseInt(b.sliceAfterX("Pin"),10);var t=D[q-1].replaceSpecialCharacters();if(-1===$.inArray(t+"_Pin"+q,oa)||-1!==$.inArray(q,e)||10<=c)return!1;e.push(q);c+=1;var x=l=!1;g=[];var u=z(t.slicePriorToX("_"));var p=t+"_Intermediate";if(0<$("#"+p).find("li").length)$("#"+p).find("li").each(function(w,
E){v=$(E).attr("id");"red"===$("#"+v+" >a").css("color")||"rgb(255, 0, 0)"===$("#"+v+" >a").css("color")||v.sliceAfterX("_Pin")===q.toString()||l?v.sliceAfterX("_Pin")!==q.toString()&&(g.push(v),$("#"+v).removeClass("jstree-checked jstree-undetermined").addClass("jstree-unchecked")):(l=!0,a=[],a[0]=parseInt(v.sliceAfterX("Pin"),10),""!==U&&(y=U.slice(U.lastIndexOf("/")+1).slicePriorToX(";"),y!==a[0].toString()&&"removed"!==y&&"end"!==y&&(U+=D[parseInt(y,10)-1]+":"+y+"/end;")),U+=v.restorePinTreeNodeName()+
":"+a[0]+"/"+q+";",Ia(v,u,a),$("#"+v).removeClass("jstree-unchecked jstree-undetermined").addClass("jstree-checked"),$("#"+v+" >a").css("color","blue"))});else for(p=0,h=oa.length;p<h;p+=1)if(0===oa[p].indexOf(t+"_Pin")){var v=oa[p];var n=v.sliceAfterX("_Pin");if(n===q.toString())x=!0;else{x=!1;var r=0;for(k=va.length;r<k;r+=1)if(va[r].slicePriorToX(":")===n){x=!0;break}}if(x||l)v.sliceAfterX("_Pin")!==q.toString()&&g.push(v);else{l=!0;a=[];a[0]=parseInt(v.sliceAfterX("Pin"),10);if(""!==U){var y=
U.slice(U.lastIndexOf("/")+1).slicePriorToX(";");y!==a[0].toString()&&"removed"!==y&&"end"!==y&&(U+=D[parseInt(y,10)-1]+":"+y+"/end;")}U+=v.restorePinTreeNodeName()+":"+a[0]+"/"+q+";";Ia(v,u,a);r=0;for(k=Ca.length;r<k;r+=1)if(0===Ca[r].indexOf(v.restorePinTreeNodeName()+"_Pin")){Ca.splice(r,1);break}Ca.push(v);"undefined"===typeof B[u]?(B[u]=[],B[u][0]=v):B[u].push(v);if("undefined"!==typeof B[u]){p=0;for(h=B[u].length;p<h;p+=1)if(B[u][p]===t+"_Pin"+q){B[u][p]="";break}p=0;for(h=B[u].length;p<h&&
""===B[u][p];p+=1)p===h-1&&$("#"+u+"_Root").removeClass("jstree-undetermined").addClass("jstree-unchecked")}break}}if(l){$("#"+t+"_Pin"+q).removeClass("jstree-checked jstree-undetermined").addClass("jstree-unchecked");a=[];a[0]=parseInt(b.sliceAfterX("Pin"),10);u=z(b.slicePriorToX("_"));if(0<$("#"+b.restorePinTreeNodeName()+"_Intermediate").find("li").length)$("#"+b.restorePinTreeNodeName()+"_Intermediate").find("li").each(function(w,E){v=$(E).attr("id");v===b||!$("#"+v).hasClass("jstree-checked")&&
-1===$.inArray(v,d)||(""!==U&&(y=U.slice(U.lastIndexOf("/")+1).slicePriorToX(";"),y!==a[0].toString()&&"removed"!==y&&"end"!==y&&(U+=D[parseInt(y,10)-1]+":"+y+"/end;")),U+=b.restorePinTreeNodeName()+":"+a[0]+"/"+v.sliceAfterX("Pin")+";");v!==b&&$("#"+v).removeClass("jstree-checked jstree-undetermined").addClass("jstree-unchecked")});else for(p=0,h=oa.length;p<h;p+=1)if(0===oa[p].indexOf(b.restorePinTreeNodeName()+"_Pin")&&(v=oa[p],v!==b&&(v.restorePinTreeNodeName()===D[parseInt(v.sliceAfterX("Pin"),
10)-1]||-1!==$.inArray(v,d)))){""!==U&&(y=U.slice(U.lastIndexOf("/")+1).slicePriorToX(";"),y!==a[0].toString()&&"removed"!==y&&"end"!==y&&(U+=D[parseInt(y,10)-1]+":"+y+"/end;"));U+=b.restorePinTreeNodeName()+":"+a[0]+"/"+v.sliceAfterX("Pin")+";";break}p=0;for(h=d.length;p<h;p+=1)if(0===d[p].indexOf(b.restorePinTreeNodeName()+"_Pin")){d.splice(p,1);break}Ia(b,u,a);$("#"+u+"_Root").removeClass("jstree-checked jstree-unchecked").addClass("jstree-undetermined");$("#"+b.restorePinTreeNodeName()+"_Intermediate").removeClass("jstree-checked jstree-unchecked").addClass("jstree-undetermined");
$("#"+b).removeClass("jstree-unchecked jstree-undetermined").addClass("jstree-checked");$("#"+b+" >a").css("color","blue");if(0===$("#"+b.restorePinTreeNodeName()+"_Intermediate").find("li").length){r=0;for(k=Ca.length;r<k;r+=1)if(0===Ca[r].indexOf(b.restorePinTreeNodeName()+"_Pin")){Ca.splice(r,1);break}Ca.push(b);"undefined"===typeof B[u]?(B[u]=[],B[u][0]=b):B[u].push(b);if("undefined"!==typeof B[u]){p=0;for(h=B[u].length;p<h;p+=1)if(B[u][p]===v){B[u][p]="";break}p=0;for(h=B[u].length;p<h&&""===
B[u][p];p+=1)p===h-1&&$("#"+u+"_Root").removeClass("jstree-undetermined").addClass("jstree-unchecked")}}return!0}if(0<g.length){for(p=0;p<g.length;p+=1)if(x=$b(g[p],e,c,d)){a=[];a[0]=parseInt(b.sliceAfterX("Pin"),10);u=z(b.slicePriorToX("_"));x=!1;if(0<$("#"+b.restorePinTreeNodeName()+"_Intermediate").find("li").length)$("#"+b.restorePinTreeNodeName()+"_Intermediate").find("li").each(f);else for(p=0,h=oa.length;p<h;p+=1)if(0===oa[p].indexOf(b.restorePinTreeNodeName()+"_Pin")&&(v=oa[p],v!==b&&v.restorePinTreeNodeName()===
D[parseInt(v.sliceAfterX("Pin"),10)-1])){x=!0;""!==U&&(y=U.slice(U.lastIndexOf("/")+1).slicePriorToX(";"),y!==a[0].toString()&&"removed"!==y&&"end"!==y&&(U+=D[parseInt(y,10)-1]+":"+y+"/end;"));U+=b.restorePinTreeNodeName()+":"+a[0]+"/"+v.sliceAfterX("Pin")+";";break}if(x)for(p=0,h=d.length;p<h;p+=1){if(0===d[p].indexOf(b.restorePinTreeNodeName()+"_Pin")){d.splice(p,1);break}}else{""!==U&&(y=U.slice(U.lastIndexOf("/")+1).slicePriorToX(";"),y!==a[0].toString()&&"removed"!==y&&"end"!==y&&(U+=D[parseInt(y,
10)-1]+":"+y+"/end;"));U+=b.restorePinTreeNodeName()+":"+a[0];p=0;for(h=d.length;p<h;p+=1)if(0===d[p].indexOf(b.restorePinTreeNodeName()+"_Pin")){U+="/"+d[p].sliceAfterX("Pin");v=d[p];d.splice(p,1);break}U+=";"}Ia(b,u,a);$("#"+u+"_Root").removeClass("jstree-checked jstree-unchecked").addClass("jstree-undetermined");$("#"+b.restorePinTreeNodeName()+"_Intermediate").removeClass("jstree-checked jstree-unchecked").addClass("jstree-undetermined");$("#"+b).removeClass("jstree-unchecked jstree-undetermined").addClass("jstree-checked");
$("#"+b+" >a").css("color","blue");if(0===$("#"+b.restorePinTreeNodeName()+"_Intermediate").find("li").length){r=0;for(k=Ca.length;r<k;r+=1)if(0===Ca[r].indexOf(b.restorePinTreeNodeName()+"_Pin")){Ca.splice(r,1);break}Ca.push(b);"undefined"===typeof B[u]?(B[u]=[],B[u][0]=b):B[u].push(b);if("undefined"!==typeof B[u]){p=0;for(h=B[u].length;p<h;p+=1)if(B[u][p]===v){B[u][p]="";break}p=0;for(h=B[u].length;p<h&&""===B[u][p];p+=1)p===h-1&&$("#"+u+"_Root").removeClass("jstree-undetermined").addClass("jstree-unchecked")}}return!0}return!1}p=
u=y=q=n=k=r=h=p=h=p=null;a=[];g=[];x=l=v=t=null}function Ia(b,e,c){var d,f=c.length;$("#moduleTree");if(0!==Aa.length){var h=0;for(d=Aa.length;h<d;h+=1)Aa[h]===c[k]&&Aa.splice(h,1)}if(1===c.length&&-1!==b.indexOf("_Pin"))vb(c[0]-1,b.restorePinTreeNodeName(),!1);else{var k=0;for(h=c.length;k<h;k+=1)d=Va[e][k],vb(c[k]-1,d,!1)}for(k=0;k<f;k+=1){var a=!1;h=0;for(d=va.length;h<d;h+=1)if(c[k]===parseInt(va[h].slicePriorToX(":"),10)){va[h]=c[k]+":"+e;a=!0;break}a||va.push(c[k]+":"+e);1!==c.length?ob(c[k]-
1,e):-1!==b.indexOf("_Pin")?ob(c[k]-1,b.restorePinTreeNodeName(),!0):ob(c[k]-1,b,!0);pb(c[k],"#41AF88");Oa[c[k]-1]=e}if(1===c.length&&-1!==b.indexOf("_Pin"))Db(b,c[0],!0);else for(k=0,h=c.length;k<h;k+=1)d=Va[e][k],Db(d+"_Pin"+c[k],c[k],!0);c.length=null}function Oc(b){var e,c,d=$("#moduleTree"),f=[],h=[],k=[],a=[],g=[],l=[],q=[],t;var x=!0;a=[];g=[];l=[];q=[];var u=z(b.slicePriorToX("_"));var p=t=!1;var v=0;d.jstree("open_node",$("#"+b));$("#"+b).find("li").each(function(aa,ka){r=$(ka).attr("id");
if(-1===$.inArray(r,a))if(a.push(r),-1===$.inArray(r,oa))-1!==r.indexOf("_Pin")?(w=D[parseInt(r.sliceAfterX("_Pin"),10)-1].replaceSpecialCharacters(),w!==r.restorePinTreeNodeName()?(x=!1,$("#"+r).removeClass("jstree-checked jstree-undetermined").addClass("jstree-unchecked")):p=!0,"red"!==$("#"+r+" >a").css("color")&&"rgb(255, 0, 0)"!==$("#"+r+" >a").css("color")||-1!==$.inArray(r.sliceAfterX("Pin"),l)||(g.push(r),l.push(r.sliceAfterX("Pin")))):(t=!1,v=0,d.jstree("open_node",$("#"+r)),$("#"+r).removeClass("jstree-checked jstree-unchecked").addClass("jstree-undetermined"),
$("#"+r).find("li").each(function(O,Fa){Y=$(Fa).attr("id");a.push(Y);w=D[parseInt(Y.sliceAfterX("_Pin"),10)-1].replaceSpecialCharacters();w===Y.restorePinTreeNodeName()?p=t=!0:$("#"+Y).removeClass("jstree-checked jstree-undetermined").addClass("jstree-unchecked");if("red"===$("#"+Y+" >a").css("color")||"rgb(255, 0, 0)"===$("#"+Y+" >a").css("color"))v+=1;O+1===$("#"+r).find("li").length&&!1===t&&(x=!1,v===$("#"+r).find("li").length&&q.push(r),$("#"+r).removeClass("jstree-checked jstree-undetermined").addClass("jstree-unchecked"))}));
else{w=D[parseInt(r.sliceAfterX("_Pin"),10)-1].replaceSpecialCharacters();w===r.restorePinTreeNodeName()?p=t=!0:$("#"+r).removeClass("jstree-checked jstree-undetermined").addClass("jstree-unchecked");if("red"===$("#"+r+" >a").css("color")||"rgb(255, 0, 0)"===$("#"+r+" >a").css("color"))v+=1;if(aa+1===$("#"+b).find("li").length&&!1===t){x=!1;if(v===$("#"+b).find("li").length)for(n=0,e=$("#"+b).find("li").length;n<e;n+=1)if(w=$("#"+b).find("li")[n].id,-1===$.inArray(w.sliceAfterX("Pin"),l)){g.push(w);
l.push(w.sliceAfterX("Pin"));break}$("#"+b).removeClass("jstree-checked jstree-undetermined").addClass("jstree-unchecked");n=0;for(e=va.length;n<e;n+=1)if(va[n].sliceAfterX(":")===u){t=!0;break}t?$("#"+u+"_Root").removeClass("jstree-checked jstree-unchecked").addClass("jstree-undetermined"):$("#"+u+"_Root").removeClass("jstree-checked jstree-undetermined").addClass("jstree-unchecked")}}});if(0<q.length){var n=0;for(e=q.length;n<e;n+=1){var r=q[n];var y=0;for(c=$("#"+r).find("li").length;y<c;y+=1){var w=
$("#"+r).find("li")[y].id;if(-1===$.inArray(w.sliceAfterX("Pin"),l)){g.push(w);l.push(w.sliceAfterX("Pin"));break}}}}p?$("#"+b).removeClass("jstree-checked jstree-unchecked").addClass("jstree-undetermined"):$("#"+b).removeClass("jstree-checked jstree-undetermined").addClass("jstree-unchecked");if(x)"undefined"!==typeof B[u]&&0<B[u].length&&(B[u].length=0),d.jstree("uncheck_node",$("#"+b));else if(0<g.length){var E="";for(n=0;n<g.length;n+=1)w=g[n].sliceAfterX("Pin"),E="Simplified Chinese"===pa?E+
("\u7b2c"+Z(w)+"\u811a\u4f4d\u5df2\u88ab"+D[parseInt(w,10)-1]+"\u4f7f\u7528\u3002<br />"):"Traditional Chinese"===pa?E+("\u7b2c"+Z(w)+"\u8173\u4f4d\u5df2\u88ab"+D[parseInt(w,10)-1]+"\u4f7f\u7528\u3002<br />"):E+("Pin"+Z(w)+" has been asserted by "+D[parseInt(w,10)-1]+".<br />");if("Simplified Chinese"===pa){y="\u51b2\u7a81\u53d1\u751f";c="\u9810\u671f\u7684"+u+"\u548c\u522b\u7684\u6a21\u7ec4\u51b2\u7a81\u3002\u8bf7\u95ee\u4f60\u8981\u8c03\u6574\u65e7\u7684\u4e14\u6539\u8bbe\u7f6e\u5230\u73b0\u5728\u7684\u6a21\u7ec4\u5417?";
var J="\u8981";var L="\u4e0d\u8981"}else"Traditional Chinese"===pa?(y="\u885d\u7a81\u767c\u751f",c="\u9810\u671f\u7684"+u+"\u548c\u5225\u7684\u6a21\u7d44\u885d\u7a81\u3002\u8acb\u554f\u4f60\u8981\u8abf\u6574\u820a\u7684\u4e14\u6539\u8a2d\u7f6e\u5230\u73fe\u5728\u7684\u6a21\u7d44\u55ce?",J="\u8981",L="\u4e0d\u8981"):(y="Conflict Occurred",c="The expected "+u+" conflicts with other modules. Would you like to adjust the old modules and configure to the current one?",J="Yes",L="No");Ra();$('<div id="conflictDialog"><p>'+
c+"<br />"+E+'</p><input type="text" size="1" style="position:relative;top:-5000px;"/></div>').dialog({modal:!1,resizable:!1,title:y,width:500,height:400,show:"fade",hide:"fade",close:function(){$("#conflictDialog").dialog("destroy")},buttons:[{text:J,click:function(){k=wa(K);Gb=[];n=0;for(e=k.length;n<e;n+=1)Gb[k[n]]=K[k[n]];Cb=[];n=0;for(e=ya.length;n<e;n+=1)Cb[n]=ya[n];fa="";n=0;for(e=D.length;n<e;n+=1)""!==D[n]&&(fa+="Pin"+(n+1)+":"+D[n]+"\r");ac(b);U="";f=[];h=[];for(n=0;n<g.length;n+=1)f.push(parseInt(g[n].sliceAfterX("Pin"),
10)),h.push(g[n].sliceAfterX("Pin"));u=z(g[0].slicePriorToX("_"));vc(g[0],u,f,h)}},{text:L,click:function(){$("#conflictDialog").dialog("isOpen")&&$("#conflictDialog").dialog("destroy");ac(b)}}]});$("#conflictDialog").dialog("widget").draggable("option","axis","x y");$("#conflictDialog").dialog("widget").draggable({containment:"window",scroll:!1});L=J=c=y=null}else ac(b);Xa();var Y=r=u=d=c=y=e=n=null;a=[];k=[];p=x=t=null}function ac(b){function e(v,n){p=$(n).attr("id");l=D[parseInt(p.sliceAfterX("_Pin"),
10)-1].replaceSpecialCharacters();if(l===p.restorePinTreeNodeName())return t=q=!0,!1}function c(v,n){p=$(n).attr("id");"red"===$("#"+p+" >a").css("color")||"rgb(255, 0, 0)"===$("#"+p+" >a").css("color")||t||(k=p.restorePinTreeNodeName()+"_Intermediate",h=[],h[0]=parseInt(p.sliceAfterX("Pin"),10),Ia(p,x,h),t=q=!0);l=D[parseInt(p.sliceAfterX("_Pin"),10)-1].replaceSpecialCharacters();l===p.restorePinTreeNodeName()?$("#"+p).removeClass("jstree-unchecked jstree-undetermined").addClass("jstree-checked"):
$("#"+p).removeClass("jstree-checked jstree-undetermined").addClass("jstree-unchecked")}var d,f=$("#moduleTree"),h=[],k,a,g=[],l,q;var t=q=!1;g=[];var x=z(b.slicePriorToX("_"));$("#"+b).find("li").each(function(v,n){a=$(n).attr("id");-1!==a.indexOf("_Pin")&&-1===$.inArray(a.restorePinTreeNodeName()+"_Intermediate",g)?("red"===$("#"+a+" >a").css("color")||"rgb(255, 0, 0)"===$("#"+a+" >a").css("color")||t||(-1===$.inArray(a,oa)?(h=[],h[0]=parseInt(a.sliceAfterX("Pin"),10),Ia(a,x,h),q=!0):(q=!1,k=a.restorePinTreeNodeName()+
"_Intermediate",f.jstree("open_node",$("#"+k)),$("#"+k).find("li").each(function(r,y){p=$(y).attr("id");l=D[parseInt(p.sliceAfterX("_Pin"),10)-1].replaceSpecialCharacters();if(l===p.restorePinTreeNodeName())return q=!0,!1}),q||(h=[],h[0]=parseInt(a.sliceAfterX("Pin"),10),Ia(a,x,h)),t=q=!0)),l=D[parseInt(a.sliceAfterX("_Pin"),10)-1].replaceSpecialCharacters(),l===a.restorePinTreeNodeName()?$("#"+a).removeClass("jstree-unchecked jstree-undetermined").addClass("jstree-checked"):$("#"+a).removeClass("jstree-checked jstree-undetermined").addClass("jstree-unchecked")):
-1!==a.indexOf("_Intermediate")&&g.push(a)});var u=0;for(d=g.length;u<d;u+=1)t=!1,f.jstree("open_node",$("#"+g[u])),$("#"+g[u]).find("li").each(e),$("#"+g[u]).find("li").each(c),t?$("#"+g[u]).removeClass("jstree-checked jstree-unchecked").addClass("jstree-undetermined"):$("#"+g[u]).removeClass("jstree-checked jstree-undetermined").addClass("jstree-unchecked");q?($("#"+b).removeClass("jstree-checked jstree-unchecked").addClass("jstree-undetermined"),$("#"+x+"_Root").removeClass("jstree-checked jstree-unchecked").addClass("jstree-undetermined")):
$("#"+b).removeClass("jstree-checked jstree-undetermined").addClass("jstree-unchecked");Xa();x=f=d=u=null;h=[];var p=a=k=null;g=[];t=q=l=null}function jb(b,e,c){var d,f;var h=c.length;for(d=0;d<h;d+=1){var k=$.inArray(c[d]+":"+e,va);if(-1!==k&&(va.splice(k,1),ob(c[d]-1,NUTOOL_PIN.g_cfg_pkgs[NUTOOL_PIN.g_packageNumberIndex][c[d]-1]),Oa[c[d]-1]=NUTOOL_PIN.g_cfg_pkgs[NUTOOL_PIN.g_packageNumberIndex][c[d]-1],0!==Aa.length))for(k=0,f=Aa.length;k<f;k+=1)Aa[k]===c[d]&&Aa.splice(k,1)}d=0;for(h=c.length;d<
h;d+=1)e!==Oa[c[d]-1]&&(vb(c[d]-1,"",!0),Db(b+"_Pin"+c[d],c[d],!1)),pb(c[d],"#FFFFFF")}function vb(b,e,c){var d;var f=-1!==F.indexOf("WLCSP")||-1!==F.indexOf("BGA")?sa.getContext($("#pin_side_0")[0]):sa.getContext($("#NUC_PinConfiguration_Canvas")[0]);c||-1===e.indexOf("_dot")&&2!==e.indexOf(".")||-1!==$.inArray(b,ya)||("undefined"===typeof ya?ya[0]=b:ya.push(b));if(c&&0!==ya.length){var h=0;for(d=ya.length;h<d;h+=1)ya[h]===b&&ya.splice(h,1)}e=e.restorePinTreeNodeName().restoreSpecialCharacters();
D[b]=c?"":e;f.font="12px Arial";-1!==F.indexOf("SOP")?(d=b-Math.floor(b/T*2)*T/2,b<=T/2-1?(h=Q-40-3,d=V+la+d*(16+ha)+12.8,f.save(),f.fillStyle="#FFFFFF",f.fillRect(h-Ta/2+1,d-12.8-2-1,Ta/2,20),f.fillStyle="#000000",c&&Da&&f.fillText(ia[b],h-f.measureText(ia[b]).width,d),c||f.fillText(e,h-f.measureText(e).width,d),f.restore()):(h=Q+A/2+40+3,d=V+A-la-16-d*(16+ha)+12.8,f.fillStyle="#FFFFFF",f.fillRect(h,d-12.8-2-1,Ta/2,20),f.fillStyle="#000000",c&&Da&&f.fillText(ia[b],h,d),c||f.fillText(e,h,d))):-1!==
F.indexOf("WLCSP")||-1!==F.indexOf("BGA")?(h=la+30+Math.floor(b/Ja)*(60+ha),d=la+30+(Ja-1-b%Ja)*(60+ha),f.beginPath(),f.arc(h,d,30,0,2*Math.PI,!0),f.fillStyle="#FFFFFF",f.fill(),f.fillStyle="#000000",""===e&&(e=NUTOOL_PIN.g_cfg_pkgs[NUTOOL_PIN.g_packageNumberIndex][b]),6<e.length&&(e=e.slice(0,6)+".."),f.fillText(e,h-f.measureText(e).width/2,d+parseInt(f.font,10)/2)):b<I?(d=b+Math.floor((Ka-I)/2),h=Q+la+d*(16+ha),d=V+A+40,f.save(),f.translate(h,d),f.rotate(-Math.PI/2),f.textAlign="end",f.fillStyle=
"#FFFFFF",f.fillRect(-gb/2-3,-3,gb/2,20),f.fillStyle="#000000",c&&Da&&f.fillText(ia[b],-3,12.8),c||f.fillText(e,-3,12.8),f.restore()):b>=I&&b<I+ba?(d=b-I+Math.floor((Ka-ba)/2),h=Q+A+40+3,d=V+A-la-16-d*(16+ha)+12.8,f.fillStyle="#FFFFFF",f.fillRect(h,d-12.8-2-1,Ta/2,20),f.fillStyle="#000000",c&&Da&&f.fillText(ia[b],h,d),c||f.fillText(e,h,d)):b>=I+ba&&b<I+ba+xa?(d=b-I-ba+Math.floor((Ka-xa)/2),h=Q+A-la-16-d*(16+ha),d=V-40,f.save(),f.translate(h,d),f.rotate(-Math.PI/2),f.fillStyle="#FFFFFF",f.fillRect(4,
-3,gb/2,20),f.fillStyle="#000000",c&&Da&&f.fillText(ia[b],6,12),c||f.fillText(e,6,12),f.restore()):b>=I+ba+xa&&b<T&&(d=b-I-ba-xa+Math.floor((Ka-cb)/2),h=Q-40-3,d=V+la+d*(16+ha)+12.8,f.save(),f.fillStyle="#FFFFFF",f.fillRect(h-Ta/2+1,d-12.8-2-1,Ta/2,20),f.fillStyle="#000000",c&&Da&&f.fillText(ia[b],h-f.measureText(ia[b]).width,d),c||f.fillText(e,h-f.measureText(e).width,d),f.restore())}function Db(b,e,c){function d(t,x){if("red"===$("#"+$(x).attr("id")+" >a").css("color")||"rgb(255, 0, 0)"===$("#"+
$(x).attr("id")+" >a").css("color"))return $("#"+a[q]+" >a").css("color","red"),!1}function f(t,x){if("red"===$("#"+$(x).attr("id")+" >a").css("color")||"rgb(255, 0, 0)"===$("#"+$(x).attr("id")+" >a").css("color"))return $("#"+g[q]+" >a").css("color","red"),!1}var h,k=ia[e-1],a=[],g=[];if(c)for(;""!==k;){if(-1!==k.indexOf("/")){c=k.slicePriorToX("/")+"_Pin"+e;var l=k.slicePriorToX("/")+"_Intermediate"}else c=k+"_Pin"+e,l=k+"_Intermediate";c=c.replaceSpecialCharacters();l=l.replaceSpecialCharacters();
b=b.replaceSpecialCharacters();if(c.restorePinTreeNodeName()!==b.restorePinTreeNodeName()){if("red"!==$("#"+c+" >a").css("color")||"rgb(255, 0, 0)"!==$("#"+c+" >a").css("color"))$("#"+c+" >a").css("color","red"),$("#"+l+" >a").css("color","red"),-1!==c.indexOf("_")&&$("#"+z(c.slicePriorToX("_"))+"_Root >a").css("color","red")}else if("black"!==$("#"+c+" >a").css("color")||"rgb(0, 0, 0)"!==$("#"+c+" >a").css("color"))$("#"+c+" >a").css("color","black"),$("#"+l+" >a").css("color","black"),-1===$.inArray(l,
a)&&a.push(l),-1!==c.indexOf("_")&&(c=z(c.slicePriorToX("_"))+"_Root",0===$("#"+c).find("li").length&&"red"===$("#"+c+" >a").css("color")||"rgb(255, 0, 0)"===$("#"+c+" >a").css("color")||($("#"+c+" >a").css("color","black"),-1===$.inArray(c,g)&&g.push(c)));k=-1!==k.indexOf("/")?k.sliceAfterX("/"):""}else for(;""!==k;){-1!==k.indexOf("/")?(c=k.slicePriorToX("/")+"_Pin"+e,l=k.slicePriorToX("/")+"_Intermediate"):(c=k+"_Pin"+e,l=k+"_Intermediate");c=c.replaceSpecialCharacters();l=l.replaceSpecialCharacters();
if(c.restorePinTreeNodeName()===D[e-1].replaceSpecialCharacters()||""===D[e-1]){if("black"!==$("#"+c+" >a").css("color")||"rgb(0, 0, 0)"!==$("#"+c+" >a").css("color"))if($("#"+c+" >a").css("color","black"),$("#"+l+" >a").css("color","black"),-1===$.inArray(l,a)&&a.push(l),-1!==c.indexOf("_")&&(c=z(c.slicePriorToX("_"))+"_Root","red"===$("#"+c+" >a").css("color")||"rgb(255, 0, 0)"===$("#"+c+" >a").css("color")))if($("#"+c+" >a").css("color","black"),0!==$("#"+c).find("li").length)-1===$.inArray(c,
g)&&g.push(c);else{c=c.restorePinTreeNodeName();var q=0;for(l=Ga[c].length;q<l;q+=1)for(b=0,h=va.length;b<h;b+=1)if(Ga[c][q]===parseInt(va[b].slicePriorToX(":"),10)&&c!==va[b].sliceAfterX(":")){$("#"+c+"_Root >a").css("color","red");break}}}else if("red"!==$("#"+c+" >a").css("color")||"rgb(255, 0, 0)"!==$("#"+c+" >a").css("color"))$("#"+c+" >a").css("color","red"),$("#"+l+" >a").css("color","red"),-1!==c.indexOf("_")&&$("#"+z(c.slicePriorToX("_"))+"_Root >a").css("color","red");k=-1!==k.indexOf("/")?
k.sliceAfterX("/"):""}q=0;for(l=a.length;q<l;q+=1)$("#"+a[q]).find("li").each(d);q=0;for(l=g.length;q<l;q+=1)$("#"+g[q]).find("li").each(f);h=l=b=q=c=l=c=k=null}function Ob(b){function e(r,y){return r-y}var c,d,f,h=$("#moduleTree"),k=$("#searchInput_Pin"),a=b,g=[],l=[],q=[];if(/^\d+$/.test(b)||2>b.length||15<b.length||0===b.toLowerCase().indexOf("pin:")&&4===b.length)h.jstree("close_all"),h.jstree("clear_search"),""!==b&&(ib(),2>b.length?La("\u6700\u5c0f\u8f93\u5165\u5b57\u5143\u4e3a\u4e24\u4e2a\u3002\u8bf7\u66f4\u6362\u81f3\u66f4\u5408\u9002\u7684\u641c\u5bfb\u3002",
"\u6700\u5c0f\u8f38\u5165\u5b57\u5143\u70ba\u5169\u500b\u3002\u8acb\u66f4\u63db\u81f3\u66f4\u5408\u9069\u7684\u641c\u5c0b\u3002","The minimum inputting characters are two. Please change to a proper search."):La("\u9884\u671f\u7684\u641c\u5bfb\u5c06\u82b1\u8d39\u5f88\u591a\u65f6\u95f4\u3002\u8bf7\u66f4\u6362\u81f3\u66f4\u5408\u9002\u7684\u641c\u5bfb\u3002","\u9810\u671f\u7684\u641c\u5c0b\u5c07\u82b1\u8cbb\u5f88\u591a\u6642\u9593\u3002\u8acb\u66f4\u63db\u81f3\u66f4\u5408\u9069\u7684\u641c\u5c0b\u3002",
"The expected search will take much time. Please change to a proper search.")),k.val("");else{try{if(-1!==b.toLowerCase().indexOf("pin:")){b=b.slice(b.toLowerCase().indexOf("pin:")+4);-1!==b.indexOf(")")&&(b=b.slicePriorToX(")"));if(parseInt(b,10)>T)return;var t=ia[parseInt(b,10)-1];q=[];var x=0;for(c=t.length;x<c;x+=1)"/"===t[x]&&q.push(x);if(0===q.length){var u=t;u=z(u);-1!==u.indexOf("_")&&(u=u.slicePriorToX("_"));-1===$.inArray(u,g)&&g.push(u)}else for(x=0,c=q.length+1;x<c;x+=1)u=0===x?t.slice(0,
q[0]):x===c-1?t.slice(q[c-2]+1):t.slice(q[x-1]+1,q[x]),u=z(u),-1!==u.indexOf("_")&&(u=u.slicePriorToX("_")),-1===$.inArray(u,g)&&g.push(u)}else for(x=0;x<T;x+=1)if(t=ia[x],-1!==t.toLowerCase().indexOf(b.toLowerCase())){l=[];var p=0;for(d=t.length;p<d;p+=1)0===t.slice(p).toLowerCase().indexOf(b.toLowerCase())&&l.push(p);q=[];p=0;for(d=t.length;p<d;p+=1)"/"===t[p]&&q.push(p);p=0;for(d=l.length;p<d;p+=1)if(0===q.length)u=t;else{q.push(l[p]);q.sort(e);var v=0;for(f=q.length;v<f;v+=1)if(q[v]===l[p]){var n=
v;break}u=0===n?t.slice(0,q[1]):n===q.length-1?t.slice(q[q.length-2]+1):t.slice(q[n-1]+1,q[n+1]);q.splice(n,1);u=z(u);-1!==u.indexOf("_")&&(u=u.slicePriorToX("_"));-1===$.inArray(u,g)&&g.push(u)}}x=0;for(c=g.length;x<c;x+=1)h.jstree("open_node",$("#"+g[x]+"_Root"));h.jstree("close_all");h.jstree("search",a)}catch(r){}u=k=h=a=d=p=c=x=null;g=[];n=t=null;l=[];q=[]}}function Qb(){$("#ChipType").hide();$("#MCU").hide();$("#panel").css("overflow","hidden");$("#ChipType").css("border","white");$("#MCU").css("border",
"white")}function qb(){var b=$("#panel").height(),e=$("#NUC_PinConfiguration_Canvas").height();Fb?b<e?(M=10*Math.floor(b/e*100/10)-5,0<wb&&M<wb&&(M=wb),bc=M,kb()):bc=100:(M=wb=100,kb())}function wc(){$(document).mousedown(function(b){b=b||window.event;b=(b.target||b.srcElement).id;if("panel"===b||"NUC_PinConfiguration_Canvas"===b||"NUC_PinConfiguration_Canvas_Lining"===b)return!1;"ChipTypeSelect"===b&&Hb(function(){$("#ChipTypeSelect").focus()});"MCUselect"===b&&Hb(function(){$("#MCUselect").focus()});
"searchInput_Pin"===b&&$("#searchInput_Pin").val("");b=0;return this})}function La(b,e,c){ib();"Simplified Chinese"===pa?window.alert(b):"Traditional Chinese"===pa?window.alert(e):window.alert(c)}function xc(){var b=!0;Qc(NUTOOL_PIN.g_readConfigFilePath)||(b=!1);NUTOOL_PIN.decidepackageNumber();cc();return b}function cc(){T=parseInt(NUTOOL_PIN.g_packageNumber.slice(NUTOOL_PIN.g_packageNumber.indexOf(NUTOOL_PIN.g_packageNumber.match(/\d/))),10);33===T&&(T=32);-1!==NUTOOL_PIN.g_packageNumberIndex.toLowerCase().indexOf("pin:")?
(I=parseInt(NUTOOL_PIN.g_packageNumberIndex.sliceBetweenXandX("D","R"),10),ba=parseInt(NUTOOL_PIN.g_packageNumberIndex.sliceBetweenXandX("R","U"),10),xa=parseInt(NUTOOL_PIN.g_packageNumberIndex.sliceBetweenXandX("U","L"),10),cb=parseInt(NUTOOL_PIN.g_packageNumberIndex.sliceBetweenXandX("L",")"),10)):(I=T/4,ba=T/4,xa=T/4,cb=T/4);Ka=Math.max(I,ba,xa,cb);return this}function yc(){var b=!1;!1===jQuery.support.leadingWhitespace?(Ea=!0,wb=25,Mb=.5,Rb="\f",$("#panel").scroll(function(){$(this).css("border",
"3px solid white")}),sa.getContext=function(c){G_vmlCanvasManager.initElement(c);return c.getContext("2d")},sa.removeContext=function(c){"undefined"!==typeof c[0]&&(G_vmlCanvasManager.uninitElement(c[0]),c.remove())},sa.addEvent=function(c,d,f){c.attachEvent("on"+d,f)}):(Ea=!1,wb=30,ha=2,Mb=.95,Rb="\f",sa.getContext=function(c){return c.getContext("2d")},sa.removeContext=function(c){c.remove()},sa.addEvent=function(c,d,f){c.addEventListener(d,f,!1)});if($("html").hasClass("ie7")||$("html").hasClass("ie6")){b=
!0;var e=$('<div id="belowIE8Dialog"><p>Please upgrade your IE to IE8 or higher version.<br />Otherwise, this tool will not run properly!</p><input type="text" size="1" style="position:relative;top:-5000px;"/></div>');e.dialog({modal:!0,title:"Please update your IE!",width:500,height:"auto",show:"fade",hide:"fade",buttons:[{text:"Cancel",click:function(){$(this).dialog("close")}}]})}return b}function ib(){var b=$.ajax({url:"NuToolSetup.txt",async:!1}).responseText;"undefined"!==typeof b&&-1!==b.indexOf("UIlanguage:")?
(pa=b.sliceAfterX("UIlanguage:"),pa=pa.slicePriorToX("\r")):pa="English"}function zc(){var b=$.ajax({url:"NuToolSetup.txt",async:!1}).responseText;"undefined"!==typeof b&&-1!==b.indexOf("DisplayTooltip:")?(xb=b.sliceAfterX("DisplayTooltip:"),xb=xb.slicePriorToX("\r"),Bb="No"===xb?!1:!0):(xb="Yes",Bb=!0)}function Ac(){var b=document.body,e=document.getElementById("panel");mouseWheel=function(c){c=c?c:window.event;if(c.ctrlKey)return c.preventDefault?c.preventDefault():c.returnValue=!1,!1};$("#panel").mousewheel(function(c){!0===
window.external.getCtrlState()&&(0<c.deltaY?Bc():0>c.deltaY&&Cc());!0===window.external.getShiftState()&&(0<c.deltaY?e.scrollLeft-=50:0>c.deltaY&&(e.scrollLeft+=50))});b.addEventListener?(b.addEventListener("DOMMouseScroll",mouseWheel,!1),b.addEventListener("mousewheel",mouseWheel,!1)):b.onmousewheel=mouseWheel}function ta(b){var e;if(e="undefined"!==typeof b&&"P"===b.slice(0,1)&&"."===b.slice(2,3))b=b.sliceAfterX("."),e=!isNaN(parseFloat(b))&&isFinite(b);return e?!0:!1}function dc(){var b,e,c=0,
d=0,f=0,h=0;0===$("#NUC_PinConfiguration_Canvas").length&&$("#panel")[0].appendChild(Ua("canvas","NUC_PinConfiguration_Canvas"));var k=$("#NUC_PinConfiguration_Canvas")[0];var a=sa.getContext(k);a.font="12px Arial";ha=Ea?0:2;la=20;if(-1!==F.indexOf("SOP")){k=0;for(e=T/2;k<e;k+=1){var g="";var l=NUTOOL_PIN.g_cfg_pkgs[NUTOOL_PIN.g_packageNumberIndex][k];var q=l+":0";var t=0;for(b=NUTOOL_PIN.g_cfg_gpios.length;t<b;t+=1)if(q===NUTOOL_PIN.g_cfg_gpios[t].f[0]){for(b=NUTOOL_PIN.g_cfg_gpios[t].f.length-1;0<=
b;--b)g+=NUTOOL_PIN.g_cfg_gpios[t].f[b].slicePriorToX(":"),0!==b&&(g+="/");break}""===g&&(g=l);ia[k]=g;var x="";l=NUTOOL_PIN.g_cfg_pkgs[NUTOOL_PIN.g_packageNumberIndex][k+T/2];q=l+":0";t=0;for(b=NUTOOL_PIN.g_cfg_gpios.length;t<b;t+=1)if(q===NUTOOL_PIN.g_cfg_gpios[t].f[0]){b=0;for(q=NUTOOL_PIN.g_cfg_gpios[t].f.length;b<q;b+=1)x+=NUTOOL_PIN.g_cfg_gpios[t].f[b].slicePriorToX(":"),b!==NUTOOL_PIN.g_cfg_gpios[t].f.length-1&&(x+="/");break}""===x&&(x=l);ia[k+T/2]=x;Da&&(a.measureText(g).width>c&&(c=a.measureText(g).width),
a.measureText(x).width>f&&(f=a.measureText(x).width))}A=T/2*(16+ha)-ha+2*la;Da?(130>c&&(c=130),130>h&&(h=130),Q=c+40+A/4,V=h+40+A/4):V=Q=195}else if(-1!==F.indexOf("WLCSP")||-1!==F.indexOf("BGA")){ha=14;la=24;ec=Ja=Math.sqrt(T);k=0;for(e=T;k<e;k+=1){g="";l=NUTOOL_PIN.g_cfg_pkgs[NUTOOL_PIN.g_packageNumberIndex][k];q=l+":0";t=0;for(b=NUTOOL_PIN.g_cfg_gpios.length;t<b;t+=1)if(q===NUTOOL_PIN.g_cfg_gpios[t].f[0]){for(b=NUTOOL_PIN.g_cfg_gpios[t].f.length-1;0<=b;--b)g+=NUTOOL_PIN.g_cfg_gpios[t].f[b].slicePriorToX(":"),
0!==b&&(g+="/");break}""===g&&(g=l);ia[k]=g}A=Math.sqrt(T)*(60+ha)-ha+2*la;V=Q=195}else{k=0;for(e=I;k<e;k+=1){g="";l=NUTOOL_PIN.g_cfg_pkgs[NUTOOL_PIN.g_packageNumberIndex][k];q=l+":0";t=0;for(b=NUTOOL_PIN.g_cfg_gpios.length;t<b;t+=1)if(q===NUTOOL_PIN.g_cfg_gpios[t].f[0]){for(b=NUTOOL_PIN.g_cfg_gpios[t].f.length-1;0<=b;--b)g+=NUTOOL_PIN.g_cfg_gpios[t].f[b].slicePriorToX(":"),0!==b&&(g+="/");break}""===g&&(g=l);ia[k]=g;Da&&a.measureText(g).width>d&&(d=a.measureText(g).width)}k=0;for(e=ba;k<e;k+=1){x=
"";l=NUTOOL_PIN.g_cfg_pkgs[NUTOOL_PIN.g_packageNumberIndex][k+I];q=l+":0";t=0;for(b=NUTOOL_PIN.g_cfg_gpios.length;t<b;t+=1)if(q===NUTOOL_PIN.g_cfg_gpios[t].f[0]){b=0;for(q=NUTOOL_PIN.g_cfg_gpios[t].f.length;b<q;b+=1)x+=NUTOOL_PIN.g_cfg_gpios[t].f[b].slicePriorToX(":"),b!==NUTOOL_PIN.g_cfg_gpios[t].f.length-1&&(x+="/");break}""===x&&(x=l);ia[k+I]=x;Da&&a.measureText(x).width>f&&(f=a.measureText(x).width)}k=0;for(e=xa;k<e;k+=1){g="";l=NUTOOL_PIN.g_cfg_pkgs[NUTOOL_PIN.g_packageNumberIndex][k+I+ba];q=
l+":0";t=0;for(b=NUTOOL_PIN.g_cfg_gpios.length;t<b;t+=1)if(q===NUTOOL_PIN.g_cfg_gpios[t].f[0]){b=0;for(q=NUTOOL_PIN.g_cfg_gpios[t].f.length;b<q;b+=1)g+=NUTOOL_PIN.g_cfg_gpios[t].f[b].slicePriorToX(":"),b!==NUTOOL_PIN.g_cfg_gpios[t].f.length-1&&(g+="/");break}""===g&&(g=l);ia[k+I+ba]=g;Da&&a.measureText(g).width>h&&(h=a.measureText(g).width)}k=0;for(e=cb;k<e;k+=1){g="";l=NUTOOL_PIN.g_cfg_pkgs[NUTOOL_PIN.g_packageNumberIndex][k+I+ba+xa];q=l+":0";t=0;for(b=NUTOOL_PIN.g_cfg_gpios.length;t<b;t+=1)if(q===
NUTOOL_PIN.g_cfg_gpios[t].f[0]){for(b=NUTOOL_PIN.g_cfg_gpios[t].f.length-1;0<=b;--b)g+=NUTOOL_PIN.g_cfg_gpios[t].f[b].slicePriorToX(":"),0!==b&&(g+="/");break}""===g&&(g=l);ia[k+I+ba+xa]=g;Da&&a.measureText(g).width>c&&(c=a.measureText(g).width)}A=Ka*(16+ha)-ha+2*la;Da?(130>c&&(c=130),130>h&&(h=130),Q=c+40+A/4,V=h+40+A/4):V=Q=195}Da?(Ta=Q+A+f+40+A/4,gb=V+A+d+40+A/4):(Ta=Q+A+40+25+130,gb=V+A+40+25+130);Fb?(c=$.ajax({url:"NuToolSetup.txt",async:!1}).responseText,"undefined"!==typeof c&&-1!==c.indexOf("DialogSize:")?
(c=c.sliceAfterX("DialogSize:X_"),Sa=parseInt(c.slicePriorToX("Y_"),10),Na=parseInt(c.slice(c.indexOf("Y_")+2,c.indexOf("\r")),10),792>Sa&&(Sa=792),590>Na&&(Na=590)):(Sa=792,Na=590)):(Sa=screen.availWidth,Na=screen.availHeight);Ha=Na-10}function fc(){var b;var e=0;for(b=NUTOOL_PIN.g_cfg_pkgs[NUTOOL_PIN.g_packageNumberIndex].length;e<b;e+=1)Oa[e]=NUTOOL_PIN.g_cfg_pkgs[NUTOOL_PIN.g_packageNumberIndex][e],D[e]=""}function uc(){"NUC400"===m&&"undefined"!==typeof K.GPG_MFPH?db("GPG_MFPH:0x00001100"):"M451HD"!==
m&&"M451LD"!==m&&"M4521"!==m||"undefined"===typeof K.GPF_MFPL?0!==m.indexOf("M47")&&"M480MD"!==m&&"M480LD"!==m&&"AX58200"!==m&&"M251"!==m&&"M261"!==m&&"NDA102SD2"!==m&&"M2351"!==m&&0!==m.indexOf("M030")&&0!==m.indexOf("M031")||"undefined"===typeof K.GPF_MFPL?"NUC121AE"===m&&"undefined"!==typeof K.GPF_MFPL?db("GPF_MFPL:0x00110011"):"NANO100AN"!==m&&"NANO100BN"!==m||"undefined"===typeof K.PF_L_MFP?"NANO112"===m&&"undefined"!==typeof K.PF_L_MFP?db("PF_L_MFP:0x00FFFFFF"):"NUC123AE"===m&&"undefined"!==
typeof K.GPF_MFPL?db("GPF_MFPL:0x00001100"):"NANO103"===m&&"undefined"!==typeof K.GPF_MFPL?db("GPF_MFPL:0x77777777"):"M051AN"!==m&&"M051BN"!==m&&"M051DN_DE"!==m&&"M058S"!==m&&"MINI51AN"!==m&&"MINI51DE"!==m&&"MINI55"!==m&&"MINI58"!==m&&"NUC029AE"!==m&&"NUC029TAE"!==m&&"NUC029AN"!==m&&"NM1200"!==m||"undefined"===typeof K.P4_MFP?$("#moduleTree").jstree("check_node",$("#ICE_Root")):db("P4_MFP:0x000000C0"):db("PF_L_MFP:0x00007777"):db("GPF_MFPL:0x000000EE"):db("GPF_MFPL:0x01100000")}function Sb(b){-1===
b.indexOf("(")&&(b+="(");0===b.indexOf("NDA102SD2")?b="NDA102SD2":0===b.indexOf("NDA102")?b="NDA102":0===b.indexOf("M05641")?b="M05641":0===b.indexOf("M0564")?b="M0564":0===b.indexOf("M4521")?b="M4521":0===b.indexOf("M45")||0===b.indexOf("M4TK")?(b=b.slicePriorToX("("),b=b.slice(b.length-4,b.length-3),b="D"===b||"C"===b?"M451LD":"M451HD"):b=0===b.indexOf("M460LD")?"M460LD":0===b.indexOf("M471")?"M471":0===b.indexOf("M479")?"M479":0===b.indexOf("M48")?-1!==b.indexOf("8AE")||-1!==b.indexOf("CAE")?"M480LD":
0===b.indexOf("M480HD")?"M480HD":"M480MD":0===b.indexOf("KM1M7AF")?"KM1M7AF":0===b.indexOf("M253")?"M253":0===b.indexOf("M251")||0===b.indexOf("M252")?"M251":0===b.indexOf("M256MD2AE")||0===b.indexOf("M254SD2AE")||0===b.indexOf("M256SD2AE")?"M256D":0===b.indexOf("M258SG6AE")||0===b.indexOf("M256QG6AE")||0===b.indexOf("M254KG6AE")||0===b.indexOf("M258KG6AE")?"M258G":0===b.indexOf("M254")||0===b.indexOf("M256")||0===b.indexOf("M258")?"M258":0===b.indexOf("M26")?"M261":0===b.indexOf("M2354")?"M2354":
0===b.indexOf("M2351")?"M2351":0===b.indexOf("M0A2")?"M0A21":0===b.indexOf("M030G")?"M030G":0===b.indexOf("M031GG")||0===b.indexOf("M031GT")?"M030G_31G":0===b.indexOf("M030FD2AE")||0===b.indexOf("M030TD2AE")||0===b.indexOf("M030LD2AE")||0===b.indexOf("M032FC1AE")||0===b.indexOf("M032EC1AE")||0===b.indexOf("M032TC1AE")||0===b.indexOf("M032TD2AE")||0===b.indexOf("M032LC2AE")||0===b.indexOf("M032LD2AE")?"M031KM":0===b.indexOf("M031BT")?"M031BT":0===b.indexOf("M032BTAG8AN")||(0===b.indexOf("M031")||0===
b.indexOf("M032"))&&"G"===b.charAt(5)?"M031G":0===b.indexOf("M032BTAIAAN")||(0===b.indexOf("M031")||0===b.indexOf("M032"))&&"I"===b.charAt(5)?"M031I":0===b.indexOf("M031")||0===b.indexOf("M032")?"M031":0===b.indexOf("M0518")?"M0518":0===b.indexOf("M071M")?"M071M":0===b.indexOf("M071Q")||0===b.indexOf("M071V")?"M071QV":0===b.indexOf("M071R1")||0===b.indexOf("M071S")?"M071R1S":0===b.indexOf("ML56")||0===b.indexOf("ML54")?"ML56":0===b.indexOf("ML51")?"D"===b.charAt(5)?"ML5156":"ML51":0!==b.indexOf("MS51")||
-1===b.indexOf("C0AE(")&&-1===b.indexOf("C0BE(")&&-1===b.indexOf("B0AE(")?0!==b.indexOf("MS51")||-1===b.indexOf("B9AE(")&&-1===b.indexOf("B9BE(")?0===b.indexOf("MS51IA9AE")?"MS51_8KDB":0===b.indexOf("MS51")&&-1!==b.indexOf("A9AE(")?"MS51_8K":0===b.indexOf("M0519")?"M0519":0===b.indexOf("M0515LDE")?"M0515LDE":0!==b.indexOf("M05")||-1===b.indexOf("DN(")&&-1===b.indexOf("DE(")?0===b.indexOf("MHC54ZDN")||0===b.indexOf("PL054TDN")?"M051DN_DE":0===b.indexOf("M05")&&-1!==b.indexOf("BN(")?"M051BN":0===b.indexOf("E32")?
"M051BN":0===b.indexOf("M058S")?"M058S":0===b.indexOf("M05")&&-1!==b.indexOf("AN(")?"M051AN":0===b.indexOf("MINI57")?"MINI57":0===b.indexOf("MINI58")?"MINI58":0===b.indexOf("MINI5")&&-1!==b.indexOf("AN(")?"MINI51AN":0===b.indexOf("MINI5")&&-1!==b.indexOf("AE(")||0===b.indexOf("MINI54XFHC")||0===b.indexOf("MINI55")||0===b.indexOf("NVS06AL")?"MINI55":0===b.indexOf("MINI5")&&-1!==b.indexOf("DE(")||0===b.indexOf("MINI54FHC")?"MINI51DE":0===b.indexOf("NUC2201")?"NUC2201":0===b.indexOf("NUC2")&&-1!==b.indexOf("AN(")?
"NUC200AN":0===b.indexOf("NUC2")&&-1!==b.indexOf("AE(")?"NUC200AE":0===b.indexOf("NUC029MDE")?"NUC029MDE":0===b.indexOf("NUC029KGE")?"NUC029KGE":0===b.indexOf("NUC029LDE")||0===b.indexOf("NUC029SDE")?"NUC029xDE":0===b.indexOf("NUC029LGE")||0===b.indexOf("NUC029SGE")?"NUC029xGE":0===b.indexOf("NUC029LEE")||0===b.indexOf("NUC029SEE")?"NUC029xEE":0===b.indexOf("NUC029TAE")?"NUC029TAE":0===b.indexOf("NUC029")&&-1!==b.indexOf("AE(")?"NUC029AE":0===b.indexOf("NUC029")&&-1!==b.indexOf("AN(")?"NUC029AN":
0!==b.indexOf("NANO120")&&0!==b.indexOf("NANO100")||-1===b.indexOf("AN(")?0!==b.indexOf("NANO100")&&0!==b.indexOf("NANO110")&&0!==b.indexOf("NANO120")&&0!==b.indexOf("NANO130")||-1===b.indexOf("BN(")?0===b.indexOf("NANO103")&&-1!==b.indexOf("AE(")?"NANO103":0===b.indexOf("NANO1")&&-1!==b.indexOf("AN(")?"NANO112":0===b.indexOf("NM112")?"NM1120":0===b.indexOf("NM11")||0===b.indexOf("NM12")?"NM1200":0===b.indexOf("NM15")?"NM1500":0===b.indexOf("NUC121")||0===b.indexOf("NUC125")?"NUC121AE":0===b.indexOf("NUC122")&&
-1!==b.indexOf("AN(")?"NUC122AN":0!==b.indexOf("NUC123")||-1===b.indexOf("AN0(")&&-1===b.indexOf("AN1(")?0!==b.indexOf("NUC123")||-1===b.indexOf("AE0(")&&-1===b.indexOf("AE1(")?0!==b.indexOf("NUC1")||-1===b.indexOf("AN(")&&-1===b.indexOf("BN(")?0===b.indexOf("NUC1")&&-1!==b.indexOf("CN(")?"NUC100CN":0===b.indexOf("NUC1")&&-1!==b.indexOf("DN(")?"NUC100DN":0===b.indexOf("NUC1311")?"NUC1311":0===b.indexOf("NUC13")?"NUC131":0===b.indexOf("NUC1261")?"NUC1261":0===b.indexOf("NUC1262")?"NUC1262":0===b.indexOf("NUC126")?
"NUC126":0===b.indexOf("NUC505")?"NUC505":0===b.indexOf("I91")?"ISD9100":0===b.indexOf("I93")?"ISD9300":0===b.indexOf("AX58200")?"AX58200":0===b.indexOf("MA35D1")?"MA35D1":"NUC400":"NUC100AN_BN":"NUC123AE":"NUC123AN":"NANO100BN":"NANO100AN":"M051DN_DE":"MS51_16K":"MS51_32K";return b}function Qc(b){var e,c=!1,d="",f="",h=!1,k=[],a=[];var g=0;for(e=yb.length;g<e;g+=1)-1!==Rc.indexOf(yb[g])&&yb.splice(g,1);fa="";var l=b=$.ajax({url:""===b?"Nu_config.cfg ":"file:///"+b,async:!1}).responseText;if(!b||
/^\s*$/.test(b))return fa=b,"undefined"===typeof NUTOOL_PER?"undefined"===typeof NUTOOL_PIN.g_chipType_default||""===NUTOOL_PIN.g_chipType_default||"undefined"===typeof NUTOOL_PIN.g_partNumber_package_default||""===NUTOOL_PIN.g_partNumber_package_default?("undefined"!==typeof m&&"NUC400"!==m&&(d="NUC_"+m+"_Content.js",eb(d,"NUC_NUC400_Content.js","js")),F="NUC472VI8AE(LQFP100)",m="NUC400"):("undefined"===typeof m?(f="NUC_"+NUTOOL_PIN.g_chipType_default+"_Content.js",eb("NUC_NUC400_Content.js",f,"js")):
"undefined"!==typeof m&&m!==NUTOOL_PIN.g_chipType_default&&(d="NUC_"+m+"_Content.js",f="NUC_"+NUTOOL_PIN.g_chipType_default+"_Content.js",eb(d,f,"js")),F=NUTOOL_PIN.g_partNumber_package_default,m=NUTOOL_PIN.g_chipType_default):("undefined"!==typeof m&&"M251"!==m&&(d="NUC_"+m+"_Content.js",eb(d,"NUC_M251_Content.js","js")),F="M251EB2AE(TSSOP28)",m="M251"),c;for(;-1!==b.indexOf("\r")&&b.indexOf("\r")<b.indexOf("MCU:");)b=b.sliceAfterX("\r");var q=b.sliceBetweenXandX("MCU:","\r");q=q.trim();var t=Sb(q);
if(-1===$.inArray(Tb(t),yb))return La("\u4ece\u914d\u7f6e\u6863\u8bfb\u51fa\u7684\u82af\u7247\u578b\u53f7 "+t+" \u4e0d\u6b63\u786e\u3002","\u5f9e\u914d\u7f6e\u6a94\u8b80\u51fa\u7684\u6676\u7247\u578b\u865f "+t+" \u4e0d\u6b63\u78ba\u3002","The chip type of "+t+" read from the config file is incorrect."),null;"undefined"!==typeof m?(d="NUC_"+m+"_Content.js",f="NUC_"+t+"_Content.js",eb(d,f,"js")):"undefined"===typeof m&&(d="undefined"===typeof NUTOOL_PER?"undefined"===typeof NUTOOL_PIN.g_chipType_default||
""===NUTOOL_PIN.g_chipType_default?"NUC_NUC400_Content.js":"NUC_"+NUTOOL_PIN.g_chipType_default+"_Content.js":"NUC_M251_Content.js",f="NUC_"+t+"_Content.js",eb(d,f,"js"));g=0;for(e=NUTOOL_PIN.g_cfg_chips.length;g<e;g+=1)if(NUTOOL_PIN.g_cfg_chips[g].name+"("+NUTOOL_PIN.g_cfg_chips[g].pkg+")"===q){c=!0;break}if(c){if("undefined"!==typeof F)var x=F;else"undefined"===typeof NUTOOL_PER?"undefined"===typeof NUTOOL_PIN.g_chipType_default||""===NUTOOL_PIN.g_chipType_default||"undefined"===typeof NUTOOL_PIN.g_partNumber_package_default||
""===NUTOOL_PIN.g_partNumber_package_default?(x="NUC472VI8AE(LQFP100)",m="NUC400"):(x=NUTOOL_PIN.g_partNumber_package_default,m=NUTOOL_PIN.g_chipType_default):(x="M251EB2AE(TSSOP28)",m="M251");F=q;NUTOOL_PIN.decidepackageNumber();g=0;for(e=NUTOOL_PIN.g_cfg_pkgs[NUTOOL_PIN.g_packageNumberIndex].length;g<e;g+=1){var u=NUTOOL_PIN.g_cfg_pkgs[NUTOOL_PIN.g_packageNumberIndex][g];ta(u)&&k.push(u)}if("M451HD"===t||"M451LD"===t||"M4521"===t||"NUC121AE"===t||"M0564"===t||"M05641"===t||0===t.indexOf("NUC126")||
"M071QV"===t||"NUC029xGE"===t||"NUC029KGE"===t||"NUC400"===t||0===t.indexOf("M47")||"M480MD"===t||"M480LD"===t||"AX58200"===t||0===t.indexOf("M25")||"NDA102SD2"===t||"M261"===t||0===t.indexOf("M235")||0===t.indexOf("M030")||0===t.indexOf("M031")||"NANO103"===t||"NUC505"===t||"NUC123AE"===t||"MA35D1"===t)for(g=0,e=k.length;g<e;g+=1)u=8>parseInt(k[g].sliceAfterX("."),10)?"G"+k[g].slicePriorToX(".")+"_MFPL":"G"+k[g].slicePriorToX(".")+"_MFPH",-1===$.inArray(u,a)&&a.push(u);else if("M0A21"===t||"M480HD"===
t||0===t.indexOf("M46"))for(g=0,e=k.length;g<e;g+=1)u="G"+k[g].slicePriorToX(".")+"_MFP"+Math.floor(parseInt(k[g].sliceAfterX("."),10)/4),-1===$.inArray(u,a)&&a.push(u);else if("NANO100AN"===t||"NANO100BN"===t||"NANO112"===t)for(g=0,e=k.length;g<e;g+=1)u=8>parseInt(k[g].sliceAfterX("."),10)?k[g].slicePriorToX(".")+"_L_MFP":k[g].slicePriorToX(".")+"_H_MFP",-1===$.inArray(u,a)&&a.push(u);else if("NM1500"===t||"M0519"===t||"M051DN_DE"===t||"M051BN"===t||"M051AN"===t||"M058S"===t||"MINI51AN"===t||"MINI51DE"===
t||"MINI55"===t||"MINI58"===t||"NUC029AE"===t||"NUC029TAE"===t||"NUC029AN"===t||"NM1200"===t)for(g=0,e=k.length;g<e;g+=1)u=k[g].slicePriorToX(".")+"_MFP",-1===$.inArray(u,a)&&a.push(u);else if(0===t.indexOf("ML5")||0===t.indexOf("MS51"))for(g=0,e=k.length;g<e;g+=1)u=k[g].slicePriorToX(".")+"MF76543210",-1===$.inArray(u,a)&&a.push(u);else if(0===t.indexOf("KM1M7"))for(g=0,e=k.length;g<e;g+=1)u="IO"+k[g].slicePriorToX(".")+"MD",-1===$.inArray(u,a)&&a.push(u);else for(g=0,e=k.length;g<e;g+=1)u="G"+k[g].slicePriorToX(".")+
"_MFP",-1===$.inArray(u,a)&&a.push(u);k="ALT_MFP ALT_MFP1 ALT_MFP2 ALT_MFP3 ALT_MFP4 ALT_MFP5 ALT_MFP6 ALT_MFP7 ALT_MFP8 ALT_MFP9".split(" ");g=0;for(e=k.length;g<e;g+=1)u=k[g],"undefined"!==typeof NUTOOL_PIN.g_cfg_regDescriptions[u]&&-1===$.inArray(u,a)&&a.push(u);if("MINI55"===t||"NM1200"===t)a.push("ADCHER"),a.push("ADCR"),a.push("PIN_SEL");g=0;for(e=a.length;g<e;g+=1)if(-1===b.indexOf(a[g])){u=a[g];h=!0;F=x;break}}if(c)if(h)La("\u5728\u914d\u7f6e\u6863\u91cc\u627e\u4e0d\u5230\u5fc5\u9700\u7684MFP\u6682\u5b58\u5668 "+
u+"\u3002","\u5728\u914d\u7f6e\u6a94\u88e1\u627e\u4e0d\u5230\u5fc5\u9700\u7684MFP\u66ab\u5b58\u5668 "+u+"\u3002","The prerequisite MFP register of "+u+" is missing in the config file."),""!==f&&""!==d&&eb(f,d,"js"),c=!1;else{if(fa=l,F=q,m=t,$("#ChipTypeSelect").val(Tb(m)),g=d=fa,e="SYS->",""!==d&&"undefined"!==typeof d){0!==NUTOOL_PIN.g_cfg_gpiosDefines.length&&1<NUTOOL_PIN.g_cfg_gpiosDefines[0].f.length&&0===NUTOOL_PIN.g_cfg_gpiosDefines[0].f[1].indexOf("GPIO:GPIO_")&&(e="GPIO_MD->");for(ya=[];-1!==
d.indexOf("GPIOpin:");)d=d.slice(d.indexOf("GPIOpin:")),f=d.slice(d.indexOf("GPIOpin:")+8,d.indexOf("\r")),h=NUTOOL_PIN.g_cfg_pkgs[NUTOOL_PIN.g_packageNumberIndex][parseInt(f,10)],ta(h)&&("undefined"===typeof ya?ya[0]=parseInt(f,10):ya.push(parseInt(f,10))),d=d.slice(1);for(d=g;-1!==d.indexOf(e);)d=d.sliceAfterX(e),f=d.slice(d.indexOf(" = ")+3,d.indexOf("\r")),isNaN(parseInt(f.slice(2),16))?La("\u6682\u5b58\u5668\u7684\u503c"+d.slicePriorToX("\r")+"\u5b58\u5728\u4e00\u4e9b\u9519\u8bef\uff0c\u8bf7\u66f4\u6b63\u5b83\u5e76\u91cd\u8f7d\u914d\u7f6e\u6863\u3002",
"\u66ab\u5b58\u5668\u7684\u503c"+d.slicePriorToX("\r")+"\u5b58\u5728\u4e00\u4e9b\u932f\u8aa4\uff0c\u8acb\u66f4\u6b63\u5b83\u4e26\u91cd\u8f09\u914d\u7f6e\u6a94\u3002","The register value of "+d.slicePriorToX("\r")+" in the config file is incorrect.Please correct it and re-load the config file again."):za[d.slicePriorToX(" = ")]=parseInt(f.slice(2),16),d=d.slice(1);for(d=g;-1!==d.indexOf("ALT_MFP");)d=d.slice(d.indexOf("ALT_MFP")),f=d.slice(d.indexOf(" = ")+3,d.indexOf("\r")),isNaN(parseInt(f.slice(2),
16))?La("\u6682\u5b58\u5668\u7684\u503c"+d.slicePriorToX("\r")+"\u5b58\u5728\u4e00\u4e9b\u9519\u8bef\uff0c\u8bf7\u66f4\u6b63\u5b83\u5e76\u91cd\u8f7d\u914d\u7f6e\u6863\u3002","\u66ab\u5b58\u5668\u7684\u503c"+d.slicePriorToX("\r")+"\u5b58\u5728\u4e00\u4e9b\u932f\u8aa4\uff0c\u8acb\u66f4\u6b63\u5b83\u4e26\u91cd\u8f09\u914d\u7f6e\u6a94\u3002","The register value of "+d.slicePriorToX("\r")+" in the config file is incorrect.Please correct it and re-load the config file again."):za[d.slicePriorToX(" = ")]=
parseInt(f.slice(2),16),d=d.slice(1)}}else La("\u4ece\u914d\u7f6e\u6863\u8bfb\u51fa\u7684\u5c01\u88c5\u540d\u79f0 "+q+" \u4e0d\u6b63\u786e","\u5f9e\u914d\u7f6e\u6a94\u8b80\u51fa\u7684\u5c01\u88dd\u540d\u7a31 "+q+" \u4e0d\u6b63\u78ba\u3002","The package name "+q+" read from the config file is incorrect."),""!==f&&""!==d&&eb(f,d,"js"),F="undefined"===typeof NUTOOL_PER?"undefined"===typeof NUTOOL_PIN.g_partNumber_package_default||""===NUTOOL_PIN.g_partNumber_package_default?"NUC472VI8AE(LQFP100)":NUTOOL_PIN.g_partNumber_package_default:
"M251EB2AE(TSSOP28)";bMismatchedRedundant=null;return c}function gc(){var b=[],e=[],c;var d=0;for(c=NUTOOL_PIN.g_cfg_pkgs[NUTOOL_PIN.g_packageNumberIndex].length;d<c;d+=1){var f=NUTOOL_PIN.g_cfg_pkgs[NUTOOL_PIN.g_packageNumberIndex][d];ta(f)&&b.push(f)}if("M451HD"===m||"M451LD"===m||"M4521"===m||"NUC121AE"===m||"M0564"===m||"M05641"===m||0===m.indexOf("NUC126")||"M071QV"===m||"NUC029xGE"===m||"NUC029KGE"===m||"NUC400"===m||0===m.indexOf("M47")||"M480MD"===m||"M480LD"===m||"AX58200"===m||0===m.indexOf("M25")||
"NDA102SD2"===m||"M261"===m||0===m.indexOf("M235")||0===m.indexOf("M030")||0===m.indexOf("M031")||"NANO103"===m||"NUC505"===m||"NUC123AE"===m||"MA35D1"===m)for(d=0,c=b.length;d<c;d+=1)f=8>parseInt(b[d].sliceAfterX("."),10)?"G"+b[d].slicePriorToX(".")+"_MFPL":"G"+b[d].slicePriorToX(".")+"_MFPH",-1===$.inArray(f,e)&&e.push(f);else if("M0A21"===m||"M480HD"===m||0===m.indexOf("M46"))for(d=0,c=b.length;d<c;d+=1)f="G"+b[d].slicePriorToX(".")+"_MFP"+Math.floor(parseInt(b[d].sliceAfterX("."),10)/4),-1===
$.inArray(f,e)&&e.push(f);else if("NANO100AN"===m||"NANO100BN"===m||"NANO112"===m)for(d=0,c=b.length;d<c;d+=1)f=8>parseInt(b[d].sliceAfterX("."),10)?b[d].slicePriorToX(".")+"_L_MFP":b[d].slicePriorToX(".")+"_H_MFP",-1===$.inArray(f,e)&&e.push(f);else if("NM1500"===m||"M0519"===m||"M051DN_DE"===m||"M051BN"===m||"M051AN"===m||"M058S"===m||"MINI51AN"===m||"MINI51DE"===m||"MINI55"===m||"MINI58"===m||"NUC029AE"===m||"NUC029TAE"===m||"NUC029AN"===m||"NM1200"===m)for(d=0,c=b.length;d<c;d+=1)f=b[d].slicePriorToX(".")+
"_MFP",-1===$.inArray(f,e)&&e.push(f);else if(0===m.indexOf("ML5")||0===m.indexOf("MS51"))for(d=0,c=b.length;d<c;d+=1)f=b[d].slicePriorToX(".")+"MF76543210",-1===$.inArray(f,e)&&e.push(f);else if(0===m.indexOf("KM1M7"))for(d=0,c=b.length;d<c;d+=1)f="IO"+b[d].slicePriorToX(".")+"MD",-1===$.inArray(f,e)&&e.push(f);else for(d=0,c=b.length;d<c;d+=1)f="G"+b[d].slicePriorToX(".")+"_MFP",-1===$.inArray(f,e)&&e.push(f);b="ALT_MFP ALT_MFP1 ALT_MFP2 ALT_MFP3 ALT_MFP4 ALT_MFP5 ALT_MFP6 ALT_MFP7 ALT_MFP8 ALT_MFP9".split(" ");
d=0;for(c=b.length;d<c;d+=1)f=b[d],"undefined"!==typeof NUTOOL_PIN.g_cfg_regDescriptions[f]&&-1===$.inArray(f,e)&&e.push(f);d=0;for(c=e.length;d<c;d+=1)K[e[d]]=0;if("MINI55"===m||"NM1200"===m)K.ADCHER=0,K.ADCR=0,K.PIN_SEL=0}function hc(b,e){var c,d;if("NUC400"===m||"M451HD"===m||"M451LD"===m||"M4521"===m||"NUC505"===m||"NUC121AE"===m||"NUC123AE"===m||"NANO103"===m||0===m.indexOf("M47")||"M480MD"===m||"M480LD"===m||"AX58200"===m||0===m.indexOf("M25")||"NDA102SD2"===m||"M261"===m||0===m.indexOf("M235")||
0===m.indexOf("M030")||0===m.indexOf("M031")||"M0564"===m||"M05641"===m||0===m.indexOf("NUC126")||"M071QV"===m||"NUC029xGE"===m||"NUC029KGE"===m||"MA35D1"===m){var f=b.slice(0,2);var h=parseInt(b.slice(3),10);8>h&&(d=!0);if(d){f="G"+f+"_MFPL";var k=(K[f]&~(15<<4*h>>>0))>>>0;K[f]=(k|e<<4*h>>>0)>>>0}else f="G"+f+"_MFPH",k=(K[f]&~(15<<4*(h-8)>>>0))>>>0,K[f]=(k|e<<4*(h-8)>>>0)>>>0}else if("M0A21"===m||"M480HD"===m||0===m.indexOf("M46"))f=b.slice(0,2),h=parseInt(b.slice(3),10),d=Math.floor(h/4),f="G"+
f+"_MFP"+d,k=(K[f]&~(255<<8*(h-4*d)>>>0))>>>0,K[f]=(k|e<<8*(h-4*d)>>>0)>>>0;else if("MINI57"===m||"NM1120"===m||"NDA102"===m)f=b.slice(0,2),h=parseInt(b.slice(3),10),f="G"+f+"_MFP",k=(K[f]&~(15<<4*h>>>0))>>>0,K[f]=(k|e<<4*h>>>0)>>>0;else if("NANO100AN"===m||"NANO100BN"===m||"NANO112"===m)f=b.slice(0,2),h=parseInt(b.slice(3),10),8>h&&(d=!0),d?(f+="_L_MFP",k=(K[f]&~(15<<4*h>>>0))>>>0,K[f]=(k|e<<4*h>>>0)>>>0):(f+="_H_MFP",k=(K[f]&~(15<<4*(h-8)>>>0))>>>0,K[f]=(k|e<<4*(h-8)>>>0)>>>0);else if(0===m.indexOf("ML5")||
0===m.indexOf("MS51"))f=b.slice(0,2),h=parseInt(b.slice(3),10),f+="MF76543210",k=(K[f]&~(15<<4*h>>>0))>>>0,K[f]=(k|e<<4*h>>>0)>>>0;else if(0===m.indexOf("KM1M7"))f=b.slice(0,2),h=parseInt(b.slice(3),10),f="IO"+f+"MD",k=(K[f]&~(15<<4*h>>>0))>>>0,K[f]=(k|e<<4*h>>>0)>>>0;else if("ISD9100"===m||"ISD9300"===m)f=b.slice(0,2),h=parseInt(b.slice(3),10),f="G"+f+"_MFP",k=(K[f]&~(3<<2*h>>>0))>>>0,K[f]=(k|e<<2*h>>>0)>>>0;else if("MINI55"===m||"NM1200"===m){h=0;for(f=NUTOOL_PIN.g_cfg_gpioMatrix.length;h<f;h+=
1)if(b===NUTOOL_PIN.g_cfg_gpioMatrix[h].f[0]){var a=1;for(c=NUTOOL_PIN.g_cfg_gpioMatrix[h].f.length;a<c;a+=1){k=NUTOOL_PIN.g_cfg_gpioMatrix[h].f[a];f=k.slicePriorToX("[");d=parseInt(k.slice(k.indexOf("[")+1,k.indexOf("]")),10);var g=parseInt(k.sliceAfterX(":"),10);k=1<<d>>>0;var l=0;e&1<<g&&(l=1<<d>>>0);k=(K[f]&~k)>>>0;K[f]=(k|l)>>>0}break}"P3.2"===b&&1===e&&(K.PIN_SEL=0)}else for(h=0,f=NUTOOL_PIN.g_cfg_gpioMatrix.length;h<f;h+=1)if(b===NUTOOL_PIN.g_cfg_gpioMatrix[h].f[0]){a=1;for(c=NUTOOL_PIN.g_cfg_gpioMatrix[h].f.length;a<
c;a+=1)k=NUTOOL_PIN.g_cfg_gpioMatrix[h].f[a],f=k.slicePriorToX("["),d=parseInt(k.slice(k.indexOf("[")+1,k.indexOf("]")),10),g=parseInt(k.sliceAfterX(":"),10),k=1<<d>>>0,l=0,e&1<<g&&(l=1<<d>>>0),k=(K[f]&~k)>>>0,K[f]=(k|l)>>>0;break}}function Ya(b,e){b=b.replace("GP","P");if("M0519"===m||"M051DN_DE"===m||"M051BN"===m||"M051AN"===m||"M058S"===m||"MINI51AN"===m||"MINI51DE"===m||"MINI55"===m||"MINI58"===m||"NUC029AE"===m||"NUC029TAE"===m||"NUC029AN"===m||"NM1200"===m||"NM1500"===m)var c=8*parseInt(b.slice(1,
2),16)+parseInt(b.slice(3),10);else 0===m.indexOf("ML5")||0===m.indexOf("MS51")?c=8*parseInt(b.slice(1,2),16)+e:0===m.indexOf("KM1M7")?(c=b.indexOf("P"),c=8*parseInt(b.slice(c+1,c+2),16)+e):c="MINI57"===m||"NM1120"===m||"NDA102"===m||"M0A21"===m?8*(b.slice(1,2).charCodeAt(0)-65)+e:16*(b.slice(1,2).charCodeAt(0)-65)+e;return c}function db(b){var e,c,d,f,h,k=$("#moduleTree");var a=f=parseInt(b.toLowerCase().slice(b.indexOf("0x")+2),16);if("NUC400"===m||"M451HD"===m||"M451LD"===m||"M4521"===m||"NANO100AN"===
m||"NANO100BN"===m||"NANO112"===m||"NUC505"===m||"NUC121AE"===m||"NUC123AE"===m||"NANO103"===m||0===m.indexOf("M47")||"M480MD"===m||"M480LD"===m||"AX58200"===m||0===m.indexOf("M25")||"NDA102SD2"===m||"M261"===m||0===m.indexOf("M235")||0===m.indexOf("M030")||0===m.indexOf("M031")||"M0564"===m||"M05641"===m||0===m.indexOf("NUC126")||"M071QV"===m||"NUC029xGE"===m||"NUC029KGE"===m||"MINI57"===m||"NM1120"===m||"NDA102"===m||"MA35D1"===m){var g=-1!==b.indexOf("MFPH")||-1!==b.indexOf("_H_MFP")?!1:!0;for(e=
0;8>e;e+=1){var l=15<<4*e>>>0;if(h=(f&l)>>>4*e>>>0){var q=g?e:e+8;var t="P"+b.slice(b.indexOf("P")+1,b.indexOf("P")+2)+"."+q.toString();var x=$.inArray(t,NUTOOL_PIN.g_cfg_pkgs[NUTOOL_PIN.g_packageNumberIndex]);if(-1!==x){var u="";var p=Ya(b,q);q=1;for(c=NUTOOL_PIN.g_cfg_gpios[p].f.length;q<c;q+=1)if(-1!==NUTOOL_PIN.g_cfg_gpios[p].f[q].indexOf(":"+h)){u=NUTOOL_PIN.g_cfg_gpios[p].f[q];u=u.slicePriorToX(":");break}if(""===u){a&=~l;continue}h=u;h=z(h);u=u.replaceSpecialCharacters();-1!==h.indexOf("_")&&
(h=h.slicePriorToX("_"));k.jstree("check_node",$("#"+u+"_Pin"+(x+1)));$("#"+u+"_Pin"+(x+1)).hasClass("jstree-checked")||(k.jstree("open_node",$("#"+h+"_Root")),k.jstree("open_node",$("#"+u+"_Intermediate")),k.jstree("check_node",$("#"+u+"_Pin"+(x+1))))}else a&=~l}f&=~l;if(0===f)break}}else if("M0A21"===m||"M480HD"===m||0===m.indexOf("M46"))for(g=parseInt(b.substr(-1),10),e=0;4>e;e+=1){l=255<<8*e>>>0;if(h=(f&l)>>>8*e>>>0)if(q=e+4*g,t="P"+b.slice(b.indexOf("P")+1,b.indexOf("P")+2)+"."+q.toString(),
x=$.inArray(t,NUTOOL_PIN.g_cfg_pkgs[NUTOOL_PIN.g_packageNumberIndex]),-1!==x){u="";p=Ya(b,q);q=1;for(c=NUTOOL_PIN.g_cfg_gpios[p].f.length;q<c;q+=1)if(-1!==NUTOOL_PIN.g_cfg_gpios[p].f[q].indexOf(":"+h)){u=NUTOOL_PIN.g_cfg_gpios[p].f[q];u=u.slicePriorToX(":");break}if(""===u){a&=~l;continue}h=u;h=z(h);u=u.replaceSpecialCharacters();-1!==h.indexOf("_")&&(h=h.slicePriorToX("_"));k.jstree("check_node",$("#"+u+"_Pin"+(x+1)));$("#"+u+"_Pin"+(x+1)).hasClass("jstree-checked")||(k.jstree("open_node",$("#"+
h+"_Root")),k.jstree("open_node",$("#"+u+"_Intermediate")),k.jstree("check_node",$("#"+u+"_Pin"+(x+1))))}else a&=~l;f&=~l;if(0===f)break}else if(0===m.indexOf("ML5")||0===m.indexOf("MS51")||0===m.indexOf("KM1M7"))for(e=0;8>e;e+=1){l=15<<4*e>>>0;if(h=(f&l)>>>4*e>>>0)if(q=e,t="P"+b.slice(b.indexOf("P")+1,b.indexOf("P")+2)+"."+q.toString(),x=$.inArray(t,NUTOOL_PIN.g_cfg_pkgs[NUTOOL_PIN.g_packageNumberIndex]),-1!==x){u="";p=Ya(b,q);q=1;for(c=NUTOOL_PIN.g_cfg_gpios[p].f.length;q<c;q+=1)if(-1!==NUTOOL_PIN.g_cfg_gpios[p].f[q].indexOf(":"+
h)){u=NUTOOL_PIN.g_cfg_gpios[p].f[q];u=u.slicePriorToX(":");break}if(""===u){a&=~l;continue}h=u;h=z(h);u=u.replaceSpecialCharacters();-1!==h.indexOf("_")&&(h=h.slicePriorToX("_"));k.jstree("check_node",$("#"+u+"_Pin"+(x+1)));$("#"+u+"_Pin"+(x+1)).hasClass("jstree-checked")||(k.jstree("open_node",$("#"+h+"_Root")),k.jstree("open_node",$("#"+u+"_Intermediate")),k.jstree("check_node",$("#"+u+"_Pin"+(x+1))))}else a&=~l;f&=~l;if(0===f)break}else if("ISD9100"===m||"ISD9300"===m)for(e=0;16>e;e+=1){l=3<<
2*e>>>0;if(h=(f&l)>>>2*e>>>0)if(q=e,t="P"+b.slice(b.indexOf("P")+1,b.indexOf("P")+2)+"."+q.toString(),x=$.inArray(t,NUTOOL_PIN.g_cfg_pkgs[NUTOOL_PIN.g_packageNumberIndex]),-1!==x){p=Ya(b,q);u="";q=1;for(c=NUTOOL_PIN.g_cfg_gpios[p].f.length;q<c;q+=1)if(-1!==NUTOOL_PIN.g_cfg_gpios[p].f[q].indexOf(":"+h)){u=NUTOOL_PIN.g_cfg_gpios[p].f[q];u=u.slicePriorToX(":");break}if(""===u){a&=~l;continue}h=u;h=z(h);u=u.replaceSpecialCharacters();-1!==h.indexOf("_")&&(h=h.slicePriorToX("_"));k.jstree("check_node",
$("#"+u+"_Pin"+(x+1)));$("#"+u+"_Pin"+(x+1)).hasClass("jstree-checked")||(k.jstree("open_node",$("#"+h+"_Root")),k.jstree("open_node",$("#"+u+"_Intermediate")),k.jstree("check_node",$("#"+u+"_Pin"+(x+1))))}else a&=~l;f&=~l;if(0===f)break}else for(e=0;32>e;e+=1){l=1<<e>>>0;h=(f&l)>>>e>>>0;x=-1;if(h){var v=b.slice(b.indexOf("P"),b.indexOf(":"))+"["+e+"]";q=0;for(c=NUTOOL_PIN.g_cfg_gpioMatrix.length;q<c;q+=1){var n=1;for(d=NUTOOL_PIN.g_cfg_gpioMatrix[q].f.length;n<d;n+=1)if(-1!==NUTOOL_PIN.g_cfg_gpioMatrix[q].f[n].indexOf(v)){t=
NUTOOL_PIN.g_cfg_gpioMatrix[q].f[0];x=$.inArray(t,NUTOOL_PIN.g_cfg_pkgs[NUTOOL_PIN.g_packageNumberIndex]);break}if(-1!==x){h=0;n=1;for(d=NUTOOL_PIN.g_cfg_gpioMatrix[q].f.length;n<d;n+=1)u=NUTOOL_PIN.g_cfg_gpioMatrix[q].f[n],g=parseInt(u.slice(u.indexOf("[")+1,u.indexOf("]")),10),l=1<<g>>>0,u.slicePriorToX("["),h+=((f&l)>>>g)*Math.pow(2,n-1),f&=~l;p=8*parseInt(t.slice(1,2),16)+parseInt(t.slice(3),10);u="";n=1;for(d=NUTOOL_PIN.g_cfg_gpios[p].f.length;n<d;n+=1)if(-1!==NUTOOL_PIN.g_cfg_gpios[p].f[n].indexOf(":"+
h)){u=NUTOOL_PIN.g_cfg_gpios[p].f[n];u=u.slicePriorToX(":");break}if(""===u)for(n=1,d=NUTOOL_PIN.g_cfg_gpioMatrix[q].f.length;n<d;n+=1)u=NUTOOL_PIN.g_cfg_gpioMatrix[q].f[n],g=parseInt(u.slice(u.indexOf("[")+1,u.indexOf("]")),10),l=1<<g>>>0,a&=~l;else{h=u;h=z(h);u=u.replaceSpecialCharacters();-1!==h.indexOf("_")&&(h=h.slicePriorToX("_"));k.jstree("check_node",$("#"+u+"_Pin"+(x+1)));$("#"+u+"_Pin"+(x+1)).hasClass("jstree-checked")||(k.jstree("open_node",$("#"+h+"_Root")),k.jstree("open_node",$("#"+
u+"_Intermediate")),k.jstree("check_node",$("#"+u+"_Pin"+(x+1))));break}}}-1===x&&(a&=~l)}if(0===f)break}return b=b.slice(0,b.indexOf("0x")+2)+Za(a)}function Dc(b){var e,c,d,f=parseInt(b.toLowerCase().slice(b.indexOf("0x")+2),16),h=[];if("NUC400"===m||"M451HD"===m||"M451LD"===m||"M4521"===m||"NANO100AN"===m||"NANO100BN"===m||"NANO112"===m||"NUC505"===m||"NUC121AE"===m||"NUC123AE"===m||"NANO103"===m||0===m.indexOf("M47")||"M480MD"===m||"M480LD"===m||"AX58200"===m||0===m.indexOf("M25")||"NDA102SD2"===
m||"M261"===m||0===m.indexOf("M235")||0===m.indexOf("M030")||0===m.indexOf("M031")||"M0564"===m||"M05641"===m||0===m.indexOf("NUC126")||"M071QV"===m||"NUC029xGE"===m||"NUC029KGE"===m||"MINI57"===m||"NM1120"===m||"NDA102"===m||"MA35D1"===m){var k=-1!==b.indexOf("MFPH")||-1!==b.indexOf("_H_MFP")?!1:!0;for(e=0;8>e;e+=1){var a=k?e:e+8;a="P"+b.slice(b.indexOf("P")+1,b.indexOf("P")+2)+"."+a.toString();a=$.inArray(a,NUTOOL_PIN.g_cfg_pkgs[NUTOOL_PIN.g_packageNumberIndex]);if(-1!==a&&""!==D[a]){var g=D[a]+
"_Pin"+(a+1);g=g.replaceSpecialCharacters();$("#moduleTree").jstree("uncheck_node",$("#"+g));if(!$("#"+g).hasClass("jstree-unchecked")){var l=z(g.slicePriorToX("_"));h[0]=a+1;jb(g,l,h);$("#"+g).addClass("jstree-unchecked");if("undefined"!==typeof B[l]){var q=0;for(c=B[l].length;q<c;q+=1)if(B[l][q]===g){B[l][q]="";break}q=0;for(c=B[l].length;q<c&&""===B[l][q];q+=1)q===c-1&&$("#"+l+"_Root").removeClass("jstree-undetermined").addClass("jstree-unchecked")}}}}}if("M0A21"===m||"M480HD"===m||0===m.indexOf("M46"))for(f=
parseInt(b.substr(-1),10),e=0;4>e;e+=1){if(a=e+4*f,a="P"+b.slice(b.indexOf("P")+1,b.indexOf("P")+2)+"."+a.toString(),a=$.inArray(a,NUTOOL_PIN.g_cfg_pkgs[NUTOOL_PIN.g_packageNumberIndex]),-1!==a&&""!==D[a]&&(g=D[a]+"_Pin"+(a+1),g=g.replaceSpecialCharacters(),$("#moduleTree").jstree("uncheck_node",$("#"+g)),!$("#"+g).hasClass("jstree-unchecked")&&(l=z(g.slicePriorToX("_")),h[0]=a+1,jb(g,l,h),$("#"+g).addClass("jstree-unchecked"),"undefined"!==typeof B[l]))){q=0;for(c=B[l].length;q<c;q+=1)if(B[l][q]===
g){B[l][q]="";break}q=0;for(c=B[l].length;q<c&&""===B[l][q];q+=1)q===c-1&&$("#"+l+"_Root").removeClass("jstree-undetermined").addClass("jstree-unchecked")}}else if(0===m.indexOf("ML5")||0===m.indexOf("MS51")||0===m.indexOf("KM1M7"))for(e=0;8>e;e+=1){if(a=e,a="P"+b.slice(b.indexOf("P")+1,b.indexOf("P")+2)+"."+a.toString(),a=$.inArray(a,NUTOOL_PIN.g_cfg_pkgs[NUTOOL_PIN.g_packageNumberIndex]),-1!==a&&""!==D[a]&&(g=D[a]+"_Pin"+(a+1),g=g.replaceSpecialCharacters(),$("#moduleTree").jstree("uncheck_node",
$("#"+g)),!$("#"+g).hasClass("jstree-unchecked")&&(l=z(g.slicePriorToX("_")),h[0]=a+1,jb(g,l,h),$("#"+g).addClass("jstree-unchecked"),"undefined"!==typeof B[l]))){q=0;for(c=B[l].length;q<c;q+=1)if(B[l][q]===g){B[l][q]="";break}q=0;for(c=B[l].length;q<c&&""===B[l][q];q+=1)q===c-1&&$("#"+l+"_Root").removeClass("jstree-undetermined").addClass("jstree-unchecked")}}else if("ISD9100"===m||"ISD9300"===m)for(e=0;16>e;e+=1){if(a=e,a="P"+b.slice(b.indexOf("P")+1,b.indexOf("P")+2)+"."+a.toString(),a=$.inArray(a,
NUTOOL_PIN.g_cfg_pkgs[NUTOOL_PIN.g_packageNumberIndex]),-1!==a&&""!==D[a]&&(g=D[a]+"_Pin"+(a+1),g=g.replaceSpecialCharacters(),$("#moduleTree").jstree("uncheck_node",$("#"+g)),!$("#"+g).hasClass("jstree-unchecked")&&(l=z(g.slicePriorToX("_")),h[0]=a+1,jb(g,l,h),$("#"+g).addClass("jstree-unchecked"),"undefined"!==typeof B[l]))){q=0;for(c=B[l].length;q<c;q+=1)if(B[l][q]===g){B[l][q]="";break}q=0;for(c=B[l].length;q<c&&""===B[l][q];q+=1)q===c-1&&$("#"+l+"_Root").removeClass("jstree-undetermined").addClass("jstree-unchecked")}}else for(e=
0;32>e;e+=1)if(a=1<<e>>>0,k=(f&a)>>>e>>>0,a=-1,k){var t=b.slice(b.indexOf("P"),b.indexOf(":"))+"["+e+"]";k=0;for(d=NUTOOL_PIN.g_cfg_gpioMatrix.length;k<d;k+=1){q=1;for(c=NUTOOL_PIN.g_cfg_gpioMatrix[k].f.length;q<c;q+=1)if(-1!==NUTOOL_PIN.g_cfg_gpioMatrix[k].f[q].indexOf(t)){a=NUTOOL_PIN.g_cfg_gpioMatrix[k].f[0];a=$.inArray(a,NUTOOL_PIN.g_cfg_pkgs[NUTOOL_PIN.g_packageNumberIndex]);break}if(-1!==a&&""!==D[a]&&(g=D[a]+"_Pin"+(a+1),g=g.replaceSpecialCharacters(),$("#moduleTree").jstree("uncheck_node",
$("#"+g)),!$("#"+g).hasClass("jstree-unchecked")&&(l=z(g.slicePriorToX("_")),h[0]=a+1,jb(g,l,h),$("#"+g).addClass("jstree-unchecked"),"undefined"!==typeof B[l]))){q=0;for(c=B[l].length;q<c;q+=1)if(B[l][q]===g){B[l][q]="";break}q=0;for(c=B[l].length;q<c&&""===B[l][q];q+=1)q===c-1&&$("#"+l+"_Root").removeClass("jstree-undetermined").addClass("jstree-unchecked")}}}}function Tb(b){var e=b;0===b.indexOf("NUC1")?e="NUC100":0===b.indexOf("NUC2")?e="NUC200":0===b.indexOf("NANO1")?e="NANO100":0===b.indexOf("NDA102")?
e="NDA102":0===b.indexOf("M0518")?e="M0518":0===b.indexOf("M0519")?e="M0519":0===b.indexOf("M0564")?e="M0564":0===b.indexOf("M030G")?e="M030G":0===b.indexOf("M030")||0===b.indexOf("M031")?e="M031":0===b.indexOf("M05")?e="M051":0===b.indexOf("M071")?e="M071":0===b.indexOf("MINI5")?e="MINI51":0===b.indexOf("M25")?e="M251":0===b.indexOf("M235")?e="M2351":0===b.indexOf("M45")?e="M451":0===b.indexOf("M46")?e="M460":0===b.indexOf("M48")?e="M480":0===b.indexOf("KM1M7")?e="KM1M7":0===b.indexOf("NUC029")?
e="NUC029":0===b.indexOf("MS51")?e="MS51":0===b.indexOf("ML5")&&(e="ML51");return e}function z(b){var e;if("undefined"===typeof z.specialModuleNames)if(z.specialModuleNames="PA PB PC PD PE PF PG PH PI PI PI PJ PK PL PM PN P0 P1 P2 P3 P4 P5 P6 P7 P8 P9".split(" "),"NUC400"===m)z.specialModuleNames.push("BRAKE"),z.specialModuleNames.push("INT"),z.specialModuleNames.push("TAMPER");else if(0===m.indexOf("M030G"))z.specialModuleNames.push("DAC"),z.specialModuleNames.push("INT");else if(0===m.indexOf("NUC1262"))z.specialModuleNames.push("LLSI"),
z.specialModuleNames.push("INT");else if(0===m.indexOf("M0A21")||0===m.indexOf("M030")||0===m.indexOf("M031")||0===m.indexOf("MS51")||"M0564"===m||"M05641"===m||"M0515LDE"===m||"M071M"===m||"MINI58"===m||"NUC029KGE"===m||"NUC029xGE"===m||"NUC121AE"===m||0===m.indexOf("NUC126")||"M071QV"===m||"NUC1311"===m)z.specialModuleNames.push("INT");else if("NM1120"===m)z.specialModuleNames.push("TM");else if("MINI57"===m||"NDA102"===m)z.specialModuleNames.push("TM"),z.specialModuleNames.splice(z.specialModuleNames.indexOf("PG"),
1);else if("M0519"===m)z.specialModuleNames.push("TM"),z.specialModuleNames.push("INT");else if(0===m.indexOf("ML5"))z.specialModuleNames.push("TK"),z.specialModuleNames.push("INT");else if("M451LD"===m||"M451HD"===m||"M4521"===m)z.specialModuleNames.push("TK"),z.specialModuleNames.push("INT"),z.specialModuleNames.push("TAMPER");else if(0===m.indexOf("M46")||0===m.indexOf("M47")||"M480MD"===m||"M480LD"===m||"M480HD"===m||"M251"===m||"M253"===m||"M261"===m||"NDA102SD2"===m||0===m.indexOf("M235")||
"AX58200"===m)z.specialModuleNames.push("INT"),z.specialModuleNames.push("TAMPER");else if(0===m.indexOf("KM1M7")){z.specialModuleNames.push("IRQ");z.specialModuleNames.push("AD");var c=0;for(e=26;c<e;c+=1)10>c?z.specialModuleNames.push("TM0"+c):z.specialModuleNames.push("TM"+c)}else"M256D"===m||"M258"===m||"M258G"===m?(z.specialModuleNames.push("INT"),z.specialModuleNames.push("LCD"),z.specialModuleNames.push("TAMPER")):"NANO100AN"===m?(z.specialModuleNames.push("ADC"),z.specialModuleNames.push("DA"),
z.specialModuleNames.push("AD"),z.specialModuleNames.push("PWM0"),z.specialModuleNames.push("PWM1"),z.specialModuleNames.push("SC0"),z.specialModuleNames.push("SC1"),z.specialModuleNames.push("TC"),z.specialModuleNames.push("SPI"),z.specialModuleNames.push("I2C0"),z.specialModuleNames.push("I2C1"),z.specialModuleNames.push("I2S"),z.specialModuleNames.push("TMR"),z.specialModuleNames.push("TX"),z.specialModuleNames.push("RX")):"NANO100BN"===m?(z.specialModuleNames.push("ADC"),z.specialModuleNames.push("DA"),
z.specialModuleNames.push("AD"),z.specialModuleNames.push("TC"),z.specialModuleNames.push("TM")):"NANO103"===m||"NANO112"===m?z.specialModuleNames.push("AD"):"NUC100AN_BN"===m||"NUC100CN"===m||"NUC100DN"===m?(z.specialModuleNames.push("INT"),z.specialModuleNames.push("ADC"),z.specialModuleNames.push("PWM"),z.specialModuleNames.push("I2C0"),z.specialModuleNames.push("I2C1"),z.specialModuleNames.push("TM"),z.specialModuleNames.push("TXD"),z.specialModuleNames.push("RXD"),z.specialModuleNames.push("RTS"),
z.specialModuleNames.push("PS2"),z.specialModuleNames.push("SPI"),z.specialModuleNames.push("SC0"),z.specialModuleNames.push("SC1"),z.specialModuleNames.push("SC2"),z.specialModuleNames.push("nWR"),z.specialModuleNames.push("I2S"),z.specialModuleNames.push("CTS"),z.specialModuleNames.push("CP"),z.specialModuleNames.push("AD")):"NUC200AE"===m||"NUC200AN"===m?(z.specialModuleNames.push("PWM"),z.specialModuleNames.push("ADC"),z.specialModuleNames.push("INT"),z.specialModuleNames.push("AD")):"NUC2201"===
m||"M071R1S"===m||"NUC029xEE"===m?(z.specialModuleNames.push("PWM"),z.specialModuleNames.push("ADC"),z.specialModuleNames.push("INT"),z.specialModuleNames.push("AD"),z.specialModuleNames.push("nWR")):0===m.indexOf("NUC131")||"M0518"===m||"NUC029xDE"===m||"NUC029MDE"===m?(z.specialModuleNames.push("ADC"),z.specialModuleNames.push("INT")):"NUC122AN"===m?z.specialModuleNames.push("PWM"):"NUC123AN"===m||"NUC123AE"===m?(z.specialModuleNames.push("ADC"),z.specialModuleNames.push("I2S")):"M051DN_DE"===m||
"M051AN"===m||"M051BN"===m||"M058S"===m||"NUC029AE"===m||"NUC029TAE"===m||"NUC029AN"===m?(z.specialModuleNames.push("AD"),z.specialModuleNames.push("AIN"),z.specialModuleNames.push("SPI"),z.specialModuleNames.push("PWM"),z.specialModuleNames.push("T0"),z.specialModuleNames.push("T1"),z.specialModuleNames.push("T2"),z.specialModuleNames.push("T3"),z.specialModuleNames.push("nWR"),z.specialModuleNames.push("CTS"),z.specialModuleNames.push("RTS")):"MINI51AN"===m||"MINI51DE"===m||"MINI55"===m?(z.specialModuleNames.push("AIN"),
z.specialModuleNames.push("PWM"),z.specialModuleNames.push("T0"),z.specialModuleNames.push("T1"),z.specialModuleNames.push("T2"),z.specialModuleNames.push("T3")):"NM1200"===m?(z.specialModuleNames.push("AIN"),z.specialModuleNames.push("PWM")):"NM1500"===m?(z.specialModuleNames.push("AINA"),z.specialModuleNames.push("AINB"),z.specialModuleNames.push("PWM"),z.specialModuleNames.push("INT"),z.specialModuleNames.push("TM")):"ISD9100"!==m&&"ISD9300"!==m||z.specialModuleNames.push("CMP");if("undefined"!==
typeof b)for(c=0,e=z.specialModuleNames.length;c<e;c+=1)if(0===b.indexOf(z.specialModuleNames[c])){b=0!==b.indexOf("ADC")?z.specialModuleNames[c]:"ADC";break}return b}function Ec(){ic="undefined"===typeof NUTOOL_PER?"NUC200AE"===m?'#include "NUC230_240.h"\n':"NUC200AN"===m?'#include "NUC200Series.h"\n':"NANO100AN"===m||"NANO100BN"===m?'#include "Nano100Series.h"\n':"NANO103"===m?'#include "Nano103.h"\n':"NANO112"===m?'#include "Nano1X2Series.h"\n':"NUC100AN_BN"===m||"NUC100CN"===m||"NUC100DN"===m?
'#include "NUC100Series.h"\n':"NUC121AE"===m?'#include "NUC121.h"\n':"NUC122AN"===m?'#include "NUC122.h"\n':"NUC123AN"===m||"NUC123AE"===m?'#include "NUC123.h"\n':0===m.indexOf("M030G")?'#include "M030G.h"\n':0===m.indexOf("M030")||0===m.indexOf("M031")?'#include "M031Series.h"\n':0===m.indexOf("M256D")||0===m.indexOf("M258")||0===m.indexOf("M258G")?'#include "M251.h"\n':0===m.indexOf("M460")?'#include "M460.h"\n':0===m.indexOf("M480")?'#include "M480.h"\n':0===m.indexOf("KM1M7AF")?'#include "NuMicro.h"\n':
"NUC505"===m?'#include "NUC505Series.h"\n':"M051DN_DE"===m||"M051BN"===m||"M051AN"===m?'#include "M051Series.h"\n':"M451LD"===m||"M451HD"===m?'#include "M451Series.h"\n':"MINI51AN"===m?'#include "Mini51.h"\n':"MINI51DE"===m?'#include "Mini51Series.h"\n':"MINI55"===m?'#include "Mini55Series.h"\n':"MINI57"===m||"NM1120"===m?'#include "Mini57Series.h"\n':"MINI58"===m?'#include "Mini58Series.h"\n':"ML5156"===m?'#include "Function_Define_ML56.h"\n':0===m.indexOf("ML51")?'#include "Function_Define_ML51.h"\n':
0===m.indexOf("ML56")?'#include "Function_Define_ML56.h"\n':0===m.indexOf("MS51_8K")?'#include "MS51_8K.h"\n':"NUC029AN"===m||"NUC029TAE"===m?'#include "NUC029xAN.h"\n':"NUC029AE"===m?'#include "NUC029FAE.h"\n':"NUC029KGE"===m||"NUC029xGE"===m?'#include "NUC029xGE.h"\n':"NUC029xDE"===m?'#include "NUC029xDE.h"\n':"NUC029xEE"===m?'#include "NUC029xEE.h"\n':"NM1200"===m?'#include "Mini51.h"\n':"NM1500"===m?'#include "MT500Series.h"\n':"NUC400"===m?'#include "NUC472_442.h"\n':"M0515LDE"===m||"NDA102SD2"===
m||"M071M"===m||"M071QV"===m||"M071R1S"===m?'#include "NuMicro.h"\n':0===m.indexOf("MA35")?'#include "'+m.toLowerCase()+'.dtsi"\n':'#include "'+m+'.h"\n':'#include "NuCodeGenProj.h"\n'}function Za(b,e){var c=Number(b).toString(16);for(e="undefined"===typeof e||null===e?e=8:e;c.length<e;)c="0"+c;return c}function jc(){var b,e,c=[],d=[],f={},h=$("#mfpTree"),k=0;c=wa(K);c.sort();var a=0;for(b=c.length;a<b;a+=1)k<c[a].length&&(k=c[a].length);a=0;for(b=c.length;a<b;a+=1){var g={};var l={};var q=c[a];if(q.length<
k){var t=0;for(e=k-q.length;t<e;t+=1)q+=Rb}l.id=c[a];g.data=q+":0x"+Za(K[c[a]]);g.attr=l;d[a]=g}l={id:"mfp_tree"};ib();f.data="Simplified Chinese"===pa?"MFP\u5bc4\u5b58\u5668":"Traditional Chinese"===pa?"MFP\u6682\u5b58\u5668":"MFP Registers";f.attr=l;f.state="open";f.children=d;Wa=18*wa(K).length+20>Ha/3?Ha/3:18*wa(K).length+20;0===h.length&&($("#rootTree_Pin")[0].appendChild(Ua("div","mfpTree","Loading...")),h=$("#mfpTree"),$("#ChipType").hover(function(){$(this).css("background-color","#FAFAFA");
lb()},function(){$(this).css("background-color","#FFFFFF")}),$("#MCU").hover(function(){$(this).css("background-color","#FAFAFA");lb()},function(){$(this).css("background-color","#FFFFFF")}));h[0].setAttribute("style","background-color: #FFFFFF; float:left; overflow-y: scroll; width:275px; height: "+Wa+"px; border-bottom: 5px solid #F2F2F2;");-1!==F.indexOf("WLCSP")||-1!==F.indexOf("BGA")?h.hover(function(){$(this).css("background-color","#FAFAFA");lb();$("#pin_side_0").css("opacity","0.8");$("#NUC_PinConfiguration_Canvas_Lining").css("opacity",
"0")},function(){$(this).css("background-color","#FFFFFF");$("#pin_side_0").css("opacity","0.1");$("#NUC_PinConfiguration_Canvas_Lining").css("opacity","1")}):h.hover(function(){$(this).css("background-color","#FAFAFA");lb()},function(){$(this).css("background-color","#FFFFFF")});h.jstree({json_data:{data:f},themes:{theme:"default",icons:!1},core:{animation:0},plugins:["themes","json_data","ui","crrm"]}).bind("hover_node.jstree",function(x,u){var p=u.rslt.obj.attr("id"),v=p.slicePriorToX(":"),n="";
Bb&&NUTOOL_PIN.g_cfg_regDescriptions.hasOwnProperty(v)&&(-1===NUTOOL_PIN.g_cfg_regDescriptions[v].indexOf("nonexistent")&&(n="Simplified Chinese"===pa?"\u4f4d\u5740: ":"Traditional Chinese"===pa?"\u4f4d\u5740: ":"Address: "),n+=NUTOOL_PIN.g_cfg_regDescriptions[v],$("#"+p).simpletip({fixed:!0,offset:[60,0]}),$("#"+p).eq(0).simpletip().update(n))}).bind("dblclick.jstree",function(x){x=$(x.target).closest("li")[0].id;"mfp_tree"!==x&&("undefined"===typeof K.ALT_MFP&&"MINI55"!==m&&"NM1200"!==m&&h.jstree("rename",
$("#"+x)),$("#"+x).eq(0).simpletip().blockShow(),$("#"+x).eq(0).simpletip().hide())}).bind("rename.jstree",function(x,u){var p=u.rslt.obj.attr("id"),v=u.rslt.old_name,n=u.rslt.new_name,r=!1;"NANO100AN"===m||"NANO100BN"===m||"NANO112"===m?8===n.slice(n.toLowerCase().indexOf("0x")+2).length&&0===n.toLowerCase().indexOf("p")&&4===n.toLowerCase().lastIndexOf("_mfp")&&8===n.toLowerCase().lastIndexOf(":0x")&&(r=!0):"NM1500"===m||"M0519"===m||"M051DN_DE"===m||"M051BN"===m||"M051AN"===m||"M058S"===m||"MINI51AN"===
m||"MINI51DE"===m||"MINI55"===m||"MINI58"===m||"NUC029AE"===m||"NUC029TAE"===m||"NUC029AN"===m||"NM1200"===m?8===n.slice(n.toLowerCase().indexOf("0x")+2).length&&0===n.toLowerCase().indexOf("p")&&2===n.toLowerCase().lastIndexOf("_mfp")&&6===n.toLowerCase().lastIndexOf(":0x")&&(r=!0):0===m.indexOf("ML5")||0===m.indexOf("MS51")?8===n.slice(n.toLowerCase().indexOf("0x")+2).length&&0===n.toLowerCase().lastIndexOf("p")&&2===n.toLowerCase().lastIndexOf("mf")&&12===n.toLowerCase().lastIndexOf(":0x")&&(r=
!0):0===m.indexOf("KM1M7")?8===n.slice(n.toLowerCase().indexOf("0x")+2).length&&0===n.toLowerCase().lastIndexOf("iop")&&4===n.toLowerCase().lastIndexOf("md")&&6===n.toLowerCase().lastIndexOf(":0x")&&(r=!0):8!==n.slice(n.toLowerCase().indexOf("0x")+2).length||0!==n.toLowerCase().lastIndexOf("gp")||3!==n.toLowerCase().lastIndexOf("_mfp")||7!==n.toLowerCase().lastIndexOf(":0x")&&8!==n.toLowerCase().lastIndexOf(":0x")||(r=!0);r?(Dc(v),db(n),Xa()):h.jstree("rename_node",$("#"+p),v)}).bind("destroy.jstree",
function(){e=b=t=a=null;c=[];d=[];q=k=h=l=f=g=null});h.css("font-size","16px");h.css("font-family",'Monaco, Consolas, "Lucida Console", monospace;')}function Xa(){var b,e,c=0;var d=wa(K);var f=0;for(b=d.length;f<b;f+=1)c<d[f].length&&(c=d[f].length);f=0;for(b=d.length;f<b;f+=1){var h=d[f];if(h.length<c){var k=0;for(e=c-h.length;k<e;k+=1)h+=Rb}$("#mfpTree").jstree("rename_node",$("#"+d[f]),h+":0x"+Za(K[d[f]]).toUpperCase())}}function Ua(b,e,c,d){d?(d=document.createElement("input"),d.value=c,d.type=
b):(d=document.createElement(b),d.innerHTML=c);d.id=e;return d}function wa(b){var e=[],c=0,d;for(d in b)b.hasOwnProperty(d)&&(e[c]=d,c+=1);return e}function Fc(){var b,e,c;if("undefined"!==typeof NUTOOL_PIN.g_cfg_addGPIO&&"undefined"!==typeof NUTOOL_PIN.g_cfg_addGPIO[F]){var d="function"==typeof NUTOOL_PIN.g_cfg_addGPIO[F]?NUTOOL_PIN.g_cfg_addGPIO[F]():NUTOOL_PIN.g_cfg_addGPIO[F];var f=wa(d);for(b=0;b<f.length;b+=1){var h=f[b]+":0";var k=0;for(e=NUTOOL_PIN.g_cfg_gpios.length;k<e;k+=1)if(h===NUTOOL_PIN.g_cfg_gpios[k].f[0]){var a=
0;for(c=d[f[b]].length;a<c;a+=1){var g=d[f[b]][a];for(e=NUTOOL_PIN.g_cfg_gpios[k].f.length-1;0<=e;--e)if(h=NUTOOL_PIN.g_cfg_gpios[k].f[e],parseInt(h.slice(h.indexOf(":")+1),10)<parseInt(g.slice(g.indexOf(":")+1),10)){NUTOOL_PIN.g_cfg_gpios[k].f.splice(e+1,0,g);break}}break}}}d={};"undefined"!==typeof NUTOOL_PIN.g_cfg_unusedGPIO&&"undefined"!==typeof NUTOOL_PIN.g_cfg_unusedGPIO[NUTOOL_PIN.g_packageNumberIndex]?d="function"==typeof NUTOOL_PIN.g_cfg_unusedGPIO[NUTOOL_PIN.g_packageNumberIndex]?NUTOOL_PIN.g_cfg_unusedGPIO[NUTOOL_PIN.g_packageNumberIndex]():
NUTOOL_PIN.g_cfg_unusedGPIO[NUTOOL_PIN.g_packageNumberIndex]:"undefined"!==typeof NUTOOL_PIN.g_cfg_unusedGPIO&&("undefined"!==typeof NUTOOL_PIN.g_cfg_unusedGPIO[F]?d="function"==typeof NUTOOL_PIN.g_cfg_unusedGPIO[F]?NUTOOL_PIN.g_cfg_unusedGPIO[F]():NUTOOL_PIN.g_cfg_unusedGPIO[F]:"undefined"!==typeof NUTOOL_PIN.g_cfg_unusedGPIO[F.slicePriorToX("(")]&&(d="function"==typeof NUTOOL_PIN.g_cfg_unusedGPIO[F.slicePriorToX("(")]?NUTOOL_PIN.g_cfg_unusedGPIO[F.slicePriorToX("(")]():NUTOOL_PIN.g_cfg_unusedGPIO[F.slicePriorToX("(")]));
f=wa(d);for(b=0;b<f.length;b+=1)if("ALL"===f[b])for(k=0,e=NUTOOL_PIN.g_cfg_gpios.length;k<e;k+=1)for(a=0,c=d[f[b]].length;a<c;a+=1)for(g=d[f[b]][a],h=NUTOOL_PIN.g_cfg_gpios[k].f.length-1;0<=h;--h)0===NUTOOL_PIN.g_cfg_gpios[k].f[h].indexOf(g)&&NUTOOL_PIN.g_cfg_gpios[k].f.splice(h,1);else if("PARTIAL"===f[b])for(k=0,e=NUTOOL_PIN.g_cfg_gpios.length;k<e;k+=1)for(a=0,c=d[f[b]].length;a<c;a+=1)for(g=d[f[b]][a],h=NUTOOL_PIN.g_cfg_gpios[k].f.length-1;0<=h;--h)NUTOOL_PIN.g_cfg_gpios[k].f[h].slicePriorToX(":")===
g&&NUTOOL_PIN.g_cfg_gpios[k].f.splice(h,1);else for(h=f[b]+":0",k=0,e=NUTOOL_PIN.g_cfg_gpios.length;k<e;k+=1)if(h===NUTOOL_PIN.g_cfg_gpios[k].f[0]){a=0;for(c=d[f[b]].length;a<c;a+=1)for(g=d[f[b]][a],h=NUTOOL_PIN.g_cfg_gpios[k].f.length-1;0<=h;--h)0===NUTOOL_PIN.g_cfg_gpios[k].f[h].indexOf(g)&&NUTOOL_PIN.g_cfg_gpios[k].f.splice(h,1);break}a=wa(NUTOOL_PIN.g_cfg_regDescriptions);for(b=a.length-1;0<=b;--b)"undefined"===typeof K[a[b]]&&delete NUTOOL_PIN.g_cfg_regDescriptions[a[b]];Ga=[];for(b=0;b<T;b+=
1)for(h=NUTOOL_PIN.g_cfg_pkgs[NUTOOL_PIN.g_packageNumberIndex][b]+":0",a=0,c=NUTOOL_PIN.g_cfg_gpios.length;a<c;a+=1)if(h===NUTOOL_PIN.g_cfg_gpios[a].f[0]){e=0;for(k=NUTOOL_PIN.g_cfg_gpios[a].f.length;e<k;e+=1)g=c=NUTOOL_PIN.g_cfg_gpios[a].f[e].slicePriorToX(":"),-1!==g.indexOf("_")&&(g=g.slicePriorToX("_")),g=z(g),"undefined"===typeof Ga[g]?(Ga[g]=[],Ga[g][0]=b+1,Va[g]=[],Va[g][0]=c):(Ga[g].push(b+1),Va[g].push(c));break}}function lb(){var b;for(b=0;b<W.length;b+=1)W[b].mouseLeave()}function pb(b,
e){var c=b-1;if(-1!==F.indexOf("SOP")){var d=Math.floor(c/T*2);var f=c-d*T/2}else-1!==F.indexOf("WLCSP")||-1!==F.indexOf("BGA")?(d=0,f=c):c<I?(d=0,f=c):c>=I&&c<I+ba?(d=1,f=c-I):c>=I+ba&&c<I+ba+xa?(d=2,f=c-I-ba):c>=I+ba+xa&&c<T&&(d=3,f=c-I-ba-xa);W[d].lastPinIndex=f;W[d].savedPinPadColor[f]=e;W[d].mouseLeave()}function Z(b){var e=b.toString();if(-1!==F.indexOf("WLCSP")||-1!==F.indexOf("BGA"))"string"===typeof b&&(b=parseInt(b,10)),--b,e=NUTOOL_PIN.g_horizontalIndexArray[Math.floor(b/Ja)]+(b%Ja+1);
return e}function Wb(){var b,e,c,d,f,h,k,a={init:function(g,l,q){a.inner=g;a.stage=l[0];a.whichSide=q;a.pin=[];a.savedPinPadColor=[];a.savedPinName=[];a.x=[];a.y=[];a.currentPinIndex=-1;a.lastPinIndex=-1;sa.addEvent(a.stage,"click",a.pinClickHandler);sa.addEvent(a.stage,"mousemove",function(t){a.mousePosition=a.getMousePos($("#NUC_PinConfiguration_Canvas")[0],t);a.decideWhichPin()});if(-1!==F.indexOf("SOP")){a.oneSidePinNumber=T/2;a.pin[0]=1+q*a.oneSidePinNumber;l=NUTOOL_PIN.g_cfg_pkgs[NUTOOL_PIN.g_packageNumberIndex][q*
T/2];l=ta(l)?"#FFFFFF":"#9365C9";a.savedPinPadColor[0]=l;a.x[0]=0;a.y[0]=0;for(g=1;g<a.oneSidePinNumber;g+=1)l=NUTOOL_PIN.g_cfg_pkgs[NUTOOL_PIN.g_packageNumberIndex][g+q*T/2],l=ta(l)?"#FFFFFF":"#9365C9",a.pin[g]=g+1+q*a.oneSidePinNumber,a.savedPinPadColor[g]=l;for(g=0;g<a.oneSidePinNumber;g+=1)a.pin[g]<=T/2?(a.x[g]=Q-40,a.y[g]=V+la+(a.pin[g]-1)*(16+ha)):(a.x[g]=Q+A/2,a.y[g]=V+A-la-16-(a.pin[g]-T/2-1)*(16+ha));switch(q){case 0:a.w=40;a.h=16;a.stage.setAttribute("width",a.w+20);a.stage.setAttribute("height",
a.h+a.y[a.oneSidePinNumber-1]-a.y[0]+20);a.stage.setAttribute("style","z-index:1; position:absolute; left:"+(a.x[0]-10)+"px; top:"+(a.y[0]-10)+"px;");break;case 1:a.w=40,a.h=16,a.stage.setAttribute("width",a.w+20),a.stage.setAttribute("height",a.h+a.y[0]-a.y[a.oneSidePinNumber-1]+20),a.stage.setAttribute("style","z-index:1; position:absolute; left:"+(a.x[a.oneSidePinNumber-1]-10)+"px; top:"+(a.y[a.oneSidePinNumber-1]-10)+"px;")}}else if(-1!==F.indexOf("WLCSP")||-1!==F.indexOf("BGA")){a.oneSidePinNumber=
T;a.w=0;a.pin[0]=1;l=NUTOOL_PIN.g_cfg_pkgs[NUTOOL_PIN.g_packageNumberIndex][0];l=ta(l)?"#FFFFFF":"#9365C9";a.savedPinPadColor[0]=l;a.x[0]=0;a.y[0]=0;for(g=1;g<a.oneSidePinNumber;g+=1)l=NUTOOL_PIN.g_cfg_pkgs[NUTOOL_PIN.g_packageNumberIndex][g],l=ta(l)?"#FFFFFF":"#9365C9",a.pin[g]=g+1,a.savedPinPadColor[g]=l;for(g=0;g<a.oneSidePinNumber;g+=1)a.x[g]=la+30+Math.floor(g/Ja)*(60+ha),a.y[g]=la+30+(Ja-1-g%Ja)*(60+ha);a.r=30;a.stage.setAttribute("width",A);a.stage.setAttribute("height",A);a.stage.setAttribute("style",
"z-index:2; opacity:0.1; filter:alpha(opacity=50); position:absolute; left:"+Q+"px; top:"+V+"px;")}else{switch(q){default:case 0:a.oneSidePinNumber=I;a.pin[0]=1;l=NUTOOL_PIN.g_cfg_pkgs[NUTOOL_PIN.g_packageNumberIndex][0];l=ta(l)?"#FFFFFF":"#9365C9";a.savedPinPadColor[0]=l;for(g=1;g<a.oneSidePinNumber;g+=1)l=NUTOOL_PIN.g_cfg_pkgs[NUTOOL_PIN.g_packageNumberIndex][g],l=ta(l)?"#FFFFFF":"#9365C9",a.pin[g]=g+1,a.savedPinPadColor[g]=l;break;case 1:a.oneSidePinNumber=ba;a.pin[0]=1+I;l=NUTOOL_PIN.g_cfg_pkgs[NUTOOL_PIN.g_packageNumberIndex][0+
I];l=ta(l)?"#FFFFFF":"#9365C9";a.savedPinPadColor[0]=l;for(g=1;g<a.oneSidePinNumber;g+=1)l=NUTOOL_PIN.g_cfg_pkgs[NUTOOL_PIN.g_packageNumberIndex][g+I],l=ta(l)?"#FFFFFF":"#9365C9",a.pin[g]=g+1+I,a.savedPinPadColor[g]=l;break;case 2:a.oneSidePinNumber=xa;a.pin[0]=1+I+ba;l=NUTOOL_PIN.g_cfg_pkgs[NUTOOL_PIN.g_packageNumberIndex][0+I+ba];l=ta(l)?"#FFFFFF":"#9365C9";a.savedPinPadColor[0]=l;for(g=1;g<a.oneSidePinNumber;g+=1)l=NUTOOL_PIN.g_cfg_pkgs[NUTOOL_PIN.g_packageNumberIndex][g+I+ba],l=ta(l)?"#FFFFFF":
"#9365C9",a.pin[g]=g+1+I+ba,a.savedPinPadColor[g]=l;break;case 3:for(a.oneSidePinNumber=cb,a.pin[0]=1+I+ba+xa,l=NUTOOL_PIN.g_cfg_pkgs[NUTOOL_PIN.g_packageNumberIndex][0+I+ba+xa],l=ta(l)?"#FFFFFF":"#9365C9",a.savedPinPadColor[0]=l,g=1;g<a.oneSidePinNumber;g+=1)l=NUTOOL_PIN.g_cfg_pkgs[NUTOOL_PIN.g_packageNumberIndex][g+I+ba+xa],l=ta(l)?"#FFFFFF":"#9365C9",a.pin[g]=g+1+I+ba+xa,a.savedPinPadColor[g]=l}a.x[0]=0;for(g=a.y[0]=0;g<a.oneSidePinNumber;g+=1)switch(q){default:case 0:f=Math.floor((Ka-I)/2);a.x[g]=
Q+la+(a.pin[g]-1+f)*(16+ha)-1;a.y[g]=V+A;break;case 1:f=Math.floor((Ka-ba)/2);a.x[g]=Q+A;a.y[g]=V+A-la-16-(a.pin[g]-I-1+f)*(16+ha);break;case 2:f=Math.floor((Ka-xa)/2);a.x[g]=Q+A-la-16-(a.pin[g]-I-ba-1+f)*(16+ha)-1;a.y[g]=V-40+1;break;case 3:f=Math.floor((Ka-cb)/2),a.x[g]=Q-40,a.y[g]=V+la+(a.pin[g]-I-ba-xa-1+f)*(16+ha)}switch(q){default:case 0:a.w=16;a.h=40;a.stage.setAttribute("width",a.w+a.x[a.oneSidePinNumber-1]-a.x[0]+20);a.stage.setAttribute("height",a.h+20);a.stage.setAttribute("style","z-index:1; position:absolute; left:"+
(a.x[0]-10)+"px; top:"+(a.y[0]-10)+"px;");break;case 1:a.w=40;a.h=16;a.stage.setAttribute("width",a.w+20);a.stage.setAttribute("height",a.h+a.y[0]-a.y[a.oneSidePinNumber-1]+20);a.stage.setAttribute("style","z-index:1; position:absolute; left:"+(a.x[a.oneSidePinNumber-1]-10)+"px; top:"+(a.y[a.oneSidePinNumber-1]-10)+"px;");break;case 2:a.w=16;a.h=40;a.stage.setAttribute("width",a.w+a.x[0]-a.x[a.oneSidePinNumber-1]+20);a.stage.setAttribute("height",a.h+20);a.stage.setAttribute("style","z-index:1; position:absolute; left:"+
(a.x[a.oneSidePinNumber-1]-10)+"px; top:"+(a.y[a.oneSidePinNumber-1]-10)+"px;");break;case 3:a.w=40,a.h=16,a.stage.setAttribute("width",a.w+20),a.stage.setAttribute("height",a.h+a.y[a.oneSidePinNumber-1]-a.y[0]+20),a.stage.setAttribute("style","z-index:1; position:absolute; left:"+(a.x[0]-10)+"px; top:"+(a.y[0]-10)+"px;")}}a.ctx=sa.getContext(a.stage);l=l=null;return a},draw:function(){var g;a.ctx.strokeStyle="#000000";if(-1!==F.indexOf("SOP"))switch(a.whichSide){case 0:for(g=0;g<a.oneSidePinNumber;g+=
1){a.ctx.strokeRect(11,a.y[g]-a.y[0]+10,a.w,a.h);a.ctx.fillStyle=a.savedPinPadColor[g];a.ctx.fillRect(11,a.y[g]-a.y[0]+10,a.w,a.h);var l=ia[a.pin[g]-1];-1!==l.lastIndexOf("/")&&(l=l.slice(l.lastIndexOf("/")+1));!ta(l)&&4<l.length&&(l=l.slice(0,4)+"..");a.savedPinName[g]=l;a.ctx.font="12px Arial";a.ctx.fillStyle="black";a.ctx.fillText(l,11,a.y[g]-a.y[0]+22.8)}break;case 1:for(g=0;g<a.oneSidePinNumber;g+=1)a.ctx.strokeRect(11,a.y[g]-a.y[a.oneSidePinNumber-1]+10,a.w,a.h),a.ctx.fillStyle=a.savedPinPadColor[g],
a.ctx.fillRect(11,a.y[g]-a.y[a.oneSidePinNumber-1]+10,a.w,a.h),l=ia[a.pin[g]-1],l=l.slicePriorToX("/"),!ta(l)&&4<l.length&&(l=l.slice(0,4)+".."),a.savedPinName[g]=l,a.ctx.font="12px Arial",a.ctx.fillStyle="black",a.ctx.fillText(l,11,a.y[g]-a.y[a.oneSidePinNumber-1]+22.8)}else if(-1!==F.indexOf("WLCSP")||-1!==F.indexOf("BGA"))for(g=0;g<a.oneSidePinNumber;g+=1)l=ia[a.pin[g]-1],a.savedPinName[g]=l,-1===l.toLowerCase().indexOf("toolnotshow")&&(a.ctx.beginPath(),a.ctx.arc(a.x[g],a.y[g],a.r,0,2*Math.PI,
!0),a.ctx.strokeStyle="white",a.ctx.stroke(),a.ctx.strokeStyle="#000000",a.ctx.fillStyle=a.savedPinPadColor[g],a.ctx.fill(),-1!==l.lastIndexOf("/")&&(l=l.slice(l.lastIndexOf("/")+1)),6<l.length&&(l=l.slice(0,6)+".."),a.savedPinName[g]=l,a.ctx.font="12px Arial",a.ctx.fillStyle="black",a.ctx.fillText(l,a.x[g]-a.ctx.measureText(l).width/2,a.y[g]+parseInt(a.ctx.font,10)/2));else switch(a.whichSide){case 0:for(g=0;g<a.oneSidePinNumber;g+=1){a.ctx.strokeRect(a.x[g]-a.x[0]+10,11,a.w,a.h);a.ctx.fillStyle=
a.savedPinPadColor[g];a.ctx.fillRect(a.x[g]-a.x[0]+10,11,a.w,a.h);l=ia[a.pin[g]-1];-1!==l.lastIndexOf("/")&&(l=l.slice(l.lastIndexOf("/")+1));!ta(l)&&4<l.length&&(l=l.slice(0,4)+"..");a.savedPinName[g]=l;a.ctx.font="12px Arial";a.ctx.fillStyle="black";var q=a.x[g]-a.x[0]+10;var t=51;a.ctx.save();a.ctx.translate(q,t);a.ctx.rotate(-Math.PI/2);a.ctx.fillText(l,1,12.8);a.ctx.restore()}break;case 1:for(g=0;g<a.oneSidePinNumber;g+=1)a.ctx.strokeRect(11,a.y[g]-a.y[a.oneSidePinNumber-1]+10,a.w,a.h),a.ctx.fillStyle=
a.savedPinPadColor[g],a.ctx.fillRect(11,a.y[g]-a.y[a.oneSidePinNumber-1]+10,a.w,a.h),l=ia[a.pin[g]-1],l=l.slicePriorToX("/"),!ta(l)&&4<l.length&&(l=l.slice(0,4)+".."),a.savedPinName[g]=l,a.ctx.font="12px Arial",a.ctx.fillStyle="black",a.ctx.fillText(l,11,a.y[g]-a.y[a.oneSidePinNumber-1]+22.8);break;case 2:for(g=0;g<a.oneSidePinNumber;g+=1)a.ctx.strokeRect(a.x[g]-a.x[a.oneSidePinNumber-1]+10,10,a.w,a.h),a.ctx.fillStyle=a.savedPinPadColor[g],a.ctx.fillRect(a.x[g]-a.x[a.oneSidePinNumber-1]+10,10,a.w,
a.h),l=ia[a.pin[g]-1],l=l.slicePriorToX("/"),!ta(l)&&4<l.length&&(l=l.slice(0,4)+".."),a.savedPinName[g]=l,a.ctx.font="12px Arial",a.ctx.fillStyle="black",q=a.x[g]-a.x[a.oneSidePinNumber-1]+10,t=50,a.ctx.save(),a.ctx.translate(q,t),a.ctx.rotate(-Math.PI/2),a.ctx.textAlign="end",a.ctx.fillText(l,40,12.8),a.ctx.restore();break;case 3:for(g=0;g<a.oneSidePinNumber;g+=1)a.ctx.strokeRect(11,a.y[g]-a.y[0]+10,a.w,a.h),a.ctx.fillStyle=a.savedPinPadColor[g],a.ctx.fillRect(11,a.y[g]-a.y[0]+10,a.w,a.h),l=ia[a.pin[g]-
1],-1!==l.lastIndexOf("/")&&(l=l.slice(l.lastIndexOf("/")+1)),!ta(l)&&4<l.length&&(l=l.slice(0,4)+".."),a.savedPinName[g]=l,a.ctx.font="12px Arial",a.ctx.fillStyle="black",a.ctx.fillText(l,11,a.y[g]-a.y[0]+22.8)}},restore:function(){sa.removeContext($("#"+a.inner));a=null},getMousePos:function(g,l){var q=g.getBoundingClientRect();return{x:l.clientX-q.left,y:l.clientY-q.top}},decideWhichPin:function(){var g;if(-1!==F.indexOf("WLCSP")||-1!==F.indexOf("BGA")){var l=a.mousePosition.x-Q*M/100;var q=a.mousePosition.y-
V*M/100;for(g=0;g<a.oneSidePinNumber;g+=1){if(l>=(a.x[g]-a.r)*M/100&&l<=(a.x[g]+a.r)*M/100&&q>=(a.y[g]-a.r)*M/100&&q<=(a.y[g]+a.r)*M/100){a.currentPinIndex=g;break}a.currentPinIndex=-1}}else for(g=0;g<a.oneSidePinNumber;g+=1){l=a.x[g]*M/100;if(a.mousePosition.x>=l&&a.mousePosition.x<=l+a.w*M/100&&a.mousePosition.y>=a.y[g]*M/100&&a.mousePosition.y<=(a.y[g]+a.h)*M/100){a.currentPinIndex=g;break}a.currentPinIndex=-1}-1!==a.currentPinIndex?a.mouseEnter():a.mouseLeave()},mouseEnter:function(){var g;var l=
0;for(g=W.length;l<g;l+=1)W[l].lastPinIndex!==a.currentPinIndex&&W[l].mouseLeave();if(a.currentPinIndex!==a.lastPinIndex&&(g=NUTOOL_PIN.g_cfg_pkgs[NUTOOL_PIN.g_packageNumberIndex][a.pin[a.currentPinIndex]-1],-1===g.toLowerCase().indexOf("toolnotshow"))){l=a.lastPinIndex=a.currentPinIndex;a.ctx.strokeStyle="#000000";a.ctx.fillStyle="#FC517E";if(-1!==F.indexOf("SOP"))switch(a.whichSide){case 0:Ea&&a.ctx.strokeRect(11,a.y[l]-a.y[0]+10,a.w,a.h);a.ctx.fillRect(11,a.y[l]-a.y[0]+10,a.w,a.h);a.ctx.font="12px Arial";
a.ctx.fillStyle="black";a.ctx.fillText(a.savedPinName[l],11,a.y[l]-a.y[0]+22.8);break;case 1:Ea&&a.ctx.strokeRect(11,a.y[l]-a.y[a.oneSidePinNumber-1]+10,a.w,a.h),a.ctx.fillRect(11,a.y[l]-a.y[a.oneSidePinNumber-1]+10,a.w,a.h),a.ctx.font="12px Arial",a.ctx.fillStyle="black",a.ctx.fillText(a.savedPinName[l],11,a.y[l]-a.y[a.oneSidePinNumber-1]+22.8)}else if(-1!==F.indexOf("WLCSP")||-1!==F.indexOf("BGA")){a.ctx.beginPath();a.ctx.arc(a.x[l],a.y[l],a.r,0,2*Math.PI,!0);a.ctx.fill();var q=g=""!==D[l]?D[l]:
NUTOOL_PIN.g_cfg_pkgs[NUTOOL_PIN.g_packageNumberIndex][a.pin[a.currentPinIndex]-1];6<g.length&&(q=g.slice(0,6)+"..");a.ctx.font="12px Arial";a.ctx.fillStyle="black";a.ctx.fillText(q,a.x[l]-a.ctx.measureText(q).width/2,a.y[l]+parseInt(a.ctx.font,10)/2)}else switch(a.whichSide){case 0:Ea&&a.ctx.strokeRect(a.x[l]-a.x[0]+10,11,a.w,a.h);a.ctx.fillRect(a.x[l]-a.x[0]+10,11,a.w,a.h);a.ctx.font="12px Arial";a.ctx.fillStyle="black";q=a.x[l]-a.x[0]+10;var t=51;a.ctx.save();a.ctx.translate(q,t);a.ctx.rotate(-Math.PI/
2);a.ctx.fillText(a.savedPinName[l],1,12.8);a.ctx.restore();break;case 1:Ea&&a.ctx.strokeRect(11,a.y[l]-a.y[a.oneSidePinNumber-1]+10,a.w,a.h);a.ctx.fillRect(11,a.y[l]-a.y[a.oneSidePinNumber-1]+10,a.w,a.h);a.ctx.font="12px Arial";a.ctx.fillStyle="black";a.ctx.fillText(a.savedPinName[l],11,a.y[l]-a.y[a.oneSidePinNumber-1]+22.8);break;case 2:Ea&&a.ctx.strokeRect(a.x[l]-a.x[a.oneSidePinNumber-1]+10,10,a.w,a.h);a.ctx.fillRect(a.x[l]-a.x[a.oneSidePinNumber-1]+10,10,a.w,a.h);a.ctx.font="12px Arial";a.ctx.fillStyle=
"black";q=a.x[l]-a.x[a.oneSidePinNumber-1]+10;t=50;a.ctx.save();a.ctx.translate(q,t);a.ctx.rotate(-Math.PI/2);a.ctx.textAlign="end";a.ctx.fillText(a.savedPinName[l],40,12.8);a.ctx.restore();break;case 3:Ea&&a.ctx.strokeRect(11,a.y[l]-a.y[0]+10,a.w,a.h),a.ctx.fillRect(11,a.y[l]-a.y[0]+10,a.w,a.h),a.ctx.font="12px Arial",a.ctx.fillStyle="black",a.ctx.fillText(a.savedPinName[l],11,a.y[l]-a.y[0]+22.8)}if(!ta(g)&&(l=g,"unknown"!==l)){b=$("#panel")[0].appendChild(Ua("canvas",a.inner+"_tooltip_pin"));-1===
l.indexOf("/")||-1===l.indexOf("XT1_IN")&&-1===l.indexOf("XT1_OUT")&&-1===l.indexOf("XTAL1")&&-1===l.indexOf("XTAL2")||(l=-1!==l.indexOf("XTAL1")?l+" (XTAL1":-1!==l.indexOf("XTAL2")?l+" (XTAL2":-1!==l.indexOf("XT1_IN")?l+" (XT1_IN":l+" (XT1_OUT",l="Simplified Chinese"===pa?l+"\u7531User Configuration\u51b3\u5b9a\u3002)":"Traditional Chinese"===pa?l+"\u7531User Configuration\u6c7a\u5b9a\u3002)":l+" is decided by User Configuration.)");if(Ea){e=a.ctx.measureText(l).width;c=16;t="12px Arial";var x=c-
4;-1!==F.indexOf("WLCSP")||-1!==F.indexOf("BGA")?(g=(Q+a.x[a.currentPinIndex])*M/100,q=(V+a.y[a.currentPinIndex]+10)*M/100):(g=(a.x[a.currentPinIndex]+a.w)*M/100,q=a.y[a.currentPinIndex]*M/100)}else if(100>M?(e=a.ctx.measureText(l).width/M*100,c=16/M*100,t=12/M*100+"px Times Arial",x=c-5/M*100):(e=a.ctx.measureText(l).width,c=16,t="12px Arial",x=c-4),g=a.x[a.currentPinIndex]+a.w,q=a.y[a.currentPinIndex],-1!==F.indexOf("WLCSP")||-1!==F.indexOf("BGA"))g+=Q,q+=V+10;b.setAttribute("style","z-index:2; position:absolute; left:"+
g+"px; top:"+q+"px;");b.setAttribute("width",e+21);b.setAttribute("height",c);d=sa.getContext(b);d.font=t;d.strokeStyle="#000000";d.lineWidth=2;d.strokeRect(0,0,e+21,c);d.fillStyle="#FFF6C0";d.fillRect(1,1,e+21-2,c-2);d.fillStyle="#000000";d.fillText(l,7,x)}}},mouseLeave:function(){var g=a.lastPinIndex;if(-1!==a.lastPinIndex){a.ctx.strokeStyle="#000000";a.ctx.fillStyle=a.savedPinPadColor[g];if(-1!==F.indexOf("SOP"))switch(a.whichSide){case 0:Ea&&a.ctx.strokeRect(11,a.y[g]-a.y[0]+10,a.w,a.h);a.ctx.fillRect(11,
a.y[g]-a.y[0]+10,a.w,a.h);a.ctx.fillStyle="black";a.ctx.fillText(a.savedPinName[g],11,a.y[g]-a.y[0]+22.8);break;case 1:Ea&&a.ctx.strokeRect(11,a.y[g]-a.y[a.oneSidePinNumber-1]+10,a.w,a.h),a.ctx.fillRect(11,a.y[g]-a.y[a.oneSidePinNumber-1]+10,a.w,a.h),a.ctx.fillStyle="black",a.ctx.fillText(a.savedPinName[g],11,a.y[g]-a.y[a.oneSidePinNumber-1]+22.8)}else if(-1!==F.indexOf("WLCSP")||-1!==F.indexOf("BGA")){var l=""!==D[g]?D[g]:a.savedPinName[g];-1===l.toLowerCase().indexOf("toolnotshow")&&(a.ctx.beginPath(),
a.ctx.arc(a.x[g],a.y[g],a.r,0,2*Math.PI,!0),a.ctx.fill(),6<l.length&&(l=l.slice(0,6)+".."),a.ctx.font="12px Arial",a.ctx.fillStyle="black",a.ctx.fillText(l,a.x[g]-a.ctx.measureText(l).width/2,a.y[g]+parseInt(a.ctx.font,10)/2))}else switch(a.whichSide){case 0:Ea&&a.ctx.strokeRect(a.x[g]-a.x[0]+10,11,a.w,a.h);a.ctx.fillRect(a.x[g]-a.x[0]+10,11,a.w,a.h);a.ctx.fillStyle="black";h=a.x[g]-a.x[0]+10;k=51;a.ctx.save();a.ctx.translate(h,k);a.ctx.rotate(-Math.PI/2);a.ctx.fillText(a.savedPinName[g],1,12.8);
a.ctx.restore();break;case 1:Ea&&a.ctx.strokeRect(11,a.y[g]-a.y[a.oneSidePinNumber-1]+10,a.w,a.h);a.ctx.fillRect(11,a.y[g]-a.y[a.oneSidePinNumber-1]+10,a.w,a.h);a.ctx.fillStyle="black";a.ctx.fillText(a.savedPinName[g],11,a.y[g]-a.y[a.oneSidePinNumber-1]+22.8);break;case 2:Ea&&a.ctx.strokeRect(a.x[g]-a.x[a.oneSidePinNumber-1]+10,10,a.w,a.h);a.ctx.fillRect(a.x[g]-a.x[a.oneSidePinNumber-1]+10,10,a.w,a.h);a.ctx.fillStyle="black";h=a.x[g]-a.x[a.oneSidePinNumber-1]+10;k=50;a.ctx.save();a.ctx.translate(h,
k);a.ctx.rotate(-Math.PI/2);a.ctx.textAlign="end";a.ctx.fillText(a.savedPinName[g],40,12.8);a.ctx.restore();break;case 3:Ea&&a.ctx.strokeRect(11,a.y[g]-a.y[0]+10,a.w,a.h),a.ctx.fillRect(11,a.y[g]-a.y[0]+10,a.w,a.h),a.ctx.fillStyle="black",a.ctx.fillText(a.savedPinName[g],11,a.y[g]-a.y[0]+22.8)}a.lastPinIndex=-1;sa.removeContext($("#"+a.inner+"_tooltip_pin"))}},pinClickHandler:function(){var g;var l=NUTOOL_PIN.g_cfg_pkgs[NUTOOL_PIN.g_packageNumberIndex][a.pin[a.currentPinIndex]-1];var q=[],t=0,x=sa.getContext($("#NUC_PinConfiguration_Canvas")[0]);
if(-1!==a.currentPinIndex&&(hb(),ta(l))){parseInt(l.sliceAfterX("."),10);l+=":0";var u=Ya(l,parseInt(l.sliceAfterX("."),10));if(-1!==F.indexOf("WLCSP")||-1!==F.indexOf("BGA")){var p=a.x[a.currentPinIndex]+Q;var v=a.y[a.currentPinIndex]+V+10}else p=a.x[a.currentPinIndex],v=a.y[a.currentPinIndex];l=0;for(g=NUTOOL_PIN.g_cfg_gpios[u].f.length;l<g;l+=1)q[l]=NUTOOL_PIN.g_cfg_gpios[u].f[l].slicePriorToX(":"),x.measureText(q[l]).width>t&&(t=x.measureText(q[l]).width);q.push("Reset");mb=[];l=0;for(g=q.length;l<
g;l+=1)x=!Ea&&100<M?v+20*l:v+20*l/M*100,u="#6495ED",l!==g-1&&q[l]===D[a.pin[a.currentPinIndex]-1]&&(u=-1!==$.inArray(a.pin[a.currentPinIndex],Aa)?"#FAB92D":"#41AF88"),mb[l]=Sc().init(a.pin[a.currentPinIndex],l.toString(),q[l],t,p+a.w,x,u,!0),x=l.toString(),x=x.replaceSpecialCharacters(),$("#Pin_MultiFunction_Selection_"+x).hover(mb[l].mouseEnter,mb[l].mouseLeave),mb[l].draw()}f=null}};return a}function hb(){var b;var e=0;for(b=mb.length;e<b;e+=1)mb[e].restore();mb=[]}function Sc(){var b,e,c,d={init:function(f,
h,k,a,g,l,q,t){d.pin=f;d.label=k;d.color=q;d.inner="Pin_MultiFunction_Selection_"+h;d.stage=$("#panel")[0].appendChild(Ua("canvas",d.inner));Ea?(d.w=a,d.h=20,f=g*M/100,l=l*M/100,a="12px Arial",d.textYposition=14):(f=g,100>M?(d.w=a/M*100,d.h=20/M*100,a=12/M*100+"px Times Arial",d.textYposition=14/M*100):(d.w=a,d.h=20,a="12px Arial",d.textYposition=14));d.positionX=f;d.positionY=l;d.stage.setAttribute("width",d.w+21);d.stage.setAttribute("height",d.h);d.stage.setAttribute("style","z-index:2; position:absolute; left:"+
f+"px; top:"+l+"px;");d.ctx=sa.getContext(d.stage);d.ctx.font=a;(d.bInstallClickListener=t)&&sa.addEvent(d.stage,"click",d.pinMultiFunctionSelectionsClickHandler);return d},mouseEnter:function(){var f;d.ctx.fillStyle="#B0C4DE";d.ctx.fillRect(1,1,d.w+21-2,d.h-2);d.ctx.fillStyle="#000000";d.ctx.fillText(d.label,7,d.textYposition);if(Bb&&0<NUTOOL_PIN.g_cfg_gpiosDescriptions.length&&!ta(d.label)&&"Reset"!==d.label){var h=sc(d.label,d.pin);if("unknown"!==h){b=$("#panel")[0].appendChild(Ua("canvas",d.inner+
"_tooltip"));var k=h.split("<br >");h=e=0;for(f=k.length;h<f;h++)d.ctx.measureText(k[h]).width>e&&(e=d.ctx.measureText(k[h]).width);-1!==F.indexOf("SOP")?d.pin>T/2?b.setAttribute("style","z-index:2; position:absolute; left:"+(d.positionX-e-21-1)+"px; top:"+d.positionY+"px;"):b.setAttribute("style","z-index:2; position:absolute; left:"+(d.positionX+d.w+21+1)+"px; top:"+d.positionY+"px;"):-1!==F.indexOf("WLCSP")||-1!==F.indexOf("BGA")?d.pin>T/2?b.setAttribute("style","z-index:2; position:absolute; left:"+
(d.positionX-e-21-1)+"px; top:"+d.positionY+"px;"):b.setAttribute("style","z-index:2; position:absolute; left:"+(d.positionX+d.w+21+1)+"px; top:"+d.positionY+"px;"):d.pin>I/2&&d.pin<=I+ba+xa/2?b.setAttribute("style","z-index:2; position:absolute; left:"+(d.positionX-e-21-1)+"px; top:"+d.positionY+"px;"):b.setAttribute("style","z-index:2; position:absolute; left:"+(d.positionX+d.w+21+1)+"px; top:"+d.positionY+"px;");b.setAttribute("width",e+21);b.setAttribute("height",d.h*k.length);c=sa.getContext(b);
c.font=d.ctx.font;c.strokeStyle="#000000";c.lineWidth=2;c.strokeRect(0,0,e+21,d.h*k.length);c.fillStyle="#FFF6C0";c.fillRect(1,1,e+21-2,d.h*k.length-2);c.fillStyle="#000000";h=0;for(f=k.length;h<f;h++)c.fillText(k[h],7,d.textYposition+h*d.h)}}},mouseLeave:function(){d.ctx.fillStyle=d.color;d.ctx.fillRect(1,1,d.w+21-2,d.h-2);d.ctx.fillStyle="#000000";d.ctx.fillText(d.label,7,d.textYposition);sa.removeContext($("#"+d.inner+"_tooltip"))},draw:function(){d.ctx.strokeStyle="#000000";d.ctx.strokeRect(0,
0,d.w+21,d.h);d.ctx.fillStyle=d.color;d.ctx.fillRect(1,1,d.w+21-2,d.h-2);d.ctx.fillStyle="#000000";d.ctx.fillText(d.label,7,d.textYposition)},restore:function(){sa.removeContext($("#"+d.inner+"_tooltip"));sa.removeContext($("#"+d.inner));Ra();d=null},pinMultiFunctionSelectionsClickHandler:function(){var f;lb();if("Reset"===d.label){if(0!==Aa.length){var h=0;for(f=Aa.length;h<f;h+=1)Aa[h]===d.pin&&Aa.splice(h,1)}var k=D[d.pin-1]+"_Pin"+d.pin;k=k.replaceSpecialCharacters();$("#moduleTree").jstree("uncheck_node",
$("#"+k));if(!$("#"+k).hasClass("jstree-unchecked")){var a=z(k.slicePriorToX("_"));h=[];h[0]=d.pin;jb(k,a,h);Xa();if("undefined"!==typeof B[a]){h=0;for(f=B[a].length;h<f;h+=1)if(B[a][h]===k){B[a][h]="";break}h=0;for(f=B[a].length;h<f&&""===B[a][h];h+=1)h===f-1&&$("#"+a+"_Root").removeClass("jstree-undetermined").addClass("jstree-unchecked")}a=null;h=[]}pb(d.pin,"#FFFFFF");hb()}else{a=!1;k=d.label+"_Pin"+d.pin;if(-1!==$.inArray(k.restorePinTreeNodeName()+"_Intermediate",nb))for(h=0,f=oa.length;h<f;h+=
1)if(oa[h].restorePinTreeNodeName()===k.restorePinTreeNodeName()&&oa[h]!==k&&(!0===$("#"+oa[h]).hasClass("jstree-checked")||0===D[parseInt(oa[h].slice(oa[h].indexOf("_Pin")+4),10)-1].replaceSpecialCharacters().indexOf(oa[h].restorePinTreeNodeName()))){a=!0;var g=oa[h].slice(oa[h].indexOf("_Pin")+4);break}if(a){var l=z(d.label);-1!==l.indexOf("_")&&(l=l.slicePriorToX("_"));"undefined"!==typeof d.pin&&null!==d.pin&&Tc(function(){Gc(l,d.pin,d.label)},d.label,Z(g))}else Gc(z(k.slicePriorToX("_")),d.pin,
d.label);g=a=null}k=null}};return d}function Gc(b,e,c){var d,f=$("#moduleTree"),h=D[e-1]+"_Pin"+e;h=h.replaceSpecialCharacters();f.jstree("uncheck_node",$("#"+h));if(!$("#"+h).hasClass("jstree-unchecked")){var k=z(h.slicePriorToX("_"));var a=[];a[0]=e;jb(h,k,a);if("undefined"!==typeof B[k]){a=0;for(d=B[k].length;a<d;a+=1)if(B[k][a]===h){B[k][a]="";break}a=0;for(d=B[k].length;a<d&&""===B[k][a];a+=1)a===d-1&&$("#"+k+"_Root").removeClass("jstree-undetermined").addClass("jstree-unchecked")}}h=(c+"_Pin"+
e).replaceSpecialCharacters();f.jstree("check_node",$("#"+h));$("#"+h).hasClass("jstree-checked")||(f.jstree("open_node",$("#"+b+"_Root")),f.jstree("open_node",$("#"+c+"_Intermediate")),f.jstree("check_node",$("#"+h)));pb(e,"#FAB92D");"undefined"===typeof Aa?Aa[0]=e:Aa.push(e);hb();b=b.replaceSpecialCharacters();c=c.replaceSpecialCharacters();f.jstree("close_all");f.jstree("open_node",$("#"+b+"_Root"));f.jstree("open_node",$("#"+c+"_Intermediate"));e=wa(Ga);e.sort();f.scrollTop(18*$.inArray(b,e))}
function sc(b,e){var c,d="",f=!1;var h=0;for(c=NUTOOL_PIN.g_cfg_gpiosDescriptions.length;h<c;h+=1){var k=d=NUTOOL_PIN.g_cfg_gpiosDescriptions[h].replace("Note:","<br >Note:");var a=!1;-1!==d.indexOf("@")&&(k=k.slice(k.indexOf("@")+1,k.indexOf(":")),a=!0);if(0===d.indexOf(b+":")||0===d.indexOf(b+"@"))if(!a||k===NUTOOL_PIN.g_cfg_pkgs[NUTOOL_PIN.g_packageNumberIndex][e-1]){f=!0;break}}return d=f?d.slice(d.indexOf(":")+1):"unknown"}function Tc(b,e,c){if($("#rootTree_Pin").is(":visible")){ib();if("Simplified Chinese"===
pa){var d="\u901a\u77e5";e="\u9884\u671f\u7684"+e+"\u5df2\u88ab\u7b2c"+c+"\u811a\u4f4d\u8bbe\u7f6e\u3002\u8bf7\u95ee\u4f60\u8981\u53d6\u6d88\u65e7\u7684\u4e14\u6539\u8bbe\u7f6e\u5230\u73b0\u5728\u7684\u811a\u4f4d\u5417?";c="\u8981";var f="\u4e0d\u8981"}else"Traditional Chinese"===pa?(d="\u901a\u77e5",e="\u9810\u671f\u7684"+e+"\u5df2\u88ab\u7b2c"+c+"\u8173\u4f4d\u8a2d\u7f6e\u3002\u8acb\u554f\u4f60\u8981\u53d6\u6d88\u820a\u7684\u4e14\u6539\u8a2d\u7f6e\u5230\u73fe\u5728\u7684\u8173\u4f4d\u55ce?",c="\u8981",
f="\u4e0d\u8981"):(d="Notice",e="The expected "+e+" has been configured by the pin"+c+". Would you like to cancel the old one and configure to the current pin?",c="Yes",f="No");Ra();$('<div id="noticeForMultipleSelectionsDialog"><p>'+e+'</p><input type="text" size="1" style="position:relative;top:-5000px;"/></div>').dialog({modal:!1,resizable:!1,title:d,width:500,height:"auto",show:"fade",hide:"fade",close:function(){$("#noticeForMultipleSelectionsDialog").dialog("destroy")},buttons:[{text:c,click:function(){b();
$("#noticeForMultipleSelectionsDialog").dialog("isOpen")&&$("#noticeForMultipleSelectionsDialog").dialog("destroy")}},{text:f,click:function(){hb();$("#noticeForMultipleSelectionsDialog").dialog("isOpen")&&$("#noticeForMultipleSelectionsDialog").dialog("destroy")}}]})}f=c=e=d=null}function kc(){Ga=[];va=[];K=[];Ub=[];Oa=[];D=[];ia=[];Aa=[];"undefined"!==typeof z.specialModuleNames&&delete z.specialModuleNames;Vb();hb();$("#panel").unbind("mouseenter mouseleave");sa.removeContext($("#NUC_PinConfiguration_Canvas"));
sa.removeContext($("#NUC_PinConfiguration_Canvas_Lining"));$("#mfpTree").jstree("destroy");$("#supportedModules").jstree("destroy");$("#moduleTree").jstree("destroy");$("#mfpTree").remove();$("#supportedModules").remove();$("#moduleTree").remove();$("div").remove(".tooltip")}function lc(){gc();"undefined"===typeof NUTOOL_PER&&mc();Fc();dc();jc();Yb();Lb();fc()}function eb(b,e,c){var d="js"===c?"src":"css"===c?"href":"none",f=window.document.getElementsByTagName("js"===c?"script":"css"===c?"link":
"none");"undefined"!==typeof NUTOOL_PER&&"js"===c&&(b="PinConfigure/"+b,e="PinConfigure/"+e);var h=e;if("js"===c){var k=document.createElement("script");k.setAttribute("type","text/javascript");k.setAttribute("src",h)}else"css"===c&&(k=document.createElement("link"),k.setAttribute("rel","stylesheet"),k.setAttribute("type","text/css"),k.setAttribute("href",h));h=k;for(c=f.length;0<=c;--c)f[c]&&null!==f[c].getAttribute(d)&&(f[c].getAttribute(d)===b?f[c].parentNode.removeChild(f[c]):f[c].getAttribute(d)===
e&&f[c].parentNode.removeChild(f[c]));f[0].parentNode.appendChild(h)}function mc(){var b,e=$("#MCUselect"),c={},d=[],f=!1;0<e.children().length&&e.children().remove();var h=0;for(b=NUTOOL_PIN.g_cfg_chips.length;h<b;h+=1)try{d.push(NUTOOL_PIN.g_cfg_chips[h].name+"("+NUTOOL_PIN.g_cfg_chips[h].pkg+")")}catch(k){}d.sort(Qa);h=0;for(b=d.length;h<b;h+=1)c=document.createElement("option"),c.id=c.innerHTML=c.value=d[h],e[0].appendChild(c);h=0;for(b=NUTOOL_PIN.g_cfg_chips.length;h<b;h+=1)if(NUTOOL_PIN.g_cfg_chips[h].name+
"("+NUTOOL_PIN.g_cfg_chips[h].pkg+")"===F){f=!0;break}f?e.val(F):e.val($("#MCUselect option:first-child").val()).change();$("#ChipTypeSelect").val(Tb(m));e.on("change",function(){$a!==$(this).val()&&($a=$(this).val(),setTimeout(Hc,0))});b=h=null;d=[];e=f=c=null}function Uc(){var b,e=$("#ChipTypeSelect"),c;$("#ChipType")[0].setAttribute("style","width:259px; border-right: 16px solid #F2F2F2;");$("#MCU")[0].setAttribute("style","width:259px; border-right: 16px solid #F2F2F2;");var d=0;for(b=yb.length;d<
b;d+=1){var f=document.createElement("option");try{f.id=f.innerHTML=f.value=yb[d]}catch(k){}e[0].appendChild(f)}e.val(Tb(m));mc();e.on("change",function(){c="NUC_"+m+"_Content.js";var k=$(this).val();var a=k;"NUC200"===k?a="NUC200AN":"NANO100"===k?a="NANO100BN":"NUC100"===k?a="NUC100DN":"M030G"===k?a="M030G":"M031"===k?a="M031BT":"M051"===k?a="M0515LDE":"M071"===k?a="M071M":"MINI51"===k?a="MINI51DE":"NUC029"===k?a="NUC029AE":"M451"===k?a="M451HD":"M460"===k?a="M460LD":"M480"===k?a="M480LD":"KM1M7"===
k?a="KM1M7AF":"MS51"===k?a="MS51_8K":"ML51"===k&&(a="ML51");m=a;h="NUC_"+m+"_Content.js";eb(c,h,"js");mc()});var h=c=e=f=b=d=null}function Hc(){Qb();if($a!==F){try{window.external.updateCurrentDialogSize()}catch(e){}var b=m;m=Sb($a);eb("NUC_"+b+"_Content.js","NUC_"+m+"_Content.js","js");kc();F=$a;NUTOOL_PIN.decidepackageNumber();cc();ub=!1;za=[];ya=[];fa=null;lc();M=100;kb();qb();Ra()}}function Ra(){$("#conflictDialog").dialog("isOpen")&&$("#conflictDialog").dialog("destroy");$("#adjustedModulesDialog").dialog("isOpen")&&
$("#adjustedModulesDialog").dialog("destroy");$("#warningForSavingDialog").dialog("isOpen")&&$("#warningForSavingDialog").dialog("destroy");$("#showPinErrorDialog").dialog("isOpen")&&$("#showPinErrorDialog").dialog("destroy");$("#noticeForMultipleSelectionsDialog").dialog("isOpen")&&$("#noticeForMultipleSelectionsDialog").dialog("destroy");$("#generateCodeDialog").dialog("isOpen")&&$("#generateCodeDialog").dialog("destroy");$("#printReportDialog").dialog("isOpen")&&$("#printReportDialog").dialog("destroy");
$("#runAnotherToolDialog").dialog("isOpen")&&$("#runAnotherToolDialog").dialog("destroy");$("#connectToTargetDialog").dialog("isOpen")&&$("#connectToTargetDialog").dialog("destroy");$("#languageDialog").dialog("isOpen")&&$("#languageDialog").dialog("destroy")}function Nc(){var b,e=sa.getContext($("#NUC_PinConfiguration_Canvas")[0]);e.font="12px Arial";if(-1!==F.indexOf("SOP")){var c=0;for(b=T/2;c<b;c+=1){var d=Q+3;var f=V+la+c*(16+ha)+12.8;e.fillStyle="white";e.fillText((c+1).toString(),d,f);Da&&
(d=Q-40-3,e.save(),e.fillStyle="black",e.fillText(ia[c],d-e.measureText(ia[c]).width,f),e.restore());d=Q+A/2;f=V+A-la-16-c*(16+ha)+12.8;var h=e.measureText((c+1+T/2).toString());e.fillStyle="white";e.fillText((c+1+T/2).toString(),d-h.width-3,f);Da&&(d=Q+A/2+40+3,e.fillStyle="black",e.fillText(ia[c+T/2],d,f))}}else if(-1!==F.indexOf("WLCSP")||-1!==F.indexOf("BGA")){c=0;for(b=Ja;c<b;c+=1)d=Q+3,f=V+la+30+(Ja-1-c%Ja)*(60+ha)+4,e.fillStyle="white",e.fillText((c+1).toString(),d,f);c=0;for(b=ec;c<b;c+=1)d=
Q+la+30+c*(60+ha)-4,f=V+A-5,e.fillStyle="white",e.fillText(NUTOOL_PIN.g_horizontalIndexArray[c],d,f)}else{c=0;for(b=I;c<b;c+=1)f=Math.floor((Ka-I)/2),d=Q+la+(c+f)*(16+ha),f=V+A,e.save(),e.translate(d,f),e.rotate(-Math.PI/2),e.fillStyle="white",e.fillText((c+1).toString(),3,12.8),e.restore(),Da&&(f=V+A+40,e.save(),e.translate(d,f),e.rotate(-Math.PI/2),e.textAlign="end",e.fillStyle="black",e.fillText(ia[c],-3,12.8),e.restore());c=0;for(b=ba;c<b;c+=1)f=Math.floor((Ka-ba)/2),d=Q+A,f=V+A-la-16-(c+f)*(16+
ha)+12.8,h=e.measureText((c+1+I).toString()),e.fillStyle="white",e.fillText((c+1+I).toString(),d-h.width-3,f),Da&&(d=Q+A+40+3,e.fillStyle="black",e.fillText(ia[c+I],d,f));c=0;for(b=xa;c<b;c+=1)f=Math.floor((Ka-xa)/2),d=Q+A-la-16-(c+f)*(16+ha),f=V-40,e.save(),e.translate(d,f),e.rotate(-Math.PI/2),h=e.measureText((c+1+I+ba).toString()),e.fillStyle="white",e.fillText((c+1+I+ba).toString(),-40-h.width-3,12.8),e.restore(),Da&&(e.save(),e.translate(d,f),e.rotate(-Math.PI/2),e.fillStyle="black",e.fillText(ia[c+
I+ba],6,12.8),e.restore());c=0;for(b=cb;c<b;c+=1)f=Math.floor((Ka-cb)/2),d=Q+3,f=V+la+(c+f)*(16+ha)+12.8,e.fillStyle="white",e.fillText((c+1+I+ba+xa).toString(),d,f),Da&&(d=Q-40-3,e.save(),e.fillStyle="black",e.fillText(ia[c+I+ba+xa],d-e.measureText(ia[c+I+ba+xa]).width,f),e.restore())}}function Xb(){var b=sa.getContext($("#NUC_PinConfiguration_Canvas")[0]);if("Simplified Chinese"===pa){var e="\u88ab\u82af\u7247\u56fe\u914d\u7f6e";var c="\u88ab\u6811\u72b6\u56fe\u914d\u7f6e";var d="\u6ed1\u9f20\u7126\u70b9";
var f="\u975e\u53ef\u914d\u7f6e\u7684";b.font="12px \u65b0\u7d30\u660e\u9ad4"}else"Traditional Chinese"===pa?(e="\u88ab\u82af\u7247\u5716\u914d\u7f6e",c="\u88ab\u6a39\u72c0\u5716\u914d\u7f6e",d="\u6ed1\u9f20\u7126\u9ede",f="\u975e\u53ef\u914d\u7f6e\u7684",b.font="12px \u65b0\u7d30\u660e\u9ad4"):(e="Configured by ChipView",c="Configured by TreeView",d="Focused by Mouse",f="Not Configurable",b.font="12px Arial");b.strokeStyle="black";var h=Q-20-40-120;var k=V-20-16-5;b.strokeRect(h,k,40,16);b.fillStyle=
"#FAB92D";b.fillRect(h,k,40,16);b.fillStyle="black";b.fillText(e,h+40+3,k+12.8);h=Q-20-40-120;k=V-20-42;b.strokeRect(h,k,40,16);b.fillStyle="#41AF88";b.fillRect(h,k,40,16);b.fillStyle="black";b.fillText(c,h+40+3,k+12.8);h=Q-20-40-120;k=V-20-63;b.strokeRect(h,k,40,16);b.fillStyle="#FC517E";b.fillRect(h,k,40,16);b.fillStyle="black";b.fillText(d,h+40+3,k+12.8);h=Q-20-40-120;k=V-20-84;b.strokeRect(h,k,40,16);b.fillStyle="#9365C9";b.fillRect(h,k,40,16);b.fillStyle="black";b.fillText(f,h+40+3,k+12.8)}function Ic(){var b=
sa.getContext($("#NUC_PinConfiguration_Canvas")[0]);var e=Q-20-40-120-3;var c=V-20-84;b.fillStyle="#FFFFFF";b.fillRect(e,c,180,104)}function ob(b,e,c){var d,f;e=e.restorePinTreeNodeName().restoreSpecialCharacters();var h=NUTOOL_PIN.g_cfg_pkgs[NUTOOL_PIN.g_packageNumberIndex][b];var k=h+":0";b=0;for(d=NUTOOL_PIN.g_cfg_gpios.length;b<d;b+=1)if(k===NUTOOL_PIN.g_cfg_gpios[b].f[0]){d=0;for(f=NUTOOL_PIN.g_cfg_gpios[b].f.length;d<f;d+=1)if("undefined"===typeof c||!1===c)if("AD"!==e){if(0===NUTOOL_PIN.g_cfg_gpios[b].f[d].indexOf(e)){hc(h,
NUTOOL_PIN.g_cfg_gpios[b].f[d].slice(NUTOOL_PIN.g_cfg_gpios[b].f[d].indexOf(":")+1));break}}else{if(0!==NUTOOL_PIN.g_cfg_gpios[b].f[d].indexOf("ADC")&&0===NUTOOL_PIN.g_cfg_gpios[b].f[d].indexOf(e)){hc(h,NUTOOL_PIN.g_cfg_gpios[b].f[d].slice(NUTOOL_PIN.g_cfg_gpios[b].f[d].indexOf(":")+1));break}}else if(k=NUTOOL_PIN.g_cfg_gpios[b].f[d],k=k.slicePriorToX(":"),k===e){hc(h,NUTOOL_PIN.g_cfg_gpios[b].f[d].slice(NUTOOL_PIN.g_cfg_gpios[b].f[d].indexOf(":")+1));break}break}}function kb(){var b=$("#panel");
Ea?(b.find("canvas").css("zoom"," "+M+"%"),b.width(Sa-275-8),b.height(Na-8),$("#NUC_PinConfiguration_Canvas").width(Ta*M/100),$("#NUC_PinConfiguration_Canvas").height(gb*M/100),$("#NUC_PinConfiguration_Canvas_Lining").width(Ta*M/100),$("#NUC_PinConfiguration_Canvas_Lining").height(gb*M/100),-1!==F.indexOf("SOP")?($("#pin_side_0").width((W[0].w+20)*M/100),$("#pin_side_0").height((W[0].h+W[0].y[W[0].oneSidePinNumber-1]-W[0].y[0]+20)*M/100),$("#pin_side_1").width((W[1].w+20)*M/100),$("#pin_side_1").height((W[1].h+
W[1].y[0]-W[1].y[W[1].oneSidePinNumber-1]+20)*M/100)):-1!==F.indexOf("WLCSP")||-1!==F.indexOf("BGA")?($("#pin_side_0").width(A*M/100),$("#pin_side_0").height(A*M/100)):($("#pin_side_0").width((W[0].w+W[0].x[W[0].oneSidePinNumber-1]-W[0].x[0]+20)*M/100),$("#pin_side_0").height((W[0].h+20)*M/100),$("#pin_side_1").width((W[1].w+20)*M/100),$("#pin_side_1").height((W[1].h+W[1].y[0]-W[1].y[W[1].oneSidePinNumber-1]+20)*M/100),$("#pin_side_2").width((W[2].w+W[2].x[0]-W[2].x[W[2].oneSidePinNumber-1]+20)*M/
100),$("#pin_side_2").height((W[2].h+20)*M/100),$("#pin_side_3").width((W[3].w+20)*M/100),$("#pin_side_3").height((W[3].h+W[3].y[W[3].oneSidePinNumber-1]-W[3].y[0]+20)*M/100)),b.css("border","3px solid white")):($("#parentOfPanel").css("zoom"," "+M+"%"),b.width((Sa-275-8)/M*100),b.height((Na-8)/M*100),b.css({position:"absolute",left:275/M*100+"px"}));hb()}function nc(){for(var b,e,c,d=[],f,h,k,a,g=0;0<va.length&&1E3>g;)for(g+=1,b=parseInt(va[0].slicePriorToX(":"),10),e=ia[b-1],h=-1,k=0,a=Oa[b-1];h!==
k;)h=e.indexOf(a),k=e.lastIndexOf(a),c=e.slice(h),c=c.slicePriorToX("/"),f=c+"_Pin"+b,f=f.replaceSpecialCharacters(),c=z(f.slicePriorToX("_")),d[0]=b,jb(f,c,d),$("#"+f).removeClass("jstree-checked"),$("#"+f).addClass("jstree-unchecked"),$("#"+c+"_Root").removeClass("jstree-undetermined"),$("#"+c+"_Root").removeClass("jstree-checked"),$("#"+c+"_Root").addClass("jstree-unchecked"),e=e.slice(h+1);Xa();$("#moduleTree").find("li").each(function(l,q){$("#"+$(q).attr("id")+" >a").css("color","black")});
$("#moduleTree").jstree("close_all");va=[];d=[];B=[];Ca=[];g=a=k=h=f=c=c=e=b=null}function zb(b){var e,c,d,f,h=[],k="",a=!0;if(0!==NUTOOL_PIN.g_cfg_shareBits.length){var g=$.ajax({url:"NuToolSetup.txt",async:!1}).responseText;if("undefined"!==typeof g&&-1!==g.indexOf("UIlanguage:"))if(g=g.sliceAfterX("UIlanguage:"),g=g.slicePriorToX("\r"),"Simplified Chinese"===g){var l="\u6216";var q="\u5e94\u4e3a";var t="\u3002";var x="(\u518d\u6b21\u914d\u7f6e\u5b83)"}else"Traditional Chinese"===g?(l="\u6216",
q="\u61c9\u70ba",t="\u3002",x="(\u518d\u6b21\u914d\u7f6e\u5b83)"):(l=" or ",q=" should be ",t=".",x="(configure it again)");else l=" or ",q=" should be ",t=".",x="(configure it again)";g=0;for(e=NUTOOL_PIN.g_cfg_shareBits.length;g<e;g+=1){var u=NUTOOL_PIN.g_cfg_shareBits[g];var p=0;for(c=NUTOOL_PIN.g_cfg_gpioMatrix.length;p<c;p+=1){var v=-1;var n=1;for(d=NUTOOL_PIN.g_cfg_gpioMatrix[p].f.length;n<d;n+=1)if(-1!==NUTOOL_PIN.g_cfg_gpioMatrix[p].f[n].indexOf(u)){var r=NUTOOL_PIN.g_cfg_gpioMatrix[p].f[0];
v=$.inArray(r,NUTOOL_PIN.g_cfg_pkgs[NUTOOL_PIN.g_packageNumberIndex]);break}if(-1!==v&&-1===$.inArray(v,h)){h.push(v);var y=0;n=1;for(d=NUTOOL_PIN.g_cfg_gpioMatrix[p].f.length;n<d;n+=1){var w=NUTOOL_PIN.g_cfg_gpioMatrix[p].f[n];var E=parseInt(w.slice(w.indexOf("[")+1,w.indexOf("]")),10);var J=1<<E>>>0;w=w.slicePriorToX("[");w=K[w];y+=((w&J)>>>E)*Math.pow(2,n-1)}var L=D[v];E=0;var Y=Ya(r,parseInt(r.sliceAfterX("."),10));n=1;for(d=NUTOOL_PIN.g_cfg_gpios[Y].f.length;n<d;n+=1)if(0===NUTOOL_PIN.g_cfg_gpios[Y].f[n].indexOf(L+
":")){E=NUTOOL_PIN.g_cfg_gpios[Y].f[n];E=parseInt(E.slice(E.indexOf(":")+1),10);break}""===L&&(L=NUTOOL_PIN.g_cfg_pkgs[NUTOOL_PIN.g_packageNumberIndex][v]);if(y!==E){a=!1;y=[];n=1;for(d=NUTOOL_PIN.g_cfg_gpioMatrix[p].f.length;n<d;n+=1)if(-1!==$.inArray(NUTOOL_PIN.g_cfg_gpioMatrix[p].f[n].slicePriorToX(":"),NUTOOL_PIN.g_cfg_shareBits)&&(w=NUTOOL_PIN.g_cfg_gpioMatrix[p].f[n],E=parseInt(w.slice(w.indexOf("[")+1,w.indexOf("]")),10),J=1<<E>>>0,w=w.slicePriorToX("["),w=K[w],w&J))for(J=1<<n-1>>>0,w=1,f=
NUTOOL_PIN.g_cfg_gpios[Y].f.length;w<f;w+=1)E=NUTOOL_PIN.g_cfg_gpios[Y].f[w],E=parseInt(E.slice(E.indexOf(":")+1),10),E&J&&(0===NUTOOL_PIN.g_cfg_gpios[Y].f[w].indexOf(L)?y.push(L+x):y.push(NUTOOL_PIN.g_cfg_gpios[Y].f[w]));0===y.length&&y.push(NUTOOL_PIN.g_cfg_gpios[Y].f[0].slicePriorToX(":"));J="";n=0;for(d=y.length;n<d;n+=1)0!==n&&n===d-1?J+=l:0!==n&&(J+=", "),J+=y[n].slicePriorToX(":"),n===d-1&&(J+=t);k=k+L+"(Pin"+(v+1)+")"+q+J+" <br />"}}}}a||b("shareBit",k)}"undefined"!==typeof Va.USB&&(J=D.join(),
-1!==J.indexOf("USB_D+")&&-1!==J.indexOf("USB_D-")&&-1===J.indexOf("USB_OTG_ID")&&(a=!1,b("USB_OTG_ID",k)));return a}function Eb(b,e){var c=$.ajax({url:"NuToolSetup.txt",async:!1}).responseText;if("shareBit"===b)if("undefined"!==typeof c&&-1!==c.indexOf("UIlanguage:"))if(c=c.sliceAfterX("UIlanguage:"),c=c.slicePriorToX("\r"),"Simplified Chinese"===c){c="\u5171\u4eab\u4f4d\u5143\u9519\u8bef";var d="\u4e00\u4e9b\u6682\u5b58\u5668\u4f4d\u5143\u53ef\u80fd\u88ab\u590d\u6570\u4e2a\u591a\u529f\u80fd\u7ed9\u8bbe\u7f6e\u3002\u8fd9\u4e9b\u4f4d\u5143\u79f0\u4e4b\u4e3a\u5171\u4eab\u4f4d\u5143\u3002\u4e0b\u9762\u5171\u4eab\u4f4d\u5143\u4e0e\u591a\u529f\u80fd\u7ec4\u6210\u7684\u5bf9\u5e94\u5173\u7cfb\u4f1a\u662f\u4e0d\u6b63\u786e\u7684\u3002<br /><br />"+
e+"<br />\u9664\u975e\u5b83\u4eec\u90fd\u88ab\u4fee\u6b63\uff0c\u5426\u5219\u5b58\u6863\u4e36\u4ea7\u751f\u7a0b\u5f0f\u7801\u53ca\u5370\u51fa\u62a5\u544a\u8fd9\u4e9b\u64cd\u4f5c\u5c06\u4e0d\u88ab\u5141\u8bb8\u3002";var f="\u786e\u5b9a"}else"Traditional Chinese"===c?(c="\u5171\u4eab\u4f4d\u5143\u932f\u8aa4",d="\u4e00\u4e9b\u66ab\u5b58\u5668\u4f4d\u5143\u53ef\u80fd\u88ab\u8907\u6578\u500b\u591a\u529f\u80fd\u7d66\u8a2d\u7f6e\u3002\u9019\u4e9b\u4f4d\u5143\u7a31\u4e4b\u70ba\u5171\u4eab\u4f4d\u5143\u3002\u4e0b\u9762\u5171\u4eab\u4f4d\u5143\u8207\u591a\u529f\u80fd\u7d44\u6210\u7684\u5c0d\u61c9\u95dc\u4fc2\u6703\u662f\u4e0d\u6b63\u78ba\u7684\u3002<br /><br />"+
e+"<br />\u9664\u975e\u5b83\u5011\u90fd\u88ab\u4fee\u6b63\uff0c\u5426\u5247\u5b58\u6a94\u3001\u7522\u751f\u7a0b\u5f0f\u78bc\u53ca\u5370\u51fa\u5831\u544a\u9019\u4e9b\u64cd\u4f5c\u5c07\u4e0d\u88ab\u5141\u8a31\u3002",f="\u78ba\u5b9a"):(c="Shared Bits Error",d="Some bits of GPIO registers would be configured by multiple multi-functions.These bits are called Shared Bits. The following corresponding relations between shared bits and multi-functions are incorrect.<br /><br />"+e+"<br />Unless they are all fixed, the operations of saving configuration, generating code and printing report will not be permitted.",
f="Confirm");else c="Shared Bits Error",d="Some bits of GPIO registers would be configured by multiple multi-functions.These bits are called Shared Bits. The following corresponding relations between shared bits and multi-functions are incorrect.<br /><br />"+e+"<br />Unless they are all fixed, the operations of saving configuration, generating code and printing report will not be permitted.",f="Confirm";else if("USB_OTG_ID"===b)"undefined"!==typeof c&&-1!==c.indexOf("UIlanguage:")?(c=c.sliceAfterX("UIlanguage:"),
c=c.slicePriorToX("\r"),"Simplified Chinese"===c?(c="\u4e0d\u6b63\u786e\u7684USB\u8bbe\u7f6e",d="\u5f53USB\u5f00\u542f\u65f6\uff0cUSB_OTG_ID\u5fc5\u987b\u88ab\u8bbe\u7f6e\u3002",f="\u786e\u5b9a"):"Traditional Chinese"===c?(c="\u4e0d\u6b63\u78ba\u7684USB\u8a2d\u7f6e",d="\u7576USB\u958b\u555f\u6642\uff0cUSB_OTG_ID\u5fc5\u9808\u88ab\u8a2d\u7f6e\u3002",f="\u78ba\u5b9a"):(c="Incorrect USB Settings",d="USB_OTG_ID must be configured when enabling USB.",f="Confirm")):(c="Incorrect USB Settings",d="USB_OTG_ID must be configured when enabling USB.",
f="Confirm");else return;$("#showPinErrorDialog").dialog("isOpen")&&$("#showPinErrorDialog").dialog("destroy");$('<div id="showPinErrorDialog"><p>'+d+'</p><input type="text" size="1" style="position:relative;top:-5000px;"/></div>').dialog({modal:!1,resizable:!1,title:c,width:500,height:"auto",show:"fade",hide:"fade",close:function(){$("#showPinErrorDialog").dialog("destroy")},buttons:[{text:f,click:function(){$("#showPinErrorDialog").dialog("isOpen")&&$("#showPinErrorDialog").dialog("destroy")}}]});
c=f=d=c=null}function Vc(b,e){var c=$.ajax({url:"NuToolSetup.txt",async:!1}).responseText;if("shareBit"===b)if("undefined"!==typeof c&&-1!==c.indexOf("UIlanguage:"))if(c=c.sliceAfterX("UIlanguage:"),c=c.slicePriorToX("\r"),"Simplified Chinese"===c){c="\u5171\u4eab\u4f4d\u5143\u9519\u8bef";var d="\u4e00\u4e9b\u6682\u5b58\u5668\u4f4d\u5143\u53ef\u80fd\u88ab\u590d\u6570\u4e2a\u591a\u529f\u80fd\u7ed9\u8bbe\u7f6e\u3002\u8fd9\u4e9b\u4f4d\u5143\u79f0\u4e4b\u4e3a\u5171\u4eab\u4f4d\u5143\u3002\u4e0b\u9762\u5171\u4eab\u4f4d\u5143\u4e0e\u591a\u529f\u80fd\u7ec4\u6210\u7684\u5bf9\u5e94\u5173\u7cfb\u4f1a\u662f\u4e0d\u6b63\u786e\u7684\u3002<br /><br />"+
e+"<br />\u82e5\u4f60\u4ecd\u60f3\u8981\u5173\u6389\u5e94\u7528\u7a0b\u5f0f\uff0c\u8bf7\u6309'\u5173\u95ed'\u3002\u4f46\u6240\u6709\u8bbe\u7f6e\u5c06\u4f1a\u56de\u590d\u5230\u521d\u59cb\u503c\u3002\u82e5\u4f60\u60f3\u8981\u4fee\u6b63\u4ed6\u4eec\uff0c\u8bf7\u6309'\u4fee\u6b63'\u3002";var f="\u5173\u95ed";var h="\u4fee\u6b63"}else"Traditional Chinese"===c?(c="\u5171\u4eab\u4f4d\u5143\u932f\u8aa4",d="\u4e00\u4e9b\u66ab\u5b58\u5668\u4f4d\u5143\u53ef\u80fd\u88ab\u8907\u6578\u500b\u591a\u529f\u80fd\u7d66\u8a2d\u7f6e\u3002\u9019\u4e9b\u4f4d\u5143\u7a31\u4e4b\u70ba\u5171\u4eab\u4f4d\u5143\u3002\u4e0b\u9762\u5171\u4eab\u4f4d\u5143\u8207\u591a\u529f\u80fd\u7d44\u6210\u7684\u5c0d\u61c9\u95dc\u4fc2\u6703\u662f\u4e0d\u6b63\u78ba\u7684\u3002<br /><br />"+
e+"<br />\u82e5\u4f60\u4ecd\u60f3\u8981\u95dc\u6389\u61c9\u7528\u7a0b\u5f0f\uff0c\u8acb\u6309'\u95dc\u9589'\u3002\u4f46\u6240\u6709\u8a2d\u7f6e\u5c07\u6703\u56de\u5fa9\u5230\u521d\u59cb\u503c\u3002\u82e5\u4f60\u60f3\u8981\u4fee\u6b63\u4ed6\u5011\uff0c\u8acb\u6309'\u4fee\u6b63'\u3002",f="\u95dc\u9589",h="\u4fee\u6b63"):(c="Shared Bit Error",d="Some bits of GPIO registers would be configured by multiple multi-functions.These bits are called Shared Bits. The following corresponding relations between shared bits and multi-functions are incorrect.<br /><br />"+
e+"<br />If you still want to close the application, please press Close. But all the configuration will be restored to the default.If you want to fix them, please press Fix.",f="Close",h="Fix");else c="Shared Bit Error",d="Some bits of GPIO registers would be configured by multiple multi-functions.These bits are called Shared Bits. The following corresponding relations between shared bits and multi-functions are incorrect.<br /><br />"+e+"<br />If you still want to close the application, please press Close. But all the configuration will be restored to the default.If you want to fix them, please press Fix.",
f="Close",h="Fix";else if("USB_OTG_ID"===b)"undefined"!==typeof c&&-1!==c.indexOf("UIlanguage:")?(c=c.sliceAfterX("UIlanguage:"),c=c.slicePriorToX("\r"),"Simplified Chinese"===c?(c="\u4e0d\u6b63\u786e\u7684USB\u8bbe\u7f6e",d="\u5f53USB\u5f00\u542f\u65f6\uff0cUSB_OTG_ID\u5fc5\u987b\u88ab\u8bbe\u7f6e\u3002",f="\u5173\u95ed",h="\u4fee\u6b63"):"Traditional Chinese"===c?(c="\u4e0d\u6b63\u78ba\u7684USB\u8a2d\u7f6e",d="\u7576USB\u958b\u555f\u6642\uff0cUSB_OTG_ID\u5fc5\u9808\u88ab\u8a2d\u7f6e\u3002",f="\u95dc\u9589",
h="\u4fee\u6b63"):(c="Incorrect USB Settings",d="USB_OTG_ID must be configured when enabling USB.",f="Close",h="Fix")):(c="Incorrect USB Settings",d="USB_OTG_ID must be configured when enabling USB.",f="Close",h="Fix");else return;$("#showPinErrorDialog").dialog("isOpen")&&$("#showPinErrorDialog").dialog("destroy");$('<div id="showPinErrorDialog"><p>'+d+'</p><input type="text" size="1" style="position:relative;top:-5000px;"/></div>').dialog({modal:!1,resizable:!1,title:c,width:500,height:"auto",show:"fade",
hide:"fade",close:function(){$("#showPinErrorDialog").dialog("destroy")},buttons:[{text:f,click:function(){$("#showPinErrorDialog").dialog("isOpen")&&$("#showPinErrorDialog").dialog("destroy");nc();uc();window.external.closeFromJS()}},{text:h,click:function(){$("#showPinErrorDialog").dialog("isOpen")&&$("#showPinErrorDialog").dialog("destroy")}}]});c=f=d=c=null}function Hb(b){var e,c=!0,d=[];if($("#rootTree_Pin").is(":visible")){d=wa(K);var f=0;for(e=d.length;f<e;f+=1)if(Ub[d[f]]!==K[d[f]]){c=!1;
break}c?b():(ib(),"Simplified Chinese"===pa?(f="\u8b66\u544a",e="\u914d\u7f6e\u6863\u5df2\u88ab\u4fee\u6539\u8fc7\u3002\u8bf7\u95ee\u4f60\u8981\u50a8\u5b58\u5b83\u5417?",c="\u8981",d="\u4e0d\u8981"):"Traditional Chinese"===pa?(f="\u8b66\u544a",e="\u914d\u7f6e\u6a94\u5df2\u88ab\u4fee\u6539\u904e\u3002\u8acb\u554f\u4f60\u8981\u5132\u5b58\u5b83\u55ce?",c="\u8981",d="\u4e0d\u8981"):(f="Warning",e="The configuration has been modified.<br />Would you like to save it?",c="Yes",d="No"),Ra(),$('<div id="warningForSavingDialog"><p>'+
e+'</p><input type="text" size="1" style="position:relative;top:-5000px;"/></div>').dialog({modal:!0,draggable:!1,resizable:!1,title:f,width:500,height:"auto",show:"fade",hide:"fade",close:function(){$("#warningForSavingDialog").dialog("destroy")},buttons:[{text:c,click:function(){if(zb(Eb))try{external.saveConfigFromJS("NUC_BROWSE_PROJECT_PATH")}catch(h){}b();$("#warningForSavingDialog").dialog("isOpen")&&$("#warningForSavingDialog").dialog("destroy")}},{text:d,click:function(){b();Pb();$("#warningForSavingDialog").dialog("isOpen")&&
$("#warningForSavingDialog").dialog("destroy")}}]}),d=c=e=f=null);c=null;d=[]}}function Pc(b){var e="";var c=$.ajax({url:"NuToolSetup.txt",async:!1}).responseText;if("undefined"!==typeof c&&-1!==c.indexOf("UIlanguage:"))if(c=c.sliceAfterX("UIlanguage:"),c=c.slicePriorToX("\r"),"Simplified Chinese"===c){c="\u51b2\u7a81\u7684\u8c03\u6574";var d="\u4e00\u4e9b\u6a21\u7ec4\u5df2\u88ab\u8c03\u6574\uff0c\u5176\u5b83\u65e0\u6cd5\u8c03\u6574\u7684\u5df2\u88ab\u79fb\u9664\u3002\u5217\u8868\u5982\u4e0b:<hr>";
var f="\u7b2c";var h="\u811a\u4f4d";var k="\u4ece";var a="\u5df2\u79fb\u9664";var g="\u590d\u539f";var l="\u786e\u5b9a"}else"Traditional Chinese"===c?(c="\u885d\u7a81\u7684\u8abf\u6574",d="\u4e00\u4e9b\u6a21\u7d44\u5df2\u88ab\u8abf\u6574\uff0c\u5176\u5b83\u7121\u6cd5\u8abf\u6574\u7684\u5df2\u88ab\u79fb\u9664\u3002\u5217\u8868\u5982\u4e0b:<hr>",f="\u7b2c",h="\u8173\u4f4d",k="\u5f9e",a="\u5df2\u79fb\u9664",g="\u5fa9\u539f",l="\u78ba\u5b9a"):(c="Adjustment of the Conflict",d="Some modules have been adjusted. The others unable to adjust have been removed. Here is the list:<hr>",
f=" Pin",h="",k="from",a=" has been removed",g="Undo",l="Confirm");else c="Adjustment of the Conflict",d="Some modules have been adjusted. The others unable to adjust have been removed. Here is the list:<hr>",f=" Pin",h="",k="from",g="Undo",l="Confirm";for(;-1!==b.indexOf(";");)e=b.sliceAfterX("/").slicePriorToX(";"),-1!==b.slicePriorToX(";").indexOf("removed")?(e="",b.slicePriorToX(":")!==D[parseInt(b.sliceAfterX(":").slicePriorToX("/"),10)-1]&&(d+="<b><big>"+b.slicePriorToX(":")+":"+f+Z(b.sliceAfterX(":").slicePriorToX("/"))+
h+a+"</big></b><br />",d+=D[parseInt(b.sliceAfterX(":").slicePriorToX("/"),10)-1]+":"+f+Z(b.sliceAfterX(":").slicePriorToX("/"))+h+"<hr>")):-1!==b.slicePriorToX(";").indexOf("end")?(e="",d+=b.slicePriorToX(":")+":"+f+Z(b.sliceAfterX(":").slicePriorToX("/"))+h+"<hr>"):d+=b.slicePriorToX(":")+":"+f+Z(b.sliceAfterX(":").slicePriorToX("/"))+h+"("+k+f+Z(b.sliceAfterX("/").slicePriorToX(";"))+h+")<br />",b=b.sliceAfterX(";");""!==e&&(d+=D[parseInt(e,10)-1]+":"+f+Z(e)+h+"<hr>");Ra();$('<div id="adjustedModulesDialog"><p>'+
d+'</p><input type="text" size="1" style="position:relative;top:-5000px;"/></div>').dialog({modal:!1,resizable:!1,title:c,width:500,height:400,show:"fade",hide:"fade",close:function(){$("#adjustedModulesDialog").dialog("destroy")},buttons:[{text:g,click:function(){var q,t=wa(K);ub=!0;za=[];var x=0;for(q=t.length;x<q;x+=1)za[t[x]]=Gb[t[x]];ya=[];x=0;for(q=Cb.length;x<q;x+=1)ya[x]=Cb[x];va=[];K=[];Oa=[];D=[];Vb();hb();sa.removeContext($("#NUC_PinConfiguration_Canvas"));sa.removeContext($("#NUC_PinConfiguration_Canvas_Lining"));
$("#mfpTree").jstree("destroy");$("#supportedModules").jstree("destroy");$("#moduleTree").jstree("destroy");$("#mfpTree").remove();$("#supportedModules").remove();$("#moduleTree").remove();$("div").remove(".tooltip");gc();0===$("#NUC_PinConfiguration_Canvas").length&&$("#panel")[0].appendChild(Ua("canvas","NUC_PinConfiguration_Canvas"));jc();Yb();Lb();qb();fc();$("#adjustedModulesDialog").dialog("isOpen")&&$("#adjustedModulesDialog").dialog("destroy")}},{text:l,click:function(){$("#adjustedModulesDialog").dialog("isOpen")&&
$("#adjustedModulesDialog").dialog("destroy")}}]});c=l=a=k=h=f=e=d=c=null}function Pb(){var b;var e=wa(K);Ub=[];var c=0;for(b=e.length;c<b;c+=1)Ub[e[c]]=K[e[c]]}function Jc(){Ib?ab.readyState?ab.send("q"):La("\u8fde\u7ebf\u5c1a\u672a\u7a33\u5b9a\uff0c\u8bf7\u7a0d\u540e\u518d\u8bd5\u3002","\u9023\u7dda\u5c1a\u672a\u7a69\u5b9a\uff0c\u8acb\u7a0d\u5f8c\u518d\u8a66\u3002","The connection is not stable. Please try it later."):(ab=new WebSocket("ws://127.0.0.1:5555","openocd-nuvoton-protocol"),ab.onopen=
function(){Ib=!0;ab.readyState?ab.send("q"):La("\u8fde\u7ebf\u5c1a\u672a\u7a33\u5b9a\uff0c\u8bf7\u7a0d\u540e\u518d\u8bd5\u3002","\u9023\u7dda\u5c1a\u672a\u7a69\u5b9a\uff0c\u8acb\u7a0d\u5f8c\u518d\u8a66\u3002","The connection is not stable. Please try it later.")},ab.onerror=function(){!1===Ib?La("\u8bf7\u68c0\u67e5NuEclipse\u662f\u5426\u8fdb\u5165\u4e86\u8c03\u8bd5\u6a21\u5f0f\u3002\u5982\u679c\u6ca1\u6709\uff0cPinConfig\u5c06\u65e0\u6cd5\u8fde\u63a5\u5230\u76ee\u6807\u82af\u7247\u3002","\u8acb\u6aa2\u67e5NuEclipse\u662f\u5426\u9032\u5165\u4e86\u8abf\u8a66\u6a21\u5f0f\u3002\u5982\u679c\u6c92\u6709\uff0cPinConfig\u5c07\u7121\u6cd5\u9023\u63a5\u5230\u76ee\u6a19\u6676\u7247\u3002",
"Please check that NuEclipse has entered the debug mode. If not, PinConfig will not be able to connect to a target chip."):La("NuEclipse\u9000\u51fa\u4e86\u8c03\u8bd5\u6a21\u5f0f\u3002","NuEclipse\u9000\u51fa\u4e86\u8abf\u8a66\u6a21\u5f0f\u3002","NuEclipse leaved the debug mode.");Ib=!1;ab=null},ab.onmessage=function(b){if(0===b.data.indexOf("q")){b=b.data;var e;b=b.slice(1);if("UNKNOWN"!==b.toUpperCase()){var c=Sb(b);c!==m&&(oldfilename="NUC_"+m+"_Content.js",newfilename="NUC_"+c+"_Content.js",eb(oldfilename,
newfilename,"js"),$("#ChipTypeSelect").val(c),m=c);$a=null;c=0;for(e=NUTOOL_PIN.g_cfg_chips.length;c<e;c+=1)b===NUTOOL_PIN.g_cfg_chips[c].name&&($a=NUTOOL_PIN.g_cfg_chips[c].name+"("+NUTOOL_PIN.g_cfg_chips[c].pkg+")");null!==$a&&$a!==F&&(Qb(),kc(),F=$a,NUTOOL_PIN.decidepackageNumber(),cc(),ub=!1,za=[],ya=[],fa=null,lc(),M=100,kb(),qb(),Ra())}b=ab;c=b.send;var d,f="m";var h=wa(NUTOOL_PIN.g_cfg_regDescriptions);e=0;for(d=h.length;e<d;e+=1)0!==e&&(f+=","),f+=NUTOOL_PIN.g_cfg_regDescriptions[h[e]].slice(2);
c.call(b,f+",")}else if(0===b.data.indexOf("m")&&(b=b.data,b=b.slice(1),e=b.split(","),f=wa(NUTOOL_PIN.g_cfg_regDescriptions),e.length===f.length)){b=0;for(c=f.length;b<c;b+=1){d=f[b];h=K[d];var k=parseInt(e[b],16);h!==k&&(Dc(d+":0x"+Za(h).toUpperCase()),db(d+":0x"+Za(k).toUpperCase()))}Xa()}})}function Bc(){$("#rootTree_Pin").is(":visible")&&(M=10*Math.ceil(M/10)+5,kb())}function Cc(){$("#rootTree_Pin").is(":visible")&&M>=wb+5&&(M=10*Math.floor(M/10)-5,kb())}function Kc(){if("undefined"===typeof NUTOOL_PER){if("undefined"!==
typeof NUTOOL_PIN.g_toolName&&""!==NUTOOL_PIN.g_toolName)try{external.changeDialogContentFromJS("dialogCaption:"+NUTOOL_PIN.g_toolName)}catch(b){}if("undefined"!==typeof NUTOOL_PIN.g_toolbarRemovedIndices&&""!==NUTOOL_PIN.g_toolbarRemovedIndices)try{external.changeDialogContentFromJS("dialogToolbarRemovedIndices:"+NUTOOL_PIN.g_toolbarRemovedIndices.replace(/\s/g,""))}catch(b){}"undefined"!==typeof NUTOOL_PIN.g_cfg_chipSeries&&0!==NUTOOL_PIN.g_cfg_chipSeries.length&&(yb=NUTOOL_PIN.g_cfg_chipSeries);
"undefined"!==typeof NUTOOL_PIN.g_chipSilkScreenPrint_default&&""!==NUTOOL_PIN.g_chipSilkScreenPrint_default&&(Ma=NUTOOL_PIN.g_chipSilkScreenPrint_default);"undefined"!==typeof NUTOOL_PIN.g_briefName_default&&""!==NUTOOL_PIN.g_briefName_default&&(Lc=NUTOOL_PIN.g_briefName_default);"undefined"!==typeof NUTOOL_PIN.g_copyrightCompanyName_default&&""!==NUTOOL_PIN.g_copyrightCompanyName_default&&(Mc=NUTOOL_PIN.g_copyrightCompanyName_default)}if(!yc()){zc();Ac();xc()||(ub=!1);gc();if("undefined"===typeof NUTOOL_PER)try{window.external.updateCurrentDialogSize()}catch(b){Fb=
!1}Fc();dc();"undefined"===typeof NUTOOL_PER&&Uc();$("#rootTree_Pin")[0].setAttribute("style","width:275px; height: "+Ha+"px;");jc();Yb();Qb();Lb();fc();qb();wc()}}var Ea,T=0,I=0,ba=0,xa=0,cb=0,Ka=0,ec=0,Ja=0,ha=0,la=24,Mb,Ta=0,gb=0,Sa=0,Na=0,Wa=0,Ha=0,A=0,Q=0,V=0,$a,sa={getContext:null,removeContext:null,addEvent:null},pa="",xb="",Bb,m,F,Ma="Nuvoton",Lc="NuMicro",Mc=" Nuvoton Technology Corp.",fa,ab=null,ic,ea,rb,fb,Ab,Jb,Kb,oc,pc,qc,rc,U,Rb,M=100,bc=100,wb,W=[],nb=[],oa=[],ia=[],va=[],Oa=[],D=[],
ya=[],Cb=[],Ga=[],Va=[],za=[],K=[],Ub=[],Gb=[],B=[],Ca=[],mb=[],Aa=[],yb="NUC400 NUC505 M451 M460 M471 M479 M480 KM1M7 M2351 M251 M261 MA35D1 NUC100 NUC200 NUC029 NDA102 M0A21 M030G M031 M051 M071 M0518 M0519 M0564 MINI51 NANO100 ML51 MS51 NM1120 NM1200 NM1500 ISD9100 ISD9300".split(" "),Rc=["M460","MA35D1"],Da=!1,Ib=!1,Fb=!0,ub=!0,tb=!0;window.onload=function(){Kc()};NUTOOL_PIN={getg_userSelectUIlanguage:function(){return pa},getg_partNumber_package:function(){return F},getg_pin_descriptions:function(){return Kb},
getg_gpio_MFPsString:function(){return ea},getg_gpio_MFPsString1:function(){return rb},getg_pinCurrentStateString:function(){return Ab},getg_pinsConfiguredByGPIOstring:function(){return Jb},getg_includeHeadFileString:function(){return ic},getg_generatedCodeByPinString:function(){return oc},getg_generatedCodeByModuleString:function(){return pc},getg_generatedCodeByGPIOstring:function(){return qc},getg_generatedMFPFunctionList:function(){return rc},getg_toolName:function(){return NUTOOL_PIN.g_toolName},
getg_anotherNameForNuCAD:function(){return NUTOOL_PIN.g_anotherNameForNuCAD},getg_briefName:function(){return Lc},getg_copyrightCompanyName:function(){return Mc},setg_selectedPartNoValue:function(b){$a=b},loadPinConfigureTool:Kc,loadPinConfigureTool_fromSelectionGuide:function(){yc()||(ib(),zc(),Ac(),$("#rootTree_Pin")[0].setAttribute("style","width:275px; height: "+Ha+"px;"),Hc(),qb(),wc())},getGeneratedCodeByPin:function(){var b;oc="";for(b=1;b<=T;b+=1)""!==D[b-1]&&(oc+="Pin"+Z(b)+":"+D[b-1]+"\n")},
getGeneratedCodeByModule:function(){var b,e,c=[];for(b=1;b<=T;b+=1)if(""!==D[b-1]){var d=b;var f=e=D[b-1];-1!==f.indexOf("_")&&(f=f.slicePriorToX("_"));f=z(f);"undefined"===typeof c[f]?(c[f]=[],c[f][0]=e+"(Pin:"+Z(d)+")"):c[f].push(e+"(Pin:"+Z(d)+")")}pc="";var h=wa(c);b=0;for(d=h.length;b<d;b+=1)for(c[h[b]].sort(Qa),e=0,f=c[h[b]].length;e<f;e+=1)pc+=c[h[b]][e]+"\n"},getGeneratedCodeByGPIO:function(){var b,e=[];for(b=1;b<=T;b+=1)if(""!==D[b-1]){var c=b;var d=D[b-1];var f=z(NUTOOL_PIN.g_cfg_pkgs[NUTOOL_PIN.g_packageNumberIndex][c-
1]);"undefined"===typeof e[f]?(e[f]=[],e[f][0]=NUTOOL_PIN.g_cfg_pkgs[NUTOOL_PIN.g_packageNumberIndex][c-1]+":"+d+"(Pin:"+Z(c)+")"):e[f].push(NUTOOL_PIN.g_cfg_pkgs[NUTOOL_PIN.g_packageNumberIndex][c-1]+":"+d+"(Pin:"+Z(c)+")")}qc="";var h=wa(e).sort(Qa);b=0;for(c=h.length;b<c;b+=1)for(e[h[b]].sort(Qa),d=0,f=e[h[b]].length;d<f;d+=1)qc+=e[h[b]][d]+"\n"},getGeneratedMFPFunctionList:function(){var b,e;rc="/";var c=0;for(b=NUTOOL_PIN.g_cfg_gpios.length;c<b;c+=1){var d=0;for(e=NUTOOL_PIN.g_cfg_gpios[c].f.length;d<
e;d+=1)rc+=NUTOOL_PIN.g_cfg_gpios[c].f[d]+"/"}},getDataUsedToCreateText:function(){var b,e,c,d=[],f=[],h="SYS->";Ec();ea="";0!==NUTOOL_PIN.g_cfg_gpiosDefines.length&&1<NUTOOL_PIN.g_cfg_gpiosDefines[0].f.length&&0===NUTOOL_PIN.g_cfg_gpiosDefines[0].f[1].indexOf("GPIO:GPIO_")&&(h="");var k=wa(K);k.sort();if(0!==NUTOOL_PIN.g_cfg_gpiosDefines.length){if(-1===ic.indexOf(".dtsi")){var a=0;for(e=k.length;a<e;a+=1)za[k[a]]=K[k[a]],f[k[a]]=[]}for(a=1;a<=T;a+=1)if(""!==D[a-1]){e=a;var g=D[a-1];var l=z(NUTOOL_PIN.g_cfg_pkgs[NUTOOL_PIN.g_packageNumberIndex][e-
1]);"undefined"===typeof d[l]?(d[l]=[],d[l][0]=NUTOOL_PIN.g_cfg_pkgs[NUTOOL_PIN.g_packageNumberIndex][e-1]+":"+g):d[l].push(NUTOOL_PIN.g_cfg_pkgs[NUTOOL_PIN.g_packageNumberIndex][e-1]+":"+g)}var q=wa(d).sort(Qa);a=0;for(e=q.length;a<e;a+=1)for(d[q[a]].sort(Qa),g=0,l=d[q[a]].length;g<l;g+=1){var t=b=d[q[a]][g];b=b.slicePriorToX(":");t=t.sliceAfterX(":");t===b&&(t="GPIO");var x=0;for(c=NUTOOL_PIN.g_cfg_gpiosDefines.length;x<c;x+=1)if(b===NUTOOL_PIN.g_cfg_gpiosDefines[x].f[0]){b=1;for(c=NUTOOL_PIN.g_cfg_gpiosDefines[x].f.length;b<
c;b+=1)if(0===NUTOOL_PIN.g_cfg_gpiosDefines[x].f[b].indexOf(t+":")){var u=NUTOOL_PIN.g_cfg_gpiosDefines[x].f[b];do{if(-1===u.indexOf("/")){var p=u;u=""}else p=u.slicePriorToX("/"),u=u.sliceAfterX("/");b=p;p=p.sliceAfterX("@");b=-1===b.indexOf(":")?b.slicePriorToX("@"):b.slice(b.indexOf(":")+1,b.indexOf("@"));";"===p.slice(-1)&&(p=p.slice(0,-1));t=p.split(";");x=0;for(c=t.length;x<c;x+=1)p=t[x].trim(),"undefined"===typeof f[p]&&(f[p]=[]),f[p].push(b)}while(""!==u);break}break}}if(0===m.indexOf("ML5")){a=
0;for(e=k.length;a<e;a+=1)ea+="    //"+h+k[a]+" = 0x"+Za(K[k[a]]).toUpperCase()+"UL;\n";ea+="\n";"undefined"===typeof NUTOOL_PER&&(ea+="    /* If the macros do not exist in your project, please refer to the corresponding header file in Header folder of the tool package */\n");a=0;for(e=k.length;a<e;a+=1)if(0<f[k[a]].length)for(g=f[k[a]].length-1;0<=g;--g)ea+="    "+f[k[a]][g]+";\n"}else if(0===m.indexOf("MS51")){a=0;for(e=k.length;a<e;a+=1)ea+="    //"+h+k[a]+" = 0x"+Za(K[k[a]]).toUpperCase()+"UL;\n";
ea+="\n";"undefined"===typeof NUTOOL_PER&&(ea+="    /* If the macros do not exist in your project, please refer to the corresponding header file in Header folder of the tool package */\n");a=0;for(e=k.length;a<e;a+=1)if(0<f[k[a]].length)for(g=0,l=f[k[a]].length;g<l;g+=1)for(t=f[k[a]][g].split(";"),x=0,c=t.length;x<c;x+=1)""!==t[x]&&"NULL"!==t[x].toString().toUpperCase()&&(ea+="    "+t[x]+";\n")}else if(0===m.indexOf("MA35")){ea+='/ {\n    model = "Nuvoton '+m+'";\n};\n\n';k=wa(f);k.sort();a=0;for(e=
k.length;a<e;a+=1)t=k[a].toLowerCase(),ea+="&"+t+' {\n    pinctrl-names = "default";\n    pinctrl-0 = <&pinctrl_'+t+">;\n};\n\n";ea+="&pinctrl {\n";a=0;for(e=k.length;a<e;a+=1){g=b=0;for(l=f[k[a]].length;g<l;g+=1)f[k[a]][g].length>b&&(b=f[k[a]][g].length);b+=1;t=k[a].toLowerCase();ea+="    "+t+" {\n        pinctrl_"+t+": "+t+"grp {\n            nuvoton,pins =\n";g=0;for(l=f[k[a]].length;g<l;g+=1){ea+="                <"+f[k[a]][g];x=0;for(c=b-f[k[a]][g].length;x<c;x+=1)ea+=" ";ea+="&pcfg_default>";
ea=g!==l-1?ea+",\n":ea+";\n"}ea=a!==e-1?ea+"        };\n    };\n\n":ea+"        };\n    };\n"}ea+="};\n\n"}else{a=0;for(e=k.length;a<e;a+=1)ea+="    //"+h+k[a]+" = 0x"+Za(K[k[a]]).toUpperCase()+"UL;\n";ea+="\n";"undefined"===typeof NUTOOL_PER&&(ea+="    /* If the macros do not exist in your project, please refer to the corresponding header file in Header folder of the tool package */\n");a=0;for(e=k.length;a<e;a+=1)if(0<f[k[a]].length)for(ea+="    "+h+k[a]+" = ",g=f[k[a]].length-1;0<=g;--g)ea=0!==
g?ea+(f[k[a]][g]+" | "):ea+(f[k[a]][g]+";\n");else ea+="    "+h+k[a]+" = 0x00000000;\n"}}else{a=0;for(e=k.length;a<e;a+=1)ea+="    "+h+k[a]+" = 0x"+Za(K[k[a]]).toUpperCase()+"UL;\n";$("#NUC_PinConfiguration_Canvas")[0].setAttribute("innerHTML","")}Ab="";for(a=1;a<=T;a+=1)""!==D[a-1]?Ab+="Pin"+Z(a)+":"+D[a-1]+"\n":(g=ia[a-1].slice(ia[a-1].indexOf(Oa[a-1])),g=g.slicePriorToX("/"),Ab+="Pin"+Z(a)+":"+g+"\n");Jb="";a=0;for(e=ya.length;a<e;a+=1)Jb+="GPIOpin:"+ya[a]+"\n"},getModularizedDataUsedToCreateText:function(){var b,
e,c,d=[],f=[],h=[];var k="";var a=[],g=[],l,q="SYS->",t;var x=function(y,w,E){t=!1;if(-1!==y.indexOf("_"+w)||-1!==y.indexOf(w+":")||0===y.indexOf(w+"_")||-1!==y.indexOf(","+w+"_")||-1!==y.lastIndexOf(w)&&y.lastIndexOf(w)+w.length===y.length||"GPIO"===w&&-1!==y.indexOf("_MFP_G"+E))t=!0;"GPIO"===w&&-1===y.indexOf("SYS_G"+E)&&-1===y.indexOf("SYS_MFP_"+E)&&-1===y.indexOf("SYS_"+E)&&-1===y.indexOf("MD_"+E)&&(t=!1);return t};var u=function(y){return l=0===y.indexOf("SYS_MFP")?y.substring(0,11)+"_Msk":0===
y.indexOf("SYS_GP")&&-1!==y.indexOf("_MFP_")?-1===y.indexOf("_MFPL_")&&-1===y.indexOf("_MFPH_")?y.substring(0,15)+"_Msk":y.slicePriorToX("MFP_")+"MFP_Msk":-1===y.indexOf("SYS_GP")&&y.indexOf("_MFP_")!==y.lastIndexOf("_MFP_")?y.substring(0,y.lastIndexOf("_MFP_")+5)+"Msk":0===y.indexOf("GPIO_IO")?y.substring(0,y.lastIndexOf("MD_")+3)+"Msk":y.slicePriorToX("MFP_")+"MFP_Msk"};0!==NUTOOL_PIN.g_cfg_gpiosDefines.length&&1<NUTOOL_PIN.g_cfg_gpiosDefines[0].f.length&&0===NUTOOL_PIN.g_cfg_gpiosDefines[0].f[1].indexOf("GPIO:GPIO_")&&
(q="");Ec();d=wa(K);d.sort();var p=0;for(e=d.length;p<e;p+=1)za[d[p]]=K[d[p]],g[d[p]]=[];for(p=1;p<=T;p+=1)if(""!==D[p-1]){e=p;var v=D[p-1];var n=z(NUTOOL_PIN.g_cfg_pkgs[NUTOOL_PIN.g_packageNumberIndex][e-1]);"undefined"===typeof f[n]?(f[n]=[],f[n][0]=NUTOOL_PIN.g_cfg_pkgs[NUTOOL_PIN.g_packageNumberIndex][e-1]+":"+v):f[n].push(NUTOOL_PIN.g_cfg_pkgs[NUTOOL_PIN.g_packageNumberIndex][e-1]+":"+v)}a=wa(f).sort(Qa);p=0;for(e=a.length;p<e;p+=1)for(f[a[p]].sort(Qa),v=0,k=f[a[p]].length;v<k;v+=1){var r=c=
f[a[p]][v];c=c.slicePriorToX(":");r=r.sliceAfterX(":");n=z(r.slicePriorToX("_")).toString();-1===h.indexOf(n)&&h.push(n);r===c&&(r="GPIO");n=0;for(b=NUTOOL_PIN.g_cfg_gpiosDefines.length;n<b;n+=1)if(c===NUTOOL_PIN.g_cfg_gpiosDefines[n].f[0]){b=1;for(c=NUTOOL_PIN.g_cfg_gpiosDefines[n].f.length;b<c;b+=1)if(0===NUTOOL_PIN.g_cfg_gpiosDefines[n].f[b].indexOf(r+":")){b=NUTOOL_PIN.g_cfg_gpiosDefines[n].f[b];do-1===b.indexOf("/")?(n=b,b=""):(n=b.slicePriorToX("/"),b=b.sliceAfterX("/")),c=n,n=n.sliceAfterX("@"),
-1!==c.indexOf(":")&&(r=c.slicePriorToX(":")),c=c.slicePriorToX("@"),"undefined"!==typeof g[n]&&g[n].push(c);while(""!==b);break}break}}h.sort(Qa);fb=ea="";n=0;for(b=h.length;n<b;n+=1){k=ta(h[n]+".0")?"GPIO":h[n];f="void NuCodeGenProj_init_"+h[n].toLowerCase()+"(void)\n{\n";a=!1;p=0;for(e=d.length;p<e;p+=1)if(0<g[d[p]].length&&x(g[d[p]].join(),k,h[n])){r=!1;a=!0;f+="    "+q+d[p]+" &= ~(";fb+="    "+q+d[p]+" &= ~(";for(v=g[d[p]].length-1;0<=v;--v)x(g[d[p]][v],k,h[n])&&(r&&(f+=" | ",fb+=" | "),c=g[d[p]][v].sliceAfterX(":"),
f+=u(c),fb+=u(c),r=!0);f+=");\n";fb+=");<br />";r=!1;f+="    "+q+d[p]+" |= (";fb+="    "+q+d[p]+" |= (";for(v=g[d[p]].length-1;0<=v;--v)x(g[d[p]][v],k,h[n])&&(r&&(f+=" | ",fb+=" | "),c=g[d[p]][v].sliceAfterX(":"),f+=c,fb+=c,r=!0);f+=");\n";fb+=");<br />"}f+="\n    return;\n}\n\n";a?ea+=f:fb+=h[n]+" did not generate modularized code!!<br />";f="void NuCodeGenProj_deinit_"+h[n].toLowerCase()+"(void)\n{\n";a=!1;p=0;for(e=d.length;p<e;p+=1)if(0<g[d[p]].length&&x(g[d[p]].join(),k,h[n])){r=!1;a=!0;f+="    "+
q+d[p]+" &= ~(";for(v=g[d[p]].length-1;0<=v;--v)x(g[d[p]][v],k,h[n])&&(r&&(f+=" | "),c=g[d[p]][v].sliceAfterX(":"),f+=u(c),r=!0);f+=");\n"}f+="\n    return;\n}\n\n";a&&(ea+=f)}ea="undefined"===typeof NUTOOL_PER?ea+"void NuCodeGenProj_init(void)\n{\n":ea+"void Pin_Init(void)\n{\n";p=0;for(e=d.length;p<e;p+=1)ea+="    //"+q+d[p]+" = 0x"+Za(K[d[p]]).toUpperCase()+"UL;\n";ea+="\n";p=0;for(e=h.length;p<e;p+=1)ea+="    NuCodeGenProj_init_"+h[p].toLowerCase()+"();\n";ea+="\n    return;\n}\n\n";ea="undefined"===
typeof NUTOOL_PER?ea+"void NuCodeGenProj_deinit(void)\n{\n":ea+"void Pin_Deinit(void)\n{\n";p=0;for(e=h.length;p<e;p+=1)ea+="    NuCodeGenProj_deinit_"+h[p].toLowerCase()+"();\n";ea+="\n    return;\n}";rb="";p=0;for(e=h.length;p<e;p+=1)rb+="void NuCodeGenProj_init_"+h[p].toLowerCase()+"(void);\n",rb+="void NuCodeGenProj_deinit_"+h[p].toLowerCase()+"(void);\n";"undefined"===typeof NUTOOL_PER?(rb+="void NuCodeGenProj_init(void);\n",rb+="void NuCodeGenProj_deinit(void);\n"):(rb+="void Pin_Init(void);\n",
rb+="void Pin_Deinit(void);\n");gpio_MFPsDefine=g=a=h=f=d=null},retrieveGenerateCodeContent:function(){return fb},decideNewChipType:Sb,updatePinName:Z,closeAPP:function(){null!==ab&&ab.close();zb(Vc)&&Hb(function(){window.external.closeFromJS()})},redrawForResizingDialog:function(){var b=$.ajax({url:"NuToolSetup.txt",async:!1}).responseText;"undefined"!==typeof b&&-1!==b.indexOf("DialogSize:")?(b=b.sliceAfterX("DialogSize:X_"),Sa=parseInt(b.slicePriorToX("Y_"),10),Na=parseInt(b.slice(b.indexOf("Y_")+
2,b.indexOf("\r")),10),792>Sa&&(Sa=792),590>Na&&(Na=590)):(Sa=Ta,Na=gb);Ha=Na-10;Wa=18*wa(K).length+20>Ha/3?Ha/3:18*wa(K).length+20;$("#panel").width(Sa-275-8);$("#panel").height(Na-8);"none"===$("#mfpTree").css("display")?$("#moduleTree").height(Ha-$("#supportedModules").height()):($("#mfpTree").height(Wa),$("#moduleTree").height(Ha-$("#ChipType").height()-$("#MCU").height()-Wa-6-$("#supportedModules").height()));M=100;kb();qb()},triggerSearch:function(){Ob($("#searchInput_Pin").val())},showRegisters:function(){$("#rootTree_Pin").is(":visible")&&
("undefined"===typeof NUTOOL_PER?"none"===$("#mfpTree").css("display")?($("#ChipType").show(),$("#MCU").show(),$("#mfpTree").show(),$("#mfpTree").height(Wa),$("#moduleTree").height(Ha-$("#ChipType").height()-$("#MCU").height()-Wa-6-$("#supportedModules").height())):($("#ChipType").hide(),$("#MCU").hide(),$("#mfpTree").hide(),$("#moduleTree").height(Ha-$("#supportedModules").height())):"none"===$("#mfpTree").css("display")?($("#mfpTree").show(),$("#mfpTree").height(Wa),$("#moduleTree").height(Ha-$("#ChipType").height()-
$("#MCU").height()-Wa-6-$("#supportedModules").height())):($("#mfpTree").hide(),$("#moduleTree").height(Ha-$("#supportedModules").height())))},loadConfig:function(){$("#rootTree_Pin").is(":visible")&&Hb(function(){window.external.loadConfigFromJS()})},loadConfig_core:function(){try{tb=!0,xc()||(La("\u914d\u7f6e\u6863\u4e0d\u6b63\u786e\u3002","\u914d\u7f6e\u6a94\u4e0d\u6b63\u78ba\u3002","The config file is incorrect."),ub=!1),Qb(),kc(),lc(),Xa(),M=100,kb(),qb(),$("#MCUselect").val(F),$a=F,Ra(),tb=
!1}catch(b){}},saveConfig:function(){if(zb(Eb))try{external.saveConfigFromJS("NUC_BROWSE_PROJECT_PATH")}catch(b){}},generateCode:function(){var b,e,c="checked=true",d="",f=b="",h=[];var k=$.ajax({url:"NuToolSetup.txt",async:!1}).responseText;var a="",g="",l="",q="",t=q="";h="";var x=function(E,J){var L,Y='*?"<>|'.split(""),aa=!0;var ka=0;for(L=Y.length;ka<L;ka+=1){var O=Y[ka];if(-1!==J.indexOf(Y[ka])){La("\u5de5\u7a0b\u8def\u5f84\u4e0d\u5e94\u8be5\u5305\u542b"+O+"\u3002\u8bf7\u4fee\u6b63\u5b83\u3002",
"\u5c08\u6848\u8def\u5f91\u4e0d\u61c9\u8a72\u5305\u542b"+O+"\u3002\u8acb\u4fee\u6b63\u5b83\u3002","The project path should not contain "+O+". Please fix it.");aa=!1;break}}Y.push("\\");Y.push("/");Y.push(":");ka=0;for(L=Y.length;ka<L;ka+=1)if(O=Y[ka],-1!==E.indexOf(O)){La("\u5de5\u7a0b\u540d\u79f0\u4e0d\u5e94\u8be5\u5305\u542b"+O+"\u3002\u8bf7\u4fee\u6b63\u5b83\u3002","\u5c08\u6848\u540d\u7a31\u4e0d\u61c9\u8a72\u5305\u542b"+O+"\u3002\u8acb\u4fee\u6b63\u5b83\u3002","The project name should not contain "+
O+". Please fix it.");aa=!1;break}J.charAt(0).match(/^[a-zA-Z]/)&&J.charAt(1).match(/^[:]/)&&J.charAt(2).match(/^[\/\\]/)||(La("\u5de5\u7a0b\u8def\u5f84\u5f00\u5934\u5e94\u4e3a\u78c1\u789f\u673a\u4ee3\u53f7\u3001\u78c1\u789f\u533a\u5206\u9694\u7b26\u53f7\u548c\u5143\u4ef6\u5206\u9694\u7b26\u53f7(C:)\u3002\u8bf7\u4fee\u6b63\u5b83\u3002","\u5c08\u6848\u8def\u5f91\u958b\u982d\u61c9\u70ba\u78c1\u789f\u6a5f\u4ee3\u865f\u3001\u78c1\u789f\u5340\u5206\u9694\u7b26\u865f\u548c\u5143\u4ef6\u5206\u9694\u7b26\u865f(C:)\u3002\u8acb\u4fee\u6b63\u5b83\u3002",
"The project path should begin with a drive letter, a volume separator and a component separator (C:). Please fix it."),aa=!1);E.slice(-1).match(/^[ .]/)&&(La("\u5de5\u7a0b\u540d\u79f0\u4e0d\u5e94\u4ee5\u7a7a\u683c\u6216\u53e5\u53f7\u7ed3\u5c3e\u3002\u8bf7\u4fee\u6b63\u5b83\u3002","\u5c08\u6848\u540d\u7a31\u4e0d\u61c9\u4ee5\u7a7a\u683c\u6216\u53e5\u865f\u7d50\u5c3e\u3002\u8acb\u4fee\u6b63\u5b83\u3002","The project name should not end with a space or peroid. Please fix it."),aa=!1);return aa};if(!1!==
zb(Eb)){if("undefined"!==typeof k&&-1!==k.indexOf("UIlanguage:")){a=k.sliceAfterX("CheckCriteriaPin:");a=a.slicePriorToX("\r");""===a&&(a="Yes");g=k.sliceAfterX("CheckCriteriaModule:");g=g.slicePriorToX("\r");l=k.sliceAfterX("CheckCriteriaGPIO:");l=l.slicePriorToX("\r");q=k.sliceAfterX("CheckModularizeCode:");q=q.slicePriorToX("\r");if("No"===q||""===q)c="";q=k.sliceAfterX("ProjectName:");q=q.slicePriorToX("\r");t=k.sliceAfterX("ProjectLocation:");t=t.slicePriorToX("\r");h=k.sliceAfterX("ProjectLocationHistory:");
h=h.slicePriorToX("\r");k=k.sliceAfterX("UIlanguage:");k=k.slicePriorToX("\r");if("Simplified Chinese"===k){k="\u4ea7\u751f\u7a0b\u5f0f\u7801";var u="\u5de5\u7a0b\u540d\u79f0";var p="\u8bf7\u8f93\u5165\u6587\u4ef6\u5939\u8def\u5f84\uff0c\u7528\u4e8e\u5b58\u653e\u751f\u6210\u7684\u4ee3\u7801:";var v="\u8bf7\u6ce8\u610f\uff0c\u672c\u8f6f\u4ef6\u4e0d\u80fd\u53d6\u4ee3\u6280\u672f\u53c2\u8003\u624b\u518c\u6216\u89c4\u683c\u4e66\u3002\u7528\u6237\u5fc5\u987b\u53c2\u8003\u6700\u65b0\u6587\u6863\u4ee5\u786e\u4fdd\u6b63\u786e\u6027\u3002";
b="\u6216\u662f\u60a8\u53ef\u4ee5\u4ece\u6700\u8fd1\u7684\u5de5\u7a0b\u4e2d\u9009\u62e9\u4e00\u4e2a";f="\u6d4f\u89c8";var n="\u6a21\u7ec4\u5316\u4ee3\u7801";var r="\u786e\u5b9a";var y="\u79bb\u5f00"}else"Traditional Chinese"===k?(k="\u7522\u751f\u7a0b\u5f0f\u78bc",u="\u5c08\u6848\u540d\u7a31",p="\u8acb\u8f38\u5165\u8cc7\u6599\u593e\u8def\u5f91\uff0c\u7528\u65bc\u5b58\u653e\u751f\u6210\u7684\u7a0b\u5f0f\u78bc:",v="\u8acb\u6ce8\u610f\uff0c\u672c\u8edf\u4ef6\u4e0d\u80fd\u53d6\u4ee3\u6280\u8853\u53c3\u8003\u624b\u518a\u6216\u898f\u683c\u66f8\u3002\u7528\u6236\u5fc5\u9808\u53c3\u8003\u6700\u65b0\u6587\u6a94\u4ee5\u78ba\u4fdd\u6b63\u78ba\u6027\u3002",
b="\u6216\u662f\u60a8\u53ef\u4ee5\u5f9e\u6700\u8fd1\u7684\u5c08\u6848\u4e2d\u9078\u64c7\u4e00\u500b",f="\u700f\u89bd",n="\u6a21\u7d44\u5316\u7a0b\u5f0f\u78bc",r="\u78ba\u5b9a",y="\u96e2\u958b"):(k="Generate Code",u="Project Name",p="Please input a folder path for storing the generated code:",v="Please note that the tool is not a replacement for the technical reference manual or datasheet. The user must refer to the latest documentation for the correctness.",b="Or you can choose a folder from recent projects",
f="Browse",n="Modularize Code",r="Confirm",y="Leave")}else k="Generate Code",u="Project Name",p="Please input a folder path for storing the generated code:",v="Please note that the tool is not a replacement for the technical reference manual or datasheet. The user must refer to the latest documentation for the correctness.",b="Or you can choose a folder from recent projects",f="Browse",n="Modularize Code",r="Confirm",y="Leave";""===q.trim()&&(q="MyProject");if(""!==h.trim()){h=h.split(">");d='<br /><label><select id="generateCodeDialogSelect" style="width: 450px;height:32px;"><option value="default">'+
b+"</option>";b=0;for(e=h.length-1;b<e;b++)d+='<option value="'+h[b]+'">'+h[b]+"</option>";d+="</select></label>"}if(-1==="MA35D1 ML51 ML56 ML5156 MS51_8K MS51_8KDB MS51_16K MS51_32K".split(" ").indexOf(m)&&0!==NUTOOL_PIN.g_cfg_gpiosDefines.length&&1<NUTOOL_PIN.g_cfg_gpiosDefines[0].f.length&&0===NUTOOL_PIN.g_cfg_gpiosDefines[0].f[1].indexOf("GPIO:"))var w="checkbox";else n="",w="hidden",c="";Ra();$('<div id="generateCodeDialog"><label>'+(u+': <input type="text" id="inputText_projectName" value="'+
q+'" style="width:250px;height:24px;"></label><br /><br /><label><p>'+p+'</p></label><label><input id="generateCodeDialogInput" type="text" style="width:362px;height:24px;" value="'+t+'"><button id="generateCodeDialogBrowseFolder" style="width:80px;height:28px;">'+f+"</button></label>"+d+"<br /><br /><p>"+v+'</p><input type="text" size="1" style="position:relative;top:-5000px;"/></div>')).dialog({modal:!1,resizable:!1,title:k,width:500,height:"auto",show:"fade",hide:"fade",close:function(){$("#generateCodeDialog").dialog("destroy")},
create:function(E,J){var L=$(this).dialog("widget").find(".ui-dialog-buttonpane");$("<label class='generateCodeByModule' ><input type='"+w+"' id='checkbox_ModularizeCode' "+c+"/>"+n+"</label>").prependTo(L)},buttons:[{id:"generateCodeDialog_buttonOk",text:r,click:function(){$("#generateCodeDialog_buttonOk").button("disable");$("#generateCodeDialog_buttonCancel").button("disable");""===$("#inputText_projectName").val().trim()&&$("#inputText_projectName").val("MyProject");if(x($("#inputText_projectName").val(),
$("#generateCodeDialogInput").val())){try{external.generateCodeFromJS($("#inputText_projectName").val(),$("#generateCodeDialogInput").val(),"CheckCriteriaPin:"+a+"/CheckCriteriaModule:"+g+"/CheckCriteriaGPIO:"+l+"/CheckModularizeCode:"+$("#checkbox_ModularizeCode").is(":checked"))}catch(E){}$("#generateCodeDialog").dialog("isOpen")&&$("#generateCodeDialog").dialog("destroy")}else $("#generateCodeDialog_buttonOk").button("enable"),$("#generateCodeDialog_buttonCancel").button("enable")}},{id:"generateCodeDialog_buttonCancel",
text:y,click:function(){$("#generateCodeDialog").dialog("isOpen")&&$("#generateCodeDialog").dialog("destroy")}}]});$("#generateCodeDialogInput").keypress(function(E){switch(E.which){case 22:$("#generateCodeDialogInput").val(window.clipboardData.getData("Text"))}});$("#generateCodeDialogBrowseFolder").click(function(){""===$("#inputText_projectName").val().trim()&&$("#inputText_projectName").val("MyProject");try{external.generateCodeFromJS($("#inputText_projectName").val(),"generateCodeDialogInput:none",
"CheckCriteriaPin:"+a+"/CheckCriteriaModule:"+g+"/CheckCriteriaGPIO:"+l+"/CheckModularizeCode:"+$("#checkbox_ModularizeCode").is(":checked"))}catch(E){}""!==NUTOOL_PIN.g_pinFunctionString&&-1!==NUTOOL_PIN.g_pinFunctionString.indexOf(":")&&$("#generateCodeDialogInput").val(NUTOOL_PIN.g_pinFunctionString);$("#generateCodeDialog").focus()});$("#generateCodeDialogSelect").change(function(){"default"!==$("#generateCodeDialogSelect").val()&&($("#generateCodeDialogInput").val($("#generateCodeDialogSelect").val()),
$("#generateCodeDialogSelect").val($("#generateCodeDialogSelect option:first-child").val()))})}},connectToTarget:function(){var b=$.ajax({url:"NuToolSetup.txt",async:!1}).responseText;if(Ea||$("html").hasClass("ie9"))$("#rootTree_Pin").is(":visible")&&("undefined"!==typeof b&&-1!==b.indexOf("UIlanguage:")?(b=b.sliceAfterX("UIlanguage:"),b=b.slicePriorToX("\r"),"Simplified Chinese"===b?(b="\u8fde\u7ebf\u5230\u76ee\u6807\u82af\u7247",e="\u8981\u4f7f\u7528\u6b64\u529f\u80fd\uff0c\u8bf7\u5c06IE\u7248\u672c\u5347\u7ea7\u523010\u6216\u66f4\u9ad8\u7248\u672c\u3002",
c="\u786e\u5b9a"):"Traditional Chinese"===b?(b="\u9023\u7dda\u5230\u76ee\u6a19\u6676\u7247",e="\u8981\u4f7f\u7528\u6b64\u529f\u80fd\uff0c\u8acb\u5c07IE\u7248\u672c\u5347\u7d1a\u523010\u6216\u66f4\u9ad8\u7248\u672c\u3002",c="\u78ba\u5b9a"):(b="Connect to Target Chip",e="To use this feature, please upgrade the IE version to 10 or higher.",c="Confirm")):(b="Connect to Target Chip",e="To use this feature, please upgrade the IE version to 10 or higher.",c="Confirm"),Ra(),$('<div id="connectToTargetDialog"><p>'+
e+'</p><input type="text" size="1" style="position:relative;top:-5000px;"/></div>').dialog({modal:!1,draggable:!1,resizable:!1,title:b,width:500,height:"auto",show:"fade",hide:"fade",close:function(){$("#connectToTargetDialog").dialog("destroy")},buttons:[{text:c,click:function(){$("#connectToTargetDialog").dialog("isOpen")&&$("#connectToTargetDialog").dialog("destroy")}}]}),b=d=c=e=b=null);else if(Ib)Jc();else if($("#rootTree_Pin").is(":visible")){if("undefined"!==typeof b&&-1!==b.indexOf("UIlanguage:"))if(b=
b.sliceAfterX("UIlanguage:"),b=b.slicePriorToX("\r"),"Simplified Chinese"===b){b="\u8fde\u7ebf\u5230\u76ee\u6807\u82af\u7247";var e="\u5f53\u8fde\u63a5\u5230\u76ee\u6807\u82af\u7247\u65f6\uff0c\u60a8\u914d\u7f6e\u7684\u5185\u5bb9\u5c06\u4f1a\u6d88\u5931\u3002 \u82e5\u8981\u7ee7\u7eed\uff0c\u8bf7\u70b9\u51fb\u786e\u5b9a\u6309\u94ae\u3002";var c="\u786e\u5b9a";var d="\u79bb\u5f00"}else"Traditional Chinese"===b?(b="\u9023\u7dda\u5230\u76ee\u6a19\u6676\u7247",e="\u7576\u9023\u63a5\u5230\u76ee\u6a19\u6676\u7247\u6642\uff0c\u60a8\u914d\u7f6e\u7684\u5167\u5bb9\u5c07\u6703\u6d88\u5931\u3002 \u82e5\u8981\u7e7c\u7e8c\uff0c\u8acb\u9ede\u64ca\u78ba\u5b9a\u6309\u9215\u3002",
c="\u78ba\u5b9a",d="\u96e2\u958b"):(b="Connect to Target Chip",e="When connecting to a target chip, what you have configured is going to be gone. To continue, click the Confirm button.",c="Confirm",d="Leave");else b="Connect to Target Chip",e="When connecting to a target chip, what you have configured is going to be gone. To continue, click the Confirm button.",c="Confirm",d="Leave";Ra();$('<div id="connectToTargetDialog"><p>'+e+'</p><input type="text" size="1" style="position:relative;top:-5000px;"/></div>').dialog({modal:!1,
draggable:!1,resizable:!1,title:b,width:500,height:"auto",show:"fade",hide:"fade",close:function(){$("#connectToTargetDialog").dialog("destroy")},buttons:[{text:c,click:function(){Jc();$("#connectToTargetDialog").dialog("isOpen")&&$("#connectToTargetDialog").dialog("destroy")}},{text:d,click:function(){$("#connectToTargetDialog").dialog("isOpen")&&$("#connectToTargetDialog").dialog("destroy")}}]});b=d=c=e=b=null}},printReport:function(){var b=$.ajax({url:"NuToolSetup.txt",async:!1}).responseText;
if($("#rootTree_Pin").is(":visible")&&zb(Eb)){if("undefined"!==typeof b&&-1!==b.indexOf("UIlanguage:"))if(b=b.sliceAfterX("UIlanguage:"),b=b.slicePriorToX("\r"),"Simplified Chinese"===b){var e="\u65b9\u6848\u540d\u79f0";b="\u5370\u51fa\u62a5\u544a";var c="\u9009\u62e9\u7528\u6765\u5c55\u793a\u914d\u7f6e\u8d44\u8baf\u7684\u6807\u51c6\u3002";var d="\u8bf7\u6ce8\u610f\uff0c\u672c\u8f6f\u4ef6\u4e0d\u80fd\u53d6\u4ee3\u6280\u672f\u53c2\u8003\u624b\u518c\u6216\u89c4\u683c\u4e66\u3002\u7528\u6237\u5fc5\u987b\u53c2\u8003\u6700\u65b0\u6587\u6863\u4ee5\u786e\u4fdd\u6b63\u786e\u6027\u3002";
var f="\u82af\u7247\u56fe\u793a";var h="\u811a\u4f4d";var k="\u6a21\u7d44";var a="\u591a\u5de5\u6cdb\u7528\u811a\u4f4d";var g="\u6682\u5b58\u5668";var l="\u786e\u5b9a";var q="\u79bb\u5f00"}else"Traditional Chinese"===b?(e="\u65b9\u6848\u540d\u7a31",b="\u5370\u51fa\u5831\u544a",c="\u9078\u64c7\u7528\u4f86\u5c55\u793a\u914d\u7f6e\u8cc7\u8a0a\u7684\u6a19\u6e96\u3002",d="\u8acb\u6ce8\u610f\uff0c\u672c\u8edf\u4ef6\u4e0d\u80fd\u53d6\u4ee3\u6280\u8853\u53c3\u8003\u624b\u518a\u6216\u898f\u683c\u66f8\u3002\u7528\u6236\u5fc5\u9808\u53c3\u8003\u6700\u65b0\u6587\u6a94\u4ee5\u78ba\u4fdd\u6b63\u78ba\u6027\u3002",
f="\u6676\u7247\u5716\u793a",h="\u8173\u4f4d",k="\u6a21\u7d44",a="\u591a\u5de5\u6cdb\u7528\u8173\u4f4d",g="\u66ab\u5b58\u5668",l="\u78ba\u5b9a",q="\u96e2\u958b"):(b="Print Report",e="Project Name",c="Select the criteria by which the configured information is being exhibited.",d="Please note that the tool is not a replacement for the technical reference manual or datasheet. The user must refer to the latest documentation for the correctness.",f="ChipView",h="Pin",k="Module",a="GPIO",g="Register",l=
"Confirm",q="Leave");else b="Print Report",e="Project Name",c="Select the criteria by which the configured information is being cataloged.",d="Please note that the tool is not a replacement for the technical reference manual or datasheet. The user must refer to the latest documentation for the correctness.",f="ChipView",h="Pin",k="Module",a="GPIO",g="Register",l="Confirm",q="Leave";Ra();e=Ea?$('<div id="printReportDialog"><label>'+e+': <input type="text" id="inputText_projectName" value=""></label><br /><p>'+
c+'</p><input type="checkbox" id="checkbox_byRegister" checked=true/>'+g+'</label><br /><label><input type="checkbox" id="checkbox_byPin" checked=true/>'+h+'</label><br /><label><input type="checkbox" id="checkbox_byModule" />'+k+'</label><br /><label><input type="checkbox" id="checkbox_byGPIO" />'+a+"</label><br /><label><p>"+d+'</p></label><input type="text" size="1" style="position:relative;top:-5000px;"/></div>'):$('<div id="printReportDialog"><label>'+e+': <input type="text" id="inputText_projectName" value=""></label><br /><p>'+
c+'</p><label><input type="checkbox" id="checkbox_byChipView" checked=true/>'+f+'</label><br /><input type="checkbox" id="checkbox_byRegister" checked=true/>'+g+'</label><br /><label><input type="checkbox" id="checkbox_byPin" checked=true/>'+h+'</label><br /><label><input type="checkbox" id="checkbox_byModule" />'+k+'</label><br /><label><input type="checkbox" id="checkbox_byGPIO" />'+a+"</label><br /><label><p>"+d+'</p></label><input type="text" size="1" style="position:relative;top:-5000px;"/></div>');
e.dialog({modal:!0,draggable:!1,resizable:!1,title:b,width:500,height:"auto",show:"fade",hide:"fade",close:function(){$("#printReportDialog").dialog("destroy")},buttons:[{text:l,click:function(){$("#checkbox_byChipView").is(":checked")&&(t="checkbox_byChipView/");$("#checkbox_byRegister").is(":checked")&&(t+="checkbox_byRegister/");$("#checkbox_byPin").is(":checked")&&(t+="checkbox_byPin/");$("#checkbox_byModule").is(":checked")&&(t+="checkbox_byModule/");$("#checkbox_byGPIO").is(":checked")&&(t+=
"checkbox_byGPIO/");var x=$("#inputText_projectName").val(),u=t;ib();if("Simplified Chinese"===pa){var p="\u65b9\u6848";var v="\u65b9\u6848\u540d\u79f0";var n="\u65b9\u6848\u65e5\u671f";var r="\u578b\u53f7";var y="\u82af\u7247\u7cfb\u5217";var w="\u5fae\u63a7\u5668\u540d\u79f0";var E="\u5fae\u63a7\u5668\u5c01\u88c5";var J="\u82af\u7247\u56fe\u793a";var L="\u811a\u4f4d\u914d\u7f6e";var Y="\u6a21\u7ec4\u914d\u7f6e";var aa="\u591a\u5de5\u6cdb\u7528\u811a\u4f4d\u914d\u7f6e";var ka="\u6682\u5b58\u5668\u914d\u7f6e"}else"Traditional Chinese"===
pa?(p="\u65b9\u6848",v="\u65b9\u6848\u540d\u7a31",n="\u65b9\u6848\u65e5\u671f",r="\u578b\u865f",y="\u6676\u7247\u7cfb\u5217",w="\u5fae\u63a7\u5668\u540d\u7a31",E="\u5fae\u63a7\u5668\u5c01\u88dd",J="\u6676\u7247\u5716\u793a",L="\u8173\u4f4d\u914d\u7f6e",Y="\u6a21\u7d44\u914d\u7f6e",aa="\u591a\u5de5\u6cdb\u7528\u8173\u4f4d\u914d\u7f6e",ka="\u66ab\u5b58\u5668\u914d\u7f6e"):(p="Project",v="Project Name",n="Project Date",r="Part No.",y="Chip Series",w="MCU Name",E="MCU Package",J="ChipView",L="Pin Configuration",
Y="Module Configuration",aa="GPIO Configuration",ka="Register Configuration");var O="<!DOCTYPE html><html><head><title>Print Report</title></head><body>";var Fa=new Date;Fa=Fa.getMonth()+1+"/"+Fa.getDate()+"/"+Fa.getFullYear()+" "+Fa.getHours()+":"+Fa.getMinutes()+":"+Fa.getSeconds();O+='<table  style="border: 10px ridge black; background-color: white;" align="left" cellpadding="5" cellspacing="5" frame="border" rules="all"><caption style="text-align:left">'+p+'</caption><tr> <td style="border: 1px solid black;">'+
v+'</td> <td style="border: 1px solid black;">'+x+'</td> </tr> <tr> <td style="border: 1px solid black;">'+n+'</td> <td style="border: 1px solid black;">'+Fa+"</td> </tr> </table>";x=F.slicePriorToX("(");O+='<table  style="border: 10px ridge black; background-color: white;" align="left" cellpadding="5" cellspacing="5" frame="border" rules="all"><caption style="text-align:left">'+r+'</caption><tr> <td style="border: 1px solid black;">'+y+'</td> <td style="border: 1px solid black;">'+m+'</td> </tr> <tr> <td style="border: 1px solid black;">'+
w+'</td> <td style="border: 1px solid black;">'+x+'</td> </tr> <tr> <td style="border: 1px solid black;">'+E+'</td> <td style="border: 1px solid black;">'+NUTOOL_PIN.g_packageNumber+"</td> </tr></table>";O+="<br><br><br><br><br><br><br><hr>";if(null!==u){if(-1!==u.indexOf("checkbox_byChipView")){$("#panel")[0].appendChild(Ua("canvas","NUC_ChipView_Canvas"));r=$("#NUC_ChipView_Canvas")[0];r.setAttribute("style","z-index:1; position:absolute; left:0px; top:0px; border: 1px solid white;");y=195+A+40+
A/4;w=170+A+40+130;r.setAttribute("width",y);r.setAttribute("height",w);r=sa.getContext(r);r.scale(.85,.85);y=195;if(-1!==F.indexOf("SOP")){y-=30;r.strokeRect(y,170,A/2,A);r.fillStyle="white";r.fillRect(y,170,A/2,A);r.beginPath();r.arc(y+10,180,5,0,2*Math.PI,!0);r.stroke();p=1;do p+=1,r.font=p+'px "Arial Black", "Arial Bold", Gadget, sans-serif;';while(r.measureText(Ma).width<A/2);r.save();r.translate(y+A/4,170+A/2-r.measureText(Ma).width/2);r.rotate(Math.PI/2);r.fillStyle="#FE2E2E";r.fillText(Ma,
0,0);r.restore();x=F.slicePriorToX("(");w=0;for(E=NUTOOL_PIN.g_cfg_chips.length;w<E;w+=1)if(NUTOOL_PIN.g_cfg_chips[w].name+"("+NUTOOL_PIN.g_cfg_chips[w].pkg+")"===F){"undefined"!==typeof NUTOOL_PIN.g_cfg_chips[w].display&&(x=NUTOOL_PIN.g_cfg_chips[w].display);break}r.fillStyle="black";w=1;do w+=1,r.font="bold "+w+"px Calibri";while(r.measureText(x).width<A/2);w>p&&(w=p,r.font="bold "+w+"px Calibri");w=w/2+5;r.save();r.translate(y+A/4-w,170+A/2-r.measureText(x).width/2);r.rotate(Math.PI/2);r.fillText(x,
0,0);r.restore();p=1;do p+=1,r.font="bold "+p+"px Calibri";while(r.measureText(NUTOOL_PIN.g_packageNumber).width<A/4);w=w+p/2+5;r.save();r.translate(y+A/4-w,170+A/2-r.measureText(NUTOOL_PIN.g_packageNumber).width/2);r.rotate(Math.PI/2);r.fillText(NUTOOL_PIN.g_packageNumber,0,0);r.restore();r.font="12px Arial";r.fillStyle="black";w=0;for(E=T/2;w<E;w+=1)p=y+3,v=170+la+w*(16+ha)+12.8,r.strokeText((w+1).toString(),p,v),""!==D[w]&&(p=y-40-3,r.save(),r.textAlign="end",r.fillText(D[w],p,v),r.restore()),
p=y-40+1,v=170+la+w*(16+ha),r.strokeRect(p,v,40,16),r.fillStyle=W[0].savedPinPadColor[w],r.fillRect(p,v,40,16),n=ia[w],-1!==n.lastIndexOf("/")&&(n=n.slice(n.lastIndexOf("/")+1)),!ta(n)&&4<n.length&&(n=n.slice(0,4)+".."),r.font="12px Arial",r.fillStyle="black",r.fillText(n,p,v+12.8,40,16),p=y+A/2,v=170+A-la-16-w*(16+ha)+12.8,n=r.measureText((w+1+T/2).toString()),r.strokeText((w+1+T/2).toString(),p-n.width-3,v),""!==D[w+T/2]&&(p=y+A/2+40+3,r.fillText(D[w+T/2],p,v)),p=y+A/2,v=170+A-la-16-w*(16+ha),r.strokeRect(p,
v,40,16),r.fillStyle=W[1].savedPinPadColor[w],r.fillRect(p,v,40,16),n=ia[w+T/2],n=n.slicePriorToX("/"),!ta(n)&&4<n.length&&(n=n.slice(0,4)+".."),r.font="12px Arial",r.fillStyle="black",r.fillText(n,p,v+12.8)}else if(-1!==F.indexOf("WLCSP")||-1!==F.indexOf("BGA")){y-=30;r.lineWidth=2;r.strokeRect(y,170,A,A);r.fillStyle="white";r.fillRect(y,170,A,A);r.beginPath();r.arc(y+10,170+A-10,5,0,2*Math.PI,!0);r.stroke();r.font="12px Arial";r.fillStyle="black";w=0;for(E=Ja;w<E;w+=1)p=y+3,v=170+la+30+(Ja-1-w%
Ja)*(60+ha),r.fillText((w+1).toString(),p,v);w=0;for(E=ec;w<E;w+=1)p=y+la+30+w*(60+ha)-4,v=170+A-5,r.fillText(NUTOOL_PIN.g_horizontalIndexArray[w],p,v);for(w=0;w<T;w+=1)p=y+la+30+Math.floor(w/Ja)*(60+ha),v=y+la+30+(Ja-1-w%Ja)*(60+ha),r.beginPath(),r.arc(p,v,30,0,2*Math.PI,!0),r.strokeStyle="black",r.stroke(),r.fillStyle=W[0].savedPinPadColor[w],r.fill(),n=""!==D[w]?D[w]:W[0].savedPinName[w],-1!==n.lastIndexOf("/")&&(n=n.slice(n.lastIndexOf("/")+1)),6<n.length&&(n=n.slice(0,6)+".."),r.font="12px Arial",
r.fillStyle="black",r.fillText(n,p-r.measureText(n).width/2,v+parseInt(r.font,10)/2)}else{y-=30;r.strokeRect(y,170,A,A);r.fillStyle="white";r.fillRect(y,170,A,A);r.beginPath();r.arc(y+10,170+A-10,5,0,2*Math.PI,!0);r.stroke();p=1;do p+=1,r.font=p+'px "Arial Black", "Arial Bold", Gadget, sans-serif;';while(r.measureText(Ma).width<A/2);r.fillStyle="#FE2E2E";r.fillText(Ma,y+A/2-r.measureText(Ma).width/2,170+A/2);x=F.slicePriorToX("(");w=0;for(E=NUTOOL_PIN.g_cfg_chips.length;w<E;w+=1)if(NUTOOL_PIN.g_cfg_chips[w].name+
"("+NUTOOL_PIN.g_cfg_chips[w].pkg+")"===F){"undefined"!==typeof NUTOOL_PIN.g_cfg_chips[w].display&&(x=NUTOOL_PIN.g_cfg_chips[w].display);break}r.fillStyle="black";w=1;do w+=1,r.font="bold "+w+"px Calibri";while(r.measureText(x).width<A/2);w>p&&(w=p,r.font="bold "+w+"px Calibri");w=w/2+10;r.fillText(x,y+A/2-r.measureText(x).width/2,170+A/2+w);p=1;do p+=1,r.font="bold "+p+"px Calibri";while(r.measureText(NUTOOL_PIN.g_packageNumber).width<A/4);w=w+p/2+10;r.fillText(NUTOOL_PIN.g_packageNumber,y+A/2-r.measureText(NUTOOL_PIN.g_packageNumber).width/
2,170+A/2+w);r.font="12px Arial";r.fillStyle="black";x=Math.floor((Ka-I)/2);w=0;for(E=I;w<E;w+=1)p=y+la+(w+x)*(16+ha),v=170+A,r.save(),r.translate(p,v),r.rotate(-Math.PI/2),r.strokeText((w+1).toString(),3,12.8),r.restore(),""!==D[w]&&(v=170+A+40,r.save(),r.translate(p,v),r.rotate(-Math.PI/2),r.textAlign="end",r.fillText(D[w],-3,12.8),r.restore()),p=y+la+(w+x)*(16+ha)-1,v=170+A,r.strokeRect(p,v,16,40),r.fillStyle=W[0].savedPinPadColor[w],r.fillRect(p,v,16,40),n=ia[w],-1!==n.lastIndexOf("/")&&(n=n.slice(n.lastIndexOf("/")+
1)),!ta(n)&&4<n.length&&(n=n.slice(0,4)+".."),v+=40,r.font="12px Arial",r.fillStyle="black",r.save(),r.translate(p,v),r.rotate(-Math.PI/2),r.fillText(n,1,12.8),r.restore();x=Math.floor((Ka-ba)/2);w=0;for(E=ba;w<E;w+=1)p=y+A,v=170+A-la-16-(w+x)*(16+ha)+12.8,n=r.measureText((w+1+I).toString()),r.strokeText((w+1+I).toString(),p-n.width-3,v),""!==D[w+I]&&(p=y+A+40+3,r.fillText(D[w+I],p,v)),p=y+A,v=170+A-la-16-(w+x)*(16+ha),r.strokeRect(p,v,40,16),r.fillStyle=W[1].savedPinPadColor[w],r.fillRect(p,v,40,
16),n=ia[w+I],n=n.slicePriorToX("/"),!ta(n)&&4<n.length&&(n=n.slice(0,4)+".."),r.font="12px Arial",r.fillStyle="black",r.fillText(n,p,v+12.8);x=Math.floor((Ka-xa)/2);w=0;for(E=xa;w<E;w+=1)p=y+A-la-16-(w+x)*(16+ha)-1,v=130,r.save(),r.translate(p,v),r.rotate(-Math.PI/2),n=r.measureText((w+1+I+ba).toString()),r.strokeText((w+1+I+ba).toString(),-40-n.width-3,12.8),r.restore(),""!==D[w+I+ba]&&(r.save(),r.translate(p,v),r.rotate(-Math.PI/2),r.fillText(D[w+I+ba],6,12.8),r.restore()),v=131,r.strokeRect(p,
v,16,40),r.fillStyle=W[2].savedPinPadColor[w],r.fillRect(p,v,16,40),n=ia[w+I+ba],n=n.slicePriorToX("/"),!ta(n)&&4<n.length&&(n=n.slice(0,4)+".."),r.font="12px Arial",r.fillStyle="black",v+=40,r.save(),r.translate(p,v),r.rotate(-Math.PI/2),r.textAlign="end",r.fillText(n,40,12.8),r.restore();x=Math.floor((Ka-cb)/2);w=0;for(E=cb;w<E;w+=1)p=y+3,v=170+la+(w+x)*(16+ha)+12.8,r.strokeText((w+1+I+ba+xa).toString(),p,v),""!==D[w+I+ba+xa]&&(p=y-40-3,r.save(),r.textAlign="end",r.fillText(D[w+I+ba+xa],p,v),r.restore()),
p=y-40+1,v=170+la+(w+x)*(16+ha),r.strokeRect(p,v,40,16),r.fillStyle=W[3].savedPinPadColor[w],r.fillRect(p,v,40,16),n=ia[w+I+ba+xa],-1!==n.lastIndexOf("/")&&(n=n.slice(n.lastIndexOf("/")+1)),!ta(n)&&4<n.length&&(n=n.slice(0,4)+".."),r.font="12px Arial",r.fillStyle="black",r.fillText(n,p,v+12.8,40,16)}Ea||(r=document.getElementById("NUC_ChipView_Canvas").toDataURL(),O=O+("<h4>"+J+'</h4><img src="')+(r+'"><hr>'));$("#NUC_ChipView_Canvas").remove()}if(-1!==u.indexOf("checkbox_byRegister")){ka=O+('<table  style="border: 10px ridge black; background-color: white;" align="left" cellpadding="5" cellspacing="5" frame="border" rules="all"><caption style="text-align:left">'+
ka+"</caption>");r=wa(K);r.sort();O=0;for(J=r.length;O<J;O+=1)ka+='<tr><td style="border: 1px solid black;">'+r[O]+'</td> <td style="border: 1px solid black;">0x'+Za(K[r[O]]).toUpperCase()+"</td></tr>";O=ka+"</table>"}if(-1!==u.indexOf("checkbox_byPin")){O=ka=O;J=!0;ka+='<table style="border: 10px ridge black; background-color: white;" align="left" cellpadding="5" cellspacing="5" frame="box" rules="all" ><caption style="text-align:left">'+L+"</caption>";for(L=1;L<=T;L+=1)""!==D[L-1]&&(ka+='<tr><td style="border: 1px solid black;">Pin'+
Z(L)+'</td> <td style="border: 1px solid black;">'+D[L-1]+"</td></tr>",J=!1);ka+="</table>";J&&(ka=O);O=ka}if(-1!==u.indexOf("checkbox_byModule")){L=O;J=Y;ka=L;r=!0;O=[];for(Y=1;Y<=T;Y+=1)""!==D[Y-1]&&(y=Y,w=r=D[Y-1],-1!==w.indexOf("_")&&(w=w.slicePriorToX("_")),w=z(w),"undefined"===typeof O[w]?(O[w]=[],O[w][0]=r+"(Pin:"+Z(y)+")"):O[w].push(r+"(Pin:"+Z(y)+")"),r=!1);y=wa(O);L+='<table  style="border: 10px ridge black; background-color: white;" align="left" cellpadding="5" cellspacing="5" frame="border" rules="all"><caption style="text-align:left">'+
J+"</caption>";Y=0;for(w=y.length;Y<w;Y+=1)for(O[y[Y]].sort(Qa),J=0,E=O[y[Y]].length;J<E;J+=1)L+='<tr><td style="border: 1px solid black;">'+y[Y]+'</td> <td style="border: 1px solid black;">'+O[y[Y]][J]+"</td></tr>";L+="</table>";r&&(L=ka);O=L}if(-1!==u.indexOf("checkbox_byGPIO")){u=O;J=aa;Y=u;ka=!0;L=[];for(aa=1;aa<=T;aa+=1)""!==D[aa-1]&&(O=aa,ka=D[aa-1],r=z(NUTOOL_PIN.g_cfg_pkgs[NUTOOL_PIN.g_packageNumberIndex][O-1]),"undefined"===typeof L[r]?(L[r]=[],L[r][0]=NUTOOL_PIN.g_cfg_pkgs[NUTOOL_PIN.g_packageNumberIndex][O-
1]+": "+ka+"(Pin:"+Z(O)+")"):L[r].push(NUTOOL_PIN.g_cfg_pkgs[NUTOOL_PIN.g_packageNumberIndex][O-1]+": "+ka+"(Pin:"+Z(O)+")"),ka=!1);O=wa(L).sort(Qa);u+='<table  style="border: 10px ridge black; background-color: white;" align="left" cellpadding="5" cellspacing="5" frame="border" rules="all"><caption style="text-align:left">'+J+"</caption>";aa=0;for(r=O.length;aa<r;aa+=1)for(L[O[aa]].sort(Qa),J=0,y=L[O[aa]].length;J<y;J+=1)w=L[O[aa]][J],u+='<tr><td style="border: 1px solid black;">'+w.slicePriorToX(":")+
'</td> <td style="border: 1px solid black;">'+w.sliceAfterX(": ")+"</td></tr>";u+="</table>";ka&&(u=Y);O=u}}O+="</body></html>";aa=window.open("dummy.htm","",[]);aa.document.open();aa.document.write(O);aa.document.close();aa.moveTo(0,0);aa.focus();aa.print();$("#printReportDialog").dialog("isOpen")&&$("#printReportDialog").dialog("destroy")}},{text:q,click:function(){$("#printReportDialog").dialog("isOpen")&&$("#printReportDialog").dialog("destroy")}}]});var t=b=q=l=a=k=h=d=c=b=e=null}},generatePinDescriptions:function(){if(zb(Eb))try{external.generatePinDescriptionsFromJS()}catch(b){}},
runAnotherTool:function(){var b="NuCAD";if(!1!==zb(Eb)){var e=$.ajax({url:"NuToolSetup.txt",async:!1}).responseText;if($("#rootTree_Pin").is(":visible")){"undefined"!==typeof NUTOOL_PIN.g_anotherNameForNuCAD&&""!==NUTOOL_PIN.g_anotherNameForNuCAD&&(b=NUTOOL_PIN.g_anotherNameForNuCAD);if("undefined"!==typeof e&&-1!==e.indexOf("UIlanguage:"))if(e=e.sliceAfterX("UIlanguage:"),e=e.slicePriorToX("\r"),"Simplified Chinese"===e){b="\u6267\u884c"+b;e="\u9009\u62e9\u4e00\u4e2a\u5de5\u5177\u6765\u6267\u884c\u3002";
var c="\u8bf7\u6ce8\u610f\uff0c\u672c\u8f6f\u4ef6\u4e0d\u80fd\u53d6\u4ee3\u6280\u672f\u53c2\u8003\u624b\u518c\u6216\u89c4\u683c\u4e66\u3002\u7528\u6237\u5fc5\u987b\u53c2\u8003\u6700\u65b0\u6587\u6863\u4ee5\u786e\u4fdd\u6b63\u786e\u6027\u3002";var d="\u4f7f\u7528NC\u811a\u4f4d\u6765\u663e\u793a\u672a\u914d\u7f6e\u7684\u811a\u4f4d";var f="\u786e\u5b9a";var h="\u79bb\u5f00"}else"Traditional Chinese"===e?(b="\u57f7\u884c"+b,e="\u9078\u64c7\u4e00\u500b\u5de5\u5177\u4f86\u57f7\u884c\u3002",c="\u8acb\u6ce8\u610f\uff0c\u672c\u8edf\u4ef6\u4e0d\u80fd\u53d6\u4ee3\u6280\u8853\u53c3\u8003\u624b\u518a\u6216\u898f\u683c\u66f8\u3002\u7528\u6236\u5fc5\u9808\u53c3\u8003\u6700\u65b0\u6587\u6a94\u4ee5\u78ba\u4fdd\u6b63\u78ba\u6027\u3002",
d="\u4f7f\u7528NC\u8173\u4f4d\u4f86\u986f\u793a\u672a\u914d\u7f6e\u7684\u8173\u4f4d",f="\u78ba\u5b9a",h="\u96e2\u958b"):(b="Run "+b,e="Select a tool to run.",c="Please note that the tool is not a replacement for the technical reference manual or datasheet. The user must refer to the latest documentation for the correctness.",d="Use NC pins to present unconfigured pins",f="Confirm",h="Leave");else b="Run "+b,e="Select a tool to run.",c="Please note that the tool is not a replacement for the technical reference manual or datasheet. The user must refer to the latest documentation for the correctness.",
d="Use NC pin to present a unconfigured pin",f="Confirm",h="Leave";Ra();$('<div id="runAnotherToolDialog"><p>'+e+'</p><input type="radio" id="OrCAD" value="OrCAD" name="RunAnotherTool" Checked><label for="OrCAD">OrCAD</label><br /><input type="radio" id="Protel" value="Protel" name="RunAnotherTool"><label for="Protel">Protel</label><br /><br /><label><input type="checkbox" id="checkbox_useNCpin"/>'+d+"</label><p>"+c+'</p><input type="text" size="1" style="position:relative;top:-5000px;"/></div>').dialog({modal:!1,
draggable:!1,resizable:!1,title:b,width:500,height:"auto",show:"fade",hide:"fade",close:function(){$("#runAnotherToolDialog").dialog("destroy")},buttons:[{text:f,click:function(){$("input").each(function(){"RunAnotherTool"===this.name&&!0===this.checked&&($(this).val(),$("#checkbox_useNCpin").is(":checked")?window.external.runAnotherTool($(this).val()+"_UseNCPin"):window.external.runAnotherTool($(this).val()))});$("#runAnotherToolDialog").dialog("isOpen")&&$("#runAnotherToolDialog").dialog("destroy")}},
{text:h,click:function(){$("#runAnotherToolDialog").dialog("isOpen")&&$("#runAnotherToolDialog").dialog("destroy")}}]});e=h=f=c=e=b=null}}},get_pin_descriptions:function(){var b,e;Kb="Pin,Current Multi Function\n";for(b=0;b<T;b+=1){var c=""!==D[b]?NUTOOL_PIN.g_cfg_pkgs[NUTOOL_PIN.g_packageNumberIndex][b]+"/"+D[b]:NUTOOL_PIN.g_cfg_pkgs[NUTOOL_PIN.g_packageNumberIndex][b];-1===c.indexOf("NC_ToolNotShow")&&(Kb+=Z(b+1)+","+c+"\n")}Kb+="\nPin,Description\n";for(b=0;b<T;b+=1){c="";var d=NUTOOL_PIN.g_cfg_pkgs[NUTOOL_PIN.g_packageNumberIndex][b];
var f=d+":0";var h=0;for(e=NUTOOL_PIN.g_cfg_gpios.length;h<e;h+=1)if(f===NUTOOL_PIN.g_cfg_gpios[h].f[0]){e=0;for(f=NUTOOL_PIN.g_cfg_gpios[h].f.length;e<f;e+=1)c+=NUTOOL_PIN.g_cfg_gpios[h].f[e].slicePriorToX(":"),e!==NUTOOL_PIN.g_cfg_gpios[h].f.length-1&&(c+="/");break}""===c&&(c=d);-1===c.indexOf("NC_ToolNotShow")&&(Kb+=Z(b+1)+","+c+"\n")}},showPinDescriptions:function(){if($("#rootTree_Pin").is(":visible")){Da=!Da;Vb();hb();dc();"none"===$("#mfpTree").css("display")?$("#moduleTree").height(Ha-$("#supportedModules").height()):
($("#mfpTree").height(Wa),$("#moduleTree").height(Ha-$("#ChipType").height()-$("#MCU").height()-Wa-6-$("#supportedModules").height()));Lb();var b;var e=wa(D);var c=0;for(b=e.length;c<b;c+=1){var d=e[c];var f=D[d];""!==f&&(d=parseInt(d,10),vb(d,f,!1),pb(d+1,"#41AF88"))}c=0;for(b=Aa.length;c<b;c+=1)d=Aa[c],pb(d,"#FAB92D");$("#panel").css("overflow-x","scroll");$("#panel").css("overflow-y","scroll");M=100;kb();qb()}},zoomIn:Bc,bestFit:function(){$("#rootTree_Pin").is(":visible")&&(M=bc,kb())},zoomOut:Cc,
uncheckAllNodes:function(){Hb(function(){nc()});Pb()},uncheckAllNodes_core:nc,settings:function(){var b,e="",c="",d="",f="",h="",k="checked=true",a="checked=true",g="checked=true",l,q,t,x,u;var p=p=p="";var v=b=$.ajax({url:"NuToolSetup.txt",async:!1}).responseText;if($("#rootTree_Pin").is(":visible")){if("undefined"!==typeof b&&-1!==b.indexOf("UIlanguage:")){p=b.sliceAfterX("CheckCriteriaPin:");p=p.slicePriorToX("\r");"No"===p&&(k="");p=b.sliceAfterX("CheckCriteriaModule:");p=p.slicePriorToX("\r");
if("No"===p||""===p)a="";p=b.sliceAfterX("CheckCriteriaGPIO:");p=p.slicePriorToX("\r");if("No"===p||""===p)g="";b=b.sliceAfterX("UIlanguage:").slicePriorToX("\r");if("Simplified Chinese"===b){b="\u8bbe\u5b9a";p="1. \u4ece\u4e0b\u9762\u9009\u53d6\u4e00\u4e2a\u8bed\u8a00\u663e\u793a\u5728\u64cd\u4f5c\u4ecb\u9762\u4e0a\u3002";var n="2. \u663e\u793a\u63d0\u793a\u6846\u3002";var r="3. \u9009\u62e9\u7528\u6765\u5206\u7c7b\u914d\u7f6e\u8d44\u8baf\u7684\u6807\u51c6\u3002";var y="\u82f1\u6587";var w="\u7b80\u4f53\u4e2d\u6587";
var E="\u7e41\u4f53\u4e2d\u6587";var J="\u8981";var L="\u4e0d\u8981";c="checked";var Y="\u811a\u4f4d";var aa="\u6a21\u7d44";var ka="\u591a\u5de5\u6cdb\u7528\u811a\u4f4d";var O="\u786e\u5b9a";var Fa="\u79bb\u5f00"}else"Traditional Chinese"===b?(b="\u8a2d\u5b9a",p="1. \u5f9e\u4e0b\u9762\u9078\u53d6\u4e00\u500b\u8a9e\u8a00\u986f\u793a\u5728\u64cd\u4f5c\u4ecb\u9762\u4e0a\u3002",n="2. \u986f\u793a\u63d0\u793a\u6846\u3002",r="3. \u9078\u64c7\u7528\u4f86\u5206\u985e\u914d\u7f6e\u8cc7\u8a0a\u7684\u6a19\u6e96\u3002",
y="\u82f1\u6587",w="\u7b80\u9ad4\u4e2d\u6587",E="\u7e41\u9ad4\u4e2d\u6587",J="\u8981",L="\u4e0d\u8981",d="checked",Y="\u8173\u4f4d",aa="\u6a21\u7d44",ka="\u591a\u5de5\u6cdb\u7528\u8173\u4f4d",O="\u78ba\u5b9a",Fa="\u96e2\u958b"):(b="Settings",p="1. Select one of the following languages displayed in UI.",n="2. Display a tooltip.",r="3. Select the criteria by which the configured information is being cataloged.",y="English",w="Simplified Chinese",E="Traditional Chinese",J="Yes",L="No",e="checked",Y=
"Pin",aa="Module",ka="GPIO",O="Confirm",Fa="Leave")}else b="Settings",p="1. Select one of the following languages displayed in UI.",n="2. Display a tooltip.",r="3. Select the criteria by which the configured information is being cataloged.",y="English",w="Simplified Chinese",E="Traditional Chinese",J="Yes",L="No",e="checked",Y="Pin",aa="Module",ka="GPIO",O="Confirm",Fa="Leave";"undefined"!==typeof v&&-1!==v.indexOf("DisplayTooltip:")&&(v=v.sliceAfterX("DisplayTooltip:"),v=v.slicePriorToX("\r"),"No"===
v?h="checked":f="checked");$("#languageDialog").dialog("isOpen")&&$("#languageDialog").dialog("destroy");$('<div id="languageDialog"><p>'+p+'</p><input type="radio" id="engiish" value="English" name="UIlanguage" '+e+'><label for="engiish">'+y+'</label><br /><input type="radio" id="simplifiedChinese" value="Simplified Chinese" name="UIlanguage" '+c+'><label for="simplifiedChinese">'+w+'</label><br /><input type="radio" id="traditionalChinese" value="Traditional Chinese" name="UIlanguage" '+d+'><label for="traditionalChinese">'+
E+"</label><br /><p>"+n+'</p><input type="radio" id="stringYes" value="Yes" name="DisplayTooltip" '+f+'><label for="stringYes">'+J+'</label><br /><input type="radio" id="stringNo" value="No" name="DisplayTooltip" '+h+'><label for="stringNo">'+L+"</label><br /><p>"+r+'</p><label><input type="checkbox" id="checkbox_byPin" '+k+"/>"+Y+'</label><br /><label><input type="checkbox" id="checkbox_byModule" '+a+"/>"+aa+'</label><br /><label><input type="checkbox" id="checkbox_byGPIO" '+g+"/>"+ka+'</label><input type="text" size="1" style="position:relative;top:-5000px;"/></div>').dialog({modal:!1,
draggable:!1,resizable:!1,title:b,width:500,height:"auto",show:"fade",hide:"fade",close:function(){$("#languageDialog").dialog("destroy")},buttons:[{text:O,click:function(){$("input").each(function(){"UIlanguage"===this.name&&!0===this.checked?(pa=$(this).val(),"Simplified Chinese"===pa?(q="\u82af\u7247\u7cfb\u5217:",t="\u578b\u53f7:",x="MFP\u5bc4\u5b58\u5668",l="\u652f\u63f4\u6a21\u7ec4",u="\u641c\u5bfb.."):"Traditional Chinese"===pa?(q="\u6676\u7247\u7cfb\u5217:",t="\u578b\u865f:",x="MFP\u6682\u5b58\u5668",
l="\u652f\u63f4\u6a21\u7d44",u="\u641c\u5c0b.."):(q="Chip Series:",t="Part No.:",x="MFP Registers",l="Supported Modules",u="Search.."),$("#ChipType_span").text(q),$("#MCU_span").text(t),$("#mfpTree").jstree("rename_node",$("#mfp_tree"),x),$("#supportedModules_span").text(l),$("#searchInput_Pin")[0].setAttribute("style","font-family:Times Arial; position:absolute; left:"+($("#supportedModules_span").width()+10)+"px; width:"+(259-$("#supportedModules_span").width()-10)+"px; height: 16px;"),$("#searchInput_Pin").val(u),
$("#searchInput_Pin").change(function(){Ob(this.value)}),Ic(),Xb(),window.external.saveSettings("UIlanguage:"+pa),t=q=u=l=null):"DisplayTooltip"===this.name&&!0===this.checked&&(xb=$(this).val(),window.external.saveSettings("DisplayTooltip:"+xb),Bb="No"===$(this).val()?!1:!0)});$("#checkbox_byPin").is(":checked")?window.external.saveSettings("CheckCriteriaPin:Yes"):window.external.saveSettings("CheckCriteriaPin:No");$("#checkbox_byModule").is(":checked")?window.external.saveSettings("CheckCriteriaModule:Yes"):
window.external.saveSettings("CheckCriteriaModule:No");$("#checkbox_byGPIO").is(":checked")?window.external.saveSettings("CheckCriteriaGPIO:Yes"):window.external.saveSettings("CheckCriteriaGPIO:No");$("#languageDialog").dialog("isOpen")&&$("#languageDialog").dialog("destroy")}},{text:Fa,click:function(){""===pa&&(pa="English");$("#languageDialog").dialog("isOpen")&&$("#languageDialog").dialog("destroy")}}]})}},changeUIlanguage:function(){ib();if("Simplified Chinese"===pa){var b="\u82af\u7247\u7cfb\u5217:";
var e="\u578b\u53f7:";var c="MFP\u5bc4\u5b58\u5668";var d="\u652f\u63f4\u6a21\u7ec4";var f="\u641c\u5bfb.."}else"Traditional Chinese"===pa?(b="\u6676\u7247\u7cfb\u5217:",e="\u578b\u865f:",c="MFP\u6682\u5b58\u5668",d="\u652f\u63f4\u6a21\u7d44",f="\u641c\u5c0b.."):(b="Chip Series:",e="Part No.:",d="Supported Modules",f="Search..",c="MFP Registers");$("#ChipType_span").text(b);$("#MCU_span").text(e);$("#mfpTree").jstree("rename_node",$("#mfp_tree"),c);$("#supportedModules_span").text(d);$("#searchInput_Pin")[0].setAttribute("style",
"font-family:Times Arial; position:absolute; left:"+($("#supportedModules_span").width()+10)+"px; width:"+(259-$("#supportedModules_span").width()-10)+"px; height: 16px;");$("#searchInput_Pin").val(f);$("#searchInput_Pin").change(function(){Ob(this.value)});Ic();Xb();f=d=c=e=b=null},executePDFfail:function(){La("\u60a8\u7684\u7535\u8111\u4e0d\u80fd\u6267\u884cPDF\u6863\u3002\u8bf7\u5b89\u88c5\u5fc5\u8981\u7684\u8f6f\u4ef6\u6765\u652f\u63f4\u5b83\u3002","\u60a8\u7684\u96fb\u8166\u4e0d\u80fd\u57f7\u884cPDF\u6a94\u3002\u8acb\u5b89\u88dd\u5fc5\u8981\u7684\u8edf\u4ef6\u4f86\u652f\u63f4\u5b83\u3002",
"Your PC is incapable of executing the PDF files. Please install a necessary software to support it")},executeNuCADfail:function(){var b="NuCAD";"undefined"!==typeof NUTOOL_PIN.g_anotherNameForNuCAD&&""!==NUTOOL_PIN.g_anotherNameForNuCAD&&(b=NUTOOL_PIN.g_anotherNameForNuCAD);La("\u60a8\u7684\u7535\u8111\u4e0d\u80fd\u6267\u884c"+b+"\u56e0\u4e3a\u5b83\u4e0d\u5728Content\u8d44\u6599\u5939\u91cc\u9762\u3002","\u60a8\u7684\u96fb\u8166\u4e0d\u80fd\u57f7\u884c"+b+"\u56e0\u70ba\u5b83\u4e0d\u5728Content\u8cc7\u6599\u593e\u88e1\u9762\u3002",
"Your PC is incapable of executing "+b+" because it does not exist in the Content folder.")},get_gpio_MFPsNames:function(){var b,e="SYS->";0!==NUTOOL_PIN.g_cfg_gpiosDefines.length&&1<NUTOOL_PIN.g_cfg_gpiosDefines[0].f.length&&0===NUTOOL_PIN.g_cfg_gpiosDefines[0].f[1].indexOf("GPIO:GPIO_")&&(e="GPIO_MD->");ea="";var c=wa(K);c.sort();var d=0;for(b=c.length;d<b;d+=1)ea+=e+c[d]+" = 0x"+Za(K[c[d]]).toUpperCase()+"\n";Ab="";for(d=1;d<=T;d+=1)""!==D[d-1]?Ab+="Pin"+Z(d)+":"+D[d-1]+"\n":(b=ia[d-1].slice(ia[d-
1].indexOf(Oa[d-1])),b=b.slicePriorToX("/"),Ab+="Pin"+Z(d)+":"+b+"\n");Jb="";d=0;for(b=ya.length;d<b;d+=1)Jb+="GPIOpin:"+ya[d]+"\n"},recordConfig:Pb,g_readConfigFilePath:"",g_pinFunctionString:"",g_bFunctionalTesting:!1,g_bModuleTreeLoaded:!1}})();