sdcc-rent-calculator 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/dist/sdcc-rent-calculator.js +523 -0
- package/package.json +42 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Katie Chapman
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,523 @@
|
|
|
1
|
+
(()=>{var Q,y,he,Qe,F,ue,ge,ve,K,L,U,ye,ne,Z,ee,Ve,j={},Y=[],qe=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,V=Array.isArray;function S(e,t){for(var n in t)e[n]=t[n];return e}function oe(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function re(e,t,n){var o,s,r,l={};for(r in t)r=="key"?o=t[r]:r=="ref"?s=t[r]:l[r]=t[r];if(arguments.length>2&&(l.children=arguments.length>3?Q.call(arguments,2):n),typeof e=="function"&&e.defaultProps!=null)for(r in e.defaultProps)l[r]===void 0&&(l[r]=e.defaultProps[r]);return O(e,l,o,s,null)}function O(e,t,n,o,s){var r={type:e,props:t,key:n,ref:o,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:s??++he,__i:-1,__u:0};return s==null&&y.vnode!=null&&y.vnode(r),r}function R(e){return e.children}function $(e,t){this.props=e,this.context=t}function I(e,t){if(t==null)return e.__?I(e.__,e.__i+1):null;for(var n;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null)return n.__e;return typeof e.type=="function"?I(e):null}function Ge(e){if(e.__P&&e.__d){var t=e.__v,n=t.__e,o=[],s=[],r=S({},t);r.__v=t.__v+1,y.vnode&&y.vnode(r),ie(e.__P,r,t,e.__n,e.__P.namespaceURI,32&t.__u?[n]:null,o,n??I(t),!!(32&t.__u),s),r.__v=t.__v,r.__.__k[r.__i]=r,ke(o,r,s),t.__e=t.__=null,r.__e!=n&&xe(r)}}function xe(e){if((e=e.__)!=null&&e.__c!=null)return e.__e=e.__c.base=null,e.__k.some(function(t){if(t!=null&&t.__e!=null)return e.__e=e.__c.base=t.__e}),xe(e)}function de(e){(!e.__d&&(e.__d=!0)&&F.push(e)&&!B.__r++||ue!=y.debounceRendering)&&((ue=y.debounceRendering)||ge)(B)}function B(){try{for(var e,t=1;F.length;)F.length>t&&F.sort(ve),e=F.shift(),t=F.length,Ge(e)}finally{F.length=B.__r=0}}function be(e,t,n,o,s,r,l,p,_,c,f){var i,d,u,h,b,g,v,m=o&&o.__k||Y,N=t.length;for(_=Je(n,t,m,_,N),i=0;i<N;i++)(u=n.__k[i])!=null&&(d=u.__i!=-1&&m[u.__i]||j,u.__i=i,g=ie(e,u,d,s,r,l,p,_,c,f),h=u.__e,u.ref&&d.ref!=u.ref&&(d.ref&&ae(d.ref,null,u),f.push(u.ref,u.__c||h,u)),b==null&&h!=null&&(b=h),(v=!!(4&u.__u))||d.__k===u.__k?(_=we(u,_,e,v),v&&d.__e&&(d.__e=null)):typeof u.type=="function"&&g!==void 0?_=g:h&&(_=h.nextSibling),u.__u&=-7);return n.__e=b,_}function Je(e,t,n,o,s){var r,l,p,_,c,f=n.length,i=f,d=0;for(e.__k=new Array(s),r=0;r<s;r++)(l=t[r])!=null&&typeof l!="boolean"&&typeof l!="function"?(typeof l=="string"||typeof l=="number"||typeof l=="bigint"||l.constructor==String?l=e.__k[r]=O(null,l,null,null,null):V(l)?l=e.__k[r]=O(R,{children:l},null,null,null):l.constructor===void 0&&l.__b>0?l=e.__k[r]=O(l.type,l.props,l.key,l.ref?l.ref:null,l.__v):e.__k[r]=l,_=r+d,l.__=e,l.__b=e.__b+1,p=null,(c=l.__i=Xe(l,n,_,i))!=-1&&(i--,(p=n[c])&&(p.__u|=2)),p==null||p.__v==null?(c==-1&&(s>f?d--:s<f&&d++),typeof l.type!="function"&&(l.__u|=4)):c!=_&&(c==_-1?d--:c==_+1?d++:(c>_?d--:d++,l.__u|=4))):e.__k[r]=null;if(i)for(r=0;r<f;r++)(p=n[r])!=null&&(2&p.__u)==0&&(p.__e==o&&(o=I(p)),Ce(p,p));return o}function we(e,t,n,o){var s,r;if(typeof e.type=="function"){for(s=e.__k,r=0;s&&r<s.length;r++)s[r]&&(s[r].__=e,t=we(s[r],t,n,o));return t}e.__e!=t&&(o&&(t&&e.type&&!t.parentNode&&(t=I(e)),n.insertBefore(e.__e,t||null)),t=e.__e);do t=t&&t.nextSibling;while(t!=null&&t.nodeType==8);return t}function Xe(e,t,n,o){var s,r,l,p=e.key,_=e.type,c=t[n],f=c!=null&&(2&c.__u)==0;if(c===null&&p==null||f&&p==c.key&&_==c.type)return n;if(o>(f?1:0)){for(s=n-1,r=n+1;s>=0||r<t.length;)if((c=t[l=s>=0?s--:r++])!=null&&(2&c.__u)==0&&p==c.key&&_==c.type)return l}return-1}function fe(e,t,n){t[0]=="-"?e.setProperty(t,n??""):e[t]=n==null?"":typeof n!="number"||qe.test(t)?n:n+"px"}function z(e,t,n,o,s){var r,l;e:if(t=="style")if(typeof n=="string")e.style.cssText=n;else{if(typeof o=="string"&&(e.style.cssText=o=""),o)for(t in o)n&&t in n||fe(e.style,t,"");if(n)for(t in n)o&&n[t]==o[t]||fe(e.style,t,n[t])}else if(t[0]=="o"&&t[1]=="n")r=t!=(t=t.replace(ye,"$1")),l=t.toLowerCase(),t=l in e||t=="onFocusOut"||t=="onFocusIn"?l.slice(2):t.slice(2),e.l||(e.l={}),e.l[t+r]=n,n?o?n[U]=o[U]:(n[U]=ne,e.addEventListener(t,r?ee:Z,r)):e.removeEventListener(t,r?ee:Z,r);else{if(s=="http://www.w3.org/2000/svg")t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(t!="width"&&t!="height"&&t!="href"&&t!="list"&&t!="form"&&t!="tabIndex"&&t!="download"&&t!="rowSpan"&&t!="colSpan"&&t!="role"&&t!="popover"&&t in e)try{e[t]=n??"";break e}catch{}typeof n=="function"||(n==null||n===!1&&t[4]!="-"?e.removeAttribute(t):e.setAttribute(t,t=="popover"&&n==1?"":n))}}function me(e){return function(t){if(this.l){var n=this.l[t.type+e];if(t[L]==null)t[L]=ne++;else if(t[L]<n[U])return;return n(y.event?y.event(t):t)}}}function ie(e,t,n,o,s,r,l,p,_,c){var f,i,d,u,h,b,g,v,m,N,E,A,H,P,M,k=t.type;if(t.constructor!==void 0)return null;128&n.__u&&(_=!!(32&n.__u),r=[p=t.__e=n.__e]),(f=y.__b)&&f(t);e:if(typeof k=="function")try{if(v=t.props,m=k.prototype&&k.prototype.render,N=(f=k.contextType)&&o[f.__c],E=f?N?N.props.value:f.__:o,n.__c?g=(i=t.__c=n.__c).__=i.__E:(m?t.__c=i=new k(v,E):(t.__c=i=new $(v,E),i.constructor=k,i.render=Ze),N&&N.sub(i),i.state||(i.state={}),i.__n=o,d=i.__d=!0,i.__h=[],i._sb=[]),m&&i.__s==null&&(i.__s=i.state),m&&k.getDerivedStateFromProps!=null&&(i.__s==i.state&&(i.__s=S({},i.__s)),S(i.__s,k.getDerivedStateFromProps(v,i.__s))),u=i.props,h=i.state,i.__v=t,d)m&&k.getDerivedStateFromProps==null&&i.componentWillMount!=null&&i.componentWillMount(),m&&i.componentDidMount!=null&&i.__h.push(i.componentDidMount);else{if(m&&k.getDerivedStateFromProps==null&&v!==u&&i.componentWillReceiveProps!=null&&i.componentWillReceiveProps(v,E),t.__v==n.__v||!i.__e&&i.shouldComponentUpdate!=null&&i.shouldComponentUpdate(v,i.__s,E)===!1){t.__v!=n.__v&&(i.props=v,i.state=i.__s,i.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.some(function(T){T&&(T.__=t)}),Y.push.apply(i.__h,i._sb),i._sb=[],i.__h.length&&l.push(i);break e}i.componentWillUpdate!=null&&i.componentWillUpdate(v,i.__s,E),m&&i.componentDidUpdate!=null&&i.__h.push(function(){i.componentDidUpdate(u,h,b)})}if(i.context=E,i.props=v,i.__P=e,i.__e=!1,A=y.__r,H=0,m)i.state=i.__s,i.__d=!1,A&&A(t),f=i.render(i.props,i.state,i.context),Y.push.apply(i.__h,i._sb),i._sb=[];else do i.__d=!1,A&&A(t),f=i.render(i.props,i.state,i.context),i.state=i.__s;while(i.__d&&++H<25);i.state=i.__s,i.getChildContext!=null&&(o=S(S({},o),i.getChildContext())),m&&!d&&i.getSnapshotBeforeUpdate!=null&&(b=i.getSnapshotBeforeUpdate(u,h)),P=f!=null&&f.type===R&&f.key==null?Ne(f.props.children):f,p=be(e,V(P)?P:[P],t,n,o,s,r,l,p,_,c),i.base=t.__e,t.__u&=-161,i.__h.length&&l.push(i),g&&(i.__E=i.__=null)}catch(T){if(t.__v=null,_||r!=null)if(T.then){for(t.__u|=_?160:128;p&&p.nodeType==8&&p.nextSibling;)p=p.nextSibling;r[r.indexOf(p)]=null,t.__e=p}else{for(M=r.length;M--;)oe(r[M]);te(t)}else t.__e=n.__e,t.__k=n.__k,T.then||te(t);y.__e(T,t,n)}else r==null&&t.__v==n.__v?(t.__k=n.__k,t.__e=n.__e):p=t.__e=Ke(n.__e,t,n,o,s,r,l,_,c);return(f=y.diffed)&&f(t),128&t.__u?void 0:p}function te(e){e&&(e.__c&&(e.__c.__e=!0),e.__k&&e.__k.some(te))}function ke(e,t,n){for(var o=0;o<n.length;o++)ae(n[o],n[++o],n[++o]);y.__c&&y.__c(t,e),e.some(function(s){try{e=s.__h,s.__h=[],e.some(function(r){r.call(s)})}catch(r){y.__e(r,s.__v)}})}function Ne(e){return typeof e!="object"||e==null||e.__b>0?e:V(e)?e.map(Ne):e.constructor!==void 0?null:S({},e)}function Ke(e,t,n,o,s,r,l,p,_){var c,f,i,d,u,h,b,g=n.props||j,v=t.props,m=t.type;if(m=="svg"?s="http://www.w3.org/2000/svg":m=="math"?s="http://www.w3.org/1998/Math/MathML":s||(s="http://www.w3.org/1999/xhtml"),r!=null){for(c=0;c<r.length;c++)if((u=r[c])&&"setAttribute"in u==!!m&&(m?u.localName==m:u.nodeType==3)){e=u,r[c]=null;break}}if(e==null){if(m==null)return document.createTextNode(v);e=document.createElementNS(s,m,v.is&&v),p&&(y.__m&&y.__m(t,r),p=!1),r=null}if(m==null)g===v||p&&e.data==v||(e.data=v);else{if(r=m=="textarea"&&v.defaultValue!=null?null:r&&Q.call(e.childNodes),!p&&r!=null)for(g={},c=0;c<e.attributes.length;c++)g[(u=e.attributes[c]).name]=u.value;for(c in g)u=g[c],c=="dangerouslySetInnerHTML"?i=u:c=="children"||c in v||c=="value"&&"defaultValue"in v||c=="checked"&&"defaultChecked"in v||z(e,c,null,u,s);for(c in v)u=v[c],c=="children"?d=u:c=="dangerouslySetInnerHTML"?f=u:c=="value"?h=u:c=="checked"?b=u:p&&typeof u!="function"||g[c]===u||z(e,c,u,g[c],s);if(f)p||i&&(f.__html==i.__html||f.__html==e.innerHTML)||(e.innerHTML=f.__html),t.__k=[];else if(i&&(e.innerHTML=""),be(t.type=="template"?e.content:e,V(d)?d:[d],t,n,o,m=="foreignObject"?"http://www.w3.org/1999/xhtml":s,r,l,r?r[0]:n.__k&&I(n,0),p,_),r!=null)for(c=r.length;c--;)oe(r[c]);p&&m!="textarea"||(c="value",m=="progress"&&h==null?e.removeAttribute("value"):h!=null&&(h!==e[c]||m=="progress"&&!h||m=="option"&&h!=g[c])&&z(e,c,h,g[c],s),c="checked",b!=null&&b!=e[c]&&z(e,c,b,g[c],s))}return e}function ae(e,t,n){try{if(typeof e=="function"){var o=typeof e.__u=="function";o&&e.__u(),o&&t==null||(e.__u=e(t))}else e.current=t}catch(s){y.__e(s,n)}}function Ce(e,t,n){var o,s;if(y.unmount&&y.unmount(e),(o=e.ref)&&(o.current&&o.current!=e.__e||ae(o,null,t)),(o=e.__c)!=null){if(o.componentWillUnmount)try{o.componentWillUnmount()}catch(r){y.__e(r,t)}o.base=o.__P=null}if(o=e.__k)for(s=0;s<o.length;s++)o[s]&&Ce(o[s],t,n||typeof e.type!="function");n||oe(e.__e),e.__c=e.__=e.__e=void 0}function Ze(e,t,n){return this.constructor(e,n)}function se(e,t,n){var o,s,r,l;t==document&&(t=document.documentElement),y.__&&y.__(e,t),s=(o=typeof n=="function")?null:n&&n.__k||t.__k,r=[],l=[],ie(t,e=(!o&&n||t).__k=re(R,null,[e]),s||j,j,t.namespaceURI,!o&&n?[n]:s?null:t.firstChild?Q.call(t.childNodes):null,r,!o&&n?n:s?s.__e:t.firstChild,o,l),ke(r,e,l)}Q=Y.slice,y={__e:function(e,t,n,o){for(var s,r,l;t=t.__;)if((s=t.__c)&&!s.__)try{if((r=s.constructor)&&r.getDerivedStateFromError!=null&&(s.setState(r.getDerivedStateFromError(e)),l=s.__d),s.componentDidCatch!=null&&(s.componentDidCatch(e,o||{}),l=s.__d),l)return s.__E=s}catch(p){e=p}throw e}},he=0,Qe=function(e){return e!=null&&e.constructor===void 0},$.prototype.setState=function(e,t){var n;n=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=S({},this.state),typeof e=="function"&&(e=e(S({},n),this.props)),e&&S(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),de(this))},$.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),de(this))},$.prototype.render=R,F=[],ge=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,ve=function(e,t){return e.__v.__b-t.__v.__b},B.__r=0,K=Math.random().toString(8),L="__d"+K,U="__a"+K,ye=/(PointerCapture)$|Capture$/i,ne=0,Z=me(!1),ee=me(!0),Ve=0;var G,x,le,Ee,ce=0,Ie=[],w=y,Se=w.__b,Te=w.__r,Fe=w.diffed,Ae=w.__c,Pe=w.unmount,De=w.__;function Re(e,t){w.__h&&w.__h(x,e,ce||t),ce=0;var n=x.__H||(x.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function D(e){return ce=1,et(He,e)}function et(e,t,n){var o=Re(G++,2);if(o.t=e,!o.__c&&(o.__=[n?n(t):He(void 0,t),function(p){var _=o.__N?o.__N[0]:o.__[0],c=o.t(_,p);_!==c&&(o.__N=[c,o.__[1]],o.__c.setState({}))}],o.__c=x,!x.__f)){var s=function(p,_,c){if(!o.__c.__H)return!0;var f=o.__c.__H.__.filter(function(d){return d.__c});if(f.every(function(d){return!d.__N}))return!r||r.call(this,p,_,c);var i=o.__c.props!==p;return f.some(function(d){if(d.__N){var u=d.__[0];d.__=d.__N,d.__N=void 0,u!==d.__[0]&&(i=!0)}}),r&&r.call(this,p,_,c)||i};x.__f=!0;var r=x.shouldComponentUpdate,l=x.componentWillUpdate;x.componentWillUpdate=function(p,_,c){if(this.__e){var f=r;r=void 0,s(p,_,c),r=f}l&&l.call(this,p,_,c)},x.shouldComponentUpdate=s}return o.__N||o.__}function We(e,t){var n=Re(G++,7);return ot(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function tt(){for(var e;e=Ie.shift();){var t=e.__H;if(e.__P&&t)try{t.__h.some(q),t.__h.some(pe),t.__h=[]}catch(n){t.__h=[],w.__e(n,e.__v)}}}w.__b=function(e){x=null,Se&&Se(e)},w.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),De&&De(e,t)},w.__r=function(e){Te&&Te(e),G=0;var t=(x=e.__c).__H;t&&(le===x?(t.__h=[],x.__h=[],t.__.some(function(n){n.__N&&(n.__=n.__N),n.u=n.__N=void 0})):(t.__h.some(q),t.__h.some(pe),t.__h=[],G=0)),le=x},w.diffed=function(e){Fe&&Fe(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(Ie.push(t)!==1&&Ee===w.requestAnimationFrame||((Ee=w.requestAnimationFrame)||nt)(tt)),t.__H.__.some(function(n){n.u&&(n.__H=n.u),n.u=void 0})),le=x=null},w.__c=function(e,t){t.some(function(n){try{n.__h.some(q),n.__h=n.__h.filter(function(o){return!o.__||pe(o)})}catch(o){t.some(function(s){s.__h&&(s.__h=[])}),t=[],w.__e(o,n.__v)}}),Ae&&Ae(e,t)},w.unmount=function(e){Pe&&Pe(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.some(function(o){try{q(o)}catch(s){t=s}}),n.__H=void 0,t&&w.__e(t,n.__v))};var Me=typeof requestAnimationFrame=="function";function nt(e){var t,n=function(){clearTimeout(o),Me&&cancelAnimationFrame(t),setTimeout(e)},o=setTimeout(n,35);Me&&(t=requestAnimationFrame(n))}function q(e){var t=x,n=e.__c;typeof n=="function"&&(e.__c=void 0,n()),x=t}function pe(e){var t=x;e.__c=e.__(),x=t}function ot(e,t){return!e||e.length!==t.length||t.some(function(n,o){return n!==e[o]})}function He(e,t){return typeof t=="function"?t(e):t}var rt={RATE_2025:.1,FIXED_CHARGE_2025:3,MIN_RENT_2025:27.4,OAP_THRESHOLD_2025:289.3,RATE_2026:.125,MIN_RENT_2026:35,OAP_THRESHOLD_2026:299.3,OAP_DISCOUNT:10,CHILD_DISCOUNT:2,SUBSIDIARY_INCOME_FLAG:320,WFP_FORMULA_RATE:.6,WFP_THRESHOLDS:{1:705,2:806,3:907,4:998,5:1124}};function Ue({currentRent:e,earners:t,children:n,wfp:o,wfpAmount:s,oap:r}){let l=rt,p=Number(e)||0,_=Math.max(1,Number(t)||1),c=Math.max(0,Number(n)||0),i=r&&_===1&&c===0?l.OAP_DISCOUNT:0,d=p>0&&p<=l.MIN_RENT_2025,u=d?l.MIN_RENT_2025:p,h=p>0?Math.max(0,(u+i-l.FIXED_CHARGE_2025)/l.RATE_2025):0,b=c>=1?l.WFP_THRESHOLDS[Math.min(c,5)]??l.WFP_THRESHOLDS[5]:0,g=o&&c>0?Math.max(0,(b-h)*l.WFP_FORMULA_RATE):0,v=s!==""&&!isNaN(parseFloat(s))?parseFloat(s):null,m=0,N=!1,E=!1;o&&c>0&&(v!==null?m=v:(m=g,N=!0,E=g===0));let A=h*l.RATE_2026-c*l.CHILD_DISCOUNT,H=h>0?Math.max(l.MIN_RENT_2026,A)-i:0,P=m*l.RATE_2026,M=H+P,k=p>0&&h>0?M-p:0,T=k*52,Be=_>1&&h>l.SUBSIDIARY_INCOME_FLAG,X=p>0&&h>0;return{hasResult:X,currentRent:p,proposed2026:X?M:null,proposed2026ExclWfp:X?H:null,wfpExtraRent:P,weeklyIncrease:k,annualIncrease:T,impliedIncome:h,atMin:d,oapDiscount:i,wfpUsed:m,wfpEstimated:N,wfpOverThreshold:E,subsidiaryCapFlag:Be,childCount:c,wfpThreshold:b,wfp:o&&c>0}}function C(e,{showSign:t=!1,decimals:n=2}={}){return e==null||isNaN(e)?"\u2014":`${t&&e>0?"+":e<0?"\u2212":""}\u20AC${Math.abs(e).toFixed(n)}`}function ze(e){return e==null||isNaN(e)?"\u2014":`${e>0?"+":e<0?"\u2212":""}\u20AC${Math.abs(Math.round(e)).toLocaleString("en-IE")}`}var it=0;function a(e,t,n,o,s,r){t||(t={});var l,p,_=t;if("ref"in _)for(p in _={},t)p=="ref"?l=t[p]:_[p]=t[p];var c={type:e,props:_,key:n,ref:l,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--it,__i:-1,__u:0,__source:s,__self:r};if(typeof e=="function"&&(l=e.defaultProps))for(p in l)_[p]===void 0&&(_[p]=l[p]);return y.vnode&&y.vnode(c),c}var at="https://www.peoplebeforeprofit.ie/take-action/";function W({label:e,hint:t,children:n}){return a("div",{className:"field",children:[a("label",{className:"field-label",children:e}),t&&a("p",{className:"field-hint",children:t}),a("div",{className:"field-control",children:n})]})}function Le({value:e,onChange:t,placeholder:n="0.00"}){return a("div",{className:"money-input",children:[a("span",{className:"money-prefix",children:"\u20AC"}),a("input",{type:"number",inputMode:"decimal",min:"0",step:"0.01",placeholder:n,value:e,onInput:o=>t(o.target.value)})]})}function Oe({value:e,setValue:t,min:n=0,max:o=99}){return a("div",{className:"stepper",children:[a("button",{type:"button",className:"stepper-btn",onClick:()=>t(Math.max(n,e-1)),disabled:e<=n,"aria-label":"Decrease",children:"\u2212"}),a("div",{className:"stepper-value",children:e}),a("button",{type:"button",className:"stepper-btn",onClick:()=>t(Math.min(o,e+1)),disabled:e>=o,"aria-label":"Increase",children:"+"})]})}function $e({value:e,options:t,onChange:n}){return a("div",{className:"segmented",role:"radiogroup",children:t.map(o=>a("button",{type:"button",role:"radio","aria-checked":e===o.value,className:"segmented-opt"+(e===o.value?" is-active":""),onClick:()=>n(o.value),children:o.label},o.value))})}function st({currentRent:e,setCurrentRent:t,earners:n,setEarners:o,children:s,setChildren:r,wfp:l,setWfp:p,wfpAmount:_,setWfpAmount:c,oap:f,setOap:i}){let d=s>0;return a("div",{className:"calc-form",children:[a(W,{label:"Question 1 \u2014 What is your current weekly rent?",hint:"Enter the weekly amount from your rent notice.",children:a(Le,{value:e,onChange:t})}),a(W,{label:"Question 2 \u2014 How many wage earners are on the rent book?",hint:"Everyone whose income is assessed in your rent.",children:a(Oe,{value:n,setValue:o,min:1,max:8})}),a(W,{label:"Question 3 \u2014 How many non-earning children under 18 are in the household?",hint:"Children with no income of their own \u2014 enter 0 if none.",children:a(Oe,{value:s,setValue:r,min:0,max:10})}),d&&a(W,{label:"Question 4 \u2014 Do you receive Working Family Payment (WFP)?",hint:"WFP is a weekly social welfare payment for working families with children. Under the proposed 2026 scheme, WFP would be counted as income for the first time.",children:a($e,{value:l?"yes":"no",options:[{value:"no",label:"No"},{value:"yes",label:"Yes"}],onChange:h=>p(h==="yes")})}),d&&l&&a(W,{label:"Question 4b \u2014 If you know your weekly WFP amount, enter it here (optional)",hint:"Check your payment letter or MyWelfare.ie. Leave blank and we will estimate it for you using the standard DSP formula.",children:a(Le,{value:_,onChange:c,placeholder:"e.g. 153.00"})}),n===1&&s===0&&a(W,{label:"Question 5 \u2014 Are you the sole occupant, aged 65 or over, on the state pension or less?",hint:"This applies only to single occupants aged 65+ on the state pension rate.",children:a($e,{value:f?"yes":"no",options:[{value:"no",label:"No"},{value:"yes",label:"Yes"}],onChange:h=>i(h==="yes")})})]})}function lt({result:e}){if(!e||!e.hasResult)return a("div",{className:"result-empty",children:[a("p",{className:"result-empty-label",children:"Your estimate"}),a("h2",{className:"result-empty-title",children:"Your figures appear here."}),a("p",{className:"result-empty-sub",children:"Enter your current weekly rent on the left \u2014 the estimate updates as you type."})]});let t=e.annualIncrease,n=t>.5,o=t<-.5,s=[];return s.push({text:"This is an estimate. SDCC will calculate your actual 2026 rent using full income information they hold on file. Your actual increase may differ."}),e.wfp?e.wfpOverThreshold?s.push({highlight:!0,text:"WFP NOTE: You said you receive WFP but your implied income may be above the eligibility threshold. If you do receive it, enter the exact amount in Q4b for accuracy."}):e.wfpEstimated?s.push({highlight:!0,text:`WFP ESTIMATED using standard formula (60% of threshold minus your income). Amount used: ${C(e.wfpUsed)}/wk. Enter your actual amount in Q4b if known.`}):s.push({text:`WFP INCLUDED: ${C(e.wfpUsed)}/wk adds ${C(e.wfpExtraRent)}/wk to your 2026 rent (${ze(e.wfpExtraRent*52)} from WFP alone).`}):s.push({text:"Working Family Payment: not applicable based on your answers."}),e.subsidiaryCapFlag?s.push({highlight:!0,text:"ADDITIONAL EARNERS \u2014 YOUR RENT MAY BE LOWER: If any additional earner on your rent book earns more than approximately \u20AC420\u2013\u20AC470/week net, the 2026 scheme could be cheaper for you than shown. The cap of \u20AC40/week per additional earner can outweigh the rate increase on the principal income. This estimate assumes no cap benefit applies \u2014 contact SDCC for a precise calculation."}):s.push({text:"Additional earners: the subsidiary earner cap does not appear to produce a saving at your income level based on your answers."}),e.atMin?s.push({highlight:!0,text:"MINIMUM RENT: Your current rent is at or near the minimum of \u20AC27.40. The 2026 minimum rises to \u20AC35.00 \u2014 an increase of at least \u20AC7.60/week (\u20AC395/year) regardless of income. This is already reflected in the estimate above."}):s.push({text:"Minimum rent: the minimum rises from \u20AC27.40 to \u20AC35.00 in 2026. Already reflected in your estimate above."}),a("div",{className:"result-filled",children:[a("p",{className:"result-eyebrow",children:"Estimated annual rent change"}),a("div",{className:"result-headline"+(n?" up":o?" down":""),children:[n&&a("span",{className:"result-sign",children:"+"}),o&&a("span",{className:"result-sign",children:"\u2212"}),a("span",{className:"result-amount",children:["\u20AC",Math.abs(Math.round(t)).toLocaleString("en-IE")]}),a("span",{className:"result-per",children:"/ year"})]}),a("p",{className:"result-weekly",children:[C(e.weeklyIncrease,{showSign:!0})," per week"]}),a("div",{className:"result-rows",children:[a("div",{className:"result-row",children:[a("span",{children:"Weekly rent now (2025)"}),a("span",{className:"result-row-val",children:C(e.currentRent)})]}),a("div",{className:"result-row",children:[a("span",{children:"2026 rent (excluding WFP impact)"}),a("span",{className:"result-row-val",children:C(e.proposed2026ExclWfp)})]}),e.wfp&&a("div",{className:"result-row",children:[a("span",{children:["Additional rent from WFP (",C(e.wfpUsed)," \xD7 12.5%)"]}),a("span",{className:"result-row-val",children:C(e.wfpExtraRent)})]}),a("div",{className:"result-row",children:[a("span",{children:"Total weekly rent proposed (2026)"}),a("span",{className:"result-row-val",children:C(e.proposed2026)})]}),a("div",{className:"result-row strong",children:[a("span",{children:"Weekly change"}),a("span",{className:"result-row-val",children:C(e.weeklyIncrease,{showSign:!0})})]})]}),a("p",{className:"result-notes-label",children:"Important \u2014 please read"}),a("div",{className:"result-notes",children:s.map((r,l)=>a("div",{className:"result-note"+(r.highlight?" note-highlight":""),children:[a("strong",{children:[l+1,"."]})," ",r.text]},l))})]})}function ct({result:e,campaignUrl:t}){let n=e.annualIncrease,o=n>=400;return a("section",{className:"cta",children:a("div",{className:"cta-inner",children:[a("div",{className:"cta-main",children:[a("p",{className:"cta-eyebrow",children:"What to do now"}),a("h2",{className:"cta-title",children:["The vote hasn't happened yet."," ",a("em",{children:"Tell your councillor to oppose it."})]}),a("p",{className:"cta-sub",children:o?`An extra \u20AC${Math.round(n).toLocaleString("en-IE")} a year is a serious hit. Councillors vote on this scheme \u2014 and they pay attention when constituents write in.`:"Even smaller increases compound over time, and many tenants face much larger hikes. Councillors vote on this scheme \u2014 and they pay attention when constituents write in."}),a("div",{className:"cta-actions",children:a("a",{href:t,className:"btn btn-primary",children:["Contact your councillor ",a("span",{className:"btn-arrow",children:"\u2192"})]})}),a("p",{className:"cta-meta",children:"Pre-filled message \xB7 Takes about 2 minutes"})]}),a("div",{className:"cta-side",children:[a("p",{className:"cta-side-label",children:"How it works"}),a("ol",{className:"cta-side-list",children:[a("li",{children:"Find your local SDCC councillors using your address."}),a("li",{children:"Send a pre-filled message \u2014 edit it however you like."}),a("li",{children:"Share this calculator with neighbours and family who rent from the Council."})]})]})]})})}var pt=[{what:"How rent is calculated",now:"10% of total household income + \u20AC3/week fixed charge",proposed:"12.5% of income \u2014 higher rate, fixed charge removed"},{what:"Additional earners",now:"All income counted in full \u2014 no cap",proposed:"Capped at \u20AC40/week per additional earner (= \u20AC320 net weekly income). Higher secondary earners may see rent fall."},{what:"Minimum weekly rent",now:"\u20AC27.40",proposed:"\u20AC35.00 (+\u20AC7.60/wk = +\u20AC395/yr minimum increase)"},{what:"Discount for non-earning children",now:"No discount",proposed:"\u20AC2/week per non-earning child under 18"},{what:"OAP discount (65+, sole occupant, on state pension)",now:"\u20AC10/week (income threshold: \u20AC289.30/wk)",proposed:"\u20AC10/week (income threshold: \u20AC299.30/wk)"},{what:"Working Family Payment (WFP)",now:"Excluded \u2014 did not affect rent",proposed:"Included \u2014 WFP \xD7 12.5% added to weekly rent"},{what:"Child income under 18",now:"Counted as income",proposed:"No longer counted"},{what:"Child maintenance received",now:"Counted as income",proposed:"No longer counted"},{what:"Disablement Benefit",now:"Counted as income",proposed:"No longer counted"}];function _t(){return a("section",{className:"section changes",children:[a("p",{className:"section-label",children:"For reference"}),a("h2",{className:"section-h",children:"What's actually changing in the proposed 2026 scheme."}),a("div",{className:"changes-table",role:"table",children:[a("div",{className:"changes-head",role:"row",children:[a("div",{role:"columnheader",children:"Item"}),a("div",{role:"columnheader",children:"2025 \u2014 now"}),a("div",{role:"columnheader",children:"2026 \u2014 proposed"})]}),pt.map((e,t)=>a("div",{className:"changes-row",role:"row",children:[a("div",{className:"changes-what",role:"cell",children:e.what}),a("div",{className:"changes-now",role:"cell",children:e.now}),a("div",{className:"changes-proposed",role:"cell",children:e.proposed})]},t))]})]})}function ut(){return a("footer",{className:"disclaimer",children:a("div",{className:"disclaimer-inner",children:[a("p",{className:"disclaimer-title",children:"Notes & sources"}),a("ol",{className:"disclaimer-list",children:[a("li",{children:"This is an estimate. SDCC will calculate your actual 2026 rent using the full income information they hold on file. Your real increase may differ."}),a("li",{children:"WFP is estimated using the standard DSP formula: 60% of (income threshold minus household income). Thresholds used are the 2025 DSP rates. Budget 2026 increased thresholds by \u20AC60/week from January 2026 \u2014 if your WFP changed, enter the actual amount in Q4b for accuracy."}),a("li",{children:"Source: SDCC Differential Rent Scheme 2025 (eff. 1 Jan 2025) and proposed 2026 scheme presented to Housing SPC, 14 May 2026. Note: SDCC's own presentation contained an arithmetic error in the 2-child WFP example \u2014 this calculator uses the correct DSP formula throughout. This calculator is for information only and is not an official SDCC document."}),a("li",{children:"Do not change what you pay until SDCC notifies you. The 2026 scheme is a proposal \u2014 it has not been adopted."})]})]})})}function je({campaignUrl:e=at}){let[t,n]=D(""),[o,s]=D(1),[r,l]=D(0),[p,_]=D(!1),[c,f]=D(""),[i,d]=D(!1),u=g=>{l(g),g===0&&(_(!1),f(""))},h=g=>{s(g),g>1&&d(!1)},b=We(()=>{let g=parseFloat(t);return!g||g<=0?null:Ue({currentRent:g,earners:o,children:r,wfp:p,wfpAmount:c,oap:i})},[t,o,r,p,c,i]);return a("div",{className:"root",children:a("main",{className:"main",children:[a("section",{className:"section",children:[a("p",{className:"section-label",children:"The calculator"}),a("h2",{className:"section-h",children:"Your details, your estimate."}),a("div",{className:"grid",children:[a(st,{currentRent:t,setCurrentRent:n,earners:o,setEarners:h,children:r,setChildren:u,wfp:p,setWfp:_,wfpAmount:c,setWfpAmount:f,oap:i,setOap:d}),a("div",{className:"result-card",children:a(lt,{result:b})})]})]}),b&&b.hasResult&&a(ct,{result:b,campaignUrl:e}),a(_t,{}),a(ut,{})]})})}var Ye=`
|
|
2
|
+
:host {
|
|
3
|
+
display: block;
|
|
4
|
+
--bg: #f2f1ef;
|
|
5
|
+
--bg-2: #ece9e3;
|
|
6
|
+
--paper: #ffffff;
|
|
7
|
+
--ink: #161616;
|
|
8
|
+
--ink-soft: #555049;
|
|
9
|
+
--ink-faint: #8e8a82;
|
|
10
|
+
--line-soft: rgba(22, 22, 22, 0.16);
|
|
11
|
+
--line-faint: rgba(22, 22, 22, 0.08);
|
|
12
|
+
--accent: #e71d4f;
|
|
13
|
+
--accent-deep:#b81540;
|
|
14
|
+
--good: #1f6e4d;
|
|
15
|
+
|
|
16
|
+
--font: Inter, ui-sans-serif, system-ui, sans-serif,
|
|
17
|
+
"Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
|
|
18
|
+
|
|
19
|
+
--max: 1120px;
|
|
20
|
+
--gutter: clamp(20px, 4vw, 48px);
|
|
21
|
+
|
|
22
|
+
color: var(--ink);
|
|
23
|
+
font-family: var(--font);
|
|
24
|
+
font-size: 16px;
|
|
25
|
+
line-height: 1.5;
|
|
26
|
+
-webkit-font-smoothing: antialiased;
|
|
27
|
+
background: var(--bg);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
* { box-sizing: border-box; }
|
|
31
|
+
|
|
32
|
+
::selection { background: var(--ink); color: var(--bg); }
|
|
33
|
+
|
|
34
|
+
.root { display: flex; flex-direction: column; }
|
|
35
|
+
|
|
36
|
+
/* \u2500\u2500 Main layout \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
|
|
37
|
+
.main {
|
|
38
|
+
width: 100%;
|
|
39
|
+
max-width: var(--max);
|
|
40
|
+
margin: 0 auto;
|
|
41
|
+
padding: 0 var(--gutter);
|
|
42
|
+
display: flex;
|
|
43
|
+
flex-direction: column;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.section {
|
|
47
|
+
border-top: 1px solid var(--line-soft);
|
|
48
|
+
padding: 64px 0;
|
|
49
|
+
}
|
|
50
|
+
.section:first-child { border-top: 0; padding-top: 56px; }
|
|
51
|
+
|
|
52
|
+
.section-label {
|
|
53
|
+
font-family: var(--font);
|
|
54
|
+
font-style: italic;
|
|
55
|
+
font-weight: 500;
|
|
56
|
+
font-size: 15px;
|
|
57
|
+
color: var(--accent);
|
|
58
|
+
margin: 0 0 10px;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.section-h {
|
|
62
|
+
font-family: var(--font);
|
|
63
|
+
font-weight: 700;
|
|
64
|
+
font-size: clamp(26px, 3.2vw, 36px);
|
|
65
|
+
line-height: 1.1;
|
|
66
|
+
letter-spacing: -0.02em;
|
|
67
|
+
margin: 0 0 36px;
|
|
68
|
+
max-width: 30ch;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
/* \u2500\u2500 Two-column grid (form + result) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
|
|
72
|
+
.grid {
|
|
73
|
+
display: grid;
|
|
74
|
+
grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
|
|
75
|
+
gap: 64px;
|
|
76
|
+
align-items: start;
|
|
77
|
+
}
|
|
78
|
+
@media (max-width: 960px) {
|
|
79
|
+
.grid { grid-template-columns: 1fr; gap: 40px; }
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
/* \u2500\u2500 Form fields \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
|
|
83
|
+
.field {
|
|
84
|
+
padding: 24px 0;
|
|
85
|
+
border-bottom: 1px solid var(--line-faint);
|
|
86
|
+
}
|
|
87
|
+
.calc-form .field:first-child { padding-top: 0; }
|
|
88
|
+
.calc-form .field:last-child { border-bottom: 0; }
|
|
89
|
+
|
|
90
|
+
.field-label {
|
|
91
|
+
display: block;
|
|
92
|
+
font-weight: 600;
|
|
93
|
+
font-size: 18px;
|
|
94
|
+
line-height: 1.3;
|
|
95
|
+
letter-spacing: -0.012em;
|
|
96
|
+
margin: 0 0 6px;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.field-hint {
|
|
100
|
+
font-size: 14.5px;
|
|
101
|
+
color: var(--ink-soft);
|
|
102
|
+
margin: 0;
|
|
103
|
+
max-width: 60ch;
|
|
104
|
+
line-height: 1.5;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
.field-control { margin-top: 14px; }
|
|
108
|
+
|
|
109
|
+
/* \u2500\u2500 Money input \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
|
|
110
|
+
.money-input {
|
|
111
|
+
display: inline-flex;
|
|
112
|
+
align-items: stretch;
|
|
113
|
+
border: 1px solid var(--ink);
|
|
114
|
+
background: var(--paper);
|
|
115
|
+
max-width: 220px;
|
|
116
|
+
width: 100%;
|
|
117
|
+
transition: box-shadow 100ms ease;
|
|
118
|
+
}
|
|
119
|
+
.money-input:focus-within { box-shadow: 0 0 0 2px var(--accent); }
|
|
120
|
+
|
|
121
|
+
.money-prefix {
|
|
122
|
+
display: flex;
|
|
123
|
+
align-items: center;
|
|
124
|
+
padding: 0 12px;
|
|
125
|
+
font-weight: 500;
|
|
126
|
+
font-size: 18px;
|
|
127
|
+
color: var(--ink-soft);
|
|
128
|
+
border-right: 1px solid var(--line-soft);
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
.money-input input {
|
|
132
|
+
border: 0;
|
|
133
|
+
outline: 0;
|
|
134
|
+
background: transparent;
|
|
135
|
+
font-family: var(--font);
|
|
136
|
+
font-weight: 600;
|
|
137
|
+
font-size: 18px;
|
|
138
|
+
padding: 11px 12px;
|
|
139
|
+
width: 100%;
|
|
140
|
+
color: var(--ink);
|
|
141
|
+
}
|
|
142
|
+
.money-input input::-webkit-outer-spin-button,
|
|
143
|
+
.money-input input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
|
|
144
|
+
.money-input input[type=number] { -moz-appearance: textfield; }
|
|
145
|
+
|
|
146
|
+
/* \u2500\u2500 Stepper \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
|
|
147
|
+
.stepper {
|
|
148
|
+
display: inline-flex;
|
|
149
|
+
align-items: stretch;
|
|
150
|
+
border: 1px solid var(--ink);
|
|
151
|
+
background: var(--paper);
|
|
152
|
+
}
|
|
153
|
+
.stepper-btn {
|
|
154
|
+
border: 0;
|
|
155
|
+
background: transparent;
|
|
156
|
+
font-family: var(--font);
|
|
157
|
+
font-weight: 500;
|
|
158
|
+
font-size: 20px;
|
|
159
|
+
width: 42px;
|
|
160
|
+
cursor: pointer;
|
|
161
|
+
color: var(--ink);
|
|
162
|
+
}
|
|
163
|
+
.stepper-btn:hover:not(:disabled) { background: var(--bg-2); }
|
|
164
|
+
.stepper-btn:disabled { color: var(--ink-faint); cursor: not-allowed; }
|
|
165
|
+
.stepper-btn:first-child { border-right: 1px solid var(--line-soft); }
|
|
166
|
+
.stepper-btn:last-child { border-left: 1px solid var(--line-soft); }
|
|
167
|
+
.stepper-value {
|
|
168
|
+
min-width: 64px;
|
|
169
|
+
display: flex;
|
|
170
|
+
align-items: center;
|
|
171
|
+
justify-content: center;
|
|
172
|
+
font-weight: 600;
|
|
173
|
+
font-size: 17px;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
/* \u2500\u2500 Segmented control \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
|
|
177
|
+
.segmented {
|
|
178
|
+
display: inline-flex;
|
|
179
|
+
border: 1px solid var(--ink);
|
|
180
|
+
background: var(--paper);
|
|
181
|
+
}
|
|
182
|
+
.segmented-opt {
|
|
183
|
+
border: 0;
|
|
184
|
+
background: transparent;
|
|
185
|
+
padding: 10px 22px;
|
|
186
|
+
font-family: var(--font);
|
|
187
|
+
font-weight: 500;
|
|
188
|
+
font-size: 15px;
|
|
189
|
+
cursor: pointer;
|
|
190
|
+
color: var(--ink-soft);
|
|
191
|
+
min-width: 72px;
|
|
192
|
+
}
|
|
193
|
+
.segmented-opt + .segmented-opt { border-left: 1px solid var(--line-soft); }
|
|
194
|
+
.segmented-opt:hover { background: var(--bg-2); }
|
|
195
|
+
.segmented-opt.is-active { background: var(--ink); color: var(--bg); }
|
|
196
|
+
|
|
197
|
+
/* \u2500\u2500 Result panel \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
|
|
198
|
+
.result-card {
|
|
199
|
+
position: sticky;
|
|
200
|
+
top: 24px;
|
|
201
|
+
}
|
|
202
|
+
@media (max-width: 960px) { .result-card { position: static; } }
|
|
203
|
+
|
|
204
|
+
.result-empty {
|
|
205
|
+
border: 1px dashed var(--line-soft);
|
|
206
|
+
padding: 48px 32px;
|
|
207
|
+
}
|
|
208
|
+
.result-empty-label {
|
|
209
|
+
font-style: italic;
|
|
210
|
+
font-weight: 500;
|
|
211
|
+
font-size: 15px;
|
|
212
|
+
color: var(--accent);
|
|
213
|
+
margin: 0 0 10px;
|
|
214
|
+
}
|
|
215
|
+
.result-empty-title {
|
|
216
|
+
font-weight: 700;
|
|
217
|
+
font-size: 26px;
|
|
218
|
+
letter-spacing: -0.02em;
|
|
219
|
+
margin: 0 0 8px;
|
|
220
|
+
line-height: 1.15;
|
|
221
|
+
}
|
|
222
|
+
.result-empty-sub {
|
|
223
|
+
color: var(--ink-soft);
|
|
224
|
+
font-size: 15.5px;
|
|
225
|
+
line-height: 1.55;
|
|
226
|
+
margin: 0;
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
.result-eyebrow {
|
|
230
|
+
font-style: italic;
|
|
231
|
+
font-weight: 500;
|
|
232
|
+
font-size: 16px;
|
|
233
|
+
color: var(--ink-soft);
|
|
234
|
+
margin: 0 0 14px;
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
.result-headline {
|
|
238
|
+
display: flex;
|
|
239
|
+
align-items: baseline;
|
|
240
|
+
gap: 4px;
|
|
241
|
+
font-weight: 800;
|
|
242
|
+
font-size: clamp(64px, 9vw, 108px);
|
|
243
|
+
line-height: 0.92;
|
|
244
|
+
letter-spacing: -0.05em;
|
|
245
|
+
color: var(--ink);
|
|
246
|
+
margin-bottom: 8px;
|
|
247
|
+
}
|
|
248
|
+
.result-headline.up { color: var(--accent); }
|
|
249
|
+
.result-headline.down { color: var(--good); }
|
|
250
|
+
.result-sign { font-weight: 800; }
|
|
251
|
+
.result-per {
|
|
252
|
+
font-size: clamp(16px, 1.4vw, 19px);
|
|
253
|
+
letter-spacing: -0.06em;
|
|
254
|
+
font-weight: 500;
|
|
255
|
+
color: var(--ink-soft);
|
|
256
|
+
margin-left: 8px;
|
|
257
|
+
align-self: end;
|
|
258
|
+
padding-bottom: 16px;
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
.result-weekly {
|
|
262
|
+
font-weight: 500;
|
|
263
|
+
font-size: 16px;
|
|
264
|
+
color: var(--ink-soft);
|
|
265
|
+
margin-bottom: 32px;
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
.result-rows { border-top: 1px solid var(--ink); margin-bottom: 28px; }
|
|
269
|
+
.result-row {
|
|
270
|
+
display: flex;
|
|
271
|
+
justify-content: space-between;
|
|
272
|
+
align-items: baseline;
|
|
273
|
+
padding: 14px 0;
|
|
274
|
+
font-size: 15.5px;
|
|
275
|
+
color: var(--ink-soft);
|
|
276
|
+
border-bottom: 1px solid var(--line-faint);
|
|
277
|
+
}
|
|
278
|
+
.result-row.strong { color: var(--ink); font-weight: 600; }
|
|
279
|
+
.result-row-val {
|
|
280
|
+
font-weight: 600;
|
|
281
|
+
color: var(--ink);
|
|
282
|
+
font-size: 16px;
|
|
283
|
+
}
|
|
284
|
+
.result-row.strong .result-row-val {
|
|
285
|
+
color: var(--accent);
|
|
286
|
+
font-weight: 700;
|
|
287
|
+
font-size: 17px;
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
.result-notes-label {
|
|
291
|
+
font-style: italic;
|
|
292
|
+
font-weight: 500;
|
|
293
|
+
font-size: 15px;
|
|
294
|
+
color: var(--accent);
|
|
295
|
+
margin: 0 0 10px;
|
|
296
|
+
padding-top: 20px;
|
|
297
|
+
border-top: 1px solid var(--line-faint);
|
|
298
|
+
}
|
|
299
|
+
.result-notes {
|
|
300
|
+
display: flex;
|
|
301
|
+
flex-direction: column;
|
|
302
|
+
gap: 16px;
|
|
303
|
+
}
|
|
304
|
+
.result-note {
|
|
305
|
+
font-size: 14.5px;
|
|
306
|
+
color: var(--ink-soft);
|
|
307
|
+
line-height: 1.55;
|
|
308
|
+
}
|
|
309
|
+
.result-note strong {
|
|
310
|
+
color: var(--ink);
|
|
311
|
+
font-weight: 600;
|
|
312
|
+
}
|
|
313
|
+
.note-highlight {
|
|
314
|
+
color: var(--ink);
|
|
315
|
+
font-weight: 500;
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
/* \u2500\u2500 Call to action \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
|
|
319
|
+
.cta {
|
|
320
|
+
background: var(--ink);
|
|
321
|
+
color: var(--bg);
|
|
322
|
+
margin: 0 calc(-1 * var(--gutter));
|
|
323
|
+
padding: 88px var(--gutter);
|
|
324
|
+
}
|
|
325
|
+
.cta-inner {
|
|
326
|
+
max-width: var(--max);
|
|
327
|
+
margin: 0 auto;
|
|
328
|
+
display: grid;
|
|
329
|
+
grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
|
|
330
|
+
gap: 64px;
|
|
331
|
+
align-items: end;
|
|
332
|
+
}
|
|
333
|
+
@media (max-width: 900px) {
|
|
334
|
+
.cta { padding: 56px var(--gutter); }
|
|
335
|
+
.cta-inner { grid-template-columns: 1fr; gap: 36px; }
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
.cta-eyebrow {
|
|
339
|
+
font-style: italic;
|
|
340
|
+
font-weight: 500;
|
|
341
|
+
font-size: 16px;
|
|
342
|
+
color: var(--accent);
|
|
343
|
+
margin: 0 0 14px;
|
|
344
|
+
}
|
|
345
|
+
.cta-title {
|
|
346
|
+
font-weight: 700;
|
|
347
|
+
font-size: clamp(32px, 4.5vw, 52px);
|
|
348
|
+
line-height: 1.05;
|
|
349
|
+
letter-spacing: -0.03em;
|
|
350
|
+
margin: 0 0 24px;
|
|
351
|
+
color: var(--bg);
|
|
352
|
+
max-width: 22ch;
|
|
353
|
+
}
|
|
354
|
+
.cta-title em { font-style: normal; color: var(--accent); }
|
|
355
|
+
.cta-sub {
|
|
356
|
+
font-size: 17px;
|
|
357
|
+
line-height: 1.55;
|
|
358
|
+
color: rgba(242, 241, 239, 0.78);
|
|
359
|
+
margin: 0 0 32px;
|
|
360
|
+
max-width: 52ch;
|
|
361
|
+
}
|
|
362
|
+
.cta-actions {
|
|
363
|
+
display: flex;
|
|
364
|
+
gap: 20px;
|
|
365
|
+
flex-wrap: wrap;
|
|
366
|
+
margin-bottom: 16px;
|
|
367
|
+
align-items: center;
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
.btn {
|
|
371
|
+
display: inline-flex;
|
|
372
|
+
align-items: center;
|
|
373
|
+
gap: 12px;
|
|
374
|
+
padding: 16px 24px;
|
|
375
|
+
font-family: var(--font);
|
|
376
|
+
font-weight: 600;
|
|
377
|
+
font-size: 16px;
|
|
378
|
+
text-decoration: none;
|
|
379
|
+
border: 1px solid transparent;
|
|
380
|
+
cursor: pointer;
|
|
381
|
+
letter-spacing: -0.005em;
|
|
382
|
+
}
|
|
383
|
+
.btn-primary {
|
|
384
|
+
background: var(--accent);
|
|
385
|
+
color: #fff;
|
|
386
|
+
border-color: var(--accent);
|
|
387
|
+
}
|
|
388
|
+
.btn-primary:hover {
|
|
389
|
+
background: var(--accent-deep);
|
|
390
|
+
border-color: var(--accent-deep);
|
|
391
|
+
}
|
|
392
|
+
.btn-arrow { font-size: 18px; }
|
|
393
|
+
|
|
394
|
+
.cta-meta {
|
|
395
|
+
font-style: italic;
|
|
396
|
+
font-size: 14px;
|
|
397
|
+
color: rgba(242, 241, 239, 0.55);
|
|
398
|
+
margin: 0;
|
|
399
|
+
}
|
|
400
|
+
|
|
401
|
+
.cta-side {
|
|
402
|
+
border-left: 1px solid rgba(242, 241, 239, 0.2);
|
|
403
|
+
padding-left: 36px;
|
|
404
|
+
}
|
|
405
|
+
@media (max-width: 900px) {
|
|
406
|
+
.cta-side {
|
|
407
|
+
border-left: 0;
|
|
408
|
+
padding-left: 0;
|
|
409
|
+
border-top: 1px solid rgba(242, 241, 239, 0.2);
|
|
410
|
+
padding-top: 32px;
|
|
411
|
+
}
|
|
412
|
+
}
|
|
413
|
+
|
|
414
|
+
.cta-side-label {
|
|
415
|
+
font-style: italic;
|
|
416
|
+
font-weight: 500;
|
|
417
|
+
font-size: 16px;
|
|
418
|
+
color: var(--accent);
|
|
419
|
+
margin: 0 0 16px;
|
|
420
|
+
}
|
|
421
|
+
.cta-side-list {
|
|
422
|
+
list-style: none;
|
|
423
|
+
margin: 0;
|
|
424
|
+
padding: 0;
|
|
425
|
+
display: flex;
|
|
426
|
+
flex-direction: column;
|
|
427
|
+
gap: 16px;
|
|
428
|
+
counter-reset: step;
|
|
429
|
+
}
|
|
430
|
+
.cta-side-list li {
|
|
431
|
+
font-size: 15.5px;
|
|
432
|
+
color: rgba(242, 241, 239, 0.88);
|
|
433
|
+
line-height: 1.5;
|
|
434
|
+
padding-left: 32px;
|
|
435
|
+
position: relative;
|
|
436
|
+
counter-increment: step;
|
|
437
|
+
}
|
|
438
|
+
.cta-side-list li::before {
|
|
439
|
+
content: counter(step) ".";
|
|
440
|
+
position: absolute;
|
|
441
|
+
left: 0;
|
|
442
|
+
font-weight: 700;
|
|
443
|
+
color: var(--accent);
|
|
444
|
+
}
|
|
445
|
+
|
|
446
|
+
/* \u2500\u2500 What's changing table \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
|
|
447
|
+
.changes-table {
|
|
448
|
+
border-top: 2px solid var(--ink);
|
|
449
|
+
border-bottom: 1px solid var(--ink);
|
|
450
|
+
}
|
|
451
|
+
.changes-head,
|
|
452
|
+
.changes-row {
|
|
453
|
+
display: grid;
|
|
454
|
+
grid-template-columns: 1.3fr 1.4fr 1.4fr;
|
|
455
|
+
}
|
|
456
|
+
.changes-head {
|
|
457
|
+
border-bottom: 1px solid var(--ink);
|
|
458
|
+
font-size: 13px;
|
|
459
|
+
font-weight: 600;
|
|
460
|
+
}
|
|
461
|
+
.changes-head > div { padding: 14px 16px 14px 0; }
|
|
462
|
+
.changes-head > div:first-child { padding-left: 16px; }
|
|
463
|
+
|
|
464
|
+
.changes-row { border-bottom: 1px solid var(--line-faint); align-items: baseline; }
|
|
465
|
+
.changes-row:last-child { border-bottom: 0; }
|
|
466
|
+
.changes-row > div {
|
|
467
|
+
padding: 20px 16px 20px 0;
|
|
468
|
+
font-size: 15px;
|
|
469
|
+
color: var(--ink-soft);
|
|
470
|
+
line-height: 1.5;
|
|
471
|
+
}
|
|
472
|
+
.changes-row > div:first-child { padding-left: 16px; }
|
|
473
|
+
.changes-what {
|
|
474
|
+
font-weight: 600;
|
|
475
|
+
color: var(--ink) !important;
|
|
476
|
+
font-size: 16px !important;
|
|
477
|
+
}
|
|
478
|
+
.changes-proposed { color: var(--ink) !important; }
|
|
479
|
+
|
|
480
|
+
@media (max-width: 780px) {
|
|
481
|
+
.changes-head { display: none; }
|
|
482
|
+
.changes-row { grid-template-columns: 1fr; padding: 18px 0 22px; }
|
|
483
|
+
.changes-row > div { padding: 4px 16px; }
|
|
484
|
+
.changes-what { padding-top: 18px !important; }
|
|
485
|
+
.changes-now::before {
|
|
486
|
+
content: "Now: ";
|
|
487
|
+
color: var(--ink-faint);
|
|
488
|
+
font-style: italic;
|
|
489
|
+
font-weight: 500;
|
|
490
|
+
}
|
|
491
|
+
.changes-proposed::before {
|
|
492
|
+
content: "Proposed: ";
|
|
493
|
+
color: var(--accent);
|
|
494
|
+
font-style: italic;
|
|
495
|
+
font-weight: 600;
|
|
496
|
+
}
|
|
497
|
+
}
|
|
498
|
+
|
|
499
|
+
/* \u2500\u2500 Disclaimer \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
|
|
500
|
+
.disclaimer {
|
|
501
|
+
padding: 48px 0 64px;
|
|
502
|
+
border-top: 1px solid var(--line-soft);
|
|
503
|
+
}
|
|
504
|
+
.disclaimer-inner { max-width: 720px; }
|
|
505
|
+
|
|
506
|
+
.disclaimer-title {
|
|
507
|
+
font-style: italic;
|
|
508
|
+
font-weight: 500;
|
|
509
|
+
font-size: 16px;
|
|
510
|
+
color: var(--accent);
|
|
511
|
+
margin: 0 0 18px;
|
|
512
|
+
}
|
|
513
|
+
.disclaimer-list {
|
|
514
|
+
margin: 0;
|
|
515
|
+
padding: 0 0 0 20px;
|
|
516
|
+
list-style: disc;
|
|
517
|
+
font-size: 14.5px;
|
|
518
|
+
color: var(--ink-soft);
|
|
519
|
+
line-height: 1.6;
|
|
520
|
+
}
|
|
521
|
+
.disclaimer-list li { margin-bottom: 10px; padding-left: 4px; }
|
|
522
|
+
.disclaimer-list li::marker { color: var(--accent); }
|
|
523
|
+
`;var J="sdcc-rent-calculator",dt="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap";function ft(){if(typeof document>"u"||document.querySelector(`link[data-${J}-font]`))return;let e=document.createElement("link");e.rel="preconnect",e.href="https://fonts.googleapis.com";let t=document.createElement("link");t.rel="preconnect",t.href="https://fonts.gstatic.com",t.crossOrigin="";let n=document.createElement("link");n.rel="stylesheet",n.href=dt,n.setAttribute(`data-${J}-font`,""),document.head.append(e,t,n)}var _e=class extends HTMLElement{static get observedAttributes(){return["campaign-url"]}constructor(){super(),this._root=this.attachShadow({mode:"open"}),this._container=null}connectedCallback(){ft();let t=document.createElement("style");t.textContent=Ye,this._container=document.createElement("div"),this._root.append(t,this._container),this._render()}disconnectedCallback(){this._container&&se(null,this._container)}attributeChangedCallback(){this._container&&this._render()}_render(){let t=this.getAttribute("campaign-url")||void 0;se(re(je,{campaignUrl:t}),this._container)}};typeof customElements<"u"&&!customElements.get(J)&&customElements.define(J,_e);})();
|
package/package.json
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "sdcc-rent-calculator",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Embeddable web component that estimates the rent increase a South Dublin County Council tenant would face under the proposed 2026 Differential Rent Scheme.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "dist/sdcc-rent-calculator.js",
|
|
7
|
+
"module": "dist/sdcc-rent-calculator.js",
|
|
8
|
+
"unpkg": "dist/sdcc-rent-calculator.js",
|
|
9
|
+
"jsdelivr": "dist/sdcc-rent-calculator.js",
|
|
10
|
+
"files": [
|
|
11
|
+
"dist"
|
|
12
|
+
],
|
|
13
|
+
"scripts": {
|
|
14
|
+
"build": "node build.mjs",
|
|
15
|
+
"prepublishOnly": "node build.mjs"
|
|
16
|
+
},
|
|
17
|
+
"keywords": [
|
|
18
|
+
"sdcc",
|
|
19
|
+
"rent",
|
|
20
|
+
"calculator",
|
|
21
|
+
"web-component",
|
|
22
|
+
"custom-element",
|
|
23
|
+
"ireland",
|
|
24
|
+
"housing"
|
|
25
|
+
],
|
|
26
|
+
"author": "Katie Chapman",
|
|
27
|
+
"license": "MIT",
|
|
28
|
+
"repository": {
|
|
29
|
+
"type": "git",
|
|
30
|
+
"url": "git+https://github.com/SemanticallyNull/renthikes.git"
|
|
31
|
+
},
|
|
32
|
+
"homepage": "https://github.com/SemanticallyNull/renthikes#readme",
|
|
33
|
+
"bugs": {
|
|
34
|
+
"url": "https://github.com/SemanticallyNull/renthikes/issues"
|
|
35
|
+
},
|
|
36
|
+
"dependencies": {
|
|
37
|
+
"preact": "^10.29.2"
|
|
38
|
+
},
|
|
39
|
+
"devDependencies": {
|
|
40
|
+
"esbuild": "^0.28.0"
|
|
41
|
+
}
|
|
42
|
+
}
|