vendor: 10,555 bytes, lines 1-2
1import{a as v,r as ut,j as u}from"./react-DYkIZFfQ.js";import{k as ft,D as pt,q as dt,E as ht,a as G,f as K,b as yt,A as mt,c as F,g as vt,d as V,h as bt,j as gt,l as et,u as xt,G as At,n as H,o as jt,X,Y,p as St,R as rt,C as nt,T as it,B as Pt}from"./generateCategoricalChart-CHw04U59.js";import{B as Ot}from"./BarChart-0XGZ2GHh.js";import{N as J}from"./index-DLJprFqj.js";import"./tiny-invariant-BaFNuDhB.js";import"./query-CIkbo_OU.js";import"./sdk-CDrtR4M-.js";import"./router-DpFoAHH4.js";var kt=["type","layout","connectNulls","ref"],wt=["key"];function _(t){"@babel/helpers - typeof";return _=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_(t)}function Q(t,e){if(t==null)return{};var n=Dt(t,e),r,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);for(i=0;i<s.length;i++)r=s[i],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function Dt(t,e){if(t==null)return{};var n={};for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r)){if(e.indexOf(r)>=0)continue;n[r]=t[r]}return n}function B(){return B=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},B.apply(this,arguments)}function Z(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function g(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Z(Object(n),!0).forEach(function(r){A(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Z(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function D(t){return Lt(t)||Ct(t)||Et(t)||_t()}function _t(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 2In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Et(t,e){if(t){if(typeof t=="string")return U(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return U(t,e)}}function Ct(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function Lt(t){if(Array.isArray(t))return U(t)}function U(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Tt(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function tt(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,ot(r.key),r)}}function It(t,e,n){return e&&tt(t.prototype,e),n&&tt(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function Nt(t,e,n){return e=W(e),Ft(t,at()?Reflect.construct(e,n||[],W(t).constructor):e.apply(t,n))}function Ft(t,e){if(e&&(_(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Bt(t)}function Bt(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function at(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(at=function(){return!!t})()}function W(t){return W=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},W(t)}function $t(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&q(t,e)}function q(t,e){return q=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},q(t,e)}function A(t,e,n){return e=ot(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function ot(t){var e=Rt(t,"string");return _(e)=="symbol"?e:e+""}function Rt(t,e){if(_(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(_(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}var $=(function(t){function e(){var n;Tt(this,e);for(var r=arguments.length,i=new Array(r),s=0;s<r;s++)i[s]=arguments[s];return n=Nt(this,e,[].concat(i)),A(n,"state",{isAnimationFinished:!0,totalLength:0}),A(n,"generateSimpleStrokeDasharray",function(a,o){return"".concat(o,"px ").concat(a-o,"px")}),A(n,"getStrokeDasharray",function(a,o,l){var f=l.reduce(function(j,P){return j+P});if(!f)return n.generateSimpleStrokeDasharray(o,a);for(var d=Math.floor(a/f),h=a%f,p=o-a,y=[],c=0,m=0;c<l.length;m+=l[c],++c)if(m+l[c]>h){y=[].concat(D(l.slice(0,c)),[h-m]);break}var x=y.length%2===0?[0,p]:[p];return[].concat(D(e.repeat(l,d)),D(y),x).map(function(j){return"".concat(j,"px")}).join(", ")}),A(n,"id",xt("recharts-line-")),A(n,"pathRef",function(a){n.mainCurve=a}),A(n,"handleAnimationEnd",function(){n.setState({isAnimationFinished:!0}),n.props.onAnimationEnd&&n.props.onAnimationEnd()}),A(n,"handleAnimationStart",function(){n.setState({isAnimationFinished:!1}),n.props.onAnimationStart&&n.props.onAnimationStart()}),n}return $t(e,t),It(e,[{key:"componentDidMount",value:function(){if(this.props.isAnimationActive){var r=this.getTotalLength();this.setState({totalLength:r})}}},{key:"componentDidUpdate",value:function(){if(this.props.isAnimationActive){var r=this.getTotalLength();r!==this.state.totalLength&&this.setState({totalLength:r})}}},{key:"getTotalLength",value:function(){var r=this.mainCurve;try{return r&&r.getTotalLength&&r.getTotalLength()||0}catch{return 0}}},{key:"renderErrorBar",value:function(r,i){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var s=this.props,a=s.points,o=s.xAxis,l=s.yAxis,f=s.layout,d=s.children,h=dt(d,ht);if(!h)return null;var p=function(m,x){return{x:m.x,y:m.y,value:m.value,errorVal:et(m.payload,x)}},y={clipPath:r?"url(#clipPath-".concat(i,")"):null};return v.createElement(G,y,h.map(function(c){return v.cloneElement(c,{key:"bar-".concat(c.props.dataKey),data:a,xAxis:o,yAxis:l,layout:f,dataPointFormatter:p})}))}},{key:"renderDots",value:function(r,i,s){var a=this.props.isAnimationActive;if(a&&!this.state.isAnimationFinished)return null;var o=this.props,l=o.dot,f=o.points,d=o.dataKey,h=K(this.props,!1),p=K(l,!0),y=f.map(function(m,x){var j=g(g(g({key:"dot-".concat(x),r:3},h),p),{},{index:x,cx:m.x,cy:m.y,value:m.value,dataKey:d,payload:m.payload,points:f});return e.renderDotItem(l,j)}),c={clipPath:r?"url(#clipPath-".concat(i?"":"dots-").concat(s,")"):null};return v.createElement(G,B({className:"recharts-line-dots",key:"dots"},c),y)}},{key:"renderCurveStatically",value:function(r,i,s,a){var o=this.props,l=o.type,f=o.layout,d=o.connectNulls;o.ref;var h=Q(o,kt),p=g(g(g({},K(h,!0)),{},{fill:"none",className:"recharts-line-curve",clipPath:i?"url(#clipPath-".concat(s,")"):null,points:r},a),{},{type:l,layout:f,connectNulls:d});return v.createElement(yt,B({},p,{pathRef:this.pathRef}))}},{key:"renderCurveWithAnimation",value:function(r,i){var s=this,a=this.props,o=a.points,l=a.strokeDasharray,f=a.isAnimationActive,d=a.animationBegin,h=a.animationDuration,p=a.animationEasing,y=a.animationId,c=a.animateNewValues,m=a.width,x=a.height,j=this.state,P=j.prevPoints,E=j.totalLength;return v.createElement(mt,{begin:d,duration:h,isActive:f,easing:p,from:{t:0},to:{t:1},key:"line-".concat(y),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(k){var S=k.t;if(P){var C=P.length/o.length,O=o.map(function(b,M){var I=Math.floor(M*C);if(P[I]){var N=P[I],w=F(N.x,b.x),st=F(N.y,b.y);return g(g({},b),{},{x:w(S),y:st(S)})}if(c){var lt=F(m*2,b.x),ct=F(x/2,b.y);return g(g({},b),{},{x:lt(S),y:ct(S)})}return g(g({},b),{},{x:b.x,y:b.y})});return s.renderCurveStatically(O,r,i)}var R=F(0,E),L=R(S),T;if(l){var z="".concat(l).split(/[,\s]+/gim).map(function(b){return parseFloat(b)});T=s.getStrokeDasharray(L,E,z)}else T=s.generateSimpleStrokeDasharray(E,L);return s.renderCurveStatically(o,r,i,{strokeDasharray:T})})}},{key:"renderCurve",value:function(r,i){var s=this.props,a=s.points,o=s.isAnimationActive,l=this.state,f=l.prevPoints,d=l.totalLength;return o&&a&&a.length&&(!f&&d>0||!vt(f,a))?this.renderCurveWithAnimation(r,i):this.renderCurveStatically(a,r,i)}},{key:"render",value:function(){var r,i=this.props,s=i.hide,a=i.dot,o=i.points,l=i.className,f=i.xAxis,d=i.yAxis,h=i.top,p=i.left,y=i.width,c=i.height,m=i.isAnimationActive,x=i.id;if(s||!o||!o.length)return null;var j=this.state.isAnimationFinished,P=o.length===1,E=J("recharts-line",l),k=f&&f.allowDataOverflow,S=d&&d.allowDataOverflow,C=k||S,O=V(x)?this.id:x,R=(r=K(a,!1))!==null&&r!==void 0?r:{r:3,strokeWidth:2},L=R.r,T=L===void 0?3:L,z=R.strokeWidth,b=z===void 0?2:z,M=bt(a)?a:{},I=M.clipDot,N=I===void 0?!0:I,w=T*2+b;return v.createElement(G,{className:E},k||S?v.createElement("defs",null,v.createElement("clipPath",{id:"clipPath-".concat(O)},v.createElement("rect",{x:k?p:p-y/2,y:S?h:h-c/2,width:k?y:y*2,height:S?c:c*2})),!N&&v.createElement("clipPath",{id:"clipPath-dots-".concat(O)},v.createElement("rect",{x:p-w/2,y:h-w/2,width:y+w,height:c+w}))):null,!P&&this.renderCurve(C,O),this.renderErrorBar(C,O),(P||a)&&this.renderDots(C,N,O),(!m||j)&>.renderCallByParent(this.props,o))}}],[{key:"getDerivedStateFromProps",value:function(r,i){return r.animationId!==i.prevAnimationId?{prevAnimationId:r.animationId,curPoints:r.points,prevPoints:i.curPoints}:r.points!==i.curPoints?{curPoints:r.points}:null}},{key:"repeat",value:function(r,i){for(var s=r.length%2!==0?[].concat(D(r),[0]):r,a=[],o=0;o<i;++o)a=[].concat(D(a),D(s));return a}},{key:"renderDotItem",value:function(r,i){var s;if(v.isValidElement(r))s=v.cloneElement(r,i);else if(ft(r))s=r(i);else{var a=i.key,o=Q(i,wt),l=J("recharts-line-dot",typeof r!="boolean"?r.className:"");s=v.createElement(pt,B({key:a},o,{className:l}))}return s}}])})(ut.PureComponent);A($,"displayName","Line");A($,"defaultProps",{xAxisId:0,yAxisId:0,connectNulls:!1,activeDot:!0,dot:!0,legendT
2ype:"line",stroke:"#3182bd",strokeWidth:1,fill:"#fff",points:[],isAnimationActive:!At.isSsr,animateNewValues:!0,animationBegin:0,animationDuration:1500,animationEasing:"ease",hide:!1,label:!1});A($,"getComposedData",function(t){var e=t.props,n=t.xAxis,r=t.yAxis,i=t.xAxisTicks,s=t.yAxisTicks,a=t.dataKey,o=t.bandSize,l=t.displayedData,f=t.offset,d=e.layout,h=l.map(function(p,y){var c=et(p,a);return d==="horizontal"?{x:H({axis:n,ticks:i,bandSize:o,entry:p,index:y}),y:V(c)?null:r.scale(c),value:c,payload:p}:{x:V(c)?null:n.scale(c),y:H({axis:r,ticks:s,bandSize:o,entry:p,index:y}),value:c,payload:p}});return g({points:h,layout:d},f)});var zt=jt({chartName:"LineChart",GraphicalChild:$,axisComponents:[{axisType:"xAxis",AxisComp:X},{axisType:"yAxis",AxisComp:Y}],formatAxisMap:St});function Yt({data:t}){return u.jsx(rt,{width:"100%",height:260,children:u.jsxs(Ot,{data:t,margin:{top:12,right:8,left:0,bottom:0},children:[u.jsxs("defs",{children:[u.jsxs("linearGradient",{id:"barFinn",x1:"0",y1:"0",x2:"0",y2:"1",children:[u.jsx("stop",{offset:"0%",stopColor:"#2563eb"}),u.jsx("stop",{offset:"100%",stopColor:"#3b82f6"})]}),u.jsxs("linearGradient",{id:"barAI",x1:"0",y1:"0",x2:"0",y2:"1",children:[u.jsx("stop",{offset:"0%",stopColor:"#7c3aed"}),u.jsx("stop",{offset:"100%",stopColor:"#8b5cf6"})]}),u.jsxs("linearGradient",{id:"barSolgt",x1:"0",y1:"0",x2:"0",y2:"1",children:[u.jsx("stop",{offset:"0%",stopColor:"#94a3b8"}),u.jsx("stop",{offset:"100%",stopColor:"#cbd5e1"})]})]}),u.jsx(nt,{strokeDasharray:"3 3",vertical:!1,stroke:"#f1f5f9"}),u.jsx(X,{dataKey:"name",tick:{fontSize:9},interval:0,angle:-20,textAnchor:"end",height:52}),u.jsx(Y,{tickFormatter:e=>`${(e/1e3).toFixed(0)}k`,tick:{fontSize:10},width:44}),u.jsx(it,{formatter:(e,n,r)=>[`${e.toLocaleString("nb-NO")} kr`,r.payload.src+(r.payload.sold?" (solgt)":"")],contentStyle:{borderRadius:12,border:"1px solid #e2e8f0",fontSize:12}}),u.jsx(Pt,{dataKey:"price",radius:[6,6,0,0],fill:"#2563eb",shape:e=>{const{x:n,y:r,width:i,height:s,payload:a}=e;let o="barFinn";return a.src==="AI"?o="barAI":a.sold&&(o="barSolgt"),u.jsx("rect",{x:n,y:r,width:i,height:s,rx:6,fill:`url(#${o})`,opacity:a.sold?.5:1})}})]})})}function Ht({data:t}){return u.jsx(rt,{width:"100%",height:200,children:u.jsxs(zt,{data:t,margin:{top:8,right:8,left:0,bottom:0},children:[u.jsx(nt,{strokeDasharray:"3 3",vertical:!1,stroke:"#f1f5f9"}),u.jsx(X,{dataKey:"month",tick:{fontSize:10}}),u.jsx(Y,{tickFormatter:e=>`${(e/1e3).toFixed(0)}k`,tick:{fontSize:10},width:42}),u.jsx(it,{formatter:e=>[`${e.toLocaleString("nb-NO")} kr`,"Snittspris"],contentStyle:{borderRadius:12,border:"1px solid #e2e8f0",fontSize:12}}),u.jsx($,{type:"monotone",dataKey:"avg_price",stroke:"#2563eb",strokeWidth:2.5,dot:{r:3,fill:"#2563eb"}})]})})}export{Yt as MarketPriceBars,Ht as MarketTrendLine};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.