diff --git a/app/Helpers/custom.php b/app/Helpers/custom.php index b14b646..0c2c760 100644 --- a/app/Helpers/custom.php +++ b/app/Helpers/custom.php @@ -6,11 +6,23 @@ use App\Models\Kuesioner; use App\Models\KuesionerLog; use App\Models\Master\FormKriteria; use App\Models\Penilaian; +use App\Models\PenilaianFile; use App\Models\User; use App\Models\Master\Sekolah; use App\Models\SK; use App\Models\Master\MasterGroup; +if (!function_exists('tahunKuesioner')) { + function tahunKuesioner($id){ + $kuesioner = Kuesioner::find($id); + if($kuesioner->tahun >= '2026'){ + $tahun = '2026'; + }else{ + $tahun = '2025'; + } + return $tahun; + } +} if (!function_exists('sekolah')) { function sekolah($id){ @@ -346,7 +358,7 @@ if (!function_exists('checkPenilaian')) { * * @return string */ - function checkPenilaian($page_number,$sekolah_id = null,$type = null) + function checkPenilaian($page_number,$sekolah_id = null,$type = null,$kuesionerId = null) { if(@$sekolah_id){ $idSekolah = @$sekolah_id; @@ -355,11 +367,17 @@ if (!function_exists('checkPenilaian')) { } if(@$type == 'kota'){ - $penilaian = Penilaian::where('page_number',$page_number)->where('ms_sekolah_id',$idSekolah)->where('status',1)->first(); + $penilaian = Penilaian::whereHas('page',function($query) use ($kuesionerId){ + $query->where('tahun',tahunKuesioner($kuesionerId)); + })->where('page_number',$page_number)->where('ms_sekolah_id',$idSekolah)->where('status',1)->first(); }elseif(@$type == 'provinsi'){ - $penilaian = Penilaian::where('page_number',$page_number)->where('ms_sekolah_id',$idSekolah)->where('status',2)->first(); + $penilaian = Penilaian::whereHas('page',function($query) use ($kuesionerId){ + $query->where('tahun',tahunKuesioner($kuesionerId)); + })->where('page_number',$page_number)->where('ms_sekolah_id',$idSekolah)->where('status',2)->first(); }else{ - $penilaian = Penilaian::where('page_number',$page_number)->where('ms_sekolah_id',$idSekolah)->where('status',0)->first(); + $penilaian = Penilaian::whereHas('page',function($query) use ($kuesionerId){ + $query->where('tahun',tahunKuesioner($kuesionerId)); + })->where('page_number',$page_number)->where('ms_sekolah_id',$idSekolah)->where('status',0)->first(); } // if(session('group_alias') == 'sekolah'){ @@ -755,9 +773,10 @@ if (!function_exists('formKriteria')) { * * @return string */ - function formKriteria($page_number,$sekolah_id = null,$type = null) + function formKriteria($page_number,$sekolah_id = null,$type = null,$tahun = null) { - $kriteria = FormKriteria::where('page_number',$page_number)->get(); + //cek + $html = ''; if(@$sekolah_id){ @@ -766,7 +785,9 @@ if (!function_exists('formKriteria')) { $idSekolah = session('sekolah_id'); } - $kuesioner = Kuesioner::where('ms_sekolah_id',$idSekolah)->where('tahun',date('Y'))->first(); + $kuesioner = Kuesioner::where('ms_sekolah_id',$idSekolah)->orderBy('tahun','DESC')->first(); + + $kriteria = FormKriteria::where('tahun',$tahun)->where('page_number',$page_number)->get(); if(session('group_alias') == 'sekolah'){ $status = 0; @@ -785,13 +806,13 @@ if (!function_exists('formKriteria')) { foreach($kriteria as $keyKriteria => $data){ if(@$type == 'kota'){ - $penilaian = Penilaian::where('key',$data->key)->where('ms_sekolah_id',$idSekolah)->where('status',$status)->first(); - $penilaianOld = Penilaian::where('key',$data->key)->where('ms_sekolah_id',$idSekolah)->where('status',($status-1))->first(); + $penilaian = Penilaian::where('tahun',$tahun)->where('key',$data->key)->where('ms_sekolah_id',$idSekolah)->where('status',$status)->first(); + $penilaianOld = Penilaian::where('tahun',$tahun)->where('key',$data->key)->where('ms_sekolah_id',$idSekolah)->where('status',($status-1))->first(); }elseif(@$type == 'provinsi'){ - $penilaian = Penilaian::where('key',$data->key)->where('ms_sekolah_id',$idSekolah)->where('status',$status)->first(); - $penilaianOld = Penilaian::where('key',$data->key)->where('ms_sekolah_id',$idSekolah)->where('status',($status-1))->first(); + $penilaian = Penilaian::where('tahun',$tahun)->where('key',$data->key)->where('ms_sekolah_id',$idSekolah)->where('status',$status)->first(); + $penilaianOld = Penilaian::where('tahun',$tahun)->where('key',$data->key)->where('ms_sekolah_id',$idSekolah)->where('status',($status-1))->first(); }else{ - $penilaian = Penilaian::where('key',$data->key)->where('ms_sekolah_id',$idSekolah)->where('status',$status)->first(); + $penilaian = Penilaian::where('tahun',$tahun)->where('key',$data->key)->where('ms_sekolah_id',$idSekolah)->where('status',$status)->first(); } // if(session('group_alias') == 'sekolah'){ @@ -813,7 +834,11 @@ if (!function_exists('formKriteria')) { // dd(); - $html .= '
g||e.autoRotation&&h?.styles?.width)&&(f=g)),f&&h&&(this.shortenLabel?this.shortenLabel():h.css(sv({},{width:Math.floor(f)+"px",lineClamp:+!e.isRadial})))}moveLabel(t,e){let i=this,s=i.label,o=i.axis,r=!1,a;s&&s.textStr===t?(i.movedLabel=s,r=!0,delete i.label):sT(o.ticks,function(e){r||e.isNew||e===i||!e.label||e.label.textStr!==t||(i.movedLabel=e.label,r=!0,e.labelPos=i.movedLabel.xy,delete e.label)}),!r&&(i.labelPos||s)&&(a=i.labelPos||s.xy,i.movedLabel=i.createLabel(t,e,a),i.movedLabel&&i.movedLabel.attr({opacity:0}))}render(t,e,i){let s=this.axis,o=s.horiz,r=this.pos,a=sC(this.tickmarkOffset,s.tickmarkOffset),n=this.getPosition(o,r,a,e),h=n.x,l=n.y,d=s.pos,c=d+s.len,p=o?h:l,g=sC(i,this.label?.newOpacity,1);!s.chart.polar&&(sx(p) p?this.chartWidth:a.width)/f)+"px";i.alignValue!==m.align&&(i.placed=!1);let y=Math.round(i.css({width:x}).getBBox(r.useHTML).height);if(m.height=y,i.align(m,!1,a).attr({align:m.align,scaleX:f,scaleY:f,"transform-origin":`${a.x+n*f*a2(m.align)} ${l}`}),!r.floating){let t=y*(y<1.2*l?1:f);"top"===d?e[0]=Math.ceil(e[0]+t):"bottom"===d&&(e[2]=Math.ceil(e[2]+t))}}},this),e[0]&&"top"===(i.title?.verticalAlign||"top")&&(e[0]+=i.title?.margin||0),e[2]&&i.caption?.verticalAlign==="bottom"&&(e[2]+=i.caption?.margin||0);let r=!this.titleOffset||this.titleOffset.join(",")!==e.join(",");this.titleOffset=e,a1(this,"afterLayOutTitles"),!this.isDirtyBox&&r&&(this.isDirtyBox=this.isDirtyLegend=r,this.hasRendered&&t&&this.isDirtyBox&&this.redraw())}getContainerBox(){let t=[].map.call(this.renderTo.children,t=>{if(t!==this.container){let e=t.style.display;return t.style.display="none",[t,e]}}),e={width:a3(this.renderTo,"width",!0)||0,height:a3(this.renderTo,"height",!0)||0};return t.filter(Boolean).forEach(([t,e])=>{t.style.display=e}),e}getChartSize(){let t=this.options.chart,e=t.width,i=t.height,s=this.getContainerBox(),o=s.height<=1||!this.renderTo.parentElement?.style.height&&"100%"===this.renderTo.style.height;this.chartWidth=Math.max(0,e||s.width||600),this.chartHeight=Math.max(0,ni(i,this.chartWidth)||(o?400:s.height)),this.containerBox=s}temporaryDisplay(t){let e=this.renderTo,i;if(t)for(;e?.style;)e.hcOrigStyle&&(aV(e,e.hcOrigStyle),delete e.hcOrigStyle),e.hcOrigDetached&&(aH.body.removeChild(e),e.hcOrigDetached=!1),e=e.parentNode;else for(;e?.style&&(aH.body.contains(e)||e.parentNode||(e.hcOrigDetached=!0,aH.body.appendChild(e)),("none"===a3(e,"display",!1)||e.hcOricDetached)&&(e.hcOrigStyle={display:e.style.display,height:e.style.height,overflow:e.style.overflow},i={display:"block",overflow:"hidden"},e!==this.renderTo&&(i.height=0),aV(e,i),e.offsetWidth||e.style.setProperty("display","block","important")),(e=e.parentNode)!==aH.body););}setClassName(t){this.container.className="highcharts-container "+(t||"")}getContainer(){let t,e=this.options,i=e.chart,s="data-highcharts-chart",o=na(),r=this.renderTo,a=ne(aU(r,s));a6(a)&&aW[a]&&aW[a].hasRendered&&aW[a].destroy(),aU(r,s,this.index),r.innerHTML=eh.emptyHTML,i.skipClone||r.offsetWidth||this.temporaryDisplay(),this.getChartSize();let n=this.chartHeight,h=this.chartWidth;aV(r,{overflow:"hidden"}),this.styledMode||(t=aQ({position:"relative",overflow:"hidden",width:h+"px",height:n+"px",textAlign:"left",lineHeight:"normal",zIndex:0,"-webkit-tap-highlight-color":"rgba(0,0,0,0)",userSelect:"none","touch-action":"manipulation",outline:"none",padding:"0px"},i.style||{}));let l=a$("div",{id:o},t,r);this.container=l,this.getChartSize(),h!==this.chartWidth&&(h=this.chartWidth,this.styledMode||aV(l,{width:nt(i.style?.width,h+"px")})),this.containerBox=this.getContainerBox(),this._cursor=l.style.cursor;let d=i.renderer||!aF?eT.getRendererType(i.renderer):i3;if(this.renderer=new d(l,h,n,void 0,i.forExport,e.exporting?.allowHTML,this.styledMode),aB(void 0,this),this.setClassName(i.className),this.styledMode)for(let t in e.defs)this.renderer.definition(e.defs[t]);else this.renderer.setStyle(i.style);this.renderer.chartIndex=this.index,a1(this,"afterGetContainer")}getMargins(t){let{spacing:e,margin:i,titleOffset:s}=this;this.resetMargins(),s[0]&&!aZ(i[0])&&(this.plotTop=Math.max(this.plotTop,s[0]+e[0])),s[2]&&!aZ(i[2])&&(this.marginBottom=Math.max(this.marginBottom,s[2]+e[2])),this.legend?.display&&this.legend.adjustMargins(i,e),a1(this,"getMargins"),t||this.getAxisMargins()}getAxisMargins(){let t=this,e=t.axisOffset=[0,0,0,0],i=t.colorAxis,s=t.margin,o=t=>{t.forEach(t=>{t.visible&&t.getOffset()})};t.hasCartesianSeries?o(t.axes):i?.length&&o(i),aX.forEach((i,o)=>{aZ(s[o])||(t[i]+=e[o])}),t.setChartSize()}getOptions(){return a_(this.userOptions,aN)}reflow(t){let e=this,i=e.containerBox,s=e.getContainerBox();delete e.pointer?.chartPosition,!e.exporting?.isPrinting&&!e.isResizing&&i&&s.width&&((s.width!==i.width||s.height!==i.height)&&(tn.clearTimeout(e.reflowTimeout),e.reflowTimeout=nr(function(){e.container&&e.setSize(void 0,void 0,!1)},100*!!t)),e.containerBox=s)}setReflow(){let t=this,e=e=>{t.options?.chart.reflow&&t.hasLoaded&&t.reflow(e)};if("function"==typeof ResizeObserver)new ResizeObserver(e).observe(t.renderTo);else{let t=aj(aG,"resize",e);aj(this,"destroy",t)}}setSize(t,e,i){let s=this,o=s.renderer;s.isResizing+=1,aB(i,s);let r=o.globalAnimation;s.oldChartHeight=s.chartHeight,s.oldChartWidth=s.chartWidth,void 0!==t&&(s.options.chart.width=t),void 0!==e&&(s.options.chart.height=e),s.getChartSize();let{chartWidth:a,chartHeight:n,scrollablePixelsX:h=0,scrollablePixelsY:l=0}=s;(s.isDirtyBox||a!==s.oldChartWidth||n!==s.oldChartHeight)&&(s.styledMode||(r?aI:aV)(s.container,{width:`${a+h}px`,height:`${n+l}px`},r),s.setChartSize(!0),o.setSize(a,n,r),s.axes.forEach(function(t){t.isDirty=!0,t.setScale()}),s.isDirtyLegend=!0,s.isDirtyBox=!0,s.layOutTitles(),s.getMargins(),s.redraw(r),s.oldChartHeight=void 0,a1(s,"resize"),setTimeout(()=>{s&&a1(s,"endResize")},aD(r).duration)),s.isResizing-=1}setChartSize(t){let e,i,s,o,{chartHeight:r,chartWidth:a,inverted:n,spacing:h,renderer:l}=this,d=this.clipOffset,c=Math[n?"floor":"round"];this.plotLeft=e=Math.round(this.plotLeft),this.plotTop=i=Math.round(this.plotTop),this.plotWidth=s=Math.max(0,Math.round(a-e-(this.marginRight??0))),this.plotHeight=o=Math.max(0,Math.round(r-i-(this.marginBottom??0))),this.plotSizeX=n?o:s,this.plotSizeY=n?s:o,this.spacingBox=l.spacingBox={x:h[3],y:h[0],width:a-h[3]-h[1],height:r-h[0]-h[2]},this.plotBox=l.plotBox={x:e,y:i,width:s,height:o},d&&(this.clipBox={x:c(d[3]),y:c(d[0]),width:c(this.plotSizeX-d[1]-d[3]),height:c(this.plotSizeY-d[0]-d[2])}),t||(this.axes.forEach(function(t){t.setAxisSize(),t.setAxisTranslation()}),l.alignElements()),a1(this,"afterSetChartSize",{skipAxes:t})}resetMargins(){a1(this,"resetMargins");let t=this,e=t.options.chart,i=e.plotBorderWidth||0,s=Math.round(i)/2;["margin","spacing"].forEach(i=>{let s=e[i],o=a9(s)?s:[s,s,s,s];["Top","Right","Bottom","Left"].forEach((s,r)=>{t[i][r]=e[`${i}${s}`]??o[r]})}),aX.forEach((e,i)=>{t[e]=t.margin[i]??t.spacing[i]}),t.axisOffset=[0,0,0,0],t.clipOffset=[s,s,s,s],t.plotBorderWidth=i}drawChartBox(){let t=this.options.chart,e=this.renderer,i=this.chartWidth,s=this.chartHeight,o=this.styledMode,r=this.plotBGImage,a=t.backgroundColor,n=t.plotBackgroundColor,h=t.plotBackgroundImage,l=this.plotLeft,d=this.plotTop,c=this.plotWidth,p=this.plotHeight,g=this.plotBox,u=this.clipRect,f=this.clipBox,m=this.chartBackground,x=this.plotBackground,y=this.plotBorder,b,v,k,w="animate";m||(this.chartBackground=m=e.rect().addClass("highcharts-background").add(),w="attr"),o?b=v=m.strokeWidth():(v=(b=t.borderWidth||0)+8*!!t.shadow,k={fill:a||"none"},(b||m["stroke-width"])&&(k.stroke=t.borderColor,k["stroke-width"]=b),m.attr(k).shadow(t.shadow)),m[w]({x:v/2,y:v/2,width:i-v-b%2,height:s-v-b%2,r:t.borderRadius}),w="animate",x||(w="attr",this.plotBackground=x=e.rect().addClass("highcharts-plot-background").add()),x[w](g),!o&&(x.attr({fill:n||"none"}).shadow(t.plotShadow),h&&(r?(h!==r.attr("href")&&r.attr("href",h),r.animate(g)):this.plotBGImage=e.image(h,l,d,c,p).add())),u?u.animate({width:f.width,height:f.height}):this.clipRect=e.clipRect(f),w="animate",y||(w="attr",this.plotBorder=y=e.rect().addClass("highcharts-plot-border").attr({zIndex:1}).add()),o||y.attr({stroke:t.plotBorderColor,"stroke-width":t.plotBorderWidth||0,fill:"none"}),y[w](y.crisp(g,-y.strokeWidth())),this.isDirtyBox=!1,a1(this,"afterDrawChartBox")}propFromSeries(){let t,e,i,s=this,o=s.options.chart,r=s.options.series;["inverted","angular","polar"].forEach(function(a){for(e=aY[o.type],i=o[a]||e&&e.prototype[a],t=r?.length;!i&&t--;)(e=aY[r[t].type])&&e.prototype[a]&&(i=!0);s[a]=i})}linkSeries(t){let e=this,i=e.series;i.forEach(function(t){t.linkedSeries.length=0}),i.forEach(function(t){let{linkedTo:s}=t.options,o=a4(s)&&(":previous"===s?i[t.index-1]:e.get(s));o&&o.linkedParent!==t&&(o.linkedSeries.push(t),t.linkedParent=o,o.enabledDataSorting&&t.setDataSortingOptions(),t.visible=t.options.visible??o.options.visible??t.visible)}),a1(this,"afterLinkSeries",{isUpdating:t})}renderSeries(){this.series.forEach(function(t){t.translate(),t.render()})}render(){let t=this.axes,e=this.colorAxis,i=this.renderer,s=this.options.chart.axisLayoutRuns||2,o=t=>{t.forEach(t=>{t.visible&&t.render()})},r=0,a=!0,n,h=0;for(let e of(this.setTitle(),a1(this,"beforeMargins"),this.getStacks?.(),this.getMargins(!0),this.setChartSize(),t)){let{options:t}=e,{labels:i}=t;if(this.hasCartesianSeries&&e.horiz&&e.visible&&i.enabled&&e.series.length&&"colorAxis"!==e.coll&&!this.polar){r=t.tickLength,e.createGroups();let s=new sA(e,0,"",!0),o=s.createLabel("x",i);if(s.destroy(),o&&nt(i.reserveSpace,!a6(t.crossing))&&(r=o.getBBox().height+i.distance+Math.max(t.offset||0,0)),r){o?.destroy();break}}}for(this.plotHeight=Math.max(this.plotHeight-r,0);(a||n||s>1)&&h 1){let o=this.xAxis.series.filter(t=>t.visible).map(t=>t.index),r=0,a=0;hm(this.xAxis.stacking?.stacks,t=>{let e="number"==typeof i.x?t[i.x.toString()]?.points:void 0,s=e?.[this.index],n={};if(e&&hp(s)){let t=this.index,i=Object.keys(e).filter(t=>!t.match(",")&&e[t]&&e[t].length>1).map(parseFloat).filter(t=>-1!==o.indexOf(t)).filter(e=>{let i=this.chart.series[e].options,s=i.stacking&&i.stack;if(hl(s)){if(hg(n[s]))return t===e&&(t=n[s]),!1;n[s]=e}return!0}).sort((t,e)=>e-t);r=i.indexOf(t),a=i.length}}),r=this.xAxis.reversed?a-1-r:r;let n=(a-1)*s.paddedWidth+e;t=(i.plotX||0)+n/2-e-r*s.paddedWidth}return t}translate(){let t=this,e=t.chart,i=t.options,s=t.dense=t.closestPointRange*t.xAxis.transA<2,o=t.borderWidth=hf(i.borderWidth,+!s),r=t.xAxis,a=t.yAxis,n=i.threshold,h=hf(i.minPointLength,5),l=t.getColumnMetrics(),d=l.width,c=t.pointXOffset=l.offset,p=t.dataMin,g=t.dataMax,u=t.translatedThreshold=a.getThreshold(n),f=t.barW=Math.max(d,1+2*o);i.pointPadding&&i.crisp&&(f=Math.ceil(f)),ah.prototype.translate.apply(t),t.points.forEach(function(s){let o=hf(s.yBottom,u),m=999+Math.abs(o),x=s.plotX||0,y=hn(s.plotY,-m,a.len+m),b,v=Math.min(y,o),k=Math.max(y,o)-v,w=d,M=x+c,S=f;h&&Math.abs(k)e-s)return!1;re-o/2?g[t]=e-o-2:g[t]=r-i/2},C=function(t){[b,v]=[v,b],k=t},A=()=>{!1!==S.apply(0,b)?!1!==T.apply(0,v)||k||(C(!0),A()):k?g.x=g.y=0:(C(!0),A())};return(n&&!d||this.len>1)&&C(),A(),g}getFixedPosition(t,e,i){let s=i.series,{chart:o,options:r,split:a}=this,n=r.position,h=n.relativeTo,l=r.shared||s?.yAxis?.isRadial&&("pane"===h||!h)?"plotBox":h,d="chart"===l?o.renderer:o[l]||o.getClipBox(s,!0);return{x:d.x+(d.width-t)*oD(n.align)+n.x,y:d.y+(d.height-e)*oD(n.verticalAlign)+(!a&&n.y||0)}}hide(t){let e=this;oL(this.hideTimer),t=oH(t,this.options.hideDelay),this.isHidden||(this.hideTimer=oG(function(){let i=e.getLabel();e.getLabel().animate({opacity:0},{duration:t?150:t,complete:()=>{i.hide(),e.container&&e.container.remove()}}),e.isHidden=!0},t))}init(t,e){this.chart=t,this.options=e,this.crosshairs=[],this.isHidden=!0,this.split=e.split&&!t.inverted&&!t.polar,this.shared=e.shared||this.split,this.outside=oH(e.outside,!!(t.scrollablePixelsX||t.scrollablePixelsY))}shouldStickOnContact(t){return!!(!this.followPointer&&this.options.stickOnContact&&(!t||this.pointer.inClass(t.target,"highcharts-tooltip")))}move(t,e,i,s){let{followPointer:o,options:r}=this,a=ob(!o&&!this.isHidden&&!r.fixed&&r.animation),n=o||(this.len||0)>1,h={x:t,y:e};n?h.anchorX=h.anchorY=NaN:(h.anchorX=i,h.anchorY=s),a.step=()=>this.drawTracker(),this.getLabel().animate(h,a)}refresh(t,e){let{chart:i,options:s,pointer:o,shared:r}=this,a=oF(t),n=a[0],h=s.format,l=s.formatter||this.defaultFormatter,d=i.styledMode,c=this.allowShared;if(!s.enabled||!n.series)return;oL(this.hideTimer),this.allowShared=!(!oB(t)&&t.series&&t.series.noSharedTooltip),c=c&&!this.allowShared,this.followPointer=!this.split&&n.series.tooltipOptions.followPointer;let p=this.getAnchor(t,e),g=p[0],u=p[1];r&&this.allowShared&&(o.applyInactiveState(a),a.forEach(t=>t.setState("hover")),n.points=a),this.len=a.length;let f=oR(h)?ov(h,n,i):l.call(n,this);n.points=void 0;let m=n.series;if(this.distance=oH(m.tooltipOptions.distance,16),!1===f)this.hide();else{if(this.split&&this.allowShared)this.renderSplit(f,a);else{let t=g,r=u;if(e&&o.isDirectTouch&&(t=e.chartX-i.plotLeft,r=e.chartY-i.plotTop),!(i.polar||!1===m.options.clip||a.some(e=>o.isDirectTouch||e.series.shouldShowTooltip(t,r))))return void this.hide();{let t=this.getLabel(c&&this.tt||{});(!s.style.width||d)&&t.css({width:(this.outside?this.getPlayingField():i.spacingBox).width+"px"}),t.attr({class:this.getClassName(n),text:f&&f.join?f.join(""):f}),this.outside&&t.attr({x:oA(t.x||0,0,this.getPlayingField().width-(t.width||0)-1)}),d||t.attr({stroke:s.borderColor||n.color||m.color||"#666666"}),this.updatePosition({plotX:g,plotY:u,negative:n.negative,ttBelow:n.ttBelow,series:m,h:p[2]||0})}}this.isHidden&&this.label&&this.label.attr({opacity:1}).show(),this.isHidden=!1}oI(this,"refresh")}renderSplit(t,e){let i=this,{chart:s,chart:{chartWidth:o,chartHeight:r,plotHeight:a,plotLeft:n,plotTop:h,scrollablePixelsY:l=0,scrollablePixelsX:d,styledMode:c},distance:p,options:g,options:{fixed:u,position:f,positioner:m},pointer:x}=i,{scrollLeft:y=0,scrollTop:b=0}=s.scrollablePlotArea?.scrollingContainer||{},v=i.outside&&"number"!=typeof d?oM.documentElement.getBoundingClientRect():{left:y,right:y+o,top:b,bottom:b+r},k=i.getLabel(),w=this.renderer||s.renderer,M=!!s.xAxis[0]?.opposite,{left:S,top:T}=x.getChartPosition(),C=m||u,A=h+b,P=0,L=a-l,O=function(t,e,s,o=[0,0],r=!0){let a,n;if(s.isHeader)n=M?0:L,a=oA(o[0]-t/2,v.left,v.right-t-(i.outside?S:0));else if(u&&s){let o=i.getFixedPosition(t,e,s);a=o.x,n=o.y-A}else n=o[1]-A,a=oA(a=r?o[0]-t-p:o[0]+p,r?a:v.left,v.right);return{x:a,y:n}};oR(t)&&(t=[!1,t]);let E=t.slice(0,e.length+1).reduce(function(t,s,o){if(!1!==s&&""!==s){let r=e[o-1]||{isHeader:!0,plotX:e[0].plotX,plotY:a,series:{}},l=r.isHeader,d=l?i:r.series,f=d.tt=function(t,e,s){let o=t,{isHeader:r,series:a}=e,n=a.tooltipOptions||g;if(!o){let t={padding:n.padding,r:n.borderRadius};c||(t.fill=n.backgroundColor,t["stroke-width"]=n.borderWidth??(u&&!r?0:1)),o=w.label("",0,0,n[r?"headerShape":"shape"]||(u&&!r?"rect":"callout"),void 0,void 0,n.useHTML).addClass(i.getClassName(e,!0,r)).attr(t).add(k)}return o.isActive=!0,o.attr({text:s}),c||o.css(n.style).attr({stroke:n.borderColor||e.color||a.color||"#333333"}),o}(d.tt,r,s.toString()),x=f.getBBox(),y=x.width+f.strokeWidth();l&&(P=x.height,L+=P,M&&(A-=P));let{anchorX:b,anchorY:S}=function(t){let e,i,{isHeader:s,plotX:o=0,plotY:r=0,series:l}=t;if(s)e=Math.max(n+o,n),i=h+a/2;else{let{xAxis:t,yAxis:s}=l;e=t.pos+oA(o,-p,t.len+p),l.shouldShowTooltip(0,s.pos-h+r,{ignoreX:!0})&&(i=s.pos+r)}return{anchorX:e=oA(e,v.left-p,v.right+p),anchorY:i}}(r);if("number"==typeof S){let e=x.height+1,s=(m||O).call(i,y,e,r,[b,S]);t.push({align:C?0:void 0,anchorX:b,anchorY:S,boxWidth:y,point:r,rank:oH(s.rank,+!!l),size:e,target:s.y,tt:f,x:s.x})}else f.isActive=!1}return t},[]);!C&&E.some(t=>{let{outside:e}=i,s=(e?S:0)+t.anchorX;return s0&&(a||(n.x=e+t,n.anchorX=s+t),a&&(n.x=(I.right-I.left)/2,n.anchorX=s+t))}t.tt.attr(n)});let{container:D,outside:B,renderer:N}=i;if(B&&D&&N){let{width:t,height:e,x:i,y:s}=k.getBBox();N.setSize(t+i,e+s,!1),D.style.left=I.left+"px",D.style.top=T+"px"}oS&&k.attr({opacity:1===k.opacity?.999:1})}drawTracker(){let t=this;if(!this.shouldStickOnContact()){t.tracker&&(t.tracker=t.tracker.destroy());return}let e=t.chart,i=t.label,s=t.shared?e.hoverPoints:e.hoverPoint;if(!i||!s)return;let o={x:0,y:0,width:0,height:0},r=this.getAnchor(s),a=i.getBBox();r[0]+=e.plotLeft-(i.translateX||0),r[1]+=e.plotTop-(i.translateY||0),o.x=Math.min(0,r[0]),o.y=Math.min(0,r[1]),o.width=r[0]<0?Math.max(Math.abs(r[0]),a.width-r[0]):Math.max(Math.abs(r[0]),a.width),o.height=r[1]<0?Math.max(Math.abs(r[1]),a.height-Math.abs(r[1])):Math.max(Math.abs(r[1]),a.height),t.tracker?t.tracker.attr(o):(t.tracker=i.renderer.rect(o).addClass("highcharts-tracker").add(i),oC(t.tracker.element,"mouseenter",()=>{oL(t.hideTimer)}),e.styledMode||t.tracker.attr({fill:"rgba(0,0,0,0)"}))}styledModeFormat(t){return t.replace('style="font-size: 0.8em"','class="highcharts-header"').replace(/style="color:{(point|series)\.color}"/g,'class="highcharts-color-{$1.colorIndex} {series.options.className} {point.options.className}"')}headerFooterFormatter(t,e){let i=t.series,s=i.tooltipOptions,o=i.xAxis,r=o?.dateTime,a={isFooter:e,point:t},n=s.xDateFormat||"",h=s[e?"footerFormat":"headerFormat"];return oI(this,"headerFormatter",a,function(e){if(r&&!n&&oN(t.key)&&(n=r.getXDateFormat(t.key,s.dateTimeLabelFormats)),r&&n){if(oz(n)){let t=n;ow[0]=e=>i.chart.time.dateFormat(t,e),n="%0"}(t.tooltipDateKeys||["key"]).forEach(t=>{h=h.replace(RegExp("point\\."+t+"([ \\)}])"),`(point.${t}:${n})$1`)})}i.chart.styledMode&&(h=this.styledModeFormat(h)),e.text=ov(h,t,this.chart)}),a.text||""}update(t){this.destroy(),this.init(this.chart,oW(!0,this.options,t))}updatePosition(t){let{chart:e,container:i,distance:s,options:o,pointer:r,renderer:a}=this,{height:n=0,width:h=0}=this.getLabel(),{fixed:l,positioner:d}=o,{left:c,top:p,scaleX:g,scaleY:u}=r.getChartPosition(),f=(d||l&&this.getFixedPosition||this.getPosition).call(this,h,n,t),m=z.doc,x=(t.plotX||0)+e.plotLeft,y=(t.plotY||0)+e.plotTop,b;if(a&&i){if(d||l){let{scrollLeft:t=0,scrollTop:i=0}=e.scrollablePlotArea?.scrollingContainer||{};f.x+=t+c-s,f.y+=i+p-s}b=(o.borderWidth||0)+2*s+2,a.setSize(oA(h+b,0,m.documentElement.clientWidth)-1,n+b,!1),(1!==g||1!==u)&&(oP(i,{transform:`scale(${g}, ${u})`}),x*=g,y*=u),x+=c-f.x,y+=p-f.y}this.move(Math.round(f.x),Math.round(f.y||0),x,y)}}(l=oY||(oY={})).compose=function(t){oX(ok,"Core.Tooltip")&&oC(t,"afterInit",function(){let t=this.chart;t.options.tooltip&&(t.tooltip=new l(t,t.options.tooltip,this))})};let oj=oY,{animObject:oU}=t5,{defaultOptions:o$}=tD,{format:oV}=eS,{addEvent:oZ,crisp:o_,erase:oq,extend:oK,fireEvent:oJ,getNestedProperty:oQ,isArray:o0,isFunction:o1,isNumber:o2,isObject:o3,merge:o5,pick:o6,syncTimeout:o9,removeEvent:o4,uniqueKey:o8}=tn;class o7{constructor(t,e,i){this.formatPrefix="point",this.visible=!0,this.point=this,this.series=t,this.applyOptions(e,i),this.id??(this.id=o8()),this.resolveColor(),this.dataLabelOnNull??(this.dataLabelOnNull=t.options.nullInteraction),t.chart.pointCount++,this.category=t.xAxis?.categories?.[this.x]??this.x,this.key=this.name??this.category,oJ(this,"afterInit")}animateBeforeDestroy(){let t=this,e={x:t.startXPos,opacity:0},i=t.getGraphicalProps();i.singular.forEach(function(i){t[i]=t[i].animate("dataLabel"===i?{x:t[i].startXPos,y:t[i].startYPos,opacity:0}:e)}),i.plural.forEach(function(e){t[e].forEach(function(e){e.element&&e.animate(oK({x:t.startXPos},e.startYPos?{x:e.startXPos,y:e.startYPos}:{}))})})}applyOptions(t,e){let i=this.series,s=i.options.pointValKey||i.pointValKey;return oK(this,t=o7.prototype.optionsToObject.call(this,t)),this.options=this.options?oK(this.options,t):t,t.group&&delete this.group,t.dataLabels&&delete this.dataLabels,s&&(this.y=o7.prototype.getNestedProperty.call(this,s)),this.selected&&(this.state="select"),"name"in this&&void 0===e&&i.xAxis&&i.xAxis.hasNames&&(this.x=i.xAxis.nameToX(this)),void 0===this.x&&i?this.x=e??i.autoIncrement():o2(t.x)&&i.options.relativeXValue?this.x=i.autoIncrement(t.x):"string"==typeof this.x&&(e??(e=i.chart.time.parse(this.x)),o2(e)&&(this.x=e)),this.isNull=this.isValid&&!this.isValid(),this.formatPrefix=this.isNull?"null":"point",this}destroy(){if(!this.destroyed){let t=this,e=t.series,i=e.chart,s=e.options.dataSorting,o=i.hoverPoints,r=oU(t.series.chart.renderer.globalAnimation),a=()=>{for(let e in(t.graphic||t.graphics||t.dataLabel||t.dataLabels)&&(o4(t),t.destroyElements()),t)delete t[e]};t.legendItem&&i.legend.destroyItem(t),o&&(t.setState(),oq(o,t),o.length||(i.hoverPoints=null)),t===i.hoverPoint&&t.onMouseOut(),s?.enabled?(this.animateBeforeDestroy(),o9(a,r.duration)):a(),i.pointCount--}this.destroyed=!0}destroyElements(t){let e=this,i=e.getGraphicalProps(t);i.singular.forEach(function(t){e[t]=e[t].destroy()}),i.plural.forEach(function(t){e[t].forEach(function(t){t?.element&&t.destroy()}),delete e[t]})}firePointEvent(t,e,i){let s=this,o=this.series.options;s.manageEvent(t),"click"===t&&o.allowPointSelect&&(i=function(t){!s.destroyed&&s.select&&s.select(null,t.ctrlKey||t.metaKey||t.shiftKey)}),oJ(s,t,e,i)}getClassName(){return"highcharts-point"+(this.selected?" highcharts-point-select":"")+(this.negative?" highcharts-negative":"")+(this.isNull?" highcharts-null-point":"")+(void 0!==this.colorIndex?" highcharts-color-"+this.colorIndex:"")+(this.options.className?" "+this.options.className:"")+(this.zone?.className?" "+this.zone.className.replace("highcharts-negative",""):"")}getGraphicalProps(t){let e,i,s=this,o=[],r={singular:[],plural:[]};for((t=t||{graphic:1,dataLabel:1}).graphic&&o.push("graphic","connector"),t.dataLabel&&o.push("dataLabel","dataLabelPath","dataLabelUpper"),i=o.length;i--;)s[e=o[i]]&&r.singular.push(e);return["graphic","dataLabel"].forEach(function(e){let i=e+"s";t[e]&&s[i]&&r.plural.push(i)}),r}getNestedProperty(t){if(t)return 0===t.indexOf("custom.")?oQ(t,this.options):this[t]}getZone(){let t=this.series,e=t.zones,i=t.zoneAxis||"y",s,o=0;for(s=e[0];this[i]>=s.value;)s=e[++o];return this.nonZonedColor||(this.nonZonedColor=this.color),s?.color&&!this.options.color?this.color=s.color:this.color=this.nonZonedColor,s}hasNewShapeType(){return(this.graphic&&(this.graphic.symbolName||this.graphic.element.nodeName))!==this.shapeType}isValid(){return(o2(this.x)||this.x instanceof Date)&&o2(this.y)}optionsToObject(t){let e=this.series,i=e.options.keys,s=i||e.pointArrayMap||["y"],o=s.length,r={},a,n=0,h=0;if(o2(t)||null===t)r[s[0]]=t;else if(o0(t))for(!i&&t.length>o&&("string"==(a=typeof t[0])?e.xAxis?.dateTime?r.x=e.chart.time.parse(t[0]):r.name=t[0]:"number"===a&&(r.x=t[0]),n++);hs)}).forEach(function(t,e){t.x=e},this),e.linkedSeries&&e.linkedSeries.forEach(function(e){let i=e.options,o=i.data;!i.dataSorting?.enabled&&o&&(o.forEach(function(i,r){o[r]=s(e,i),t[r]&&(o[r].x=t[r].x,o[r].index=r)}),e.setData(o,!1))}),t}getProcessedData(t){let e=this,{dataTable:i,isCartesian:s,options:o,xAxis:r}=e,a=o.cropThreshold,n=t||e.getExtremesFromAll,h=r?.logarithmic,l=i.rowCount,d,c,p=0,g,u,f,m=e.getColumn("x"),x=i,y=!1;return r&&(u=(g=r.getExtremes()).min,f=g.max,y=!!(r.categories&&!r.names.length),s&&e.sorted&&!n&&(!a||l>a||e.forceCrop)&&(m[l-1]f?x=new rT:e.getColumn(e.pointValKey||"y").length&&(m[0]f)&&(x=(d=this.cropData(i,u,f)).modified,p=d.start,c=!0))),m=x.getColumn("x")||[],{modified:x,cropped:c,cropStart:p,closestPointRange:r9([h?m.map(h.log2lin):m],()=>e.requireSorting&&!y&&r2(15,!1,e.chart))}}processData(t){let e=this.xAxis,i=this.dataTable;if(this.isCartesian&&!this.isDirty&&!e.isDirty&&!this.yAxis.isDirty&&!t)return!1;let s=this.getProcessedData();i.modified=s.modified,this.cropped=s.cropped,this.cropStart=s.cropStart,this.closestPointRange=this.basePointRange=s.closestPointRange,r6(this,"afterProcessData")}cropData(t,e,i){let s=t.getColumn("x",!0)||[],o=s.length,r={},a,n,h=0,l=o;for(a=0;a1)&&(r.step=function(t,e){i&&i.apply(e,arguments),"width"===e.prop&&h?.element&&h.attr(o?"height":"width",t+99)}),n.addClass("highcharts-animating").animate(t,r)}}afterAnimate(){this.setClip(),as(this.chart.sharedClips,(t,e,i)=>{t&&!this.chart.container.querySelector(`[clip-path="url(#${t.id})"]`)&&(t.destroy(),delete i[e])}),this.finishedAnimating=!0,r6(this,"afterAnimate")}drawPoints(t=this.points){let e,i,s,o,r,a,n,h=this.chart,l=h.styledMode,{colorAxis:d,options:c}=this,p=c.marker,g=c.nullInteraction,u=this[this.specialGroup||"markerGroup"],f=this.xAxis,m=ao(p.enabled,!f||!!f.isRadial||null,this.closestPointRangePx>=p.enabledThreshold*p.radius);if(!1!==p.enabled||this._hasPointMarkers)for(e=0;e(h?1:1.1),n=i/this.plotHeight>(h?1:1.05),h++}this.drawChartBox(),this.hasCartesianSeries?o(t):e?.length&&o(e),this.seriesGroup||(this.seriesGroup=i.g("series-group").attr({zIndex:3}).shadow(this.options.chart.seriesGroupShadow).add()),this.renderSeries(),this.addCredits(),this.setResponsive&&this.setResponsive(),this.hasRendered=!0}addCredits(t){let e=this,i=a8(!0,this.options.credits,t);i.enabled&&!this.credits&&(this.credits=this.renderer.text(i.text+(this.mapCredits||""),0,0).addClass("highcharts-credits").on("click",function(){i.href&&(aG.location.href=i.href)}).attr({align:i.position.align,zIndex:8}),e.styledMode||this.credits.css(i.style),this.credits.add().align(i.position),this.credits.update=function(t){e.credits=e.credits.destroy(),e.addCredits(t)})}destroy(){let t,e=this,i=e.axes,s=e.series,o=e.container,r=o?.parentNode;for(a1(e,"destroy"),e.renderer.forExport?aK(aW,e):aW[e.index]=void 0,z.chartCount--,e.renderTo.removeAttribute("data-highcharts-chart"),ns(e),t=i.length;t--;)i[t]=i[t].destroy();for(this.scroller?.destroy?.(),t=s.length;t--;)s[t]=s[t].destroy();["title","subtitle","chartBackground","plotBackground","plotBGImage","plotBorder","seriesGroup","clipRect","credits","pointer","rangeSelector","legend","resetZoomButton","tooltip","renderer"].forEach(t=>{e[t]=e[t]?.destroy?.()}),o&&(o.innerHTML=eh.emptyHTML,ns(o),r&&aq(o)),a7(e,function(t,i){delete e[i]})}firstRender(){let t=this,e=t.options;t.getContainer(),t.resetMargins(),t.setChartSize(),t.propFromSeries(),t.createAxes();let i=a5(e.series)?e.series:[];e.series=[],i.forEach(function(e){t.initSeries(e)}),t.linkSeries(),t.setSortedData(),a1(t,"beforeRender"),t.render(),t.pointer?.getChartPosition(),t.renderer.imgCount||t.hasLoaded||t.onload(),t.temporaryDisplay(!0)}onload(){this.callbacks.concat([this.callback]).forEach(function(t){t&&void 0!==this.index&&t.apply(this,[this])},this),a1(this,"load"),a1(this,"render"),aZ(this.index)&&this.setReflow(),this.warnIfA11yModuleNotLoaded(),this.warnIfCSSNotLoaded(),this.hasLoaded=!0}warnIfA11yModuleNotLoaded(){let{options:t,title:e}=this;t&&!this.accessibility&&(this.renderer.boxWrapper.attr({role:"img","aria-label":(e?.element.textContent||"").replace(/this.transform({reset:!0,trigger:"zoom"}))}pan(t,e){let i=this,s="object"==typeof e?e:{enabled:e,type:"x"},o=s.type,r=o&&i[({x:"xAxis",xy:"axes",y:"yAxis"})[o]].filter(t=>t.options.panningEnabled&&!t.options.isInternal),a=i.options.chart;a?.panning&&(a.panning=s),a1(this,"pan",{originalEvent:t},()=>{i.transform({axes:r,event:t,to:{x:t.chartX-(i.mouseDownX||0),y:t.chartY-(i.mouseDownY||0)},trigger:"pan"}),aV(i.container,{cursor:"move"})})}transform(t){let{axes:e=this.axes,event:i,from:s={},reset:o,selection:r,to:a={},trigger:n,allowResetButton:h=!0}=t,{inverted:l,time:d}=this;this.hoverPoints?.forEach(t=>t.setState()),a1(this,"transform",t);let c=t.hasZoomed||!1,p,g;for(let t of e){let{horiz:e,len:u,minPointOffset:f=0,options:m,reversed:x}=t,y=e?"width":"height",b=e?"x":"y",v=nt(a[y],t.len),k=nt(s[y],t.len),w=10>Math.abs(v)?1:v/k,M=(s[b]||0)+k/2-t.pos,S=M-((a[b]??t.pos)+v/2-t.pos)/w,T=x&&!l||!x&&l?-1:1;if(!o&&(M<0||M>t.len))continue;let C=t.chart.polar||t.isOrdinal?0:f*T||0,A=t.toValue(S,!0),P=t.toValue(S+u/w,!0),L=A+C,O=P-C,E=t.allExtremes;if(r&&r[t.coll].push({axis:t,min:Math.min(A,P),max:Math.max(A,P)}),L>O&&([L,O]=[O,L]),1===w&&!o&&"yAxis"===t.coll&&!E){for(let e of t.series){let t=e.getExtremes(e.getProcessedData(!0).modified.getColumn(e.pointValKey||"y")||[],!0);E??(E={dataMin:Number.MAX_VALUE,dataMax:-Number.MAX_VALUE}),a6(t.dataMin)&&a6(t.dataMax)&&(E.dataMin=Math.min(t.dataMin,E.dataMin),E.dataMax=Math.max(t.dataMax,E.dataMax))}t.allExtremes=E}let{dataMin:I,dataMax:D,min:B,max:N}=aQ(t.getExtremes(),E||{}),z=d.parse(m.min),R=d.parse(m.max),W=I??z,H=D??R,X=O-L,F=t.categories?0:Math.min(X,H-W),G=W-F*(aZ(z)?0:m.minPadding),Y=H+F*(aZ(R)?0:m.maxPadding),j=t.allowZoomOutside||1===w||"zoom"!==n&&w>1,U=Math.min(z??G,G,j?B:G),$=Math.max(R??Y,Y,j?N:Y);(!t.isOrdinal||1!==w||o)&&(L=1&&(O=L+X)),O>$&&(O=$,w>=1&&(L=O-X)),(o||t.series.length&&(L!==B||O!==N)&&L>=U&&O<=$)&&(r?r[t.coll].push({axis:t,min:L,max:O}):(t.isPanning="zoom"!==n,t.isPanning&&"mousewheel"!==n&&(g=!0),t.setExtremes(o?void 0:L,o?void 0:O,!1,!1,{move:S,trigger:n,scale:w}),!o&&(L>U||O<$)&&(p=h)),c=!0),this.hasCartesianSeries||o||(p=h),i&&(this[e?"mouseDownX":"mouseDownY"]=i[e?"chartX":"chartY"]))}return c&&(r?a1(this,"selection",r,()=>{delete t.selection,t.trigger="zoom",this.transform(t)}):(!p||g||this.resetZoomButton?!p&&this.resetZoomButton&&(this.resetZoomButton=this.resetZoomButton.destroy()):this.showResetZoom(),this.redraw("zoom"===n&&(this.options.chart.animation??this.pointCount<100)))),c}}aQ(nn.prototype,{callbacks:[],collectionsWithInit:{xAxis:[nn.prototype.addAxis,[!0]],yAxis:[nn.prototype.addAxis,[!1]],series:[nn.prototype.addSeries]},collectionsWithUpdate:["xAxis","yAxis","series"],propsRequireDirtyBox:["backgroundColor","borderColor","borderWidth","borderRadius","plotBackgroundColor","plotBackgroundImage","plotBorderColor","plotBorderWidth","plotShadow","shadow"],propsRequireReflow:["margin","marginTop","marginRight","marginBottom","marginLeft","spacing","spacingTop","spacingRight","spacingBottom","spacingLeft"],propsRequireUpdateSeries:["chart.inverted","chart.polar","chart.ignoreHiddenSeries","chart.type","colors","plotOptions","time","tooltip"]});let{stop:nh}=t5,{composed:nl}=z,{addEvent:nd,createElement:nc,css:np,defined:ng,erase:nu,merge:nf,pushUnique:nm}=tn;function nx(){let t=this.scrollablePlotArea;(this.scrollablePixelsX||this.scrollablePixelsY)&&!t&&(this.scrollablePlotArea=t=new nb(this)),t?.applyFixed()}function ny(){this.chart.scrollablePlotArea&&(this.chart.scrollablePlotArea.isDirty=!0)}class nb{static compose(t,e,i){nm(nl,this.compose)&&(nd(t,"afterInit",ny),nd(e,"afterSetChartSize",t=>this.afterSetSize(t.target,t)),nd(e,"render",nx),nd(i,"show",ny))}static afterSetSize(t,e){let i,s,o,{minWidth:r,minHeight:a}=t.options.chart.scrollablePlotArea||{},{clipBox:n,plotBox:h,inverted:l,renderer:d}=t;if(!d.forExport)if(r?(t.scrollablePixelsX=i=Math.max(0,r-t.chartWidth),i&&(t.scrollablePlotBox=nf(t.plotBox),h.width=t.plotWidth+=i,n[l?"height":"width"]+=i,o=!0)):a&&(t.scrollablePixelsY=s=Math.max(0,a-t.chartHeight),ng(s)&&(t.scrollablePlotBox=nf(t.plotBox),h.height=t.plotHeight+=s,n[l?"width":"height"]+=s,o=!1)),ng(o)){if(!e.skipAxes)for(let e of t.axes)(e.horiz===o||t.hasParallelCoordinates&&"yAxis"===e.coll)&&(e.setAxisSize(),e.setAxisTranslation())}else delete t.scrollablePlotBox}constructor(t){let e;const i=t.options.chart,s=eT.getRendererType(),o=i.scrollablePlotArea||{},r=this.moveFixedElements.bind(this),a={WebkitOverflowScrolling:"touch",overflowX:"hidden",overflowY:"hidden"};t.scrollablePixelsX&&(a.overflowX="auto"),t.scrollablePixelsY&&(a.overflowY="auto"),this.chart=t;const n=this.parentDiv=nc("div",{className:"highcharts-scrolling-parent"},{position:"relative"},t.renderTo),h=this.scrollingContainer=nc("div",{className:"highcharts-scrolling"},a,n),l=this.innerContainer=nc("div",{className:"highcharts-inner-container"},void 0,h),d=this.fixedDiv=nc("div",{className:"highcharts-fixed"},{position:"absolute",overflow:"hidden",pointerEvents:"none",zIndex:(i.style?.zIndex||0)+2,top:0},void 0,!0),c=this.fixedRenderer=new s(d,t.chartWidth,t.chartHeight,i.style);this.mask=c.path().attr({fill:i.backgroundColor||"#fff","fill-opacity":o.opacity??.85,zIndex:-1}).addClass("highcharts-scrollable-mask").add(),h.parentNode.insertBefore(d,h),np(t.renderTo,{overflow:"visible"}),nd(t,"afterShowResetZoom",r),nd(t,"afterApplyDrilldown",r),nd(t,"afterLayOutTitles",r),nd(h,"scroll",()=>{let{pointer:i,hoverPoint:s}=t;i&&(delete i.chartPosition,s&&(e=s),i.runPointActions(void 0,e,!0))}),l.appendChild(t.container)}applyFixed(){let{chart:t,fixedRenderer:e,isDirty:i,scrollingContainer:s}=this,{axisOffset:o,chartWidth:r,chartHeight:a,container:n,plotHeight:h,plotLeft:l,plotTop:d,plotWidth:c,scrollablePixelsX:p=0,scrollablePixelsY:g=0}=t,{scrollPositionX:u=0,scrollPositionY:f=0}=t.options.chart.scrollablePlotArea||{},m=r+p,x=a+g;e.setSize(r,a),(i??!0)&&(this.isDirty=!1,this.moveFixedElements()),nh(t.container),np(n,{width:`${m}px`,height:`${x}px`}),t.renderer.boxWrapper.attr({width:m,height:x,viewBox:["0 0",m,x].join(" ")}),t.chartBackground?.attr({width:m,height:x}),np(s,{width:`${r}px`,height:`${a}px`}),ng(i)||(s.scrollLeft=p*u,s.scrollTop=g*f);let y=d-o[0]-1,b=l-o[3]-1,v=d+h+o[2]+1,k=l+c+o[1]+1,w=l+c-p,M=d+h-g,S=[["M",0,0]];p?S=[["M",0,y],["L",l-1,y],["L",l-1,v],["L",0,v],["Z"],["M",w,y],["L",r,y],["L",r,v],["L",w,v],["Z"]]:g&&(S=[["M",b,0],["L",b,d-1],["L",k,d-1],["L",k,0],["Z"],["M",b,M],["L",b,a],["L",k,a],["L",k,M],["Z"]]),"adjustHeight"!==t.redrawTrigger&&this.mask.attr({d:S})}moveFixedElements(){let t,{container:e,inverted:i,scrollablePixelsX:s,scrollablePixelsY:o}=this.chart,r=this.fixedRenderer,a=nb.fixedSelectors;if(s&&!i?t=".highcharts-yaxis":s&&i||o&&!i?t=".highcharts-xaxis":o&&i&&(t=".highcharts-yaxis"),t&&!(this.chart.hasParallelCoordinates&&".highcharts-yaxis"===t))for(let e of[`${t}:not(.highcharts-radial-axis)`,`${t}-labels:not(.highcharts-radial-axis-labels)`])nm(a,e);else for(let t of[".highcharts-xaxis",".highcharts-yaxis"])for(let e of[`${t}:not(.highcharts-radial-axis)`,`${t}-labels:not(.highcharts-radial-axis-labels)`])nu(a,e);for(let t of a)[].forEach.call(e.querySelectorAll(t),t=>{(t.namespaceURI===r.SVG_NS?r.box:r.box.parentNode).appendChild(t),t.style.pointerEvents="auto"})}}nb.fixedSelectors=[".highcharts-breadcrumbs-group",".highcharts-contextbutton",".highcharts-caption",".highcharts-credits",".highcharts-drillup-button",".highcharts-legend",".highcharts-legend-checkbox",".highcharts-navigator-series",".highcharts-navigator-xaxis",".highcharts-navigator-yaxis",".highcharts-navigator",".highcharts-range-selector-group",".highcharts-reset-zoom",".highcharts-scrollbar",".highcharts-subtitle",".highcharts-title"];let{format:nv}=eS,{series:nk}=rW,{destroyObjectProperties:nw,fireEvent:nM,getAlignFactor:nS,isNumber:nT,pick:nC}=tn,nA=class{constructor(t,e,i,s,o){const r=t.chart.inverted,a=t.reversed;this.axis=t;const n=this.isNegative=!!i!=!!a;this.options=e=e||{},this.x=s,this.total=null,this.cumulative=null,this.points={},this.hasValidPoints=!1,this.stack=o,this.leftCliff=0,this.rightCliff=0,this.alignOptions={align:e.align||(r?n?"left":"right":"center"),verticalAlign:e.verticalAlign||(r?"middle":n?"bottom":"top"),y:e.y,x:e.x},this.textAlign=e.textAlign||(r?n?"right":"left":"center")}destroy(){nw(this,this.axis)}render(t){let e=this.axis.chart,i=this.options,s=i.format,o=s?nv(s,this,e):i.formatter.call(this);if(this.label)this.label.attr({text:o,visibility:"hidden"});else{this.label=e.renderer.label(o,null,void 0,i.shape,void 0,void 0,i.useHTML,!1,"stack-labels");let s={r:i.borderRadius||0,text:o,padding:nC(i.padding,5),visibility:"hidden"};e.styledMode||(s.fill=i.backgroundColor,s.stroke=i.borderColor,s["stroke-width"]=i.borderWidth,this.label.css(i.style||{})),this.label.attr(s),this.label.added||this.label.add(t)}this.label.labelrank=e.plotSizeY,nM(this,"afterRender")}setOffset(t,e,i,s,o,r){let{alignOptions:a,axis:n,label:h,options:l,textAlign:d}=this,c=n.chart,p=this.getStackBox({xOffset:t,width:e,boxBottom:i,boxTop:s,defaultX:o,xAxis:r}),{verticalAlign:g}=a;if(h&&p){let t=h.getBBox(void 0,0),e=h.padding,i="justify"===nC(l.overflow,"justify"),s;a.x=l.x||0,a.y=l.y||0;let{x:o,y:r}=this.adjustStackPosition({labelBox:t,verticalAlign:g,textAlign:d});p.x-=o,p.y-=r,h.align(a,!1,p),(s=c.isInsidePlot(h.alignAttr.x+a.x+o,h.alignAttr.y+a.y+r))||(i=!1),i&&nk.prototype.justifyDataLabel.call(n,h,a,h.alignAttr,t,p),h.attr({x:h.alignAttr.x,y:h.alignAttr.y,rotation:l.rotation,rotationOriginX:t.width*nS(l.textAlign||"center"),rotationOriginY:t.height/2}),nC(!i&&l.crop,!0)&&(s=nT(h.x)&&nT(h.y)&&c.isInsidePlot(h.x-e+(h.width||0),h.y)&&c.isInsidePlot(h.x+e,h.y)),h[s?"show":"hide"]()}nM(this,"afterSetOffset",{xOffset:t,width:e})}adjustStackPosition({labelBox:t,verticalAlign:e,textAlign:i}){return{x:t.width/2+t.width/2*(2*nS(i)-1),y:t.height/2*2*(1-nS(e))}}getStackBox(t){let e=this.axis,i=e.chart,{boxTop:s,defaultX:o,xOffset:r,width:a,boxBottom:n}=t,h=e.stacking.usePercentage?100:nC(s,this.total,0),l=e.toPixels(h),d=t.xAxis||i.xAxis[0],c=nC(o,d.translate(this.x))+r,p=Math.abs(l-e.toPixels(n||nT(e.min)&&e.logarithmic&&e.logarithmic.lin2log(e.min)||0)),g=i.inverted,u=this.isNegative;return g?{x:(u?l:l-p)-i.plotLeft,y:d.height-c-a+d.top-i.plotTop,width:p,height:a}:{x:c+d.transB-i.plotLeft,y:(u?l-p:l)-i.plotTop,width:a,height:p}}},{getDeferredAnimation:nP}=t5,{series:{prototype:nL}}=rW,{addEvent:nO,correctFloat:nE,defined:nI,destroyObjectProperties:nD,fireEvent:nB,isNumber:nN,objectEach:nz,pick:nR}=tn;function nW(){let t=this.inverted;this.axes.forEach(t=>{t.stacking?.stacks&&t.hasVisibleSeries&&(t.stacking.oldStacks=t.stacking.stacks)}),this.series.forEach(e=>{let i=e.xAxis?.options||{};e.options.stacking&&e.reserveSpace()&&(e.stackKey=[e.type,nR(e.options.stack,""),t?i.top:i.left,t?i.height:i.width].join(","))})}function nH(){let t=this.stacking;if(t){let e=t.stacks;nz(e,(t,i)=>{nD(t),delete e[i]}),t.stackTotalGroup?.destroy()}}function nX(){this.stacking||(this.stacking=new n$(this))}function nF(t,e,i,s){return!nI(t)||t.x!==e||s&&t.stackKey!==s?t={x:e,index:0,key:s,stackKey:s}:t.index++,t.key=[i,e,t.index].join(","),t}function nG(){let t,e=this,i=e.yAxis,s=e.stackKey||"",o=i.stacking.stacks,r=e.getColumn("x",!0),a=e.options.stacking,n=e[a+"Stacker"];n&&[s,"-"+s].forEach(i=>{let s=r.length,a,h,l;for(;s--;)a=r[s],t=e.getStackIndicator(t,a,e.index,i),h=o[i]?.[a],(l=h?.points[t.key||""])&&n.call(e,l,h,s)})}function nY(t,e,i){let s=e.total?100/e.total:0;t[0]=nE(t[0]*s),t[1]=nE(t[1]*s),this.stackedYData[i]=t[1]}function nj(t){(this.is("column")||this.is("columnrange"))&&(this.options.centerInCategory&&this.chart.series.length>1?nL.setStackedPoints.call(this,t,"group"):t.stacking.resetStacks())}function nU(t,e){let i,s,o,r,a,n,h,l=e||this.options.stacking;if(!l||!this.reserveSpace()||(({group:"xAxis"})[l]||"yAxis")!==t.coll)return;let d=this.getColumn("x",!0),c=this.getColumn(this.pointValKey||"y",!0),p=[],g=c.length,u=this.options,f=u.threshold||0,m=u.startFromThreshold?f:0,x=u.stack,y=e?`${this.type},${l}`:this.stackKey||"",b="-"+y,v=this.negStacks,k=t.stacking,w=k.stacks,M=k.oldStacks;for(k.stacksTouched+=1,h=0;h
',pointFormat:"x: {point.x}
y: {point.y}
"}}),hU(hV.prototype,{drawTracker:hG.prototype.drawTracker,sorted:!1,requireSorting:!1,noSharedTooltip:!0,trackerGroups:["group","markerGroup","dataLabelsGroup"]}),hj(hV,"afterTranslate",function(){this.applyJitter()}),rW.registerSeriesType("scatter",hV);let{deg2rad:hZ}=z,{fireEvent:h_,isNumber:hq,pick:hK,relativeLength:hJ}=tn;(g=O||(O={})).getCenter=function(){let t=this.options,e=this.chart,i=2*(t.slicedOffset||0),s=e.plotWidth-2*i,o=e.plotHeight-2*i,r=t.center,a=Math.min(s,o),n=t.thickness,h,l=t.size,d=t.innerSize||0,c,p;"string"==typeof l&&(l=parseFloat(l)),"string"==typeof d&&(d=parseFloat(d));let g=[hK(r?.[0],"50%"),hK(r?.[1],"50%"),hK(l&&l<0?void 0:t.size,"100%"),hK(d&&d<0?void 0:t.innerSize||0,"0%")];for(!e.angular||this instanceof ah||(g[3]=0),c=0;c<4;++c)p=g[c],h=c<2||2===c&&/%$/.test(p),g[c]=hJ(p,[s,o,a,g[2]][c])+(h?i:0);return g[3]>g[2]&&(g[3]=g[2]),hq(n)&&2*ne!=l>e&&t<(h-s)*(e-n)/(l-n)+s&&(a=!a)}return a};let{pointInPolygon:ly}=I,{addEvent:lb,getAlignFactor:lv,fireEvent:lk,objectEach:lw,pick:lM}=tn;function lS(t,e){let i,s=!1;return t&&(i=t.newOpacity,t.oldOpacity!==i&&(t.hasClass("highcharts-data-label")?(t[i?"removeClass":"addClass"]("highcharts-data-label-hidden"),s=!0,t[t.isOld?"animate":"attr"]({opacity:i},void 0,function(){e.styledMode||t.css({pointerEvents:i?"auto":"none"})}),lk(e,"afterHideOverlappingLabel")):t.attr({opacity:i})),t.isOld=!0),s}let{defaultOptions:lT}=tD,{noop:lC}=z,{addEvent:lA,extend:lP,isObject:lL,merge:lO,relativeLength:lE}=tn,lI={radius:0,scope:"stack",where:void 0},lD=lC,lB=lC;function lN(t,e,i,s,o={}){let r=lD(t,e,i,s,o),{brStart:a=!0,brEnd:n=!0,innerR:h=0,r:l=i,start:d=0,end:c=0}=o;if(o.open||!o.borderRadius)return r;let p=c-d,g=Math.sin(p/2),u=Math.max(Math.min(lE(o.borderRadius||0,l-h),(l-h)/2,l*g/(1+g)),0),f=Math.min(u,p/Math.PI*2*h),m=r.length-1;for(;m--;)(a||0!==m&&3!==m)&&(n||1!==m&&2!==m)&&!function(t,e,i){let s,o,r,a=t[e],n=t[e+1];if("Z"===n[0]&&(n=t[0]),("M"===a[0]||"L"===a[0])&&"A"===n[0]?(s=a,o=n,r=!0):"A"===a[0]&&("M"===n[0]||"L"===n[0])&&(s=n,o=a),s&&o&&o.params){let a=o[1],n=o[5],h=o.params,{start:l,end:d,cx:c,cy:p}=h,g=n?a-i:a+i,u=g?Math.asin(i/g):0,f=n?u:-u,m=Math.cos(u)*g;r?(h.start=l+f,s[1]=c+m*Math.cos(l),s[2]=p+m*Math.sin(l),t.splice(e+1,0,["A",i,i,0,0,1,c+a*Math.cos(h.start),p+a*Math.sin(h.start)])):(h.end=d-f,o[6]=c+a*Math.cos(h.end),o[7]=p+a*Math.sin(h.end),t.splice(e+1,0,["A",i,i,0,0,1,c+m*Math.cos(d),p+m*Math.sin(d)])),o[4]=Math.abs(h.end-h.start)
- Dashboard
-
-
+ Dashboard
+
+
Kuesioner Anda telah di-approve dan dinyatakan valid. Silakan melanjutkan ke tahapan berikutnya.
+ Pemenuhan Kriteria +| Status Usulan | -Penghargaan Terakhir | -Tanggal Penetapan SK | -Lampiran SK | -
|---|---|---|---|
| - {!! kuesionerLogStatus(@$kuesioner->KuesionerId) !!} - {{-- {{str_replace('_',' ',\Str::title($log->step))}} --}} - | -- @if(@getPenghargaanTerakhir(session('sekolah_id')) == 'Belum Pernah') - - jenis_usulan == 0){ - $penghargaan = 'Belum Pernah'; - }elseif(@$sk->jenis_usulan == 1){ - $penghargaan = 'Adiwiyata Kab/Kota'; - }elseif(@$sk->jenis_usulan == 2){ - $penghargaan = 'Adiwiyata Provinsi'; - }elseif(@$sk->jenis_usulan == 3){ - $penghargaan = 'Adiwiyata Nasional'; - }elseif(@$sk->jenis_usulan == 4){ - $penghargaan = 'Adiwiyata Mandiri'; - } - ?> - {!!$penghargaan!!} - @else - {{@getPenghargaanTerakhir(session('sekolah_id'))}} - @endif - | -{{@$sk->tanggal_penetapan}} | -- @if(@$sk) - SK Adiwiyata - @endif - | -