(function(l,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(l=typeof globalThis<"u"?globalThis:l||self,e(l.EpcRating={},l.Vue))})(this,function(l,e){"use strict";const t={A:{min:92,bandColor:"#00C781",scoreColor:"#64C7A4"},B:{min:81,bandColor:"#19b459",scoreColor:"#72CA8B"},C:{min:69,bandColor:"#8dce46",scoreColor:"#b4df86"},D:{min:55,bandColor:"#ffd500",scoreColor:"#ffe666"},E:{min:39,bandColor:"#fcaa65",scoreColor:"#fdc79b"},F:{min:21,bandColor:"#ef8023",scoreColor:"#f4ac71"},G:{min:0,bandColor:"#e9153b",scoreColor:"#f2738a"}},i=r=>{for(let o in t)if(r>=t[o].min)return o;return"G"},d=r=>{let o=Object.entries(t);for(let n=0;nd(r)*50+25,y={preserveAspectRatio:"xMidYMid meet",width:"100%",height:"100%",viewBox:"0 0 616 377",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":"svg-title svg-desc",role:"img",class:"epc-energy-rating-graph"},f=e.createElementVNode("title",{id:"svg-title"},"Energy efficiency chart",-1),h={id:"svg-desc"},m=e.createStaticVNode('',9),g=e.createElementVNode("text",{role:"presentation","aria-hidden":"true",x:"0",y:"0",style:{"font-size":"40px","font-family":"sans-serif",fill:"#0b0c0c","font-weight":"bold"}},[e.createElementVNode("tspan",{x:"107",y:"64"},"A"),e.createElementVNode("tspan",{x:"147",y:"114"},"B"),e.createElementVNode("tspan",{x:"187",y:"164"},"C"),e.createElementVNode("tspan",{x:"227",y:"214"},"D"),e.createElementVNode("tspan",{x:"267",y:"264"},"E"),e.createElementVNode("tspan",{x:"307",y:"314"},"F"),e.createElementVNode("tspan",{x:"347",y:"364"},"G")],-1),p=e.createElementVNode("text",{role:"presentation","aria-hidden":"true",x:"0",y:"0",style:{"font-size":"20px","font-family":"sans-serif",fill:"#0b0c0c","line-height":"50px","margin-top":"100px","font-weight":"bold"}},[e.createElementVNode("tspan",{x:"8",y:"55"},"92+"),e.createElementVNode("tspan",{x:"8",y:"105"},"81-91"),e.createElementVNode("tspan",{x:"8",y:"155"},"69-80"),e.createElementVNode("tspan",{x:"8",y:"205"},"55-68"),e.createElementVNode("tspan",{x:"8",y:"255"},"39-54"),e.createElementVNode("tspan",{x:"8",y:"305"},"21-38"),e.createElementVNode("tspan",{x:"8",y:"355"},"1-20")],-1),x=e.createElementVNode("text",{role:"presentation","aria-hidden":"true",x:"8",y:"15",style:{"font-size":"20px","font-family":"sans-serif",fill:"#0b0c0c","line-height":"50px","margin-top":"100px","font-weight":"bold"},"dominant-baseline":"middle"}," Score ",-1),b=e.createElementVNode("text",{role:"presentation","aria-hidden":"true",x:"85",y:"15",style:{"font-size":"20px","font-family":"sans-serif",fill:"#0b0c0c","line-height":"50px","margin-top":"100px","font-weight":"bold"},"dominant-baseline":"middle"}," Energy rating ",-1),E=e.createElementVNode("text",{role:"presentation","aria-hidden":"true",x:"460",y:"15",style:{"font-size":"20px","font-family":"sans-serif",fill:"#0b0c0c","line-height":"50px","margin-top":"100px","font-weight":"bold"},"text-anchor":"middle","dominant-baseline":"middle"}," Current ",-1),C=e.createElementVNode("text",{role:"presentation","aria-hidden":"true",x:"565",y:"15",style:{"font-size":"20px","font-family":"sans-serif",fill:"#0b0c0c","line-height":"50px","margin-top":"100px","font-weight":"bold"},"text-anchor":"middle","dominant-baseline":"middle"}," Potential ",-1),V=["y"],w=e.createElementVNode("polygon",{points:"0,25 25,50 100,50 100,0 25,0 0,25"},null,-1),N={x:"35",y:"31",fill:"black"},S=["y"],_=e.createElementVNode("polygon",{points:"0,25 25,50 100,50 100,0 25,0 0,25"},null,-1),k={x:"35",y:"31",fill:"black"},z=e.defineComponent({__name:"EPCRating",props:{currentScore:{},potentialScore:{}},setup(r){const o=r,n=e.computed(()=>i(o.currentScore)),c=e.computed(()=>i(o.potentialScore)),R=e.computed(()=>a(i(o.currentScore))),B=e.computed(()=>a(i(o.potentialScore)));return(s,D)=>(e.openBlock(),e.createElementBlock("svg",y,[f,e.createElementVNode("desc",h,"This property's energy rating is "+e.toDisplayString(n.value)+" with a score of "+e.toDisplayString(s.currentScore)+". It has a potential energy rating of C with a score of "+e.toDisplayString(s.potentialScore)+". Properties get a rating from A to G and a score. Rating C is for a score of 69 to 80. The ratings and scores are as follows from best to worst. Rating A is for a score of 92 or more. Rating B is for a score of 81 to 91. Rating C is for a score of 69 to 80. Rating D is for a score of 55 to 68. Rating E is for a score of 39 to 54. Rating F is for a score of 21 to 38. Rating G is for a score of 1 to 20.",1),m,e.createElementVNode("rect",{width:"78",height:"50",x:"72",y:"25",style:e.normalizeStyle({fill:e.unref(t).A.bandColor})},null,4),e.createElementVNode("rect",{width:"118",height:"50",x:"72",y:"75",style:e.normalizeStyle({fill:e.unref(t).B.bandColor})},null,4),e.createElementVNode("rect",{width:"158",height:"50",x:"72",y:"125",style:e.normalizeStyle({fill:e.unref(t).C.bandColor})},null,4),e.createElementVNode("rect",{width:"198",height:"50",x:"72",y:"175",style:e.normalizeStyle({fill:e.unref(t).D.bandColor})},null,4),e.createElementVNode("rect",{width:"238",height:"50",x:"72",y:"225",style:e.normalizeStyle({fill:e.unref(t).E.bandColor})},null,4),e.createElementVNode("rect",{width:"278",height:"50",x:"72",y:"275",style:e.normalizeStyle({fill:e.unref(t).F.bandColor})},null,4),e.createElementVNode("rect",{width:"318",height:"50",x:"72",y:"325",style:e.normalizeStyle({fill:e.unref(t).G.bandColor})},null,4),e.createElementVNode("rect",{width:"72",height:"50",x:"0",y:"25",style:e.normalizeStyle({fill:e.unref(t).A.scoreColor})},null,4),e.createElementVNode("rect",{width:"72",height:"50",x:"0",y:"75",style:e.normalizeStyle({fill:e.unref(t).B.scoreColor})},null,4),e.createElementVNode("rect",{width:"72",height:"50",x:"0",y:"125",style:e.normalizeStyle({fill:e.unref(t).C.scoreColor})},null,4),e.createElementVNode("rect",{width:"72",height:"50",x:"0",y:"175",style:e.normalizeStyle({fill:e.unref(t).D.scoreColor})},null,4),e.createElementVNode("rect",{width:"72",height:"50",x:"0",y:"225",style:e.normalizeStyle({fill:e.unref(t).E.scoreColor})},null,4),e.createElementVNode("rect",{width:"72",height:"50",x:"0",y:"275",style:e.normalizeStyle({fill:e.unref(t).F.scoreColor})},null,4),e.createElementVNode("rect",{width:"72",height:"50",x:"0",y:"325",style:e.normalizeStyle({fill:e.unref(t).G.scoreColor})},null,4),g,p,x,b,E,C,(e.openBlock(),e.createElementBlock("svg",{"aria-hidden":"true",x:"415",y:R.value,width:"90",height:"50",class:"rating-current rating-label",style:e.normalizeStyle({fill:e.unref(t)[n.value].scoreColor})},[w,e.createElementVNode("text",N,e.toDisplayString(s.currentScore)+" "+e.toDisplayString(n.value),1)],12,V)),(e.openBlock(),e.createElementBlock("svg",{"aria-hidden":"true",x:"515",y:B.value,width:"90",height:"50",class:"rating-potential rating-label",style:e.normalizeStyle({fill:e.unref(t)[c.value].scoreColor})},[_,e.createElementVNode("text",k,e.toDisplayString(s.potentialScore)+" "+e.toDisplayString(c.value),1)],12,S))]))}});l.EPCRating=z,Object.defineProperty(l,Symbol.toStringTag,{value:"Module"})});