{"version":3,"sources":["../../src/app/components/knob/knob.ts"],"names":["KNOB_VALUE_ACCESSOR","provide","NG_VALUE_ACCESSOR","useExisting","forwardRef","Knob","multi","cd","el","this","valueColor","rangeColor","textColor","valueTemplate","size","step","min","max","strokeWidth","showValue","readonly","onChange","EventEmitter","radius","midX","midY","minRadians","Math","PI","maxRadians","value","onModelChange","onModelTouched","prototype","mapRange","x","inMin","inMax","outMin","outMax","onClick","event","disabled","updateValue","offsetX","offsetY","dx","dy","angle","atan2","start","updateModel","mappedValue","newValue","round","emit","onMouseDown","windowMouseMoveListener","onMouseMove","bind","windowMouseUpListener","onMouseUp","window","addEventListener","preventDefault","removeEventListener","onTouchStart","windowTouchMoveListener","onTouchMove","windowTouchEndListener","onTouchEnd","touches","length","rect","nativeElement","children","getBoundingClientRect","touch","targetTouches","item","clientX","left","clientY","top","writeValue","markForCheck","registerOnChange","fn","registerOnTouched","setDisabledState","val","containerClass","p-knob p-component","p-disabled","rangePath","minX","minY","maxX","maxY","valuePath","zeroX","zeroY","largeArc","sweep","valueX","valueY","zeroRadians","valueRadians","_value","cos","sin","abs","valueToDisplay","replace","toString","Object","defineProperty","Component","args","selector","template","providers","changeDetection","ChangeDetectionStrategy","OnPush","encapsulation","ViewEncapsulation","None","ChangeDetectorRef","ElementRef","Input","Output","NgModule","imports","CommonModule","exports","declarations"],"mappings":"ycAIaA,EAA2B,CACpCC,QAASC,EAAAA,kBACTC,YAAaC,EAAAA,YAAW,WAAM,OAAAC,KAC9BC,OAAO,gBAgFP,SAAAD,EAAoBE,EAA+BC,GAA/BC,KAAAF,GAAAA,EAA+BE,KAAAD,GAAAA,EApD1CC,KAAAC,WAAqB,8BAErBD,KAAAE,WAAqB,8BAErBF,KAAAG,UAAoB,qCAEpBH,KAAAI,cAAwB,UAIxBJ,KAAAK,KAAe,IAEfL,KAAAM,KAAe,EAEfN,KAAAO,IAAc,EAEdP,KAAAQ,IAAc,IAEdR,KAAAS,YAAsB,GAItBT,KAAAU,WAAqB,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rG,EAAA4B,UAAA+E,eAAA,WACI,OAAOvG,KAAKI,cAAcoG,QAAQ,UAAWxG,KAAKmG,OAAOM,aAG7DC,OAAAC,eAAI/G,EAAA4B,UAAA,SAAM,KAAV,WACI,OAAqB,MAAdxB,KAAKqB,MAAgBrB,KAAKqB,MAAQrB,KAAKO,8DAlQrDqG,EAAAA,UAASC,KAAA,CAAC,CACPC,SAAU,SACVC,SAAU,k0BAUVC,UAAW,CAACzH,GACZ0H,gBAAiBC,EAAAA,wBAAwBC,OACzCC,cAAeC,EAAAA,kBAAkBC,iSAxBwDC,EAAAA,yBAAmBC,EAAAA,kDA6B3GC,EAAAA,qBAEAA,EAAAA,wBAEAA,EAAAA,0BAEAA,EAAAA,0BAEAA,EAAAA,yBAEAA,EAAAA,6BAEAA,EAAAA,oBAEAA,EAAAA,oBAEAA,EAAAA,oBAEAA,EAAAA,mBAEAA,EAAAA,mBAEAA,EAAAA,2BAEAA,EAAAA,wBAEAA,EAAAA,yBAEAA,EAAAA,wBAEAA,EAAAA,wBAEAC,EAAAA,gBAwNL,iCALCC,EAAAA,SAAQd,KAAA,CAAC,CACNe,QAAS,CAACC,EAAAA,cACVC,QAAS,CAAClI,GACVmI,aAAc,CAACnI","sourcesContent":["import { NgModule, Component, ChangeDetectionStrategy, ViewEncapsulation, Input, forwardRef, ChangeDetectorRef, ElementRef, Output, EventEmitter} from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\n\nexport const KNOB_VALUE_ACCESSOR: any = {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => Knob),\n multi: true\n};\n\n@Component({\n selector: 'p-knob',\n template: `\n