webpackJsonp([1],{"/U5P":function(e,t){},"0eAL":function(e,t){},"1/oy":function(e,t){},"9M+g":function(e,t){},BtA6:function(e,t){},GfHa:function(e,t){},Id91:function(e,t){},"J/Fn":function(e,t){e.exports={api_addr:"http://localhost:5004"}},Jmt5:function(e,t){},LZNP:function(e,t){},MGy4:function(e,t){},NHnr:function(e,t,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=s("woOf"),a=s.n(n),i=s("//Fk"),r=s.n(i),o=s("7+uW"),l={render:function(){var e=this.$createElement;return(this._self._c||e)("router-view")},staticRenderFns:[]},c=s("VU/8")({name:"App"},l,!1,null,null,null).exports,d=s("/ocq"),u={render:function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("nav",[s("b-navbar",{attrs:{toggleable:"md",type:"light",variant:"light"}},[s("b-navbar-toggle",{attrs:{target:"nav_collapse"}}),e._v(" "),s("b-navbar-brand",[e._v("Vezljivostni vzorci slovenskih glagolov")]),e._v(" "),s("b-collapse",{attrs:{"is-nav":"",id:"nav_collapse"}},[s("b-navbar-nav",[s("b-nav-item-dropdown",{attrs:{text:"Prikaz",right:""}},e._l(e.search_options,function(t){return s("b-dropdown-item",{key:t.val,attrs:{value:t.val},on:{click:function(s){e.setNavSS(t.val)}}},[e._v("\n "+e._s(t.key)+"\n ")])}))],1),e._v(" "),this.loggedIn()?s("b-navbar-nav",{staticClass:"ml-auto",attrs:{right:""}},[s("b-nav-item",[e._v("\n Uporabnik: "+e._s(this.$root.store.username)+" \n "),s("a",{attrs:{href:"#"},on:{click:function(t){e.logOut()}}},[e._v("(odjava)")])])],1):s("b-navbar-nav",{staticClass:"ml-auto",attrs:{right:""}},[s("b-nav-item",[s("router-link",{attrs:{to:"/register"}},[e._v("\n Registracija\n ")])],1),e._v(" "),s("b-nav-item",[s("router-link",{attrs:{to:"/login"}},[e._v("\n Prijava\n ")])],1)],1)],1)],1)],1)},staticRenderFns:[]},p=s("VU/8")({name:"Nav",props:["appState"],data:function(){return{search_options:[{key:"besede",val:"words"},{key:"udeleženske vloge",val:"functors"}]}},methods:{setNavSS:function(e){this.$root.store.radio="one",this.$root.store.navSS=e,this.$router.push({name:"Home"})},loggedIn:function(){return null!==this.$root.store.token},logOut:function(){this.$root.store.token=null,this.$root.store.username=null,this.$router.push({name:"Home"})}}},u,!1,null,null,null).exports,h={render:function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",[s("select",{directives:[{name:"model",rawName:"v-model",value:e.selectedLetter,expression:"selectedLetter"}],on:{change:function(t){var s=Array.prototype.filter.call(t.target.options,function(e){return e.selected}).map(function(e){return"_value"in e?e._value:e.value});e.selectedLetter=t.target.multiple?s:s[0]}}},e._l(e.alphabet,function(t){return s("option",{domProps:{value:t}},[e._v("\n "+e._s(t.toUpperCase())+" ("+e._s(e.getNumWords(t))+")\n ")])})),e._v(" "),s("table",e._l(e.getWords(),function(t){return s("tr",[s("td",[s("a",{attrs:{href:"#"},on:{click:function(s){e.selectHw(t)}}},[e._v(e._s(t[0])+"\n "),e.$root.store.has_se.includes(t[0])?s("span",[e._v("se")]):e._e()])]),e._v(" "),s("td",[e._v("("+e._s(t[1])+")")])])}))])},staticRenderFns:[]};var v=s("VU/8")({name:"LWords",data:function(){return{alphabet:"abcčdefghijklmnoprsštuvzž",letters:{},selectedLetter:"a"}},methods:{apiGetWords:function(){var e=this;this.$http.get(this.$root.storeGet("api_addr")+"/api/words").then(function(t){e.$root.store.api_error=null,e.$root.store.has_se=t.data.has_se,e.letters=t.data.sorted_words}).catch(function(t){e.$root.store.api_error=t})},getNumWords:function(e){var t=this.letters[e];return t?t.length:0},getWords:function(){var e=this.letters[this.selectedLetter];return e||[]},selectHw:function(e){this.$router.push({name:"MainDispl",params:{hw:e[0],fmode:!1}})}},mounted:function(){this.apiGetWords()}},h,!1,function(e){s("zbom")},"data-v-52c6d79c",null).exports,m={render:function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",[s("table",e._l(e.functors,function(t){return s("tr",[s("td",[s("a",{attrs:{href:"#"},on:{click:function(s){e.selectFunctor(t)}}},[e._v(e._s(t[0]))])]),e._v(" "),s("td",[e._v("("+e._s(t[1])+")")])])}))])},staticRenderFns:[]};var _=s("VU/8")({name:"LWords",props:["appState"],data:function(){return{functors:[]}},methods:{apiGetFunctors:function(){var e=this;this.$http.get(this.$root.store.api_addr+"/api/functors").then(function(t){e.$root.store.api_error=null,e.functors=t.data}).catch(function(t){e.$root.store.api_error=t})},selectFunctor:function(e){this.$router.push({name:"MainDispl",params:{hw:e[0],fmode:!0}})}},mounted:function(){this.apiGetFunctors()}},m,!1,function(e){s("aqri")},null,null).exports,f=s("fZjL"),g=s.n(f),w={render:function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"pb-3"},[void 0===e.sense?s("div",[e._v("\n pomen ni definiran\n ")]):s("div",[s("span",[e._v(e._s(e.sense.desc))]),e._v(" "),s("br"),e._v("\n   \n "),s("small",{staticClass:"text-secondary"},[e._v("\n - "+e._s(e.sense.author)+"\n "+e._s(e.gen_id())+"\n ")])])])},staticRenderFns:[]},k=s("VU/8")({name:"Sense",props:["sense"],methods:{gen_id:function(){var e=this.sense.sense_id.split("-"),t="";return"SSKJ"===this.sense.author&&("0"!==e[1]&&(t+="["+e[1]+["] "]),"0"!==e[2]&&(t+="pomen "+e[2],"0"!==e[3]&&(t+="."+e[3])),"sopo"===e[4]&&(t+=" (sopomenka)")),t.length>0&&(t=": "+t),t}}},w,!1,null,null,null).exports,$={name:"Frame",props:{frameData:{},sensData:{},fmode:{default:!1,type:Boolean}},data:function(){return{hid:null,sid:null}},components:{Sense:k},watch:{frameData:function(){this.hid=null,this.sid=null}},methods:{setHid:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(null!==t){for(var s=0;s0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(this.sid=null,null!==t){for(var s=0;s0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return null!==this.hid&&(null===t?e==this.hid:this.frameData.slots[this.hid].tids.includes(t))},hasSelTid:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return null!==this.sid&&(null===t?e==this.sid:this.frameData.slots[this.sid].tids.includes(t))},isHw:function(e){return this.frameData.tids.includes(e)},getSense:function(){for(var e in this.sensData.senses)if(this.sensData.senses[e].sense_id===this.frameData.sense_info.sense_id)return this.sensData.senses[e]},getAggrHws:function(){return g()(this.frameData.aggr_sent).sort()},getAggrSent:function(e){for(var t=[],s=0;s1&&void 0!==arguments[1]?arguments[1]:null;if(null!==e&&void 0!==e){if(null===t)switch(this.$root.store.radio){case"one":t="reduce_0";break;case"two":t="reduce_1";break;default:t="reduce_0"}var s=this;this.$http.get(this.$root.storeGet("api_addr")+"/api/functor-frames?functor="+e+"&rf="+t).then(function(e){s.$root.store.api_error=null,s.frames=e.data.frames,s.state="normal"}).catch(function(e){s.$root.store.api_error=e})}},getFrames:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(null!==e&&void 0!==e){if(null===t)switch(this.$root.store.radio){case"one":t="reduce_0";break;case"two":t="reduce_1";break;case"three":t="reduce_5"}var s=this;this.$http.get(this.$root.storeGet("api_addr")+"/api/frames?hw="+e+"&rf="+t).then(function(e){s.$root.store.api_error=null,s.frames=e.data.frames,s.state="normal"}).catch(function(e){s.$root.store.api_error=e})}},buildSentences:function(){if(0!=this.frames.length)for(var e in this.sentences={},this.frames)for(var t in this.frames[e].sentences){var s=this.frames[e].sentences[t],n=s[0][0].split(".");n.splice(-1,1),n=n.join(".");var a=[],i=-1,r=this.hw;for(var o in"_"===r[r.length-1]&&(r=r.substr(0,r.length-1)),s)a.push(s[o][1].word),s[o][1].lemma===r&&-1==i&&(i=o);this.sentences[n]={hw_idx:i,words:a}}},getSenses:function(e,t){if(null!==e&&void 0!==e){var s=this;this.$http.get(this.$root.store.api_addr+"/api/senses/get?hw="+e).then(function(e){s.sens.senses=e.data.senses,s.sens.sense_map=e.data.sense_map,t()})}},reload:function(){this.state="loading",this.sentences={},"functors"===this.$root.store.navSS?this.getFFrames(this.hw):(this.getFrames(this.hw),"three"===this.$root.store.radio&&this.getSenses(this.hw,this.sortBySense)),this.calcPos()},userEdit:function(){var e=this;this.$root.checkToken().then(function(t){e.state="editing"}).catch(function(e){alert("Za urejanje je potrebna prijava.")})},calcPos:function(){var e=this.fmode;return"string"==typeof e&&(e="true"===e),e?"udeleženska vloga":"_"===this.hw.substr(this.hw.length-1)?"pridevnik":"glagol"},sortBySense:function(){for(var e=[],t=[],s=0;s",data:function(){return{store:Q}},methods:a()(Y,X,{routeBack:function(){this.$router.go(-1)},mkspace:function(e,t){return![".",",",":",";"].includes(t)}}),beforeCreate:function(){if(document.title="Vezljivostni vzorci",this.$cookies.isKey("valency_token")){var e=this.$cookies.get("valency_token"),t={token:e};this.$http.post(Q.api_addr+"/api/token",t,{headers:{"Content-type":"application/x-www-form-urlencoded"}}).then(function(t){t.data.confirmation?(Q.username=t.data.username,Q.token=e):this.$cookies.remove("valency_token")}).catch(function(e){Q.api_error=e})}}})},aqri:function(e,t){},oTNY:function(e,t){},pvJg:function(e,t){},y3ES:function(e,t){},zbom:function(e,t){},zj2Q:function(e,t){}},["NHnr"]); //# sourceMappingURL=app.abe281d88cb13e210c8b.js.map